$RemoteAjax->SQLQuery('factoryInfo', $sqlTmp); $setData['factoryInfo'][$i] = $RemoteAjax->resultArray['factoryInfo'][0]; $i++; unset($sqlTmp); unset($RemoteAjax->resultArray['factoryInfo']); } unset($i); $resultAry = array("result" => "success", "data" => $setData); print_r(json_encode($resultAry)); unset($setData); unset($resultAry); break; case 'changePwd': //use userName to change his pwd $sqlTmp = "UPDATE company SET pwd='" . md5($post['newPwd']) . "' WHERE user ='******'RemoteViewer']['user']['name'] . "'"; $RemoteAjax->SQLUpdate($sqlTmp); //set pwd $_SESSION['RemoteViewer']['user']['pwd'] = md5($post['newPwd']); $resultAry = array("result" => "success"); print_r(json_encode($resultAry)); unset($sqlTmp); unset($RemoteAjax->resultArray['changePwd']); unset($resultAry); break; case "DoubleCheckPwd": $isSamePwd = false; if (md5($post['pwd']) == $_SESSION['RemoteViewer']['user']['pwd']) { $isSamePwd = true; } $resultAry = array("result" => "success", "isSamePwd" => $isSamePwd); print_r(json_encode($resultAry));
function DoNonQueryComd($szSQLCmd, $szDBAPIName) { $DBConnector = new RemoteModule(); $DBConnector->SQLUpdate($szSQLCmd); unset($DBConnector); }