Platform
3.1
PHP API documentation
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Pages
generic_modprefs.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
* Modify family preferences
9
*
10
* @author Anakeen 2007
11
* @version $Id: generic_modprefs.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"
);
21
function
generic_modprefs
(&
$action
)
22
{
23
24
$famid
=
GetHttpVars
(
"famid"
);
// family id
25
$dirid =
GetHttpVars
(
"dirid"
);
// last searched
26
$dispo =
GetHttpVars
(
"dispo"
);
// last searched
27
$letters =
GetHttpVars
(
"letters"
);
// want tab letters
28
$inherit =
GetHttpVars
(
"inherit"
);
// search in inherit
29
30
$dbaccess
=
$action
->getParam(
"FREEDOM_DB"
);
31
$fdoc
= new_doc(
$dbaccess
,
$famid
);
32
if
(!
$fdoc
->isAlive()) {
33
$action
->exitError(sprintf(_(
"Family (#%s) not exists"
) ,
$famid
));
34
}
35
36
switch
($dispo) {
37
case
1:
38
$split =
'V'
;
39
$visu =
'abstract'
;
40
break
;
41
42
case
2:
43
$split =
'H'
;
44
$visu =
'column'
;
45
break
;
46
47
case
3:
48
$split =
'V'
;
49
$visu =
'column'
;
50
break
;
51
52
case
4:
53
$split =
'H'
;
54
$visu =
'abstract'
;
55
break
;
56
}
57
if
($dispo > 0) {
58
setSplitMode
(
$action
,
$famid
, $split);
59
setViewMode
(
$action
,
$famid
, $visu);
60
}
61
62
if
($letters == 1)
setTabLetter
(
$action
,
$famid
,
'Y'
);
63
else
setTabLetter
(
$action
,
$famid
,
'N'
);
64
if
($inherit == 1)
setInherit
(
$action
,
$famid
,
'Y'
);
65
else
setInherit
(
$action
,
$famid
,
'N'
);
66
67
$action
->lay->set(
"famtitle"
,
$fdoc
->title);
68
$action
->lay->set(
"famid"
,
$famid
);
69
$action
->lay->set(
"dirid"
, $dirid);
70
redirect(
$action
,
"GENERIC"
,
"GENERIC_TAB&tab=0&dirid=$dirid&famid=$famid"
,
$action
->GetParam(
"CORE_STANDURL"
));
71
}
72
?>
← centre documentaire
© anakeen
- published under
CC License
-
Dynacase