Jump to content

rizmah

Members
  • Posts

    54
  • Joined

  • Last visited

Everything posted by rizmah

  1. I have been given the original sql file so I have that now but a dude of Skype said that it all was originally run on XAMPP and im trying to run it off 000webhost. He said that's the problem.
  2. I'm already using phpmyadmin, just started to use it so ill look around to making it. What content should i put in this siteconfig?
  3. Do you know how to create an SQL file..? At this minute I don't know how to fix anything on there haha, I might as well delete the whole thing and just stick with my current one.. www.rmzhcp.comyr.com < do you like it?
  4. I have done that but other people use other web hosting and talk about things I have no idea of .
  5. I googled it but I don't understand what people mean :/ I'm such a newb.
  6. Result \/ Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'REMOVED_test.SiteConfig' doesn't exist' in /home/REMOVED/public_html/TZ/v3/header.php:2 Stack trace: #0 /home/REMOVED/public_html/TZ/v3/header.php(2): PDO->query('SELECT `Tab` FR...') #1 /home/REMOVED/public_html/TZ/v3/index.php(21): require_once('/home/REMOVED/...') #2 {main} thrown in /home/REMOVED/public_html/TZ/v3/header.php on line 2
  7. I didn't use the original SQL file that's why. I used a different one that didn't belong to it. I can't get the original one that belonged to the source I am using. I need to make an SQL then :/ If I learn how to do it...
  8. There's an index.php in the main directory that im trying to get on to. That doesn't include anything on functions.php and there's another index.php in the includes folder that doesn't do anything I don't think and the code in there is just... haha i dunno why it said 'Derp', I didnt make this but I am editing it so I can just use the source. <?php echo "Derp"; ?>
  9. No am I meant to ?
  10. In the functions.php \/ <?php class user { function isAdmin($odb) { $SQL = $odb -> prepare("SELECT `rank` FROM `users` WHERE `ID` = :id"); $SQL -> execute(array(':id' => $_SESSION['ID'])); $rank = $SQL -> fetchColumn(0); if ($rank == 2) { return true; } else { return false; } } function isReseller($odb) { $SQL = $odb -> prepare("SELECT `rank` FROM `users` WHERE `ID` = :id"); $SQL -> execute(array(':id' => $_SESSION['ID'])); $rank = $SQL -> fetchColumn(0); if ($rank == 1) { return true; } else { return false; } } function LoggedIn() { @session_start(); if (isset($_SESSION['username'], $_SESSION['ID'])) { return true; } else { return false; } } function hasMembership($odb) { $SQL = $odb -> prepare("SELECT `expire` FROM `users` WHERE `ID` = :id"); $SQL -> execute(array(':id' => $_SESSION['ID'])); $expire = $SQL -> fetchColumn(0); if (time() < $expire) { return true; } else { $SQLupdate = $odb -> prepare("UPDATE `users` SET `membership` = 0 WHERE `ID` = :id"); $SQLupdate -> execute(array(':id' => $_SESSION['ID'])); return false; } } function notBanned($odb) { $SQL = $odb -> prepare("SELECT `status` FROM `users` WHERE `ID` = :id"); $SQL -> execute(array(':id' => $_SESSION['ID'])); $result = $SQL -> fetchColumn(0); if ($result == 0) { return true; } else { session_destroy(); return false; } } } class stats { function totalUsers($odb) { $SQL = $odb -> query("SELECT COUNT(*) FROM `users`"); return $SQL->fetchColumn(0); } function totalBoots($odb) { $SQL = $odb -> query("SELECT COUNT(*) FROM `logs`"); return $SQL->fetchColumn(0); } function runningBoots($odb) { $SQL = $odb -> query("SELECT COUNT(*) FROM `logs` WHERE `time` + `date` > UNIX_TIMESTAMP()"); return $SQL->fetchColumn(0); } function totalnews($odb) { $SQL = $odb -> query("SELECT COUNT(*) FROM `news`"); return $SQL->fetchColumn(0); } function totaltickets($odb) { $SQL = $odb -> query("SELECT COUNT(*) FROM `tickets`"); return $SQL->fetchColumn(0); } function totalBootsForUser($odb, $user) { $SQL = $odb -> prepare("SELECT COUNT(*) FROM `logs` WHERE `user` = :user"); $SQL -> execute(array(":user" => $user)); return $SQL->fetchColumn(0); } function totalusertickets($odb, $user) { $SQL = $odb -> prepare("SELECT COUNT(*) FROM `tickets` WHERE `username` = :user"); $SQL -> execute(array(":user" => $user)); return $SQL->fetchColumn(0); } function usersforplan($odb, $plan) { $SQL = $odb -> prepare("SELECT COUNT(*) FROM `users` WHERE `membership` = :membership"); $SQL -> execute(array(":membership" => $plan)); return $SQL->fetchColumn(0); } } ?>
  11. This is all the db.php... <?php if(strpos(strtolower($_SERVER['SCRIPT_NAME']),strtolower(basename(__FILE__)))){ die('Error!'); } define('DB_HOST', '*REMOVED*'); define('DB_NAME', '*REMOVED*'); define('DB_USERNAME', '*REMOVED*'); define('DB_PASSWORD', '*REMOVED*'); $odb = new PDO('mysql:host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USERNAME, DB_PASSWORD); ?>
  12. Yeah this is basically the error Fatal error: Call to a member function query() on a non-object in /home/REMOVED/public_html/TZ/v3/header.php on line 2
  13. Yeah it shows the user is login.
  14. <br><table border='1' cellpadding='2' bgcolor='#FFFFDF' bordercolor='#E8B900' align='center'><tr><td><font face='Arial' size='1' color='#000000'><b>PHP Error Message</b></font></td></tr></table><br /> <b>Fatal error</b>: Call to a member function fetchColumn() on a non-object in <b>/home/*REMOVED*/public_html/TZ/v3/header.php</b> on line <b>2</b><br /> <br><table border='1' cellpadding='2' bgcolor='#FFFFDF' bordercolor='#E8B900' align='center'><tr><td><div align='center'><a href='http://www.000webhost.com/'><font face='Arial' size='1' color='#000000'>Free Web Hosting</font></a></div></td></tr></table> I inspect element the white page and it said this... The header.php is this... (only the top part of the code) <head> <title> <?php echo $odb->query("SELECT `Tab` FROM `SiteConfig` LIMIT 1")->fetchColumn(0); ?> </title> <link href='http://fonts.googleapis.com/css?family=Carter+One' rel='stylesheet' type='text/css'> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link href="css/styles.css" rel="stylesheet" type="text/css" /> <!--[if lt IE 10]><link rel="stylesheet" type="text/css" href="css/ie.css"/><![endif]--> <script type="text/javascript" src="js/plugins/jquery/jquery.min.js"></script> <script type="text/javascript" src="js/plugins/jquery/jquery-ui.min.js"></script> <script type="text/javascript" src="js/plugins/bootstrap/bootstrap.min.js"></script> <script type="text/javascript" src="js/plugins/mcustomscrollbar/jquery.mCustomScrollbar.min.js"></script> <script type="text/javascript" src="js/plugins/sparkline/jquery.sparkline.min.js"></script> <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places"></script> <script type="text/javascript" src="js/plugins/fancybox/jquery.fancybox.pack.js"></script>
  15. That wasn't the whole script there's a load more but I just showed you part of it. Just to say I am a newb to PHP coding, so I don't get most of the things you say unfortunately :/
  16. Done it, doesn't work Echo appears, but i dont get what you mean with the next part
  17. I got an error before but now ive done that it works fine until I get the blank screen. Yes, the header does contain stuff. @jazzman1 - Hmm, ill try and sign in one more time because that and register is the only thing that works :/ Edit: nope still doesnt work
  18. Blank white screen still.
  19. This is the top of the index.php <?php $page = 'Home'; $pageIcon = 'home'; ob_start(); require_once('/home/*REMOVED*/public_html/TZ/v3/includes/db.php'); require_once('/home/*REMOVED*/public_html/TZ/v3/includes/init.php'); if(!($user->LoggedIn())){ if(isset($_GET['referral'])){ $_SESSION['referral'] = preg_replace("/[^A-Za-z0-9-]/","", $_GET['referral']); header('Location: register.php'); die(); } header('location: login.php'); die(); } if(!($user->notBanned($odb))){ header('location: logout.php'); die(); } require_once('header.php');
  20. Nothing comes up. If I put it above the <?php in just displays that in text. If I put it below it, it's just white screen.
  21. Thanks, that fixed it. But now when I goto the index.php it just shows a blank white screen with a bit of code in the top... ?
  22. So this appears when I try and go on my index.php... Warning: require_once(/TZ/v3/includes/db.php) [function.require-once]: failed to open stream: No such file or directory in /home/*REMOVED*/public_html/TZ/v3/index.php on line 5 Fatal error: require_once() [function.require]: Failed opening required '/TZ/v3/includes/db.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/*REMOVED*/public_html/TZ/v3/index.php on line 5 It's saying there's no file there but there is! Thanks
  23. Yay it's fixed now! I searched the functions.php and saw all the missing links. return '<img src="'LINK HERE'//images/required.png" alt="Required Field" class="tooltip" title="Required Field" />'; I inserted my link and it works now. Thanks man!!
  24. Looked through it, no sensetive information in it No function required parts. <?php if (!defined("_VALID_PHP")) die('Direct access to this location is not allowed.'); ?> <?php error_reporting(E_ALL); // Magic Quotes Fix if (ini_get('magic_quotes_gpc')) { function clean($data) { if (is_array($data)) { foreach ($data as $key => $value) { $data[clean($key)] = clean($value); } } else { $data = stripslashes($data); } return $data; } $_GET = clean($_GET); $_POST = clean($_POST); $_COOKIE = clean($_COOKIE); } $BASEPATH = str_replace("init.php", "", realpath(__FILE__)); define("BASEPATH", $BASEPATH); $configFile = BASEPATH . "lib/config.ini.php"; if (file_exists($configFile)) { require_once($configFile); } else { header("Location: setup/"); } require_once(BASEPATH . "lib/class_db.php"); $db = new Database(DB_SERVER, DB_USER, DB_PASS, DB_DATABASE); $db->connect(); include(BASEPATH . "lib/headerRefresh.php"); require_once(BASEPATH . "lib/class_filter.php"); $request = new Filter(); //Include Functions require_once(BASEPATH . "lib/functions.php"); //StartUser Class require_once(BASEPATH . "lib/class_user.php"); $user = new Users(); //Start Core Class require_once(BASEPATH . "lib/class_core.php"); $core = new Core(); //Load Membership Class require_once(BASEPATH . "lib/class_membership.php"); $member = new Membership(); define("SITEURL", $core->site_url); define("ADMINURL", $core->site_url."/admin"); define("UPLOADS", BASEPATH."uploads/"); define("UPLOADURL", SITEURL."/uploads/"); ?>
  25. These are the files i have...http://i.imgur.com/gVFV7t4.jpg This is the whole code... <?php define("_VALID_PHP", true); require_once("init.php"); if ($user->logged_in) redirect_to("account.php"); if (isset($_POST['doLogin'])) : $result = $user->login($_POST['username'], $_POST['password']); /* Login Successful */ if ($result) : redirect_to("account.php"); endif; endif; ?> <?php include("header.php");?> <div id="msgholder-alt"><?php print $core->showMsg;?></div> <h1>Member Login</h1> <p class="info">Please enter your valid username and password to login into your account. Fields marked <?php echo required();?> are required</p> <div class="box"> <form action="" method="post" id="login_form" name="login_form"> <table width="100%" border="0" cellpadding="3" cellspacing="0" class="display"> <thead> <tr> <th colspan="2" class="left">Account Login</th> </tr> </thead> <tr> <th width="200"><strong>Username: <?php echo required();?></strong></th> <td><input name="username" type="text" size="45" maxlength="20" class="inputbox" /></td> </tr> <tr> <th><strong>Password: <?php echo required();?></strong></th> <td><input name="password" type="password" size="45" maxlength="20" class="inputbox" /></td> </tr> <tr> <td><input name="submit" value="Login Now" type="submit" class="button"/></td> <td align="right"><a class="button-alt" href="register.php">Click Here to Register</a></td> </tr> </table> <input name="doLogin" type="hidden" value="1" /> </form> </div> <br /> <p class="info">Enter your username and email address below to reset your password. A verification token will be sent to your email address.<br /> Once you have received the token, you will be able to choose a new password for your account.</p> <div class="box"> <form action="" method="post" id="admin_form" name="admin_form"> <table width="100%" border="0" cellpadding="3" cellspacing="0" class="display"> <thead> <tr> <th colspan="2" class="left">Lost Password</th> </tr> </thead> <tr> <th width="200"><strong>Username: <?php echo required();?></strong></th> <td><input name="uname" type="text" size="45" maxlength="20" class="inputbox" /></td> </tr> <tr> <th><strong>Email Address:</strong> <?php echo required();?></th> <td><input name="email" type="text" size="45" maxlength="60" class="inputbox" /></td> </tr> <tr> <th><strong>Are You Human? 5 + 5 = <?php echo required();?></strong></th> <td><input name="captcha" type="text" size="10" maxlength="2" class="inputbox" /></td> </tr> <tr> <td colspan="2"><input name="submit" value="Submit Request" type="submit" class="button"/></td> </tr> </table> </form> </div> <?php echo $core->doForm("passReset","ajax/user.php");?> <?php include("footer.php");?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.