예제 #1
0
 $rand = rand(23456789, 98765432);
 $user->setRandom($rand);
 $user->getUserlevel("0");
 // echo "";
 //$rand = rand(23456789,98765432) ;
 $userM->addNewUser($user);
 //	$sql = "INSERT INTO `cms_demo`.`users` (`id`, `full_name`, `username`, `password`,
 //	`email`, `date`) VALUES (NULL, \'sachini malindi\', \'asmalindi\', \'fidufifuodssfuo\',
 //	\'asmalindi@gmail.com\', \'2011-03-31\');";
 //$query = ( "INSERT INTO `users` (`id`, `full_name`, `username`, `password`,
 //`email`, `date`) VALUES ('','$fullname','$username ','$password','$email',NOW())");
 //	$query=("INSERT INTO `users` (`id`, `full_name`, `username`, `password`,
 //	`email`, `date`, `random`, `activated`) VALUES (NULL,'$fullname','$username','$cpassword','$email',NOW(),'$rand','0')");
 //	$lastid = mysql_insert_id();
 $connector = new DbConnector();
 $lastid = $connector->getLastId();
 // $to = $email;
 //			 $subject = "Activate ur account ";
 //			 $headers = "From: admin@mysitename.com";
 //			 $server = "admin@LOCALHOST";
 //
 //			 ini_set("STMP",$server);
 //
 //			 $body = " hello". $fullname.",
 //			 To Confirm, click here:
 //			 <a href= 'http://localhost/cms/activate.php?id=$lastid&code=$rand'>
 //			 Confirmar usuario</a>
 //			 ";
 //
 //			 mail($to,$subject,$body,$headers);
 // $userM->addNewUser($user);