Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
app_mod.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: $
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.Application.php");
21 // -----------------------------------
22 function app_mod(Action & $action)
23 {
24  // -----------------------------------
25  // Get all the params
26  $id = $action->getArgument("id");
27 
28  if ($id == "") {
29  $AppCour = new Application($action->GetParam("CORE_DB"));
30  } else {
31  $AppCour = new Application($action->GetParam("CORE_DB") , $id);
32  }
33  $AppCour->displayable = $action->getArgument("displayable");
34  $AppCour->available = $action->getArgument("available");
35  $AppCour->machine = $action->getArgument("machine");
36  $AppCour->ssl = $action->getArgument("ssl");
37 
38  if ($id == "") {
39  $res = $AppCour->Add();
40  if ($res != "") {
41  $txt = $action->text("err_add_application") . " : $res";
42  $action->Register("USERS_ERROR", AddSlashes($txt));
43  }
44  } else {
45  $res = $AppCour->Modify();
46  if ($res != "") {
47  $txt = $action->text("err_mod_application") . " : $res";
48  $action->Register("USERS_ERROR", AddSlashes($txt));
49  }
50  }
51  redirect($action, "APPMNG", "");
52 }
53 ?>
← centre documentaire © anakeen - published under CC License - Dynacase