-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadmin.php
executable file
·69 lines (66 loc) · 2.89 KB
/
admin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php if(!defined('PLX_ROOT')) exit; ?>
<?php
# Control du token du formulaire
plxToken::validateFormToken($_POST);
# On édite les catégories
if(!empty($_POST)) {
$plxPlugin->coinslider->editSlides($_POST);
header('Location: plugin.php?p=plxMyCoinSlider');
exit;
}
?>
<form action="plugin.php?p=plxMyCoinSlider" method="post" id="form_plxMyCoinSlider">
<table class="table">
<thead>
<tr>
<th class="checkbox"><input type="checkbox" onclick="checkAll(this.form, 'idSlide[]')" /></th>
<th class="title"><?php $plxPlugin->lang('L_PICTURE') ?></th>
<th style="width:80%"><?php $plxPlugin->lang('L_INFORMATION') ?></th>
<th style="width:8%"><?php $plxPlugin->lang('L_ACTIVE') ?></th>
<th style="width:80%"><?php $plxPlugin->lang('L_ORDER') ?></th>
</tr>
</thead>
<tbody>
<?php
# Initialisation de l'ordre
$num = 0;
# Si on a des infos
if($plxPlugin->coinslider->aSlides) {
foreach($plxPlugin->coinslider->aSlides as $k=>$v) { # Pour chaque catégorie
$ordre = ++$num;
echo '<tr class="line-'.($num%2).'">';
echo '<td style="vertical-align:top"><input type="checkbox" name="idSlide[]" value="'.$k.'" /><input type="hidden" name="slideNum[]" value="'.$k.'" /></td>';
echo '<td style="vertical-align:top">';
if(file_exists(PLX_ROOT.$v['url'])) {
echo '<img src="'.PLX_PLUGINS.'plxMyCoinSlider/lib/mthumb.php?src='.plxUtils::getRacine().plxUtils::strCheck($v['url']).'&h=100&w=150&zc=1" alt="" />';
}
echo ' </td><td>';
echo $plxPlugin->getLang('L_URL_IMAGE').' '.$k.' :<br />';
plxUtils::printInput($k.'_url', plxUtils::strCheck($v['url']), 'text', '60-255');
echo '<br />'.$plxPlugin->getLang('L_TITLE_IMAGE').' :<br />';
plxUtils::printInput($k.'_title', plxUtils::strCheck($v['title']), 'text', '60-255');
echo '<br />'.$plxPlugin->getLang('L_ONCLICK_IMAGE').' :<br />';
plxUtils::printInput($k.'_onclick', plxUtils::strCheck($v['onclick']), 'text', '60-255');
echo '<br />'.$plxPlugin->getLang('L_DESCRIPTION_IMAGE').' :<br />';
plxUtils::printArea($k.'_description',plxUtils::strCheck($v['description']),60,3);
echo '</td><td style="vertical-align:top">';
plxUtils::printSelect($k.'_active', array('1'=>L_YES,'0'=>L_NO), $v['active']);
echo '</td><td style="vertical-align:top">';
plxUtils::printInput($k.'_ordre', $ordre, 'text', '3-3');
echo '</td>';
echo '</tr>';
}
# On récupère le dernier identifiant
$a = array_keys($plxPlugin->coinslider->aSlides);
rsort($a);
}
?>
</tbody>
</table>
<p class="in-action-bar" class="center">
<?php echo plxToken::getTokenPostMethod() ?>
<?php plxUtils::printSelect('selection', array( '' => L_FOR_SELECTION, 'delete' => $plxPlugin->getLang('L_DELETE')), '') ?>
<input class="button submit" type="submit" name="submit" value="<?php echo L_OK ?>" />
<input class="button update " type="submit" name="update" value="<?php $plxPlugin->lang('L_UPDATE') ?>" />
</p>
</form>