hij neemt de inlogsessies over, laat een zien ( broncode + online bestanden ) wat je precies hebt gedaan en ingesteld?Mik schreef:Lukt niet..
Dit artikel hierboven zorgt ervoor dat ik met de gebruikers van het forum ken aanmelden toch? Dat lukt dus niet..
Op zoek naar een soort van profielen-site
Forumregels
Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.

- Ramon Fincken
- Berichten: 2552
- Lid geworden op: 27 nov 2005, 23:15
- Locatie: Diemen
- Contacteer:
Freelance webdevelopment, including phpbb2 scripting!
Website founder van: phpBBinstallers.net phpBBantispam.com
Mods: zie op http://www.phpbb.com Blog in wording: RamonFincken.com
Website founder van: phpBBinstallers.net phpBBantispam.com
Mods: zie op http://www.phpbb.com Blog in wording: RamonFincken.com
Nou dit is het bestand waar ik het in wil doen (Het is een toto-script waarbij ik het wil gebruiken, dus ik neem aan dat ik het in de inlog-script moet zetten)
Code van de inlog-bestand is:
En volgens het artikel wat jij me stuurde moesti k dit erin zetten:
Dus ik maakte van het bestand logfunctions.php
Klopt toch wat ik doe?
Code van de inlog-bestand is:
Code: Selecteer alles
logfunctions.php
<?php
/*********************************************************
* Author: John Astill
* Date : 15th June 2002
* File : logfunctions.php
********************************************************/
/*******************************************************
* Append the given message to the log file.
*******************************************************/
function LogMsg($msg) {
global $logfile;
// If the log filename is "", don't try to write to it.
if ($logfile == "") {
return;
}
// Write to the end of the file
$file = fopen($logfile,'a+');
if ($file == FALSE) {
ErrorNotify("Unable to write to Log : $logfile . This could be due to the log file not having the correct permissions on the server.");
return;
}
$date = date("M/d/Y H:i:s T");
fwrite($file,"\n------------------------\n$date\n$msg");
fclose($file);
}
?>
Code: Selecteer alles
define('IN_PHPBB', true);
$phpbb_root_path = '../';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
Code: Selecteer alles
<?php
/*********************************************************
* Author: John Astill
* Date : 15th June 2002
* File : logfunctions.php
********************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = '../';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
/*******************************************************
* Append the given message to the log file.
*******************************************************/
function LogMsg($msg) {
global $logfile;
// If the log filename is "", don't try to write to it.
if ($logfile == "") {
return;
}
// Write to the end of the file
$file = fopen($logfile,'a+');
if ($file == FALSE) {
ErrorNotify("Unable to write to Log : $logfile . This could be due to the log file not having the correct permissions on the server.");
return;
}
$date = date("M/d/Y H:i:s T");
fwrite($file,"\n------------------------\n$date\n$msg");
fclose($file);
}
?>
nee de manier waarop jij het wilt doen is onmogelijk....
je moet namelijk ook checken of de user is ingeloged
dit gaat zo..
je moet namelijk ook checken of de user is ingeloged
dit gaat zo..
Code: Selecteer alles
if($userdata['session_logged_in'] == 1)
print("ingelogt");
else
print("niet ingelogt");
- Ramon Fincken
- Berichten: 2552
- Lid geworden op: 27 nov 2005, 23:15
- Locatie: Diemen
- Contacteer:
erm je moet zorgen dat je in een functions.inc.php of een header.inc.php
op de 1e regels die phpbb code zet, zodat het op iedere pagina
wordt uitgevoerd
op de 1e regels die phpbb code zet, zodat het op iedere pagina
wordt uitgevoerd

Freelance webdevelopment, including phpbb2 scripting!
Website founder van: phpBBinstallers.net phpBBantispam.com
Mods: zie op http://www.phpbb.com Blog in wording: RamonFincken.com
Website founder van: phpBBinstallers.net phpBBantispam.com
Mods: zie op http://www.phpbb.com Blog in wording: RamonFincken.com
- Ramon Fincken
- Berichten: 2552
- Lid geworden op: 27 nov 2005, 23:15
- Locatie: Diemen
- Contacteer:
nee, ik weet niet alleen dat het kan, ik gebruik de code ook en weet dat het gewoon werkt.
heb je iets van een bestand dat op iedere pagina als eerste aangeroepen wordt met include of include_once toevallig?
heb je iets van een bestand dat op iedere pagina als eerste aangeroepen wordt met include of include_once toevallig?
Freelance webdevelopment, including phpbb2 scripting!
Website founder van: phpBBinstallers.net phpBBantispam.com
Mods: zie op http://www.phpbb.com Blog in wording: RamonFincken.com
Website founder van: phpBBinstallers.net phpBBantispam.com
Mods: zie op http://www.phpbb.com Blog in wording: RamonFincken.com
Bestanden die included zijn bij (bijna) alle bestanden
Code: Selecteer alles
<?php
error_reporting(E_ALL & ~E_NOTICE);
/*********************************************************
* Author: John Astill (c)
* Date : 10th December 2001
* File : systemvars.php
* Desc : Global data definitions. This is where the
* : prediction league is configured for the
* : specific installation.
********************************************************/
require "userclass.php";
require "logfunctions.php";
require "error.php";
//////////////////////////////////////////
// System variable and configuration
//////////////////////////////////////////
//////////////////////////////////////////
// Constants
//////////////////////////////////////////
define("VERSION","1.11");
/////////////////////////////////////////////////
// Default points for scoring, this can be
// set in the config screen.
/////////////////////////////////////////////////
$corrHomeScore = 1;
$corrAwayScore = 1;
$corrMargin = 1;
$corrResult = 1;
$corrScore = 3;
//////////////////////////////////////////////////////////////
// Modify the values from here to where you are told to stop.
// The numbers match those in the installation steps in
// the file INSTALL.TXT.
//////////////////////////////////////////////////////////////
//////////////////////////////////////////
// 1.Prediction League Title
// The title of the Prediction League.
// Change the value between the "" to
// give the prediction league the title
// of your choice
//////////////////////////////////////////
$PredictionLeagueTitle = "StraightHiphop Toto";
//////////////////////////////////////////////////////////////
// 2. Header Row
// This is the header to be displayed in
//all the pages. It can contain HTML code.
//////////////////////////////////////////////////////////////
$HeaderRow = "<table cellpadding=\"0\" cellspacing=\"0\"><tr><td align=\"center\" class=\"TBLHEAD\"><font class=\"TBLHEAD\"><img border=\"0\" src=\"banner.jpg\"></font></td></tr></table>";
//////////////////////////////////////////////////////////////
// 3. Database hostname
// Database hostname
// The fqdn of the host containing the
// database
//////////////////////////////////////////////////////////////
$dbaseHost = "localhost";
//////////////////////////////////////////////////////////////
// 4. Base Directory Name
// The directory storing the prediction
// league files
//////////////////////////////////////////////////////////////
$baseDirName = "toto";
//////////////////////////////////////////////////////////////
// 5. Username
// User name
// The username to be used for logging
// into the database
//////////////////////////////////////////////////////////////
$dbaseUsername = "xx";
//////////////////////////////////////////////////////////////
// 6. Password
// Password to be used for logging into
// the database
//////////////////////////////////////////////////////////////
$dbasePassword = "xx";
//////////////////////////////////////////////////////////////
// 7. Database Name.
// This is the name of the database. This *MUST* be the same
// name as the name you used when creating the database.
//////////////////////////////////////////////////////////////
$dbaseName = "xx";
//////////////////////////////////////////////////////////////
// 8. The email address of the administrator. Set this to your
// own address
//////////////////////////////////////////////////////////////
$adminEmailAddr = "admin@straighthiphop.nl";
//////////////////////////////////////////////////////////////
// 9. The signature of the admin to use at the end of the
// email welcoming the user. This can be a simple name,
// or something more complex.
//////////////////////////////////////////////////////////////
$adminSignature = "\nhttp://www.straighthiphop.nl/";
//////////////////////////////////////////////////////////////
// 10. The default icon to use for a new user. The icons are
// displayed when the user is logged on. If you have an icon
// named default.gif, you can leave this as default.gif.
//////////////////////////////////////////////////////////////
$defaulticon = "default.gif";
//////////////////////////////////////////////////////////////
// 11. The URL of the associated chat room.
// This link can be used to point to chatroom, or discussion
// area you may have for your prediction league.
// If this is empty, the menu link is not shown.
//////////////////////////////////////////////////////////////
$chatRoomURL = "/viewforum.php?f=15";
//////////////////////////////////////////////////////////////
// 12. The URL of the associated home page
// Add the URL of your home page. This is shown in the menu.
//////////////////////////////////////////////////////////////
$homePage = "http://www.straighthiphop.nl";
$homePageTitle = "StraightHiphop Home";
//////////////////////////////////////////////////////////////
// 13. The name of the log file.
// "" disables the logfile functionality.
//////////////////////////////////////////////////////////////
$logfile = "";
//////////////////////////////////////////////////////////////
// 14. To allow more than one user per email address set
// this variable to TRUE .
// e.g. $allowMultipleUserPerEmail = "TRUE";
//////////////////////////////////////////////////////////////
$allowMultipleUserPerEmail = "FALSE";
//////////////////////////////////////////////////////////////
// 15. If your server is in a different timezone than the
// country in which the games are played then enter the
// difference in hours here.
// This does not allow for differences when daylight
// savings times are encountered.
// e.g. Server is in Wash DC, USA and league in UK. Then
// $timezoneOffset = -5.
//////////////////////////////////////////////////////////////
$timezoneOffset = 1;
//////////////////////////////////////////////////////////////
// 16. Set this flag to true to show the fixtures in reverse
// date order in ShowMyPredictions. Setting this to
// FALSE will display the fixtures in date order, first
// date first.
//////////////////////////////////////////////////////////////
$reverseUserPredictions = "FALSE";
//////////////////////////////////////////////////////////////
// 17. Change this flag to define which language file to use.
// Language files must be in subfolder lang.
// Default value = "lang.english.php"
//////////////////////////////////////////////////////////////
$languageFile = "lang.dutch2.php";
//////////////////////////////////////////////////////////////
// 18. Change this flag to enable auto predictions.
// Auto predictions allow the user to have the scripts
// make predictions for games where they have not made
// there own prediction.
//////////////////////////////////////////////////////////////
$autoPredict = "FALSE";
//////////////////////////////////////////////////////////////
// 19. Use the 24 hour clock
//////////////////////////////////////////////////////////////
$Use24Hr = "TRUE";
//////////////////////////////////////////////////////////////
// 20. Allow users to upload icons.
// Setting the icon directory is an absolute value. This
// will have a path something along the lines of
// "".
// The MaxIconFileSize in in Kb. This for a maximum 50Kb
// image the value is set to 50.
//////////////////////////////////////////////////////////////
$UploadIcons = "FALSE";
$MaxIconFileSize = 50;
$IconDirectory = "";
//////////////////////////////////////////////////////////////
// 21. Encrypt passwords.
// This variable determines whether encryption is enabled.
// The value is also configured in the config screen.
// If you previously chose not to encrypt passwords then you
// need to make sure that the users use the forgot password
// feature to get their new passwords.
//////////////////////////////////////////////////////////////
$PasswordEncryption = "TRUE";
/*************************************************************
**************************************************************
* The following values should not be modified unless you
* REALLY know what you are doing.
**************************************************************
**************************************************************/
/*************************************************************
// Data Tables
// The following is where you define the names of your
// database tables.
*************************************************************/
/*************************************************************
// This allows the default directory for session files
// to be changed. This should only be changed if you really
// know what you are doing.
// This should only need to be changed if you are having
// problems with sessions on your server.
// The directory you choose must exist and be writeable
// by the server.
*************************************************************/
$sessionFileDir = "";
/*************************************************************
// The League ID. Future support for multiple leagues.
*************************************************************/
$leagueID = "0";
/*************************************************************
// The name of the table to be used for the configuration Data.
// This value *MUST* be the same as the value defined when
// creating the tables.
*************************************************************/
$dbaseConfigData = "plconfigdata";
/*************************************************************
// The name of the table to be used for the User Data.
// This value *MUST* be the same as the value defined when
// creating the tables.
*************************************************************/
$dbaseUserData = "pluserdata";
/*************************************************************
// The name of the table to be used for the Prediction Data.
// This value *MUST* be the same as the value defined when
// creating the tables.
*************************************************************/
$dbasePredictionData = "plpredictiondata";
/*************************************************************
// The name of the table to be used for the Match Data. This
// value *MUST* be the same as the value defined when creating
// the tables.
*************************************************************/
$dbaseMatchData = "plmatchdata";
/*************************************************************
// The name of the table to be used for the user messaging.
// This value *MUST* be the same as the value defined when
// creating the tables.
*************************************************************/
$dbaseMsgData = "plmsgdata";
/*************************************************************
// The name of the table to be used for the current standings.
// This value *MUST* be the same as the value defined when
// creating the tables.
*************************************************************/
$dbaseStandings = "plstandings";
/*************************************************************
** The home page for the Prediction League
*************************************************************/
$PLHome = "http://www.straighthiphop.nl/toto";
/*************************************************************
** Should the users predictions be visible
*************************************************************/
$ViewUserPredictions = "TRUE";
/*************************************************************
** The number of fixtures to show when making multiple
** fixtures.
*************************************************************/
$NumMultFixts = 12;
/*************************************************************
** The number of users to display on each page of the
** prediction league. This is the default value. Each user
** can select their own.
*************************************************************/
$usersPerPage = 80;
//////////////////////////////////////////////////////////////
// 22. LockGame
// This variable allows the game to be locked so that only
// power users can create users.
//////////////////////////////////////////////////////////////
$LockedGame = "FALSE";
/////////////////////////////////////////////////
// Storage lengths
/////////////////////////////////////////////////
$userlen = 32; // Storage length for the username.
$passlen = 40; // Storage length for the password.
$fnamelen = 128; // Storage length for any filenames (or URLs).
$teamlen = 30; // Storage length for team names.
$emaillen = 60; // Storage length for email addresses.
/*************************************************************
** The maximum allowed number of admin users.
** If this value is increased it is essential that
** the user is created as this could present a security
** hole.
*************************************************************/
$maxAdminUsers = 1;
/////////////////////////////////////////////////////////
// Character set required. The default character set.
// This can be overridden in the language files.
/////////////////////////////////////////////////////////
$charset = "ISO8859-1";
/*************************************************************
** Maintain the logged in users data.
*************************************************************/
require "sessiondata.php";
require "dbasefunctions.php";
?>
Code: Selecteer alles
<?php
/*********************************************************
* Author: John Astill (c)
* Date : 20th March 2003
* File : configvalues.php
*********************************************************/
$link = OpenConnection();
$query = "select * from $dbaseConfigData where lid='$leagueID'";
$result = mysql_query($query)
or die("Unable to read config data: $query<br>\n".mysql_error());
if ($result != FALSE) {
$arr = array();
while ($line = mysql_fetch_array($result)) {
$param = $line["param"];
$val = $line["value"];
$arr["$param"] = $val;
}
// There is a tight cohesion between the coding and the contents of the config
// database.
$hideNoPredictions = $arr["HIDE_0_PREDS"];
$useMessaging = $arr["USE_MESSAGING"];
$corrHomeScore = $arr["CORR_HOME_SCORE"];
$corrAwayScore = $arr["CORR_AWAY_SCORE"];
$corrMargin = $arr["CORR_MARGIN"];
$corrResult = $arr["CORR_RESULT"];
$corrScore = $arr["CORR_SCORE"];
$PredictionLeagueTitle = $arr["PRED_LEAGUE_TITLE"];
$defaulticon = $arr["DEF_ICON"];
$homePage = $arr["HOME_PAGE_URL"];
$homePageTitle = $arr["HOME_PAGE_TITLE"];
$allowMultipleUserPerEmail = $arr["MULT_USERS"];
$timezoneOffset = $arr["TZ_OFFSET"];
$reverseUserPredictions = $arr["REV_USER_PREDS"];
$usersPerPage = $arr["USERS_PER_PAGE"];
if ($usersPerPage < 1) {
$usersPerPage = 10;
}
$maxAdminUsers = $arr["MAX_ADMIN_USERS"];
//$isauto = $arr["ISAUTO"];
$NumMultFixts = $arr["NUMMULTFIXTS"];
$ViewUserPredictions = $arr["VIEWUSERPREDS"];
$Use24Hr = $arr["USE24HR"];
$UploadIcons = $arr["UPLOADICONS"];
$MaxIconFileSize = $arr["ICONSIZE"];
$PasswordEncryption = $arr["PASSWORDENCRYPT"];
$LockedGame = $arr["LOCKEDGAME"];
}
CloseConnection($link);
?>
- Ramon Fincken
- Berichten: 2552
- Lid geworden op: 27 nov 2005, 23:15
- Locatie: Diemen
- Contacteer:
ik zie een systemvars en configvalues,
is er nergens een file die altijd direct als eerste
include('filename.php');
of
include_once('filename.php');
heeft?
zonee, probeer dan de configvalues eens, dus direct na de
<?php
de phpbb code neerzettten.
is er nergens een file die altijd direct als eerste
include('filename.php');
of
include_once('filename.php');
heeft?
zonee, probeer dan de configvalues eens, dus direct na de
<?php
de phpbb code neerzettten.
Freelance webdevelopment, including phpbb2 scripting!
Website founder van: phpBBinstallers.net phpBBantispam.com
Mods: zie op http://www.phpbb.com Blog in wording: RamonFincken.com
Website founder van: phpBBinstallers.net phpBBantispam.com
Mods: zie op http://www.phpbb.com Blog in wording: RamonFincken.com