Example #1
0
 public function find()
 {
     if (!$this->uri->segment(3)) {
         show_404(current_url(), FALSE);
     } else {
         if ($this->data['Treasure'] = $this->treasure_model->get_by('md5', $this->uri->segment(3))) {
             if (isFound($this->data['Treasure']->id, $this->session->userdata('id'))) {
                 $found = TRUE;
             } else {
                 $found = FALSE;
                 if (isLoggedIn()) {
                     if (!isBanned($this->session->userdata('id'))) {
                         if (!isAdmin()) {
                             $this->mytreasure_model->insert(array('pirate' => $this->session->userdata('id'), 'treasure' => $this->data['Treasure']->id, 'time' => time()));
                         }
                     }
                 }
             }
             $this->data['found'] = $found;
             $this->template->write_view('content', 'views/treasure/find', $this->data);
             $this->template->render();
         } else {
             show_404(current_url(), FALSE);
         }
     }
 }
include 'includes/config.php';
include 'includes/functions.php';
// Display trader history
$sql3 = "   SELECT steamid64, items_sold, COUNT(*) as amount, poptabs, servername\n            FROM trader_log\n            WHERE time_sold > NOW() - INTERVAL 7 DAY\n            AND steamid64 <> ''\n            GROUP BY steamid64,items_sold\n            ORDER BY COUNT(*) DESC";
$result3 = mysqli_query($db_traders, $sql3);
if (mysqli_num_rows($result3) > 0) {
    echo "<hr><h2>POTENTIAL DUPERS - All Items sold (last 14 days)</h2><hr>";
    echo '<table class="tftable" border="1"">
            <tr>
                <td style="width:250px;">Player</td>
                <td style="width:150px;">Server</td>
                <td>Items</td>               
                <td style="width:150px;">Amount</td>             
            </tr>';
} else {
    echo "<hr><h2>There is no trader history</h2><hr>";
}
while ($row3 = mysqli_fetch_object($result3)) {
    $steamid64 = $row3->steamid64;
    $items_sold = str_replace('","', '", "', $row3->items_sold);
    $poptabs = $row3->poptabs;
    $amount = $row3->amount;
    $servername = $row3->servername;
    $isBanned = isBanned($steamid64, $servername, $ServerList);
    if ($isBanned == 'false' && $amount >= 8) {
        // get the players name
        $playerName = getPlayersName($steamid64, $servername, $ServerList);
        echo '<tr>' . '<td valign=top style="width:250px;"><a href="playersearch.php?server=' . $servername . '&searchtype=uid&searchfield=' . $steamid64 . '">' . $playerName . '</a></td>' . '<td valign=top>' . ucwords($servername) . '</td>' . '<td valign=top>' . $items_sold . '</td>' . '<td valign=top align=right style="width:50px;">' . $amount . '</td>' . '</tr>';
    }
}
echo "</table>";
$username = "******";
$password = "******";
$dbname = "dev";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
$error = false;
$error_message = "";
$data = json_decode(file_get_contents('php://input'), true);
$user = $data["username"];
$comment = $data["comment"];
$pid = $data["pid"];
$channelname = $data["channelname"];
$channelowner = $data["channelowner"];
if (isBanned($conn, $user, $channelname, $channelowner)) {
    $error = true;
    $error_message = "You are banned from posting in this channel";
} else {
    if (strlen($comment) == 0) {
        $error = true;
        $error_message = "Your comment cannot be empty";
    } else {
        if (strlen($comment) > 256) {
            $error = true;
            $error_message = "Your comment cannot be longer than 256 characters";
        } else {
            createComment($conn, $user, $comment, $pid, $channelname, $channelowner);
            $time = getCommentTime($conn, $user, $pid, $channelname, $channelowner);
        }
    }
Example #4
0
/**
 * Ban user
 * @param $input
 */
function shoutboxBanUser($input)
{
    global $lang, $db, $mybb, $cache;
    $lang->load('dvz_reports');
    //Validate XSRF token
    if (verify_post_check($input['my_post_key'])) {
        //Set UID from Input
        $uid = $input['uid'];
        //User already banned
        if (isBanned($uid)) {
            redirect('modcp.php?action=shoutbox_ban', $lang->already_banned);
        }
        if ($input['reason'] == 'different') {
            if (!$input['reason_input']) {
                redirect('modcp.php?action=shoutbox_ban', $lang->no_reason);
            } else {
                $reason = $input['reason_input'];
            }
        } else {
            $reason = $input['reason'];
        }
        $data = array('uid' => $db->escape_string($uid), 'reason' => $db->escape_string($reason), 'unbantime' => getUnban($input['length']), 'banned_by' => $db->escape_string($mybb->user['uid']));
        //Insert new ban
        $db->insert_query('dvz_reports_banned', $data);
        //Log action
        $logdata = array('uid' => $uid, 'username' => $mybb->input['username']);
        log_moderator_action($logdata, $lang->banned_user);
        //Redirect
        redirect('modcp.php?action=shoutbox_ban', $lang->ban_succesfull);
    }
}
Example #5
0
<h1>Treasure Found</h1>
<?php 
if (isBanned($this->session->userdata('id')) && isLoggedIn()) {
    ?>
    <div class="alert">
        <h3 class="alert-heading">Information</h3>
        <p>
            Your account has been suspended. You may still use this application, 
            however you will be unable to find new pieces of treasure and (at the discretion of staff) 
            your existing pieces of treasure may be removed from you. 
            Please contact a member of <?php 
    echo TEAMNAME;
    ?>
 for more information.
        </p>
    </div>
<?php 
}
if ($found == TRUE) {
    ?>
    <div class="alert">
        <a href="#" data-dismiss="alert" class="close">&times;</a>
        <h3 class="alert-heading">Information</h3>
        <p>You Have Already Discovered This Piece Of Treasure</p>
    </div>
<?php 
}
?>

<?php 
if (!isLoggedIn()) {
Example #6
0
    print "<br><br><strong>Sorry but HiQ FormMail is not designed to be used in this manner";
    print "<br>TERMINATED</strong><br>";
    exit;
}
// Process config file
$configname = getPostValue('configfilename');
if ($configname == '') {
    $configname = "HiQFMConfg";
}
include './class.HiQFMConfig.php';
$config = new FormConfiguration($configname);
$email = trim(getPostValue('email'));
$thebanned = $config->getDirective('banned');
if ($email != '') {
    if ($thebanned[0] != '') {
        isBanned($thebanned, $email);
    }
    if (!eregi('^[_\\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\\.)+[a-z]{2,6}$', $email)) {
        $errorlist .= "<BR><b>The email address ({$email}) is not valid.</b><BR>";
    }
}
// Process recipient information
//$config->dump ();
$temp = getPostValue('SelectRecipient_Special');
// Adding SelectRecipient - scalar
$selectedMultiple = getPostValue('SelectRecipient');
// Adding SelectRecipient - array
$recipient_in[0] = '';
$incount = 0;
if (!($temp == '' && $selectedMultiple == '')) {
    if (is_array($selectedMultiple)) {
Example #7
0
function checkBanned() {
	global $reqType;
	$ip = getIP();
		
	if (isBanned($ip)) {
		if (isAdmin()) {
			sysShout('Looks like someone tried to ban you! You\'re an admin though, so I\'ll take the liberty of unbanning you. You see, if all the admins are banned then the site owner\'s in a bit of a pesky situation, as he has to go and clear the ban file manually. So it\'s for your own good, I assure you.');
			unban($ip);
		}
		
		if ($reqType == 'init') {
			sysShout('You\'re banned.');
		}
		exit;
	}
}
Example #8
0
    ?>
                </td> 
                <td class="treasure"><?php 
    echo $Mytreasure->treasures;
    ?>
</td>
                <td><?php 
    echo date(FRIENDLYDATEFORMAT, $Mytreasure->signup);
    ?>
</td> 
                <td>
                    <div class="btn-group">
                        <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"><i class="icon-user"></i> Pirate <span class="caret"></span></a>
                        <ul class="dropdown-menu pull-right">
                            <?php 
    if (isBanned($Mytreasure->p_id)) {
        ?>
                                <li><a href="" data-id="<?php 
        echo $Mytreasure->p_id;
        ?>
" class="unban"><i class="icon-ok"></i> Un-Ban</a></li>
                            <?php 
    } else {
        ?>
                                <li><a href="" data-id="<?php 
        echo $Mytreasure->p_id;
        ?>
" class="ban"><i class="icon-ban-circle"></i> Ban</a></li>
                            <?php 
    }
    ?>