|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: |
// this is hobbies.php
<div id="countrydivcontainer" style="border:0px solid gray; width:800px; margin-bottom: 1em; padding: 10px">
<?php require_once '../../../settings.php';
checkLogin('1 2');
include "../info.php"; // sets username/id ect
$getuser = mysql_fetch_assoc(mysql_query("SELECT * from users where Username='$username'"));
$getuserprofile = mysql_fetch_assoc(mysql_query("SELECT * from profile where ID='" .
$getuser['ID'] . "'"));$getuserprofile['first_name'] ?>
<?
if(isset($_POST['submitted']))
{
}
$count = count($warnings);
if($count === 0)
{
if(array_key_exists('submit', $_POST))
{
$hobbies = mysql_real_escape_string( $_POST['hobbies']);
$update = "UPDATE profile SET hobbies='$hobbies' WHERE ID='$id' ";
$result = mysql_query($update);
// Check result
// This shows the actual query sent to MySQL, and the error. Useful for debugging.
if (!$result) {
$er = 'Invalid query: ' . mysql_error() . "\n";
$er .= 'Whole query: ' . $query;
die($er);
}}
echo ' <p class="error">' . $message . '</p>' . "\n";
}
if ($err){?>
<div class="errors">
<p align="center"><em>Oops... the following errors were encountered:</em></p>
<div align="center">
<ul>
<?php echo $err; ?>
</ul>
</div>
<p align="center">Data has <strong>not</strong> been saved.</p>
</div>
<p>
<?php } ?>
<fieldset>
<legend>About Me</legend>
<form action='<?php "$_SERVER[PHP_SELF]" ?>' method="post" name="submit">
<label>
<table width="97%" align="left" cellpadding="0" cellspacing="0">
<tr>
<td height="30"><p align="center"><br />
<font>
<textarea onKeyPress="return taLimit(this)" onKeyUp="return taCount(this,'myCounter')" name="Description" rows=7 wrap="physical" cols=60><?php echo $getuserprofile['about_me'] ?></textarea>
<br>
<br>
You have <B><SPAN id=myCounter>255</SPAN></B> characters remaining
for your hobbies description...</font>
<?php if (count($warnings) < 255){ echo $warnings["hobbies"];} ?>
</p></td>
</tr>
<tr>
<td><div align="center">
<input name="submit" type="submit" class="submit-btn" value="" />
</div></td>
</tr>
</table>
</form>
</fieldset>
</div>
</td>
<td width="10%"> </td>
</tr>
</table>
// here is my functions script with the line 121 in it
function checkLogin($levels)
{
global $db;
$kt = split(' ', $levels);
if (!$_SESSION['logged_in'])
{
$access = false;
if (isset($_COOKIE['cookie_id']))
{ //if we have a cookie
$query = 'SELECT * FROM ' . DBPREFIX . 'users WHERE ID = ' . $db->qstr($_COOKIE['cookie_id']);
if ($db->RecordCount($query) == 1)
{ //only one user can match that query
$row = $db->getRow($query);
//let's see if we pass the validation, no monkey business
if ($_COOKIE['authenticate'] == md5(getIP() . $row->Password . $_SERVER['USER_AGENT']))
{
//we set the sessions so we don't repeat this step over and over again
$_SESSION['user_id'] = $row->ID;
$_SESSION['logged_in'] = true;
//now we check the level access, we might not have the permission
if (in_array(get_level_access($_SESSION['user_id']), $kt))
{
//we do?! horray!
$access = true;
}
}
}
}
}
else
{
$access = false;
if (in_array(get_level_access($_SESSION['user_id']), $kt))
{
$access = true;
}
}
if ($access == false)
{
header('Location: http://www.runningprofiles.com/error.php');
exit();
}
}
|
Advertisement
| Hall of Fame |