Advertisement
Guest User

Shopping Cart functionality - MVC - View file

a guest
Aug 17th, 2018
541
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 29.44 KB | None | 0 0
  1. <div class="main_contentarea">
  2.       <aside> <?php echo $leftmenu; ?> </aside>
  3.       <aside class="center_right">
  4.         <table cellpadding="2" cellspacing="2" border="0" width="100%">
  5.           <tr>
  6.             <td>
  7.               <div class="breadcrums">
  8.                 <ul>
  9.                   <li><a href="<?php echo base_url();?>" title="Home">Home</a></li>
  10.                   <li>&raquo;</li>
  11.                   <li><a href="<?php echo base_url();?>giftcenter" title="Gift-Center">Gift-Center</a></li>
  12.                   <?php if( $this->cart->contents() && $this->uri->segment(1) =='giftcenter' && $this->uri->segment(2) == 'cart' ) { ?>
  13.                   <li>&raquo;</li>
  14.                   <li><a href="<?php echo base_url();?>giftcenter/cart" title="Gift Shopping Cart">Gift Shopping Cart</a></li>
  15.                   <?php } ?>
  16.                   <?php if( $this->cart->contents() && $this->uri->segment(1) =='giftcenter' && $this->uri->segment(2) == 'checkout' ) { ?>
  17.                   <li>&raquo;</li>
  18.                   <li><a href="<?php echo base_url();?>giftcenter/checkout" title="Checkout">Checkout</a></li>
  19.                   <?php } ?>
  20.                 </ul>
  21.               </div>
  22.             </td>
  23.             <?php if( $this->cart->contents() && $this->uri->segment(1) =='giftcenter' && $this->uri->segment(2) == '' ) { ?>
  24.             <td align="right"><a href="<?php echo base_url();?>giftcenter/cart" title="Gift Shopping Cart">Gift Shopping Cart</a></td>
  25.             <?php } ?>
  26.           </tr>
  27.         </table>
  28.         <?php if( $this->uri->segment(1) =='giftcenter' && $this->uri->segment(2) == 'cart' ) { ?>
  29.             <?php if( $this->session->flashdata('success') ) { ?>
  30.             <!--  start message-green -->
  31.             <div id="message-green" class="module_content">
  32.               <table border="0" width="100%" cellpadding="0" cellspacing="0">
  33.                 <tr>
  34.                   <td class="green-left"><?php echo $this->session->flashdata('success'); ?></td>
  35.                   <td class="green-right"><a class="close-green"><img src="<?php echo base_url();?>images/table/icon_close_green.gif" alt="" /></a></td>
  36.                 </tr>
  37.               </table>
  38.             </div>
  39.             <!--  end message-green -->
  40.             <?php } ?>
  41.             <?php if( $this->session->flashdata('error') ) { ?>
  42.             <!--  start message-red -->
  43.             <div id="message-red">
  44.               <table border="0" width="100%" cellpadding="0" cellspacing="0">
  45.                 <tr>
  46.                   <td class="red-left"><?php echo $this->session->flashdata('error'); ?></td>
  47.                   <td class="red-right"><a class="close-red"><img src="<?php echo base_url();?>images/table/icon_close_red.gif" alt="" /></a></td>
  48.                 </tr>
  49.               </table>
  50.             </div>
  51.             <!--  end message-red -->
  52.             <?php } ?>
  53.             <div class="clstitle">Gift Shopping Cart</div>
  54.             <div class="clsbox">
  55.                 <?php if ( count($cart) > 0 ) { ?>
  56.                 <?php echo form_open('giftcenter/update_cart'); ?>
  57.                 <div class="cart-info">
  58.                 <table>
  59.                 <thead>
  60.                 <tr>
  61.                     <td class="name heading">Name</td>
  62.                     <td class="price heading">Price</td>
  63.                     <td class="quantity heading">Quantity</td>
  64.                     <td class="total heading">Total</td>
  65.                 </tr>
  66.                 </thead>
  67.                 <tbody>
  68.                 <?php
  69.                 $grand_total = 0; $i = 1;
  70.                
  71.                 foreach ($cart as $item)
  72.                 {
  73.                     $grand_total = $grand_total + $item['subtotal'];
  74.                    
  75.                     echo form_hidden('cart['. $item['id'] .'][id]', $item['id']);
  76.                     echo form_hidden('cart['. $item['id'] .'][rowid]', $item['rowid']);
  77.                     echo form_hidden('cart['. $item['id'] .'][name]', $item['name']);
  78.                     echo form_hidden('cart['. $item['id'] .'][price]', $item['price']);
  79.                     echo form_hidden('cart['. $item['id'] .'][qty]', $item['qty']);
  80.                 ?>
  81.                 <tr>
  82.                     <td class="name"><?php echo $item['name']; ?></td>
  83.                     <td class="price">$ <?php echo number_format($item['price'],2); ?></td>
  84.                     <td class="quantity"><?php echo form_input('cart['. $item['id'] .'][qty]', $item['qty'], 'maxlength="3" size="1" style="text-align: right"'); ?> &nbsp; <input type="image" src="<?php echo base_url(); ?>images/update.png" alt="Update" title="Update" /> &nbsp; <a href="<?php echo 'giftcenter/remove/'.$item['rowid']; ?>" onClick="return confirm('Are you sure want to remove this item from shopping cart?');" title="Remove"><img src="<?php echo base_url(); ?>images/remove.png" alt="Remove" title="Remove" /></a></td>
  85.                     <td class="total">$ <?php echo number_format($item['subtotal'],2) ?></td>
  86.                 </tr>
  87.                 <?php } ?>
  88.                 </tbody>
  89.                 </table>
  90.                 </div>
  91.                 <?php echo form_close(); ?>
  92.                 <div class="cart-total">
  93.                 <table id="total">
  94.                 <tr>
  95.                     <td colspan="4" class="right"><b>Sub-Total :</b> $ <?php echo number_format($grand_total,2); ?></td>
  96.                 </tr>
  97.                 <tr>
  98.                     <td colspan="4" class="right"><b>Total :</b> $ <?php echo number_format($grand_total,2); ?></td>
  99.                 </tr>
  100.                 <tr><td>&nbsp;</td></tr>
  101.                 <tr><td align="right"><a href="<?php echo site_url('giftcenter/checkout'); ?>" title="Checkout"><input type="button" class='btn_review' value='Checkout'/></a></td></tr>
  102.                 <tr><td align="right"><input type="button" class='btn_review' value="Clear Cart" onclick="clear_cart()"></td></tr>
  103.                 </table>
  104.                 </div>
  105.                 <?php }
  106.                 else { ?>
  107.                 <!--  start message-red -->
  108.                 <div id="message-red">
  109.                   <table border="0" width="100%" cellpadding="0" cellspacing="0">
  110.                     <tr>
  111.                       <td class="red-left">Your shopping cart is empty!</td>
  112.                       <td class="red-right"><img src="<?php echo base_url();?>images/icon_close_red.png" alt="" /></td>
  113.                     </tr>
  114.                   </table>
  115.                 </div>
  116.                 <!--  end message-red -->
  117.                 <?php } ?>
  118.             </div>
  119.         <?php }
  120.         else if( $this->uri->segment(1) =='giftcenter' && $this->uri->segment(2) == 'checkout' ) { ?>
  121.         <?php if( $this->session->flashdata('success') ) { ?>
  122.         <!--  start message-green -->
  123.         <div id="message-green" class="module_content">
  124.           <table border="0" width="100%" cellpadding="0" cellspacing="0">
  125.             <tr>
  126.               <td class="green-left"><?php echo $this->session->flashdata('success'); ?></td>
  127.               <td class="green-right"><a class="close-green"><img src="<?php echo base_url();?>images/table/icon_close_green.gif" alt="" /></a></td>
  128.             </tr>
  129.           </table>
  130.         </div>
  131.         <!--  end message-green -->
  132.         <?php } ?>
  133.         <?php if( $this->session->flashdata('error') ) { ?>
  134.         <!--  start message-red -->
  135.         <div id="message-red">
  136.           <table border="0" width="100%" cellpadding="0" cellspacing="0">
  137.             <tr>
  138.               <td class="red-left"><?php echo $this->session->flashdata('error'); ?></td>
  139.               <td class="red-right"><a class="close-red"><img src="<?php echo base_url();?>images/table/icon_close_red.gif" alt="" /></a></td>
  140.             </tr>
  141.           </table>
  142.         </div>
  143.         <!--  end message-red -->
  144.         <?php } ?>
  145.         <div class="clstitle">Checkout</div>
  146.         <div class="checkout-heading" id="chkaccount">STEP 1: Checkout Options <div class="modify">Modify &raquo;</div></div>
  147.         <div class="checkout-content">
  148.         <div id="checkout">
  149.             <?php if( !array_key_exists('tix_user',$this->session->userdata) ) { ?>
  150.             <div class="CheckoutForm_left">
  151.                 <h2>New Customer</h2>
  152.                 <span>Checkout Options:</span><br /><br />
  153.                 <label for="register"><input type="radio" id="register" value="register" name="chkradio"/><b>Register Account</b></label>
  154.                 <br /><br />
  155.                 <label for="guest"><input type="radio" checked="checked" id="guest" value="guest" name="chkradio" /><b>Guest Checkout</b></label>
  156.                 <br /><br />
  157.                 <input type="button" class="btn_review" id="btnaccount" name="btnaccount" value="Submit" />
  158.                 <br /><br />
  159.             </div>
  160.             <div class="CheckoutForm_right" id="login">
  161.                 <h2>Returning Customer</h2>
  162.                 <span>I am a returning customer</span>
  163.                 <form action="" name="frmlogin" id="frmlogin" method="post">
  164.                 <dl>
  165.                 <dt><b><label for="login_emailid">Email:</label></b></dt>
  166.                 <dd><input type="text" id="login_emailid" name="login_emailid" class="frmtextfield" value="" placeholder="Email" /></dd>
  167.                 </dl>
  168.                 <dl>
  169.                 <dt><b><label for="login_password">Password:</label></b></dt>
  170.                 <dd><input type="password" id="login_password" name="login_password" class="frmtextfield" value="" placeholder="Password" /></dd>
  171.                 </dl>
  172.                 <input type="hidden" name="formact" value="login">
  173.                 <input name="buttonlogin" id="buttonlogin" type="submit" class="btn_review" value="Login"/>
  174.                 </form>
  175.             </div>
  176.             <?php } ?>
  177.         </div>
  178.         </div>
  179.         <?php echo form_open('giftcenter/update_checkout',array('name'=>'frmcheckout','id'=>'frmcheckout')); ?>
  180.         <input type="hidden" name="txtuser" id="txtuser" value="guest" />
  181.         <div class="checkout-heading" id="chkbill">STEP 2 : Billing Details <div class="modify">Modify &raquo;</div></div>
  182.         <div class="checkout-content">
  183.         <div id="billing">
  184.             <?php
  185.             if( array_key_exists('tix_user',$this->session->userdata) )
  186.             {
  187.                 if( $this->session->userdata['tix_user'] )
  188.                 {
  189.                     $username = $this->session->userdata['tix_user']['username'];
  190.                     $useremail = $this->session->userdata['tix_user']['useremail'];
  191.                 }
  192.                 else
  193.                 {
  194.                     $username = ''; $useremail = '';
  195.                 }
  196.             }
  197.             else
  198.             {
  199.                 $username = ''; $useremail = '';
  200.             }
  201.             ?>
  202.             <div class="CheckoutForm_left">
  203.                 <h2>Your Personal Details</h2>
  204.                 <dl>
  205.                 <dt><label for="txtbillname">Name:</label></dt>
  206.                 <dd><input name="txtbillname" id="txtbillname" type="text" class="frmtextfield" value="<?php echo isset($username) ? $username : '' ?>" placeholder="Name" /></dd>
  207.                 </dl>
  208.                 <dl>
  209.                 <dt><label for="txtbillemail">Email:</label></dt>
  210.                 <dd><input name="txtbillemail" id="txtbillemail" type="text" class="frmtextfield" value="<?php echo isset($useremail) ? $useremail : '' ?>" placeholder="Email" /></dd>
  211.                 </dl>
  212.                 <dl>
  213.                 <dt><label for="txtbillphone">Phone:</label></dt>
  214.                 <dd><input name="txtbillphone" id="txtbillphone" type="text" class="frmtextfield" value="" placeholder="Phone" /></dd>
  215.                 </dl>
  216.                 <dl>
  217.                 <dt>&nbsp;</dt>
  218.                 <dd>&nbsp;</dd>
  219.                 </dl>
  220.                 <br />
  221.                 <?php if( !array_key_exists('tix_user',$this->session->userdata) ) { ?>
  222.                 <div class="register">
  223.                 <h2>Your Username & Password</h2>
  224.                 <dl>
  225.                 <dt><label for="txtusername">Username:</label></dt>
  226.                 <dd><input name="txtusername" id="txtusername" type="text" class="frmtextfield" value="" placeholder="Username" /></dd>
  227.                 </dl>
  228.                 <dl>
  229.                 <dt><label for="txtpassword">Password:</label></dt>
  230.                 <dd><input name="txtpassword" id="txtpassword" type="password" class="frmtextfield" value="" placeholder="Password" /></dd>
  231.                 </dl>
  232.                 </div>
  233.                 <?php } ?>
  234.             </div>
  235.             <div class="CheckoutForm_right">
  236.                 <h2>Your Address</h2>
  237.                 <dl>
  238.                 <dt><label for="txtbilladdress">Address:</label></dt>
  239.                 <dd><textarea name="txtbilladdress" id="txtbilladdress" class="frmtextarea" cols="30" rows="5" placeholder="Address"></textarea></dd>
  240.                 </dl>
  241.                 <dl>
  242.                 <dt><label for="txtbillcity">City:</label></dt>
  243.                 <dd><input name="txtbillcity" id="txtbillcity" type="text" class="frmtextfield" value="" placeholder="City" /></dd>
  244.                 </dl>
  245.                 <dl>
  246.                 <dt><label for="txtbillstate">State:</label></dt>
  247.                 <dd><input name="txtbillstate" id="txtbillstate" type="text" class="frmtextfield" value="" placeholder="State" /></dd>
  248.                 </dl>
  249.                 <dl>
  250.                 <dt><label for="txtbillcountry">Country:</label></dt>
  251.                 <dd><input name="txtbillcountry" id="txtbillcountry" type="text" class="frmtextfield" value="" placeholder="Country" /></dd>
  252.                 </dl>
  253.                 <dl>
  254.                 <dt><label for="txtbillzip">Zip:</label></dt>
  255.                 <dd><input name="txtbillzip" id="txtbillzip" type="text" class="frmtextfield" value="" placeholder="Zip" /></dd>
  256.                 </dl>
  257.             </div>
  258.             <div class="BuyButton">
  259.             <input name="btnbillsubmit" id="btnbillsubmit" type="submit" class="btn_review" value="Submit"/>
  260.             </div>
  261.         </div>
  262.         </div>
  263.         <div class="checkout-heading" id="chkshipping">STEP 3 : Delivery Details <div class="modify">Modify &raquo;</div></div>
  264.         <div class="checkout-content">
  265.         <div id="shipping">
  266.             <div class="CheckoutForm"><input type="checkbox" name="chksame" id="chksame" value="1" /><label for="chksame">My Delivery Details are Same as Billing Details.</label></div>
  267.             <div class="CheckoutForm_left">
  268.                 <h2>Your Personal Details</h2>
  269.                 <dl>
  270.                 <dt><label for="txtshipname">Name:</label></dt>
  271.                 <dd><input name="txtshipname" id="txtshipname" type="text" class="frmtextfield" value="" placeholder="Name" /></dd>
  272.                 </dl>
  273.                 <dl>
  274.                 <dt><label for="txtshipemail">Email:</label></dt>
  275.                 <dd><input name="txtshipemail" id="txtshipemail" type="text" class="frmtextfield" value="" placeholder="Email" /></dd>
  276.                 </dl>
  277.                 <dl>
  278.                 <dt><label for="txtshipphone">Phone:</label></dt>
  279.                 <dd><input name="txtshipphone" id="txtshipphone" type="text" class="frmtextfield" value="" placeholder="Phone" /></dd>
  280.                 </dl>
  281.                 <dl>
  282.                 <dt>&nbsp;</dt>
  283.                 <dd>&nbsp;</dd>
  284.                 </dl>
  285.             </div>
  286.             <div class="CheckoutForm_right">
  287.                 <h2>Your Address</h2>
  288.                 <dl>
  289.                 <dt><label for="txtshipaddress">Address:</label></dt>
  290.                 <dd><textarea name="txtshipaddress" id="txtshipaddress" class="frmtextarea" cols="30" rows="5" placeholder="Address"></textarea></dd>
  291.                 </dl>
  292.                 <dl>
  293.                 <dt><label for="txtshipcity">City:</label></dt>
  294.                 <dd><input name="txtshipcity" id="txtshipcity" type="text" class="frmtextfield" value="" placeholder="City" /></dd>
  295.                 </dl>
  296.                 <dl>
  297.                 <dt><label for="txtshipstate">State:</label></dt>
  298.                 <dd><input name="txtshipstate" id="txtshipstate" type="text" class="frmtextfield" value="" placeholder="State" /></dd>
  299.                 </dl>
  300.                 <dl>
  301.                 <dt><label for="selshipcountry">Country:</label></dt>
  302.                 <dd><input name="selshipcountry" id="selshipcountry" type="text" class="frmtextfield" value="" placeholder="Country" /></dd>
  303.                 </dl>
  304.                 <dl>
  305.                 <dt><label for="txtshipzip">Zip:</label></dt>
  306.                 <dd><input name="txtshipzip" id="txtshipzip" type="text" class="frmtextfield" value="" placeholder="Zip" /></dd>
  307.                 </dl>
  308.                 <?php /*?><dl>
  309.                 <dt><label for="selshipcountry">Country:</label></dt>
  310.                 <dd>
  311.                 <select name="selshipcountry" id="selshipcountry" onChange="get_shipping(this.value);">
  312.                 <?php foreach($countries as $country):?>
  313.                 <option value="<?=$country['country_id']?>" <?php if( array_key_exists('MEMBER',$_SESSION) && isset($_SESSION['MEMBER']['country']) ) { if($country['country_id'] == $_SESSION['MEMBER']['country']) {echo "selected"; }} else { if( $country['country_id'] == 1 ) {?>selected="selected"<?php } } ?>><?=$country['country_name']?></option>
  314.                 <?php endforeach; ?>
  315.                 </select>
  316.                 </dd>
  317.                 </dl>
  318.                 <dl>
  319.                 <dt><label for="txtshipzip">Zip:</label></dt>
  320.                 <dd><input name="txtshipzip" id="txtshipzip" type="text" value=""/></dd>
  321.                 </dl>
  322.                 <dl>
  323.                 <dt><label for="selshipping">Shipping Method:</label></dt>
  324.                 <dd>
  325.                 <select name="selshipping" id="selshipping">
  326.                 <?php if( count($shipping) > 0 ) {?>
  327.                 <?php for($i=0;$i<count($shipping);$i++) { ?>
  328.                 <option value="<?php echo $shipping[$i]['code']; ?>"><?php echo $shipping[$i]['name']; ?><?php echo ( $shipping[$i]['price'] > 0 ) ? " + $".$shipping[$i]['price'] : ''; ?></option>
  329.                 <?php } ?>  
  330.                 <?php } ?>
  331.                 </select>
  332.                 <br /><br /><br />
  333.                 <b>Shiping price displayed with name of method is added in Total amount. </b>
  334.                 </dd>
  335.                 </dl><?php */?>
  336.             </div>
  337.             <div class="BuyButton">
  338.             <input name="btnshipsubmit" id="btnshipsubmit" type="submit" class="btn_review" value="Submit"/>
  339.             </div>
  340.         </div>
  341.         </div>
  342.         <div class="checkout-heading" id="chkdelivery">Step 4: Delivery Method <div class="modify">Modify &raquo;</div></div>
  343.         <div class="checkout-content">
  344.         <div id="delivery"></div>
  345.             <input type="hidden" name="deliverymethodname" id="deliverymethodname" value="" />
  346.             <div class='BuyButton' id='deliverysubmitdiv' style="display:none;">
  347.             <input name='btndeliverysubmit' id='btndeliverysubmit' type='submit' class='btn_review' value='Submit'/>
  348.             </div>
  349.         </div>
  350.         <div class="checkout-heading" id="chkpayment">Step 5: Payment Method <div class="modify">Modify &raquo;</div></div>
  351.         <div class="checkout-content">
  352.         <div id="payment">
  353.             <div class='CheckoutForm'>
  354.                 <p>Please select the preferred payment method to use on this order.</p>
  355.                 <table border='0' width='100%'>
  356.                 <tr>
  357.                 <td width='10%'>
  358.                 <input type='radio' name='paymentmethod' id='paypal' value='paypal' data-method='paypal' checked="checked" class='radioClass' />
  359.                 </td>
  360.                 <td width='90%'><label for='paypal'>Paypal</label></td>
  361.                 </tr>
  362.                 <tr>
  363.                 <td width='10%'>
  364.                 <input type='radio' name='paymentmethod' id='credit' value='credit' data-method='credit' class='radioClass' />
  365.                 </td>
  366.                 <td width='90%'><label for='credit'>Credit Card</label></td>
  367.                 </tr>
  368.                 </table>
  369.                 </div>
  370.             </div>
  371.             <div class='BuyButton' id='paymentsubmitdiv' style="display:none;">
  372.             <input name='btnpaymentsubmit' id='btnpaymentsubmit' type='submit' class='btn_review' value='Submit'/>
  373.             </div>
  374.         </div>
  375.         <div class="checkout-heading" id="chkconfirm">STEP 6 : Confirm Order</div>
  376.         <div class="checkout-content">
  377.         <div id="confirm">
  378.             <div id="cart_data"></div>
  379.             <div class="CheckoutForm" id="creditcardform" style="display:none;">
  380.                 <h2>Credit Card Details</h2>
  381.                 <dl>
  382.                 <dt><label for="selcardtype">Card Type:</label></dt>
  383.                 <dd><?php echo form_dropdown('selcardtype',$selcardtype,'','id="selcardtype" class="frmtextfield"' ); ?></dd>
  384.                 </dl>
  385.                 <dl>
  386.                 <dt><label for="cardnumber">Card Number:</label></dt>
  387.                 <dd><?php echo form_input( array( 'name'=>'cardnumber','id'=>'cardnumber','class'=>'frmtextfield','type'=>'text','placeholder'=>'Card Number' ) ); ?></dd>
  388.                 </dl>
  389.                 <dl>
  390.                 <dt><label for="cvcnumber">Card Verification Number:</label></dt>
  391.                 <dd><?php echo form_input( array( 'name'=>'cvcnumber','id'=>'cvcnumber','class'=>'frmtextfield','type'=>'text','placeholder'=>'Card Verification Number' ) ); ?></dd>
  392.                 </dl>
  393.                 <dl>
  394.                 <dt><label for="selexpmonth">Expiration Month:</label></dt>
  395.                 <dd><?php echo form_dropdown('selexpmonth',$selexpmonth,'','id="selexpmonth" class="frmtextfield"' ) ; ?></dd>
  396.                 </dl>
  397.                 <dl>
  398.                 <dt><label for="selexpyear">Expiration Year:</label></dt>
  399.                 <dd><?php echo form_dropdown('selexpyear',$selexpyear,'','id="selexpyear" class="frmtextfield"' ) ; ?></dd>
  400.                 </dl>
  401.                 <dl>
  402.                 <dt>&nbsp;</dt>
  403.                 <dd>&nbsp;</dd>
  404.                 </dl>
  405.             </div>
  406.             <div class="CheckoutForm">
  407.                 <dl>
  408.                 <dt><label for="recaptcha_response_field">Security Code:</label></dt>
  409.                 <dd><?php echo $recaptcha_html; ?><div id="error_captcha" style="display:none;color:#F00;float:left;margin-left:120px;"></div></dd>
  410.                 </dl>
  411.             </div>
  412.             <div class='BuyButton'>
  413.             <input name='btnconfirmsubmit' id='btnconfirmsubmit' type='submit' class='btn_review' value='Confirm Payment'/>
  414.             </div>
  415.         </div>
  416.         </div>
  417.         <?php echo form_close(); ?>
  418.         <div id="paypalform"></div>
  419.         <?php }
  420.         else { ?>
  421.             <?php if( $this->session->flashdata('error') ) { ?>
  422.             <!--  start message-red -->
  423.             <div id="message-red">
  424.               <table border="0" width="100%" cellpadding="0" cellspacing="0">
  425.                 <tr>
  426.                   <td class="red-left"><?php echo $this->session->flashdata('error'); ?></td>
  427.                   <td class="red-right"><a class="close-red"><img src="<?php echo base_url();?>images/table/icon_close_red.gif" alt="" /></a></td>
  428.                 </tr>
  429.               </table>
  430.             </div>
  431.             <!--  end message-red -->
  432.             <?php } ?>
  433.             <div id="message"></div>
  434.             <div class="clstitle"><?php echo $varheading; ?></div>
  435.             <?php if( !empty($content) && $content != '' ) { ?>
  436.             <div class="pagecontent">
  437.                     <?php echo $content; ?>
  438.             </div>
  439.             <?php } ?>
  440.             <div class="clsbox">
  441.                 <?php echo form_open('giftcenter/addcart/',array('id'=>'frmgift','name'=>'frmgift','style'=>'display:none;')); ?>
  442.                 <div class="clsbox">
  443.                 <table border="0" cellpadding="5" cellspacing="0" width="100%" class="tbl_contactus">
  444.                   <tbody>
  445.                     <tr>
  446.                       <th align="left" colspan="3"><label for="txtname">Enter a gift amount</label></th>
  447.                     </tr>
  448.                     <tr>
  449.                       <td width="25%">Card value :</td>
  450.                       <td><span style="float:left;vertical-align:middle;">$</span> &nbsp; <?php echo form_input(array('name'=>'amount','id'=>'amount','type'=>'text','value'=>'','style'=>'float:left;width:50px;margin:0 5px;'));?> &nbsp; <?php echo form_dropdown('selamount',$amounts,'',"id='selamount' name='selamount' "); ?></td>
  451.                       <td width="10%">
  452.                       <div id="error_amount" style="display:none;color:#F00;float:left;">
  453.                         <div class="error-left"></div>
  454.                         <div class="error-inner" id="erroramount"><img src="<?php echo base_url();?>/images/error_icon.png" alt="no img" /></div>
  455.                       </div>
  456.                       </td>
  457.                     </tr>
  458.                     <?php /*?><tr>
  459.                       <th align="left" colspan="3"><label for="txtmessage">Compose your gift message</label></th>
  460.                     </tr>
  461.                     <tr>
  462.                       <td></td>
  463.                       <td><textarea name="txtmessage" id="txtmessage" cols="30" rows="15"></textarea></td>
  464.                       <td>
  465.                       <div id="error_txtmessage" style="display:none;color:#F00;float:left;">
  466.                         <div class="error-left"></div>
  467.                         <div class="error-inner" id="errortxtmessage"><img src="<?php echo base_url();?>/images/error_icon.png" alt="no img" /></div>
  468.                       </div>
  469.                       </td>
  470.                     </tr><?php */?>
  471.                     <tr>
  472.                       <td>&nbsp;</td>
  473.                       <td colspan="2" align="left"><?php echo form_input(array('name'=>'btnsubmit','id'=>'btnsubmit','class'=>'btn_review','type'=>'submit','value'=>'Submit','onclick'=>'return chkgiftdata();'));?></td>
  474.                     </tr>
  475.                   </tbody>
  476.                 </table>
  477.                 </div>
  478.                 <?php echo form_input( array( 'name'=>'giftid','id'=>'giftid','value'=>'','type'=>'hidden' ) ); ?>
  479.                 <?php echo form_input( array( 'name'=>'gifttype','id'=>'gifttype','value'=>'','type'=>'hidden' ) ); ?>
  480.                 <?php echo form_close();?>
  481.                 <div id="loading1"></div>
  482.                 <div id="divgifts">
  483.                     <?php if( count($giftcenters) > 0 ) { ?>
  484.                     <?php for($i=0;$i<count($giftcenters);$i++) { ?>
  485.                     <div class="heading"><?php echo stripslashes($giftcenters[$i]['title']); ?></div>
  486.                     <div class="commentslist">
  487.                         <div class="comment"><?php echo stripslashes($giftcenters[$i]['description']); ?></div>
  488.                     </div>
  489.                     <div class="gifttypes">
  490.                         <div class="giftdata">
  491.                             <div class="title">Mail a Gift Card</div>
  492.                             <div class="description">They ship to overnight to the recipient's door.</div>
  493.                             <div class="shopred">Shop Gift Cards</div>
  494.                             <?php if($giftcenters[$i]['giftcard']!='') { ?>
  495.                             <div class="giftimage"><a href="#" class="buymail" data-id="<?php echo $giftcenters[$i]['id']; ?>" data-type="mail" title="Shop Gift Cards"><img src="<?php echo base_url(); ?>uploads/giftcenter/giftcard/<?php echo stripslashes($giftcenters[$i]['giftcard']);?>" title="Shop Gift Cards" alt="Shop Gift Cards" /></a></div>
  496.                             <?php } ?>
  497.                         </div>
  498.                         <div class="giftdata">
  499.                             <div class="title">Email an eGift Card</div>
  500.                             <div class="description">It's easy and arrives quickly via email.</div>
  501.                             <div class="shopred">Shop eGift Cards</div>
  502.                             <?php if($giftcenters[$i]['egiftcard']!='') { ?>
  503.                             <div class="giftimage"><img src="<?php echo base_url(); ?>uploads/giftcenter/egiftcard/<?php echo stripslashes($giftcenters[$i]['egiftcard']);?>" title="Shop eGift Cards" alt="Shop eGift Cards" /></div>
  504.                             <?php } ?>
  505.                         </div>
  506.                         <div class="giftdata">
  507.                             <div class="title">Print a Ticket Announcement</div>
  508.                             <div class="description">Announce your gift before the tickets arrive.</div>
  509.                             <div class="shopred">Create Yours</div>
  510.                             <?php if($giftcenters[$i]['giftticket']!='') { ?>
  511.                             <div class="giftimage"><img src="<?php echo base_url(); ?>uploads/giftcenter/giftticket/<?php echo stripslashes($giftcenters[$i]['giftticket']);?>" title="Create Yours" alt="Create Yours" /></div>
  512.                             <?php } ?>
  513.                         </div>
  514.                     </div>
  515.                     <?php } ?>
  516.                     <div class="pagination pagination-centered"><?php echo $this->jquery_pagination->create_links(); ?></div>
  517.                     <?php }
  518.                     else { ?>
  519.                     <!--  start message-red -->
  520.                     <div id="message-red">
  521.                       <table border="0" width="100%" cellpadding="0" cellspacing="0">
  522.                         <tr>
  523.                           <td class="red-left">No Records Found.</td>
  524.                           <td class="red-right"><img src="<?php echo base_url();?>images/icon_close_red.png" alt="" /></td>
  525.                         </tr>
  526.                       </table>
  527.                     </div>
  528.                     <!--  end message-red -->
  529.                     <?php } ?>
  530.                 </div>
  531.             </div>
  532.         <?php } ?>
  533.       </aside>
  534.     </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement