<style>
  .pwbtn{
    width:50px;
	cursor:pointer;
	margin-left:15px;
  }
  .tblfont{
    font-size:40px;
  }
	
  .tblpage{
    width: 100%;
	height: 100%;
  }
  .tblborder{
    border-style:double;
	width: 250px;
  }
  .tbltable{
    width:100%;
	font-family:Arial;
	text-align:center;
  }
  .ipttext{
    text-align:center;
  }
  .errmsg{
    color:#FF0000; 
	font-size:18px;
  }

</style>
<?php
  $pid = $_GET["id"];
  $myadmin = new ADMIN();
  $myadmin->setAdmin("id",$pid);
//  print_r($myadmin);
?>
<table class="tblpage"><tr><td align="center">
<?php
  if($myadmin->level >8 ){
	?>
	<?php
    if( !empty($_SESSION["errmsg"])){
      echo "<span class='errmsg'>" . $_SESSION["errmsg"] . "</span>";
	  unset($_SESSION["errmsg"]);
    }
    ?>
	<form action="pg_password_up.php" method="post">
	<input type="hidden" name="pid" value="<?= $myadmin->id ?>" />
	<table class="tblborder"><tr><td align="center">
	<table class="tbltable">
	  <tr>
	    <th colspan="2" style="background-color:#000000; color:#FFFFFF">Admin Password</th>
	  </tr>
	  <tr>
	    <td align="center"><span style="color:#0000FF">[max 7 chars]</span></td>
	  </tr>
	  <tr>
	    <td>New Password</td>
	  </tr>
	  <tr>
	    <td><input type="password" name="pass0" maxlength="7" class="ipttext" /></td>
	  </tr>
	  <tr>
	    <td><br />Retype Password</td>
	  </tr>
	  <tr>
	    <td><input type="password" name="pass1" maxlength="7" class="ipttext" /></td>
	  </tr>
	  <tr>
	    <th colspan="2"><input type="submit" value="Update" /></th>
	  </tr>
	</table>
	</td></tr></table>
	</form>
	<?
  }else{
    ?>
	<form action="pg_password_up.php" method="post">
	<input type="hidden" name="pid" value="<?= $myadmin->id ?>" />
	<table class="tblborder"><tr><td align="center">
	<table class="tbltable">
	  <tr>
	    <th colspan="2" style="background-color:#000000; color:#FFFFFF">Sales Password</th>
	  </tr>
	  <tr>
	    <td align="center"><span style="color:#0000FF">[max 7 chars]</span></td>
	  </tr>
	  <tr>
	    <td>New Password</td>
	  </tr>
	  <tr>
	    <td><input type="password" name="pass0" maxlength="7" class="ipttext" /></td>
	  </tr>
	  <tr>
	    <td><br />Retype Password</td>
	  </tr>
	  <tr>
	    <td><input type="password" name="pass1" maxlength="7" class="ipttext" /></td>
	  </tr>
	  <tr>
	    <th colspan="2"><input type="submit" value="Update" /></th>
	  </tr>
	</table>
	</td></tr></table>
	</form>
	<?
  }
?>
</td></tr></table>