|LF_STANDARD|
|HTM_FOOTER_BAR_1|

|HTM_MENU_RESELLER|

<img src="/|LANG_IMG_SKIN_CTRL_ACCOUNT|" width="180" height="28"><div class="right-pad" align=center>
|$/usr/local/bin/php
<?php

show_bar("<b>|LANG_BANDWIDTH|</b><br>", "|RESELLERBANDWIDTH|", "|RESELLERBANDWIDTHMAX|", "bandwidth_bar");
show_bar("<b>|LANG_DISK_SPACE|</b><br>", "|RESELLERQUOTA|", "|RESELLERQUOTAMAX|", "quota_bar");

function show_bar($text, $used, $limit, $id)
{
		if($limit==0) return;

		$left=round(($used/$limit)*100);
		$right=100-$left;

		switch(TRUE)
		{
			case ($left > 90)	: $color = "RED";		break;
			case ($left > 70)	: $color = "ORANGE";	break;
			case ($left > 50)	: $color = "YELLOW";	break;
			default				: $color = "GREEN";		break;
		}

		$bg="/IMG_SKIN_BAR_BG_".$color;
		$leftImg="/IMG_SKIN_BAR_LEFT_".$color;
		$rightImg="/IMG_SKIN_BAR_RIGHT_".$color;

		if($left >= 100)
		{
		   $overBg="/IMG_SKIN_BAR_BG_".$color;
		} else {
		   $overBg="/IMG_SKIN_BAR_BG_BLUE";
		}

		$overBg="/IMG_SKIN_BAR_BG_BLUE";

		echo $text;

		?>
			<table border="0" width="170" cellspacing="0" cellpadding="0" background="<?php echo $overBg;?>">
				<tr>
					<td width=3 align=left><img border="0" src="<?php echo $leftImg;?>" width="3" height="17"></td>
					<td width="1%" id=<?php echo $id;?> background="<?php echo $bg;?>"></td>
					<td width=1 align=left><img border="0" src="<?php echo $rightImg;?>" width="1" height="17"></td>
					<td width=100%></td>
					<td width=1 align=right><img src="/IMG_SKIN_BAR_RIGHT_BLUE" width="1" height="17"></td>
				</tr>
			</table>

					<script language="Javascript">
					<!--

					<?php echo $id?>_top=<?php echo $left>100?100:$left;?>;
					<?php echo $id?>_current=0;

					function <?php echo $id?>_scroll()
					{
						again = true;
						<?php echo $id?>_current += 10;
						if (<?php echo $id?>_current >= <?php echo $id?>_top)
						{
							<?php echo $id?>_current = <?php echo $id?>_top;
							again=false;
						}

						if (document.getElementById)
						{
							my_style = document.getElementById("<?php echo $id?>").style;
						}
						else if (document.all)
						{
							my_style = document.all["<?php echo $id?>"].style;
						}
						else if (document.layers)
						{
							my_style = document.layers["<?php echo $id?>"];
						}

						my_style.width=<?php echo $id?>_current+"%";

						if (again)
							setTimeout("<?php echo $id?>_scroll();", 50);
					}

					setTimeout("<?php echo $id?>_scroll();", 1000);

					//-->
					</script>

<?php
}
?>

DONE|
</div>
<table width=100% cellpadding=4 cellspacing=0><tr><td align=center>
      <table border="0" width="100%" cellspacing="0" cellpadding="4" class="white">
        <tr>
          <td width="33%"></td>
          <td width="33%" align="center"><b>|LANG_USED|</b></td>
          <td width="34%" align="center"><b>|LANG_MAX|</b></td>
        </tr>

        <tr>
          <td width="33%" class=bar-row1>|LANG_DISK_SPACE| |LANG_MB|</td>
          <td width="33%" class=bar-row1 align="center">|RESELLERQUOTA|</td>
          <td width="34%" class=bar-row1 align="center">|RESELLERQUOTAMAX|</td>
        </tr>

        <tr>
          <td width="33%" class=bar-row2>|LANG_BANDWIDTH| |LANG_GB|</td>
          <td width="33%" class=bar-row2 align="center">|RESELLERBANDWIDTHGIG|</td>
          <td width="34%" class=bar-row2 align="center">|RESELLERBANDWIDTHMAXGIG|</td>
        </tr>

        <tr>
          <td width="33%" class=bar-row1>|LANG_EMAILS|</td>
          <td width="33%" class=bar-row1 align="center">|RESELLEREMAIL|</td>
          <td width="34%" class=bar-row1 align="center">|RESELLEREMAILMAX|</td>
        </tr>
        <tr>
          <td width="33%" class=bar-row2>|LANG_FTP_ACCOUNTS|</td>
          <td width="33%" class=bar-row2 align="center">|RESELLERFTP|</td>
          <td width="34%" class=bar-row2 align="center">|RESELLERFTPMAX|</td>
        </tr>
        <tr>
          <td width="33%" class=bar-row1>|LANG_DATABASES|</td>
          <td width="33%" class=bar-row1 align="center">|RESELLERDATABASE|</td>
          <td width="34%" class=bar-row1 align="center">|RESELLERDATABASEMAX|</td>
        </tr>
        <tr>
          <td width="33%" class=bar-row2>|LANG_DOMAINS|</td>
          <td width="33%" class=bar-row2 align="center">|RESELLERDOMAINS|</td>
          <td width="34%" class=bar-row2 align="center">|RESELLERDOMAINSMAX|</td>
        </tr>

        <tr>
          <td width="33%" class=bar-row1>|LANG_USERS|</td>
          <td width="33%" class=bar-row1 align="center">|RESELLERUSERS|</td>
          <td width="34%" class=bar-row1 align="center">|RESELLERUSERSMAX|</td>
        </tr>
      </table>
</td></tr></table>


<br>

|$/usr/local/bin/php
<?php
$d="|domain|";
if ($d == "" || $d[0] == '|') { exit(0);}
?>
<img src="/IMG_SKIN_CTRL_DOMAIN" width="180" height="28">
<div class="right-pad">
<b>|domain|</b>
</div>
DONE|

|HTM_FOOTER_BAR_2|
|HTM_FOOTER|
