Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $time = time();
- $time15 = time() + (15 * 60);
- session_start();
- $dbuser="na";
- $dbpass="na";
- $dbname = "na";
- $chandle = mysql_connect("$dbhost", $dbuser, $dbpass)
- or die("Connection Failure to Database");
- mysql_select_db($dbname, $chandle) or die ($dbname . " Database not found." . $dbuser);
- $playerClan = 0;
- $playerId = -1;
- $mysql = mysql_query("SELECT * FROM uber3_players where name='".$username."' and pass='".$password."' LIMIT 1") or die(mysql_error());
- while($row = mysql_fetch_assoc($mysql)){
- $playerId = $row['id'];
- $playerClan = $row['ClanID'];
- }
- function loggedIn() {
- if(isset($_SESSION['username'])) {
- $username = $_SESSION['username'];
- $password = $_SESSION['password'];
- $mysql = mysql_query("SELECT * FROM uber3_players where name='".$username."' and pass='".$password."' LIMIT 1") or die(mysql_error());
- $destroy = true;
- while($row = mysql_fetch_assoc($mysql)){
- $_SESSION['dbid'] = $row['id'];
- $_SESSION['mgroup'] = $row['mgroup'];
- $destroy = false;
- }
- if($destroy) {
- echo 'Your password has changed. You must relogin.';
- session_destroy();
- return false;
- }
- echo $playerClan;
- return true;
- } else {
- echo 'Welcome guest, please <a href="login.php">Login</a> or <a href="create.php">Register</a>.';
- }
- return false;
- }
- ?>
- <fieldset>
- <h2><span>Item Id List</span></h2><div class="clr"></div>
- <p>
- <center>Please enter an item name below and click 'Search'.<br><br></center>
- <form method=get>
- <input type=hidden name=action value=items>
- <input style="font-decoration:italics;" name=item value="<?php echo $_GET['item']; ?>">
- <input type=submit value=Search>
- </form>
- <table width=100%>
- <?php
- if(isset($_GET['item'])) {
- $mysql = mysql_query("SELECT * FROM uber3_items WHERE name LIKE '%".$_GET['item']."%'") or die(mysql_error());
- while($row = mysql_fetch_assoc($mysql)){
- echo '<tr><td>'.$row['id'].'</td><td>'.$row['name'].'</td></tr>';
- }
- }
- ?>
- </table></p>
- <p>
- <?php
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement