Changeset 30702 for extensions/manage_properties_photos/include
- Timestamp:
- Dec 6, 2014, 8:32:09 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/manage_properties_photos/include/function.aip.inc.php
r30631 r30702 1 1 <?php 2 /*picture*/ 2 3 function tab_add_info_one_photo($id_img){ 3 4 $query = ' 4 SELECT aip.id_ info_pho,aip.designation,aipd.data,aip.orderinfo5 FROM ' . ADD_ INFO_PHOTO_TABLE . ' AS aip6 LEFT JOIN ' . ADD_ INFO_PHOTO_DATA_TABLE . ' AS aipd ON aip.id_info_pho=aipd.id_info_pho5 SELECT aip.id_prop_pho,aip.wording,aipd.data,aip.orderprop 6 FROM ' . ADD_PROP_PHOTO_TABLE . ' AS aip 7 LEFT JOIN ' . ADD_PROP_PHOTO_DATA_TABLE . ' AS aipd ON aip.id_prop_pho=aipd.id_prop_pho 7 8 WHERE aipd.id_img = \'' . $id_img . '\' 8 9 AND aip.active = 0 9 ORDER BY aip.order infoASC10 ORDER BY aip.orderprop ASC 10 11 ;'; 11 12 12 13 return pwg_query($query); 13 14 } 14 15 /* 15 16 function tab_add_info_one_photo2($id_img){ 16 17 $query = ' 17 SELECT aip.id_ info_pho,aip.designation,aipd.data,aip.orderinfo18 FROM ' . ADD_ INFO_PHOTO_DATA_TABLE . ' AS aipd19 RIGHT JOIN ' . ADD_ INFO_PHOTO_TABLE . ' AS aip ON aip.id_info_pho=aipd.id_info_pho18 SELECT aip.id_prop_pho,aip.wording,aipd.data,aip.orderprop 19 FROM ' . ADD_PROP_PHOTO_DATA_TABLE . ' AS aipd 20 RIGHT JOIN ' . ADD_PROP_PHOTO_TABLE . ' AS aip ON aip.id_prop_pho=aipd.id_prop_pho 20 21 WHERE aipd.id_img = \'' . $id_img . '\' 21 22 AND aip.active = 0 22 ORDER BY aip.order infoASC23 ORDER BY aip.orderprop ASC 23 24 ;'; 24 25 25 26 return pwg_query($query); 26 27 } 27 28 */ 29 /*Admin*/ 28 30 function tab_add_info_by_photo(){ 29 31 $query = ' 30 SELECT id_ info_pho,designation31 FROM ' . ADD_ INFO_PHOTO_TABLE . '32 SELECT id_prop_pho,wording 33 FROM ' . ADD_PROP_PHOTO_TABLE . ' 32 34 WHERE active = 0 33 35 AND edit = 1 34 ORDER BY order infoASC36 ORDER BY orderprop ASC 35 37 ;'; 36 38 return pwg_query($query); 37 39 } 38 40 41 42 /*initpicture*/ 39 43 function tab_add_info_by_photo_show(){ 40 44 $query = ' 41 SELECT id_ info_pho,designation,orderinfo42 FROM ' . ADD_ INFO_PHOTO_TABLE . '45 SELECT id_prop_pho,wording,orderprop 46 FROM ' . ADD_PROP_PHOTO_TABLE . ' 43 47 WHERE active = 0 44 ORDER BY order infoASC48 ORDER BY orderprop ASC 45 49 ;'; 46 50 return pwg_query($query); 47 51 } 48 52 49 function data_info_photos($id_img=null,$id_info_pho=NULL){ 53 /*initpicture et admin*/ 54 function data_info_photos($id_img=null,$id_prop_pho=NULL){ 50 55 $query = ' 51 56 SELECT data 52 FROM ' . ADD_ INFO_PHOTO_DATA_TABLE;57 FROM ' . ADD_PROP_PHOTO_DATA_TABLE; 53 58 $wa='WHERE'; 54 59 if($id_img!=null){ 55 60 $query .=' '.$wa.' id_img='.$id_img;$wa='AND'; 56 61 } 57 if($id_ info_pho!=null){58 $query .=' '.$wa.' id_ info_pho='.$id_info_pho;$wa='AND';62 if($id_prop_pho!=null){ 63 $query .=' '.$wa.' id_prop_pho='.$id_prop_pho;$wa='AND'; 59 64 } 60 65 $query .= ';'; … … 62 67 } 63 68 64 65 function tab_info_photos($id_ info_pho=NULL){69 /*Admin*/ 70 function tab_info_photos($id_prop_pho=NULL){ 66 71 $query = ' 67 SELECT id_ info_pho,designation,orderinfo,active,edit68 FROM ' . ADD_ INFO_PHOTO_TABLE;69 if($id_ info_pho!=null){70 $query .= ' WHERE id_ info_pho='.$id_info_pho;72 SELECT id_prop_pho,wording,orderprop,active,edit 73 FROM ' . ADD_PROP_PHOTO_TABLE; 74 if($id_prop_pho!=null){ 75 $query .= ' WHERE id_prop_pho='.$id_prop_pho; 71 76 } 72 77 73 $query .= ' ORDER BY order infoASC78 $query .= ' ORDER BY orderprop ASC 74 79 ;'; 75 80 return pwg_query($query);
Note: See TracChangeset
for help on using the changeset viewer.