Advertisement
| 10.03.2008 at 07:10AM PDT, ID: 23785037 |
|
[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: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: 170: 171: 172: 173: 174: 175: 176: 177: 178: 179: 180: 181: 182: 183: 184: 185: 186: 187: 188: 189: 190: 191: 192: 193: 194: 195: 196: 197: 198: 199: 200: |
<?
if ($_SERVER['HTTP_REFERER'] == 'http://Website/LoginP.php' | $_SERVER['HTTP_REFERER'] == 'http://Website/LoginR.php')
{
$connect = odbc_connect("SERVER", "USER", "PASSWORD");
?>
<html>
<head><title>Artemis on Blackberry</title></head>
<body>
<form action="<?php echo $_SERVER['PHP_SELF']?>" method="post">
<table border="0">
<tr><td colspan=2><h1>People Search</h1></td></tr>
<tr><td>First Name:</td><td>
<input type="text" name="FName" maxlength="20">
</td></tr>
<tr><td>Last Name:</td><td>
<input type="text" name="LName" maxlength="20">
</td></tr>
<tr><td colspan="2" align="right">
<input type="submit" name="submit" value="submit">
</td></tr>
</table>
</form>
</body>
</html>
<?php
if (isset($_POST['secondsub']))
{
$query = "select People.PeopleID, People.FirstName, People.LastName, People.Phone1,
People.Phone4, People.Phone5, Positions.JobTitle, Positions.CompanyName, People.GreetAs, EmailAddress.Address
FROM People
LEFT JOIN Positions ON Positions.PeopleID = People.PeopleID
LEFT JOIN EmailAddress ON People.PeopleID = EmailAddress.PeopleID AND EmailAddress.IsPrimaryAddress = '1'
WHERE People.PeopleID = '".$_POST['PeopleIDR']."'";
$result = odbc_exec($connect, $query);
odbc_fetch_array($result);
$Greet = odbc_result($result,"GreetAs");
$FirstName = odbc_result($result,"FirstName");
$LastName = odbc_result($result,"LastName");
$BPhone = odbc_result($result,"Phone1");
$MPhone = odbc_result($result,"Phone4");
$HPhone = odbc_result($result,"Phone5");
$Company = odbc_result($result,"CompanyName");
$Title = odbc_result($result,"JobTitle");
$Email = odbc_result($result,"Address");
?>
<table border="0">
<tr><td colspan=9><h1>Person's Information</h1></td></tr>
<tr><td>Greet As</td><td> </td><td><? print $Greet; ?></td></tr>
<tr><td>First Name</td><td> </td><td><? print $FirstName; ?></td></tr>
<tr><td>Last Name</td><td> </td><td><? print $LastName; ?></td></tr>
<tr><td>Business Phone</td><td> </td><td><? print $BPhone; ?></td></tr>
<tr><td>Mobile Phone</td><td> </td><td><? print $MPhone; ?></td></tr>
<tr><td>Home Phone</td><td> </td><td><? print $HPhone; ?></td></tr>
<tr><td>Company</td><td> </td><td><? print $Company; ?></td></tr>
<tr><td>Title</td><td> </td><td><? print $Title; ?></td></tr>
<tr><td>Email Address</td><td> </td><td><? print $Email; ?></td></tr>
</table>
<?
}
if (isset($_POST['submit']))
{
if(!$_POST['FName'] && !$_POST['LName'])
{
die('You must enter a first name or a last name. <meta http-equiv="refresh" content="3;url=http://website/PersonLookup.php"/>');
}
if(!$_POST['FName'])
{
$query = "SELECT People.PeopleID, People.FirstName, People.LastName, People.Phone1 FROM People WHERE LastName LIKE '".$_POST['LName']."%'";
$result = odbc_exec($connect, $query);
?>
<form action="<?php echo $_SERVER['PHP_SELF']?>" method="post">
<table border="0">
<tr><td colspan=2><h1>Select the person</h1></td></tr>
<tr><td>First Name</td><td> </td><td>Last Name</td><td> </td><td>Business Phone</td></tr>
<?
while(odbc_fetch_array($result))
{
$PeopleID = odbc_result($result,"PeopleID");
$FirstName = odbc_result($result,"FirstName");
$LastName = odbc_result($result,"LastName");
$BPhone = odbc_result($result,"Phone1");
?>
<tr>
<td><? print $FirstName; ?></td>
<td> </td>
<td><? print $LastName; ?></td>
<td> </td>
<td><? print $BPhone; ?></td>
<td><input type="radio" name="PeopleIDR" value="<? print $PeopleID; ?>"></td>
</tr>
<?
}
?>
<tr><td></td><td></td><td></td><td></td><td></td><td colspan="2" align="right">
<input type="submit" name="secondsub" value="Submit">
</td></tr>
</table>
</form>
<?
}
if(!$_POST['LName'])
{
$query = "SELECT People.PeopleID, People.FirstName, People.LastName, People.Phone1 FROM People WHERE FirstName LIKE '".$_POST['FName']."%'";
$result = odbc_exec($connect, $query);
?>
<form action="<?php echo $_SERVER['PHP_SELF']?>" method="post">
<table border="0">
<tr><td colspan=2><h1>Select the person</h1></td></tr>
<tr><td>First Name</td><td> </td><td>Last Name</td><td> </td><td>Business Phone</td></tr>
<?
while(odbc_fetch_array($result))
{
$PeopleID = odbc_result($result,"PeopleID");
$FirstName = odbc_result($result,"FirstName");
$LastName = odbc_result($result,"LastName");
$BPhone = odbc_result($result,"Phone1");
?>
<tr>
<td><? print $FirstName; ?></td>
<td> </td>
<td><? print $LastName; ?></td>
<td> </td>
<td><? print $BPhone; ?></td>
<td><input type="radio" name="PeopleIDR" value="<? print $PeopleID; ?>"></td>
</tr>
<?
}
?>
<tr><td></td><td></td><td></td><td></td><td></td><td colspan="2" align="right">
<input type="submit" name="secondsub" value="Submit">
</td></tr>
</table>
</form>
<?
}
if($_POST['LName'] && $_POST['FName'])
{
$query = "SELECT People.PeopleID, People.FirstName, People.LastName, People.Phone1 FROM People WHERE LastName LIKE '".$_POST['LName']."%' AND FirstName LIKE '".$_POST['FName']."%'";
$result = odbc_exec($connect, $query);
?>
<form action="<?php echo $_SERVER['PHP_SELF']?>" method="post">
<table border="0">
<tr><td colspan=2><h1>Select the person</h1></td></tr>
<tr><td>First Name</td><td> </td><td>Last Name</td><td> </td><td>Business Phone</td></tr>
<?
while(odbc_fetch_array($result))
{
$PeopleID = odbc_result($result,"PeopleID");
$FirstName = odbc_result($result,"FirstName");
$LastName = odbc_result($result,"LastName");
$BPhone = odbc_result($result,"Phone1");
?>
<tr>
<td><? print $FirstName; ?></td>
<td> </td>
<td><? print $LastName; ?></td>
<td> </td>
<td><? print $BPhone; ?></td>
<td><input type="radio" name="PeopleIDR" value="<? print $PeopleID; ?>"></td>
</tr>
<?
}
?>
<tr><td></td><td></td><td></td><td></td><td></td><td colspan="2" align="right">
<input type="submit" name="secondsub" value="Submit">
</td></tr>
</table>
</form>
<?
}
odbc_close($connect);
}
}
Else
{
die('You must log in first, you will be redirected to a login page. <meta http-equiv="refresh" content="3;url=http://website/Index.php"/>');
}
?>
|
Advertisement