<?php
/********************************************************/
/* NSN Your Account                                     */
/* By: NukeScripts Network (webmaster@nukescripts.net)  */
/* http://www.nukescripts.fr                            */
/* Original Script www.nukescripst.net                  */
/* Copyright © 2000-2005 by NukeScripts Network         */
/* ==================================================== */
/* Based from:                                          */
/* PHP-NUKE: Web Portal System                          */
/********************************************************/
defined('IN_YA') OR die ('Access denied broadcast MAXIMUS directly...');
defined('MAXIMUS') OR header("Location: index.php");

if ($broadcast_msg == 1) {
    incoh();
    title(""._BROADCAST."");
    Max_OpenTable();
    $numrows = $GLOBALS['db']->sql_numrows($GLOBALS['db']->sql_query("SELECT * FROM ".$prefix."_public_messages WHERE who='$who'"));
    $the_message = FixQuotes(filter_text($the_message, "nohtml"));
    if ($the_message != "" AND $numrows == 0) {
        $the_time = time();
        $GLOBALS['db']->sql_query("INSERT INTO ".$prefix."_public_messages VALUES (NULL, '$the_message', '$the_time', '$who')");
        //update_points(20);
        echo "<center>"._BROADCASTSENT."<br /><br />[ <a href=\"modules.php?name=$module_name\">"._RETURNPAGE."</a> ]</center>";
    } else {
        echo "<center>"._BROADCASTNOTSENT."<br /><br />[ <a href=\"modules.php?name=$module_name\">"._RETURNPAGE."</a> ]</center>";
    }
    Max_CloseTable();
    incof();
} else { disabled(); }