Beispiel #1
0
                    $check = "";
                    if ($aRow['check'] != 0) {
                        $check .= "checked";
                    }
                    $row[] = '<input type="checkbox" name="check_' . $aRow[$hidden] . '" class="check1" value="' . $aRow[$hidden] . '" ' . $check . '/>';
                }
            }
            $data['aaData'][] = $row;
        }
        break;
    case 'save_group':
        $group_name = $_REQUEST['nam'];
        $group_pages = json_decode(stripslashes($_REQUEST['pag']));
        $group_id = $_REQUEST['group_id'];
        if (empty($group_id)) {
            SaveGroup($group_name, $group_pages);
        } else {
            ClearForUpdate($group_id);
            UpdateGroup($group_id, $group_pages, $group_name);
        }
        break;
    case 'disable':
        $group_id = $_REQUEST['id'];
        DisableGroup($group_id);
        break;
    default:
        $error = 'Action is Null';
}
$data['error'] = $error;
echo json_encode($data);
/* ******************************
Beispiel #2
0
     $group_permission = $_REQUEST['gp'];
     $CheckUser = CheckUser($user);
     if (empty($persons_id)) {
         if ($CheckUser) {
             AddWorker($user_id, $name, $tin, $position, $address, $image, $password, $home_number, $mobile_number, $comment, $user, $userpassword, $group_permission);
         } else {
             $error = "მომხმარებელი ასეთი სახელით  უკვე არსებობს\nაირჩიეთ სხვა მომხმარებლის სახელი";
         }
     } else {
         SaveWorker($persons_id, $user_id, $name, $tin, $position, $address, $image, $password, $home_number, $mobile_number, $comment, $user, $userpassword, $group_permission);
     }
     break;
 case 'save_group':
     $group_name = $_REQUEST['nam'];
     $group_pages = json_decode(stripslashes($_REQUEST['pag']));
     $data = array('inserted_value' => SaveGroup($group_name, $group_pages), 'inserted_name' => $group_name);
     global $log;
     $log->setInsertLog('group');
     break;
 case 'get_add_group_page':
     $page = GetGroupPage();
     $data = array('page' => $page);
     break;
 case 'disable':
     $per_id = $_REQUEST['id'];
     DisableWorker($per_id);
     break;
 case 'delete_image':
     $pers_id = $_REQUEST['id'];
     DeleteImage($pers_id);
     break;