4 * function plugins to get
5 * plugins from the Database using pagination object
7 * @author shubham meena mentored by Matthew Lagoe
12 if ( Ticket_User
:: isMod( unserialize( $_SESSION['ticket_user'] ) ) ) {
14 $pagination = new Pagination( "SELECT * FROM plugins", "lib", 5, "Plugincache" );
15 $pageResult['plug'] = Gui_Elements
:: make_table( $pagination -> getElements(), Array( "getId", "getPluginName", "getPluginType", "getPluginPermission", "getPluginStatus", "getPluginInfo" ), Array( "id", "plugin_name", "plugin_type", "plugin_permission", "plugin_status", "plugin_info" ) );
16 $pageResult['links'] = $pagination -> getLinks( 5 );
17 $pageResult['lastPage'] = $pagination -> getLast();
18 $pageResult['currentPage'] = $pagination -> getCurrent();
20 global $INGAME_WEBPATH;
21 $pageResult['ingame_webpath'] = $INGAME_WEBPATH;
23 // check if shard is online
25 $dbs = new DBLayer( "shard" );
26 $pageResult['shard'] = "online";
28 catch( PDOException
$e ) {
29 $pageResult['shard'] = "offline";
31 return( $pageResult );
34 $_SESSION['error_code'] = "403";
35 header("Cache-Control: max-age=1");
36 header( "Location: index.php?page=error" );
37 throw new SystemExit();