a07f847b by Nitesh

For gitignore file

1 parent 9103ffcc
Showing 104 changed files with 819 additions and 10823 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,7 +323,7 @@ function dailyTasks ...@@ -323,7 +323,7 @@ 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
...@@ -333,14 +333,10 @@ function dailyTasks ...@@ -333,14 +333,10 @@ function dailyTasks
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
336 mkdir -p $app_path/custom/db 337 mkdir -p $app_path/custom/db
337 chmod -R 777 $app_path/custom/db 338 chmod -R 777 $app_path/custom/db
338 339
339 ##### SIPxml Event log folder creation START ###############################
340 mkdir -p $app_path/application/storage/logs/sipmlevents/$(date +%Y-%m-%d)/
341 chmod -R 777 $app_path/application/storage/logs/sipmlevents/$(date +%Y-%m-%d)/
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 ########################################################################
......
1 #!/bin/bash
2 ####################################################################################
3 ##### (c) Siddharth Upmanyu #############################################
4 ##### Install Instructions #############################################
5 ##### Fedora 23/24 (64 bit) #############################################
6 ##### Copy Code to /home and configure details in custom/.env ############
7 # >_ dnf -y update ; reboot ############
8 # >_ ./cron.sh server ############
9 ####################################################################################
10
11 export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
12
13 cwd=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
14 cd $cwd ; cd ..
15 app_path=`pwd`
16
17 if [ ! -f custom/.env ]; then
18 echo "ERROR : .env file not found"
19 exit
20 fi
21 source custom/.env
22
23 #Defs
24 if [ -z "$asterisk_extensions" ]; then asterisk_extensions="31331,_X!"; fi
25 if [ -z "$asterisk_manager" ]; then asterisk_manager="$app_ip"; fi
26 if [ -z "$asterisk_slaves" ]; then asterisk_slaves="$app_ip:1001:2000:1:30"; fi
27
28 if [ -z "$app_sslcertfile" ]; then app_sslcertfile="SSLCertificateFile /etc/pki/tls/certs/localhost.crt"; fi
29 if [ -z "$app_sslcertkeyfile" ]; then app_sslcertkeyfile="SSLCertificateKeyFile /etc/pki/tls/private/localhost.key"; fi
30 if [ -z "$app_sslcertchainfile" ]; then app_sslcertchainfile=""; fi
31 #####
32
33 for file in /etc/*-release; do
34 while IFS="=" read -r key value; do
35 case "$key" in
36 "NAME") OSNAME="$value" ;;
37 "VERSION_ID") OSVER="$value" ;;
38 esac
39 done < "$file"
40 done
41 OSARCH=$(uname -m | sed 's/x86_//;s/i[3-6]86/32/')
42
43 echo "Running from : $app_path"
44 echo "$OSNAME $OSARCH $OSVER"
45
46 ######################################################################## Functions
47 function checkInstallDeps
48 {
49 rpm -qa | grep -qw rpmfusion-nonfree-release || dnf install --nogpgcheck -y http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
50 checkErrorExit
51 rpm -qa | grep -qw rpmfusion-free-release || dnf install --nogpgcheck -y http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
52 checkErrorExit
53
54 array=( php-xml ImageMagick php php-gd php-mbstring php-mcrypt php-imap php-mysql php-pear php-xml php-xmlrpc php-process curl perl-libwww-perl libxml2 ncurses screen sox mariadb mariadb-server ntp php-pecl-memcache httpd mod_ssl mod_perl tar perl wget python-boto python-pip cockpit iptables-services libreoffice libreoffice-headless git ffmpeg swftools libmad libid3tag id3v2 libquicktime system-config-network resiprocate-turn-server asterisk asterisk-sip dahdi-tools asterisk-dahdi libpri make wget openssl-devel ncurses-devel newt-devel libxml2-devel kernel-devel gcc gcc-c++ sqlite-devel certbot php-opcache nload iftop redhat-lsb-core zip )
55 for i in "${array[@]}"
56 do
57 if ! rpm -qa | grep -qw $i ; then
58 echo "Installing : $i"
59 echo ""
60 dnf install --nogpgcheck -y $i
61 checkErrorExit
62 fi
63 done
64 }
65 function installDahdi
66 {
67 if [-d cd $app_path/custom/extras/dahdi-linux-complete ]; then
68 cd $app_path/custom/extras/dahdi-linux-complete
69
70 echo "Making Dahdi.."
71 make
72 checkErrorExit
73 echo ""
74 echo "Installing Dahdi.."
75 make install
76 checkErrorExit
77 make config
78 checkErrorExit
79
80 ## /etc/modprobe.d/dahdi.conf << options wcte13xp default_linemode=e1
81 ## modprobe wcte13xp default_linemode=e1
82
83 service dahdi restart
84 checkErrorExit
85
86 dahdi_genconf -v
87 dahdi_cfg -v
88
89 fi
90 }
91 function checkErrorExit
92 {
93 if [ $? -ne 0 ]; then
94 echo "============== ERROR ================"
95 exit
96 fi
97 }
98 function schemaSetup
99 {
100 mysql -u$DB_USERNAME -p$DB_PASSWORD -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY PASSWORD '*8849732369915B4FCF3EF1C8BC04CEB9A23C8D88' WITH GRANT OPTION;";
101 mysql -u$DB_USERNAME -p$DB_PASSWORD -e "CREATE DATABASE IF NOT EXISTS $DB_DATABASE;";
102 cd $app_path/application/;php $app_path/application/artisan migrate
103
104 mysql -u$DB_USERNAME -p$DB_PASSWORD -e "update diallines set status='Free',conf='',channel='',server='';" $DB_DATABASE
105 mysql -u$DB_USERNAME -p$DB_PASSWORD -e "update sipids set status=0,user=0,ready=0,confup=0,clients='',server='';" $DB_DATABASE
106 mysql -u$DB_USERNAME -p$DB_PASSWORD -e "update users set presence=0;" $DB_DATABASE
107
108 AsteriskServers=$(echo $asterisk_slaves | tr "," "\n")
109 for server in $AsteriskServers
110 do
111 IFS=':' read -r -a ServerArr <<< "$server"
112
113 if [ "${ServerArr[0]}" != "" ] ; then
114 mysql -u$DB_USERNAME -p$DB_PASSWORD -e "update diallines set status='Free',conf='',channel='',server='${ServerArr[0]}' where id>=${ServerArr[3]} and id<=${ServerArr[4]};" $DB_DATABASE
115 mysql -u$DB_USERNAME -p$DB_PASSWORD -e "update sipids set status=0,user=0,ready=0,confup=0,server='${ServerArr[0]}' where id>=${ServerArr[1]} and id<=${ServerArr[2]};" $DB_DATABASE
116 mysql -u$DB_USERNAME -p$DB_PASSWORD -e "delete from kqueues where status='New' and type='SIP_${ServerArr[0]}';" $DB_DATABASE
117 fi
118 done
119
120 mysql -u$DB_USERNAME -p$DB_PASSWORD -e "SET GLOBAL max_allowed_packet = 524288000;";
121 mysql -u$DB_USERNAME -p$DB_PASSWORD -e "SET GLOBAL query_cache_size = 524288000;";
122 mysql -u$DB_USERNAME -p$DB_PASSWORD -e "SET GLOBAL query_cache_limit = 10485760;";
123 mysql -u$DB_USERNAME -p$DB_PASSWORD -e "SET GLOBAL query_cache_type = 1;";
124 }
125 function vhostSetup
126 {
127 # Setup updates pre-startup
128 echo "<Directory $app_path>" > /etc/httpd/conf.d/$app_domain.conf
129 echo "Order allow,deny" >> /etc/httpd/conf.d/$app_domain.conf
130 echo "Allow from all" >> /etc/httpd/conf.d/$app_domain.conf
131 echo "AllowOverride all" >> /etc/httpd/conf.d/$app_domain.conf
132 echo "Require all granted" >> /etc/httpd/conf.d/$app_domain.conf
133 echo "</Directory>" >> /etc/httpd/conf.d/$app_domain.conf
134 echo "ServerAdmin contact@$app_domain" >> /etc/httpd/conf.d/$app_domain.conf
135
136 echo "<VirtualHost *:80>" >> /etc/httpd/conf.d/$app_domain.conf
137 echo "ServerName $app_domain" >> /etc/httpd/conf.d/$app_domain.conf
138 echo "DocumentRoot $app_path/application/public" >> /etc/httpd/conf.d/$app_domain.conf
139 echo "CustomLog /var/log/httpd/$app_domain.log combined" >> /etc/httpd/conf.d/$app_domain.conf
140 echo "ErrorLog /var/log/httpd/$app_domain-error.log" >> /etc/httpd/conf.d/$app_domain.conf
141 echo "LogLevel emerg" >> /etc/httpd/conf.d/$app_domain.conf
142 echo "</VirtualHost>" >> /etc/httpd/conf.d/$app_domain.conf
143 echo "<VirtualHost *:443>" >> /etc/httpd/conf.d/$app_domain.conf
144 echo "ServerName $app_domain" >> /etc/httpd/conf.d/$app_domain.conf
145 echo "DocumentRoot $app_path/application/public" >> /etc/httpd/conf.d/$app_domain.conf
146 echo "CustomLog /var/log/httpd/ssl-$app_domain.log combined" >> /etc/httpd/conf.d/$app_domain.conf
147 echo "ErrorLog /var/log/httpd/ssl-$app_domain-error.log" >> /etc/httpd/conf.d/$app_domain.conf
148 echo "LogLevel emerg" >> /etc/httpd/conf.d/$app_domain.conf
149 echo "SSLEngine on" >> /etc/httpd/conf.d/$app_domain.conf
150 echo $app_sslcertfile >> /etc/httpd/conf.d/$app_domain.conf
151 echo $app_sslcertkeyfile >> /etc/httpd/conf.d/$app_domain.conf
152 echo $app_sslcertchainfile >> /etc/httpd/conf.d/$app_domain.conf
153 echo "</VirtualHost>" >> /etc/httpd/conf.d/$app_domain.conf
154 }
155 function cronSetup
156 {
157 ccentry="* * * * * $app_path/application/cron.sh > /var/log/kcron_$app_domain.log 2>&1"
158 crontab -l > tcb.txt
159 grep -Fq "$ccentry" tcb.txt || echo "$ccentry" >> tcb.txt
160 crontab tcb.txt
161 rm -f tcb.txt
162 }
163 function astAGISetup
164 {
165 echo "#!/bin/bash" > /etc/asterisk/kstych-$app_domain.sh
166 echo "cd $app_path/application" >> /etc/asterisk/kstych-$app_domain.sh
167 echo "php artisan KstychPAGI" >> /etc/asterisk/kstych-$app_domain.sh
168 chmod +x /etc/asterisk/kstych-$app_domain.sh
169
170 echo "" > /etc/asterisk/kstych-$app_domain.conf
171 AstExts=$(echo $asterisk_extensions | tr "," "\n")
172 for exten in $AstExts
173 do
174 echo "exten => $exten,1,AGI(/etc/asterisk/kstych-$app_domain.sh)" >> /etc/asterisk/kstych-$app_domain.conf
175 echo "exten => $exten,2,Hangup" >> /etc/asterisk/kstych-$app_domain.conf
176 done
177 }
178 function astFilesSetup
179 {
180 mkdir -p -m 777 /etc/asterisk/keys
181 #dtlscert.sh -C asterisk.kstych.com -O "KstychPvtLtd" -d /etc/asterisk/keys
182 cp -f $app_path/application/public/assets/extras/data/asterisk/*.conf /etc/asterisk/
183 cp -f $app_path/application/public/assets/extras/data/asterisk/keys/* /etc/asterisk/keys/
184 cp -n $app_path/application/public/assets/extras/data/dahdi/chan_dahdi.conf /etc/asterisk/
185 cp -n $app_path/application/public/assets/extras/data/dahdi/dahdi-channels.conf /etc/asterisk/
186
187 sed -i "s/REPLACESERVERIP/$app_ip/g" /etc/asterisk/sip.conf
188 sed -i "s/REPLACESERVERIP/$app_ip/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
191
192 cp -f $app_path/application/public/assets/extras/data/asterisk/asterisk.service /etc/systemd/system/
193
194 AsteriskServers=$(echo $asterisk_slaves | tr "," "\n")
195 for server in $AsteriskServers
196 do
197 IFS=':' read -r -a ServerArr <<< "$server"
198
199 if [ "${ServerArr[0]}" == "$app_ip" ] ; then
200 echo "" > /etc/asterisk/users-$app_domain.conf
201 for (( c=${ServerArr[1]}; c<=${ServerArr[2]}; c++ ))
202 do
203 echo "[$c]" >> /etc/asterisk/users-$app_domain.conf
204 done
205 fi
206 done
207
208 chmod +r /etc/asterisk/keys/*
209 chown -R asterisk:asterisk /etc/asterisk
210 chmod +r /etc/pki/tls/certs/localhost.crt
211 chmod +r /etc/pki/tls/private/localhost.key
212 }
213 function phpiniSetup
214 {
215 sed -e '/^[^;]*max_execution_time/s/=.*$/= 3600/' -i /etc/php.ini
216 sed -e '/^[^;]*max_input_time/s/=.*$/= 3600/' -i /etc/php.ini
217 sed -e '/^[^;]*memory_limit/s/=.*$/= 4096M/' -i /etc/php.ini
218 sed -e '/^[^;]*post_max_size/s/=.*$/= 64M/' -i /etc/php.ini
219 sed -e '/^[^;]*upload_max_filesize/s/=.*$/= 1024M/' -i /etc/php.ini
220 }
221 function reTurnSetup
222 {
223 cp -f $app_path/application/public/assets/extras/data/reTurn/* /etc/reTurn/
224 sed -i "s/REPLACESERVERIP/$app_ip/g" /etc/reTurn/users.txt
225 sed -i "s/REPLACESERVERIP/$app_ip/g" /etc/reTurn/reTurnServer.config
226 }
227 function selinuxSetup
228 {
229 sed -e '/^[^#]*SELINUX/s/=.*$/=disabled/' -i /etc/selinux/config
230 sed -e '/^[^#]*SELINUX/s/=.*$/=disabled/' -i /etc/sysconfig/selinux
231 }
232 function restartServices
233 {
234 systemctl disable httpd.service
235 systemctl disable mariadb.service
236 systemctl disable ntpd.service
237 systemctl disable iptables.service
238 systemctl disable ip6tables.service
239 systemctl disable firewalld.service
240 systemctl disable cockpit.socket
241 systemctl disable asterisk.service
242 systemctl disable resiprocate-turn-server.service
243
244 systemctl stop httpd.service
245 systemctl stop mariadb.service
246 systemctl stop ntpd.service
247 systemctl stop iptables.service
248 systemctl stop ip6tables.service
249 systemctl stop firewalld.service
250 systemctl stop cockpit.socket
251 systemctl stop asterisk.service
252 systemctl stop resiprocate-turn-server.service
253
254 systemctl start httpd.service
255 systemctl start ntpd.service
256 systemctl start mariadb.service
257 systemctl start cockpit.socket
258 systemctl start resiprocate-turn-server.service
259 systemctl start asterisk.service
260 systemctl start iptables.service
261 systemctl start ip6tables.service
262
263 iptables -F
264
265 iptables -A INPUT -p tcp --dport 22 -j ACCEPT
266 iptables -A INPUT -p tcp --dport 25 -j ACCEPT
267 iptables -A INPUT -p tcp --dport 80 -j ACCEPT
268 iptables -A INPUT -p tcp --dport 443 -j ACCEPT
269 iptables -A INPUT -p tcp --dport 1935 -j ACCEPT
270 iptables -A INPUT -p tcp --dport 3478 -j ACCEPT
271 iptables -A INPUT -p tcp --dport 5038 -j ACCEPT
272 iptables -A INPUT -p tcp --dport 3306 -j ACCEPT
273 iptables -A INPUT -p tcp --dport 8088 -j ACCEPT
274 iptables -A INPUT -p tcp --dport 8089 -j ACCEPT
275 iptables -A INPUT -p tcp --dport 9090 -j ACCEPT
276 iptables -A INPUT -p tcp --match multiport --dports 10000:20000 -j ACCEPT
277 iptables -A INPUT -p udp --dport 3478 -j ACCEPT
278 iptables -A INPUT -p udp --match multiport --dports 10000:60000 -j ACCEPT
279 iptables -I OUTPUT -j ACCEPT
280 }
281 function generalSetup
282 {
283 #hostname localhost
284 ulimit -n 65000
285 swapoff -a
286 timedatectl set-timezone UTC
287 timedatectl set-ntp yes
288 grep -q -F 'Storage=none' /etc/systemd/journald.conf || echo 'Storage=none' >> /etc/systemd/journald.conf
289
290 #chmod -R 777 $app_path/application/storage
291 chmod -R 777 $app_path/custom/app
292 }
293 function mysqlSetup
294 {
295 systemctl start mariadb.service
296 if ! mysql -u$DB_USERNAME -p$DB_PASSWORD -e ";" ; then
297
298 systemctl stop mariadb.service
299 mysqld_safe --skip-grant-tables &
300 sleep 10
301 mysql -u root -e "update user set password=PASSWORD('$DB_PASSWORD') where User='$DB_USERNAME';flush privileges;" mysql
302
303 pkill mysqld_safe
304 pkill mysqld
305
306 systemctl restart mariadb.service
307
308 fi
309 }
310 function sshdCheck
311 {
312 pgrep sshd
313 if [ $? -ne 0 ] && [ "$runLevelVar" -ge 3 ] ; then
314 service sshd restart;
315 fi
316 }
317 function dailyTasks
318 {
319 ####################################################################################
320 # Daily Script
321 ####################################################################################
322 nowtime=$(date +%k%M)
323 if [ $nowtime -eq "000" ]
324 then
325
326 ##rm -f $app_path/application/storage/logs/laravel-*.log
327 touch $app_path/application/storage/logs/laravel-$(date +%Y-%m-%d).log
328 chmod -R 777 $app_path/application/storage
329 chmod -R 777 $app_path/custom/app
330
331 #### Asterisk Date-wise Call Recording Folder creation START ######
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
334 chown asterisk.asterisk -R /var/spool/asterisk/astrec/$(date +%Y)/$(date +%m)/$(date +%d)
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
339 ##### SIPxml Event log folder creation START ###############################
340 mkdir -p $app_path/application/storage/logs/sipmlevents/$(date +%Y-%m-%d)/
341 chmod -R 777 $app_path/application/storage/logs/sipmlevents/$(date +%Y-%m-%d)/
342 ############################################################################
343
344 mysqldump -u$DB_USERNAME -p$DB_PASSWORD --single-transaction $DB_DATABASE | gzip > $app_path/custom/db/$DB_DATABASE.sql.gz
345 fi
346 }
347 function astPAMICheck
348 {
349 AsteriskServers=$(echo $asterisk_slaves | tr "," "\n")
350 for server in $AsteriskServers
351 do
352 IFS=':' read -r -a ServerArr <<< "$server"
353
354 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]}"
356 fi
357 done
358 }
359 function createCall
360 {
361 echo "create"
362 AsteriskServers=$(echo $asterisk_slaves | tr "," "\n")
363 for server in $AsteriskServers
364 do
365 IFS=':' read -r -a ServerArr <<< "$server"
366
367 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"
369 fi
370 done
371 }
372 function hangUpCall
373 {
374 echo "hang"
375 AsteriskServers=$(echo $asterisk_slaves | tr "," "\n")
376 for server in $AsteriskServers
377 do
378 IFS=':' read -r -a ServerArr <<< "$server"
379
380 if ! screen -list | grep -q "HangUpCall_$app_domain${ServerArr[0]}"; then
381 /usr/bin/screen -d -m -S HangUpCall_$app_domain${ServerArr[0]} bash -c "cd $app_path/application/;php $app_path/application/artisan PredictiveCallHangUp"
382 fi
383 done
384 }
385 function waitForLock
386 {
387 if [ ! -f /tmp/cronsh-$app_domain.lock ]; then
388 touch /tmp/cronsh-$app_domain.lock
389 else
390 exit
391 fi
392 while : ; do
393 if [ ! -f /tmp/cronsh.lock ]; then
394 touch /tmp/cronsh.lock
395 break
396 fi
397 sleep 1
398 done
399 }
400 function clearLock
401 {
402 rm -f /tmp/cronsh.lock
403 rm -f /tmp/cronsh-$app_domain.lock
404 }
405 ########################################################################
406
407 ######################################################################## Direct Commands
408 if [ "$1" == "packages" ] ; then
409 checkInstallDeps
410 exit
411 fi
412 if [ "$1" == "dahdi" ] ; then
413 installDahdi
414 exit
415 fi
416 if [ "$1" == "schema" ] ; then
417 schemaSetup
418 exit
419 fi
420 ########################################################################
421
422 ######################################################################## Main Script
423 waitForLock
424 if [ "$OSNAME" == "Fedora" ] && [ $OSVER -gt 21 ] ; then
425 pgrep httpd
426 if [ $? -ne 0 ] || [ "$1" == "server" ] ; then
427
428 generalSetup
429 vhostSetup
430 cronSetup
431 astAGISetup
432 astFilesSetup
433 reTurnSetup
434 phpiniSetup
435 selinuxSetup
436 mysqlSetup
437
438 restartServices
439 # schemaSetup
440
441 fi
442 sshdCheck
443 dailyTasks
444 astPAMICheck
445 createCall
446 hangUpCall
447 fi
448 clearLock
449 cd $app_path/application;php artisan schedule:run
450 ########################################################################
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 1587446252s:54141:"The stream or file "/home/fullerton/application/storage/logs/laravel-2020-04-20.log" could not be opened: failed to open stream: Permission denied[{"file":"\/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Handler\/RotatingFileHandler.php","line":88,"function":"write","class":"Monolog\\Handler\\StreamHandler","type":"-\u003E","args":[{"message":"exception 'UnexpectedValueException' with message 'The stream or file \"\/home\/fullerton\/application\/storage\/logs\/laravel-2020-04-20.log\" could not be opened: failed to open stream: Permission denied' in \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Handler\/StreamHandler.php:97\nStack trace:\n#0 \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Handler\/RotatingFileHandler.php(88): Monolog\\Handler\\StreamHandler-\u003Ewrite(Array)\n#1 \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Handler\/AbstractProcessingHandler.php(37): Monolog\\Handler\\RotatingFileHandler-\u003Ewrite(Array)\n#2 \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Logger.php(336): Monolog\\Handler\\AbstractProcessingHandler-\u003Ehandle(Array)\n#3 \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Logger.php(615): Monolog\\Logger-\u003EaddRecord(400, Object(UnexpectedValueException), Array)\n#4 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Log\/Writer.php(202): Monolog\\Logger-\u003Eerror(Object(UnexpectedValueException), Array)\n#5 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Log\/Writer.php(113): Illuminate\\Log\\Writer-\u003EwriteLog('error', Object(UnexpectedValueException), Array)\n#6 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Exceptions\/Handler.php(57): Illuminate\\Log\\Writer-\u003Eerror(Object(UnexpectedValueException))\n#7 \/home\/fullerton\/application\/app\/Exceptions\/Handler.php(81): Illuminate\\Foundation\\Exceptions\\Handler-\u003Ereport(Object(UnexpectedValueException))\n#8 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(78): App\\Exceptions\\Handler-\u003Ereport(Object(UnexpectedValueException))\n#9 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(34): Illuminate\\Routing\\Pipeline-\u003EhandleException(Object(Illuminate\\Http\\Request), Object(UnexpectedValueException))\n#10 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/View\/Middleware\/ShareErrorsFromSession.php(49): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#11 [internal function]: Illuminate\\View\\Middleware\\ShareErrorsFromSession-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#12 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#13 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#14 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#15 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Session\/Middleware\/StartSession.php(62): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#16 [internal function]: Illuminate\\Session\\Middleware\\StartSession-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#17 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#18 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#19 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#20 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Cookie\/Middleware\/AddQueuedCookiesToResponse.php(37): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#21 [internal function]: Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#22 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#23 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#24 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#25 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Cookie\/Middleware\/EncryptCookies.php(59): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#26 [internal function]: Illuminate\\Cookie\\Middleware\\EncryptCookies-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#27 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#28 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#29 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#30 [internal function]: Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#31 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#32 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(726): Illuminate\\Pipeline\\Pipeline-\u003Ethen(Object(Closure))\n#33 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(699): Illuminate\\Routing\\Router-\u003ErunRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))\n#34 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(675): Illuminate\\Routing\\Router-\u003EdispatchToRoute(Object(Illuminate\\Http\\Request))\n#35 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php(246): Illuminate\\Routing\\Router-\u003Edispatch(Object(Illuminate\\Http\\Request))\n#36 [internal function]: Illuminate\\Foundation\\Http\\Kernel-\u003EIlluminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))\n#37 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#38 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/CheckForMaintenanceMode.php(44): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#39 [internal function]: Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#40 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#41 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#42 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#43 [internal function]: Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#44 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#45 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php(132): Illuminate\\Pipeline\\Pipeline-\u003Ethen(Object(Closure))\n#46 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php(99): Illuminate\\Foundation\\Http\\Kernel-\u003EsendRequestThroughRouter(Object(Illuminate\\Http\\Request))\n#47 \/home\/fullerton\/application\/public\/index.php(53): Illuminate\\Foundation\\Http\\Kernel-\u003Ehandle(Object(Illuminate\\Http\\Request))\n#48 {main}","context":[],"level":400,"level_name":"ERROR","channel":"local","datetime":{"date":"2020-04-20 05:17:32.094965","timezone_type":3,"timezone":"UTC"},"extra":[],"formatted":"[2020-04-20 05:17:32] local.ERROR: exception 'UnexpectedValueException' with message 'The stream or file \"\/home\/fullerton\/application\/storage\/logs\/laravel-2020-04-20.log\" could not be opened: failed to open stream: Permission denied' in \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Handler\/StreamHandler.php:97\nStack trace:\n#0 \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Handler\/RotatingFileHandler.php(88): Monolog\\Handler\\StreamHandler-\u003Ewrite(Array)\n#1 \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Handler\/AbstractProcessingHandler.php(37): Monolog\\Handler\\RotatingFileHandler-\u003Ewrite(Array)\n#2 \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Logger.php(336): Monolog\\Handler\\AbstractProcessingHandler-\u003Ehandle(Array)\n#3 \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Logger.php(615): Monolog\\Logger-\u003EaddRecord(400, Object(UnexpectedValueException), Array)\n#4 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Log\/Writer.php(202): Monolog\\Logger-\u003Eerror(Object(UnexpectedValueException), Array)\n#5 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Log\/Writer.php(113): Illuminate\\Log\\Writer-\u003EwriteLog('error', Object(UnexpectedValueException), Array)\n#6 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Exceptions\/Handler.php(57): Illuminate\\Log\\Writer-\u003Eerror(Object(UnexpectedValueException))\n#7 \/home\/fullerton\/application\/app\/Exceptions\/Handler.php(81): Illuminate\\Foundation\\Exceptions\\Handler-\u003Ereport(Object(UnexpectedValueException))\n#8 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(78): App\\Exceptions\\Handler-\u003Ereport(Object(UnexpectedValueException))\n#9 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(34): Illuminate\\Routing\\Pipeline-\u003EhandleException(Object(Illuminate\\Http\\Request), Object(UnexpectedValueException))\n#10 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/View\/Middleware\/ShareErrorsFromSession.php(49): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#11 [internal function]: Illuminate\\View\\Middleware\\ShareErrorsFromSession-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#12 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#13 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#14 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#15 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Session\/Middleware\/StartSession.php(62): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#16 [internal function]: Illuminate\\Session\\Middleware\\StartSession-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#17 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#18 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#19 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#20 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Cookie\/Middleware\/AddQueuedCookiesToResponse.php(37): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#21 [internal function]: Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#22 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#23 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#24 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#25 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Cookie\/Middleware\/EncryptCookies.php(59): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#26 [internal function]: Illuminate\\Cookie\\Middleware\\EncryptCookies-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#27 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#28 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#29 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#30 [internal function]: Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#31 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#32 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(726): Illuminate\\Pipeline\\Pipeline-\u003Ethen(Object(Closure))\n#33 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(699): Illuminate\\Routing\\Router-\u003ErunRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))\n#34 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(675): Illuminate\\Routing\\Router-\u003EdispatchToRoute(Object(Illuminate\\Http\\Request))\n#35 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php(246): Illuminate\\Routing\\Router-\u003Edispatch(Object(Illuminate\\Http\\Request))\n#36 [internal function]: Illuminate\\Foundation\\Http\\Kernel-\u003EIlluminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))\n#37 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#38 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/CheckForMaintenanceMode.php(44): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#39 [internal function]: Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#40 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#41 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#42 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#43 [internal function]: Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#44 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#45 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php(132): Illuminate\\Pipeline\\Pipeline-\u003Ethen(Object(Closure))\n#46 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php(99): Illuminate\\Foundation\\Http\\Kernel-\u003EsendRequestThroughRouter(Object(Illuminate\\Http\\Request))\n#47 \/home\/fullerton\/application\/public\/index.php(53): Illuminate\\Foundation\\Http\\Kernel-\u003Ehandle(Object(Illuminate\\Http\\Request))\n#48 {main} \n"}]},{"file":"\/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Handler\/AbstractProcessingHandler.php","line":37,"function":"write","class":"Monolog\\Handler\\RotatingFileHandler","type":"-\u003E","args":[{"message":"exception 'UnexpectedValueException' with message 'The stream or file \"\/home\/fullerton\/application\/storage\/logs\/laravel-2020-04-20.log\" could not be opened: failed to open stream: Permission denied' in \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Handler\/StreamHandler.php:97\nStack trace:\n#0 \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Handler\/RotatingFileHandler.php(88): Monolog\\Handler\\StreamHandler-\u003Ewrite(Array)\n#1 \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Handler\/AbstractProcessingHandler.php(37): Monolog\\Handler\\RotatingFileHandler-\u003Ewrite(Array)\n#2 \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Logger.php(336): Monolog\\Handler\\AbstractProcessingHandler-\u003Ehandle(Array)\n#3 \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Logger.php(615): Monolog\\Logger-\u003EaddRecord(400, Object(UnexpectedValueException), Array)\n#4 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Log\/Writer.php(202): Monolog\\Logger-\u003Eerror(Object(UnexpectedValueException), Array)\n#5 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Log\/Writer.php(113): Illuminate\\Log\\Writer-\u003EwriteLog('error', Object(UnexpectedValueException), Array)\n#6 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Exceptions\/Handler.php(57): Illuminate\\Log\\Writer-\u003Eerror(Object(UnexpectedValueException))\n#7 \/home\/fullerton\/application\/app\/Exceptions\/Handler.php(81): Illuminate\\Foundation\\Exceptions\\Handler-\u003Ereport(Object(UnexpectedValueException))\n#8 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(78): App\\Exceptions\\Handler-\u003Ereport(Object(UnexpectedValueException))\n#9 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(34): Illuminate\\Routing\\Pipeline-\u003EhandleException(Object(Illuminate\\Http\\Request), Object(UnexpectedValueException))\n#10 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/View\/Middleware\/ShareErrorsFromSession.php(49): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#11 [internal function]: Illuminate\\View\\Middleware\\ShareErrorsFromSession-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#12 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#13 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#14 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#15 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Session\/Middleware\/StartSession.php(62): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#16 [internal function]: Illuminate\\Session\\Middleware\\StartSession-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#17 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#18 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#19 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#20 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Cookie\/Middleware\/AddQueuedCookiesToResponse.php(37): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#21 [internal function]: Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#22 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#23 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#24 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#25 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Cookie\/Middleware\/EncryptCookies.php(59): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#26 [internal function]: Illuminate\\Cookie\\Middleware\\EncryptCookies-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#27 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#28 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#29 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#30 [internal function]: Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#31 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#32 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(726): Illuminate\\Pipeline\\Pipeline-\u003Ethen(Object(Closure))\n#33 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(699): Illuminate\\Routing\\Router-\u003ErunRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))\n#34 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(675): Illuminate\\Routing\\Router-\u003EdispatchToRoute(Object(Illuminate\\Http\\Request))\n#35 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php(246): Illuminate\\Routing\\Router-\u003Edispatch(Object(Illuminate\\Http\\Request))\n#36 [internal function]: Illuminate\\Foundation\\Http\\Kernel-\u003EIlluminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))\n#37 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#38 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/CheckForMaintenanceMode.php(44): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#39 [internal function]: Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#40 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#41 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#42 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#43 [internal function]: Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#44 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#45 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php(132): Illuminate\\Pipeline\\Pipeline-\u003Ethen(Object(Closure))\n#46 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php(99): Illuminate\\Foundation\\Http\\Kernel-\u003EsendRequestThroughRouter(Object(Illuminate\\Http\\Request))\n#47 \/home\/fullerton\/application\/public\/index.php(53): Illuminate\\Foundation\\Http\\Kernel-\u003Ehandle(Object(Illuminate\\Http\\Request))\n#48 {main}","context":[],"level":400,"level_name":"ERROR","channel":"local","datetime":{"date":"2020-04-20 05:17:32.094965","timezone_type":3,"timezone":"UTC"},"extra":[],"formatted":"[2020-04-20 05:17:32] local.ERROR: exception 'UnexpectedValueException' with message 'The stream or file \"\/home\/fullerton\/application\/storage\/logs\/laravel-2020-04-20.log\" could not be opened: failed to open stream: Permission denied' in \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Handler\/StreamHandler.php:97\nStack trace:\n#0 \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Handler\/RotatingFileHandler.php(88): Monolog\\Handler\\StreamHandler-\u003Ewrite(Array)\n#1 \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Handler\/AbstractProcessingHandler.php(37): Monolog\\Handler\\RotatingFileHandler-\u003Ewrite(Array)\n#2 \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Logger.php(336): Monolog\\Handler\\AbstractProcessingHandler-\u003Ehandle(Array)\n#3 \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Logger.php(615): Monolog\\Logger-\u003EaddRecord(400, Object(UnexpectedValueException), Array)\n#4 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Log\/Writer.php(202): Monolog\\Logger-\u003Eerror(Object(UnexpectedValueException), Array)\n#5 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Log\/Writer.php(113): Illuminate\\Log\\Writer-\u003EwriteLog('error', Object(UnexpectedValueException), Array)\n#6 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Exceptions\/Handler.php(57): Illuminate\\Log\\Writer-\u003Eerror(Object(UnexpectedValueException))\n#7 \/home\/fullerton\/application\/app\/Exceptions\/Handler.php(81): Illuminate\\Foundation\\Exceptions\\Handler-\u003Ereport(Object(UnexpectedValueException))\n#8 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(78): App\\Exceptions\\Handler-\u003Ereport(Object(UnexpectedValueException))\n#9 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(34): Illuminate\\Routing\\Pipeline-\u003EhandleException(Object(Illuminate\\Http\\Request), Object(UnexpectedValueException))\n#10 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/View\/Middleware\/ShareErrorsFromSession.php(49): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#11 [internal function]: Illuminate\\View\\Middleware\\ShareErrorsFromSession-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#12 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#13 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#14 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#15 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Session\/Middleware\/StartSession.php(62): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#16 [internal function]: Illuminate\\Session\\Middleware\\StartSession-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#17 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#18 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#19 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#20 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Cookie\/Middleware\/AddQueuedCookiesToResponse.php(37): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#21 [internal function]: Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#22 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#23 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#24 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#25 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Cookie\/Middleware\/EncryptCookies.php(59): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#26 [internal function]: Illuminate\\Cookie\\Middleware\\EncryptCookies-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#27 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#28 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#29 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#30 [internal function]: Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#31 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#32 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(726): Illuminate\\Pipeline\\Pipeline-\u003Ethen(Object(Closure))\n#33 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(699): Illuminate\\Routing\\Router-\u003ErunRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))\n#34 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(675): Illuminate\\Routing\\Router-\u003EdispatchToRoute(Object(Illuminate\\Http\\Request))\n#35 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php(246): Illuminate\\Routing\\Router-\u003Edispatch(Object(Illuminate\\Http\\Request))\n#36 [internal function]: Illuminate\\Foundation\\Http\\Kernel-\u003EIlluminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))\n#37 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#38 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/CheckForMaintenanceMode.php(44): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#39 [internal function]: Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#40 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#41 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#42 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#43 [internal function]: Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#44 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#45 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php(132): Illuminate\\Pipeline\\Pipeline-\u003Ethen(Object(Closure))\n#46 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php(99): Illuminate\\Foundation\\Http\\Kernel-\u003EsendRequestThroughRouter(Object(Illuminate\\Http\\Request))\n#47 \/home\/fullerton\/application\/public\/index.php(53): Illuminate\\Foundation\\Http\\Kernel-\u003Ehandle(Object(Illuminate\\Http\\Request))\n#48 {main} \n"}]},{"file":"\/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Logger.php","line":336,"function":"handle","class":"Monolog\\Handler\\AbstractProcessingHandler","type":"-\u003E","args":[{"message":"exception 'UnexpectedValueException' with message 'The stream or file \"\/home\/fullerton\/application\/storage\/logs\/laravel-2020-04-20.log\" could not be opened: failed to open stream: Permission denied' in \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Handler\/StreamHandler.php:97\nStack trace:\n#0 \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Handler\/RotatingFileHandler.php(88): Monolog\\Handler\\StreamHandler-\u003Ewrite(Array)\n#1 \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Handler\/AbstractProcessingHandler.php(37): Monolog\\Handler\\RotatingFileHandler-\u003Ewrite(Array)\n#2 \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Logger.php(336): Monolog\\Handler\\AbstractProcessingHandler-\u003Ehandle(Array)\n#3 \/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Logger.php(615): Monolog\\Logger-\u003EaddRecord(400, Object(UnexpectedValueException), Array)\n#4 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Log\/Writer.php(202): Monolog\\Logger-\u003Eerror(Object(UnexpectedValueException), Array)\n#5 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Log\/Writer.php(113): Illuminate\\Log\\Writer-\u003EwriteLog('error', Object(UnexpectedValueException), Array)\n#6 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Exceptions\/Handler.php(57): Illuminate\\Log\\Writer-\u003Eerror(Object(UnexpectedValueException))\n#7 \/home\/fullerton\/application\/app\/Exceptions\/Handler.php(81): Illuminate\\Foundation\\Exceptions\\Handler-\u003Ereport(Object(UnexpectedValueException))\n#8 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(78): App\\Exceptions\\Handler-\u003Ereport(Object(UnexpectedValueException))\n#9 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(34): Illuminate\\Routing\\Pipeline-\u003EhandleException(Object(Illuminate\\Http\\Request), Object(UnexpectedValueException))\n#10 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/View\/Middleware\/ShareErrorsFromSession.php(49): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#11 [internal function]: Illuminate\\View\\Middleware\\ShareErrorsFromSession-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#12 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#13 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#14 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#15 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Session\/Middleware\/StartSession.php(62): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#16 [internal function]: Illuminate\\Session\\Middleware\\StartSession-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#17 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#18 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#19 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#20 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Cookie\/Middleware\/AddQueuedCookiesToResponse.php(37): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#21 [internal function]: Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#22 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#23 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#24 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#25 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Cookie\/Middleware\/EncryptCookies.php(59): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#26 [internal function]: Illuminate\\Cookie\\Middleware\\EncryptCookies-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#27 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#28 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#29 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#30 [internal function]: Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#31 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#32 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(726): Illuminate\\Pipeline\\Pipeline-\u003Ethen(Object(Closure))\n#33 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(699): Illuminate\\Routing\\Router-\u003ErunRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))\n#34 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(675): Illuminate\\Routing\\Router-\u003EdispatchToRoute(Object(Illuminate\\Http\\Request))\n#35 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php(246): Illuminate\\Routing\\Router-\u003Edispatch(Object(Illuminate\\Http\\Request))\n#36 [internal function]: Illuminate\\Foundation\\Http\\Kernel-\u003EIlluminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))\n#37 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#38 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/CheckForMaintenanceMode.php(44): Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#39 [internal function]: Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode-\u003Ehandle(Object(Illuminate\\Http\\Request), Object(Closure))\n#40 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(136): call_user_func_array(Array, Array)\n#41 [internal function]: Illuminate\\Pipeline\\Pipeline-\u003EIlluminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))\n#42 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#43 [internal function]: Illuminate\\Routing\\Pipeline-\u003EIlluminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))\n#44 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))\n#45 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php(132): Illuminate\\Pipeline\\Pipeline-\u003Ethen(Object(Closure))\n#46 \/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php(99): Illuminate\\Foundation\\Http\\Kernel-\u003EsendRequestThroughRouter(Object(Illuminate\\Http\\Request))\n#47 \/home\/fullerton\/application\/public\/index.php(53): Illuminate\\Foundation\\Http\\Kernel-\u003Ehandle(Object(Illuminate\\Http\\Request))\n#48 {main}","context":[],"level":400,"level_name":"ERROR","channel":"local","datetime":{"date":"2020-04-20 05:17:32.094965","timezone_type":3,"timezone":"UTC"},"extra":[]}]},{"file":"\/home\/fullerton\/application\/vendor\/monolog\/monolog\/src\/Monolog\/Logger.php","line":615,"function":"addRecord","class":"Monolog\\Logger","type":"-\u003E","args":[400,{},[]]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Log\/Writer.php","line":202,"function":"error","class":"Monolog\\Logger","type":"-\u003E","args":[{},[]]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Log\/Writer.php","line":113,"function":"writeLog","class":"Illuminate\\Log\\Writer","type":"-\u003E","args":["error",{},[]]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Exceptions\/Handler.php","line":57,"function":"error","class":"Illuminate\\Log\\Writer","type":"-\u003E","args":[{}]},{"file":"\/home\/fullerton\/application\/app\/Exceptions\/Handler.php","line":81,"function":"report","class":"Illuminate\\Foundation\\Exceptions\\Handler","type":"-\u003E","args":[{}]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php","line":78,"function":"report","class":"App\\Exceptions\\Handler","type":"-\u003E","args":[{}]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php","line":34,"function":"handleException","class":"Illuminate\\Routing\\Pipeline","type":"-\u003E","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}},{}]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Session\/Middleware\/StartSession.php","line":62,"function":"Illuminate\\Routing\\{closure}","class":"Illuminate\\Routing\\Pipeline","type":"-\u003E","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"function":"handle","class":"Illuminate\\Session\\Middleware\\StartSession","type":"-\u003E","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}},{}]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":136,"function":"call_user_func_array","args":[[{},"handle"],[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}},{}]]},{"function":"Illuminate\\Pipeline\\{closure}","class":"Illuminate\\Pipeline\\Pipeline","type":"-\u003E","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php","line":32,"function":"call_user_func","args":[{},{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Cookie\/Middleware\/AddQueuedCookiesToResponse.php","line":37,"function":"Illuminate\\Routing\\{closure}","class":"Illuminate\\Routing\\Pipeline","type":"-\u003E","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"function":"handle","class":"Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse","type":"-\u003E","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}},{}]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":136,"function":"call_user_func_array","args":[[{},"handle"],[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}},{}]]},{"function":"Illuminate\\Pipeline\\{closure}","class":"Illuminate\\Pipeline\\Pipeline","type":"-\u003E","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php","line":32,"function":"call_user_func","args":[{},{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Cookie\/Middleware\/EncryptCookies.php","line":59,"function":"Illuminate\\Routing\\{closure}","class":"Illuminate\\Routing\\Pipeline","type":"-\u003E","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"function":"handle","class":"Illuminate\\Cookie\\Middleware\\EncryptCookies","type":"-\u003E","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}},{}]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":136,"function":"call_user_func_array","args":[[{},"handle"],[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}},{}]]},{"function":"Illuminate\\Pipeline\\{closure}","class":"Illuminate\\Pipeline\\Pipeline","type":"-\u003E","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php","line":32,"function":"call_user_func","args":[{},{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"function":"Illuminate\\Routing\\{closure}","class":"Illuminate\\Routing\\Pipeline","type":"-\u003E","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":103,"function":"call_user_func","args":[{},{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php","line":726,"function":"then","class":"Illuminate\\Pipeline\\Pipeline","type":"-\u003E","args":[{}]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php","line":699,"function":"runRouteWithinStack","class":"Illuminate\\Routing\\Router","type":"-\u003E","args":[{},{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php","line":675,"function":"dispatchToRoute","class":"Illuminate\\Routing\\Router","type":"-\u003E","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php","line":246,"function":"dispatch","class":"Illuminate\\Routing\\Router","type":"-\u003E","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"function":"Illuminate\\Foundation\\Http\\{closure}","class":"Illuminate\\Foundation\\Http\\Kernel","type":"-\u003E","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php","line":52,"function":"call_user_func","args":[{},{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/CheckForMaintenanceMode.php","line":44,"function":"Illuminate\\Routing\\{closure}","class":"Illuminate\\Routing\\Pipeline","type":"-\u003E","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"function":"handle","class":"Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode","type":"-\u003E","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}},{}]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":136,"function":"call_user_func_array","args":[[{},"handle"],[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}},{}]]},{"function":"Illuminate\\Pipeline\\{closure}","class":"Illuminate\\Pipeline\\Pipeline","type":"-\u003E","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php","line":32,"function":"call_user_func","args":[{},{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"function":"Illuminate\\Routing\\{closure}","class":"Illuminate\\Routing\\Pipeline","type":"-\u003E","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":103,"function":"call_user_func","args":[{},{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php","line":132,"function":"then","class":"Illuminate\\Pipeline\\Pipeline","type":"-\u003E","args":[{}]},{"file":"\/home\/fullerton\/application\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php","line":99,"function":"sendRequestThroughRouter","class":"Illuminate\\Foundation\\Http\\Kernel","type":"-\u003E","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/fullerton\/application\/public\/index.php","line":53,"function":"handle","class":"Illuminate\\Foundation\\Http\\Kernel","type":"-\u003E","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]}]";
...\ No newline at end of file ...\ No newline at end of file
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 .password_alert {
3 padding: 12px;
4 background-color: #f44336;
5 color: white;
6 font-weight: bold;
7 font-size: 15px;
8 margin-bottom: 8px;
9 display: none;
10 }
11
12 .closebtn {
13 margin-left: 15px;
14 color: white;
15 font-weight: bold;
16 float: right;
17 font-size: 22px;
18 line-height: 20px;
19 cursor: pointer;
20 transition: 0.3s;
21 }
22
23 .closebtn:hover {
24 color: black;
25 }
26 </style>
27
28 <div class="layout-app">
29 <div class="row row-app margin-none">
30 <div class="col-md-2 col-sm-3 border-none">
31 <div class="col-separator box col-separator-first reset-components">
32 <?php echo $__env->make('layout.module.social.indexareaphoto', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
33 <div class="col-separator-h box"></div>
34 <ul class="list-group list-group-1 margin-none">
35 <!-- <li class="list-group-item active"><a href="#" onclick='menuAction("profile");return false;'><i class="fa fa-user"></i> Profile</a></li> -->
36 </ul>
37 <!-- <div class="col-separator-h box"></div> -->
38 </div>
39 </div>
40 <div class="col-md-10 col-sm-9">
41 <div class="col-separator box">
42
43 <div class="widget-body">
44 <div class="tab-content">
45 <div id="tabAccount" class="tab-pane active widget-body-regular padding-none border-none reset-components">
46 <div class="widget widget-tabs border-bottom-none">
47 <div class="widget-head">
48 <ul>
49
50 <li class="active profile_tab_menu"><a class="glyphicons edit" href="#account-details" data-toggle="tab"><i></i>Personal details</a></li>
51 <li class="profile_tab_menu"><a class="glyphicons settings" href="#account-settings" data-toggle="tab"><i></i>Account settings</a></li>
52 <li class="profile_tab_menu"><a class="glyphicons info" href="#account-promotional" onclick="" data-toggle="tab"><i></i>Feedbacks</a></li>
53 <li class="profile_tab_menu" id="change_password"><a class="glyphicons pencil" href="#account-contenttags" onclick="" data-toggle="tab"><i></i>Password</a></li>
54 </ul>
55 </div>
56 <div class="widget-body">
57 <form class="form-horizontal">
58 <div class="tab-content">
59
60 <div class="tab-pane" id="account-contenttags">
61 <form class="form-horizontal innerT " role="form">
62 <div class="password_alert">
63 <span class="closebtn" onclick="this.parentElement.style.display='none';">&times;</span>
64 <strong>Expiry!</strong> Please change your password.
65 </div>
66 <div class="form-group">
67 <label for="account_cpass" class="col-sm-2 control-label">Current Password</label>
68 <div class="col-sm-6">
69 <input type="password" class="form-control" id="account_cpass" placeholder="Type here">
70 </div>
71 </div>
72 <div class="form-group">
73 <label for="account_npass" class="col-sm-2 control-label">New Password</label>
74 <div class="col-sm-6">
75 <input type="password" class="form-control" id="account_npass" placeholder="Type here">
76 </div>
77 </div>
78
79 <div class="form-group">
80 <div class="col-sm-offset-2 col-sm-10">
81 <button type="button" id="account_savenpass" class="btn btn-primary" onclick='profileChangePassword();'>Save Changes <i class="fa fa-check"></i></button>
82 </div>
83 </div>
84 </form>
85
86
87 </div>
88
89 <div class="tab-pane active profile_tab_menu" id="account-details">
90 <div class="row">
91 <div class="col-md-6">
92 <div class="form-group margin-none innerB">
93 <label class="col-md-3 control-label">First name</label>
94 <div class="col-md-9">
95 <div class="input-group">
96 <input type="text" id="account_fname" value="<?php if(isset($data['personal']['fname'])) echo $data['personal']['fname']; ?>" class="form-control" />
97 <span class="input-group-addon" data-toggle="tooltip" data-container="body" data-placement="top" data-original-title="First name is mandatory"><i class="fa fa-question-circle"></i></span>
98 </div>
99 </div>
100 </div>
101 <div class="form-group margin-none innerB">
102 <label class="col-md-3 control-label">Last name</label>
103 <div class="col-md-9">
104 <div class="input-group">
105 <input type="text" id="account_lname" value="<?php if(isset($data['personal']['lname'])) echo $data['personal']['lname']; ?>" class="form-control" />
106 <span class="input-group-addon" data-toggle="tooltip" data-container="body" data-placement="top" data-original-title="Last name is mandatory"><i class="fa fa-question-circle"></i></span>
107 </div>
108 </div>
109 </div>
110 <div class="form-group margin-none innerB">
111 <label class="col-md-3 control-label">Date of birth</label>
112 <div class="col-md-9">
113 <div class="input-group">
114 <input type="text" id="account_dob" class="form-control datepicker_mn" value="<?php if(isset($data['personal']['dob'])) echo $data['personal']['dob']; ?>" />
115 <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
116 </div>
117 </div>
118 </div>
119
120
121
122 <div class="form-group margin-none innerB">
123 <label class="col-md-3 control-label">Gender</label>
124 <div class="col-md-9">
125 <select id="account_gender" class="form-control">
126 <option value='<?php if(isset($data['personal']['gender'])) echo $data['personal']['gender']; ?>'><?php if(isset($data['personal']['gender'])) echo $data['personal']['gender']; ?></option>
127 <option value='Male'>Male</option>
128 <option value='Female'>Female</option>
129 </select>
130 </div>
131 </div>
132 <div class="form-group margin-none innerB">
133 <label class="col-md-3 control-label">City</label>
134 <div class="col-md-9">
135 <input type="text" id="account_location" value="<?php if(isset($data['personal']['location'])) echo $data['personal']['location']; ?>" class="form-control" />
136 </div>
137 </div>
138 <div class="form-group margin-none innerB">
139 <label class="col-md-3 control-label">Location</label>
140 <div class="col-md-9">
141 <input type="text" id="account_sublocation" value="<?php if(isset($data['personal']['sublocation'])) echo $data['personal']['sublocation']; ?>" class="form-control" />
142 </div>
143 </div>
144 <div class="form-group margin-none innerB">
145 <label class="col-md-3 control-label">Country</label>
146 <div class="col-md-9">
147 <select id="account_country" class="form-control" >
148 <option value='<?php if(isset($data['personal']['country'])) echo $data['personal']['country']; ?>'><?php if(isset($data['personal']['country'])) echo $data['personal']['country']; ?></option>
149 <?php
150 $countries=array("Afganistan","Albania","Algeria","American Samoa","Andorra","Angola","Anguilla","Antigua &amp; Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bonaire","Bosnia &amp; Herzegovina","Botswana","Brazil","British Indian Ocean Ter","Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Canary Islands","Cape Verde","Cayman Islands","Central African Republic","Chad","Channel Islands","Chile","China","Christmas Island","Cocos Island","Colombia","Comoros","Congo","Cook Islands","Costa Rica","Cote DIvoire","Croatia","Cuba","Curaco","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","East Timor","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Falkland Islands","Faroe Islands","Fiji","Finland","France","French Guiana","French Polynesia","French Southern Ter","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Great Britain","Greece","Greenland","Grenada","Guadeloupe","Guam","Guatemala","Guinea","Guyana","Haiti","Hawaii","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Isle of Man","Israel","Italy","Jamaica","Japan","Jordan","Kazakhstan","Kenya","Kiribati","Korea North","Korea Sout","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macau","Macedonia","Madagascar","Malaysia","Malawi","Maldives","Mali","Malta","Marshall Islands","Martinique","Mauritania","Mauritius","Mayotte","Mexico","Midway Islands","Moldova","Monaco","Mongolia","Montserrat","Morocco","Mozambique","Myanmar","Nambia","Nauru","Nepal","Netherland Antilles","Netherlands","Nevis","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Niue","Norfolk Island","Norway","Oman","Pakistan","Palau Island","Palestine","Panama","Papua New Guinea","Paraguay","Peru","Phillipines","Pitcairn Island","Poland","Portugal","Puerto Rico","Qatar","Republic of Montenegro","Republic of Serbia","Reunion","Romania","Russia","Rwanda","St Barthelemy","St Eustatius","St Helena","St Kitts-Nevis","St Lucia","St Maarten","St Pierre &amp; Miquelon","St Vincent &amp; Grenadines","Saipan","Samoa","Samoa American","San Marino","Sao Tome &amp; Principe","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","Spain","Sri Lanka","Sudan","Suriname","Swaziland","Sweden","Switzerland","Syria","Tahiti","Taiwan","Tajikistan","Tanzania","Thailand","Togo","Tokelau","Tonga","Trinidad &amp; Tobago","Tunisia","Turkey","Turkmenistan","Turks &amp; Caicos Is","Tuvalu","Uganda","Ukraine","United Arab Erimates","United Kingdom","United States of America","Uraguay","Uzbekistan","Vanuatu","Vatican City State","Venezuela","Vietnam","Virgin Islands (Brit)","Virgin Islands (USA)","Wake Island","Wallis &amp; Futana Is","Yemen","Zaire","Zambia","Zimbabwe");
151 foreach($countries as $country)echo "<option value='$country'>$country</option>";
152 ?>
153 </select>
154 </div>
155 </div>
156
157 <input type=hidden id=mytheme value=layout>
158 <!-- <div class="form-group margin-none innerB">
159 <label class="col-md-3 control-label">Theme</label>
160 <div class="col-md-9">
161 <select id="mytheme" class="form-control">
162 <option value='<?php if(isset($data['mytheme'])) echo $data['mytheme']; else echo "layout";?>'><?php if(isset($data['mytheme']))if($data['mytheme']=='layout')echo "Flat";else echo "Squomorphic" ?></option>
163 <option value='layout'>Flat</option>
164 <option value='layout'>Squomorphic</option>
165 </select>
166 </div>
167 </div>-->
168
169
170 </div>
171 <div class="col-md-6">
172
173 <div class="form-group margin-none innerB">
174 <label class="col-md-3 control-label"></label><h4><?php echo Config::get("app.name"); ?> Details</h4><hr>
175 </div>
176
177 <div class="form-group margin-none innerB">
178 <label class="col-md-3 control-label">Email</label>
179 <div class="col-md-9">
180 <div class="input-group" style="padding-top: 8px;">
181 <b><?php echo $email; ?></b>
182 </div>
183 </div>
184 </div>
185 <div class="form-group margin-none innerB">
186 <label class="col-md-3 control-label">Date of Joining</label>
187 <div class="col-md-9">
188 <div class="input-group" style="padding-top: 8px;">
189 <b><?php if(isset($data['personal']['doj'])) echo $data['personal']['doj'];else echo "NA"; ?></b>
190 </div>
191 </div>
192 </div>
193 <div class="form-group margin-none innerB">
194 <label class="col-md-3 control-label">Employee Level</label>
195 <div class="col-md-9">
196 <div class="input-group" style="padding-top: 8px;">
197 <b><?php if(isset($data['personal']['level'])) echo $data['personal']['level'];else echo "NA"; ?></b>
198 </div>
199 </div>
200 </div>
201 <div class="form-group margin-none innerB">
202 <label class="col-md-3 control-label">Department</label>
203 <div class="col-md-9">
204 <div class="input-group" style="padding-top: 8px;">
205 <b><?php if(isset($data['personal']['department'])) echo $data['personal']['department'];else echo "NA"; ?></b>
206 </div>
207 </div>
208 </div>
209 <div class="form-group margin-none innerB">
210 <label class="col-md-3 control-label">Function</label>
211 <div class="col-md-9">
212 <div class="input-group" style="padding-top: 8px;">
213 <b><?php if(isset($data['personal']['function'])) echo $data['personal']['function'];else echo "NA"; ?></b>
214 </div>
215 </div>
216 </div>
217
218 <hr>
219 <div class="form-group margin-none innerB">
220 <label class="col-md-3 control-label">Supervisor</label>
221 <div class="col-md-9">
222 <div class="input-group" style="padding-top: 8px;">
223 <b><?php echo Auth::user()->supervisor; ?></b>
224 </div>
225 </div>
226 </div>
227 <div class="form-group margin-none innerB">
228 <label class="col-md-3 control-label">L-Team</label>
229 <div class="col-md-9">
230 <div class="input-group" style="padding-top: 8px;">
231 <b><?php echo Auth::user()->lteam." / ".Auth::user()->lteam2; ?></b>
232 </div>
233 </div>
234 </div>
235
236 <hr>
237 <div class="form-group margin-none innerB">
238 <label class="col-md-3 control-label">General Info</label>
239 <div class="col-md-9">
240 <div class="input-group" style="padding-top: 8px;">
241 <b>
242 <?php if(isset($data['personal']['entity'])) echo $data['personal']['entity'];else echo ""; ?>/
243 <?php if(isset($data['personal']['category'])) echo $data['personal']['category'];else echo ""; ?>/
244 <?php if(isset($data['personal']['section'])) echo $data['personal']['section'];else echo ""; ?>/
245 <?php if(isset($data['personal']['lob'])) echo $data['personal']['lob'];else echo ""; ?>
246 </b>
247 </div>
248 </div>
249 </div>
250
251 </div>
252 </div>
253 <div class="separator line bottom"></div>
254 <div class="widget row widget-heading-simple widget-body-gray">
255 <div class="widget-head"><h4 class="heading">About You</h4></div>
256 <div class="widget-body"><textarea id="account_aboutme" class="form-control" rows="5" placeholder='Write something about you'><?php if(isset($data['personal']['aboutme'])) echo $data['personal']['aboutme']; ?></textarea>
257 </div>
258 </div>
259
260 <div class="separator line bottom"></div>
261 <div class="widget row widget-heading-simple widget-body-gray">
262 <div class="widget-head"><h4 class="heading">Private Notes</h4></div>
263 <div class="widget-body"><textarea id="account_interests" class="form-control" rows="5" placeholder=''><?php if(isset($data['personal']['interests'])) echo $data['personal']['interests']; ?></textarea></div>
264 </div>
265 <div class="separator top">
266 <button type="button" onclick="profileUpdate();return false;" class="btn btn-primary"><i class="fa fa-fw fa-check-square-o"></i> Save changes</button>
267 <button type="button" id="account_cancelpersonal" class="btn btn-default"><i class="fa fa-fw fa-times"></i> Cancel</button>
268 </div>
269 </div>
270 <div class="tab-pane profile_tab_menu" id="account-settings">
271 <div class="row">
272 <div class="col-md-9">
273 <label for="inputUsername">Username</label>
274 <div class="input-group">
275 <input type="text" id="inputUsername" class="form-control" value="<?php echo $username; ?>" disabled="disabled" />
276 <span class="input-group-addon" data-toggle="tooltip" data-placement="top" data-container="body" data-original-title="Username can't be changed"><i class="fa fa-question-sign"></i></span>
277 </div>
278 </div>
279 <div class="separator line bottom"></div>
280 <div class="row">
281 <div class="col-md-3">
282 <strong>Contact details</strong>
283 <p class="muted">Contact details and settings.</p>
284 </div>
285 <div class="col-md-9">
286 <div class="row">
287 <div class="col-md-6">
288 <label for="account_phone">Phone</label>
289 <div class="input-group">
290 <span class="input-group-addon"><i class="fa fa-phone"></i></span>
291 <input type="text" value="<?php if(isset($data['personal']['phone'])) echo $data['personal']['phone']; ?>" id="account_phone" class="form-control" placeholder="01234567897" />
292 </div>
293 <div class="separator bottom"></div>
294 <label for="account_email">E-mail</label>
295 <div class="input-group">
296 <span class="input-group-addon"><i class="fa fa-envelope"></i></span>
297 <input type="text" value="<?php if(isset($data['personal']['email'])) echo $data['personal']['email']; ?>" id="account_email" class="form-control" placeholder="[email protected]" />
298 </div>
299 <div class="separator bottom"></div>
300 <label for="account_website">Website</label>
301 <div class="input-group">
302 <span class="input-group-addon"><i class="fa fa-link"></i></span>
303 <input type="text" value="<?php if(isset($data['personal']['website'])) echo $data['personal']['website']; ?>" id="account_website" class="form-control" placeholder="http://www.website.com" />
304 </div>
305 <div class="separator bottom"></div>
306 </div>
307 <div class="col-md-6">
308 <label for="account_facebook">Facebook</label>
309 <div class="input-group">
310 <span class="input-group-addon"><i class="fa fa-facebook"></i></span>
311 <input type="text" value="<?php if(isset($data['personal']['facebook'])) echo $data['personal']['facebook']; ?>" id="account_facebook" class="form-control" placeholder="facebook id" />
312 </div>
313 <div class="separator bottom"></div>
314 <label for="account_twitter">Twitter</label>
315 <div class="input-group">
316 <span class="input-group-addon"><i class="fa fa-twitter"></i></span>
317 <input type="text" value="<?php if(isset($data['personal']['twitter'])) echo $data['personal']['twitter']; ?>" id="account_twitter" class="form-control" placeholder="twitter handle" />
318 </div>
319 <div class="separator bottom"></div>
320 <label for="account_skype">Skype ID</label>
321 <div class="input-group">
322 <span class="input-group-addon"><i class="fa fa-skype"></i></span>
323 <input type="text" value="<?php if(isset($data['personal']['skype'])) echo $data['personal']['skype']; ?>" id="account_skype" class="form-control" placeholder="mySkypeID" />
324 </div>
325 <div class="separator bottom"></div>
326 <label for="account_google">Google</label>
327 <div class="input-group">
328 <span class="input-group-addon"><i class="fa fa-google-plus"></i></span>
329 <input type="text" value="<?php if(isset($data['personal']['google'])) echo $data['personal']['google']; ?>" id="account_google" class="form-control" placeholder="google ID" />
330 </div>
331 <div class="separator bottom"></div>
332 </div>
333 </div>
334 </div>
335 </div>
336 <div class="form-actions" style="margin: 0;">
337 <button type="button" onclick="profileUpdate();return false;" class="btn btn-primary"><i class="fa fa-fw fa-check-square-o"></i> Save changes</button>
338 </div>
339 </div>
340 </div>
341 </form>
342 <div class="tab-pane profile_tab_menu" id="account-promotional">
343
344 <?php
345 use App\Jobs\KHRMSLib;
346 $wakka=new KHRMSLib();
347 ?>
348 <h2>Admin Feedbacks</h2>
349 <div style='width:100%;max-height:300px;overflow:auto'>
350 <?php
351 if(is_array($wakka->GetBBBUserData("userfeedbacks")))
352 {
353 $userfeedbacks=array_reverse($wakka->GetBBBUserData("userfeedbacks"));
354 foreach($userfeedbacks as $feedback)
355 {
356 echo "<p><b>[".$feedback['datetime']."] ".$feedback['user']."</b><br>".$feedback['data']."<hr style='margin:3px'></p>";
357 }
358 }
359 ?>
360 </div>
361
362
363 <div id="promotional-gallery" class="col-sm-7">
364 </div>
365
366 <!--
367 <div id="promotional-upload-form" class="col-sm-5">
368 <div class="widget row widget-heading-simple widget-body-white">
369 <div class="widget-head">
370 <h4 class="heading">Link External Videos( Youtube or Vimeo only )</h4>
371 </div>
372 <div style="border: 1px solid #EFEFEF;">
373 <div class="widget-body">
374 <div class="input-group">
375 <input id="ext_upl_link" class="form-control" type="text" placeholder="Paste link here...">
376 <div class="input-group-btn">
377 <button class="btn btn-default" type="button" onclick="upload_ext_promo($('#ext_upl_link').val());"><i class="fa fa-link"></i> Link</button>
378 </div>
379 </div>
380 </div>
381 </div>
382 </div>
383 <div class="separator bottom" /> <div class="separator bottom" />
384 <a href="#modal_promotional" data-toggle="modal" class="btn btn-primary pull-right">
385 <i class="fa fa-2x fa-cloud-upload"></i><span style="font-size:14px;font-weight:600;"> Upload From Disk</span>
386 </a>
387 </div>
388
389 </div>
390 -->
391 </div>
392
393 </div>
394 </div>
395 </div>
396 <!--<div id="tabPassword" class="tab-pane innerAll">
397 <h4 class="innerTB">Change your Password</h4>
398 <form class="form-horizontal innerT " role="form">
399 <div class="form-group">
400 <label for="account_cpass" class="col-sm-2 control-label">Current Password</label>
401 <div class="col-sm-6">
402 <input type="password" class="form-control" id="account_cpass" placeholder="Type here">
403 </div>
404 </div>
405 <div class="form-group">
406 <label for="account_npass" class="col-sm-2 control-label">New Password</label>
407 <div class="col-sm-6">
408 <input type="password" class="form-control" id="account_npass" placeholder="Type here">
409 </div>
410 </div>
411
412 <div class="form-group">
413 <div class="col-sm-offset-2 col-sm-10">
414 <button type="button" id="account_savenpass" class="btn btn-primary" onclick='editPasswdForm();return false;'>Save Changes <i class="fa fa-check"></i></button>
415 </div>
416 </div>
417 </form>
418 <script>
419 function editPasswdForm()
420 {
421 var putdata="stype=edit_passwd";
422 putdata+="&account_cpass="+$("#account_cpass").val();
423 putdata+="&account_npass="+$("#account_npass").val();
424
425 doAjax('profile',putdata,'','ajax_profile_update','singlefail','POST');
426 }
427
428 </script>
429 </div>-->
430 </div>
431 </div>
432 </div>
433 </div>
434 </div>
435
436 </div>
437
438
439
440 </div>
441 </div>
442
443 </div>
444 </div>
445 </div>
446 </div>
447 </div>
448
449
450 <script type="text/javascript">
451
452
453 function profileUpdate()
454 {
455 var data = new Array();
456 var key;
457 data["account_aboutme"] = encodeURIComponent($("#account_aboutme").val());
458 data["account_dob"] = $("#account_dob").val();
459 data["account_email"] = $("#account_email").val();
460 data["account_facebook"] = $("#account_facebook").val();
461 data["account_fname"] = $("#account_fname").val();
462 data["account_gender"] = $("#account_gender").val();
463 data["account_google"] = $("#account_google").val();
464 data["account_lname"] = $("#account_lname").val();
465 data["account_location"] = $("#account_location").val();
466 data["account_sublocation"] = $("#account_sublocation").val();
467 data["account_country"] = $("#account_country").val();
468 data["account_phone"] = $("#account_phone").val();
469 data["account_skype"] = $("#account_skype").val();
470 data["account_twitter"] = $("#account_twitter").val();
471 data["account_website"] = $("#account_website").val();
472 data["account_interests"] = encodeURIComponent($("#account_interests").val());
473 data["mytheme"]=$("#mytheme").val();
474 var varstr = "stype=saveaccount_info";
475 for(key in data)
476 {
477 varstr+= "&"+key+"="+data[key];
478 }
479 doAjax('profile',varstr,'','ajax_profile_update','singlefail','POST');
480 }
481
482
483 <?php if(isset($displaymsg)): ?>
484 simpleNotification("<?php echo $displaymsg['type']; ?>","topRight","<?php echo $displaymsg['text']; ?>");
485 <?php endif; ?>
486
487 function profileChangePassword()
488 {
489 var putdata="stype=password_update&";
490 putdata+="&password="+$("#account_npass").val();
491 putdata+="&oldpassword="+$("#account_cpass").val();
492
493 doAjax('profile',putdata,'','ajax_profile_update','singlefail','POST');
494 }
495
496 redirect_to_password_expiry_check();
497
498 function redirect_to_password_expiry_check()
499 {
500 var action = "password_expiry_check";
501 $.ajax({
502 type: "GET",
503 url: action,
504 success: function(result)
505 {
506 if (result=='True') {
507 password_tab();
508 }
509 }
510 });
511 }
512 function password_tab()
513 {
514 $('.profile_tab_menu').removeClass('active');
515 $('#change_password').addClass('active');
516 $('#account-contenttags').addClass('active');
517 $('.password_alert').css("display", "block");
518 }
519 </script>
520
521
522 <iframe name=fileupload_social id=fileupload_social style='height:0px;width:0px;overflow:none' src='about:blank'></iframe>
1 <?php
2 use App\Jobs\KHRMSLib;
3 $wakka = new KHRMSLib();
4
5 $userdata = $wakka->loadAllDBUsers($tuser->username);
6 $clientslist = $wakka->GetExBBBUserData($userdata["name"], "clientslist");
7 $clientsownerlist = $wakka->GetExBBBUserData($userdata["name"], "clientsownerlist");
8 $roclientsownerlist = $wakka->GetExBBBUserData($userdata["name"], "roclientsownerlist");
9 $accclientsownerlist = $wakka->GetExBBBUserData($userdata["name"], "accclientsownerlist");
10 $recclientsownerlist = $wakka->GetExBBBUserData($userdata["name"], "recclientsownerlist");
11 $bdmclientsownerlist = $wakka->GetExBBBUserData($userdata["name"], "bdmclientsownerlist");
12 $readotherdata = $wakka->GetExBBBUserData($userdata["name"], "readotherdata");
13
14 if (Input::get('feedbacktxt') != '') {
15 $feedbacks = $wakka->GetExBBBUserData($tuser->username, "userfeedbacks");
16 $feedbacks[] = array("datetime" => date("Y-m-d H:i"), "user" => $wakka->GetUserName(), "data" => Input::get('feedbacktxt'));
17 $wakka->SetExBBBUserData($tuser->username, "userfeedbacks", $feedbacks);
18 $result = $wakka->createMailQueue("System", array($wakka->GetExBBBUserData($tuser->username, "email")), "Innovation : User Feedback Added", "Hi,<br><br>\n\n" . $wakka->GetUserName() . " has added a new User Feedback for you, You may check the same in your Profile.");
19 }
20
21 $role = $tuser->role();
22 $data = $tuser->data();
23 if (empty($data['personal'])) {
24 $data['personal'] = array();
25 }
26
27 if (empty($data['personal']['fname'])) {
28 $data['personal']['fname'] = "";
29 }
30
31 if (empty($data['personal']['lname'])) {
32 $data['personal']['lname'] = "";
33 }
34
35 ?>
36
37
38 <!-- Heading -->
39 <h5 class="innerAll margin-none bg-primary">
40 <i class="fa fa-fw fa-pencil"></i> Edit User
41 <a href="#" class="btn btn-sm btn-inverse pull-right btn-xs" style="margin-top: -5px;" onclick="return false">
42 <i class="fa fa-user fa-fw"></i>
43 <?php echo $tuser->dispname(); ?>
44
45 </a>
46 </h5>
47
48
49
50 <?php
51 $title = $tuser->dispname();
52 $url = "";
53 // $desc=substr(strip_tags($tuser->dataval2('personal','aboutme')),0,50);
54 $imageurl = array(Auth::user()->fetchphotothumb($tuser->id));
55 $interests = array_unique(array_filter(explode(",", $tuser->dataval2('personal', 'interestcategories'))));
56 ?>
57
58 <div class="media innerAll">
59 <div class=pull-right>
60 <button class="pull-right btn btn-primary btn-stroke btn-xs" onclick='dbhashlink("#p-<?php echo $tuser->id; ?>")'><i class="fa fa-arrow-right"></i></button><div style='clear:both;margin-bottom:7px'></div>
61 <button class="pull-right btn btn-primary btn-xs" onclick='dashboardfollow(<?php echo $tuser->id; ?>)'> Follow </button>
62 </div>
63 <img src="<?php echo $imageurl[0]; ?>" alt="" width="35" class="pull-left thumb">
64 <div class="media-body">
65 <h5 class="media-heading strong"><?php echo $title; ?></h5>
66 <ul class="list-unstyled text-faded">
67 <li><i class="fa fa-gear"></i> <?php echo $tuser->usertype; ?> <?php echo $tuser->dataval2('personal','location'); ?> - <?php echo $tuser->dataval2('personal','country'); ?></li>
68 <li><?php if (!empty($interests)) {
69 foreach ($interests as $interest) {?><span class="badge badge-primary"><small><?php echo $interest; ?></small></span><?php }
70 }
71 ?></li>
72 </ul>
73 </div>
74 </div>
75 <div class="col-separator-h box"></div>
76
77 <form class="innerAll">
78 <fieldset>
79 <div class="control-group">
80 <label class="col-md-4 control-label" for="username">Username</label>
81 <div class="col-md-8 controls">
82 <input class="form-control" id="username" type="text" value="<?php echo $tuser->username; ?>" disabled=disabled />
83 </div>
84 </div>
85 <div class="control-group">
86 <label class="col-md-4 control-label" for="password">Password</label>
87 <div class="col-md-8 controls">
88 <input class="form-control" id="password" type="password" value="" placeholder=unchanged />
89 </div>
90 </div>
91
92 <div class="control-group">
93 <label class="col-md-4 control-label" for="username">Full Name</label>
94 <div class="col-md-8 controls">
95 <input class="form-control" id="fullname" type="text" value="<?php echo $data['personal']['fname']; ?> <?php echo $data['personal']['lname']; ?>" required=required />
96 </div>
97 </div>
98 <div class="control-group">
99 <label class="col-md-4 control-label" for="email">Email</label>
100 <div class="col-md-8 controls">
101 <input class="form-control" id="email" type="email" value="<?php echo $tuser->email; ?>" required=required />
102 </div>
103 </div>
104 <div class="control-group">
105 <label class="col-md-4 control-label" for="userstatus">Status</label>
106 <div class="col-md-8 controls">
107 <select id="userstatus" required=required class=form-control>
108 <option value="<?php echo $tuser->status; ?>"><?php echo $tuser->status; ?></option>
109 <option value="Active">Active</option>
110 <option value="Disabled">Disabled</option>
111 <option value="Unverified">Unverified</option>
112 <option value="Blocked">Blocked</option>
113 </select>
114 </div>
115 </div>
116
117 <!-- <div class="control-group">
118 <label class="col-md-4 control-label" for="organization">Organization</label>
119 <div class="col-md-8 controls">
120 <select id="organization" required=required class=form-control>
121 <option value="<?php echo $tuser->organization; ?>" selected><?php echo $tuser->organization; ?></option>
122 <?php foreach(Auth::user()->getAccessList("group",true,false,false,true) as $tgrp): ?>
123 <option value="<?php echo $tgrp; ?>"><?php echo $tgrp; ?></option>
124 <?php endforeach; ?>
125 </select>
126 </div>
127 </div>-->
128 <div class="control-group">
129 <label class="col-md-4 control-label" for="organization">User Type</label>
130 <div class="col-md-8 controls">
131 <select id="usertype" required=required class="form-control">
132 <option value="<?php echo $tuser->usertype; ?>"><?php echo $tuser->usertype; ?></option>
133 <?php
134 $roles = \App\Models\Role::where('status', '=', 'Active')->get();
135 foreach ($roles as $trole) {
136 echo "<option value='" . $trole->rolename . "'>" . $trole->rolename . "</option>";
137 }
138
139 ?>
140 </select>
141 </div>
142 </div>
143
144
145 <div class="control-group">
146 <label class="col-md-4 control-label" for="usergroup">Group</label>
147 <div class="col-md-8 controls">
148 <select id="usergroup" required=required class=form-control>
149 <option value="<?php echo $tuser->group; ?>" selected><?php echo $tuser->group; ?></option>
150 <?php foreach(Auth::user()->getAccessList("group",true,false,false,true) as $tgrp): ?>
151 <option value="<?php echo $tgrp; ?>"><?php echo $tgrp; ?></option>
152 <?php endforeach; ?>
153 </select>
154 </div>
155 </div>
156
157 <!-- <div class="control-group">
158 <label class="col-md-4 control-label" for="usergroup">Chat/Voice Enabled</label>
159 <div class="col-md-8 controls">
160 <select id="uservoice" required=required class=form-control>
161 <option value="<?php echo $data['uservoice']; ?>" selected><?php echo $data['uservoice']; ?></option>
162 <option value="Active">Active</option>
163 <option value="InActive">InActive</option>
164 </select>
165 </div>
166 </div>-->
167
168 <hr><h2 style='padding-left:10%'>Modules Access</h2>
169
170 <div class="control-group">
171 <label class="col-md-4 control-label" for="">Read+Write+Admin</label>
172 <div class="col-md-8 controls">
173 <?php foreach (Config::get('app.app_modules') as $tmod => $tmodarr) {
174 if (strstr("," . $role->modulerwa . ",", ",$tmod,")) {
175 echo $tmod . ", ";
176 }
177 }
178
179 ?>
180 </div>
181 </div><div style='clear:both'></div>
182 <div class="control-group">
183 <label class="col-md-4 control-label" for="modulerw">Read+Write</label>
184 <div class="col-md-8 controls">
185 <?php foreach (Config::get('app.app_modules') as $tmod => $tmodarr) {
186 if (strstr("," . $role->modulerw . ",", ",$tmod,")) {
187 echo $tmod . ", ";
188 }
189 }
190
191 ?>
192 </div>
193 </div><div style='clear:both'></div>
194 <div class="control-group">
195 <label class="col-md-4 control-label" for="moduler">Read</label>
196 <div class="col-md-8 controls">
197 <?php foreach (Config::get('app.app_modules') as $tmod => $tmodarr) {
198 if (strstr("," . $role->moduler . ",", ",$tmod,")) {
199 echo $tmod . ", ";
200 }
201 }
202
203 ?>
204 </div>
205 </div><div style='clear:both'></div>
206
207
208
209 <hr><h2 style='padding-left:10%'>Groups Access</h2>
210 <div class="control-group">
211 <label class="col-md-4 control-label" for="grouprwa">Read+Write+Admin</label>
212 <div class="col-md-8 controls">
213 <?php foreach (Config::get('app.app_groups') as $tmod) {
214 if (strstr("," . $role->grouprwa . ",", ",$tmod,")) {
215 echo $tmod . ", ";
216 }
217 }
218
219 ?>
220 </div>
221 </div><div style='clear:both'></div>
222 <div class="control-group">
223 <label class="col-md-4 control-label" for="grouprw">Read+Write</label>
224 <div class="col-md-8 controls">
225 <?php foreach (Config::get('app.app_groups') as $tmod) {
226 if (strstr("," . $role->grouprw . ",", ",$tmod,")) {
227 echo $tmod . ", ";
228 }
229 }
230
231 ?>
232 </div>
233 </div><div style='clear:both'></div>
234 <div class="control-group">
235 <label class="col-md-4 control-label" for="groupr">Read</label>
236 <div class="col-md-8 controls">
237 <?php foreach (Config::get('app.app_groups') as $tmod) {
238 if (strstr("," . $role->groupr . ",", ",$tmod,")) {
239 echo $tmod . ", ";
240 }
241 }
242
243 ?>
244 </div>
245 </div>
246
247
248 <div style='clear:both'></div>
249 <hr style='margin-bottom:20px'>
250
251 <div class="control-group">
252 <label class="col-md-4 control-label" for="groupr">Edit Client List</label>
253 <div class="col-md-8 controls">
254 <select id="clientslist" multiple="" data-rel="chosen" style='width:100%' class=select2multi>
255 <?php
256 $companyarr = $wakka->LoadAll("select * from hrms_masters where mtype='company'");
257 foreach ($companyarr as $tcompany) {
258 $seltxt = '';
259 if (strstr("," . $clientslist . ",", ",$tcompany[mkey],")) {
260 $seltxt = 'selected="selected"';
261 }
262
263 echo "<option value='$tcompany[mkey]' $seltxt>$tcompany[mkey]</option>";
264 }
265 ?>
266 </select>
267 </div>
268 </div>
269 <div class="control-group">
270 <label class="col-md-4 control-label" for="groupr">Owner Client List</label>
271 <div class="col-md-8 controls">
272 <select id="clientsownerlist" multiple="" data-rel="chosen" style='width:100%' class=select2multi>
273 <?php
274 $companyarr = $wakka->LoadAll("select * from hrms_masters where mtype='company'");
275 foreach ($companyarr as $tcompany) {
276 $seltxt = '';
277 if (strstr("," . $clientsownerlist . ",", ",$tcompany[mkey],")) {
278 $seltxt = 'selected="selected"';
279 }
280
281 echo "<option value='$tcompany[mkey]' $seltxt>$tcompany[mkey]</option>";
282 }
283 ?>
284 </select>
285 </div>
286 </div>
287 <div class="control-group">
288 <label class="col-md-4 control-label" for="groupr">Readonly Client List</label>
289 <div class="col-md-8 controls">
290 <select id="roclientsownerlist" multiple="" data-rel="chosen" style='width:100%' class=select2multi>
291 <?php
292 $companyarr = $wakka->LoadAll("select * from hrms_masters where mtype='company'");
293 foreach ($companyarr as $tcompany) {
294 $seltxt = '';
295 if (strstr("," . $roclientsownerlist . ",", ",$tcompany[mkey],")) {
296 $seltxt = 'selected="selected"';
297 }
298
299 echo "<option value='$tcompany[mkey]' $seltxt>$tcompany[mkey]</option>";
300 }
301 ?>
302 </select>
303 </div>
304 </div>
305 <div class="control-group">
306 <label class="col-md-4 control-label" for="groupr">Read Other Data</label>
307 <div class="col-md-8 controls">
308 <select id="readotherdata" multiple="" data-rel="chosen" style='width:100%' class=select2multi>
309 <option value="Yes" <?php if ($readotherdata == 'Yes') {
310 echo 'selected=selected';
311 }
312 ?> >Yes</option>
313 <option value="No" <?php if ($readotherdata == 'No') {
314 echo 'selected=selected';
315 }
316 ?> >No</option>
317 </select>
318 </div>
319 </div>
320 <div class="control-group">
321 <label class="col-md-4 control-label" for="groupr">Account Owner</label>
322 <div class="col-md-8 controls">
323 <select id="accclientsownerlist" multiple="" data-rel="chosen" style='width:100%' class=select2multi>
324 <?php
325 $companyarr = $wakka->LoadAll("select * from hrms_masters where mtype='company'");
326 foreach ($companyarr as $tcompany) {
327 $seltxt = '';
328 if (strstr("," . $accclientsownerlist . ",", ",$tcompany[mkey],")) {
329 $seltxt = 'selected="selected"';
330 }
331
332 echo "<option value='$tcompany[mkey]' $seltxt>$tcompany[mkey]</option>";
333 }
334 ?>
335 </select>
336 </div>
337 </div>
338 <div class="control-group">
339 <label class="col-md-4 control-label" for="groupr">Recruitment Owner</label>
340 <div class="col-md-8 controls">
341 <select id="recclientsownerlist" multiple="" data-rel="chosen" style='width:100%' class=select2multi>
342 <?php
343 $companyarr = $wakka->LoadAll("select * from hrms_masters where mtype='company'");
344 foreach ($companyarr as $tcompany) {
345 $seltxt = '';
346 if (strstr("," . $recclientsownerlist . ",", ",$tcompany[mkey],")) {
347 $seltxt = 'selected="selected"';
348 }
349
350 echo "<option value='$tcompany[mkey]' $seltxt>$tcompany[mkey]</option>";
351 }
352 ?>
353 </select>
354 </div>
355 </div>
356 <div class="control-group">
357 <label class="col-md-4 control-label" for="groupr">BDM Owner</label>
358 <div class="col-md-8 controls">
359 <select id="bdmclientsownerlist" multiple="" data-rel="chosen" style='width:100%' class=select2multi>
360 <?php
361 $companyarr = $wakka->LoadAll("select * from hrms_masters where mtype='company'");
362 foreach ($companyarr as $tcompany) {
363 $seltxt = '';
364 if (strstr("," . $bdmclientsownerlist . ",", ",$tcompany[mkey],")) {
365 $seltxt = 'selected="selected"';
366 }
367
368 echo "<option value='$tcompany[mkey]' $seltxt>$tcompany[mkey]</option>";
369 }
370 ?>
371 </select>
372 </div>
373 </div>
374
375 <div style='clear:both'></div>
376 <br><hr><br>
377
378
379
380 <div class="control-group">
381 <label class="col-md-4 control-label" for="username">L-Team</label>
382 <div class="col-md-8 controls">
383 <input class="form-control" id="lteam" type="text" value="<?php echo $tuser->lteam; ?>" />
384 </div>
385 </div>
386 <div class="control-group">
387 <label class="col-md-4 control-label" for="username">One Down L-Team</label>
388 <div class="col-md-8 controls">
389 <input class="form-control" id="lteam2" type="text" value="<?php echo $tuser->lteam2; ?>" />
390 </div>
391 </div>
392 <div class="control-group">
393 <label class="col-md-4 control-label" for="username">Supervisor</label>
394 <div class="col-md-8 controls">
395 <input class="form-control" id="supervisor" type="text" value="<?php echo $tuser->supervisor; ?>" />
396 </div>
397 </div>
398
399 <div style='clear:both'></div>
400 <br><hr><br>
401
402 <?php
403 if (!isset($data['personal']['doj'])) {
404 $data['personal']['doj'] = '';
405 }
406
407 if (!isset($data['personal']['level'])) {
408 $data['personal']['level'] = '';
409 }
410
411 if (!isset($data['personal']['department'])) {
412 $data['personal']['department'] = '';
413 }
414
415 if (!isset($data['personal']['function'])) {
416 $data['personal']['function'] = '';
417 }
418
419 if (!isset($data['personal']['domainid'])) {
420 $data['personal']['domainid'] = '';
421 }
422
423 if (!isset($data['personal']['entity'])) {
424 $data['personal']['entity'] = '';
425 }
426
427 if (!isset($data['personal']['category'])) {
428 $data['personal']['category'] = '';
429 }
430
431 if (!isset($data['personal']['country'])) {
432 $data['personal']['country'] = '';
433 }
434
435 if (!isset($data['personal']['location'])) {
436 $data['personal']['location'] = '';
437 }
438
439 if (!isset($data['personal']['sublocation'])) {
440 $data['personal']['sublocation'] = '';
441 }
442
443 if (!isset($data['personal']['section'])) {
444 $data['personal']['section'] = '';
445 }
446
447 if (!isset($data['personal']['lob'])) {
448 $data['personal']['lob'] = '';
449 }
450
451 if (!isset($data['personal']['gender'])) {
452 $data['personal']['gender'] = '';
453 }
454
455 if (!isset($data['subscriptioncredits'])) {
456 $data['subscriptioncredits'] = '';
457 }
458
459 ?>
460 <div class="control-group">
461 <label class="col-md-4 control-label" for="username">DOJ</label>
462 <div class="col-md-8 controls">
463 <input class="form-control" id="doj" type="text" value="<?php echo $data['personal']['doj']; ?>" />
464 </div>
465 </div>
466 <div class="control-group">
467 <label class="col-md-4 control-label" for="username">Level</label>
468 <div class="col-md-8 controls">
469 <input class="form-control" id="level" type="text" value="<?php echo $data['personal']['level']; ?>" />
470 </div>
471 </div>
472 <div class="control-group">
473 <label class="col-md-4 control-label" for="username">Department</label>
474 <div class="col-md-8 controls">
475 <input class="form-control" id="department" type="text" value="<?php echo $data['personal']['department']; ?>" />
476 </div>
477 </div>
478 <div class="control-group">
479 <label class="col-md-4 control-label" for="username">Function</label>
480 <div class="col-md-8 controls">
481 <input class="form-control" id="function" type="text" value="<?php echo $data['personal']['function']; ?>" />
482 </div>
483 </div>
484 <div class="control-group">
485 <label class="col-md-4 control-label" for="username">Domain ID</label>
486 <div class="col-md-8 controls">
487 <input class="form-control" id="domainid" type="text" value="<?php echo $data['personal']['domainid']; ?>" />
488 </div>
489 </div>
490 <div class="control-group">
491 <label class="col-md-4 control-label" for="username">Entity</label>
492 <div class="col-md-8 controls">
493 <input class="form-control" id="entity" type="text" value="<?php echo $data['personal']['entity']; ?>" />
494 </div>
495 </div>
496 <div class="control-group">
497 <label class="col-md-4 control-label" for="username">Category</label>
498 <div class="col-md-8 controls">
499 <input class="form-control" id="category" type="text" value="<?php echo $data['personal']['category']; ?>" />
500 </div>
501 </div>
502 <div class="control-group">
503 <label class="col-md-4 control-label" for="username">Country</label>
504 <div class="col-md-8 controls">
505 <input class="form-control" id="country" type="text" value="<?php echo $data['personal']['country']; ?>" />
506 </div>
507 </div>
508 <div class="control-group">
509 <label class="col-md-4 control-label" for="username">Location</label>
510 <div class="col-md-8 controls">
511 <input class="form-control" id="location" type="text" value="<?php echo $data['personal']['location']; ?>" />
512 </div>
513 </div>
514 <div class="control-group">
515 <label class="col-md-4 control-label" for="username">Sub Location</label>
516 <div class="col-md-8 controls">
517 <input class="form-control" id="sublocation" type="text" value="<?php echo $data['personal']['sublocation']; ?>" />
518 </div>
519 </div>
520 <div class="control-group">
521 <label class="col-md-4 control-label" for="username">Extension</label>
522 <div class="col-md-8 controls">
523 <input class="form-control" id="exten" type="text" value="<?php echo $tuser->exten; ?>" />
524 </div>
525 </div>
526 <div class="control-group">
527 <label class="col-md-4 control-label" for="username">MAgent Number</label>
528 <div class="col-md-8 controls">
529 <input class="form-control" id="phone" type="text" value="<?php echo $tuser->phone; ?>" />
530 </div>
531 </div>
532
533 <?php /*?>
534 <div class="control-group">
535 <label class="col-md-4 control-label" for="username">MAgent Campaign</label>
536 <div class="col-md-8 controls">
537 <input class="form-control" id="campaign" type="text" value="{!!$tuser->campaign!!}" />
538 </div>
539 </div>
540 <?php */?>
541
542 <div class="control-group">
543 <label class="col-md-4 control-label" for="sessiontype">Login Type</label>
544 <div class="col-md-8 controls">
545 <select id="sessiontype" name="sessiontype" data-rel="chosen" style='width:100%' class=select2multi>
546 <option value='0' <?php echo ($tuser->sessiontype == '0') ? 'selected="selected"' : '' ?>>WebRTC</option>
547 <option value='1' <?php echo ($tuser->sessiontype == '1') ? 'selected="selected"' : '' ?>>PSTNWeb</option>
548 <?php /*?>
549 <option value='2' <?php echo ($tuser->sessiontype == '2') ? 'selected="selected"' : '' ?>>MAgent Missed Call</option>
550 <option value='3' <?php echo ($tuser->sessiontype == '3') ? 'selected="selected"' : '' ?>>MAgent Outbound</option>
551 <?php */?>
552 </select>
553 </div>
554 </div>
555
556 <div class="control-group">
557 <label class="col-md-4 control-label" for="username">Section</label>
558 <div class="col-md-8 controls">
559 <input class="form-control" id="section" type="text" value="<?php echo $data['personal']['section']; ?>" />
560 </div>
561 </div>
562 <div class="control-group">
563 <label class="col-md-4 control-label" for="username">LOB</label>
564 <div class="col-md-8 controls">
565 <input class="form-control" id="lob" type="text" value="<?php echo $data['personal']['lob']; ?>" />
566 </div>
567 </div>
568 <div class="control-group">
569 <label class="col-md-4 control-label" for="username">Gender</label>
570 <div class="col-md-8 controls">
571 <input class="form-control" id="gender" type="text" value="<?php echo $data['personal']['gender']; ?>" />
572 </div>
573 </div>
574 <div class="control-group">
575 <label class="col-md-4 control-label" for="username">Credits</label>
576 <div class="col-md-8 controls">
577 <input class="form-control" id="subscriptioncredits" type="text" value="<?php echo $data['subscriptioncredits']; ?>" />
578 </div>
579 </div>
580
581 <div class="form-actions">
582 <button type="submit" class="btn btn-primary" onclick='editUserForm();return false;'>Save changes</button>
583 </div>
584 </fieldset>
585 </form>
586
587 <div class="col-separator-h box"></div>
588 <div class=innerAll>
589 <form method=post enctype="multipart/form-data" target="userfilepost" action="user">
590 <input type=hidden name=user value='<?php echo $tuser->id; ?>' />
591 <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>" />
592 <input type="hidden" name="action" value="userbusyfile" />
593 <div class="control-group">
594 <label class="col-md-4 control-label" for="">Busy Message <span></span></label>
595 <div class="col-md-8 controls">
596 <input class="form-control" name="busyfile" type="file" value="" />
597 </div>
598 </div>
599 <div class="form-actions">
600 <button type="submit" class="btn btn-primary">Save File</button>
601 </div>
602 </form>
603 <iframe name=userfilepost id=userfilepost style='height:0px;width:0px;overflow:none;display:none' src='about:blank'></iframe>
604 </div>
605
606 <script>
607 <?php if(isset($displaymsg)): ?>
608 simpleNotification("<?php echo $displaymsg['type']; ?>","topRight","<?php echo $displaymsg['text']; ?>");
609 <?php endif; ?>
610 function editUserForm()
611 {
612 var putdata="csrftoken=<?php echo Session::token(); ?>";
613 putdata+="&username="+$("#username").val();
614 putdata+="&password="+$("#password").val();
615 putdata+="&fullname="+$("#fullname").val();
616
617 putdata+="&usertype="+$("#usertype").val();
618
619 putdata+="&email="+$("#email").val();
620 putdata+="&userstatus="+$("#userstatus").val();
621 // putdata+="&organization="+$("#organization").val();
622 putdata+="&usergroup="+$("#usergroup").val();
623 putdata+="&uservoice=";//+$("#uservoice").val();
624
625
626 putdata+="&modulerwa="+$("#modulerwa").val();
627 putdata+="&modulerw="+$("#modulerw").val();
628 putdata+="&moduler="+$("#moduler").val();
629
630 putdata+="&grouprwa="+$("#grouprwa").val();
631 putdata+="&grouprw="+$("#grouprw").val();
632 putdata+="&groupr="+$("#groupr").val();
633
634
635
636 putdata+="&clientslist="+$("#clientslist").val();
637 putdata+="&clientsownerlist="+$("#clientsownerlist").val();
638 putdata+="&roclientsownerlist="+$("#roclientsownerlist").val();
639 putdata+="&readotherdata="+$("#readotherdata").val();
640 putdata+="&accclientsownerlist="+$("#accclientsownerlist").val();
641 putdata+="&recclientsownerlist="+$("#recclientsownerlist").val();
642 putdata+="&bdmclientsownerlist="+$("#bdmclientsownerlist").val();
643
644 putdata+="&feedbacktxt="+$("#feedbacktxt").val();
645
646 putdata+="&exten="+$("#exten").val();
647 putdata += "&phone=" + $("#phone").val();
648 putdata += "&campaign=" + $("#campaign").val();
649 putdata+="&sessiontype="+$("#sessiontype").val();
650
651 putdata+="&lteam="+$("#lteam").val();
652 putdata+="&lteam2="+$("#lteam2").val();
653 putdata+="&supervisor="+$("#supervisor").val();
654
655 putdata+="&doj="+$("#doj").val();
656 putdata+="&level="+$("#level").val();
657 putdata+="&department="+$("#department").val();
658 putdata+="&function="+$("#function").val();
659 putdata+="&domainid="+$("#domainid").val();
660 putdata+="&entity="+$("#entity").val();
661 putdata+="&category="+$("#category").val();
662 putdata+="&country="+$("#country").val();
663 putdata+="&location="+$("#location").val();
664 putdata+="&sublocation="+$("#sublocation").val();
665 putdata+="&section="+$("#section").val();
666 putdata+="&lob="+$("#lob").val();
667 putdata+="&gender="+$("#gender").val();
668 putdata+="&subscriptioncredits="+$("#subscriptioncredits").val();
669
670 doAjax('user/<?php echo $tuser->id; ?>',putdata,'userformdiv','ajax_users_update','singlethis','PUT');
671 }
672 </script>
1 <?php
2 use App\Models\CRMCallArchive;
3 use App\Models\CRMCall;
4 use App\Models\User;
5 use App\Jobs\KHRMSLib;
6
7 $wakka = new KHRMSLib();
8 $dashboarduser=Auth::user();
9
10 if(Input::get("getCallRec")=="1")
11 {
12 $calllog=CRMCallArchive::find(Input::get("calllog"));
13 $tdata=json_decode($calllog->data,true);
14 if(Auth::user()->usertype == "Telecaller")
15 {
16 echo '<audio controls src="dialer/playrecfile?calllog='.$calllog->id.'" controlsList="nodownload"/>';
17 }
18 else
19 {
20 echo '<audio controls src="dialer/playrecfile?calllog='.$calllog->id.'" />';
21 }
22 return;
23 }
24
25 if(isset($_GET['logdate']))$logdate=strtotime($_GET['logdate']." 00:00:00");
26 else $logdate=strtotime(date('Y-m-d')." 00:00:00");
27
28 if(isset($_GET['logtodate']))$logtodate=strtotime($_GET['logtodate']." 20:00:00");
29 else $logtodate=strtotime(date('Y-m-d')." 20:00:00");
30
31 $alist=CRMCallArchive::where('created_at','>=',date("Y-m-d H:i:s",$logdate))->where('created_at','<=',date("Y-m-d H:i:s",$logtodate));
32
33 if($dashboarduser->usertype != 'Admin')
34 {
35 $uidlist=array($dashboarduser->id);
36 $allusers=User::where(function ($query) use($dashboarduser) {
37 $query->where('supervisor','=',$dashboarduser->username)
38 ->orWhere('lteam2','=',$dashboarduser->username)
39 ->orWhere('lteam','=',$dashboarduser->username);
40 })->get();
41 // ->where(function ($query) {
42 // $query->where('status', '=', 'Active');
43 // })->get();
44
45 foreach($allusers as $tuser)$uidlist[]=$tuser->id;
46
47 $roclientstr=array();$didlinesstr=array();
48 if($dashboarduser->exten!="")$didlinesstr[]=$dashboarduser->exten;
49 $oclientlst=$wakka->clientsReadAccess();
50 if(!empty($oclientlst))foreach($oclientlst as $tclnt)if($tclnt!="")
51 {
52 $roclientstr[]="$tclnt";
53 $mastersdata=$wakka->getCompanyMaster($tclnt);
54 if(!empty($mastersdata["DialerDID"]))$didlinesstr[]=$mastersdata["DialerDID"];
55 }
56
57 $alist=$alist->where(function ($query) use($roclientstr,$uidlist,$didlinesstr){
58 $query//->orWhereIn('client',$roclientstr)
59 ->orWhereIn('user_id',$uidlist)
60 ->orWhereIn('did',$didlinesstr);
61 });
62
63 }
64
65 if(Input::get('sort')=='cpu')$alist=$alist->orderBy("callSec","DESC");
66 else $alist=$alist->orderBy("id","DESC");
67 $alist=$alist->get();
68
69 $userarr=array();
70 $i=sizeof($alist);if(!empty($_GET['sort']))$i=1;
71 $totaltime=0;$ttlovr10=0;$ttlovr5=0;$ttlovr1=0;$ttlovr0=0;$outstr="";$usrcnt=0;
72 $totaltimeIn=0;$ttlovr10In=0;$ttlovr5In=0;$ttlovr1In=0;$ttlovr0In=0;$usrcntIn=0;
73 $actionarr=array();$actionarrIn=array();
74
75 if(Input::has("dllogxls"))
76 {
77 include_once(app_path().'/lib/phpexcel/PHPExcel.php');
78
79 $inputFileType = "CSV";
80 $objReader = PHPExcel_IOFactory::createReader($inputFileType);
81 $objPHPExcel = $objReader->load("assets/extras/blank.csv");
82 $baseRow = 3;
83
84 $tcol=0;$fieldsarr=array();$extrahdrarr=array();
85 $fieldsarr[$tcol++]='#';
86 $fieldsarr[$tcol++]='LAN';
87 $fieldsarr[$tcol++]='Start';
88 $fieldsarr[$tcol++]='Length';
89 $fieldsarr[$tcol++]='User';
90 $fieldsarr[$tcol++]='Name';
91 $fieldsarr[$tcol++]='Number';
92 $fieldsarr[$tcol++]='Data';
93 $fieldsarr[$tcol++]='Type';
94 $fieldsarr[$tcol++]='Dialline';
95 $fieldsarr[$tcol++]='Statuscode';
96 $fieldsarr[$tcol++]='Status';
97 $fieldsarr[$tcol++]='Substatus';
98 $fieldsarr[$tcol++]='Resultcode';
99 $fieldsarr[$tcol++]='WaitSec';
100 $fieldsarr[$tcol++]='CallSec';
101 $fieldsarr[$tcol++]='TalkSec';
102 $fieldsarr[$tcol++]='DispoSec';
103
104 $highestColumn = sizeof($fieldsarr);
105 for ($head = 0; $head < $highestColumn; $head++){
106 $colstr=PHPExcel_Cell::stringFromColumnIndex($head);
107 $objPHPExcel->getActiveSheet()->setCellValue($colstr."1", $fieldsarr[$head]);
108 }
109
110 $ii=1;
111 foreach($alist as $aline)
112 {
113 $row = $baseRow++; $col = 0;
114
115 $fulldate=date("Y-m-d H:i:s",strtotime($aline->created_at)-($dashboarduser->timezone*60));
116 $talktime=$aline->talkSec+$aline->recstartSec+$aline->recendSec;
117 $length=round(($aline->waitSec+$aline->callSec+$talktime+$aline->dispoSec)/1000,2);
118
119 if(!isset($userarr[$aline->user_id])&&$aline->user_id>0)$userarr[$aline->user_id]=User::find($aline->user_id);
120 $dispname="";if(isset($userarr[$aline->user_id]))$dispname=$userarr[$aline->user_id]->dispname();
121 $username="";if(isset($userarr[$aline->user_id]))$username=$userarr[$aline->user_id]->username;
122
123 $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($ii++);
124 $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($aline->lan);
125 $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($fulldate);
126 $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($length);
127 $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($username);
128 $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($dispname);
129 $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($aline->number);
130 $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($aline->client);
131 $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($aline->type);
132 $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($aline->dialline_id);
133 $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($aline->statuscode);
134 $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($aline->status);
135 $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($aline->substatus);
136 $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($aline->resultCode);
137 $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit(round($aline->waitSec/1000,2));
138 $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit(round($aline->callSec/1000,2));
139 $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit(round($talktime/1000,2));
140 $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit(round($aline->dispoSec/1000,2));
141 }
142
143 header('Content-Type: application/vnd.ms-excel');
144 header('Content-Disposition: attachment;filename="CallLog.csv"');
145 header('Cache-Control: max-age=0');
146
147 $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, $inputFileType);
148 $objWriter->save('php://output');
149
150 return ;
151 }
152
153 $exit = 1;
154
155 foreach($alist as $aline)
156 {
157 $clientcode="";
158 if($aline->crm_id>0)
159 {
160 $user=$wakka->getPerson($aline->crm_id);
161 $clientcode=$user["peopledata"]["clientcode"];
162 }
163 $tpostdata=json_decode($aline->data,true);
164 $fulldate=date("Y-m-d H:i:s",strtotime($aline->created_at)-($dashboarduser->timezone*60));
165 $talktime=$aline->talkSec+$aline->recstartSec+$aline->recendSec;
166 $length=round(($aline->waitSec+$aline->callSec+$talktime+$aline->dispoSec)/1000,2);
167
168 if(!isset($userarr[$aline->user_id])&&$aline->user_id>0)$userarr[$aline->user_id]=User::find($aline->user_id);
169 $dispname="";if(isset($userarr[$aline->user_id]))$dispname=$userarr[$aline->user_id]->dispname();
170 $username="";if(isset($userarr[$aline->user_id]))$username=$userarr[$aline->user_id]->username;
171
172 $recstr='';
173 if($dashboarduser->moduleACL("Dialer",false,false,true))
174 {
175 if(Auth::user()->usertype == "Telecaller")
176 {
177 if(isset($tpostdata['recFolder']))$recstr.="<a href=# onclick='getCallRec(".$aline->id.");return false;' title='Size : ".round($aline->recsize/1024,0)." KB'><i class='fa fa-play-circle'></i> &nbsp;</a><span id='recspan_".$aline->id."'</span>";
178 }
179 else
180 {
181 if(isset($tpostdata['recFolder']))
182 {
183 $recstr.="<a href=# onclick='getCallRec(".$aline->id.");return false;' title='Size : ".round($aline->recsize/1024,0)." KB'><i class='fa fa-play-circle'></i> &nbsp;</a>";
184 $recstr.="<a href='dialer/playrecfile?calllog=$aline->id&out=wav' title='' target='_blank'><i class='fa fa-download'></i> &nbsp;</a><span id='recspan_".$aline->id."'</span>";
185 }
186 }
187 }
188
189 $outstr.="<tr><td>".$i."</td>
190 <td>".$aline->lan."</td>
191 <td title='$fulldate'>".explode(" ",$fulldate)[1]."</td>
192 <td>$length</td>
193 <td>".$username."</td>
194 <td>".$dispname."</td>
195 <td>".$aline->number."</td>
196 <td>".$aline->client."</td>
197 <td>".$aline->type."</td>
198 <td>".$aline->dialline_id."</td>
199 <td>".$aline->statuscode."</td>
200 <td>".$aline->status."</td>
201 <td>".$aline->substatus."</td>
202 <td>".$aline->resultCode."</td>
203 <td>".round($aline->waitSec/1000,2)."</td>
204 <td>".round($aline->callSec/1000,2)."</td>
205 <td>".round($talktime/1000,2)."</td>
206 <td>".round($aline->dispoSec/1000,2)."</td>
207 <td>$recstr</td>
208 </tr>";
209
210 if(!empty($_GET['sort']))$i++;else $i--;
211
212 if($exit=="1000")break;
213 $exit++;
214 }
215 ?>
216
217 <div class=innerAll>
218 <style>#logtable.td{vertical-align:top;}#logtable.tr{height:28px;overflow-y:hidden;}</style>
219 <script>
220 function showExtraPost(varstr)
221 {
222 doAjax("hr?action=LiveUsers","getpostdata="+varstr,"dialoglog");
223
224 $('#dialoglog').dialog('open');
225 return false;
226 }
227
228 $(document).ready(function()
229 {
230 if(!$('#dialoglog').hasClass('ui-dialog-content'))
231 {
232 $('#dialoglog').dialog({
233 autoOpen: false,
234 width: '70%',
235 buttons: {
236 "Ok": function() {
237 $(this).dialog("close");
238 },
239 "Cancel": function() {
240 $(this).dialog("close");
241 }
242 }
243 });
244 }
245
246 waitKeyUpRun("filter",function() { filter2(document.getElementById('filter'), 'logtable') },"2000");
247 $('#modfrom').datepicker({dateFormat: 'yy-mm-dd',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'});
248 $('#modto').datepicker({dateFormat: 'yy-mm-dd',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'});
249 });
250 </script>
251 <div style="float:left;width:50%">
252
253 Search <input id=filter name="filter" type="text">
254 Date : <input size=10 id='modfrom' name='modfrom' type='text' value='<?php echo date("Y-m-d",$logdate); ?>' onchange='callLogReloadFun("");' />
255 To <input size=10 id='modto' name='modto' type='text' value='<?php echo date("Y-m-d",$logtodate); ?>' onchange='callLogReloadFun("");' />
256
257 </div>
258 <div style="float:left;width:50%">
259 <button class="pull-right btn btn-sm btn-default" onclick='dlCalllogXls();return false;' title='Download' style='margin-top:-8px'><i class='fa fa-download'></i> Download</button>
260 </div>
261 <div style="clear:both"></div>
262 <hr>
263
264 <?php
265 $categories=array();$avgarr=array();$cntarr=array();
266 foreach($actionarr as $act=>$actarr)
267 {
268 if($actarr['cnt']>sizeof($alist)/150)
269 {
270 $categories[]="'$act'";
271 $avgarr[]=-round($actarr['time']/$actarr['cnt'],2);
272 $cntarr[]=$actarr['cnt'];
273 }
274 }
275
276 array_multisort($cntarr,$avgarr,$categories);
277
278 $categoriesIn=array();$avgarrIn=array();$cntarrIn=array();
279 foreach($actionarrIn as $act=>$actarr)
280 {
281 if($actarr['cnt']>sizeof($alist)/150)
282 {
283 $categoriesIn[]="'$act'";
284 $avgarrIn[]=-round($actarr['time']/$actarr['cnt'],2);
285 $cntarrIn[]=$actarr['cnt'];
286 }
287 }
288
289 array_multisort($cntarrIn,$avgarrIn,$categoriesIn);
290 ?>
291 <script>
292 function callLogReloadFun(sortby)
293 {
294 var sortstr='';if(sortby!="")sortstr="&sort="+sortby
295
296 doAjax('dialer/calllog?logdate='+$("#modfrom").val()+'&logtodate='+$("#modto").val()+sortstr,'','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');
297 }
298 function getCallRec(id)
299 {
300 doAjax("dialer/calllog","getCallRec=1&calllog="+id,'recspan_'+id,'rec_ajax','singlefail','GET');
301 }
302 function dlCalllogXls()
303 {
304 window.open('dialer/calllog?dllogxls=1&logdate='+$("#modfrom").val()+'&logtodate='+$("#modto").val());return false;
305 }
306 </script>
307 <br/>
308 <div style='clear:both'></div>
309 <div style='overflow:auto'>
310 <table id=logtable class='footable table table-striped table-bordered table-white table-primary footable-loaded' style='font-size:12px'>
311 <thead>
312 <tr>
313 <th>#</th>
314 <th>LAN</th>
315 <th>Start</th>
316 <th onclick='callLogReloadFun("");return false;'>Length</th>
317 <th>User</th>
318 <th>Name</th>
319 <th style='width:120px'>Number</th>
320 <th>Campaign</th>
321 <th>Type</th>
322 <th>Dialline</th>
323 <th>Statuscode</th>
324 <th>Status</th>
325 <th>Substatus</th>
326 <th>Result Code</th>
327 <th>WaitSec</th>
328 <th>CallSec</th>
329 <th>TalkSec</th>
330 <th>DispoSec</th>
331 <th>Recording</th>
332 </tr>
333 </thead>
334 <?php echo $outstr; ?>
335 </table>
336 </div>
337 <?php
338 function convert($size)
339 {
340 $unit=array('b','kb','mb','gb','tb','pb');
341 return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i];
342 }
343 echo "<br>".convert(memory_get_peak_usage(true)); // 123 kb
344 ?>
345 <div id=dialoglog></div>
346 </div>
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 <?php
2 use App\Models\CRMCall;
3 use App\Models\CRMCallArchive;
4 use App\Models\User;
5 use App\Models\UserLog;
6 use App\Jobs\KHRMSLib;
7
8 $wakka = new KHRMSLib();
9 $dashboarduser=Auth::user();
10 $timeoffset = $dashboarduser->timezone; //-330; //$dashboarduser->timezone;
11 $timeoffset = $timeoffset*60;
12
13 $logtime =(isset($_GET['logtime'])) ? $_GET['logtime'] :9;
14 $logtimeto =(isset($_GET['logtimeto']))? $_GET['logtimeto']:20;
15
16 $logdate =(isset($_GET['logdate'])) ? strtotime($_GET['logdate']." ".$logtime.":00:00")
17 : strtotime(date("Y-m-d")." 09:00:00");
18 $logdateto =(isset($_GET['logdateto']))? strtotime($_GET['logdateto']." ".$logtimeto.":00:00")
19 : strtotime(date("Y-m-d")." 20:00:00");
20 $campaign =(isset($_GET['campaign'])) ? $_GET['campaign'] : "All";
21
22 $alist=CRMCallArchive::where('user_id','!=',0)->where('created_at','>=',date("Y-m-d H:i:s",$logdate+$timeoffset))->where('created_at','<=',date("Y-m-d H:i:s",$logdateto+$timeoffset));
23 $alist->orderBy('user_id', 'ASC')->orderBy('ts_Close', 'ASC');
24
25 $userlog=UserLog::where('created_at','>=',date("Y-m-d H:i:s",$logdate+$timeoffset))->where('created_at','<=',date("Y-m-d H:i:s",$logdateto+$timeoffset));
26
27 if($campaign != 'All') $alist->where('client','=',$campaign);
28
29 $period = date_range($_GET['logdate'],$_GET['logdateto']);
30 $alistmain=array();
31 $secreportarray=array();
32
33 $userarr=array();
34 $allusers = DB::table('users as u1')->leftjoin('users AS u2', 'u2.username', '=', 'u1.supervisor')
35 ->select('u1.id','u1.username','u1.fullname AS telecaller', 'u2.fullname AS sepervisor')
36 ->where('u1.status','=','Active');
37
38 $roclientstr=array();$didlinesstr=array();
39 if($dashboarduser->exten!="")$didlinesstr[]=$dashboarduser->exten;
40 $oclientlst=$wakka->clientsReadAccess(); sort($oclientlst); $oclientlst[0] = 'All';
41
42 if(!empty($oclientlst))foreach($oclientlst as $tclnt)if($tclnt!="")
43 {
44 $roclientstr[]="$tclnt";
45
46 $mastersdata=$wakka->getCompanyMaster($tclnt);
47 if(!empty($mastersdata["DialerDID"]))$didlinesstr[]=$mastersdata["DialerDID"];
48 }
49
50 $breaks=array("Paused","AgentBriefing","TeamMeeting","QualityFeedback","LunchBreak","TeaBreak","UtilityBreak","FloorAnnouncements","DownTime");
51 $reporthead=array_merge(array("#","Telecaller","TelecallerID","Supervisor","Signin","Signout","Count","Duration","Total","Preview","Wait","Call","Talk","Dispo"),$breaks);
52 $reportarray=array();
53
54 $i=1;
55 if($dashboarduser->usertype != 'Admin')
56 {
57 $uidlist=array($dashboarduser->id);
58 $allusers=$allusers->where(function ($query) use($dashboarduser) {
59 $query->where('u1.supervisor','=',$dashboarduser->username)
60 ->orWhere('u1.lteam2','=',$dashboarduser->username)
61 ->orWhere('u1.lteam','=',$dashboarduser->username);
62 })->get();
63
64 foreach($allusers as $tuser)
65 {
66 $uidlist[]=$tuser->id;
67 $reportarray[$tuser->id]=array("#"=>$i++,"Telecaller"=>$tuser->telecaller,"TelecallerID"=>$tuser->username,"Supervisor"=>$tuser->sepervisor);
68 $secreportarray[$user->id];
69 }
70 $reportarray[$dashboarduser->id]=array("#"=>$i++,"Telecaller"=>$dashboarduser->fullname,"TelecallerID"=>$dashboarduser->username,"Supervisor"=>$dashboarduser->supervisor);
71
72 $alist=$alist->whereIn('user_id',$uidlist);
73
74 /*$alist=$alist->where(function ($query) use($roclientstr,$uidlist,$didlinesstr){
75 $query->orWhereIn('client',$roclientstr)
76 ->orWhereIn('did',$didlinesstr);
77 });*/
78
79 $userlog=$userlog->whereIn('user_id',$uidlist);
80 }else{
81 $allusers=$allusers->get();
82 foreach($allusers as $tuser)
83 {
84 $secreportarray[$user->id];
85 $reportarray[$tuser->id]=array("#"=>$i++,"Telecaller"=>$tuser->telecaller,"TelecallerID"=>$tuser->username,"Supervisor"=>$tuser->sepervisor);
86 }
87 }
88
89 if(Input::has("dllogxls"))
90 {
91 foreach($allusers as $tuser)
92 {
93 foreach ($period as $per) {
94
95 $alistmain=CRMCallArchive::where('user_id','=',$tuser->id)->where('created_at','>=',date('Y-m-d H:i:s',(strtotime($per." ".$logtime.":00:00")+$timeoffset)))->where('created_at','<=',date('Y-m-d H:i:s',(strtotime($per." ".$logtimeto.":00:00")+$timeoffset)));
96 // $alistmain=CRMCallArchive::where('user_id','=',$tuser->id)->where(DB::raw('DATE(created_at)'),'=',$per);
97 $alistmain->orderBy('user_id', 'ASC')->orderBy('ts_Close', 'ASC');
98 if($campaign != 'All') $alistmain->where('client','=',$campaign);
99 $alistmain=$alistmain->get();
100 foreach ($alistmain as $alistm) {
101 if($prev_user != $alistm->user_id || $prev_close <= $alistm->ts_Wait)
102 {
103 $talktime1=$alistm->talkSec+$alistm->recstartSec+$alistm->recendSec;
104 $totaltime1=$alistm->callSec+$talktime1+$alistm->dispoSec;
105
106 $secreportarray[$tuser->id][$per]["oncall"]+=$totaltime1/1000;
107 if($alistm->type == 'Progressive')
108 {
109 $secreportarray[$tuser->id][$per]["Preview"]+=$alistm->waitSec/1000;
110 }
111 if($alistm->type == 'Auto')
112 {
113 $secreportarray[$tuser->id][$per]["Pred_wait"]+=$alistm->waitSec/1000;
114 }
115 $secreportarray[$tuser->id][$per]["Call"]+=$alistm->callSec/1000;
116 $secreportarray[$tuser->id][$per]["Talk"]+=$talktime1/1000;
117 $secreportarray[$tuser->id][$per]["Dispo"]+=$alistm->dispoSec/1000;
118 }
119 $secreportarray[$tuser->id][$per]["Count"]++;
120 $prev_close = $alistm->ts_Close;//-ts_Wait
121 $prev_user = $alistm->user_id;//-ts_Wait
122
123 }
124 $usergroup=UserLog::where('user_id','=',$tuser->id)->where('created_at','>=',date('Y-m-d H:i:s',(strtotime($per." ".$logtime.":00:00")+$timeoffset)))->where('created_at','<=',date('Y-m-d H:i:s',(strtotime($per." ".$logtimeto.":00:00")+$timeoffset)));
125 // $usergroup=UserLog::where('user_id','=',$tuser->id)->where(DB::raw('DATE(created_at)'),'=',$per);
126 $usergroup=$usergroup->get();
127 $userLogingrp=array();
128 foreach ($usergroup as $ugroup) {
129 $data1=json_decode($ugroup->data,true);
130 $sdts =strtotime($ugroup->startdate." ".$logtimeto.":00:00")+$timeoffset;
131 $data = array();
132 foreach ($data1 as $datavalue) {
133 $dts = round(($datavalue['ts'])/1000);
134 if($sdts > $dts){
135 array_push($data, $datavalue);
136 }
137 }
138 usort($data, "cmp");
139 $lastSip = end($data);
140 if(!empty($data)){
141 $starttime = strtotime($ugroup->startdate.' '.$ugroup->starttime);
142 $endtime = round($lastSip['ts']/1000);
143 $userLogingrp[$ugroup->user_id]['duration'] += ($endtime-$starttime);
144 $userLogingrp[$ugroup->user_id]['start'][] = $starttime;
145 $userLogingrp[$ugroup->user_id]['end'][] = $endtime;
146
147 $prets=strtotime($ugroup->startdate." ".$ugroup->starttime)*1000;
148 $previous="Paused-Paused";
149 foreach($data as $sdata)
150 {
151 $pts=$sdata['ts'];
152 if(isset($sdata['states']))
153 {
154 foreach($sdata['states'] as $ts=>$states)
155 {
156 if($previous != "Paused-WRAPUP")$previous = str_replace('Paused-', '', $previous);
157 if(!in_array($previous,$reporthead) && !in_array($previous,array('Progressive-','Manual-','Ready-Incoming','Ready-Predictive','DialNext-','Paused-WRAPUP'))) {
158 $previous = 'Paused';
159 }
160
161 $secreportarray[$ugroup->user_id][$per][$previous]+=round($ts-$prets,2)/1000;
162 //echo $previous . " == " . $reportarray[$ulog->user_id][$previous] . " == " . $pts . '-' . $prets . ':::' . round($pts-$prets,2)/1000 . "<br />";
163
164 $prets=$ts;
165 $previous=$states[0].'-'.$states[1];
166 }
167 if($previous != "Paused-WRAPUP")$previous = str_replace('Paused-', '', $previous);
168 $secreportarray[$ugroup->user_id][$per][$previous]+=round($pts-$prets,2)/1000;
169 $prets=$pts;
170 }
171 }
172 }
173 }
174 if(count($userLogingrp)) foreach ($userLogingrp as $userid => $value)
175 {
176 $break_time=0;
177 foreach ($breaks as $break) {
178 $break_time+=$secreportarray[$userid][$per][$break];
179 }
180 $secreportarray[$userid][$per]["Signin"]=date("Y-m-d H:i:s", min($value['start'])-$timeoffset);
181 $secreportarray[$userid][$per]["Signout"]=date("Y-m-d H:i:s", max($value['end'])-$timeoffset);
182 $secreportarray[$userid][$per]["Duration"]=$value['duration'];
183 $secreportarray[$userid][$per]["Total"]=$value['duration']-$break_time;
184 $secreportarray[$userid][$per]["Wait"]=$secreportarray[$userid][$per]["Pred_wait"];
185 }
186
187 }
188 foreach ($secreportarray as $secreportarr => $value) {
189 $reportarray[$tuser->id]["report"] = $value;
190 }
191 $secreportarray=array();
192 }
193 }
194 $alist=$alist->get();
195 $userlog=$userlog->get();
196 $prev_close = 0;
197
198 foreach($alist as $aline)
199 {
200 if($prev_user != $aline->user_id || $prev_close <= $aline->ts_Wait)
201 {
202 $userid=$aline->user_id;
203
204 $talktime=$aline->talkSec+$aline->recstartSec+$aline->recendSec;
205 $totaltime=$aline->callSec+$talktime+$aline->dispoSec;
206
207 $reportarray[$userid]["oncall"]+=$totaltime/1000;
208 if($aline->type == 'Progressive')
209 {
210 $reportarray[$userid]["Preview"]+=$aline->waitSec/1000;
211 }
212 if($aline->type == 'Auto')
213 {
214 $reportarray[$userid]["Pred_wait"]+=$aline->waitSec/1000;
215 }
216 $reportarray[$userid]["Call"]+=$aline->callSec/1000;
217 $reportarray[$userid]["Talk"]+=$talktime/1000;
218 $reportarray[$userid]["Dispo"]+=$aline->dispoSec/1000;
219 }
220 $reportarray[$userid]["Count"]++;
221 $prev_close = $aline->ts_Close;//-ts_Wait
222 $prev_user = $aline->user_id;//-ts_Wait
223 }
224
225 function cmp($a, $b) {
226 return $a["ts"] - $b["ts"];
227 }
228 $userLogin=array();
229 foreach($userlog as $ulog)
230 {
231 $data1=json_decode($ulog->data,true);
232 $sdts =$logdateto+$timeoffset;
233 $data = array();
234 foreach ($data1 as $datavalue) {
235 $dts = round(($datavalue['ts'])/1000);
236 if($sdts > $dts){
237 array_push($data, $datavalue);
238 }
239 }
240 usort($data, "cmp");
241 if(!empty($data)){
242 $lastSip = end($data);
243 $starttime = strtotime($ulog->startdate.' '.$ulog->starttime);
244 $endtime = round($lastSip['ts']/1000);
245 $userLogin[$ulog->user_id]['duration'] += ($endtime-$starttime);
246 $userLogin[$ulog->user_id]['start'][] = $starttime;
247 $userLogin[$ulog->user_id]['end'][] = $endtime;
248
249 $prets=strtotime($ulog->startdate." ".$ulog->starttime)*1000;
250 $previous="Paused-Paused";
251 foreach($data as $sdata)
252 {
253 $pts=$sdata['ts'];
254 if(isset($sdata['states']))
255 {
256 foreach($sdata['states'] as $ts=>$states)
257 {
258 //if($ulog->user_id=="55"){print_r($previous);echo "<br>";}
259 if($previous != "Paused-WRAPUP")$previous = str_replace('Paused-', '', $previous);
260 if(!in_array($previous,$reporthead) && !in_array($previous,array('Progressive-','Manual-','Ready-Incoming','Ready-Predictive','DialNext-','Paused-WRAPUP'))) {
261 $previous = 'Paused';
262 }
263
264 $reportarray[$ulog->user_id][$previous]+=round($ts-$prets,2)/1000;
265 //echo $previous . " == " . $reportarray[$ulog->user_id][$previous] . " == " . $pts . '-' . $prets . ':::' . round($pts-$prets,2)/1000 . "<br />";
266
267 $prets=$ts;
268 $previous=$states[0].'-'.$states[1];
269 }
270 if($previous != "Paused-WRAPUP")$previous = str_replace('Paused-', '', $previous);
271 $reportarray[$ulog->user_id][$previous]+=round($pts-$prets,2)/1000;
272 $prets=$pts;
273 }
274 }
275 }
276 }
277
278 if(count($userLogin)) foreach ($userLogin as $userid => $value)
279 {
280 $break_time=0;
281 foreach ($breaks as $break) {
282
283 $break_time+=$reportarray[$userid][$break];
284 }
285 $reportarray[$userid]["Signin"]=date("Y-m-d H:i:s", min($value['start'])-$timeoffset);
286 $reportarray[$userid]["Signout"]=date("Y-m-d H:i:s", max($value['end'])-$timeoffset);
287 $reportarray[$userid]["Duration"]=$value['duration'];
288 $reportarray[$userid]["Total"]=$value['duration']-$break_time;
289 $reportarray[$userid]["Wait"]=$reportarray[$userid]["Pred_wait"];
290 }
291
292 $highestColumn = sizeof($reporthead);
293 if(count($reportarray)) {
294 $outhead="<tr>";$outstr="";
295 for ($head = 0; $head < $highestColumn; $head++){
296 if($reporthead[$head] == '#') {
297 $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>";
298 $outhead.="<td>".$mode_str."</td>";
299 }
300 else {
301 $outhead.="<td>".$reporthead[$head]."</td>";
302 }
303 }
304 $outhead.="</tr>";
305 $utotalarr = array("Telecaller"=>'Total');
306
307 foreach($reportarray as $uid=>$uarr)
308 {
309 $outstr.="<tr>";
310 for ($head = 0; $head < $highestColumn; $head++){
311 if($head < 6) {
312 $data_str = $uarr[$reporthead[$head]];
313 }
314 elseif($head < 7) {
315 $data_str = $uarr[$reporthead[$head]];
316 $utotalarr[$reporthead[$head]] += $uarr[$reporthead[$head]];
317 }
318 else {
319 $data_str = secToDuration(round($uarr[$reporthead[$head]]));
320 $utotalarr[$reporthead[$head]] += $uarr[$reporthead[$head]];
321 }
322 // $outstr.="<td>".$data_str."</td>";
323 $outstr.="<td style='background-color:#fff'>".$data_str."</td>";
324 }
325 $outstr.="</tr>";
326 if($uarr["report"]){
327 foreach ($uarr["report"] as $repo=>$repovalue) {
328 $outstr.="<tr>";
329 for ($head=0; $head < $highestColumn ; $head++) {
330 if($head < 4){
331 $data_str = "";
332 }
333 elseif($head < 6){
334 $data_str = $repovalue[$reporthead[$head]];
335 }
336 elseif($head < 7) {
337 $data_str = $repovalue[$reporthead[$head]];
338 // $utotalarr[$reporthead[$head]] += $repovalue[$reporthead[$head]];
339 }
340 else {
341 $data_str = secToDuration(round($repovalue[$reporthead[$head]]));
342 // $utotalarr[$reporthead[$head]] += $repovalue[$reporthead[$head]];
343 }
344 $outstr.="<td style='background-color:#efefef'>".$data_str."</td>";
345 }
346 $outstr.="</tr>";
347 }
348
349 }
350 }
351 $outstr.="<tr>";
352 for ($head = 0; $head < $highestColumn; $head++)
353 {
354 if($head < 7) {
355 $data_str = $utotalarr[$reporthead[$head]];
356 }
357 else {
358 $data_str = secToDuration($utotalarr[$reporthead[$head]]);
359 }
360 $outstr.="<td>".$data_str."</td>";
361 }
362 $outstr.="</tr>";
363 }
364 else {
365 $outhead.="<tr><td>No Records Found.</td></tr>";
366 }
367
368 if(Input::has("dllogxls"))
369 {
370
371 include_once(app_path().'/lib/phpexcel/PHPExcel.php');
372
373 $inputFileType = "Excel5";
374 $objReader = PHPExcel_IOFactory::createReader($inputFileType);
375 $objPHPExcel = $objReader->load("assets/extras/blank.xls");
376 $baseRow = 2;
377
378 $highestColumn = sizeof($reporthead);
379 for ($head = 0; $head < $highestColumn; $head++){
380 $colstr=PHPExcel_Cell::stringFromColumnIndex($head);
381 $objPHPExcel->getActiveSheet()->setCellValue($colstr."1", $reporthead[$head]);
382 }
383
384 foreach($reportarray as $uid=>$uarr)
385 {
386 $row = $baseRow++;
387 $col = 0;
388
389 for ($head = 0; $head < $highestColumn; $head++){
390 $excelval = ($head < 7) ? $uarr[$reporthead[$head]] : secToDuration(round($uarr[$reporthead[$head]]));
391 $colstr=PHPExcel_Cell::stringFromColumnIndex($head);
392 $objPHPExcel->getActiveSheet()->setCellValue($colstr.$row, $excelval);
393 }
394 if($uarr["report"]){
395 foreach($uarr["report"] as $repo=>$repovalue)
396 {
397 $row = $baseRow++;
398 $col = 0;
399
400 for ($head = 0; $head < $highestColumn; $head++){
401 if($head < 4){
402 $excelval = "";
403 }
404 elseif($head < 7){
405 $excelval = $repovalue[$reporthead[$head]];
406 }
407 else{
408 $excelval = secToDuration(round($repovalue[$reporthead[$head]]));
409 }
410 $colstr=PHPExcel_Cell::stringFromColumnIndex($head);
411 $objPHPExcel->getActiveSheet()->setCellValue($colstr.$row, $excelval)->getStyle($colstr.$row)->applyFromArray(
412 array(
413 'fill' => array(
414 'type' => PHPExcel_Style_Fill::FILL_SOLID,
415 'color' => array('rgb' => 'efefef')
416 )
417 )
418 );
419 }
420 }
421 }
422 }
423
424 $row++;
425 for ($head = 0; $head < $highestColumn; $head++){
426 $excelval = ($head < 7) ? $utotalarr[$reporthead[$head]] : secToDuration(round($utotalarr[$reporthead[$head]]));
427 $colstr=PHPExcel_Cell::stringFromColumnIndex($head);
428 $objPHPExcel->getActiveSheet()->setCellValue($colstr.$row, $excelval);
429 }
430
431 header('Content-Type: application/vnd.ms-excel');
432 header('Content-Disposition: attachment;filename="AgentTime.xls"');
433 header('Cache-Control: max-age=0');
434
435 $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, $inputFileType);
436 $objWriter->save('php://output');
437 return ;
438 }
439
440 function secToDuration($sec) {
441 return sprintf("%02d%s%02d%s%02d", floor($sec/3600), ':', ($sec/60)%60, ':', $sec%60);
442 }
443 function date_range($first, $last, $step = '+1 day', $output_format = 'Y-m-d' ) {
444 $dates = array();
445 $current = strtotime($first);
446 $last = strtotime($last);
447 while( $current <= $last ) {
448 $dates[] = date($output_format, $current);
449 $current = strtotime($step, $current);
450 }
451 return $dates;
452 }
453 ?>
454
455 <style>#logtable.td{vertical-align:top;}#logtable.tr{height:28px;overflow-y:hidden;}</style>
456
457 <div class=innerAll>
458 <h4 style="float:left;width:50%;margin:10px 0;">Agent Time Report</h4>
459 <div style="float:right;width:50%">
460 <button class='pull-right btn btn-sm btn-default' onclick='dlAgentlogXls();return false;' title='Download'><i class='fa fa-download'></i> Download</button>
461 </div>
462 <div style="clear:both"></div>
463 <hr style="margin-bottom: 5px;">
464 <div>
465 Search <input id=filter name="filter" type="text" style="border:1px solid #efefef; padding: 2px 10px;">&nbsp;&nbsp;
466 Date: From <input size=10 id='modfrom' name='modfrom' type='text' value='<?php echo date("Y-m-d",$logdate); ?>' onchange='statusLogReloadFun("");' />
467 <select id="modtime" style="border:1px solid #efefef;" onchange='statusLogReloadFun("");'>
468 <?php
469 foreach (range(0,23) as $hour) {
470 $selected = ($hour == $logtime) ? "selected" : "";
471 echo "<option value='$hour' $selected>".str_pad($hour, 2, "0", STR_PAD_LEFT) . ":00</option>";
472 }
473 ?></select>
474 To <input size=10 id='modto' name='modto' type='text' value='<?php echo date("Y-m-d",$logdateto); ?>' onchange='statusLogReloadFun("");' />
475 <select id="modtimeto" style="border:1px solid #efefef;" onchange='statusLogReloadFun("");'>
476 <?php
477 foreach (range(0,23) as $hour) {
478 $selected = ($hour == $logtimeto) ? "selected" : "";
479 echo "<option value='$hour' $selected>".str_pad($hour, 2, "0", STR_PAD_LEFT) . ":00</option>";
480 }
481 ?></select>&nbsp;&nbsp;
482 Campaign
483 <select id="campaign" style="border:1px solid #efefef;" onchange='statusLogReloadFun("");'>
484 <?php foreach($oclientlst as $c){$s="";if($c==$campaign)$s='selected';echo "<option value='$c' $s>$c</option>";} ?>
485 </select>
486 </div>
487
488 <div style="clear:both"></div>
489 <hr style="margin:5px;">
490
491 <div style="overflow: auto; margin-top: 10px;">
492 <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;'>
493 <thead><?php echo $outhead; ?></thead>
494 <?php echo $outstr; ?>
495 </table>
496 </div>
497
498 <div id=dialoglog></div>
499 </div>
500
501 <script>
502 $(document).ready(function() {
503 if(!$('#dialoglog').hasClass('ui-dialog-content'))
504 {
505 $('#dialoglog').dialog({
506 autoOpen: false,
507 width: '70%',
508 buttons: {
509 "Ok": function() {
510 $(this).dialog("close");
511 },
512 "Cancel": function() {
513 $(this).dialog("close");
514 }
515 }
516 });
517 }
518
519 waitKeyUpRun("filter",function() { filter2(document.getElementById('filter'), 'logtable') },"2000");
520 $('#modfrom').datepicker({dateFormat: 'yy-mm-dd',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'});
521 $('#modto').datepicker({dateFormat: 'yy-mm-dd',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'});
522 });
523
524 function dataString()
525 {
526 return 'logdate='+$("#modfrom").val()+'&logtime='+$("#modtime").val()+'&logdateto='+$("#modto").val()+'&logtimeto='+$("#modtimeto").val()+'&campaign='+$("#campaign").val();
527 }
528 function statusLogReloadFun(sortby)
529 {
530 var sortstr='';if(sortby!="")sortstr="&sort="+sortby
531 var searchStr = dataString();
532 doAjax('dialer/agenttime?'+searchStr+sortstr,'','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');
533 }
534 function dlAgentlogXls()
535 {
536 var searchStr = dataString();
537 window.open('dialer/agenttime?dllogxls=1&'+searchStr);
538 return false;
539 }
540 function reportExp($id)
541 {
542 doAjax('dialer/repExp?isrptsubmit=0&start_date='+$("#modfrom").val()+'&end_date='+encodeURIComponent($("#modto").val())+'&userId='+$id+'&campaign='+encodeURIComponent($("#campaign").val())+'&modtime='+encodeURIComponent($("#modtime").val())+'&modtimeto='+encodeURIComponent($("#modtimeto").val()),'','repExp','ajax_dialer_reports','singlethis','GET');
543 }
544 </script>
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
2 use App\Jobs\KHRMSLib;
3 $wakka=new KHRMSLib();
4
5 $userdata=$wakka->loadAllDBUsers($tuser->username);
6 $clientslist=$wakka->GetExBBBUserData($userdata["name"],"clientslist");
7 $clientsownerlist=$wakka->GetExBBBUserData($userdata["name"],"clientsownerlist");
8 $roclientsownerlist=$wakka->GetExBBBUserData($userdata["name"],"roclientsownerlist");
9 $accclientsownerlist=$wakka->GetExBBBUserData($userdata["name"],"accclientsownerlist");
10 $recclientsownerlist=$wakka->GetExBBBUserData($userdata["name"],"recclientsownerlist");
11 $bdmclientsownerlist=$wakka->GetExBBBUserData($userdata["name"],"bdmclientsownerlist");
12 $readotherdata=$wakka->GetExBBBUserData($userdata["name"],"readotherdata");
13
14 if(Input::get('feedbacktxt')!='')
15 {
16 $feedbacks=$wakka->GetExBBBUserData($tuser->username,"userfeedbacks");
17 $feedbacks[]=array("datetime"=>date("Y-m-d H:i"),"user"=>$wakka->GetUserName(),"data"=>Input::get('feedbacktxt'));
18 $wakka->SetExBBBUserData($tuser->username,"userfeedbacks",$feedbacks);
19 $result=$wakka->createMailQueue("System",array($wakka->GetExBBBUserData($tuser->username,"email")),"Innovation : User Feedback Added","Hi,<br><br>\n\n".$wakka->GetUserName()." has added a new User Feedback for you, You may check the same in your Profile.");
20 }
21
22
23 $role=$tuser->role();
24 $data=$tuser->data();
25 if(empty($data['personal']))$data['personal']=array();
26 if(empty($data['personal']['fname']))$data['personal']['fname']="";
27 if(empty($data['personal']['lname']))$data['personal']['lname']="";
28 ?>
29
30
31 <!-- Heading -->
32 <h5 class="innerAll margin-none bg-primary">
33 <i class="fa fa-fw fa-pencil"></i> Edit User
34 <a href="#" class="btn btn-sm btn-inverse pull-right btn-xs" style="margin-top: -5px;" onclick="return false">
35 <i class="fa fa-user fa-fw"></i>
36 <?php echo $tuser->dispname(); ?>
37
38 </a>
39 </h5>
40
41
42
43 <?php
44 $title=$tuser->dispname();
45 $url="";
46 // $desc=substr(strip_tags($tuser->dataval2('personal','aboutme')),0,50);
47 $imageurl=array(Auth::user()->fetchphotothumb($tuser->id));
48 $interests=array_unique(array_filter(explode(",",$tuser->dataval2('personal','interestcategories'))));
49 ?>
50
51 <div class="media innerAll">
52 <div class=pull-right>
53 <button class="pull-right btn btn-primary btn-stroke btn-xs" onclick='dbhashlink("#p-<?php echo $tuser->id; ?>")'><i class="fa fa-arrow-right"></i></button><div style='clear:both;margin-bottom:7px'></div>
54 <button class="pull-right btn btn-primary btn-xs" onclick='dashboardfollow(<?php echo $tuser->id; ?>)'> Follow </button>
55 </div>
56 <img src="<?php echo $imageurl[0]; ?>" alt="" width="35" class="pull-left thumb">
57 <div class="media-body">
58 <h5 class="media-heading strong"><?php echo $title; ?></h5>
59 <ul class="list-unstyled text-faded">
60 <li><i class="fa fa-gear"></i> <?php echo $tuser->usertype; ?> <?php echo $tuser->dataval2('personal','location'); ?> - <?php echo $tuser->dataval2('personal','country'); ?></li>
61 <li><?php if(!empty($interests))foreach($interests as $interest){ ?><span class="badge badge-primary"><small><?php echo $interest; ?></small></span><?php } ?></li>
62 </ul>
63 </div>
64 </div>
65 <div class="col-separator-h box"></div>
66
67 <form class="innerAll">
68 <fieldset>
69 <div class="control-group">
70 <label class="col-md-4 control-label" for="username">Username</label>
71 <div class="col-md-8 controls">
72 <input class="form-control" id="username" type="text" value="<?php echo $tuser->username; ?>" disabled=disabled />
73 </div>
74 </div>
75 <div class="control-group">
76 <label class="col-md-4 control-label" for="password">Password</label>
77 <div class="col-md-8 controls">
78 <input class="form-control" id="password" type="password" value="" placeholder=unchanged />
79 </div>
80 </div>
81
82 <div class="control-group">
83 <label class="col-md-4 control-label" for="username">Full Name</label>
84 <div class="col-md-8 controls">
85 <input class="form-control" id="fullname" type="text" value="<?php echo $data['personal']['fname']; ?> <?php echo $data['personal']['lname']; ?>" required=required />
86 </div>
87 </div>
88 <div class="control-group">
89 <label class="col-md-4 control-label" for="email">Email</label>
90 <div class="col-md-8 controls">
91 <input class="form-control" id="email" type="email" value="<?php echo $tuser->email; ?>" required=required />
92 </div>
93 </div>
94 <div class="control-group">
95 <label class="col-md-4 control-label" for="userstatus">Status</label>
96 <div class="col-md-8 controls">
97 <select id="userstatus" required=required class=form-control>
98 <option value="<?php echo $tuser->status; ?>"><?php echo $tuser->status; ?></option>
99 <option value="Active">Active</option>
100 <option value="Disabled">Disabled</option>
101 <option value="Unverified">Unverified</option>
102 <option value="Blocked">Blocked</option>
103 </select>
104 </div>
105 </div>
106
107 <!-- <div class="control-group">
108 <label class="col-md-4 control-label" for="organization">Organization</label>
109 <div class="col-md-8 controls">
110 <select id="organization" required=required class=form-control>
111 <option value="<?php echo $tuser->organization; ?>" selected><?php echo $tuser->organization; ?></option>
112 <?php foreach(Auth::user()->getAccessList("group",true,false,false,true) as $tgrp): ?>
113 <option value="<?php echo $tgrp; ?>"><?php echo $tgrp; ?></option>
114 <?php endforeach; ?>
115 </select>
116 </div>
117 </div>-->
118 <div class="control-group">
119 <label class="col-md-4 control-label" for="organization">User Type</label>
120 <div class="col-md-8 controls">
121 <select id="usertype" required=required class="form-control">
122 <option value="<?php echo $tuser->usertype; ?>"><?php echo $tuser->usertype; ?></option>
123 <?php
124 $roles=\App\Models\Role::where('status','=','Active')->get();
125 foreach($roles as $trole)echo "<option value='".$trole->rolename."'>".$trole->rolename."</option>";
126 ?>
127 </select>
128 </div>
129 </div>
130
131
132 <div class="control-group">
133 <label class="col-md-4 control-label" for="usergroup">Group</label>
134 <div class="col-md-8 controls">
135 <select id="usergroup" required=required class=form-control>
136 <option value="<?php echo $tuser->group; ?>" selected><?php echo $tuser->group; ?></option>
137 <?php foreach(Auth::user()->getAccessList("group",true,false,false,true) as $tgrp): ?>
138 <option value="<?php echo $tgrp; ?>"><?php echo $tgrp; ?></option>
139 <?php endforeach; ?>
140 </select>
141 </div>
142 </div>
143
144 <!-- <div class="control-group">
145 <label class="col-md-4 control-label" for="usergroup">Chat/Voice Enabled</label>
146 <div class="col-md-8 controls">
147 <select id="uservoice" required=required class=form-control>
148 <option value="<?php echo $data['uservoice']; ?>" selected><?php echo $data['uservoice']; ?></option>
149 <option value="Active">Active</option>
150 <option value="InActive">InActive</option>
151 </select>
152 </div>
153 </div>-->
154
155 <hr><h2 style='padding-left:10%'>Modules Access</h2>
156
157 <div class="control-group">
158 <label class="col-md-4 control-label" for="">Read+Write+Admin</label>
159 <div class="col-md-8 controls">
160 <?php foreach(Config::get('app.app_modules') as $tmod=>$tmodarr)if(strstr(",".$role->modulerwa.",",",$tmod,"))echo $tmod.", "; ?>
161 </div>
162 </div><div style='clear:both'></div>
163 <div class="control-group">
164 <label class="col-md-4 control-label" for="modulerw">Read+Write</label>
165 <div class="col-md-8 controls">
166 <?php foreach(Config::get('app.app_modules') as $tmod=>$tmodarr)if(strstr(",".$role->modulerw.",",",$tmod,"))echo $tmod.", "; ?>
167 </div>
168 </div><div style='clear:both'></div>
169 <div class="control-group">
170 <label class="col-md-4 control-label" for="moduler">Read</label>
171 <div class="col-md-8 controls">
172 <?php foreach(Config::get('app.app_modules') as $tmod=>$tmodarr)if(strstr(",".$role->moduler.",",",$tmod,"))echo $tmod.", "; ?>
173 </div>
174 </div><div style='clear:both'></div>
175
176
177
178 <hr><h2 style='padding-left:10%'>Groups Access</h2>
179 <div class="control-group">
180 <label class="col-md-4 control-label" for="grouprwa">Read+Write+Admin</label>
181 <div class="col-md-8 controls">
182 <?php foreach(Config::get('app.app_groups') as $tmod)if(strstr(",".$role->grouprwa.",",",$tmod,"))echo $tmod.", "; ?>
183 </div>
184 </div><div style='clear:both'></div>
185 <div class="control-group">
186 <label class="col-md-4 control-label" for="grouprw">Read+Write</label>
187 <div class="col-md-8 controls">
188 <?php foreach(Config::get('app.app_groups') as $tmod)if(strstr(",".$role->grouprw.",",",$tmod,"))echo $tmod.", "; ?>
189 </div>
190 </div><div style='clear:both'></div>
191 <div class="control-group">
192 <label class="col-md-4 control-label" for="groupr">Read</label>
193 <div class="col-md-8 controls">
194 <?php foreach(Config::get('app.app_groups') as $tmod)if(strstr(",".$role->groupr.",",",$tmod,"))echo $tmod.", "; ?>
195 </div>
196 </div>
197
198
199 <div style='clear:both'></div>
200 <hr style='margin-bottom:20px'>
201
202 <div class="control-group">
203 <label class="col-md-4 control-label" for="groupr">Edit Client List</label>
204 <div class="col-md-8 controls">
205 <select id="clientslist" multiple="" data-rel="chosen" style='width:100%' class=select2multi>
206 <?php
207 $companyarr=$wakka->LoadAll("select * from hrms_masters where mtype='company'");
208 foreach($companyarr as $tcompany)
209 {
210 $seltxt='';
211 if(strstr(",".$clientslist.",",",$tcompany[mkey],"))$seltxt='selected="selected"';
212 echo "<option value='$tcompany[mkey]' $seltxt>$tcompany[mkey]</option>";
213 }
214 ?>
215 </select>
216 </div>
217 </div>
218 <div class="control-group">
219 <label class="col-md-4 control-label" for="groupr">Owner Client List</label>
220 <div class="col-md-8 controls">
221 <select id="clientsownerlist" multiple="" data-rel="chosen" style='width:100%' class=select2multi>
222 <?php
223 $companyarr=$wakka->LoadAll("select * from hrms_masters where mtype='company'");
224 foreach($companyarr as $tcompany)
225 {
226 $seltxt='';
227 if(strstr(",".$clientsownerlist.",",",$tcompany[mkey],"))$seltxt='selected="selected"';
228 echo "<option value='$tcompany[mkey]' $seltxt>$tcompany[mkey]</option>";
229 }
230 ?>
231 </select>
232 </div>
233 </div>
234 <div class="control-group">
235 <label class="col-md-4 control-label" for="groupr">Readonly Client List</label>
236 <div class="col-md-8 controls">
237 <select id="roclientsownerlist" multiple="" data-rel="chosen" style='width:100%' class=select2multi>
238 <?php
239 $companyarr=$wakka->LoadAll("select * from hrms_masters where mtype='company'");
240 foreach($companyarr as $tcompany)
241 {
242 $seltxt='';
243 if(strstr(",".$roclientsownerlist.",",",$tcompany[mkey],"))$seltxt='selected="selected"';
244 echo "<option value='$tcompany[mkey]' $seltxt>$tcompany[mkey]</option>";
245 }
246 ?>
247 </select>
248 </div>
249 </div>
250 <div class="control-group">
251 <label class="col-md-4 control-label" for="groupr">Read Other Data</label>
252 <div class="col-md-8 controls">
253 <select id="readotherdata" multiple="" data-rel="chosen" style='width:100%' class=select2multi>
254 <option value="Yes" <?php if($readotherdata=='Yes')echo 'selected=selected'; ?> >Yes</option>
255 <option value="No" <?php if($readotherdata=='No')echo 'selected=selected'; ?> >No</option>
256 </select>
257 </div>
258 </div>
259 <div class="control-group">
260 <label class="col-md-4 control-label" for="groupr">Account Owner</label>
261 <div class="col-md-8 controls">
262 <select id="accclientsownerlist" multiple="" data-rel="chosen" style='width:100%' class=select2multi>
263 <?php
264 $companyarr=$wakka->LoadAll("select * from hrms_masters where mtype='company'");
265 foreach($companyarr as $tcompany)
266 {
267 $seltxt='';
268 if(strstr(",".$accclientsownerlist.",",",$tcompany[mkey],"))$seltxt='selected="selected"';
269 echo "<option value='$tcompany[mkey]' $seltxt>$tcompany[mkey]</option>";
270 }
271 ?>
272 </select>
273 </div>
274 </div>
275 <div class="control-group">
276 <label class="col-md-4 control-label" for="groupr">Recruitment Owner</label>
277 <div class="col-md-8 controls">
278 <select id="recclientsownerlist" multiple="" data-rel="chosen" style='width:100%' class=select2multi>
279 <?php
280 $companyarr=$wakka->LoadAll("select * from hrms_masters where mtype='company'");
281 foreach($companyarr as $tcompany)
282 {
283 $seltxt='';
284 if(strstr(",".$recclientsownerlist.",",",$tcompany[mkey],"))$seltxt='selected="selected"';
285 echo "<option value='$tcompany[mkey]' $seltxt>$tcompany[mkey]</option>";
286 }
287 ?>
288 </select>
289 </div>
290 </div>
291 <div class="control-group">
292 <label class="col-md-4 control-label" for="groupr">BDM Owner</label>
293 <div class="col-md-8 controls">
294 <select id="bdmclientsownerlist" multiple="" data-rel="chosen" style='width:100%' class=select2multi>
295 <?php
296 $companyarr=$wakka->LoadAll("select * from hrms_masters where mtype='company'");
297 foreach($companyarr as $tcompany)
298 {
299 $seltxt='';
300 if(strstr(",".$bdmclientsownerlist.",",",$tcompany[mkey],"))$seltxt='selected="selected"';
301 echo "<option value='$tcompany[mkey]' $seltxt>$tcompany[mkey]</option>";
302 }
303 ?>
304 </select>
305 </div>
306 </div>
307
308 <div style='clear:both'></div>
309 <br><hr><br>
310
311
312
313 <div class="control-group">
314 <label class="col-md-4 control-label" for="username">L-Team</label>
315 <div class="col-md-8 controls">
316 <input class="form-control" id="lteam" type="text" value="<?php echo $tuser->lteam; ?>" />
317 </div>
318 </div>
319 <div class="control-group">
320 <label class="col-md-4 control-label" for="username">One Down L-Team</label>
321 <div class="col-md-8 controls">
322 <input class="form-control" id="lteam2" type="text" value="<?php echo $tuser->lteam2; ?>" />
323 </div>
324 </div>
325 <div class="control-group">
326 <label class="col-md-4 control-label" for="username">Supervisor</label>
327 <div class="col-md-8 controls">
328 <input class="form-control" id="supervisor" type="text" value="<?php echo $tuser->supervisor; ?>" />
329 </div>
330 </div>
331
332 <div style='clear:both'></div>
333 <br><hr><br>
334
335 <?php
336 if(!isset($data['personal']['doj']))$data['personal']['doj']='';
337 if(!isset($data['personal']['level']))$data['personal']['level']='';
338 if(!isset($data['personal']['department']))$data['personal']['department']='';
339 if(!isset($data['personal']['function']))$data['personal']['function']='';
340 if(!isset($data['personal']['domainid']))$data['personal']['domainid']='';
341 if(!isset($data['personal']['entity']))$data['personal']['entity']='';
342 if(!isset($data['personal']['category']))$data['personal']['category']='';
343 if(!isset($data['personal']['country']))$data['personal']['country']='';
344 if(!isset($data['personal']['location']))$data['personal']['location']='';
345 if(!isset($data['personal']['sublocation']))$data['personal']['sublocation']='';
346 if(!isset($data['personal']['section']))$data['personal']['section']='';
347 if(!isset($data['personal']['lob']))$data['personal']['lob']='';
348 if(!isset($data['personal']['gender']))$data['personal']['gender']='';
349
350 if(!isset($data['subscriptioncredits']))$data['subscriptioncredits']='';
351 ?>
352 <div class="control-group">
353 <label class="col-md-4 control-label" for="username">DOJ</label>
354 <div class="col-md-8 controls">
355 <input class="form-control" id="doj" type="text" value="<?php echo $data['personal']['doj']; ?>" />
356 </div>
357 </div>
358 <div class="control-group">
359 <label class="col-md-4 control-label" for="username">Level</label>
360 <div class="col-md-8 controls">
361 <input class="form-control" id="level" type="text" value="<?php echo $data['personal']['level']; ?>" />
362 </div>
363 </div>
364 <div class="control-group">
365 <label class="col-md-4 control-label" for="username">Department</label>
366 <div class="col-md-8 controls">
367 <input class="form-control" id="department" type="text" value="<?php echo $data['personal']['department']; ?>" />
368 </div>
369 </div>
370 <div class="control-group">
371 <label class="col-md-4 control-label" for="username">Function</label>
372 <div class="col-md-8 controls">
373 <input class="form-control" id="function" type="text" value="<?php echo $data['personal']['function']; ?>" />
374 </div>
375 </div>
376 <div class="control-group">
377 <label class="col-md-4 control-label" for="username">Domain ID</label>
378 <div class="col-md-8 controls">
379 <input class="form-control" id="domainid" type="text" value="<?php echo $data['personal']['domainid']; ?>" />
380 </div>
381 </div>
382 <div class="control-group">
383 <label class="col-md-4 control-label" for="username">Entity</label>
384 <div class="col-md-8 controls">
385 <input class="form-control" id="entity" type="text" value="<?php echo $data['personal']['entity']; ?>" />
386 </div>
387 </div>
388 <div class="control-group">
389 <label class="col-md-4 control-label" for="username">Category</label>
390 <div class="col-md-8 controls">
391 <input class="form-control" id="category" type="text" value="<?php echo $data['personal']['category']; ?>" />
392 </div>
393 </div>
394 <div class="control-group">
395 <label class="col-md-4 control-label" for="username">Country</label>
396 <div class="col-md-8 controls">
397 <input class="form-control" id="country" type="text" value="<?php echo $data['personal']['country']; ?>" />
398 </div>
399 </div>
400 <div class="control-group">
401 <label class="col-md-4 control-label" for="username">Location</label>
402 <div class="col-md-8 controls">
403 <input class="form-control" id="location" type="text" value="<?php echo $data['personal']['location']; ?>" />
404 </div>
405 </div>
406 <div class="control-group">
407 <label class="col-md-4 control-label" for="username">Sub Location</label>
408 <div class="col-md-8 controls">
409 <input class="form-control" id="sublocation" type="text" value="<?php echo $data['personal']['sublocation']; ?>" />
410 </div>
411 </div>
412 <div class="control-group">
413 <label class="col-md-4 control-label" for="username">Extension</label>
414 <div class="col-md-8 controls">
415 <input class="form-control" id="exten" type="text" value="<?php echo $tuser->exten; ?>" />
416 </div>
417 </div>
418 <div class="control-group">
419 <label class="col-md-4 control-label" for="username">Section</label>
420 <div class="col-md-8 controls">
421 <input class="form-control" id="section" type="text" value="<?php echo $data['personal']['section']; ?>" />
422 </div>
423 </div>
424 <div class="control-group">
425 <label class="col-md-4 control-label" for="username">LOB</label>
426 <div class="col-md-8 controls">
427 <input class="form-control" id="lob" type="text" value="<?php echo $data['personal']['lob']; ?>" />
428 </div>
429 </div>
430 <div class="control-group">
431 <label class="col-md-4 control-label" for="username">Gender</label>
432 <div class="col-md-8 controls">
433 <input class="form-control" id="gender" type="text" value="<?php echo $data['personal']['gender']; ?>" />
434 </div>
435 </div>
436 <div class="control-group">
437 <label class="col-md-4 control-label" for="username">Credits</label>
438 <div class="col-md-8 controls">
439 <input class="form-control" id="subscriptioncredits" type="text" value="<?php echo $data['subscriptioncredits']; ?>" />
440 </div>
441 </div>
442
443 <div class="control-group">
444 <label class="col-md-4 control-label" for="sessiontype">Login Type</label>
445 <div class="col-md-8 controls">
446 <select id="sessiontype" name="sessiontype" data-rel="chosen" style='width:100%' class=select2multi>
447 <option value='0' <?php echo ($tuser->sessiontype == '0') ? 'selected="selected"' : ''?>>WebRTC</option>
448 <option value='1' <?php echo ($tuser->sessiontype == '1') ? 'selected="selected"' : ''?>>PSTNWeb</option>
449 <option value='2' <?php echo ($tuser->sessiontype == '2') ? 'selected="selected"' : ''?>>MAgent Missed Call</option>
450 <option value='3' <?php echo ($tuser->sessiontype == '3') ? 'selected="selected"' : ''?>>MAgent Outbound</option>
451 </select>
452 </div>
453 </div>
454
455 <div class="form-actions">
456 <button type="submit" class="btn btn-primary" onclick='editUserForm();return false;'>Save changes</button>
457 </div>
458 </fieldset>
459 </form>
460
461 <div class="col-separator-h box"></div>
462 <div class=innerAll>
463 <form method=post enctype="multipart/form-data" target="userfilepost" action="user">
464 <input type=hidden name=user value='<?php echo $tuser->id; ?>' />
465 <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>" />
466 <input type="hidden" name="action" value="userbusyfile" />
467 <div class="control-group">
468 <label class="col-md-4 control-label" for="">Busy Message <span></span></label>
469 <div class="col-md-8 controls">
470 <input class="form-control" name="busyfile" type="file" value="" />
471 </div>
472 </div>
473 <div class="form-actions">
474 <button type="submit" class="btn btn-primary">Save File</button>
475 </div>
476 </form>
477 <iframe name=userfilepost id=userfilepost style='height:0px;width:0px;overflow:none;display:none' src='about:blank'></iframe>
478 </div>
479
480 <script>
481 <?php if(isset($displaymsg)): ?>
482 simpleNotification("<?php echo $displaymsg['type']; ?>","topRight","<?php echo $displaymsg['text']; ?>");
483 <?php endif; ?>
484 function editUserForm()
485 {
486 var putdata="csrftoken=<?php echo Session::token(); ?>";
487 putdata+="&username="+$("#username").val();
488 putdata+="&password="+$("#password").val();
489 putdata+="&fullname="+$("#fullname").val();
490
491 putdata+="&usertype="+$("#usertype").val();
492
493 putdata+="&email="+$("#email").val();
494 putdata+="&userstatus="+$("#userstatus").val();
495 // putdata+="&organization="+$("#organization").val();
496 putdata+="&usergroup="+$("#usergroup").val();
497 putdata+="&uservoice=";//+$("#uservoice").val();
498
499
500 putdata+="&modulerwa="+$("#modulerwa").val();
501 putdata+="&modulerw="+$("#modulerw").val();
502 putdata+="&moduler="+$("#moduler").val();
503
504 putdata+="&grouprwa="+$("#grouprwa").val();
505 putdata+="&grouprw="+$("#grouprw").val();
506 putdata+="&groupr="+$("#groupr").val();
507
508
509
510 putdata+="&clientslist="+$("#clientslist").val();
511 putdata+="&clientsownerlist="+$("#clientsownerlist").val();
512 putdata+="&roclientsownerlist="+$("#roclientsownerlist").val();
513 putdata+="&readotherdata="+$("#readotherdata").val();
514 putdata+="&accclientsownerlist="+$("#accclientsownerlist").val();
515 putdata+="&recclientsownerlist="+$("#recclientsownerlist").val();
516 putdata+="&bdmclientsownerlist="+$("#bdmclientsownerlist").val();
517
518 putdata+="&feedbacktxt="+$("#feedbacktxt").val();
519
520 putdata+="&exten="+$("#exten").val();
521
522 putdata+="&lteam="+$("#lteam").val();
523 putdata+="&lteam2="+$("#lteam2").val();
524 putdata+="&supervisor="+$("#supervisor").val();
525
526 putdata+="&doj="+$("#doj").val();
527 putdata+="&level="+$("#level").val();
528 putdata+="&department="+$("#department").val();
529 putdata+="&function="+$("#function").val();
530 putdata+="&domainid="+$("#domainid").val();
531 putdata+="&entity="+$("#entity").val();
532 putdata+="&category="+$("#category").val();
533 putdata+="&country="+$("#country").val();
534 putdata+="&location="+$("#location").val();
535 putdata+="&sublocation="+$("#sublocation").val();
536 putdata+="&section="+$("#section").val();
537 putdata+="&lob="+$("#lob").val();
538 putdata+="&gender="+$("#gender").val();
539 putdata+="&subscriptioncredits="+$("#subscriptioncredits").val();
540 putdata+="&sessiontype="+$("#sessiontype").val();
541
542 doAjax('user/<?php echo $tuser->id; ?>',putdata,'userformdiv','ajax_users_update','singlethis','PUT');
543 }
544 </script>
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 <?php
2 use App\Models\User;
3
4
5 //if(!Session::has("adminmonitordate"))Session::put("adminmonitordate","2000-01-01 00:00:00");
6 //$lastdate=Session::get('adminmonitordate');
7 $onlineusers=User::where("presence","=","1")->orderBy("updated_at","DESC")->take(500)->get();
8 $posts=array();//Post::where('status','!=','deleted')->where("updated_at",">",$lastdate)->orderBy("updated_at","DESC")->take(100)->get();
9 $lastdate="";
10 //Session::put("adminmonitordate",date("Y-m-d H:i:s"));
11
12 ?>
13 <style>
14 .heading-buttons h4{
15 line-height:20px;
16 }
17 </style>
18 <!-- col -->
19 <div class="col-md-12">
20
21 <!-- col-separator.box -->
22 <div class="col-separator col-separator-first col-unscrollable box">
23
24 <!-- col-table -->
25 <div class="col-table" id=authorworkspacediv>
26 <!-- Search Bar -->
27 <div class="input-group">
28 <input type="text" class="form-control" placeholder="Search for Users/ Group / Courses...">
29 <span class="input-group-btn">
30 <button class="btn btn-primary rounded-none" type="button"><i class="fa fa-search"></i></button>
31 </span>
32 </div>
33 <div class="col-separator-h"></div>
34 <!-- End Search Bar -->
35
36 <div class="col-table-row">
37
38 <div class="col-app col-unscrollable">
39
40 <!-- Category Heading -->
41 <div class="heading-buttons bg-gray border-bottom innerR half">
42 <a href="#" class="btn btn-sm btn-inverse pull-right" onclick='return false;' style='margin-right:5px'><i class="fa fa-user fa-fw"></i> <?php echo sizeof($onlineusers); ?> User</a>
43 <a href="#" class="btn btn-sm btn-inverse pull-right" onclick='adminlogoutall();return false;' style='margin-right:5px'><i class="fa fa-user fa-fw"></i> Logout All</a>
44 <h4 class="innerTB margin-bottom-none">Online Users</h4>
45 </div>
46 <!-- End Category Heading -->
47 <div class=innerAll>
48 <ul class="list-group list-group-1 borders-none margin-none">
49 <?php
50 $i=0;
51 foreach($onlineusers as $tuser)
52 {
53 echo "<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>";
54 if($i++>200)break;
55 }
56 ?>
57 </ul>
58 </div>
59
60
61 <div class="col-separator-h"></div>
62
63 <!-- Category Heading -->
64 <div class="heading-buttons bg-gray border-bottom innerR half">
65 <!-- <a href="#" class="btn btn-sm btn-inverse pull-right"><i class="fa fa-plus fa-fw"></i> New Group</a> -->
66 <h4 class="innerTB margin-bottom-none">Admin Actions</h4>
67 </div>
68 <!-- End Category Heading -->
69
70 <div class=innerAll>
71
72 <div class=col-md-6>
73 <button class="btn btn-primary" onclick='window.open("admin?dlemp=all&nodebug=1")'>Download All Employees</button> <button class="btn btn-primary" onclick='window.open("admin?dlemp=empty&nodebug=1")'>Download Empty Employees</button><br>
74 </div>
75 <div class=col-md-6>
76 <form method=post enctype="multipart/form-data" action='admin?action=mmtbulkupload' target='empblkuploaddiv'>
77 <input type=hidden name=_token value=<?php echo csrf_token(); ?>>
78 <input type=hidden name=empbulkaction value='upload'>
79 <div class="fileupload fileupload-new margin-none" data-provides="fileupload">
80 <div class="input-group">
81 <div class="form-control col-md-3"><i class="fa fa-file fileupload-exists"></i> <span class="fileupload-preview"></span></div>
82 <span class="input-group-btn">
83 <span class="btn btn-default btn-file"><span class="fileupload-new">Select file</span><span class="fileupload-exists">Change</span><input type="file" name=empbulkfile id=empbulkfile class="margin-none"></span><a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Remove</a><span class="btn btn-default" onclick='document.forms[0].submit();'>Upload</span>
84 </span>
85 </div>
86 </div>
87 </form>
88 <iframe id='empblkuploaddiv' name='empblkuploaddiv' style='width:1px;height:1px;visibility:hidden;display:none'></iframe>
89
90
91 </div><div style='clear:both'></div>
92
93 </div>
94 <div class="col-separator-h"></div>
95
96 <div class=innerAll>
97 <button class="btn btn-primary" onclick='window.open("web/monthdashboard?sdate=<?php echo date("Y-m"); ?>-01&edate=<?php echo date("Y-m"); ?>-31")'>Monthly Report</button>
98 <button class="btn btn-primary" onclick='window.open("admin/dllogfile")'>App Logs</button>
99 </div>
100
101 <!-- // END col-separator -->
102 <div class="col-separator-h"></div>
103
104
105 <!-- Heading -->
106 <h5 class="innerAll margin-none bg-primary">
107 <i class="fa fa-fw fa-book"></i> Application Stats
108 <!-- <a href="#" class="btn btn-sm btn-inverse pull-right btn-xs" style="margin-top: -5px;"><i class="fa fa-plus fa-fw"></i>Add New</a> -->
109 </h5>
110
111
112
113 <!-- Listing -->
114 <div class="bg-gray-hover innerAll border-bottom">
115 <div class="media">
116 <div style="height:39px; width:39px; overflow:hidden" class="pull-left">
117 <a href="#" class="pull-left">
118 <img src="assets/images/people/avatar.jpg" class="media-object" width="39"/>
119 </a>
120 </div>
121 <a class="pull-right innerAll" href="#">
122 <!-- <span class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i></span> -->
123 </a>
124 <div class="media-body">
125 <?php $totalusers=User::where('status','!=','Disabled')->count();$totalactive=\App\Models\User::where('status','=','Active')->where('usertype','!=','')->count();$totalactivemtd=\App\Models\User::where('status','=','Active')->where('usertype','!=','')->where('updated_at','>',date('Y-m-01 00:00:00'))->count(); ?>
126 <h5>Users <?php echo $totalactivemtd; ?> MTD/<?php echo $totalactive; ?> Active</h5>
127 <div class="media-body" title="<?php echo $totalactivemtd; ?>/<?php echo $totalactive; ?> MTD Active/Total Active, <?php echo round($totalactivemtd*100/$totalactive,1); ?>%">
128 <div class="progress progress-small margin-none">
129 <div class="progress-bar progress-bar-primary" style="width: <?php echo round($totalactivemtd*100/$totalactive,1); ?>%"></div>
130 </div>
131 </div>
132 </div>
133 </div>
134 </div>
135 <!-- Listing ends-->
136 <!-- Listing -->
137 <div class="bg-gray-hover innerAll border-bottom">
138 <div class="media">
139 <div style="height:39px; width:39px; overflow:hidden" class="pull-left">
140 <a href="#" class="pull-left">
141 <img src="assets/images/people/avatar.jpg" class="media-object" width="39"/>
142 </a>
143 </div>
144 <a class="pull-right innerAll" href="#">
145 <!-- <span class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i></span> -->
146 </a>
147 <div class="media-body">
148 <h5>Total Users <?php echo $totalactivemtd; ?>/<?php echo $totalactive; ?>/<?php echo $totalusers; ?></h5>
149 <div class="media-body" title="<?php echo $totalactive; ?>/<?php echo $totalusers; ?> Active/Total , <?php echo round($totalactive*100/$totalusers,1); ?>%">
150 <div class="progress progress-small margin-none">
151 <div class="progress-bar progress-bar-primary" style="width: <?php echo round($totalactive*100/$totalusers,1); ?>%"></div>
152 </div>
153 </div>
154 </div>
155 </div>
156 </div>
157 <!-- Listing ends-->
158
159 <!-- Listing -->
160 <div class="bg-gray-hover innerAll border-bottom">
161 <div class="media">
162 <div style="height:39px; width:39px; overflow:hidden" class="pull-left">
163 <a href="#" class="pull-left">
164 <img src="assets/images/people/author_file.jpg" class="media-object" width="39"/>
165 </a>
166 </div>
167 <a class="pull-right innerAll" href="#">
168 <!-- <span class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i></span> -->
169 </a>
170 <div class="media-body">
171 <?php $spaceuse=round(User::sum('diskuse')/1024/1024,1); $allowedspace=1024*100; ?>
172 <h5><?php echo $spaceuse; ?> MB Space Usages</h5>
173 <div class="media-body" title='<?php echo round($allowedspace/1024,1); ?> GB Limit'>
174 <div class="progress progress-small margin-none">
175 <div class="progress-bar progress-bar-primary" style="width: <?php echo round($spaceuse*100/$allowedspace,1)<0.5?0.5:round($spaceuse*100/$allowedspace,1); ?>%"></div>
176 </div>
177 </div>
178 </div>
179 </div>
180 </div>
181 <!-- Listing ends-->
182
183
184
185 <!-- Listing -->
186 <div class="bg-gray-hover innerAll border-bottom">
187 <div class="media">
188 <div style="height:39px; width:39px; overflow:hidden" class="pull-left">
189 <a href="#" class="pull-left">
190 <img src="assets/images/people/author_content.jpg" class="media-object" width="39"/>
191 </a>
192 </div>
193 <a class="pull-right innerAll" href="#">
194 <!-- <span class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i></span> -->
195 </a>
196 <div class="media-body">
197
198 </div>
199 </div>
200 </div>
201 <!-- Listing ends-->
202
203 <!-- // END col-table -->
204 <div class="col-separator-h"></div>
205
206 </div>
207 <!-- // END col-separator.box -->
208
209
210 </div>
211
212 <script>
213 function adminlogoutall()
214 {
215 doAjax('admin?action=userlogoutall','','','ajax_users_logout','singlethis','POST');
216 }
217 </script>
218
219 </div>
220 </div>
221 </div>
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 = 'Contactability Report';
3 $returnblade = 'contactability';
4
5 $userstatus_array = array("Contacted", "Not Contacted", "FORCEDCLOSE");
6 foreach($userstatus_array AS $userstatus) {
7 $userstatus_array1[$userstatus] = array($userstatus);
8 $userstatus_array2[$userstatus] = array();
9 }
10
11 $view_path = Config::get('view.paths');
12 include_once($view_path[0].'/layout/module/dialer/reporthead.blade.php');
13
14 $alist=$alist->whereIn('userstatus', array_merge($userstatus_array, array("REDIAL")) );
15 $alist=$alist->get();
16
17 $i=1;
18 $reporthead=array("#","Telecaller","TelecallerID","Supervisor","Customers","Total");
19 $reporthead=array_merge($reporthead, $userstatus_array,$userstatus_array1);
20 $reportarray=array();
21 foreach($alist as $aline)
22 {
23 $tuser=$userarr[$aline->user_id];
24 $aline->userstatus = ($aline->userstatus != 'REDIAL') ? $aline->userstatus : 'Not Contacted';
25
26 if(!isset($reportarray[$aline->user_id])) {
27 $reportarray[$aline->user_id]=array_merge( array("#"=>$i++,"Telecaller"=>$tuser->telecaller,"TelecallerID"=>$tuser->username,"Supervisor"=>$tuser->sepervisor,"Customers"=>0,"Total"=>0),$userstatus_array2,array("Customer_lists"=>array()));
28 }
29
30 if(!is_null($aline->lan)) {
31 $reportarray[$aline->user_id]["Customer_lists"][] = $aline->lan;
32 }
33 $reportarray[$aline->user_id]["Customers"] = count(array_unique($reportarray[$aline->user_id]["Customer_lists"]));
34 $reportarray[$aline->user_id]["Total"]++;
35
36 $ststr=$aline->action_code;
37 if(!in_array($ststr,$reporthead[$aline->userstatus]))$reporthead[$aline->userstatus][]=$ststr;
38 $reportarray[$aline->user_id][$aline->userstatus][$aline->userstatus]++;
39 $reportarray[$aline->user_id][$aline->userstatus][$aline->action_code]++;
40 }
41
42 $highestColumn = sizeof($reporthead);
43 if(count($reportarray)) {
44 $outhead="<tr>";$outstr="";$outsubhead="<tr>";
45 foreach ($reporthead as $head => $headval){
46 if($reporthead[$head] == '#') {
47 $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>";
48 $outhead.="<td rowspan=2>".$mode_str."</td>";
49 }
50 else {
51 if(!is_array($headval)) {
52 if(array_key_exists($headval, $reporthead)) {
53 $outhead.="<td colspan=".count($reporthead[$headval]).">".$headval."</td>";
54 foreach ($reporthead[$headval] as $subhead) {
55 $outsubhead.="<td>".$subhead."</td>";
56 }
57 }
58 else {
59 $outhead.="<td rowspan=2>".$headval."</td>";
60 }
61 }
62 }
63 }
64 $outsubhead.="</tr>";
65 $outhead.="</tr>".$outsubhead;
66 $utotalarr = array("Telecaller"=>'Total');
67 foreach($reportarray as $uid=>$uarr)
68 {
69 $outstr.="<tr>";
70 for ($head = 0; $head < $highestColumn; $head++){
71 if($head < 4) {
72 $data_str = $uarr[$reporthead[$head]];
73 $outstr.="<td>".$data_str."</td>";
74 }
75 elseif($head < 5) {
76 $data_str = $uarr[$reporthead[$head]];
77 $utotalarr[$reporthead[$head]] += $uarr[$reporthead[$head]];
78 $outstr.="<td>".$data_str."</td>";
79 }
80 elseif($head < 6) {
81 $data_str1 = $uarr[$reporthead[$head]];
82 $utotalarr[$reporthead[$head]] += $data_str1;
83 $data_str = '<span class="summation" style="display:block;">'.$data_str1.'</span>';
84 $data_str .= '<span class="percent" style="display:none;">'.number_format(@($data_str1/$uarr['Total']) * 100, 2 ).'%</span>';
85 $data_str = '<a href="#" onclick="breakupXls(\'contactability\',\''.$uid.'\',\''.$reporthead[$head].'\')">' . $data_str . '</a>';
86 $outstr.="<td>".$data_str."</td>";
87 }
88 else {
89 if(is_array($uarr[$reporthead[$head]])) {
90 foreach($reporthead[$reporthead[$head]] AS $subval) {
91 $data_str1 = $uarr[$reporthead[$head]][$subval];
92 $utotalarr[$subval] += $data_str1;
93 $data_str = '<span class="summation" style="display:block;">'.$data_str1.'</span>';
94 $data_str .= '<span class="percent" style="display:none;">'.number_format(@($data_str1/$uarr['Total']) * 100, 2 ).'%</span>';
95 $data_str = '<a href="#" onclick="breakupXls(\'contactability\',\''. $uid.'\',\''.$reporthead[$head] .'||'.$subval.'\')">' . $data_str . '</a>';
96 $outstr.="<td>".$data_str."</td>";
97 }
98 }
99 }
100 }
101 $outstr.="</tr>";
102 }
103
104 $outstr.="<tr>";
105 foreach ($reporthead as $head => $headval){
106 if(is_int($head) && $head < 5) {
107 @($data_str = $utotalarr[$headval]);
108 $outstr.="<td>".$data_str."</td>";
109 }
110 elseif(is_int($head) && $head < 6) {
111 $data_str = '<span class="summation" style="display:block;">'.$utotalarr[$headval].'</span>';
112 $data_str .= '<span class="percent" style="display:none;">'.number_format(@($utotalarr[$headval]/$utotalarr['Total']) * 100, 2 ).'%</span>';
113 $data_str = '<a href="#" onclick="breakupXls(\'contactability\',\'All\',\''.$headval.'\')">' . $data_str . '</a>';
114 $outstr.="<td>".$data_str."</td>";
115 }
116 else {
117 if(!is_array($headval)) {
118 if(array_key_exists($headval, $reporthead)) {
119 foreach ($reporthead[$headval] as $subhead) {
120 $data_str = '<span class="summation" style="display:block;">'.$utotalarr[$subhead].'</span>';
121 $data_str .= '<span class="percent" style="display:none;">'.number_format(@($utotalarr[$subhead]/$utotalarr['Total']) * 100, 2 ).'%</span>';
122 $data_str = '<a href="#" onclick="breakupXls(\'contactability\',\'All\',\''.$headval.'||'.$subhead.'\')">' . $data_str . '</a>';
123 $outstr.="<td>".$data_str."</td>";
124 }
125 }
126 }
127 }
128 }
129 $outstr.="</tr>";
130 }
131 else {
132 $outhead.="<tr><td>No Records Found.</td></tr>";
133 }
134
135 if(Input::has("dllogxls"))
136 {
137 include_once(app_path().'/lib/phpexcel/PHPExcel.php');
138
139 $inputFileType = "Excel5";
140 $objReader = PHPExcel_IOFactory::createReader($inputFileType);
141 $objPHPExcel = $objReader->load("assets/extras/blank.xls");
142 $baseRow = 2;
143
144 $index_count = 0;
145 foreach ($reporthead as $head => $headval){
146 if(!is_array($headval)) {
147 if(array_key_exists($headval, $reporthead)) {
148 foreach ($reporthead[$headval] as $subhead) {
149 $colstr=PHPExcel_Cell::stringFromColumnIndex($index_count);
150 $objPHPExcel->getActiveSheet()->setCellValue($colstr."1", $subhead);
151 $index_count++;
152 }
153 }
154 else {
155 $colstr=PHPExcel_Cell::stringFromColumnIndex($index_count);
156 $objPHPExcel->getActiveSheet()->setCellValue($colstr."1", $headval);
157 $index_count++;
158 }
159 }
160 }
161
162 foreach($reportarray as $uid=>$uarr)
163 {
164 $row = $baseRow++;
165 $index_count = 0;
166 foreach ($reporthead as $head => $headval){
167 if(!is_array($headval)) {
168 if(array_key_exists($headval, $reporthead)) {
169 foreach ($reporthead[$headval] as $subhead) {
170 $colstr=PHPExcel_Cell::stringFromColumnIndex($index_count);
171 $objPHPExcel->getActiveSheet()->setCellValue($colstr.$row, $uarr[$headval][$subhead]);
172 $index_count++;
173 }
174 }
175 else {
176 $colstr=PHPExcel_Cell::stringFromColumnIndex($index_count);
177 $objPHPExcel->getActiveSheet()->setCellValue($colstr.$row, $uarr[$headval]);
178 $index_count++;
179 }
180 }
181 }
182
183 }
184
185 $row++; $index_count = 0;
186 foreach ($reporthead as $head => $headval){
187 if(!is_array($headval)) {
188 if(array_key_exists($headval, $reporthead)) {
189 foreach ($reporthead[$headval] as $subhead) {
190 $colstr=PHPExcel_Cell::stringFromColumnIndex($index_count);
191 $objPHPExcel->getActiveSheet()->setCellValue($colstr.$row, $utotalarr[$subhead]);
192 $index_count++;
193 }
194 }
195 else {
196 $colstr=PHPExcel_Cell::stringFromColumnIndex($index_count);
197 $objPHPExcel->getActiveSheet()->setCellValue($colstr.$row, $utotalarr[$headval]);
198 $index_count++;
199 }
200 }
201 }
202
203 header('Content-Type: application/vnd.ms-excel');
204 header('Content-Disposition: attachment;filename="contactability.xls"');
205 header('Cache-Control: max-age=0');
206
207 $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, $inputFileType);
208 $objWriter->save('php://output');
209
210 return ;
211 }
212
213 //charts
214 $cat1=array();
215 $cat1arr=array();
216 foreach($reportarray as $uid=>$uarr)
217 {
218 $cat1[]="'$uarr[Telecaller]'";
219
220 foreach ($userstatus_array as $value) {
221 $cat1arr[$value][$uarr["#"]]=round($uarr[$value][$value],1);
222 if(empty($cat1arr[$value][$uarr["#"]]))$cat1arr[$value][$uarr["#"]]=0;
223 }
224 }
225
226 $cat1arrstr="";
227 foreach($cat1arr as $name=>$data)
228 {
229 $cat1arrstr.="{ name: '$name',\ndata : [";
230 $cat1arrstr.=implode(",",$data);
231 $cat1arrstr.="] $extra },\n";
232 }
233
234 $cat2=array();
235 foreach($reportarray as $uid=>$uarr)
236 {
237 foreach ($userstatus_array as $value) {
238 $cat2["'".$value."'"]+=round($uarr[$value][$value],1);
239 }
240 }
241 ?>
242
243 <?php echo $__env->make('layout.module.dialer.searchform', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
244
245 <div class=col-md-6 style='border:1px solid #BBB;'>
246 <div id=userlogschart1 style='min-height:250px;width:100%'></div>
247 </div>
248 <div class=col-md-6 style='border:1px solid #BBB;'>
249 <div id=userlogschart2 style='min-height:250px;width:100%'></div>
250 </div>
251 <div style='clear:both'></div>
252
253 <div style="overflow: auto; margin-top: 10px;">
254 <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;'>
255 <thead><?php echo $outhead; ?></thead>
256 <?php echo $outstr; ?>
257 </table>
258 </div>
259
260 </div>
261
262 <script>
263 $(function () {
264 $('#userlogschart1').highcharts({
265 chart: {
266 type: 'column'
267 },
268 title: {
269 text: 'User Contactability Status',
270 style: {
271 fontSize: '14px'
272 }
273 },
274 xAxis: {
275 labels:{
276 rotation: -45,
277 enabled:true//default is true
278 },
279 categories: [<?php echo implode(",",$cat1); ?>]
280 },
281 yAxis: {
282 min: 0,
283 title: {
284 text: ''
285 },
286 stackLabels: {
287 enabled: false,
288 }
289 },
290 tooltip: {
291 headerFormat: '<b>{point.x}</b><br/>',
292 pointFormat: '{series.name}: {point.y}<br/>Total: {point.stackTotal}'
293 },
294 plotOptions: {
295 column: {
296 stacking: 'normal',
297 dataLabels: {
298 enabled: false,
299 }
300 }
301 },
302 series: [<?php echo $cat1arrstr; ?>]
303 });
304 });
305
306 $(function () {
307 $('#userlogschart2').highcharts({
308 chart: {
309 type: 'column'
310 },
311 title: {
312 text: 'Contactability Status',
313 style: {
314 fontSize: '14px'
315 }
316 },
317 subtitle: {
318 text: ''
319 },
320 xAxis: {
321 categories: [<?php echo implode(",",array_keys($cat2)); ?>],
322 crosshair: true,
323 labels:{
324 enabled:true//default is true
325 },
326 },
327 yAxis: {
328 min: 0,
329 title: {
330 text: ''
331 }
332 },
333 tooltip: {
334 headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
335 pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
336 '<td style="padding:0"><b>{point.y}</b></td></tr>',
337 footerFormat: '</table>',
338 shared: true,
339 useHTML: true
340 },
341 plotOptions: {
342 column: {
343 pointPadding: 0.2,
344 borderWidth: 0
345 }
346 },
347 series: [{
348 name: 'Count',
349 data: [<?php echo implode(",",array_values($cat2)); ?>]
350
351 },]
352 });
353 });
354 </script>
...\ 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>
1 <?php
2 use App\Jobs\KHRMSLib;
3 use \App\Models\User;
4
5 function gitVersion(){
6 exec('git describe --always',$version_mini_hash);
7 exec('git rev-list HEAD | wc -l',$version_number);
8 exec('git log -1',$line);
9 $version['short'] = "v0.".trim($version_number[0]);
10 $version['full'] = "v0.".trim($version_number[0]).".$version_mini_hash[0] (".str_replace('commit ','',$line[0]).")";
11 $version['date'] = $line[3];
12 return $version;
13 }
14 // $version = gitVersion();
15
16 if(Input::get('sendotp')=="1")
17 {
18 $otpuser=trim(Input::get('otpuser'));
19 $user=User::where('username','=',$otpuser)->first();
20 if($user)
21 {
22 $otpemail=$user->email;
23 $otp=rand(100000, 999999);
24
25 $user->password=Hash::make($otp);
26
27 $meta=$user->meta();
28 if(!isset($meta['otp_array']))$meta['otp_array']=array();
29 if(!isset($meta['otp_array'][date('Ymd')])){$meta['otp_array']=array();$meta['otp_array'][date('Ymd')]=0;}
30 $meta['otp_array'][date('Ymd')]++;
31
32 if($meta['otp_array'][date('Ymd')]<=3)
33 {
34 $user->meta=json_encode($meta);
35 $user->save();
36
37 Mail::send('emails.notification',
38 array(
39 'heloname'=>'',
40 'line1'=>'Your OTP for Login : '.$otp.' ',
41 'line2'=>'Please visit <a href="'.URL::to('/').'"><b>'.Config::get("app.name").' </b></a> and You can login using this OTP.',
42 'line3'=>'',
43 'notifytype'=>'OTP'), function($message) use ($otpemail)
44 {
45 $message->to($otpemail,$otpemail);
46 $message->subject(Config::get("app.name")." OTP for Login");
47 });
48 echo "$(\"#alertdiv\").html('<div class=\"alert alert-success\"><button type=button class=close data-dismiss=alert>&times;</button><strong>Success</strong> OTP Sent to ($otpemail)</div>');";
49 }
50 else echo "$(\"#alertdiv\").html('<div class=\"alert alert-danger\"><button type=button class=close data-dismiss=alert>&times;</button><strong>Failed</strong> Too many reuests ($otpemail), please try after 24 hrs</div>');";
51 }
52 else echo "$(\"#alertdiv\").html('<div class=\"alert alert-danger\"><button type=button class=close data-dismiss=alert>&times;</button><strong>Failed</strong> Invalid User </div>');";
53 }
54 else
55 {
56
57 ?>
58
59 <?php echo $__env->make('layout.header', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
60
61
62 <style>
63 body {
64 background: url(assets/images/main.jpg) no-repeat center center fixed;
65 -webkit-background-size: cover;
66 -moz-background-size: cover;
67 -o-background-size: cover;
68 background-size: cover;
69 }
70 .layout-app .col-separator{
71 background: url(assets/images/main.jpg) no-repeat center center fixed;
72 -webkit-background-size: cover;
73 -moz-background-size: cover;
74 -o-background-size: cover;
75 background-size: cover;
76
77 }
78 html.app .layout-app .col-separator{
79 margin:0px !important;
80 }
81 .blur_bg{
82
83 }
84 html.app .layout-app{
85 top: 0px;
86 bottom: 0px;
87 }
88 .login{
89 background: #fff;
90 border-radius: 2px;
91 top: 15%;
92 -webkit-box-shadow: 0px 7px 22px 0px rgb(131, 151, 167);
93 -moz-box-shadow: 0px 7px 22px 0px rgb(131, 151, 167);
94 box-shadow: 0px 7px 22px 0px rgb(131, 151, 167);
95 }
96 .login_head{
97 background: #fff;
98 border-radius: 2px 2px 0px 0;
99 margin: 0 -5px;
100 }
101 .login_head img{
102 margin: 0 auto;
103 display: block;
104 padding: 20px 0px 0px;
105 border: 0px;
106 /*height:70px;*/
107 }
108 .login_head span{
109 color: #505050;
110 display: block;
111 text-align: center;
112 margin-top: 10px;
113 font-size: 15px;
114 text-transform: uppercase;
115 font-weight: 600;
116 }
117 .login_head p{
118 font-family: 'Open-Sans', sans-serif;
119 font-weight: 400;
120 line-height: 30px;
121 font-size: 15px;
122 color: #505050;
123 -webkit-box-shadow: inset 0px -2px 10px -8px rgba(20,20,20,1);
124 -moz-box-shadow: inset 0px -2px 10px -8px rgba(20,20,20,1);
125 box-shadow: inset 0px -2px 10px -8px rgba(20,20,20,1);
126 }
127 .panel{
128 background: transparent;
129 border: 0px;
130 box-shadow: 0 0px 0px rgba(0, 0, 0, 0.05);
131 -webkit-box-shadow: 0 0px 0px rgba(0, 0, 0, 0.05);
132 }
133 .form-control::-webkit-input-placeholder {
134 color: #5F5F5F;
135 }
136 .form-control:-moz-placeholder {
137 color: #5F5F5F;
138 }
139 .form-control::-moz-placeholder {
140 color: #5F5F5F;
141 }
142 .form-control:-ms-input-placeholder {
143 color: #5F5F5F;
144 }
145 .form-control{
146 background: transparent;
147 border: 0px;
148 border-bottom: 1px solid #5F5F5F !important;
149 font-weight: 600;
150 }
151 input[type="text"]:focus, input[type="text"]:active, input[type="text"]:hover{
152 background: transparent;
153 font-weight: 900;
154 }
155 input[type="text"], input[type="password"], select, textarea{
156 color: #5F5F5F;
157 }
158 .login_btn{
159 margin-top: 40px;
160 border-radius: 0px;
161 background: #4B9DD8;
162 border: 0px;
163 padding: 10px;
164 font-weight: 600;
165 text-transform: uppercase;
166 color: #fff;
167 }
168 .login_btn:hover, .login_btn:active, .login_btn:focus{
169 background: #8DC4EA;
170 color: #fff
171 }
172 .login_otp{
173 width: 30%;
174 border-radius: 0px;
175 background: #5F5F5F;
176 border: 0px;
177 padding: 10px;
178 font-weight: 600;
179 text-transform: uppercase;
180 color: #FFFFFF;
181 font-size: 12px;
182 }
183 .login_otp:hover, .login_otp:active, .login_otp:focus{
184 border:1px solid #5F5F5F;
185 color: #5F5F5F;
186 padding:9px 10px;
187 }
188 .alternate_login{
189 margin-top: 30px;
190 }
191 /* .alternate_login label{
192 background: #89ceff;
193 padding: 10px 20px;
194 border-radius: 2px;
195 }*/
196 .alternate_login label a{
197 color: #4B9DD8;
198 }
199 .alternate_login label a:hover{
200 color:#5B86A5;
201 }
202 .or_div{
203 line-height: 0.5;
204 text-align: center;
205 width: 100%;
206 margin-top: 20px;
207 }
208 .or_div p{
209 display: inline-block;
210 position: relative;
211 color: #505050;
212 font-weight: 600;
213 border: 1px solid #505050;
214 width: 40px;
215 height: 40px;
216 line-height: 40px;
217 border-radius: 50%;
218 }
219 .or_div p:before, .or_div p:after{
220 content: "";
221 position: absolute;
222 height: 5px;
223 border-bottom: 1px solid #7D7D7D;
224 top: 15px;
225 width: 130px;
226 }
227 .or_div p:before{
228 right: 100%;
229 }
230 .or_div p:after{
231 left: 100%;
232 }
233 .alert.alert-danger {
234 background: none repeat scroll 0 0 #F95B5B;
235 border-color: #F95B5B;
236 color: #ffffff;
237 border-radius: 0;
238 padding: 10px;
239 }
240 .alert.alert-warning{
241 background: none repeat scroll 0 0 #FFA84F;
242 border-color: #FFA84F;
243 color: #ffffff;
244 border-radius: 0;
245 padding: 10px;
246 }
247
248
249
250
251
252
253
254
255 </style>
256
257 <div class="layout-app" style="height: 100%;"><!-- row-app -->
258 <div class="row row-app" style="height: 100%;">
259
260 <!-- col -->
261
262
263 <!-- col-separator.box -->
264 <div class="col-separator col-unscrollable box" style="height: 100%;">
265
266 <!-- col-table -->
267 <div class="col-table blur_bg" style="height: 100%;">
268 <!-- col-table-row -->
269 <div class="col-table-row" style="height: 100%;">
270
271 <!-- col-app -->
272 <div class="col-app col-unscrollable" style="height: 100%;">
273
274 <!-- col-app -->
275 <div class="col-app" style="height: 100%;">
276 <div class="login col-sm-4 col-sm-offset-4">
277 <div class="login_head">
278 <div class="row">
279 <div class="col-xs-1"></div>
280 <div class="col-xs-10">
281 <img src="custom/logo.png" class="pull-left">
282 <img src="custom/flexydial-logo-small.png" class="pull-right">
283 </div>
284 </div>
285 <p class="innerAll margin-none text-center hidden-xs">Login to your account</p>
286 </div>
287 <div class="panel panel-default col-sm-12">
288
289 <div class="panel-body">
290
291
292 <div id='alertdiv'>
293 <?php
294 $class="";
295 $type="";
296 $msg="";
297 if(isset($error))
298 {
299 if($error=="activationsuccess"){$class="success";$type="Verified!";$msg="Congratulations, your account is now active, please login to continue.";}
300 else if($error=="authfailed"){$class="danger";$type="Login Failed!";$msg="Incorrect Email id or password.";}
301 else if($error=="Unverified"){$class="danger";$type="Verification Required!";$msg="We have sent a verification mail to your email id, please follow instructions in the mail.";}
302 else if($error=="alreadyverified"){$class="warning";$type="Already Verified!";$msg="You have already verified your account.";}
303 else if($error=="msie"){$class="info";$type="Internet Explorer Detected!";$msg="This application doesnot work with MS Internet explorer, please download <a href='http://firefox.com' target=_BLANK>Mozilla Firefox</a> or <a href='http://google.com/chrome' target=_BLANK>Google Chrome</a> to use.";}
304 else if($error=="forgotpassword"){$class="info";$type="Password Reminder Sent";$msg="Please check your email for instructions to login to your account. Thankyou";}
305 else if($error=="passwordchanged"){$class="success";$type="Password Changed successfully";$msg="You can now login with your new password below!";}
306 else if($error=="resetexpired"){$class="danger";$type="Link Expired";$msg="The Link You used is now Expired!";}
307 else if($error=="Disabled"){$class="danger";$type="Disabled";$msg="This user account has been disabled, please contact Support!";}
308 else if($error=="cutoff"){$class="danger";$type="Login";$msg="It disable for today";}
309 else {$class="danger";$type="Failed!";$msg="Unknown Error. Method not found";}
310
311 ?>
312 <!-- Alert -->
313 <div class="alert alert-<?php echo $class; ?>">
314 <button type="button" class="close" data-dismiss="alert">&times;</button>
315 <strong><?php echo $type; ?></strong> <?php echo $msg; ?>
316
317 </div>
318 <!-- // Alert END -->
319 <?php } ?>
320 </div>
321
322 <form role="form" action="login" method=post id=owaform>
323 <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>" />
324
325
326 <div class="form-group">
327 <!-- <label for="exampleInputEmail1">Login ID <?php if(Config::get("app.extAuth")=="owa")echo "(Domain Login)"; ?></label> -->
328 <input type="text" class="form-control" id="exampleInputEmail1" name=username placeholder="Login ID">
329 </div>
330 <div class="form-group">
331 <!-- <label for="exampleInputPassword1">Password</label> -->
332 <input type="password" class="form-control" id="exampleInputPassword1" name=password placeholder="Password">
333 </div>
334
335 <button type="submit" class="btn btn-primary btn-block login_btn">Login</button>
336 <!-- <button type="button" onclick='document.location="signup";' class="btn btn-primary btn-block">Signup</button> -->
337 <!-- <div class="or_div"><p>OR</p></div> -->
338 <!-- Changes start - Commented below code for remove extra content from login screen - by YASHWANT on 10042017 -->
339 <!--
340 <div class="alternate_login">
341 <label class="pull-left"><a href='#' onclick='$("#owaform").hide();$("#otpform").show();return false;'>Alternate login via OTP</a></label>
342 <label class="pull-right"><a href='mailto:<?php echo Config::get("app.email"); ?>' class='pull-right'>Contact Support</a></label>
343 </div>
344 -->
345 <!-- Changes end - Commented below code for remove extra content from login screen - by YASHWANT on 10042017 -->
346
347 </form>
348
349
350 <form role="form" action="login" method=post id=otpform style='display:none'>
351 <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>" />
352 <input type="hidden" name="otplogin" value="true" />
353 <div class="form-group">
354 <input type="text" class="form-control" style="width:70%;float: left;margin-top: 3px;" id="exampleInputEmail2" name="username" placeholder="UserName">
355 <button type="button" class="btn btn-primary btn-block login_otp" onclick='getOTP();return false;'>Get OTP</button>
356 </div>
357
358 <div class="form-group">
359 <!-- <label for="exampleInputPassword2">Enter OTP</label>-->
360 <input type="password" class="form-control" id="exampleInputPassword2" name=password placeholder="Enter otp">
361 </div>
362
363 <button type="submit" class="btn btn-primary btn-block login_btn">Login</button>
364 <!-- <button type="button" onclick='document.location="signup";' class="btn btn-primary btn-block">Signup</button> -->
365
366 <div class="alternate_login">
367 <label>
368 <a href='#' onclick='$("#owaform").show();$("#otpform").hide();return false;'>Back to Login</a>
369 </label>
370 </div>
371
372 </form>
373
374
375
376 </div>
377
378 </div>
379 <p class="text-center"><?php /* $version['short'] }}{{ $version['date'] ? " - ".$version['date'] : "" */ ?></p>
380 <!-- <div class="col-sm-2 col-sm-4 col-sm-offset-4 text-center">
381 <a href="signup" class="btn btn-info">Create a new account? <i class="fa fa-pencil"></i> </a>
382 </div>-->
383
384
385 </div>
386
387
388 </div>
389 <!-- // END col-app -->
390
391 </div>
392 <!-- // END col-app.col-unscrollable -->
393
394 </div>
395 <!-- // END col-table-row -->
396
397 </div>
398 <!-- // END col-table -->
399
400 </div>
401 <!-- // END col-separator.box -->
402
403
404 </div>
405 <!-- // END row-app -->
406
407 <script>
408 function getOTP()
409 {
410 var username=$("#exampleInputEmail2").val();
411 $("#alertdiv").html('<div class="alert alert-warning"><button type="button" class="close" data-dismiss="alert">&times;</button><strong>Please Wait..</strong> Sending OTP for User ('+username+')</div>');
412
413 doAjax('login?sendotp=1&otpuser='+username,'','','ajax_login_otp','singlefail','GET',function(){
414
415 });
416 }
417
418
419
420 </script>
421
422
423 <?php echo $__env->make('layout.footer', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
424 <?php
425 }
426 ?>
1 <?php
2
3 use App\Models\User;
4
5
6
7 $data = Auth::user()->data();
8 $meta = Auth::user()->meta();
9 if (!isset($data['personal'])) $data['personal'] = array();
10
11 ?>
12 <script>
13 function openwelcomewizard() {
14 $("#welcome_wizard_body").html("");
15 doAjax('social/<?php echo Auth::user()->id; ?>', 'show=wizard', 'welcome_wizard_body', 'ajax_wizard_show', 'singlefail', 'GET');
16 $("#welcome_wizard").modal('show');
17 }
18 $("#topuserdropmenu > li").hover(function() {
19 $(this).addClass('active');
20 },
21 function() {
22 $(this).removeClass('active');
23 });
24 </script>
25
26
27
28 <script>
29 var wel_usertype = '<?php echo Auth::user()->usertype; ?>';
30 var wel_accounttype = '<?php if (Auth::user()->usertype != '') echo Auth::user()->usertype;
31 else echo "learner"; ?>';
32 var wel_catagory = '<?php if (isset($data['personal']['interestcategories'])) echo $data['personal']['interestcategories']; ?>';
33 //var wel_subcatagory='';
34 var wel_fname = '<?php if (isset($data['personal']['fname'])) echo $data['personal']['fname']; ?>';
35 var wel_lname = '<?php if (isset($data['personal']['lname'])) echo $data['personal']['lname']; ?>';
36 var wel_gender = '<?php if (isset($data['personal']['gender'])) echo $data['personal']['gender']; ?>';
37 var wel_city = '<?php if (isset($data['personal']['location'])) echo $data['personal']['location']; ?>';
38 var wel_country = '<?php if (isset($data['personal']['country'])) echo $data['personal']['country']; ?>';
39
40 var wel_invites = '';
41 var wel_buycredits = '';
42 var wel_buysubscription = '';
43 var wel_themeselected = '';
44
45 $(document).ready(function() {
46 if (wel_usertype == '' || wel_catagory == '' || wel_fname == "" || wel_gender == "" || wel_city == "" || wel_country == "") {
47 //doAjax('social/<?php echo Auth::user()->id; ?>','show=wizard','welcome_wizard_body','ajax_wizard_show','singlefail','GET');
48 }
49 });
50
51 function hrmsSearch() {
52 createSearchRecordDiv("hrms_search_modald_body");
53 $("#hrms_search_modal").modal('show');
54 $("#maintextsearch_1_txt").focus();
55 }
56
57 function kDialerModel() {
58 updateDialerState();
59 $("#kDialer_modal").modal('show');
60 if ('<?php echo Auth::user()->sessiontype; ?>' == '1') {
61 $("#dialerQuickControlDiv").show();
62 kDialerConnected();
63 }
64 }
65
66 function welcomepayment() {
67 $("#welcome_wizard_body").html("");
68 doAjax('social/<?php echo Auth::user()->id; ?>', 'show=wizard&payment=1', 'welcome_wizard_body', 'ajax_wizard_show', 'singlefail', 'GET');
69 $("#welcome_wizard").modal('show');
70 }
71
72 function welcomeinvite() {
73 $("#welcome_wizard_body").html("");
74 doAjax('social/<?php echo Auth::user()->id; ?>', 'show=wizard&welcomeinvite=1', 'welcome_wizard_body', 'ajax_wizard_show', 'singlefail', 'GET', function() {
75 //setTimeout(function(){$("#inviteemailids").not('.kstych_init').addClass('kstych_init').select2({tags:[]});}, 1000);
76 });
77 $("#welcome_wizard").modal('show');
78 }
79
80 var currentsearchdivid = "";
81
82 function createSearchRecordDiv(divid) {
83 if (currentsearchdivid != "") $("#" + currentsearchdivid).html("");
84 currentsearchdivid = divid;
85
86 var searchRecordDivHTMLLI = "ID,FirstName,LastName,Client,Mobile,Email,Passport,IBAN,Status,ClientCode,InternalID,PersonalID".split(",");
87
88 searchRecordPreselectList = ["", "ID", "FirstName", "Mobile", "Email"];
89
90 var searchRecordDivHTML = "";
91 for (i = 1; i <= 4; i++) {
92 searchRecordDivHTML += "<div class=col-md-3>";
93 searchRecordDivHTML += "<div class='widget row widget-heading-simple widget-body-gray' >";
94 searchRecordDivHTML += "<div class='widget-body'><div class='input-group'>";
95 searchRecordDivHTML += "<div class='input-group-btn'>";
96 searchRecordDivHTML += "<div class='dropdown'>";
97 searchRecordDivHTML += "<button class='btn btn-default dropdown-toggle rounded-left' data-toggle='dropdown'><span id=maintextsearch_" + i + "_span>" + searchRecordPreselectList[i] + "</span> <span class='caret'></span></button>";
98 searchRecordDivHTML += "<ul class='dropdown-menu pull-left'>";
99
100 for (j = 0; j < searchRecordDivHTMLLI.length; j++) searchRecordDivHTML += "<li><a href='#' onclick='$(\"#maintextsearch_" + i + "_span\").html($(this).html());return false;'>" + searchRecordDivHTMLLI[j] + "</a></li>";
101
102 searchRecordDivHTML += "</ul>";
103 searchRecordDivHTML += "</div>";
104 searchRecordDivHTML += "</div>";
105 searchRecordDivHTML += "<input class='form-control' id='maintextsearch_" + i + "_txt' type='text' onkeyup='mainTextSearchStart();' />";
106 searchRecordDivHTML += "</div></div>";
107 searchRecordDivHTML += "</div>";
108 searchRecordDivHTML += "</div>";
109 }
110 searchRecordDivHTML += "<div style='clear:both'></div>";
111 searchRecordDivHTML += "<div id=searchresults></div>";
112
113 $("#" + divid).html(searchRecordDivHTML);
114
115 }
116 </script>
117
118 <div class="modal" id="welcome_wizard">
119 <div class="modal-dialog" style='width:95%;'>
120 <div class="modal-content">
121 <div class="modal-header">
122 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
123 <h4 class="modal-title">Welcome to <?php echo Config::get("app.name"); ?></h4>
124 </div>
125 <div class="modal-body" id=welcome_wizard_body></div>
126 </div>
127 </div>
128 </div>
129
130 <div class="modal" id="hrms_search_modal">
131 <div class="modal-dialog" style='width:95%;'>
132 <div class="modal-content">
133 <div class="modal-header">
134 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
135 <h4 class="modal-title"><?php echo Config::get("app.name"); ?> Search Record</h4>
136 </div>
137 <div class="modal-body" id=hrms_search_modald_body>
138
139 <!-- <input class='form-control' type="text" id=maintextsearch name="maintextsearch" value="Search..." onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;" size=20 /> -->
140
141 </div>
142
143 </div>
144 </div>
145 </div>
146
147 <div class="modal" id="kDialer_modal">
148 <div class="modal-dialog" style='width:95%;'>
149 <div class="modal-content">
150 <div class="modal-header">
151
152 <div id=dialerQuickControlDiv class='col-md-12' style='display:none;'>
153 <div class=col-md-6>
154
155 <div class="input-group" style='width:350px;float:left' id=dialerstate_div>
156 <div class="input-group-btn">
157 <div class="dropdown">
158 <button class="btn btn-info dropdown-toggle rounded-left" data-toggle="dropdown" style='width:135px'><span id=dialerstate_btn>Paused</span> <span class="caret"></span></button>
159 <ul class="dropdown-menu pull-left" id='dialer_mode'>
160
161
162 <li><a href="#" onclick='pauseDialerState("dialer","mDialerState","Progressive");savedialermode();return false;'><b>Progressive</b></a></li>
163
164 <?php if (Auth::user()->group == 'ManualAllowed' || Auth::user()->group == 'Digital' || Auth::user()->usertype == 'Admin') { ?>
165 <li id=dialerManualAllowLI><a href="#" onclick='pauseDialerState("dialer","mDialerState","Manual");savedialermode("Manual");return false;'><b>Manual</b></a></li>
166 <?php } ?>
167
168
169 <li style='background:#68cc9e'><a href="#" onclick='pauseDialerState("dialer","mDialerState","Ready","mDialerSubState","Predictive");savedialermode("Predictive");return false;'><b>Predictive</b></a></li>
170
171 <li><a href="#" onclick='pauseDialerState("dialer","pDialerState","Paused","pDialerSubState","Paused");savedialermode();return false;'><b>Pause</b></a></li>
172 <li style='background:#ccc'><a href="#" onclick='pauseDialerState("dialer","pDialerState","Paused","pDialerSubState","AgentBriefing");savedialermode();return false;'><b>AgentBriefing</b></a></li>
173 <li style='background:#ccc'><a href="#" onclick='pauseDialerState("dialer","pDialerState","Paused","pDialerSubState","TeamMeeting");savedialermode();return false;'><b>TeamMeeting</b></a></li>
174 <li style='background:#ccc'><a href="#" onclick='pauseDialerState("dialer","pDialerState","Paused","pDialerSubState","QualityFeedback");savedialermode();return false;'><b>QualityFeedback</b></a></li>
175 <li style='background:#ccc'><a href="#" onclick='pauseDialerState("dialer","pDialerState","Paused","pDialerSubState","LunchBreak");savedialermode();return false;'><b>LunchBreak</b></a></li>
176 <li style='background:#ccc'><a href="#" onclick='pauseDialerState("dialer","pDialerState","Paused","pDialerSubState","TeaBreak");savedialermode();return false;'><b>TeaBreak</b></a></li>
177 <li style='background:#ccc'><a href="#" onclick='pauseDialerState("dialer","pDialerState","Paused","pDialerSubState","UtilityBreak");savedialermode();return false;'><b>UtilityBreak</b></a></li>
178 <li style='background:#ccc'><a href="#" onclick='pauseDialerState("dialer","pDialerState","Paused","pDialerSubState","FloorAnnouncements");savedialermode();return false;'><b>FloorAnnouncements</b></a></li>
179 <li style='background:#ccc'><a href="#" onclick='pauseDialerState("dialer","pDialerState","Paused","pDialerSubState","DownTime");savedialermode();return false;'><b>DownTime</b></a></li>
180
181
182 </ul>
183 </div>
184 </div>
185
186 <input class="form-control" id="manualdialnumber_txt" style='width:200px' type="text" />
187 <span class="input-group-addon btn btn-default" id=manualdial_btn dialaction=dialnext onclick='updateDialerState("action",$(this).attr("dialaction"),$("#manualdialnumber_txt").val());'></span>
188 </div>
189
190
191 <div class=pull-right>
192 <a href='#' onclick='return false;' class='btn btn-default' id=dialertimes1>
193 <i class='fa fa-fw fa-clock-o'></i> <span id=spandialer_ts></span>
194 </a>
195 </div>
196
197
198
199 </div>
200 <div class=col-md-6>
201 <div class=pull-left>
202 <a href='#' onclick='return false;' class='btn btn-default' id=dialertimes2 style='display:none'>
203 <i class='fa fa-fw fa-phone'></i> <span id=spandialer_num onclick=''></span>
204 <!-- onclick='dialerDispNumberClick(); -->
205 </a>
206 </div>
207 <div class=pull-left>
208 <a href='#' onclick='dialerDispNumberClick();return false;' style='display:none' class='btn btn-default' id=dialertimes3>
209 <i class='fa fa-fw fa-phone'></i>
210 </a>
211 </div>
212
213 <div id=dialerToggleViewDiv style='float:right;margin-right:20px;'>
214
215 <button class="btn btn-circle btn-default"><i class="fa fa-phone"></i></button>
216 <i class="fa fa-long-arrow-left"></i>
217
218 <div class="dropdown dropdown-icons" id=connections_div_u>
219 <a data-toggle="dropdown" href="#" class="btn btn-stroke btn-primary btn-circle dropdown-toggle" onmouseout='$(this).blur()' id=conficon_u_a><i class="fa fa-chain-broken" id=conficon_u_i></i> </a>
220 <ul class="dropdown-menu">
221 <li data-toggle="tooltip" data-title="MuteSpeaker" data-placement="left" data-tcontainer="body"><a href="#"><i class="fa fa-volume-off"></i></a></li>
222 <li data-toggle="tooltip" data-title="MuteMic" data-placement="left" data-tcontainer="body"><a href="#"><i class="fa fa-microphone-slash"></i></a></li>
223 <li data-toggle="tooltip" data-title="Hangup" data-placement="left" data-tcontainer="body"><a href="#"><i class="fa fa-times-circle"></i></a></li>
224 <li data-toggle="tooltip" data-title="Hold" data-placement="left" data-tcontainer="body"><a href="#"><i class="fa fa-pause"></i></a></li>
225 </ul>
226 </div>
227
228 <div class="dropdown dropdown-icons" id=connections_div_c>
229 <a data-toggle="dropdown" href="#" class="btn btn-stroke btn-primary btn-circle dropdown-toggle" onmouseout='$(this).blur()' id=conficon_c0_a><i class="fa fa-chain-broken" id=conficon_c0_i></i> </a>
230 <ul class="dropdown-menu">
231 <li data-toggle="tooltip" data-title="MuteSpeaker" data-placement="left" data-tcontainer="body"><a href="#"><i class="fa fa-volume-off"></i></a></li>
232 <li data-toggle="tooltip" data-title="MuteMic" data-placement="left" data-tcontainer="body"><a href="#"><i class="fa fa-microphone-slash"></i></a></li>
233 <li data-toggle="tooltip" data-title="Hangup" data-placement="left" data-tcontainer="body"><a href="#"><i class="fa fa-times-circle"></i></a></li>
234 <li data-toggle="tooltip" data-title="Hold" data-placement="left" data-tcontainer="body"><a href="#"><i class="fa fa-pause"></i></a></li>
235 </ul>
236 </div>
237
238
239 <i class="fa fa-long-arrow-right"></i>
240 <div class="dropdown dropdown-icons">
241 <a data-toggle="dropdown" href="#" class="btn btn-stroke btn-default btn-circle dropdown-toggle" onmouseout='$(this).blur()' id=conficon_c_mn><i class="fa fa-user" id=conficon_c_mi></i> </a>
242 <ul class="dropdown-menu">
243 <li><a href="#" onclick='$("#topdialerconfcall").toggle();return false;'><i class="fa fa-plus"></i></a></li>
244 </ul>
245 </div>
246 <div id=topdialerconfcall style='display:none'>
247 <input type=text class='form-control' style='width: 130px;float: left;' size=10 id=topaddconfcalltxt><a href=# class='btn btn-default' onclick='dialertopaddconf();return false;'><i class='fa fa-phone'></i></a>
248 </div>
249 <script>
250 function dialertopaddconf() {
251 var confnumber = $("#topaddconfcalltxt").val();
252 if (confnumber == '' || confnumber.length < 2) {
253 simpleNotification('error', 'topRight', "Empty Number");
254 return;
255 }
256
257 if (!kcallHasConnection(kstychCall['callnumber']) || kstychCall['ts_Dispo'] > 1) {
258 simpleNotification('error', 'topRight', "No call to conference");
259 return;
260 }
261
262 var datastr = "kstychCall=" + JSON.stringify(kstychCall);
263 datastr += "&kstychDialer=" + JSON.stringify(kstychDialer);
264
265 kcallNewConnection(confnumber);
266 doAjax('dialer?action=addconfcall&confnumber=' + confnumber, datastr, '__fake__div__', 'ajax_confdial', 'singlefail', 'POST', function(retstr) {
267 if (retstr.responseText.indexOf('Error') < 0) {
268 kcallSetConnection(confnumber, 'callid', retstr.responseText);
269 kcallSetConnection(confnumber, 'ts_Call', getNowTS());
270
271 updateDialerState();
272 } else {
273 simpleNotification('error', 'topRight', retstr.responseText);
274 }
275 });
276
277 $("#topdialerconfcall").hide();
278
279 }
280 </script>
281 </div>
282 </div>
283 </div>
284 <div style='clear:both'></div>
285
286 </div>
287 <div class="modal-body" id=kDialer_modal_body>
288 <div id=dialerToggleViewMainDiv style=''>
289
290 <div id=dialerSearchDiv>
291
292
293 <div id=dialersearchbox></div>
294 <div id=dialersearchresults></div>
295
296 </div>
297
298
299
300 </div>
301 </div>
302 </div>
303 </div>
304 </div>
...\ No newline at end of file ...\ No newline at end of file
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 <?php
2 use App\Jobs\KHRMSLib;
3 use \App\Models\User;
4
5 function gitVersion(){
6 exec('git describe --always',$version_mini_hash);
7 exec('git rev-list HEAD | wc -l',$version_number);
8 exec('git log -1',$line);
9 $version['short'] = "v0.".trim($version_number[0]);
10 $version['full'] = "v0.".trim($version_number[0]).".$version_mini_hash[0] (".str_replace('commit ','',$line[0]).")";
11 $version['date'] = $line[3];
12 return $version;
13 }
14 // $version = gitVersion();
15
16 if(Input::get('sendotp')=="1")
17 {
18 $otpuser=trim(Input::get('otpuser'));
19 $user=User::where('username','=',$otpuser)->first();
20 if($user)
21 {
22 $otpemail=$user->email;
23 $otp=rand(100000, 999999);
24
25 $user->password=Hash::make($otp);
26
27 $meta=$user->meta();
28 if(!isset($meta['otp_array']))$meta['otp_array']=array();
29 if(!isset($meta['otp_array'][date('Ymd')])){$meta['otp_array']=array();$meta['otp_array'][date('Ymd')]=0;}
30 $meta['otp_array'][date('Ymd')]++;
31
32 if($meta['otp_array'][date('Ymd')]<=3)
33 {
34 $user->meta=json_encode($meta);
35 $user->save();
36
37 Mail::send('emails.notification',
38 array(
39 'heloname'=>'',
40 'line1'=>'Your OTP for Login : '.$otp.' ',
41 'line2'=>'Please visit <a href="'.URL::to('/').'"><b>'.Config::get("app.name").' </b></a> and You can login using this OTP.',
42 'line3'=>'',
43 'notifytype'=>'OTP'), function($message) use ($otpemail)
44 {
45 $message->to($otpemail,$otpemail);
46 $message->subject(Config::get("app.name")." OTP for Login");
47 });
48 echo "$(\"#alertdiv\").html('<div class=\"alert alert-success\"><button type=button class=close data-dismiss=alert>&times;</button><strong>Success</strong> OTP Sent to ($otpemail)</div>');";
49 }
50 else echo "$(\"#alertdiv\").html('<div class=\"alert alert-danger\"><button type=button class=close data-dismiss=alert>&times;</button><strong>Failed</strong> Too many reuests ($otpemail), please try after 24 hrs</div>');";
51 }
52 else echo "$(\"#alertdiv\").html('<div class=\"alert alert-danger\"><button type=button class=close data-dismiss=alert>&times;</button><strong>Failed</strong> Invalid User </div>');";
53 }
54 else
55 {
56
57 ?>
58
59 <?php echo $__env->make('layout.header', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
60
61
62 <style>
63 body {
64 background: url(assets/images/main.jpg) no-repeat center center fixed;
65 -webkit-background-size: cover;
66 -moz-background-size: cover;
67 -o-background-size: cover;
68 background-size: cover;
69 }
70 .layout-app .col-separator{
71 background: url(assets/images/main.jpg) no-repeat center center fixed;
72 -webkit-background-size: cover;
73 -moz-background-size: cover;
74 -o-background-size: cover;
75 background-size: cover;
76
77 }
78 html.app .layout-app .col-separator{
79 margin:0px !important;
80 }
81 .blur_bg{
82
83 }
84 html.app .layout-app{
85 top: 0px;
86 bottom: 0px;
87 }
88 .login{
89 background: #fff;
90 border-radius: 2px;
91 top: 15%;
92 -webkit-box-shadow: 0px 7px 22px 0px rgb(131, 151, 167);
93 -moz-box-shadow: 0px 7px 22px 0px rgb(131, 151, 167);
94 box-shadow: 0px 7px 22px 0px rgb(131, 151, 167);
95 }
96 .login_head{
97 background: #fff;
98 border-radius: 2px 2px 0px 0;
99 margin: 0 -5px;
100 }
101 .login_head img{
102 margin: 0 auto;
103 display: block;
104 padding: 20px 0px 0px;
105 border: 0px;
106 /*height:70px;*/
107 }
108 .login_head span{
109 color: #505050;
110 display: block;
111 text-align: center;
112 margin-top: 10px;
113 font-size: 15px;
114 text-transform: uppercase;
115 font-weight: 600;
116 }
117 .login_head p{
118 font-family: 'Open-Sans', sans-serif;
119 font-weight: 400;
120 line-height: 30px;
121 font-size: 15px;
122 color: #505050;
123 -webkit-box-shadow: inset 0px -2px 10px -8px rgba(20,20,20,1);
124 -moz-box-shadow: inset 0px -2px 10px -8px rgba(20,20,20,1);
125 box-shadow: inset 0px -2px 10px -8px rgba(20,20,20,1);
126 }
127 .panel{
128 background: transparent;
129 border: 0px;
130 box-shadow: 0 0px 0px rgba(0, 0, 0, 0.05);
131 -webkit-box-shadow: 0 0px 0px rgba(0, 0, 0, 0.05);
132 }
133 .form-control::-webkit-input-placeholder {
134 color: #5F5F5F;
135 }
136 .form-control:-moz-placeholder {
137 color: #5F5F5F;
138 }
139 .form-control::-moz-placeholder {
140 color: #5F5F5F;
141 }
142 .form-control:-ms-input-placeholder {
143 color: #5F5F5F;
144 }
145 .form-control{
146 background: transparent;
147 border: 0px;
148 border-bottom: 1px solid #5F5F5F !important;
149 font-weight: 600;
150 }
151 input[type="text"]:focus, input[type="text"]:active, input[type="text"]:hover{
152 background: transparent;
153 font-weight: 900;
154 }
155 input[type="text"], input[type="password"], select, textarea{
156 color: #5F5F5F;
157 }
158 .login_btn{
159 margin-top: 40px;
160 border-radius: 0px;
161 background: #4B9DD8;
162 border: 0px;
163 padding: 10px;
164 font-weight: 600;
165 text-transform: uppercase;
166 color: #fff;
167 }
168 .login_btn:hover, .login_btn:active, .login_btn:focus{
169 background: #8DC4EA;
170 color: #fff
171 }
172 .login_otp{
173 width: 30%;
174 border-radius: 0px;
175 background: #5F5F5F;
176 border: 0px;
177 padding: 10px;
178 font-weight: 600;
179 text-transform: uppercase;
180 color: #FFFFFF;
181 font-size: 12px;
182 }
183 .login_otp:hover, .login_otp:active, .login_otp:focus{
184 border:1px solid #5F5F5F;
185 color: #5F5F5F;
186 padding:9px 10px;
187 }
188 .alternate_login{
189 margin-top: 30px;
190 }
191 /* .alternate_login label{
192 background: #89ceff;
193 padding: 10px 20px;
194 border-radius: 2px;
195 }*/
196 .alternate_login label a{
197 color: #4B9DD8;
198 }
199 .alternate_login label a:hover{
200 color:#5B86A5;
201 }
202 .or_div{
203 line-height: 0.5;
204 text-align: center;
205 width: 100%;
206 margin-top: 20px;
207 }
208 .or_div p{
209 display: inline-block;
210 position: relative;
211 color: #505050;
212 font-weight: 600;
213 border: 1px solid #505050;
214 width: 40px;
215 height: 40px;
216 line-height: 40px;
217 border-radius: 50%;
218 }
219 .or_div p:before, .or_div p:after{
220 content: "";
221 position: absolute;
222 height: 5px;
223 border-bottom: 1px solid #7D7D7D;
224 top: 15px;
225 width: 130px;
226 }
227 .or_div p:before{
228 right: 100%;
229 }
230 .or_div p:after{
231 left: 100%;
232 }
233 .alert.alert-danger {
234 background: none repeat scroll 0 0 #F95B5B;
235 border-color: #F95B5B;
236 color: #ffffff;
237 border-radius: 0;
238 padding: 10px;
239 }
240 .alert.alert-warning{
241 background: none repeat scroll 0 0 #FFA84F;
242 border-color: #FFA84F;
243 color: #ffffff;
244 border-radius: 0;
245 padding: 10px;
246 }
247
248
249
250
251
252
253
254
255 </style>
256
257 <div class="layout-app" style="height: 100%;"><!-- row-app -->
258 <div class="row row-app" style="height: 100%;">
259
260 <!-- col -->
261
262
263 <!-- col-separator.box -->
264 <div class="col-separator col-unscrollable box" style="height: 100%;">
265
266 <!-- col-table -->
267 <div class="col-table blur_bg" style="height: 100%;">
268 <!-- col-table-row -->
269 <div class="col-table-row" style="height: 100%;">
270
271 <!-- col-app -->
272 <div class="col-app col-unscrollable" style="height: 100%;">
273
274 <!-- col-app -->
275 <div class="col-app" style="height: 100%;">
276 <div class="login col-sm-4 col-sm-offset-4">
277 <div class="login_head">
278 <div class="row">
279 <div class="col-xs-1"></div>
280 <div class="col-xs-10">
281 <img src="custom/logo.png" class="pull-left">
282 <img src="custom/flexydial-logo-small.png" class="pull-right">
283 </div>
284 </div>
285 <p class="innerAll margin-none text-center hidden-xs">Login to your account</p>
286 </div>
287 <div class="panel panel-default col-sm-12">
288
289 <div class="panel-body">
290
291
292 <div id='alertdiv'>
293 <?php
294 $class="";
295 $type="";
296 $msg="";
297 if(isset($error))
298 {
299 if($error=="activationsuccess"){$class="success";$type="Verified!";$msg="Congratulations, your account is now active, please login to continue.";}
300 else if($error=="authfailed"){$class="danger";$type="Login Failed!";$msg="Incorrect Email id or password.";}
301 else if($error=="Unverified"){$class="danger";$type="Verification Required!";$msg="We have sent a verification mail to your email id, please follow instructions in the mail.";}
302 else if($error=="alreadyverified"){$class="warning";$type="Already Verified!";$msg="You have already verified your account.";}
303 else if($error=="msie"){$class="info";$type="Internet Explorer Detected!";$msg="This application doesnot work with MS Internet explorer, please download <a href='http://firefox.com' target=_BLANK>Mozilla Firefox</a> or <a href='http://google.com/chrome' target=_BLANK>Google Chrome</a> to use.";}
304 else if($error=="forgotpassword"){$class="info";$type="Password Reminder Sent";$msg="Please check your email for instructions to login to your account. Thankyou";}
305 else if($error=="passwordchanged"){$class="success";$type="Password Changed successfully";$msg="You can now login with your new password below!";}
306 else if($error=="resetexpired"){$class="danger";$type="Link Expired";$msg="The Link You used is now Expired!";}
307 else if($error=="Disabled"){$class="danger";$type="Disabled";$msg="This user account has been disabled, please contact Support!";}
308 else if($error=="cutoff"){$class="danger";$type="Login";$msg="It disable for today";}
309 else {$class="danger";$type="Failed!";$msg="Unknown Error. Method not found";}
310
311 ?>
312 <!-- Alert -->
313 <div class="alert alert-<?php echo $class; ?>">
314 <button type="button" class="close" data-dismiss="alert">&times;</button>
315 <strong><?php echo $type; ?></strong> <?php echo $msg; ?>
316
317 </div>
318 <!-- // Alert END -->
319 <?php } ?>
320 </div>
321
322 <form role="form" action="login" method=post id=owaform>
323 <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>" />
324
325
326 <div class="form-group">
327 <!-- <label for="exampleInputEmail1">Login ID <?php if(Config::get("app.extAuth")=="owa")echo "(Domain Login)"; ?></label> -->
328 <input type="text" class="form-control" id="exampleInputEmail1" name=username placeholder="Login ID">
329 </div>
330 <div class="form-group">
331 <!-- <label for="exampleInputPassword1">Password</label> -->
332 <input type="password" class="form-control" id="exampleInputPassword1" name=password placeholder="Password">
333 </div>
334
335 <button type="submit" class="btn btn-primary btn-block login_btn">Login</button>
336 <!-- <button type="button" onclick='document.location="signup";' class="btn btn-primary btn-block">Signup</button> -->
337 <!-- <div class="or_div"><p>OR</p></div> -->
338 <!-- Changes start - Commented below code for remove extra content from login screen - by YASHWANT on 10042017 -->
339 <!--
340 <div class="alternate_login">
341 <label class="pull-left"><a href='#' onclick='$("#owaform").hide();$("#otpform").show();return false;'>Alternate login via OTP</a></label>
342 <label class="pull-right"><a href='mailto:<?php echo Config::get("app.email"); ?>' class='pull-right'>Contact Support</a></label>
343 </div>
344 -->
345 <!-- Changes end - Commented below code for remove extra content from login screen - by YASHWANT on 10042017 -->
346
347 </form>
348
349
350 <form role="form" action="login" method=post id=otpform style='display:none'>
351 <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>" />
352 <input type="hidden" name="otplogin" value="true" />
353 <div class="form-group">
354 <input type="text" class="form-control" style="width:70%;float: left;margin-top: 3px;" id="exampleInputEmail2" name="username" placeholder="UserName">
355 <button type="button" class="btn btn-primary btn-block login_otp" onclick='getOTP();return false;'>Get OTP</button>
356 </div>
357
358 <div class="form-group">
359 <!-- <label for="exampleInputPassword2">Enter OTP</label>-->
360 <input type="password" class="form-control" id="exampleInputPassword2" name=password placeholder="Enter otp">
361 </div>
362
363 <button type="submit" class="btn btn-primary btn-block login_btn">Login</button>
364 <!-- <button type="button" onclick='document.location="signup";' class="btn btn-primary btn-block">Signup</button> -->
365
366 <div class="alternate_login">
367 <label>
368 <a href='#' onclick='$("#owaform").show();$("#otpform").hide();return false;'>Back to Login</a>
369 </label>
370 </div>
371
372 </form>
373
374
375
376 </div>
377
378 </div>
379 <p class="text-center"><?php /* $version['short'] }}{{ $version['date'] ? " - ".$version['date'] : "" */ ?></p>
380 <!-- <div class="col-sm-2 col-sm-4 col-sm-offset-4 text-center">
381 <a href="signup" class="btn btn-info">Create a new account? <i class="fa fa-pencil"></i> </a>
382 </div>-->
383
384
385 </div>
386
387
388 </div>
389 <!-- // END col-app -->
390
391 </div>
392 <!-- // END col-app.col-unscrollable -->
393
394 </div>
395 <!-- // END col-table-row -->
396
397 </div>
398 <!-- // END col-table -->
399
400 </div>
401 <!-- // END col-separator.box -->
402
403
404 </div>
405 <!-- // END row-app -->
406
407 <script>
408 function getOTP()
409 {
410 var username=$("#exampleInputEmail2").val();
411 $("#alertdiv").html('<div class="alert alert-warning"><button type="button" class="close" data-dismiss="alert">&times;</button><strong>Please Wait..</strong> Sending OTP for User ('+username+')</div>');
412
413 doAjax('login?sendotp=1&otpuser='+username,'','','ajax_login_otp','singlefail','GET',function(){
414
415 });
416 }
417
418
419
420 </script>
421
422
423 <?php echo $__env->make('layout.footer', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
424 <?php
425 }
426 ?>
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 <style type="text/css">
2
3 .marquee {
4
5 color: red;
6 white-space: nowrap;
7 overflow: hidden;
8 box-sizing: border-box;
9 }
10 .marquee p {
11 display: inline-block;
12 padding-left: 100%;
13 animation: marquee 15s linear infinite;
14 }
15 .label{
16 font-size: 100%;
17 }
18 @keyframes marquee {
19 0% { transform: translate(0, 0); }
20 100% { transform: translate(-100%, 0); }
21 }
22 </style>
23
24 <?php
25 use App\Jobs\KHRMSLib;
26 use App\Models\CRMCall;
27
28 use App\Models\UserLog;
29
30 $dashboarduser=Auth::user();
31
32 $timeoffset = $dashboarduser->timezone;
33 $timeoffset = $timeoffset*60;
34 $logtime =(isset($_GET['logtime'])) ? $_GET['logtime'] :9;
35 $logtimeto =(isset($_GET['logtimeto']))? $_GET['logtimeto']:20;
36
37 $logdate =(isset($_GET['logdate'])) ? strtotime($_GET['logdate']." ".$logtime.":00:00")
38 : strtotime(date("Y-m-d")." 09:00:00");
39 $logdateto =(isset($_GET['logdateto']))? strtotime($_GET['logdateto']." ".$logtimeto.":00:00"): strtotime(date("Y-m-d")." 20:00:00");
40 $breaks=array("Paused","AgentBriefing","TeamMeeting","QualityFeedback","LunchBreak","TeaBreak","UtilityBreak","FloorAnnouncements","DownTime");
41 $reporthead=array_merge(array("#","Telecaller","TelecallerID","Supervisor","Signin","Signout","Count","Duration","Total","Preview","Wait","Call","Talk","Dispo"),$breaks);
42 $alist_user=CRMCall::where('user_id','=',Auth::user()->id)->where('created_at','like','%' . date("Y-m-d") .'%')->where('created_at','like','%'.date("Y-m-d").'%')->get();
43 $userlog=UserLog::where('user_id','=',Auth::user()->id)->where('created_at','like','%' . date("Y-m-d") .'%')->where('created_at','like','%'.date("Y-m-d").'%')->get();
44
45 $reportarray=array();
46
47
48 $prev_close = 0;
49 $progTs_Wait=0;
50 $prev_user =0;
51 $predTs_Wait=0;
52 $uniquelanarray=array();
53 foreach ($alist_user as $row)
54 {
55 if($prev_user != $row->user_id || $prev_close <= $row->ts_Wait)
56 {
57 if($row->type == 'Progressive')
58 {
59 $progTs_Wait = $row->waitSec;
60 }
61 if($row->type == 'Auto')
62 {
63 $predTs_Wait = $row->waitSec;
64 }
65 $talktime1=$row->talkSec+$row->recstartSec+$row->recendSec;
66 $totaltime1=$row->callSec+$talktime1+$row->dispoSec+$progTs_Wait+$predTs_Wait;
67 if(!array_key_exists($row->user_id, $reportarray)) {
68 $reportarray[$row->user_id] = array();
69 $reportarray[$row->user_id]['oncall']=0;
70 $reportarray[$row->user_id]['Lan']=0;
71 }
72 $reportarray[$row->user_id]["oncall"]+=$totaltime1/1000;
73
74 if (!in_array($row->lan, $uniquelanarray)) $uniquelanarray[]=$row->lan;
75
76 $reportarray[$row->user_id]["Lan"] = count($uniquelanarray);
77 }
78 $prev_close = $row->ts_Close;
79 $prev_user = $row->user_id;
80 }
81
82
83 $userLogin=array();
84
85 foreach($userlog as $ulog)
86 {
87 $data1=json_decode($ulog->data,true);
88 $sdts =$logdateto+$timeoffset;
89 $data = array();
90 foreach ($data1 as $datavalue) {
91 $dts = round(($datavalue['ts'])/1000);
92 if($sdts > $dts){
93 array_push($data, $datavalue);
94 }
95 }
96 usort($data, "cmp");
97 if(!empty($data)){
98 $lastSip = end($data);
99 $starttime = strtotime($ulog->startdate.' '.$ulog->starttime);
100 $endtime = round($lastSip['ts']/1000);
101 if(!array_key_exists($ulog->user_id, $userLogin)) {
102 $userLogin[$ulog->user_id] = array();
103 $userLogin[$ulog->user_id]['duration']=0;
104 }
105 $userLogin[$ulog->user_id]['duration'] += ($endtime-$starttime);
106 $userLogin[$ulog->user_id]['start'][] = $starttime;
107 $userLogin[$ulog->user_id]['end'][] = $endtime;
108
109 $prets=strtotime($ulog->startdate." ".$ulog->starttime)*1000;
110 $previous="Paused-Paused";
111 foreach($data as $sdata)
112 {
113 $pts=$sdata['ts'];
114 if(isset($sdata['states']))
115 {
116 foreach($sdata['states'] as $ts=>$states)
117 {
118 if($previous != "Paused-WRAPUP")$previous = str_replace('Paused-', '', $previous);
119 if(!in_array($previous,$reporthead) && !in_array($previous,array('Progressive-','Manual-','Ready-Incoming','Ready-Predictive','DialNext-','Paused-WRAPUP'))) {
120 $previous = 'Paused';
121 }
122 if(!array_key_exists($ulog->user_id, $reportarray))
123 {
124 $reportarray[$ulog->user_id] = array();
125 }
126 if(!array_key_exists($previous, $reportarray[$ulog->user_id]))
127 {
128 $reportarray[$ulog->user_id][$previous]=0;
129 }
130 $reportarray[$ulog->user_id][$previous]+=round($ts-$prets,2)/1000;
131
132 $prets=$ts;
133 $previous=$states[0].'-'.$states[1];
134 }
135 if($previous != "Paused-WRAPUP")$previous = str_replace('Paused-', '', $previous);
136 if(!array_key_exists($ulog->user_id, $reportarray))
137 {
138 $reportarray[$ulog->user_id] = array();
139 }
140 if(!array_key_exists($previous, $reportarray[$ulog->user_id]))
141 {
142 $reportarray[$ulog->user_id][$previous]=0;
143 }
144 $reportarray[$ulog->user_id][$previous]+=round($pts-$prets,2)/1000;
145 $prets=$pts;
146 }
147 }
148 }
149 }
150 if(count($userLogin)) foreach ($userLogin as $userid => $value)
151 {
152 $break_time=0;
153 foreach ($breaks as $break) {
154 if(!array_key_exists($break, $reportarray[$userid]))
155 {
156 $reportarray[$userid][$break]=0;
157 }
158 $break_time+=$reportarray[$userid][$break];
159 }
160 $reportarray[$userid]["Signin"]=date("H:i:s", min($value['start'])-$timeoffset);
161 $reportarray[$userid]["Signout"]=date("H:i:s", max($value['end'])-$timeoffset);
162 $reportarray[$userid]["Duration"]=$value['duration'];
163 $reportarray[$userid]["Total"]=$value['duration']-$break_time;
164 $reportarray[$userid]["Break"]=$break_time;
165
166 }
167
168 function cmp($a, $b) {
169 return $a["ts"] - $b["ts"];
170 }
171
172
173 function secToDuration($sec) {
174 return sprintf("%02d%s%02d%s%02d", floor($sec/3600), ':', ($sec/60)%60, ':', $sec%60);
175 }
176 $campSel = Session::get('campSel');
177
178 $wakka=new KHRMSLib();
179 $dispoclassarr=array('NC'=>array(0,array()),'CC'=>array(0,array()),'CB'=>array(0,array()),'NA'=>array(0,array()));
180
181 $owclientstr=array();
182 $oclientlst=$wakka->clientsOwnerRWAccess();
183 if(!empty($oclientlst))foreach($oclientlst as $tclnt)if($tclnt!="")
184 {
185 $owclientstr[]="'$tclnt'";
186 if($client=="")$client=$tclnt;
187 }
188 if(!empty($owclientstr))$owclientstr="and client in (".implode(",",$owclientstr).")";else $owclientstr="";
189 if($client!="")$owclientstr="client='$client' and";
190
191 $roclientstr=array();$didlinesstr=array();if(Auth::user()->exten!="")$didlinesstr[]=Auth::user()->exten;
192 $roclientlst=$wakka->clientsReadAccess();
193
194 if(!empty($roclientlst))foreach($roclientlst as $tclnt)if($tclnt!="")
195 {
196 $roclientstr[]="'$tclnt'";
197 if($client=="")$client=$tclnt;
198
199 $mastersdata=$wakka->getCompanyMaster($tclnt);
200 if(!empty($mastersdata["DialerDID"]))$didlinesstr[]=$mastersdata["DialerDID"];
201
202
203 if(empty($mastersdata['dialerDispoList']))$mastersdata['dialerDispoList']=$wakka->HRCoreVars['dialerDispoList'];
204
205 $dispoarr=explode("~",$mastersdata['dialerDispoList']);
206 foreach($dispoarr as $dispo)
207 {
208 if(!empty($dispo))
209 {
210 $dispoprts=explode("|",$dispo);
211 if(sizeof($dispoprts)>=3)
212 {
213 if(isset($dispoclassarr[$dispoprts[0]]))
214 {
215 $dispoclassarr[$dispoprts[0]][1][]=$dispoprts[1];
216 }
217 }
218 }
219 }
220 }
221
222 foreach($didlinesstr as $k=>$dids)
223 {
224 $didarr=explode(":",$dids);
225 $didlinesstr[$k]=$didarr[0];
226 }
227
228 if(!empty($roclientstr))$roclientstr="and client in (".implode(",",$roclientstr).")";else $roclientstr="";
229 if($client!="")$roclientstr="and client='$client'";
230
231 $dispoarr=$wakka->LoadAll("select count(*) as cnt,currentstatus,legalstatus,dialer_status from records where $owclientstr 1=1 group by currentstatus,legalstatus,dialer_status");
232
233 $counts= DB::table('records')
234 ->select(DB::raw("count(*) as cnt,status"))
235 ->where('client', '=', $client)
236 ->groupBy('status')->get();
237
238 $totalCnt = 0;
239
240 foreach ($counts as $key => $count)
241 {
242 $status = $count->status;
243 $$status = $count->cnt;
244 $totalCnt+=$count->cnt;
245 }
246
247 //$TotalData=$New + $Called + $Incall;
248 $TotalData= $totalCnt;
249 $NotCalled=$New;
250 $TotalCalled=$Called;
251
252 $MissedCalls=0;
253
254 $mc=CRMCall::where('userstatus','=','InboundDROP')->where('created_at','>',date('Y-m-d H:i:s',time()-(7*24*60*60)));
255 $mc=$mc->where(function ($query) use($roclientlst,$didlinesstr){
256 $query->orWhereIn('client',$roclientlst)->orWhereIn('did',$didlinesstr);
257 });
258 $mc=$mc->get();
259
260 $number_list=array();
261 foreach($mc as $key=>$tcall){
262 $number_list[] = $tcall->number;
263 }
264
265 if(count($number_list) > 0) {
266 $lcalls=DB::select("SELECT * FROM crmcalls where id in (SELECT max(id) FROM crmcalls WHERE number IN ('" . implode("','", $number_list). "') GROUP BY number )");
267
268 foreach($lcalls as $lcall)
269 {
270 if($lcall->userstatus=="InboundDROP")
271 {
272 $MissedCalls++;
273 }
274 }
275 }
276
277 $callstoday=CRMCall::where("created_at",">=",date("Y-m-d 00:00:00"))->where("user_id","=",Auth::user()->id)->count();
278 $callsmonth=CRMCall::where("created_at",">=",date("Y-m-01 00:00:00"))->where("user_id","=",Auth::user()->id)->count();
279 $recstoday=$wakka->getCount("records","$owclientstr dialer_lastcall>='".date("Y-m-d 00:00:00")."'");
280 $recsmonth=$wakka->getCount("records","$owclientstr dialer_lastcall>='".date("Y-m-01 00:00:00")."'");
281
282 ?>
283
284 <div class=col-md-3>
285 <div class=col-md-11>
286
287 <?php if(sizeof($roclientlst)>0){ ?>
288 <h5>Campaign
289 <select class='form-control pull-right' id=tcampaign_select onchange='campaignSelect();' style='width:50%'>
290 <?php foreach($roclientlst as $c){$s="";if($c==$client)$s='selected';echo "<option value='$c' $s>$c</option>";} ?>
291 </select>
292 </h5>
293 <br/>
294 <?php } ?>
295 <input type="hidden" id=groupname value="<?php echo Auth::user()->group; ?>">
296
297 <br/>
298 <h5>Buckets
299 <span class='label label-small label-default pull-right'>
300 <a href=# onclick="dialerLoadData('CallsMonth','','',1,'','');return false;" style='color:#fff;font-size:12px'>
301 Month: <?php echo $recsmonth; ?> / <?php echo $callsmonth; ?>
302
303 </a>
304 </span>
305 <span class='label label-small label-default pull-right' style='margin-right:5px'>
306 <a href=# onclick="dialerLoadData('CallsToday','','',1,'','');return false;" style='color:#fff;font-size:12px'>
307 Today: <?php echo $recstoday; ?> / <?php echo $callstoday; ?>
308
309 </a>
310 </span>
311 </h5>
312 <br/>
313
314 <div style='clear:both'></div>
315 <ul style="list-style:none">
316 <li class="notify_alert">
317 <span><a href=# onclick="dialerLoadData('CurrentQueue','','',1,'','');return false;">CurrentQueue</a></span>
318 </li>
319 <li class="notify_alert">
320 <span><a href=# onclick="dialerLoadData('MissedCalls','','',1,'','');return false;">MissedCalls</a></span>
321 <span class="label label-small label-primary pull-right" >
322 <?php echo $MissedCalls; ?>
323
324 </span>
325 </li>
326 <li class="notify_alert">
327 <span><a href=# onclick="dialerLoadData('TotalData','','',1,'','');return false;">TotalData</a></span>
328 <span class="label label-small label-default pull-right" >
329 <?php echo $TotalData; ?>
330
331 </span>
332 </li>
333 <li class="notify_alert">
334 <span><a href=# onclick="dialerLoadData('NotCalled','','',1,'','');return false;">NotCalled</a></span>
335 <span class="label label-small label-default pull-right" >
336 <?php echo $NotCalled; ?>
337
338 </span>
339 </li>
340 <li class="notify_alert">
341 <span><a href=# onclick="dialerLoadData('Called','','',1,'','');return false;">Called</a></span>
342 <span class="label label-small label-success pull-right" >
343 <?php echo $TotalCalled; ?>
344
345 </span>
346 </li>
347 <li class="notify_alert">
348 <span><a href=# onclick="return false;">Contacted</a></span>
349 <span class="label label-small label-success pull-right" id=contactedcnt_span>
350 0
351 </span>
352 </li>
353
354 <hr><br>
355
356 <?php
357 foreach($dispoarr as $disp) {
358 foreach($dispoclassarr as $dclass=>$darr)
359 {
360 if(in_array($disp['dialer_status'],$darr[1]))
361 {
362 $dispoclassarr[$dclass][0]+=$disp['cnt'];
363 }
364 }
365
366 $class=str_replace(" ","_","CLS_".$disp['currentstatus'].$disp['legalstatus']);
367 ?>
368 <li class="notify_alert bucketliitem <?php echo $class; ?>">
369 <span><a href=# onclick="dialerLoadData('<?php echo $disp['dialer_status']; ?>','<?php echo $disp['currentstatus']; ?>','<?php echo $disp['legalstatus']; ?>',1,'','');return false;"><?php echo $disp['dialer_status']==''?'------':$disp['dialer_status']; ?></a></span>
370 <span class="label label-small label-success pull-right" >
371 <?php echo $disp['cnt']; ?>
372
373 </span>
374 </li>
375 <?php
376 }
377
378 $contacted=$dispoclassarr['CC'][0]+$dispoclassarr['CB'][0]+$dispoclassarr['NC'][0];
379 echo "<script>$('#contactedcnt_span').html('$contacted');</script>";
380 ?>
381 </ul>
382 </div>
383 </div>
384
385
386 <div style="float: right;font-size:16px!important">
387 <?php $login= $reportarray ? $reportarray[Auth::user()->id]["Signin"] : '00:00:00'; ?>
388 <?php $logout= $reportarray ? $reportarray[Auth::user()->id]["Signout"] : '00:00:00'; ?>
389 <?php $Lan= $reportarray ? $reportarray[Auth::user()->id]["Lan"] : '00'; ?>
390 login:&nbsp;&nbsp;<span class="label label-default" ><?php echo $login; ?></span>
391 logout:&nbsp;&nbsp;<span class="label label-default"><?php echo $logout; ?></span>
392 <!-- Handle:&nbsp;&nbsp;<span class="label label-default"><?php echo secToDuration($reportarray[Auth::user()->id]["oncall"])?></span> -->
393 Lan:&nbsp;&nbsp;<span class="label label-default"><?php echo $Lan; ?></span>
394 Total:&nbsp;&nbsp;<span class="label label-default"><?php echo secToDuration($reportarray[Auth::user()->id]["Total"])?></span>
395 <!-- Break:&nbsp;&nbsp;<span class="label label-default"><?php echo secToDuration($reportarray[Auth::user()->id]["Break"])?></span> -->
396 Duration:&nbsp;&nbsp;<span class="label label-default"><?php echo secToDuration($reportarray[Auth::user()->id]["Duration"])?></span>
397 </div>
398
399
400 <div class=col-md-9 id=bucketlistdiv></div>
401 <div style='clear:both'></div>
402
403 <script>
404 function campaignSelect()
405 {
406 var dashlet="Dialer";
407 client = $('#tcampaign_select').val();
408 doAjax("dashboard/dashlet?module="+dashlet+"&client="+client,"","DashletT-"+dashlet,"ajax_dashlet_"+dashlet,"singlefail","GET");
409
410 /*doAjax("autodial/autodialmode?client="+$("#tcampaign_select").val(),"","","","singlefail","GET");*/
411
412 callingModeChange();
413 savedialermode();
414 }
415
416 // code start - function for change calling mode assign, campaign wise - by YASHWANT on 11042017
417 function callingModeChange()
418 {
419
420 var action = "callingmode";
421
422 $.ajax({
423 type: "GET",
424 url: action,
425 data: "client="+$("#tcampaign_select").val(),
426 success: function(nextRecord)
427 {
428 var elementsLI = document.getElementById("dialer_mode").getElementsByTagName('li');
429 var length = document.getElementById("dialer_mode").getElementsByTagName('li').length;
430
431 if(nextRecord)
432 {
433 for(var i = 0; i <= length - 10 ; ++i)
434 {
435 if(nextRecord != elementsLI[i].innerText)
436 {
437 elementsLI[i].style.display = "none";
438 } else {
439 elementsLI[i].style.display = "block";
440 }
441 }
442 }
443 else
444 {
445 for(var i = 0; i <= length - 10 ; ++i){
446 if(nextRecord != elementsLI[i].innerText)
447 elementsLI[i].style.display = "block";
448 }
449 }
450
451 }
452 });
453 }
454 // code end - function for change calling mode assign, campaign wise - by YASHWANT on 11042017
455
456 function bucketSelect()
457 {
458 var activeclass='CLS_'+$('#currentstatus_select').val()+$('#legalstatus_select').val();
459 $('.bucketliitem').hide();
460 $('.'+activeclass).show();
461 }
462
463 bucketSelect();
464 callingModeChange();
465
466 function dialerLoadData(listname,currentstatus,legalstatus,page,skey,stxt)
467 {
468 client = $('#tcampaign_select').val();
469
470 doAjax("dialer/bucketdata","client=<?php echo $client; ?>&bucket="+listname+"&currentstatus="+currentstatus+"&legalstatus="+legalstatus+'&page='+page+'&skey='+skey+'&stxt='+stxt,"bucketlistdiv","ajax_dialer_list","singlefail","GET",function(argument) {
471 $(document).ready(function(){
472 $('#dashboardTable').DataTable(
473 {
474 "paging": false,
475 "info": false,
476 "searching": false
477 });
478 });
479 });
480
481 /*doAjax("autodial/autodialmode?client="+$("#tcampaign_select").val(),"","","","singlefail","GET");*/
482 savedialermode();
483 }
484
485 dialerLoadData('CurrentQueue','','',1,'','');
486 redirect_to_password_reset();
487 </script>
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 type="text/css">
2
3 .marquee {
4
5 color: red;
6 white-space: nowrap;
7 overflow: hidden;
8 box-sizing: border-box;
9 }
10 .marquee p {
11 display: inline-block;
12 padding-left: 100%;
13 animation: marquee 15s linear infinite;
14 }
15 .label{
16 font-size: 100%;
17 }
18 @keyframes marquee {
19 0% { transform: translate(0, 0); }
20 100% { transform: translate(-100%, 0); }
21 }
22 </style>
23
24 <?php
25 use App\Jobs\KHRMSLib;
26 use App\Models\CRMCall;
27
28 use App\Models\UserLog;
29
30 $dashboarduser=Auth::user();
31
32 $timeoffset = $dashboarduser->timezone;
33 $timeoffset = $timeoffset*60;
34 $logtime =(isset($_GET['logtime'])) ? $_GET['logtime'] :9;
35 $logtimeto =(isset($_GET['logtimeto']))? $_GET['logtimeto']:20;
36
37 $logdate =(isset($_GET['logdate'])) ? strtotime($_GET['logdate']." ".$logtime.":00:00")
38 : strtotime(date("Y-m-d")." 09:00:00");
39 $logdateto =(isset($_GET['logdateto']))? strtotime($_GET['logdateto']." ".$logtimeto.":00:00"): strtotime(date("Y-m-d")." 20:00:00");
40 $breaks=array("Paused","AgentBriefing","TeamMeeting","QualityFeedback","LunchBreak","TeaBreak","UtilityBreak","FloorAnnouncements","DownTime");
41 $reporthead=array_merge(array("#","Telecaller","TelecallerID","Supervisor","Signin","Signout","Count","Duration","Total","Preview","Wait","Call","Talk","Dispo"),$breaks);
42 $alist_user=CRMCall::where('user_id','=',Auth::user()->id)->where('created_at','like','%' . date("Y-m-d") .'%')->where('created_at','like','%'.date("Y-m-d").'%')->get();
43 $userlog=UserLog::where('user_id','=',Auth::user()->id)->where('created_at','like','%' . date("Y-m-d") .'%')->where('created_at','like','%'.date("Y-m-d").'%')->get();
44
45 $reportarray=array();
46
47
48 $prev_close = 0;
49 $progTs_Wait=0;
50 $prev_user =0;
51 $predTs_Wait=0;
52 $uniquelanarray=array();
53 foreach ($alist_user as $row)
54 {
55 if($prev_user != $row->user_id || $prev_close <= $row->ts_Wait)
56 {
57 if($row->type == 'Progressive')
58 {
59 $progTs_Wait = $row->waitSec;
60 }
61 if($row->type == 'Auto')
62 {
63 $predTs_Wait = $row->waitSec;
64 }
65 $talktime1=$row->talkSec+$row->recstartSec+$row->recendSec;
66 $totaltime1=$row->callSec+$talktime1+$row->dispoSec+$progTs_Wait+$predTs_Wait;
67 if(!array_key_exists($row->user_id, $reportarray)) {
68 $reportarray[$row->user_id] = array();
69 $reportarray[$row->user_id]['oncall']=0;
70 $reportarray[$row->user_id]['Lan']=0;
71 }
72 $reportarray[$row->user_id]["oncall"]+=$totaltime1/1000;
73
74 if (!in_array($row->lan, $uniquelanarray)) $uniquelanarray[]=$row->lan;
75
76 $reportarray[$row->user_id]["Lan"] = count($uniquelanarray);
77 }
78 $prev_close = $row->ts_Close;
79 $prev_user = $row->user_id;
80 }
81
82
83 $userLogin=array();
84
85 foreach($userlog as $ulog)
86 {
87 $data1=json_decode($ulog->data,true);
88 $sdts =$logdateto+$timeoffset;
89 $data = array();
90 foreach ($data1 as $datavalue) {
91 $dts = round(($datavalue['ts'])/1000);
92 if($sdts > $dts){
93 array_push($data, $datavalue);
94 }
95 }
96 usort($data, "cmp");
97 if(!empty($data)){
98 $lastSip = end($data);
99 $starttime = strtotime($ulog->startdate.' '.$ulog->starttime);
100 $endtime = round($lastSip['ts']/1000);
101 if(!array_key_exists($ulog->user_id, $userLogin)) {
102 $userLogin[$ulog->user_id] = array();
103 $userLogin[$ulog->user_id]['duration']=0;
104 }
105 $userLogin[$ulog->user_id]['duration'] += ($endtime-$starttime);
106 $userLogin[$ulog->user_id]['start'][] = $starttime;
107 $userLogin[$ulog->user_id]['end'][] = $endtime;
108
109 $prets=strtotime($ulog->startdate." ".$ulog->starttime)*1000;
110 $previous="Paused-Paused";
111 foreach($data as $sdata)
112 {
113 $pts=$sdata['ts'];
114 if(isset($sdata['states']))
115 {
116 foreach($sdata['states'] as $ts=>$states)
117 {
118 if($previous != "Paused-WRAPUP")$previous = str_replace('Paused-', '', $previous);
119 if(!in_array($previous,$reporthead) && !in_array($previous,array('Progressive-','Manual-','Ready-Incoming','Ready-Predictive','DialNext-','Paused-WRAPUP'))) {
120 $previous = 'Paused';
121 }
122 if(!array_key_exists($ulog->user_id, $reportarray))
123 {
124 $reportarray[$ulog->user_id] = array();
125 }
126 if(!array_key_exists($previous, $reportarray[$ulog->user_id]))
127 {
128 $reportarray[$ulog->user_id][$previous]=0;
129 }
130 $reportarray[$ulog->user_id][$previous]+=round($ts-$prets,2)/1000;
131
132 $prets=$ts;
133 $previous=$states[0].'-'.$states[1];
134 }
135 if($previous != "Paused-WRAPUP")$previous = str_replace('Paused-', '', $previous);
136 if(!array_key_exists($ulog->user_id, $reportarray))
137 {
138 $reportarray[$ulog->user_id] = array();
139 }
140 if(!array_key_exists($previous, $reportarray[$ulog->user_id]))
141 {
142 $reportarray[$ulog->user_id][$previous]=0;
143 }
144 $reportarray[$ulog->user_id][$previous]+=round($pts-$prets,2)/1000;
145 $prets=$pts;
146 }
147 }
148 }
149 }
150 if(count($userLogin)) foreach ($userLogin as $userid => $value)
151 {
152 $break_time=0;
153 foreach ($breaks as $break) {
154 if(!array_key_exists($break, $reportarray[$userid]))
155 {
156 $reportarray[$userid][$break]=0;
157 }
158 $break_time+=$reportarray[$userid][$break];
159 }
160 $reportarray[$userid]["Signin"]=date("H:i:s", min($value['start'])-$timeoffset);
161 $reportarray[$userid]["Signout"]=date("H:i:s", max($value['end'])-$timeoffset);
162 $reportarray[$userid]["Duration"]=$value['duration'];
163 $reportarray[$userid]["Total"]=$value['duration']-$break_time;
164 $reportarray[$userid]["Break"]=$break_time;
165
166 }
167
168 function cmp($a, $b) {
169 return $a["ts"] - $b["ts"];
170 }
171
172
173 function secToDuration($sec) {
174 return sprintf("%02d%s%02d%s%02d", floor($sec/3600), ':', ($sec/60)%60, ':', $sec%60);
175 }
176 $campSel = Session::get('campSel');
177
178 $wakka=new KHRMSLib();
179 $dispoclassarr=array('NC'=>array(0,array()),'CC'=>array(0,array()),'CB'=>array(0,array()),'NA'=>array(0,array()));
180
181 $owclientstr=array();
182 $oclientlst=$wakka->clientsOwnerRWAccess();
183 if(!empty($oclientlst))foreach($oclientlst as $tclnt)if($tclnt!="")
184 {
185 $owclientstr[]="'$tclnt'";
186 if($client=="")$client=$tclnt;
187 }
188 if(!empty($owclientstr))$owclientstr="and client in (".implode(",",$owclientstr).")";else $owclientstr="";
189 if($client!="")$owclientstr="client='$client' and";
190
191 $roclientstr=array();$didlinesstr=array();if(Auth::user()->exten!="")$didlinesstr[]=Auth::user()->exten;
192 $roclientlst=$wakka->clientsReadAccess();
193
194 if(!empty($roclientlst))foreach($roclientlst as $tclnt)if($tclnt!="")
195 {
196 $roclientstr[]="'$tclnt'";
197 if($client=="")$client=$tclnt;
198
199 $mastersdata=$wakka->getCompanyMaster($tclnt);
200 if(!empty($mastersdata["DialerDID"]))$didlinesstr[]=$mastersdata["DialerDID"];
201
202
203 if(empty($mastersdata['dialerDispoList']))$mastersdata['dialerDispoList']=$wakka->HRCoreVars['dialerDispoList'];
204
205 $dispoarr=explode("~",$mastersdata['dialerDispoList']);
206 foreach($dispoarr as $dispo)
207 {
208 if(!empty($dispo))
209 {
210 $dispoprts=explode("|",$dispo);
211 if(sizeof($dispoprts)>=3)
212 {
213 if(isset($dispoclassarr[$dispoprts[0]]))
214 {
215 $dispoclassarr[$dispoprts[0]][1][]=$dispoprts[1];
216 }
217 }
218 }
219 }
220 }
221
222 foreach($didlinesstr as $k=>$dids)
223 {
224 $didarr=explode(":",$dids);
225 $didlinesstr[$k]=$didarr[0];
226 }
227
228 if(!empty($roclientstr))$roclientstr="and client in (".implode(",",$roclientstr).")";else $roclientstr="";
229 if($client!="")$roclientstr="and client='$client'";
230
231 $dispoarr=$wakka->LoadAll("select count(*) as cnt,currentstatus,legalstatus,dialer_status from records where $owclientstr 1=1 group by currentstatus,legalstatus,dialer_status");
232
233 $counts= DB::table('records')
234 ->select(DB::raw("count(*) as cnt,status"))
235 ->where('client', '=', $client)
236 ->groupBy('status')->get();
237
238 $totalCnt = 0;
239
240 foreach ($counts as $key => $count)
241 {
242 $status = $count->status;
243 $$status = $count->cnt;
244 $totalCnt+=$count->cnt;
245 }
246
247 //$TotalData=$New + $Called + $Incall;
248 $TotalData= $totalCnt;
249 $NotCalled=$New;
250 $TotalCalled=$Called;
251
252 $MissedCalls=0;
253
254 $mc=CRMCall::where('userstatus','=','InboundDROP')->where('created_at','>',date('Y-m-d H:i:s',time()-(7*24*60*60)));
255 $mc=$mc->where(function ($query) use($roclientlst,$didlinesstr){
256 $query->orWhereIn('client',$roclientlst)->orWhereIn('did',$didlinesstr);
257 });
258 $mc=$mc->get();
259
260 $number_list=array();
261 foreach($mc as $key=>$tcall){
262 $number_list[] = $tcall->number;
263 }
264
265 if(count($number_list) > 0) {
266 $lcalls=DB::select("SELECT * FROM crmcalls where id in (SELECT max(id) FROM crmcalls WHERE number IN ('" . implode("','", $number_list). "') GROUP BY number )");
267
268 foreach($lcalls as $lcall)
269 {
270 if($lcall->userstatus=="InboundDROP")
271 {
272 $MissedCalls++;
273 }
274 }
275 }
276
277 $callstoday=CRMCall::where("created_at",">=",date("Y-m-d 00:00:00"))->where("user_id","=",Auth::user()->id)->count();
278 $callsmonth=CRMCall::where("created_at",">=",date("Y-m-01 00:00:00"))->where("user_id","=",Auth::user()->id)->count();
279 $recstoday=$wakka->getCount("records","$owclientstr dialer_lastcall>='".date("Y-m-d 00:00:00")."'");
280 $recsmonth=$wakka->getCount("records","$owclientstr dialer_lastcall>='".date("Y-m-01 00:00:00")."'");
281
282 ?>
283
284 <div class=col-md-3>
285 <div class=col-md-11>
286
287 <?php if(sizeof($roclientlst)>0){ ?>
288 <h5>Campaign
289 <select class='form-control pull-right' id=tcampaign_select onchange='campaignSelect();' style='width:50%'>
290 <?php foreach($roclientlst as $c){$s="";if($c==$client)$s='selected';echo "<option value='$c' $s>$c</option>";} ?>
291 </select>
292 </h5>
293 <br/>
294 <?php } ?>
295 <input type="hidden" id=groupname value="<?php echo Auth::user()->group; ?>">
296
297 <br/>
298 <h5>Buckets
299 <span class='label label-small label-default pull-right'>
300 <a href=# onclick="dialerLoadData('CallsMonth','','',1,'','');return false;" style='color:#fff;font-size:12px'>
301 Month: <?php echo $recsmonth; ?> / <?php echo $callsmonth; ?>
302
303 </a>
304 </span>
305 <span class='label label-small label-default pull-right' style='margin-right:5px'>
306 <a href=# onclick="dialerLoadData('CallsToday','','',1,'','');return false;" style='color:#fff;font-size:12px'>
307 Today: <?php echo $recstoday; ?> / <?php echo $callstoday; ?>
308
309 </a>
310 </span>
311 </h5>
312 <br/>
313
314 <div style='clear:both'></div>
315 <ul style="list-style:none">
316 <li class="notify_alert">
317 <span><a href=# onclick="dialerLoadData('CurrentQueue','','',1,'','');return false;">CurrentQueue</a></span>
318 </li>
319 <li class="notify_alert">
320 <span><a href=# onclick="dialerLoadData('MissedCalls','','',1,'','');return false;">MissedCalls</a></span>
321 <span class="label label-small label-primary pull-right" >
322 <?php echo $MissedCalls; ?>
323
324 </span>
325 </li>
326 <li class="notify_alert">
327 <span><a href=# onclick="dialerLoadData('TotalData','','',1,'','');return false;">TotalData</a></span>
328 <span class="label label-small label-default pull-right" >
329 <?php echo $TotalData; ?>
330
331 </span>
332 </li>
333 <li class="notify_alert">
334 <span><a href=# onclick="dialerLoadData('NotCalled','','',1,'','');return false;">NotCalled</a></span>
335 <span class="label label-small label-default pull-right" >
336 <?php echo $NotCalled; ?>
337
338 </span>
339 </li>
340 <li class="notify_alert">
341 <span><a href=# onclick="dialerLoadData('Called','','',1,'','');return false;">Called</a></span>
342 <span class="label label-small label-success pull-right" >
343 <?php echo $TotalCalled; ?>
344
345 </span>
346 </li>
347 <li class="notify_alert">
348 <span><a href=# onclick="return false;">Contacted</a></span>
349 <span class="label label-small label-success pull-right" id=contactedcnt_span>
350 0
351 </span>
352 </li>
353
354 <hr><br>
355
356 <?php
357 foreach($dispoarr as $disp) {
358 foreach($dispoclassarr as $dclass=>$darr)
359 {
360 if(in_array($disp['dialer_status'],$darr[1]))
361 {
362 $dispoclassarr[$dclass][0]+=$disp['cnt'];
363 }
364 }
365
366 $class=str_replace(" ","_","CLS_".$disp['currentstatus'].$disp['legalstatus']);
367 ?>
368 <li class="notify_alert bucketliitem <?php echo $class; ?>">
369 <span><a href=# onclick="dialerLoadData('<?php echo $disp['dialer_status']; ?>','<?php echo $disp['currentstatus']; ?>','<?php echo $disp['legalstatus']; ?>',1,'','');return false;"><?php echo $disp['dialer_status']==''?'------':$disp['dialer_status']; ?></a></span>
370 <span class="label label-small label-success pull-right" >
371 <?php echo $disp['cnt']; ?>
372
373 </span>
374 </li>
375 <?php
376 }
377
378 $contacted=$dispoclassarr['CC'][0]+$dispoclassarr['CB'][0]+$dispoclassarr['NC'][0];
379 echo "<script>$('#contactedcnt_span').html('$contacted');</script>";
380 ?>
381 </ul>
382 </div>
383 </div>
384
385
386 <div style="float: right;font-size:16px!important">
387 <?php $login= $reportarray ? $reportarray[Auth::user()->id]["Signin"] : '00:00:00'; ?>
388 <?php $logout= $reportarray ? $reportarray[Auth::user()->id]["Signout"] : '00:00:00'; ?>
389 <?php $Lan= $reportarray ? $reportarray[Auth::user()->id]["Lan"] : '00'; ?>
390 login:&nbsp;&nbsp;<span class="label label-default" ><?php echo $login; ?></span>
391 logout:&nbsp;&nbsp;<span class="label label-default"><?php echo $logout; ?></span>
392 <!-- Handle:&nbsp;&nbsp;<span class="label label-default"><?php echo secToDuration($reportarray[Auth::user()->id]["oncall"])?></span> -->
393 Lan:&nbsp;&nbsp;<span class="label label-default"><?php echo $Lan; ?></span>
394 Total:&nbsp;&nbsp;<span class="label label-default"><?php echo secToDuration($reportarray[Auth::user()->id]["Total"])?></span>
395 <!-- Break:&nbsp;&nbsp;<span class="label label-default"><?php echo secToDuration($reportarray[Auth::user()->id]["Break"])?></span> -->
396 Duration:&nbsp;&nbsp;<span class="label label-default"><?php echo secToDuration($reportarray[Auth::user()->id]["Duration"])?></span>
397 </div>
398
399
400 <div class=col-md-9 id=bucketlistdiv></div>
401 <div style='clear:both'></div>
402
403 <script>
404 function campaignSelect()
405 {
406 var dashlet="Dialer";
407 client = $('#tcampaign_select').val();
408 doAjax("dashboard/dashlet?module="+dashlet+"&client="+client,"","DashletT-"+dashlet,"ajax_dashlet_"+dashlet,"singlefail","GET");
409
410 /*doAjax("autodial/autodialmode?client="+$("#tcampaign_select").val(),"","","","singlefail","GET");*/
411
412 callingModeChange();
413 savedialermode();
414 }
415
416 // code start - function for change calling mode assign, campaign wise - by YASHWANT on 11042017
417 function callingModeChange()
418 {
419
420 var action = "callingmode";
421
422 $.ajax({
423 type: "GET",
424 url: action,
425 data: "client="+$("#tcampaign_select").val(),
426 success: function(nextRecord)
427 {
428 var elementsLI = document.getElementById("dialer_mode").getElementsByTagName('li');
429 var length = document.getElementById("dialer_mode").getElementsByTagName('li').length;
430
431 if(nextRecord)
432 {
433 for(var i = 0; i <= length - 10 ; ++i)
434 {
435 if(nextRecord != elementsLI[i].innerText)
436 {
437 elementsLI[i].style.display = "none";
438 } else {
439 elementsLI[i].style.display = "block";
440 }
441 }
442 }
443 else
444 {
445 for(var i = 0; i <= length - 10 ; ++i){
446 if(nextRecord != elementsLI[i].innerText)
447 elementsLI[i].style.display = "block";
448 }
449 }
450
451 }
452 });
453 }
454 // code end - function for change calling mode assign, campaign wise - by YASHWANT on 11042017
455
456 function bucketSelect()
457 {
458 var activeclass='CLS_'+$('#currentstatus_select').val()+$('#legalstatus_select').val();
459 $('.bucketliitem').hide();
460 $('.'+activeclass).show();
461 }
462
463 bucketSelect();
464 callingModeChange();
465
466 function dialerLoadData(listname,currentstatus,legalstatus,page,skey,stxt)
467 {
468 client = $('#tcampaign_select').val();
469
470 doAjax("dialer/bucketdata","client=<?php echo $client; ?>&bucket="+listname+"&currentstatus="+currentstatus+"&legalstatus="+legalstatus+'&page='+page+'&skey='+skey+'&stxt='+stxt,"bucketlistdiv","ajax_dialer_list","singlefail","GET",function(argument) {
471 $(document).ready(function(){
472 $('#dashboardTable').DataTable(
473 {
474 "paging": false,
475 "info": false,
476 "searching": false
477 });
478 });
479 });
480
481 /*doAjax("autodial/autodialmode?client="+$("#tcampaign_select").val(),"","","","singlefail","GET");*/
482 savedialermode();
483 }
484
485 dialerLoadData('CurrentQueue','','',1,'','');
486 redirect_to_password_reset();
487 </script>
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
3 ini_set("precision", 15);
4
5 if ($_SERVER["REQUEST_METHOD"] == "POST")
6 {
7 $errorMsg = "";
8 $successMsg = "";
9
10 if($_FILES['file']['tmp_name'])
11 {
12 if($_FILES['file']['type'] == "application/vnd.ms-excel")
13 {
14 $fileUploadLimit = 52428800; // files size is in bytes
15 if($_FILES['file']['size'] < $fileUploadLimit)
16 {
17 include_once(app_path().'/lib/phpexcel/PHPExcel.php');
18
19 if ($_POST["uploadFileType"] == "customerInfo")
20 {
21 $kformlib=new \App\Jobs\KFormLib($wakka->HRCoreVars["HRFiledsStr"]);
22 $kformlib->gthis=$wakka;
23 $themehome=$wakka->GetThemePath('/');
24 $updatetime=time();
25
26 function mkdir_r ($dir)
27 {
28 if (strlen($dir) == 0)return 0;
29 if (is_dir($dir))return 1;
30 elseif (dirname($dir) == $dir)return 1;
31 return (mkdir_r(dirname($dir)) and mkdir($dir,0777));
32 }
33
34 $clientlst=$wakka->GetBBBUserData("clientslist");
35 $isadmin=$wakka->IsAdmin();
36 $username=$wakka->GetUserName();
37 $triggers=Input::get("triggers");
38 $tmpstr=explode(",",$kformlib->HRFiledsStr);
39 $success="";$message="";$successcnt=0;$duplicatecount=0;
40 $inputFileType = "Excel5";
41
42 $objReader = PHPExcel_IOFactory::createReader($inputFileType);
43 $objPHPExcel = $objReader->load($_FILES['file']['tmp_name']);
44 $objWorksheet = $objPHPExcel->getActiveSheet();
45 $highestColumn = PHPExcel_Cell::columnIndexFromString($objPHPExcel->getActiveSheet()->getHighestColumn());
46 $highestrow=$objPHPExcel->getActiveSheet()->getHighestRow();
47 $excelarray=array();$keys=array();
48
49 for($i=1;$i<=$highestrow;$i++)
50 {
51 $excelarray[$i]=array();
52 for($head = 0; $head < $highestColumn; $head++)
53 {
54 if($i==1)
55 {
56 $keys[$head]=trim($objWorksheet->getCellByColumnAndRow($head,$i)->getValue());
57 }else{
58 $excelarray[$i][$keys[$head]]=trim($objWorksheet->getCellByColumnAndRow($head, $i)->getValue());
59 }
60 }
61 }
62
63 for($i=3;$i<=$highestrow;$i++)
64 {
65 if($excelarray[$i]["lan"]!="")
66 {
67
68 if(strlen($excelarray[$i]["lan"]) ===15)
69 {
70 if($wakka->getCampaign($excelarray[$i]['client']))
71 {
72
73 $lan = $wakka->getLan($excelarray[$i]['lan']);
74 if($excelarray[$i]["lan"]!=$lan['lan'])
75 {
76 $excelarray[$i]["id"]=$wakka->Query("insert into","","records",array('created'=>date('Y-m-d H:i:s')));
77 }
78 else
79 {
80 $excelarray[$i]["id"]=intval($lan['id']);
81 }
82
83 // $lanq = DB::table('records')->select('id')->where('lan', '=', $excelarray[$i]["lan"])->first();
84 // if($lanq){
85 // $excelarray[$i]["id"]=intval($lanq->id);
86 // }else{
87 // $excelarray[$i]["id"]=$wakka->Query("insert into","","records",array('created'=>date('Y-m-d H:i:s')));
88 // }
89
90 if($wakka->getCount("records","id='".$excelarray[$i]["id"]."'")==1)
91 {
92 $empdata=$wakka->getPerson($excelarray[$i]["id"]);
93 $ppldata=$empdata["peopledata"];
94 $createdlog=$empdata['modifylog'];
95 $fdirty=$empdata['dirty'];
96
97 $createdlog[$updatetime]=$username."::";
98 $createdlog["updated"]=$updatetime;
99
100 $newdata=$ppldata;
101 if($isadmin||strstr($clientlst,$ppldata['client']))
102 {
103 $editflag=0;
104 foreach($excelarray[$i] as $key => $value)
105 {
106 $value = preg_replace('/[^A-Za-z0-9\., -]/', '', $value);
107
108 if(isset($kformlib->HRFieldNames[$key]))
109 {
110 if($value!="")
111 {
112 if("A".$ppldata[$key]!="A".$value)//forcing string comparrision //MAGIC
113 {
114 $value=str_replace("'"," ",$value);
115 if(strstr($createdlog[$updatetime],$key)==FALSE)$createdlog[$updatetime].="$key|".str_replace(array("|",",")," ",$ppldata[$key])."|".str_replace(array("|",",")," ",$value).",";
116
117 $fdirty[$key]=1;$editflag=1;
118
119 if($triggers=='Yes')
120 {
121 $kformlib->empAnalytics($excelarray[$i]["id"],$ppldata,$key,$value,$ppldata[$key]);
122 $kformlib->empWorkflowTrigger($excelarray[$i]["id"],$ppldata['client'],$key,$value,$ppldata[$key],$ppldata,$newdata);
123 }
124 $newdata[$key]=$value;
125 }
126 //else $message.="same $excelarray[$i][id]:$key:$value, ";
127 }
128 //else $message.="empty $excelarray[$i][id]:$key, ";
129 }else{
130 // $message.="Invalid key :$key, ";
131 }
132 }
133 if($editflag)
134 {
135 $empdata["peopledata"]=$newdata;
136 $empdata['modifylog']=$createdlog;
137 $empdata['dirty']=$fdirty;
138
139 $wakka->setPerson($excelarray[$i]["id"],$empdata);
140 $success.=$excelarray[$i]["id"].",";$successcnt++;
141 }else{
142 $errorMsg.="Same Data exist already "." with Lan No ".$excelarray[$i]["lan"].", " ;
143 }
144 }else{
145 $errorMsg.="No access to $excelarray[$i][id], ";
146 }
147 }else{
148 $errorMsg.="ID not found $excelarray[$i][id], ";
149 }
150 }else
151 {
152 $errorMsg.=$excelarray[$i]["client"]." is not available,Please Create this Campaign first ";
153 break;
154 }
155 }else{
156 $errorMsg.="LAN Number ".$i."should be 15digit, ";
157
158 }
159
160 }else{
161 $errorMsg.="LAN No is blank, ";
162 break;
163
164 }
165 }
166 $successMsg .= "Data Uploaded ($successcnt)."; // : $success.";
167 }
168
169 if ($_POST["uploadFileType"] == "trails")
170 {
171 $success="";$message="";$successcnt=0;$duplicatecount=0;
172 $inputFileType = "Excel5";
173
174 $objReader = PHPExcel_IOFactory::createReader($inputFileType);
175 $objPHPExcel = $objReader->load($_FILES['file']['tmp_name']);
176 $objWorksheet = $objPHPExcel->getActiveSheet();
177 $highestColumn = PHPExcel_Cell::columnIndexFromString($objPHPExcel->getActiveSheet()->getHighestColumn());
178 $highestrow=$objPHPExcel->getActiveSheet()->getHighestRow();
179 $excelarray=array();$keys=array();
180
181 for($i=1;$i<=$highestrow;$i++)
182 {
183 $excelarray[$i]=array();
184 for($head = 0; $head < $highestColumn; $head++)
185 {
186 if($i==1)
187 {
188 $keys[$head]=trim($objWorksheet->getCellByColumnAndRow($head,$i)->getValue());
189 }else{
190 $excelarray[$i][$keys[$head]]=trim($objWorksheet->getCellByColumnAndRow($head, $i)->getValue());
191 }
192 }
193 }
194
195 $addCount = 0;$updateCount = 0;
196 for($i=3;$i<=$highestrow;$i++)
197 {
198 if($excelarray[$i]["id"]!="")
199 {
200 if($excelarray[$i]["id"]=="Create")
201 {
202 $queryResult = $wakka->Query("insert into","","trails",array(
203 'lan'=>$excelarray[$i]['lan'],
204 'action_date'=> PHPExcel_Style_NumberFormat::toFormattedString($excelarray[$i]['actionDate'], 'yyyy-mm-dd'),
205 'user_id'=>$excelarray[$i]['userId'],
206 'action_code'=>$excelarray[$i]['actionCode'],
207 'result_code'=>$excelarray[$i]['resultCode'],
208 'next_action_code'=>$excelarray[$i]['nextActionCode'],
209 'next_action_time'=>PHPExcel_Style_NumberFormat::toFormattedString($excelarray[$i]['nextActionDate'], 'yyyy-mm-dd hh:mm'),
210 'rfd'=>$excelarray[$i]['rfd'],
211 'remark'=>$excelarray[$i]['remark'],
212 'bucket_code'=>$excelarray[$i]['bucketCode_field'],
213 'special_code'=>$excelarray[$i]['specialCode']
214 ));
215 $addResult .= $queryResult.', ';
216 $addCount++;
217 }else{
218 $lanq = DB::table('trails')->select('id')->where('id', '=', $excelarray[$i]["id"])->first();
219 if($lanq && $lanq->id != ""){
220 DB::table('trails')->where('id',$lanq->id)->update([
221 'lan'=>$excelarray[$i]['lan'],
222 'action_date'=>PHPExcel_Style_NumberFormat::toFormattedString($excelarray[$i]['actionDate'], 'yyyy-mm-dd'),
223 'user_id'=>$excelarray[$i]['userId'],
224 'action_code'=>$excelarray[$i]['actionCode'],
225 'result_code'=>$excelarray[$i]['resultCode'],
226 'next_action_code'=>$excelarray[$i]['nextActionCode'],
227 'next_action_time'=>PHPExcel_Style_NumberFormat::toFormattedString($excelarray[$i]['nextActionDate'], 'yyyy-mm-dd hh:mm'),
228 'rfd'=>$excelarray[$i]['rfd'],
229 'remark'=>$excelarray[$i]['remark'],
230 'bucket_code'=>$excelarray[$i]['bucketCode_field'],
231 'special_code'=>$excelarray[$i]['specialCode']
232 ]);
233 $updateResult .= $lanq->id.', ';
234 $updateCount++;
235 }
236 }
237 }else{
238 $errorMsg.="ID is blank, ";
239 }
240 }
241 $successMsg .= "Data Uploaded ($addCount): $addResult. Data update($updateCount): $updateResult.";
242 }
243
244 if ($_POST["uploadFileType"] == "addressdata")
245 {
246 $success="";$message="";$successcnt=0;$duplicatecount=0;
247 $inputFileType = "Excel5";
248
249 $objReader = PHPExcel_IOFactory::createReader($inputFileType);
250 $objPHPExcel = $objReader->load($_FILES['file']['tmp_name']);
251 $objWorksheet = $objPHPExcel->getActiveSheet();
252 $highestColumn = PHPExcel_Cell::columnIndexFromString($objPHPExcel->getActiveSheet()->getHighestColumn());
253 $highestrow=$objPHPExcel->getActiveSheet()->getHighestRow();
254 $excelarray=array();$keys=array();
255
256 for($i=1;$i<=$highestrow;$i++)
257 {
258 $excelarray[$i]=array();
259 for($head = 0; $head < $highestColumn; $head++)
260 {
261 if($i==1)
262 {
263 $keys[$head]=trim($objWorksheet->getCellByColumnAndRow($head,$i)->getValue());
264 }else{
265 $excelarray[$i][$keys[$head]]=trim($objWorksheet->getCellByColumnAndRow($head, $i)->getValue());
266 }
267 }
268 }
269
270 $addCount = 0;$updateCount = 0;
271 for($i=3;$i<=$highestrow;$i++)
272 {
273 if($excelarray[$i]["id"]!="")
274 {
275 if($excelarray[$i]["id"]=="Create")
276 {
277 $queryResult = $wakka->Query("insert into","","address",array(
278 'lan'=>$excelarray[$i]['lan'],
279 'address_type'=>$excelarray[$i]['addresstype'],
280 'contact_person'=>$excelarray[$i]['contactperson'],
281 'address_1'=>$excelarray[$i]['address1'],
282 'address_2'=>$excelarray[$i]['address2'],
283 'address_3'=>$excelarray[$i]['address3'],
284 'address_4'=>$excelarray[$i]['address4'],
285 'area'=>$excelarray[$i]['area'],
286 'landmark'=>$excelarray[$i]['landmark'],
287 'city'=>$excelarray[$i]['city'],
288 'zip'=>$excelarray[$i]['zip'],
289 'state'=>$excelarray[$i]['state'],
290 'mobile'=>$excelarray[$i]['mobileno'],
291 'email'=>$excelarray[$i]['mailid']
292 ));
293 $addResult .= $queryResult.', ';
294 $addCount++;
295 }else{
296 $lanq = DB::table('trails')->select('id')->where('id', '=', $excelarray[$i]["id"])->first();
297 if($lanq && $lanq->id != ""){
298 DB::table('address')->where('id',$lanq->id)->update([
299 'lan'=>$excelarray[$i]['lan'],
300 'address_type'=>$excelarray[$i]['addresstype'],
301 'contact_person'=>$excelarray[$i]['contactperson'],
302 'address_1'=>$excelarray[$i]['address1'],
303 'address_2'=>$excelarray[$i]['address2'],
304 'address_3'=>$excelarray[$i]['address3'],
305 'address_4'=>$excelarray[$i]['address4'],
306 'area'=>$excelarray[$i]['area'],
307 'landmark'=>$excelarray[$i]['landmark'],
308 'city'=>$excelarray[$i]['city'],
309 'zip'=>$excelarray[$i]['zip'],
310 'state'=>$excelarray[$i]['state'],
311 'mobile'=>$excelarray[$i]['mobileno'],
312 'email'=>$excelarray[$i]['mailid']
313 ]);
314 $updateResult .= $lanq->id.', ';
315 $updateCount++;
316 }
317 }
318 }else{
319 $errorMsg.="ID is blank, ";
320 }
321 }
322 $successMsg .= "Data Uploaded ($addCount): $addResult. Data update($updateCount): $updateResult.";
323 }
324
325 }else{
326 $errorMsg .= "File size too large, Please check file size should be less then ".($fileUploadLimit / (1024*1024))."mb.";
327 }
328 }else{
329 $errorMsg .= "File format not valid, Please attach Excel file (.xls) and try upload again.";
330 }
331 @unlink($_FILES['file']);
332 }else{
333 $errorMsg .= "File not found, Please attach file and try upload again.";
334 }
335
336 if(isset($successMsg) && $successMsg!=""){
337 if($successcnt!=0)echo "Success! ".$successMsg;
338 }
339 if(isset($errorMsg) && $errorMsg!="")echo "Error! ".$errorMsg;
340 }else{
341 ?>
342
343 <div class="layout-app">
344 <div class="row">
345 <div class="col-sm-12">
346 <div class="col-separator col-separator-first box col-unscrollable">
347 <div class="tab_generic" style="padding: 10px;">
348 <h4>Customers Data Upload</h4>
349
350 <hr style="margin-bottom: 10px;" />
351
352 <p><span style="color:#f00;"><strong>Instruction</strong></span><br/>
353 (Works only if you have 'Write access" to the records)<br/>
354 Please create an Excel-2003 format file with header as field-keys and rows containing record data.<br/>
355 Extream Care is should be taken during bulk upload as previous values will be overwritten and lost.</p>
356
357 <div class="row">
358 <div class="col-sm-4" style="border-right: 1px #eee solid;">
359 <h5>Customer Info</h5>
360 <div style="padding: 10px;">
361 <p>Upload File</p>
362 <form method="POST" enctype="multipart/form-data" target="resultArea" action="data?action=upload">
363 <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>" />
364 <input type="hidden" name="uploadFileType" value="customerInfo"/>
365 <p><input type="file" class="form-control" name="file"/></p>
366 <button type="submit" class="btn btn-success pull-right"><i class="fa fa-upload"></i> Upload</button>
367 </form>
368 </div>
369 </div>
370
371 <div class="col-sm-4" style="border-right: 1px #eee solid;">
372 <h5>Followup Trails</h5>
373 <div style="padding: 10px;">
374 <p>Upload File</p>
375 <form method="POST" enctype="multipart/form-data" target="resultArea" action="data?action=upload">
376 <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>" />
377 <input type="hidden" name="uploadFileType" value="trails"/>
378 <p><input type="file" class="form-control" name="file"/></p>
379 <button type="submit" class="btn btn-success pull-right"><i class="fa fa-upload"></i> Upload</button>
380 </form>
381 </div>
382 </div>
383
384 <div class="col-sm-4">
385 <h5>Contact Details</h5>
386 <div style="padding: 10px;">
387 <p>Upload File</p>
388 <form method="POST" enctype="multipart/form-data" target="resultArea" action="data?action=upload">
389 <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>" />
390 <input type="hidden" name="uploadFileType" value="addressdata"/>
391 <p><input type="file" class="form-control" name="file"/></p>
392 <button type="submit" class="btn btn-success pull-right"><i class="fa fa-upload"></i> Upload</button>
393 </form>
394
395 </div>
396 </div>
397 </div>
398
399 <div class="row" style="margin-top: 20px;">
400 <div class="col-sm-12">
401 <iframe name=resultArea id="resultArea" style="width: 100%;border:none;"></iframe>
402 </div>
403 </div>
404
405 </div>
406 </div>
407 </div>
408 </div>
409 </div>
410
411 <?php
412 }
413 ?>
...\ No newline at end of file ...\ No newline at end of file
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 // phpinfo();
3
4 $kformlib=new \App\Jobs\KFormLib($wakka->HRCoreVars["HRFiledsStr"]);
5
6 //error_reporting(E_ALL);
7 ini_set("memory_limit", -1);
8
9 include_once(app_path().'/lib/phpexcel/PHPExcel.php');
10 include_once(app_path().'/lib/PHP_XLSXWriter-master/xlsxwriter.class.php');
11
12
13 $wakka->setUserTimezone();
14 $themehome=$wakka->GetThemePath('/');
15 $sindex[0]='salbasic';
16 $sindex[1]='salhouserent';
17 $sindex[2]='saltransport';
18 $sindex[3]='salfood';
19 $sindex[4]='saltelephone';
20 $sindex[5]='salmedical';
21 $sindex[6]='salelectricity';
22 $sindex[7]='salother';
23 $sindex[8]='saltotal';
24 $sindex[9]='nettotal';$kformlib->HRFieldNames['nettotal']="Net Salary";
25
26 if(Input::has("reportsubmit"))
27 {
28 if(Input::has("savedreportget"))
29 {
30 $filterstr="";$fieldsarr="";
31 $rpt=Input::get("savedreportget");
32
33 $userreports=$wakka->GetBBBUserData("UserSavedReports");
34 if(isset($userreports[$rpt]))
35 {
36 $tarr=json_decode(base64_decode($userreports[$rpt]),true);
37 unset($tarr["_token"]);
38 Input::merge($tarr);
39 }
40 }
41
42 $empid=Input::get("empid");
43 $client=Input::get("client");
44 $currentstatus=Input::get("currentstatus");
45 $modfrom=explode(".",Input::get("modfrom"));
46 $modto=explode(".",Input::get("modto"));
47 $crefrom=explode(".",Input::get("crefrom"));
48 $creto=explode(".",Input::get("creto"));
49 $reporttmpl=Input::get("reporttmpl");
50 $visacompany=Input::get("visacompany");
51
52 $asalmonth=Input::get("asalmonth");
53 $asalyear=Input::get("asalyear");
54
55 $frcrefrom=explode(".",Input::get("frcrefrom"));
56 $frcreto=explode(".",Input::get("frcreto"));
57 $fieldbyrange=trim(Input::get("fieldbyrange"));
58 $filterbyfielddates=0;
59 if($fieldbyrange!=""&&sizeof($frcrefrom)==3&&sizeof($frcreto)==3)
60 {
61 $filterbyfielddates=1;
62 $frcrefrom=mktime(0, 0, 0, $frcrefrom[1], $frcrefrom[0], $frcrefrom[2]);
63 $frcreto=mktime(23, 59, 59, $frcreto[1], $frcreto[0], $frcreto[2]);
64 }
65
66 $ddprts=array();
67 $datesdiffstr=Input::get("datesdiffstr");
68 if(!empty($datesdiffstr))
69 {
70 $ddprts=explode(",",$datesdiffstr);//datesdiffstr=servicestoppeddate,joiningdate,LT,180 ==> if(servicestopdate-joiningdate < 180) then ok,else not ok
71 }
72
73
74 // $finputarr=Input::get("fieldsarr");
75 $finputarr=$_POST["fieldsarr"];
76 $selectedfields=$_POST["selectedfields"];
77
78
79 if(is_array($finputarr)){foreach($finputarr as $eachfield)
80 $fieldsarr[]=$eachfield;
81 array_unshift($finputarr,'id');
82 array_unshift($selectedfields,'EmpID');
83 }
84 else {echo "Please Select List of fields In report.";return;}
85
86 $reporttype=Input::get("reporttype");
87 $outputtype=Input::get("outputtype","XLS");
88
89 if(sizeof($fieldsarr)==0){echo "Please Select List of fields In report.";return;}
90 if($client==""&&$currentstatus==""&&$visacompany==''&&$modfrom[0]==''&&$crefrom[0]==''&&$empid==''&&$fieldbyrange==''){echo $client."Please Select atleast one of Client or Status or ModifyFrom or CreatedFrom.";return;}
91
92 if($reporttype=='Binary')$reporttype='|b';
93 if($reporttype=='History')$reporttype='|h';
94 if($reporttype=='Values')$reporttype='';
95
96
97 $filterstr=array();
98
99 if($empid!="")
100 {
101 $idarr=explode(',',$empid);
102 foreach($idarr as $tid)if(trim($tid)!='')$tarr[]="'$tid'";
103 $empid=implode(",",$tarr);
104
105 $filterstr[]=" id in ($empid) ";
106 }
107 else
108 {
109 if($client!=""){$filterstr[]=getQueryFromList('client',$client);}
110 if($currentstatus!=""){$filterstr[]=getQueryFromList('currentstatus',$currentstatus);}
111 // if($visacompany!=""){$filterstr[]=getQueryFromList('visacompany',$visacompany);}
112
113 if($modfrom[0]!="")$filterstr[]=" modified>='$modfrom[2]-$modfrom[1]-$modfrom[0] 00:00:00' ";
114 if($modto[0]!="") $filterstr[]=" modified<='$modto[2]-$modto[1]-$modto[0] 23:59:59' ";
115 if($crefrom[0]!="")$filterstr[]=" created>='$crefrom[2]-$crefrom[1]-$crefrom[0] 00:00:00' ";
116 if($creto[0]!="") $filterstr[]=" created<='$creto[2]-$creto[1]-$creto[0] 23:59:59' ";
117
118 if($filterbyfielddates==1)
119 {
120 $filterstr[]=" modified>='".date('Y-m-d 00:00:00',$frcrefrom)."' ";
121 }
122 }
123 $type = PHPExcel_Cell_DataType::TYPE_STRING;
124
125 if(!empty($filterstr))$filterstr=implode(" and ",$filterstr);else $filterstr="";
126
127 if($filterstr=="")$filterstr="1";
128
129 $savereportname=Input::get("savereportname");
130
131 if($savereportname!="")
132 {
133 $userreports=$wakka->GetBBBUserData("UserSavedReports");
134 $userreports[$savereportname]=base64_encode(json_encode(Input::all()));
135 $wakka->SetBBBUserData("UserSavedReports",$userreports);
136 }
137
138 $usersarr=$wakka->getPersonsdownloadreport($filterstr);
139
140 foreach($usersarr as $r => $userdata)
141 {
142 $ppldata[]=unserialize($userdata['peopledata']);
143 }
144
145 if (is_array($ppldata)){
146
147 for ($i=0; $i <count($ppldata) ; $i++) {
148
149 for ($j=0; $j <count($finputarr) ; $j++) {
150
151 if ($ppldata[$i] != false){
152
153 if (array_key_exists ($finputarr[$j], $ppldata[$i])) {
154 $usersdata[$i][$finputarr[$j]]=$ppldata[$i][$finputarr[$j]];
155
156 }else if (! array_key_exists ($finputarr[$j], $ppldata[$i]))
157 {
158 $usersdata[$i][$finputarr[$j]] = "";
159 }
160 }
161 }
162
163 }
164 }
165
166 $headerexcel = [];
167 foreach($finputarr as $cachekey)
168 {
169 if($cachekey!='')
170 {
171 $headerexcel['id'] = 'string';
172 $headerexcel[$cachekey] = 'string'; //$headerexcel2[] = $cachekey => 'string';
173 }
174 }
175
176 if ($savereportname) {
177 $filename = $savereportname.".xlsx";
178 } else {
179 $filename = "MainReport.xlsx";
180 }
181 header('Content-disposition: attachment; filename="'.XLSXWriter::sanitize_filename($filename).'"');
182 header("Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
183 header('Content-Transfer-Encoding: binary');
184 header('Cache-Control: must-revalidate');
185 header('Pragma: public');
186
187 $writer = new XLSXWriter();
188 $styles1 = array( 'font'=>'Arial','font-size'=>10,'font-style'=>'bold', 'fill'=>'#eee', 'halign'=>'center', 'border'=>'left,right,top,bottom');
189 $writer->writeSheetHeader('Sheet1', $headerexcel,$styles1,['freeze_rows'=>1, 'freeze_columns'=>1]);
190 $writer->writeSheetRow('Sheet1', $selectedfields,$styles1 );
191
192 if($usersdata){
193
194 foreach($usersdata as $row)
195 {
196 $writer->writeSheetRow('Sheet1', $row, $row_options = ['height'=>15]);
197 }
198 }
199 $writer->writeToStdOut();
200
201 return;
202
203
204 }
205 function getQueryFromList($key,$list)
206 {
207 $rstatusstr=array();$rstatuses=explode(",",$list);
208 foreach($rstatuses as $rstatus)
209 {
210 if($rstatus!='')$rstatusstr[]="'$rstatus'";
211 }
212 return " ($key in (".implode(",",$rstatusstr).")) ";
213 }
214 ?>
215 <style>
216 .tab_bar_purple{
217 border: 1px solid #EFEFEF;
218 height: 39px;
219 margin: 0 0 10px;
220 overflow: hidden;
221 position: relative;
222 }
223 .tab_bar_purple ul{
224 list-style: none outside none;
225 margin: 0;
226 padding: 0;
227 background: none repeat scroll 0 0 #ac92ed;
228 }
229 .tab_bar_purple ul li{
230 border: medium none;
231 height: 39px;
232 padding: 0;
233 display: block;
234 float: left;
235 }
236 .tab_bar_purple ul li a{
237 background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
238 height: 39px;
239 line-height: 39px;
240 display: block;
241 padding: 0 15px;
242 text-decoration: none;
243 color:#fff;
244 }
245 .tab_bar_purple .tabsbar-2{
246 /*height: 39px;*/
247 }
248 .tab_bar_purple ul li.active{
249 background: none repeat scroll 0 0 #fff;
250 }
251 .tab_bar_purple ul li.active a{
252 color:#967bdc;
253 }
254 .form_new{
255 margin:0px;
256 }
257 .table_hrm_heading_purple{
258 padding: 7px 9px;
259 text-align: center;
260 background-color: #D5C5FF;
261 border: 5px solid #fff;
262 font-weight: 600;
263 }
264 .table_hrm_heading_purple:first-child{
265 border-left: 0px;
266 }
267 .table_hrm_cells{
268 padding: 5px 7px;
269 color:#434a54;
270 }
271 .table_hrm_cells a{
272 color:#434a54;
273 }
274 .table_hrm_celltext{
275 border: 1px solid #ccd0d9;
276 border-color: #ccd0d9 !important;
277 border-radius: 3px !important;
278 padding: 3px 7px;
279 text-align: center;
280 }
281 .hasDatepicker{
282 border: 1px solid #e2e2e4;
283 border-radius: 3px !important;
284 padding: 3px 10px;
285 margin: 0 10px;
286 width: 10%;
287 margin-left: 0px;
288 }
289 #saved_reprts{
290 margin-right: 3px;
291 border: 1px solid #ccd0d9;
292 padding: 1% 0 1% 3%;
293 margin-bottom: 30px;
294 border-radius: 10px;
295 }
296 #saved_reprts legend{
297 width:10%
298 }
299 .new-recruit_legend{
300 font-size: 14px;
301 height: auto;
302 margin: 0 0 1%;
303 padding: 10px;
304 line-height: 25px;
305 }
306 </style>
307
308 <div class="layout-app"><!-- row-app -->
309 <div class="row row-app">
310 <div class="col-md-12">
311 <div class="col-separator col-separator-first col-unscrollable box" style='overflow:hidden'>
312 <div class=innerAll>
313 <div class="relativeWrap" >
314 <div class="tab_generic">
315 <div class="tab_bar_purple tabsbar-2">
316 <ul class="row row-merge">
317 <li class=active><a href="#tabs-1" data-toggle="tab">Select Filters and Report format</a></li>
318 </ul>
319 </div>
320 <div class="tab-content">
321 <div id=tabs-1 class="tab-pane active">
322 <fieldset>
323 <legend class='task_legend'>Select Filters</legend>
324 <form method=post action='hr?action=MainReport' target=_BLANK name=reportform>
325 <input type=hidden name=_token value='<?php echo csrf_token(); ?>'>
326 <input type=hidden name=client id=client value=''>
327 <input type=hidden name=visacompany id=visacompany value=''>
328 <input type=hidden name=currentstatus id=currentstatus value=''>
329 <div id=reportformarrs></div>
330 <p>
331 <label class='label-small_new' style='width:15%'>Record Ids:</label>
332 <input class='form_new form_new_amend' id='empid' name='empid' type='text' value='' style='width:25%' />
333 <span class=field_desc id='fd'></span><span class=validate_success></span><span class=validate_error></span>
334 </p>
335 <p><label class='label-small_new' style='width:15%'></label><b>-- OR --</b></p>
336 <p>
337 <label class='label-small_new' style='width:15%'>Company: </label>
338 <select name=client2 id=client2 multiple='' data-rel=chosen class=select2multi style='width:40%'>
339 <?php
340 $clients=$wakka->clientsReadAccess();
341 sort($clients);
342 foreach($clients as $clientval){echo "<option value='$clientval'>$clientval</option>";}
343 ?>
344 </select>
345 </p>
346 <div class='clear:both'></div>
347 <!--<p>
348 <label class='label-small_new' style='width:15%'>Visa Company: </label>
349 <select name=visacompany2 id=visacompany2 multiple='' data-rel=chosen class=select2multi style='width:40%'>
350 <?php
351 $clients=explode("~",$kformlib->FormSelectVals['visacompany']);
352 foreach($clients as $clientval){echo "<option value='$clientval'>$clientval</option>";}
353 ?>
354 </select>
355 </p>-->
356
357 <?php
358 $toarr=array();
359 $optionsstr="";
360 $fileids=explode(",",$kformlib->HRFiledsStr);
361 foreach($fileids as $fileid)
362 {
363 if(trim($fileid)!='')
364 {
365 if(strstr($kformlib->HRFileFieldsStr,$fileid))$ftype='File';
366 else if(strstr($kformlib->HRDateFilds,$fileid))$ftype='Date';
367 else if(strstr($kformlib->HRDropFilds,$fileid))$ftype='Dropdown';
368 else $ftype='Text';
369 $toarr[$fileid]=$kformlib->HRFieldNames[$fileid];
370 }
371 }
372 //asort($toarr);
373 foreach($toarr as $key=>$opts)$optionsstr.="<option value='$key'>$opts</option>";
374 ?>
375
376 <p><label class='label-small_new' style='width:15%;'>Fields: </label>
377 <select size=9 id=fieldsarr2 multiple='multiple' style='width:40%' class=select2multi>
378 <?php echo $optionsstr; ?>
379 </select>
380 <span style='margin-left: 20px;line-height: 30px;'>(Hold ctrl to select multiple)</span>
381 </p>
382 <p><label class='label-small_new' style='width:15%'>Report Type</label>
383 <select class='form_hrm_select' id=outputtype name=outputtype><option value='XLSX'>XLSX</option><!-- <option value='CSV'>CSV</option></select> -->
384 </p>
385
386 <p>
387 <label class='label-small_new' style='width:15%'></label>
388 <input type=hidden name=reportsubmit value=reportsubmit>
389 <input class='form_new form_new_amend' style='width:355px' type=text name=savereportname id=savereportname placeholder='Name of the report to save'>
390 <input type=button class='btn btn-purple_outline' name=reportsubmit value="Generate Report" onclick="setRptSelection();return false;">
391 <span class=field_desc id='fd'></span><span class=validate_success></span><span class=validate_error></span>
392 </p>
393 </form>
394 </fieldset>
395
396
397 <!-- <fieldset id='saved_reprts'><legend class='new-recruit_legend'>Saved Reports</legend>
398 <?php
399 //$savedreports=$wakka->GetBBBUserData("UserSavedReports");
400 //if(is_array($savedreports))foreach($savedreports as $rname=>$rpts)
401 {
402 // echo "<p><label class='label-small_new' style='width:15%'>$rname</label><a href='".url("/hr/MainReport?reportsubmit=1&savedreportget=$rname")."' class='btn btn-purple' target=_BLANK>Download</a> <a href=# title='Delete this entry' onclick='deletesavedreport(\"$rname\");return false;' style='margin-left: 50px;'><i class='fa fa-times-circle' style='color:#967bdc'>Delete</i></a></p>";
403 }
404 ?>
405
406 </fieldset> -->
407 </div>
408 </div>
409
410 </div>
411 </div>
412 </div>
413 <!-- // Tabs END -->
414
415
416
417 </div>
418 </div>
419 </div>
420
421 </div>
422 </div><!-- // END row-app -->
423
424 <script>
425 $('#modfrom').datepicker({dateFormat: 'dd.mm.yy',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'});
426 $('#modto').datepicker({dateFormat: 'dd.mm.yy',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'});
427 $('#crefrom').datepicker({dateFormat: 'dd.mm.yy',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'});
428 $('#creto').datepicker({dateFormat: 'dd.mm.yy',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'});
429
430 $('#frcrefrom').datepicker({dateFormat: 'dd.mm.yy',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'});
431 $('#frcreto').datepicker({dateFormat: 'dd.mm.yy',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'});
432
433 function setRptSelection()
434 {
435 $("#client").val($("#client2").val());
436 // $("#visacompany").val($("#visacompany2").val());
437 $("#currentstatus").val($("#currentstatus2").val());
438
439 $("#reportformarrs").html("");
440 $("#fieldsarr2").select2("data").forEach(function(elem){$("#reportformarrs").append("<input type=hidden name=fieldsarr[] value='"+elem.id+"'>");});
441
442 $("#fieldsarr2").select2("data").forEach(function(elem){$("#reportformarrs").append("<input type=hidden name=selectedfields[] value='"+elem.text+"'>");});
443
444
445 document.reportform.submit();
446 }
447 // $("#client2").dropdownchecklist({icon:{}, width:300, maxDropHeight:300, emptyText:"Select.." });
448 // $("#visacompany2").dropdownchecklist({icon:{}, width:300, maxDropHeight:300, emptyText:"Select.." });
449 // $("#currentstatus2").dropdownchecklist({icon:{}, width:300, maxDropHeight:300, emptyText:"Select.." });
450
451 function deletesavedreport(rname)
452 {
453 doAjax('hr?action=DeleteSavedReport&rname='+rname,'','searchresults');
454 }
455 </script>
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
3 use App\Models\User;
4
5
6
7 $data = Auth::user()->data();
8 $meta = Auth::user()->meta();
9 if (!isset($data['personal'])) $data['personal'] = array();
10
11 ?>
12 <script>
13 function openwelcomewizard() {
14 $("#welcome_wizard_body").html("");
15 doAjax('social/<?php echo Auth::user()->id; ?>', 'show=wizard', 'welcome_wizard_body', 'ajax_wizard_show', 'singlefail', 'GET');
16 $("#welcome_wizard").modal('show');
17 }
18 $("#topuserdropmenu > li").hover(function() {
19 $(this).addClass('active');
20 },
21 function() {
22 $(this).removeClass('active');
23 });
24 </script>
25
26
27
28 <script>
29 var wel_usertype = '<?php echo Auth::user()->usertype; ?>';
30 var wel_accounttype = '<?php if (Auth::user()->usertype != '') echo Auth::user()->usertype;
31 else echo "learner"; ?>';
32 var wel_catagory = '<?php if (isset($data['personal']['interestcategories'])) echo $data['personal']['interestcategories']; ?>';
33 //var wel_subcatagory='';
34 var wel_fname = '<?php if (isset($data['personal']['fname'])) echo $data['personal']['fname']; ?>';
35 var wel_lname = '<?php if (isset($data['personal']['lname'])) echo $data['personal']['lname']; ?>';
36 var wel_gender = '<?php if (isset($data['personal']['gender'])) echo $data['personal']['gender']; ?>';
37 var wel_city = '<?php if (isset($data['personal']['location'])) echo $data['personal']['location']; ?>';
38 var wel_country = '<?php if (isset($data['personal']['country'])) echo $data['personal']['country']; ?>';
39
40 var wel_invites = '';
41 var wel_buycredits = '';
42 var wel_buysubscription = '';
43 var wel_themeselected = '';
44
45 $(document).ready(function() {
46 if (wel_usertype == '' || wel_catagory == '' || wel_fname == "" || wel_gender == "" || wel_city == "" || wel_country == "") {
47 //doAjax('social/<?php echo Auth::user()->id; ?>','show=wizard','welcome_wizard_body','ajax_wizard_show','singlefail','GET');
48 }
49 });
50
51 function hrmsSearch() {
52 createSearchRecordDiv("hrms_search_modald_body");
53 $("#hrms_search_modal").modal('show');
54 $("#maintextsearch_1_txt").focus();
55 }
56
57 function kDialerModel() {
58 updateDialerState();
59 $("#kDialer_modal").modal('show');
60 if ('<?php echo Auth::user()->sessiontype; ?>' == '1') {
61 $("#dialerQuickControlDiv").show();
62 kDialerConnected();
63 }
64 }
65
66 function welcomepayment() {
67 $("#welcome_wizard_body").html("");
68 doAjax('social/<?php echo Auth::user()->id; ?>', 'show=wizard&payment=1', 'welcome_wizard_body', 'ajax_wizard_show', 'singlefail', 'GET');
69 $("#welcome_wizard").modal('show');
70 }
71
72 function welcomeinvite() {
73 $("#welcome_wizard_body").html("");
74 doAjax('social/<?php echo Auth::user()->id; ?>', 'show=wizard&welcomeinvite=1', 'welcome_wizard_body', 'ajax_wizard_show', 'singlefail', 'GET', function() {
75 //setTimeout(function(){$("#inviteemailids").not('.kstych_init').addClass('kstych_init').select2({tags:[]});}, 1000);
76 });
77 $("#welcome_wizard").modal('show');
78 }
79
80 var currentsearchdivid = "";
81
82 function createSearchRecordDiv(divid) {
83 if (currentsearchdivid != "") $("#" + currentsearchdivid).html("");
84 currentsearchdivid = divid;
85
86 var searchRecordDivHTMLLI = "ID,FirstName,LastName,Client,Mobile,Email,Passport,IBAN,Status,ClientCode,InternalID,PersonalID".split(",");
87
88 searchRecordPreselectList = ["", "ID", "FirstName", "Mobile", "Email"];
89
90 var searchRecordDivHTML = "";
91 for (i = 1; i <= 4; i++) {
92 searchRecordDivHTML += "<div class=col-md-3>";
93 searchRecordDivHTML += "<div class='widget row widget-heading-simple widget-body-gray' >";
94 searchRecordDivHTML += "<div class='widget-body'><div class='input-group'>";
95 searchRecordDivHTML += "<div class='input-group-btn'>";
96 searchRecordDivHTML += "<div class='dropdown'>";
97 searchRecordDivHTML += "<button class='btn btn-default dropdown-toggle rounded-left' data-toggle='dropdown'><span id=maintextsearch_" + i + "_span>" + searchRecordPreselectList[i] + "</span> <span class='caret'></span></button>";
98 searchRecordDivHTML += "<ul class='dropdown-menu pull-left'>";
99
100 for (j = 0; j < searchRecordDivHTMLLI.length; j++) searchRecordDivHTML += "<li><a href='#' onclick='$(\"#maintextsearch_" + i + "_span\").html($(this).html());return false;'>" + searchRecordDivHTMLLI[j] + "</a></li>";
101
102 searchRecordDivHTML += "</ul>";
103 searchRecordDivHTML += "</div>";
104 searchRecordDivHTML += "</div>";
105 searchRecordDivHTML += "<input class='form-control' id='maintextsearch_" + i + "_txt' type='text' onkeyup='mainTextSearchStart();' />";
106 searchRecordDivHTML += "</div></div>";
107 searchRecordDivHTML += "</div>";
108 searchRecordDivHTML += "</div>";
109 }
110 searchRecordDivHTML += "<div style='clear:both'></div>";
111 searchRecordDivHTML += "<div id=searchresults></div>";
112
113 $("#" + divid).html(searchRecordDivHTML);
114
115 }
116 </script>
117
118 <div class="modal" id="welcome_wizard">
119 <div class="modal-dialog" style='width:95%;'>
120 <div class="modal-content">
121 <div class="modal-header">
122 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
123 <h4 class="modal-title">Welcome to <?php echo Config::get("app.name"); ?></h4>
124 </div>
125 <div class="modal-body" id=welcome_wizard_body></div>
126 </div>
127 </div>
128 </div>
129
130 <div class="modal" id="hrms_search_modal">
131 <div class="modal-dialog" style='width:95%;'>
132 <div class="modal-content">
133 <div class="modal-header">
134 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
135 <h4 class="modal-title"><?php echo Config::get("app.name"); ?> Search Record</h4>
136 </div>
137 <div class="modal-body" id=hrms_search_modald_body>
138
139 <!-- <input class='form-control' type="text" id=maintextsearch name="maintextsearch" value="Search..." onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;" size=20 /> -->
140
141 </div>
142
143 </div>
144 </div>
145 </div>
146
147 <div class="modal" id="kDialer_modal">
148 <div class="modal-dialog" style='width:95%;'>
149 <div class="modal-content">
150 <div class="modal-header">
151
152 <div id=dialerQuickControlDiv class='col-md-12' style='display:none;'>
153 <div class=col-md-6>
154
155 <div class="input-group" style='width:350px;float:left' id=dialerstate_div>
156 <div class="input-group-btn">
157 <div class="dropdown">
158 <button class="btn btn-info dropdown-toggle rounded-left" data-toggle="dropdown" style='width:135px'><span id=dialerstate_btn>Paused</span> <span class="caret"></span></button>
159 <ul class="dropdown-menu pull-left" id='dialer_mode'>
160
161
162 <li><a href="#" onclick='pauseDialerState("dialer","mDialerState","Progressive");savedialermode();return false;'><b>Progressive</b></a></li>
163
164 <?php if (Auth::user()->group == 'ManualAllowed' || Auth::user()->group == 'Digital' || Auth::user()->usertype == 'Admin') { ?>
165 <li id=dialerManualAllowLI><a href="#" onclick='pauseDialerState("dialer","mDialerState","Manual");savedialermode("Manual");return false;'><b>Manual</b></a></li>
166 <?php } ?>
167
168
169 <li style='background:#68cc9e'><a href="#" onclick='pauseDialerState("dialer","mDialerState","Ready","mDialerSubState","Predictive");savedialermode("Predictive");return false;'><b>Predictive</b></a></li>
170
171 <li><a href="#" onclick='pauseDialerState("dialer","pDialerState","Paused","pDialerSubState","Paused");savedialermode();return false;'><b>Pause</b></a></li>
172 <li style='background:#ccc'><a href="#" onclick='pauseDialerState("dialer","pDialerState","Paused","pDialerSubState","AgentBriefing");savedialermode();return false;'><b>AgentBriefing</b></a></li>
173 <li style='background:#ccc'><a href="#" onclick='pauseDialerState("dialer","pDialerState","Paused","pDialerSubState","TeamMeeting");savedialermode();return false;'><b>TeamMeeting</b></a></li>
174 <li style='background:#ccc'><a href="#" onclick='pauseDialerState("dialer","pDialerState","Paused","pDialerSubState","QualityFeedback");savedialermode();return false;'><b>QualityFeedback</b></a></li>
175 <li style='background:#ccc'><a href="#" onclick='pauseDialerState("dialer","pDialerState","Paused","pDialerSubState","LunchBreak");savedialermode();return false;'><b>LunchBreak</b></a></li>
176 <li style='background:#ccc'><a href="#" onclick='pauseDialerState("dialer","pDialerState","Paused","pDialerSubState","TeaBreak");savedialermode();return false;'><b>TeaBreak</b></a></li>
177 <li style='background:#ccc'><a href="#" onclick='pauseDialerState("dialer","pDialerState","Paused","pDialerSubState","UtilityBreak");savedialermode();return false;'><b>UtilityBreak</b></a></li>
178 <li style='background:#ccc'><a href="#" onclick='pauseDialerState("dialer","pDialerState","Paused","pDialerSubState","FloorAnnouncements");savedialermode();return false;'><b>FloorAnnouncements</b></a></li>
179 <li style='background:#ccc'><a href="#" onclick='pauseDialerState("dialer","pDialerState","Paused","pDialerSubState","DownTime");savedialermode();return false;'><b>DownTime</b></a></li>
180
181
182 </ul>
183 </div>
184 </div>
185
186 <input class="form-control" id="manualdialnumber_txt" style='width:200px' type="text" />
187 <span class="input-group-addon btn btn-default" id=manualdial_btn dialaction=dialnext onclick='updateDialerState("action",$(this).attr("dialaction"),$("#manualdialnumber_txt").val());'></span>
188 </div>
189
190
191 <div class=pull-right>
192 <a href='#' onclick='return false;' class='btn btn-default' id=dialertimes1>
193 <i class='fa fa-fw fa-clock-o'></i> <span id=spandialer_ts></span>
194 </a>
195 </div>
196
197
198
199 </div>
200 <div class=col-md-6>
201 <div class=pull-left>
202 <a href='#' onclick='return false;' class='btn btn-default' id=dialertimes2 style='display:none'>
203 <i class='fa fa-fw fa-phone'></i> <span id=spandialer_num onclick=''></span>
204 <!-- onclick='dialerDispNumberClick(); -->
205 </a>
206 </div>
207 <div class=pull-left>
208 <a href='#' onclick='dialerDispNumberClick();return false;' style='display:none' class='btn btn-default' id=dialertimes3>
209 <i class='fa fa-fw fa-phone'></i>
210 </a>
211 </div>
212
213 <div id=dialerToggleViewDiv style='float:right;margin-right:20px;'>
214
215 <button class="btn btn-circle btn-default"><i class="fa fa-phone"></i></button>
216 <i class="fa fa-long-arrow-left"></i>
217
218 <div class="dropdown dropdown-icons" id=connections_div_u>
219 <a data-toggle="dropdown" href="#" class="btn btn-stroke btn-primary btn-circle dropdown-toggle" onmouseout='$(this).blur()' id=conficon_u_a><i class="fa fa-chain-broken" id=conficon_u_i></i> </a>
220 <ul class="dropdown-menu">
221 <li data-toggle="tooltip" data-title="MuteSpeaker" data-placement="left" data-tcontainer="body"><a href="#"><i class="fa fa-volume-off"></i></a></li>
222 <li data-toggle="tooltip" data-title="MuteMic" data-placement="left" data-tcontainer="body"><a href="#"><i class="fa fa-microphone-slash"></i></a></li>
223 <li data-toggle="tooltip" data-title="Hangup" data-placement="left" data-tcontainer="body"><a href="#"><i class="fa fa-times-circle"></i></a></li>
224 <li data-toggle="tooltip" data-title="Hold" data-placement="left" data-tcontainer="body"><a href="#"><i class="fa fa-pause"></i></a></li>
225 </ul>
226 </div>
227
228 <div class="dropdown dropdown-icons" id=connections_div_c>
229 <a data-toggle="dropdown" href="#" class="btn btn-stroke btn-primary btn-circle dropdown-toggle" onmouseout='$(this).blur()' id=conficon_c0_a><i class="fa fa-chain-broken" id=conficon_c0_i></i> </a>
230 <ul class="dropdown-menu">
231 <li data-toggle="tooltip" data-title="MuteSpeaker" data-placement="left" data-tcontainer="body"><a href="#"><i class="fa fa-volume-off"></i></a></li>
232 <li data-toggle="tooltip" data-title="MuteMic" data-placement="left" data-tcontainer="body"><a href="#"><i class="fa fa-microphone-slash"></i></a></li>
233 <li data-toggle="tooltip" data-title="Hangup" data-placement="left" data-tcontainer="body"><a href="#"><i class="fa fa-times-circle"></i></a></li>
234 <li data-toggle="tooltip" data-title="Hold" data-placement="left" data-tcontainer="body"><a href="#"><i class="fa fa-pause"></i></a></li>
235 </ul>
236 </div>
237
238
239 <i class="fa fa-long-arrow-right"></i>
240 <div class="dropdown dropdown-icons">
241 <a data-toggle="dropdown" href="#" class="btn btn-stroke btn-default btn-circle dropdown-toggle" onmouseout='$(this).blur()' id=conficon_c_mn><i class="fa fa-user" id=conficon_c_mi></i> </a>
242 <ul class="dropdown-menu">
243 <li><a href="#" onclick='$("#topdialerconfcall").toggle();return false;'><i class="fa fa-plus"></i></a></li>
244 </ul>
245 </div>
246 <div id=topdialerconfcall style='display:none'>
247 <input type=text class='form-control' style='width: 130px;float: left;' size=10 id=topaddconfcalltxt><a href=# class='btn btn-default' onclick='dialertopaddconf();return false;'><i class='fa fa-phone'></i></a>
248 </div>
249 <script>
250 function dialertopaddconf() {
251 var confnumber = $("#topaddconfcalltxt").val();
252 if (confnumber == '' || confnumber.length < 2) {
253 simpleNotification('error', 'topRight', "Empty Number");
254 return;
255 }
256
257 if (!kcallHasConnection(kstychCall['callnumber']) || kstychCall['ts_Dispo'] > 1) {
258 simpleNotification('error', 'topRight', "No call to conference");
259 return;
260 }
261
262 var datastr = "kstychCall=" + JSON.stringify(kstychCall);
263 datastr += "&kstychDialer=" + JSON.stringify(kstychDialer);
264
265 kcallNewConnection(confnumber);
266 doAjax('dialer?action=addconfcall&confnumber=' + confnumber, datastr, '__fake__div__', 'ajax_confdial', 'singlefail', 'POST', function(retstr) {
267 if (retstr.responseText.indexOf('Error') < 0) {
268 kcallSetConnection(confnumber, 'callid', retstr.responseText);
269 kcallSetConnection(confnumber, 'ts_Call', getNowTS());
270
271 updateDialerState();
272 } else {
273 simpleNotification('error', 'topRight', retstr.responseText);
274 }
275 });
276
277 $("#topdialerconfcall").hide();
278
279 }
280 </script>
281 </div>
282 </div>
283 </div>
284 <div style='clear:both'></div>
285
286 </div>
287 <div class="modal-body" id=kDialer_modal_body>
288 <div id=dialerToggleViewMainDiv style=''>
289
290 <div id=dialerSearchDiv>
291
292
293 <div id=dialersearchbox></div>
294 <div id=dialersearchresults></div>
295
296 </div>
297
298
299
300 </div>
301 </div>
302 </div>
303 </div>
304 </div>
...\ 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
...@@ -9,4 +9,4 @@ StartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEnd ...@@ -9,4 +9,4 @@ StartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEnd
9 SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction 9 SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction
10 10
11 11
12 StartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEnd
...\ No newline at end of file ...\ No newline at end of file
12 StartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEndStartEnd
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
2 2
3 // autoload.php @generated by Composer 3 // autoload.php @generated by Composer
4 4
5 require_once __DIR__ . '/composer' . '/autoload_real.php'; 5 require_once __DIR__ . '/composer/autoload_real.php';
6 6
7 return ComposerAutoloaderInit2b5386527109f6741a386dde06f03c73::getLoader(); 7 return ComposerAutoloaderInit2b5386527109f6741a386dde06f03c73::getLoader();
......
...@@ -53,8 +53,9 @@ class ClassLoader ...@@ -53,8 +53,9 @@ class ClassLoader
53 53
54 private $useIncludePath = false; 54 private $useIncludePath = false;
55 private $classMap = array(); 55 private $classMap = array();
56
57 private $classMapAuthoritative = false; 56 private $classMapAuthoritative = false;
57 private $missingClasses = array();
58 private $apcuPrefix;
58 59
59 public function getPrefixes() 60 public function getPrefixes()
60 { 61 {
...@@ -272,6 +273,26 @@ class ClassLoader ...@@ -272,6 +273,26 @@ class ClassLoader
272 } 273 }
273 274
274 /** 275 /**
276 * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
277 *
278 * @param string|null $apcuPrefix
279 */
280 public function setApcuPrefix($apcuPrefix)
281 {
282 $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
283 }
284
285 /**
286 * The APCu prefix in use, or null if APCu caching is not enabled.
287 *
288 * @return string|null
289 */
290 public function getApcuPrefix()
291 {
292 return $this->apcuPrefix;
293 }
294
295 /**
275 * Registers this instance as an autoloader. 296 * Registers this instance as an autoloader.
276 * 297 *
277 * @param bool $prepend Whether to prepend the autoloader or not 298 * @param bool $prepend Whether to prepend the autoloader or not
...@@ -313,29 +334,34 @@ class ClassLoader ...@@ -313,29 +334,34 @@ class ClassLoader
313 */ 334 */
314 public function findFile($class) 335 public function findFile($class)
315 { 336 {
316 // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
317 if ('\\' == $class[0]) {
318 $class = substr($class, 1);
319 }
320
321 // class map lookup 337 // class map lookup
322 if (isset($this->classMap[$class])) { 338 if (isset($this->classMap[$class])) {
323 return $this->classMap[$class]; 339 return $this->classMap[$class];
324 } 340 }
325 if ($this->classMapAuthoritative) { 341 if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
326 return false; 342 return false;
327 } 343 }
344 if (null !== $this->apcuPrefix) {
345 $file = apcu_fetch($this->apcuPrefix.$class, $hit);
346 if ($hit) {
347 return $file;
348 }
349 }
328 350
329 $file = $this->findFileWithExtension($class, '.php'); 351 $file = $this->findFileWithExtension($class, '.php');
330 352
331 // Search for Hack files if we are running on HHVM 353 // Search for Hack files if we are running on HHVM
332 if ($file === null && defined('HHVM_VERSION')) { 354 if (false === $file && defined('HHVM_VERSION')) {
333 $file = $this->findFileWithExtension($class, '.hh'); 355 $file = $this->findFileWithExtension($class, '.hh');
334 } 356 }
335 357
336 if ($file === null) { 358 if (null !== $this->apcuPrefix) {
359 apcu_add($this->apcuPrefix.$class, $file);
360 }
361
362 if (false === $file) {
337 // Remember that this class does not exist. 363 // Remember that this class does not exist.
338 return $this->classMap[$class] = false; 364 $this->missingClasses[$class] = true;
339 } 365 }
340 366
341 return $file; 367 return $file;
...@@ -348,10 +374,14 @@ class ClassLoader ...@@ -348,10 +374,14 @@ class ClassLoader
348 374
349 $first = $class[0]; 375 $first = $class[0];
350 if (isset($this->prefixLengthsPsr4[$first])) { 376 if (isset($this->prefixLengthsPsr4[$first])) {
351 foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { 377 $subPath = $class;
352 if (0 === strpos($class, $prefix)) { 378 while (false !== $lastPos = strrpos($subPath, '\\')) {
353 foreach ($this->prefixDirsPsr4[$prefix] as $dir) { 379 $subPath = substr($subPath, 0, $lastPos);
354 if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { 380 $search = $subPath . '\\';
381 if (isset($this->prefixDirsPsr4[$search])) {
382 $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
383 foreach ($this->prefixDirsPsr4[$search] as $dir) {
384 if (file_exists($file = $dir . $pathEnd)) {
355 return $file; 385 return $file;
356 } 386 }
357 } 387 }
...@@ -399,6 +429,8 @@ class ClassLoader ...@@ -399,6 +429,8 @@ class ClassLoader
399 if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { 429 if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
400 return $file; 430 return $file;
401 } 431 }
432
433 return false;
402 } 434 }
403 } 435 }
404 436
......
1 1
2 Copyright (c) 2016 Nils Adermann, Jordi Boggiano 2 Copyright (c) Nils Adermann, Jordi Boggiano
3 3
4 Permission is hereby granted, free of charge, to any person obtaining a copy 4 Permission is hereby granted, free of charge, to any person obtaining a copy
5 of this software and associated documentation files (the "Software"), to deal 5 of this software and associated documentation files (the "Software"), to deal
......
...@@ -23,7 +23,7 @@ class ComposerAutoloaderInit2b5386527109f6741a386dde06f03c73 ...@@ -23,7 +23,7 @@ class ComposerAutoloaderInit2b5386527109f6741a386dde06f03c73
23 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); 23 self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24 spl_autoload_unregister(array('ComposerAutoloaderInit2b5386527109f6741a386dde06f03c73', 'loadClassLoader')); 24 spl_autoload_unregister(array('ComposerAutoloaderInit2b5386527109f6741a386dde06f03c73', 'loadClassLoader'));
25 25
26 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION'); 26 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27 if ($useStaticLoader) { 27 if ($useStaticLoader) {
28 require_once __DIR__ . '/autoload_static.php'; 28 require_once __DIR__ . '/autoload_static.php';
29 29
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!