} else { $is_pb_ban = false; $duration_form = cleanvar($_POST['duration']); $time = cleanvar($_POST['time']); emptyInput($time, 'time frame'); emptyInput($duration_form, 'penalty duration'); } $reason = cleanvar($_POST['reason']); $client_id = cleanvar($_POST['cid']); $pbid = cleanvar($_POST['c-pbid']); $c_name = cleanvar($_POST['c-name']); $c_ip = cleanvar($_POST['c-ip']); // check for empty reason emptyInput($reason, 'ban reason'); ## Check sent client_id is a number ## if (!isID($client_id)) { sendBack('Invalid data sent, ban not added'); } ## Sort out some ban information if ($is_pb_ban) { // if the ban is perma ban $type = 'Ban'; $time_expire = '-1'; $duration = 0; } else { $type = 'TempBan'; // NOTE: the duration in the DB is done in MINUTES and the time_expire is written in unix timestamp (in seconds) $duration = penDuration($time, $duration_form); $duration_secs = $duration * 60; // find the duration in seconds $time_expire = time() + $duration_secs;
<?php require '../lib/book_func.php'; require '../lib/check.php'; $result = 0; $ActType = ""; $Key0 = ""; $Key1 = ""; $Key2 = ""; $Key3 = ""; $Key21 = ""; $Key22 = ""; //IDとパスワードチェック if (!isID($_POST["KEYWORD1"], 40, 1)) { $result = 1; } elseif (!isPW($_POST["KEYWORD2"], 10, 1)) { $result = 1; } else { $ActType = $_POST["ActionType"]; $Key0 = $_POST["KEYWORD0"]; //社員番号 $Key1 = $_POST["KEYWORD1"]; //ID $Key2 = $_POST["KEYWORD2"]; //パスワード $Key3 = $_POST["KEYWORD3"]; //名前 //貸出一覧確認 $obj = new BookModel(); //入力された情報の確認 $result = $obj->GETBorrowUList($ActType, $Key0, $dspBorrowUList);
<?php $auth_name = 'manage_settings'; require '../inc.php'; ## delete server if ($_GET['t'] == 'del') { // get and check the id sent if (isset($_GET['id']) || isID($_GET['id'])) { $sid = $_GET['id']; } else { sendBack('Vital information needed to delete the server was not sent'); } ## check that the form token is corret if (!verifyFormToken('del-server' . $sid, $tokens)) { // verify token ifTokenBad('Deleting a server'); } $result = $dbl->delServer($sid); if (!$result) { sendBack('There was a problem with deleting the server'); } $result = $dbl->delServerUpdateGames($game_id); if (!$result) { sendBack('There was a problem with deleting the server'); } sendGood('The server has been deleted'); exit; // stop - no need to load the rest of the page } ## Check that the form was posted and that the user did not just stumble here ## if (!isset($_POST['server-settings-sub'])) {
$ip = $result[3]; $group = $result[4]; $admin_id = $result[5]; $first_seen = $result[6]; $last_seen = $result[7]; $admin_name = $result[8]; } $ech_logs = $dbl->getEchLogs($id, NULL, 'admin'); // get the echelon logs created by this user (note: admin_id is admin group not the id stored in log) $token_del = genFormToken('del' . $id); $is_view_user = true; } // end // if this is an edit user page if ($_GET['t'] == 'edituser') { if (!isID($_GET['id'])) { set_error('Invalid data sent. Request aborted.'); send('sa.php'); } else { $uid = $_GET['id']; } ## Get a users details $result = $dbl->getUserDetailsEdit($uid); if (!$result) { // there was no user matching the sent id // throw error and sedn to SA page set_error('No user matches that id.'); send('sa.php'); exit; } else { ## Setup information vars ## $u_username = $result[0];
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <?php include 'function.php'; if (isWords($_POST['student']) && isID($_POST['IDnumber']) && isEmail($_POST['email']) && isGrade($_POST['chinese']) && isGrade($_POST['english']) && isGrade($_POST['math']) && isGrade($_POST['physics']) && isGrade($_POST['chemistry'])) { echo '輸入成功'; write($_POST['student'], $_POST['IDnumber'], $_POST['email'], $_POST['chinese'], $_POST['english'], $_POST['math'], $_POST['physics'], $_POST['chemistry']); } else { echo '輸入失敗'; } ?> </body> </html>
<?php $option = $options; if (isID($option[0])) { function superdanmuTab() { ?> <div id="supertabchoose"><div id="chooseText">字</div><div id="chooseCode">码</div></div> <div id="commonTools" style="position: absolute;height: 26px;width: 100%;top: 0px;left: 0px;font-size: 13px;background-color: #66ccff;"> <input name="gettime" style="width: 54px;text-align: right;" title="Ctrl+Alt+t" /> 相对于<select onchange="inputCenter.relativeTo(this.value)"> <option value="frame">框架</option> <option value="video">视频</option> </select> </div> <div id="SuperTextTab" class="SuperTab">高级字幕</div> <div id="SupeCodeTab" class="SuperTab">代码弹幕</div> <?php } function optioneles() { ?> <div> <h3> 播放器设置</h3> <div> <span>默认隐藏边栏:<div switch name="DefaultHideSideBar"></div></span> <span>进度条显示弹幕密度:<div switch name="ProgressDanmumark"></div></span> </div> </div> <div> <h3> 普通弹幕</h3>
set_error('Please do not call that page directly, thank you.'); send('../../index.php'); } ## get vars ## $ban_id = $_POST['banid']; $type = cleanvar($_POST['type']); ## check that the sent form token is correct ## if (verifyFormToken('unban' . $ban_id, $tokens) == false) { // verify token ifTokenBad('Unban'); } ## Check for empties ## emptyInput($type, 'data not sent'); emptyInput($ban_id, 'data not sent'); ## Check ban_id is a number ## if (!isID($ban_id)) { sendBack('Invalid data sent, ban not added'); } ## Send query ## $results = $db->makePenInactive($ban_id); if (!$results) { // if bad send back warning sendBack('Penalty has not been removed'); } ## If a permaban send unban rcon command ## if ($type == 'Ban') { ## Get the PBID of the client ## $pbid = $db->getPBIDfromPID($pen_id); ## Loop thro server for this game and send unban command and update ban file $i = 1; while ($i <= $game_num_srvs) {
$is_pb_ban = false; $type = 'TempBan'; $duration_form = cleanvar($_POST['duration']); $time = cleanvar($_POST['time']); emptyInput($time, 'time frame'); emptyInput($duration_form, 'penalty duration'); // NOTE: the duration in the DB is done in MINUTES and the time_expire is written in unix timestamp (in seconds) $duration = penDuration($time, $duration_form); $duration_secs = $duration * 60; // find the duration in seconds $time_expire = time() + $duration_secs; // time_expire is current time plus the duration in seconds } // check for empty reason emptyInput($reason, 'ban reason'); if (!isID($ban_id) || !isID($cid)) { sendBack('Some of the information sent by you is invalid, the ban was not edited'); } ## Query Section ## $query = "UPDATE penalties SET type = ?, duration = ?, time_edit = UNIX_TIMESTAMP(), time_expire = ?, reason = ? WHERE id = ? LIMIT 1"; $stmt = $db->mysql->prepare($query) or die('DB Error'); $stmt->bind_param('siisi', $type, $duration, $time_expire, $reason, $ban_id); $stmt->execute(); if ($stmt->affected_rows > 0) { $results = true; } else { sendBack('Something went wrong'); } ## If a permaban send unban rcon command (the ban will still be enforced then by the B3 DB ## if ($type == 'Ban') { ## Loop thro server for this game and send unban command and update ban file
<?php $page = "clientdetails"; $page_title = "Client Details"; $auth_name = 'clients'; $b3_conn = true; // this page needs to connect to the B3 database $pagination = false; // this page requires the pagination part of the footer require 'inc.php'; ## Do Stuff ## if ($_GET['id']) { $cid = $_GET['id']; } if (!isID($cid)) { set_error('The client id that you have supplied is invalid. Please supply a valid client id.'); send('clients.php'); } if ($cid == '') { set_error('No user specified, please select one'); send('clients.php'); } ## Get Client information ## $query = "SELECT c.ip, c.connections, c.guid, c.name, c.mask_level, c.greeting, c.time_add, c.time_edit, c.group_bits, g.name\n\t\t FROM clients c LEFT JOIN groups g ON c.group_bits = g.id WHERE c.id = ? LIMIT 1"; $stmt = $db->mysql->prepare($query) or die('Database Error ' . $db->mysql->error); $stmt->bind_param('i', $cid); $stmt->execute(); $stmt->bind_result($ip, $connections, $guid, $name, $mask_level, $greeting, $time_add, $time_edit, $group_bits, $user_group); $stmt->fetch(); $stmt->close(); ## Require Header ##
public function db_readbible_results_html() { if ($this->db_passage_results['summary']['error'] == 'no') { while (list($k, $v) = each($this->db_passage_results['result'])) { foreach ($v as $b => $Books) { foreach ($Books as $i => $verses) { foreach ($verses as $f => $y) { $this->db_passage_results_verse .= ' <div class="verse ' . $y['aneu'] . '"> <span><!--{@verse_num} -->' . Numbers($y['aneu'], $k) . '</span> <p><!--{@verse} -->' . $y['lai'] . '</p> </div>'; } $this->page_description = $verses[key($verses)]['lai']; $chapter = $this->config["book"][$k]["chapter"] ? $this->config["book"][$k]["chapter"] : 'Chapter'; $this->db_passage_results_chapter .= ' <div class="chapter ' . $i . '"> <h4><!--{@chapter} --> ' . Numbers($chapter . ' ' . $i, $k) . '</h4> <!--{@data} -->' . $this->db_passage_results_verse . ' </div>'; $this->db_passage_results_verse = ''; } $bookClass = $this->config["book"]["All"][$b]; $bookID = $b; $book = $this->config["book"][$k][$b] ? $this->config["book"][$k][$b] : $bookClass; $this->db_passage_results_book .= ' <div class="book ' . isID($bookClass) . ' bs rc2 ifie"> <h3><!--{@book} -->' . $book . '</h3> <!--{@data} -->' . $this->db_passage_results_chapter . ' </div>'; $this->db_passage_results_chapter = ''; } $version = $k; $version_name = $this->config["book"]["name"][$k] ? $this->config["book"]["name"][$k] : $this->db_passage_results['summary'][$k]['name']; $totalverses = $this->db_passage_results['summary'][$k]['total']; $isMoreVerses = $totalverses > 1 ? 'verses' : 'verse'; $verse = $this->config["book"][$k]["verse"] ? $this->config["book"][$k]["verse"] : $isMoreVerses; $this->db_passage_results_version .= ' <div class="version ' . $k . '"> <h2 class="none"><strong>' . $version_name . '</strong> <span>' . $this->q . '</span></h2> ' . $this->db_passage_results_book . ' </div>'; $this->db_passage_results_book = ''; } } else { $this->db_passage_results_version .= ' <div class="version noresults"> <h2>in ' . $this->db_passage_results['summary'][$k]['name'] . ' found no verse</h2> <!--{@data} --> </div>'; $this->diagnosticMessage = 'Sorry, no result were found in ' . $this->db_passage_results['summary'][$k]['name'] . '!'; } $current_chapter = $this->db_passage_results['summary']['detail'][0]; $current_book = $this->config["book"][$this->sil][$bookID] ? $this->config["book"][$this->sil][$bookID] : $bookClass; $chapter = $this->config["book"][$this->sil]["chapter"] ? $this->config["book"][$this->sil]["chapter"] : 'Chapter'; $verse = $this->config["book"][$this->sil]["verse"] ? $this->config["book"][$this->sil]["verse"] : 'verse'; $OldTestament = $this->config["book"]["testament"][$this->sil][1] ? $this->config["book"]["testament"][$this->sil][1] : "Old Testament"; $NewTestament = $this->config["book"]["testament"][$this->sil][2] ? $this->config["book"]["testament"][$this->sil][2] : "New Testament"; $Testament = $bookID <= 39 ? $OldTestament : $NewTestament; $parable = $this->db_passage_results['summary']['versions']; $this->MainMenu = $this->BibleMainMenu_html(); $this->db_passage_results_html_final = ' <div class="bible wise' . $parable . '"> <div class="currentChapter"> <ul> <li class="books bs rc2 ifie"> <a href="' . $this->config['www'] . '">' . $version_name . '</a> </li> <li class="bs rc2 ifie"><a href="#">' . $Testament . '</a></li> <li class="parable bs rc2 ifie"> <span>Parallel</span> <ul class="parables bs rc2 ifie">' . $this->parallel_html() . '</ul> </li> <li class="chapters bs rc2 ifie"> <a href="#">' . $current_book . '</a> <ul class=" bs rc2 ifie"> <li class="cap">' . $chapter . '</li> <li class="chapter">' . $this->chpaterlist_html($bookID, $this->currentbook_url, $current_chapter) . '</li> </ul> </li> <li class="nav bs rc2 ifie"> <a href="' . $this->config['www'] . $this->previousbook_url . $this->isBibleQuery . '" title="' . $this->previousbookName . '" class="book previous">«</a> <a href="' . $this->config['www'] . $this->chapter_previous . $this->isBibleQuery . '" class="pre">Previous</a> <a href="' . $current_url . '" class="num">' . $current_chapter . '</a> <a href="' . $this->config['www'] . $this->chapter_next . $this->isBibleQuery . '" class="nex">Next</a> <a href="' . $this->config['www'] . $this->nextbook_url . $this->isBibleQuery . '" title="' . $this->nextbookName . '" class="book next">»</a> </li> </ul> </div> ' . $this->db_passage_results_version . ' <div class="version widgets"> <ul class="parables bs rc2 ifie"><li class="title">Parallel</li>' . $this->parallel_html() . '</ul> </div> </div>'; $this->page_title = $book . ' ' . Numbers($current_chapter, $version) . ' - ' . $version_name; $this->page_keywords = $version_name . ', ' . $book . ', ' . $this->config['site_title']; return $this->db_passage_results_html_final; }
/** * Set a child service * * Method will set a child spool $spoolId to the spool $parentSpoolId * * @access protected * @param mixed $spoolId The child spool ID * @param int $parentSpoolId The parent spool ID * @param bool $setAsAvailable TRUE to set the new child spool as the current spool. Default is TRUE * @return bool TRUE if the child was added successfully, FALSE otherwise */ protected function setAccountingSpoolChildren($parentSpoolId, $spoolId, $setAsAvailable = true) { if (!isId($parentSpoolId) || !isID($spoolId)) { return false; } if (!$this->quickbooks->setAccountingSpoolChildren($parentSpoolId, $spoolId)) { return false; } if ($setAsAvailable) { $this->quickbooks->setCurrentSpool($spoolID); } return true; }