%%95^956^956F74FD%%catalogs_basket.tpl.php 20.1 KB
<?php /* Smarty version 2.6.16, created on 2012-01-31 04:30:55
         compiled from catalogs_basket.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'stripslashes', 'catalogs_basket.tpl', 63, false),array('modifier', 'escape', 'catalogs_basket.tpl', 63, false),array('modifier', 'default', 'catalogs_basket.tpl', 133, false),)), $this); ?>
<?php echo '
<script>

    function showHide() {
    
        // ===== new-active =====
        document.getElementById(\'client_new\').style.display = (\'\' == document.getElementById(\'client_old\').style.display)? \'\' : \'none\';
        document.getElementById(\'old\').className = (\'active\' == document.getElementById(\'old\').className)? \'unactive\' : \'active\';

        // ===== old -unactive =====

        document.getElementById(\'client_old\').style.display = (\'\' == document.getElementById(\'client_new\').style.display)? \'none\' : \'\';
        document.getElementById(\'new\').className = (\'active\' == document.getElementById(\'new\').className)? \'unactive\' : \'active\';

    } 

    var AlertMessage = window.onload; 
    window.onload = function() {
        showHide();

    };
    
    function SwithForm() {
        showHide();
    }
    
    function unCheckedMailing(){
    
        if(document.getElementById(\'account\').checked==true) {
        
            document.getElementById(\'mailing\').checked=false;
            
        }
    
    }
        
</script>

    <script src="/js/agreement.js" type="text/javascript"></script>
    
'; ?>





<div class="title3 mt">Êîðçèíà</div>
<div class="itemsbox">
<div>&nbsp;</div>
 

 <form method="post" action="<?php echo @URL; ?>
catalogs/?modAction=basket" name='form_order' id="form_order">
    <table cellpadding="4" cellspacing="1" border="0" width="100%" bgcolor="#94E001">
        <tr bgcolor="#94E001" >
            <td><font color="#FFFFFF"><b>Ôîòî</b></font></td>
            <td><font color="#FFFFFF"><b>Òîâàð</b></font></td>
            <td><font color="#FFFFFF" style="width: 85px;"><b>Öåíà çà îäèí</b></font></td>
            <td><font color="#FFFFFF" style="width: 65px;"><b>Êîëè÷åñòâî</b></font></td>
            <td><font color="#FFFFFF" style="width: 85px;"><b>Çà âåñü òîâàð</b></font>
            </td>
        </tr>
<?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['basket_products']) ? 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;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    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']);
?>
        <tr bgcolor="#F2FFDA">
            <td valign='middle' align='center'><a href="<?php echo @URL; ?>
uploaded/pic/catalogs/modifications/big/<?php echo $this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['pic_big']; ?>
" rel="milkbox[gall1]" title="<?php echo $this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['name']; ?>
"><img src="<?php if ($this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['pic']):  echo @URL; ?>
uploaded/pic/catalogs/modifications/<?php echo $this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['pic'];  else:  echo @URL; ?>
img/noproduct.jpg<?php endif; ?>" border="0" alt="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['name'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : smarty_modifier_stripslashes($_tmp)))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
" class="pic" /></a></td>
            <td><input type="hidden" name="product_id[]" value="<?php echo $this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['id']; ?>
"><input type="hidden" name="product_name2[]" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['name'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : smarty_modifier_stripslashes($_tmp)))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
" /><input type="hidden" name="product_size[]" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['size'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : smarty_modifier_stripslashes($_tmp)))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
" /><input type="hidden" name="product_color[]" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['color'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : smarty_modifier_stripslashes($_tmp)))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
" /><input type="hidden" name="product_name[]" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['name'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : smarty_modifier_stripslashes($_tmp)))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
 : <?php if ($this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['size']): ?>ðàçìåð: <?php echo $this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['size']; ?>
, <?php endif;  if ($this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['color']): ?>öâåò: <?php echo $this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['color']; ?>
, <?php endif;  if ($this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['code']): ?>Êîä: <?php echo $this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['code'];  endif; ?>"><input type="hidden" name="product_code[]" value="<?php echo $this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['code']; ?>
" /><b><?php echo ((is_array($_tmp=$this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['name'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : smarty_modifier_stripslashes($_tmp)); ?>
</b><br><?php if ($this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['size']): ?>ðàçìåð: <?php echo $this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['size']; ?>
, <?php endif;  if ($this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['color']): ?>öâåò: <?php echo $this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['color']; ?>
, <?php endif;  if ($this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['code']): ?>Êîä: <?php echo $this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['code'];  endif; ?></td>
            <td  style="width: 85px;"><input type="hidden" name="rubric_id[]" value="<?php echo $this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['rubric_id']; ?>
"><input type="hidden" name="rubric_parent_id[]" value="<?php echo $this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['rubric_parent_id']; ?>
"><input type="hidden" name="product_price[]" value="<?php echo $this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['cine']; ?>
" /><input type="hidden" name="product_cine[]" value="<?php echo $this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['cine']; ?>
 <?php if ($this->_tpl_vars['curs'] == 'uah'): ?>ãðí<?php elseif ($this->_tpl_vars['curs'] == 'uah_bank'): ?>ãðí. áåçíàëè÷íûé<?php else: ?>$<?php endif; ?>"><?php echo $this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['cine']; ?>
 <?php if ($this->_tpl_vars['curs'] == 'uah'): ?>ãðí<?php elseif ($this->_tpl_vars['curs'] == 'uah_bank'): ?>ãðí. áåçíàëè÷íûé<?php else: ?>$<?php endif; ?></td>
            <td style="width: 65px;"><input type="hidden" name="product_count[]" value="<?php echo $this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['products_count']; ?>
"><input class="idle" onblur="this.className='idle'" onfocus="this.className='activeField'" type="text" value="<?php echo $this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['products_count']; ?>
" name="proructs_count[<?php echo $this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['id']; ?>
]" size="2"></td>
            <td style="width: 85px;"><input type="hidden" name="product_cine_all[]" value="<?php echo $this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['products_cine_all']; ?>
 <?php if ($this->_tpl_vars['curs'] == 'uah'): ?>ãðí<?php elseif ($this->_tpl_vars['curs'] == 'uah_bank'): ?>ãðí. áåçíàëè÷íûé<?php else: ?>$<?php endif; ?>"><?php echo $this->_tpl_vars['basket_products'][$this->_sections['i']['index']]['products_cine_all']; ?>
 <?php if ($this->_tpl_vars['curs'] == 'uah'): ?>ãðí<?php elseif ($this->_tpl_vars['curs'] == 'uah_bank'): ?>ãðí. áåçíàëè÷íûé<?php else: ?>$<?php endif; ?></td>
        </tr>
<?php endfor; endif; ?>
        <tr bgcolor="#F2FFDA" style="height: 28px;">
            <td colspan="4"><input type="submit" name="upload_order" value=" Ïåðåñ÷èòàòü " class="submit" /></td>
            <td><b><input type="hidden" name="discount" value="<?php echo $this->_tpl_vars['user']['discount']; ?>
"><input type="hidden" name="cineAll" value="<?php echo $this->_tpl_vars['cineAll']; ?>
"><input type="hidden" name="cineAll_discount" value="<?php echo $this->_tpl_vars['cineAll_discount']; ?>
"><?php echo $this->_tpl_vars['cineAll']; ?>
 ãðí.</b></td>
        </tr>
<?php if ($this->_tpl_vars['user']['id'] > 0): ?>
        <tr bgcolor="#FFF0F0">
            <td colspan="5" class="txtrb cnt">Âàøà ñêèäêà: <?php echo $this->_tpl_vars['user']['discount']; ?>
% Èòîãî ê îïëàòå: <?php echo $this->_tpl_vars['cineAll_discount']; ?>
 ãðí.</td>
        </tr>
<?php endif; ?>
    </table>
</div>
<div>&nbsp;</div>
<div>&nbsp;</div>

<div class="title3">Îôîðìèòü çàêàç</div>
<div class="itemsbox">

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

<?php 
    if (!isset($_POST['order_name']))    { if (isset($_SESSION['user']['name']))    {$_POST['order_name']=$_SESSION['user']['name'];      }}
    if (!isset($_POST['order_email']))   { if (isset($_SESSION['user']['email']))   {$_POST['order_email']=$_SESSION['user']['email'];    }}
    if (!isset($_POST['order_phone']))   { if (isset($_SESSION['user']['tel']))     {$_POST['order_phone']=$_SESSION['user']['tel'];      } else { $_POST['order_phone']='+380';}}
    if (!isset($_POST['order_phone2']))  { if (isset($_SESSION['user']['tel2']))    {$_POST['order_phone2']=$_SESSION['user']['tel2'];      }}
    if (!isset($_POST['order_adress']))  { if (isset($_SESSION['user']['address'])) {$_POST['order_adress']=$_SESSION['user']['address']; }}
    if (!isset($_POST['order_city']))    { if (isset($_SESSION['user']['city']))    {$_POST['order_city']=$_SESSION['user']['city']; }}
    if (!isset($_POST['delivery']))      { $_POST['delivery']=0; }
 
    // Çàêðûâàåì îò ðåäàêòèðîâàíèÿ
//  if (isset($_SESSION['user']['name']))    { $lockname='readonly="readonly"';    } else { $lockname='';}
    if (isset($_SESSION['user']['email']))   { $lockemail='readonly="readonly"';   } else { $lockemail='';}
/*
    if (isset($_SESSION['user']['tel']))     { $locktel='readonly="readonly"';     } else { $locktel='';}
    if (isset($_SESSION['user']['tel2']))    { $locktel2='readonly="readonly"';    } else { $locktel2='';}
    if (isset($_SESSION['user']['address'])) { $lockaddress='readonly="readonly"'; } else { $lockaddress='';}
    if (isset($_SESSION['user']['city']))    { $lockcity='readonly="readonly"';    } else { $lockcity='';}
*/

    $lockname='';
    // $lockemail='';
    $locktel='';
    $locktel2='';
    $lockaddress='';
    $lockcity='';
    
 ?>
<div id="inputArea">
<?php  if(!isset($_SESSION['user']['id'])) {  ?>

    <div class='tabs-client'>
        <div id='new' class='unactive' onclick="SwithForm();">Íîâûé ïîêóïàòåëü</div>
        <div id='old' class='active' onclick="SwithForm();">ß óæå çàðåãèñòðèðîâàí</div>
    </div>
    <div class='clear'></div>
</div>

<?php  }  ?>    

<div id="client_new">

<span class='attention'>Îáÿçàòåëüíûå ïîëÿ âûäåëåííûå çâåçäî÷êîé <span class="red">*</span></span>

<label>Ôàìèëèÿ Èìÿ Î÷åñòâî ïîëó÷àòåëÿ: <span class="red">*</span></label>
<input type="text" name="order_name" class="idle" onblur="this.className='idle'" onfocus="this.className='activeField'" size="60" value="<?php echo ((is_array($_tmp=((is_array($_tmp=@$_POST['order_name'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['user']['name']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['user']['name'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
" <?php echo $lockname; ?>/>

<?php  if(!isset($_SESSION['user']['id'])) {  ?>
<label>Âàø e-mail:</label>
<input type="text" name="order_email" class="idle" onblur="this.className='idle'" onfocus="this.className='activeField'" size="60" value="<?php echo ((is_array($_tmp=((is_array($_tmp=@$_POST['order_email'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['user']['email']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['user']['email'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
" <?php echo $lockemail; ?> />
<span class='advice'>
    Ââåäÿ àäðåñ ýëåêòðîííîé ïî÷òû äëÿ Âàñ áóäåò ñîçäàí ëè÷íûé êàáèíåò<br>
    Ðåãèñòðèðóÿñü, âû ñîãëàøàåòåñü ñ <a href='#' onclick='agreement();return false;'>ïîëüçîâàòåëüñêèì ñîãëàøåíèåì.</a><br>
<?php  } else {  ?>
<span id="order_email">
<label>Âàø e-mail:</label>
<input type="text" name="order_email" value="<?php echo ((is_array($_tmp=((is_array($_tmp=@$_POST['order_email'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['user']['email']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['user']['email'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
"/>
</span>
<?php  }  ?>

<?php  if(!isset($_SESSION['user']['id'])) {  ?>

<div class="optional mailing"> 
  <input type="checkbox" name="form[mailing]" id="mailing" value="1" checked> ïîëó÷àòü íîâîñòè î ñêèäêàõ è àêöèÿõ
</div> 


<div class="optional mailing"> 
  <input type="checkbox" name="form[no_account]" id="account" value="1" onChange='unCheckedMailing();'>ÿ íå æåëàþ ñîçäàâàòü ëè÷íûé êàáèíåò
</div>

<?php  }  ?>
</span>

<div class='clear'></div>
<span class='advice'></span>
<label>Âàø ìîáèëüíûé òåëåôîí <span class="red">*</span></label>
<input type="text" name="order_phone" class="idle" onblur="this.className='idle'" onfocus="this.className='activeField'" size="60" value="<?php echo ((is_array($_tmp=((is_array($_tmp=@$_POST['order_phone'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['user']['phone']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['user']['phone'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
" <?php echo $locktel; ?> />
<span class='advice'>íàïðèìåð: +380XXXXXXXXX</span>

<label>Äîïîëíèòåëüíûé òåëåôîí:</label>
<input type="text" name="order_phone2" class="idle" onblur="this.className='idle'" onfocus="this.className='activeField'" size="60" value="<?php echo ((is_array($_tmp=((is_array($_tmp=@$_POST['order_phone2'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['user']['order_phone2']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['user']['order_phone2'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
" <?php echo $locktel2; ?> />

<label>Ãîðîä: <span class="red">*</span></label>
<input type="text" name="order_city" class="idle" onblur="this.className='idle'" onfocus="this.className='activeField'" size="60" value="<?php echo ((is_array($_tmp=((is_array($_tmp=@$_POST['order_city'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['user']['city']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['user']['city'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
" <?php echo $lockcity; ?> />

<label>Âàø àäðåñ: <span class="red">*</span></label>
<input type="text" name="order_adress" class="idle" onblur="this.className='idle'" onfocus="this.className='activeField'" size="60" value="<?php echo ((is_array($_tmp=((is_array($_tmp=@$_POST['order_adress'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['user']['adress']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['user']['adress'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
" <?php echo $lockaddress; ?> />

<div class="delivery">
    <label>Âàðèàíò äîñòàâêè: <span class="red">*</span></label>
    <?php 

        $sql="SELECT * FROM zlo_book_delivery";
        $result = mysql_query($sql) or die(mysql_error());
        if (mysql_affected_rows()!=0) {    
        echo"<select name='delivery'>";
             echo "<option value='0'>[âûáîð]</option>"; 
            while ($row = mysql_fetch_assoc($result)) {
                if($row['id']==$_POST['delivery']) { $selected="selected='selected'";} else { $selected='';}
                echo "<option value=\"".$row['id']."\"$selected>".$row['title']."</option>"; 
            }
        echo"</select>";
        }
     ?>
</div>

<label>Òåêñò êîììåíòàðèÿ:</label>
<textarea rows="4" cols="30" name="order_comment" class="idle" onblur = "this.className='idle'" onfocus = "this.className='activeField'"><?php echo ((is_array($_tmp=((is_array($_tmp=@$_POST['order_comment'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['user']['about']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['user']['about'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
</textarea>
Äîïîëíèòåëüíàÿ èíôîðìàöèÿ: ðàéîí, ëèôò, ýòàæ, äîìîôîí...
    
<p class="cnt"><br><input type="hidden" name="send_order"><input type="submit" value="Îôîðìèòü çàêàç" class="submit" onClick="formSubmit('form_order');" /></p>


 </form>

</div>
 
<?php  if(!isset($_SESSION['user']['id'])) {  ?>

<div id="client_old">
    <div class="signup">
		<div class="col-1" ></div>
		<div class="col-2"> 
		  <form name="form1" method="POST" id='form_signup_2' action="">
		   
			<label>Email:</label> 
			<input type="text" name="form[login]">

			<label>Ïàðîëü:</label> 
			<input type="password" name="form[pass]">
			
			<div class="buttons">
				<input type="hidden" name="signup" value="ok">
				<div id="ok" onClick="formSubmit('form_signup_2');"></div>
				<div id="cancel"></div>
			</div>
			
			</form>
		</div>
		<div class="col-3">
			<span class="remind"><a href="/account/remind/">Âîññòàíîâèòü ïàðîëü</a></span>
			<span class="noaccount">Íåò ó÷åòíîé çàïèñè?</span>
			<span class="registration"><a href="/account/registration/">Çàðåãèñòðèðîâàòüñÿ?</a></span>
		</div>
    </div>
</div>

<?php  }  ?>
</div>