Exemple #1
0
<?php

// Load Numword
require 'numword.php';
// one-thousand, two-hundred thirty-four
echo Numword::single(1234);
// six-thousand, nine-hundred thirty-four dollars and thirty-four cents
echo Numword::currency('$6934.34');
// That movie is three years old.
echo Numword::block('That movie is 3 years old.');
include "config.php";
$sql = "SELECT id, name, description, date, link, seen\r\n\t\t\t\tFROM movies\r\n\t\t\t\tORDER BY date DESC";
$rs = mysql_query($sql) or die(mysql_error());
if (mysql_num_rows($rs) > 0) {
    $output = "";
    while ($row = mysql_fetch_array($rs, MYSQL_ASSOC)) {
        if ($row['seen'] == 1) {
            $output .= "<h3 id=\"watched\" class=\"name\">{$row['name']}</h3>";
        } else {
            $output .= "<h3 id=\"notwatched\" class=\"name\">{$row['name']}</h3>";
        }
        $output .= "<div id=\"theMovie\">\r\n\t\t\t\t\t\t\t<p class=\"tools\"><a id=\"delete\" href=\"delete.php?id={$row['id']} \"><img src=\"cancel.png\" /></a>\r\n\t\t\t\t\t\t\t<a id=\"seen\" href=\"seen.php?id={$row['id']} \"><img src=\"seen.png\" /></a>\r\n\t\t\t\t\t\t\t<a id=\"delete\" target=\"_blank\" href=\"http://filelist.ro/browse.php?search={$row['name']}&cat=0 \"><img src=\"search.png\" /></a>\r\n\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\t<p class=\"descr\"><b>Plot</b>: {$row['description']}<br /><b>IMBD Link: </b>  <a href=\"http://www.imdb.com/find?s=all&q={$row['name']}&x=0&y=0\" target=\"_blank\" align=\"right\">[Click]</a></small></p>\r\n\t\t\t\t\t\t\t</div>";
    }
    $num_rows = mysql_num_rows($rs);
    $movieNr = Numword::single($num_rows);
} else {
    $output = "<p id=\"empty\"><img src=\"warning.png\" /> <br />You have <strong>NO</strong> movies in the database.</p>";
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>
    <title><?php 
print $siteName;
?>
</title>
    
    <script src="../jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>