Example #1
0
         }
     }
     $session->setCookie('DIR_STORE', $store, 0);
     break;
 case 'scripts':
     include_once '../include/lib/DriveReader.class.php';
     $tmp = explode('\\', $_GET['store']);
     $store = '';
     foreach ($tmp as $char) {
         if (trim($char) != '') {
             $store .= $char . '/';
         }
     }
     if (is_dir($store)) {
         $pspFolder = new DriveReader($store);
         echo 'Total Game: ' . $pspFolder->isFolder() . '<br/>';
         echo '==================================================' . '<br/>';
         foreach ($pspFolder->ListsFolder() as $folder) {
             $pspGame = new DriveReader($pspFolder->Path($folder));
             $foundCover = false;
             $isSize = 0;
             foreach ($pspGame->ListsFile() as $file) {
                 $tmpInfo = pathinfo($file);
                 if ($tmpInfo['extension'] == 'ico') {
                     if ($tmpInfo['filename'] != '[Icon]') {
                         $tmpNew = pathinfo($pspGame->Path($file));
                         $newName = $tmpNew['dirname'] . '/[Icon].ico';
                         rename($pspGame->Path($file), $newName);
                     }
                 }
                 if ($tmpInfo['extension'] == 'jpg' || $tmpInfo['extension'] == 'jpeg' || $tmpInfo['extension'] == 'png') {