$Error = sprintf(L_PRIV_AWAY, special_char($Cmd[2], $Latin1)); } } else { // end R Dickow /away command modification addition. AddMessage(stripslashes($Cmd[3]), $T, $UR, $U, $C, $Cmd[2], $Read, $R, $Charset); if (stristr(mb_convert_case(trim($Cmd[2]), MB_CASE_LOWER, $Charset), mb_convert_case(C_BOT_NAME, MB_CASE_LOWER, $Charset))) { include "lib/bot_priv.lib.php"; } $IsCommand = true; $RefreshMessages = true; } } elseif (stristr(mb_convert_case(trim($Cmd[2]), MB_CASE_LOWER, $Charset), mb_convert_case(C_BOT_NAME, MB_CASE_LOWER, $Charset))) { $Error = sprintf(L_NOT_ONLINE, special_char($Cmd[2], $Latin1)); } else { $Read = "Neww"; AddMessage(stripslashes($Cmd[3]) . " (Offline)", '1', 'Offline PMs', $U, $C, $Cmd[2], $Read, $R, $Charset); $IsCommand = true; $RefreshMessages = true; if (C_PRIV_POPUP) { $Error = sprintf(L_PRIV_NOT_ONLINE, special_char($Cmd[2], $Latin1)); } else { $Error = sprintf(L_NOT_ONLINE, special_char($Cmd[2], $Latin1)); } } if (C_EN_STATS) { $DbLink->query("UPDATE " . C_STS_TBL . " SET pms_sent=pms_sent+1 WHERE stat_date=FROM_UNIXTIME(last_in,'%Y-%m-%d') AND room='{$R}' AND username='******'"); } $DbLink->close(); unset($Found, $b); $M1 = $Cmd[0]; }
<?php if (version_compare(PHP_VERSION, '5') >= 0) { $Cmd[2] = addslashes(str_replace(" ", "%20", $Cmd[2])); //require EmbeVi Class include_once 'plugins/video/embevi.class.php'; //instantiate EmbeVi class $embevi = new EmbeVi(); $embevi->setAcceptShortUrl(); $embevi->setAcceptExtendedSupport(); if ($embevi->parseUrl($Cmd[2])) { } else { $Error = L_NO_VIDEO; } } if (!isset($Error)) { if (C_ALLOW_VIDEO) { $DbLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ('{$T}', '{$R}', 'SYS video', '', '" . time() . "', '{$U}', '{$Cmd['2']}', '', '')"); if (C_EN_STATS) { $DbLink->query("UPDATE " . C_STS_TBL . " SET vids_posted=vids_posted+1 WHERE stat_date=FROM_UNIXTIME(last_in,'%Y-%m-%d') AND room='{$R}' AND username='******'"); } } else { AddMessage($Cmd[2], $T, $R, $U, '', '', '', '', $Charset); if (C_EN_STATS) { $DbLink->query("UPDATE " . C_STS_TBL . " SET urls_posted=urls_posted+1 WHERE stat_date=FROM_UNIXTIME(last_in,'%Y-%m-%d') AND room='{$R}' AND username='******'"); } } $IsCommand = true; $RefreshMessages = true; }
$DbLink->query("SELECT awaystat FROM " . C_USR_TBL . " WHERE username='******'"); if ($DbLink->num_rows() != 0) { list($awaystat) = $DbLink->next_record(); } $DbLink->clean_results(); if ($awaystat == 1) { $Msg = "sprintf(L_BACK, \"" . special_char($U, $Latin1) . "\")"; $time_back = time() - 1; $awaystat = 0; $DbLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ({$T}, '{$R}', 'SYS away', '{$Latin1}', '{$time_back}', '', '" . addslashes($Msg) . "', '', '{$RF}')"); $DbLink->query("UPDATE " . C_USR_TBL . " SET awaystat='0' WHERE username='******'"); if (C_EN_STATS) { $DbLink->query("UPDATE " . C_STS_TBL . " SET seconds_away=seconds_away+(" . time() . "-last_away), longest_away=IF(" . time() . "-last_away < longest_away, longest_away, " . time() . "-last_away), last_away='' WHERE (stat_date=FROM_UNIXTIME(last_away,'%Y-%m-%d') OR stat_date=FROM_UNIXTIME(last_in,'%Y-%m-%d')) AND room='{$R}' AND username='******'"); } } AddMessage(stripslashes($M), $T, $R, $U, $C, "", "", $RF, $Charset); // END Bob Dickow custom code for /away command modification - modified by Ciprian for Plus behaviour.. $RefreshMessages = true; if (C_EN_STATS) { $DbLink->query("UPDATE " . C_STS_TBL . " SET posts_sent=posts_sent+1 WHERE stat_date=FROM_UNIXTIME(last_in,'%Y-%m-%d') AND room='{$R}' AND username='******'"); } if (C_EN_STATS && $IsCommand) { $DbLink->query("UPDATE " . C_STS_TBL . " SET cmds_used=cmds_used+1 WHERE stat_date=FROM_UNIXTIME(last_in,'%Y-%m-%d') AND room='{$R}' AND username='******'"); } } #$DbLink->close(); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML dir="<?php echo $Align == "right" ? "RTL" : "LTR"; ?>
} if ($_POST['update_message']) { $action = 'update'; } if ($_POST['delete_message']) { $action = 'delete'; } if ($_POST['preview_message']) { $action = 'preview'; } if ($_REQUEST['action'] == 'empty') { $action = 'empty'; } // demo mode check ommited here on purpose if ($action == 'add' && strlen($_POST['body_html'])) { if (AddMessage()) { $action_result .= "Message was added.<br>"; } else { $action_result .= "Message was not added.<br>"; } } if (!$demo_mode && $action == 'update' && $_POST['msgs_id'] && strlen($_POST['body_html'])) { if (UpdateMessage()) { $action_result .= "Message was updated.<br>"; } else { $action_result .= "Message was not updated.<br>"; } } if (!$demo_mode && $action == 'delete' && $_POST['msgs_id']) { if (DeleteMessage()) { $action_result .= "Message was deleted.<br>";
<?php if ($status == "a" || $status == "t") { AddMessage(stripslashes($Cmd[2]), $T, $R, 'SYS announce', '', ' *', '', '', $Charset); $M1 = $Cmd[0]; $IsCommand = true; $RefreshMessages = true; } else { $Error = L_NO_ADMIN; }
<?php if (C_ALLOW_MATH) { $math = $Cmd[2]; if (!stristr($math, "<math") && !strstr($math, "\\[") && !strstr($math, "\$\$")) { if (stristr(PHP_OS, 'win')) { $math = "\\[" . $math . "\\]"; } else { $math = "\\\\[" . $math . "\\\\]"; } } if (stristr(PHP_OS, 'win')) { $math = addslashes($math); } // AddMessage($math, $T, $R, 'SYS math', $C, $U, '', '', $Charset); if (!stristr($math, "<math")) { AddMessage($math, $T, $R, 'SYS math', $C, $U, '', '', $Charset); } else { $DbLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ('{$T}', '{$R}', 'SYS math', '', '" . time() . "', '{$U}', '{$math}', '', '')"); } if (C_EN_STATS) { $DbLink->query("UPDATE " . C_STS_TBL . " SET maths_posted=maths_posted+1 WHERE stat_date=FROM_UNIXTIME(last_in,'%Y-%m-%d') AND room='{$R}' AND username='******'"); } $IsCommand = true; $RefreshMessages = true; }
<?php // Match a string in a list function cmd_in($what, $in, $Charset) { $cmds = is_array($in) ? $in : explode(",", $in); for (reset($cmds); $cmd_name = current($cmds); next($cmds)) { if (strcasecmp(mb_convert_case($what, MB_CASE_LOWER, $Charset), mb_convert_case($cmd_name, MB_CASE_LOWER, $Charset)) == 0) { return true; } } return false; } // Check for swear words in the message to be sent if there is one if (trim($Cmd[1]) != "") { $opentag = trim($Cmd[1]) == "rtl" || cmd_in(trim($Cmd[1]), L_CMD_RTL, $Charset) ? "bdo_rtl" : (trim($Cmd[1]) == "ltr" || cmd_in(trim($Cmd[1]), L_CMD_LTR, $Charset) ? "bdo_ltr" : ""); AddMessage($opentag . stripslashes($Cmd[2]), $T, $R, $U, $C, '', '', '', $Charset); } $M1 = $Cmd[0]; $IsCommand = true;
<?php // Check for swear words in the message to be sent if there is one if (trim($Cmd[3]) != "") { if (C_NO_SWEAR) { include "./lib/swearing.lib.php"; $Cmd[3] = checkwords($Cmd[3], false, $Charset); if (C_EN_STATS && isset($Found) && $b > 0) { $DbLink->query("UPDATE " . C_STS_TBL . " SET swears_posted=swears_posted+{$b} WHERE stat_date=FROM_UNIXTIME(last_in,'%Y-%m-%d') AND room='{$R}' AND username='******'"); } unset($Found, $b); } AddMessage(stripslashes($Cmd[3]), $T, $R, $U, $C, '', '', '', $Charset); } $M1 = $Cmd[0]; $IsCommand = true; ?> <SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript"> <!-- if (window.parent.frames['loader'] && !window.parent.frames['loader'].closed) { if (typeof(window.parent.leaveChat) != 'undefined') window.parent.leaveChat = true; window.parent.frames['loader'].close(); }; window.parent.frames['exit'].close_popups(); window.parent.window.location = '<?php echo "{$From}?Ver={$Ver}&L={$L}&U=" . urlencode(stripslashes($U)) . "&O={$O}&ST={$ST}&NT={$NT}&E=" . urlencode(stripslashes($R)) . "&EN={$T}"; ?> '; // --> </SCRIPT>
<?php // Check for swear words in the message if necessary if (C_NO_SWEAR) { include "./lib/swearing.lib.php"; $Cmd[2] = checkwords($Cmd[2], false, $Charset); if (C_EN_STATS && isset($Found) && $b > 0) { $DbLink->query("UPDATE " . C_STS_TBL . " SET swears_posted=swears_posted+{$b} WHERE stat_date=FROM_UNIXTIME(last_in,'%Y-%m-%d') AND room='{$R}' AND username='******'"); } unset($Found, $b); } if (stristr("(mr" . (L_CMD_MR != "" && L_CMD_MR != "L_CMD_MR" ? "|" . str_replace(",", "|", L_CMD_MR) : "") . ")", $Cmd[1])) { $DbLink->query("SELECT gender FROM " . C_REG_TBL . " WHERE username='******' LIMIT 1"); list($gender) = $DbLink->next_record(); $DbLink->clean_results(); if ($gender == 1) { $salutation = 'L_HELP_MR'; } elseif ($gender == 2) { $salutation = 'L_HELP_MS'; } else { $salutation = "* *" . $U; } } else { $salutation = $U; } $post = "<B>* " . $salutation . "</B> " . stripslashes($Cmd[2]); AddMessage($post, $T, $R, $U, $C, $Private, '', '', $Charset); $M1 = $Cmd[0]; $IsCommand = true; $RefreshMessages = true;
/** * Use this function use for start script working * Main function not return value. */ function Main() { if (isset($_REQUEST['update']) == true) { Update(); exit; } if (isset($_REQUEST['post_message']) === true || strlen($_REQUEST['post_message']) > 0) { PostMessage(); return; } if (isset($_REQUEST['clear_message']) === true) { ClearMessage(); return; } if (isset($_REQUEST['add_message']) === true || strlen($_REQUEST['add_message']) > 0) { AddMessage(); return; } }