Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
freedom_searchprocess.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  * Interface to create new execution from batch
9  *
10  * @author Anakeen 2000
11  * @version $Id: freedom_searchprocess.php,v 1.1 2005/08/19 16:14:50 eric Exp $
12  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13  * @package FDL
14  * @subpackage
15  */
16 /**
17  */
18 
19 include_once ("FDL/Class.DocSearch.php");
20 include_once ("FDL/freedom_util.php");
21 include_once ("GENERIC/generic_util.php");
22 /**
23  * View a document
24  * @param Action &$action current action
25  * @global id Http var : document identificator for process document
26  * @global target Http var : window name when click on document
27  */
29 {
30  // -----------------------------------
31  // Get all the params
32  $docid = GetHttpVars("id"); // id doc to search
33  $target = GetHttpVars("target"); //
34  $dbaccess = $action->GetParam("FREEDOM_DB");
35 
36  if (($famid !== 0) && (!is_numeric($famid))) {
38  }
39  if ($docid == "") $action->exitError(_("related search aborted : no parameter found"));
40 
42 
43  $sdoc = createDoc($dbaccess, 5); //new DocSearch($dbaccess);
44  $sdoc->doctype = 'T'; // it is a temporary document (will be delete after)
45  $sdoc->title = sprintf(_("process search comes from %s") , $doc->title);
46 
47  $sdoc->Add();
48 
49  $sqlfilter[] = "locked != -1";
50 
51  $tdoc = $doc->getRevisions("TABLE");
52  $tid = array();
53  foreach ($tdoc as $k => $v) $tid[] = $v["id"];
54 
55  $sqlfilter[] = GetSqlCond($tid, 'exec_idref');
56  // $sqlfilter[]= "doctype ='F'";
57  // $sqlfilter[]= "usefor != 'D'";
58  // $sqlfilter[]= "(".implode(") OR (",$tfil).")";
59  $query = getSqlSearchDoc($dbaccess, 0, getFamIdFromName($dbaccess, "EXEC") , $sqlfilter);
60  $sdoc->AddQuery($query);
61  redirect($action, "FREEDOM", "FREEDOM_VIEW&target=$target&view=column&dirid=" . $sdoc->id);
62  // redirect($action,GetHttpVars("app"),"GENERIC_LIST&dirid=".$sdoc->id."&famid=$famid&catg=0");
63 
64 
65 }
66 ?>
← centre documentaire © anakeen - published under CC License - Dynacase