<?
########## Confixx(R) 3.0 Professional ############
####### Copyright SWsoft, Inc. 2004-2005 ##########
#### http://www.sw-soft.com - info@sw-soft.com ####


#include_once("auth.php");


$not_ans = array(
    "standardip" => array("title" => "install_question_stdip", "table" => "admin", "default" => 1),
    "ip_pns" => array("title" => "install_question_ip_pns", "table" => "admin", "default" => 1),
    "ip_sns" => array("title" => "install_question_ip_sns", "table" => "admin", "default" => 1),
    "standarddomain" => array("title" => "install_question_stddomain", "table" => "admin", "default" => 1),
    
);

db_connect($db_host, $db_user, $db_pass);


if($savepost)
{
    foreach($not_ans as $f => $v)
    {
	$sql = "update " . $v["table"] . " set $f='" . $$f . "'";
	db_query($sql);
	
    }
    safe_query( "update admin set postconf='1'", TRUE );
    include("index.php");
    exit();
}



?>

<HTML>
<HEAD>
<META content="text/html; charset=<? echo $lang_html_charset; ?>" http-equiv=Content-Type>
<LINK href="<?=$strSkinName?>/style.css" rel=stylesheet type=text/css>
</HEAD>
<BODY bgColor=#ffffff bottomMargin=0 leftMargin=0 topMargin=0 MARGINHEIGHT="0" MARGINWIDTH="0">
<br><? include("../fehler.inc.php"); ?>
      <form action="index.php" method="post" name=form1>
	<input type="hidden" name="savepost" value="1">
        <table cellpadding="5" cellspacing="0" align="center" border="0">
	<tr><td align="center" class="titel-1"><? echo ltext("install_postconf_header");  ?></td></tr>
                <tr>
                        <td align="center">
                                <table border="1" bordercolordark="#ffffff" bordercolorlight="#cccccc" cellpadding="3" cellspacing="0">
<? foreach($not_ans as $f => $v): 
    $def_val = "";
    if($v["default"])
    {
	$id = db_query("select $f from ".$v["table"]);
	$w = db_fetch_array($id);
	$def_val = $w[$f];
    }
?>				
                                     <tr class="tblbgcolor">
                                                <td align="right" nowrap class="tbldata"  align="right"><? echo ltext($v["title"]); ?></td>
                                                <td><input type="text" name="<? echo $f; ?>" size="20" maxlength="27" value="<? echo $def_val; ?>"></td>
                                        </tr>
<? endforeach;  ?>
                                        <tr class="tblbgcolor">
					<td colspan="2" align="center">
<script>
function doChange()
{
document.forms[0].submit();
}
</script>

<? echo std_button(ltext("g_save"), "javascript:doChange()"); ?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
    </TD>
  </TR>
  </TBODY> 
</TABLE>
</BODY>
</HTML>
