Changeset 30704 for extensions/AddInfo/admin
- Timestamp:
- Dec 6, 2014, 9:58:22 PM (10 years ago)
- Location:
- extensions/AddInfo/admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/AddInfo/admin/admin.php
r30638 r30704 40 40 )); 41 41 42 $exp = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'manage_ info_photos';"));42 $exp = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'manage_properties_photos';")); 43 43 if($exp['state']=='active'){ 44 44 $template->assign( … … 50 50 if (isset($_POST['submitexpot'])){ 51 51 52 $idinfo=pwg_db_fetch_assoc(pwg_query('SELECT id_ info_pho FROM ' . ADD_INFO_PHOTO_TABLE . ' ORDER BY id_info_pho DESC LIMIT 1;'));53 $idinfo=$idinfo['id_ info_pho'];52 $idinfo=pwg_db_fetch_assoc(pwg_query('SELECT id_prop_pho FROM ' . ADD_PROP_PHOTO_TABLE . ' ORDER BY id_prop_pho DESC LIMIT 1;')); 53 $idinfo=$idinfo['id_prop_pho']; 54 54 $idinfo1=$idinfo+1;$idinfo2=$idinfo+2;$idinfo3=$idinfo+3; 55 $q = 'INSERT INTO ' . $prefixeTable . 'Add_ Info_photos(id_info_pho,designation,orderinfo,active,edit)VALUES ('.$idinfo1.',"infos1",'.$idinfo1.',0,1);';55 $q = 'INSERT INTO ' . $prefixeTable . 'Add_properties_photos(id_prop_pho,wording,orderprop,active,edit)VALUES ('.$idinfo1.',"infos1",'.$idinfo1.',0,1);'; 56 56 pwg_query($q); 57 $q = 'INSERT INTO ' . $prefixeTable . 'Add_ Info_photos(id_info_pho,designation,orderinfo,active,edit)VALUES ('.$idinfo2.',"infos2",'.$idinfo2.',0,1);';57 $q = 'INSERT INTO ' . $prefixeTable . 'Add_properties_photos(id_prop_pho,wording,orderprop,active,edit)VALUES ('.$idinfo2.',"infos2",'.$idinfo2.',0,1);'; 58 58 pwg_query($q); 59 $q = 'INSERT INTO ' . $prefixeTable . 'Add_ Info_photos(id_info_pho,designation,orderinfo,active,edit)VALUES ('.$idinfo3.',"infos3",'.$idinfo3.',0,1);';59 $q = 'INSERT INTO ' . $prefixeTable . 'Add_properties_photos(id_prop_pho,wording,orderprop,active,edit)VALUES ('.$idinfo3.',"infos3",'.$idinfo3.',0,1);'; 60 60 pwg_query($q); 61 61 $query = 'SELECT * FROM ' . ADDINFO_TABLE . ';'; … … 63 63 if (pwg_db_num_rows($result)) { 64 64 while ($info = pwg_db_fetch_assoc($result)){ 65 $q = 'INSERT INTO ' . $prefixeTable . 'add_ Info_photos_data(id_img,id_info_pho,data)VALUES ('.$info['id'].','.$idinfo1.',"'.$info['info1'].'");';65 $q = 'INSERT INTO ' . $prefixeTable . 'add_properties_photos_data(id_img,id_prop_pho,data)VALUES ('.$info['id'].','.$idinfo1.',"'.$info['info1'].'");'; 66 66 pwg_query($q); 67 $q = 'INSERT INTO ' . $prefixeTable . 'add_ Info_photos_data(id_img,id_info_pho,data)VALUES ('.$info['id'].','.$idinfo2.',"'.$info['info2'].'");';67 $q = 'INSERT INTO ' . $prefixeTable . 'add_properties_photos_data(id_img,id_prop_pho,data)VALUES ('.$info['id'].','.$idinfo2.',"'.$info['info2'].'");'; 68 68 pwg_query($q); 69 $q = 'INSERT INTO ' . $prefixeTable . 'add_ Info_photos_data(id_img,id_info_pho,data)VALUES ('.$info['id'].','.$idinfo3.',"'.$info['info3'].'");';69 $q = 'INSERT INTO ' . $prefixeTable . 'add_properties_photos_data(id_img,id_prop_pho,data)VALUES ('.$info['id'].','.$idinfo3.',"'.$info['info3'].'");'; 70 70 pwg_query($q); 71 71 -
extensions/AddInfo/admin/admin.tpl
r30638 r30704 16 16 <form method="post" > 17 17 <fieldset> 18 <legend>{'Export infos to manage info photo'|@translate}</legend>18 <legend>{'Export infos to manage properties photos'|@translate}</legend> 19 19 <input class="submit" name="submitexpot" type="submit" value="{'Export'|@translate}"> 20 20 </fieldset>
Note: See TracChangeset
for help on using the changeset viewer.