$I[guestacc] ";
+ echo " $I[guestacc] ";
echo '';
echo '
';
thr();
$englobal=(int) get_setting('englobalpass');
- echo "$I[globalloginpass] ";
- echo '';
+ echo "$I[globalloginpass] ";
+ echo ' ';
thr();
$ga=(int) get_setting('guestreg');
- echo "$I[guestreg] ";
+ echo " $I[guestreg] ";
echo '';
echo '$I[asmember] ";
echo '
';
thr();
- echo "$I[sysmessages] ";
- echo '';
+ echo "$I[sysmessages] ";
+ echo '
';
foreach($C['text_settings'] as $setting){
thr();
- echo ''.$I[$setting].' ';
+ echo " ';
}
foreach($C['colour_settings'] as $setting){
thr();
- echo ''.$I[$setting].' ';
+ echo " ';
}
thr();
- echo "$I[captcha] ";
- echo '';
+ echo "$I[captcha] ";
+ echo '';
if(!extension_loaded('gd')){
echo "$I[gdextrequired] ";
}else{
@@ -604,8 +625,8 @@ function send_setup($C){
}
echo '
';
thr();
- echo "$I[defaulttz] ";
- echo "";
+ echo "$I[defaulttz] ";
+ echo "";
$tzs=[-12=>'-12', -11=>'-11', -10=>'-10', -9=>'-9', -8=>'-8', -7=>'-7', -6=>'-6', -5=>'-5', -4=>'-4', -3=>'-3', -2=>'-2', -1=>'-1', 0=>'', 1=>'+1', 2=>'+2', 3=>'+3', 4=>'+4', 5=>'+5', 6=>'+6', 7=>'+7', 8=>'+8', 9=>'+9', 10=>'+10', 11=>'+11', 12=>'+12', 13=>'+13', 14=>'+14'];
$defaulttz=get_setting('defaulttz');
foreach($tzs as $tz=>$name){
@@ -616,19 +637,19 @@ function send_setup($C){
echo '
';
foreach($C['textarea_settings'] as $setting){
thr();
- echo ''.$I[$setting].' ';
+ echo " ".$I[$setting].' ';
echo "';
echo '
';
}
foreach($C['number_settings'] as $setting){
thr();
- echo ''.$I[$setting].' ';
+ echo " ';
}
foreach($C['bool_settings'] as $setting){
thr();
- echo ''.$I[$setting].' ';
+ echo " ".$I[$setting].' ';
echo "";
$value=(bool) get_setting($setting);
echo ''.submit($I['apply']).'
';
if($U['status']==8){
- echo '';
+ echo '';
echo "<$H[form]>$H[commonform]".hidden('action', 'setup').hidden('do', 'backup');
if(!isSet($_REQUEST['session'])){
echo hidden('session', $U['session']);
@@ -668,7 +689,7 @@ function send_setup($C){
}
function restore_backup($C){
- global $db;
+ global $db, $memcached;
if(!extension_loaded('json')){
return;
}
@@ -775,27 +796,27 @@ function send_backup($C){
$chknotes='';
}
print_start('backup');
- echo "$I[backuprestore] ";
+ echo "$I[backuprestore] ";
thr();
if(!extension_loaded('json')){
echo "$I[jsonextrequired] ";
}else{
echo "<$H[form]>$H[commonform]".hidden('action', 'setup').hidden('do', 'backup');
- echo '';
+ echo ' ';
+ echo ''.submit($I['backup']).'
';
thr();
echo "<$H[form]>$H[commonform]".hidden('action', 'setup').hidden('do', 'restore');
- echo '';
+ echo '';
+ echo ''.submit($I['restore']).'
';
echo ' ';
}
thr();
@@ -807,7 +828,7 @@ function send_backup($C){
function send_destroy_chat(){
global $H, $I;
print_start('destroy_chat');
- echo "$I[confirm] ";
+ echo "$I[confirm] ";
echo "<$H[form] target=\"_parent\">$H[commonform]".hidden('action', 'setup').hidden('do', 'destroy').hidden('confirm', 'yes').submit($I['yes'], 'class="delbutton"').' ';
echo "<$H[form]>$H[commonform]".hidden('action', 'setup').submit($I['no'], 'class="backbutton"').'
';
print_end();
@@ -816,7 +837,7 @@ function send_destroy_chat(){
function send_delete_account(){
global $H, $I;
print_start('delete_account');
- echo "$I[confirm] ";
+ echo "$I[confirm] ";
echo "<$H[form]>$H[commonform]".hidden('action', 'profile').hidden('do', 'delete').hidden('confirm', 'yes').submit($I['yes'], 'class="delbutton"').' ';
echo "<$H[form]>$H[commonform]".hidden('action', 'profile').submit($I['no'], 'class="backbutton"').'
';
print_end();
@@ -826,12 +847,12 @@ function send_init(){
global $H, $I, $L;
print_start('init');
echo "$I[init] ";
- echo "<$H[form]>$H[commonform]".hidden('action', 'init')."$I[sulogin] ";
+ echo "<$H[form]>$H[commonform]".hidden('action', 'init')."$I[sulogin] '.submit($I['initbtn']).'
';
- echo "$I[changelang]";
+ echo "
$I[changelang]";
foreach($L as $lang=>$name){
echo " $name ";
}
@@ -849,12 +870,12 @@ function send_update(){
function send_alogin(){
global $H, $I, $L;
print_start('alogin');
- echo "<$H[form]>$H[commonform]".hidden('action', 'setup').'
';
+ echo "<$H[form]>$H[commonform]".hidden('action', 'setup').'';
- echo "$I[changelang]";
+ echo '
'.submit($I['login']).'
';
+ echo "$I[changelang]";
foreach($L as $lang=>$name){
echo " $name ";
}
@@ -879,15 +900,15 @@ function send_admin($arg=''){
}
}
$chlist.='';
- echo "
$I[admfunc] $arg ";
+ echo "$I[admfunc] $arg ";
if($U['status']>=7){
thr();
echo "<$H[form] target=\"view\">$H[commonform]".hidden('action', 'setup').submit($I['initgosetup']).' ';
}
thr();
- echo "$I[cleanmsgs] ";
+ echo " $I[cleanmsgs] ";
frmadm('clean');
- echo ' ';
thr();
- echo ''.sprintf($I['kickchat'], get_setting('kickpenalty')).' ';
+ echo ' '.sprintf($I['kickchat'], get_setting('kickpenalty')).' ';
frmadm('kick');
- echo " ';
thr();
- echo "$I[logoutinact] ";
+ echo " $I[logoutinact] ";
frmadm('logout');
- echo "$chlist ";
+ echo "$chlist ";
echo submit($I['logout']).'
';
$views=array('sessions', 'filter', 'linkfilter');
foreach($views as $view){
thr();
- echo ''.$I[$view].' ';
+ echo " ".$I[$view].' ';
frmadm($view);
echo submit($I['view']).'
';
}
thr();
- echo "$I[topic] ";
+ echo " $I[topic] ";
frmadm('topic');
- echo ' ';
thr();
- echo "$I[guestacc] ";
+ echo " $I[guestacc] ";
frmadm('guestaccess');
- echo '';
+ echo '';
echo '';
echo ' '.submit($I['change']).'
';
thr();
if(get_setting('suguests')){
- echo "$I[addsuguest] ";
+ echo " $I[addsuguest] ";
frmadm('superguest');
- echo "$I[choose] ";
+ echo "$I[choose] ";
foreach($users as $user){
if($user[2]==1){
echo "$user[0] ";
@@ -965,9 +986,9 @@ function send_admin($arg=''){
thr();
}
if($U['status']>=7){
- echo "$I[admmembers] ";
+ echo " $I[admmembers] ";
frmadm('status');
- echo "$I[choose] ";
+ echo "$I[choose] ";
$members=[];
$result=$db->query('SELECT nickname, style, status FROM ' . PREFIX . 'members ORDER BY LOWER(nickname);');
while($temp=$result->fetch(PDO::FETCH_NUM)){
@@ -1002,17 +1023,17 @@ function send_admin($arg=''){
}
echo ''.submit($I['change']).'
';
thr();
- echo "$I[passreset] ";
+ echo " $I[passreset] ";
frmadm('passreset');
- echo " ';
thr();
- echo "$I[regguest] ";
+ echo " $I[regguest] ";
frmadm('register');
- echo "$I[choose] ";
+ echo "$I[choose] ";
foreach($users as $user){
if($user[2]==1){
echo "$user[0] ";
@@ -1020,9 +1041,9 @@ function send_admin($arg=''){
}
echo ''.submit($I['register']).'
';
thr();
- echo "$I[regmem] ";
+ echo " $I[regmem] ";
frmadm('regnew');
- echo " ';
thr();
@@ -1040,13 +1061,13 @@ function send_sessions(){
$lines=[];
}
print_start('sessions');
- echo "$I[sessact] ";
- echo "$I[sessnick] $I[sesstimeout] $I[sessua] ";
+ echo "$I[sessact] ";
+ echo "$I[sessnick] $I[sesstimeout] $I[sessua] ";
$trackip=(bool) get_setting('trackip');
$memexpire=(int) get_setting('memberexpire');
$guestexpire=(int) get_setting('guestexpire');
- if($trackip) echo "$I[sesip] ";
- echo "$I[actions] ";
+ if($trackip) echo "$I[sesip] ";
+ echo "$I[actions] ";
foreach($lines as $temp){
if($temp['status']==0){
$s=' (K)';
@@ -1063,7 +1084,7 @@ function send_sessions(){
}else{
$s=' (SA)';
}
- echo ''.style_this(htmlspecialchars($temp['nickname']).$s, $temp['style']).' ';
+ echo ' '.style_this(htmlspecialchars($temp['nickname']).$s, $temp['style']).' ';
if($temp['status']>2){
get_timeout($temp['lastpost'], $memexpire);
}else{
@@ -1071,11 +1092,11 @@ function send_sessions(){
}
echo ' ';
if($U['status']>$temp['status'] || $U['nickname']===$temp['nickname']){
- echo "$temp[useragent] ";
+ echo "$temp[useragent] ";
if($trackip){
- echo "$temp[ip] ";
+ echo "$temp[ip] ";
}
- echo '';
+ echo ' ';
if($temp['nickname']!==$U['nickname']){
echo '';
if($temp['status']!=0){
@@ -1093,11 +1114,11 @@ function send_sessions(){
}
echo ' ';
}else{
- echo '- ';
+ echo '- ';
if($trackip){
- echo '- ';
+ echo '- ';
}
- echo '- ';
+ echo '- ';
}
}
echo "
";
@@ -1126,6 +1147,7 @@ function check_filter_match(&$reg){
function manage_filter(){
global $db, $memcached;
if(isSet($_REQUEST['id'])){
+ $reg=0;
if($tmp=check_filter_match($reg)){
return $tmp;
}
@@ -1165,6 +1187,7 @@ function manage_filter(){
function manage_linkfilter(){
global $db, $memcached;
if(isSet($_REQUEST['id'])){
+ $reg=0;
if($tmp=check_filter_match($reg)){
return $tmp;
}
@@ -1225,7 +1248,7 @@ function get_linkfilters(){
function send_filter($arg=''){
global $H, $I, $U;
print_start('filter');
- echo "$I[filter] $arg ';
+ echo ''.submit($I['add']).'
';
echo "
";
echo "<$H[form]>$H[commonform]".hidden('action', 'admin').hidden('do', 'filter').submit($I['reload']).'';
print_end();
@@ -1291,10 +1314,10 @@ function send_filter($arg=''){
function send_linkfilter($arg=''){
global $H, $I, $U;
print_start('linkfilter');
- echo "$I[linkfilter] $arg ";
+ echo "$I[linkfilter] $arg ';
+ echo ''.submit($I['add']).'
';
echo "
";
echo "<$H[form]>$H[commonform]".hidden('action', 'admin').hidden('do', 'linkfilter').submit($I['reload']).'';
print_end();
@@ -1391,9 +1414,8 @@ function send_messages(){
$sort='';
}
print_start('messages', $U['refresh'], "$_SERVER[SCRIPT_NAME]?action=view&session=$U[session]&lang=$language$nocache$sort");
- echo '';
echo '
';
- echo "
$I[bottom] ";
+ echo "
$I[bottom] ";
if(!$U['sortupdown']){
echo '
';
echo get_setting('topic');
@@ -1409,15 +1431,13 @@ function send_messages(){
echo get_setting('topic');
echo '
';
}
- echo "
$I[top] ";
- echo '
';
+ echo "$I[top] ";
print_end();
}
function send_inbox(){
global $H, $I, $U, $db;
- print_start('messages');
- echo '';
+ print_start('inbox');
echo "<$H[form]>$H[commonform]".hidden('action', 'inbox').hidden('do', 'clean').submit($I['delselmes'], 'class="delbutton"').' ';
$dateformat=get_setting('dateformat');
$tz=3600*$U['tz'];
@@ -1452,7 +1472,6 @@ function send_inbox(){
echo " $message[text]
";
}
echo " $H[backtochat]";
- echo '';
print_end();
}
@@ -1460,7 +1479,7 @@ function send_notes($type){
global $H, $I, $U, $db;
print_start('notes');
if($U['status']>=6){
- echo "<$H[form] target=\"view\">$H[commonform]".hidden('action', 'notes').hidden('do', 'admin').submit($I['admnotes']).' ';
+ echo "<$H[form] target=\"view\">$H[commonform]".hidden('action', 'notes').hidden('do', 'admin').submit($I['admnotes']).' ';
echo "<$H[form] target=\"view\">$H[commonform]".hidden('action', 'notes').submit($I['notes']).'
';
}
if($type==='staff'){
@@ -1516,7 +1535,7 @@ function send_notes($type){
echo hidden('action', 'notes')." ';
echo submit($I['savenotes']).' ';
if($num[0]>1){
- echo "$I[revisions] ";
+ echo "$I[revisions] ";
if($revision<$num[0]-1){
echo "<$H[form]>$H[commonform]".hidden('action', 'notes').hidden('revision', $revision+1);
if($type==='admin'){
@@ -1543,19 +1562,19 @@ function send_approve_waiting(){
$result=$db->query('SELECT * FROM ' . PREFIX . 'sessions WHERE entry=0 AND status=1 ORDER BY id;');
if($tmp=$result->fetchAll(PDO::FETCH_ASSOC)){
frmadm('approve');
- echo '';
}else{
echo "$I[waitempty] ";
}
@@ -1605,7 +1624,7 @@ function send_waiting_room(){
echo hidden('action', 'logout').submit($I['exit'], 'id="exitbutton"').'';
$rulestxt=get_setting('rulestxt');
if(!empty($rulestxt)){
- echo "$I[rules] $rulestxt ";
+ echo "
$I[rules] $rulestxt ";
}
print_end();
}
@@ -1614,19 +1633,17 @@ function send_waiting_room(){
function send_choose_messages(){
global $I, $U;
print_start('choose_messages');
- echo '';
frmadm('clean');
echo hidden('what', 'selected').submit($I['delselmes'], 'class="delbutton"').' ';
print_messages($U['status']);
echo ' '.submit($I['delselmes'], 'class="delbutton"')."";
- echo '
';
print_end();
}
function send_del_confirm(){
global $I;
print_start('del_confirm');
- echo "$I[confirm] ";
+ echo "$I[confirm] ";
frmpst('delete');
if(isSet($_REQUEST['multi'])){
echo hidden('multi', 'on');
@@ -1653,13 +1670,13 @@ function send_post(){
if(!isSet($_REQUEST['sendto'])){
$_REQUEST['sendto']='';
}
- echo '';
+ echo '';
frmpst('post');
echo hidden('postid', $U['postid']);
if(isSet($_REQUEST['multi'])){
echo hidden('multi', 'on');
}
- echo ''.style_this(htmlspecialchars($U['nickname']), $U['style']).' : ';
+ echo ''.style_this(htmlspecialchars($U['nickname']), $U['style']).' : ';
if(!isSet($U['rejected'])){
$U['rejected']='';
}
@@ -1721,7 +1738,7 @@ function send_post(){
echo '';
if(get_setting('enfileupload')){
if(!$disablepm && ($U['status']>=5 || ($U['status']>=3 && get_count_mods()==0 && get_setting('memkick')))){
- echo '
';
frmpst('delete');
if(isSet($_REQUEST['multi'])){
echo hidden('multi', 'on');
@@ -1757,23 +1774,20 @@ function send_greeting(){
global $I, $U, $language;
print_start('greeting', $U['refresh'], "$_SERVER[SCRIPT_NAME]?action=view&session=$U[session]&lang=$language");
printf("$I[greetingmsg] ", style_this(htmlspecialchars($U['nickname']), $U['style']));
- echo '';
printf("
$I[entryhelp] ", $U['refresh']);
$rulestxt=get_setting('rulestxt');
if(!empty($rulestxt)){
- echo "
$I[rules] $rulestxt";
+ echo "
$I[rules] $rulestxt";
}
- echo '
';
print_end();
}
function send_help(){
global $H, $I, $U;
print_start('help');
- echo '';
$rulestxt=get_setting('rulestxt');
if(!empty($rulestxt)){
- echo "
$I[rules] $rulestxt
";
+ echo "
$I[rules] $rulestxt";
}
echo "
$I[help] $I[helpguest]";
if(get_setting('imgembed')){
@@ -1788,15 +1802,14 @@ function send_help(){
}
}
}
- echo "
$H[backtochat]$H[credit]
";
- echo '
';
+ echo "$H[backtochat]$H[credit]
";
print_end();
}
function send_profile($arg=''){
global $F, $H, $I, $L, $U, $db, $language;
print_start('profile');
- echo "<$H[form]>$H[commonform]".hidden('action', 'profile').hidden('do', 'save')."$I[profile] $arg ";
+ echo "<$H[form]>$H[commonform]".hidden('action', 'profile').hidden('do', 'save')."$I[profile] $arg ";
thr();
$ignored=[];
$stmt=$db->prepare('SELECT ign FROM ' . PREFIX . 'ignored WHERE ignby=?;');
@@ -1805,7 +1818,7 @@ function send_profile($arg=''){
$ignored[]=htmlspecialchars($tmp['ign']);
}
if(count($ignored)>0){
- echo "$I[unignore] ";
+ echo " $I[unignore] ";
echo "$I[choose] ";
foreach($ignored as $ign){
echo "$ign ";
@@ -1813,7 +1826,7 @@ function send_profile($arg=''){
echo '
';
thr();
}
- echo "$I[ignore] ";
+ echo " $I[ignore] ";
echo "$I[choose] ";
$stmt=$db->prepare('SELECT poster, style FROM ' . PREFIX . 'messages INNER JOIN ' . PREFIX . 'sessions ON (' . PREFIX . 'messages.poster=' . PREFIX . 'sessions.nickname) WHERE poster!=? AND (status<=? OR status<=3) AND poster NOT IN (SELECT ign FROM ' . PREFIX . 'ignored WHERE ignby=?) GROUP BY poster;');
$stmt->execute([$U['nickname'], $U['status'], $U['nickname']]);
@@ -1822,18 +1835,18 @@ function send_profile($arg=''){
}
echo '
';
thr();
- echo "$I[refreshrate] ";
+ echo " ";
thr();
preg_match('/#([0-9a-f]{6})/i', $U['style'], $matches);
- echo "$I[fontcolour] ($I[viewexample] )";
+ echo " ";
thr();
- echo "$I[bgcolour] ($I[viewexample] )";
+ echo " ";
thr();
if($U['status']>=3){
- echo "$I[fontface] ";
+ echo "$I[fontface] ";
echo " * $I[roomdefault] * ";
foreach($F as $name=>$font){
echo "'.$I[$setting].' ';
+ echo " ".$I[$setting].' ';
echo " =2 && get_setting('eninbox')){
- echo " $I[eninbox] ";
+ echo " $I[eninbox] ";
echo "";
echo '
';
thr();
}
- echo "$I[tz] ";
- echo "";
+ echo "$I[tz] ";
+ echo "";
$tzs=[-12=>'-12', -11=>'-11', -10=>'-10', -9=>'-9', -8=>'-8', -7=>'-7', -6=>'-6', -5=>'-5', -4=>'-4', -3=>'-3', -2=>'-2', -1=>'-1', 0=>'', 1=>'+1', 2=>'+2', 3=>'+3', 4=>'+4', 5=>'+5', 6=>'+6', 7=>'+7', 8=>'+8', 9=>'+9', 10=>'+10', 11=>'+11', 12=>'+12', 13=>'+13', 14=>'+14'];
foreach($tzs as $tz=>$name){
$select = $U['tz']==$tz ? ' selected' : '';
@@ -1906,21 +1919,21 @@ function send_profile($arg=''){
}
echo '
';
thr();
- echo "$I[pbsize] ";
+ echo " ';
thr();
if($U['status']>=5){
- echo "$I[nbsize] ";
+ echo " ';
thr();
}
if($U['status']>=2){
- echo "$I[changepass] ";
- echo '';
+ echo "$I[changepass] ";
+ echo '';
echo " $I[oldpass] ";
echo " $I[newpass] ";
echo " $I[confirmpass] ";
@@ -1932,19 +1945,18 @@ function send_profile($arg=''){
if($U['status']>1 && $U['status']<8){
echo " <$H[form]>$H[commonform]".hidden('action', 'profile').hidden('do', 'delete').submit($I['deleteacc'], 'class="delbutton"').'';
}
- echo "$I[changelang]";
+ echo "
$I[changelang]";
foreach($L as $lang=>$name){
echo " $name ";
}
- echo '
';
- echo " $H[backtochat]";
+ echo " $H[backtochat]";
print_end();
}
function send_controls(){
global $H, $I, $U;
print_start('controls');
- echo '';
+ echo '';
echo "<$H[form] target=\"post\">$H[commonform]".hidden('action', 'post').submit($I['reloadpb']).' ';
echo "<$H[form] target=\"view\">$H[commonform]".hidden('action', 'view').submit($I['reloadmsgs']).' ';
echo "<$H[form] target=\"view\">$H[commonform]".hidden('action', 'profile').submit($I['chgprofile']).' ';
@@ -1997,18 +2009,18 @@ function send_logout(){
function send_colours(){
global $H, $I;
print_start('colours');
- echo "$I[colourtable] ";
+ echo "$I[colourtable] ";
for($red=0x00;$red<=0xFF;$red+=0x33){
for($green=0x00;$green<=0xFF;$green+=0x33){
for($blue=0x00;$blue<=0xFF;$blue+=0x33){
$hcol=sprintf('%02X', $red).sprintf('%02X', $green).sprintf('%02X', $blue);
- echo "$hcol ";
+ echo "$hcol ";
}
echo ' ';
}
echo ' ';
}
- echo " <$H[form]>$H[commonform]".hidden('action', 'profile').submit($I['backtoprofile'], ' class="backbutton"').'';
+ echo "<$H[form]>$H[commonform]".hidden('action', 'profile').submit($I['backtoprofile'], ' class="backbutton"').'';
print_end();
}
@@ -2025,19 +2037,19 @@ function send_login(){
if($englobal===1 && isSet($_POST['globalpass'])){
echo hidden('globalpass', $_POST['globalpass']);
}
- echo '';
+ echo '';
get_nowchatting();
- echo '';
+ echo '
';
echo get_setting('topic');
echo '
';
$rulestxt=get_setting('rulestxt');
if(!empty($rulestxt)){
- echo "
$I[rules] $rulestxt ";
+ echo "
$I[rules] $rulestxt ";
}
}else{
- echo "
$I[globalloginpass] ";
+ echo "
$I[globalloginpass] ";
if($ga===0){
echo "
$I[noguests] ";
}
echo '
'.submit($I['enter']).'
';
}
- echo "$I[changelang]";
+ echo "
$I[changelang]";
foreach($L as $lang=>$name){
echo " $name ";
}
@@ -2076,7 +2088,7 @@ function send_chat_disabled(){
function send_error($err){
global $H, $I;
print_start('error');
- echo "
$I[error]: $err $H[backtologin]";
+ echo "$I[error]: $err $H[backtologin]";
print_end();
}
@@ -2116,7 +2128,7 @@ function print_notifications(){
function print_chatters(){
global $I, $U, $db, $language;
if(!$U['hidechatters']){
- echo '';
+ echo '';
$stmt=$db->prepare('SELECT nickname, style, status FROM ' . PREFIX . 'sessions WHERE entry!=0 AND status>0 AND incognito=0 AND nickname NOT IN (SELECT ign FROM '. PREFIX . 'ignored WHERE ignby=?) AND nickname NOT IN (SELECT ignby FROM '. PREFIX . 'ignored WHERE ign=?) ORDER BY status DESC, lastpost DESC;');
$stmt->execute([$U['nickname'], $U['nickname']]);
$nc=substr(time(), -6);
@@ -2129,13 +2141,13 @@ function print_chatters(){
}
}
if(!empty($M)){
- echo "$I[members]: ".implode(' ', $M).' ';
+ echo "$I[members]: ".implode(' ', $M).' ';
if(!empty($G)){
echo ' ';
}
}
if(!empty($G)){
- echo "$I[guests]: ".implode(' ', $G).' ';
+ echo "$I[guests]: ".implode(' ', $G).' ';
}
echo '
';
}
@@ -2450,13 +2462,14 @@ function get_nowchatting(){
parse_sessions();
$stmt=$db->query('SELECT COUNT(*) FROM ' . PREFIX . 'sessions WHERE entry!=0 AND status>0 AND incognito=0;');
$count=$stmt->fetch(PDO::FETCH_NUM);
- echo sprintf($I['curchat'], $count[0]).' ';
+ echo ''.sprintf($I['curchat'], $count[0]).' ';
if(!get_setting('hidechatters')){
$stmt=$db->query('SELECT nickname, style FROM ' . PREFIX . 'sessions WHERE entry!=0 AND status>0 AND incognito=0 ORDER BY status DESC, lastpost DESC;');
while($user=$stmt->fetch(PDO::FETCH_NUM)){
echo style_this(htmlspecialchars($user[0]), $user[1]).' ';
}
}
+ echo '
';
}
function parse_sessions(){
@@ -2796,6 +2809,10 @@ function set_new_nickname(){
$stmt->execute(array($_REQUEST['newnickname'], $U['nickname']));
$stmt=$db->prepare('UPDATE ' . PREFIX . 'ignored SET ign=? WHERE ign=?;');
$stmt->execute(array($_REQUEST['newnickname'], $U['nickname']));
+ $stmt=$db->prepare('UPDATE ' . PREFIX . 'inbox SET poster=? WHERE poster=?;');
+ $stmt->execute(array($_REQUEST['newnickname'], $U['nickname']));
+ $stmt=$db->prepare('UPDATE ' . PREFIX . 'inbox SET recipient=? WHERE recipient=?;');
+ $stmt->execute(array($_REQUEST['newnickname'], $U['nickname']));
$U['nickname']=$_REQUEST['newnickname'];
}
return '';
@@ -3468,7 +3485,7 @@ function check_init(){
}
function destroy_chat($C){
- global $H, $I, $db, $language;
+ global $H, $I, $db, $language, $memcached;
setcookie(COOKIENAME, false);
print_start('destory');
$db->exec('DROP TABLE ' . PREFIX . 'captcha;');
@@ -3557,7 +3574,7 @@ function init_chat(){
$db->exec('CREATE INDEX ' . PREFIX . 'incognito ON ' . PREFIX . 'sessions(incognito);');
$db->exec('CREATE TABLE ' . PREFIX . "settings (setting varchar(50) NOT NULL PRIMARY KEY, value text NOT NULL)$diskengine$charset;");
- $settings=[['guestaccess', '0'], ['globalpass', ''], ['englobalpass', '0'], ['captcha', '0'], ['dateformat', 'm-d H:i:s'], ['rulestxt', ''], ['msgencrypted', '0'], ['dbversion', DBVERSION], ['css', 'a:visited{color:#B33CB4;} a:active{color:#FF0033;} a:link{color:#0000FF;} input,select,textarea{color:#FFFFFF;background-color:#000000;} a img{width:15%} a:hover img{width:35%} .error{color:#FF0033;} .delbutton{background-color:#660000;} .backbutton{background-color:#004400;} #exitbutton{background-color:#AA0000;} .center-table{margin-left:auto;margin-right:auto;} body{text-align:center;} .left-table{width:100%;text-align:left;} .right{text-align:right;} .left{text-align:left;} .right-table{border-spacing:0px;margin-left:auto;} .padded{padding:5px;} #chatters{max-height:100px;overflow-y:auto;} .center{text-align:center;}'], ['memberexpire', '60'], ['guestexpire', '15'], ['kickpenalty', '10'], ['entrywait', '120'], ['messageexpire', '14400'], ['messagelimit', '150'], ['maxmessage', 2000], ['captchatime', '600'], ['colbg', '000000'], ['coltxt', 'FFFFFF'], ['maxname', '20'], ['minpass', '5'], ['defaultrefresh', '20'], ['dismemcaptcha', '0'], ['suguests', '0'], ['imgembed', '1'], ['timestamps', '1'], ['trackip', '0'], ['captchachars', '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'], ['memkick', '1'], ['forceredirect', '0'], ['redirect', ''], ['incognito', '1'], ['chatname', 'My Chat'], ['topic', ''], ['msgsendall', $I['sendallmsg']], ['msgsendmem', $I['sendmemmsg']], ['msgsendmod', $I['sendmodmsg']], ['msgsendadm', $I['sendadmmsg']], ['msgsendprv', $I['sendprvmsg']], ['msgenter', $I['entermsg']], ['msgexit', $I['exitmsg']], ['msgmemreg', $I['memregmsg']], ['msgsureg', $I['suregmsg']], ['msgkick', $I['kickmsg']], ['msgmultikick', $I['multikickmsg']], ['msgallkick', $I['allkickmsg']], ['msgclean', $I['cleanmsg']], ['numnotes', '3'], ['mailsender', 'www-data '], ['mailreceiver', 'Webmaster '], ['sendmail', '0'], ['modfallback', '1'], ['guestreg', '0'], ['disablepm', '0'], ['disabletext', "$I[disabledtext] "], ['defaulttz', '0'], ['eninbox', '0'], ['passregex', '.*'], ['nickregex', '^[A-Za-z0-9]*$'], ['externalcss', ''], ['enablegreeting', '0'], ['sortupdown', '0'], ['hidechatters', '0'], ['enfileupload', '0'], ['msgattache', '%2$s [%1$s]'], ['maxuploadsize', '1024']];
+ $settings=[['guestaccess', '0'], ['globalpass', ''], ['englobalpass', '0'], ['captcha', '0'], ['dateformat', 'm-d H:i:s'], ['rulestxt', ''], ['msgencrypted', '0'], ['dbversion', DBVERSION], ['css', ''], ['memberexpire', '60'], ['guestexpire', '15'], ['kickpenalty', '10'], ['entrywait', '120'], ['messageexpire', '14400'], ['messagelimit', '150'], ['maxmessage', 2000], ['captchatime', '600'], ['colbg', '000000'], ['coltxt', 'FFFFFF'], ['maxname', '20'], ['minpass', '5'], ['defaultrefresh', '20'], ['dismemcaptcha', '0'], ['suguests', '0'], ['imgembed', '1'], ['timestamps', '1'], ['trackip', '0'], ['captchachars', '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'], ['memkick', '1'], ['forceredirect', '0'], ['redirect', ''], ['incognito', '1'], ['chatname', 'My Chat'], ['topic', ''], ['msgsendall', $I['sendallmsg']], ['msgsendmem', $I['sendmemmsg']], ['msgsendmod', $I['sendmodmsg']], ['msgsendadm', $I['sendadmmsg']], ['msgsendprv', $I['sendprvmsg']], ['msgenter', $I['entermsg']], ['msgexit', $I['exitmsg']], ['msgmemreg', $I['memregmsg']], ['msgsureg', $I['suregmsg']], ['msgkick', $I['kickmsg']], ['msgmultikick', $I['multikickmsg']], ['msgallkick', $I['allkickmsg']], ['msgclean', $I['cleanmsg']], ['numnotes', '3'], ['mailsender', 'www-data '], ['mailreceiver', 'Webmaster '], ['sendmail', '0'], ['modfallback', '1'], ['guestreg', '0'], ['disablepm', '0'], ['disabletext', "$I[disabledtext] "], ['defaulttz', '0'], ['eninbox', '0'], ['passregex', '.*'], ['nickregex', '^[A-Za-z0-9]*$'], ['externalcss', ''], ['enablegreeting', '0'], ['sortupdown', '0'], ['hidechatters', '0'], ['enfileupload', '0'], ['msgattache', '%2$s [%1$s]'], ['maxuploadsize', '1024']];
$stmt=$db->prepare('INSERT INTO ' . PREFIX . 'settings (setting, value) VALUES (?, ?);');
foreach($settings as $pair){
$stmt->execute($pair);
@@ -3649,7 +3666,7 @@ function update_db(){
$db->exec('ALTER TABLE ' . PREFIX . 'messages DROP postid;');
}
if($dbversion<10){
- $db->exec('INSERT INTO ' . PREFIX . "settings (setting, value) VALUES ('css', 'a:visited{color:#B33CB4;} a:active{color:#FF0033;} a:link{color:#0000FF;} input,select,textarea{color:#FFFFFF;background-color:#000000;} a img{width:15%} a:hover img{width:35%} .error{color:#FF0033;} .delbutton{background-color:#660000;} .backbutton{background-color:#004400;} #exitbutton{background-color:#AA0000;}'), ('memberexpire', '60'), ('guestexpire', '15'), ('kickpenalty', '10'), ('entrywait', '120'), ('messageexpire', '14400'), ('messagelimit', '150'), ('maxmessage', 2000), ('captchatime', '600');");
+ $db->exec('INSERT INTO ' . PREFIX . "settings (setting, value) VALUES ('css', ''), ('memberexpire', '60'), ('guestexpire', '15'), ('kickpenalty', '10'), ('entrywait', '120'), ('messageexpire', '14400'), ('messagelimit', '150'), ('maxmessage', 2000), ('captchatime', '600');");
$db->exec('ALTER TABLE ' . PREFIX . 'sessions ADD ip varchar(45) NOT NULL;');
}
if($dbversion<11){
@@ -3711,11 +3728,6 @@ function update_db(){
if($dbversion<15){
$db->exec('INSERT INTO ' . PREFIX . "settings (setting, value) VALUES ('mailsender', 'www-data '), ('mailreceiver', 'Webmaster '), ('sendmail', '0'), ('modfallback', '1'), ('guestreg', '0');");
}
- if($dbversion<16){
- $css=get_setting('css');
- $css.=' .center-table{margin-left:auto;margin-right:auto;} body{text-align:center;} .left-table{width:100%;text-align:left;} .right{text-align:right;} .left{text-align:left;} .right-table{border-spacing:0px;margin-left:auto;} .padded{padding:5px;} #chatters{max-height:100px;overflow-y:auto;} .center{text-align:center;}';
- update_setting('css', $css);
- }
if($dbversion<17){
$db->exec('ALTER TABLE ' . PREFIX . 'sessions ADD COLUMN nocache smallint NOT NULL DEFAULT 0;');
$db->exec('ALTER TABLE ' . PREFIX . 'members ADD COLUMN nocache smallint NOT NULL DEFAULT 0;');
@@ -3818,7 +3830,7 @@ function update_db(){
}
$db->exec('CREATE INDEX ' . PREFIX . 'inbox_poster ON ' . PREFIX . 'inbox(poster);');
$db->exec('CREATE INDEX ' . PREFIX . 'inbox_recipient ON ' . PREFIX . 'inbox(recipient);');
- $result=$olddb->query('SELECT filtermatch, filterreplace, regex FROM ' . PREFIX . 'filter;');
+ $result=$olddb->query('SELECT filtermatch, filterreplace, regex FROM ' . PREFIX . 'linkfilter;');
$data=$result->fetchAll(PDO::FETCH_NUM);
$db->exec('DROP TABLE ' . PREFIX . 'linkfilter;');
$db->exec('CREATE TABLE ' . PREFIX . "linkfilter (id integer PRIMARY KEY AUTO_INCREMENT, filtermatch varchar(255) NOT NULL, filterreplace varchar(255) NOT NULL, regex smallint NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;");
@@ -4053,6 +4065,7 @@ function load_lang(){
}
include('lang_en.php'); //always include English
if($language!=='en'){
+ $T=[];
include("lang_$language.php"); //replace with translation if available
foreach($T as $name=>$translation){
$I[$name]=$translation;
diff --git a/lang_de.php b/lang_de.php
index c7da9c7..34d5a39 100644
--- a/lang_de.php
+++ b/lang_de.php
@@ -72,7 +72,7 @@ $T=array(
'selection' => 'Auswahl',
'cleannick' => 'Folgender Nickname:',
'clean' => 'Löschen',
- 'kickchat' => 'Teilnehmer rausschmeißen (%d Minuten)',
+ 'kickchat' => 'Teilnehmer rausschmeißen (%d Minuten)',
'kickreason' => 'Begründung:',
'kickpurge' => 'Nachrichten löschen',
'kick' => 'Rausschmeißen',
diff --git a/lang_en.php b/lang_en.php
index 2403d1a..8816046 100644
--- a/lang_en.php
+++ b/lang_en.php
@@ -72,7 +72,7 @@ $I=array(
'selection' => 'Selection',
'cleannick' => 'Following nickname:',
'clean' => 'Clean',
- 'kickchat' => 'Kick Chatter (%d minutes)',
+ 'kickchat' => 'Kick Chatter (%d minutes)',
'kickreason' => 'Kickmessage:',
'kickpurge' => 'Purge messages',
'kick' => 'Kick',
diff --git a/lang_es_AR.php b/lang_es_AR.php
index f2c407c..ba00a4e 100644
--- a/lang_es_AR.php
+++ b/lang_es_AR.php
@@ -70,7 +70,7 @@ $T=array(
'selection' => 'Selección',
'cleannick' => 'Following nickname:',
'clean' => 'Clean',
- 'kickchat' => 'Expulsado (%d minutos)',
+ 'kickchat' => 'Expulsado (%d minutos)',
'kickreason' => 'Motivo de expulsión:',
'kickpurge' => 'Mensaje de purga',
'kick' => 'Expulsar',
diff --git a/lang_es_ES.php b/lang_es_ES.php
index 86978c6..1238846 100644
--- a/lang_es_ES.php
+++ b/lang_es_ES.php
@@ -70,7 +70,7 @@ $T=array(
'selection' => 'Selección',
'cleannick' => 'Following nickname:',
'clean' => 'Clean',
- 'kickchat' => 'Expulsado (%d minutos)',
+ 'kickchat' => 'Expulsado (%d minutos)',
'kickreason' => 'Motivo de expulsión:',
'kickpurge' => 'Mensaje de purga',
'kick' => 'Expulsar',
diff --git a/lang_fr.php b/lang_fr.php
index 8d0b178..c9c8c25 100644
--- a/lang_fr.php
+++ b/lang_fr.php
@@ -70,7 +70,7 @@ $T=array(
'selection' => 'Sélection',
'cleannick' => 'Suivre le pseudo:',
'clean' => 'Nettoyé',
- 'kickchat' => 'Pseudos éjectés (%d minutes)',
+ 'kickchat' => 'Pseudos éjectés (%d minutes)',
'kickreason' => 'Messages interdis:',
'kickpurge' => 'Purger les messages',
'kick' => 'Banni / éjecté',
diff --git a/lang_id.php b/lang_id.php
index 8a1738e..7fb65d3 100644
--- a/lang_id.php
+++ b/lang_id.php
@@ -70,7 +70,7 @@ $T=array(
'selection' => 'Pilihan',
'cleannick' => 'Nama berikut:',
'clean' => 'Bersih',
- 'kickchat' => 'Usir pengobrol (%d menit)',
+ 'kickchat' => 'Usir pengobrol (%d menit)',
'kickreason' => 'pesan pengusiran:',
'kickpurge' => 'Bersihkan pesan',
'kick' => 'Usir',
diff --git a/lang_ru.php b/lang_ru.php
index 8bb648d..ecaa8a2 100644
--- a/lang_ru.php
+++ b/lang_ru.php
@@ -70,7 +70,7 @@ $T=array(
'selection' => 'Выбор',
'cleannick' => 'По нику:',
'clean' => 'Очистить',
- 'kickchat' => 'Бан (%d минут)',
+ 'kickchat' => 'Бан (%d минут)',
'kickreason' => 'Сообщение забаненому',
'kickpurge' => 'Очистка сообщений',
'kick' => 'Бан',