*/ include("session.php"); if(file_exists($_SESSION['config']['lang'].'.php')) { include($_SESSION['config']['lang'].'.php'); } else { $_SESSION['error'] = "Language file missing...
"; } require_once("class_functions.php"); require_once("class_db.php"); require_once("class_workflow.php"); $workf = new workflow(); $db = new dbquery(); $db->connect(); $table = "res_x"; if($_REQUEST['action'] == "remove" && isset($_REQUEST['id']) && !empty($_REQUEST['id'])) { $db->query("select RES_ID, DOCSERVER_ID, PATH, FILENAME, FORMAT FROM ".$table." where RES_ID = ".$_REQUEST['id']); $line = $db->fetch_object(); $docserver = $line->DOCSERVER_ID; $path = $line->PATH; $filename = $line->FILENAME; $format = $line->FORMAT; $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); //echo $file; if(!empty($file) && isset($file)) { //unlink($file); } $db->query("Delete from ".$table." where RES_ID = ".$_REQUEST['id']); if(isset($_REQUEST['ticket']) && !empty($_REQUEST['ticket'])){ $db->query("Delete from ".$_SESSION['tablename']['tickets_amounts']." where TICKET_ID = ".$_REQUEST['ticket']); $db->query("Delete from ".$_SESSION['tablename']['tickets']." where TICKET_ID = ".$_REQUEST['ticket']); if($_SESSION['history']['ticketdel'] == "true") { require_once("class_history.php"); $users = new history(); $users->add($_SESSION['tablename']['tickets'], $_REQUEST['ticket'],"DEL", _TICKET_DELETED." : ".$_SESSION['courrier']['identifier']." (".$_SESSION['courrier']['type_id'].")"); } } else{ if($_SESSION['history']['resdel'] == "true") { require_once("class_history.php"); $users = new history(); $users->add($table, $_SESSION['courrier']['res_id'],"DEL", _ANSWER_DELETED." : ".$_SESSION['courrier']['identifier']." (".$_SESSION['courrier']['type_id'].")"); } } for($i=0; $i < count($_SESSION['courrier']['reponses']) ; $i++) { if($_SESSION['courrier']['reponses'][$i]['ID'] == $_REQUEST['id']) { unset($_SESSION['courrier']['reponses'][$i]); $_SESSION['courrier']['reponses'] = array_values($_SESSION['courrier']['reponses']); break; } } } unset($_SESSION['courrier']['reponses']); $_SESSION['courrier']['reponses'] = array(); $db->query("select RES_ID, TITLE, CREATION_DATE, SOURCE, ORIGIN from ".$table." where RELATION = '".$_SESSION['courrier']['res_id']."' order by CREATION_DATE DESC "); while($line = $db->fetch_object()) { array_push($_SESSION['courrier']['reponses'], array( "ID" => $line->RES_ID, "TITRE" => stripslashes($line->TITLE), "DATE" => $line->CREATION_DATE, 'SOURCE' => $line->SOURCE, "TICKET" => $line->ORIGIN)); } ?> <?php echo _TITLE_PROCESS; ?>
type_have_workflow($_SESSION['courrier']['type_id'])){ //if($ticketId = $workf->have_tiket($_SESSION['courrier']['res_id'])){ ?>

>
   
/view.gif' alt="" title="" border='0' /> /modif_liste.png' alt="" title="" border='0' /> /modif_liste.png' alt="" title="" border='0' />