~ubuntu-branches/ubuntu/trusty/pluxml/trusty-proposed

« back to all changes in this revision

Viewing changes to core/admin/index.php

  • Committer: Package Import Robot
  • Author(s): Tanguy Ortolo
  • Date: 2014-01-14 21:55:05 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20140114215505-q8b6y30b69q29cx0
Tags: 5.3-1
* New upstream release.
* debian/po/es.po: Spanish translation, thanks to Matías Bellone.
 (Closes: #733066)
* debian/control: update Standards-Version to 3.9.5 (no change needed).
* debian/postinst: update PluXml version in configuration file, to avoid
  triggering the update script (nothing else to do).

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
eval($plxAdmin->plxPlugins->callHook('AdminIndexPrepend'));
17
17
 
18
18
# Suppression des articles selectionnes
19
 
if(isset($_POST['selection']) AND ($_POST['selection'][0] == 'delete' OR $_POST['selection'][1] == 'delete') AND isset($_POST['idArt'])) {
 
19
if(isset($_POST['selection']) AND ((!empty($_POST['sel1']) AND $_POST['selection'][0] == 'delete') OR (!empty($_POST['sel2']) AND $_POST['selection'][1] == 'delete')) AND isset($_POST['idArt'])) {
20
20
        foreach ($_POST['idArt'] as $k => $v) $plxAdmin->delArticle($v);
21
21
        header('Location: index.php');
22
22
        exit;
139
139
<?php
140
140
if($_SESSION['profil']<=PROFIL_MODERATOR) {
141
141
        echo '<p>';
142
 
        plxUtils::printSelect('selection[]', array( '' => L_FOR_SELECTION, 'delete' => L_DELETE), '', false, '', false);
143
 
        echo '<input class="button submit" type="submit" name="submit" value="'.L_OK.'" />';
 
142
        plxUtils::printSelect('selection[]', array( '' => L_FOR_SELECTION, 'delete' => L_DELETE), '', false, '', 'id_selection1');
 
143
        echo '<input name="sel1" class="button submit" type="submit" name="submit" value="'.L_OK.'" onclick="return confirmAction(this.form, \'id_selection1\', \'delete\', \'idArt[]\', \''.L_CONFIRM_DELETE.'\')" />';
144
144
        echo '</p>';
145
145
}
146
146
?>
221
221
        echo '<p>';
222
222
        echo plxToken::getTokenPostMethod();
223
223
        if($_SESSION['profil']<=PROFIL_MODERATOR) {
224
 
                plxUtils::printSelect('selection[]', array( '' => L_FOR_SELECTION, 'delete' => L_DELETE), '', false, '', false);
225
 
                echo '<input class="button submit" type="submit" name="submit" value="'.L_OK.'" />';
 
224
                plxUtils::printSelect('selection[]', array( '' => L_FOR_SELECTION, 'delete' => L_DELETE), '', false, '', 'id_selection2');
 
225
                echo '<input name="sel2" class="button submit" type="submit" name="submit" value="'.L_OK.'" onclick="return confirmAction(this.form, \'id_selection2\', \'delete\', \'idArt[]\', \''.L_CONFIRM_DELETE.'\')" />';
226
226
        }
227
227
        echo '</p>';
228
228
?>