| 1 |
<?php |
| 2 |
/** |
| 3 |
* Represents the view for the administration dashboard. |
| 4 |
* |
| 5 |
* This includes the header, options, and other information that should provide |
| 6 |
* The User Interface to the end user. |
| 7 |
*/ |
| 8 |
?> |
| 9 |
<div class="wrap"> |
| 10 |
|
| 11 |
<?php screen_icon(); ?> |
| 12 |
<h2<?php if ( floatval( get_bloginfo( 'version' ) ) >= 3.9 ) { |
| 13 |
echo ' class="ujc-admin-tit"'; |
| 14 |
} ?>><?php echo esc_html( get_admin_page_title() ); ?></h2> |
| 15 |
|
| 16 |
<?php |
| 17 |
$active_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : 'tab_ujic_list'; |
| 18 |
!empty($_GET['_wp_http_referer']) && false !== strpos($_GET['_wp_http_referer'], 'tab_ujic_news') ? $active_tab = 'tab_ujic_news' : null; |
| 19 |
|
| 20 |
$add_tab = __( 'Add new style', 'uji-countdown' ); |
| 21 |
|
| 22 |
if ( isset( $_GET['tab'] ) ) |
| 23 |
{ |
| 24 |
$active_tab = $_GET['tab']; |
| 25 |
$add_tab = ( 'tab_ujic_new' == $_GET['tab'] && isset( $_GET['edit'] ) ) ? __( 'Edit style', 'uji-countdown' ) : $add_tab; |
| 26 |
} |
| 27 |
?> |
| 28 |
|
| 29 |
<h2 class="nav-tab-wrapper"> |
| 30 |
<a href="?page=uji-countdown&tab=tab_ujic_list" class="nav-tab <?php echo $active_tab == 'tab_ujic_list' ? 'nav-tab-active' : ''; ?>"><i class="dashicons dashicons-menu ujic-mico"></i><?php _e( 'My Styles', 'uji-countdown' ); ?></a> |
| 31 |
<a href="?page=uji-countdown&tab=tab_ujic_new" class="nav-tab <?php echo $active_tab == 'tab_ujic_new' ? 'nav-tab-active' : ''; ?>"><i class="dashicons dashicons-clock ujic-mico"></i><?php echo $add_tab; ?></a> |
| 32 |
<a href="?<?php echo str_replace(is_ssl() ? 'https://' : 'http://', '', esc_url('page=uji-countdown&tab=tab_ujic_news'));?>" class="nav-tab <?php echo $active_tab == 'tab_ujic_news' ? 'nav-tab-active' : ''; ?>"><i class="dashicons dashicons-email ujic-mico"></i> <?php _e( 'Subscribers', 'uji-countdown' ); ?></a> |
| 33 |
<a href="?page=uji-countdown&tab=tab_ujic_set" class="nav-tab <?php echo $active_tab == 'tab_ujic_set' ? 'nav-tab-active' : ''; ?>"><i class="dashicons dashicons-admin-tools ujic-mico"></i><?php _e( 'Settings', 'uji-countdown' ); ?></a> |
| 34 |
<a href="http://www.wpmanage.com/uji-countdown" target="_blank" class="nav-tab nav-tab-pro"><i class="dashicons dashicons-plus ujic-mico"></i><?php _e( 'Upgrade', 'uji-countdown' ); ?></a> |
| 35 |
</h2> |
| 36 |
|
| 37 |
<?php |
| 38 |
|
| 39 |
|
| 40 |
$ujicount = new Uji_Countdown(); |
| 41 |
|
| 42 |
// print_r($_GET);exit; |
| 43 |
|
| 44 |
if ( $active_tab == 'tab_ujic_list' ) { |
| 45 |
$ujicount->admin_tablelist(); |
| 46 |
} |
| 47 |
|
| 48 |
if ( $active_tab == 'tab_ujic_new' ) { |
| 49 |
$ujicount->admin_countdown(); |
| 50 |
} |
| 51 |
|
| 52 |
if ( $active_tab == 'tab_ujic_news' ) { |
| 53 |
$ujicount->admin_subscribers(); |
| 54 |
} |
| 55 |
|
| 56 |
if ( $active_tab == 'tab_ujic_set' ) { |
| 57 |
$ujicount->admin_timerset(); |
| 58 |
} |
| 59 |
?> |
| 60 |
|
| 61 |
</div> |