Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: fc8d8dcd19
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 75 lines (67 sloc) 2.21 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
<?php
$funct = $_REQUEST['funct']; //Functions of the script to perform (display messages/set status)
$message = $_REQUEST['message']; //Request the user's message

if ($funct == "eagELNZDYsp") //Display Messages Passkey
{
echo '<html>
<head>
<title>Messages</title>
<script language="JavaScript">
<!--
var sURL = unescape(window.location.pathname);
function doLoad()
{
setTimeout( "refresh()", 2*1000 );
}
function refresh()
{
window.location.reload(true);
}
//-->
</script>
</head>
<body bgcolor="#9BD1FA" onload="doLoad()">
<a href="?funct=eagNYELZDsp"><font size="1">Disable COJ Monitor</font></a><font size="1"> | </font><a href="?funct=eagYNLZDEsp"><font size="1">Enable COJ Monitor</font></a>
<br>';
include 'db/mon.txt';
echo '</body></html>';
}
elseif ($funct == "eagNYELZDsp") //Disable Monitor Passkey
{
echo 'Disabling Monitor.';
$open_file = fopen("db/mons.txt", "w");
fputs($open_file, '<font color="red">disabled</font>');
fclose($open_file);
}
elseif ($funct == "eagYNLZDEsp") //Enable Monitor Passkey
{
echo 'Enabling Monitor.';
$open_file = fopen("db/mons.txt", "w");
fputs($open_file, '<font color="green">enabled</font>');
fclose($open_file);
}
else
{
if ($message != "" && strip_tags($message) != "" && $message != " ") //Try and stop most blank messages
{
// Read message into an array
@$message_array = file("db/mon.txt");

// Compile the string
for ($counter = 0; $counter < 10; $counter++) {
$old_messages .= $message_array[$counter]; }

// Format our message
$time = date("g:ia");//What time is it?
$new_message = "<font size='7'>" . $time . "]" . strip_tags($message) . "</font><br>\n"; //Create our new Message

// Opens file for writing and truncates file length to zero.
$output_file = fopen("db/mon.txt", "w");

// Add the message
fputs($output_file, stripslashes($new_message));

// Add older lines
fputs($output_file, $old_messages);

// Close the file
fclose($output_file);
}

// HTML Code
echo '<body><center><form action="?" method="post"><input size=60 type="text" name="message" value="Message"><input type="submit" value="Send"></form></center></body>';
}
?>
Something went wrong with that request. Please try again.