Layout and other changes
This commit is contained in:
parent
3f5ef1296a
commit
4632884065
41 changed files with 5563 additions and 544 deletions
|
@ -28,14 +28,18 @@ If (!defined("in_astat")) {
|
|||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||
}
|
||||
$session->page_begin("Nickpage", FALSE);
|
||||
use Smarty\Smarty;
|
||||
|
||||
class nickpage extends module{
|
||||
var $mybb_conf,$session;
|
||||
|
||||
function __construct(){
|
||||
parent::__construct();
|
||||
$this->mybb_conf = $this->fetchboardconfig();
|
||||
}
|
||||
|
||||
function output(){
|
||||
global $module,$tpl,$config,$db,$log,$core,$error, $session;
|
||||
global $module,$config,$db,$log,$core,$error, $session;
|
||||
|
||||
$count=20;
|
||||
|
||||
|
@ -49,12 +53,13 @@ class nickpage extends module{
|
|||
$user['sitetitle']='Nickpage nicht gefunden';
|
||||
}else{
|
||||
$parser=new textparser();
|
||||
|
||||
$loggedin = false;
|
||||
$db->free_result($result);
|
||||
|
||||
$user['sitetitle']='Nickpage von '.$user['username'];
|
||||
|
||||
$result=$db->query("SELECT * FROM `" . $this->mybb_conf['prefix'] . "users` WHERE `uid`='".$user['fuid']."' LIMIT 1");
|
||||
if($session->userdata['uid']!=0){
|
||||
$loggedin = true;
|
||||
}
|
||||
$result=$db->query("SELECT * FROM `" . $this->mybb_conf["prefix"] . "users` WHERE `uid`='".$user['fuid']."' LIMIT 1");
|
||||
$forum=$db->fetch_array($result);
|
||||
$db->free_result($result);
|
||||
|
||||
|
@ -62,7 +67,7 @@ class nickpage extends module{
|
|||
$chat=$db->fetch_array($result);
|
||||
$db->free_result($result);
|
||||
|
||||
$result=$db->query("SELECT count(`id`) as `count` FROM `" . $config['prefix'] . "npguestbook` WHERE `guid`='".$user['uid']."'");
|
||||
$result=$db->query("SELECT count(`id`) as `count` FROM `" . $config["prefix"] . "npguestbook` WHERE `guid`='".$user['uid']."'");
|
||||
$gb_count=$db->fetch_array($result);
|
||||
$gb_pages=ceil($gb_count['count']/$count);
|
||||
$db->free_result($result);
|
||||
|
@ -76,8 +81,8 @@ class nickpage extends module{
|
|||
}else{
|
||||
$user['age'] = 'unbekannt';
|
||||
}
|
||||
|
||||
if(!$_GET['page'] || $_GET['page']=="first"){
|
||||
$page = 0;
|
||||
if(!isset($_GET['page']) || $_GET['page']=="first"){
|
||||
$start=0;
|
||||
}elseif($_GET['page']=="last"){
|
||||
$page=$gb_pages-1;
|
||||
|
@ -118,10 +123,10 @@ class nickpage extends module{
|
|||
$user['chattime']=$this->intervall($chat['chattime']);
|
||||
$user['reviewnum']=$reviews['count'];
|
||||
switch($chat['rights']){
|
||||
case(3):
|
||||
case(99):
|
||||
$user['chatright']='Chatadmin';
|
||||
break;
|
||||
case(2):
|
||||
case(50):
|
||||
$user['chatright']='Chat-VIP';
|
||||
break;
|
||||
}
|
||||
|
@ -136,6 +141,7 @@ class nickpage extends module{
|
|||
}
|
||||
//$forum['buddylist'];
|
||||
if($session->userdata['uid']!=""){
|
||||
|
||||
$result=$db->query("SELECT `buddylist` FROM `" . $this->mybb_conf["prefix"] . "users` WHERE `uid`='".$session->userdata['fuid']."' LIMIT 1");
|
||||
$friends=$db->fetch_array($result);
|
||||
$db->free_result($result);
|
||||
|
@ -174,16 +180,17 @@ class nickpage extends module{
|
|||
$db->free_result($result);
|
||||
}
|
||||
}
|
||||
$tpl->assign('friends',$friendl);
|
||||
$tpl->assign('user',$user);
|
||||
$tpl->assign('forum',$forum);
|
||||
$tpl->assign('domain',$config['domain']);
|
||||
$tpl->assign('gb',$gb);
|
||||
$tpl->assign('pagination',$pagination);
|
||||
//$content=$this->tpl->fetch('nickpage_content.tpl');
|
||||
|
||||
$this->tpl->assign('friends',$friendl);
|
||||
$this->tpl->assign('user',$user);
|
||||
$this->tpl->assign('forum',$forum);
|
||||
$this->tpl->assign('loggedin',$loggedin);
|
||||
$this->tpl->assign('domain',$config['domain']);
|
||||
$this->tpl->assign('gb',$gb);
|
||||
$this->tpl->assign('pagination',$pagination);
|
||||
$content=$this->tpl->fetch('nickpage.tpl');
|
||||
}
|
||||
$tpl->assign('user',$user);
|
||||
$core->make_page($content,TRUE,$config['fullpath'].'/modules/nickpage/templates/default/nickpage.tpl',NULL,NULL);
|
||||
$core->make_page($content,TRUE,$config['fullpath'].'/modules/nickpage/templates/default/nickpage_content.tpl',NULL,NULL);
|
||||
}
|
||||
|
||||
function output_edit(){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue