{if condition="isset($show_error_box)"}
    {include="message_box"}
{/if}
{if condition="isset($show_installer)"}
<script>
function process_module_actions(actions) {
	freepbx_modal_show('moduleBox');
	urlStr = "config.php?type=tool&amp;display=epm_config&amp;quietmode=1&amp;handler=file&amp;file=installer.html.php&amp;module=endpointman&amp;type=manual_install&amp;package={$package}&amp;xml={$xml}&amp;install_type={$type}";
	urlStr += "&amp;rand="+Math.random ( );
	for (var i in actions) {
		urlStr += "&amp;moduleaction["+i+"]="+actions[i];
	}
	$('#moduleBox').html('<iframe src="'+urlStr+'"></iframe>');
}
function close_module_actions(goback) {
	//freepbx_modal_close('moduleBox');
	freepbx_modal_hide('moduleBox');
	if (goback) {
  		location.href = 'config.php?type=tool&display=epm_advanced&subpage=manual_upload';
	}
}
process_module_actions();
</script>

<div id="moduleBox" style="display:none;"></div>
{/if}
<h2>Import/Upload Packages</h2>
<h4>Note: These files can be downloaded from: <a href="http://www.provisioner.net/releases3" target="_blank">http://www.provisioner.net/releases3</a></h4>
<form action="" method="post" enctype="multipart/form-data" name="form1">
    <label>Provisioner Package (.tgz):
        <input type="file" name="package" id="fileField">
    </label> Local Date Last Modified: {$provisioner_ver}
    <br/>
    <input type="submit" name="upload_provisioner" value="<?php echo _('Upload')?>">
</form>
    <br /><br />
<form action="" method="post" enctype="multipart/form-data" name="form1">
    <label>Brand Package (.tgz):
        <input type="file" name="package" id="fileField">
    </label>
    <br /><font style="font-size: small">Note: The Brand XML File is no longer needed as it is contained within the Brand Package.<br /><br />Learn How to Create your own brand package here: <a target="_blank" href="http://www.provisioner.net/adding_new_phones">http://www.provisioner.net/adding_new_phones</a></font><br />
    <input type="submit" name="upload_brand" value="<?php echo _('Upload')?>">
</form>
<br/>
<br/>

<h2>Export Brand Packages</h2>
<form action="" method="post" enctype="multipart/form-data" name="export">
    <select name="exp_brand">
	{loop name="brand_ava"}
                    <option value="{$value.value}">{$value.text}</option>
	{/loop}
    </select>
    <input type="submit" name="export_brand" value="<?php echo _('Upload')?>">
</form>
