Location: PHPKode > projects > EverQuest Roster/Gallery > html/view_pm.php
<?
        /**********************************************************************************
        *                                                                                 *
        *                                  index.php                                      *
        *                             -------------------                                 *
        *                                                                                 *
        * Program           : EverQuest Roster/Gallery v1.7b1                             *
        * Copyright         : (C) 2001 - 2002 BladeTek Internet Services &                *
        *                                                     The EQRG Developement Team  *
        * Website           : http://eqcode.roleplayersinteraction.com                    *
        * Support Website   : http://www.sourceforge.net/projects/eqrostergallery         *
        * Email             : hide@address.com                                        *
        *                                                                                 *
        * For license information, please read the documents directory which              *
        * came with this edition                                                          *
        *                                                                                 *
        **********************************************************************************/

        session_start();

        include "includes/funcs.php";
        include "includes/read_msg.php";
        #include "write_msg.php";
        $uid = $SESSION["uid"];
        if ($action == "del") {
                $del_err = delete_msg($mid);

                if (!$del_err) {
                        header("Location: view_pm.php?id=$uid");
                        exit();
                }
        }

        /* READ CODE */
        $err = read_msg($id, $msg);

        $color1 = $options["aic1"];
        $color2 = $options["aic2"];
        $color3 = $options["atc1"];
        $color4 = $options["atc2"];

        /* DISPLAY CODE */
        draw_header("Messanger");
        draw_table_header("Messanger", "" . $options["scriptw"] . "");
        draw_text_header("Messanger", "" . $options["pntf"] . "", "" . $options["pnts"] . "", "" . $options["pntc"] . "");
        if ($options["dimsg"] == 1) {
        }else{
        (isset($SESSION["uid"]) ? draw_back_header("Send Message", "send_msg.php", "" . $options["tmf"] . "", "" . $options["tms"] . "", "" . $options["tmc"] . "") : "");
        }
        (isset($SESSION["uid"]) ? draw_back_header("Logout", "index.php?logout=1", "" . $options["tmf"] . "", "" . $options["tms"] . "", "" . $options["tmc"] . "") : "");
        if ($options["dimsg"] == 1) {
        echo "<p>\n";
        echo "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" border=\"0\">\n";
        echo "<tr>\n";
        echo "<td align=\"center\">\n";
        echo "<font face=\"Arial\" size=\"2\">The Messanger has been disabled by the Administrator.<br>Try again later</font>\n";
        echo "</td>\n";
        echo "</tr>\n";
        echo "</table>\n";

        }else{
        echo "<script language=\"JavaScript\">\n";
        echo "function view_image() {\n";
        echo "var win = window.open('image.php?id=$id', '', 'toolbar=no, location=no, status=no, menubar=no, scrollbars=yes, resizable=no, width=320, height=200, top=100, left=100');\n";
        echo "}\n";
        echo "function pop_win(uid) {\n";
        echo "window.open(\"view_profile.php?id=\" + uid, null, \"status=0, location=0, toolbar=0, directories=0, menubar=0, scrollbars=1, resizable=1, width=220, height=140, top=100, left=400\");\n";
        echo "}\n";
        echo "function del_msg(mid, title) {\n";
        echo "var conf = confirm(\"Are you sure you want to delete the message: \" + title + \"?\");\n\n";
        echo "if (conf == true) {\n";
        echo "window.location = 'view_pm?mid=' + mid + '&action=del';\n";
        echo "}\n";
        echo "}\n\n";
        echo "</script>\n\n";
        echo "<p>\n";
        echo "<table width=\"100%\" cellspacing=\"1\" cellpadding=\"2\" border=\"0\" bgcolor=\"" . $options["tbc"] . "\">\n";
        echo "<tr>\n";
        echo "<td colspan=\"5\" width=\"100%\" bgcolor=\"" . $options["thc"] . "\"><font face=\"" . $options["thtf"] . "\" size=\"" . $options["thts"] . "\" color=\"" . $options["thtc"] . "\"><b>\n";
        echo "Messanger\n";
        echo "</b></font></td>\n";
        echo "</tr>\n";
        echo "<tr>\n";
        echo "<td width=\"7%\" bgcolor=\"" . $options["thc"] . "\"><font face=\"" . $options["thtf"] . "\" size=\"" . $options["thts"] . "\" color=\"" . $options["thtc"] . "\"><b>\n";
        echo "&nbsp;\n";
        echo "</b></font></td>\n";
        echo "<td width=\"45%\" bgcolor=\"" . $options["thc"] . "\"><font face=\"" . $options["thtf"] . "\" size=\"" . $options["thts"] . "\" color=\"" . $options["thtc"] . "\"><b>\n";
        echo "Title\n";
        echo "</b></font></td>\n";
        echo "<td width=\"12%\" align=\"center\" bgcolor=\"" . $options["thc"] . "\"><font face=\"" . $options["thtf"] . "\" size=\"" . $options["thts"] . "\" color=\"" . $options["thtc"] . "\"><b>\n";
        echo "Sender\n";
        echo "</b></font></td>\n";
        echo "<td width=\"25%\" align=\"center\" bgcolor=\"" . $options["thc"] . "\"><font face=\"" . $options["thtf"] . "\" size=\"" . $options["thts"] . "\" color=\"" . $options["thtc"] . "\"><b>\n";
        echo "Date\n";
        echo "</b></font></td>\n";
        echo "<td width=\"11%\" align=\"center\" bgcolor=\"" . $options["thc"] . "\"><font face=\"" . $options["thtf"] . "\" size=\"" . $options["thts"] . "\" color=\"" . $options["thtc"] . "\"><b>\n";
        echo "Action\n";
        echo "</b></font></td>\n";
        echo "</tr>\n";
        if ($msg["count"]) {
        for ($i = 0; $i < $msg["count"]; $i++) {
                $start += 1;
                $color = alternate_colors("$color1", "$color2", $start);
                $text = alternate_colors("$color3", "$color4", $start);
                echo "<tr bgcolor=" . $color . ">\n";
                echo "<td align=\"center\"><font face=\"" . $options["atf"] . "\" size=\"" . $options["ats"] . "\" color=\"" . $text . "\">\n";
                if ($msg[$i]["viewed"] == 0) {
                echo "<img src=\"images/unread.gif\" width=\"18\" height=\"12\" alt=\"Unread Message\" border=\"0\" align=\"top\">\n";
                } else {
                echo "<img src=\"images/read.gif\" width=\"18\" height=\"12\" alt=\"Read Message\" border=\"0\" align=\"top\">\n";
                }
                echo "</font></td>\n";
                echo "<td><font face=\"" . $options["atf"] . "\" size=\"" . $options["ats"] . "\" color=\"" . $text . "\">\n";
                echo "<a href=\"view_msg.php?id=" . $msg[$i]["mid"] . "\">" . $msg[$i]["title"] . "</a>\n";
                echo "</td></font>\n";
                echo "<td align=\"center\"><font face=\"" . $options["atf"] . "\" size=\"" . $options["ats"] . "\" color=\"" . $text . "\">\n";
                echo $msg[$i]["login"] . "\n";
                echo "</td></font>\n";
                echo "<td align=\"center\"><font face=\"" . $options["atf"] . "\" size=\"" . $options["ats"] . "\" color=\"" . $text . "\">\n";
                echo date("M j, Y g:i A", $msg[$i]["date"]) . "\n";
                echo "</td></font>\n";
                echo "<td align=\"center\"><font face=\"" . $options["atf"] . "\" size=\"" . $options["ats"] . "\" color=\"" . $text . "\">\n";
                echo "[ <a href=\"#\" onmouseover=\"window.status = 'Delete " . $msg[$i]["title"] . "'; return true;\" onmouseout=\"window.status = ''; return true;\" onclick=\"javascript:del_msg(" . $msg[$i]["mid"] . ", '" . $msg[$i]["title"] . "'); return false;\">Delete</a> ]\n";
                echo "</td></font>\n";
                echo "</tr>\n";
        }
        } else {
                echo "<tr>\n";
                echo "<td colspan=\"5\" align=\"center\" bgcolor=\"" . $options["ticr"] . "\"><font face=\"" . $options["ttfr"] . "\" size=\"" . $options["ttsr"] . "\" color=\"" . $options["ttcr"] . "\">\n";
                echo "You have no messages.\n";
                echo "</td></font>\n";
                echo "</tr>\n";
        }
        echo "<tr>\n";
        echo "<td align=\"center\" colspan=\"5\" bgcolor=\"" . $options["thc"] . "\"><font face=\"" . $options["thtf"] . "\" size=\"" . $options["thts"] . "\" color=\"" . $options["thtc"] . "\"><b>\n";
        echo "Key\n";
        echo "</b></font></td>\n";
        echo "</tr>\n";
        echo "<tr>\n";
        echo "<td colspan=\"5\" bgcolor=\"" . $options["ticr"] . "\"><font face=\"" . $options["ttfr"] . "\" size=\"" . $options["ttsr"] . "\" color=\"" . $options["ttcr"] . "\">\n";
        echo "<img src=\"images/read.gif\" width=\"18\" height=\"12\" alt=\"Read Message\" border=\"0\" align=\"top\">&nbsp;Read Messages\n";
        echo "</font></td>\n";
        echo "</tr>\n";
        echo "<tr>\n";
        echo "<td colspan=\"5\" bgcolor=\"" . $options["ticr"] . "\"><font face=\"" . $options["ttfr"] . "\" size=\"" . $options["ttsr"] . "\" color=\"" . $options["ttcr"] . "\">\n";
        echo "<img src=\"images/unread.gif\" width=\"18\" height=\"12\" alt=\"Unread Message\" border=\"0\" align=\"top\">&nbsp;Unread Messages\n";
        echo "</font></td>\n";
        echo "</tr>\n";
        echo "</table>\n";
        }
        draw_copyright();
        draw_table_footer("Messanger");
        draw_footer();
?>
Return current item: EverQuest Roster/Gallery