예제 #1
0
             AddTask($incomming_call_id[0], $task_type_id, $task_department_id, $c_date, $done_start_time, $done_end_time, $comment, $persons_id, $priority_id);
         }
     } else {
         $inc_task_ch = mysql_fetch_assoc(mysql_query("SELECT id FROM task WHERE incomming_call_id = '{$id_p}'"));
         if ($inc_task_ch['id'] == '' and $task_type_id > 0) {
             AddTask($id_p, $task_type_id, $task_department_id, $c_date, $done_start_time, $done_end_time, $comment, $persons_id, $priority_id);
         } else {
             $user = $_SESSION['USERID'];
             $r_user = realuser($persons_id);
             mysql_query("UPDATE `task` SET  `user_id`='{$user}',\n                                    `responsible_user_id`='{$r_user}',\n                                    `start_date`='{$done_start_time}',\n                                    `end_date`='{$done_end_time}',\n                                    `department_id`='{$task_department_id}',\n                                    `task_type_id`='{$task_type_id}',\n                                    `priority_id`='{$priority_id}',\n                                    `comment`='{$comment}'\n                              WHERE `incomming_call_id`='{$id_p}'");
         }
         Saveincomming($id_h, $phone, $person_name, $type_id, $call_type_id, $product_type_id, $card_id, $department_id, $information_category_id, $information_sub_category_id, $production_category_id, $genre_id, $production_id, $content, $sum_pirce, $shipping_id, $module_id, $call_comment, $call_status_id, $task_department_id, $source_id, $c_date, $persons_id, $priority_id, $done_start_time, $done_end_time, $comment, $task_type_id, $status_2, $status_1);
     }
     break;
 case 'get_calls':
     $data = array('calls' => getCalls());
     break;
 case 'category_change':
     $information_category_id_check = $_REQUEST['information_category_id_check'];
     $data = array('cat' => Getinformation_sub_category('', $information_category_id_check));
     break;
 case 'set_task_type':
     $cat_id = $_REQUEST['cat_id'];
     $data = array('cat' => Getbank_object($cat_id));
     break;
 case 'delete_file':
     mysql_query("DELETE FROM file WHERE id = {$delete_id}");
     $increm = mysql_query("\tSELECT  `name`,\n\t\t\t\t\t`rand_name`,\n\t\t\t\t\t`id`\n\t\t\t\t\tFROM \t`file`\n\t\t\t\t\tWHERE   `incomming_call_id` = {$edit_id}\n\t\t\t\t\t");
     $data1 = '';
     while ($increm_row = mysql_fetch_assoc($increm)) {
         $data1 .= '<tr style="border-bottom: 1px solid #85b1de;">
<?php

session_start();
require_once 'Adapter.class.php';
require_once 'functions.inc.php';
$go = $_POST['go'];
switch ($go) {
    case 'login':
        print loginUser($_POST['un'], $_POST['p']);
        break;
    case 'logout':
        print logOutUser();
        break;
    case 'getcustomers':
        print getCustomers($_POST);
        break;
    case 'addcall':
        print addCall($_POST);
        break;
    case 'getcalls':
        print getCalls();
        break;
    case 'addcustomer':
        print addcustomer($_POST);
        break;
}
예제 #3
0
//ACTIONS
switch ($_REQUEST['action']) {
    case "memoSave":
        if ($_REQUEST['call_record']) {
            memoSave($_REQUEST['call_record'], $_REQUEST['sugar_user_id'], $_REQUEST['phone_number'], $_REQUEST['description'], $_REQUEST['direction']);
        }
        break;
    case "updateUIState":
        updateUIState($_REQUEST['ui_state'], $_REQUEST['call_record'], $_REQUEST['id']);
        break;
    case "setBeanID":
        setBeanID($_REQUEST['call_record'], $_REQUEST['bean_module'], $_REQUEST['bean_id']);
        break;
    case "call":
        callCreate();
        break;
    case "transfer":
        transferCall($_REQUEST["extension"], $_REQUEST['call_record']);
        break;
    case "block":
        blockNumber($_REQUEST['number'], $_REQUEST['description']);
        break;
    case "get_calls":
        getCalls($mod_strings, $GLOBALS['current_user']);
        break;
    default:
        echo "undefined action";
        break;
}
sugar_cleanup();
// Formerly was in getCalls()
예제 #4
0
파일: index.php 프로젝트: ekutor/hermes
// WEBSERVICES DE LA TABLA CALLS
//--------------------------------------------------------------------------------------------------
$app->get('/getCalls', function () {
    //Importa el archivo que contiene el método
    require_once 'Servicios/getCalls.php';
    $app = new \Slim\Slim();
    require_once 'Servicios/Auth.php';
    $deviceId = $app->request->headers->get('deviceID');
    $hash = $app->request->headers->get('hash');
    $respuesta = auth($deviceId, $hash);
    if ($respuesta != "Auth_OK") {
        echo $respuesta;
        return;
    }
    //LLama el método que lee de la base de datos y obtiene la respuesta
    $respuesta = getCalls();
    //Muestra la respuesta al cliente
    echo $respuesta;
});
//--------------------------------------------------------------------------------------------------
$app->get('/getCall', function () {
    //Importa el archivo que contiene el método
    require_once 'Servicios/getCall.php';
    $app = new \Slim\Slim();
    //Obtiene los parametros del header http
    $idCall = $app->request->headers->get('idCall');
    //LLama el método que lee de la base de datos y obtiene la respuesta
    $respuesta = getCall($idCall);
    //Muestra la respuesta al cliente
    echo $respuesta;
});