Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
style_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: style_mod.php,v 1.3 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 // $Id: style_mod.php,v 1.3 2005/07/08 15:29:51 eric Exp $
20 // $Source: /home/cvsroot/anakeen/freedom/core/Action/Appmng/style_mod.php,v $
21 // ---------------------------------------------------------------
22 // $Log: style_mod.php,v $
23 // Revision 1.3 2005/07/08 15:29:51 eric
24 // suppress CORE_USERDB
25 //
26 // Revision 1.2 2003/08/18 15:46:41 eric
27 // phpdoc
28 //
29 // Revision 1.1 2002/01/08 12:41:33 eric
30 // first
31 //
32 // Revision 1.1 2001/01/29 15:50:59 marianne
33 // prise en compte de la gestion des parametres
34 //
35 //
36 // ---------------------------------------------------------------
37 include_once ("Class.SubForm.php");
38 include_once ("Class.Param.php");
39 // -----------------------------------
40 function style_mod(&$action)
41 {
42  // -----------------------------------
43  // Get all the params
44  $style_id = GetHttpVars("id");
45  $creation = GetHttpVars("creation");
46  $name = GetHttpVars("name");
47  if ($creation == "Y") {
48  $ParamCour = new Param($action->GetParam("CORE_DB"));
49  } else {
50  $ParamCour = new Param($action->GetParam("CORE_DB") , array(
51  $style_id,
52  $name
53  ));
54  }
55  $ParamCour->key = $style_id;
56  $ParamCour->name = GetHttpVars("name");
57  $ParamCour->val = GetHttpVars("val");
58  if ($creation == "Y") {
59  $res = $ParamCour->Add();
60  if ($res != "") {
61  $txt = $action->text("err_add_param") . " : $res";
62  $action->Register("err_add_parameter", AddSlashes($txt));
63  }
64  } else {
65  $res = $ParamCour->Modify();
66  if ($res != "") {
67  $txt = $action->text("err_mod_param") . " : $res";
68  $action->Register("err_add_parameter", AddSlashes($txt));
69  }
70  }
71  redirect($action, "APPMNG", "STYLELIST");
72 }
73 ?>
← centre documentaire © anakeen - published under CC License - Dynacase