예제 #1
0
function perform($jsonObject)
{
    $action = $jsonObject->action;
    switch ($action) {
        case "load":
            return loadCompany($jsonObject);
        case "save":
            return saveName($jsonObject);
        case "cut":
            return cut($jsonObject);
    }
}
예제 #2
0
function perform($jsonObject)
{
    $action = $jsonObject->action;
    switch ($action) {
        case "load":
            return loadDepartment($jsonObject);
        case "save":
            return saveName($jsonObject);
        case "cut":
            return cut($jsonObject);
        case "selectDepartment":
            return getDepartmentId($jsonObject);
        case "selectEmployee":
            return getEmployeeId($jsonObject);
    }
}
예제 #3
0
function perform($jsonObject)
{
    $action = $jsonObject->action;
    switch ($action) {
        case "load":
            return loadCompany($jsonObject);
        case "save":
            return saveName($jsonObject);
        case "cut":
            return cut($jsonObject);
        case "reset":
            return resetCompany($jsonObject);
        case "selectDepartment":
            return getDepartmentId($jsonObject);
    }
}
예제 #4
0
function perform($jsonObject)
{
    $action = $jsonObject->action;
    switch ($action) {
        case "load":
            return loadDepartment($jsonObject->id);
        case "blank":
            return loadBlank();
        case "save":
            return saveName($jsonObject);
        case "create":
            return create($jsonObject);
        case "cut":
            return cut($jsonObject);
        case "delete":
            return delete($jsonObject);
    }
}
 /**
  * 执行审核通过
  * @param int $id
  */
 function execAction()
 {
     $id = $_REQUEST['id'];
     if (empty($id)) {
         return '';
     }
     $arr = C('AUTH_DB_CONFIG');
     $db = M('Auth');
     $data = $db->where("id ={$id}")->find();
     if ($data['status'] == 0) {
         $check_data = json_decode($data['check_data'], true);
         $db_no = $data['db_no'];
         $action = $data['check_action'];
         //商家操作 只能支持save 有触发器 关联聊天
         if ($db_no == 0) {
             if ($action != 'save') {
                 die('错误操作');
             }
         }
         $where = array('id' => $data['mark_id']);
         $exec_db = M($arr[$db_no]);
         switch ($action) {
             case 'save':
                 $exec = $exec_db->where($where)->save($check_data);
                 break;
             case 'add':
                 //未启用
                 $exec = $exec_db->add($check_data);
                 break;
             case 'del':
                 $exec = $exec_db->where($where)->delete();
                 break;
             default:
                 die('错误数据:action');
                 break;
         }
         if ($exec === false) {
             echo $exec_db->getLastSql();
             echo 'error';
         } else {
             if ($db_no == 0) {
                 if (!empty($check_data["merchant_name"])) {
                     saveName($data['mark_id'], 2, $check_data["merchant_name"]);
                 }
                 if (!empty($check_data["header"])) {
                     saveHeader($data['mark_id'], 2, $check_data["header"]);
                 }
             }
             $db->where("id ={$id}")->save(array('status' => 1));
             //审核通过
             $this->ajaxReturn(array('code' => 0, 'msg' => '审核成功'));
         }
     } else {
         $this->ajaxReturn(array('code' => 1, 'msg' => '已操作过,无需审核'));
     }
 }
예제 #6
0
파일: index.php 프로젝트: jkinner/ringside
 }
 if (!validatePassword($password)) {
     loadErrorClass($flavor, 'Password must be specified');
     return;
 }
 $uid = null;
 try {
     $dbCon = RingsideApiDbDatabase::getDatabaseConnection();
     //$client->api_client->admin_createUser($email, $password);
     $user = new Api_Dao_User();
     $user->setUsername($email);
     $user->setPassword(sha1($password));
     if (!$user->initByUserName($email, $dbCon)) {
         try {
             $user->insertIntoDb($dbCon);
             saveName($user->getId(), $name);
             $uid = $user->getId();
             error_log("REGISTERED NEW ONE " . $user->getId());
         } catch (Exception $e) {
             $error = 'Failed to create user: '******'User already exists!';
     }
 } catch (Exception $e) {
     $error = 'Registration Error: ' . $e->getMessage();
 }
 if (!isset($error) || empty($error) || strlen($error) == 0) {
     if ($login === true) {
         echo "<rs:authorize uid='{$uid}' />";
     }