Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Kaip prijungti tokia mysql
Parašė duxelevicius· 2009 Rugp. 28 17:08:03
#1
Man idomu kaip reike prijungti tokia
mysql prie xz.lt hostingo, nes cia niekur nereike vesti password, ir taip tarp failu nerandu jokio kito install ar pns
Edit: Indexe radau:
Gal galit padaryti man ta db_connect.php faila ?
<?php
session_start();
include_once("includes/db_connect.php");
if (strip_tags($_GET['logout']) == "yes"){
session_destroy();
}elseif (isset($_SESSION['real_name'])){
header("Location: Updates.php");
exit();
}
if ($_POST['Submit'] && strip_tags($_POST['username']) && strip_tags($_POST['password'])){
$username = $_POST['username'];
$password = $_POST['password'];
$username = strip_tags($username);
$password = strip_tags($password);
$ip = $REMOTE_ADDR;
$date = gmdate('Y-m-d h:i:s');
///check INFO
$sql = mysql_query("SELECT * FROM users WHERE username='$username' AND password='$password' LIMIT 1");
$login_check = mysql_num_rows($sql);
$inf = mysql_fetch_object($sql);
if ($login_check > "0"){
if ($inf->status == "Dead"){
include_once"dead.php";
exit();
$timenow=time();
$online = time() - 300; //the current time minus 300 seconds
$select = mysql_query("SELECT * FROM users WHERE onlinetime2 >='$online' AND online='Online' ORDER by id ASC");
$num = mysql_num_rows($select);
$numfor=number_format($num);
}
session_register('username');
$_SESSION['real_name'] = $inf->username;
$_SESSION["userlevel"] = $inf->userlevel;
$_SESSION["crewlevel"] = $inf->crewlevel;
$realip = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ?
$_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
$time2 = time();
$timestamp = time()+60;
mysql_query("UPDATE users SET online='Online', onlinetime2='$time2' WHERE username='$username'");
mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$username', 'Logged In!', '$date', '$realip')");
header("Location: News.php");
} else {
$message= "You could not be logged in.<br />";
}}
?>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<link REL="SHORTCUT ICON" type="image/ico" HREF="icon here">
<meta name="author" content="Bigharry">
<title>Mafia-Assassins</title>
<link href="site_css.css" rel="stylesheet" type="text/css">
<script src="clienthint.js"></script>
</head>
<body bgcolor="black" OnLoad="document.login.mail.focus();">
<div align="center">
<strong><font color='red' face='verdana' size='1'> <br>
<br>
</font></strong>
<table width="965" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="bottom">
<table width="965" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="349" valign="bottom">
<table width="349" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="23"><div align="center"><img src="banner.jpg" width="966" height="168"></div></td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
<tr>
<td>
<table width="965" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="200" valign="top" class="home-side">
<br>
<br>
<div class="brown"><center>Major Updates</center></div>
<div align="left" class="mafia-game">
<li>Refferal System has been fixed and updated.<br><br>
<li>The game layout has been slightly updated.<br><br>
<li>A blackjack casino is being made.<br><br>
</div>
<div align="left" class="mafia-game">
</div></td>
<td valign="top">
<table border="0" cellspacing="0" cellpadding="0" width="565" height="302" class="home-pic1">
<tr>
<td height="270" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="168" valign="top"> <br>
<p class="home-text"><br>
<br>
<a href="Register2.php"><strong></strong></a>
<font size="-2"></font></p>
<strong><font color='red' face='verdana' size='1'> </font></strong></td>
</tr>
<tr>
<td valign="bottom">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<form id="form1" name="form1" method="post" action="index.php">
<div style="padding: 10px 0 0 400px;">
<input name="username" type="text" class="input-home" id="username" size="15" maxlength="35">
<br>
<br>
<input name="password" type="password" id="password2" class="input-home" size="15" maxlength="35">
<br>
<input type="submit" name="Submit" value="Login">
</div>
</form> </td>
</tr>
</table></td>
</tr>
</table>
<br>
<br>
<br>
<br>
<br>
<center>
<body style="margin: 0px" bgcolor="black" vlink="black" alink="black">
</body></center>
</td></tr></table>
<td width="200" valign="top" class="home-side">
<div class="mafia-game">
<br>
<div class="brown">Need help playing?</div><br>
We have added a guide to help new users to the game or users that are new to the mafia life.<br>
<strong><br>
</strong><br>
</div></td>
</tr><div align="center" class="style"><a href="lost_pass.php">Lost Password </a><label> :: </label><a href="Register2.php"> Register </a><label> :: </label><a href="tos.php"> Terms of Service </a>
<br>
<br>
<br>
<font color="lime"><b>Gangsteris atidarytas</b></font></div></center>
</table>
</td>
</tr>
<tr>
<td>
</script></body>
</html>
Redagavo duxelevicius· 2009 Rugp. 28 17:08:00
Parašė SubWofer· 2009 Rugp. 28 17:08:01
#2
Cia scriptas koks ?
Parašė viva· 2009 Rugp. 28 17:08:15
#3
turbut cia ilgiausias postas sio puslapio istorijoj :D
Parašė duxelevicius· 2009 Rugp. 28 17:08:32
#4
Cia Yra Browser game scriptas
Parašė SubWofer· 2009 Rugp. 28 17:08:10
#5
o tikrai paziurejei ar nera includes/db_connect.php
Parašė duxelevicius· 2009 Rugp. 28 17:08:30
#6
taip pasiziurejau tikrai nera todel ir prasau kad man ji padarytumet, jaigu kaikokiu dar failu paieskot reike, rasykit :)
Parašė SubWofer· 2009 Rugp. 28 17:08:21
#7
gali scripta primest paziuresiu
Parašė duxelevicius· 2009 Rugp. 28 18:08:08
#8
i p.m.a linka nusiunciau. Tai nieks negali sudaryti db_connect.php ?
Parašė SubWofer· 2009 Rugp. 28 18:08:49
#9
Atsiusk normalu linka ;)
Parašė duxelevicius· 2009 Rugp. 28 18:08:21
#10
vnzdz pasiemeu fusiono config.php nutriniau tas eilutes kur prefixas rasosi inkeleu i includes pervadinau db_connect.php ir dabar importuoju ta faila i
phpmyadmin
prisireginu, bandau jungtis, ir neprijunge
Issiunciau tau normalu linka, ir vis dar laukiu pagalbos
linkas:
www.gangsteris.xz.lt/6_mafia-ass...
Redagavo duxelevicius· 2009 Rugp. 28 18:08:16
Parašė duxelevicius· 2009 Rugp. 28 21:08:55
#11
Tai niekas negali padet su tuo db_connect.php ?