User:Highway of Life/Modules List

Here is the script used to generate the table layout for the ACP, MCP, and UCP.

Hopefully someone will find it useful for editing the wiki.

session_begin; $auth->acl($user->data);
 * @ignore

if (!$user->data['is_registered']) {   if ($user->data['is_bot']) {       redirect(append_sid("{$phpbb_root_path}index.$phpEx")); }   login_box('', 'LOGIN'); } else if ($user->data['user_type'] != USER_FOUNDER) {	die('You are not allowed in here. :)'); }

$user->add_lang('acp/common'); $user->add_lang('ucp'); $user->add_lang('mcp');

header('Content-type:text/plain');

$cp = request_var('cp', ''); $sql_where = '';

if (!empty($cp)) {	switch ($cp) {		case 'ACP': $control_panel = $cp; break; case 'MCP': $control_panel = $cp; break; case 'UCP': $control_panel = $cp; break; }	$sql_where = "WHERE module_langname LIKE '%". $control_panel. "%'"; } $sql_where = ($sql_where) ? $sql_where : '';

$sql = 'SELECT module_langname, module_basename, module_mode FROM '. MODULES_TABLE. " $sql_where"; $result = $db->sql_query($sql); ?>