public static function render() { if (!mainwp_current_user_can("dashboard", "manage_pages")) { mainwp_do_not_have_permissions("manage pages"); return; } $cachedSearch = MainWPCache::getCachedContext('Page'); //Loads the page screen via AJAX, which redirects to the "posting()" to really post the posts to the saved sites ?> <?php self::renderHeader('BulkManage'); ?> <div class="mainwp-search-form"> <div class="postbox mainwp-postbox"> <h3 class="mainwp_box_title"><i class="fa fa-binoculars"></i> <?php _e('Search Pages', 'mainwp'); ?> </h3> <div class="inside"> <ul class="mainwp_checkboxes"> <li> <input type="checkbox" id="mainwp_page_search_type_publish" <?php echo $cachedSearch == null || $cachedSearch != null && in_array('publish', $cachedSearch['status']) ? 'checked="checked"' : ''; ?> class="mainwp-checkbox2"/> <label for="mainwp_page_search_type_publish" class="mainwp-label2">Published</label> </li> <li> <input type="checkbox" id="mainwp_page_search_type_pending" <?php echo $cachedSearch != null && in_array('pending', $cachedSearch['status']) ? 'checked="checked"' : ''; ?> class="mainwp-checkbox2"/> <label for="mainwp_page_search_type_pending" class="mainwp-label2">Pending</label> </li> <li> <input type="checkbox" id="mainwp_page_search_type_private" <?php echo $cachedSearch != null && in_array('private', $cachedSearch['status']) ? 'checked="checked"' : ''; ?> class="mainwp-checkbox2"/> <label for="mainwp_page_search_type_private" class="mainwp-label2">Private</label> </li> <li> <input type="checkbox" id="mainwp_page_search_type_future" <?php echo $cachedSearch != null && in_array('future', $cachedSearch['status']) ? 'checked="checked"' : ''; ?> class="mainwp-checkbox2"/> <label for="mainwp_page_search_type_future" class="mainwp-label2">Future</label> </li> <li> <input type="checkbox" id="mainwp_page_search_type_draft" <?php echo $cachedSearch != null && in_array('draft', $cachedSearch['status']) ? 'checked="checked"' : ''; ?> class="mainwp-checkbox2"/> <label for="mainwp_page_search_type_draft" class="mainwp-label2">Draft</label> </li> <li> <input type="checkbox" id="mainwp_page_search_type_trash" <?php echo $cachedSearch != null && in_array('trash', $cachedSearch['status']) ? 'checked="checked"' : ''; ?> class="mainwp-checkbox2"/> <label for="mainwp_page_search_type_trash" class="mainwp-label2">Trash</label> </li> </ul> <p> <?php _e('Containing Keyword:', 'mainwp'); ?> <br /> <input type="text" id="mainwp_page_search_by_keyword" class="mainwp-field mainwp-keyword" size="50" value="<?php if ($cachedSearch != null) { echo $cachedSearch['keyword']; } ?> "/> </p> <p> <?php _e('Date Range:', 'mainwp'); ?> <br /> <input type="text" id="mainwp_page_search_by_dtsstart" class="mainwp_datepicker mainwp-field mainwp-date" size="12" value="<?php if ($cachedSearch != null) { echo $cachedSearch['dtsstart']; } ?> "/> to <input type="text" id="mainwp_page_search_by_dtsstop" class="mainwp_datepicker mainwp-field mainwp-date" size="12" value="<?php if ($cachedSearch != null) { echo $cachedSearch['dtsstop']; } ?> "/> </p> </div> </div> <?php MainWPUI::select_sites_box(__("Select Sites", 'mainwp'), 'checkbox', true, true, 'mainwp_select_sites_box_left'); ?> <div style="clear: both;"></div> <input type="button" name="mainwp_show_pages" id="mainwp_show_pages" class="button-primary" value="<?php _e('Show Pages', 'mainwp'); ?> "/> <span id="mainwp_pages_loading"> <i class="fa fa-spinner fa-pulse"></i> <em><?php _e('Grabbing information from Child Sites', 'mainwp'); ?> </em></span> <br/><br/> </div> <div class="clear"></div> <div id="mainwp_pages_error"></div> <div id="mainwp_pages_main" <?php if ($cachedSearch != null) { echo 'style="display: block;"'; } ?> > <div class="alignleft"> <select name="bulk_action" id="mainwp_bulk_action"> <option value="none"><?php _e('Bulk Action', 'mainwp'); ?> </option> <option value="trash"><?php _e('Move to Trash', 'mainwp'); ?> </option> <option value="restore"><?php _e('Restore', 'mainwp'); ?> </option> <option value="delete"><?php _e('Delete Permanently', 'mainwp'); ?> </option> </select> <input type="button" name="" id="mainwp_bulk_page_action_apply" class="button" value="<?php _e('Apply', 'mainwp'); ?> "/> </div> <div class="alignright" id="mainwp_pages_total_results"> <?php _e('Total Results:', 'mainwp'); ?> <span id="mainwp_pages_total"><?php if ($cachedSearch != null) { echo $cachedSearch['count']; } ?> </span> </div> <div class="clear"></div> <div id="mainwp_pages_content"> <table class="wp-list-table widefat fixed pages tablesorter" id="mainwp_pages_table" cellspacing="0"> <thead> <tr> <th scope="col" id="cb" class="manage-column column-cb check-column" style=""><input type="checkbox"></th> <th scope="col" id="title" class="manage-column column-title sortable desc" style=""> <a href="#" onclick="return false;"><span><?php _e('Title', 'mainwp'); ?> </span><span class="sorting-indicator"></span></a> </th> <th scope="col" id="author" class="manage-column column-author sortable desc" style=""> <a href="#" onclick="return false;"><span><?php _e('Author', 'mainwp'); ?> </span><span class="sorting-indicator"></span></a> </th> <th scope="col" id="comments" class="manage-column column-comments num sortable desc" style=""> <a href="#" onclick="return false;"> <span><span class="vers"><img alt="Comments" src="<?php echo admin_url('images/comment-grey-bubble.png'); ?> "></span></span> <span class="sorting-indicator"></span> </a> </th> <th scope="col" id="date" class="manage-column column-date sortable asc" style=""> <a href="#" onclick="return false;"><span><?php _e('Date', 'mainwp'); ?> </span><span class="sorting-indicator"></span></a> </th> <th scope="col" id="status" class="manage-column column-status sortable asc" style="width: 120px;"> <a href="#" onclick="return false;"><span><?php _e('Status', 'mainwp'); ?> </span><span class="sorting-indicator"></span></a> </th> <th scope="col" id="categories" class="manage-column column-categories sortable desc" style=""> <a href="#" onclick="return false;"><span><?php _e('Website', 'mainwp'); ?> </span><span class="sorting-indicator"></span></a> </th> </tr> </thead> <tfoot> <tr> <th scope="col" id="cb" class="manage-column column-cb check-column" style=""><input type="checkbox"></th> <th scope="col" id="title" class="manage-column column-title sortable desc" style=""> <a href="#" onclick="return false;"><span><?php _e('Title', 'mainwp'); ?> </span><span class="sorting-indicator"></span></a> </th> <th scope="col" id="author" class="manage-column column-author sortable desc" style=""> <a href="#" onclick="return false;"><span><?php _e('Author', 'mainwp'); ?> </span><span class="sorting-indicator"></span></a> </th> <th scope="col" id="comments" class="manage-column column-comments num sortable desc" style=""> <a href="#" onclick="return false;"> <span><span class="vers"><img alt="Comments" src="<?php echo admin_url('images/comment-grey-bubble.png'); ?> "></span></span> <span class="sorting-indicator"></span> </a> </th> <th scope="col" id="date" class="manage-column column-date sortable asc" style=""> <a href="#" onclick="return false;"><span><?php _e('Date', 'mainwp'); ?> </span><span class="sorting-indicator"></span></a> </th> <th scope="col" id="status" class="manage-column column-status sortable asc" style="width: 120px;"> <a href="#" onclick="return false;"><span><?php _e('Status', 'mainwp'); ?> </span><span class="sorting-indicator"></span></a> </th> <th scope="col" id="categories" class="manage-column column-categories sortable desc" style=""> <a href="#" onclick="return false;"><span><?php _e('Website', 'mainwp'); ?> </span><span class="sorting-indicator"></span></a> </th> </tr> </tfoot> <tbody id="the-posts-list" class="list:pages"> <?php MainWPCache::echoBody('Page'); ?> </tbody> </table> <div class="pager" id="pager"> <form> <img src="<?php echo plugins_url('images/first.png', dirname(__FILE__)); ?> " class="first"> <img src="<?php echo plugins_url('images/prev.png', dirname(__FILE__)); ?> " class="prev"> <input type="text" class="pagedisplay"> <img src="<?php echo plugins_url('images/next.png', dirname(__FILE__)); ?> " class="next"> <img src="<?php echo plugins_url('images/last.png', dirname(__FILE__)); ?> " class="last"> <span> <?php _e('Show:', 'mainwp'); ?> </span><select class="pagesize"> <option selected="selected" value="10">10</option> <option value="25">25</option> <option value="50">50</option> <option value="100">100</option> <option value="1000000000">All</option> </select><span> <?php _e('Pages per page', 'mainwp'); ?> </span> </form> </div> <div class="clear"></div> </div> </div> </div> </div> <?php if ($cachedSearch != null) { echo '<script>mainwp_pages_table_reinit();</script>'; } }
public function cache_echo_body($page) { MainWPCache::echoBody($page); }
public static function render() { if (!mainwp_current_user_can("dashboard", "manage_users")) { mainwp_do_not_have_permissions("manage users"); return; } $cachedSearch = MainWPCache::getCachedContext('Users'); self::renderHeader(''); ?> <div> <div class="postbox mainwp-postbox" style="width: 555px !important;"> <h3 class="mainwp_box_title"><i class="fa fa-binoculars"></i> <?php _e('Search Users', 'mainwp'); ?> </h3> <div class="inside"> <div class="mainwp-search-box"> <input type="text" aria-required="true" value="<?php if ($cachedSearch != null && isset($cachedSearch['keyword'])) { echo $cachedSearch['keyword']; } ?> " id="mainwp_search_users" name="mainwp_search_users"> <input type="button" value="<?php _e('Search Users', 'mainwp'); ?> " class="button" id="mainwp_btn_search_users" name="mainwp_btn_search_users"> <span id="mainwp_users_searching"> <i class="fa fa-spinner fa-pulse"></i> </span> </div> <h3><?php _e('Show Users', 'mainwp'); ?> </h3> <ul class="mainwp_checkboxes"> <li> <input type="checkbox" id="mainwp_user_role_administrator" <?php echo $cachedSearch == null || $cachedSearch != null && in_array('administrator', $cachedSearch['status']) ? 'checked="checked"' : ''; ?> class="mainwp-checkbox2"/> <label for="mainwp_user_role_administrator" class="mainwp-label2"><?php _e('Administrator', 'mainwp'); ?> </label> </li> <li> <input type="checkbox" id="mainwp_user_role_editor" <?php echo $cachedSearch != null && in_array('editor', $cachedSearch['status']) ? 'checked="checked"' : ''; ?> class="mainwp-checkbox2"/> <label for="mainwp_user_role_editor" class="mainwp-label2"><?php _e('Editor', 'mainwp'); ?> </label> </li> <li> <input type="checkbox" id="mainwp_user_role_author" <?php echo $cachedSearch != null && in_array('author', $cachedSearch['status']) ? 'checked="checked"' : ''; ?> class="mainwp-checkbox2"/> <label for="mainwp_user_role_author" class="mainwp-label2"><?php _e('Author', 'mainwp'); ?> </label> </li> <li> <input type="checkbox" id="mainwp_user_role_contributor" <?php echo $cachedSearch != null && in_array('contributor', $cachedSearch['status']) ? 'checked="checked"' : ''; ?> class="mainwp-checkbox2"/> <label for="mainwp_user_role_contributor" class="mainwp-label2"><?php _e('Contributor', 'mainwp'); ?> </label> </li> <li> <input type="checkbox" id="mainwp_user_role_subscriber" <?php echo $cachedSearch != null && in_array('subscriber', $cachedSearch['status']) ? 'checked="checked"' : ''; ?> class="mainwp-checkbox2"/> <label for="mainwp_user_role_subscriber" class="mainwp-label2"><?php _e('Subscriber', 'mainwp'); ?> </label> </li> </ul> </div> </div> <?php MainWPUI::select_sites_box(__("Select Sites", 'mainwp'), 'checkbox', true, true, 'mainwp_select_sites_box_left'); ?> <div class="postbox" style="float: left; width: 255px; margin-left: 2em;"> <h3 class="box_title mainwp_box_title"><i class="fa fa-key"></i> <?php _e('Update Password', 'mainwp'); ?> </h3> <div class="inside mainwp_inside" style="padding-bottom: .2em !important;"> <div class="form-field"> <label for="pass1"><?php _e('Twice Required', 'mainwp'); ?> </label> <input name="user_login" type="hidden" id="user_login" value="admin"> <div><input name="pass1" type="password" id="pass1" autocomplete="off"/></div> <div><input name="pass2" type="password" id="pass2" autocomplete="off"/></div> </div> <div id="pass-strength-result" style="display: block"><?php _e('Strength Indicator', 'mainwp'); ?> </div> <br><br> <p class="description indicator-hint"><?php _e('Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ & ).', 'mainwp'); ?> </p> <p style="text-align: center;"><input type="button" value="<?php _e('Update Password', 'mainwp'); ?> " class="button-primary" id="mainwp_btn_update_password" name="mainwp_btn_update_password"> <span id="mainwp_users_password_updating"><i class="fa fa-spinner fa-pulse"></i></span> </p> <p><div id="mainwp_update_password_error" style="display: none"></div></p> </div> </div> <div style="clear: both;"></div> <input type="button" name="mainwp_show_users" id="mainwp_show_users" class="button-primary" value="<?php _e('Show Users', 'mainwp'); ?> "/> <span id="mainwp_users_loading"><i class="fa fa-spinner fa-pulse"></i> <em><?php _e('Grabbing information from Child Sites', 'mainwp'); ?> </em></span> <br/><br/> </div> <div class="clear"></div> <div id="mainwp_users_error"></div> <div id="mainwp_users_main" <?php if ($cachedSearch != null) { echo 'style="display: block;"'; } ?> > <div class="alignleft"> <select name="bulk_action" id="mainwp_bulk_action"> <option value="none"><?php _e('Bulk Action', 'mainwp'); ?> </option> <option value="delete"><?php _e('Delete', 'mainwp'); ?> </option> </select> <input type="button" name="" id="mainwp_bulk_user_action_apply" class="button" value="<?php _e('Apply', 'mainwp'); ?> "/> <select name="bulk_action" id="mainwp_bulk_role_action"> <option value="none"><?php _e('Change Role to ...', 'mainwp'); ?> </option> <option value="role_to_administrator"> <?php _e('Administrator', 'mainwp'); ?> </option> <option value="role_to_editor"> <?php _e('Editor', 'mainwp'); ?> </option> <option value="role_to_author"> <?php _e('Author', 'mainwp'); ?> </option> <option value="role_to_contributor"> <?php _e('Contributor', 'mainwp'); ?> </option> <option value="role_to_subscriber"> <?php _e('Subscriber', 'mainwp'); ?> </option> </select> <input type="button" name="" id="mainwp_bulk_role_action_apply" class="button" value="<?php _e('Change', 'mainwp'); ?> "/> </div> <div class="alignright" id="mainwp_users_total_results"> <?php _e('Total Results:', 'mainwp'); ?> <span id="mainwp_users_total"><?php echo $cachedSearch != null ? $cachedSearch['count'] : '0'; ?> </span> </div> <div class="clear"></div> <div id="mainwp_users_content"> <table class="wp-list-table widefat fixed pages tablesorter" id="mainwp_users_table" cellspacing="0"> <thead> <tr> <th scope="col" id="cb" class="manage-column column-cb check-column" style=""><input type="checkbox"></th> <th scope="col" id="username" class="manage-column column-username sortable desc" style=""> <a href="#" onclick="return false;"><span><?php _e('Username', 'mainwp'); ?> </span><span class="sorting-indicator"></span></a> </th> <th scope="col" id="name" class="manage-column column-author sortable desc" style=""> <a href="#" onclick="return false;"><span><?php _e('Name', 'mainwp'); ?> </span><span class="sorting-indicator"></span></a> </th> <th scope="col" id="email" class="manage-column column-email sortable desc" style=""> <a href="#" onclick="return false;"><span><?php _e('E-mail', 'mainwp'); ?> </span><span class="sorting-indicator"></span></a> </th> <th scope="col" id="role" class="manage-column column-role sortable desc" style=""> <a href="#" onclick="return false;"><span><?php _e('Role', 'mainwp'); ?> </span><span class="sorting-indicator"></span></a> </th> <th scope="col" id="posts" class="manage-column column-posts sortable desc" style=""> <a href="#" onclick="return false;"><span><?php _e('Posts', 'mainwp'); ?> </span><span class="sorting-indicator"></span></a> </th> <th scope="col" id="website" class="manage-column column-website sortable desc" style=""> <a href="#" onclick="return false;"><span><?php _e('Website', 'mainwp'); ?> </span><span class="sorting-indicator"></span></a> </th> </tr> </thead> <tfoot> <tr> <th scope="col" id="cb" class="manage-column column-cb check-column" style=""><input type="checkbox"></th> <th scope="col" id="username" class="manage-column column-username sortable desc" style=""> <a href="#" onclick="return false;"><span><?php _e('Username', 'mainwp'); ?> </span><span class="sorting-indicator"></span></a> </th> <th scope="col" id="name" class="manage-column column-author sortable desc" style=""> <a href="#" onclick="return false;"><span><?php _e('Name', 'mainwp'); ?> </span><span class="sorting-indicator"></span></a> </th> <th scope="col" id="email" class="manage-column column-email sortable desc" style=""> <a href="#" onclick="return false;"><span><?php _e('E-mail', 'mainwp'); ?> </span><span class="sorting-indicator"></span></a> </th> <th scope="col" id="role" class="manage-column column-role sortable desc" style=""> <a href="#" onclick="return false;"><span><?php _e('Role', 'mainwp'); ?> </span><span class="sorting-indicator"></span></a> </th> <th scope="col" id="posts" class="manage-column column-posts sortable desc" style=""> <a href="#" onclick="return false;"><span><?php _e('Posts', 'mainwp'); ?> </span><span class="sorting-indicator"></span></a> </th> <th scope="col" id="website" class="manage-column column-website sortable desc" style=""> <a href="#" onclick="return false;"><span><?php _e('Website', 'mainwp'); ?> </span><span class="sorting-indicator"></span></a> </th> </tr> </tfoot> <tbody id="the-list" class="list:user"> <?php MainWPCache::echoBody('Users'); ?> </tbody> </table> <div class="pager" id="pager"> <form> <img src="<?php echo plugins_url('images/first.png', dirname(__FILE__)); ?> " class="first"> <img src="<?php echo plugins_url('images/prev.png', dirname(__FILE__)); ?> " class="prev"> <input type="text" class="pagedisplay"> <img src="<?php echo plugins_url('images/next.png', dirname(__FILE__)); ?> " class="next"> <img src="<?php echo plugins_url('images/last.png', dirname(__FILE__)); ?> " class="last"> <span> <?php _e('Show:', 'mainwp'); ?> </span><select class="pagesize"> <option selected="selected" value="10">10</option> <option value="25">25</option> <option value="50">50</option> <option value="100">100</option> <option value="1000000000">All</option> </select><span> <?php _e('Users per page', 'mainwp'); ?> </span> </form> </div> <div class="clear"></div> </div> </div> <?php if ($cachedSearch != null) { echo '<script>mainwp_users_table_reinit();</script>'; } self::renderFooter(''); }
public static function render() { $cachedSearch = MainWPCache::getCachedContext('Themes'); self::renderHeader('Manage'); ?> <div class="mainwp-search-form"> <div class="postbox mainwp-postbox"> <h3 class="mainwp_box_title"><i class="fa fa-binoculars"></i> <?php _e('Search Themes', 'mainwp'); ?> </h3> <div class="inside"> <div class="mainwp_info-box-blue"> <?php _e('To only <strong>View or Ignore</strong> themes select <strong>All Themes</strong>', 'mainwp'); ?> <br/> <?php _e('To <strong>Activate</strong> or <strong>Delete</strong> a Theme select <strong>Inactive</strong> (A theme needs to be Deactivated in order for it to be Enabled)', 'mainwp'); ?> <br/> </div> <p> <?php _e('Status:', 'mainwp'); ?> <br /> <select name="mainwp_theme_search_by_status" id="mainwp_theme_search_by_status"> <option value="all" <?php if ($cachedSearch != null && $cachedSearch['the_status'] == 'all') { echo 'selected'; } ?> ><?php _e('All Themes', 'mainwp'); ?> </option> <option value="active" <?php if ($cachedSearch != null && $cachedSearch['the_status'] == 'active') { echo 'selected'; } ?> ><?php _e('Active', 'mainwp'); ?> </option> <option value="inactive" <?php if ($cachedSearch != null && $cachedSearch['the_status'] == 'inactive') { echo 'selected'; } ?> ><?php _e('Inactive', 'mainwp'); ?> </option> </select> </p> <p> <?php _e('Containing Keyword:', 'mainwp'); ?> <br/> <input type="text" id="mainwp_theme_search_by_keyword" class="mainwp-field mainwp-keyword" size="50" value="<?php if ($cachedSearch != null) { echo $cachedSearch['keyword']; } ?> "/> </p> </div> </div> <?php MainWPUI::select_sites_box(__("Select Sites", 'mainwp'), 'checkbox', true, true, 'mainwp_select_sites_box_left'); ?> <div style="clear: both;"></div> <input type="button" name="mainwp_show_themes" id="mainwp_show_themes" class="button-primary" value="<?php _e('Show Themes', 'mainwp'); ?> "/> <span id="mainwp_themes_loading"> <i class="fa fa-spinner fa-pulse"></i> <em><?php _e('Grabbing information from Child Sites', 'mainwp'); ?> </em></span> <span id="mainwp_themes_loading_info"><?php _e('Automatically refreshing to get up to date information.', 'mainwp'); ?> </span> <br/><br/> </div> <div class="clear"></div> <div id="mainwp_themes_error"></div> <div id="mainwp_themes_main" <?php if ($cachedSearch != null) { echo 'style="display: block;"'; } ?> > <div id="mainwp_themes_content"> <?php MainWPCache::echoBody('Themes'); ?> </div> </div> <?php if ($cachedSearch != null) { echo '<script>mainwp_themes_all_table_reinit();</script>'; } self::renderFooter('Manage'); }