public function display_tablenav($which) { global $tab; if ($tab === 'account') { return; } if (!Sputnik::account_is_linked()) { return; } $account = Sputnik::get_account(); if ('top' == $which) { ?> <div class="tablenav top"> <div class="alignright actions"> <?php if (in_array($tab, array('dashboard', 'search'))) { ?> <?php Sputnik_Admin::search_form(); } switch ($this->view) { case 'list': $view = 'grid'; $name = __('Grid', 'wp-e-commerce'); break; case 'grid': $view = 'list'; $name = __('List', 'wp-e-commerce'); break; } ?> <!--<a href="<?php echo add_query_arg('view', $view); ?> " class="view-as-<?php echo $view; ?> button"><?php echo $name; ?> </a>--> </div> <?php $this->pagination($which); ?> <img src="<?php echo esc_url(wpsc_get_ajax_spinner()); ?> " class="ajax-loading list-ajax-loading" alt="" /> <br class="clear" /> </div> <?php } else { ?> <div class="tablenav bottom"> <?php $this->pagination($which); ?> <img src="<?php echo esc_url(wpsc_get_ajax_spinner()); ?> " class="ajax-loading list-ajax-loading" alt="" /> <br class="clear" /> </div> <?php } }
protected static function other_pages() { global $tab; $account = false; try { $account = Sputnik::get_account(); } catch (Exception $e) { if ($e->getCode() === 401) { delete_option('sputnik_oauth_access'); delete_option('sputnik_oauth_request'); } elseif ($e->getCode() !== 1) { echo '<p>' . sprintf(__('Problem: %s', 'wpsc'), $e->getMessage()) . '</p>'; } } self::header($account); if (Sputnik::account_is_linked()) { self::auth(); ?> <div class="account-card"> <div class="block"> <?php echo get_avatar($account->email); ?> <p class="lead-in">Logged in as</p> <h3><?php echo esc_html($account->name); ?> </h3> <p><?php printf(__('<a href="%s">Log out</a> of your account', 'wpsc'), self::build_url(array('oauth' => 'reset'))); ?> </p> </div> <div class="block"> <p>Email: <code><?php echo $account->email; ?> </code></p> <?php if ($tab != 'purchased') { ?> <p class="stat"><?php printf(__('<strong>%d</strong> <abbr title="Plugins you can install right now">Available</abbr>', 'wpsc'), count(self::$list_table->items)); ?> </p> <?php } ?> <p class="stat"><?php printf(__('<strong>%d</strong> <abbr title="Plugins you have bought from the store">Purchased</abbr>', 'wpsc'), count($account->purchased)); ?> </p> </div> </div> <?php } self::$list_table->views(); self::$list_table->display(); }