Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
deldirfile.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
5  * @package FDL
6 */
7 /**
8  * Generated Header (not documented yet)
9  *
10  * @author Anakeen 2000
11  * @version $Id: deldirfile.php,v 1.14 2005/06/28 08:37:46 eric Exp $
12  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13  * @package FDL
14  * @subpackage GED
15  */
16 /**
17  */
18 
19 include_once ("FDL/Class.Dir.php");
20 include_once ("FDL/freedom_util.php");
21 // -----------------------------------
22 function deldirfile(&$action)
23 {
24  // -----------------------------------
25 
26  // Get all the params
27  $dirid = GetHttpVars("dirid");
28  $docid = GetHttpVars("docid");
29  $folio = GetHttpVars("folio", "N") == "Y"; // return in folio
30  // print "deldirfile :: dirid:$dirid , docid:$docid";
31  $dbaccess = $action->GetParam("FREEDOM_DB");
32 
33  $dir = new_Doc($dbaccess, $dirid); // use initial id for directories
34  $err = $dir->DelFile($docid);
35  if ($err != "") $action->exitError($err);
36 
37  if ($folio) {
39  $refreshtab = (($doc->doctype == "F") ? "N" : "Y");
40  redirect($action, "FREEDOM", "FOLIOLIST&refreshtab=$refreshtab&dirid=" . $dir->initid);
41  } else redirect($action, "FREEDOM", "FREEDOM_VIEW&dirid=" . $dir->initid);
42 }
43 ?>
← centre documentaire © anakeen - published under CC License - Dynacase