![]() |
|---|
| [ Index ] |
Source Code Reference for V1.00 |
[Summary view] [Print] [Text view]
1 <?php /* $Id: do_systemconfig_aed.php 156 2008-04-11 15:47:40Z pedroix $ $URL: https://web2project.svn.sourceforge.net/svnroot/web2project/trunk/modules/system/do_systemconfig_aed.php $ */ 2 if (!defined('W2P_BASE_DIR')) { 3 die('You should not access this file directly.'); 4 } 5 6 $perms = &$AppUI->acl(); 7 if (!$perms->checkModule('system', 'edit')) { 8 $AppUI->redirect('m=public&a=access_denied'); 9 } 10 11 $obj = new CConfig(); 12 13 // set all checkboxes to false 14 // overwrite the true/enabled/checked checkboxes later 15 $q = new DBQuery; 16 $q->addTable('config'); 17 $q->addUpdate('config_value', 'false'); 18 $q->addWhere('config_type = \'checkbox\''); 19 $rs = $q->loadResult(); 20 $q->clear(); 21 22 foreach ($_POST['w2Pcfg'] as $name => $value) { 23 $obj->config_name = $name; 24 $obj->config_value = $value; 25 26 // grab the appropriate id for the object in order to ensure 27 // that the db is updated well (config_name must be unique) 28 $obj->config_id = $_POST['w2PcfgId'][$name]; 29 30 // prepare (and translate) the module name ready for the suffix 31 $AppUI->setMsg('System Configuration'); 32 if (($msg = $obj->store())) { 33 $AppUI->setMsg($msg, UI_MSG_ERROR); 34 } else { 35 $AppUI->setMsg('updated', UI_MSG_OK, true); 36 } 37 } 38 $AppUI->redirect(); 39 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Jan 8 03:00:03 2009 | Cross-referenced by PHPXref 0.7 |