<div class="section">
	<div class="section-header">
		<h4>{$LANG.upgradecurrentconfig}:</h4>
	</div>
	<div class="section-body">
		<div class="panel panel-default">
			<div class="panel-body">
				<strong>{$groupname} - {$productname}</strong> {if $domain} ({$domain}){/if}
			</div>
		</div>
	</div>
</div>
<div class="section">
	<div class="section-header">
		<h4>{$LANG.upgradenewconfig}:</h4>
		<p class="desc">{$LANG.upgradechoosepackage}</p>
	</div>
	<div class="section-body">
		<div class="row row-eq-height">
			{foreach key=num item=upgradepackage from=$upgradepackages}
				<div class="col-lg-5 mb-5">
					<form method="post" action="{$smarty.server.PHP_SELF}">
						<input type="hidden" name="step" value="2">
						<input type="hidden" name="type" value="{$type}">
						<input type="hidden" name="id" value="{$id}">
						<input type="hidden" name="pid" value="{$upgradepackage.pid}">
						<div class="card h-100">
							<div class="card-body">
								<h4 class="product-name mt-0">{$upgradepackage.groupname} - {$upgradepackage.name}</h4>
								{include file="$template/thurdata/upgrade_productdesc.tpl"}
							</div>
							<div class="card-footer">
								<div class="form-group">
									{if $upgradepackage.pricing.type eq "free"}
										{$LANG.orderfree}<br />
										<input type="hidden" name="billingcycle" value="free">
									{elseif $upgradepackage.pricing.type eq "onetime"}
										{$upgradepackage.pricing.onetime} {$LANG.orderpaymenttermonetime}
										<input type="hidden" name="billingcycle" value="onetime">
									{elseif $upgradepackage.pricing.type eq "recurring"}
										{if $curbillingcycle == "free" || $curbillingcycle == "onetime"}
											<select name="billingcycle" class="form-control">
												{if $upgradepackage.pricing.monthly}<option value="monthly">{$upgradepackage.pricing.monthly}</option>{/if}
												{if $upgradepackage.pricing.quarterly}<option value="quarterly">{$upgradepackage.pricing.quarterly}</option>{/if}
												{if $upgradepackage.pricing.semiannually}<option value="semiannually">{$upgradepackage.pricing.semiannually}</option>{/if}
												{if $upgradepackage.pricing.annually}<option value="annually">{$upgradepackage.pricing.annually}</option>{/if}
												{if $upgradepackage.pricing.biennially}<option value="biennially">{$upgradepackage.pricing.biennially}</option>{/if}
												{if $upgradepackage.pricing.triennially}<option value="triennially">{$upgradepackage.pricing.triennially}</option>{/if}
											</select>
										{else}
											<input type="hidden" name="billingcycle" class="form-control" value={$curbillingcycle}>
											<div class="form-control">{$upgradepackage.pricing.{$curbillingcycle}}</div>
										{/if}
									{/if}
								</div>
								<input type="submit" value="{$LANG.upgradedowngradechooseproduct}" class="btn btn-block btn-primary" /> 
							</div>
						</div>
					</form>
				</div>
			{/foreach}
		</div>
	</div>
</div>

