Subversion Repositories wpShopGermany4

Rev

Rev 7512 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6723 daniel 1
<?php
2
 
3
    /*
4
     * Template für die Auswahl der Kunden für die Kundenzusammenfassung
5
     */
6
 
7
    error_reporting(E_ALL); ini_set("display_errors", "1");
8
 
9
?>
10
 
11
<div class="wpsg_customer" id="wpsg-bs">
12
    <div class="content">
13
 
14
        <form method="POST">
15
 
16
            <input type="hidden" name="wpsg_do" value="setAccount" />
17
 
18
            <div class="wpsg_customer" id="wpsg-bs">
19
 
20
                <nav class="navbar navbar-default">
21
 
22
                    <div class="container-fluid">
23
                        <div class="navbar-header">
24
                            <a class="navbar-brand" href="#"><?php echo __('wpShopGermany', 'wpsg'); ?></a>
25
                        </div>
26
                        <div class="collapse navbar-collapse" id="bs-customer-navbar-collapse-1">
27
                            <ul class="nav navbar-nav">
28
                                <li role="presentation" class=""><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer"><?php echo __("Kundenverwaltung (Übersicht)", "wpsg"); ?></a></li>
29
                            </ul>
30
                        </div>
31
                    </div>
32
 
33
                    <div class="wpsg-filter wpsg-customer-tab wpsg-customer-tab-0 container-fluid form-horizontal">
34
                        <div class="row">
35
                            <div class="col-lg-4">
36
 
37
                                <?php echo wpsg_drawForm_Input('filter[s]', __('Suchfeld (Zielkunde)', 'wpsg'), wpsg_getStr($_REQUEST['filter']['s'])); ?>
38
                                <?php echo wpsg_drawForm_SubmitButton(__('Kunden suchen')); ?><br />
39
 
40
                            </div>
41
                        </div>
42
                    </div>
43
 
44
                </nav>
45
 
46
                <div class="wpsg_msg_wrap"><hr class="wp-header-end wpsg-wp-header-end"></div>
47
 
48
            </div>
49
 
50
            <div class="content">
51
                <div class="row">
52
 
53
                    <div class="col-lg-6">
54
 
55
                        <fieldset>
56
 
57
                            <legend><?php echo __('Kundenkonto, in das die Kunden überführt werden sollen:', 'wpsg'); ?></legend>
58
 
59
                            <?php if (!wpsg_isSizedArray($this->view['targetCustomer'])) { ?>
60
 
61
                                <p>
62
                                    <?php echo __('Es konnte kein passender Kunde gefunden werden.', 'wpsg'); ?>
63
                                </p>
64
 
65
                            <?php } else { ?>
66
 
67
                                <table class="table wpsg-table-order table-bordered table-hover table-striped wpsg-table-customer">
68
                                    <thead>
69
                                    <tr>
70
                                        <th class="manage-column column-title wpsg_pic_col"></th>
71
                                        <th class="wpsg_order col_name" data-order="nr"><?php echo __("Nr/Name", 'wpsg'); ?></th>
72
                                        <th class="wpsg_order col_adress" data-order="adress"><?php echo __("Anschrift", 'wpsg'); ?></th>
73
                                        <th class="wpsg_order col_status" data-order="status"><?php echo __("Status", 'wpsg'); ?></th>
74
                                    </tr>
75
                                    </thead>
76
                                    <tbody>
77
                                    <?php foreach ($this->view['targetCustomer'] as $c) { ?>
78
                                        <tr>
79
                                            <td class="wpsg_pic_col">
80
 
81
                                                <img src="https://www.gravatar.com/avatar/<?php echo md5(strtolower(trim($c->getEMail()))); ?>?s=40&d=mm" alt=""" />
82
                                                <input type="radio" name="set_target" value="<?php echo $c->id; ?>" />
83
 
84
                                            </td>
85
                                            <td class="col_name column-title">
86
                                                <strong><a title="<?php echo __("Diesen Kunden bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=edit&edit_id=<?php echo $c->id; ?>" class="row-title"><?php echo trim($c->GetNr().' '.$c->getLabel()); ?></a></strong>
87
                                                <?php if (strlen($c->getEMail()) > 0) { ?>
88
                                                    <a style="margin-bottom:3px; display:block;" href="mailto:<?php echo $c->getEMail(); ?>" title="<?php echo __('Dem Kunden eine E-Mail schreiben.', 'wpsg'); ?>"><?php echo $c->getEMail();  ?></a>
89
                                                <?php } ?>
90
 
91
                                                <?php $passwort_saltmd5 = $c->passwort_saltmd5; if (!wpsg_isSizedString($passwort_saltmd5)) { ?>
92
                                                <strong class="wpsg_error"><?php echo __('Gastzugang', 'wpsg'); ?></strong>
93
                                                <?php } ?>
94
 
95
                                            </td>
96
                                            <td class="col_adress">
97
                                                <?php echo ((strlen($c->getCompany()) > 0)?$c->getCompany().'<br />':''); ?>
98
                                                <?php echo $c->getStreet(); ?><br />
99
                                                <?php echo trim($c->getZip().' '.$c->getCity()); ?><br />
100
                                            </td>
101
                                            <td class="col_status">
102
                                                <?php echo wpsg_translate(__('#1# Bestellungen', 'wpsg'), $c->getOrderCount()); ?><br />
103
                                                <?php echo wpsg_translate(__('Umsatz: #1#', 'wpsg'), wpsg_ff($c->getOrderAmount(), $this->get_option('wpsg_currency'))); ?>
104
                                                <?php if ($c->getOrderCount() > 0) { ?>
105
                                                    <br />
106
                                                    <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&filter[k_id]=<?php echo $c->id; ?>"><?php echo __('Bestellungen einsehen', 'wpsg'); ?></a>
107
                                                <?php } ?>
108
                                            </td>
109
                                        </tr>
110
                                    <?php } ?>
111
                                    </tbody>
112
                                </table>
113
 
114
                                <br />
115
 
116
                                <input type="submit" name="submit_do" class="button" value="<?php echo __('Kundenkonten zusammenfügen', 'wpsg'); ?>" />
117
 
118
                            <?php } ?>
119
 
120
                        </fieldset>
121
 
122
                    </div>
123
                    <div class="col-lg-6">
124
 
125
                        <fieldset>
126
 
127
                            <legend><?php echo __('Gewählte Kunden (Diese werden gelöscht)', 'wpsg'); ?></legend>
128
 
129
                            <table class="table wpsg-table-order table-bordered table-hover table-striped wpsg-table-customer">
130
                                <thead>
131
                                <tr>
132
                                    <th class="manage-column column-title wpsg_pic_col"></th>
133
                                    <th class="wpsg_order col_name" data-order="nr"><?php echo __("Nr/Name", 'wpsg'); ?></th>
134
                                    <th class="wpsg_order col_adress" data-order="adress"><?php echo __("Anschrift", 'wpsg'); ?></th>
135
                                    <th class="wpsg_order col_status" data-order="status"><?php echo __("Status", 'wpsg'); ?></th>
136
                                </tr>
137
                                </thead>
138
                                <tbody>
139
                                <?php foreach (@$_REQUEST['customer'] as $customer_id) { $c = wpsg_customer::getInstance($customer_id); ?>
140
                                    <tr>
141
                                        <td class="wpsg_pic_col">
142
                                            <img src="https://www.gravatar.com/avatar/<?php echo md5(strtolower(trim($c->getEMail()))); ?>?s=40&d=mm" alt=""" />
143
                                            <input type="hidden" value="<?php echo $c->id; ?>" name="customer[]" />
144
                                        </td>
145
                                        <td class="col_name column-title">
146
                                            <strong><a title="<?php echo __("Diesen Kunden bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=edit&edit_id=<?php echo $c->id; ?>" class="row-title"><?php echo trim($c->GetNr().' '.$c->getLabel()); ?></a></strong>
147
                                            <?php if (strlen($c->getEMail()) > 0) { ?>
148
                                                <a href="mailto:<?php echo $c->getEMail(); ?>" title="<?php echo __('Dem Kunden eine E-Mail schreiben.', 'wpsg'); ?>"><?php echo $c->getEMail();  ?></a>
149
                                            <?php } ?>
150
                                        </td>
151
                                        <td class="col_adress">
152
                                            <?php echo ((strlen($c->getCompany()) > 0)?$c->getCompany().'<br />':''); ?>
153
                                            <?php echo $c->getStreet(); ?><br />
154
                                            <?php echo trim($c->getZip().' '.$c->getCity()); ?><br />
155
                                        </td>
156
                                        <td class="col_status">
157
                                            <?php echo wpsg_translate(__('#1# Bestellungen', 'wpsg'), $c->getOrderCount()); ?><br />
158
                                            <?php echo wpsg_translate(__('Umsatz: #1#', 'wpsg'), wpsg_ff($c->getOrderAmount(), $this->get_option('wpsg_currency'))); ?>
159
                                            <?php if ($c->getOrderCount() > 0) { ?>
160
                                                <br />
161
                                                <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&filter[k_id]=<?php echo $c->id; ?>"><?php echo __('Bestellungen einsehen', 'wpsg'); ?></a>
162
                                            <?php } ?>
163
                                        </td>
164
                                    </tr>
165
                                <?php } ?>
166
                                </tbody>
167
                            </table>
168
 
169
                        </fieldset>
170
 
171
                    </div>
172
 
173
                </div>
174
            </div>
175
 
176
        </form>
177
 
178
        <?php // wpsg_debug($_REQUEST); ?>
179
 
180
    </div>
181
 
182
</div>
183