Exemple #1
0
                                    $row[$i] = '<div style="background-color: red; width: 100%; height: 100%;"></div>';
                                    break;
                            }
                        }
                    }
                }
                $data['aaData'][] = $row;
            }
            $_log->logInfo('get_list');
        }
        break;
    case 'save_client':
        $client_id = $_REQUEST['cid'];
        $client_comment = $_REQUEST['ccom'];
        $date = $_REQUEST['date'];
        SaveClient($client_id, $client_comment, $date);
        break;
    case 'get_client_id':
        $client_name = $_REQUEST['cn'];
        $client_id = GetClientID($client_name);
        $data = array('client_id' => $client_id);
        break;
    case 'get_client_persons_info':
        $person_id = $_REQUEST['person_id'];
        $client_info = GetClientInfo($person_id);
        $data = array('client_info' => $client_info);
        break;
    default:
        $error = 'Action is Null';
}
$data['error'] = $error;
Exemple #2
0
             $data['aaData'][] = $row;
         }
         $_log->logInfo('get_list');
     }
     break;
 case 'save_client':
     $client_id = $_REQUEST['id'];
     $arr = array("rs_id" => $_REQUEST['ri'], "name" => htmlspecialchars($_REQUEST['n'], ENT_QUOTES), "address" => htmlspecialchars($_REQUEST['a'], ENT_QUOTES), "legal_status" => $_REQUEST['ls'], "pay_method" => $_REQUEST['pm'], "vat_payer" => $_REQUEST['vp'], "contact_person" => htmlspecialchars($_REQUEST['cp'], ENT_QUOTES), "phone_number" => htmlspecialchars($_REQUEST['pn'], ENT_QUOTES), "mail" => htmlspecialchars($_REQUEST['m'], ENT_QUOTES), "comment" => htmlspecialchars($_REQUEST['c'], ENT_QUOTES), 'image' => $_REQUEST['img']);
     if ($client_id == '') {
         if (!CheckClientExist($arr['rs_id'])) {
             AddClient($user_id, $arr);
         } else {
             $error = '"' . $arr['name'] . '" უკვე არის სიაში!';
         }
     } else {
         SaveClient($client_id, $user_id, $arr);
     }
     break;
 case 'disable':
     $client_id = $_REQUEST['id'];
     DisableClient($client_id);
     break;
 case 'delete_image':
     $client_id = $_REQUEST['id'];
     DeleteImage($client_id);
     break;
 case 'get_local_id':
     $local_id = GetLocalID();
     $data = array('local_id' => $local_id);
     break;
 case 'clear_db':