Process Premium Tico Files Here <---// //-----------------------------------------// if($type === 'P') { $imgspath=$imgspath.'\\'; $newname='TICOPREM.txt' ; $text = $_POST['formselect']; if(empty($text)) { echo("You didn't select any Forms."); } else { $N = count($text); for($i=0; $i < $N; $i++) { if(file_exists('TICOPREM.txt')) { if(!unlink($imgspath.'TICOPREM.txt')) { echo 'TICOPREM file exists. Unlink failed' ; die; } } $group=substr($text[$i],13,2); $prefix=substr($text[$i],0,7); $currentAcceptedDate=returnlastrundate($prefix); $session['currenttable'] = $text[$i]; if(rename($imgspath.'\\'.$text[$i], $imgspath.'\\'.$newname)) { prepNPremium($newname) ; switch($group) { case 'NL': $files =glob($imgspath.'\*NL*.*'); array_walk($files, function ($file) { unlink($file) ; }); updlstrundte($group, $currentAcceptedDate); break; case 'CC': $files =glob($imgspath.'\*CC*.*'); array_walk($files, function ($file) { unlink($file) ; }); updlstrundte($group, $currentAcceptedDate); break; } } } //---> Process to update Last Accepted date <---// //---> Only if Both CC and NL have processed.. } } //--------------------------------------// //---> Process Loss TICO Files Here <---// //--------------------------------------// if($type === 'L') { echo 'Process Loss'.'
'; $files=glob($imgspath.'\\*.*'); foreach($files as $file) { //---> Testing echo 'File: '.$file.'
'; if(is_file($file)) { unlink($file); } } } ?>