{* $Id: ShowPackageDetails.tpl 12889 2008-04-22 18:31:04Z btyra $ * -------------------------------------------------------------- * This template displays a list of packages. * * Smarty Variables: * $packages (array of packages that match criteria) * $packageUsage (array of usage info) * *} {strip} {/strip} {php}$GLOBALS['__pagePath'] = array('TRANS_MENU_CLIENT_SUBSCRIPTIONS_SUBSCRIPTIONS', 'TRANS_SHOW_PACKAGE_DETAILS', '');{/php} {include file="$tplDirectory/header.tpl" tabMajor="packages" tabMinor="packages"} {if $numPackages==0} {"TRANS_NO_PACKAGES_FOUND"|lmsg} {else} {foreach key="statusID" item="packageGroup" from=$statusPackages} {assign var="packages" value=$packageGroup.packages}
{$packageStatuses.$statusID} {section name="i" loop=$packages} {if $packageUsage[$packageID]} {assign var="usage" value=$packageUsage[$packageID]} {if $usage.packageUsage != 0} {/if} {/if} {/section}
{"TRANS_PACKAGE"|lmsg} {"TRANS_ACTIONS"|lmsg}
{$packages[i].packageName} {if $packages[i].packagePendingCancellation>0 && $packages[i].packageStatus != $cancelledStatusID}
{"TRANS_PACKAGE_PENDING_CANCELLATION"|lmsg} {/if}
{if $packages[i].domains} {/if} {if $isPrimary} {foreach key="serverGroupID" item="attrs" from=$packages[i].keyedAttributes} {if $serverGroupID>0} {if $attrs.packageUserName.packageAttributeValue || $attrs.domainUserName.packageAttributeValue || $attrs.clientLogin.packageAttributeValue || $attrs.ftpUsername.packageAttributeValue} {/if} {/if} {/foreach} {/if} {if $packages[i].stopDate>10} {/if} {if $packages[i].keyedAttributes[0].PVT.packageAttributeValue} {/if}
{"TRANS_ID"|lmsg} {$packages[i].packageID}
{"TRANS_DOMAINS"|lmsg} {section name="x" loop=$packages[i].domains} {$packages[i].domains[x].domainSLD}.{$packages[i].domains[x].domainTLD}
{/section}
{if $serverGroupID==0}{"TRANS_GENERAL_CREDENTIALS"|lmsg}{else}{$keyedServerGroups.$serverGroupID}{/if} {if $attrs.domainUserName.packageAttributeValue} {"TRANS_USERNAME"|lmsg} {$attrs.domainUserName.packageAttributeValue}
{"TRANS_PASSWORD"|lmsg} {$attrs.domainPassword.packageAttributeValue} {elseif $attrs.clientLogin.packageAttributeValue} {"TRANS_USERNAME"|lmsg} {$attrs.clientLogin.packageAttributeValue}
{"TRANS_PASSWORD"|lmsg} {$attrs.packagePassword.packageAttributeValue} {elseif $attrs.packageUserName.packageAttributeValue} {"TRANS_USERNAME"|lmsg} {$attrs.packageUserName.packageAttributeValue}
{"TRANS_PASSWORD"|lmsg} {$attrs.packagePassword.packageAttributeValue} {/if} {if $attrs.ftpUsername.packageAttributeValue}
{"TRANS_PACKAGE_ATTRIBUTES__FTPUSERNAME"|lmsg} {$attrs.ftpUsername.packageAttributeValue}
{"TRANS_PACKAGE_ATTRIBUTES__FTPPASSWORD"|lmsg} {$attrs.ftpPassword.packageAttributeValue} {/if}
{"TRANS_BILLING_CYCLE"|lmsg} {$packages[i].cycleID|getArrayValueByID:$cycles}
{"TRANS_NEXT_BILL_DATE"|lmsg} {$packages[i].packageDateNextRenewal|getDate:short}
{"TRANS_STOP_DATE"|lmsg} {$packages[i].stopDate|getDate:short}
({$packages[i].moreCycles} {"TRANS_MORE_CYCLES"|lmsg})
{"TRANS_PACKAGE_ATTRIBUTES__PVT"|lmsg} {$attrs.PVT.packageAttributeValue}
{literal} {/literal} {foreach from=$packages[i].addonPrices item=addon key=addonName} {/foreach}
  {"TRANS_SUBSCRIPTION_PRICE_CYCLE"|lmsg} {"TRANS_SUBSCRIPTION_PRICE_DISCOUNT"|lmsg} {"TRANS_SUBSCRIPTION_PRICE_TAX"|lmsg} {"TRANS_SUBSCRIPTION_PRICE"|lmsg}
{$packages[i].packageName} {$packages[i].planPrice.original|getAmount:$packages[i].currencyID} {$packages[i].planPrice.discount|getAmount:$packages[i].currencyID} {$packages[i].planPrice.tax|getAmount:$packages[i].currencyID} {$packages[i].planPrice.total|getAmount:$packages[i].currencyID}
{$addonName} {$addon.original|getAmount:$packages[i].currencyID} {$addon.discount|getAmount:$packages[i].currencyID} {$addon.tax|getAmount:$packages[i].currencyID} {$addon.total|getAmount:$packages[i].currencyID}
{"TRANS_SUBSCRIPTION_PRICE_TOTAL"|lmsg}       {$packages[i].totalPrice|getAmount:$packages[i].currencyID}
{assign var="packageID" value=$packages[i].packageID} {if (isset($childPackages) && $childPackages.$packageID)}
{"TRANS_OPTIONS"|lmsg}
{foreach key="x" item="package" from=$childPackages.$packageID} {/foreach}
{$package.packageID} {$package.packageName} {if $package.packagePendingCancellation>0 && $package.packageStatus != $cancelledStatusID}
{"TRANS_PACKAGE_PENDING_CANCELLATION"|lmsg} {/if}
{$package.packagePrice|getAmount:$package.currencyID} {$package.cycleID|getArrayValueByID:$cycles} {$package.packageDateNextRenewal|getDate:short} {if $package.stopDate>10} {$package.stopDate|getDate:short}
({$package.moreCycles} {"TRANS_MORE_CYCLES"|lmsg}) {else} -- {/if}
{/if}
{if $packages[i].clientCancel==1} {if $packages[i].packagePendingCancellation==0 && $packages[i].mayCancel==1} {include file="$tplDirectory/widgets/actionLink.tpl" page="packages.php" actionName="CancelPackage" args="packageID=`$packages[i].packageID`" icoImage="cancel" icoWidth="" icoHeight="" icoStyle="" altText="TRANS_CANCEL" titleText="TRANS_CANCEL" linkText="TRANS_CANCEL" noSpace="1" }
{/if} {if $packages[i].packagePendingCancellation==1} {include file="$tplDirectory/widgets/actionLink.tpl" page="packages.php" actionName="CancelPackage" args="packageID=`$packages[i].packageID`" icoImage="uncancel" icoWidth="" icoHeight="" icoStyle="" altText="TRANS_WITHDRAW_CANCELLATION" titleText="TRANS_WITHDRAW_CANCELLATION" linkText="TRANS_WITHDRAW_CANCELLATION" noSpace="1" }
{/if} {/if} {if $statusID == ("none"|get_status_id:"package") AND $packages[i].productType == ("products"|getTypeID:"hosting")} {include file="$tplDirectory/widgets/actionLink.tpl" page="packages.php" actionName="ShowPanelOptions" args="packageID=`$packages[i].packageID`" icoImage="view" icoWidth="" icoHeight="" icoStyle="" altText="TRANS_PANEL_OPTIONS" titleText="TRANS_PANEL_OPTIONS" linkText="TRANS_PANEL_OPTIONS" noSpace="1" }
{/if} {if $packages[i].productType == ("products"|getTypeID:"cert")} {if $statusID == ("pending"|get_status_id:"package") && $packages[i].invoicePaid} {include file="$tplDirectory/widgets/actionLink.tpl" page="certs.php" actionName="OrderCertCSRRequest" args="packageID=`$packages[i].packageID`" icoImage="view" icoWidth="" icoHeight="" icoStyle="" altText="TRANS_TODO_BEGIN_CERT_REQUEST" titleText="TRANS_TODO_BEGIN_CERT_REQUEST" linkText="TRANS_TODO_BEGIN_CERT_REQUEST" noSpace="1" }
{elseif $statusID == ("none"|get_status_id:"package")} {include file="$tplDirectory/widgets/actionLink.tpl" page="certs.php" actionName="ShowCertDetails" args="packageID=`$packages[i].packageID`" icoImage="view" icoWidth="" icoHeight="" icoStyle="" altText="TRANS_MANAGE_CERT" titleText="TRANS_MANAGE_CERT" linkText="TRANS_MANAGE_CERT" noSpace="1" }
{/if} {/if} {if $packages[i].packagePendingCancellation==0 && $upgradeDowngradeStatuses.$statusID==1} {*if $packages[i].rules.addons==1} {include file="$tplDirectory/widgets/actionLink.tpl" page="packages.php" actionName="EditPackageAddons" args="packageID=`$packages[i].packageID`" icoImage="addons" icoWidth="" icoHeight="" icoStyle="" altText="TRANS_CONFIGURE" titleText="TRANS_CONFIGURE" linkText="TRANS_CONFIGURE" noSpace="1" }
{/if*} {if $packages[i].rules.upgrade==1 && $packages[i].canUpgrade} {include file="$tplDirectory/widgets/actionLink.tpl" page="packages.php" actionName="UpgradePackage" args="packageID=`$packages[i].packageID`" icoImage="upgrade" icoWidth="" icoHeight="" icoStyle="" altText="TRANS_UPGRADE" titleText="TRANS_UPGRADE" linkText="TRANS_UPGRADE" noSpace="1" }
{/if} {if $packages[i].rules.downgrade==1 && $packages[i].canDowngrade} {include file="$tplDirectory/widgets/actionLink.tpl" page="packages.php" actionName="DowngradePackage" args="packageID=`$packages[i].packageID`" icoImage="downgrade" icoWidth="" icoHeight="" icoStyle="" altText="TRANS_DOWNGRADE" titleText="TRANS_DOWNGRADE" linkText="TRANS_DOWNGRADE" noSpace="1" }
{/if} {/if} {if $packages[i].packageStatus == 0 || $packages[i].packageStatus==13}
{assign var="panelFiles" value=$packages[i].panelTemplates} {foreach item="tmpl" key="serverGroupID" from=$panelFiles}
{$tmpl.1}
{include file=$tmpl.0 serverGroupID=$serverGroupID attributes=$packages[i].keyedAttributes}

{/foreach} {else} {"TRANS_PACKAGE_IS_NOT_ACTIVE"|lmsg} {/if}
{if $usage.packageUsage>$usage.packageUsageLimit}
{"TRANS_USAGE"|lmsg} {$usage.packageUsage|getAmount:" "} of {$usage.packageUsageLimit|getAmount:" "} {$usage.packageUsageUnit}
{include file="$tplDirectory/widgets/progressBar.tpl" containerWidth="400" containerColor="red" leftPercentage="TRANS_OVER_THE_LIMIT" barWidth=$usage.packageUsageLimit*400/$usage.packageUsage} {else}
{"TRANS_USAGE"|lmsg} {$usage.packageUsage|getAmount:" "} of {$usage.packageUsageLimit|getAmount:" "} {$usage.packageUsageUnit}
{include file="$tplDirectory/widgets/progressBar.tpl" containerWidth="400" containerColor="#CCCCCC" barWidth=$usage.packageUsage*400/$usage.packageUsageLimit} {/if}

{/foreach} {/if} {include file="$tplDirectory/footer.tpl"}