示例#1
0
     echo $result;
 } else {
     if ($action == 'updateRegistration') {
         $util = new Utils();
         $regId = $_GET["regId"];
         $username = $_GET["uName"];
         $d_pwd = $util->randomNumber(10);
         $password = md5($d_pwd);
         $firstName = $_GET["fName"];
         $lastName = $_GET["lName"];
         $staffID = $_GET["staffId"];
         $emailID = $_GET["email"];
         $designation = $_GET["designation"];
         $active = '0';
         $acc = new UserAccounts();
         $acc->updateSignup($regId, $username, $password, $firstName, $lastName, $staffID, $emailID, $designation, $active);
         $emsg = new EmailMsg();
         $emailMsg = $emsg->signupGreeting($username, $d_pwd);
         mail($emailID, "Samarthya Online learning Portal ::: Signup Process", $emailMsg);
     } else {
         if ($action == 'getUserDetails') {
             $data = "{\"data\": [";
             $acc = new UserAccounts();
             $json = $acc->adminGetUserDetails();
             //echo $json;
             $dejson = json_decode($json);
             for ($ind = 0; $ind < count($dejson); $ind++) {
                 $data .= "[";
                 $data .= "\"" . $dejson[$ind]->{'firstName'} . " " . $dejson[$ind]->{'lastName'} . "\",";
                 $data .= "\"" . $dejson[$ind]->{'designation'} . "\",";
                 $data .= "\"" . $dejson[$ind]->{'staffID'} . "\",";