示例#1
0
文件: actions.php 项目: pari/rand0m
     		$MCR = new ManageChatRooms();
     		$ACTIVE_USERS = $MCR->get_ListOfActiveUserNamesIn_ChatRoom($roomid);
     		send_Action_Response('Success' , " ACTIVE_USERS = ".json_encode($ACTIVE_USERS). " ; " );
     		exit();
     	break;*/
 /*case 'fetch_activeUsers':
 		$roomid = get_POST_var('ROOMID');
 		$MCR = new ManageChatRooms();
 		$ACTIVE_USERS = $MCR->get_ListOfActiveUserNamesIn_ChatRoom($roomid);
 		send_Action_Response('Success' , " ACTIVE_USERS = ".json_encode($ACTIVE_USERS). " ; " );
 		exit();
 	break;*/
 case 'fetch_Users_InRoom':
     $roomid = get_POST_var('ROOMID');
     $MCR = new ManageChatRooms();
     $ALL_USERS = $MCR->get_ListOfAllUsersInRoom_andStatus($roomid);
     send_Action_Response('Success', " ALL_USERS = " . json_encode($ALL_USERS) . " ; ");
     exit;
     break;
 case 'updateUserPassword':
     $oldPassword = get_POST_var("oldPassword");
     $newPassword = get_POST_var("newPassword");
     $existingPassword = executesql_returnArray("select emplPassword from tblAppUsers where emplUsername='******'");
     if ($existingPassword != md5($oldPassword)) {
         send_Action_Response('Fail', 'Current Password does not match !');
     } else {
         $result = execute_sqlUpdate('tblAppUsers', array('emplPassword' => md5($newPassword)), array('emplUsername' => $USERNAME));
         send_Action_Response('Success', 'Updated!');
     }
     exit;
     break;