--- a/punbb/admin_options.php Wed Jul 11 21:28:39 2007 -0400
+++ b/punbb/admin_options.php Thu Jul 12 01:04:01 2007 -0400
@@ -26,12 +26,15 @@
// Tell header.php to use the admin template
define('PUN_ADMIN_CONSOLE', 1);
-define('PUN_ROOT', './');
-require PUN_ROOT.'include/common.php';
+//define('PUN_ROOT', './');
+//require PUN_ROOT.'include/common.php';
+
+global $pun_db, $pun_user, $pun_config, $lang_common;
+
require PUN_ROOT.'include/common_admin.php';
-if ($pun_user['g_id'] > PUN_ADMIN)
+if ($pun_user['g_id'] < PUN_ADMIN)
message($lang_common['No permission']);
@@ -126,11 +129,11 @@
if (array_key_exists('o_'.$key, $pun_config) && $pun_config['o_'.$key] != $input)
{
if ($input != '' || is_int($input))
- $value = '\''.$db->escape($input).'\'';
+ $value = '\''.$pun_db->escape($input).'\'';
else
$value = 'NULL';
- $db->query('UPDATE '.$db->prefix.'config SET conf_value='.$value.' WHERE conf_name=\'o_'.$db->escape($key).'\'') or error('Unable to update board config', __FILE__, __LINE__, $db->error());
+ $pun_db->query('UPDATE '.$pun_db->prefix.'config SET conf_value='.$value.' WHERE conf_name=\'o_'.$pun_db->escape($key).'\'') or error('Unable to update board config', __FILE__, __LINE__, $pun_db->error());
}
}
@@ -138,7 +141,7 @@
require_once PUN_ROOT.'include/cache.php';
generate_config_cache();
- redirect('admin_options.php', 'Options updated. Redirecting …');
+ pun_redirect('admin_options.php', 'Options updated. Redirecting …');
}