<?php require_once "data/products.php"; require_once "config.php"; require_once "func.php"; ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title><?php echo $title; ?> | Test</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <link rel="stylesheet" href="<?php echo site_uri('css/reset.css'); ?> " /> <link rel="stylesheet" href="<?php echo site_uri('css/style.css'); ?> " /> </head> <body> <div id="wrapper"> <h2 class="head-title"><?php echo $title; ?> </h2>
private function get_test_script_2() { ob_start(); ?> <script type="text/javascript"> //<![CDATA[ $(function () { for (var i = 1; i <= 4; i++) { $.ajax({ url: '<?php echo site_uri('playground/ajax-queue/test'); ?> ', type: 'GET', data: { i: i }, success: function(html) { $('#ordinary_ajax').append('<li>' + html + '</li>'); } }); } }); //]]> </script><?php $script = ob_get_contents(); ob_end_clean(); return $script; }
function js_platform() { ci()->load->helper('asset'); $asset_uri = config_item('asset_dir'); $asset_img_uri = image_path(''); $asset_js_uri = js_path(''); $asset_css_dir = css_path(''); return "\n <script type=\"text/javascript\">\n //<![CDATA[\n var BASE_URL = '" . BASE_URL . "';\n var BASE_URI = '" . BASE_URI . "';\n var SERVER_URL = '" . SERVER_URL . "';\n var SITE_URL = '" . SITE_URL . "';\n var site_url = '" . site_url() . "'; // The language segment is added.\n var SITE_URI = '" . SITE_URI . "';\n var site_uri = '" . site_uri() . "'; // The language segment is added.\n var CURRENT_URL = '" . CURRENT_URL . "';\n var CURRENT_URI = '" . CURRENT_URI . "';\n var DEFAULT_BASE_URL = '" . DEFAULT_BASE_URL . "';\n var DEFAULT_BASE_URI = '" . DEFAULT_BASE_URI . "';\n var ASSET_URI = '" . config_item('asset_dir') . "';\n var ASSET_IMG_URI = '" . image_path('') . "';\n var ASSET_JS_URI = '" . js_path('') . "';\n var ASSET_CSS_URI = '" . css_path('') . "';\n var PUBLIC_UPLOAD_URL = '" . PUBLIC_UPLOAD_URL . "';\n //]]>\n </script>"; }
</div><!--// #wrapper--> </body> <script src="<?php echo site_uri('js/jquery-1.11.3.min.js'); ?> "></script> <script src="<?php echo site_uri('js/masonry.pkgd.js'); ?> "></script> <script src="<?php echo site_uri('js/site.js'); ?> "></script> </html>
}); $('#captcha_refresh').on('click', function() { refresh_captcha(); }); $('#main-contact-form').submit(function(e) { contact_form_submit_state(); var contact_form_data = $(this).serialize(); $.ajax({ type: 'post', url: '<?php echo site_uri('contact_form_widget/submit'); ?> ', data: contact_form_data, success: function(data) { if (data.success) { contact_form_success_state(data.messages_html); } else { contact_form_error_state(data.messages_html); }
if (!empty($_GET['cart'])) { if ($_GET['cart'] == 'rm') { unset($_SESSION['cart']); header('Location: ' . base_url()); } } #unset($_SESSION['cart']); ?> <div class="main"> <ul class="grid grid4"> <?php foreach ($products as $product_id => $p) { ?> <li class="item gridItem"> <form ajax method="POST" action="<?php echo site_uri('checkout.php'); ?> "> <input type="hidden" value="<?php echo $product_id; ?> " name="product_id" /> <div class="product-image"><img src="<?php echo fn_image_thumb($p['image']); ?> " /></div> <div class="product-info"> <div class="product-brand"><?php echo $p['brand']; ?> </div>
public function site() { return site_uri($this->get_attribute(0)); }
<?php session_start(); require_once "../func.php"; unset($_SESSION['cart']); echo site_uri(''); exit; header('Location: ' . site_uri(''));
<td>Shipping Fee</td> <td class="value"><?php $shipping = fn_shipping($cart['subtotal'], $country_selected); echo fn_price($shipping); ?> </td> </tr> <tr> <td>Total</td> <td class="value"><?php echo fn_price($cart['total'] - $cart['discount'] + $shipping); ?> </td> <!-- - $cart['discount'] --> </tr> <tr><td colspan="2"> </td></tr> <tr> <td></td> <td class="float-right"><a class="button style2" href="<?php echo base_url(); ?> ">Continue Shopping</a><a class="button style3" href="<?php echo site_uri('checkout_confirm.php'); ?> ">Confirm Checkout</a></td> </tr> </table> </div> </div> <?php #print_r($cart); include "partials/footer.php";
function fn_image_thumb($image_name) { return site_uri('product_images/thumb/' . $image_name); }