*/ require("class_functions.php"); require_once("class_db.php"); require_once("class_history.php"); require_once("class_workflow.php"); require_once("class_letterbox.php"); require_once("class_diffusion.php"); include("session.php"); if(file_exists($_SESSION['config']['lang'].'.php')) { include($_SESSION['config']['lang'].'.php'); } else { $_SESSION['error'] = "Language file missing..."; } $table="res_x"; $_SESSION['close'] = array(); if(isset($_REQUEST['validclose'])) { if(isset($_REQUEST['check_answer'])) { ?> connect(); //echo $_SESSION['chosen_doc'][0]; for($i=0;$iquery("SELECT CUSTOM_T17, CUSTOM_T5, CUSTOM_T6, CUSTOM_T7, CUSTOM_T8, CUSTOM_T15, CUSTOM_T16, CUSTOM_T1 FROM ".$table." WHERE RES_ID = ".$s_id); while($resi = $conn->fetch_object()) { $notes = $resi-> CUSTOM_T1; $custom_t5 = $resi-> CUSTOM_T5; $custom_t15 = $resi-> CUSTOM_T15; $custom_t6 = $resi-> CUSTOM_T6; $custom_t7 = $resi-> CUSTOM_T7; $info_autre = $resi-> CUSTOM_T8; $custom_t16 = $resi-> CUSTOM_T16; $custom_t17 = $resi-> CUSTOM_T17; } if (isset($_POST['notes'])) {$notes=$_POST['notes'];} if (isset($_POST['rep_courrier'])){$custom_t5=$_POST['rep_courrier'];} if (isset($_POST['rep_AR'])) {$custom_t15=$_POST['rep_AR'];} if (isset($_POST['direct'])) {$custom_t6=$_POST['direct'];} if (isset($_POST['mail'])) {$custom_t7=$_POST['mail'];} if (($_POST['autre']=="true") && $_POST['info_autre'] <> html_entity_decode("["._DEFINE."]", ENT_NOQUOTES, 'UTF-8')) {$info_autre=$_POST['info_autre'];} else {$info_autre='false';} if (isset($_POST['fax'])) {$custom_t16=$_POST['fax'];} if (isset($_POST['none'])) {$custom_t17=$_POST['none'];} //On met à jour l'ensemble des valeurs de traitement de courrier $conn->query( "UPDATE ".$table." SET CUSTOM_T17='".$custom_t17."' ,CUSTOM_T5='".$custom_t5."' ,CUSTOM_T6='".$custom_t6."' ,CUSTOM_T7='".$custom_t7."' ,CUSTOM_T8='".$info_autre."' ,CUSTOM_T15='".$custom_t15."' ,CUSTOM_T16='".$custom_t16."',CUSTOM_T1='".addslashes($notes)."' WHERE RES_ID=".$s_id); //$conn->show(); exit(); $conn->query( "UPDATE ".$table." SET STATUS = 'END', CUSTOM_D3 = now() WHERE RES_ID = ".$s_id); if($_SESSION['history']['resup'] == "true") { $hist = new history(); $hist->add($table, $s_id,"CLO", _MAIL_PROCESS_END_NUM.$s_id." (".$_SESSION['courrier']['type_id'].")"); } $db = new dbquery(); $db->connect(); $conn->query("select SOURCE, TITLE, FILESIZE, PATH, DOCSERVER_ID, FILENAME, RES_ID from ".$table." where RELATION = ".$s_id); while($res = $conn->fetch_object()) { $docserver = $res->DOCSERVER_ID; $path = $res->PATH; $filename = $res->FILENAME; $filesize = $res->FILESIZE; $title = $res->TITLE; $res_id = $res->RES_ID; $source = $res->SOURCE; $db->query("select PATH_TEMPLATE from ".$_SESSION['tablename']['docservers']." where DOCSERVER_ID = '".$docserver."'"); $line_doc = $db->fetch_object(); $docserver = $line_doc->PATH_TEMPLATE; $file = $docserver.$path.strtolower($filename); /*if ($_SESSION['config']['system'] == "true") { $file = str_replace("#","/",$file); } else { $file = str_replace("#","\\",$file); } */ $file = str_replace("#",DIRECTORY_SEPARATOR,$file); if($source == 'Editor') { $myfile = fopen($file, "r"); if(!$myfile) { $_SESSION['error'] .= _FILE_OPEN_ERROR.'.'; header("location: process_frame?id=".$s_id); exit; } $data = fread($myfile, $filesize+1); fclose($myfile); $data = stripslashes($data); $header = ' '.$title.' '; $footer = ' '; $oldfile = fopen($file, 'w'); if(!$oldfile) { $_SESSION['error'] .= _FILE_OPEN_ERROR.'.'; header("location: process_frame?id=".$_SESSION['courrier']['res_id']); exit; } $data = str_replace('query("update ".$table." set FILESIZE = ".$filesize.", FORMAT = 'HTML', FINGERPRINT = '".$md5."', FILENAME = '".$newfilename."', SOURCE = 'Local File' where RES_ID = ".$res_id); } elseif($source == 'Local File') { $md5 = md5($file); $db->query(" Update ".$table." set FINGERPRINT = '".$md5."'"); } } } } $_SESSION['chosen_doc'] = array(); ?> 0) { echo "onLoad=\" setTimeout(function(){window.parent.top.close();},".($_SESSION['current_basket']['locktime'] * 60 * 1000).");\""; } ?>> '.$_SESSION['chosen_doc'][0]; for($i=1;$i : " onfocus="if(this.value==''){this.value='';}" /> :
" onfocus="if(this.value==''){this.value='';}" />
: