commited
0 parents
Showing
1000 changed files
with
4899 additions
and
0 deletions
Too many changes to show.
To preserve performance only 1000 of 1000+ files are displayed.
.gitattributes
0 → 100755
.gitignore
0 → 100755
ARP.sh
0 → 100755
Version.txt
0 → 100644
| 1 | The difference between this server and other servers is KPAMIListen.php Please make sure updating this file. | ||
| 2 | |||
| 3 | Version No. 1.14v | ||
| 4 | Changes: agent time report updated, commented if condition. | ||
| 5 | Date: 03/09/2018 | ||
| 6 | |||
| 7 | Version No. 1.13v | ||
| 8 | Changes: hangup beep, footer.blade.php, dialer.js changed and hangup beep added to assets/sounds/ | ||
| 9 | Date: 11/08/2018 Only on Mumbai servers | ||
| 10 | |||
| 11 | Version No. 1.12v | ||
| 12 | Changes: followup for new disposition, DialerController.php and dialer.js is changed. | ||
| 13 | Date: 11/08/2018 | ||
| 14 | |||
| 15 | Version No. 1.11v | ||
| 16 | Changes: Master report download, Changes main.blade.php, Added two libraries lib, php, KHRMS.php, XLSX library. | ||
| 17 | Date: 08/08/2018 | ||
| 18 | |||
| 19 | Version No. 1.10v | ||
| 20 | Changes: Username for inbounddrop and Userbusy for SIP/GATEWAY , Changes KPAMIListen.php | ||
| 21 | Date: 02/08/2018 | ||
| 22 | |||
| 23 | Version No. 1.9v | ||
| 24 | Changes: Call log report supervisor, and Date range in call report. | ||
| 25 | Date: 30/07/2018 | ||
| 26 | |||
| 27 | Version No. 1.8v | ||
| 28 | Changes: HDFC Mogo, Changes 1.extension.conf, 2.DialerController.php, 3.mogo tune in moh location. | ||
| 29 | Date 20/07/2018 | ||
| 30 | |||
| 31 | Version No. 1.7V | ||
| 32 | Changes: Live report reload button issue, commented one line of code in Livereport.blade.php | ||
| 33 | Date: 19/07/2018 | ||
| 34 | |||
| 35 | Versio No. 1.6V | ||
| 36 | Changes: call forward, KPAMIListen, .env and extension.conf file updated | ||
| 37 | Date: 14/07/2018 | ||
| 38 | |||
| 39 | Version No. 1.5V | ||
| 40 | Changes: Birthday calls for progressive mode, DialerController.php is updated | ||
| 41 | Date: 13/07/2018 | ||
| 42 | |||
| 43 | Version No. 1.4V | ||
| 44 | Changes: To Blank diallines, DailyLogout.php is updated. | ||
| 45 | Date: 6/07/2018 | ||
| 46 | |||
| 47 | Version No. 1.3v | ||
| 48 | Changes: Bulkupload | ||
| 49 | Date: 5/07/2018 | ||
| 50 | |||
| 51 | Version NO. 1.2v | ||
| 52 | Changes: To remove multiple circles in dialer, dialer.js is updated. | ||
| 53 | Date: 4/07/2018 | ||
| 54 | |||
| 55 | Version No. 1.1v | ||
| 56 | Changes: To remove Inbound Portfolio issue, KPAMIListen updated. | ||
| 57 | Date: 18/06/2018 | ||
| 58 | |||
| 59 |
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | use App\Models\Notification; | ||
| 15 | use App\Jobs\KHRMSLib; | ||
| 16 | |||
| 17 | use Input; | ||
| 18 | |||
| 19 | use Illuminate\Database\Schema\Blueprint; | ||
| 20 | |||
| 21 | class bulkserverupload_data extends Command { | ||
| 22 | |||
| 23 | /** | ||
| 24 | * The console command name. | ||
| 25 | * | ||
| 26 | * @var string | ||
| 27 | */ | ||
| 28 | protected $signature = 'bulkserverupload_data'; | ||
| 29 | |||
| 30 | /** | ||
| 31 | * The console command description. | ||
| 32 | * | ||
| 33 | * @var string | ||
| 34 | */ | ||
| 35 | protected $description = 'bulkserverupload_data'; | ||
| 36 | |||
| 37 | /** | ||
| 38 | * Execute the console command. | ||
| 39 | * | ||
| 40 | * @return mixed | ||
| 41 | */ | ||
| 42 | public function handle() | ||
| 43 | { | ||
| 44 | |||
| 45 | //echo "\n".date('Y-m-d')."\n"; | ||
| 46 | |||
| 47 | echo "2"; | ||
| 48 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 49 | $server_ip=env('app_ip'); | ||
| 50 | $central_ip=env('central_ip'); | ||
| 51 | |||
| 52 | |||
| 53 | $wakka = new KHRMSLib(); | ||
| 54 | |||
| 55 | $kformlib=new \App\Jobs\KFormLib($wakka->HRCoreVars["HRFiledsStr"]); | ||
| 56 | $kformlib->gthis=$wakka; | ||
| 57 | |||
| 58 | $themehome=$wakka->GetThemePath('/'); | ||
| 59 | $updatetime=time(); | ||
| 60 | |||
| 61 | $clientlst=$wakka->GetBBBUserData("clientslist"); | ||
| 62 | |||
| 63 | $isadmin=$wakka->IsAdmin(); | ||
| 64 | $username=$wakka->GetUserName(); | ||
| 65 | $triggers=Input::get("triggers"); | ||
| 66 | $tmpstr=explode(",",$kformlib->HRFiledsStr); | ||
| 67 | |||
| 68 | $success="";$message="";$successcnt=0;$duplicatecount=0; | ||
| 69 | |||
| 70 | |||
| 71 | $conn = array( | ||
| 72 | 'driver' => 'mysql', | ||
| 73 | 'host' => $central_ip, | ||
| 74 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 75 | 'username' => env('DB_USERNAME', 'root'), | ||
| 76 | 'password' => env('DB_PASSWORD', 'yb9738z'), | ||
| 77 | 'charset' => 'utf8', | ||
| 78 | 'collation' => 'utf8_unicode_ci', | ||
| 79 | 'prefix' => '', | ||
| 80 | 'options' => array( | ||
| 81 | PDO::ATTR_TIMEOUT => 5, | ||
| 82 | ), | ||
| 83 | ); | ||
| 84 | Config::set("database.connections.conn", $conn); | ||
| 85 | |||
| 86 | DB::connection("conn")->getDatabaseName(); | ||
| 87 | |||
| 88 | $serverclist=DB::connection("conn")->select(DB::raw("select location from server_details where server_ip='$server_ip'")); | ||
| 89 | $location=$serverclist[0]->location; | ||
| 90 | |||
| 91 | |||
| 92 | $excelarray = DB::connection("conn")->select(DB::raw("select * from bz_record_upload_uat_150918 where SERVER_IP='$server_ip'")); | ||
| 93 | |||
| 94 | $conn=''; | ||
| 95 | |||
| 96 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 97 | |||
| 98 | foreach($excelarray as $key => $array){ | ||
| 99 | $excelarray[$key] = (array)$array; | ||
| 100 | } | ||
| 101 | |||
| 102 | $highestColumn = DB::connection("conn")->select(DB::raw("select count(*) as cnt from information_schema.columns where table_name='bz_record_upload_uat_150918'")); | ||
| 103 | $highestColumn = $highestColumn[0]->cnt; | ||
| 104 | |||
| 105 | $highestrow = count($excelarray); | ||
| 106 | |||
| 107 | $flag = 0; | ||
| 108 | $editflag=0; | ||
| 109 | |||
| 110 | for($i=0;$i<$highestrow;$i++) | ||
| 111 | { | ||
| 112 | if($excelarray[$i]["clientcode"]!="") | ||
| 113 | { | ||
| 114 | /*if($excelarray[$i]["id"]=="CREATE") | ||
| 115 | { | ||
| 116 | $excelarray[$i]["id"]=$wakka->Query("insert into","","records",array('created'=>date('Y-m-d H:i:s'))); | ||
| 117 | } | ||
| 118 | else*/ | ||
| 119 | $excelarray[$i]["clientcode"]=intval($excelarray[$i]["clientcode"]); | ||
| 120 | //$excelarray[$i]["client"]=$excelarray[$i]["rm_code"]; | ||
| 121 | if($wakka->getCount("records","clientcode='".$excelarray[$i]["clientcode"]."'")==1) | ||
| 122 | { | ||
| 123 | //$empdata=$wakka->getPerson($excelarray[$i]["id"]); | ||
| 124 | $empdata=$wakka->getPersonServer($excelarray[$i]["clientcode"]); | ||
| 125 | $ppldata=$empdata["peopledata"]; | ||
| 126 | $createdlog=$empdata['modifylog']; | ||
| 127 | $fdirty=$empdata['dirty']; | ||
| 128 | |||
| 129 | $createdlog[$updatetime]=$username."::"; | ||
| 130 | $createdlog["updated"]=$updatetime; | ||
| 131 | |||
| 132 | $newdata=$ppldata; | ||
| 133 | foreach($excelarray[$i] as $key => $value) | ||
| 134 | { | ||
| 135 | if($value!="") | ||
| 136 | { | ||
| 137 | if("A".$ppldata[$key]!="A".$value)//forcing string comparrision //MAGIC | ||
| 138 | { | ||
| 139 | $value=str_replace("'"," ",$value); | ||
| 140 | if(strstr($createdlog[$updatetime],$key)==FALSE)$createdlog[$updatetime].="$key|".str_replace(array("|",",")," ",$ppldata[$key])."|".str_replace(array("|",",")," ",$value).","; | ||
| 141 | |||
| 142 | $fdirty[$key]=1; | ||
| 143 | |||
| 144 | $newdata[$key]=$value; | ||
| 145 | } | ||
| 146 | } | ||
| 147 | } | ||
| 148 | |||
| 149 | /*Start - Changes need to be done*/ | ||
| 150 | |||
| 151 | if($excelarray[$i]["status"]==null) | ||
| 152 | { | ||
| 153 | $empdata['status'] = "rom"; | ||
| 154 | } | ||
| 155 | |||
| 156 | if($excelarray[$i]["dialer_status"]==null) | ||
| 157 | { | ||
| 158 | $empdata['dialer_status'] = "rom"; | ||
| 159 | } | ||
| 160 | |||
| 161 | if($excelarray[$i]["dialer_substatus"]==null) | ||
| 162 | { | ||
| 163 | $empdata['dialer_substatus'] = "rom"; | ||
| 164 | } | ||
| 165 | |||
| 166 | /*End - Changes need to be done*/ | ||
| 167 | |||
| 168 | $empdata["peopledata"]=$newdata; | ||
| 169 | $empdata['modifylog']=$createdlog; | ||
| 170 | $empdata['dirty']=$fdirty; | ||
| 171 | |||
| 172 | //$wakka->setPerson($excelarray[$i]["id"],$empdata); | ||
| 173 | $wakka->setPersonServer($excelarray[$i]["clientcode"],$empdata); | ||
| 174 | $excelarray[$i]['modified']=date('Y-m-d H:i:s'); | ||
| 175 | $successArr[] = $excelarray[$i]; | ||
| 176 | |||
| 177 | } | ||
| 178 | else | ||
| 179 | { | ||
| 180 | $excelarray[$i]["id"]=$wakka->Query("insert into","","records",array('created'=>date('Y-m-d H:i:s'))); | ||
| 181 | $empdata=$wakka->getPerson($excelarray[$i]["id"]); | ||
| 182 | $ppldata=$empdata["peopledata"]; | ||
| 183 | $createdlog=$empdata['modifylog']; | ||
| 184 | $fdirty=$empdata['dirty']; | ||
| 185 | |||
| 186 | |||
| 187 | $createdlog[$updatetime]=$username."::"; | ||
| 188 | $createdlog["updated"]=$updatetime; | ||
| 189 | |||
| 190 | $newdata=$ppldata; | ||
| 191 | foreach($excelarray[$i] as $key => $value) | ||
| 192 | { | ||
| 193 | if($value!="") | ||
| 194 | { | ||
| 195 | if("A".$ppldata[$key]!="A".$value)//forcing string comparrision //MAGIC | ||
| 196 | { | ||
| 197 | $value=str_replace("'"," ",$value); | ||
| 198 | if(strstr($createdlog[$updatetime],$key)==FALSE)$createdlog[$updatetime].="$key|".str_replace(array("|",",")," ",$ppldata[$key])."|".str_replace(array("|",",")," ",$value).","; | ||
| 199 | |||
| 200 | $fdirty[$key]=1; | ||
| 201 | |||
| 202 | $newdata[$key]=$value; | ||
| 203 | } | ||
| 204 | } | ||
| 205 | } | ||
| 206 | $empdata["peopledata"]=$newdata; | ||
| 207 | $empdata['modifylog']=$createdlog; | ||
| 208 | $empdata['dirty']=$fdirty; | ||
| 209 | |||
| 210 | //$wakka->setPerson($excelarray[$i]["id"],$empdata); | ||
| 211 | $wakka->setPerson($excelarray[$i]["id"],$empdata); | ||
| 212 | |||
| 213 | $reason = ""; | ||
| 214 | |||
| 215 | $reason .= "Record ID is not on local server,"; | ||
| 216 | |||
| 217 | $excelarray[$i]['server_ip'] =$server_ip; | ||
| 218 | $excelarray[$i]['location'] =$location; | ||
| 219 | |||
| 220 | if($excelarray[$i]["clientcode"]!="") | ||
| 221 | $excelarray[$i]['cust_id'] =$excelarray[$i]["clientcode"]; | ||
| 222 | $excelarray[$i]['record_id'] = $excelarray[$i]["id"]; | ||
| 223 | |||
| 224 | $excelarray[$i]['Reason'] = $reason; | ||
| 225 | |||
| 226 | $failureArr[] = $excelarray[$i]; | ||
| 227 | |||
| 228 | } | ||
| 229 | } | ||
| 230 | else | ||
| 231 | { | ||
| 232 | |||
| 233 | $reason = ""; | ||
| 234 | |||
| 235 | if($excelarray[$i]["id"]=="") | ||
| 236 | $reason .= "Column ID is blank,"; | ||
| 237 | |||
| 238 | $excelarray[$i]['server_ip'] =$server_ip; | ||
| 239 | $excelarray[$i]['location'] =$location; | ||
| 240 | |||
| 241 | if($excelarray[$i]["clientcode"]!="") | ||
| 242 | $excelarray[$i]['cust_id'] =$excelarray[$i]["clientcode"]; | ||
| 243 | |||
| 244 | $excelarray[$i]['Reason'] = $reason; | ||
| 245 | |||
| 246 | $failureArr[] = $excelarray[$i]; | ||
| 247 | |||
| 248 | } | ||
| 249 | |||
| 250 | } | ||
| 251 | /*if(!empty($successArr)){ | ||
| 252 | foreach($successArr as $succes) | ||
| 253 | { | ||
| 254 | $setSuccess=array(); | ||
| 255 | |||
| 256 | $setSuccess[] = "server_ip='$server_ip'"; | ||
| 257 | $setSuccess[] = "location='$location'"; | ||
| 258 | $setSuccess[] = "record_id='".$succes['id']."'"; | ||
| 259 | $setSuccess[] = "cust_id='".$succes['clientcode']."'"; | ||
| 260 | $setSuccess[] = "modified='".$succes['modified']."'"; | ||
| 261 | |||
| 262 | $setSuccess = implode(",",$setSuccess); | ||
| 263 | |||
| 264 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_success set $setSuccess")); | ||
| 265 | } | ||
| 266 | } | ||
| 267 | if(!empty($failureArr)){ | ||
| 268 | foreach($failureArr as $failur) | ||
| 269 | { | ||
| 270 | $setFailure=array(); | ||
| 271 | |||
| 272 | $setFailure[] = "server_ip='$server_ip'"; | ||
| 273 | $setFailure[] = "location='$location'"; | ||
| 274 | $setFailure[] = "cust_id='".$failur['clientcode']."'"; | ||
| 275 | $setFailure[] = "record_id='".$failur['record_id']."'"; | ||
| 276 | $setFailure[] = "reason='".$failur['Reason']."'"; | ||
| 277 | |||
| 278 | $setFailure = implode(",",$setFailure); | ||
| 279 | |||
| 280 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_failure set $setFailure")); | ||
| 281 | } | ||
| 282 | }*/ | ||
| 283 | |||
| 284 | DB::connection("conn")->disconnect(); | ||
| 285 | } | ||
| 286 | } |
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | use App\Models\Notification; | ||
| 15 | use App\Jobs\KHRMSLib; | ||
| 16 | |||
| 17 | use Input; | ||
| 18 | |||
| 19 | use Illuminate\Database\Schema\Blueprint; | ||
| 20 | |||
| 21 | class bulkServerUpload extends Command { | ||
| 22 | |||
| 23 | /** | ||
| 24 | * The console command name. | ||
| 25 | * | ||
| 26 | * @var string | ||
| 27 | */ | ||
| 28 | protected $signature = 'bulkServerUpload'; | ||
| 29 | |||
| 30 | /** | ||
| 31 | * The console command description. | ||
| 32 | * | ||
| 33 | * @var string | ||
| 34 | */ | ||
| 35 | protected $description = 'bulkServerUpload'; | ||
| 36 | |||
| 37 | /** | ||
| 38 | * Execute the console command. | ||
| 39 | * | ||
| 40 | * @return mixed | ||
| 41 | */ | ||
| 42 | public function handle() | ||
| 43 | { | ||
| 44 | |||
| 45 | //echo "\n".date('Y-m-d')."\n"; | ||
| 46 | |||
| 47 | echo "2"; | ||
| 48 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 49 | $server_ip=env('app_ip'); | ||
| 50 | $central_ip=env('central_ip'); | ||
| 51 | |||
| 52 | |||
| 53 | $wakka = new KHRMSLib(); | ||
| 54 | |||
| 55 | $kformlib=new \App\Jobs\KFormLib($wakka->HRCoreVars["HRFiledsStr"]); | ||
| 56 | $kformlib->gthis=$wakka; | ||
| 57 | |||
| 58 | $themehome=$wakka->GetThemePath('/'); | ||
| 59 | $updatetime=time(); | ||
| 60 | |||
| 61 | $clientlst=$wakka->GetBBBUserData("clientslist"); | ||
| 62 | |||
| 63 | $isadmin=$wakka->IsAdmin(); | ||
| 64 | $username=$wakka->GetUserName(); | ||
| 65 | $triggers=Input::get("triggers"); | ||
| 66 | $tmpstr=explode(",",$kformlib->HRFiledsStr); | ||
| 67 | |||
| 68 | $success="";$message="";$successcnt=0;$duplicatecount=0; | ||
| 69 | |||
| 70 | |||
| 71 | $conn = array( | ||
| 72 | 'driver' => 'mysql', | ||
| 73 | 'host' => $central_ip, | ||
| 74 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 75 | 'username' => env('DB_USERNAME', 'root'), | ||
| 76 | 'password' => env('DB_PASSWORD', 'yb9738z'), | ||
| 77 | 'charset' => 'utf8', | ||
| 78 | 'collation' => 'utf8_unicode_ci', | ||
| 79 | 'prefix' => '', | ||
| 80 | 'options' => array( | ||
| 81 | PDO::ATTR_TIMEOUT => 5, | ||
| 82 | ), | ||
| 83 | ); | ||
| 84 | Config::set("database.connections.conn", $conn); | ||
| 85 | |||
| 86 | DB::connection("conn")->getDatabaseName(); | ||
| 87 | |||
| 88 | $serverclist=DB::connection("conn")->select(DB::raw("select location from server_details where server_ip='$server_ip'")); | ||
| 89 | $location=$serverclist[0]->location; | ||
| 90 | |||
| 91 | |||
| 92 | $excelarray = DB::connection("conn")->select(DB::raw("select * from bz_record_upload_uat_09102018_1 where SERVER_IP='$server_ip'")); | ||
| 93 | |||
| 94 | $conn=''; | ||
| 95 | |||
| 96 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 97 | |||
| 98 | foreach($excelarray as $key => $array){ | ||
| 99 | $excelarray[$key] = (array)$array; | ||
| 100 | } | ||
| 101 | |||
| 102 | $highestColumn = DB::connection("conn")->select(DB::raw("select count(*) as cnt from information_schema.columns where table_name='bz_record_upload_uat_09102018_1'")); | ||
| 103 | $highestColumn = $highestColumn[0]->cnt; | ||
| 104 | |||
| 105 | $highestrow = count($excelarray); | ||
| 106 | |||
| 107 | $flag = 0; | ||
| 108 | $editflag=0; | ||
| 109 | |||
| 110 | for($i=0;$i<$highestrow;$i++) | ||
| 111 | { | ||
| 112 | if($excelarray[$i]["clientcode"]!="") | ||
| 113 | { | ||
| 114 | /*if($excelarray[$i]["id"]=="CREATE") | ||
| 115 | { | ||
| 116 | $excelarray[$i]["id"]=$wakka->Query("insert into","","records",array('created'=>date('Y-m-d H:i:s'))); | ||
| 117 | } | ||
| 118 | else*/ | ||
| 119 | $excelarray[$i]["clientcode"]=intval($excelarray[$i]["clientcode"]); | ||
| 120 | //$excelarray[$i]["client"]=$excelarray[$i]["rm_code"]; | ||
| 121 | if($wakka->getCount("records","clientcode='".$excelarray[$i]["clientcode"]."'")==1) | ||
| 122 | { | ||
| 123 | //$empdata=$wakka->getPerson($excelarray[$i]["id"]); | ||
| 124 | $empdata=$wakka->getPersonServer($excelarray[$i]["clientcode"]); | ||
| 125 | $excelarray[$i]["other_information"]='2018-10-09_1'; | ||
| 126 | $ppldata=$empdata["peopledata"]; | ||
| 127 | $createdlog=$empdata['modifylog']; | ||
| 128 | $fdirty=$empdata['dirty']; | ||
| 129 | |||
| 130 | $createdlog[$updatetime]=$username."::"; | ||
| 131 | $createdlog["updated"]=$updatetime; | ||
| 132 | |||
| 133 | $newdata=$ppldata; | ||
| 134 | foreach($excelarray[$i] as $key => $value) | ||
| 135 | { | ||
| 136 | if($value!="") | ||
| 137 | { | ||
| 138 | if("A".$ppldata[$key]!="A".$value)//forcing string comparrision //MAGIC | ||
| 139 | { | ||
| 140 | $value=str_replace("'"," ",$value); | ||
| 141 | if(strstr($createdlog[$updatetime],$key)==FALSE)$createdlog[$updatetime].="$key|".str_replace(array("|",",")," ",$ppldata[$key])."|".str_replace(array("|",",")," ",$value).","; | ||
| 142 | |||
| 143 | $fdirty[$key]=1; | ||
| 144 | |||
| 145 | $newdata[$key]=$value; | ||
| 146 | } | ||
| 147 | } | ||
| 148 | } | ||
| 149 | |||
| 150 | /*Start - Changes need to be done*/ | ||
| 151 | |||
| 152 | if($excelarray[$i]["status"]==null) | ||
| 153 | { | ||
| 154 | $empdata['status'] = "rom"; | ||
| 155 | } | ||
| 156 | |||
| 157 | if($excelarray[$i]["dialer_status"]==null) | ||
| 158 | { | ||
| 159 | $empdata['dialer_status'] = "rom"; | ||
| 160 | } | ||
| 161 | |||
| 162 | if($excelarray[$i]["dialer_substatus"]==null) | ||
| 163 | { | ||
| 164 | $empdata['dialer_substatus'] = "rom"; | ||
| 165 | } | ||
| 166 | |||
| 167 | /*End - Changes need to be done*/ | ||
| 168 | |||
| 169 | $empdata["peopledata"]=$newdata; | ||
| 170 | $empdata['modifylog']=$createdlog; | ||
| 171 | $empdata['dirty']=$fdirty; | ||
| 172 | |||
| 173 | //$wakka->setPerson($excelarray[$i]["id"],$empdata); | ||
| 174 | $wakka->setPersonServer($excelarray[$i]["clientcode"],$empdata); | ||
| 175 | $excelarray[$i]['modified']=date('Y-m-d H:i:s'); | ||
| 176 | $successArr[] = $excelarray[$i]; | ||
| 177 | |||
| 178 | } | ||
| 179 | else | ||
| 180 | { | ||
| 181 | $excelarray[$i]["id"]=$wakka->Query("insert into","","records",array('created'=>date('Y-m-d H:i:s'))); | ||
| 182 | $empdata=$wakka->getPerson($excelarray[$i]["id"]); | ||
| 183 | $ppldata=$empdata["peopledata"]; | ||
| 184 | $createdlog=$empdata['modifylog']; | ||
| 185 | $fdirty=$empdata['dirty']; | ||
| 186 | |||
| 187 | |||
| 188 | $createdlog[$updatetime]=$username."::"; | ||
| 189 | $createdlog["updated"]=$updatetime; | ||
| 190 | |||
| 191 | $newdata=$ppldata; | ||
| 192 | foreach($excelarray[$i] as $key => $value) | ||
| 193 | { | ||
| 194 | if($value!="") | ||
| 195 | { | ||
| 196 | if("A".$ppldata[$key]!="A".$value)//forcing string comparrision //MAGIC | ||
| 197 | { | ||
| 198 | $value=str_replace("'"," ",$value); | ||
| 199 | if(strstr($createdlog[$updatetime],$key)==FALSE)$createdlog[$updatetime].="$key|".str_replace(array("|",",")," ",$ppldata[$key])."|".str_replace(array("|",",")," ",$value).","; | ||
| 200 | |||
| 201 | $fdirty[$key]=1; | ||
| 202 | |||
| 203 | $newdata[$key]=$value; | ||
| 204 | } | ||
| 205 | } | ||
| 206 | } | ||
| 207 | $empdata["peopledata"]=$newdata; | ||
| 208 | $empdata['modifylog']=$createdlog; | ||
| 209 | $empdata['dirty']=$fdirty; | ||
| 210 | |||
| 211 | //$wakka->setPerson($excelarray[$i]["id"],$empdata); | ||
| 212 | $wakka->setPerson($excelarray[$i]["id"],$empdata); | ||
| 213 | |||
| 214 | $reason = ""; | ||
| 215 | |||
| 216 | $reason .= "Record ID is not on local server,"; | ||
| 217 | |||
| 218 | $excelarray[$i]['server_ip'] =$server_ip; | ||
| 219 | $excelarray[$i]['location'] =$location; | ||
| 220 | |||
| 221 | if($excelarray[$i]["clientcode"]!="") | ||
| 222 | $excelarray[$i]['cust_id'] =$excelarray[$i]["clientcode"]; | ||
| 223 | $excelarray[$i]['record_id'] = $excelarray[$i]["id"]; | ||
| 224 | |||
| 225 | $excelarray[$i]['Reason'] = $reason; | ||
| 226 | |||
| 227 | $failureArr[] = $excelarray[$i]; | ||
| 228 | |||
| 229 | } | ||
| 230 | } | ||
| 231 | else | ||
| 232 | { | ||
| 233 | |||
| 234 | $reason = ""; | ||
| 235 | |||
| 236 | if($excelarray[$i]["id"]=="") | ||
| 237 | $reason .= "Column ID is blank,"; | ||
| 238 | |||
| 239 | $excelarray[$i]['server_ip'] =$server_ip; | ||
| 240 | $excelarray[$i]['location'] =$location; | ||
| 241 | |||
| 242 | if($excelarray[$i]["clientcode"]!="") | ||
| 243 | $excelarray[$i]['cust_id'] =$excelarray[$i]["clientcode"]; | ||
| 244 | |||
| 245 | $excelarray[$i]['Reason'] = $reason; | ||
| 246 | |||
| 247 | $failureArr[] = $excelarray[$i]; | ||
| 248 | |||
| 249 | } | ||
| 250 | |||
| 251 | } | ||
| 252 | echo "\n"."Updated data partial upload end"."\n"; | ||
| 253 | /*if(!empty($successArr)){ | ||
| 254 | foreach($successArr as $succes) | ||
| 255 | { | ||
| 256 | $setSuccess=array(); | ||
| 257 | |||
| 258 | $setSuccess[] = "server_ip='$server_ip'"; | ||
| 259 | $setSuccess[] = "location='$location'"; | ||
| 260 | $setSuccess[] = "record_id='".$succes['id']."'"; | ||
| 261 | $setSuccess[] = "cust_id='".$succes['clientcode']."'"; | ||
| 262 | $setSuccess[] = "modified='".$succes['modified']."'"; | ||
| 263 | |||
| 264 | $setSuccess = implode(",",$setSuccess); | ||
| 265 | |||
| 266 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_09102018_1_success set $setSuccess")); | ||
| 267 | } | ||
| 268 | } | ||
| 269 | if(!empty($failureArr)){ | ||
| 270 | foreach($failureArr as $failur) | ||
| 271 | { | ||
| 272 | $setFailure=array(); | ||
| 273 | |||
| 274 | $setFailure[] = "server_ip='$server_ip'"; | ||
| 275 | $setFailure[] = "location='$location'"; | ||
| 276 | $setFailure[] = "cust_id='".$failur['clientcode']."'"; | ||
| 277 | $setFailure[] = "record_id='".$failur['record_id']."'"; | ||
| 278 | $setFailure[] = "reason='".$failur['Reason']."'"; | ||
| 279 | |||
| 280 | $setFailure = implode(",",$setFailure); | ||
| 281 | |||
| 282 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_failure set $setFailure")); | ||
| 283 | } | ||
| 284 | }*/ | ||
| 285 | |||
| 286 | DB::connection("conn")->disconnect(); | ||
| 287 | } | ||
| 288 | } |
app/Console/Commands/BirthdayDate.php
0 → 100644
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | use App\Models\Notification; | ||
| 15 | use App\Jobs\KHRMSLib; | ||
| 16 | |||
| 17 | use Input; | ||
| 18 | use App\Models\Sipid; | ||
| 19 | use App\Models\Kqueue; | ||
| 20 | use App\Models\Dialline; | ||
| 21 | use App\Models\Session; | ||
| 22 | |||
| 23 | use Illuminate\Database\Schema\Blueprint; | ||
| 24 | |||
| 25 | class BirthdayDate extends Command { | ||
| 26 | |||
| 27 | /** | ||
| 28 | * The console command name. | ||
| 29 | * | ||
| 30 | * @var string | ||
| 31 | */ | ||
| 32 | protected $signature = 'BirthdayDate'; | ||
| 33 | |||
| 34 | /** | ||
| 35 | * The console command description. | ||
| 36 | * | ||
| 37 | * @var string | ||
| 38 | */ | ||
| 39 | protected $description = 'BirthdayDate'; | ||
| 40 | |||
| 41 | /** | ||
| 42 | * Execute the console command. | ||
| 43 | * | ||
| 44 | * @return mixed | ||
| 45 | */ | ||
| 46 | public function handle() | ||
| 47 | { | ||
| 48 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 49 | $birthday="%".date('-m-d')."%"; | ||
| 50 | $wakka = new KHRMSLib(); | ||
| 51 | |||
| 52 | $dobarray=DB::select(DB::raw("select peopledata from records where `DOB` like '$birthday'")); | ||
| 53 | |||
| 54 | foreach($dobarray as $dobarr) | ||
| 55 | { | ||
| 56 | $dobarray = unserialize($dobarr->peopledata); | ||
| 57 | $dobarray['priority']='11'; | ||
| 58 | $preppldata['peopledata'] = $dobarray; | ||
| 59 | $query=$wakka->setPerson($dobarray['id'],$preppldata); | ||
| 60 | } | ||
| 61 | } | ||
| 62 | } | ||
| 63 |
app/Console/Commands/Calllogupdate.php
0 → 100644
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | |||
| 15 | use Illuminate\Database\Schema\Blueprint; | ||
| 16 | |||
| 17 | class Calllogupdate extends Command { | ||
| 18 | |||
| 19 | /** | ||
| 20 | * The console command name. | ||
| 21 | * | ||
| 22 | * @var string | ||
| 23 | */ | ||
| 24 | protected $signature = 'Calllogupdate'; | ||
| 25 | |||
| 26 | /** | ||
| 27 | * The console command description. | ||
| 28 | * | ||
| 29 | * @var string | ||
| 30 | */ | ||
| 31 | protected $description = 'App Main Daily Task for CreportEight'; | ||
| 32 | |||
| 33 | /** | ||
| 34 | * Execute the console command. | ||
| 35 | * | ||
| 36 | * @return mixed | ||
| 37 | */ | ||
| 38 | public function handle() | ||
| 39 | { | ||
| 40 | $nowts=time(); | ||
| 41 | $date=date('F_Y'); | ||
| 42 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 43 | |||
| 44 | $logdate=strtotime('0 day'); | ||
| 45 | |||
| 46 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 47 | $central_ip=env('central_ip'); | ||
| 48 | $server_ip=env('app_ip'); | ||
| 49 | $calllog_report = "calllog_report_".$date; | ||
| 50 | $conn = array( | ||
| 51 | 'driver' => 'mysql', | ||
| 52 | 'host' => $central_ip, | ||
| 53 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 54 | 'username' => env('DB_USERNAME', 'root'), | ||
| 55 | 'password' => env('DB_PASSWORD', ''), | ||
| 56 | 'charset' => 'utf8', | ||
| 57 | 'collation' => 'utf8_unicode_ci', | ||
| 58 | 'prefix' => '', | ||
| 59 | 'options' => array( | ||
| 60 | PDO::ATTR_TIMEOUT => 5, | ||
| 61 | ), | ||
| 62 | ); | ||
| 63 | Config::set("database.connections.conn", $conn); | ||
| 64 | |||
| 65 | DB::connection("conn")->getDatabaseName(); | ||
| 66 | |||
| 67 | $serverclist=DB::connection("conn")->select(DB::raw("select id from server_details where server_ip='$server_ip'")); | ||
| 68 | $server_id=$serverclist[0]->id; | ||
| 69 | if($server_id<10){ | ||
| 70 | $server_id="0".$server_id; | ||
| 71 | } | ||
| 72 | |||
| 73 | |||
| 74 | |||
| 75 | |||
| 76 | $alistupdate=DB::select(DB::raw("SELECT * from crmcalls where call_flag='Z' and created_at <= '".date("Y-m-d H:i:s",$logdate-(05*60))."'")); | ||
| 77 | foreach ($alistupdate as $aline) { | ||
| 78 | $clientcode="";$currentstatus="";$legalstatus="";$record_id=""; | ||
| 79 | if($aline->crm_id>0) | ||
| 80 | { | ||
| 81 | $user=DB::select(DB::raw("select id,clientcode,currentstatus,legalstatus from records where id='".$aline->crm_id."' limit 1;")); | ||
| 82 | if(isset($user[0])) | ||
| 83 | { | ||
| 84 | $record_id=$user[0]->id; | ||
| 85 | $clientcode=$user[0]->clientcode; | ||
| 86 | $currentstatus=$user[0]->currentstatus; | ||
| 87 | $legalstatus=$user[0]->legalstatus; | ||
| 88 | } | ||
| 89 | } | ||
| 90 | $tpostdata=json_decode($aline->data,true); | ||
| 91 | $fulldate=date("Y-m-d H:i:s",strtotime($aline->created_at)+330*60); | ||
| 92 | $talktime=$aline->talkSec+$aline->recstartSec+$aline->recendSec; | ||
| 93 | $length=round(($aline->waitSec+$aline->callSec+$talktime+$aline->dispoSec)/1000,2); | ||
| 94 | |||
| 95 | if(!isset($userarr[$aline->user_id])&&$aline->user_id>0)$userarr[$aline->user_id]=User::find($aline->user_id); | ||
| 96 | $dispname="";if(isset($userarr[$aline->user_id]))$dispname=$userarr[$aline->user_id]->dispname(); | ||
| 97 | $username="";if(isset($userarr[$aline->user_id]))$username=$userarr[$aline->user_id]->username; | ||
| 98 | $globalid=$server_id.$record_id; | ||
| 99 | $server = $server_id; | ||
| 100 | $record_id = $record_id; | ||
| 101 | $crmcall_id = $aline->id; | ||
| 102 | $globalid = $globalid; | ||
| 103 | $created_at = $aline->created_at; | ||
| 104 | $start = $fulldate; | ||
| 105 | $length = $length; | ||
| 106 | $user = $username; | ||
| 107 | $name = $dispname; | ||
| 108 | $dispo = $aline->userstatus; | ||
| 109 | $subdispo = $aline->usersubstatus; | ||
| 110 | $callback = $aline->usercallback; | ||
| 111 | $number = $aline->number; | ||
| 112 | $clientcode = $clientcode; | ||
| 113 | $currentstatus = $currentstatus; | ||
| 114 | $legalstatus = $legalstatus; | ||
| 115 | $client = $aline->client; | ||
| 116 | $department = $aline->department; | ||
| 117 | $state = $aline->state; | ||
| 118 | $hsource = $aline->hsource; | ||
| 119 | $type = $aline->type; | ||
| 120 | $status = $aline->status; | ||
| 121 | $statuscode = $aline->statuscode; | ||
| 122 | $statusstr = $aline->substatus; | ||
| 123 | $dialline = $aline->dialline_id; | ||
| 124 | $did = $aline->did; | ||
| 125 | $waitsec = round($aline->waitSec/1000,2); | ||
| 126 | $callsec = round($aline->callSec/1000,2); | ||
| 127 | $talksec = round($talktime/1000,2); | ||
| 128 | $disposec = round($aline->dispoSec/1000,2); | ||
| 129 | $remarks = str_replace("'","",$aline->userremarks); | ||
| 130 | $userdata = $aline->userdata; | ||
| 131 | $attempt = $aline->attempt; | ||
| 132 | $priority = $aline->priority; | ||
| 133 | $question = $aline->question; | ||
| 134 | |||
| 135 | |||
| 136 | DB::connection("conn")->update(DB::raw("UPDATE $calllog_report set server='$server', record_id='$record_id', crmcall_id='$crmcall_id', globalid='$globalid', created_at='$created_at', start='$start', length='$length', user='$user', name='$name', dispo='$dispo', subdispo='$subdispo', callback='$callback', number='$number', clientcode='$clientcode', currentstatus='$currentstatus', legalstatus='$legalstatus', client='$client', department='$department', state='$state', hsource='$hsource', type='$type', status='$status', statuscode='$statuscode', statusstr='$statusstr', dialline='$dialline', did='$did', waitsec='$waitsec', callsec='$callsec', talksec='$talksec', disposec='$disposec', remarks='$remarks', userdata='$userdata', attempt='$attempt', priority='$priority', question='$question' where server= '$server_id' and crmcall_id= '$crmcall_id'")); | ||
| 137 | |||
| 138 | DB::update(DB::raw("UPDATE crmcalls set call_flag='C' where id=$crmcall_id")); | ||
| 139 | |||
| 140 | |||
| 141 | } | ||
| 142 | |||
| 143 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 144 | DB::connection("conn")->disconnect(); | ||
| 145 | } | ||
| 146 | |||
| 147 | } | ||
| 148 | |||
| 149 | |||
| 150 |
app/Console/Commands/ContactGroup.php
0 → 100644
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | |||
| 15 | use Illuminate\Database\Schema\Blueprint; | ||
| 16 | |||
| 17 | class ContactGroup extends Command { | ||
| 18 | |||
| 19 | /** | ||
| 20 | * The console command name. | ||
| 21 | * | ||
| 22 | * @var string | ||
| 23 | */ | ||
| 24 | protected $signature = 'ContactGroup'; | ||
| 25 | |||
| 26 | /** | ||
| 27 | * The console command description. | ||
| 28 | * | ||
| 29 | * @var string | ||
| 30 | */ | ||
| 31 | protected $description = 'App Main Daily Task for ContactGroup'; | ||
| 32 | |||
| 33 | /** | ||
| 34 | * Execute the console command. | ||
| 35 | * | ||
| 36 | * @return mixed | ||
| 37 | */ | ||
| 38 | public function handle() | ||
| 39 | { | ||
| 40 | $nowts=time(); | ||
| 41 | $date=date('F_Y'); | ||
| 42 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 43 | |||
| 44 | $logdate=strtotime('0 day'); | ||
| 45 | |||
| 46 | $central_ip=env('central_ip'); | ||
| 47 | $server_ip=env('app_ip'); | ||
| 48 | $calllog_report = "calllog_report_".$date; | ||
| 49 | $conn = array( | ||
| 50 | 'driver' => 'mysql', | ||
| 51 | 'host' => $central_ip, | ||
| 52 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 53 | 'username' => env('DB_USERNAME', 'root'), | ||
| 54 | 'password' => env('DB_PASSWORD', ''), | ||
| 55 | 'charset' => 'utf8', | ||
| 56 | 'collation' => 'utf8_unicode_ci', | ||
| 57 | 'prefix' => '', | ||
| 58 | 'options' => array( | ||
| 59 | PDO::ATTR_TIMEOUT => 5, | ||
| 60 | ), | ||
| 61 | ); | ||
| 62 | Config::set("database.connections.conn", $conn); | ||
| 63 | |||
| 64 | DB::connection("conn")->getDatabaseName(); | ||
| 65 | |||
| 66 | $serverclist=DB::connection("conn")->select(DB::raw("select id from server_details where server_ip='$server_ip'")); | ||
| 67 | $server_id=$serverclist[0]->id; | ||
| 68 | if($server_id<10){ | ||
| 69 | $server_id="0".$server_id; | ||
| 70 | } | ||
| 71 | |||
| 72 | |||
| 73 | $contact=DB::connection("conn")->select(DB::raw("SELECT * from contactserver where server_ip='$server_ip'")); | ||
| 74 | |||
| 75 | foreach ($contact as $cline) { | ||
| 76 | $name=$cline->name; | ||
| 77 | $slug=$cline->slug; | ||
| 78 | $priority=$cline->priority; | ||
| 79 | $contact_limit=$cline->contacted_limit; | ||
| 80 | $contact_count=$cline->contacted_count; | ||
| 81 | $status=$cline->status; | ||
| 82 | $created_at=date('Y-m-d H:i:s'); | ||
| 83 | $updated_at=date('Y-m-d H:i:s'); | ||
| 84 | |||
| 85 | DB::insert(DB::raw("INSERT INTO contact_group set `name`=$name,`slug`=$slug,`priority`=$priority,`contacted_limit`=$contact_limit,`contacted_count`=$contact_count,`status`=$status,`created_at`=$created_at,`updated_at`=$updated_at")); | ||
| 86 | } | ||
| 87 | |||
| 88 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 89 | DB::connection("conn")->disconnect(); | ||
| 90 | } | ||
| 91 | |||
| 92 | } | ||
| 93 | |||
| 94 | |||
| 95 |
app/Console/Commands/CreateCall.php
0 → 100755
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | use App\Models\Notification; | ||
| 15 | use App\Jobs\KHRMSLib; | ||
| 16 | use App\Http\Controllers\DialerController; | ||
| 17 | |||
| 18 | use Input; | ||
| 19 | use Log; | ||
| 20 | use App\Models\Sipid; | ||
| 21 | use App\Models\Kqueue; | ||
| 22 | use App\Models\Dialline; | ||
| 23 | use App\Models\Session; | ||
| 24 | use App\Models\Cutoff; | ||
| 25 | use App\Models\Contacts; | ||
| 26 | |||
| 27 | use Illuminate\Database\Schema\Blueprint; | ||
| 28 | |||
| 29 | class CreateCall extends Command { | ||
| 30 | |||
| 31 | /** | ||
| 32 | * The console command name. | ||
| 33 | * | ||
| 34 | * @var string | ||
| 35 | */ | ||
| 36 | protected $signature = 'CreateCall'; | ||
| 37 | |||
| 38 | /** | ||
| 39 | * The console command description. | ||
| 40 | * | ||
| 41 | * @var string | ||
| 42 | */ | ||
| 43 | protected $description = 'Create Pedictive Call If any User is Free'; | ||
| 44 | |||
| 45 | /** | ||
| 46 | * Execute the console command. | ||
| 47 | * | ||
| 48 | * @return mixed | ||
| 49 | */ | ||
| 50 | public function handle() | ||
| 51 | { | ||
| 52 | while(true) | ||
| 53 | { | ||
| 54 | usleep(2000000); | ||
| 55 | $this->runPredictive(); | ||
| 56 | } | ||
| 57 | } | ||
| 58 | |||
| 59 | public function runPredictive() | ||
| 60 | { | ||
| 61 | |||
| 62 | try { | ||
| 63 | $this->updatePrepareColumn(); | ||
| 64 | $usrArrs = $this->getActiveUsersCampaignWise("with"); | ||
| 65 | $cntAndStrArr = $this->getActualAvailChannelCount(); | ||
| 66 | |||
| 67 | $availChannel = $cntAndStrArr['cnt']; | ||
| 68 | $availDialStr = $cntAndStrArr['dialstr']; | ||
| 69 | |||
| 70 | if(count($usrArrs)){ | ||
| 71 | |||
| 72 | //Log::useFiles(storage_path()."/logs/predictive_".date("Y_m_d").".log"); | ||
| 73 | //Log::info($usrArrs); | ||
| 74 | |||
| 75 | //Log::useFiles(storage_path()."/logs/predictive_".date("Y_m_d").".log"); | ||
| 76 | //Log::info("Channel=".$availChannel); | ||
| 77 | |||
| 78 | foreach ($usrArrs as $client => $usrArr) { | ||
| 79 | //Log::useFiles(storage_path()."/logs/predictive_".date("Y_m_d").".log"); | ||
| 80 | //Log::info("campaign=".$client); | ||
| 81 | |||
| 82 | $acalls = $this->getCreateCallCount($client, count($usrArr)); | ||
| 83 | |||
| 84 | $acalls = min($acalls, $availChannel); | ||
| 85 | |||
| 86 | //Log::useFiles(storage_path()."/logs/predictive_".date("Y_m_d").".log"); | ||
| 87 | //Log::info("CallCount=".$acalls); | ||
| 88 | |||
| 89 | $this->CreateCall($client, $acalls, $availDialStr); | ||
| 90 | } | ||
| 91 | } | ||
| 92 | } catch (Exception $e) { | ||
| 93 | Log::useFiles(storage_path()."/logs/predictive_".date("Y_m_d").".log"); | ||
| 94 | Log::error($e); | ||
| 95 | } | ||
| 96 | } | ||
| 97 | |||
| 98 | public function updatePrepareColumn() | ||
| 99 | { | ||
| 100 | $allClientUsrIdArr = array(); | ||
| 101 | $updatedUserIdArr = array(); | ||
| 102 | $currentTime = strtotime(date("Y-m-d H:i:s")); | ||
| 103 | |||
| 104 | $clientWiseUserIdArr = $this->getActiveUsersCampaignWise("without"); | ||
| 105 | |||
| 106 | if(count($clientWiseUserIdArr)) { | ||
| 107 | //Log::useFiles(storage_path()."/logs/predictive_".date("Y_m_d").".log"); | ||
| 108 | //Log::info("updatePrepareColumn");Log::info($clientWiseUserIdArr); | ||
| 109 | |||
| 110 | foreach ($clientWiseUserIdArr as $client => $usrIdArr) { | ||
| 111 | $allClientUsrIdArr = array_merge($allClientUsrIdArr, $usrIdArr); | ||
| 112 | } | ||
| 113 | |||
| 114 | $usersTimeArr = Cutoff::whereIn('user_id', $allClientUsrIdArr)->get(); | ||
| 115 | |||
| 116 | foreach ($usersTimeArr as $userTimeArr) { | ||
| 117 | $cutOffTime = strtotime($userTimeArr->hangup_time) + ($userTimeArr->avg_dispo - $userTimeArr->avg_ring); | ||
| 118 | |||
| 119 | if($cutOffTime < $currentTime) | ||
| 120 | { | ||
| 121 | $updatedUserIdArr[] = $userTimeArr->user_id; | ||
| 122 | } | ||
| 123 | } | ||
| 124 | |||
| 125 | if(count($updatedUserIdArr)) { | ||
| 126 | //Log::useFiles(storage_path()."/logs/predictive_".date("Y_m_d").".log"); | ||
| 127 | //Log::info("updatedUserIdArr");Log::info($updatedUserIdArr); | ||
| 128 | } | ||
| 129 | |||
| 130 | DB::table('sipids')->whereIn('user', $updatedUserIdArr)->update(['prepare_call'=>1]); | ||
| 131 | } | ||
| 132 | } | ||
| 133 | |||
| 134 | public function getActiveUsersCampaignWise($checkPrepareCol) | ||
| 135 | { | ||
| 136 | $campaignWiseUsrs = array(); | ||
| 137 | $prepareUsrIds = array(); | ||
| 138 | |||
| 139 | $loggedInSips = Sipid::where('server','=',env('app_ip'))->where("user", "!=", 0)->where("status","=","1"); | ||
| 140 | if($checkPrepareCol=="with"){ | ||
| 141 | $loggedInSips = $loggedInSips->where("prepare_call","=","1"); | ||
| 142 | } | ||
| 143 | elseif($checkPrepareCol=="without"){ | ||
| 144 | $loggedInSips = $loggedInSips->where("patched","=","0"); | ||
| 145 | } | ||
| 146 | |||
| 147 | $loggedInSips = $loggedInSips->groupBy('user')->get(); | ||
| 148 | |||
| 149 | if(count($loggedInSips)){ | ||
| 150 | |||
| 151 | foreach ($loggedInSips as $loggedInSip) { | ||
| 152 | $prepareUsrIds[] = $loggedInSip->user; | ||
| 153 | } | ||
| 154 | |||
| 155 | //TODO: Change Dialmode Value in the column Of User Table (Ready to Predictive) | ||
| 156 | $usersLoggedIn = User::whereIn('id', $prepareUsrIds); | ||
| 157 | if($checkPrepareCol=="without")$usersLoggedIn = $usersLoggedIn->where('current_dialmode', '=', 'Predictive'); | ||
| 158 | $usersLoggedIn = $usersLoggedIn->select('id','sel_campaign')->get(); | ||
| 159 | |||
| 160 | foreach ($usersLoggedIn as $userLoggedIn) { | ||
| 161 | $campaignWiseUsrs[$userLoggedIn->sel_campaign][] = $userLoggedIn->id; | ||
| 162 | } | ||
| 163 | } | ||
| 164 | return $campaignWiseUsrs; | ||
| 165 | } | ||
| 166 | |||
| 167 | public function getActualAvailChannelCount() | ||
| 168 | { | ||
| 169 | $data = array(); | ||
| 170 | $cnt = 0; | ||
| 171 | $allChanlCnt = $this->getSpanCount(); | ||
| 172 | $dialstr = ""; | ||
| 173 | |||
| 174 | $diallineVal = Dialline::where('server','=', env('app_ip'))->where("status","=","Free")->where("dialstr","!=","")->where("enabled","=","1")->select('dialstr')->first(); | ||
| 175 | |||
| 176 | //TODO: When SIP and Dahdi both are active | ||
| 177 | if(count($diallineVal)){ | ||
| 178 | if(stristr($diallineVal->dialstr,"Dahdi")){ | ||
| 179 | $dialedCnt = $this->getActualDahdiDialedCallCount(); | ||
| 180 | |||
| 181 | $cnt = $allChanlCnt - $dialedCnt; | ||
| 182 | } | ||
| 183 | elseif(stristr($diallineVal->dialstr,"GATEWAY")){ | ||
| 184 | $dialedCnt = $this->getActualSipDialedCallCount(); | ||
| 185 | |||
| 186 | $cnt = $allChanlCnt - $dialedCnt; | ||
| 187 | } | ||
| 188 | |||
| 189 | $dialstr = $diallineVal->dialstr; | ||
| 190 | } | ||
| 191 | |||
| 192 | $data['cnt'] = $cnt; | ||
| 193 | $data['dialstr'] = $dialstr; | ||
| 194 | |||
| 195 | return $data; | ||
| 196 | } | ||
| 197 | |||
| 198 | public function getActualSipDialedCallCount() | ||
| 199 | { | ||
| 200 | $allChnnlArr = array(); | ||
| 201 | $dialstr = "Dial(SIP/GATEWAY/"; | ||
| 202 | $chnlCnt = 0; | ||
| 203 | |||
| 204 | exec("/usr/sbin/asterisk -rx 'core show channels'",$allChnnls); | ||
| 205 | |||
| 206 | foreach($allChnnls as $allChnnl){ | ||
| 207 | //$allChnnlArr[] = explode(" ", preg_replace('!\s+!', ' ', $allChnnl) ); | ||
| 208 | if(stristr($allChnnl, $dialstr)){ | ||
| 209 | $chnlCnt++; | ||
| 210 | } | ||
| 211 | } | ||
| 212 | |||
| 213 | return $chnlCnt; | ||
| 214 | } | ||
| 215 | |||
| 216 | public function getActualDahdiDialedCallCount() | ||
| 217 | { | ||
| 218 | $allChnnlArr = array(); | ||
| 219 | $dialstr = "- ACTIVE"; | ||
| 220 | $status = "RED"; | ||
| 221 | $chnlCnt = 0; | ||
| 222 | |||
| 223 | //exec("/usr/sbin/asterisk -rx 'service dahdi status'",$allChnnls); | ||
| 224 | exec("service dahdi status",$allChnnls); | ||
| 225 | |||
| 226 | foreach($allChnnls as $allChnnl){ | ||
| 227 | //$allChnnlArr[] = explode(" ", preg_replace('!\s+!', ' ', $allChnnl) ); | ||
| 228 | if(stristr($allChnnl, $status)){ | ||
| 229 | Break; | ||
| 230 | } | ||
| 231 | |||
| 232 | if(stristr($allChnnl, $dialstr)){ | ||
| 233 | $chnlCnt++; | ||
| 234 | } | ||
| 235 | } | ||
| 236 | |||
| 237 | return $chnlCnt; | ||
| 238 | } | ||
| 239 | |||
| 240 | //TODO: Generate Client File To Take All Parameteres Of Campaigns | ||
| 241 | public function getCreateCallCount($client, $usrCnt) | ||
| 242 | { | ||
| 243 | $wakka = new KHRMSLib(); | ||
| 244 | $mastersdata=$wakka->getCompanyMaster($client); | ||
| 245 | |||
| 246 | $ratio = $mastersdata["autodialercampaign"]; | ||
| 247 | $dialedCallCnt = $this->getDialedCallCount($client); | ||
| 248 | |||
| 249 | return ($usrCnt*$ratio) - $dialedCallCnt; | ||
| 250 | } | ||
| 251 | |||
| 252 | public function getDialedCallCount($client) | ||
| 253 | { | ||
| 254 | $cnt = Dialline::whereIn("status", ["Auto","AutoCall"])->where("conf","=","")->where("regexstr","=",$client)->count(); | ||
| 255 | |||
| 256 | return $cnt; | ||
| 257 | } | ||
| 258 | |||
| 259 | public function CreateCall($client, $acalls, $availDialStr) | ||
| 260 | { | ||
| 261 | if($acalls>0) | ||
| 262 | { | ||
| 263 | for($i=0;$i<$acalls;$i++) | ||
| 264 | { | ||
| 265 | $this->useChannelToDial($client, $availDialStr); | ||
| 266 | } | ||
| 267 | } | ||
| 268 | } | ||
| 269 | |||
| 270 | public function useChannelToDial($client, $availDialStr) | ||
| 271 | { | ||
| 272 | $dialline=Dialline::where('server','=', env('app_ip'))->where("status","=","Free")->where("enabled","=","1")->where("dialstr", "=", $availDialStr)->orderBy('updated_at','ASC')->first(); | ||
| 273 | |||
| 274 | //TODO::Need To Code Dspan Logic as per discussion | ||
| 275 | //if($dspan!="")$dialline=$dialline->where('dspan','=',$dspan)->where('id','<=','30'); | ||
| 276 | //$dialline=$dialline->orderBy('id','ASC')->first(); | ||
| 277 | |||
| 278 | if(!empty($dialline)) | ||
| 279 | { | ||
| 280 | $this->createCrmCall($client, $dialline); | ||
| 281 | } | ||
| 282 | |||
| 283 | return; | ||
| 284 | } | ||
| 285 | |||
| 286 | public function createCrmCall($client, $dialline) | ||
| 287 | { | ||
| 288 | //TODO: Need to check whether callerid is required or not (in case of GSM Gateway) | ||
| 289 | $callerid=""; | ||
| 290 | $wakka = new KHRMSLib(); | ||
| 291 | |||
| 292 | $gz = new DialerController(); | ||
| 293 | $users= $gz->getCallSequencing(1); | ||
| 294 | |||
| 295 | if(sizeof($users)>=1) | ||
| 296 | { | ||
| 297 | $record['peopledata']=unserialize($users[0]['peopledata']);; | ||
| 298 | if($record) | ||
| 299 | { | ||
| 300 | $record['peopledata']["status"]="AutoCall"; | ||
| 301 | |||
| 302 | $contact = new Contacts(); | ||
| 303 | $contact->updateContactDetails($record['peopledata']['id'], $client, $record); | ||
| 304 | } | ||
| 305 | |||
| 306 | $dialline->user_id=$user_id; | ||
| 307 | $dialline->status="AutoCall"; | ||
| 308 | $dialline->regexstr=$record['peopledata']['client']; | ||
| 309 | $dialline->number=$record['peopledata']['mobile']; | ||
| 310 | $dialline->save(); | ||
| 311 | |||
| 312 | $nowts=microtime(true)*1000; | ||
| 313 | |||
| 314 | //start the call log | ||
| 315 | $crmcall=new CRMCall(); | ||
| 316 | $crmcall->number=$record['peopledata']['mobile']; | ||
| 317 | $crmcall->user_id=0; | ||
| 318 | $crmcall->sipid_id=0; | ||
| 319 | $crmcall->crm_id=$record['peopledata']['id']; | ||
| 320 | $crmcall->client=$record['peopledata']['client']; | ||
| 321 | $crmcall->department=$record['peopledata']['department']; | ||
| 322 | $crmcall->state='New'; | ||
| 323 | $crmcall->type="AutoCall"; | ||
| 324 | $crmcall->dialline_id=$dialline->id; | ||
| 325 | |||
| 326 | $crmcall->setTs('ts_Wait',$nowts); | ||
| 327 | $crmcall->setTs('ts_Call',$nowts); | ||
| 328 | |||
| 329 | $crmcall->did=$callerid; | ||
| 330 | |||
| 331 | $tdata=array(); | ||
| 332 | $crmcall->data=json_encode($tdata); | ||
| 333 | $crmcall->save(); | ||
| 334 | |||
| 335 | //start actual calls | ||
| 336 | $newqueue=new Kqueue(); | ||
| 337 | $newqueue->autoCallOut($users[0]["mobile"],$callerid,$crmcall,$dialline); | ||
| 338 | } | ||
| 339 | |||
| 340 | return; | ||
| 341 | } | ||
| 342 | |||
| 343 | public function getSpanCount() | ||
| 344 | { | ||
| 345 | $spanArr = array("span1" => 30, "span2" => 30, "span3" => 30, "span4" => 30); | ||
| 346 | |||
| 347 | $cnt = array_sum($spanArr); | ||
| 348 | |||
| 349 | return $cnt; | ||
| 350 | } | ||
| 351 | } |
app/Console/Commands/CreportEight.php
0 → 100644
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | |||
| 15 | use Illuminate\Database\Schema\Blueprint; | ||
| 16 | |||
| 17 | class CreportEight extends Command { | ||
| 18 | |||
| 19 | /** | ||
| 20 | * The console command name. | ||
| 21 | * | ||
| 22 | * @var string | ||
| 23 | */ | ||
| 24 | protected $signature = 'CreportEight'; | ||
| 25 | |||
| 26 | /** | ||
| 27 | * The console command description. | ||
| 28 | * | ||
| 29 | * @var string | ||
| 30 | */ | ||
| 31 | protected $description = 'App Main Daily Task for CreportEight'; | ||
| 32 | |||
| 33 | /** | ||
| 34 | * Execute the console command. | ||
| 35 | * | ||
| 36 | * @return mixed | ||
| 37 | */ | ||
| 38 | public function handle() | ||
| 39 | { | ||
| 40 | $nowts=time(); | ||
| 41 | $date=date('F_Y'); | ||
| 42 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 43 | |||
| 44 | $logdate=strtotime('0 day'); | ||
| 45 | |||
| 46 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 47 | $central_ip=env('central_ip'); | ||
| 48 | $server_ip=env('app_ip'); | ||
| 49 | $calllog_report = "calllog_report_".$date; | ||
| 50 | $conn = array( | ||
| 51 | 'driver' => 'mysql', | ||
| 52 | 'host' => $central_ip, | ||
| 53 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 54 | 'username' => env('DB_USERNAME', 'root'), | ||
| 55 | 'password' => env('DB_PASSWORD', ''), | ||
| 56 | 'charset' => 'utf8', | ||
| 57 | 'collation' => 'utf8_unicode_ci', | ||
| 58 | 'prefix' => '', | ||
| 59 | 'options' => array( | ||
| 60 | PDO::ATTR_TIMEOUT => 5, | ||
| 61 | ), | ||
| 62 | ); | ||
| 63 | Config::set("database.connections.conn", $conn); | ||
| 64 | |||
| 65 | DB::connection("conn")->getDatabaseName(); | ||
| 66 | |||
| 67 | $serverclist=DB::connection("conn")->select(DB::raw("select id from server_details where server_ip='$server_ip'")); | ||
| 68 | $server_id=$serverclist[0]->id; | ||
| 69 | if($server_id<10){ | ||
| 70 | $server_id="0".$server_id; | ||
| 71 | } | ||
| 72 | |||
| 73 | |||
| 74 | $maxid=DB::connection("conn")->select(DB::raw("SELECT max(crmcall_id) as maxid from $calllog_report where server='$server_id'")); | ||
| 75 | |||
| 76 | $maxids=$maxid[0]->maxid; | ||
| 77 | |||
| 78 | //$alist=DB::select(DB::raw("SELECT * from crmcalls where id>'$maxids' and created_at<'".date("Y-m-d H:i:s",$logdate-(60*60))."'")); | ||
| 79 | $alist=DB::select(DB::raw("SELECT * from crmcalls where id>'$maxids'")); | ||
| 80 | $countnumber=count($alist); | ||
| 81 | $finalnumber=$countnumber/50; | ||
| 82 | $finalnumber=floor($finalnumber); | ||
| 83 | $datainser=''; | ||
| 84 | $iii=1; | ||
| 85 | $kkk=1; | ||
| 86 | $shortinsert=""; | ||
| 87 | $userarr=array(); | ||
| 88 | foreach($alist as $aline) | ||
| 89 | { | ||
| 90 | $clientcode="";$currentstatus="";$legalstatus="";$record_id=""; | ||
| 91 | if($aline->crm_id>0) | ||
| 92 | { | ||
| 93 | $user=DB::select(DB::raw("select id,clientcode,currentstatus,legalstatus from records where id='".$aline->crm_id."' limit 1;")); | ||
| 94 | if(isset($user[0])) | ||
| 95 | { | ||
| 96 | $record_id=$user[0]->id; | ||
| 97 | $clientcode=$user[0]->clientcode; | ||
| 98 | $currentstatus=$user[0]->currentstatus; | ||
| 99 | $legalstatus=$user[0]->legalstatus; | ||
| 100 | } | ||
| 101 | } | ||
| 102 | $tpostdata=json_decode($aline->data,true); | ||
| 103 | $fulldate=date("Y-m-d H:i:s",strtotime($aline->created_at)+330*60); | ||
| 104 | $talktime=$aline->talkSec+$aline->recstartSec+$aline->recendSec; | ||
| 105 | $length=round(($aline->waitSec+$aline->callSec+$talktime+$aline->dispoSec)/1000,2); | ||
| 106 | |||
| 107 | if(!isset($userarr[$aline->user_id])&&$aline->user_id>0)$userarr[$aline->user_id]=User::find($aline->user_id); | ||
| 108 | $dispname="";if(isset($userarr[$aline->user_id]))$dispname=$userarr[$aline->user_id]->dispname(); | ||
| 109 | $username="";if(isset($userarr[$aline->user_id]))$username=$userarr[$aline->user_id]->username; | ||
| 110 | $globalid=$server_id.$record_id; | ||
| 111 | $server = $server_id; | ||
| 112 | $record_id = $record_id; | ||
| 113 | $crmcall_id = $aline->id; | ||
| 114 | $globalid = $globalid; | ||
| 115 | $created_at = $aline->created_at; | ||
| 116 | $start = $fulldate; | ||
| 117 | $length = $length; | ||
| 118 | $user = $username; | ||
| 119 | $name = $dispname; | ||
| 120 | $dispo = $aline->userstatus; | ||
| 121 | $subdispo = $aline->usersubstatus; | ||
| 122 | $callback = $aline->usercallback; | ||
| 123 | $number = $aline->number; | ||
| 124 | $clientcode = $clientcode; | ||
| 125 | $currentstatus = $currentstatus; | ||
| 126 | $legalstatus = $legalstatus; | ||
| 127 | $client = $aline->client; | ||
| 128 | $department = $aline->department; | ||
| 129 | $state = $aline->state; | ||
| 130 | $hsource = $aline->hsource; | ||
| 131 | $type = $aline->type; | ||
| 132 | $status = $aline->status; | ||
| 133 | $statuscode = $aline->statuscode; | ||
| 134 | $statusstr = $aline->substatus; | ||
| 135 | $dialline = $aline->dialline_id; | ||
| 136 | $did = $aline->did; | ||
| 137 | $waitsec = round($aline->waitSec/1000,2); | ||
| 138 | $callsec = round($aline->callSec/1000,2); | ||
| 139 | $talksec = round($talktime/1000,2); | ||
| 140 | $disposec = round($aline->dispoSec/1000,2); | ||
| 141 | $remarks = str_replace("'","",$aline->userremarks); | ||
| 142 | $userdata = $aline->userdata; | ||
| 143 | $attempt = $aline->attempt; | ||
| 144 | $priority = $aline->priority; | ||
| 145 | $question = $aline->question; | ||
| 146 | |||
| 147 | |||
| 148 | |||
| 149 | $shortinsert.="('$server', '$record_id', '$crmcall_id', '$globalid','$created_at', '$start', '$length', '$user', '$name', '$dispo', '$subdispo', '$callback', '$number', '$clientcode', '$currentstatus', '$legalstatus', '$client', '$department', '$state', '$hsource', '$type', '$status', '$statuscode', '$statusstr', '$dialline', '$did', '$waitsec', '$callsec', '$talksec', '$disposec', '$remarks', '$userdata', '$attempt', '$priority', '$question'),"; | ||
| 150 | |||
| 151 | if($kkk<=$finalnumber){ | ||
| 152 | if($iii%50==0){ | ||
| 153 | |||
| 154 | $shortinsert=substr($shortinsert,0,-1); | ||
| 155 | DB::connection("conn")->insert(DB::raw("INSERT INTO $calllog_report (`server`, `record_id`, `crmcall_id`, `globalid`, `created_at`, `start`, `length`, `user`, `name`, `dispo`, `subdispo`, `callback`, `number`, `clientcode`, `currentstatus`, `legalstatus`, `client`, `department`, `state`, `hsource`, `type`, `status`, `statuscode`, `statusstr`, `dialline`, `did`, `waitsec`, `callsec`, `talksec`, `disposec`, `remarks`, `userdata`, `attempt`, `priority`, `question`) VALUES $shortinsert")); | ||
| 156 | $kkk++; | ||
| 157 | } | ||
| 158 | }else{ | ||
| 159 | DB::connection("conn")->insert(DB::raw("INSERT INTO $calllog_report set server='$server', record_id='$record_id', crmcall_id='$crmcall_id', globalid='$globalid', created_at='$created_at', start='$start', length='$length', user='$user', name='$name', dispo='$dispo', subdispo='$subdispo', callback='$callback', number='$number', clientcode='$clientcode', currentstatus='$currentstatus', legalstatus='$legalstatus', client='$client', department='$department', state='$state', hsource='$hsource', type='$type', status='$status', statuscode='$statuscode', statusstr='$statusstr', dialline='$dialline', did='$did', waitsec='$waitsec', callsec='$callsec', talksec='$talksec', disposec='$disposec', remarks='$remarks', userdata='$userdata', attempt='$attempt', priority='$priority', question='$question'")); | ||
| 160 | |||
| 161 | } | ||
| 162 | if($iii%50==0){ | ||
| 163 | $shortinsert=""; | ||
| 164 | } | ||
| 165 | $iii++; | ||
| 166 | |||
| 167 | //$update=DB::connection("conn")->select(DB::raw("SELECT crmcall_id as updateid from $calllog_report where server='$server_id' and `state` IN ('DialBegin','DialEnd')")); | ||
| 168 | //echo $update; | ||
| 169 | DB::update(DB::raw("UPDATE crmcalls set call_flag='C' where id=$crmcall_id")); | ||
| 170 | } | ||
| 171 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 172 | DB::connection("conn")->disconnect(); | ||
| 173 | } | ||
| 174 | |||
| 175 | } | ||
| 176 | |||
| 177 | |||
| 178 |
app/Console/Commands/CreportNine.php
0 → 100644
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | |||
| 15 | use Illuminate\Database\Schema\Blueprint; | ||
| 16 | |||
| 17 | class CreportNine extends Command { | ||
| 18 | |||
| 19 | /** | ||
| 20 | * The console command name. | ||
| 21 | * | ||
| 22 | * @var string | ||
| 23 | */ | ||
| 24 | protected $signature = 'CreportNine'; | ||
| 25 | |||
| 26 | /** | ||
| 27 | * The console command description. | ||
| 28 | * | ||
| 29 | * @var string | ||
| 30 | */ | ||
| 31 | protected $description = 'App Main Daily Task for CreportNine'; | ||
| 32 | |||
| 33 | /** | ||
| 34 | * Execute the console command. | ||
| 35 | * | ||
| 36 | * @return mixed | ||
| 37 | */ | ||
| 38 | public function handle() | ||
| 39 | { | ||
| 40 | $nowts=time(); | ||
| 41 | $date=date('F_Y'); | ||
| 42 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 43 | |||
| 44 | $logdate=strtotime('0 day'); | ||
| 45 | |||
| 46 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 47 | $central_ip=env('central_ip'); | ||
| 48 | $server_ip=env('app_ip'); | ||
| 49 | $d='01'; | ||
| 50 | $startdate=date('Y-m-')."$d"; | ||
| 51 | $calllog_report = "calllog_report_".$date; | ||
| 52 | // $calllog_report = "calllog_report_February_2018"; | ||
| 53 | $conn = array( | ||
| 54 | 'driver' => 'mysql', | ||
| 55 | 'host' => $central_ip, | ||
| 56 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 57 | 'username' => env('DB_USERNAME', 'root'), | ||
| 58 | 'password' => env('DB_PASSWORD', ''), | ||
| 59 | 'charset' => 'utf8', | ||
| 60 | 'collation' => 'utf8_unicode_ci', | ||
| 61 | 'prefix' => '', | ||
| 62 | 'options' => array( | ||
| 63 | PDO::ATTR_TIMEOUT => 5, | ||
| 64 | ), | ||
| 65 | ); | ||
| 66 | Config::set("database.connections.conn", $conn); | ||
| 67 | |||
| 68 | DB::connection("conn")->getDatabaseName(); | ||
| 69 | |||
| 70 | $serverclist=DB::connection("conn")->select(DB::raw("select id from server_details where server_ip='$server_ip'")); | ||
| 71 | $server_id=$serverclist[0]->id; | ||
| 72 | if($server_id<10){ | ||
| 73 | $server_id="0".$server_id; | ||
| 74 | } | ||
| 75 | |||
| 76 | |||
| 77 | $maxid=DB::connection("conn")->select(DB::raw("SELECT max(crmcall_id) as maxid from $calllog_report where server='$server_id'")); | ||
| 78 | |||
| 79 | $maxids=$maxid[0]->maxid; | ||
| 80 | |||
| 81 | //$alist=DB::select(DB::raw("SELECT * from crmcalls where id>'$maxids' and created_at<'".date("Y-m-d H:i:s",$logdate-(60*60))."'")); | ||
| 82 | $alist=DB::select(DB::raw("SELECT * from crmcalls where id>'$maxids'")); | ||
| 83 | //$alist=DB::select(DB::raw("SELECT * from crmcalls where id>'$maxids' and created_at<'".date("Y-m-d H:i:s",$logdate-(60*60))."'")); | ||
| 84 | |||
| 85 | |||
| 86 | $userarr=array(); | ||
| 87 | foreach($alist as $aline) | ||
| 88 | { | ||
| 89 | $setstrarr=array(); | ||
| 90 | |||
| 91 | |||
| 92 | $clientcode="";$currentstatus="";$legalstatus="";$record_id=""; | ||
| 93 | if($aline->crm_id>0) | ||
| 94 | { | ||
| 95 | $user=DB::select(DB::raw("select id,clientcode,currentstatus,legalstatus from records where id='".$aline->crm_id."' limit 1;")); | ||
| 96 | if(isset($user[0])) | ||
| 97 | { | ||
| 98 | $record_id=$user[0]->id; | ||
| 99 | $clientcode=$user[0]->clientcode; | ||
| 100 | $currentstatus=$user[0]->currentstatus; | ||
| 101 | $legalstatus=$user[0]->legalstatus; | ||
| 102 | } | ||
| 103 | } | ||
| 104 | $tpostdata=json_decode($aline->data,true); | ||
| 105 | $fulldate=date("Y-m-d H:i:s",strtotime($aline->created_at)+330*60); | ||
| 106 | $talktime=$aline->talkSec+$aline->recstartSec+$aline->recendSec; | ||
| 107 | $length=round(($aline->waitSec+$aline->callSec+$talktime+$aline->dispoSec)/1000,2); | ||
| 108 | |||
| 109 | if(!isset($userarr[$aline->user_id])&&$aline->user_id>0)$userarr[$aline->user_id]=User::find($aline->user_id); | ||
| 110 | $dispname="";if(isset($userarr[$aline->user_id]))$dispname=$userarr[$aline->user_id]->dispname(); | ||
| 111 | $username="";if(isset($userarr[$aline->user_id]))$username=$userarr[$aline->user_id]->username; | ||
| 112 | $globalid=$server_id.$record_id; | ||
| 113 | $setstrarr[]="server='$server_id'"; | ||
| 114 | $setstrarr[]="record_id='$record_id'"; | ||
| 115 | $setstrarr[]="crmcall_id='$aline->id'"; | ||
| 116 | $setstrarr[]="globalid='$globalid'"; | ||
| 117 | $setstrarr[]="created_at='$aline->created_at'"; | ||
| 118 | $setstrarr[]="start='$fulldate'"; | ||
| 119 | $setstrarr[]="length='$length'"; | ||
| 120 | $setstrarr[]="user='$username'"; | ||
| 121 | $setstrarr[]="name='$dispname'"; | ||
| 122 | $setstrarr[]="dispo='$aline->userstatus'"; | ||
| 123 | $setstrarr[]="subdispo='$aline->usersubstatus'"; | ||
| 124 | $setstrarr[]="callback='$aline->usercallback'"; | ||
| 125 | |||
| 126 | $setstrarr[]="number='$aline->number'"; | ||
| 127 | $setstrarr[]="clientcode='$clientcode'"; | ||
| 128 | $setstrarr[]="currentstatus='$currentstatus'"; | ||
| 129 | $setstrarr[]="legalstatus='$legalstatus'"; | ||
| 130 | $setstrarr[]="client='$aline->client'"; | ||
| 131 | $setstrarr[]="department='$aline->department'"; | ||
| 132 | $setstrarr[]="state='$aline->state'"; | ||
| 133 | $setstrarr[]="hsource='$aline->hsource'"; | ||
| 134 | |||
| 135 | $setstrarr[]="type='$aline->type'"; | ||
| 136 | $setstrarr[]="status='$aline->status'"; | ||
| 137 | $setstrarr[]="statuscode='$aline->statuscode'"; | ||
| 138 | $setstrarr[]="statusstr='$aline->substatus'"; | ||
| 139 | $setstrarr[]="dialline='$aline->dialline_id'"; | ||
| 140 | $setstrarr[]="did='$aline->did'"; | ||
| 141 | $setstrarr[]="waitsec='".round($aline->waitSec/1000,2)."'"; | ||
| 142 | $setstrarr[]="callsec='".round($aline->callSec/1000,2)."'"; | ||
| 143 | $setstrarr[]="talksec='".round($talktime/1000,2)."'"; | ||
| 144 | $setstrarr[]="disposec='".round($aline->dispoSec/1000,2)."'"; | ||
| 145 | $setstrarr[]="remarks='".str_replace("'","",$aline->userremarks)."'"; | ||
| 146 | $setstrarr[]="userdata='$aline->userdata'"; | ||
| 147 | $setstrarr[]="attempt='$aline->attempt'"; | ||
| 148 | $setstrarr[]="priority='$aline->priority'"; | ||
| 149 | $setstrarr[]="question='$aline->question'"; | ||
| 150 | |||
| 151 | $setstr=implode(",",$setstrarr); | ||
| 152 | DB::connection("conn")->insert(DB::raw("insert into ".$calllog_report." set $setstr")); | ||
| 153 | } | ||
| 154 | DB::connection("conn")->disconnect(); | ||
| 155 | |||
| 156 | } | ||
| 157 | } | ||
| 158 | |||
| 159 |
app/Console/Commands/CreportTen.php
0 → 100644
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | |||
| 15 | use Illuminate\Database\Schema\Blueprint; | ||
| 16 | |||
| 17 | class CreportTen extends Command { | ||
| 18 | |||
| 19 | /** | ||
| 20 | * The console command name. | ||
| 21 | * | ||
| 22 | * @var string | ||
| 23 | */ | ||
| 24 | protected $signature = 'CreportTen'; | ||
| 25 | |||
| 26 | /** | ||
| 27 | * The console command description. | ||
| 28 | * | ||
| 29 | * @var string | ||
| 30 | */ | ||
| 31 | protected $description = 'App Main Daily Task for CreportTen'; | ||
| 32 | |||
| 33 | /** | ||
| 34 | * Execute the console command. | ||
| 35 | * | ||
| 36 | * @return mixed | ||
| 37 | */ | ||
| 38 | public function handle() | ||
| 39 | { | ||
| 40 | $nowts=time(); | ||
| 41 | $date=date('F_Y'); | ||
| 42 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 43 | |||
| 44 | $logdate=strtotime('0 day'); | ||
| 45 | |||
| 46 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 47 | $central_ip=env('central_ip'); | ||
| 48 | $server_ip=env('app_ip'); | ||
| 49 | //$calllog_report = "calllog_report_".date("d_m_Y"); | ||
| 50 | $calllog_report = "calllog_report_test"; | ||
| 51 | $conn = array( | ||
| 52 | 'driver' => 'mysql', | ||
| 53 | 'host' => $central_ip, | ||
| 54 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 55 | 'username' => env('DB_USERNAME', 'root'), | ||
| 56 | 'password' => env('DB_PASSWORD', ''), | ||
| 57 | 'charset' => 'utf8', | ||
| 58 | 'collation' => 'utf8_unicode_ci', | ||
| 59 | 'prefix' => '', | ||
| 60 | 'options' => array( | ||
| 61 | PDO::ATTR_TIMEOUT => 5, | ||
| 62 | ), | ||
| 63 | ); | ||
| 64 | Config::set("database.connections.conn", $conn); | ||
| 65 | |||
| 66 | DB::connection("conn")->getDatabaseName(); | ||
| 67 | |||
| 68 | $serverclist=DB::connection("conn")->select(DB::raw("select id from server_details where server_ip='$server_ip'")); | ||
| 69 | $server_id=$serverclist[0]->id; | ||
| 70 | if($server_id<10){ | ||
| 71 | $server_id="0".$server_id; | ||
| 72 | } | ||
| 73 | |||
| 74 | |||
| 75 | $maxid=DB::connection("conn")->select(DB::raw("SELECT max(crmcall_id) as maxid from $calllog_report where server='$server_id'")); | ||
| 76 | |||
| 77 | $maxids=$maxid[0]->maxid; | ||
| 78 | echo "Maxid".$maxids; | ||
| 79 | |||
| 80 | //$alist=DB::select(DB::raw("SELECT * from crmcalls_archive where created_at>'2018-06-01' and created_at<'2018-07-01'")); | ||
| 81 | //$alist=DB::select(DB::raw("SELECT * from crmcalls where id>'$maxids' and created_at>'".date("Y-m-d")."' and created_at<'".date("Y-m-d H:i:s",$logdate-(60*60))."'")); | ||
| 82 | |||
| 83 | $alist=DB::select(DB::raw("SELECT * from crmcalls where id>'$maxids' and created_at<'".date("Y-m-d H:i:s",$logdate-(60*60))."'")); | ||
| 84 | |||
| 85 | $userarr=array(); | ||
| 86 | foreach($alist as $aline) | ||
| 87 | { | ||
| 88 | $setstrarr=array(); | ||
| 89 | |||
| 90 | |||
| 91 | $clientcode="";$currentstatus="";$legalstatus="";$record_id=""; | ||
| 92 | if($aline->crm_id>0) | ||
| 93 | { | ||
| 94 | $user=DB::select(DB::raw("select id,clientcode,currentstatus,legalstatus from records where id='".$aline->crm_id."' limit 1;")); | ||
| 95 | if(isset($user[0])) | ||
| 96 | { | ||
| 97 | $record_id=$user[0]->id; | ||
| 98 | $clientcode=$user[0]->clientcode; | ||
| 99 | $currentstatus=$user[0]->currentstatus; | ||
| 100 | $legalstatus=$user[0]->legalstatus; | ||
| 101 | } | ||
| 102 | } | ||
| 103 | $tpostdata=json_decode($aline->data,true); | ||
| 104 | $fulldate=date("Y-m-d H:i:s",strtotime($aline->created_at)+330*60); | ||
| 105 | $talktime=$aline->talkSec+$aline->recstartSec+$aline->recendSec; | ||
| 106 | $length=round(($aline->waitSec+$aline->callSec+$talktime+$aline->dispoSec)/1000,2); | ||
| 107 | |||
| 108 | if(!isset($userarr[$aline->user_id])&&$aline->user_id>0)$userarr[$aline->user_id]=User::find($aline->user_id); | ||
| 109 | $dispname="";if(isset($userarr[$aline->user_id]))$dispname=$userarr[$aline->user_id]->dispname(); | ||
| 110 | $username="";if(isset($userarr[$aline->user_id]))$username=$userarr[$aline->user_id]->username; | ||
| 111 | $globalid=$server_id.$record_id; | ||
| 112 | $setstrarr[]="server='$server_id'"; | ||
| 113 | $setstrarr[]="record_id='$record_id'"; | ||
| 114 | $setstrarr[]="crmcall_id='$aline->id'"; | ||
| 115 | $setstrarr[]="globalid='$globalid'"; | ||
| 116 | $setstrarr[]="created_at='$aline->created_at'"; | ||
| 117 | $setstrarr[]="start='$fulldate'"; | ||
| 118 | $setstrarr[]="length='$length'"; | ||
| 119 | $setstrarr[]="user='$username'"; | ||
| 120 | $setstrarr[]="name='$dispname'"; | ||
| 121 | $setstrarr[]="dispo='$aline->userstatus'"; | ||
| 122 | $setstrarr[]="subdispo='$aline->usersubstatus'"; | ||
| 123 | $setstrarr[]="callback='$aline->usercallback'"; | ||
| 124 | |||
| 125 | $setstrarr[]="number='$aline->number'"; | ||
| 126 | $setstrarr[]="clientcode='$clientcode'"; | ||
| 127 | $setstrarr[]="currentstatus='$currentstatus'"; | ||
| 128 | $setstrarr[]="legalstatus='$legalstatus'"; | ||
| 129 | $setstrarr[]="client='$aline->client'"; | ||
| 130 | $setstrarr[]="department='$aline->department'"; | ||
| 131 | $setstrarr[]="state='$aline->state'"; | ||
| 132 | $setstrarr[]="hsource='$aline->hsource'"; | ||
| 133 | |||
| 134 | $setstrarr[]="type='$aline->type'"; | ||
| 135 | $setstrarr[]="status='$aline->status'"; | ||
| 136 | $setstrarr[]="statuscode='$aline->statuscode'"; | ||
| 137 | $setstrarr[]="statusstr='$aline->substatus'"; | ||
| 138 | $setstrarr[]="dialline='$aline->dialline_id'"; | ||
| 139 | $setstrarr[]="did='$aline->did'"; | ||
| 140 | $setstrarr[]="waitsec='".round($aline->waitSec/1000,2)."'"; | ||
| 141 | $setstrarr[]="callsec='".round($aline->callSec/1000,2)."'"; | ||
| 142 | $setstrarr[]="talksec='".round($talktime/1000,2)."'"; | ||
| 143 | $setstrarr[]="disposec='".round($aline->dispoSec/1000,2)."'"; | ||
| 144 | $setstrarr[]="remarks='".str_replace("'","",$aline->userremarks)."'"; | ||
| 145 | $setstrarr[]="userdata='$aline->userdata'"; | ||
| 146 | $setstrarr[]="attempt='$aline->attempt'"; | ||
| 147 | $setstrarr[]="priority='$aline->priority'"; | ||
| 148 | $setstrarr[]="question='$aline->question'"; | ||
| 149 | |||
| 150 | $setstr=implode(",",$setstrarr); | ||
| 151 | DB::connection("conn")->insert(DB::raw("insert into ".$calllog_report." set $setstr")); | ||
| 152 | //DB::connection("conn")->update(DB::raw("UPDATE ".$calllog_report." as ca INNER JOIN crmcalls as c on ca.crmcall_id = c.id set ca.state = c.state,ca.statuscode = c.statuscode,ca.status = c.status,ca.substatus = c.substatus,ca.callSec = c.callSec,ca.ts_Talk = c.ts_Talk,ca.ts_Recstart = c.ts_Recstart,ca.ts_Recend = c.ts_Recend,ca.ts_Dispo = c.ts_Dispo,ca.ts_Close = c.ts_Close,ca.dispoSec = c.dispoSec,ca.recstartSec=c.recstartSec,ca.data = c.data,ca.recsize = c.recsize,ca.userstatus = c.userstatus,ca.usersubstatus = c.usersubstatus,ca.usercallback = c.usercallback ,ca.userremarks = c.userremarks,ca.attempt = c.attempt,ca.priority = c.priority,ca.question = c.question")); | ||
| 153 | } | ||
| 154 | echo "AfterUploadingData=".date('Y-m-d H:i:s'); | ||
| 155 | } | ||
| 156 | } | ||
| 157 | |||
| 158 |
app/Console/Commands/DailyLogout.php
0 → 100644
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | use App\Models\Notification; | ||
| 15 | use App\Jobs\KHRMSLib; | ||
| 16 | |||
| 17 | use Input; | ||
| 18 | use App\Models\Sipid; | ||
| 19 | use App\Models\Kqueue; | ||
| 20 | use App\Models\Dialline; | ||
| 21 | use App\Models\Session; | ||
| 22 | |||
| 23 | use Illuminate\Database\Schema\Blueprint; | ||
| 24 | |||
| 25 | class DailyLogout extends Command { | ||
| 26 | |||
| 27 | /** | ||
| 28 | * The console command name. | ||
| 29 | * | ||
| 30 | * @var string | ||
| 31 | */ | ||
| 32 | protected $signature = 'DailyLogout'; | ||
| 33 | |||
| 34 | /** | ||
| 35 | * The console command description. | ||
| 36 | * | ||
| 37 | * @var string | ||
| 38 | */ | ||
| 39 | protected $description = 'DailyLogout'; | ||
| 40 | |||
| 41 | /** | ||
| 42 | * Execute the console command. | ||
| 43 | * | ||
| 44 | * @return mixed | ||
| 45 | */ | ||
| 46 | public function handle() | ||
| 47 | { | ||
| 48 | |||
| 49 | Dialline::where('status','!=','Free')->update(['status'=>'Free','conf'=>'','channel'=>'','updated_at'=>'0000-00-00 00:00:00']); | ||
| 50 | Sipid::where('status','!=','0')->update(['status'=>0,'user'=>0,'ready'=>0,'confup'=>0,'clients'=>'','updated_at'=>'0000-00-00 00:00:00']); | ||
| 51 | |||
| 52 | User::where('presence','>','0')->update(['presence'=>0]); | ||
| 53 | Session::truncate(); | ||
| 54 | |||
| 55 | return ""; | ||
| 56 | } | ||
| 57 | } | ||
| 58 | |||
| 59 | |||
| 60 | |||
| 61 |
app/Console/Commands/DeleteCrmcalls.php
0 → 100644
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | use App\Models\Notification; | ||
| 15 | use App\Jobs\KHRMSLib; | ||
| 16 | |||
| 17 | use Input; | ||
| 18 | use App\Models\Sipid; | ||
| 19 | use App\Models\Kqueue; | ||
| 20 | use App\Models\Dialline; | ||
| 21 | use App\Models\Session; | ||
| 22 | |||
| 23 | use Illuminate\Database\Schema\Blueprint; | ||
| 24 | |||
| 25 | class DeleteCrmcalls extends Command { | ||
| 26 | |||
| 27 | /** | ||
| 28 | * The console command name. | ||
| 29 | * | ||
| 30 | * @var string | ||
| 31 | */ | ||
| 32 | protected $signature = 'DeleteCrmcalls'; | ||
| 33 | |||
| 34 | /** | ||
| 35 | * The console command description. | ||
| 36 | * | ||
| 37 | * @var string | ||
| 38 | */ | ||
| 39 | protected $description = 'Delete data from CRMCalls before 7 days'; | ||
| 40 | |||
| 41 | /** | ||
| 42 | * Execute the console command. | ||
| 43 | * | ||
| 44 | * @return mixed | ||
| 45 | */ | ||
| 46 | public function handle() | ||
| 47 | { | ||
| 48 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 49 | |||
| 50 | $logdate=strtotime('-7 day'); | ||
| 51 | |||
| 52 | CRMCall::where('created_at','<',date("Y-m-d",$logdate))->delete(); | ||
| 53 | } | ||
| 54 | } | ||
| 55 | |||
| 56 | |||
| 57 | |||
| 58 |
app/Console/Commands/InsertCrmArchive.php
0 → 100644
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | use App\Models\Notification; | ||
| 15 | use App\Jobs\KHRMSLib; | ||
| 16 | |||
| 17 | use Input; | ||
| 18 | use App\Models\Sipid; | ||
| 19 | use App\Models\Kqueue; | ||
| 20 | use App\Models\Dialline; | ||
| 21 | use App\Models\Session; | ||
| 22 | |||
| 23 | use Illuminate\Database\Schema\Blueprint; | ||
| 24 | |||
| 25 | class InsertCrmArchive extends Command { | ||
| 26 | |||
| 27 | /** | ||
| 28 | * The console command name. | ||
| 29 | * | ||
| 30 | * @var string | ||
| 31 | */ | ||
| 32 | protected $signature = 'InsertCrmArchive'; | ||
| 33 | |||
| 34 | /** | ||
| 35 | * The console command description. | ||
| 36 | * | ||
| 37 | * @var string | ||
| 38 | */ | ||
| 39 | protected $description = 'Insert updated data into crmcalls_archive from crmcalls'; | ||
| 40 | |||
| 41 | /** | ||
| 42 | * Execute the console command. | ||
| 43 | * | ||
| 44 | * @return mixed | ||
| 45 | */ | ||
| 46 | public function handle() | ||
| 47 | { | ||
| 48 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 49 | |||
| 50 | DB::insert(DB::raw("insert into crmcalls_archive select * from crmcalls where id>(select max(id) from crmcalls_archive)")); | ||
| 51 | |||
| 52 | DB::update(DB::raw("UPDATE crmcalls_archive as ca INNER JOIN crmcalls as c on ca.id = c.id set ca.state = c.state,ca.statuscode = c.statuscode,ca.status = c.status,ca.substatus = c.substatus,ca.callSec = c.callSec,ca.ts_Talk = c.ts_Talk,ca.ts_Recstart = c.ts_Recstart,ca.ts_Recend = c.ts_Recend,ca.ts_Dispo = c.ts_Dispo,ca.ts_Close = c.ts_Close,ca.dispoSec = c.dispoSec,ca.recstartSec=c.recstartSec,ca.data = c.data,ca.recsize = c.recsize,ca.userstatus = c.userstatus,ca.usersubstatus = c.usersubstatus,ca.usercallback = c.usercallback ,ca.userremarks = c.userremarks,ca.attempt = c.attempt,ca.priority = c.priority,ca.question = c.question")); | ||
| 53 | |||
| 54 | echo 'End'; | ||
| 55 | } | ||
| 56 | } | ||
| 57 | |||
| 58 | |||
| 59 | |||
| 60 |
app/Console/Commands/KstychARP.php
0 → 100644
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | |||
| 5 | use App\Jobs\KPAMIListen; | ||
| 6 | |||
| 7 | class KstychARP extends Command { | ||
| 8 | |||
| 9 | /** | ||
| 10 | * The console command name. | ||
| 11 | * | ||
| 12 | * @var string | ||
| 13 | */ | ||
| 14 | protected $signature = 'KstychARP'; | ||
| 15 | |||
| 16 | /** | ||
| 17 | * The console command description. | ||
| 18 | * | ||
| 19 | * @var string | ||
| 20 | */ | ||
| 21 | protected $description = 'ARP Broadcast'; | ||
| 22 | |||
| 23 | /** | ||
| 24 | * Execute the console command. | ||
| 25 | * | ||
| 26 | * @return mixed | ||
| 27 | */ | ||
| 28 | public function handle() | ||
| 29 | { | ||
| 30 | |||
| 31 | } | ||
| 32 | |||
| 33 | } |
app/Console/Commands/KstychDaily.php
0 → 100644
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | |||
| 15 | use Illuminate\Database\Schema\Blueprint; | ||
| 16 | |||
| 17 | class KstychDaily extends Command { | ||
| 18 | |||
| 19 | /** | ||
| 20 | * The console command name. | ||
| 21 | * | ||
| 22 | * @var string | ||
| 23 | */ | ||
| 24 | protected $signature = 'KstychDaily'; | ||
| 25 | |||
| 26 | /** | ||
| 27 | * The console command description. | ||
| 28 | * | ||
| 29 | * @var string | ||
| 30 | */ | ||
| 31 | protected $description = 'App Main Daily Task'; | ||
| 32 | |||
| 33 | /** | ||
| 34 | * Execute the console command. | ||
| 35 | * | ||
| 36 | * @return mixed | ||
| 37 | */ | ||
| 38 | public function handle() | ||
| 39 | { | ||
| 40 | $nowts=time(); | ||
| 41 | Accesslog::where('endtime','<',date("Y-m-d H:i:s",$nowts-2*24*60*60))->update(array('postdata'=>'','queries'=>'')); | ||
| 42 | Accesslog::where('endtime','<',date("Y-m-d H:i:s",$nowts-2*24*60*60))->delete(); | ||
| 43 | |||
| 44 | |||
| 45 | |||
| 46 | if(env('app_ip')=="10.3.177.14") | ||
| 47 | { | ||
| 48 | |||
| 49 | if(!Schema::hasTable('calllog_report')) | ||
| 50 | { | ||
| 51 | Schema::create('calllog_report', function(Blueprint $table) | ||
| 52 | { | ||
| 53 | $table->string('server', 100); | ||
| 54 | $table->dateTime('start'); | ||
| 55 | $table->integer('length'); | ||
| 56 | $table->string('user',100); | ||
| 57 | $table->string('name',100); | ||
| 58 | $table->string('dispo', 200); | ||
| 59 | $table->string('subdispo', 200); | ||
| 60 | $table->dateTime('callback'); | ||
| 61 | $table->string('number', 100); | ||
| 62 | $table->string('clientcode', 100); | ||
| 63 | $table->string('currentstatus', 100); | ||
| 64 | $table->string('legalstatus', 100); | ||
| 65 | $table->string('client', 200); | ||
| 66 | $table->string('department', 200); | ||
| 67 | $table->string('state', 50); | ||
| 68 | $table->string('hsource', 100); | ||
| 69 | $table->string('type', 50); | ||
| 70 | $table->string('statuscode', 20); | ||
| 71 | $table->string('status', 100); | ||
| 72 | $table->string('statusstr', 100); | ||
| 73 | $table->integer('dialline'); | ||
| 74 | $table->string('did', 50); | ||
| 75 | $table->bigInteger('waitsec'); | ||
| 76 | $table->bigInteger('callsec'); | ||
| 77 | $table->bigInteger('talksec'); | ||
| 78 | $table->bigInteger('disposec'); | ||
| 79 | $table->string('remarks', 500); | ||
| 80 | $table->string('userdata',1000); | ||
| 81 | }); | ||
| 82 | } | ||
| 83 | |||
| 84 | |||
| 85 | $offline=array(); | ||
| 86 | $arr=Config::get("app.hdfcnodes"); | ||
| 87 | $logdate=strtotime('-1 day'); | ||
| 88 | |||
| 89 | |||
| 90 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 91 | |||
| 92 | |||
| 93 | |||
| 94 | $ii=1;$ci=0; | ||
| 95 | foreach($arr as $server=>$serverline) | ||
| 96 | { | ||
| 97 | $ci++; | ||
| 98 | $conn = array( | ||
| 99 | 'driver' => 'mysql', | ||
| 100 | 'host' => $server, | ||
| 101 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 102 | 'username' => env('DB_USERNAME', 'root'), | ||
| 103 | 'password' => env('DB_PASSWORD', ''), | ||
| 104 | 'charset' => 'utf8', | ||
| 105 | 'collation' => 'utf8_unicode_ci', | ||
| 106 | 'prefix' => '', | ||
| 107 | 'options' => array( | ||
| 108 | PDO::ATTR_TIMEOUT => 5, | ||
| 109 | ), | ||
| 110 | ); | ||
| 111 | Config::set("database.connections.conn$ci", $conn); | ||
| 112 | |||
| 113 | try | ||
| 114 | { | ||
| 115 | DB::connection("conn$ci")->getDatabaseName(); | ||
| 116 | |||
| 117 | |||
| 118 | $alist=CRMCall::on("conn$ci")->where('created_at','>=',date("Y-m-d H:i:s",$logdate))->where('created_at','<=',date("Y-m-d H:i:s",$logdate+24*60*60))->get(); | ||
| 119 | $userarr=array(); | ||
| 120 | foreach($alist as $aline) | ||
| 121 | { | ||
| 122 | $setstrarr=array(); | ||
| 123 | |||
| 124 | |||
| 125 | $clientcode="";$currentstatus="";$legalstatus=""; | ||
| 126 | if($aline->crm_id>0) | ||
| 127 | { | ||
| 128 | $user=DB::connection("conn$ci")->select(DB::raw("select id,clientcode,currentstatus,legalstatus from records where id='".$aline->crm_id."' limit 1;")); | ||
| 129 | if(isset($user[0])) | ||
| 130 | { | ||
| 131 | $clientcode=$user[0]->clientcode; | ||
| 132 | $currentstatus=$user[0]->currentstatus; | ||
| 133 | $legalstatus=$user[0]->legalstatus; | ||
| 134 | } | ||
| 135 | } | ||
| 136 | $tpostdata=json_decode($aline->data,true); | ||
| 137 | $fulldate=date("Y-m-d H:i:s",strtotime($aline->created_at)+330*60); | ||
| 138 | $talktime=$aline->talkSec+$aline->recstartSec+$aline->recendSec; | ||
| 139 | $length=round(($aline->waitSec+$aline->callSec+$talktime+$aline->dispoSec)/1000,2); | ||
| 140 | |||
| 141 | if(!isset($userarr[$aline->user_id])&&$aline->user_id>0)$userarr[$aline->user_id]=User::on("conn$ci")->find($aline->user_id); | ||
| 142 | $dispname="";if(isset($userarr[$aline->user_id]))$dispname=$userarr[$aline->user_id]->dispname(); | ||
| 143 | $username="";if(isset($userarr[$aline->user_id]))$username=$userarr[$aline->user_id]->username; | ||
| 144 | |||
| 145 | $setstrarr[]="server='$server'"; | ||
| 146 | $setstrarr[]="start='$fulldate'"; | ||
| 147 | $setstrarr[]="length='$length'"; | ||
| 148 | $setstrarr[]="user='$username'"; | ||
| 149 | $setstrarr[]="name='$dispname'"; | ||
| 150 | $setstrarr[]="dispo='$aline->userstatus'"; | ||
| 151 | $setstrarr[]="subdispo='$aline->usersubstatus'"; | ||
| 152 | $setstrarr[]="callback='$aline->usercallback'"; | ||
| 153 | |||
| 154 | $setstrarr[]="number='$aline->number'"; | ||
| 155 | $setstrarr[]="clientcode='$clientcode'"; | ||
| 156 | $setstrarr[]="currentstatus='$currentstatus'"; | ||
| 157 | $setstrarr[]="legalstatus='$legalstatus'"; | ||
| 158 | $setstrarr[]="client='$aline->client'"; | ||
| 159 | $setstrarr[]="department='$aline->department'"; | ||
| 160 | $setstrarr[]="state='$aline->state'"; | ||
| 161 | $setstrarr[]="hsource='$aline->hsource'"; | ||
| 162 | |||
| 163 | $setstrarr[]="type='$aline->type'"; | ||
| 164 | $setstrarr[]="status='$aline->status'"; | ||
| 165 | $setstrarr[]="statuscode='$aline->statuscode'"; | ||
| 166 | $setstrarr[]="statusstr='$aline->substatus'"; | ||
| 167 | $setstrarr[]="dialline='$aline->dialline_id'"; | ||
| 168 | $setstrarr[]="did='$aline->did'"; | ||
| 169 | $setstrarr[]="waitsec='".round($aline->waitSec/1000,2)."'"; | ||
| 170 | $setstrarr[]="callsec='".round($aline->callSec/1000,2)."'"; | ||
| 171 | $setstrarr[]="talksec='".round($talktime/1000,2)."'"; | ||
| 172 | $setstrarr[]="disposec='".round($aline->dispoSec/1000,2)."'"; | ||
| 173 | $setstrarr[]="remarks='$aline->userremarks'"; | ||
| 174 | $setstrarr[]="userdata='$aline->userdata'"; | ||
| 175 | |||
| 176 | $setstr=implode(",",$setstrarr); | ||
| 177 | DB::insert(DB::raw("insert into calllog_report set $setstr")); | ||
| 178 | } | ||
| 179 | |||
| 180 | } | ||
| 181 | catch(Exception $e) | ||
| 182 | { | ||
| 183 | $offline[]=$server; | ||
| 184 | } | ||
| 185 | } | ||
| 186 | |||
| 187 | } | ||
| 188 | |||
| 189 | |||
| 190 | |||
| 191 | } | ||
| 192 | |||
| 193 | } |
app/Console/Commands/KstychPAGI.php
0 → 100644
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | |||
| 5 | use App\Jobs\KPAGIListen; | ||
| 6 | |||
| 7 | class KstychPAGI extends Command { | ||
| 8 | |||
| 9 | /** | ||
| 10 | * The console command name. | ||
| 11 | * | ||
| 12 | * @var string | ||
| 13 | */ | ||
| 14 | protected $signature = 'KstychPAGI'; | ||
| 15 | |||
| 16 | /** | ||
| 17 | * The console command description. | ||
| 18 | * | ||
| 19 | * @var string | ||
| 20 | */ | ||
| 21 | protected $description = 'Daemon to Listen to Asterisk'; | ||
| 22 | |||
| 23 | /** | ||
| 24 | * Execute the console command. | ||
| 25 | * | ||
| 26 | * @return mixed | ||
| 27 | */ | ||
| 28 | public function handle() | ||
| 29 | { | ||
| 30 | $agi = \PAGI\Client\Impl\ClientImpl::getInstance(); | ||
| 31 | $kpagi = new KPAGIListen(array('pagiClient' => $agi)); | ||
| 32 | $kpagi->init(); | ||
| 33 | $kpagi->run(); | ||
| 34 | } | ||
| 35 | |||
| 36 | } |
app/Console/Commands/KstychPAMI.php
0 → 100644
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | |||
| 5 | use App\Jobs\KPAMIListen; | ||
| 6 | |||
| 7 | class KstychPAMI extends Command { | ||
| 8 | |||
| 9 | /** | ||
| 10 | * The console command name. | ||
| 11 | * | ||
| 12 | * @var string | ||
| 13 | */ | ||
| 14 | protected $signature = 'KstychPAMI {serverip=127.0.0.1}'; | ||
| 15 | |||
| 16 | /** | ||
| 17 | * The console command description. | ||
| 18 | * | ||
| 19 | * @var string | ||
| 20 | */ | ||
| 21 | protected $description = 'Daemon to Listen to Asterisk'; | ||
| 22 | |||
| 23 | /** | ||
| 24 | * Execute the console command. | ||
| 25 | * | ||
| 26 | * @return mixed | ||
| 27 | */ | ||
| 28 | public function handle() | ||
| 29 | { | ||
| 30 | $listener = new KPAMIListen($this->argument('serverip'));$listener->run(); | ||
| 31 | } | ||
| 32 | |||
| 33 | } |
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | use App\Models\Notification; | ||
| 15 | use App\Jobs\KHRMSLib; | ||
| 16 | |||
| 17 | use Input; | ||
| 18 | use App\Models\Sipid; | ||
| 19 | use App\Models\Kqueue; | ||
| 20 | use App\Models\Dialline; | ||
| 21 | use App\Models\Session; | ||
| 22 | use App\Models\Cutoff; | ||
| 23 | |||
| 24 | use Log; | ||
| 25 | use Illuminate\Database\Schema\Blueprint; | ||
| 26 | |||
| 27 | class PredictiveCallHangUp extends Command { | ||
| 28 | |||
| 29 | /** | ||
| 30 | * The console command name. | ||
| 31 | * | ||
| 32 | * @var string | ||
| 33 | */ | ||
| 34 | protected $signature = 'PredictiveCallHangUp'; | ||
| 35 | |||
| 36 | /** | ||
| 37 | * The console command description. | ||
| 38 | * | ||
| 39 | * @var string | ||
| 40 | */ | ||
| 41 | protected $description = 'Hang Up Extra Calls If Agents Are Not Free'; | ||
| 42 | |||
| 43 | /** | ||
| 44 | * Execute the console command. | ||
| 45 | * | ||
| 46 | * @return mixed | ||
| 47 | */ | ||
| 48 | public function handle() | ||
| 49 | { | ||
| 50 | while(true) | ||
| 51 | { | ||
| 52 | usleep(1000000); | ||
| 53 | $this->runHangUp(); | ||
| 54 | } | ||
| 55 | } | ||
| 56 | |||
| 57 | public function runHangUp() | ||
| 58 | { | ||
| 59 | try { | ||
| 60 | $breathingTime = 60; | ||
| 61 | $avgringsec = 30; | ||
| 62 | |||
| 63 | $avgringsec = Cutoff::select(DB::Raw('avg(avg_ring) as avgringsec'))->first(); | ||
| 64 | if($avgringsec)$avgringsec= intval($avgringsec->avgringsec); | ||
| 65 | |||
| 66 | $diallines = Dialline::whereIn("status", ["Auto","AutoCall"])->where("conf","=","")->select('src_channel','status','updated_at','channel','server')->get(); | ||
| 67 | |||
| 68 | foreach ($diallines as $dialline) { | ||
| 69 | |||
| 70 | $newqueue=new Kqueue(); | ||
| 71 | $lastUpdatedTime = strtotime(date("Y-m-d H:i:s")) - strtotime($dialline->updated_at); | ||
| 72 | |||
| 73 | if ($dialline->status == 'Auto' && $lastUpdatedTime > $breathingTime) { | ||
| 74 | $newqueue->hangupChannelS($dialline->channel,$dialline->server); | ||
| 75 | } | ||
| 76 | elseif($dialline->status == 'AutoCall' && $lastUpdatedTime > ($avgringsec+$breathingTime)) { | ||
| 77 | $newqueue->hangupChannelS($dialline->src_channel,$dialline->server); | ||
| 78 | } | ||
| 79 | } | ||
| 80 | } catch (Exception $e) { | ||
| 81 | Log::useFiles(storage_path()."/logs/predictive_".date("Y_m_d").".log"); | ||
| 82 | Log::error($e); | ||
| 83 | } | ||
| 84 | } | ||
| 85 | } |
app/Console/Commands/SmsReport.php
0 → 100644
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | |||
| 15 | use Illuminate\Database\Schema\Blueprint; | ||
| 16 | |||
| 17 | class Smsreport extends Command { | ||
| 18 | |||
| 19 | /** | ||
| 20 | * The console command name. | ||
| 21 | * | ||
| 22 | * @var string | ||
| 23 | */ | ||
| 24 | protected $signature = 'Smsreport'; | ||
| 25 | |||
| 26 | /** | ||
| 27 | * The console command description. | ||
| 28 | * | ||
| 29 | * @var string | ||
| 30 | */ | ||
| 31 | protected $description = 'App Main Daily Task for Smsreport'; | ||
| 32 | |||
| 33 | /** | ||
| 34 | * Execute the console command. | ||
| 35 | * | ||
| 36 | * @return mixed | ||
| 37 | */ | ||
| 38 | public function handle() | ||
| 39 | { | ||
| 40 | $nowts=time(); | ||
| 41 | $date=date('F_Y'); | ||
| 42 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 43 | |||
| 44 | $logdate=strtotime('0 day'); | ||
| 45 | |||
| 46 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 47 | $central_ip=env('central_ip'); | ||
| 48 | $server_ip=env('app_ip'); | ||
| 49 | $calllog_report = "calllog_report_".$date; | ||
| 50 | $conn = array( | ||
| 51 | 'driver' => 'mysql', | ||
| 52 | 'host' => $central_ip, | ||
| 53 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 54 | 'username' => env('DB_USERNAME', 'root'), | ||
| 55 | 'password' => env('DB_PASSWORD', ''), | ||
| 56 | 'charset' => 'utf8', | ||
| 57 | 'collation' => 'utf8_unicode_ci', | ||
| 58 | 'prefix' => '', | ||
| 59 | 'options' => array( | ||
| 60 | PDO::ATTR_TIMEOUT => 5, | ||
| 61 | ), | ||
| 62 | ); | ||
| 63 | Config::set("database.connections.conn", $conn); | ||
| 64 | |||
| 65 | DB::connection("conn")->getDatabaseName(); | ||
| 66 | |||
| 67 | $serverclist=DB::connection("conn")->select(DB::raw("select id from server_details where server_ip='$server_ip'")); | ||
| 68 | $server_id=str_pad($serverclist[0]->id, 2, '0', STR_PAD_LEFT); | ||
| 69 | |||
| 70 | $maxid=DB::connection("conn")->select(DB::raw("SELECT max(sms_id) as maxid from sms_report where server='$server_id'")); | ||
| 71 | |||
| 72 | $maxids=$maxid[0]->maxid; | ||
| 73 | |||
| 74 | $alist=DB::select(DB::raw("SELECT * from sms_log where id>'$maxids'")); | ||
| 75 | $iii=0; | ||
| 76 | $shortinsert=""; | ||
| 77 | foreach($alist as $aline) | ||
| 78 | { | ||
| 79 | $iii++; | ||
| 80 | $server = $server_id; | ||
| 81 | $sms_id = $aline->id; | ||
| 82 | $created_at = $aline->created_at; | ||
| 83 | $message_time = date("Y-m-d H:i:s",strtotime($aline->created_at)+330*60); | ||
| 84 | $server_ip = $aline->server_ip; | ||
| 85 | $call_id = $aline->call_id; | ||
| 86 | $agent_name = $aline->agent_name; | ||
| 87 | $subdispo = $aline->subdispo; | ||
| 88 | $number = $aline->number; | ||
| 89 | $message = $aline->message; | ||
| 90 | $response = $aline->response; | ||
| 91 | |||
| 92 | $shortinsert.="('$server', '$sms_id','$created_at', '$message_time', '$server_ip', '$call_id', '$agent_name', '$subdispo', '$number', '$message', '$response'),"; | ||
| 93 | |||
| 94 | if($iii%50==0 || $iii == count($alist)){ | ||
| 95 | |||
| 96 | $shortinsert=substr($shortinsert,0,-1); | ||
| 97 | DB::connection("conn")->insert(DB::raw("INSERT INTO sms_report (`server`, `sms_id`, `created_at`, `message_time`, `server_ip`, `call_id`, `agent_name`, `subdispo`, `number`, `message`, `response`) VALUES $shortinsert")); | ||
| 98 | $shortinsert=""; | ||
| 99 | } | ||
| 100 | } | ||
| 101 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 102 | DB::connection("conn")->disconnect(); | ||
| 103 | } | ||
| 104 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
app/Console/Commands/Smsreport.php
0 → 100644
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | |||
| 15 | use Illuminate\Database\Schema\Blueprint; | ||
| 16 | |||
| 17 | class Smsreport extends Command { | ||
| 18 | |||
| 19 | /** | ||
| 20 | * The console command name. | ||
| 21 | * | ||
| 22 | * @var string | ||
| 23 | */ | ||
| 24 | protected $signature = 'Smsreport'; | ||
| 25 | |||
| 26 | /** | ||
| 27 | * The console command description. | ||
| 28 | * | ||
| 29 | * @var string | ||
| 30 | */ | ||
| 31 | protected $description = 'App Main Daily Task for Smsreport'; | ||
| 32 | |||
| 33 | /** | ||
| 34 | * Execute the console command. | ||
| 35 | * | ||
| 36 | * @return mixed | ||
| 37 | */ | ||
| 38 | public function handle() | ||
| 39 | { | ||
| 40 | $nowts=time(); | ||
| 41 | $date=date('F_Y'); | ||
| 42 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 43 | |||
| 44 | $logdate=strtotime('0 day'); | ||
| 45 | |||
| 46 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 47 | $central_ip=env('central_ip'); | ||
| 48 | $server_ip=env('app_ip'); | ||
| 49 | $calllog_report = "calllog_report_".$date; | ||
| 50 | $conn = array( | ||
| 51 | 'driver' => 'mysql', | ||
| 52 | 'host' => $central_ip, | ||
| 53 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 54 | 'username' => env('DB_USERNAME', 'root'), | ||
| 55 | 'password' => env('DB_PASSWORD', ''), | ||
| 56 | 'charset' => 'utf8', | ||
| 57 | 'collation' => 'utf8_unicode_ci', | ||
| 58 | 'prefix' => '', | ||
| 59 | 'options' => array( | ||
| 60 | PDO::ATTR_TIMEOUT => 5, | ||
| 61 | ), | ||
| 62 | ); | ||
| 63 | Config::set("database.connections.conn", $conn); | ||
| 64 | |||
| 65 | DB::connection("conn")->getDatabaseName(); | ||
| 66 | |||
| 67 | $serverclist=DB::connection("conn")->select(DB::raw("select id from server_details where server_ip='$server_ip'")); | ||
| 68 | $server_id=$serverclist[0]->id; | ||
| 69 | if($server_id<10){ | ||
| 70 | $server_id="0".$server_id; | ||
| 71 | } | ||
| 72 | |||
| 73 | |||
| 74 | $maxid=DB::connection("conn")->select(DB::raw("SELECT max(sms_id) as maxid from sms_report where server='$server_id'")); | ||
| 75 | |||
| 76 | $maxids=$maxid[0]->maxid; | ||
| 77 | |||
| 78 | //$alist=DB::select(DB::raw("SELECT * from crmcalls where id>'$maxids' and created_at<'".date("Y-m-d H:i:s",$logdate-(60*60))."'")); | ||
| 79 | $alist=DB::select(DB::raw("SELECT * from sms_log where id>'$maxids'")); | ||
| 80 | $countnumber=count($alist); | ||
| 81 | $finalnumber=$countnumber/50; | ||
| 82 | $finalnumber=floor($finalnumber); | ||
| 83 | $datainser=''; | ||
| 84 | $iii=1; | ||
| 85 | $kkk=1; | ||
| 86 | $shortinsert=""; | ||
| 87 | $userarr=array(); | ||
| 88 | foreach($alist as $aline) | ||
| 89 | { | ||
| 90 | |||
| 91 | $server = $server_id; | ||
| 92 | $sms_id = $aline->id; | ||
| 93 | $created_at = $aline->created_at; | ||
| 94 | $message_time = date("Y-m-d H:i:s",strtotime($aline->created_at)+330*60); | ||
| 95 | $server_ip = $aline->server_ip; | ||
| 96 | $call_id = $aline->call_id; | ||
| 97 | $agent_name = $aline->agent_name; | ||
| 98 | $subdispo = $aline->subdispo; | ||
| 99 | $number = $aline->number; | ||
| 100 | $message = $aline->message; | ||
| 101 | $response = $aline->response; | ||
| 102 | |||
| 103 | $shortinsert.="('$server', '$sms_id','$created_at', '$message_time', '$server_ip', '$call_id', '$agent_name', '$subdispo', '$number', '$message', '$response'),"; | ||
| 104 | |||
| 105 | if($kkk<=$finalnumber){ | ||
| 106 | if($iii%50==0){ | ||
| 107 | |||
| 108 | $shortinsert=substr($shortinsert,0,-1); | ||
| 109 | DB::connection("conn")->insert(DB::raw("INSERT INTO sms_report (`server`, `sms_id`, `created_at`, `message_time`, `server_ip`, `call_id`, `agent_name`, `subdispo`, `number`, `message`, `response`) VALUES $shortinsert")); | ||
| 110 | $kkk++; | ||
| 111 | } | ||
| 112 | }else{ | ||
| 113 | DB::connection("conn")->insert(DB::raw("INSERT INTO sms_report set server='$server', sms_id='$sms_id', created_at='$created_at', message_time='$message_time', server_ip='$server_ip', call_id='$call_id', agent_name='$agent_name', subdispo='$subdispo', number='$number', message='$message', response='$response'")); | ||
| 114 | |||
| 115 | } | ||
| 116 | if($iii%50==0){ | ||
| 117 | $shortinsert=""; | ||
| 118 | } | ||
| 119 | $iii++; | ||
| 120 | |||
| 121 | //$update=DB::connection("conn")->select(DB::raw("SELECT crmcall_id as updateid from $calllog_report where server='$server_id' and `state` IN ('DialBegin','DialEnd')")); | ||
| 122 | //echo $update; | ||
| 123 | //DB::update(DB::raw("UPDATE crmcalls set call_flag='C' where id=$crmcall_id")); | ||
| 124 | } | ||
| 125 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 126 | DB::connection("conn")->disconnect(); | ||
| 127 | } | ||
| 128 | |||
| 129 | } | ||
| 130 | |||
| 131 | |||
| 132 |
app/Console/Commands/UpdateAvgRingSec.php
0 → 100755
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | use App\Models\Notification; | ||
| 15 | use App\Jobs\KHRMSLib; | ||
| 16 | |||
| 17 | use Input; | ||
| 18 | use App\Models\Sipid; | ||
| 19 | use App\Models\Kqueue; | ||
| 20 | use App\Models\Dialline; | ||
| 21 | use App\Models\Session; | ||
| 22 | use App\Models\Cutoff; | ||
| 23 | |||
| 24 | use Log; | ||
| 25 | use Illuminate\Database\Schema\Blueprint; | ||
| 26 | |||
| 27 | class UpdateAvgRingSec extends Command { | ||
| 28 | |||
| 29 | /** | ||
| 30 | * The console command name. | ||
| 31 | * | ||
| 32 | * @var string | ||
| 33 | */ | ||
| 34 | protected $signature = 'UpdateAvgRingSec'; | ||
| 35 | |||
| 36 | /** | ||
| 37 | * The console command description. | ||
| 38 | * | ||
| 39 | * @var string | ||
| 40 | */ | ||
| 41 | protected $description = 'Update Avg Call Ring Sec Of Last 50 Calls'; | ||
| 42 | |||
| 43 | /** | ||
| 44 | * Execute the console command. | ||
| 45 | * | ||
| 46 | * @return mixed | ||
| 47 | */ | ||
| 48 | public function handle() | ||
| 49 | { | ||
| 50 | $avgcallsecObj = CRMCall::select(DB::Raw('ROUND((avg(callsec))/1000) as avgcallsec'))->limit(50)->where("type","!=","Inbound")->first(); | ||
| 51 | |||
| 52 | if(count($avgcallsecObj)) | ||
| 53 | { | ||
| 54 | Cutoff::where('user_id', '!=', "")->update( | ||
| 55 | ['avg_ring' => $avgcallsecObj->avgcallsec | ||
| 56 | ]); | ||
| 57 | } | ||
| 58 | } | ||
| 59 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
app/Console/Commands/UserlogOne.php
0 → 100644
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | use DB; | ||
| 5 | use Config; | ||
| 6 | |||
| 7 | use App\Models\User; | ||
| 8 | use App\Models\Accesslog; | ||
| 9 | |||
| 10 | use App\Models\CRMCall; | ||
| 11 | use Schema; | ||
| 12 | use PDO; | ||
| 13 | |||
| 14 | use Illuminate\Database\Schema\Blueprint; | ||
| 15 | |||
| 16 | class UserlogOne extends Command { | ||
| 17 | |||
| 18 | /** | ||
| 19 | * The console command name. | ||
| 20 | * | ||
| 21 | * @var string | ||
| 22 | */ | ||
| 23 | protected $signature = 'UserlogOne'; | ||
| 24 | |||
| 25 | /** | ||
| 26 | * The console command description. | ||
| 27 | * | ||
| 28 | * @var string | ||
| 29 | */ | ||
| 30 | protected $description = 'UserlogOne'; | ||
| 31 | |||
| 32 | /** | ||
| 33 | * Execute the console command. | ||
| 34 | * | ||
| 35 | * @return mixed | ||
| 36 | */ | ||
| 37 | public function handle() | ||
| 38 | { | ||
| 39 | $nowts=time(); | ||
| 40 | echo "\n".date('Y-m-d')."\n"; | ||
| 41 | |||
| 42 | if(env('app_ip')=="10.125.14.127") | ||
| 43 | { | ||
| 44 | |||
| 45 | |||
| 46 | $offline=array(); | ||
| 47 | $arr=Config::get("app.hdfcnodes"); | ||
| 48 | $logdate=strtotime('-1 day'); | ||
| 49 | $userlogsTable = "userlogs_".date("d_m_Y",$logdate); | ||
| 50 | //echo "\n".$userlogsTable."\n"; | ||
| 51 | |||
| 52 | //$slist=DB::select(DB::raw("select * from server_details where type='COP' and id!='32'")); | ||
| 53 | $slist=DB::select(DB::raw("select * from server_details where id>11")); | ||
| 54 | $server_ip=''; | ||
| 55 | $std_code=''; | ||
| 56 | $conn=''; | ||
| 57 | foreach($slist as $sline) | ||
| 58 | { | ||
| 59 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 60 | $server_ip=$sline->server_ip; | ||
| 61 | $server_id=$sline->id; | ||
| 62 | $std_code=$sline->std_code; | ||
| 63 | |||
| 64 | $conn = array( | ||
| 65 | 'driver' => 'mysql', | ||
| 66 | 'host' => $server_ip, | ||
| 67 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 68 | 'username' => env('DB_USERNAME', 'root'), | ||
| 69 | 'password' => env('DB_PASSWORD', ''), | ||
| 70 | 'charset' => 'utf8', | ||
| 71 | 'collation' => 'utf8_unicode_ci', | ||
| 72 | 'prefix' => '', | ||
| 73 | 'options' => array( | ||
| 74 | PDO::ATTR_TIMEOUT => 5, | ||
| 75 | ), | ||
| 76 | ); | ||
| 77 | Config::set("database.connections.conn", $conn); | ||
| 78 | |||
| 79 | |||
| 80 | if(DB::connection("conn")->getDatabaseName()) | ||
| 81 | { | ||
| 82 | |||
| 83 | echo ",".$server_ip; | ||
| 84 | |||
| 85 | $i=0; | ||
| 86 | |||
| 87 | $ulist=DB::connection("conn")->select(DB::raw("select * from users WHERE 1")); | ||
| 88 | foreach($ulist as $uline) { | ||
| 89 | $users[$uline->id] = $uline->username; | ||
| 90 | } | ||
| 91 | |||
| 92 | if($alist=DB::connection("conn")->select(DB::raw("select * from userlogs WHERE created_at>'".date("Y-m-d",$logdate)."' and created_at<'".date("Y-m-d",$logdate+24*60*60)."'"))){ | ||
| 93 | |||
| 94 | //if($alist=DB::connection("conn")->select(DB::raw("select * from userlogs WHERE created_at>'2017-09-01' and created_at<'2017-10-01'"))){ | ||
| 95 | |||
| 96 | foreach($alist as $aline) { | ||
| 97 | |||
| 98 | $i++; | ||
| 99 | $global_id = $server_id . $i; | ||
| 100 | |||
| 101 | $rowdata = array('server'=>$server_id,'server_ip'=>$server_ip,'global_id'=>$global_id,'id'=>$aline->id, | ||
| 102 | 'created_at'=>$aline->created_at,'updated_at'=>$aline->updated_at,'user_id'=>$aline->user_id,'user'=>$users[$aline->user_id], | ||
| 103 | 'startdate'=>$aline->startdate,'starttime'=>$aline->starttime,'enddate'=>$aline->enddate,'endtime'=>$aline->endtime, | ||
| 104 | 'durationsec'=>$aline->durationsec,'data'=>$aline->data,'group'=>$aline->group,'login'=>'','dialnext'=>'','dialnext-agentbriefing'=>'','dialnext-downtime'=>'','dialnext-floorannouncements'=>'','dialnext-incoming'=>'','dialnext-lunchbreak'=>'','dialnext-manual'=>'','dialnext-notready'=>'','dialnext-qualityfeedback'=>'','dialnext-teabreak'=>'','dialnext-teammeeting'=>'','dialnext-utilitybreak'=>'','manual'=>'','manual-agentbriefing'=>'','manual-agentbriefing'=>'','manual-downtime'=>'','manual-floorannouncements'=>'','manual-incoming'=>'','manual-lunchbreak'=>'','manual-manual'=>'','manual-notready'=>'','manual-qualityfeedback'=>'','manual-teabreak'=>'','manual-teammeeting'=>'','manual-utilitybreak'=>'','paused'=>'','paused-agentbriefing'=>'','paused-downtime'=>'','paused-floorannouncements'=>'','paused-incoming'=>'','paused-lunchbreak'=>'','paused-manual'=>'','paused-notready'=>'','paused-qualityfeedback'=>'','paused-teabreak'=>'','paused-teammeeting'=>'','paused-utilitybreak'=>'','paused-autowrapup'=>'','paused-wrapup'=>'','progressive'=>'','progressive-agentbriefing'=>'','progressive-agentbriefing'=>'','progressive-downtime'=>'','progressive-floorannouncements'=>'','progressive-incoming'=>'','progressive-lunchbreak'=>'','progressive-manual'=>'','progressive-notready'=>'','progressive-qualityfeedback'=>'','progressive-teabreak'=>'','progressive-teammeeting'=>'','progressive-utilitybreak'=>'','ready-incoming'=>'' | ||
| 105 | ); | ||
| 106 | |||
| 107 | $data=json_decode($aline->data,true); | ||
| 108 | |||
| 109 | foreach($data as $sipid=>$sdata) | ||
| 110 | { | ||
| 111 | $prets= isset($sdata[1]) ? $sdata[1] : (strtotime($aline->startdate . " " . $aline->starttime)+19600)*1000; | ||
| 112 | if(isset($sdata['states'])) | ||
| 113 | { | ||
| 114 | $previous="login"; | ||
| 115 | foreach($sdata['states'] as $fts=>$states) | ||
| 116 | { | ||
| 117 | if($states[0] != 1) | ||
| 118 | { | ||
| 119 | $rowdata[$previous] +=round(($fts-$prets)/1000,2); | ||
| 120 | |||
| 121 | $previous = (trim($states[1]) != '') ? strtolower($states[0]."-".$states[1]) : strtolower($states[0]); | ||
| 122 | $prets=$fts; | ||
| 123 | } | ||
| 124 | |||
| 125 | } | ||
| 126 | $rowdata[$previous] += round(($sdata['ts']-$prets)/1000,2); | ||
| 127 | } | ||
| 128 | } | ||
| 129 | $rowdata["login"] = $aline->durationsec; | ||
| 130 | |||
| 131 | $rowdata['not-ready']=$rowdata['paused-agentbriefing']+$rowdata['paused-autowrapup']+$rowdata['paused-downtime']+$rowdata['paused-floorannouncements']+$rowdata['paused-lunchbreak']+$rowdata['paused-notready']+$rowdata['paused-qualityfeedback']+$rowdata['paused-teammeeting']+$rowdata['paused-teabreak']+$rowdata['paused-utilitybreak']; | ||
| 132 | |||
| 133 | |||
| 134 | $key_value = ''; | ||
| 135 | foreach($rowdata AS $key=>$value) { | ||
| 136 | if($key != 1) | ||
| 137 | $key_value .= "`$key` = '$value', "; | ||
| 138 | } | ||
| 139 | |||
| 140 | $startTime=$aline->startdate." ".$aline->starttime; | ||
| 141 | $endTime=$aline->enddate." ".$aline->endtime; | ||
| 142 | |||
| 143 | $crmCalls=DB::connection("conn")->select(DB::raw("select user_id,type,ts_Wait,ts_Call,ts_Talk,ts_Recstart,ts_Recend,ts_Dispo,ts_Close from crmcalls WHERE updated_at>='".$startTime."' and updated_at<'".$endTime."' and user_id='".$aline->user_id."'")); | ||
| 144 | |||
| 145 | $ts_Wait=0;$ts_Call=0;$ts_Talk=0;$ts_Dispo=0; | ||
| 146 | $progTs_Wait=0;$progTs_Call=0;$progTs_Talk=0;$progTs_Dispo=0; | ||
| 147 | $manTs_Wait=0;$manTs_Call=0;$manTs_Talk=0;$manTs_Dispo=0; | ||
| 148 | $inbTs_Wait=0;$inbTs_Call=0;$inbTs_Talk=0;$inbTs_Dispo=0; | ||
| 149 | $tt_prog=0;$tt_man=0;$tt_inb=0; | ||
| 150 | |||
| 151 | if($crmCalls!=null){ | ||
| 152 | foreach($crmCalls as $crmCall){ | ||
| 153 | $ts_Wait += round(($crmCall->ts_Call - $crmCall->ts_Wait)/1000,2); | ||
| 154 | $ts_Call += round(($crmCall->ts_Talk - $crmCall->ts_Call)/1000,2); | ||
| 155 | $ts_Talk += round(($crmCall->ts_Dispo - $crmCall->ts_Talk)/1000,2); | ||
| 156 | $ts_Dispo += round(($crmCall->ts_Close - $crmCall->ts_Dispo)/1000,2); | ||
| 157 | |||
| 158 | if($crmCall->type == 'Progressive') | ||
| 159 | { | ||
| 160 | $progTs_Wait += round(($crmCall->ts_Call - $crmCall->ts_Wait)/1000,2); | ||
| 161 | $progTs_Call += round(($crmCall->ts_Talk - $crmCall->ts_Call)/1000,2); | ||
| 162 | $progTs_Talk += round(($crmCall->ts_Dispo - $crmCall->ts_Talk)/1000,2); | ||
| 163 | $progTs_Dispo += round(($crmCall->ts_Close - $crmCall->ts_Dispo)/1000,2); | ||
| 164 | } | ||
| 165 | |||
| 166 | if($crmCall->type == 'Manual') | ||
| 167 | { | ||
| 168 | $manTs_Wait += round(($crmCall->ts_Call - $crmCall->ts_Wait)/1000,2); | ||
| 169 | $manTs_Call += round(($crmCall->ts_Talk - $crmCall->ts_Call)/1000,2); | ||
| 170 | $manTs_Talk += round(($crmCall->ts_Dispo - $crmCall->ts_Talk)/1000,2); | ||
| 171 | $manTs_Dispo += round(($crmCall->ts_Close - $crmCall->ts_Dispo)/1000,2); | ||
| 172 | } | ||
| 173 | |||
| 174 | if($crmCall->type == 'Inbound') | ||
| 175 | { | ||
| 176 | $inbTs_Wait += round(($crmCall->ts_Call - $crmCall->ts_Wait)/1000,2); | ||
| 177 | $inbTs_Call += round(($crmCall->ts_Talk - $crmCall->ts_Call)/1000,2); | ||
| 178 | $inbTs_Talk += round(($crmCall->ts_Dispo - $crmCall->ts_Talk)/1000,2); | ||
| 179 | $inbTs_Dispo += round(($crmCall->ts_Close - $crmCall->ts_Dispo)/1000,2); | ||
| 180 | } | ||
| 181 | } | ||
| 182 | } | ||
| 183 | $tt_prog = $progTs_Wait + $progTs_Call + $progTs_Talk + $progTs_Dispo; | ||
| 184 | $tt_man = $manTs_Wait + $manTs_Call + $manTs_Talk + $manTs_Dispo; | ||
| 185 | $tt_inb = $inbTs_Wait + $inbTs_Call + $inbTs_Talk + $inbTs_Dispo; | ||
| 186 | $prod_TOS = $ts_Wait + $ts_Call + $ts_Talk + $ts_Dispo; | ||
| 187 | |||
| 188 | $key_value .= "`tt_prog` = '$tt_prog', "; | ||
| 189 | $key_value .= "`tt_man` = '$tt_man', "; | ||
| 190 | $key_value .= "`tt_inb` = '$tt_inb', "; | ||
| 191 | $key_value .= "`ts_Wait` = '$ts_Wait', "; | ||
| 192 | $key_value .= "`ts_Call` = '$ts_Call', "; | ||
| 193 | $key_value .= "`ts_Talk` = '$ts_Talk', "; | ||
| 194 | $key_value .= "`ts_Dispo` = '$ts_Dispo', "; | ||
| 195 | $key_value .= "`progts_Wait` = '$progTs_Wait', "; | ||
| 196 | $key_value .= "`progts_Call` = '$progTs_Call', "; | ||
| 197 | $key_value .= "`progts_Talk` = '$progTs_Talk', "; | ||
| 198 | $key_value .= "`progts_Dispo` = '$progTs_Dispo', "; | ||
| 199 | $key_value .= "`mants_Wait` = '$manTs_Wait', "; | ||
| 200 | $key_value .= "`mants_Call` = '$manTs_Call', "; | ||
| 201 | $key_value .= "`mants_Talk` = '$manTs_Talk', "; | ||
| 202 | $key_value .= "`mants_Dispo` = '$manTs_Dispo', "; | ||
| 203 | $key_value .= "`incts_Wait` = '$inbTs_Wait', "; | ||
| 204 | $key_value .= "`incts_Call` = '$inbTs_Call', "; | ||
| 205 | $key_value .= "`incts_Talk` = '$inbTs_Talk', "; | ||
| 206 | $key_value .= "`incts_Dispo` = '$inbTs_Dispo', "; | ||
| 207 | $key_value .= "`prod_tos` = '$prod_TOS', "; | ||
| 208 | |||
| 209 | $key_value = substr($key_value, 0, -2); | ||
| 210 | $userlogsTable = "userlogs_".date("d_m_Y",$logdate); | ||
| 211 | DB::insert(DB::raw("INSERT INTO ".$userlogsTable." SET $key_value")); | ||
| 212 | //DB::insert(DB::raw("INSERT INTO userlogs_050218 SET $key_value")); | ||
| 213 | } | ||
| 214 | DB::connection("conn")->disconnect(); | ||
| 215 | }else{ | ||
| 216 | DB::connection("conn")->disconnect(); | ||
| 217 | } | ||
| 218 | |||
| 219 | } | ||
| 220 | } | ||
| 221 | } | ||
| 222 | } | ||
| 223 | } |
app/Console/Commands/Userlog_data.php
0 → 100755
This diff is collapsed.
Click to expand it.
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | use DB; | ||
| 5 | use Config; | ||
| 6 | |||
| 7 | use App\Models\User; | ||
| 8 | use App\Models\Accesslog; | ||
| 9 | |||
| 10 | use App\Models\CRMCall; | ||
| 11 | use Schema; | ||
| 12 | use PDO; | ||
| 13 | |||
| 14 | use Illuminate\Database\Schema\Blueprint; | ||
| 15 | |||
| 16 | class Userlog_datavalidation extends Command { | ||
| 17 | |||
| 18 | /** | ||
| 19 | * The console command name. | ||
| 20 | * | ||
| 21 | * @var string | ||
| 22 | */ | ||
| 23 | protected $signature = 'Userlog_datavalidation'; | ||
| 24 | |||
| 25 | /** | ||
| 26 | * The console command description. | ||
| 27 | * | ||
| 28 | * @var string | ||
| 29 | */ | ||
| 30 | protected $description = 'Userlog_datavalidation'; | ||
| 31 | |||
| 32 | /** | ||
| 33 | * Execute the console command. | ||
| 34 | * | ||
| 35 | * @return mixed | ||
| 36 | */ | ||
| 37 | public function handle() | ||
| 38 | { | ||
| 39 | $nowts=time(); | ||
| 40 | echo "\n".date('Y-m-d')."\n"; | ||
| 41 | |||
| 42 | $logdate=strtotime('-1 day'); | ||
| 43 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 44 | $server_ip=env('app_ip'); | ||
| 45 | $central_ip=env('central_ip'); | ||
| 46 | |||
| 47 | $conn = array( | ||
| 48 | 'driver' => 'mysql', | ||
| 49 | 'host' => $central_ip, | ||
| 50 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 51 | 'username' => env('DB_USERNAME', 'root'), | ||
| 52 | 'password' => env('DB_PASSWORD', ''), | ||
| 53 | 'charset' => 'utf8', | ||
| 54 | 'collation' => 'utf8_unicode_ci', | ||
| 55 | 'prefix' => '', | ||
| 56 | 'options' => array( | ||
| 57 | PDO::ATTR_TIMEOUT => 5, | ||
| 58 | ), | ||
| 59 | ); | ||
| 60 | Config::set("database.connections.conn", $conn); | ||
| 61 | if(DB::connection("conn")->getDatabaseName()) | ||
| 62 | { | ||
| 63 | $serverclist=DB::connection("conn")->select(DB::raw("select id from server_details where server_ip='$server_ip'")); | ||
| 64 | $server_id=$serverclist[0]->id; | ||
| 65 | if($server_id<10){ | ||
| 66 | $server_id="0".$server_id; | ||
| 67 | } | ||
| 68 | |||
| 69 | |||
| 70 | $i=0; | ||
| 71 | |||
| 72 | |||
| 73 | $ulist=DB::select(DB::raw("select * from users WHERE 1")); | ||
| 74 | foreach($ulist as $uline) { | ||
| 75 | $users[$uline->id] = $uline->username; | ||
| 76 | } | ||
| 77 | if($alist=DB::select(DB::raw("select * from userlogs WHERE created_at>'".date("Y-m-d",$logdate)."' and created_at<'".date("Y-m-d",$logdate+24*60*60)."'"))){ | ||
| 78 | |||
| 79 | |||
| 80 | foreach($alist as $aline) { | ||
| 81 | $i++; | ||
| 82 | $global_id = $server_id . $i; | ||
| 83 | if($aline->enddate=='0000-00-00'|| $aline->endtime=='00:00:00' || $aline->durationsec=='0') | ||
| 84 | { | ||
| 85 | $enddatetime=date("Y-m-d H:i:s",strtotime($aline->updated_at)); | ||
| 86 | $enddate=explode(" ",$enddatetime)[0]; | ||
| 87 | $endtime=explode(" ",$enddatetime)[1]; | ||
| 88 | $durationsec=date("Y-m-d H:i:s",strtotime($endtime-$aline->starttime)); | ||
| 89 | } | ||
| 90 | else | ||
| 91 | { | ||
| 92 | $enddate=$aline->enddate; | ||
| 93 | $endtime=$aline->endtime; | ||
| 94 | $durationsec=$aline->durationsec; | ||
| 95 | } | ||
| 96 | |||
| 97 | $rowdata = array('server'=>$server_id,'server_ip'=>$server_ip,'global_id'=>$global_id,'id'=>$aline->id, | ||
| 98 | 'created_at'=>$aline->created_at,'updated_at'=>$aline->updated_at,'user_id'=>$aline->user_id,'user'=>$users[$aline->user_id], | ||
| 99 | 'startdate'=>$aline->startdate,'starttime'=>$aline->starttime,'enddate'=>$enddate,'endtime'=>$endtime, | ||
| 100 | 'durationsec'=>$durationsec,'data'=>$aline->data,'group'=>$aline->group,'login'=>'','dialnext'=>'','dialnext-agentbriefing'=>'','dialnext-downtime'=>'','dialnext-floorannouncements'=>'','dialnext-incoming'=>'','dialnext-lunchbreak'=>'','dialnext-manual'=>'','dialnext-notready'=>'','dialnext-qualityfeedback'=>'','dialnext-teabreak'=>'','dialnext-teammeeting'=>'','dialnext-utilitybreak'=>'','manual'=>'','manual-agentbriefing'=>'','manual-agentbriefing'=>'','manual-downtime'=>'','manual-floorannouncements'=>'','manual-incoming'=>'','manual-lunchbreak'=>'','manual-manual'=>'','manual-notready'=>'','manual-qualityfeedback'=>'','manual-teabreak'=>'','manual-teammeeting'=>'','manual-utilitybreak'=>'','paused'=>'','paused-agentbriefing'=>'','paused-downtime'=>'','paused-floorannouncements'=>'','paused-incoming'=>'','paused-lunchbreak'=>'','paused-manual'=>'','paused-notready'=>'','paused-qualityfeedback'=>'','paused-teabreak'=>'','paused-teammeeting'=>'','paused-utilitybreak'=>'','paused-autowrapup'=>'','paused-wrapup'=>'','progressive'=>'','progressive-agentbriefing'=>'','progressive-agentbriefing'=>'','progressive-downtime'=>'','progressive-floorannouncements'=>'','progressive-incoming'=>'','progressive-lunchbreak'=>'','progressive-manual'=>'','progressive-notready'=>'','progressive-qualityfeedback'=>'','progressive-teabreak'=>'','progressive-teammeeting'=>'','progressive-utilitybreak'=>'','ready-incoming'=>'' | ||
| 101 | ); | ||
| 102 | |||
| 103 | $data=json_decode($aline->data,true); | ||
| 104 | foreach($data as $sipid=>$sdata) | ||
| 105 | { | ||
| 106 | $prets= isset($sdata[1]) ? $sdata[1] : (strtotime($aline->startdate . " " . $aline->starttime)+19600)*1000; | ||
| 107 | if(isset($sdata['states'])) | ||
| 108 | { | ||
| 109 | $previous="login"; | ||
| 110 | foreach($sdata['states'] as $fts=>$states) | ||
| 111 | { | ||
| 112 | if($states[0] != 1) | ||
| 113 | { | ||
| 114 | $rowdata[$previous] +=round(($fts-$prets)/1000,2); | ||
| 115 | |||
| 116 | $previous = (trim($states[1]) != '') ? strtolower($states[0]."-".$states[1]) : strtolower($states[0]); | ||
| 117 | $prets=$fts; | ||
| 118 | } | ||
| 119 | |||
| 120 | } | ||
| 121 | $rowdata[$previous] += round(($sdata['ts']-$prets)/1000,2); | ||
| 122 | } | ||
| 123 | } | ||
| 124 | $rowdata["login"] = $aline->durationsec; | ||
| 125 | |||
| 126 | $rowdata['not-ready']=$rowdata['paused-agentbriefing']+$rowdata['paused-autowrapup']+$rowdata['paused-downtime']+$rowdata['paused-floorannouncements']+$rowdata['paused-lunchbreak']+$rowdata['paused-notready']+$rowdata['paused-qualityfeedback']+$rowdata['paused-teammeeting']+$rowdata['paused-teabreak']+$rowdata['paused-utilitybreak']; | ||
| 127 | |||
| 128 | |||
| 129 | $key_value = ''; | ||
| 130 | |||
| 131 | |||
| 132 | $startTime=$aline->startdate." ".$aline->starttime; | ||
| 133 | $endTime=$aline->enddate." ".$aline->endtime; | ||
| 134 | |||
| 135 | $crmCalls=DB::select(DB::raw("select user_id,type,ts_Wait,ts_Call,ts_Talk,ts_Recstart,ts_Recend,ts_Dispo,ts_Close from crmcalls WHERE updated_at>='".$startTime."' and updated_at<'".$endTime."' and user_id='".$aline->user_id."'")); | ||
| 136 | |||
| 137 | $ts_Wait=0;$ts_Call=0;$ts_Talk=0;$ts_Dispo=0; | ||
| 138 | $progTs_Wait=0;$progTs_Call=0;$progTs_Talk=0;$progTs_Dispo=0; | ||
| 139 | $manTs_Wait=0;$manTs_Call=0;$manTs_Talk=0;$manTs_Dispo=0; | ||
| 140 | $inbTs_Wait=0;$inbTs_Call=0;$inbTs_Talk=0;$inbTs_Dispo=0; | ||
| 141 | $tt_prog=0;$tt_man=0;$tt_inb=0; | ||
| 142 | |||
| 143 | if($crmCalls!=null){ | ||
| 144 | foreach($crmCalls as $crmCall){ | ||
| 145 | $ts_Wait += round(($crmCall->ts_Call - $crmCall->ts_Wait)/1000,2); | ||
| 146 | $ts_Call += round(($crmCall->ts_Talk - $crmCall->ts_Call)/1000,2); | ||
| 147 | $ts_Talk += round(($crmCall->ts_Dispo - $crmCall->ts_Talk)/1000,2); | ||
| 148 | $ts_Dispo += round(($crmCall->ts_Close - $crmCall->ts_Dispo)/1000,2); | ||
| 149 | |||
| 150 | if($crmCall->type == 'Progressive') | ||
| 151 | { | ||
| 152 | $progTs_Wait += round(($crmCall->ts_Call - $crmCall->ts_Wait)/1000,2); | ||
| 153 | $progTs_Call += round(($crmCall->ts_Talk - $crmCall->ts_Call)/1000,2); | ||
| 154 | $progTs_Talk += round(($crmCall->ts_Dispo - $crmCall->ts_Talk)/1000,2); | ||
| 155 | $progTs_Dispo += round(($crmCall->ts_Close - $crmCall->ts_Dispo)/1000,2); | ||
| 156 | } | ||
| 157 | |||
| 158 | if($crmCall->type == 'Manual') | ||
| 159 | { | ||
| 160 | $manTs_Wait += round(($crmCall->ts_Call - $crmCall->ts_Wait)/1000,2); | ||
| 161 | $manTs_Call += round(($crmCall->ts_Talk - $crmCall->ts_Call)/1000,2); | ||
| 162 | $manTs_Talk += round(($crmCall->ts_Dispo - $crmCall->ts_Talk)/1000,2); | ||
| 163 | $manTs_Dispo += round(($crmCall->ts_Close - $crmCall->ts_Dispo)/1000,2); | ||
| 164 | } | ||
| 165 | |||
| 166 | if($crmCall->type == 'Inbound') | ||
| 167 | { | ||
| 168 | $inbTs_Wait += round(($crmCall->ts_Call - $crmCall->ts_Wait)/1000,2); | ||
| 169 | $inbTs_Call += round(($crmCall->ts_Talk - $crmCall->ts_Call)/1000,2); | ||
| 170 | $inbTs_Talk += round(($crmCall->ts_Dispo - $crmCall->ts_Talk)/1000,2); | ||
| 171 | $inbTs_Dispo += round(($crmCall->ts_Close - $crmCall->ts_Dispo)/1000,2); | ||
| 172 | } | ||
| 173 | } | ||
| 174 | } | ||
| 175 | |||
| 176 | $tt_prog = $progTs_Wait + $progTs_Call + $progTs_Talk + $progTs_Dispo; | ||
| 177 | $tt_man = $manTs_Wait + $manTs_Call + $manTs_Talk + $manTs_Dispo; | ||
| 178 | $tt_inb = $inbTs_Wait + $inbTs_Call + $inbTs_Talk + $inbTs_Dispo; | ||
| 179 | |||
| 180 | $total_idealtime=$rowdata["login"]-($rowdata['not-ready']+$tt_prog+$tt_man+$tt_inb); | ||
| 181 | |||
| 182 | echo "notready time-----idle----".$total_idealtime; | ||
| 183 | |||
| 184 | foreach($rowdata AS $key=>$value) { | ||
| 185 | if($key != 1) | ||
| 186 | $key_value .= "`$key` = '$value', "; | ||
| 187 | } | ||
| 188 | $prod_TOS = $ts_Wait + $ts_Call + $ts_Talk + $ts_Dispo; | ||
| 189 | |||
| 190 | $key_value .= "`tt_prog` = '$tt_prog', "; | ||
| 191 | $key_value .= "`tt_man` = '$tt_man', "; | ||
| 192 | $key_value .= "`tt_inb` = '$tt_inb', "; | ||
| 193 | |||
| 194 | $key_value .= "`ts_Wait` = '$ts_Wait', "; | ||
| 195 | $key_value .= "`ts_Call` = '$ts_Call', "; | ||
| 196 | $key_value .= "`ts_Talk` = '$ts_Talk', "; | ||
| 197 | $key_value .= "`ts_Dispo` = '$ts_Dispo', "; | ||
| 198 | $key_value .= "`progts_Wait` = '$progTs_Wait', "; | ||
| 199 | $key_value .= "`progts_Call` = '$progTs_Call', "; | ||
| 200 | $key_value .= "`progts_Talk` = '$progTs_Talk', "; | ||
| 201 | $key_value .= "`progts_Dispo` = '$progTs_Dispo', "; | ||
| 202 | $key_value .= "`mants_Wait` = '$manTs_Wait', "; | ||
| 203 | $key_value .= "`mants_Call` = '$manTs_Call', "; | ||
| 204 | $key_value .= "`mants_Talk` = '$manTs_Talk', "; | ||
| 205 | $key_value .= "`mants_Dispo` = '$manTs_Dispo', "; | ||
| 206 | $key_value .= "`incts_Wait` = '$inbTs_Wait', "; | ||
| 207 | $key_value .= "`incts_Call` = '$inbTs_Call', "; | ||
| 208 | $key_value .= "`incts_Talk` = '$inbTs_Talk', "; | ||
| 209 | $key_value .= "`incts_Dispo` = '$inbTs_Dispo', "; | ||
| 210 | $key_value .= "`prod_tos` = '$prod_TOS', "; | ||
| 211 | $key_value .= "`totalidealtime` = '$total_idealtime', "; | ||
| 212 | |||
| 213 | |||
| 214 | |||
| 215 | $key_value = substr($key_value, 0, -2); | ||
| 216 | |||
| 217 | //$userlogsTable = "userlogs_".date("d_m_Y",$logdate); | ||
| 218 | $userlogsTable = "userlogs_datavalid"; | ||
| 219 | DB::connection("conn")->insert(DB::raw("INSERT INTO ".$userlogsTable." SET $key_value")); | ||
| 220 | |||
| 221 | } | ||
| 222 | |||
| 223 | } | ||
| 224 | } | ||
| 225 | } | ||
| 226 | } |
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | use DB; | ||
| 5 | use Config; | ||
| 6 | |||
| 7 | use App\Models\User; | ||
| 8 | use App\Models\Accesslog; | ||
| 9 | |||
| 10 | use App\Models\CRMCall; | ||
| 11 | use Schema; | ||
| 12 | use PDO; | ||
| 13 | |||
| 14 | use Illuminate\Database\Schema\Blueprint; | ||
| 15 | |||
| 16 | class dailyupload_calllog extends Command { | ||
| 17 | |||
| 18 | /** | ||
| 19 | * The console command name. | ||
| 20 | * | ||
| 21 | * @var string | ||
| 22 | */ | ||
| 23 | protected $signature = 'dailyupload_calllog'; | ||
| 24 | |||
| 25 | /** | ||
| 26 | * The console command description. | ||
| 27 | * | ||
| 28 | * @var string | ||
| 29 | */ | ||
| 30 | protected $description = 'dailyupload_calllog'; | ||
| 31 | |||
| 32 | /** | ||
| 33 | * Execute the console command. | ||
| 34 | * | ||
| 35 | * @return mixed | ||
| 36 | */ | ||
| 37 | public function handle() | ||
| 38 | { | ||
| 39 | $nowts=time(); | ||
| 40 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 41 | $logdate=strtotime('0 day'); | ||
| 42 | |||
| 43 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 44 | $server_ip=env('app_ip'); | ||
| 45 | $central_ip=env('central_ip'); | ||
| 46 | $calllog_report = "calllog_report_".date("d_m_Y",$logdate); | ||
| 47 | $created_at=date("Y-m-d H:i:s"); | ||
| 48 | |||
| 49 | $conn = array( | ||
| 50 | 'driver' => 'mysql', | ||
| 51 | 'host' => $central_ip, | ||
| 52 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 53 | 'username' => env('DB_USERNAME', 'root'), | ||
| 54 | 'password' => env('DB_PASSWORD', ''), | ||
| 55 | 'charset' => 'utf8', | ||
| 56 | 'collation' => 'utf8_unicode_ci', | ||
| 57 | 'prefix' => '', | ||
| 58 | 'options' => array( | ||
| 59 | PDO::ATTR_TIMEOUT => 5, | ||
| 60 | ), | ||
| 61 | ); | ||
| 62 | Config::set("database.connections.conn", $conn); | ||
| 63 | if(DB::connection("conn")->getDatabaseName()) | ||
| 64 | { | ||
| 65 | |||
| 66 | $serverclist=DB::connection("conn")->select(DB::raw("select id from server_details where server_ip='$server_ip'")); | ||
| 67 | $server_id=$serverclist[0]->id; | ||
| 68 | if($server_id<10){ | ||
| 69 | $server_id="0".$server_id; | ||
| 70 | } | ||
| 71 | |||
| 72 | $clist=DB::connection("conn")->select(DB::raw("select count(*) as cnt,server from $calllog_report group by server")); | ||
| 73 | $caar=[]; | ||
| 74 | foreach($clist as $cline) | ||
| 75 | { | ||
| 76 | $caar[$cline->server]= $cline->cnt; | ||
| 77 | |||
| 78 | |||
| 79 | } | ||
| 80 | $mlist=DB::select(DB::raw("select count(*) as countrecord from crmcalls where created_at>'".date("Y-m-d",$logdate)."' and created_at<'".date("Y-m-d",$logdate+24*60*60)."'")); | ||
| 81 | |||
| 82 | $location_cont='0'; | ||
| 83 | $central_cont='0'; | ||
| 84 | |||
| 85 | $location_cont=$mlist[0]->countrecord; | ||
| 86 | if(array_key_exists($server_id,$caar)){ | ||
| 87 | $central_cont=$caar[$server_id]; | ||
| 88 | }else{ | ||
| 89 | $central_cont=0; | ||
| 90 | |||
| 91 | } | ||
| 92 | $dif=($central_cont)-($mlist[0]->countrecord); | ||
| 93 | |||
| 94 | if($dif==0){ | ||
| 95 | |||
| 96 | $result="Y"; | ||
| 97 | |||
| 98 | DB::connection("conn")->insert(DB::raw("insert into dailyupload_calllog_records set created_at='$created_at',server_id='$server_id',server_ip='$server_ip',central_count='$central_cont',location_count='$location_cont',difference='$dif',result='$result'")); | ||
| 99 | |||
| 100 | }else{ | ||
| 101 | |||
| 102 | $result="N"; | ||
| 103 | DB::connection("conn")->insert(DB::raw("insert into dailyupload_calllog_records set created_at='$created_at',server_id='$server_id',server_ip='$server_ip',central_count='$central_cont',location_count='$location_cont',difference='$dif',result='$result'")); | ||
| 104 | |||
| 105 | } | ||
| 106 | |||
| 107 | DB::connection("conn")->disconnect(); | ||
| 108 | |||
| 109 | } | ||
| 110 | |||
| 111 | } | ||
| 112 | |||
| 113 | |||
| 114 | } |
app/Console/Commands/bk_records_details.php
0 → 100644
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | use DB; | ||
| 5 | use Config; | ||
| 6 | |||
| 7 | use App\Models\User; | ||
| 8 | use App\Models\Accesslog; | ||
| 9 | |||
| 10 | use App\Models\CRMCall; | ||
| 11 | use Schema; | ||
| 12 | use PDO; | ||
| 13 | |||
| 14 | use Illuminate\Database\Schema\Blueprint; | ||
| 15 | |||
| 16 | class records_details extends Command { | ||
| 17 | |||
| 18 | /** | ||
| 19 | * The console command name. | ||
| 20 | * | ||
| 21 | * @var string | ||
| 22 | */ | ||
| 23 | protected $signature = 'records_details'; | ||
| 24 | |||
| 25 | /** | ||
| 26 | * The console command description. | ||
| 27 | * | ||
| 28 | * @var string | ||
| 29 | */ | ||
| 30 | protected $description = 'records_details'; | ||
| 31 | |||
| 32 | /** | ||
| 33 | * Execute the console command. | ||
| 34 | * | ||
| 35 | * @return mixed | ||
| 36 | */ | ||
| 37 | public function handle() | ||
| 38 | { | ||
| 39 | $nowts=time(); | ||
| 40 | echo "\n".date('Y-m-d')."\n"; | ||
| 41 | $server_ip=env('app_ip'); | ||
| 42 | $central_ip=env('central_ip'); | ||
| 43 | $conn=''; | ||
| 44 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 45 | |||
| 46 | $conn = array( | ||
| 47 | 'driver' => 'mysql', | ||
| 48 | 'host' => $central_ip, | ||
| 49 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 50 | 'username' => env('DB_USERNAME', 'root'), | ||
| 51 | 'password' => env('DB_PASSWORD', ''), | ||
| 52 | 'charset' => 'utf8', | ||
| 53 | 'collation' => 'utf8_unicode_ci', | ||
| 54 | 'prefix' => '', | ||
| 55 | 'options' => array( | ||
| 56 | PDO::ATTR_TIMEOUT => 5, | ||
| 57 | ), | ||
| 58 | ); | ||
| 59 | Config::set("database.connections.conn", $conn); | ||
| 60 | |||
| 61 | |||
| 62 | if(DB::connection("conn")->getDatabaseName()) | ||
| 63 | { | ||
| 64 | $serverclist=DB::connection("conn")->select(DB::raw("select id,location from server_details where server_ip='$server_ip'")); | ||
| 65 | $server_id=$serverclist[0]->id; | ||
| 66 | if($server_id<10){ | ||
| 67 | $server_id="0".$server_id; | ||
| 68 | } | ||
| 69 | $location=$serverclist[0]->location; | ||
| 70 | |||
| 71 | echo ",".$server_ip; | ||
| 72 | |||
| 73 | $qlist=DB::select(DB::raw("SELECT id,clientcode,client,status,clientinternalid,mobile,priority,modified,question,firstname FROM `records`")); | ||
| 74 | $datainser=''; | ||
| 75 | foreach($qlist as $qline) | ||
| 76 | { | ||
| 77 | |||
| 78 | $record_id=$qline->id; | ||
| 79 | $clientcode=$qline->clientcode; | ||
| 80 | $client=$qline->client; | ||
| 81 | $status=$qline->status; | ||
| 82 | $clientinternalid=$qline->clientinternalid; | ||
| 83 | $mobile=$qline->mobile; | ||
| 84 | $priority=$qline->priority; | ||
| 85 | $modified=$qline->modified; | ||
| 86 | $question=$qline->question; | ||
| 87 | $firstname=$qline->firstname; | ||
| 88 | |||
| 89 | |||
| 90 | DB::connection("conn")->insert(DB::raw("insert into records_details set client='$client', server_ip='$server_ip', record_id='$record_id', cust_id='$clientcode', records_status='$status', group_id='$clientinternalid', location='$location',mobile='$mobile',question='$question',firstname='$firstname',priority='$priority',modified='$modified'")); | ||
| 91 | |||
| 92 | |||
| 93 | } | ||
| 94 | DB::connection("conn")->disconnect(); | ||
| 95 | |||
| 96 | } | ||
| 97 | } | ||
| 98 | |||
| 99 | } | ||
| 100 | |||
| 101 | |||
| 102 | |||
| 103 |
app/Console/Commands/bulkServerUpload.php
0 → 100644
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | use App\Models\Notification; | ||
| 15 | use App\Jobs\KHRMSLib; | ||
| 16 | use App\Models\Customers; | ||
| 17 | |||
| 18 | use Input; | ||
| 19 | |||
| 20 | use Illuminate\Database\Schema\Blueprint; | ||
| 21 | |||
| 22 | class bulkServerUpload extends Command { | ||
| 23 | |||
| 24 | /** | ||
| 25 | * The console command name. | ||
| 26 | * | ||
| 27 | * @var string | ||
| 28 | */ | ||
| 29 | protected $signature = 'bulkServerUpload'; | ||
| 30 | |||
| 31 | /** | ||
| 32 | * The console command description. | ||
| 33 | * | ||
| 34 | * @var string | ||
| 35 | */ | ||
| 36 | protected $description = 'bulkServerUpload'; | ||
| 37 | |||
| 38 | /** | ||
| 39 | * Execute the console command. | ||
| 40 | * | ||
| 41 | * @return mixed | ||
| 42 | */ | ||
| 43 | public function handle() | ||
| 44 | { | ||
| 45 | |||
| 46 | //echo "\n".date('Y-m-d')."\n"; | ||
| 47 | |||
| 48 | echo "4"; | ||
| 49 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 50 | $server_ip=env('app_ip'); | ||
| 51 | $central_ip=env('central_ip'); | ||
| 52 | |||
| 53 | |||
| 54 | $wakka = new KHRMSLib(); | ||
| 55 | |||
| 56 | $kformlib=new \App\Jobs\KFormLib($wakka->HRCoreVars["HRFiledsStr"]); | ||
| 57 | $kformlib->gthis=$wakka; | ||
| 58 | |||
| 59 | $themehome=$wakka->GetThemePath('/'); | ||
| 60 | $updatetime=time(); | ||
| 61 | |||
| 62 | $clientlst=$wakka->GetBBBUserData("clientslist"); | ||
| 63 | |||
| 64 | $isadmin=$wakka->IsAdmin(); | ||
| 65 | $username=$wakka->GetUserName(); | ||
| 66 | $triggers=Input::get("triggers"); | ||
| 67 | $tmpstr=explode(",",$kformlib->HRFiledsStr); | ||
| 68 | |||
| 69 | $success="";$message="";$successcnt=0;$duplicatecount=0; | ||
| 70 | |||
| 71 | |||
| 72 | $conn = array( | ||
| 73 | 'driver' => 'mysql', | ||
| 74 | 'host' => $central_ip, | ||
| 75 | 'database' => env('CENTRAL_DB', 'kstych_flexydial'), | ||
| 76 | 'username' => env('DB_USERNAME', 'root'), | ||
| 77 | 'password' => env('DB_PASSWORD', 'yb9738z'), | ||
| 78 | 'charset' => 'utf8', | ||
| 79 | 'collation' => 'utf8_unicode_ci', | ||
| 80 | 'prefix' => '', | ||
| 81 | 'options' => array( | ||
| 82 | PDO::ATTR_TIMEOUT => 5, | ||
| 83 | ), | ||
| 84 | ); | ||
| 85 | Config::set("database.connections.conn", $conn); | ||
| 86 | |||
| 87 | DB::connection("conn")->getDatabaseName(); | ||
| 88 | |||
| 89 | $serverclist=DB::connection("conn")->select(DB::raw("select location from server_details where server_ip='$server_ip'")); | ||
| 90 | $location=$serverclist[0]->location; | ||
| 91 | |||
| 92 | |||
| 93 | $excelarray = DB::connection("conn")->select(DB::raw("select * from bz_record_upload_uat where SERVER_IP='$server_ip' order by auto_id asc limit 0,20000")); | ||
| 94 | |||
| 95 | $conn=''; | ||
| 96 | |||
| 97 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 98 | |||
| 99 | foreach($excelarray as $key => $array){ | ||
| 100 | $excelarray[$key] = (array)$array; | ||
| 101 | } | ||
| 102 | |||
| 103 | $highestColumn = DB::connection("conn")->select(DB::raw("select count(*) as cnt from information_schema.columns where table_name='bz_record_upload_uat'")); | ||
| 104 | $highestColumn = $highestColumn[0]->cnt; | ||
| 105 | |||
| 106 | $unique_ids = DB::table("customers")->select('unique_id')->pluck('unique_id'); | ||
| 107 | |||
| 108 | $highestrow = count($excelarray); | ||
| 109 | echo "\n".$highestrow."\n"; | ||
| 110 | $flag = 0; | ||
| 111 | $editflag=0; | ||
| 112 | for($i=0;$i<$highestrow;$i++) | ||
| 113 | { | ||
| 114 | if($excelarray[$i]["id"]!="" || $excelarray[$i]["id"]!="0" || $excelarray[$i]["id"]!=0 ) | ||
| 115 | { | ||
| 116 | if(in_array($excelarray[$i]["unique_id"], $unique_ids)){ | ||
| 117 | $unique_id=$unique_ids; | ||
| 118 | }else{ | ||
| 119 | $unique_id=""; | ||
| 120 | } | ||
| 121 | if($excelarray[$i]["id"]=="CREATE"|| !isset($unique_id)) | ||
| 122 | { | ||
| 123 | $customers = new Customers(); | ||
| 124 | $excelarray[$i]["id"]=$customers->createNewEntry(); | ||
| 125 | } | ||
| 126 | else $excelarray[$i]["id"]=intval($excelarray[$i]["id"]); | ||
| 127 | |||
| 128 | $customers = new Customers(); | ||
| 129 | if($customers->checkRecordIfExist($excelarray[$i]["id"])!="") | ||
| 130 | { | ||
| 131 | $customers = new Customers(); | ||
| 132 | $customers = $customers->where('id', '=', $excelarray[$i]["id"])->select('peopledata')->get(); | ||
| 133 | $empdata=$customers->toArray(); | ||
| 134 | |||
| 135 | $ppldata=unserialize($empdata[0]["peopledata"]); | ||
| 136 | |||
| 137 | $createdlog[$updatetime]=$username."::"; | ||
| 138 | $createdlog["updated"]=$updatetime; | ||
| 139 | |||
| 140 | $newdata=$ppldata; | ||
| 141 | /*if(strstr($clientlst,$ppldata['client'])) | ||
| 142 | {*/ | ||
| 143 | $editflag=0; | ||
| 144 | foreach($excelarray[$i] as $key => $value) | ||
| 145 | { | ||
| 146 | /*if(isset($kformlib->HRFieldNames[$key])) | ||
| 147 | {*/ | ||
| 148 | if($value!="") | ||
| 149 | { | ||
| 150 | if("A".$ppldata[$key]!="A".$value && $value!=null)//forcing string comparrision //MAGIC | ||
| 151 | { | ||
| 152 | $value=str_replace("'"," ",$value); | ||
| 153 | if(strstr($createdlog[$updatetime],$key)==FALSE)$createdlog[$updatetime].="$key|".str_replace(array("|",",")," ",$ppldata[$key])."|".str_replace(array("|",",")," ",$value).","; | ||
| 154 | |||
| 155 | $fdirty[$key]=1;$editflag=1; | ||
| 156 | |||
| 157 | |||
| 158 | $newdata[$key]=$value; | ||
| 159 | } | ||
| 160 | //else $message.="same $excelarray[$i][id]:$key:$value, "; | ||
| 161 | } | ||
| 162 | //else $message.="empty $excelarray[$i][id]:$key, "; | ||
| 163 | /*} | ||
| 164 | else | ||
| 165 | { | ||
| 166 | // $message.="Invalid key :$key, "; | ||
| 167 | }*/ | ||
| 168 | } | ||
| 169 | |||
| 170 | if($editflag) | ||
| 171 | { | ||
| 172 | $empdata["peopledata"]=$newdata; | ||
| 173 | |||
| 174 | $customers = new Customers(); | ||
| 175 | $customers->updateExistingRecord($excelarray[$i]["id"], $empdata); | ||
| 176 | |||
| 177 | $successArr[] = $excelarray[$i]["id"]; | ||
| 178 | } | ||
| 179 | //} | ||
| 180 | else | ||
| 181 | { | ||
| 182 | // $message.="No access to $excelarray[$i][id], "; | ||
| 183 | } | ||
| 184 | } | ||
| 185 | else | ||
| 186 | { | ||
| 187 | // $message.="ID not found $excelarray[$i][id], "; | ||
| 188 | } | ||
| 189 | } | ||
| 190 | else | ||
| 191 | { | ||
| 192 | //$message.="Incorrect ID '$excelarray[$i][id]', "; | ||
| 193 | $failureArr[] = $excelarray[$i]["id"]; | ||
| 194 | } | ||
| 195 | } | ||
| 196 | |||
| 197 | /*for($i=0;$i<$highestrow;$i++) | ||
| 198 | { | ||
| 199 | if($excelarray[$i]["id"]!="") | ||
| 200 | { | ||
| 201 | if($excelarray[$i]["id"]=="CREATE") | ||
| 202 | { | ||
| 203 | $excelarray[$i]["id"]=$wakka->Query("insert into","","records",array('created'=>date('Y-m-d H:i:s'))); | ||
| 204 | } | ||
| 205 | else $excelarray[$i]["id"]=intval($excelarray[$i]["id"]); | ||
| 206 | if($wakka->getCount("records","id='".$excelarray[$i]["id"]."'")==1) | ||
| 207 | { | ||
| 208 | $empdata=$wakka->getPerson($excelarray[$i]["id"]); | ||
| 209 | $ppldata=$empdata["peopledata"]; | ||
| 210 | $createdlog=$empdata['modifylog']; | ||
| 211 | $fdirty=$empdata['dirty']; | ||
| 212 | |||
| 213 | $createdlog[$updatetime]=$username."::"; | ||
| 214 | $createdlog["updated"]=$updatetime; | ||
| 215 | |||
| 216 | $newdata=$ppldata; | ||
| 217 | foreach($excelarray[$i] as $key => $value) | ||
| 218 | { | ||
| 219 | if($value!="") | ||
| 220 | { | ||
| 221 | if("A".$ppldata[$key]!="A".$value)//forcing string comparrision //MAGIC | ||
| 222 | { | ||
| 223 | $value=str_replace("'"," ",$value); | ||
| 224 | if(strstr($createdlog[$updatetime],$key)==FALSE)$createdlog[$updatetime].="$key|".str_replace(array("|",",")," ",$ppldata[$key])."|".str_replace(array("|",",")," ",$value).","; | ||
| 225 | |||
| 226 | $fdirty[$key]=1; | ||
| 227 | |||
| 228 | $newdata[$key]=$value; | ||
| 229 | } | ||
| 230 | } | ||
| 231 | } | ||
| 232 | |||
| 233 | /*Start - Changes need to be done*/ | ||
| 234 | |||
| 235 | /* if($excelarray[$i]["status"]==null) | ||
| 236 | { | ||
| 237 | $empdata['status'] = "rom"; | ||
| 238 | } | ||
| 239 | |||
| 240 | if($excelarray[$i]["dialer_status"]==null) | ||
| 241 | { | ||
| 242 | $empdata['dialer_status'] = "rom"; | ||
| 243 | } | ||
| 244 | |||
| 245 | if($excelarray[$i]["dialer_substatus"]==null) | ||
| 246 | { | ||
| 247 | $empdata['dialer_substatus'] = "rom"; | ||
| 248 | }*/ | ||
| 249 | |||
| 250 | /*End - Changes need to be done*/ | ||
| 251 | |||
| 252 | /*$empdata["peopledata"]=$newdata; | ||
| 253 | $empdata['modifylog']=$createdlog; | ||
| 254 | $empdata['dirty']=$fdirty; | ||
| 255 | |||
| 256 | $wakka->setPerson($excelarray[$i]["id"],$empdata); | ||
| 257 | $excelarray[$i]['modified']=date('Y-m-d H:i:s'); | ||
| 258 | $successArr[] = $excelarray[$i]; | ||
| 259 | |||
| 260 | } | ||
| 261 | else | ||
| 262 | { | ||
| 263 | $reason = ""; | ||
| 264 | |||
| 265 | $reason .= "Record ID is not on local server,"; | ||
| 266 | |||
| 267 | $excelarray[$i]['server_ip'] =$server_ip; | ||
| 268 | $excelarray[$i]['location'] =$location; | ||
| 269 | |||
| 270 | if($excelarray[$i]["clientcode"]!="") | ||
| 271 | $excelarray[$i]['cust_id'] =$excelarray[$i]["clientcode"]; | ||
| 272 | $excelarray[$i]['record_id'] = $excelarray[$i]["id"]; | ||
| 273 | |||
| 274 | $excelarray[$i]['Reason'] = $reason; | ||
| 275 | |||
| 276 | $failureArr[] = $excelarray[$i]; | ||
| 277 | |||
| 278 | } | ||
| 279 | } | ||
| 280 | else | ||
| 281 | { | ||
| 282 | |||
| 283 | $reason = ""; | ||
| 284 | |||
| 285 | if($excelarray[$i]["id"]=="") | ||
| 286 | $reason .= "Column ID is blank,"; | ||
| 287 | |||
| 288 | $excelarray[$i]['server_ip'] =$server_ip; | ||
| 289 | $excelarray[$i]['location'] =$location; | ||
| 290 | |||
| 291 | if($excelarray[$i]["clientcode"]!="") | ||
| 292 | $excelarray[$i]['cust_id'] =$excelarray[$i]["clientcode"]; | ||
| 293 | |||
| 294 | $excelarray[$i]['Reason'] = $reason; | ||
| 295 | |||
| 296 | $failureArr[] = $excelarray[$i]; | ||
| 297 | |||
| 298 | } | ||
| 299 | |||
| 300 | }*/ | ||
| 301 | /*if(!empty($successArr)){ | ||
| 302 | foreach($successArr as $succes) | ||
| 303 | { | ||
| 304 | $setSuccess=array(); | ||
| 305 | |||
| 306 | $setSuccess[] = "server_ip='$server_ip'"; | ||
| 307 | $setSuccess[] = "location='$location'"; | ||
| 308 | $setSuccess[] = "record_id='".$succes['id']."'"; | ||
| 309 | $setSuccess[] = "cust_id='".$succes['clientcode']."'"; | ||
| 310 | $setSuccess[] = "modified='".$succes['modified']."'"; | ||
| 311 | |||
| 312 | $setSuccess = implode(",",$setSuccess); | ||
| 313 | |||
| 314 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_success set $setSuccess")); | ||
| 315 | } | ||
| 316 | } | ||
| 317 | if(!empty($failureArr)){ | ||
| 318 | foreach($failureArr as $failur) | ||
| 319 | { | ||
| 320 | $setFailure=array(); | ||
| 321 | |||
| 322 | $setFailure[] = "server_ip='$server_ip'"; | ||
| 323 | $setFailure[] = "location='$location'"; | ||
| 324 | $setFailure[] = "cust_id='".$failur['clientcode']."'"; | ||
| 325 | $setFailure[] = "record_id='".$failur['record_id']."'"; | ||
| 326 | $setFailure[] = "reason='".$failur['Reason']."'"; | ||
| 327 | |||
| 328 | $setFailure = implode(",",$setFailure); | ||
| 329 | |||
| 330 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_failure set $setFailure")); | ||
| 331 | } | ||
| 332 | }*/ | ||
| 333 | |||
| 334 | DB::connection("conn")->disconnect(); | ||
| 335 | } | ||
| 336 | } |
app/Console/Commands/bulkServerUpload_1.php
0 → 100644
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | use App\Models\Notification; | ||
| 15 | use App\Jobs\KHRMSLib; | ||
| 16 | |||
| 17 | use Input; | ||
| 18 | |||
| 19 | use Illuminate\Database\Schema\Blueprint; | ||
| 20 | |||
| 21 | class bulkServerUpload_1 extends Command { | ||
| 22 | |||
| 23 | /** | ||
| 24 | * The console command name. | ||
| 25 | * | ||
| 26 | * @var string | ||
| 27 | */ | ||
| 28 | protected $signature = 'bulkServerUpload_1'; | ||
| 29 | |||
| 30 | /** | ||
| 31 | * The console command description. | ||
| 32 | * | ||
| 33 | * @var string | ||
| 34 | */ | ||
| 35 | protected $description = 'bulkServerUpload_1'; | ||
| 36 | |||
| 37 | /** | ||
| 38 | * Execute the console command. | ||
| 39 | * | ||
| 40 | * @return mixed | ||
| 41 | */ | ||
| 42 | public function handle() | ||
| 43 | { | ||
| 44 | |||
| 45 | //echo "\n".date('Y-m-d')."\n"; | ||
| 46 | |||
| 47 | echo "2"; | ||
| 48 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 49 | $server_ip=env('app_ip'); | ||
| 50 | $central_ip=env('central_ip'); | ||
| 51 | |||
| 52 | |||
| 53 | $wakka = new KHRMSLib(); | ||
| 54 | |||
| 55 | $kformlib=new \App\Jobs\KFormLib($wakka->HRCoreVars["HRFiledsStr"]); | ||
| 56 | $kformlib->gthis=$wakka; | ||
| 57 | |||
| 58 | $themehome=$wakka->GetThemePath('/'); | ||
| 59 | $updatetime=time(); | ||
| 60 | |||
| 61 | $clientlst=$wakka->GetBBBUserData("clientslist"); | ||
| 62 | |||
| 63 | $isadmin=$wakka->IsAdmin(); | ||
| 64 | $username=$wakka->GetUserName(); | ||
| 65 | $triggers=Input::get("triggers"); | ||
| 66 | $tmpstr=explode(",",$kformlib->HRFiledsStr); | ||
| 67 | |||
| 68 | $success="";$message="";$successcnt=0;$duplicatecount=0; | ||
| 69 | |||
| 70 | |||
| 71 | $conn = array( | ||
| 72 | 'driver' => 'mysql', | ||
| 73 | 'host' => $central_ip, | ||
| 74 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 75 | 'username' => env('DB_USERNAME', 'root'), | ||
| 76 | 'password' => env('DB_PASSWORD', 'yb9738z'), | ||
| 77 | 'charset' => 'utf8', | ||
| 78 | 'collation' => 'utf8_unicode_ci', | ||
| 79 | 'prefix' => '', | ||
| 80 | 'options' => array( | ||
| 81 | PDO::ATTR_TIMEOUT => 5, | ||
| 82 | ), | ||
| 83 | ); | ||
| 84 | Config::set("database.connections.conn", $conn); | ||
| 85 | |||
| 86 | DB::connection("conn")->getDatabaseName(); | ||
| 87 | |||
| 88 | $serverclist=DB::connection("conn")->select(DB::raw("select location from server_details where server_ip='$server_ip'")); | ||
| 89 | $location=$serverclist[0]->location; | ||
| 90 | |||
| 91 | |||
| 92 | $excelarray = DB::connection("conn")->select(DB::raw("select * from bz_record_upload_uat where SERVER_IP='$server_ip' order by auto_id asc limit 20001,40000")); | ||
| 93 | |||
| 94 | $conn=''; | ||
| 95 | |||
| 96 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 97 | |||
| 98 | foreach($excelarray as $key => $array){ | ||
| 99 | $excelarray[$key] = (array)$array; | ||
| 100 | } | ||
| 101 | |||
| 102 | $highestColumn = DB::connection("conn")->select(DB::raw("select count(*) as cnt from information_schema.columns where table_name='bz_record_upload_uat'")); | ||
| 103 | $highestColumn = $highestColumn[0]->cnt; | ||
| 104 | |||
| 105 | $highestrow = count($excelarray); | ||
| 106 | |||
| 107 | $flag = 0; | ||
| 108 | $editflag=0; | ||
| 109 | |||
| 110 | for($i=0;$i<$highestrow;$i++) | ||
| 111 | { | ||
| 112 | if($excelarray[$i]["id"]!="") | ||
| 113 | { | ||
| 114 | if($excelarray[$i]["id"]=="CREATE") | ||
| 115 | { | ||
| 116 | $excelarray[$i]["id"]=$wakka->Query("insert into","","records",array('created'=>date('Y-m-d H:i:s'))); | ||
| 117 | } | ||
| 118 | else $excelarray[$i]["id"]=intval($excelarray[$i]["id"]); | ||
| 119 | if($wakka->getCount("records","id='".$excelarray[$i]["id"]."'")==1) | ||
| 120 | { | ||
| 121 | $empdata=$wakka->getPerson($excelarray[$i]["id"]); | ||
| 122 | $ppldata=$empdata["peopledata"]; | ||
| 123 | $createdlog=$empdata['modifylog']; | ||
| 124 | $fdirty=$empdata['dirty']; | ||
| 125 | |||
| 126 | $createdlog[$updatetime]=$username."::"; | ||
| 127 | $createdlog["updated"]=$updatetime; | ||
| 128 | |||
| 129 | $newdata=$ppldata; | ||
| 130 | foreach($excelarray[$i] as $key => $value) | ||
| 131 | { | ||
| 132 | if($value!="") | ||
| 133 | { | ||
| 134 | if("A".$ppldata[$key]!="A".$value)//forcing string comparrision //MAGIC | ||
| 135 | { | ||
| 136 | $value=str_replace("'"," ",$value); | ||
| 137 | if(strstr($createdlog[$updatetime],$key)==FALSE)$createdlog[$updatetime].="$key|".str_replace(array("|",",")," ",$ppldata[$key])."|".str_replace(array("|",",")," ",$value).","; | ||
| 138 | |||
| 139 | $fdirty[$key]=1; | ||
| 140 | |||
| 141 | $newdata[$key]=$value; | ||
| 142 | } | ||
| 143 | } | ||
| 144 | } | ||
| 145 | |||
| 146 | /*Start - Changes need to be done*/ | ||
| 147 | |||
| 148 | if($excelarray[$i]["status"]==null) | ||
| 149 | { | ||
| 150 | $empdata['status'] = "rom"; | ||
| 151 | } | ||
| 152 | |||
| 153 | if($excelarray[$i]["dialer_status"]==null) | ||
| 154 | { | ||
| 155 | $empdata['dialer_status'] = "rom"; | ||
| 156 | } | ||
| 157 | |||
| 158 | if($excelarray[$i]["dialer_substatus"]==null) | ||
| 159 | { | ||
| 160 | $empdata['dialer_substatus'] = "rom"; | ||
| 161 | } | ||
| 162 | |||
| 163 | /*End - Changes need to be done*/ | ||
| 164 | |||
| 165 | $empdata["peopledata"]=$newdata; | ||
| 166 | $empdata['modifylog']=$createdlog; | ||
| 167 | $empdata['dirty']=$fdirty; | ||
| 168 | |||
| 169 | $wakka->setPerson($excelarray[$i]["id"],$empdata); | ||
| 170 | $excelarray[$i]['modified']=date('Y-m-d H:i:s'); | ||
| 171 | $successArr[] = $excelarray[$i]; | ||
| 172 | |||
| 173 | } | ||
| 174 | else | ||
| 175 | { | ||
| 176 | $reason = ""; | ||
| 177 | |||
| 178 | $reason .= "Record ID is not on local server,"; | ||
| 179 | |||
| 180 | $excelarray[$i]['server_ip'] =$server_ip; | ||
| 181 | $excelarray[$i]['location'] =$location; | ||
| 182 | |||
| 183 | if($excelarray[$i]["clientcode"]!="") | ||
| 184 | $excelarray[$i]['cust_id'] =$excelarray[$i]["clientcode"]; | ||
| 185 | $excelarray[$i]['record_id'] = $excelarray[$i]["id"]; | ||
| 186 | |||
| 187 | $excelarray[$i]['Reason'] = $reason; | ||
| 188 | |||
| 189 | $failureArr[] = $excelarray[$i]; | ||
| 190 | |||
| 191 | } | ||
| 192 | } | ||
| 193 | else | ||
| 194 | { | ||
| 195 | |||
| 196 | $reason = ""; | ||
| 197 | |||
| 198 | if($excelarray[$i]["id"]=="") | ||
| 199 | $reason .= "Column ID is blank,"; | ||
| 200 | |||
| 201 | $excelarray[$i]['server_ip'] =$server_ip; | ||
| 202 | $excelarray[$i]['location'] =$location; | ||
| 203 | |||
| 204 | if($excelarray[$i]["clientcode"]!="") | ||
| 205 | $excelarray[$i]['cust_id'] =$excelarray[$i]["clientcode"]; | ||
| 206 | |||
| 207 | $excelarray[$i]['Reason'] = $reason; | ||
| 208 | |||
| 209 | $failureArr[] = $excelarray[$i]; | ||
| 210 | |||
| 211 | } | ||
| 212 | |||
| 213 | } | ||
| 214 | if(!empty($successArr)){ | ||
| 215 | foreach($successArr as $succes) | ||
| 216 | { | ||
| 217 | $setSuccess=array(); | ||
| 218 | |||
| 219 | $setSuccess[] = "server_ip='$server_ip'"; | ||
| 220 | $setSuccess[] = "location='$location'"; | ||
| 221 | $setSuccess[] = "record_id='".$succes['id']."'"; | ||
| 222 | $setSuccess[] = "cust_id='".$succes['clientcode']."'"; | ||
| 223 | $setSuccess[] = "modified='".$succes['modified']."'"; | ||
| 224 | |||
| 225 | $setSuccess = implode(",",$setSuccess); | ||
| 226 | |||
| 227 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_success set $setSuccess")); | ||
| 228 | } | ||
| 229 | } | ||
| 230 | if(!empty($failureArr)){ | ||
| 231 | foreach($failureArr as $failur) | ||
| 232 | { | ||
| 233 | $setFailure=array(); | ||
| 234 | |||
| 235 | $setFailure[] = "server_ip='$server_ip'"; | ||
| 236 | $setFailure[] = "location='$location'"; | ||
| 237 | $setFailure[] = "cust_id='".$failur['clientcode']."'"; | ||
| 238 | $setFailure[] = "record_id='".$failur['record_id']."'"; | ||
| 239 | $setFailure[] = "reason='".$failur['Reason']."'"; | ||
| 240 | |||
| 241 | $setFailure = implode(",",$setFailure); | ||
| 242 | |||
| 243 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_failure set $setFailure")); | ||
| 244 | } | ||
| 245 | } | ||
| 246 | |||
| 247 | DB::connection("conn")->disconnect(); | ||
| 248 | } | ||
| 249 | } |
app/Console/Commands/bulkServerUpload_2.php
0 → 100644
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | use App\Models\Notification; | ||
| 15 | use App\Jobs\KHRMSLib; | ||
| 16 | |||
| 17 | use Input; | ||
| 18 | |||
| 19 | use Illuminate\Database\Schema\Blueprint; | ||
| 20 | |||
| 21 | class bulkServerUpload_2 extends Command { | ||
| 22 | |||
| 23 | /** | ||
| 24 | * The console command name. | ||
| 25 | * | ||
| 26 | * @var string | ||
| 27 | */ | ||
| 28 | protected $signature = 'bulkServerUpload_2'; | ||
| 29 | |||
| 30 | /** | ||
| 31 | * The console command description. | ||
| 32 | * | ||
| 33 | * @var string | ||
| 34 | */ | ||
| 35 | protected $description = 'bulkServerUpload_2'; | ||
| 36 | |||
| 37 | /** | ||
| 38 | * Execute the console command. | ||
| 39 | * | ||
| 40 | * @return mixed | ||
| 41 | */ | ||
| 42 | public function handle() | ||
| 43 | { | ||
| 44 | |||
| 45 | //echo "\n".date('Y-m-d')."\n"; | ||
| 46 | |||
| 47 | echo "3"; | ||
| 48 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 49 | $server_ip=env('app_ip'); | ||
| 50 | $central_ip=env('central_ip'); | ||
| 51 | |||
| 52 | |||
| 53 | $wakka = new KHRMSLib(); | ||
| 54 | |||
| 55 | $kformlib=new \App\Jobs\KFormLib($wakka->HRCoreVars["HRFiledsStr"]); | ||
| 56 | $kformlib->gthis=$wakka; | ||
| 57 | |||
| 58 | $themehome=$wakka->GetThemePath('/'); | ||
| 59 | $updatetime=time(); | ||
| 60 | |||
| 61 | $clientlst=$wakka->GetBBBUserData("clientslist"); | ||
| 62 | |||
| 63 | $isadmin=$wakka->IsAdmin(); | ||
| 64 | $username=$wakka->GetUserName(); | ||
| 65 | $triggers=Input::get("triggers"); | ||
| 66 | $tmpstr=explode(",",$kformlib->HRFiledsStr); | ||
| 67 | |||
| 68 | $success="";$message="";$successcnt=0;$duplicatecount=0; | ||
| 69 | |||
| 70 | |||
| 71 | $conn = array( | ||
| 72 | 'driver' => 'mysql', | ||
| 73 | 'host' => $central_ip, | ||
| 74 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 75 | 'username' => env('DB_USERNAME', 'root'), | ||
| 76 | 'password' => env('DB_PASSWORD', 'yb9738z'), | ||
| 77 | 'charset' => 'utf8', | ||
| 78 | 'collation' => 'utf8_unicode_ci', | ||
| 79 | 'prefix' => '', | ||
| 80 | 'options' => array( | ||
| 81 | PDO::ATTR_TIMEOUT => 5, | ||
| 82 | ), | ||
| 83 | ); | ||
| 84 | Config::set("database.connections.conn", $conn); | ||
| 85 | |||
| 86 | DB::connection("conn")->getDatabaseName(); | ||
| 87 | |||
| 88 | $serverclist=DB::connection("conn")->select(DB::raw("select location from server_details where server_ip='$server_ip'")); | ||
| 89 | $location=$serverclist[0]->location; | ||
| 90 | |||
| 91 | |||
| 92 | $excelarray = DB::connection("conn")->select(DB::raw("select * from bz_record_upload_uat where SERVER_IP='$server_ip' order by auto_id asc limit 40001,60000")); | ||
| 93 | |||
| 94 | $conn=''; | ||
| 95 | |||
| 96 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 97 | |||
| 98 | foreach($excelarray as $key => $array){ | ||
| 99 | $excelarray[$key] = (array)$array; | ||
| 100 | } | ||
| 101 | |||
| 102 | $highestColumn = DB::connection("conn")->select(DB::raw("select count(*) as cnt from information_schema.columns where table_name='bz_record_upload_uat'")); | ||
| 103 | $highestColumn = $highestColumn[0]->cnt; | ||
| 104 | |||
| 105 | $highestrow = count($excelarray); | ||
| 106 | |||
| 107 | $flag = 0; | ||
| 108 | $editflag=0; | ||
| 109 | |||
| 110 | for($i=0;$i<$highestrow;$i++) | ||
| 111 | { | ||
| 112 | if($excelarray[$i]["id"]!="") | ||
| 113 | { | ||
| 114 | if($excelarray[$i]["id"]=="CREATE") | ||
| 115 | { | ||
| 116 | $excelarray[$i]["id"]=$wakka->Query("insert into","","records",array('created'=>date('Y-m-d H:i:s'))); | ||
| 117 | } | ||
| 118 | else $excelarray[$i]["id"]=intval($excelarray[$i]["id"]); | ||
| 119 | if($wakka->getCount("records","id='".$excelarray[$i]["id"]."'")==1) | ||
| 120 | { | ||
| 121 | $empdata=$wakka->getPerson($excelarray[$i]["id"]); | ||
| 122 | $ppldata=$empdata["peopledata"]; | ||
| 123 | $createdlog=$empdata['modifylog']; | ||
| 124 | $fdirty=$empdata['dirty']; | ||
| 125 | |||
| 126 | $createdlog[$updatetime]=$username."::"; | ||
| 127 | $createdlog["updated"]=$updatetime; | ||
| 128 | |||
| 129 | $newdata=$ppldata; | ||
| 130 | foreach($excelarray[$i] as $key => $value) | ||
| 131 | { | ||
| 132 | if($value!="") | ||
| 133 | { | ||
| 134 | if("A".$ppldata[$key]!="A".$value)//forcing string comparrision //MAGIC | ||
| 135 | { | ||
| 136 | $value=str_replace("'"," ",$value); | ||
| 137 | if(strstr($createdlog[$updatetime],$key)==FALSE)$createdlog[$updatetime].="$key|".str_replace(array("|",",")," ",$ppldata[$key])."|".str_replace(array("|",",")," ",$value).","; | ||
| 138 | |||
| 139 | $fdirty[$key]=1; | ||
| 140 | |||
| 141 | $newdata[$key]=$value; | ||
| 142 | } | ||
| 143 | } | ||
| 144 | } | ||
| 145 | |||
| 146 | /*Start - Changes need to be done*/ | ||
| 147 | |||
| 148 | if($excelarray[$i]["status"]==null) | ||
| 149 | { | ||
| 150 | $empdata['status'] = "rom"; | ||
| 151 | } | ||
| 152 | |||
| 153 | if($excelarray[$i]["dialer_status"]==null) | ||
| 154 | { | ||
| 155 | $empdata['dialer_status'] = "rom"; | ||
| 156 | } | ||
| 157 | |||
| 158 | if($excelarray[$i]["dialer_substatus"]==null) | ||
| 159 | { | ||
| 160 | $empdata['dialer_substatus'] = "rom"; | ||
| 161 | } | ||
| 162 | |||
| 163 | /*End - Changes need to be done*/ | ||
| 164 | |||
| 165 | $empdata["peopledata"]=$newdata; | ||
| 166 | $empdata['modifylog']=$createdlog; | ||
| 167 | $empdata['dirty']=$fdirty; | ||
| 168 | |||
| 169 | $wakka->setPerson($excelarray[$i]["id"],$empdata); | ||
| 170 | $excelarray[$i]['modified']=date('Y-m-d H:i:s'); | ||
| 171 | $successArr[] = $excelarray[$i]; | ||
| 172 | |||
| 173 | } | ||
| 174 | else | ||
| 175 | { | ||
| 176 | $reason = ""; | ||
| 177 | |||
| 178 | $reason .= "Record ID is not on local server,"; | ||
| 179 | |||
| 180 | $excelarray[$i]['server_ip'] =$server_ip; | ||
| 181 | $excelarray[$i]['location'] =$location; | ||
| 182 | |||
| 183 | if($excelarray[$i]["clientcode"]!="") | ||
| 184 | $excelarray[$i]['cust_id'] =$excelarray[$i]["clientcode"]; | ||
| 185 | $excelarray[$i]['record_id'] = $excelarray[$i]["id"]; | ||
| 186 | |||
| 187 | $excelarray[$i]['Reason'] = $reason; | ||
| 188 | |||
| 189 | $failureArr[] = $excelarray[$i]; | ||
| 190 | |||
| 191 | } | ||
| 192 | } | ||
| 193 | else | ||
| 194 | { | ||
| 195 | |||
| 196 | $reason = ""; | ||
| 197 | |||
| 198 | if($excelarray[$i]["id"]=="") | ||
| 199 | $reason .= "Column ID is blank,"; | ||
| 200 | |||
| 201 | $excelarray[$i]['server_ip'] =$server_ip; | ||
| 202 | $excelarray[$i]['location'] =$location; | ||
| 203 | |||
| 204 | if($excelarray[$i]["clientcode"]!="") | ||
| 205 | $excelarray[$i]['cust_id'] =$excelarray[$i]["clientcode"]; | ||
| 206 | |||
| 207 | $excelarray[$i]['Reason'] = $reason; | ||
| 208 | |||
| 209 | $failureArr[] = $excelarray[$i]; | ||
| 210 | |||
| 211 | } | ||
| 212 | |||
| 213 | } | ||
| 214 | if(!empty($successArr)){ | ||
| 215 | foreach($successArr as $succes) | ||
| 216 | { | ||
| 217 | $setSuccess=array(); | ||
| 218 | |||
| 219 | $setSuccess[] = "server_ip='$server_ip'"; | ||
| 220 | $setSuccess[] = "location='$location'"; | ||
| 221 | $setSuccess[] = "record_id='".$succes['id']."'"; | ||
| 222 | $setSuccess[] = "cust_id='".$succes['clientcode']."'"; | ||
| 223 | $setSuccess[] = "modified='".$succes['modified']."'"; | ||
| 224 | |||
| 225 | $setSuccess = implode(",",$setSuccess); | ||
| 226 | |||
| 227 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_success set $setSuccess")); | ||
| 228 | } | ||
| 229 | } | ||
| 230 | if(!empty($failureArr)){ | ||
| 231 | foreach($failureArr as $failur) | ||
| 232 | { | ||
| 233 | $setFailure=array(); | ||
| 234 | |||
| 235 | $setFailure[] = "server_ip='$server_ip'"; | ||
| 236 | $setFailure[] = "location='$location'"; | ||
| 237 | $setFailure[] = "cust_id='".$failur['clientcode']."'"; | ||
| 238 | $setFailure[] = "record_id='".$failur['record_id']."'"; | ||
| 239 | $setFailure[] = "reason='".$failur['Reason']."'"; | ||
| 240 | |||
| 241 | $setFailure = implode(",",$setFailure); | ||
| 242 | |||
| 243 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_failure set $setFailure")); | ||
| 244 | } | ||
| 245 | } | ||
| 246 | |||
| 247 | DB::connection("conn")->disconnect(); | ||
| 248 | } | ||
| 249 | } |
app/Console/Commands/bulkServerUpload_3.php
0 → 100644
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | use App\Models\Notification; | ||
| 15 | use App\Jobs\KHRMSLib; | ||
| 16 | |||
| 17 | use Input; | ||
| 18 | |||
| 19 | use Illuminate\Database\Schema\Blueprint; | ||
| 20 | |||
| 21 | class bulkServerUpload_3 extends Command { | ||
| 22 | |||
| 23 | /** | ||
| 24 | * The console command name. | ||
| 25 | * | ||
| 26 | * @var string | ||
| 27 | */ | ||
| 28 | protected $signature = 'bulkServerUpload_3'; | ||
| 29 | |||
| 30 | /** | ||
| 31 | * The console command description. | ||
| 32 | * | ||
| 33 | * @var string | ||
| 34 | */ | ||
| 35 | protected $description = 'bulkServerUpload_3'; | ||
| 36 | |||
| 37 | /** | ||
| 38 | * Execute the console command. | ||
| 39 | * | ||
| 40 | * @return mixed | ||
| 41 | */ | ||
| 42 | public function handle() | ||
| 43 | { | ||
| 44 | |||
| 45 | //echo "\n".date('Y-m-d')."\n"; | ||
| 46 | |||
| 47 | echo "4"; | ||
| 48 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 49 | $server_ip=env('app_ip'); | ||
| 50 | $central_ip=env('central_ip'); | ||
| 51 | |||
| 52 | |||
| 53 | $wakka = new KHRMSLib(); | ||
| 54 | |||
| 55 | $kformlib=new \App\Jobs\KFormLib($wakka->HRCoreVars["HRFiledsStr"]); | ||
| 56 | $kformlib->gthis=$wakka; | ||
| 57 | |||
| 58 | $themehome=$wakka->GetThemePath('/'); | ||
| 59 | $updatetime=time(); | ||
| 60 | |||
| 61 | $clientlst=$wakka->GetBBBUserData("clientslist"); | ||
| 62 | |||
| 63 | $isadmin=$wakka->IsAdmin(); | ||
| 64 | $username=$wakka->GetUserName(); | ||
| 65 | $triggers=Input::get("triggers"); | ||
| 66 | $tmpstr=explode(",",$kformlib->HRFiledsStr); | ||
| 67 | |||
| 68 | $success="";$message="";$successcnt=0;$duplicatecount=0; | ||
| 69 | |||
| 70 | |||
| 71 | $conn = array( | ||
| 72 | 'driver' => 'mysql', | ||
| 73 | 'host' => $central_ip, | ||
| 74 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 75 | 'username' => env('DB_USERNAME', 'root'), | ||
| 76 | 'password' => env('DB_PASSWORD', 'yb9738z'), | ||
| 77 | 'charset' => 'utf8', | ||
| 78 | 'collation' => 'utf8_unicode_ci', | ||
| 79 | 'prefix' => '', | ||
| 80 | 'options' => array( | ||
| 81 | PDO::ATTR_TIMEOUT => 5, | ||
| 82 | ), | ||
| 83 | ); | ||
| 84 | Config::set("database.connections.conn", $conn); | ||
| 85 | |||
| 86 | DB::connection("conn")->getDatabaseName(); | ||
| 87 | |||
| 88 | $serverclist=DB::connection("conn")->select(DB::raw("select location from server_details where server_ip='$server_ip'")); | ||
| 89 | $location=$serverclist[0]->location; | ||
| 90 | |||
| 91 | |||
| 92 | $excelarray = DB::connection("conn")->select(DB::raw("select * from bz_record_upload_uat where SERVER_IP='$server_ip' order by auto_id asc limit 60001,80000")); | ||
| 93 | |||
| 94 | $conn=''; | ||
| 95 | |||
| 96 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 97 | |||
| 98 | foreach($excelarray as $key => $array){ | ||
| 99 | $excelarray[$key] = (array)$array; | ||
| 100 | } | ||
| 101 | |||
| 102 | $highestColumn = DB::connection("conn")->select(DB::raw("select count(*) as cnt from information_schema.columns where table_name='bz_record_upload_uat'")); | ||
| 103 | $highestColumn = $highestColumn[0]->cnt; | ||
| 104 | |||
| 105 | $highestrow = count($excelarray); | ||
| 106 | |||
| 107 | $flag = 0; | ||
| 108 | $editflag=0; | ||
| 109 | |||
| 110 | for($i=0;$i<$highestrow;$i++) | ||
| 111 | { | ||
| 112 | if($excelarray[$i]["id"]!="") | ||
| 113 | { | ||
| 114 | if($excelarray[$i]["id"]=="CREATE") | ||
| 115 | { | ||
| 116 | $excelarray[$i]["id"]=$wakka->Query("insert into","","records",array('created'=>date('Y-m-d H:i:s'))); | ||
| 117 | } | ||
| 118 | else $excelarray[$i]["id"]=intval($excelarray[$i]["id"]); | ||
| 119 | if($wakka->getCount("records","id='".$excelarray[$i]["id"]."'")==1) | ||
| 120 | { | ||
| 121 | $empdata=$wakka->getPerson($excelarray[$i]["id"]); | ||
| 122 | $ppldata=$empdata["peopledata"]; | ||
| 123 | $createdlog=$empdata['modifylog']; | ||
| 124 | $fdirty=$empdata['dirty']; | ||
| 125 | |||
| 126 | $createdlog[$updatetime]=$username."::"; | ||
| 127 | $createdlog["updated"]=$updatetime; | ||
| 128 | |||
| 129 | $newdata=$ppldata; | ||
| 130 | foreach($excelarray[$i] as $key => $value) | ||
| 131 | { | ||
| 132 | if($value!="") | ||
| 133 | { | ||
| 134 | if("A".$ppldata[$key]!="A".$value)//forcing string comparrision //MAGIC | ||
| 135 | { | ||
| 136 | $value=str_replace("'"," ",$value); | ||
| 137 | if(strstr($createdlog[$updatetime],$key)==FALSE)$createdlog[$updatetime].="$key|".str_replace(array("|",",")," ",$ppldata[$key])."|".str_replace(array("|",",")," ",$value).","; | ||
| 138 | |||
| 139 | $fdirty[$key]=1; | ||
| 140 | |||
| 141 | $newdata[$key]=$value; | ||
| 142 | } | ||
| 143 | } | ||
| 144 | } | ||
| 145 | |||
| 146 | /*Start - Changes need to be done*/ | ||
| 147 | |||
| 148 | if($excelarray[$i]["status"]==null) | ||
| 149 | { | ||
| 150 | $empdata['status'] = "rom"; | ||
| 151 | } | ||
| 152 | |||
| 153 | if($excelarray[$i]["dialer_status"]==null) | ||
| 154 | { | ||
| 155 | $empdata['dialer_status'] = "rom"; | ||
| 156 | } | ||
| 157 | |||
| 158 | if($excelarray[$i]["dialer_substatus"]==null) | ||
| 159 | { | ||
| 160 | $empdata['dialer_substatus'] = "rom"; | ||
| 161 | } | ||
| 162 | |||
| 163 | /*End - Changes need to be done*/ | ||
| 164 | |||
| 165 | $empdata["peopledata"]=$newdata; | ||
| 166 | $empdata['modifylog']=$createdlog; | ||
| 167 | $empdata['dirty']=$fdirty; | ||
| 168 | |||
| 169 | $wakka->setPerson($excelarray[$i]["id"],$empdata); | ||
| 170 | $excelarray[$i]['modified']=date('Y-m-d H:i:s'); | ||
| 171 | $successArr[] = $excelarray[$i]; | ||
| 172 | |||
| 173 | } | ||
| 174 | else | ||
| 175 | { | ||
| 176 | $reason = ""; | ||
| 177 | |||
| 178 | $reason .= "Record ID is not on local server,"; | ||
| 179 | |||
| 180 | $excelarray[$i]['server_ip'] =$server_ip; | ||
| 181 | $excelarray[$i]['location'] =$location; | ||
| 182 | |||
| 183 | if($excelarray[$i]["clientcode"]!="") | ||
| 184 | $excelarray[$i]['cust_id'] =$excelarray[$i]["clientcode"]; | ||
| 185 | $excelarray[$i]['record_id'] = $excelarray[$i]["id"]; | ||
| 186 | |||
| 187 | $excelarray[$i]['Reason'] = $reason; | ||
| 188 | |||
| 189 | $failureArr[] = $excelarray[$i]; | ||
| 190 | |||
| 191 | } | ||
| 192 | } | ||
| 193 | else | ||
| 194 | { | ||
| 195 | |||
| 196 | $reason = ""; | ||
| 197 | |||
| 198 | if($excelarray[$i]["id"]=="") | ||
| 199 | $reason .= "Column ID is blank,"; | ||
| 200 | |||
| 201 | $excelarray[$i]['server_ip'] =$server_ip; | ||
| 202 | $excelarray[$i]['location'] =$location; | ||
| 203 | |||
| 204 | if($excelarray[$i]["clientcode"]!="") | ||
| 205 | $excelarray[$i]['cust_id'] =$excelarray[$i]["clientcode"]; | ||
| 206 | |||
| 207 | $excelarray[$i]['Reason'] = $reason; | ||
| 208 | |||
| 209 | $failureArr[] = $excelarray[$i]; | ||
| 210 | |||
| 211 | } | ||
| 212 | |||
| 213 | } | ||
| 214 | if(!empty($successArr)){ | ||
| 215 | foreach($successArr as $succes) | ||
| 216 | { | ||
| 217 | $setSuccess=array(); | ||
| 218 | |||
| 219 | $setSuccess[] = "server_ip='$server_ip'"; | ||
| 220 | $setSuccess[] = "location='$location'"; | ||
| 221 | $setSuccess[] = "record_id='".$succes['id']."'"; | ||
| 222 | $setSuccess[] = "cust_id='".$succes['clientcode']."'"; | ||
| 223 | $setSuccess[] = "modified='".$succes['modified']."'"; | ||
| 224 | |||
| 225 | $setSuccess = implode(",",$setSuccess); | ||
| 226 | |||
| 227 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_success set $setSuccess")); | ||
| 228 | } | ||
| 229 | } | ||
| 230 | if(!empty($failureArr)){ | ||
| 231 | foreach($failureArr as $failur) | ||
| 232 | { | ||
| 233 | $setFailure=array(); | ||
| 234 | |||
| 235 | $setFailure[] = "server_ip='$server_ip'"; | ||
| 236 | $setFailure[] = "location='$location'"; | ||
| 237 | $setFailure[] = "cust_id='".$failur['clientcode']."'"; | ||
| 238 | $setFailure[] = "record_id='".$failur['record_id']."'"; | ||
| 239 | $setFailure[] = "reason='".$failur['Reason']."'"; | ||
| 240 | |||
| 241 | $setFailure = implode(",",$setFailure); | ||
| 242 | |||
| 243 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_failure set $setFailure")); | ||
| 244 | } | ||
| 245 | } | ||
| 246 | |||
| 247 | DB::connection("conn")->disconnect(); | ||
| 248 | } | ||
| 249 | } |
app/Console/Commands/bulkServerUpload_4.php
0 → 100644
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | use App\Models\Notification; | ||
| 15 | use App\Jobs\KHRMSLib; | ||
| 16 | |||
| 17 | use Input; | ||
| 18 | |||
| 19 | use Illuminate\Database\Schema\Blueprint; | ||
| 20 | |||
| 21 | class bulkServerUpload_4 extends Command { | ||
| 22 | |||
| 23 | /** | ||
| 24 | * The console command name. | ||
| 25 | * | ||
| 26 | * @var string | ||
| 27 | */ | ||
| 28 | protected $signature = 'bulkServerUpload_4'; | ||
| 29 | |||
| 30 | /** | ||
| 31 | * The console command description. | ||
| 32 | * | ||
| 33 | * @var string | ||
| 34 | */ | ||
| 35 | protected $description = 'bulkServerUpload_4'; | ||
| 36 | |||
| 37 | /** | ||
| 38 | * Execute the console command. | ||
| 39 | * | ||
| 40 | * @return mixed | ||
| 41 | */ | ||
| 42 | public function handle() | ||
| 43 | { | ||
| 44 | |||
| 45 | //echo "\n".date('Y-m-d')."\n"; | ||
| 46 | |||
| 47 | echo "5"; | ||
| 48 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 49 | $server_ip=env('app_ip'); | ||
| 50 | $central_ip=env('central_ip'); | ||
| 51 | |||
| 52 | |||
| 53 | $wakka = new KHRMSLib(); | ||
| 54 | |||
| 55 | $kformlib=new \App\Jobs\KFormLib($wakka->HRCoreVars["HRFiledsStr"]); | ||
| 56 | $kformlib->gthis=$wakka; | ||
| 57 | |||
| 58 | $themehome=$wakka->GetThemePath('/'); | ||
| 59 | $updatetime=time(); | ||
| 60 | |||
| 61 | $clientlst=$wakka->GetBBBUserData("clientslist"); | ||
| 62 | |||
| 63 | $isadmin=$wakka->IsAdmin(); | ||
| 64 | $username=$wakka->GetUserName(); | ||
| 65 | $triggers=Input::get("triggers"); | ||
| 66 | $tmpstr=explode(",",$kformlib->HRFiledsStr); | ||
| 67 | |||
| 68 | $success="";$message="";$successcnt=0;$duplicatecount=0; | ||
| 69 | |||
| 70 | |||
| 71 | $conn = array( | ||
| 72 | 'driver' => 'mysql', | ||
| 73 | 'host' => $central_ip, | ||
| 74 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 75 | 'username' => env('DB_USERNAME', 'root'), | ||
| 76 | 'password' => env('DB_PASSWORD', 'yb9738z'), | ||
| 77 | 'charset' => 'utf8', | ||
| 78 | 'collation' => 'utf8_unicode_ci', | ||
| 79 | 'prefix' => '', | ||
| 80 | 'options' => array( | ||
| 81 | PDO::ATTR_TIMEOUT => 5, | ||
| 82 | ), | ||
| 83 | ); | ||
| 84 | Config::set("database.connections.conn", $conn); | ||
| 85 | |||
| 86 | DB::connection("conn")->getDatabaseName(); | ||
| 87 | $serverclist=DB::connection("conn")->select(DB::raw("select location from server_details where server_ip='$server_ip'")); | ||
| 88 | $location=$serverclist[0]->location; | ||
| 89 | |||
| 90 | |||
| 91 | $excelarray = DB::connection("conn")->select(DB::raw("select * from bz_record_upload_uat where SERVER_IP='$server_ip' order by auto_id asc limit 80001,100000")); | ||
| 92 | |||
| 93 | $conn=''; | ||
| 94 | |||
| 95 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 96 | |||
| 97 | foreach($excelarray as $key => $array){ | ||
| 98 | $excelarray[$key] = (array)$array; | ||
| 99 | } | ||
| 100 | |||
| 101 | $highestColumn = DB::connection("conn")->select(DB::raw("select count(*) as cnt from information_schema.columns where table_name='bz_record_upload_uat'")); | ||
| 102 | $highestColumn = $highestColumn[0]->cnt; | ||
| 103 | |||
| 104 | $highestrow = count($excelarray); | ||
| 105 | |||
| 106 | $flag = 0; | ||
| 107 | $editflag=0; | ||
| 108 | |||
| 109 | for($i=0;$i<$highestrow;$i++) | ||
| 110 | { | ||
| 111 | if($excelarray[$i]["id"]!="") | ||
| 112 | { | ||
| 113 | if($excelarray[$i]["id"]=="CREATE") | ||
| 114 | { | ||
| 115 | $excelarray[$i]["id"]=$wakka->Query("insert into","","records",array('created'=>date('Y-m-d H:i:s'))); | ||
| 116 | } | ||
| 117 | else $excelarray[$i]["id"]=intval($excelarray[$i]["id"]); | ||
| 118 | if($wakka->getCount("records","id='".$excelarray[$i]["id"]."'")==1) | ||
| 119 | { | ||
| 120 | $empdata=$wakka->getPerson($excelarray[$i]["id"]); | ||
| 121 | $ppldata=$empdata["peopledata"]; | ||
| 122 | $createdlog=$empdata['modifylog']; | ||
| 123 | $fdirty=$empdata['dirty']; | ||
| 124 | |||
| 125 | $createdlog[$updatetime]=$username."::"; | ||
| 126 | $createdlog["updated"]=$updatetime; | ||
| 127 | |||
| 128 | $newdata=$ppldata; | ||
| 129 | foreach($excelarray[$i] as $key => $value) | ||
| 130 | { | ||
| 131 | if($value!="") | ||
| 132 | { | ||
| 133 | if("A".$ppldata[$key]!="A".$value)//forcing string comparrision //MAGIC | ||
| 134 | { | ||
| 135 | $value=str_replace("'"," ",$value); | ||
| 136 | if(strstr($createdlog[$updatetime],$key)==FALSE)$createdlog[$updatetime].="$key|".str_replace(array("|",",")," ",$ppldata[$key])."|".str_replace(array("|",",")," ",$value).","; | ||
| 137 | |||
| 138 | $fdirty[$key]=1; | ||
| 139 | |||
| 140 | $newdata[$key]=$value; | ||
| 141 | } | ||
| 142 | } | ||
| 143 | } | ||
| 144 | |||
| 145 | /*Start - Changes need to be done*/ | ||
| 146 | |||
| 147 | if($excelarray[$i]["status"]==null) | ||
| 148 | { | ||
| 149 | $empdata['status'] = "rom"; | ||
| 150 | } | ||
| 151 | |||
| 152 | if($excelarray[$i]["dialer_status"]==null) | ||
| 153 | { | ||
| 154 | $empdata['dialer_status'] = "rom"; | ||
| 155 | } | ||
| 156 | |||
| 157 | if($excelarray[$i]["dialer_substatus"]==null) | ||
| 158 | { | ||
| 159 | $empdata['dialer_substatus'] = "rom"; | ||
| 160 | } | ||
| 161 | |||
| 162 | /*End - Changes need to be done*/ | ||
| 163 | |||
| 164 | $empdata["peopledata"]=$newdata; | ||
| 165 | $empdata['modifylog']=$createdlog; | ||
| 166 | $empdata['dirty']=$fdirty; | ||
| 167 | |||
| 168 | $wakka->setPerson($excelarray[$i]["id"],$empdata); | ||
| 169 | $excelarray[$i]['modified']=date('Y-m-d H:i:s'); | ||
| 170 | $successArr[] = $excelarray[$i]; | ||
| 171 | |||
| 172 | } | ||
| 173 | else | ||
| 174 | { | ||
| 175 | $reason = ""; | ||
| 176 | |||
| 177 | $reason .= "Record ID is not on local server,"; | ||
| 178 | |||
| 179 | $excelarray[$i]['server_ip'] =$server_ip; | ||
| 180 | $excelarray[$i]['location'] =$location; | ||
| 181 | |||
| 182 | if($excelarray[$i]["clientcode"]!="") | ||
| 183 | $excelarray[$i]['cust_id'] =$excelarray[$i]["clientcode"]; | ||
| 184 | $excelarray[$i]['record_id'] = $excelarray[$i]["id"]; | ||
| 185 | |||
| 186 | $excelarray[$i]['Reason'] = $reason; | ||
| 187 | |||
| 188 | $failureArr[] = $excelarray[$i]; | ||
| 189 | |||
| 190 | } | ||
| 191 | } | ||
| 192 | else | ||
| 193 | { | ||
| 194 | |||
| 195 | $reason = ""; | ||
| 196 | |||
| 197 | if($excelarray[$i]["id"]=="") | ||
| 198 | $reason .= "Column ID is blank,"; | ||
| 199 | |||
| 200 | $excelarray[$i]['server_ip'] =$server_ip; | ||
| 201 | $excelarray[$i]['location'] =$location; | ||
| 202 | |||
| 203 | if($excelarray[$i]["clientcode"]!="") | ||
| 204 | $excelarray[$i]['cust_id'] =$excelarray[$i]["clientcode"]; | ||
| 205 | |||
| 206 | $excelarray[$i]['Reason'] = $reason; | ||
| 207 | |||
| 208 | $failureArr[] = $excelarray[$i]; | ||
| 209 | |||
| 210 | } | ||
| 211 | |||
| 212 | } | ||
| 213 | if(!empty($successArr)){ | ||
| 214 | foreach($successArr as $succes) | ||
| 215 | { | ||
| 216 | $setSuccess=array(); | ||
| 217 | |||
| 218 | $setSuccess[] = "server_ip='$server_ip'"; | ||
| 219 | $setSuccess[] = "location='$location'"; | ||
| 220 | $setSuccess[] = "record_id='".$succes['id']."'"; | ||
| 221 | $setSuccess[] = "cust_id='".$succes['clientcode']."'"; | ||
| 222 | $setSuccess[] = "modified='".$succes['modified']."'"; | ||
| 223 | |||
| 224 | $setSuccess = implode(",",$setSuccess); | ||
| 225 | |||
| 226 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_success set $setSuccess")); | ||
| 227 | } | ||
| 228 | } | ||
| 229 | if(!empty($failureArr)){ | ||
| 230 | foreach($failureArr as $failur) | ||
| 231 | { | ||
| 232 | $setFailure=array(); | ||
| 233 | |||
| 234 | $setFailure[] = "server_ip='$server_ip'"; | ||
| 235 | $setFailure[] = "location='$location'"; | ||
| 236 | $setFailure[] = "cust_id='".$failur['clientcode']."'"; | ||
| 237 | $setFailure[] = "record_id='".$failur['record_id']."'"; | ||
| 238 | $setFailure[] = "reason='".$failur['Reason']."'"; | ||
| 239 | |||
| 240 | $setFailure = implode(",",$setFailure); | ||
| 241 | |||
| 242 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_failure set $setFailure")); | ||
| 243 | } | ||
| 244 | } | ||
| 245 | |||
| 246 | DB::connection("conn")->disconnect(); | ||
| 247 | } | ||
| 248 | } |
app/Console/Commands/bulkServerUpload_5.php
0 → 100644
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | use App\Models\Notification; | ||
| 15 | use App\Jobs\KHRMSLib; | ||
| 16 | |||
| 17 | use Input; | ||
| 18 | |||
| 19 | use Illuminate\Database\Schema\Blueprint; | ||
| 20 | |||
| 21 | class bulkServerUpload_5 extends Command { | ||
| 22 | |||
| 23 | /** | ||
| 24 | * The console command name. | ||
| 25 | * | ||
| 26 | * @var string | ||
| 27 | */ | ||
| 28 | protected $signature = 'bulkServerUpload_5'; | ||
| 29 | |||
| 30 | /** | ||
| 31 | * The console command description. | ||
| 32 | * | ||
| 33 | * @var string | ||
| 34 | */ | ||
| 35 | protected $description = 'bulkServerUpload_5'; | ||
| 36 | |||
| 37 | /** | ||
| 38 | * Execute the console command. | ||
| 39 | * | ||
| 40 | * @return mixed | ||
| 41 | */ | ||
| 42 | public function handle() | ||
| 43 | { | ||
| 44 | |||
| 45 | //echo "\n".date('Y-m-d')."\n"; | ||
| 46 | |||
| 47 | echo "6"; | ||
| 48 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 49 | $server_ip=env('app_ip'); | ||
| 50 | $central_ip=env('central_ip'); | ||
| 51 | |||
| 52 | |||
| 53 | $wakka = new KHRMSLib(); | ||
| 54 | |||
| 55 | $kformlib=new \App\Jobs\KFormLib($wakka->HRCoreVars["HRFiledsStr"]); | ||
| 56 | $kformlib->gthis=$wakka; | ||
| 57 | |||
| 58 | $themehome=$wakka->GetThemePath('/'); | ||
| 59 | $updatetime=time(); | ||
| 60 | |||
| 61 | $clientlst=$wakka->GetBBBUserData("clientslist"); | ||
| 62 | |||
| 63 | $isadmin=$wakka->IsAdmin(); | ||
| 64 | $username=$wakka->GetUserName(); | ||
| 65 | $triggers=Input::get("triggers"); | ||
| 66 | $tmpstr=explode(",",$kformlib->HRFiledsStr); | ||
| 67 | |||
| 68 | $success="";$message="";$successcnt=0;$duplicatecount=0; | ||
| 69 | |||
| 70 | |||
| 71 | $conn = array( | ||
| 72 | 'driver' => 'mysql', | ||
| 73 | 'host' => $central_ip, | ||
| 74 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 75 | 'username' => env('DB_USERNAME', 'root'), | ||
| 76 | 'password' => env('DB_PASSWORD', 'yb9738z'), | ||
| 77 | 'charset' => 'utf8', | ||
| 78 | 'collation' => 'utf8_unicode_ci', | ||
| 79 | 'prefix' => '', | ||
| 80 | 'options' => array( | ||
| 81 | PDO::ATTR_TIMEOUT => 5, | ||
| 82 | ), | ||
| 83 | ); | ||
| 84 | Config::set("database.connections.conn", $conn); | ||
| 85 | |||
| 86 | DB::connection("conn")->getDatabaseName(); | ||
| 87 | |||
| 88 | $serverclist=DB::connection("conn")->select(DB::raw("select location from server_details where server_ip='$server_ip'")); | ||
| 89 | $location=$serverclist[0]->location; | ||
| 90 | |||
| 91 | |||
| 92 | $excelarray = DB::connection("conn")->select(DB::raw("select * from bz_record_upload_uat where SERVER_IP='$server_ip' order by auto_id asc limit 100001,120000")); | ||
| 93 | |||
| 94 | $conn=''; | ||
| 95 | |||
| 96 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 97 | |||
| 98 | foreach($excelarray as $key => $array){ | ||
| 99 | $excelarray[$key] = (array)$array; | ||
| 100 | } | ||
| 101 | |||
| 102 | $highestColumn = DB::connection("conn")->select(DB::raw("select count(*) as cnt from information_schema.columns where table_name='bz_record_upload_uat'")); | ||
| 103 | $highestColumn = $highestColumn[0]->cnt; | ||
| 104 | |||
| 105 | $highestrow = count($excelarray); | ||
| 106 | |||
| 107 | $flag = 0; | ||
| 108 | $editflag=0; | ||
| 109 | |||
| 110 | for($i=0;$i<$highestrow;$i++) | ||
| 111 | { | ||
| 112 | if($excelarray[$i]["id"]!="") | ||
| 113 | { | ||
| 114 | if($excelarray[$i]["id"]=="CREATE") | ||
| 115 | { | ||
| 116 | $excelarray[$i]["id"]=$wakka->Query("insert into","","records",array('created'=>date('Y-m-d H:i:s'))); | ||
| 117 | } | ||
| 118 | else $excelarray[$i]["id"]=intval($excelarray[$i]["id"]); | ||
| 119 | if($wakka->getCount("records","id='".$excelarray[$i]["id"]."'")==1) | ||
| 120 | { | ||
| 121 | $empdata=$wakka->getPerson($excelarray[$i]["id"]); | ||
| 122 | $ppldata=$empdata["peopledata"]; | ||
| 123 | $createdlog=$empdata['modifylog']; | ||
| 124 | $fdirty=$empdata['dirty']; | ||
| 125 | |||
| 126 | $createdlog[$updatetime]=$username."::"; | ||
| 127 | $createdlog["updated"]=$updatetime; | ||
| 128 | |||
| 129 | $newdata=$ppldata; | ||
| 130 | foreach($excelarray[$i] as $key => $value) | ||
| 131 | { | ||
| 132 | if($value!="") | ||
| 133 | { | ||
| 134 | if("A".$ppldata[$key]!="A".$value)//forcing string comparrision //MAGIC | ||
| 135 | { | ||
| 136 | $value=str_replace("'"," ",$value); | ||
| 137 | if(strstr($createdlog[$updatetime],$key)==FALSE)$createdlog[$updatetime].="$key|".str_replace(array("|",",")," ",$ppldata[$key])."|".str_replace(array("|",",")," ",$value).","; | ||
| 138 | |||
| 139 | $fdirty[$key]=1; | ||
| 140 | |||
| 141 | $newdata[$key]=$value; | ||
| 142 | } | ||
| 143 | } | ||
| 144 | } | ||
| 145 | |||
| 146 | /*Start - Changes need to be done*/ | ||
| 147 | |||
| 148 | if($excelarray[$i]["status"]==null) | ||
| 149 | { | ||
| 150 | $empdata['status'] = "rom"; | ||
| 151 | } | ||
| 152 | |||
| 153 | if($excelarray[$i]["dialer_status"]==null) | ||
| 154 | { | ||
| 155 | $empdata['dialer_status'] = "rom"; | ||
| 156 | } | ||
| 157 | |||
| 158 | if($excelarray[$i]["dialer_substatus"]==null) | ||
| 159 | { | ||
| 160 | $empdata['dialer_substatus'] = "rom"; | ||
| 161 | } | ||
| 162 | |||
| 163 | /*End - Changes need to be done*/ | ||
| 164 | |||
| 165 | $empdata["peopledata"]=$newdata; | ||
| 166 | $empdata['modifylog']=$createdlog; | ||
| 167 | $empdata['dirty']=$fdirty; | ||
| 168 | |||
| 169 | $wakka->setPerson($excelarray[$i]["id"],$empdata); | ||
| 170 | $excelarray[$i]['modified']=date('Y-m-d H:i:s'); | ||
| 171 | $successArr[] = $excelarray[$i]; | ||
| 172 | |||
| 173 | } | ||
| 174 | else | ||
| 175 | { | ||
| 176 | $reason = ""; | ||
| 177 | |||
| 178 | $reason .= "Record ID is not on local server,"; | ||
| 179 | |||
| 180 | $excelarray[$i]['server_ip'] =$server_ip; | ||
| 181 | $excelarray[$i]['location'] =$location; | ||
| 182 | |||
| 183 | if($excelarray[$i]["clientcode"]!="") | ||
| 184 | $excelarray[$i]['cust_id'] =$excelarray[$i]["clientcode"]; | ||
| 185 | $excelarray[$i]['record_id'] = $excelarray[$i]["id"]; | ||
| 186 | |||
| 187 | $excelarray[$i]['Reason'] = $reason; | ||
| 188 | |||
| 189 | $failureArr[] = $excelarray[$i]; | ||
| 190 | |||
| 191 | } | ||
| 192 | } | ||
| 193 | else | ||
| 194 | { | ||
| 195 | |||
| 196 | $reason = ""; | ||
| 197 | |||
| 198 | if($excelarray[$i]["id"]=="") | ||
| 199 | $reason .= "Column ID is blank,"; | ||
| 200 | |||
| 201 | $excelarray[$i]['server_ip'] =$server_ip; | ||
| 202 | $excelarray[$i]['location'] =$location; | ||
| 203 | |||
| 204 | if($excelarray[$i]["clientcode"]!="") | ||
| 205 | $excelarray[$i]['cust_id'] =$excelarray[$i]["clientcode"]; | ||
| 206 | |||
| 207 | $excelarray[$i]['Reason'] = $reason; | ||
| 208 | |||
| 209 | $failureArr[] = $excelarray[$i]; | ||
| 210 | |||
| 211 | } | ||
| 212 | |||
| 213 | } | ||
| 214 | if(!empty($successArr)){ | ||
| 215 | foreach($successArr as $succes) | ||
| 216 | { | ||
| 217 | $setSuccess=array(); | ||
| 218 | |||
| 219 | $setSuccess[] = "server_ip='$server_ip'"; | ||
| 220 | $setSuccess[] = "location='$location'"; | ||
| 221 | $setSuccess[] = "record_id='".$succes['id']."'"; | ||
| 222 | $setSuccess[] = "cust_id='".$succes['clientcode']."'"; | ||
| 223 | $setSuccess[] = "modified='".$succes['modified']."'"; | ||
| 224 | |||
| 225 | $setSuccess = implode(",",$setSuccess); | ||
| 226 | |||
| 227 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_success set $setSuccess")); | ||
| 228 | } | ||
| 229 | } | ||
| 230 | if(!empty($failureArr)){ | ||
| 231 | foreach($failureArr as $failur) | ||
| 232 | { | ||
| 233 | $setFailure=array(); | ||
| 234 | |||
| 235 | $setFailure[] = "server_ip='$server_ip'"; | ||
| 236 | $setFailure[] = "location='$location'"; | ||
| 237 | $setFailure[] = "cust_id='".$failur['clientcode']."'"; | ||
| 238 | $setFailure[] = "record_id='".$failur['record_id']."'"; | ||
| 239 | $setFailure[] = "reason='".$failur['Reason']."'"; | ||
| 240 | |||
| 241 | $setFailure = implode(",",$setFailure); | ||
| 242 | |||
| 243 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_failure set $setFailure")); | ||
| 244 | } | ||
| 245 | } | ||
| 246 | |||
| 247 | DB::connection("conn")->disconnect(); | ||
| 248 | } | ||
| 249 | } |
app/Console/Commands/bulkServerUpload_6.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/Console/Commands/calllog.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Console/Commands/complaint_data.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Console/Commands/complaint_details.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Console/Commands/complaint_fields.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Console/Commands/dailyupload_calllog.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/Console/Commands/full_remark_details.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Console/Commands/lead_form_details.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Console/Commands/leadform_products.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Console/Commands/oa_leadform_details.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Console/Commands/og_relationship_tag.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Console/Commands/question_tree.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/Console/Commands/records_details.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Console/Commands/relationship_data.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Console/Commands/relationship_tag.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Console/Commands/relationship_tag_1.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Console/Commands/relationship_test.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Console/Commands/rlpcust_details.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Console/Commands/rlppb_details.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/Console/Commands/table_create.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Console/Kernel.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Console/bkp1509_Kernel.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Constants/SmsTemplate.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Constants/gatewaydispo.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/DisableNums/DisVoicePrompts.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Events/Event.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Exceptions/Handler.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Hacks/DisabledDIDs.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/Http/Controllers/AdminController.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Http/Controllers/Auth/AuthController.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/Http/Controllers/CRMController.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Http/Controllers/CampaignController.php
0 → 100755
This diff is collapsed.
Click to expand it.
app/Http/Controllers/ComplaintController.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Http/Controllers/Controller.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Http/Controllers/DashboardController.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Http/Controllers/DialModeController.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Http/Controllers/DialerController.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/Http/Controllers/GroupController.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Http/Controllers/HRController.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Http/Controllers/HomeController.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/Http/Controllers/MessageController.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Http/Controllers/NotesController.php
0 → 100755
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/Http/Controllers/OneAssistController.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/Http/Controllers/PhonebookController.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/Http/Controllers/RecordController.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Http/Controllers/RoleController.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Http/Controllers/Rom8Controller.php
0 → 100755
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/Http/Controllers/SmsController.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Http/Controllers/SocialController.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Http/Controllers/TaskController.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Http/Controllers/UserController.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Http/Controllers/WebController.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Http/Controllers/egController.php
0 → 100755
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/Http/Kernel.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Http/Middleware/AfterFilter.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Http/Middleware/Authenticate.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Http/Middleware/BeforeFilter.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Http/Middleware/EncryptCookies.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Http/Middleware/ModuleAccess.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/Http/Middleware/VerifyCsrfToken.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Http/Requests/Request.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Http/routes.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Jobs/2809_KFormLib.php
0 → 100755
This diff could not be displayed because it is too large.
app/Jobs/Job.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Jobs/KAuthLib.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Jobs/KFileLib.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Jobs/KFormLib.php
0 → 100755
This diff could not be displayed because it is too large.
app/Jobs/KFriendLib.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Jobs/KHRMSLib.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Jobs/KPAGIListen.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Jobs/KPAMIListen.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Jobs/KPushNotify.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Jobs/KSocialLib.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Listeners/.gitkeep
0 → 100644
This diff is collapsed.
Click to expand it.
app/Listeners/Commands/.gitkeep
0 → 100644
This diff is collapsed.
Click to expand it.
app/Listeners/Events/.gitkeep
0 → 100644
This diff is collapsed.
Click to expand it.
app/Listeners/Events/QueryHandler.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/Accesslog.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/CRM.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/CRMCall.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/CRMCallArchive.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/CRMCampaign.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/CRMList.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/Campaign.php
0 → 100755
This diff is collapsed.
Click to expand it.
app/Models/Communitie.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/ComplaintCategory.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/ComplaintResolclassUnit.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/ComplaintSubCategory.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/ContactStatus.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/Contacts.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/Contenttag.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/CustomerNumbers.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/Customers.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/Cutoff.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/Dialline.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/Disposition.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/DispositionPlan.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/DispositionPlanConfig.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/Educourse.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/Educourserun.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/FormStatusLog.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/Friend.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/Group.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/Kqueue.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/Master.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/Message.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/Notification.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/OutputProduct.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/OutputReport.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/Phonebook.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/Post.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/Rating.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/Record.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/RelationshipCategory.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/RelationshipService.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/RelationshipSubCategory.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/Role.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/Session.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/Sipid.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/SkillGroup.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/SubDisposition.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/SupervisonComments.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/Task.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/User.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Models/UserLog.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Providers/AppServiceProvider.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Providers/AuthServiceProvider.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Providers/EventServiceProvider.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/Providers/RouteServiceProvider.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/LinkPreview/textCrawler.php
0 → 100755
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/.gitattributes
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/.gitignore
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedClasses.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedFrameTargets.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Attr.ClassUseCDATA.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultImageAlt.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImage.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImageAlt.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultTextDir.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Attr.ForbiddenClasses.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklistRegexp.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefixLocal.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.AutoParagraph.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Custom.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.DisplayLinkURI.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Linkify.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowImportant.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedProperties.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/CSS.DefinitionRev.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/CSS.ForbiddenProperties.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Cache.DefinitionImpl.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPath.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPermissions.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyFixLt.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Core.AllowHostnameUnderscore.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Core.CollectErrors.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Core.ColorKeywords.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Core.DisableExcludes.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidChildren.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidTags.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Core.HiddenElements.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Core.MaintainLineNumbers.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Core.NormalizeNewlines.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveInvalidImg.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveScriptContents.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedAttributes.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedComments.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedCommentsRegexp.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedElements.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedModules.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/HTML.Attr.Name.UseCDATA.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/HTML.BlockWrapper.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/HTML.CustomDoctype.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionID.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionRev.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/HTML.FlashAllowFullScreen.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenAttributes.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenElements.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/HTML.MaxImgLength.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeScripting.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Output.CommentScriptContents.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Output.FixInnerHTML.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Output.FlashCompat.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Output.TidyFormat.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/Test.ForceNoIconv.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/URI.AllowedSchemes.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/URI.DefaultScheme.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionRev.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternal.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternalResources.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/URI.DisableResources.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/URI.HostBlacklist.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/URI.MungeResources.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/URI.MungeSecretKey.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/URI.OverrideAllowedSchemes.txt
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/ConfigSchema/schema/URI.SafeIframeRegexp.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/DefinitionCache/Decorator/Template.php.in
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/htmlpurifier-4.6.0/library/HTMLPurifier/Injector/RemoveSpansWithoutAttributes.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Autoloader.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Calculation.php
0 → 100644
This diff could not be displayed because it is too large.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Cell.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Cell/DataType.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Cell/Hyperlink.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Chart.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Chart/Layout.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Chart/Legend.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Chart/PlotArea.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Chart/Title.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Comment.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Exception.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/HashTable.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/IComparable.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/IOFactory.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/NamedRange.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Reader/CSV.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Reader/Excel5.php
0 → 100644
This diff could not be displayed because it is too large.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Reader/HTML.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Reader/IReader.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Reader/OOCalc.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Reader/SYLK.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/RichText.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/RichText/Run.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Settings.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Shared/Date.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Shared/Drawing.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Shared/Escher.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Shared/Excel5.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Shared/File.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Shared/Font.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Shared/OLE.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Shared/OLE/PPS.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Shared/OLERead.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Shared/String.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Style.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Style/Border.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Style/Borders.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Style/Color.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Style/Fill.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Style/Font.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Worksheet.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Worksheet/Row.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Writer/CSV.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Writer/Excel5.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Writer/HTML.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Writer/IWriter.php
0 → 100644
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/Writer/PDF.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/locale/cs/config
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/locale/da/config
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/locale/de/config
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/locale/es/config
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/locale/fi/config
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/locale/fr/config
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/locale/hu/config
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/locale/it/config
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/locale/nl/config
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/locale/no/config
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/locale/pl/config
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/locale/pt/config
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/locale/ru/config
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/locale/sv/config
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
app/lib/phpexcel/PHPExcel/locale/tr/config
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
artisan
0 → 100755
This diff is collapsed.
Click to expand it.
bootstrap/app.php
0 → 100755
This diff is collapsed.
Click to expand it.
bootstrap/autoload.php
0 → 100755
This diff is collapsed.
Click to expand it.
bootstrap/cache/.gitignore
0 → 100755
This diff is collapsed.
Click to expand it.
composer.json
0 → 100755
This diff is collapsed.
Click to expand it.
composer.lock
0 → 100644
This diff could not be displayed because it is too large.
composer.phar
0 → 100755
No preview for this file type
config/app.php
0 → 100755
This diff is collapsed.
Click to expand it.
config/auth.php
0 → 100755
This diff is collapsed.
Click to expand it.
config/broadcasting.php
0 → 100755
This diff is collapsed.
Click to expand it.
config/cache.php
0 → 100755
This diff is collapsed.
Click to expand it.
config/compile.php
0 → 100755
This diff is collapsed.
Click to expand it.
config/database.php
0 → 100755
This diff is collapsed.
Click to expand it.
config/filesystems.php
0 → 100755
This diff is collapsed.
Click to expand it.
config/mail.php
0 → 100755
This diff is collapsed.
Click to expand it.
config/queue.php
0 → 100755
This diff is collapsed.
Click to expand it.
config/services.php
0 → 100755
This diff is collapsed.
Click to expand it.
config/session.php
0 → 100755
This diff is collapsed.
Click to expand it.
config/view.php
0 → 100755
This diff is collapsed.
Click to expand it.
cron.sh
0 → 100755
This diff is collapsed.
Click to expand it.
cron_old.sh
0 → 100755
This diff is collapsed.
Click to expand it.
database/.gitignore
0 → 100755
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
database/seeds/.gitkeep
0 → 100755
This diff is collapsed.
Click to expand it.
database/seeds/DatabaseSeeder.php
0 → 100755
This diff is collapsed.
Click to expand it.
database/seeds/DiallinesTableSeeder.php
0 → 100644
This diff is collapsed.
Click to expand it.
database/seeds/GroupsTableSeeder.php
0 → 100644
This diff is collapsed.
Click to expand it.
database/seeds/RolesTableSeeder.php
0 → 100644
This diff is collapsed.
Click to expand it.
database/seeds/SipidsTableSeeder.php
0 → 100644
This diff is collapsed.
Click to expand it.
database/seeds/UsersTableSeeder.php
0 → 100644
This diff is collapsed.
Click to expand it.
gulpfile.js
0 → 100755
This diff is collapsed.
Click to expand it.
hangup_beep.gsm
0 → 100644
No preview for this file type
hangup_beep.mp3
0 → 100644
No preview for this file type
hangup_beep.wav
0 → 100644
No preview for this file type
libzip-1.1-1.fc23.x86_64.rpm
0 → 100644
No preview for this file type
package.json
0 → 100755
This diff is collapsed.
Click to expand it.
php-pecl-zip-1.13.5-1.fc23.x86_64.rpm
0 → 100644
No preview for this file type
phpunit.xml
0 → 100755
This diff is collapsed.
Click to expand it.
public/.htaccess
0 → 100755
This diff is collapsed.
Click to expand it.
public/1040353.gsm
0 → 100755
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
No preview for this file type
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
No preview for this file type
This diff could not be displayed because it is too large.
No preview for this file type
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
No preview for this file type
No preview for this file type
This diff could not be displayed because it is too large.
No preview for this file type
No preview for this file type
No preview for this file type
This diff is collapsed.
Click to expand it.
No preview for this file type
No preview for this file type
180 Bytes
178 Bytes
120 Bytes
105 Bytes
111 Bytes
110 Bytes
119 Bytes
public/assets/components/library/jquery-ui/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png
0 → 100755
101 Bytes
4.27 KB
4.27 KB
4.27 KB
4.27 KB
4.27 KB
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
public/assets/components/modules/admin/charts/easy-pie/assets/lib/css/jquery.easy-pie-chart.css
0 → 100755
This diff is collapsed.
Click to expand it.
public/assets/components/modules/admin/charts/easy-pie/assets/lib/js/jquery.easy-pie-chart.js
0 → 100755
This diff is collapsed.
Click to expand it.
public/assets/components/modules/admin/charts/flot/assets/custom/js/flotchart-autoupdating.init.js
0 → 100755
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
public/assets/components/modules/admin/charts/flot/assets/custom/js/flotchart-bars-ordered.init.js
0 → 100755
This diff is collapsed.
Click to expand it.
public/assets/components/modules/admin/charts/flot/assets/custom/js/flotchart-bars-stacked.init.js
0 → 100755
This diff is collapsed.
Click to expand it.
public/assets/components/modules/admin/charts/flot/assets/custom/js/flotchart-donut.init.js
0 → 100755
This diff is collapsed.
Click to expand it.
public/assets/components/modules/admin/charts/flot/assets/custom/js/flotchart-line.init.js
0 → 100755
This diff is collapsed.
Click to expand it.
public/assets/components/modules/admin/charts/flot/assets/custom/js/flotchart-pie.init.js
0 → 100755
This diff is collapsed.
Click to expand it.
public/assets/components/modules/admin/charts/flot/assets/custom/js/flotchart-simple.init.js
0 → 100755
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment