在此留言框中接收消息时,我几乎不需要帮助添加mp3声音
谢谢
我试图编辑这些文件noajax.php,index.php和getajax.js
我做不到
编辑
这是索引代码
<?php include_once("config.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title><?php echo $title; ?></title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<style type="text/css">
body {text-align: center;
font-family: Verdana;
font-size: 12px;}
</style>
</head>
<body onload="ajaxpage('display.php?page=1', 'chat'); ajaxpage('pages.php', 'pages'); update();">
<div id="body" style="border: solid; margin-left: 40%; margin-right: 40%; border-width: 2px;">
<div id="head" style="text-align: <?php echo $header_align; ?>; font-size: <?php echo $header_size; ?>;"><?php echo $title; ?><br />
</div><div id="user"><?php
if ($_GET['msg']) {
echo htmlentities($_GET['msg']) . "<br /> "; }
if ($login=="ok") { ?>
Hey <?php echo $username; ?>!
<?php if ($privledges=="2") { ?>
<a href="admin.php?returnto=nojs">Admin Area</a>
<?php } ?>
<a href="logout.php?returnto=noajax">Logout?</a>
<?php } else { ?>
<a href="login.php?returnto=nojs">Login</a> | <a href="register.php?returnto=nojs">Register</a>
<?php } ?></div>
<div id="content">
<?php
if ($form_place=="top")
{
include "form.php";
}
?>
<div id="chat"><?php
$_REQUEST['nojs'] = 1;
if ($_GET['page']) {
$_REQUEST['page'] = $_GET['page']; }
else {
$_REQUEST['page'] = 1; }
require("display.php"); ?></div>
<?php if ($form_place=="bottom")
{
include "form.php";
}
?>
</div>
<div style="text-align: center; border-top: solid; border-width: 2px;" id="pages"><?php include "pages.php"; ?></div>
<div style="text-align: center; border-width: 2px;" id="valid"><br /><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Transitional" height="31" width="88" style="border: none;" /></a><br /><a href="http://shoutr.sf.net">Shoutr</a>: Powered by MySQL.</div>
</div>
</body>
</html>
这是js代码,它负责使注释在打开同一页面的所有客户端上同时出现,我也曾尝试对其进行编辑,但我无法对其进行编辑
/***********************************************
* Dynamic Ajax Content- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
var bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no)
var loadedobjects=""
var rootdomain="http://"+window.location.hostname
var bustcacheparameter=""
function ajaxpage(url, containerid){
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
}
catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
page_request.onreadystatechange=function(){
loadpage(page_request, containerid)
}
if (bustcachevar) //if bust caching of external page
bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
page_request.open('GET', url+bustcacheparameter, true)
page_request.send(null)
}
function loadpage(page_request, containerid){
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
document.getElementById(containerid).innerHTML=page_request.responseText
}
function loadobjs(){
if (!document.getElementById)
return
for (i=0; i<arguments.length; i++){
var file=arguments[i]
var fileref=""
if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding
if (file.indexOf(".js")!=-1){ //If object is a js file
fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript");
fileref.setAttribute("src", file);
}
else if (file.indexOf(".css")!=-1){ //If object is a css file
fileref=document.createElement("link")
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
fileref.setAttribute("href", file);
}
}
if (fileref!=""){
document.getElementsByTagName("head").item(0).appendChild(fileref)
loadedobjects+=file+" " //Remember this object as being already added to page
}
}
}