可以文本显示的公告栏
更新时间:2016年11月25日 16:14 点击:1331
一个可以文本显示的公告栏,可以在多处使用,绝对不可错过!
脚本说明:
第一步:把如下代码加入<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 = " 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(".");
?>
脚本说明:
第一步:把如下代码加入<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 = " 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(".");
?>
上一篇: php常见问题和解决方法
下一篇: php常用正则表达精品
相关文章
python Matplotlib基础--如何添加文本和标注
这篇文章主要介绍了python Matplotlib基础--如何添加文本和标注,帮助大家更好的利用Matplotlib绘制图表,感兴趣的朋友可以了解下...2021-01-26- 这篇文章主要为大家详细介绍了jQuery实现广告显示和隐藏动画,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下...2021-07-05
- 为了网站的安全性,很多朋友都把密码设的比较复杂,但是如何密码不能明显示,不知道输的是对是错,为了安全起见可以把密码显示的,那么基于js代码如何实现的呢?下面通过本文给大家介绍JavaScript实现表单密码的隐藏和显示,需要的朋友参考下...2016-03-03
- 想在网页中动态地显示当前系统的时间,找了好多,不过都是一些停在那里不动的。。。不过皇天不负有心人,终于让我找到了...2020-06-25
- 这篇文章主要介绍了微信小程序 富文本转文本实例详解的相关资料,需要的朋友可以参考下...2016-10-25
- 这篇文章主要介绍了C#实现动态显示及动态移除图片方法,对于C#的初学者了解图像操作有一定的帮助,需要的朋友可以参考下...2020-06-25
- 这篇文章主要介绍了解决druid监控页面SQL不显示的问题,具有很好的参考价值,希望对大家有所帮助。如有错误或未考虑完全的地方,望不吝赐教...2021-06-19
- 这篇文章主要介绍了javascript点击按钮实现隐藏显示切换效果,以一个完整的实例为大家分析了js点击按钮实现隐藏显示切换的功能,感兴趣的小伙伴们可以参考一下...2016-02-05
- 本文通过一个简单的代码给大家介绍C# 输出字符串到文本文件中,代码简单易懂,非常不错,具有一定的参考借鉴价值,需要的朋友参考下吧...2020-06-25
- 最近要做个网页图片批量下载工具,然后需要一个页面显示网页上的所有图片供用户勾选,再根据勾选的内容来下载指定图片,其中就涉及到要到同时显示多张图片,本文就来介绍一下...2021-06-11
- 这篇文章主要介绍了python docx的超链接网址和链接文本操作,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧...2021-03-06
- 这篇文章主要介绍了R语言-在一张图上显示多条线的实现,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧...2021-05-06
- 这篇文章主要介绍了C#实现让窗体永远在窗体最前面显示,功能非常实用,需要的朋友可以参考下...2020-06-25
- 本篇文章是对c#中任务栏隐藏与显示的实现方法进行了详细的分析介绍,需要的朋友参考下...2020-06-25
android中ToolBar设置NavigationIcon图标不显示、失败、没反应,绝对管用
ToolBar工具昨天介绍过相关的教程今天我们来看看关于android中ToolBar设置NavigationIcon图标不显示、失败、没反应,绝对管用问题的解决办法。 最近开发android ap...2016-10-02- 下面小编就为大家分享一篇C#实现将一个字符串进行翻转显示的6种方法,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧...2020-06-25
- 这篇文章主要介绍了解决Echarts 显示隐藏后宽度高度变小的问题,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧...2020-07-19
超漂亮的Bootstrap 富文本编辑器summernote
Summernote 是一个简单,灵活,所见即所得(WYSIWYG)的编辑器,基于 jQuery 和 Bootstrap 构建。对bootstrap 文本编辑器相关知识感兴趣的朋友一起学习吧...2016-04-06- Perl合并文本的一段实例代码,需要的朋友可以参考下...2020-06-29
- 这篇文章主要介绍了C#中winform中panel重叠无法显示问题的解决,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧...2020-06-25