<?php /* Smarty version 2.6.2, created on 2012-10-21 14:49:24
         compiled from vote_add.tpl */ ?>
<?php require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'encurl', 'vote_add.tpl', 60, false),array('modifier', 'escape', 'vote_add.tpl', 69, false),array('modifier', 'default', 'vote_add.tpl', 82, false),)), $this); ?>
<?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 echo '
<script type="text/javascript"><!--
function checkVote()
{
  if (!document.vote.email) return true;

  status = checkEmail(document.vote.email.value);

  if (status > 0) {
    if (status == 1)
	    alert(\'Please, enter your E-Mail address!\');
    if (status == 2)
	    alert(\'Please, enter a valid E-Mail address!\');

    document.vote.email.focus();
    return false;
  }
  return true;
}
--></script>
'; ?>


         
<?php if ($this->_tpl_vars['listing']):  $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "program_details.tpl", 'smarty_include_vars' => array('listing' => $this->_tpl_vars['listing'],'group' => $this->_tpl_vars['group'])));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
  endif; ?>

<h3>Add Vote</h3>
<div class="details">

<?php if ($this->_tpl_vars['frm']['say'] == 'accepted'): ?>
<div class="ok">Thank you for your vote. Vote has been successfully accepted.</div>
<?php elseif ($this->_tpl_vars['frm']['say'] == 'confirm'): ?>
<div class="ok">Thank you for your vote. Please check your e-mail to confirm your vote.</div>
<?php elseif ($this->_tpl_vars['frm']['say'] == 'confirmed'): ?>
<div class="ok">Thank you for your vote. Vote has been successfully confirmed.</div>
<?php elseif ($this->_tpl_vars['frm']['say'] == 'notconfirmed'): ?>
<div class="error">Sorry, it seams you are using broken link or your vote was already confirmed.</div>
<?php else: ?>                            

<?php if ($this->_tpl_vars['errors']): ?>
<ul class="error">
<?php if ($this->_tpl_vars['errors']['turing']): ?><li> Invalid turing image provided.</li><?php endif;  if ($this->_tpl_vars['errors']['vote_delay']): ?><li> You can vote once per <?php echo $this->_tpl_vars['settings']['vote_period']; ?>
 hours only.</li><?php endif;  if ($this->_tpl_vars['errors']['comment']): ?><li> Comment is too small</li><?php endif;  if ($this->_tpl_vars['errors']['email']): ?><li> Please, enter your valid email</li><?php endif; ?>
</ul>
<?php endif; ?>

<form method="post" name="vote" onsubmit="return checkVote()" action="">
<input type="hidden" name="a" value="add_vote">
<input type="hidden" name="action" value="save">
<input type="hidden" name="lid" value="<?php echo $this->_tpl_vars['listing']['id']; ?>
">
<table class="form">
<tr>
  <th>Mood</th>
  <td>
   <input type="radio" name="vote" <?php if ($this->_tpl_vars['frm']['vote'] == 3): ?>checked<?php endif; ?> value=3> <img src="<?php echo ((is_array($_tmp=($this->_tpl_vars['theme'])."images/r3.gif")) ? $this->_run_mod_handler('encurl', true, $_tmp) : smarty_modifier_encurl($_tmp)); ?>
" alt="Very Good" title="Very Good"> Very Good<br>
   <input type="radio" name="vote" <?php if ($this->_tpl_vars['frm']['vote'] == 2): ?>checked<?php endif; ?> value=2> <img src="<?php echo ((is_array($_tmp=($this->_tpl_vars['theme'])."images/r2.gif")) ? $this->_run_mod_handler('encurl', true, $_tmp) : smarty_modifier_encurl($_tmp)); ?>
" alt="Good" title="Good"> Good<br>
   <input type="radio" name="vote" <?php if ($this->_tpl_vars['frm']['vote'] == 1): ?>checked<?php endif; ?> value=1> <img src="<?php echo ((is_array($_tmp=($this->_tpl_vars['theme'])."images/r1.gif")) ? $this->_run_mod_handler('encurl', true, $_tmp) : smarty_modifier_encurl($_tmp)); ?>
" alt="Bad" title="Bad"> Bad<br>
   <input type="radio" name="vote" <?php if ($this->_tpl_vars['frm']['vote'] == 0): ?>checked<?php endif; ?> value=0> <img src="<?php echo ((is_array($_tmp=($this->_tpl_vars['theme'])."images/r0.gif")) ? $this->_run_mod_handler('encurl', true, $_tmp) : smarty_modifier_encurl($_tmp)); ?>
" alt="Very Bad" title="Very Bad"> Very Bad<br>
  </td>
</tr>
<tr>
  <th>Comments</th>
  <td>
   <input type="text" name="comment" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['frm']['comment'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall') : smarty_modifier_escape($_tmp, 'htmlall')); ?>
" maxlength=255><br>
   You can write short comment (max. 255 characters)
  </td>
</tr>
<?php if ($this->_tpl_vars['userinfo']['logged']): ?>
<tr>
  <th>User</th>
  <td><?php echo ((is_array($_tmp=$this->_tpl_vars['userinfo']['username'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
</td>
</tr>
<?php else: ?>
<tr>
  <th>E-Mail</th>
  <td>
   <input type="text" name="email" value="<?php echo ((is_array($_tmp=((is_array($_tmp=@$this->_tpl_vars['frm']['email'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['userinfo']['email']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['userinfo']['email'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall') : smarty_modifier_escape($_tmp, 'htmlall')); ?>
">
   <?php if ($this->_tpl_vars['settings']['vote_confirmation_require']): ?>we will send you your vote confirmation code<?php endif; ?>
  </td>
</tr>
<?php endif;  if ($this->_tpl_vars['settings']['use_turing']): ?>
<tr>
  <th><img src="<?php echo ((is_array($_tmp="?a=turing&".($this->_tpl_vars['sesname'])."=".($this->_tpl_vars['sesid'])."&r=".($this->_tpl_vars['rand']))) ? $this->_run_mod_handler('encurl', true, $_tmp) : smarty_modifier_encurl($_tmp)); ?>
" alt="turing code"></th>
  <td><input type=text name="turing" maxlength=6 size=6></td>
</tr>
<?php endif; ?>
<tr>
  <th></th>
  <td><input type="submit" value="Vote" class=sbmt></td>
</tr>
</table>
</form>

<?php endif; ?> 
</div>

<?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);
 ?>