<?PHP
#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|
#|                                                                        #|
#|         JabboCMS - Website and Content Management System               #|
#|         Copyright © 2011 Jor.dan. All rights reserved.                 #|
#|																		  #|
#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|

include("../global.php");

	if(!session_is_registered(username))
	{
		Redirect("".$url."/index.php");
		exit();
	}
	
	if($user['rank'] < 4) {
	Redirect("".$url."/index.php");
	exit();
	}
	
	if(isset($_POST['ip']) || isset($_POST['port']) || isset($_POST['mus_port']) || isset($_POST['variable']) || isset($_POST['texte']) || isset($_POST['swf']) || isset($_POST['erreur_page']) || isset($_POST['version']) || isset($_POST['loading_texte'])) {
   $ip = Securise($_POST['ip']);
   $port = Securise($_POST['port']);
   $mus_port = Securise($_POST['mus_port']);
   $variable = Securise($_POST['variable']);
   $texte = Securise($_POST['texte']);
   $swf = Securise($_POST['swf']);
   $page = Securise($_POST['erreur_page']);
   $version = Securise($_POST['version']);
   $loading = Securise($_POST['loading_texte']);
   
      if($ip != "" && $mus_port != "" && $port != "" && $variable != "" && $texte != "" && $swf != "" && $page != "" && $version != "" && $loading != "") {
      mysql_query("INSERT INTO cms_stafflog (pseudo,action,date) VALUES ('".$user['username']."','Modification du Client','".FullDate('full')."')");
	  mysql_query("UPDATE cms_client SET ip = '".$ip."', port = '".$port."', mus_port = '".$mus_port."', variable = '".$variable."', texte = '".$texte."', swf = '".$swf."', erreur_page = '".$page."', version = '".$version."', loading_texte = '".$loading."' WHERE id = '1'") or die(mysql_error());
	  echo '<div id="ok">Le client &agrave; &eacute;t&eacute; mis &agrave; jour.</div>';
	  } else {
	  echo '<div id="pasok">Merci de remplir les champs vide</div>';
	  }
  }
$sql = mysql_query("SELECT * FROM cms_client WHERE id = '1'") or die(mysql_error());;
$c = mysql_fetch_assoc($sql);
?>
<link href="./template/style.css" rel="stylesheet" type="text/css"><body>
 <p><span class="HEADLINE">Modification du Client</span><br>Ici la modification du client est possible directement depuis l'administration.<br>
 <br>
 <script type="text/javascript" src="editeur_html/jscripts/tiny_mce/tiny_mce.js"></script>
 
 <form name='editor' method='post' action="?do=credits">
<td width='100' class='tbl'><b>IP:</b><br></td>
<td width='80%' class='tbl'><input type='text' name='ip' value='<?PHP echo $c['ip']; ?>' class='text' style='width: 240px'><br></td>
<br>
<td width='100' class='tbl'><b>Port:</b><br></td>
<td width='80%' class='tbl'><input type='text' name='port' value='<?PHP echo $c['port']; ?>' class='text' style='width: 240px'><br></td>
<br>
<td width='100' class='tbl'><b>Mus Port:</b><br></td>
<td width='80%' class='tbl'><input type='text' name='mus_port' value='<?PHP echo $c['mus_port']; ?>' class='text' style='width: 240px'><br></td>
<br>
<td width='100' class='tbl'><b>Variable:</b><br></td>
<td width='80%' class='tbl'><input type='text' name='variable' value='<?PHP echo $c['variable']; ?>' class='text' style='width: 240px'><br></td>
<br>
<td width='100' class='tbl'><b>Texte:</b><br></td>
<td width='80%' class='tbl'><input type='text' name='texte' value='<?PHP echo $c['texte']; ?>' class='text' style='width: 240px'><br></td>
<br>
<td width='100' class='tbl'><b>SWF:</b><br></td>
<td width='80%' class='tbl'><input type='text' name='swf' value='<?PHP echo $c['swf']; ?>' class='text' style='width: 240px'><br></td>
<br>
<td width='100' class='tbl'><b>Version:</b><br></td>
<td width='80%' class='tbl'><input type='text' name='version' value='<?PHP echo $c['version']; ?>' class='text' style='width: 240px'><br></td>
<br>
<td width='100' class='tbl'><b>Texte de Chargement:</b><br></td>
<td width='80%' class='tbl'><input type='text' name='loading_texte' value='<?PHP echo $c['loading_texte']; ?>' class='text' style='width: 240px'><br></td>
<br>
<td width='100' class='tbl'><b>Page d'erreur:</b><br></td>
<td width='80%' class='tbl'><input type='text' name='erreur_page' value='<?PHP echo $c['erreur_page']; ?>' class='text' style='width: 240px'>
<br>
</td>
<br>
<td align='center' colspan='2' class='tbl'>
<input type='submit' name='submit' value='Ex&eacute;cuter' class='submit'></form>
</tr>
<br>
</body>
</html>

</tr>