import live siht
1
.gitignore
vendored
|
@ -6,4 +6,3 @@
|
|||
/public/whois/vendor
|
||||
/public/np.php
|
||||
/public/nothing.php
|
||||
|
||||
|
|
25
public/2019/404.php
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
http_response_code(404);
|
||||
|
||||
require_once __DIR__ . '/../_v4/includes.php';
|
||||
|
||||
define('FWH_STYLE', FWH_2019);
|
||||
|
||||
echo html_open()
|
||||
. '<head>'
|
||||
. html_head('Error 404 - Not Found', HEAD_ERROR)
|
||||
. '</head><body>'
|
||||
. html_navigation(NAV_ERROR, [
|
||||
'title1' => '404 ',
|
||||
'title2' => 'not found',
|
||||
])
|
||||
. '<div class="wrapper">';
|
||||
?>
|
||||
<div class="description" style="text-align: center" style="padding: 0;">
|
||||
<p class="description__paragraph" style="padding: 10px 5px;"><img src="//abyss.flash.moe/flash.moe/assets/link.png" alt="" style="vertical-align: middle; max-width: 100%;"></p>
|
||||
</div>
|
||||
<?php
|
||||
echo '</div>'
|
||||
. html_footer()
|
||||
. '</body>'
|
||||
. html_close();
|
50
public/2019/blog.php
Normal file
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
require_once __DIR__ . '/../_v4/includes.php';
|
||||
|
||||
define('FWH_STYLE', FWH_2019);
|
||||
|
||||
$postId = !empty($_GET['p']) && is_string($_GET['p']) && ctype_digit($_GET['p']) ? (int)($_GET['p']) : 0;
|
||||
|
||||
if($postId < 1) {
|
||||
header('Location: /2019');
|
||||
exit;
|
||||
}
|
||||
|
||||
$getBlogPost = $pdo->prepare('
|
||||
SELECT `post_id`, `post_title`, `post_text`, `post_published`
|
||||
FROM `fm_blog_posts`
|
||||
WHERE `post_id` = :id
|
||||
AND `post_published` IS NOT NULL
|
||||
AND `post_published` < CURRENT_TIMESTAMP
|
||||
AND `post_deleted` IS NULL
|
||||
');
|
||||
$getBlogPost->bindValue('id', $postId);
|
||||
$getBlogPost->execute();
|
||||
$blogPost = $getBlogPost->fetch(PDO::FETCH_OBJ);
|
||||
|
||||
if (empty($blogPost)) die('Couldn\'t find that post.');
|
||||
|
||||
echo html_open()
|
||||
. '<head>'
|
||||
. html_head($blogPost->post_title, HEAD_FLASHWAVE)
|
||||
. '</head><body class="blog">'
|
||||
. html_navigation(NAV_FLASHWAVE)
|
||||
. '<div class="wrapper">';
|
||||
|
||||
?>
|
||||
<div class="index__blog" style="margin: 10px 0 0;">
|
||||
<h1 class="index__blog__title"><?=$blogPost->post_title;?></h1>
|
||||
<?php
|
||||
$splitLines = explode("\n", $blogPost->post_text);
|
||||
|
||||
foreach ($splitLines as $paragraph)
|
||||
if(!empty($paragraph))
|
||||
echo '<p class="index__blog__paragraph">' . trim($paragraph) . '</p>';
|
||||
?>
|
||||
<span class="index__blog__continue">Posted <?=$blogPost->post_published;?></span>
|
||||
</div>
|
||||
<?php
|
||||
echo '</div>'
|
||||
. html_footer()
|
||||
. '</body>'
|
||||
. html_close();
|
236
public/2019/index.php
Normal file
|
@ -0,0 +1,236 @@
|
|||
<?php
|
||||
require_once __DIR__ . '/../_v4/includes.php';
|
||||
|
||||
define('FWH_STYLE', FWH_2019);
|
||||
|
||||
$accounts = [
|
||||
[
|
||||
'icon' => 'fas fa-at',
|
||||
'title' => 'E-mail',
|
||||
'url' => 'mailto:me@flash.moe',
|
||||
],
|
||||
[
|
||||
'icon' => 'fas fa-bolt',
|
||||
'title' => 'Flashii',
|
||||
'url' => 'https://flashii.net/profile.php?u=1',
|
||||
],
|
||||
[
|
||||
'icon' => 'fab fa-github',
|
||||
'title' => 'Github',
|
||||
'url' => 'https://github.com/flashwave',
|
||||
],
|
||||
[
|
||||
'icon' => 'fab fa-youtube',
|
||||
'title' => 'YouTube',
|
||||
'url' => 'https://youtube.com/c/flashwave',
|
||||
],
|
||||
[
|
||||
'icon' => 'fab fa-twitch',
|
||||
'title' => 'Twitch',
|
||||
'url' => 'https://twitch.tv/flashwave0',
|
||||
],
|
||||
[
|
||||
'icon' => 'fab fa-steam',
|
||||
'title' => 'Steam',
|
||||
'url' => 'https://steamcommunity.com/id/flashwave_',
|
||||
],
|
||||
[
|
||||
'icon' => 'fab fa-twitter',
|
||||
'title' => 'Twitter',
|
||||
'url' => 'javascript:confirm(\'Proceed with caution.\') ? location.assign(\'https://twitter.com/smugwave\') : void(0);',
|
||||
],
|
||||
[
|
||||
'icon' => 'fab fa-lastfm',
|
||||
'title' => 'last.fm',
|
||||
'url' => 'https://www.last.fm/user/flashwave_',
|
||||
],
|
||||
[
|
||||
'icon' => 'fab fa-nintendo-switch',
|
||||
'title' => 'Switch',
|
||||
'url' => 'javascript:alert(\'SW-7446-8163-4902\');',
|
||||
],
|
||||
[
|
||||
'icon' => 'fab fa-paypal',
|
||||
'title' => 'Donate',
|
||||
'url' => 'https://paypal.me/flashwave',
|
||||
],
|
||||
];
|
||||
|
||||
$getBlogPosts = $pdo->prepare('
|
||||
SELECT `post_id`, `post_title`, `post_text`, `post_published`
|
||||
FROM `fm_blog_posts` AS bp
|
||||
WHERE `post_published` IS NOT NULL
|
||||
AND `post_published` < CURRENT_TIMESTAMP
|
||||
AND `post_deleted` IS NULL
|
||||
ORDER BY `post_published` DESC
|
||||
');
|
||||
$getBlogPosts->execute();
|
||||
$blogPosts = $getBlogPosts->fetchAll(PDO::FETCH_OBJ);
|
||||
|
||||
echo html_open()
|
||||
. '<head>'
|
||||
. html_head('flash.moe', HEAD_FLASHWAVE)
|
||||
. '</head><body class="index">';
|
||||
|
||||
if(html_old_ie())
|
||||
echo '<bgsound src="/assets/SMS-JBIOS-Demo.mid" loop="infinite"/>';
|
||||
if(html_netscape())
|
||||
echo '<embed src="/assets/SMS-JBIOS-Demo.mid" autostart="true" hidden="true" loop="true"></embed>';
|
||||
|
||||
echo '<div class="wrapper">';
|
||||
?>
|
||||
<div class="index__side">
|
||||
<div class="index__header">
|
||||
<img src="//flashii.net/user-assets.php?m=avatar&u=1&r=120" width="60" height="60" alt="avatar" class="index__header__avatar"/>
|
||||
<div class="index__header__text">
|
||||
<div class="index__header__name">flash<span class="index__header__name__highlight">wave</span></div>
|
||||
<div class="index__header__slogan">if it ain't broke, i'll break it</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="index__accounts">
|
||||
<?php foreach($accounts as $account): ?>
|
||||
<a href="<?=$account['url'];?>" class="index__account" rel="noreferrer noopener">
|
||||
<div class="index__account__icon"><i class="<?=$account['icon'];?> fa-fw"></i></div>
|
||||
<div class="index__account__title"><?=$account['title'];?></div>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<a href="/2019/projects.php" class="index__affil">
|
||||
<div class="index__affil__name">Projects</div>
|
||||
<div class="index__affil__desc">List of things I've made or am making.</div>
|
||||
</a>
|
||||
<a href="https://flashii.net" class="index__affil index__affil--flashii">
|
||||
<div class="index__affil__name">Flashii</div>
|
||||
<div class="index__affil__desc">Community site I run and develop.</div>
|
||||
</a>
|
||||
<a href="https://railgun.sh" class="index__affil index__affil--railgun">
|
||||
<div class="index__affil__name">Railgun</div>
|
||||
<div class="index__affil__desc">Chat server and chat protocols I work on.</div>
|
||||
</a>
|
||||
|
||||
<?php if(!html_netscape()): ?>
|
||||
<div class="index__playing">
|
||||
<div class="index__playing__header" id="np-header">Loading...</div>
|
||||
<div class="index__playing__content index__playing__content--hidden" id="np-content">
|
||||
<div class="index__playing__cover" id="np-cover"></div>
|
||||
<div class="index__playing__text">
|
||||
<a class="index__playing__title" id="np-title"></a>
|
||||
<a class="index__playing__artist" id="np-artist"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="index__main">
|
||||
<?php foreach($blogPosts as $post) { ?>
|
||||
<div class="index__blog">
|
||||
<h1 class="index__blog__title"><?=$post->post_title;?></h1>
|
||||
<p class="index__blog__paragraph"><?=trim(explode("\n", $post->post_text)[0]);?></p>
|
||||
<a href="/2019/blog.php?p=<?=$post->post_id;?>" class="index__blog__continue">Continue reading</a>
|
||||
<span class="index__blog__continue">Posted <?=$post->post_published;?></span>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php if(!html_netscape()): ?>
|
||||
<script type="text/javascript">
|
||||
function createXHR() {
|
||||
if (window.XMLHttpRequest) {
|
||||
return new XMLHttpRequest();
|
||||
} else if (window.ActiveXObject) {
|
||||
try {
|
||||
return new ActiveXObject("Msxml2.XMLHTTP");
|
||||
} catch (e) {
|
||||
try {
|
||||
return new ActiveXObject("Microsoft.XMLHTTP");
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function getNowListening(username, cb) {
|
||||
var xhr = createXHR();
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState !== 4)
|
||||
return;
|
||||
|
||||
var xml = null;
|
||||
|
||||
if(window.DOMParser) {
|
||||
var parser = new DOMParser();
|
||||
xml = parser.parseFromString(xhr.responseText, 'text/xml');
|
||||
} else {
|
||||
xml = new ActiveXObject('Microsoft.XMLDOM');
|
||||
xml.async = 'false';
|
||||
xml.loadXML(xhr.responseText);
|
||||
xml = xml.childNodes[1];
|
||||
}
|
||||
|
||||
cb(xml.getElementsByTagName('Track')[0]);
|
||||
};
|
||||
xhr.open('GET', '/np.php?u=' + username, true);
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
function getNodeText(node) {
|
||||
if (typeof node.textContent === 'undefined') {
|
||||
return node.text;
|
||||
} else {
|
||||
return node.textContent;
|
||||
}
|
||||
}
|
||||
|
||||
function setNodeText(node, text) {
|
||||
if (typeof node.textContent === 'undefined') {
|
||||
node.innerText = text;
|
||||
} else {
|
||||
node.textContent = text;
|
||||
}
|
||||
}
|
||||
|
||||
function setNowListening(track) {
|
||||
var cover = document.getElementById('np-cover'),
|
||||
title = document.getElementById('np-title'),
|
||||
artist = document.getElementById('np-artist'),
|
||||
header = document.getElementById('np-header'),
|
||||
content = document.getElementById('np-content'),
|
||||
coverUrl = getNodeText(track.getElementsByTagName('Medium')[0]);
|
||||
|
||||
if (content.className.indexOf('index__playing__content--hidden') >= 0)
|
||||
content.className = content.className.replace('index__playing__content--hidden', '');
|
||||
|
||||
setNodeText(header, getNodeText(track.getElementsByTagName('IsPlaying')[0]) != '0' ? 'Now Listening' : 'Last Listened');
|
||||
cover.style.backgroundImage = coverUrl.length < 1 ? '' : "url('$')".replace('$', coverUrl);
|
||||
setNodeText(title, getNodeText(track.getElementsByTagName('Name')[0]));
|
||||
title.href = getNodeText(track.getElementsByTagName('Url')[0]);
|
||||
setNodeText(artist, getNodeText(track.getElementsByTagName('Name')[1]));
|
||||
artist.href = title.href.substring(0, title.href.indexOf('/_/'));
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
var lastFmUsername = '';
|
||||
|
||||
var links = document.getElementsByTagName('a');
|
||||
for (var i = 0; i < links.length; i++)
|
||||
if(links[i].href.substring(0, 25) == 'https://www.last.fm/user/') {
|
||||
lastFmUsername = links[i].href.substring(25);
|
||||
break;
|
||||
}
|
||||
|
||||
if(lastFmUsername) {
|
||||
setInterval(function() { getNowListening(lastFmUsername, function(track) { setNowListening(track); }); }, 60000);
|
||||
getNowListening(lastFmUsername, function(track) { setNowListening(track); });
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<?php
|
||||
endif;
|
||||
echo '</div>'
|
||||
. html_footer()
|
||||
. '</body>'
|
||||
. html_close();
|
82
public/2019/projects.php
Normal file
|
@ -0,0 +1,82 @@
|
|||
<?php
|
||||
require_once __DIR__ . '/../_v4/includes.php';
|
||||
|
||||
define('FWH_STYLE', FWH_2019);
|
||||
|
||||
echo html_open()
|
||||
. '<head>'
|
||||
. html_head('Projects', HEAD_FLASHWAVE)
|
||||
. '</head><body>'
|
||||
. html_navigation(NAV_FLASHWAVE)
|
||||
. '<div class="wrapper">';
|
||||
?>
|
||||
<div class="projects projects--active">
|
||||
<div class="projects-header">Active Projects</div>
|
||||
|
||||
<div class="projects-listing">
|
||||
<?php
|
||||
$archived = false;
|
||||
$getProjects = $pdo->prepare('
|
||||
SELECT `project_id`, `project_name`, `project_summary`, `project_homepage`, `project_repository`, `project_forum`, `project_archived`
|
||||
FROM `fm_projects`
|
||||
WHERE `project_deleted` IS NULL
|
||||
ORDER BY !ISNULL(`project_archived`), `project_order` DESC
|
||||
');
|
||||
$getProjects->execute();
|
||||
$projects = $getProjects->fetchAll(PDO::FETCH_OBJ);
|
||||
|
||||
$getLanguages = $pdo->prepare('
|
||||
SELECT pl.`language_name`, pl.`language_colour`
|
||||
FROM `fm_proglangs` AS pl
|
||||
LEFT JOIN `fm_projects_proglangs` AS ppl
|
||||
ON ppl.`language_id` = pl.`language_id`
|
||||
WHERE ppl.`project_id` = :project_id
|
||||
ORDER BY ppl.`priority`
|
||||
');
|
||||
|
||||
foreach ($projects as $project) {
|
||||
$getLanguages->bindValue('project_id', $project->project_id);
|
||||
$getLanguages->execute();
|
||||
$languages = $getLanguages->fetchAll(PDO::FETCH_OBJ);
|
||||
|
||||
if(!$archived && !empty($project->project_archived)) {
|
||||
$archived = true;
|
||||
?>
|
||||
</div></div><div class="projects projects--archived">
|
||||
<div class="projects-header">Archived Projects</div>
|
||||
<div class="projects-listing">
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="project-v2"<?php if(isset($languages[0]->language_colour)) { echo sprintf(' style="background-color: %1$s; box-shadow: 0 0 3px %1$s;"', html_colour($languages[0]->language_colour)); } ?>>
|
||||
<div class="project-inner">
|
||||
<h1 class="project-name"><?=$project->project_name;?></h1>
|
||||
<div class="project-description"><?=trim($project->project_summary);?></div>
|
||||
|
||||
<div class="project-languages">
|
||||
<?php foreach($languages as $language) { ?>
|
||||
<div class="project-language" style="<?=sprintf('border-color: %1$s; box-shadow: 0 0 2px %1$s;', html_colour($language->language_colour));?>">
|
||||
<?=$language->language_name;?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="project-links">
|
||||
<?php if (!empty($project->project_homepage)): ?>
|
||||
<a class="project-link" href="<?=$project->project_homepage;?>"><i class="fas fa-home fa-fw"></i> Homepage</a>
|
||||
<?php endif; if (!empty($project->project_repository)): ?>
|
||||
<a class="project-link" href="<?=$project->project_repository;?>"><i class="fas fa-code fa-fw"></i> Repository</a>
|
||||
<?php endif; if(!empty($project->project_forum)): ?>
|
||||
<a class="project-link" href="<?=$project->project_forum;?>"><i class="fas fa-comments fa-fw"></i> Forum</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
echo '</div>'
|
||||
. html_footer()
|
||||
. '</body>'
|
||||
. html_close();
|
29
public/2020/404.php
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
http_response_code(404);
|
||||
|
||||
require_once __DIR__ . '/../_v4/includes.php';
|
||||
|
||||
define('FWH_STYLE', FWH_2020);
|
||||
|
||||
echo html_doctype();
|
||||
?>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<?=html_charset();?>
|
||||
<title>404 Not Found</title>
|
||||
<?=html_stylesheet('2020.css');?>
|
||||
<?=html_meta();?>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<?=html_sidebar();?>
|
||||
<div class="notfound">
|
||||
<h1>404 - Page not found!</h1>
|
||||
<p>You either went to an invalid URL or this content has been deleted.</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(html_old_ie()) { ?>
|
||||
<?=html_script('/assets/fixpng.js');?>
|
||||
<?php } ?>
|
||||
</body>
|
||||
</html>
|
73
public/2020/blog.php
Normal file
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
require_once __DIR__ . '/../_v4/includes.php';
|
||||
|
||||
define('FWH_STYLE', FWH_2020);
|
||||
|
||||
$blogMode = !empty($_GET['blog']);
|
||||
$postId = !empty($_GET['p']) && is_string($_GET['p']) && ctype_digit($_GET['p']) ? (int)($_GET['p']) : 0;
|
||||
|
||||
if($postId < 1) {
|
||||
header('Location: /2020');
|
||||
exit;
|
||||
}
|
||||
|
||||
$getPost = $pdo->prepare('
|
||||
SELECT `post_id`, `post_title`, `post_text`, UNIX_TIMESTAMP(`post_published`) AS `post_published`, `post_safe`, `post_new_url`
|
||||
FROM `fm_blog_posts`
|
||||
WHERE `post_id` = :id
|
||||
AND `post_published` IS NOT NULL
|
||||
AND `post_published` < CURRENT_TIMESTAMP
|
||||
AND `post_deleted` IS NULL
|
||||
');
|
||||
$getPost->bindValue('id', $postId);
|
||||
$post = $getPost->execute() ? $getPost->fetch(PDO::FETCH_OBJ) : false;
|
||||
|
||||
if(html_default_mode() === FWH_JVDG && empty($post->post_safe))
|
||||
unset($post);
|
||||
|
||||
if(!empty($post)) {
|
||||
$dateCustom = date('Y-m-d @ H:i:s T', $post->post_published);
|
||||
$dateISO = date('c', $post->post_published);
|
||||
$preview = trim(explode("\n", $post->post_text)[0]);
|
||||
$title = $post->post_title;
|
||||
} else http_response_code(404);
|
||||
|
||||
echo html_doctype();
|
||||
?>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<?=html_charset();?>
|
||||
<title><?=$title ?? 'flash.moe';?></title>
|
||||
<?=html_stylesheet('2020.css');?>
|
||||
<?=html_meta();?>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<?php if(!$blogMode) echo html_sidebar(); ?>
|
||||
<?php if(empty($post)) { ?>
|
||||
<div class="notfound">
|
||||
<h1>Post not found!</h1>
|
||||
<p>You either went to an invalid URL or this post has been deleted.</p>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<div class="blog">
|
||||
<?php if(!empty($post->post_new_url)): ?>
|
||||
<a href="<?=$post->post_new_url;?>" style="display: block; text-align: center; color: #fff; text-decoration: none; font-size: 2em; line-height: 1.5em; padding: 20px 10px; margin: 10px 0; font-weight: bold">This post has a new url, please go here instead!</a>
|
||||
<?php endif; ?>
|
||||
<h1><?=$post->post_title;?></h1>
|
||||
<time datetime="<?=$dateISO;?>"><?=$dateCustom;?></time>
|
||||
<?php
|
||||
$splitLines = explode("\n", $post->post_text);
|
||||
|
||||
foreach ($splitLines as $paragraph)
|
||||
if(!empty($paragraph))
|
||||
echo '<p>' . trim($paragraph) . '</p>';
|
||||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php if(html_old_ie()) { ?>
|
||||
<?=html_script('/assets/fixpng.js');?>
|
||||
<?php } ?>
|
||||
</body>
|
||||
</html>
|
95
public/2020/index.php
Normal file
|
@ -0,0 +1,95 @@
|
|||
<?php
|
||||
require_once __DIR__ . '/../_v4/includes.php';
|
||||
|
||||
define('FWH_STYLE', FWH_2020);
|
||||
|
||||
$blogMode = !empty($_GET['blog']);
|
||||
$requireSafe = html_default_mode() === FWH_JVDG;
|
||||
|
||||
if(!$requireSafe) {
|
||||
$getPosts = $pdo->prepare("
|
||||
SELECT `post_id`, `post_title`, `post_text`, UNIX_TIMESTAMP(`post_published`) AS `post_published`
|
||||
FROM `fm_blog_posts` AS bp
|
||||
WHERE `post_published` IS NOT NULL
|
||||
AND `post_published` < CURRENT_TIMESTAMP
|
||||
AND `post_deleted` IS NULL
|
||||
ORDER BY `post_published` DESC
|
||||
");
|
||||
$posts = $getPosts->execute() ? $getPosts->fetchAll(PDO::FETCH_OBJ) : false;
|
||||
$posts = $posts ? $posts : [];
|
||||
}
|
||||
|
||||
if(isset($_GET['blog_dump'])) {
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
echo json_encode($posts ?? []);
|
||||
return;
|
||||
}
|
||||
|
||||
echo html_doctype();
|
||||
?>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<?=html_charset();?>
|
||||
<title><?=$_SERVER['HTTP_HOST'];?></title>
|
||||
<?=html_stylesheet('2020.css');?>
|
||||
<?=html_meta();?>
|
||||
<?php if($requireSafe): ?>
|
||||
<style type="text/css">
|
||||
.wrapper { justify-content: center; }
|
||||
</style>
|
||||
<?php endif; ?>
|
||||
</head>
|
||||
<body>
|
||||
<?php if($blogMode): ?>
|
||||
<div style="max-width: 1000px; margin: 0 auto; font-size: 20px; line-height: 1.7em;">
|
||||
<div style="margin: 5px; background-color: #222; border-radius: 5px; padding: 2px 5px;">New blog script is still work in progress, enjoy the old version!</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="wrapper">
|
||||
<?php if(!$blogMode) echo html_sidebar(); ?>
|
||||
<?php if(!empty($posts)): ?>
|
||||
<div class="blogs">
|
||||
<?php
|
||||
/*if(!$requireSafe) {
|
||||
?>
|
||||
<div class="banner">
|
||||
<img src="/assets/misaka-2.png" alt=""/>
|
||||
<h1>Blog</h1>
|
||||
</div>
|
||||
<?php
|
||||
}*/
|
||||
|
||||
$urlSuffix = $blogMode ? '?blog=1' : '';
|
||||
foreach($posts as $post) {
|
||||
$preview = trim(explode("\n", $post->post_text)[0]);
|
||||
$dateCustom = date('Y-m-d @ H:i:s T', $post->post_published);
|
||||
$dateISO = date('c', $post->post_published);
|
||||
|
||||
echo <<<HTML
|
||||
<div class="blog preview">
|
||||
<h1><a href="/blog/{$post->post_id}">{$post->post_title}</a></h1>
|
||||
<time datetime="{$dateISO}">{$dateCustom}</time>
|
||||
<p>{$preview}</p>
|
||||
<a class="continue" href="/blog/{$post->post_id}{$urlSuffix}">Continue reading</a>
|
||||
</div>\r\n
|
||||
HTML;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?=html_script('/assets/lastfm2020.js');?>
|
||||
<?php
|
||||
if(!$requireSafe) {
|
||||
if(html_old_ie()) {
|
||||
?>
|
||||
<?=html_script('/assets/fixpng.js');?>
|
||||
<bgsound src="/assets/SMS-JBIOS-Demo.mid" loop="infinite"/>
|
||||
<?php } elseif(html_netscape()) { ?>
|
||||
<embed src="/assets/SMS-JBIOS-Demo.mid" autostart="true" hidden="true" loop="true"></embed>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
67
public/2020/nintendo.php
Normal file
|
@ -0,0 +1,67 @@
|
|||
<?php
|
||||
require_once __DIR__ . '/../_v4/includes.php';
|
||||
|
||||
define('FWH_STYLE', FWH_2020);
|
||||
|
||||
echo html_doctype();
|
||||
?>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<?=html_charset();?>
|
||||
<title>Nintendo Friend Codes</title>
|
||||
<?=html_stylesheet('2020.css');?>
|
||||
<?=html_meta();?>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<?=html_sidebar();?>
|
||||
<div class="nintendo">
|
||||
<div class="nintendo-notice">
|
||||
<p>List of my Nintendo friend codes so I don't have to dig them up every time. Please use these codes only if we know each other.</p>
|
||||
<p>If you're adding me on 3DS you'll have to send me your friend code as well, use the contact links in the sidebar to do so.</p>
|
||||
</div>
|
||||
|
||||
<div class="nintendo-fc nintendo-fc-switch" id="switch">
|
||||
<div class="nintendo-fc-title">
|
||||
<h2>Nintendo Switch</h2>
|
||||
</div>
|
||||
<div class="nintendo-fc-code">
|
||||
<code>SW-7446-8163-4902</code>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="nintendo-fc nintendo-fc-3ds" id="n3ds">
|
||||
<div class="nintendo-fc-title">
|
||||
<h2>Nintendo 3DS</h2>
|
||||
</div>
|
||||
<div class="nintendo-fc-code">
|
||||
<code>4013-0352-0648</code>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="nintendo-fc nintendo-fc-wiiu" id="wiiu">
|
||||
<div class="nintendo-fc-title">
|
||||
<h2>Nintendo Wii U</h2>
|
||||
</div>
|
||||
<div class="nintendo-fc-code">
|
||||
<code>flashwave0</code>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="nintendo-notice">
|
||||
<p>Below are friend codes for Nintendo WFC revival services, these will only be useful with modified consoles.</p>
|
||||
</div>
|
||||
|
||||
<div class="nintendo-fc nintendo-fc-wii" id="mkwii">
|
||||
<div class="nintendo-fc-title">
|
||||
<h2>Mario Kart Wii (Wiimmfi)</h2>
|
||||
</div>
|
||||
<div class="nintendo-fc-code">
|
||||
<code>5202-9182-8404</code>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?=html_script('/assets/lastfm2020.js');?>
|
||||
</body>
|
||||
</html>
|
177
public/2020/projects.php
Normal file
|
@ -0,0 +1,177 @@
|
|||
<?php
|
||||
require_once __DIR__ . '/../_v4/includes.php';
|
||||
|
||||
define('FWH_STYLE', FWH_2020);
|
||||
|
||||
$randomFeatured = isset($_GET['rf']);
|
||||
|
||||
$getProjects = $pdo->prepare('
|
||||
SELECT `project_id`, `project_name`, COALESCE(`project_name_clean`, REPLACE(LOWER(`project_name`), \' \', \'-\')) AS `project_name_clean`, `project_summary`, `project_description`, `project_featured`, `project_order`, `project_homepage`, `project_repository`, `project_forum`, UNIX_TIMESTAMP(`project_archived`) AS `project_archived`, `project_type`, UNIX_TIMESTAMP(`project_created`) AS `project_created`, `project_colour`
|
||||
FROM `fm_projects`
|
||||
WHERE `project_deleted` IS NULL
|
||||
'. ($randomFeatured ? ' AND `project_featured` <> 0 ORDER BY RAND()' : 'ORDER BY `project_order` DESC')
|
||||
);
|
||||
$getProjects->execute();
|
||||
$projects = $getProjects->fetchAll(PDO::FETCH_OBJ);
|
||||
|
||||
$activeProjects = [];
|
||||
$toolProjects = [];
|
||||
$archivedProjects = [];
|
||||
|
||||
foreach($projects as $project) {
|
||||
if(!empty($project->project_archived))
|
||||
$archivedProjects[] = $project;
|
||||
elseif($project->project_type === 'Tool')
|
||||
$toolProjects[] = $project;
|
||||
else
|
||||
$activeProjects[] = $project;
|
||||
}
|
||||
|
||||
$getLanguages = $pdo->prepare('
|
||||
SELECT pl.`language_id`, pl.`language_name`, pl.`language_colour`
|
||||
FROM `fm_proglangs` AS pl
|
||||
LEFT JOIN `fm_projects_proglangs` AS ppl
|
||||
ON ppl.`language_id` = pl.`language_id`
|
||||
WHERE ppl.`project_id` = :project_id
|
||||
ORDER BY ppl.`priority`
|
||||
');
|
||||
|
||||
function fm_project_box(stdClass $project, array $languages): string {
|
||||
$colour = html_colour(isset($languages[0]->language_colour) ? $languages[0]->language_colour : 0x212121);
|
||||
|
||||
$html = <<<HTML
|
||||
<div class="project" style="box-shadow: 0 1px 2px {$colour}; background-color: {$colour};">
|
||||
<div class="project-name">
|
||||
<h2>{$project->project_name}</h2>
|
||||
</div>
|
||||
<div class="project-inner">
|
||||
<p>{$project->project_summary}</p>
|
||||
<div class="project-languages">\r\n
|
||||
HTML;
|
||||
|
||||
$indent = ' ';
|
||||
|
||||
foreach($languages as $lang) {
|
||||
$colour = html_colour($lang->language_colour);
|
||||
$html .= "{$indent} <div class=\"project-language\" style=\"box-shadow: 0 1px 2px {$colour}; background-color: {$colour};\"><div>{$lang->language_name}</div></div>\r\n";
|
||||
}
|
||||
|
||||
$html .= "{$indent}</div>\r\n";
|
||||
|
||||
$links = '';
|
||||
|
||||
if(!empty($project->project_homepage))
|
||||
$links .= " <a href=\"{$project->project_homepage}\"><img src=\"". html_baseurl() ."/assets/icons/s-home.png\" alt=\"\" width=\"17\" height=\"17\" /> Homepage</a>\r\n";
|
||||
if(!empty($project->project_repository))
|
||||
$links .= " <a href=\"{$project->project_repository}\"><img src=\"". html_baseurl() ."/assets/icons/s-code.png\" alt=\"\" width=\"17\" height=\"17\" /> Source</a>\r\n";
|
||||
if(!empty($project->project_forum))
|
||||
$links .= " <a href=\"{$project->project_forum}\"><img src=\"". html_baseurl() ."/assets/icons/s-forum.png\" alt=\"\" width=\"17\" height=\"17\" /> Discussion</a>\r\n";
|
||||
|
||||
if(!empty($links)) {
|
||||
$html .= "{$indent}<div class=\"project-links\">\r\n";
|
||||
$html .= "{$indent}{$links}";
|
||||
$html .= "{$indent}</div>\r\n";
|
||||
}
|
||||
|
||||
$html .= <<<HTML
|
||||
</div>
|
||||
</div>\r\n
|
||||
HTML;
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
if(isset($_GET['dump_that_shit'])) {
|
||||
$doConvert = !isset($_GET['noconvert']);
|
||||
$meow = [];
|
||||
$projects = array_merge($activeProjects, $toolProjects, $archivedProjects);
|
||||
|
||||
foreach($projects as $project) {
|
||||
if($doConvert) {
|
||||
$projKeys = array_keys((array)$project);
|
||||
foreach($projKeys as $key) {
|
||||
$project->{substr($key, 8)} = $project->{$key};
|
||||
unset($project->{$key});
|
||||
}
|
||||
}
|
||||
|
||||
$getLanguages->bindValue('project_id', $project->id ?? $project->project_id);
|
||||
$getLanguages->execute();
|
||||
$project->languages = $getLanguages->fetchAll(PDO::FETCH_OBJ);
|
||||
if($doConvert) {
|
||||
$langKeys = array_keys((array)$project->languages[0]);
|
||||
for($i = 0; $i < count($project->languages); ++$i)
|
||||
foreach($langKeys as $key) {
|
||||
if(!isset($project->colour))
|
||||
$project->colour = $project->languages[$i]->language_colour;
|
||||
$project->languages[$i]->{substr($key, 9)} = $project->languages[$i]->{$key};
|
||||
unset($project->languages[$i]->{$key});
|
||||
}
|
||||
}
|
||||
|
||||
if($randomFeatured || !$doConvert)
|
||||
$meow[] = $project;
|
||||
else {
|
||||
$key = $project->archived ? 'archive' : strtolower($project->type);
|
||||
$meow[$key][] = $project;
|
||||
}
|
||||
}
|
||||
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
echo json_encode($meow);
|
||||
return;
|
||||
}
|
||||
|
||||
echo html_doctype();
|
||||
?>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<?=html_charset();?>
|
||||
<title>Projects</title>
|
||||
<?=html_stylesheet('2020.css');?>
|
||||
<?=html_meta();?>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<?=html_sidebar();?>
|
||||
<div class="projects">
|
||||
<h1 id="projects">Active Projects</h1>
|
||||
<div class="projects-list active">
|
||||
<?php
|
||||
foreach ($activeProjects as $project) {
|
||||
$getLanguages->bindValue('project_id', $project->project_id);
|
||||
$getLanguages->execute();
|
||||
$languages = $getLanguages->fetchAll(PDO::FETCH_OBJ);
|
||||
echo fm_project_box($project, $languages);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<h1 id="tools">Tools</h1>
|
||||
<div class="projects-list tools">
|
||||
<?php
|
||||
foreach ($toolProjects as $project) {
|
||||
$getLanguages->bindValue('project_id', $project->project_id);
|
||||
$getLanguages->execute();
|
||||
$languages = $getLanguages->fetchAll(PDO::FETCH_OBJ);
|
||||
echo fm_project_box($project, $languages);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<h1 id="archived">Archived Projects</h1>
|
||||
<div class="projects-list archived">
|
||||
<?php
|
||||
foreach ($archivedProjects as $project) {
|
||||
$getLanguages->bindValue('project_id', $project->project_id);
|
||||
$getLanguages->execute();
|
||||
$languages = $getLanguages->fetchAll(PDO::FETCH_OBJ);
|
||||
echo fm_project_box($project, $languages);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(html_old_ie()) { ?>
|
||||
<?=html_script('/assets/fixpng.js');?>
|
||||
<?php } ?>
|
||||
</body>
|
||||
</html>
|
2
public/404.php
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?php
|
||||
require_once __DIR__ . '/2020/404.php';
|
BIN
public/Flashwave.osk
Normal file
536
public/_v4/html.php
Normal file
|
@ -0,0 +1,536 @@
|
|||
<?php
|
||||
define('FWH_2016', 2016);
|
||||
define('FWH_2019', 2019);
|
||||
define('FWH_2020', 2020);
|
||||
|
||||
define('FWH_FMOE', 1);
|
||||
define('FWH_JVDG', 2);
|
||||
|
||||
define('HTML_MODERN', 1);
|
||||
define('HTML_NETSCAPE', 2);
|
||||
define('HTML_OLDIE', 3);
|
||||
define('HTML_PRESTO', 4);
|
||||
define('HTML_INORI', 5);
|
||||
define('HTML_GECKSCAPE', 5);
|
||||
define('HTML_N3DS', 6);
|
||||
|
||||
function html_browser(): int {
|
||||
static $browser = null;
|
||||
|
||||
if($browser)
|
||||
return $browser;
|
||||
|
||||
$simulate = !empty($_GET['_sim']) && is_string($_GET['_sim']) ? (int)$_GET['_sim'] : null;
|
||||
|
||||
if(!empty($simulate))
|
||||
return $browser = $simulate;
|
||||
|
||||
if(preg_match('#Nintendo 3DS#i', $_SERVER['HTTP_USER_AGENT'] ?? ''))
|
||||
return $browser = HTML_N3DS;
|
||||
|
||||
if(preg_match('#Presto#i', $_SERVER['HTTP_USER_AGENT'] ?? ''))
|
||||
return $browser = HTML_PRESTO;
|
||||
|
||||
if(preg_match('#Trident#i', $_SERVER['HTTP_USER_AGENT'] ?? ''))
|
||||
return $browser = HTML_INORI;
|
||||
|
||||
if(preg_match('#MSIE#i', $_SERVER['HTTP_USER_AGENT'] ?? ''))
|
||||
return $browser = HTML_OLDIE;
|
||||
|
||||
if(preg_match('#Netscape6#i', $_SERVER['HTTP_USER_AGENT'] ?? '') || preg_match('#Navigator#i', $_SERVER['HTTP_USER_AGENT'] ?? ''))
|
||||
return $browser = HTML_GECKSCAPE;
|
||||
|
||||
if(preg_match('#Mozilla/4#i', $_SERVER['HTTP_USER_AGENT'] ?? ''))
|
||||
return $browser = HTML_NETSCAPE;
|
||||
|
||||
return $browser = HTML_MODERN;
|
||||
}
|
||||
|
||||
function html_old_browser(): bool {
|
||||
return in_array(html_browser(), [HTML_NETSCAPE, HTML_OLDIE], true);
|
||||
}
|
||||
|
||||
function html_modern(): bool {
|
||||
return html_browser() === HTML_MODERN;
|
||||
}
|
||||
|
||||
function html_netscape(): bool {
|
||||
return html_browser() === HTML_NETSCAPE;
|
||||
}
|
||||
|
||||
function html_old_ie(): bool {
|
||||
return html_browser() === HTML_OLDIE;
|
||||
}
|
||||
|
||||
function html_presto(): bool {
|
||||
return html_browser() === HTML_PRESTO || html_browser() === HTML_GECKSCAPE;
|
||||
}
|
||||
|
||||
function html_inori(): bool {
|
||||
return html_browser() === HTML_INORI;
|
||||
}
|
||||
|
||||
function html_n3ds(): bool {
|
||||
return html_browser() === HTML_N3DS;
|
||||
}
|
||||
|
||||
function html_default_ver(): int {
|
||||
return defined('FWH_STYLE') ? FWH_STYLE : 0;
|
||||
}
|
||||
|
||||
function html_default_mode(): int {
|
||||
return defined('FWH_MODE') ? FWH_MODE : FWH_FMOE;
|
||||
}
|
||||
|
||||
function html_baseurl(): string {
|
||||
if($_SERVER['HTTP_HOST'] !== 'flash.moe')
|
||||
return '//flash.moe';
|
||||
return '';
|
||||
}
|
||||
|
||||
function html_local_url(string $url): string {
|
||||
if($url[0] === '/' && substr($url, 0, 2) !== '//') {
|
||||
$url = '/' . trim($url, '/');
|
||||
$originalUrl = $url;
|
||||
$cleanPath = '/' . trim(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), '/');
|
||||
|
||||
if(substr($cleanPath, 0, 3) === '/20'
|
||||
&& (md5_file(__DIR__ . '/../index.php') !== '20c2c2b0b4a9fa31e10922b913a5ac07'
|
||||
|| substr($cleanPath, 0, 14) !== '/2020/blog.php')) {
|
||||
$url = substr($cleanPath, 0, 5) . $url;
|
||||
|
||||
if(in_array($originalUrl, ['/projects', '/404', '/blog', '/nintendo']))
|
||||
$url .= '.php';
|
||||
}
|
||||
}
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
function html_colour(?int $raw): string {
|
||||
if (is_null($raw))
|
||||
return 'inherit';
|
||||
|
||||
return '#' . str_pad(dechex($raw), 6, '0', STR_PAD_LEFT);
|
||||
}
|
||||
|
||||
function html_doctype(?int $version = null): string {
|
||||
return html_old_browser()
|
||||
? "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\r\n"
|
||||
: "<!doctype html>\r\n";
|
||||
}
|
||||
|
||||
function html_charset(string $charset = 'utf-8', ?int $version = null): string {
|
||||
return html_old_browser()
|
||||
? "<meta http-equiv=\"content-type\" content=\"text/html; charset={$charset}\"/>\r\n"
|
||||
: "<meta charset=\"{$charset}\"/>\r\n";
|
||||
}
|
||||
|
||||
function html_stylesheet(string $name, array $params = [], ?int $version = null): string {
|
||||
if(html_modern())
|
||||
$cssFormat = '/css/%s';
|
||||
else {
|
||||
$cssFormat = '/css.php?path=%s';
|
||||
|
||||
if(empty($params['accent']))
|
||||
$params['accent'] = html_default_mode() === FWH_JVDG ? '#2d9940' : '#4a3650';
|
||||
|
||||
if(!empty($params)) {
|
||||
foreach($params as $key => $val)
|
||||
$cssFormat .= '&' . rawurlencode($key) . '=' . str_replace('%', '%%', rawurlencode($val));
|
||||
}
|
||||
}
|
||||
|
||||
return "<link href=\"". html_baseurl() . sprintf($cssFormat, $name) ."\" type=\"text/css\" rel=\"stylesheet\"/>\r\n";
|
||||
}
|
||||
|
||||
function html_script(string $path, string $charset = 'utf-8', string $language = 'javascript', ?int $version = null): string {
|
||||
if($path[0] === '/' && $path[1] !== '/')
|
||||
$path = html_baseurl() . $path;
|
||||
|
||||
$html = "<script src=\"{$path}\" type=\"text/{$language}\"";
|
||||
|
||||
if(html_old_browser())
|
||||
$html .= "language=\"{$language}\" ";
|
||||
|
||||
return $html . " charset=\"{$charset}\"></script>\r\n";
|
||||
}
|
||||
|
||||
function html_meta(?int $version = null): string {
|
||||
$meta = "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no\"/>\r\n";
|
||||
|
||||
if(html_default_mode() === FWH_JVDG)
|
||||
$meta .= " <style>:root { --accent-colour: #2d9940; }</style>\r\n";
|
||||
|
||||
return $meta;
|
||||
}
|
||||
|
||||
function html_open(?int $version = null): string {
|
||||
return html_doctype($version) . (($version ?? html_default_ver()) < FWH_2020 ? "<html>" : '');
|
||||
}
|
||||
|
||||
function html_close(?int $version = null): string {
|
||||
return ($version ?? html_default_ver()) < FWH_2020 ? "</html>" : '';
|
||||
}
|
||||
|
||||
function html_head(string $title, array $vars = [], ?int $version = null): string {
|
||||
$version = $version ?? html_default_ver();
|
||||
$accentColour = $vars['accent_colour'] ?? '#555';
|
||||
$html = html_charset();
|
||||
|
||||
$html .= "<title>{$title}</title>";
|
||||
|
||||
if($version < FWH_2020) {
|
||||
$trackingCode = html_default_mode() === FWH_JVDG ? 'KyPpMvk2vNGq' : 'w4PqjBGmOL5l';
|
||||
$html .= <<<HTML
|
||||
<script type="text/javascript">
|
||||
var _paq = window._paq || [];
|
||||
_paq.push(['disableCookies']);
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
_paq.push(['setTrackerUrl', '//uiharu.railgun.sh/mtm']);
|
||||
_paq.push(['setSiteId', '{$trackingCode}']);
|
||||
var g = document.createElement('script');
|
||||
g.type = 'text/javascript'; g.async = true;
|
||||
g.defer = true; g.src = '//uiharu.railgun.sh/mtm.js';
|
||||
document.head.appendChild(g);
|
||||
})();
|
||||
</script>
|
||||
HTML;
|
||||
}
|
||||
|
||||
switch ($version) {
|
||||
case FWH_2016:
|
||||
return $html . html_stylesheet('2016.css', ['accent' => $accentColour], $version) . html_meta($version);
|
||||
|
||||
case FWH_2019:
|
||||
$html .= html_stylesheet('2019.css', ['accent' => $accentColour], $version);
|
||||
|
||||
if (!empty($vars['transitional']))
|
||||
$html .= html_stylesheet('2016-lite.css', ['accent' => $accentColour], $version);
|
||||
|
||||
$html .= html_meta($version);
|
||||
|
||||
if(html_modern()) {
|
||||
$html .= <<<HTML
|
||||
<style>
|
||||
:root {
|
||||
--accent-colour: {$accentColour};
|
||||
}
|
||||
</style>
|
||||
HTML;
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
function html_navigation(array $navigation, array $vars = [], ?int $version = null): string {
|
||||
$home = html_local_url($navigation[0]['link'] ?? $vars['link'] ?? '/');
|
||||
|
||||
if(html_old_browser()) {
|
||||
$title = !empty($vars['title1']) ? ($vars['title1'] . ($vars['title2'] ?? '')) : $vars['title'] ?? 'flashwave';
|
||||
$html = '<table border="1" width="100%"><tr><td align="center" colspan="' . count($navigation) . '"><h1>' . $title . '</h1></td></tr><tr>';
|
||||
|
||||
foreach ($navigation as $item) {
|
||||
$item['link'] = html_local_url($item['link']);
|
||||
$html .= "<td align=\"center\"><a href=\"{$item['link']}\">{$item['title']}</a></td>";
|
||||
}
|
||||
|
||||
return $html . '</tr></table>';
|
||||
}
|
||||
|
||||
switch ($version ?? html_default_ver()) {
|
||||
case FWH_2016:
|
||||
$title = $vars['title'] ?? 'flash.moe';
|
||||
|
||||
$html = <<<HTML
|
||||
<nav class="header">
|
||||
<div class="header__inner">
|
||||
<a href="{$home}" class="header__logo">
|
||||
{$title}
|
||||
</a>
|
||||
<div class="header__menu">
|
||||
HTML;
|
||||
|
||||
foreach ($navigation as $item) {
|
||||
$item['link'] = html_local_url($item['link']);
|
||||
$html .= sprintf('
|
||||
<a class="nav-item" href="%s">
|
||||
<span class="nav-item__icon mdi %s"></span>
|
||||
<span class="nav-item__name">%s</span>
|
||||
</a>
|
||||
', $item['link'], $item['mdi-icon'] ?? 'mdi-link-variant', $item['title']);
|
||||
}
|
||||
|
||||
$html .= <<<HTML
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
HTML;
|
||||
|
||||
return $html;
|
||||
|
||||
case FWH_2019:
|
||||
$title1 = $vars['title1'] ?? 'flash';
|
||||
$title2 = $vars['title2'] ?? 'wave';
|
||||
|
||||
$html = <<<HTML
|
||||
<nav class="header">
|
||||
<div class="header__background"></div>
|
||||
<div class="header__wrapper">
|
||||
<a class="header__logo" href="{$home}">{$title1}<span class="header__logo__highlight">{$title2}</span></a>
|
||||
<div class="header__items">
|
||||
HTML;
|
||||
|
||||
foreach ($navigation as $item) {
|
||||
$item['link'] = html_local_url($item['link']);
|
||||
$html .= "<a href=\"{$item['link']}\" class=\"header__item\">{$item['title']}</a>";
|
||||
}
|
||||
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= <<<HTML
|
||||
</div>
|
||||
</nav>
|
||||
HTML;
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
function html_footer(?int $version = null): string {
|
||||
$currentYear = date('Y');
|
||||
|
||||
if(html_old_browser()) {
|
||||
return <<<HTML
|
||||
<div align="center"><small>
|
||||
© <a href="http://flash.moe">Flashwave</a> 2010-{$currentYear}
|
||||
</small></div>
|
||||
HTML;
|
||||
}
|
||||
|
||||
switch ($version ?? html_default_ver()) {
|
||||
case FWH_2016:
|
||||
return <<<HTML
|
||||
<footer class="footer">
|
||||
© <a href="https://flash.moe" class="footer__link">Flashwave</a> 2010-{$currentYear}
|
||||
</footer>
|
||||
HTML;
|
||||
|
||||
case FWH_2019:
|
||||
return <<<HTML
|
||||
<footer class="footer">
|
||||
<div class="footer__background"></div>
|
||||
<div class="footer__wrapper">
|
||||
© <a href="https://flash.moe" class="footer__link">Flashwave</a> 2010-{$currentYear}
|
||||
</div>
|
||||
</footer>
|
||||
HTML;
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
function html_sidebar(?int $version = null, ?array $links = null, ?array $accounts = null): string {
|
||||
$version = $version ?? html_default_ver();
|
||||
if($version < FWH_2020)
|
||||
return '';
|
||||
|
||||
$isJvdg = html_default_mode() === FWH_JVDG;
|
||||
|
||||
$links = $links ?? [
|
||||
[
|
||||
'title' => 'Home',
|
||||
'desc' => 'Index with latest blog posts',
|
||||
'dest' => html_local_url('/'),
|
||||
'hide' => $isJvdg,
|
||||
],
|
||||
[
|
||||
'title' => 'Projects',
|
||||
'desc' => 'List of things I\'ve made or am making',
|
||||
'dest' => html_local_url('/projects'),
|
||||
'hide' => $isJvdg,
|
||||
],
|
||||
[
|
||||
'title' => 'Forum',
|
||||
'desc' => 'Feature requests and bug reports for some projects',
|
||||
'dest' => '//forum.flash.moe',
|
||||
'hide' => $isJvdg,
|
||||
],
|
||||
[
|
||||
'title' => 'Flashii',
|
||||
'desc' => 'Community site I run and develop',
|
||||
'dest' => '//flashii.net',
|
||||
'hide' => $isJvdg,
|
||||
],
|
||||
[
|
||||
'title' => 'Railgun',
|
||||
'desc' => 'Chat server and chat protocols I work on',
|
||||
'dest' => '//railgun.sh',
|
||||
'hide' => $isJvdg,
|
||||
],
|
||||
];
|
||||
|
||||
$accounts = $accounts ?? [
|
||||
[
|
||||
'title' => 'E-mail',
|
||||
'url' => 'mailto:me+contact@flash.moe',
|
||||
'image' => html_baseurl() . '/assets/icons/email.png',
|
||||
],
|
||||
[
|
||||
'title' => 'Flashii',
|
||||
'url' => '//flashii.net/profile.php?u=1',
|
||||
'image' => html_baseurl() . '/assets/icons/flashii.png',
|
||||
'hide' => $isJvdg,
|
||||
],
|
||||
[
|
||||
'title' => 'Github',
|
||||
'url' => '//github.com/flashwave',
|
||||
'image' => html_baseurl() . '/assets/icons/github.png',
|
||||
],
|
||||
[
|
||||
'title' => 'YouTube',
|
||||
'url' => '//youtube.com/c/flashwave',
|
||||
'image' => html_baseurl() . '/assets/icons/youtube.png',
|
||||
'hide' => $isJvdg,
|
||||
],
|
||||
[
|
||||
'title' => 'Twitch',
|
||||
'url' => '//twitch.tv/flashwave0',
|
||||
'image' => html_baseurl() . '/assets/icons/twitch.png',
|
||||
'hide' => $isJvdg,
|
||||
],
|
||||
[
|
||||
'title' => 'Steam',
|
||||
'url' => '//steamcommunity.com/id/flashwave_',
|
||||
'image' => html_baseurl() . '/assets/icons/steam.png',
|
||||
'hide' => $isJvdg,
|
||||
],
|
||||
[
|
||||
'title' => 'Twitter',
|
||||
'url' => 'javascript:confirm(\'Proceed with caution.\') ? location.assign(\'//twitter.com/smugwave\') : void(0);',
|
||||
'image' => html_baseurl() . '/assets/icons/twitter.png',
|
||||
'hide' => $isJvdg,
|
||||
],
|
||||
[
|
||||
'title' => 'last.fm',
|
||||
'url' => '//www.last.fm/user/flashwave_',
|
||||
'image' => html_baseurl() . '/assets/icons/lastfm.png',
|
||||
'hide' => $isJvdg,
|
||||
],
|
||||
[
|
||||
'title' => 'Nintendo',
|
||||
'url' => '/nintendo',
|
||||
'image' => html_baseurl() . '/assets/icons/ninswitch.png',
|
||||
'hide' => $isJvdg,
|
||||
],
|
||||
[
|
||||
'title' => 'Donate',
|
||||
'url' => '//paypal.me/flashwave',
|
||||
'image' => html_baseurl() . '/assets/icons/paypal.png',
|
||||
'hide' => $isJvdg,
|
||||
],
|
||||
];
|
||||
|
||||
$title1 = $isJvdg ? 'julian' : 'flash';
|
||||
$title2 = $isJvdg ? 'vdg' : 'wave';
|
||||
$avatar = $isJvdg ? '//julianvdg.nl/avatar.php' : '//flashii.net/user-assets.php?m=avatar&u=1&r=120';
|
||||
$avatarHTML = $isJvdg ? '' : '<img src="'. $avatar .'" width="60" height="60" alt="" class="header-avatar"/>';
|
||||
|
||||
$html = <<<HTML
|
||||
<div class="sidebar">
|
||||
<div class="sidebar-inner">
|
||||
<div class="header">
|
||||
<div class="header-text">
|
||||
<div class="header-title">{$title1}<span class="header-title-hilight">{$title2}</span></div>
|
||||
<div class="header-slogan">if it ain't broke, i'll break it</div>
|
||||
</div>
|
||||
{$avatarHTML}
|
||||
</div>\r\n
|
||||
HTML;
|
||||
|
||||
$html .= " <div class=\"links\">\r\n";
|
||||
foreach($links as $link) {
|
||||
if(!empty($link['hide']))
|
||||
continue;
|
||||
|
||||
$html .= <<<HTML
|
||||
<a href="{$link['dest']}" class="link">
|
||||
<div class="link-title">{$link['title']}</div>
|
||||
<div class="link-desc">{$link['desc']}</div>
|
||||
</a>\r\n
|
||||
HTML;
|
||||
}
|
||||
$html .= " </div>\r\n";
|
||||
|
||||
$html .= " <div class=\"accounts\">\r\n";
|
||||
foreach($accounts as $account) {
|
||||
if(!empty($account['hide']))
|
||||
continue;
|
||||
|
||||
$html .= <<<HTML
|
||||
<a href="{$account['url']}" class="account" rel="noreferrer noopener">
|
||||
<img src="{$account['image']}" alt="" width="25" height="25" class="account-icon"/>
|
||||
<div class="account-name">{$account['title']}</div>
|
||||
</a>\r\n
|
||||
HTML;
|
||||
}
|
||||
$html .= " </div>\r\n";
|
||||
|
||||
$html .= <<<HTML
|
||||
<div class="music hidden" id="music">
|
||||
<div class="music-header" id="music-header">
|
||||
Listening to
|
||||
</div>
|
||||
<div class="music-wrap">
|
||||
<div class="music-meta">
|
||||
<div class="music-title">
|
||||
<a href="#" class="music-title-link" id="music-title">Title</a>
|
||||
</div>
|
||||
<div class="music-artist">
|
||||
<a href="#" class="music-artist-link" id="music-artist">Artist</a>
|
||||
</div>
|
||||
</div>
|
||||
<img src="//now.flash.moe/resources/no-cover.png" width="50" height="50" alt="" class="music-cover" id="music-cover"/>
|
||||
</div>
|
||||
</div>\r\n
|
||||
HTML;
|
||||
|
||||
$name = $isJvdg ? 'Julian van de Groep' : 'Flashwave';
|
||||
$year = date('Y');
|
||||
if(!$isJvdg)
|
||||
$html .= <<<HTML
|
||||
</div>
|
||||
<div class="copyright">
|
||||
© <a href="//{$_SERVER['HTTP_HOST']}">{$name}</a> 2010-{$year}
|
||||
</div>
|
||||
</div>\r\n
|
||||
HTML;
|
||||
else $html .= '</div></div>';
|
||||
|
||||
$trackingCode = $isJvdg ? 'KyPpMvk2vNGq' : 'w4PqjBGmOL5l';
|
||||
$html .= <<<HTML
|
||||
<script type="text/javascript">
|
||||
var _paq = window._paq || [];
|
||||
_paq.push(['disableCookies']);
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
_paq.push(['setTrackerUrl', '//uiharu.railgun.sh/mtm']);
|
||||
_paq.push(['setSiteId', '{$trackingCode}']);
|
||||
var g = document.createElement('script');
|
||||
g.type = 'text/javascript'; g.async = true;
|
||||
g.defer = true; g.src = '//uiharu.railgun.sh/mtm.js';
|
||||
document.head.appendChild(g);
|
||||
})();
|
||||
</script>\r\n
|
||||
HTML;
|
||||
|
||||
return $html;
|
||||
}
|
58
public/_v4/includes.php
Normal file
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
define('FM_DEBUG',
|
||||
is_file(__DIR__ . '/.debug')
|
||||
|| $_SERVER['REMOTE_ADDR'] === '83.87.130.248'
|
||||
|| substr($_SERVER['REMOTE_ADDR'], 0, 19) === '2001:1c02:20f:3200:'
|
||||
);
|
||||
|
||||
error_reporting(FM_DEBUG ? -1 : 0);
|
||||
ini_set('display_errors', FM_DEBUG ? 'On' : 'Off');
|
||||
|
||||
date_default_timezone_set('UTC');
|
||||
mb_internal_encoding('UTF-8');
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__);
|
||||
|
||||
require_once 'html.php';
|
||||
|
||||
try {
|
||||
$pdo = new PDO('mysql:unix_socket=/var/run/mysqld/mysqld.sock;dbname=flash_website;charset=utf8mb4', 'flash', 'af66a6666b1c9a597063325b14c8b52d', [
|
||||
PDO::ATTR_CASE => PDO::CASE_NATURAL,
|
||||
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
||||
PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL,
|
||||
PDO::ATTR_STRINGIFY_FETCHES => false,
|
||||
PDO::ATTR_EMULATE_PREPARES => false,
|
||||
PDO::MYSQL_ATTR_INIT_COMMAND => "
|
||||
SET SESSION
|
||||
sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION',
|
||||
time_zone = '+00:00';
|
||||
",
|
||||
]);
|
||||
} catch(Exception $ex) {
|
||||
echo '<h3>Unable to connect to database</h3>';
|
||||
die($ex->getMessage());
|
||||
}
|
||||
|
||||
define('HEAD_FLASHWAVE', [
|
||||
'accent_colour' => '#4a3650',
|
||||
]);
|
||||
define('HEAD_ERROR', [
|
||||
'accent_colour' => '#960018',
|
||||
]);
|
||||
define('HEAD_BLOG', [
|
||||
'accent_colour' => '#4a3650',
|
||||
'transitional' => true,
|
||||
]);
|
||||
define('HEAD_WHOIS', [
|
||||
'accent_colour' => '#555',
|
||||
'transitional' => true,
|
||||
]);
|
||||
|
||||
define('NAV_FLASHWAVE', [
|
||||
['title' => 'Home', 'link' => '/'],
|
||||
['title' => 'Projects', 'link' => '/projects.php'],
|
||||
]);
|
||||
define('NAV_ERROR', [
|
||||
['title' => 'Retry', 'link' => $_SERVER['REQUEST_URI']],
|
||||
['title' => 'Home', 'link' => '/'],
|
||||
]);
|
||||
define('NAV_WHOIS', NAV_FLASHWAVE);
|
BIN
public/aiko/Release.zip
Normal file
20
public/aiko/index.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<h1 style="margin-bottom: 0;">Aiko</h1>
|
||||
<a href="./">Home</a> -
|
||||
<a href="//github.com/flashwave/aiko">Source</a>
|
||||
<hr/>
|
||||
<p>Aiko is a thing that can run 6502 code.</p>
|
||||
<p><a href="./Release.zip">Download for .NET Framework 4.7.2</a> (will go down when a proper download page exists)</p>
|
||||
<script type="text/javascript">
|
||||
var _paq = window._paq || [];
|
||||
_paq.push(['disableCookies']);
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
_paq.push(['setTrackerUrl', '//uiharu.railgun.sh/mtm']);
|
||||
_paq.push(['setSiteId', 'w4PqjBGmOL5l']);
|
||||
var g = document.createElement('script');
|
||||
g.type = 'text/javascript'; g.async = true;
|
||||
g.defer = true; g.src = '//uiharu.railgun.sh/mtm.js';
|
||||
document.head.appendChild(g);
|
||||
})();
|
||||
</script>
|
420
public/ascii.php
Normal file
|
@ -0,0 +1,420 @@
|
|||
<?php
|
||||
$table = [
|
||||
// Control characters
|
||||
['Null character', 'NUL'],
|
||||
['Start of heading', 'SOH'],
|
||||
['Start of text', 'STX'],
|
||||
['End of text', 'ETX'],
|
||||
['End of transmission', 'EOT'],
|
||||
['Enquiry', 'ENQ'],
|
||||
['Acknowledgement', 'ACK'],
|
||||
['Bell', 'BEL'],
|
||||
['Backspace', 'BS' ],
|
||||
['Horizontal tab', 'HT' ],
|
||||
['Line feed', 'LF' ],
|
||||
['Vertical tab', 'VT' ],
|
||||
['Form feed', 'FF' ],
|
||||
['Carriage return', 'CR' ],
|
||||
['Shift out/X-On', 'SO' ],
|
||||
['Shift in/X-Off', 'SI' ],
|
||||
['Delta line escape', 'DLE'],
|
||||
['Device control 1 (often XON)', 'DC1'],
|
||||
['Device control 2', 'DC2'],
|
||||
['Device control 3 (often XOFF)', 'DC3'],
|
||||
['Device control 4', 'DC4'],
|
||||
['Negative acknowledgement', 'NAK'],
|
||||
['Synchronous idle', 'SYN'],
|
||||
['End of transmit block', 'ETB'],
|
||||
['Cancel', 'CAN'],
|
||||
['End of medium', 'EM' ],
|
||||
['Substitute', 'SUB'],
|
||||
['Escape', 'ESC'],
|
||||
['File separator', 'FS' ],
|
||||
['Group separator', 'GS' ],
|
||||
['Record separator', 'RS' ],
|
||||
['Unit separator', 'US' ],
|
||||
|
||||
// Printable characters
|
||||
['Space'],
|
||||
['Excalamation mark'],
|
||||
['Double quotes', 'quot'],
|
||||
['Hash'],
|
||||
['Dollar'],
|
||||
['Percent'],
|
||||
['Ampersand', 'amp'],
|
||||
['Single quote'],
|
||||
['Open parenthesis'],
|
||||
['Close parenthesis'],
|
||||
['Asterisk'],
|
||||
['Plus'],
|
||||
['Comma'],
|
||||
['Hyphen'],
|
||||
['Period'],
|
||||
['Slash'],
|
||||
['Zero'],
|
||||
['One'],
|
||||
['Two'],
|
||||
['Three'],
|
||||
['Four'],
|
||||
['Five'],
|
||||
['Six'],
|
||||
['Seven'],
|
||||
['Eight'],
|
||||
['Nine'],
|
||||
['Colon'],
|
||||
['Semicolon'],
|
||||
['Less than', 'lt'],
|
||||
['Equals'],
|
||||
['Greater than', 'gt'],
|
||||
['Question mark'],
|
||||
['At symbol'],
|
||||
['Uppercase A'],
|
||||
['Uppercase B'],
|
||||
['Uppercase C'],
|
||||
['Uppercase D'],
|
||||
['Uppercase E'],
|
||||
['Uppercase F'],
|
||||
['Uppercase G'],
|
||||
['Uppercase H'],
|
||||
['Uppercase I'],
|
||||
['Uppercase J'],
|
||||
['Uppercase K'],
|
||||
['Uppercase L'],
|
||||
['Uppercase M'],
|
||||
['Uppercase N'],
|
||||
['Uppercase O'],
|
||||
['Uppercase P'],
|
||||
['Uppercase Q'],
|
||||
['Uppercase R'],
|
||||
['Uppercase S'],
|
||||
['Uppercase T'],
|
||||
['Uppercase U'],
|
||||
['Uppercase V'],
|
||||
['Uppercase W'],
|
||||
['Uppercase X'],
|
||||
['Uppercase Y'],
|
||||
['Uppercase Z'],
|
||||
['Opening bracket'],
|
||||
['Backslash'],
|
||||
['Closing bracket'],
|
||||
['Caret'],
|
||||
['Underscore'],
|
||||
['Accent grave'],
|
||||
['Lowercase a'],
|
||||
['Lowercase b'],
|
||||
['Lowercase c'],
|
||||
['Lowercase d'],
|
||||
['Lowercase e'],
|
||||
['Lowercase f'],
|
||||
['Lowercase g'],
|
||||
['Lowercase h'],
|
||||
['Lowercase i'],
|
||||
['Lowercase j'],
|
||||
['Lowercase k'],
|
||||
['Lowercase l'],
|
||||
['Lowercase m'],
|
||||
['Lowercase n'],
|
||||
['Lowercase o'],
|
||||
['Lowercase p'],
|
||||
['Lowercase q'],
|
||||
['Lowercase r'],
|
||||
['Lowercase s'],
|
||||
['Lowercase t'],
|
||||
['Lowercase u'],
|
||||
['Lowercase v'],
|
||||
['Lowercase w'],
|
||||
['Lowercase x'],
|
||||
['Lowercase y'],
|
||||
['Lowercase z'],
|
||||
['Opening curly brace'],
|
||||
['Vertical bar'],
|
||||
['Closing curly brace'],
|
||||
['Tilde'],
|
||||
|
||||
// Delete
|
||||
['Delete', 'DEL'],
|
||||
];
|
||||
?>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>US-ASCII Table</title>
|
||||
<style type="text/css">
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
outline-style: none !important;
|
||||
}
|
||||
html, body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
body {
|
||||
font: 12px/20px Tahoma, Geneva, 'Dejavu Sans', Arial, Helvetica, sans-serif;
|
||||
background-color: #ddd;
|
||||
color: #000;
|
||||
}
|
||||
pre, code {
|
||||
font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
|
||||
}
|
||||
.wrap {
|
||||
margin-bottom: calc(100vh - 70px);
|
||||
}
|
||||
.hidden {
|
||||
display: none !important;
|
||||
visibility: hidden !important;
|
||||
}
|
||||
.invisible {
|
||||
opacity: 0;
|
||||
}
|
||||
.chars {
|
||||
text-align: center;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.char {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
border: 2px solid #000;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
width: 200px;
|
||||
text-align: left;
|
||||
margin: 2px;
|
||||
background-color: #eee;
|
||||
cursor: pointer !important;
|
||||
transition: background-color .1s;
|
||||
}
|
||||
.char:hover,
|
||||
.char:focus {
|
||||
background-color: #fff;
|
||||
}
|
||||
.char:active {
|
||||
background-color: #ddd;
|
||||
}
|
||||
.char-print {
|
||||
white-space: pre;
|
||||
font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
|
||||
font-size: 2.5em;
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
pointer-events: none;
|
||||
}
|
||||
.char-desc {
|
||||
text-align: center;
|
||||
font-size: 1.2em;
|
||||
padding: 0 5px 5px;
|
||||
pointer-events: none;
|
||||
}
|
||||
.char-misc {
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
border-top: 1px solid #111;
|
||||
}
|
||||
.char-misc-item {
|
||||
flex: 1 1 auto;
|
||||
padding: 2px 5px;
|
||||
transition: background-color .1s;
|
||||
background-color: #eee;
|
||||
}
|
||||
.char-misc-item:not(:last-child) {
|
||||
border-right: 1px solid #111;
|
||||
}
|
||||
.char-misc-item:hover,
|
||||
.char-misc-item:focus {
|
||||
background-color: #fff;
|
||||
}
|
||||
.char-misc-item:active {
|
||||
background-color: #ddd;
|
||||
}
|
||||
.char-misc-item-head {
|
||||
font-variant: small-caps;
|
||||
}
|
||||
.char-misc-item-value {
|
||||
font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
|
||||
text-align: right;
|
||||
}
|
||||
.search {
|
||||
margin: 0 auto;
|
||||
padding-top: 10px;
|
||||
max-width: 1200px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
background-image: linear-gradient(180deg, #ddd 51px, transparent);
|
||||
}
|
||||
.search-box {
|
||||
border: 1px solid #000;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.search-box input {
|
||||
border-width: 0;
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 2em;
|
||||
padding: 5px;
|
||||
}
|
||||
.search-hint {
|
||||
font-size: .9em;
|
||||
padding: 0 5px;
|
||||
transition: opacity .2s;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var _paq = window._paq || [];
|
||||
_paq.push(['disableCookies']);
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
_paq.push(['setTrackerUrl', '//uiharu.railgun.sh/mtm']);
|
||||
_paq.push(['setSiteId', 'w4PqjBGmOL5l']);
|
||||
var g = document.createElement('script');
|
||||
g.type = 'text/javascript'; g.async = true;
|
||||
g.defer = true; g.src = '//uiharu.railgun.sh/mtm.js';
|
||||
document.head.appendChild(g);
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
<div class="search">
|
||||
<div class="search-box">
|
||||
<input type="search" id="search" placeholder="Filter..." autocomplete="off"/>
|
||||
</div>
|
||||
<div class="search-hint js-invisible-on-scroll">
|
||||
Type <em><code>printable</code></em> for all printable characters, or <em><code>control</code></em> for all control characters.
|
||||
</div>
|
||||
</div>
|
||||
<div class="chars"><?php
|
||||
foreach($table as $code => $info):
|
||||
$isPrintable = ($code > 31 && $code < 127);
|
||||
$print = $isPrintable ? chr($code) : $info[1];
|
||||
$attrs = ['data-key-code' => $code, 'data-key-desc' => $info[0], 'data-key-print' => $print, 'data-copy' => $print];
|
||||
$attrStr = '';
|
||||
|
||||
if($isPrintable && isset($info[1]))
|
||||
$attrs['data-key-html'] = $info[1];
|
||||
|
||||
foreach($attrs as $name => $value)
|
||||
$attrStr .= $name . '="' . htmlentities($value) . '" ';
|
||||
?><div class="char" <?=trim($attrStr);?>>
|
||||
<div class="char-print"><?=$print;?></div>
|
||||
<div class="char-desc"><?=$info[0];?></div>
|
||||
<div class="char-misc">
|
||||
<div class="char-misc-item" data-copy="<?=$code;?>">
|
||||
<div class="char-misc-item-head">Decimal</div>
|
||||
<div class="char-misc-item-value"><?=$code;?></div>
|
||||
</div>
|
||||
<div class="char-misc-item" data-copy="<?=decoct($code);?>">
|
||||
<div class="char-misc-item-head">Octal</div>
|
||||
<div class="char-misc-item-value"><?=decoct($code);?></div>
|
||||
</div>
|
||||
<div class="char-misc-item" data-copy="<?=dechex($code);?>">
|
||||
<div class="char-misc-item-head">Hex</div>
|
||||
<div class="char-misc-item-value"><?=dechex($code);?></div>
|
||||
</div>
|
||||
<?php if(isset($attrs['data-key-html'])): ?>
|
||||
<div class="char-misc-item" data-copy="&<?=$attrs['data-key-html'];?>;">
|
||||
<div class="char-misc-item-head">HTML</div>
|
||||
<div class="char-misc-item-value">&<?=$attrs['data-key-html'];?>;</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div><?php endforeach; ?></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var chars = document.getElementsByClassName('char'),
|
||||
search = document.getElementById('search');
|
||||
|
||||
function charsFilter(filter) {
|
||||
if(!filter) {
|
||||
for(var i = 0; i < chars.length; ++i)
|
||||
chars[i].classList.remove('hidden');
|
||||
return;
|
||||
}
|
||||
|
||||
filter = filter.toLowerCase();
|
||||
|
||||
for(var i = 0; i < chars.length; ++i) {
|
||||
var chr = chars[i],
|
||||
code = (chr.dataset.keyCode || 0).toString().toLowerCase(),
|
||||
print = (chr.dataset.keyPrint || "\0").toString().toLowerCase(),
|
||||
desc = (chr.dataset.keyDesc || '').toString().toLowerCase(),
|
||||
html = (chr.dataset.keyHtml || "\0").toString().toLowerCase(),
|
||||
codeInt = parseInt(code),
|
||||
isMatch = (filter === 'printable' && (codeInt > 31 && codeInt < 127))
|
||||
|| (filter === 'control' && (codeInt < 32 || codeInt === 127))
|
||||
|| code == filter || print == filter
|
||||
|| html == filter || desc.indexOf(filter) >= 0;
|
||||
chr.classList[isMatch ? 'remove' : 'add']('hidden');
|
||||
}
|
||||
};
|
||||
|
||||
window.addEventListener('scroll', function() {
|
||||
var hidden = document.getElementsByClassName('js-hidden-on-scroll'),
|
||||
invisible = document.getElementsByClassName('js-invisible-on-scroll'),
|
||||
atTop = window.scrollY === 0;
|
||||
|
||||
for(var i = 0; i < hidden.length; ++i)
|
||||
hidden[i].classList[atTop ? 'remove' : 'add']('hidden');
|
||||
for(var i = 0; i < invisible.length; ++i)
|
||||
invisible[i].classList[atTop ? 'remove' : 'add']('invisible');
|
||||
});
|
||||
search.addEventListener('keyup', function() {
|
||||
location.hash = search.value.trim();
|
||||
});
|
||||
window.addEventListener('hashchange', function() {
|
||||
charsFilter(decodeURIComponent((location.hash || '#').substring(1)));
|
||||
});
|
||||
if(location.hash.length > 0) {
|
||||
search.value = location.hash.substring(1).trim();
|
||||
charsFilter(search.value);
|
||||
}
|
||||
|
||||
for(var i = 0; i < chars.length; ++i) {
|
||||
chars[i].addEventListener('click', function(ev) {
|
||||
var target = ev.target;
|
||||
|
||||
while(target !== null && typeof target.dataset.copy === 'undefined') {
|
||||
target = target.parentNode || null;
|
||||
|
||||
if(target.classList.contains('char'))
|
||||
break;
|
||||
}
|
||||
|
||||
if(target === null || typeof target.dataset.copy === 'undefined')
|
||||
return;
|
||||
|
||||
// Clipboard interactions are fucking horrendous
|
||||
/*if(document.execCommand) {
|
||||
/*var clipfriend = document.createElement('input');
|
||||
clipfriend.type = 'text';
|
||||
clipfriend.value = target.dataset.copy;
|
||||
clipfriend.className = 'hidden';
|
||||
document.body.appendChild(clipfriend);
|
||||
clipfriend.select();
|
||||
clipfriend.setSelectionRange(0, clipfriend.value.length);
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(clipfriend);
|
||||
} else {*/
|
||||
var doCopy = function() { navigator.clipboard.writeText(target.dataset.copy); };
|
||||
|
||||
if(typeof window.mozInnerScreenX !== 'undefined')
|
||||
doCopy();
|
||||
else
|
||||
navigator.permissions.query({name: 'clipboard-write'}).then(function(res) {
|
||||
if(res.state === 'granted' || res.state === 'prompt')
|
||||
doCopy();
|
||||
});
|
||||
//}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
BIN
public/assets/Electrolize-Regular.ttf
Normal file
BIN
public/assets/NotoSans-Regular.ttf
Normal file
BIN
public/assets/NotoSansJP-Regular.otf
Normal file
BIN
public/assets/SMS-JBIOS-Demo.mid
Normal file
BIN
public/assets/Splatoon1.otf
Normal file
BIN
public/assets/Splatoon2.otf
Normal file
10
public/assets/fixpng.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
/*@if (@_jscript_version >= 5.5)
|
||||
for(i = 0; i < document.images.length; i++) {
|
||||
var s = document.images[i].src;
|
||||
if(s.indexOf('.png') > 0) {
|
||||
document.images[i].src = '/assets/pixel.gif';
|
||||
document.images[i].style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + s + '\', sizingMethod=\'scale\')';
|
||||
}
|
||||
}
|
||||
@end
|
||||
*/
|
BIN
public/assets/icons/email.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
public/assets/icons/flashii.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
public/assets/icons/github.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
public/assets/icons/icon-small.psd
Normal file
BIN
public/assets/icons/icon.psd
Normal file
BIN
public/assets/icons/lastfm.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
public/assets/icons/ninswitch.png
Normal file
After Width: | Height: | Size: 5 KiB |
BIN
public/assets/icons/paypal.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
public/assets/icons/s-code.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
public/assets/icons/s-forum.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
public/assets/icons/s-home.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
public/assets/icons/steam.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
public/assets/icons/twitch.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
public/assets/icons/twitter.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
public/assets/icons/youtube.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
93
public/assets/lastfm2020.js
Normal file
|
@ -0,0 +1,93 @@
|
|||
function createXHR() {
|
||||
if (window.XMLHttpRequest) {
|
||||
return new XMLHttpRequest();
|
||||
} else if (window.ActiveXObject) {
|
||||
try {
|
||||
return new ActiveXObject("Msxml2.XMLHTTP");
|
||||
} catch (e) {
|
||||
try {
|
||||
return new ActiveXObject("Microsoft.XMLHTTP");
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function getNowListening(username, cb) {
|
||||
var xhr = createXHR();
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState !== 4)
|
||||
return;
|
||||
|
||||
var xml = null;
|
||||
|
||||
if(window.DOMParser) {
|
||||
var parser = new DOMParser();
|
||||
xml = parser.parseFromString(xhr.responseText, 'text/xml');
|
||||
} else {
|
||||
xml = new ActiveXObject('Microsoft.XMLDOM');
|
||||
xml.async = 'false';
|
||||
xml.loadXML(xhr.responseText);
|
||||
xml = xml.childNodes[1];
|
||||
}
|
||||
|
||||
cb(xml.getElementsByTagName('Track')[0]);
|
||||
};
|
||||
xhr.open('GET', '/np.php?t=' + (new Date().getTime()) + '&u=' + username, true);
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
function getNodeText(node) {
|
||||
if (typeof node.textContent === 'undefined') {
|
||||
return node.text;
|
||||
} else {
|
||||
return node.textContent;
|
||||
}
|
||||
}
|
||||
|
||||
function setNodeText(node, text) {
|
||||
if (typeof node.textContent === 'undefined') {
|
||||
node.innerText = text;
|
||||
} else {
|
||||
node.textContent = text;
|
||||
}
|
||||
}
|
||||
|
||||
function setNowListening(track) {
|
||||
var cover = document.getElementById('music-cover'),
|
||||
title = document.getElementById('music-title'),
|
||||
artist = document.getElementById('music-artist'),
|
||||
header = document.getElementById('music-header'),
|
||||
content = document.getElementById('music'),
|
||||
coverUrl = getNodeText(track.getElementsByTagName('Medium')[0]);
|
||||
|
||||
if (content.className.indexOf('hidden') >= 0)
|
||||
content.className = content.className.replace('hidden', '');
|
||||
|
||||
setNodeText(header, getNodeText(track.getElementsByTagName('IsPlaying')[0]) != '0' ? 'Listening to' : 'Last listened to');
|
||||
cover.src = coverUrl.length < 1 ? '//now.flash.moe/resources/no-cover.png' : coverUrl.replace('/64s/', '/100s/').replace('https:', '');
|
||||
setNodeText(title, getNodeText(track.getElementsByTagName('Name')[0]));
|
||||
title.href = getNodeText(track.getElementsByTagName('Url')[0]);
|
||||
setNodeText(artist, getNodeText(track.getElementsByTagName('Name')[1]));
|
||||
artist.href = title.href.substring(0, title.href.indexOf('/_/'));
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
var lastFmUsername = '',
|
||||
lastFmFind = '//www.last.fm/user/';
|
||||
|
||||
var links = document.getElementsByTagName('a');
|
||||
for (var i = 0; i < links.length; i++) {
|
||||
var indexOf = links[i].href.indexOf(lastFmFind);
|
||||
if(indexOf > -1) {
|
||||
lastFmUsername = links[i].href.substring(indexOf + lastFmFind.length);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(lastFmUsername) {
|
||||
setInterval(function() { getNowListening(lastFmUsername, function(track) { setNowListening(track); }); }, 60000);
|
||||
getNowListening(lastFmUsername, function(track) { setNowListening(track); });
|
||||
}
|
||||
};
|
BIN
public/assets/misaka-2.png
Normal file
After Width: | Height: | Size: 382 KiB |
BIN
public/assets/pixel.gif
Normal file
After Width: | Height: | Size: 43 B |
1
public/bateman.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Do ya like Hewey Lewis and The News? Their early work was a little too "new-wave" for my taste, but when Sports came out in 83, I think they really came into their own - both commercially and artistically. The whole album has a clear, crisp sound, and a new sheen of consummate professionalism that really gives the songs...A big boost. He's been compared to Elvis Costello, but I think Huey has a far more bitter, cynical sense of humour. In 87, Huey released this, fore, their most accomplished album. I think their undisputed masterpiece is "Hip To Be Square", a song so catchy, most people probably don't listen to the lyrics. But they should! Because it's NOT just about the pleasures of conformity and the importance of trends! It's also a personal statement about the band itself!
|
7
public/chat/.htaccess
Normal file
|
@ -0,0 +1,7 @@
|
|||
RewriteEngine on
|
||||
Options +FollowSymLinks
|
||||
Options -Indexes
|
||||
RewriteRule ^logs$ index.php?view=logs
|
||||
RewriteRule ^mobile$ index.php?view=mobile
|
||||
RewriteRule ^chat$ index.php
|
||||
RewriteRule ^desktop$ index.php
|
BIN
public/chat/FABridge.swf
Normal file
98
public/chat/css/Black.ajaxchat.css
Normal file
|
@ -0,0 +1,98 @@
|
|||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @author Philip Nicolcev
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
@import url('meta.modern.ajaxchat.css');
|
||||
|
||||
@media screen,projection,handheld {
|
||||
|
||||
/* Buttons */
|
||||
#content #bbCodeContainer input, #content #logoutChannelContainer input, #content #submitButton, #loginForm #loginButton {
|
||||
background-color:#000;
|
||||
color:#f0f0f0;
|
||||
border: 1px solid #808080;
|
||||
background-image: linear-gradient(to bottom, #222, #000);
|
||||
}
|
||||
#content select, #loginForm select, #loginForm input, #content textarea {
|
||||
background-color:#000;
|
||||
color:#fafafa;
|
||||
border: 1px solid #808080;
|
||||
}
|
||||
|
||||
/* Status Icon */
|
||||
#content #statusIconContainer {
|
||||
background-image: url('../images/loading-sprite.png');
|
||||
}
|
||||
#content .statusContainerOff {
|
||||
background-position: 0px 0px;
|
||||
}
|
||||
#content .statusContainerOn {
|
||||
background-position: 0px -22px;
|
||||
}
|
||||
#content .statusContainerAlert {
|
||||
background-position: 0px -44px;
|
||||
}
|
||||
|
||||
/* Other Theme Elements */
|
||||
#loginContent {
|
||||
background-color:#000;
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent h1 {
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent a {
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent input, #loginContent select {
|
||||
background-color:#212121;
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent #errorContainer {
|
||||
color:red;
|
||||
}
|
||||
#content {
|
||||
background-color:#000;
|
||||
color:#FFF;
|
||||
}
|
||||
#content h1 {
|
||||
color:#FFF;
|
||||
}
|
||||
#content a {
|
||||
color:#FFF;
|
||||
}
|
||||
#content #chatList, #content #onlineListContainer, #content #helpContainer, #content #settingsContainer, #content #colorCodesContainer, #content textarea {
|
||||
border-color:gray;
|
||||
background-color:#000;
|
||||
}
|
||||
#content #colorCodesContainer a {
|
||||
border-color:black;
|
||||
}
|
||||
#content #optionsContainer input {
|
||||
background-color:transparent;
|
||||
}
|
||||
#content .rowEven {
|
||||
background-color:#212121;
|
||||
}
|
||||
#content .rowOdd {
|
||||
background-color:#000;
|
||||
}
|
||||
#content #chatList .chatBotErrorMessage {
|
||||
color:red;
|
||||
}
|
||||
#content #chatList a {
|
||||
color:#1E90FF;
|
||||
}
|
||||
#content #chatList .deleteSelected {
|
||||
border-color:red;
|
||||
}
|
||||
#content #onlineListContainer h3, #content #helpContainer h3, #content #settingsContainer h3 {
|
||||
background-color:#212121;
|
||||
color:#FFF;
|
||||
}
|
||||
}
|
106
public/chat/css/Blue.ajaxchat.css
Normal file
|
@ -0,0 +1,106 @@
|
|||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @author Philip Nicolcev
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*
|
||||
* Blue Style by nookls
|
||||
* nookls.org
|
||||
*/
|
||||
|
||||
@import url('meta.modern.ajaxchat.css');
|
||||
|
||||
@media screen,projection,handheld {
|
||||
|
||||
/* Buttons */
|
||||
#content #bbCodeContainer input, #content #logoutChannelContainer input, #content #submitButton, #loginForm #loginButton {
|
||||
background-color:#002545;
|
||||
color:#f0f0f0;
|
||||
border: 1px solid #808080;
|
||||
background-image: linear-gradient(to bottom, #002545, #000);
|
||||
background-image: -webkit-linear-gradient(top, #002545, #000);
|
||||
}
|
||||
#content select, #loginForm select, #loginForm input, #content textarea {
|
||||
background-color:#002545;
|
||||
color:#fafafa;
|
||||
border: 1px solid #808080;
|
||||
}
|
||||
|
||||
/* Status Icon */
|
||||
#content #statusIconContainer {
|
||||
background-image: url('../images/loading-sprite.png');
|
||||
}
|
||||
#content .statusContainerOff {
|
||||
background-position: 0px 0px;
|
||||
}
|
||||
#content .statusContainerOn {
|
||||
background-position: 0px -22px;
|
||||
}
|
||||
#content .statusContainerAlert {
|
||||
background-position: 0px -44px;
|
||||
}
|
||||
|
||||
/* Other Theme Elements */
|
||||
#loginContent {
|
||||
background-color:#000;
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent {
|
||||
background-color:#002545;
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent h1 {
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent a {
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent input, #loginContent select {
|
||||
background-color:#002545;
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent #errorContainer {
|
||||
color:red;
|
||||
}
|
||||
#content {
|
||||
background-color:#002545;
|
||||
color:#FFF;
|
||||
}
|
||||
#content h1 {
|
||||
color:#FFF;
|
||||
}
|
||||
#content a {
|
||||
color:#FFF;
|
||||
}
|
||||
#content #chatList, #content #onlineListContainer, #content #helpContainer, #content #settingsContainer, #content #colorCodesContainer, #content textarea {
|
||||
border-color:#003D8E;
|
||||
background-color:#002545;
|
||||
}
|
||||
#content #colorCodesContainer a {
|
||||
border-color:#003D8E;
|
||||
}
|
||||
#content #optionsContainer input {
|
||||
background-color:transparent;
|
||||
}
|
||||
#content .rowEven {
|
||||
background-color:#0D355D;
|
||||
}
|
||||
#content .rowOdd {
|
||||
background-color:#002545;
|
||||
}
|
||||
#content #chatList .chatBotErrorMessage {
|
||||
color:red;
|
||||
}
|
||||
#content #chatList a {
|
||||
color:#1E90FF;
|
||||
}
|
||||
#content #chatList .deleteSelected {
|
||||
border-color:red;
|
||||
}
|
||||
#content #onlineListContainer h3, #content #helpContainer h3, #content #settingsContainer h3 {
|
||||
background-color:#0D355D;
|
||||
color:#FFF;
|
||||
}
|
||||
}
|
108
public/chat/css/Halext.ajaxchat.css
Normal file
|
@ -0,0 +1,108 @@
|
|||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
* This style is made by freakyfurball\moegami
|
||||
* http://zeniea.com/
|
||||
*/
|
||||
|
||||
@import url('meta.legacy.ajaxchat.css');
|
||||
|
||||
/*
|
||||
* Colors
|
||||
*/
|
||||
|
||||
@media screen,projection,handheld {
|
||||
|
||||
#loginContent {
|
||||
background-color: #000000;
|
||||
background-image: -linear-gradient(to bottom, #4c3b52, #000000);
|
||||
color: #999999;
|
||||
}
|
||||
#loginContent h1 {
|
||||
color: #98ba8c;
|
||||
}
|
||||
#loginContent a {
|
||||
color: #9775a3;
|
||||
}
|
||||
#loginContent input, #loginContent select {
|
||||
background-color: #312634;
|
||||
color: 9775a3;
|
||||
}
|
||||
#loginContent #loginFormContainer #loginButton {
|
||||
background-color: #312634;
|
||||
color: #9775a3;
|
||||
}
|
||||
#loginContent #errorContainer {
|
||||
color: red;
|
||||
}
|
||||
|
||||
#content {
|
||||
background-color: #000000;
|
||||
background-image: linear-gradient(to bottom, #4c3b52, #000000);
|
||||
color: #999999;
|
||||
}
|
||||
#content h1 {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
#content a {
|
||||
color: #9775a3;
|
||||
}
|
||||
#content input, #content select, #content textarea {
|
||||
background-color: #312634;
|
||||
color: #999999;
|
||||
}
|
||||
#content #chatList, #content #onlineListContainer, #content #helpContainer, #content #settingsContainer, #content #bbCodeContainer, #content #colorCodesContainer, #content #emoticonsContainer {
|
||||
border-color: gray;
|
||||
background-color: #231b26;
|
||||
}
|
||||
#content #statusIconContainer {
|
||||
background-image: url('../images/loading-sprite.png');
|
||||
}
|
||||
#content .statusContainerOff {
|
||||
background-position: 0px 0px;
|
||||
}
|
||||
#content .statusContainerOn {
|
||||
background-position: 0px -22px;
|
||||
}
|
||||
#content .statusContainerAlert {
|
||||
background-position: 0px -44px;
|
||||
}
|
||||
#content #bbCodeContainer input, #content #logoutButton, #content #submitButton {
|
||||
background-color: #312634;
|
||||
color: #999999;
|
||||
}
|
||||
#content #colorCodesContainer a {
|
||||
border-color: #312634;
|
||||
}
|
||||
#content #optionsContainer input {
|
||||
background-color: transparent;
|
||||
}
|
||||
#content .rowEven {
|
||||
background-color: #312634;
|
||||
}
|
||||
#content .rowOdd {
|
||||
background-color: #4c3b52;
|
||||
}
|
||||
#content #chatList .chatBotErrorMessage {
|
||||
color: red;
|
||||
}
|
||||
#content #chatList a {
|
||||
color: #9775a3;
|
||||
}
|
||||
#content #chatList .delete {
|
||||
background: url('../images/delete.png') no-repeat right;
|
||||
}
|
||||
#content #chatList .deleteSelected {
|
||||
border-color: red;
|
||||
}
|
||||
#content #onlineListContainer h3, #content #helpContainer h3, #content #settingsContainer h3 {
|
||||
background-color: #312634;
|
||||
color: #999999;
|
||||
}
|
||||
#content #settingsContainer #settingsList input.playback {
|
||||
background: url('../images/playback.png') no-repeat;
|
||||
}
|
||||
}
|
104
public/chat/css/Legacy.ajaxchat.css
Normal file
|
@ -0,0 +1,104 @@
|
|||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
@import url('meta.legacy.ajaxchat.css');
|
||||
|
||||
/*
|
||||
* Colors
|
||||
*/
|
||||
|
||||
@media screen,projection,handheld {
|
||||
|
||||
#loginContent {
|
||||
background-color:#000;
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent h1 {
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent a {
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent input, #loginContent select {
|
||||
background-color:#212121;
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent #loginFormContainer #loginButton {
|
||||
background-color:#212121;
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent #errorContainer {
|
||||
color:red;
|
||||
}
|
||||
|
||||
#content {
|
||||
background-color:#000;
|
||||
color:#FFF;
|
||||
}
|
||||
#content h1 {
|
||||
color:#FFF;
|
||||
}
|
||||
#content a {
|
||||
color:#FFF;
|
||||
}
|
||||
#content input, #content select, #content textarea {
|
||||
background-color:#212121;
|
||||
color:#FFF;
|
||||
}
|
||||
#content #chatList, #content #onlineListContainer, #content #helpContainer, #content #settingsContainer, #content #bbCodeContainer, #content #colorCodesContainer, #content #emoticonsContainer {
|
||||
border-color:gray;
|
||||
background-color:#000;
|
||||
}
|
||||
#content #statusIconContainer {
|
||||
background-image: url('../images/loading-sprite.png');
|
||||
}
|
||||
#content .statusContainerOff {
|
||||
background-position: 0px 0px;
|
||||
}
|
||||
#content .statusContainerOn {
|
||||
background-position: 0px -22px;
|
||||
}
|
||||
#content .statusContainerAlert {
|
||||
background-position: 0px -44px;
|
||||
}
|
||||
#content #bbCodeContainer input, #content #logoutButton, #content #submitButton {
|
||||
background-color:#212121;
|
||||
color:#FFF;
|
||||
}
|
||||
#content #colorCodesContainer a {
|
||||
border-color:black;
|
||||
}
|
||||
#content #optionsContainer input {
|
||||
background-color:transparent;
|
||||
}
|
||||
#content .rowEven {
|
||||
background-color:#212121;
|
||||
}
|
||||
#content .rowOdd {
|
||||
background-color:#000;
|
||||
}
|
||||
#content #chatList .chatBotErrorMessage {
|
||||
color:red;
|
||||
}
|
||||
#content #chatList a {
|
||||
color:#1E90FF;
|
||||
}
|
||||
#content #chatList .delete {
|
||||
background:url('../images/delete.png') no-repeat right;
|
||||
}
|
||||
#content #chatList .deleteSelected {
|
||||
border-color:red;
|
||||
}
|
||||
#content #onlineListContainer h3, #content #helpContainer h3, #content #settingsContainer h3 {
|
||||
background-color:#212121;
|
||||
color:#FFF;
|
||||
}
|
||||
#content #settingsContainer #settingsList input.playback {
|
||||
background:url('../images/playback.png') no-repeat;
|
||||
}
|
||||
}
|
108
public/chat/css/Mio.ajaxchat.css
Normal file
|
@ -0,0 +1,108 @@
|
|||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
* Style by Flashwave for Flashii.net
|
||||
*/
|
||||
|
||||
@import url('meta.legacy.ajaxchat.css');
|
||||
|
||||
/*
|
||||
* Colors
|
||||
*/
|
||||
|
||||
@media screen,projection,handheld {
|
||||
|
||||
#loginContent {
|
||||
background-color: #FBEEFF;
|
||||
color: #000;
|
||||
background-image: url('../images/fade-purple.png');
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
#loginContent h1 {
|
||||
color: #000;
|
||||
}
|
||||
#loginContent a {
|
||||
color: #000;
|
||||
}
|
||||
#userNameField, #passwordField {
|
||||
padding: 2px 4px 3px 4px;
|
||||
border: 1px solid #AAA;
|
||||
outline: none;
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
}
|
||||
#loginContent #errorContainer {
|
||||
color:red;
|
||||
}
|
||||
|
||||
#content {
|
||||
background-color: #FBEEFF;
|
||||
color: #000;
|
||||
background-image: url('../images/fade-purple.png');
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
#content h1 {
|
||||
color:#306;
|
||||
}
|
||||
#content a {
|
||||
color:#000;
|
||||
}
|
||||
#content textarea {
|
||||
border: 1px solid #AAA;
|
||||
outline: none;
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
color:#000;
|
||||
}
|
||||
#content #chatList, #content #onlineListContainer, #content #helpContainer, #content #settingsContainer, #content #bbCodeContainer, #content #colorCodesContainer, #content #emoticonsContainer {
|
||||
border: 1px solid #9475B2;
|
||||
}
|
||||
#content #statusIconContainer {
|
||||
background-image: url('../images/loading-sprite.png');
|
||||
}
|
||||
#content .statusContainerOff {
|
||||
background-position: 0px 0px;
|
||||
}
|
||||
#content .statusContainerOn {
|
||||
background-position: 0px -22px;
|
||||
}
|
||||
#content .statusContainerAlert {
|
||||
background-position: 0px -44px;
|
||||
}
|
||||
#content #colorCodesContainer a {
|
||||
border: 1px solid #9475B2;
|
||||
}
|
||||
#content #optionsContainer input {
|
||||
background-color:transparent;
|
||||
}
|
||||
#content .rowEven {
|
||||
background-color: #C9BBCC;
|
||||
}
|
||||
#content .rowOdd {
|
||||
background-color: #FBEEFF;
|
||||
}
|
||||
#content #chatList .chatBotErrorMessage {
|
||||
color:red;
|
||||
}
|
||||
#content #chatList a {
|
||||
color:#1E90FF;
|
||||
}
|
||||
#content #chatList .delete {
|
||||
background:url('../images/delete.png') no-repeat right;
|
||||
}
|
||||
#content #chatList .deleteSelected {
|
||||
border-color:red;
|
||||
}
|
||||
#content #onlineListContainer h3, #content #helpContainer h3, #content #settingsContainer h3 {
|
||||
background-color: #9475B2;
|
||||
color: #306;
|
||||
}
|
||||
#content #settingsContainer #settingsList input.playback {
|
||||
background:url('../images/playback.png') no-repeat;
|
||||
}
|
||||
|
||||
#content .user {
|
||||
color: #000;
|
||||
}
|
||||
}
|
136
public/chat/css/Nico.ajaxchat.css
Normal file
|
@ -0,0 +1,136 @@
|
|||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @author Philip Nicolcev
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
@import url('meta.modern.ajaxchat.css');
|
||||
|
||||
@media screen,projection,handheld {
|
||||
|
||||
/* Buttons */
|
||||
#content #bbCodeContainer input, #content #logoutChannelContainer input, #content #submitButton, #loginForm #loginButton {
|
||||
background-color:#000;
|
||||
color:#f0f0f0;
|
||||
border: 1px solid #808080;
|
||||
background-image: linear-gradient(to bottom, #110033, #000000);
|
||||
background-image: -webkit-linear-gradient(top, #110033, #000000);
|
||||
}
|
||||
#loginContent #loginButton {
|
||||
background-color:#000;
|
||||
color:#f0f0f0;
|
||||
border: 1px solid #808080;
|
||||
background-image: linear-gradient(to bottom, #110033, #000000);
|
||||
background-image: -webkit-linear-gradient(top, #110033, #000000);
|
||||
}
|
||||
#loginContent input {
|
||||
background-color:#000;
|
||||
color:#f0f0f0;
|
||||
border: 1px solid #808080;
|
||||
}
|
||||
#content select, #loginForm select, #loginForm input, #content textarea {
|
||||
background-color:#000;
|
||||
color:#fafafa;
|
||||
border: 1px solid #808080;
|
||||
}
|
||||
|
||||
/* Status Icon */
|
||||
#content #statusIconContainer {
|
||||
width: 25px;
|
||||
height: 26px;
|
||||
}
|
||||
#content .statusContainerOff {
|
||||
background-image: url('../images/linkgood.gif');
|
||||
}
|
||||
#content .statusContainerOn {
|
||||
background-image: url('../images/linkyellow.gif');
|
||||
}
|
||||
#content .statusContainerAlert {
|
||||
background-image: url('../images/linkbad.gif');
|
||||
}
|
||||
|
||||
/* Other Theme Elements */
|
||||
#loginContent {
|
||||
background-color:#000;
|
||||
background-image:url('../images/pclouds.jpg');
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent h1 {
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent a {
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent input, #loginContent select {
|
||||
background-color:#212121;
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent #errorContainer {
|
||||
color:red;
|
||||
}
|
||||
#content {
|
||||
background-color:#000;
|
||||
background-image:url('../images/pclouds.jpg');
|
||||
color:#FFF;
|
||||
}
|
||||
#content h1 {
|
||||
color:#FFF;
|
||||
}
|
||||
#content a {
|
||||
color:#FFF;
|
||||
}
|
||||
#content #chatList, #content #onlineListContainer, #content #helpContainer, #content #settingsContainer, #content #colorCodesContainer, #content textarea {
|
||||
border-color:gray;
|
||||
background-color:transparent;
|
||||
}
|
||||
#content #colorCodesContainer a {
|
||||
border-color:black;
|
||||
}
|
||||
#content #optionsContainer input {
|
||||
background-color:transparent;
|
||||
}
|
||||
#content .rowEven {
|
||||
|
||||
}
|
||||
#content .rowOdd {
|
||||
|
||||
}
|
||||
#content #chatList .chatBotErrorMessage {
|
||||
color:red;
|
||||
}
|
||||
#content #chatList a {
|
||||
color:#1E90FF;
|
||||
}
|
||||
#content #chatList .deleteSelected {
|
||||
border-color:red;
|
||||
}
|
||||
#content #onlineListContainer h3, #content #helpContainer h3, #content #settingsContainer h3 {
|
||||
color:#FFF;
|
||||
}
|
||||
|
||||
/* Username colors
|
||||
#content .guest {
|
||||
color: #FF9999;
|
||||
}
|
||||
#content .user {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
#content .moderator {
|
||||
color: #AA0000;
|
||||
}
|
||||
#content .admin {
|
||||
color: #9900CC;
|
||||
}
|
||||
#content .chatBot {
|
||||
color: #9E8DA7;
|
||||
}
|
||||
#content .purple {
|
||||
color: #FF9900;
|
||||
}
|
||||
#content .cmod {
|
||||
color: #0033FF;
|
||||
}*/
|
||||
}
|
129
public/chat/css/Terminal.ajaxchat.css
Normal file
|
@ -0,0 +1,129 @@
|
|||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @author Philip Nicolcev
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license Modified MIT License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
@import url('meta.legacy.ajaxchat.css');
|
||||
@import url('meta.terminal.ajaxchat.css');
|
||||
|
||||
@media screen,projection,handheld {
|
||||
|
||||
/* Buttons */
|
||||
#content #bbCodeContainer input, #content input, #content #submitButton, #loginForm #loginButton {
|
||||
background-color:#000;
|
||||
color:#00ff2b;
|
||||
border: 1px solid #00ff2b;
|
||||
font-family:monospace;
|
||||
}
|
||||
#content select, #loginForm select, #loginForm input, #content textarea {
|
||||
background-color:#000;
|
||||
color:#00ff2b;
|
||||
border: 1px solid #00ff2b;
|
||||
font-family:monospace;
|
||||
}
|
||||
|
||||
/* Status Icon */
|
||||
#content #statusIconContainer {
|
||||
background-image: url('../images/loading-sprite.png');
|
||||
}
|
||||
#content .statusContainerOff {
|
||||
background-position: 0px 0px;
|
||||
}
|
||||
#content .statusContainerOn {
|
||||
background-position: 0px -22px;
|
||||
}
|
||||
#content .statusContainerAlert {
|
||||
background-position: 0px -44px;
|
||||
}
|
||||
|
||||
/* Other Theme Elements */
|
||||
#loginContent {
|
||||
background-color:#000;
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent h1 {
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent a {
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent input, #loginContent select {
|
||||
background-color:#212121;
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent #errorContainer {
|
||||
color:red;
|
||||
}
|
||||
#content {
|
||||
background-color:#000;
|
||||
color:#00ff2b;
|
||||
}
|
||||
#content h1 {
|
||||
color:#00ff2b;
|
||||
}
|
||||
#content a {
|
||||
color:#00ff2b;
|
||||
}
|
||||
#content #onlineListContainer, #content #helpContainer, #content #settingsContainer, #content #colorCodesContainer, #content textarea {
|
||||
border-color:#00ff2b;
|
||||
background-color:#000;
|
||||
}
|
||||
|
||||
#content #chatList {
|
||||
color:#00ff2b;
|
||||
}
|
||||
|
||||
#content #colorCodesContainer a {
|
||||
border-color:black;
|
||||
}
|
||||
#content #optionsContainer input {
|
||||
background-color:transparent;
|
||||
}
|
||||
#content .rowEven {
|
||||
background-color:#000;
|
||||
}
|
||||
#content .rowOdd {
|
||||
background-color:#000;
|
||||
}
|
||||
#content .guest {
|
||||
text-shadow:0px 0px 5px gray;
|
||||
}
|
||||
#content .user {
|
||||
text-shadow:0px 0px 5px #FFF;
|
||||
}
|
||||
#content .moderator {
|
||||
text-shadow:0px 0px 5px #0A0;
|
||||
}
|
||||
#content .admin {
|
||||
text-shadow:0px 0px 5px #A00;
|
||||
}
|
||||
#content .chatBot, #content .bots {
|
||||
text-shadow:0px 0px 5px #9E8DA7;
|
||||
}
|
||||
#content .purple {
|
||||
text-shadow:0px 0px 5px #824CA0;
|
||||
}
|
||||
#content .cmod {
|
||||
text-shadow:0px 0px 5px #09F;
|
||||
}
|
||||
#content .donator {
|
||||
text-shadow:0px 0px 5px #EE9400;
|
||||
}
|
||||
#content #chatList .chatBotErrorMessage {
|
||||
color:red;
|
||||
}
|
||||
#content #chatList a {
|
||||
color:#1E90FF;
|
||||
}
|
||||
#content #chatList .deleteSelected {
|
||||
border-color:red;
|
||||
}
|
||||
#content #onlineListContainer h3, #content #helpContainer h3, #content #settingsContainer h3 {
|
||||
background-color:#000;
|
||||
color:#00ff2b;
|
||||
}
|
||||
}
|
111
public/chat/css/White.ajaxchat.css
Normal file
|
@ -0,0 +1,111 @@
|
|||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*
|
||||
* Color palette inspired by phpBB style "prosilver":
|
||||
* http://www.phpbb.com/
|
||||
*/
|
||||
|
||||
@import url('meta.legacy.ajaxchat.css');
|
||||
|
||||
/*
|
||||
* Colors
|
||||
*/
|
||||
|
||||
@media screen,projection,handheld {
|
||||
|
||||
#loginContent {
|
||||
background-color:#F9F9F9;
|
||||
color:#28313F;
|
||||
}
|
||||
#loginContent h1 {
|
||||
color:#333333;
|
||||
}
|
||||
#loginContent a {
|
||||
color:#333333;
|
||||
}
|
||||
#loginContent input, #loginContent select {
|
||||
background-color:#FFF;
|
||||
color:#333333;
|
||||
}
|
||||
#loginContent #loginFormContainer #loginButton {
|
||||
background-color:#F7F5F1;
|
||||
color:#333333;
|
||||
}
|
||||
#loginContent #errorContainer {
|
||||
color:red;
|
||||
}
|
||||
|
||||
#content {
|
||||
background-color:#F9F9F9;
|
||||
color:#28313F;
|
||||
}
|
||||
#content h1 {
|
||||
color:#333333;
|
||||
}
|
||||
#content a {
|
||||
color:#333333;
|
||||
}
|
||||
#content input, #content select, #content textarea {
|
||||
background-color:#FFF;
|
||||
color:#333333;
|
||||
}
|
||||
#content #chatList, #content #onlineListContainer, #content #helpContainer, #content #settingsContainer, #content #bbCodeContainer, #content #colorCodesContainer, #content #emoticonsContainer {
|
||||
border-color:#105289;
|
||||
background-color:#FFF;
|
||||
}
|
||||
#content #statusIconContainer {
|
||||
background-image: url('../images/loading-sprite.png');
|
||||
}
|
||||
#content .statusContainerOff {
|
||||
background-position: 0px 0px;
|
||||
}
|
||||
#content .statusContainerOn {
|
||||
background-position: 0px -22px;
|
||||
}
|
||||
#content .statusContainerAlert {
|
||||
background-position: 0px -44px;
|
||||
}
|
||||
#content #bbCodeContainer input, #content #logoutButton, #content #submitButton {
|
||||
background-color:#F7F5F1;
|
||||
color:#333333;
|
||||
}
|
||||
#content #colorCodesContainer a {
|
||||
border-color:black;
|
||||
}
|
||||
#content #optionsContainer input {
|
||||
background-color:transparent;
|
||||
}
|
||||
#content .rowEven {
|
||||
background-color:#E1EBF2;
|
||||
}
|
||||
#content .rowOdd {
|
||||
background-color:#ECF3F7;
|
||||
}
|
||||
#content #chatList .chatBotErrorMessage {
|
||||
color:red;
|
||||
}
|
||||
#content #chatList a {
|
||||
color:#D31141;
|
||||
}
|
||||
#content #chatList .delete {
|
||||
background:url('../images/delete.png') no-repeat right;
|
||||
}
|
||||
#content #chatList .deleteSelected {
|
||||
border-color:red;
|
||||
}
|
||||
#content #onlineListContainer h3, #content #helpContainer h3, #content #settingsContainer h3 {
|
||||
background-color:#E1EBF2;
|
||||
color:#105289;
|
||||
}
|
||||
#content #settingsContainer #settingsList input.playback {
|
||||
background:url('../images/playback.png') no-repeat;
|
||||
}
|
||||
|
||||
#content .user {
|
||||
color: #000;
|
||||
}
|
||||
}
|
69
public/chat/css/chatlogin.css
Normal file
|
@ -0,0 +1,69 @@
|
|||
h1, h3 {
|
||||
font-weight: 100;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 3em;
|
||||
text-shadow: 0px 0px .5em #F1F1F1;
|
||||
}
|
||||
|
||||
h3 {
|
||||
display: inline-block;
|
||||
box-shadow: 0px 0px .5em #700;
|
||||
min-width: 300px;
|
||||
font-size: 15px;
|
||||
padding: 2px;
|
||||
margin: 10px;
|
||||
background: linear-gradient(180deg, #900, #600) #700;
|
||||
}
|
||||
|
||||
div.copyright {
|
||||
font-size: 12px;
|
||||
color: #CCC;
|
||||
}
|
||||
|
||||
form {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
form input[type="text"], form input[type="password"] {
|
||||
height: 18px;
|
||||
width: 288px;
|
||||
}
|
||||
|
||||
form input[type="text"] {
|
||||
border-top-left-radius: 5px;
|
||||
border-top-right-radius: 5px;
|
||||
}
|
||||
|
||||
form input[type="submit"] {
|
||||
border-bottom-left-radius: 5px;
|
||||
border-bottom-right-radius: 5px;
|
||||
background: #404;
|
||||
box-shadow: 0px 0px 1em #707 inset;
|
||||
color: #FFF;
|
||||
font-weight: 700;
|
||||
border-color: #808;
|
||||
}
|
||||
|
||||
form *:not(option) {
|
||||
height: 30px;
|
||||
display: block;
|
||||
margin: 1px auto;
|
||||
width: 300px;
|
||||
padding: 5px;
|
||||
border: 1px #888 solid;
|
||||
background: transparent;
|
||||
box-shadow: 0px 0px 1em #888 inset
|
||||
}
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
transition: text-shadow .2s;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-shadow: 0px 0px 1em #F1F1F1;
|
||||
}
|
486
public/chat/css/meta.legacy.ajaxchat.css
Normal file
|
@ -0,0 +1,486 @@
|
|||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
/* Import Username and Text colour CSS file */
|
||||
@import url('textcolours.ajaxchat.css');
|
||||
|
||||
/* Nigger Rig word-wrap fix */
|
||||
* {
|
||||
word-wrap: break-word !important;
|
||||
}
|
||||
|
||||
/*
|
||||
* Borders
|
||||
*/
|
||||
|
||||
#content img {
|
||||
border:none;
|
||||
}
|
||||
#content #chatList, #content #onlineListContainer, #content #helpContainer, #content #settingsContainer, #content #bbCodeContainer, #content #colorCodesContainer, #content #emoticonsContainer, #content #colorCodesContainer a {
|
||||
border-width:1px;
|
||||
border-style:solid;
|
||||
}
|
||||
#content #chatList .deleteSelected {
|
||||
border-width:1px;
|
||||
border-style:dotted;
|
||||
}
|
||||
#content #helpContainer #helpList table, #content #settingsContainer #settingsList table {
|
||||
border-collapse:collapse;
|
||||
}
|
||||
|
||||
/*
|
||||
* Fonts
|
||||
*/
|
||||
|
||||
#loginContent {
|
||||
font-family:Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size:0.8em;
|
||||
}
|
||||
#loginContent h1 {
|
||||
font-size:1.3em;
|
||||
font-family:"Trebuchet MS", Verdana, Arial, sans-serif;
|
||||
font-weight:bold;
|
||||
}
|
||||
#loginContent a {
|
||||
text-decoration:none;
|
||||
}
|
||||
#loginContent a:hover {
|
||||
text-decoration:underline;
|
||||
}
|
||||
#loginContent #loginRegisteredUsers {
|
||||
font-size:0.8em;
|
||||
}
|
||||
#loginContent #copyright {
|
||||
font-size:0.8em;
|
||||
}
|
||||
|
||||
#content {
|
||||
font-family:Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size:0.8em;
|
||||
}
|
||||
#content h1 {
|
||||
font-size:1.3em;
|
||||
font-family:"Trebuchet MS", Verdana, Arial, sans-serif;
|
||||
font-weight:bold;
|
||||
}
|
||||
#content h3 {
|
||||
font-size:1.0em;
|
||||
}
|
||||
#content a {
|
||||
text-decoration:none;
|
||||
}
|
||||
#content a:hover {
|
||||
text-decoration:underline;
|
||||
}
|
||||
#content #copyright {
|
||||
font-size:0.8em;
|
||||
}
|
||||
#content #chatList span.dateTime {
|
||||
font-size:0.7em;
|
||||
}
|
||||
#content #chatList .chatBotMessage {
|
||||
font-style:italic;
|
||||
}
|
||||
#content #chatList .chatBotErrorMessage {
|
||||
font-style:italic;
|
||||
}
|
||||
#content #chatList .privmsg {
|
||||
font-style:italic;
|
||||
}
|
||||
#content #chatList .action {
|
||||
font-style:italic;
|
||||
}
|
||||
#content #chatList q {
|
||||
font-variant:small-caps;
|
||||
}
|
||||
#content #chatList code {
|
||||
font-size:1.2em;
|
||||
}
|
||||
#content #onlineListContainer #onlineList div {
|
||||
font-size:0.9em;
|
||||
}
|
||||
#content #helpContainer #helpList td {
|
||||
font-size:0.9em;
|
||||
}
|
||||
#content #helpContainer #helpList td.code {
|
||||
font-style:italic;
|
||||
}
|
||||
#content #settingsContainer #settingsList td {
|
||||
font-size:0.9em;
|
||||
}
|
||||
|
||||
/*
|
||||
* Positioning
|
||||
*/
|
||||
|
||||
#loginContent {
|
||||
position:absolute;
|
||||
width:100%;
|
||||
height:100%;
|
||||
}
|
||||
#loginContent #loginHeadlineContainer {
|
||||
margin-left:100px;
|
||||
margin-right:100px;
|
||||
margin-top:100px;
|
||||
}
|
||||
#loginContent #loginFormContainer {
|
||||
margin-left:100px;
|
||||
margin-right:100px;
|
||||
}
|
||||
#loginContent #loginFormContainer div {
|
||||
margin-bottom:7px;
|
||||
}
|
||||
#loginContent #loginRegisteredUsers {
|
||||
padding-top:5px;
|
||||
}
|
||||
#loginContent #errorContainer {
|
||||
margin-left:100px;
|
||||
margin-right:100px;
|
||||
}
|
||||
#loginContent #copyright {
|
||||
margin-top:20px;
|
||||
margin-left:100px;
|
||||
margin-right:100px;
|
||||
}
|
||||
|
||||
#content {
|
||||
position:absolute;
|
||||
width:100%;
|
||||
height:100%;
|
||||
}
|
||||
#content #copyright {
|
||||
position:absolute;
|
||||
right:20px;
|
||||
top:20px;
|
||||
}
|
||||
#content #headlineContainer {
|
||||
position:absolute;
|
||||
left:20px;
|
||||
top:5px;
|
||||
}
|
||||
#content #logoutChannelContainer {
|
||||
position:absolute;
|
||||
left:20px;
|
||||
top:50px;
|
||||
}
|
||||
#content #statusIconContainer {
|
||||
position:absolute;
|
||||
right:20px;
|
||||
top:50px;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
}
|
||||
#content #chatList {
|
||||
position:absolute;
|
||||
left:20px;
|
||||
right:230px;
|
||||
top:85px;
|
||||
bottom:150px;
|
||||
overflow:auto;
|
||||
}
|
||||
#content #inputFieldContainer {
|
||||
position:absolute;
|
||||
left:20px;
|
||||
right:20px;
|
||||
bottom:95px;
|
||||
padding-right:4px;
|
||||
}
|
||||
#content #submitButtonContainer {
|
||||
position:absolute;
|
||||
right:20px;
|
||||
bottom:60px;
|
||||
}
|
||||
#content #onlineListContainer {
|
||||
position:absolute;
|
||||
right:20px;
|
||||
top:85px;
|
||||
width:200px;
|
||||
bottom:150px;
|
||||
}
|
||||
#content #helpContainer {
|
||||
position:absolute;
|
||||
right:20px;
|
||||
top:85px;
|
||||
width:360px;
|
||||
bottom:150px;
|
||||
}
|
||||
#content #settingsContainer {
|
||||
position:absolute;
|
||||
right:20px;
|
||||
top:85px;
|
||||
width:360px;
|
||||
bottom:150px;
|
||||
}
|
||||
#content #bbCodeContainer {
|
||||
position:absolute;
|
||||
left:20px;
|
||||
bottom:20px;
|
||||
padding:3px;
|
||||
}
|
||||
#content #colorCodesContainer {
|
||||
position:absolute;
|
||||
left:20px;
|
||||
bottom:55px;
|
||||
padding:3px;
|
||||
z-index:1;
|
||||
}
|
||||
#content #emoticonsContainer {
|
||||
position:absolute;
|
||||
left:20px;
|
||||
bottom:57px;
|
||||
padding:3px;
|
||||
}
|
||||
#content #optionsContainer {
|
||||
position:absolute;
|
||||
right:20px;
|
||||
bottom:20px;
|
||||
padding:3px;
|
||||
padding-right:0px;
|
||||
}
|
||||
#content #bbCodeContainer input {
|
||||
padding-left:4px;
|
||||
padding-right:4px;
|
||||
}
|
||||
#content #colorCodesContainer a {
|
||||
display:block;
|
||||
float:left;
|
||||
width:20px;
|
||||
height:20px;
|
||||
}
|
||||
#content #optionsContainer input {
|
||||
vertical-align:middle;
|
||||
}
|
||||
#content #optionsContainer input.button {
|
||||
width:22px;
|
||||
height:22px;
|
||||
}
|
||||
#content #emoticonsContainer a {
|
||||
margin-left:1px;
|
||||
margin-right:1px;
|
||||
}
|
||||
#content #emoticonsContainer img {
|
||||
vertical-align:middle;
|
||||
margin-bottom:2px;
|
||||
}
|
||||
#content #headlineContainer h1 {
|
||||
margin-left:auto;
|
||||
margin-top:12px;
|
||||
}
|
||||
#content #chatList div {
|
||||
padding-left:10px;
|
||||
padding-top:2px;
|
||||
padding-right:10px;
|
||||
padding-bottom:2px;
|
||||
}
|
||||
#content #chatList img {
|
||||
vertical-align:middle;
|
||||
margin-bottom:2px;
|
||||
}
|
||||
#content #chatList cite {
|
||||
margin-right:5px;
|
||||
}
|
||||
#content #chatList .bbCodeImage {
|
||||
vertical-align:top;
|
||||
overflow:auto;
|
||||
margin:5px;
|
||||
}
|
||||
#content #chatList .delete {
|
||||
display:block;
|
||||
float:right;
|
||||
width:10px;
|
||||
height:10px;
|
||||
margin-top:2px;
|
||||
padding-left:5px;
|
||||
}
|
||||
#content #inputFieldContainer #inputField {
|
||||
width:100%;
|
||||
height:40px;
|
||||
}
|
||||
#content #onlineListContainer h3, #content #helpContainer h3, #content #settingsContainer h3 {
|
||||
height:30px;
|
||||
padding-left:10px;
|
||||
padding-top:4px;
|
||||
padding-right:10px;
|
||||
padding-bottom:4px;
|
||||
margin:0px;
|
||||
text-align:center;
|
||||
}
|
||||
#content #onlineListContainer #onlineList, #content #helpContainer #helpList, #content #settingsContainer #settingsList {
|
||||
position:absolute;
|
||||
left:0px;
|
||||
right:0px;
|
||||
top:25px;
|
||||
bottom:0px;
|
||||
overflow:auto;
|
||||
}
|
||||
#content #onlineListContainer #onlineList div {
|
||||
padding-left:10px;
|
||||
padding-top:2px;
|
||||
padding-right:10px;
|
||||
padding-bottom:2px;
|
||||
}
|
||||
#content #onlineListContainer #onlineList a {
|
||||
display:block;
|
||||
}
|
||||
#content #onlineListContainer #onlineList ul {
|
||||
margin-left:0px;
|
||||
margin-top:5px;
|
||||
margin-bottom:5px;
|
||||
padding-left:20px;
|
||||
}
|
||||
#content #helpContainer #helpList td, #content #settingsContainer #settingsList td {
|
||||
padding-left:10px;
|
||||
padding-top:4px;
|
||||
padding-right:10px;
|
||||
padding-bottom:4px;
|
||||
vertical-align:top;
|
||||
}
|
||||
#content #settingsContainer #settingsList td {
|
||||
vertical-align:middle;
|
||||
}
|
||||
#content #settingsContainer #settingsList td.setting {
|
||||
width:115px;
|
||||
}
|
||||
#content #settingsContainer #settingsList input.text {
|
||||
width:100px;
|
||||
}
|
||||
#content #settingsContainer #settingsList select.left {
|
||||
text-align:right;
|
||||
}
|
||||
#content #settingsContainer #settingsList input.button {
|
||||
width:22px;
|
||||
height:22px;
|
||||
vertical-align:middle;
|
||||
margin-bottom:2px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Misc
|
||||
*/
|
||||
|
||||
@media screen,projection,handheld {
|
||||
|
||||
#content #bbCodeContainer input, #content #optionsContainer input.button, #content #settingsContainer #settingsList input.button {
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
#content #optionsContainer #helpButton {
|
||||
background:url('../images/help.png') no-repeat;
|
||||
}
|
||||
#content #optionsContainer #settingsButton {
|
||||
background:url('../images/settings.png') no-repeat;
|
||||
}
|
||||
#content #optionsContainer #onlineListButton {
|
||||
background:url('../images/users.png') no-repeat;
|
||||
}
|
||||
#content #optionsContainer #audioButton {
|
||||
background:url('../images/audio.png') no-repeat 0px 0px;
|
||||
}
|
||||
#content #optionsContainer #audioButton.off {
|
||||
background-position: 0px 100%;
|
||||
}
|
||||
#content #optionsContainer #autoScrollButton {
|
||||
background:url('../images/autoscroll.png') no-repeat 0px 0px;
|
||||
}
|
||||
#content #optionsContainer #autoScrollButton.off {
|
||||
background-position: 0px 100%;
|
||||
}
|
||||
#content #settingsContainer #settingsList input.playback {
|
||||
background:url('../images/playback.png') no-repeat;
|
||||
}
|
||||
|
||||
/*
|
||||
* Print layout
|
||||
*/
|
||||
|
||||
@media print {
|
||||
|
||||
#content {
|
||||
position:static;
|
||||
}
|
||||
#content #copyright {
|
||||
display:none;
|
||||
}
|
||||
#content #headlineContainer {
|
||||
display:none;
|
||||
}
|
||||
#content #logoutChannelContainer {
|
||||
display:none;
|
||||
}
|
||||
#content #statusIconContainer {
|
||||
display:none;
|
||||
}
|
||||
#content #chatList {
|
||||
position:static;
|
||||
overflow:visible;
|
||||
}
|
||||
#content #inputFieldContainer {
|
||||
display:none;
|
||||
}
|
||||
#content #submitButtonContainer {
|
||||
display:none;
|
||||
}
|
||||
#content #onlineListContainer {
|
||||
display:none;
|
||||
}
|
||||
#content #helpContainer {
|
||||
display:none;
|
||||
}
|
||||
#content #settingsContainer {
|
||||
display:none;
|
||||
}
|
||||
#content #bbCodeContainer {
|
||||
display:none;
|
||||
}
|
||||
#content #colorCodesContainer {
|
||||
display:none;
|
||||
}
|
||||
#content #emoticonsContainer {
|
||||
display:none;
|
||||
}
|
||||
#content #optionsContainer {
|
||||
display:none;
|
||||
}
|
||||
#content #chatList div {
|
||||
padding-bottom:5px;
|
||||
}
|
||||
#content #chatList img {
|
||||
vertical-align:middle;
|
||||
margin-bottom:2px;
|
||||
}
|
||||
#content #chatList cite {
|
||||
margin-right:5px;
|
||||
}
|
||||
#content #chatList .delete {
|
||||
display:none;
|
||||
}
|
||||
|
||||
#content #chatList {
|
||||
border:none;
|
||||
}
|
||||
|
||||
#content {
|
||||
font-family:'times new roman', times, serif;
|
||||
font-size:1.0em;
|
||||
text-align:justify;
|
||||
}
|
||||
#content #chatList code {
|
||||
font-size:0.8em;
|
||||
}
|
||||
|
||||
#content #chatList .chatBotErrorMessage {
|
||||
color:red;
|
||||
}
|
||||
#content #chatList a {
|
||||
color:#1E90FF;
|
||||
}
|
||||
|
||||
}
|
451
public/chat/css/meta.modern.ajaxchat.css
Normal file
|
@ -0,0 +1,451 @@
|
|||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @author Philip Nicolcev
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
/* Import Username and Text colour CSS file */
|
||||
@import url('textcolours.ajaxchat.css');
|
||||
|
||||
/* Nigger Rig word-wrap fix */
|
||||
* {
|
||||
word-wrap: break-word !important;
|
||||
}
|
||||
|
||||
/* Positioning */
|
||||
#loginContent {
|
||||
position:absolute;
|
||||
width:100%;
|
||||
height:100%;
|
||||
}
|
||||
#loginContent #loginHeadlineContainer {
|
||||
margin: 100px 100px 0 100px;
|
||||
}
|
||||
#loginContent #loginFormContainer, #loginContent #errorContainer {
|
||||
margin: 0 100px;
|
||||
}
|
||||
#loginContent #loginFormContainer div {
|
||||
margin-bottom:7px;
|
||||
}
|
||||
#loginContent #loginRegisteredUsers {
|
||||
padding-top:5px;
|
||||
}
|
||||
#loginContent #copyright {
|
||||
margin: 20px 100px 0 100px;
|
||||
}
|
||||
#content {
|
||||
position:absolute;
|
||||
width:100%;
|
||||
height:100%;
|
||||
}
|
||||
#content #copyright {
|
||||
position:absolute;
|
||||
right:20px;
|
||||
top:20px;
|
||||
}
|
||||
#content #headlineContainer {
|
||||
position:absolute;
|
||||
left:20px;
|
||||
top:5px;
|
||||
}
|
||||
#content #logoutChannelContainer {
|
||||
position:absolute;
|
||||
left:20px;
|
||||
top:50px;
|
||||
}
|
||||
#content #logoutChannelContainer select{
|
||||
width: 105px;
|
||||
height: 22px;
|
||||
}
|
||||
#content #statusIconContainer {
|
||||
position:absolute;
|
||||
right:20px;
|
||||
top:50px;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
}
|
||||
#content #chatList {
|
||||
position:absolute;
|
||||
left:20px;
|
||||
right:230px;
|
||||
top:85px;
|
||||
bottom:150px;
|
||||
overflow:auto;
|
||||
}
|
||||
#content #inputFieldContainer {
|
||||
position:absolute;
|
||||
left:20px;
|
||||
right:20px;
|
||||
bottom:95px;
|
||||
padding-right:4px;
|
||||
}
|
||||
#content #submitButtonContainer {
|
||||
position:absolute;
|
||||
right:20px;
|
||||
bottom:60px;
|
||||
}
|
||||
#content #onlineListContainer {
|
||||
position:absolute;
|
||||
right:20px;
|
||||
top:85px;
|
||||
width:200px;
|
||||
bottom:150px;
|
||||
}
|
||||
#content #helpContainer {
|
||||
position:absolute;
|
||||
right:20px;
|
||||
top:85px;
|
||||
width:360px;
|
||||
bottom:150px;
|
||||
}
|
||||
#content #settingsContainer {
|
||||
position:absolute;
|
||||
right:20px;
|
||||
top:85px;
|
||||
width:360px;
|
||||
bottom:150px;
|
||||
}
|
||||
#content #bbCodeContainer {
|
||||
position:absolute;
|
||||
left:20px;
|
||||
bottom:20px;
|
||||
padding:3px;
|
||||
}
|
||||
#content #colorCodesContainer {
|
||||
position:absolute;
|
||||
left:20px;
|
||||
bottom:55px;
|
||||
padding:3px;
|
||||
z-index:1;
|
||||
}
|
||||
#content #emoticonsContainer {
|
||||
position:absolute;
|
||||
left:20px;
|
||||
bottom:57px;
|
||||
padding:3px;
|
||||
}
|
||||
#content #optionsContainer {
|
||||
position:absolute;
|
||||
right:20px;
|
||||
bottom:20px;
|
||||
padding:3px;
|
||||
padding-right:0px;
|
||||
}
|
||||
#content #bbCodeContainer input, #content #logoutButton, #content #mobileButton, #content #submitButton, #loginContent #loginButton {
|
||||
padding: 4px 10px;
|
||||
}
|
||||
#content #colorCodesContainer a {
|
||||
display:block;
|
||||
float:left;
|
||||
width:20px;
|
||||
height:20px;
|
||||
}
|
||||
#content #optionsContainer input {
|
||||
vertical-align:middle;
|
||||
}
|
||||
#content #optionsContainer input.button {
|
||||
width:22px;
|
||||
height:22px;
|
||||
}
|
||||
#content #emoticonsContainer a {
|
||||
margin-left:1px;
|
||||
margin-right:1px;
|
||||
}
|
||||
#content #emoticonsContainer img {
|
||||
vertical-align:middle;
|
||||
margin-bottom:2px;
|
||||
}
|
||||
#content #headlineContainer h1 {
|
||||
margin-left:auto;
|
||||
margin-top:12px;
|
||||
}
|
||||
#content #chatList div {
|
||||
padding: 2px 10px;
|
||||
}
|
||||
#content #chatList img {
|
||||
vertical-align:middle;
|
||||
margin-bottom:2px;
|
||||
}
|
||||
#content #chatList cite {
|
||||
margin-right:5px;
|
||||
}
|
||||
#content #chatList .bbCodeImage {
|
||||
vertical-align:top;
|
||||
overflow:auto;
|
||||
margin:5px;
|
||||
}
|
||||
#content #chatList .delete {
|
||||
display:block;
|
||||
float:right;
|
||||
width:10px;
|
||||
height:10px;
|
||||
margin-top:2px;
|
||||
padding-left:5px;
|
||||
background:url('../images/delete.png') no-repeat right;
|
||||
}
|
||||
#content #inputFieldContainer #inputField {
|
||||
width:100%;
|
||||
height:40px;
|
||||
}
|
||||
#content #onlineListContainer h3, #content #helpContainer h3, #content #settingsContainer h3 {
|
||||
height:30px;
|
||||
padding: 4px 10px;
|
||||
margin:0px;
|
||||
text-align:center;
|
||||
}
|
||||
#content #onlineListContainer #onlineList, #content #helpContainer #helpList, #content #settingsContainer #settingsList {
|
||||
position:absolute;
|
||||
left:0px;
|
||||
right:0px;
|
||||
top:25px;
|
||||
bottom:0px;
|
||||
overflow:auto;
|
||||
}
|
||||
#content #onlineListContainer #onlineList div {
|
||||
padding: 2px 10px;
|
||||
}
|
||||
#content #onlineListContainer #onlineList a {
|
||||
display:block;
|
||||
}
|
||||
#content #onlineListContainer #onlineList ul {
|
||||
margin: 5px 0;
|
||||
padding-left:20px;
|
||||
}
|
||||
#content #helpContainer #helpList td, #content #settingsContainer #settingsList td {
|
||||
padding: 4px 10px;
|
||||
vertical-align:top;
|
||||
}
|
||||
#content #settingsContainer #settingsList td {
|
||||
vertical-align:middle;
|
||||
}
|
||||
#content #settingsContainer #settingsList td.setting {
|
||||
width:115px;
|
||||
}
|
||||
#content #settingsContainer #settingsList input.text {
|
||||
width:100px;
|
||||
}
|
||||
#content #settingsContainer #settingsList select.left {
|
||||
text-align:right;
|
||||
}
|
||||
#content #settingsContainer #settingsList input.button {
|
||||
width:22px;
|
||||
height:22px;
|
||||
vertical-align:middle;
|
||||
margin-bottom:2px;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
#content #optionsContainer #helpButton {
|
||||
background:url('../images/help.png') no-repeat;
|
||||
}
|
||||
#content #optionsContainer #settingsButton {
|
||||
background:url('../images/settings.png') no-repeat;
|
||||
}
|
||||
#content #optionsContainer #onlineListButton {
|
||||
background:url('../images/users.png') no-repeat;
|
||||
}
|
||||
#content #optionsContainer #audioButton {
|
||||
background:url('../images/audio.png') no-repeat 0px 0px;
|
||||
}
|
||||
#content #optionsContainer #audioButton.off {
|
||||
background-position: 0px 100%;
|
||||
}
|
||||
#content #optionsContainer #autoScrollButton {
|
||||
background:url('../images/autoscroll.png') no-repeat 0px 0px;
|
||||
}
|
||||
#content #optionsContainer #autoScrollButton.off {
|
||||
background-position: 0px 100%;
|
||||
}
|
||||
#content #settingsContainer #settingsList input.playback {
|
||||
background:url('../images/playback.png') no-repeat;
|
||||
}
|
||||
|
||||
/* Borders */
|
||||
#content img {
|
||||
border:none;
|
||||
}
|
||||
#content #chatList, #content #onlineListContainer, #content #helpContainer, #content #settingsContainer, #content #colorCodesContainer,
|
||||
#content #colorCodesContainer a, #content textarea {
|
||||
border-width:1px;
|
||||
border-style:solid;
|
||||
}
|
||||
#content #chatList .deleteSelected {
|
||||
border-width:1px;
|
||||
border-style:dotted;
|
||||
}
|
||||
#content #helpContainer #helpList table, #content #settingsContainer #settingsList table {
|
||||
border-collapse:collapse;
|
||||
}
|
||||
|
||||
/* Misc */
|
||||
#content #bbCodeContainer input, #content #optionsContainer input.button, #content #settingsContainer #settingsList input.button, #content #logoutButton, #content #mobileButton, #content #submitButton, #loginContent #loginButton {
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
/* Fonts */
|
||||
#loginContent {
|
||||
font-family:Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size:0.8em;
|
||||
}
|
||||
#loginContent h1 {
|
||||
font-size:1.3em;
|
||||
font-family:"Trebuchet MS", Verdana, Arial, sans-serif;
|
||||
font-weight:bold;
|
||||
}
|
||||
#loginContent a {
|
||||
text-decoration:none;
|
||||
}
|
||||
#loginContent a:hover {
|
||||
text-decoration:underline;
|
||||
}
|
||||
#loginContent #loginRegisteredUsers {
|
||||
font-size:0.8em;
|
||||
}
|
||||
#loginContent #copyright {
|
||||
font-size:0.8em;
|
||||
}
|
||||
#content {
|
||||
font-family:Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size:0.8em;
|
||||
}
|
||||
#content h1 {
|
||||
font-size:1.3em;
|
||||
font-family:"Trebuchet MS", Verdana, Arial, sans-serif;
|
||||
font-weight:bold;
|
||||
}
|
||||
#content h3 {
|
||||
font-size:1.0em;
|
||||
}
|
||||
#content a {
|
||||
text-decoration:none;
|
||||
}
|
||||
#content a:hover {
|
||||
text-decoration:underline;
|
||||
}
|
||||
#content #copyright {
|
||||
font-size:0.8em;
|
||||
}
|
||||
#content #chatList span.dateTime {
|
||||
font-size:0.7em;
|
||||
}
|
||||
#content #chatList .chatBotMessage {
|
||||
font-style:italic;
|
||||
}
|
||||
#content #chatList .chatBotErrorMessage {
|
||||
font-style:italic;
|
||||
}
|
||||
#content #chatList .privmsg {
|
||||
font-style:italic;
|
||||
}
|
||||
#content #chatList .action {
|
||||
font-style:italic;
|
||||
}
|
||||
#content #chatList q {
|
||||
font-variant:small-caps;
|
||||
}
|
||||
#content #chatList code {
|
||||
font-size:1.2em;
|
||||
}
|
||||
#content #onlineListContainer #onlineList div {
|
||||
font-size:0.9em;
|
||||
}
|
||||
#content #helpContainer #helpList td {
|
||||
font-size:0.9em;
|
||||
}
|
||||
#content #helpContainer #helpList td.code {
|
||||
font-style:italic;
|
||||
}
|
||||
#content #settingsContainer #settingsList td {
|
||||
font-size:0.9em;
|
||||
}
|
||||
|
||||
/*
|
||||
* Print layout
|
||||
*/
|
||||
|
||||
@media print {
|
||||
|
||||
#content {
|
||||
position:static;
|
||||
}
|
||||
#content #copyright {
|
||||
display:none;
|
||||
}
|
||||
#content #headlineContainer {
|
||||
display:none;
|
||||
}
|
||||
#content #logoutChannelContainer {
|
||||
display:none;
|
||||
}
|
||||
#content #statusIconContainer {
|
||||
display:none;
|
||||
}
|
||||
#content #chatList {
|
||||
position:static;
|
||||
overflow:visible;
|
||||
}
|
||||
#content #inputFieldContainer {
|
||||
display:none;
|
||||
}
|
||||
#content #submitButtonContainer {
|
||||
display:none;
|
||||
}
|
||||
#content #onlineListContainer {
|
||||
display:none;
|
||||
}
|
||||
#content #helpContainer {
|
||||
display:none;
|
||||
}
|
||||
#content #settingsContainer {
|
||||
display:none;
|
||||
}
|
||||
#content #bbCodeContainer {
|
||||
display:none;
|
||||
}
|
||||
#content #colorCodesContainer {
|
||||
display:none;
|
||||
}
|
||||
#content #emoticonsContainer {
|
||||
display:none;
|
||||
}
|
||||
#content #optionsContainer {
|
||||
display:none;
|
||||
}
|
||||
#content #chatList div {
|
||||
padding-bottom:5px;
|
||||
}
|
||||
#content #chatList img {
|
||||
vertical-align:middle;
|
||||
margin-bottom:2px;
|
||||
}
|
||||
#content #chatList cite {
|
||||
margin-right:5px;
|
||||
}
|
||||
#content #chatList .delete {
|
||||
display:none;
|
||||
}
|
||||
|
||||
#content #chatList {
|
||||
border:none;
|
||||
}
|
||||
|
||||
#content {
|
||||
font-family:'times new roman', times, serif;
|
||||
font-size:1.0em;
|
||||
text-align:justify;
|
||||
}
|
||||
#content #chatList code {
|
||||
font-size:0.8em;
|
||||
}
|
||||
|
||||
#content #chatList .chatBotErrorMessage {
|
||||
color:red;
|
||||
}
|
||||
#content #chatList a {
|
||||
color:#1E90FF;
|
||||
}
|
||||
|
||||
}
|
115
public/chat/css/meta.terminal.ajaxchat.css
Normal file
|
@ -0,0 +1,115 @@
|
|||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license Modified MIT License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
|
||||
/* Nigger Rig word-wrap fix */
|
||||
* {
|
||||
word-wrap: break-word !important;
|
||||
}
|
||||
|
||||
/* Fonts */
|
||||
#loginContent {
|
||||
font-family:monospace;
|
||||
font-size:0.8em;
|
||||
}
|
||||
#loginContent h1 {
|
||||
font-size:1.3em;
|
||||
font-family:monospace;
|
||||
font-weight:bold;
|
||||
}
|
||||
#loginContent a {
|
||||
text-decoration:none;
|
||||
}
|
||||
#loginContent a:hover {
|
||||
text-decoration:underline;
|
||||
}
|
||||
#loginContent #loginRegisteredUsers {
|
||||
font-size:0.8em;
|
||||
}
|
||||
#loginContent #copyright {
|
||||
font-size:0.8em;
|
||||
}
|
||||
/*#content {
|
||||
font-family:Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size:0.8em;
|
||||
}
|
||||
#content h1 {
|
||||
font-size:1.3em;
|
||||
font-family:"Trebuchet MS", Verdana, Arial, sans-serif;
|
||||
font-weight:bold;
|
||||
}*/
|
||||
#content {
|
||||
font-family:monospace;
|
||||
font-size:14px;
|
||||
}
|
||||
#content h1 {
|
||||
font-size:14px;
|
||||
font-family:monospace;
|
||||
font-weight:bold;
|
||||
}
|
||||
#content h3 {
|
||||
font-size:1.0em;
|
||||
}
|
||||
#content a {
|
||||
text-decoration:none;
|
||||
}
|
||||
#content a:hover {
|
||||
text-decoration:underline;
|
||||
}
|
||||
#content #copyright {
|
||||
font-size:0.8em;
|
||||
}
|
||||
#content #chatList span.dateTime {
|
||||
font-size:0.7em;
|
||||
}
|
||||
#content #chatList span.guest {
|
||||
font-weight:bold;
|
||||
}
|
||||
#content #chatList span.user {
|
||||
font-weight:bold;
|
||||
}
|
||||
#content #chatList span.moderator {
|
||||
font-weight:bold;
|
||||
}
|
||||
#content #chatList span.admin {
|
||||
font-weight:bold;
|
||||
}
|
||||
#content #chatList span.chatBot {
|
||||
font-weight:bold;
|
||||
font-style:italic;
|
||||
}
|
||||
#content #chatList .chatBotMessage {
|
||||
font-style:italic;
|
||||
}
|
||||
#content #chatList .chatBotErrorMessage {
|
||||
font-style:italic;
|
||||
}
|
||||
#content #chatList .privmsg {
|
||||
font-style:italic;
|
||||
}
|
||||
#content #chatList .action {
|
||||
font-style:italic;
|
||||
}
|
||||
#content #chatList q {
|
||||
font-variant:small-caps;
|
||||
}
|
||||
#content #chatList code {
|
||||
font-size:1.2em;
|
||||
}
|
||||
#content #onlineListContainer #onlineList div {
|
||||
font-size:0.9em;
|
||||
}
|
||||
#content #helpContainer #helpList td {
|
||||
font-size:0.9em;
|
||||
}
|
||||
#content #helpContainer #helpList td.code {
|
||||
font-style:italic;
|
||||
}
|
||||
#content #settingsContainer #settingsList td {
|
||||
font-size:0.9em;
|
||||
}
|
851
public/chat/css/mio.css
Normal file
|
@ -0,0 +1,851 @@
|
|||
/*
|
||||
Flashii.net Style Codename "Mio"
|
||||
By Flashwave <http://flash.moe>
|
||||
*/
|
||||
|
||||
@charset "utf-8";
|
||||
|
||||
html {
|
||||
color: #000000;
|
||||
font: 12px/20px Georgia, "Times New Roman", Times, serif;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
background: linear-gradient(180deg, #C2AFFE, #FBEEFF) repeat-x scroll center top #FBEEFF;
|
||||
background-size: auto 200px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
img.logo {
|
||||
height: 150px;
|
||||
width: 450px;
|
||||
border: 0px;
|
||||
background: url('https://static.flash.moe/logos/logo.png') no-repeat scroll left top transparent;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
|
||||
.clear {
|
||||
clear: both !important;
|
||||
float: none !important;
|
||||
}
|
||||
.hidden {
|
||||
display: none !important;
|
||||
visibility: hidden !important;
|
||||
}
|
||||
|
||||
div.navbar a {
|
||||
color: #000000;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
div.navbar a:hover {
|
||||
color: #609;
|
||||
}
|
||||
|
||||
hr {
|
||||
color: #9475B2;
|
||||
background: #9475B2;
|
||||
height: 1px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
div.navbar ul {
|
||||
display: table;
|
||||
margin: 0px auto;
|
||||
clear: both;
|
||||
text-align: center;
|
||||
margin-top: 5px;
|
||||
border-top: 1px solid;
|
||||
min-width: 880px;
|
||||
max-width: 1024px;
|
||||
}
|
||||
|
||||
div.navbar li {
|
||||
float: left;
|
||||
display: block;
|
||||
text-align: center;
|
||||
margin-top: -1px;
|
||||
position: relative;
|
||||
left: 217.5px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
li.notcurrent {
|
||||
background: none repeat scroll 0% 0% #C9BBCC;
|
||||
border-width: 1px 1px 1px medium;
|
||||
border-style: solid solid solid none;
|
||||
border-color: inherit;
|
||||
border-image: none;
|
||||
padding: 2px 1em;
|
||||
}
|
||||
|
||||
li.current {
|
||||
background: none repeat scroll 0% 0% #FBEEFF;
|
||||
border-width: 1px 1px 1px 1px;
|
||||
border-style: solid solid solid solid;
|
||||
border-color: inherit;
|
||||
border-image: none;
|
||||
padding: 2px 1em;
|
||||
padding-bottom: 4px;
|
||||
margin-left:-1px;
|
||||
border-top: medium none;
|
||||
}
|
||||
|
||||
li.first {
|
||||
border-left: 1px solid;
|
||||
}
|
||||
|
||||
li.fill {
|
||||
border-top: 1px solid;
|
||||
padding-bottom: 4px;
|
||||
width: 100px !important;
|
||||
}
|
||||
|
||||
div.pagecontent, div.profile {
|
||||
margin: 0px auto;
|
||||
margin-top: 5px;
|
||||
min-width: 880px;
|
||||
max-width: 1024px;
|
||||
border: solid 1px #9475B2;
|
||||
background: #FBEEFF;
|
||||
}
|
||||
|
||||
div.profile {
|
||||
min-height: 246px;
|
||||
}
|
||||
|
||||
div.profile_cont {
|
||||
text-align: left;
|
||||
padding: 0px 20px;
|
||||
}
|
||||
|
||||
div.profile_cont hr {
|
||||
border: 0px solid #000;
|
||||
height: 1px;
|
||||
color: #000;
|
||||
background: #000;
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
div.mioboards, div.mioblog, div.miowhois {
|
||||
margin: 0px auto;
|
||||
margin-top: 5px;
|
||||
min-width: 660px;
|
||||
max-width: 924px;
|
||||
border: solid 1px #9475B2;
|
||||
}
|
||||
|
||||
div.miochatquote {
|
||||
margin: 0px auto;
|
||||
margin-top: 5px;
|
||||
border: solid 1px #9475B2;
|
||||
display: inline-block;
|
||||
}
|
||||
div.miochatquote .chatquote {
|
||||
text-align: left;
|
||||
color: #FFF;
|
||||
min-width: 500px;
|
||||
}
|
||||
div.miochatquote .chatquote div .dateTime {
|
||||
font-size: 9px;
|
||||
}
|
||||
div.miochatquote .chatquote div {
|
||||
padding: 1px 5px 1px 7px;
|
||||
}
|
||||
div.miochatquote .chatquote div:nth-child(odd) {
|
||||
background: #000;
|
||||
}
|
||||
div.miochatquote .chatquote div:nth-child(even) {
|
||||
background: #212121;
|
||||
}
|
||||
|
||||
div.miodonate {
|
||||
margin: 0px auto;
|
||||
margin-top: 5px;
|
||||
min-width: 660px;
|
||||
max-width: 924px;
|
||||
border: solid 1px #9475B2;
|
||||
}
|
||||
|
||||
div.miodonate h3 {
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
div.miodonate hr {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
div.miodonate h2 {
|
||||
margin: 0px;
|
||||
background: #9475B2;
|
||||
border: solid 1px #9475B2;
|
||||
text-align: right;
|
||||
float: right;
|
||||
border-bottom-left-radius: 12px;
|
||||
display: inline-block;
|
||||
margin-top: -1px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
div.miodonate ul {
|
||||
list-style: square outside none;
|
||||
}
|
||||
|
||||
div.miodonate li {
|
||||
list-style: none outside none;
|
||||
background: #9475B2;
|
||||
margin: 0px;
|
||||
width: 815px;
|
||||
margin: 8px;
|
||||
height: 20px;
|
||||
display: list-item;
|
||||
box-shadow: 0 0 10px grey;
|
||||
border-radius: 3px;
|
||||
font-size: 140%;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
div.mioucpbar {
|
||||
min-width: 880px;
|
||||
max-width: 1024px;
|
||||
}
|
||||
|
||||
div.miobottom{
|
||||
margin: 0px auto;
|
||||
overflow: auto;
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
div.miobinner {
|
||||
position: relative;
|
||||
left: -50%;
|
||||
float: right;
|
||||
clear: both;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h3.miotitle {
|
||||
background-color: #9475B2;
|
||||
color: #330066;
|
||||
margin-top: 0px;
|
||||
text-align: left;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
h2.miotitle {
|
||||
background-color: #9475B2;
|
||||
color: #330066;
|
||||
margin: 0px;
|
||||
text-align: center;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
h1.miotitle {
|
||||
color: #330066;
|
||||
margin: 0px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
body.miomessage {
|
||||
margin-top: 20%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
h1.miomessage {
|
||||
color: #440077;
|
||||
font-size: 36pt;
|
||||
}
|
||||
|
||||
.miosub {
|
||||
color: #330066;
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
div.mioboxcontent {
|
||||
text-align: left;
|
||||
margin: 0px;
|
||||
line-height: 130%;
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.mioboxcontent h4 {
|
||||
text-decoration: underline;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
div.mioboards div.mioboxcontent {
|
||||
padding: 0.25em 0.5em 0px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
div.miocolumn {
|
||||
float: left;
|
||||
width: 25%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
a.boardlink {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
a.boardlink:hover,a.boardlink:active {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
div.postcontent {
|
||||
text-align: left;
|
||||
padding: 0px 10px 0px 10px;
|
||||
}
|
||||
|
||||
h3.title {
|
||||
margin-top: 0px;
|
||||
background-color: #9475B2;
|
||||
text-align: left;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
h1.title{
|
||||
margin-top: 0px;
|
||||
background-color: #9475B2;
|
||||
text-align: left;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
ol,dl {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
dl {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
dt.q {
|
||||
font-weight: bold;
|
||||
color: #550088;
|
||||
}
|
||||
|
||||
dd.a {
|
||||
border-bottom: solid 1px #9475B2;
|
||||
padding-right: 10px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
span.permalink {
|
||||
float: right;
|
||||
}
|
||||
|
||||
span.permalink a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
span.permalink a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
input[type="text"],input[type="password"],input[type="date"],textarea {
|
||||
margin: 0px 2px 0px 0px;
|
||||
padding: 2px 4px 3px;
|
||||
border: 1px solid #AAA;
|
||||
outline: medium none;
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
select {
|
||||
padding: 1px 2px 2px;
|
||||
border: 1px solid #AAA;
|
||||
outline: medium none;
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
div.copyright{
|
||||
padding-top: 5px;
|
||||
font-size: 11px;
|
||||
line-height: 15px;
|
||||
}
|
||||
|
||||
div.copyright a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.prof_avatar{
|
||||
max-height: 200px;
|
||||
max-width: 200px;
|
||||
border: 1px solid #9475B2;
|
||||
}
|
||||
|
||||
div.prof_avatar_cont{
|
||||
text-align: right;
|
||||
float: right;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
clear: both;
|
||||
margin-top: -6px;
|
||||
margin-right: -11px;
|
||||
}
|
||||
|
||||
div.prof_options {
|
||||
font-size: 10px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
div.prof_options a, div.prof_options a:visited {
|
||||
color: #111;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
div.prof_options a:hover, div.prof_options a:active {
|
||||
color: #111;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
div.ucp_avatar_cont {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.windowbutton-container {
|
||||
float: right;
|
||||
margin-top: -2px;
|
||||
margin-right: -2px;
|
||||
margin-left: -2px;
|
||||
margin-bottom: -2px;
|
||||
}
|
||||
|
||||
.closebutton {
|
||||
cursor: pointer;
|
||||
height: 23px;
|
||||
width: 23px;
|
||||
border: 0px;
|
||||
background: url('https://static.flash.moe/images/window-sprite.png') no-repeat scroll 0px 0px transparent;
|
||||
}
|
||||
|
||||
.maxbutton {
|
||||
cursor: pointer;
|
||||
height: 23px;
|
||||
width: 23px;
|
||||
border: 0px;
|
||||
background: url('https://static.flash.moe/images/window-sprite.png') no-repeat scroll 0px -23px transparent;
|
||||
}
|
||||
|
||||
.minbutton {
|
||||
cursor: pointer;
|
||||
height: 23px;
|
||||
width: 23px;
|
||||
border: 0px;
|
||||
background: url('https://static.flash.moe/images/window-sprite.png') no-repeat scroll 0px -46px transparent;
|
||||
}
|
||||
|
||||
.donate-btn {
|
||||
cursor: pointer;
|
||||
height: 26px;
|
||||
width: 90px;
|
||||
border: 0px;
|
||||
background: url('https://static.flash.moe/images/donate-btn.png') no-repeat scroll 0px 0px transparent;
|
||||
}
|
||||
|
||||
div.topLeftBar {
|
||||
color: #000000;
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
background: #FBEEFF;
|
||||
padding: 1px 9px;
|
||||
border: 1px #9475B2 solid;
|
||||
border-top: 0px;
|
||||
border-left: 0px;
|
||||
box-shadow: 0 0 1.5em #808080;
|
||||
z-index: 997;
|
||||
}
|
||||
|
||||
div.topLeftBar a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
div.topLeftBar a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
div.manageReportsContainer {
|
||||
text-align: left;
|
||||
width: 800px;
|
||||
}
|
||||
|
||||
div.manageReportsContainer > fieldset {
|
||||
border: #9475B2 solid 1px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
div.manageReportsContainer > fieldset > legend {
|
||||
border: #9475B2 solid 1px;
|
||||
background: #9475B2;
|
||||
color: #306;
|
||||
padding: 1px 5px;
|
||||
}
|
||||
|
||||
div.manageReportsContainer > fieldset > span > .reportText {
|
||||
font-size: 10px;
|
||||
line-height: 130%;
|
||||
}
|
||||
|
||||
table.miotable {
|
||||
width:100%;
|
||||
}
|
||||
|
||||
table.miotablestandalone {
|
||||
margin: 0px auto;
|
||||
margin-top: 5px;
|
||||
min-width: 880px;
|
||||
max-width: 1024px;
|
||||
border: solid 1px #9475B2;
|
||||
}
|
||||
|
||||
.ucptable tr {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.ucptable td {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.ucptable input[type="text"],.ucptable input[type="date"] {
|
||||
width: 373px;
|
||||
}
|
||||
|
||||
.miotable tr.head {
|
||||
background:#9475B2;
|
||||
text-align:center;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
.miotable tr.ucpmenu td {
|
||||
width:25%;
|
||||
}
|
||||
|
||||
.miotable a {
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
.miotable a:hover {
|
||||
text-decoration:underline;
|
||||
}
|
||||
|
||||
.miotable tr.online a {
|
||||
color:green;
|
||||
}
|
||||
|
||||
.miotable tr.semionline a {
|
||||
color:orange;
|
||||
}
|
||||
|
||||
.miotable tr.offline a {
|
||||
color:red;
|
||||
}
|
||||
|
||||
.miotable td {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.miotable tr.online {
|
||||
color: green;
|
||||
background: rgba(0,45,0,0.9);}
|
||||
|
||||
.miotable tr.semionline {
|
||||
color: orange;
|
||||
background: rgba(51,24,0,0.9);
|
||||
}
|
||||
|
||||
.miotable tr.offline {
|
||||
color: red;
|
||||
background: rgba(51,0,0,0.9);
|
||||
}
|
||||
|
||||
.registerbutton, .loginbutton {
|
||||
display: block;
|
||||
background: #9475B2;
|
||||
color: #330066;
|
||||
padding: 10px;
|
||||
font-size: 20px;
|
||||
text-decoration: none;
|
||||
transition: text-shadow 0.2s;
|
||||
}
|
||||
|
||||
.registerbutton:hover, .loginbutton:hover {
|
||||
text-shadow: 0px 0px 8px #F1F1F1;
|
||||
}
|
||||
|
||||
/* Flashii Bar */
|
||||
div.flashii-bar .barAvatar {
|
||||
margin-bottom: -5px;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
div.flashii-bar {
|
||||
color: #000000;
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
background: #FBEEFF;
|
||||
padding: 1px 9px;
|
||||
/*border-radius: 0px 0px 0px 8px;*/
|
||||
border: 1px #9475B2 solid;
|
||||
border-top: 0px;
|
||||
border-right: 0px;
|
||||
/*box-shadow: 0 0 1px grey;*/
|
||||
box-shadow: 0 0 1.5em #808080;
|
||||
z-index: 997;
|
||||
}
|
||||
|
||||
div.flashii-black {
|
||||
background: rgba(0,0,0,0.5);
|
||||
position: fixed;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
z-index: 998;
|
||||
}
|
||||
|
||||
div.flashii-bar a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
div.flashii-bar a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
div.flashii-horizon {
|
||||
background-color: transparent;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: 30%;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
overflow: visible;
|
||||
visibility: visible;
|
||||
display: block;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
div#flashii-login,div#flashii-register {
|
||||
min-width: 333px;
|
||||
max-width: 462px;
|
||||
border: solid 1px #9475B2;
|
||||
z-index: 999;
|
||||
background: #FBEEFF;
|
||||
margin: 0px auto;
|
||||
}
|
||||
|
||||
div#flashii-login h3,div#flashii-register h3 {
|
||||
background-color: #9475B2;
|
||||
color: rgb(51,0,102);
|
||||
margin-top: 0px;
|
||||
text-align: left;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
div#flashii-login h3 a,div#flashii-register h3 a {
|
||||
float: right;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
div#flashii-login table,div#flashii-register table {
|
||||
margin: 0px auto;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div#flashii-login tr td:first-child,div#flashii-register tr td:first-child{
|
||||
background: #C9BBCC;
|
||||
border: 1px #746677 solid;
|
||||
color: #400070;
|
||||
font-weight: bold;
|
||||
padding: 0px 5px;
|
||||
font-size: 10pt;
|
||||
width: 35% !important;
|
||||
}
|
||||
|
||||
div#flashii-login table tr:last-child td, div#flashii-register table tr:last-child td{
|
||||
background: transparent !important;
|
||||
border: none !important;
|
||||
color: inherit !important;
|
||||
font-weight: normal !important;
|
||||
padding: 0 0 !important;
|
||||
font-size: inherit !important;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div#flashii-login #recaptcha_response_field,div#flashii-login input[type="text"],div#flashii-login input[type="password"],div#flashii-register #recaptcha_response_field,div#flashii-register input[type="text"],div#flashii-register input[type="password"] {
|
||||
margin: 0px 2px 0px 0px;
|
||||
padding: 2px 4px 3px;
|
||||
border: 1px solid #AAA;
|
||||
outline: medium none;
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-size: 10pt;
|
||||
width: 292px;
|
||||
}
|
||||
|
||||
#recaptcha_widget img {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div#recaptcha_image {
|
||||
margin: 0px 2px 0px 0px;
|
||||
border: 1px solid #AAA;
|
||||
outline: medium none;
|
||||
}
|
||||
|
||||
#recaptcha_response_field {
|
||||
margin-top: 4px !important;
|
||||
}
|
||||
|
||||
.recaptcha_custom_buttons {
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
|
||||
/* some more shit */
|
||||
.group-select {
|
||||
margin: 0px auto;
|
||||
text-align: center;
|
||||
min-width: 330px !important;
|
||||
max-width: 945px;
|
||||
}
|
||||
|
||||
.group-select a {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.group-select-user {
|
||||
background: #9475B2;
|
||||
float: left;
|
||||
margin: 10px;
|
||||
text-align: center;
|
||||
width: 275px;
|
||||
height: 175px;
|
||||
padding: 10px;
|
||||
transition: background 0.5s, box-shadow 0.2s;
|
||||
box-shadow: inset 0px 0px 1.5em #000;
|
||||
}
|
||||
|
||||
.group-select-user:hover {
|
||||
background: #8364A1;
|
||||
cursor: pointer;
|
||||
box-shadow: inset 0px 0px 2em #000;
|
||||
}
|
||||
|
||||
.group-select-user-avatar {
|
||||
min-height: 150px;
|
||||
min-width: 150px;
|
||||
margin: auto auto;
|
||||
}
|
||||
|
||||
.group-select-user-avatar img {
|
||||
max-height: 150px;
|
||||
max-width: 150px;
|
||||
border: 0px;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
|
||||
.membersPage {
|
||||
width: 100%;
|
||||
padding: 10px 0px;
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.membersPage a {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.membersPage .groupBox, .membersPage .userBox {
|
||||
background: #9475B2;
|
||||
margin: 10px;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
transition: background 0.5s, box-shadow 0.2s;
|
||||
}
|
||||
|
||||
.membersPage .groupBox {
|
||||
padding: 7px;
|
||||
font-size: 15px;
|
||||
min-width: 150px;
|
||||
box-shadow: inset 0px 0px 1em #000;
|
||||
}
|
||||
|
||||
.membersPage .userBox {
|
||||
padding: 10px;
|
||||
line-height: 330%;
|
||||
width: 200px;
|
||||
height: 230px;
|
||||
box-shadow: inset 0px 0px 1.5em #000;
|
||||
}
|
||||
|
||||
.membersPage .groupBox:hover, .membersPage .userBox:hover {
|
||||
background: #8364A1;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.membersPage .groupBox:hover {
|
||||
box-shadow: inset 0px 0px 1em #000;
|
||||
}
|
||||
|
||||
.membersPage .userBox:hover {
|
||||
box-shadow: inset 0px 0px 1.5em #000;
|
||||
}
|
||||
|
||||
.membersPage .userBox img {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
display: block;
|
||||
margin: 0px auto;
|
||||
}
|
||||
|
||||
.membersPage .userBox .userBoxUserName {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.news-post-time {
|
||||
text-align: right;
|
||||
font-size: .8em;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
.news-poster {
|
||||
float: right;
|
||||
text-align: right;
|
||||
margin-top: -3px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
.news-poster img {
|
||||
max-width: 120px;
|
||||
max-height: 120px;
|
||||
border: 1px solid #9475B2;
|
||||
}
|
||||
.news-poster h2 {
|
||||
line-height: 11px;
|
||||
margin: -5px 0px 0px;
|
||||
font-weight: 100;
|
||||
background: #9475B2;
|
||||
border-bottom-left-radius: 10px;
|
||||
font-size: 1.5em;
|
||||
padding: 5px !important;
|
||||
height: 15px;
|
||||
}
|
||||
.news-comments-container {
|
||||
margin: 5px auto 0px;
|
||||
}
|
439
public/chat/css/mobile.ajaxchat.css
Normal file
|
@ -0,0 +1,439 @@
|
|||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @author Philip Nicolcev
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
@import url('textcolours.ajaxchat.css');
|
||||
|
||||
/* Fonts */
|
||||
#loginContent {
|
||||
font-family:Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size:0.8em;
|
||||
}
|
||||
#loginContent h1 {
|
||||
font-size:1.3em;
|
||||
font-family:"Trebuchet MS", Verdana, Arial, sans-serif;
|
||||
font-weight:bold;
|
||||
}
|
||||
#loginContent a {
|
||||
text-decoration:none;
|
||||
}
|
||||
#loginContent a:hover {
|
||||
text-decoration:underline;
|
||||
}
|
||||
#loginContent #loginRegisteredUsers {
|
||||
font-size:0.8em;
|
||||
}
|
||||
#loginContent #copyright {
|
||||
font-size:0.8em;
|
||||
}
|
||||
#content {
|
||||
font-family:Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size:0.8em;
|
||||
}
|
||||
#content h1 {
|
||||
font-size:1.3em;
|
||||
font-family:"Trebuchet MS", Verdana, Arial, sans-serif;
|
||||
font-weight:bold;
|
||||
}
|
||||
#content h3 {
|
||||
font-size:1.0em;
|
||||
}
|
||||
#content a {
|
||||
text-decoration:none;
|
||||
}
|
||||
#content a:hover {
|
||||
text-decoration:underline;
|
||||
}
|
||||
#content #copyright {
|
||||
font-size:0.8em;
|
||||
}
|
||||
#content #chatList span.dateTime {
|
||||
font-size:0.7em;
|
||||
}
|
||||
#content #chatList .chatBotMessage {
|
||||
font-style:italic;
|
||||
}
|
||||
#content #chatList .chatBotErrorMessage {
|
||||
font-style:italic;
|
||||
}
|
||||
#content #chatList .privmsg {
|
||||
font-style:italic;
|
||||
}
|
||||
#content #chatList .action {
|
||||
font-style:italic;
|
||||
}
|
||||
#content #chatList q {
|
||||
font-variant:small-caps;
|
||||
}
|
||||
#content #chatList code {
|
||||
font-size:1.2em;
|
||||
}
|
||||
#content #onlineListContainer #onlineList div {
|
||||
font-size:0.9em;
|
||||
}
|
||||
#content #helpContainer #helpList td {
|
||||
font-size:0.9em;
|
||||
}
|
||||
#content #helpContainer #helpList td.code {
|
||||
font-style:italic;
|
||||
}
|
||||
#content #settingsContainer #settingsList td {
|
||||
font-size:0.9em;
|
||||
}
|
||||
/* Positioning */
|
||||
#loginContent {
|
||||
position:absolute;
|
||||
width:100%;
|
||||
height:100%;
|
||||
}
|
||||
#loginContent #loginHeadlineContainer {
|
||||
margin: 100px 100px 0 100px;
|
||||
}
|
||||
#loginContent #loginFormContainer, #loginContent #errorContainer {
|
||||
margin: 0 100px;
|
||||
}
|
||||
#loginContent #loginFormContainer div {
|
||||
margin-bottom:7px;
|
||||
}
|
||||
#loginContent #loginRegisteredUsers {
|
||||
padding-top:5px;
|
||||
}
|
||||
#loginContent #copyright {
|
||||
margin: 20px 100px 0 100px;
|
||||
}
|
||||
#content {
|
||||
position:absolute;
|
||||
width:100%;
|
||||
height:100%;
|
||||
}
|
||||
#content #copyright {
|
||||
position:absolute;
|
||||
right:10px;
|
||||
top:10px;
|
||||
}
|
||||
#content #headlineContainer {
|
||||
position:absolute;
|
||||
left:10px;
|
||||
top:3px;
|
||||
}
|
||||
#content #logoutChannelContainer {
|
||||
position:absolute;
|
||||
left:10px;
|
||||
top:50px;
|
||||
}
|
||||
#content #logoutChannelContainer select{
|
||||
width: 105px;
|
||||
height: 22px;
|
||||
}
|
||||
#content #statusIconContainer {
|
||||
position:absolute;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
}
|
||||
#content #chatList {
|
||||
position:absolute;
|
||||
left:10px;
|
||||
right:10px;
|
||||
top:40px;
|
||||
bottom:70px;
|
||||
overflow:auto;
|
||||
}
|
||||
#content #inputFieldContainer {
|
||||
position:absolute;
|
||||
left:10px;
|
||||
right:10px;
|
||||
bottom:42px;
|
||||
padding-right:4px;
|
||||
}
|
||||
#content #submitButtonContainer {
|
||||
position:absolute;
|
||||
right:10px;
|
||||
bottom:38px;
|
||||
padding:3px;
|
||||
}
|
||||
#content #onlineListContainer {
|
||||
position:absolute;
|
||||
left:10px;
|
||||
right:10px;
|
||||
top:40px;
|
||||
bottom:70px;
|
||||
}
|
||||
#content #helpContainer {
|
||||
position:absolute;
|
||||
right:10px;
|
||||
top:85px;
|
||||
width:360px;
|
||||
bottom:150px;
|
||||
}
|
||||
#content #settingsContainer {
|
||||
position:absolute;
|
||||
left:10px;
|
||||
right:10px;
|
||||
top:40px;
|
||||
bottom:70px;
|
||||
}
|
||||
#content #bbCodeContainer {
|
||||
position:absolute;
|
||||
left:10px;
|
||||
bottom:10px;
|
||||
padding:3px;
|
||||
}
|
||||
#content #colorCodesContainer {
|
||||
position:absolute;
|
||||
left:10px;
|
||||
bottom:37px;
|
||||
padding:3px;
|
||||
z-index:1;
|
||||
}
|
||||
#content #emoticonsContainer {
|
||||
position:absolute;
|
||||
left:10px;
|
||||
bottom:57px;
|
||||
padding:3px;
|
||||
}
|
||||
#content #optionsContainer {
|
||||
position:absolute;
|
||||
right:10px;
|
||||
top:5px;
|
||||
padding:3px;
|
||||
margin-left:auto;
|
||||
margin-top:2px;
|
||||
}
|
||||
#content #bbCodeContainer input, #content #logoutButton, #content #submitButton, #loginContent #loginButton {
|
||||
padding: 1px 2px;
|
||||
}
|
||||
#content #colorCodesContainer a {
|
||||
display:block;
|
||||
float:left;
|
||||
width:20px;
|
||||
height:20px;
|
||||
}
|
||||
#content #optionsContainer input {
|
||||
vertical-align:middle;
|
||||
}
|
||||
#content #optionsContainer input.button {
|
||||
width:22px;
|
||||
height:22px;
|
||||
}
|
||||
#content #emoticonsContainer a {
|
||||
margin-left:1px;
|
||||
margin-right:1px;
|
||||
}
|
||||
#content #emoticonsContainer img {
|
||||
vertical-align:middle;
|
||||
margin-bottom:2px;
|
||||
}
|
||||
#content #headlineContainer h1 {
|
||||
margin-left:auto;
|
||||
margin-top:6px;
|
||||
}
|
||||
#content #chatList div {
|
||||
padding: 2px 10px;
|
||||
}
|
||||
#content #chatList img {
|
||||
vertical-align:middle;
|
||||
margin-bottom:2px;
|
||||
}
|
||||
#content #chatList cite {
|
||||
margin-right:5px;
|
||||
}
|
||||
#content #chatList .bbCodeImage {
|
||||
vertical-align:top;
|
||||
overflow:auto;
|
||||
margin:5px;
|
||||
}
|
||||
#content #chatList .delete {
|
||||
display:block;
|
||||
float:right;
|
||||
width:10px;
|
||||
height:10px;
|
||||
margin-top:2px;
|
||||
padding-left:5px;
|
||||
background:url('../images/delete.png') no-repeat right;
|
||||
}
|
||||
#content #inputFieldContainer #inputField {
|
||||
width:100%;
|
||||
height:18px;
|
||||
}
|
||||
#content #onlineListContainer h3, #content #helpContainer h3, #content #settingsContainer h3 {
|
||||
height:30px;
|
||||
padding: 4px 10px;
|
||||
margin:0px;
|
||||
text-align:center;
|
||||
}
|
||||
#content #onlineListContainer #onlineList, #content #helpContainer #helpList, #content #settingsContainer #settingsList {
|
||||
position:absolute;
|
||||
left:0px;
|
||||
top:25px;
|
||||
right:0px;
|
||||
bottom:0px;
|
||||
overflow:auto;
|
||||
}
|
||||
#content #onlineListContainer #onlineList div {
|
||||
padding: 2px 10px;
|
||||
}
|
||||
#content #onlineListContainer #onlineList a {
|
||||
display:block;
|
||||
}
|
||||
#content #onlineListContainer #onlineList ul {
|
||||
margin: 5px 0;
|
||||
padding-left:10px;
|
||||
}
|
||||
#content #helpContainer #helpList td, #content #settingsContainer #settingsList td {
|
||||
vertical-align:top;
|
||||
}
|
||||
#content #settingsContainer #settingsList td {
|
||||
vertical-align:middle;
|
||||
}
|
||||
#content #settingsContainer #settingsList td.setting {
|
||||
}
|
||||
#content #settingsContainer #settingsList input.text {
|
||||
width:100px;
|
||||
}
|
||||
#content #settingsContainer #settingsList select.left {
|
||||
text-align:right;
|
||||
}
|
||||
#content #settingsContainer #settingsList input.button {
|
||||
height:22px;
|
||||
vertical-align:middle;
|
||||
margin-bottom:2px;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
#content #optionsContainer #helpButton {
|
||||
background:url('../images/help.png') no-repeat;
|
||||
}
|
||||
#content #optionsContainer #settingsButton {
|
||||
background:url('../images/settings.png') no-repeat;
|
||||
}
|
||||
#content #optionsContainer #onlineListButton {
|
||||
background:url('../images/users.png') no-repeat;
|
||||
}
|
||||
#content #optionsContainer #audioButton {
|
||||
background:url('../images/audio.png') no-repeat;
|
||||
}
|
||||
#content #optionsContainer #audioButton.off {
|
||||
background:url('../images/audio-off.png') no-repeat;
|
||||
}
|
||||
#content #optionsContainer #autoScrollButton {
|
||||
background:url('../images/autoscroll.png') no-repeat;
|
||||
}
|
||||
#content #optionsContainer #autoScrollButton.off {
|
||||
background:url('../images/autoscroll-off.png') no-repeat;
|
||||
}
|
||||
|
||||
/* Borders */
|
||||
#content img {
|
||||
border:none;
|
||||
}
|
||||
#content #chatList, #content #onlineListContainer, #content #helpContainer, #content #settingsContainer, #content #colorCodesContainer,
|
||||
#content #colorCodesContainer a, #content textarea {
|
||||
border-width:1px;
|
||||
border-style:solid;
|
||||
}
|
||||
#content #chatList .deleteSelected {
|
||||
border-width:1px;
|
||||
border-style:dotted;
|
||||
}
|
||||
#content #helpContainer #helpList table, #content #settingsContainer #settingsList table {
|
||||
border-collapse:collapse;
|
||||
}
|
||||
|
||||
/* Misc */
|
||||
#content #bbCodeContainer input, #content #optionsContainer input.button, #content #settingsContainer #settingsList input.button, #content #logoutButton, #content #submitButton, #loginContent #loginButton {
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
@media screen,projection,handheld {
|
||||
|
||||
/* Buttons */
|
||||
#content #bbCodeContainer input, #content #logoutButton, #content #submitButton, #loginForm #loginButton {
|
||||
background-color:#000;
|
||||
color:#f0f0f0;
|
||||
border: 1px solid #808080;
|
||||
background-image: linear-gradient(to bottom, #222, #000);
|
||||
background-image: -webkit-linear-gradient(top, #222, #000);
|
||||
}
|
||||
#content select, #loginForm select, #loginForm input, #content textarea {
|
||||
background-color:#000;
|
||||
color:#fafafa;
|
||||
border: 1px solid #808080;
|
||||
}
|
||||
|
||||
/* Status Icon */
|
||||
#content #statusIconContainer {
|
||||
background-image: url('../images/loading-sprite.png');
|
||||
}
|
||||
#content .statusContainerOff {
|
||||
background-position: 0px 0px;
|
||||
}
|
||||
#content .statusContainerOn {
|
||||
background-position: 0px -22px;
|
||||
}
|
||||
#content .statusContainerAlert {
|
||||
background-position: 0px -44px;
|
||||
}
|
||||
|
||||
/* Other Theme Elements */
|
||||
#loginContent {
|
||||
background-color:#000;
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent h1 {
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent a {
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent input, #loginContent select {
|
||||
background-color:#212121;
|
||||
color:#FFF;
|
||||
}
|
||||
#loginContent #errorContainer {
|
||||
color:red;
|
||||
}
|
||||
#content {
|
||||
background-color:#000;
|
||||
color:#FFF;
|
||||
}
|
||||
#content h1 {
|
||||
color:#FFF;
|
||||
}
|
||||
#content a {
|
||||
color:#FFF;
|
||||
}
|
||||
#content #chatList, #content #onlineListContainer, #content #helpContainer, #content #settingsContainer, #content #colorCodesContainer, #content textarea {
|
||||
border-color:gray;
|
||||
background-color:#000;
|
||||
}
|
||||
#content #colorCodesContainer a {
|
||||
border-color:black;
|
||||
}
|
||||
#content #optionsContainer input {
|
||||
background-color:transparent;
|
||||
}
|
||||
#content .rowEven {
|
||||
background-color:#212121;
|
||||
}
|
||||
#content .rowOdd {
|
||||
background-color:#000;
|
||||
}
|
||||
#content #chatList .chatBotErrorMessage {
|
||||
color:red;
|
||||
}
|
||||
#content #chatList a {
|
||||
color:#1E90FF;
|
||||
}
|
||||
#content #chatList .deleteSelected {
|
||||
border-color:red;
|
||||
}
|
||||
#content #onlineListContainer h3, #content #helpContainer h3, #content #settingsContainer h3 {
|
||||
background-color:#212121;
|
||||
color:#FFF;
|
||||
}
|
||||
}
|
410
public/chat/css/mobiledev.ajaxchat.css
Normal file
|
@ -0,0 +1,410 @@
|
|||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @author Philip Nicolcev
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
@import url('textcolours.ajaxchat.css');
|
||||
|
||||
/* Fonts */
|
||||
#content, #loginContent {
|
||||
font-family: "Segoe UI", sans-serif;
|
||||
}
|
||||
|
||||
#loginContent {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
#loginContent h1 {
|
||||
font-size: 1.3em;
|
||||
font-family: "Trebuchet MS", Verdana, Arial, sans-serif;
|
||||
font-weight: bold;
|
||||
}
|
||||
#loginContent a {
|
||||
text-decoration: none;
|
||||
}
|
||||
#loginContent a: hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
#loginContent #loginRegisteredUsers {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
#loginContent #copyright {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
#content {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
#content h1 {
|
||||
font-size: 1.3em;
|
||||
font-weight: bold;
|
||||
}
|
||||
#content h3 {
|
||||
font-size: 1.0em;
|
||||
}
|
||||
#content a {
|
||||
text-decoration: none;
|
||||
}
|
||||
#content a: hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
#content #copyright {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
#content #chatList span.dateTime {
|
||||
font-size: 0.7em;
|
||||
}
|
||||
#content #chatList .chatBotMessage {
|
||||
font-style: italic;
|
||||
}
|
||||
#content #chatList .chatBotErrorMessage {
|
||||
font-style: italic;
|
||||
}
|
||||
#content #chatList .privmsg {
|
||||
font-style: italic;
|
||||
}
|
||||
#content #chatList .action {
|
||||
font-style: italic;
|
||||
}
|
||||
#content #chatList q {
|
||||
font-variant: small-caps;
|
||||
}
|
||||
#content #chatList code {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
#content #onlineListContainer #onlineList div {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
#content #helpContainer #helpList td {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
#content #helpContainer #helpList td.code {
|
||||
font-style: italic;
|
||||
}
|
||||
#content #settingsContainer #settingsList td {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
/* Positioning */
|
||||
#loginContent {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
#loginContent #loginHeadlineContainer {
|
||||
margin: 100px 100px 0 100px;
|
||||
}
|
||||
#loginContent #loginFormContainer, #loginContent #errorContainer {
|
||||
margin: 0 100px;
|
||||
}
|
||||
#loginContent #loginFormContainer div {
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
#loginContent #loginRegisteredUsers {
|
||||
padding-top: 5px;
|
||||
}
|
||||
#loginContent #copyright {
|
||||
margin: 20px 100px 0 100px;
|
||||
}
|
||||
#content {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
#content #copyright {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
}
|
||||
#content #headlineContainer {
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
top: 3px;
|
||||
}
|
||||
#content #logoutChannelContainer {
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
top: 50px;
|
||||
}
|
||||
#content #logoutChannelContainer select{
|
||||
width: 105px;
|
||||
height: 22px;
|
||||
}
|
||||
#content #chatList {
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
top: 40px;
|
||||
bottom: 70px;
|
||||
overflow: auto;
|
||||
}
|
||||
#content #onlineListContainer, #content #settingsContainer {
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
right: 10px;
|
||||
top: 40px;
|
||||
bottom: 70px;
|
||||
}
|
||||
#content #bbCodeContainer {
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
bottom: 10px;
|
||||
padding: 3px;
|
||||
display: block;
|
||||
}
|
||||
#content #colorCodesContainer {
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
bottom: 37px;
|
||||
padding: 3px;
|
||||
z-index: 1;
|
||||
}
|
||||
#content #emoticonsContainer {
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
bottom: 57px;
|
||||
padding: 3px;
|
||||
}
|
||||
#content #optionsContainer {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 5px;
|
||||
padding: 3px;
|
||||
margin-left: auto;
|
||||
margin-top: 2px;
|
||||
}
|
||||
#content #bbCodeContainer input, #content .actionButton, #loginContent #loginButton {
|
||||
padding: 1px 2px;
|
||||
}
|
||||
#content #colorCodesContainer a {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
#content #optionsContainer input {
|
||||
vertical-align: middle;
|
||||
}
|
||||
#content #optionsContainer input.button {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
}
|
||||
#content #emoticonsContainer a {
|
||||
margin-left: 1px;
|
||||
margin-right: 1px;
|
||||
}
|
||||
#content #emoticonsContainer img {
|
||||
vertical-align: middle;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
#content #headlineContainer h1 {
|
||||
margin-left: auto;
|
||||
margin-top: 6px;
|
||||
}
|
||||
#content #chatList div {
|
||||
padding: 3px 10px;
|
||||
}
|
||||
#content #chatList img {
|
||||
vertical-align: middle;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
#content #chatList cite {
|
||||
margin-right: 5px;
|
||||
}
|
||||
#content #chatList .bbCodeImage {
|
||||
vertical-align: top;
|
||||
overflow: auto;
|
||||
margin: 5px;
|
||||
}
|
||||
#content #chatList .delete {
|
||||
display: block;
|
||||
float: right;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
margin-top: 2px;
|
||||
padding-left: 5px;
|
||||
background: url('../images/delete.png') no-repeat right;
|
||||
}
|
||||
#content #inputField {
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
width: calc(100% - 53px);
|
||||
height: 40px;
|
||||
display: inline-block;
|
||||
margin: 0px !important;
|
||||
}
|
||||
#content #submitButton {
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
right: 0px;
|
||||
width: 50px;
|
||||
height: 41px;
|
||||
margin: 0px !important;
|
||||
}
|
||||
#content #onlineListContainer h3, #content #helpContainer h3, #content #settingsContainer h3 {
|
||||
height: 30px;
|
||||
padding: 4px 10px;
|
||||
margin: 0px;
|
||||
text-align: center;
|
||||
}
|
||||
#content #onlineListContainer #onlineList, #content #helpContainer #helpList, #content #settingsContainer #settingsList {
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 25px;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
overflow: auto;
|
||||
}
|
||||
#content #onlineListContainer #onlineList div {
|
||||
padding: 2px 10px;
|
||||
}
|
||||
#content #onlineListContainer #onlineList a {
|
||||
display: block;
|
||||
}
|
||||
#content #onlineListContainer #onlineList ul {
|
||||
margin: 5px 0;
|
||||
padding-left: 10px;
|
||||
}
|
||||
#content #helpContainer #helpList td, #content #settingsContainer #settingsList td {
|
||||
vertical-align: top;
|
||||
}
|
||||
#content #settingsContainer #settingsList td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
#content #settingsContainer #settingsList td.setting {
|
||||
}
|
||||
#content #settingsContainer #settingsList input.text {
|
||||
width: 100px;
|
||||
}
|
||||
#content #settingsContainer #settingsList select.left {
|
||||
text-align: right;
|
||||
}
|
||||
#content #settingsContainer #settingsList input.button {
|
||||
height: 22px;
|
||||
vertical-align: middle;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
#content #optionsContainer #settingsButton {
|
||||
background: url('../images/settings.png') no-repeat;
|
||||
}
|
||||
#content #optionsContainer #onlineListButton {
|
||||
background: url('../images/users.png') no-repeat;
|
||||
}
|
||||
#content #optionsContainer #audioButton {
|
||||
background: url('../images/audio.png') no-repeat 0px 0px;
|
||||
}
|
||||
#content #optionsContainer #audioButton.off {
|
||||
background-position: 0px 100%;
|
||||
}
|
||||
#content #optionsContainer #autoScrollButton {
|
||||
background: url('../images/autoscroll.png') no-repeat;
|
||||
}
|
||||
#content #optionsContainer #autoScrollButton.off {
|
||||
background: url('../images/autoscroll-off.png') no-repeat;
|
||||
}
|
||||
|
||||
/* Borders */
|
||||
#content img {
|
||||
border: none;
|
||||
}
|
||||
#content #chatList .deleteSelected {
|
||||
border-width: 1px;
|
||||
border-style: dotted;
|
||||
}
|
||||
#content #helpContainer #helpList table, #content #settingsContainer #settingsList table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
/* Misc */
|
||||
#content #bbCodeContainer input, #content #optionsContainer input.button, #content #settingsContainer #settingsList input.button, #content .actionButton, #loginContent #loginButton {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
#content #bbCodeContainer input, #content .actionButton, #loginForm #loginButton {
|
||||
background-color: #000;
|
||||
color: #f0f0f0;
|
||||
border: 1px solid #808080;
|
||||
background-image: linear-gradient(to bottom, #222, #000);
|
||||
}
|
||||
#content select, #loginForm select, #loginForm input, #content textarea {
|
||||
background-color: #000;
|
||||
color: #fafafa;
|
||||
border: 1px solid #808080;
|
||||
}
|
||||
|
||||
/* Status Icon */
|
||||
#content #statusIconContainer {
|
||||
height: 1px;
|
||||
}
|
||||
#content .statusContainerOff {
|
||||
background: #2F2;
|
||||
}
|
||||
#content .statusContainerOn {
|
||||
background: #FF2;
|
||||
}
|
||||
#content .statusContainerAlert {
|
||||
background: #F22;
|
||||
}
|
||||
|
||||
/* Other Theme Elements */
|
||||
#loginContent {
|
||||
background-color: #000;
|
||||
color: #FFF;
|
||||
}
|
||||
#loginContent h1 {
|
||||
color: #FFF;
|
||||
}
|
||||
#loginContent a {
|
||||
color: #FFF;
|
||||
}
|
||||
#loginContent input, #loginContent select {
|
||||
background-color: #212121;
|
||||
color: #FFF;
|
||||
}
|
||||
#loginContent #errorContainer {
|
||||
color: red;
|
||||
}
|
||||
#content {
|
||||
background-color: #000;
|
||||
color: #FFF;
|
||||
}
|
||||
#content h1 {
|
||||
color: #FFF;
|
||||
}
|
||||
#content a {
|
||||
color: #FFF;
|
||||
}
|
||||
#content #chatList, #content #onlineListContainer, #content #helpContainer, #content #settingsContainer, #content #colorCodesContainer, #content textarea {
|
||||
background-color: #444;
|
||||
}
|
||||
#content #colorCodesContainer a {
|
||||
border-color: black;
|
||||
}
|
||||
#content #optionsContainer input {
|
||||
background-color: transparent;
|
||||
}
|
||||
#content .rowEven {
|
||||
background-color: #212121;
|
||||
}
|
||||
#content .rowOdd {
|
||||
background-color: #000;
|
||||
}
|
||||
#content #chatList .chatBotErrorMessage {
|
||||
color: red;
|
||||
}
|
||||
#content #chatList a {
|
||||
color: #1E90FF;
|
||||
}
|
||||
#content #chatList .deleteSelected {
|
||||
border-color: red;
|
||||
}
|
||||
#content #onlineListContainer h3, #content #helpContainer h3, #content #settingsContainer h3 {
|
||||
background-color: #212121;
|
||||
color: #FFF;
|
||||
}
|
219
public/chat/css/textcolours.ajaxchat.css
Normal file
|
@ -0,0 +1,219 @@
|
|||
/* Color Container */
|
||||
a.Silver {
|
||||
background-color: #C0C0C0;
|
||||
}
|
||||
a.Citrine {
|
||||
background-color: #F2D839;
|
||||
}
|
||||
a.Orange {
|
||||
background-color: #FFA500;
|
||||
}
|
||||
a.Pumpkin {
|
||||
background-color: #FF7518;
|
||||
}
|
||||
a.Red {
|
||||
background-color: #F50000;
|
||||
}
|
||||
a.Crimson {
|
||||
background-color: #C00000;
|
||||
}
|
||||
a.Ruby {
|
||||
background-color: #E0115F;
|
||||
}
|
||||
a.Amaranth {
|
||||
background-color: #E52B50;
|
||||
}
|
||||
a.Thulite {
|
||||
background-color: #DE6FA1;
|
||||
}
|
||||
a.Pink {
|
||||
background-color: #FF6FF2;
|
||||
}
|
||||
a.Purpureus {
|
||||
background-color: #9A4EAE;
|
||||
}
|
||||
a.Antisia {
|
||||
background-color: #915C83;
|
||||
}
|
||||
a.Cerulean {
|
||||
background-color: #007BA7;
|
||||
}
|
||||
a.Cobalt {
|
||||
background-color: #0047AB;
|
||||
}
|
||||
a.Aqua {
|
||||
background-color: #20E4FF;
|
||||
}
|
||||
a.Mint {
|
||||
background-color: #39F2B1;
|
||||
}
|
||||
a.Keppel {
|
||||
background-color: #3AB09E;
|
||||
}
|
||||
a.Teal {
|
||||
background-color: #008585;
|
||||
}
|
||||
a.Green {
|
||||
background-color: #008500;
|
||||
}
|
||||
a.Chartreuse {
|
||||
background-color: #7FFF00;
|
||||
}
|
||||
a.Nitrate {
|
||||
background-color: #95CC00;
|
||||
}
|
||||
a.Lilive {
|
||||
background-color: #C0C000;
|
||||
}
|
||||
a.Daive {
|
||||
background-color: #858500;
|
||||
}
|
||||
a.Zaffre {
|
||||
background-color: #0014A8;
|
||||
}
|
||||
a.Amethyst {
|
||||
background-color: #9966CC;
|
||||
}
|
||||
|
||||
/* Text Color */
|
||||
#content .Silver {
|
||||
color: #C0C0C0;
|
||||
}
|
||||
#content .Citrine {
|
||||
color: #F2D839;
|
||||
}
|
||||
#content .Orange {
|
||||
color: #FFA500;
|
||||
}
|
||||
#content .Pumpkin {
|
||||
color: #FF7518;
|
||||
}
|
||||
#content .Red {
|
||||
color: #F50000;
|
||||
}
|
||||
#content .Crimson {
|
||||
color: #C00000;
|
||||
}
|
||||
#content .Ruby {
|
||||
color: #E0115F;
|
||||
}
|
||||
#content .Amaranth {
|
||||
color: #E52B50;
|
||||
}
|
||||
#content .Irresistible {
|
||||
color: #B3446C;
|
||||
}
|
||||
#content .Thulite {
|
||||
color: #DE6FA1;
|
||||
}
|
||||
#content .Pink {
|
||||
color: #FF6FF2;
|
||||
}
|
||||
#content .Purpureus {
|
||||
color: #9A4EAE;
|
||||
}
|
||||
#content .Antisia {
|
||||
color: #915C83;
|
||||
}
|
||||
#content .Cerulean {
|
||||
color: #007BA7;
|
||||
}
|
||||
#content .Cobalt {
|
||||
color: #0047AB;
|
||||
}
|
||||
#content .Aqua {
|
||||
color: #20E4FF;
|
||||
}
|
||||
#content .Turquoise {
|
||||
color: #40E0D0;
|
||||
}
|
||||
#content .Mint {
|
||||
color: #39F2B1;
|
||||
}
|
||||
#content .Keppel {
|
||||
color: #3AB09E;
|
||||
}
|
||||
#content .Teal {
|
||||
color: #008585;
|
||||
}
|
||||
#content .Green {
|
||||
color: #008500;
|
||||
}
|
||||
#content .Lime {
|
||||
color: #BFFF00;
|
||||
}
|
||||
#content .Chartreuse {
|
||||
color: #7FFF00;
|
||||
}
|
||||
#content .Nitrate {
|
||||
color: #95CC00;
|
||||
}
|
||||
#content .Lilive {
|
||||
color: #C0C000;
|
||||
}
|
||||
#content .Daive {
|
||||
color: #858500;
|
||||
}
|
||||
#content .Zaffre {
|
||||
color: #0014A8;
|
||||
}
|
||||
#content .Amethyst {
|
||||
color: #9966CC;
|
||||
}
|
||||
|
||||
/* Username colors */
|
||||
#content .guest {
|
||||
color: gray;
|
||||
}
|
||||
#content #chatList span.guest {
|
||||
font-weight: bold;
|
||||
}
|
||||
#content .user {
|
||||
color: #FFF;
|
||||
}
|
||||
#content #chatList span.user {
|
||||
font-weight: bold;
|
||||
}
|
||||
#content .moderator {
|
||||
color: #0A0;
|
||||
}
|
||||
#content #chatList span.moderator {
|
||||
font-weight: bold;
|
||||
}
|
||||
#content .admin {
|
||||
color: #A00;
|
||||
}
|
||||
#content #chatList span.admin {
|
||||
font-weight: bold;
|
||||
}
|
||||
#content .chatBot {
|
||||
color: #9E8DA7;
|
||||
}
|
||||
#content #chatList span.chatBot {
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
}
|
||||
#content .purple {
|
||||
color: #824CA0;
|
||||
}
|
||||
#content #chatList span.purple {
|
||||
font-weight: bold;
|
||||
}
|
||||
#content .cmod {
|
||||
color: #09F;
|
||||
}
|
||||
#content #chatList span.cmod {
|
||||
font-weight: bold;
|
||||
}
|
||||
#content .bots {
|
||||
color: #9E8DA7;
|
||||
}
|
||||
#content #chatList span.bots {
|
||||
font-weight: bold;
|
||||
}
|
||||
#content .donator {
|
||||
color: #EE9400;
|
||||
}
|
||||
#content #chatList span.donator {
|
||||
font-weight: bold;
|
||||
}
|
1220
public/chat/css/yuuno.css
Normal file
BIN
public/chat/favicon.ico
Normal file
After Width: | Height: | Size: 361 KiB |
70
public/chat/ie5-6.css
Normal file
|
@ -0,0 +1,70 @@
|
|||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Positioning adjustments for IE versions < 7
|
||||
*/
|
||||
|
||||
body {
|
||||
width:100%;
|
||||
height:100%;
|
||||
}
|
||||
#content #chatList {
|
||||
position:static;
|
||||
margin-right:230px;
|
||||
margin-left:20px;
|
||||
margin-top:85px;
|
||||
height:360px;
|
||||
}
|
||||
#content #onlineListContainer {
|
||||
height:360px;
|
||||
}
|
||||
#content #helpContainer {
|
||||
height:360px;
|
||||
}
|
||||
#content #settingsContainer {
|
||||
height:360px;
|
||||
}
|
||||
#content #inputFieldContainer {
|
||||
top:460px;
|
||||
padding:0px;
|
||||
}
|
||||
#content #submitButtonContainer {
|
||||
top:517px;
|
||||
}
|
||||
#content #bbCodeContainer {
|
||||
top:550px;
|
||||
}
|
||||
#content #colorCodesContainer {
|
||||
top:516px;
|
||||
}
|
||||
#content #emoticonsContainer {
|
||||
top:517px;
|
||||
}
|
||||
#content #optionsContainer {
|
||||
top:555px;
|
||||
}
|
||||
#content #inputFieldContainer #inputField {
|
||||
width:94%;
|
||||
}
|
||||
#content #onlineListContainer #onlineList {
|
||||
width:100%;
|
||||
height:335px;
|
||||
overflow:auto;
|
||||
}
|
||||
#content #helpContainer #helpList {
|
||||
width:100%;
|
||||
height:335px;
|
||||
overflow:auto;
|
||||
}
|
||||
#content #settingsContainer #settingsList {
|
||||
width:100%;
|
||||
height:335px;
|
||||
overflow:auto;
|
||||
}
|
BIN
public/chat/images/audio.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
public/chat/images/autoscroll.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
public/chat/images/delete.png
Normal file
After Width: | Height: | Size: 241 B |
BIN
public/chat/images/fade-purple.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
public/chat/images/gothic.woff
Normal file
BIN
public/chat/images/help.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
public/chat/images/linkbad.gif
Normal file
After Width: | Height: | Size: 292 B |
BIN
public/chat/images/linkgood.gif
Normal file
After Width: | Height: | Size: 293 B |
BIN
public/chat/images/linkyellow.gif
Normal file
After Width: | Height: | Size: 287 B |
BIN
public/chat/images/loading-sprite.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
public/chat/images/pclouds.jpg
Normal file
After Width: | Height: | Size: 626 KiB |
BIN
public/chat/images/pixel.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
public/chat/images/playback.png
Normal file
After Width: | Height: | Size: 961 B |
BIN
public/chat/images/settings.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
public/chat/images/users.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
24
public/chat/index.php
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
// Show all errors:
|
||||
ini_set('display_errors', 'On');
|
||||
error_reporting(-1);
|
||||
|
||||
// Path to the chat directory:
|
||||
define('AJAX_CHAT_PATH', dirname($_SERVER['SCRIPT_FILENAME']).'/');
|
||||
|
||||
// Include Flashii System stuff:
|
||||
//require('/var/www/flashii.net/system/core/modules.php');
|
||||
|
||||
// Include Class libraries:
|
||||
require(AJAX_CHAT_PATH.'lib/classes.php');
|
||||
|
||||
// Initialize the chat:
|
||||
$ajaxChat = new CustomAJAXChat();
|
591
public/chat/js/FABridge.js
Normal file
|
@ -0,0 +1,591 @@
|
|||
/*
|
||||
/*
|
||||
Copyright 2006 Adobe Systems Incorporated
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
||||
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* The Bridge class, responsible for navigating AS instances
|
||||
*/
|
||||
function FABridge(target,bridgeName)
|
||||
{
|
||||
this.target = target;
|
||||
this.remoteTypeCache = {};
|
||||
this.remoteInstanceCache = {};
|
||||
this.remoteFunctionCache = {};
|
||||
this.localFunctionCache = {};
|
||||
this.bridgeID = FABridge.nextBridgeID++;
|
||||
this.name = bridgeName;
|
||||
this.nextLocalFuncID = 0;
|
||||
FABridge.instances[this.name] = this;
|
||||
FABridge.idMap[this.bridgeID] = this;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
// type codes for packed values
|
||||
FABridge.TYPE_ASINSTANCE = 1;
|
||||
FABridge.TYPE_ASFUNCTION = 2;
|
||||
|
||||
FABridge.TYPE_JSFUNCTION = 3;
|
||||
FABridge.TYPE_ANONYMOUS = 4;
|
||||
|
||||
FABridge.initCallbacks = {}
|
||||
|
||||
FABridge.argsToArray = function(args)
|
||||
{
|
||||
var result = [];
|
||||
for (var i = 0; i < args.length; i++)
|
||||
{
|
||||
result[i] = args[i];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function instanceFactory(objID)
|
||||
{
|
||||
this.fb_instance_id = objID;
|
||||
return this;
|
||||
}
|
||||
|
||||
function FABridge__invokeJSFunction(args)
|
||||
{
|
||||
var funcID = args[0];
|
||||
var throughArgs = args.concat();//FABridge.argsToArray(arguments);
|
||||
throughArgs.shift();
|
||||
|
||||
var bridge = FABridge.extractBridgeFromID(funcID);
|
||||
return bridge.invokeLocalFunction(funcID, throughArgs);
|
||||
}
|
||||
|
||||
FABridge.addInitializationCallback = function(bridgeName, callback)
|
||||
{
|
||||
var inst = FABridge.instances[bridgeName];
|
||||
if (inst != undefined)
|
||||
{
|
||||
callback.call(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
var callbackList = FABridge.initCallbacks[bridgeName];
|
||||
if(callbackList == null)
|
||||
{
|
||||
FABridge.initCallbacks[bridgeName] = callbackList = [];
|
||||
}
|
||||
|
||||
callbackList.push(callback);
|
||||
}
|
||||
|
||||
function FABridge__bridgeInitialized(bridgeName) {
|
||||
var objects = document.getElementsByTagName("object");
|
||||
var ol = objects.length;
|
||||
var activeObjects = [];
|
||||
if (ol > 0) {
|
||||
for (var i = 0; i < ol; i++) {
|
||||
if (typeof objects[i].SetVariable != "undefined") {
|
||||
activeObjects[activeObjects.length] = objects[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
var embeds = document.getElementsByTagName("embed");
|
||||
var el = embeds.length;
|
||||
var activeEmbeds = [];
|
||||
if (el > 0) {
|
||||
for (var j = 0; j < el; j++) {
|
||||
if (typeof embeds[j].SetVariable != "undefined") {
|
||||
activeEmbeds[activeEmbeds.length] = embeds[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
var aol = activeObjects.length;
|
||||
var ael = activeEmbeds.length;
|
||||
var searchStr = "bridgeName="+ bridgeName;
|
||||
if ((aol == 1 && !ael) || (aol == 1 && ael == 1)) {
|
||||
FABridge.attachBridge(activeObjects[0], bridgeName);
|
||||
}
|
||||
else if (ael == 1 && !aol) {
|
||||
FABridge.attachBridge(activeEmbeds[0], bridgeName);
|
||||
}
|
||||
else {
|
||||
var flash_found = false;
|
||||
if (aol > 1) {
|
||||
for (var k = 0; k < aol; k++) {
|
||||
var params = activeObjects[k].childNodes;
|
||||
for (var l = 0; l < params.length; l++) {
|
||||
var param = params[l];
|
||||
if (param.nodeType == 1 && param.tagName.toLowerCase() == "param" && param["name"].toLowerCase() == "flashvars" && param["value"].indexOf(searchStr) >= 0) {
|
||||
FABridge.attachBridge(activeObjects[k], bridgeName);
|
||||
flash_found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (flash_found) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!flash_found && ael > 1) {
|
||||
for (var m = 0; m < ael; m++) {
|
||||
var flashVars = activeEmbeds[m].attributes.getNamedItem("flashVars").nodeValue;
|
||||
if (flashVars.indexOf(searchStr) >= 0) {
|
||||
FABridge.attachBridge(activeEmbeds[m], bridgeName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// used to track multiple bridge instances, since callbacks from AS are global across the page.
|
||||
|
||||
FABridge.nextBridgeID = 0;
|
||||
FABridge.instances = {};
|
||||
FABridge.idMap = {};
|
||||
FABridge.refCount = 0;
|
||||
|
||||
FABridge.extractBridgeFromID = function(id)
|
||||
{
|
||||
var bridgeID = (id >> 16);
|
||||
return FABridge.idMap[bridgeID];
|
||||
}
|
||||
|
||||
FABridge.attachBridge = function(instance, bridgeName)
|
||||
{
|
||||
var newBridgeInstance = new FABridge(instance, bridgeName);
|
||||
|
||||
FABridge[bridgeName] = newBridgeInstance;
|
||||
|
||||
/* FABridge[bridgeName] = function() {
|
||||
return newBridgeInstance.root();
|
||||
}
|
||||
*/
|
||||
var callbacks = FABridge.initCallbacks[bridgeName];
|
||||
if (callbacks == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
for (var i = 0; i < callbacks.length; i++)
|
||||
{
|
||||
callbacks[i].call(newBridgeInstance);
|
||||
}
|
||||
delete FABridge.initCallbacks[bridgeName]
|
||||
}
|
||||
|
||||
// some methods can't be proxied. You can use the explicit get,set, and call methods if necessary.
|
||||
|
||||
FABridge.blockedMethods =
|
||||
{
|
||||
toString: true,
|
||||
get: true,
|
||||
set: true,
|
||||
call: true
|
||||
};
|
||||
|
||||
FABridge.prototype =
|
||||
{
|
||||
|
||||
|
||||
// bootstrapping
|
||||
|
||||
root: function()
|
||||
{
|
||||
return this.deserialize(this.target.getRoot());
|
||||
},
|
||||
//clears all of the AS objects in the cache maps
|
||||
releaseASObjects: function()
|
||||
{
|
||||
return this.target.releaseASObjects();
|
||||
},
|
||||
//clears a specific object in AS from the type maps
|
||||
releaseNamedASObject: function(value)
|
||||
{
|
||||
if(typeof(value) != "object")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
var ret = this.target.releaseNamedASObject(value.fb_instance_id);
|
||||
return ret;
|
||||
}
|
||||
},
|
||||
//create a new AS Object
|
||||
create: function(className)
|
||||
{
|
||||
return this.deserialize(this.target.create(className));
|
||||
},
|
||||
|
||||
|
||||
// utilities
|
||||
|
||||
makeID: function(token)
|
||||
{
|
||||
return (this.bridgeID << 16) + token;
|
||||
},
|
||||
|
||||
|
||||
// low level access to the flash object
|
||||
|
||||
//get a named property from an AS object
|
||||
getPropertyFromAS: function(objRef, propName)
|
||||
{
|
||||
if (FABridge.refCount > 0)
|
||||
{
|
||||
throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.");
|
||||
}
|
||||
else
|
||||
{
|
||||
FABridge.refCount++;
|
||||
retVal = this.target.getPropFromAS(objRef, propName);
|
||||
retVal = this.handleError(retVal);
|
||||
FABridge.refCount--;
|
||||
return retVal;
|
||||
}
|
||||
},
|
||||
//set a named property on an AS object
|
||||
setPropertyInAS: function(objRef,propName, value)
|
||||
{
|
||||
if (FABridge.refCount > 0)
|
||||
{
|
||||
throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.");
|
||||
}
|
||||
else
|
||||
{
|
||||
FABridge.refCount++;
|
||||
retVal = this.target.setPropInAS(objRef,propName, this.serialize(value));
|
||||
retVal = this.handleError(retVal);
|
||||
FABridge.refCount--;
|
||||
return retVal;
|
||||
}
|
||||
},
|
||||
|
||||
//call an AS function
|
||||
callASFunction: function(funcID, args)
|
||||
{
|
||||
if (FABridge.refCount > 0)
|
||||
{
|
||||
throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.");
|
||||
}
|
||||
else
|
||||
{
|
||||
FABridge.refCount++;
|
||||
retVal = this.target.invokeASFunction(funcID, this.serialize(args));
|
||||
retVal = this.handleError(retVal);
|
||||
FABridge.refCount--;
|
||||
return retVal;
|
||||
}
|
||||
},
|
||||
//call a method on an AS object
|
||||
callASMethod: function(objID, funcName, args)
|
||||
{
|
||||
if (FABridge.refCount > 0)
|
||||
{
|
||||
throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.");
|
||||
}
|
||||
else
|
||||
{
|
||||
FABridge.refCount++;
|
||||
args = this.serialize(args);
|
||||
retVal = this.target.invokeASMethod(objID, funcName, args);
|
||||
retVal = this.handleError(retVal);
|
||||
FABridge.refCount--;
|
||||
return retVal;
|
||||
}
|
||||
},
|
||||
|
||||
// responders to remote calls from flash
|
||||
|
||||
//callback from flash that executes a local JS function
|
||||
//used mostly when setting js functions as callbacks on events
|
||||
invokeLocalFunction: function(funcID, args)
|
||||
{
|
||||
var result;
|
||||
var func = this.localFunctionCache[funcID];
|
||||
|
||||
if(func != undefined)
|
||||
{
|
||||
result = this.serialize(func.apply(null, this.deserialize(args)));
|
||||
}
|
||||
|
||||
return result;
|
||||
},
|
||||
|
||||
// Object Types and Proxies
|
||||
|
||||
// accepts an object reference, returns a type object matching the obj reference.
|
||||
getTypeFromName: function(objTypeName)
|
||||
{
|
||||
return this.remoteTypeCache[objTypeName];
|
||||
},
|
||||
//create an AS proxy for the given object ID and type
|
||||
createProxy: function(objID, typeName)
|
||||
{
|
||||
var objType = this.getTypeFromName(typeName);
|
||||
instanceFactory.prototype = objType;
|
||||
var instance = new instanceFactory(objID);
|
||||
this.remoteInstanceCache[objID] = instance;
|
||||
return instance;
|
||||
},
|
||||
//return the proxy associated with the given object ID
|
||||
getProxy: function(objID)
|
||||
{
|
||||
return this.remoteInstanceCache[objID];
|
||||
},
|
||||
|
||||
// accepts a type structure, returns a constructed type
|
||||
addTypeDataToCache: function(typeData)
|
||||
{
|
||||
newType = new ASProxy(this, typeData.name);
|
||||
var accessors = typeData.accessors;
|
||||
for (var i = 0; i < accessors.length; i++)
|
||||
{
|
||||
this.addPropertyToType(newType, accessors[i]);
|
||||
}
|
||||
|
||||
var methods = typeData.methods;
|
||||
for (var i = 0; i < methods.length; i++)
|
||||
{
|
||||
if (FABridge.blockedMethods[methods[i]] == undefined)
|
||||
{
|
||||
this.addMethodToType(newType, methods[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.remoteTypeCache[newType.typeName] = newType;
|
||||
return newType;
|
||||
},
|
||||
|
||||
//add a property to a typename; used to define the properties that can be called on an AS proxied object
|
||||
addPropertyToType: function(ty, propName)
|
||||
{
|
||||
var c = propName.charAt(0);
|
||||
var setterName;
|
||||
var getterName;
|
||||
if(c >= "a" && c <= "z")
|
||||
{
|
||||
getterName = "get" + c.toUpperCase() + propName.substr(1);
|
||||
setterName = "set" + c.toUpperCase() + propName.substr(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
getterName = "get" + propName;
|
||||
setterName = "set" + propName;
|
||||
}
|
||||
ty[setterName] = function(val)
|
||||
{
|
||||
this.bridge.setPropertyInAS(this.fb_instance_id, propName, val);
|
||||
}
|
||||
ty[getterName] = function()
|
||||
{
|
||||
return this.bridge.deserialize(this.bridge.getPropertyFromAS(this.fb_instance_id, propName));
|
||||
}
|
||||
},
|
||||
|
||||
//add a method to a typename; used to define the methods that can be callefd on an AS proxied object
|
||||
addMethodToType: function(ty, methodName)
|
||||
{
|
||||
ty[methodName] = function()
|
||||
{
|
||||
return this.bridge.deserialize(this.bridge.callASMethod(this.fb_instance_id, methodName, FABridge.argsToArray(arguments)));
|
||||
}
|
||||
},
|
||||
|
||||
// Function Proxies
|
||||
|
||||
//returns the AS proxy for the specified function ID
|
||||
getFunctionProxy: function(funcID)
|
||||
{
|
||||
var bridge = this;
|
||||
if (this.remoteFunctionCache[funcID] == null)
|
||||
{
|
||||
this.remoteFunctionCache[funcID] = function()
|
||||
{
|
||||
bridge.callASFunction(funcID, FABridge.argsToArray(arguments));
|
||||
}
|
||||
}
|
||||
return this.remoteFunctionCache[funcID];
|
||||
},
|
||||
|
||||
//reutrns the ID of the given function; if it doesnt exist it is created and added to the local cache
|
||||
getFunctionID: function(func)
|
||||
{
|
||||
if (func.__bridge_id__ == undefined)
|
||||
{
|
||||
func.__bridge_id__ = this.makeID(this.nextLocalFuncID++);
|
||||
this.localFunctionCache[func.__bridge_id__] = func;
|
||||
}
|
||||
return func.__bridge_id__;
|
||||
},
|
||||
|
||||
// serialization / deserialization
|
||||
|
||||
serialize: function(value)
|
||||
{
|
||||
var result = {};
|
||||
|
||||
var t = typeof(value);
|
||||
//primitives are kept as such
|
||||
if (t == "number" || t == "string" || t == "boolean" || t == null || t == undefined)
|
||||
{
|
||||
result = value;
|
||||
}
|
||||
else if (value instanceof Array)
|
||||
{
|
||||
//arrays are serializesd recursively
|
||||
result = [];
|
||||
for (var i = 0; i < value.length; i++)
|
||||
{
|
||||
result[i] = this.serialize(value[i]);
|
||||
}
|
||||
}
|
||||
else if (t == "function")
|
||||
{
|
||||
//js functions are assigned an ID and stored in the local cache
|
||||
result.type = FABridge.TYPE_JSFUNCTION;
|
||||
result.value = this.getFunctionID(value);
|
||||
}
|
||||
else if (value instanceof ASProxy)
|
||||
{
|
||||
result.type = FABridge.TYPE_ASINSTANCE;
|
||||
result.value = value.fb_instance_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
result.type = FABridge.TYPE_ANONYMOUS;
|
||||
result.value = value;
|
||||
}
|
||||
|
||||
return result;
|
||||
},
|
||||
|
||||
//on deserialization we always check the return for the specific error code that is used to marshall NPE's into JS errors
|
||||
// the unpacking is done by returning the value on each pachet for objects/arrays
|
||||
deserialize: function(packedValue)
|
||||
{
|
||||
|
||||
var result;
|
||||
|
||||
var t = typeof(packedValue);
|
||||
if (t == "number" || t == "string" || t == "boolean" || packedValue == null || packedValue == undefined)
|
||||
{
|
||||
result = this.handleError(packedValue);
|
||||
}
|
||||
else if (packedValue instanceof Array)
|
||||
{
|
||||
result = [];
|
||||
for (var i = 0; i < packedValue.length; i++)
|
||||
{
|
||||
result[i] = this.deserialize(packedValue[i]);
|
||||
}
|
||||
}
|
||||
else if (t == "object")
|
||||
{
|
||||
for(var i = 0; i < packedValue.newTypes.length; i++)
|
||||
{
|
||||
this.addTypeDataToCache(packedValue.newTypes[i]);
|
||||
}
|
||||
for (var aRefID in packedValue.newRefs)
|
||||
{
|
||||
this.createProxy(aRefID, packedValue.newRefs[aRefID]);
|
||||
}
|
||||
if (packedValue.type == FABridge.TYPE_PRIMITIVE)
|
||||
{
|
||||
result = packedValue.value;
|
||||
}
|
||||
else if (packedValue.type == FABridge.TYPE_ASFUNCTION)
|
||||
{
|
||||
result = this.getFunctionProxy(packedValue.value);
|
||||
}
|
||||
else if (packedValue.type == FABridge.TYPE_ASINSTANCE)
|
||||
{
|
||||
result = this.getProxy(packedValue.value);
|
||||
}
|
||||
else if (packedValue.type == FABridge.TYPE_ANONYMOUS)
|
||||
{
|
||||
result = packedValue.value;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
},
|
||||
//increases the reference count for the given object
|
||||
addRef: function(obj)
|
||||
{
|
||||
this.target.incRef(obj.fb_instance_id);
|
||||
},
|
||||
//decrease the reference count for the given object and release it if needed
|
||||
release:function(obj)
|
||||
{
|
||||
this.target.releaseRef(obj.fb_instance_id);
|
||||
},
|
||||
|
||||
// check the given value for the components of the hard-coded error code : __FLASHERROR
|
||||
// used to marshall NPE's into flash
|
||||
|
||||
handleError: function(value)
|
||||
{
|
||||
if (typeof(value)=="string" && value.indexOf("__FLASHERROR")==0)
|
||||
{
|
||||
var myErrorMessage = value.split("||");
|
||||
if(FABridge.refCount > 0 )
|
||||
{
|
||||
FABridge.refCount--;
|
||||
}
|
||||
throw new Error(myErrorMessage[1]);
|
||||
return value;
|
||||
}
|
||||
else
|
||||
{
|
||||
return value;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// The root ASProxy class that facades a flash object
|
||||
|
||||
ASProxy = function(bridge, typeName)
|
||||
{
|
||||
this.bridge = bridge;
|
||||
this.typeName = typeName;
|
||||
return this;
|
||||
};
|
||||
//methods available on each ASProxy object
|
||||
ASProxy.prototype =
|
||||
{
|
||||
get: function(propName)
|
||||
{
|
||||
return this.bridge.deserialize(this.bridge.getPropertyFromAS(this.fb_instance_id, propName));
|
||||
},
|
||||
|
||||
set: function(propName, value)
|
||||
{
|
||||
this.bridge.setPropertyInAS(this.fb_instance_id, propName, value);
|
||||
},
|
||||
|
||||
call: function(funcName, args)
|
||||
{
|
||||
this.bridge.callASMethod(this.fb_instance_id, funcName, args);
|
||||
},
|
||||
|
||||
addRef: function() {
|
||||
this.bridge.addRef(this);
|
||||
},
|
||||
|
||||
release: function() {
|
||||
this.bridge.release(this);
|
||||
}
|
||||
};
|
3003
public/chat/js/chat.js
Normal file
292
public/chat/js/config.js
Normal file
|
@ -0,0 +1,292 @@
|
|||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
// Ajax Chat config parameters:
|
||||
var ajaxChatConfig = {
|
||||
|
||||
// The channelID of the channel to enter on login (the loginChannelName is used if set to null):
|
||||
loginChannelID: null,
|
||||
// The channelName of the channel to enter on login (the default channel is used if set to null):
|
||||
loginChannelName: null,
|
||||
|
||||
// The time in ms between update calls to retrieve new chat messages:
|
||||
timerRate: 2000,
|
||||
|
||||
// The URL to retrieve the XML chat messages (must at least contain one parameter):
|
||||
ajaxURL: './?ajax=true',
|
||||
// The base URL of the chat directory, used to retrieve media files (images, sound files, etc.):
|
||||
baseURL: './',
|
||||
|
||||
// A regular expression for allowed source URL's for media content (e.g. images displayed inline);
|
||||
regExpMediaUrl: '^((http)|(https)):\\/\\/',
|
||||
|
||||
// If set to false the chat update is delayed until the event defined in ajaxChat.setStartChatHandler():
|
||||
startChatOnLoad: true,
|
||||
|
||||
// Defines the IDs of DOM nodes accessed by the chat:
|
||||
domIDs: {
|
||||
// The ID of the chat messages list:
|
||||
chatList: 'chatList',
|
||||
// The ID of the online users list:
|
||||
onlineList: 'onlineList',
|
||||
// The ID of the message text input field:
|
||||
inputField: 'inputField',
|
||||
// The ID of the message text length counter:
|
||||
messageLengthCounter: 'messageLengthCounter',
|
||||
// The ID of the channel selection:
|
||||
channelSelection: 'channelSelection',
|
||||
// The ID of the style selection:
|
||||
styleSelection: 'styleSelection',
|
||||
// The ID of the emoticons container:
|
||||
emoticonsContainer: 'emoticonsContainer',
|
||||
// The ID of the color codes container:
|
||||
colorCodesContainer: 'colorCodesContainer',
|
||||
// The ID of the flash interface container:
|
||||
flashInterfaceContainer: 'flashInterfaceContainer'
|
||||
},
|
||||
|
||||
// Defines the settings which can be modified by users:
|
||||
settings: {
|
||||
// Defines if BBCode tags are replaced with the associated HTML code tags:
|
||||
bbCode: true,
|
||||
// Defines if image BBCode is replaced with the associated image HTML code:
|
||||
bbCodeImages: true,
|
||||
// Defines if color BBCode is replaced with the associated color HTML code:
|
||||
bbCodeColors: true,
|
||||
// Defines if hyperlinks are made clickable:
|
||||
hyperLinks: true,
|
||||
// Defines if line breaks are enabled:
|
||||
lineBreaks: true,
|
||||
// Defines if emoticon codes are replaced with their associated images:
|
||||
emoticons: true,
|
||||
|
||||
// Defines if the focus is automatically set to the input field on chat load or channel switch:
|
||||
autoFocus: true,
|
||||
// Defines if the chat list scrolls automatically to display the latest messages:
|
||||
autoScroll: true,
|
||||
// The maximum count of messages displayed in the chat list (will be ignored if set to 0):
|
||||
maxMessages: 0,
|
||||
|
||||
// Defines if long words are wrapped to avoid vertical scrolling:
|
||||
wordWrap: false,
|
||||
// Defines the maximum length before a word gets wrapped:
|
||||
maxWordLength: 32,
|
||||
|
||||
// Defines the format of the date and time displayed for each chat message:
|
||||
dateFormat: '(%H:%i:%s)',
|
||||
|
||||
// Defines if font colors persist without the need to assign them to each message:
|
||||
persistFontColor: true,
|
||||
// The default font color, uses the page default font color if set to null:
|
||||
fontColor: null,
|
||||
|
||||
// Defines if sounds are played:
|
||||
audio: true,
|
||||
// Defines the sound volume (0.0 = mute, 1.0 = max):
|
||||
audioVolume: 1.0,
|
||||
|
||||
// Defines the sound that is played when normal messages are reveived:
|
||||
soundReceive: 'sound_1',
|
||||
// Defines the sound that is played on sending normal messages:
|
||||
soundSend: 'sound_2',
|
||||
// Defines the sound that is played on channel enter or login:
|
||||
soundEnter: 'sound_3',
|
||||
// Defines the sound that is played on channel leave or logout:
|
||||
soundLeave: 'sound_4',
|
||||
// Defines the sound that is played on chatBot messages:
|
||||
soundChatBot: 'sound_5',
|
||||
// Defines the sound that is played on error messages:
|
||||
soundError: 'sound_6',
|
||||
// Defines the sound that is played on kicked messages:
|
||||
soundKick: 'sound_7',
|
||||
// Defines the sound that is played when private messages are received:
|
||||
soundPrivate: 'sound_1',
|
||||
|
||||
// Defines if the document title blinks on new messages:
|
||||
blink: true,
|
||||
// Defines the blink interval in ms:
|
||||
blinkInterval: 500,
|
||||
// Defines the number of blink intervals:
|
||||
blinkIntervalNumber: 10
|
||||
},
|
||||
|
||||
// Defines a list of settings which are not to be stored in a session cookie:
|
||||
nonPersistentSettings: new Array(
|
||||
'wordWrap'
|
||||
),
|
||||
|
||||
// Defines the list of allowed BBCodes:
|
||||
bbCodeTags: new Array(
|
||||
'b',
|
||||
'i',
|
||||
'u',
|
||||
'quote',
|
||||
'code',
|
||||
'color',
|
||||
'url',
|
||||
'img'
|
||||
),
|
||||
|
||||
// Defines the list of allowed color codes:
|
||||
colorCodes: new Array(
|
||||
'Silver',
|
||||
'Citrine',
|
||||
'Orange',
|
||||
'Pumpkin',
|
||||
'Red',
|
||||
'Crimson',
|
||||
'Ruby',
|
||||
'Amaranth',
|
||||
'Thulite',
|
||||
'Pink',
|
||||
'Amethyst',
|
||||
'Purpureus',
|
||||
'Antisia',
|
||||
'Cerulean',
|
||||
'Cobalt',
|
||||
'Aqua',
|
||||
'Mint',
|
||||
'Keppel',
|
||||
'Teal',
|
||||
'Green',
|
||||
'Chartreuse',
|
||||
'Nitrate',
|
||||
'Lilive',
|
||||
'Daive'
|
||||
),
|
||||
|
||||
// Defines the list of allowed emoticon codes:
|
||||
emoticonCodes: new Array(
|
||||
':happy:',
|
||||
':lmao:',
|
||||
':angry:',
|
||||
':angrier:',
|
||||
':evil:',
|
||||
':glare:',
|
||||
':eat:',
|
||||
':lol:',
|
||||
':dizzy:',
|
||||
':yay:',
|
||||
':wtf:',
|
||||
':sigh:',
|
||||
':omg:',
|
||||
':ouch:',
|
||||
':tired:',
|
||||
':kiss:',
|
||||
':love:',
|
||||
':sweat:',
|
||||
':suspicious:',
|
||||
':crying:',
|
||||
':blank:',
|
||||
':puke:',
|
||||
':ruse:',
|
||||
':meow:',
|
||||
':jew:',
|
||||
':winxp:',
|
||||
':childish:',
|
||||
':idea:'
|
||||
),
|
||||
|
||||
// Defines the list of emoticon files associated with the emoticon codes:
|
||||
emoticonFiles: new Array(
|
||||
'happy.png',
|
||||
'lmao.png',
|
||||
'angry.png',
|
||||
'angrier.png',
|
||||
'evil.png',
|
||||
'glare.png',
|
||||
'eat.gif',
|
||||
'lol.png',
|
||||
'dizzy.gif',
|
||||
'vhappy.png',
|
||||
'wtf.png',
|
||||
'sigh.png',
|
||||
'omg.png',
|
||||
'ouch.png',
|
||||
'tired.gif',
|
||||
'kiss.gif',
|
||||
'love.png',
|
||||
'sweat.gif',
|
||||
'suspicious.gif',
|
||||
'crying.png',
|
||||
'blank.png',
|
||||
'puke.gif',
|
||||
'ruse.png',
|
||||
'meow.png',
|
||||
'jew.png',
|
||||
'winxp.png',
|
||||
'childish.png',
|
||||
'idea.png'
|
||||
),
|
||||
|
||||
// Defines the available sounds loaded on chat start:
|
||||
soundFiles: {
|
||||
sound_1: 'ajax_incoming.mp3',
|
||||
sound_2: 'ajax_outgoing.mp3',
|
||||
sound_3: 'ajax_login.mp3',
|
||||
sound_4: 'ajax_logout.mp3',
|
||||
sound_5: 'ajax_chatbot.mp3',
|
||||
sound_6: 'ajax_error.mp3',
|
||||
sound_7: 'dokuro_pipiru.mp3',
|
||||
sound_8: 'ajax_shit.mp3',
|
||||
dicks: 'dicks.mp3',
|
||||
xp_1: 'xp_incoming.mp3',
|
||||
xp_2: 'xp_outgoing.mp3',
|
||||
xp_3: 'xp_login.mp3',
|
||||
xp_4: 'xp_logout.mp3',
|
||||
xp_5: 'xp_chatbot.mp3',
|
||||
xp_6: 'xp_error.mp3'
|
||||
},
|
||||
|
||||
|
||||
// The following configuration options are usually overwritten by server-side values:
|
||||
|
||||
// Session identification, used for style and setting cookies:
|
||||
sessionName: 'ajax_chat',
|
||||
|
||||
// The time in days until the style and setting cookies expire:
|
||||
cookieExpiration: 365,
|
||||
// The path of the cookies, '/' allows to read the cookies from all directories:
|
||||
cookiePath: '/',
|
||||
// The domain of the cookies, defaults to the hostname of the server if set to null:
|
||||
cookieDomain: null,
|
||||
// If enabled, cookies must be sent over secure (SSL/TLS encrypted) connections:
|
||||
cookieSecure: null,
|
||||
|
||||
// The name of the chat bot:
|
||||
chatBotName: 'Koishi',
|
||||
// The userID of the chat bot:
|
||||
chatBotID: 2147483647,
|
||||
|
||||
// Allow/Disallow registered users to delete their own messages:
|
||||
allowUserMessageDelete: false,
|
||||
|
||||
// Minutes until a user is declared inactive (last status update) - the minimum is 2 minutes:
|
||||
inactiveTimeout: 2,
|
||||
|
||||
// UserID plus this value are private channels (this is also the max userID and max channelID):
|
||||
privateChannelDiff: 500000000,
|
||||
// UserID plus this value are used for private messages:
|
||||
privateMessageDiff: 1000000000,
|
||||
|
||||
// Defines if login/logout and channel enter/leave are displayed:
|
||||
showChannelMessages: true,
|
||||
|
||||
// Max messageText length:
|
||||
messageTextMaxLength: 2000,
|
||||
|
||||
// Defines if the socket server is enabled:
|
||||
socketServerEnabled: false,
|
||||
// Defines the hostname of the socket server used to connect from client side:
|
||||
socketServerHost: 'localhost',
|
||||
// Defines the port of the socket server:
|
||||
socketServerPort: 1935,
|
||||
// This ID can be used to distinguish between different chat installations using the same socket server:
|
||||
socketServerChatID: 0
|
||||
|
||||
}
|
40
public/chat/js/custom.js
Normal file
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
// Overriding client side functionality:
|
||||
|
||||
/*
|
||||
// Example - Overriding the replaceCustomCommands method:
|
||||
ajaxChat.replaceCustomCommands = function(text, textParts) {
|
||||
return text;
|
||||
}
|
||||
*/
|
||||
|
||||
ajaxChat.customInitialize = function() {
|
||||
ajaxChat.addChatBotMessageToChatList("[b]Welcome to Flashii Chat![/b]");
|
||||
ajaxChat.addChatBotMessageToChatList("[i]the one time i tried to use gimp i got scared and tried closing it and it crashed[/i]");
|
||||
}
|
||||
|
||||
ajaxChat.loadHTML5Sounds=function(){
|
||||
aO = document.createElement('audio');
|
||||
aO.id = 'audioObject';
|
||||
document.body.appendChild(aO);
|
||||
this.audioObject = document.getElementById('audioObject');
|
||||
this.setAudioVolume(this.settings['audioVolume']);
|
||||
this.sounds = {};
|
||||
for(var key in this.soundFiles){
|
||||
this.sounds[key] = this.dirs['sounds']+this.soundFiles[key];
|
||||
}
|
||||
}
|
||||
ajaxChat.playHTML5Sound=function(soundID,soundFile){
|
||||
this.audioObject.src = soundFile;
|
||||
this.audioObject.play();
|
||||
}
|
||||
ajaxChat.setHTML5SoundVolume=function(volume){
|
||||
this.audioObject.volume = volume;
|
||||
}
|
0
public/chat/js/index.html
Normal file
95
public/chat/js/lang/en.js
Normal file
|
@ -0,0 +1,95 @@
|
|||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
// Ajax Chat language Object:
|
||||
var ajaxChatLang = {
|
||||
|
||||
login: '%s logs into the Chat.',
|
||||
logout: '%s logs out of the Chat.',
|
||||
logoutTimeout: '%s has been logged out (Exploded).',
|
||||
//logoutTimeout: '%s has been logged out (Timeout).',
|
||||
//logoutKicked: '%s has been kekked from the Chat.',
|
||||
logoutKicked: '%s got clubbed to death.',
|
||||
logoutIP: '%s has been logged out (Invalid IP address).',
|
||||
channelEnter: '%s enters the channel.',
|
||||
channelLeave: '%s leaves the channel.',
|
||||
privmsg: '(whispers)',
|
||||
privmsgto: '(whispers to %s)',
|
||||
invite: '%s invites you to join %s.',
|
||||
inviteto: 'Your invitation to %s to join channel %s has been sent.',
|
||||
uninvite: '%s uninvites you from channel %s.',
|
||||
uninviteto: 'Your uninvitation to %s for channel %s has been sent.',
|
||||
queryOpen: 'Private channel opened to %s.',
|
||||
queryClose: 'Private channel to %s closed.',
|
||||
ignoreAdded: 'Added %s to the ignore list.',
|
||||
ignoreRemoved: 'Removed %s from the ignore list.',
|
||||
ignoreList: 'Ignored Users:',
|
||||
ignoreListEmpty: 'No ignored Users listed.',
|
||||
who: 'Online Users:',
|
||||
whoChannel: 'Online Users in channel %s:',
|
||||
whoEmpty: 'No online users in the given channel.',
|
||||
list: 'Available channels:',
|
||||
bans: 'Banned Users:',
|
||||
bansEmpty: 'No banned Users listed.',
|
||||
unban: 'Ban of user %s revoked.',
|
||||
whois: 'User %s - IP address:',
|
||||
whereis: 'User %s is in channel %s.',
|
||||
roll: '%s rolls %s and gets %s.',
|
||||
nick: '%s is now known as %s.',
|
||||
toggleUserMenu: 'Toggle user menu for %s',
|
||||
userMenuLogout: 'Logout',
|
||||
userMenuWho: 'List online users',
|
||||
userMenuList: 'List available channels',
|
||||
userMenuAction: 'Describe action',
|
||||
userMenuRoll: 'Roll dice',
|
||||
userMenuNick: 'Change username',
|
||||
userMenuEnterPrivateRoom: 'Enter private room',
|
||||
userMenuSendPrivateMessage: 'Send private message',
|
||||
userMenuDescribe: 'Send private action',
|
||||
userMenuOpenPrivateChannel: 'Open private channel',
|
||||
userMenuClosePrivateChannel: 'Close private channel',
|
||||
userMenuInvite: 'Invite',
|
||||
userMenuUninvite: 'Uninvite',
|
||||
userMenuIgnore: 'Ignore/Accept',
|
||||
userMenuIgnoreList: 'List ignored users',
|
||||
userMenuWhereis: 'Display channel',
|
||||
userMenuKick: 'Kick/Ban',
|
||||
userMenuBans: 'List banned users',
|
||||
userMenuWhois: 'Display IP',
|
||||
userMenuLogs: 'Enter logs',
|
||||
userMenuViewProfile: 'View profile',
|
||||
unbanUser: 'Ban on user %s revoked.',
|
||||
joinChannel: 'Join channel %s',
|
||||
cite: '%s said:',
|
||||
urlDialog: 'Please enter the address (URL) of the webpage:',
|
||||
deleteMessage: 'Delete this chat message',
|
||||
deleteMessageConfirm: 'Are you sure you want to delete the selected chat message?',
|
||||
errorCookiesRequired: 'Cookies are required for this chat.',
|
||||
errorUserNameNotFound: 'Error: User %s not found.',
|
||||
errorMissingText: 'Error: Missing message text.',
|
||||
errorMissingUserName: 'Error: Missing username.',
|
||||
errorInvalidUserName: 'Error: Invalid username.',
|
||||
errorUserNameInUse: 'Error: Username already in use.',
|
||||
errorMissingChannelName: 'Error: Missing channel name.',
|
||||
errorInvalidChannelName: 'Error: Invalid channel name: %s',
|
||||
errorPrivateMessageNotAllowed: 'Error: Private messages are not allowed.',
|
||||
errorInviteNotAllowed: 'Error: You are not allowed to invite someone to this channel.',
|
||||
errorUninviteNotAllowed: 'Error: You are not allowed to uninvite someone from this channel.',
|
||||
errorNoOpenQuery: 'Error: No private channel open.',
|
||||
errorKickNotAllowed: 'You are not allowed to kick %s',
|
||||
errorCommandNotAllowed: 'You are not allowed to do %s',
|
||||
errorUnknownCommand: 'Error: Command %s does not exist.',
|
||||
errorMaxMessageRate: 'Error: You exceeded the maximum number of messages per minute.',
|
||||
errorConnectionTimeout: 'Error: Connection timeout. Please try again.',
|
||||
errorConnectionStatus: 'Error: Connection status: %s',
|
||||
errorSoundIO: 'Error: Failed to load sound file (Flash IO Error).',
|
||||
errorSocketIO: 'Error: Connection to socket server failed (Flash IO Error).',
|
||||
errorSocketSecurity: 'Error: Connection to socket server failed (Flash Security Error).',
|
||||
errorDOMSyntax: 'Error: Invalid DOM Syntax (DOM ID: %s).',
|
||||
errorHolyRoll: 'Congratulations, you\'ve found the roll command. But it\'s rank protected so jokes on you!'
|
||||
}
|
0
public/chat/js/lang/index.html
Normal file
128
public/chat/js/logs.js
Normal file
|
@ -0,0 +1,128 @@
|
|||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
// Overrides client-side functionality for the logs view:
|
||||
|
||||
ajaxChat.logsMonitorMode = null;
|
||||
ajaxChat.logsLastID = null;
|
||||
ajaxChat.logsCommand = null;
|
||||
|
||||
ajaxChat.startChatUpdate = function() {
|
||||
var infos = 'userID,userName,userRole';
|
||||
if(this.socketServerEnabled) {
|
||||
infos += ',socketRegistrationID';
|
||||
}
|
||||
this.updateChat('&getInfos=' + this.encodeText(infos));
|
||||
}
|
||||
|
||||
ajaxChat.updateChat = function(paramString) {
|
||||
// Only update if we have parameters, are in monitor mode or the lastID has changed since the last update:
|
||||
if(paramString || this.logsMonitorMode || !this.logsLastID || this.lastID != this.logsLastID) {
|
||||
// Update the logsLastID for the lastID check:
|
||||
this.logsLastID = this.lastID;
|
||||
|
||||
var requestUrl = this.ajaxURL
|
||||
+ '&lastID='
|
||||
+ this.lastID;
|
||||
if(paramString) {
|
||||
requestUrl += paramString;
|
||||
}
|
||||
requestUrl += '&' + this.getLogsCommand();
|
||||
this.makeRequest(requestUrl,'GET',null);
|
||||
} else {
|
||||
this.logsLastID = null;
|
||||
}
|
||||
}
|
||||
|
||||
ajaxChat.sendMessage = function() {
|
||||
this.getLogs();
|
||||
}
|
||||
|
||||
ajaxChat.getLogs = function() {
|
||||
clearTimeout(this.timer);
|
||||
this.clearChatList();
|
||||
this.lastID = 0;
|
||||
this.logsCommand = null;
|
||||
this.makeRequest(this.ajaxURL,'POST',this.getLogsCommand());
|
||||
}
|
||||
|
||||
ajaxChat.getLogsCommand = function() {
|
||||
if(!this.logsCommand) {
|
||||
if(!this.dom['inputField'].value &&
|
||||
parseInt(this.dom['yearSelection'].value) <= 0 &&
|
||||
parseInt(this.dom['hourSelection'].value) <= 0) {
|
||||
this.logsMonitorMode = true;
|
||||
} else {
|
||||
this.logsMonitorMode = false;
|
||||
}
|
||||
this.logsCommand = 'command=getLogs'
|
||||
+ '&channelID=' + this.dom['channelSelection'].value
|
||||
+ '&year=' + this.dom['yearSelection'].value
|
||||
+ '&month=' + this.dom['monthSelection'].value
|
||||
+ '&day=' + this.dom['daySelection'].value
|
||||
+ '&hour=' + this.dom['hourSelection'].value
|
||||
+ '&search=' + this.encodeText(this.dom['inputField'].value);
|
||||
}
|
||||
return this.logsCommand;
|
||||
}
|
||||
|
||||
ajaxChat.onNewMessage = function(dateObject, userID, userName, userRoleClass, messageID, messageText, channelID, ip) {
|
||||
if(messageText.indexOf('/delete') == 0) {
|
||||
return false;
|
||||
}
|
||||
if(this.logsMonitorMode) {
|
||||
this.blinkOnNewMessage(dateObject, userID, userName, userRoleClass, messageID, messageText, channelID, ip);
|
||||
this.playSoundOnNewMessage(
|
||||
dateObject, userID, userName, userRoleClass, messageID, messageText, channelID, ip
|
||||
);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
ajaxChat.logout = function() {
|
||||
clearTimeout(this.timer);
|
||||
this.makeRequest(this.ajaxURL,'POST','logout=true');
|
||||
}
|
||||
|
||||
ajaxChat.switchLanguage = function(langCode) {
|
||||
window.location.search = '?view=logs&lang='+langCode;
|
||||
}
|
||||
|
||||
ajaxChat.setChatUpdateTimer = function() {
|
||||
clearTimeout(this.timer);
|
||||
var timeout;
|
||||
if(this.socketIsConnected && this.logsLastID && this.lastID == this.logsLastID) {
|
||||
timeout = this.socketTimerRate;
|
||||
} else {
|
||||
timeout = this.timerRate;
|
||||
if(this.socketServerEnabled && !this.socketReconnectTimer) {
|
||||
// If the socket connection fails try to reconnect once in a minute:
|
||||
this.socketReconnectTimer = setTimeout('ajaxChat.socketConnect();', 60000);
|
||||
}
|
||||
}
|
||||
this.timer = setTimeout('ajaxChat.updateChat(null);', timeout);
|
||||
}
|
||||
|
||||
ajaxChat.socketUpdate = function(data) {
|
||||
if(this.logsMonitorMode) {
|
||||
var xmlDoc = this.loadXML(data);
|
||||
if(xmlDoc) {
|
||||
var selectedChannelID = parseInt(this.dom['channelSelection'].value);
|
||||
var channelID = parseInt(xmlDoc.firstChild.getAttribute('channelID'));
|
||||
if(selectedChannelID == -3 || channelID == selectedChannelID ||
|
||||
selectedChannelID == -2 && channelID >= this.privateMessageDiff ||
|
||||
selectedChannelID == -1
|
||||
&& channelID >= this.privateChannelDiff
|
||||
&& channelID < this.privateMessageDiff
|
||||
) {
|
||||
this.handleChatMessages(xmlDoc.getElementsByTagName('message'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
12
public/chat/js/shoutbox.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
// Overrides functionality for the shoutbox view:
|
||||
|
||||
ajaxChat.handleLogout = function() {
|
||||
}
|
4
public/chat/lib/.htaccess
Normal file
|
@ -0,0 +1,4 @@
|
|||
AuthType Basic
|
||||
AuthName "Forbidden"
|
||||
AuthUserFile /dev/null
|
||||
require user nobody
|
3491
public/chat/lib/class/AJAXChat.php
Normal file
81
public/chat/lib/class/AJAXChatDataBase.php
Normal file
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
// Class to initialize the DataBase connection:
|
||||
class AJAXChatDataBase {
|
||||
|
||||
var $_db;
|
||||
|
||||
function __construct(&$dbConnectionConfig) {
|
||||
switch($dbConnectionConfig['type']) {
|
||||
case 'mysqli':
|
||||
$this->_db = new AJAXChatDatabaseMySQLi($dbConnectionConfig);
|
||||
break;
|
||||
case 'mysql':
|
||||
$this->_db = new AJAXChatDatabaseMySQL($dbConnectionConfig);
|
||||
break;
|
||||
default:
|
||||
// Use MySQLi if available, else MySQL (and check the type of a given database connection object):
|
||||
if(function_exists('mysqli_connect') && (!$dbConnectionConfig['link'] || is_object($dbConnectionConfig['link']))) {
|
||||
$this->_db = new AJAXChatDatabaseMySQLi($dbConnectionConfig);
|
||||
} else {
|
||||
$this->_db = new AJAXChatDatabaseMySQL($dbConnectionConfig);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Method to connect to the DataBase server:
|
||||
function connect(&$dbConnectionConfig) {
|
||||
return $this->_db->connect($dbConnectionConfig);
|
||||
}
|
||||
|
||||
// Method to select the DataBase:
|
||||
function select($dbName) {
|
||||
return $this->_db->select($dbName);
|
||||
}
|
||||
|
||||
// Method to determine if an error has occured:
|
||||
function error() {
|
||||
return $this->_db->error();
|
||||
}
|
||||
|
||||
// Method to return the error report:
|
||||
function getError() {
|
||||
return $this->_db->getError();
|
||||
}
|
||||
|
||||
// Method to return the connection identifier:
|
||||
function &getConnectionID() {
|
||||
return $this->_db->getConnectionID();
|
||||
}
|
||||
|
||||
// Method to prevent SQL injections:
|
||||
function makeSafe($value) {
|
||||
return $this->_db->makeSafe($value);
|
||||
}
|
||||
|
||||
// Method to perform SQL queries:
|
||||
function sqlQuery($sql) {
|
||||
return $this->_db->sqlQuery($sql);
|
||||
}
|
||||
|
||||
// Method to retrieve the current DataBase name:
|
||||
function getName() {
|
||||
return $this->_db->getName();
|
||||
//If your database has hyphens ( - ) in it, try using this instead:
|
||||
//return '`'.$this->_db->getName().'`';
|
||||
}
|
||||
|
||||
// Method to retrieve the last inserted ID:
|
||||
function getLastInsertedID() {
|
||||
return $this->_db->getLastInsertedID();
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
138
public/chat/lib/class/AJAXChatEncoding.php
Normal file
|
@ -0,0 +1,138 @@
|
|||
<?php
|
||||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
// Class to provide static encoding methods
|
||||
class AJAXChatEncoding {
|
||||
|
||||
// Helper function to store special chars as we cannot use static class members in PHP4:
|
||||
public static function getSpecialChars() {
|
||||
static $specialChars;
|
||||
if(!$specialChars) {
|
||||
// As ' is not supported by IE, we use ' as replacement for "'":
|
||||
$specialChars = array('&'=>'&', '<'=>'<', '>'=>'>', "'"=>''', '"'=>'"');
|
||||
}
|
||||
return $specialChars;
|
||||
}
|
||||
|
||||
// Helper function to store Regular expression for NO-WS-CTL as we cannot use static class members in PHP4:
|
||||
public static function getRegExp_NO_WS_CTL() {
|
||||
static $regExp_NO_WS_CTL;
|
||||
if(!$regExp_NO_WS_CTL) {
|
||||
// Regular expression for NO-WS-CTL, non-whitespace control characters (RFC 2822), decimal 1–8, 11–12, 14–31, and 127:
|
||||
$regExp_NO_WS_CTL = '/[\x0\x1\x2\x3\x4\x5\x6\x7\x8\xB\xC\xE\xF\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x7F]/';
|
||||
}
|
||||
return $regExp_NO_WS_CTL;
|
||||
}
|
||||
|
||||
public static function convertEncoding($str, $charsetFrom, $charsetTo) {
|
||||
if(function_exists('mb_convert_encoding')) {
|
||||
return mb_convert_encoding($str, $charsetTo, $charsetFrom);
|
||||
}
|
||||
if(function_exists('iconv')) {
|
||||
return iconv($charsetFrom, $charsetTo, $str);
|
||||
}
|
||||
if(($charsetFrom == 'UTF-8') && ($charsetTo == 'ISO-8859-1')) {
|
||||
return utf8_decode($str);
|
||||
}
|
||||
if(($charsetFrom == 'ISO-8859-1') && ($charsetTo == 'UTF-8')) {
|
||||
return utf8_encode($str);
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
public static function htmlEncode($str, $contentCharset='UTF-8') {
|
||||
switch($contentCharset) {
|
||||
case 'UTF-8':
|
||||
// Encode only special chars (&, <, >, ', ") as entities:
|
||||
return AJAXChatEncoding::encodeSpecialChars($str);
|
||||
break;
|
||||
case 'ISO-8859-1':
|
||||
case 'ISO-8859-15':
|
||||
// Encode special chars and all extended characters above ISO-8859-1 charset as entities, then convert to content charset:
|
||||
return AJAXChatEncoding::convertEncoding(AJAXChatEncoding::encodeEntities($str, 'UTF-8', array(
|
||||
0x26, 0x26, 0, 0xFFFF, // &
|
||||
0x3C, 0x3C, 0, 0xFFFF, // <
|
||||
0x3E, 0x3E, 0, 0xFFFF, // >
|
||||
0x27, 0x27, 0, 0xFFFF, // '
|
||||
0x22, 0x22, 0, 0xFFFF, // "
|
||||
0x100, 0x2FFFF, 0, 0xFFFF // above ISO-8859-1
|
||||
)), 'UTF-8', $contentCharset);
|
||||
break;
|
||||
default:
|
||||
// Encode special chars and all characters above ASCII charset as entities, then convert to content charset:
|
||||
return AJAXChatEncoding::convertEncoding(AJAXChatEncoding::encodeEntities($str, 'UTF-8', array(
|
||||
0x26, 0x26, 0, 0xFFFF, // &
|
||||
0x3C, 0x3C, 0, 0xFFFF, // <
|
||||
0x3E, 0x3E, 0, 0xFFFF, // >
|
||||
0x27, 0x27, 0, 0xFFFF, // '
|
||||
0x22, 0x22, 0, 0xFFFF, // "
|
||||
0x80, 0x2FFFF, 0, 0xFFFF // above ASCII
|
||||
)), 'UTF-8', $contentCharset);
|
||||
}
|
||||
}
|
||||
|
||||
public static function encodeSpecialChars($str) {
|
||||
return strtr($str, AJAXChatEncoding::getSpecialChars());
|
||||
}
|
||||
|
||||
public static function decodeSpecialChars($str) {
|
||||
return strtr($str, array_flip(AJAXChatEncoding::getSpecialChars()));
|
||||
}
|
||||
|
||||
public static function encodeEntities($str, $encoding='UTF-8', $convmap=null) {
|
||||
if($convmap && function_exists('mb_encode_numericentity')) {
|
||||
return mb_encode_numericentity($str, $convmap, $encoding);
|
||||
}
|
||||
return htmlentities($str, ENT_QUOTES, $encoding);
|
||||
}
|
||||
|
||||
public static function decodeEntities($str, $encoding='UTF-8', $htmlEntitiesMap=null) {
|
||||
// Due to PHP bug #25670, html_entity_decode does not work with UTF-8 for PHP versions < 5:
|
||||
if(function_exists('html_entity_decode') && version_compare(phpversion(), 5, '>=')) {
|
||||
// Replace numeric and literal entities:
|
||||
$str = html_entity_decode($str, ENT_QUOTES, $encoding);
|
||||
// Replace additional literal HTML entities if an HTML entities map is given:
|
||||
if($htmlEntitiesMap) {
|
||||
$str = strtr($str, $htmlEntitiesMap);
|
||||
}
|
||||
} else {
|
||||
// Replace numeric entities:
|
||||
$str = preg_replace('~&#([0-9]+);~e', 'AJAXChatEncoding::unicodeChar("\\1")', $str);
|
||||
$str = preg_replace('~&#x([0-9a-f]+);~ei', 'AJAXChatEncoding::unicodeChar(hexdec("\\1"))', $str);
|
||||
// Replace literal entities:
|
||||
$htmlEntitiesMap = $htmlEntitiesMap ? $htmlEntitiesMap : array_flip(get_html_translation_table(HTML_ENTITIES, ENT_QUOTES));
|
||||
$str = strtr($str, $htmlEntitiesMap);
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
public static function unicodeChar($c) {
|
||||
if($c <= 0x7F) {
|
||||
return chr($c);
|
||||
} else if($c <= 0x7FF) {
|
||||
return chr(0xC0 | $c >> 6) . chr(0x80 | $c & 0x3F);
|
||||
} else if($c <= 0xFFFF) {
|
||||
return chr(0xE0 | $c >> 12) . chr(0x80 | $c >> 6 & 0x3F)
|
||||
. chr(0x80 | $c & 0x3F);
|
||||
} else if($c <= 0x10FFFF) {
|
||||
return chr(0xF0 | $c >> 18) . chr(0x80 | $c >> 12 & 0x3F)
|
||||
. chr(0x80 | $c >> 6 & 0x3F)
|
||||
. chr(0x80 | $c & 0x3F);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static function removeUnsafeCharacters($str) {
|
||||
// Remove NO-WS-CTL, non-whitespace control characters (RFC 2822), decimal 1–8, 11–12, 14–31, and 127:
|
||||
return preg_replace(AJAXChatEncoding::getRegExp_NO_WS_CTL(), '', $str);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
22
public/chat/lib/class/AJAXChatFileSystem.php
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
// Class to provide methods for file system access:
|
||||
class AJAXChatFileSystem {
|
||||
|
||||
public static function getFileContents($file) {
|
||||
if(function_exists('file_get_contents')) {
|
||||
return file_get_contents($file);
|
||||
} else {
|
||||
return(implode('', file($file)));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
56
public/chat/lib/class/AJAXChatHTTPHeader.php
Normal file
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
// Class to manage HTTP header
|
||||
class AJAXChatHTTPHeader {
|
||||
|
||||
var $_contentType;
|
||||
var $_constant;
|
||||
var $_noCache;
|
||||
|
||||
function __construct($encoding='UTF-8', $contentType=null, $noCache=true) {
|
||||
if($contentType) {
|
||||
$this->_contentType = $contentType.'; charset='.$encoding;
|
||||
$this->_constant = true;
|
||||
} else {
|
||||
if(isset($_SERVER['HTTP_ACCEPT']) && (strpos($_SERVER['HTTP_ACCEPT'],'application/xhtml+xml') !== false)) {
|
||||
$this->_contentType = 'application/xhtml+xml; charset='.$encoding;
|
||||
} else {
|
||||
$this->_contentType = 'text/html; charset='.$encoding;
|
||||
}
|
||||
$this->_constant = false;
|
||||
}
|
||||
$this->_noCache = $noCache;
|
||||
}
|
||||
|
||||
// Method to send the HTTP header:
|
||||
function send() {
|
||||
// Prevent caching:
|
||||
if($this->_noCache) {
|
||||
header('Cache-Control: no-cache, must-revalidate');
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
}
|
||||
|
||||
// Send the content-type-header:
|
||||
header('Content-Type: '.$this->_contentType);
|
||||
|
||||
// Send vary header if content-type varies (important for proxy-caches):
|
||||
if(!$this->_constant) {
|
||||
header('Vary: Accept');
|
||||
}
|
||||
}
|
||||
|
||||
// Method to return the content-type string:
|
||||
function getContentType() {
|
||||
// Return the content-type string:
|
||||
return $this->_contentType;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
102
public/chat/lib/class/AJAXChatLanguage.php
Normal file
|
@ -0,0 +1,102 @@
|
|||
<?php
|
||||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
class AJAXChatLanguage {
|
||||
|
||||
var $_regExpAcceptLangCode;
|
||||
var $_availableLangCodes;
|
||||
var $_defaultLangCode;
|
||||
var $_strictMode;
|
||||
var $_langCode;
|
||||
|
||||
function __construct($availableLangCodes, $defaultLangCode, $langCode=null, $strictMode=false) {
|
||||
$this->_regExpAcceptLangCode = '/^([a-z]{1,8}(?:-[a-z]{1,8})*)(?:;\s*q=(0(?:\.[0-9]{1,3})?|1(?:\.0{1,3})?))?$/i';
|
||||
$this->_availableLangCodes = $availableLangCodes;
|
||||
$this->_defaultLangCode = $defaultLangCode;
|
||||
if($langCode && in_array($langCode, $availableLangCodes)) {
|
||||
$this->_langCode = $langCode;
|
||||
}
|
||||
$this->_strictMode = $strictMode;
|
||||
}
|
||||
|
||||
// Method to detect the language code from the HTTP_ACCEPT_LANGUAGE header:
|
||||
function detectLangCode() {
|
||||
// If HTTP_ACCEPT_LANGUAGE is empty use defaultLangCode:
|
||||
if(empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
||||
$this->_langCode = $this->_defaultLangCode;
|
||||
return;
|
||||
}
|
||||
|
||||
// Split up the HTTP_ACCEPT_LANGUAGE header:
|
||||
$acceptedLanguages = preg_split('/,\s*/', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
||||
|
||||
$currentLangCode = $this->_defaultLangCode;
|
||||
$currentLangQuality = 0.0;
|
||||
|
||||
foreach($acceptedLanguages as $acceptedLanguage) {
|
||||
// Parse the language string:
|
||||
$match = preg_match($this->_regExpAcceptLangCode, $acceptedLanguage, $matches);
|
||||
// Check if the syntax is valid:
|
||||
if(!$match) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Get and split the language code:
|
||||
$langCodeParts = explode ('-', $matches[1]);
|
||||
|
||||
// Get the language quality given as float value:
|
||||
if(isset($matches[2])) {
|
||||
$langQuality = (float)$matches[2];
|
||||
} else {
|
||||
// Missing language quality value is maximum quality:
|
||||
$langQuality = 1.0;
|
||||
}
|
||||
|
||||
// Go through it until the language code is empty:
|
||||
while(count($langCodeParts)) {
|
||||
// Join the current langCodeParts:
|
||||
$langCode = strtolower(join('-', $langCodeParts));
|
||||
// Check if the langCode is in the available list:
|
||||
if(in_array($langCode, $this->_availableLangCodes)) {
|
||||
// Check the quality setting:
|
||||
if ($langQuality > $currentLangQuality) {
|
||||
$currentLangCode = $langCode;
|
||||
$currentLangQuality = $langQuality;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// If strict mode is set, don't minimalize the language code:
|
||||
if($this->_strictMode) {
|
||||
break;
|
||||
}
|
||||
// else chop off the right part:
|
||||
array_pop($langCodeParts);
|
||||
}
|
||||
}
|
||||
|
||||
$this->_langCode = $currentLangCode;
|
||||
}
|
||||
|
||||
function getLangCode() {
|
||||
if(!$this->_langCode) {
|
||||
$this->detectLangCode();
|
||||
}
|
||||
return $this->_langCode;
|
||||
}
|
||||
|
||||
function setLangCode($langCode) {
|
||||
$this->_langCode = $langCode;
|
||||
}
|
||||
|
||||
function getLangCodes() {
|
||||
return $this->_availableLangCodes;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
92
public/chat/lib/class/AJAXChatMySQLDataBase.php
Normal file
|
@ -0,0 +1,92 @@
|
|||
<?php
|
||||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
// Class to initialize the MySQL DataBase connection:
|
||||
class AJAXChatDataBaseMySQL {
|
||||
|
||||
var $_connectionID;
|
||||
var $_errno = 0;
|
||||
var $_error = '';
|
||||
var $_dbName;
|
||||
|
||||
function __construct(&$dbConnectionConfig) {
|
||||
$this->_connectionID = $dbConnectionConfig['link'];
|
||||
$this->_dbName = $dbConnectionConfig['name'];
|
||||
}
|
||||
|
||||
// Method to connect to the DataBase server:
|
||||
function connect(&$dbConnectionConfig) {
|
||||
$this->_connectionID = @mysql_connect(
|
||||
$dbConnectionConfig['host'],
|
||||
$dbConnectionConfig['user'],
|
||||
$dbConnectionConfig['pass'],
|
||||
true
|
||||
);
|
||||
if(!$this->_connectionID) {
|
||||
$this->_errno = null;
|
||||
$this->_error = 'Database connection failed.';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Method to select the DataBase:
|
||||
function select($dbName) {
|
||||
if(!@mysql_select_db($dbName, $this->_connectionID)) {
|
||||
$this->_errno = mysql_errno($this->_connectionID);
|
||||
$this->_error = mysql_error($this->_connectionID);
|
||||
return false;
|
||||
}
|
||||
$this->_dbName = $dbName;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Method to determine if an error has occured:
|
||||
function error() {
|
||||
return (bool)$this->_error;
|
||||
}
|
||||
|
||||
// Method to return the error report:
|
||||
function getError() {
|
||||
if($this->error()) {
|
||||
$str = 'Error-Report: ' .$this->_error."\n";
|
||||
$str .= 'Error-Code: '.$this->_errno."\n";
|
||||
} else {
|
||||
$str = 'No errors.'."\n";
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
// Method to return the connection identifier:
|
||||
function &getConnectionID() {
|
||||
return $this->_connectionID;
|
||||
}
|
||||
|
||||
// Method to prevent SQL injections:
|
||||
function makeSafe($value) {
|
||||
return "'".mysql_real_escape_string($value, $this->_connectionID)."'";
|
||||
}
|
||||
|
||||
// Method to perform SQL queries:
|
||||
function sqlQuery($sql) {
|
||||
return new AJAXChatMySQLQuery($sql, $this->_connectionID);
|
||||
}
|
||||
|
||||
// Method to retrieve the current DataBase name:
|
||||
function getName() {
|
||||
return $this->_dbName;
|
||||
}
|
||||
|
||||
// Method to retrieve the last inserted ID:
|
||||
function getLastInsertedID() {
|
||||
return mysql_insert_id($this->_connectionID);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
89
public/chat/lib/class/AJAXChatMySQLQuery.php
Normal file
|
@ -0,0 +1,89 @@
|
|||
<?php
|
||||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
// Class to perform SQL (MySQL) queries:
|
||||
class AJAXChatMySQLQuery {
|
||||
|
||||
var $_connectionID;
|
||||
var $_sql = '';
|
||||
var $_result = 0;
|
||||
var $_errno = 0;
|
||||
var $_error = '';
|
||||
|
||||
// Constructor:
|
||||
function __construct($sql, $connectionID = null) {
|
||||
$this->_sql = trim($sql);
|
||||
$this->_connectionID = $connectionID;
|
||||
if($this->_connectionID) {
|
||||
$this->_result = mysql_query($this->_sql, $this->_connectionID);
|
||||
if(!$this->_result) {
|
||||
$this->_errno = mysql_errno($this->_connectionID);
|
||||
$this->_error = mysql_error($this->_connectionID);
|
||||
}
|
||||
} else {
|
||||
$this->_result = mysql_query($this->_sql);
|
||||
if(!$this->_result) {
|
||||
$this->_errno = mysql_errno();
|
||||
$this->_error = mysql_error();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Returns true if an error occured:
|
||||
function error() {
|
||||
// Returns true if the Result-ID is valid:
|
||||
return !(bool)($this->_result);
|
||||
}
|
||||
|
||||
// Returns an Error-String:
|
||||
function getError() {
|
||||
if($this->error()) {
|
||||
$str = 'Query: ' .$this->_sql ."\n";
|
||||
$str .= 'Error-Report: ' .$this->_error."\n";
|
||||
$str .= 'Error-Code: '.$this->_errno;
|
||||
} else {
|
||||
$str = "No errors.";
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
// Returns the content:
|
||||
function fetch() {
|
||||
if($this->error()) {
|
||||
return null;
|
||||
} else {
|
||||
return mysql_fetch_assoc($this->_result);
|
||||
}
|
||||
}
|
||||
|
||||
// Returns the number of rows (SELECT or SHOW):
|
||||
function numRows() {
|
||||
if($this->error()) {
|
||||
return null;
|
||||
} else {
|
||||
return mysql_num_rows($this->_result);
|
||||
}
|
||||
}
|
||||
|
||||
// Returns the number of affected rows (INSERT, UPDATE, REPLACE or DELETE):
|
||||
function affectedRows() {
|
||||
if($this->error()) {
|
||||
return null;
|
||||
} else {
|
||||
return mysql_affected_rows($this->_connectionID);
|
||||
}
|
||||
}
|
||||
|
||||
// Frees the memory:
|
||||
function free() {
|
||||
@mysql_free_result($this->_result);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
91
public/chat/lib/class/AJAXChatMySQLiDataBase.php
Normal file
|
@ -0,0 +1,91 @@
|
|||
<?php
|
||||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
// Class to initialize the MySQL DataBase connection:
|
||||
class AJAXChatDataBaseMySQLi {
|
||||
|
||||
var $_connectionID;
|
||||
var $_errno = 0;
|
||||
var $_error = '';
|
||||
var $_dbName;
|
||||
|
||||
function __construct(&$dbConnectionConfig) {
|
||||
$this->_connectionID = $dbConnectionConfig['link'];
|
||||
$this->_dbName = $dbConnectionConfig['name'];
|
||||
}
|
||||
|
||||
// Method to connect to the DataBase server:
|
||||
function connect(&$dbConnectionConfig) {
|
||||
$this->_connectionID = new mysqli(
|
||||
$dbConnectionConfig['host'],
|
||||
$dbConnectionConfig['user'],
|
||||
$dbConnectionConfig['pass']
|
||||
);
|
||||
if(!$this->_connectionID) {
|
||||
$this->_errno = mysqli_connect_errno();
|
||||
$this->_error = mysqli_connect_error();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Method to select the DataBase:
|
||||
function select($dbName) {
|
||||
if(!$this->_connectionID->select_db($dbName)) {
|
||||
$this->_errno = $this->_connectionID->errno;
|
||||
$this->_error = $this->_connectionID->error;
|
||||
return false;
|
||||
}
|
||||
$this->_dbName = $dbName;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Method to determine if an error has occured:
|
||||
function error() {
|
||||
return (bool)$this->_error;
|
||||
}
|
||||
|
||||
// Method to return the error report:
|
||||
function getError() {
|
||||
if($this->error()) {
|
||||
$str = 'Error-Report: ' .$this->_error."\n";
|
||||
$str .= 'Error-Code: '.$this->_errno."\n";
|
||||
} else {
|
||||
$str = 'No errors.'."\n";
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
// Method to return the connection identifier:
|
||||
function &getConnectionID() {
|
||||
return $this->_connectionID;
|
||||
}
|
||||
|
||||
// Method to prevent SQL injections:
|
||||
function makeSafe($value) {
|
||||
return "'".$this->_connectionID->escape_string($value)."'";
|
||||
}
|
||||
|
||||
// Method to perform SQL queries:
|
||||
function sqlQuery($sql) {
|
||||
return new AJAXChatMySQLiQuery($sql, $this->_connectionID);
|
||||
}
|
||||
|
||||
// Method to retrieve the current DataBase name:
|
||||
function getName() {
|
||||
return $this->_dbName;
|
||||
}
|
||||
|
||||
// Method to retrieve the last inserted ID:
|
||||
function getLastInsertedID() {
|
||||
return $this->_connectionID->insert_id;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
81
public/chat/lib/class/AJAXChatMySQLiQuery.php
Normal file
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
/*
|
||||
* @package AJAX_Chat
|
||||
* @author Sebastian Tschan
|
||||
* @copyright (c) Sebastian Tschan
|
||||
* @license GNU Affero General Public License
|
||||
* @link https://blueimp.net/ajax/
|
||||
*/
|
||||
|
||||
// Class to perform SQL (MySQLi) queries:
|
||||
class AJAXChatMySQLiQuery {
|
||||
|
||||
var $_connectionID;
|
||||
var $_sql = '';
|
||||
var $_result = 0;
|
||||
var $_errno = 0;
|
||||
var $_error = '';
|
||||
|
||||
// Constructor:
|
||||
function __construct($sql, $connectionID) {
|
||||
$this->_sql = trim($sql);
|
||||
$this->_connectionID = $connectionID;
|
||||
$this->_result = $this->_connectionID->query($this->_sql);
|
||||
if(!$this->_result) {
|
||||
$this->_errno = $this->_connectionID->errno;
|
||||
$this->_error = $this->_connectionID->error;
|
||||
}
|
||||
}
|
||||
|
||||
// Returns true if an error occured:
|
||||
function error() {
|
||||
// Returns true if the Result-ID is valid:
|
||||
return !(bool)($this->_result);
|
||||
}
|
||||
|
||||
// Returns an Error-String:
|
||||
function getError() {
|
||||
if($this->error()) {
|
||||
$str = 'Query: ' .$this->_sql ."\n";
|
||||
$str .= 'Error-Report: ' .$this->_error."\n";
|
||||
$str .= 'Error-Code: '.$this->_errno;
|
||||
} else {
|
||||
$str = "No errors.";
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
// Returns the content:
|
||||
function fetch() {
|
||||
if($this->error()) {
|
||||
return null;
|
||||
} else {
|
||||
return $this->_result->fetch_assoc();
|
||||
}
|
||||
}
|
||||
|
||||
// Returns the number of rows (SELECT or SHOW):
|
||||
function numRows() {
|
||||
if($this->error()) {
|
||||
return null;
|
||||
} else {
|
||||
return $this->_result->num_rows;
|
||||
}
|
||||
}
|
||||
|
||||
// Returns the number of affected rows (INSERT, UPDATE, REPLACE or DELETE):
|
||||
function affectedRows() {
|
||||
if($this->error()) {
|
||||
return null;
|
||||
} else {
|
||||
return $this->_connectionID->affected_rows;
|
||||
}
|
||||
}
|
||||
|
||||
// Frees the memory:
|
||||
function free() {
|
||||
$this->_result->free();
|
||||
}
|
||||
|
||||
}
|
||||
?>
|