Jump to content
  • Announcements

    • Xmat

      Pravidlo pro postování v TTT

      Do sekce Tipy, triky, tutoriály nepatří žádné dotazy.   Postujte sem vaše návody, tipy a různé další věci jež uznáte za vhodné sdělit zdejšímu osazenstvu, ale veškeré dotazy směřujte do sekce Všeobecná diskuse.
    • Replik

      Seznam návodů a důležitých témat v této sekci

      Pro lepší přehlednost jsem vytvořil tento seznam, který vás, méně zkušené, lépe provede touto sekcí. Věřím, že zde najdete, co hledáte. Vypsané jsou návody, které jsou oficiálně uznané jako návody. Běžné diskuze, které neposkytují postupy a rady zvěřejněny nejsou.   Instalace vlastního MaNGOS Serveru Díky těmto návodům budete (měli by jste být) schopni vytvořit a následně spustit váš vlastní server. Nastavení je pro verze s i bez datadisku.   Instalace MaNGOS Serveru (bez datadisku TBC) - Autor Benny Instalace MaNGOS Serveru (s datadiskem TBC) - Autor Malfik Instalace MaNGOS Serveru v prostředí Linux - Autor charlie Instalace MaNGOS Serveru v prostředí Linux - Autor kupkoid   Chyby a jejich řešení při přihlašování k serveru - Autor Cybe   Zálohování uživatelských dat   Dávkový soubor (BAT soubor) pro vytvoření SQL záloh - Autor Replik   Kompilování - tvoření vlastních release (revizí)   Tvorba kompilací pro Win32 (MangoScript) - Autor bLuma   Ostatní - těžko zařaditelné, ale neznamená to, že nejsou dobré   VIP Systém - Autor charlie Tvorba Webových stránek pro MaNGOS - Autor zahuba Tvorba teleportačních NPC (MangoScript) - Autor Replik Registrační web (původně předělaná SPORA) Funkční pro Antrix i MaNGOS - Autor Replik Nastavení a spuštění Minimanager pro MaNGOS - Autor BlackMartin Nastavení MaNGOS Website - Autor Artorius   Samozřejmě jsou zde i jiné návody, ale tyto jsou nejvíce používané, proto věřím, že vám budou nápomocné. Tuto sekci budeme upravovat podle potřeby. Pokud by jste něco nenašli nebo si nevěděli rady, hledejte na fóru a teprve potom založte vlastní topik. Pokud nějaký autor vytvoří kvalitní návod a chtěl by ho zveřejnit i v tomto seznamu, doporučuji, aby mi napsal zprávu skrze PM.   Díky a přeji hezký den na WoWResource   Replik
    • Aristo

      Příspěvky tam, kde nemají co dělat

      Dodržujte zákaz přispívání do topiků s repaky pokud si to zakladatelé nepřejí!! Opakované psaní příspěvků bude trestáno warnem.
    • Aristo

      Používání spoilerů

      Poslední dobou má většina uživatelů fora zvláštní nutkání postovat extrémně dlouhé texty nebo kódy, které zabírají v nejedenom případu i 80% obsahu celé stránky a hodně tak zvedají nepřehlednost v topiku. Chtěl bych všechny uživatele požádat, aby při postování citací, jakýchkoliv kódů, errorů, atp... delších než 30 řádků používali funkci spoileru.   Funkci vyvoláte příkazem [spoiler] text [/spoiler]   Ukázka:  
Sign in to follow this  
Silenthill

PhP BB3

Recommended Posts

Caw lidi, udelal sjem si forko nainstaloval a ted je z toho tohle :Dhttp://f-forum.tym.cz/ pls pomocte mi nekdo .. potreboval bych navod jak udelat nez sekci .. zprovoznit styl který jsem si nahrál do FTP .. proste vse aby to bylo funkční forum :-) děkuju těm / tomu kdo poradí

Share this post


Link to post
Share on other sites

PhPbb3 má překlad do češtiny, tak se připoj do administrace a přečti si jednotlivé záložky...

Je to opravdu triviální.

Share this post


Link to post
Share on other sites

ja sem to delal podle tohohle navodu

 

První krok, co musíte udělat je, že se přihlásíte na již nainstalovaném fóru jako administrátor a pomocí odkazu v nejspodnější části stránky Ovládací panel fóra se dostanete do administrace. Poté v horní nabídce vyberete kategorii Fóra. Kliknete na červený křížek u kategorie Moje první kategorie, potvrdíte smazání. Do textového pole (opět se nacházíme v kategorii Fóra v administraci) napíšete název nové kategorie, která bude obsahovat Fóra. Potvrdíte stiskem tlačítka Vytvořit nové fórum. Objeví se nám stránka, kde nadefinujeme nově vytvořené fórum. Ale my nechceme fórum, ale kategorii a proto hned na začátku vybereme Typ fóra jako Kategorie. Na konci stránky dáte odeslat. Objeví se nám zelený rámeček, že fórum bylo úspěšně vytvořeno a že můžeme Nastavit oprávnění tohoto fóra. Tak na to klikneme. Objeví se nám stránka se čtyřmi rámečky. My se zaměříme na ten vpravo dole. Klikneme na skupinu Administrátoři a klikneme na Přidat Oprávnění. Jako roli by bylo pro Administrátora vhodné zvolit Plný přístup, tak tedy klikneme na rolovací menu a zvolíme Plný Přístup (významem rolí oprávnění se budeme zabývat v jednom z dalších dílů).

 

Poté dáme Použít všechna oprávnění. Objeví se nám strukturovaný seznam fór a kategorií. Klikneme na název kategorie, co jsme vytvořili a zvolíme odeslat. Opět vpravo dole vybereme tentokrát skupinu Registrovaní uživatelé, potvrdíme tlačítkem odeslat. Vybereme Běžný přístup + hlasování. Zase dáme odeslat. Tohle uděláme pro všechny skupiny, co se tam nacházejí, všimněte si, že po každém přidání Oprávnění pro skupiny se dotyčná skupina přesune do pravého horního rámečku. Takže předchozí kroky uděláme u každé skupiny, doporučuji tyto role: Glob. Moderátoři -> Plný přístup, Návštěvníci -> Omezený přístup, Boti -> Přístup botů. A máme nastavenou kategorii pro svá fóra včetně oprávnění. Tuto kategorii budeme používat jako předlohu pro další fóra.

 

Takže si na záložkách v administraci najedeme na Fóra a klikneme na ni. Najdeme si název kategorie, kterou jsme vytvořili a také na ni klikneme. Dole bude opět textové pole a do něj zadáme Název Nového fóra. Potvrdíme volbou Vytvořit nové fórum. Zadáme tam název, popis a další informace. Až dojdete k bodu Zkopírovat oprávnění z, tak zvolte název kategorie, kterou jsme už dříve vytvořili, Na konci stránky dáme odeslat. Tímto způsobem můžete tvořit další fóra a kategorie. Děkuji Vám za pozornost, přeji hodně úspěchů s oprávněním a Hezký den.

 

A jinak jak rika Czeirne vsechno je v administraci .... tam si nekde nastavis ten novej styl

Share this post


Link to post
Share on other sites

Hledam hledam .. sice uz jsem neco nasel ale ... neumim moc php a sql .. skoro vubec... tak tomu moc nerozumim

 

Muze pls nekdo skontrolovat ty ACP ?

acp_modules.php

<?php
/**
*
* @package acp
* @version $Id: acp_modules.php 9179 2008-12-06 18:23:42Z toonarmy $
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}

/**
* - Able to check for new module versions (modes changed/adjusted/added/removed)
* Icons for:
* - module enabled and displayed (common)
* - module enabled and not displayed
* - module deactivated
* - category (enabled)
* - category disabled
*/

/**
* @package acp
*/
class acp_modules
{
var $module_class = '';
var $parent_id;
var $u_action;

function main($id, $mode)
{
global $db, $user, $auth, $template, $module;
global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx;

// Set a global define for modules we might include (the author is able to prevent execution of code by checking this constant)
define('MODULE_INCLUDE', true);

$user->add_lang('acp/modules');
$this->tpl_name = 'acp_modules';

// module class
$this->module_class = $mode;

if ($this->module_class == 'ucp')
{
$user->add_lang('ucp');
}
else if ($this->module_class == 'mcp')
{
$user->add_lang('mcp');
}

if ($module->p_class != $this->module_class)
{
$module->add_mod_info($this->module_class);
}

$this->page_title = strtoupper($this->module_class);

$this->parent_id = request_var('parent_id', 0);
$module_id = request_var('m', 0);
$action = request_var('action', '');
$errors = array();

switch ($action)
{
case 'delete':
if (!$module_id)
{
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
}

if (confirm_box(true))
{
// Make sure we are not directly within a module
if ($module_id == $this->parent_id)
{
$sql = 'SELECT parent_id
FROM ' . MODULES_TABLE . '
WHERE module_id = ' . $module_id;
$result = $db->sql_query($sql);
$this->parent_id = (int) $db->sql_fetchfield('parent_id');
$db->sql_freeresult($result);
}

$errors = $this->delete_module($module_id);

if (!sizeof($errors))
{
$this->remove_cache_file();
trigger_error($user->lang['MODULE_DELETED'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id));
}
}
else
{
confirm_box(false, 'DELETE_MODULE', build_hidden_fields(array(
'i' => $id,
'mode' => $mode,
'parent_id' => $this->parent_id,
'module_id' => $module_id,
'action' => $action,
)));
}

break;

case 'enable':
case 'disable':
if (!$module_id)
{
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
}

$sql = 'SELECT *
FROM ' . MODULES_TABLE . "
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
AND module_id = $module_id";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);

if (!$row)
{
trigger_error($user->lang['NO_MODULE'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
}

$sql = 'UPDATE ' . MODULES_TABLE . '
SET module_enabled = ' . (($action == 'enable') ? 1 : 0) . "
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
AND module_id = $module_id";
$db->sql_query($sql);

add_log('admin', 'LOG_MODULE_' . strtoupper($action), $this->lang_name($row['module_langname']));
$this->remove_cache_file();

break;

case 'move_up':
case 'move_down':
if (!$module_id)
{
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
}

$sql = 'SELECT *
FROM ' . MODULES_TABLE . "
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
AND module_id = $module_id";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);

if (!$row)
{
trigger_error($user->lang['NO_MODULE'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
}

$move_module_name = $this->move_module_by($row, $action, 1);

if ($move_module_name !== false)
{
add_log('admin', 'LOG_MODULE_' . strtoupper($action), $this->lang_name($row['module_langname']), $move_module_name);
$this->remove_cache_file();
}

break;

case 'quickadd':
$quick_install = request_var('quick_install', '');

if (confirm_box(true))
{
if (!$quick_install || strpos($quick_install, '::') === false)
{
break;
}

list($module_basename, $module_mode) = explode('::', $quick_install);

// Check if module name and mode exist...
$fileinfo = $this->get_module_infos($module_basename);
$fileinfo = $fileinfo[$module_basename];

if (isset($fileinfo['modes'][$module_mode]))
{
$module_data = array(
'module_basename' => $module_basename,
'module_enabled' => 0,
'module_display' => (isset($fileinfo['modes'][$module_mode]['display'])) ? $fileinfo['modes'][$module_mode]['display'] : 1,
'parent_id' => $this->parent_id,
'module_class' => $this->module_class,
'module_langname' => $fileinfo['modes'][$module_mode]['title'],
'module_mode' => $module_mode,
'module_auth' => $fileinfo['modes'][$module_mode]['auth'],
);

$errors = $this->update_module_data($module_data);

if (!sizeof($errors))
{
$this->remove_cache_file();

trigger_error($user->lang['MODULE_ADDED'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id));
}
}
}
else
{
confirm_box(false, 'ADD_MODULE', build_hidden_fields(array(
'i' => $id,
'mode' => $mode,
'parent_id' => $this->parent_id,
'action' => 'quickadd',
'quick_install' => $quick_install,
)));
}

break;

case 'edit':

if (!$module_id)
{
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
}

$module_row = $this->get_module_row($module_id);

// no break

case 'add':

if ($action == 'add')
{
$module_row = array(
'module_basename' => '',
'module_enabled' => 0,
'module_display' => 1,
'parent_id' => 0,
'module_langname' => utf8_normalize_nfc(request_var('module_langname', '', true)),
'module_mode' => '',
'module_auth' => '',
);
}

$module_data = array();

$module_data['module_basename'] = request_var('module_basename', (string) $module_row['module_basename']);
$module_data['module_enabled'] = request_var('module_enabled', (int) $module_row['module_enabled']);
$module_data['module_display'] = request_var('module_display', (int) $module_row['module_display']);
$module_data['parent_id'] = request_var('module_parent_id', (int) $module_row['parent_id']);
$module_data['module_class'] = $this->module_class;
$module_data['module_langname'] = utf8_normalize_nfc(request_var('module_langname', (string) $module_row['module_langname'], true));
$module_data['module_mode'] = request_var('module_mode', (string) $module_row['module_mode']);

$submit = (isset($_POST['submit'])) ? true : false;

if ($submit)
{
if (!$module_data['module_langname'])
{
trigger_error($user->lang['NO_MODULE_LANGNAME'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
}

$module_type = request_var('module_type', 'category');

if ($module_type == 'category')
{
$module_data['module_basename'] = $module_data['module_mode'] = $module_data['module_auth'] = '';
$module_data['module_display'] = 1;
}

if ($action == 'edit')
{
$module_data['module_id'] = $module_id;
}

// Adjust auth row
if ($module_data['module_basename'] && $module_data['module_mode'])
{
$fileinfo = $this->get_module_infos($module_data['module_basename']);
$module_data['module_auth'] = $fileinfo[$module_data['module_basename']]['modes'][$module_data['module_mode']]['auth'];
}

$errors = $this->update_module_data($module_data);

if (!sizeof($errors))
{
$this->remove_cache_file();

trigger_error((($action == 'add') ? $user->lang['MODULE_ADDED'] : $user->lang['MODULE_EDITED']) . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id));
}
}

// Category/not category?
$is_cat = (!$module_data['module_basename']) ? true : false;

// Get module information
$module_infos = $this->get_module_infos();

// Build name options
$s_name_options = $s_mode_options = '';
foreach ($module_infos as $option => $values)
{
if (!$module_data['module_basename'])
{
$module_data['module_basename'] = $option;
}

// Name options
$s_name_options .= '<option value="' . $option . '"' . (($option == $module_data['module_basename']) ? ' selected="selected"' : '') . '>' . $this->lang_name($values['title']) . ' [' . $this->module_class . '_' . $option . ']</option>';

$template->assign_block_vars('m_names', array('NAME' => $option, 'A_NAME' => addslashes($option)));

// Build module modes
foreach ($values['modes'] as $m_mode => $m_values)
{
if ($option == $module_data['module_basename'])
{
$s_mode_options .= '<option value="' . $m_mode . '"' . (($m_mode == $module_data['module_mode']) ? ' selected="selected"' : '') . '>' . $this->lang_name($m_values['title']) . '</option>';
}

$template->assign_block_vars('m_names.modes', array(
'OPTION' => $m_mode,
'VALUE' => $this->lang_name($m_values['title']),
'A_OPTION' => addslashes($m_mode),
'A_VALUE' => addslashes($this->lang_name($m_values['title'])))
);
}
}

$s_cat_option = '<option value="0"' . (($module_data['parent_id'] == 0) ? ' selected="selected"' : '') . '>' . $user->lang['NO_PARENT'] . '</option>';

$template->assign_vars(array_merge(array(
'S_EDIT_MODULE' => true,
'S_IS_CAT' => $is_cat,
'S_CAT_OPTIONS' => $s_cat_option . $this->make_module_select($module_data['parent_id'], ($action == 'edit') ? $module_row['module_id'] : false, false, false, false, true),
'S_MODULE_NAMES' => $s_name_options,
'S_MODULE_MODES' => $s_mode_options,
'U_BACK' => $this->u_action . '&parent_id=' . $this->parent_id,
'U_EDIT_ACTION' => $this->u_action . '&parent_id=' . $this->parent_id,

'L_TITLE' => $user->lang[strtoupper($action) . '_MODULE'],

'MODULENAME' => $this->lang_name($module_data['module_langname']),
'ACTION' => $action,
'MODULE_ID' => $module_id,

),
array_change_key_case($module_data, CASE_UPPER))
);

if (sizeof($errors))
{
$template->assign_vars(array(
'S_ERROR' => true,
'ERROR_MSG' => implode('<br />', $errors))
);
}

return;

break;
}

// Default management page
if (sizeof($errors))
{
$template->assign_vars(array(
'S_ERROR' => true,
'ERROR_MSG' => implode('<br />', $errors))
);
}

if (!$this->parent_id)
{
$navigation = strtoupper($this->module_class);
}
else
{
$navigation = '<a href="' . $this->u_action . '">' . strtoupper($this->module_class) . '</a>';

$modules_nav = $this->get_module_branch($this->parent_id, 'parents', 'descending');

foreach ($modules_nav as $row)
{
$langname = $this->lang_name($row['module_langname']);

if ($row['module_id'] == $this->parent_id)
{
$navigation .= ' -> ' . $langname;
}
else
{
$navigation .= ' -> <a href="' . $this->u_action . '&parent_id=' . $row['module_id'] . '">' . $langname . '</a>';
}
}
}

// Jumpbox
$module_box = $this->make_module_select($this->parent_id, false, false, false, false);

$sql = 'SELECT *
FROM ' . MODULES_TABLE . "
WHERE parent_id = {$this->parent_id}
AND module_class = '" . $db->sql_escape($this->module_class) . "'
ORDER BY left_id";
$result = $db->sql_query($sql);

if ($row = $db->sql_fetchrow($result))
{
do
{
$langname = $this->lang_name($row['module_langname']);

if (!$row['module_enabled'])
{
$module_image = '<img src="images/icon_folder_lock.gif" alt="' . $user->lang['DEACTIVATED_MODULE'] .'" />';
}
else
{
$module_image = (!$row['module_basename'] || $row['left_id'] + 1 != $row['right_id']) ? '<img src="images/icon_subfolder.gif" alt="' . $user->lang['CATEGORY'] . '" />' : '<img src="images/icon_folder.gif" alt="' . $user->lang['MODULE'] . '" />';
}

$url = $this->u_action . '&parent_id=' . $this->parent_id . '&m=' . $row['module_id'];

$template->assign_block_vars('modules', array(
'MODULE_IMAGE' => $module_image,
'MODULE_TITLE' => $langname,
'MODULE_ENABLED' => ($row['module_enabled']) ? true : false,
'MODULE_DISPLAYED' => ($row['module_display']) ? true : false,

'S_ACP_CAT_SYSTEM' => ($this->module_class == 'acp' && $row['module_langname'] == 'ACP_CAT_SYSTEM') ? true : false,
'S_ACP_MODULE_MANAGEMENT' => ($this->module_class == 'acp' && ($row['module_basename'] == 'modules' || $row['module_langname'] == 'ACP_MODULE_MANAGEMENT')) ? true : false,

'U_MODULE' => $this->u_action . '&parent_id=' . $row['module_id'],
'U_MOVE_UP' => $url . '&action=move_up',
'U_MOVE_DOWN' => $url . '&action=move_down',
'U_EDIT' => $url . '&action=edit',
'U_DELETE' => $url . '&action=delete',
'U_ENABLE' => $url . '&action=enable',
'U_DISABLE' => $url . '&action=disable')
);
}
while ($row = $db->sql_fetchrow($result));
}
else if ($this->parent_id)
{
$row = $this->get_module_row($this->parent_id);

$url = $this->u_action . '&parent_id=' . $this->parent_id . '&m=' . $row['module_id'];

$template->assign_vars(array(
'S_NO_MODULES' => true,
'MODULE_TITLE' => $langname,
'MODULE_ENABLED' => ($row['module_enabled']) ? true : false,
'MODULE_DISPLAYED' => ($row['module_display']) ? true : false,

'U_EDIT' => $url . '&action=edit',
'U_DELETE' => $url . '&action=delete',
'U_ENABLE' => $url . '&action=enable',
'U_DISABLE' => $url . '&action=disable')
);
}
$db->sql_freeresult($result);

// Quick adding module
$module_infos = $this->get_module_infos();

// Build quick options
$s_install_options = '';
foreach ($module_infos as $option => $values)
{
// Name options
$s_install_options .= '<optgroup label="' . $this->lang_name($values['title']) . ' [' . $this->module_class . '_' . $option . ']">';

// Build module modes
foreach ($values['modes'] as $m_mode => $m_values)
{
$s_install_options .= '<option value="' . $option . '::' . $m_mode . '">   ' . $this->lang_name($m_values['title']) . '</option>';
}

$s_install_options .= '</optgroup>';
}

$template->assign_vars(array(
'U_SEL_ACTION' => $this->u_action,
'U_ACTION' => $this->u_action . '&parent_id=' . $this->parent_id,
'NAVIGATION' => $navigation,
'MODULE_BOX' => $module_box,
'PARENT_ID' => $this->parent_id,
'S_INSTALL_OPTIONS' => $s_install_options,
)
);
}

/**
* Get row for specified module
*/
function get_module_row($module_id)
{
global $db, $user;

$sql = 'SELECT *
FROM ' . MODULES_TABLE . "
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
AND module_id = $module_id";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);

if (!$row)
{
trigger_error($user->lang['NO_MODULE'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
}

return $row;
}

/**
* Get available module information from module files
*/
function get_module_infos($module = '', $module_class = false)
{
global $phpbb_root_path, $phpEx;

$module_class = ($module_class === false) ? $this->module_class : $module_class;

$directory = $phpbb_root_path . 'includes/' . $module_class . '/info/';
$fileinfo = array();

if (!$module)
{
$dh = @opendir($directory);

if (!$dh)
{
return $fileinfo;
}

while (($file = readdir($dh)) !== false)
{
// Is module?
if (preg_match('/^' . $module_class . '_.+\.' . $phpEx . '$/', $file))
{
$class = str_replace(".$phpEx", '', $file) . '_info';

if (!class_exists($class))
{
include($directory . $file);
}

// Get module title tag
if (class_exists($class))
{
$c_class = new $class();
$module_info = $c_class->module();
$fileinfo[str_replace($module_class . '_', '', $module_info['filename'])] = $module_info;
}
}
}
closedir($dh);

ksort($fileinfo);
}
else
{
$filename = $module_class . '_' . basename($module);
$class = $module_class . '_' . basename($module) . '_info';

if (!class_exists($class))
{
include($directory . $filename . '.' . $phpEx);
}

// Get module title tag
if (class_exists($class))
{
$c_class = new $class();
$module_info = $c_class->module();
$fileinfo[str_replace($module_class . '_', '', $module_info['filename'])] = $module_info;
}
}

return $fileinfo;
}

/**
* Simple version of jumpbox, just lists modules
*/
function make_module_select($select_id = false, $ignore_id = false, $ignore_acl = false, $ignore_nonpost = false, $ignore_emptycat = true, $ignore_noncat = false)
{
global $db, $user, $auth, $config;

$sql = 'SELECT module_id, module_enabled, module_basename, parent_id, module_langname, left_id, right_id, module_auth
FROM ' . MODULES_TABLE . "
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
ORDER BY left_id ASC";
$result = $db->sql_query($sql);

$right = $iteration = 0;
$padding_store = array('0' => '');
$module_list = $padding = '';

while ($row = $db->sql_fetchrow($result))
{
if ($row['left_id'] < $right)
{
$padding .= '   ';
$padding_store[$row['parent_id']] = $padding;
}
else if ($row['left_id'] > $right + 1)
{
$padding = (isset($padding_store[$row['parent_id']])) ? $padding_store[$row['parent_id']] : '';
}

$right = $row['right_id'];

if (!$ignore_acl && $row['module_auth'])
{
// We use zero as the forum id to check - global setting.
if (!p_master::module_auth($row['module_auth'], 0))
{
continue;
}
}

// ignore this module?
if ((is_array($ignore_id) && in_array($row['module_id'], $ignore_id)) || $row['module_id'] == $ignore_id)
{
continue;
}

// empty category
if (!$row['module_basename'] && ($row['left_id'] + 1 == $row['right_id']) && $ignore_emptycat)
{
continue;
}

// ignore non-category?
if ($row['module_basename'] && $ignore_noncat)
{
continue;
}

$selected = (is_array($select_id)) ? ((in_array($row['module_id'], $select_id)) ? ' selected="selected"' : '') : (($row['module_id'] == $select_id) ? ' selected="selected"' : '');

$langname = $this->lang_name($row['module_langname']);
$module_list .= '<option value="' . $row['module_id'] . '"' . $selected . ((!$row['module_enabled']) ? ' class="disabled"' : '') . '>' . $padding . $langname . '</option>';

$iteration++;
}
$db->sql_freeresult($result);

unset($padding_store);

return $module_list;
}

/**
* Get module branch
*/
function get_module_branch($module_id, $type = 'all', $order = 'descending', $include_module = true)
{
global $db;

switch ($type)
{
case 'parents':
$condition = 'm1.left_id BETWEEN m2.left_id AND m2.right_id';
break;

case 'children':
$condition = 'm2.left_id BETWEEN m1.left_id AND m1.right_id';
break;

default:
$condition = 'm2.left_id BETWEEN m1.left_id AND m1.right_id OR m1.left_id BETWEEN m2.left_id AND m2.right_id';
break;
}

$rows = array();

$sql = 'SELECT m2.*
FROM ' . MODULES_TABLE . ' m1
LEFT JOIN ' . MODULES_TABLE . " m2 ON ($condition)
WHERE m1.module_class = '" . $db->sql_escape($this->module_class) . "'
AND m2.module_class = '" . $db->sql_escape($this->module_class) . "'
AND m1.module_id = $module_id
ORDER BY m2.left_id " . (($order == 'descending') ? 'ASC' : 'DESC');
$result = $db->sql_query($sql);

while ($row = $db->sql_fetchrow($result))
{
if (!$include_module && $row['module_id'] == $module_id)
{
continue;
}

$rows[] = $row;
}
$db->sql_freeresult($result);

return $rows;
}

/**
* Remove modules cache file
*/
function remove_cache_file()
{
global $cache;

// Sanitise for future path use, it's escaped as appropriate for queries
$p_class = str_replace(array('.', '/', '\\'), '', basename($this->module_class));

$cache->destroy('_modules_' . $p_class);

// Additionally remove sql cache
$cache->destroy('sql', MODULES_TABLE);
}

/**
* Return correct language name
*/
function lang_name($module_langname)
{
global $user;

return (!empty($user->lang[$module_langname])) ? $user->lang[$module_langname] : $module_langname;
}

/**
* Update/Add module
*
* @param bool $run_inline if set to true errors will be returned and no logs being written
*/
function update_module_data(&$module_data, $run_inline = false)
{
global $db, $user;

if (!isset($module_data['module_id']))
{
// no module_id means we're creating a new category/module
if ($module_data['parent_id'])
{
$sql = 'SELECT left_id, right_id
FROM ' . MODULES_TABLE . "
WHERE module_class = '" . $db->sql_escape($module_data['module_class']) . "'
AND module_id = " . (int) $module_data['parent_id'];
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);

if (!$row)
{
if ($run_inline)
{
return 'PARENT_NO_EXIST';
}

trigger_error($user->lang['PARENT_NO_EXIST'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
}

// Workaround
$row['left_id'] = (int) $row['left_id'];
$row['right_id'] = (int) $row['right_id'];

$sql = 'UPDATE ' . MODULES_TABLE . "
SET left_id = left_id + 2, right_id = right_id + 2
WHERE module_class = '" . $db->sql_escape($module_data['module_class']) . "'
AND left_id > {$row['right_id']}";
$db->sql_query($sql);

$sql = 'UPDATE ' . MODULES_TABLE . "
SET right_id = right_id + 2
WHERE module_class = '" . $db->sql_escape($module_data['module_class']) . "'
AND {$row['left_id']} BETWEEN left_id AND right_id";
$db->sql_query($sql);

$module_data['left_id'] = (int) $row['right_id'];
$module_data['right_id'] = (int) $row['right_id'] + 1;
}
else
{
$sql = 'SELECT MAX(right_id) AS right_id
FROM ' . MODULES_TABLE . "
WHERE module_class = '" . $db->sql_escape($module_data['module_class']) . "'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);

$module_data['left_id'] = (int) $row['right_id'] + 1;
$module_data['right_id'] = (int) $row['right_id'] + 2;
}

$sql = 'INSERT INTO ' . MODULES_TABLE . ' ' . $db->sql_build_array('INSERT', $module_data);
$db->sql_query($sql);

$module_data['module_id'] = $db->sql_nextid();

if (!$run_inline)
{
add_log('admin', 'LOG_MODULE_ADD', $this->lang_name($module_data['module_langname']));
}
}
else
{
$row = $this->get_module_row($module_data['module_id']);

if ($module_data['module_basename'] && !$row['module_basename'])
{
// we're turning a category into a module
$branch = $this->get_module_branch($module_data['module_id'], 'children', 'descending', false);

if (sizeof($branch))
{
return array($user->lang['NO_CATEGORY_TO_MODULE']);
}
}

if ($row['parent_id'] != $module_data['parent_id'])
{
$this->move_module($module_data['module_id'], $module_data['parent_id']);
}

$update_ary = $module_data;
unset($update_ary['module_id']);

$sql = 'UPDATE ' . MODULES_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $update_ary) . "
WHERE module_class = '" . $db->sql_escape($module_data['module_class']) . "'
AND module_id = " . (int) $module_data['module_id'];
$db->sql_query($sql);

if (!$run_inline)
{
add_log('admin', 'LOG_MODULE_EDIT', $this->lang_name($module_data['module_langname']));
}
}

return array();
}

/**
* Move module around the tree
*/
function move_module($from_module_id, $to_parent_id)
{
global $db;

$moved_modules = $this->get_module_branch($from_module_id, 'children', 'descending');
$from_data = $moved_modules[0];
$diff = sizeof($moved_modules) * 2;

$moved_ids = array();
for ($i = 0; $i < sizeof($moved_modules); ++$i)
{
$moved_ids[] = $moved_modules[$i]['module_id'];
}

// Resync parents
$sql = 'UPDATE ' . MODULES_TABLE . "
SET right_id = right_id - $diff
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
AND left_id < " . (int) $from_data['right_id'] . '
AND right_id > ' . (int) $from_data['right_id'];
$db->sql_query($sql);

// Resync righthand side of tree
$sql = 'UPDATE ' . MODULES_TABLE . "
SET left_id = left_id - $diff, right_id = right_id - $diff
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
AND left_id > " . (int) $from_data['right_id'];
$db->sql_query($sql);

if ($to_parent_id > 0)
{
$to_data = $this->get_module_row($to_parent_id);

// Resync new parents
$sql = 'UPDATE ' . MODULES_TABLE . "
SET right_id = right_id + $diff
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
AND " . (int) $to_data['right_id'] . ' BETWEEN left_id AND right_id
AND ' . $db->sql_in_set('module_id', $moved_ids, true);
$db->sql_query($sql);

// Resync the righthand side of the tree
$sql = 'UPDATE ' . MODULES_TABLE . "
SET left_id = left_id + $diff, right_id = right_id + $diff
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
AND left_id > " . (int) $to_data['right_id'] . '
AND ' . $db->sql_in_set('module_id', $moved_ids, true);
$db->sql_query($sql);

// Resync moved branch
$to_data['right_id'] += $diff;
if ($to_data['right_id'] > $from_data['right_id'])
{
$diff = '+ ' . ($to_data['right_id'] - $from_data['right_id'] - 1);
}
else
{
$diff = '- ' . abs($to_data['right_id'] - $from_data['right_id'] - 1);
}
}
else
{
$sql = 'SELECT MAX(right_id) AS right_id
FROM ' . MODULES_TABLE . "
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
AND " . $db->sql_in_set('module_id', $moved_ids, true);
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);

$diff = '+ ' . (int) ($row['right_id'] - $from_data['left_id'] + 1);
}

$sql = 'UPDATE ' . MODULES_TABLE . "
SET left_id = left_id $diff, right_id = right_id $diff
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
AND " . $db->sql_in_set('module_id', $moved_ids);
$db->sql_query($sql);
}

/**
* Remove module from tree
*/
function delete_module($module_id)
{
global $db, $user;

$row = $this->get_module_row($module_id);

$branch = $this->get_module_branch($module_id, 'children', 'descending', false);

if (sizeof($branch))
{
return array($user->lang['CANNOT_REMOVE_MODULE']);
}

// If not move
$diff = 2;
$sql = 'DELETE FROM ' . MODULES_TABLE . "
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
AND module_id = $module_id";
$db->sql_query($sql);

$row['right_id'] = (int) $row['right_id'];
$row['left_id'] = (int) $row['left_id'];

// Resync tree
$sql = 'UPDATE ' . MODULES_TABLE . "
SET right_id = right_id - $diff
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
AND left_id < {$row['right_id']} AND right_id > {$row['right_id']}";
$db->sql_query($sql);

$sql = 'UPDATE ' . MODULES_TABLE . "
SET left_id = left_id - $diff, right_id = right_id - $diff
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
AND left_id > {$row['right_id']}";
$db->sql_query($sql);

add_log('admin', 'LOG_MODULE_REMOVED', $this->lang_name($row['module_langname']));

return array();

}

/**
* Move module position by $steps up/down
*/
function move_module_by($module_row, $action = 'move_up', $steps = 1)
{
global $db;

/**
* Fetch all the siblings between the module's current spot
* and where we want to move it to. If there are less than $steps
* siblings between the current spot and the target then the
* module will move as far as possible
*/
$sql = 'SELECT module_id, left_id, right_id, module_langname
FROM ' . MODULES_TABLE . "
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
AND parent_id = " . (int) $module_row['parent_id'] . '
AND ' . (($action == 'move_up') ? 'right_id < ' . (int) $module_row['right_id'] . ' ORDER BY right_id DESC' : 'left_id > ' . (int) $module_row['left_id'] . ' ORDER BY left_id ASC');
$result = $db->sql_query_limit($sql, $steps);

$target = array();
while ($row = $db->sql_fetchrow($result))
{
$target = $row;
}
$db->sql_freeresult($result);

if (!sizeof($target))
{
// The module is already on top or bottom
return false;
}

/**
* $left_id and $right_id define the scope of the nodes that are affected by the move.
* $diff_up and $diff_down are the values to substract or add to each node's left_id
* and right_id in order to move them up or down.
* $move_up_left and $move_up_right define the scope of the nodes that are moving
* up. Other nodes in the scope of ($left_id, $right_id) are considered to move down.
*/
if ($action == 'move_up')
{
$left_id = (int) $target['left_id'];
$right_id = (int) $module_row['right_id'];

$diff_up = (int) ($module_row['left_id'] - $target['left_id']);
$diff_down = (int) ($module_row['right_id'] + 1 - $module_row['left_id']);

$move_up_left = (int) $module_row['left_id'];
$move_up_right = (int) $module_row['right_id'];
}
else
{
$left_id = (int) $module_row['left_id'];
$right_id = (int) $target['right_id'];

$diff_up = (int) ($module_row['right_id'] + 1 - $module_row['left_id']);
$diff_down = (int) ($target['right_id'] - $module_row['right_id']);

$move_up_left = (int) ($module_row['right_id'] + 1);
$move_up_right = (int) $target['right_id'];
}

// Now do the dirty job
$sql = 'UPDATE ' . MODULES_TABLE . "
SET left_id = left_id + CASE
WHEN left_id BETWEEN {$move_up_left} AND {$move_up_right} THEN -{$diff_up}
ELSE {$diff_down}
END,
right_id = right_id + CASE
WHEN right_id BETWEEN {$move_up_left} AND {$move_up_right} THEN -{$diff_up}
ELSE {$diff_down}
END
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
AND left_id BETWEEN {$left_id} AND {$right_id}
AND right_id BETWEEN {$left_id} AND {$right_id}";
$db->sql_query($sql);

$this->remove_cache_file();

return $this->lang_name($target['module_langname']);
}
}

?>

 

acp_database.html

<!-- INCLUDE overall_header.html -->

<a name="maincontent"></a>

<!-- IF MODE eq 'restore' -->
<h1>{L_ACP_RESTORE}</h1>

<p>{L_ACP_RESTORE_EXPLAIN}</p>

<!-- IF .files -->
<form id="acp_backup" method="post" action="{U_ACTION}">

<fieldset>
<legend>{L_RESTORE_OPTIONS}</legend>
<dl>
<dt><label for="file">{L_SELECT_FILE}:</label></dt>
<dd><select id="file" name="file" size="10"><!-- BEGIN files --><option value="{files.FILE}"<!-- IF files.S_LAST_ROW --> selected="selected"<!-- ENDIF -->>{files.NAME}</option><!-- END files --></select></dd>
</dl>

<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{L_START_RESTORE}" /> 
<input class="button2" type="submit" id="delete" name="delete" value="{L_DELETE_BACKUP}" /> 
<input class="button2" type="submit" id="download" name="download" value="{L_DOWNLOAD_BACKUP}" />
</p>
{S_FORM_TOKEN}
</fieldset>
</form>
<!-- ELSE -->
<div class="errorbox">
<p>{L_ACP_NO_ITEMS}</p>
</div>
<!-- ENDIF -->

<!-- ELSE -->
<h1>{L_ACP_BACKUP}</h1>

<p>{L_ACP_BACKUP_EXPLAIN}</p>

<script type="text/javascript">
// <![CDATA[

function selector(bool)
{
var table = document.getElementById('table');

for (var i = 1; i < table.options.length; i++)
{
table.options[i].selected = bool;
}
}

// ]]>
</script>

<form id="acp_backup" method="post" action="{U_ACTION}">

<fieldset>
<legend>{L_BACKUP_OPTIONS}</legend>
<dl>
<dt><label for="type">{L_BACKUP_TYPE}:</label></dt>
<dd><label><input type="radio" class="radio" name="type" value="full" id="type" checked="checked" /> {L_FULL_BACKUP}</label>
<label><input type="radio" name="type" class="radio" value="structure" /> {L_STRUCTURE_ONLY}</label>
<label><input type="radio" class="radio" name="type" value="data" /> {L_DATA_ONLY}</label></dd>
</dl>
<dl>
<dt><label for="method">{L_FILE_TYPE}:</label></dt>
<dd><!-- BEGIN methods -->
<label><input name="method"<!-- IF methods.S_FIRST_ROW --> id="method" checked="checked"<!-- ENDIF --> type="radio" class="radio" value="{methods.TYPE}" /> {methods.TYPE}</label>
<!-- END methods --></dd>
</dl>
<dl>
<dt><label for="where">{L_ACTION}:</label></dt>
<dd>
<label><input type="radio" class="radio" name="where" value="store" checked="checked" /> {L_STORE_LOCAL}</label>
<label><input type="radio" class="radio" name="where" value="download" /> {L_DOWNLOAD}</label></dd>
</dl>
<dl>
<dt><label for="table">{L_TABLE_SELECT}:</label></dt>
<dd><select id="table" name="table[]" size="10" multiple="multiple">
<!-- BEGIN tables -->
<option value="{tables.TABLE}">{tables.TABLE}</option>
<!-- END tables -->
</select></dd>
<dd><a href="#" onclick="selector(true); return false;">{L_SELECT_ALL}</a> :: <a href="#" onclick="selector(false); return false;">{L_DESELECT_ALL}</a></dd>
</dl>

<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /> 
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
</p>
{S_FORM_TOKEN}
</fieldset>
</form>

<!-- ENDIF -->

<!-- INCLUDE overall_footer.html -->

 

 

acp-modules.html

 

<!-- INCLUDE overall_header.html -->

<a name="maincontent"></a>

<!-- IF S_EDIT_MODULE -->

<script type="text/javascript">
// <![CDATA[
	function display_options(value)
	{
		if (value == 'category')
		{
			dE('modoptions', -1);
		}
		else
		{
			dE('modoptions', 1);
		}
	}

	function display_modes(value)
	{
		// Find the old select tag
		var item = document.getElementById('module_mode');

		// Create the new select tag
		var new_node = document.createElement('select');
		new_node.setAttribute('id', 'module_mode');
		new_node.setAttribute('name', 'module_mode');

		// Substitute it for the old one
		item.parentNode.replaceChild(new_node, item);

		// Reset the variable
		item = document.getElementById('module_mode');

		var j = 0;
<!-- BEGIN m_names -->

		if (value == '{m_names.A_NAME}')
		{
<!-- BEGIN modes -->
			item.options[j] = new Option('{m_names.modes.A_VALUE}');
			item.options[j].value = '{m_names.modes.A_OPTION}';
			j++;
<!-- END modes -->
		}
<!-- END m_names -->

		// select first item
		item.options[0].selected = true;
	}

// ]]>
</script>

<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a>

<h1>{L_TITLE} :: {MODULENAME}</h1>

<p>{L_EDIT_MODULE_EXPLAIN}</p>

<!-- IF S_ERROR -->
	<div class="errorbox">
		<h3>{L_WARNING}</h3>
		<p>{ERROR_MSG}</p>
	</div>
<!-- ENDIF -->

<form id="moduleedit" method="post" action="{U_EDIT_ACTION}">

<fieldset>
	<legend>{L_GENERAL_OPTIONS}</legend>
<dl>
	<dt><label for="module_langname">{L_MODULE_LANGNAME}:</label><br />
	<span>{L_MODULE_LANGNAME_EXPLAIN}</span></dt>
	<dd><input name="module_langname" type="text" class="text medium" id="module_langname" value="{MODULE_LANGNAME}" /></dd>
</dl>
<dl>
	<dt><label for="module_type">{L_MODULE_TYPE}:</label></dt>
	<dd><select name="module_type" id="module_type" onchange="display_options(this.value);"><option value="category"<!-- IF S_IS_CAT --> selected="selected"<!-- ENDIF -->>{L_CATEGORY}</option><option value="module"<!-- IF not S_IS_CAT --> selected="selected"<!-- ENDIF -->>{L_MODULE}</option></select></dd>
</dl>
<dl>
	<dt><label for="parent_id">{L_PARENT}:</label></dt>
	<dd><select name="module_parent_id" id="parent_id">{S_CAT_OPTIONS}</select></dd>
</dl>
<hr />
<dl>
	<dt><label for="module_enabled">{L_MODULE_ENABLED}:</label></dt>
	<dd><label><input type="radio" class="radio" name="module_enabled" id="module_enabled" value="1"<!-- IF MODULE_ENABLED --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
		<label><input type="radio" class="radio" name="module_enabled" value="0"<!-- IF not MODULE_ENABLED --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<div id="modoptions"<!-- IF S_IS_CAT --> style="display: none;"<!-- ENDIF -->>
	<dl>
		<dt><label for="module_display">{L_MODULE_DISPLAYED}:</label><br /><span>{L_MODULE_DISPLAYED_EXPLAIN}</span></dt>
		<dd><label><input type="radio" class="radio" name="module_display" id="module_display" value="1"<!-- IF MODULE_DISPLAY --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
			<label><input type="radio" class="radio" name="module_display" value="0"<!-- IF not MODULE_DISPLAY --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
	</dl>
	<dl>
		<dt><label for="module_basename">{L_CHOOSE_MODULE}:</label><br />
		<span>{L_CHOOSE_MODULE_EXPLAIN}</span></dt>
		<dd><select name="module_basename" id="module_basename" onchange="display_modes(this.value);">{S_MODULE_NAMES}</select></dd>
	</dl>
	<dl>
		<dt><label for="module_mode">{L_CHOOSE_MODE}:</label><br />
		<span>{L_CHOOSE_MODE_EXPLAIN}</span></dt>
		<dd><select name="module_mode" id="module_mode">{S_MODULE_MODES}</select></dd>
	</dl>
</div>

<p class="submit-buttons">
	<input type="hidden" name="action" value="{ACTION}" />
	<input type="hidden" name="m" value="{MODULE_ID}" />

	<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /> 
	<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
</p>
{S_FORM_TOKEN}
</fieldset>
</form>

<!-- ELSE -->

<h1>{L_ACP_MODULE_MANAGEMENT}</h1>

<p>{L_ACP_MODULE_MANAGEMENT_EXPLAIN}</p>

<!-- IF S_ERROR -->
	<div class="errorbox">
		<h3>{L_WARNING}</h3>
		<p>{ERROR_MSG}</p>
	</div>
<!-- ENDIF -->

<table cellspacing="1">
<tbody>
<tr>
	<td class="row3">{NAVIGATION}<!-- IF S_NO_MODULES --> [<a href="{U_EDIT}">{L_EDIT}</a> | <a href="{U_DELETE}">{L_DELETE}</a> | <!-- IF MODULE_ENABLED --><a href="{U_DISABLE}">{L_DISABLE}</a><!-- ELSE --><a href="{U_ENABLE}">{L_ENABLE}</a><!-- ENDIF -->]<!-- ENDIF --></td>
</tr>
</tbody>
</table>

<!-- IF .modules -->
	<table cellspacing="1">
		<col class="row1" /><col class="row1" /><col class="row2" /><col class="row2" />
	<tbody>
	<!-- BEGIN modules -->
		<tr>
			<td style="width: 5%; text-align: center;">{modules.MODULE_IMAGE}</td>
			<td><a href="{modules.U_MODULE}">{modules.MODULE_TITLE}</a><!-- IF not modules.MODULE_DISPLAYED --> <span class="small">[{L_HIDDEN_MODULE}]</span><!-- ENDIF --></td>
			<td style="width: 15%; white-space: nowrap; text-align: center; vertical-align: middle;"> <!-- IF modules.MODULE_ENABLED --><a href="{modules.U_DISABLE}">{L_DISABLE}</a><!-- ELSE --><a href="{modules.U_ENABLE}">{L_ENABLE}</a><!-- ENDIF --> </td>
			<td style="width:90px; white-space: nowrap; text-align: right; vertical-align: middle;">
				<!-- IF modules.S_FIRST_ROW && not modules.S_LAST_ROW -->
					{ICON_MOVE_UP_DISABLED}
					<a href="{modules.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
				<!-- ELSEIF not modules.S_FIRST_ROW && not modules.S_LAST_ROW-->
					<a href="{modules.U_MOVE_UP}">{ICON_MOVE_UP}</a> 
					<a href="{modules.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a> 
				<!-- ELSEIF modules.S_LAST_ROW && not modules.S_FIRST_ROW -->
					<a href="{modules.U_MOVE_UP}">{ICON_MOVE_UP}</a>	
					{ICON_MOVE_DOWN_DISABLED}
				<!-- ELSE -->
					{ICON_MOVE_UP_DISABLED}
					{ICON_MOVE_DOWN_DISABLED}
				<!-- ENDIF -->
				<a href="{modules.U_EDIT}">{ICON_EDIT}</a> 
				<a href="{modules.U_DELETE}">{ICON_DELETE}</a>
			</td>
		</tr>
	<!-- END modules -->
	</tbody>
	</table>
<!-- ENDIF -->

<div class="clearfix"> </div>

<form id="quick" method="post" action="{U_ACTION}">

<fieldset class="quick" style="float: {S_CONTENT_FLOW_END};">
	<input type="hidden" name="action" value="quickadd" />

	<select name="quick_install">{S_INSTALL_OPTIONS}</select>
	<input class="button2" name="quickadd" type="submit" value="{L_ADD_MODULE}" />
</fieldset>

</form>

<form id="module" method="post" action="{U_ACTION}">

<fieldset class="quick" style="float: {S_CONTENT_FLOW_BEGIN};">
	<input type="hidden" name="action" value="add" />
	<input type="hidden" name="module_parent_id" value="{PARENT_ID}" />

	<input type="text" name="module_langname" maxlength="255" /> 
	<input class="button2" name="addmodule" type="submit" value="{L_CREATE_MODULE}" />
</fieldset>

</form>

<div class="clearfix"> </div><br style="clear: both;" />

<form id="mselect" method="post" action="{U_SEL_ACTION}">
<fieldset class="quick">
	{L_SELECT_MODULE}: <select name="parent_id" onchange="if(this.options[this.selectedIndex].value != -1){ this.form.submit(); }">{MODULE_BOX}</select> 

	<input class="button2" type="submit" value="{L_GO}" />
</fieldset>
</form>

<!-- ENDIF -->

<!-- INCLUDE overall_footer.html -->

acp_users_feedback.html

 

	<form id="list" method="post" action="{U_ACTION}">

<!-- IF PAGINATION -->
<div class="pagination">
		<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> • <span>{PAGINATION}</span>
</div>
<!-- ENDIF -->

<!-- IF .log -->
<table cellspacing="1">
<thead>
<tr>
	<th>{L_REPORT_BY}</th>
	<th>{L_IP}</th>
	<th>{L_TIME}</th>
	<th>{L_FEEDBACK}</th>
	<th>{L_MARK}</th>
</tr>
</thead>
<tbody>
<!-- BEGIN log -->
	<!-- IF log.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->

		<td>{log.USERNAME}</td>
		<td style="text-align: center;">{log.IP}</td>
		<td style="text-align: center;">{log.DATE}</td>
		<td>
			{log.ACTION}
			<!-- IF log.DATA --><br />» <span class="gensmall">[ {log.DATA} ]</span><!-- ENDIF -->
		</td>
		<td style="text-align: center;"><input type="checkbox" class="radio" name="mark[]" value="{log.ID}" /></td>
	</tr>
<!-- END log -->
</tbody>
</table>
<!-- ELSE -->
	<div class="errorbox">
		<p>{L_NO_ENTRIES}</p>
	</div>
<!-- ENDIF -->

<fieldset class="display-options">
	{L_DISPLAY_LOG}:  {S_LIMIT_DAYS} {L_SORT_BY}: {S_SORT_KEY} {S_SORT_DIR}
	<input class="button2" type="submit" value="{L_GO}" name="sort" />
</fieldset>
<hr />
<!-- IF PAGINATION -->
<div class="pagination">
		<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> • <span>{PAGINATION}</span>
</div>
<!-- ENDIF -->

<!-- IF S_CLEARLOGS -->
	<fieldset class="quick">
		<input class="button2" type="submit" name="delall" value="{L_DELETE_ALL}" /> 
		<input class="button2" type="submit" name="delmarked" value="{L_DELETE_MARKED}" />
		<p class="small"><a href="#" onclick="marklist('list', 'mark', true);">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('list', 'mark', false);">{L_UNMARK_ALL}</a></p>
	</fieldset>
<!-- ENDIF -->

<h1>{L_ADD_FEEDBACK}</h1>

<p>{L_ADD_FEEDBACK_EXPLAIN}</p>

<fieldset>
	<legend>{L_ACP_USER_FEEDBACK}</legend>
	<dl>
		<dd class="full"><textarea name="message" id="message" rows="10" cols="76"></textarea></dd>
	</dl>
</fieldset>

<fieldset class="quick">
	<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
</fieldset>
{S_FORM_TOKEN}
</form>

Edited by Silenthill

Share this post


Link to post
Share on other sites

nemas zac ... promin tady nwm co je spatne ja sem to delal na localhostu ... jedine zkus vsechno smazat a udelat znova jinak opravdu uz nwm

 

Edit : jinak co si editoval si tam chtel dat jinyho nez PHPBB a misto toho napr moje forum ? .... to by sem melo taky dat nekde nastavit v administraci bez toho aby si predelaval kod

Edited by Jodlik

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×