Changeset 27781 for extensions/MyPiwiShop/admin/MyPiwiShopBatchUnit.php
- Timestamp:
- Mar 16, 2014, 7:16:27 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/MyPiwiShop/admin/MyPiwiShopBatchUnit.php
r27743 r27781 1 1 <?php 2 2 defined('MPS_PATH') or die('Hacking attempt!'); 3 /* * 4 *** submit change 5 **/ 3 4 //change product check 5 if(isset($_POST['imgid'])) { 6 $imgid = $_POST['imgid']; 7 $imgen = array($imgid); 8 9 if (!isset($_POST['productcheck'])) { 10 delet_Allproduct_Thisimage($imgid); 11 } else { 12 $product_id = $_POST['productcheck']; 13 add_product_Thisimage($product_id, $imgen); 14 } 15 } 6 16 7 if(isset($_POST['imgid'])) 8 { 9 $imgid = $_POST['imgid']; 10 $imgen = array($imgid); 11 if (!isset($_POST['productcheck'])) { 12 deletThis_image_Allproduct($imgid); 13 } 14 else{ 15 16 $product_id = $_POST['productcheck']; 17 add_product_Thisimage($product_id, $imgen); 18 } 19 } 20 21 22 global $template, $element_ids; 17 //set batch manager unit 18 global $template, $element_ids; 23 19 24 $query='SELECT * FROM '.MPS_PRODUCT_TABLE.' ORDER BY `order`;'; 20 $query=' 21 SELECT `id`, `product`, `noteAdmin`, `price` 22 FROM '.MPS_PRODUCT_TABLE.' 23 ORDER BY `order` 24 ;'; 25 25 $result = pwg_query($query); 26 $products = array();27 26 28 27 while($row = pwg_db_fetch_assoc($result)){ 29 $products[]= $row;28 $products[]= $row; 30 29 } 31 30 32 $query='SELECT * FROM '.MPS_CONF_TABLE.';'; 33 $result = pwg_query($query); 31 $query=' 32 SELECT * 33 FROM '.MPS_CONF_TABLE.';'; 34 $result = pwg_query($query); 35 34 36 while($row = pwg_db_fetch_assoc($result)){ 35 37 $config = $row ; 36 38 } 37 39 38 $query='40 $query=' 39 41 SELECT i.id, pi.image_id, pi.product_id 40 42 FROM '.IMAGES_TABLE.' AS i … … 43 45 ;'; 44 46 $result = pwg_query($query); 45 $productcheck = array();46 47 47 48 while($row = pwg_db_fetch_assoc($result)){ 48 49 $productcheck[] = $row; 49 50 } 50 51 51 52 53 'mps_products'=> $products,54 'mps_conf'=> $config,55 56 52 //template assign 53 $template->assign(array( 54 'mps_products' => $products, 55 'mps_conf' => $config, 56 'mps_productcheck' => $productcheck, 57 )); 57 58 58 59
Note: See TracChangeset
for help on using the changeset viewer.