Example #1
0
                 $LEADS_ALL = $allLeads;
                 $searchstatus = true;
             } else {
                 $errors['e1'] = $tl['search']['s2'];
                 $errors = $errors;
             }
         }
     }
 }
 if (!$searchstatus) {
     // Leads
     $sqlw = '';
     $rowts['total_support'] = 0;
     $rowtc['totalAll'] = 0;
     $bounce_percentage = 0;
     if (!ls_get_access("leads_all", $lsuser->getVar("permissions"), LS_SUPERADMINACCESS)) {
         $sqlw = ' WHERE operatorid = "' . LS_USERID_RHINO . '"';
     }
     $total = $lsdb->query('SELECT COUNT(*) as totalAll FROM ' . $lstable . $sqlw);
     $rowt = $total->fetch_assoc();
     //break total records into pages
     $total_pages = ceil($rowt['totalAll'] / 20);
     $sqlw1 = $sqlw ? $sqlw . ' AND fcontact = 1' : ' WHERE fcontact = 1';
     $totalc = $lsdb->query('SELECT COUNT(*) as totalAll FROM ' . $lstable . $sqlw1 . '');
     $rowtc = $totalc->fetch_assoc();
     // Get percentage
     if ($rowtc['totalAll']) {
         $bounce_percentage = round($rowtc['totalAll'] / $rowt['totalAll'] * 100, 2, PHP_ROUND_HALF_UP);
     }
     $sqlw2 = $sqlw ? $sqlw . ' AND ended != 0 AND initiated != 0' : ' WHERE ended != 0 AND initiated != 0';
     $totals = $lsdb->query('SELECT SUM(ended - initiated) AS total_support FROM ' . $lstable . $sqlw2 . '');
Example #2
0
/*======================================================================*\
|| #################################################################### ||
|| # Rhino Socket 2.0                                                 # ||
|| # ---------------------------------------------------------------- # ||
|| # Copyright 2014 Rhino All Rights Reserved.                        # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| #   ---------------- Rhino IS NOT FREE SOFTWARE ----------------   # ||
|| #                  http://www.livesupportrhino.com                 # ||
|| #################################################################### ||
\*======================================================================*/
// Check if the file is accessed only via index.php if not stop the script from running
if (!defined('LS_ADMIN_PREVENT_ACCESS')) {
    die('You cannot access this file directly.');
}
// Check if the user has access to this file
if (!ls_get_access("files", $lsuser->getVar("permissions"), LS_SUPERADMINACCESS)) {
    ls_redirect(BASE_URL);
}
// All the tables we need for this plugin
$errors = array();
$lstable = DB_PREFIX . 'files';
// Now start with the plugin use a switch to access all pages
switch ($page1) {
    case 'delete':
        // Check if the file can be deleted
        if (is_numeric($page2)) {
            $result = $lsdb->query('SELECT path FROM ' . $lstable . ' WHERE id = "' . smartsql($page2) . '"');
            $row = $result->fetch_assoc();
            // Now delete the record from the database
            $result = $lsdb->query('DELETE FROM ' . $lstable . ' WHERE id = "' . smartsql($page2) . '"');
            // Now let us delete the file
Example #3
0
/*======================================================================*\
|| #################################################################### ||
|| # Rhino Socket 2.0                                                 # ||
|| # ---------------------------------------------------------------- # ||
|| # Copyright 2014 Rhino All Rights Reserved.                        # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| #   ---------------- Rhino IS NOT FREE SOFTWARE ----------------   # ||
|| #                  http://www.livesupportrhino.com                 # ||
|| #################################################################### ||
\*======================================================================*/
// Check if the file is accessed only via index.php if not stop the script from running
if (!defined('LS_ADMIN_PREVENT_ACCESS')) {
    die('You cannot access this file directly.');
}
// Check if the user has access to this file
if (!ls_get_access("departments", $lsuser->getVar("permissions"), LS_SUPERADMINACCESS)) {
    ls_redirect(BASE_URL);
}
// All the tables we need for this plugin
$errors = array();
$lstable = DB_PREFIX . 'departments';
// Now start with the plugin use a switch to access all pages
switch ($page1) {
    case 'delete':
        // Check if user exists and can be deleted
        if (is_numeric($page2) && $page2 != 1) {
            // Now check how many languages are installed and do the dirty work
            $result = $lsdb->query('DELETE FROM ' . $lstable . ' WHERE id = "' . smartsql($page2) . '"');
            if (!$result) {
                ls_redirect(BASE_URL . 'index.php?p=error&sp=mysql');
            } else {
Example #4
0
/*======================================================================*\
|| #################################################################### ||
|| # Rhino Socket 2.0                                                 # ||
|| # ---------------------------------------------------------------- # ||
|| # Copyright 2014 Rhino All Rights Reserved.                        # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| #   ---------------- Rhino IS NOT FREE SOFTWARE ----------------   # ||
|| #                  http://www.livesupportrhino.com                 # ||
|| #################################################################### ||
\*======================================================================*/
// Check if the file is accessed only via index.php if not stop the script from running
if (!defined('LS_ADMIN_PREVENT_ACCESS')) {
    die('You cannot access this file directly.');
}
// Check if the user has access to this file
if (!ls_get_access("maintenance", $lsuser->getVar("permissions"), LS_SUPERADMINACCESS)) {
    ls_redirect(BASE_URL);
}
include_once 'dbbackup/class.dbie.php';
$dbimpexp = new dbimpexp();
// Flag to select step
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $defaults = $_POST;
    if (isset($defaults['delCache'])) {
        // Now let us delete the all the cache file
        $cacheallfiles = '../' . LS_CACHE_DIRECTORY . '/';
        $msfi = glob($cacheallfiles . "*.php");
        if ($msfi) {
            foreach ($msfi as $filen) {
                if (file_exists($filen)) {
                    unlink($filen);
Example #5
0
    $tl = parse_ini_file(APP_PATH . 'operator/lang/' . LS_LANG . '.ini', true);
} else {
    $tl = parse_ini_file(APP_PATH . 'operator/lang/en.ini', true);
}
// Get the special lang var once for the time
define('LS_DAY', $tl['general']['g74']);
define('LS_HOUR', $tl['general']['g75']);
define('LS_MINUTE', $tl['general']['g76']);
define('LS_MULTITIME', $tl['general']['g77']);
define('LS_AGO', $tl['general']['g78']);
//get current starting point of records
$position = $page_number * 10;
// Operator Access
$sqlw = '';
$loadcontent = '';
if (!ls_get_access("ochat_all", $lsuser->getVar("permissions"), $_SESSION['ls_superoperator'])) {
    $sqlw = ' WHERE fromid = "' . smartsql($_SESSION['ls_opid']) . '" OR toid = "' . smartsql($_SESSION['ls_opid']) . '"';
}
if ($_POST["page2"] && ($_POST["page3"] == "ASC" || $_POST["page3"] == "DESC")) {
    $sqlorderby = $_POST["page2"] . ' ' . $_POST["page3"];
} else {
    $sqlorderby = 'sent DESC';
}
$result = $lsdb->query('SELECT t1.id, t1.fromid, t1.toid, t1.message, t1.sent, t2.username, t3.username AS touser FROM ' . DB_PREFIX . 'operatorchat AS t1 LEFT JOIN ' . DB_PREFIX . 'user AS t2 ON (t1.fromid = t2.id) LEFT JOIN ' . DB_PREFIX . 'user AS t3 ON (t1.toid = t3.id)' . $sqlw . ' ORDER BY ' . $sqlorderby . ' LIMIT ' . $position . ', 10');
while ($row = $result->fetch_assoc()) {
    // refresh vars
    $superop = '';
    if (LS_SUPERADMINACCESS) {
        $superop = '<a class="btn btn-default btn-xs" href="index.php?p=chats&amp;sp=delete&amp;ssp=' . $row["id"] . '" onclick="if(!confirm(' . $tl["error"]["e33"] . '))return false;"><span class="glyphicon glyphicon-trash"></span></a>';
    }
    $loadcontent .= '<tr>
Example #6
0
\*======================================================================*/
// Check if the file is accessed only via index.php if not stop the script from running
if (!defined('LS_ADMIN_PREVENT_ACCESS')) {
    die('You cannot access this file directly.');
}
// Check if the user has access to this file
if (!ls_get_access("statistic", $lsuser->getVar("permissions"), LS_SUPERADMINACCESS)) {
    ls_redirect(BASE_URL);
}
// All the tables we need for this plugin
$errors = array();
$lstable = DB_PREFIX . 'sessions';
$lstable1 = DB_PREFIX . 'user_stats';
$lstable2 = DB_PREFIX . 'user';
$lstable3 = DB_PREFIX . 'departments';
if (ls_get_access("statistic_all", $lsuser->getVar("permissions"), LS_SUPERADMINACCESS)) {
    $country_sql = "";
    $support_sql = "";
    $feedback_sql = "";
    $button_sql = "";
    $result = $lsdb->query('SELECT id, title FROM ' . $lstable3 . ' ORDER BY dorder ASC');
    while ($row = $result->fetch_assoc()) {
        // collect each record into $_data
        $LS_DEPARTMENTS[] = $row;
    }
} else {
    $country_sql = ' operatorid = "' . LS_USERID_RHINO . '" AND';
    $support_sql = ' operatorid = "' . LS_USERID_RHINO . '" AND';
    $feedback_sql = ' userid = "' . LS_USERID_RHINO . '" AND';
    $button_sql = ' WHERE opid = "' . LS_USERID_RHINO . '"';
}