Viewing file: globalconf.php (11.65 KB) -rw-rw-rw- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
echo " <script language='javascript'>
function checkSMTP() {
if(document.global_config.elements['sending_method'].selectedIndex!=0){
document.global_config.elements['smtp_host'].disabled = true;
document.global_config.elements.smtp_auth[0].disabled = true;
document.global_config.elements.smtp_auth[1].disabled = true;
document.global_config.elements['smtp_login'].disabled = true;
document.global_config.elements['smtp_pass'].disabled = true;
} else {
document.global_config.elements['smtp_host'].disabled = false;
document.global_config.elements.smtp_auth[0].disabled = false;
document.global_config.elements.smtp_auth[1].disabled = false;
document.global_config.elements['smtp_login'].disabled = false;
document.global_config.elements['smtp_pass'].disabled = false;
}
}
</script>\n";
echo "\t<div class='title-simple'>".translate("GCONFIG_TITLE")."</div>\n";
if($op=="saveGlobalconfig")
{
if($configSaved){
echo "<div align='center' class='success'>".translate("GCONFIG_SUCCESSFULLY_SAVED").".</div>\n";
if($_POST['file']==1 && !$configFile)
echo "<div align='center' class='error'>".translate("Error while writing config.php in include/ directory (check permissions please)").".</div>\n";
}
else {
if($configFile==-1)
echo "<div align='center' class='error'>".translate("Unable to write config.php in include/ directory (check permissions please)").").</div>\n";
else if($file==1)
echo "<div align='center' class='error'>".translate("Error while saving configuration")."</div>\n";
}
}
echo "<form method='post' name='global_config' class='form-simple'>\n";
$config_writable = is_writable("../include/config.php");
echo "<div class='subsection'>\n";
echo "<div class='subtitle'>".translate("GCONFIG_DB_TITLE")."</div>\n";
echo "<div class='subcontent'>\n";
if(!$config_writable){
echo "<div class='info'>".translate("GCONFIG_DB_CONFIG_UNWRITABLE",$conf->path."include/config.php")."</div><br />\n";
echo "<input type='hidden' name='file' value='0'>";
echo "
<input type='hidden' name='table_config' value='$conf->db_config_table'>
<input type='hidden' name='db_host' value='$conf->db_host'>
<input type='hidden' name='db_name' value='$conf->db_name'>
<input type='hidden' name='db_login' value='$conf->db_login'>
<input type='hidden' name='db_pass' value='$conf->db_pass'>\n";
echo "<table cellspacing=5>\n";
} else {
echo "<table cellspacing=5><tr>\n";
echo "<td>".translate("GCONFIG_DB_HOST")."</td>\n";
echo "<td><input type='hidden' name='file' value='1'><input type='text' name='db_host' value=\"".htmlspecialchars($conf->db_host)."\"></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>".translate("GCONFIG_DB_DBNAME")."</td>\n";
echo "<td><input type='text' name='db_name' value=\"".htmlspecialchars($conf->db_name)."\"></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>".translate("GCONFIG_DB_LOGIN")."</td>\n";
echo "<td><input type='text' name='db_login' value=\"".htmlspecialchars($conf->db_login)."\"></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>".translate("GCONFIG_DB_PASSWD")."</td>\n";
echo "<td><input type='password' name='db_pass' value=\"".htmlspecialchars($conf->db_pass)."\"></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>".translate("GCONFIG_DB_CONFIG_TABLE")."</td>\n";
echo "<td><input type='text' name='table_config' value=\"".htmlspecialchars($conf->db_config_table)."\"></td>\n";
echo "</tr>\n";
}
echo "<tr>\n";
echo "<td>".translate("GCONFIG_DB_TABLE_MAIL")."</td>\n";
echo "<td><input type='text' name='table_email' value=\"".htmlspecialchars($conf->table_email)."\"></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>".translate("GCONFIG_DB_TABLE_TEMPORARY")."</td>\n";
echo "<td><input type='text' name='table_temp' value=\"".htmlspecialchars($conf->table_temp)."\"></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>".translate("GCONFIG_DB_TABLE_NEWSCONFIG")."</td>\n";
echo "<td><input type='text' name='table_listsconfig' value=\"".htmlspecialchars($conf->table_listsconfig)."\"></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>".translate("GCONFIG_DB_TABLE_ARCHIVES")."</td>\n";
echo "<td><input type='text' name='table_archives' value=\"".htmlspecialchars($conf->table_archives)."\"></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>".translate("GCONFIG_DB_TABLE_SUBMOD")."</td>\n";
echo "<td><input type='text' name='table_sub' value=\"".htmlspecialchars($conf->table_sub)."\"></td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "</div>\n";
echo "</div>\n";
echo "<div class='subsection'>\n";
echo "<div class='subtitle'>".translate("GCONFIG_MISC_TITLE")."</div>\n";
echo "<div class='subcontent'>\n";
echo "<table cellspacing=5>\n";
echo "<tr>\n";
echo "<td>".translate("GCONFIG_MISC_ADMIN_PASSW")."</td>\n";
echo "<td><input type='password' name='admin_pass' value='' autocomplete='off'> <font style=\"font-size:x-small;\">".translate("GCONFIG_MISC_ADMIN_PASSW2")."</font></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>".translate("GCONFIG_MISC_BASE_URL")."</td>\n";
echo "<td><input type='text' name='base_url' size='30' value='$conf->base_url'></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>".translate("GCONFIG_MISC_BASE_PATH")."</td>\n";
echo "<td><input type='text' name='path' size='30' value='$conf->path'></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>".translate("GCONFIG_MISC_LANGUAGE")."</td>\n";
echo "<td><select name='language'>\n";
echo getLanguageList($conf->language, "../");
echo "</select></td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "</div>\n";
echo "</div>\n";
echo "<div class='subsection'>\n";
echo "<div class='subtitle'>".translate("GCONFIG_MESSAGE_HANDLING_TITLE")."</div>\n";
echo "<div class='subcontent'>\n";
echo "<table cellspacing=5>\n";
echo "<tr>\n";
echo "<td>".translate("GCONFIG_MESSAGE_ADMIN_NAME")."</td>\n";
echo "<td><input type='text' name='admin_name' size='30' value=\"".htmlspecialchars($conf->admin_name)."\"></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>".translate("GCONFIG_MESSAGE_ADMIN_MAIL")."</td>\n";
echo "<td><input type='text' name='admin_email' size='30' value=\"".htmlspecialchars($conf->admin_email)."\"></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>".translate("GCONFIG_MESSAGE_CHARSET")."</td>\n";
echo "<td><select name='charset'>\n";
$locals = array("utf-8", "cp037", "cp850", "cp863", "iso-8859-1", "iso-8859-3", "koi8-u", "windows-1250", "windows-1258",
"cp1006", "cp852", "cp864", "iso-8859-10", "iso-8859-4", "mazovia", "windows-1251", "x-mac-ce",
"cp1026", "cp855", "cp865", "iso-8859-11", "iso-8859-5", "nextstep", "windows-1252", "x-mac-cyrillic",
"cp424", "cp856", "cp866", "iso-8859-13", "iso-8859-6", "windows-1253", "x-mac-greek",
"cp437", "cp857", "cp869", "iso-8859-14", "iso-8859-7", "windows-1254", "x-mac-icelandic",
"cp500", "cp860", "cp874", "iso-8859-15", "iso-8859-8", "turkish", "windows-1255", "x-mac-roman",
"cp737", "cp861", "cp875", "iso-8859-16", "iso-8859-9", "us-ascii", "windows-1256", "zdingbat",
"cp775", "cp862", "gsm0338", "iso-8859-2", "koi8-r", "us-ascii-quotes", "windows-1257");
sort($locals);
foreach($locals as $local){
echo "\t<option value=\"$local\"".($conf->charset == $local ? ' selected' : '').">$local</option>\n";
}
//echo "\t<option value='iso-8859-1'".($conf->charset == 'iso-8859-1' ? ' selected' : '').">iso-8859-1</option>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>".translate("GCONFIG_MESSAGE_NUM_LOOP")."</td>\n";
echo "<td><input type='text' name='sending_limit' size='3' value='$conf->sending_limit'></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>".translate("GCONFIG_MESSAGE_SEND_METHOD")."</td>\n";
echo "<td><select name='sending_method' onChange='checkSMTP()'>\n";
echo "<option value='smtp' ";
if($conf->sending_method=="smtp") echo "selected='selected' ";
echo ">smtp</option>";
echo "<option value='php_mail' ";
if($conf->sending_method=="php_mail") echo "selected='selected'";
echo ">".translate("GCONFIG_MESSAGE_SEND_METHOD_FUNCTION")."</option>\n";
echo "<option value='online_mail' ";
if($conf->sending_method=="online_mail") echo "selected='selected'";
echo ">".translate("INSTALL_PHP_MAIL_FONCTION_ONLINE")."</option>\n";
echo "</select></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>".translate("GCONFIG_MESSAGE_SMTP_HOST")."</td>\n";
echo "<td><input type='text' name='smtp_host' value='$conf->smtp_host'></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>".translate("GCONFIG_MESSAGE_SMTP_AUTH")."</td>\n";
echo "<td><input type='radio' class='radio' name='smtp_auth' value='0' ";
if($conf->smtp_auth==0) echo "checked='checked'";
echo ">".translate("NO")." ";
echo "<input type='radio' class='radio' name='smtp_auth' value='1' ";
if($conf->smtp_auth==1) echo "checked='checked'";
echo ">".translate("YES")."</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>".translate("GCONFIG_MESSAGE_SMTP_LOGIN")."</td>\n";
echo "<td><input type='text' name='smtp_login' value='$conf->smtp_login'></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>".translate("GCONFIG_MESSAGE_SMTP_PASSWORD")."</td>\n";
echo "<td><input type='text' name='smtp_pass' value='$conf->smtp_pass'></td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "</div>\n";
echo "</div>\n";
echo "<div class='subsection'>\n";
echo "<div class='subtitle'>".translate("GCONFIG_SUBSCRIPTION_TITLE")."</div>\n";
echo "<div class='subcontent'>\n";
echo "<table cellspacing=5>\n";
echo "<tr colspan=2>\n";
echo "<td>".translate("GCONFIF_SUBSCRIPTION_VALIDATION_TIMEOUT", "<input type='text' name='validation_period' size='3' value='$conf->validation_period'>")."</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>".translate("GCONFIG_SUBSCRIPTION_CONFIRM_SUB")."</td>\n";
echo "<td><input type='radio' class='radio' name='sub_validation' value='0' ";
if(!$conf->sub_validation) echo "checked='checked'";
echo " > ".translate("NO");
echo "<input type='radio' class='radio' name='sub_validation' value='1' ";
if($conf->sub_validation) echo "checked='checked'";
echo " > ".translate("YES")."</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>".translate("GCONFIG_SUBSCRIPTION_CONFIRM_UNSUB")."</td>\n";
echo "<td><input type='radio' class='radio' name='unsub_validation' value='0' ";
if(!$conf->unsub_validation) echo "checked='checked'";
echo " > ".translate("NO");
echo "<input type='radio' class='radio' name='unsub_validation' value='1' ";
if($conf->unsub_validation) echo "checked='checked'";
echo " > ".translate("YES")."</td>\n";
echo "</tr>\n";
//include("include/REF_conf.php");
/* echo "<tr>\n";
echo "<td>".translate("GCONFIG_SUBSCRIPTION_MODERATE")."</td>\n";
echo "<td><input type='radio' class='radio' name='mod_sub' value='0' ";
if(!$conf->mod_sub) echo "checked='checked'";
echo " > ".translate("NO");
echo "<input type='radio' class='radio' name='mod_sub' value='1' ";
if($conf->mod_sub) echo "checked='checked'";
echo " > ".translate("YES")."</td>\n";
echo "</tr>\n";*/
echo "</table>\n";
echo "</div>\n";
echo "</div>\n";
echo "<input type='hidden' name='op' value='saveGlobalconfig'><br />\n";
echo "<input type='hidden' name='mod_sub' value='0'><br />\n";
echo "<center><input type='submit' value='".translate("GCONFIG_SAVE_BTN")."'></center>\n";
echo "</form>\n";
?>
|