PluginProbe
Welcart e-Commerce / 2.12.3
Welcart e-Commerce v2.12.3
2.12.3 2.11.35 2.12.2 2.12.1 2.11.34 2.11.33 2.11.32 2.11.31 2.11.30 1.3.16 1.3.17 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 All 291 releases
usc-e-shop / includes / admin_top.php

admin_top.php in Welcart e-Commerce 2.12.3, at includes/admin_top.php

192 lines 7.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Admin - Welcart Home Page.
4 *
5 * @package Welcart
6 */
7
8 global $wpdb;
9 $display_mode = ( ! empty( $this->options['display_mode'] ) ) ? $this->options['display_mode'] : '';
10 $display_mode_label = ( isset( $this->display_mode[ $display_mode ] ) ) ? $this->display_mode[ $display_mode ] : $display_mode;
11 $stocs = usces_get_stocs();
12 $items_num = $this->get_items_num();
13 $zaiko_status_cols = count( $this->zaiko_status );
14 ?>
15 <script type="text/javascript">jQuery(function($){uscesInformation.getinfo2();});</script>
16 <div class="wrap">
17 <div class="usces_admin">
18
19 <h1>Welcart Shop <?php esc_html_e( 'Home', 'usces' ); ?></h1>
20 <p class="version_info">Version <?php echo esc_html( USCES_VERSION ); ?></p>
21
22 <div class="usces_admin_right">
23
24 <div class="usces_side_box">
25 <h5><?php esc_html_e( 'Display Modes', 'usces' ); ?>:</h5>
26 <div class="dispmode <?php echo esc_attr( $display_mode ); ?>"><?php echo esc_html( $display_mode_label ); ?></div>
27 <?php
28 if ( 'Promotionsale' == $display_mode ) :
29 $campaign = '';
30 if ( 'discount' == $this->options['campaign_privilege'] ) {
31 $campaign = ' (' . $this->options['privilege_discount'] . __( '% Discount', 'usces' ) . ') ';
32 } elseif ( 'point' == $this->options['campaign_privilege'] ) {
33 $campaign = ' (' . $this->options['privilege_point'] . __( ' times (limited to members)', 'usces' ) . ') ';
34 }
35 $campaign_schedule = $this->options['campaign_schedule']['start']['year'] . '/' . $this->options['campaign_schedule']['start']['month'] . '/' . $this->options['campaign_schedule']['start']['day']
36 . __( ' - ', 'usces' ) . $this->options['campaign_schedule']['end']['year'] . '/' . $this->options['campaign_schedule']['end']['month'] . '/' . $this->options['campaign_schedule']['end']['day'];
37 ?>
38 <span><?php esc_html_e( 'Special Benefits', 'usces' ); ?>:</span><?php echo esc_html( $this->options['campaign_privilege'] ); ?><?php echo esc_html( $campaign ); ?><br />
39 <span><?php esc_html_e( 'applied material', 'usces' ); ?>:</span><?php echo esc_html( get_cat_name( $this->options['campaign_category'] ) ); ?><br />
40 <span><?php esc_html_e( 'Period', 'usces' ); ?>:</span><?php echo esc_html( $campaign_schedule ); ?>
41 <?php endif; ?>
42 </div>
43
44 <?php if ( ! ( defined( 'USCES_ADMIN_INFO' ) && ! USCES_ADMIN_INFO ) && 7 < $this->user_level ) : ?>
45 <div id= "wc_information" class="chui"></div>
46 <?php endif; ?>
47 <?php
48 $payment_method = usces_get_system_option( 'usces_payment_method', 'settlement' );
49 $deactivate = array();
50 foreach ( $payment_method as $settlement => $payment ) {
51 if ( 'deactivate' == $payment['use'] ) {
52 $deactivate[] = $payment['name'];
53 }
54 }
55 if ( 0 < count( $deactivate ) ) :
56 ?>
57 <div id="wc_payment_method_info" class="info">
58 <div><?php esc_html_e( 'Stopped payment method', 'usces' ); ?></div>
59 <?php
60 $c = '';
61 foreach ( $deactivate as $payment ) {
62 echo esc_html( $c . $payment );
63 $c = ',';
64 }
65 ?>
66 </div>
67 <?php
68 endif;
69 ?>
70 <?php do_action( 'usces_action_admin_top_sidebar' ); ?>
71
72 </div><!--usces_admin_right-->
73
74 <div class="usces_admin_left">
75
76 <?php if ( 4 < $this->user_level ) : ?>
77 <h4><?php esc_html_e( 'number & amount of order', 'usces' ); ?></h4>
78 <div class="usces_box">
79 <table class="dashboard">
80 <tr>
81 <th><?php esc_html_e( 'Currency', 'usces' ); ?> : <?php usces_crcode(); ?></th><th><?php esc_html_e( 'number of order', 'usces' ); ?></th><th><?php esc_html_e( 'amount of order', 'usces' ); ?></th>
82 </tr>
83 <tr>
84 <td><?php esc_html_e( 'today', 'usces' ); ?> : </td><td class="bignum"><?php echo number_format( $this->get_order_num( 'today' ) ); ?></td><td class="bignum"><?php usces_crform( $this->get_order_amount( 'today' ), true, false ); ?></td>
85 </tr>
86 <tr>
87 <td><?php esc_html_e( 'This month', 'usces' ); ?> : </td><td class="bignum"><?php echo number_format( $this->get_order_num( 'thismonth' ) ); ?></td><td class="bignum"><?php usces_crform( $this->get_order_amount( 'thismonth' ), true, false ); ?></td>
88 </tr>
89 <tr>
90 <td><?php esc_html_e( 'Same date in last year', 'usces' ); ?> : </td><td class="bignum"><?php echo number_format( $this->get_order_num( 'lastyear' ) ); ?></td><td class="bignum"><?php usces_crform( $this->get_order_amount( 'lastyear' ), true, false ); ?></td>
91 </tr>
92 </table>
93 </div><!--usces_box-->
94 <?php endif; ?>
95 <?php do_action( 'usces_action_admintop_box1' ); ?>
96
97 <h4><?php esc_html_e( 'information for registration of items', 'usces' ); ?></h4>
98 <div class="usces_box">
99 <table class="dashboard">
100 <tr>
101 <th><?php esc_html_e( 'number of item', 'usces' ); ?></th><th colspan="<?php echo esc_attr( $zaiko_status_cols ); ?>"><?php esc_html_e( 'SKU total number', 'usces' ); ?></th>
102 </tr>
103 <tr>
104 <td rowspan="3" class="bignum"><?php echo number_format( $items_num ); ?></td><td colspan="<?php echo esc_attr( $zaiko_status_cols ); ?>" class="bignum"><?php echo number_format( array_sum( $stocs ) ); ?></td>
105 </tr>
106 <tr>
107 <?php
108 foreach ( $this->zaiko_status as $value ) :
109 ?>
110 <th>
111 <?php
112 if ( __( 'OK', 'usces' ) == $value ) {
113 esc_html_e( 'In Stock', 'usces' );
114 } else {
115 echo esc_html( $value );
116 }
117 ?>
118 </th>
119 <?php
120 endforeach;
121 ?>
122 </tr>
123 <tr>
124 <?php
125 foreach ( $this->zaiko_status as $stock_key => $value ) :
126 $count = isset( $stocs[ $stock_key ] ) ? $stocs[ $stock_key ] : 0;
127 ?>
128 <td class="bignum"><?php echo number_format( $count ); ?></td>
129 <?php
130 endforeach;
131 unset( $stocs );
132 ?>
133 </tr>
134 <tr>
135 <th colspan="<?php echo esc_attr( $zaiko_status_cols + 1 ); ?>"><?php esc_html_e( 'List of items without stock', 'usces' ); ?></th>
136 </tr>
137 <?php
138 $zerostoc_items = usces_get_non_zerostoc_items();
139 foreach ( (array) $zerostoc_items as $item ) :
140 ?>
141 <tr>
142 <td colspan="<?php echo esc_attr( $zaiko_status_cols + 1 ); ?>"><a href="<?php echo esc_url( site_url() . '/wp-admin/admin.php?page=usces_itemedit&action=edit&post=' . $item['ID'] ); ?>"><?php echo ( esc_html( $item['name'] ) . ' ' . esc_html( $item['code'] ) ); ?></a></td>
143 </tr>
144 <?php
145 endforeach;
146 unset( $non_stoc_skus );
147 ?>
148 </table>
149 </div><!--usces_box-->
150 <?php do_action( 'usces_action_admintop_box2' ); ?>
151
152 <?php if ( 2 < $this->user_level ) : ?>
153 <h4><?php esc_html_e( 'Your environment', 'usces' ); ?></h4>
154 <div class="usces_box">
155 <table class="dashboard">
156 <tr>
157 <th>&nbsp;</th><th colspan="2"><?php esc_html_e( 'Software Version', 'usces' ); ?></th>
158 </tr>
159 <tr>
160 <td><?php esc_html_e( 'Server', 'usces' ); ?></td><td colspan="2"><?php echo esc_html( $_SERVER['SERVER_SOFTWARE'] ); ?></td>
161 </tr>
162 <tr>
163 <td>MySQL</td><td colspan="2"><?php echo esc_html( $wpdb->dbh->server_info ); ?></td>
164 </tr>
165 <tr>
166 <?php
167 $get_ini = ini_get_all();
168 $essential_extentions = array( 'simplexml', 'curl', 'gd', 'json', 'mbstring', 'mysql', 'openssl' );
169 ?>
170 <td>PHP</td><td colspan="2"><?php echo esc_html( phpversion() ); ?> memory [global]:<?php echo esc_html( $get_ini['memory_limit']['global_value'] ); ?> [locale]:<?php echo esc_html( $get_ini['memory_limit']['local_value'] ); ?> [usage]:<?php echo esc_html( (int) ( memory_get_peak_usage() / 1048576 ) ); ?>M<br />
171 <?php
172 foreach ( $essential_extentions as $key => $esext ) {
173 if ( extension_loaded( $esext ) ) {
174 if ( $key ) {
175 echo ',&nbsp;' . esc_html( $esext );
176 } else {
177 echo esc_html( $esext );
178 }
179 }
180 }
181 ?>
182 </td>
183 </tr>
184 </table>
185 </div><!--usces_box-->
186 <?php endif; ?>
187 <?php do_action( 'usces_action_admintop_box3' ); ?>
188
189 </div><!--usces_admin_left-->
190 </div><!--usces_admin-->
191 </div><!--wrap-->
192