Here I tried to mix the files admin_options.php and admin_reports.php. But nothing happens...
Please help me...
Thx Robin
?dit: Now all works
<?php
/***********************************************************************
Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
This file is part of PunBB.
PunBB is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.
PunBB is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston,
MA 02111-1307 USA
************************************************************************/
// Tell header.php to use the admin template
define('PUN_ADMIN_CONSOLE', 1);
define('PUN_ROOT', './');
require PUN_ROOT.'include/common.php';
require PUN_ROOT.'include/common_admin.php';
if ($pun_user['g_id'] > PUN_MOD)
message($lang_common['No permission']);
if (isset($_POST['form_sent']))
{
$form = array_map('trim', $_POST['form']);
if ($form['announcement_message'] != '')
$form['announcement_message'] = pun_linebreaks($form['announcement_message']);
else
{
$form['announcement_message'] = 'Enter your announcement here.';
if ($form['announcement'] == '1')
$form['announcement'] = '0';
}
while (list($key, $input) = @each($form))
{
// Only update values that have changed
if (array_key_exists('o_'.$key, $pun_config) && $pun_config['o_'.$key] != $input)
{
if ($input != '' || is_int($input))
$value = '\''.$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());
}
}
// Regenerate the config cache
require_once PUN_ROOT.'include/cache.php';
generate_config_cache();
redirect('admin_options.php', 'Options updated. Redirecting …');
}
$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Next Game';
require PUN_ROOT.'header.php';
generate_admin_menu('reports');
?>
<div class="blockform">
<h2><span>Next Game</span></h2>
<div class="box">
<form method="post" action="next_game.php?action=foo">
<input type="hidden" name="form_sent" value="1" />
<fieldset>
<legend>Announcement</legend>
<div class="infldset">
<table class="aligntop" cellspacing="0">
<tr>
<th scope="row">Announcement message</th>
<td>
<textarea name="form[announcement_message]" rows="5" cols="55"><?php echo pun_htmlspecialchars($pun_config['o_announcement_message']) ?></textarea>
<span>This text will not be parsed like regular posts and thus may contain HTML.</span>
</td>
</tr>
</table>
</div>
</fieldset>
<p class="submitend"><input type="submit" name="save" value="Save changes" /></p>
</form>
</div>
</div>
<div class="clearer"></div>
</div>
<?php
require PUN_ROOT.'footer.php';