- PHP Version:
- PayPal-PHP-SDK Version:
- Debug ID(s):
Please include as many details (logs, steps to reproduce) as you can to help us reproduce this issue faster.
| untitled36 |
| <component name="CopyrightManager"> | |
| <settings default="" /> | |
| </component> |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project version="4"> | |
| <component name="PublishConfigData" serverName="home"> | |
| <serverData> | |
| <paths name="home"> | |
| <serverdata> | |
| <mappings> | |
| <mapping deploy="/jewish/" local="$PROJECT_DIR$" web="/" /> | |
| </mappings> | |
| </serverdata> | |
| </paths> | |
| </serverData> | |
| </component> | |
| </project> |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project version="4"> | |
| <component name="Encoding"> | |
| <file url="PROJECT" charset="UTF-8" /> | |
| </component> | |
| </project> |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project version="4"> | |
| <component name="ProjectLevelVcsManager" settingsEditedManually="false"> | |
| <OptionsSetting value="true" id="Add" /> | |
| <OptionsSetting value="true" id="Remove" /> | |
| <OptionsSetting value="true" id="Checkout" /> | |
| <OptionsSetting value="true" id="Update" /> | |
| <OptionsSetting value="true" id="Status" /> | |
| <OptionsSetting value="true" id="Edit" /> | |
| <ConfirmationsSetting value="0" id="Add" /> | |
| <ConfirmationsSetting value="0" id="Remove" /> | |
| </component> | |
| <component name="masterDetails"> | |
| <states> | |
| <state key="ScopeChooserConfigurable.UI"> | |
| <settings> | |
| <splitter-proportions> | |
| <option name="proportions"> | |
| <list> | |
| <option value="0.2" /> | |
| </list> | |
| </option> | |
| </splitter-proportions> | |
| </settings> | |
| </state> | |
| </states> | |
| </component> | |
| </project> |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project version="4"> | |
| <component name="ProjectModuleManager"> | |
| <modules> | |
| <module fileurl="file://$PROJECT_DIR$/.idea/untitled36.iml" filepath="$PROJECT_DIR$/.idea/untitled36.iml" /> | |
| </modules> | |
| </component> | |
| </project> |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <module type="WEB_MODULE" version="4"> | |
| <component name="NewModuleRootManager"> | |
| <content url="file://$MODULE_DIR$"> | |
| <excludeFolder url="file://$MODULE_DIR$/vendor/paypal/rest-api-sdk-php" /> | |
| <excludeFolder url="file://$MODULE_DIR$/vendor/psr/log" /> | |
| </content> | |
| <orderEntry type="inheritedJdk" /> | |
| <orderEntry type="sourceFolder" forTests="false" /> | |
| <orderEntry type="module-library"> | |
| <library name="PHARS"> | |
| <CLASSES /> | |
| <SOURCES /> | |
| </library> | |
| </orderEntry> | |
| </component> | |
| </module> |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project version="4"> | |
| <component name="WebServers"> | |
| <option name="servers"> | |
| <webServer id="5455b66d-96de-4e43-a5e6-345153efa171" name="home" url="http://ftp.ihavenohome.com"> | |
| <fileTransfer host="ftp.ihavenohome.com" port="21" username="ihavenohomecom"> | |
| <advancedOptions> | |
| <advancedOptions dataProtectionLevel="Private" passiveMode="true" /> | |
| </advancedOptions> | |
| </fileTransfer> | |
| </webServer> | |
| </option> | |
| </component> | |
| </project> |
| <?php | |
| ini_set('display_errors', 'On'); | |
| error_reporting(E_ALL); | |
| require "vendor/autoload.php"; | |
| define('SITE_URL','http://www.jewish-store.com'); | |
| $paypal = new \PayPal\Rest\ApiContext( | |
| new \PayPal\Auth\OAuthTokenCredential('******' | |
| ) | |
| ); |
| <?php | |
| require_once "core/load.php"; | |
| $cart = new cart($conn,$_SESSION['cart']); | |
| if(isset($_GET['id'])){ | |
| $cart->setCart($_GET['id']); | |
| } | |
| if(isset($_GET['delete'])){ | |
| $cart->deleteProduct($_GET['delete']); | |
| } | |
| if(isset($_POST['update_cart'])){ | |
| foreach($_POST as $key =>$value){ | |
| if(is_numeric($key)&&$_POST[$key]>0) { | |
| $cart->updateQuantity($key,$_POST[$key]); | |
| } | |
| } | |
| $cart->setCartTotal(); | |
| $cart->view(); | |
| } | |
| if(isset($_POST['proceed'])){ | |
| header("Location: checkout.php"); | |
| } | |
| $cart1 = $cart->getCart(); | |
| ?> | |
| <?php require_once "core/header.php";?> | |
| <div class="product-big-title-area"> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-md-12"> | |
| <div class="product-bit-title text-center"> | |
| <h2>Shopping Cart</h2> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> <!-- End Page title area --> | |
| <div class="single-product-area"> | |
| <div class="zigzag-bottom"></div> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-md-4"> | |
| <div class="single-sidebar"> | |
| <h2 class="sidebar-title">Search Products</h2> | |
| <form action="search.php" method="get"> | |
| <input type="text" name="q" placeholder="Search products..."> | |
| <input type="submit" value="Search"> | |
| </form> | |
| </div> | |
| <div class="single-sidebar"> | |
| <h2 class="sidebar-title">Products</h2> | |
| <?php echo recent($conn);?> | |
| </div> | |
| </div> | |
| <div class="col-md-8"> | |
| <div class="product-content-right"> | |
| <div class="woocommerce"> | |
| <?php echo $cart1;?> | |
| <div class="cart-collaterals"> | |
| <div class="cross-sells"> | |
| <h2>You may be interested in...</h2> | |
| <ul class="products"> | |
| <?php echo may($conn);?> | |
| </ul> | |
| </div> | |
| <?php echo $cart->setCartTotal();?> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <?php require_once "core/footer.php";?> |
| <?php | |
| use PayPal\Api\Payer; | |
| use PayPal\Api\Item; | |
| use PayPal\Api\ItemList; | |
| use PayPal\Api\Details; | |
| use PayPal\Api\Amount; | |
| use PayPal\Api\Transaction; | |
| use PayPal\Api\RedirectUrls; | |
| use PayPal\Api\Payment; | |
| require 'app/start.php'; | |
| require_once "core/load.php"; | |
| $Item = selectItems($conn,$_SESSION['cart']); | |
| if($Item==''){ | |
| header("Location: cart.php"); | |
| } | |
| $sum = 0; | |
| $payer = new Payer(); | |
| $payer->setPaymentMethod('paypal'); | |
| for($x=0;$x<count($Item);$x++) { | |
| $item[$x] = new Item(); | |
| $item[$x]->setName($Item[$x]['product_name']) | |
| ->setCurrency('USD') | |
| ->setQuantity($Item[$x]['quantity']) | |
| ->setPrice($Item[$x]['price']); | |
| $sum=$sum+$Item[$x]['price']*$Item[$x]['quantity']; | |
| } | |
| $itemlist = new ItemList(); | |
| $itemlist->setItems($item); | |
| $details = new Details(); | |
| $details->setShipping(0) | |
| ->setSubtotal($sum); | |
| $amount = new Amount(); | |
| $amount->setCurrency('USD') | |
| ->setTotal($sum) | |
| ->setDetails($details); | |
| $transaction = new Transaction(); | |
| $transaction->setAmount($amount) | |
| ->setItemList($itemlist) | |
| ->setDescription(uniqid()) | |
| ->setInvoiceNumber(uniqid()); | |
| $RedirectUrls = new RedirectUrls(); | |
| if(isset($_SESSION['id'])) { | |
| $cart = $_SESSION['cart']; | |
| unset($_SESSION['cart']); | |
| $RedirectUrls->setReturnUrl('http://jewish-store.com/pay.php?success=true&cart='.$cart.'&user_id='.$_SESSION['id']) | |
| ->setCancelUrl('http://jewish-store.com/pay.php?success=false'); | |
| } | |
| else{ | |
| $cart = $_SESSION['cart']; | |
| unset($_SESSION['cart']); | |
| $RedirectUrls->setReturnUrl('http://jewish-store.com/pay.php?success=true&cart='.$cart) | |
| ->setCancelUrl('http://jewish-store.com/pay.php?success=false'); | |
| } | |
| $payment = new Payment(); | |
| $payment->setIntent('sale') | |
| ->setPayer($payer) | |
| ->setRedirectUrls($RedirectUrls) | |
| ->setTransactions([$transaction]); | |
| try{ | |
| $payment->create($paypal); | |
| } catch(Exception $e){ | |
| die($e); | |
| } | |
| $approv = $payment->getApprovalLink(); | |
| header("Location:{$approv}"); | |
| ?> |
| <?php | |
| require_once "core/load.php"; | |
| $code = ''; | |
| if(isset($_POST['confirm'])){ | |
| $_POST['code']=mysqli_real_escape_string($conn,$_POST['code']); | |
| if(confirm($conn,$_POST['code'])!=0) | |
| { | |
| $_SESSION['id'] = confirm($conn,$_POST['code']); | |
| updateConfrim($conn,$_SESSION['id']); | |
| header("Location: index.php"); | |
| } | |
| else{ | |
| $code = 'Inccorect code'; | |
| } | |
| } | |
| ?> | |
| <?php require_once "core/header.php";?> | |
| <div class="product-big-title-area"> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-md-12"> | |
| <div class="product-bit-title text-center"> | |
| <h2>Confirm Code</h2> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="wrapper"> | |
| <form action="" method="post" class="form-signin"> | |
| <h2 class="form-signin-heading">Confirm Code</h2> | |
| <input type="text" class="form-control" name="code" placeholder="Type code" required="" autofocus="" /> | |
| <span style="color: red"><?php echo $code;?></span> | |
| <br> | |
| <button name='confirm' class="btn btn-lg btn-primary btn-block" type="submit">Confirm Code</button> | |
| </form> | |
| </div> | |
| <?php require_once "core/footer.php";?> |
| <?php | |
| require_once "core/load.php"; | |
| ?> | |
| <?php require_once "core/header.php";?> | |
| <div class="product-big-title-area" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html"> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-md-12"> | |
| <div class="product-bit-title text-center"> | |
| <h2>Contact Us</h2> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="wrapper" > | |
| <form action="" method="post" class="form-signin"> | |
| <h2 class="form-signin-heading">Contact Us</h2> | |
| <br> | |
| <input type="text" class="form-control" name="username" placeholder="Name" required="" autofocus="" /> | |
| <br> | |
| <input type="text" class="form-control" name='email' placeholder="Email" required=""/> | |
| <br> | |
| <textarea rows="4" cols="50" class="form-control" placeholder="Leave a Message"></textarea> | |
| <br> | |
| <br> | |
| <span style="color: red"></span> | |
| <button name='login' class="btn btn-lg btn-primary btn-block" type="submit">Send</button> | |
| </form> | |
| </div> | |
| <iframe width="100%" height="250" frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/place?q=Or%20yehuda%20odem%2010&key=AIzaSyDe659phKXQoRyVcdDSf6q4Yy_J2NyS-ug" allowfullscreen></iframe> | |
| <?php require_once "core/footer.php";?> |
| <?php | |
| require_once "core/load.php"; | |
| if(!isset($_GET['id'])) | |
| { | |
| $_GET['id']=1; | |
| } | |
| if(isset($_SESSION['admin'])) { | |
| if (isset($_POST['submit'])&&isset($_SESSION['admin'])) { | |
| $name = $_POST['category']; | |
| icategorys($conn, $name); | |
| } | |
| if (isset($_POST['submit1'])&&isset($_SESSION['admin'])) { | |
| $id = $_POST['id']; | |
| $price = $_POST['price']; | |
| $name = $_POST['pname']; | |
| upadteProduct($conn, $id, $price); | |
| upadteProduct1($conn, $id, $name); | |
| } | |
| if (isset($_POST['submit12'])&&isset($_SESSION['admin'])) { | |
| $id = $_GET['id']; | |
| $adults = new products(); | |
| if ($adults->upload($_FILES['fileToUpload']) == 1) { | |
| $adults->setProductName($_POST['txt']); | |
| $adults->setQuantity($_POST['quantity']); | |
| $adults->setDesc($_POST['desc']); | |
| $adults->setPrice($_POST['price']); | |
| $adults->setmkdir($_POST['txt']); | |
| $adults->upload1($_FILES['fileToUpload1'], $_POST['txt']); | |
| $adults->upload2($_FILES['fileToUpload2'], $_POST['txt']); | |
| echo $adults->getUpload() . '<br>'; | |
| echo $adults->getPhoto1() . '<br>'; | |
| echo $adults->getPhoto2() . '<br>'; | |
| $adults->insertProduct($adults->getName(), $adults->getQuantity(), $adults->getUpload(), $adults->getDesc(), $adults->getPrice(), $adults->getPhoto1(), $adults->getPhoto2(), $id, $conn); | |
| } | |
| } | |
| if (isset($_POST['delete'])&&isset($_SESSION['admin'])) { | |
| $id = $_POST['id']; | |
| deleteProducts($conn, $id); | |
| } | |
| if (isset($_POST['delete1'])&&isset($_SESSION['admin'])) { | |
| $id = $_GET['id']; | |
| deleteCat($conn, $id); | |
| } | |
| if (isset($_POST['cat1'])&&isset($_SESSION['admin'])) { | |
| $id = $_GET['id']; | |
| updateName($conn, $id, $_POST['cat']); | |
| } | |
| if (isset($_GET['id'])&&isset($_SESSION['admin'])) { | |
| $id = $_GET['id']; | |
| $zeig = top12($conn, $id); | |
| $zeig1 = categorys12($conn, $id); | |
| } | |
| } | |
| else{ | |
| header("location:index.php"); | |
| } | |
| ?> | |
| <?php require_once "core/header.php";?> | |
| <div class="product-big-title-area"> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-md-12"> | |
| <div class="product-bit-title text-center"> | |
| <h2>Admin</h2> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <br><br> | |
| <center> | |
| <h4>Add Catagory</h4> | |
| <div class="input-group"> | |
| <form action="" method="post"> | |
| <input type="text" name="category" class="form-control"> | |
| <span class="input-group-btn"> | |
| <button class="btn btn-default" type="submit" name="submit"><i class="fa fa-button"></i>Add</button> | |
| </span> | |
| </form> | |
| </div> | |
| <!-- /.input-group --> | |
| </div> | |
| </center> | |
| <br><br><br> | |
| </center> | |
| <center> | |
| <form action="" method="post"> | |
| <?php echo categorys12($conn,$id);?> | |
| <input type="submit" name="delete1" value="Delete Catagory"> | |
| </form> | |
| </center> | |
| <br><br> | |
| <ul style="background: lightgrey;text-align: center"> | |
| <h2>Choose Category to Edit</h2> | |
| <?php echo categorys($conn);?> | |
| </ul> | |
| <?php echo top12($conn, $id);?> | |
| <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> | |
| <div class="single-product-area"> | |
| <div class="zigzag-bottom"></div> | |
| <div class="product-inner-category"> | |
| </div> | |
| <div role="tabpanel"> | |
| <ul class="product-tab" role="tablist"> | |
| <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">Product Upload</a></li> | |
| </ul> | |
| <div role="tabpanel" class="tab-pane fade in active" id="home"> | |
| <h2>Product Description</h2> | |
| <div class="well" style="text-align: right;direction: rtl"> | |
| <h4>Add Product</h4> | |
| <form action='' method='post' enctype='multipart/form-data'> | |
| Choose Photo | |
| <br> | |
| <input type='file' name='fileToUpload' id='fileToUpload'> | |
| <br> | |
| <br> | |
| Choose Product name | |
| <br> | |
| <input type='text' name ='txt'> | |
| <br> | |
| <br> | |
| Choose Description | |
| <br> | |
| <textarea name="desc" cols="40" rows="5"></textarea> | |
| <br> | |
| Choose Quantity | |
| <br> | |
| <input type='text' name='quantity'> | |
| <br> | |
| Choose Price | |
| <br> | |
| <input type='text' name='price'> | |
| <br> | |
| Choose Photo 2 | |
| <br> | |
| <input type='file' name='fileToUpload1' id='fileToUpload'> | |
| <br> | |
| Choose Photo 3 | |
| <br> | |
| <input type='file' name='fileToUpload2' id='fileToUpload'> | |
| <br> | |
| <input type='submit' value='Upload details' name='submit12'> | |
| </form> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <?php require_once "core/footer.php";?> | |
| <?php | |
| class cart | |
| { | |
| private $conn; | |
| private $cart; | |
| public function __construct($conn, $cart) | |
| { | |
| $this->conn = $conn; | |
| $this->cart = $cart; | |
| } | |
| public function setCart($id) | |
| { | |
| $sql = "INSERT INTO cart(id,date,product_id,quantity) VALUES ('$this->cart','hello','$id',1)"; | |
| $this->conn->query($sql); | |
| } | |
| public function getCart() | |
| { | |
| $empty = ''; | |
| $empty1 = "<form method=\"post\" action=\"#\"> | |
| <table cellspacing=\"0\" class=\"shop_table cart\"> | |
| <thead> | |
| <tr> | |
| <th class=\"product-remove\"> </th> | |
| <th class=\"product-thumbnail\">Picture</th> | |
| <th class=\"product-name\">Product</th> | |
| <th class=\"product-price\">Price</th> | |
| <th class=\"product-quantity\">Quantity</th> | |
| <th class=\"product-subtotal\">Total</th> | |
| </tr> | |
| </thead><tbody></tbody>"; | |
| $empty2 = "<tr> | |
| <td class=\"actions\" colspan=\"6\"> | |
| <div class=\"coupon\"> | |
| <label for=\"coupon_code\">Coupon:</label> | |
| <input type=\"text\" placeholder=\"Coupon code\" value=\"\" id=\"coupon_code\" class=\"input-text\" name=\"coupon_code\"> | |
| <input type=\"submit\" value=\"Apply Coupon\" name=\"apply_coupon\" class=\"button\"> | |
| </div> | |
| <input type=\"submit\" value=\"Update Cart\" name=\"update_cart\" class=\"button\"> | |
| <input type=\"submit\" value=\"Checkout\" name=\"proceed\" class=\"checkout-button button alt wc-forward\"> | |
| </td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </form>"; | |
| $query = "SELECT products.id,product_name,image,price,cart.quantity FROM cart,products where cart.id = '$this->cart' and cart.product_id = products.id"; | |
| $result = $this->conn->query($query); | |
| if ($result->num_rows > 0) { | |
| while ($row = $result->fetch_assoc()) { | |
| $empty = $empty . " | |
| <tr class=\"cart_item\"> | |
| <td class=\"product-remove\"> | |
| <a title=\"Remove this item\" class=\"remove\" href='cart.php?delete=" . $row['id'] . "'>×</a> | |
| </td> | |
| <td class=\"product-thumbnail\"> | |
| <a href=><img width=\"145\" height=\"145\" alt=\"poster_1_up\" class=\"shop_thumbnail\" src='img/" . $row['image'] . "' style='height:50px;'></a> | |
| </td> | |
| <td class=\"product-name\"style='width:35%'> | |
| <a href= >" . $row['product_name'] . "</a> | |
| </td> | |
| <td class=\"product-price\"> | |
| <span class=\"amount\">$" . $row['price'] . ".00</span> | |
| </td> | |
| <td class=\"product-quantity\" > | |
| <div class=\"quantity buttons_added\" > | |
| <input type=\"button\" id='" . $row['id'] . "' class=\"minus\" value=\"-\" onclick=\"minus(this.id)\" > | |
| <input type=\"number\" name='" . $row['id'] . "' id='" . $row['id'] . "&f' size=\"4\" class=\"input-text qty text\" title=\"Qty\" value='" . $row['quantity'] . "' min=\"0\" step=\"1\" id='count'> | |
| <input type=\"button\" id='" . $row['id'] . "' class=\"plus\" value=\"+\" onclick=\"plus(this.id)\"> | |
| </div> | |
| </td> | |
| <td class=\"product-subtotal\"> | |
| <span class=\"amount\">$" . $row['price'] * $row['quantity'] . ".00</span> | |
| </td> | |
| </tr> | |
| "; | |
| } | |
| return $empty1 . $empty . $empty2; | |
| } else { | |
| return "<h1 style='color:red'>Your cart is empty</h1>"; | |
| } | |
| } | |
| public function updateQuantity($key, $post) | |
| { | |
| $sql = "UPDATE cart | |
| SET quantity=$post | |
| WHERE id='$this->cart' AND product_id = '$key' "; | |
| $this->conn->query($sql); | |
| } | |
| public function deleteProduct($delete) | |
| { | |
| $sql = "DELETE FROM cart where product_id = '$delete' AND id = '$this->cart'"; | |
| $this->conn->query($sql); | |
| } | |
| public function setCartTotal() | |
| { | |
| $empty = ''; | |
| $sum = 0; | |
| $query = "SELECT products.id,product_name,image,price,cart.quantity FROM cart,products where cart.id = '$this->cart' and cart.product_id = products.id"; | |
| $result = $this->conn->query($query); | |
| if ($result->num_rows > 0) { | |
| while ($row = $result->fetch_assoc()) { | |
| $row['price'] = $row['price'] * $row['quantity']; | |
| $sum = $sum + $row['price']; | |
| } | |
| return $empty = $empty . " <div class=\"cart_totals \"> | |
| <h2>Cart Totals</h2> | |
| <table cellspacing=\"0\"> | |
| <tbody> | |
| <tr class=\"cart-subtotal\"> | |
| <th>Cart Subtotal</th> | |
| <td><span class=\"amount\">$" . $sum . ".00</span></td> | |
| </tr> | |
| <tr class=\"shipping\"> | |
| <th>Shipping and Handling</th> | |
| <td>Free Shipping</td> | |
| </tr> | |
| <tr class=\"order-total\"> | |
| <th>Order Total</th> | |
| <td><strong><span class=\"amount\">$" . $sum . ".00</span></strong> </td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div>"; | |
| } | |
| } | |
| public function view() | |
| { | |
| $empty = ''; | |
| $sum = 0; | |
| $sum1 = 0; | |
| $query = "SELECT products.id,product_name,image,price,cart.quantity FROM cart,products where cart.id = '$this->cart' and cart.product_id = products.id"; | |
| $result = $this->conn->query($query); | |
| if ($result->num_rows > 0) { | |
| while ($row = $result->fetch_assoc()) { | |
| $row['price'] = $row['price'] * $row['quantity']; | |
| $sum = $sum + $row['price']; | |
| $sum1++; | |
| } | |
| return $empty = "<div class=\"shopping-item\"> | |
| <a href=\"cart.php\">Cart - <span class=\"cart-amunt\">$" . $sum . "</span> <i class=\"fa fa-shopping-cart\"></i> <span class=\"product-count\">" . $sum1 . "</span></a> | |
| </div>"; | |
| } | |
| return $empty = "<div class=\"shopping-item\"><a href=\"cart.php\">Cart - <span class=\"cart-amunt\">$0</span> <i class=\"fa fa-shopping-cart\"></i> <span class=\"product-count\">0</span></a></div>"; | |
| } | |
| public function Order() | |
| { | |
| $sum = 0; | |
| $query = "SELECT products.id,product_name,image,price,cart.quantity FROM cart,products where cart.id = '$this->cart' and cart.product_id = products.id"; | |
| $result = $this->conn->query($query); | |
| while ($row = $result->fetch_assoc()) { | |
| $x[$sum] = array('product_id' => $row['id'], 'product_name' => $row['product_name'], 'quantity' => $row['quantity'], 'price' => $row['price']); | |
| $sum++; | |
| } | |
| return $x; | |
| } | |
| public function getOrder() | |
| { | |
| if(isset($_SESSION['id'])) { | |
| $user = $_SESSION['id']; | |
| } | |
| else{ | |
| return "<h1>you must register to see your last orders</h1>"; | |
| } | |
| $empty = ''; | |
| $empty1 = "<form method=\"post\" action=\"#\"> | |
| <table cellspacing=\"0\" class=\"shop_table cart\"> | |
| <thead> | |
| <tr> | |
| <th class=\"product-name\">Date</th> | |
| <th class=\"product-name\">Product</th> | |
| <th class=\"product-price\">Price</th> | |
| <th class=\"product-quantity\">Quantity</th> | |
| <th class=\"product-subtotal\">Total</th> | |
| </tr> | |
| </thead><tbody></tbody>"; | |
| $empty2 = "<tr><td colspan='6'><h1>Order History</h1></td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </form>"; | |
| $query = "SELECT payment_gross,item_name,quantity,date FROM payments WHERE user_id='$user'"; | |
| $result = $this->conn->query($query); | |
| if ($result->num_rows > 0) { | |
| while ($row = $result->fetch_assoc()) { | |
| $empty = $empty . " | |
| <tr class=\"cart_item\"> | |
| <td class=\"product-remove\"> | |
| ".$row['date']." | |
| </td> | |
| <td class=\"product-name\"style='width:40%'> | |
| <a href=\"single-product.html\" >" . $row['item_name'] . "</a> | |
| </td> | |
| <td class=\"product-price\"> | |
| <span class=\"amount\">$" . $row['payment_gross'] . ".00</span> | |
| </td> | |
| <td class=\"product-quantity\" > | |
| <div class=\"quantity buttons_added\" > | |
| ".$row['quantity']." | |
| </div> | |
| </td> | |
| <td class=\"product-subtotal\"> | |
| <span class=\"amount\">$" . $row['payment_gross'] * $row['quantity'] . ".00</span> | |
| </td> | |
| </tr> | |
| "; | |
| } | |
| return $empty1 . $empty . $empty2; | |
| } | |
| } | |
| } | |
| <?php | |
| $servername ="ihavenohomecom.domaincommysql.com"; | |
| $username = "jew"; | |
| $password = "******"; | |
| $dbname = "jewish"; | |
| $conn = new mysqli($servername,$username,$password,$dbname); | |
| if ($conn->connect_error) { | |
| die("Connection failed: " . $conn->connect_error); | |
| } | |
| ?> |
| <?php | |
| class mail{ | |
| public $message; | |
| public $to; | |
| public $subject; | |
| public $mailto; | |
| PUBLIC $name; | |
| public function setMessage($mailTo,$txt,$subject) | |
| { | |
| $this->message=$txt; | |
| $this->to = $mailTo; | |
| $this->subject = $subject; | |
| } | |
| public function geTo() | |
| { | |
| return $this->to; | |
| } | |
| public function sendEmail() | |
| { | |
| $headers = "From: jewish@jewish-store.com" . "\r\n" . | |
| "CC: jewish@jewish-store.com"; | |
| mail($this->to,$this->message,$this->subject,$headers); | |
| } | |
| } | |
| ?> |
| <?php | |
| class pages{ | |
| private $pages; | |
| public function pageNum($conn, $pageId,$category) | |
| { | |
| if($category>0){ | |
| $selectCom = "SELECT * FROM products WHERE product_id = '$category'"; | |
| } | |
| else{ | |
| $selectCom = "SELECT * FROM products"; | |
| } | |
| $active = $pageId-10; | |
| $page = ""; | |
| $selectCom1 = $conn->query($selectCom); | |
| $f = $selectCom1->num_rows / 10; | |
| $x = intval($f); | |
| $y = $selectCom1->num_rows / 10; | |
| if($pageId>=0&&$pageId<=1) { | |
| if ($x == $y) { | |
| $active=0; | |
| for ($t = 1; $t <= $pageId+2; $t++) { | |
| if ($t <=$y+1&&$t<=$x+1) { | |
| $active++; | |
| if ($active == $pageId) { | |
| $page = $page . " <li><a class='active' href='?id=$t'>$t</a></li>"; | |
| } else { | |
| $page = $page . " <li><a href='?id=$t'>$t</a></li>"; | |
| } | |
| } | |
| } | |
| } else { | |
| $active = 0; | |
| for ($t = 1; $t <= $pageId + 2; $t++) { | |
| if ($t <=$y+1&&$t<=$x+1) { | |
| $active++; | |
| if ($active == $pageId) { | |
| $page = $page . " <li><a class='active' href='?id=$t'>$t</a></li>"; | |
| } else { | |
| $page = $page . " <li><a href='?id=$t'>$t</a></li>"; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| else{ | |
| if ($x == $y) { | |
| for ($t = $pageId - 2; $t <= $pageId + 2; $t++) { | |
| $active++; | |
| if ($t <= $y + 1 && $t <= $x + 1) { | |
| if ($active == $pageId) { | |
| $page = $page . " <li><a class='active' href='?id=$t'>$t</a></li>"; | |
| } else { | |
| $page = $page . " <li><a href='?id=$t'>$t</a></li>"; | |
| } | |
| } | |
| } | |
| }else { | |
| for ($t = $pageId - 2; $t <= $pageId + 2; $t++) { | |
| if ($t <=$y+1&&$t<=$x+1) { | |
| $active++; | |
| if ($active == $pageId) { | |
| $page = $page . " <li><a class='active' href='?id=$t'>$t</a></li>"; | |
| } else { | |
| $page = $page . " <li><a href='?id=$t'>$t</a></li>"; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| return $page; | |
| } | |
| public function page($page) | |
| { | |
| $x = 10; | |
| $page = $page * $x; | |
| $pageStart = $page; | |
| $pageStart = $pageStart - 10; | |
| $pages = array("pageStart" => $pageStart, "pageEnd" => $page); | |
| $this->pages = $pages; | |
| } | |
| public function selectCommentNum($conn,$id) | |
| { | |
| $x = "SELECT * FROM comments WHERE post_id = '$id'"; | |
| $num = $conn->query($x); | |
| if(isset($num->num_rows)) | |
| { | |
| $x = array('num'=> $num->num_rows); | |
| return $x; | |
| } | |
| else | |
| { | |
| return 0; | |
| } | |
| } | |
| function products($conn,$product) | |
| { | |
| $x = 0; | |
| $price1=0; | |
| $page = $this->pages; | |
| $pageStart = $page['pageStart']; | |
| $pageEnd = $page['pageEnd']; | |
| $display=""; | |
| if($product>0) { | |
| $query = "SELECT id,product_name,image,price FROM products WHERE product_id = '$product' order by id desc "; | |
| } | |
| else{ | |
| $query = "SELECT id,product_name,image,price FROM products"; | |
| } | |
| $result = $conn->query($query); | |
| while($row=$result->fetch_assoc()) { | |
| $x++; | |
| $price1=$price1+$row['price']; | |
| if ($x > $pageStart && $x <= $pageEnd) { | |
| $display = $display . " | |
| <div class='col-md-4 col-sm-4'> | |
| <div class='single-shop-product'> | |
| <div class='product-upper'> | |
| <img src='img/".$row['image']."' style='height:250px;width:250px;border:3px solid grey;border-radius:28px;' alt=''> | |
| </div> | |
| <div class='product-carousel-price'> | |
| </div> | |
| <div class='product-option-shop'> | |
| <form target=\"paypal\" action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\"> | |
| <a href='single-product.php?id=".$row['id']."'class=\"add_to_cart_button\" type=\"submit\">Learn more</a> | |
| </form> | |
| <br> | |
| <br> | |
| <span style='background:whitesmoke;border:0px solid black; font-size:17px;padding:3px;border-radius:28px;'><ins style='color:blue;'>$".$row['price']."</ins> <del>$".$price1."</del></span> | |
| <div class=\"product-wid-rating\"> | |
| <i class=\"fa fa-star\"></i> | |
| <i class=\"fa fa-star\"></i> | |
| <i class=\"fa fa-star\"></i> | |
| <i class=\"fa fa-star\"></i> | |
| <i class=\"fa fa-star\"></i> | |
| </div> | |
| <h2><a href='single-product.php?id=".$row['id']."'>".$row['product_name']."</a></h2> | |
| </div> | |
| </div> | |
| </div> | |
| "; | |
| } | |
| } | |
| return $display; | |
| } | |
| } | |
| <?php | |
| class search | |
| { | |
| private $conn; | |
| private $search; | |
| private $x1; | |
| public function __construct($conn, $search) | |
| { | |
| $this->conn = $conn; | |
| $this->search = $search; | |
| $this->x1 = 0; | |
| $this->explodeWord(); | |
| $this->searchProduct(); | |
| } | |
| public function explodeWord() | |
| { | |
| $this->search = explode(" ", $this->search); | |
| } | |
| public function searchProduct() | |
| { | |
| $id=''; | |
| $search=''; | |
| $sum=0; | |
| $x1 = 'img'; | |
| $price1=0; | |
| foreach ($this->search as $x ) { | |
| $sql = "select * from products where product_name LIKE LOWER ('%$x%') or product_name LIKE UPPER ('%$x%')" ; | |
| $result = $this->conn->query($sql); | |
| if ($result->num_rows > 0) { | |
| while ($row = $result->fetch_assoc()) { | |
| if($id!=$row['id']) { | |
| $price1=$price1+$row['price']; | |
| $search = $search . " | |
| <div class='col-md-4 col-sm-4'> | |
| <div class='single-shop-product'> | |
| <div class='product-upper'> | |
| <img src='img/".$row['image']."' style='height:250px;width:250px;border:3px solid grey;border-radius:28px;' alt=''> | |
| </div> | |
| <div class='product-carousel-price'> | |
| </div> | |
| <div class='product-option-shop'> | |
| <form target=\"paypal\" action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\"> | |
| <a href='single-product.php?id=".$row['id']."'class=\"add_to_cart_button\" type=\"submit\">Learn more</a> | |
| </form> | |
| <br> | |
| <br> | |
| <span style='background:whitesmoke;border:0px solid black; font-size:17px;padding:3px;border-radius:28px;'><ins style='color:blue;'>$".$row['price']."</ins> <del>$".$price1."</del></span> | |
| <div class=\"product-wid-rating\"> | |
| <i class=\"fa fa-star\"></i> | |
| <i class=\"fa fa-star\"></i> | |
| <i class=\"fa fa-star\"></i> | |
| <i class=\"fa fa-star\"></i> | |
| <i class=\"fa fa-star\"></i> | |
| </div> | |
| <h2><a href='single-product.php?id=".$row['id']."'>".$row['product_name']."</a></h2> | |
| </div> | |
| </div> | |
| </div> | |
| "; | |
| } | |
| $id = $row['id']; | |
| } | |
| $this->x1=1; | |
| $this->search = $search; | |
| } else { | |
| if($this->x1==0) { | |
| $this->search = 'המוצר שאתה מחפש לא נמצא באתר'; | |
| } | |
| } | |
| } | |
| } | |
| public function getSearch() | |
| { | |
| return $this->search; | |
| } | |
| } | |
| ?> |
| <?php | |
| class products | |
| { | |
| protected $photo; | |
| protected $photo1; | |
| protected $photo2; | |
| protected $name; | |
| protected $quantity; | |
| protected $desc; | |
| protected $price; | |
| protected $fix; | |
| protected $mkdir; | |
| public function upload($x) | |
| { | |
| $target_dir = 'img/'; | |
| $target_file = $target_dir.basename($x["name"]); | |
| $uploadOk = 1; | |
| $imageFileType = pathinfo($target_file, PATHINFO_EXTENSION); | |
| // Check if image file is a actual image or fake image | |
| if (isset($_POST["submit"])) { | |
| $check = getimagesize($x["tmp_name"]); | |
| if ($check !== false) { | |
| echo "File is an image - " . $check["mime"] . "."; | |
| $uploadOk = 1; | |
| } else { | |
| echo "File is not an image."; | |
| $uploadOk = 0; | |
| } | |
| } | |
| // Check if file already exists | |
| // Check file size | |
| if ($_FILES["fileToUpload"]["size"] > 7000000) { | |
| echo "Sorry, your file is too large."; | |
| $uploadOk = 0; | |
| return 0; | |
| } | |
| // Allow certain file formats | |
| if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" | |
| && $imageFileType != "gif" && $imageFileType != "JPG" && $imageFileType != "PNG" && $imageFileType != "JPEG" | |
| && $imageFileType != "GIF" | |
| ) { | |
| echo "Sorry, only JPG, JPEG, PNG & GIF files are allowed."; | |
| $uploadOk = 0; | |
| } | |
| // Check if $uploadOk is set to 0 by an error | |
| if ($uploadOk == 0) { | |
| echo "Sorry, your file was not uploaded."; | |
| return 0; | |
| // if everything is ok, try to upload file | |
| } else { | |
| if (move_uploaded_file($x["tmp_name"], $target_file)) { | |
| echo "The file " . basename($x["name"]) . " has been uploaded."; | |
| $this->photo = basename($x["name"]); | |
| return 1; | |
| } else { | |
| echo "Sorry, there was an error uploading your file."; | |
| return 0; | |
| } | |
| } | |
| } | |
| public function upload1($x,$name) | |
| { | |
| $target_dir = 'img/'.$name.'/'; | |
| $target_file = $target_dir.basename($x["name"]); | |
| $uploadOk = 1; | |
| $imageFileType = pathinfo($target_file, PATHINFO_EXTENSION); | |
| // Check if image file is a actual image or fake image | |
| if (isset($_POST["submit"])) { | |
| $check = getimagesize($x["tmp_name"]); | |
| if ($check !== false) { | |
| echo "File is an image - " . $check["mime"] . "."; | |
| $uploadOk = 1; | |
| } else { | |
| echo "File is not an image."; | |
| $uploadOk = 0; | |
| } | |
| } | |
| // Check if file already exists | |
| // Check file size | |
| if ($_FILES["fileToUpload"]["size"] > 5000000) { | |
| echo "Sorry, your file is too large."; | |
| $uploadOk = 0; | |
| return 0; | |
| } | |
| // Allow certain file formats | |
| if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" | |
| && $imageFileType != "gif" && $imageFileType != "JPG" && $imageFileType != "PNG" && $imageFileType != "JPEG" | |
| && $imageFileType != "GIF" | |
| ) { | |
| echo "Sorry, only JPG, JPEG, PNG & GIF files are allowed."; | |
| $uploadOk = 0; | |
| } | |
| // Check if $uploadOk is set to 0 by an error | |
| if ($uploadOk == 0) { | |
| echo "Sorry, your file was not uploaded."; | |
| return 0; | |
| // if everything is ok, try to upload file | |
| } else { | |
| if (move_uploaded_file($x["tmp_name"], $target_file)) { | |
| echo "The file " . basename($x["name"]) . " has been uploaded."; | |
| $this->photo1 = basename($x["name"]); | |
| return 1; | |
| } else { | |
| echo "Sorry, there was an error uploading your file."; | |
| return 0; | |
| } | |
| } | |
| } | |
| public function upload2($x,$name) | |
| { | |
| $target_dir = 'img/'.$name.'/'; | |
| $target_file = $target_dir.basename($x["name"]); | |
| $uploadOk = 1; | |
| $imageFileType = pathinfo($target_file, PATHINFO_EXTENSION); | |
| // Check if image file is a actual image or fake image | |
| if (isset($_POST["submit"])) { | |
| $check = getimagesize($x["tmp_name"]); | |
| if ($check !== false) { | |
| echo "File is an image - " . $check["mime"] . "."; | |
| $uploadOk = 1; | |
| } else { | |
| echo "File is not an image."; | |
| $uploadOk = 0; | |
| } | |
| } | |
| // Check if file already exists | |
| // Check file size | |
| if ($_FILES["fileToUpload"]["size"] > 5000000) { | |
| echo "Sorry, your file is too large."; | |
| $uploadOk = 0; | |
| return 0; | |
| } | |
| // Allow certain file formats | |
| if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" | |
| && $imageFileType != "gif" && $imageFileType != "JPG" && $imageFileType != "PNG" && $imageFileType != "JPEG" | |
| && $imageFileType != "GIF" | |
| ) { | |
| echo "Sorry, only JPG, JPEG, PNG & GIF files are allowed."; | |
| $uploadOk = 0; | |
| } | |
| // Check if $uploadOk is set to 0 by an error | |
| if ($uploadOk == 0) { | |
| echo "Sorry, your file was not uploaded."; | |
| return 0; | |
| // if everything is ok, try to upload file | |
| } else { | |
| if (move_uploaded_file($x["tmp_name"], $target_file)) { | |
| echo "The file " . basename($x["name"]) . " has been uploaded."; | |
| $this->photo2 = basename($x["name"]); | |
| return 1; | |
| } else { | |
| echo "Sorry, there was an error uploading your file."; | |
| return 0; | |
| } | |
| } | |
| } | |
| public function setmkdir($name) | |
| { | |
| mkdir('img/'.$name); | |
| } | |
| public function setProductName($name) | |
| { | |
| $this->name = $name; | |
| } | |
| public function setPrice($price) | |
| { | |
| $this->price = $price; | |
| } | |
| public function setQuantity($q) | |
| { | |
| $this->quantity = $q; | |
| } | |
| public function setDesc($desc) | |
| { | |
| $this->desc = $desc; | |
| } | |
| public function getDesc() | |
| { | |
| return $this->desc; | |
| } | |
| public function getName() | |
| { | |
| return $this->name; | |
| } | |
| public function getUpload() | |
| { | |
| return $this->photo; | |
| } | |
| public function getPrice() | |
| { | |
| return $this->price; | |
| } | |
| public function getPhoto1() | |
| { | |
| return $this->photo1; | |
| } | |
| public function getPhoto2() | |
| { | |
| return $this->photo2; | |
| } | |
| public function getQuantity() | |
| { | |
| return $this->quantity; | |
| } | |
| public function insertProduct($name,$quantity,$upload,$desc,$price,$photo1,$photo2,$id,$conn) | |
| { | |
| $sql = "INSERT INTO products(rate,price,desc1,quantity,product_name,image,quantity1,secimage,timage,product_id)VALUES(5,'$price','$desc','$quantity','$name','$upload','$quantity','$photo1','$photo2','$id')"; | |
| $conn->query($sql); | |
| } | |
| } |
| <?php | |
| class users{ | |
| private $conn; | |
| private $erorr = array('name'=> '','family' =>'','username'=> '','city' => '','street' => '','email' => '','password' => ''); | |
| private $name; | |
| private $family; | |
| private $username; | |
| private $city; | |
| private $street; | |
| private $email; | |
| private $password; | |
| private $code; | |
| public function __construct($conn) | |
| { | |
| $this->conn = $conn; | |
| } | |
| public function setName($name){ | |
| if(!preg_match("/^[a-zA-Z'-]+$/",$name)){ | |
| $this->erorr['name'] = 'Name must be in english'; | |
| } | |
| else{ | |
| $this->name = $name; | |
| } | |
| } | |
| public function setFamily($family){ | |
| if(!preg_match("/^[a-zA-Z'-]+$/",$family)){ | |
| $this->erorr['family'] = 'Family name must be in english'; | |
| } | |
| else{ | |
| $this->family = $family; | |
| } | |
| } | |
| public function setUsername($userName){ | |
| if(preg_match('/^[a-zA-Z0-9]{5,10}$/', $userName)){ | |
| $this->username = $userName; | |
| } | |
| else if(!preg_match('/^[A-Za-z][A-Za-z0-9]{5,10}$/', $userName)) { | |
| $this->erorr['username'] = 'userName must be in english and between 5-10 letters'; | |
| } | |
| else{ | |
| $sql = "SELECT * FROM users WHERE username = '$userName' "; | |
| $result = $this->conn->query($sql); | |
| if ($result->num_rows > 0) { | |
| $this->erorr['username'] = 'Username is already in used'; | |
| } else { | |
| if (strlen($userName)>=5&&strlen($userName)<11) { | |
| $this->username = $userName; | |
| } else { | |
| $this->erorr['username'] = 'userName must be in english and between 5-10 letters\' '; | |
| } | |
| } | |
| } | |
| } | |
| public function setEmail($email) | |
| { | |
| if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { | |
| $this->erorr['email'] = 'Incorrect email'; | |
| } | |
| else { | |
| $sql = "select * from users WHERE email ='$email'"; | |
| $result = $this->conn->query($sql); | |
| if ($result->num_rows > 0) { | |
| $this->erorr['email'] = 'Email ist already in use'; | |
| } | |
| else { | |
| $this->email = $email; | |
| } | |
| } | |
| } | |
| public function setPassword($password,$password1){ | |
| if($password!=$password1){ | |
| $this->erorr['password'] = 'Password is not match'; | |
| } | |
| else{ | |
| if(strlen($password)<5||strlen($password1)<5){ | |
| $this->erorr['password'] ='password must be at least 5 letter or more'; | |
| } | |
| else { | |
| $this->password = $password; | |
| } | |
| } | |
| } | |
| public function setCode($code){ | |
| $sql = "select * from users WHERE code ='$code'"; | |
| $result = $this->conn->query($sql); | |
| if($result->num_rows==0){ | |
| $this->code = $code; | |
| } | |
| else{ | |
| $this->setCode(substr(md5(uniqid(mt_rand(), true)) , 0, 8)); | |
| } | |
| } | |
| public function setUser($user_type,$name,$family,$username,$email,$passowrd,$code) | |
| { | |
| $sql = "INSERT INTO users(user_type,name,family,username,email,password,code,confirm)VALUES (3,'$name','$family','$username','$email','$passowrd','$code',2)"; | |
| $this->conn->query($sql); | |
| } | |
| public function getName(){ | |
| return $this->name; | |
| } | |
| public function getFamily(){ | |
| return $this->family; | |
| } | |
| public function getUsername() | |
| { | |
| return $this->username; | |
| } | |
| public function getEmail() | |
| { | |
| return $this->email; | |
| } | |
| public function getPassword() | |
| { | |
| return $this->password; | |
| } | |
| public function getCode() | |
| { | |
| return $this->code; | |
| } | |
| public function getError(){ | |
| return $this->erorr; | |
| } | |
| } | |
| ?> |
| <?php | |
| function insertMail($conn,$email){ | |
| $sql = "INSERT INTO emails(email)VALUES('$email')"; | |
| $conn->query($sql); | |
| } | |
| function isAdmin($conn,$id){ | |
| $sql = "SELECT user_type from users WHERE id = '$id'"; | |
| $result = $conn->query($sql); | |
| while($row=$result->fetch_assoc()){ | |
| $x = $row['user_type']; | |
| } | |
| if($x==1){ | |
| return 1; | |
| } | |
| else{ | |
| return 0; | |
| } | |
| } | |
| function deleteQ($conn){ | |
| $sql = "SELECT quantity1,id from products"; | |
| $result = $conn->query($sql); | |
| while($row = $result->fetch_assoc()){ | |
| if($row['quantity1']<=0){ | |
| $idq = $row['id']; | |
| $sql="select product_name,secimage,timage ,image from products where id = $idq"; | |
| $result = $conn->query($sql); | |
| while($row1=$result->fetch_assoc()) | |
| { | |
| $empty = $row1['image']; | |
| $empty1 = $row1['product_name']; | |
| $empty2 = $row1['secimage']; | |
| $empty3 = $row1['timage']; | |
| } | |
| unlink("img"."/".$empty); | |
| if($empty2!='') { | |
| unlink("img/" . $empty1 . "/" . $empty2); | |
| } | |
| if($empty3!='') { | |
| unlink("img/" . $empty1 . "/" . $empty3); | |
| } | |
| rmdir("img"."/".$empty1); | |
| $sql = "DELETE FROM products where id=$idq"; | |
| $conn->query($sql); | |
| } | |
| } | |
| } | |
| function citys($conn) | |
| { | |
| $city = ''; | |
| $sql = "select city_id,city_name from citys"; | |
| $result = $conn->query($sql); | |
| while($row=$result->fetch_assoc()) | |
| { | |
| $city = $city."<option value='".$row['city_id']."'>".$row['city_name']."</option>"; | |
| } | |
| return $city; | |
| } | |
| function streets($conn,$city1) | |
| { | |
| $city = ''; | |
| $sql = "select id,street_name from streets WHERE city_id = $city1 "; | |
| $result = $conn->query($sql); | |
| while($row=$result->fetch_assoc()) | |
| { | |
| $city = $city."<option value='".$row['id']."'>".$row['street_name']."</option>"; | |
| } | |
| return $city; | |
| } | |
| function exist1($conn,$id){ | |
| $sql = "SELECT id,product_name,image FROM products where id=$id"; | |
| $details=$conn->query($sql); | |
| if($details->num_rows>0) | |
| { | |
| return 1; | |
| } | |
| else{ | |
| return 0; | |
| } | |
| } | |
| function login($conn,$username,$password){ | |
| $sql ="SELECT id,username FROM users WHERE username = '$username' AND password = '$password' AND confirm = 1"; | |
| $details=$conn->query($sql); | |
| if($details->num_rows>0) | |
| { | |
| while($row=$details->fetch_assoc()) { | |
| return $row['id']; | |
| } | |
| } | |
| else{ | |
| return 0; | |
| } | |
| } | |
| function username($conn,$id){ | |
| $sql = "SELECT id,username FROM users where id = '$id'"; | |
| $details=$conn->query($sql); | |
| if($details->num_rows>0) | |
| { | |
| while($row=$details->fetch_assoc()) | |
| { | |
| return $row['username']; | |
| } | |
| } | |
| else{ | |
| return 0; | |
| } | |
| } | |
| function updateConfrim($conn,$id){ | |
| $sql = "UPDATE users | |
| SET confirm=1 | |
| WHERE id = '$id' "; | |
| $conn->query($sql); | |
| } | |
| function categorys($conn){ | |
| $product =''; | |
| $sql = "SELECT id,product_type FROM product_type "; | |
| $details=$conn->query($sql); | |
| while($row=$details->fetch_assoc()) | |
| { | |
| $product=$product."<li><a href='control.php?id=".$row['id']."'>".$row['product_type']."</a></li>"; | |
| } | |
| return $product; | |
| } | |
| function categorys12($conn,$id){ | |
| $product =''; | |
| $sql = "SELECT id,product_type FROM product_type where id='$id'"; | |
| $details=$conn->query($sql); | |
| while($row=$details->fetch_assoc()) | |
| { | |
| $product=$product."<input type='text' name='cat' value='".$row['product_type']."'>"; | |
| } | |
| return $product."<input type='submit' name='cat1' value='Change Name'>"; | |
| } | |
| function confirm($conn,$code){ | |
| $sql = "SELECT id FROM users where code ='$code'"; | |
| $details=$conn->query($sql); | |
| if($details->num_rows>0) { | |
| while ($row = $details->fetch_assoc()) { | |
| return $row['id']; | |
| } | |
| } | |
| else{ | |
| return 0; | |
| } | |
| } | |
| function may($conn) | |
| { | |
| $empty = ''; | |
| $sql = "SELECT * FROM products limit 0,2"; | |
| $result = $conn->query($sql); | |
| while ($row = $result->fetch_assoc()) { | |
| $empty = $empty . " <li class=\"product\"> | |
| <a href=single-product.php?id=".$row['id']."> | |
| <img alt=\"T_4_front\" class=\"attachment-shop_catalog wp-post-image\" src='img/".$row['image']."' width=\"325\" height=\"325\"> | |
| <h3>".$row['product_name']."</h3> | |
| <span class=\"price\"><span class=\"amount\">".$row['price'].".00</span></span> | |
| </a> | |
| <a class=\"add_to_cart_button\" data-quantity=\"1\" data-product_sku=\"\" data-product_id=\"22\" rel=\"nofollow\" href=single-product.php?id=".$row['id'].">Learn more</a> | |
| </li>"; | |
| } | |
| return $empty; | |
| } | |
| function recent($conn){ | |
| $empty=''; | |
| $sql = "SELECT * FROM products"; | |
| $result= $conn->query($sql); | |
| $x=$result->num_rows-5; | |
| $sql ="SELECT * FROM products limit $x,$result->num_rows"; | |
| $result= $conn->query($sql); | |
| while($row=$result->fetch_assoc()) { | |
| $price1=$row['price']+5; | |
| $empty = $empty . " <div class=\"thubmnail-recent\"> | |
| <img src='img/".$row['image']."' class=\"recent-thumb\" alt=\"\"> | |
| <h2><a href=single-product.php?id=".$row['id'].">".$row['product_name']."</a></h2> | |
| <div class=\"product-sidebar-price\"> | |
| <ins>$".$row['price'].".00</ins> <del>$$price1.00</del> | |
| </div> | |
| </div>"; | |
| } | |
| return $empty; | |
| } | |
| function toper($conn){ | |
| $empty=''; | |
| $sql = "SELECT * FROM products"; | |
| $result= $conn->query($sql); | |
| $x=$result->num_rows-3; | |
| $sql ="SELECT * FROM products limit $x,$result->num_rows"; | |
| $result= $conn->query($sql); | |
| while($row=$result->fetch_assoc()) { | |
| $price1=$row['price']+5; | |
| $empty = $empty . "<div class=\"single-wid-product\"> | |
| <a href='single-product.php?id=".$row['id']."'><img src='img/".$row['image']."' alt=\"\" class=\"product-thumb\"></a> | |
| <h2><a href='single-product.php?id=".$row['id']."'>".$row['product_name']."</a></h2> | |
| <div class=\"product-wid-rating\"> | |
| <i class=\"fa fa-star\"></i> | |
| <i class=\"fa fa-star\"></i> | |
| <i class=\"fa fa-star\"></i> | |
| <i class=\"fa fa-star\"></i> | |
| <i class=\"fa fa-star\"></i> | |
| </div> | |
| <div class=\"product-wid-price\"> | |
| <ins>$".$row['price'].".00</ins> <del>$".$price1.".00</del> | |
| </div> | |
| </div>"; | |
| } | |
| return $empty; | |
| } | |
| function topSellers($conn) | |
| { | |
| $empty = ''; | |
| $sql = "SELECT item_number, SUM(quantity) AS TotalQuantity | |
| FROM payments | |
| GROUP BY item_number | |
| ORDER BY SUM(quantity) DESC | |
| LIMIT 3"; | |
| $result = $conn->query($sql); | |
| while ($row = $result->fetch_assoc()) { | |
| $item =$row['item_number']; | |
| $sql = "SELECT * FROM products where id= $item "; | |
| $result1=$conn->query($sql); | |
| while($row1=$result1->fetch_assoc()){ | |
| $price1=$row1['price']+5; | |
| $empty = $empty . "<div class=\"single-wid-product\"> | |
| <a href='single-product.php?id=".$row1['id']."'><img src='img/" . $row1['image'] . "' alt=\"\" class=\"product-thumb\"></a> | |
| <h2><a href='single-product.php?id=".$row1['id']."'>" . $row1['product_name'] . "</a></h2> | |
| <div class=\"product-wid-rating\"> | |
| <i class=\"fa fa-star\"></i> | |
| <i class=\"fa fa-star\"></i> | |
| <i class=\"fa fa-star\"></i> | |
| <i class=\"fa fa-star\"></i> | |
| <i class=\"fa fa-star\"></i> | |
| </div> | |
| <div class=\"product-wid-price\"> | |
| <ins>$" . $row1['price'] . ".00</ins> <del>$" . $price1 . ".00</del> | |
| </div> | |
| </div>"; | |
| } | |
| } | |
| return $empty; | |
| } | |
| function categorys1($conn){ | |
| $product =''; | |
| $sql = "SELECT id,product_type FROM product_type where id != 10"; | |
| $details=$conn->query($sql); | |
| while($row=$details->fetch_assoc()) | |
| { | |
| if($row['product_type']=='מכרזים'){ | |
| $product=$product."<li><a href='bids.php'>מכרזים</a></li>"; | |
| } | |
| else { | |
| $product = $product."<li><a href='shop.php?id=1&product=".$row['id']."'>" . $row['product_type'] . "</a></li>"; | |
| } | |
| } | |
| return $product; | |
| } | |
| function icategorys($conn,$name){ | |
| $sql = "insert into product_type(product_type)values('$name')"; | |
| $conn->query($sql); | |
| } | |
| function top($conn) | |
| { | |
| $x1 = 'img'; | |
| $empty = ''; | |
| $sql = "SELECT id,product_name,image,price FROM products limit 0,4"; | |
| $details = $conn->query($sql); | |
| while ($row = $details->fetch_assoc()) { | |
| $price1=$row['price']+5; | |
| $empty = $empty . "<div class='col-md-3 col-sm-6'> | |
| <div class='single-shop-product'> | |
| <div class='product-upper'> | |
| <img src='img/".$row['image']."' style='height:250px;width:250px;border:3px solid grey;border-radius:28px;' alt=''> | |
| </div> | |
| <div class='product-carousel-price'> | |
| </div> | |
| <div class='product-option-shop'> | |
| <form target=\"paypal\" action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\"> | |
| <a href='single-product.php?id=".$row['id']."'class=\"add_to_cart_button\" type=\"submit\">Learn more</a> | |
| </form> | |
| <br> | |
| <br> | |
| <span style='background:whitesmoke;border:0px solid black; font-size:17px;padding:3px;border-radius:28px;'><ins style='color:blue;'>$".$row['price'].".00</ins> <del style='color:black'>$".$price1.".00</del></span> | |
| <div class=\"product-wid-rating\"> | |
| <i class=\"fa fa-star\"></i> | |
| <i class=\"fa fa-star\"></i> | |
| <i class=\"fa fa-star\"></i> | |
| <i class=\"fa fa-star\"></i> | |
| <i class=\"fa fa-star\"></i> | |
| </div> | |
| <h2><a href='single-product.php?id=".$row['id']."'>".$row['product_name']."</a></h2> | |
| </div> | |
| </div> | |
| </div>"; | |
| } | |
| return $empty; | |
| } | |
| function all($conn) | |
| { | |
| $x1 = 'img'; | |
| $empty = ''; | |
| $sql = "SELECT id,product_name,image,price FROM products"; | |
| $details = $conn->query($sql); | |
| while ($row = $details->fetch_assoc()) { | |
| $price1=$row['price']+5; | |
| $empty = $empty . "<div class='col-md-4 col-sm-4'> | |
| <div class='single-shop-product'> | |
| <div class='product-upper'> | |
| <img src='img/".$row['image']."' style='height:250px;width:250px;border:3px solid grey;border-radius:28px;' alt=''> | |
| </div> | |
| <div class='product-carousel-price'> | |
| </div> | |
| <div class='product-option-shop'> | |
| <form target=\"paypal\" action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\"> | |
| <a href='single-product.php?id=".$row['id']."'class=\"add_to_cart_button\" type=\"submit\">Learn more</a> | |
| </form> | |
| <br> | |
| <br> | |
| <span style='background:whitesmoke;border:0px solid black; font-size:17px;padding:3px;border-radius:28px;'><ins style='color:blue;'>$".$row['price']."</ins> <del>$.".$price1."</del></span> | |
| <div class=\"product-wid-rating\"> | |
| <i class=\"fa fa-star\"></i> | |
| <i class=\"fa fa-star\"></i> | |
| <i class=\"fa fa-star\"></i> | |
| <i class=\"fa fa-star\"></i> | |
| <i class=\"fa fa-star\"></i> | |
| </div> | |
| <h2><a href='single-product.php?id=".$row['id']."'>".$row['product_name']."</a></h2> | |
| </div> | |
| </div> | |
| </div>"; | |
| } | |
| return $empty; | |
| } | |
| function selectBid($conn) | |
| { | |
| $empty = ''; | |
| $x1 = 'img'; | |
| $sql = "SELECT products.id,product_name,image,price,desc1 FROM products,product_type WHERE products.product_id = product_type.id and product_type.product_type = 'מכרזים' limit 0,1 "; | |
| $result = $conn->query($sql); | |
| if ($result->num_rows > 0) { | |
| while ($row = $result->fetch_assoc()) { | |
| $empty = $empty . " <form action='' method=\"post\"> | |
| <div class=\"panel panel-default\" style='text-align:center;'> | |
| <div class=\"panel-heading\"> | |
| <h4 style=\"text-align: center\">" . $row['product_name'] . "</h4> | |
| </div> | |
| <div class=\"panel-body\"> | |
| <img height='300' width='300' src='" . $x1 . "/" . $row['image'] . "'> | |
| <br> | |
| <h3>".$row['desc1']."</h3> | |
| </div> | |
| </div> | |
| </form> | |
| "; | |
| } | |
| return $empty; | |
| } | |
| } | |
| function deleteProducts($conn, $id) | |
| { | |
| $sql="select product_name,secimage,timage ,image from products where id = $id"; | |
| $result = $conn->query($sql); | |
| while($row=$result->fetch_assoc()) | |
| { | |
| $empty = $row['image']; | |
| $empty1 = $row['product_name']; | |
| $empty2 = $row['secimage']; | |
| $empty3 = $row['timage']; | |
| } | |
| unlink("img"."/".$empty); | |
| if($empty2!='') { | |
| unlink("img/" . $empty1 . "/" . $empty2); | |
| } | |
| if($empty3!='') { | |
| unlink("img/" . $empty1 . "/" . $empty3); | |
| } | |
| rmdir("img"."/".$empty1); | |
| $sql = "DELETE FROM products where id=$id"; | |
| $conn->query($sql); | |
| } | |
| function deleteCat($conn,$id){ | |
| $sql = "SELECT * FROM products WHERE product_id= $id and product_id!=1"; | |
| $result = $conn->query($sql); | |
| while($row = $result->fetch_assoc()){ | |
| $idq = $row['id']; | |
| $sql="select product_name,secimage,timage ,image from products where id = $idq"; | |
| $result1 = $conn->query($sql); | |
| while($row1=$result1->fetch_assoc()) | |
| { | |
| $empty = $row1['image']; | |
| $empty1 = $row1['product_name']; | |
| $empty2 = $row1['secimage']; | |
| $empty3 = $row1['timage']; | |
| } | |
| unlink("img"."/".$empty); | |
| if($empty2!='') { | |
| unlink("img/" . $empty1 . "/" . $empty2); | |
| } | |
| if($empty3!='') { | |
| unlink("img/" . $empty1 . "/" . $empty3); | |
| } | |
| rmdir("img"."/".$empty1); | |
| $sql = "DELETE FROM products where id=$idq"; | |
| $conn->query($sql); | |
| } | |
| $sql = "DELETE FROM product_type where id=$id and id !=1"; | |
| $conn->query($sql); | |
| } | |
| function upadteProduct($conn, $id, $price) | |
| { | |
| $sql = "UPDATE products | |
| SET price=$price | |
| WHERE id=$id "; | |
| $conn->query($sql); | |
| } | |
| function updateName($conn,$id,$name) | |
| { | |
| $sql = "UPDATE product_type | |
| SET product_type='$name' | |
| WHERE id=$id "; | |
| $conn->query($sql); | |
| } | |
| function upadteProduct1($conn, $id, $name) | |
| { | |
| $name1=''; | |
| $sql = "select product_name,image from products where id = $id"; | |
| $details = $conn->query($sql); | |
| while($row=$details->fetch_assoc()) { | |
| $name2 = $row['image']; | |
| $name1=$row['product_name']; | |
| rename("img/".$name2,"img/".$name.".png"); | |
| rename("img/".$name1,"img/".$name); | |
| } | |
| $name1= $name.".png"; | |
| $sql = "UPDATE products | |
| SET image='$name1' | |
| WHERE id=$id "; | |
| $conn->query($sql); | |
| $sql = "UPDATE products | |
| SET product_name='$name' | |
| WHERE id=$id "; | |
| $conn->query($sql); | |
| $name1= $name.".png"; | |
| $sql = "UPDATE payments | |
| SET image='$name1' | |
| WHERE item_number=$id "; | |
| $conn->query($sql); | |
| $sql = "UPDATE payments | |
| SET item_name='$name' | |
| WHERE item_number=$id "; | |
| $conn->query($sql); | |
| } | |
| function top12($conn, $id) | |
| { | |
| $x1 = 'img'; | |
| $empty = ''; | |
| $sql = "SELECT id,product_name,image,price,quantity1 FROM products where product_id=$id "; | |
| $details = $conn->query($sql); | |
| while ($row = $details->fetch_assoc()) { | |
| $empty = $empty . " <form action='' method=\"post\"> <div class=\"col-md-4\"> | |
| <div class=\"panel panel-default\"> | |
| <div class=\"panel-heading\"> | |
| <h4 style=\"text-align: right\"><input type='text' style='float:left'size=\"5\" name='price' col='10' value=" . $row['price'] . "><input type ='text' name='pname' cols='10' value='" . $row['product_name'] . "'></h4> | |
| </div> | |
| <div class=\"panel-body\"> | |
| <img class=\"img-responsive img-portfolio img-hover\" style='height: 200px; width: 300px;' src='" . $x1 . "/" . $row['image'] . "'> | |
| <input type='hidden' name='id' value=" . $row['id'] . "> | |
| <input type='submit' name='submit1' value='Update Details'> | |
| <input type='submit' name='delete' value='Delete Product'> | |
| </div> | |
| </div> | |
| </div> | |
| </form> | |
| "; | |
| } | |
| return $empty; | |
| } | |
| function lessQuantity($conn, $item_number, $x) | |
| { | |
| $sql = "UPDATE products | |
| SET quantity1=quantity1-$x | |
| WHERE id=$item_number "; | |
| $conn->query($sql); | |
| } | |
| function delete($id, $conn) | |
| { | |
| $sql = "DELETE FROM products WHERE id = $id"; | |
| $conn->query($sql); | |
| } | |
| function selectPhotos($conn) | |
| { | |
| $empty = ''; | |
| $empty = ''; | |
| $sql = "SELECT id,image,price,desc1,quantity,quantity1 FROM products"; | |
| $details = $conn->query($sql); | |
| while ($row = $details->fetch_assoc()) { | |
| $x = 'img/' . $row['image']; | |
| $empty = $empty . " <li> <span style='float: right; font-size: 20px; color:red;'><a class='button1' href='#'>" . $row['quantity'] . "/" . $row['quantity1'] . " כמות </a></span><a href='#slide1'><img src=' img/" . $row['image'] . "'id='img' style=' font-family: 'Varela Round', sans-serif; float : right;' alt=' " . $row['desc1'] . "' height='370px;' </a> <span style='float: left; font-size: 20px; color:black;' dir='rtl'> | |
| <button id='loler1' style='font-size:17px; margin-top:10px;'> " . $row['price'] . " <i class='fa fa-shekel'></i></button></a> | |
| <form action='delev.php' method='post'> | |
| <input type='hidden' name = id value=" . $row['id'] . "> | |
| <input type='hidden' name = 'image' value=" . $row['image'] . " > | |
| <input type='hidden' name = 'desc1' value ='" . $row['desc1'] . "'> | |
| <input type='hidden' name = 'price' value=" . $row['price'] . " > | |
| <input type='hidden' name = 'x' value='" . $x . "'> | |
| <input type='hidden' name='a' value = '1'> | |
| <button type='submit' style=' margin-top:10px; font-size:15px font-family: 'Varela Round', sans-serif;' class='button' href='#'> קנה עכשיו </button></form> | |
| </li>"; | |
| } | |
| return $empty; | |
| } | |
| function selectRegular($conn, $id) | |
| { | |
| $empty = ''; | |
| $sql = "SELECT id,image,price,desc1,quantity,quantity1,product_name FROM products where product_id='$id'"; | |
| $details = $conn->query($sql); | |
| while ($row = $details->fetch_assoc()) { | |
| $x = "img/".$row['image']; | |
| $empty = $empty . " <li> | |
| <center> | |
| <img src =img/".$row['image']." style=\"height:250px;width:250px;margin-top:30px;\" alt=\"\"> | |
| </center> | |
| <div class=\"caption-group\"> | |
| <h2 class=\"caption title\"> | |
| </h2> | |
| <a class=\"caption button-radius\" href=\"#\" style=\"margin-top:170px;\"><span class=\"icon\"></span>Shop now</a> | |
| </div> | |
| </li> "; | |
| } | |
| return $empty; | |
| } | |
| function selectRegular2($conn, $id) | |
| { | |
| $empty = ''; | |
| $sum = 0; | |
| $pic = 0; | |
| $x = 0; | |
| while ($x < 3) { | |
| $x++; | |
| $sql = "SELECT id,image,price,desc1,quantity,quantity1,product_name,secimage,timage FROM products WHERE id=$id "; | |
| $details = $conn->query($sql); | |
| while ($row = $details->fetch_assoc()) { | |
| $sum = $sum + 1; | |
| if ($sum == 1) { | |
| $pic = "<img data-u='image' src='img/" . $row['image'] . "'>"; | |
| $empty = $empty . "<div data-p='112.50'> | |
| .$pic. | |
| <div data-u='thumb' >תמונה מספר $x</div> | |
| </div> "; | |
| } | |
| if ($sum == 2 && $row['secimage'] != '') { | |
| $pic = "<img data-u='image' src='img/" . $row['product_name'] . "/" . $row['secimage'] . "'>"; | |
| $empty = $empty . "<div data-p='112.50'> | |
| .$pic. | |
| <div data-u='thumb' >תמונה מספר $x</div> | |
| </div> "; | |
| } | |
| if ($sum == 3 && $row['timage'] != '') { | |
| $pic = "<img data-u='image' src='img/" . $row['product_name'] . "/" . $row['timage'] . "'>"; | |
| $empty = $empty . "<div data-p='112.50'> | |
| .$pic. | |
| <div data-u='thumb' >תמונה מספר $x</div> | |
| </div> "; | |
| } | |
| } | |
| } | |
| return $empty; | |
| } | |
| function image1($conn, $id) | |
| { | |
| $sql = "SELECT id,image,price,desc1,quantity,quantity1,product_name FROM products where id= $id"; | |
| $details = $conn->query($sql); | |
| while ($row = $details->fetch_assoc()) { | |
| $x = $row['image']; | |
| } | |
| return 'img/' . $x; | |
| } | |
| function desc1($conn, $id) | |
| { | |
| $sql = "SELECT id,image,price,desc1,quantity,quantity1,product_name FROM products where id= $id"; | |
| $details = $conn->query($sql); | |
| while ($row = $details->fetch_assoc()) { | |
| $x = $row['product_name']; | |
| } | |
| return $x; | |
| } | |
| function descer1($conn, $id) | |
| { | |
| $sql = "SELECT id,image,price,desc1,quantity,quantity1 FROM products where id= $id"; | |
| $details = $conn->query($sql); | |
| while ($row = $details->fetch_assoc()) { | |
| $x = $row['desc1']; | |
| } | |
| return $x; | |
| } | |
| function price1($conn, $id) | |
| { | |
| $sql = "SELECT id,image,price,desc1,quantity,quantity1 FROM products where id= $id"; | |
| $details = $conn->query($sql); | |
| while ($row = $details->fetch_assoc()) { | |
| $x = $row['price']; | |
| } | |
| return $x; | |
| } | |
| function q1($conn, $id) | |
| { | |
| $sql = "SELECT id,image,price,desc1,quantity,quantity1 FROM products where id= $id"; | |
| $details = $conn->query($sql); | |
| while ($row = $details->fetch_assoc()) { | |
| $x = $row['quantity1']; | |
| } | |
| return $x; | |
| } | |
| function maxId($conn) | |
| { | |
| $sql = "SELECT * FROM products WHERE id = (SELECT MAX(id) FROM products)"; | |
| $max = $conn->query($sql); | |
| while ($row = $max->fetch_assoc()) { | |
| return $row['id']; | |
| } | |
| } | |
| function updateQuantity($id, $quantity, $conn) | |
| { | |
| $sql = "UPDATE products | |
| SET quantity1=$quantity | |
| WHERE id=$id "; | |
| $conn->query($sql); | |
| } | |
| function updatePrice($id, $price, $conn) | |
| { | |
| $sql = "UPDATE products | |
| SET price=$price | |
| WHERE id=$id "; | |
| $conn->query($sql); | |
| } | |
| function selectItems($conn,$cart) | |
| { | |
| $sum = 0; | |
| $x =''; | |
| $query = "SELECT products.id,product_name,image,price,cart.quantity FROM cart,products where cart.id = '$cart' and cart.product_id = products.id"; | |
| $result = $conn->query($query); | |
| if ($result->num_rows > 0) { | |
| while ($row = $result->fetch_assoc()) { | |
| $x[$sum] = array('id' => $row['id'],'product_name' => $row['product_name'],'quantity' => $row['quantity'],'price' => $row['price']); | |
| $sum++; | |
| } | |
| return $x; | |
| } | |
| } | |
| function createUrl($url){ | |
| $ur = ''; | |
| for($x=0;$x<count($url);$x++){ | |
| $ur =$ur. "&item".$x."=".$url[$x]['id']."&quantity".$x."=".$url[$x]['quantity'].""; | |
| } | |
| return $ur; | |
| } | |
| ?> |
| <?php | |
| $cart = new cart($conn,$_SESSION['cart']); | |
| $cart->view(); | |
| ?> | |
| <!DOCTYPE html> | |
| <!-- | |
| ustora by freshdesignweb.com | |
| Twitter: https://twitter.com/freshdesignweb | |
| URL: https://www.freshdesignweb.com/ustora/ | |
| --> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>JewishStore</title> | |
| <!-- Google Fonts --> | |
| <link href='http://fonts.googleapis.com/css?family=Titillium+Web:400,200,300,700,600' rel='stylesheet' type='text/css'> | |
| <link href='http://fonts.googleapis.com/css?family=Roboto+Condensed:400,700,300' rel='stylesheet' type='text/css'> | |
| <link href='http://fonts.googleapis.com/css?family=Raleway:400,100' rel='stylesheet' type='text/css'> | |
| <!-- Bootstrap --> | |
| <link rel="stylesheet" href="css/bootstrap.min.css"> | |
| <!-- Font Awesome --> | |
| <link rel="stylesheet" href="css/font-awesome.min.css"> | |
| <!-- Custom CSS --> | |
| <link rel="stylesheet" href="css/owl.carousel.css"> | |
| <link rel="stylesheet" href="style.css"> | |
| <link rel="stylesheet" href="css/responsive.css"> | |
| <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> | |
| <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> | |
| <!--[if lt IE 9]> | |
| <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> | |
| <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> | |
| <![endif]--> | |
| <script> | |
| var count = 1; | |
| function plus(p){ | |
| var countEl = document.getElementById(p+'&f'); | |
| count=Number(countEl.value); | |
| count++; | |
| countEl.value = count; | |
| } | |
| function minus(m){ | |
| var countEl = document.getElementById(m+'&f'); | |
| count=Number(countEl.value); | |
| if (count > 1) { | |
| count--; | |
| countEl.value = count; | |
| } | |
| } | |
| </script> | |
| <style> | |
| .wrapper { | |
| margin-top: 80px; | |
| margin-bottom: 80px; | |
| } | |
| .form-signin { | |
| max-width: 380px; | |
| padding: 15px 35px 45px; | |
| margin: 0 auto; | |
| background-color: #fff; | |
| border: 1px solid rgba(0,0,0,0.1); | |
| .form-signin-heading, | |
| .checkbox { | |
| margin-bottom: 30px; | |
| } | |
| .checkbox { | |
| font-weight: normal; | |
| } | |
| .form-control { | |
| position: relative; | |
| font-size: 16px; | |
| height: auto; | |
| padding: 10px; | |
| @include box-sizing(border-box); | |
| &:focus { | |
| z-index: 2; | |
| } | |
| } | |
| input[type="text"] { | |
| margin-bottom: -1px; | |
| border-bottom-left-radius: 0; | |
| border-bottom-right-radius: 0; | |
| } | |
| input[type="password"] { | |
| margin-bottom: 20px; | |
| border-top-left-radius: 0; | |
| border-top-right-radius: 0; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <?php | |
| $cat = categorys1($conn); | |
| if(isset($_SESSION['id'])) { | |
| $usern = username($conn, $_SESSION['id']); | |
| echo "<div class=\"header-area\"> | |
| <div class=\"container\"> | |
| <div class=\"row\"> | |
| <div class=\"col-md-8\"> | |
| <div class=\"user-menu\"> | |
| <ul> | |
| <li><a href=\"\"><i class=\"fa fa-user\"></i> Welcome<span style='color:green'> $usern</span></a></li> | |
| <li><a href=\"logout.php\"><i class=\"fa fa-sign-out\"></i> Sign-Out</a></li> | |
| <li><a href=\"order.php\"><i class=\"fa fa-sign-in\"></i>Orders History</a></li> | |
| <li><a href=\"cart.php\"><i class=\"fa fa-shopping-cart\"></i> My Cart</a></li> | |
| <li><a href=\"checkout.php\"><i class=\"fa fa-credit-card\"></i> Checkout</a></li> | |
| </ul> | |
| </div> | |
| </div> | |
| <div class=\"col-md-4\"> | |
| <div class=\"header-right\"> | |
| <ul class=\"list-unstyled list-inline\"> | |
| <li class=\"dropdown dropdown-small\"> | |
| <a data-toggle=\"dropdown\" data-hover=\"dropdown\" class=\"dropdown-toggle\" href=\"#\"><span class=\"key\">currency :</span><span class=\"value\">USD </span><b class=\"caret\"></b></a> | |
| <ul class=\"dropdown-menu\"> | |
| <li><a href=\"#\">USD</a></li> | |
| <li><a href=\"#\">INR</a></li> | |
| <li><a href=\"#\">GBP</a></li> | |
| </ul> | |
| </li> | |
| <li class=\"dropdown dropdown-small\"> | |
| <a data-toggle=\"dropdown\" data-hover=\"dropdown\" class=\"dropdown-toggle\" href=\"#\"><span class=\"key\">Categories</span><span class=\"value\"> </span><b class=\"caret\"></b></a> | |
| <ul class=\"dropdown-menu\"> | |
| $cat | |
| </ul> | |
| </li> | |
| </ul> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> <!-- End header area --> | |
| <div class=\"site-branding-area\"> | |
| <div class=\"container\"> | |
| <div class=\"row\"> | |
| <div class=\"col-sm-6\"> | |
| <div class=\"logo\"> | |
| <h1 style=\"color: lightblue\">JewishStore</h1> | |
| </div> | |
| </div> | |
| <div class=\"col-sm-6\"> | |
| ".$cart->view()." | |
| </div> | |
| </div> | |
| </div> | |
| </div> <!-- End site branding area --> | |
| <div class=\"mainmenu-area\"> | |
| <div class=\"container\"> | |
| <div class=\"row\"> | |
| <div class=\"navbar-header\"> | |
| <button type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\" data-target=\".navbar-collapse\"> | |
| <span class=\"sr-only\">Toggle navigation</span> | |
| <span class=\"icon-bar\"></span> | |
| <span class=\"icon-bar\"></span> | |
| <span class=\"icon-bar\"></span> | |
| </button> | |
| </div> | |
| <div class=\"navbar-collapse collapse\"> | |
| <ul class=\"nav navbar-nav\"> | |
| <li><a href=\"index.php\">Home</a></li> | |
| <li><a href=\"shop.php\">Shop page</a></li> | |
| <li><a href=\"cart.php\">Cart</a></li> | |
| <li><a href=\"checkout.php\">Checkout</a></li> | |
| <li><a href=\"contact.php\">Contact</a></li> | |
| </ul> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| "; | |
| } | |
| else{ | |
| echo "<div class=\"header-area\"> | |
| <div class=\"container\"> | |
| <div class=\"row\"> | |
| <div class=\"col-md-8\"> | |
| <div class=\"user-menu\"> | |
| <ul> | |
| <li><a href=\"register.php\"><i class=\"fa fa-user\"></i> Register</a></li> | |
| <li><a href=\"cart.php\"><i class=\"fa fa-shopping-cart\"></i> My Cart</a></li> | |
| <li><a href=\"checkout.php\"><i class=\"fa fa-credit-card\"></i> Checkout</a></li> | |
| <li><a href=\"login.php\"><i class=\"fa fa-sign-in\"></i> Login</a></li> | |
| </ul> | |
| </div> | |
| </div> | |
| <div class=\"col-md-4\"> | |
| <div class=\"header-right\"> | |
| <ul class=\"list-unstyled list-inline\"> | |
| <li class=\"dropdown dropdown-small\"> | |
| <a data-toggle=\"dropdown\" data-hover=\"dropdown\" class=\"dropdown-toggle\" href=\"#\"><span class=\"key\">currency :</span><span class=\"value\">USD </span><b class=\"caret\"></b></a> | |
| <ul class=\"dropdown-menu\"> | |
| <li><a href=\"#\">USD</a></li> | |
| <li><a href=\"#\">INR</a></li> | |
| <li><a href=\"#\">GBP</a></li> | |
| </ul> | |
| </li> | |
| <li class=\"dropdown dropdown-small\"> | |
| <a data-toggle=\"dropdown\" data-hover=\"dropdown\" class=\"dropdown-toggle\" href=\"#\"><span class=\"key\">Categories</span><span class=\"value\"> </span><b class=\"caret\"></b></a> | |
| <ul class=\"dropdown-menu\"> | |
| $cat | |
| </ul> | |
| </li> | |
| </ul> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> <!-- End header area --> | |
| <div class=\"site-branding-area\"> | |
| <div class=\"container\"> | |
| <div class=\"row\"> | |
| <div class=\"col-sm-6\"> | |
| <div class=\"logo\"> | |
| <h1 style=\"color: lightblue\">JewishStore</h1> | |
| </div> | |
| </div> | |
| <div class=\"col-sm-6\"> | |
| ".$cart->view()." | |
| </div> | |
| </div> | |
| </div> | |
| </div> <!-- End site branding area --> | |
| <div class=\"mainmenu-area\"> | |
| <div class=\"container\"> | |
| <div class=\"row\"> | |
| <div class=\"navbar-header\"> | |
| <button type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\" data-target=\".navbar-collapse\"> | |
| <span class=\"sr-only\">Toggle navigation</span> | |
| <span class=\"icon-bar\"></span> | |
| <span class=\"icon-bar\"></span> | |
| <span class=\"icon-bar\"></span> | |
| </button> | |
| </div> | |
| <div class=\"navbar-collapse collapse\"> | |
| <ul class=\"nav navbar-nav\"> | |
| <li><a href=\"index.php\">Home</a></li> | |
| <li><a href=\"shop.php\">Shop page</a></li> | |
| <li><a href=\"cart.php\">Cart</a></li> | |
| <li><a href=\"checkout.php\">Checkout</a></li> | |
| <li><a href=\"contact.php\">Contact</a></li> | |
| </ul> | |
| </div> | |
| </div> | |
| </div> | |
| </div>"; | |
| } | |
| ?> | |
| <?php | |
| ini_set('display_errors', 'On'); | |
| error_reporting(E_ALL); | |
| session_start(); | |
| require_once "classes/db.php"; | |
| require_once "classes/uproducts.php"; | |
| require_once "classes/cart.php"; | |
| require_once "classes/pages.php"; | |
| require_once "classes/users.php"; | |
| require_once "classes/mail.php"; | |
| require_once "classes/search.php"; | |
| require_once "functions/query.php"; | |
| if(!isset($_SESSION['cart'])){ | |
| $_SESSION['cart']=hexdec( uniqid() ); | |
| } | |
| ?> |
| <?php | |
| $str='aHR0cHM6LAy93d3cuc2hhYmFrLmvdvi5pbC9jeWJlcnRIY2hub2xvZ3kvUGFnZXMvMDExMTAaMTEtMDExMDEwMDAtMDExMDAwMDEtMDExMDAwMTAtMDExMDAwMDEtMDExMDEwME=tLmFzcHg'; | |
| echo base64_decode($str); | |
| ?> | |
| <?php | |
| require_once "core/load.php"; | |
| ?> | |
| <?php require_once "core/header.php";?> | |
| <div class="slider-area" xmlns="http://www.w3.org/1999/html"> | |
| <!-- Slider --> | |
| <img src="c1.jpg" class="cover" alt="" style="margin-top: 17px;"/> | |
| <!-- ./Slider --> | |
| </div> <!-- End slider area --> | |
| <div class="promo-area"> | |
| <div class="zigzag-bottom"></div> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-md-3 col-sm-6"> | |
| <div class="single-promo promo1"> | |
| <i class="fa fa-refresh"></i> | |
| <p>30 Days return</p> | |
| </div> | |
| </div> | |
| <div class="col-md-3 col-sm-6"> | |
| <div class="single-promo promo2"> | |
| <i class="fa fa-truck"></i> | |
| <p>Free shipping</p> | |
| </div> | |
| </div> | |
| <div class="col-md-3 col-sm-6"> | |
| <div class="single-promo promo3"> | |
| <i class="fa fa-lock"></i> | |
| <p>Secure payments</p> | |
| </div> | |
| </div> | |
| <div class="col-md-3 col-sm-6"> | |
| <div class="single-promo promo4"> | |
| <i class="fa fa-gift"></i> | |
| <p>New products</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- End promo area --> | |
| <br> | |
| <center> | |
| <h2 class="section-title" style="color:black">Best Products</h2> | |
| <div class="single-product-area"> | |
| <div class="zigzag-bottom"></div> | |
| <div class="container"> | |
| <div class="row"> | |
| <?php echo top($conn);?> | |
| </div> | |
| </div> | |
| </div></div> | |
| </center> | |
| <center> | |
| <div class="brands-area" style="margin-bottom: 70px;"> | |
| <div class="zigzag-bottom"></div> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-md-12"> | |
| <div class="brand-wrapper"> | |
| <div class="brand-list"> | |
| <img src="img/IDF-Logo.jpg" style="height:150px;width:150px;" alt=""> | |
| <img src="img/israel.jpg" style="height:150px;width:150px;"alt=""> | |
| <img src="img/bible.jpg" style="height:150px;widhth:150px;" alt=""> | |
| <img src="img/menora.jpg" style="height:150px;widhth:150px;" alt=""> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </center> | |
| <div class="product-widget-area"> | |
| <div class="zigzag-bottom"></div> | |
| <div class="container"> | |
| <div class="col-md-6"> | |
| <div class="single-product-widget"> | |
| <h2 class="product-wid-title">Top Sellers</h2> | |
| <?php echo topSellers($conn);?> | |
| </div> | |
| </div> | |
| <div class="col-md-6"> | |
| <div class="single-product-widget"> | |
| <h2 class="product-wid-title">Top New</h2> | |
| <?php echo toper($conn);?> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <?php require_once "core/footer.php";?> |
| /** | |
| * BxSlider v4.1.2 - Fully loaded, responsive content slider | |
| * http://bxslider.com | |
| * | |
| * Copyright 2014, Steven Wanderski - http://stevenwanderski.com - http://bxcreative.com | |
| * Written while drinking Belgian ales and listening to jazz | |
| * | |
| * Released under the MIT license - http://opensource.org/licenses/MIT | |
| */ | |
| !function(t){var e={},s={mode:"horizontal",slideSelector:"",infiniteLoop:!0,hideControlOnEnd:!1,speed:500,easing:null,slideMargin:0,startSlide:0,randomStart:!1,captions:!1,ticker:!1,tickerHover:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!1,useCSS:!0,preloadImages:"visible",responsive:!0,slideZIndex:50,touchEnabled:!0,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!1,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!0,autoDirection:"next",autoHover:!1,autoDelay:0,minSlides:1,maxSlides:1,moveSlides:0,slideWidth:0,onSliderLoad:function(){},onSlideBefore:function(){},onSlideAfter:function(){},onSlideNext:function(){},onSlidePrev:function(){},onSliderResize:function(){}};t.fn.bxSlider=function(n){if(0==this.length)return this;if(this.length>1)return this.each(function(){t(this).bxSlider(n)}),this;var o={},r=this;e.el=this;var a=t(window).width(),l=t(window).height(),d=function(){o.settings=t.extend({},s,n),o.settings.slideWidth=parseInt(o.settings.slideWidth),o.children=r.children(o.settings.slideSelector),o.children.length<o.settings.minSlides&&(o.settings.minSlides=o.children.length),o.children.length<o.settings.maxSlides&&(o.settings.maxSlides=o.children.length),o.settings.randomStart&&(o.settings.startSlide=Math.floor(Math.random()*o.children.length)),o.active={index:o.settings.startSlide},o.carousel=o.settings.minSlides>1||o.settings.maxSlides>1,o.carousel&&(o.settings.preloadImages="all"),o.minThreshold=o.settings.minSlides*o.settings.slideWidth+(o.settings.minSlides-1)*o.settings.slideMargin,o.maxThreshold=o.settings.maxSlides*o.settings.slideWidth+(o.settings.maxSlides-1)*o.settings.slideMargin,o.working=!1,o.controls={},o.interval=null,o.animProp="vertical"==o.settings.mode?"top":"left",o.usingCSS=o.settings.useCSS&&"fade"!=o.settings.mode&&function(){var t=document.createElement("div"),e=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var i in e)if(void 0!==t.style[e[i]])return o.cssPrefix=e[i].replace("Perspective","").toLowerCase(),o.animProp="-"+o.cssPrefix+"-transform",!0;return!1}(),"vertical"==o.settings.mode&&(o.settings.maxSlides=o.settings.minSlides),r.data("origStyle",r.attr("style")),r.children(o.settings.slideSelector).each(function(){t(this).data("origStyle",t(this).attr("style"))}),c()},c=function(){r.wrap('<div class="bx-wrapper"><div class="bx-viewport"></div></div>'),o.viewport=r.parent(),o.loader=t('<div class="bx-loading" />'),o.viewport.prepend(o.loader),r.css({width:"horizontal"==o.settings.mode?100*o.children.length+215+"%":"auto",position:"relative"}),o.usingCSS&&o.settings.easing?r.css("-"+o.cssPrefix+"-transition-timing-function",o.settings.easing):o.settings.easing||(o.settings.easing="swing"),f(),o.viewport.css({width:"100%",overflow:"hidden",position:"relative"}),o.viewport.parent().css({maxWidth:p()}),o.settings.pager||o.viewport.parent().css({margin:"0 auto 0px"}),o.children.css({"float":"horizontal"==o.settings.mode?"left":"none",listStyle:"none",position:"relative"}),o.children.css("width",u()),"horizontal"==o.settings.mode&&o.settings.slideMargin>0&&o.children.css("marginRight",o.settings.slideMargin),"vertical"==o.settings.mode&&o.settings.slideMargin>0&&o.children.css("marginBottom",o.settings.slideMargin),"fade"==o.settings.mode&&(o.children.css({position:"absolute",zIndex:0,display:"none"}),o.children.eq(o.settings.startSlide).css({zIndex:o.settings.slideZIndex,display:"block"})),o.controls.el=t('<div class="bx-controls" />'),o.settings.captions&&P(),o.active.last=o.settings.startSlide==x()-1,o.settings.video&&r.fitVids();var e=o.children.eq(o.settings.startSlide);"all"==o.settings.preloadImages&&(e=o.children),o.settings.ticker?o.settings.pager=!1:(o.settings.pager&&T(),o.settings.controls&&C(),o.settings.auto&&o.settings.autoControls&&E(),(o.settings.controls||o.settings.autoControls||o.settings.pager)&&o.viewport.after(o.controls.el)),g(e,h)},g=function(e,i){var s=e.find("img, iframe").length;if(0==s)return i(),void 0;var n=0;e.find("img, iframe").each(function(){t(this).one("load",function(){++n==s&&i()}).each(function(){this.complete&&t(this).load()})})},h=function(){if(o.settings.infiniteLoop&&"fade"!=o.settings.mode&&!o.settings.ticker){var e="vertical"==o.settings.mode?o.settings.minSlides:o.settings.maxSlides,i=o.children.slice(0,e).clone().addClass("bx-clone"),s=o.children.slice(-e).clone().addClass("bx-clone");r.append(i).prepend(s)}o.loader.remove(),S(),"vertical"==o.settings.mode&&(o.settings.adaptiveHeight=!0),o.viewport.height(v()),r.redrawSlider(),o.settings.onSliderLoad(o.active.index),o.initialized=!0,o.settings.responsive&&t(window).bind("resize",Z),o.settings.auto&&o.settings.autoStart&&H(),o.settings.ticker&&L(),o.settings.pager&&q(o.settings.startSlide),o.settings.controls&&W(),o.settings.touchEnabled&&!o.settings.ticker&&O()},v=function(){var e=0,s=t();if("vertical"==o.settings.mode||o.settings.adaptiveHeight)if(o.carousel){var n=1==o.settings.moveSlides?o.active.index:o.active.index*m();for(s=o.children.eq(n),i=1;i<=o.settings.maxSlides-1;i++)s=n+i>=o.children.length?s.add(o.children.eq(i-1)):s.add(o.children.eq(n+i))}else s=o.children.eq(o.active.index);else s=o.children;return"vertical"==o.settings.mode?(s.each(function(){e+=t(this).outerHeight()}),o.settings.slideMargin>0&&(e+=o.settings.slideMargin*(o.settings.minSlides-1))):e=Math.max.apply(Math,s.map(function(){return t(this).outerHeight(!1)}).get()),e},p=function(){var t="100%";return o.settings.slideWidth>0&&(t="horizontal"==o.settings.mode?o.settings.maxSlides*o.settings.slideWidth+(o.settings.maxSlides-1)*o.settings.slideMargin:o.settings.slideWidth),t},u=function(){var t=o.settings.slideWidth,e=o.viewport.width();return 0==o.settings.slideWidth||o.settings.slideWidth>e&&!o.carousel||"vertical"==o.settings.mode?t=e:o.settings.maxSlides>1&&"horizontal"==o.settings.mode&&(e>o.maxThreshold||e<o.minThreshold&&(t=(e-o.settings.slideMargin*(o.settings.minSlides-1))/o.settings.minSlides)),t},f=function(){var t=1;if("horizontal"==o.settings.mode&&o.settings.slideWidth>0)if(o.viewport.width()<o.minThreshold)t=o.settings.minSlides;else if(o.viewport.width()>o.maxThreshold)t=o.settings.maxSlides;else{var e=o.children.first().width();t=Math.floor(o.viewport.width()/e)}else"vertical"==o.settings.mode&&(t=o.settings.minSlides);return t},x=function(){var t=0;if(o.settings.moveSlides>0)if(o.settings.infiniteLoop)t=o.children.length/m();else for(var e=0,i=0;e<o.children.length;)++t,e=i+f(),i+=o.settings.moveSlides<=f()?o.settings.moveSlides:f();else t=Math.ceil(o.children.length/f());return t},m=function(){return o.settings.moveSlides>0&&o.settings.moveSlides<=f()?o.settings.moveSlides:f()},S=function(){if(o.children.length>o.settings.maxSlides&&o.active.last&&!o.settings.infiniteLoop){if("horizontal"==o.settings.mode){var t=o.children.last(),e=t.position();b(-(e.left-(o.viewport.width()-t.width())),"reset",0)}else if("vertical"==o.settings.mode){var i=o.children.length-o.settings.minSlides,e=o.children.eq(i).position();b(-e.top,"reset",0)}}else{var e=o.children.eq(o.active.index*m()).position();o.active.index==x()-1&&(o.active.last=!0),void 0!=e&&("horizontal"==o.settings.mode?b(-e.left,"reset",0):"vertical"==o.settings.mode&&b(-e.top,"reset",0))}},b=function(t,e,i,s){if(o.usingCSS){var n="vertical"==o.settings.mode?"translate3d(0, "+t+"px, 0)":"translate3d("+t+"px, 0, 0)";r.css("-"+o.cssPrefix+"-transition-duration",i/1e3+"s"),"slide"==e?(r.css(o.animProp,n),r.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){r.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),D()})):"reset"==e?r.css(o.animProp,n):"ticker"==e&&(r.css("-"+o.cssPrefix+"-transition-timing-function","linear"),r.css(o.animProp,n),r.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){r.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),b(s.resetValue,"reset",0),N()}))}else{var a={};a[o.animProp]=t,"slide"==e?r.animate(a,i,o.settings.easing,function(){D()}):"reset"==e?r.css(o.animProp,t):"ticker"==e&&r.animate(a,speed,"linear",function(){b(s.resetValue,"reset",0),N()})}},w=function(){for(var e="",i=x(),s=0;i>s;s++){var n="";o.settings.buildPager&&t.isFunction(o.settings.buildPager)?(n=o.settings.buildPager(s),o.pagerEl.addClass("bx-custom-pager")):(n=s+1,o.pagerEl.addClass("bx-default-pager")),e+='<div class="bx-pager-item"><a href="" data-slide-index="'+s+'" class="bx-pager-link">'+n+"</a></div>"}o.pagerEl.html(e)},T=function(){o.settings.pagerCustom?o.pagerEl=t(o.settings.pagerCustom):(o.pagerEl=t('<div class="bx-pager" />'),o.settings.pagerSelector?t(o.settings.pagerSelector).html(o.pagerEl):o.controls.el.addClass("bx-has-pager").append(o.pagerEl),w()),o.pagerEl.on("click","a",I)},C=function(){o.controls.next=t('<a class="bx-next" href="">'+o.settings.nextText+"</a>"),o.controls.prev=t('<a class="bx-prev" href="">'+o.settings.prevText+"</a>"),o.controls.next.bind("click",y),o.controls.prev.bind("click",z),o.settings.nextSelector&&t(o.settings.nextSelector).append(o.controls.next),o.settings.prevSelector&&t(o.settings.prevSelector).append(o.controls.prev),o.settings.nextSelector||o.settings.prevSelector||(o.controls.directionEl=t('<div class="bx-controls-direction" />'),o.controls.directionEl.append(o.controls.prev).append(o.controls.next),o.controls.el.addClass("bx-has-controls-direction").append(o.controls.directionEl))},E=function(){o.controls.start=t('<div class="bx-controls-auto-item"><a class="bx-start" href="">'+o.settings.startText+"</a></div>"),o.controls.stop=t('<div class="bx-controls-auto-item"><a class="bx-stop" href="">'+o.settings.stopText+"</a></div>"),o.controls.autoEl=t('<div class="bx-controls-auto" />'),o.controls.autoEl.on("click",".bx-start",k),o.controls.autoEl.on("click",".bx-stop",M),o.settings.autoControlsCombine?o.controls.autoEl.append(o.controls.start):o.controls.autoEl.append(o.controls.start).append(o.controls.stop),o.settings.autoControlsSelector?t(o.settings.autoControlsSelector).html(o.controls.autoEl):o.controls.el.addClass("bx-has-controls-auto").append(o.controls.autoEl),A(o.settings.autoStart?"stop":"start")},P=function(){o.children.each(function(){var e=t(this).find("img:first").attr("title");void 0!=e&&(""+e).length&&t(this).append('<div class="bx-caption"><span>'+e+"</span></div>")})},y=function(t){o.settings.auto&&r.stopAuto(),r.goToNextSlide(),t.preventDefault()},z=function(t){o.settings.auto&&r.stopAuto(),r.goToPrevSlide(),t.preventDefault()},k=function(t){r.startAuto(),t.preventDefault()},M=function(t){r.stopAuto(),t.preventDefault()},I=function(e){o.settings.auto&&r.stopAuto();var i=t(e.currentTarget),s=parseInt(i.attr("data-slide-index"));s!=o.active.index&&r.goToSlide(s),e.preventDefault()},q=function(e){var i=o.children.length;return"short"==o.settings.pagerType?(o.settings.maxSlides>1&&(i=Math.ceil(o.children.length/o.settings.maxSlides)),o.pagerEl.html(e+1+o.settings.pagerShortSeparator+i),void 0):(o.pagerEl.find("a").removeClass("active"),o.pagerEl.each(function(i,s){t(s).find("a").eq(e).addClass("active")}),void 0)},D=function(){if(o.settings.infiniteLoop){var t="";0==o.active.index?t=o.children.eq(0).position():o.active.index==x()-1&&o.carousel?t=o.children.eq((x()-1)*m()).position():o.active.index==o.children.length-1&&(t=o.children.eq(o.children.length-1).position()),t&&("horizontal"==o.settings.mode?b(-t.left,"reset",0):"vertical"==o.settings.mode&&b(-t.top,"reset",0))}o.working=!1,o.settings.onSlideAfter(o.children.eq(o.active.index),o.oldIndex,o.active.index)},A=function(t){o.settings.autoControlsCombine?o.controls.autoEl.html(o.controls[t]):(o.controls.autoEl.find("a").removeClass("active"),o.controls.autoEl.find("a:not(.bx-"+t+")").addClass("active"))},W=function(){1==x()?(o.controls.prev.addClass("disabled"),o.controls.next.addClass("disabled")):!o.settings.infiniteLoop&&o.settings.hideControlOnEnd&&(0==o.active.index?(o.controls.prev.addClass("disabled"),o.controls.next.removeClass("disabled")):o.active.index==x()-1?(o.controls.next.addClass("disabled"),o.controls.prev.removeClass("disabled")):(o.controls.prev.removeClass("disabled"),o.controls.next.removeClass("disabled")))},H=function(){o.settings.autoDelay>0?setTimeout(r.startAuto,o.settings.autoDelay):r.startAuto(),o.settings.autoHover&&r.hover(function(){o.interval&&(r.stopAuto(!0),o.autoPaused=!0)},function(){o.autoPaused&&(r.startAuto(!0),o.autoPaused=null)})},L=function(){var e=0;if("next"==o.settings.autoDirection)r.append(o.children.clone().addClass("bx-clone"));else{r.prepend(o.children.clone().addClass("bx-clone"));var i=o.children.first().position();e="horizontal"==o.settings.mode?-i.left:-i.top}b(e,"reset",0),o.settings.pager=!1,o.settings.controls=!1,o.settings.autoControls=!1,o.settings.tickerHover&&!o.usingCSS&&o.viewport.hover(function(){r.stop()},function(){var e=0;o.children.each(function(){e+="horizontal"==o.settings.mode?t(this).outerWidth(!0):t(this).outerHeight(!0)});var i=o.settings.speed/e,s="horizontal"==o.settings.mode?"left":"top",n=i*(e-Math.abs(parseInt(r.css(s))));N(n)}),N()},N=function(t){speed=t?t:o.settings.speed;var e={left:0,top:0},i={left:0,top:0};"next"==o.settings.autoDirection?e=r.find(".bx-clone").first().position():i=o.children.first().position();var s="horizontal"==o.settings.mode?-e.left:-e.top,n="horizontal"==o.settings.mode?-i.left:-i.top,a={resetValue:n};b(s,"ticker",speed,a)},O=function(){o.touch={start:{x:0,y:0},end:{x:0,y:0}},o.viewport.bind("touchstart",X)},X=function(t){if(o.working)t.preventDefault();else{o.touch.originalPos=r.position();var e=t.originalEvent;o.touch.start.x=e.changedTouches[0].pageX,o.touch.start.y=e.changedTouches[0].pageY,o.viewport.bind("touchmove",Y),o.viewport.bind("touchend",V)}},Y=function(t){var e=t.originalEvent,i=Math.abs(e.changedTouches[0].pageX-o.touch.start.x),s=Math.abs(e.changedTouches[0].pageY-o.touch.start.y);if(3*i>s&&o.settings.preventDefaultSwipeX?t.preventDefault():3*s>i&&o.settings.preventDefaultSwipeY&&t.preventDefault(),"fade"!=o.settings.mode&&o.settings.oneToOneTouch){var n=0;if("horizontal"==o.settings.mode){var r=e.changedTouches[0].pageX-o.touch.start.x;n=o.touch.originalPos.left+r}else{var r=e.changedTouches[0].pageY-o.touch.start.y;n=o.touch.originalPos.top+r}b(n,"reset",0)}},V=function(t){o.viewport.unbind("touchmove",Y);var e=t.originalEvent,i=0;if(o.touch.end.x=e.changedTouches[0].pageX,o.touch.end.y=e.changedTouches[0].pageY,"fade"==o.settings.mode){var s=Math.abs(o.touch.start.x-o.touch.end.x);s>=o.settings.swipeThreshold&&(o.touch.start.x>o.touch.end.x?r.goToNextSlide():r.goToPrevSlide(),r.stopAuto())}else{var s=0;"horizontal"==o.settings.mode?(s=o.touch.end.x-o.touch.start.x,i=o.touch.originalPos.left):(s=o.touch.end.y-o.touch.start.y,i=o.touch.originalPos.top),!o.settings.infiniteLoop&&(0==o.active.index&&s>0||o.active.last&&0>s)?b(i,"reset",200):Math.abs(s)>=o.settings.swipeThreshold?(0>s?r.goToNextSlide():r.goToPrevSlide(),r.stopAuto()):b(i,"reset",200)}o.viewport.unbind("touchend",V)},Z=function(){var e=t(window).width(),i=t(window).height();(a!=e||l!=i)&&(a=e,l=i,r.redrawSlider(),o.settings.onSliderResize.call(r,o.active.index))};return r.goToSlide=function(e,i){if(!o.working&&o.active.index!=e)if(o.working=!0,o.oldIndex=o.active.index,o.active.index=0>e?x()-1:e>=x()?0:e,o.settings.onSlideBefore(o.children.eq(o.active.index),o.oldIndex,o.active.index),"next"==i?o.settings.onSlideNext(o.children.eq(o.active.index),o.oldIndex,o.active.index):"prev"==i&&o.settings.onSlidePrev(o.children.eq(o.active.index),o.oldIndex,o.active.index),o.active.last=o.active.index>=x()-1,o.settings.pager&&q(o.active.index),o.settings.controls&&W(),"fade"==o.settings.mode)o.settings.adaptiveHeight&&o.viewport.height()!=v()&&o.viewport.animate({height:v()},o.settings.adaptiveHeightSpeed),o.children.filter(":visible").fadeOut(o.settings.speed).css({zIndex:0}),o.children.eq(o.active.index).css("zIndex",o.settings.slideZIndex+1).fadeIn(o.settings.speed,function(){t(this).css("zIndex",o.settings.slideZIndex),D()});else{o.settings.adaptiveHeight&&o.viewport.height()!=v()&&o.viewport.animate({height:v()},o.settings.adaptiveHeightSpeed);var s=0,n={left:0,top:0};if(!o.settings.infiniteLoop&&o.carousel&&o.active.last)if("horizontal"==o.settings.mode){var a=o.children.eq(o.children.length-1);n=a.position(),s=o.viewport.width()-a.outerWidth()}else{var l=o.children.length-o.settings.minSlides;n=o.children.eq(l).position()}else if(o.carousel&&o.active.last&&"prev"==i){var d=1==o.settings.moveSlides?o.settings.maxSlides-m():(x()-1)*m()-(o.children.length-o.settings.maxSlides),a=r.children(".bx-clone").eq(d);n=a.position()}else if("next"==i&&0==o.active.index)n=r.find("> .bx-clone").eq(o.settings.maxSlides).position(),o.active.last=!1;else if(e>=0){var c=e*m();n=o.children.eq(c).position()}if("undefined"!=typeof n){var g="horizontal"==o.settings.mode?-(n.left-s):-n.top;b(g,"slide",o.settings.speed)}}},r.goToNextSlide=function(){if(o.settings.infiniteLoop||!o.active.last){var t=parseInt(o.active.index)+1;r.goToSlide(t,"next")}},r.goToPrevSlide=function(){if(o.settings.infiniteLoop||0!=o.active.index){var t=parseInt(o.active.index)-1;r.goToSlide(t,"prev")}},r.startAuto=function(t){o.interval||(o.interval=setInterval(function(){"next"==o.settings.autoDirection?r.goToNextSlide():r.goToPrevSlide()},o.settings.pause),o.settings.autoControls&&1!=t&&A("stop"))},r.stopAuto=function(t){o.interval&&(clearInterval(o.interval),o.interval=null,o.settings.autoControls&&1!=t&&A("start"))},r.getCurrentSlide=function(){return o.active.index},r.getCurrentSlideElement=function(){return o.children.eq(o.active.index)},r.getSlideCount=function(){return o.children.length},r.redrawSlider=function(){o.children.add(r.find(".bx-clone")).outerWidth(u()),o.viewport.css("height",v()),o.settings.ticker||S(),o.active.last&&(o.active.index=x()-1),o.active.index>=x()&&(o.active.last=!0),o.settings.pager&&!o.settings.pagerCustom&&(w(),q(o.active.index))},r.destroySlider=function(){o.initialized&&(o.initialized=!1,t(".bx-clone",this).remove(),o.children.each(function(){void 0!=t(this).data("origStyle")?t(this).attr("style",t(this).data("origStyle")):t(this).removeAttr("style")}),void 0!=t(this).data("origStyle")?this.attr("style",t(this).data("origStyle")):t(this).removeAttr("style"),t(this).unwrap().unwrap(),o.controls.el&&o.controls.el.remove(),o.controls.next&&o.controls.next.remove(),o.controls.prev&&o.controls.prev.remove(),o.pagerEl&&o.settings.controls&&o.pagerEl.remove(),t(".bx-caption",this).remove(),o.controls.autoEl&&o.controls.autoEl.remove(),clearInterval(o.interval),o.settings.responsive&&t(window).unbind("resize",Z))},r.reloadSlider=function(t){void 0!=t&&(n=t),r.destroySlider(),d()},d(),this}}(jQuery); |
| /* | |
| * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ | |
| * | |
| * Uses the built in easing capabilities added In jQuery 1.1 | |
| * to offer multiple easing options | |
| * | |
| * TERMS OF USE - jQuery Easing | |
| * | |
| * Open source under the BSD License. | |
| * | |
| * Copyright © 2008 George McGinley Smith | |
| * All rights reserved. | |
| * | |
| * Redistribution and use in source and binary forms, with or without modification, | |
| * are permitted provided that the following conditions are met: | |
| * | |
| * Redistributions of source code must retain the above copyright notice, this list of | |
| * conditions and the following disclaimer. | |
| * Redistributions in binary form must reproduce the above copyright notice, this list | |
| * of conditions and the following disclaimer in the documentation and/or other materials | |
| * provided with the distribution. | |
| * | |
| * Neither the name of the author nor the names of contributors may be used to endorse | |
| * or promote products derived from this software without specific prior written permission. | |
| * | |
| * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY | |
| * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
| * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | |
| * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | |
| * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | |
| * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | |
| * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | |
| * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | |
| * OF THE POSSIBILITY OF SUCH DAMAGE. | |
| * | |
| */ | |
| jQuery.easing["jswing"]=jQuery.easing["swing"];jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,b,c,d,e){return jQuery.easing[jQuery.easing.def](a,b,c,d,e)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b+c;return-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b+c;return d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b*b+c;return-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b*b*b+c;return d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return b==0?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){if(b==0)return c;if(b==e)return c+d;if((b/=e/2)<1)return d/2*Math.pow(2,10*(b-1))+c;return d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){if((b/=e/2)<1)return-d/2*(Math.sqrt(1-b*b)-1)+c;return d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158;var g=0;var h=d;if(b==0)return c;if((b/=e)==1)return c+d;if(!g)g=e*.3;if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g))+c},easeOutElastic:function(a,b,c,d,e){var f=1.70158;var g=0;var h=d;if(b==0)return c;if((b/=e)==1)return c+d;if(!g)g=e*.3;if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*b)*Math.sin((b*e-f)*2*Math.PI/g)+d+c},easeInOutElastic:function(a,b,c,d,e){var f=1.70158;var g=0;var h=d;if(b==0)return c;if((b/=e/2)==2)return c+d;if(!g)g=e*.3*1.5;if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);if(b<1)return-.5*h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)+c;return h*Math.pow(2,-10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)*.5+d+c},easeInBack:function(a,b,c,d,e,f){if(f==undefined)f=1.70158;return d*(b/=e)*b*((f+1)*b-f)+c},easeOutBack:function(a,b,c,d,e,f){if(f==undefined)f=1.70158;return d*((b=b/e-1)*b*((f+1)*b+f)+1)+c},easeInOutBack:function(a,b,c,d,e,f){if(f==undefined)f=1.70158;if((b/=e/2)<1)return d/2*b*b*(((f*=1.525)+1)*b-f)+c;return d/2*((b-=2)*b*(((f*=1.525)+1)*b+f)+2)+c},easeInBounce:function(a,b,c,d,e){return d-jQuery.easing.easeOutBounce(a,e-b,0,d,e)+c},easeOutBounce:function(a,b,c,d,e){if((b/=e)<1/2.75){return d*7.5625*b*b+c}else if(b<2/2.75){return d*(7.5625*(b-=1.5/2.75)*b+.75)+c}else if(b<2.5/2.75){return d*(7.5625*(b-=2.25/2.75)*b+.9375)+c}else{return d*(7.5625*(b-=2.625/2.75)*b+.984375)+c}},easeInOutBounce:function(a,b,c,d,e){if(b<e/2)return jQuery.easing.easeInBounce(a,b*2,0,d,e)*.5+c;return jQuery.easing.easeOutBounce(a,b*2-e,0,d,e)*.5+d*.5+c}}) | |
| /* | |
| * | |
| * TERMS OF USE - EASING EQUATIONS | |
| * | |
| * Open source under the BSD License. | |
| * | |
| * Copyright © 2001 Robert Penner | |
| * All rights reserved. | |
| * | |
| * Redistribution and use in source and binary forms, with or without modification, | |
| * are permitted provided that the following conditions are met: | |
| * | |
| * Redistributions of source code must retain the above copyright notice, this list of | |
| * conditions and the following disclaimer. | |
| * Redistributions in binary form must reproduce the above copyright notice, this list | |
| * of conditions and the following disclaimer in the documentation and/or other materials | |
| * provided with the distribution. | |
| * | |
| * Neither the name of the author nor the names of contributors may be used to endorse | |
| * or promote products derived from this software without specific prior written permission. | |
| * | |
| * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY | |
| * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
| * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | |
| * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | |
| * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | |
| * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | |
| * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | |
| * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | |
| * OF THE POSSIBILITY OF SUCH DAMAGE. | |
| * | |
| */ |
| // Sticky Plugin v1.0.0 for jQuery | |
| // ============= | |
| // Author: Anthony Garand | |
| // Improvements by German M. Bravo (Kronuz) and Ruud Kamphuis (ruudk) | |
| // Improvements by Leonardo C. Daronco (daronco) | |
| // Created: 2/14/2011 | |
| // Date: 2/12/2012 | |
| // Website: http://labs.anthonygarand.com/sticky | |
| // Description: Makes an element on the page stick on the screen as you scroll | |
| // It will only set the 'top' and 'position' of your element, you | |
| // might need to adjust the width in some cases. | |
| (function($) { | |
| var defaults = { | |
| topSpacing: 0, | |
| bottomSpacing: 0, | |
| className: 'is-sticky', | |
| wrapperClassName: 'sticky-wrapper', | |
| center: false, | |
| getWidthFrom: '', | |
| responsiveWidth: false | |
| }, | |
| $window = $(window), | |
| $document = $(document), | |
| sticked = [], | |
| windowHeight = $window.height(), | |
| scroller = function() { | |
| var scrollTop = $window.scrollTop(), | |
| documentHeight = $document.height(), | |
| dwh = documentHeight - windowHeight, | |
| extra = (scrollTop > dwh) ? dwh - scrollTop : 0; | |
| for (var i = 0; i < sticked.length; i++) { | |
| var s = sticked[i], | |
| elementTop = s.stickyWrapper.offset().top, | |
| etse = elementTop - s.topSpacing - extra; | |
| if (scrollTop <= etse) { | |
| if (s.currentTop !== null) { | |
| s.stickyElement | |
| .css('position', '') | |
| .css('top', ''); | |
| s.stickyElement.trigger('sticky-end', [s]).parent().removeClass(s.className); | |
| s.currentTop = null; | |
| } | |
| } | |
| else { | |
| var newTop = documentHeight - s.stickyElement.outerHeight() | |
| - s.topSpacing - s.bottomSpacing - scrollTop - extra; | |
| if (newTop < 0) { | |
| newTop = newTop + s.topSpacing; | |
| } else { | |
| newTop = s.topSpacing; | |
| } | |
| if (s.currentTop != newTop) { | |
| s.stickyElement | |
| .css('position', 'fixed') | |
| .css('top', newTop); | |
| if (typeof s.getWidthFrom !== 'undefined') { | |
| s.stickyElement.css('width', $(s.getWidthFrom).width()); | |
| } | |
| s.stickyElement.trigger('sticky-start', [s]).parent().addClass(s.className); | |
| s.currentTop = newTop; | |
| } | |
| } | |
| } | |
| }, | |
| resizer = function() { | |
| windowHeight = $window.height(); | |
| for (var i = 0; i < sticked.length; i++) { | |
| var s = sticked[i]; | |
| if (typeof s.getWidthFrom !== 'undefined' && s.responsiveWidth === true) { | |
| s.stickyElement.css('width', $(s.getWidthFrom).width()); | |
| } | |
| } | |
| }, | |
| methods = { | |
| init: function(options) { | |
| var o = $.extend({}, defaults, options); | |
| return this.each(function() { | |
| var stickyElement = $(this); | |
| var stickyId = stickyElement.attr('id'); | |
| var wrapperId = stickyId ? stickyId + '-' + defaults.wrapperClassName : defaults.wrapperClassName | |
| var wrapper = $('<div></div>') | |
| .attr('id', stickyId + '-sticky-wrapper') | |
| .addClass(o.wrapperClassName); | |
| stickyElement.wrapAll(wrapper); | |
| if (o.center) { | |
| stickyElement.parent().css({width:stickyElement.outerWidth(),marginLeft:"auto",marginRight:"auto"}); | |
| } | |
| if (stickyElement.css("float") == "right") { | |
| stickyElement.css({"float":"none"}).parent().css({"float":"right"}); | |
| } | |
| var stickyWrapper = stickyElement.parent(); | |
| stickyWrapper.css('height', stickyElement.outerHeight()); | |
| sticked.push({ | |
| topSpacing: o.topSpacing, | |
| bottomSpacing: o.bottomSpacing, | |
| stickyElement: stickyElement, | |
| currentTop: null, | |
| stickyWrapper: stickyWrapper, | |
| className: o.className, | |
| getWidthFrom: o.getWidthFrom, | |
| responsiveWidth: o.responsiveWidth | |
| }); | |
| }); | |
| }, | |
| update: scroller, | |
| unstick: function(options) { | |
| return this.each(function() { | |
| var unstickyElement = $(this); | |
| var removeIdx = -1; | |
| for (var i = 0; i < sticked.length; i++) | |
| { | |
| if (sticked[i].stickyElement.get(0) == unstickyElement.get(0)) | |
| { | |
| removeIdx = i; | |
| } | |
| } | |
| if(removeIdx != -1) | |
| { | |
| sticked.splice(removeIdx,1); | |
| unstickyElement.unwrap(); | |
| unstickyElement.removeAttr('style'); | |
| } | |
| }); | |
| } | |
| }; | |
| // should be more efficient than using $window.scroll(scroller) and $window.resize(resizer): | |
| if (window.addEventListener) { | |
| window.addEventListener('scroll', scroller, false); | |
| window.addEventListener('resize', resizer, false); | |
| } else if (window.attachEvent) { | |
| window.attachEvent('onscroll', scroller); | |
| window.attachEvent('onresize', resizer); | |
| } | |
| $.fn.sticky = function(method) { | |
| if (methods[method]) { | |
| return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); | |
| } else if (typeof method === 'object' || !method ) { | |
| return methods.init.apply( this, arguments ); | |
| } else { | |
| $.error('Method ' + method + ' does not exist on jQuery.sticky'); | |
| } | |
| }; | |
| $.fn.unstick = function(method) { | |
| if (methods[method]) { | |
| return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); | |
| } else if (typeof method === 'object' || !method ) { | |
| return methods.unstick.apply( this, arguments ); | |
| } else { | |
| $.error('Method ' + method + ' does not exist on jQuery.sticky'); | |
| } | |
| }; | |
| $(function() { | |
| setTimeout(scroller, 0); | |
| }); | |
| })(jQuery); |
| jQuery(document).ready(function($){ | |
| // jQuery sticky Menu | |
| $(".mainmenu-area").sticky({topSpacing:0}); | |
| $('.product-carousel').owlCarousel({ | |
| loop:true, | |
| nav:true, | |
| margin:20, | |
| responsiveClass:true, | |
| responsive:{ | |
| 0:{ | |
| items:1, | |
| }, | |
| 600:{ | |
| items:3, | |
| }, | |
| 1000:{ | |
| items:5, | |
| } | |
| } | |
| }); | |
| $('.related-products-carousel').owlCarousel({ | |
| loop:true, | |
| nav:true, | |
| margin:20, | |
| responsiveClass:true, | |
| responsive:{ | |
| 0:{ | |
| items:1, | |
| }, | |
| 600:{ | |
| items:2, | |
| }, | |
| 1000:{ | |
| items:2, | |
| }, | |
| 1200:{ | |
| items:3, | |
| } | |
| } | |
| }); | |
| $('.brand-list').owlCarousel({ | |
| loop:true, | |
| nav:true, | |
| margin:20, | |
| responsiveClass:true, | |
| responsive:{ | |
| 0:{ | |
| items:1, | |
| }, | |
| 600:{ | |
| items:3, | |
| }, | |
| 1000:{ | |
| items:4, | |
| } | |
| } | |
| }); | |
| // Bootstrap Mobile Menu fix | |
| $(".navbar-nav li a").click(function(){ | |
| $(".navbar-collapse").removeClass('in'); | |
| }); | |
| // jQuery Scroll effect | |
| $('.navbar-nav li a, .scroll-to-up').bind('click', function(event) { | |
| var $anchor = $(this); | |
| var headerH = $('.header-area').outerHeight(); | |
| $('html, body').stop().animate({ | |
| scrollTop : $($anchor.attr('href')).offset().top - headerH + "px" | |
| }, 1200, 'easeInOutExpo'); | |
| event.preventDefault(); | |
| }); | |
| // Bootstrap ScrollPSY | |
| $('body').scrollspy({ | |
| target: '.navbar-collapse', | |
| offset: 95 | |
| }) | |
| }); | |
| (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
| (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
| m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
| })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); | |
| ga('create', 'UA-10146041-21', 'auto'); | |
| ga('send', 'pageview'); |
| !function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this.drag=a.extend({},m),this.state=a.extend({},n),this.e=a.extend({},o),this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._invalidated={},this._pipe=[],a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a[0].toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Pipe,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}function f(a){if(a.touches!==d)return{x:a.touches[0].pageX,y:a.touches[0].pageY};if(a.touches===d){if(a.pageX!==d)return{x:a.pageX,y:a.pageY};if(a.pageX===d)return{x:a.clientX,y:a.clientY}}}function g(a){var b,d,e=c.createElement("div"),f=a;for(b in f)if(d=f[b],"undefined"!=typeof e.style[d])return e=null,[d,b];return[!1]}function h(){return g(["transition","WebkitTransition","MozTransition","OTransition"])[1]}function i(){return g(["transform","WebkitTransform","MozTransform","OTransform","msTransform"])[0]}function j(){return g(["perspective","webkitPerspective","MozPerspective","OPerspective","MsPerspective"])[0]}function k(){return"ontouchstart"in b||!!navigator.msMaxTouchPoints}function l(){return b.navigator.msPointerEnabled}var m,n,o;m={start:0,startX:0,startY:0,current:0,currentX:0,currentY:0,offsetX:0,offsetY:0,distance:null,startTime:0,endTime:0,updatedX:0,targetEl:null},n={isTouch:!1,isScrolling:!1,isSwiping:!1,direction:!1,inMotion:!1},o={_onDragStart:null,_onDragMove:null,_onDragEnd:null,_transitionEnd:null,_resizer:null,_responsiveCall:null,_goToLoop:null,_checkVisibile:null},e.Defaults={items:3,loop:!1,center:!1,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,responsiveClass:!1,fallbackEasing:"swing",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",themeClass:"owl-theme",baseClass:"owl-carousel",itemClass:"owl-item",centerClass:"center",activeClass:"active"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Plugins={},e.Pipe=[{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){var a=this._clones,b=this.$stage.children(".cloned");(b.length!==a.length||!this.settings.loop&&a.length>0)&&(this.$stage.children(".cloned").remove(),this._clones=[])}},{filter:["items","settings"],run:function(){var a,b,c=this._clones,d=this._items,e=this.settings.loop?c.length-Math.max(2*this.settings.items,4):0;for(a=0,b=Math.abs(e/2);b>a;a++)e>0?(this.$stage.children().eq(d.length+c.length-1).remove(),c.pop(),this.$stage.children().eq(0).remove(),c.pop()):(c.push(c.length/2),this.$stage.append(d[c[c.length-1]].clone().addClass("cloned")),c.push(d.length-1-(c.length-1)/2),this.$stage.prepend(d[c[c.length-1]].clone().addClass("cloned")))}},{filter:["width","items","settings"],run:function(){var a,b,c,d=this.settings.rtl?1:-1,e=(this.width()/this.settings.items).toFixed(3),f=0;for(this._coordinates=[],b=0,c=this._clones.length+this._items.length;c>b;b++)a=this._mergers[this.relative(b)],a=this.settings.mergeFit&&Math.min(a,this.settings.items)||a,f+=(this.settings.autoWidth?this._items[this.relative(b)].width()+this.settings.margin:e*a)*d,this._coordinates.push(f)}},{filter:["width","items","settings"],run:function(){var b,c,d=(this.width()/this.settings.items).toFixed(3),e={width:Math.abs(this._coordinates[this._coordinates.length-1])+2*this.settings.stagePadding,"padding-left":this.settings.stagePadding||"","padding-right":this.settings.stagePadding||""};if(this.$stage.css(e),e={width:this.settings.autoWidth?"auto":d-this.settings.margin},e[this.settings.rtl?"margin-left":"margin-right"]=this.settings.margin,!this.settings.autoWidth&&a.grep(this._mergers,function(a){return a>1}).length>0)for(b=0,c=this._coordinates.length;c>b;b++)e.width=Math.abs(this._coordinates[b])-Math.abs(this._coordinates[b-1]||0)-this.settings.margin,this.$stage.children().eq(b).css(e);else this.$stage.children().css(e)}},{filter:["width","items","settings"],run:function(a){a.current&&this.reset(this.$stage.children().index(a.current))}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;d>c;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children("."+this.settings.activeClass).removeClass(this.settings.activeClass),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass(this.settings.activeClass),this.settings.center&&(this.$stage.children("."+this.settings.centerClass).removeClass(this.settings.centerClass),this.$stage.children().eq(this.current()).addClass(this.settings.centerClass))}}],e.prototype.initialize=function(){if(this.trigger("initialize"),this.$element.addClass(this.settings.baseClass).addClass(this.settings.themeClass).toggleClass("owl-rtl",this.settings.rtl),this.browserSupport(),this.settings.autoWidth&&this.state.imagesLoaded!==!0){var b,c,e;if(b=this.$element.find("img"),c=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,e=this.$element.children(c).width(),b.length&&0>=e)return this.preloadAutoWidthImages(b),!1}this.$element.addClass("owl-loading"),this.$stage=a("<"+this.settings.stageElement+' class="owl-stage"/>').wrap('<div class="owl-stage-outer">'),this.$element.append(this.$stage.parent()),this.replace(this.$element.children().not(this.$stage.parent())),this._width=this.$element.width(),this.refresh(),this.$element.removeClass("owl-loading").addClass("owl-loaded"),this.eventsCall(),this.internalEvents(),this.addTriggerableEvents(),this.trigger("initialized")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){b>=a&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),delete e.responsive,e.responsiveClass&&this.$element.attr("class",function(a,b){return b.replace(/\b owl-responsive-\S+/g,"")}).addClass("owl-responsive-"+d)):e=a.extend({},this.options),(null===this.settings||this._breakpoint!==d)&&(this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}}))},e.prototype.optionsLogic=function(){this.$element.toggleClass("owl-center",this.settings.center),this.settings.loop&&this._items.length<this.settings.items&&(this.settings.loop=!1),this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.settings.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};c>b;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={}},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){if(0===this._items.length)return!1;(new Date).getTime();this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$stage.addClass("owl-refresh"),this.update(),this.$stage.removeClass("owl-refresh"),this.state.orientation=b.orientation,this.watchVisibility(),this.trigger("refreshed")},e.prototype.eventsCall=function(){this.e._onDragStart=a.proxy(function(a){this.onDragStart(a)},this),this.e._onDragMove=a.proxy(function(a){this.onDragMove(a)},this),this.e._onDragEnd=a.proxy(function(a){this.onDragEnd(a)},this),this.e._onResize=a.proxy(function(a){this.onResize(a)},this),this.e._transitionEnd=a.proxy(function(a){this.transitionEnd(a)},this),this.e._preventClick=a.proxy(function(a){this.preventClick(a)},this)},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this.e._onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return this._items.length?this._width===this.$element.width()?!1:this.trigger("resize").isDefaultPrevented()?!1:(this._width=this.$element.width(),this.invalidate("width"),this.refresh(),void this.trigger("resized")):!1},e.prototype.eventsRouter=function(a){var b=a.type;"mousedown"===b||"touchstart"===b?this.onDragStart(a):"mousemove"===b||"touchmove"===b?this.onDragMove(a):"mouseup"===b||"touchend"===b?this.onDragEnd(a):"touchcancel"===b&&this.onDragEnd(a)},e.prototype.internalEvents=function(){var c=(k(),l());this.settings.mouseDrag?(this.$stage.on("mousedown",a.proxy(function(a){this.eventsRouter(a)},this)),this.$stage.on("dragstart",function(){return!1}),this.$stage.get(0).onselectstart=function(){return!1}):this.$element.addClass("owl-text-select-on"),this.settings.touchDrag&&!c&&this.$stage.on("touchstart touchcancel",a.proxy(function(a){this.eventsRouter(a)},this)),this.transitionEndVendor&&this.on(this.$stage.get(0),this.transitionEndVendor,this.e._transitionEnd,!1),this.settings.responsive!==!1&&this.on(b,"resize",a.proxy(this.onThrottledResize,this))},e.prototype.onDragStart=function(d){var e,g,h,i;if(e=d.originalEvent||d||b.event,3===e.which||this.state.isTouch)return!1;if("mousedown"===e.type&&this.$stage.addClass("owl-grab"),this.trigger("drag"),this.drag.startTime=(new Date).getTime(),this.speed(0),this.state.isTouch=!0,this.state.isScrolling=!1,this.state.isSwiping=!1,this.drag.distance=0,g=f(e).x,h=f(e).y,this.drag.offsetX=this.$stage.position().left,this.drag.offsetY=this.$stage.position().top,this.settings.rtl&&(this.drag.offsetX=this.$stage.position().left+this.$stage.width()-this.width()+this.settings.margin),this.state.inMotion&&this.support3d)i=this.getTransformProperty(),this.drag.offsetX=i,this.animate(i),this.state.inMotion=!0;else if(this.state.inMotion&&!this.support3d)return this.state.inMotion=!1,!1;this.drag.startX=g-this.drag.offsetX,this.drag.startY=h-this.drag.offsetY,this.drag.start=g-this.drag.startX,this.drag.targetEl=e.target||e.srcElement,this.drag.updatedX=this.drag.start,("IMG"===this.drag.targetEl.tagName||"A"===this.drag.targetEl.tagName)&&(this.drag.targetEl.draggable=!1),a(c).on("mousemove.owl.dragEvents mouseup.owl.dragEvents touchmove.owl.dragEvents touchend.owl.dragEvents",a.proxy(function(a){this.eventsRouter(a)},this))},e.prototype.onDragMove=function(a){var c,e,g,h,i,j;this.state.isTouch&&(this.state.isScrolling||(c=a.originalEvent||a||b.event,e=f(c).x,g=f(c).y,this.drag.currentX=e-this.drag.startX,this.drag.currentY=g-this.drag.startY,this.drag.distance=this.drag.currentX-this.drag.offsetX,this.drag.distance<0?this.state.direction=this.settings.rtl?"right":"left":this.drag.distance>0&&(this.state.direction=this.settings.rtl?"left":"right"),this.settings.loop?this.op(this.drag.currentX,">",this.coordinates(this.minimum()))&&"right"===this.state.direction?this.drag.currentX-=(this.settings.center&&this.coordinates(0))-this.coordinates(this._items.length):this.op(this.drag.currentX,"<",this.coordinates(this.maximum()))&&"left"===this.state.direction&&(this.drag.currentX+=(this.settings.center&&this.coordinates(0))-this.coordinates(this._items.length)):(h=this.coordinates(this.settings.rtl?this.maximum():this.minimum()),i=this.coordinates(this.settings.rtl?this.minimum():this.maximum()),j=this.settings.pullDrag?this.drag.distance/5:0,this.drag.currentX=Math.max(Math.min(this.drag.currentX,h+j),i+j)),(this.drag.distance>8||this.drag.distance<-8)&&(c.preventDefault!==d?c.preventDefault():c.returnValue=!1,this.state.isSwiping=!0),this.drag.updatedX=this.drag.currentX,(this.drag.currentY>16||this.drag.currentY<-16)&&this.state.isSwiping===!1&&(this.state.isScrolling=!0,this.drag.updatedX=this.drag.start),this.animate(this.drag.updatedX)))},e.prototype.onDragEnd=function(b){var d,e,f;if(this.state.isTouch){if("mouseup"===b.type&&this.$stage.removeClass("owl-grab"),this.trigger("dragged"),this.drag.targetEl.removeAttribute("draggable"),this.state.isTouch=!1,this.state.isScrolling=!1,this.state.isSwiping=!1,0===this.drag.distance&&this.state.inMotion!==!0)return this.state.inMotion=!1,!1;this.drag.endTime=(new Date).getTime(),d=this.drag.endTime-this.drag.startTime,e=Math.abs(this.drag.distance),(e>3||d>300)&&this.removeClick(this.drag.targetEl),f=this.closest(this.drag.updatedX),this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(f),this.invalidate("position"),this.update(),this.settings.pullDrag||this.drag.updatedX!==this.coordinates(f)||this.transitionEnd(),this.drag.distance=0,a(c).off(".owl.dragEvents")}},e.prototype.removeClick=function(c){this.drag.targetEl=c,a(c).on("click.preventClick",this.e._preventClick),b.setTimeout(function(){a(c).off("click.preventClick")},300)},e.prototype.preventClick=function(b){b.preventDefault?b.preventDefault():b.returnValue=!1,b.stopPropagation&&b.stopPropagation(),a(b.target).off("click.preventClick")},e.prototype.getTransformProperty=function(){var a,c;return a=b.getComputedStyle(this.$stage.get(0),null).getPropertyValue(this.vendorName+"transform"),a=a.replace(/matrix(3d)?\(|\)/g,"").split(","),c=16===a.length,c!==!0?a[4]:a[12]},e.prototype.closest=function(b){var c=-1,d=30,e=this.width(),f=this.coordinates();return this.settings.freeDrag||a.each(f,a.proxy(function(a,g){return b>g-d&&g+d>b?c=a:this.op(b,"<",g)&&this.op(b,">",f[a+1]||g-e)&&(c="left"===this.state.direction?a+1:a),-1===c},this)),this.settings.loop||(this.op(b,">",f[this.minimum()])?c=b=this.minimum():this.op(b,"<",f[this.maximum()])&&(c=b=this.maximum())),c},e.prototype.animate=function(b){this.trigger("translate"),this.state.inMotion=this.speed()>0,this.support3d?this.$stage.css({transform:"translate3d("+b+"px,0px, 0px)",transition:this.speed()/1e3+"s"}):this.state.isTouch?this.$stage.css({left:b+"px"}):this.$stage.animate({left:b},this.speed()/1e3,this.settings.fallbackEasing,a.proxy(function(){this.state.inMotion&&this.transitionEnd()},this))},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(a){this._invalidated[a]=!0},e.prototype.reset=function(a){a=this.normalize(a),a!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(b,c){var e=c?this._items.length:this._items.length+this._clones.length;return!a.isNumeric(b)||1>e?d:b=this._clones.length?(b%e+e)%e:Math.max(this.minimum(c),Math.min(this.maximum(c),b))},e.prototype.relative=function(a){return a=this.normalize(a),a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=0,f=this.settings;if(a)return this._items.length-1;if(!f.loop&&f.center)b=this._items.length-1;else if(f.loop||f.center)if(f.loop||f.center)b=this._items.length+f.items;else{if(!f.autoWidth&&!f.merge)throw"Can not detect maximum absolute position.";for(revert=f.rtl?1:-1,c=this.$stage.width()-this.$element.width();(d=this.coordinates(e))&&!(d*revert>=c);)b=++e}else b=this._items.length-f.items;return b},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2===0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c=null;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[b-1]||0))/2*(this.settings.rtl?-1:1)):c=this._coordinates[b-1]||0,c)},e.prototype.duration=function(a,b,c){return Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(c,d){if(this.settings.loop){var e=c-this.relative(this.current()),f=this.current(),g=this.current(),h=this.current()+e,i=0>g-h?!0:!1,j=this._clones.length+this._items.length;h<this.settings.items&&i===!1?(f=g+this._items.length,this.reset(f)):h>=j-this.settings.items&&i===!0&&(f=g-this._items.length,this.reset(f)),b.clearTimeout(this.e._goToLoop),this.e._goToLoop=b.setTimeout(a.proxy(function(){this.speed(this.duration(this.current(),f+e,d)),this.current(f+e),this.update()},this),30)}else this.speed(this.duration(this.current(),c,d)),this.current(c),this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.transitionEnd=function(a){return a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0))?!1:(this.state.inMotion=!1,void this.trigger("translated"))},e.prototype.viewport=function(){var d;if(this.options.responsiveBaseElement!==b)d=a(this.options.responsiveBaseElement).width();else if(b.innerWidth)d=b.innerWidth;else{if(!c.documentElement||!c.documentElement.clientWidth)throw"Can not detect viewport width.";d=c.documentElement.clientWidth}return d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)},this)),this.reset(a.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(a,b){b=b===d?this._items.length:this.normalize(b,!0),this.trigger("add",{content:a,position:b}),0===this._items.length||b===this._items.length?(this.$stage.append(a),this._items.push(a),this._mergers.push(1*a.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)):(this._items[b].before(a),this._items.splice(b,0,a),this._mergers.splice(b,0,1*a.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)),this.invalidate("items"),this.trigger("added",{content:a,position:b})},e.prototype.remove=function(a){a=this.normalize(a,!0),a!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.addTriggerableEvents=function(){var b=a.proxy(function(b,c){return a.proxy(function(a){a.relatedTarget!==this&&(this.suppress([c]),b.apply(this,[].slice.call(arguments,1)),this.release([c]))},this)},this);a.each({next:this.next,prev:this.prev,to:this.to,destroy:this.destroy,refresh:this.refresh,replace:this.replace,add:this.add,remove:this.remove},a.proxy(function(a,c){this.$element.on(a+".owl.carousel",b(c,a+".owl.carousel"))},this))},e.prototype.watchVisibility=function(){function c(a){return a.offsetWidth>0&&a.offsetHeight>0}function d(){c(this.$element.get(0))&&(this.$element.removeClass("owl-hidden"),this.refresh(),b.clearInterval(this.e._checkVisibile))}c(this.$element.get(0))||(this.$element.addClass("owl-hidden"),b.clearInterval(this.e._checkVisibile),this.e._checkVisibile=b.setInterval(a.proxy(d,this),500))},e.prototype.preloadAutoWidthImages=function(b){var c,d,e,f;c=0,d=this,b.each(function(g,h){e=a(h),f=new Image,f.onload=function(){c++,e.attr("src",f.src),e.css("opacity",1),c>=b.length&&(d.state.imagesLoaded=!0,d.initialize())},f.src=e.attr("src")||e.attr("data-src")||e.attr("data-src-retina")})},e.prototype.destroy=function(){this.$element.hasClass(this.settings.themeClass)&&this.$element.removeClass(this.settings.themeClass),this.settings.responsive!==!1&&a(b).off("resize.owl.carousel"),this.transitionEndVendor&&this.off(this.$stage.get(0),this.transitionEndVendor,this.e._transitionEnd);for(var d in this._plugins)this._plugins[d].destroy();(this.settings.mouseDrag||this.settings.touchDrag)&&(this.$stage.off("mousedown touchstart touchcancel"),a(c).off(".owl.dragEvents"),this.$stage.get(0).onselectstart=function(){},this.$stage.off("dragstart",function(){return!1})),this.$element.off(".owl"),this.$stage.children(".cloned").remove(),this.e=null,this.$element.removeData("owlCarousel"),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.unwrap()},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:c>a;case">":return d?c>a:a>c;case">=":return d?c>=a:a>=c;case"<=":return d?a>=c:c>=a}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d){var e={item:{count:this._items.length,index:this.current()}},f=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),g=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},e,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(g)}),this.$element.trigger(g),this.settings&&"function"==typeof this.settings[f]&&this.settings[f].apply(this,g)),g},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.browserSupport=function(){if(this.support3d=j(),this.support3d){this.transformVendor=i();var a=["transitionend","webkitTransitionEnd","transitionend","oTransitionEnd"];this.transitionEndVendor=a[h()],this.vendorName=this.transformVendor.replace(/Transform/i,""),this.vendorName=""!==this.vendorName?"-"+this.vendorName.toLowerCase()+"-":""}this.state.orientation=b.orientation},a.fn.owlCarousel=function(b){return this.each(function(){a(this).data("owlCarousel")||a(this).data("owlCarousel",new e(this,b))})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b){var c=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type))for(var c=this._core.settings,d=c.center&&Math.ceil(c.items/2)||c.items,e=c.center&&-1*d||0,f=(b.property&&b.property.value||this._core.current())+e,g=this._core.clones().length,h=a.proxy(function(a,b){this.load(b)},this);e++<d;)this.load(g/2+this._core.relative(f)),g&&a.each(this._core.clones(this._core.relative(f++)),h)},this)},this._core.options=a.extend({},c.Defaults,this._core.options),this._core.$element.on(this._handlers)};c.Defaults={lazyLoad:!1},c.prototype.load=function(c){var d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":"url("+g+")",opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},c.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=c}(window.Zepto||window.jQuery,window,document),function(a){var b=function(c){this._core=c,this._handlers={"initialized.owl.carousel":a.proxy(function(){this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){this._core.settings.autoHeight&&"position"==a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass)===this._core.$stage.children().eq(this._core.current())&&this.update()},this)},this._core.options=a.extend({},b.Defaults,this._core.options),this._core.$element.on(this._handlers)};b.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},b.prototype.update=function(){this._core.$stage.parent().height(this._core.$stage.children().eq(this._core.current()).height()).addClass(this._core.settings.autoHeightClass)},b.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=b}(window.Zepto||window.jQuery,window,document),function(a,b,c){var d=function(b){this._core=b,this._videos={},this._playing=null,this._fullscreen=!1,this._handlers={"resize.owl.carousel":a.proxy(function(a){this._core.settings.video&&!this.isInFullScreen()&&a.preventDefault()},this),"refresh.owl.carousel changed.owl.carousel":a.proxy(function(){this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))},this)},this._core.options=a.extend({},d.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};d.Defaults={video:!1,videoHeight:!1,videoWidth:!1},d.prototype.fetch=function(a,b){var c=a.attr("data-vimeo-id")?"vimeo":"youtube",d=a.attr("data-vimeo-id")||a.attr("data-youtube-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else{if(!(d[3].indexOf("vimeo")>-1))throw new Error("Video URL not supported.");c="vimeo"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},d.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?'style="width:'+c.width+"px;height:"+c.height+'px;"':"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(a){e='<div class="owl-video-play-icon"></div>',d=k.lazyLoad?'<div class="owl-video-tn '+j+'" '+i+'="'+a+'"></div>':'<div class="owl-video-tn" style="opacity:1;background-image:url('+a+')"></div>',b.after(d),b.after(e)};return b.wrap('<div class="owl-video-wrapper"'+g+"></div>"),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length?(l(h.attr(i)),h.remove(),!1):void("youtube"===c.type?(f="http://img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type&&a.ajax({type:"GET",url:"http://vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}))},d.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null},d.prototype.play=function(b){this._core.trigger("play",null,"video"),this._playing&&this.stop();var c,d,e=a(b.target||b.srcElement),f=e.closest("."+this._core.settings.itemClass),g=this._videos[f.attr("data-video")],h=g.width||"100%",i=g.height||this._core.$stage.height();"youtube"===g.type?c='<iframe width="'+h+'" height="'+i+'" src="http://www.youtube.com/embed/'+g.id+"?autoplay=1&v="+g.id+'" frameborder="0" allowfullscreen></iframe>':"vimeo"===g.type&&(c='<iframe src="http://player.vimeo.com/video/'+g.id+'?autoplay=1" width="'+h+'" height="'+i+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'),f.addClass("owl-video-playing"),this._playing=f,d=a('<div style="height:'+i+"px; width:"+h+'px" class="owl-video-frame">'+c+"</div>"),e.after(d)},d.prototype.isInFullScreen=function(){var d=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return d&&a(d).parent().hasClass("owl-video-frame")&&(this._core.speed(0),this._fullscreen=!0),d&&this._fullscreen&&this._playing?!1:this._fullscreen?(this._fullscreen=!1,!1):this._playing&&this._core.state.orientation!==b.orientation?(this._core.state.orientation=b.orientation,!1):!0},d.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=d}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){this.swapping="translated"==a.type},this),"translate.owl.carousel":a.proxy(function(){this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&this.core.support3d){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",c)),f&&e.addClass("animated owl-animated-in").addClass(f).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",c))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.transitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c){var d=function(b){this.core=b,this.core.options=a.extend({},d.Defaults,this.core.options),this.handlers={"translated.owl.carousel refreshed.owl.carousel":a.proxy(function(){this.autoplay() | |
| },this),"play.owl.autoplay":a.proxy(function(a,b,c){this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(){this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this.core.settings.autoplayHoverPause&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this.core.settings.autoplayHoverPause&&this.autoplay()},this)},this.core.$element.on(this.handlers)};d.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},d.prototype.autoplay=function(){this.core.settings.autoplay&&!this.core.state.videoPlay?(b.clearInterval(this.interval),this.interval=b.setInterval(a.proxy(function(){this.play()},this),this.core.settings.autoplayTimeout)):b.clearInterval(this.interval)},d.prototype.play=function(){return c.hidden===!0||this.core.state.isTouch||this.core.state.isScrolling||this.core.state.isSwiping||this.core.state.inMotion?void 0:this.core.settings.autoplay===!1?void b.clearInterval(this.interval):void this.core.next(this.core.settings.autoplaySpeed)},d.prototype.stop=function(){b.clearInterval(this.interval)},d.prototype.pause=function(){b.clearInterval(this.interval)},d.prototype.destroy=function(){var a,c;b.clearInterval(this.interval);for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=d}(window.Zepto||window.jQuery,window,document),function(a){"use strict";var b=function(c){this._core=c,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){this._core.settings.dotsData&&this._templates.push(a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot"))},this),"add.owl.carousel":a.proxy(function(b){this._core.settings.dotsData&&this._templates.splice(b.position,0,a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot"))},this),"remove.owl.carousel prepared.owl.carousel":a.proxy(function(a){this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"change.owl.carousel":a.proxy(function(a){if("position"==a.property.name&&!this._core.state.revert&&!this._core.settings.loop&&this._core.settings.navRewind){var b=this._core.current(),c=this._core.maximum(),d=this._core.minimum();a.data=a.property.value>c?b>=c?d:c:a.property.value<d?c:a.property.value}},this),"changed.owl.carousel":a.proxy(function(a){"position"==a.property.name&&this.draw()},this),"refreshed.owl.carousel":a.proxy(function(){this._initialized||(this.initialize(),this._initialized=!0),this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation")},this)},this._core.options=a.extend({},b.Defaults,this._core.options),this.$element.on(this._handlers)};b.Defaults={nav:!1,navRewind:!0,navText:["prev","next"],navSpeed:!1,navElement:"div",navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotData:!1,dotsSpeed:!1,dotsContainer:!1,controlsClass:"owl-controls"},b.prototype.initialize=function(){var b,c,d=this._core.settings;d.dotsData||(this._templates=[a("<div>").addClass(d.dotClass).append(a("<span>")).prop("outerHTML")]),d.navContainer&&d.dotsContainer||(this._controls.$container=a("<div>").addClass(d.controlsClass).appendTo(this.$element)),this._controls.$indicators=d.dotsContainer?a(d.dotsContainer):a("<div>").hide().addClass(d.dotsClass).appendTo(this._controls.$container),this._controls.$indicators.on("click","div",a.proxy(function(b){var c=a(b.target).parent().is(this._controls.$indicators)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(c,d.dotsSpeed)},this)),b=d.navContainer?a(d.navContainer):a("<div>").addClass(d.navContainerClass).prependTo(this._controls.$container),this._controls.$next=a("<"+d.navElement+">"),this._controls.$previous=this._controls.$next.clone(),this._controls.$previous.addClass(d.navClass[0]).html(d.navText[0]).hide().prependTo(b).on("click",a.proxy(function(){this.prev(d.navSpeed)},this)),this._controls.$next.addClass(d.navClass[1]).html(d.navText[1]).hide().appendTo(b).on("click",a.proxy(function(){this.next(d.navSpeed)},this));for(c in this._overrides)this._core[c]=a.proxy(this[c],this)},b.prototype.destroy=function(){var a,b,c,d;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},b.prototype.update=function(){var a,b,c,d=this._core.settings,e=this._core.clones().length/2,f=e+this._core.items().length,g=d.center||d.autoWidth||d.dotData?1:d.dotsEach||d.items;if("page"!==d.slideBy&&(d.slideBy=Math.min(d.slideBy,d.items)),d.dots||"page"==d.slideBy)for(this._pages=[],a=e,b=0,c=0;f>a;a++)(b>=g||0===b)&&(this._pages.push({start:a-e,end:a-e+g-1}),b=0,++c),b+=this._core.mergers(this._core.relative(a))},b.prototype.draw=function(){var b,c,d="",e=this._core.settings,f=(this._core.$stage.children(),this._core.relative(this._core.current()));if(!e.nav||e.loop||e.navRewind||(this._controls.$previous.toggleClass("disabled",0>=f),this._controls.$next.toggleClass("disabled",f>=this._core.maximum())),this._controls.$previous.toggle(e.nav),this._controls.$next.toggle(e.nav),e.dots){if(b=this._pages.length-this._controls.$indicators.children().length,e.dotData&&0!==b){for(c=0;c<this._controls.$indicators.children().length;c++)d+=this._templates[this._core.relative(c)];this._controls.$indicators.html(d)}else b>0?(d=new Array(b+1).join(this._templates[0]),this._controls.$indicators.append(d)):0>b&&this._controls.$indicators.children().slice(b).remove();this._controls.$indicators.find(".active").removeClass("active"),this._controls.$indicators.children().eq(a.inArray(this.current(),this._pages)).addClass("active")}this._controls.$indicators.toggle(e.dots)},b.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotData?1:c.dotsEach||c.items)}},b.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,function(a){return a.start<=b&&a.end>=b}).pop()},b.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},b.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},b.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},b.prototype.to=function(b,c,d){var e;d?a.proxy(this._overrides.to,this._core)(b,c):(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c))},a.fn.owlCarousel.Constructor.Plugins.Navigation=b}(window.Zepto||window.jQuery,window,document),function(a,b){"use strict";var c=function(d){this._core=d,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(){"URLHash"==this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){var c=a(b.content).find("[data-hash]").andSelf("[data-hash]").attr("data-hash");this._hashes[c]=b.content},this)},this._core.options=a.extend({},c.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(){var a=b.location.hash.substring(1),c=this._core.$stage.children(),d=this._hashes[a]&&c.index(this._hashes[a])||0;return a?void this._core.to(d,!1,!0):!1},this))};c.Defaults={URLhashListener:!1},c.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=c}(window.Zepto||window.jQuery,window,document); |
| (function($){ | |
| // Slidder home 4 | |
| if($('#bxslider-home4').length >0){ | |
| var slider = $('#bxslider-home4').bxSlider({ | |
| nextText:'<i class="fa fa-angle-right"></i>', | |
| prevText:'<i class="fa fa-angle-left"></i>', | |
| auto: true, | |
| onSliderLoad:function(currentIndex){ | |
| $('#bxslider-home4 li').find('.caption').each(function(i){ | |
| $(this).show().addClass('animated fadeInRight').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){ | |
| $(this).removeClass('fadeInRight animated'); | |
| }); | |
| }) | |
| }, | |
| onSlideBefore:function(slideElement, oldIndex, newIndex){ | |
| //slideElement.find('.sl-description').hide(); | |
| slideElement.find('.caption').each(function(){ | |
| $(this).hide().removeClass('animated fadeInRight'); | |
| }); | |
| }, | |
| onSlideAfter: function(slideElement, oldIndex, newIndex){ | |
| //slideElement.find('.sl-description').show(); | |
| setTimeout(function(){ | |
| slideElement.find('.caption').each(function(){ | |
| $(this).show().addClass('animated fadeInRight').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){ | |
| $(this).removeClass('fadeInRight animated'); | |
| }); | |
| }); | |
| }, 500); | |
| } | |
| }); | |
| //slider.reloadSlider(); | |
| } | |
| })(jQuery); // End of use strict |
| <?php | |
| $login =''; | |
| require_once "core/load.php"; | |
| if(isset($_POST['login'])){ | |
| $_POST['username']= mysqli_real_escape_string($conn,$_POST['username']); | |
| $_POST['password']= mysqli_real_escape_string($conn,$_POST['password']); | |
| if(login($conn,$_POST['username'],$_POST['password'])!=0) | |
| { | |
| $_SESSION['id'] = login($conn,$_POST['username'],$_POST['password']); | |
| if(isAdmin($conn,$_SESSION['id'])==1) { | |
| $_SESSION['admin']=1; | |
| header("location:index.php"); | |
| } | |
| else{ | |
| header("location:index.php"); | |
| } | |
| } | |
| else { | |
| $login = 'Username and Password are incorrect'; | |
| } | |
| } | |
| ?> | |
| <?php require_once "core/header.php";?> | |
| <div class="product-big-title-area"> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-md-12"> | |
| <div class="product-bit-title text-center"> | |
| <h2>Login</h2> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="wrapper" > | |
| <form action="" method="post" class="form-signin"> | |
| <h2 class="form-signin-heading">Login</h2> | |
| <br> | |
| <input type="text" class="form-control" name="username" placeholder="Username" required="" autofocus="" /> | |
| <br> | |
| <input type="password" class="form-control" name="password" placeholder="Password" required=""/> | |
| <br> | |
| <label for="remember_me">Remeber me</label> | |
| <input type="checkbox" id="remember_me" name="_remember_me" /> | |
| <br> | |
| <br> | |
| <span style="color: red"><?php echo $login;?></span> | |
| <button name='login' class="btn btn-lg btn-primary btn-block" type="submit">Connect</button> | |
| </form> | |
| </div> | |
| <?php require_once "core/footer.php";?> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="wrapper" > | |
| <form action="" method="post" class="form-signin"> | |
| <h2 class="form-signin-heading">Login</h2> | |
| <br> | |
| <input type="text" class="form-control" name="username" placeholder="Username" required="" autofocus="" /> | |
| <br> | |
| <input type="password" class="form-control" name="password" placeholder="Password" required=""/> | |
| <br> | |
| <label for="remember_me">Remeber me</label> | |
| <input type="checkbox" id="remember_me" name="_remember_me" /> | |
| <br> | |
| <br> | |
| <span style="color: red"></span> | |
| <button name='login' class="btn btn-lg btn-primary btn-block" type="submit">Connect</button> | |
| </form> | |
| </div> | |
| <?php require_once "core/footer.php";?> |
| <?php | |
| session_start(); | |
| session_unset(); | |
| header("location:index.php"); | |
| ?> |
| <?php | |
| require_once "core/load.php"; | |
| $cart = new cart($conn,$_SESSION['cart']); | |
| $cart1 = $cart->getOrder(); | |
| ?> | |
| <?php require_once "core/header.php";?> | |
| <div class="product-big-title-area" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html"> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-md-12"> | |
| <div class="product-bit-title text-center"> | |
| <h2>Orders History</h2> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- End Page title area --> | |
| <div class="single-product-area"> | |
| <div class="zigzag-bottom"></div> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-md-4"> | |
| <div class="single-sidebar"> | |
| <h2 class="sidebar-title">Search Products</h2> | |
| <form action="search.php" method="get"> | |
| <input type="text" name="q" placeholder="Search products..."> | |
| <input type="submit" value="Search"> | |
| </form> | |
| </div> | |
| <div class="single-sidebar"> | |
| <h2 class="sidebar-title">Products</h2> | |
| <?php echo recent($conn);?> | |
| </div> | |
| </div> | |
| <div class="col-md-8"> | |
| <div class="product-content-right"> | |
| <div class="woocommerce"> | |
| <?php echo $cart1;?> | |
| <div class="cart-collaterals"> | |
| <div class="cross-sells"> | |
| <h2>You may be interested in...</h2> | |
| <ul class="products"> | |
| <?php echo may($conn);?> | |
| </ul> | |
| </div> | |
| <?php echo $cart->setCartTotal();?> | |
| <form method="post" action="#" class="shipping_calculator"> | |
| <h2><a class="shipping-calculator-button" data-toggle="collapse" href="#calcalute-shipping-wrap" aria-expanded="false" aria-controls="calcalute-shipping-wrap">Calculate Shipping</a></h2> | |
| <section id="calcalute-shipping-wrap" class="shipping-calculator-form collapse"> | |
| <p class="form-row form-row-wide"> | |
| <select rel="calc_shipping_state" class="country_to_state" id="calc_shipping_country" name="calc_shipping_country"> | |
| <option value="">Select a country…</option> | |
| <option value="AX">Åland Islands</option> | |
| <option value="AF">Afghanistan</option> | |
| <option value="AL">Albania</option> | |
| <option value="DZ">Algeria</option> | |
| <option value="AD">Andorra</option> | |
| <option value="AO">Angola</option> | |
| <option value="AI">Anguilla</option> | |
| <option value="AQ">Antarctica</option> | |
| <option value="AG">Antigua and Barbuda</option> | |
| <option value="AR">Argentina</option> | |
| <option value="AM">Armenia</option> | |
| <option value="AW">Aruba</option> | |
| <option value="AU">Australia</option> | |
| <option value="AT">Austria</option> | |
| <option value="AZ">Azerbaijan</option> | |
| <option value="BS">Bahamas</option> | |
| <option value="BH">Bahrain</option> | |
| <option value="BD">Bangladesh</option> | |
| <option value="BB">Barbados</option> | |
| <option value="BY">Belarus</option> | |
| <option value="PW">Belau</option> | |
| <option value="BE">Belgium</option> | |
| <option value="BZ">Belize</option> | |
| <option value="BJ">Benin</option> | |
| <option value="BM">Bermuda</option> | |
| <option value="BT">Bhutan</option> | |
| <option value="BO">Bolivia</option> | |
| <option value="BQ">Bonaire, Saint Eustatius and Saba</option> | |
| <option value="BA">Bosnia and Herzegovina</option> | |
| <option value="BW">Botswana</option> | |
| <option value="BV">Bouvet Island</option> | |
| <option value="BR">Brazil</option> | |
| <option value="IO">British Indian Ocean Territory</option> | |
| <option value="VG">British Virgin Islands</option> | |
| <option value="BN">Brunei</option> | |
| <option value="BG">Bulgaria</option> | |
| <option value="BF">Burkina Faso</option> | |
| <option value="BI">Burundi</option> | |
| <option value="KH">Cambodia</option> | |
| <option value="CM">Cameroon</option> | |
| <option value="CA">Canada</option> | |
| <option value="CV">Cape Verde</option> | |
| <option value="KY">Cayman Islands</option> | |
| <option value="CF">Central African Republic</option> | |
| <option value="TD">Chad</option> | |
| <option value="CL">Chile</option> | |
| <option value="CN">China</option> | |
| <option value="CX">Christmas Island</option> | |
| <option value="CC">Cocos (Keeling) Islands</option> | |
| <option value="CO">Colombia</option> | |
| <option value="KM">Comoros</option> | |
| <option value="CG">Congo (Brazzaville)</option> | |
| <option value="CD">Congo (Kinshasa)</option> | |
| <option value="CK">Cook Islands</option> | |
| <option value="CR">Costa Rica</option> | |
| <option value="HR">Croatia</option> | |
| <option value="CU">Cuba</option> | |
| <option value="CW">CuraÇao</option> | |
| <option value="CY">Cyprus</option> | |
| <option value="CZ">Czech Republic</option> | |
| <option value="DK">Denmark</option> | |
| <option value="DJ">Djibouti</option> | |
| <option value="DM">Dominica</option> | |
| <option value="DO">Dominican Republic</option> | |
| <option value="EC">Ecuador</option> | |
| <option value="EG">Egypt</option> | |
| <option value="SV">El Salvador</option> | |
| <option value="GQ">Equatorial Guinea</option> | |
| <option value="ER">Eritrea</option> | |
| <option value="EE">Estonia</option> | |
| <option value="ET">Ethiopia</option> | |
| <option value="FK">Falkland Islands</option> | |
| <option value="FO">Faroe Islands</option> | |
| <option value="FJ">Fiji</option> | |
| <option value="FI">Finland</option> | |
| <option value="FR">France</option> | |
| <option value="GF">French Guiana</option> | |
| <option value="PF">French Polynesia</option> | |
| <option value="TF">French Southern Territories</option> | |
| <option value="GA">Gabon</option> | |
| <option value="GM">Gambia</option> | |
| <option value="GE">Georgia</option> | |
| <option value="DE">Germany</option> | |
| <option value="GH">Ghana</option> | |
| <option value="GI">Gibraltar</option> | |
| <option value="GR">Greece</option> | |
| <option value="GL">Greenland</option> | |
| <option value="GD">Grenada</option> | |
| <option value="GP">Guadeloupe</option> | |
| <option value="GT">Guatemala</option> | |
| <option value="GG">Guernsey</option> | |
| <option value="GN">Guinea</option> | |
| <option value="GW">Guinea-Bissau</option> | |
| <option value="GY">Guyana</option> | |
| <option value="HT">Haiti</option> | |
| <option value="HM">Heard Island and McDonald Islands</option> | |
| <option value="HN">Honduras</option> | |
| <option value="HK">Hong Kong</option> | |
| <option value="HU">Hungary</option> | |
| <option value="IS">Iceland</option> | |
| <option value="IN">India</option> | |
| <option value="ID">Indonesia</option> | |
| <option value="IR">Iran</option> | |
| <option value="IQ">Iraq</option> | |
| <option value="IM">Isle of Man</option> | |
| <option value="IL">Israel</option> | |
| <option value="IT">Italy</option> | |
| <option value="CI">Ivory Coast</option> | |
| <option value="JM">Jamaica</option> | |
| <option value="JP">Japan</option> | |
| <option value="JE">Jersey</option> | |
| <option value="JO">Jordan</option> | |
| <option value="KZ">Kazakhstan</option> | |
| <option value="KE">Kenya</option> | |
| <option value="KI">Kiribati</option> | |
| <option value="KW">Kuwait</option> | |
| <option value="KG">Kyrgyzstan</option> | |
| <option value="LA">Laos</option> | |
| <option value="LV">Latvia</option> | |
| <option value="LB">Lebanon</option> | |
| <option value="LS">Lesotho</option> | |
| <option value="LR">Liberia</option> | |
| <option value="LY">Libya</option> | |
| <option value="LI">Liechtenstein</option> | |
| <option value="LT">Lithuania</option> | |
| <option value="LU">Luxembourg</option> | |
| <option value="MO">Macao S.A.R., China</option> | |
| <option value="MK">Macedonia</option> | |
| <option value="MG">Madagascar</option> | |
| <option value="MW">Malawi</option> | |
| <option value="MY">Malaysia</option> | |
| <option value="MV">Maldives</option> | |
| <option value="ML">Mali</option> | |
| <option value="MT">Malta</option> | |
| <option value="MH">Marshall Islands</option> | |
| <option value="MQ">Martinique</option> | |
| <option value="MR">Mauritania</option> | |
| <option value="MU">Mauritius</option> | |
| <option value="YT">Mayotte</option> | |
| <option value="MX">Mexico</option> | |
| <option value="FM">Micronesia</option> | |
| <option value="MD">Moldova</option> | |
| <option value="MC">Monaco</option> | |
| <option value="MN">Mongolia</option> | |
| <option value="ME">Montenegro</option> | |
| <option value="MS">Montserrat</option> | |
| <option value="MA">Morocco</option> | |
| <option value="MZ">Mozambique</option> | |
| <option value="MM">Myanmar</option> | |
| <option value="NA">Namibia</option> | |
| <option value="NR">Nauru</option> | |
| <option value="NP">Nepal</option> | |
| <option value="NL">Netherlands</option> | |
| <option value="AN">Netherlands Antilles</option> | |
| <option value="NC">New Caledonia</option> | |
| <option value="NZ">New Zealand</option> | |
| <option value="NI">Nicaragua</option> | |
| <option value="NE">Niger</option> | |
| <option value="NG">Nigeria</option> | |
| <option value="NU">Niue</option> | |
| <option value="NF">Norfolk Island</option> | |
| <option value="KP">North Korea</option> | |
| <option value="NO">Norway</option> | |
| <option value="OM">Oman</option> | |
| <option value="PK">Pakistan</option> | |
| <option value="PS">Palestinian Territory</option> | |
| <option value="PA">Panama</option> | |
| <option value="PG">Papua New Guinea</option> | |
| <option value="PY">Paraguay</option> | |
| <option value="PE">Peru</option> | |
| <option value="PH">Philippines</option> | |
| <option value="PN">Pitcairn</option> | |
| <option value="PL">Poland</option> | |
| <option value="PT">Portugal</option> | |
| <option value="QA">Qatar</option> | |
| <option value="IE">Republic of Ireland</option> | |
| <option value="RE">Reunion</option> | |
| <option value="RO">Romania</option> | |
| <option value="RU">Russia</option> | |
| <option value="RW">Rwanda</option> | |
| <option value="ST">São Tomé and Príncipe</option> | |
| <option value="BL">Saint Barthélemy</option> | |
| <option value="SH">Saint Helena</option> | |
| <option value="KN">Saint Kitts and Nevis</option> | |
| <option value="LC">Saint Lucia</option> | |
| <option value="SX">Saint Martin (Dutch part)</option> | |
| <option value="MF">Saint Martin (French part)</option> | |
| <option value="PM">Saint Pierre and Miquelon</option> | |
| <option value="VC">Saint Vincent and the Grenadines</option> | |
| <option value="SM">San Marino</option> | |
| <option value="SA">Saudi Arabia</option> | |
| <option value="SN">Senegal</option> | |
| <option value="RS">Serbia</option> | |
| <option value="SC">Seychelles</option> | |
| <option value="SL">Sierra Leone</option> | |
| <option value="SG">Singapore</option> | |
| <option value="SK">Slovakia</option> | |
| <option value="SI">Slovenia</option> | |
| <option value="SB">Solomon Islands</option> | |
| <option value="SO">Somalia</option> | |
| <option value="ZA">South Africa</option> | |
| <option value="GS">South Georgia/Sandwich Islands</option> | |
| <option value="KR">South Korea</option> | |
| <option value="SS">South Sudan</option> | |
| <option value="ES">Spain</option> | |
| <option value="LK">Sri Lanka</option> | |
| <option value="SD">Sudan</option> | |
| <option value="SR">Suriname</option> | |
| <option value="SJ">Svalbard and Jan Mayen</option> | |
| <option value="SZ">Swaziland</option> | |
| <option value="SE">Sweden</option> | |
| <option value="CH">Switzerland</option> | |
| <option value="SY">Syria</option> | |
| <option value="TW">Taiwan</option> | |
| <option value="TJ">Tajikistan</option> | |
| <option value="TZ">Tanzania</option> | |
| <option value="TH">Thailand</option> | |
| <option value="TL">Timor-Leste</option> | |
| <option value="TG">Togo</option> | |
| <option value="TK">Tokelau</option> | |
| <option value="TO">Tonga</option> | |
| <option value="TT">Trinidad and Tobago</option> | |
| <option value="TN">Tunisia</option> | |
| <option value="TR">Turkey</option> | |
| <option value="TM">Turkmenistan</option> | |
| <option value="TC">Turks and Caicos Islands</option> | |
| <option value="TV">Tuvalu</option> | |
| <option value="UG">Uganda</option> | |
| <option value="UA">Ukraine</option> | |
| <option value="AE">United Arab Emirates</option> | |
| <option selected="selected" value="GB">United Kingdom (UK)</option> | |
| <option value="US">United States (US)</option> | |
| <option value="UY">Uruguay</option> | |
| <option value="UZ">Uzbekistan</option> | |
| <option value="VU">Vanuatu</option> | |
| <option value="VA">Vatican</option> | |
| <option value="VE">Venezuela</option> | |
| <option value="VN">Vietnam</option> | |
| <option value="WF">Wallis and Futuna</option> | |
| <option value="EH">Western Sahara</option> | |
| <option value="WS">Western Samoa</option> | |
| <option value="YE">Yemen</option> | |
| <option value="ZM">Zambia</option> | |
| <option value="ZW">Zimbabwe</option> | |
| </select> | |
| </p> | |
| <p class="form-row form-row-wide"><input type="text" id="calc_shipping_state" name="calc_shipping_state" placeholder="State / county" value="" class="input-text"> </p> | |
| <p class="form-row form-row-wide"><input type="text" id="calc_shipping_postcode" name="calc_shipping_postcode" placeholder="Postcode / Zip" value="" class="input-text"></p> | |
| <p><button class="button" value="1" name="calc_shipping" type="submit">Update Totals</button></p> | |
| </section> | |
| </form> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <?php require_once "core/footer.php";?> |
| <?php | |
| use PayPal\Api\Payment; | |
| use PayPal\Api\PaymentExecution; | |
| require 'app/start.php'; | |
| require_once "core/load.php"; | |
| if(isset($_GET['user_id'])){ | |
| $user_id =$_GET['user_id']; | |
| } | |
| else{ | |
| $user_id=0; | |
| } | |
| if(!isset($_GET['success'],$_GET['paymentId'],$_GET['PayerID'])) | |
| { | |
| die(); | |
| } | |
| $cart = new cart($conn,$_GET['cart']); | |
| $order = $cart->Order(); | |
| $order1=''; | |
| $paymentId = $_GET['paymentId']; | |
| $payerId = $_GET['PayerID']; | |
| $payment = Payment::get($paymentId,$paypal); | |
| $execute = new PaymentExecution(); | |
| $execute->setPayerId($payerId); | |
| for($x=0;$x<count($order);$x++) { | |
| $id=$_GET['cart']; | |
| $product_id=$order[$x]['product_id']; | |
| $quantity=$order[$x]['quantity']; | |
| $item_name=$order[$x]['product_name']; | |
| $price = $order[$x]['price']; | |
| $date = date("d-m-y"); | |
| $sql = "INSERT INTO payments(payment_id,user_id,item_number,payment_gross,quantity,item_name,date,payment_status)VALUES('$id','$user_id','$product_id','$price','$quantity','$item_name','$date','success')"; | |
| $conn->query($sql); | |
| } | |
| ?> | |
| <?php require_once "core/header.php";?> | |
| <div class="product-big-title-area" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html"> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-md-12"> | |
| <div class="product-bit-title text-center"> | |
| <h2>Payment</h2> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <br><br><br> | |
| <center><h1>Your Payment is Finished</h1></center> | |
| <br><br><br> | |
| <?php require_once "core/footer.php";?> |
| <?php | |
| require_once "core/load.php"; | |
| $user = array('name'=> '','family' =>'','username'=> '','email' => '','password' => ''); | |
| if(isset($_POST['submit'])) { | |
| $_POST['name'] =mysqli_real_escape_string($conn,$_POST['name']); | |
| $_POST['family'] =mysqli_real_escape_string($conn,$_POST['family']); | |
| $_POST['username'] =mysqli_real_escape_string($conn,$_POST['username']); | |
| $_POST['email'] =mysqli_real_escape_string($conn,$_POST['email']); | |
| $_POST['password'] =mysqli_real_escape_string($conn,$_POST['password']); | |
| $_POST['password1'] =mysqli_real_escape_string($conn,$_POST['password1']); | |
| $users = new users($conn); | |
| $users->setName($_POST['name']); | |
| $users->setFamily($_POST['family']); | |
| $users->setUsername($_POST['username']); | |
| $users->setEmail($_POST['email']); | |
| $users->setCode(substr(md5(uniqid(mt_rand(), true)) , 0, 8)); | |
| $users->setPassword($_POST['password'],$_POST['password1']); | |
| $erorr = $users->getError(); | |
| foreach ($erorr as $erorr1 => $erorr2) { | |
| $user[$erorr1] = $erorr2; | |
| } | |
| if ($users->getName() != '' && $users->getFamily() != '' && $users->getUsername() != '' && $users->getEmail() != '' && $users->getPassword() != '') { | |
| $users->setUser(3,$users->getName(),$users->getFamily(),$users->getUsername(),$users->getEmail(),$users->getPassword(),$users->getCode()); | |
| $code =$users->getCode(); | |
| $message = " | |
| Thank you for register to jewish-store please confirm the code in this link www.jewish-store.com/confirm.php | |
| $code | |
| "; | |
| $mail = new mail(); | |
| $mail->setMessage($users->getEmail(),'Registeration Jewish-Store',$message); | |
| $mail->sendEmail(); | |
| header("location:confirm.php"); | |
| } | |
| } | |
| ?> | |
| <?php require_once "core/header.php";?> | |
| <div class="product-big-title-area"> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-md-12"> | |
| <div class="product-bit-title text-center"> | |
| <h2>Register</h2> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="wrapper"> | |
| <form action="" method="post" class="form-signin"> | |
| <h2 class="form-signin-heading">Register</h2> | |
| <h4>Please fill the details in english</h4> | |
| <input type="text" class="form-control" name="name" placeholder='First Name' autofocus="" /> | |
| <span style="color: red"><?php echo $user['name'];?></span> | |
| <br> | |
| <input type="text" class="form-control" name="family" placeholder='Family Name' autofocus="" /> | |
| <span style="color: red"> <?php echo $user['family'];?></span> | |
| <br> | |
| <input type="text" class="form-control" name="username" placeholder='Username' autofocus="" /> | |
| <span style="color: red"> <?php echo $user['username'];?></span> | |
| <br> | |
| <input type="text" class="form-control" name="email" placeholder="Email" autofocus="" /> | |
| <span style="color: red"> <?php echo $user['email'];?></span> | |
| <br> | |
| <input type="password" class="form-control" name="password" placeholder="Password" /> | |
| <span style="color: red"> <?php echo $user['password'];?></span> | |
| <br> | |
| <input type="password" class="form-control" name="password1" placeholder="Verfiy Password" /> | |
| <label class="checkbox"> | |
| </label> | |
| <button name="submit" class="btn btn-lg btn-primary btn-block" type="">Finish</button> | |
| </form> | |
| </div> | |
| <?php require_once "core/footer.php";?> |
| <?php | |
| require_once "core/load.php"; | |
| if(isset($_GET['q']) && $_GET['q']!=''){ | |
| $q = $_GET['q']; | |
| $q = mysqli_real_escape_string($conn,$q); | |
| $search = new search($conn,$q); | |
| $search=$search->getSearch(); | |
| } | |
| else{ | |
| $search= 'Products are not found'; | |
| } | |
| ?> | |
| <?php require_once "core/header.php";?> | |
| <div class="product-big-title-area" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html"> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-md-12"> | |
| <div class="product-bit-title text-center"> | |
| <h2>Search Page</h2> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="container" style="margin-top: 35px;"> | |
| <div class="row"> | |
| <div class="col-md-4"> | |
| <div class="single-sidebar"> | |
| <h2 class="sidebar-title">Search Products</h2> | |
| <form action="search.php" method="get"> | |
| <input type="text" name="q" placeholder="Search products..."> | |
| <input type="submit" value="Search"> | |
| </form> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="single-product-area"> | |
| <div class="zigzag-bottom"></div> | |
| <?php echo $search;?> | |
| </div> | |
| </div> | |
| <?php require_once "core/footer.php";?> |
| <?php | |
| require_once "core/load.php"; | |
| $pages = new pages(); | |
| if(!isset($_GET['id'])){ | |
| $_GET['id']=1; | |
| $_GET['id']=mysqli_real_escape_string($conn,$_GET['id']); | |
| $pages->page($_GET['id']); | |
| } | |
| else{ | |
| if($_GET['id']<=0){ | |
| $_GET['id']=1; | |
| } | |
| $_GET['id']=mysqli_real_escape_string($conn,$_GET['id']); | |
| $pages->page($_GET['id']); | |
| } | |
| if(!isset($_GET['product'])){ | |
| $_GET['product']=0; | |
| $_GET['product']=mysqli_real_escape_string($conn,$_GET['product']); | |
| $pageNum=$pages->pageNum($conn,$_GET['id'],$_GET['product']); | |
| } | |
| else{ | |
| $_GET['product']=mysqli_real_escape_string($conn,$_GET['product']); | |
| $pageNum= $pages->pageNum($conn,$_GET['id'],$_GET['product']); | |
| } | |
| ?> | |
| <?php require_once "core/header.php";?> | |
| <div class="product-big-title-area"> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-md-12"> | |
| <div class="product-bit-title text-center"> | |
| <h2>Shop</h2> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="single-product-area"> | |
| <div class="zigzag-bottom"></div> | |
| <div class="container"> | |
| <center> | |
| <?php echo $pages->products($conn,$_GET['product']);?> | |
| </center> | |
| </div> | |
| <div class="row"> | |
| <div class="col-md-12"> | |
| <div class="product-pagination text-center"> | |
| <nav> | |
| <ul class="pagination"> | |
| <?php echo $pageNum;?> | |
| </ul> | |
| </nav> | |
| </div> | |
| </div></div></div> | |
| <?php require_once "core/footer.php"; |
| <?php | |
| require_once "core/load.php"; | |
| $x=0; | |
| $id=$_GET['id']; | |
| $id =mysqli_real_escape_string($conn,$id); | |
| $exist = exist1($conn,$id); | |
| if($exist==0) | |
| { | |
| header("location:404.php"); | |
| } | |
| $f = image1($conn,$id); | |
| $f1 = desc1($conn,$id); | |
| $desc = descer1($conn,$id); | |
| $price = price1($conn,$id); | |
| $quantity=q1($conn,$id); | |
| $img='img'; | |
| $regular = selectRegular2($conn,$id); | |
| ?> | |
| <?php require_once "core/header.php";?> | |
| <div class="product-big-title-area"> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-md-12"> | |
| <div class="product-bit-title text-center"> | |
| <h2>Shop</h2> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="single-product-area"> | |
| <div class="zigzag-bottom"></div> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-md-12"> | |
| <div class="row"> | |
| <div class="col-sm-6"> | |
| <div class="product-images"> | |
| <div class="product-main-img"> | |
| <img src="<?php echo $f;?>" style="height: 370px;width: 370px;" alt=""> | |
| </div> | |
| <div class="product-gallery"> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="col-sm-6"> | |
| <div class="product-inner"> | |
| <h2 class="product-name"><?php echo $f1;?></h2> | |
| <div class="product-inner-price"> | |
| <span style="font-size: 20px;">price</span> <ins style="font-size: 20px;">$<?php echo $price;?>.00</ins> <del style="font-size: 15px;">$<?php echo $price+5; ?>.00</del> | |
| </div> | |
| <form action="cart.php" method="get"> | |
| <input type="hidden" name="id" value=<?php echo $_GET['id'];?>> | |
| <button class="add_to_cart_button" type="submit">Add to cart</button> | |
| </form> | |
| <div class="product-inner-category"> | |
| </div> | |
| <div role="tabpanel" style="margin-top: 0px;"> | |
| <ul class="product-tab" role="tablist"> | |
| <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">Description</a></li> | |
| </ul> | |
| <div class="tab-content"> | |
| <div role="tabpanel" class="tab-pane fade in active" id="home"> | |
| <h2>Product Description</h2> | |
| <p><?php echo $desc;?></p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <?php require_once "core/footer.php";?> |
| .floatleft { float: left } | |
| .floatright { float: right } | |
| .alignleft { | |
| float: left; | |
| margin-right: 15px; | |
| } | |
| .alignright { | |
| float: right; | |
| margin-left: 15px; | |
| } | |
| .aligncenter { | |
| display: block; | |
| margin: 0 auto 15px; | |
| } | |
| a:focus { outline: 0px solid } | |
| img { | |
| max-width: 100%; | |
| height: auto; | |
| } | |
| .fix { overflow: hidden } | |
| h1, | |
| h2, | |
| h3, | |
| h4, | |
| h5, | |
| h6 { | |
| margin: 0 0 15px; | |
| } | |
| body { font-family:Arial, Helvetica, sans-serif; } | |
| .header-area { | |
| background: none repeat scroll 0 0 #f4f4f4; | |
| } | |
| .header-area a { | |
| color: #888; | |
| } | |
| .user-menu ul { | |
| list-style: outside none none; | |
| margin: 0; | |
| padding: 0; | |
| } | |
| .user-menu li { | |
| display: inline-block; | |
| } | |
| .user-menu li a { | |
| display: block; | |
| font-size: 13px; | |
| margin-right: 5px; | |
| padding: 10px; | |
| } | |
| .user-menu li a i.fa { | |
| margin-right: 5px; | |
| } | |
| .header-right ul.list-inline { | |
| margin: 0; | |
| text-align: right; | |
| } | |
| .header-right ul.list-inline li a { | |
| display: block; | |
| padding: 9px; | |
| } | |
| .header-right ul.list-inline li ul a { | |
| padding: 5px 15px; | |
| } | |
| .header-right ul.list-inline li ul { | |
| border: medium none; | |
| border-radius: 0; | |
| left: 50%; | |
| margin-left: -50px; | |
| min-width: 100px; | |
| text-align: center; | |
| } | |
| .mainmenu-area {background: none repeat scroll 0 0 #fbfbfb; | |
| font-family: "Roboto Condensed",sans-serif; | |
| text-transform: uppercase; | |
| width: 100%; | |
| z-index: 999;} | |
| .logo h1 { | |
| font-size: 40px; | |
| margin: 30px 0;font-weight: 400; | |
| } | |
| .logo h1 a { | |
| color: #999; | |
| } | |
| .logo h1 a:hover {text-decoration: none;opacity: .7} | |
| .logo h1 a span { | |
| color: #5a88ca; | |
| } | |
| .shopping-item { | |
| border: 1px solid #ddd; | |
| float: right; | |
| font-size: 18px; | |
| margin-top: 40px; | |
| padding: 10px; | |
| position: relative; | |
| } | |
| .shopping-item a { | |
| color: #666; | |
| } | |
| .cart-amunt { | |
| color: #5a88ca; | |
| font-weight: 700; | |
| } | |
| .product-count { | |
| background: none repeat scroll 0 0 #5a88ca; | |
| border-radius: 50%; | |
| color: #fff; | |
| display: inline-block; | |
| font-size: 10px; | |
| height: 20px; | |
| padding-top: 2px; | |
| position: absolute; | |
| right: -10px; | |
| text-align: center; | |
| top: -10px; | |
| width: 20px; | |
| } | |
| .shopping-item i.fa { | |
| margin-left: 15px; | |
| } | |
| .shopping-item:hover { | |
| background: none repeat scroll 0 0 #5a88ca; | |
| border-color: #5a88ca; | |
| } | |
| .shopping-item:hover a { | |
| color: #fff;text-decoration: none | |
| } | |
| .shopping-item:hover .cart-amunt { | |
| color: #fff; | |
| } | |
| .shopping-item:hover .product-count { | |
| background: none repeat scroll 0 0 #000; | |
| } | |
| .mainmenu-area ul.navbar-nav li a { | |
| color: #6e6a6a; | |
| font-size: 14px; | |
| padding: 20px; | |
| } | |
| .mainmenu-area ul.navbar-nav li:hover a, .mainmenu-area ul.navbar-nav li.active a {background: #5a88ca; color:#FFF;} | |
| .mainmenu-area .nav > li > a:focus {color: #FFF;} | |
| .slider-area { width:80%; position:relative; margin:0 auto; padding:5px;} | |
| /*------------------------- | |
| [9. Block slider] | |
| ---------------------------*/ | |
| .block-slider{ | |
| border:none; | |
| width: 100%; | |
| } | |
| .block-slider ul li{ | |
| list-style: none; | |
| } | |
| .block-slider .bx-pager{ | |
| display: none; | |
| } | |
| .block-slider .bx-prev, | |
| .block-slider .bx-next{ | |
| width: 32px; | |
| height: 32px; | |
| border: 1px solid #eaeaea; | |
| text-align: center; | |
| display: block; | |
| border-radius: 50%; | |
| font-size: 30px; | |
| position: absolute; | |
| top: 50%; | |
| -ms-transform: translateY(-50%); | |
| -webkit-transform: translateY(-50%); | |
| transform: translateY(-50%); | |
| line-height: 29px; | |
| -moz-transition: all 0.45s ease; | |
| -webkit-transition: all 0.45s ease; | |
| -o-transition: all 0.45s ease; | |
| -ms-transition: all 0.45s ease; | |
| transition: all 0.45s ease; | |
| } | |
| .block-slider img{ | |
| width: 100%; | |
| height: auto; | |
| } | |
| .block-slider .bx-prev{ | |
| left: 0px; | |
| padding-right: 3px; | |
| } | |
| .block-slider .bx-next{ | |
| right: 0px; | |
| padding-left: 3px; | |
| } | |
| .block-slider:hover .bx-prev{ | |
| left: 10px; | |
| } | |
| .block-slider:hover .bx-next{ | |
| right: 10px; | |
| } | |
| .block-slider .bx-prev:hover, | |
| .block-slider .bx-next:hover{ | |
| background: #5a88ca; | |
| color: #fff; | |
| border-color: #5a88ca; | |
| } | |
| /*------------------ | |
| [4. Slidershow] | |
| ------------------*/ | |
| .block-slider .bx-pager{ | |
| display: block; | |
| text-align: center; | |
| } | |
| .block-slider .bx-pager-item{ | |
| width: 15px; | |
| height: 15px; | |
| background: #fff; | |
| font-size: 0; | |
| display: inline-block; | |
| border-radius: 50%; | |
| margin: 0 3px; | |
| } | |
| .block-slider .bx-pager-item a{ | |
| width: 100%; | |
| height: 100%; | |
| background: #999; | |
| display: block; | |
| border-radius: 50%; | |
| } | |
| .block-slider .bx-pager-item a.active{ | |
| background: #1bd172; | |
| } | |
| .block-slider .caption-group{ | |
| position: absolute; | |
| top: 26%; | |
| right: 16%; | |
| } | |
| .block-slider .caption-group .title{ | |
| margin: 0; | |
| } | |
| .block-slider .caption-group .subtitle{ | |
| margin: 0; | |
| margin-top: 5px; | |
| } | |
| .block-slider .caption-group .button-radius{ | |
| margin-top: 27px; | |
| } | |
| .block-slider .caption-group .primary{ | |
| color: #1bd172; | |
| } | |
| .block-slider .caption-group .caption{ | |
| } | |
| /*---------------------- | |
| [10. Block top seller ] | |
| ------------------------*/ | |
| .button-radius{ | |
| position: relative; | |
| border: 1px solid #eaeaea; | |
| padding: 1px; | |
| min-height: 34px; | |
| background: #fff; | |
| display: inline-block; | |
| width: auto; | |
| line-height: 30px; | |
| padding-left: 40px; | |
| padding-right: 20px; | |
| margin: 0; | |
| color: #666666; | |
| -webkit-border-radius: 17px; | |
| -moz-border-radius: 17px; | |
| border-radius: 17px; | |
| -webkit-transition: all 1s ease; | |
| -moz-transition: all 1s ease; | |
| -o-transition: all 1s ease; | |
| -ms-transition: all 1s ease; | |
| transition: all 1s ease; | |
| margin-top: 10px; | |
| font-size: 14px; | |
| } | |
| .button-radius .icon{ | |
| -webkit-transition: all 1s ease-out; | |
| -moz-transition: all 1s ease-out; | |
| -o-transition: all 1s ease-out; | |
| -ms-transition: all 1s ease-out; | |
| transition: all 1s ease-out; | |
| position: absolute; | |
| left: 2%; | |
| top: 2px; | |
| overflow: hidden; | |
| } | |
| .button-radius .icon:before{ | |
| font-family: 'FontAwesome'; | |
| content: "\f105"; | |
| font-size: 14px; | |
| color: #fff; | |
| width: 28px; | |
| height: 28px; | |
| background-color: #5a88ca; | |
| border-radius: 90%; | |
| text-align: center; | |
| line-height: 26px; | |
| float: left; | |
| -webkit-transition: all 1s ease-out; | |
| -moz-transition: all 1s ease-out; | |
| -o-transition: all 1s ease-out; | |
| -ms-transition: all 1s ease-out; | |
| transition: all 1s ease-out; | |
| } | |
| .button-radius.white{ | |
| border-color: #fff; | |
| color: #fff; | |
| background: transparent; | |
| } | |
| .button-radius.white .icon:before{ | |
| background: #fff; | |
| color: #333; | |
| } | |
| .button-radius:hover .icon{ | |
| left: 100%; | |
| margin-left: -30px; | |
| } | |
| .button-radius:hover{ | |
| padding-left: 20px; | |
| padding-right: 40px; | |
| } | |
| .promo-area { | |
| background:#fbfbfb; | |
| color: #fff; | |
| padding: 40px 0 40px; | |
| } | |
| .brands-area { | |
| border-top:1px solid #e5e5e5; | |
| border-bottom:1px solid #e5e5e5; | |
| color: #fff; | |
| padding: 20px 0 20px; | |
| } | |
| .promo-area .zigzag-bottom, .brands-area .zigzag-bottom{background: #f4f4f4} | |
| .single-promo { | |
| font-size: 25px; | |
| font-weight: 200; | |
| padding: 20px 10px; | |
| text-align: center; | |
| } | |
| .single-promo i { | |
| font-size: 50px; | |
| } | |
| .single-promo:hover {color: #fff;background: #222;} | |
| .promo1 { background:#5a88ca;} | |
| .promo2 { background:#ffd900;} | |
| .promo3 { background:#fa8072;} | |
| .promo4 { background:#4abebd;} | |
| .section-title { | |
| font-family: "Raleway",sans-serif; | |
| font-size: 50px; | |
| font-weight: 100; | |
| margin-bottom: 50px; | |
| text-align: center; | |
| } | |
| .product-f-image { | |
| position: relative; | |
| } | |
| .product-hover { | |
| height: 100%; | |
| left: 0; | |
| position: absolute; | |
| top: 0; | |
| width: 100%;overflow: hidden;border: 1px solid #ddd; | |
| } | |
| .product-hover:after { | |
| background: none repeat scroll 0 0 #000; | |
| content: ""; | |
| height: 100%; | |
| left: -100%; | |
| opacity: 0.6; | |
| position: absolute; | |
| top: 0; | |
| width: 100%;transition: .4s; | |
| } | |
| .product-hover a { | |
| background: none repeat scroll 0 0 #5a88ca; | |
| border-radius: 5px; | |
| color: #fff; | |
| display: block; | |
| font-size: 16px; | |
| left: 10%; | |
| margin: 0; | |
| padding: 10px; | |
| position: absolute; | |
| text-align: center; | |
| text-transform: uppercase; | |
| border: 1px solid #5a88ca; | |
| width: 80%;z-index: 99;transition: .4s; | |
| } | |
| .product-hover a:hover { | |
| background: #000; | |
| text-decoration: none;border-color: #444; | |
| } | |
| .product-carousel-price ins { | |
| color: #5a88ca; | |
| font-weight: 700; | |
| margin-right: 5px; | |
| text-decoration: none; | |
| } | |
| .product-hover a i.fa { | |
| margin-right: 5px; | |
| } | |
| .product-hover a.add-to-cart-link {top: -25%;} | |
| .product-hover a.view-details-link { bottom: -25%;} | |
| .single-product h2 { | |
| font-size: 18px; | |
| line-height: 25px; | |
| margin-bottom: 10px; | |
| margin-top: 15px; | |
| } | |
| .single-product h2 a { | |
| color: #222; | |
| } | |
| .single-product p { | |
| color: #5a88ca; | |
| font-weight: 700; | |
| } | |
| .single-product { | |
| overflow: hidden; | |
| } | |
| .single-product:hover {} | |
| .single-product:hover .product-hover a.add-to-cart-link {top: 32%;} | |
| .single-product:hover .product-hover a.view-details-link {bottom: 32%;} | |
| .single-product:hover .product-hover:after{left: 0} | |
| .product-carousel { | |
| padding-top: 40px; | |
| } | |
| .latest-product .owl-nav { | |
| position: absolute; | |
| right: 0; | |
| top: 0; | |
| } | |
| .latest-product .owl-nav div, .related-products-wrapper .owl-nav div { | |
| background:#fa8072; | |
| color:#FFF; | |
| display: inline-block; | |
| margin-left: 15px; | |
| padding: 1px 10px; | |
| } | |
| .latest-product .owl-nav div:hover, .brand-wrapper .owl-nav div:hover, .related-products-wrapper .owl-nav div:hover {color: #FFF; background:#f95f5f;} | |
| .brand-list {padding-top: 40px;} | |
| .brand-list .owl-nav { | |
| position: absolute; | |
| right: 0; | |
| top: 0; | |
| } | |
| .brand-wrapper .owl-nav div { | |
| border: 1px solid #fff; | |
| color: #fff; | |
| display: inline-block; | |
| margin-left: 15px; | |
| padding: 1px 10px; | |
| } | |
| .brand-wrapper .owl-nav div { | |
| background:#fa8072; | |
| color:#FFF; | |
| display: inline-block; | |
| margin-left: 15px; | |
| padding: 1px 10px; | |
| } | |
| .maincontent-area {padding-bottom: 50px; padding-top:20px;} | |
| .product-wid-title { | |
| font-family: raleway; | |
| font-size: 30px; | |
| font-weight: 100; | |
| margin-bottom: 40px; | |
| } | |
| .single-wid-product { | |
| margin-bottom: 31px; | |
| overflow: hidden; | |
| } | |
| .product-thumb { | |
| float: left; | |
| height: 90px; | |
| margin-right: 15px; | |
| width: 100px; | |
| } | |
| .single-wid-product h2 { | |
| font-size: 14px; | |
| margin-bottom: 12px; | |
| } | |
| .product-wid-rating { | |
| color: #ffc808; | |
| margin-bottom: 10px; | |
| } | |
| .product-wid-price ins { | |
| color: #5a88ca; | |
| font-weight: 700; | |
| margin-right: 10px; | |
| text-decoration: none; | |
| } | |
| .single-wid-product h2 a { | |
| color: #222; | |
| } | |
| .single-wid-product h2 a:hover, .single-product h2 a:hover { | |
| color: #5a88ca; | |
| } | |
| .wid-view-more { | |
| background: none repeat scroll 0 0 #5a88ca; | |
| color: #fff; | |
| padding: 3px 15px; | |
| position: absolute; | |
| right: 10px; | |
| top: 3px; | |
| } | |
| .wid-view-more:hover {color: #fff;background-color: #222;text-decoration: none} | |
| .single-product-widget { | |
| position: relative; | |
| } | |
| .product-widget-area { | |
| padding-bottom: 30px; | |
| padding-top: 30px; | |
| } | |
| .product-widget-area .zigzag-bottom{background: #f4f4f4;} | |
| .footer-top-area .zigzag-bottom{background: #f4f4f4} | |
| .footer-top-area {background: none repeat scroll 0 0 #333; | |
| color: #999; | |
| padding: 35px 0 180px;} | |
| .footer-bottom-area {background: #000;color: #fff} | |
| .footer-about-us span { | |
| color: #5a88ca; | |
| } | |
| .footer-wid-title { | |
| font-family: raleway; | |
| font-size: 30px; | |
| font-weight: 100;color: #fff | |
| } | |
| .footer-about-us h2 { | |
| font-weight: 200; | |
| } | |
| .footer-menu ul { | |
| list-style: outside none none; | |
| margin: 0; | |
| padding: 0; | |
| } | |
| .footer-menu ul li { | |
| border-bottom: 1px dashed #555; | |
| padding: 5px 0; | |
| } | |
| .footer-menu a { | |
| display: block; | |
| padding: 5px 0;color: #999 | |
| } | |
| .footer-social a { | |
| background: none repeat scroll 0 0 #5a88ca; | |
| color: #fff; | |
| display: inline-block; | |
| font-size: 20px; | |
| height: 40px; | |
| margin-bottom: 10px; | |
| margin-right: 10px; | |
| padding-top: 5px; | |
| text-align: center; | |
| width: 40px;border: 1px solid #5a88ca; | |
| } | |
| .footer-social a:hover {background-color: #222;border-color: #666} | |
| .footer-social {margin-top: 20px} | |
| .newsletter-form input[type="email"] { | |
| background: none repeat scroll 0 0 #fff; | |
| border: medium none; | |
| margin-bottom: 10px; | |
| padding: 10px; | |
| width: 100%; | |
| } | |
| .newsletter-form input[type="submit"] { | |
| background: none repeat scroll 0 0 #5a88ca; | |
| border: medium none; | |
| color: #fff; | |
| display: inline-block; | |
| font-size: 18px; | |
| padding: 7px 20px; | |
| text-transform: uppercase;border: 1px solid #5a88ca; | |
| } | |
| .newsletter-form input[type="submit"]:hover {background: #222;border-color: #666} | |
| .newsletter-form { | |
| margin-top: 25px; | |
| } | |
| a {color: #5a88ca} | |
| a:hover, a:focus {color: #17a78b} | |
| .footer-bottom-area { | |
| background: none repeat scroll 0 0 #000; | |
| color: #fff; | |
| padding-bottom: 40px; | |
| } | |
| .slide-bulletz { | |
| bottom: 30px; | |
| left: 0; | |
| position: absolute; | |
| text-align: center; | |
| width: 100%; | |
| z-index: 99; | |
| } | |
| ol.slide-indicators { | |
| left: inherit; | |
| list-style: outside none none; | |
| margin: 0; | |
| padding: 0; | |
| position: relative; | |
| width: 100%; | |
| } | |
| ol.slide-indicators li { | |
| background: none repeat scroll 0 0 #222; | |
| border: medium none; | |
| border-radius: 0; | |
| cursor: pointer; | |
| display: inline-block; | |
| height: 10px; | |
| margin: 0 0 0 5px; | |
| width: 10px; | |
| } | |
| ol.slide-indicators li.active { | |
| background: none repeat scroll 0 0 #fff; | |
| height: 10px; | |
| margin: 0 0 0 5px; | |
| width: 10px; | |
| } | |
| .carousel.carousel-fade .item { transition: opacity 1s ease-in-out } | |
| .carousel.carousel-fade .active.left, | |
| .carousel.carousel-fade .active.right { | |
| left: 0; | |
| z-index: 2; | |
| opacity: 0; | |
| filter: alpha(opacity=0); | |
| } | |
| .footer-card-icon { | |
| font-size: 30px; | |
| text-align: right; | |
| } | |
| .copyright > p { | |
| margin: 10px 0 0; | |
| } | |
| .product-big-title-area {background: url(img/crossword.png) repeat scroll 0 0 #5a88ca} | |
| .product-bit-title h2 { | |
| font-family: raleway; | |
| font-size: 50px; | |
| font-weight: 200; | |
| margin: 0; | |
| padding: 50px 0;color: #fff; | |
| } | |
| .single-product-area .zigzag-bottom {background-color: #f4f4f4} | |
| .single-product-area { | |
| padding: 80px 0 130px; | |
| } | |
| .sidebar-title { | |
| color: #fead53; | |
| font-size: 25px; | |
| margin-bottom: 30px; | |
| text-transform: uppercase; | |
| } | |
| .single-sidebar { | |
| margin-bottom: 50px; | |
| } | |
| input[type="text"], input[type="password"], input[type="email"], textarea { | |
| border: 1px solid #ddd; | |
| padding: 10px; | |
| } | |
| input[type="submit"], button[type=submit] { | |
| background: none repeat scroll 0 0 #5a88ca; | |
| border: medium none; | |
| color: #fff; | |
| padding: 11px 20px; | |
| text-transform: uppercase; | |
| } | |
| input[type="submit"]:hover, button[type=submit]:hover {background-color: #222} | |
| .single-sidebar input[type="text"] { | |
| margin-bottom: 10px; | |
| width: 100%; | |
| } | |
| .thubmnail-recent { | |
| margin-bottom: 30px; | |
| overflow: hidden; | |
| } | |
| .recent-thumb { | |
| float: left; | |
| height: auto; | |
| margin-right: 15px; | |
| width: 63px; | |
| } | |
| .thubmnail-recent > h2 { | |
| font-size: 20px; | |
| margin-bottom: 10px; | |
| } | |
| .thubmnail-recent > h2 a { | |
| color: #222; | |
| } | |
| .product-sidebar-price > ins { | |
| color: #5a88ca; | |
| font-weight: 700; | |
| margin-right: 10px; | |
| text-decoration: none; | |
| } | |
| .single-sidebar > ul { | |
| list-style: outside none none; | |
| margin: 0; | |
| padding: 0; | |
| } | |
| .single-sidebar li { | |
| border-bottom: 1px solid #f1f1f1; | |
| padding: 10px 0; | |
| } | |
| .single-sidebar a { | |
| display: block; | |
| } | |
| .product-breadcroumb { | |
| margin-bottom: 20px; | |
| } | |
| .product-breadcroumb > a { | |
| margin-right: 31px; | |
| position: relative; | |
| } | |
| .product-breadcroumb > a::before { | |
| content: "/"; | |
| position: absolute; | |
| right: -20px; | |
| top: 2px; | |
| } | |
| .product-breadcroumb > a:last-child::before { | |
| display: none; | |
| } | |
| .product-main-img { | |
| margin-bottom: 20px; | |
| } | |
| .product-gallery { | |
| margin-bottom: 25px; | |
| margin-left: -15px; | |
| overflow: hidden; | |
| } | |
| .product-gallery img { | |
| height: auto; | |
| margin-left: 15px; | |
| width: 76px; | |
| } | |
| .product-name { | |
| font-size: 25px; | |
| margin-bottom: 20px; | |
| } | |
| .product-inner-price { | |
| margin-bottom: 25px; | |
| } | |
| .product-inner-price > ins { | |
| color: #5a88ca; | |
| font-weight: 700; | |
| margin-right: 10px; | |
| text-decoration: none; | |
| } | |
| .quantity { | |
| float: left; | |
| margin-right: 15px; | |
| } | |
| .quantity input[type="number"] { | |
| border: 1px solid #5a88ca; | |
| padding: 5px; | |
| width: 50px; | |
| } | |
| .add_to_cart_button { | |
| background: none repeat scroll 0 0 #5a88ca; | |
| border: medium none; | |
| color: #fff; | |
| padding: 6px 25px;display: inline-block | |
| } | |
| .add_to_cart_button:hover {background-color: #222;color: #fff;text-decoration: none} | |
| form.cart { | |
| margin-bottom: 25px; | |
| } | |
| .product-inner-category { | |
| margin-bottom: 30px; | |
| } | |
| .product-tab { | |
| border-bottom: 1px solid #ddd; | |
| list-style: outside none none; | |
| margin: 0 0 30px; | |
| padding: 0; | |
| text-align: center; | |
| } | |
| .product-tab li { | |
| display: inline-block; | |
| } | |
| .product-tab li.active { | |
| background: none repeat scroll 0 0 #5a88ca; | |
| } | |
| .product-tab li.active a { | |
| color: #fff; | |
| } | |
| .product-tab li a { | |
| color: #222; | |
| display: block; | |
| font-size: 16px; | |
| padding: 10px 30px; | |
| } | |
| .product-tab li a:hover { | |
| text-decoration: none; | |
| } | |
| .product-tab li a:focus { | |
| text-decoration: none; | |
| } | |
| .tab-content h2 { | |
| font-size: 20px; | |
| } | |
| .tab-content { | |
| margin-bottom: 30px; | |
| } | |
| .submit-review label { | |
| display: block; | |
| } | |
| .submit-review input[type="text"], .submit-review input[type="email"], .submit-review textarea { | |
| margin-bottom: 20px; | |
| width: 100%; | |
| } | |
| .rating-chooser { | |
| margin-bottom: 30px; | |
| } | |
| .rating-chooser p { | |
| font-weight: 700; | |
| } | |
| .rating-wrap-post { | |
| font-size: 20px; | |
| } | |
| .submit-review textarea { | |
| height: 105px; | |
| } | |
| .related-products-wrapper { | |
| margin-top: 30px; | |
| } | |
| .related-products-title {color: #feae52; | |
| font-size: 25px; | |
| margin-bottom: 30px; | |
| text-transform: uppercase;} | |
| .related-products-wrapper .owl-nav { | |
| position: absolute; | |
| right: 0; | |
| top: -56px; | |
| } | |
| table.shop_table { | |
| border-bottom: 1px solid #ddd; | |
| border-right: 1px solid #ddd; | |
| margin-bottom: 50px; | |
| width: 100%; | |
| } | |
| table.shop_table th, table.shop_table td { | |
| border-left: 1px solid #ddd; | |
| border-top: 1px solid #ddd; | |
| padding: 15px; | |
| text-align: center; | |
| } | |
| table.shop_table th { | |
| background: none repeat scroll 0 0 #f4f4f4; | |
| font-size: 15px; | |
| text-transform: uppercase; | |
| } | |
| td.product-thumbnail img { | |
| height: auto; | |
| width: 70px; | |
| } | |
| td.product-name { | |
| font-size: 18px; | |
| } | |
| div.quantity input.plus, div.quantity input.minus { | |
| background: none repeat scroll 0 0 #5a88ca; | |
| border: medium none; | |
| color: #fff; | |
| height: 25px; | |
| line-height: 15px; | |
| width: 25px; | |
| } | |
| td.product-quantity div.quantity { | |
| float: none; | |
| margin: 0; | |
| } | |
| td.actions div.coupon { | |
| float: left; | |
| } | |
| .cart-collaterals { | |
| overflow: hidden; | |
| } | |
| .cross-sells { | |
| float: left; | |
| margin-right: 3%; | |
| width: 57%; | |
| } | |
| .cart_totals { | |
| float: right; | |
| margin-bottom: 50px; | |
| width: 40%; | |
| } | |
| .cart-collaterals h2 { | |
| color: #5a88ca; | |
| font-size: 25px; | |
| margin-bottom: 25px; | |
| text-transform: uppercase; | |
| } | |
| div.cart-collaterals ul.products { | |
| list-style: outside none none; | |
| margin: 0 0 0 -30px; | |
| padding: 0; | |
| } | |
| div.cart-collaterals ul.products li.product { | |
| float: left; | |
| margin-left: 30px; | |
| position: relative; | |
| width: 198px; | |
| } | |
| .cart_totals table { | |
| border-bottom: 1px solid #ddd; | |
| border-right: 1px solid #ddd; | |
| width: 100%; | |
| } | |
| .cart_totals table th, .cart_totals table td { | |
| border-left: 1px solid #ddd; | |
| border-top: 1px solid #ddd; | |
| padding: 10px; | |
| } | |
| .cart_totals table th { | |
| background: none repeat scroll 0 0 #f4f4f4; | |
| } | |
| .onsale { | |
| } | |
| div.cart-collaterals ul.products li.product .onsale { | |
| background: none repeat scroll 0 0 #5a88ca; | |
| color: #fff; | |
| padding: 5px 10px; | |
| position: absolute; | |
| right: 0; | |
| } | |
| div.cart-collaterals ul.products li.product h3 { | |
| color: #333; | |
| font-size: 20px; | |
| margin-top: 15px; | |
| } | |
| div.cart-collaterals ul.products li.product .price { | |
| color: #333; | |
| display: block; | |
| margin-bottom: 10px; | |
| overflow: hidden; | |
| } | |
| .price > ins { | |
| } | |
| div.cart-collaterals ul.products li.product .price ins { | |
| color: #5a88ca; | |
| font-weight: 700; | |
| margin-left: 10px; | |
| text-decoration: none; | |
| } | |
| .woocommerce-info { | |
| background: none repeat scroll 0 0 #f4f4f4; | |
| font-size: 18px; | |
| margin-bottom: 20px; | |
| padding: 15px; | |
| } | |
| .col2-set { | |
| margin-left: -30px; | |
| overflow: hidden; | |
| } | |
| .col-1, .col-2 { | |
| float: left; | |
| margin-left: 30px; | |
| width: 360px; | |
| } | |
| #customer_details label { | |
| display: block; | |
| margin: 0 0 5px; | |
| } | |
| #customer_details input[type="text"], #customer_details textarea, .shipping_calculator input[type=text] { | |
| margin-bottom: 10px; | |
| width: 100%; | |
| } | |
| #customer_details h3 { | |
| color: #5a88ca; | |
| font-size: 20px; | |
| text-transform: uppercase; | |
| } | |
| .create-account { | |
| background: none repeat scroll 0 0 #f4f4f4; | |
| margin-bottom: 50px; | |
| padding: 15px; | |
| } | |
| #order_review_heading { | |
| color: #5a88ca; | |
| font-size: 20px; | |
| text-transform: uppercase; | |
| } | |
| #payment ul.payment_methods { | |
| list-style: outside none none; | |
| margin: 0 0 30px; | |
| padding: 0; | |
| } | |
| #payment ul.payment_methods li { | |
| margin-bottom: 15px; | |
| } | |
| a.about_paypal { | |
| font-size: 12px; | |
| margin-left: 15px; | |
| } | |
| #customer_details select, .shipping_calculator select { | |
| border: 1px solid #ddd; | |
| margin-bottom: 15px; | |
| padding: 10px; | |
| width: 100%; | |
| } | |
| table.shop_table td.product-remove a { | |
| display: inline-block; | |
| padding: 0 5px 2px; | |
| text-transform: uppercase; | |
| } | |
| table.shop_table td.product-remove a:hover {color: #fff;background: red;text-decoration: none} | |
| table.shop_table td.product-name a{color: #222;} | |
| table.shop_table td.product-name a:hover {color: #5a88ca;text-decoration: none} | |
| div.quantity input.plus:hover, div.quantity input.minus:hover {background-color: #222} | |
| div.cart-collaterals ul.products li.product a:hover h3 {color: #5a88ca} | |
| div.cart-collaterals ul.products li.product a:hover {text-decoration: none} | |
| div.cart-collaterals ul.products li.product:hover .add_to_cart_button{background-color: #222} | |
| .cart-collaterals .shipping_calculator { | |
| float: right; | |
| width: 40%; | |
| } | |
| #login-form-wrap, #coupon-collapse-wrap { | |
| background: none repeat scroll 0 0 #f4f4f4; | |
| margin-bottom: 30px; | |
| padding: 25px; | |
| } | |
| #login-form-wrap label { | |
| display: block; | |
| margin-bottom: 5px; | |
| } | |
| #login-form-wrap input[type="text"], #login-form-wrap input[type="password"] { | |
| margin-bottom: 10px; | |
| width: 250px; | |
| } | |
| #login-form-wrap input[type="submit"] { | |
| margin-bottom: 15px; | |
| } | |
| .single-shop-product h2 { | |
| font-size: 20px; | |
| margin: 10px 0; | |
| } | |
| .product-option-shop { | |
| margin-top: 15px; | |
| } | |
| .single-shop-product {margin-bottom: 50px} | |
| .pagination > li > a, .pagination > li > span { | |
| color: #5a88ca; | |
| } |
| <?php | |
| // autoload.php @generated by Composer | |
| require_once __DIR__ . '/composer/autoload_real.php'; | |
| return ComposerAutoloaderInitbc250ccad023310e6a81d59e8e172d9d::getLoader(); |
| <?php | |
| // autoload_classmap.php @generated by Composer | |
| $vendorDir = dirname(dirname(__FILE__)); | |
| $baseDir = dirname($vendorDir); | |
| return array( | |
| ); |
| <?php | |
| // autoload_namespaces.php @generated by Composer | |
| $vendorDir = dirname(dirname(__FILE__)); | |
| $baseDir = dirname($vendorDir); | |
| return array( | |
| 'PayPal' => array($vendorDir . '/paypal/rest-api-sdk-php/lib'), | |
| ); |
| <?php | |
| // autoload_psr4.php @generated by Composer | |
| $vendorDir = dirname(dirname(__FILE__)); | |
| $baseDir = dirname($vendorDir); | |
| return array( | |
| 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), | |
| ); |
| <?php | |
| // autoload_real.php @generated by Composer | |
| class ComposerAutoloaderInitbc250ccad023310e6a81d59e8e172d9d | |
| { | |
| private static $loader; | |
| public static function loadClassLoader($class) | |
| { | |
| if ('Composer\Autoload\ClassLoader' === $class) { | |
| require __DIR__ . '/ClassLoader.php'; | |
| } | |
| } | |
| public static function getLoader() | |
| { | |
| if (null !== self::$loader) { | |
| return self::$loader; | |
| } | |
| spl_autoload_register(array('ComposerAutoloaderInitbc250ccad023310e6a81d59e8e172d9d', 'loadClassLoader'), true, true); | |
| self::$loader = $loader = new \Composer\Autoload\ClassLoader(); | |
| spl_autoload_unregister(array('ComposerAutoloaderInitbc250ccad023310e6a81d59e8e172d9d', 'loadClassLoader')); | |
| $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); | |
| if ($useStaticLoader) { | |
| require_once __DIR__ . '/autoload_static.php'; | |
| call_user_func(\Composer\Autoload\ComposerStaticInitbc250ccad023310e6a81d59e8e172d9d::getInitializer($loader)); | |
| } else { | |
| $map = require __DIR__ . '/autoload_namespaces.php'; | |
| foreach ($map as $namespace => $path) { | |
| $loader->set($namespace, $path); | |
| } | |
| $map = require __DIR__ . '/autoload_psr4.php'; | |
| foreach ($map as $namespace => $path) { | |
| $loader->setPsr4($namespace, $path); | |
| } | |
| $classMap = require __DIR__ . '/autoload_classmap.php'; | |
| if ($classMap) { | |
| $loader->addClassMap($classMap); | |
| } | |
| } | |
| $loader->register(true); | |
| return $loader; | |
| } | |
| } |
| <?php | |
| // autoload_static.php @generated by Composer | |
| namespace Composer\Autoload; | |
| class ComposerStaticInitbc250ccad023310e6a81d59e8e172d9d | |
| { | |
| public static $prefixLengthsPsr4 = array ( | |
| 'P' => | |
| array ( | |
| 'Psr\\Log\\' => 8, | |
| ), | |
| ); | |
| public static $prefixDirsPsr4 = array ( | |
| 'Psr\\Log\\' => | |
| array ( | |
| 0 => __DIR__ . '/..' . '/psr/log/Psr/Log', | |
| ), | |
| ); | |
| public static $prefixesPsr0 = array ( | |
| 'P' => | |
| array ( | |
| 'PayPal' => | |
| array ( | |
| 0 => __DIR__ . '/..' . '/paypal/rest-api-sdk-php/lib', | |
| ), | |
| ), | |
| ); | |
| public static function getInitializer(ClassLoader $loader) | |
| { | |
| return \Closure::bind(function () use ($loader) { | |
| $loader->prefixLengthsPsr4 = ComposerStaticInitbc250ccad023310e6a81d59e8e172d9d::$prefixLengthsPsr4; | |
| $loader->prefixDirsPsr4 = ComposerStaticInitbc250ccad023310e6a81d59e8e172d9d::$prefixDirsPsr4; | |
| $loader->prefixesPsr0 = ComposerStaticInitbc250ccad023310e6a81d59e8e172d9d::$prefixesPsr0; | |
| }, null, ClassLoader::class); | |
| } | |
| } |
| <?php | |
| /* | |
| * This file is part of Composer. | |
| * | |
| * (c) Nils Adermann <naderman@naderman.de> | |
| * Jordi Boggiano <j.boggiano@seld.be> | |
| * | |
| * For the full copyright and license information, please view the LICENSE | |
| * file that was distributed with this source code. | |
| */ | |
| namespace Composer\Autoload; | |
| /** | |
| * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. | |
| * | |
| * $loader = new \Composer\Autoload\ClassLoader(); | |
| * | |
| * // register classes with namespaces | |
| * $loader->add('Symfony\Component', __DIR__.'/component'); | |
| * $loader->add('Symfony', __DIR__.'/framework'); | |
| * | |
| * // activate the autoloader | |
| * $loader->register(); | |
| * | |
| * // to enable searching the include path (eg. for PEAR packages) | |
| * $loader->setUseIncludePath(true); | |
| * | |
| * In this example, if you try to use a class in the Symfony\Component | |
| * namespace or one of its children (Symfony\Component\Console for instance), | |
| * the autoloader will first look for the class under the component/ | |
| * directory, and it will then fallback to the framework/ directory if not | |
| * found before giving up. | |
| * | |
| * This class is loosely based on the Symfony UniversalClassLoader. | |
| * | |
| * @author Fabien Potencier <fabien@symfony.com> | |
| * @author Jordi Boggiano <j.boggiano@seld.be> | |
| * @see http://www.php-fig.org/psr/psr-0/ | |
| * @see http://www.php-fig.org/psr/psr-4/ | |
| */ | |
| class ClassLoader | |
| { | |
| // PSR-4 | |
| private $prefixLengthsPsr4 = array(); | |
| private $prefixDirsPsr4 = array(); | |
| private $fallbackDirsPsr4 = array(); | |
| // PSR-0 | |
| private $prefixesPsr0 = array(); | |
| private $fallbackDirsPsr0 = array(); | |
| private $useIncludePath = false; | |
| private $classMap = array(); | |
| private $classMapAuthoritative = false; | |
| private $missingClasses = array(); | |
| private $apcuPrefix; | |
| public function getPrefixes() | |
| { | |
| if (!empty($this->prefixesPsr0)) { | |
| return call_user_func_array('array_merge', $this->prefixesPsr0); | |
| } | |
| return array(); | |
| } | |
| public function getPrefixesPsr4() | |
| { | |
| return $this->prefixDirsPsr4; | |
| } | |
| public function getFallbackDirs() | |
| { | |
| return $this->fallbackDirsPsr0; | |
| } | |
| public function getFallbackDirsPsr4() | |
| { | |
| return $this->fallbackDirsPsr4; | |
| } | |
| public function getClassMap() | |
| { | |
| return $this->classMap; | |
| } | |
| /** | |
| * @param array $classMap Class to filename map | |
| */ | |
| public function addClassMap(array $classMap) | |
| { | |
| if ($this->classMap) { | |
| $this->classMap = array_merge($this->classMap, $classMap); | |
| } else { | |
| $this->classMap = $classMap; | |
| } | |
| } | |
| /** | |
| * Registers a set of PSR-0 directories for a given prefix, either | |
| * appending or prepending to the ones previously set for this prefix. | |
| * | |
| * @param string $prefix The prefix | |
| * @param array|string $paths The PSR-0 root directories | |
| * @param bool $prepend Whether to prepend the directories | |
| */ | |
| public function add($prefix, $paths, $prepend = false) | |
| { | |
| if (!$prefix) { | |
| if ($prepend) { | |
| $this->fallbackDirsPsr0 = array_merge( | |
| (array) $paths, | |
| $this->fallbackDirsPsr0 | |
| ); | |
| } else { | |
| $this->fallbackDirsPsr0 = array_merge( | |
| $this->fallbackDirsPsr0, | |
| (array) $paths | |
| ); | |
| } | |
| return; | |
| } | |
| $first = $prefix[0]; | |
| if (!isset($this->prefixesPsr0[$first][$prefix])) { | |
| $this->prefixesPsr0[$first][$prefix] = (array) $paths; | |
| return; | |
| } | |
| if ($prepend) { | |
| $this->prefixesPsr0[$first][$prefix] = array_merge( | |
| (array) $paths, | |
| $this->prefixesPsr0[$first][$prefix] | |
| ); | |
| } else { | |
| $this->prefixesPsr0[$first][$prefix] = array_merge( | |
| $this->prefixesPsr0[$first][$prefix], | |
| (array) $paths | |
| ); | |
| } | |
| } | |
| /** | |
| * Registers a set of PSR-4 directories for a given namespace, either | |
| * appending or prepending to the ones previously set for this namespace. | |
| * | |
| * @param string $prefix The prefix/namespace, with trailing '\\' | |
| * @param array|string $paths The PSR-4 base directories | |
| * @param bool $prepend Whether to prepend the directories | |
| * | |
| * @throws \InvalidArgumentException | |
| */ | |
| public function addPsr4($prefix, $paths, $prepend = false) | |
| { | |
| if (!$prefix) { | |
| // Register directories for the root namespace. | |
| if ($prepend) { | |
| $this->fallbackDirsPsr4 = array_merge( | |
| (array) $paths, | |
| $this->fallbackDirsPsr4 | |
| ); | |
| } else { | |
| $this->fallbackDirsPsr4 = array_merge( | |
| $this->fallbackDirsPsr4, | |
| (array) $paths | |
| ); | |
| } | |
| } elseif (!isset($this->prefixDirsPsr4[$prefix])) { | |
| // Register directories for a new namespace. | |
| $length = strlen($prefix); | |
| if ('\\' !== $prefix[$length - 1]) { | |
| throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); | |
| } | |
| $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; | |
| $this->prefixDirsPsr4[$prefix] = (array) $paths; | |
| } elseif ($prepend) { | |
| // Prepend directories for an already registered namespace. | |
| $this->prefixDirsPsr4[$prefix] = array_merge( | |
| (array) $paths, | |
| $this->prefixDirsPsr4[$prefix] | |
| ); | |
| } else { | |
| // Append directories for an already registered namespace. | |
| $this->prefixDirsPsr4[$prefix] = array_merge( | |
| $this->prefixDirsPsr4[$prefix], | |
| (array) $paths | |
| ); | |
| } | |
| } | |
| /** | |
| * Registers a set of PSR-0 directories for a given prefix, | |
| * replacing any others previously set for this prefix. | |
| * | |
| * @param string $prefix The prefix | |
| * @param array|string $paths The PSR-0 base directories | |
| */ | |
| public function set($prefix, $paths) | |
| { | |
| if (!$prefix) { | |
| $this->fallbackDirsPsr0 = (array) $paths; | |
| } else { | |
| $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; | |
| } | |
| } | |
| /** | |
| * Registers a set of PSR-4 directories for a given namespace, | |
| * replacing any others previously set for this namespace. | |
| * | |
| * @param string $prefix The prefix/namespace, with trailing '\\' | |
| * @param array|string $paths The PSR-4 base directories | |
| * | |
| * @throws \InvalidArgumentException | |
| */ | |
| public function setPsr4($prefix, $paths) | |
| { | |
| if (!$prefix) { | |
| $this->fallbackDirsPsr4 = (array) $paths; | |
| } else { | |
| $length = strlen($prefix); | |
| if ('\\' !== $prefix[$length - 1]) { | |
| throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); | |
| } | |
| $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; | |
| $this->prefixDirsPsr4[$prefix] = (array) $paths; | |
| } | |
| } | |
| /** | |
| * Turns on searching the include path for class files. | |
| * | |
| * @param bool $useIncludePath | |
| */ | |
| public function setUseIncludePath($useIncludePath) | |
| { | |
| $this->useIncludePath = $useIncludePath; | |
| } | |
| /** | |
| * Can be used to check if the autoloader uses the include path to check | |
| * for classes. | |
| * | |
| * @return bool | |
| */ | |
| public function getUseIncludePath() | |
| { | |
| return $this->useIncludePath; | |
| } | |
| /** | |
| * Turns off searching the prefix and fallback directories for classes | |
| * that have not been registered with the class map. | |
| * | |
| * @param bool $classMapAuthoritative | |
| */ | |
| public function setClassMapAuthoritative($classMapAuthoritative) | |
| { | |
| $this->classMapAuthoritative = $classMapAuthoritative; | |
| } | |
| /** | |
| * Should class lookup fail if not found in the current class map? | |
| * | |
| * @return bool | |
| */ | |
| public function isClassMapAuthoritative() | |
| { | |
| return $this->classMapAuthoritative; | |
| } | |
| /** | |
| * APCu prefix to use to cache found/not-found classes, if the extension is enabled. | |
| * | |
| * @param string|null $apcuPrefix | |
| */ | |
| public function setApcuPrefix($apcuPrefix) | |
| { | |
| $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; | |
| } | |
| /** | |
| * The APCu prefix in use, or null if APCu caching is not enabled. | |
| * | |
| * @return string|null | |
| */ | |
| public function getApcuPrefix() | |
| { | |
| return $this->apcuPrefix; | |
| } | |
| /** | |
| * Registers this instance as an autoloader. | |
| * | |
| * @param bool $prepend Whether to prepend the autoloader or not | |
| */ | |
| public function register($prepend = false) | |
| { | |
| spl_autoload_register(array($this, 'loadClass'), true, $prepend); | |
| } | |
| /** | |
| * Unregisters this instance as an autoloader. | |
| */ | |
| public function unregister() | |
| { | |
| spl_autoload_unregister(array($this, 'loadClass')); | |
| } | |
| /** | |
| * Loads the given class or interface. | |
| * | |
| * @param string $class The name of the class | |
| * @return bool|null True if loaded, null otherwise | |
| */ | |
| public function loadClass($class) | |
| { | |
| if ($file = $this->findFile($class)) { | |
| includeFile($file); | |
| return true; | |
| } | |
| } | |
| /** | |
| * Finds the path to the file where the class is defined. | |
| * | |
| * @param string $class The name of the class | |
| * | |
| * @return string|false The path if found, false otherwise | |
| */ | |
| public function findFile($class) | |
| { | |
| // class map lookup | |
| if (isset($this->classMap[$class])) { | |
| return $this->classMap[$class]; | |
| } | |
| if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { | |
| return false; | |
| } | |
| if (null !== $this->apcuPrefix) { | |
| $file = apcu_fetch($this->apcuPrefix.$class, $hit); | |
| if ($hit) { | |
| return $file; | |
| } | |
| } | |
| $file = $this->findFileWithExtension($class, '.php'); | |
| // Search for Hack files if we are running on HHVM | |
| if (false === $file && defined('HHVM_VERSION')) { | |
| $file = $this->findFileWithExtension($class, '.hh'); | |
| } | |
| if (null !== $this->apcuPrefix) { | |
| apcu_add($this->apcuPrefix.$class, $file); | |
| } | |
| if (false === $file) { | |
| // Remember that this class does not exist. | |
| $this->missingClasses[$class] = true; | |
| } | |
| return $file; | |
| } | |
| private function findFileWithExtension($class, $ext) | |
| { | |
| // PSR-4 lookup | |
| $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; | |
| $first = $class[0]; | |
| if (isset($this->prefixLengthsPsr4[$first])) { | |
| $subPath = $class; | |
| while (false !== $lastPos = strrpos($subPath, '\\')) { | |
| $subPath = substr($subPath, 0, $lastPos); | |
| $search = $subPath.'\\'; | |
| if (isset($this->prefixDirsPsr4[$search])) { | |
| foreach ($this->prefixDirsPsr4[$search] as $dir) { | |
| $length = $this->prefixLengthsPsr4[$first][$search]; | |
| if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { | |
| return $file; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| // PSR-4 fallback dirs | |
| foreach ($this->fallbackDirsPsr4 as $dir) { | |
| if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { | |
| return $file; | |
| } | |
| } | |
| // PSR-0 lookup | |
| if (false !== $pos = strrpos($class, '\\')) { | |
| // namespaced class name | |
| $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) | |
| . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); | |
| } else { | |
| // PEAR-like class name | |
| $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; | |
| } | |
| if (isset($this->prefixesPsr0[$first])) { | |
| foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { | |
| if (0 === strpos($class, $prefix)) { | |
| foreach ($dirs as $dir) { | |
| if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { | |
| return $file; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| // PSR-0 fallback dirs | |
| foreach ($this->fallbackDirsPsr0 as $dir) { | |
| if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { | |
| return $file; | |
| } | |
| } | |
| // PSR-0 include paths. | |
| if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { | |
| return $file; | |
| } | |
| return false; | |
| } | |
| } | |
| /** | |
| * Scope isolated include. | |
| * | |
| * Prevents access to $this/self from included files. | |
| */ | |
| function includeFile($file) | |
| { | |
| include $file; | |
| } |
| [ | |
| { | |
| "name": "psr/log", | |
| "version": "1.0.2", | |
| "version_normalized": "1.0.2.0", | |
| "source": { | |
| "type": "git", | |
| "url": "https://github.com/php-fig/log.git", | |
| "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" | |
| }, | |
| "dist": { | |
| "type": "zip", | |
| "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", | |
| "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", | |
| "shasum": "" | |
| }, | |
| "require": { | |
| "php": ">=5.3.0" | |
| }, | |
| "time": "2016-10-10T12:19:37+00:00", | |
| "type": "library", | |
| "extra": { | |
| "branch-alias": { | |
| "dev-master": "1.0.x-dev" | |
| } | |
| }, | |
| "installation-source": "dist", | |
| "autoload": { | |
| "psr-4": { | |
| "Psr\\Log\\": "Psr/Log/" | |
| } | |
| }, | |
| "notification-url": "https://packagist.org/downloads/", | |
| "license": [ | |
| "MIT" | |
| ], | |
| "authors": [ | |
| { | |
| "name": "PHP-FIG", | |
| "homepage": "http://www.php-fig.org/" | |
| } | |
| ], | |
| "description": "Common interface for logging libraries", | |
| "homepage": "https://github.com/php-fig/log", | |
| "keywords": [ | |
| "log", | |
| "psr", | |
| "psr-3" | |
| ] | |
| }, | |
| { | |
| "name": "paypal/rest-api-sdk-php", | |
| "version": "1.11.0", | |
| "version_normalized": "1.11.0.0", | |
| "source": { | |
| "type": "git", | |
| "url": "https://github.com/paypal/PayPal-PHP-SDK.git", | |
| "reference": "7e664f12be32b975575371e8ad3bc17b6b318851" | |
| }, | |
| "dist": { | |
| "type": "zip", | |
| "url": "https://api.github.com/repos/paypal/PayPal-PHP-SDK/zipball/7e664f12be32b975575371e8ad3bc17b6b318851", | |
| "reference": "7e664f12be32b975575371e8ad3bc17b6b318851", | |
| "shasum": "" | |
| }, | |
| "require": { | |
| "ext-curl": "*", | |
| "ext-json": "*", | |
| "php": ">=5.3.0", | |
| "psr/log": "^1.0.0" | |
| }, | |
| "require-dev": { | |
| "phpunit/phpunit": "3.7.*" | |
| }, | |
| "time": "2016-12-14T21:59:21+00:00", | |
| "type": "library", | |
| "installation-source": "dist", | |
| "autoload": { | |
| "psr-0": { | |
| "PayPal": "lib/" | |
| } | |
| }, | |
| "notification-url": "https://packagist.org/downloads/", | |
| "license": [ | |
| "Apache-2.0" | |
| ], | |
| "authors": [ | |
| { | |
| "name": "PayPal", | |
| "homepage": "https://github.com/paypal/rest-api-sdk-php/contributors" | |
| } | |
| ], | |
| "description": "PayPal's PHP SDK for REST APIs", | |
| "homepage": "http://paypal.github.io/PayPal-PHP-SDK/", | |
| "keywords": [ | |
| "payments", | |
| "paypal", | |
| "rest", | |
| "sdk" | |
| ] | |
| } | |
| ] |
| Copyright (c) Nils Adermann, Jordi Boggiano | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is furnished | |
| to do so, subject to the following conditions: | |
| The above copyright notice and this permission notice shall be included in all | |
| copies or substantial portions of the Software. | |
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
| THE SOFTWARE. | |
| # .coveralls.yml configuration | |
| # for php-coveralls | |
| src_dir: lib | |
| coverage_clover: build/coverage/clover.xml | |
| json_path: build/coverage/coveralls-upload.json |
| # EditorConfig: Manage project indentation rules. http://EditorConfig.org | |
| root = true | |
| [*] | |
| end_of_line = lf | |
| insert_final_newline = true | |
| [*.php] | |
| indent_style = space | |
| indent_size = 4 |
| build | |
| .DS_Store | |
| phpunit.local.xml | |
| *.log | |
| # IDE | |
| .idea | |
| .project | |
| .settings | |
| .buildpath | |
| atlassian-ide-plugin.xml | |
| *.bak | |
| # Composer | |
| vendor | |
| composer.lock | |
| composer.phar | |
| # Project | |
| var | |
| tools | |
| # Groc | |
| node_modules |
| #### releasinator config #### | |
| configatron.product_name = "PayPal-PHP-SDK" | |
| # List of items to confirm from the person releasing. Required, but empty list is ok. | |
| configatron.prerelease_checklist_items = [ | |
| "Sanity check the master branch." | |
| ] | |
| def validate_version_match() | |
| if constant_version() != @current_release.version | |
| Printer.fail("lib/PayPal/Core/PayPalConstants.php version #{constant_version} does not match changelog version #{@current_release.version}.") | |
| abort() | |
| end | |
| Printer.success("Plugin.xml version #{constant_version} matches latest changelog version.") | |
| end | |
| def validate_tests() | |
| CommandProcessor.command("vendor/bin/phpunit", live_output=true) | |
| end | |
| configatron.custom_validation_methods = [ | |
| method(:validate_version_match), | |
| method(:validate_tests) | |
| ] | |
| # there are no separate build steps for PayPal-PHP-SDK, so it is just empty method | |
| def build_method | |
| end | |
| # The command that builds the sdk. Required. | |
| configatron.build_method = method(:build_method) | |
| # Creating and pushing a tag will automatically create a release, so it is just empty method | |
| def publish_to_package_manager(version) | |
| end | |
| # The method that publishes the sdk to the package manager. Required. | |
| configatron.publish_to_package_manager_method = method(:publish_to_package_manager) | |
| def create_downloadable_zip(version) | |
| sleep(120) | |
| CommandProcessor.command("rm -rf temp; mkdir temp; cd temp; composer clear-cache; composer require 'paypal/rest-api-sdk-php:#{version}'", live_output=true) | |
| CommandProcessor.command("cd temp; mv vendor PayPal-PHP-SDK", live_output=true) | |
| CommandProcessor.command("cd temp; zip -r PayPal-PHP-SDK-#{version}.zip PayPal-PHP-SDK", live_output=true) | |
| end | |
| def add_to_release(version) | |
| sleep(30) | |
| Publisher.new(@releasinator_config).upload_asset(GitUtil.repo_url, @current_release, "temp/PayPal-PHP-SDK-#{version}.zip", "application/zip") | |
| end | |
| configatron.post_push_methods = [ | |
| method(:create_downloadable_zip), | |
| method(:add_to_release) | |
| ] | |
| def wait_for_package_manager(version) | |
| end | |
| # The method that waits for the package manager to be done. Required | |
| configatron.wait_for_package_manager_method = method(:wait_for_package_manager) | |
| # Whether to publish the root repo to GitHub. Required. | |
| configatron.release_to_github = true | |
| def constant_version() | |
| File.open("lib/PayPal/Core/PayPalConstants.php", 'r') do |f| | |
| f.each_line do |line| | |
| if line.match (/SDK_VERSION = \'\d+\.\d+\.\d+\'/) | |
| return line.strip.split('= ')[1].strip.split('\'')[1] | |
| end | |
| end | |
| end | |
| end |
| sudo: false | |
| language: php | |
| php: | |
| - 5.3 | |
| - 5.4 | |
| - 5.5 | |
| - 5.6 | |
| - 7.0 | |
| - hhvm | |
| matrix: | |
| allow_failures: | |
| - php: hhvm | |
| fast_finish: true | |
| before_script: | |
| - composer self-update | |
| - composer install --dev | |
| - composer require satooshi/php-coveralls:* --dev | |
| script: | |
| - mkdir build | |
| - mkdir build/coverage | |
| - phpunit | |
| after_success: | |
| - php vendor/bin/coveralls -v -c .coveralls.yml | |
| - if [ $TRAVIS_PHP_VERSION = '5.6' ] && [ $TRAVIS_BRANCH = 'master' ] && [ $TRAVIS_PULL_REQUEST = 'false' ]; then sh generate-api.sh; fi | |
| notifications: | |
| email: | |
| recipients: | |
| - DL-PP-PHP-SDK@paypal.com | |
| on_success: change | |
| env: | |
| global: | |
| secure: UazgSLMJmrhmO+Do9TDiu8EKop06Xc2Ghi9F/8rx/CLz2FDZ5UDdzDD8uetjfdOnmMV7oadq13FGxJb9YCqTiJPZFpKsGtEr/IcCdpkO2krluLuWw5Veh8YxRG4rcZ+UWS0JpfQ72L9Zp4dMqPRo8SzcfiZV3HMG1uKYKpTSKnM= |
echo on PayPalModel Objects will print nice looking JSON.