a07f847b by Nitesh

For gitignore file

1 parent 9103ffcc
Showing 104 changed files with 324 additions and 4306 deletions
APP_ENV=local
APP_DEBUG=true
APP_ADMIN_DEBUG=true
APP_LOG_LEVEL=error
APP_KEY=LEynnBaQoqsLncOWZwgdtfxxWU2hEyfp
APP_PROTOCOL=http://
APP_KEY=base64:FzLEKoceiXE5/bBtPxlLyFOk4qtK3hmSyh+AZ1y2+LE=
APP_PROTOCOL=https://
app_name=Flexydial
app_title=Flexydial
app_domain=localhost:8000
web_domain=localhost:8000
app_ip=localhost
app_domain=fullerton.flexydial
web_domain=fullerton.flexydial
app_ip=192.168.3.242
central_ip=192.168.3.242
didnumber=-8
asterisk_slaves=192.168.3.242:1001:2000:1:240
asterisk_manager=192.168.3.242
asterisk_extensions=31330,_X!
sip_dialstr=SIP/GATEWAY/
APP_Multiple_Logins=yes
kDialer_keeplocalconf=1
kstych_viewportMeta=responsive:1:1
DB_HOST=192.168.3.234
DB_HOST=localhost
DB_DATABASE=fullerton
DB_USERNAME=root
DB_PASSWORD=yb9738z
CACHE_DRIVER=database
CACHE_DRIVER=file
SESSION_DRIVER=database
SESSION_LIFEMin=43200
QUEUE_DRIVER=sync
#MAIL_DRIVER=smtp
#MAIL_HOST=localhost
#MAIL_PORT=587
#MAIL_USERNAME=mail
#MAIL_PASSWORD=mail
#[email protected]
MAIL_DRIVER=smtp
MAIL_HOST=localhost
MAIL_PORT=587
MAIL_USERNAME=mail
MAIL_PASSWORD=mail
[email protected]
AWS_KEY=
AWS_Secret=
......@@ -56,4 +57,3 @@ xssGlobal=tag,hent
xssGlobalIgnoreKeys=content,pdata,courseintroductiondiv,coursecoverphoto,data,rlog,rstring
MobileTitle=Flexydial
......
......@@ -1333,7 +1333,7 @@ class DialerController extends Controller
{
$wakka = new KHRMSLib();
$client = Input::get("client", "");
Log::info("APP_Test:" + env('app_ip'));
// Log::info("APP_Test:" + env('app_ip'));
$roclientstr = array();
$didlinesstr = array();
if (Auth::user()->exten != "") $didlinesstr[] = Auth::user()->exten;
......@@ -1360,7 +1360,7 @@ class DialerController extends Controller
if ($limit > 0) {
$tusers = $wakka->getPersons("status='New' and mobile!='' and $roclientstr order by dialer_lastcall asc limit $limit");
$tusers = $wakka->getPersons("status IN ('Called','Incall') and mobile!='' and $roclientstr order by dialer_lastcall asc limit $limit");
foreach ($tusers as $tuser) if (!isset($users[$tuser['id']])) $users[$tuser['id']] = $tuser;
$limit = $limit - sizeof($tusers);
}
......
<?php
namespace App\Http\Controllers;
use Auth;
use DB;
use Input;
use Log;
use Response;
class PromiseClass {
private $callbacks = array();
private $last_return;
function promise($users = null,$crmcall = null,$promise) {
if (get_class($promise) == 'Promise') {
return $promise;
} else if (is_callable($promise)) {
$this->then($promise);
return $this;
}
}
public function then (callable $callback) {
$this->callbacks[] = $callback;
return $this;
}
public function resolve () {
$callback = array_shift($this->callbacks);
if (is_callable($callback)) {
$this->last_return = $callback($this->last_return);
}
if (count($this->callbacks) > 0) {
$this->resolve();
}
}
}
?>
\ No newline at end of file
php artisan config:cache
php artisan config:clear
php artisan cache:clear
php artisan route:clear
php artisan view:clear
php artisan optimize
composer dump-autoload
#!/bin/bash
####################################################################################
##### (c) Siddharth Upmanyu #############################################
##### (c) Flexydial #############################################
##### Install Instructions #############################################
##### Fedora 23/24 (64 bit) #############################################
##### Copy Code to /home and configure details in custom/.env ############
......@@ -189,7 +189,7 @@ function astFilesSetup
sed -i "s/REPLACEMANAGER/$asterisk_manager/g" /etc/asterisk/manager.conf
sed -i "s/REPLACESERVERIP/$app_ip/g" /etc/asterisk/rtp.conf
cp -f $app_path/application/public/assets/extras/data/asterisk/asterisk.service /etc/systemd/system/
# cp -f $app_path/application/public/assets/extras/data/asterisk/asterisk.service /etc/systemd/system/
AsteriskServers=$(echo $asterisk_slaves | tr "," "\n")
for server in $AsteriskServers
......@@ -280,14 +280,14 @@ function restartServices
}
function generalSetup
{
#hostname localhost
hostname localhost
ulimit -n 65000
swapoff -a
timedatectl set-timezone UTC
timedatectl set-ntp yes
grep -q -F 'Storage=none' /etc/systemd/journald.conf || echo 'Storage=none' >> /etc/systemd/journald.conf
#chmod -R 777 $app_path/application/storage
chmod -R 777 $app_path/application/storage
chmod -R 777 $app_path/custom/app
}
function mysqlSetup
......@@ -323,24 +323,20 @@ function dailyTasks
if [ $nowtime -eq "000" ]
then
##rm -f $app_path/application/storage/logs/laravel-*.log
rm -f $app_path/application/storage/logs/laravel-*.log
touch $app_path/application/storage/logs/laravel-$(date +%Y-%m-%d).log
chmod -R 777 $app_path/application/storage
chmod -R 777 $app_path/custom/app
#### Asterisk Date-wise Call Recording Folder creation START ######
mkdir -p /var/spool/asterisk/astrec/$(date +%Y)/$(date +%m)/$(date +%d)/inb
mkdir -p /var/spool/asterisk/astrec/$(date +%Y)/$(date +%m)/$(date +%d)/out
chown asterisk.asterisk -R /var/spool/asterisk/astrec/$(date +%Y)/$(date +%m)/$(date +%d)
mkdir -p /var/spool/asterisk/astrec/$(date +%Y)/$(date +%m)/$(date +%d)/inb
mkdir -p /var/spool/asterisk/astrec/$(date +%Y)/$(date +%m)/$(date +%d)/out
chown asterisk.asterisk -R /var/spool/asterisk/astrec/$(date +%Y)/$(date +%m)/$(date +%d)
#### Asterisk Date-wise Call Recording Folder creation END ######
mkdir -p $app_path/custom/db
chmod -R 777 $app_path/custom/db
##### SIPxml Event log folder creation START ###############################
mkdir -p $app_path/application/storage/logs/sipmlevents/$(date +%Y-%m-%d)/
chmod -R 777 $app_path/application/storage/logs/sipmlevents/$(date +%Y-%m-%d)/
############################################################################
mkdir -p $app_path/custom/db
chmod -R 777 $app_path/custom/db
mysqldump -u$DB_USERNAME -p$DB_PASSWORD --single-transaction $DB_DATABASE | gzip > $app_path/custom/db/$DB_DATABASE.sql.gz
fi
}
......@@ -352,7 +348,7 @@ function astPAMICheck
IFS=':' read -r -a ServerArr <<< "$server"
if ! screen -list | grep -q "AMI_$app_domain${ServerArr[0]}"; then
/usr/bin/screen -d -L -m -S AMI_$app_domain${ServerArr[0]} bash -c "cd $app_path/application/;php $app_path/application/artisan KstychPAMI ${ServerArr[0]}"
/usr/bin/screen -d -m -S AMI_$app_domain${ServerArr[0]} bash -c "cd $app_path/application/;php $app_path/application/artisan KstychPAMI ${ServerArr[0]}"
fi
done
}
......@@ -365,7 +361,7 @@ function createCall
IFS=':' read -r -a ServerArr <<< "$server"
if ! screen -list | grep -q "CreateCall_$app_domain${ServerArr[0]}"; then
/usr/bin/screen -d -L -m -S CreateCall_$app_domain${ServerArr[0]} bash -c "cd $app_path/application/;php $app_path/application/artisan CreateCall"
/usr/bin/screen -d -m -S CreateCall_$app_domain${ServerArr[0]} bash -c "cd $app_path/application/;php $app_path/application/artisan CreateCall"
fi
done
}
......@@ -420,8 +416,8 @@ fi
########################################################################
######################################################################## Main Script
waitForLock
if [ "$OSNAME" == "Fedora" ] && [ $OSVER -gt 21 ] ; then
#waitForLock
#if [ "$OSNAME" == "Fedora" ] && [ $OSVER -gt 21 ] ; then
pgrep httpd
if [ $? -ne 0 ] || [ "$1" == "server" ] ; then
......@@ -436,7 +432,7 @@ if [ "$OSNAME" == "Fedora" ] && [ $OSVER -gt 21 ] ; then
mysqlSetup
restartServices
# schemaSetup
#schemaSetup
fi
sshdCheck
......@@ -444,7 +440,7 @@ if [ "$OSNAME" == "Fedora" ] && [ $OSVER -gt 21 ] ; then
astPAMICheck
createCall
hangUpCall
fi
clearLock
#fi
#clearLock
cd $app_path/application;php artisan schedule:run
########################################################################
......
This diff is collapsed. Click to expand it.
1587367592s:26:"errorInternal Server Error";
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
1587446284s:26:"errorInternal Server Error";
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
1587277912s:30:"syntax error, unexpected ';'[]";
\ No newline at end of file
1587277920s:30:"syntax error, unexpected ';'[]";
\ No newline at end of file
<style>
#logtable.td{vertical-align:top;}#logtable.tr{height:28px;overflow-y:hidden;}
.select2-container-multi{height: 90px; overflow-y: auto;border: 1px solid #efefef;border-radius: 3px !important;}
.select2-container-active{height: 90px; overflow-y: auto;border: 1px solid #5897fb;border-radius: 3px !important;}
.select2-container-multi.select2-container-active.select2-choices{border:none !important; box-shadow: none !important;}
.select2-choices{border:none !important; box-shadow: none !important;}
.select2-drop,.select2-drop-active{border-color: #5897fb;margin-top: -9px;}
</style>
<div class=innerAll>
<h4 style="float:left;width:50%;margin:10px 0;"><?php echo e($reportTitle); ?></h4>
<div style="float:right;width:50%" id="download_btn">
<button class="pull-right btn btn-sm btn-default" onclick='dlAgentlogXls();return false;' title='Download'><i class='fa fa-download'></i> Download</button>
</div>
<div style="clear:both"></div>
<hr style="margin-bottom: 5px;">
<div>
Search <input id=filter name="filter" type="text" style="border:1px solid #efefef; padding: 2px 10px;">&nbsp;&nbsp;
Date: From <input size=10 id='modfrom' name='modfrom' type='text' value='<?php echo date("Y-m-d",$logdate); ?>' onchange='statusLogReloadFun("");' />
<select id="modtime" style="border:1px solid #efefef;" onchange='statusLogReloadFun("");'>
<?php
foreach (range(0,23) as $hour) {
$selected = ($hour == $logtime) ? "selected" : "";
echo "<option value='$hour' $selected>".str_pad($hour, 2, "0", STR_PAD_LEFT) . ":00</option>";
}
?></select>
To <input size=10 id='modto' name='modto' type='text' value='<?php echo date("Y-m-d",$logdateto); ?>' onchange='statusLogReloadFun("");' />
<select id="modtimeto" style="border:1px solid #efefef;" onchange='statusLogReloadFun("");'>
<?php
foreach (range(0,23) as $hour) {
$selected = ($hour == $logtimeto) ? "selected" : "";
echo "<option value='$hour' $selected>".str_pad($hour, 2, "0", STR_PAD_LEFT) . ":00</option>";
}
?></select>&nbsp;&nbsp;
<button class="pull-right btn btn-sm btn-default" onclick='$("#advance").toggle();' title='Advance Search'><i class='fa fa-search'></i> Advance Search</button>
<div style="clear:both"></div>
<div style="margin-top: 5px; display:<?php echo e($displayAdv); ?>;" id="advance">
<div style="width: 25%;" class="pull-left">
Campaign<br />
<select id="campaignbox" multiple="multiple" style="width:96%" class=select2multi>
<?php foreach($clientlist as $c)
{ $s="";
if(in_array($c, $campaign))$s='selected';
echo "<option value='$c' $s>$c</option>";
}?>
</select>
</div>
<div style="width: 25%;" class="pull-left">
State<br />
<select id="statebox" multiple="multiple" style="width:96%" class=select2multi>
<?php foreach($statelist as $c)
{ $s="";
if(in_array($c, $state))$s='selected';
echo "<option value='$c' $s>$c</option>";
} ?>
</select>
</div>
<div style="width: 25%;" class="pull-left">
Product<br />
<select id="productbox" multiple="multiple" style="width:96%" class=select2multi>
<?php foreach($productlist as $c)
{ $s="";
if(in_array($c, $product))$s='selected';
echo "<option value='$c' $s>$c</option>";
}?>
</select>
</div>
<div style="width: 25%;" class="pull-left">
Bucket<br />
<select id="bucketbox" multiple="multiple" style="width:96%" class=select2multi>
<?php foreach($bucketlist as $c)
{ $s="";
if(in_array($c, $bucket))$s='selected';
echo "<option value='$c' $s>$c</option>";
} ?>
</select>
</div>
<div style="margin-top: 5px;" class="pull-left">
<button class="pull-right btn btn-sm btn-default" onclick='statusLogReloadFun("");' title='Search'><i class='fa fa-search'></i> Search</button>
</div>
</div>
</div>
<div style="clear:both"></div>
<hr style="margin:5px;">
<script>
$(document).ready(function() {
waitKeyUpRun("filter",function() { filter2(document.getElementById('filter'), 'logtable') },"2000");
$('#modfrom').datepicker({dateFormat: 'yy-mm-dd',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'});
$('#modto').datepicker({dateFormat: 'yy-mm-dd',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'});
});
function dataString()
{
var campaignStr = '';
$('#campaignbox :selected') .each(function(i, sel){
if(campaignStr != '') campaignStr = campaignStr + '||' + $(sel).val();
else campaignStr = $(sel).val();
});
var stateStr = '';
$('#statebox :selected') .each(function(i, sel){
if(stateStr != '') stateStr = stateStr + '||' + $(sel).val();
else stateStr = $(sel).val();
});
var productStr = '';
$('#productbox :selected') .each(function(i, sel){
if(productStr != '') productStr = productStr + '||' + $(sel).val();
else productStr = $(sel).val();
});
var bucketStr = '';
$('#bucketbox :selected') .each(function(i, sel){
if(bucketStr != '') bucketStr = bucketStr + '||' + $(sel).val();
else bucketStr = $(sel).val();
});
return 'logdate='+$("#modfrom").val()+'&logtime='+$("#modtime").val()+'&logdateto='+$("#modto").val()+'&logtimeto='+$("#modtimeto").val()+'&campaign='+campaignStr+'&state='+stateStr+'&product='+productStr+'&bucket='+bucketStr;
}
function statusLogReloadFun(sortby)
{
var sortstr='';if(sortby!="")sortstr="&sort="+sortby
var searchStr = dataString();
doAjax('dialer/<?php echo e($returnblade); ?>?'+searchStr+sortstr,'','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');
}
function dlAgentlogXls()
{
var searchStr = dataString();
window.open('dialer/<?php echo e($returnblade); ?>?dllogxls=1&'+searchStr);
return false;
}
function breakupXls(report,userId,column)
{
var searchStr = dataString();
window.open('dialer/breakupxls?report='+report+'&userId='+userId+'&column='+column+'&'+searchStr);
return false;
}
function displayMode(mode) {
if(mode == 'percent') {
$(".summation").hide();
$(".percent").show();
}
else {
$(".percent").hide();
$(".summation").show();
}
}
</script>
\ No newline at end of file
<?php
ini_set("precision", 15);
include_once app_path() . '/lib/phpexcel/PHPExcel.php';
if (isset($format) && $format == 'dataUpload') {
if (isset($format) && $format == 'dataUpload') {
$dataColumns = ['username' => 'Username', 'phone' => 'Phone', 'sessiontype' => 'webrtc/mobile',];
$PHPExcelObj = new PHPExcel();
$head = 0;
foreach ($dataColumns as $key => $value) {
$colstr = PHPExcel_Cell::stringFromColumnIndex($head);
$PHPExcelObj->getActiveSheet()->setCellValue($colstr . "1", $key);
$PHPExcelObj->getActiveSheet()->setCellValue($colstr . "2", $value);
$head++;
}
$objWriter = PHPExcel_IOFactory::createWriter($PHPExcelObj, 'Excel5');
$objWriter->save('php://output');
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="DataUploadFormat.xls"');
header('Cache-Control: max-age=0');
return;
}
} else if ($_SERVER["REQUEST_METHOD"] == "POST") {
$errorMsg = "";
$successMsg = "";
$successCount = 0;
if ($_FILES['file']['tmp_name']) {
if ($_FILES['file']['type'] == "application/vnd.ms-excel") {
$fileUploadLimit = 52428800; // files size is in bytes
if ($_FILES['file']['size'] < $fileUploadLimit) {
$inputFileType = "Excel5";
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$objPHPExcel = $objReader->load($_FILES['file']['tmp_name']);
$objWorksheet = $objPHPExcel->getActiveSheet();
$highestColumn = PHPExcel_Cell::columnIndexFromString($objPHPExcel->getActiveSheet()->getHighestColumn());
$highestrow = $objPHPExcel->getActiveSheet()->getHighestRow();
$excelarray = [];
$keys = [];
$listId = time();
for ($i = 1; $i <= $highestrow; $i++) {
$excelarray[$i] = [];
for ($head = 0; $head < $highestColumn; $head++) {
if ($i == 1) {
$keys[$head] = trim($objWorksheet->getCellByColumnAndRow($head, $i)->getValue());
} else {
$excelarray[$i][$keys[$head]] = trim($objWorksheet->getCellByColumnAndRow($head, $i)->getValue());
}
}
}
for ($i = 3; $i <= $highestrow; $i++) {
$excelarray[$i]['sessiontype'] = ($excelarray[$i]['sessiontype'] == 'webrtc' ? 0 : 1);
// print_r($excelarray[$i]);die;
DB::table('users')->where('username', $excelarray[$i]['username'])->update($excelarray[$i]);
// die;
$successMsg .= $excelarray[$i]["username"] . ",";
$successCount++;
}
} else {
$errorMsg .= "File size too large, Please check file size should be less then " . ($fileUploadLimit / (1024 * 1024)) . "mb.";
}
} else {
$errorMsg .= "File format not valid, Please attach Excel file (.xls) and try upload again.";
}
@unlink($_FILES['file']);
} else {
$errorMsg .= "File not found, Please attach file and try upload again.";
}
$success = "Data Uploaded ($successCount): " . $successMsg;
$errFlag = 'success';
if (isset($successMsg) && $successMsg != "") {
$msg = $success;
}
if (isset($errorMsg) && $errorMsg != "") {
$errFlag = 'failure';
$msg = $errorMsg;
}
echo json_encode(['msg' => $msg, 'status' => $errFlag]);
?>
<?php
die;
}
?>
<div class="row">
<div class="col-sm-12">
<div class="panel-group" role="tablist" aria-multiselectable="true">
<div class="panel panel-info">
<div class="panel-heading" role="tab" id="headingOne" role="button">
<strong><i class="fa fa-upload"></i> Data Upload</strong>
</div>
<div role="tabpanel" aria-labelledby="headingOne">
<div class="panel-body">
<div class="tab_generic">
<!-- <p><span style="color:#f00;"><strong>Instruction</strong></span> (Works only if you have 'Write access" to the records) Please create an Excel-2003 format file with header as field-keys and rows containing record data. Extream Care is should be taken during bulk upload as previous values will be overwritten and lost.</p> -->
<hr style="margin-bottom: 10px;" />
<div class="row">
<div class="col-sm-3">
<p><strong>Get Format</strong></p>
<button type="submit" class="btn btn-success" onclick="getDataFormat();return false;"><i class="fa fa-download"></i> Get Format</button>
</div>
<div class="col-sm-9">
<p><strong>Upload File</strong></p>
<form method="POST" enctype="multipart/form-data" target="resultArea" action="import_excel" class="form-inline" id="upload_form">
<input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>" />
<div class="form-group">
<input type="file" class="form-control" name="file" required="required" />
</div>
<div class="form-group">
<button type="submit" class="btn btn-success"><i class="fa fa-upload"></i> Upload</button>
<p>
<iframe name=resultArea id="resultArea" style='width:0px;height:0px;display:none'></iframe>
</p>
</div>
</form>
<div id=ebulkuploadresult></div>
<div id=loadImg></div>
<div id=showsuccessmsg></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
function getDataFormat() {
window.open('getImportExcelFormat');
return false;
}
</script>
<script>
$(document).ready(function() {
// $('#instruction').popover({ title: "<b>Note</b>", content: '(Works only if you have "<b>Write access</b>" to the records)<br>Please create an <b>Excel 2007-2013</b> format file with header as field-keys and rows containing record data.<br><span style="color: #fb6e52;">Extream Care is should be taken during bulk upload as previous values will be overwritten and lost</span>', html: true, placement: "right", trigger: 'hover' });
// $('.reason').popover({ content: 'Click To Download Rejected Reasons', placement: "left", trigger: 'hover' });
$('#upload_form').on('submit', function(event) {
event.preventDefault();
$.ajax({
url: "import_excel",
method: "POST",
data: new FormData(this),
// dataType: 'JSON',
contentType: false,
cache: false,
processData: false,
beforeSend: function() {
$("#loadImg").prepend("<img src='assets/images/loading.gif' class='doajax_spinner' style='position:fixed;left:50%;top:50%;margin-left:-32px;margin-top:-32px;border:0;z-index:5000' width=64px height=64px border=0>");
},
success: function(data) {
data = $.parseJSON(data);
if (data.status == 'failure') {
simpleNotification('error', 'topRight', data.msg);
} else {
simpleNotification('success', 'topRight', data.msg);
}
$("#loadImg").html("");
document.getElementById("upload_form").reset();
},
})
});
$('#fileSummaryTable').DataTable({
"paging": false,
"info": false,
"searching": false
});
});
</script>
\ No newline at end of file
<div id="content">
<div class="layout-app" style="visibility: visible; display: block;">
<div class="row">
<div class="col-sm-12">
<div class="col-separator col-separator-first box col-unscrollable">
<div class="tab_generic" style="padding: 10px;">
<h4>Settings</h4>
<hr style="margin-bottom: 10px;">
<div class="row">
<div class="col-sm-12">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active">
<a href="#settingThemeArea" aria-controls="settingThemeArea" role="tab" data-toggle="tab">Themes</a>
</li>
<?php if(Auth::user()->username == 'admin'): ?>
<li role="presentation">
<a href="#settingSeatCount" aria-controls="settingSeatCount" role="tab" data-toggle="tab">Seat Count</a>
</li>
<?php endif; ?>
<!-- <li role="presentation">
<a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">Profile</a>
</li>
<li role="presentation">
<a href="#messages" aria-controls="messages" role="tab" data-toggle="tab">Messages</a>
</li>
<li role="presentation">
<a href="#settings" aria-controls="settings" role="tab" data-toggle="tab">Settings</a>
</li> -->
</ul>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="settingThemeArea">
<?php echo $__env->make('layout.module.setting.theme', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
</div>
<?php if(Auth::user()->username == 'admin'): ?>
<div role="tabpanel" class="tab-pane active" id="settingSeatCount">
<?php echo $__env->make('layout.module.setting.seatCount', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
</div>
<?php endif; ?>
<!-- <div role="tabpanel" class="tab-pane" id="profile">
</div>
<div role="tabpanel" class="tab-pane" id="messages">
</div>
<div role="tabpanel" class="tab-pane" id="settings">
</div> -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
<div class="layout-app">
<div class="row error">
<div class="col-md-4 col-md-offset-1 pull-left">
<div class="center">
<img src="assets/images/error-icon-bucket.png " class="img-responsive error-icon"/>
</div>
</div>
<div class="col-md-5 content pull-left" style='margin-top:10%'>
<h1 class="strong">Oops!</h1>
<h4 class="innerB">No Access!!</h4>
<div class="well">You dont have access to view this page. (<?php echo $value; ?>).</div>
</div>
</div>
</div>
<style>
.heading-buttons h4{
line-height:20px;
}
</style>
<div class="layout-app"><!-- row-app -->
<div class="row row-app">
<!-- col -->
<div class="col-md-12">
<!-- col-separator.box -->
<div class="col-separator col-separator-first col-unscrollable box">
<!-- col-table -->
<div class="col-table" id=authorworkspacediv>
<!-- Search Bar -->
<div class="input-group">
<input type="text" class="form-control" placeholder="Search for Users..." id=adminu_Search>
<span class="input-group-btn">
<button class="btn btn-primary rounded-none" type="button" onclick="adminSearchUser();return false"><i class="fa fa-search"></i></button>
</span>
</div>
<div class="col-separator-h"></div>
<!-- End Search Bar -->
<div class="col-table-row">
<div class="col-app col-unscrollable">
<div class="col-app">
<div class="row-app">
<div class="col-md-6">
<div class="col-separator">
<!-- Category Heading -->
<div class="heading-buttons bg-gray border-bottom innerR half">
<a href="#" class="btn btn-sm btn-inverse pull-right" onclick="doAjax('user/create','','userformdiv','ajax_users_create','singlethis','GET');return false"><i class="fa fa-plus fa-fw"></i> New User</a>
<h4 class="innerTB margin-bottom-none">Users</h4>
<div class="clearfix"></div>
</div>
<!-- End Category Heading -->
<?php echo $userlist->render(); ?>
<?php foreach ($userlist as $tuser)
{
$tphoto=$tuser->fetchphotothumb();
?>
<!-- Category Listing -->
<div class="row innerAll half border-bottom bg-gray-hover">
<div class="col-sm-6 col-xs-8">
<ul class="media-list margin-none">
<li class="media">
<a class="pull-left innerAll" href="#" onclick="doAjax('user/<?php echo $tuser->id; ?>/edit','','userformdiv','ajax_users_create','singlethis','GET');return false;">
<span class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i></span>
</a>
<a class="pull-left innerAll" href="#" onclick="doAjax('user/<?php echo $tuser->id; ?>','','userformdiv','ajax_users_delete','singlethis','DELETE');return false;">
<span class="btn btn-primary btn-xs"><i class="fa fa-trash-o"></i></span>
</a>
<div class="media-body">
<div class="innerAll">
<h5 class=""><a href="#" class="media-heading text-primary">Modules</a></h5>
<div class="clearfix"></div>
<small class="margin-none label label-inverse">Social</small>
<small class="margin-none label label-inverse">HR</small>
<small class="margin-none label label-inverse">Reports</small>
<small class="margin-none label label-inverse">CRM</small>
</div>
</div>
</li>
</ul>
</div>
<div class="col-sm-3 col-xs-4">
<div class="text-center">
<p class="strong">Tasks</p>
<span class="badge badge-primary" data-toggle="tooltip" data-title="Published" data-placement="left" data-container="body">0</span>
<span class="badge badge-primary badge-stroke" data-toggle="tooltip" data-title="Subscribed" data-placement="right" data-container="body">0</span>
</div>
</div>
<div class="col-sm-3 col-xs-hidden">
<div class="innerAll">
<div class="media">
<a href="#" class="pull-left">
<img src="<?php echo $tphoto; ?>" class="media-object" width=35px />
</a>
<div class="media-body">
<a href="#" class="text-small" title='<?php echo $tuser->id; ?> - <?php echo $tuser->created_at; ?>' onclick="doAjax('user/<?php echo $tuser->id; ?>/edit','','userformdiv','ajax_users_create','singlethis','GET');return false;"><?php echo $tuser->dispname(); ?></a>
<div class="clearfix"></div>
<small>
<?php if($tuser->status=="Active"): ?>
<span class="label label-success"><?php echo $tuser->status; ?></span>
<?php elseif($tuser->status=="Disabled"): ?>
<span class="label label-warning"><?php echo $tuser->status; ?></span>
<?php elseif($tuser->status=="Unverified"): ?>
<span class="label label-warning"><?php echo $tuser->status; ?></span>
<?php elseif($tuser->status=="Blocked"): ?>
<span class="label label-important"><?php echo $tuser->status; ?></span>
<?php endif; ?>
</small>
</div>
</div>
</div>
</div>
</div>
<!-- // END Category Listing -->
<?php } ?>
<?php echo $userlist->render(); ?>
</div>
<!-- // END col-separator -->
</div>
<!-- // END col -->
<!-- col -->
<div class="col-md-6">
<!-- col-separator -->
<div class="col-separator col-separator-last" id=userformdiv>
</div>
<!-- // END col-separator -->
</div>
<!-- // END col-table -->
</div>
<!-- // END col-separator.box -->
</div>
<!-- // END col -->
</div>
<!-- // END row-app -->
</div>
<script>
$(".pagination a").click(function(e){
e.preventDefault();
var url=$(this).attr("href");
var res = url.split("page=");
menuAction("user?page="+res[1]);
return false;
});
function adminSearchUser()
{
doAjax('user?search='+$('#adminu_Search').val(),'','content','ajax_users_create','singlethis','GET');
}
</script>
\ No newline at end of file
<?php
$data=Auth::user()->dataval('personal');
if(empty($data['location']))$data['location']="";
?>
<div class="bg-white">
<div class="profile-avatar">
<div class="text-center">
<img src="<?php echo $myphoto; ?>" width="380" class="img-responsive thumb" onmouseover="photobuttonselect(0);" onmouseout="photobuttonselect(1);" />
<div class="btn-avatar btn-group btn-group-xs" id=mypotochangebutton style='visibility:hidden' onmouseover="photobuttonselect(0);">
<!--<a href="#" class="btn"><i class="fa fa-pencil"></i> change</a>-->
<form method=post enctype="multipart/form-data" target=fileupload_social id=photoform action=social?stype=photo>
<input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>" />
<div class="fileupload fileupload-new margin-none" data-provides="fileupload">
<span class="btn btn-default btn-file" style='padding:0px 4px 2px 4px;'><i class="fa fa-pencil"></i>
<span class="fileupload-new">change</span><span class="fileupload-exists">Change</span>
<input type="file" class="margin-none" name=photo onchange='simpleNotification("warning","topRight","Uploading photo please wait..");$("#photoform").submit();return false;' id=social_photo />
</span>
<span class="fileupload-preview" style='display:none'></span>
<a href="#" class="close fileupload-exists" data-dismiss="fileupload" style="float: none;display:none">&times;</a>
</div>
</form>
<!-- <a href="#" class="btn"><i class="fa fa-cog"></i></a> -->
</div>
</div>
</div>
<div class="innerAll">
<h4><!--<?php echo $displayname; ?> <span class=pull-right>--><!--<i class="fa fa-flag"></i>-->
<!-- <i class="fa fa-square text-primary" style='font-size:8px'></i>
<i class="fa fa-square text-primary" style='font-size:12px'></i>
<i class="fa fa-square text-primary" style='font-size:16px'></i> <?php echo Auth::user()->getedupoints(); ?>--><!--</span>-->
<!--
<div class="dropdown pull-right dropdown-icons dropdown-icons-xs">
<a data-toggle="dropdown" href="#" class="btn btn-default btn-stroke btn-circle dropdown-toggle"><i class="fa fa-circle text-success"></i></a>
<ul class="dropdown-menu">
<li data-toggle="tooltip" data-title="Online" data-placement="left" data-container="body"><a href="#" onclick='return false;'><i class="fa fa-circle text-success"></i></a></li>
<li data-toggle="tooltip" data-title="Offline" data-placement="left" data-container="body"><a href="#" onclick='return false;'><i class="fa fa-circle text-error"></i></a></li>
</ul>
</div>
-->
</h4>
<!-- <p class="margin-none textCapitialize pull-right"><?php echo Auth::user()->usertype; ?>, <?php echo $data['location']; ?> </p> -->
<div class="clearfix"></div>
</div>
</div>
<iframe name=fileupload_social id=fileupload_social style='height:0px;width:0px;overflow:none;display:none' src='about:blank'></iframe>
<script>
function photobuttonselect(state)
{
if(state==0)
{
$('#mypotochangebutton').css({'visibility':'visible'});
}
if(state==1)
{
$('#mypotochangebutton').css({'visibility':'hidden'});
}
}
</script>
\ No newline at end of file
<?php echo $__env->make('layout.header', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php echo $__env->yieldContent('main_menu'); ?>
<?php echo $__env->yieldContent('top_menu'); ?>
<!-- Main Container Fluid -->
<div class="container-fluid">
<div id='absolutedivcontent' style='z-index:1;position:absolute;display:none'></div>
<div id="content">
<?php echo $__env->yieldContent('main_content'); ?>
</div>
<div class="clearfix"></div>
<div id="footer" class="hidden-print" style='display:none'>
<div class="copy">v<?php echo Config::get('app.app_version'); ?></div>
</div>
<!-- // Footer END -->
</div>
<!-- // Main Container Fluid END -->
<?php echo $__env->make('layout.footer', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php echo $__env->make('layout.header', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<div class="layout-app"><!-- row-app -->
<div class="row row-app">
<!-- col -->
<!-- col-separator.box -->
<div class="col-separator col-unscrollable box">
<!-- col-table -->
<div class="col-table">
<h4 class="innerAll margin-none border-bottom text-center"><i class="fa fa-lock"></i></h4>
<!-- col-table-row -->
<div class="col-table-row">
<!-- col-app -->
<div class="col-app col-unscrollable">
<!-- col-app -->
<div class="col-app">
<div class="login">
<div class="panel panel-default col-sm-6 col-sm-offset-3">
<div class="panel-body">
<div id='alertdiv'>
<?php
$class="warning";
$type="Idle";
$msg="Application is Idle";
?>
<!-- Alert -->
<div class="alert alert-<?php echo $class; ?>">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<strong><?php echo $type; ?></strong> <?php echo $msg; ?>
</div>
<!-- // Alert END -->
</div>
<button type="submit" class="btn btn-primary btn-block" onclick='document.location="login";'>Back To Application</button>
</div>
<!-- <div class="col-sm-2 col-sm-4 col-sm-offset-4 text-center">
<a href="signup" class="btn btn-info">Create a new account? <i class="fa fa-pencil"></i> </a>
</div>-->
</div>
</div>
<!-- // END col-app -->
</div>
<!-- // END col-app.col-unscrollable -->
</div>
<!-- // END col-table-row -->
</div>
<!-- // END col-table -->
</div>
<!-- // END col-separator.box -->
</div>
<!-- // END row-app -->
</body>
</html>
<div class="layout-app">
<div class="row error">
<div class="col-md-4 col-md-offset-1 pull-left">
<div class="center">
<img src="assets/images/error-icon-bucket.png " class="img-responsive error-icon"/>
</div>
</div>
<div class="col-md-5 content pull-left" style='margin-top:10%'>
<h1 class="strong">Oops!</h1>
<h4 class="innerB">Not Found!!</h4>
<div class="well">The path you are trying to visit does not exist...</div>
</div>
</div>
</div>
<?php $user=Auth::user(); ?>
<style>
.label label-small pull-right{float: right;width: 20px;text-align: center;color: #fff;border-radius: 50%;line-height: 20px;font-size: 10px;font-weight: 900;}
.label label-small pull-right a{color: #fff !important;}
.notify_alert{height:25px;}
.wgt{background: none repeat scroll 0 0 #ffffff;border: 1px solid #f6f7fb;margin: 0 auto 10px;position: relative;}
.wgt-head{background: none repeat scroll 0 0 #f6f7fb;border-bottom: 1px solid #f6f7fb;height: 35px;line-height: 35px;overflow: hidden;padding: 0 10px 0 0;position: relative;}
.wgt .wgt-body{padding: 10px;}
.wgt p{font-size:12px;color:#656d78;}
.wgt label{font-weight:600;color:#5d9cec;}
.wgt a{color: #656d78;}
.wgt a:hover{color:#434a54;}
.list_n{font-size:12px}
.list_n li{padding:3px 0;}
.list_n li a{color: #656d78;}
.list_n li a:hover{color:#434a54;}
.tab_generic{background: none repeat scroll 0 0 #ffffff;border-radius: 5px;margin: 0 0 10px;padding: 10px 5px;position: relative;}
.tab_bar_new{border: 1px solid #EFEFEF;height: 39px;margin: 0 0 10px;overflow: hidden;position: relative;}
.tab_bar_new ul{list-style: none outside none;margin: 0;padding: 0;background:#ed5564;}
.tab_bar_new ul li{border: medium none;height: 39px;padding: 0;display: block;float: left;}
.tab_bar_new ul li a{background: none repeat scroll 0 0 rgba(0, 0, 0, 0);height: 39px;line-height: 39px;display: block;padding: 0 15px;text-decoration: none;color:#fff;}
.tab_bar_new ul li.active{background: none repeat scroll 0 0 #fff;}
.tab_bar_new ul li.active a{color:#ed5564;}
.legend_notify{float: right;font-size: 12px;font-weight: 600;margin-right: 20px;}
.legend_notify a{background-color: #ed5564;color: #fff;border-radius: 20px;padding: 5px 10px;margin-left: 5px;cursor:default;}
.task_numberx a{color:#fff;background:#fff;font-size: 10px;padding: 5px 10px;border-radius: 20px;font-weight:900;}
.task_numberx a:hover{background:#ed5564;color:#f6f7fb;}
.hasDatepicker{width: 20%;}
.progress{height:10px;}
</style>
<div class="layout-app">
<div class="row row-app">
<div class="col-md-12">
<div class="col-separator col-separator-first col-unscrollable box">
<div class="">
<div class="relativeWrap" >
<div class="tab_generic" style='padding:0px;margin:0px;min-height:500px;'>
<?php
$firstdash="";$dashcnt=0;$headerstr="";
$modules=array();$active="active";
foreach(Config::get("app.app_modules") as $mname=>$module)
{
if($user->moduleACL($mname,true,false,false))
{
if($module['dash']!="")
{
$modules[$mname]=$module;
$headerstr.="<li class='$active'><a href='#DashletT-$mname' onclick='dashReload(\"$mname\");' data-toggle='tab'>$module[dash]</a></li>";
$active="";$dashcnt++;if($firstdash=="")$firstdash=$mname;
}
}
}
?>
<div class="tab_bar_new tabsbar-2" style='<?php if($dashcnt<=1)echo "display:none"; ?>'>
<ul class="row row-merge" style='background:#9CBFFF'>
<?php echo $headerstr; ?>
</ul>
</div>
<div class="tab-content">
<?php
$active="active";
foreach($modules as $mname=>$module)
{
if($user->moduleACL($mname,true,false,false))
{
?>
<div class="tab-pane <?php echo $active; ?> innerAll" id=DashletT-<?php echo $mname; ?>></div>
<?php
$active="";
}
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
function dashReload(dashlet)
{
doAjax("dashboard/dashlet?module="+dashlet,"","DashletT-"+dashlet,"ajax_dashlet_"+dashlet,"singlefail","GET");
}
dashReload('<?php echo $firstdash; ?>');
</script>
\ No newline at end of file
<div id="content">
<div class="layout-app" style="visibility: visible; display: block;">
<div class="row">
<div class="col-sm-12">
<div class="col-separator col-separator-first box col-unscrollable">
<div class="tab_generic" style="padding: 10px;">
<h4>Settings</h4>
<hr style="margin-bottom: 10px;">
<div class="row">
<div class="col-sm-12">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active">
<a href="#settingThemeArea" aria-controls="settingThemeArea" role="tab" data-toggle="tab">Themes</a>
</li>
<?php if(Auth::user()->username == 'admin'): ?>
<li role="presentation">
<a href="#settingSeatCount" aria-controls="settingSeatCount" role="tab" data-toggle="tab">Seat Count</a>
</li>
<?php endif; ?>
<!-- <li role="presentation">
<a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">Profile</a>
</li>
<li role="presentation">
<a href="#messages" aria-controls="messages" role="tab" data-toggle="tab">Messages</a>
</li>
<li role="presentation">
<a href="#settings" aria-controls="settings" role="tab" data-toggle="tab">Settings</a>
</li> -->
</ul>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="settingThemeArea">
<?php echo $__env->make('layout.module.setting.theme', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
</div>
<?php if(Auth::user()->username == 'admin'): ?>
<div role="tabpanel" class="tab-pane active" id="settingSeatCount">
<?php echo $__env->make('layout.module.setting.seatCount', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
</div>
<?php endif; ?>
<!-- <div role="tabpanel" class="tab-pane" id="profile">
</div>
<div role="tabpanel" class="tab-pane" id="messages">
</div>
<div role="tabpanel" class="tab-pane" id="settings">
</div> -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
<?php
$themes = explode(",",env('themes'));
if($userCurrentTheme != ""){
if(!in_array($userCurrentTheme, $themes)){$userCurrentTheme = "Default";}
}else{ $userCurrentTheme = "Default"; }
?>
<?php if(isset($response)): ?>
<script>
simpleNotification("<?php echo e($response['type']); ?>","topRight","<?php echo e($response['message']); ?>");
<?php if($response['type'] == "success"): ?>
setTimeout(function(){ window.location.reload(); }, 1000);
<?php endif; ?>
</script>
<?php endif; ?>
<h4>Select Theme <span class="pull-right"><small>Current Theme - </small><?php echo e($userCurrentTheme); ?></span></h4>
<hr style="margin-bottom: 10px;">
<div class="row">
<?php foreach($themes as $theme): ?>
<div class="col-sm-3">
<div class="themeBox" style="<?php echo e($theme == $userCurrentTheme ? 'border:1px solid #f30;background-color: #ffe9e9' : ''); ?>">
<h4><?php echo e($theme); ?>
<?php if($theme == $userCurrentTheme): ?>
<span class="pull-right label label-primary btn-xs">Current Theme</span>
<?php else: ?>
<button class="pull-right btn btn-success btn-xs" onclick="changeTheme('<?php echo e($theme); ?>');return false;">Select Theme</button>
<?php endif; ?>
</h4>
<hr style="margin-top: 10px;margin-bottom: 5px;">
<div class="text-center">
<img src="<?php echo e(URL::to('assets/themes/'.$theme.'.png')); ?>" class="img-responsive" alt="" />
</div>
</div>
</div>
<?php endforeach; ?>
</div>
<style>
.themeBox{margin: 10px;padding: 10px !important;border:1px solid #eee;border-radius: 5px;}
.themeBox:hover{background-color: #eee;}
</style>
<script type="text/javascript">
function changeTheme(value){
doAjax('setting/theme?name='+value,'','settingThemeArea','','singlethis','GET');
}
</script>
\ No newline at end of file
<?php $user=Auth::user(); ?>
<style>
.label label-small pull-right{float: right;width: 20px;text-align: center;color: #fff;border-radius: 50%;line-height: 20px;font-size: 10px;font-weight: 900;}
.label label-small pull-right a{color: #fff !important;}
.notify_alert{height:25px;}
.wgt{background: none repeat scroll 0 0 #ffffff;border: 1px solid #f6f7fb;margin: 0 auto 10px;position: relative;}
.wgt-head{background: none repeat scroll 0 0 #f6f7fb;border-bottom: 1px solid #f6f7fb;height: 35px;line-height: 35px;overflow: hidden;padding: 0 10px 0 0;position: relative;}
.wgt .wgt-body{padding: 10px;}
.wgt p{font-size:12px;color:#656d78;}
.wgt label{font-weight:600;color:#5d9cec;}
.wgt a{color: #656d78;}
.wgt a:hover{color:#434a54;}
.list_n{font-size:12px}
.list_n li{padding:3px 0;}
.list_n li a{color: #656d78;}
.list_n li a:hover{color:#434a54;}
.tab_generic{background: none repeat scroll 0 0 #ffffff;border-radius: 5px;margin: 0 0 10px;padding: 10px 5px;position: relative;}
.tab_bar_new{border: 1px solid #EFEFEF;height: 39px;margin: 0 0 10px;overflow: hidden;position: relative;}
.tab_bar_new ul{list-style: none outside none;margin: 0;padding: 0;background:#ed5564;}
.tab_bar_new ul li{border: medium none;height: 39px;padding: 0;display: block;float: left;}
.tab_bar_new ul li a{background: none repeat scroll 0 0 rgba(0, 0, 0, 0);height: 39px;line-height: 39px;display: block;padding: 0 15px;text-decoration: none;color:#fff;}
.tab_bar_new ul li.active{background: none repeat scroll 0 0 #fff;}
.tab_bar_new ul li.active a{color:#ed5564;}
.legend_notify{float: right;font-size: 12px;font-weight: 600;margin-right: 20px;}
.legend_notify a{background-color: #ed5564;color: #fff;border-radius: 20px;padding: 5px 10px;margin-left: 5px;cursor:default;}
.task_numberx a{color:#fff;background:#fff;font-size: 10px;padding: 5px 10px;border-radius: 20px;font-weight:900;}
.task_numberx a:hover{background:#ed5564;color:#f6f7fb;}
.hasDatepicker{width: 20%;}
.progress{height:10px;}
</style>
<div class="layout-app">
<div class="row row-app">
<div class="col-md-12">
<div class="col-separator col-separator-first col-unscrollable box">
<div class="">
<div class="relativeWrap" >
<div class="tab_generic" style='padding:0px;margin:0px;min-height:500px;'>
<?php
$firstdash="";$dashcnt=0;$headerstr="";
$modules=array();$active="active";
foreach(Config::get("app.app_modules") as $mname=>$module)
{
if($user->moduleACL($mname,true,false,false))
{
if($module['dash']!="")
{
$modules[$mname]=$module;
$headerstr.="<li class='$active'><a href='#DashletT-$mname' onclick='dashReload(\"$mname\");' data-toggle='tab'>$module[dash]</a></li>";
$active="";$dashcnt++;if($firstdash=="")$firstdash=$mname;
}
}
}
?>
<div class="tab_bar_new tabsbar-2" style='<?php if($dashcnt<=1)echo "display:none"; ?>'>
<ul class="row row-merge" style='background:#9CBFFF'>
<?php echo $headerstr; ?>
</ul>
</div>
<div class="tab-content">
<?php
$active="active";
foreach($modules as $mname=>$module)
{
if($user->moduleACL($mname,true,false,false))
{
?>
<div class="tab-pane <?php echo $active; ?> innerAll" id=DashletT-<?php echo $mname; ?>></div>
<?php
$active="";
}
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
function dashReload(dashlet)
{
doAjax("dashboard/dashlet?module="+dashlet,"","DashletT-"+dashlet,"ajax_dashlet_"+dashlet,"singlefail","GET");
}
dashReload('<?php echo $firstdash; ?>');
</script>
\ No newline at end of file
<?php
$reportTitle = 'Productivity Report';
$returnblade = 'productivity';
$view_path = Config::get('view.paths');
include_once($view_path[0].'/layout/module/dialer/reporthead.blade.php');
$alist=$alist->get();
$i=1;
$reporthead=array("#","Telecaller","TelecallerID","Supervisor","Customers","Total");
$reportarray=array();
foreach($alist as $aline)
{
$tuser=$userarr[$aline->user_id];
if(!isset($reportarray[$aline->user_id]))$reportarray[$aline->user_id]=array("#"=>$i++,"Telecaller"=>$tuser->telecaller,"TelecallerID"=>$tuser->username,"Supervisor"=>$tuser->sepervisor,"Customers"=>0,"Total"=>0,"Customer_lists"=>array());
if(!is_null($aline->lan)) {
$reportarray[$aline->user_id]["Customer_lists"][] = $aline->lan;
}
$reportarray[$aline->user_id]["Customers"] = count(array_unique($reportarray[$aline->user_id]["Customer_lists"]));
$reportarray[$aline->user_id]["Total"]++;
//$ststr=$aline->userstatus."-".$aline->usersubstatus;
$ststr=$aline->resultCode;
if(!in_array($ststr,$reporthead))$reporthead[]=$ststr;
$reportarray[$aline->user_id][$ststr]++;
if($aline->userstatus == 'Contacted' && trim($ststr) != '') {
$reportarray[$aline->user_id]['Contacted']++;
}
}
$highestColumn = sizeof($reporthead);
if(count($reportarray)) {
$outhead="<tr>";$outstr="";
for ($head = 0; $head < $highestColumn; $head++){
if($reporthead[$head] == '#' && false) {
$mode_str = "<a onclick='displayMode(".'"summation"'.");return false;' href='#'><i class='fa fa-plus-square-o'></i></a> / <a onclick='displayMode(".'"percent"'.");return false;' href='#'>%</a>";
$outhead.="<td>".$mode_str."</td>";
}
else {
$outhead.="<td>".$reporthead[$head]."</td>";
}
}
$outhead.="</tr>";
$utotalarr = array("Telecaller"=>'Total');
foreach($reportarray as $uid=>$uarr)
{
$outstr.="<tr>";
for ($head = 0; $head < $highestColumn; $head++){
if($head < 4) {
$data_str = $uarr[$reporthead[$head]];
}
elseif($head < 5) {
$data_str = $uarr[$reporthead[$head]];
$utotalarr[$reporthead[$head]] += $uarr[$reporthead[$head]];
}
else {
$total_val = ($reporthead[$head] != 'PTP') ? $uarr['Total'] : $uarr['Contacted'];
$data_str = '<span class="summation" style="display:block;">'.$uarr[$reporthead[$head]].'</span>';
$data_str .= '<span class="percent" style="display:none;">'.number_format(@($uarr[$reporthead[$head]]/$total_val) * 100).'%</span>';
$data_str = '<a href="#" onclick="breakupXls(\'productivity\',\''.$uid.'\',\''.$reporthead[$head].'\')">' . $data_str . '</a>';
$utotalarr[$reporthead[$head]] += $uarr[$reporthead[$head]];
}
$outstr.="<td>".$data_str."</td>";
}
$outstr.="</tr>";
}
$outstr.="<tr>";
for ($head = 0; $head < $highestColumn; $head++)
{
if($head < 5) {
$data_str = $utotalarr[$reporthead[$head]];
}
else {
$data_str = '<span class="summation" style="display:block;">'.$utotalarr[$reporthead[$head]].'</span>';
$data_str .= '<span class="percent" style="display:none;">'.number_format(@($utotalarr[$reporthead[$head]]/$utotalarr['Total']) * 100).'%</span>';
$data_str = '<a href="#" onclick="breakupXls(\'productivity\',\'All\',\''.$reporthead[$head].'\')">' . $data_str . '</a>';
}
$outstr.="<td>".$data_str."</td>";
}
$outstr.="</tr>";
}
else {
$outhead.="<tr><td>No Records Found.</td></tr>";
}
if(Input::has("dllogxls"))
{
include_once(app_path().'/lib/phpexcel/PHPExcel.php');
$inputFileType = "Excel5";
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$objPHPExcel = $objReader->load("assets/extras/blank.xls");
$baseRow = 2;
$highestColumn = sizeof($reporthead);
for ($head = 0; $head < $highestColumn; $head++){
$colstr=PHPExcel_Cell::stringFromColumnIndex($head);
$objPHPExcel->getActiveSheet()->setCellValue($colstr."1", $reporthead[$head]);
}
foreach($reportarray as $uid=>$uarr)
{
$row = $baseRow++;
$col = 0;
for ($head = 0; $head < $highestColumn; $head++){
$colstr=PHPExcel_Cell::stringFromColumnIndex($head);
$objPHPExcel->getActiveSheet()->setCellValue($colstr.$row, $uarr[$reporthead[$head]]);
}
}
$row++;
for ($head = 0; $head < $highestColumn; $head++){
$colstr=PHPExcel_Cell::stringFromColumnIndex($head);
$objPHPExcel->getActiveSheet()->setCellValue($colstr.$row, $utotalarr[$reporthead[$head]]);
}
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="Productivity.xls"');
header('Cache-Control: max-age=0');
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, $inputFileType);
$objWriter->save('php://output');
return ;
}
//charts
$cat1=array();
$cat1arr=array();
foreach($reportarray as $uid=>$uarr)
{
$cat1[]="'$uarr[Telecaller]'";
for ($head = 6; $head < $highestColumn; $head++){
if(!isset($cat1arr[$reporthead[$head]]))$cat1arr[$reporthead[$head]]=array();
$cat1arr[$reporthead[$head]][$uarr["#"]]=round($uarr[$reporthead[$head]],1);
if(empty($cat1arr[$reporthead[$head]][$uarr["#"]]))$cat1arr[$reporthead[$head]][$uarr["#"]]=0;
}
}
$cat1arrstr="";
foreach($cat1arr as $name=>$data)
{
$extra="";if($name=="InboundDROP-InboundDROP")$extra=",visible: false";
$cat1arrstr.="{ name: '$name',\ndata : [";
$cat1arrstr.=implode(",",$data);
$cat1arrstr.="] $extra },\n";
}
$cat2=array();
foreach($reportarray as $uid=>$uarr)
{
for ($head = 6; $head < $highestColumn; $head++){
$cat2["'".$reporthead[$head]."'"]+=round($uarr[$reporthead[$head]],1);
}
}
?>
<?php echo $__env->make('layout.module.dialer.searchform', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<div class=col-md-6 style='border:1px solid #BBB;'>
<div id=userlogschart1 style='min-height:250px;width:100%'></div>
</div>
<div class=col-md-6 style='border:1px solid #BBB;'>
<div id=userlogschart2 style='min-height:250px;width:100%'></div>
</div>
<div style='clear:both'></div>
<div style="overflow: auto; margin-top: 10px;">
<table id=logtable class='footable table table-striped table-bordered table-white table-primary footable-loaded' style='font-size:12px; margin:0; border:1px solid #BBB;'>
<thead><?php echo $outhead; ?></thead>
<?php echo $outstr; ?>
</table>
</div>
</div>
<script>
$(function () {
$('#userlogschart1').highcharts({
chart: {
type: 'column'
},
title: {
text: 'Userwise result count',
style: {
fontSize: '14px'
}
},
xAxis: {
labels:{
rotation: -45,
enabled:true//default is true
},
categories: [<?php echo implode(",",$cat1); ?>]
},
yAxis: {
min: 0,
title: {
text: ''
},
stackLabels: {
enabled: false,
}
},
tooltip: {
headerFormat: '<b>{point.x}</b><br/>',
pointFormat: '{series.name}: {point.y}<br/>Total: {point.stackTotal}'
},
plotOptions: {
column: {
stacking: 'normal',
dataLabels: {
enabled: false,
}
}
},
series: [<?php echo $cat1arrstr; ?>]
});
});
$(function () {
$('#userlogschart2').highcharts({
chart: {
type: 'column'
},
title: {
text: 'Resultwise count',
style: {
fontSize: '14px'
}
},
subtitle: {
text: ''
},
xAxis: {
categories: [<?php echo implode(",",array_keys($cat2)); ?>],
crosshair: true,
labels:{
enabled:true//default is true
},
},
yAxis: {
min: 0,
title: {
text: ''
}
},
tooltip: {
headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
'<td style="padding:0"><b>{point.y}</b></td></tr>',
footerFormat: '</table>',
shared: true,
useHTML: true
},
plotOptions: {
column: {
pointPadding: 0.2,
borderWidth: 0
}
},
series: [{
name: 'Count',
data: [<?php echo implode(",",array_values($cat2)); ?>]
},]
});
});
</script>
\ No newline at end of file
<!DOCTYPE html>
<html class="app">
<head>
<title><?php echo Config::get("app.name"); ?> - <?php echo Config::get('app.app_title'); ?></title>
<meta charset="UTF-8" />
<?php
$v=Config::get('app.app_version');
$vieportopt=explode(":",Config::get("app.kstych_viewportMeta"));
if(!isset($vieportopt[1]))$vieportopt[1]="1";
if(!isset($vieportopt[2]))$vieportopt[2]="1";
if($vieportopt[0]=="responsive"){ ?>
<meta name="viewport" content="width=device-width, initial-scale=<?php echo $vieportopt[1]; ?>, maximum-scale=<?php echo $vieportopt[2]; ?>">
<?php } ?>
<meta name="author" content="Buzzworks">
<?php if(isset($logo_s))$fico=$logo_s;else $fico="favicon.png"; ?>
<link rel="icon" href="<?php echo url('/'); ?>/custom/<?php echo $fico; ?>" type="image/x-icon" />
<link rel="shortcut icon" href="<?php echo url('/'); ?>/custom/<?php echo $fico; ?>" type="image/x-icon" />
<link rel="stylesheet" href="<?php echo url('/'); ?>/style?v=<?php echo $v; ?>" />
<script type="text/javascript" src="<?php echo url('/'); ?>/jshead?v=<?php echo $v; ?>"></script>
</head>
<body class="">
<div class="layout-app"><!-- row-app -->
<div class="row row-app">
<!-- col -->
<div class="col-md-2 col-sm-3">
<!-- col-separator -->
<div class="col-separator col-separator-first box col-unscrollable">
<!-- col-table -->
<div class="col-table" style='padding-left: 13px;padding-right: 13px;'>
<h4 class="innerAll margin-none border-bottom" style='background: #fff;'>Dialer Reports</h4>
<!-- col-table-row -->
<div class="col-table-row">
<!-- col-app -->
<div class="col-app col-unscrollable">
<!-- col-app -->
<div class="col-app">
<ul class="list-group list-group-1 margin-none borders-none dreports" style='padding-right: 26px;'>
<?php if(Auth::user()->moduleACL("Dialer",true,true,true)){ ?>
<li class="list-group-item w170p">
<a href="#" onclick="doAjax('dialer/liveusers','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Live</a>
</li>
<?php } ?>
<li class="list-group-item w170p">
<a href="#" onclick="doAjax('dialer/contactability','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Contactability</a>
</li>
<li class="list-group-item w170p">
<a href="#" onclick="doAjax('dialer/productivity','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Productivity</a>
</li>
<li class="list-group-item w170p">
<a href="#" onclick="doAjax('dialer/productivity_mis','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>TC Productivity MIS</a>
</li>
<li class="list-group-item w170p">
<a href="#" onclick="doAjax('dialer/nextaction','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Next Action</a>
</li>
<li class="list-group-item w170p">
<a href="#" onclick="doAjax('dialer/agenttime','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Agent Time</a>
</li>
<li class="list-group-item w170p">
<a href="#" onclick="doAjax('dialer/ic4trails','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>IC4 Trails</a>
</li>
<li class="list-group-item w170p">
<a href="#" onclick="doAjax('dialer/calllog','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Call</a>
</li>
<?php if(Auth::user()->usertype != "Telecaller"): ?>
<li class="list-group-item w170p">
<a href="#" onclick="doAjax('dialer/searchrecordings','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Recordings</a>
</li>
<?php endif; ?>
<?php if(Auth::user()->usertype == 'Admin'): ?>
<li class="list-group-item w170p">
<a href="#" onclick="doAjax('dialer/resourcehygiene','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>All server reports</a>
</li>
<li class="list-group-item w170p">
<a href="#" onclick="doAjax('dialer/agentperformance','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Agent Performance</a>
</li>
<li class="list-group-item w170p">
<a href="#" onclick="doAjax('dialer/campaignlevel','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Campaign Level</a>
</li>
<li class="list-group-item w170p">
<a href="#" onclick="doAjax('dialer/demo_agentperformance','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Demo Agent Performance</a>
</li>
<?php endif; ?>
<!-- <li class="list-group-item">
<a href="#" onclick="doAjax('dialer/agentreport','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Login</a>
</li>
<li class="list-group-item">
<a href="#" onclick="doAjax('dialer/campreport','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Time</a>
</li>
<li class="list-group-item">
<a href="#" onclick="doAjax('dialer/statusreport','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Status</a>
</li> -->
</ul>
</div>
<!-- // END col-app -->
</div>
<!-- // END col-app -->
</div>
<!-- // END col-table-row -->
</div>
<!-- // END col-table -->
</div>
<!-- // END col-separator.box -->
</div>
<!-- // END col -->
<!-- col -->
<div class="col-md-10 col-sm-9" style='border-right:13px solid #eaeaea'>
<!-- col-separator.box -->
<div class="col-separator col-unscrollable box">
<!-- col-table -->
<div class="col-table">
<!-- <h4 class="innerAll margin-none border-bottom">My Sessions</h4> -->
<!-- col-table-row -->
<div class="col-table-row" style='background: #fff;'>
<!-- col-app -->
<div class="col-app col-unscrollable">
<!-- col-app -->
<div class="col-app" style='position:relative'>
<div class="" id=rightmainreportdiv>
<script>
<?php if(Auth::user()->moduleACL("Dialer",true,true,true)){ ?>
doAjax('dialer/liveusers','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');
<?php }else { ?>
doAjax('dialer/calllog','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');
<?php } ?>
</script>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
<?php
$reportTitle = 'IC4 Trails';
$returnblade = 'ic4trails';
$view_path = Config::get('view.paths');
include_once($view_path[0].'/layout/module/dialer/reporthead.blade.php');
$alist=$alist->select(DB::raw("c.id, c.lan, c.number, c.user_id, c.created_at, c.action_code, c.resultCode, c.rfd, c.nextActionCode, c.nextActionDateTime, c.userremarks, c.upi, c.designation, c.adhar, c.data, c.recsize"));
$alist=$alist->get();
$i=1;
$reporthead=array("Account No.","Number","User Id","Action Date","Action Code","Result Code","RFD","Next Action","Next Action Date & Time","Remarks","UPI","Designation","Adhar");
$reportarray=array();
if (count($alist))
foreach($alist as $aline)
{
$tuser=$userarr[$aline->user_id];
$userData=json_decode($aline->data,true);
$recordingFolder = $userData['recFolder'];
$reportarray[$aline->id]=array(
"Account No."=>$aline->lan,
"Number"=>$aline->number,
"User Id"=>$tuser->username,
"Action Date"=>date('d.m.Y H:i',strtotime($aline->created_at)+(5*60*60)+(30*60)),
"Action Code"=>$aline->action_code,
"Next Action"=>$aline->nextActionCode,
"Result Code"=>$aline->resultCode,
"RFD"=>$aline->rfd,
"Next Action Date & Time"=> ($aline->nextActionDateTime != '0000-00-00 00:00:00') ? date('d.m.Y H:i',strtotime($aline->nextActionDateTime)) : '',
"Remarks" =>$aline->userremarks,
"UPI" =>$aline->upi,
"Designation" =>$aline->designation,
"Adhar" =>$aline->adhar,
"Recording ID"=>$aline->id,
"Recording Folder"=>$recordingFolder,
"Recording Size"=>$aline->recsize
);
}
if(Input::has("dllogxls"))
{
include_once(app_path().'/lib/phpexcel/PHPExcel.php');
$inputFileType = "CSV";
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$objPHPExcel = $objReader->load("assets/extras/blank.csv");
$baseRow = 2;
$exporthead = array_merge($reporthead, array("Promise Date 1","Promise Amount 1","Promise Date 2","Promise Amount 2","Promise Date 3","Promise Amount 3","Promise Date 4","Promise Amount 4","Promise Date 5","Promise Amount 5") );
$highestColumn = sizeof($exporthead);
for ($head = 0; $head < $highestColumn; $head++){
$colstr=PHPExcel_Cell::stringFromColumnIndex($head);
$objPHPExcel->getActiveSheet()->setCellValue($colstr."1", $exporthead[$head]);
}
$highestColumn = sizeof($reporthead);
foreach($reportarray as $uid=>$uarr)
{
$row = $baseRow++;
$col = 0;
for ($head = 0; $head < $highestColumn; $head++){
$colstr=PHPExcel_Cell::stringFromColumnIndex($head);
$objPHPExcel->getActiveSheet()->setCellValue($colstr.$row, $uarr[$reporthead[$head]]);
}
}
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="ic4trails.csv"');
header('Cache-Control: max-age=0');
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, $inputFileType);
$objWriter->save('php://output');
return ;
}
$highestColumn = sizeof($reporthead);
$exit = 1;
if(count($reportarray)) {
$outhead="<tr>";$outstr="";
for ($head = 0; $head < $highestColumn; $head++){
$outhead.="<td>".$reporthead[$head]."</td>";
}
$outhead.="</tr>";
$utotalarr = array("Telecaller"=>'Total');
foreach($reportarray as $uid=>$uarr)
{
$outstr.="<tr>";
for ($head = 0; $head < $highestColumn; $head++){
$outstr.="<td>".$uarr[$reporthead[$head]]."</td>";
}
$recstr='';
if($dashboarduser->moduleACL("Dialer",false,false,true))
{
if(isset($uarr['Recording Folder']))$recstr="<a href=# onclick='getCallRec(".$uarr['Recording ID'].");return false;' title='Size : ".round($uarr['Recording Size']/1024,0)." KB'><i class='fa fa-play-circle'></i> &nbsp;</a> ";
if(Auth::user()->usertype != "Telecaller" && isset($uarr['Recording Folder']))
$recstr.="<a href='dialer/playrecfile?calllog=".$uarr['Recording ID']."&out=wav' title=''><i class='fa fa-download'></i> &nbsp;</a><span id='recspan_".$uarr['Recording ID']."'</span>";
}
$outstr.="<td>$recstr</td>";
$outstr.="</tr>";
if($exit=="1000")break;
$exit++;
}
}
else {
$outhead.="<tr><td>No Records Found.</td></tr>";
}
?>
<?php echo $__env->make('layout.module.dialer.searchform', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<div style="overflow: auto; margin-top: 10px;">
<table id=logtable class='footable table table-striped table-bordered table-white table-primary footable-loaded' style='font-size:12px; margin:0; border:1px solid #BBB;'>
<thead><?php echo $outhead; ?></thead>
<?php echo $outstr; ?>
</table>
</div>
</div>
<script>
function getCallRec(id)
{
doAjax("dialer/calllog","getCallRec=1&calllog="+id,'recspan_'+id,'rec_ajax','singlefail','GET');
}
</script>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="robots" content="noindex,nofollow" />
<style>
html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}
html { background: #eee; padding: 10px }
img { border: 0; }
#sf-resetcontent { width:970px; margin:0 auto; }
.sf-reset { font: 11px Verdana, Arial, sans-serif; color: #333 }
.sf-reset .clear { clear:both; height:0; font-size:0; line-height:0; }
.sf-reset .clear_fix:after { display:block; height:0; clear:both; visibility:hidden; }
.sf-reset .clear_fix { display:inline-block; }
.sf-reset * html .clear_fix { height:1%; }
.sf-reset .clear_fix { display:block; }
.sf-reset, .sf-reset .block { margin: auto }
.sf-reset abbr { border-bottom: 1px dotted #000; cursor: help; }
.sf-reset p { font-size:14px; line-height:20px; color:#868686; padding-bottom:20px }
.sf-reset strong { font-weight:bold; }
.sf-reset a { color:#6c6159; }
.sf-reset a img { border:none; }
.sf-reset a:hover { text-decoration:underline; }
.sf-reset em { font-style:italic; }
.sf-reset h1, .sf-reset h2 { font: 20px Georgia, "Times New Roman", Times, serif }
.sf-reset h2 span { background-color: #fff; color: #333; padding: 6px; float: left; margin-right: 10px; }
.sf-reset .traces li { font-size:12px; padding: 2px 4px; list-style-type:decimal; margin-left:20px; }
.sf-reset .block { background-color:#FFFFFF; padding:10px 28px; margin-bottom:20px;
-webkit-border-bottom-right-radius: 16px;
-webkit-border-bottom-left-radius: 16px;
-moz-border-radius-bottomright: 16px;
-moz-border-radius-bottomleft: 16px;
border-bottom-right-radius: 16px;
border-bottom-left-radius: 16px;
border-bottom:1px solid #ccc;
border-right:1px solid #ccc;
border-left:1px solid #ccc;
}
.sf-reset .block_exception { background-color:#ddd; color: #333; padding:20px;
-webkit-border-top-left-radius: 16px;
-webkit-border-top-right-radius: 16px;
-moz-border-radius-topleft: 16px;
-moz-border-radius-topright: 16px;
border-top-left-radius: 16px;
border-top-right-radius: 16px;
border-top:1px solid #ccc;
border-right:1px solid #ccc;
border-left:1px solid #ccc;
overflow: hidden;
word-wrap: break-word;
}
.sf-reset li a { background:none; color:#868686; text-decoration:none; }
.sf-reset li a:hover { background:none; color:#313131; text-decoration:underline; }
.sf-reset ol { padding: 10px 0; }
.sf-reset h1 { background-color:#FFFFFF; padding: 15px 28px; margin-bottom: 20px;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
border: 1px solid #ccc;
}
</style>
</head>
<body>
<div id="sf-resetcontent" class="sf-reset">
<h1>Whoops, looks like something went wrong.</h1>
<div style='display:none'>___Kstych___x___Exception___</div>
</div>
</body>
</html>
This diff could not be displayed because it is too large.
<?php $__env->startSection('main_menu'); ?>
<?php echo $__env->make('layout.main_menu', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('top_menu'); ?>
<?php echo $__env->make('layout.top_menu', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('main_content'); ?>
<script>
$(document).ready(function(){
if(document.location.hash=="")doAjax("dashboard?tz="+(new Date()).getTimezoneOffset()+'&d=<?php echo Input::get("d"); ?>','','content','ajax_dashboard','singlethis','GET',function(){try{}catch(e){}});
else kstychHashFunction();
<?php if(Config::get("app.extAuth")!=""){ ?>doAjax("dashboard/r",'','','ajax_dashboard_r','singlethis','GET');<?php } ?>
if ($.browser.msie)document.location="msie";
if (typeof kDesktopNotification === 'function')kDesktopNotification("","","",10);
incomingPresense("","","");
});
if (navigator.userAgent.match(/(iPad|iPhone|iPod touch);.*CPU.*OS/i))
{
$("#menu-top").css({'padding-top':'20px','height':'60px'});
$("#content").css({'margin-top':'60px'});
}
document.addEventListener('deviceready', function() {
$(document).on('click', 'a[target="_system"],a[target="_blank"]', function (e) {
e.preventDefault();
var url = this.href;
if(navigator.app)navigator.app.loadUrl(url, { openExternal:true });
else if(innappbrowser)cordova.exec(function(){}, function(){}, "InAppBrowser", "open", [url, "_system", null]);
else window.open(url,"_system");
//$("#welcome_wizard_body").html("<iframe style='width:100%;min-height:400px;height:100%' src='"+url+"'></iframe>");
//$("#welcome_wizard").modal('show');
});
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layout.layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
\ No newline at end of file
<div class="layout-app"><!-- row-app -->
<div class="row row-app">
<!-- col -->
<div class="col-md-2 col-sm-3">
<!-- col-separator -->
<div class="col-separator col-separator-first box col-unscrollable">
<!-- col-table -->
<div class="col-table" style='padding-left: 13px;padding-right: 13px;'>
<h4 class="innerAll margin-none border-bottom" style='background: #fff;'>Admin Dashboard</h4>
<!-- col-table-row -->
<div class="col-table-row">
<!-- col-app -->
<div class="col-app col-unscrollable">
<!-- col-app -->
<div class="col-app">
<ul class="list-group list-group-1 margin-none borders-none" style='padding-right: 26px;'>
<li class="list-group-item">
<a href="#" onclick="doAjax('admin/main','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i> Main</a>
</li>
<li class="list-group-item">
<a href="#" onclick="doAjax('admin/agentreport','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i> Login</a>
</li>
<li class="list-group-item">
<a href="#" onclick="doAjax('admin/liveusers','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i> Live</a>
</li>
<!-- <li class="list-group-item">
<a href="#" onclick="doAjax('admin/recarchive','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i> Recordings</a>
</li>-->
</ul>
</div>
<!-- // END col-app -->
</div>
<!-- // END col-app -->
</div>
<!-- // END col-table-row -->
</div>
<!-- // END col-table -->
</div>
<!-- // END col-separator.box -->
</div>
<!-- // END col -->
<!-- col -->
<div class="col-md-10 col-sm-9" style='border-right:13px solid #eaeaea'>
<!-- col-separator.box -->
<div class="col-separator col-unscrollable box">
<!-- col-table -->
<div class="col-table">
<!-- <h4 class="innerAll margin-none border-bottom">My Sessions</h4> -->
<!-- col-table-row -->
<div class="col-table-row" style='background: #fff;'>
<!-- col-app -->
<div class="col-app col-unscrollable">
<!-- col-app -->
<div class="col-app" style='position:relative'>
<div class="" id=rightmainreportdiv>
<script>
doAjax('admin/main','','rightmainreportdiv','ajax_admin_reports','singlethis','GET');
</script>
</div>
</div>
<!-- // END col-app -->
</div>
<!-- // END col-app.col-unscrollable -->
</div>
<!-- // END col-table-row -->
</div>
<!-- // END col-table -->
</div>
<!-- // END col-separator.box -->
</div>
<!-- // END col -->
</div>
<!-- // END row-app -->
</div>
<?php
$client=Input::get("client");
$monthworkdays=base64_encode(Input::get("monthworkdays"));
$agencyfeesvalue=base64_encode(Input::get("agencyfeesvalue"));
$agencyfeefunction=base64_encode(Input::get("agencyfeefunction"));
$contractstartdate=base64_encode(Input::get("contractstartdate"));
$contractenddate=base64_encode(Input::get("contractenddate"));
$insurancerequired=base64_encode(Input::get("insurancerequired"));
$servicedby=base64_encode(Input::get("servicedby"));
$contactname=base64_encode(Input::get("contactname"));
$contactemail=base64_encode(Input::get("contactemail"));
$contactphone=base64_encode(Input::get("contactphone"));
$hrsendfiles=base64_encode(Input::get("hrsendfiles"));
$contactnameacct=base64_encode(Input::get("contactnameacct"));
$contactemailacct=base64_encode(Input::get("contactemailacct"));
$contactphoneacct=base64_encode(Input::get("contactphoneacct"));
$offerletter=base64_encode($_POST["offerletter"]);
$confirmationletter=base64_encode($_POST["confirmationletter"]);
$promotionletter=base64_encode($_POST["promotionletter"]);
$appraisalletter=base64_encode($_POST["appraisalletter"]);
$warningletter=base64_encode($_POST["warningletter"]);
$terminationletter=base64_encode($_POST["terminationletter"]);
$nocletter=base64_encode($_POST["nocletter"]);
$experienceletter=base64_encode($_POST["experienceletter"]);
$endofserviceletter=base64_encode($_POST["endofserviceletter"]);
$yrmeternityleaves=base64_encode(Input::get("yrmeternityleaves"));
$yrsickleaves=base64_encode(Input::get("yrsickleaves"));
$yrannualleaves=base64_encode(Input::get("yrannualleaves"));
$yemaxcarryleaves=base64_encode(Input::get("yemaxcarryleaves"));
$trackerfields=base64_encode(Input::get("trackerfields"));
$campaignscript=base64_encode(Input::get("campaignscript"));
$did='';
$autodial='';
$voiceblaster='';
if(Input::get("dialer_did"))
$did="DialerDID=".Input::get("dialer_did");
if(Input::get("autodial_pacing"))
$autodial="autodialercampaign=".Input::get("autodial_pacing");
if(Input::get("vb_pacing"))
$voiceblaster="vbpace=".Input::get("vb_pacing");
else
$voiceblaster="vbpace=1";
$textmessage="textmessage=".Input::get("textmessage");
$mergedeveloperparam = $did."\n".$autodial."\n".$voiceblaster."\n".$textmessage;
$developerparam=base64_encode($mergedeveloperparam);
//$developerparam=base64_encode(str_replace('\n',"\n",Input::get("developerparam")));
$campaigncrmfields=Input::get("campaigncrmfields");
// code start - calling mode assign campaign wise functionality - by YASHWANT on 11042017
$campaignCallingMode=base64_encode(Input::get("campaignCallingMode"));
// code end - calling mode assign campaign wise functionality - by YASHWANT on 11042017
$mvalue ="monthworkdays~$monthworkdays|";
$mvalue.="agencyfeesvalue~$agencyfeesvalue|";
$mvalue.="agencyfeefunction~$agencyfeefunction|";
$mvalue.="contractstartdate~$contractstartdate|";
$mvalue.="contractenddate~$contractenddate|";
$mvalue.="insurancerequired~$insurancerequired|";
$mvalue.="servicedby~$servicedby|";
$mvalue.="contactname~$contactname|";
$mvalue.="contactemail~$contactemail|";
$mvalue.="contactphone~$contactphone|";
$mvalue.="hrsendfiles~$hrsendfiles|";
$mvalue.="contactnameacct~$contactnameacct|";
$mvalue.="contactemailacct~$contactemailacct|";
$mvalue.="contactphoneacct~$contactphoneacct|";
$mvalue.="offerletter~$offerletter|";
$mvalue.="confirmationletter~$confirmationletter|";
$mvalue.="promotionletter~$promotionletter|";
$mvalue.="appraisalletter~$appraisalletter|";
$mvalue.="warningletter~$warningletter|";
$mvalue.="terminationletter~$terminationletter|";
$mvalue.="nocletter~$nocletter|";
$mvalue.="experienceletter~$experienceletter|";
$mvalue.="endofserviceletter~$endofserviceletter|";
$mvalue.="yrmeternityleaves~$yrmeternityleaves|";
$mvalue.="yrsickleaves~$yrsickleaves|";
$mvalue.="yrannualleaves~$yrannualleaves|";
$mvalue.="yemaxcarryleaves~$yemaxcarryleaves|";
$mvalue.="developerparam~$developerparam|";
$mvalue.="trackerfields~$trackerfields|";
$mvalue.="campaignscript~$campaignscript|";
// code start - calling mode assign campaign wise functionality - by YASHWANT on 11042017
$mvalue.="campaignCallingMode~$campaignCallingMode|";
// code end - calling mode assign campaign wise functionality - by YASHWANT on 11042017
if($wakka->getCount("hrms_masters","mkey='$client' and mtype='company'")==0)$companyarr=$wakka->Query("insert into hrms_masters set mvalue='',mkey='$client',mtype='company';");
$companyarr=$wakka->Query("update hrms_masters set mvalue='$mvalue' where mkey='$client' and mtype='company';");
if($wakka->getCount("hrms_masters","mkey='$client' and mtype='coreconfig'")==0)
$companyarr=$wakka->Query("insert into hrms_masters set mvalue='',mkey='$client',mtype='coreconfig';");
$companyarr=$wakka->Query("update hrms_masters set mvalue='$campaigncrmfields' where mkey='$client' and mtype='coreconfig';");
//if(!Auth::user()->moduleACL("Admin",true,true,true))$wakka->createMailQueue("system",$wakka->getEmailIdsFromList('HRManagerUsers'),Config::get("app.name").": Client Master Changed","[".$wakka->GetUserName()."] Has changed Clients [$client] Master Data");
echo "<div class='message success close'><h2>Success!</h2><p>Data Saved</p></div>";
echo "<script>simpleNotification('success','topRight','Saves Successfully');</script>";
?>
<style>
.heading-buttons h4{
line-height:20px;
}
</style>
<div class="layout-app"><!-- row-app -->
<div class="row row-app">
<!-- col -->
<div class="col-md-12">
<!-- col-separator.box -->
<div class="col-separator col-separator-first col-unscrollable box">
<!-- col-table -->
<div class="col-table" id=authorworkspacediv>
<!-- Search Bar -->
<div class="input-group">
<input type="text" class="form-control" placeholder="Search for Users..." id=adminu_Search>
<span class="input-group-btn">
<button class="btn btn-primary rounded-none" type="button" onclick="adminSearchUser();return false"><i class="fa fa-search"></i></button>
</span>
</div>
<div class="col-separator-h"></div>
<!-- End Search Bar -->
<div class="col-table-row">
<div class="col-app col-unscrollable">
<div class="col-app">
<div class="row-app">
<div class="col-md-6">
<div class="col-separator">
<!-- Category Heading -->
<div class="heading-buttons bg-gray border-bottom innerR half">
<a href="#" class="btn btn-sm btn-inverse pull-right" onclick="doAjax('user/create','','userformdiv','ajax_users_create','singlethis','GET');return false"><i class="fa fa-plus fa-fw"></i> New User</a>
<h4 class="innerTB margin-bottom-none">Users</h4>
<div class="clearfix"></div>
</div>
<!-- End Category Heading -->
<?php echo $userlist->render(); ?>
<?php foreach ($userlist as $tuser)
{
$tphoto=$tuser->fetchphotothumb();
?>
<!-- Category Listing -->
<div class="row innerAll half border-bottom bg-gray-hover">
<div class="col-sm-6 col-xs-8">
<ul class="media-list margin-none">
<li class="media">
<a class="pull-left innerAll" href="#" onclick="doAjax('user/<?php echo $tuser->id; ?>/edit','','userformdiv','ajax_users_create','singlethis','GET');return false;">
<span class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i></span>
</a>
<a class="pull-left innerAll" href="#" onclick="doAjax('user/<?php echo $tuser->id; ?>','','userformdiv','ajax_users_delete','singlethis','DELETE');return false;">
<span class="btn btn-primary btn-xs"><i class="fa fa-trash-o"></i></span>
</a>
<div class="media-body">
<div class="innerAll">
<h5 class=""><a href="#" class="media-heading text-primary">Modules</a></h5>
<div class="clearfix"></div>
<small class="margin-none label label-inverse">Social</small>
<small class="margin-none label label-inverse">HR</small>
<small class="margin-none label label-inverse">Reports</small>
<small class="margin-none label label-inverse">CRM</small>
</div>
</div>
</li>
</ul>
</div>
<div class="col-sm-3 col-xs-4">
<div class="text-center">
<p class="strong">Tasks</p>
<span class="badge badge-primary" data-toggle="tooltip" data-title="Published" data-placement="left" data-container="body">0</span>
<span class="badge badge-primary badge-stroke" data-toggle="tooltip" data-title="Subscribed" data-placement="right" data-container="body">0</span>
</div>
</div>
<div class="col-sm-3 col-xs-hidden">
<div class="innerAll">
<div class="media">
<a href="#" class="pull-left">
<img src="<?php echo $tphoto; ?>" class="media-object" width=35px />
</a>
<div class="media-body">
<a href="#" class="text-small" title='<?php echo $tuser->id; ?> - <?php echo $tuser->created_at; ?>' onclick="doAjax('user/<?php echo $tuser->id; ?>/edit','','userformdiv','ajax_users_create','singlethis','GET');return false;"><?php echo $tuser->dispname(); ?></a>
<div class="clearfix"></div>
<small>
<?php if($tuser->status=="Active"): ?>
<span class="label label-success"><?php echo $tuser->status; ?></span>
<?php elseif($tuser->status=="Disabled"): ?>
<span class="label label-warning"><?php echo $tuser->status; ?></span>
<?php elseif($tuser->status=="Unverified"): ?>
<span class="label label-warning"><?php echo $tuser->status; ?></span>
<?php elseif($tuser->status=="Blocked"): ?>
<span class="label label-important"><?php echo $tuser->status; ?></span>
<?php endif; ?>
</small>
</div>
</div>
</div>
</div>
</div>
<!-- // END Category Listing -->
<?php } ?>
<?php echo $userlist->render(); ?>
</div>
<!-- // END col-separator -->
</div>
<!-- // END col -->
<!-- col -->
<div class="col-md-6">
<!-- col-separator -->
<div class="col-separator col-separator-last" id=userformdiv>
</div>
<!-- // END col-separator -->
</div>
<!-- // END col-table -->
</div>
<!-- // END col-separator.box -->
</div>
<!-- // END col -->
</div>
<!-- // END row-app -->
</div>
<script>
$(".pagination a").click(function(e){
e.preventDefault();
var url=$(this).attr("href");
var res = url.split("page=");
menuAction("user?page="+res[1]);
return false;
});
function adminSearchUser()
{
doAjax('user?search='+$('#adminu_Search').val(),'','content','ajax_users_create','singlethis','GET');
}
</script>
\ No newline at end of file
<?php echo $__env->make('layout.header', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php echo $__env->yieldContent('main_menu'); ?>
<?php echo $__env->yieldContent('top_menu'); ?>
<!-- Main Container Fluid -->
<div class="container-fluid">
<div id='absolutedivcontent' style='z-index:1;position:absolute;display:none'></div>
<div id="content">
<?php echo $__env->yieldContent('main_content'); ?>
</div>
<div class="clearfix"></div>
<div id="footer" class="hidden-print" style='display:none'>
<div class="copy">v<?php echo Config::get('app.app_version'); ?></div>
</div>
<!-- // Footer END -->
</div>
<!-- // Main Container Fluid END -->
<?php echo $__env->make('layout.footer', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php
if(Input::has('addcompany'))
{
$company=trim(Input::get("addcompany"));
if($company!="")
{
$companyarr=$wakka->LoadSingle("select * from hrms_masters where mtype='company' and mkey='$company'");
if(!$companyarr)
{
$wakka->Query("insert into hrms_masters set mvalue='',mkey='$company',mtype='company';");
}
}
return;
}
$kformlib=new \App\Jobs\KFormLib($wakka->HRCoreVars["HRFiledsStr"]);
$client=Input::get("client");
$snedmailsarr=array();
$workflowarr=$wakka->LoadAll("select * from hrms_masters where mtype='workflow';");
foreach($workflowarr as $wfline)
{
$workflow=explode("~~~",$wfline['mvalue']);
$controls=explode("|",$workflow[0]);
$tasks=explode("_EOF_",$workflow[1]);//$tasks=explode("\n",$workflow[1]);
foreach($tasks as $task)
{
if(trim($task)!='')
{
$taskVals=explode("|",$task);$taskVals[0]=trim($taskVals[0]);
if($taskVals[0]=="{{clientcontact}}")
{
$snedmailsarr[]=$controls[0];
}
}
}
}
if($client!="")
{
$mastersdata=$wakka->getCompanyMaster($client);
echo "<p><label class='label-small_new' style='width:15%'>Script</label><textarea rows=8 id='campaignscript' style='font-size:12px;width:85%'>".($mastersdata["campaignscript"])."</textarea></p>";
echo "<div class='row'><label class='label-small_new col-md-1'>DID</label><div class='col-md-3'><input class='form-control' rows=8 id='dialer_did' style='font-size:12px;' value='".($mastersdata["DialerDID"])."''></div>";
echo "<label class='label-small_new col-md-1' style='margin-left:10px'>Autodial</label><div class='col-md-3'><input class='form-control' rows=8 id='autodial_pacing' style='font-size:12px;' value='".($mastersdata["autodialercampaign"])."'></div></div><br>";
$checkStr='';
if($mastersdata["textmessage"]=='1')$checkStr='checked';
echo "<div class='row'><span class='col-md-1'><input type='checkbox' id='vbcheck'></span><label class='label-small_new col-md-1'>Voice Blaster (Default is 1)</label><div class='col-md-3'><input class='form-control' rows=8 id='vb_pacing' style='font-size:12px;' value='".($mastersdata["vbpace"])."' disabled></div><div class='col-md-2'><input type='checkbox' id='withoutTM' disabled ".$checkStr.">Without Text Message<input type=hidden id='checkTmVal' value='".($mastersdata["textmessage"])."'></div></div><br>";
echo "<p><label class='label-small_new' style='width:15%'>CRM Fields</label><textarea id='campaigncrmfields' style='font-size:12px;width:85%;height:300px'>".($mastersdata["campaigncrmfields"])."</textarea></p>";
// code start - calling mode assign campaign wise functionality - by YASHWANT on 11042017
echo "<p><label class='label-small_new' style='width:15%'>Calling Mode</label><select class='form_hrm_select' id='campaignCallingMode'><option value>User able select</option><option value='Progressive' ".($mastersdata["campaignCallingMode"]=="Progressive"?"selected":"").">Progressive</option><option value='Manual' ".($mastersdata["campaignCallingMode"]=="Manual"?"selected":"").">Manual</option><option value='Incoming' ".($mastersdata["campaignCallingMode"]=="Incoming"?"selected":"").">Incoming</option><option value='Predictive' ".($mastersdata["campaignCallingMode"]=="Predictive"?"selected":"").">Predictive</option></select></p>";
// code end - calling mode assign campaign wise functionality - by YASHWANT on 11042017
if(!isset($mastersdata["trackerfields"]))$mastersdata["trackerfields"]="";
$trackerfieldsarr=array_unique(array_filter(explode(",",$mastersdata["trackerfields"])));
$toarr=array();
$optionsstr="";
$fileids=explode(",",$kformlib->HRFiledsStr);
foreach($fileids as $fileid)
{
if(trim($fileid)!='')
{
if(strstr($kformlib->HRFileFieldsStr,$fileid))$ftype='File';
else if(strstr($kformlib->HRDateFilds,$fileid))$ftype='Date';
else if(strstr($kformlib->HRDropFilds,$fileid))$ftype='Dropdown';
else $ftype='Text';
$toarr[$fileid]=$kformlib->HRFieldNames[$fileid]." ($ftype)";
}
}
asort($toarr);
foreach($trackerfieldsarr as $key)$optionsstr.="<option value='$key' selected>$toarr[$key]</option>";
foreach($toarr as $key=>$opts)$optionsstr.="<option value='$key'>$opts</option>";
?>
<script>
$(document).ready(function(){
$('#vbcheck').change(function() {
if(this.checked) {
$('#vb_pacing').removeAttr('disabled');
$('#withoutTM').removeAttr('disabled');
}
else
{
$('#vb_pacing').attr('disabled', 'disabled');
$('#withoutTM').attr('disabled', 'disabled');
}
});
$('#withoutTM').change(function() {
if(this.checked) {
$('#checkTmVal').val(1);
}
else
{
$('#checkTmVal').val(0);
}
});
});
</script>
<?php
}
?>
<style>
.heading-buttons h4{
line-height:20px;
}
</style>
<div class="layout-app"><!-- row-app -->
<div class="row row-app">
<!-- col -->
<div class="col-md-12">
<!-- col-separator.box -->
<div class="col-separator col-separator-first col-unscrollable box">
<!-- col-table -->
<div class="col-table" id=authorworkspacediv>
<!-- Search Bar -->
<div class="input-group">
<input type="text" class="form-control" placeholder="Search for Users..." id=adminu_Search>
<span class="input-group-btn">
<button class="btn btn-primary rounded-none" type="button" onclick="adminSearchUser();return false"><i class="fa fa-search"></i></button>
</span>
</div>
<div class="col-separator-h"></div>
<!-- End Search Bar -->
<div class="col-table-row">
<div class="col-app col-unscrollable">
<div class="col-app">
<div class="row-app">
<div class="col-md-6">
<div class="col-separator">
<!-- Category Heading -->
<div class="heading-buttons bg-gray border-bottom innerR half">
<a href="#" class="btn btn-sm btn-inverse pull-right" onclick="doAjax('user/create','','userformdiv','ajax_users_create','singlethis','GET');return false"><i class="fa fa-plus fa-fw"></i> New User</a>
<h4 class="innerTB margin-bottom-none">Users</h4>
<div class="clearfix"></div>
</div>
<!-- End Category Heading -->
<?php echo $userlist->render(); ?>
<?php foreach ($userlist as $tuser)
{
$tphoto=$tuser->fetchphotothumb();
?>
<!-- Category Listing -->
<div class="row innerAll half border-bottom bg-gray-hover">
<div class="col-sm-6 col-xs-8">
<ul class="media-list margin-none">
<li class="media">
<a class="pull-left innerAll" href="#" onclick="doAjax('user/<?php echo $tuser->id; ?>/edit','','userformdiv','ajax_users_create','singlethis','GET');return false;">
<span class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i></span>
</a>
<a class="pull-left innerAll" href="#" onclick="doAjax('user/<?php echo $tuser->id; ?>','','userformdiv','ajax_users_delete','singlethis','DELETE');return false;">
<span class="btn btn-primary btn-xs"><i class="fa fa-trash-o"></i></span>
</a>
<div class="media-body">
<div class="innerAll">
<h5 class=""><a href="#" class="media-heading text-primary">Modules</a></h5>
<div class="clearfix"></div>
<small class="margin-none label label-inverse">Social</small>
<small class="margin-none label label-inverse">HR</small>
<small class="margin-none label label-inverse">Reports</small>
<small class="margin-none label label-inverse">CRM</small>
</div>
</div>
</li>
</ul>
</div>
<div class="col-sm-3 col-xs-4">
<div class="text-center">
<p class="strong">Tasks</p>
<span class="badge badge-primary" data-toggle="tooltip" data-title="Published" data-placement="left" data-container="body">0</span>
<span class="badge badge-primary badge-stroke" data-toggle="tooltip" data-title="Subscribed" data-placement="right" data-container="body">0</span>
</div>
</div>
<div class="col-sm-3 col-xs-hidden">
<div class="innerAll">
<div class="media">
<a href="#" class="pull-left">
<img src="<?php echo $tphoto; ?>" class="media-object" width=35px />
</a>
<div class="media-body">
<a href="#" class="text-small" title='<?php echo $tuser->id; ?> - <?php echo $tuser->created_at; ?>' onclick="doAjax('user/<?php echo $tuser->id; ?>/edit','','userformdiv','ajax_users_create','singlethis','GET');return false;"><?php echo $tuser->dispname(); ?></a>
<div class="clearfix"></div>
<small>
<?php if($tuser->status=="Active"): ?>
<span class="label label-success"><?php echo $tuser->status; ?></span>
<?php elseif($tuser->status=="Disabled"): ?>
<span class="label label-warning"><?php echo $tuser->status; ?></span>
<?php elseif($tuser->status=="Unverified"): ?>
<span class="label label-warning"><?php echo $tuser->status; ?></span>
<?php elseif($tuser->status=="Blocked"): ?>
<span class="label label-important"><?php echo $tuser->status; ?></span>
<?php endif; ?>
</small>
</div>
</div>
</div>
</div>
</div>
<!-- // END Category Listing -->
<?php } ?>
<?php echo $userlist->render(); ?>
</div>
<!-- // END col-separator -->
</div>
<!-- // END col -->
<!-- col -->
<div class="col-md-6">
<!-- col-separator -->
<div class="col-separator col-separator-last" id=userformdiv>
</div>
<!-- // END col-separator -->
</div>
<!-- // END col-table -->
</div>
<!-- // END col-separator.box -->
</div>
<!-- // END col -->
</div>
<!-- // END row-app -->
</div>
<script>
$(".pagination a").click(function(e){
e.preventDefault();
var url=$(this).attr("href");
var res = url.split("page=");
menuAction("user?page="+res[1]);
return false;
});
function adminSearchUser()
{
doAjax('user?search='+$('#adminu_Search').val(),'','content','ajax_users_create','singlethis','GET');
}
</script>
\ No newline at end of file
<!-- Heading -->
<h5 class="innerAll margin-none bg-primary">
<i class="fa fa-fw fa-pencil"></i> Add Role
<a href="#" class="btn btn-sm btn-inverse pull-right btn-xs" style="margin-top: -5px;" onclick="return false">
<i class="fa fa-user fa-fw"></i>
</a>
</h5>
<form class="innerAll">
<fieldset>
<div class="control-role">
<label class="col-md-4 control-label" for="rolename">RoleName</label>
<div class="col-md-8 controls">
<input class="form-control" id="rolename" type="text" value="<?php echo $trole->rolename; ?>" />
</div>
</div>
<div class="control-role">
<label class="col-md-4 control-label" for="rolestatus">Status</label>
<div class="col-md-8 controls">
<select id="rolestatus" class="form-control">
<option value='<?php echo $trole->status; ?>'><?php echo $trole->status; ?></option>
<option value="Active">Active</option>
<option value="Disabled">Disabled</option>
</select>
</div>
</div>
<hr>
<div class="control-group">
<label class="col-md-4 control-label" for="rolegroup">Group</label>
<div class="col-md-8 controls">
<select id="rolegroup" required=required class="form-control">
<?php foreach(Auth::user()->getAccessList("group",true,false,false,true) as $tgrp)
{
$seltext='';if($tgrp==$trole->rolegroup)$seltext='selected';
echo "<option value='$tgrp' $seltext>$tgrp</option>";
}
?>
</select>
</div>
</div>
<!-- <div class="control-group">
<label class="col-md-4 control-label" for="rolegroup">Chat/Voice Enabled</label>
<div class="col-md-8 controls">
<select id="uservoice" required=required class="form-control">
<option value="Active">Active</option>
<option value="InActive">InActive</option>
</select>
</div>
</div>-->
<hr><h2 style='padding-left:10%'>Modules Access</h2>
<div class="control-group">
<label class="col-md-4 control-label" for="modulerwa">Read+Write+Admin</label>
<div class="col-md-8 controls">
<select id="modulerwa" multiple="" data-rel="chosen" style='width:100%' class="select2multi">
<?php
$tmodarr=array();
if(Auth::user()->moduleACL("Admin",true,true,true))foreach(Config::get("app.app_modules") as $entry=>$entryarr)$tmodarr[]=$entry;
else $tmodarr=Auth::user()->getAccessList("module",false,false,true,true);
foreach($tmodarr as $tmod){
$seltext='';if(strstr($trole->modulerwa,$tmod))$seltext='selected';
echo "<option value='$tmod' $seltext>$tmod</option>";
} ?>
</select>
</div>
</div>
<div class="control-group">
<label class="col-md-4 control-label" for="modulerw">Read+Write</label>
<div class="col-md-8 controls">
<select id="modulerw" multiple="" data-rel="chosen" style='width:100%' class="select2multi">
<?php
$tmodarr=array();
if(Auth::user()->moduleACL("Admin",true,true,true))foreach(Config::get("app.app_modules") as $entry=>$entryarr)$tmodarr[]=$entry;
else $tmodarr=Auth::user()->getAccessList("module",false,true,false,true);
foreach($tmodarr as $tmod){
$seltext='';if(strstr($trole->modulerw,$tmod))$seltext='selected';
echo "<option value='$tmod' $seltext>$tmod</option>";
} ?>
</select>
</div>
</div>
<div class="control-group">
<label class="col-md-4 control-label" for="moduler">Read</label>
<div class="col-md-8 controls">
<select id="moduler" multiple="" data-rel="chosen" style='width:100%' class="select2multi">
<?php
$tmodarr=array();
if(Auth::user()->moduleACL("Admin",true,true,true))foreach(Config::get("app.app_modules") as $entry=>$entryarr)$tmodarr[]=$entry;
else $tmodarr=Auth::user()->getAccessList("module",true,false,false,true);
foreach($tmodarr as $tmod){
$seltext='';if(strstr($trole->moduler,$tmod))$seltext='selected';
echo "<option value='$tmod' $seltext>$tmod</option>";
} ?>
</select>
</div>
</div>
<?php
$activegrps=\App\Models\Group::where('status','=','Active')->get(array('group'));
foreach($activegrps as $tgrp)$grparr[]=$tgrp->group;
?>
<hr><h2 style='padding-left:10%'>Groups Access</h2>
<div class="control-group">
<label class="col-md-4 control-label" for="grouprwa">Read+Write+Admin</label>
<div class="col-md-8 controls">
<select id="grouprwa" multiple="" data-rel="chosen" style='width:100%' class="select2multi">
<?php foreach($grparr as $tgrp){
$seltext='';if(strstr($trole->grouprwa,$tgrp))$seltext='selected';
echo "<option value='$tgrp' $seltext>$tgrp</option>";
} ?>
</select>
</div>
</div>
<div class="control-group">
<label class="col-md-4 control-label" for="grouprw">Read+Write</label>
<div class="col-md-8 controls">
<select id="grouprw" multiple="" data-rel="chosen" style='width:100%' class="select2multi">
<?php foreach($grparr as $tgrp){
$seltext='';if(strstr($trole->grouprw,$tgrp))$seltext='selected';
echo "<option value='$tgrp' $seltext>$tgrp</option>";
} ?>
</select>
</div>
</div>
<div class="control-group">
<label class="col-md-4 control-label" for="groupr">Read</label>
<div class="col-md-8 controls">
<select id="groupr" multiple="" data-rel="chosen" style='width:100%' class="select2multi">
<?php foreach($grparr as $tgrp){
$seltext='';if(strstr($trole->groupr,$tgrp))$seltext='selected';
echo "<option value='$tgrp' $seltext>$tgrp</option>";
} ?>
</select>
</div>
</div>
<div class="control-role">
<label class="col-md-4 control-label" for="rolestatus">Default</label>
<div class="col-md-8 controls">
<select id="roledefault" class="form-control">
<option value='<?php echo $trole->default; ?>'><?php echo $trole->default; ?></option>
<option value="0">0</option>
<option value="1">1</option>
</select>
</div>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary" onclick='createRoleForm();return false;'>Save changes</button>
</div>
</fieldset>
</form>
<script>
function createRoleForm()
{
var putdata="";
putdata+="&rolename="+$("#rolename").val();
putdata+="&rolestatus="+$("#rolestatus").val();
putdata+="&rolegroup="+$("#rolegroup").val();
putdata+="&modulerwa="+$("#modulerwa").val();
putdata+="&modulerw="+$("#modulerw").val();
putdata+="&moduler="+$("#moduler").val();
putdata+="&grouprwa="+$("#grouprwa").val();
putdata+="&grouprw="+$("#grouprw").val();
putdata+="&groupr="+$("#groupr").val();
putdata+="&roledefault="+$("#roledefault").val();
doAjax('role/<?php echo $trole->id; ?>',putdata,'roleformdiv','ajax_role_create','singlethis','PUT');
}
</script>
<?php
$themes = explode(",",env('themes'));
if($userCurrentTheme != ""){
if(!in_array($userCurrentTheme, $themes)){$userCurrentTheme = "Default";}
}else{ $userCurrentTheme = "Default"; }
?>
<?php if(isset($response)): ?>
<script>
simpleNotification("<?php echo e($response['type']); ?>","topRight","<?php echo e($response['message']); ?>");
<?php if($response['type'] == "success"): ?>
setTimeout(function(){ window.location.reload(); }, 1000);
<?php endif; ?>
</script>
<?php endif; ?>
<h4>Select Theme <span class="pull-right"><small>Current Theme - </small><?php echo e($userCurrentTheme); ?></span></h4>
<hr style="margin-bottom: 10px;">
<div class="row">
<?php foreach($themes as $theme): ?>
<div class="col-sm-3">
<div class="themeBox" style="<?php echo e($theme == $userCurrentTheme ? 'border:1px solid #f30;background-color: #ffe9e9' : ''); ?>">
<h4><?php echo e($theme); ?>
<?php if($theme == $userCurrentTheme): ?>
<span class="pull-right label label-primary btn-xs">Current Theme</span>
<?php else: ?>
<button class="pull-right btn btn-success btn-xs" onclick="changeTheme('<?php echo e($theme); ?>');return false;">Select Theme</button>
<?php endif; ?>
</h4>
<hr style="margin-top: 10px;margin-bottom: 5px;">
<div class="text-center">
<img src="<?php echo e(URL::to('assets/themes/'.$theme.'.png')); ?>" class="img-responsive" alt="" />
</div>
</div>
</div>
<?php endforeach; ?>
</div>
<style>
.themeBox{margin: 10px;padding: 10px !important;border:1px solid #eee;border-radius: 5px;}
.themeBox:hover{background-color: #eee;}
</style>
<script type="text/javascript">
function changeTheme(value){
doAjax('setting/theme?name='+value,'','settingThemeArea','','singlethis','GET');
}
</script>
\ No newline at end of file
<style>
.heading-buttons h4{
line-height:20px;
}
</style>
<div class="layout-app"><!-- row-app -->
<div class="row row-app">
<!-- col -->
<div class="col-md-12">
<!-- col-separator.box -->
<div class="col-separator col-separator-first col-unscrollable box">
<!-- col-table -->
<div class="col-table" id=authorworkspacediv>
<!-- Search Bar -->
<!-- <div class="input-role">
<input type="text" class="form-control" placeholder="Search for Role...">
<span class="input-role-btn">
<button class="btn btn-primary rounded-none" type="button"><i class="fa fa-search"></i></button>
</span>
</div>-->
<div class="col-separator-h"></div>
<!-- End Search Bar -->
<div class="col-table-row">
<div class="col-app col-unscrollable">
<div class="col-app">
<div class="row-app">
<div class="col-md-6">
<div class="col-separator">
<!-- Category Heading -->
<div class="heading-buttons bg-gray border-bottom innerR half">
<a href="#" class="btn btn-sm btn-inverse pull-right" onclick="doAjax('role/create','','roleformdiv','ajax_role_create','singlethis','GET');return false"><i class="fa fa-plus fa-fw"></i> New Role</a>
<h4 class="innerTB margin-bottom-none">Roles</h4>
<div class="clearfix"></div>
</div>
<!-- End Category Heading -->
<?php echo $rolelist->render(); ?>
<?php foreach ($rolelist as $trole)
{
$tphoto="assets/images/people/avatar.jpg";
?>
<!-- Category Listing -->
<div class="row innerAll half border-bottom bg-gray-hover">
<div class="col-sm-6 col-xs-5">
<ul class="media-list margin-none">
<li class="media">
<a class="pull-left innerAll" style="padding: 8px!important;" href="#" onclick="doAjax('role/<?php echo $trole->id; ?>/edit','','roleformdiv','ajax_role_create','singlethis','GET');return false;">
<span class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i></span>
</a>
<a class="pull-left innerAll" style="padding: 8px!important;" href="#" onclick="doAjax('role/<?php echo $trole->id; ?>','','roleformdiv','ajax_role_delete','singlethis','DELETE');return false;">
<span class="btn btn-primary btn-xs"><i class="fa fa-trash-o"></i></span>
</a>
<div class="media-body">
<div class="innerAll">
<h5 class=""><a href="#" class="media-heading text-primary">Created : <?php echo $trole->created_at; ?></a></h5>
<div class="clearfix"></div>
<!-- <small class="margin-none label label-inverse">Social</small>
<small class="margin-none label label-inverse">Learn</small>
<small class="margin-none label label-inverse">Author</small>
<small class="margin-none label label-inverse">Library</small> -->
</div>
</div>
</li>
</ul>
</div>
<div class="col-sm-3 col-xs-3">
<div class="text-center">
<p class="strong">Courses</p>
<span class="badge badge-primary" data-toggle="tooltip" data-title="Published" data-placement="left" data-container="body">0</span>
<span class="badge badge-primary badge-stroke" data-toggle="tooltip" data-title="Subscribed" data-placement="right" data-container="body">5</span>
</div>
</div>
<div class="col-sm-3 col-xs-hidden">
<div class="innerAll">
<div class="media">
<a href="#" class="pull-left">
<img src="<?php echo $tphoto; ?>" class="media-object" width=35px />
</a>
<div class="media-body">
<a href="#" class="text-small" title='<?php echo $trole->created_at; ?>' onclick="doAjax('role/<?php echo $trole->id; ?>/edit','','roleformdiv','ajax_role_create','singlethis','GET');return false;"><?php echo $trole->rolename; ?></a>
<div class="clearfix"></div>
<small>
<?php if($trole->status=="Active"): ?>
<span class="label label-success"><?php echo $trole->status; ?></span>
<?php elseif($trole->status=="Disabled"): ?>
<span class="label label-warning"><?php echo $trole->status; ?></span>
<?php elseif($trole->status=="Unverified"): ?>
<span class="label label-warning"><?php echo $trole->status; ?></span>
<?php elseif($trole->status=="Blocked"): ?>
<span class="label label-important"><?php echo $trole->status; ?></span>
<?php endif; ?>
</small>
</div>
</div>
</div>
</div>
</div>
<!-- // END Category Listing -->
<?php } ?>
<?php echo $rolelist->render(); ?>
</div>
<!-- // END col-separator -->
</div>
<!-- // END col -->
<!-- col -->
<div class="col-md-6">
<!-- col-separator -->
<div class="col-separator col-separator-last" id=roleformdiv>
</div>
<!-- // END col-separator -->
</div>
<!-- // END col-table -->
</div>
<!-- // END col-separator.box -->
</div>
<!-- // END col -->
</div>
<!-- // END row-app -->
</div>
<script>
$(".pagination a").click(function(e){
e.preventDefault();
var url=$(this).attr("href");
var res = url.split("page=");
menuAction("role?page="+res[1]);
return false;
});
</script>
\ No newline at end of file
<!DOCTYPE html>
<html class="app">
<head>
<title><?php echo Config::get("app.name"); ?> - <?php echo Config::get('app.app_title'); ?></title>
<meta charset="UTF-8" />
<?php
$v=Config::get('app.app_version');
$vieportopt=explode(":",Config::get("app.kstych_viewportMeta"));
if(!isset($vieportopt[1]))$vieportopt[1]="1";
if(!isset($vieportopt[2]))$vieportopt[2]="1";
if($vieportopt[0]=="responsive"){ ?>
<meta name="viewport" content="width=device-width, initial-scale=<?php echo $vieportopt[1]; ?>, maximum-scale=<?php echo $vieportopt[2]; ?>">
<?php } ?>
<meta name="author" content="Buzzworks">
<?php if(isset($logo_s))$fico=$logo_s;else $fico="favicon.png"; ?>
<link rel="icon" href="<?php echo url('/'); ?>/custom/<?php echo $fico; ?>" type="image/x-icon" />
<link rel="shortcut icon" href="<?php echo url('/'); ?>/custom/<?php echo $fico; ?>" type="image/x-icon" />
<link rel="stylesheet" href="<?php echo url('/'); ?>/style?v=<?php echo $v; ?>" />
<script type="text/javascript" src="<?php echo url('/'); ?>/jshead?v=<?php echo $v; ?>"></script>
</head>
<body class="">
<?php
if(Input::has("dllogxls"))
{
if(isset($_GET['logdate']))$logdate=strtotime($_GET['logdate']." 00:00:00");
else $logdate=strtotime(date('Y-m-d')." 00:00:00");
if(isset($_GET['logtodate']))$logtodate=strtotime($_GET['logtodate']." 23:59:59");
else $logtodate=strtotime(date('Y-m-d')." 23:59:59");
$ulists=DB::select(DB::raw("SELECT MONTH(crmcalls_archive.created_at) AS month, users.username, users.usertype, users.status, COUNT(DISTINCT EXTRACT(DAY FROM crmcalls_archive.created_at)) AS Number_of_Days, COUNT(DISTINCT crmcalls_archive.created_at) AS Number_of_calls FROM `users` INNER JOIN crmcalls_archive on users.id=crmcalls_archive.user_id WHERE crmcalls_archive.created_at >= '".date("Y-m-d H:i:s",$logdate)."' AND crmcalls_archive.created_at < '".date("Y-m-d H:i:s",$logtodate)."' GROUP BY users.id, MONTH(crmcalls_archive.created_at) ORDER BY MONTH(crmcalls_archive.created_at) DESC"));
$reportArr = array();
foreach($ulists as $ulist)
{
$reportArr[] = (array)$ulist;
}
header('Content-Type: application/csv');
header('Content-Disposition: attachment; filename="seatcount.csv";');
header('Cache-Control: max-age=0');
$headers = ['month','username','usertype','status','Number_of_Days','Number_of_calls'];
$f = fopen('php://output','w');
fputcsv($f, $headers);
foreach($reportArr as $arr)
{
fputcsv($f, $arr);
}
return ;
}
else
{
?>
<div class="row">
<div class="col-md-12">
<div class=innerAll>
<fieldset style='margin-bottom:2%'>
<label>From:</label>
<input size=10 id='modfrom' name='modfrom' type='text' value='<?php echo date("Y-m-d"); ?>' onchange='callLogReloadFun("");' />
<label>To:</label>
<input size=10 id='modto' name='modto' type='text' value='<?php echo date("Y-m-d"); ?>' onchange='callLogReloadFun("");' />
</fieldset>
<fieldset style='margin-bottom:2%'>
<span style="color: #fb6e52;">To Download seat count click on following button.</span><br><br>
<input type=button class='btn btn-green' onclick="sendReq();" value="Download">
<div style='clear:both;height: 10px;'></div>
</fieldset>
</div>
</div>
<div style='clear:both;'></div>
</div>
<script>
$('#modfrom').datepicker({dateFormat: 'yy-mm-dd',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'});
$('#modto').datepicker({dateFormat: 'yy-mm-dd',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'});
function sendReq()
{
// var postdata="dwnld=download";
// doAjax("record?action=seatcount",postdata,"employeeresult","esajaxMutex","esvarajax");
window.open('setting/seatcount?dllogxls=1&logdate='+$("#modfrom").val()+'&logtodate='+$("#modto").val());return false;
// window.open('record/seatcount?dwnld=download');
// return false;
}
</script>
<?php
}
<?php
readfile("assets/components/modules/admin/isotope/isotope.pkgd.js");echo "\n\n";
readfile("assets/components/library/bootstrap/js/bootstrap.min.js");echo "\n\n";
readfile("assets/components/modules/admin/tour/bootstrap-tour.js");echo "\n\n";
readfile("assets/components/library/modernizr/modernizr.js");echo "\n\n";
readfile("assets/components/plugins/holder/holder.js");echo "\n\n";
readfile("assets/components/plugins/nicescroll/jquery.nicescroll.min.js");echo "\n\n";
readfile("assets/components/plugins/slimscroll/jquery.slimscroll.js");echo "\n\n";
readfile("assets/components/plugins/image-preview/image-preview.js");echo "\n\n";
readfile("assets/components/core/js/animations.init.js");echo "\n\n";
readfile("assets/components/plugins/responsive-calendar/responsive-calendar.min.js");echo "\n\n";
readfile("assets/components/modules/admin/widgets/widget-collapsible/assets/widget-collapsible.init.js");echo "\n\n";
readfile("assets/components/modules/admin/gallery/gridalicious/assets/lib/jquery.gridalicious.min.js");echo "\n\n";
// readfile("assets/components/modules/admin/chat/jquery.ui.chatbox.js");echo "\n\n";
// readfile("assets/components/modules/admin/chat/chatboxmanager.js");echo "\n\n";
readfile("assets/components/modules/admin/forms/elements/jasny-fileupload/assets/js/bootstrap-fileupload.js");echo "\n\n";
readfile("assets/components/modules/admin/charts/easy-pie/assets/lib/js/jquery.easy-pie-chart.js");echo "\n\n";
readfile("assets/components/modules/admin/forms/editors/wysihtml5/assets/lib/js/wysihtml5-0.3.0_rc2.min.js");echo "\n\n";
readfile("assets/components/modules/admin/forms/editors/wysihtml5/assets/lib/js/bootstrap-wysihtml5-0.0.2.js");echo "\n\n";
readfile("assets/components/modules/admin/forms/elements/bootstrap-datepicker/assets/lib/js/bootstrap-datepicker.js");echo "\n\n";
readfile("assets/components/modules/admin/forms/elements/bootstrap-datepicker/assets/custom/js/bootstrap-datepicker.init.js");echo "\n\n";
readfile("assets/components/modules/admin/forms/elements/bootstrap-datetimepicker/moment-with-locales.js");echo "\n\n";
readfile("assets/components/modules/admin/forms/elements/bootstrap-datetimepicker/bootstrap-datetimepicker.js");echo "\n\n";
readfile("assets/components/modules/admin/forms/elements/select2/assets/lib/js/select2.js");echo "\n\n";
readfile("assets/components/modules/admin/sliders/bootstrap-slider/bootstrap-slider.js");echo "\n\n";
readfile("assets/components/modules/admin/notifications/notyfy/assets/lib/js/jquery.notyfy.js");echo "\n\n";
readfile("assets/components/modules/admin/notifications/gritter/assets/lib/js/jquery.gritter.min.js");echo "\n\n";
readfile("assets/components/modules/admin/forms/elements/bootstrap-switch/assets/lib/js/bootstrap-switch.js");echo "\n\n";
readfile("assets/components/modules/admin/forms/elements/bootstrap-select/assets/lib/js/bootstrap-select.js");echo "\n\n";
readfile("assets/components/plugins/cookie/jquery.cookie.js");echo "\n\n";
readfile("assets/components/core/js/core.init.js");echo "\n\n";
readfile("assets/components/plugins/owl-carousel/owl.carousel.min.js");echo "\n\n";
readfile("assets/components/modules/admin/forms/file_manager/dropzone/assets/lib/js/dropzone.min.js");echo "\n\n";
readfile("assets/components/modules/admin/gallery/prettyphoto/assets/lib/js/jquery.prettyPhoto.js");echo "\n\n";
readfile("assets/components/modules/admin/titlealert/titlealert.js");echo "\n\n";
readfile("assets/components/modules/admin/forms/wizards/assets/lib/jquery.bootstrap.wizard.js");echo "\n\n";
readfile("assets/components/modules/admin/ui/sortable/jquery.sortable.js");echo "\n\n";
readfile("assets/components/modules/admin/tables/datatables/assets/lib/js/jquery.dataTables.min.js");echo "\n\n";
readfile("assets/components/modules/admin/tables/datatables/assets/custom/js/DT_bootstrap.js");echo "\n\n";
readfile("assets/components/modules/admin/easytooltip/easytooltip.js");echo "\n\n";
readfile("assets/components/plugins/jquery-knob/jquery.knob.min.js");echo "\n\n";
readfile("assets/components/modules/admin/pushy/pushy.js");echo "\n\n";
readfile("assets/components/modules/admin/waves/waves.js");echo "\n\n";
// readfile("assets/js/paintweb/paintweb.src.js");echo "\n\n";
//
// readfile("assets/js/highchart/highcharts.js");echo "\n\n";
//
// readfile("assets/js/ckeditor/ckeditor.js");echo "\n\n";
//readfile("assets/js/sip.js");echo "\n\n";
//readfile("assets/js/dialer.js");echo "\n\n";
//readfile("assets/js/kstych.js");echo "\n\n";
//readfile("assets/js/datatable.js");echo "\n\n";
<?php
use App\Models\User;
$data = Auth::user()->data();
$meta = Auth::user()->meta();
if (!isset($data['personal'])) $data['personal'] = array();
$user = Auth::user();
$tmodules = $modules;
$modules = array();
$dispnames = array();
foreach ($tmodules as $mname => $marr) {
if (!isset($modules[$mname])) {
if (!in_array($marr['disp'], array_values($dispnames))) {
$modules[$mname] = $marr;
$dispnames[$mname] = $marr['disp'];
} else {
$key = array_search($marr['disp'], $dispnames);
$modules[$key]['submenu'] = array_merge($modules[$key]['submenu'], $marr['submenu']);
}
}
}
?>
<!-- panel left -->
<div class="pushy pushy-left">
<div class="desc_imgdiv">
<div class="pushy-user-desc">
<img src="<?php echo $user->fetchphoto(); ?>">
<h4><?php echo $user->dispname(); ?></h4>
<span><i class="fa fa-pencil-square-o"></i></span>
<div style="clear:both"></div>
<p><?php echo $user->email; ?></p>
</div>
</div>
<?php $active = "active";
foreach ($modules as $mname => $marr) {
if (isset($marr['submenu'])) {
?>
<div class=wave-btn style='width:100%'>
<div class=pushy-submenu>
<i class="fa fa-fw fa-<?php echo $marr['icon']; ?>"></i>
<h5><?php echo $marr['disp']; ?></h5>
<ul>
<?php
foreach ($marr['submenu'] as $submenu => $submenuarr) {
$p = 1;
if (isset($submenuarr[1])) {
$p = 0;
if (Auth::user()->moduleACL($mname, true, true, false) && $submenuarr[1] == "W") $p = 1;
if (Auth::user()->moduleACL($mname, true, true, true) && $submenuarr[1] == "A") $p = 1;
}
if ($p == 1) {
?>
<li class="pushy-link"><a href="#" data-ajax='false' onclick="<?php echo $submenuarr[0]; ?>return false;"><?php echo $submenu; ?></a></li>
<?php
}
}
?>
</ul>
</div>
</div>
<?php
} else if ($marr['onclick'] != "") {
?>
<div class=wave-btn style='width:100%'>
<div class="pushy-menu">
<i class="fa fa-fw fa-<?php echo $marr['icon']; ?>"></i>
<h5 class="pushy-link" onclick="<?php echo $marr['onclick']; ?>return false;"><?php echo $marr['disp']; ?></h5>
</div>
</div>
<?php }
$active = "";
} ?>
<div class="pushy-menu">
<i class="fa fa-fw fa-power-off"></i>
<h5 class="pushy-link" onclick="doLogout(0);return false;">Logout</h5>
</div>
</div>
<div class='pushy-site-overlay'></div>
<!-- /panel left -->
<div id="menu-top">
<div class=navbar>
<img src="custom/logo_s.png" class=border-none height=30px style='float:left'>
<div class="user-action pull-left wave-btn" style='height:40px;padding-top:0px;margin-top:0px;'>
<div class="dropdown username" style='padding-top:5px;margin-top:5px;'><a class="dropdown-toggle " href="#" onclick='menuAction("dashboard");$(this).blur();return false;'><b><?php echo Config::get("app.name"); ?> </b></a></div>
</div>
<ul class="main pull-left" id=topmainmenureturn style='display:none'>
<li onclick='returnMenuClick("dashboard");return false;'><a href="#"> Home </a></li>
</ul>
<ul class="main pull-left hidden-xs hidden-sm" id=topmainmenu>
<?php $active = "active";
foreach ($modules as $mname => $marr) { //TODO hidden-xs
if (isset($marr['submenu'])) {
?>
<li class='homemenu dropdown <?php echo $active; ?>' onclick='' id=mainmenu<?php echo $marr['disp']; ?>><a href="#" data-toggle="dropdown"> <?php echo $marr['disp']; ?> </a>
<ul class="dropdown-menu">
<?php
foreach ($marr['submenu'] as $submenu => $submenuarr) {
$p = 1;
if (isset($submenuarr[1])) {
$p = 0;
if (Auth::user()->moduleACL($mname, true, true, false) && $submenuarr[1] == "W") $p = 1;
if (Auth::user()->moduleACL($mname, true, true, true) && $submenuarr[1] == "A") $p = 1;
}
if ($p == 1) {
?>
<li><a href="#" onclick="<?php echo $submenuarr[0]; ?>return false;"><?php echo $submenu; ?></a></li>
<?php
}
}
?>
</ul>
</li>
<?php
} else if ($marr['onclick'] != "") {
?>
<li class='homemenu <?php echo $active; ?>' onclick="<?php echo $marr['onclick']; ?>return false;" id=mainmenu<?php echo $marr['disp']; ?>>
<a href="#"><?php echo $marr['disp']; ?></a>
</li>
<?php }
$active = "";
} ?>
<!-- change start code -->
<li style="color: #626771;font-weight: 600;height: 40px;line-height: 40px;padding: 0 10px;text-decoration: none;display: block;">
<div id="countdown">&nbsp;</div>
</li>
<!-- change end code -->
</ul>
<div class="user-action pull-right" id=topmainusermenu>
<?php
$acctype = Auth::user()->usertype;
if ($data["subscription"] == "Free") {
$datapercent = "100";
$subscstr = "Free Subscription";
$subscstr2 = "You are using a Free subscription <b>$acctype</b> account, there is no expiry";
} else if ($data["subscription"] == "Trial") {
$daysleft = intval(($data["subscriptiondata"][$acctype]['expiry'] - time()) / (24 * 60 * 60));
if ($daysleft < 0) $daysleft = 0;
$origdays = intval(($data["subscriptiondata"][$acctype]['expiry'] - $data["subscriptiondata"][$acctype]['created']) / (24 * 60 * 60));
$datapercent = round($daysleft * 100 / $origdays, 0);
$subscstr = "Trial Subscription";
$subscstr2 = "You are using a trial <b>$acctype</b> account, expiring in <b>$daysleft</b> days, after expiry this account will be converted to free learner account";
} else if ($data["subscription"] == "Expired") {
$datapercent = "0";
$subscstr = "Subscription Expired";
$subscstr2 = "You are using an expired <b>$acctype</b> account, please renew your subscription to use full features";
} else {
$daysleft = intval(($data["subscriptiondata"][$acctype]['expiry'] - time()) / (24 * 60 * 60));
if ($daysleft < 0) $daysleft = 0;
$origdays = intval(($data["subscriptiondata"][$acctype]['expiry'] - $data["subscriptiondata"][$acctype]['created']) / (24 * 60 * 60));
$datapercent = round($daysleft * 100 / $origdays, 0);
$subscstr = $data["subscription"] . " Subscription";
$subscstr2 = "You are using an active <b>$acctype</b> account, expiring in <b>$daysleft</b> days, after expiry this account will be converted to free learner account";
}
?>
<ul class="colors pull-right visible-xs visible-sm wave-btn" style='margin-top:-3px;'>
<li class="dropdown">
<a href="#" class="menu-btn"><i class='fa fa-bars' style='font-size:20px'></i></a>
</li>
</ul>
<div class="dropdown username hidden-xs" style='float:right'>
<a class="dropdown-toggle" data-toggle="dropdown" href="#" onclick=''><?php echo $displayname; ?> <span class="caret"></span> </a>
<ul class="dropdown-menu pull-right" id=topuserdropmenu>
<li><a href="#" class="glyphicons user" onclick='menuAction("profile");return false;'><i></i> Profile</a></li>
<!--<li><a href="#" class="glyphicons list" onclick='menuAction("admin");return false;'><i></i> Timeline</a></li>-->
<li><a href="#" class="glyphicons book" onclick='menuAction("dashboard");return false;'><i></i> Dashboard</a></li>
<?php if (Auth::user()->moduleACL("Admin", true, true, false)) { ?>
<li><a href="#" class="glyphicons cogwheels" onclick='menuAction("admin");return false;'><i></i><?php echo Config::get("app.name"); ?> Admin</a></li>
<?php } ?>
<?php if (Auth::user()->moduleACL("User", true, true, false)) { ?>
<li><a href="#" class="glyphicons cogwheels" onclick='menuAction("user");return false;'><i></i> Manage Users</a></li>
<?php }
if (Auth::user()->moduleACL("Group", true, true, false)) { ?>
<li><a href="#" class="glyphicons cogwheels" onclick='menuAction("group");return false;'><i></i> Manage Groups</a></li>
<li><a href="#" class="glyphicons cogwheels" onclick='menuAction("role");return false;'><i></i> Manage Roles</a></li>
<?php } ?>
<?php if (Auth::user()->moduleACL("ImportExcel", true, true, false)) { ?>
<li><a href="#" class="glyphicons cogwheels" onclick='menuAction("import_excel");return false;'><i></i> Import Excel</a></li>
<?php } ?>
<li><a href="#" class="glyphicons circle_question_mark" onclick="dindexmenu('help&page=helpintroduction',this);return false;"><i></i> Help</a></li>
<li><a href="#" class="glyphicons cogwheels" onclick="menuAction('setting');return false;"><i></i>Settings</a></li>
<li><a href="#" class="glyphicons exit" onclick="doLogout(0);return false;"><i></i> Logout</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="clearfix"></div>
<script type="text/javascript">
redirect_to_password_reset();
function redirect_to_password_reset() {
var action = "password_expiry_check";
$.ajax({
type: "GET",
url: action,
success: function(result) {
console.log(result);
if (result == 'True') {
menuAction("profile");
}
}
});
}
</script>
\ No newline at end of file
<?php
use App\Models\CRMCall;
use App\Models\Dialline;
use App\Models\Sipid;
use App\Models\User;
use App\Models\UserLog;
use App\Models\Kqueue;
use App\Jobs\KHRMSLib;
$wakka = new KHRMSLib();
$dashboarduser=Auth::user();
$nowts=time();
$chart=array('ts'=>date('H:i:s',time()-($dashboarduser->timezone*60)),'Online'=>0,'NoCall'=>0,'InCall'=>0,'CallWait'=>0,'CmdList'=>0);
if($dashboarduser->usertype != 'Admin')
//if(!$dashboarduser->moduleACL("Dialer",false,false,true))
{
$allusers=User::where(function ($query) use($dashboarduser) {
$query->where('supervisor','=',$dashboarduser->username)
->orWhere('lteam2','=',$dashboarduser->username)
->orWhere('lteam','=',$dashboarduser->username)
->orWhere('id','=',$dashboarduser->id);
})
->where(function ($query) {
$query->where('status', '=', 'Active');
})->get();
}
else
{
$allusers=User::where("status","=","Active")->get();
}
$loginUsers = DB::table('sessions')->where('user_id','!=','Null')->groupBy('user_id')->get();
foreach($loginUsers as $user)$loginUserList[]=$user->user_id;
foreach($allusers as $tuser)if(in_array($tuser->id,$loginUserList))$uidlist[]=$tuser->id;
$newcalls=Dialline::where('status','!=','Free')->where('conf','=','')->orderBy('updated_at')->get();
$acalls=Dialline::where('status','!=','Free')->where('conf','!=','')->orderBy('updated_at')->get();
$sipids=Sipid::whereIn("user",$uidlist)->where("status","=","1")->get();
$alist=array();
$sipidsfound=array();
$userarr=array();$i=1;
//$reporthead=array("#","ID","User","Name","Campaign","Station","Status","CRMId","Number","Type","State","Duration");
$reporthead=array("#","ID","User","Name","Campaign","Station","Status");
$reportarray=array();
foreach($newcalls as $newcall)
{
$tcall=CRMCall::where('dialline_id','=',$newcall->id)->orderBy('id','DESC')->first();
$un="";$uid="";$us="";
if($tcall->user_id>0)
{
$tuser=User::find($tcall->user_id);
$un=$tuser->username;
$uname=$tuser->fullname;
$uid=userchatbox($tuser).$tuser->id;
$userlog=UserLog::where('user_id','=',$tuser->id)->orderBy("id","DESC")->first();
$stend=$userlog->getLastStatus();
$us="$stend[0]-$stend[1]";
$chart['Online']++;
$chart['InCall']++;
}
else $chart['CallWait']++;
if($tcall->state == 'DialEnd')
{
$us = "Talk";
}
$obj=array();
$obj["#"]='';//$i++;
$obj["ID"]=$uid;
$obj["User"]=$un;
$obj["Name"]=$uname;
$obj["Campaign"]=$tcall->client;
$obj["Station"]=$tcall->sipid_id.userSpyStr($tcall->sipid_id);
$obj["Status"]=$us;
$obj["CRMId"]=$tcall->crm_id;
$obj["Number"]=$tcall->number;
$obj["Type"]=$tcall->type;
$obj["State"]=$tcall->state;
$obj["Duration"]=$nowts-strtotime($tcall->created_at);
//$reportarray[$newcall->id]=$obj;
if(!empty($tcall->sipid_id))$sipidsfound[]=$tcall->sipid_id;
}
foreach($acalls as $acall)
{
$tcall=CRMCall::where('dialline_id','=',$acall->id)->orderBy('id','DESC')->first();
$tsipid=substr($acall->conf,4);
$tsip=Sipid::find($tsipid);
$clidata=json_decode($tsip->clients,true);
$tuser=User::find($tsip->user);
$userlog=UserLog::where('user_id','=',$tuser->id)->orderBy("id","DESC")->first();
$stend=$userlog->getLastStatus();
$obj=array();
$obj["#"]='';//$i++;
$obj["ID"]=userchatbox($tuser).$tsip->user;
$obj["User"]=$tuser->username;
$obj["Name"]=$tuser->fullname;
$obj["Campaign"]=substr($clidata['r'],0,20);
$obj["Station"]=$tsip->id.userSpyStr($tsip->id);
$obj["Status"]="$stend[0]-$stend[1]";
$obj["CRMId"]=$tcall->crm_id;
$obj["Number"]=$tcall->number;
$obj["Type"]=$tcall->type;
$obj["State"]=$tcall->state;
$obj["Duration"]=$nowts-strtotime($tcall->created_at);
//$reportarray[$acall->id]=$obj;
$sipidsfound[]=$tsipid;
$chart['Online']++;
$chart['InCall']++;
}
foreach($sipids as $sipid)
{
/*if(in_array($sipid->id,$sipidsfound))
{*/
$clidata=json_decode($sipid->clients,true);
$tuser=User::find($sipid->user);
$userlog=UserLog::where('user_id','=',$tuser->id)->orderBy("id","DESC")->first();
$stend=$userlog->getLastStatus();
$obj=array();
$obj["#"]=$i++;
$obj["ID"]=userchatbox($tuser).$sipid->user;
$obj["User"]=$tuser->username;
$obj["Name"]=$tuser->fullname;
$obj["Campaign"]=substr($clidata['r'],0,20);
$obj["Station"]=$sipid->id.userSpyStr($sipid->id);
$obj["Status"]="$stend[0]-$stend[1]";
$obj["CRMId"]="";
$obj["Number"]="";
$obj["Type"]="";
$obj["State"]="";
$obj["Duration"]="";
$reportarray[]=$obj;
$chart['Online']++;
$chart['NoCall']++;
/*}*/
}
$chart['CmdList']=-1*Kqueue::count();
if(Input::get('chartvals')==1)
{
echo json_encode($chart);
return;
}
$highestColumn = sizeof($reporthead);
$outhead="<tr>";$outstr="";
for ($head = 0; $head < $highestColumn; $head++){
$outhead.="<td>".$reporthead[$head]."</td>";
}
$outhead.="</tr>";
foreach($reportarray as $uid=>$uarr)
{
$outstr.="<tr>";
for ($head = 0; $head < $highestColumn; $head++){
$outstr.="<td>".$uarr[$reporthead[$head]]."</td>";
}
$outstr.="</tr>";
}
function userchatbox($tuser){
return "<a data-toggle='image-preview' data-title='".$tuser->dispname()."' data-content='<small></small>' data-image-preview='".$tuser->fetchphotothumb()."' width='100' href='#' class='innerAll half border-none' onclick='tchatbox(\"chatpop_".$tuser->id."\",\"".$tuser->dispname()."\");return false;' style='padding:0 !important'><img src='".$tuser->fetchphotothumb()."' alt='photo' width='22'></a> ";
}
function userSpyStr($sipid){
if(!empty($sipid))return "&nbsp;&nbsp;&nbsp;<a href=# onclick='kDialerSpy(\"$sipid\",\"L\");return false;'>L</a> <a href=# onclick='kDialerSpy(\"$sipid\",\"B\");return false;'>B</a> <a href=# onclick='kDialerSpy(\"$sipid\",\"W\");return false;'>W</a>";
}
?>
<div class=innerAll>
<style>#logtable.td{vertical-align:top;}#logtable.tr{height:28px;overflow-y:hidden;}</style>
<script>
$(document).ready(function(){
if(!$('#dialoglog').hasClass('ui-dialog-content')){
$('#dialoglog').dialog({
autoOpen: false,
width: '70%',
buttons: {
"Ok": function() {
$(this).dialog("close");
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
}
});
</script>
<div style="float:left;width:50%">
<h5>Dialer : Live</h5>
</div>
<div style="float:left;width:50%">
<button class="pull-right btn btn-sm btn-default" onclick='liveLogReloadFun(10);return false;' title='Reload' style='margin-top:-8px'><i class='fa fa-refresh'></i> Reload</button>
</div>
<div style="clear:both"></div>
<hr/>
<div class=col-md-12>
<div id=liveuserlogschart1<?php echo $nowts; ?> style='min-height:300px;width:100%'></div>
<script>
var livechart001='';
$(function () {
livechart001=$('#liveuserlogschart1<?php echo $nowts; ?>').highcharts({
title: {
text: '', x: -20 //center
},
subtitle: {
text: '', x: -20
},
xAxis: {
categories: [<?php $ccc=array();for($c=60;$c>0;$c--){echo "'",date('H:i:s',time()-($c*10)-($dashboarduser->timezone*60))."',";$ccc[]="0";}$ccc="[".implode(",",$ccc)."]"; ?>],
labels:{
enabled:false//default is true
},
},
yAxis: {
title: {
text: ''
},
plotLines: [{
value: 0, width: 1, color: '#808080'
}]
},
tooltip: {
valueSuffix: ''
},
legend: {
},
series: [{
name: 'Online', data: <?php echo Input::get('Online',$ccc); ?>
}, {
name: 'NoCall', data: <?php echo Input::get('NoCall',$ccc); ?>
}, {
name: 'InCall', data: <?php echo Input::get('InCall',$ccc); ?>
}, {
name: 'CallWait', data: <?php echo Input::get('CallWait',$ccc); ?>
}, {
name: 'CmdList',visible: false, data: <?php echo Input::get('CmdList',$ccc); ?>
}]
});
});
function liveLogReloadFun(delay)
{
var tchart=livechart001.highcharts();
var sdata='';
sdata+='&Online='+JSON.stringify(tchart.series[0].yData);
sdata+='&NoCall='+JSON.stringify(tchart.series[1].yData);
sdata+='&InCall='+JSON.stringify(tchart.series[2].yData);
sdata+='&CallWait='+JSON.stringify(tchart.series[3].yData);
sdata+='&CmdList='+JSON.stringify(tchart.series[4].yData);
setTimeout(function(){
if($("#liveuserlogschart1<?php echo $nowts; ?>").length)
doAjax('dialer/liveusers',sdata,'rightmainreportdiv','ajax_dialer_reports','singlethis','GET');
},delay);
}
function liveLogReloadChartFun(delay)
{
setTimeout(function(){
if($("#liveuserlogschart1<?php echo $nowts; ?>").length)
doAjax('dialer/liveusers','chartvals=1','__FD__','ajax_dialer_reports','singlethis','GET',function(res)
{
var resobj=JSON.parse(res.responseText);
var tchart=livechart001.highcharts();
var shift = tchart.series[0].data.length > 60;
// add the point
tchart.series[0].addPoint([resobj['ts'],resobj['Online']], true, shift);
tchart.series[1].addPoint([resobj['ts'],resobj['NoCall']], true, shift);
tchart.series[2].addPoint([resobj['ts'],resobj['InCall']], true, shift);
tchart.series[3].addPoint([resobj['ts'],resobj['CallWait']],true,shift);
tchart.series[4].addPoint([resobj['ts'],resobj['CmdList']],true,shift);
// call it again after one second
setTimeout(liveLogReloadChartFun, 10000);
});
},delay);
}
liveLogReloadChartFun(10);
</script>
</div>
<div style='clear:both'></div>
<div style='clear:both'></div>
<div style='overflow:auto'>
<table id=logtable class='footable table table-striped table-bordered table-white table-primary footable-loaded' style='font-size:12px'>
<thead>
<?php echo $outhead; ?>
</thead>
<?php echo $outstr; ?>
</table>
</div>
<div id=dialoglog></div>
</div>
<!--
<?php //if($dashboarduser->moduleACL("Admin",false,false,true))print_r(Config::get('app.sqllog')); ?>
-->
<?php
use App\Models\User;
?>
<audio id="audio_remote" autoplay="autoplay" ></audio>
<audio id="ringtone" loop src="<?php echo url('/'); ?>/assets/sounds/ringtone.wav" ></audio>
<audio id="ringbacktone" loop src="<?php echo url('/'); ?>/assets/sounds/ringbacktone.wav" ></audio>
<audio id="incomingbeep" src="<?php echo url('/'); ?>/assets/sounds/beep.wav" ></audio>
<audio id="dtmfTone" src="<?php echo url('/'); ?>/assets/sounds/dtmf.wav"></audio>
<video class="video" style='display:none' id="video_remote" autoplay="autoplay"></video>
<video class="video" style='display:none' id="video_local" autoplay="autoplay" muted="true"></video>
<?php
$skin=Input::get("skin");if(Auth::check())if($skin=="")$skin=Auth::user()->dataval('skin');
$skinarr=User::getStyleColors($skin);
$v=Config::get('app.app_version');
if(Config::get("app.facebook_appid")!="")
{
echo "<script src='//connect.facebook.net/en_US/all.js'></script>";
echo "<script>try{\$(document).ready(function(){FB.init({app_id:'".Config::get("app.facebook_appid")."',appId:'".Config::get("app.facebook_appid")."',cookie:true,status:true,xfbml:true});});}catch(e){}</script>";
}
?>
<!-- <button class="btn btn-warning" onclick="logAgentStatus();" style="position:fixed;bottom:10px;right:10px;z-index:2000;"><i class="fa fa-bug"></i> Log</button> -->
<div id="log_result"></div>
<script>
var mastervalue = "";
var kstychAppObject={};
kstychAppObject['config']={};
kstychAppObject['user']={};
<?php if(Auth::check()): ?>
kstychAppObject['user']['id']='<?php echo Auth::user()->id; ?>';
kstychAppObject['user']['name']='<?php echo Auth::user()->username; ?>';
kstychAppObject['user']['usertype']='<?php echo Auth::user()->usertype; ?>';
kstychAppObject['user']['dateformat']='dd.mm.yy';
kstychAppObject['user']['ssn']='<?php echo session_name(); ?>';
kstychAppObject['user']['ssid']=encodeURIComponent("<?php echo Crypt::encrypt(Auth::user()->id.'|'.session_id()); ?>");
<?php else: ?>
kstychAppObject['user']['id']=0;
kstychAppObject['user']['name']='NA';
kstychAppObject['user']['usertype']='NA';
kstychAppObject['user']['dateformat']='dd.mm.yy';
kstychAppObject['user']['ssn']='';
kstychAppObject['user']['ssid']='';
<?php endif; ?>
<?php if(isset($sipid)): ?>
kstychAppObject['user']['sipid']=<?php echo $sipid->id; ?>+"";
kstychAppObject['user']['sipserver']='<?php echo $sipid->server; ?>';
kstychAppObject['user']['sipssldomain']='<?php echo Config::get("app.sipssldomain"); ?>';
kstychAppObject['user']['sipauth']='__unused__';
<?php else: ?>
kstychAppObject['user']['sipid']='0';
kstychAppObject['user']['sipserver']='127.0.0.1';
kstychAppObject['user']['sipssldomain']='localhost';
kstychAppObject['user']['sipauth']='__unused__';
<?php endif; ?>
kstychAppObject['config']['appbaseurl']='<?php echo url("/"); ?>';
kstychAppObject['config']['appdebug']=<?php if(Config::get('app.debug')&&empty($_GET['nodebug']))echo "1";else echo "0"; ?>;
kstychAppObject['config']['appanimate']=0;
kstychAppObject['config']['csrftoken']='<?php echo e(csrf_token()); ?>';
kstychAppObject['config']['kstych_RTCLK']=<?php echo Config::get('app.kstych_RTCLK'); ?>;
kstychAppObject['config']['kstych_CTRL']=<?php echo Config::get('app.kstych_CTRL'); ?>;
kstychAppObject['config']['kDialer_keeplocalconf']=<?php echo Config::get('app.kDialer_keeplocalconf'); ?>;
kstychAppObject['config']['use-ice']='<?php echo Config::get('app.kstych_useice'); ?>';
kstychAppObject['config']['colorPrimary']='<?php echo $skinarr[0]; ?>';
kstychAppObject['config']['colorLink']='<?php echo $skinarr[1]; ?>';
kstychAppObject['config']['colorInfo']='<?php echo $skinarr[2]; ?>';
kstychAppObject['config']['colorWhite']='<?php echo $skinarr[3]; ?>';
kstychAppObject['config']['colorDefault']='<?php echo $skinarr[4]; ?>';
kstychAppObject['config']['colorSuccess']='<?php echo $skinarr[5]; ?>';
kstychAppObject['config']['colorWarning']='<?php echo $skinarr[6]; ?>';
kstychAppObject['config']['colorDanger']='<?php echo $skinarr[7]; ?>';
kstychAppObject['config']['colorInverse']='<?php echo $skinarr[8]; ?>';
</script>
<script src="<?php echo url('/'); ?>/assets/components/modules/admin/chat/jquery.ui.chatbox.js"></script>
<script src="<?php echo url('/'); ?>/assets/components/modules/admin/chat/chatboxmanager.js"></script>
<script src="<?php echo url('/'); ?>/assets/js/highchart/highcharts.js"></script>
<script src="<?php echo url('/'); ?>/jsbody?v=<?php echo $v; ?>"></script>
<script src="<?php echo url('/'); ?>/assets/js/sip.js"></script>
<script src="<?php echo url('/'); ?>/assets/js/dialer.js"></script>
<script src="<?php echo url('/'); ?>/assets/js/kstych.js"></script>
<script src="<?php echo url('/'); ?>/assets/js/datatable.js"></script>
<?php if(Session::has('mdevice')&&Session::get('mdevice')!=""){$md=Session::get('mdevice'); ?>
<script src="<?php echo url('/'); ?>/assets/js/cordova/<?php echo $md; ?>/cordova.js?v=<?php echo $v; ?>"></script>
<script src="<?php echo url('/'); ?>/assets/js/cordova/<?php echo $md; ?>/kstych.js?v=<?php echo $v; ?>"></script>
<?php } ?>
</body>
</html>
<?php
use App\Models\User;
?>
<audio id="audio_remote" autoplay="autoplay" ></audio>
<audio id="ringtone" loop src="<?php echo url('/'); ?>/assets/sounds/ringtone.wav" ></audio>
<audio id="ringbacktone" loop src="<?php echo url('/'); ?>/assets/sounds/ringbacktone.wav" ></audio>
<audio id="incomingbeep" src="<?php echo url('/'); ?>/assets/sounds/beep.wav" ></audio>
<audio id="dtmfTone" src="<?php echo url('/'); ?>/assets/sounds/dtmf.wav"></audio>
<video class="video" style='display:none' id="video_remote" autoplay="autoplay"></video>
<video class="video" style='display:none' id="video_local" autoplay="autoplay" muted="true"></video>
<?php
$skin=Input::get("skin");if(Auth::check())if($skin=="")$skin=Auth::user()->dataval('skin');
$skinarr=User::getStyleColors($skin);
$v=Config::get('app.app_version');
if(Config::get("app.facebook_appid")!="")
{
echo "<script src='//connect.facebook.net/en_US/all.js'></script>";
echo "<script>try{\$(document).ready(function(){FB.init({app_id:'".Config::get("app.facebook_appid")."',appId:'".Config::get("app.facebook_appid")."',cookie:true,status:true,xfbml:true});});}catch(e){}</script>";
}
?>
<!-- <button class="btn btn-warning" onclick="logAgentStatus();" style="position:fixed;bottom:10px;right:10px;z-index:2000;"><i class="fa fa-bug"></i> Log</button> -->
<div id="log_result"></div>
<script>
var mastervalue = "";
var kstychAppObject={};
kstychAppObject['config']={};
kstychAppObject['user']={};
<?php if(Auth::check()): ?>
kstychAppObject['user']['id']='<?php echo Auth::user()->id; ?>';
kstychAppObject['user']['name']='<?php echo Auth::user()->username; ?>';
kstychAppObject['user']['usertype']='<?php echo Auth::user()->usertype; ?>';
kstychAppObject['user']['dateformat']='dd.mm.yy';
kstychAppObject['user']['ssn']='<?php echo session_name(); ?>';
kstychAppObject['user']['ssid']=encodeURIComponent("<?php echo Crypt::encrypt(Auth::user()->id.'|'.session_id()); ?>");
<?php else: ?>
kstychAppObject['user']['id']=0;
kstychAppObject['user']['name']='NA';
kstychAppObject['user']['usertype']='NA';
kstychAppObject['user']['dateformat']='dd.mm.yy';
kstychAppObject['user']['ssn']='';
kstychAppObject['user']['ssid']='';
<?php endif; ?>
<?php if(isset($sipid)): ?>
kstychAppObject['user']['sipid']=<?php echo $sipid->id; ?>+"";
kstychAppObject['user']['sipserver']='<?php echo $sipid->server; ?>';
kstychAppObject['user']['sipssldomain']='<?php echo Config::get("app.sipssldomain"); ?>';
kstychAppObject['user']['sipauth']='__unused__';
<?php else: ?>
kstychAppObject['user']['sipid']='0';
kstychAppObject['user']['sipserver']='127.0.0.1';
kstychAppObject['user']['sipssldomain']='localhost';
kstychAppObject['user']['sipauth']='__unused__';
<?php endif; ?>
kstychAppObject['config']['appbaseurl']='<?php echo url("/"); ?>';
kstychAppObject['config']['appdebug']=<?php if(Config::get('app.debug')&&empty($_GET['nodebug']))echo "1";else echo "0"; ?>;
kstychAppObject['config']['appanimate']=0;
kstychAppObject['config']['csrftoken']='<?php echo e(csrf_token()); ?>';
kstychAppObject['config']['kstych_RTCLK']=<?php echo Config::get('app.kstych_RTCLK'); ?>;
kstychAppObject['config']['kstych_CTRL']=<?php echo Config::get('app.kstych_CTRL'); ?>;
kstychAppObject['config']['kDialer_keeplocalconf']=<?php echo Config::get('app.kDialer_keeplocalconf'); ?>;
kstychAppObject['config']['use-ice']='<?php echo Config::get('app.kstych_useice'); ?>';
kstychAppObject['config']['colorPrimary']='<?php echo $skinarr[0]; ?>';
kstychAppObject['config']['colorLink']='<?php echo $skinarr[1]; ?>';
kstychAppObject['config']['colorInfo']='<?php echo $skinarr[2]; ?>';
kstychAppObject['config']['colorWhite']='<?php echo $skinarr[3]; ?>';
kstychAppObject['config']['colorDefault']='<?php echo $skinarr[4]; ?>';
kstychAppObject['config']['colorSuccess']='<?php echo $skinarr[5]; ?>';
kstychAppObject['config']['colorWarning']='<?php echo $skinarr[6]; ?>';
kstychAppObject['config']['colorDanger']='<?php echo $skinarr[7]; ?>';
kstychAppObject['config']['colorInverse']='<?php echo $skinarr[8]; ?>';
</script>
<script src="<?php echo url('/'); ?>/assets/components/modules/admin/chat/jquery.ui.chatbox.js"></script>
<script src="<?php echo url('/'); ?>/assets/components/modules/admin/chat/chatboxmanager.js"></script>
<script src="<?php echo url('/'); ?>/assets/js/highchart/highcharts.js"></script>
<script src="<?php echo url('/'); ?>/jsbody?v=<?php echo $v; ?>"></script>
<script src="<?php echo url('/'); ?>/assets/js/sip.js"></script>
<script src="<?php echo url('/'); ?>/assets/js/dialer.js"></script>
<script src="<?php echo url('/'); ?>/assets/js/kstych.js"></script>
<script src="<?php echo url('/'); ?>/assets/js/datatable.js"></script>
<?php if(Session::has('mdevice')&&Session::get('mdevice')!=""){$md=Session::get('mdevice'); ?>
<script src="<?php echo url('/'); ?>/assets/js/cordova/<?php echo $md; ?>/cordova.js?v=<?php echo $v; ?>"></script>
<script src="<?php echo url('/'); ?>/assets/js/cordova/<?php echo $md; ?>/kstych.js?v=<?php echo $v; ?>"></script>
<?php } ?>
</body>
</html>
<?php
use App\Models\User;
$data = Auth::user()->data();
$meta = Auth::user()->meta();
if (!isset($data['personal'])) $data['personal'] = array();
$user = Auth::user();
$tmodules = $modules;
$modules = array();
$dispnames = array();
foreach ($tmodules as $mname => $marr) {
if (!isset($modules[$mname])) {
if (!in_array($marr['disp'], array_values($dispnames))) {
$modules[$mname] = $marr;
$dispnames[$mname] = $marr['disp'];
} else {
$key = array_search($marr['disp'], $dispnames);
$modules[$key]['submenu'] = array_merge($modules[$key]['submenu'], $marr['submenu']);
}
}
}
?>
<!-- panel left -->
<div class="pushy pushy-left">
<div class="desc_imgdiv">
<div class="pushy-user-desc">
<img src="<?php echo $user->fetchphoto(); ?>">
<h4><?php echo $user->dispname(); ?></h4>
<span><i class="fa fa-pencil-square-o"></i></span>
<div style="clear:both"></div>
<p><?php echo $user->email; ?></p>
</div>
</div>
<?php $active = "active";
foreach ($modules as $mname => $marr) {
if (isset($marr['submenu'])) {
?>
<div class=wave-btn style='width:100%'>
<div class=pushy-submenu>
<i class="fa fa-fw fa-<?php echo $marr['icon']; ?>"></i>
<h5><?php echo $marr['disp']; ?></h5>
<ul>
<?php
foreach ($marr['submenu'] as $submenu => $submenuarr) {
$p = 1;
if (isset($submenuarr[1])) {
$p = 0;
if (Auth::user()->moduleACL($mname, true, true, false) && $submenuarr[1] == "W") $p = 1;
if (Auth::user()->moduleACL($mname, true, true, true) && $submenuarr[1] == "A") $p = 1;
}
if ($p == 1) {
?>
<li class="pushy-link"><a href="#" data-ajax='false' onclick="<?php echo $submenuarr[0]; ?>return false;"><?php echo $submenu; ?></a></li>
<?php
}
}
?>
</ul>
</div>
</div>
<?php
} else if ($marr['onclick'] != "") {
?>
<div class=wave-btn style='width:100%'>
<div class="pushy-menu">
<i class="fa fa-fw fa-<?php echo $marr['icon']; ?>"></i>
<h5 class="pushy-link" onclick="<?php echo $marr['onclick']; ?>return false;"><?php echo $marr['disp']; ?></h5>
</div>
</div>
<?php }
$active = "";
} ?>
<div class="pushy-menu">
<i class="fa fa-fw fa-power-off"></i>
<h5 class="pushy-link" onclick="doLogout(0);return false;">Logout</h5>
</div>
</div>
<div class='pushy-site-overlay'></div>
<!-- /panel left -->
<div id="menu-top">
<div class=navbar>
<img src="custom/logo_s.png" class=border-none height=30px style='float:left'>
<div class="user-action pull-left wave-btn" style='height:40px;padding-top:0px;margin-top:0px;'>
<div class="dropdown username" style='padding-top:5px;margin-top:5px;'><a class="dropdown-toggle " href="#" onclick='menuAction("dashboard");$(this).blur();return false;'><b><?php echo Config::get("app.name"); ?> </b></a></div>
</div>
<ul class="main pull-left" id=topmainmenureturn style='display:none'>
<li onclick='returnMenuClick("dashboard");return false;'><a href="#"> Home </a></li>
</ul>
<ul class="main pull-left hidden-xs hidden-sm" id=topmainmenu>
<?php $active = "active";
foreach ($modules as $mname => $marr) { //TODO hidden-xs
if (isset($marr['submenu'])) {
?>
<li class='homemenu dropdown <?php echo $active; ?>' onclick='' id=mainmenu<?php echo $marr['disp']; ?>><a href="#" data-toggle="dropdown"> <?php echo $marr['disp']; ?> </a>
<ul class="dropdown-menu">
<?php
foreach ($marr['submenu'] as $submenu => $submenuarr) {
$p = 1;
if (isset($submenuarr[1])) {
$p = 0;
if (Auth::user()->moduleACL($mname, true, true, false) && $submenuarr[1] == "W") $p = 1;
if (Auth::user()->moduleACL($mname, true, true, true) && $submenuarr[1] == "A") $p = 1;
}
if ($p == 1) {
?>
<li><a href="#" onclick="<?php echo $submenuarr[0]; ?>return false;"><?php echo $submenu; ?></a></li>
<?php
}
}
?>
</ul>
</li>
<?php
} else if ($marr['onclick'] != "") {
?>
<li class='homemenu <?php echo $active; ?>' onclick="<?php echo $marr['onclick']; ?>return false;" id=mainmenu<?php echo $marr['disp']; ?>>
<a href="#"><?php echo $marr['disp']; ?></a>
</li>
<?php }
$active = "";
} ?>
<!-- change start code -->
<li style="color: #626771;font-weight: 600;height: 40px;line-height: 40px;padding: 0 10px;text-decoration: none;display: block;">
<div id="countdown">&nbsp;</div>
</li>
<!-- change end code -->
</ul>
<div class="user-action pull-right" id=topmainusermenu>
<?php
$acctype = Auth::user()->usertype;
if ($data["subscription"] == "Free") {
$datapercent = "100";
$subscstr = "Free Subscription";
$subscstr2 = "You are using a Free subscription <b>$acctype</b> account, there is no expiry";
} else if ($data["subscription"] == "Trial") {
$daysleft = intval(($data["subscriptiondata"][$acctype]['expiry'] - time()) / (24 * 60 * 60));
if ($daysleft < 0) $daysleft = 0;
$origdays = intval(($data["subscriptiondata"][$acctype]['expiry'] - $data["subscriptiondata"][$acctype]['created']) / (24 * 60 * 60));
$datapercent = round($daysleft * 100 / $origdays, 0);
$subscstr = "Trial Subscription";
$subscstr2 = "You are using a trial <b>$acctype</b> account, expiring in <b>$daysleft</b> days, after expiry this account will be converted to free learner account";
} else if ($data["subscription"] == "Expired") {
$datapercent = "0";
$subscstr = "Subscription Expired";
$subscstr2 = "You are using an expired <b>$acctype</b> account, please renew your subscription to use full features";
} else {
$daysleft = intval(($data["subscriptiondata"][$acctype]['expiry'] - time()) / (24 * 60 * 60));
if ($daysleft < 0) $daysleft = 0;
$origdays = intval(($data["subscriptiondata"][$acctype]['expiry'] - $data["subscriptiondata"][$acctype]['created']) / (24 * 60 * 60));
$datapercent = round($daysleft * 100 / $origdays, 0);
$subscstr = $data["subscription"] . " Subscription";
$subscstr2 = "You are using an active <b>$acctype</b> account, expiring in <b>$daysleft</b> days, after expiry this account will be converted to free learner account";
}
?>
<ul class="colors pull-right visible-xs visible-sm wave-btn" style='margin-top:-3px;'>
<li class="dropdown">
<a href="#" class="menu-btn"><i class='fa fa-bars' style='font-size:20px'></i></a>
</li>
</ul>
<div class="dropdown username hidden-xs" style='float:right'>
<a class="dropdown-toggle" data-toggle="dropdown" href="#" onclick=''><?php echo $displayname; ?> <span class="caret"></span> </a>
<ul class="dropdown-menu pull-right" id=topuserdropmenu>
<li><a href="#" class="glyphicons user" onclick='menuAction("profile");return false;'><i></i> Profile</a></li>
<!--<li><a href="#" class="glyphicons list" onclick='menuAction("admin");return false;'><i></i> Timeline</a></li>-->
<li><a href="#" class="glyphicons book" onclick='menuAction("dashboard");return false;'><i></i> Dashboard</a></li>
<?php if (Auth::user()->moduleACL("Admin", true, true, false)) { ?>
<li><a href="#" class="glyphicons cogwheels" onclick='menuAction("admin");return false;'><i></i><?php echo Config::get("app.name"); ?> Admin</a></li>
<?php } ?>
<?php if (Auth::user()->moduleACL("User", true, true, false)) { ?>
<li><a href="#" class="glyphicons cogwheels" onclick='menuAction("user");return false;'><i></i> Manage Users</a></li>
<?php }
if (Auth::user()->moduleACL("Group", true, true, false)) { ?>
<li><a href="#" class="glyphicons cogwheels" onclick='menuAction("group");return false;'><i></i> Manage Groups</a></li>
<li><a href="#" class="glyphicons cogwheels" onclick='menuAction("role");return false;'><i></i> Manage Roles</a></li>
<?php } ?>
<?php if (Auth::user()->moduleACL("ImportExcel", true, true, false)) { ?>
<li><a href="#" class="glyphicons cogwheels" onclick='menuAction("import_excel");return false;'><i></i> Import Excel</a></li>
<?php } ?>
<li><a href="#" class="glyphicons circle_question_mark" onclick="dindexmenu('help&page=helpintroduction',this);return false;"><i></i> Help</a></li>
<li><a href="#" class="glyphicons cogwheels" onclick="menuAction('setting');return false;"><i></i>Settings</a></li>
<li><a href="#" class="glyphicons exit" onclick="doLogout(0);return false;"><i></i> Logout</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="clearfix"></div>
<script type="text/javascript">
redirect_to_password_reset();
function redirect_to_password_reset() {
var action = "password_expiry_check";
$.ajax({
type: "GET",
url: action,
success: function(result) {
console.log(result);
if (result == 'True') {
menuAction("profile");
}
}
});
}
</script>
\ No newline at end of file
<?php $__env->startSection('main_menu'); ?>
<?php echo $__env->make('layout.main_menu', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('top_menu'); ?>
<?php echo $__env->make('layout.top_menu', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('main_content'); ?>
<script>
$(document).ready(function(){
if(document.location.hash=="")doAjax("dashboard?tz="+(new Date()).getTimezoneOffset()+'&d=<?php echo Input::get("d"); ?>','','content','ajax_dashboard','singlethis','GET',function(){try{}catch(e){}});
else kstychHashFunction();
<?php if(Config::get("app.extAuth")!=""){ ?>doAjax("dashboard/r",'','','ajax_dashboard_r','singlethis','GET');<?php } ?>
if ($.browser.msie)document.location="msie";
if (typeof kDesktopNotification === 'function')kDesktopNotification("","","",10);
incomingPresense("","","");
});
if (navigator.userAgent.match(/(iPad|iPhone|iPod touch);.*CPU.*OS/i))
{
$("#menu-top").css({'padding-top':'20px','height':'60px'});
$("#content").css({'margin-top':'60px'});
}
document.addEventListener('deviceready', function() {
$(document).on('click', 'a[target="_system"],a[target="_blank"]', function (e) {
e.preventDefault();
var url = this.href;
if(navigator.app)navigator.app.loadUrl(url, { openExternal:true });
else if(innappbrowser)cordova.exec(function(){}, function(){}, "InAppBrowser", "open", [url, "_system", null]);
else window.open(url,"_system");
//$("#welcome_wizard_body").html("<iframe style='width:100%;min-height:400px;height:100%' src='"+url+"'></iframe>");
//$("#welcome_wizard").modal('show');
});
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layout.layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
\ No newline at end of file
<?php
readfile("assets/components/library/jquery/jquery.min.js");echo "\n\n";
readfile("assets/components/library/jquery/jquery-migrate.min.js");echo "\n\n";
readfile("assets/components/plugins/link-preview/linkPreview.js");echo "\n\n";
readfile("assets/components/library/jquery-ui/js/jquery-ui-1.8.2.custom.min.js");echo "\n\n";
readfile("assets/components/plugins/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js");echo "\n\n";
readfile("assets/js/sweetalert.min.js");echo "\n\n";
<?php
$reportTitle = 'TC Productivity MIS';
$returnblade = 'productivity_mis';
$view_path = Config::get('view.paths');
include_once($view_path[0].'/layout/module/dialer/reporthead.blade.php');
$alist=$alist->select(DB::raw("c.user_id, count(DISTINCT case when c.lan IS NOT NULL then c.lan end) customer, count(*) count, sum(case when c.userstatus = 'Contacted' then 1 else 0 end) contacted, sum(case when (c.userstatus = 'Contacted' && c.resultCode = 'PTP') then 1 else 0 end) ptp, sum(case when (c.userstatus = 'Contacted' && c.resultCode = 'BP') then 1 else 0 end) bp"))->groupBy('c.user_id');
if(Input::has("spcode"))
{
if(!$joined) $alist=$alist->leftjoin('records AS r', 'r.id', '=', 'c.crm_id');
$alist=$alist->addSelect(DB::raw(" r.state, r.specialCode"));
$alist=$alist->groupBy('r.state');
$alist=$alist->groupBy('r.SpecialCode');
}
$alist=$alist->get();
$i=1;
$reporthead=array("#","Telecaller","TelecallerID","Supervisor","Account","Attempt","AI","Contact","CI","Contact(%)","PTP","PTP(%)","BP","BP(%)");
$reportarray=array();
$totalarray =array();
if(count($alist))
foreach($alist as $aline)
{
$tuser=$userarr[$aline->user_id];
if(!isset($reportarray[$aline->user_id])) {
$reportarray[$aline->user_id]=array("#"=>$i++,"Telecaller"=>$tuser->telecaller,"TelecallerID"=>$tuser->username,"Supervisor"=>$tuser->sepervisor);
}
$reportarray[$aline->user_id]["Account"] = $aline->customer;
$reportarray[$aline->user_id]["Attempt"] = $aline->count;
$reportarray[$aline->user_id]["AI"] = number_format( ($aline->customer) ? ($aline->count/$aline->customer) : 0, 2 );
$reportarray[$aline->user_id]["Contact"] = $aline->contacted;
$reportarray[$aline->user_id]["CI"] = number_format( ($aline->customer) ? ($aline->contacted/$aline->customer) : 0, 2 );
$reportarray[$aline->user_id]["Contact(%)"] = number_format( ($aline->count) ? ($aline->contacted/$aline->count) * 100 : 0, 2 ) . '%';
$reportarray[$aline->user_id]["PTP"] = $aline->ptp;
$reportarray[$aline->user_id]["PTP(%)"] = number_format( ($aline->contacted) ? ($aline->ptp/$aline->contacted) * 100 : 0, 2 ) . '%';
$reportarray[$aline->user_id]["BP"] = $aline->bp;
$reportarray[$aline->user_id]["BP(%)"] = number_format( ($aline->ptp) ? ($aline->bp/$aline->ptp) * 100 : 0, 2 ) . '%';
if(Input::has("spcode")) {
$reportarray[$aline->user_id]["State"] = $aline->state;
$reportarray[$aline->user_id]["SpecialCode"]= $aline->specialCode;
$specialarray[$aline->user_id . $aline->state . $aline->specialCode] = $reportarray[$aline->user_id];
}
$totalarray["Account"] += $aline->customer;
$totalarray["Attempt"] += $aline->count;
$totalarray["AI"] = number_format(@($totalarray["Attempt"]/$totalarray["Account"]), 2 );
$totalarray["Contact"] += $aline->contacted;
$totalarray["CI"] = number_format(@($totalarray["Contact"]/$totalarray["Account"]), 2 );
$totalarray["Contact(%)"]= number_format(@($totalarray["Contact"]/$totalarray["Attempt"]) * 100, 2 ) . '%';
$totalarray["PTP"] += $aline->ptp;
$totalarray["PTP(%)"] = number_format(@($totalarray["PTP"]/$totalarray["Contact"]) * 100, 2 ) . '%';
$totalarray["BP"] += $aline->bp;
$totalarray["BP(%)"] = number_format(@($totalarray["BP"]/$totalarray["PTP"]) * 100, 2 ) . '%';
}
if(Input::has("spcode"))
{
$reporthead=array("TelecallerID","Telecaller","State","SpecialCode","Account","Attempt","AI","Contact","CI","Contact(%)","PTP","PTP(%)");
include_once(app_path().'/lib/phpexcel/PHPExcel.php');
$inputFileType = "Excel5";
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$objPHPExcel = $objReader->load("assets/extras/blank.xls");
$baseRow = 2;
$index_count = 0;
foreach ($reporthead as $head => $headval){
$colstr=PHPExcel_Cell::stringFromColumnIndex($index_count);
$objPHPExcel->getActiveSheet()->setCellValue($colstr."1", $headval);
$index_count++;
}
if(count($specialarray))
foreach($specialarray as $uid=>$uarr)
{
$row = $baseRow++;
$index_count = 0;
foreach ($reporthead as $head => $headval){
$colstr=PHPExcel_Cell::stringFromColumnIndex($index_count);
$objPHPExcel->getActiveSheet()->setCellValue($colstr.$row, $uarr[$headval]);
$index_count++;
}
}
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="specialcode_mis.xls"');
header('Cache-Control: max-age=0');
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, $inputFileType);
$objWriter->save('php://output');
return ;
}
$reportarray["Total"] = array_merge(array("Telecaller"=>"Total"),$totalarray);
if(Input::has("dllogxls"))
{
include_once(app_path().'/lib/phpexcel/PHPExcel.php');
$inputFileType = "Excel5";
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$objPHPExcel = $objReader->load("assets/extras/blank.xls");
$baseRow = 3;
$index_count = 0;
foreach ($reporthead as $head => $headval){
$colstr=PHPExcel_Cell::stringFromColumnIndex($index_count);
$objPHPExcel->getActiveSheet()->setCellValue($colstr."1", $headval);
$index_count++;
}
if(count($reportarray))
foreach($reportarray as $uid=>$uarr)
{
$row = $baseRow++;
$index_count = 0;
foreach ($reporthead as $head => $headval){
$colstr=PHPExcel_Cell::stringFromColumnIndex($index_count);
$objPHPExcel->getActiveSheet()->setCellValue($colstr.$row, $uarr[$headval]);
$index_count++;
}
}
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="productivity_mis.xls"');
header('Cache-Control: max-age=0');
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, $inputFileType);
$objWriter->save('php://output');
return ;
}
$highestColumn = sizeof($reporthead);
if(count($reportarray) > 1) {
$outhead="<tr>";$outstr="";$outsubhead="<tr>";
foreach ($reporthead as $head => $headval){
$outhead.="<td align='center'>".$headval."</td>";
}
$outsubhead.="</tr>";
$outhead.="</tr>".$outsubhead;
$utotalarr = array("Telecaller"=>'Total');
if(count($reportarray))
foreach($reportarray as $uid=>$uarr)
{
$outstr.="<tr>";
for ($head = 0; $head < $highestColumn; $head++){
if($head < 3) {
$outstr.="<td>".$uarr[$reporthead[$head]]."</td>";
}
else {
$outstr.="<td align='right'>".$uarr[$reporthead[$head]]."</td>";
}
}
$outstr.="</tr>";
}
}
else {
$outhead.="<tr><td>No Records Found.</td></tr>";
}
?>
<?php echo $__env->make('layout.module.dialer.searchform', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<div style="overflow: auto; margin-top: 10px;">
<table id=logtable class='footable table table-striped table-bordered table-white table-primary footable-loaded' style='font-size:12px; margin:0; border:1px solid #BBB;'>
<thead><?php echo $outhead; ?></thead>
<?php echo $outstr; ?>
</table>
</div>
</div>
<script>
function dlSpecialCodeXls()
{
var searchStr = dataString();
window.open('dialer/<?php echo e($returnblade); ?>?spcode=1&'+searchStr);
return false;
}
$("#download_btn").append("<button class='pull-right btn btn-sm btn-default' onclick='dlSpecialCodeXls();return false;' title='Download' style='margin-right: 5px;'><i class='fa fa-download'></i> Special Code</button>");
</script>
\ No newline at end of file
<?php
if(Config::get('app.webdomain')==Config::get('app.domain'))
{
?>
<script>document.location='login';</script>
<?php
}
else
{
echo "<script>document.location='".Config::get('app.webdomain')."';</script>";
}
?>
<?php
$reportTitle = 'Next Action Report';
$returnblade = 'nextaction';
$view_path = Config::get('view.paths');
include_once($view_path[0].'/layout/module/dialer/reporthead.blade.php');
$alist=$alist->where('userstatus','=','Contacted')->where('resultCode','=','PTP');
$alist=$alist->get();
$i=1;
$reporthead=array("#","Telecaller","TelecallerID","Supervisor","Customers","PTP");
$reportarray=array();
if(count($alist))
foreach($alist as $aline)
{
$tuser=$userarr[$aline->user_id];
if(!isset($reportarray[$aline->user_id]))$reportarray[$aline->user_id]=array("#"=>$i++,"Telecaller"=>$tuser->telecaller,"TelecallerID"=>$tuser->username,"Supervisor"=>$tuser->sepervisor,"Customers"=>0,"PTP"=>0,"Customer_lists"=>array());
if(!is_null($aline->lan)) {
$reportarray[$aline->user_id]["Customer_lists"][] = $aline->lan;
}
$reportarray[$aline->user_id]["Customers"] = count(array_unique($reportarray[$aline->user_id]["Customer_lists"]));
$reportarray[$aline->user_id]["PTP"]++;
//$ststr=$aline->userstatus."-".$aline->usersubstatus;
$ststr=$aline->nextActionCode;
if(!in_array($ststr,$reporthead))$reporthead[]=$ststr;
$reportarray[$aline->user_id][$ststr]++;
}
$highestColumn = sizeof($reporthead);
if(count($reportarray)) {
$outhead="<tr>";$outstr="";
for ($head = 0; $head < $highestColumn; $head++){
if($reporthead[$head] == '#') {
$mode_str = "<a onclick='displayMode(".'"summation"'.");return false;' href='#'><i class='fa fa-plus-square-o'></i></a> / <a onclick='displayMode(".'"percent"'.");return false;' href='#'>%</a>";
$outhead.="<td>".$mode_str."</td>";
}
else {
$outhead.="<td>".$reporthead[$head]."</td>";
}
}
$outhead.="</tr>";
$utotalarr = array("Telecaller"=>'Total');
foreach($reportarray as $uid=>$uarr)
{
$outstr.="<tr>";
for ($head = 0; $head < $highestColumn; $head++){
if($head < 4) {
$data_str = $uarr[$reporthead[$head]];
}
elseif($head < 5) {
$data_str = $uarr[$reporthead[$head]];
$utotalarr[$reporthead[$head]] += $uarr[$reporthead[$head]];
}
else {
$data_str = '<span class="summation" style="display:block;">'.$uarr[$reporthead[$head]].'</span>';
$data_str .= '<span class="percent" style="display:none;">'.number_format(@($uarr[$reporthead[$head]]/$uarr['PTP']) * 100, 2 ).'%</span>';
$data_str = '<a href="#" onclick="breakupXls(\'nextaction\',\''.$uid.'\',\''.$reporthead[$head].'\')">' . $data_str . '</a>';
$utotalarr[$reporthead[$head]] += $uarr[$reporthead[$head]];
}
$outstr.="<td>".$data_str."</td>";
}
$outstr.="</tr>";
}
$outstr.="<tr>";
for ($head = 0; $head < $highestColumn; $head++)
{
if($head < 5) {
$data_str = $utotalarr[$reporthead[$head]];
}
else {
$data_str = '<span class="summation" style="display:block;">'.$utotalarr[$reporthead[$head]].'</span>';
$data_str .= '<span class="percent" style="display:none;">'.number_format(@($utotalarr[$reporthead[$head]]/$utotalarr['PTP']) * 100, 2 ).'%</span>';
$data_str = '<a href="#" onclick="breakupXls(\'nextaction\',\'All\',\''.$reporthead[$head].'\')">' . $data_str . '</a>';
}
$outstr.="<td>".$data_str."</td>";
}
$outstr.="</tr>";
}
else {
$outhead.="<tr><td>No Records Found.</td></tr>";
}
if(Input::has("dllogxls"))
{
include_once(app_path().'/lib/phpexcel/PHPExcel.php');
$inputFileType = "Excel5";
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$objPHPExcel = $objReader->load("assets/extras/blank.xls");
$baseRow = 2;
$highestColumn = sizeof($reporthead);
for ($head = 0; $head < $highestColumn; $head++){
$colstr=PHPExcel_Cell::stringFromColumnIndex($head);
$objPHPExcel->getActiveSheet()->setCellValue($colstr."1", $reporthead[$head]);
}
foreach($reportarray as $uid=>$uarr)
{
$row = $baseRow++;
$col = 0;
for ($head = 0; $head < $highestColumn; $head++){
$colstr=PHPExcel_Cell::stringFromColumnIndex($head);
$objPHPExcel->getActiveSheet()->setCellValue($colstr.$row, $uarr[$reporthead[$head]]);
}
}
$row++;
for ($head = 0; $head < $highestColumn; $head++){
$colstr=PHPExcel_Cell::stringFromColumnIndex($head);
$objPHPExcel->getActiveSheet()->setCellValue($colstr.$row, $utotalarr[$reporthead[$head]]);
}
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="NextActionCode.xls"');
header('Cache-Control: max-age=0');
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, $inputFileType);
$objWriter->save('php://output');
return ;
}
//charts
$cat1=array();
$cat1arr=array();
foreach($reportarray as $uid=>$uarr)
{
$cat1[]="'$uarr[Telecaller]'";
for ($head = 6; $head < $highestColumn; $head++){
if(!isset($cat1arr[$reporthead[$head]]))$cat1arr[$reporthead[$head]]=array();
$cat1arr[$reporthead[$head]][$uarr["#"]]=round($uarr[$reporthead[$head]],1);
if(empty($cat1arr[$reporthead[$head]][$uarr["#"]]))$cat1arr[$reporthead[$head]][$uarr["#"]]=0;
}
}
$cat1arrstr="";
foreach($cat1arr as $name=>$data)
{
$extra="";if($name=="InboundDROP-InboundDROP")$extra=",visible: false";
$cat1arrstr.="{ name: '$name',\ndata : [";
$cat1arrstr.=implode(",",$data);
$cat1arrstr.="] $extra },\n";
}
$cat2=array();
foreach($reportarray as $uid=>$uarr)
{
for ($head = 6; $head < $highestColumn; $head++){
$cat2["'".$reporthead[$head]."'"]+=round($uarr[$reporthead[$head]],1);
}
}
?>
<?php echo $__env->make('layout.module.dialer.searchform', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<div class=col-md-6 style='border:1px solid #BBB;'>
<div id=userlogschart1 style='min-height:250px;width:100%'></div>
</div>
<div class=col-md-6 style='border:1px solid #BBB;'>
<div id=userlogschart2 style='min-height:250px;width:100%'></div>
</div>
<div style='clear:both'></div>
<div style="overflow: auto; margin-top: 10px;">
<table id=logtable class='footable table table-striped table-bordered table-white table-primary footable-loaded' style='font-size:12px; margin:0; border:1px solid #BBB;'>
<thead><?php echo $outhead; ?></thead>
<?php echo $outstr; ?>
</table>
</div>
</div>
<script>
$(function () {
$('#userlogschart1').highcharts({
chart: {
type: 'column'
},
title: {
text: 'Userwise Next Action Count',
style: {
fontSize: '14px'
}
},
xAxis: {
labels:{
rotation: -45,
enabled:true//default is true
},
categories: [<?php echo implode(",",$cat1); ?>]
},
yAxis: {
min: 0,
title: {
text: ''
},
stackLabels: {
enabled: false,
}
},
tooltip: {
headerFormat: '<b>{point.x}</b><br/>',
pointFormat: '{series.name}: {point.y}<br/>Total: {point.stackTotal}'
},
plotOptions: {
column: {
stacking: 'normal',
dataLabels: {
enabled: false,
}
}
},
series: [<?php echo $cat1arrstr; ?>]
});
});
$(function () {
$('#userlogschart2').highcharts({
chart: {
type: 'column'
},
title: {
text: 'Next Action Count',
style: {
fontSize: '14px'
}
},
subtitle: {
text: ''
},
xAxis: {
categories: [<?php echo implode(",",array_keys($cat2)); ?>],
crosshair: true,
labels:{
enabled:true//default is true
},
},
yAxis: {
min: 0,
title: {
text: ''
}
},
tooltip: {
headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
'<td style="padding:0"><b>{point.y}</b></td></tr>',
footerFormat: '</table>',
shared: true,
useHTML: true
},
plotOptions: {
column: {
pointPadding: 0.2,
borderWidth: 0
}
},
series: [{
name: 'Count',
data: [<?php echo implode(",",array_values($cat2)); ?>]
},]
});
});
</script>
\ No newline at end of file
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!