예제 #1
0
<?php

require_once dirname(__FILE__) . "/libs/JSON.php";
$json = new Services_JSON();
$module_name = 'agent_console';
header("Content-type: application/json");
/* get booker list */
if (isset($_REQUEST['booker_list'])) {
    $module_name = 'customer';
    $arrConf['cadena_dsn'] = "mysql://*****:*****@localhost/call_center";
    include_once "/var/www/html/modules/{$module_name}/libs/paloSantoAdressBook.class.php";
    include_once "/var/www/html/libs/paloSantoDB.class.php";
    $pDB = new paloDB($arrConf['cadena_dsn']);
    // address_book
    $padress_book = new paloAdressBook($pDB);
    $arrBooker = $padress_book->getAgentList();
    echo $json->encode($arrBooker);
    return;
}
/* end of get booker list */
/* get delivery man */
if (isset($_REQUEST['delivery_man_list'])) {
    $module_name = 'ticket_delivery';
    $arrConf['cadena_dsn'] = "mysql://*****:*****@localhost/call_center";
    include_once "/var/www/html/modules/{$module_name}/libs/Ticket_Delivery.class.php";
    include_once "/var/www/html/libs/paloSantoDB.class.php";
    $pDB = new paloDB($arrConf['cadena_dsn']);
    // address_book
    $pTicket_Delivery = new Ticket_Delivery($pDB);
    $delivery_man_list = $pTicket_Delivery->getDeliveryMan();
    echo $json->encode($delivery_man_list);