<?php /* Smarty version 2.6.28, created on 2016-11-28 01:01:53
         compiled from /home/solusito/public_html/templates/eco-net-v3-5/supportticketsubmit-steptwo.tpl */ ?>
<script language="JavaScript" type="text/javascript">
<?php echo '
var currentcheckcontent,lastcheckcontent;
jQuery(document).ready(function(){
    jQuery("#addfileupload").click(function () {
        jQuery("#fileuploads").append("<input type=\\"file\\" name=\\"attachments[]\\" size=\\"50\\"><br />");
        return false;
    });
});
'; ?>

<?php if ($this->_tpl_vars['kbsuggestions']): ?>
<?php echo '
function getticketsuggestions() {
    currentcheckcontent = jQuery("#message").val();
    if (currentcheckcontent!=lastcheckcontent && currentcheckcontent!="") {
        $.post("submitticket.php", { action: "getkbarticles", text: currentcheckcontent },
        function(data){
            if (data) {
                jQuery("#searchresults").html(data);
                jQuery("#searchresults").slideDown();
            }
        });
        lastcheckcontent = currentcheckcontent;
	}
    setTimeout(\'getticketsuggestions();\', 3000);
}
getticketsuggestions();
'; ?>

<?php endif; ?>
</script>

<?php if ($this->_tpl_vars['errormessage']): ?>
	<div class="notice notice-error">
		<div class="inside">
			<p><?php echo $this->_tpl_vars['errormessage']; ?>
</p>
		</div>
	</div>
<?php endif; ?>

<form action="<?php echo $_SERVER['PHP_SELF']; ?>
?step=3" method="post" enctype="multipart/form-data" name="submitticket" id="submitticket">
  <input type="hidden" name="deptid" value="<?php echo $this->_tpl_vars['deptid']; ?>
" />
 
		<div class="feildset">
		
			<div class="col1">
		
				<div>
					<label>
						<span><?php echo $this->_tpl_vars['LANG']['supportticketsclientname']; ?>
: <?php if ($this->_tpl_vars['loggedin']): ?><?php else: ?>(<?php echo $this->_tpl_vars['LANG']['required']; ?>
)<?php endif; ?></span>
						<?php if ($this->_tpl_vars['loggedin']): ?><?php echo $this->_tpl_vars['clientname']; ?>
<?php else: ?>
              			<input type="text" name="name" value="<?php echo $this->_tpl_vars['name']; ?>
" tabindex="1" requred="required" autofocus="autofocus" placeholder="<?php echo $this->_tpl_vars['LANG']['newticket_name']; ?>
" />
              			<?php endif; ?>
					</label>
				</div>
				
				<div>
					<label>
						<span><?php echo $this->_tpl_vars['LANG']['supportticketsclientemail']; ?>
: <?php if ($this->_tpl_vars['loggedin']): ?><?php else: ?>(<?php echo $this->_tpl_vars['LANG']['required']; ?>
)<?php endif; ?></span>
						<?php if ($this->_tpl_vars['loggedin']): ?><?php echo $this->_tpl_vars['email']; ?>
<?php else: ?>
              			<input type="text" name="email" value="<?php echo $this->_tpl_vars['email']; ?>
" tabindex="2" requred="required" placeholder="<?php echo $this->_tpl_vars['LANG']['newticket_email']; ?>
" />
              			<?php endif; ?>
					</label>
				</div>
				
				<div>
					<label>
						<span><?php echo $this->_tpl_vars['LANG']['supportticketsdepartment']; ?>
</span>
						<?php echo $this->_tpl_vars['department']; ?>
 (<strong><a href="submitticket.php">change</a></strong>)
					</label>
				</div>
				
				
				<div>
					<label>
						<span><?php echo $this->_tpl_vars['LANG']['supportticketsticketsubject']; ?>
: (<?php echo $this->_tpl_vars['LANG']['required']; ?>
)</span>
              			<input type="text" name="subject" value="<?php echo $this->_tpl_vars['subject']; ?>
" tabindex="3" requred="required" placeholder="<?php echo $this->_tpl_vars['LANG']['newticket_subject']; ?>
" />
					</label>
				</div>
				
				<div>
					<label>
						<span><?php echo $this->_tpl_vars['LANG']['supportticketsticketurgency']; ?>
:</span>
              			<select name="urgency">
                <option value="High"<?php if ($this->_tpl_vars['urgency'] == 'High'): ?> selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['LANG']['supportticketsticketurgencyhigh']; ?>
</option>
                <option value="Medium"<?php if ($this->_tpl_vars['urgency'] == 'Medium' || ! $this->_tpl_vars['urgency']): ?> selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['LANG']['supportticketsticketurgencymedium']; ?>
</option>
                <option value="Low"<?php if ($this->_tpl_vars['urgency'] == 'Low'): ?> selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['LANG']['supportticketsticketurgencylow']; ?>
</option>
              </select>
              		</label>
				</div>
				
				
				<?php if ($this->_tpl_vars['relatedservices']): ?>														
				
				<div>
					<label>
						<span><?php echo $this->_tpl_vars['LANG']['relatedservice']; ?>
:</span>
              			<select name="relatedservice">
                <option value=""><?php echo $this->_tpl_vars['LANG']['none']; ?>
</option>
                
<?php $_from = $this->_tpl_vars['relatedservices']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['relatedservice']):
?>

                <option value="<?php echo $this->_tpl_vars['relatedservice']['id']; ?>
"><?php echo $this->_tpl_vars['relatedservice']['name']; ?>
 (<?php echo $this->_tpl_vars['relatedservice']['status']; ?>
)</option>
                
<?php endforeach; endif; unset($_from); ?>

              </select>
              		</label>
				</div>				
				
				<?php endif; ?>
				
				<div>
					<label>
						<span>Message (<?php echo $this->_tpl_vars['LANG']['required']; ?>
)</span>
						<textarea name="message" id="message" placeholder="<?php echo $this->_tpl_vars['LANG']['newticket_message']; ?>
"><?php echo $this->_tpl_vars['message']; ?>
</textarea>
					</label>
				</div>
				
				
				<div>
					<label>
						<span><?php echo $this->_tpl_vars['LANG']['supportticketsticketattachments']; ?>
 - (<?php echo $this->_tpl_vars['LANG']['supportticketsallowedextensions']; ?>
: <?php echo $this->_tpl_vars['allowedfiletypes']; ?>
)</span>
						<input type="file" name="attachments[]" />
              <a href="#" id="addfileupload"><img src="images/add.gif" class="absmiddle" alt="" /> <?php echo $this->_tpl_vars['LANG']['addmore']; ?>
</a><br />
              <div id="fileuploads"></div>
					</label>
				</div>				
				
				
				
			</div>
			
		</div> 
 
 
 
 		<?php if ($this->_tpl_vars['customfields']): ?>
 		
		<div class="bigheader">
			<h2><?php echo $this->_tpl_vars['LANG']['newticket_required']; ?>
</h2>
		</div><!-- .bigheader --> 		

 		
		<div class="feildset">
		
			<div class="col1"> 		
 
          <?php $_from = $this->_tpl_vars['customfields']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['num'] => $this->_tpl_vars['customfield']):
?>
          
          <div>
          	<label>
          		<span><?php echo $this->_tpl_vars['customfield']['name']; ?>
</span>
          		<?php echo $this->_tpl_vars['customfield']['input']; ?>

          	</label>
          </div>
          
          <?php endforeach; endif; unset($_from); ?> 
          
			</div>
			
		</div>           
          
          
          <?php endif; ?>

          

  <div id="searchresults" class="highlightbox" style="display:none;"></div>
  
 				<?php if ($this->_tpl_vars['capatacha']): ?>
				<p class="center"><strong><?php echo $this->_tpl_vars['LANG']['captchatitle']; ?>
</strong></p>
				<p class="center"><?php echo $this->_tpl_vars['LANG']['captchaverify']; ?>
</p>
				<?php if ($this->_tpl_vars['capatacha'] == 'recaptcha'): ?>
				<div align="center"><?php echo $this->_tpl_vars['recapatchahtml']; ?>
</div>
				<?php else: ?>
				<p class="center"><img src="includes/verifyimage.php" align="middle" /> <input type="text" name="code" tabindex="5" class="capcha" /></p>
				<?php endif; ?>
				<?php endif; ?> 
  
  <p class="center">
    <input type="submit" value="<?php echo $this->_tpl_vars['LANG']['supportticketsticketsubmit']; ?>
" class="button1 color2" />
  </p>
</form>