Location: PHPKode > projects > Akasha > contact_view.php
<?

if ($akashaID == $ID) {

	include ("includes/global.inc"); 	// Global Variables
	include ("includes/functions.inc"); 	// Global Functions

	$user_id = findUserByHash($ID);
 	$query = "select user_id from tblAdressbook where item_id = $item_id";
 	$result = mysql_db_query("$dbname",$query);
 	if($result) {
 		while ($r = mysql_fetch_array($result)) {
 			$auth_user = $r["user_id"];
		}
	}

	$user_id = findUserByHash($ID);
	if ($user_id != $auth_user) {
		Header("Location: main.php?error_code=1");		
	}

	include ("includes/head.inc"); 		// Standart Headers
	include ("stylesheets/homestyle.inc"); 	// Stylesheets

  echo "</head>\n";
  echo "<body bgcolor='#FFFFFF' text='#000000' link='#3457A9' vlink='#3457A9' alink='#009966'>\n";
  echo "<table width='100%' border='0' cellspacing='0' cellpadding='0' height='200'>\n";
  echo "  <tr>\n";
  echo "    <td valign='top'>\n";
  echo "	<div align='center'>\n";

 	$query = "select * from tblAdressbook where item_id = $item_id and user_id = $user_id";
 	$result = mysql_db_query("$dbname",$query);
 	if($result) {
 		while ($r = mysql_fetch_array($result)) {
 			$txtlast = $r["last_name"];
			$txtfirst = $r["first_name"];
			$txtcompany = $r["company"];
 			$txtemail = $r["ab_email"];
			$txthome = $r["home_phone"];
 			$txtwork = $r["work_phone"];
			$txtfax = $r["fax_number"];
			$txtmobile = $r["mobile"];
			$txtaddress1 = $r["address1"];
			$txtaddress2 = $r["address2"];
			$txtcity = $r["city"];
			$txtstate = $r["state"];
			$txtzip = $r["zip"];
		}
	}

  echo "      <br><br><br><br><br><br>\n";
 
  // Show Entry
  echo "        <table width='450' border='1' cellspacing='1' cellpadding='0' bgcolor='#DCD7CB' bordercolor='#000000'>\n";
  echo "        <tr><td><table width='450' border='0' cellspacing='1' cellpadding='0' bgcolor='#DCD7CB'>\n";
  echo "          <tr bgcolor='#DCD7CB'>\n";
  echo "            <td><table width='450' border='0' cellspacing='1' cellpadding='0' bgcolor='#DCD7CB'>\n";
  echo "               <tr>\n";
  echo "                 <td align='left' width='225'>\n";
  echo "                   <b><i>$txtfirst $txtlast</i></b>\n";
  echo "                 </td>\n";
  echo "                  <td align='right' width='225'>\n";
  echo "                     <b>$txtcompany</b>\n";
  echo "                  </td>\n";
  echo "               </tr>\n";
  echo "               <tr>\n";
  echo "                 <td align='left' colspan='2'>\n";
  echo "                    <b>$txtemail</b>\n";
  echo "                 </td>\n";
  echo "               </tr>\n";
  echo "            </table></td>\n";
  echo "          <tr bgcolor='#DCD7CB'>\n";
  echo "            <td>&nbsp\n";
  echo "            </td>\n";
  echo "          </tr>\n";
  echo "          <tr bgcolor='#DCD7CB'>\n";
  echo "            <td>\n";
  echo "               <center>$txtaddress1 $txtaddress2</center>\n";
  echo "            </td>\n";
  echo "          </tr>\n";
  echo "          <tr bgcolor='#DCD7CB'>\n";
  echo "            <td>\n";
  echo "               <center>$txtcity, $txtstate $txtzip</center>\n";
  echo "            </td>\n";
  echo "          </tr>\n";
  echo "          <tr bgcolor='#DCD7CB'>\n";
  echo "            <td>&nbsp\n";
  echo "            </td>\n";
  echo "          </tr>\n";
  echo "          <tr bgcolor='#DCD7CB'>\n";
  echo "            <td><table width='450' border='0' cellspacing='1' cellpadding='0' bgcolor='#DCD7CB'>\n";
  echo "                <tr>\n";
  echo "                  <td align='center' width='225'>\n";
  echo "                      Work Number - $txtwork\n";
  echo "                  </td>\n";
  echo "                  <td align='center' width='225'>\n";
  echo "                      Home Number - $txthome\n";
  echo "                  </td>\n";
  echo "               </tr>\n";
  echo "                <tr>\n";
  echo "                  <td align='center' width='225'>\n";
  echo "                      Fax Number - $txtfax\n";
  echo "                  </td>\n";
  echo "                  <td align='center' width='225'>\n";
  echo "                      Cel Number - $txtmobile\n";
  echo "                  </td>\n";
  echo "               </tr>\n";
  echo "            </table></td>\n";
  echo "          </tr>\n";
  echo "          <tr bgcolor='#DCD7CB'>\n";
  echo "            <td>&nbsp\n";
  echo "            </td>\n";
  echo "          </tr>\n";
  echo "        </table>\n";
  echo "        </td></tr>\n";
  echo "        </table>\n";
  echo "        <br><br>\n"; 
  echo "  		<a href='addressbook.php?ID=$ID'>Return</a></div>\n";
  echo "    </td>\n";
  echo "    <td valign='top' width='21'>&nbsp;</td>\n";
  echo "  </tr>\n";
  echo "</table>\n";
  echo "</body>\n";
  echo "</html>\n";

} else {
		Header("Location: main.php?error_code=1");
}

?>
Return current item: Akasha