Esempio n. 1
0
<?php

$modFolders = new DriveReader($GLOBALS['ROOT'] . 'module/');
$modFoundFolder = false;
foreach ($modFolders->ListsFolder() as $mod) {
    list($tmp, $name) = explode('mod_', $mod);
    if (trim($name) == trim($_GET['name'])) {
        $modFoundFolder = true;
        break;
    }
}
if ($modFoundFolder) {
    include_once 'module/' . $mod . '/' . $_GET['name'] . '.php';
} else {
    echo '<div id="exception">' . _EXCEPTION_MODULE . '</div>';
}
Esempio n. 2
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') {
                     if ($tmpInfo['filename'] != '[Cover]') {
                         $tmpNew = pathinfo($pspGame->Path($file));