Execute(); //End Restrict Access To Page //start Trigger_FileUpload trigger function Trigger_FileUpload(&$tNG) { $uploadObj = new tNG_FileUpload($tNG); $uploadObj->setFormFieldName("file_upload"); $uploadObj->setFolder("files/"); $uploadObj->setMaxSize(10240); $uploadObj->setAllowedExtensions("zip,rar,7z,jpg,tif,doc,rtf,pdf,ai,ps,bmp,psd,zip,rar,txt,indd,cdr,ttf"); $uploadObj->setRename("custom"); $uploadObj->setRenameRule("{POST.ID_order}_{ID_file}_{SESSION.kt_key}"); return $uploadObj->Execute(); } //end Trigger_FileUpload trigger // Start trigger $formValidation = new tNG_FormValidation(); $formValidation->addField("filename", true, "text", "", "", "", ""); $tNGs->prepareValidation($formValidation); // End trigger if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $currentPage = $_SERVER["PHP_SELF"]; $maxRows_Rs_orders = 5; $pageNum_Rs_orders = 0; if (isset($_GET['pageNum_Rs_orders'])) { $pageNum_Rs_orders = $_GET['pageNum_Rs_orders']; } $startRow_Rs_orders = $pageNum_Rs_orders * $maxRows_Rs_orders; $KTColParam1_Rs_orders = "0"; if (isset($_SESSION["kt_login_id"])) { $KTColParam1_Rs_orders = $_SESSION["kt_login_id"]; } mysql_select_db($database_azzurra, $azzurra); $query_Rs_orders = sprintf("SELECT orders.ID_order, orders.descr, orders.data, states.state_desc FROM (orders LEFT JOIN states ON states.ID_state=orders.ID_state) WHERE orders.ID_user=%s ORDER BY orders.ID_order DESC ", GetSQLValueString($KTColParam1_Rs_orders, "int")); $query_limit_Rs_orders = sprintf("%s LIMIT %d, %d", $query_Rs_orders, $startRow_Rs_orders, $maxRows_Rs_orders); $Rs_orders = mysql_query($query_limit_Rs_orders, $azzurra) or die(mysql_error()); $row_Rs_orders = mysql_fetch_assoc($Rs_orders); if (isset($_GET['totalRows_Rs_orders'])) { $totalRows_Rs_orders = $_GET['totalRows_Rs_orders']; } else { $all_Rs_orders = mysql_query($query_Rs_orders); $totalRows_Rs_orders = mysql_num_rows($all_Rs_orders); } $totalPages_Rs_orders = ceil($totalRows_Rs_orders/$maxRows_Rs_orders)-1; $queryString_Rs_orders = ""; if (!empty($_SERVER['QUERY_STRING'])) { $params = explode("&", $_SERVER['QUERY_STRING']); $newParams = array(); foreach ($params as $param) { if (stristr($param, "pageNum_Rs_orders") == false && stristr($param, "totalRows_Rs_orders") == false) { array_push($newParams, $param); } } if (count($newParams) != 0) { $queryString_Rs_orders = "&" . htmlentities(implode("&", $newParams)); } } $queryString_Rs_orders = sprintf("&totalRows_Rs_orders=%d%s", $totalRows_Rs_orders, $queryString_Rs_orders); // Make an insert transaction instance $ins_files = new tNG_insert($conn_azzurra); $tNGs->addTransaction($ins_files); // Register triggers $ins_files->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "submit_upload"); $ins_files->registerTrigger("END", "Trigger_Default_Redirect", 99, "area_files.php?ID_order={POST.ID_order}&ID_user={GET.ID_user}"); $ins_files->registerTrigger("AFTER", "Trigger_FileUpload", 97); $ins_files->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation); // Add columns $ins_files->setTable("files"); $ins_files->addColumn("ID_order", "NUMERIC_TYPE", "POST", "ID_order"); $ins_files->addColumn("filename", "STRING_TYPE", "FILES", "file_upload"); $ins_files->addColumn("descr", "STRING_TYPE", "POST", "desc_upload", ""); $ins_files->addColumn("ID_user", "NUMERIC_TYPE", "SESSION", "kt_login_id", ""); $ins_files->setPrimaryKey("ID_file", "NUMERIC_TYPE"); // Execute all the registered transactions $tNGs->executeTransactions(); // Get the transaction recordset $rsfiles = $tNGs->getRecordset("files"); $row_rsfiles = mysql_fetch_assoc($rsfiles); $totalRows_rsfiles = mysql_num_rows($rsfiles); ?> Azzurra Print | Tipografia - Litografia - Digital Print - Serigrafia displayValidationRules();?>


Questa sezione è predisposta per la l'invio dei files tramite Internet; è necessario selezionare l'ordine, sfogliare il file da trasferire e dare una descrizione (opzionale). Per la gestione e la cancellazione dei files inviati basta andare nella sezione apposita Gestione ordini.

0) {?>
Ordini visualizzati: da a per un totale di
  ID Data Stato Descrizione
checked value="" id="RadioGroup_orders_">

0) { // Show if not first page ?> "> 0) { // Show if not first page ?> "> "> ">

Invio file (max. 10 MB):
File
Descrizione
  getErrorMsg(); }; ?>
Le estensioni accettate sono: zip, rar, 7z, jpg, tif, doc, rtf, pdf, ai, ps, bmp, psd, txt, indd, cdr, ttf. Si consiglia in ogni caso di comprimere il/i file in formato ZIP.
Non ci sono ordini presenti.


getErrorMsg(); ?>