Guest User

Untitled

a guest
Jan 21st, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.98 KB | None | 0 0
  1.             $array = array();
  2.             $username = $DC->sec()->my("username",1);
  3.             $password = $DC->sec()->my("password",1);
  4.             $secret_code = $DC->sec()->my("secret_code",1);
  5.             $password_in = $DC->sec()->enc($password);
  6.             $secret_code_in = $DC->sec()->enc($secret_code);
  7.             $Q = $DC->db()->query("SELECT * FROM `".TABLE_KEY."Master` WHERE `username` = '" .$username. "' AND `password` = '" .$password_in. "' AND `secret_code` = '" .$secret_code_in. "'");
  8.             if($DC->db()->numRows($Q) < 1){
  9.                 echo "הפרטים שהוזנו שגויים&&null";
  10.             }else {
  11.                 $DC->auth()->Handle(array(
  12.                     DC_GLOBAL_KEY => array("type" => "cookie","action" => "register","value" => $username,"expire" => strtotime("+ 1 month")),
  13.                     DC_GLOBAL_KEY_VALIDATE => array("type" => "cookie","action" => "register","value" => $DC->sec()->enc($username),"expire" => strtotime("+ 1 month"))
  14.                 ));
  15.                 $DC->WriteLog($username." התחבר למערכת");
  16.                 echo "התחברת בהצלחה למערכת&&index.php";
  17.             }
Add Comment
Please, Sign In to add comment