connect("poetrydmv"); if ( !isset($_GET[mode]) ) $_GET[mode] = "users"; if ( ( !isset($_GET[i_recipientid]) ) && (( $_GET[mode] == "send" ) OR ($_GET[mode] == "sendAll")) ) $_GET[mode] = "users"; if ( $_GET[mode] == "away" ) { $dmv->exec("UPDATE members SET b_away = 't' WHERE i_memberid = $userInfo->i_memberid;"); $message = "You have been marked as away."; $_GET[mode] = "users"; $userInfo->b_away = "t"; } if ( $_GET[mode] == "back" ) { $dmv->exec("UPDATE members SET b_away = 'f' WHERE i_memberid = $userInfo->i_memberid;"); $message = "You have been marked as back."; $_GET[mode] = "users"; $userInfo->b_away = "f"; } if ( ( $_GET[mode] != "send" ) && ( $userInfo->b_away == "f" ) ) { $sql = "SELECT a.*, b.c_fname, b.c_lname, b.c_middle, b.c_suffix, date(t_sent) as sent FROM member_messages AS a, members AS b WHERE a.i_senderid = b.i_memberid AND a.i_recipientid = $userInfo->i_memberid AND a.b_viewed = 'f' ORDER BY t_sent ASC LIMIT 1"; $dmv->exec($sql); $rows = $dmv->RecordCount(); if ( $rows > 0 ) $_GET[mode] = "read"; } ?> PoetryDMV :: <?php echo $_GET[mode]; ?> theme_name . "/style.inc"); ?> page_color_header; ?>> menu_color_border; ?>>menu_color_background; ?> HEIGHT=3> menu_color_background; ?>> menu_color_background; ?> HEIGHT=3> menu_color_border; ?>>
PoetryDMV.com
menu_color_border; ?> WIDTH=1> menu_color_border; ?> WIDTH=1>
 Your Friends menu_color_border; ?> WIDTH=1>  Users Online menu_color_border; ?> WIDTH=1>  History
menu_color_border; ?> WIDTH=1> menu_color_border; ?> WIDTH=1>
0 ) echo "$message\n"; ?>"; echo ""; } if ( $userInfo->i_memberstate > 1 ) { echo ""; echo ""; } if (( $userInfo->member_type == 1 ) or ( $userInfo->member_type == 7 ) or ( $userInfo->member_type == 8 )) { echo ""; } echo "Page Generated in $diff Seconds"; ?>

Terms and Conditions

fobject(); $dmv->exec("UPDATE member_messages SET b_viewed = 't' WHERE i_recipientid = $userInfo->i_memberid AND i_messageid = $data->i_messageid;"); $result = $dmv->exec("SELECT i_messageid FROM member_messages WHERE b_viewed = 'f' AND i_recipientid = $userInfo->i_memberid;"); $count = $dmv->RecordCount(); echo "Incoming Message

\n"; echo "\n"; echo "table_header_color_bg>\n"; echo "table_row_color_bg>\n"; echo "table_header_color_bg>\n"; echo ""; echo "
table_header_color_font\">from " . returnDisplayName(returnName($data)) . " ($count messages remaining)
Sent at $data->t_sent

$data->t_message

 

\n"; echo "\ntable_header_color_font\" HREF=\"/communicatorDB.php?action=delete&i_messageid=$data->i_messageid&i_recipientid=$userInfo->i_memberid&mid=$data->i_messageid\">\n"; echo "\n
\n\n"; echo "i_senderid\">\n"; echo "\n"; echo "
"; $quote = strip_tags("On $data->sent ".returnDisplayName(returnName($data)." said:\n$data->t_message")); echo "\n
\n\n\ni_senderid\">\n\n
"; if ($count>0) { echo "table_header_color_font\" HREF=\"/communicator.php?mode=read\">Next";} echo " 
\n"; $_GET[mode] = "read"; } if ( $_GET[mode] == "users" ) { echo "Users Online

\n"; if ( $userInfo->b_away == "f" ) echo "Mark yourself as away/busy\n"; if ( $userInfo->b_away == "t" ) { $subresult = $dmv->exec("SELECT i_messageid FROM member_messages WHERE b_viewed = 'f'AND i_recipientid = $userInfo->i_memberid;"); $count = $dmv->RecordCount(); pg_FreeResult($subresult); echo "Marked as Away with $count message(s).\n"; } echo "

\n"; echo " table_header_color_bg>\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; $threshold = $pageStart - 240; $result = pg_Query($conn, "SELECT i_memberid, c_fname, c_middle, c_lname, c_suffix, c_title, i_timestamp, b_away FROM members WHERE i_timestamp > $threshold ORDER BY c_lname, c_fname;"); $rows = pg_NumRows($result); $bgcolor = $theme->table_row_color_bg; for ( $y = 0; $y < $rows; $y++ ) { $data = pg_Fetch_Object($result, $y); $subresult = pg_Exec($conn, "SELECT (now() - max(t_posted)) AS diff FROM poetry WHERE i_memberid = $data->i_memberid;"); $diff = pg_Result($subresult, 0, 0); pg_FreeResult($subresult); echo " \n"; if ( $userInfo->i_memberid != $data->i_memberid ) echo " \n"; else echo ""; echo " \n"; if ( $userInfo->i_memberid != $data->i_memberid ) echo " \n"; else echo ""; echo " \n"; echo " \n"; if ( $bgcolor == $theme->table_row_color_bg ) $bgcolor = $theme->table_row_color_altbg; else $bgcolor = $theme->table_row_color_bg; } echo " table_header_color_bg>\n"; echo " \n"; echo " \n"; echo "
table_header_color_font\"> Nametable_header_color_font\">Last Activity
i_memberid\">theme_name/sendMessage.gif\" WIDTH=16 HEIGHT=16 ALT=\"Send Message\" BORDER=0> "; $temp = Trim(substr($diff, strpos($diff, "@") + 2, 10)); if ( ( substr($temp, strpos($temp, " ") + 1, 1) == "h" ) || ( substr($temp, strpos($temp, " ") + 1, 3) == "min" ) ) $diff = 1; else $diff = substr($temp, 0, strpos($temp, " ")); if ( $diff < 5 ) echo "theme_name/new.gif\" WIDTH=10 HEIGHT=10 ALT=\"New Poetry\">  "; echo "" . returnDisplayName(returnName($data)) . ""; if ( $data->b_away == "t" ) echo " - Away"; echo "i_memberid\" onClick=\"return confirm('$_LANG[add_friend_confirm]');\">theme_name/addfriend.gif\" WIDTH=16 HEIGHT=16 ALT=\"Add Friend\" BORDER=0>" . strftime("%I:%M %p", $data->i_timestamp) . "
table_header_color_font\">$rows Users Currently Online

\n"; echo "

Legend:

\n"; echo "\n"; echo "\n"; echo "\n"; echo "
theme_name/sendMessage.gif\">  Send Message
theme_name/new.gif\">  Has New Poetry
theme_name/addfriend.gif\">  Add Friend
\n"; } if ( $_GET[mode] == "history" ) { $result = pg_Query($conn, "SELECT count(i_messageid) as count FROM member_messages WHERE i_recipientid = $userInfo->i_memberid;"); $count = pg_Result($result, 0); pg_FreeResult($result); if ( $count > ( $_GET[offset] + 25 )) { $next = $_GET[offset] + 25; $last = $count - 25; } else { $next = 0; $last = 0; } if ( $_GET[offset] > 24 ) { $prev = $_GET[offset] - 25; if ( $prev < 0 ) $prev = 0; } else { $prev = -1; } echo "Your Incoming Message History

\n"; $result = pg_Query($conn, "SELECT i_messageid, t_sent FROM member_messages WHERE i_recipientid = $userInfo->i_memberid ORDER BY t_sent DESC LIMIT 1;"); $messageid = pg_Result($result, 0, 0); pg_FreeResult($result); echo "Purge Message History

\n"; echo "["; if ($prev>-1) { echo "First Page |\n"; echo "Previous Messages |\n"; } if ($next>1) { echo "Next Messages | "; echo "Last Page"; } echo "]

\n"; $result = pg_Exec($conn, "SELECT a.*, b.c_fname, b.c_lname, b.c_middle, b.c_suffix FROM member_messages AS a, members AS b WHERE b.i_memberid = a.i_senderid AND a.i_recipientid = $userInfo->i_memberid AND a.b_viewed = 't' ORDER BY t_sent DESC OFFSET $_GET[offset] LIMIT 25;"); $rows = pg_NumRows($result); for ( $y = 0; $y < $rows; $y++ ) { echo "\n"; $data = pg_Fetch_Object($result, $y); echo "\n"; echo "\n"; echo "\n"; echo "
table_header_color_bg>table_header_color_font\">From " . returnDisplayName(returnName($data)) . " on $data->t_sent
table_row_color_bg>$data->t_message
table_row_color_altbg ALIGN=RIGHT> "; echo "i_messageid&i_recipientid=$userInfo->i_memberid\" STYLE=\"color:black\">Delete"; echo " - i_senderid\" STYLE=\"color:black\">Reply"; // $quote = rawurlencode(strip_tags("\nOn $data->sent you said:\n$data->t_message")); echo " - i_senderid&mid=$data->i_messageid\" STYLE=\"color:black\">Quote"; echo "

\n"; } pg_FreeResult($result); } if ( $_GET[mode] == "friends" ) { echo "Your Friends List

\n"; echo "\n"; echo " table_header_color_bg>\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; $result = $dmv->exec("SELECT a.i_friendid, b.c_fname, b.c_middle, b.c_lname, b.c_suffix, b.c_title, b.i_timestamp FROM member_friends AS a JOIN members AS b ON a.i_friendid = b.i_memberid WHERE a.i_memberid = $userInfo->i_memberid ORDER BY b.c_lname, b.c_fname;"); $rows = $dmv->RecordCount(); $bgcolor = $theme->table_row_color_bg; for ( $y = 0; $y < $rows; $y++ ) { $data = pg_Fetch_Object($result, $y); $subresult = pg_Exec($conn, "SELECT date(max(t_posted)), (now() - max(t_posted)) AS diff FROM poetry WHERE i_memberid = $data->i_friendid;"); $last = pg_Result($subresult, 0, 0); $diff = pg_Result($subresult, 0, 1); pg_FreeResult($subresult); echo " \n"; echo " \n"; echo " "; echo " \n"; echo " \n"; echo " \n"; echo " \n"; if ( $bgcolor == $theme->table_row_color_bg ) $bgcolor = $theme->table_row_color_altbg; else $bgcolor = $theme->table_row_color_bg; } pg_FreeResult($result); } if ( $_GET[mode] == "options" ) { echo "Configuration Options

\n"; echo "Coming Soon!"; } if (( $_GET[mode] == "send" )) { $sql = "SELECT c_fname, c_lname, c_middle, c_suffix, b_away FROM members WHERE i_memberid=$_GET[i_recipientid];"; $dmv->exec($sql); $data = $dmv->fobject(); echo "Send Message to " . returnDisplayName(returnName($data)) . "

\n"; if ( $data->b_away == "t" ) echo "This user is currently marked as away and will not receive notification of the message sent until they return.

\n"; echo "

\n"; echo "\n"; echo "\n"; // $result = $dmv->exec("SELECT t_sent, t_message FROM member_messages WHERE i_messageid = $_GET[mid];"); // $data=$dmv->fobject($result); // if ($data->t_sent>0) { $quote=$data->t_sent." you said:\n".$data->t_message; } else { $quote="";} echo "

\n"; echo "

\n"; } if ( ( $_GET[mode] == "sendAll" ) and (( $userInfo->member_type == 1 ) OR ( $userInfo->member_type ==8 ) OR ( $userInfo->member_type ==7 ))) { $title = "All Members"; if ( isset($_GET[filter]) ) $title = UCWords(strtolower($_GET[filter])); echo "Send Message to $title

\n"; echo "

\n"; echo "

\n"; echo "\n"; if ( isset($_GET[filter]) ) echo "\n"; echo "

\n"; } $diff = time() - $pageStart; ?>
table_header_color_font\"> Nametable_header_color_font\">Last Ontable_header_color_font\">Last Post
i_friendid\">theme_name/sendMessage.gif\" WIDTH=16 HEIGHT=16 ALT=\"Send Message\" BORDER=0> "; $temp = Trim(substr($diff, strpos($diff, "@") + 2, 10)); if ( ( substr($temp, strpos($temp, " ") + 1, 1) == "h" ) || ( substr($temp, strpos($temp, " ") + 1, 3) == "min" ) ) $diff = 1; else $diff = substr($temp, 0, strpos($temp, " ")); if ( $diff < 5 ) echo "theme_name/new.gif\" WIDTH=10 HEIGHT=10 ALT=\"New Entry\">  "; echo "" . returnDisplayName(returnName($data)) . "" . strftime("%I:%M %p %m/%d/%y", $data->i_timestamp) . "$lasti_friendid\" onClick=\"return confirm('$_LANG[all_delete_confirm]');\">theme_name/deleteSM.gif\" WIDTH=16 HEIGHT=16 ALT=\"Delete Friend\" BORDER=0>

i_memberstate > 3 ) { echo "
"; echo "\n
\n"; echo "\n"; echo "i_senderid\">\n"; echo "\n"; echo "
"; echo "
"; echo "\n
\n"; echo "\n"; echo "\n"; echo "i_senderid\">\n"; echo "\n"; echo "
"; echo "
"; echo "\n
\n"; echo "\n"; echo "\n"; echo "i_senderid\">\n"; echo "\n"; echo "
"; echo "
"; echo "\n
\n"; echo "\n"; echo "\n"; echo "i_senderid\">\n"; echo "\n"; echo "
"; echo "
"; echo "\n
\n"; echo "\n"; echo "\n"; echo "i_senderid\">\n"; echo "\n"; echo "
"; echo "