寻求一段日历的代码!再线等! javascript的不是很多吗??为什么一定要PHP的呢?? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 哈哈,你运气好,我找到一个。http://netschool.tiandinet.com/code_showcode.php?codeid=2 <?php/** * 功能函数 * 用于调用产生月历 * 引用格式 {date_box:"背景色","字色","高度色","标题色"} **/function smarttemplate_extension_date_box($bg="#000000", $color="#cfcfcf", $height="", $title="") { $a = array_merge(array_fill(0,$w=date("w",mktime(0,0,0,date("m"),1,date("Y")))," "),range(1,$d=date("t")),array_fill(0,(7-($w+$d)%7)%7," ")); $n = date("j"); foreach($a as $k=>$v) { if($v == $n) $a[$k] = "<font color=red>{$a[$k]}</font>"; $a[$k] = "<td>{$a[$k]}</td>"; } $ar = array_chunk($a,7); $s = "<table cellpadding=0 cellspacing=1>"; $s .= "<colgroup align=right span=7>"; $s .= '<tr bgcolor="#000000" style="color:#cfcfcf"><th>日</th><th>一</th><th>二</th><th>三</th><th>四</th><th>五</th><th>六</th></tr>'; foreach($ar as $v) $s .= "<tr>".join("",$v)."</tr>"; $s .= "</table>"; return $s;}?> 怎样屏蔽这样的广告 php问题,困扰我好久了 php+jquery.uploadify-v2.1.0 如何给图片加水印 奇怪的PHP字符串问题 url重写中末尾的$1是什么意思 有一点不解。 请问如何在特定时间内将数据库内某个字段的数据清0? 我的程序为什么提示这个错误 啊 ---请哥哥们帮忙了! php如何用ftp方法上传文件? 关于PHP中的session_write_close函数 mysql安装问题(问题比较复杂) php图片上传的问题,急~在线等
http://netschool.tiandinet.com/code_showcode.php?codeid=2
/**
* 功能函数
* 用于调用产生月历
* 引用格式 {date_box:"背景色","字色","高度色","标题色"}
**/
function smarttemplate_extension_date_box($bg="#000000", $color="#cfcfcf", $height="", $title="") {
$a = array_merge(array_fill(0,$w=date("w",mktime(0,0,0,date("m"),1,date("Y")))," "),range(1,$d=date("t")),array_fill(0,(7-($w+$d)%7)%7," "));
$n = date("j");
foreach($a as $k=>$v) {
if($v == $n)
$a[$k] = "<font color=red>{$a[$k]}</font>";
$a[$k] = "<td>{$a[$k]}</td>";
}
$ar = array_chunk($a,7);
$s = "<table cellpadding=0 cellspacing=1>";
$s .= "<colgroup align=right span=7>";
$s .= '<tr bgcolor="#000000" style="color:#cfcfcf"><th>日</th><th>一</th><th>二</th><th>三</th><th>四</th><th>五</th><th>六</th></tr>';
foreach($ar as $v)
$s .= "<tr>".join("",$v)."</tr>";
$s .= "</table>";
return $s;
}
?>