function mainwp_page_restore() { $this->secure_request('mainwp_page_restore'); MainWP_Page::restore(); }
function new_menus() { if (MainWP_Utility::isAdmin()) { //Adding the page to manage your added sites/groups //The first page which will display the post area etc.. MainWP_Security_Issues::initMenu(); MainWP_Manage_Sites::initMenu(); MainWP_Post::initMenu(); MainWP_Page::initMenu(); MainWP_Themes::initMenu(); MainWP_Plugins::initMenu(); MainWP_User::initMenu(); MainWP_Manage_Backups::initMenu(); MainWP_Bulk_Update_Admin_Passwords::initMenu(); MainWP_Manage_Groups::initMenu(); MainWP_Settings::initMenu(); MainWP_Extensions::initMenu(); do_action('mainwp_admin_menu'); MainWP_Documentation::initMenu(); MainWP_Server_Information::initMenu(); MainWP_Child_Scan::initMenu(); MainWP_API_Settings::initMenu(); } }
public static function renderTable($keyword, $dtsstart, $dtsstop, $status, $groups, $sites) { MainWP_Cache::initCache('Page'); //Fetch all! //Build websites array $dbwebsites = array(); if ($sites != '') { foreach ($sites as $k => $v) { if (MainWP_Utility::ctype_digit($v)) { $website = MainWP_DB::Instance()->getWebsiteById($v); $dbwebsites[$website->id] = MainWP_Utility::mapSite($website, array('id', 'url', 'name', 'adminname', 'nossl', 'privkey', 'nosslkey')); } } } if ($groups != '') { foreach ($groups as $k => $v) { if (MainWP_Utility::ctype_digit($v)) { $websites = MainWP_DB::Instance()->query(MainWP_DB::Instance()->getSQLWebsitesByGroupId($v)); while ($websites && ($website = @MainWP_DB::fetch_object($websites))) { if ($website->sync_errors != '') { continue; } $dbwebsites[$website->id] = MainWP_Utility::mapSite($website, array('id', 'url', 'name', 'adminname', 'nossl', 'privkey', 'nosslkey')); } @MainWP_DB::free_result($websites); } } } $output = new stdClass(); $output->errors = array(); $output->pages = 0; if (count($dbwebsites) > 0) { $post_data = array('keyword' => $keyword, 'dtsstart' => $dtsstart, 'dtsstop' => $dtsstop, 'status' => $status, 'maxRecords' => get_option('mainwp_maximumPosts') === false ? 50 : get_option('mainwp_maximumPosts')); MainWP_Utility::fetchUrlsAuthed($dbwebsites, 'get_all_pages', $post_data, array(MainWP_Page::getClassName(), 'PagesSearch_handler'), $output); } MainWP_Cache::addContext('Page', array('count' => $output->pages, 'keyword' => $keyword, 'dtsstart' => $dtsstart, 'dtsstop' => $dtsstop, 'status' => $status)); //Sort if required if ($output->pages == 0) { ob_start(); ?> <tr> <td colspan="7">No pages found</td> </tr> <?php $newOutput = ob_get_clean(); echo $newOutput; MainWP_Cache::addBody('Page', $newOutput); return; } }