Changeset 20202 for extensions/Piwecard/admin/admin_management.php
- Timestamp:
- Jan 17, 2013, 12:06:49 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Piwecard/admin/admin_management.php
r20112 r20202 6 6 $piwecard = get_plugin_data($plugin_id); 7 7 8 $query = 'SELECT *FROM '.PIWECARD_TABLE;8 $query = 'SELECT DISTINCT ecard_id, sender_name, sender_email, title, message, image, date_creation, date_validity FROM '.PIWECARD_TABLE; 9 9 10 10 if (isset($_POST['ecard_form_filter_submit'])) { … … 84 84 85 85 $start = (isset($_GET['start']) ? $_GET['start'] : 0); 86 if ($start != 0 and $piwecard->get_nb_ecard() == $piwecard->config['nb_ecard_page'])86 if ($start != 0 and $piwecard->get_nb_ecard() <= $piwecard->config['nb_ecard_page']) 87 87 $start = 0; 88 88 … … 101 101 102 102 while($file = pwg_db_fetch_assoc($result)) { 103 $ecard_url = embellish_url(get_absolute_root_url() . './index.php?/ecard/'.$file['id']); 103 //Recipients 104 $recipients = array(); 105 $query2 = 'SELECT recipient_name, recipient_email FROM piwigo_piwecard WHERE ecard_id="'.$file['ecard_id'].'";'; 106 $result2 = pwg_query($query2); 107 108 while($row = pwg_db_fetch_assoc($result2)) { 109 array_push($recipients, array( 110 'name' => $row['recipient_name'], 111 'email' => $row['recipient_email'], 112 ) 113 ); 114 } 115 116 $ecard_url = embellish_url(get_absolute_root_url() . './index.php?/ecard/'.$file['ecard_id']); 104 117 105 118 // Check if the ecard is valid 106 $valid = $piwecard->is_valid($file[' id']);119 $valid = $piwecard->is_valid($file['ecard_id']); 107 120 108 121 $template->append('ecard_file',array( 109 'id' => $file[' id'],122 'id' => $file['ecard_id'], 110 123 'title' => $file['title'], 111 124 'url' => $ecard_url, 112 125 'sender_name' => $file['sender_name'], 113 126 'sender_email' => $file['sender_email'], 114 'recipient_name' => $file['recipient_name'], 115 'recipient_email' => $file['recipient_email'], 127 'recipients' => $recipients, 116 128 'date_creation' => strftime('%d/%m/%y %H:%M', strtotime($file['date_creation'])), 117 129 'date_validity' => (isset($file['date_validity'])) ? strftime('%d/%m/%y %H:%M', strtotime($file['date_validity'])) : l10n('piwecard_nolimit'),
Note: See TracChangeset
for help on using the changeset viewer.