function _upgrade()
 {
     $this->setStatus('upgrade');
     // here we need to unzip file and upload it
     $zipFile = $_FILES['zipFile']['tmp_name'];
     require_once 'zip.class.php';
     $zipFileClass = new zipFile();
     $filesDataOrig = $zipFileClass->read_zip($zipFile);
     $filesData = array();
     foreach ($filesDataOrig as $f) {
         $filesData[$f['name']] = $f['data'];
     }
     unset($filesDataOrig);
     $files = array();
     switch ('MagicZoomPlus') {
         case 'MagicMagnify':
         case 'MagicMagnifyPlus':
             $files['magiczoomplus.swf'] = $filesData['magiczoomplus.swf'];
         default:
             $files['magiczoomplus.js'] = $filesData['magiczoomplus.js'];
             break;
     }
     unset($filesData);
     if ($this->upgrade($files)) {
         header('Location: congratulations.html');
     } else {
         return false;
     }
 }
예제 #2
0
    $fileXml = basename($fileXml);
    echo "<a href =\"file://C:/dslweb/output/{$fileXml}\"> {$fileXml} </a>" . "</br>";
}
//exec ("%SystemRoot%/explorer.exe \"C:\\dslweb\\output\"");
//echo '<a href = "files/dslWeb_output/f6_tcreport.xml"> test</a>';
/**
 * Determine value for retval: Cstatus->f:statretval
 * allow zipfile to be prompted if retval = 0:"success|no error" 
 */
$dataRet = $objStat->statReadPSI();
$dataRet = strval(trim($dataRet));
$retVal = $objStat->statRetVal($dataRet);
$fDir = $_SESSION['fDir'];
$fDate = $_SESSION['fDate'];
if ($retVal == "No Error</br>") {
    $objZipFile = new zipFile();
    //$myZip =$objZipFile->compress("E:/xampp/htdocs/dslweb/files/dslweb_output/03-20-2012-915am/");
    $myZip = $objZipFile->compress($fDir);
    if ($objDoc->isEmpty($myZip) == "TRUE") {
        echo "ERROR: Compression error. No file found.";
        $outEcho .= "ERROR: Compression error. No file found.</br>";
    } else {
        echo $myZip;
    }
    $outEcho .= 'No errors found </br>';
} else {
    $outEcho .= 'Error Result Summary : ' . $retVal . '</br>';
}
$outEcho .= "(Segregation process completed.)</br> Process Summary:</br>";
$outEcho .= "Folder Location: " . $fDate . "</br>";
$_SESSION['outEcho'] = $outEcho;