public static function add($sql, $time = false) { if (count(self::$data) >= self::MAX_LENGTH) { return; } self::$data[] = array($sql, $time, join(' -> ', place())); }
<input type="hidden" name="duration" value="<?php echo duration(); ?> "/> <input type="hidden" name="when" value="<?php echo when(); ?> "/> <input type="hidden" name="why" value="<?php echo reason(); ?> "/> <input type="hidden" name="who" value="<?php echo name(); ?> "/> <input type="hidden" name="where" value="<?php echo place(); ?> "/> <input type="hidden" name="email" value="<?php echo email(); ?> "/> <input class="submit" type="submit" value="Submit"> <div class="g-recaptcha" data-sitekey="6LcXawwTAAAAAFAxIAo0YQc3HiluzzAyxX9MI66D"></div> </form> </div> </body> </html>
return $result->success; } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <link href='http://fonts.googleapis.com/css?family=Josefin+Sans' rel='stylesheet' type='text/css'> <link rel="stylesheet" type="text/css" href="dine.css?v=0.1"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> <script src='https://www.google.com/recaptcha/api.js'></script> </head> <body id="plate"> <div id="text"> <?php $who = name(); $where = place(); $when = when(); $duration = duration(); $email = email(); $why = reason(); $mail_text = "Who: {$who}\r\n" . "Where: {$where}\r\n" . "When: {$when}\r\n" . "Duration: {$duration} hour(s) \r\n" . "Email: {$email}\r\n" . "Reason: {$why}\r\n"; if (verify_captcha()) { send_mail($mail_text, $email, $who); echo "Mail sent, now you must wait for me to respond."; } else { echo "Captcha failed, I don't dine with robots"; } ?> </div> </body> </html>
} // Sets Live Players position $livePlayer = place($car, $track, $color); // Generates Sims to race against $sim1 = place(randomCar(), $track, randomColor()); $sim2 = place(randomCar(), $track, randomColor()); $sim3 = place(randomCar(), $track, randomColor()); // Makes sure every player has a unique position while ($sim1 == $sim2 || $sim1 == $sim3 || $sim1 == $livePlayer) { $sim1 = place(randomCar(), $track, randomColor()); } while ($sim2 == $sim1 || $sim2 == $sim3 || $sim2 == $livePlayer) { $sim2 = place(randomCar(), $track, randomColor()); } while ($sim3 == $sim1 || $sim3 == $sim2 || $sim3 == $livePlayer) { $sim3 = place(randomCar(), $track, randomColor()); } ?> <h1>Results</h1> <table> <tr> <td> <ul> <?php // If statements that displays players rankings accordingly if ($livePlayer == "first") { echo "<li> First Place: " . $name . "</li>"; } else { if ($sim1 == "first") { echo "<li> First Place: Player 2</li>";
</tr> <tr> <td>Account fame</td> <td><span class="numeric"><?php echo n($accountfame); ?> </span> <?php $aplace = $db->query("SELECT accId FROM stats")->rowCount() - $db->query("SELECT accId FROM stats WHERE fame < '{$accountfame}' ORDER BY fame DESC;")->rowCount(); ?> (<?php if ($aplace < 1001) { ?> <a href="top-players-by-account-fame.php"><?php } echo $aplace . place($aplace); ?> </a>) </td> </tr> <?php if ($guildid > 0) { ?> <tr> <td>Guild</td> <td><a href="/guild/<?php echo t($guildname); ?> "><?php echo t($guildname); ?>
function display($busid, $from, $to, $nstops) { $name1 = place($from); //halt name from $name2 = place($to); //halt name to if ($to > 200 || $from > 200) { $nstops = 'More than ' . $nstops; } if (($bus = busDet($busid)) != false) { $tgeo = geolocate($to); $fgeo = geolocate($from); if (isset($_GET['v'])) { echo "Take the <strong>{$bus[1]}</strong> ({$bus[2]} - {$bus[3]}) bus. Get on at {$name1} ({$fgeo}) and get off at {$name2} ({$tgeo}).<br/>"; } else { echo <<<OUT <ul id="stops">\t \t<li id="le"><div id="route">{$bus['1']}</div></li> \t<li id="le"><h3>Bus Start</h3><br/>{$bus['2']}</li> \t<li id="le">{$fgeo}<h3>Get on at</h3><br/>{$name1}</li> \t<li id="le">{$tgeo}<h3>Get off at</h3><br/>{$name2}</li> \t<li id="le"><h3>Bus End</h3><br/>{$bus['3']}</li> \t<li><h3>No. of halts</h3><br/>{$nstops}</li> </ul> OUT; } } }
function durjoy() { $name = 'durjoy'; // Local scope echo $name; } durjoy(); echo "<br>"; $location = "Dhaka"; function place() { global $location; // etake global korar jonno amra er age global likhlam. echo $location; } place(); echo "<br>"; $location = "Dhaka"; function location() { echo $GLOBALS["location"]; // evabe super global koreo kaj kora jay. but amra uporter niyomei likhbo. } location(); echo "<br>"; function name() { global $name; // ekhane nice je local variable ta likhbo take amra function er baire use kroar jonno age gloval kore nilam. $name = "Imtiaz"; // local variable
/** * Pretty-prints a variable. * * @param mixed $var Variable to print */ function debug($var) { $place = place(); $title = join(' ← ', $place); $vars = func_get_args(); foreach ($vars as $var) { output(str_replace(array('&', '<', '>', "\\'"), array('&', '<', '>', "'"), var_export($var, true)), $title); } }