Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
action_edit.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  * Edit parameters for actions
9  *
10  * @author Anakeen 2000
11  * @version $Id: action_edit.php,v 1.4 2005/07/08 15:29:51 eric Exp $
12  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13  * @package FDL
14  * @subpackage APPMNG
15  */
16 /**
17  */
18 
19 include_once ("Class.SubForm.php");
20 include_once ("Class.Action.php");
21 // -----------------------------------
22 function action_edit(&$action)
23 {
24  // -----------------------------------
25  // Get all the params
26  global $_POST;
27  $id = GetHttpVars("id");
28  $appl_id = $action->Read("action_appl_id");
29 
30  if ($id == "") {
31  $action->lay->Set("name", "");
32  $action->lay->Set("short_name", "");
33  $action->lay->Set("long_name", "");
34  $action->lay->Set("acl", "");
35  $action->lay->Set("root", "");
36  $action->lay->Set("toc", "");
37  $action->lay->Set("id", "");
38  $action->lay->Set("TITRE", $action->text("titlecreateaction"));
39  $action->lay->Set("BUTTONTYPE", $action->text("butcreate"));
40  if ($action->HasPermission("ADMIN")) {
41  $seldom = 1;
42  } else if ($action->HasPermission("DOMAIN_MASTER")) {
43  $seldom = $action->ActionCour->iddomain;
44  } else {
45  $action->info("Not Allowed Access Attempt");
46  }
47  $action->lay->set("openaccess", "");
48  } else {
49  $ActionCour = new Action($action->GetParam("CORE_DB") , $id);
50  $action->lay->Set("id", $id);
51  $action->lay->Set("name", $ActionCour->name);
52  $action->lay->Set("short_name", $ActionCour->short_name);
53  $action->lay->Set("long_name", $ActionCour->long_name);
54  $action->lay->Set("acl", $ActionCour->acl);
55  $action->lay->Set("root", $ActionCour->root);
56  $action->lay->Set("toc", $ActionCour->toc);
57  $action->lay->Set("TITRE", $action->text("titlemodifyaction"));
58  $action->lay->Set("BUTTONTYPE", $action->text("butmodify"));
59  $action->lay->set("openaccess", $ActionCour->openaccess);
60  }
61 
62  $tab = array();
63  if ($ActionCour->available == 'Y') {
64  $tab[0]["selected"] = "selected";
65  $tab[1]["selected"] = "";
66  } else {
67  $tab[0]["selected"] = "";
68  $tab[1]["selected"] = "selected";
69  }
70  $tab[0]["available"] = "Y";
71  $tab[1]["available"] = "N";
72 
73  $action->lay->SetBlockData("SELECTAVAILABLE", $tab);
74  unset($tab);
75 
76  $action->parent->AddJsRef("APPMNG/Layout/action_control.js");
77 }
78 ?>
← centre documentaire © anakeen - published under CC License - Dynacase