Advertisement
Guest User

Untitled

a guest
Mar 6th, 2017
493
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.92 KB | None | 0 0
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html" charset="iso-8859-1" />
  4.  
  5.  
  6.  
  7. <title>MacroFer Paseo Ferretero S.A.</title>
  8. <?php
  9. error_reporting(0);
  10. header('Content-Type: text/html; charset=ISO-8859-1');
  11. ?>
  12.  
  13. <?php
  14. ini_set('max_execution_time', 300);
  15. session_start();
  16. if(isset($_SESSION['nombre']))
  17. {
  18.  
  19.  
  20. ?>
  21.  
  22. <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.13/css/dataTables.bootstrap.min.css"/>
  23. <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/responsive/2.1.1/css/responsive.bootstrap.min.css"/>
  24. <link rel="stylesheet" type="text/css" href="resources/css/footer.css"/>
  25. <link rel="stylesheet" type="text/css" href="resources/css/menu.css"/>
  26. <style>
  27. .badge-notify{
  28. background:red;
  29. position:relative;
  30. top: -20px;
  31. right: 10px;
  32. }
  33. .my-cart-icon-affix {
  34. position: fixed;
  35. z-index: 999;
  36. }
  37. </style>
  38.  
  39. </head>
  40. <script>
  41. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  42. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  43. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  44. })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
  45.  
  46. ga('create', 'UA-92529978-1', 'auto');
  47. ga('send', 'pageview');
  48.  
  49. </script>
  50. <link rel="stylesheet" href="css/bootstrap.min.css">
  51.  
  52. <script type="text/javascript" src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
  53. <script type="text/javascript" src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>
  54. <script type="text/javascript" src="https://cdn.datatables.net/1.10.13/js/dataTables.bootstrap.min.js"></script>
  55. <script src="js/jquery.mycart.js"></script>
  56. <!--<script type="text/javascript" src="https://cdn.datatables.net/responsive/2.1.1/js/dataTables.responsive.min.js"></script>
  57. --><script type="text/javascript" src="https://cdn.datatables.net/responsive/2.1.1/js/responsive.bootstrap.min.js"></script>
  58. <script type="text/javascript" src="resources/scripts/config_datatable_api.js" ></script>
  59. <script type="text/javascript" src="resources/scripts/tabla.js" ></script>
  60. <script type="text/javascript" src="resources/scripts/main.js" ></script>
  61. <script>
  62. $(document).ready(function() {
  63. var table = $('#sale').DataTable();
  64.  
  65. $('#sale tbody').on( 'click', 'tr', function () {
  66. if ( $(this).hasClass('selected') ) {
  67. $(this).removeClass('selected');
  68. }
  69. else {
  70. table.$('tr.selected').removeClass('selected');
  71. $(this).addClass('selected');
  72. }
  73. } )});
  74. </script>
  75. <body class="container">
  76. <header>
  77. <div id="contenedor" style="background:#00A859;">
  78. <nav class="menu" >
  79. <ul>
  80. <li><a href="conversion.php">Productos</a></li>
  81. <li><a href="conversion.php">Tabla de conversion</a></li>
  82. <li><a href="logout.php">Desconectar</a></li>
  83. <li><a href="#"style="position: fixed; right:150px; top:0px;">Mi cuenta</a></li>
  84. <li><h1 style=" cursor:pointer; position:fixed; right:100px; top:-8px;">
  85. <span class="glyphicon glyphicon-shopping-cart my-cart-icon"><span class="badge badge-notify my-cart-badge"></span></span>
  86.  
  87. </h1></li>
  88. </ul>
  89. </nav>
  90. </div>
  91. </header>
  92. <div class="container">
  93. <?php include 'bootstrap-slider.html';?>
  94. <img src="resources/images/logos.png" border='0'></img>
  95.  
  96.  
  97.  
  98.  
  99. <div class="container">
  100.  
  101. <div class="clear"></div> <!-- End .clear -->
  102.  
  103. <div style="width: 100%"class="table table-striped table-hover dt-responsive display nowrap"><!-- Start Content Box -->
  104.  
  105. <div class="content-box-header">
  106. <h3>Listado de productos ( Los precios no incluyen IVA.)</h3>
  107. </div> <!-- End .content-box-header -->
  108.  
  109. <div class="clear"></div>
  110. <div style="width: 100%; padding-left: -10px;" class="content-box-content" class="table table-striped table-hover dt-responsive display nowrap" cellspacing="0">
  111.  
  112. <div class="table-responsive" id="tab1e"> <!-- This is the target div. id must match the href of this div's tab -->
  113.  
  114. <table id="sale" >
  115. <thead>
  116.  
  117. <tr>
  118.  
  119. <!--<th><input class="check-all" type="checkbox" /></th>-->
  120.  
  121. <th>Comprar</th>
  122. <th>Imágen</th>
  123. <th>Codigo</th>
  124. <th>Categoria</th>
  125. <th>Marca</th>
  126. <th>Descripción</th>
  127. <th>Precio</th>
  128. <th> ** </th>
  129.  
  130. </tr>
  131.  
  132. </thead>
  133.  
  134.  
  135. </tr>
  136. </tfoot>
  137. <tbody id="prueba">
  138.  
  139. <?php
  140. include 'Productos.php';
  141. // recorre el array con el contador para mostrar todos
  142. // los productos activados
  143. if ($i <= $count){
  144. foreach($data as $k => $valor){
  145. if(($valor['publicaecommerce'] == 1) )
  146. {
  147. if(($valor['tipodeproducto'] == 'MAYORISTA') OR ($valor['tipodeproducto'] == 'AMBOS')) {
  148. if (($valor['activo'] == 1)){
  149. ?>
  150. <div>
  151. <tr id="prueba2">
  152.  
  153.  
  154. <td><button href="#" class="btn btn-danger my-cart-btn" data-id="<?php echo $valor['codigo'];?>" data-name="<?php echo $valor['descripcion'];?>" data-summary="summary 1" data-price="<?php echo $valor['precio1'];?>" data-quantity="1" data-image="<?php echo $valor['foto'];?>"><img src="resources/images/carrito.png" /></button>
  155.  
  156. </td>
  157. <td><a href="#0" onclick="window.open('<?php if(empty($valor['foto']))
  158. echo 'img/nodis.jpg';
  159. else
  160. echo $valor['foto']; ?>','TITULO','width =550,height=400' );"><img
  161. src="<?php if(empty($valor['foto']))
  162. echo 'img/nodis.jpg';
  163. else
  164. echo $valor['foto'];
  165.  
  166. ?>" border='0' width='50' height='50'> </td>
  167. <td><?php echo $valor['codigo']; ?> <input type="hidden" name="product_code" value="<?php echo $valor ['codigo']?>"></input></td>
  168. <td><?php echo $valor['familia'] ;?></td>
  169. <td><?php echo $valor['marca']; ?></td>
  170. <td><?php echo $valor['descripcion'] ;?> <input type="hidden" name="product_name" value="<?php echo $valor ['descripcion']?>"></input></td>
  171. <td><?php
  172. if ($valor['precio1'] <= 0)
  173. echo "Sin disponibilidad";
  174. else{ echo '$';
  175. echo ceil($valor['precio1']);} ?> <input type="hidden" name="product_price" value="<?php echo $valor ['precio1']?>"></input></td>
  176. <td><?php if ($valor['uso'] == 'SE FACTURA')
  177. { echo $valor['poriva'];echo '% ';} ?></td>
  178.  
  179.  
  180. </tr> </div> <?php }
  181. }}}
  182.  
  183. }?>
  184. </tbody>
  185.  
  186. </table>
  187.  
  188. <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
  189. <script src="js/jquery.mycart.js"></script>
  190. <script type="text/javascript" src="js/bootstrap.min.js"></script>
  191.  
  192.  
  193. <script>
  194. $(function () {
  195.  
  196. var goToCartIcon = function($addTocartBtn){
  197. var $cartIcon = $(".my-cart-icon");
  198. var $image = $('<img width="30px" height="30px" src="' + $addTocartBtn.data("image") + '"/>').css({"position": "fixed", "z-index": "999"});
  199. $addTocartBtn.prepend($image);
  200. var position = $cartIcon.position();
  201. $image.animate({
  202. top: position.top,
  203. left: position.left
  204. }, 500 , "linear", function() {
  205. $image.remove();
  206. });
  207. }
  208.  
  209. $('.my-cart-btn').myCart({
  210. currencySymbol: '$',
  211. classCartIcon: 'my-cart-icon',
  212. classCartBadge: 'my-cart-badge',
  213. classProductQuantity: 'my-product-quantity',
  214. classProductRemove: 'my-product-remove',
  215. classCheckoutCart: 'my-cart-checkout',
  216. affixCartIcon: true,
  217. showCheckoutModal: true,
  218. checkoutCart: function(products) {
  219. $.each(products, function(){
  220. console.log(this);
  221. });
  222. },
  223. clickOnAddToCart: function($addTocart){
  224. goToCartIcon($addTocart);
  225. },
  226. afterAddOnCart: function(products, totalPrice, totalQuantity) {
  227. console.log("afterAddOnCart", products, totalPrice, totalQuantity);
  228. },
  229. clickOnCartIcon: function($cartIcon, products, totalPrice, totalQuantity) {
  230. console.log("cart icon clicked", $cartIcon, products, totalPrice, totalQuantity);
  231. },
  232. checkoutCart: function(products, totalPrice, totalQuantity) {
  233. var checkoutString = "Total Price: " + totalPrice + "\nTotal Quantity: " + totalQuantity;
  234. checkoutString += "\n\n id \t name \t summary \t price \t quantity \t image path";
  235. $.each(products, function(){
  236. checkoutString += ("\n " + this.id + " \t " + this.name + " \t " + this.summary + " \t " + this.price + " \t " + this.quantity + " \t " + this.image);
  237. });
  238. alert(checkoutString)
  239. console.log("checking out", products, totalPrice, totalQuantity);
  240. },
  241. getDiscountPrice: function(products, totalPrice, totalQuantity) {
  242. console.log("calculating discount", products, totalPrice, totalQuantity);
  243. return totalPrice ;
  244. }
  245. });
  246.  
  247. });
  248. </script>
  249. </body>
  250. </div> <!-- End #tab1 -->
  251.  
  252.  
  253.  
  254. </div> <!-- End .content-box-content -->
  255.  
  256.  
  257. </div>
  258. <!--
  259. </a>
  260. <div class="shopping-cart-box">
  261. <a href="#" class="close-shopping-cart-box" >Close</a>
  262. <h3>Your Shopping Cart</h3>
  263. <div id="shopping-cart-results">
  264. <script>
  265. $( ".close-shopping-cart-box").click(function(e){ //user click on cart box close link
  266. e.preventDefault();
  267. $(".shopping-cart-box").fadeOut(); //close cart-box
  268. });
  269.  
  270. $( ".cart-box").click(function(e) { //when user clicks on cart box
  271. e.preventDefault();
  272. $(".shopping-cart-box").fadeIn(); //display cart box
  273. $("#shopping-cart-results").html('<img src="images/ajax-loader.gif">'); //show loading image
  274. $("#shopping-cart-results" ).load( "cart_process.php", {"load_cart":"1"}); //Make ajax request using jQuery Load() & update results
  275. });
  276. </script>-->
  277. </ul> <!-- End #main-nav -->
  278.  
  279. <!-- End #sidebar -->
  280.  
  281.  
  282.  
  283.  
  284. <div class="container" class="content"> <!-- Main Content Section with everything -->
  285.  
  286. <div class="copy-right-grids">
  287. <div class="copy-left">
  288. <p class="footer-gd">© Copyright <?php echo date("Y");?> | <a href="https://www.facebook.com/mattuqui.blanco">Matias Blanco - Diseños Web</a> |
  289. <a id="scroll-top" href="#" title="Go to Top">Arriba</a></p>
  290. </div>
  291. <div class="copy-right">
  292. <ul>
  293. </ul>
  294. </div>
  295. <div class="clear"></div>
  296. </div>
  297.  
  298. </div> <!-- End #main-content -->
  299.  
  300. </div>
  301.  
  302. <?php
  303. }else {
  304. echo "Estás accediendo a una página restringida, para ver su contenido debes estar registrado.<br />
  305. <a href='mayoristas.html'>Ingresar</a>";
  306. }
  307. ?>
  308.  
  309. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement