Esempio n. 1
0
         } 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;
 case 'clear':
     $file_list = $_REQUEST['file'];
     ClearProduct();
     if (!empty($file_list)) {
         $file_list = ClearFiles(json_decode($file_list));
Esempio n. 2
0
 *	Workers aJax actions
 * ******************************
 */
include '../../includes/classes/core.php';
$action = $_REQUEST['act'];
$user_id = $_SESSION['USERID'];
$error = '';
$data = '';
switch ($action) {
    case 'get_add_page':
        $page = GetGroupPage();
        $data = array('page' => $page);
        break;
    case 'get_edit_page':
        $group_id = $_REQUEST['id'];
        $page = GetGroupPage($group_id);
        $data = array('page' => $page);
        break;
    case 'get_list':
        $count = $_REQUEST['count'];
        $hidden = $_REQUEST['hidden'];
        $rResult = mysql_query("SELECT `id`, `name`\r\n\t\t\t\t\t\t\t\t  FROM `group`");
        $data = array("aaData" => array());
        while ($aRow = mysql_fetch_array($rResult)) {
            $row = array();
            for ($i = 0; $i < $count; $i++) {
                /* General output */
                $row[] = $aRow[$i];
                if ($i == $count - 1) {
                    $row[] = '<input type="checkbox" name="check_' . $aRow[$hidden] . '" class="check" value="' . $aRow[$hidden] . '" />';
                }
Esempio n. 3
0
 case 'get_product_dialog':
     $page = GetProductDialog();
     $data = array('page' => $page);
     break;
 case 'save_product':
     $page = SaveProduct();
     $data = array('page' => $page);
     break;
 case 'get_product_search':
     $title = $_REQUEST['title'];
     $page = GetProductDialog(GetProductSearch($title));
     $data = array('page' => $page);
     break;
 case 'get_edit_page':
     $group_id = $_REQUEST['id'];
     $page = GetGroupPage(GetPage($group_id));
     $data = array('page' => $page);
     break;
 case 'save_notes':
     $minishneba = $_REQUEST['minishneba'];
     $qvota = $_REQUEST['qvota'];
     $hidden_id = $_REQUEST['hidden_id'];
     $group_name = $_REQUEST['group_name'];
     $scenar_id = $_REQUEST['scenar_id'];
     $product_id = $_REQUEST['product_id'];
     $shab_id = $_REQUEST['shab_id'];
     if ($shab_id != '') {
         if ($hidden_id == 3 or $hidden_id == 4) {
             mysql_query("UPDATE   `shabloni` SET\r\n            \t\t              `notes`='{$minishneba}'\r\n            \t\t     WHERE    `quest_id`='{$hidden_id}' AND `name`= '{$group_name}'");
         } else {
             mysql_query("UPDATE   `shabloni` SET\r\n            \t\t                  `notes`='{$minishneba}'\r\n            \t\t        WHERE     `id`='{$shab_id}'");