Bugfixes and minor changes

This commit is contained in:
Daniel Winzen
2015-07-12 13:28:17 +02:00
parent 27b057dec0
commit 8399a52e28
4 changed files with 25 additions and 20 deletions

View File

@ -1,3 +1,6 @@
Version 1.11.1 - Jul. 12, 2015
Bugfixes and minor changes
Version 1.11 - Jul. 11, 2015
Clean all messages of someone
Kick via active session display

View File

@ -560,8 +560,10 @@ function send_sessions(){
if($temp['status']!=0 && $temp['entry']==0 && (!$temp['incognito'] || $temp['status']<$U['status'])){
if($temp['status']==1 || $temp['status']==2) $s='&nbsp;(G)';
elseif($temp['status']==3) $s='';
elseif($temp['status']==5 || $temp['status']==6) $s='&nbsp;(M)';
elseif($temp['status']>=7) $s='&nbsp;(A)';
elseif($temp['status']==5) $s='&nbsp;(M)';
elseif($temp['status']==6) $s='&nbsp;(SM)';
elseif($temp['status']==7) $s='&nbsp;(A)';
elseif($temp['status']==8) $s='&nbsp;(SA)';
echo '<tr><td align="left">'.style_this($temp['nickname'].$s, $temp['fontinfo']).'</td><td>'.get_timeout($temp['lastpost'], $temp['status']).'</td>';
if($U['status']>$temp['status'] || $U['session']==$temp['session']){
echo "<td align=\"left\">$temp[useragent]</td>";
@ -668,7 +670,7 @@ function send_filter($arg=''){
function send_frameset(){
global $C, $H, $I, $U, $mysqli;
header('Content-Type: text/html; charset=UTF-8'); header('Pragma: no-cache'); header('Cache-Control: no-cache'); header('Expires: 0');
echo "<!DOCTYPE html><html><head>$H[meta_html]";
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\" \"http://www.w3.org/TR/html4/frameset.dtd\"><html><head>$H[meta_html]";
print_stylesheet();
if(isSet($_COOKIE['test'])){
echo "</head><frameset rows=\"100,*,60\" border=\"3\" frameborder=\"3\" framespacing=\"3\"><frame name=\"post\" src=\"$_SERVER[SCRIPT_NAME]?action=post\"><frame name=\"view\" src=\"$_SERVER[SCRIPT_NAME]?action=view\"><frame name=\"controls\" src=\"$_SERVER[SCRIPT_NAME]?action=controls\"><noframes><body>$I[noframes]$H[backtologin]</body></noframes></frameset></html>";
@ -781,16 +783,15 @@ function send_waiting_room(){
}else{
if(isSet($_COOKIE['test'])){
header("Refresh: $C[defaultrefresh]; URL=$_SERVER[SCRIPT_NAME]?action=wait");
echo "<!DOCTYPE html><html><head>$H[meta_html]<meta http-equiv=\"Refresh\" content=\"$C[defaultrefresh]; URL=$_SERVER[SCRIPT_NAME]?action=wait\">";
print_start('waitingroom', $C['defaultrefresh'], "$_SERVER[SCRIPT_NAME]?action=wait");
}else{
header("Refresh: $C[defaultrefresh]; URL=$_SERVER[SCRIPT_NAME]?action=wait&session=$U[session]");
echo "<!DOCTYPE html><html><head>$H[meta_html]<meta http-equiv=\"Refresh\" content=\"$C[defaultrefresh]; URL=$_SERVER[SCRIPT_NAME]?action=wait&amp;session=$U[session]&amp;lang=$C[lang]\">";
print_start('waitingroom', $C['defaultrefresh'], "$_SERVER[SCRIPT_NAME]?action=wait&amp;session=$U[session]&amp;lang=$C[lang]");
}
print_stylesheet();
if($wait){
echo "</head><body><center><h2>$I[waitingroom]</h2><p>".sprintf($I['waittext'], $U['displayname'], $timeleft).'</p><br><p>'.sprintf($I['waitreload'], $C['defaultrefresh']).'</p><br><br>';
echo "<center><h2>$I[waitingroom]</h2><p>".sprintf($I['waittext'], $U['displayname'], $timeleft).'</p><br><p>'.sprintf($I['waitreload'], $C['defaultrefresh']).'</p><br><br>';
}else{
echo "</head><body><center><h2>$I[waitingroom]</h2><p>".sprintf($I['admwaittext'], $U['displayname']).'</p><br><p>'.sprintf($I['waitreload'], $C['defaultrefresh']).'</p><br><br>';
echo "<center><h2>$I[waitingroom]</h2><p>".sprintf($I['admwaittext'], $U['displayname']).'</p><br><p>'.sprintf($I['waitreload'], $C['defaultrefresh']).'</p><br><br>';
}
echo "<hr><form action=\"$_SERVER[SCRIPT_NAME]\" method=\"post\">".hidden('action', 'wait').hidden('session', $U['session']).hidden('lang', $C['lang']).submit($I['reload']).'</form><br>';
echo "<h2>$I[rules]</h2><b>".get_setting('rulestxt').'</b></center>';
@ -1101,8 +1102,10 @@ function print_memberslist(){
echo "<option value=\"$member[0]\" style=\"$member[2]\">$member[0]";
if($member[1]==0) echo ' (!)';
elseif($member[1]==2) echo ' (G)';
elseif($member[1]==5 || $member[1]==6) echo ' (M)';
elseif($member[1]>=7) echo ' (A)';
elseif($member[1]==5) echo ' (M)';
elseif($member[1]==6) echo ' (SM)';
elseif($member[1]==7) echo ' (A)';
elseif($member[1]==8) echo ' (SA)';
echo '</option>';
}
}
@ -1126,10 +1129,10 @@ function create_session($setup){
mysqli_stmt_bind_param($stmt, 'i', $_REQUEST['challenge']);
mysqli_stmt_execute($stmt);
mysqli_stmt_bind_result($stmt, $code);
if(!mysqli_stmt_fetch($stmt)) send_error($I['captchatime']);
if(!mysqli_stmt_fetch($stmt)) send_error($I['captchaexpire']);
mysqli_stmt_close($stmt);
}else{
if(!$code=$memcached->get("$C[dbname]-$C[prefix]captcha-$_REQUEST[challenge]")) send_error($I['captchatime']);
if(!$code=$memcached->get("$C[dbname]-$C[prefix]captcha-$_REQUEST[challenge]")) send_error($I['captchaexpire']);
$memcached->delete("$C[dbname]-$C[prefix]captcha-$_REQUEST[challenge]");
}
if($_REQUEST['captcha']!=$code) send_error($I['wrongcaptcha']);
@ -2375,7 +2378,7 @@ function load_lang(){
function load_config(){
global $C;
$C=array(
'version' =>'1.11', // Script version
'version' =>'1.11.1', // Script version
'dbversion' =>10, // Database version
'colbg' =>'000000', // Background colour
'coltxt' =>'FFFFFF', // Default text colour

View File

@ -93,7 +93,7 @@ $I=array(
'memsuguest' => 'Zu Anwerber machen (G)',
'memreg' => 'Zu regulärem Mitglied machen',
'memmod' => 'Zu Moderator machen (M)',
'memsumod' => 'Zu Supermod machen (M)',
'memsumod' => 'Zu Supermod machen (SM)',
'memadm' => 'Zu Admin machen (A)',
'change' => 'Ändern',
'regguest' => 'Gast registrieren',
@ -191,7 +191,7 @@ $I=array(
'butallowdeny' => 'Senden',
'waitempty' => 'Keine weiteren Beitrittsanfragen zu akzeptieren.',
'wrongcaptcha' => 'Falsches Captcha',
'captchatime' => 'Captcha wurde bereits verwendet oder ist abgelaufen.',
'captchaexpire' => 'Captcha wurde bereits verwendet oder ist abgelaufen.',
'noguests' => 'Entschuldigung, zur Zeit nur Mitglieder!',
'curchat' => 'Zurzeit sind %d Teilnehmer im Raum:',
'cantreg' => '%s kann nicht registriert werden',

View File

@ -1,4 +1,3 @@
<?php
/*
* LE CHAT-PHP - a PHP Chat based on LE CHAT - English translation
@ -38,7 +37,7 @@ $I=array(
'sulogin' => 'Superadmin Login',
'sunick' => 'Superadmin Nickname:',
'supass' => 'Superadmin Password:',
'suconfirm' => 'Confirm Passorwd:',
'suconfirm' => 'Confirm Password:',
'susuccess' => 'Successfully registered!',
'initbtn' => 'Initalise Chat',
'initdbexist' => 'Database tables already exist! To continue, you have to delete these tables manually first.',
@ -95,7 +94,7 @@ $I=array(
'memsuguest' => 'Set to applicant (G)',
'memreg' => 'Set to regular member',
'memmod' => 'Set to moderator (M)',
'memsumod' => 'Set to supermod (M)',
'memsumod' => 'Set to supermod (SM)',
'memadm' => 'Set to admin (A)',
'change' => 'Change',
'regguest' => 'Register Guest',
@ -125,7 +124,7 @@ $I=array(
'waitreload' => 'If this page doesn\'t refresh every %d seconds, use the button below to reload it manually!',
'reload' => 'Reload',
'rules' => 'Rules',
'talkto' => 'Talk to',
'talkto' => 'Send to',
'toall' => 'All chatters',
'tomem' => 'Members only',
'tostaff' => 'Staff only',
@ -193,7 +192,7 @@ $I=array(
'butallowdeny' => 'Submit',
'waitempty' => 'No more entry requests to approve.',
'wrongcaptcha' => 'Wrong Captcha',
'captchatime' => 'Captcha already used or timed out.',
'captchaexpire' => 'Captcha already used or timed out.',
'noguests' => 'Sorry, currently members only!',
'curchat' => 'Currently %d chatter(s) in room:',
'cantreg' => 'Can\'t register %s',