rizmah Posted September 12, 2014 Share Posted September 12, 2014 Note: This website source has been copied and I am a newb so explain things in the simplest detail not technical, thanks. Currently my website looks like this... http://i.gyazo.com/ef40f30b27d8e633165b0050104f3ec9.png Now on that screenshot the asterisks image is missing.. how do I fix this? The image is from a website that got deleted therefore the image doesn't exist. In the PHP file it said this where the asterisks is... <p class="info">Please enter your valid username and password to login into your account. Fields marked <?php echo required();?> are required</p> How do I change this website link.. as I cannot see the link. Quote Link to comment Share on other sites More sharing options...
ginerjm Posted September 12, 2014 Share Posted September 12, 2014 Huh? Quote Link to comment Share on other sites More sharing options...
rizmah Posted September 12, 2014 Author Share Posted September 12, 2014 Huh? Sorry what don't you get about this? Quote Link to comment Share on other sites More sharing options...
cyberRobot Posted September 12, 2014 Share Posted September 12, 2014 (edited) Could you show us the code for the required() function? Edited September 12, 2014 by cyberRobot Quote Link to comment Share on other sites More sharing options...
rizmah Posted September 12, 2014 Author Share Posted September 12, 2014 Could you show us the code for the required() function? Sorry when I say im a newb , I really have, i dont know what that it your asking. I'm actually embarrassed :/ Quote Link to comment Share on other sites More sharing options...
cyberRobot Posted September 12, 2014 Share Posted September 12, 2014 Sorry when I say im a newb , I really have, i dont know what that it your asking. I'm actually embarrassed :/ The following line of code calls a user-defined function named required() ...marked <?php echo required();?> are... This function was defined by someone who created your website. To fix the issue, you'll need to find the code for that function. You could try searching your PHP file for the function. If that doesn't work you could try posting more of your script. Perhaps we could help locate the function information for you. Quote Link to comment Share on other sites More sharing options...
rizmah Posted September 12, 2014 Author Share Posted September 12, 2014 (edited) The following line of code calls a user-defined function named required() ...marked are... This function was defined by someone who created your website. To fix the issue, you'll need to find the code for that function. You could try searching your PHP file for the function. If that doesn't work you could try posting more of your script. Perhaps we could help locate the function information for you. 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");?> Edited September 12, 2014 by rizmah Quote Link to comment Share on other sites More sharing options...
cyberRobot Posted September 12, 2014 Share Posted September 12, 2014 This is the whole code... The function doesn't seem to be defined there. You may have better luck looking at the file imported here: require_once("init.php"); Note: if you decide to post this code, make sure it doesn't contain an sensitive information such as database log-in credentials. To find the function, you're basically looking for something like this: function required() { } Quote Link to comment Share on other sites More sharing options...
rizmah Posted September 12, 2014 Author Share Posted September 12, 2014 (edited) The function doesn't seem to be defined there. You may have better luck looking at the file imported here: require_once("init.php"); Note: if you decide to post this code, make sure it doesn't contain an sensitive information such as database log-in credentials. To find the function, you're basically looking for something like this: function required() { } 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/"); ?> Edited September 12, 2014 by rizmah Quote Link to comment Share on other sites More sharing options...
cyberRobot Posted September 12, 2014 Share Posted September 12, 2014 (edited) Looked through it, no sensetive information in it Hmmm...but no function either. This file import sounds promising: require_once(BASEPATH . "lib/functions.php"); What do you use to edit these files by the way? The solution probably offers a way to search for the function name within your website's folder. You may find it faster than going from file to file. You could try searching for "required(". Edited September 12, 2014 by cyberRobot Quote Link to comment Share on other sites More sharing options...
Solution rizmah Posted September 12, 2014 Author Solution Share Posted September 12, 2014 Hmmm...but no function either. This file import sounds promising: require_once(BASEPATH . "lib/functions.php"); What do you use to edit this files by the way? The solution probably offers a way to search for the function name with in your website's folder. You may find it faster than going from file to file. You could try searching for "required(". 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!! Quote Link to comment Share on other sites More sharing options...
cyberRobot Posted September 12, 2014 Share Posted September 12, 2014 Yay it's fixed now! I searched the functions.php and saw all the missing links. That's good to hear! I marked the topic as Solved. If you need anything else, you can make it as unsolved or start a new thread. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.