可以文本显示的公告栏

 更新时间:2016年11月25日 16:14  点击:1328
一个可以文本显示的公告栏,可以在多处使用,绝对不可错过!
脚本说明:
第一步:把如下代码加入<head>区域中
<script language="JavaScript">
<!-- Activate Cloaking Device
var i = 0;
// used to cycle thru messages
var TextNumber = -1;
// array of messages
var TextInput = new Object();
// used to load manipulate message
var HelpText="";
// used to load message
var Text = "";
// length of timeout (smaller is faster)
var Speed=50;
// used to display message number
var message=0;
// used to position text in ver 2.0
var addPadding="rn";
// Each element of TextInput represents a single message.
TextInput[0] = "今天注意了有新的任务布置";
TextInput[1] = "欢迎你的光临!本站为你提供大量javascript下载";
TextInput[2] = "重点介绍Javascript";
TextInput[3] = "与制作网页特效密切相关的技术";
TextInput[4] = "本站同时有影音空间等栏目";
TextInput[5] = "还有新闻及健康方面的资料";
TextInput[6] = "还有宽带网方面的大量技术文章";
TextInput[7] = "本站网址:http://www.njcatv.net";
TotalTextInput = 7; // (0, 1, 2, 3, 4, 5, 6, 7)
// Positioning and speed vary between versions.
var Version = navigator.appVersion;
if (Version.substring(0, 1)==3)
{
Speed=200;
addPadding="";
}
for (var addPause = 0; addPause <= TotalTextInput; addPause )
{TextInput[addPause]=addPadding TextInput[addPause];}
var TimerId
var TimerSet=false;
// Called by >>> button (display next message) .
function nextMessage()
{
if (!TimerSet)
{
TimerSet=true;
clearTimeout (TimerId);
if (TextNumber>=TotalTextInput)
{
alert("This is the end of the list!");
TimerSet=false;
}
<?php
// bi bolo monggole huen !
//
// v2.0.5
// <?
// include("linuxfreak.php3");
// ?>
// dreamphp boy = sunboy
$link_prefix = "&nbsp;&nbsp;o ";
$link_postfix = "<BR>n";
$cache_file = "/tmp/linuxfreak2.cache";
$cache_time = 1200;
$max_items = 8;
$target = "_top";
// End of customizations
$backend = "http://www.linuxfreak.org/backend/linuxfreak.rdf";
$items = 0;
$time = split(" ", microtime());
srand((double)microtime()*1000000);
$cache_time_rnd = 300 - rand(0, 600);
if ( (!(file_exists($cache_file))) || ((filectime($cache_file) $cache_time - $time[1]) $cache_time_rnd < 0) || (!(filesize($cache_file))) ) {
$fpread = fopen($backend, 'r');
if(!$fpread) {
} else {
$fpwrite = fopen($cache_file, 'w');
if(!$fpwrite) {
} else {
while(! feof($fpread) ) {
$buffer = ltrim(Chop(fgets($fpread, 256)));
if (($buffer == "<item>") && ($items < $max_items)) {
$title = ltrim(Chop(fgets($fpread, 256)));
$link = ltrim(Chop(fgets($fpread, 256)));
$title = ereg_replace( "<title>", "", $title );
$title = ereg_replace( "</title>", "", $title );
$link = ereg_replace( "<link>", "", $link );
$link = ereg_replace( "</link>", "", $link );
fputs($fpwrite, "$link_prefix<A HREF="$link" TARGET="$target">$title</A>$link_postfix");
$items ;
}
}
}
fclose($fpread);
}
fclose($fpwrite);
}
if (file_exists($cache_file)) {
include($cache_file);
}
?>
【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】

<?
//请自己修改下面变量.
$newsnum=7;
$space=20;
$width=400;
$headclass="class5";
$lowerclass="class6";
//变量设置结束.
print "<html><head><link rel=stylesheet href=dark.css></head><body>";
$opened=$QUERY_STRING;
if ($opened=="") { $opened="-1"; }
print "<table><tr><td class=class5><a target=_blank href=http://www.php.net>www.php.net</a></td></tr>";
$file=file('http://www.php.net');
$where="";
$a=0;
while ($a<count($file)) {
$file[$a]=chop ($file[$a]);
if ($file[$a]=="<!--http://www.php.net/-->") {
$where=$a;
break 1;
}
$a ;
}
$file=file('http://www.php.net');
$a=$where 1;
$b=0;
while ($b<$newsnum) {
if (substr($file[$a],0,4)=="<h3>" & substr($file[$a],-6,5)=="</h3>" | substr($file[$a],0,4)=="<h3>" & substr($file[$a],-7,5)=="</h3>") {
$from=$to;
$to=$a;
}
if ($to==$a & $from!="") {
$c=$from;
if ($b==$opened) {
while ($c<$to) {
if (substr($file[$c],0,9)=="<img src=") {
$file[$c]="";
}
$file[$c]=eregi_replace("src="","src="http://www.php.net/",$file[$c]);
$file[$c]=eregi_replace("href="","href="http://www.php.net/",$file[$c]);
$file[$c]=eregi_replace("<h3>","</td></tr><tr><td width=$width class=$headclass><a href=$PHP_SELF?-1>",$file[$c]);
$file[$c]=eregi_replace("</h3>","</a></td></tr><tr><td width=$width class=$lowerclass>",$file[$c]);
BMForum 拥有论坛程序中前所未有的领先技术和舒适的用户体验。
国内首家 打破传统分类方式 —— 主题随意贴(Tags、标签)
只要发帖时指定一个 Tag,就可以令帖子联系更紧密!
先进的 AJAX 技术 普遍用于发帖和浏览
快速翻页浏览、快速回复,一切如飞。
 
国内首家 论坛邀请注册方式
论坛用户可以通过自己的努力邀请其他人加入!
根据 XHTML1.0 + CSS 标准构建程序
论坛程序完全符合W3C国际标准,风格制作更简单。
 
国内首家 可视化发帖,让发帖更轻松
通过可视化发帖,方便、安全地张贴想要的内容
强大的后台管理,方便的快速定位
通过论坛程序内置的“我想”菜单方便找到你所想的
高效的论坛性能
论坛程序负载承受能力空前绝后
全球首家 多附件同时上传、附件图文混排
使用 BMForum 论坛程序,论坛发帖易如反掌
国内首家 领先的多国语言 UTF-8 编码
国际、港澳台交流更紧密
强大的用户组权限控制系统
所有用户根据论坛程序中的用户组权限识别权限
下载
http://www.bmforum.com/down/

<?php
/*我的程序在国外的SREVER上,自己编的程序存放到哪,我很难记清。
所以编了一个简单的目录递归函数,查看我的程序,很方便的。
*/
function tree($directory)
{
$mydir=dir($directory);
echo "<ul>
";
while($file=$mydir->read()){
if((is_dir("$directory/$file")) AND ($file!=".") AND ($file!=".."))
{echo "<li><font color="#ff00cc"><b>$file</b></font></li>
";
tree("$directory/$file");
}
else
echo "<li>$file</li>
";
}
echo "</ul>
";
$mydir->close();
}
//start the program
echo "<h2>目录为粉红色</h2>
";
tree(".");
?>

[!--infotagslink--]

相关文章