<?php /* Smarty version 2.6.25, created on 2012-07-02 02:02:06
         compiled from submit.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'escape', 'submit.tpl', 190, false),array('modifier', 'trim', 'submit.tpl', 190, false),array('modifier', 'count', 'submit.tpl', 531, false),array('function', 'formtool_count_chars', 'submit.tpl', 271, false),array('function', 'html_options', 'submit.tpl', 300, false),array('function', 'html_options2', 'submit.tpl', 302, false),)), $this); ?>
<?php ob_start(); ?> - Submit Link<?php $this->_smarty_vars['capture']['title'] = ob_get_contents(); ob_end_clean(); ?>
<?php ob_start(); ?>Submit Link<?php $this->_smarty_vars['capture']['default'] = ob_get_contents();  $this->assign('in_page_title', ob_get_contents());ob_end_clean(); ?>
<?php ob_start(); ?>Submit a new link to the directory<?php $this->_smarty_vars['capture']['default'] = ob_get_contents();  $this->assign('description', ob_get_contents());ob_end_clean(); ?>

<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "header.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "top_bar.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "validation.tpl", 'smarty_include_vars' => array('form_id' => 'submitForm','validators' => $this->_tpl_vars['validators'])));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>



<?php echo ''; ?><?php if (@DISABLE_SUBMIT == 1 && $this->_tpl_vars['is_admin'] != 1): ?><?php echo '<table width="96%" border="0" align="center" cellpadding="4" cellspacing="4" class="sp_area"><tr><td><h2>Closed</h2></td></tr><tr><td>We are sorry but link submissions are closed.<br />'; ?><?php echo $this->_tpl_vars['disablereason']; ?><?php echo '</td></tr></table><br />'; ?><?php else: ?><?php echo ''; ?><?php if (( $this->_tpl_vars['confirmed'] )): ?><?php echo '<table border="0" class="formPage"><tr><td colspan="2" class="msg">The link\'s email address has been confirmed.<br />The link will be listed as soon as it is approved by a site administrator.</td></tr></table>'; ?><?php endif; ?><?php echo ''; ?><?php if (@REQUIRE_REGISTERED_USER == 1 && empty ( $this->_tpl_vars['regular_user_details']['ID'] )): ?><?php echo '<table border="0" class="formPage"><tr><td><h3>Information</h3></td></tr><tr><td>You must be logged in to submit a new link.<br />No account yet? <a href="'; ?><?php echo @DOC_ROOT; ?><?php echo '/profile.php?mode=register" title="Register new user">Create one</a></td></tr></table>'; ?><?php else: ?><?php echo '<form method="post" action="" class="cmxform" id="submitForm" name="submitForm" enctype="multipart/form-data"><table border="0" class="formPage">'; ?><?php if ($this->_tpl_vars['error']): ?><?php echo '<tr><td colspan="2" class="err">An error has occured '; ?><?php $_from = $this->_tpl_vars['error_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['errorList'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['errorList']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['errorKey'] => $this->_tpl_vars['errorItem']):
        $this->_foreach['errorList']['iteration']++;
?><?php echo ''; ?><?php if ($this->_tpl_vars['errorKey'] == 'DO_MATH'): ?><?php echo ''; ?><?php if (is_array ( $this->_tpl_vars['errorItem'] )): ?><?php echo ''; ?><?php echo $this->_tpl_vars['errorItem']['remote']; ?><?php echo ''; ?><?php else: ?><?php echo ''; ?><?php echo $this->_tpl_vars['errorItem']; ?><?php echo ''; ?><?php endif; ?><?php echo ''; ?><?php endif; ?><?php echo ''; ?><?php endforeach; endif; unset($_from); ?><?php echo '.</td></tr>'; ?><?php endif; ?><?php echo ''; ?><?php if ($this->_tpl_vars['double_review'] && ! $this->_tpl_vars['posted']): ?><?php echo '<tr><td colspan="2" class="err">'; ?><?php echo $this->_tpl_vars['double_review']; ?><?php echo '</td></tr>'; ?><?php endif; ?><?php echo ''; ?><?php if ($this->_tpl_vars['posted']): ?><?php echo '<tr><td colspan="2" class="msg">Link submitted'; ?><?php if ($this->_tpl_vars['waiting_approval'] == 1): ?><?php echo ' and awaiting approval'; ?><?php endif; ?><?php echo '.<br />Submit another link.</td></tr>'; ?><?php endif; ?><?php echo ''; ?><?php if ($this->_tpl_vars['needs_confirmation']): ?><?php echo '<tr><td colspan="2" class="msg">The email address you provided needs to be confirmed before the link is listed.<br />Please check your email for the confirmation link.</td></tr>'; ?><?php endif; ?><?php echo ''; ?><?php if ($this->_tpl_vars['catid'] == 0): ?><?php echo '<tr><td colspan="2" ><p>PLEASE NOTE THAT YOU MUST USE I.E 8.0 OR HIGHER, FIREFOX OR GOOGLE CHROME</P><div class="fields" ><div class="fields_c" style="padding: 0 0 20px;"><h3>Step One Choose a Category:</h3><div id="hiddenModalContent">'; ?><?php echo ''; ?><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "category_select.tpl", 'smarty_include_vars' => array('selected' => $this->_tpl_vars['data']['CATEGORY_ID'],'selected_parent' => $this->_tpl_vars['data']['PARENT_ID'])));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?><?php echo '</div><br /><center><input type="button" class=\'btn\' id="ok" value="Go To Step Two" onclick="closeCategSelectModal(self);"  /></center>'; ?><?php echo '
<script type="text/javascript">
	jQuery(function($) {
		$(document).ready(function() {
			reload_categ_tree();
		});
	});

	function closeCategSelectModal(el) {
		el.parent.tb_remove();
		destroyCatTree();
		jQuery("#selectCategOk").hide();
		jQuery("#toggleCategTree").hide();
		var cur_categ = jQuery("#CATEGORY_ID").val();
		document.location.href = "submit.php?c=" + cur_categ;
	}

</script>
'; ?><?php echo '</div><div class="fields_b"></div></div></td></tr>'; ?><?php elseif ($this->_tpl_vars['linktypeid'] == 0): ?><?php echo '<tr><td colspan="2"><div class="fields"><div class="fields_c"><h3>Step Two Choose a Link Type:</h3><table border="0" cellspacing="10" cellpadding="0">'; ?><?php if ($this->_supers['get']['LINK_TYPE'] == 'undefined'): ?><?php echo '<tr><td colspan="2" class="err">You must choose a link type to proceed</td></tr>'; ?><?php endif; ?><?php echo ''; ?><?php $_from = $this->_tpl_vars['link_types']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['link_types'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['link_types']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['link_type_id'] => $this->_tpl_vars['link_type']):
        $this->_foreach['link_types']['iteration']++;
?><?php echo '<tr><td><input type="radio" name="LINK_TYPE" value="'; ?><?php echo $this->_tpl_vars['link_type_id']; ?><?php echo '" '; ?><?php if ($this->_tpl_vars['link_type_id'] == $this->_tpl_vars['linktypeid']): ?><?php echo 'checked'; ?><?php endif; ?><?php echo '/></td><td>'; ?><?php echo $this->_tpl_vars['link_type']['NAME']; ?><?php echo '&nbsp;-&nbsp;'; ?><?php if ($this->_tpl_vars['link_type']['PRICE'] > 0): ?><?php echo ''; ?><?php echo @HTML_CURRENCY_CODE; ?><?php echo ''; ?><?php echo $this->_tpl_vars['link_type']['PRICE']; ?><?php echo ' / '; ?><?php echo $this->_tpl_vars['payment_um'][$this->_tpl_vars['link_type']['PAY_UM']]; ?><?php echo ''; ?><?php else: ?><?php echo 'free'; ?><?php endif; ?><?php echo '<p class="small">'; ?><?php echo $this->_tpl_vars['link_type']['DESCRIPTION']; ?><?php echo '</p></td></tr>'; ?><?php endforeach; endif; unset($_from); ?><?php echo '<tr><td colspan=\'2\'><center><input type="button" class=\'btn\' name="choicemade" value="Go To Step Three" /></center></tr></td></table></div><div class="fields_b"></div></div></td></tr>'; ?><?php else: ?><?php echo '<input type="hidden" name="LINK_TYPE" value="'; ?><?php echo $this->_tpl_vars['linktypeid']; ?><?php echo '" checked="true" />'; ?><?php endif; ?><?php echo ''; ?><?php if ($this->_tpl_vars['linktypeid'] == 0): ?><?php echo ''; ?><?php else: ?><?php echo '<tr><td class="label underlined" align=\'left\' colspan="2">Fields marked with a <span class=\'req\'>*</span> are required.</td></tr>'; ?><?php $_from = $this->_tpl_vars['submit_items']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['submit_items'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['submit_items']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['item']):
        $this->_foreach['submit_items']['iteration']++;
?><?php echo ''; ?><?php echo ''; ?><?php if ($this->_tpl_vars['item']['FIELD_NAME'] == 'TITLE'): ?><?php echo '<tr><td class="label">'; ?><?php if ($this->_tpl_vars['valid']['rules']['TITLE']['required'] == true): ?><?php echo '<span class=\'req\'>*</span>'; ?><?php endif; ?><?php echo 'Title:</td><td class="field"><input type="text" id="TITLE" name="TITLE" value="'; ?><?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['data']['TITLE'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)))) ? $this->_run_mod_handler('trim', true, $_tmp) : trim($_tmp)); ?><?php echo '" maxlength="'; ?><?php echo @TITLE_MAX_LENGTH; ?><?php echo '" class="text" />'; ?><?php if ($this->_tpl_vars['SEO_URL'] != ''): ?><?php echo '<a class="admin_action" href="'; ?><?php if (! @ENABLE_REWRITE): ?><?php echo ''; ?><?php echo @DOC_ROOT; ?><?php echo '/detail.php?id='; ?><?php echo $this->_tpl_vars['ID']; ?><?php echo ''; ?><?php else: ?><?php echo ''; ?><?php echo @DOC_ROOT; ?><?php echo '/'; ?><?php echo $this->_tpl_vars['SEO_URL']; ?><?php echo ''; ?><?php endif; ?><?php echo '" title="Preview Link on the Front End" target="_blank"><img src="'; ?><?php echo @TEMPLATE_ROOT; ?><?php echo '/images/outbox.png"/></a>'; ?><?php endif; ?><?php echo '</td></tr>'; ?><?php elseif ($this->_tpl_vars['item']['FIELD_NAME'] == 'CATEGORY_ID'): ?><?php echo '<tr><td class="label">'; ?><?php if ($this->_tpl_vars['valid']['rules']['CATEGORY_ID']['required'] == true): ?><?php echo '<span class=\'req\'>*</span>'; ?><?php endif; ?><?php echo 'Category:</td><td class="field">'; ?><?php echo $this->_tpl_vars['CategoryTitle']; ?><?php echo '<div id="inlineCategSelection">'; ?><?php echo '<input type="hidden" id="CATEGORY_ID" name="CATEGORY_ID" value="'; ?><?php echo $this->_tpl_vars['CATEGORY_ID']; ?><?php echo '" /><p style="text-align:center; "  id="selectCategOk"><input type="button" id="selectCategBtnOk" value="Start Over"  onClick="history.go(-2)" class=\'btn\' /></p></div></div>'; ?><?php if ($this->_tpl_vars['link_type_details']['MULTIPLE_CATEGORIES'] != ''): ?><?php echo ''; ?><?php $_from = $this->_tpl_vars['add_categs']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['additional'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['additional']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['categ']):
        $this->_foreach['additional']['iteration']++;
?><?php echo ''; ?><?php if (($this->_foreach['additional']['iteration']-1) < $this->_tpl_vars['link_type_details']['MULTIPLE_CATEGORIES']): ?><?php echo '<div>'; ?><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "category_select.tpl", 'smarty_include_vars' => array('selected' => $this->_tpl_vars['categ']['CATEGORY_ID'],'selected_parent' => $this->_tpl_vars['categ']['CATEGORY_ID'],'additional_categs' => true)));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?><?php echo '&nbsp;<a href="#" onclick="removeCateg(this); return false;">remove</a><div style="float: none; clear: both; height: 8px;"></div></div>'; ?><?php endif; ?><?php echo ''; ?><?php endforeach; endif; unset($_from); ?><?php echo ''; ?><?php endif; ?><?php echo '<div id="categ" style="display: none;"><br />'; ?><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "category_select.tpl", 'smarty_include_vars' => array('selected' => $this->_tpl_vars['data']['CATEGORY_ID'],'selected_parent' => $this->_tpl_vars['data']['PARENT_ID'],'additional_categs' => true)));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?><?php echo '&nbsp;</div><a href="" class="formDelCateg" id="fileDelCateg" onclick="removeCateg(this); return false;" style="display: none">remove</a><div class="clear"></div><br /><a onclick="plusCateg();return false;" href="" id="plusCategLink" class="formSmall" style="border-width: 0;">+ additional categ</a></td></tr>'; ?><?php elseif ($this->_tpl_vars['item']['FIELD_NAME'] == 'OWNER_NAME'): ?><?php echo '<tr><td class="label">'; ?><?php if ($this->_tpl_vars['valid']['rules']['OWNER_NAME']['required'] == true): ?><?php echo '<span class=\'req\'>*</span>'; ?><?php endif; ?><?php echo 'Owner Name:</td><td class="field"><input type="text" id="OWNER_NAME" name="OWNER_NAME" value="'; ?><?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['data']['OWNER_NAME'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)))) ? $this->_run_mod_handler('trim', true, $_tmp) : trim($_tmp)); ?><?php echo '" maxlength="'; ?><?php echo @USER_NAME_MAX_LENGTH; ?><?php echo '" class="text" /></td></tr>'; ?><?php elseif ($this->_tpl_vars['item']['FIELD_NAME'] == 'OWNER_EMAIL'): ?><?php echo '<tr><td class="label">'; ?><?php if ($this->_tpl_vars['valid']['rules']['OWNER_EMAIL']['required'] == true): ?><?php echo '<span class=\'req\'>*</span>'; ?><?php endif; ?><?php echo 'Owner Email:</td><td class="field"><input type="text" id="OWNER_EMAIL" name="OWNER_EMAIL" value="'; ?><?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['data']['OWNER_EMAIL'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)))) ? $this->_run_mod_handler('trim', true, $_tmp) : trim($_tmp)); ?><?php echo '" maxlength="255" class="text" /><p class="small"><span style="display: block; margin: 2px; float: left;"><input type="checkbox" name="OWNER_NEWSLETTER_ALLOW" checked="checked" /></span>&nbsp;<span style="display: block; float: left; margin: 2px 0 0 0;">Allow site administrator to send me newsletters. </span><div style="clear: both;"></div></p></td></tr>'; ?><?php elseif ($this->_tpl_vars['item']['FIELD_NAME'] == 'META_KEYWORDS'): ?><?php echo ''; ?><?php if (@ENABLE_META_TAGS == 1): ?><?php echo '<tr><td class="label">META Keywords:</td><td class="field"><input type="text" id="META_KEYWORDS" name="META_KEYWORDS" value="'; ?><?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['data']['META_KEYWORDS'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)))) ? $this->_run_mod_handler('trim', true, $_tmp) : trim($_tmp)); ?><?php echo '" class="text" /><p class="msg notice info">Separate keywords by comma.</p></td></tr>'; ?><?php endif; ?><?php echo ''; ?><?php elseif ($this->_tpl_vars['item']['FIELD_NAME'] == 'META_DESCRIPTION'): ?><?php echo ''; ?><?php if (@ENABLE_META_TAGS == 1): ?><?php echo '<tr><td class="label">META Description:</td><td class="smallDesc"><textarea id="META_DESCRIPTION" name="META_DESCRIPTION" rows="3" cols="30" class="text" '; ?><?php echo smarty_function_formtool_count_chars(array('name' => 'META_DESCRIPTION','limit' => @META_DESCRIPTION_MAX_LENGTH,'alert' => true), $this);?><?php echo '>'; ?><?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['data']['META_DESCRIPTION'])) ? $this->_run_mod_handler('trim', true, $_tmp) : trim($_tmp)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?><?php echo '</textarea><p class="limitDesc">Limit: <input type="text" name="META_DESCRIPTION_limit" class="limit_field" readonly="readonly" value="'; ?><?php echo $this->_tpl_vars['MetaDescriptionLimit']; ?><?php echo '" /></p></td></tr>'; ?><?php endif; ?><?php echo ''; ?><?php elseif ($this->_tpl_vars['item']['FIELD_NAME'] == 'RECPR_URL'): ?><?php echo '<tr><td class="label">'; ?><?php if ($this->_tpl_vars['valid']['rules'][$this->_tpl_vars['item']['FIELD_NAME']]['required'] == true): ?><?php echo '<span class=\'req\'>*</span>'; ?><?php endif; ?><?php echo ''; ?><?php echo $this->_tpl_vars['item']['NAME']; ?><?php echo ':</td><td class="field"><input type="text" name="'; ?><?php echo $this->_tpl_vars['item']['FIELD_NAME']; ?><?php echo '" id="'; ?><?php echo $this->_tpl_vars['item']['FIELD_NAME']; ?><?php echo '" value="" size="40" maxlength="255" class="text" /><br />'; ?><?php if (@SAME_DOMAIN_RECPR == 1): ?><?php echo '<p class="small">We require the Reciprocal to be on the same domain as the link you are submitting.</p>'; ?><?php endif; ?><?php echo '<p class="small">To validate the reciprocal link please include the<br />following HTML code in the page at the URL<br />specified above, before submiting this form:</p><textarea name="RECPR_TEXT" rows="2" readonly="readonly" cols="50" class="text">&lt;a href="'; ?><?php echo @DEFAULT_RECPR_URL; ?><?php echo '"&gt;'; ?><?php echo @DEFAULT_RECPR_TITLE; ?><?php echo '&lt;/a&gt;</textarea></td></tr>'; ?><?php echo ''; ?><?php else: ?><?php echo '<tr><td class="label">'; ?><?php if ($this->_tpl_vars['valid']['rules'][$this->_tpl_vars['item']['FIELD_NAME']]['required'] == true): ?><?php echo '<span class=\'req\'>*</span>'; ?><?php endif; ?><?php echo ''; ?><?php echo $this->_tpl_vars['item']['NAME']; ?><?php echo ':</td><td class="field">'; ?><?php if ($this->_tpl_vars['item']['TYPE'] == 'STR'): ?><?php echo '<input type="text" name="'; ?><?php echo $this->_tpl_vars['item']['FIELD_NAME']; ?><?php echo '" id="'; ?><?php echo $this->_tpl_vars['item']['FIELD_NAME']; ?><?php echo '" value="'; ?><?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['data'][$this->_tpl_vars['item']['FIELD_NAME']])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)))) ? $this->_run_mod_handler('trim', true, $_tmp) : trim($_tmp)); ?><?php echo '" size="40" class="text" />'; ?><?php elseif ($this->_tpl_vars['item']['TYPE'] == 'TXT'): ?><?php echo ''; ?><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "rte.tpl", 'smarty_include_vars' => array('NAME' => $this->_tpl_vars['item']['FIELD_NAME'],'VALUE' => $this->_tpl_vars['data'][$this->_tpl_vars['item']['FIELD_NAME']])));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?><?php echo ''; ?><?php elseif ($this->_tpl_vars['item']['TYPE'] == 'BOOL'): ?><?php echo ''; ?><?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['yes_no'],'selected' => $this->_tpl_vars['data'][$this->_tpl_vars['item']['FIELD_NAME']],'name' => $this->_tpl_vars['item']['FIELD_NAME'],'id' => $this->_tpl_vars['item']['FIELD_NAME']), $this);?><?php echo ''; ?><?php elseif ($this->_tpl_vars['item']['TYPE'] == 'DROPDOWN'): ?><?php echo ''; ?><?php echo smarty_function_html_options2(array('options' => $this->_tpl_vars['item']['OPTIONS'],'selected' => $this->_tpl_vars['data'][$this->_tpl_vars['item']['FIELD_NAME']],'name' => $this->_tpl_vars['item']['FIELD_NAME'],'id' => $this->_tpl_vars['item']['FIELD_NAME']), $this);?><?php echo ''; ?><?php elseif ($this->_tpl_vars['item']['TYPE'] == 'CAT'): ?><?php echo ''; ?><?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['categsNormal'],'selected' => $this->_tpl_vars['data'][$this->_tpl_vars['item']['FIELD_NAME']],'name' => $this->_tpl_vars['item']['FIELD_NAME'],'id' => $this->_tpl_vars['item']['FIELD_NAME']), $this);?><?php echo ''; ?><?php elseif ($this->_tpl_vars['item']['TYPE'] == 'FILE'): ?><?php echo '<input type="file" name="'; ?><?php echo $this->_tpl_vars['item']['FIELD_NAME']; ?><?php echo '" id="'; ?><?php echo $this->_tpl_vars['item']['FIELD_NAME']; ?><?php echo '" class="text"/><br />Allowed files: .pdf, .xls, .xlsx, .doc, .docx, .zip, .rar, .txt, .rtf, .csv. Files of other types will not be uploaded at all.<br/>'; ?><?php if ($this->_tpl_vars['data'][$this->_tpl_vars['item']['FIELD_NAME']] != ''): ?><?php echo 'Current: <br/><a href="'; ?><?php echo @SITE_URL; ?><?php echo 'uploads/'; ?><?php echo $this->_tpl_vars['data'][$this->_tpl_vars['item']['FIELD_NAME']]; ?><?php echo '" target="_blank">'; ?><?php echo $this->_tpl_vars['data'][$this->_tpl_vars['item']['FIELD_NAME']]; ?><?php echo '</a>&nbsp;<input type="checkbox" name="MARK_REMOVE_'; ?><?php echo $this->_tpl_vars['item']['FIELD_NAME']; ?><?php echo '" value="1"/>&nbsp;Mark for removal'; ?><?php endif; ?><?php echo ''; ?><?php elseif ($this->_tpl_vars['item']['TYPE'] == 'VIDEO'): ?><?php echo '<input type="file" name="'; ?><?php echo $this->_tpl_vars['item']['FIELD_NAME']; ?><?php echo '" id="'; ?><?php echo $this->_tpl_vars['item']['FIELD_NAME']; ?><?php echo '" class="text"/><br/>Allowed files: .avi, .mpg, .wmv, .mov Files of other types will not be uploaded at all.<br />'; ?><?php if ($this->_tpl_vars['data'][$this->_tpl_vars['item']['FIELD_NAME']] != ''): ?><?php echo 'Current: <br/><img src="'; ?><?php echo @SITE_URL; ?><?php echo 'uploads/thumb/'; ?><?php echo $this->_tpl_vars['data'][$this->_tpl_vars['item']['FIELD_NAME']]; ?><?php echo '.jpg"/> <a href="'; ?><?php echo @DOC_ROOT; ?><?php echo '/rm_si.php?id='; ?><?php echo $this->_tpl_vars['item']['ID']; ?><?php echo '&lid='; ?><?php echo $this->_tpl_vars['data']['ID']; ?><?php echo '">Remove</a>'; ?><?php endif; ?><?php echo ''; ?><?php elseif ($this->_tpl_vars['item']['TYPE'] == 'IMAGE'): ?><?php echo '<input type="file" name="'; ?><?php echo $this->_tpl_vars['item']['FIELD_NAME']; ?><?php echo '" id="'; ?><?php echo $this->_tpl_vars['item']['FIELD_NAME']; ?><?php echo '" class="text"/><br/>Allowed files: .gif, .png, .jpg, .jpeg. Files of other types will not be uploaded at all.<br />'; ?><?php if ($this->_tpl_vars['data'][$this->_tpl_vars['item']['FIELD_NAME']] != ''): ?><?php echo 'Current: <br/><a href="'; ?><?php echo @SITE_URL; ?><?php echo 'uploads/'; ?><?php echo $this->_tpl_vars['data'][$this->_tpl_vars['item']['FIELD_NAME']]; ?><?php echo '?detail=1&TB_iframe=true&height=400&width=400" onclick="return showThickbox(this);" class="thickbox"><img src="'; ?><?php echo @SITE_URL; ?><?php echo 'uploads/thumb/'; ?><?php echo $this->_tpl_vars['data'][$this->_tpl_vars['item']['FIELD_NAME']]; ?><?php echo '"/></a>&nbsp;<input type="checkbox" name="MARK_REMOVE_'; ?><?php echo $this->_tpl_vars['item']['FIELD_NAME']; ?><?php echo '" value="1"/>&nbsp;Mark for removal'; ?><?php endif; ?><?php echo ''; ?><?php elseif ($this->_tpl_vars['item']['TYPE'] == 'IMAGEGROUP'): ?><?php echo ''; ?><?php 
                                        // assign a uniqid to this field so we can find the files on submit
                                        $this->assign('imagegroupid',uniqid());
                                 ?><?php echo '<input type="hidden" name="'; ?><?php echo $this->_tpl_vars['item']['FIELD_NAME']; ?><?php echo '" id="'; ?><?php echo $this->_tpl_vars['item']['FIELD_NAME']; ?><?php echo '" value="'; ?><?php echo $this->_tpl_vars['imagegroupid']; ?><?php echo '"/>'; ?><?php echo '
                                        <div id="file-uploader">
                                                <noscript>
                                                        <p>Please enable JavaScript to use file uploader.</p>
                                                        <!-- or put a simple form for upload here -->
                                                </noscript>
                                        </div>
                                        <script src="javascripts/fileuploader.js" type="text/javascript"></script>
                                             <script>
					     curr_count = 0;
                                                function createUploader(){
                                                    var uploader = new qq.FileUploader({
                                                        element: document.getElementById(\'file-uploader\'),
                                                        action: \'uploadimg.php\',
							onSubmit: function(id, fileName, responseJSON){
													curr_count = curr_count+1;
													if(curr_count>=parseInt("'; ?><?php echo ''; ?><?php echo $this->_tpl_vars['link_types'][$this->_tpl_vars['linktypeid']]['COUNT_IMAGES']; ?><?php echo ''; ?><?php echo '"))
													 jQuery(".qq-upload-button").hide();
													       },
                                                        params: {
                                '; ?><?php echo 'imagegroupid: "'; ?><?php echo $this->_tpl_vars['imagegroupid']; ?><?php echo '"'; ?><?php echo '
                                                        }
                                                    });
                                                }
                                                window.onload = createUploader;
                                          </script>

                                '; ?><?php echo ''; ?><?php endif; ?><?php echo ''; ?><?php if ($this->_tpl_vars['item']['DESCRIPTION']): ?><?php echo '<br /><p class="small">'; ?><?php echo $this->_tpl_vars['item']['DESCRIPTION']; ?><?php echo '</p>'; ?><?php endif; ?><?php echo '</td></tr>'; ?><?php endif; ?><?php echo ''; ?><?php endforeach; endif; unset($_from); ?><?php echo ''; ?><?php if ($this->_tpl_vars['link_type_details']['DEEP_LINKS'] > 0): ?><?php echo '<tr><td class="label required"><label>Deep Links:</label></td><td class="smallDesc"><table id="additional_links" border="0" cellpadding="0" cellspacing="0"><tr><td align="center">Titles</td><td align="center">URLs</td></tr>'; ?><?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['start'] = (int)0;
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['link_type_details']['DEEP_LINKS']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
if ($this->_sections['i']['start'] < 0)
    $this->_sections['i']['start'] = max($this->_sections['i']['step'] > 0 ? 0 : -1, $this->_sections['i']['loop'] + $this->_sections['i']['start']);
else
    $this->_sections['i']['start'] = min($this->_sections['i']['start'], $this->_sections['i']['step'] > 0 ? $this->_sections['i']['loop'] : $this->_sections['i']['loop']-1);
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = min(ceil(($this->_sections['i']['step'] > 0 ? $this->_sections['i']['loop'] - $this->_sections['i']['start'] : $this->_sections['i']['start']+1)/abs($this->_sections['i']['step'])), $this->_sections['i']['max']);
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?><?php echo '<tr><td><input type="text" name="ADD_LINK_TITLE[]" class="text" style="width: 130px;" value="'; ?><?php echo $this->_tpl_vars['add_links'][$this->_sections['i']['index']]['TITLE']; ?><?php echo '" /></td><td><input type="text" name="ADD_LINK_URL[]"   class="text" style="width: 130px;" value="'; ?><?php echo $this->_tpl_vars['add_links'][$this->_sections['i']['index']]['URL']; ?><?php echo '" /></td></tr>'; ?><?php endfor; endif; ?><?php echo '</table><div class="clear"></div></td></tr>'; ?><?php endif; ?><?php echo ''; ?><?php if ($this->_tpl_vars['remove_link']): ?><?php echo '<tr><td class="label">Mark for removal:</td><td class="field"><input type="checkbox" id="MARK_REMOVE" name="MARK_REMOVE" /><span class="small">Use with caution</span></td></tr>'; ?><?php endif; ?><?php echo ''; ?><?php if (@VISUAL_CONFIRM == 2): ?><?php echo '<tr><td class="label"<span class=\'req\'>*</span>DO THE MATH:</td><td class="field"><span style="color: red;">'; ?><?php $_from = $this->_tpl_vars['error_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['errorList'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['errorList']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['errorKey'] => $this->_tpl_vars['errorItem']):
        $this->_foreach['errorList']['iteration']++;
?><?php echo ''; ?><?php if ($this->_tpl_vars['errorKey'] == 'DO_MATH'): ?><?php echo ''; ?><?php if (is_array ( $this->_tpl_vars['errorItem'] )): ?><?php echo ''; ?><?php echo $this->_tpl_vars['errorItem']['remote']; ?><?php echo '<br/>'; ?><?php else: ?><?php echo ''; ?><?php echo $this->_tpl_vars['errorItem']; ?><?php echo '<br/>'; ?><?php endif; ?><?php echo ''; ?><?php endif; ?><?php echo ''; ?><?php endforeach; endif; unset($_from); ?><?php echo '</span><font style="font-weight: bold; font-size: 14pt; color: red; margin-right: 10px;">'; ?><?php echo $this->_tpl_vars['DO_MATH_N1']; ?><?php echo ' + '; ?><?php echo $this->_tpl_vars['DO_MATH_N2']; ?><?php echo ' = </font><input type="text" id="DO_MATH" name="DO_MATH" value=\''; ?><?php echo $this->_tpl_vars['DO_MATH']; ?><?php echo '\' class="text" style="width: 60px;"/><br/><br/></td></tr>'; ?><?php endif; ?><?php echo ''; ?><?php if (@VISUAL_CONFIRM == 1): ?><?php echo ''; ?><?php if ($this->_tpl_vars['dont_show_captch'] != 1): ?><?php echo '<tr id="'; ?><?php echo $this->_tpl_vars['item']['NAME']; ?><?php echo '"><td class="label"><span class=\'req\'>*</span>Enter the code shown:</td><td class="field"><input id="IMAGEHASH" name="IMAGEHASH" type="hidden" value="'; ?><?php echo $this->_tpl_vars['imagehash']; ?><?php echo '" /><input class="required text" id="CAPTCHA" name="CAPTCHA" type="text" value="" size="'; ?><?php echo @CAPTCHA_PHRASE_LENGTH; ?><?php echo '" maxlength="'; ?><?php echo @CAPTCHA_PHRASE_LENGTH; ?><?php echo '" class="text" /><label for="CAPTCHA" id="captcha_validation" style="float: none; color: red; padding-left: .5em; "></label><div style="clear: both;"></div><p class="small">This helps prevent automated registrations.</p><img src="'; ?><?php echo @DOC_ROOT; ?><?php echo '/captcha.php?imagehash='; ?><?php echo $this->_tpl_vars['imagehash']; ?><?php echo '" class="captcha" alt="Visual Confirmation Security Code" title="Visual Confirmation Security Code" /></td></tr>'; ?><?php endif; ?><?php echo ''; ?><?php endif; ?><?php echo '<tr id="AGREERULES"><td class="label"><span class=\'req\'>*</span><a href="'; ?><?php echo @DOC_ROOT; ?><?php echo '/rules.php" title="Submission Rules" target=\'_blank\'>Submission Rules Agreement</a>:</td><td class="field"><input type="checkbox" id="AGREERULES" name="AGREERULES"'; ?><?php if ($this->_tpl_vars['AGREERULES'] == 'on'): ?><?php echo ' checked="checked"'; ?><?php endif; ?><?php echo ' /> I AGREE with the <a href="'; ?><?php echo @DOC_ROOT; ?><?php echo '/rules.php" title="Submission Rules" target=\'_blank\'>submission rules</a></td></tr><tr><td colspan="2" class="buttons">'; ?><?php if (! $this->_tpl_vars['review_link'] && ! $this->_tpl_vars['remove_link']): ?><?php echo '<input type="submit" name="continue" value="Continue" onclick="this.value=\'Please Wait\'"  class="btn" />'; ?><?php else: ?><?php echo '<input type="hidden" name="id" value="'; ?><?php echo $this->_tpl_vars['data']['ID']; ?><?php echo '"/><input type="submit" name="edit" value="Continue" class="btn" />'; ?><?php endif; ?><?php echo '</td></tr>'; ?><?php endif; ?><?php echo '</table><input type="hidden" name="formSubmitted" value="1" /></form>'; ?><?php endif; ?><?php echo ''; ?><?php endif; ?><?php echo ''; ?><?php echo '

<script type="text/javascript">

jQuery(function($) {
	$(document).ready(function(){
		$("input[name=choicemade]").click(function(){
			//update_form(); // albert: seems useless, we are making a refresh when the user changes the link type
		var ts = $(\'input[name=LINK_TYPE]:checked\').val() 
			var lt = getUrlVars()["LINK_TYPE"];
			if (lt) {
				var url = location.href.replace("LINK_TYPE="+lt, "LINK_TYPE=" + ts);
			} else {
				if (location.href.search(/\\?/) == -1) {
					var url = location.href + "?LINK_TYPE="+ts;
				} else {
					var url = location.href + "&LINK_TYPE="+ts;
				}
			}
			location.href= url;
		});
		
		function getUrlVars()
		{
		    var vars = [], hash;
		    var hashes = window.location.href.slice(window.location.href.indexOf(\'?\') + 1).split(\'&\');
		    for(var i = 0; i < hashes.length; i++)
		    {
		        hash = hashes[i].split(\'=\');
		        vars.push(hash[0]);
		        vars[hash[0]] = hash[1];
		    }
		    return vars;
		}

	
		$("#addCateg").click(function(){
			var categs_count = $("#multiple_categs").children().size();
			var link_type	  = $(\'input[name=LINK_TYPE]:checked\').val();
			if (categs_count < multiple_categs[link_type]) {
				$("#add_categ").clone(true).insertAfter("#add_categ");
				categs_count++;
			}
			if (categs_count == multiple_categs[link_type])
				$(this).hide();
			
		});

		$("#removeCateg").click(function(){
			if ($("#addCateg").is(":hidden"))
				$("#addCateg").show();
			if ($("#multiple_categs").children().size() > 1)
				$(this).parent().remove();
		});


		$("#submitForm").submit(function() {
			$(\'#categ\').remove();
			return true;
		});

	});
});

var maxCats = '; ?><?php echo ''; ?><?php if ($this->_tpl_vars['link_type_details']['MULTIPLE_CATEGORIES'] == ''): ?><?php echo '1'; ?><?php else: ?><?php echo ''; ?><?php echo $this->_tpl_vars['link_type_details']['MULTIPLE_CATEGORIES']; ?><?php echo ''; ?><?php endif; ?><?php echo ''; ?><?php echo ';
var numCats = '; ?><?php echo '1 + '; ?><?php echo count($this->_tpl_vars['add_categs']); ?><?php echo ''; ?><?php echo ';
if (numCats >= maxCats) {
	$(\'plusCategLink\').style.display = \'none\'; 
}

function plusCateg()
{
	var div = $(\'categ\');
	var newDiv = div.cloneNode(true);
	newDiv.id = \'\'
	newDiv.style.display = \'block\';

	//newDiv.find(\'*.smallText\').val("");

	var delLink = $(\'fileDelCateg\');
	var a = delLink.cloneNode(true);
	a.id = \'\';
	a.style.display = "inline";
	newDiv.appendChild(a);
	delLink.parentNode.insertBefore(newDiv, delLink);

	numCats++;
	if (numCats >= maxCats) {
		$(\'plusCategLink\').style.display = \'none\'; 
	} 
}

function removeCateg(elem)
{
	elem.parentNode.remove(elem.previousSibling);
	
	numCats--;
	if (numCats < maxCats) {
		$(\'plusCategLink\').style.display = \'block\'; 
	} 
}

Array.prototype.in_array = function(p_val) {
	for(var i = 0, l = this.length; i < l; i++) {
		if(this[i] == p_val) {
			return true;
		}
	}
	return false;
}


</script>

'; ?><?php echo ''; ?><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "footer.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?><?php echo ''; ?>