<?php

	// include files
	require_once('php/config.php');
	require_once('php/db.php');
	require_once('php/info.php');
	require_once('php/login.php');
	//

	// info
	$msg = "";
	$page_name = "user";
	// update change
	if(@$MM_update == "form1" && @$event == "change" && @$id != "")
	{
		mysql_query("UPDATE $page_name SET username = '$a1', password = '$a2' WHERE id = '$id'");
		$msg = "Updated<br>";
		
	}
	// query
	$result = mysql_query("SELECT * FROM $page_name", $db);
	if(@$myrow = mysql_fetch_array($result))
	{
		// info
	}
	//
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo($admin_title);?></title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
<script src="script.js" language="javascript"></script>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="18%" valign="top" style="padding:10px;"><?php include('menu.php'); ?></td>
    <td width="82%" valign="top" style="padding: 10px;">
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td valign="top" class="adm_ct"><p>&nbsp;</p>
          <form action="<?php echo($_SERVER['REQUEST_URI']); ?>" method="post" name="form1" id="form1">
			<table width="100%" border="0" cellpadding="0" cellspacing="10">
				<tr>
					<td width="30%" valign="top" align="right"><strong>Admin Info</strong></td>
					<td width="2%" valign="top"><strong>&nbsp;</strong></td>
					<td width="68%" valign="top"><strong><?php echo(@$msg.' '.$cur_full_date);?></strong></td>
				</tr>
			  <?php
				//
				echo('<tr>'."\n");
					echo('<td width="30%" valign="top" align="right">Username</td>'."\n");
					echo('<td width="2%" valign="top">&nbsp;</td>'."\n");
					echo('<td width="68%" valign="top"><input type="text" name="a1" value="'.@$myrow['username'].'" size="20" maxlength="20" style="font-family:'.$info["langfont"]["2"].'"></td>'."\n");
				echo('</tr>'."\n");
				//
				echo('<tr>'."\n");
					echo('<td width="30%" valign="top" align="right">Password</td>'."\n");
					echo('<td width="2%" valign="top">&nbsp;</td>'."\n");
					echo('<td width="68%" valign="top"><input type="password" name="a2" value="'.@$myrow['password'].'" size="20" maxlength="20" style="font-family:'.$info["langfont"]["2"].'"></td>'."\n");
				echo('</tr>'."\n");
				//
				echo('<tr>'."\n");
					echo('<td width="30%" valign="top" align="right">Password</td>'."\n");
					echo('<td width="2%" valign="top">&nbsp;</td>'."\n");
					echo('<td width="68%" valign="top"><input type="password" name="a3" value="'.@$myrow['password'].'" size="20" maxlength="20" style="font-family:'.$info["langfont"]["2"].'"></td>'."\n");
				echo('</tr>'."\n");
				//
				echo('<tr>'."\n");
					echo('<td width="30%" valign="top" align="right">&nbsp;</td>'."\n");
					echo('<td width="2%" valign="top">&nbsp;</td>'."\n");
					echo('<td width="68%" valign="top"><input type="button" value="Change" class="but1" onclick="txt_user();" /></td>'."\n");
				echo('</tr>'."\n");
				// 
			  ?>
            </table>
            <input type="hidden" name="MM_update" value="form1" />         
            <input type="hidden" name="id" value="<?php echo(@$myrow['id']); ?>" />
			<input type="hidden" name="event" value="change" />
          </form>
          <p>&nbsp;</p>
		  </td>
      </tr>
    </table>
	</td>
  </tr>
</table>
</body>
</html>
