function lonelythread_init() { global $mybb, $db, $cache, $templates, $threadpage, $header, $headerinclude, $footer, $theme; if ($mybb->get_input('action') == 'lonelythreads') { $rpgsuite = new RPGSuite($mybb, $db, $cache); $threadlist = ""; $count = 0; if (isset($mybb->input['gid'])) { $threads = $rpgsuite->get_lonely_threads((int) $mybb->input['gid']); } else { $threads = $rpgsuite->get_lonely_threads(); } $groupfilters = ""; eval("\$groupfilters = \"" . $templates->get("rpglonelythread_groupfilter_nogroup") . "\";"); foreach ($rpgsuite->get_icgroups('fid <> 0') as $group) { $groupinfo = $group->get_info(); eval("\$groupfilters .= \"" . $templates->get("rpglonelythread_groupfilter_group") . "\";"); } foreach ($threads as $thread) { $trow = $count % 2 ? "trow2" : "trow1"; $threaddate = date($mybb->settings['dateformat'], $thread['dateline']); eval("\$threadlist .= \"" . $templates->get("rpglonelythread_row") . "\";"); $count++; } eval("\$threadpage = \"" . $templates->get("rpglonelythread_page") . "\";"); output_page($threadpage); exit; } }
$table->construct_header('Next Run'); $table->construct_cell('<strong>Activity Check</strong>'); if ($mybb->settings['rpgsuite_activitycheck']) { $activitycheck = new Ticker($db, 1, $mybb->settings['rpgsuite_activitycheck_freq']); $table->construct_cell(date("D, jS M Y @ g:ia", $activitycheck->next_run())); } else { $table->construct_cell('<i>Disabled</i>'); } $table->construct_row(); $table->construct_cell('<strong>Group Rewards/Penalties</strong>'); if ($mybb->settings['rpgsuite_grouppoints']) { $grouppoints = new Ticker($db, 2, $mybb->settings['rpgsuite_grouppoints_freq']); $table->construct_cell(date("D, jS M Y @ g:ia", $grouppoints->next_run())); } else { $table->construct_cell('<i>Disabled</i>'); } $table->construct_row(); $table->output("Management Jobs"); // Generate list of IC Groups for editing $rpgsuite = new RPGSuite($mybb, $db, $cache); $table = new Table(); foreach ($rpgsuite->get_icgroups() as $usergroup) { $group = $usergroup->get_info(); $table->construct_cell("<strong>" . $group['title'] . "</strong>"); $table->construct_cell("<a href='index.php?module=rpgsuite-group&action=settings&gid=" . $group['gid'] . "'>Manage Pack</a>"); $table->construct_cell("<a target='_blank' href='" . $mybb->settings['bburl'] . "/modcp.php?action=managegroup&gid=" . $group['gid'] . "'>Mod CP</a>"); $table->construct_row(); } $table->output("Current Packs"); echo "<div style='width:100%;text-align:center;'><a href='index.php?module=rpgsuite-create'><h2>Create a New Pack</h2></a></div>"; $page->output_footer();