<?php
# Subroutine: adm_config_submit.php called by Admin.php
# Xinfeng Chen, 2002.11.19

require_once('bin/config.php');
require_once('admin/adm.inc');

#--- Validate dministrator ---
include('admin/adm_validate.php');
if(!$adm_validated){jumpTo('admin.php?cmd=logon'); exit;}

#--- Save all config parameters to config.php ---
$arglist=array(
'$admmail'=>$f_admmail,
'$commname'=>$f_commname,
'$hpname'=>$f_hpname,
'$hpurl'=>$f_hpurl,
'$smtp'=>$f_smtp,

'$cssfile'=>$f_cssfile,

'$publicpost'=>$f_publicpost,
'$autoappend'=>$f_autoappend,
'$pubregbrd'=>$f_pubregbrd,
'$pubregusr'=>$f_pubregusr,
'$zcodeallowed'=>$f_zcodeallowed,
'$publicview'=>$f_publicview,
'$perpage'=>$f_perpage,      
'$time_hour'=>$f_time_hour,
'$interval'=>$f_interval,
'$maxpostsize'=>$f_maxpostsize,
'$maxannexsize'=>$f_maxannexsize,
);

$PSD=fopen("bin/config.php","w");
fwrite($PSD,"<?php\n");
fwrite($PSD,"require_once('bin/root.php');\n");
foreach($arglist as $key=>$value){
 fwrite($PSD,"$key=\"$value\";\n");
}
fwrite($PSD,"?>");
fclose($PSD);

#--- Print result ---
msgBox('论坛数据已经更新！',mINFORMATION,'操作成功','zboard_reg.php', '点击此申请论坛');

?>