a07f847b by Nitesh

For gitignore file

1 parent 9103ffcc
Showing 104 changed files with 324 additions and 4306 deletions
1 APP_ENV=local 1 APP_ENV=local
2 APP_DEBUG=true 2 APP_DEBUG=true
3 APP_ADMIN_DEBUG=true 3 APP_ADMIN_DEBUG=true
4 APP_LOG_LEVEL=error 4 APP_KEY=base64:FzLEKoceiXE5/bBtPxlLyFOk4qtK3hmSyh+AZ1y2+LE=
5 APP_KEY=LEynnBaQoqsLncOWZwgdtfxxWU2hEyfp 5 APP_PROTOCOL=https://
6 APP_PROTOCOL=http://
7 app_name=Flexydial 6 app_name=Flexydial
8 app_title=Flexydial 7 app_title=Flexydial
9 app_domain=localhost:8000 8 app_domain=fullerton.flexydial
10 web_domain=localhost:8000 9 web_domain=fullerton.flexydial
11 app_ip=localhost 10 app_ip=192.168.3.242
11 central_ip=192.168.3.242
12 didnumber=-8
12 asterisk_slaves=192.168.3.242:1001:2000:1:240 13 asterisk_slaves=192.168.3.242:1001:2000:1:240
13 asterisk_manager=192.168.3.242 14 asterisk_manager=192.168.3.242
14 asterisk_extensions=31330,_X! 15 asterisk_extensions=31330,_X!
15 16 sip_dialstr=SIP/GATEWAY/
16 17
17 APP_Multiple_Logins=yes 18 APP_Multiple_Logins=yes
18 kDialer_keeplocalconf=1 19 kDialer_keeplocalconf=1
19 20
20 kstych_viewportMeta=responsive:1:1 21 kstych_viewportMeta=responsive:1:1
21 22
22 DB_HOST=192.168.3.234 23 DB_HOST=localhost
23 DB_DATABASE=fullerton 24 DB_DATABASE=fullerton
24 DB_USERNAME=root 25 DB_USERNAME=root
25 DB_PASSWORD=yb9738z 26 DB_PASSWORD=yb9738z
26 27
27 CACHE_DRIVER=database 28 CACHE_DRIVER=file
28 SESSION_DRIVER=database 29 SESSION_DRIVER=database
29 SESSION_LIFEMin=43200 30 SESSION_LIFEMin=43200
30 QUEUE_DRIVER=sync 31 QUEUE_DRIVER=sync
31 32
32 #MAIL_DRIVER=smtp 33 MAIL_DRIVER=smtp
33 #MAIL_HOST=localhost 34 MAIL_HOST=localhost
34 #MAIL_PORT=587 35 MAIL_PORT=587
35 #MAIL_USERNAME=mail 36 MAIL_USERNAME=mail
36 #MAIL_PASSWORD=mail 37 MAIL_PASSWORD=mail
37 #[email protected] 38 [email protected]
38 39
39 AWS_KEY= 40 AWS_KEY=
40 AWS_Secret= 41 AWS_Secret=
...@@ -56,4 +57,3 @@ xssGlobal=tag,hent ...@@ -56,4 +57,3 @@ xssGlobal=tag,hent
56 xssGlobalIgnoreKeys=content,pdata,courseintroductiondiv,coursecoverphoto,data,rlog,rstring 57 xssGlobalIgnoreKeys=content,pdata,courseintroductiondiv,coursecoverphoto,data,rlog,rstring
57 58
58 MobileTitle=Flexydial 59 MobileTitle=Flexydial
59
......
...@@ -1333,7 +1333,7 @@ class DialerController extends Controller ...@@ -1333,7 +1333,7 @@ class DialerController extends Controller
1333 { 1333 {
1334 $wakka = new KHRMSLib(); 1334 $wakka = new KHRMSLib();
1335 $client = Input::get("client", ""); 1335 $client = Input::get("client", "");
1336 Log::info("APP_Test:" + env('app_ip')); 1336 // Log::info("APP_Test:" + env('app_ip'));
1337 $roclientstr = array(); 1337 $roclientstr = array();
1338 $didlinesstr = array(); 1338 $didlinesstr = array();
1339 if (Auth::user()->exten != "") $didlinesstr[] = Auth::user()->exten; 1339 if (Auth::user()->exten != "") $didlinesstr[] = Auth::user()->exten;
...@@ -1360,7 +1360,7 @@ class DialerController extends Controller ...@@ -1360,7 +1360,7 @@ class DialerController extends Controller
1360 1360
1361 if ($limit > 0) { 1361 if ($limit > 0) {
1362 1362
1363 $tusers = $wakka->getPersons("status='New' and mobile!='' and $roclientstr order by dialer_lastcall asc limit $limit"); 1363 $tusers = $wakka->getPersons("status IN ('Called','Incall') and mobile!='' and $roclientstr order by dialer_lastcall asc limit $limit");
1364 foreach ($tusers as $tuser) if (!isset($users[$tuser['id']])) $users[$tuser['id']] = $tuser; 1364 foreach ($tusers as $tuser) if (!isset($users[$tuser['id']])) $users[$tuser['id']] = $tuser;
1365 $limit = $limit - sizeof($tusers); 1365 $limit = $limit - sizeof($tusers);
1366 } 1366 }
......
1 <?php
2 namespace App\Http\Controllers;
3 use Auth;
4 use DB;
5 use Input;
6 use Log;
7 use Response;
8
9 class PromiseClass {
10 private $callbacks = array();
11 private $last_return;
12 function promise($users = null,$crmcall = null,$promise) {
13 if (get_class($promise) == 'Promise') {
14 return $promise;
15 } else if (is_callable($promise)) {
16 $this->then($promise);
17 return $this;
18 }
19 }
20 public function then (callable $callback) {
21 $this->callbacks[] = $callback;
22 return $this;
23 }
24 public function resolve () {
25 $callback = array_shift($this->callbacks);
26 if (is_callable($callback)) {
27 $this->last_return = $callback($this->last_return);
28 }
29 if (count($this->callbacks) > 0) {
30 $this->resolve();
31 }
32 }
33 }
34
35 ?>
...\ No newline at end of file ...\ No newline at end of file
1 php artisan config:cache
2 php artisan config:clear
3 php artisan cache:clear
4 php artisan route:clear
5 php artisan view:clear
6 php artisan optimize
7 composer dump-autoload
1 #!/bin/bash 1 #!/bin/bash
2 #################################################################################### 2 ####################################################################################
3 ##### (c) Siddharth Upmanyu ############################################# 3 ##### (c) Flexydial #############################################
4 ##### Install Instructions ############################################# 4 ##### Install Instructions #############################################
5 ##### Fedora 23/24 (64 bit) ############################################# 5 ##### Fedora 23/24 (64 bit) #############################################
6 ##### Copy Code to /home and configure details in custom/.env ############ 6 ##### Copy Code to /home and configure details in custom/.env ############
...@@ -189,7 +189,7 @@ function astFilesSetup ...@@ -189,7 +189,7 @@ function astFilesSetup
189 sed -i "s/REPLACEMANAGER/$asterisk_manager/g" /etc/asterisk/manager.conf 189 sed -i "s/REPLACEMANAGER/$asterisk_manager/g" /etc/asterisk/manager.conf
190 sed -i "s/REPLACESERVERIP/$app_ip/g" /etc/asterisk/rtp.conf 190 sed -i "s/REPLACESERVERIP/$app_ip/g" /etc/asterisk/rtp.conf
191 191
192 cp -f $app_path/application/public/assets/extras/data/asterisk/asterisk.service /etc/systemd/system/ 192 # cp -f $app_path/application/public/assets/extras/data/asterisk/asterisk.service /etc/systemd/system/
193 193
194 AsteriskServers=$(echo $asterisk_slaves | tr "," "\n") 194 AsteriskServers=$(echo $asterisk_slaves | tr "," "\n")
195 for server in $AsteriskServers 195 for server in $AsteriskServers
...@@ -280,14 +280,14 @@ function restartServices ...@@ -280,14 +280,14 @@ function restartServices
280 } 280 }
281 function generalSetup 281 function generalSetup
282 { 282 {
283 #hostname localhost 283 hostname localhost
284 ulimit -n 65000 284 ulimit -n 65000
285 swapoff -a 285 swapoff -a
286 timedatectl set-timezone UTC 286 timedatectl set-timezone UTC
287 timedatectl set-ntp yes 287 timedatectl set-ntp yes
288 grep -q -F 'Storage=none' /etc/systemd/journald.conf || echo 'Storage=none' >> /etc/systemd/journald.conf 288 grep -q -F 'Storage=none' /etc/systemd/journald.conf || echo 'Storage=none' >> /etc/systemd/journald.conf
289 289
290 #chmod -R 777 $app_path/application/storage 290 chmod -R 777 $app_path/application/storage
291 chmod -R 777 $app_path/custom/app 291 chmod -R 777 $app_path/custom/app
292 } 292 }
293 function mysqlSetup 293 function mysqlSetup
...@@ -323,24 +323,20 @@ function dailyTasks ...@@ -323,24 +323,20 @@ function dailyTasks
323 if [ $nowtime -eq "000" ] 323 if [ $nowtime -eq "000" ]
324 then 324 then
325 325
326 ##rm -f $app_path/application/storage/logs/laravel-*.log 326 rm -f $app_path/application/storage/logs/laravel-*.log
327 touch $app_path/application/storage/logs/laravel-$(date +%Y-%m-%d).log 327 touch $app_path/application/storage/logs/laravel-$(date +%Y-%m-%d).log
328 chmod -R 777 $app_path/application/storage 328 chmod -R 777 $app_path/application/storage
329 chmod -R 777 $app_path/custom/app 329 chmod -R 777 $app_path/custom/app
330 330
331 #### Asterisk Date-wise Call Recording Folder creation START ###### 331 #### Asterisk Date-wise Call Recording Folder creation START ######
332 mkdir -p /var/spool/asterisk/astrec/$(date +%Y)/$(date +%m)/$(date +%d)/inb 332 mkdir -p /var/spool/asterisk/astrec/$(date +%Y)/$(date +%m)/$(date +%d)/inb
333 mkdir -p /var/spool/asterisk/astrec/$(date +%Y)/$(date +%m)/$(date +%d)/out 333 mkdir -p /var/spool/asterisk/astrec/$(date +%Y)/$(date +%m)/$(date +%d)/out
334 chown asterisk.asterisk -R /var/spool/asterisk/astrec/$(date +%Y)/$(date +%m)/$(date +%d) 334 chown asterisk.asterisk -R /var/spool/asterisk/astrec/$(date +%Y)/$(date +%m)/$(date +%d)
335 #### Asterisk Date-wise Call Recording Folder creation END ###### 335 #### Asterisk Date-wise Call Recording Folder creation END ######
336 mkdir -p $app_path/custom/db
337 chmod -R 777 $app_path/custom/db
338 336
339 ##### SIPxml Event log folder creation START ############################### 337 mkdir -p $app_path/custom/db
340 mkdir -p $app_path/application/storage/logs/sipmlevents/$(date +%Y-%m-%d)/ 338 chmod -R 777 $app_path/custom/db
341 chmod -R 777 $app_path/application/storage/logs/sipmlevents/$(date +%Y-%m-%d)/ 339
342 ############################################################################
343
344 mysqldump -u$DB_USERNAME -p$DB_PASSWORD --single-transaction $DB_DATABASE | gzip > $app_path/custom/db/$DB_DATABASE.sql.gz 340 mysqldump -u$DB_USERNAME -p$DB_PASSWORD --single-transaction $DB_DATABASE | gzip > $app_path/custom/db/$DB_DATABASE.sql.gz
345 fi 341 fi
346 } 342 }
...@@ -352,7 +348,7 @@ function astPAMICheck ...@@ -352,7 +348,7 @@ function astPAMICheck
352 IFS=':' read -r -a ServerArr <<< "$server" 348 IFS=':' read -r -a ServerArr <<< "$server"
353 349
354 if ! screen -list | grep -q "AMI_$app_domain${ServerArr[0]}"; then 350 if ! screen -list | grep -q "AMI_$app_domain${ServerArr[0]}"; then
355 /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]}" 351 /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]}"
356 fi 352 fi
357 done 353 done
358 } 354 }
...@@ -365,7 +361,7 @@ function createCall ...@@ -365,7 +361,7 @@ function createCall
365 IFS=':' read -r -a ServerArr <<< "$server" 361 IFS=':' read -r -a ServerArr <<< "$server"
366 362
367 if ! screen -list | grep -q "CreateCall_$app_domain${ServerArr[0]}"; then 363 if ! screen -list | grep -q "CreateCall_$app_domain${ServerArr[0]}"; then
368 /usr/bin/screen -d -L -m -S CreateCall_$app_domain${ServerArr[0]} bash -c "cd $app_path/application/;php $app_path/application/artisan CreateCall" 364 /usr/bin/screen -d -m -S CreateCall_$app_domain${ServerArr[0]} bash -c "cd $app_path/application/;php $app_path/application/artisan CreateCall"
369 fi 365 fi
370 done 366 done
371 } 367 }
...@@ -420,8 +416,8 @@ fi ...@@ -420,8 +416,8 @@ fi
420 ######################################################################## 416 ########################################################################
421 417
422 ######################################################################## Main Script 418 ######################################################################## Main Script
423 waitForLock 419 #waitForLock
424 if [ "$OSNAME" == "Fedora" ] && [ $OSVER -gt 21 ] ; then 420 #if [ "$OSNAME" == "Fedora" ] && [ $OSVER -gt 21 ] ; then
425 pgrep httpd 421 pgrep httpd
426 if [ $? -ne 0 ] || [ "$1" == "server" ] ; then 422 if [ $? -ne 0 ] || [ "$1" == "server" ] ; then
427 423
...@@ -436,7 +432,7 @@ if [ "$OSNAME" == "Fedora" ] && [ $OSVER -gt 21 ] ; then ...@@ -436,7 +432,7 @@ if [ "$OSNAME" == "Fedora" ] && [ $OSVER -gt 21 ] ; then
436 mysqlSetup 432 mysqlSetup
437 433
438 restartServices 434 restartServices
439 # schemaSetup 435 #schemaSetup
440 436
441 fi 437 fi
442 sshdCheck 438 sshdCheck
...@@ -444,7 +440,7 @@ if [ "$OSNAME" == "Fedora" ] && [ $OSVER -gt 21 ] ; then ...@@ -444,7 +440,7 @@ if [ "$OSNAME" == "Fedora" ] && [ $OSVER -gt 21 ] ; then
444 astPAMICheck 440 astPAMICheck
445 createCall 441 createCall
446 hangUpCall 442 hangUpCall
447 fi 443 #fi
448 clearLock 444 #clearLock
449 cd $app_path/application;php artisan schedule:run 445 cd $app_path/application;php artisan schedule:run
450 ######################################################################## 446 ########################################################################
......
This diff is collapsed. Click to expand it.
1 1587367592s:26:"errorInternal Server Error";
...\ No newline at end of file ...\ No newline at end of file
This diff could not be displayed because it is too large.
1 1587366748i:10;
...\ No newline at end of file ...\ No newline at end of file
This diff could not be displayed because it is too large.
1 1587446284s:26:"errorInternal Server Error";
...\ No newline at end of file ...\ No newline at end of file
This diff could not be displayed because it is too large.
1 1587446252i:10;
...\ No newline at end of file ...\ No newline at end of file
1 1587367592i:10;
...\ No newline at end of file ...\ No newline at end of file
1 1587446284i:10;
...\ No newline at end of file ...\ No newline at end of file
This diff could not be displayed because it is too large.
1 1587277920i:1;
...\ No newline at end of file ...\ No newline at end of file
1 1587277912s:30:"syntax error, unexpected ';'[]";
...\ No newline at end of file ...\ No newline at end of file
1 1587446283i:10;
...\ No newline at end of file ...\ No newline at end of file
1 1587367592i:10;
...\ No newline at end of file ...\ No newline at end of file
1 1587277920s:30:"syntax error, unexpected ';'[]";
...\ No newline at end of file ...\ No newline at end of file
1 1587446897i:10;
...\ No newline at end of file ...\ No newline at end of file
1 1587277912i:1;
...\ No newline at end of file ...\ No newline at end of file
1 <style>
2 #logtable.td{vertical-align:top;}#logtable.tr{height:28px;overflow-y:hidden;}
3 .select2-container-multi{height: 90px; overflow-y: auto;border: 1px solid #efefef;border-radius: 3px !important;}
4 .select2-container-active{height: 90px; overflow-y: auto;border: 1px solid #5897fb;border-radius: 3px !important;}
5 .select2-container-multi.select2-container-active.select2-choices{border:none !important; box-shadow: none !important;}
6 .select2-choices{border:none !important; box-shadow: none !important;}
7 .select2-drop,.select2-drop-active{border-color: #5897fb;margin-top: -9px;}
8 </style>
9
10 <div class=innerAll>
11
12 <h4 style="float:left;width:50%;margin:10px 0;"><?php echo e($reportTitle); ?></h4>
13 <div style="float:right;width:50%" id="download_btn">
14 <button class="pull-right btn btn-sm btn-default" onclick='dlAgentlogXls();return false;' title='Download'><i class='fa fa-download'></i> Download</button>
15 </div>
16 <div style="clear:both"></div>
17 <hr style="margin-bottom: 5px;">
18 <div>
19 Search <input id=filter name="filter" type="text" style="border:1px solid #efefef; padding: 2px 10px;">&nbsp;&nbsp;
20 Date: From <input size=10 id='modfrom' name='modfrom' type='text' value='<?php echo date("Y-m-d",$logdate); ?>' onchange='statusLogReloadFun("");' />
21 <select id="modtime" style="border:1px solid #efefef;" onchange='statusLogReloadFun("");'>
22 <?php
23 foreach (range(0,23) as $hour) {
24 $selected = ($hour == $logtime) ? "selected" : "";
25 echo "<option value='$hour' $selected>".str_pad($hour, 2, "0", STR_PAD_LEFT) . ":00</option>";
26 }
27 ?></select>
28 To <input size=10 id='modto' name='modto' type='text' value='<?php echo date("Y-m-d",$logdateto); ?>' onchange='statusLogReloadFun("");' />
29 <select id="modtimeto" style="border:1px solid #efefef;" onchange='statusLogReloadFun("");'>
30 <?php
31 foreach (range(0,23) as $hour) {
32 $selected = ($hour == $logtimeto) ? "selected" : "";
33 echo "<option value='$hour' $selected>".str_pad($hour, 2, "0", STR_PAD_LEFT) . ":00</option>";
34 }
35 ?></select>&nbsp;&nbsp;
36 <button class="pull-right btn btn-sm btn-default" onclick='$("#advance").toggle();' title='Advance Search'><i class='fa fa-search'></i> Advance Search</button>
37
38 <div style="clear:both"></div>
39 <div style="margin-top: 5px; display:<?php echo e($displayAdv); ?>;" id="advance">
40 <div style="width: 25%;" class="pull-left">
41 Campaign<br />
42 <select id="campaignbox" multiple="multiple" style="width:96%" class=select2multi>
43 <?php foreach($clientlist as $c)
44 { $s="";
45 if(in_array($c, $campaign))$s='selected';
46 echo "<option value='$c' $s>$c</option>";
47 }?>
48 </select>
49 </div>
50 <div style="width: 25%;" class="pull-left">
51 State<br />
52 <select id="statebox" multiple="multiple" style="width:96%" class=select2multi>
53 <?php foreach($statelist as $c)
54 { $s="";
55 if(in_array($c, $state))$s='selected';
56 echo "<option value='$c' $s>$c</option>";
57 } ?>
58 </select>
59 </div>
60 <div style="width: 25%;" class="pull-left">
61 Product<br />
62 <select id="productbox" multiple="multiple" style="width:96%" class=select2multi>
63 <?php foreach($productlist as $c)
64 { $s="";
65 if(in_array($c, $product))$s='selected';
66 echo "<option value='$c' $s>$c</option>";
67 }?>
68 </select>
69 </div>
70 <div style="width: 25%;" class="pull-left">
71 Bucket<br />
72 <select id="bucketbox" multiple="multiple" style="width:96%" class=select2multi>
73 <?php foreach($bucketlist as $c)
74 { $s="";
75 if(in_array($c, $bucket))$s='selected';
76 echo "<option value='$c' $s>$c</option>";
77 } ?>
78 </select>
79 </div>
80 <div style="margin-top: 5px;" class="pull-left">
81 <button class="pull-right btn btn-sm btn-default" onclick='statusLogReloadFun("");' title='Search'><i class='fa fa-search'></i> Search</button>
82 </div>
83 </div>
84 </div>
85
86 <div style="clear:both"></div>
87 <hr style="margin:5px;">
88 <script>
89 $(document).ready(function() {
90 waitKeyUpRun("filter",function() { filter2(document.getElementById('filter'), 'logtable') },"2000");
91 $('#modfrom').datepicker({dateFormat: 'yy-mm-dd',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'});
92 $('#modto').datepicker({dateFormat: 'yy-mm-dd',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'});
93 });
94
95 function dataString()
96 {
97 var campaignStr = '';
98 $('#campaignbox :selected') .each(function(i, sel){
99 if(campaignStr != '') campaignStr = campaignStr + '||' + $(sel).val();
100 else campaignStr = $(sel).val();
101 });
102 var stateStr = '';
103 $('#statebox :selected') .each(function(i, sel){
104 if(stateStr != '') stateStr = stateStr + '||' + $(sel).val();
105 else stateStr = $(sel).val();
106 });
107 var productStr = '';
108 $('#productbox :selected') .each(function(i, sel){
109 if(productStr != '') productStr = productStr + '||' + $(sel).val();
110 else productStr = $(sel).val();
111 });
112 var bucketStr = '';
113 $('#bucketbox :selected') .each(function(i, sel){
114 if(bucketStr != '') bucketStr = bucketStr + '||' + $(sel).val();
115 else bucketStr = $(sel).val();
116 });
117 return 'logdate='+$("#modfrom").val()+'&logtime='+$("#modtime").val()+'&logdateto='+$("#modto").val()+'&logtimeto='+$("#modtimeto").val()+'&campaign='+campaignStr+'&state='+stateStr+'&product='+productStr+'&bucket='+bucketStr;
118 }
119 function statusLogReloadFun(sortby)
120 {
121 var sortstr='';if(sortby!="")sortstr="&sort="+sortby
122 var searchStr = dataString();
123 doAjax('dialer/<?php echo e($returnblade); ?>?'+searchStr+sortstr,'','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');
124 }
125 function dlAgentlogXls()
126 {
127 var searchStr = dataString();
128 window.open('dialer/<?php echo e($returnblade); ?>?dllogxls=1&'+searchStr);
129 return false;
130 }
131 function breakupXls(report,userId,column)
132 {
133 var searchStr = dataString();
134 window.open('dialer/breakupxls?report='+report+'&userId='+userId+'&column='+column+'&'+searchStr);
135 return false;
136 }
137
138 function displayMode(mode) {
139 if(mode == 'percent') {
140 $(".summation").hide();
141 $(".percent").show();
142 }
143 else {
144 $(".percent").hide();
145 $(".summation").show();
146 }
147 }
148 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 ini_set("precision", 15);
3
4 include_once app_path() . '/lib/phpexcel/PHPExcel.php';
5 if (isset($format) && $format == 'dataUpload') {
6 if (isset($format) && $format == 'dataUpload') {
7 $dataColumns = ['username' => 'Username', 'phone' => 'Phone', 'sessiontype' => 'webrtc/mobile',];
8 $PHPExcelObj = new PHPExcel();
9 $head = 0;
10 foreach ($dataColumns as $key => $value) {
11 $colstr = PHPExcel_Cell::stringFromColumnIndex($head);
12 $PHPExcelObj->getActiveSheet()->setCellValue($colstr . "1", $key);
13 $PHPExcelObj->getActiveSheet()->setCellValue($colstr . "2", $value);
14 $head++;
15 }
16 $objWriter = PHPExcel_IOFactory::createWriter($PHPExcelObj, 'Excel5');
17 $objWriter->save('php://output');
18 header('Content-Type: application/vnd.ms-excel');
19 header('Content-Disposition: attachment;filename="DataUploadFormat.xls"');
20 header('Cache-Control: max-age=0');
21 return;
22 }
23 } else if ($_SERVER["REQUEST_METHOD"] == "POST") {
24
25 $errorMsg = "";
26 $successMsg = "";
27 $successCount = 0;
28 if ($_FILES['file']['tmp_name']) {
29 if ($_FILES['file']['type'] == "application/vnd.ms-excel") {
30 $fileUploadLimit = 52428800; // files size is in bytes
31 if ($_FILES['file']['size'] < $fileUploadLimit) {
32 $inputFileType = "Excel5";
33 $objReader = PHPExcel_IOFactory::createReader($inputFileType);
34 $objPHPExcel = $objReader->load($_FILES['file']['tmp_name']);
35 $objWorksheet = $objPHPExcel->getActiveSheet();
36 $highestColumn = PHPExcel_Cell::columnIndexFromString($objPHPExcel->getActiveSheet()->getHighestColumn());
37 $highestrow = $objPHPExcel->getActiveSheet()->getHighestRow();
38 $excelarray = [];
39 $keys = [];
40 $listId = time();
41 for ($i = 1; $i <= $highestrow; $i++) {
42 $excelarray[$i] = [];
43 for ($head = 0; $head < $highestColumn; $head++) {
44 if ($i == 1) {
45 $keys[$head] = trim($objWorksheet->getCellByColumnAndRow($head, $i)->getValue());
46 } else {
47 $excelarray[$i][$keys[$head]] = trim($objWorksheet->getCellByColumnAndRow($head, $i)->getValue());
48 }
49 }
50 }
51 for ($i = 3; $i <= $highestrow; $i++) {
52 $excelarray[$i]['sessiontype'] = ($excelarray[$i]['sessiontype'] == 'webrtc' ? 0 : 1);
53 // print_r($excelarray[$i]);die;
54 DB::table('users')->where('username', $excelarray[$i]['username'])->update($excelarray[$i]);
55 // die;
56 $successMsg .= $excelarray[$i]["username"] . ",";
57 $successCount++;
58 }
59 } else {
60 $errorMsg .= "File size too large, Please check file size should be less then " . ($fileUploadLimit / (1024 * 1024)) . "mb.";
61 }
62 } else {
63 $errorMsg .= "File format not valid, Please attach Excel file (.xls) and try upload again.";
64 }
65 @unlink($_FILES['file']);
66 } else {
67 $errorMsg .= "File not found, Please attach file and try upload again.";
68 }
69 $success = "Data Uploaded ($successCount): " . $successMsg;
70 $errFlag = 'success';
71 if (isset($successMsg) && $successMsg != "") {
72 $msg = $success;
73 }
74 if (isset($errorMsg) && $errorMsg != "") {
75 $errFlag = 'failure';
76 $msg = $errorMsg;
77 }
78 echo json_encode(['msg' => $msg, 'status' => $errFlag]);
79 ?>
80 <?php
81 die;
82 }
83 ?>
84 <div class="row">
85 <div class="col-sm-12">
86 <div class="panel-group" role="tablist" aria-multiselectable="true">
87 <div class="panel panel-info">
88 <div class="panel-heading" role="tab" id="headingOne" role="button">
89 <strong><i class="fa fa-upload"></i> Data Upload</strong>
90 </div>
91 <div role="tabpanel" aria-labelledby="headingOne">
92 <div class="panel-body">
93 <div class="tab_generic">
94 <!-- <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> -->
95 <hr style="margin-bottom: 10px;" />
96 <div class="row">
97 <div class="col-sm-3">
98 <p><strong>Get Format</strong></p>
99 <button type="submit" class="btn btn-success" onclick="getDataFormat();return false;"><i class="fa fa-download"></i> Get Format</button>
100 </div>
101 <div class="col-sm-9">
102 <p><strong>Upload File</strong></p>
103 <form method="POST" enctype="multipart/form-data" target="resultArea" action="import_excel" class="form-inline" id="upload_form">
104 <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>" />
105 <div class="form-group">
106 <input type="file" class="form-control" name="file" required="required" />
107 </div>
108 <div class="form-group">
109 <button type="submit" class="btn btn-success"><i class="fa fa-upload"></i> Upload</button>
110 <p>
111 <iframe name=resultArea id="resultArea" style='width:0px;height:0px;display:none'></iframe>
112 </p>
113 </div>
114 </form>
115 <div id=ebulkuploadresult></div>
116 <div id=loadImg></div>
117 <div id=showsuccessmsg></div>
118 </div>
119 </div>
120 </div>
121 </div>
122 </div>
123 </div>
124 </div>
125 </div>
126 </div>
127 <script type="text/javascript">
128 function getDataFormat() {
129 window.open('getImportExcelFormat');
130 return false;
131 }
132 </script>
133 <script>
134 $(document).ready(function() {
135 // $('#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' });
136 // $('.reason').popover({ content: 'Click To Download Rejected Reasons', placement: "left", trigger: 'hover' });
137 $('#upload_form').on('submit', function(event) {
138 event.preventDefault();
139 $.ajax({
140 url: "import_excel",
141 method: "POST",
142 data: new FormData(this),
143 // dataType: 'JSON',
144 contentType: false,
145 cache: false,
146 processData: false,
147 beforeSend: function() {
148 $("#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>");
149 },
150 success: function(data) {
151 data = $.parseJSON(data);
152 if (data.status == 'failure') {
153 simpleNotification('error', 'topRight', data.msg);
154 } else {
155 simpleNotification('success', 'topRight', data.msg);
156 }
157 $("#loadImg").html("");
158 document.getElementById("upload_form").reset();
159 },
160 })
161 });
162 $('#fileSummaryTable').DataTable({
163 "paging": false,
164 "info": false,
165 "searching": false
166 });
167 });
168 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <div id="content">
2 <div class="layout-app" style="visibility: visible; display: block;">
3 <div class="row">
4 <div class="col-sm-12">
5 <div class="col-separator col-separator-first box col-unscrollable">
6 <div class="tab_generic" style="padding: 10px;">
7 <h4>Settings</h4>
8 <hr style="margin-bottom: 10px;">
9
10 <div class="row">
11 <div class="col-sm-12">
12 <ul class="nav nav-tabs" role="tablist">
13 <li role="presentation" class="active">
14 <a href="#settingThemeArea" aria-controls="settingThemeArea" role="tab" data-toggle="tab">Themes</a>
15 </li>
16 <?php if(Auth::user()->username == 'admin'): ?>
17 <li role="presentation">
18 <a href="#settingSeatCount" aria-controls="settingSeatCount" role="tab" data-toggle="tab">Seat Count</a>
19 </li>
20 <?php endif; ?>
21 <!-- <li role="presentation">
22 <a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">Profile</a>
23 </li>
24 <li role="presentation">
25 <a href="#messages" aria-controls="messages" role="tab" data-toggle="tab">Messages</a>
26 </li>
27 <li role="presentation">
28 <a href="#settings" aria-controls="settings" role="tab" data-toggle="tab">Settings</a>
29 </li> -->
30 </ul>
31
32 <div class="tab-content">
33 <div role="tabpanel" class="tab-pane active" id="settingThemeArea">
34 <?php echo $__env->make('layout.module.setting.theme', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
35 </div>
36 <?php if(Auth::user()->username == 'admin'): ?>
37 <div role="tabpanel" class="tab-pane active" id="settingSeatCount">
38 <?php echo $__env->make('layout.module.setting.seatCount', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
39 </div>
40 <?php endif; ?>
41 <!-- <div role="tabpanel" class="tab-pane" id="profile">
42
43 </div>
44 <div role="tabpanel" class="tab-pane" id="messages">
45
46 </div>
47 <div role="tabpanel" class="tab-pane" id="settings">
48
49 </div> -->
50 </div>
51 </div>
52 </div>
53 </div>
54 </div>
55 </div>
56 </div>
57 </div>
58 </div>
...\ No newline at end of file ...\ No newline at end of file
1 <div class="layout-app">
2 <div class="row error">
3 <div class="col-md-4 col-md-offset-1 pull-left">
4 <div class="center">
5 <img src="assets/images/error-icon-bucket.png " class="img-responsive error-icon"/>
6 </div>
7 </div>
8 <div class="col-md-5 content pull-left" style='margin-top:10%'>
9 <h1 class="strong">Oops!</h1>
10 <h4 class="innerB">No Access!!</h4>
11 <div class="well">You dont have access to view this page. (<?php echo $value; ?>).</div>
12 </div>
13 </div>
14 </div>
1 <style>
2 .heading-buttons h4{
3 line-height:20px;
4 }
5 </style>
6 <div class="layout-app"><!-- row-app -->
7
8 <div class="row row-app">
9
10 <!-- col -->
11 <div class="col-md-12">
12
13 <!-- col-separator.box -->
14 <div class="col-separator col-separator-first col-unscrollable box">
15
16 <!-- col-table -->
17 <div class="col-table" id=authorworkspacediv>
18 <!-- Search Bar -->
19 <div class="input-group">
20 <input type="text" class="form-control" placeholder="Search for Users..." id=adminu_Search>
21 <span class="input-group-btn">
22 <button class="btn btn-primary rounded-none" type="button" onclick="adminSearchUser();return false"><i class="fa fa-search"></i></button>
23 </span>
24 </div>
25 <div class="col-separator-h"></div>
26 <!-- End Search Bar -->
27
28 <div class="col-table-row">
29
30 <div class="col-app col-unscrollable">
31
32 <div class="col-app">
33
34 <div class="row-app">
35
36 <div class="col-md-6">
37 <div class="col-separator">
38
39 <!-- Category Heading -->
40 <div class="heading-buttons bg-gray border-bottom innerR half">
41 <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>
42 <h4 class="innerTB margin-bottom-none">Users</h4>
43 <div class="clearfix"></div>
44 </div>
45 <!-- End Category Heading -->
46
47
48 <?php echo $userlist->render(); ?>
49 <?php foreach ($userlist as $tuser)
50 {
51 $tphoto=$tuser->fetchphotothumb();
52 ?>
53 <!-- Category Listing -->
54 <div class="row innerAll half border-bottom bg-gray-hover">
55 <div class="col-sm-6 col-xs-8">
56 <ul class="media-list margin-none">
57 <li class="media">
58 <a class="pull-left innerAll" href="#" onclick="doAjax('user/<?php echo $tuser->id; ?>/edit','','userformdiv','ajax_users_create','singlethis','GET');return false;">
59 <span class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i></span>
60 </a>
61 <a class="pull-left innerAll" href="#" onclick="doAjax('user/<?php echo $tuser->id; ?>','','userformdiv','ajax_users_delete','singlethis','DELETE');return false;">
62 <span class="btn btn-primary btn-xs"><i class="fa fa-trash-o"></i></span>
63 </a>
64 <div class="media-body">
65 <div class="innerAll">
66 <h5 class=""><a href="#" class="media-heading text-primary">Modules</a></h5>
67 <div class="clearfix"></div>
68 <small class="margin-none label label-inverse">Social</small>
69 <small class="margin-none label label-inverse">HR</small>
70 <small class="margin-none label label-inverse">Reports</small>
71 <small class="margin-none label label-inverse">CRM</small>
72
73 </div>
74
75 </div>
76 </li>
77 </ul>
78 </div>
79 <div class="col-sm-3 col-xs-4">
80 <div class="text-center">
81 <p class="strong">Tasks</p>
82 <span class="badge badge-primary" data-toggle="tooltip" data-title="Published" data-placement="left" data-container="body">0</span>
83 <span class="badge badge-primary badge-stroke" data-toggle="tooltip" data-title="Subscribed" data-placement="right" data-container="body">0</span>
84 </div>
85 </div>
86 <div class="col-sm-3 col-xs-hidden">
87 <div class="innerAll">
88 <div class="media">
89 <a href="#" class="pull-left">
90 <img src="<?php echo $tphoto; ?>" class="media-object" width=35px />
91 </a>
92 <div class="media-body">
93 <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>
94 <div class="clearfix"></div>
95 <small>
96 <?php if($tuser->status=="Active"): ?>
97 <span class="label label-success"><?php echo $tuser->status; ?></span>
98 <?php elseif($tuser->status=="Disabled"): ?>
99 <span class="label label-warning"><?php echo $tuser->status; ?></span>
100 <?php elseif($tuser->status=="Unverified"): ?>
101 <span class="label label-warning"><?php echo $tuser->status; ?></span>
102 <?php elseif($tuser->status=="Blocked"): ?>
103 <span class="label label-important"><?php echo $tuser->status; ?></span>
104 <?php endif; ?>
105 </small>
106 </div>
107 </div>
108 </div>
109 </div>
110 </div>
111 <!-- // END Category Listing -->
112 <?php } ?>
113 <?php echo $userlist->render(); ?>
114
115 </div>
116 <!-- // END col-separator -->
117 </div>
118 <!-- // END col -->
119
120 <!-- col -->
121 <div class="col-md-6">
122
123 <!-- col-separator -->
124 <div class="col-separator col-separator-last" id=userformdiv>
125 </div>
126 <!-- // END col-separator -->
127
128 </div>
129 <!-- // END col-table -->
130
131 </div>
132 <!-- // END col-separator.box -->
133
134 </div>
135 <!-- // END col -->
136
137 </div>
138 <!-- // END row-app -->
139
140 </div>
141
142
143 <script>
144 $(".pagination a").click(function(e){
145 e.preventDefault();
146 var url=$(this).attr("href");
147 var res = url.split("page=");
148 menuAction("user?page="+res[1]);
149 return false;
150 });
151
152 function adminSearchUser()
153 {
154 doAjax('user?search='+$('#adminu_Search').val(),'','content','ajax_users_create','singlethis','GET');
155 }
156 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 $data=Auth::user()->dataval('personal');
3 if(empty($data['location']))$data['location']="";
4 ?>
5 <div class="bg-white">
6 <div class="profile-avatar">
7 <div class="text-center">
8 <img src="<?php echo $myphoto; ?>" width="380" class="img-responsive thumb" onmouseover="photobuttonselect(0);" onmouseout="photobuttonselect(1);" />
9 <div class="btn-avatar btn-group btn-group-xs" id=mypotochangebutton style='visibility:hidden' onmouseover="photobuttonselect(0);">
10 <!--<a href="#" class="btn"><i class="fa fa-pencil"></i> change</a>-->
11 <form method=post enctype="multipart/form-data" target=fileupload_social id=photoform action=social?stype=photo>
12 <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>" />
13 <div class="fileupload fileupload-new margin-none" data-provides="fileupload">
14 <span class="btn btn-default btn-file" style='padding:0px 4px 2px 4px;'><i class="fa fa-pencil"></i>
15 <span class="fileupload-new">change</span><span class="fileupload-exists">Change</span>
16 <input type="file" class="margin-none" name=photo onchange='simpleNotification("warning","topRight","Uploading photo please wait..");$("#photoform").submit();return false;' id=social_photo />
17 </span>
18 <span class="fileupload-preview" style='display:none'></span>
19 <a href="#" class="close fileupload-exists" data-dismiss="fileupload" style="float: none;display:none">&times;</a>
20 </div>
21 </form>
22 <!-- <a href="#" class="btn"><i class="fa fa-cog"></i></a> -->
23 </div>
24 </div>
25 </div>
26 <div class="innerAll">
27
28 <h4><!--<?php echo $displayname; ?> <span class=pull-right>--><!--<i class="fa fa-flag"></i>-->
29 <!-- <i class="fa fa-square text-primary" style='font-size:8px'></i>
30 <i class="fa fa-square text-primary" style='font-size:12px'></i>
31 <i class="fa fa-square text-primary" style='font-size:16px'></i> <?php echo Auth::user()->getedupoints(); ?>--><!--</span>-->
32 <!--
33 <div class="dropdown pull-right dropdown-icons dropdown-icons-xs">
34 <a data-toggle="dropdown" href="#" class="btn btn-default btn-stroke btn-circle dropdown-toggle"><i class="fa fa-circle text-success"></i></a>
35 <ul class="dropdown-menu">
36 <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>
37 <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>
38 </ul>
39 </div>
40 -->
41 </h4>
42 <!-- <p class="margin-none textCapitialize pull-right"><?php echo Auth::user()->usertype; ?>, <?php echo $data['location']; ?> </p> -->
43
44 <div class="clearfix"></div>
45 </div>
46 </div>
47 <iframe name=fileupload_social id=fileupload_social style='height:0px;width:0px;overflow:none;display:none' src='about:blank'></iframe>
48 <script>
49 function photobuttonselect(state)
50 {
51 if(state==0)
52 {
53 $('#mypotochangebutton').css({'visibility':'visible'});
54 }
55 if(state==1)
56 {
57 $('#mypotochangebutton').css({'visibility':'hidden'});
58 }
59 }
60 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <?php echo $__env->make('layout.header', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
2
3 <?php echo $__env->yieldContent('main_menu'); ?>
4 <?php echo $__env->yieldContent('top_menu'); ?>
5
6 <!-- Main Container Fluid -->
7 <div class="container-fluid">
8
9 <div id='absolutedivcontent' style='z-index:1;position:absolute;display:none'></div>
10 <div id="content">
11 <?php echo $__env->yieldContent('main_content'); ?>
12 </div>
13 <div class="clearfix"></div>
14
15 <div id="footer" class="hidden-print" style='display:none'>
16 <div class="copy">v<?php echo Config::get('app.app_version'); ?></div>
17 </div>
18 <!-- // Footer END -->
19
20 </div>
21 <!-- // Main Container Fluid END -->
22
23 <?php echo $__env->make('layout.footer', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
1 <?php echo $__env->make('layout.header', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
2
3
4
5
6 <div class="layout-app"><!-- row-app -->
7 <div class="row row-app">
8
9 <!-- col -->
10
11
12 <!-- col-separator.box -->
13 <div class="col-separator col-unscrollable box">
14
15 <!-- col-table -->
16 <div class="col-table">
17
18 <h4 class="innerAll margin-none border-bottom text-center"><i class="fa fa-lock"></i></h4>
19
20 <!-- col-table-row -->
21 <div class="col-table-row">
22
23 <!-- col-app -->
24 <div class="col-app col-unscrollable">
25
26 <!-- col-app -->
27 <div class="col-app">
28 <div class="login">
29
30 <div class="panel panel-default col-sm-6 col-sm-offset-3">
31
32 <div class="panel-body">
33
34
35 <div id='alertdiv'>
36 <?php
37 $class="warning";
38 $type="Idle";
39 $msg="Application is Idle";
40 ?>
41 <!-- Alert -->
42 <div class="alert alert-<?php echo $class; ?>">
43 <button type="button" class="close" data-dismiss="alert">&times;</button>
44 <strong><?php echo $type; ?></strong> <?php echo $msg; ?>
45
46 </div>
47 <!-- // Alert END -->
48 </div>
49
50
51
52 <button type="submit" class="btn btn-primary btn-block" onclick='document.location="login";'>Back To Application</button>
53
54
55 </div>
56 <!-- <div class="col-sm-2 col-sm-4 col-sm-offset-4 text-center">
57 <a href="signup" class="btn btn-info">Create a new account? <i class="fa fa-pencil"></i> </a>
58 </div>-->
59
60
61 </div>
62
63
64 </div>
65 <!-- // END col-app -->
66
67 </div>
68 <!-- // END col-app.col-unscrollable -->
69
70 </div>
71 <!-- // END col-table-row -->
72
73 </div>
74 <!-- // END col-table -->
75
76 </div>
77 <!-- // END col-separator.box -->
78
79
80 </div>
81 <!-- // END row-app -->
82
83 </body>
84 </html>
1 <div class="layout-app">
2 <div class="row error">
3 <div class="col-md-4 col-md-offset-1 pull-left">
4 <div class="center">
5 <img src="assets/images/error-icon-bucket.png " class="img-responsive error-icon"/>
6 </div>
7 </div>
8 <div class="col-md-5 content pull-left" style='margin-top:10%'>
9 <h1 class="strong">Oops!</h1>
10 <h4 class="innerB">Not Found!!</h4>
11 <div class="well">The path you are trying to visit does not exist...</div>
12 </div>
13 </div>
14 </div>
1 <?php $user=Auth::user(); ?>
2
3 <style>
4 .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;}
5 .label label-small pull-right a{color: #fff !important;}
6 .notify_alert{height:25px;}
7 .wgt{background: none repeat scroll 0 0 #ffffff;border: 1px solid #f6f7fb;margin: 0 auto 10px;position: relative;}
8 .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;}
9 .wgt .wgt-body{padding: 10px;}
10 .wgt p{font-size:12px;color:#656d78;}
11 .wgt label{font-weight:600;color:#5d9cec;}
12 .wgt a{color: #656d78;}
13 .wgt a:hover{color:#434a54;}
14 .list_n{font-size:12px}
15 .list_n li{padding:3px 0;}
16 .list_n li a{color: #656d78;}
17 .list_n li a:hover{color:#434a54;}
18 .tab_generic{background: none repeat scroll 0 0 #ffffff;border-radius: 5px;margin: 0 0 10px;padding: 10px 5px;position: relative;}
19 .tab_bar_new{border: 1px solid #EFEFEF;height: 39px;margin: 0 0 10px;overflow: hidden;position: relative;}
20 .tab_bar_new ul{list-style: none outside none;margin: 0;padding: 0;background:#ed5564;}
21 .tab_bar_new ul li{border: medium none;height: 39px;padding: 0;display: block;float: left;}
22 .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;}
23 .tab_bar_new ul li.active{background: none repeat scroll 0 0 #fff;}
24 .tab_bar_new ul li.active a{color:#ed5564;}
25 .legend_notify{float: right;font-size: 12px;font-weight: 600;margin-right: 20px;}
26 .legend_notify a{background-color: #ed5564;color: #fff;border-radius: 20px;padding: 5px 10px;margin-left: 5px;cursor:default;}
27 .task_numberx a{color:#fff;background:#fff;font-size: 10px;padding: 5px 10px;border-radius: 20px;font-weight:900;}
28 .task_numberx a:hover{background:#ed5564;color:#f6f7fb;}
29 .hasDatepicker{width: 20%;}
30 .progress{height:10px;}
31 </style>
32
33 <div class="layout-app">
34 <div class="row row-app">
35 <div class="col-md-12">
36 <div class="col-separator col-separator-first col-unscrollable box">
37 <div class="">
38 <div class="relativeWrap" >
39 <div class="tab_generic" style='padding:0px;margin:0px;min-height:500px;'>
40 <?php
41 $firstdash="";$dashcnt=0;$headerstr="";
42 $modules=array();$active="active";
43 foreach(Config::get("app.app_modules") as $mname=>$module)
44 {
45 if($user->moduleACL($mname,true,false,false))
46 {
47 if($module['dash']!="")
48 {
49 $modules[$mname]=$module;
50 $headerstr.="<li class='$active'><a href='#DashletT-$mname' onclick='dashReload(\"$mname\");' data-toggle='tab'>$module[dash]</a></li>";
51 $active="";$dashcnt++;if($firstdash=="")$firstdash=$mname;
52 }
53 }
54 }
55 ?>
56 <div class="tab_bar_new tabsbar-2" style='<?php if($dashcnt<=1)echo "display:none"; ?>'>
57 <ul class="row row-merge" style='background:#9CBFFF'>
58 <?php echo $headerstr; ?>
59
60 </ul>
61 </div>
62
63 <div class="tab-content">
64 <?php
65 $active="active";
66 foreach($modules as $mname=>$module)
67 {
68 if($user->moduleACL($mname,true,false,false))
69 {
70 ?>
71 <div class="tab-pane <?php echo $active; ?> innerAll" id=DashletT-<?php echo $mname; ?>></div>
72 <?php
73 $active="";
74 }
75 }
76 ?>
77 </div>
78 </div>
79 </div>
80 </div>
81 </div>
82 </div>
83 </div>
84 </div>
85
86 <script>
87 function dashReload(dashlet)
88 {
89 doAjax("dashboard/dashlet?module="+dashlet,"","DashletT-"+dashlet,"ajax_dashlet_"+dashlet,"singlefail","GET");
90 }
91 dashReload('<?php echo $firstdash; ?>');
92 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <div id="content">
2 <div class="layout-app" style="visibility: visible; display: block;">
3 <div class="row">
4 <div class="col-sm-12">
5 <div class="col-separator col-separator-first box col-unscrollable">
6 <div class="tab_generic" style="padding: 10px;">
7 <h4>Settings</h4>
8 <hr style="margin-bottom: 10px;">
9
10 <div class="row">
11 <div class="col-sm-12">
12 <ul class="nav nav-tabs" role="tablist">
13 <li role="presentation" class="active">
14 <a href="#settingThemeArea" aria-controls="settingThemeArea" role="tab" data-toggle="tab">Themes</a>
15 </li>
16 <?php if(Auth::user()->username == 'admin'): ?>
17 <li role="presentation">
18 <a href="#settingSeatCount" aria-controls="settingSeatCount" role="tab" data-toggle="tab">Seat Count</a>
19 </li>
20 <?php endif; ?>
21 <!-- <li role="presentation">
22 <a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">Profile</a>
23 </li>
24 <li role="presentation">
25 <a href="#messages" aria-controls="messages" role="tab" data-toggle="tab">Messages</a>
26 </li>
27 <li role="presentation">
28 <a href="#settings" aria-controls="settings" role="tab" data-toggle="tab">Settings</a>
29 </li> -->
30 </ul>
31
32 <div class="tab-content">
33 <div role="tabpanel" class="tab-pane active" id="settingThemeArea">
34 <?php echo $__env->make('layout.module.setting.theme', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
35 </div>
36 <?php if(Auth::user()->username == 'admin'): ?>
37 <div role="tabpanel" class="tab-pane active" id="settingSeatCount">
38 <?php echo $__env->make('layout.module.setting.seatCount', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
39 </div>
40 <?php endif; ?>
41 <!-- <div role="tabpanel" class="tab-pane" id="profile">
42
43 </div>
44 <div role="tabpanel" class="tab-pane" id="messages">
45
46 </div>
47 <div role="tabpanel" class="tab-pane" id="settings">
48
49 </div> -->
50 </div>
51 </div>
52 </div>
53 </div>
54 </div>
55 </div>
56 </div>
57 </div>
58 </div>
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2
3 $themes = explode(",",env('themes'));
4
5 if($userCurrentTheme != ""){
6 if(!in_array($userCurrentTheme, $themes)){$userCurrentTheme = "Default";}
7 }else{ $userCurrentTheme = "Default"; }
8
9 ?>
10
11 <?php if(isset($response)): ?>
12 <script>
13 simpleNotification("<?php echo e($response['type']); ?>","topRight","<?php echo e($response['message']); ?>");
14 <?php if($response['type'] == "success"): ?>
15 setTimeout(function(){ window.location.reload(); }, 1000);
16 <?php endif; ?>
17 </script>
18 <?php endif; ?>
19
20 <h4>Select Theme <span class="pull-right"><small>Current Theme - </small><?php echo e($userCurrentTheme); ?></span></h4>
21 <hr style="margin-bottom: 10px;">
22
23 <div class="row">
24 <?php foreach($themes as $theme): ?>
25 <div class="col-sm-3">
26 <div class="themeBox" style="<?php echo e($theme == $userCurrentTheme ? 'border:1px solid #f30;background-color: #ffe9e9' : ''); ?>">
27 <h4><?php echo e($theme); ?>
28
29 <?php if($theme == $userCurrentTheme): ?>
30 <span class="pull-right label label-primary btn-xs">Current Theme</span>
31 <?php else: ?>
32 <button class="pull-right btn btn-success btn-xs" onclick="changeTheme('<?php echo e($theme); ?>');return false;">Select Theme</button>
33 <?php endif; ?>
34 </h4>
35 <hr style="margin-top: 10px;margin-bottom: 5px;">
36 <div class="text-center">
37 <img src="<?php echo e(URL::to('assets/themes/'.$theme.'.png')); ?>" class="img-responsive" alt="" />
38 </div>
39 </div>
40 </div>
41 <?php endforeach; ?>
42 </div>
43
44 <style>
45 .themeBox{margin: 10px;padding: 10px !important;border:1px solid #eee;border-radius: 5px;}
46 .themeBox:hover{background-color: #eee;}
47 </style>
48
49 <script type="text/javascript">
50 function changeTheme(value){
51 doAjax('setting/theme?name='+value,'','settingThemeArea','','singlethis','GET');
52 }
53 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <?php $user=Auth::user(); ?>
2
3 <style>
4 .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;}
5 .label label-small pull-right a{color: #fff !important;}
6 .notify_alert{height:25px;}
7 .wgt{background: none repeat scroll 0 0 #ffffff;border: 1px solid #f6f7fb;margin: 0 auto 10px;position: relative;}
8 .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;}
9 .wgt .wgt-body{padding: 10px;}
10 .wgt p{font-size:12px;color:#656d78;}
11 .wgt label{font-weight:600;color:#5d9cec;}
12 .wgt a{color: #656d78;}
13 .wgt a:hover{color:#434a54;}
14 .list_n{font-size:12px}
15 .list_n li{padding:3px 0;}
16 .list_n li a{color: #656d78;}
17 .list_n li a:hover{color:#434a54;}
18 .tab_generic{background: none repeat scroll 0 0 #ffffff;border-radius: 5px;margin: 0 0 10px;padding: 10px 5px;position: relative;}
19 .tab_bar_new{border: 1px solid #EFEFEF;height: 39px;margin: 0 0 10px;overflow: hidden;position: relative;}
20 .tab_bar_new ul{list-style: none outside none;margin: 0;padding: 0;background:#ed5564;}
21 .tab_bar_new ul li{border: medium none;height: 39px;padding: 0;display: block;float: left;}
22 .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;}
23 .tab_bar_new ul li.active{background: none repeat scroll 0 0 #fff;}
24 .tab_bar_new ul li.active a{color:#ed5564;}
25 .legend_notify{float: right;font-size: 12px;font-weight: 600;margin-right: 20px;}
26 .legend_notify a{background-color: #ed5564;color: #fff;border-radius: 20px;padding: 5px 10px;margin-left: 5px;cursor:default;}
27 .task_numberx a{color:#fff;background:#fff;font-size: 10px;padding: 5px 10px;border-radius: 20px;font-weight:900;}
28 .task_numberx a:hover{background:#ed5564;color:#f6f7fb;}
29 .hasDatepicker{width: 20%;}
30 .progress{height:10px;}
31 </style>
32
33 <div class="layout-app">
34 <div class="row row-app">
35 <div class="col-md-12">
36 <div class="col-separator col-separator-first col-unscrollable box">
37 <div class="">
38 <div class="relativeWrap" >
39 <div class="tab_generic" style='padding:0px;margin:0px;min-height:500px;'>
40 <?php
41 $firstdash="";$dashcnt=0;$headerstr="";
42 $modules=array();$active="active";
43 foreach(Config::get("app.app_modules") as $mname=>$module)
44 {
45 if($user->moduleACL($mname,true,false,false))
46 {
47 if($module['dash']!="")
48 {
49 $modules[$mname]=$module;
50 $headerstr.="<li class='$active'><a href='#DashletT-$mname' onclick='dashReload(\"$mname\");' data-toggle='tab'>$module[dash]</a></li>";
51 $active="";$dashcnt++;if($firstdash=="")$firstdash=$mname;
52 }
53 }
54 }
55 ?>
56 <div class="tab_bar_new tabsbar-2" style='<?php if($dashcnt<=1)echo "display:none"; ?>'>
57 <ul class="row row-merge" style='background:#9CBFFF'>
58 <?php echo $headerstr; ?>
59
60 </ul>
61 </div>
62
63 <div class="tab-content">
64 <?php
65 $active="active";
66 foreach($modules as $mname=>$module)
67 {
68 if($user->moduleACL($mname,true,false,false))
69 {
70 ?>
71 <div class="tab-pane <?php echo $active; ?> innerAll" id=DashletT-<?php echo $mname; ?>></div>
72 <?php
73 $active="";
74 }
75 }
76 ?>
77 </div>
78 </div>
79 </div>
80 </div>
81 </div>
82 </div>
83 </div>
84 </div>
85
86 <script>
87 function dashReload(dashlet)
88 {
89 doAjax("dashboard/dashlet?module="+dashlet,"","DashletT-"+dashlet,"ajax_dashlet_"+dashlet,"singlefail","GET");
90 }
91 dashReload('<?php echo $firstdash; ?>');
92 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 $reportTitle = 'Productivity Report';
3 $returnblade = 'productivity';
4
5 $view_path = Config::get('view.paths');
6 include_once($view_path[0].'/layout/module/dialer/reporthead.blade.php');
7
8 $alist=$alist->get();
9
10 $i=1;
11 $reporthead=array("#","Telecaller","TelecallerID","Supervisor","Customers","Total");
12 $reportarray=array();
13 foreach($alist as $aline)
14 {
15 $tuser=$userarr[$aline->user_id];
16
17 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());
18
19 if(!is_null($aline->lan)) {
20 $reportarray[$aline->user_id]["Customer_lists"][] = $aline->lan;
21 }
22 $reportarray[$aline->user_id]["Customers"] = count(array_unique($reportarray[$aline->user_id]["Customer_lists"]));
23 $reportarray[$aline->user_id]["Total"]++;
24
25 //$ststr=$aline->userstatus."-".$aline->usersubstatus;
26 $ststr=$aline->resultCode;
27 if(!in_array($ststr,$reporthead))$reporthead[]=$ststr;
28
29 $reportarray[$aline->user_id][$ststr]++;
30
31 if($aline->userstatus == 'Contacted' && trim($ststr) != '') {
32 $reportarray[$aline->user_id]['Contacted']++;
33 }
34 }
35
36 $highestColumn = sizeof($reporthead);
37 if(count($reportarray)) {
38 $outhead="<tr>";$outstr="";
39 for ($head = 0; $head < $highestColumn; $head++){
40 if($reporthead[$head] == '#' && false) {
41 $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>";
42 $outhead.="<td>".$mode_str."</td>";
43 }
44 else {
45 $outhead.="<td>".$reporthead[$head]."</td>";
46 }
47 }
48 $outhead.="</tr>";
49 $utotalarr = array("Telecaller"=>'Total');
50 foreach($reportarray as $uid=>$uarr)
51 {
52 $outstr.="<tr>";
53 for ($head = 0; $head < $highestColumn; $head++){
54 if($head < 4) {
55 $data_str = $uarr[$reporthead[$head]];
56 }
57 elseif($head < 5) {
58 $data_str = $uarr[$reporthead[$head]];
59 $utotalarr[$reporthead[$head]] += $uarr[$reporthead[$head]];
60 }
61 else {
62 $total_val = ($reporthead[$head] != 'PTP') ? $uarr['Total'] : $uarr['Contacted'];
63
64 $data_str = '<span class="summation" style="display:block;">'.$uarr[$reporthead[$head]].'</span>';
65 $data_str .= '<span class="percent" style="display:none;">'.number_format(@($uarr[$reporthead[$head]]/$total_val) * 100).'%</span>';
66 $data_str = '<a href="#" onclick="breakupXls(\'productivity\',\''.$uid.'\',\''.$reporthead[$head].'\')">' . $data_str . '</a>';
67 $utotalarr[$reporthead[$head]] += $uarr[$reporthead[$head]];
68 }
69 $outstr.="<td>".$data_str."</td>";
70 }
71 $outstr.="</tr>";
72 }
73
74 $outstr.="<tr>";
75 for ($head = 0; $head < $highestColumn; $head++)
76 {
77 if($head < 5) {
78 $data_str = $utotalarr[$reporthead[$head]];
79 }
80 else {
81 $data_str = '<span class="summation" style="display:block;">'.$utotalarr[$reporthead[$head]].'</span>';
82 $data_str .= '<span class="percent" style="display:none;">'.number_format(@($utotalarr[$reporthead[$head]]/$utotalarr['Total']) * 100).'%</span>';
83 $data_str = '<a href="#" onclick="breakupXls(\'productivity\',\'All\',\''.$reporthead[$head].'\')">' . $data_str . '</a>';
84 }
85 $outstr.="<td>".$data_str."</td>";
86 }
87 $outstr.="</tr>";
88 }
89 else {
90 $outhead.="<tr><td>No Records Found.</td></tr>";
91 }
92
93 if(Input::has("dllogxls"))
94 {
95 include_once(app_path().'/lib/phpexcel/PHPExcel.php');
96
97 $inputFileType = "Excel5";
98 $objReader = PHPExcel_IOFactory::createReader($inputFileType);
99 $objPHPExcel = $objReader->load("assets/extras/blank.xls");
100 $baseRow = 2;
101
102
103 $highestColumn = sizeof($reporthead);
104 for ($head = 0; $head < $highestColumn; $head++){
105 $colstr=PHPExcel_Cell::stringFromColumnIndex($head);
106 $objPHPExcel->getActiveSheet()->setCellValue($colstr."1", $reporthead[$head]);
107 }
108
109 foreach($reportarray as $uid=>$uarr)
110 {
111 $row = $baseRow++;
112 $col = 0;
113
114 for ($head = 0; $head < $highestColumn; $head++){
115 $colstr=PHPExcel_Cell::stringFromColumnIndex($head);
116 $objPHPExcel->getActiveSheet()->setCellValue($colstr.$row, $uarr[$reporthead[$head]]);
117 }
118 }
119
120 $row++;
121 for ($head = 0; $head < $highestColumn; $head++){
122 $colstr=PHPExcel_Cell::stringFromColumnIndex($head);
123 $objPHPExcel->getActiveSheet()->setCellValue($colstr.$row, $utotalarr[$reporthead[$head]]);
124 }
125
126 header('Content-Type: application/vnd.ms-excel');
127 header('Content-Disposition: attachment;filename="Productivity.xls"');
128 header('Cache-Control: max-age=0');
129
130 $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, $inputFileType);
131 $objWriter->save('php://output');
132
133 return ;
134 }
135
136 //charts
137 $cat1=array();
138 $cat1arr=array();
139 foreach($reportarray as $uid=>$uarr)
140 {
141 $cat1[]="'$uarr[Telecaller]'";
142
143 for ($head = 6; $head < $highestColumn; $head++){
144 if(!isset($cat1arr[$reporthead[$head]]))$cat1arr[$reporthead[$head]]=array();
145
146 $cat1arr[$reporthead[$head]][$uarr["#"]]=round($uarr[$reporthead[$head]],1);
147 if(empty($cat1arr[$reporthead[$head]][$uarr["#"]]))$cat1arr[$reporthead[$head]][$uarr["#"]]=0;
148 }
149 }
150
151 $cat1arrstr="";
152 foreach($cat1arr as $name=>$data)
153 {
154 $extra="";if($name=="InboundDROP-InboundDROP")$extra=",visible: false";
155 $cat1arrstr.="{ name: '$name',\ndata : [";
156 $cat1arrstr.=implode(",",$data);
157 $cat1arrstr.="] $extra },\n";
158 }
159
160 $cat2=array();
161 foreach($reportarray as $uid=>$uarr)
162 {
163 for ($head = 6; $head < $highestColumn; $head++){
164 $cat2["'".$reporthead[$head]."'"]+=round($uarr[$reporthead[$head]],1);
165 }
166 }
167 ?>
168
169 <?php echo $__env->make('layout.module.dialer.searchform', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
170
171 <div class=col-md-6 style='border:1px solid #BBB;'>
172 <div id=userlogschart1 style='min-height:250px;width:100%'></div>
173 </div>
174 <div class=col-md-6 style='border:1px solid #BBB;'>
175 <div id=userlogschart2 style='min-height:250px;width:100%'></div>
176 </div>
177 <div style='clear:both'></div>
178
179 <div style="overflow: auto; margin-top: 10px;">
180 <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;'>
181 <thead><?php echo $outhead; ?></thead>
182 <?php echo $outstr; ?>
183 </table>
184 </div>
185
186 </div>
187
188 <script>
189 $(function () {
190 $('#userlogschart1').highcharts({
191 chart: {
192 type: 'column'
193 },
194 title: {
195 text: 'Userwise result count',
196 style: {
197 fontSize: '14px'
198 }
199 },
200 xAxis: {
201 labels:{
202 rotation: -45,
203 enabled:true//default is true
204 },
205 categories: [<?php echo implode(",",$cat1); ?>]
206 },
207 yAxis: {
208 min: 0,
209 title: {
210 text: ''
211 },
212 stackLabels: {
213 enabled: false,
214 }
215 },
216 tooltip: {
217 headerFormat: '<b>{point.x}</b><br/>',
218 pointFormat: '{series.name}: {point.y}<br/>Total: {point.stackTotal}'
219 },
220 plotOptions: {
221 column: {
222 stacking: 'normal',
223 dataLabels: {
224 enabled: false,
225 }
226 }
227 },
228 series: [<?php echo $cat1arrstr; ?>]
229 });
230 });
231
232 $(function () {
233 $('#userlogschart2').highcharts({
234 chart: {
235 type: 'column'
236 },
237 title: {
238 text: 'Resultwise count',
239 style: {
240 fontSize: '14px'
241 }
242 },
243 subtitle: {
244 text: ''
245 },
246 xAxis: {
247 categories: [<?php echo implode(",",array_keys($cat2)); ?>],
248 crosshair: true,
249 labels:{
250 enabled:true//default is true
251 },
252 },
253 yAxis: {
254 min: 0,
255 title: {
256 text: ''
257 }
258 },
259 tooltip: {
260 headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
261 pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
262 '<td style="padding:0"><b>{point.y}</b></td></tr>',
263 footerFormat: '</table>',
264 shared: true,
265 useHTML: true
266 },
267 plotOptions: {
268 column: {
269 pointPadding: 0.2,
270 borderWidth: 0
271 }
272 },
273 series: [{
274 name: 'Count',
275 data: [<?php echo implode(",",array_values($cat2)); ?>]
276
277 },]
278 });
279 });
280 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <!DOCTYPE html>
2 <html class="app">
3 <head>
4 <title><?php echo Config::get("app.name"); ?> - <?php echo Config::get('app.app_title'); ?></title>
5
6 <meta charset="UTF-8" />
7 <?php
8 $v=Config::get('app.app_version');
9 $vieportopt=explode(":",Config::get("app.kstych_viewportMeta"));
10 if(!isset($vieportopt[1]))$vieportopt[1]="1";
11 if(!isset($vieportopt[2]))$vieportopt[2]="1";
12 if($vieportopt[0]=="responsive"){ ?>
13 <meta name="viewport" content="width=device-width, initial-scale=<?php echo $vieportopt[1]; ?>, maximum-scale=<?php echo $vieportopt[2]; ?>">
14 <?php } ?>
15 <meta name="author" content="Buzzworks">
16
17 <?php if(isset($logo_s))$fico=$logo_s;else $fico="favicon.png"; ?>
18 <link rel="icon" href="<?php echo url('/'); ?>/custom/<?php echo $fico; ?>" type="image/x-icon" />
19 <link rel="shortcut icon" href="<?php echo url('/'); ?>/custom/<?php echo $fico; ?>" type="image/x-icon" />
20
21 <link rel="stylesheet" href="<?php echo url('/'); ?>/style?v=<?php echo $v; ?>" />
22 <script type="text/javascript" src="<?php echo url('/'); ?>/jshead?v=<?php echo $v; ?>"></script>
23
24 </head>
25 <body class="">
1 <div class="layout-app"><!-- row-app -->
2 <div class="row row-app">
3
4 <!-- col -->
5 <div class="col-md-2 col-sm-3">
6
7 <!-- col-separator -->
8 <div class="col-separator col-separator-first box col-unscrollable">
9
10 <!-- col-table -->
11 <div class="col-table" style='padding-left: 13px;padding-right: 13px;'>
12
13 <h4 class="innerAll margin-none border-bottom" style='background: #fff;'>Dialer Reports</h4>
14
15 <!-- col-table-row -->
16 <div class="col-table-row">
17
18 <!-- col-app -->
19 <div class="col-app col-unscrollable">
20
21 <!-- col-app -->
22 <div class="col-app">
23
24 <ul class="list-group list-group-1 margin-none borders-none dreports" style='padding-right: 26px;'>
25
26 <?php if(Auth::user()->moduleACL("Dialer",true,true,true)){ ?>
27 <li class="list-group-item w170p">
28 <a href="#" onclick="doAjax('dialer/liveusers','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Live</a>
29 </li>
30 <?php } ?>
31
32 <li class="list-group-item w170p">
33 <a href="#" onclick="doAjax('dialer/contactability','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Contactability</a>
34 </li>
35 <li class="list-group-item w170p">
36 <a href="#" onclick="doAjax('dialer/productivity','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Productivity</a>
37 </li>
38 <li class="list-group-item w170p">
39 <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>
40 </li>
41 <li class="list-group-item w170p">
42 <a href="#" onclick="doAjax('dialer/nextaction','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Next Action</a>
43 </li>
44 <li class="list-group-item w170p">
45 <a href="#" onclick="doAjax('dialer/agenttime','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Agent Time</a>
46 </li>
47 <li class="list-group-item w170p">
48 <a href="#" onclick="doAjax('dialer/ic4trails','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>IC4 Trails</a>
49 </li>
50
51 <li class="list-group-item w170p">
52 <a href="#" onclick="doAjax('dialer/calllog','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Call</a>
53 </li>
54
55
56 <?php if(Auth::user()->usertype != "Telecaller"): ?>
57 <li class="list-group-item w170p">
58 <a href="#" onclick="doAjax('dialer/searchrecordings','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Recordings</a>
59 </li>
60 <?php endif; ?>
61
62 <?php if(Auth::user()->usertype == 'Admin'): ?>
63 <li class="list-group-item w170p">
64 <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>
65 </li>
66 <li class="list-group-item w170p">
67 <a href="#" onclick="doAjax('dialer/agentperformance','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Agent Performance</a>
68 </li>
69
70 <li class="list-group-item w170p">
71 <a href="#" onclick="doAjax('dialer/campaignlevel','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Campaign Level</a>
72 </li>
73 <li class="list-group-item w170p">
74 <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>
75 </li>
76 <?php endif; ?>
77
78 <!-- <li class="list-group-item">
79 <a href="#" onclick="doAjax('dialer/agentreport','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Login</a>
80 </li>
81 <li class="list-group-item">
82 <a href="#" onclick="doAjax('dialer/campreport','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Time</a>
83 </li>
84 <li class="list-group-item">
85 <a href="#" onclick="doAjax('dialer/statusreport','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Status</a>
86 </li> -->
87
88 </ul>
89 </div>
90 <!-- // END col-app -->
91
92 </div>
93 <!-- // END col-app -->
94
95 </div>
96 <!-- // END col-table-row -->
97
98 </div>
99 <!-- // END col-table -->
100
101 </div>
102 <!-- // END col-separator.box -->
103
104 </div>
105 <!-- // END col -->
106
107 <!-- col -->
108 <div class="col-md-10 col-sm-9" style='border-right:13px solid #eaeaea'>
109
110 <!-- col-separator.box -->
111 <div class="col-separator col-unscrollable box">
112
113 <!-- col-table -->
114 <div class="col-table">
115
116 <!-- <h4 class="innerAll margin-none border-bottom">My Sessions</h4> -->
117
118 <!-- col-table-row -->
119 <div class="col-table-row" style='background: #fff;'>
120
121 <!-- col-app -->
122 <div class="col-app col-unscrollable">
123
124 <!-- col-app -->
125 <div class="col-app" style='position:relative'>
126
127 <div class="" id=rightmainreportdiv>
128 <script>
129 <?php if(Auth::user()->moduleACL("Dialer",true,true,true)){ ?>
130 doAjax('dialer/liveusers','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');
131 <?php }else { ?>
132 doAjax('dialer/calllog','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');
133 <?php } ?>
134 </script>
135 </div>
136
137 </div>
138 </div>
139 </div>
140 </div>
141 </div>
142 </div>
143 </div>
144 </div>
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 $reportTitle = 'IC4 Trails';
3 $returnblade = 'ic4trails';
4
5 $view_path = Config::get('view.paths');
6 include_once($view_path[0].'/layout/module/dialer/reporthead.blade.php');
7
8 $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"));
9 $alist=$alist->get();
10
11 $i=1;
12 $reporthead=array("Account No.","Number","User Id","Action Date","Action Code","Result Code","RFD","Next Action","Next Action Date & Time","Remarks","UPI","Designation","Adhar");
13 $reportarray=array();
14 if (count($alist))
15 foreach($alist as $aline)
16 {
17 $tuser=$userarr[$aline->user_id];
18
19 $userData=json_decode($aline->data,true);
20 $recordingFolder = $userData['recFolder'];
21
22 $reportarray[$aline->id]=array(
23 "Account No."=>$aline->lan,
24 "Number"=>$aline->number,
25 "User Id"=>$tuser->username,
26 "Action Date"=>date('d.m.Y H:i',strtotime($aline->created_at)+(5*60*60)+(30*60)),
27 "Action Code"=>$aline->action_code,
28 "Next Action"=>$aline->nextActionCode,
29 "Result Code"=>$aline->resultCode,
30 "RFD"=>$aline->rfd,
31 "Next Action Date & Time"=> ($aline->nextActionDateTime != '0000-00-00 00:00:00') ? date('d.m.Y H:i',strtotime($aline->nextActionDateTime)) : '',
32 "Remarks" =>$aline->userremarks,
33 "UPI" =>$aline->upi,
34 "Designation" =>$aline->designation,
35 "Adhar" =>$aline->adhar,
36 "Recording ID"=>$aline->id,
37 "Recording Folder"=>$recordingFolder,
38 "Recording Size"=>$aline->recsize
39 );
40 }
41
42 if(Input::has("dllogxls"))
43 {
44 include_once(app_path().'/lib/phpexcel/PHPExcel.php');
45
46 $inputFileType = "CSV";
47 $objReader = PHPExcel_IOFactory::createReader($inputFileType);
48 $objPHPExcel = $objReader->load("assets/extras/blank.csv");
49 $baseRow = 2;
50
51 $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") );
52 $highestColumn = sizeof($exporthead);
53 for ($head = 0; $head < $highestColumn; $head++){
54 $colstr=PHPExcel_Cell::stringFromColumnIndex($head);
55 $objPHPExcel->getActiveSheet()->setCellValue($colstr."1", $exporthead[$head]);
56 }
57
58 $highestColumn = sizeof($reporthead);
59 foreach($reportarray as $uid=>$uarr)
60 {
61 $row = $baseRow++;
62 $col = 0;
63
64 for ($head = 0; $head < $highestColumn; $head++){
65 $colstr=PHPExcel_Cell::stringFromColumnIndex($head);
66 $objPHPExcel->getActiveSheet()->setCellValue($colstr.$row, $uarr[$reporthead[$head]]);
67 }
68 }
69
70 header('Content-Type: application/vnd.ms-excel');
71 header('Content-Disposition: attachment;filename="ic4trails.csv"');
72 header('Cache-Control: max-age=0');
73
74 $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, $inputFileType);
75 $objWriter->save('php://output');
76
77 return ;
78 }
79
80 $highestColumn = sizeof($reporthead);
81 $exit = 1;
82
83 if(count($reportarray)) {
84 $outhead="<tr>";$outstr="";
85 for ($head = 0; $head < $highestColumn; $head++){
86 $outhead.="<td>".$reporthead[$head]."</td>";
87 }
88 $outhead.="</tr>";
89 $utotalarr = array("Telecaller"=>'Total');
90 foreach($reportarray as $uid=>$uarr)
91 {
92 $outstr.="<tr>";
93 for ($head = 0; $head < $highestColumn; $head++){
94 $outstr.="<td>".$uarr[$reporthead[$head]]."</td>";
95 }
96 $recstr='';
97 if($dashboarduser->moduleACL("Dialer",false,false,true))
98 {
99 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> ";
100 if(Auth::user()->usertype != "Telecaller" && isset($uarr['Recording Folder']))
101 $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>";
102 }
103 $outstr.="<td>$recstr</td>";
104 $outstr.="</tr>";
105
106 if($exit=="1000")break;
107
108 $exit++;
109 }
110 }
111 else {
112 $outhead.="<tr><td>No Records Found.</td></tr>";
113 }
114 ?>
115
116 <?php echo $__env->make('layout.module.dialer.searchform', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
117
118 <div style="overflow: auto; margin-top: 10px;">
119 <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;'>
120 <thead><?php echo $outhead; ?></thead>
121 <?php echo $outstr; ?>
122 </table>
123 </div>
124 </div>
125
126 <script>
127 function getCallRec(id)
128 {
129 doAjax("dialer/calllog","getCallRec=1&calllog="+id,'recspan_'+id,'rec_ajax','singlefail','GET');
130 }
131 </script>
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
5 <meta name="robots" content="noindex,nofollow" />
6 <style>
7 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;}
8
9 html { background: #eee; padding: 10px }
10 img { border: 0; }
11 #sf-resetcontent { width:970px; margin:0 auto; }
12 .sf-reset { font: 11px Verdana, Arial, sans-serif; color: #333 }
13 .sf-reset .clear { clear:both; height:0; font-size:0; line-height:0; }
14 .sf-reset .clear_fix:after { display:block; height:0; clear:both; visibility:hidden; }
15 .sf-reset .clear_fix { display:inline-block; }
16 .sf-reset * html .clear_fix { height:1%; }
17 .sf-reset .clear_fix { display:block; }
18 .sf-reset, .sf-reset .block { margin: auto }
19 .sf-reset abbr { border-bottom: 1px dotted #000; cursor: help; }
20 .sf-reset p { font-size:14px; line-height:20px; color:#868686; padding-bottom:20px }
21 .sf-reset strong { font-weight:bold; }
22 .sf-reset a { color:#6c6159; }
23 .sf-reset a img { border:none; }
24 .sf-reset a:hover { text-decoration:underline; }
25 .sf-reset em { font-style:italic; }
26 .sf-reset h1, .sf-reset h2 { font: 20px Georgia, "Times New Roman", Times, serif }
27 .sf-reset h2 span { background-color: #fff; color: #333; padding: 6px; float: left; margin-right: 10px; }
28 .sf-reset .traces li { font-size:12px; padding: 2px 4px; list-style-type:decimal; margin-left:20px; }
29 .sf-reset .block { background-color:#FFFFFF; padding:10px 28px; margin-bottom:20px;
30 -webkit-border-bottom-right-radius: 16px;
31 -webkit-border-bottom-left-radius: 16px;
32 -moz-border-radius-bottomright: 16px;
33 -moz-border-radius-bottomleft: 16px;
34 border-bottom-right-radius: 16px;
35 border-bottom-left-radius: 16px;
36 border-bottom:1px solid #ccc;
37 border-right:1px solid #ccc;
38 border-left:1px solid #ccc;
39 }
40 .sf-reset .block_exception { background-color:#ddd; color: #333; padding:20px;
41 -webkit-border-top-left-radius: 16px;
42 -webkit-border-top-right-radius: 16px;
43 -moz-border-radius-topleft: 16px;
44 -moz-border-radius-topright: 16px;
45 border-top-left-radius: 16px;
46 border-top-right-radius: 16px;
47 border-top:1px solid #ccc;
48 border-right:1px solid #ccc;
49 border-left:1px solid #ccc;
50 overflow: hidden;
51 word-wrap: break-word;
52 }
53 .sf-reset li a { background:none; color:#868686; text-decoration:none; }
54 .sf-reset li a:hover { background:none; color:#313131; text-decoration:underline; }
55 .sf-reset ol { padding: 10px 0; }
56 .sf-reset h1 { background-color:#FFFFFF; padding: 15px 28px; margin-bottom: 20px;
57 -webkit-border-radius: 10px;
58 -moz-border-radius: 10px;
59 border-radius: 10px;
60 border: 1px solid #ccc;
61 }
62 </style>
63 </head>
64 <body>
65 <div id="sf-resetcontent" class="sf-reset">
66 <h1>Whoops, looks like something went wrong.</h1>
67 <div style='display:none'>___Kstych___x___Exception___</div>
68 </div>
69 </body>
70 </html>
This diff could not be displayed because it is too large.
1 <?php $__env->startSection('main_menu'); ?>
2 <?php echo $__env->make('layout.main_menu', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
3 <?php $__env->stopSection(); ?>
4
5 <?php $__env->startSection('top_menu'); ?>
6 <?php echo $__env->make('layout.top_menu', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
7 <?php $__env->stopSection(); ?>
8
9 <?php $__env->startSection('main_content'); ?>
10 <script>
11 $(document).ready(function(){
12 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){}});
13 else kstychHashFunction();
14
15 <?php if(Config::get("app.extAuth")!=""){ ?>doAjax("dashboard/r",'','','ajax_dashboard_r','singlethis','GET');<?php } ?>
16 if ($.browser.msie)document.location="msie";
17
18
19 if (typeof kDesktopNotification === 'function')kDesktopNotification("","","",10);
20 incomingPresense("","","");
21 });
22
23
24
25
26 if (navigator.userAgent.match(/(iPad|iPhone|iPod touch);.*CPU.*OS/i))
27 {
28 $("#menu-top").css({'padding-top':'20px','height':'60px'});
29 $("#content").css({'margin-top':'60px'});
30 }
31 document.addEventListener('deviceready', function() {
32
33 $(document).on('click', 'a[target="_system"],a[target="_blank"]', function (e) {
34 e.preventDefault();
35 var url = this.href;
36
37 if(navigator.app)navigator.app.loadUrl(url, { openExternal:true });
38 else if(innappbrowser)cordova.exec(function(){}, function(){}, "InAppBrowser", "open", [url, "_system", null]);
39 else window.open(url,"_system");
40
41 //$("#welcome_wizard_body").html("<iframe style='width:100%;min-height:400px;height:100%' src='"+url+"'></iframe>");
42 //$("#welcome_wizard").modal('show');
43
44
45 });
46
47 });
48
49
50
51
52 </script>
53 <?php $__env->stopSection(); ?>
54
55 <?php echo $__env->make('layout.layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
...\ No newline at end of file ...\ No newline at end of file
1 <div class="layout-app"><!-- row-app -->
2 <div class="row row-app">
3
4 <!-- col -->
5 <div class="col-md-2 col-sm-3">
6
7 <!-- col-separator -->
8 <div class="col-separator col-separator-first box col-unscrollable">
9
10 <!-- col-table -->
11 <div class="col-table" style='padding-left: 13px;padding-right: 13px;'>
12
13 <h4 class="innerAll margin-none border-bottom" style='background: #fff;'>Admin Dashboard</h4>
14
15 <!-- col-table-row -->
16 <div class="col-table-row">
17
18 <!-- col-app -->
19 <div class="col-app col-unscrollable">
20
21 <!-- col-app -->
22 <div class="col-app">
23
24 <ul class="list-group list-group-1 margin-none borders-none" style='padding-right: 26px;'>
25
26 <li class="list-group-item">
27 <a href="#" onclick="doAjax('admin/main','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i> Main</a>
28 </li>
29 <li class="list-group-item">
30 <a href="#" onclick="doAjax('admin/agentreport','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i> Login</a>
31 </li>
32 <li class="list-group-item">
33 <a href="#" onclick="doAjax('admin/liveusers','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i> Live</a>
34 </li>
35
36 <!-- <li class="list-group-item">
37 <a href="#" onclick="doAjax('admin/recarchive','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i> Recordings</a>
38 </li>-->
39
40
41 </ul>
42
43
44 </div>
45 <!-- // END col-app -->
46
47 </div>
48 <!-- // END col-app -->
49
50 </div>
51 <!-- // END col-table-row -->
52
53 </div>
54 <!-- // END col-table -->
55
56 </div>
57 <!-- // END col-separator.box -->
58
59 </div>
60 <!-- // END col -->
61
62 <!-- col -->
63 <div class="col-md-10 col-sm-9" style='border-right:13px solid #eaeaea'>
64
65 <!-- col-separator.box -->
66 <div class="col-separator col-unscrollable box">
67
68 <!-- col-table -->
69 <div class="col-table">
70
71 <!-- <h4 class="innerAll margin-none border-bottom">My Sessions</h4> -->
72
73 <!-- col-table-row -->
74 <div class="col-table-row" style='background: #fff;'>
75
76 <!-- col-app -->
77 <div class="col-app col-unscrollable">
78
79 <!-- col-app -->
80 <div class="col-app" style='position:relative'>
81
82 <div class="" id=rightmainreportdiv>
83 <script>
84 doAjax('admin/main','','rightmainreportdiv','ajax_admin_reports','singlethis','GET');
85 </script>
86 </div>
87
88 </div>
89 <!-- // END col-app -->
90
91 </div>
92 <!-- // END col-app.col-unscrollable -->
93
94 </div>
95 <!-- // END col-table-row -->
96
97 </div>
98 <!-- // END col-table -->
99
100 </div>
101 <!-- // END col-separator.box -->
102
103 </div>
104 <!-- // END col -->
105
106 </div>
107 <!-- // END row-app -->
108
109
110
111
112 </div>
1 <?php
2
3 $client=Input::get("client");
4 $monthworkdays=base64_encode(Input::get("monthworkdays"));
5 $agencyfeesvalue=base64_encode(Input::get("agencyfeesvalue"));
6 $agencyfeefunction=base64_encode(Input::get("agencyfeefunction"));
7 $contractstartdate=base64_encode(Input::get("contractstartdate"));
8 $contractenddate=base64_encode(Input::get("contractenddate"));
9
10 $insurancerequired=base64_encode(Input::get("insurancerequired"));
11 $servicedby=base64_encode(Input::get("servicedby"));
12
13 $contactname=base64_encode(Input::get("contactname"));
14 $contactemail=base64_encode(Input::get("contactemail"));
15 $contactphone=base64_encode(Input::get("contactphone"));
16 $hrsendfiles=base64_encode(Input::get("hrsendfiles"));
17
18 $contactnameacct=base64_encode(Input::get("contactnameacct"));
19 $contactemailacct=base64_encode(Input::get("contactemailacct"));
20 $contactphoneacct=base64_encode(Input::get("contactphoneacct"));
21
22 $offerletter=base64_encode($_POST["offerletter"]);
23 $confirmationletter=base64_encode($_POST["confirmationletter"]);
24 $promotionletter=base64_encode($_POST["promotionletter"]);
25 $appraisalletter=base64_encode($_POST["appraisalletter"]);
26 $warningletter=base64_encode($_POST["warningletter"]);
27 $terminationletter=base64_encode($_POST["terminationletter"]);
28 $nocletter=base64_encode($_POST["nocletter"]);
29 $experienceletter=base64_encode($_POST["experienceletter"]);
30 $endofserviceletter=base64_encode($_POST["endofserviceletter"]);
31
32 $yrmeternityleaves=base64_encode(Input::get("yrmeternityleaves"));
33 $yrsickleaves=base64_encode(Input::get("yrsickleaves"));
34 $yrannualleaves=base64_encode(Input::get("yrannualleaves"));
35 $yemaxcarryleaves=base64_encode(Input::get("yemaxcarryleaves"));
36
37 $trackerfields=base64_encode(Input::get("trackerfields"));
38 $campaignscript=base64_encode(Input::get("campaignscript"));
39
40 $did='';
41 $autodial='';
42 $voiceblaster='';
43
44 if(Input::get("dialer_did"))
45 $did="DialerDID=".Input::get("dialer_did");
46
47 if(Input::get("autodial_pacing"))
48 $autodial="autodialercampaign=".Input::get("autodial_pacing");
49
50 if(Input::get("vb_pacing"))
51 $voiceblaster="vbpace=".Input::get("vb_pacing");
52 else
53 $voiceblaster="vbpace=1";
54
55 $textmessage="textmessage=".Input::get("textmessage");
56
57 $mergedeveloperparam = $did."\n".$autodial."\n".$voiceblaster."\n".$textmessage;
58 $developerparam=base64_encode($mergedeveloperparam);
59 //$developerparam=base64_encode(str_replace('\n',"\n",Input::get("developerparam")));
60 $campaigncrmfields=Input::get("campaigncrmfields");
61
62 // code start - calling mode assign campaign wise functionality - by YASHWANT on 11042017
63 $campaignCallingMode=base64_encode(Input::get("campaignCallingMode"));
64 // code end - calling mode assign campaign wise functionality - by YASHWANT on 11042017
65
66 $mvalue ="monthworkdays~$monthworkdays|";
67 $mvalue.="agencyfeesvalue~$agencyfeesvalue|";
68 $mvalue.="agencyfeefunction~$agencyfeefunction|";
69 $mvalue.="contractstartdate~$contractstartdate|";
70 $mvalue.="contractenddate~$contractenddate|";
71
72 $mvalue.="insurancerequired~$insurancerequired|";
73 $mvalue.="servicedby~$servicedby|";
74
75 $mvalue.="contactname~$contactname|";
76 $mvalue.="contactemail~$contactemail|";
77 $mvalue.="contactphone~$contactphone|";
78 $mvalue.="hrsendfiles~$hrsendfiles|";
79
80 $mvalue.="contactnameacct~$contactnameacct|";
81 $mvalue.="contactemailacct~$contactemailacct|";
82 $mvalue.="contactphoneacct~$contactphoneacct|";
83
84 $mvalue.="offerletter~$offerletter|";
85 $mvalue.="confirmationletter~$confirmationletter|";
86 $mvalue.="promotionletter~$promotionletter|";
87 $mvalue.="appraisalletter~$appraisalletter|";
88 $mvalue.="warningletter~$warningletter|";
89 $mvalue.="terminationletter~$terminationletter|";
90 $mvalue.="nocletter~$nocletter|";
91 $mvalue.="experienceletter~$experienceletter|";
92 $mvalue.="endofserviceletter~$endofserviceletter|";
93 $mvalue.="yrmeternityleaves~$yrmeternityleaves|";
94 $mvalue.="yrsickleaves~$yrsickleaves|";
95 $mvalue.="yrannualleaves~$yrannualleaves|";
96 $mvalue.="yemaxcarryleaves~$yemaxcarryleaves|";
97 $mvalue.="developerparam~$developerparam|";
98
99 $mvalue.="trackerfields~$trackerfields|";
100
101 $mvalue.="campaignscript~$campaignscript|";
102
103 // code start - calling mode assign campaign wise functionality - by YASHWANT on 11042017
104 $mvalue.="campaignCallingMode~$campaignCallingMode|";
105 // code end - calling mode assign campaign wise functionality - by YASHWANT on 11042017
106
107 if($wakka->getCount("hrms_masters","mkey='$client' and mtype='company'")==0)$companyarr=$wakka->Query("insert into hrms_masters set mvalue='',mkey='$client',mtype='company';");
108
109 $companyarr=$wakka->Query("update hrms_masters set mvalue='$mvalue' where mkey='$client' and mtype='company';");
110
111 if($wakka->getCount("hrms_masters","mkey='$client' and mtype='coreconfig'")==0)
112 $companyarr=$wakka->Query("insert into hrms_masters set mvalue='',mkey='$client',mtype='coreconfig';");
113
114 $companyarr=$wakka->Query("update hrms_masters set mvalue='$campaigncrmfields' where mkey='$client' and mtype='coreconfig';");
115
116 //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");
117 echo "<div class='message success close'><h2>Success!</h2><p>Data Saved</p></div>";
118 echo "<script>simpleNotification('success','topRight','Saves Successfully');</script>";
119 ?>
1 <style>
2 .heading-buttons h4{
3 line-height:20px;
4 }
5 </style>
6 <div class="layout-app"><!-- row-app -->
7
8 <div class="row row-app">
9
10 <!-- col -->
11 <div class="col-md-12">
12
13 <!-- col-separator.box -->
14 <div class="col-separator col-separator-first col-unscrollable box">
15
16 <!-- col-table -->
17 <div class="col-table" id=authorworkspacediv>
18 <!-- Search Bar -->
19 <div class="input-group">
20 <input type="text" class="form-control" placeholder="Search for Users..." id=adminu_Search>
21 <span class="input-group-btn">
22 <button class="btn btn-primary rounded-none" type="button" onclick="adminSearchUser();return false"><i class="fa fa-search"></i></button>
23 </span>
24 </div>
25 <div class="col-separator-h"></div>
26 <!-- End Search Bar -->
27
28 <div class="col-table-row">
29
30 <div class="col-app col-unscrollable">
31
32 <div class="col-app">
33
34 <div class="row-app">
35
36 <div class="col-md-6">
37 <div class="col-separator">
38
39 <!-- Category Heading -->
40 <div class="heading-buttons bg-gray border-bottom innerR half">
41 <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>
42 <h4 class="innerTB margin-bottom-none">Users</h4>
43 <div class="clearfix"></div>
44 </div>
45 <!-- End Category Heading -->
46
47
48 <?php echo $userlist->render(); ?>
49 <?php foreach ($userlist as $tuser)
50 {
51 $tphoto=$tuser->fetchphotothumb();
52 ?>
53 <!-- Category Listing -->
54 <div class="row innerAll half border-bottom bg-gray-hover">
55 <div class="col-sm-6 col-xs-8">
56 <ul class="media-list margin-none">
57 <li class="media">
58 <a class="pull-left innerAll" href="#" onclick="doAjax('user/<?php echo $tuser->id; ?>/edit','','userformdiv','ajax_users_create','singlethis','GET');return false;">
59 <span class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i></span>
60 </a>
61 <a class="pull-left innerAll" href="#" onclick="doAjax('user/<?php echo $tuser->id; ?>','','userformdiv','ajax_users_delete','singlethis','DELETE');return false;">
62 <span class="btn btn-primary btn-xs"><i class="fa fa-trash-o"></i></span>
63 </a>
64 <div class="media-body">
65 <div class="innerAll">
66 <h5 class=""><a href="#" class="media-heading text-primary">Modules</a></h5>
67 <div class="clearfix"></div>
68 <small class="margin-none label label-inverse">Social</small>
69 <small class="margin-none label label-inverse">HR</small>
70 <small class="margin-none label label-inverse">Reports</small>
71 <small class="margin-none label label-inverse">CRM</small>
72
73 </div>
74
75 </div>
76 </li>
77 </ul>
78 </div>
79 <div class="col-sm-3 col-xs-4">
80 <div class="text-center">
81 <p class="strong">Tasks</p>
82 <span class="badge badge-primary" data-toggle="tooltip" data-title="Published" data-placement="left" data-container="body">0</span>
83 <span class="badge badge-primary badge-stroke" data-toggle="tooltip" data-title="Subscribed" data-placement="right" data-container="body">0</span>
84 </div>
85 </div>
86 <div class="col-sm-3 col-xs-hidden">
87 <div class="innerAll">
88 <div class="media">
89 <a href="#" class="pull-left">
90 <img src="<?php echo $tphoto; ?>" class="media-object" width=35px />
91 </a>
92 <div class="media-body">
93 <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>
94 <div class="clearfix"></div>
95 <small>
96 <?php if($tuser->status=="Active"): ?>
97 <span class="label label-success"><?php echo $tuser->status; ?></span>
98 <?php elseif($tuser->status=="Disabled"): ?>
99 <span class="label label-warning"><?php echo $tuser->status; ?></span>
100 <?php elseif($tuser->status=="Unverified"): ?>
101 <span class="label label-warning"><?php echo $tuser->status; ?></span>
102 <?php elseif($tuser->status=="Blocked"): ?>
103 <span class="label label-important"><?php echo $tuser->status; ?></span>
104 <?php endif; ?>
105 </small>
106 </div>
107 </div>
108 </div>
109 </div>
110 </div>
111 <!-- // END Category Listing -->
112 <?php } ?>
113 <?php echo $userlist->render(); ?>
114
115 </div>
116 <!-- // END col-separator -->
117 </div>
118 <!-- // END col -->
119
120 <!-- col -->
121 <div class="col-md-6">
122
123 <!-- col-separator -->
124 <div class="col-separator col-separator-last" id=userformdiv>
125 </div>
126 <!-- // END col-separator -->
127
128 </div>
129 <!-- // END col-table -->
130
131 </div>
132 <!-- // END col-separator.box -->
133
134 </div>
135 <!-- // END col -->
136
137 </div>
138 <!-- // END row-app -->
139
140 </div>
141
142
143 <script>
144 $(".pagination a").click(function(e){
145 e.preventDefault();
146 var url=$(this).attr("href");
147 var res = url.split("page=");
148 menuAction("user?page="+res[1]);
149 return false;
150 });
151
152 function adminSearchUser()
153 {
154 doAjax('user?search='+$('#adminu_Search').val(),'','content','ajax_users_create','singlethis','GET');
155 }
156 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <?php echo $__env->make('layout.header', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
2
3 <?php echo $__env->yieldContent('main_menu'); ?>
4 <?php echo $__env->yieldContent('top_menu'); ?>
5
6 <!-- Main Container Fluid -->
7 <div class="container-fluid">
8
9 <div id='absolutedivcontent' style='z-index:1;position:absolute;display:none'></div>
10 <div id="content">
11 <?php echo $__env->yieldContent('main_content'); ?>
12 </div>
13 <div class="clearfix"></div>
14
15 <div id="footer" class="hidden-print" style='display:none'>
16 <div class="copy">v<?php echo Config::get('app.app_version'); ?></div>
17 </div>
18 <!-- // Footer END -->
19
20 </div>
21 <!-- // Main Container Fluid END -->
22
23 <?php echo $__env->make('layout.footer', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
1 <?php
2 if(Input::has('addcompany'))
3 {
4 $company=trim(Input::get("addcompany"));
5 if($company!="")
6 {
7 $companyarr=$wakka->LoadSingle("select * from hrms_masters where mtype='company' and mkey='$company'");
8 if(!$companyarr)
9 {
10 $wakka->Query("insert into hrms_masters set mvalue='',mkey='$company',mtype='company';");
11 }
12 }
13
14 return;
15 }
16
17 $kformlib=new \App\Jobs\KFormLib($wakka->HRCoreVars["HRFiledsStr"]);
18
19 $client=Input::get("client");
20
21 $snedmailsarr=array();
22 $workflowarr=$wakka->LoadAll("select * from hrms_masters where mtype='workflow';");
23
24 foreach($workflowarr as $wfline)
25 {
26 $workflow=explode("~~~",$wfline['mvalue']);
27 $controls=explode("|",$workflow[0]);
28
29 $tasks=explode("_EOF_",$workflow[1]);//$tasks=explode("\n",$workflow[1]);
30 foreach($tasks as $task)
31 {
32 if(trim($task)!='')
33 {
34 $taskVals=explode("|",$task);$taskVals[0]=trim($taskVals[0]);
35 if($taskVals[0]=="{{clientcontact}}")
36 {
37 $snedmailsarr[]=$controls[0];
38 }
39 }
40 }
41 }
42
43
44
45 if($client!="")
46 {
47 $mastersdata=$wakka->getCompanyMaster($client);
48
49 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>";
50 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>";
51 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>";
52
53 $checkStr='';
54 if($mastersdata["textmessage"]=='1')$checkStr='checked';
55
56 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>";
57
58 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>";
59
60 // code start - calling mode assign campaign wise functionality - by YASHWANT on 11042017
61 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>";
62 // code end - calling mode assign campaign wise functionality - by YASHWANT on 11042017
63
64 if(!isset($mastersdata["trackerfields"]))$mastersdata["trackerfields"]="";
65 $trackerfieldsarr=array_unique(array_filter(explode(",",$mastersdata["trackerfields"])));
66 $toarr=array();
67 $optionsstr="";
68 $fileids=explode(",",$kformlib->HRFiledsStr);
69 foreach($fileids as $fileid)
70 {
71 if(trim($fileid)!='')
72 {
73 if(strstr($kformlib->HRFileFieldsStr,$fileid))$ftype='File';
74 else if(strstr($kformlib->HRDateFilds,$fileid))$ftype='Date';
75 else if(strstr($kformlib->HRDropFilds,$fileid))$ftype='Dropdown';
76 else $ftype='Text';
77 $toarr[$fileid]=$kformlib->HRFieldNames[$fileid]." ($ftype)";
78 }
79 }
80 asort($toarr);
81 foreach($trackerfieldsarr as $key)$optionsstr.="<option value='$key' selected>$toarr[$key]</option>";
82 foreach($toarr as $key=>$opts)$optionsstr.="<option value='$key'>$opts</option>";
83 ?>
84 <script>
85
86 $(document).ready(function(){
87 $('#vbcheck').change(function() {
88 if(this.checked) {
89 $('#vb_pacing').removeAttr('disabled');
90 $('#withoutTM').removeAttr('disabled');
91 }
92 else
93 {
94 $('#vb_pacing').attr('disabled', 'disabled');
95 $('#withoutTM').attr('disabled', 'disabled');
96
97 }
98 });
99
100 $('#withoutTM').change(function() {
101 if(this.checked) {
102 $('#checkTmVal').val(1);
103 }
104 else
105 {
106 $('#checkTmVal').val(0);
107 }
108 });
109 });
110 </script>
111 <?php
112 }
113 ?>
1 <style>
2 .heading-buttons h4{
3 line-height:20px;
4 }
5 </style>
6 <div class="layout-app"><!-- row-app -->
7
8 <div class="row row-app">
9
10 <!-- col -->
11 <div class="col-md-12">
12
13 <!-- col-separator.box -->
14 <div class="col-separator col-separator-first col-unscrollable box">
15
16 <!-- col-table -->
17 <div class="col-table" id=authorworkspacediv>
18 <!-- Search Bar -->
19 <div class="input-group">
20 <input type="text" class="form-control" placeholder="Search for Users..." id=adminu_Search>
21 <span class="input-group-btn">
22 <button class="btn btn-primary rounded-none" type="button" onclick="adminSearchUser();return false"><i class="fa fa-search"></i></button>
23 </span>
24 </div>
25 <div class="col-separator-h"></div>
26 <!-- End Search Bar -->
27
28 <div class="col-table-row">
29
30 <div class="col-app col-unscrollable">
31
32 <div class="col-app">
33
34 <div class="row-app">
35
36 <div class="col-md-6">
37 <div class="col-separator">
38
39 <!-- Category Heading -->
40 <div class="heading-buttons bg-gray border-bottom innerR half">
41 <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>
42 <h4 class="innerTB margin-bottom-none">Users</h4>
43 <div class="clearfix"></div>
44 </div>
45 <!-- End Category Heading -->
46
47
48 <?php echo $userlist->render(); ?>
49 <?php foreach ($userlist as $tuser)
50 {
51 $tphoto=$tuser->fetchphotothumb();
52 ?>
53 <!-- Category Listing -->
54 <div class="row innerAll half border-bottom bg-gray-hover">
55 <div class="col-sm-6 col-xs-8">
56 <ul class="media-list margin-none">
57 <li class="media">
58 <a class="pull-left innerAll" href="#" onclick="doAjax('user/<?php echo $tuser->id; ?>/edit','','userformdiv','ajax_users_create','singlethis','GET');return false;">
59 <span class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i></span>
60 </a>
61 <a class="pull-left innerAll" href="#" onclick="doAjax('user/<?php echo $tuser->id; ?>','','userformdiv','ajax_users_delete','singlethis','DELETE');return false;">
62 <span class="btn btn-primary btn-xs"><i class="fa fa-trash-o"></i></span>
63 </a>
64 <div class="media-body">
65 <div class="innerAll">
66 <h5 class=""><a href="#" class="media-heading text-primary">Modules</a></h5>
67 <div class="clearfix"></div>
68 <small class="margin-none label label-inverse">Social</small>
69 <small class="margin-none label label-inverse">HR</small>
70 <small class="margin-none label label-inverse">Reports</small>
71 <small class="margin-none label label-inverse">CRM</small>
72
73 </div>
74
75 </div>
76 </li>
77 </ul>
78 </div>
79 <div class="col-sm-3 col-xs-4">
80 <div class="text-center">
81 <p class="strong">Tasks</p>
82 <span class="badge badge-primary" data-toggle="tooltip" data-title="Published" data-placement="left" data-container="body">0</span>
83 <span class="badge badge-primary badge-stroke" data-toggle="tooltip" data-title="Subscribed" data-placement="right" data-container="body">0</span>
84 </div>
85 </div>
86 <div class="col-sm-3 col-xs-hidden">
87 <div class="innerAll">
88 <div class="media">
89 <a href="#" class="pull-left">
90 <img src="<?php echo $tphoto; ?>" class="media-object" width=35px />
91 </a>
92 <div class="media-body">
93 <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>
94 <div class="clearfix"></div>
95 <small>
96 <?php if($tuser->status=="Active"): ?>
97 <span class="label label-success"><?php echo $tuser->status; ?></span>
98 <?php elseif($tuser->status=="Disabled"): ?>
99 <span class="label label-warning"><?php echo $tuser->status; ?></span>
100 <?php elseif($tuser->status=="Unverified"): ?>
101 <span class="label label-warning"><?php echo $tuser->status; ?></span>
102 <?php elseif($tuser->status=="Blocked"): ?>
103 <span class="label label-important"><?php echo $tuser->status; ?></span>
104 <?php endif; ?>
105 </small>
106 </div>
107 </div>
108 </div>
109 </div>
110 </div>
111 <!-- // END Category Listing -->
112 <?php } ?>
113 <?php echo $userlist->render(); ?>
114
115 </div>
116 <!-- // END col-separator -->
117 </div>
118 <!-- // END col -->
119
120 <!-- col -->
121 <div class="col-md-6">
122
123 <!-- col-separator -->
124 <div class="col-separator col-separator-last" id=userformdiv>
125 </div>
126 <!-- // END col-separator -->
127
128 </div>
129 <!-- // END col-table -->
130
131 </div>
132 <!-- // END col-separator.box -->
133
134 </div>
135 <!-- // END col -->
136
137 </div>
138 <!-- // END row-app -->
139
140 </div>
141
142
143 <script>
144 $(".pagination a").click(function(e){
145 e.preventDefault();
146 var url=$(this).attr("href");
147 var res = url.split("page=");
148 menuAction("user?page="+res[1]);
149 return false;
150 });
151
152 function adminSearchUser()
153 {
154 doAjax('user?search='+$('#adminu_Search').val(),'','content','ajax_users_create','singlethis','GET');
155 }
156 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <!-- Heading -->
2 <h5 class="innerAll margin-none bg-primary">
3 <i class="fa fa-fw fa-pencil"></i> Add Role
4 <a href="#" class="btn btn-sm btn-inverse pull-right btn-xs" style="margin-top: -5px;" onclick="return false">
5 <i class="fa fa-user fa-fw"></i>
6
7 </a>
8 </h5>
9
10
11 <form class="innerAll">
12 <fieldset>
13 <div class="control-role">
14 <label class="col-md-4 control-label" for="rolename">RoleName</label>
15 <div class="col-md-8 controls">
16 <input class="form-control" id="rolename" type="text" value="<?php echo $trole->rolename; ?>" />
17 </div>
18 </div>
19
20 <div class="control-role">
21 <label class="col-md-4 control-label" for="rolestatus">Status</label>
22 <div class="col-md-8 controls">
23 <select id="rolestatus" class="form-control">
24 <option value='<?php echo $trole->status; ?>'><?php echo $trole->status; ?></option>
25 <option value="Active">Active</option>
26 <option value="Disabled">Disabled</option>
27 </select>
28 </div>
29 </div>
30
31
32 <hr>
33
34
35
36 <div class="control-group">
37 <label class="col-md-4 control-label" for="rolegroup">Group</label>
38 <div class="col-md-8 controls">
39 <select id="rolegroup" required=required class="form-control">
40 <?php foreach(Auth::user()->getAccessList("group",true,false,false,true) as $tgrp)
41 {
42 $seltext='';if($tgrp==$trole->rolegroup)$seltext='selected';
43 echo "<option value='$tgrp' $seltext>$tgrp</option>";
44 }
45 ?>
46 </select>
47 </div>
48 </div>
49
50 <!-- <div class="control-group">
51 <label class="col-md-4 control-label" for="rolegroup">Chat/Voice Enabled</label>
52 <div class="col-md-8 controls">
53 <select id="uservoice" required=required class="form-control">
54 <option value="Active">Active</option>
55 <option value="InActive">InActive</option>
56 </select>
57 </div>
58 </div>-->
59
60
61 <hr><h2 style='padding-left:10%'>Modules Access</h2>
62
63 <div class="control-group">
64 <label class="col-md-4 control-label" for="modulerwa">Read+Write+Admin</label>
65 <div class="col-md-8 controls">
66 <select id="modulerwa" multiple="" data-rel="chosen" style='width:100%' class="select2multi">
67 <?php
68 $tmodarr=array();
69 if(Auth::user()->moduleACL("Admin",true,true,true))foreach(Config::get("app.app_modules") as $entry=>$entryarr)$tmodarr[]=$entry;
70 else $tmodarr=Auth::user()->getAccessList("module",false,false,true,true);
71
72 foreach($tmodarr as $tmod){
73 $seltext='';if(strstr($trole->modulerwa,$tmod))$seltext='selected';
74 echo "<option value='$tmod' $seltext>$tmod</option>";
75 } ?>
76 </select>
77 </div>
78 </div>
79 <div class="control-group">
80 <label class="col-md-4 control-label" for="modulerw">Read+Write</label>
81 <div class="col-md-8 controls">
82 <select id="modulerw" multiple="" data-rel="chosen" style='width:100%' class="select2multi">
83 <?php
84 $tmodarr=array();
85 if(Auth::user()->moduleACL("Admin",true,true,true))foreach(Config::get("app.app_modules") as $entry=>$entryarr)$tmodarr[]=$entry;
86 else $tmodarr=Auth::user()->getAccessList("module",false,true,false,true);
87
88 foreach($tmodarr as $tmod){
89 $seltext='';if(strstr($trole->modulerw,$tmod))$seltext='selected';
90 echo "<option value='$tmod' $seltext>$tmod</option>";
91 } ?>
92 </select>
93 </div>
94 </div>
95 <div class="control-group">
96 <label class="col-md-4 control-label" for="moduler">Read</label>
97 <div class="col-md-8 controls">
98 <select id="moduler" multiple="" data-rel="chosen" style='width:100%' class="select2multi">
99 <?php
100 $tmodarr=array();
101 if(Auth::user()->moduleACL("Admin",true,true,true))foreach(Config::get("app.app_modules") as $entry=>$entryarr)$tmodarr[]=$entry;
102 else $tmodarr=Auth::user()->getAccessList("module",true,false,false,true);
103
104 foreach($tmodarr as $tmod){
105 $seltext='';if(strstr($trole->moduler,$tmod))$seltext='selected';
106 echo "<option value='$tmod' $seltext>$tmod</option>";
107 } ?>
108 </select>
109 </div>
110 </div>
111
112 <?php
113 $activegrps=\App\Models\Group::where('status','=','Active')->get(array('group'));
114 foreach($activegrps as $tgrp)$grparr[]=$tgrp->group;
115 ?>
116
117 <hr><h2 style='padding-left:10%'>Groups Access</h2>
118 <div class="control-group">
119 <label class="col-md-4 control-label" for="grouprwa">Read+Write+Admin</label>
120 <div class="col-md-8 controls">
121 <select id="grouprwa" multiple="" data-rel="chosen" style='width:100%' class="select2multi">
122 <?php foreach($grparr as $tgrp){
123 $seltext='';if(strstr($trole->grouprwa,$tgrp))$seltext='selected';
124 echo "<option value='$tgrp' $seltext>$tgrp</option>";
125 } ?>
126 </select>
127 </div>
128 </div>
129 <div class="control-group">
130 <label class="col-md-4 control-label" for="grouprw">Read+Write</label>
131 <div class="col-md-8 controls">
132 <select id="grouprw" multiple="" data-rel="chosen" style='width:100%' class="select2multi">
133 <?php foreach($grparr as $tgrp){
134 $seltext='';if(strstr($trole->grouprw,$tgrp))$seltext='selected';
135 echo "<option value='$tgrp' $seltext>$tgrp</option>";
136 } ?>
137 </select>
138 </div>
139 </div>
140 <div class="control-group">
141 <label class="col-md-4 control-label" for="groupr">Read</label>
142 <div class="col-md-8 controls">
143 <select id="groupr" multiple="" data-rel="chosen" style='width:100%' class="select2multi">
144 <?php foreach($grparr as $tgrp){
145 $seltext='';if(strstr($trole->groupr,$tgrp))$seltext='selected';
146 echo "<option value='$tgrp' $seltext>$tgrp</option>";
147 } ?>
148 </select>
149 </div>
150 </div>
151
152 <div class="control-role">
153 <label class="col-md-4 control-label" for="rolestatus">Default</label>
154 <div class="col-md-8 controls">
155 <select id="roledefault" class="form-control">
156 <option value='<?php echo $trole->default; ?>'><?php echo $trole->default; ?></option>
157 <option value="0">0</option>
158 <option value="1">1</option>
159 </select>
160 </div>
161 </div>
162
163 <div class="form-actions">
164 <button type="submit" class="btn btn-primary" onclick='createRoleForm();return false;'>Save changes</button>
165 </div>
166 </fieldset>
167 </form>
168 <script>
169 function createRoleForm()
170 {
171 var putdata="";
172 putdata+="&rolename="+$("#rolename").val();
173 putdata+="&rolestatus="+$("#rolestatus").val();
174 putdata+="&rolegroup="+$("#rolegroup").val();
175
176 putdata+="&modulerwa="+$("#modulerwa").val();
177 putdata+="&modulerw="+$("#modulerw").val();
178 putdata+="&moduler="+$("#moduler").val();
179
180 putdata+="&grouprwa="+$("#grouprwa").val();
181 putdata+="&grouprw="+$("#grouprw").val();
182 putdata+="&groupr="+$("#groupr").val();
183
184 putdata+="&roledefault="+$("#roledefault").val();
185
186
187 doAjax('role/<?php echo $trole->id; ?>',putdata,'roleformdiv','ajax_role_create','singlethis','PUT');
188 }
189 </script>
1 <?php
2
3 $themes = explode(",",env('themes'));
4
5 if($userCurrentTheme != ""){
6 if(!in_array($userCurrentTheme, $themes)){$userCurrentTheme = "Default";}
7 }else{ $userCurrentTheme = "Default"; }
8
9 ?>
10
11 <?php if(isset($response)): ?>
12 <script>
13 simpleNotification("<?php echo e($response['type']); ?>","topRight","<?php echo e($response['message']); ?>");
14 <?php if($response['type'] == "success"): ?>
15 setTimeout(function(){ window.location.reload(); }, 1000);
16 <?php endif; ?>
17 </script>
18 <?php endif; ?>
19
20 <h4>Select Theme <span class="pull-right"><small>Current Theme - </small><?php echo e($userCurrentTheme); ?></span></h4>
21 <hr style="margin-bottom: 10px;">
22
23 <div class="row">
24 <?php foreach($themes as $theme): ?>
25 <div class="col-sm-3">
26 <div class="themeBox" style="<?php echo e($theme == $userCurrentTheme ? 'border:1px solid #f30;background-color: #ffe9e9' : ''); ?>">
27 <h4><?php echo e($theme); ?>
28
29 <?php if($theme == $userCurrentTheme): ?>
30 <span class="pull-right label label-primary btn-xs">Current Theme</span>
31 <?php else: ?>
32 <button class="pull-right btn btn-success btn-xs" onclick="changeTheme('<?php echo e($theme); ?>');return false;">Select Theme</button>
33 <?php endif; ?>
34 </h4>
35 <hr style="margin-top: 10px;margin-bottom: 5px;">
36 <div class="text-center">
37 <img src="<?php echo e(URL::to('assets/themes/'.$theme.'.png')); ?>" class="img-responsive" alt="" />
38 </div>
39 </div>
40 </div>
41 <?php endforeach; ?>
42 </div>
43
44 <style>
45 .themeBox{margin: 10px;padding: 10px !important;border:1px solid #eee;border-radius: 5px;}
46 .themeBox:hover{background-color: #eee;}
47 </style>
48
49 <script type="text/javascript">
50 function changeTheme(value){
51 doAjax('setting/theme?name='+value,'','settingThemeArea','','singlethis','GET');
52 }
53 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <style>
2 .heading-buttons h4{
3 line-height:20px;
4 }
5 </style>
6 <div class="layout-app"><!-- row-app -->
7
8 <div class="row row-app">
9
10 <!-- col -->
11 <div class="col-md-12">
12
13 <!-- col-separator.box -->
14 <div class="col-separator col-separator-first col-unscrollable box">
15
16 <!-- col-table -->
17 <div class="col-table" id=authorworkspacediv>
18 <!-- Search Bar -->
19 <!-- <div class="input-role">
20 <input type="text" class="form-control" placeholder="Search for Role...">
21 <span class="input-role-btn">
22 <button class="btn btn-primary rounded-none" type="button"><i class="fa fa-search"></i></button>
23 </span>
24 </div>-->
25 <div class="col-separator-h"></div>
26 <!-- End Search Bar -->
27
28 <div class="col-table-row">
29
30 <div class="col-app col-unscrollable">
31
32 <div class="col-app">
33
34 <div class="row-app">
35
36 <div class="col-md-6">
37 <div class="col-separator">
38
39 <!-- Category Heading -->
40 <div class="heading-buttons bg-gray border-bottom innerR half">
41 <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>
42 <h4 class="innerTB margin-bottom-none">Roles</h4>
43 <div class="clearfix"></div>
44 </div>
45 <!-- End Category Heading -->
46
47
48 <?php echo $rolelist->render(); ?>
49 <?php foreach ($rolelist as $trole)
50 {
51 $tphoto="assets/images/people/avatar.jpg";
52 ?>
53 <!-- Category Listing -->
54 <div class="row innerAll half border-bottom bg-gray-hover">
55 <div class="col-sm-6 col-xs-5">
56 <ul class="media-list margin-none">
57 <li class="media">
58 <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;">
59 <span class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i></span>
60 </a>
61 <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;">
62 <span class="btn btn-primary btn-xs"><i class="fa fa-trash-o"></i></span>
63 </a>
64 <div class="media-body">
65 <div class="innerAll">
66 <h5 class=""><a href="#" class="media-heading text-primary">Created : <?php echo $trole->created_at; ?></a></h5>
67 <div class="clearfix"></div>
68 <!-- <small class="margin-none label label-inverse">Social</small>
69 <small class="margin-none label label-inverse">Learn</small>
70 <small class="margin-none label label-inverse">Author</small>
71 <small class="margin-none label label-inverse">Library</small> -->
72
73 </div>
74
75 </div>
76 </li>
77 </ul>
78 </div>
79 <div class="col-sm-3 col-xs-3">
80 <div class="text-center">
81 <p class="strong">Courses</p>
82 <span class="badge badge-primary" data-toggle="tooltip" data-title="Published" data-placement="left" data-container="body">0</span>
83 <span class="badge badge-primary badge-stroke" data-toggle="tooltip" data-title="Subscribed" data-placement="right" data-container="body">5</span>
84 </div>
85 </div>
86 <div class="col-sm-3 col-xs-hidden">
87 <div class="innerAll">
88 <div class="media">
89 <a href="#" class="pull-left">
90 <img src="<?php echo $tphoto; ?>" class="media-object" width=35px />
91 </a>
92 <div class="media-body">
93 <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>
94 <div class="clearfix"></div>
95 <small>
96 <?php if($trole->status=="Active"): ?>
97 <span class="label label-success"><?php echo $trole->status; ?></span>
98 <?php elseif($trole->status=="Disabled"): ?>
99 <span class="label label-warning"><?php echo $trole->status; ?></span>
100 <?php elseif($trole->status=="Unverified"): ?>
101 <span class="label label-warning"><?php echo $trole->status; ?></span>
102 <?php elseif($trole->status=="Blocked"): ?>
103 <span class="label label-important"><?php echo $trole->status; ?></span>
104 <?php endif; ?>
105 </small>
106 </div>
107 </div>
108 </div>
109 </div>
110 </div>
111 <!-- // END Category Listing -->
112 <?php } ?>
113 <?php echo $rolelist->render(); ?>
114
115 </div>
116 <!-- // END col-separator -->
117 </div>
118 <!-- // END col -->
119
120 <!-- col -->
121 <div class="col-md-6">
122
123 <!-- col-separator -->
124 <div class="col-separator col-separator-last" id=roleformdiv>
125 </div>
126 <!-- // END col-separator -->
127
128 </div>
129 <!-- // END col-table -->
130
131 </div>
132 <!-- // END col-separator.box -->
133
134 </div>
135 <!-- // END col -->
136
137 </div>
138 <!-- // END row-app -->
139
140 </div>
141 <script>
142 $(".pagination a").click(function(e){
143 e.preventDefault();
144 var url=$(this).attr("href");
145 var res = url.split("page=");
146 menuAction("role?page="+res[1]);
147 return false;
148 });
149 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <!DOCTYPE html>
2 <html class="app">
3 <head>
4 <title><?php echo Config::get("app.name"); ?> - <?php echo Config::get('app.app_title'); ?></title>
5
6 <meta charset="UTF-8" />
7 <?php
8 $v=Config::get('app.app_version');
9 $vieportopt=explode(":",Config::get("app.kstych_viewportMeta"));
10 if(!isset($vieportopt[1]))$vieportopt[1]="1";
11 if(!isset($vieportopt[2]))$vieportopt[2]="1";
12 if($vieportopt[0]=="responsive"){ ?>
13 <meta name="viewport" content="width=device-width, initial-scale=<?php echo $vieportopt[1]; ?>, maximum-scale=<?php echo $vieportopt[2]; ?>">
14 <?php } ?>
15 <meta name="author" content="Buzzworks">
16
17 <?php if(isset($logo_s))$fico=$logo_s;else $fico="favicon.png"; ?>
18 <link rel="icon" href="<?php echo url('/'); ?>/custom/<?php echo $fico; ?>" type="image/x-icon" />
19 <link rel="shortcut icon" href="<?php echo url('/'); ?>/custom/<?php echo $fico; ?>" type="image/x-icon" />
20
21 <link rel="stylesheet" href="<?php echo url('/'); ?>/style?v=<?php echo $v; ?>" />
22 <script type="text/javascript" src="<?php echo url('/'); ?>/jshead?v=<?php echo $v; ?>"></script>
23
24 </head>
25 <body class="">
1 <?php
2 if(Input::has("dllogxls"))
3 {
4 if(isset($_GET['logdate']))$logdate=strtotime($_GET['logdate']." 00:00:00");
5 else $logdate=strtotime(date('Y-m-d')." 00:00:00");
6
7 if(isset($_GET['logtodate']))$logtodate=strtotime($_GET['logtodate']." 23:59:59");
8 else $logtodate=strtotime(date('Y-m-d')." 23:59:59");
9
10 $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"));
11
12 $reportArr = array();
13
14 foreach($ulists as $ulist)
15 {
16 $reportArr[] = (array)$ulist;
17 }
18
19 header('Content-Type: application/csv');
20 header('Content-Disposition: attachment; filename="seatcount.csv";');
21 header('Cache-Control: max-age=0');
22
23 $headers = ['month','username','usertype','status','Number_of_Days','Number_of_calls'];
24
25 $f = fopen('php://output','w');
26
27 fputcsv($f, $headers);
28
29 foreach($reportArr as $arr)
30 {
31 fputcsv($f, $arr);
32 }
33 return ;
34 }
35 else
36 {
37 ?>
38
39 <div class="row">
40 <div class="col-md-12">
41 <div class=innerAll>
42
43 <fieldset style='margin-bottom:2%'>
44 <label>From:</label>
45 <input size=10 id='modfrom' name='modfrom' type='text' value='<?php echo date("Y-m-d"); ?>' onchange='callLogReloadFun("");' />
46 <label>To:</label>
47 <input size=10 id='modto' name='modto' type='text' value='<?php echo date("Y-m-d"); ?>' onchange='callLogReloadFun("");' />
48 </fieldset>
49
50 <fieldset style='margin-bottom:2%'>
51 <span style="color: #fb6e52;">To Download seat count click on following button.</span><br><br>
52 <input type=button class='btn btn-green' onclick="sendReq();" value="Download">
53 <div style='clear:both;height: 10px;'></div>
54 </fieldset>
55 </div>
56 </div>
57 <div style='clear:both;'></div>
58 </div>
59
60 <script>
61 $('#modfrom').datepicker({dateFormat: 'yy-mm-dd',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'});
62
63 $('#modto').datepicker({dateFormat: 'yy-mm-dd',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'});
64
65 function sendReq()
66 {
67 // var postdata="dwnld=download";
68 // doAjax("record?action=seatcount",postdata,"employeeresult","esajaxMutex","esvarajax");
69 window.open('setting/seatcount?dllogxls=1&logdate='+$("#modfrom").val()+'&logtodate='+$("#modto").val());return false;
70 // window.open('record/seatcount?dwnld=download');
71 // return false;
72 }
73 </script>
74 <?php
75 }
1 <?php
2
3 readfile("assets/components/modules/admin/isotope/isotope.pkgd.js");echo "\n\n";
4
5 readfile("assets/components/library/bootstrap/js/bootstrap.min.js");echo "\n\n";
6 readfile("assets/components/modules/admin/tour/bootstrap-tour.js");echo "\n\n";
7 readfile("assets/components/library/modernizr/modernizr.js");echo "\n\n";
8 readfile("assets/components/plugins/holder/holder.js");echo "\n\n";
9 readfile("assets/components/plugins/nicescroll/jquery.nicescroll.min.js");echo "\n\n";
10 readfile("assets/components/plugins/slimscroll/jquery.slimscroll.js");echo "\n\n";
11 readfile("assets/components/plugins/image-preview/image-preview.js");echo "\n\n";
12 readfile("assets/components/core/js/animations.init.js");echo "\n\n";
13
14 readfile("assets/components/plugins/responsive-calendar/responsive-calendar.min.js");echo "\n\n";
15
16 readfile("assets/components/modules/admin/widgets/widget-collapsible/assets/widget-collapsible.init.js");echo "\n\n";
17 readfile("assets/components/modules/admin/gallery/gridalicious/assets/lib/jquery.gridalicious.min.js");echo "\n\n";
18
19
20 // readfile("assets/components/modules/admin/chat/jquery.ui.chatbox.js");echo "\n\n";
21 // readfile("assets/components/modules/admin/chat/chatboxmanager.js");echo "\n\n";
22
23 readfile("assets/components/modules/admin/forms/elements/jasny-fileupload/assets/js/bootstrap-fileupload.js");echo "\n\n";
24 readfile("assets/components/modules/admin/charts/easy-pie/assets/lib/js/jquery.easy-pie-chart.js");echo "\n\n";
25
26 readfile("assets/components/modules/admin/forms/editors/wysihtml5/assets/lib/js/wysihtml5-0.3.0_rc2.min.js");echo "\n\n";
27 readfile("assets/components/modules/admin/forms/editors/wysihtml5/assets/lib/js/bootstrap-wysihtml5-0.0.2.js");echo "\n\n";
28
29 readfile("assets/components/modules/admin/forms/elements/bootstrap-datepicker/assets/lib/js/bootstrap-datepicker.js");echo "\n\n";
30 readfile("assets/components/modules/admin/forms/elements/bootstrap-datepicker/assets/custom/js/bootstrap-datepicker.init.js");echo "\n\n";
31
32 readfile("assets/components/modules/admin/forms/elements/bootstrap-datetimepicker/moment-with-locales.js");echo "\n\n";
33 readfile("assets/components/modules/admin/forms/elements/bootstrap-datetimepicker/bootstrap-datetimepicker.js");echo "\n\n";
34
35 readfile("assets/components/modules/admin/forms/elements/select2/assets/lib/js/select2.js");echo "\n\n";
36
37 readfile("assets/components/modules/admin/sliders/bootstrap-slider/bootstrap-slider.js");echo "\n\n";
38
39 readfile("assets/components/modules/admin/notifications/notyfy/assets/lib/js/jquery.notyfy.js");echo "\n\n";
40 readfile("assets/components/modules/admin/notifications/gritter/assets/lib/js/jquery.gritter.min.js");echo "\n\n";
41
42 readfile("assets/components/modules/admin/forms/elements/bootstrap-switch/assets/lib/js/bootstrap-switch.js");echo "\n\n";
43
44 readfile("assets/components/modules/admin/forms/elements/bootstrap-select/assets/lib/js/bootstrap-select.js");echo "\n\n";
45
46 readfile("assets/components/plugins/cookie/jquery.cookie.js");echo "\n\n";
47 readfile("assets/components/core/js/core.init.js");echo "\n\n";
48 readfile("assets/components/plugins/owl-carousel/owl.carousel.min.js");echo "\n\n";
49
50 readfile("assets/components/modules/admin/forms/file_manager/dropzone/assets/lib/js/dropzone.min.js");echo "\n\n";
51 readfile("assets/components/modules/admin/gallery/prettyphoto/assets/lib/js/jquery.prettyPhoto.js");echo "\n\n";
52
53 readfile("assets/components/modules/admin/titlealert/titlealert.js");echo "\n\n";
54 readfile("assets/components/modules/admin/forms/wizards/assets/lib/jquery.bootstrap.wizard.js");echo "\n\n";
55
56 readfile("assets/components/modules/admin/ui/sortable/jquery.sortable.js");echo "\n\n";
57
58 readfile("assets/components/modules/admin/tables/datatables/assets/lib/js/jquery.dataTables.min.js");echo "\n\n";
59 readfile("assets/components/modules/admin/tables/datatables/assets/custom/js/DT_bootstrap.js");echo "\n\n";
60 readfile("assets/components/modules/admin/easytooltip/easytooltip.js");echo "\n\n";
61 readfile("assets/components/plugins/jquery-knob/jquery.knob.min.js");echo "\n\n";
62
63 readfile("assets/components/modules/admin/pushy/pushy.js");echo "\n\n";
64 readfile("assets/components/modules/admin/waves/waves.js");echo "\n\n";
65
66 // readfile("assets/js/paintweb/paintweb.src.js");echo "\n\n";
67 //
68 // readfile("assets/js/highchart/highcharts.js");echo "\n\n";
69 //
70 // readfile("assets/js/ckeditor/ckeditor.js");echo "\n\n";
71
72
73 //readfile("assets/js/sip.js");echo "\n\n";
74 //readfile("assets/js/dialer.js");echo "\n\n";
75
76 //readfile("assets/js/kstych.js");echo "\n\n";
77 //readfile("assets/js/datatable.js");echo "\n\n";
1 <?php
2
3 use App\Models\User;
4
5 $data = Auth::user()->data();
6 $meta = Auth::user()->meta();
7 if (!isset($data['personal'])) $data['personal'] = array();
8 $user = Auth::user();
9
10
11 $tmodules = $modules;
12 $modules = array();
13 $dispnames = array();
14 foreach ($tmodules as $mname => $marr) {
15 if (!isset($modules[$mname])) {
16 if (!in_array($marr['disp'], array_values($dispnames))) {
17 $modules[$mname] = $marr;
18 $dispnames[$mname] = $marr['disp'];
19 } else {
20 $key = array_search($marr['disp'], $dispnames);
21 $modules[$key]['submenu'] = array_merge($modules[$key]['submenu'], $marr['submenu']);
22 }
23 }
24 }
25 ?>
26
27 <!-- panel left -->
28 <div class="pushy pushy-left">
29 <div class="desc_imgdiv">
30 <div class="pushy-user-desc">
31 <img src="<?php echo $user->fetchphoto(); ?>">
32 <h4><?php echo $user->dispname(); ?></h4>
33 <span><i class="fa fa-pencil-square-o"></i></span>
34 <div style="clear:both"></div>
35 <p><?php echo $user->email; ?></p>
36 </div>
37 </div>
38 <?php $active = "active";
39 foreach ($modules as $mname => $marr) {
40 if (isset($marr['submenu'])) {
41 ?>
42 <div class=wave-btn style='width:100%'>
43 <div class=pushy-submenu>
44 <i class="fa fa-fw fa-<?php echo $marr['icon']; ?>"></i>
45 <h5><?php echo $marr['disp']; ?></h5>
46 <ul>
47 <?php
48 foreach ($marr['submenu'] as $submenu => $submenuarr) {
49 $p = 1;
50 if (isset($submenuarr[1])) {
51 $p = 0;
52 if (Auth::user()->moduleACL($mname, true, true, false) && $submenuarr[1] == "W") $p = 1;
53 if (Auth::user()->moduleACL($mname, true, true, true) && $submenuarr[1] == "A") $p = 1;
54 }
55 if ($p == 1) {
56 ?>
57 <li class="pushy-link"><a href="#" data-ajax='false' onclick="<?php echo $submenuarr[0]; ?>return false;"><?php echo $submenu; ?></a></li>
58 <?php
59 }
60 }
61 ?>
62 </ul>
63 </div>
64 </div>
65
66 <?php
67 } else if ($marr['onclick'] != "") {
68 ?>
69 <div class=wave-btn style='width:100%'>
70 <div class="pushy-menu">
71 <i class="fa fa-fw fa-<?php echo $marr['icon']; ?>"></i>
72 <h5 class="pushy-link" onclick="<?php echo $marr['onclick']; ?>return false;"><?php echo $marr['disp']; ?></h5>
73 </div>
74 </div>
75
76 <?php }
77 $active = "";
78 } ?>
79
80 <div class="pushy-menu">
81 <i class="fa fa-fw fa-power-off"></i>
82 <h5 class="pushy-link" onclick="doLogout(0);return false;">Logout</h5>
83 </div>
84
85 </div>
86 <div class='pushy-site-overlay'></div>
87 <!-- /panel left -->
88
89
90
91
92 <div id="menu-top">
93 <div class=navbar>
94 <img src="custom/logo_s.png" class=border-none height=30px style='float:left'>
95 <div class="user-action pull-left wave-btn" style='height:40px;padding-top:0px;margin-top:0px;'>
96 <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>
97 </div>
98
99 <ul class="main pull-left" id=topmainmenureturn style='display:none'>
100 <li onclick='returnMenuClick("dashboard");return false;'><a href="#"> Home </a></li>
101 </ul>
102
103 <ul class="main pull-left hidden-xs hidden-sm" id=topmainmenu>
104 <?php $active = "active";
105 foreach ($modules as $mname => $marr) { //TODO hidden-xs
106 if (isset($marr['submenu'])) {
107 ?>
108 <li class='homemenu dropdown <?php echo $active; ?>' onclick='' id=mainmenu<?php echo $marr['disp']; ?>><a href="#" data-toggle="dropdown"> <?php echo $marr['disp']; ?> </a>
109 <ul class="dropdown-menu">
110 <?php
111 foreach ($marr['submenu'] as $submenu => $submenuarr) {
112 $p = 1;
113 if (isset($submenuarr[1])) {
114 $p = 0;
115 if (Auth::user()->moduleACL($mname, true, true, false) && $submenuarr[1] == "W") $p = 1;
116 if (Auth::user()->moduleACL($mname, true, true, true) && $submenuarr[1] == "A") $p = 1;
117 }
118 if ($p == 1) {
119 ?>
120 <li><a href="#" onclick="<?php echo $submenuarr[0]; ?>return false;"><?php echo $submenu; ?></a></li>
121 <?php
122 }
123 }
124 ?>
125 </ul>
126 </li>
127 <?php
128 } else if ($marr['onclick'] != "") {
129 ?>
130 <li class='homemenu <?php echo $active; ?>' onclick="<?php echo $marr['onclick']; ?>return false;" id=mainmenu<?php echo $marr['disp']; ?>>
131 <a href="#"><?php echo $marr['disp']; ?></a>
132 </li>
133 <?php }
134 $active = "";
135 } ?>
136 <!-- change start code -->
137 <li style="color: #626771;font-weight: 600;height: 40px;line-height: 40px;padding: 0 10px;text-decoration: none;display: block;">
138 <div id="countdown">&nbsp;</div>
139 </li>
140 <!-- change end code -->
141 </ul>
142
143 <div class="user-action pull-right" id=topmainusermenu>
144
145 <?php
146 $acctype = Auth::user()->usertype;
147 if ($data["subscription"] == "Free") {
148 $datapercent = "100";
149 $subscstr = "Free Subscription";
150
151 $subscstr2 = "You are using a Free subscription <b>$acctype</b> account, there is no expiry";
152 } else if ($data["subscription"] == "Trial") {
153 $daysleft = intval(($data["subscriptiondata"][$acctype]['expiry'] - time()) / (24 * 60 * 60));
154 if ($daysleft < 0) $daysleft = 0;
155 $origdays = intval(($data["subscriptiondata"][$acctype]['expiry'] - $data["subscriptiondata"][$acctype]['created']) / (24 * 60 * 60));
156
157 $datapercent = round($daysleft * 100 / $origdays, 0);
158 $subscstr = "Trial Subscription";
159
160 $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";
161 } else if ($data["subscription"] == "Expired") {
162 $datapercent = "0";
163 $subscstr = "Subscription Expired";
164
165 $subscstr2 = "You are using an expired <b>$acctype</b> account, please renew your subscription to use full features";
166 } else {
167 $daysleft = intval(($data["subscriptiondata"][$acctype]['expiry'] - time()) / (24 * 60 * 60));
168 if ($daysleft < 0) $daysleft = 0;
169 $origdays = intval(($data["subscriptiondata"][$acctype]['expiry'] - $data["subscriptiondata"][$acctype]['created']) / (24 * 60 * 60));
170
171 $datapercent = round($daysleft * 100 / $origdays, 0);
172 $subscstr = $data["subscription"] . " Subscription";
173
174 $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";
175 }
176
177 ?>
178
179 <ul class="colors pull-right visible-xs visible-sm wave-btn" style='margin-top:-3px;'>
180 <li class="dropdown">
181 <a href="#" class="menu-btn"><i class='fa fa-bars' style='font-size:20px'></i></a>
182 </li>
183 </ul>
184
185 <div class="dropdown username hidden-xs" style='float:right'>
186 <a class="dropdown-toggle" data-toggle="dropdown" href="#" onclick=''><?php echo $displayname; ?> <span class="caret"></span> </a>
187 <ul class="dropdown-menu pull-right" id=topuserdropmenu>
188 <li><a href="#" class="glyphicons user" onclick='menuAction("profile");return false;'><i></i> Profile</a></li>
189 <!--<li><a href="#" class="glyphicons list" onclick='menuAction("admin");return false;'><i></i> Timeline</a></li>-->
190 <li><a href="#" class="glyphicons book" onclick='menuAction("dashboard");return false;'><i></i> Dashboard</a></li>
191 <?php if (Auth::user()->moduleACL("Admin", true, true, false)) { ?>
192 <li><a href="#" class="glyphicons cogwheels" onclick='menuAction("admin");return false;'><i></i><?php echo Config::get("app.name"); ?> Admin</a></li>
193 <?php } ?>
194 <?php if (Auth::user()->moduleACL("User", true, true, false)) { ?>
195 <li><a href="#" class="glyphicons cogwheels" onclick='menuAction("user");return false;'><i></i> Manage Users</a></li>
196 <?php }
197 if (Auth::user()->moduleACL("Group", true, true, false)) { ?>
198 <li><a href="#" class="glyphicons cogwheels" onclick='menuAction("group");return false;'><i></i> Manage Groups</a></li>
199 <li><a href="#" class="glyphicons cogwheels" onclick='menuAction("role");return false;'><i></i> Manage Roles</a></li>
200 <?php } ?>
201 <?php if (Auth::user()->moduleACL("ImportExcel", true, true, false)) { ?>
202 <li><a href="#" class="glyphicons cogwheels" onclick='menuAction("import_excel");return false;'><i></i> Import Excel</a></li>
203 <?php } ?>
204 <li><a href="#" class="glyphicons circle_question_mark" onclick="dindexmenu('help&page=helpintroduction',this);return false;"><i></i> Help</a></li>
205
206 <li><a href="#" class="glyphicons cogwheels" onclick="menuAction('setting');return false;"><i></i>Settings</a></li>
207
208 <li><a href="#" class="glyphicons exit" onclick="doLogout(0);return false;"><i></i> Logout</a></li>
209 </ul>
210 </div>
211 </div>
212 </div>
213 </div>
214
215 <div class="clearfix"></div>
216 <script type="text/javascript">
217 redirect_to_password_reset();
218
219
220 function redirect_to_password_reset() {
221 var action = "password_expiry_check";
222 $.ajax({
223 type: "GET",
224 url: action,
225 success: function(result) {
226 console.log(result);
227 if (result == 'True') {
228 menuAction("profile");
229 }
230 }
231 });
232 }
233 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 use App\Models\CRMCall;
3 use App\Models\Dialline;
4 use App\Models\Sipid;
5 use App\Models\User;
6 use App\Models\UserLog;
7 use App\Models\Kqueue;
8 use App\Jobs\KHRMSLib;
9
10 $wakka = new KHRMSLib();
11 $dashboarduser=Auth::user();
12 $nowts=time();
13 $chart=array('ts'=>date('H:i:s',time()-($dashboarduser->timezone*60)),'Online'=>0,'NoCall'=>0,'InCall'=>0,'CallWait'=>0,'CmdList'=>0);
14
15 if($dashboarduser->usertype != 'Admin')
16 //if(!$dashboarduser->moduleACL("Dialer",false,false,true))
17 {
18 $allusers=User::where(function ($query) use($dashboarduser) {
19 $query->where('supervisor','=',$dashboarduser->username)
20 ->orWhere('lteam2','=',$dashboarduser->username)
21 ->orWhere('lteam','=',$dashboarduser->username)
22 ->orWhere('id','=',$dashboarduser->id);
23 })
24 ->where(function ($query) {
25 $query->where('status', '=', 'Active');
26 })->get();
27 }
28 else
29 {
30 $allusers=User::where("status","=","Active")->get();
31 }
32
33 $loginUsers = DB::table('sessions')->where('user_id','!=','Null')->groupBy('user_id')->get();
34 foreach($loginUsers as $user)$loginUserList[]=$user->user_id;
35
36 foreach($allusers as $tuser)if(in_array($tuser->id,$loginUserList))$uidlist[]=$tuser->id;
37
38 $newcalls=Dialline::where('status','!=','Free')->where('conf','=','')->orderBy('updated_at')->get();
39 $acalls=Dialline::where('status','!=','Free')->where('conf','!=','')->orderBy('updated_at')->get();
40 $sipids=Sipid::whereIn("user",$uidlist)->where("status","=","1")->get();
41 $alist=array();
42 $sipidsfound=array();
43
44 $userarr=array();$i=1;
45 //$reporthead=array("#","ID","User","Name","Campaign","Station","Status","CRMId","Number","Type","State","Duration");
46 $reporthead=array("#","ID","User","Name","Campaign","Station","Status");
47 $reportarray=array();
48
49 foreach($newcalls as $newcall)
50 {
51 $tcall=CRMCall::where('dialline_id','=',$newcall->id)->orderBy('id','DESC')->first();
52 $un="";$uid="";$us="";
53 if($tcall->user_id>0)
54 {
55 $tuser=User::find($tcall->user_id);
56 $un=$tuser->username;
57 $uname=$tuser->fullname;
58 $uid=userchatbox($tuser).$tuser->id;
59
60 $userlog=UserLog::where('user_id','=',$tuser->id)->orderBy("id","DESC")->first();
61 $stend=$userlog->getLastStatus();
62 $us="$stend[0]-$stend[1]";
63
64 $chart['Online']++;
65 $chart['InCall']++;
66 }
67 else $chart['CallWait']++;
68
69 if($tcall->state == 'DialEnd')
70 {
71 $us = "Talk";
72 }
73
74 $obj=array();
75 $obj["#"]='';//$i++;
76 $obj["ID"]=$uid;
77 $obj["User"]=$un;
78 $obj["Name"]=$uname;
79 $obj["Campaign"]=$tcall->client;
80 $obj["Station"]=$tcall->sipid_id.userSpyStr($tcall->sipid_id);
81 $obj["Status"]=$us;
82 $obj["CRMId"]=$tcall->crm_id;
83 $obj["Number"]=$tcall->number;
84 $obj["Type"]=$tcall->type;
85 $obj["State"]=$tcall->state;
86 $obj["Duration"]=$nowts-strtotime($tcall->created_at);
87
88 //$reportarray[$newcall->id]=$obj;
89 if(!empty($tcall->sipid_id))$sipidsfound[]=$tcall->sipid_id;
90 }
91
92 foreach($acalls as $acall)
93 {
94 $tcall=CRMCall::where('dialline_id','=',$acall->id)->orderBy('id','DESC')->first();
95
96 $tsipid=substr($acall->conf,4);
97 $tsip=Sipid::find($tsipid);
98 $clidata=json_decode($tsip->clients,true);
99
100 $tuser=User::find($tsip->user);
101
102 $userlog=UserLog::where('user_id','=',$tuser->id)->orderBy("id","DESC")->first();
103 $stend=$userlog->getLastStatus();
104
105 $obj=array();
106 $obj["#"]='';//$i++;
107 $obj["ID"]=userchatbox($tuser).$tsip->user;
108 $obj["User"]=$tuser->username;
109 $obj["Name"]=$tuser->fullname;
110 $obj["Campaign"]=substr($clidata['r'],0,20);
111 $obj["Station"]=$tsip->id.userSpyStr($tsip->id);
112 $obj["Status"]="$stend[0]-$stend[1]";
113 $obj["CRMId"]=$tcall->crm_id;
114 $obj["Number"]=$tcall->number;
115 $obj["Type"]=$tcall->type;
116 $obj["State"]=$tcall->state;
117 $obj["Duration"]=$nowts-strtotime($tcall->created_at);
118
119 //$reportarray[$acall->id]=$obj;
120 $sipidsfound[]=$tsipid;
121
122 $chart['Online']++;
123 $chart['InCall']++;
124 }
125
126 foreach($sipids as $sipid)
127 {
128 /*if(in_array($sipid->id,$sipidsfound))
129 {*/
130 $clidata=json_decode($sipid->clients,true);
131
132 $tuser=User::find($sipid->user);
133 $userlog=UserLog::where('user_id','=',$tuser->id)->orderBy("id","DESC")->first();
134 $stend=$userlog->getLastStatus();
135
136 $obj=array();
137 $obj["#"]=$i++;
138 $obj["ID"]=userchatbox($tuser).$sipid->user;
139 $obj["User"]=$tuser->username;
140 $obj["Name"]=$tuser->fullname;
141 $obj["Campaign"]=substr($clidata['r'],0,20);
142 $obj["Station"]=$sipid->id.userSpyStr($sipid->id);
143 $obj["Status"]="$stend[0]-$stend[1]";
144 $obj["CRMId"]="";
145 $obj["Number"]="";
146 $obj["Type"]="";
147 $obj["State"]="";
148 $obj["Duration"]="";
149
150 $reportarray[]=$obj;
151
152 $chart['Online']++;
153 $chart['NoCall']++;
154 /*}*/
155 }
156
157 $chart['CmdList']=-1*Kqueue::count();
158
159 if(Input::get('chartvals')==1)
160 {
161 echo json_encode($chart);
162 return;
163 }
164
165 $highestColumn = sizeof($reporthead);
166 $outhead="<tr>";$outstr="";
167 for ($head = 0; $head < $highestColumn; $head++){
168 $outhead.="<td>".$reporthead[$head]."</td>";
169 }
170 $outhead.="</tr>";
171
172 foreach($reportarray as $uid=>$uarr)
173 {
174 $outstr.="<tr>";
175 for ($head = 0; $head < $highestColumn; $head++){
176 $outstr.="<td>".$uarr[$reporthead[$head]]."</td>";
177 }
178 $outstr.="</tr>";
179 }
180
181 function userchatbox($tuser){
182 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> ";
183 }
184
185 function userSpyStr($sipid){
186 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>";
187 }
188 ?>
189
190 <div class=innerAll>
191 <style>#logtable.td{vertical-align:top;}#logtable.tr{height:28px;overflow-y:hidden;}</style>
192 <script>
193 $(document).ready(function(){
194 if(!$('#dialoglog').hasClass('ui-dialog-content')){
195 $('#dialoglog').dialog({
196 autoOpen: false,
197 width: '70%',
198 buttons: {
199 "Ok": function() {
200 $(this).dialog("close");
201 },
202 "Cancel": function() {
203 $(this).dialog("close");
204 }
205 }
206 });
207 }
208 });
209 </script>
210 <div style="float:left;width:50%">
211 <h5>Dialer : Live</h5>
212 </div>
213
214 <div style="float:left;width:50%">
215 <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>
216 </div>
217 <div style="clear:both"></div>
218 <hr/>
219
220 <div class=col-md-12>
221 <div id=liveuserlogschart1<?php echo $nowts; ?> style='min-height:300px;width:100%'></div>
222 <script>
223 var livechart001='';
224 $(function () {
225 livechart001=$('#liveuserlogschart1<?php echo $nowts; ?>').highcharts({
226 title: {
227 text: '', x: -20 //center
228 },
229 subtitle: {
230 text: '', x: -20
231 },
232 xAxis: {
233 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)."]"; ?>],
234 labels:{
235 enabled:false//default is true
236 },
237 },
238 yAxis: {
239 title: {
240 text: ''
241 },
242 plotLines: [{
243 value: 0, width: 1, color: '#808080'
244 }]
245 },
246 tooltip: {
247 valueSuffix: ''
248 },
249 legend: {
250 },
251 series: [{
252 name: 'Online', data: <?php echo Input::get('Online',$ccc); ?>
253
254 }, {
255 name: 'NoCall', data: <?php echo Input::get('NoCall',$ccc); ?>
256
257 }, {
258 name: 'InCall', data: <?php echo Input::get('InCall',$ccc); ?>
259
260 }, {
261 name: 'CallWait', data: <?php echo Input::get('CallWait',$ccc); ?>
262
263 }, {
264 name: 'CmdList',visible: false, data: <?php echo Input::get('CmdList',$ccc); ?>
265
266 }]
267 });
268 });
269
270 function liveLogReloadFun(delay)
271 {
272 var tchart=livechart001.highcharts();
273 var sdata='';
274 sdata+='&Online='+JSON.stringify(tchart.series[0].yData);
275 sdata+='&NoCall='+JSON.stringify(tchart.series[1].yData);
276 sdata+='&InCall='+JSON.stringify(tchart.series[2].yData);
277 sdata+='&CallWait='+JSON.stringify(tchart.series[3].yData);
278 sdata+='&CmdList='+JSON.stringify(tchart.series[4].yData);
279
280 setTimeout(function(){
281 if($("#liveuserlogschart1<?php echo $nowts; ?>").length)
282 doAjax('dialer/liveusers',sdata,'rightmainreportdiv','ajax_dialer_reports','singlethis','GET');
283 },delay);
284 }
285
286 function liveLogReloadChartFun(delay)
287 {
288 setTimeout(function(){
289 if($("#liveuserlogschart1<?php echo $nowts; ?>").length)
290 doAjax('dialer/liveusers','chartvals=1','__FD__','ajax_dialer_reports','singlethis','GET',function(res)
291 {
292 var resobj=JSON.parse(res.responseText);
293 var tchart=livechart001.highcharts();
294 var shift = tchart.series[0].data.length > 60;
295
296 // add the point
297 tchart.series[0].addPoint([resobj['ts'],resobj['Online']], true, shift);
298 tchart.series[1].addPoint([resobj['ts'],resobj['NoCall']], true, shift);
299 tchart.series[2].addPoint([resobj['ts'],resobj['InCall']], true, shift);
300 tchart.series[3].addPoint([resobj['ts'],resobj['CallWait']],true,shift);
301 tchart.series[4].addPoint([resobj['ts'],resobj['CmdList']],true,shift);
302
303 // call it again after one second
304 setTimeout(liveLogReloadChartFun, 10000);
305
306
307 });
308 },delay);
309 }
310
311 liveLogReloadChartFun(10);
312 </script>
313 </div>
314
315 <div style='clear:both'></div>
316 <div style='clear:both'></div>
317 <div style='overflow:auto'>
318 <table id=logtable class='footable table table-striped table-bordered table-white table-primary footable-loaded' style='font-size:12px'>
319 <thead>
320 <?php echo $outhead; ?>
321 </thead>
322 <?php echo $outstr; ?>
323 </table>
324 </div>
325 <div id=dialoglog></div>
326 </div>
327
328 <!--
329 <?php //if($dashboarduser->moduleACL("Admin",false,false,true))print_r(Config::get('app.sqllog')); ?>
330 -->
1 <?php
2 use App\Models\User;
3 ?>
4 <audio id="audio_remote" autoplay="autoplay" ></audio>
5 <audio id="ringtone" loop src="<?php echo url('/'); ?>/assets/sounds/ringtone.wav" ></audio>
6 <audio id="ringbacktone" loop src="<?php echo url('/'); ?>/assets/sounds/ringbacktone.wav" ></audio>
7 <audio id="incomingbeep" src="<?php echo url('/'); ?>/assets/sounds/beep.wav" ></audio>
8 <audio id="dtmfTone" src="<?php echo url('/'); ?>/assets/sounds/dtmf.wav"></audio>
9 <video class="video" style='display:none' id="video_remote" autoplay="autoplay"></video>
10 <video class="video" style='display:none' id="video_local" autoplay="autoplay" muted="true"></video>
11
12 <?php
13 $skin=Input::get("skin");if(Auth::check())if($skin=="")$skin=Auth::user()->dataval('skin');
14 $skinarr=User::getStyleColors($skin);
15 $v=Config::get('app.app_version');
16
17 if(Config::get("app.facebook_appid")!="")
18 {
19 echo "<script src='//connect.facebook.net/en_US/all.js'></script>";
20 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>";
21 }
22 ?>
23 <!-- <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> -->
24 <div id="log_result"></div>
25 <script>
26 var mastervalue = "";
27 var kstychAppObject={};
28 kstychAppObject['config']={};
29 kstychAppObject['user']={};
30
31 <?php if(Auth::check()): ?>
32 kstychAppObject['user']['id']='<?php echo Auth::user()->id; ?>';
33 kstychAppObject['user']['name']='<?php echo Auth::user()->username; ?>';
34 kstychAppObject['user']['usertype']='<?php echo Auth::user()->usertype; ?>';
35 kstychAppObject['user']['dateformat']='dd.mm.yy';
36 kstychAppObject['user']['ssn']='<?php echo session_name(); ?>';
37 kstychAppObject['user']['ssid']=encodeURIComponent("<?php echo Crypt::encrypt(Auth::user()->id.'|'.session_id()); ?>");
38 <?php else: ?>
39 kstychAppObject['user']['id']=0;
40 kstychAppObject['user']['name']='NA';
41 kstychAppObject['user']['usertype']='NA';
42 kstychAppObject['user']['dateformat']='dd.mm.yy';
43 kstychAppObject['user']['ssn']='';
44 kstychAppObject['user']['ssid']='';
45 <?php endif; ?>
46
47 <?php if(isset($sipid)): ?>
48 kstychAppObject['user']['sipid']=<?php echo $sipid->id; ?>+"";
49 kstychAppObject['user']['sipserver']='<?php echo $sipid->server; ?>';
50 kstychAppObject['user']['sipssldomain']='<?php echo Config::get("app.sipssldomain"); ?>';
51 kstychAppObject['user']['sipauth']='__unused__';
52 <?php else: ?>
53 kstychAppObject['user']['sipid']='0';
54 kstychAppObject['user']['sipserver']='127.0.0.1';
55 kstychAppObject['user']['sipssldomain']='localhost';
56 kstychAppObject['user']['sipauth']='__unused__';
57 <?php endif; ?>
58
59 kstychAppObject['config']['appbaseurl']='<?php echo url("/"); ?>';
60 kstychAppObject['config']['appdebug']=<?php if(Config::get('app.debug')&&empty($_GET['nodebug']))echo "1";else echo "0"; ?>;
61 kstychAppObject['config']['appanimate']=0;
62 kstychAppObject['config']['csrftoken']='<?php echo e(csrf_token()); ?>';
63 kstychAppObject['config']['kstych_RTCLK']=<?php echo Config::get('app.kstych_RTCLK'); ?>;
64 kstychAppObject['config']['kstych_CTRL']=<?php echo Config::get('app.kstych_CTRL'); ?>;
65 kstychAppObject['config']['kDialer_keeplocalconf']=<?php echo Config::get('app.kDialer_keeplocalconf'); ?>;
66 kstychAppObject['config']['use-ice']='<?php echo Config::get('app.kstych_useice'); ?>';
67
68 kstychAppObject['config']['colorPrimary']='<?php echo $skinarr[0]; ?>';
69 kstychAppObject['config']['colorLink']='<?php echo $skinarr[1]; ?>';
70 kstychAppObject['config']['colorInfo']='<?php echo $skinarr[2]; ?>';
71 kstychAppObject['config']['colorWhite']='<?php echo $skinarr[3]; ?>';
72 kstychAppObject['config']['colorDefault']='<?php echo $skinarr[4]; ?>';
73 kstychAppObject['config']['colorSuccess']='<?php echo $skinarr[5]; ?>';
74 kstychAppObject['config']['colorWarning']='<?php echo $skinarr[6]; ?>';
75 kstychAppObject['config']['colorDanger']='<?php echo $skinarr[7]; ?>';
76 kstychAppObject['config']['colorInverse']='<?php echo $skinarr[8]; ?>';
77 </script>
78
79 <script src="<?php echo url('/'); ?>/assets/components/modules/admin/chat/jquery.ui.chatbox.js"></script>
80 <script src="<?php echo url('/'); ?>/assets/components/modules/admin/chat/chatboxmanager.js"></script>
81 <script src="<?php echo url('/'); ?>/assets/js/highchart/highcharts.js"></script>
82 <script src="<?php echo url('/'); ?>/jsbody?v=<?php echo $v; ?>"></script>
83 <script src="<?php echo url('/'); ?>/assets/js/sip.js"></script>
84 <script src="<?php echo url('/'); ?>/assets/js/dialer.js"></script>
85 <script src="<?php echo url('/'); ?>/assets/js/kstych.js"></script>
86 <script src="<?php echo url('/'); ?>/assets/js/datatable.js"></script>
87
88 <?php if(Session::has('mdevice')&&Session::get('mdevice')!=""){$md=Session::get('mdevice'); ?>
89 <script src="<?php echo url('/'); ?>/assets/js/cordova/<?php echo $md; ?>/cordova.js?v=<?php echo $v; ?>"></script>
90 <script src="<?php echo url('/'); ?>/assets/js/cordova/<?php echo $md; ?>/kstych.js?v=<?php echo $v; ?>"></script>
91 <?php } ?>
92
93 </body>
94 </html>
1 <?php
2 use App\Models\User;
3 ?>
4 <audio id="audio_remote" autoplay="autoplay" ></audio>
5 <audio id="ringtone" loop src="<?php echo url('/'); ?>/assets/sounds/ringtone.wav" ></audio>
6 <audio id="ringbacktone" loop src="<?php echo url('/'); ?>/assets/sounds/ringbacktone.wav" ></audio>
7 <audio id="incomingbeep" src="<?php echo url('/'); ?>/assets/sounds/beep.wav" ></audio>
8 <audio id="dtmfTone" src="<?php echo url('/'); ?>/assets/sounds/dtmf.wav"></audio>
9 <video class="video" style='display:none' id="video_remote" autoplay="autoplay"></video>
10 <video class="video" style='display:none' id="video_local" autoplay="autoplay" muted="true"></video>
11
12 <?php
13 $skin=Input::get("skin");if(Auth::check())if($skin=="")$skin=Auth::user()->dataval('skin');
14 $skinarr=User::getStyleColors($skin);
15 $v=Config::get('app.app_version');
16
17 if(Config::get("app.facebook_appid")!="")
18 {
19 echo "<script src='//connect.facebook.net/en_US/all.js'></script>";
20 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>";
21 }
22 ?>
23 <!-- <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> -->
24 <div id="log_result"></div>
25 <script>
26 var mastervalue = "";
27 var kstychAppObject={};
28 kstychAppObject['config']={};
29 kstychAppObject['user']={};
30
31 <?php if(Auth::check()): ?>
32 kstychAppObject['user']['id']='<?php echo Auth::user()->id; ?>';
33 kstychAppObject['user']['name']='<?php echo Auth::user()->username; ?>';
34 kstychAppObject['user']['usertype']='<?php echo Auth::user()->usertype; ?>';
35 kstychAppObject['user']['dateformat']='dd.mm.yy';
36 kstychAppObject['user']['ssn']='<?php echo session_name(); ?>';
37 kstychAppObject['user']['ssid']=encodeURIComponent("<?php echo Crypt::encrypt(Auth::user()->id.'|'.session_id()); ?>");
38 <?php else: ?>
39 kstychAppObject['user']['id']=0;
40 kstychAppObject['user']['name']='NA';
41 kstychAppObject['user']['usertype']='NA';
42 kstychAppObject['user']['dateformat']='dd.mm.yy';
43 kstychAppObject['user']['ssn']='';
44 kstychAppObject['user']['ssid']='';
45 <?php endif; ?>
46
47 <?php if(isset($sipid)): ?>
48 kstychAppObject['user']['sipid']=<?php echo $sipid->id; ?>+"";
49 kstychAppObject['user']['sipserver']='<?php echo $sipid->server; ?>';
50 kstychAppObject['user']['sipssldomain']='<?php echo Config::get("app.sipssldomain"); ?>';
51 kstychAppObject['user']['sipauth']='__unused__';
52 <?php else: ?>
53 kstychAppObject['user']['sipid']='0';
54 kstychAppObject['user']['sipserver']='127.0.0.1';
55 kstychAppObject['user']['sipssldomain']='localhost';
56 kstychAppObject['user']['sipauth']='__unused__';
57 <?php endif; ?>
58
59 kstychAppObject['config']['appbaseurl']='<?php echo url("/"); ?>';
60 kstychAppObject['config']['appdebug']=<?php if(Config::get('app.debug')&&empty($_GET['nodebug']))echo "1";else echo "0"; ?>;
61 kstychAppObject['config']['appanimate']=0;
62 kstychAppObject['config']['csrftoken']='<?php echo e(csrf_token()); ?>';
63 kstychAppObject['config']['kstych_RTCLK']=<?php echo Config::get('app.kstych_RTCLK'); ?>;
64 kstychAppObject['config']['kstych_CTRL']=<?php echo Config::get('app.kstych_CTRL'); ?>;
65 kstychAppObject['config']['kDialer_keeplocalconf']=<?php echo Config::get('app.kDialer_keeplocalconf'); ?>;
66 kstychAppObject['config']['use-ice']='<?php echo Config::get('app.kstych_useice'); ?>';
67
68 kstychAppObject['config']['colorPrimary']='<?php echo $skinarr[0]; ?>';
69 kstychAppObject['config']['colorLink']='<?php echo $skinarr[1]; ?>';
70 kstychAppObject['config']['colorInfo']='<?php echo $skinarr[2]; ?>';
71 kstychAppObject['config']['colorWhite']='<?php echo $skinarr[3]; ?>';
72 kstychAppObject['config']['colorDefault']='<?php echo $skinarr[4]; ?>';
73 kstychAppObject['config']['colorSuccess']='<?php echo $skinarr[5]; ?>';
74 kstychAppObject['config']['colorWarning']='<?php echo $skinarr[6]; ?>';
75 kstychAppObject['config']['colorDanger']='<?php echo $skinarr[7]; ?>';
76 kstychAppObject['config']['colorInverse']='<?php echo $skinarr[8]; ?>';
77 </script>
78
79 <script src="<?php echo url('/'); ?>/assets/components/modules/admin/chat/jquery.ui.chatbox.js"></script>
80 <script src="<?php echo url('/'); ?>/assets/components/modules/admin/chat/chatboxmanager.js"></script>
81 <script src="<?php echo url('/'); ?>/assets/js/highchart/highcharts.js"></script>
82 <script src="<?php echo url('/'); ?>/jsbody?v=<?php echo $v; ?>"></script>
83 <script src="<?php echo url('/'); ?>/assets/js/sip.js"></script>
84 <script src="<?php echo url('/'); ?>/assets/js/dialer.js"></script>
85 <script src="<?php echo url('/'); ?>/assets/js/kstych.js"></script>
86 <script src="<?php echo url('/'); ?>/assets/js/datatable.js"></script>
87
88 <?php if(Session::has('mdevice')&&Session::get('mdevice')!=""){$md=Session::get('mdevice'); ?>
89 <script src="<?php echo url('/'); ?>/assets/js/cordova/<?php echo $md; ?>/cordova.js?v=<?php echo $v; ?>"></script>
90 <script src="<?php echo url('/'); ?>/assets/js/cordova/<?php echo $md; ?>/kstych.js?v=<?php echo $v; ?>"></script>
91 <?php } ?>
92
93 </body>
94 </html>
1 <?php
2
3 use App\Models\User;
4
5 $data = Auth::user()->data();
6 $meta = Auth::user()->meta();
7 if (!isset($data['personal'])) $data['personal'] = array();
8 $user = Auth::user();
9
10
11 $tmodules = $modules;
12 $modules = array();
13 $dispnames = array();
14 foreach ($tmodules as $mname => $marr) {
15 if (!isset($modules[$mname])) {
16 if (!in_array($marr['disp'], array_values($dispnames))) {
17 $modules[$mname] = $marr;
18 $dispnames[$mname] = $marr['disp'];
19 } else {
20 $key = array_search($marr['disp'], $dispnames);
21 $modules[$key]['submenu'] = array_merge($modules[$key]['submenu'], $marr['submenu']);
22 }
23 }
24 }
25 ?>
26
27 <!-- panel left -->
28 <div class="pushy pushy-left">
29 <div class="desc_imgdiv">
30 <div class="pushy-user-desc">
31 <img src="<?php echo $user->fetchphoto(); ?>">
32 <h4><?php echo $user->dispname(); ?></h4>
33 <span><i class="fa fa-pencil-square-o"></i></span>
34 <div style="clear:both"></div>
35 <p><?php echo $user->email; ?></p>
36 </div>
37 </div>
38 <?php $active = "active";
39 foreach ($modules as $mname => $marr) {
40 if (isset($marr['submenu'])) {
41 ?>
42 <div class=wave-btn style='width:100%'>
43 <div class=pushy-submenu>
44 <i class="fa fa-fw fa-<?php echo $marr['icon']; ?>"></i>
45 <h5><?php echo $marr['disp']; ?></h5>
46 <ul>
47 <?php
48 foreach ($marr['submenu'] as $submenu => $submenuarr) {
49 $p = 1;
50 if (isset($submenuarr[1])) {
51 $p = 0;
52 if (Auth::user()->moduleACL($mname, true, true, false) && $submenuarr[1] == "W") $p = 1;
53 if (Auth::user()->moduleACL($mname, true, true, true) && $submenuarr[1] == "A") $p = 1;
54 }
55 if ($p == 1) {
56 ?>
57 <li class="pushy-link"><a href="#" data-ajax='false' onclick="<?php echo $submenuarr[0]; ?>return false;"><?php echo $submenu; ?></a></li>
58 <?php
59 }
60 }
61 ?>
62 </ul>
63 </div>
64 </div>
65
66 <?php
67 } else if ($marr['onclick'] != "") {
68 ?>
69 <div class=wave-btn style='width:100%'>
70 <div class="pushy-menu">
71 <i class="fa fa-fw fa-<?php echo $marr['icon']; ?>"></i>
72 <h5 class="pushy-link" onclick="<?php echo $marr['onclick']; ?>return false;"><?php echo $marr['disp']; ?></h5>
73 </div>
74 </div>
75
76 <?php }
77 $active = "";
78 } ?>
79
80 <div class="pushy-menu">
81 <i class="fa fa-fw fa-power-off"></i>
82 <h5 class="pushy-link" onclick="doLogout(0);return false;">Logout</h5>
83 </div>
84
85 </div>
86 <div class='pushy-site-overlay'></div>
87 <!-- /panel left -->
88
89
90
91
92 <div id="menu-top">
93 <div class=navbar>
94 <img src="custom/logo_s.png" class=border-none height=30px style='float:left'>
95 <div class="user-action pull-left wave-btn" style='height:40px;padding-top:0px;margin-top:0px;'>
96 <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>
97 </div>
98
99 <ul class="main pull-left" id=topmainmenureturn style='display:none'>
100 <li onclick='returnMenuClick("dashboard");return false;'><a href="#"> Home </a></li>
101 </ul>
102
103 <ul class="main pull-left hidden-xs hidden-sm" id=topmainmenu>
104 <?php $active = "active";
105 foreach ($modules as $mname => $marr) { //TODO hidden-xs
106 if (isset($marr['submenu'])) {
107 ?>
108 <li class='homemenu dropdown <?php echo $active; ?>' onclick='' id=mainmenu<?php echo $marr['disp']; ?>><a href="#" data-toggle="dropdown"> <?php echo $marr['disp']; ?> </a>
109 <ul class="dropdown-menu">
110 <?php
111 foreach ($marr['submenu'] as $submenu => $submenuarr) {
112 $p = 1;
113 if (isset($submenuarr[1])) {
114 $p = 0;
115 if (Auth::user()->moduleACL($mname, true, true, false) && $submenuarr[1] == "W") $p = 1;
116 if (Auth::user()->moduleACL($mname, true, true, true) && $submenuarr[1] == "A") $p = 1;
117 }
118 if ($p == 1) {
119 ?>
120 <li><a href="#" onclick="<?php echo $submenuarr[0]; ?>return false;"><?php echo $submenu; ?></a></li>
121 <?php
122 }
123 }
124 ?>
125 </ul>
126 </li>
127 <?php
128 } else if ($marr['onclick'] != "") {
129 ?>
130 <li class='homemenu <?php echo $active; ?>' onclick="<?php echo $marr['onclick']; ?>return false;" id=mainmenu<?php echo $marr['disp']; ?>>
131 <a href="#"><?php echo $marr['disp']; ?></a>
132 </li>
133 <?php }
134 $active = "";
135 } ?>
136 <!-- change start code -->
137 <li style="color: #626771;font-weight: 600;height: 40px;line-height: 40px;padding: 0 10px;text-decoration: none;display: block;">
138 <div id="countdown">&nbsp;</div>
139 </li>
140 <!-- change end code -->
141 </ul>
142
143 <div class="user-action pull-right" id=topmainusermenu>
144
145 <?php
146 $acctype = Auth::user()->usertype;
147 if ($data["subscription"] == "Free") {
148 $datapercent = "100";
149 $subscstr = "Free Subscription";
150
151 $subscstr2 = "You are using a Free subscription <b>$acctype</b> account, there is no expiry";
152 } else if ($data["subscription"] == "Trial") {
153 $daysleft = intval(($data["subscriptiondata"][$acctype]['expiry'] - time()) / (24 * 60 * 60));
154 if ($daysleft < 0) $daysleft = 0;
155 $origdays = intval(($data["subscriptiondata"][$acctype]['expiry'] - $data["subscriptiondata"][$acctype]['created']) / (24 * 60 * 60));
156
157 $datapercent = round($daysleft * 100 / $origdays, 0);
158 $subscstr = "Trial Subscription";
159
160 $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";
161 } else if ($data["subscription"] == "Expired") {
162 $datapercent = "0";
163 $subscstr = "Subscription Expired";
164
165 $subscstr2 = "You are using an expired <b>$acctype</b> account, please renew your subscription to use full features";
166 } else {
167 $daysleft = intval(($data["subscriptiondata"][$acctype]['expiry'] - time()) / (24 * 60 * 60));
168 if ($daysleft < 0) $daysleft = 0;
169 $origdays = intval(($data["subscriptiondata"][$acctype]['expiry'] - $data["subscriptiondata"][$acctype]['created']) / (24 * 60 * 60));
170
171 $datapercent = round($daysleft * 100 / $origdays, 0);
172 $subscstr = $data["subscription"] . " Subscription";
173
174 $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";
175 }
176
177 ?>
178
179 <ul class="colors pull-right visible-xs visible-sm wave-btn" style='margin-top:-3px;'>
180 <li class="dropdown">
181 <a href="#" class="menu-btn"><i class='fa fa-bars' style='font-size:20px'></i></a>
182 </li>
183 </ul>
184
185 <div class="dropdown username hidden-xs" style='float:right'>
186 <a class="dropdown-toggle" data-toggle="dropdown" href="#" onclick=''><?php echo $displayname; ?> <span class="caret"></span> </a>
187 <ul class="dropdown-menu pull-right" id=topuserdropmenu>
188 <li><a href="#" class="glyphicons user" onclick='menuAction("profile");return false;'><i></i> Profile</a></li>
189 <!--<li><a href="#" class="glyphicons list" onclick='menuAction("admin");return false;'><i></i> Timeline</a></li>-->
190 <li><a href="#" class="glyphicons book" onclick='menuAction("dashboard");return false;'><i></i> Dashboard</a></li>
191 <?php if (Auth::user()->moduleACL("Admin", true, true, false)) { ?>
192 <li><a href="#" class="glyphicons cogwheels" onclick='menuAction("admin");return false;'><i></i><?php echo Config::get("app.name"); ?> Admin</a></li>
193 <?php } ?>
194 <?php if (Auth::user()->moduleACL("User", true, true, false)) { ?>
195 <li><a href="#" class="glyphicons cogwheels" onclick='menuAction("user");return false;'><i></i> Manage Users</a></li>
196 <?php }
197 if (Auth::user()->moduleACL("Group", true, true, false)) { ?>
198 <li><a href="#" class="glyphicons cogwheels" onclick='menuAction("group");return false;'><i></i> Manage Groups</a></li>
199 <li><a href="#" class="glyphicons cogwheels" onclick='menuAction("role");return false;'><i></i> Manage Roles</a></li>
200 <?php } ?>
201 <?php if (Auth::user()->moduleACL("ImportExcel", true, true, false)) { ?>
202 <li><a href="#" class="glyphicons cogwheels" onclick='menuAction("import_excel");return false;'><i></i> Import Excel</a></li>
203 <?php } ?>
204 <li><a href="#" class="glyphicons circle_question_mark" onclick="dindexmenu('help&page=helpintroduction',this);return false;"><i></i> Help</a></li>
205
206 <li><a href="#" class="glyphicons cogwheels" onclick="menuAction('setting');return false;"><i></i>Settings</a></li>
207
208 <li><a href="#" class="glyphicons exit" onclick="doLogout(0);return false;"><i></i> Logout</a></li>
209 </ul>
210 </div>
211 </div>
212 </div>
213 </div>
214
215 <div class="clearfix"></div>
216 <script type="text/javascript">
217 redirect_to_password_reset();
218
219
220 function redirect_to_password_reset() {
221 var action = "password_expiry_check";
222 $.ajax({
223 type: "GET",
224 url: action,
225 success: function(result) {
226 console.log(result);
227 if (result == 'True') {
228 menuAction("profile");
229 }
230 }
231 });
232 }
233 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <?php $__env->startSection('main_menu'); ?>
2 <?php echo $__env->make('layout.main_menu', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
3 <?php $__env->stopSection(); ?>
4
5 <?php $__env->startSection('top_menu'); ?>
6 <?php echo $__env->make('layout.top_menu', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
7 <?php $__env->stopSection(); ?>
8
9 <?php $__env->startSection('main_content'); ?>
10 <script>
11 $(document).ready(function(){
12 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){}});
13 else kstychHashFunction();
14
15 <?php if(Config::get("app.extAuth")!=""){ ?>doAjax("dashboard/r",'','','ajax_dashboard_r','singlethis','GET');<?php } ?>
16 if ($.browser.msie)document.location="msie";
17
18
19 if (typeof kDesktopNotification === 'function')kDesktopNotification("","","",10);
20 incomingPresense("","","");
21 });
22
23
24
25
26 if (navigator.userAgent.match(/(iPad|iPhone|iPod touch);.*CPU.*OS/i))
27 {
28 $("#menu-top").css({'padding-top':'20px','height':'60px'});
29 $("#content").css({'margin-top':'60px'});
30 }
31 document.addEventListener('deviceready', function() {
32
33 $(document).on('click', 'a[target="_system"],a[target="_blank"]', function (e) {
34 e.preventDefault();
35 var url = this.href;
36
37 if(navigator.app)navigator.app.loadUrl(url, { openExternal:true });
38 else if(innappbrowser)cordova.exec(function(){}, function(){}, "InAppBrowser", "open", [url, "_system", null]);
39 else window.open(url,"_system");
40
41 //$("#welcome_wizard_body").html("<iframe style='width:100%;min-height:400px;height:100%' src='"+url+"'></iframe>");
42 //$("#welcome_wizard").modal('show');
43
44
45 });
46
47 });
48
49
50
51
52 </script>
53 <?php $__env->stopSection(); ?>
54
55 <?php echo $__env->make('layout.layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2
3 readfile("assets/components/library/jquery/jquery.min.js");echo "\n\n";
4 readfile("assets/components/library/jquery/jquery-migrate.min.js");echo "\n\n";
5 readfile("assets/components/plugins/link-preview/linkPreview.js");echo "\n\n";
6 readfile("assets/components/library/jquery-ui/js/jquery-ui-1.8.2.custom.min.js");echo "\n\n";
7 readfile("assets/components/plugins/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js");echo "\n\n";
8 readfile("assets/js/sweetalert.min.js");echo "\n\n";
1 <?php
2 $reportTitle = 'TC Productivity MIS';
3 $returnblade = 'productivity_mis';
4
5 $view_path = Config::get('view.paths');
6 include_once($view_path[0].'/layout/module/dialer/reporthead.blade.php');
7
8 $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');
9
10 if(Input::has("spcode"))
11 {
12 if(!$joined) $alist=$alist->leftjoin('records AS r', 'r.id', '=', 'c.crm_id');
13
14 $alist=$alist->addSelect(DB::raw(" r.state, r.specialCode"));
15 $alist=$alist->groupBy('r.state');
16 $alist=$alist->groupBy('r.SpecialCode');
17 }
18 $alist=$alist->get();
19
20 $i=1;
21 $reporthead=array("#","Telecaller","TelecallerID","Supervisor","Account","Attempt","AI","Contact","CI","Contact(%)","PTP","PTP(%)","BP","BP(%)");
22 $reportarray=array();
23 $totalarray =array();
24 if(count($alist))
25 foreach($alist as $aline)
26 {
27 $tuser=$userarr[$aline->user_id];
28
29 if(!isset($reportarray[$aline->user_id])) {
30 $reportarray[$aline->user_id]=array("#"=>$i++,"Telecaller"=>$tuser->telecaller,"TelecallerID"=>$tuser->username,"Supervisor"=>$tuser->sepervisor);
31 }
32
33 $reportarray[$aline->user_id]["Account"] = $aline->customer;
34 $reportarray[$aline->user_id]["Attempt"] = $aline->count;
35 $reportarray[$aline->user_id]["AI"] = number_format( ($aline->customer) ? ($aline->count/$aline->customer) : 0, 2 );
36 $reportarray[$aline->user_id]["Contact"] = $aline->contacted;
37 $reportarray[$aline->user_id]["CI"] = number_format( ($aline->customer) ? ($aline->contacted/$aline->customer) : 0, 2 );
38 $reportarray[$aline->user_id]["Contact(%)"] = number_format( ($aline->count) ? ($aline->contacted/$aline->count) * 100 : 0, 2 ) . '%';
39 $reportarray[$aline->user_id]["PTP"] = $aline->ptp;
40 $reportarray[$aline->user_id]["PTP(%)"] = number_format( ($aline->contacted) ? ($aline->ptp/$aline->contacted) * 100 : 0, 2 ) . '%';
41 $reportarray[$aline->user_id]["BP"] = $aline->bp;
42 $reportarray[$aline->user_id]["BP(%)"] = number_format( ($aline->ptp) ? ($aline->bp/$aline->ptp) * 100 : 0, 2 ) . '%';
43
44 if(Input::has("spcode")) {
45 $reportarray[$aline->user_id]["State"] = $aline->state;
46 $reportarray[$aline->user_id]["SpecialCode"]= $aline->specialCode;
47 $specialarray[$aline->user_id . $aline->state . $aline->specialCode] = $reportarray[$aline->user_id];
48 }
49
50 $totalarray["Account"] += $aline->customer;
51 $totalarray["Attempt"] += $aline->count;
52 $totalarray["AI"] = number_format(@($totalarray["Attempt"]/$totalarray["Account"]), 2 );
53 $totalarray["Contact"] += $aline->contacted;
54 $totalarray["CI"] = number_format(@($totalarray["Contact"]/$totalarray["Account"]), 2 );
55 $totalarray["Contact(%)"]= number_format(@($totalarray["Contact"]/$totalarray["Attempt"]) * 100, 2 ) . '%';
56 $totalarray["PTP"] += $aline->ptp;
57 $totalarray["PTP(%)"] = number_format(@($totalarray["PTP"]/$totalarray["Contact"]) * 100, 2 ) . '%';
58 $totalarray["BP"] += $aline->bp;
59 $totalarray["BP(%)"] = number_format(@($totalarray["BP"]/$totalarray["PTP"]) * 100, 2 ) . '%';
60 }
61
62 if(Input::has("spcode"))
63 {
64 $reporthead=array("TelecallerID","Telecaller","State","SpecialCode","Account","Attempt","AI","Contact","CI","Contact(%)","PTP","PTP(%)");
65 include_once(app_path().'/lib/phpexcel/PHPExcel.php');
66
67 $inputFileType = "Excel5";
68 $objReader = PHPExcel_IOFactory::createReader($inputFileType);
69 $objPHPExcel = $objReader->load("assets/extras/blank.xls");
70 $baseRow = 2;
71
72 $index_count = 0;
73 foreach ($reporthead as $head => $headval){
74 $colstr=PHPExcel_Cell::stringFromColumnIndex($index_count);
75 $objPHPExcel->getActiveSheet()->setCellValue($colstr."1", $headval);
76 $index_count++;
77 }
78
79 if(count($specialarray))
80 foreach($specialarray as $uid=>$uarr)
81 {
82 $row = $baseRow++;
83 $index_count = 0;
84 foreach ($reporthead as $head => $headval){
85 $colstr=PHPExcel_Cell::stringFromColumnIndex($index_count);
86 $objPHPExcel->getActiveSheet()->setCellValue($colstr.$row, $uarr[$headval]);
87 $index_count++;
88 }
89 }
90
91 header('Content-Type: application/vnd.ms-excel');
92 header('Content-Disposition: attachment;filename="specialcode_mis.xls"');
93 header('Cache-Control: max-age=0');
94
95 $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, $inputFileType);
96 $objWriter->save('php://output');
97
98 return ;
99 }
100
101 $reportarray["Total"] = array_merge(array("Telecaller"=>"Total"),$totalarray);
102
103 if(Input::has("dllogxls"))
104 {
105 include_once(app_path().'/lib/phpexcel/PHPExcel.php');
106
107 $inputFileType = "Excel5";
108 $objReader = PHPExcel_IOFactory::createReader($inputFileType);
109 $objPHPExcel = $objReader->load("assets/extras/blank.xls");
110 $baseRow = 3;
111
112 $index_count = 0;
113 foreach ($reporthead as $head => $headval){
114 $colstr=PHPExcel_Cell::stringFromColumnIndex($index_count);
115 $objPHPExcel->getActiveSheet()->setCellValue($colstr."1", $headval);
116 $index_count++;
117 }
118
119 if(count($reportarray))
120 foreach($reportarray as $uid=>$uarr)
121 {
122 $row = $baseRow++;
123 $index_count = 0;
124 foreach ($reporthead as $head => $headval){
125 $colstr=PHPExcel_Cell::stringFromColumnIndex($index_count);
126 $objPHPExcel->getActiveSheet()->setCellValue($colstr.$row, $uarr[$headval]);
127 $index_count++;
128 }
129 }
130
131 header('Content-Type: application/vnd.ms-excel');
132 header('Content-Disposition: attachment;filename="productivity_mis.xls"');
133 header('Cache-Control: max-age=0');
134
135 $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, $inputFileType);
136 $objWriter->save('php://output');
137
138 return ;
139 }
140
141 $highestColumn = sizeof($reporthead);
142 if(count($reportarray) > 1) {
143 $outhead="<tr>";$outstr="";$outsubhead="<tr>";
144 foreach ($reporthead as $head => $headval){
145 $outhead.="<td align='center'>".$headval."</td>";
146 }
147 $outsubhead.="</tr>";
148 $outhead.="</tr>".$outsubhead;
149 $utotalarr = array("Telecaller"=>'Total');
150 if(count($reportarray))
151 foreach($reportarray as $uid=>$uarr)
152 {
153 $outstr.="<tr>";
154 for ($head = 0; $head < $highestColumn; $head++){
155 if($head < 3) {
156 $outstr.="<td>".$uarr[$reporthead[$head]]."</td>";
157 }
158 else {
159 $outstr.="<td align='right'>".$uarr[$reporthead[$head]]."</td>";
160 }
161
162 }
163 $outstr.="</tr>";
164 }
165 }
166 else {
167 $outhead.="<tr><td>No Records Found.</td></tr>";
168 }
169 ?>
170
171 <?php echo $__env->make('layout.module.dialer.searchform', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
172
173 <div style="overflow: auto; margin-top: 10px;">
174 <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;'>
175 <thead><?php echo $outhead; ?></thead>
176 <?php echo $outstr; ?>
177 </table>
178 </div>
179
180 </div>
181
182 <script>
183 function dlSpecialCodeXls()
184 {
185 var searchStr = dataString();
186 window.open('dialer/<?php echo e($returnblade); ?>?spcode=1&'+searchStr);
187 return false;
188 }
189
190 $("#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>");
191 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 if(Config::get('app.webdomain')==Config::get('app.domain'))
3 {
4 ?>
5 <script>document.location='login';</script>
6 <?php
7 }
8 else
9 {
10 echo "<script>document.location='".Config::get('app.webdomain')."';</script>";
11 }
12 ?>
1 <?php
2 $reportTitle = 'Next Action Report';
3 $returnblade = 'nextaction';
4
5 $view_path = Config::get('view.paths');
6 include_once($view_path[0].'/layout/module/dialer/reporthead.blade.php');
7
8 $alist=$alist->where('userstatus','=','Contacted')->where('resultCode','=','PTP');
9 $alist=$alist->get();
10
11 $i=1;
12 $reporthead=array("#","Telecaller","TelecallerID","Supervisor","Customers","PTP");
13 $reportarray=array();
14 if(count($alist))
15 foreach($alist as $aline)
16 {
17 $tuser=$userarr[$aline->user_id];
18
19 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());
20
21 if(!is_null($aline->lan)) {
22 $reportarray[$aline->user_id]["Customer_lists"][] = $aline->lan;
23 }
24 $reportarray[$aline->user_id]["Customers"] = count(array_unique($reportarray[$aline->user_id]["Customer_lists"]));
25 $reportarray[$aline->user_id]["PTP"]++;
26
27 //$ststr=$aline->userstatus."-".$aline->usersubstatus;
28 $ststr=$aline->nextActionCode;
29 if(!in_array($ststr,$reporthead))$reporthead[]=$ststr;
30 $reportarray[$aline->user_id][$ststr]++;
31 }
32
33 $highestColumn = sizeof($reporthead);
34 if(count($reportarray)) {
35 $outhead="<tr>";$outstr="";
36 for ($head = 0; $head < $highestColumn; $head++){
37 if($reporthead[$head] == '#') {
38 $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>";
39 $outhead.="<td>".$mode_str."</td>";
40 }
41 else {
42 $outhead.="<td>".$reporthead[$head]."</td>";
43 }
44 }
45 $outhead.="</tr>";
46 $utotalarr = array("Telecaller"=>'Total');
47 foreach($reportarray as $uid=>$uarr)
48 {
49 $outstr.="<tr>";
50 for ($head = 0; $head < $highestColumn; $head++){
51 if($head < 4) {
52 $data_str = $uarr[$reporthead[$head]];
53 }
54 elseif($head < 5) {
55 $data_str = $uarr[$reporthead[$head]];
56 $utotalarr[$reporthead[$head]] += $uarr[$reporthead[$head]];
57 }
58 else {
59 $data_str = '<span class="summation" style="display:block;">'.$uarr[$reporthead[$head]].'</span>';
60 $data_str .= '<span class="percent" style="display:none;">'.number_format(@($uarr[$reporthead[$head]]/$uarr['PTP']) * 100, 2 ).'%</span>';
61 $data_str = '<a href="#" onclick="breakupXls(\'nextaction\',\''.$uid.'\',\''.$reporthead[$head].'\')">' . $data_str . '</a>';
62 $utotalarr[$reporthead[$head]] += $uarr[$reporthead[$head]];
63 }
64 $outstr.="<td>".$data_str."</td>";
65 }
66 $outstr.="</tr>";
67 }
68
69 $outstr.="<tr>";
70 for ($head = 0; $head < $highestColumn; $head++)
71 {
72 if($head < 5) {
73 $data_str = $utotalarr[$reporthead[$head]];
74 }
75 else {
76 $data_str = '<span class="summation" style="display:block;">'.$utotalarr[$reporthead[$head]].'</span>';
77 $data_str .= '<span class="percent" style="display:none;">'.number_format(@($utotalarr[$reporthead[$head]]/$utotalarr['PTP']) * 100, 2 ).'%</span>';
78 $data_str = '<a href="#" onclick="breakupXls(\'nextaction\',\'All\',\''.$reporthead[$head].'\')">' . $data_str . '</a>';
79 }
80 $outstr.="<td>".$data_str."</td>";
81 }
82 $outstr.="</tr>";
83 }
84 else {
85 $outhead.="<tr><td>No Records Found.</td></tr>";
86 }
87
88 if(Input::has("dllogxls"))
89 {
90 include_once(app_path().'/lib/phpexcel/PHPExcel.php');
91
92 $inputFileType = "Excel5";
93 $objReader = PHPExcel_IOFactory::createReader($inputFileType);
94 $objPHPExcel = $objReader->load("assets/extras/blank.xls");
95 $baseRow = 2;
96
97
98 $highestColumn = sizeof($reporthead);
99 for ($head = 0; $head < $highestColumn; $head++){
100 $colstr=PHPExcel_Cell::stringFromColumnIndex($head);
101 $objPHPExcel->getActiveSheet()->setCellValue($colstr."1", $reporthead[$head]);
102 }
103
104 foreach($reportarray as $uid=>$uarr)
105 {
106 $row = $baseRow++;
107 $col = 0;
108
109 for ($head = 0; $head < $highestColumn; $head++){
110 $colstr=PHPExcel_Cell::stringFromColumnIndex($head);
111 $objPHPExcel->getActiveSheet()->setCellValue($colstr.$row, $uarr[$reporthead[$head]]);
112 }
113 }
114
115 $row++;
116 for ($head = 0; $head < $highestColumn; $head++){
117 $colstr=PHPExcel_Cell::stringFromColumnIndex($head);
118 $objPHPExcel->getActiveSheet()->setCellValue($colstr.$row, $utotalarr[$reporthead[$head]]);
119 }
120
121 header('Content-Type: application/vnd.ms-excel');
122 header('Content-Disposition: attachment;filename="NextActionCode.xls"');
123 header('Cache-Control: max-age=0');
124
125 $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, $inputFileType);
126 $objWriter->save('php://output');
127
128 return ;
129 }
130
131 //charts
132 $cat1=array();
133 $cat1arr=array();
134 foreach($reportarray as $uid=>$uarr)
135 {
136 $cat1[]="'$uarr[Telecaller]'";
137
138 for ($head = 6; $head < $highestColumn; $head++){
139 if(!isset($cat1arr[$reporthead[$head]]))$cat1arr[$reporthead[$head]]=array();
140
141 $cat1arr[$reporthead[$head]][$uarr["#"]]=round($uarr[$reporthead[$head]],1);
142 if(empty($cat1arr[$reporthead[$head]][$uarr["#"]]))$cat1arr[$reporthead[$head]][$uarr["#"]]=0;
143 }
144 }
145
146 $cat1arrstr="";
147 foreach($cat1arr as $name=>$data)
148 {
149 $extra="";if($name=="InboundDROP-InboundDROP")$extra=",visible: false";
150 $cat1arrstr.="{ name: '$name',\ndata : [";
151 $cat1arrstr.=implode(",",$data);
152 $cat1arrstr.="] $extra },\n";
153 }
154
155 $cat2=array();
156 foreach($reportarray as $uid=>$uarr)
157 {
158 for ($head = 6; $head < $highestColumn; $head++){
159 $cat2["'".$reporthead[$head]."'"]+=round($uarr[$reporthead[$head]],1);
160 }
161 }
162 ?>
163
164 <?php echo $__env->make('layout.module.dialer.searchform', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
165
166 <div class=col-md-6 style='border:1px solid #BBB;'>
167 <div id=userlogschart1 style='min-height:250px;width:100%'></div>
168 </div>
169 <div class=col-md-6 style='border:1px solid #BBB;'>
170 <div id=userlogschart2 style='min-height:250px;width:100%'></div>
171 </div>
172 <div style='clear:both'></div>
173
174 <div style="overflow: auto; margin-top: 10px;">
175 <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;'>
176 <thead><?php echo $outhead; ?></thead>
177 <?php echo $outstr; ?>
178 </table>
179 </div>
180
181 </div>
182
183 <script>
184 $(function () {
185 $('#userlogschart1').highcharts({
186 chart: {
187 type: 'column'
188 },
189 title: {
190 text: 'Userwise Next Action Count',
191 style: {
192 fontSize: '14px'
193 }
194 },
195 xAxis: {
196 labels:{
197 rotation: -45,
198 enabled:true//default is true
199 },
200 categories: [<?php echo implode(",",$cat1); ?>]
201 },
202 yAxis: {
203 min: 0,
204 title: {
205 text: ''
206 },
207 stackLabels: {
208 enabled: false,
209 }
210 },
211 tooltip: {
212 headerFormat: '<b>{point.x}</b><br/>',
213 pointFormat: '{series.name}: {point.y}<br/>Total: {point.stackTotal}'
214 },
215 plotOptions: {
216 column: {
217 stacking: 'normal',
218 dataLabels: {
219 enabled: false,
220 }
221 }
222 },
223 series: [<?php echo $cat1arrstr; ?>]
224 });
225 });
226
227 $(function () {
228 $('#userlogschart2').highcharts({
229 chart: {
230 type: 'column'
231 },
232 title: {
233 text: 'Next Action Count',
234 style: {
235 fontSize: '14px'
236 }
237 },
238 subtitle: {
239 text: ''
240 },
241 xAxis: {
242 categories: [<?php echo implode(",",array_keys($cat2)); ?>],
243 crosshair: true,
244 labels:{
245 enabled:true//default is true
246 },
247 },
248 yAxis: {
249 min: 0,
250 title: {
251 text: ''
252 }
253 },
254 tooltip: {
255 headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
256 pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
257 '<td style="padding:0"><b>{point.y}</b></td></tr>',
258 footerFormat: '</table>',
259 shared: true,
260 useHTML: true
261 },
262 plotOptions: {
263 column: {
264 pointPadding: 0.2,
265 borderWidth: 0
266 }
267 },
268 series: [{
269 name: 'Count',
270 data: [<?php echo implode(",",array_values($cat2)); ?>]
271
272 },]
273 });
274 });
275 </script>
...\ No newline at end of file ...\ 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!