チャットシステム
[beforeExec]
Lo.entry = function(){
var s = Re.entry.responseText.replace(/\r?\n/g, "\t");
s = s.match(/\x3ctextarea.+?>(.+)\x3c\/textarea>/) ? Fx.dec(RegExp.$1) : "";
Fx.chat = s.replace(/\t/g, "\n");
s = s.replace(/\t/g, "\x3cbr \/>\n");
echo("listDisp", s);
Fid("newPostData").focus();
};
updateRes = function(){
Fid("newPostData").value = "";
entry();
};
updateTime = function(){
var d = new Date();
var s = d.toLocaleString();
s = s.replace(/(\d+)年(\d+)月(\d+)日/, "$1 $2/$3");
s = s.replace(/ (\d\/)/, " 0$1");
return s;
};
newPostSubmit = function(){
var obj = Fid("newPostData");
Fx.chat = "\x3cspan class='user'>" + (Vis.oid == "nancyan" ? "なんちゃん" : "葉月") + "\x3c/span> : \x3cspan class='dat" + (Vis.oid == "nancyan" ? "1" : "0") + "'>" + obj.value + "\x3c/span> \x3cspan class='date'>(" + updateTime() + ")\x3c\/span>\n" + Fx.chat;
var dat =
"category_id=694&category_name=&article_title=" +
encodeURIComponent("恋のチャットシステム") +
"&article_sentences=" +
encodeURIComponent(Fx.chat) +
"&" + "mode=update&article_notify=0&article_id=157211" +
"&oid=" + Vis.oid + "&before=edit";
Fx.ent = updateRes;
req = Freq();
req.onreadystatechange = reqEntry;
req.open("post", "/cgi-bin/diary_form.cgi", true);
req.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
req.send(dat);
return false;
};

entry = function(){
if(Vis.oid == "nancyan" || Vis.oid == "botanic"){
Fx.e("/cgi-bin/diary_form.cgi?oid=" + Vis.oid + ";mode=edit;article_id=157211");

}
};


[/beforeExec]
[cssText]
#listDisp {
margin:1em 4em;
line-height:1.6em;
font-size:11pt;
}
.user { color:darkgreen; font-weight:bold; }
.dat0 { color:#896952; }
.dat1 { color:#000; }
.date { color:#808080; }
#newPostData {
background-color:#ffefff; border:1px solid skyblue;
}
#footerDisp { display:none; }
[/cssText]
[body]
<$$center>
<$$img src="/home/nancyan/files/yukikko2b.gif" alt="雪っ子" />

<$$form action="#" accept-charset="UTF-8" onsubmit="return newPostSubmit()">
<$$center>
<$$input type="text" size="50" id="newPostData" />
<$$input type="submit" value="送信(*^(^* )" />

<$$/form>

<$$div id="listDisp"><$$/div>

[/body]
[exec]
document.title = "エクラのチャットシステム";
entry();
[/exec]