Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
df140d0ee7
|
|||
6890bdb80a
|
|||
5c62bcef00
|
@ -1,3 +1,10 @@
|
|||||||
|
Version 1.16.3 - Apr. 14, 2016
|
||||||
|
Fix warning on redirection of links without a scheme
|
||||||
|
|
||||||
|
Version 1.16.2 - Apr. 14, 2016
|
||||||
|
Add CSS classes and move more css to the database
|
||||||
|
Allow extreme captcha to be solved in both directions
|
||||||
|
|
||||||
Version 1.16.1 - Apr. 13, 2016
|
Version 1.16.1 - Apr. 13, 2016
|
||||||
Fixed a typo
|
Fixed a typo
|
||||||
|
|
||||||
|
320
chat.php
320
chat.php
@ -275,9 +275,14 @@ if(!isSet($_REQUEST['action'])){
|
|||||||
|
|
||||||
// html output subs
|
// html output subs
|
||||||
function print_stylesheet(){
|
function print_stylesheet(){
|
||||||
|
global $U;
|
||||||
$css=get_setting('css');
|
$css=get_setting('css');
|
||||||
$colbg=get_setting('colbg');
|
|
||||||
$coltxt=get_setting('coltxt');
|
$coltxt=get_setting('coltxt');
|
||||||
|
if(!empty($U['bgcolour'])){
|
||||||
|
$colbg=$U['bgcolour'];
|
||||||
|
}else{
|
||||||
|
$colbg=get_setting('colbg');
|
||||||
|
}
|
||||||
echo "<style type=\"text/css\">body{background-color:#$colbg;color:#$coltxt;} $css</style>";
|
echo "<style type=\"text/css\">body{background-color:#$colbg;color:#$coltxt;} $css</style>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -309,7 +314,7 @@ function thr(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function print_start($class='', $ref=0, $url=''){
|
function print_start($class='', $ref=0, $url=''){
|
||||||
global $H, $I, $U;
|
global $H, $I;
|
||||||
if(!empty($url)){
|
if(!empty($url)){
|
||||||
header("Refresh: $ref; URL=$url");
|
header("Refresh: $ref; URL=$url");
|
||||||
}
|
}
|
||||||
@ -319,17 +324,12 @@ function print_start($class='', $ref=0, $url=''){
|
|||||||
}
|
}
|
||||||
if($class==='init'){
|
if($class==='init'){
|
||||||
echo "<title>$I[init]</title>";
|
echo "<title>$I[init]</title>";
|
||||||
echo "<style type=\"text/css\">body{background-color:#000000;color:#FFFFFF;} 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;}</style>";
|
echo "<style type=\"text/css\">body{background-color:#000000;color:#FFFFFF;text-align:center;} 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;} .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;}</style>";
|
||||||
}else{
|
}else{
|
||||||
echo '<title>'.get_setting('chatname').'</title>';
|
echo '<title>'.get_setting('chatname').'</title>';
|
||||||
print_stylesheet();
|
print_stylesheet();
|
||||||
}
|
}
|
||||||
if(!empty($U['bgcolour'])){
|
echo "</head><body class=\"$class\">";
|
||||||
$style=" style=\"background-color:#$U[bgcolour];\"";
|
|
||||||
}else{
|
|
||||||
$style='';
|
|
||||||
}
|
|
||||||
echo "</head><body$style class=\"$class\">";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function send_redirect($url){
|
function send_redirect($url){
|
||||||
@ -339,10 +339,13 @@ function send_redirect($url){
|
|||||||
$escaped=htmlspecialchars($url);
|
$escaped=htmlspecialchars($url);
|
||||||
if(isSet($match[1]) && ($match[1]==='http' || $match[1]==='https')){
|
if(isSet($match[1]) && ($match[1]==='http' || $match[1]==='https')){
|
||||||
print_start('redirect', 0, $match[0].$escaped);
|
print_start('redirect', 0, $match[0].$escaped);
|
||||||
echo "<p>$I[redirectto] <a href=\"$match[0]"."$escaped\">$match[0]"."$escaped</a>.</p>";
|
echo "<p>$I[redirectto] <a href=\"$match[0]$escaped\">$match[0]$escaped</a>.</p>";
|
||||||
}else{
|
}else{
|
||||||
print_start('redirect');
|
print_start('redirect');
|
||||||
echo "<p>$I[nonhttp] <a href=\"$match[0]"."$escaped\">$match[0]"."$escaped</a>.</p>";
|
if(!isSet($match[0])){
|
||||||
|
$match[0]='';
|
||||||
|
}
|
||||||
|
echo "<p>$I[nonhttp] <a href=\"$match[0]$escaped\">$match[0]$escaped</a>.</p>";
|
||||||
echo "<p>$I[httpredir] <a href=\"http://$escaped\">http://$escaped</a>.</p>";
|
echo "<p>$I[httpredir] <a href=\"http://$escaped\">http://$escaped</a>.</p>";
|
||||||
}
|
}
|
||||||
print_end();
|
print_end();
|
||||||
@ -352,12 +355,12 @@ function send_access_denied(){
|
|||||||
global $H, $I, $U;
|
global $H, $I, $U;
|
||||||
header('HTTP/1.1 401 Forbidden');
|
header('HTTP/1.1 401 Forbidden');
|
||||||
print_start('access_denied');
|
print_start('access_denied');
|
||||||
echo "<div style=\"text-align:center;\"><h1>$I[accessdenied]</h1>".sprintf($I['loggedinas'], style_this($U['nickname'], $U['style']));
|
echo "<h1>$I[accessdenied]</h1>".sprintf($I['loggedinas'], style_this($U['nickname'], $U['style']));
|
||||||
echo "<br><$H[form]>$H[commonform]".hidden('action', 'logout');
|
echo "<br><$H[form]>$H[commonform]".hidden('action', 'logout');
|
||||||
if(!isSet($_REQUEST['session'])){
|
if(!isSet($_REQUEST['session'])){
|
||||||
hidden('session', $U['session']);
|
hidden('session', $U['session']);
|
||||||
}
|
}
|
||||||
echo submit($I['logout'], 'id="exitbutton"')."</form></div>";
|
echo submit($I['logout'], 'id="exitbutton"')."</form>";
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -381,7 +384,7 @@ function send_captcha(){
|
|||||||
$stmt=$db->prepare('INSERT INTO ' . PREFIX . 'captcha (id, time, code) VALUES (?, ?, ?);');
|
$stmt=$db->prepare('INSERT INTO ' . PREFIX . 'captcha (id, time, code) VALUES (?, ?, ?);');
|
||||||
$stmt->execute(array($randid, $time, $code));
|
$stmt->execute(array($randid, $time, $code));
|
||||||
}
|
}
|
||||||
echo "<tr><td style=\"text-align:left;\">$I[copy]<br>";
|
echo "<tr><td class=\"left\">$I[copy]<br>";
|
||||||
if($difficulty===1){
|
if($difficulty===1){
|
||||||
$im=imagecreatetruecolor(55, 24);
|
$im=imagecreatetruecolor(55, 24);
|
||||||
$bg=imagecolorallocate($im, 0, 0, 0);
|
$bg=imagecolorallocate($im, 0, 0, 0);
|
||||||
@ -461,20 +464,20 @@ function send_captcha(){
|
|||||||
imagegif($im);
|
imagegif($im);
|
||||||
imagedestroy($im);
|
imagedestroy($im);
|
||||||
echo base64_encode(ob_get_clean()).'">';
|
echo base64_encode(ob_get_clean()).'">';
|
||||||
echo '</td><td style="text-align:right;">'.hidden('challenge', $randid).'<input type="text" name="captcha" size="15" autocomplete="off"></td></tr>';
|
echo '</td><td class="right">'.hidden('challenge', $randid).'<input type="text" name="captcha" size="15" autocomplete="off"></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
function send_setup(){
|
function send_setup(){
|
||||||
global $C, $H, $I, $U;
|
global $C, $H, $I, $U;
|
||||||
print_start('setup');
|
print_start('setup');
|
||||||
echo "<div style=\"text-align:center;\"><h2>$I[setup]</h2><$H[form]>$H[commonform]".hidden('action', 'setup').hidden('do', 'save');
|
echo "<h2>$I[setup]</h2><$H[form]>$H[commonform]".hidden('action', 'setup').hidden('do', 'save');
|
||||||
if(!isSet($_REQUEST['session'])){
|
if(!isSet($_REQUEST['session'])){
|
||||||
echo hidden('session', $U['session']);
|
echo hidden('session', $U['session']);
|
||||||
}
|
}
|
||||||
echo '<table style="margin-left:auto;margin-right:auto;">';
|
echo '<table class="center-table">';
|
||||||
thr();
|
thr();
|
||||||
$ga=(int) get_setting('guestaccess');
|
$ga=(int) get_setting('guestaccess');
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><th>$I[guestacc]</th><td style=\"text-align:right;\">";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[guestacc]</th><td class=\"right\">";
|
||||||
echo '<select name="guestaccess">';
|
echo '<select name="guestaccess">';
|
||||||
echo '<option value="1"';
|
echo '<option value="1"';
|
||||||
if($ga===1){
|
if($ga===1){
|
||||||
@ -499,8 +502,8 @@ function send_setup(){
|
|||||||
echo '</select></td></tr></table></td></tr>';
|
echo '</select></td></tr></table></td></tr>';
|
||||||
thr();
|
thr();
|
||||||
$englobal=(int) get_setting('englobalpass');
|
$englobal=(int) get_setting('englobalpass');
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><th>$I[globalloginpass]</th><td>";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[globalloginpass]</th><td>";
|
||||||
echo '<table style="border-spacing:0px;margin-left:auto;">';
|
echo '<table class="right-table">';
|
||||||
echo '<tr><td><select name="englobalpass">';
|
echo '<tr><td><select name="englobalpass">';
|
||||||
echo '<option value="0"';
|
echo '<option value="0"';
|
||||||
if($englobal===0){
|
if($englobal===0){
|
||||||
@ -522,7 +525,7 @@ function send_setup(){
|
|||||||
echo '</table></td></tr></table></td></tr>';
|
echo '</table></td></tr></table></td></tr>';
|
||||||
thr();
|
thr();
|
||||||
$ga=(int) get_setting('guestreg');
|
$ga=(int) get_setting('guestreg');
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><th>$I[guestreg]</th><td style=\"text-align:right;\">";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[guestreg]</th><td class=\"right\">";
|
||||||
echo '<select name="guestreg">';
|
echo '<select name="guestreg">';
|
||||||
echo '<option value="0"';
|
echo '<option value="0"';
|
||||||
if($ga===0){
|
if($ga===0){
|
||||||
@ -541,27 +544,27 @@ function send_setup(){
|
|||||||
echo ">$I[asmember]</option>";
|
echo ">$I[asmember]</option>";
|
||||||
echo '</select></td></tr></table></td></tr>';
|
echo '</select></td></tr></table></td></tr>';
|
||||||
thr();
|
thr();
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><th>$I[sysmessages]</th><td>";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[sysmessages]</th><td>";
|
||||||
echo '<table style="border-spacing:0px;text-align:right;margin-left:auto;">';
|
echo '<table class="right right-table">';
|
||||||
foreach($C['msg_settings'] as $setting){
|
foreach($C['msg_settings'] as $setting){
|
||||||
echo "<tr><td> $I[$setting]</td><td> <input type=\"text\" name=\"$setting\" value=\"".get_setting($setting).'"></td></tr>';
|
echo "<tr><td> $I[$setting]</td><td> <input type=\"text\" name=\"$setting\" value=\"".get_setting($setting).'"></td></tr>';
|
||||||
}
|
}
|
||||||
echo '</table></td></tr></table></td></tr>';
|
echo '</table></td></tr></table></td></tr>';
|
||||||
foreach($C['text_settings'] as $setting){
|
foreach($C['text_settings'] as $setting){
|
||||||
thr();
|
thr();
|
||||||
echo '<tr><td><table style="width:100%;text-align:left;"><tr><th>'.$I[$setting].'</th><td style="text-align:right;">';
|
echo '<tr><td><table class="left-table"><tr><th>'.$I[$setting].'</th><td class="right">';
|
||||||
echo "<input type=\"text\" name=\"$setting\" value=\"".htmlspecialchars(get_setting($setting)).'">';
|
echo "<input type=\"text\" name=\"$setting\" value=\"".htmlspecialchars(get_setting($setting)).'">';
|
||||||
echo '</td></tr></table></td></tr>';
|
echo '</td></tr></table></td></tr>';
|
||||||
}
|
}
|
||||||
foreach($C['colour_settings'] as $setting){
|
foreach($C['colour_settings'] as $setting){
|
||||||
thr();
|
thr();
|
||||||
echo '<tr><td><table style="width:100%;text-align:left;"><tr><th>'.$I[$setting].'</th><td style="text-align:right;">';
|
echo '<tr><td><table class="left-table"><tr><th>'.$I[$setting].'</th><td class="right">';
|
||||||
echo "<input type=\"text\" name=\"$setting\" size=\"6\" maxlength=\"6\" pattern=\"[a-fA-F0-9]{6}\" value=\"".htmlspecialchars(get_setting($setting)).'">';
|
echo "<input type=\"text\" name=\"$setting\" size=\"6\" maxlength=\"6\" pattern=\"[a-fA-F0-9]{6}\" value=\"".htmlspecialchars(get_setting($setting)).'">';
|
||||||
echo '</td></tr></table></td></tr>';
|
echo '</td></tr></table></td></tr>';
|
||||||
}
|
}
|
||||||
thr();
|
thr();
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><th>$I[captcha]</th><td>";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[captcha]</th><td>";
|
||||||
echo '<table style="border-spacing:0px;margin-left:auto;">';
|
echo '<table class="right-table">';
|
||||||
if(!extension_loaded('gd')){
|
if(!extension_loaded('gd')){
|
||||||
echo "<tr><td>$I[gdextrequired]</td></tr>";
|
echo "<tr><td>$I[gdextrequired]</td></tr>";
|
||||||
}else{
|
}else{
|
||||||
@ -604,19 +607,19 @@ function send_setup(){
|
|||||||
echo '</table></td></tr></table></td></tr>';
|
echo '</table></td></tr></table></td></tr>';
|
||||||
foreach($C['textarea_settings'] as $setting){
|
foreach($C['textarea_settings'] as $setting){
|
||||||
thr();
|
thr();
|
||||||
echo '<tr><td><table style="width:100%;text-align:left;"><tr><th>'.$I[$setting].'</th><td style="text-align:right;">';
|
echo '<tr><td><table class="left-table"><tr><th>'.$I[$setting].'</th><td class="right">';
|
||||||
echo "<textarea name=\"$setting\" rows=\"4\" cols=\"60\">".htmlspecialchars(get_setting($setting)).'</textarea>';
|
echo "<textarea name=\"$setting\" rows=\"4\" cols=\"60\">".htmlspecialchars(get_setting($setting)).'</textarea>';
|
||||||
echo '</td></tr></table></td></tr>';
|
echo '</td></tr></table></td></tr>';
|
||||||
}
|
}
|
||||||
foreach($C['number_settings'] as $setting){
|
foreach($C['number_settings'] as $setting){
|
||||||
thr();
|
thr();
|
||||||
echo '<tr><td><table style="width:100%;text-align:left;"><tr><th>'.$I[$setting].'</th><td style="text-align:right;">';
|
echo '<tr><td><table class="left-table"><tr><th>'.$I[$setting].'</th><td class="right">';
|
||||||
echo "<input type=\"number\" name=\"$setting\" value=\"".htmlspecialchars(get_setting($setting)).'">';
|
echo "<input type=\"number\" name=\"$setting\" value=\"".htmlspecialchars(get_setting($setting)).'">';
|
||||||
echo '</td></tr></table></td></tr>';
|
echo '</td></tr></table></td></tr>';
|
||||||
}
|
}
|
||||||
foreach($C['bool_settings'] as $setting){
|
foreach($C['bool_settings'] as $setting){
|
||||||
thr();
|
thr();
|
||||||
echo '<tr><td><table style="width:100%;text-align:left;"><tr><th>'.$I[$setting].'</th><td style="text-align:right;">';
|
echo '<tr><td><table class="left-table"><tr><th>'.$I[$setting].'</th><td class="right">';
|
||||||
echo "<select name=\"$setting\">";
|
echo "<select name=\"$setting\">";
|
||||||
$value=(bool) get_setting($setting);
|
$value=(bool) get_setting($setting);
|
||||||
echo '<option value="0"';
|
echo '<option value="0"';
|
||||||
@ -638,7 +641,7 @@ function send_setup(){
|
|||||||
thr();
|
thr();
|
||||||
echo '<tr><td>'.submit($I['apply']).'</td></tr></table></form><br>';
|
echo '<tr><td>'.submit($I['apply']).'</td></tr></table></form><br>';
|
||||||
if($U['status']==8){
|
if($U['status']==8){
|
||||||
echo '<table style="margin-left:auto;margin-right:auto;"><tr>';
|
echo '<table class="center-table"><tr>';
|
||||||
echo "<td><$H[form]>$H[commonform]".hidden('action', 'setup').hidden('do', 'backup');
|
echo "<td><$H[form]>$H[commonform]".hidden('action', 'setup').hidden('do', 'backup');
|
||||||
if(!isSet($_REQUEST['session'])){
|
if(!isSet($_REQUEST['session'])){
|
||||||
hidden('session', $U['session']);
|
hidden('session', $U['session']);
|
||||||
@ -654,7 +657,7 @@ function send_setup(){
|
|||||||
if(!isSet($_REQUEST['session'])){
|
if(!isSet($_REQUEST['session'])){
|
||||||
hidden('session', $U['session']);
|
hidden('session', $U['session']);
|
||||||
}
|
}
|
||||||
echo submit($I['logout'], 'id="exitbutton"')."</form>$H[credit]</div>";
|
echo submit($I['logout'], 'id="exitbutton"')."</form>$H[credit]";
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -754,31 +757,31 @@ function send_backup(){
|
|||||||
$chknotes='';
|
$chknotes='';
|
||||||
}
|
}
|
||||||
print_start('backup');
|
print_start('backup');
|
||||||
echo "<div style=\"text-align:center;\"><h2>$I[backuprestore]</h2><table style=\"margin-left:auto;margin-right:auto;\">";
|
echo "<h2>$I[backuprestore]</h2><table class=\"center-table\">";
|
||||||
thr();
|
thr();
|
||||||
if(!extension_loaded('json')){
|
if(!extension_loaded('json')){
|
||||||
echo "<tr><td>$I[jsonextrequired]</td></tr>";
|
echo "<tr><td>$I[jsonextrequired]</td></tr>";
|
||||||
}else{
|
}else{
|
||||||
echo "<tr><td><$H[form]>$H[commonform]".hidden('action', 'setup').hidden('do', 'backup');
|
echo "<tr><td><$H[form]>$H[commonform]".hidden('action', 'setup').hidden('do', 'backup');
|
||||||
echo '<table style="width:100%;text-align:left;"><tr><td>';
|
echo '<table class="left-table"><tr><td>';
|
||||||
echo "<input type=\"checkbox\" name=\"settings\" id=\"backupsettings\" value=\"1\"$chksettings><label for=\"backupsettings\">$I[settings]</label>";
|
echo "<input type=\"checkbox\" name=\"settings\" id=\"backupsettings\" value=\"1\"$chksettings><label for=\"backupsettings\">$I[settings]</label>";
|
||||||
echo "<input type=\"checkbox\" name=\"filter\" id=\"backupfilter\" value=\"1\"$chkfilters><label for=\"backupfilter\">$I[filter]</label>";
|
echo "<input type=\"checkbox\" name=\"filter\" id=\"backupfilter\" value=\"1\"$chkfilters><label for=\"backupfilter\">$I[filter]</label>";
|
||||||
echo "<input type=\"checkbox\" name=\"members\" id=\"backupmembers\" value=\"1\"$chkmembers><label for=\"backupmembers\">$I[members]</label>";
|
echo "<input type=\"checkbox\" name=\"members\" id=\"backupmembers\" value=\"1\"$chkmembers><label for=\"backupmembers\">$I[members]</label>";
|
||||||
echo "<input type=\"checkbox\" name=\"notes\" id=\"backupnotes\" value=\"1\"$chknotes><label for=\"backupnotes\">$I[notes]</label>";
|
echo "<input type=\"checkbox\" name=\"notes\" id=\"backupnotes\" value=\"1\"$chknotes><label for=\"backupnotes\">$I[notes]</label>";
|
||||||
echo '</td><td style="text-align:right;">'.submit($I['backup']).'</td></tr></table></form></td></tr>';
|
echo '</td><td class="right">'.submit($I['backup']).'</td></tr></table></form></td></tr>';
|
||||||
thr();
|
thr();
|
||||||
echo "<tr><td><$H[form]>$H[commonform]".hidden('action', 'setup').hidden('do', 'restore');
|
echo "<tr><td><$H[form]>$H[commonform]".hidden('action', 'setup').hidden('do', 'restore');
|
||||||
echo '<table>';
|
echo '<table>';
|
||||||
echo "<tr><td colspan=\"2\"><textarea name=\"restore\" rows=\"4\" cols=\"60\">".htmlspecialchars(json_encode($code)).'</textarea></td></tr>';
|
echo "<tr><td colspan=\"2\"><textarea name=\"restore\" rows=\"4\" cols=\"60\">".htmlspecialchars(json_encode($code)).'</textarea></td></tr>';
|
||||||
echo "<tr><td style=\"text-align:left;\"><input type=\"checkbox\" name=\"settings\" id=\"restoresettings\" value=\"1\"$chksettings><label for=\"restoresettings\">$I[settings]</label>";
|
echo "<tr><td class=\"left\"><input type=\"checkbox\" name=\"settings\" id=\"restoresettings\" value=\"1\"$chksettings><label for=\"restoresettings\">$I[settings]</label>";
|
||||||
echo "<input type=\"checkbox\" name=\"filter\" id=\"restorefilter\" value=\"1\"$chkfilters><label for=\"restorefilter\">$I[filter]</label>";
|
echo "<input type=\"checkbox\" name=\"filter\" id=\"restorefilter\" value=\"1\"$chkfilters><label for=\"restorefilter\">$I[filter]</label>";
|
||||||
echo "<input type=\"checkbox\" name=\"members\" id=\"restoremembers\" value=\"1\"$chkmembers><label for=\"restoremembers\">$I[members]</label>";
|
echo "<input type=\"checkbox\" name=\"members\" id=\"restoremembers\" value=\"1\"$chkmembers><label for=\"restoremembers\">$I[members]</label>";
|
||||||
echo "<input type=\"checkbox\" name=\"notes\" id=\"restorenotes\" value=\"1\"$chknotes><label for=\"restorenotes\">$I[notes]</label>";
|
echo "<input type=\"checkbox\" name=\"notes\" id=\"restorenotes\" value=\"1\"$chknotes><label for=\"restorenotes\">$I[notes]</label>";
|
||||||
echo '</td><td style="text-align:right;">'.submit($I['restore']).'</td></tr></table>';
|
echo '</td><td class="right">'.submit($I['restore']).'</td></tr></table>';
|
||||||
echo '</form></td></tr>';
|
echo '</form></td></tr>';
|
||||||
}
|
}
|
||||||
thr();
|
thr();
|
||||||
echo "<tr><td><$H[form]>$H[commonform]".hidden('action', 'setup').submit($I['initgosetup'], 'class="backbutton"')."</form></tr></td></div>";
|
echo "<tr><td><$H[form]>$H[commonform]".hidden('action', 'setup').submit($I['initgosetup'], 'class="backbutton"')."</form></tr></td>";
|
||||||
echo '</table>';
|
echo '</table>';
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
@ -786,7 +789,7 @@ function send_backup(){
|
|||||||
function send_destroy_chat(){
|
function send_destroy_chat(){
|
||||||
global $H, $I;
|
global $H, $I;
|
||||||
print_start('destroy_chat');
|
print_start('destroy_chat');
|
||||||
echo "<table style=\"text-align:center;margin-left:auto;margin-right:auto;\"><tr><td colspan=\"2\">$I[confirm]</td></tr><tr><td>";
|
echo "<table class=\"center-table\"><tr><td colspan=\"2\">$I[confirm]</td></tr><tr><td>";
|
||||||
echo "<$H[form] target=\"_parent\">$H[commonform]".hidden('action', 'setup').hidden('do', 'destroy').hidden('confirm', 'yes').submit($I['yes'], 'class="delbutton"').'</form></td><td>';
|
echo "<$H[form] target=\"_parent\">$H[commonform]".hidden('action', 'setup').hidden('do', 'destroy').hidden('confirm', 'yes').submit($I['yes'], 'class="delbutton"').'</form></td><td>';
|
||||||
echo "<$H[form]>$H[commonform]".hidden('action', 'setup').submit($I['no'], 'class="backbutton"').'</form></td><tr></table>';
|
echo "<$H[form]>$H[commonform]".hidden('action', 'setup').submit($I['no'], 'class="backbutton"').'</form></td><tr></table>';
|
||||||
print_end();
|
print_end();
|
||||||
@ -795,8 +798,8 @@ function send_destroy_chat(){
|
|||||||
function send_init(){
|
function send_init(){
|
||||||
global $H, $I, $L;
|
global $H, $I, $L;
|
||||||
print_start('init');
|
print_start('init');
|
||||||
echo "<div style=\"text-align:center;\"><h2>$I[init]</h2>";
|
echo "<h2>$I[init]</h2>";
|
||||||
echo "<$H[form]>$H[commonform]".hidden('action', 'init')."<table style=\"margin-left:auto;margin-right:auto;\"><tr><td><h3>$I[sulogin]</h3><table style=\"text-align:left;\">";
|
echo "<$H[form]>$H[commonform]".hidden('action', 'init')."<table class=\"center-table\"><tr><td><h3>$I[sulogin]</h3><table class=\"left\">";
|
||||||
echo "<tr><td>$I[sunick]</td><td><input type=\"text\" name=\"sunick\" size=\"15\"></td></tr>";
|
echo "<tr><td>$I[sunick]</td><td><input type=\"text\" name=\"sunick\" size=\"15\"></td></tr>";
|
||||||
echo "<tr><td>$I[supass]</td><td><input type=\"password\" name=\"supass\" size=\"15\"></td></tr>";
|
echo "<tr><td>$I[supass]</td><td><input type=\"password\" name=\"supass\" size=\"15\"></td></tr>";
|
||||||
echo "<tr><td>$I[suconfirm]</td><td><input type=\"password\" name=\"supassc\" size=\"15\"></td></tr>";
|
echo "<tr><td>$I[suconfirm]</td><td><input type=\"password\" name=\"supassc\" size=\"15\"></td></tr>";
|
||||||
@ -805,30 +808,30 @@ function send_init(){
|
|||||||
foreach($L as $lang=>$name){
|
foreach($L as $lang=>$name){
|
||||||
echo " <a href=\"$_SERVER[SCRIPT_NAME]?action=setup&lang=$lang\">$name</a>";
|
echo " <a href=\"$_SERVER[SCRIPT_NAME]?action=setup&lang=$lang\">$name</a>";
|
||||||
}
|
}
|
||||||
echo "</p>$H[credit]</div>";
|
echo "</p>$H[credit]";
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
function send_update(){
|
function send_update(){
|
||||||
global $H, $I;
|
global $H, $I;
|
||||||
print_start('update');
|
print_start('update');
|
||||||
echo "<div style=\"text-align:center;\"><h2>$I[dbupdate]</h2><br><$H[form]>$H[commonform]".hidden('action', 'setup').submit($I['initgosetup'])."</form><br>$H[credit]</div>";
|
echo "<h2>$I[dbupdate]</h2><br><$H[form]>$H[commonform]".hidden('action', 'setup').submit($I['initgosetup'])."</form><br>$H[credit]";
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
function send_alogin(){
|
function send_alogin(){
|
||||||
global $H, $I, $L;
|
global $H, $I, $L;
|
||||||
print_start('alogin');
|
print_start('alogin');
|
||||||
echo "<div style=\"text-align:center;\"><$H[form]>$H[commonform]".hidden('action', 'setup').'<table style="text-align:left;margin-left:auto;margin-right:auto;">';
|
echo "<$H[form]>$H[commonform]".hidden('action', 'setup').'<table class="center-table" class="left">';
|
||||||
echo "<tr><td>$I[nick]</td><td><input type=\"text\" name=\"nick\" size=\"15\" autofocus></td></tr>";
|
echo "<tr><td>$I[nick]</td><td><input type=\"text\" name=\"nick\" size=\"15\" autofocus></td></tr>";
|
||||||
echo "<tr><td>$I[pass]</td><td><input type=\"password\" name=\"pass\" size=\"15\"></td></tr>";
|
echo "<tr><td>$I[pass]</td><td><input type=\"password\" name=\"pass\" size=\"15\"></td></tr>";
|
||||||
send_captcha();
|
send_captcha();
|
||||||
echo '<tr><td colspan="2" style="text-align:right;">'.submit($I['login']).'</td></tr></table></form>';
|
echo '<tr><td colspan="2" class="right">'.submit($I['login']).'</td></tr></table></form>';
|
||||||
echo "<p>$I[changelang]";
|
echo "<p>$I[changelang]";
|
||||||
foreach($L as $lang=>$name){
|
foreach($L as $lang=>$name){
|
||||||
echo " <a href=\"$_SERVER[SCRIPT_NAME]?action=setup&lang=$lang\">$name</a>";
|
echo " <a href=\"$_SERVER[SCRIPT_NAME]?action=setup&lang=$lang\">$name</a>";
|
||||||
}
|
}
|
||||||
echo "</p>$H[credit]</div>";
|
echo "</p>$H[credit]";
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -845,15 +848,15 @@ function send_admin($arg=''){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$chlist.='</select>';
|
$chlist.='</select>';
|
||||||
echo "<div style=\"text-align:center;\"><h2>$I[admfunc]</h2><i>$arg</i><table style=\"margin-left:auto;margin-right:auto;\">";
|
echo "<h2>$I[admfunc]</h2><i>$arg</i><table class=\"center-table\">";
|
||||||
if($U['status']>=7){
|
if($U['status']>=7){
|
||||||
thr();
|
thr();
|
||||||
echo "<tr><td><$H[form] target=\"view\">$H[commonform]".hidden('action', 'setup').submit($I['initgosetup']).'</form></td></tr>';
|
echo "<tr><td><$H[form] target=\"view\">$H[commonform]".hidden('action', 'setup').submit($I['initgosetup']).'</form></td></tr>';
|
||||||
}
|
}
|
||||||
thr();
|
thr();
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><th>$I[cleanmsgs]</th><td>";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[cleanmsgs]</th><td>";
|
||||||
frmadm('clean');
|
frmadm('clean');
|
||||||
echo '<table style="border-spacing:0px;text-align:left;margin-left:auto;"><tr><td><input type="radio" name="what" id="room" value="room">';
|
echo '<table class="left right-table"><tr><td><input type="radio" name="what" id="room" value="room">';
|
||||||
echo "<label for=\"room\">$I[room]</label></td><td> </td><td><input type=\"radio\" name=\"what\" id=\"choose\" value=\"choose\" checked>";
|
echo "<label for=\"room\">$I[room]</label></td><td> </td><td><input type=\"radio\" name=\"what\" id=\"choose\" value=\"choose\" checked>";
|
||||||
echo "<label for=\"choose\">$I[selection]</label></td><td> </td></tr><tr><td colspan=\"3\"><input type=\"radio\" name=\"what\" id=\"nick\" value=\"nick\">";
|
echo "<label for=\"choose\">$I[selection]</label></td><td> </td></tr><tr><td colspan=\"3\"><input type=\"radio\" name=\"what\" id=\"nick\" value=\"nick\">";
|
||||||
echo "<label for=\"nick\">$I[cleannick] </label><select name=\"nickname\" size=\"1\"><option value=\"\">$I[choose]</option>";
|
echo "<label for=\"nick\">$I[cleannick] </label><select name=\"nickname\" size=\"1\"><option value=\"\">$I[choose]</option>";
|
||||||
@ -865,32 +868,32 @@ function send_admin($arg=''){
|
|||||||
echo '</select></td><td>';
|
echo '</select></td><td>';
|
||||||
echo submit($I['clean'], 'class="delbutton"').'</td></tr></table></form></td></tr></table></td></tr>';
|
echo submit($I['clean'], 'class="delbutton"').'</td></tr></table></form></td></tr></table></td></tr>';
|
||||||
thr();
|
thr();
|
||||||
echo '<tr><td><table style="width:100%;text-align:left;"><tr><td>'.sprintf($I['kickchat'], get_setting('kickpenalty')).'</td></tr><tr><td>';
|
echo '<tr><td><table class="left-table"><tr><td>'.sprintf($I['kickchat'], get_setting('kickpenalty')).'</td></tr><tr><td>';
|
||||||
frmadm('kick');
|
frmadm('kick');
|
||||||
echo "<table style=\"border-spacing:0px;\"><tr><td style=\"margin-left:auto;\">$I[kickreason]</td><td style=\"text-align:right;\"><input type=\"text\" name=\"kickmessage\" size=\"30\"></td><td> </td></tr>";
|
echo "<table class=\"right-table\"><tr><td>$I[kickreason]</td><td class=\"right\"><input type=\"text\" name=\"kickmessage\" size=\"30\"></td><td> </td></tr>";
|
||||||
echo "<tr><td><input type=\"checkbox\" name=\"what\" value=\"purge\" id=\"purge\"><label for=\"purge\"> $I[kickpurge]</label></td><td style=\"text-align:right;\">$chlist</td><td style=\"text-align:right;\">";
|
echo "<tr><td><input type=\"checkbox\" name=\"what\" value=\"purge\" id=\"purge\"><label for=\"purge\"> $I[kickpurge]</label></td><td class=\"right\">$chlist</td><td class=\"right\">";
|
||||||
echo submit($I['kick']).'</td></tr></table></form></td></tr></table></td></tr>';
|
echo submit($I['kick']).'</td></tr></table></form></td></tr></table></td></tr>';
|
||||||
thr();
|
thr();
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><th>$I[logoutinact]</th><td>";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[logoutinact]</th><td>";
|
||||||
frmadm('logout');
|
frmadm('logout');
|
||||||
echo "<table style=\"border-spacing:0px;margin-left:auto;\"><tr style=\"text-align:right;\"><td>$chlist</td><td>";
|
echo "<table class=\"right-table\"><tr class=\"right\"><td>$chlist</td><td>";
|
||||||
echo submit($I['logout']).'</td></tr></table></form></td></tr></table></td></tr>';
|
echo submit($I['logout']).'</td></tr></table></form></td></tr></table></td></tr>';
|
||||||
$views=array('sessions', 'filter', 'linkfilter');
|
$views=array('sessions', 'filter', 'linkfilter');
|
||||||
foreach($views as $view){
|
foreach($views as $view){
|
||||||
thr();
|
thr();
|
||||||
echo '<tr><td><table style="width:100%;text-align:left;"><tr><th>'.$I[$view].'</th><td style="text-align:right;">';
|
echo '<tr><td><table class="left-table"><tr><th>'.$I[$view].'</th><td class="right">';
|
||||||
frmadm($view);
|
frmadm($view);
|
||||||
echo submit($I['view']).'</form></td></tr></table></td></tr>';
|
echo submit($I['view']).'</form></td></tr></table></td></tr>';
|
||||||
}
|
}
|
||||||
thr();
|
thr();
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><th>$I[topic]</th><td>";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[topic]</th><td>";
|
||||||
frmadm('topic');
|
frmadm('topic');
|
||||||
echo '<table style="border-spacing:0px;margin-left:auto;"><tr><td><input type="text" name="topic" size="20" value="'.get_setting('topic').'"></td><td>';
|
echo '<table class="right-table"><tr><td><input type="text" name="topic" size="20" value="'.get_setting('topic').'"></td><td>';
|
||||||
echo submit($I['change']).'</td></tr></table></form></td></tr></table></td></tr>';
|
echo submit($I['change']).'</td></tr></table></form></td></tr></table></td></tr>';
|
||||||
thr();
|
thr();
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><th>$I[guestacc]</th><td>";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[guestacc]</th><td>";
|
||||||
frmadm('guestaccess');
|
frmadm('guestaccess');
|
||||||
echo '<table style="border-spacing:0px;margin-left:auto;">';
|
echo '<table class="right-table">';
|
||||||
echo '<tr><td><select name="guestaccess">';
|
echo '<tr><td><select name="guestaccess">';
|
||||||
echo '<option value="1"';
|
echo '<option value="1"';
|
||||||
if($ga===1){
|
if($ga===1){
|
||||||
@ -915,9 +918,9 @@ function send_admin($arg=''){
|
|||||||
echo '</select></td><td>'.submit($I['change']).'</td></tr></table></form></td></tr></table></td></tr>';
|
echo '</select></td><td>'.submit($I['change']).'</td></tr></table></form></td></tr></table></td></tr>';
|
||||||
thr();
|
thr();
|
||||||
if(get_setting('suguests')){
|
if(get_setting('suguests')){
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><th>$I[addsuguest]</th><td>";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[addsuguest]</th><td>";
|
||||||
frmadm('superguest');
|
frmadm('superguest');
|
||||||
echo "<table style=\"border-spacing:0px;margin-left:auto;\"><tr><td><select name=\"name\" size=\"1\"><option value=\"\">$I[choose]</option>";
|
echo "<table class=\"right-table\"><tr><td><select name=\"name\" size=\"1\"><option value=\"\">$I[choose]</option>";
|
||||||
foreach($P as $user){
|
foreach($P as $user){
|
||||||
if($user[2]==1){
|
if($user[2]==1){
|
||||||
echo "<option value=\"$user[0]\" style=\"$user[1]\">$user[0]</option>";
|
echo "<option value=\"$user[0]\" style=\"$user[1]\">$user[0]</option>";
|
||||||
@ -927,9 +930,9 @@ function send_admin($arg=''){
|
|||||||
thr();
|
thr();
|
||||||
}
|
}
|
||||||
if($U['status']>=7){
|
if($U['status']>=7){
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><th>$I[admmembers]</th><td>";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[admmembers]</th><td>";
|
||||||
frmadm('status');
|
frmadm('status');
|
||||||
echo "<table style=\"border-spacing:0px;margin-left:auto;\"><td style=\"text-align:right;\"><select name=\"name\" size=\"1\"><option value=\"\">$I[choose]</option>";
|
echo "<table class=\"right-table\"><td class=\"right\"><select name=\"name\" size=\"1\"><option value=\"\">$I[choose]</option>";
|
||||||
read_members();
|
read_members();
|
||||||
array_multisort(array_map('strtolower', array_keys($A)), SORT_ASC, SORT_STRING, $A);
|
array_multisort(array_map('strtolower', array_keys($A)), SORT_ASC, SORT_STRING, $A);
|
||||||
foreach($A as $member){
|
foreach($A as $member){
|
||||||
@ -961,17 +964,17 @@ function send_admin($arg=''){
|
|||||||
}
|
}
|
||||||
echo '</select></td><td>'.submit($I['change']).'</td></tr></table></form></td></tr></table></td></tr>';
|
echo '</select></td><td>'.submit($I['change']).'</td></tr></table></form></td></tr></table></td></tr>';
|
||||||
thr();
|
thr();
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><th>$I[passreset]</th><td>";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[passreset]</th><td>";
|
||||||
frmadm('passreset');
|
frmadm('passreset');
|
||||||
echo "<table style=\"border-spacing:0px;margin-left:auto;\"><td><select name=\"name\" size=\"1\"><option value=\"\">$I[choose]</option>";
|
echo "<table class=\"right-table\"><td><select name=\"name\" size=\"1\"><option value=\"\">$I[choose]</option>";
|
||||||
foreach($A as $member){
|
foreach($A as $member){
|
||||||
echo "<option value=\"$member[0]\" style=\"$member[2]\">$member[0]</option>";
|
echo "<option value=\"$member[0]\" style=\"$member[2]\">$member[0]</option>";
|
||||||
}
|
}
|
||||||
echo '</select></td><td><input type="password" name="pass"></td><td>'.submit($I['change']).'</td></tr></table></form></td></tr></table></td></tr>';
|
echo '</select></td><td><input type="password" name="pass"></td><td>'.submit($I['change']).'</td></tr></table></form></td></tr></table></td></tr>';
|
||||||
thr();
|
thr();
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><th>$I[regguest]</th><td>";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[regguest]</th><td>";
|
||||||
frmadm('register');
|
frmadm('register');
|
||||||
echo "<table style=\"border-spacing:0px;margin-left:auto;\"><tr><td><select name=\"name\" size=\"1\"><option value=\"\">$I[choose]</option>";
|
echo "<table class=\"right-table\"><tr><td><select name=\"name\" size=\"1\"><option value=\"\">$I[choose]</option>";
|
||||||
foreach($P as $user){
|
foreach($P as $user){
|
||||||
if($user[2]==1){
|
if($user[2]==1){
|
||||||
echo "<option value=\"$user[0]\" style=\"$user[1]\">$user[0]</option>";
|
echo "<option value=\"$user[0]\" style=\"$user[1]\">$user[0]</option>";
|
||||||
@ -979,14 +982,14 @@ function send_admin($arg=''){
|
|||||||
}
|
}
|
||||||
echo '</select></td><td>'.submit($I['register']).'</td></tr></table></form></td></tr></table></td></tr>';
|
echo '</select></td><td>'.submit($I['register']).'</td></tr></table></form></td></tr></table></td></tr>';
|
||||||
thr();
|
thr();
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><th>$I[regmem]</th></tr><tr><td>";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[regmem]</th></tr><tr><td>";
|
||||||
frmadm('regnew');
|
frmadm('regnew');
|
||||||
echo "<table style=\"border-spacing:0px;margin-left:auto;\"><tr><td>$I[nick]</td><td> </td><td><input type=\"text\" name=\"name\" size=\"20\"></td><td> </td></tr>";
|
echo "<table class=\"right-table\"><tr><td>$I[nick]</td><td> </td><td><input type=\"text\" name=\"name\" size=\"20\"></td><td> </td></tr>";
|
||||||
echo "<tr><td>$I[pass]</td><td> </td><td><input type=\"password\" name=\"pass\" size=\"20\"></td><td>";
|
echo "<tr><td>$I[pass]</td><td> </td><td><input type=\"password\" name=\"pass\" size=\"20\"></td><td>";
|
||||||
echo submit($I['register']).'</td></tr></table></form></td></tr></table></td></tr>';
|
echo submit($I['register']).'</td></tr></table></form></td></tr></table></td></tr>';
|
||||||
thr();
|
thr();
|
||||||
}
|
}
|
||||||
echo "</table>$H[backtochat]</div>";
|
echo "</table>$H[backtochat]";
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -994,13 +997,13 @@ function send_sessions(){
|
|||||||
global $H, $I, $U;
|
global $H, $I, $U;
|
||||||
$lines=parse_sessions();
|
$lines=parse_sessions();
|
||||||
print_start('sessions');
|
print_start('sessions');
|
||||||
echo "<div style=\"text-align:center;\"><h1>$I[sessact]</h1><table style=\"margin-left:auto;margin-right:auto;\">";
|
echo "<h1>$I[sessact]</h1><table class=\"center-table\">";
|
||||||
echo "<tr><th style=\"padding:5px;\">$I[sessnick]</th><th style=\"padding:5px\">$I[sesstimeout]</th><th style=\"padding:5px;\">$I[sessua]</th>";
|
echo "<tr><th class=\"padded\">$I[sessnick]</th><th class=\"padded\">$I[sesstimeout]</th><th class=\"padded\">$I[sessua]</th>";
|
||||||
$trackip=(bool) get_setting('trackip');
|
$trackip=(bool) get_setting('trackip');
|
||||||
$memexpire=(int) get_setting('memberexpire');
|
$memexpire=(int) get_setting('memberexpire');
|
||||||
$guestexpire=(int) get_setting('guestexpire');
|
$guestexpire=(int) get_setting('guestexpire');
|
||||||
if($trackip) echo "<th style=\"padding:5px;\">$I[sesip]</th>";
|
if($trackip) echo "<th class=\"padded\">$I[sesip]</th>";
|
||||||
echo "<th style=\"padding:5px;\">$I[actions]</th></tr>";
|
echo "<th class=\"padded\">$I[actions]</th></tr>";
|
||||||
foreach($lines as $temp){
|
foreach($lines as $temp){
|
||||||
if($temp['status']!=0 && $temp['entry']!=0 && (!$temp['incognito'] || $temp['status']<$U['status'])){
|
if($temp['status']!=0 && $temp['entry']!=0 && (!$temp['incognito'] || $temp['status']<$U['status'])){
|
||||||
if($temp['status']<=2){
|
if($temp['status']<=2){
|
||||||
@ -1016,7 +1019,7 @@ function send_sessions(){
|
|||||||
}elseif($temp['status']==8){
|
}elseif($temp['status']==8){
|
||||||
$s=' (SA)';
|
$s=' (SA)';
|
||||||
}
|
}
|
||||||
echo '<tr style="text-align:left;"><td style="padding:5px;">'.style_this($temp['nickname'].$s, $temp['style']).'</td><td style="padding:5px,">';
|
echo '<tr class="left"><td class="padded">'.style_this($temp['nickname'].$s, $temp['style']).'</td><td class="padded">';
|
||||||
if($temp['status']>2){
|
if($temp['status']>2){
|
||||||
get_timeout($temp['lastpost'], $memexpire);
|
get_timeout($temp['lastpost'], $memexpire);
|
||||||
}else{
|
}else{
|
||||||
@ -1024,23 +1027,23 @@ function send_sessions(){
|
|||||||
}
|
}
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
if($U['status']>$temp['status'] || $U['session']===$temp['session']){
|
if($U['status']>$temp['status'] || $U['session']===$temp['session']){
|
||||||
echo "<td style=\"padding:5px;\">$temp[useragent]</td>";
|
echo "<td class=\"padded\">$temp[useragent]</td>";
|
||||||
if($trackip){
|
if($trackip){
|
||||||
echo "<td style=\"padding:5px;\">$temp[ip]</td>";
|
echo "<td class=\"padded\">$temp[ip]</td>";
|
||||||
}
|
}
|
||||||
echo '<td style="padding:5px;">';
|
echo '<td class="padded">';
|
||||||
frmadm('sessions');
|
frmadm('sessions');
|
||||||
echo hidden('nick', $temp['nickname']).submit($I['kick']).'</form></td></tr>';
|
echo hidden('nick', $temp['nickname']).submit($I['kick']).'</form></td></tr>';
|
||||||
}else{
|
}else{
|
||||||
echo '<td style="padding:5px;">-</td>';
|
echo '<td class="padded">-</td>';
|
||||||
if($trackip){
|
if($trackip){
|
||||||
echo '<td style="padding:5px;">-</td>';
|
echo '<td class="padded">-</td>';
|
||||||
}
|
}
|
||||||
echo '<td style="padding:5px;">-</td></tr>';
|
echo '<td class="padded">-</td></tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo "</table><br>$H[backtochat]</div>";
|
echo "</table><br>$H[backtochat]";
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1131,7 +1134,7 @@ function manage_linkfilter(){
|
|||||||
function send_filter($arg=''){
|
function send_filter($arg=''){
|
||||||
global $H, $I, $U, $db, $memcached;
|
global $H, $I, $U, $db, $memcached;
|
||||||
print_start('filter');
|
print_start('filter');
|
||||||
echo "<div style=\"text-align:center;\"><h2>$I[filter]</h2><i>$arg</i><table style=\"margin-left:auto;margin-right:auto;\">";
|
echo "<h2>$I[filter]</h2><i>$arg</i><table class=\"center-table\">";
|
||||||
thr();
|
thr();
|
||||||
echo "<tr><th><table style=\"width:100%;\"><tr><td style=\"width:8em;\">$I[fid]</td>";
|
echo "<tr><th><table style=\"width:100%;\"><tr><td style=\"width:8em;\">$I[fid]</td>";
|
||||||
echo "<td style=\"width:12em;\">$I[match]</td>";
|
echo "<td style=\"width:12em;\">$I[match]</td>";
|
||||||
@ -1179,7 +1182,7 @@ function send_filter($arg=''){
|
|||||||
echo "<td style=\"width:9em;\"><input type=\"checkbox\" name=\"allowinpm\" id=\"allowinpm-$filter[id]\" value=\"1\"$check><label for=\"allowinpm-$filter[id]\">$I[allowpm]</label></td>";
|
echo "<td style=\"width:9em;\"><input type=\"checkbox\" name=\"allowinpm\" id=\"allowinpm-$filter[id]\" value=\"1\"$check><label for=\"allowinpm-$filter[id]\">$I[allowpm]</label></td>";
|
||||||
echo "<td style=\"width:5em;\"><input type=\"checkbox\" name=\"regex\" id=\"regex-$filter[id]\" value=\"1\"$checked><label for=\"regex-$filter[id]\">$I[regex]</label></td>";
|
echo "<td style=\"width:5em;\"><input type=\"checkbox\" name=\"regex\" id=\"regex-$filter[id]\" value=\"1\"$checked><label for=\"regex-$filter[id]\">$I[regex]</label></td>";
|
||||||
echo "<td style=\"width:5em;\"><input type=\"checkbox\" name=\"kick\" id=\"kick-$filter[id]\" value=\"1\"$checkedk><label for=\"kick-$filter[id]\">$I[kick]</label></td>";
|
echo "<td style=\"width:5em;\"><input type=\"checkbox\" name=\"kick\" id=\"kick-$filter[id]\" value=\"1\"$checkedk><label for=\"kick-$filter[id]\">$I[kick]</label></td>";
|
||||||
echo '<td style="width:5em;text-align:right;">'.submit($I['change']).'</td></tr></table></form></td></tr>';
|
echo '<td class="right" style="width:5em;">'.submit($I['change']).'</td></tr></table></form></td></tr>';
|
||||||
}
|
}
|
||||||
echo '<tr><td>';
|
echo '<tr><td>';
|
||||||
frmadm('filter');
|
frmadm('filter');
|
||||||
@ -1190,15 +1193,15 @@ function send_filter($arg=''){
|
|||||||
echo "<td style=\"width:9em;\"><input type=\"checkbox\" name=\"allowinpm\" id=\"allowinpm\" value=\"1\"><label for=\"allowinpm\">$I[allowpm]</label></td>";
|
echo "<td style=\"width:9em;\"><input type=\"checkbox\" name=\"allowinpm\" id=\"allowinpm\" value=\"1\"><label for=\"allowinpm\">$I[allowpm]</label></td>";
|
||||||
echo "<td style=\"width:5em;\"><input type=\"checkbox\" name=\"regex\" id=\"regex\" value=\"1\"><label for=\"regex\">$I[regex]</label></td>";
|
echo "<td style=\"width:5em;\"><input type=\"checkbox\" name=\"regex\" id=\"regex\" value=\"1\"><label for=\"regex\">$I[regex]</label></td>";
|
||||||
echo "<td style=\"width:5em;\"><input type=\"checkbox\" name=\"kick\" id=\"kick\" value=\"1\"><label for=\"kick\">$I[kick]</label></td>";
|
echo "<td style=\"width:5em;\"><input type=\"checkbox\" name=\"kick\" id=\"kick\" value=\"1\"><label for=\"kick\">$I[kick]</label></td>";
|
||||||
echo '<td style="width:5em;text-align:right;">'.submit($I['add']).'</td></tr></table></form></td></tr>';
|
echo '<td class="right" style="width:5em;">'.submit($I['add']).'</td></tr></table></form></td></tr>';
|
||||||
echo "</table><br>$H[backtochat]</div>";
|
echo "</table><br>$H[backtochat]";
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
function send_linkfilter($arg=''){
|
function send_linkfilter($arg=''){
|
||||||
global $H, $I, $U, $db, $memcached;
|
global $H, $I, $U, $db, $memcached;
|
||||||
print_start('linkfilter');
|
print_start('linkfilter');
|
||||||
echo "<div style=\"text-align:center;\"><h2>$I[linkfilter]</h2><i>$arg</i><table style=\"margin-left:auto;margin-right:auto;\">";
|
echo "<h2>$I[linkfilter]</h2><i>$arg</i><table class=\"center-table\">";
|
||||||
thr();
|
thr();
|
||||||
echo "<tr><th><table style=\"width:100%;\"><tr><td style=\"width:8em;\">$I[fid]</td>";
|
echo "<tr><th><table style=\"width:100%;\"><tr><td style=\"width:8em;\">$I[fid]</td>";
|
||||||
echo "<td style=\"width:12em;\">$I[match]</td>";
|
echo "<td style=\"width:12em;\">$I[match]</td>";
|
||||||
@ -1232,7 +1235,7 @@ function send_linkfilter($arg=''){
|
|||||||
echo "<td style=\"width:12em;\"><input type=\"text\" name=\"match\" value=\"$filter[match]\" size=\"20\" style=\"$U[style]\"></td>";
|
echo "<td style=\"width:12em;\"><input type=\"text\" name=\"match\" value=\"$filter[match]\" size=\"20\" style=\"$U[style]\"></td>";
|
||||||
echo '<td style="width:12em;"><input type="text" name="replace" value="'.htmlspecialchars($filter['replace'])."\" size=\"20\" style=\"$U[style]\"></td>";
|
echo '<td style="width:12em;"><input type="text" name="replace" value="'.htmlspecialchars($filter['replace'])."\" size=\"20\" style=\"$U[style]\"></td>";
|
||||||
echo "<td style=\"width:5em;\"><input type=\"checkbox\" name=\"regex\" id=\"regex-$filter[id]\" value=\"1\"$checked><label for=\"regex-$filter[id]\">$I[regex]</label></td>";
|
echo "<td style=\"width:5em;\"><input type=\"checkbox\" name=\"regex\" id=\"regex-$filter[id]\" value=\"1\"$checked><label for=\"regex-$filter[id]\">$I[regex]</label></td>";
|
||||||
echo '<td style="width:5em;text-align:right;">'.submit($I['change']).'</td></tr></table></form></td></tr>';
|
echo '<td class="right" style="width:5em;">'.submit($I['change']).'</td></tr></table></form></td></tr>';
|
||||||
}
|
}
|
||||||
echo '<tr><td>';
|
echo '<tr><td>';
|
||||||
frmadm('linkfilter');
|
frmadm('linkfilter');
|
||||||
@ -1241,8 +1244,8 @@ function send_linkfilter($arg=''){
|
|||||||
echo "<td style=\"width:12em;\"><input type=\"text\" name=\"match\" value=\"\" size=\"20\" style=\"$U[style]\"></td>";
|
echo "<td style=\"width:12em;\"><input type=\"text\" name=\"match\" value=\"\" size=\"20\" style=\"$U[style]\"></td>";
|
||||||
echo "<td style=\"width:12em;\"><input type=\"text\" name=\"replace\" value=\"\" size=\"20\" style=\"$U[style]\"></td>";
|
echo "<td style=\"width:12em;\"><input type=\"text\" name=\"replace\" value=\"\" size=\"20\" style=\"$U[style]\"></td>";
|
||||||
echo "<td style=\"width:5em;\"><input type=\"checkbox\" name=\"regex\" id=\"regex\" value=\"1\"><label for=\"regex\">$I[regex]</label></td>";
|
echo "<td style=\"width:5em;\"><input type=\"checkbox\" name=\"regex\" id=\"regex\" value=\"1\"><label for=\"regex\">$I[regex]</label></td>";
|
||||||
echo '<td style="width:5em;text-align:right;">'.submit($I['add']).'</td></tr></table></form></td></tr>';
|
echo '<td class="right" style="width:5em;">'.submit($I['add']).'</td></tr></table></form></td></tr>';
|
||||||
echo "</table><br>$H[backtochat]</div>";
|
echo "</table><br>$H[backtochat]";
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1276,10 +1279,11 @@ function send_messages($js){
|
|||||||
}else{
|
}else{
|
||||||
print_start('messages');
|
print_start('messages');
|
||||||
}
|
}
|
||||||
|
echo '<div class="left">';
|
||||||
echo '<a id="top"></a>';
|
echo '<a id="top"></a>';
|
||||||
echo '<div id="topic">';
|
echo '<div id="topic">';
|
||||||
echo get_setting('topic');
|
echo get_setting('topic');
|
||||||
echo '</div><div id="chatters" style="max-height:100px;overflow-y:auto;">';
|
echo '</div><div id="chatters">';
|
||||||
print_chatters();
|
print_chatters();
|
||||||
echo "</div><a style=\"position:fixed;top:0.5em;right:0.5em\" href=\"#bottom\">$I[bottom]</a><div id=\"messages\">";
|
echo "</div><a style=\"position:fixed;top:0.5em;right:0.5em\" href=\"#bottom\">$I[bottom]</a><div id=\"messages\">";
|
||||||
print_messages();
|
print_messages();
|
||||||
@ -1288,15 +1292,15 @@ function send_messages($js){
|
|||||||
echo "<script type=\"text/javascript\">var id=$_REQUEST[id]; setInterval(function (){xmlhttp=new XMLHttpRequest(); xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4 && xmlhttp.status==200){if(xmlhttp.responseText.match(/^</)){document.write(xmlhttp.responseText);}else{var obj=JSON.parse(xmlhttp.responseText); id=obj[0]; document.getElementById(\"messages\").innerHTML=obj[1]+document.getElementById(\"messages\").innerHTML; document.getElementById(\"chatters\").innerHTML=obj[2]; document.getElementById(\"topic\").innerHTML=obj[3];}}}; xmlhttp.open('POST','$_SERVER[SCRIPT_NAME]?action=jsrefresh&session=$U[session]&id='+id,true); xmlhttp.send();}, $U[refresh]000);</script>";
|
echo "<script type=\"text/javascript\">var id=$_REQUEST[id]; setInterval(function (){xmlhttp=new XMLHttpRequest(); xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4 && xmlhttp.status==200){if(xmlhttp.responseText.match(/^</)){document.write(xmlhttp.responseText);}else{var obj=JSON.parse(xmlhttp.responseText); id=obj[0]; document.getElementById(\"messages\").innerHTML=obj[1]+document.getElementById(\"messages\").innerHTML; document.getElementById(\"chatters\").innerHTML=obj[2]; document.getElementById(\"topic\").innerHTML=obj[3];}}}; xmlhttp.open('POST','$_SERVER[SCRIPT_NAME]?action=jsrefresh&session=$U[session]&id='+id,true); xmlhttp.send();}, $U[refresh]000);</script>";
|
||||||
}
|
}
|
||||||
echo "<a id=\"bottom\"></a><a style=\"position:fixed;bottom:0.5em;right:0.5em\" href=\"#top\">$I[top]</a>";
|
echo "<a id=\"bottom\"></a><a style=\"position:fixed;bottom:0.5em;right:0.5em\" href=\"#top\">$I[top]</a>";
|
||||||
|
echo '</div>';
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
function send_notes($type){
|
function send_notes($type){
|
||||||
global $H, $I, $U, $db;
|
global $H, $I, $U, $db;
|
||||||
print_start('notes');
|
print_start('notes');
|
||||||
echo '<div style="text-align:center;">';
|
|
||||||
if($U['status']>=6){
|
if($U['status']>=6){
|
||||||
echo "<table style=\"margin-left:auto;margin-right:auto;\"><tr><td><$H[form] target=\"view\">$H[commonform]".hidden('action', 'notes').hidden('do', 'admin').submit($I['admnotes']).'</form></td>';
|
echo "<table class=\"center-table\"><tr><td><$H[form] target=\"view\">$H[commonform]".hidden('action', 'notes').hidden('do', 'admin').submit($I['admnotes']).'</form></td>';
|
||||||
echo "<td><$H[form] target=\"view\">$H[commonform]".hidden('action', 'notes').submit($I['notes']).'</form></td></tr></table>';
|
echo "<td><$H[form] target=\"view\">$H[commonform]".hidden('action', 'notes').submit($I['notes']).'</form></td></tr></table>';
|
||||||
}
|
}
|
||||||
if($type==='staff'){
|
if($type==='staff'){
|
||||||
@ -1352,7 +1356,7 @@ function send_notes($type){
|
|||||||
echo hidden('action', 'notes')."<textarea name=\"text\" rows=\"$U[notesboxheight]\" cols=\"$U[notesboxwidth]\">".htmlspecialchars($note['text']).'</textarea><br>';
|
echo hidden('action', 'notes')."<textarea name=\"text\" rows=\"$U[notesboxheight]\" cols=\"$U[notesboxwidth]\">".htmlspecialchars($note['text']).'</textarea><br>';
|
||||||
echo submit($I['savenotes']).'</form><br>';
|
echo submit($I['savenotes']).'</form><br>';
|
||||||
if($num[0]>1){
|
if($num[0]>1){
|
||||||
echo "<br><table style=\"margin-left:auto;margin-right:auto;\"><tr><td>$I[revisions]</td>";
|
echo "<br><table class=\"center-table\"><tr><td>$I[revisions]</td>";
|
||||||
if($revision<$num[0]-1){
|
if($revision<$num[0]-1){
|
||||||
echo "<td><$H[form]>$H[commonform]".hidden('action', 'notes').hidden('revision', $revision+1);
|
echo "<td><$H[form]>$H[commonform]".hidden('action', 'notes').hidden('revision', $revision+1);
|
||||||
if($type==='admin'){
|
if($type==='admin'){
|
||||||
@ -1369,31 +1373,30 @@ function send_notes($type){
|
|||||||
}
|
}
|
||||||
echo '</tr></table>';
|
echo '</tr></table>';
|
||||||
}
|
}
|
||||||
echo '</div>';
|
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
function send_approve_waiting(){
|
function send_approve_waiting(){
|
||||||
global $H, $I, $db;
|
global $H, $I, $db;
|
||||||
print_start('approve_waiting');
|
print_start('approve_waiting');
|
||||||
echo "<div style=\"text-align:center;\"><h2>$I[waitingroom]</h2>";
|
echo "<h2>$I[waitingroom]</h2>";
|
||||||
$result=$db->query('SELECT * FROM ' . PREFIX . 'sessions WHERE entry=0 AND status=1 ORDER BY id;');
|
$result=$db->query('SELECT * FROM ' . PREFIX . 'sessions WHERE entry=0 AND status=1 ORDER BY id;');
|
||||||
if($tmp=$result->fetchAll(PDO::FETCH_ASSOC)){
|
if($tmp=$result->fetchAll(PDO::FETCH_ASSOC)){
|
||||||
frmadm('approve');
|
frmadm('approve');
|
||||||
echo '<table style="text-align:left;margin-left:auto;margin-right:auto;">';
|
echo '<table class="center-table" class="left">';
|
||||||
echo "<tr><th style=\"padding:5px;\">$I[sessnick]</th><th style=\"padding:5px;\">$I[sessua]</th></tr>";
|
echo "<tr><th class=\"padded\">$I[sessnick]</th><th class=\"padded\">$I[sessua]</th></tr>";
|
||||||
foreach($tmp as $temp){
|
foreach($tmp as $temp){
|
||||||
echo '<tr>'.hidden('alls[]', $temp['nickname'])."<td style=\"padding:5px;\"><input type=\"checkbox\" name=\"csid[]\" id=\"$temp[nickname]]\" value=\"$temp[nickname]\"><label for=\"$temp[nickname]\"> ".style_this($temp['nickname'], $temp['style'])."</label></td><td style=\"padding:5px;\">$temp[useragent]</td></tr>";
|
echo '<tr>'.hidden('alls[]', $temp['nickname'])."<td class=\"padded\"><input type=\"checkbox\" name=\"csid[]\" id=\"$temp[nickname]]\" value=\"$temp[nickname]\"><label for=\"$temp[nickname]\"> ".style_this($temp['nickname'], $temp['style'])."</label></td><td class=\"padded\">$temp[useragent]</td></tr>";
|
||||||
}
|
}
|
||||||
echo "</table><br><table style=\"text-align:left;margin-left:auto;margin-right:auto;\"><tr><td><input type=\"radio\" name=\"what\" value=\"allowchecked\" id=\"allowchecked\" checked><label for=\"allowchecked\">$I[allowchecked]</label></td>";
|
echo "</table><br><table class=\"center-table\" class=\"left\"><tr><td><input type=\"radio\" name=\"what\" value=\"allowchecked\" id=\"allowchecked\" checked><label for=\"allowchecked\">$I[allowchecked]</label></td>";
|
||||||
echo "<td><input type=\"radio\" name=\"what\" value=\"allowall\" id=\"allowall\"><label for=\"allowall\">$I[allowall]</label></td>";
|
echo "<td><input type=\"radio\" name=\"what\" value=\"allowall\" id=\"allowall\"><label for=\"allowall\">$I[allowall]</label></td>";
|
||||||
echo "<td><input type=\"radio\" name=\"what\" value=\"denychecked\" id=\"denychecked\"><label for=\"denychecked\">$I[denychecked]</label></td>";
|
echo "<td><input type=\"radio\" name=\"what\" value=\"denychecked\" id=\"denychecked\"><label for=\"denychecked\">$I[denychecked]</label></td>";
|
||||||
echo "<td><input type=\"radio\" name=\"what\" value=\"denyall\" id=\"denyall\"><label for=\"denyall\">$I[denyall]</label></td></tr><tr><td colspan=\"8\" style=\"text-align:center;\">$I[denymessage] <input type=\"text\" name=\"kickmessage\" size=\"45\"></td>";
|
echo "<td><input type=\"radio\" name=\"what\" value=\"denyall\" id=\"denyall\"><label for=\"denyall\">$I[denyall]</label></td></tr><tr><td colspan=\"8\" class=\"center\">$I[denymessage] <input type=\"text\" name=\"kickmessage\" size=\"45\"></td>";
|
||||||
echo '</tr><tr><td colspan="8" style="text-align:center;">'.submit($I['butallowdeny']).'</td></tr></table></form>';
|
echo '</tr><tr><td colspan="8" class="center">'.submit($I['butallowdeny']).'</td></tr></table></form>';
|
||||||
}else{
|
}else{
|
||||||
echo "$I[waitempty]<br>";
|
echo "$I[waitempty]<br>";
|
||||||
}
|
}
|
||||||
echo "<br>$H[backtochat]</div>";
|
echo "<br>$H[backtochat]";
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1431,7 +1434,7 @@ function send_waiting_room(){
|
|||||||
header("Refresh: $refresh; URL=$_SERVER[SCRIPT_NAME]?action=wait&session=$U[session]");
|
header("Refresh: $refresh; URL=$_SERVER[SCRIPT_NAME]?action=wait&session=$U[session]");
|
||||||
print_start('waitingroom', $refresh, "$_SERVER[SCRIPT_NAME]?action=wait&session=$U[session]&lang=$language");
|
print_start('waitingroom', $refresh, "$_SERVER[SCRIPT_NAME]?action=wait&session=$U[session]&lang=$language");
|
||||||
}
|
}
|
||||||
echo "<div style=\"text-align:center;\"><h2>$I[waitingroom]</h2><p>";
|
echo "<h2>$I[waitingroom]</h2><p>";
|
||||||
if($wait){
|
if($wait){
|
||||||
printf($I['waittext'], style_this($U['nickname'], $U['style']), $timeleft);
|
printf($I['waittext'], style_this($U['nickname'], $U['style']), $timeleft);
|
||||||
}else{
|
}else{
|
||||||
@ -1454,7 +1457,6 @@ function send_waiting_room(){
|
|||||||
if(!empty($rulestxt)){
|
if(!empty($rulestxt)){
|
||||||
echo "<h2>$I[rules]</h2><b>$rulestxt</b>";
|
echo "<h2>$I[rules]</h2><b>$rulestxt</b>";
|
||||||
}
|
}
|
||||||
echo '</div>';
|
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1462,17 +1464,19 @@ function send_waiting_room(){
|
|||||||
function send_choose_messages(){
|
function send_choose_messages(){
|
||||||
global $H, $I, $U;
|
global $H, $I, $U;
|
||||||
print_start('choose_messages');
|
print_start('choose_messages');
|
||||||
|
echo '<div class="left">';
|
||||||
frmadm('clean');
|
frmadm('clean');
|
||||||
echo hidden('what', 'selected').submit($I['delselmes'], 'class="delbutton"').'<br><br>';
|
echo hidden('what', 'selected').submit($I['delselmes'], 'class="delbutton"').'<br><br>';
|
||||||
print_messages($U['status']);
|
print_messages($U['status']);
|
||||||
echo "</form><br>$H[backtochat]";
|
echo "</form><br>$H[backtochat]";
|
||||||
|
echo '</div>';
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
function send_del_confirm(){
|
function send_del_confirm(){
|
||||||
global $I;
|
global $I;
|
||||||
print_start('del_confirm');
|
print_start('del_confirm');
|
||||||
echo "<div style=\"text-align:center;\"><table style=\"margin-left:auto;margin-right:auto;\"><tr><td colspan=\"2\">$I[confirm]</td></tr><tr><td>";
|
echo "<table class=\"center-table\"><tr><td colspan=\"2\">$I[confirm]</td></tr><tr><td>";
|
||||||
frmpst('delete');
|
frmpst('delete');
|
||||||
if(isSet($_REQUEST['multi'])){
|
if(isSet($_REQUEST['multi'])){
|
||||||
echo hidden('multi', 'on');
|
echo hidden('multi', 'on');
|
||||||
@ -1488,7 +1492,7 @@ function send_del_confirm(){
|
|||||||
if(isSet($_REQUEST['sendto'])){
|
if(isSet($_REQUEST['sendto'])){
|
||||||
echo hidden('sendto', $_REQUEST['sendto']);
|
echo hidden('sendto', $_REQUEST['sendto']);
|
||||||
}
|
}
|
||||||
echo submit($I['no'], 'class="backbutton"').'</form></td><tr></table></div>';
|
echo submit($I['no'], 'class="backbutton"').'</form></td><tr></table>';
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1499,7 +1503,7 @@ function send_post(){
|
|||||||
if(!isSet($_REQUEST['sendto'])){
|
if(!isSet($_REQUEST['sendto'])){
|
||||||
$_REQUEST['sendto']='';
|
$_REQUEST['sendto']='';
|
||||||
}
|
}
|
||||||
echo '<div style="text-align:center;"><table style="border-spacing:0px;margin-left:auto;margin-right:auto;"><tr><td>';
|
echo '<table class="center-table" style="border-spacing:0px;"><tr><td>';
|
||||||
frmpst('post');
|
frmpst('post');
|
||||||
echo hidden('postid', $U['postid']);
|
echo hidden('postid', $U['postid']);
|
||||||
if(isSet($_REQUEST['multi'])){
|
if(isSet($_REQUEST['multi'])){
|
||||||
@ -1566,7 +1570,7 @@ function send_post(){
|
|||||||
echo "<input type=\"checkbox\" name=\"kick\" id=\"kick\" value=\"kick\"><label for=\"kick\"> $I[kick]</label>";
|
echo "<input type=\"checkbox\" name=\"kick\" id=\"kick\" value=\"kick\"><label for=\"kick\"> $I[kick]</label>";
|
||||||
echo "<input type=\"checkbox\" name=\"what\" id=\"what\" value=\"purge\" checked><label for=\"what\"> $I[alsopurge]</label>";
|
echo "<input type=\"checkbox\" name=\"what\" id=\"what\" value=\"purge\" checked><label for=\"what\"> $I[alsopurge]</label>";
|
||||||
}
|
}
|
||||||
echo '</td></tr></table></form></td></tr><tr><td style="height:8px;"></td></tr><tr><td><table style="border-spacing:0px;margin-left:auto;margin-right:auto;"><tr><td>';
|
echo '</td></tr></table></form></td></tr><tr><td style="height:8px;"></td></tr><tr><td><table class="center-table" style="border-spacing:0px;"><tr><td>';
|
||||||
frmpst('delete');
|
frmpst('delete');
|
||||||
if(isSet($_REQUEST['multi'])){
|
if(isSet($_REQUEST['multi'])){
|
||||||
echo hidden('multi', 'on');
|
echo hidden('multi', 'on');
|
||||||
@ -1586,13 +1590,14 @@ function send_post(){
|
|||||||
echo hidden('multi', 'on').submit($I['switchmulti']);
|
echo hidden('multi', 'on').submit($I['switchmulti']);
|
||||||
}
|
}
|
||||||
echo hidden('sendto', $_REQUEST['sendto']).'</form></td>';
|
echo hidden('sendto', $_REQUEST['sendto']).'</form></td>';
|
||||||
echo '</tr></table></td></tr></table></div>';
|
echo '</tr></table></td></tr></table>';
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
function send_help(){
|
function send_help(){
|
||||||
global $H, $I, $U;
|
global $H, $I, $U;
|
||||||
print_start('help');
|
print_start('help');
|
||||||
|
echo '<div class="left">';
|
||||||
$rulestxt=get_setting('rulestxt');
|
$rulestxt=get_setting('rulestxt');
|
||||||
if(!empty($rulestxt)){
|
if(!empty($rulestxt)){
|
||||||
echo "<h2>$I[rules]</h2>$rulestxt<br><br><hr>";
|
echo "<h2>$I[rules]</h2>$rulestxt<br><br><hr>";
|
||||||
@ -1610,14 +1615,15 @@ function send_help(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo "<br><hr><div style=\"text-align:center;\">$H[backtochat]$H[credit]</div>";
|
echo "<br><hr><div class=\"center\">$H[backtochat]$H[credit]</div>";
|
||||||
|
echo '</div>';
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
function send_profile($arg=''){
|
function send_profile($arg=''){
|
||||||
global $F, $H, $I, $L, $P, $U, $db, $language;
|
global $F, $H, $I, $L, $P, $U, $db, $language;
|
||||||
print_start('profile');
|
print_start('profile');
|
||||||
echo "<div style=\"text-align:center;\"><$H[form]>$H[commonform]".hidden('action', 'profile').hidden('do', 'save')."<h2>$I[profile]</h2><i>$arg</i><table style=\"margin-left:auto;margin-right:auto;\">";
|
echo "<$H[form]>$H[commonform]".hidden('action', 'profile').hidden('do', 'save')."<h2>$I[profile]</h2><i>$arg</i><table class=\"center-table\">";
|
||||||
thr();
|
thr();
|
||||||
array_multisort(array_map('strtolower', array_keys($P)), SORT_ASC, SORT_STRING, $P);
|
array_multisort(array_map('strtolower', array_keys($P)), SORT_ASC, SORT_STRING, $P);
|
||||||
$ignored=array();
|
$ignored=array();
|
||||||
@ -1628,7 +1634,7 @@ function send_profile($arg=''){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(count($ignored)>0){
|
if(count($ignored)>0){
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><th>$I[unignore]</th><td style=\"text-align:right;\">";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[unignore]</th><td class=\"right\">";
|
||||||
echo "<select name=\"unignore\" size=\"1\"><option value=\"\">$I[choose]</option>";
|
echo "<select name=\"unignore\" size=\"1\"><option value=\"\">$I[choose]</option>";
|
||||||
foreach($ignored as $ign){
|
foreach($ignored as $ign){
|
||||||
$style='';
|
$style='';
|
||||||
@ -1644,7 +1650,7 @@ function send_profile($arg=''){
|
|||||||
thr();
|
thr();
|
||||||
}
|
}
|
||||||
if(count($P)-count($ignored)>1){
|
if(count($P)-count($ignored)>1){
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><th>$I[ignore]</th><td style=\"text-align:right;\">";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[ignore]</th><td class=\"right\">";
|
||||||
echo "<select name=\"ignore\" size=\"1\"><option value=\"\">$I[choose]</option>";
|
echo "<select name=\"ignore\" size=\"1\"><option value=\"\">$I[choose]</option>";
|
||||||
$stmt=$db->query('SELECT poster FROM ' . PREFIX . 'messages GROUP BY poster;');
|
$stmt=$db->query('SELECT poster FROM ' . PREFIX . 'messages GROUP BY poster;');
|
||||||
while($nick=$stmt->fetch(PDO::FETCH_NUM)){
|
while($nick=$stmt->fetch(PDO::FETCH_NUM)){
|
||||||
@ -1658,7 +1664,7 @@ function send_profile($arg=''){
|
|||||||
echo '</select></td></tr></table></td></tr>';
|
echo '</select></td></tr></table></td></tr>';
|
||||||
thr();
|
thr();
|
||||||
}
|
}
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><th>$I[refreshrate]</th><td style=\"text-align:right;\">";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[refreshrate]</th><td class=\"right\">";
|
||||||
echo "<input type=\"number\" name=\"refresh\" size=\"3\" maxlength=\"3\" min=\"5\" max=\"150\" value=\"$U[refresh]\"></td></tr></table></td></tr>";
|
echo "<input type=\"number\" name=\"refresh\" size=\"3\" maxlength=\"3\" min=\"5\" max=\"150\" value=\"$U[refresh]\"></td></tr></table></td></tr>";
|
||||||
thr();
|
thr();
|
||||||
if(!isSet($_COOKIE[COOKIENAME])){
|
if(!isSet($_COOKIE[COOKIENAME])){
|
||||||
@ -1667,14 +1673,14 @@ function send_profile($arg=''){
|
|||||||
$param='';
|
$param='';
|
||||||
}
|
}
|
||||||
preg_match('/#([0-9a-f]{6})/i', $U['style'], $matches);
|
preg_match('/#([0-9a-f]{6})/i', $U['style'], $matches);
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><td><b>$I[fontcolour]</b> (<a href=\"$_SERVER[SCRIPT_NAME]?action=colours$param\" target=\"view\">$I[viewexample]</a>)</td><td style=\"text-align:right;\">";
|
echo "<tr><td><table class=\"left-table\"><tr><td><b>$I[fontcolour]</b> (<a href=\"$_SERVER[SCRIPT_NAME]?action=colours$param\" target=\"view\">$I[viewexample]</a>)</td><td class=\"right\">";
|
||||||
echo "<input type=\"text\" size=\"6\" maxlength=\"6\" pattern=\"[a-fA-F0-9]{6}\" value=\"$matches[1]\" name=\"colour\"></td></tr></table></td></tr>";
|
echo "<input type=\"text\" size=\"6\" maxlength=\"6\" pattern=\"[a-fA-F0-9]{6}\" value=\"$matches[1]\" name=\"colour\"></td></tr></table></td></tr>";
|
||||||
thr();
|
thr();
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><td><b>$I[bgcolour]</b> (<a href=\"$_SERVER[SCRIPT_NAME]?action=colours$param\" target=\"view\">$I[viewexample]</a>)</td><td style=\"text-align:right;\">";
|
echo "<tr><td><table class=\"left-table\"><tr><td><b>$I[bgcolour]</b> (<a href=\"$_SERVER[SCRIPT_NAME]?action=colours$param\" target=\"view\">$I[viewexample]</a>)</td><td class=\"right\">";
|
||||||
echo "<input type=\"text\" size=\"6\" maxlength=\"6\" pattern=\"[a-fA-F0-9]{6}\" value=\"$U[bgcolour]\" name=\"bgcolour\"></td></tr></table></td></tr>";
|
echo "<input type=\"text\" size=\"6\" maxlength=\"6\" pattern=\"[a-fA-F0-9]{6}\" value=\"$U[bgcolour]\" name=\"bgcolour\"></td></tr></table></td></tr>";
|
||||||
thr();
|
thr();
|
||||||
if($U['status']>=3){
|
if($U['status']>=3){
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><th>$I[fontface]</th><td><table style=\"border-spacing:0px;margin-left:auto;\">";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[fontface]</th><td><table class=\"right-table\">";
|
||||||
echo "<tr><td> </td><td><select name=\"font\" size=\"1\"><option value=\"\">* $I[roomdefault] *</option>";
|
echo "<tr><td> </td><td><select name=\"font\" size=\"1\"><option value=\"\">* $I[roomdefault] *</option>";
|
||||||
foreach($F as $name=>$font){
|
foreach($F as $name=>$font){
|
||||||
echo "<option style=\"$font\" ";
|
echo "<option style=\"$font\" ";
|
||||||
@ -1696,7 +1702,7 @@ function send_profile($arg=''){
|
|||||||
}
|
}
|
||||||
echo '<tr><td>'.style_this("$U[nickname] : $I[fontexample]", $U['style']).'</td></tr>';
|
echo '<tr><td>'.style_this("$U[nickname] : $I[fontexample]", $U['style']).'</td></tr>';
|
||||||
thr();
|
thr();
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><th>$I[timestamps]</th><td style=\"text-align:right;\">";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[timestamps]</th><td class=\"right\">";
|
||||||
echo '<input type="checkbox" name="timestamps" id="timestamps" value="on"';
|
echo '<input type="checkbox" name="timestamps" id="timestamps" value="on"';
|
||||||
if($U['timestamps']){
|
if($U['timestamps']){
|
||||||
echo ' checked';
|
echo ' checked';
|
||||||
@ -1704,7 +1710,7 @@ function send_profile($arg=''){
|
|||||||
echo "><label for=\"timestamps\"><b>$I[enabled]</b></label></td></tr></table></td></tr>";
|
echo "><label for=\"timestamps\"><b>$I[enabled]</b></label></td></tr></table></td></tr>";
|
||||||
thr();
|
thr();
|
||||||
if(get_setting('imgembed')){
|
if(get_setting('imgembed')){
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><th>$I[embed]</th><td style=\"text-align:right;\">";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[embed]</th><td class=\"right\">";
|
||||||
echo '<input type="checkbox" name="embed" id="embed" value="on"';
|
echo '<input type="checkbox" name="embed" id="embed" value="on"';
|
||||||
if($U['embed'] && isSet($_COOKIE[COOKIENAME])){
|
if($U['embed'] && isSet($_COOKIE[COOKIENAME])){
|
||||||
echo ' checked';
|
echo ' checked';
|
||||||
@ -1713,7 +1719,7 @@ function send_profile($arg=''){
|
|||||||
thr();
|
thr();
|
||||||
}
|
}
|
||||||
if($U['status']>=5 && get_setting('incognito')){
|
if($U['status']>=5 && get_setting('incognito')){
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><th>$I[incognito]</th><td style=\"text-align:right;\">";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[incognito]</th><td class=\"right\">";
|
||||||
echo '<input type="checkbox" name="incognito" id="incognito" value="on"';
|
echo '<input type="checkbox" name="incognito" id="incognito" value="on"';
|
||||||
if($U['incognito']){
|
if($U['incognito']){
|
||||||
echo ' checked';
|
echo ' checked';
|
||||||
@ -1721,28 +1727,28 @@ function send_profile($arg=''){
|
|||||||
echo "><label for=\"incognito\"><b>$I[enabled]</b></label></td></tr></table></td></tr>";
|
echo "><label for=\"incognito\"><b>$I[enabled]</b></label></td></tr></table></td></tr>";
|
||||||
thr();
|
thr();
|
||||||
}
|
}
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><th>$I[pbsize]</th><td><table style=\"border-spacing:0px;margin-left:auto;\">";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[pbsize]</th><td><table class=\"right-table\">";
|
||||||
echo "<tr><td> </td><td>$I[width]</td><td><input type=\"number\" name=\"boxwidth\" size=\"3\" maxlength=\"3\" value=\"$U[boxwidth]\"></td>";
|
echo "<tr><td> </td><td>$I[width]</td><td><input type=\"number\" name=\"boxwidth\" size=\"3\" maxlength=\"3\" value=\"$U[boxwidth]\"></td>";
|
||||||
echo "<td> </td><td>$I[height]</td><td><input type=\"number\" name=\"boxheight\" size=\"3\" maxlength=\"3\" value=\"$U[boxheight]\"></td>";
|
echo "<td> </td><td>$I[height]</td><td><input type=\"number\" name=\"boxheight\" size=\"3\" maxlength=\"3\" value=\"$U[boxheight]\"></td>";
|
||||||
echo '</tr></table></td></tr></table></td></tr>';
|
echo '</tr></table></td></tr></table></td></tr>';
|
||||||
thr();
|
thr();
|
||||||
if($U['status']>=5){
|
if($U['status']>=5){
|
||||||
echo "<tr><td><table style\"width:100%;text-align:left;\"><tr><th>$I[nbsize]</th><td><table style=\"border-spacing:0px;margin-left:auto;\">";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[nbsize]</th><td><table class=\"right-table\">";
|
||||||
echo "<tr><td> </td><td>$I[width]</td><td><input type=\"number\" name=\"notesboxwidth\" size=\"3\" maxlength=\"3\" value=\"$U[notesboxwidth]\"></td>";
|
echo "<tr><td> </td><td>$I[width]</td><td><input type=\"number\" name=\"notesboxwidth\" size=\"3\" maxlength=\"3\" value=\"$U[notesboxwidth]\"></td>";
|
||||||
echo "<td> </td><td>$I[height]</td><td><input type=\"number\" name=\"notesboxheight\" size=\"3\" maxlength=\"3\" value=\"$U[notesboxheight]\"></td>";
|
echo "<td> </td><td>$I[height]</td><td><input type=\"number\" name=\"notesboxheight\" size=\"3\" maxlength=\"3\" value=\"$U[notesboxheight]\"></td>";
|
||||||
echo '</tr></table></td></tr></table></td></tr>';
|
echo '</tr></table></td></tr></table></td></tr>';
|
||||||
thr();
|
thr();
|
||||||
}
|
}
|
||||||
if($U['status']>=2){
|
if($U['status']>=2){
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><th>$I[changepass]</th></tr>";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[changepass]</th></tr>";
|
||||||
echo '<tr><td><table style="border-spacing:0px;margin-left:auto;">';
|
echo '<tr><td><table class="right-table">';
|
||||||
echo "<tr><td> </td><td>$I[oldpass]</td><td><input type=\"password\" name=\"oldpass\" size=\"20\"></td></tr>";
|
echo "<tr><td> </td><td>$I[oldpass]</td><td><input type=\"password\" name=\"oldpass\" size=\"20\"></td></tr>";
|
||||||
echo "<tr><td> </td><td>$I[newpass]</td><td><input type=\"password\" name=\"newpass\" size=\"20\"></td></tr>";
|
echo "<tr><td> </td><td>$I[newpass]</td><td><input type=\"password\" name=\"newpass\" size=\"20\"></td></tr>";
|
||||||
echo "<tr><td> </td><td>$I[confirmpass]</td><td><input type=\"password\" name=\"confirmpass\" size=\"20\"></td></tr>";
|
echo "<tr><td> </td><td>$I[confirmpass]</td><td><input type=\"password\" name=\"confirmpass\" size=\"20\"></td></tr>";
|
||||||
echo '</table></td></tr></table></td></tr>';
|
echo '</table></td></tr></table></td></tr>';
|
||||||
thr();
|
thr();
|
||||||
echo "<tr><td><table style=\"width:100%;text-align:left;\"><tr><th>$I[changenickname]</th></tr>";
|
echo "<tr><td><table class=\"left-table\"><tr><th>$I[changenickname]</th></tr>";
|
||||||
echo '<tr><td><table style="border-spacing:0px;margin-left:auto;">';
|
echo '<tr><td><table class="right-table">';
|
||||||
echo "<tr><td> </td><td>$I[newnickname]</td><td><input type=\"text\" name=\"newnickname\" size=\"20\"></td></tr>";
|
echo "<tr><td> </td><td>$I[newnickname]</td><td><input type=\"text\" name=\"newnickname\" size=\"20\"></td></tr>";
|
||||||
echo "<tr><td> </td><td>$I[newpass]</td><td><input type=\"password\" name=\"new_pass\" size=\"20\"></td></tr>";
|
echo "<tr><td> </td><td>$I[newpass]</td><td><input type=\"password\" name=\"new_pass\" size=\"20\"></td></tr>";
|
||||||
echo '</table></td></tr></table></td></tr>';
|
echo '</table></td></tr></table></td></tr>';
|
||||||
@ -1754,14 +1760,14 @@ function send_profile($arg=''){
|
|||||||
echo " <a href=\"$_SERVER[SCRIPT_NAME]?lang=$lang&session=$U[session]&action=controls\" target=\"controls\">$name</a>";
|
echo " <a href=\"$_SERVER[SCRIPT_NAME]?lang=$lang&session=$U[session]&action=controls\" target=\"controls\">$name</a>";
|
||||||
}
|
}
|
||||||
echo '</p></td></tr>';
|
echo '</p></td></tr>';
|
||||||
echo "<br>$H[backtochat]</div>";
|
echo "<br>$H[backtochat]";
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
function send_controls(){
|
function send_controls(){
|
||||||
global $H, $I, $U;
|
global $H, $I, $U;
|
||||||
print_start('controls');
|
print_start('controls');
|
||||||
echo '<table style="border-spacing:0px;margin-left:auto;margin-right:auto;"><tr>';
|
echo '<table class="center-table" style="border-spacing:0px;"><tr>';
|
||||||
echo "<td><$H[form] target=\"post\">$H[commonform]".hidden('action', 'post').submit($I['reloadpb']).'</form></td>';
|
echo "<td><$H[form] target=\"post\">$H[commonform]".hidden('action', 'post').submit($I['reloadpb']).'</form></td>';
|
||||||
echo "<td><$H[form] target=\"view\">$H[commonform]".hidden('action', 'view').submit($I['reloadmsgs']).'</form></td>';
|
echo "<td><$H[form] target=\"view\">$H[commonform]".hidden('action', 'view').submit($I['reloadmsgs']).'</form></td>';
|
||||||
echo "<td><$H[form] target=\"view\">$H[commonform]".hidden('action', 'profile').submit($I['chgprofile']).'</form></td>';
|
echo "<td><$H[form] target=\"view\">$H[commonform]".hidden('action', 'profile').submit($I['chgprofile']).'</form></td>';
|
||||||
@ -1781,14 +1787,14 @@ function send_controls(){
|
|||||||
function send_logout(){
|
function send_logout(){
|
||||||
global $H, $I, $U;
|
global $H, $I, $U;
|
||||||
print_start('logout');
|
print_start('logout');
|
||||||
echo '<div style="text-align:center;"><h1>'.sprintf($I['bye'], style_this($U['nickname'], $U['style']))."</h1>$H[backtologin]</div>";
|
echo '<h1>'.sprintf($I['bye'], style_this($U['nickname'], $U['style']))."</h1>$H[backtologin]";
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
function send_colours(){
|
function send_colours(){
|
||||||
global $H, $I;
|
global $H, $I;
|
||||||
print_start('colours');
|
print_start('colours');
|
||||||
echo "<div style=\"text-align:center;\"><h2>$I[colourtable]</h2><tt>";
|
echo "<h2>$I[colourtable]</h2><tt>";
|
||||||
for($red=0x00;$red<=0xFF;$red+=0x33){
|
for($red=0x00;$red<=0xFF;$red+=0x33){
|
||||||
for($green=0x00;$green<=0xFF;$green+=0x33){
|
for($green=0x00;$green<=0xFF;$green+=0x33){
|
||||||
for($blue=0x00;$blue<=0xFF;$blue+=0x33){
|
for($blue=0x00;$blue<=0xFF;$blue+=0x33){
|
||||||
@ -1799,7 +1805,7 @@ function send_colours(){
|
|||||||
}
|
}
|
||||||
echo '<br>';
|
echo '<br>';
|
||||||
}
|
}
|
||||||
echo "</tt><$H[form]>$H[commonform]".hidden('action', 'profile').submit($I['backtoprofile'], ' class="backbutton"').'</form></div>';
|
echo "</tt><$H[form]>$H[commonform]".hidden('action', 'profile').submit($I['backtoprofile'], ' class="backbutton"').'</form>';
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1809,24 +1815,24 @@ function send_login(){
|
|||||||
print_start('login');
|
print_start('login');
|
||||||
$ga=(int) get_setting('guestaccess');
|
$ga=(int) get_setting('guestaccess');
|
||||||
$englobal=(int) get_setting('englobalpass');
|
$englobal=(int) get_setting('englobalpass');
|
||||||
echo '<div style="text-align:center;"><h1>'.get_setting('chatname').'</h1>';
|
echo '<h1>'.get_setting('chatname').'</h1>';
|
||||||
echo "<$H[form] target=\"_parent\">$H[commonform]".hidden('action', 'login');
|
echo "<$H[form] target=\"_parent\">$H[commonform]".hidden('action', 'login');
|
||||||
if($englobal===1 && isSet($_POST['globalpass'])){
|
if($englobal===1 && isSet($_POST['globalpass'])){
|
||||||
echo hidden('globalpass', $_POST['globalpass']);
|
echo hidden('globalpass', $_POST['globalpass']);
|
||||||
}
|
}
|
||||||
echo '<table style="border:2px solid;margin-left:auto;margin-right:auto;">';
|
echo '<table class="center-table" style="border:2px solid;">';
|
||||||
if($englobal!==1 || (isSet($_POST['globalpass']) && $_POST['globalpass']==get_setting('globalpass'))){
|
if($englobal!==1 || (isSet($_POST['globalpass']) && $_POST['globalpass']==get_setting('globalpass'))){
|
||||||
echo "<tr><td style=\"text-align:left;\">$I[nick]</td><td style=\"text-align:right;\"><input type=\"text\" name=\"nick\" size=\"15\" autofocus></td></tr>";
|
echo "<tr><td class=\"left\">$I[nick]</td><td class=\"right\"><input type=\"text\" name=\"nick\" size=\"15\" autofocus></td></tr>";
|
||||||
echo "<tr><td style=\"text-align:left;\">$I[pass]</td><td style=\"text-align:right;\"><input type=\"password\" name=\"pass\" size=\"15\"></td></tr>";
|
echo "<tr><td class=\"left\">$I[pass]</td><td class=\"right\"><input type=\"password\" name=\"pass\" size=\"15\"></td></tr>";
|
||||||
send_captcha();
|
send_captcha();
|
||||||
if($ga!==0){
|
if($ga!==0){
|
||||||
if(get_setting('guestreg')!=0){
|
if(get_setting('guestreg')!=0){
|
||||||
echo "<tr><td style=\"text-align:left;\">$I[regpass]</td><td style=\"text-align:right;\"><input type=\"password\" name=\"regpass\" size=\"15\"></td></tr>";
|
echo "<tr><td class=\"left\">$I[regpass]</td><td class=\"right\"><input type=\"password\" name=\"regpass\" size=\"15\"></td></tr>";
|
||||||
}
|
}
|
||||||
if($englobal===2){
|
if($englobal===2){
|
||||||
echo "<tr><td style=\"text-align:left;\">$I[globalloginpass]</td><td style=\"text-align:right;\"><input type=\"password\" name=\"globalpass\" size=\"15\"></td></tr>";
|
echo "<tr><td class=\"left\">$I[globalloginpass]</td><td class=\"right\"><input type=\"password\" name=\"globalpass\" size=\"15\"></td></tr>";
|
||||||
}
|
}
|
||||||
echo "<tr><td colspan=\"2\">$I[choosecol]<br><select style=\"text-align:center;\" name=\"colour\"><option value=\"\">* $I[randomcol] *</option>";
|
echo "<tr><td colspan=\"2\">$I[choosecol]<br><select class=\"center\" name=\"colour\"><option value=\"\">* $I[randomcol] *</option>";
|
||||||
print_colours();
|
print_colours();
|
||||||
echo '</select></td></tr>';
|
echo '</select></td></tr>';
|
||||||
}else{
|
}else{
|
||||||
@ -1842,7 +1848,7 @@ function send_login(){
|
|||||||
echo "<h2>$I[rules]</h2><b>$rulestxt</b><br>";
|
echo "<h2>$I[rules]</h2><b>$rulestxt</b><br>";
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
echo "<tr><td style=\"text-align:left;\">$I[globalloginpass]</td><td style=\"text-align:right;\"><input type=\"password\" name=\"globalpass\" size=\"15\" autofocus></td></tr>";
|
echo "<tr><td class=\"left\">$I[globalloginpass]</td><td class=\"right\"><input type=\"password\" name=\"globalpass\" size=\"15\" autofocus></td></tr>";
|
||||||
if($ga===0){
|
if($ga===0){
|
||||||
echo "<tr><td colspan=\"2\">$I[noguests]</td></tr>";
|
echo "<tr><td colspan=\"2\">$I[noguests]</td></tr>";
|
||||||
}
|
}
|
||||||
@ -1852,14 +1858,14 @@ function send_login(){
|
|||||||
foreach($L as $lang=>$name){
|
foreach($L as $lang=>$name){
|
||||||
echo " <a href=\"$_SERVER[SCRIPT_NAME]?lang=$lang\">$name</a>";
|
echo " <a href=\"$_SERVER[SCRIPT_NAME]?lang=$lang\">$name</a>";
|
||||||
}
|
}
|
||||||
echo "</p>$H[credit]</div>";
|
echo "</p>$H[credit]";
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
function send_error($err){
|
function send_error($err){
|
||||||
global $H, $I;
|
global $H, $I;
|
||||||
print_start('error');
|
print_start('error');
|
||||||
echo "<h2>$I[error]: $err</h2>$H[backtologin]";
|
echo "<div class=\"left\"><h2>$I[error]: $err</h2>$H[backtologin]</div>";
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1917,7 +1923,8 @@ function create_session($setup){
|
|||||||
if($setup){
|
if($setup){
|
||||||
$U['incognito']=1;
|
$U['incognito']=1;
|
||||||
}
|
}
|
||||||
if(get_setting('captcha')>0 && ($U['status']==1 || get_setting('dismemcaptcha')==0)){
|
$captcha=(int) get_setting('captcha');
|
||||||
|
if($captcha!==0 && ($U['status']==1 || get_setting('dismemcaptcha')==0)){
|
||||||
if(!isSet($_REQUEST['challenge'])){
|
if(!isSet($_REQUEST['challenge'])){
|
||||||
send_error($I['wrongcaptcha']);
|
send_error($I['wrongcaptcha']);
|
||||||
}
|
}
|
||||||
@ -1937,8 +1944,10 @@ function create_session($setup){
|
|||||||
}
|
}
|
||||||
$memcached->delete(DBNAME . '-' . PREFIX . "captcha-$_REQUEST[challenge]");
|
$memcached->delete(DBNAME . '-' . PREFIX . "captcha-$_REQUEST[challenge]");
|
||||||
}
|
}
|
||||||
if($_REQUEST['captcha']!=$code){
|
if($_REQUEST['captcha']!==$code){
|
||||||
send_error($I['wrongcaptcha']);
|
if($captcha!==3 || strrev($_REQUEST['captcha'])!==$code){
|
||||||
|
send_error($I['wrongcaptcha']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($U['status']==1){
|
if($U['status']==1){
|
||||||
@ -3100,8 +3109,8 @@ function destroy_chat(){
|
|||||||
$memcached->delete(DBNAME . '-' . PREFIX . 'settings-dbversion');
|
$memcached->delete(DBNAME . '-' . PREFIX . 'settings-dbversion');
|
||||||
$memcached->delete(DBNAME . '-' . PREFIX . 'settings-msgencrypted');
|
$memcached->delete(DBNAME . '-' . PREFIX . 'settings-msgencrypted');
|
||||||
}
|
}
|
||||||
echo "<div style=\"text-align:center;\"><h2>$I[destroyed]</h2><br><br><br>";
|
echo "<h2>$I[destroyed]</h2><br><br><br>";
|
||||||
echo "<$H[form]>".hidden('lang', $language).hidden('action', 'setup').submit($I['init'])."</form>$H[credit]</div>";
|
echo "<$H[form]>".hidden('lang', $language).hidden('action', 'setup').submit($I['init'])."</form>$H[credit]";
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3168,7 +3177,7 @@ function init_chat(){
|
|||||||
$db->exec('CREATE INDEX IF NOT EXISTS lastpost ON ' . PREFIX . 'sessions (lastpost);');
|
$db->exec('CREATE INDEX IF NOT EXISTS lastpost ON ' . PREFIX . 'sessions (lastpost);');
|
||||||
$db->exec('CREATE TABLE IF NOT EXISTS ' . PREFIX . "settings (setting TEXT NOT NULL PRIMARY KEY, value TEXT NOT NULL);");
|
$db->exec('CREATE TABLE IF NOT EXISTS ' . PREFIX . "settings (setting TEXT NOT NULL PRIMARY KEY, value TEXT NOT NULL);");
|
||||||
}
|
}
|
||||||
$settings=array(array('guestaccess', '0'), array('globalpass', ''), array('englobalpass', '0'), array('captcha', '0'), array('dateformat', 'm-d H:i:s'), array('rulestxt', ''), array('msgencrypted', '0'), array('dbversion', DBVERSION), array('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;}'), array('memberexpire', '60'), array('guestexpire', '15'), array('kickpenalty', '10'), array('entrywait', '120'), array('messageexpire', '14400'), array('messagelimit', '150'), array('maxmessage', 2000), array('captchatime', '600'), array('colbg', '000000'), array('coltxt', 'FFFFFF'), array('maxname', '20'), array('minpass', '5'), array('defaultrefresh', '20'), array('dismemcaptcha', '0'), array('suguests', '0'), array('imgembed', '1'), array('timestamps', '1'), array('trackip', '0'), array('captchachars', '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'), array('memkick', '1'), array('forceredirect', '0'), array('redirect', ''), array('incognito', '1'), array('enablejs', '0'), array('chatname', 'My Chat'), array('topic', ''), array('msgsendall', $I['sendallmsg']), array('msgsendmem', $I['sendmemmsg']), array('msgsendmod', $I['sendmodmsg']), array('msgsendadm', $I['sendadmmsg']), array('msgsendprv', $I['sendprvmsg']), array('msgenter', $I['entermsg']), array('msgexit', $I['exitmsg']), array('msgmemreg', $I['memregmsg']), array('msgsureg', $I['suregmsg']), array('msgkick', $I['kickmsg']), array('msgmultikick', $I['multikickmsg']), array('msgallkick', $I['allkickmsg']), array('msgclean', $I['cleanmsg']), array('numnotes', '3'), array('keeplimit', '3'), array('mailsender', 'www-data <www-data@localhost>'), array('mailreceiver', 'Webmaster <webmaster@localhost>'), array('sendmail', '0'), array('modfallback', '1'), array('guestreg', '0'));
|
$settings=array(array('guestaccess', '0'), array('globalpass', ''), array('englobalpass', '0'), array('captcha', '0'), array('dateformat', 'm-d H:i:s'), array('rulestxt', ''), array('msgencrypted', '0'), array('dbversion', DBVERSION), array('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;}'), array('memberexpire', '60'), array('guestexpire', '15'), array('kickpenalty', '10'), array('entrywait', '120'), array('messageexpire', '14400'), array('messagelimit', '150'), array('maxmessage', 2000), array('captchatime', '600'), array('colbg', '000000'), array('coltxt', 'FFFFFF'), array('maxname', '20'), array('minpass', '5'), array('defaultrefresh', '20'), array('dismemcaptcha', '0'), array('suguests', '0'), array('imgembed', '1'), array('timestamps', '1'), array('trackip', '0'), array('captchachars', '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'), array('memkick', '1'), array('forceredirect', '0'), array('redirect', ''), array('incognito', '1'), array('enablejs', '0'), array('chatname', 'My Chat'), array('topic', ''), array('msgsendall', $I['sendallmsg']), array('msgsendmem', $I['sendmemmsg']), array('msgsendmod', $I['sendmodmsg']), array('msgsendadm', $I['sendadmmsg']), array('msgsendprv', $I['sendprvmsg']), array('msgenter', $I['entermsg']), array('msgexit', $I['exitmsg']), array('msgmemreg', $I['memregmsg']), array('msgsureg', $I['suregmsg']), array('msgkick', $I['kickmsg']), array('msgmultikick', $I['multikickmsg']), array('msgallkick', $I['allkickmsg']), array('msgclean', $I['cleanmsg']), array('numnotes', '3'), array('keeplimit', '3'), array('mailsender', 'www-data <www-data@localhost>'), array('mailreceiver', 'Webmaster <webmaster@localhost>'), array('sendmail', '0'), array('modfallback', '1'), array('guestreg', '0'));
|
||||||
$stmt=$db->prepare('INSERT INTO ' . PREFIX . 'settings (setting, value) VALUES (?, ?);');
|
$stmt=$db->prepare('INSERT INTO ' . PREFIX . 'settings (setting, value) VALUES (?, ?);');
|
||||||
foreach($settings as $pair){
|
foreach($settings as $pair){
|
||||||
$stmt->execute($pair);
|
$stmt->execute($pair);
|
||||||
@ -3190,8 +3199,8 @@ function init_chat(){
|
|||||||
$suwrite=$I['susuccess'];
|
$suwrite=$I['susuccess'];
|
||||||
}
|
}
|
||||||
print_start('init');
|
print_start('init');
|
||||||
echo "<div style=\"text-align:center;\"><h2>$I[init]</h2><br><h3>$I[sulogin]</h3>$suwrite<br><br><br>";
|
echo "<h2>$I[init]</h2><br><h3>$I[sulogin]</h3>$suwrite<br><br><br>";
|
||||||
echo "<$H[form]>$H[commonform]".hidden('action', 'setup').submit($I['initgosetup'])."</form>$H[credit]</div>";
|
echo "<$H[form]>$H[commonform]".hidden('action', 'setup').submit($I['initgosetup'])."</form>$H[credit]";
|
||||||
print_end();
|
print_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3298,6 +3307,11 @@ function update_db(){
|
|||||||
if($dbversion<15){
|
if($dbversion<15){
|
||||||
$db->exec('INSERT INTO ' . PREFIX . "settings (setting, value) VALUES ('keeplimit', '3'), ('mailsender', 'www-data <www-data@localhost>'), ('mailreceiver', 'Webmaster <webmaster@localhost>'), ('sendmail', '0'), ('modfallback', '1'), ('guestreg', '0');");
|
$db->exec('INSERT INTO ' . PREFIX . "settings (setting, value) VALUES ('keeplimit', '3'), ('mailsender', 'www-data <www-data@localhost>'), ('mailreceiver', 'Webmaster <webmaster@localhost>'), ('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);
|
||||||
|
}
|
||||||
update_setting('dbversion', DBVERSION);
|
update_setting('dbversion', DBVERSION);
|
||||||
if(get_setting('msgencrypted')!=MSGENCRYPTED){
|
if(get_setting('msgencrypted')!=MSGENCRYPTED){
|
||||||
if(!extension_loaded('openssl')){
|
if(!extension_loaded('openssl')){
|
||||||
@ -3448,7 +3462,7 @@ function load_html(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function load_lang(){
|
function load_lang(){
|
||||||
global $I, $L, $U, $language;
|
global $I, $L, $language;
|
||||||
$L=array(
|
$L=array(
|
||||||
'de' =>'Deutsch',
|
'de' =>'Deutsch',
|
||||||
'en' =>'English',
|
'en' =>'English',
|
||||||
@ -3476,8 +3490,8 @@ function load_lang(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function load_config(){
|
function load_config(){
|
||||||
define('VERSION', '1.16.1'); // Script version
|
define('VERSION', '1.16.3'); // Script version
|
||||||
define('DBVERSION', 15); // Database version
|
define('DBVERSION', 16); // Database version
|
||||||
define('MSGENCRYPTED', false); // Store messages encrypted in the database to prevent other database users from reading them - true/false - visit the setup page after editing!
|
define('MSGENCRYPTED', false); // Store messages encrypted in the database to prevent other database users from reading them - true/false - visit the setup page after editing!
|
||||||
define('ENCRYPTKEY', 'MY_KEY'); // Encryption key for messages
|
define('ENCRYPTKEY', 'MY_KEY'); // Encryption key for messages
|
||||||
define('DBHOST', 'localhost'); // Database host
|
define('DBHOST', 'localhost'); // Database host
|
||||||
|
Reference in New Issue
Block a user