Nieuw lid |
|
Lukt niet.
Mijn connectie is zo:
Commen.php:
<?
// Be sure when you edit this file that you DO NOT delete the quotation marks or remove any code. Also, do not use quotations in the variables or the site will not work.
$dbhost="db.website.nl"; // probably localhost
$dbname="webname"; // database name
$dbuser="webuser"; // database username
$dbpassword="xxxxxx"; // database password
$ratiohigh=2; // link views
$ratiolow=1.5; // credits given to the user for the above link views
$referral_credits=1000; //link impressions given to a referral signup
$baseurl="http://www.website.nl/reflinkex/"; //must include trailing slash
$bannerexchangename="RefLinkEx";
$namefrom="admin";
$emailfrom="mail@hotmail.com";
$admin_password = "pass"; //this is the password to your main banner site banners
////////////////////////////////////////
// End Site Config //
////////////////////////////////////////
$passwordretrievalsubject="$bannerexchangename - password retrieval";
$passwordretrievalbody="Hi _username_,
As requested, your password for the $bannerexchangename is _password_
Thanks
$bannerexchangename team.";
$welcomeemailsubject="Welcome to $bannerexchangename!";
$welcomeemailbody="Hi _username_,
Welcome to the $bannerexchangename, you can log in to your account at $baseurl"."login.php - your username is '_username_' and your password is '_password_'. Please click the following link to activate your account - you won't be able to log in until you have followed this link:
$baseurl"."authorise.php?username=_username_&rand=_rand_
You can start earning link views now by adding the following code to your web pages
<!--begin $bannerexchangename code -->
<table width=140 height=80 border=1><tr><td bgcolor=ffffff>
<iframe src=$baseurl"."display.php?id=_id_ frameborder=0 vspace=0 hspace=0 height=20 width=135 marginwidth=0 marginheight=0 scrolling=no></iframe>
<iframe src=$baseurl"."display.php?id=_id_ frameborder=0 vspace=0 hspace=0 height=20 width=135 marginwidth=0 marginheight=0 scrolling=no></iframe>
<iframe src=$baseurl"."display.php?id=_id_ frameborder=0 vspace=0 hspace=0 height=20 width=135 marginwidth=0 marginheight=0 scrolling=no></iframe>
<iframe src=$baseurl"."display.php?id=_id_ frameborder=0 vspace=0 hspace=0 height=20 width=135 marginwidth=0 marginheight=0 scrolling=no></iframe></td>
</td></tr></table>
<!--end $bannerexchangename code -->
Please note though, until you have logged into the system via the URL above, added a url and title to your account and it has been reviewed by an admin, it won't be displayed on other member sites.
Thanks for joining!
$bannerexchangename Support";
////////////////////////////////////////
//Don't edit anything below this point//
////////////////////////////////////////
function totalviews()
{
global $dbhost;
global $dbname;
global $dbuser;
global $dbpassword;
$link = mysql_connect($dbhost, $dbuser, $dbpassword)
or die("Could not connect: " . mysql_error());
mysql_select_db($dbname);
$sSQL="select n_Value from t_Stats where s_Name=\"totalviews\"";
$results=mysql_query($sSQL);
list($totalviews)=mysql_fetch_row($results);
echo $totalviews;
}
function stripjunk($sourcestring)
{
$sourcestring=str_replace("\"","",$sourcestring);
$sourcestring=str_replace("<","",$sourcestring);
$sourcestring=str_replace(">","",$sourcestring);
return($sourcestring);
}
?>
<? // Be sure when you edit this file that you DO NOT delete the quotation marks or remove any code. Also, do not use quotations in the variables or the site will not work. $dbhost="db.website.nl"; // probably localhost $dbname="webname"; // database name $dbuser="webuser"; // database username $dbpassword="xxxxxx"; // database password $ratiohigh=2; // link views $ratiolow=1.5; // credits given to the user for the above link views $referral_credits=1000; //link impressions given to a referral signup $baseurl="http://www.website.nl/reflinkex/"; //must include trailing slash $bannerexchangename="RefLinkEx"; $namefrom="admin"; $emailfrom="mail@hotmail.com"; $admin_password = "pass"; //this is the password to your main banner site banners //////////////////////////////////////// // End Site Config // //////////////////////////////////////// $passwordretrievalsubject="$bannerexchangename - password retrieval"; $passwordretrievalbody="Hi _username_, As requested, your password for the $bannerexchangename is _password_ Thanks $bannerexchangename team."; $welcomeemailsubject="Welcome to $bannerexchangename!"; $welcomeemailbody="Hi _username_, Welcome to the $bannerexchangename, you can log in to your account at $baseurl"."login.php - your username is '_username_' and your password is '_password_'. Please click the following link to activate your account - you won't be able to log in until you have followed this link: $baseurl"."authorise.php?username=_username_&rand=_rand_ You can start earning link views now by adding the following code to your web pages <!--begin $bannerexchangename code --> <table width=140 height=80 border=1><tr><td bgcolor=ffffff> <iframe src=$baseurl"."display.php?id=_id_ frameborder=0 vspace=0 hspace=0 height=20 width=135 marginwidth=0 marginheight=0 scrolling=no></iframe> <iframe src=$baseurl"."display.php?id=_id_ frameborder=0 vspace=0 hspace=0 height=20 width=135 marginwidth=0 marginheight=0 scrolling=no></iframe> <iframe src=$baseurl"."display.php?id=_id_ frameborder=0 vspace=0 hspace=0 height=20 width=135 marginwidth=0 marginheight=0 scrolling=no></iframe> <iframe src=$baseurl"."display.php?id=_id_ frameborder=0 vspace=0 hspace=0 height=20 width=135 marginwidth=0 marginheight=0 scrolling=no></iframe></td> </td></tr></table> <!--end $bannerexchangename code --> Please note though, until you have logged into the system via the URL above, added a url and title to your account and it has been reviewed by an admin, it won't be displayed on other member sites. Thanks for joining! $bannerexchangename Support"; //////////////////////////////////////// //Don't edit anything below this point// //////////////////////////////////////// function totalviews() { $sSQL="select n_Value from t_Stats where s_Name=\"totalviews\""; } function stripjunk($sourcestring) { return($sourcestring); } ?>
Deze wordt zeg maar op login.php geinclude.
En in login.php zelf wordt de connectie gemaakt.
login.php:
<?
include("common.php");
if(!$username && !$password)
{
include("header.php");
?><center>
<h4>Inloggen in je <?=$bannerexchangename?> account</h4>
<form name=login method=post action=login.php>
<table>
<tr>
<td align=right>
Gebruikersnaam:
</td>
<td>
<input name=username type=text size="15">
</td>
</tr>
<tr>
<td align=right>
Paswoord:
</td>
<td>
<input name=password type=password size="15">
</td>
</tr>
<tr>
<td colspan=2 align=center>
<input type=submit value="Log in">
</td>
</table>
</form>
<?
include ("footer.php");
}
else
{
$link = mysql_connect($dbhost, $dbuser, $dbpassword)
or die("Could not connect: " . mysql_error());
mysql_select_db($dbname);
$sSQL="select n_ID, s_Password, n_Rand, b_Activated from t_Users where s_Username=\"".stripjunk($username)."\"";
$results=mysql_query($sSQL);
if(mysql_num_rows($results)>0)
{
list($id, $pwd, $rand, $b_Activated)=mysql_fetch_row($results);
if($b_Activated<>1)
{
include ("header.php");
echo "Your account is not active yet, please click the link in the welcome email to activate it (you can't log in until it's active)";
}
elseif($pwd==$password)
{
setcookie("bannerexchangename", $username,0,"/");
setcookie("bannerexchangerand", $rand,0,"/");
setcookie("bannerexchangeid", $id,0,"/");
// Here Update the logged in IP to the user
$ip = $_SERVER['REMOTE_ADDR'];
$qry = "update t_Users set logged_ip='$ip' where n_ID='$id'";
mysql_query($qry);
// Also set a cookie with the id as referral id so as to block user creating user duplicate accounts..
setcookie("user_referral",$id,0,"/");
echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=./account.php?action=account\">";
}
else
{
echo "Password incorrect, if you're sure this is your account and have forgotten your password, please click <a href=./forgotpwd.php?username=".stripjunk($username).">here</a> to have your password emailed to you.";
}
}
else
{
include ("header.php");
echo "The specified username does not exist";
}
mysql_close();
}
include ("footer.php");
?>
<? include("common.php"); if(!$username && !$password) { include("header.php"); ?><center> <h4>Inloggen in je <?=$bannerexchangename?> account</h4> <form name=login method=post action=login.php> <table> <tr> <td align=right> Gebruikersnaam: </td> <td> <input name=username type=text size="15"> </td> </tr> <tr> <td align=right> Paswoord: </td> <td> <input name=password type=password size="15"> </td> </tr> <tr> <td colspan=2 align=center> <input type=submit value="Log in"> </td> </table> </form> <? include ("footer.php"); } else { $sSQL="select n_ID, s_Password, n_Rand, b_Activated from t_Users where s_Username=\"".stripjunk($username)."\""; { if($b_Activated<>1) { include ("header.php"); echo "Your account is not active yet, please click the link in the welcome email to activate it (you can't log in until it's active)"; } elseif($pwd==$password) { setcookie("bannerexchangename", $username,0,"/"); setcookie("bannerexchangerand", $rand,0,"/"); // Here Update the logged in IP to the user $ip = $_SERVER['REMOTE_ADDR']; $qry = "update t_Users set logged_ip='$ip' where n_ID='$id'"; // Also set a cookie with the id as referral id so as to block user creating user duplicate accounts.. echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=./account.php?action=account\">"; } else { echo "Password incorrect, if you're sure this is your account and have forgotten your password, please click <a href=./forgotpwd.php?username=".stripjunk ($username).">here</a> to have your password emailed to you."; } } else { include ("header.php"); echo "The specified username does not exist"; } } include ("footer.php"); ?>
Ik kom er niet meer uit:| |