Ejemplo n.º 1
0
* @copyright 2015
* @terms any use of this script without a legal license is prohibited
* all the content of Boomchat is the propriety of BoomCoding and Cannot be 
* used for another project.
*/
$load_setting = 'timezone, allow_theme, default_theme, language';
$load_user = '******';
require_once "config_lite.php";
require_once "content_process.php";
if ($user["user_access"] == 4) {
    $target = $mysqli->real_escape_string(trim($_GET['target']));
    $hunter = $user["user_name"];
    $log = $mysqli->query("SELECT * FROM ( SELECT * FROM `private` WHERE  `hunter` = '{$hunter}' AND `target` = '{$target}'  OR `hunter` = '{$target}' AND `target` = '{$hunter}' ORDER BY `id` DESC LIMIT 20) AS log ORDER BY `time` ASC");
    $mysqli->query("UPDATE `private` SET `status` = 1 WHERE `hunter` = '{$target}' AND `target` = '{$hunter}'");
    if ($log->num_rows > 0) {
        while ($chat = $log->fetch_assoc()) {
            $message = emoprocess($chat['message']);
            $ptime = date("m/j G:i", $chat['time']);
            $message = emoticon(linking($message, $icon_set));
            if ($chat['hunter'] == $user['user_name']) {
                echo "<li class=\"hunter_private\"><p>{$message}</p><p class=\"ptime\">{$ptime}</p></li>\n";
            } else {
                echo "<li class=\"target_private\"><p>{$message}</p><p class=\"ptime2\">{$ptime}</p></li>\n";
            }
        }
    } else {
        echo "<li>{$emptyprivate}</li>";
    }
} else {
    echo "<li>{$lang_error}</li>";
}
Ejemplo n.º 2
0
$personaldata = mysqli_fetch_array($personalsql);
$personalname = $personaldata['Username'];
$personalmafia = $personaldata['Mafia'];
$id = $_GET['id'];
$id = htmlentities($id, ENT_QUOTES);
$usersql = mysqli_query($con, "SELECT * FROM Users WHERE ID='{$id}'");
$userrows = mysqli_num_rows($usersql);
$userdata = mysqli_fetch_array($usersql);
$username = $userdata['Username'];
$userimage = $userdata['Image'];
$usergender = $userdata['Gender'];
$userlevel = $userdata['Level'];
$usermafia = $userdata['Mafia'];
$userstatus = $userdata['Status'];
$userinfo = $userdata['Info'];
$userinfo = emoticon($userinfo);
$userseen = $userdata['Seen'];
$usermembership = $userdata['Membership'];
$time = time();
if ($usermembership >= $time) {
    $usermembership = "Activated";
} else {
    $usermembership = "Not Activated";
}
$propertiessql = mysqli_query($con, "SELECT ID FROM Properties WHERE Owner='{$username}'");
$properties = mysqli_num_rows($propertiessql);
$propertymax = $userlevel / 4;
$propertymax = floor($propertymax);
$mafiasql = mysqli_query($con, "SELECT * FROM Mafias WHERE Name='{$usermafia}'");
$mafiadata = mysqli_fetch_array($mafiasql);
$mafiaid = $mafiadata['ID'];
Ejemplo n.º 3
0
<?php 
include "emoticon.php";
$cookie = $_COOKIE['PHPSESSID'];
$mysql = mysqli_query($con, "SELECT * FROM Users WHERE Cookie='{$cookie}'");
$mydata = mysqli_fetch_array($mysql);
$mymafia = $mydata['Mafia'];
$id = $_GET['id'];
$id = htmlentities($id, ENT_QUOTES);
$wikisql = mysqli_query($con, "SELECT * FROM Wiki WHERE ID='{$id}'");
$wikirows = mysqli_num_rows($wikisql);
if ($wikirows > 0) {
    $wikidata = mysqli_fetch_array($wikisql);
    $wikitopic = $wikidata['Topic'];
    $wikiinfo = $wikidata['Info'];
    $wikiinfo = nl2br($wikiinfo);
    $wikiinfo = emoticon($wikiinfo);
    $wikiposter = $wikidata['Editor'];
    $wikiposterid = $wikidata['EditorID'];
    $wikitime = $wikidata['Time'];
    print '<h1>' . $wikitopic . '</h1>

<hr>

<p>' . $wikiinfo . '</p>
<hr>
<p>Last edit by: <a href="userprofile.php?id=' . $wikiposterid . '">' . $wikiposter . '</a> on ' . $wikitime . '</p>
<p><a href="editwiki.php?id=' . $id . '">[Edit]</a></p>';
    if ($mymafia == "Game Administration") {
        print '<p><a href="deletewiki.php?id=' . $id . '">[Delete]</a></p>';
    }
} else {
Ejemplo n.º 4
0
<?php

include "connect.php";
include "emoticon.php";
$id = $_GET['id'];
$id = htmlentities($id, ENT_QUOTES);
$reply = $_POST['reply'];
$reply = htmlentities($reply, ENT_QUOTES);
$reply = emoticon($reply);
$cookie = $_COOKIE['PHPSESSID'];
$mysql = mysqli_query($con, "SELECT * FROM Users WHERE Cookie='{$cookie}'");
$mydata = mysqli_fetch_array($mysql);
$myname = $mydata['Username'];
$myid = $mydata['ID'];
$forumsql = mysqli_query($con, "SELECT * FROM Forums WHERE Type='Topic' AND ID='{$id}'");
$forumrows = mysqli_num_rows($forumsql);
$forumdata = mysqli_fetch_array($forumsql);
$forumtopic = $forumdata['Topic'];
if (!empty($reply)) {
    if ($forumrows > 0) {
        mysqli_query($con, "INSERT INTO Forums (Topic, Text, Poster, PosterID) VALUES ('{$forumtopic}', '{$reply}', '{$myname}', '{$myid}')");
        header("Location: readforum.php?id=" . $id);
    } else {
        header("Location: replytoforumresult.php?result=fail&reason=id");
    }
} else {
    header("Location: replytoforumresult.php?result=fail&reason=blank");
}
Ejemplo n.º 5
0
$cookie = $_COOKIE['PHPSESSID'];
$personalsql = mysqli_query($con, "SELECT * FROM Users WHERE Cookie='{$cookie}'");
$personaldata = mysqli_fetch_array($personalsql);
$personalname = $personaldata['Username'];
$personalmafia = $personaldata['Mafia'];
$id = $_GET['id'];
$id = htmlentities($id, ENT_QUOTES);
$mafiasql = mysqli_query($con, "SELECT * FROM Mafias WHERE ID='{$id}'");
$mafiarows = mysqli_num_rows($mafiasql);
$mafiadata = mysqli_fetch_array($mafiasql);
$mafianame = $mafiadata['Name'];
$mafiaimage = $mafiadata['Image'];
$mafialeader = $mafiadata['Leader'];
$mafiamembers = $mafiadata['Members'];
$mafiainfo = $mafiadata['Info'];
$mafiainfo = emoticon($mafiainfo);
$mafiacolor = $mafiadata['Color'];
$propertysql = mysqli_query($con, "SELECT * FROM Properties WHERE Mafia='{$mafianame}' AND MafiaID='{$id}'");
$properties = mysqli_num_rows($propertysql);
$usersql = mysqli_query($con, "SELECT * FROM Users WHERE Mafia='{$mafianame}' AND Username!='{$mafialeader}'");
$leadersql = mysqli_query($con, "SELECT * FROM Users WHERE Mafia='{$mafianame}' AND Username='******'");
$leaderdata = mysqli_fetch_array($leadersql);
$leaderid = $leaderdata['ID'];
if ($mafiarows > 0) {
    print '<h1>' . $mafianame . '</h1>
<hr>
<div class="profilecontent">
<img src="' . $mafiaimage . '" height="300" width="300">
<table id="full">
<tr>
<td><p>Leader: </p></td>
Ejemplo n.º 6
0
if (!empty($mymafia)) {
    $colorsql = mysqli_query($con, "SELECT Color FROM Mafias WHERE Name='{$mymafia}'");
    $colordata = mysqli_fetch_array($colorsql);
    $namecolor = $colordata['Color'];
} else {
    $namecolor = "#FFFFFF";
}
$jcolorsql = mysqli_query($con, "SELECT Color FROM Mafias WHERE Name='Game Administration'");
$jcolordata = mysqli_fetch_array($jcolorsql);
$jcolor = $jcolordata['Color'];
$message = $_GET['message'];
if ($myrows != 1) {
    $message = '';
}
$message = htmlentities($message, ENT_QUOTES);
$message = emoticon($message);
$me = explode("/me ", $message);
if ($me[0] == "" && $message != "") {
    $message = '* ' . $myname . ' ' . str_replace("/me ", "", $message) . ' *';
    $type = "/me";
}
$afk = explode("/afk", $message);
if ($afk[0] == "" && $message != "") {
    $message = '';
    mysqli_query($con, "DELETE FROM Mafia_Chat_Users WHERE NameID='{$myid}'");
}
$level = explode("/level", $message);
if ($level[0] == "" && $message != "") {
    $find = str_replace("/level", "", $message);
    if ($find == "") {
        if ($mymafia != "Game Administration") {
Ejemplo n.º 7
0
<?php

include "connect.php";
include "emoticon.php";
$cookie = $_COOKIE['PHPSESSID'];
$result = mysqli_query($con, "SELECT * FROM Users WHERE Cookie='{$cookie}' AND Mafia='Game Administration'");
$data = mysqli_fetch_array($result);
$datarows = mysqli_num_rows($result);
$poster = $data['Username'];
$poster = htmlentities($poster, ENT_QUOTES);
$post = $_POST['post'];
$post = htmlentities($post, ENT_QUOTES);
$post = emoticon($post);
if ($datarows > 0) {
    mysqli_query($con, "INSERT INTO News (Poster, Post) VALUES ('{$poster}', '{$post}')");
}
mysqli_close($con);
header("Location: index.php");
Ejemplo n.º 8
0
<?php

include "connect.php";
include "emoticon.php";
$topic = $_POST['topic'];
$topic = htmlentities($topic, ENT_QUOTES);
$text = $_POST['text'];
$text = htmlentities($text, ENT_QUOTES);
$text = emoticon($text);
$cookie = $_COOKIE['PHPSESSID'];
$mysql = mysqli_query($con, "SELECT * FROM Users WHERE Cookie='{$cookie}'");
$mydata = mysqli_fetch_array($mysql);
$myname = $mydata['Username'];
$myid = $mydata['ID'];
$existsql = mysqli_query($con, "SELECT * FROM Forums WHERE Topic='{$topic}'");
$existrows = mysqli_num_rows($existsql);
if (!empty($topic) && !empty($text)) {
    if ($existrows == 0) {
        mysqli_query($con, "INSERT INTO Forums (Type, Topic, Text, Poster, PosterID) VALUES ('Topic', '{$topic}', '{$text}', '{$myname}', '{$myid}')");
        $newforum = mysqli_query($con, "SELECT * FROM Forums WHERE Topic='{$topic}'");
        $newforumdata = mysqli_fetch_array($newforum);
        $newforumid = $newforumdata['ID'];
        header("Location: readforum.php?id=" . $newforumid);
    } else {
        header("Location: addforumresult.php?result=fail&reason=exists");
    }
} else {
    header("Location: addforumresult.php?result=fail&reason=blank");
}
Ejemplo n.º 9
0
<center>

<h1>Wiki Edit Requests</h1>

<?php 
include "emoticon.php";
$editsql = mysqli_query($con, "SELECT * FROM Wiki_Edits");
$editrows = mysqli_num_rows($editsql);
if ($editrows > 0) {
    while ($editdata = mysqli_fetch_array($editsql)) {
        $edittype = $editdata['Type'];
        $edittopic = $editdata['Topic'];
        $editinfo = $editdata['Info'];
        $editinfo = nl2br($editinfo);
        $editinfo = emoticon($editinfo);
        $editor = $editdata['Editor'];
        $editorid = $editdata['EditorID'];
        $edittime = $editdata['Time'];
        $editid = $editdata['ID'];
        if ($edittype == "Add") {
            print '<hr><p><a href="userprofile.php?id=' . $editorid . '">' . $editor . '</a> would like to add a wiki called "' . $edittopic . '" with this information:<br><br>' . $editinfo . '<br><br><a href="wikireviewaction.php?action=allow&id=' . $editid . '">[Allow]</a> or <a href="wikireviewaction.php?action=deny&id=' . $editid . '">[Deny]</a></p>';
        } elseif ($edittype == "Edit") {
            print '<hr><p><a href="userprofile.php?id=' . $editorid . '">' . $editor . '</a> would like to edit the wiki called "' . $edittopic . '" with this information:<br><br>' . $editinfo . '<br><br><a href="wikireviewaction.php?action=allow&id=' . $editid . '">[Allow]</a> or <a href="wikireviewaction.php?action=deny&id=' . $editid . '">[Deny]</a></p>';
        } else {
            print 'ERROR';
        }
    }
} else {
    print '<hr><p>No pending requests.</p>';
}
?>
Ejemplo n.º 10
0
<?php

include "connect.php";
include "emoticon.php";
$ad = $_POST['ad'];
$ad = htmlentities($ad, ENT_QUOTES);
$ad = emoticon($ad);
$time = $_POST['time'];
$time = htmlentities($time, ENT_QUOTES);
$method = $_POST['method'];
$method = htmlentities($method, ENT_QUOTES);
$enddate = date("Y-m-d H:i:s", strtotime("+" . $time . " " . $method));
if ($method == "hours") {
    $time = $time * 60 * 60;
} elseif ($method == "days") {
    $time = $time * 60 * 60 * 24;
} elseif ($method == "weeks") {
    $time = $time * 60 * 60 * 24 * 7;
} else {
    header("Location: postad.php");
}
$currenttime = time();
$timerstart = $currenttime + $time;
$cookie = $_COOKIE['PHPSESSID'];
$mysql = mysqli_query($con, "SELECT Username, ID, Mafia FROM Users WHERE Cookie='{$cookie}'");
$mydata = mysqli_fetch_array($mysql);
$myname = $mydata['Username'];
$myid = $mydata['ID'];
$mymafia = $mydata['Mafia'];
if ($mymafia == "Game Administration") {
    if (!empty($ad)) {