Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
fulleditdsearch.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 /**
7  * Full Text Search document
8  *
9  * @author Anakeen
10  * @version $Id: fulleditdsearch.php,v 1.1 2007/10/17 14:27:28 marc Exp $
11  * @package FDL
12  * @subpackage GED
13  */
14 /**
15  */
16 
17 include_once ("FDL/Class.Dir.php");
18 include_once ("FDL/Lib.Dir.php");
19 include_once ("FDL/freedom_util.php");
20 /**
21  * Interface Fulltext Detailled Search document
22  * @param Action &$action current action
23  * @global keyword string Http var : word to search in any values
24  * @global famid int Http var : restrict to this family identioficator
25  * @global start int Http var : page number
26  * @global dirid int Http var : search identifier
27  */
28 function fulleditdsearch(Action & $action)
29 {
30 
31  $famid = $action->getArgument("famid", 0);
32  $substitute = ($action->getArgument("substitute") == "yes");
33 
34  $dbaccess = $action->dbaccess;
35  if (!is_numeric($famid)) $famid = getFamIdFromName($dbaccess, $famid);
36  if ($famid == 0) $famid = 7; // FILE family
37  $action->lay->set("searchtitle", _("detailled search"));
38  $action->lay->set("substitute", (bool)$substitute);
39 
40  $tclassdoc = getNonSystemFamilies($dbaccess, $action->user->id, "TABLE");
41  $selectclass = array();
42  foreach ($tclassdoc as $k => $cdoc) {
43  $selectclass[$k]["idcdoc"] = $cdoc["initid"];
44  $selectclass[$k]["classname"] = $cdoc["title"];
45  $selectclass[$k]["famselect"] = ($cdoc["initid"] == $famid) ? "selected" : "";
46  }
47  $action->lay->SetBlockData("SELECTFAM", $selectclass);
48 
49  if ($famid > 0) {
50  /**
51  * @var \Dcp\Family\DSEARCH $search
52  */
54 
55  $search->setValue("se_famid", $famid);
56  $search->setValue("se_latest", "yes");
57  $search->lay = $action->lay;
58  $search->editdsearch();
59 
60  $fdoc = new_doc($dbaccess, $famid);
61  $action->lay->set("famicon", $fdoc->getIcon());
62  $action->lay->set("famid", $fdoc->id);
63  }
64 }
global $action
getNonSystemFamilies($dbaccess, $userid, $qtype="TABLE")
Definition: Lib.Dir.php:952
$search
getFamIdFromName($dbaccess, $name)
static getArgument($k, $def= '')
$dbaccess
Definition: checkVault.php:17
createTmpDoc($dbaccess, $fromid, $defaultvalue=true)
← centre documentaire © anakeen