<?php
include ("inc/inc_common.php");

if ($action == "set")
{
    $query = "UPDATE $userstable SET memPostIt = '$Postit' WHERE strName = '$gfcookie[1]'";
    mysql_query( $query, $link ) or die ( "Error! : ".mysql_error() );
}

print "<html>
<head>
<meta name=\"AUTHOR\" content=\"Matt Squirrell\">
<meta name=\"COPYRIGHT\" content=\"(c)2002 HSMX Web Design\">
<meta name=\"CONTACT\" content=\"grimforum@hsmx.com\">
<title>$gfcookie[1]'s Post It</title>
<META name=\"description\" content=\"$metadescription\">
<META name=\"keywords\" content=\"GrimForum, HSMX, Web Design, $metakeywords\">
</head>
<body bgcolor=\"$bgcolour\" link=\"$flink\" vlink=\"$vlink\" alink=\"$alink\" style=\"font-family: $font; font-size: $fontpoint; color: $fontcolor\"><center>

<br><b><font size=$fontsizeb face=\"$font\" color=\"$fontcolor\">Your Post It:<form method=\"post\" action=\"postit.php?action=set\">
<textarea rows=\"11\" cols=\"36\" style=\"background-image: url('images/big_area_background.gif')\" name=\"Postit\">";

$result=mysql_query("SELECT * FROM $userstable WHERE strName = '$gfcookie[1]'");
$num_rows = mysql_num_rows( $result );
while ( $a_row = mysql_fetch_object( $result ) )
{
    if ($a_row->memPostIt == "")
    {
        print "This is your Post It.\n\nUse it to store information you need to remember.\n\nPost It's are most commanly used as copy / paste areas, however, any information you put in your Post It will be stored indefinatly, or until you wipe it off.\n\nNote from Grim: In the final build of GF5 this will be incorporated into the navigation area, along with Active Topics, Edit Profile, etc.\nHowever, I can't do that yet because I don't have an Icon for it!";
    }
    else
    {
        print "$a_row->memPostIt";
    }
}

print "</textarea><br><br><input type=\"submit\" value=\"Save My PostIt\">";

include ("inc/inc_footer.php");
?>