Initial checkin
This commit is contained in:
commit
d75eb444fc
4304 changed files with 369634 additions and 0 deletions
1
nav_modules/index.html
Normal file
1
nav_modules/index.html
Normal file
|
@ -0,0 +1 @@
|
|||
|
8
nav_modules/nav_ads.php
Normal file
8
nav_modules/nav_ads.php
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
If (!defined("in_astat")) {
|
||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||
}
|
||||
|
||||
$navrow .= $navtpl->fetch('nav_ads.tpl');
|
||||
|
||||
?>
|
42
nav_modules/nav_lastpost.php
Normal file
42
nav_modules/nav_lastpost.php
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
If (!defined("in_BL")) {
|
||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||
}
|
||||
// Anzahl der Themen
|
||||
$limit = "5";
|
||||
// Überlange Themen kürzen (0 = Nein, x = Anzahl der auszugebenden Zeichen)
|
||||
$length = "0";
|
||||
|
||||
//Nicht sichtbare Foren ausschließen
|
||||
$unviewable = get_unviewable_forums();
|
||||
if($unviewable)
|
||||
{
|
||||
$unviewwhere = "AND fid NOT IN ('2',".$unviewable.")";
|
||||
}else{
|
||||
$unviewwhere = "AND fid<>2";
|
||||
}
|
||||
|
||||
// Themen aus Datenbank holen
|
||||
$query = $db->query ("SELECT subject,username,pid,uid,tid,fid,dateline FROM ".TABLE_PREFIX."posts WHERE visible='1' $unviewwhere ORDER BY dateline DESC LIMIT 0,".$limit."");
|
||||
|
||||
while($threads = $db->fetch_array($query))
|
||||
{
|
||||
// Forum ermitteln
|
||||
$query2 = $db->query ("SELECT name FROM ".TABLE_PREFIX."forums WHERE fid = '".$threads['fid']."'");
|
||||
$forums = $db->fetch_array($query2);
|
||||
$threads['name']=$forums['name'];
|
||||
$threads['date']=date("d.m.y H:i",$threads["dateline"]);
|
||||
$threads['urlusername']=urlencode($threads['username']);
|
||||
// Betreff kürzen?
|
||||
if ($length != 0)
|
||||
{
|
||||
if (strlen($threads['subject']) > $length)
|
||||
{
|
||||
$threads['subject'] = substr($threads['subject'],0,$length) . "...";
|
||||
}
|
||||
}
|
||||
$forum[]=$threads;
|
||||
}
|
||||
$tpl->assign("forum",$forum);
|
||||
$navrow .= $tpl->fetch('nav_lastpost.tpl');
|
||||
?>
|
20
nav_modules/nav_login.php
Normal file
20
nav_modules/nav_login.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
If (!defined("in_astat")) {
|
||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||
}
|
||||
|
||||
if (!isset($session->userdata["uid"]) || $session->userdata["uid"]==0) {
|
||||
$navtpl->assign('navtitle', $lang->_('LOGIN'));
|
||||
$navrow .= $navtpl->fetch('nav_login.tpl');
|
||||
} else {
|
||||
$navtpl->assign('username', $session->userdata["username"]);
|
||||
$navtpl->assign('sid', $session -> sid);
|
||||
$navtpl->assign('uid', $session->userdata["uid"]);
|
||||
$navtpl->assign('navtitle', $lang->_('WELCOME'));
|
||||
If ($session->userdata["admin_cp"] && $session->userdata["is_admin"]) {
|
||||
$navtpl->assign('admincenter', 1);
|
||||
}
|
||||
$navrow .= $navtpl->fetch('nav_welcome.tpl');
|
||||
}
|
||||
|
||||
?>
|
9
nav_modules/nav_search.php
Normal file
9
nav_modules/nav_search.php
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
If (!defined("in_astat")) {
|
||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||
}
|
||||
$navtpl->assign('navtitle', "Suche");
|
||||
$navrow .= $navtpl->fetch('nav_search.tpl');
|
||||
|
||||
|
||||
?>
|
31
nav_modules/nav_stats.php
Normal file
31
nav_modules/nav_stats.php
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
If (!defined("in_astat")) {
|
||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||
}
|
||||
|
||||
$result=$db->query("SELECT count(uid) as users FROM `" . $config["prefix"] . "users`");
|
||||
$row = $db->fetch_array($result);
|
||||
$stats['users']=$row['users'];
|
||||
|
||||
$result=$db->query("SELECT username FROM `" . $config["prefix"] . "users` ORDER BY uid DESC LIMIT 1");
|
||||
$row = $db->fetch_array($result);
|
||||
$stats['lastusername']=$row['username'];
|
||||
|
||||
$stat=$cache->read('review_stats');
|
||||
$stats['reviewcount']=$stat['reviews'];
|
||||
$stats['titlecount']=$stat['titles'];
|
||||
$stats['queued']=$stat['queue'];
|
||||
|
||||
$result=$db->query("SELECT count(id) as comments FROM `" . $config["prefix"] . "comments`");
|
||||
$row = $db->fetch_array($result);
|
||||
$stats['comments']=$row['comments'];
|
||||
|
||||
$result=$db->query("SELECT sum(chattime) as time FROM `v_yac_users`");
|
||||
$row = $db->fetch_array($result);
|
||||
$stats['time']=$row['time'];
|
||||
$plugin->run_hook("nav_stats",&$stats);
|
||||
|
||||
$navtpl -> assign('stats', $stats);
|
||||
$navrow .= $navtpl->fetch('nav_stats.tpl');
|
||||
|
||||
?>
|
27
nav_modules/nav_twitter.php
Normal file
27
nav_modules/nav_twitter.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
If (!defined("in_astat")) {
|
||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||
}
|
||||
include 'thirdparty/twitter/twitter.class.php';
|
||||
//define('MAGPIE_CACHE_DIR', '/var/www/virtual/recensio.org/phptmp/magpie_cache');
|
||||
try{
|
||||
$twitter = new Twitter('uVApPPv2zWXu8dWBwkbLw', 'kNHU7pia5ikY22No8gHU8ucXLd0z3IpnOUn0MA5SvQ', '563736788-UhHJUIJXlSdu3iFPaaqZQDmI9FExJOBW1e7ceZpM', 'FTHmLz1Gwa0pkgH5riN5mui4v3m83BaVVpXju4Bqlc');
|
||||
$channel = $twitter->load(Twitter::ME,5);
|
||||
foreach ($channel as $status){
|
||||
$stat['screenname'] = $status->user->screen_name;
|
||||
$stat['image'] = htmlspecialchars($status->user->profile_image_url);
|
||||
$stat['user'] = htmlspecialchars($status->user->name);
|
||||
$stat['text'] = Twitter::clickable($status);
|
||||
$stat['date'] = date("d.m.Y H:i",strtotime($status->created_at));
|
||||
$stats[]=$stat;
|
||||
}
|
||||
|
||||
}catch(Exception $e){
|
||||
$stats="Twitter down :,(";
|
||||
}
|
||||
|
||||
$navtpl-> assign("status",$stats);
|
||||
|
||||
$navrow .= $navtpl->fetch('nav_twitter.tpl');
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue