Ignore:
Timestamp:
Mar 8, 2016, 11:03:01 AM (8 years ago)
Author:
ddtddt
Message:

[extensions] - manage_properties_photos - updade faiture batch manager

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/manage_properties_photos/initadmin.php

    r31363 r31406  
    5656 load_language('plugin.lang', ADD_PROP_PHOTO_PATH);
    5757        global $template;
     58       
     59$q = 'SELECT 1 FROM ' . ADD_PROP_PHOTO_TABLE . ' WHERE edit=1';
     60        $test = pwg_query($q);
     61        $row = pwg_db_fetch_assoc($test);
     62        if (count($row) > 0) {
     63               
    5864  $propertieslist = array();
    5965  $propertieslist2 = tab_add_info_by_photo();
     
    7884    'CONTENT' => $template->parse('MMPP', true)
    7985        ));
     86        }
    8087 }
    8188 
     
    8794    global $page,$template,$prefixeTable;
    8895   
    89     if (empty($_POST['check_MPP']))
     96        $id_prop_pho= $_POST['IDMPP'];
     97        $data= $_POST['dataglob'];     
     98       
     99    if (!empty($_POST['check_MPP']))
    90100    {
    91 
    92           $template->assign('PLUG_MPP', $_POST['dataglob']);
    93           $template->assign('SELECTEDMPP', $_POST['IDMPP']);
    94       array_push($page['warnings'], l10n('You need to confirm'));
     101    foreach ($collection as $image_id)
     102      {
     103                $query = 'DELETE FROM ' . $prefixeTable . 'add_properties_photos_data WHERE id_img=' . $image_id . ' AND id_prop_pho=' . $id_prop_pho;
     104                pwg_query($query);
     105      }
    95106    }
    96107    else
    97108    {
    98 $id_prop_pho= $_POST['IDMPP'];
    99 $data= $_POST['dataglob'];             
    100          
    101109    foreach ($collection as $image_id)
    102110      {
Note: See TracChangeset for help on using the changeset viewer.