diff --git a/.htaccess b/.htaccess
index 5a7f7fc..8982287 100644
--- a/.htaccess
+++ b/.htaccess
@@ -13,7 +13,7 @@ RewriteBase /
RewriteRule error/(.*)\.html$ index.php?task=error&sub=$1
-RewriteRule ^np/images/(.+)$ /modules/nickpage/images/$1 [L,NC]
+RewriteRule ^np/images/(.*)$ /modules/nickpage/images/$1 [L,NC]
RewriteRule np/(.*) index.php?task=nickpage&user=$1
RewriteRule ^register/(.*)? register.php?regstring=$1
RewriteRule ^avatar/(.*)? index.php?task=rp&sum=avatar&id=$1
diff --git a/modules/chat/chat.output.php b/modules/chat/chat.output.php
index aa3091a..eb32e21 100644
--- a/modules/chat/chat.output.php
+++ b/modules/chat/chat.output.php
@@ -24,18 +24,7 @@ class chat extends module{
} else {
$befinden="sind";
}
- /*$nicks="";
- if($session->userdata['rp_admin']==1){
- $result=$db->query("SELECT * FROM `" . $config["prefix"] . "rp_chars` WHERE (`uid`='".$session->userdata['uid']."' OR `uid`='0') ORDER BY `uid` DESC") or die($db->error());
- }else{
- $result=$db->query("SELECT * FROM `" . $config["prefix"] . "rp_chars` WHERE `uid`='".$session->userdata['uid']."'") or die($db->error());
- }
- while($row=$db->fetch_array($result)){
- $nicks.='';
- }
- if($db->num_rows($result)<=0){
- $core->message('Sorry', 'You have to create a Char to participate.',FALSE,$config['path'].'/index.php');
- }*/
+
$rooms=array(array('room'=>'Lounge','selected'=>'selected="selected"'),array('room'=>'Flirt','selected'=>''),array('room'=>'Quiz','selected'=>''));
$this->tpl->assign('options',$rooms);
if($session->userdata['allow_grimdark']==0){
@@ -45,10 +34,8 @@ class chat extends module{
}
unset($data['usercount']);
unset($data['gdusercount']);
- $meta.=$this->xmeta();
$this->tpl->assign('user', $data);
$this->tpl->assign('befinden',$befinden);
- $this->tpl->assign('nicks',$nicks);
return $this->tpl->fetch('chat.tpl', 'chat_front');
}else{
$core->message('Sorry', 'Scheint so als hätte der Chat gerade Probleme. Wir kümmern uns sofort darum!',FALSE,$config['path'].'/index.php');
@@ -72,20 +59,6 @@ class chat extends module{
}
}
$subs=array('1'=>'Enter','2'=>'Shift+Enter');
- /*$result=$db->query("SELECT `uid`,`pr_only` FROM `" . $config["prefix"] . "rp_chars` WHERE `id`='".$db->escape($_POST['nick'])."'") or die($db->error());
- $row=$db->fetch_array($result);
- if($row['pr_only']=='true' && $_POST['room']!='Ponyopolis'){
- $_POST['room']='Chitchat';
- }
- if($row['uid']!=$session->userdata['uid'] && $session->userdata['rp_admin']!=1){
- $core->message('HACK!','You tried something fishy! It has been logged.');
- }*/
- $opts=array(
- "ssl"=>array(
- "verify_peer"=>false,
- "verify_peer_name"=>false,
- ),
- );
$ch = curl_init();
// setze die URL und andere Optionen
@@ -102,11 +75,6 @@ class chat extends module{
// schließe den cURL-Handle und gebe die Systemresourcen frei
curl_close($ch);
if ($fh) {
- /*$buffer = '';
- while (!feof($fh)) {
- $buffer .= fgets($fh, 512);
- }
- fclose($fh);*/
$buffer = trim($fh);
}
@@ -132,11 +100,6 @@ class chat extends module{
$whisper=$row['whisperwindow'];
}
$meta.= '';
- if($bg=='true'){
- $bgtext='BG Music: On';
- }else{
- $bgtext='BG Music: Off';
- }
if($whisper=='true'){
$whtext='Füsterfenster: An';
}else{
@@ -155,11 +118,11 @@ class chat extends module{
}else{
$simg=''.$nick.':';
}
+ $content = "";
$tpl->assign('cookie', $cookie);
$tpl->assign('username', $nick);
$tpl->assign('id', $_POST['nick']);
$this->titleaddon = $nick.' - ';
- $tpl->assign('bgmusic', $bgtext);
$tpl->assign('whtext', $whtext);
$tpl->assign('ooctext', $ooctext);
$tpl->assign('submit', $subs[$sub]);
@@ -178,7 +141,8 @@ class chat extends module{
}
}
function output_online(){
- $data=chat_online();
+ global $core, $config;
+ $data=chat_online();
unset($data["usercount"]);
unset($data["gdusercount"]);
if (!$data["chat_offline"]) {
@@ -190,7 +154,7 @@ class chat extends module{
}
function output_editlog(){
- global $session,$config,$db,$tpl,$core,$plugin,$meta;
+ global $session,$config,$db,$core,$meta;
$meta.= '';
$logs=$db->query("SELECT c.*, u.`username` FROM `" . $config["prefix"] . "conversations` c LEFT JOIN `" . $config["prefix"] . "users` u ON u.`uid`=c.`owner` WHERE c.`owner`='".$session->userdata['uid']."' AND c.`id`='".intval($_GET['id'])."'");
if($db->num_rows($logs)<=0){
@@ -210,7 +174,6 @@ class chat extends module{
}
$this->tpl->assign('share',$share);
$this->tpl->assign('id',intval($_GET['id']));
- $this->tpl->assign('logdata',$logdata);
return $this->tpl->fetch('editlog.tpl', 'editlog');
}
@@ -224,7 +187,7 @@ class chat extends module{
while($delid=$db->fetch_array($did)){
$ids[]=$delid['id'];
}
- $sql="DELETE FROM `" . $config["prefix"] . "conversations` WHERE `id` in('".join($ids,'\',\'')."')";
+ $sql="DELETE FROM `" . $config["prefix"] . "conversations` WHERE `id` in('".join('\',\'', $ids)."')";
$db->query($sql);
$db->query("DELETE FROM `" . $config["prefix"] . "private_logs` WHERE `cid`='".$rowl['id']."'");
}else{
@@ -333,12 +296,12 @@ class chat extends module{
$core->message('Sorry', "You have to be logged in to participate.");
}else{
$date='';
- $logs='';
+ $logs = array();
$cd='';
if(isset($_POST['nicks']) && $_POST['nicks']!=""){
$chars=explode(', ',$_POST['nicks']);
array_pop($chars);
- $char = '\''.join ($chars,'\',\'').'\'';
+ $char = '\''.join ('\',\'', $chars).'\'';
$cd = ' AND `user` IN ('.$char.')';
}
@@ -451,6 +414,7 @@ class chat extends module{
$tpl->assign('nrep',$nrep);
$tpl->assign('rep',$rep);
$meta.= $this->repmeta();
+ $content = "";
$core->make_page($content,TRUE,$config['fullpath'].'/modules/chat/templates/default/reports.tpl',$config['fullpath'].'/modules/chat/templates/default/chat_header.tpl',$config['fullpath'].'/modules/chat/templates/default/chat_footer.tpl');
}else{
//echo "SELECT r.*,u.username,u.fuid,c.name,r.fuid as `cpid`,s.username as `cname` FROM `ptc_reports` r LEFT JOIN `" . $config["prefix"] . "users` u ON u.`uid`=r.`rpid` LEFT JOIN `" . $config["prefix"] . "users` s ON s.`uid`=r.`uid` LEFT JOIN `" . $config["prefix"] . "rp_chars` c ON c.`id`=r.`chid` WHERE `seen`='0' AND r.`uid`='". intval($_GET['uid']) ."' ORDER BY `time` DESC";
@@ -467,32 +431,15 @@ class chat extends module{
$tpl->assign('nrep',$nrep);
$tpl->assign('rep',$rep);
$meta.= $this->repmeta();
+ $content = "";
$core->make_page($content,TRUE,$config['fullpath'].'/modules/chat/templates/default/reports.tpl',$config['fullpath'].'/modules/chat/templates/default/chat_header.tpl',$config['fullpath'].'/modules/chat/templates/default/chat_footer.tpl');
}
}
}
}
-
-
-function xmeta(){
- $meta='
- ';
- return $meta;
-}
function repmeta(){
- global $yacsid,$config;
+ global $yacsid,$config, $meta;
$meta.="
@@ -1108,7 +1055,8 @@ function inmeta2(){
}
function meta_editlog(){
- $meta="
+ global $config;
+ $meta="
";
return $meta;
}
+
function footer_logs(){
- $footer.="
+ global $config, $footer;
+ $footer.="
";
return $footer;
diff --git a/modules/nickpage/nickpage.output.php b/modules/nickpage/nickpage.output.php
index 94db1a6..c7c1246 100644
--- a/modules/nickpage/nickpage.output.php
+++ b/modules/nickpage/nickpage.output.php
@@ -45,12 +45,17 @@ class nickpage extends module{
$result=$db->query("SELECT * FROM `" . $config["prefix"] . "v_nickpage` WHERE `username`='".$db->escape($_GET['user'])."' LIMIT 1");
$user=$db->fetch_array($result);
-
+ $themedir = $this->getTemplateDir();
if(!isset($_GET['user']) || $db->num_rows($result)<=0 || $_GET['user']==''){
$db->free_result($result);
header("HTTP/1.1 404 Not Found");
header("Status: 404 Not Found");
$user['sitetitle']='Nickpage nicht gefunden';
+ $this->tpl->assign('user',$user);
+ $this->tpl->assign("themepath",'/themes/'.$config['theme']);
+ $this->tpl->assign('domain',$config['domain']);
+ $content=$this->tpl->fetch('nickpage_error.tpl');
+ $core->make_page($content,TRUE,$themedir.'/nickpage.tpl',NULL,NULL);
}else{
$parser=new textparser();
$loggedin = false;
@@ -136,9 +141,9 @@ class nickpage extends module{
$data=get_user_room($user['username']);
if($data){
$user['room']=$data['room'];
- $user['roomlock']='';
+ $user['roomlock']='
';
if($user['roomlocked']){
- $user['roomlock']='
';
+ $user['roomlock']='
';
}
}
@@ -193,7 +198,6 @@ class nickpage extends module{
$this->tpl->assign('pagination',$pagination);
$content=$this->tpl->fetch('nickpage_content.tpl');
}
- $themedir = $this->getTemplateDir();
$core->make_page($content,TRUE,$themedir.'/nickpage.tpl',NULL,NULL);
}
@@ -207,7 +211,14 @@ class nickpage extends module{
}
return $themedir;
}
-
+ function output_entry(){
+ if(!empty($_POST['submit'])){
+ die("Post entry");
+ } else {
+
+ }
+ }
+
function output_edit(){
global $module,$tpl,$config,$db,$log,$core,$error, $session;
If($_POST['submit']){
diff --git a/modules/nickpage/templates/funchat/nickpage_content.tpl b/modules/nickpage/templates/funchat/nickpage_content.tpl
index 28c7466..0416f61 100644
--- a/modules/nickpage/templates/funchat/nickpage_content.tpl
+++ b/modules/nickpage/templates/funchat/nickpage_content.tpl
@@ -1,8 +1,5 @@
Für den Inhalt ist ausschließlich der User selbst verantwortlich. Diese Nickpage ist Teil der FunCh.at Community.
diff --git a/modules/nickpage/templates/funchat/nickpage_error.tpl b/modules/nickpage/templates/funchat/nickpage_error.tpl new file mode 100644 index 0000000..20763bf --- /dev/null +++ b/modules/nickpage/templates/funchat/nickpage_error.tpl @@ -0,0 +1,38 @@ +Für den Inhalt ist ausschließlich der User selbst verantwortlich. Diese Nickpage ist Teil der FunCh.at Community.
+ +
{if $gb!=""} {$pagination}
@@ -79,7 +77,9 @@ {/if}