Pełna wersja: Unofficial modifications
nieoficjalne modyfikacje for?w phpBB by Przemo
 
lo - fi version Unofficial modifications index

Moderator moze usuwac swoje warny
Kliknij tutaj aby przejśc do pełnej wersji tematu

 
       Unofficial modifications Strona Główna -> Modyfikacje mniejsze
Poprzedni temat :: Następny temat  
Dlugi Wysłany: Pon 01 Maj, 2006  

Zmien w pliku warnings.php


znajdz: Kodif ( $userdata['user_id'] == $row['modid'] && $can_add || $can_edit )
{
$delete_img = ($admin) ? '&nbsp;<a href="' . append_sid("warnings.$phpEx?mode=delete&amp;id=$id&amp;userid=$userid&amp;sid=" . $userdata['session_id']) . '"><img src="' . $images['icon_delpost'] . '" alt="' . $lang['Delete'] . '" title="' . $lang['Delete'] . '" border="0" /></a>' : '';
$l_action = $lang['action'];
$action_url = '<a href="' . append_sid("warnings.$phpEx?mode=edit&amp;id=$id") . '"><img src="' . $images['icon_edit'] . '" alt="' . $lang['edit_mini'] . '" title="' . $lang['edit_mini'] . '" border="0" /></a>' . $delete_img . '';
}
zamien na: Kodif ( $userdata['user_id'] == $row['modid'] && $can_add || $can_edit )
{
$delete_img = ($admin || $mod) ? '&nbsp;<a href="' . append_sid("warnings.$phpEx?mode=delete&amp;id=$id&amp;userid=$userid&amp;sid=" . $userdata['session_id']) . '"><img src="' . $images['icon_delpost'] . '" alt="' . $lang['Delete'] . '" title="' . $lang['Delete'] . '" border="0" /></a>' : '';
$l_action = $lang['action'];
$action_url = '<a href="' . append_sid("warnings.$phpEx?mode=edit&amp;id=$id") . '"><img src="' . $images['icon_edit'] . '" alt="' . $lang['edit_mini'] . '" title="' . $lang['edit_mini'] . '" border="0" /></a>' . $delete_img . '';
}

znajdz: Kodif ( $mode == 'delete' && $admin )
{
if ( $HTTP_GET_VARS['sid'] != $userdata['session_id'] )
{
message_die(GENERAL_ERROR, 'Invalid_session');
}

$sql = "SELECT userid
FROM " . WARNINGS_TABLE . "
WHERE id = " . intval($id) . "
LIMIT 1";

if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query warnings table', '', __LINE__, __FILE__, $sql);
}

$row = $db->sql_fetchrow($result);


$sql = "DELETE FROM " . WARNINGS_TABLE . "
WHERE id = " . intval($id) . "";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not delete from warnings table', '', __LINE__, __FILE__, $sql);
}
else
{
zamien na: Kodif ( $mode == 'delete' && ($admin || $mod) )
{
if ( $HTTP_GET_VARS['sid'] != $userdata['session_id'] )
{
message_die(GENERAL_ERROR, 'Invalid_session');
}

$sql = "SELECT userid, modid
FROM " . WARNINGS_TABLE . "
WHERE id = " . intval($id) . "
LIMIT 1";

if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query warnings table', '', __LINE__, __FILE__, $sql);
}

$row = $db->sql_fetchrow($result);

if ($mod && $row['modid'] != $userdata['user_id'])
{
message_die(GENERAL_ERROR, $lang['Not_Authorised'], '');
}

$sql = "DELETE FROM " . WARNINGS_TABLE . "
WHERE id = " . intval($id) . "";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not delete from warnings table', '', __LINE__, __FILE__, $sql);
}
else
{

znajdz: Kodif ( $admin )
{
$l_action = $lang['action'];
$action_url = '<a href="' . append_sid("warnings.$phpEx?mode=edit&amp;id=$id") . '"><img src="' . $images['icon_edit'] . '" alt="' . $lang['edit_mini'] . '" title="' . $lang['edit_mini'] . '" border="0" /></a>&nbsp;<a href="' . append_sid("warnings.$phpEx?mode=delete&amp;id=$id&amp;userid=$userid&amp;sid=" . $userdata['session_id'] . "") . '"><img src="' . $images['icon_delpost'] . '" alt="' . $lang['Delete'] . '" title="' . $lang['Delete'] . '" border="0" /></a>';
}
zamien na: Kodif ( $admin || $mod )
{
$l_action = $lang['action'];
$action_url = '<a href="' . append_sid("warnings.$phpEx?mode=edit&amp;id=$id") . '"><img src="' . $images['icon_edit'] . '" alt="' . $lang['edit_mini'] . '" title="' . $lang['edit_mini'] . '" border="0" /></a>&nbsp;<a href="' . append_sid("warnings.$phpEx?mode=delete&amp;id=$id&amp;userid=$userid&amp;sid=" . $userdata['session_id'] . "") . '"><img src="' . $images['icon_delpost'] . '" alt="' . $lang['Delete'] . '" title="' . $lang['Delete'] . '" border="0" /></a>';
}

znajdz: Kodif ( $mode == 'delete' && $admin )
zamien na: Kodif ( $mode == 'delete' && ( $admin || $mod ))
 
       Unofficial modifications Strona Główna -> Modyfikacje mniejsze
Strona 1 z 1
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.