Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
edit_search_fulltext.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: edit_search_fulltext.php,v 1.5 2005/02/08 11:34:37 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 // $Id: edit_search_fulltext.php,v 1.5 2005/02/08 11:34:37 eric Exp $
20 // $Source: /home/cvsroot/anakeen/freedom/freedom/Action/Freedom/edit_search_fulltext.php,v $
21 // ---------------------------------------------------------------
22 include_once ("FDL/Lib.Dir.php");
23 include_once ("FREEDOM/search_fulltext.php");
24 // -----------------------------------
26 {
27  // -----------------------------------
28  if (!extension_loaded('mnogosearch')) search_error($action, _("mnogosearch php extension not loaded"));
29 
30  $tmatch = array(
31  UDM_MODE_ALL => _("all") ,
32  UDM_MODE_ANY => _("any") ,
33  UDM_MODE_BOOL => _("boolean") ,
34  UDM_MODE_PHRASE => _("full phrase")
35  );
36  $tsearch = array(
37  UDM_MATCH_WORD => _("word") ,
38  UDM_MATCH_SUBSTR => _("substring") ,
39  UDM_MATCH_BEGIN => _("starting") ,
40  UDM_MATCH_END => _("ending")
41  );
42 
43  $dbaccess = $action->GetParam("FREEDOM_DB");
44  // Get all the params
45  $dir = GetHttpVars("dirid"); // insert search in this folder
46  $action->lay->Set("dirid", $dir);
47 
48  while (list($k, $v) = each($tmatch)) {
49  $selectmatch[$k]["idmatch"] = $k;
50  $selectmatch[$k]["matchdescr"] = $action->Text($v);
51  }
52 
53  while (list($k, $v) = each($tsearch)) {
54  $selectsearchfor[$k]["idsearchfor"] = $k;
55  $selectsearchfor[$k]["searchfordescr"] = $action->Text($v);
56  }
57 
58  $tclassdoc = GetClassesDoc($dbaccess, $action->user->id, 0, "TABLE");
59 
60  while (list($k, $cdoc) = each($tclassdoc)) {
61  $selectclass[$k]["idcdoc"] = $cdoc["initid"];
62  $selectclass[$k]["classname"] = $cdoc["title"];
63  }
64 
65  $action->lay->SetBlockData("SELECTMATCH", $selectmatch);
66  $action->lay->SetBlockData("SELECTSEARCHFOR", $selectsearchfor);
67  $action->lay->SetBlockData("SELECTCLASS", $selectclass);
68 }
69 ?>
← centre documentaire © anakeen - published under CC License - Dynacase