Ignore:
Timestamp:
Dec 6, 2014, 9:58:22 PM (10 years ago)
Author:
ddtddt
Message:

[extensions] - Add info - update export to manage_properties_photos

Location:
extensions/AddInfo/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/AddInfo/admin/admin.php

    r30638 r30704  
    4040          ));
    4141         
    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';"));
    4343        if($exp['state']=='active'){
    4444                $template->assign(
     
    5050        if (isset($_POST['submitexpot'])){
    5151
    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'];
    5454        $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);';
    5656    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);';
    5858    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);';
    6060    pwg_query($q);
    6161        $query = 'SELECT * FROM ' . ADDINFO_TABLE . ';';
     
    6363        if (pwg_db_num_rows($result)) {
    6464                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'].'");';
    6666                        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'].'");';
    6868                        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'].'");';
    7070                        pwg_query($q);
    7171
  • extensions/AddInfo/admin/admin.tpl

    r30638 r30704  
    1616        <form method="post" >
    1717                <fieldset>
    18                         <legend>{'Export infos to manage info photo'|@translate}</legend>
     18                        <legend>{'Export infos to manage properties photos'|@translate}</legend>
    1919                        <input class="submit" name="submitexpot" type="submit" value="{'Export'|@translate}">
    2020                </fieldset>
Note: See TracChangeset for help on using the changeset viewer.