function notify_status($new_status) { global $mysql; $bid = $_POST['bid']; $bug_date = $_POST['bug_date']; $bug = $_POST['bug']; $from = "SYSTEM"; $to = $_POST['name']; $charid = getPlayerID($_POST['name']); $subject = "Bug Report Status Update"; $note = $_POST['optional_note']; $body = "This is a system generated message to notify you that the status of your bug report has changed.\nDo not reply to this message.\n\nBug ID: " . $bid . "\nNew Status: " . $new_status . "\nBug Date: " . $bug_date . "\nBug: " . $bug; if ($note) { $body .= "\nAdmin Note: " . $note; } $query = "INSERT INTO mail (`charid`,`timestamp`,`from`,`subject`,`body`,`to`,`status`) VALUES ({$charid},UNIX_TIMESTAMP(NOW()),\"{$from}\",\"{$subject}\",\"{$body}\",\"{$to}\",1)"; $mysql->query_no_result($query); }
echo $x % 2 == 0 ? "BBBBBB" : "AAAAAA"; ?> "> <td align="center" width="5%"><?php echo $v['hid']; ?> </td> <td align="center" width="10%"><a href="index.php?editor=account&acctid=<?php echo getAccountID($v['account']); ?> "><?php echo $v['account']; ?> </a></td> <td align="center" width="15%"><a href="index.php?editor=player&playerid=<?php echo getPlayerID($v['name']); ?> "><?php echo $v['name']; ?> </a></td> <td align="center" width="15%"><?php echo $v['zone'] ? $v['zone'] : "N/A"; ?> </td> <td align="center" width="20%"><?php echo $v['date']; ?> </td> <td align="center" width="25%"><?php echo substr($v['hacked'], 0, 23);
function send_message() { global $mysql; $subject = $_POST['subject']; $body = $_POST['body']; $charid = getPlayerID($_POST['to_text']); $to = $_POST['to_text']; $from = $_POST['from_text']; $query = "INSERT INTO mail (`charid`,`timestamp`,`from`,`subject`,`body`,`to`,`status`) VALUES ({$charid},UNIX_TIMESTAMP(NOW()),\"{$from}\",\"{$subject}\",\"{$body}\",\"{$to}\",1)"; $mysql->query_no_result($query); }
foreach ($hackers as $hackers => $v) { ?> <tr bgcolor="#<?php echo $x % 2 == 0 ? "BBBBBB" : "AAAAAA"; ?> "> <td align="center" width="5%"><?php echo $v['hid']; ?> </td> <td align="center" width="10%"><?php echo getAccountID($v['account']) ? "<a href=\"index.php?editor=account&acctid=" . getAccountID($v['account']) . "\">" . $v['account'] . "</a>" : $v['account']; ?> </td> <td align="center" width="15%"><?php echo getPlayerID($v['name']) ? "<a href=\"index.php?editor=player&playerid=" . getPlayerID($v['name']) . "\">" . $v['name'] . "</a>" : $v['name']; ?> </td> <td align="center" width="15%"><?php echo $v['zone'] ? $v['zone'] : "N/A"; ?> </td> <td align="center" width="20%"><?php echo $v['date']; ?> </td> <td align="center" width="25%"><a title="<?php echo $v['hacked']; ?> "><?php echo substr($v['hacked'], 0, 23);
<td width="5%"> </td> </tr> <?php $x = 0; foreach ($players as $player) { ?> <tr bgcolor="#<?php echo $x % 2 == 0 ? "BBBBBB" : "AAAAAA"; ?> "> <td align="center"><?php echo $player['id']; ?> </td> <td align="center"><a href="index.php?editor=player&playerid=<?php echo getPlayerID($player['name']); ?> "><?php echo $player['name']; ?> </a></td> <td align="center"><a href="index.php?editor=account&acctid=<?php echo $player['account_id']; ?> "><?php echo getAccountName($player['account_id']); ?> </a></td> <td align="center"><?php echo $classes[$player['class']]; ?>
<?php include_once "GCM_Loader.php"; $db = new BaseDB(); $gameName = $_REQUEST['gameName']; if (isset($_REQUEST['email'])) { $email = $_REQUEST['email']; } else { $email = ''; } $gcmRegistrationId = $_REQUEST['gcmRegistrationId']; $clanID = $_REQUEST['clanID']; $retArray = array(); // Does player exist in the table $exist = doesPlayerExist($gameName, $clanID); $playerID = getPlayerID($gameName, $clanID); if ($playerID === null) { echo json_encode([$retArray = array("responseOK" => false, "responseMessage" => "No such player")]); goto EndOfFile; } if ($exist === true) { // Update the existing record $sql = "\n UPDATE gcm_users\n SET email = '{$email}', gcm_regid = '{$gcmRegistrationId}'\n WHERE game_name = '{$gameName}'\n "; $result = $db->dbQuery($sql); if ($result == false) { echo json_encode([$retArray = array("responseOK" => false, "responseMessage" => dbGetErrorMsg())]); } else { echo json_encode(array($retArray = array("responseOK" => true, "responseMessage" => 'Record Updated Successfully'))); } } else { // Create a new record
include 'view/loginSplash.php'; } } else { if ($action == 'create') { include 'view/createUser.php'; } else { if ($action == 'create_user') { $playerName = filter_input(INPUT_POST, 'username'); $playerPassword = filter_input(INPUT_POST, 'password'); $value = checkUserName($playerName); if ($value[0] == 1) { $create_error = 'Username is already in use. Please try another name.'; include 'view/createUser.php'; } else { addUser($playerName, $playerPassword); $value2 = getPlayerID($playerName, $playerPassword); $_SESSION['id'] = $value2[0]; addPuzzles($_SESSION['id']); include 'view/loginSplash.php'; } } else { if ($action == 'logout') { $login_error = 'Thank you for playing. You have successfully logged out.'; include 'view/login.php'; } else { if ($action == 'delete_splash') { include 'view/delete_user.php'; } else { if ($action == 'delete_user') { $playerID = $_SESSION['id']; deleteUser($playerID);
<tr> <td align="center"><strong><?echo ($sort == 1) ? "ID <img src='images/sort_red.bmp' border='0' width='8' height='8'/>" : "<a href='index.php?editor=player&sort=1" . (($filter['status'] == "on") ? $filter['url'] : "") . "'>ID <img src='images/sort_green.bmp' border='0' width='8' height='8' title='Sort by ID'/></a>";?></strong></td> <td align="center"><strong><?echo ($sort == 2) ? "Name <img src='images/sort_red.bmp' border='0' width='8' height='8'/>" : "<a href='index.php?editor=player&sort=2" . (($filter['status'] == "on") ? $filter['url'] : "") . "'>Name <img src='images/sort_green.bmp' border='0' width='8' height='8' title='Sort by Name'/></a>";?></strong></td> <td align="center"><strong><?echo ($sort == 3) ? "Account <img src='images/sort_red.bmp' border='0' width='8' height='8'/>" : "<a href='index.php?editor=player&sort=3" . (($filter['status'] == "on") ? $filter['url'] : "") . "'>Account <img src='images/sort_green.bmp' border='0' width='8' height='8' title='Sort by Account'/></a>";?></strong></td> <td align="center"><strong><?echo ($sort == 4) ? "Class <img src='images/sort_red.bmp' border='0' width='8' height='8'/>" : "<a href='index.php?editor=player&sort=4" . (($filter['status'] == "on") ? $filter['url'] : "") . "'>Class <img src='images/sort_green.bmp' border='0' width='8' height='8' title='Sort by Class'/></a>";?></strong></td> <td align="center"><strong><?echo ($sort == 5) ? "Level <img src='images/sort_red.bmp' border='0' width='8' height='8'/>" : "<a href='index.php?editor=player&sort=5" . (($filter['status'] == "on") ? $filter['url'] : "") . "'>Level <img src='images/sort_green.bmp' border='0' width='8' height='8' title='Sort by Level'/></a>";?></strong></td> <td width="5%"> </td> </tr> <?$x=0; foreach($players as $player):?> <tr bgcolor="#<? echo ($x % 2 == 0) ? "BBBBBB" : "AAAAAA";?>"> <td align="center"><?php echo $player['id']; ?> </td> <td align="center"><a href="index.php?editor=player&playerid=<?echo getPlayerID($player['name'])?>"><?php echo $player['name']; ?> </a></td> <td align="center"><a href="index.php?editor=account&acctid=<?php echo $player['account_id']; ?> "><?echo getAccountName($player['account_id'])?></a></td> <td align="center"><?php echo $classes[$player['class']]; ?> </td> <td align="center"><?php echo $player['level']; ?> </td>