These pages are only visible at gtk.php.net
because that's where the database that stores them is located. If (when) the
PHP-GTK website is mirrored in several locations, we'll work out a way of
having the docs available across all the mirror sites.
1 || !preg_match("'[a-z]'", $let)) {
$let = 'a';
}
$y = isset($_GET['y']) ? $_GET['y'] : date('Y', time());
if (strlen($y) != 4 || !preg_match("'[\d]{4}'", $y)) {
$y = date('Y', time());
}
$db = sqlite_open($notesfile);
$query = sqlite_query($db, "SELECT DISTINCT $order FROM notes");
while ($row = sqlite_fetch_array($query, SQLITE_ASSOC)) {
if ($order == 'date') {
$year = date('Y', $row['date']);
if (!in_array($year, $used)) {
$used[] = $year;
}
} else {
$first_letter = strtolower($row[$order][0]);
if (!array_key_exists($first_letter, $used)) {
$used[$first_letter] = true;
}
}
}
sqlite_close($db);
$links = array();
if ($order == 'date') {
rsort($used);
foreach ($used as $year) {
$links[] = make_link("{$_SERVER['PHP_SELF']}?y=$year$queue", "$year");
}
} else {
for ($i = ord('a'); $i <= ord('z'); $i++) {
$letter = chr($i);
if (isset($used[$letter])) {
$links[] = make_link("{$_SERVER['PHP_SELF']}?let=$letter$queue", "$letter");
} else {
$links[] = $letter;
}
}
}
$jumpbar = "\n".
"\n".
"Jump to: ".
implode(" | ", $links).
"
| \n".
"
\n".
"
\n\n";
echo $jumpbar;
echo '';
if (!isset($used[$let]) && $order != 'date') {
echo 'No entries for '.$let.'
|
';
echo stretchPage(15);
echo " ";
} else {
$db = sqlite_open($notesfile);
if ($order == 'date') {
$query = sqlite_query($db, "SELECT * FROM notes WHERE strftime('%Y', date, 'unixepoch') = '$y' ORDER BY date DESC");
} else {
$query = sqlite_query($db, "SELECT * FROM notes WHERE lower(substr($order, 1, 1)) = '$let' ORDER BY lower($order)");
}
while ($row = sqlite_fetch_array($query, SQLITE_ASSOC)) {
if ($order == 'page') {
if ($row['page'] != $last) {
makeTitle($row['page']);
$last = $row['page'];
}
} else {
makeTitle($row['page']);
}
makeEntry($row, $admin);
}
sqlite_close($db);
}
echo '
';
echo $jumpbar;