コード例 #1
0
ファイル: uploadPrcs.php プロジェクト: roothub/dslweb
<?php

require_once 'dslWEb_Library/Class/Documents.php';
require_once 'dslWEb_Library/Class/Session.php';
/**
 * Object instances 
 * Document Class->objDoc, Session Class->objSes 
 * $sData - path to directory ( cDocuments class)-> f:fileCreate	 
 */
$objDoc = new cDocuments();
$objSes = new cSession();
$objSes->sesStart();
/*##################################################################*/
/* the switch option evaluates what value is used from the POSTED name 
 * submitted in the formUpload.php form 
 */
if (isset($_POST['Submit'])) {
    switch ($_POST['Submit']) {
        case 'Segregate':
            if (!empty($_FILES["fileUpload"]) && $_FILES['fileUpload']['error'] == 0) {
                //Сheck that we have a file
                $filename = basename($_FILES['fileUpload']['name']);
                $ext = substr($filename, strrpos($filename, '.') + 1);
                //echo 'File extension:  '.$ext."</br>";
                if ($ext == "xml" && $_FILES["fileUpload"]["type"] == "text/xml") {
                    $file = $_FILES['fileUpload']['name'];
                    $testObj = $objDoc->fileExist($file);
                    /* @check to see if there is a similar file located in uploads_temp
                     * -> proceed to delete the file if it exists 
                     *  */
                    if ($testObj == 'TRUE') {
コード例 #2
0
ファイル: Documents.php プロジェクト: roothub/dslweb
 function createDir($arg2)
 {
     if (cDocuments::existDir($arg2) == "TRUE") {
         echo 'ERROR:The directory already exists.';
         echo '<a href ="//localhost/dslweb/dslWeb.php"> home </a></br> ';
         return false;
     } else {
         if (mkdir($arg2) == "TRUE") {
             return TRUE;
         } else {
             return false;
         }
     }
 }
コード例 #3
0
ファイル: afterCallExecb.php プロジェクト: roothub/dslweb
<?php

include_once 'dslWEb_Library/Class/Documents.php';
include_once 'dslWEb_Library/Class/Session.php';
include_once 'dslWEb_Library/Class/status.php';
include_once 'dslWEb_Library/Class/zipFile.php';
include_once 'dslWEb_Library/Class/exec.php';
$objDoc = new cDocuments();
$objSes = new cSession();
$objExec = new cExec();
$objStat = new cStatus();
$objSes->sesStart();
echo '<div class= "error">';
echo 'Processing DATA please wait </br>';
echo '</div>';
echo 'after call exec</br>';
/*Shell execution
 * function: call dslExe.exe 
 * define: folder loc;
 * 
 */
$directory = "C:\\dslexe\\";
$objExec->_callExe2($directory);
/*@todo check if dirout exists */
$dirOut = "C:\\dslweb\\output\\";
$pregfile = 'C:\\dslweb\\output\\';
$fileXmls = glob($dirOut . "*.xml");
$fileXml = array();
foreach ($fileXmls as $fileXml) {
    $fileXml2 = $fileXml;
    $fileXml = basename($fileXml);