strpos($_SERVER['HTTP_USER_AGENT'], 'holmes/3.12') !== false ||
strpos($_SERVER['HTTP_USER_AGENT'], 'NoteworthyBot/0.1') !== false ||
strpos($_SERVER['HTTP_USER_AGENT'], 'Eurosoft-Bot') !== false ||
- strpos($_SERVER['HTTP_USER_AGENT'], 'msnbot') !== false) {
+ strpos($_SERVER['HTTP_USER_AGENT'], 'msnbot') !== false ||
+ strpos($_SERVER['HTTP_USER_AGENT'], 'Twiceler-0.9') !== false ||
+ strpos($_SERVER['HTTP_USER_AGENT'], 'ScoutJet') !== false ||
+ strpos($_SERVER['HTTP_USER_AGENT'], 'penthesilea/0.3') !== false ||
+ strpos($_SERVER['HTTP_USER_AGENT'], 'VisBot/2.0') !== false ||
+ strpos($_SERVER['HTTP_USER_AGENT'], 'Netluchs/Nutch-1.0') !== false ||
strpos($_SERVER['HTTP_USER_AGENT'], 'Cityreview Robot') !== false) {
if (isset($_SESSION['uid']))
$_SESSION['robot'] = true;
return false;
}
+function is_admin()
+{
+ global $_SESSION;
+
+ if (!array_key_exists('nickname', $_SESSION))
+ return false;
+
+ error_log( $_SESSION['nickname'] === 'Joey');
+ return $_SESSION['nickname'] === 'Joey';
+}
+
function format_info_bookmarks()
{
global $_SESSION;
$sth = db_query($query);
- if ($sth === false || pg_NumRows ($sth) == 0)
+ if ($sth === false || pg_num_rows ($sth) == 0)
return false;
$ret = '<p><ul>';
- for ($n=0; $n < pg_NumRows ($sth); $n++) {
+ for ($n=0; $n < pg_num_rows ($sth); $n++) {
$row = pg_fetch_array ($sth, $n);
$ret .= sprintf('<li><a href="%szeitung/%d.html">%s</a></li>',
$cfg['basepath'], $row['zeitung'], $row['name']);