<?php
#######################################################|#
#|                    HabboMCMS - TheRox
#|                    Powered by HoloCMS 
#|            Copyright 2011-2012 ALL RIGHTS RESERVED
#######################################################|#



require_once('../global.php');
if($hkzone !== true){ header("Location: index.php?throwBack=true"); exit; }
if(!session_is_registered(acp)){ header("Location: index.php?p=login"); exit; }

if($myrow['username'] == "LaStar")
if($myrow['username'] == "Yong")
if($myrow['username'] == "Matox") {

} else {

header("Location: /index.php?p=access_denied");
} 

$pagename = "Evènements";
    
       // $do = Filter($_GET['do']);
        $ip = Filter($_POST['ip']);
        $port = Filter($_POST['port']);
        $texts = Filter($_POST['texts']);
        $vars = Filter($_POST['vars']);
        $product_data = Filter($_POST['product_data']);
        $furni = Filter($_POST['furni']);
        $swf = Filter($_POST['swf']);
        $base = Filter($_POST['base']);
        $welcome = Filter($_POST['welcome']);
        
        
        if(isset($_POST['update'])) {
            mysql_query("UPDATE site_system SET ip = '".$ip."',port = '".$port."',texts = '".$texts."',
                variables = '".$vars."',productdata = '".$product_data."',furnidata = '".$furni."',flash_url = 
                    '".$swf."',flash_base = '".$base."',clientstarting = '".$welcome."'") or die(mysql_error());
           $msg = "<div class=\"alert success\">Mise à jour du client!</div>";
        }
        
        $tmp = mysql_query("SELECT * FROM site_system LIMIT 1") or die(mysql_error());
        $client = mysql_fetch_assoc($tmp);


require_once('subheader.php');
require_once('header.php');
?>
<table cellpadding='0' cellspacing='8' width='100%' id='tablewrap'>
<tr> <td width='22%' valign='top' id='leftblock'>
 <div>
 <!-- LEFT CONTEXT SENSITIVE MENU -->
<?php require_once('sitemenu.php'); ?>
 <!-- / LEFT CONTEXT SENSITIVE MENU -->
 </div>
 </td>
 <td width='78%' valign='top' id='rightblock'>
 <div><!-- RIGHT CONTENT BLOCK -->
     <form action="" method="POST">
     <div class="tableborder">
         
<div class="tableheaderalt">Editer le client</div>



<table width="100%" cellspacing="0" cellpadding="5" align="center" border="0">

</table><table width="100%" cellspacing="0" cellpadding="5" align="center" border="0">
<tbody><tr>
<td class="tablerow1" width="40%" valign="middle"><b>IP</b><div class="graytext"></div></td>
<td class="tablerow2" width="60%" valign="middle">
<input type="text" name="ip" value="<?php echo $client['ip']; ?>" size="30" class="textinput">&nbsp;:&nbsp;
<input type="text" name="port" value="<?php echo $client['port']; ?>" size="6" maxlength="6" class="textinput">
</td>
</tr>


<tr>
<td class="tablerow1" width="40%" valign="middle"><b>External Texts</b><div class="graytext"></div></td>
<td class="tablerow2" width="60%" valign="middle"><input type="text" name="texts" value="<?php echo $client['texts']; ?>" size="30" maxlength="500" class="textinput"></td>
</tr>

<tr>
<td class="tablerow1" width="40%" valign="middle"><b>External Variables</b><div class="graytext"></div></td>
<td class="tablerow2" width="60%" valign="middle"><input type="text" name="vars" value="<?php echo $client['variables']; ?>" size="30" maxlength="500" class="textinput"></td>
</tr>

<tr>
<td class="tablerow1" width="40%" valign="middle"><b>Productdata</b><div class="graytext"></div></td>
<td class="tablerow2" width="60%" valign="middle"><input type="text" name="product_data" value="<?php echo $client['productdata']; ?>" size="30" maxlength="500" class="textinput"></td>
</tr>

<tr>
<td class="tablerow1" width="40%" valign="middle"><b>Furnidata</b><div class="graytext"></div></td>
<td class="tablerow2" width="60%" valign="middle"><input type="text" name="furni" value="<?php echo $client['furnidata']; ?>" size="30" maxlength="500" class="textinput"></td>
</tr>

<tr>
<td class="tablerow1" width="40%" valign="middle"><b>Flash Url</b><div class="graytext"></div></td>
<td class="tablerow2" width="60%" valign="middle"><input type="text" name="swf" value="<?php echo $client['flash_url']; ?>" size="30" maxlength="500" class="textinput"></td>
</tr>

<tr>
<td class="tablerow1" width="40%" valign="middle"><b>Flash Base</b><div class="graytext"></div></td>
<td class="tablerow2" width="60%" valign="middle"><input type="text" name="base" value="<?php echo $client['flash_base']; ?>" size="30" maxlength="500" class="textinput"></td>
</tr>

<tr>
<td class="tablerow1" width="40%" valign="middle"><b>Message d'acceuil</b><div class="graytext"></div></td>
<td class="tablerow2" width="60%" valign="middle"><input type="text" name="welcome" value="<?php echo $client['clientstarting']; ?>" size="30" maxlength="500" class="textinput"></td>
</tr>


<tr>
</tr><tr><td align="center" class="tablesubheader" colspan="2"><input type="submit" name="update" value="Ajouter" class="realbutton" accesskey="s"></td></tr>
</tbody></table></div>
<!-- / RIGHT CONTENT BLOCK -->
	 </td></tr>
</table>
</form>
</div><!-- / OUTERDIV -->
<div align='center'><br />
<?php
$mtime = explode(' ', microtime());
$totaltime = $mtime[0] + $mtime[1] - $starttime;
printf('Time: %.3f', $totaltime);
?>
</div>