锘??xml version="1.0" encoding="utf-8" standalone="yes"?>
鍑芥暟鍔熻兘: 緲婚〉
鍙傛暟璇存槑: $page_url, $count, $offset, $class;
榪斿洖鍊? echo
***************************************************/
function page_nav($page_url,$count,$offset=10,$class='pagenav')
{
global $page;
$num_pages=sprintf("%d",($count-1)/$offset);
if($num_pages>0)
{
$num_pages+=1;
$first="<span class='$class'>".'<< 棣栭〉'.'</span>';
$previous="<span class='$class'>".'涓婁竴欏?.'</span>';
$next="<span class='$class'>".'涓嬩竴欏?.'</span>';
$end="<span class='$class'>".'鏈〉 >>'.'</span>';
if($page>1)$first="<a href='$page_url' class='$class'>".'<< 棣栭〉'."</a>";
if($page>1)$previous="<a href='$page_url&page=".($page-1)."' class='$class'>".'涓婁竴欏?."</a>";
if($page<$num_pages)$next="<a href='$page_url&page=".($page+1)."' class='$class'>".'涓嬩竴欏?."</a>";
if($page<$num_pages)$end="<a href='$page_url&page=".$num_pages."' class='$class'>".'鏈〉 >>'."</a>";
$page_links='';
$half=2;
if($num_pages<=(2*$half+1) || $num_pages>(2*$half+1) && $page<=$half+1) $left=1;
else if($num_pages>(2*$half+1) && $num_pages-$page<=$half) $left=$num_pages-2*$half;
else $left=$page-$half;
if($num_pages<=(2*$half+1) || $num_pages>(2*$half+1) && $num_pages-$page<=$half) $right=$num_pages;
else if($num_pages>(2*$half+1) &&$page<=$half+1) $right=(2*$half+1);
else $right=$page+$half;
for($pn=$left ; $pn<=$right ; $pn ++)
{
if($pn == $page)$page_links.="<span class='$class'>$pn</span>";
else $page_links.=" <a href='$page_url&page=".$pn."' class='$class'>$pn</a> ";
}
echo "鍏?lt;font color=red>$num_pages</font>欏?lt;font color=red>$count</font>鏉?<center> $first $previous $page_links $next $end </center>";
for($pn=1; $pn<=$num_pages; $pn ++)
{
if($pn == $page)$page_links.="<span class='$class'>$pn</span>";
else $page_links.=" <a href='$page_url&page=".$pn."' class='$class'>$pn</a> ";
}
echo "<center> $first $previous $page_links $next $end </center>";
}
}
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
?>
//鏀瑰姩鐩稿簲鏂囦歡澶村氨鍙互杈撳嚭.doc .xls絳夋枃浠舵牸寮忎簡
鍦╬hp鐜榪愯涓婇潰鐨勪唬鐮侊紝澶у灝卞彲浠ョ湅鍒版祻瑙堝櫒璇㈤棶鐢ㄦ埛鏄惁涓嬭澆excel鏂囨。錛岀偣鍑諱繚瀛橈紝紜洏涓婂氨澶氫簡涓涓猠xcel鐨勬枃浠訛紝浣跨敤excel鎵撳紑灝變細鐪嬪埌鏈緇堢殑緇撴灉錛屾庝箞鏍蜂笉閿欏惂銆?BR>
銆銆鍏跺疄鍦ㄥ仛鐪熸鐨勫簲鐢ㄧ殑鏃跺欙紝澶у鍙互灝嗘暟鎹粠鏁版嵁搴撲腑鍙栧嚭錛岀劧鍚庢寜鐓ф瘡涓鍒楁暟鎹粨鏉熷悗鍔燶t,姣忎竴琛屾暟鎹粨鏉熷悗鍔燶n鐨勬柟娉昬cho鍑烘潵錛屽湪php鐨勫紑澶寸敤header("Content-type:application/vnd.ms-excel");琛ㄧず杈撳嚭鐨勬槸excel鏂囦歡錛岀敤header("Content-Disposition:filename=test.xls");琛ㄧず杈撳嚭鐨勬枃浠跺悕涓簍ext.xls銆傝繖鏍峰氨ok浜嗐?
銆銆鎴戜滑鏇村彲浠ヤ慨鏀筯eader璁╀粬杈撳嚭鏇村鏍煎紡鐨勬枃浠訛紝榪欐牱php鍦ㄥ鐞嗗悇縐嶇被鍨嬫枃浠舵柟闈㈠氨鏇村姞鏂逛究浜?
鍝堝搱錛屾墭浣犵殑紱忥紝鎴戝凡緇忕煡閬撴庝箞瑙e喅浜嗭紝浣犳妸涓嬮潰鐫孌典唬鐮佸瓨涓?xls鏂囦歡鐪嬬湅錛岀煡閬撹鎬庝箞鍋氫簡鍚э紵
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns=" <head>
<meta http-equiv="expires" content="Mon, 06 Jan 1999 00:00:01 GMT">
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<!--[if gte mso 9]><xml>
<x:ExcelWorkbook>
<x:ExcelWorksheets>
<x:ExcelWorksheet>
<x:Name></x:Name>
<x:WorksheetOptions>
<x:DisplayGridlines/>
</x:WorksheetOptions>
</x:ExcelWorksheet>
</x:ExcelWorksheets>
</x:ExcelWorkbook>
</xml><![endif]-->
</head>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td align="center" class="big6" >Users (except the ones disabled)</td></tr>
<tr><td class="greyborder">
<table border="1" align="center" width="100%" cellpadding="1" cellspacing="1">
<tr align="center">
<td class="TableTopHeader" nowrap>
Login </td>
<td class="TableTopHeader" nowrap>
Name </td>
<td class="TableTopHeader" width="3%" nowrap>
EMail </td>
<td class="TableTopHeader" nowrap>
Department </td>
<td class="TableTopHeader" nowrap>
Position </td>
<td class="TableTopHeader" nowrap width="1%">
Level </td>
<td class="TableTopHeader">Address</td>
<td class="TableTopHeader">Phone</td>
</tr>
<tr class="even">
<td class="mtlist"> joesen</td>
<td class="mtlist"> hong joesen</td>
<td class="mtlist" >allfu@163.net</td>
<td class="mtlist"> Software developments</td>
<td class="mtlist"> System Administrator</td>
<td class="mtlist"> Admin</td>
<td class="mtlist"> </td>
<td class="mtlist"> </td>
</tr>
</table>
</td></tr>
</table>
$counterFile = "counter.txt";
function displayCounter($counterFile) {
$fp = fopen($counterFile,"rw");
$num = fgets($fp,5);
$num += 1;
print "鎮ㄦ槸絎?"."$num"." 浣嶈瀹?;
exec( "rm -rf $counterFile");
exec( "echo $num > $counterFile");
}
if (!file_exists($counterFile)) {
exec( "echo 0 > $counterFile");
}
?>
<!--浣跨敤-->
<div align="center">
<br><?php displayCounter($counterFile);?><br>
</div>
---------------------------------------------------------------------------------------------------------------
<script>
function setfirst() {
u="http://www.tiantengelec.com.hk/涓洪欏?鏈珯灝嗕負浣犳彁渚涙洿濂界殑鏈嶅姟!<p><a href=http://www.tiantengelec.com.hk/>榪斿洖棣栭〉</a>");
}
if(!hp.isHomePage(u))
{
document.write("浣犺繕娌℃湁璁?A >http://www.tiantengelec.com.hk/涓洪欏?璇?lt;a href=http://www.tiantengelec.com.hk/>榪斿洖棣栭〉</a>");
}
}
</script>
<!--浣跨敤-->
<TD width="91" height="118"><div align="center" class="w3"><a href="javascript:window.external.AddFavorite('http://www.tiantengelec.com.hk/', '鈥滃ぉ鑵劇數瀛愨?amp;quot;/www.tiantengelec.com.hk')">鍔犲叆鏀惰棌</a><br>
<br> <br>
<a href="javascript:setfirst()">璁句負棣栭〉</a></div></TD>