예제 #1
0
<?php 
require "recipe_login.inc";
$connection = mysqli_connect($host, $user, $password) or die("couldn't connect to this server");
$db = mysqli_select_db($connection, $database) or die("couldn't connect to the database");
$query = "SELECT COUNT(title) FROM recipeTable";
$result = mysqli_query($connection, $query) or die("couldn't execute query");
$row = mysqli_fetch_array($result, MYSQLI_ASSOC);
foreach ($row as $row_num => $num_value) {
    $latest = $num_value - 5;
}
echo "<ul>";
$query = "SELECT * FROM recipeTable ORDER BY date_entered LIMIT {$latest},5";
$result = mysqli_query($connection, $query) or die("couldn't execute query");
while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
    EXTRACT($row);
    echo "<li><font size=+1><a href=/recipes/";
    echo "{$wordfile}";
    echo ">{$title}</a></font><br>";
    if ($abstract == "") {
        echo "<br>";
    } else {
        echo "{$abstract}<br><br>";
    }
}
echo "</ul>";
echo "Find recipes added in: ";
echo " <a href='searchrecent.php?recent=10'>Last 10 days</a> ";
echo " , <a href='searchrecent.php?recent=30'>Last 30 days</a> ";
echo " , <a href='searchrecent.php?recent=60'>Last 60 days</a><br><br>";
echo "<b>Browse Recipes:</b> ";
예제 #2
0
 public function ignoreControlStructureInUpperCase()
 {
     array();
     TRUE and TRUE;
     try {
     } catch (\EXCEPTION $E) {
     }
     COMPACT();
     declare (TICKS=1);
     die;
     echo '';
     empty($A);
     eval('');
     exit(-1);
     EXTRACT();
     for ($I = 0; $I < 1; $I++) {
     }
     foreach ($ARRAY as $KEY => $VALUE) {
     }
     function () {
     };
     if (TRUE) {
     }
     include 'FILENAME';
     include_once 'FILENAME';
     if (FALSE) {
     } elseif (TRUE) {
     }
     isset($A);
     list($A, $B) = ['A', 'B'];
     TRUE or TRUE;
     new SELF();
     new STATIC();
     PARENT::HELLO();
     print 'HELLO';
     require 'FILENAME';
     require_once 'FILENAME';
     return $A;
     switch ($CASE) {
         case TRUE && TRUE:
             break;
         default:
     }
     unset($A);
     while (FALSE) {
     }
     TRUE xor TRUE;
 }