?? header.php
字號:
<?
session_start();
include "aup.php";
include_once "class_character.php";
require("Sajax.php");
header("Content-Type:text/html;charset=gb2312");
function add_chat_line($text) {
global $PHP_PHAOS_USER;
$text = strip_tags($text);
$bb_replace = array('[b]', '[B]', '[/b]', '[/B]', '[i]', '[I]', '[/i]', '[/I]', '[u]', '[U]', '[/u]', '[/U]');
$bb_replacements = array('<b>', '<b>', '</b>', '</b>', '<i>', '<i>', '</i>', '</i>', '<u>', '<u>', '</u>', '</u>');
$text = str_replace($bb_replace,$bb_replacements,$text);
$result = mysql_query('SELECT location, name FROM phaos_characters WHERE username = \''.$PHP_PHAOS_USER.'\'');
$row = mysql_fetch_assoc($result);
mysql_query ('INSERT INTO phaos_shout (location, postname, postdate, posttext) VALUES (\''.$row['location'].'\', \''.$row['name'] . '\', \''.mktime().'\',\'' . $text . '\')');
}
function refresh() {
$result = mysql_query ('SELECT * FROM phaos_characters WHERE username = \'' . $_COOKIE[PHP_PHAOS_USER] . '\'');
if ($row = mysql_fetch_array($result)) {
$char_location = $row["location"];
$char_name = $row['name'];
}
$result = mysql_query ('SELECT * FROM phaos_shout WHERE location = \'' . $char_location .'\' OR destname=\''.$char_name.'\' OR destname = \'admin\' ORDER BY postdate DESC LIMIT 0, 10');
while ($row = mysql_fetch_array($result)) {
$color = '';
if($row['destname'] == 'admin') {
$color = "red";
}
if($row['destname'] == $char_name) {
$color = "yellow";
}
if ($color == '') {
$color = "white";
}
print '<hr><div align="left"><font color="'.$color.'">' . $row['postname'] . ' 在 ' . date('Y/m/d H:i', $row['postdate']) . ' 說道<br><br> '. $row['posttext'] .' <br></font>';
}
$result = mysql_query ('SELECT * FROM phaos_shout');
while ($row = mysql_fetch_array($result)) {
$current_time = time();
$time_check = $current_time-$row['postdate'];
if($time_check > '86400') {
$delete_extras = mysql_query ('DELETE FROM phaos_shout WHERE id = \''.$row['id'].'\' ');
}
}
}
$sajax_request_type = "GET";
sajax_init();
sajax_export("add_chat_line", "refresh");
sajax_handle_client_request();
?>
<html>
<head>
<script>
<? sajax_show_javascript(); ?>
function refresh_chat(new_data) {
document.getElementById("chat_right_side").innerHTML = unescape(new_data);
}
function refresh() {
x_refresh(refresh_chat);
}
function add_chat_line_cb() {
refresh();
}
function add_chat_line() {
var chat_text;
chat_text = document.chat_form.chat_text.value;
x_add_chat_line(chat_text,add_chat_line_cb);
document.chat_form.chat_text.value="";
}
</script>
<style type="text/css">
<!--
body {
background-image: url(images/iso_table01.jpg);
background-repeat: no-repeat;
background-position: 50px 50px;
}
//-->
</style>
<meta name="author" content="Zeke Walker">
<title><? echo "$SITETITLE"; ?></title>
<link rel=stylesheet type="text/css" href="styles/phaos.css">
</head>
<body bgcolor=#000000 onFocus="refresh();">
<!-- START HELP MENU CODE -->
<SCRIPT SRC="help_ssm.js" language="JavaScript"></script>
<SCRIPT language="JavaScript">
<!--
<?
$current_file = $_SERVER["SCRIPT_NAME"];
$current_file_parts = explode('/', $current_file);
$current_file = $current_file_parts[count($current_file_parts) - 1];
$result = mysql_query ("SELECT id,title FROM phaos_help WHERE file = '$current_file' ORDER BY title ASC");
if ($row = mysql_fetch_array($result)) {
$num = 0;
?>
/*
Configure menu styles below
NOTE: To edit the link colors, go to the STYLE tags and edit the ssm2Items colors
*/
YOffset=10; // no quotes!!
XOffset=0;
staticYOffset=5; // no quotes!!
slideSpeed=20 // no quotes!!
waitTime=500; // no quotes!! this sets the time the menu stays out for after the mouse goes off it.
menuBGColor="#000000";
menuIsStatic="yes"; //this sets whether menu should stay static on the screen
menuWidth=180; // Must be a multiple of 10! no quotes!!
menuCols=2;
hdrFontFamily="verdana";
hdrFontSize="2";
hdrFontColor="#000000";
hdrBGColor="#EFEFEF";
hdrAlign="left";
hdrVAlign="center";
hdrHeight="20";
linkFontFamily="Verdana";
linkFontSize="2";
linkBGColor="green";
linkOverBGColor="#EFEFEF";
linkTarget="_top";
linkAlign="Left";
barBGColor="#FFFFFF";
barFontFamily="Verdana";
barFontSize="2";
barFontColor="#000000";
barVAlign="middle";
barWidth=32; // no quotes!!
barText="HELP<IMG SRC=images/help.gif>"; // <IMG> tag supported. Put exact html for an image to show.
// ssmItems[...]=[name, link, target, colspan, endrow?] - leave 'link' and 'target' blank to make a header
ssmItems[0]=["Topics"] //create header
<?
do {
$num++;
?>
var num = "<? print $num; ?>";
ssmItems[num]=["<? print $row[title]; ?>", "help.php?id=<? print $row[id]; ?>", "_new"]
<?
} while($row = mysql_fetch_array($result));
?>
buildMenu();
<?
}
?>
//-->
</script>
<!-- END HELP MENU CODE -->
<table width=100%>
<tr>
<td align=center width=175 valign=top rowspan=2>
<img src="images/top_logo.png">
<? include "side_bar.php"; ?>
</td>
<td align=center valign=top>
<? include "menu.php"; ?>
</td>
<td align=center width=250 valign=top rowspan=2>
<form name="chat_form">
<textarea cols="20" rows="3" name="chat_text"></textarea>
<br>
<br>
<button type="button" onClick="add_chat_line();"><? echo $lang_post["submit"]; ?></button>
</form>
<div id="chat_right_side"></div>
</td>
</tr>
<tr>
<td align=center valign=top>
<table cellspacing=0 cellpadding=5 border=0 width=90%>
<tr>
<td align=center valign=top>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -