Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
generic_prefs.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 choose preferences
9  *
10  * @author Anakeen 2007
11  * @version $Id: generic_prefs.php,v 1.2 2007/05/04 16:11:40 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.Doc.php");
20 include_once ("GENERIC/generic_util.php");
22 {
23 
24  $famid = GetHttpVars("famid"); // family id
25  $dirid = GetHttpVars("dirid"); // last searched
26  $action->parent->AddJsRef($action->GetParam("CORE_JSURL") . "/resizeimg.js");
27 
28  $dbaccess = $action->getParam("FREEDOM_DB");
29  $fdoc = new_doc($dbaccess, $famid);
30  if (!$fdoc->isAlive()) {
31  $action->addWarningMsg(sprintf(_("Family (#%s) not exists") , $famid));
32  redirect($action, "GENERIC", "GENERIC_LOGO", $action->GetParam("CORE_STANDURL"));
33  }
34 
35  $action->lay->set("famtitle", $fdoc->title);
36  $action->lay->set("famid", $famid);
37  $action->lay->set("dirid", $dirid);
38 
39  $tabletters = getTabLetter($action, $famid);
40  if ($tabletters == 'N') $action->lay->set("lettercheck", "");
41  else $action->lay->set("lettercheck", "checked");
42 
43  $inh = getInherit($action, $famid);
44  if ($inh == 'N') $action->lay->set("inhcheck", "");
45  else $action->lay->set("inhcheck", "checked");
46 
47  $fchild = $fdoc->GetChildFam();
48  $action->lay->set("viewinh", (count($fchild) > 0));
49  if (count($fchild) > 0) {
50  foreach ($fchild as $k => $v) {
51  $tftitle[] = $v["title"];
52  }
53  $action->lay->set("ftitle", implode(", ", $tftitle));
54  }
55 
56  $viewmode = getViewMode($action, $famid);
57  $splitmode = getSplitMode($action, $famid);
58 
59  $action->lay->set("iconsrc", $fdoc->getIcon());
60  $action->lay->set("dispocheck1", "");
61  $action->lay->set("dispocheck2", "");
62  $action->lay->set("dispocheck3", "");
63  $action->lay->set("dispocheck4", "");
64  if (($viewmode == 'abstract') && ($splitmode == 'V')) $action->lay->set("dispocheck1", "checked");
65  if (($viewmode == 'column') && ($splitmode == 'H')) $action->lay->set("dispocheck2", "checked");
66  if (($viewmode == 'column') && ($splitmode == 'V')) $action->lay->set("dispocheck3", "checked");
67  if (($viewmode == 'abstract') && ($splitmode == 'H')) $action->lay->set("dispocheck4", "checked");
68 }
69 ?>
← centre documentaire © anakeen - published under CC License - Dynacase