Core  3.2
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  * @package FDL
5 */
6 /**
7  * Interface to choose preferences
8  *
9  * @author Anakeen
10  * @version $Id: generic_prefs.php,v 1.2 2007/05/04 16:11:40 eric Exp $
11  * @package FDL
12  * @subpackage
13  */
14 /**
15  */
16 
17 include_once ("FDL/Class.Doc.php");
18 include_once ("GENERIC/generic_util.php");
20 {
21  $famid = $action->getArgument("famid"); // family id
22  $dirid = $action->getArgument("dirid"); // last searched
23  $onefamOrigin = $action->getArgument("onefam");
24  $action->parent->AddJsRef($action->GetParam("CORE_JSURL") . "/resizeimg.js");
25 
26  $dbaccess = $action->dbaccess;
27  $fdoc = new_doc($dbaccess, $famid);
28  if (!$fdoc->isAlive()) {
29  $action->addWarningMsg(sprintf(_("Family (#%s) not exists") , $famid));
30  redirect($action, "GENERIC", "GENERIC_LOGO", $action->GetParam("CORE_STANDURL"));
31  }
32 
33  $action->lay->set("famtitle", $fdoc->getHTMLTitle());
34  $action->lay->set("famid", $fdoc->id);
35  $action->lay->eset("dirid", $dirid);
36  $action->lay->set("onefam", urlencode($onefamOrigin));
37  $tabletters = getTabLetter($action, $famid);
38  if ($tabletters == 'Y') $action->lay->set("lettercheck", "checked");
39  else $action->lay->set("lettercheck", "");
40 
41  $inh = getInherit($action, $famid);
42  if ($inh == 'N') $action->lay->set("inhcheck", "");
43  else $action->lay->set("inhcheck", "checked");
44 
45  $fchild = $fdoc->GetChildFam();
46  $action->lay->set("viewinh", (count($fchild) > 0));
47  if (count($fchild) > 0) {
48  $tftitle = array();
49  foreach ($fchild as $k => $v) {
50  $tftitle[] = $v["title"];
51  }
52  $action->lay->set("ftitle", implode(", ", $tftitle));
53  }
54 
55  $viewmode = getViewMode($action, $famid);
56  $splitmode = getSplitMode($action, $famid);
57 
58  $action->lay->set("iconsrc", $fdoc->getIcon());
59  $action->lay->set("dispocheck1", "");
60  $action->lay->set("dispocheck2", "");
61  $action->lay->set("dispocheck3", "");
62  $action->lay->set("dispocheck4", "");
63  if (($viewmode == 'abstract') && ($splitmode == 'V')) $action->lay->set("dispocheck1", "checked");
64  if (($viewmode == 'column') && ($splitmode == 'H')) $action->lay->set("dispocheck2", "checked");
65  if (($viewmode == 'column') && ($splitmode == 'V')) $action->lay->set("dispocheck3", "checked");
66  if (($viewmode == 'abstract') && ($splitmode == 'H')) $action->lay->set("dispocheck4", "checked");
67 }
addWarningMsg($msg)
getSplitMode(Action &$action, $famid="")
global $action
getViewMode(Action &$action, $famid="")
generic_prefs(Action &$action)
getTabLetter(Action &$action, $famid="")
static getArgument($k, $def= '')
$dbaccess
Definition: checkVault.php:17
getInherit(Action &$action, $famid="")
← centre documentaire © anakeen