|LF_STANDARD|
|HTM_FOOTER_BAR_1|

|HTM_MENU_USER|

<form name=updateform form action="CMD_CHANGE_INFO" method="POST">
<input type=hidden name=update value='Update'>
</form>

<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>", "|USERBANDWIDTH|", "|USERBANDWIDTHMAX|", "bandwidth_bar");
show_bar("<b>|LANG_DISK_SPACE|</b><br>", "|USERQUOTA|", "|USERQUOTAMAX|", "quota_bar");
|*if HAVE_INODE="yes"|
show_bar("<b>|LANG_INODES|</b><br>", "|USERINODE|", "|USERINODEMAX|", "inode_bar");
|*endif|

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";

		if ($id == "quota_bar")
		{
			echo "<a class=tabtext href=\"#\" onClick=\"document.updateform.submit();\" title=\"|LANG_CLICK_TO_UPDATE|\">";
			echo $text;
			echo "</a>";
		}
		else
		{
			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()
					{
						increase = 10;
						again = true;
						<?php echo $id?>_current += increase;
						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><a class=tabtext href="#" onClick="document.updateform.submit();" title="|LANG_CLICK_TO_UPDATE|">|LANG_DISK_SPACE| |LANG_MB|</a></td>
		  <td width="33%" class=bar-row1 align="center"><a class=tabtext href="#" onClick="document.updateform.submit();" title="|LANG_CLICK_TO_UPDATE|">|USERQUOTA|</a></td>
		  <td width="34%" class=bar-row1 align="center">|USERQUOTAMAX|</td>
		</tr>
		<tr>
		  <td width="33%" class=bar-row2>|LANG_BANDWIDTH| |LANG_GB|</td>
		  <td width="33%" class=bar-row2 align="center">|USERBANDWIDTHGIG|</td>
		  <td width="34%" class=bar-row2 align="center">|USERBANDWIDTHMAXGIG|</td>
		</tr>
		<tr>
		  <td width="33%" class=bar-row1>|LANG_EMAILS|</td>
		  <td width="33%" class=bar-row1 align="center">|USEREMAIL|</td>
		  <td width="34%" class=bar-row1 align="center">|USEREMAILMAX|</td>
		</tr>

		<tr>
		  <td width="33%" class=bar-row2>|LANG_FTP_ACCOUNTS|</td>
		  <td width="33%" class=bar-row2 align="center">|USERFTP|</td>
		  <td width="34%" class=bar-row2 align="center">|USERFTPMAX|</td>
		</tr>
		<tr>
		  <td width="33%" class=bar-row1>|LANG_DATABASES|</td>
		  <td width="33%" class=bar-row1 align="center">|USERDATABASE|</td>
		  <td width="34%" class=bar-row1 align="center">|USERDATABASEMAX|</td>
		</tr>
		|*if HAVE_INODE="yes"|
		<tr>
			<td width="33%" class=bar-row2>|LANG_INODES|</td>
			<td width="33%" class=bar-row2 align="center">|USERINODE|</td>
			<td width="34%" class=bar-row2 align="center">|USERINODEMAX|</td>
		</tr>
		|*endif|
      </table>
</td></tr></table>


<br>

|*if domain|
<img src="/|LANG_IMG_SKIN_CTRL_DOMAIN|" width="180" height="28">
<div class="right-pad">
<b>|domain|</b>
</div>
|*endif|

|HTM_FOOTER_BAR_2|
|HTM_FOOTER|
