IT技术精粹[JiShuBu.Com]-倾力打造一流IT技术平台!
登录
注册
设为首页
加入收藏
网站首页
IT风向标
网站优化
Html
CSS
JavaScript
ASP
Php/Mysql
Flash
Ajax
源码下载
精美桌面
供求信息
超稳定100M虚拟主机只要100元,还送50M邮箱!
文字广告招商中...
会员注册
|
用户登录
|
我要投稿
信息订阅
天气预报小偷,根据IP自动判断地址
您现在正在浏览:
首页
>
Php/Mysql
>
天气预报小偷,根据IP自动判断地址
作者: 发布时间:2007-12-09 00:54:57 来源:
$page['start_page'] = ((int)$page["this_page"]-5<1)?1:(int)$page["this_page"]-5;
$page['end_page'] = ((int)$page["this_page"]+5 > $page['page_count'])?(int)$page["page_count"]:(int)$page["this_page"]+5;
for ($i = $page['start_page'];$i <= $page['end_page'];$i++)
{
$selected = ($_GET["page"] == $i)?"selected":"";
$page["page_select"] .= "<option value=\"$i\" $selected>$i</option>";
$page["page_list"] .= ($i == $page["this_page"])?" <font color=\"red\">$i</font> ":"<a href=\"".$page['url']."&page=$i\" title=\"第 ".$i." 页\">[$i]</a>";
}
return $page;
}
function getRows($table,$order='')
{
if (!empty($order))
{
$order = explode(',',$order);
$order = 'ORDER BY `'.$order[0].'` '.$order[1];
}
$query = dbQuery("SELECT * FROM `".$GLOBALS['prefix'].$table."` ".$order.";");
while ($row = dbArray($query))
{
$link[$row['id']] = $row;
}
return $link;
}
function autoTime($time)
{
preg_match('/([0-9]*)-([0-9]*)-([0-9]*) ([0-9]*):([0-9]*):([0-9]*)/',$time,$date);
return mktime ($date[4],$date[5],$date[6],$date[2],$date[3],$date[1]);
}
function getTime() {
$t = explode(' ', microtime());
return $t[1] + $t[0];
}
function calendar($time)
{
$start = mktime(0, 0, 0, date('m', $time), 1, date('Y', $time));
$prev_month['year'] = date('Y',$start-86400);
$prev_month['month'] = date('m',$start-86400);
$end = mktime(0, 0, 0, date('m', $time)+1, 1, date('Y', $time));
$next_month['year'] = date('Y',$end);
$next_month['month'] = date('m',$end);
$sWeekday=array('日','一','二','三','四','五','六');
//$sWeekday=array('S','M','T','W','T','F','S');
$title=date('M Y', $time);
$str = '';
$str .= <<<END
<table class="calendar" cellspacing="1">
<tr class="title">
<th colspan="1"><a href=?mod=article&year={$prev_month['year']}&month={$prev_month['month']}><span style=\"font-size:12px; font-weight: bold; font-familly: Courier;\">«</span></a></td>
<th colspan="5">{$title}</td>
<th colspan="1"><a href=?mod=article&year={$next_month['year']}&month={$next_month['month']}><span style=\"font-size:12px; font-weight: bold; font-familly: Courier;\">»</span></a></td>
</tr>
<tr class="head">
<th>{$sWeekday[0]}</td>
上一页
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
下一页
【
评论
】【
加入收藏夹
】【
大
中
小
】【
打印
】【
关闭
】
※
相关信息
无相关信息
发表评论
查看评论
用户名:
密码:
验证码:
匿名发表
[
注册帐号
]
[
控制面板
]
[
用户登陆
]
[
修改资料
]
[
用户收藏
]
[
我的状态
]
[
退出登陆
]
文章搜索
标题
作者
[
添加文章
] [
管理文章
]
最新技术文档
·
中国移动188号段将于1月8日起在深圳正式放号
·
PHP与Javascript的两种交互方式
·
使用wordpress中的函数 (PHP)
·
js倒计时效果-精确到秒 (Javascript)
·
PHP无刷新删除数据
·
PHP文件系统处理类
·
PHP文件缓存数据类
·
PHPMailer邮件类利用smtp.163.com发送邮件方
·
PHP的POST方式
·
md5 结合 crypt =无敌密码
技术文档排行榜
·
天气预报小偷,根据IP自动判断地址
·
超经典计算机使用问题105答
·
CSS网页布局入门教程:下拉及多级弹出式菜单
·
'AjaxPro'未定义错误的原因&javascript顺
·
[初学者必读]网页制作之HTML基础知识
·
DIV&CSS打造自动伸展三栏复合布局
·
近1000本javascript电子图书下载列表
·
CSS 文字樣式技巧 (摘自一台湾网站,确实很
·
阿里妈妈广告的投放技巧
·
ajax+php无刷新二级联动下拉菜单(省市联动)