- Kód: Vybrať všetko
<?php
/*---------------------------------------------------+
| TinyChat 1.20 Infusion für PHP-Fusion 6.00 CMS |
|----------------------------------------------------|
| author: Christian Wolf (Lupo) Š 2005 |
| web: http://1swift1@azet.sk |
| email: 1swift1@azet.sk |
+---------------------------------------------------+
| Released under the terms & conditions of v2 of the |
| GNU General Public License. For details refer to |
| the included gpl.txt file or visit http://gnu.org |
+---------------------------------------------------*/
// Parameter: anzahl - bestimmt die anzahl der angezeigten einträge
// (optional, sonst werden alle einträge angezeigt)
// Parameter: bodyclass - bestimmt die class für den body-tag
// (optional)
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright Š 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "../../maincore.php";
require_once "ls_tinychat_settings.php";
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=".$locale['charset']."'>
<link rel='stylesheet' href='".THEME."styles.css' type='text/css'>
<script type='text/javascript'>
function scrolldown() {window.scrollBy(0, 65000)};
window.onload=scrolldown;
var counter = 0;
var numrows = 0;
function insert_name(name)
{
if (!parent.document.inputform)
return true;
var message = parent.document.inputform.chat_message;
if (message.value == '')
name += ': ';
else
name += ' ';
if (message.createTextRange) {
message.focus();
parent.document.selection.createRange().duplicate().text = name;
} else if ((typeof message.selectionStart) != 'undefined') { // for Mozilla
var selEnd = message.selectionEnd;
var txtLen = message.value.length;
var txtbefore = message.value.substring(0,selEnd);
var txtafter = message.value.substring(selEnd, txtLen);
var oldScrollTop = message.scrollTop;
message.value = txtbefore + name + txtafter;
message.selectionStart = txtbefore.length + name.length;
message.selectionEnd = txtbefore.length + name.length;
message.scrollTop = oldScrollTop;
message.focus();
} else {
message.value += name;
message.focus();
}
return false;
}
</script>
</head>
<body class = '".$bodyclass."'>\n";
$result = dbquery("SELECT count(ls_chat_id) FROM ".$db_prefix."ls_chat");
$numrows = dbresult($result, 0);
echo "<script type='text/javascript'>
numrows = $numrows;
counter = $numrows;
</script>";
if ($numrows > 0) {
if (!isset($anzahl) || ($anzahl > $numrows)) $anzahl = $numrows;
$result = dbquery(
"SELECT * FROM ".$db_prefix."ls_chat LEFT JOIN ".$db_prefix."users
ON ".$db_prefix."ls_chat.ls_chat_name=".$db_prefix."users.user_id
ORDER BY ls_chat_datestamp ASC LIMIT ".($numrows-$anzahl).",$anzahl"
);
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {
echo "<br><br><span class='shoutboxname'>";
if ($data['user_name']) {
echo "<span class='shoutboxdate'>".showdate("shortdate", $data['ls_chat_datestamp'])."</span>\n<a href='".BASEDIR."profile.php?lookup=".$data['ls_chat_name']."' target='_parent' class='side' onclick='return insert_name(\"".$data['user_name']."\");'>".$data['user_name']."</a>\n";
} else {
echo "<span class='shoutboxdate'>".showdate("shortdate", $data['ls_chat_datestamp'])."</span> ".$guestmarker_l.$data['ls_chat_name'].$guestmarker_r."\n";
}
echo "</span>
<span class='shoutbox'>".parsesmileys($data['ls_chat_message'])."</span>";
}
}
}
echo "
<script type='text/javascript'>
window.setInterval('checkmsgs()', 1000);
function checkmsgs() {
if (numrows != counter) {
window.location.reload();
}
}
</script>
</body>
</html>";
?>
potrebujem to prerobit a
a pridat tam ked sa klikne sa na uzivatela nech prida jeho nick do textu a da za nim dvojbodku







News
![Validate my Atom 1.0 feed [Valid Atom 1.0]](http://validator.w3.org/feed/images/valid-atom.png)