<?
if ($akashaID == $ID) {
include ("includes/global.inc"); // Global Variables
include ("includes/functions.inc"); // Global Functions
$user_id = findUserByHash($ID);
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 " <table width='100%' border='0' cellspacing='0' cellpadding='0'>\n";
echo " <tr bgcolor='#2B3D61'>\n";
echo " <td><b><font color='#DCD7CB'><i>Notebook</i></font></b></td>\n";
echo " </tr>\n";
echo " \n";
echo " </table>\n";
echo " <br>\n";
echo " <div align='right'><b><a href='note_add.php?ID=$ID'>Add Note</a></b></div>\n";
echo " <table width='100%' border='0' cellspacing='2' cellpadding='0'>\n";
echo " <tr bgcolor='#DCD7CB'>\n";
echo " <td width='66%'><b><font color='#2B3D61'>Note Header</font></b></td>\n";
echo " <td width='25%' colspan='2'><b><font color='#2B3D61'>Date</font></b></td>\n";
echo " </tr>\n";
$girdi = 2;
$query = "select count(note_id) from tblNotebook where user_id = $user_id";
$result = mysql_db_query("$dbname",$query);
if($result) {
while ($r = mysql_fetch_array($result)) {
$messagecount = $r["count(note_id)"];
}
}
$query = "select note_id,entry_title,entry_date from tblNotebook where user_id = $user_id order by note_id desc";
$result = mysql_db_query("$dbname",$query);
if($result) {
while ($r = mysql_fetch_array($result)) {
$note_id = $r["note_id"];
$entry_title = $r["entry_title"];
$entry_date = $r["entry_date"];
echo " <tr bgcolor='#E3E7E8'>\n";
echo " <td width='66%'><a href='note_add.php?ID=$ID¬e_id=$note_id&action=1'>$entry_title</a></td>\n";
echo " <td width='25%' nowrap>$entry_date</td>\n";
echo " <td width='9%' align='center' nowrap><a href='note_delete.php?ID=$ID¬e_id=$note_id'><b>Delete</b></a></td>\n";
echo " </tr>\n";
$girdi = 1;
}
}
if ($girdi ==2) {
echo " <tr>\n";
echo " <td width='100%' colspan='3'><div align='center'> <br><b><font color='#304167'>You Have No Notes</font></b></div></td>\n";
echo " </tr>\n";
}
echo " </table>\n";
echo " <div align='right'><b><font color='#304167'>Total Note Count : $messagecount</font></b></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");
}
?>