Beispiel #1
0
<?php

include_once "../lib/common.php";
$cn = connectDB();
$arrayInput = array();
$query = "select host_name,server1,server2 from tbl_dns_servers";
$result = Sql_exec($cn, $query);
if (!$result) {
    echo "err+" . $query . " in line " . __LINE__ . " of file" . __FILE__;
    exit;
}
$data = array();
$i = 0;
while ($row = Sql_fetch_array($result)) {
    $j = 0;
    $data[$i][$j++] = Sql_Result($row, "host_name");
    $data[$i][$j++] = Sql_Result($row, "server1");
    $data[$i][$j++] = Sql_Result($row, "server2");
    $i++;
}
Sql_Free_Result($result);
ClosedDBConnection($cn);
echo json_encode($data);
<?php

//session_start();
header('Access-Control-Allow-Origin: *');
require_once "../lib/common.php";
//require_once "../Lib/filewriter.php";
//print_r($info);
//print_r($_SESSION);
//exit;
//
$cid = $_POST["info"];
//echo $cid;
$cn = connectDB();
//$qry = "select * from `bwc_ruleinfo`";
$qry = "select * from `bwc_ruleinfo` where `clientId`='{$cid}'";
$rs = Sql_exec($cn, $qry);
$data = array();
$i = 0;
while ($row = Sql_fetch_array($rs)) {
    $j = 0;
    $data[$i][$j++] = Sql_Result($row, "ruleId");
    $data[$i][$j++] = Sql_Result($row, "src");
    $data[$i][$j++] = Sql_Result($row, "dst");
    $data[$i][$j++] = Sql_Result($row, "port");
    $data[$i][$j++] = Sql_Result($row, "mac");
    $data[$i][$j++] = Sql_Result($row, "percentage");
    $i++;
}
echo json_encode($data);
ClosedDBConnection($cn);
Beispiel #3
0
$dt = Sql_fetch_array($res);
$dbtype = $dt['db_type'];
$Server = $dt['db_server'];
$UserID = $dt['db_uid'];
$Password = $dt['db_password'];
$Database = $dt['db_name'];
ClosedDBConnection($cn);
$remoteCn = connectDB();
$qry = "SELECT `msgID`,`msg`,`srcMN`, `dstMN`, `writeTime`, `msgStatus` FROM `smsoutbox`";
$rs = Sql_exec($remoteCn, $qry);
$data = array();
$i = 0;
while ($row = Sql_fetch_array($rs)) {
    $status = Sql_Result($row, "msgStatus");
    $j = 0;
    $data[$i][$j++] = Sql_Result($row, "msgID");
    $data[$i][$j++] = Sql_Result($row, "msg");
    $data[$i][$j++] = Sql_Result($row, "srcMN");
    $data[$i][$j++] = Sql_Result($row, "dstMN");
    $data[$i][$j++] = Sql_Result($row, "writeTime");
    $data[$i][$j++] = $status;
    if ($status == "FAILED") {
        $data[$i][$j++] = '<button style="background-color: blue; margin: 2px;" onclick="Resend(this,' . "'" . Sql_Result($row, "msgID") . "'" . '); return false;" class="btn btn-primary" type="button"> <i class="fa fa-pencil-square-o"></i> Resend
		</button>';
    } else {
        $data[$i][$j++] = '';
    }
    $i++;
}
echo json_encode($data);
ClosedDBConnection($remoteCn);
Beispiel #4
0
 * Date: 4/27/2015
 * Time: 1:31 PM
 */
include_once "../lib/common.php";
$cn = connectDB();
$arrayInput = array();
$query = "SELECT * FROM tbl_nat_static";
$result = Sql_exec($cn, $query);
if (!$result) {
    echo "err+" . $query . " in line " . __LINE__ . " of file" . __FILE__;
    exit;
}
$data = array();
$i = 0;
while ($row = Sql_fetch_array($result)) {
    $j = 0;
    $data[$i][$j++] = Sql_Result($row, "name");
    $data[$i][$j++] = Sql_Result($row, "direction");
    $data[$i][$j++] = Sql_Result($row, "interface");
    $data[$i][$j++] = Sql_Result($row, "destination_ip");
    $data[$i][$j++] = Sql_Result($row, "destination_port");
    $data[$i][$j++] = Sql_Result($row, "forward_ip");
    $data[$i][$j++] = Sql_Result($row, "forward_port");
    $data[$i][$j++] = '<button style="background-color: blue; margin: 2px;" onclick="edit_input_form_nat_static(this,' . "'" . Sql_Result($row, "id") . "'" . '); return false;" class="btn btn-primary" type="button"> <i class="fa fa-pencil-square-o"></i> Edit
</button>' . '<button style="background-color: #FF0000;margin: 2px;   " onclick="delete_nat_static(this,' . "'" . Sql_Result($row, "id") . "'" . '); return false;" class="btn btn-primary" type="button"> <i class="fa fa-times"></i> Delete
</button>';
    $i++;
}
Sql_Free_Result($result);
ClosedDBConnection($cn);
echo json_encode($data);
Beispiel #5
0
<?php

include_once "../lib/common.php";
$cn = connectDB();
$query = "SELECT DISTINCT `table_name`,`page_name`\n\t\t  FROM `tbl_audit_trail` \n\t\t  ORDER BY `table_name` ASC";
$result = Sql_exec($cn, $query);
if (!$result) {
    echo "err+" . $query . " in line " . __LINE__ . " of file" . __FILE__;
    exit;
}
$options = '<option value="">--Select--</option>';
while ($row = Sql_fetch_array($result)) {
    $tbl_name = Sql_Result($row, "table_name");
    $tbl_name = Sql_Result($row, "page_name");
    $options .= '<option value="' . $tbl_name . '">' . $tbl_name . '</option>';
}
Sql_Free_Result($result);
ClosedDBConnection($cn);
echo $options;
$extraBtn = false;
//echo $count_qry;$load_qry;
$res = Sql_exec($remoteCn, $load_qry);
$i = 0;
$data = array();
while ($row = Sql_fetch_array($res)) {
    $j = 0;
    $data[$i] = array();
    $data[$i][$j++] = Sql_Result($row, "log_server_time");
    $data[$i][$j++] = Sql_Result($row, "source");
    $data[$i][$j++] = Sql_Result($row, "type");
    $data[$i][$j++] = Sql_Result($row, "source_timestamp");
    $data[$i][$j++] = Sql_Result($row, "from_user");
    $data[$i][$j++] = Sql_Result($row, "to_user");
    $data[$i][$j++] = Sql_Result($row, "call_id");
    $data[$i][$j++] = Sql_Result($row, "caller_callee");
    $data[$i][$j++] = Sql_Result($row, "source_ip");
    $data[$i][$j++] = Sql_Result($row, "source_port");
    $data[$i][$j++] = Sql_Result($row, "function_name");
    $data[$i][$j++] = Sql_Result($row, "audio_ip");
    $data[$i][$j++] = Sql_Result($row, "audio_port");
    $data[$i][$j++] = Sql_Result($row, "video_ip");
    $data[$i][$j++] = Sql_Result($row, "video_port");
    $data[$i][$j++] = Sql_Result($row, "function_point");
    $data[$i][$j++] = Sql_Result($row, "comment");
    $data[$i][$j++] = Sql_Result($row, "sip");
    $i++;
}
Sql_Free_Result($res);
echo json_encode($data);
ClosedDBConnection($remoteCn);
Beispiel #7
0
        $show_response .= '<div class=" col-md-4" style="background-color:lightgreen ; overflow:auto; border-radius:5px;" >';
        $show_response .= Sql_Result($row, "new_value");
        $show_response .= '</div>';
    } elseif (trim($action_command) == "delete") {
        $show_response .= '<div class=" col-md-4" style="background-color:salmon ; overflow:auto; border-radius:5px;" >';
        $show_response .= Sql_Result($row, "old_value");
        $show_response .= '</div>';
        $show_response .= '<div class=" col-md-1">';
        $show_response .= '</div>';
        $show_response .= '<div class=" col-md-4">';
        $show_response .= '<img src="rcportal/img/empty.jpg">';
        // img -> for old value
        $show_response .= '</div>';
    } else {
        $show_response .= '<div class=" col-md-4" style="background-color:salmon;  overflow:auto; border-radius:5px;" >';
        $show_response .= Sql_Result($row, "old_value");
        $show_response .= '</div>';
        $show_response .= '<div class=" col-md-1">';
        $show_response .= '</div>';
        $show_response .= '<div class=" col-md-4">';
        $show_response .= '<img src="rcportal/img/empty.jpg">';
        // img -> for old value
        $show_response .= '</div>';
    }
    $show_response .= '</div>';
    $show_response .= '</div>';
}
Sql_Free_Result($result);
$data['response'] = $show_response;
ClosedDBConnection($cn);
echo json_encode($data);
     while ($row = Sql_fetch_array($result)) {
         fwrite($file, trim(Sql_Result($row, "e_userId")) . " ");
         fwrite($file, trim(Sql_Result($row, "e_password")) . " ");
         fwrite($file, trim(Sql_Result($row, "e_userType")) . " ");
         fwrite($file, trim(Sql_Result($row, "e_hwNo")) . " ");
         fwrite($file, trim(Sql_Result($row, "e_allowedIp")) . " ");
         fwrite($file, trim(Sql_Result($row, "e_allowedPort")) . " ");
         fwrite($file, trim(Sql_Result($row, "e_fwdib")) . " ");
         fwrite($file, trim(Sql_Result($row, "e_fwdiu")) . " ");
         fwrite($file, trim(Sql_Result($row, "e_fwdina")) . " ");
         fwrite($file, trim(Sql_Result($row, "e_rbtno")) . " ");
         fwrite($file, trim(Sql_Result($row, "e_mcaNo")) . " ");
         fwrite($file, trim(Sql_Result($row, "e_status")) . " ");
         fwrite($file, trim(Sql_Result($row, "e_aaaIp")) . " ");
         fwrite($file, trim(Sql_Result($row, "e_aaaPort")) . " ");
         fwrite($file, trim(Sql_Result($row, "e_noOAS")) . "\n");
         $is_error = 1;
     }
 } else {
     if ($lines_count <= 1000) {
         $file = fopen($file_name, "a");
         fwrite($file, trim($arrayInput['basic_user_id']) . " ");
         fwrite($file, trim($arrayInput['basic_pass']) . " ");
         fwrite($file, trim($arrayInput['basic_user_type']) . " ");
         fwrite($file, trim($arrayInput['advance_hw']) . " ");
         fwrite($file, trim($arrayInput['advance_ip']) . " ");
         fwrite($file, trim($arrayInput['advance_port']) . " ");
         fwrite($file, trim($arrayInput['advance_busy']) . " ");
         fwrite($file, trim($arrayInput['advance_unreachable']) . " ");
         fwrite($file, trim($arrayInput['advance_no_ans']) . " ");
         fwrite($file, trim($arrayInput['advance_rbt_no']) . " ");
    $i = 0;
    while ($row = Sql_fetch_array($result)) {
        $j = 0;
        $data[$i][$j++] = Sql_Result($row, "id");
        $data[$i][$j++] = Sql_Result($row, "name");
        $data[$i][$j++] = Sql_Result($row, "service_id");
        $data[$i][$j++] = Sql_Result($row, "display_no");
        $data[$i][$j++] = Sql_Result($row, "original_no");
        $data[$i][$j++] = Sql_Result($row, "schedule_date");
        $data[$i][$j++] = Sql_Result($row, "prompt_location");
        $data[$i][$j++] = Sql_Result($row, "distribution_list");
        if (Sql_Result($row, "status") == 0) {
            $data[$i][$j++] = "Open";
        } elseif (Sql_Result($row, "status") == 1) {
            $data[$i][$j++] = "Cancelled";
        } else {
            $data[$i][$j++] = "Closed";
        }
        if (Sql_Result($row, "status") == 0) {
            $data[$i][$j++] = '<span onclick="obd_execution_execute(this,' . "'" . Sql_Result($row, "id") . "'" . '); return false;">&nbsp;<img style="position: relative; cursor: pointer; top: 4px" width="16" height="16" border="0" src="rcportal/img/execute.png" ></span>' . '&nbsp&nbsp' . '<span  onclick="obd_execution_remove(this,' . "'" . Sql_Result($row, "id") . "'" . '); return false;">&nbsp;<img style="position: relative; cursor: pointer; top: 4px" width="16" height="16" border="0" src="rcportal/img/cancel.png" ></span>';
        } else {
            $data[$i][$j++] = '';
        }
        $i++;
    }
    Sql_Free_Result($result);
    echo json_encode($data);
} else {
    echo 1;
}
ClosedDBConnection($remoteConnection);
$cn = connectDB();
$id_1 = mysql_real_escape_string(htmlspecialchars($info['id_1']));
$id_2 = mysql_real_escape_string(htmlspecialchars($info['id_2']));
$query = "SELECT  \n\t\t\t\t`rowvalue` \n\t\t  FROM \n\t\t\t`tbl_audit_trail`  \n\t\t  WHERE (`id` = '{$id_1}' OR `id` = '{$id_2}')\n\t\t  ORDER BY `action_date` Desc ";
$result = Sql_exec($cn, $query);
if (!$result) {
    echo "err+" . $query . " in line " . __LINE__ . " of file" . __FILE__;
    exit;
}
$data = array();
$show_response = "";
$header_date = "";
$i = 0;
$data_rows = array();
while ($row = Sql_fetch_array($result)) {
    $com_str = Sql_Result($row, "rowvalue");
    $str_to_json_array = json_decode($com_str, true);
    ksort($str_to_json_array, SORT_NATURAL);
    $str = json_encode($str_to_json_array, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);
    $data_rows[$i++] = $str;
}
$original = "";
$changed = "";
if (isset($data_rows[0]) && $data_rows[0] != "") {
    $original = $data_rows[0];
}
if (isset($data_rows[1]) && $data_rows[1] != "") {
    $changed = $data_rows[1];
}
$str_output = '<table class="table table-striped table-bordered table-hover responsive">
        <thead>
    $dt = Sql_fetch_array($res);
    $dbtype = $dt['db_type'];
    $Server = $dt['db_server'];
    $UserID = $dt['db_user'];
    $Password = $dt['db_password'];
    $Database = $dt['db_name'];
    ClosedDBConnection($cn);
    $remoteConnection = connectDB();
    $qry = "SELECT OutDialStatus, COUNT(*) as num FROM outdialque WHERE UserId='{$service_id}' GROUP BY OutDialStatus ORDER BY OutDialStatus ASC";
    $result = Sql_exec($remoteConnection, $qry);
    if (!$result) {
        echo "err+" . $qry . " in line " . __LINE__ . " of file" . __FILE__;
        exit;
    }
    $data = array();
    $i = 0;
    while ($row = Sql_fetch_array($result)) {
        $j = 0;
        $data[$i][$j++] = Sql_Result($row, "OutDialStatus");
        $data[$i][$j++] = Sql_Result($row, "num");
        if (Sql_Result($row, "OutDialStatus") == "QUE") {
            $data[$i][$j++] = '<span  onclick="stop_obd_operation(this,' . "'" . Sql_Result($row, "OutDialStatus") . "'" . '); return false;">&nbsp;<img style="position: relative; cursor: pointer; top: 4px" width="16" height="16" border="0" src="rcportal/img/stop.png" ></span>';
        } else {
            $data[$i][$j++] = '<span onclick="download_obd_dashboard(this,' . "'" . Sql_Result($row, "OutDialStatus") . "'" . '); return false;">&nbsp;<img style="position: relative; cursor: pointer; top: 4px" width="16" height="16" border="0" src="rcportal/img/download.png" ></span>';
        }
        $i++;
    }
    Sql_Free_Result($result);
    ClosedDBConnection($remoteConnection);
    echo json_encode($data);
}
Beispiel #12
0
$slno = mysql_real_escape_string(htmlspecialchars($data['slno']));
$callId = mysql_real_escape_string(htmlspecialchars($data['callId']));
$ano = mysql_real_escape_string(htmlspecialchars($data['ano']));
$bno = mysql_real_escape_string(htmlspecialchars($data['bno']));
$call_start_time = mysql_real_escape_string(htmlspecialchars($data['call_start_time']));
$call_end_time = mysql_real_escape_string(htmlspecialchars($data['call_end_time']));
$machine_id = mysql_real_escape_string(htmlspecialchars($data['machine_id']));
$isConnected = mysql_real_escape_string(htmlspecialchars($data['isConnected']));
$cause_val = mysql_real_escape_string(htmlspecialchars($data['cause_val']));
$cost = mysql_real_escape_string(htmlspecialchars($data['cost']));
$qry = "CALL SP_CDR('" . $slno . "','" . $callId . "','" . $ano . "','" . $bno . "','" . $call_start_time . "','" . $call_end_time . "','" . $machine_id . "','" . $isConnected . "','" . $cause_val . "','" . $cost . "','" . $start_point . "','" . $per_page . "');";
$res = Sql_exec($cn, $qry);
$data_ = array();
$i = 0;
while ($row = Sql_fetch_array($res)) {
    $j = 0;
    $data_[$i][$j++] = Sql_Result($row, "slno");
    $data_[$i][$j++] = Sql_Result($row, "callId");
    $data_[$i][$j++] = Sql_Result($row, "ano");
    $data_[$i][$j++] = Sql_Result($row, "bno");
    $data_[$i][$j++] = Sql_Result($row, "call_start_time");
    $data_[$i][$j++] = Sql_Result($row, "call_end_time");
    $data_[$i][$j++] = Sql_Result($row, "machine_id");
    $data_[$i][$j++] = Sql_Result($row, "isConnected");
    $data_[$i][$j++] = Sql_Result($row, "cause_val");
    $data_[$i][$j++] = Sql_Result($row, "cost");
    $i++;
}
Sql_Free_Result($res);
echo json_encode($data_);
ClosedDBConnection($cn);
Beispiel #13
0
/**
 * Created by PhpStorm.
 * User: Talemul
 * Date: 5/21/2015
 * Time: 7:34 PM
 */
include_once "../lib/common.php";
$remoteCn = remote_connectDB('SMSGW');
$arrayInput = array();
$query = "SELECT \tMobileNo, MsgText, ShortCode, Keyword,SentReply,  RequestDateTime\tFROM \trequestlog ";
$result = Sql_exec($remoteCn, $query);
if (!$result) {
    echo "err+" . $query . " in line " . __LINE__ . " of file" . __FILE__;
    exit;
}
$data = array();
$i = 0;
while ($row = Sql_fetch_array($result)) {
    $j = 0;
    $data[$i][$j++] = Sql_Result($row, "MobileNo");
    $data[$i][$j++] = Sql_Result($row, "MsgText");
    $data[$i][$j++] = Sql_Result($row, "ShortCode");
    $data[$i][$j++] = Sql_Result($row, "Keyword");
    $data[$i][$j++] = Sql_Result($row, "SentReply");
    $data[$i][$j++] = Sql_Result($row, "RequestDateTime");
    $i++;
}
Sql_Free_Result($result);
ClosedDBConnection($remoteCn);
echo json_encode($data);
Beispiel #14
0
<?php

include_once "../lib/common.php";
$cn = connectDB();
$arrayInput = array();
$query = "select host_name,IP from tbl_hosts";
$result = Sql_exec($cn, $query);
if (!$result) {
    echo "err+" . $query . " in line " . __LINE__ . " of file" . __FILE__;
    exit;
}
$data = array();
$i = 0;
while ($row = Sql_fetch_array($result)) {
    $j = 0;
    $data[$i][$j++] = Sql_Result($row, "host_name");
    $data[$i][$j++] = Sql_Result($row, "IP");
    $data[$i][$j++] = '<span onclick="gs_delete(this,' . "'" . Sql_Result($row, "host_name") . "'" . '); return false;">&nbsp;<img style="position: relative; cursor: pointer; top: 4px" width="16" height="16" border="0" src="rcportal/img/cancel.png" ></span>';
    $i++;
}
Sql_Free_Result($result);
ClosedDBConnection($cn);
echo json_encode($data);
Beispiel #15
0
$cn = connectDB();
$arrayInput = array();
$query = "SELECT `id`,`source_ip`,`source_port`,`source_protocol`,`destination_ip`,`destination_port`,`destination_protocol`,`route_type`,`context_name` FROM `tbl_ippbx_route` WHERE `is_active`='active'";
$result = Sql_exec($cn, $query);
if (!$result) {
    echo "err+" . $query . " in line " . __LINE__ . " of file" . __FILE__;
    exit;
}
$data = array();
$i = 0;
while ($row = Sql_fetch_array($result)) {
    $j = 0;
    $id = Sql_Result($row, "id");
    $data[$i][$j++] = Sql_Result($row, "id");
    $data[$i][$j++] = Sql_Result($row, "source_ip");
    $data[$i][$j++] = Sql_Result($row, "source_port");
    $data[$i][$j++] = Sql_Result($row, "source_protocol");
    $data[$i][$j++] = Sql_Result($row, "destination_ip");
    $data[$i][$j++] = Sql_Result($row, "destination_port");
    $data[$i][$j++] = Sql_Result($row, "destination_protocol");
    $data[$i][$j++] = Sql_Result($row, "route_type");
    $data[$i][$j++] = Sql_Result($row, "context_name");
    /*
        $info = '' . Sql_Result($row, "id") . '|' . Sql_Result($row, "name") . '|' . Sql_Result($row, "ip_address") . '|' . Sql_Result($row, "port") . '|' . Sql_Result($row, "ep_type") . '|' . Sql_Result($row, "user_name")  . '|' . Sql_Result($row, "password") . '|' . Sql_Result($row, "type") ;
    */
    $data[$i][$j++] = '<span onclick="edit_input_form_route_info(this,\'' . $id . '\'); return false;">&nbsp;<img style="position: relative; cursor: pointer; top: 4px" width="16" height="16" border="0" src="softswitch/img/pen.png" ></span>' . '&nbsp&nbsp' . '<span onclick="delete_route_info(this,\'' . $id . '\'); return false;">&nbsp;<img style="position: relative; cursor: pointer; top: 4px" width="16" height="16" border="0" src="softswitch/img/cancel.png" ></span>';
    $i++;
}
Sql_Free_Result($result);
ClosedDBConnection($cn);
echo json_encode($data);
Beispiel #16
0
if (!$result) {
    echo "err+" . $query . " in line " . __LINE__ . " of file" . __FILE__;
    exit;
}
$data = array();
$show_response = "";
$header_date = "";
$i = 0;
while ($row = Sql_fetch_array($result)) {
    $j = 0;
    //	  $data[$i][$j++] = '<input onclick="check_audit_trail(this,'.'"'.Sql_Result($row, "id")."'".');return false;" type="checkbox" id="row_'.($i+1).'"/>';
    $data[$i][$j++] = '<input id="row_' . Sql_Result($row, "id") . '" type="checkbox"/>';
    $id = Sql_Result($row, "id");
    $comments = Sql_Result($row, "comments");
    $action_time = Sql_Result($row, "action_time");
    $user_name = Sql_Result($row, "user_name");
    $str = "";
    $str .= '<div class="row"><div class="row col-md-3">' . $comments . '</div><div class="row col-md-3"></div><div class="row col-md-3"></div><div class="row col-md-3"></div></div>';
    $str .= '<div class="row"><div class="row col-md-3">' . $id . " By " . $user_name . "," . $action_time . '</div><div class="row col-md-3"></div><div class="row col-md-3"></div><div class="row col-md-3"></div></div>';
    $data[$i][$j++] = $str;
    $data[$i][$j++] = date("l,M d,Y", strtotime($row['action_date']));
    /*	  $com_str = "";
    	  $com_str = Sql_Result($row, "rowvalue"); 
    	  
    	  $str_to_json_array = json_decode($com_str,true);
    	  ksort($str_to_json_array,SORT_NATURAL);
    	  $str_to_json_array = json_encode($str_to_json_array,JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT); */
    //  $data[$i][$j++] = '<pre>'.$str_to_json_array.'</pre>';
    $i++;
}
Sql_Free_Result($result);
$arrayInput = array();
$query = "select id, `name`,ip_address,port,user_name, password,ep_type,`type` from tbl_softswitch_gateway where is_active='active'";
$result = Sql_exec($cn, $query);
if (!$result) {
    echo "err+" . $query . " in line " . __LINE__ . " of file" . __FILE__;
    exit;
}
$data = array();
$i = 0;
while ($row = Sql_fetch_array($result)) {
    $j = 0;
    $data[$i][$j++] = Sql_Result($row, "id");
    $data[$i][$j++] = Sql_Result($row, "name");
    $data[$i][$j++] = Sql_Result($row, "ip_address");
    $data[$i][$j++] = Sql_Result($row, "port");
    $data[$i][$j++] = Sql_Result($row, "ep_type");
    $data[$i][$j++] = Sql_Result($row, "user_name");
    $data[$i][$j++] = Sql_Result($row, "password");
    $data[$i][$j++] = Sql_Result($row, "type");
    $info = '' . Sql_Result($row, "id") . '|' . Sql_Result($row, "name") . '|' . Sql_Result($row, "ip_address") . '|' . Sql_Result($row, "port") . '|' . Sql_Result($row, "ep_type") . '|' . Sql_Result($row, "user_name") . '|' . Sql_Result($row, "password") . '|' . Sql_Result($row, "type");
    $data[$i][$j++] = '<span onclick="edit_soft_gw(this,\'' . $info . '\'); return false;">&nbsp;<img style="position: relative; cursor: pointer; top: 4px" width="16" height="16" border="0" src="softswitch/img/pen.png" ></span>' . '&nbsp&nbsp' . '<span onclick="delete_soft_gw(this,' . Sql_Result($row, "id") . '); return false;">&nbsp;<img style="position: relative; cursor: pointer; top: 4px" width="16" height="16" border="0" src="softswitch/img/cancel.png" ></span>';
    /*
    $data[$i][$j++] = '<button style="background-color: blue; margin: 2px;" onclick="edit_input_form_context_info(this,'."'".Sql_Result($row, "id")."'".'); return false;" class="btn btn-primary" type="button"> <i class="fa fa-pencil-square-o"></i> Edit
    </button>'.'<button style="background-color: #FF0000;margin: 2px;   " onclick="delete_context_info(this,'."'".Sql_Result($row, "id")."'".'); return false;" class="btn btn-primary" type="button"> <i class="fa fa-times"></i> Delete
    </button>';
    */
    $i++;
}
Sql_Free_Result($result);
ClosedDBConnection($cn);
echo json_encode($data);
<?php

require_once "../lib/common.php";
$remoteCn = remote_connectDB('ISMP');
$qry = "SELECT \tsmp.`id`,\n\t\t\t\tsmp.`msg`,\n\t\t\t\tsmp.`mask`,\n\t\t\t\tscg.`group_name` \n\t\tFROM `tbl_smsgw_msg_permission` smp inner join `tbl_smsgw_contact_group` scg \n\t\t\t  ON smp.`group_id`=scg.`id` \n\t\tWHERE smp.`status`='pending'";
$rs = Sql_exec($remoteCn, $qry);
$data = array();
$i = 0;
while ($row = Sql_fetch_array($rs)) {
    $j = 0;
    $data[$i][$j++] = Sql_Result($row, "id");
    $data[$i][$j++] = Sql_Result($row, "msg");
    $data[$i][$j++] = Sql_Result($row, "mask");
    $data[$i][$j++] = Sql_Result($row, "group_name");
    $data[$i][$j++] = '<button style="background-color: blue; margin: 2px;" onclick="send_bulk_sms(this,' . "'" . Sql_Result($row, "id") . "'" . '); return false;" class="btn btn-primary" type="button">Send
</button>';
    $i++;
}
echo json_encode($data);
ClosedDBConnection($remoteCn);
Beispiel #19
0
<?php

include_once "../lib/common.php";
$cn = connectDB();
$arrayInput = array();
$query = "SELECT @rn:=@rn+1 AS `Serial`,`t1`.`Date`,`t1`.`Time`,`t1`.`server_id`,`t1`.`cnt` , REPLACE(REPLACE(CONCAT(`t1`.`Date`, 'T', `t1`.`Time`, 'S',  `t1`.`server_id`), '-', 'D'), ':', 'C') AS `key`" . "FROM " . "(SELECT DATE(`time_stamp`) AS `Date`, TIME(`time_stamp`) AS `Time`, `server_id`, COUNT(DISTINCT `msisdn`) AS `cnt`" . "FROM `tbl_obd_dnd_list` " . "GROUP BY `server_id`, DATE(`time_stamp`), TIME(`time_stamp`)" . "ORDER BY `server_id` DESC, DATE(`time_stamp`) ASC, TIME(`time_stamp`) ASC " . " ) AS `t1`,\n\t\t\t\t(SELECT @rn := 0) AS `t2`";
$result = Sql_exec($cn, $query);
if (!$result) {
    echo "err+" . $query . " in line " . __LINE__ . " of file" . __FILE__;
    exit;
}
$data = array();
$i = 0;
while ($row = Sql_fetch_array($result)) {
    $j = 0;
    $data[$i][$j++] = Sql_Result($row, "Serial");
    $data[$i][$j++] = Sql_Result($row, "Date");
    $data[$i][$j++] = Sql_Result($row, "Time");
    $data[$i][$j++] = Sql_Result($row, "server_id");
    $data[$i][$j++] = Sql_Result($row, "cnt");
    $generate_id = str_replace('-', 'D', Sql_Result($row, "Date"));
    $generate_id .= 'T' . str_replace(':', 'C', Sql_Result($row, "Time"));
    $generate_id .= 'S' . Sql_Result($row, "server_id");
    $data[$i][$j++] = '<span onclick="download_obd_dnd(this,' . "'" . $generate_id . "'" . '); return false;">&nbsp;<img style="position: relative; cursor: pointer; top: 4px" width="16" height="16" border="0" src="rcportal/img/download.png" ></span>' . '&nbsp&nbsp' . '<span  onclick="delete_obd_dnd(this,' . "'" . $generate_id . "'" . '); return false;">&nbsp;<img style="position: relative; cursor: pointer; top: 4px" width="16" height="16" border="0" src="rcportal/img/cancel.png" ></span>';
    $i++;
}
Sql_Free_Result($result);
ClosedDBConnection($cn);
echo json_encode($data);
require_once "../lib/common.php";
$cn = connectDB();
$remoteCnQry = "select * from tbl_process_db_access where pname='CGW'";
$res = Sql_exec($cn, $remoteCnQry);
$dt = Sql_fetch_array($res);
$dbtype = $dt['db_type'];
$Server = $dt['db_server'];
$UserID = $dt['db_uid'];
$Password = $dt['db_password'];
$Database = $dt['db_name'];
ClosedDBConnection($cn);
$remoteCn = connectDB();
$qry = "select `TimeSlotID`,`StartDay`,`EndDay`,`StartTime`,`EndTime`,`UserID` from `timeslot` where `is_active`='active'";
$rs = Sql_exec($remoteCn, $qry);
$data = array();
$i = 0;
while ($row = Sql_fetch_array($rs)) {
    $j = 0;
    $data[$i][$j++] = Sql_Result($row, "TimeSlotID");
    $data[$i][$j++] = Sql_Result($row, "StartDay");
    $data[$i][$j++] = Sql_Result($row, "EndDay");
    $data[$i][$j++] = Sql_Result($row, "StartTime");
    $data[$i][$j++] = Sql_Result($row, "EndTime");
    $data[$i][$j++] = '<span onclick="edit_input_form_smsblast_timeslot(this,' . "'" . Sql_Result($row, "TimeSlotID") . "'" . '); return false;">&nbsp;<img style="position: relative; cursor: pointer; top: 4px" width="16" height="16" border="0" src="rcportal/img/pen.png" /></span>' . '<span onclick="delete_smsblast_timeslot(this,' . "'" . Sql_Result($row, "TimeSlotID") . "'" . '); return false;">&nbsp;<img style="position: relative; cursor: pointer; top: 4px" width="16" height="16" border="0" src="rcportal/img/cancel.png" /></span>';
    /* '<button style="background-color: blue; margin: 2px;" onclick="edit_input_form_smsblast_timeslot(this,'."'".Sql_Result($row, "TimeSlotID")."'".'); return false;" class="btn btn-primary" type="button"> <i class="fa fa-pencil-square-o"></i> Edit
    </button>'.'<button style="background-color: #FF0000;margin: 2px;   " onclick="delete_smsblast_timeslot(this,'."'".Sql_Result($row, "TimeSlotID")."'".'); return false;" class="btn btn-primary" type="button"> <i class="fa fa-times"></i> Delete
    </button>'; */
    $i++;
}
echo json_encode($data);
ClosedDBConnection($remoteCn);
$i = 0;
while ($row_inbound = Sql_fetch_array($res_inbound)) {
    $j = 0;
    $data[$i][$j++] = Sql_Result($row_inbound, "ep_type");
    $data[$i][$j++] = Sql_Result($row_inbound, "ip_address");
    $data[$i][$j++] = Sql_Result($row_inbound, "port");
    $data[$i][$j++] = Sql_Result($row_inbound, "user_name");
    $data[$i][$j++] = Sql_Result($row_inbound, "password");
    $i++;
}
$i = 0;
while ($row_outbound = Sql_fetch_array($res_outbound)) {
    $j = 0;
    $data1[$i][$j++] = Sql_Result($row_outbound, "ip_address");
    $data1[$i][$j++] = Sql_Result($row_outbound, "port");
    $data1[$i][$j++] = Sql_Result($row_outbound, "auth");
    $i++;
}
$i = 0;
$j = 0;
$data2[$i][$j++] = $soft_ano_max;
$data2[$i][$j++] = $soft_ano_min;
$data2[$i][$j++] = $soft_bno_max;
$data2[$i][$j++] = $soft_bno_min;
$new_array = array();
$ii = 0;
$d = 0;
$d_d = 0;
$d1 = 0;
$d1_d1 = 0;
$d2 = 0;
    echo "err+" . $query . " in line " . __LINE__ . " of file" . __FILE__;
    exit;
}
$data = array();
$i = 0;
while ($row = Sql_fetch_array($result)) {
    $j = 0;
    $id = Sql_Result($row, "id");
    $data[$i][$j++] = Sql_Result($row, "id");
    $data[$i][$j++] = Sql_Result($row, "e_userId");
    $data[$i][$j++] = Sql_Result($row, "e_password");
    $data[$i][$j++] = Sql_Result($row, "e_userType");
    $data[$i][$j++] = Sql_Result($row, "e_hwNo");
    $data[$i][$j++] = Sql_Result($row, "e_allowedIp");
    $data[$i][$j++] = Sql_Result($row, "e_allowedPort");
    $data[$i][$j++] = Sql_Result($row, "e_fwdib");
    $data[$i][$j++] = Sql_Result($row, "e_fwdiu");
    $data[$i][$j++] = Sql_Result($row, "e_fwdina");
    $data[$i][$j++] = Sql_Result($row, "e_rbtno");
    $data[$i][$j++] = Sql_Result($row, "e_mcaNo");
    $data[$i][$j++] = Sql_Result($row, "e_status");
    $data[$i][$j++] = Sql_Result($row, "e_aaaIp");
    $data[$i][$j++] = Sql_Result($row, "e_aaaPort");
    $data[$i][$j++] = Sql_Result($row, "e_noOAS");
    $info = '' . Sql_Result($row, "id") . '|' . Sql_Result($row, "name") . '|' . Sql_Result($row, "ip_address") . '|' . Sql_Result($row, "port") . '|' . Sql_Result($row, "ep_type") . '|' . Sql_Result($row, "user_name") . '|' . Sql_Result($row, "password") . '|' . Sql_Result($row, "type");
    $data[$i][$j++] = '<span onclick="edit_input_form_extensions_info(this,\'' . $i . '\'); return false;">&nbsp;<img style="position: relative; cursor: pointer; top: 4px" width="16" height="16" border="0" src="softswitch/img/pen.png" ></span>' . '&nbsp&nbsp' . '<span onclick="delete_extensions_info(this,\'' . $id . '\'); return false;">&nbsp;<img style="position: relative; cursor: pointer; top: 4px" width="16" height="16" border="0" src="softswitch/img/cancel.png" ></span>';
    $i++;
}
Sql_Free_Result($result);
ClosedDBConnection($cn);
echo json_encode($data);
<?php

require_once "../lib/common.php";
$cn = connectDB();
$qry = "SELECT * FROM `tbl_process_db_access` WHERE `pname`='ISMP'";
$res = Sql_exec($cn, $qry);
$dt = Sql_fetch_array($res);
$dbtype = $dt['db_type'];
$Server = $dt['db_server'];
$UserID = $dt['db_uid'];
$Password = $dt['db_password'];
$Database = $dt['db_name'];
ClosedDBConnection($cn);
$remoteCn = connectDB();
$qry = "select `id`,`recipient_name`,`recipient_no` from `tbl_smsgw_group_recipient` where `is_active`= 'active'";
$rs = Sql_exec($remoteCn, $qry);
$data = array();
$i = 0;
while ($row = Sql_fetch_array($rs)) {
    $j = 0;
    $data[$i][$j++] = Sql_Result($row, "id");
    $data[$i][$j++] = Sql_Result($row, "recipient_name");
    $data[$i][$j++] = Sql_Result($row, "recipient_no");
    $data[$i][$j++] = '<span onclick="delete_smsblust_group_recipient(this,' . "'" . Sql_Result($row, "id") . "'" . '); return false;">&nbsp;<img style="position: relative; cursor: pointer; top: 4px" width="16" height="16" border="0" src="rcportal/img/cancel.png" /></span>';
    /*'<button style="background-color: #FF0000;margin: 2px;   " onclick="delete_smsblust_group_recipient(this,'."'".Sql_Result($row, "id")."'".'); return false;" class="btn btn-primary" type="button"> <i class="fa fa-times"></i> Delete
    </button>'; */
    $i++;
}
echo json_encode($data);
ClosedDBConnection($remoteCn);
Beispiel #24
0
 */
include_once "../lib/common.php";
$cn = connectDB();
$arrayInput = array();
$query = "SELECT * FROM tbl_vpn_l2tp";
$result = Sql_exec($cn, $query);
if (!$result) {
    echo "err+" . $query . " in line " . __LINE__ . " of file" . __FILE__;
    exit;
}
$data = array();
$i = 0;
while ($row = Sql_fetch_array($result)) {
    $j = 0;
    $data[$i][$j++] = Sql_Result($row, "id");
    $data[$i][$j++] = Sql_Result($row, "listen_address");
    $data[$i][$j++] = Sql_Result($row, "ip_range");
    $data[$i][$j++] = Sql_Result($row, "local_ip");
    $data[$i][$j++] = Sql_Result($row, "ms_dns");
    $info = '' . Sql_Result($row, "id") . '|' . Sql_Result($row, "listen_address") . '|' . Sql_Result($row, "ip_range") . '|' . Sql_Result($row, "local_ip") . '|' . Sql_Result($row, "ms_dns");
    $data[$i][$j++] = '<span onclick="edit_input_form_vpn_l2tp_server(this,\'' . $info . '\'); return false;">&nbsp;<img style="position: relative; cursor: pointer; top: 4px" width="16" height="16" border="0" src="rcportal/img/pen.png" ></span>' . '&nbsp&nbsp' . '<span onclick="delete_vpn_l2tp_server(this,' . Sql_Result($row, "id") . '); return false;">&nbsp;<img style="position: relative; cursor: pointer; top: 4px" width="16" height="16" border="0" src="rcportal/img/cancel.png" ></span>';
    /*
     $data[$i][$j++] = '<button style="background-color: blue; margin: 2px;" onclick="edit_input_form_vpn_l2tp_server(this,\''.$info.'\'); return false;" class="btn btn-primary" type="button"> <i class="fa fa-pencil-square-o"></i> Edit
    </button>'.'<button style="background-color: #FF0000;margin: 2px;   " onclick="delete_vpn_l2tp_server(this,'.Sql_Result($row, "id").'); return false;" class="btn btn-primary" type="button"> <i class="fa fa-times"></i> Delete
    </button>';
    */
    $i++;
}
Sql_Free_Result($result);
ClosedDBConnection($cn);
echo json_encode($data);
Beispiel #25
0
    if (isset($eth1) && $eth1 != "") {
        $data[$i][$j++] = $eth1;
    } else {
        $data[$i][$j++] = "";
    }
    if (isset($eth2) && $eth2 != "") {
        $data[$i][$j++] = $eth2;
    } else {
        $data[$i][$j++] = "";
    }
    if (isset($eth3) && $eth3 != "") {
        $data[$i][$j++] = $eth3;
    } else {
        $data[$i][$j++] = "";
    }
    if (isset($eth4) && $eth4 != "") {
        $data[$i][$j++] = $eth4;
    } else {
        $data[$i][$j++] = "";
    }
    $data[$i][$j++] = '<span onclick="edit_input_form_ipassignment_bridge(this,' . "'" . Sql_Result($row, "id") . "'" . '); return false;">&nbsp;<img style="position: relative; cursor: pointer; top: 4px" width="16" height="16" border="0" src="rcportal/img/pen.png" ></span>' . '&nbsp&nbsp' . '<span onclick="delete_ipassignment_bridge(this,' . Sql_Result($row, "id") . '); return false;">&nbsp;<img style="position: relative; cursor: pointer; top: 4px" width="16" height="16" border="0" src="rcportal/img/cancel.png" ></span>';
    /*
        $data[$i][$j++] = '<button style="background-color: blue; margin: 2px;" onclick="edit_input_form_ipassignment_bridge(this,'."'".Sql_Result($row, "id")."'".'); return false;" class="btn btn-primary" type="button"> <i class="fa fa-pencil-square-o"></i> Edit
    </button>'.'<button style="background-color: #FF0000;margin: 2px;   " onclick="delete_ipassignment_bridge(this,'.Sql_Result($row, "id").'); return false;" class="btn btn-primary" type="button"> <i class="fa fa-times"></i> Delete
    </button>';
    */
    $i++;
}
Sql_Free_Result($result);
ClosedDBConnection($cn);
echo json_encode($data);
    $service_id = mysql_real_escape_string(htmlspecialchars($data['service_id']));
    $page_id = mysql_real_escape_string(htmlspecialchars($data['page_id']));
    $query = "SELECT `current_state`,`key_press`,`short_code`,`next_state`,`NextKey`,`Action_command`,`URL`,`play_file` FROM `ivrmenu` where     Service='{$service_id}' and PageName='{$page_id}'";
    $result = Sql_exec($remoteCn, $query);
    if (!$result) {
        echo "err+" . $query . " in line " . __LINE__ . " of file" . __FILE__;
        exit;
    }
    $data = array();
    $i = 0;
    while ($row = Sql_fetch_array($result)) {
        $j = 0;
        $data[$i][$j++] = Sql_Result($row, "current_state");
        $data[$i][$j++] = Sql_Result($row, "key_press");
        $data[$i][$j++] = Sql_Result($row, "short_code");
        $data[$i][$j++] = Sql_Result($row, "next_state");
        $data[$i][$j++] = Sql_Result($row, "NextKey");
        $data[$i][$j++] = Sql_Result($row, "Action_command");
        $data[$i][$j++] = Sql_Result($row, "URL");
        $data[$i][$j++] = Sql_Result($row, "play_file");
        /*
          $data[$i][$j++] = '<button style="background-color: blue; margin: 2px;" onclick="edit_input_form_ivr_mapping(this,'."'".$serverid."|".Sql_Result($row, "id")."'".'); return false;" class="btn btn-primary" type="button"> <i class="fa fa-pencil-square-o"></i> Edit
        </button>'.'<button style="background-color: #FF0000;margin: 2px; " onclick="delete_ivr_mapping(this,'."'".$serverid."|".Sql_Result($row, "id")."'".'); return false;" class="btn btn-primary" type="button"> <i class="fa fa-times"></i> Delete
        </button>';
        */
        $i++;
    }
    Sql_Free_Result($result);
    ClosedDBConnection($cn);
    echo json_encode($data);
}
$cn = connectDB();
$arrayInput = array();
//$res = Sql_exec($cn,$remoteCnQry);
//$dt = Sql_fetch_array($res);
$query = "select * FROM tbl_ch_server_info";
$result = Sql_exec($cn, $query);
if (!$result) {
    echo "err+" . $query . " in line " . __LINE__ . " of file" . __FILE__;
    exit;
}
$data = array();
$i = 0;
while ($row = Sql_fetch_array($result)) {
    $j = 0;
    $data[$i][$j++] = Sql_Result($row, "server_name");
    $data[$i][$j++] = Sql_Result($row, "db_type");
    $data[$i][$j++] = Sql_Result($row, "database_server");
    $data[$i][$j++] = Sql_Result($row, "user_id");
    $data[$i][$j++] = Sql_Result($row, "database_password");
    $data[$i][$j++] = Sql_Result($row, "database_name");
    $data[$i][$j++] = Sql_Result($row, "prompt_location");
    $data[$i][$j++] = Sql_Result($row, "url");
    $data[$i][$j++] = Sql_Result($row, "recording_location");
    $data[$i][$j++] = '<span  onclick="edit_input_form_ivr_server_info(this,' . "'" . Sql_Result($row, "server_name") . "'" . '); return false;"  > &nbsp;<img style="position: relative; cursor: pointer; top: 4px" width="16" height="16" border="0" src="rcportal/img/pen.png" >
</span>' . '<span    " onclick="delete_ivr_server_info(this,' . "'" . Sql_Result($row, "server_name") . "'" . '); return false;"  > &nbsp;<img style="position: relative; cursor: pointer; top: 4px" width="16" height="16" border="0" src="rcportal/img/cancel.png" >
</span>';
    $i++;
}
Sql_Free_Result($result);
ClosedDBConnection($cn);
echo json_encode($data);
Beispiel #28
0
<?php

session_start();
include_once "../lib/common.php";
$data = $_POST['info'];
$cn = connectDB();
$total_no_of_call = mysql_real_escape_string(htmlspecialchars($data['total_no_of_call']));
$minimum_call_duration = mysql_real_escape_string(htmlspecialchars($data['minimum_call_duration']));
$maximum_call_duration = mysql_real_escape_string(htmlspecialchars($data['maximum_call_duration']));
$average_call_duration = mysql_real_escape_string(htmlspecialchars($data['average_call_duration']));
$total_established_call = mysql_real_escape_string(htmlspecialchars($data['total_established_call']));
$qry = "CALL getCallReport('" . $start_time . "','" . $end_time . "','" . $total_failed_call . "');";
$res = Sql_exec($cn, $qry);
$data_ = array();
$i = 0;
while ($row = Sql_fetch_array($res)) {
    $j = 0;
    $data_[$i][$j++] = Sql_Result($row, "total_no_of_call");
    $data_[$i][$j++] = Sql_Result($row, "minimum_call_duration");
    $data_[$i][$j++] = Sql_Result($row, "maximum_call_duration");
    $data_[$i][$j++] = Sql_Result($row, "average_call_duration");
    $data_[$i][$j++] = Sql_Result($row, "total_established_call");
    $i++;
}
Sql_Free_Result($res);
echo json_encode($data_);
ClosedDBConnection($cn);