Ik weet dat het kan met een code zoals hieronder maar ik weet niet hoe.
Wie kan mij helpen.
==========================================
"login.$phpEx?redirect=".$_SERVER['REQUEST_URI']
if ( !$userdata['session_logged_in'] )
{
redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=viewprofile&" . POST_USERS_URL . "=" . $profiledata['user_id'], true));
}
==========================================
Code: Selecteer alles
<?php
/***************************************************************************
mods.php
-------------------
begin : Sat June 6th 2003
copyright : (C) 2003 phpbb2.de
email : webmaster@phpbb2.de
$Id: mods.php,v 0.1.0 2003/06/6 22:23:12 stefan2k1 Exp $
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = "./";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$profiledata = get_userdata($HTTP_GET_VARS[POST_USERS_URL]);
if ( !$userdata['session_logged_in'] )
{
redirect(append_sid("login.$phpEx?redirect=mods.php" . POST_USERS_URL . "=" . $profiledata['user_id'], true));
}
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_MODS, $board_config['session_length']);
init_userprefs($userdata);
//
// End session management
//
//
// Obtain Mods
//
$sql = "SELECT *
FROM " . MODS_TABLE . "
ORDER BY mod_title";
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't retrieve Mods data", "", __LINE__, __FILE__, $sql);
}
$mods = $db->sql_fetchrowset($result);
$template->set_filenames(array(
"body" => "mods_list.tpl")
);
$template->assign_vars(array(
"L_MODS_TITLE" => $lang['Mods_title'],
"L_MODS_TEXT" => $lang['Mods_explain'],
"L_MOD_TITLE" => $lang['Mod_title'],
"L_MOD_VERSION" => $lang['Mod_version'],
"L_MOD_DESC" => $lang['Mod_description'],
"L_MOD_URL" => $lang['Mod_url'],
"L_MOD_AUTHOR" => $lang['Mod_author'],
"L_MOD_DOWNLOAD" => $lang['Mod_download'],
'U_PHPBB_INDEX' => append_sid("index.$phpEx"),
'L_PHPBB_HOME' => sprintf($lang['Forum_Index'], $board_config['sitename']),
'U_MODS' => append_sid("mods.$phpEx"),
'L_MODS' => $lang['Mods'],)
);
for($i = 0; $i < count($mods); $i++)
{
$mod_version = $mods[$i]['mod_version'];
$mod_description = $mods[$i]['mod_description'];
$mod_id = $mods[$i]['mod_id'];
$mod_url = $mods[$i]['mod_url'];
$mod_img = ( $mods[$i]['mod_url'] ) ? '<a href="' . $mods[$i]['mod_url'] . '" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_mod_website'] . '" title="' . $lang['Visit_mod_website'] . '" border="0" /></a>' : '';
$mod_dl_img = ( $mods[$i]['mod_download'] ) ? '<a href="' . $mods[$i]['mod_download'] . '"><img src="' . $images['icon_download'] . '" alt="' . $lang['Visit_mod_website'] . '" title="' . $lang['Visit_mod_website'] . '" border="0" /></a>' : '';
$mod_author = $mods[$i]['mod_author'];
$mod_download = $mods[$i]['mod_download'];
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$template->assign_block_vars("mods", array(
"ROW_COLOR" => "#" . $row_color,
"ROW_CLASS" => $row_class,
"MOD_ID" => $mod_id,
"MOD_TITLE" => $mods[$i]['mod_title'],
"MOD_VERSION" => $mod_version,
"MOD_DESC" => $mod_description,
"MOD_URL" => $mod_url,
"MOD_URL_IMG" => $mod_img,
"MOD_AUTHOR" => $mod_author,
"MOD_DOWNLOAD" => $mod_dl_img,
"MOD_IMG" => $mod_img)
);
}
$page_title = $lang['Mods'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->pparse("body");
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
