Ejemplo n.º 1
0
 <?php 
require_once "db_manage.php";
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$tel = $_POST['tel'];
$email = $_POST['email'];
$address = $_POST['address'];
$city = $_POST['city'];
$zip = $_POST['zip'];
AddClient($firstname, $lastname, $tel, $email, $address, $zip, $city);
Ejemplo n.º 2
0
             $row = array();
             for ($i = 0; $i < $count; $i++) {
                 /* General output */
                 $row[] = $aRow[$i];
             }
             $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;