Location: PHPKode > projects > Akasha > akasha/favorite_modify.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 tblFavorites where favorite_id = $favorite_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' width='812'>\n";

  echo "      <table width='100%' border='0' cellspacing='0' cellpadding='0'>\n";
  echo "        <tr bgcolor='#2B3D61'>\n";
  echo "          <td><b><font color='#DCD7CB'><i>Favorites->Modify</i></font></b></td>\n";
  echo "        </tr>\n";
  echo "            \n";
  echo "      </table>\n";
  echo "      <div align='center'><br>\n";


 	$query = "select * from tblFavorites where favorite_id = $favorite_id and user_id = $user_id";
 	$result = mysql_db_query("$dbname",$query);
 	if($result) {
 		while ($r = mysql_fetch_array($result)) {
 			$txturl = $r["url"];
 			$txttitle = $r["url_title"];
 			$txtnotes = $r["fav_notes"];
		}
	}


  echo "        <form method='post' action='favorite_update.php?ID=$ID&favorite_id=$favorite_id'>\n";
  echo "          <div align='center'>\n";
  echo "      </div>\n";
  echo "          <table width='550' border='0' cellspacing='0' cellpadding='0' align='center' bgcolor='#999999'>\n";
  echo "            <tr>\n";
  echo "              <td>\n";
  echo "                <table width='550' border='0' cellspacing='1' cellpadding='0' align='center'>\n";
  echo "                  \n";
  echo "                  <tr align='center'>\n";
  echo "                    <td bgcolor='#DCD7CB'>\n";
  echo "                      <table width='100%' border='0' cellspacing='0' cellpadding='0'>\n";
  echo "                        <tr>\n";
  echo "                          <td width='22%'>Site Title</td>\n";
  echo "                          <td width='73%'>\n";
  echo "                            <input type='text' name='txttitle' size='45' class='stiltextfield' value='$txttitle'>\n";
  echo "                        </td>\n";
  echo "                        </tr>\n";
  echo "                        <tr>\n";
  echo "                          <td width='22%'>Site URL</td>\n";
  echo "                          <td width='73%'>\n";
  echo "                            <input type='text' name='txturl' value='$txturl' size='45' class='stiltextfield'>\n";
  echo "                        </td>\n";
  echo "                        </tr>\n";
  echo "                        <tr>\n";
  echo "                          <td width='22%' valign='top'>Notes</td>\n";
  echo "                          <td width='73%'>\n";
  echo "                            <textarea name='txtnotes' class='stiltextfield' rows='4' cols='43'>$txtnotes</textarea>\n";
  echo "                          </td>\n";
  echo "                        </tr>\n";
  echo "                        <tr>\n";
  echo "                          <td width='100%' align='center' colspan='2'>\n";
  echo "                            <input type='submit' name='Submit' value='Save'>\n";
  echo "                        </td>\n";
  echo "                        </tr>\n";
  echo "                      </table>\n";
  echo "                    </td>\n";
  echo "                  </tr>\n";
  echo "                </table>\n";
  echo "              </td>\n";
  echo "            </tr>\n";
  echo "          </table>\n";
  echo "        </form>\n";
	echo "  		<a href='favorites.php?ID=$ID'>Return</a></div>\n";
  echo "      </div>\n";
  echo "    </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