1144 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Template für die Übersicht der Gutschein
|
|
|
5 |
*/
|
|
|
6 |
|
|
|
7 |
?>
|
|
|
8 |
<div class="wrap wpsg_mod_gutschein">
|
|
|
9 |
<div class="icon32 icon32-posts-post" id="icon-edit"><br></div>
|
|
|
10 |
<h2>
|
|
|
11 |
<?php echo __('Gutscheinverwaltung', 'wpsg'); ?>
|
|
|
12 |
<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Voucher&action=add" class="button add-new-h2"><?php echo __("Hinzufügen", "wpsg"); ?></a>
|
|
|
13 |
</h2>
|
|
|
14 |
|
|
|
15 |
<?php echo $this->writeBackendMessage(); ?>
|
|
|
16 |
|
1599 |
daniel |
17 |
<form method="POST" id="#gs_form" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Voucher&noheader=1">
|
1647 |
daniel |
18 |
|
|
|
19 |
<?php if (is_array($this->view['data']) && sizeof($this->view['data']) > 0) { ?>
|
|
|
20 |
<table class="widefat post fixed vouchertable">
|
|
|
21 |
<thead>
|
|
|
22 |
<tr>
|
|
|
23 |
<th class="manage-column column-checkbox"><input title="<?php echo __("Alle markieren", "wpsg"); ?>" type="checkbox" onclick="markAll(this);"/></th>
|
|
|
24 |
<th class="manage-column column-nr"><?php echo __('Nr.', 'wpsg'); ?></th>
|
|
|
25 |
<th class="manage-column column-code"><?php echo __("Code", 'wpsg'); ?></th>
|
|
|
26 |
<th class="manage-column column-start"><?php echo __("Start", 'wpsg'); ?></th>
|
|
|
27 |
<th class="manage-column column-end"><?php echo __("End", 'wpsg'); ?></th>
|
|
|
28 |
<th class="manage-column column-value"><?php echo __("Wert", 'wpsg'); ?></th>
|
|
|
29 |
<th class="manage-column column-status"><?php echo __('Status', 'wpsg'); ?></th>
|
|
|
30 |
</tr>
|
|
|
31 |
</thead>
|
|
|
32 |
<tbody>
|
|
|
33 |
<?php foreach ($this->view['data'] as $g) { ?>
|
|
|
34 |
<tr>
|
|
|
35 |
<td class="column-checkbox"><input type="checkbox" value="<?php echo $g['id']; ?>" class="wpsg_mod_gs_cb" name="wpsg_gs_cb[]" /></td>
|
|
|
36 |
<td class="column-nr"><?php echo wpsg_hspc($g['id']); ?>.</td>
|
|
|
37 |
<td class="column-code"><?php echo wpsg_hspc($g['code']); ?></td>
|
|
|
38 |
<td class="column-start"><?php echo date('d.m.Y H:i', strtotime($g['start_date'])); ?></td>
|
|
|
39 |
<td class="column-end"><?php echo date('d.m.Y H:i', strtotime($g['end_date'])); ?></td>
|
|
|
40 |
<td class="column-value">
|
|
|
41 |
<?php if ($g['calc_typ'] == 'w') { ?>
|
|
|
42 |
<?php echo wpsg_ff($g['value'], $this->get_option('wpsg_currency')); ?>
|
|
|
43 |
<?php } else { ?>
|
|
|
44 |
<?php echo wpsg_ff($g['value'], '%'); ?>
|
|
|
45 |
<?php } ?>
|
|
|
46 |
</td>
|
|
|
47 |
<td class="column-status">
|
|
|
48 |
<?php echo wpsg_hspc($g['status']); ?>
|
|
|
49 |
<?php if ($g['multi'] == '1') { ?>
|
|
|
50 |
<span class="wpsg_mod_gutschein_multi"> [M]</span>
|
|
|
51 |
<?php } ?>
|
|
|
52 |
</td>
|
|
|
53 |
</tr>
|
|
|
54 |
<?php } ?>
|
|
|
55 |
</tbody>
|
|
|
56 |
<tfoot>
|
|
|
57 |
<tr>
|
|
|
58 |
<th class="manage-column column-checkbox"><input title="<?php echo __("Alle markieren", "wpsg"); ?>" type="checkbox" onclick="markAll(this);"/></th>
|
|
|
59 |
<th class="manage-column column-nr"><?php echo __('Nr.', 'wpsg'); ?></th>
|
|
|
60 |
<th class="manage-column column-code"><?php echo __("Code", 'wpsg'); ?></th>
|
|
|
61 |
<th class="manage-column column-start"><?php echo __("Start", 'wpsg'); ?></th>
|
|
|
62 |
<th class="manage-column column-end"><?php echo __("End", 'wpsg'); ?></th>
|
|
|
63 |
<th class="manage-column column-value"><?php echo __("Wert", 'wpsg'); ?></th>
|
|
|
64 |
<th class="manage-column column-status"><?php echo __('Status', 'wpsg'); ?></th>
|
|
|
65 |
</tr>
|
|
|
66 |
</tfoot>
|
|
|
67 |
</table>
|
|
|
68 |
<br />
|
|
|
69 |
|
|
|
70 |
<input type="submit" onclick="if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;" name="wpshopgermany-submit-gs_del" value="<?php echo __("Markierte löschen", "wpsg"); ?>" />
|
|
|
71 |
<input type="submit" onclick="" name="wpshopgermany-submit-csv" value="<?php echo __("CSV Export", "wpsg"); ?>" />
|
|
|
72 |
<br /><br />
|
|
|
73 |
<?php } else { ?>
|
|
|
74 |
<p><?php echo __('Keine Gutscheine in der Datenbank.', 'wpsg'); ?></p>
|
|
|
75 |
<?php } ?>
|
1144 |
daniel |
76 |
|
|
|
77 |
</form>
|
1599 |
daniel |
78 |
</div>
|
|
|
79 |
|
|
|
80 |
<script type="text/javascript">
|
|
|
81 |
|
|
|
82 |
function markAll(el)
|
|
|
83 |
{
|
|
|
84 |
|
|
|
85 |
var arCB = jQuery(".wpsg_mod_gs_cb");
|
|
|
86 |
|
|
|
87 |
for (var i = 0; i < arCB.length; i ++)
|
|
|
88 |
{
|
|
|
89 |
if (el.checked)
|
|
|
90 |
{
|
|
|
91 |
jQuery(arCB[i]).attr('checked', true);
|
|
|
92 |
}
|
|
|
93 |
else
|
|
|
94 |
{
|
|
|
95 |
jQuery(arCB[i]).attr('checked', false);
|
|
|
96 |
}
|
|
|
97 |
}
|
|
|
98 |
|
|
|
99 |
} // function markAll(el)
|
|
|
100 |
|
|
|
101 |
</script>
|