<?php
header ("Content-type:text/vnd.wap.wml; charset=utf-8");
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
print '<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"'.
' "http://www.wapforum.org/DTD/wml_1.1.xml">'.
'<wml><head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>';

include "./ini.php";

mysql_query ("select * from bannedib WHERE ci='$ci' AND (ip = '".getenv(REMOTE_ADDR)."')and(browser = '".getenv(HTTP_USER_AGENT)."')");
                        if(mysql_affected_rows()!=0){include "b.php";}
$login = autorize();
print '<card title="Setup">'.
'<p>';
// login info
if($login) {
if(empty($action)) {
// Message info
print 'Messages per page:<br/>'.
'<input name="num_msgs" maxlength="10" value="'.$login['nmsgs'].'" format="*N"/>'.
'<br/>'.
'Page Refresh 1 seconds = 10 seconds:<br/>'.
'<input name="time_update" maxlength="10" value="'.$login['tupdate'].'" format="*N"/>'.
'<br/>'.
'font size:<br/>'.
'<select name="fsize" value="'.$login['fsize'].'">'.
'<option value="small">small</option>'.
'<option value="medium">medium</option>'.
'<option value="big">big</option>'.
'</select><br/>'.
'<anchor>Save changes<go href="setup.php?ci='.$ci.'&amp;id='.$id.'&amp;pass='.$pass.'" method="post">'.
'<postfield name="action" value="update"/>'.
'<postfield name="time_update" value="$(time_update)"/>'.
'<postfield name="num_msgs" value="$(num_msgs)"/>'.
'<postfield name="fsize" value="$(fsize)"/></go></anchor><br/>';
}
else
{
        if(empty($num_msgs)) $num_msgs = 6;
        if(empty($time_update)) $time_update = 150;
        // update info
        $num_msgs = htmlspecialchars(intval(substr($num_msgs,0,10)));
        $time_update = htmlspecialchars(intval(substr($time_update,0,10)));
        // when changed
        $query = @mysql_query("update `".$px.$utable."` set nmsgs='".$num_msgs."', tupdate='".$time_update."', fsize='".$fsize."' where id='".$id."' and ci='$ci';");
        if($query) print "<b>Adjustments for your structure are changed!!</b><br/>";
}
print "<a href=\"enter.php?ci=$ci&amp;id=$id&amp;pass=$pass\">Hall</a>";
} else { print "Sorry,Nt Login !"; }
print '</p></card></wml>';
// Page End
@mysql_close();
ob_end_flush();
?>