汎用足跡 4.01

[diary:172224]
[beforeExec]



cleateCssViewMenu = function(){
echo("cssViewDisp", "■CSSの表示 ⇒ " +
"common main menu profile diary bbs bbs_form friends links footprint".replace(
/([a-z_]+)/g, '\x3ca href=javascript:cssView("$1")>$1\x3c/a>') +

' \x3ca href=javascript:cssView("")>close\x3c/a>'
);
};
cssView = function(file){
if(file == "") Fid("cssDisp").style.display = "none";

else Fx.e("/home/" + Fx.user + "/" + file + ".css", "css");
};
Lo.css = function(){

var o = echo("cssDisp" , res(Re.css));
o.style.display = "block";
};
entry = function(){
Fx.user = Fx.loc.match(/user=([\w\-]+)/) ? RegExp.$1 : "yadokari";
modeDispEntry();
Fx.e("/cgi-bin/footprint.cgi?oid=" + Fx.user);
return;
cleateCssViewMenu();
};
Fx.footprint = function(user){
Fx.user = user;
Fx.uri = "/cgi-bin/footprint.cgi?oid=" + user;
Fx.mode = "footprint";

Fx.e(Fx.uri);
};
ft = function(o){
Fx.footprint(o.user.value);
};

Fx.ent = function(){
switch(Fx.mode){


case "css" : Fx.ent_css(); break;
case "source" : Fx.ent_source(); break;
default : break;
}

};

Lo.entry = function(s){
s = s.replace(/^.+?(<body\s)/, "$1").replace(/(<\/body>).+?$/, "$1");

s = s.replace(/(counter">)(.+?<$$\/div>)/, "$1<$$div id='uP'>.<$$/div>\x3cdiv class='since'>$2<$$/div>");
Fx.owner = s.match(/class="add"/) ? true : false;

s = s.replace(/\x3cdiv\sid="back.+\x3c\/div>/, "");
s = s.replace(/\x3ccolgroup.+?\/colgroup>|\x3ctd\sclass="add".+?\x3c\/td>/g, "");

s = s.replace(/(\d)\s\s時/g, "(0$1)").replace(/(\d\d)\s時/g, "($1)");

s = s.replace(/(<caption>)(.+?)(\d+)(.+?<\/caption>)/g, "$1■$2<$$span>$3<$$/span>$4");
s = s.replace(/(<caption>)(.+?)(<\/caption>)/, "$1$2 ⇒ <$$a href='javascript:Fx.o1();'>重複しているIDは<$$span id='u1'>.<$$/span>件です<$$/a>$3");

s = s.replace(/(day">)(\d{4}\s\d\d\/\d\d)/g, function(e0,e1,e2){
return e1 + e2 + " " + Po.dateByDay(e2,1);}
);
n = 1;
s = s.replace(/(date">)(\d{4}\s\d\d\/\d\d\s\d\d:\d\d)/g, function(e0,e1,e2){

return 'no">' + n++ + '\x3c/td>\x3ctd class="' + e1 + e2;}
);
s = s.replace(/([a-z0-9_\-]+)(<$$\/a><\/td>\s*<$$td\sclass="message)(">)(.*?)(<\/td>)/g,

function(e0,e1,e2,e3,e4,e5){
return (
e1 + e2 + (e4 == "" ? " non" : "") + e3 +
"\x3ca href='main.html?diary=172224&user=" + e1 + "')>" +

(e4 == "" ? "言葉は少なめ" : e4.replace(/^(.{15}).+/, "$1..")) + "\x3c/a>" + e5
);}
);

s = s.replace(/(<table\s)/g, "$1cellpadding='0' cellspacing='0' ");
s = s.replace(/(\swidth=")(\d+)(")/g, function(e0,e1,e2,e3){
return e1 + Math.floor(e2 * 1.5) + e3;

});

s = s.replace(/(<table.+?<\/table>)/g, "\x3cdiv class='tableDisp'>$1\x3c/div>");
var a,b;
if(a = s.match(/<tr><td class="day">.+?<\/tr>/gm)){
b = a[0]; if(a.length > 1) b += a[1];
b = b.replace(/(\swidth=")(\d+)(")/g, function(e0,e1,e2,e3){
return e1 + Math.floor(e2 * .25) + e3;
});
echo("menuDays", "<table cellpadding='0' cellspacing='0' border='0'><tbody>" + b + "</tbody></table>");
}
echo("mainEx1", s);
/*
Fid("cssDisp").value = "";

Fid("sourceDisp").value = "";
Fid("eclat_diary").href = "main.html?no=103&user=" + Fx.user;
Fid("eclat_bbs").href = "main.html?no=105&user=" + Fx.user;

setTimeout("afterExec()", 50);
*/
};

mlinks = function(s, n){
var s2 = ["main", "profile", "friends", "links", "bbs", "footprint", "diary",

"bbs", "footprint", "diary"];
return "<$$a href='" + (s < 4 ? "/home/" + n + "/" : s < 7 ? "/cgi-bin/" : "main.html?sys_") +

"";
};

afterExec = function(){
var obj = Fid("messages");
var o = Ftag(obj, "tr");

var str = " ",n = 0,a,b,c,c1,o1;
var r = "<a target='_blank' href='";
var s2 = ["main", "profile", "friends", "links", "bbs", "footprint", "diary",

"bbs", "footprint", "diary"];

for(var i = 0; i < o.length; i++){
o1 = Ftag(o[i], "td");

b = Ftn(Ftag(o1[2], "a")[0]);
a = b + " ";
if(str.indexOf(a) != -1){
o[i].className = "sec";

n++;
} else str += a;
o1[0].innerHTML = r + "/home/" + b + "/menu.html'>" + Ftn(o1[0]) + "";
c1 = Ftn(o1[1]);

c = c1.split(" ");
cc = 0;
o1[1].innerHTML =
c[0].replace(/(\d)/g, function(e0,e1){
return r + "../" + b + "/" + s2[cc++] + ".html'>" + e1 + "";}) + " " +

c[1].replace(/(\d\d|\/)/g, function(e0,e1){
return r + "/cgi-bin/" + s2[cc++] + ".cgi?oid=" + b + ";n=30'>" + e1 + "";}) + " " +

c[2].replace(/(\d\d|:)/g, function(e0,e1){
return r + "main.html?sys_" + s2[cc++] + "&user=" + b + "'>" + e1 + "";}) + " " +

Po.dateByDay(c1,1);
}
Fid("u1").firstChild.nodeValue = n;
var r1 = r + "/home/" + Fx.user + "/";

var r2 = r + "/cgi-bin/";
echo("uP",
"\x3ca href='main.html?diary=172224&user=" + Fx.user + "'>Fx.user(" + Fx.user + ")\x3c/a>" +

" ⇒_self / " + r1 + "'>home\x3c/a> " + r1 + "menu.html'>menu\x3c/a> " +
r1 + "main.html'>main\x3c/a> " + r1 + "profile.html'>profile\x3c/a> " +

r1 + "friends.html'>friends\x3c/a> " + r1 + "links.html'>links\x3c/a> " +
r2 + "bbs.cgi?oid=" + Fx.user + ";n=30'>bbs\x3c/a> " +

r2 + "diary.cgi?oid=" + Fx.user + ";n=30'>diary\x3c/a> " +
r2 + "footprint.cgi?oid=" + Fx.user + "'>footprint\x3c/a> ⇒_blank"

);

var o = Fid("rer");
var op = o.options;
var ne = false;
for(var i = 0; i < op.length; i++){

if(op[i].value == Fx.user){
ne = true;
break;
}
}
var a;

if(ne){
o.insertBefore(op[i], op[0]);
} else {
a = Fce("option");
Fap(a, Fctn(Fx.user));

a.value = Fx.user;
if(op.length == 0){
Fap(o, a);
} else {
o.insertBefore(a, op[0]);
}

}
o.selectedIndex = 0;
};

Fx.o1 = function(){
var o = Fid("messages");
o.className = o.className == "" ? "userSec" : "";

};

Fx.o2 = function(s){
Fx.uri = "/home/" + Fx.user + "/" + s + ".css";
Fx.mode = "css";

Fget();
};

Fx.o3 = function(s){
Fx.uri = "/home/" + Fx.user + "/" + s + ".html";

Fx.mode = "source";
Fget();
};

Fx.ent_css = function(){
var o = Fid("cssDisp");

var str = Fx.str.replace(/\ /gm, " ");
o.className = "show";
o.value = str;
};


Fx.dispClose = function(s){
var o = Fid(s + "Disp");
o.className = o.className == "show" ? "hide" : "show";

};

Fx.ent_source = function(){
var o = Fid("sourceDisp");
var str = Fx.str.replace(/\x09/gm, " ");
o.className = "show";

o.value = str;
};

selChange = function(){
var o = Fid("rer");
Fx.footprint(o.options[o.selectedIndex].value);
};

[/beforeExec]

[cssText]
hr { display:none; }
html { background:none; padding-left:0px; }
a { text-decoration:none; }
#showDisp { font-size:90%; }
#menu { width:30%; float:right; }
#menuExDisp { padding:1em .5em 1em 1em; }
div.menuBox {
margin:1em .5em 1em 1em; font-size:90%;
border:1px dashed orange;
border-radius:4px; -moz-border-radius:4px;
padding:.5em;
}

#main { margin-right:30%; }
.menu_logo { text-align:center; font:110%/1.2 "Times New Roman"; }
.menu_logo a { text-decoration:none; }

#link_here,.link_here {
list-style-image:url(files/listitem.png);
}


#modeDisp, .menuMsg {
margin:1em 0em; padding:.5em 0 .25em 0;
background-color:#ffefff;
border:1px dashed orange;
-moz-border-radius:10px; border-radius:10px;
}
.menuMsg {
margin:1em 0em; padding:.5em;
background-color:#ffefff;
border:1px dashed orange; font:90%/1.2 "Times New Roman"; color:#808080;
-moz-border-radius:10px; border-radius:10px;
}
#modeDisp div.link_info {
margin-left:1em; font-weight:bold;
padding-left:40px; line-height:35px;
font-family:"Times New Roman"; color:#808080;
background:url(files/hamu_folder2.gif) no-repeat;
}
#modeDisp div.link_info span { color:red; }
ul {
padding:0px; margin-left:26px; margin-top:0px;
margin-bottom:0px;
}
li { margin:0px; }

#modeDisp ul { margin-top:.5em; margin-bottom:.5em; }
#modeDisp ul li { margin-bottom:.25em; }
#modeDisp a { text-decoration:none; color:#000; }
#modeDisp a:hover { color:blue; }

#mainExDisp {
padding:1em 0px;
}
#headerDisp {
background:url(files/yosei_2.gif) no-repeat; padding-left:62px;
height:60px; margin-bottom:.5em; color:navy;
text-shadow:3px 3px 6px #808080; filter:shadow(color=#808033,direction=135);
}
.t1 { margin-top:1em; font-size:80%; text-align:right;}

#m2ex .link {

margin-bottom:1em;
}
.nonUser { background:url(files/yukikko2b.gif) no-repeat center top;
padding-top:200px; text-align:center; padding-bottom:2em;
color:#808080;
}
.nonUser span { color:tomato; }
.form3 {
padding:.25em .5em; border:2px outset white;
border-radius:3px; -moz-border-radius:3px;
background-color:orange; color:#000; margin-bottom:.5em;
}

.form3 a { color:gold; }
.form_title { margin-bottom:2px; }
.form_body { text-align:right; color:red; }
.form_body input { color:#333; margin-left:2px; }
.s1 {
font-size:90%; font-family:"Comic Sans MS"; color:#000;
text-shadow:2px 2px 2px #808080;
}

.s2 {
font-size:70%; color:#ccc;
text-shadow:2px 2px 2px #808080;
}
span.Res, span.post_no { border:1px solid darkgreen; -moz-border-radius:10px; border-radius:10px;
padding-left:.25em; padding-right:.25em; background-color:darkgreen; color:#fff;
font-family:"Comic Sans MS"; font-size:70%;
}

.tableDisp {
background: url(http://www.nancyan.net/futari/ringnote.gif) repeat-y -5px top;
margin-bottom:1em; padding-left:60px;
border-top:1px solid #add8e6;
border-right:1px solid #add8e6;
border-bottom:1px solid #add8e6;
}
.tableDisp table { width:100%; background:url(files/kabe12.gif); }
td {border-bottom:1px solid #ccc; line-height:1em; padding:.25em; font-size:10pt; }
td.non {text-align:right;}

.message a:link {color:steelblue;}
.message a:visited {color:darkgreen;}
.message a:hover {color:magenta;}
.non a:link {color:tomato;}
td.user_id a:visited {
background-color:yellow; color:red;
float:right;
}

td.user_id a:hover {
color:magenta; background-color:transparent;
}
div.ds1 {float:left;}

a img {border:none;}
span.day0 {color:red;}
span.day1 {color:#808080;}
span.day6 {color:blue;}


td.graph img {
border-top-style:solid;
border-top-width:9px;
height:1px;
}
#days td.graph img, #menuDays td.graph img { border-top-color:orange; }
#hours td.graph img { border-top-color:lime; }

#wdays td.graph img { border-top-color:steelblue; }

#back_link{clear:both;}


td.count {text-align:right;}
td.wday {color:#808080;}
td.no {text-align:right;}
[/cssText]

.hide { display:none; }
.show { display:block; }
form { margin:0; }
body {margin:0; font-size:10pt; padding-left:1em; }
a {text-decoration:none;}
div.sysDispBefore {

font-size:18pt; color:steelblue; margin:8px;
background:url(files/hamu_folder1.gif) no-repeat; padding:10px 38px 15px;
}
#counter {
background:url(files/y_line_b.gif) no-repeat left 10px; display:block;
text-align:left; padding:15px 0px 20px 50px;
margin-left:.5em;

}
#counter div.user {
font-family:"Arial Black"; color:blueviolet;
font-size:13pt; margin-bottom:4px;
}
#counter div.since { color:darkgreen; }


caption {color:#000; text-align:left; font-size:10pt; margin-right:.25em;
padding:.25em; border-bottom:1px solid #ccc; line-height:1em;
background-color:lavender; white-space:nowrap;
}
caption span {color:steelblue; margin-left:.25em; margin-right:.25em; }
#messages { width:65%; float:left; margin-right:.25em;}
td {border-bottom:1px solid #ccc; line-height:1em; padding:.25em; font-size:10pt; white-space:nowrap; }
td.non {text-align:right;}

.message a:link {color:steelblue;}
.message a:visited {color:darkgreen;}
.message a:hover {color:magenta;}
.non a:link {color:tomato;}
td.user_id a:visited {
background-color:yellow; color:red;
float:right;
}

td.user_id a:hover {
color:magenta; background-color:transparent;
}
div.ds1 {float:left;}

a img {border:none;}
span.day0 {color:red;}
span.day1 {color:#808080;}
span.day6 {color:blue;}


td.graph img {
border-top-style:solid;
border-top-width:9px;
height:1px;
}
#days td.graph img { border-top-color:orange; }
#hours td.graph img { border-top-color:lime; }

#wdays td.graph img { border-top-color:steelblue; }

#back_link{clear:both;}


td.count {text-align:right;}
td.wday {color:#808080;}
td.no {text-align:right;}
#footerDisp { clear:both; margin-right:1em; }
#messages.userSec tr.sec {display:none;}

#userSelect { width:150px; }
#uP { color:#808080; white-space:nowrap; }
#cssDisp {width:90%; background-color:#eeeeff;}
#sourceDisp {width:90%; background-color:#ffefff; }
#footprintMenu { margin-bottom:.5em; }
#footprintMenu div { white-space:nowrap; }
#footprintMenu a { text-decoration:underline; }
.since { white-space:nowrap; }
.fxxForm { background-color:lavender; text-align:center; white-space:nowrap; }

select{ font-size:10pt; width:20em;}
a.btn { color:darkgreen; }
a.btn:hover { background-color:darkgreen; color:#fff; }
#sysDisp a { text-decoration:underline; }

[body]
<$$div id="showDisp">
<$$div id="menu">
<$$div id="menuExDisp"><$$/div>
<$$div id="menuDays" class="menu_box"><$$/div>
<$$div id="menuLinks" class="menu_box">

<$$/div>
<$$/div>

<$$div id="main"><$$div id="mainExDisp">
<$$div id="headerDisp"><$$/div>
<$$div id="mainEx1"><$$/div>
<$$/div><$$/div>

</$$div>
[/body]

[exec]
entry();
document.title = "104 汎用足跡 4.0.1";
[/exec]
[/diary:172224]

■仕様書 2010 04/04 06:29 Wrote