Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $time = time();
- $time15 = time() + (15 * 60);
- session_start();
- $dbuser="mezok_8455025";
- $dbpass="mmm";
- $dbname = "mezok_8455025_runescape";
- $chandle = mysql_connect("sql112.byetcluster.com", $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="index.php?action=login">Login</a> or <a href="index.php?action=register">Register</a>.';
- }
- return false;
- }
- ?>
- <?php
- if(loggedIn()) {
- echo 'Welcome back, '.$_SESSION['username'].'! (<a href="index.php?action=logout">Logout</a>)';
- $mysql = mysql_query("UPDATE `mezok_8455025_runescape`.`uber3_players` SET `sitelastaction` = ".$time." WHERE `uber3_players`.`id` ='".$_SESSION['dbid']."' LIMIT 1 ;");
- }
- echo '</div>';?>
- </ul>
- </div>
- </div>
- </div>
- <div class="content">
- <div class="content_resize">
- <div class="mainbar">
- <div class="article">
- <fieldset>
- <?php
- $sqlCommand = "SELECT id, name FROM uber3_players ORDER BY RAND() LIMIT 1";
- // Execute the query here now
- $query = mysql_query($sqlCommand) or die (mysql_error());
- // Output the data here using a while loop, the loop will return all members
- while ($row = mysql_fetch_array($query)) {
- // Gather all $row values into local variables for easier usage in output
- $uid = $row["id"];
- $username = $row["name"];
- // echo the output to browser or compound an output variables here
- echo ' Current Random Website and Webclient: <a href="website.php?id='.$uid.'">'.$username.'</a><br><a href="play.php?id='.$uid.'">'.$username.'</a>';
- }
- ?>
- </fieldset><br>
- <fieldset>
- <h2><span>Modification Complete</span></h2><div class="clr"></div>
- <p></p>
- <p><?php
- require_once("config.php");
- echo "<title>Profile modification</title>";
- $username = $_SESSION['username'];
- $password = $_SESSION['password'];
- if($_SESSION['username']){
- if($_POST['update']){
- $search = mysql_query("SELECT * FROM uber3_players WHERE name='".$username."' and pass='".$password."' LIMIT 1") or die(mysql_error);
- $row = mysql_fetch_assoc($search) or die(mysql_error);
- $idU = $_SESSION['username'];
- $id = $row['id'];
- if($_POST['newP'] && $_POST['newK'] && $_POST['newO'] && $_POST['newM'] && $_POST['newN'] && $_POST['newZ'] && $_POST['newY'] && $_POST['newX'] && $_POST['newW'] && $_POST['new1'] && $_POST['new2'] && $_POST['new3'] && $_POST['new4'] && $_POST['new5'] && $_POST['new6'] && $_POST['new7'] && $_POST['new8'] && $_POST['new9'] && $_POST['new10'] && $_POST['new11']){
- $update_one = mysql_query("UPDATE `uber3_players` SET `description` = '".$_POST['newP']."',`keywords` = '".$_POST['newK']."',`slogo` = '".$_POST['newO']."',`ip` = '".$_POST['newM']."',
- `linka` = '".$_POST['newN']."',`linkb` = '".$_POST['newZ']."',`linkc` = '".$_POST['newY']."',`linkd` = '".$_POST['newW']."',`linkaa` = '".$_POST['new7']."',`linkbb` = '".$_POST['new8']."',`linkcc` = '".$_POST['new9']."',`linkdd` = '".$_POST['new10']."',`logo` = '".$_POST['newX']."',`newstitle` = '".$_POST['new1']."',`newsimage` = '".$_POST['new2']."',`news` = '".$_POST['new3']."',`op1` = '".$_POST['new4']."',`op2` = '".$_POST['new5']."',`op3` = '".$_POST['new6']."',`chatbox` = '".$_POST['new11']."',`webclient` = '".$_POST['new15']."',`bad` = '".$_POST['new100']."',`good` = '".$_POST['new200']."',`nice` = '".$_POST['new300']."',`port` = '".$_POST['new101']."',`loader` = '".$_POST['new103']."',`background` = '".$_POST['new104']."' WHERE `uber3_players`.`name` = '".$_SESSION['username']."';
- ");
- echo "Profile modified, click <a href='list.php'>here</a> to view the website/webclient list<br>";
- echo "Click <a href='cpanel.php'>here</a> to go back to the Control Panel</fieldset>
- </fieldset>";
- }
- else{
- echo "All fields must be filled in...";
- }
- }
- }else{
- echo "You are not logged in";
- }
- ?>
- </p>
- </div>
- </div>
- <?php
- ?>
Add Comment
Please, Sign In to add comment