$json_user_list = json_encode($user_list); } // list update if data not null // if ($json_user_list != '') { unset($fields); $check_source_id = 0; $check_source_id = Call_distribution::CheckSourceID($source_id); if ($check_source_id > 0) { $fields["pd_user_id"] = $json_user_list; $user_list_update = qu("call_list_by_source", $fields, " pd_source_id = '{$source_id}'"); } else { $user_list_insert = 0; $fields["pd_source_id"] = $source_id; $fields["pd_user_id"] = $json_user_list; $user_list_insert = qi("call_list_by_source", $fields); } } } endforeach; } } */ //$_SESSION['greetings_msg'] = "Call Distribution Has Been Updated"; echo "1"; die; } $source_list = Call_distribution::getSourceList(); $user_list = Call_distribution::getUserList(); _cg("page_title", "Call Distribution"); $jsInclude = "call_distribution.js.php";
function _success(msg) { try { $("#success_msg_content").html(msg); $("#success_msg_jquery").slideDown("slow"); setTimeout(function(){ $("#success_msg_jquery").slideUp("slow"); },2000) } catch (e) { } } </script> <?php if (_cg('url') == 'operatordashboard') { ?> <script type="text/javascript"> $(document).ready(function() { //LoadAddressHelp(); }) </script> <?php } ?>
$cell = _escape(trim($_REQUEST['cell'])); $group = _escape(trim($_REQUEST['group'])); $affected_row = -1; /*if ($phone || $cell) { $affected_row = qu('pd_users', array("phone" => $phone,"cell" => $cell,"group" => $group), " id = '{$agent_id}' "); }else{ $affected_row=0; }*/ $affected_row = qu('pd_users', array("phone" => $phone, "cell" => $cell, "group" => $group), " id = '{$agent_id}' "); echo $affected_row; die; } if ($_REQUEST['doUpdateAgent']) { $agent_id = _escape($_REQUEST['doUpdateAgent']); $value = _escape($_REQUEST['value']); if ($value) { qu('pd_users', array("phone" => $value), " id = '{$agent_id}' "); } die; } if ($_REQUEST['doUpdateAgentCell']) { $agent_id = _escape($_REQUEST['doUpdateAgentCell']); $value = _escape($_REQUEST['value']); if ($value) { qu('pd_users', array("cell" => $value), " id = '{$agent_id}' "); } die; } $agents = q("select * From pd_users where is_active='1' order by name asc "); _cg("page_title", "Pipedrive Agents List"); $jsInclude = "agents.js.php";
<?php $jsInclude = "call_statistics.js.php"; _cg("page_title", "Call Statistics");
die; } if (isset($_REQUEST['changeGraph']) || isset($_REQUEST['changeDashboard'])) { if ($_REQUEST['source'] == 'ALL') { include _PATH . "instance/front/tpl/pipedrive-dashboard-source-outer.php"; } else { $dashboard_title = "Source - {$_REQUEST['source']}"; $label_arr = array('Submitted', 'Approved', 'Funded', 'Other'); $curr_arr = array(0, 0, 0, 0); $prev_arr = array(0, 0, 0, 0); foreach ($value_data as $each) { if ($_REQUEST['source'] == $each['source']) { $curr_arr = array(); $prev_arr = array(); $label_arr = array('Submitted', 'Approved', 'Funded', 'Other'); $curr_arr[] = $each['curr_submitted_count']; $curr_arr[] = $each['curr_approved_count']; $curr_arr[] = $each['curr_funded_count']; $curr_arr[] = $each['curr_other_count']; $prev_arr[] = $each['prev_submitted_count']; $prev_arr[] = $each['prev_approved_count']; $prev_arr[] = $each['prev_funded_count']; $prev_arr[] = $each['prev_other_count']; } } include _PATH . "instance/front/tpl/pipedrive-dashboard-source-inner.php"; } die; } _cg("page_title", "Source Dashboard");
<?php /** * 404 File * * * @version 1.0 * @package LySoft * */ $no_visible_elements = true; $bc = array(); _cg("page_title", "Page Not Found");
<?php /** * Admin side Login file * * * @version 1.0 * @package lysoft * */ //$jsInclude = "home.js.php"; //_R(lr('dashboard')); _cg("page_title", "Sequence Management");
<li class="<?php print _cg("url") == 'agents' ? 'active' : ''; ?> "><a href="<?php l('agents'); ?> ">Agents List</a></li> <li class="<?php print _cg("url") == 'call_report' ? 'active' : ''; ?> "><a href="<?php l('call_report'); ?> ">Call Reports</a></li> <li class="<?php print _cg("url") == 'twilio_settings' || _cg("url") == 'pipedrive_settings' ? 'active' : ''; ?> " id="report-menu"> <a href="#">Setting <i class="fa fa-cog"> </i></a> <ul class="dropdown-menu" style="width: 100%;"> <li><a href="<?php l('twilio_settings'); ?> "><i class="visible-xs fa fa-chevron-right" style="width: 10px; float: left; margin-top: 4px;"></i>Twilio Settings</a></li> <li><a href="<?php l('pipedrive_settings'); ?> "><i class="visible-xs fa fa-chevron-right" style="width: 10px; float: left; margin-top: 4px;"></i>PipeDrive Settings</a></li> <li><a href="<?php l('sms_service'); ?>
<?php /** * Admin side Login file * * * @version 1.0 * @package lysoft * */ //$jsInclude = "home.js.php"; //_R(lr('dashboard')); $urlArgs = _cg("url_vars"); if (isset($_REQUEST['txt_sms'])) { unset($fields); $fields['sms'] = $_REQUEST['txt_sms']; $fields['activity'] = $_REQUEST['ddl_type']; $fields['agent'] = $_REQUEST['ddl_agent']; qi("messages", _escapeArray($fields)); $_SESSION['greetings_msg'] = 'Record Added successfully!'; } $message_list = q("SELECT * FROM `messages`"); _cg("page_title", "SMS Text");
<?php //d($_REQUEST); $urlArgs = _cg("url_vars"); $agent = qs("select pd_id,name from pd_users where phone = '{$urlArgs[0]}' "); $agent_id = $agent['pd_id']; $agent_name = $agent['name']; $recording_url = isset($_REQUEST['RecordingUrl']) ? $_REQUEST['RecordingUrl'] : ''; $recording_duration = isset($_REQUEST['RecordingDuration']) ? $_REQUEST['RecordingDuration'] : '0'; //qi('config',array("key"=>$agent_id,"value"=>$urlArgs[1])); $apiPD = new apiPipeDrive(); //$apiPD->assignDeal($urlArgs[1], $agent_id); $call_detail_data = q("select * from call_detail where sid='{$_REQUEST['CallSid']}'"); $call_detail_fields['agent_phone'] = $urlArgs[0]; $call_detail_fields['agent_id'] = $agent_id; $call_detail_fields['agent_name'] = $agent_name; $call_detail_fields['status'] = isset($_REQUEST['DialCallStatus']) ? $_REQUEST['DialCallStatus'] : ''; $call_detail_fields['recording_duration'] = $recording_duration; $call_detail_fields['recording_url'] = $recording_url; $call_detail_fields['customer_phone'] = urlencode($urlArgs[2]); $call_detail_fields['deal_id'] = $urlArgs[1]; if (count($call_detail_data) > 0) { $call_detail_id = $call_detail_data[0]['id']; qu('call_detail', $call_detail_fields, "id='{$call_detail_data[0]['id']}'"); } else { $call_detail_fields['sid'] = $_REQUEST['CallSid']; $call_detail_id = qi('call_detail', $call_detail_fields); } $deal_data = json_decode($apiPD->getDealInfo($urlArgs[1])); //$deal_data = json_decode($apiPD->getDealInfo('4586')); //$deal_data = json_decode($apiPD->getDealInfo('4586'));
function _level_auth_url($pages, $return_page) { if (!in_array(_cg("url"), $pages)) { _cg("url", $return_page); } }
$fields['deal_id'] = $_REQUEST['dealId']; $fields['agent_phone'] = removeCellFormat($_REQUEST['agent_phone']); $fields['agent_name'] = $_REQUEST['agent_name']; $fields['customer_phone'] = removeCellFormat($_REQUEST['customer_phone']); $click_to_call_id = qi("click_to_call", $fields); $callWebhook = new callWebhook(); $sid = $callWebhook->click_to_call($click_to_call_id); $data = array("id" => $click_to_call_id, "sid" => $sid); json_die(true, $data); } $dealId = $_REQUEST['dealId']; $phone_count = $_REQUEST['phone_count']; $contact_list = array(); $is_cust_number = 0; for ($index = 1; $index <= $phone_count; $index++) { $is_cust_number = 1; $contact_list[] = removeCellFormat($_REQUEST['phone_' . $index]); } $conversation_list = q("select * from text_conversation where deal_id='{$dealId}' order by messageTime asc"); $agent_name = $_REQUEST['agent_name']; $agent = qs("select * from pd_users where name='{$agent_name}'"); if (empty($agent) || $agent['phone'] == '' && $agent['cell'] == '') { $is_agent_number = 0; } else { $is_agent_number = 1; $agent_no = $agent['phone'] == '' ? $agent['cell'] : $agent['phone']; $agent_no = formatCellDash($agent_no); } $no_visible_elements = TRUE; _cg("page_title", "Conversation"); $jsInclude = "click_to_call.js.php";
*/ define("_PATH", str_replace("loader.php", "", __FILE__)); function __autoload($class_name) { include_once _PATH . 'lib/' . $class_name . '.class.php'; } include "lib/utils.php"; # includes general function //include "lib/utils_checklist.php"; _getInstance($_REQUEST['q']); $instance = _cg("instance"); $host = $_SERVER['HTTP_HOST']; $http_protocol = $_SERVER['HTTPS'] == "on" ? "https://" : "http://"; define('_UPlain', $http_protocol . $host . substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/') + 1)); if (_cg("url_instance") != '') { define('_U', $http_protocol . $host . substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/') + 1) . _cg("url_instance") . "/"); } else { define('_U', $http_protocol . $host . substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/') + 1)); } define("_MEDIA_URL", _UPlain . "instance/{$instance}/media/"); $db = Db::__d(); include _PATH . "instance/{$instance}/config.inc.php"; $url = _cg("url"); // set from _getInstance function define(_URL, $url); define("ACCOUNT_SID", "AC0ed3b59448346c77c722e15188fecf31"); define("AUTH_TOKEN", "aedd61ecc2b3c9c858aac794197727b7"); define("TWILIO_PHONE_NUMBER", "+15162102005"); $modulePage = $url . ".php"; @(include _PATH . "instance/{$instance}/controller/{$url}.inc.php"); include _PATH . "instance/{$instance}/tpl/index.tpl.php";
<div class="pageheading"> <h1><?php print _cg("page_title"); ?> </h1> <div class="user-info hidden-xs" style="float:right;;margin-right:20px" id="breadcrumbRight"></div> </div> <div style="height:10px"></div>
<?php /** * Admin side Login file * * * @version 1.0 * @package lysoft * */ //$jsInclude = "home.js.php"; //_R(lr('dashboard')); $urlArgs = _cg("url_vars"); if (isset($_REQUEST['hid_sid_id']) && isset($_REQUEST['hid_token_id'])) { qu("config", array("value" => $_REQUEST['txt_account_sid']), "id='{$_REQUEST['hid_sid_id']}'"); qu("config", array("value" => $_REQUEST['txt_auth_token']), "id='{$_REQUEST['hid_token_id']}'"); $_SESSION['greetings_msg'] = 'Keys Updated successfully!'; } $TWILIO_ACCOUNT_SID = qs("SELECT * FROM `config` WHERE `key` LIKE 'TWILIO_ACCOUNT_SID'"); $TWILIO_AUTH_TOKEN = qs("SELECT * FROM `config` WHERE `key` LIKE 'TWILIO_AUTH_TOKEN'"); _cg("page_title", "Twilio Settings");
* Admin side Login file * * * @version 1.0 * @package LySoft * */ $login_error = ''; if ($_REQUEST['submit']) { if ($_REQUEST['email'] || $_REQUEST['email'] != '') { $user_name = _escape($_REQUEST['email']); $password = _escape($_REQUEST['password']); if (User::doLogin($user_name, $password)) { User::setSession($user_name); } else { //$error = "Invalid Login"; $login_error = 1; } } else { //$error = "Invalid Login"; $login_error = 1; } } if (isset($_SESSION['user'])) { _R(lr('pipedrive-dashboard-source')); } //$login_action_url = lr('login'); $no_visible_elements = true; $jsInclude = "login_new.js.php"; _cg("page_title", "Login");
$timeline['first_time'] = $time; if ($deal_data['org_name'] != '') { $timeline['first_data'] .= '<br>Org: ' . $deal_data['org_name']; } if ($deal_data['customer_name'] != '') { $timeline['first_data'] .= '<br>Customer: ' . $deal_data['customer_name'] . (" (" . $deal_data['customer_phone'] . ")"); } $timeline_call = q("select * from agent_call_dialed where deal_id='{$dealId}' order by id asc"); $call_count = 1; foreach ($timeline_call as $each_timeline_call) { $time = date("h:i a", strtotime($each_timeline_call['created_at'])); $agent_numbers = explode(",", $each_timeline_call['agent_numbers']); $agent_numbers = implode(", ", $agent_numbers); $timeline[$date][$time] = $call_try[$call_count] . " Call Dialed to " . $agent_numbers; if ($each_timeline_call['is_received'] == '1') { $timeline[$date][$time] .= "<br>Call Recieved By: " . $deal_data['agent_name'] . (" (" . $each_timeline_call['received_agent'] . ")"); } $call_count++; } include _PATH . 'instance/front/tpl/time_line_data.php'; die; } include _PATH . 'instance/front/controller/updateDeal.inc.php'; //Update Deal which is not handled by any agents $call_list = q("SELECT * FROM `call_detail` cd WHERE 1=1 {$where} order by cd.deal_id desc limit {$start_limit},{$page_size}"); if (!isset($_SESSION['pipedrive_source'])) { $_SESSION['pipedrive_source'] = User::getSources(); } $jsInclude = "call_report.js.php"; _cg("page_title", "Call Report");
<?php /** * Admin side Login file * * * @version 1.0 * @package lysoft * */ $jsInclude = "home.js.php"; //_R(lr('dashboard')); _cg("page_title", "Home");
<?php /** * Admin side Login file * * * @version 1.0 * @package lysoft * */ //$jsInclude = "home.js.php"; //_R(lr('dashboard')); $urlArgs = _cg("url_vars"); if (isset($_REQUEST['hid_is_edit'])) { qu("config", array("value" => $_REQUEST['txt_api_key']), "id='{$_REQUEST['hid_is_edit']}'"); $_SESSION['greetings_msg'] = 'Api Key Updated successfully!'; } $pipedriver_api_key = qs("SELECT * FROM `config` WHERE `key` LIKE 'PIPEDRIVER_API_KEY'"); _cg("page_title", "PipeDrive Settings");