<!--#
##
#	Project: PHPDISK File Storage Solution
#	This is NOT a freeware, use is subject to license terms.
#
#	Site: http://www.phpdisk.com
#
#	$Id: disk.tpl.html 2 2011-05-27 02:59:23Z along $
#
#	Copyright (C) 2008-2011 PHPDisk Team. All Rights Reserved.
#
##
#-->
<!--#if($action =='buy'){#-->
<div id="container">
<h1>{$L['buy_disk']}</h1>
<div class="tips_box_p">
<div class="tips_box"><img class="img_light" src="images/light.gif" align="absmiddle" /> <b>{$L['tips']}: </b>
<span class="txtgray">{$L['buy_disk_tips']}</span>
</div>
</div>
<script language="javascript">
$(document).ready(function(){
	$(".disk_box").each(function(){
		$(this).mouseover(function(){
			$(this).addClass("disk_sel_bg");
		}).mouseout(function(){
			$(this).removeClass("disk_sel_bg");
		});
	});
});
</script>

<div>
<div class="f14" style=" margin-left:10px; padding:5px"><img src="images/icon_nav.gif" align="absmiddle" border="0" /> {$L['your_credit']}:  <span class="txtred bold">{$my_credit}</span>
</div>
<!--#
if(!count($disks)){
#-->
<div align="center" style="padding:10px">{$L['disk_not_found']}</div>
<!--#
}else{
#-->
<!--#
	foreach($disks as $k => $v){
#-->
<form action="{#urr("mydisk","item=disk")#}" method="post">
<input type="hidden" name="action" value="{$action}" />
<input type="hidden" name="task" value="{$action}" />
<input type="hidden" name="disk_id" value="{$v['disk_id']}" />
<input type="hidden" name="formhash" value="{$formhash}" />
	<div class="disk_box">
	<li class="disk_tit"><img src="images/disk.gif" align="absmiddle" border="0" />{$v['title']}</li>
	<!--#if($v['logo']){#-->
	<li><img src="{$v['logo']}" style="padding:2px" align="top" border="0" /></li>
	<!--#}#-->
	<li>{$L['space_size']}: {$v['space']}</li>
	<li>{$L['space_expire']}: <font class="bold">{$v['expire']}</font> {$L['day']}</li>
	<li>{$L['space_price']}: <font class="bold txtred">{$v['price']}</font> {$L['credit']}</li>
	<li><input type="submit" class="btn" onclick="return confirm('{$L['buy_disk_confirm']}\r\n\r\n({$v['title']})');" value="{$L['buy_or_expand']}" /></li>
	</div>
</form>	
<!--#
		if(($k+1)%4==0){ echo "<div class='clear'></div>";}
	}
	unset($disks);
}
#-->
<div class="clear"></div>
<br />
</div>
</div>
<!--#}else{#-->
<div id="container">
<h1>{$L['disk_manage']}</h1>
<div class="tips_box_p">
<div class="tips_box"><img class="img_light" src="images/light.gif" align="absmiddle" /> <b>{$L['tips']}: </b>
<span class="txtgray">{$L['disk_manage_tips']}</span>
</div>
</div>
<form action="{#urr("mydisk","item=disk")#}" method="post">
<input type="hidden" name="task" value="setting"/>
<input type="hidden" name="formhash" value="{$formhash}" />
<table align="center" width="98%" cellpadding="4" cellspacing="0" border="0" class="td_line">
<tr>
	<td width="30%"><span class="bold">{$L['my_current_credits']}:</span></td>
	<td><span class="txtred bold">{$my_credit}</span>&nbsp;&nbsp;<a href="{$a_online_pay}">{$L['online_pay']}</a></td>
</tr>
<tr>
	<td><span class="bold">{$L['cur_space_pos']}:</span><br /><span class="txtgray">{$L['cur_space_pos_tips']}</span></td>
	<td><input type="radio" name="space_pos" value="0" {#ifchecked(0,$space_pos)#} />{$L['free_space']}&nbsp;&nbsp;<input type="radio" name="space_pos" value="1" {#ifchecked(1,$space_pos)#} />{$L['rent_space']}</td>
</tr>
<tr>
	<td><span class="bold">{$L['rent_space']}:</span></td>
	<td>{$L['used']} <b>{$rs_used}</b>/<b>{$rs_all}</b>, {$L['at']} {$rs_rate}% 
	<!--#if($has_time){#-->
	<span class="txtred">({$L['starttime']}:{$starttime},{$L['leave_time']} <font class="txtblue">{$leave_time}</font> {$L['day']})</span>
	<!--#}#-->
	</td>
</tr>
<tr>
	<td><span class="bold">{$L['free_space']}:</span></td>
	<td>{$L['used']} <b>{$fs_used}</b>/<b>{$fs_all}</b>, {$L['at']} {$fs_rate}%</td>
</tr>
<tr>
	<td><span class="bold">{$L['total_space']}:</span></td>
	<td>{$L['used']} <b>{$ts_used}</b>/<b>{$ts_all}</b>, {$L['at']} {$ts_rate}%</td>
</tr>
<tr>
	<td colspan="2">&nbsp;</td>
</tr>
<tr>
	<td><span class="bold">{$L['pay_space']}:</span></td>
	<td><select name="pay_expand_time" id="pay_expand_time" onchange="show_pay_credit();">
	<option value="0">{$L['pls_select']}</option>
	<option value="15">{$L['disk_half_month']}</option>
	<option value="30">{$L['disk_one_month']}</option>
	<option value="60">{$L['disk_two_month']}</option>
	<option value="90">{$L['disk_three_month']}</option>
	<option value="180">{$L['disk_half_year']}</option>
	<option value="365">{$L['disk_one_year']}</option>
	</select>&nbsp;&nbsp;<span class="txtblue" id="pay_tips"></span>
	</td>
</tr>
<tr>
	<td></td>
	<td><input type="submit" class="btn" value="{$L['btn_submit']}" />&nbsp;
	<input type="button" class="btn" value="{$L['buy_or_expand']}" onclick="go('{#urr("mydisk","item=disk&action=buy")#}');" />
	</td>
</tr>
</table>
</form>
</div>
<script type="text/javascript">
function show_pay_credit(){
	var tmp = getId('pay_expand_time').value;
	getId('pay_tips').innerHTML = (tmp==0) ? "{$L['pls_select']}" : "{$L['need_credit']} "+Math.round({$space_day_credits} * tmp);
}
</script>
<!--#}#-->