You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ryzom-core/web/public_php/ams/inc/plugins.php

41 lines
1.4 KiB
PHTML

<?php
/**
* function plugins to get
* plugins from the Database using pagination object
10 years ago
*
* @author shubham meena mentored by Matthew Lagoe
*/
function plugins()
{
if ( Ticket_User :: isMod( unserialize( $_SESSION['ticket_user'] ) ) ) {
10 years ago
$pagination = new Pagination( "SELECT * FROM plugins", "lib", 5, "Plugincache" );
$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" ) );
$pageResult['links'] = $pagination -> getLinks( 5 );
$pageResult['lastPage'] = $pagination -> getLast();
$pageResult['currentPage'] = $pagination -> getCurrent();
10 years ago
global $INGAME_WEBPATH;
$pageResult['ingame_webpath'] = $INGAME_WEBPATH;
10 years ago
// check if shard is online
try {
$dbs = new DBLayer( "shard" );
$pageResult['shard'] = "online";
10 years ago
}
catch( PDOException $e ) {
$pageResult['shard'] = "offline";
10 years ago
}
return( $pageResult );
} else {
// ERROR: No access!
$_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header( "Location: index.php?page=error" );
throw new SystemExit();
10 years ago
}
}