📄 startpage.htm
字号:
<html>
<head>
<title>KCeasy Start Page</title>
<style type="text/css">
/* general stuff */
body
{
margin:5px;
padding:0px;
background-color:#FFFFFF;
}
/* pseudo stuff */
a:link { color: #4F8AFF; text-decoration:none; }
a:visited { color: #4F8AFF; text-decoration:none; }
a:hover { color: #4F8AFF; text-decoration:underline; }
a:active { color: #4F8AFF; text-decoration:underline; }
/* kceasy box */
.Logo
{
margin:5px;
padding:0px;
font-family:Verdana,Arial;
font-size:11;
font-weight:normal;
color:#000000;
}
.Logo #Image
{
text-align:center;
}
.Logo #VersionDateId
{
margin-top:5px;
text-align:center;
}
/* floating box */
.FloatingBox
{
margin:5px 5px 5px 5px; /* top right bottom left*/
padding:0px;
font-family:Verdana,Arial;
font-size:11;
font-style:normal;
color:#000000;
white-space:nowrap;
border-style:solid;
border-width:1px;
border-color:#4F8AFF;
}
.FloatingBoxHeader
{
padding:1px 4px 1px 4px; /* top right bottom left*/
color:#FFFFFF;
text-align:center;
font-size:11;
font-weight:bold;
white-space:nowrap;
border-bottom-style:solid;
border-bottom-width:1px;
border-bottom-color:#4F8AFF;
background-color:#4F8AFF;
}
.FloatingBoxBody
{
padding:5px;
font-size:11;
font-weight:normal;
white-space:nowrap;
}
.FloatingBoxSeparator
{
padding:0px;
margin:0px;
border-top-style:solid;
border-top-width:1px;
border-top-color:#4F8AFF;
}
.FloatingBoxFooter
{
padding:5px;
text-align:center;
white-space:nowrap;
border-top-style:solid;
border-top-width:1px;
border-top-color:#4F8AFF;
background-color:#FFFFFF;
}
/* Separator box */
.SepBox
{
margin:5px 5px 5px 5px; /* top right bottom left*/
padding:0px;
font-family:Verdana,Arial;
font-size:11;
font-style:normal;
color:#000000;
}
.SepBoxHeader
{
padding:0px 0px 0px 0px; /* top right bottom left*/
color:#4F8AFF;
text-align:center;
font-weight:bold;
}
.SepBoxHeader table, .SepBoxHeader td
{
color:#4F8AFF;
text-align:center;
font-size:11;
font-weight:bold;
white-space:nowrap;
border-style:none;
border-collapse:collapse;
padding:0px;
margin:0px;
}
.SepBoxHeader hr
{
width:100%;
height:2px;
background-color:#4F8AFF;
color:#4F8AFF;
border:none;
border-style:none;
}
.SepBoxBody
{
padding:0px 0px 0px 0px; /* top right bottom left*/
font-size:11;
font-weight:normal;
}
/* status */
.StatusLine
{
width:140px;
text-align:center;
font-size:14;
font-weight:bold;
}
/* networks */
.Network
{
margin:5px 0px 15px 0px; /* top right bottom left*/
padding:0px;
}
.NetworkImage
{
width:32px;
height:32px;
margin-right:10px;
vertical-align:middle;
}
.NetworkName
{
font-size:14;
font-weight:bold;
}
.NetworkStatus
{
font-size:9;
font-weight:normal;
}
.NetworkStatsName
{
padding-right:5px;
font-family:Verdana,Arial;
font-size:10;
font-weight:normal;
text-indent:10px;
white-space:nowrap;
}
.NetworkStatsValue
{
font-family:Verdana,Arial;
font-size:10;
font-weight:bold;
white-space:nowrap;
padding-right:5px;
}
/* forms */
.FormTable center
{
text-align:left;
}
.FormTable form
{
margin:0px;
}
.FormTable form table td
{
height:20px;
}
.FormTable form input, .FormTable form select
{
font-family:Verdana,Arial;
font-size:11;
font-style:normal;
}
.FormTable form input.SubmitButton
{
width:126px;
}
</style>
<script language="JScript">
// some values for offline testing
TestDaemonAddress ="";
TestOnlineStatus = "Error";
TestNetworks = "";
//TestDaemonAddress ="test.tld:1213";
//TestOnlineStatus = "Online";
//TestNetworks = "network=FastTrack&status=Connected&users=1234567&files=12345678999&size=1234567;network=Gnutella&status=Connecting...&users=12345&files=12345678&size=12345;network=OpenFT&status=Connected&users=1234&files=123456&size=1234567";
var NetworkImages = new Array("openft", "gnutella", "ares", "fasttrack", "opennap", "http");
var UnknownNetworkImage = "unknet";
function GetNetworkImage(Network)
{
Network = Network.toLowerCase();
var ImgName = UnknownNetworkImage;
for(var i = 0; i < NetworkImages.length; i++)
if(NetworkImages[i] == Network)
ImgName = NetworkImages[i];
return ImgName + "32_gif";
}
function P2PSearch()
{
if(document.p2psearch.query.value.length <= 2)
return false;
try { window.external.P2PSearch(document.p2psearch.query.value,document.p2psearch.realm.value); }
catch(e) { }
return false;
}
function FormatNumber(Number)
{
var NewNumber = "";
for(var i=Number.length; i>3; i-=3)
NewNumber = "," + Number.substr(i-3,3) + NewNumber;
NewNumber = Number.substr(0,i) + NewNumber;
return NewNumber;
}
function KCeasyNetworksChange()
{
var Html = "";
if(!document.all.NetworksId)
return;
try { Data = window.external.getNetworks(); }
catch(e) { Data = TestNetworks; }
if(Data == "")
{
document.all.NetworksId.innerHTML = "";
return;
}
var Nets = Data.split(";");
for(var NetI=0; NetI < Nets.length; NetI++)
{
if(Nets[NetI] == "")
continue;
var Stats = Nets[NetI].split("&");
var Keys = new Object();
for(var StatsI=0; StatsI < Stats.length; StatsI++)
{
var Key = Stats[StatsI].split("=",2);
Keys[Key[0]] = Key[1];
}
var ShowStats = 1;
if(Keys["show_stats"] && Keys["show_stats"] == 0)
ShowStats = 0;
// check if we already added this network
var NetsNode = document.getElementById("NetworksId");
var NetNode = null;
for(var i=0; i < NetsNode.childNodes.length; i++)
{
if(NetsNode.childNodes[i].NetName == Keys["network"].toLowerCase())
{
NetNode = NetsNode.childNodes[i];
break;
}
}
if(NetNode == null)
{
// create new node for network
NetNode = document.createElement("div");
NetNode.setAttribute("className", "Network");
NetNode.setAttribute("NetName", Keys["network"].toLowerCase());
// image, network name, status
Html = '<table cellpadding="0" cellspacing="0" border="0"><tr>';
Html += '<td><div class="NetworkImage">';
Html += '<img src="' + GetNetworkImage(Keys["network"]) + '">';
Html += '</div></td>';
Html += '<td>';
Html += '<div class="NetworkName">' + Keys["network"] + '</div>';
Html += '<div id="NetStatus" class="NetworkStatus"></div>';
Html += '</td>';
Html += '</tr></table>';
// stats
if(ShowStats)
{
Html += '<table cellpadding="0" cellspacing="0" border="0">';
// Html += '<tr><td class="NetworkStatsName">Status:</td><td id="NetStatus" class="NetworkStatsValue"></td></tr>';
Html += '<tr><td class="NetworkStatsName">Users:</td><td id="NetUsers" class="NetworkStatsValue"></td></tr>';
Html += '<tr><td class="NetworkStatsName">Files:</td><td id="NetFiles" class="NetworkStatsValue"></td></tr>';
Html += '<tr><td class="NetworkStatsName">Size:</td><td id="NetSize" class="NetworkStatsValue"></td></tr>';
Html += '</table>';
}
// insert in document
NetNode.innerHTML = Html;
NetsNode.appendChild(NetNode);
}
// find stats and update them
// yes, this is fragile because i am lazy
NetNode.childNodes[0].childNodes[0].childNodes[0].childNodes[1].childNodes[1].innerHTML = Keys["status"];
// stats
if(NetNode.childNodes[1])
{
// NetNode.childNodes[1].childNodes[0].childNodes[0].childNodes[1].innerHTML = Keys["status"];
NetNode.childNodes[1].childNodes[0].childNodes[0].childNodes[1].innerHTML = FormatNumber(Keys["users"]);
NetNode.childNodes[1].childNodes[0].childNodes[1].childNodes[1].innerHTML = FormatNumber(Keys["files"]);
NetNode.childNodes[1].childNodes[0].childNodes[2].childNodes[1].innerHTML = FormatNumber(Keys["size"]) + ' GB';
}
}
}
function KCeasyOnlineStatusChange()
{
if(!document.all.StatusId)
return;
try { OnlineStatus = window.external.getOnlineStatus(); }
catch(e) { OnlineStatus = TestOnlineStatus; }
var Html = '<div class="StatusLine">' + OnlineStatus + '</div>';
document.all.StatusId.innerHTML = Html;
}
function UpdateStats()
{
try { window.external.UpdateStats(); }
catch(e) { return; }
}
function FirstLoad()
{
try
{
document.all.VersionDateId.innerHTML = "<div>Version " + window.external.getVersion() +
"</div><div>" + window.external.getBuildDate() + "</div>";
KCeasyOnlineStatusChange();
KCeasyNetworksChange();
}
catch(e)
{
}
}
</script>
</head>
<body onLoad="FirstLoad();">
<table id="MainTable" border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<!-- Main Table left column -->
<td valign="top">
<!-- kceasy logo -->
<div class="Logo">
<div id="Image"><img src="logo100_white_gif"></div>
<div id="VersionDateId"></div>
</div>
</td>
<!-- Main Table middle column -->
<td valign="top" width="100%">
<!-- p2p search -->
<div id="SearchBox" style="display:block;" class="SepBox" style="width:100%;">
<div class="SepBoxHeader"><table><tr><td width="50%"><hr></td><td style="padding:0px 5px 0px 5px;">Search</td><td width="50%"><hr></td></tr></table></div>
<div class="SepBoxBody">
<table cellspacing="0" cellpadding="0" style="width:100%;">
<tr>
<td style="text-align:center;width:100%">
<div style="text-align:center;">
<table cellspacing="0" cellpadding="0" class="FormTable">
<!-- KCeasy -->
<tr><td>
<center>
<form name="p2psearch" action="" method="GET" onSubmit="return P2PSearch();">
<table bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<input type="text" size="24" maxlength="200" name="query">
<select name="realm" size="1">
<option value="" selected>Any</option>
<option value="audio">Audio</option>
<option value="video">Video</option>
<option value="image">Images</option>
<option value="document">Documents</option>
<option value="torrent">Torrents</option>
</select>
<input type="submit" value="KCeasy Search" class="SubmitButton">
</td></tr></table>
</form>
</center>
</td></tr>
<!-- Google -->
<tr><td>
<!-- Search Google -->
<center>
<form method="get" action="http://www.google.com/custom" target="_top">
<table bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<input type="text" name="q" size="40" maxlength="255" value=""></input>
<input type="submit" name="sa" value="Google Search"></input>
<input type="hidden" name="client" value="pub-5602175030265991"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="ISO-8859-1"></input>
<input type="hidden" name="oe" value="ISO-8859-1"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:FFFFFF;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:70;LW:64;L:http://news.kceasy.com/images/logo64_white.png;S:http://news.kceasy.com;LP:1;FORID:1;"></input>
<input type="hidden" name="hl" value="en"></input>
</td></tr></table>
</form>
</center>
<!-- Search Google -->
</td></tr>
</table>
</div>
<div id="WebSearchPanel" style="text-align:center;display:block;">
<table cellspacing="0" cellpadding="0" class="FormTable">
<!-- IMDB -->
<tr><td>
<center>
<form method="QSFORM" action="http://www.imdb.com/find" method="GET" target="_top">
<table bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<input type="text" size="40" maxlength="60" name="q">
<input type="submit" value="IMDB Search" class="SubmitButton">
</td></tr></table>
</form>
</center>
</td></tr>
<!-- Bitzi -->
<tr><td>
<center>
<form name="search" action="http://www.bitzi.com/search/" method="GET" target="_top">
<table bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<input type="text" size="40" maxlength="60" name="keywords">
<input type="submit" value="Bitzi Search" class="SubmitButton">
</td></tr></table>
</form>
</center>
</td></tr>
</table>
</div>
</td>
</tr>
</table>
</div>
</div>
<!-- openft search node request -->
<div class="SepBox" style="width:100%;">
<div class="SepBoxHeader"><table><tr><td width="50%"><hr></td><td style="padding:0px 5px 0px 5px;">Info</td><td width="50%"><hr></td></tr></table></div>
<div class="SepBoxBody">
KCeasy was unable to load the normal start page. This local fallback page was loaded instead.
You can use the 'Home' button to try to load the normal start page again at a later time.
</div>
</div>
</td>
<!-- Main Table right column -->
<td valign="top">
<!-- network stats -->
<div id="NetworkBox" style="display:block;" class="FloatingBox">
<div class="FloatingBoxHeader">Network Status</div>
<div class="FloatingBoxBody" id="StatusId"></div>
<div class="FloatingBoxSeparator"></div>
<div class="FloatingBoxBody" id="NetworksId"></div>
</div>
</td></tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -