Advertisement
Guest User

Untitled

a guest
Mar 18th, 2021
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.51 KB | None | 0 0
  1. <?php
  2. foreach($Etiquetas as $indice => $EtiquetaContenido)
  3. {
  4. if($SeleccionUsuario['impresion']=="DT")
  5. {
  6. if( !in_array($EtiquetaContenido,$StockEnvio) && $SeleccionUsuario['impresion']==$EtiquetaContenido['impresion'] && $SeleccionUsuario['od'] >= $EtiquetaContenido['od'] && $SeleccionUsuario['anchomin'] <= $EtiquetaContenido['ancho'] && $SeleccionUsuario['anchomax'] >= $EtiquetaContenido['ancho'] && $EtiquetaContenido['material']==$Material )
  7. {
  8. //echo $EtiquetaContenido['impresion'];
  9. if($contador % 3 ==0 ){
  10. //echo $contador;
  11. echo "</div>";
  12. echo "<div class='row '>";
  13. echo "<div class='col-sm-4'>";
  14. require "templates/imgtemplate.php";
  15. echo "</div>";
  16.  
  17.  
  18. }
  19. if($contador % 3 !==0 ){
  20. //echo $contador;
  21.  
  22. echo "<div class='col-sm-4'>";
  23. require "templates/imgtemplate.php";
  24. echo "</div>";
  25.  
  26.  
  27. }
  28.  
  29. $contador++;
  30. }
  31. }
  32.  
  33. /********************************** Inside imgtemplate.php**********************/
  34.  
  35.  
  36.  
  37.  
  38. foreach($imagesplit as $image)
  39. {
  40. //Seleccion para cada tipo de imagen
  41. if($EtiquetaContenido['ancho']==$image["width"] && $EtiquetaContenido['alto']==$image["height"])
  42. {
  43.  
  44. if($EtiquetaContenido['material']=="void" && $image['type']=="void")
  45. {
  46.  
  47. $patron ='/\./';
  48. $replace='-';
  49. array_push($StockEnvio,$EtiquetaContenido);
  50. echo "
  51. <input type='checkbox' name='cotizado' class='color check' value=$contador id='check$contador' ".$EtiquetaContenido['impresion']." />
  52. <label for 'cotizado$contador' id='cotizado$contador' style='background-image:url(\"./img/sizes/void/".preg_replace($patron,$replace,$image["width"])."_".preg_replace($patron,$replace,$image["height"]).".png \");' class='rol-selector paddingImage CheckOther' onclick=clickear('check$contador','cotizado$contador') data-my-tooltip='Cantidad de rollos por caja:".$EtiquetaContenido['rxc']."\nCantidad de etiquetas por rollo:".$EtiquetaContenido['etiquetasxr']."\nColor de etiqueta:".$EtiquetaContenido['color']."' ></label>";
  53. echo "</div>";
  54. }
  55.  
  56. if($image['type']!="void" && $EtiquetaContenido['material']!="void")
  57. {
  58.  
  59. //echo "else";
  60. $patron ='/\./';
  61. $replace='-';
  62. array_push($StockEnvio,$EtiquetaContenido);
  63. echo "
  64. <input type='checkbox' name='cotizado' class='color check' value=$contador id='check$contador' ".$EtiquetaContenido['impresion']." />
  65. <label for 'cotizado$contador' id='cotizado$contador' style='background-image:url(\"./img/sizes/plain/".preg_replace($patron,$replace,$image["width"])."_".preg_replace($patron,$replace,$image["height"]).".png \");' class='rol-selector paddingImage CheckOther' onclick=clickear('check$contador','cotizado$contador') data-my-tooltip='Cantidad de rollos por caja:".$EtiquetaContenido['rxc']."\nCantidad de etiquetas por rollo:".$EtiquetaContenido['etiquetasxr']."\nColor de etiqueta:".$EtiquetaContenido['color']."' ></label>";
  66. }
  67. }
  68.  
  69. else
  70. {
  71. $HasImage=false;
  72. }
  73. }
  74. if($HasImage==false && !in_array($EtiquetaContenido,$StockEnvio) ){
  75. array_push($StockEnvio,$EtiquetaContenido);
  76.  
  77. if($contarelse==false){
  78. echo "
  79.  
  80. <table class='tabla'>
  81.  
  82. <tr>
  83. <th>Impresion</th>
  84. <th>color</th>
  85. <th>alto</th>
  86. <th>ancho</th>
  87. <th>Material</th>
  88. <th>Selección</th>
  89. </tr>
  90. ";
  91.  
  92. }
  93.  
  94. $contarelse=true;
  95. echo "
  96. <tr>
  97. <td>".$EtiquetaContenido['impresion']."</td>
  98. <td>".$EtiquetaContenido['color']."</td>
  99. <td>".$EtiquetaContenido['alto']."</td>
  100. <td>".$EtiquetaContenido['ancho']."</td>
  101. <td>".$EtiquetaContenido['material']."</td>
  102. <td><center><input type='checkbox' name='cotizado' class='CheckOther' value=$contador id='check$contador' />&nbsp;</center>
  103. </td>
  104.  
  105. </tr>
  106. ";
  107.  
  108.  
  109. }
  110.  
  111.  
  112.  
  113.  
  114. ?>
  115.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement