Exemplo n.º 1
0
function displayExport()
{
    try {
        $pathFile = exportTitle($_GET["export"], $_GET["ibictID"], $_GET["numberRegisters"], $_GET["formatType"], $_GET["registerID"], $_GET["searchExpr"], $_GET["indexes"]);
        $fileName = basename($pathFile);
        switch ($_GET['export']) {
            case 'titWithoutCollection':
                $newfileName = $_GET["filename"] . ".iso";
                break;
            case 'sendToSeCS':
                $newfileName = $_GET["filename"] . ".001";
                break;
            case 'sendToSeCS-step2':
                $newfileName = $_GET["filename"] . ".002";
                break;
            case 'titFormatIBICT':
                $newfileName = $_GET["filename"] . ".lst";
                break;
            case 'titFormatIBICT-step2':
                $newfileName = $_GET["filename"] . ".lst";
                break;
            case 'titWithCollection':
                $newfileName = $_GET["filename"] . ".iso";
                break;
        }
    } catch (Exception $error) {
        return $error->getMessage();
    }
    $exportFile = "http://" . $_SERVER['HTTP_HOST'] . "/secs-web/saveFile.php?pathFile=" . $pathFile . "&newFile=" . $newfileName;
    return $exportFile;
}
Exemplo n.º 2
0
         $smarty->assign("mfnMask", $dataModel->getAllMfnMask());
     }
     $smarty->assign("formRequest", $listRequest);
     $smarty->assign("dataRecord", array());
     break;
 case 'list':
     $smartyTemplate = "list";
     if (isset($_REQUEST["searchExpr"]) && $_REQUEST["searchExpr"] != "") {
         $smarty->assign("searcExpr", $_REQUEST["searchExpr"]);
     }
     if ($dataModel != false) {
         //search in Database to show a List(YUI datatable)
         $smarty->assign("dataSource", $dataModel->getRecords());
         $smarty->assign("totalRecords", $dataModel->getTotalRecords());
     }
     exportTitle($_GET["export"]);
     //FACIC
     if ($listRequest == 'facic') {
         $mask = new mask();
         $collectionMask = $dataModel->getAllNameMask();
         $smarty->assign("collectionMask", $collectionMask);
         $futureIssues = new futureIssues();
         $yCurrent = $_REQUEST['initialDate'];
         if ($dataModel->getTotalRecords() == 0) {
             if ($_REQUEST["maskId"]) {
                 $maskId = $_REQUEST["maskId"];
             }
         } else {
             $last = $dataModel->lastFacicData();
             $yCurrent = $last[911];
             $test = array_search($last[910], $collectionMask);