<?php
/*
	File     : adminMenu.class.php
	Version  : 0.2.1 Beta
	Copyright: Attila Soki 2001
	e-mail   : atiware@gmx.net
	Date     : 2001-05-12
*/

	include_once("Domain.class.php");
	require("checkLogin.inc.php");
	require("head.inc.php");
?>
  <tr> 
    <td colspan="2" align="left" valign="top"> 
      <form method="post" action="adminEmails.php" name="form1" ENCTYPE="multipart/form-data">
        <table border="0" cellspacing="0" cellpadding="0" vspace="0" hspace="0">
          <tr bgcolor="#FFFFCC"> 
            <td colspan="3"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Menu</b></font></td>
          </tr>
          <tr> 
            <td colspan="3"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="index.php?logout=1">Logout</a></font></td>
          </tr>
          <tr> 
            <td colspan="3"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="adminMyPassword.php">Change my 
            password</a></font></td>
          </tr>
          <tr> 
            <td colspan="3"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="adminDomains.php">Domain 
              table administration</a></font></td>
          </tr>
          <tr> 
            <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="2"><a href="adminAdmins.php">Admins</a></font></td>
          </tr>
          <tr> 
            <td><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Select 
              domain: </font></td>
            <td> 
              <select name="selectdomain">
<?php
	$dbo=new MySql();
	$dbo->query("select Id from ".MMCDOMAINTABLE." order by Domain");
	if ($dbo->numRows()) {
		while ($mr=$dbo->fetchArray()) {
			if (($login->isRoot()) || ($login->haveRightToDomain($mr["Id"]))) {
				$domain=new Domain($mr["Id"]);
				printf('<option value="%s">%s</option>%s',$domain->getId(),$domain->getName(),"\n");
			}
		}
		$dbo->freeResult();
	}
	$dbo->close();
?>
              </select>
            </td>
            <td> 
              <input type="submit" name="submitButton" value="Admin E-mail accounts on selected domain">
            </td>
          </tr>
        </table>
      </form>
    </td>
  </tr>
<?php
	require("foot.inc.php");
?>