<script type="text/javascript" src="includes/jscript/jqueryui.js"></script>
<script type="text/javascript" src="templates/orderforms/{$carttpl}/js/main.js"></script>
<link rel="stylesheet" type="text/css" href="templates/orderforms/{$carttpl}/style.css" />
<link rel="stylesheet" type="text/css" href="templates/orderforms/{$carttpl}/uistyle.css" />
<div class="wrapper purple-content">
    	<div class="container">
        	<div class="content-heading white whmcsportal">
    			<h2>{$pagetitle}</h2>
                <small>{$LANG.domainrenewals}</small>
            </div>
            <div class="view-cart">
            	<a href="{$smarty.server.PHP_SELF}?a=view"><i class="fa fa-shopping-cart"></i></a>
            </div>
		</div>
    </div>
    <div class="wrapper purple optionbar small">
    	<div class="container">
        <ul>
{foreach key=num item=productgroup from=$productgroups}
{if $gid eq $productgroup.gid}
<li class="active"><a href="{$smarty.server.PHP_SELF}?gid={$productgroup.gid}">{$productgroup.name}</a><span></span></li>{else}<li><a href="{$smarty.server.PHP_SELF}?gid={$productgroup.gid}">{$productgroup.name}</a><span></span></li>{/if}{/foreach}{if $loggedin}<li><a href="{$smarty.server.PHP_SELF}?gid=addons">{$LANG.cartproductaddons}</a><span></span></li>{if $renewalsenabled}<li class="active"><a href="{$smarty.server.PHP_SELF}?gid=renewals">{$LANG.domainrenewals}</a><span></span></li>{/if}{/if}{if $registerdomainenabled}<li><a href="{$smarty.server.PHP_SELF}?a=add&domain=register">{$LANG.registerdomain}</a><span></span></li>{/if}{if $transferdomainenabled}<li><a href="{$smarty.server.PHP_SELF}?a=add&domain=transfer">{$LANG.transferdomain}</a><span></span></li>{/if}</ul>
</div>
</div>
    <div class="wrapper" id="maincontent">
	<div class="container">
			
            <div class="whmcssection clientarea" id="knowledgebase">
<p>{$LANG.domainrenewdesc}</p>

<form method="post" action="cart.php?a=add&renewals=true">

<div class="center80">
<table class="data" style="margin:30px 0">
<tr><th width="20"></th><th>{$LANG.orderdomain}</th><th>{$LANG.domainstatus}</th><th>{$LANG.domaindaysuntilexpiry}</th><th></th></tr>
{foreach from=$renewals item=renewal}
<tr class="carttablerow"><td>{if !$renewal.pastgraceperiod}<input type="checkbox" name="renewalids[]" value="{$renewal.id}" />{/if}</td><td>{$renewal.domain}</td><td>{$renewal.status}</td><td>
    {if $renewal.daysuntilexpiry > 30}
        <span class="textgreen">{$renewal.daysuntilexpiry} {$LANG.domainrenewalsdays}</span>
    {elseif $renewal.daysuntilexpiry > 0}
        <span class="textred">{$renewal.daysuntilexpiry} {$LANG.domainrenewalsdays}</span>
    {else}
        <span class="textblack">{$renewal.daysuntilexpiry*-1} {$LANG.domainrenewalsdaysago}</span>
    {/if}
    {if $renewal.ingraceperiod}
        <br />
        <span class="textred">{$LANG.domainrenewalsingraceperiod}<span>
    {/if}
</td><td>
    {if $renewal.beforerenewlimit}
    <span class="textred">{$LANG.domainrenewalsbeforerenewlimit|sprintf2:$renewal.beforerenewlimitdays}<span>
    {elseif $renewal.pastgraceperiod}
    <span class="textred">{$LANG.domainrenewalspastgraceperiod}<span>
    {else}
    <select name="renewalperiod[{$renewal.id}]">
        {foreach from=$renewal.renewaloptions item=renewaloption}
        <option value="{$renewaloption.period}">{$renewaloption.period} {$LANG.orderyears} @ {$renewaloption.price}</option>
        {/foreach}
    </select>
    {/if}
</td></tr>
{foreachelse}
<tr class="carttablerow"><td colspan="5">{$LANG.domainrenewalsnoneavailable}</td></tr>
{/foreach}
</table>
</div>

<p style="text-align:center"><input type="submit" value="{$LANG.ordernowbutton}" class="btn btn-blue btn-md" /></p>

</form>

</div>
</div>
</div>