1 | <?php |
---|
2 | /*picture*/ |
---|
3 | function tab_add_info_one_photo($id_img){ |
---|
4 | $query = ' |
---|
5 | 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 |
---|
8 | WHERE aipd.id_img = \'' . $id_img . '\' |
---|
9 | AND aip.active = 0 |
---|
10 | ORDER BY aip.orderprop ASC |
---|
11 | ;'; |
---|
12 | |
---|
13 | return pwg_query($query); |
---|
14 | } |
---|
15 | /* |
---|
16 | function tab_add_info_one_photo2($id_img){ |
---|
17 | $query = ' |
---|
18 | 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 |
---|
21 | WHERE aipd.id_img = \'' . $id_img . '\' |
---|
22 | AND aip.active = 0 |
---|
23 | ORDER BY aip.orderprop ASC |
---|
24 | ;'; |
---|
25 | |
---|
26 | return pwg_query($query); |
---|
27 | } |
---|
28 | */ |
---|
29 | /*Admin*/ |
---|
30 | function tab_add_info_by_photo(){ |
---|
31 | $query = ' |
---|
32 | SELECT id_prop_pho,wording |
---|
33 | FROM ' . ADD_PROP_PHOTO_TABLE . ' |
---|
34 | WHERE active = 0 |
---|
35 | AND edit = 1 |
---|
36 | ORDER BY orderprop ASC |
---|
37 | ;'; |
---|
38 | return pwg_query($query); |
---|
39 | } |
---|
40 | |
---|
41 | |
---|
42 | /*initpicture*/ |
---|
43 | function tab_add_info_by_photo_show(){ |
---|
44 | $query = ' |
---|
45 | SELECT id_prop_pho,wording,orderprop |
---|
46 | FROM ' . ADD_PROP_PHOTO_TABLE . ' |
---|
47 | WHERE active = 0 |
---|
48 | ORDER BY orderprop ASC |
---|
49 | ;'; |
---|
50 | return pwg_query($query); |
---|
51 | } |
---|
52 | |
---|
53 | /*initpicture et admin*/ |
---|
54 | function data_info_photos($id_img=null,$id_prop_pho=NULL){ |
---|
55 | $query = ' |
---|
56 | SELECT data |
---|
57 | FROM ' . ADD_PROP_PHOTO_DATA_TABLE; |
---|
58 | $wa='WHERE'; |
---|
59 | if($id_img!=null){ |
---|
60 | $query .=' '.$wa.' id_img='.$id_img;$wa='AND'; |
---|
61 | } |
---|
62 | if($id_prop_pho!=null){ |
---|
63 | $query .=' '.$wa.' id_prop_pho='.$id_prop_pho;$wa='AND'; |
---|
64 | } |
---|
65 | $query .= ';'; |
---|
66 | return pwg_query($query); |
---|
67 | } |
---|
68 | |
---|
69 | /*Admin*/ |
---|
70 | function tab_info_photos($id_prop_pho=NULL){ |
---|
71 | $query = ' |
---|
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; |
---|
76 | } |
---|
77 | |
---|
78 | $query .= ' ORDER BY orderprop ASC |
---|
79 | ;'; |
---|
80 | return pwg_query($query); |
---|
81 | } |
---|
82 | |
---|
83 | ?> |
---|