?? htmllib.php
字號:
<?//############## 僥乕儅僼傽僀儖俁 ##########################//############## 僼僅乕儉昞帵 ##################function showform($id,$array,$act){global $CONF_title;global $CONF_icon;global $CONF_showcount;global $CONF_showicon;global $offset;if($act == "res"){ $array["title"] = "Re: ".$array["title"];}if($act == "mod"){ $comment = $array["comment"]; $comment = str_replace("<br />","\n",$comment); }if($act != "mod" && $act != "res" && !$offset){ echo "<div align=right>"; include("counter.php"); echo "</div>";}?><? echo $CONF_title; ?><hr size="1"> <form name="post" method="post" action="index.php">作者:<br><input type="TEXT" name="name" size=20 maxlength=40 value="<? if($act == "mod") echo $array["name"]; ?>"><br>Email:<br><input type="TEXT" name="mail" size=20 maxlength=40 value="<? if($act == "mod") echo $array["mail"]; ?>"><br>留言標(biāo)題:<br><input type="TEXT" name="title" value="<? if($act) echo $array["title"]; ?>" size=20 maxlength=200><br><? if($CONF_showicon == "1"){ echo "表情:<br>"; $i = 1; while(file_exists("$CONF_icon/icon".$i.".gif")){ echo "<input type=\"radio\" name=\"icon\" value=\"$i\"> <img src=\"$CONF_icon/icon".$i.".gif\">"; $i++; } echo "<br>"; }?>留言內(nèi)容:<br><textarea name="comment" rows=3 cols=20 wrap="VIRTUAL"><? if($act == "mod") echo $comment; ?></textarea><br>密碼:<br> <? if($act == "mod"){?><input type="password" name="delpass" size=8 maxlength=8 value=""><input type="hidden" name="act" value="modsubmit"><input type="submit" name="submit" value=" 發(fā)布 "><input type="hidden" name="parent" value="<? echo $id; ?>"></form><form name="post" method="post" action="index.php"><br>密碼<br><input type="password" name="delpass" size=8 maxlength=8 value=""><input type="hidden" name="act" value="del"><input type="hidden" name="parent" value="<? echo $id; ?>"><input type="submit" name="submit" value="刪除這個留言"></form><? } else {?><input type="password" name="delpass" size=8 maxlength=8 value=""><input type="hidden" name="act" value="newpost"><input type="submit" name="submit" value="發(fā)表"><input type="hidden" name="parent" value="<? echo $id; ?>"></form><hr>↓留言內(nèi)容<?}?><? if($act == "res"){ echo "<hr><b>以下是你要回復(fù)的留言: </b>"; } elseif($act =="mod"){ echo "<hr><b>編輯、刪除留言</b>"; }echo "<hr>";}//############## 僗儗昞帵 ##################function dispparent($parent){ global $CONF_icon; global $CONF_showres; global $CONF_showicon; global $act; echo "<form name=\"res\" method=\"POST\" action=\"index.php\">\n"; echo "<b>".$parent["title"]."</b>"; if($act != "res" && $CONF_showres == "1"){ echo "<input type=\"hidden\" name=\"act\" value=\"res\">\n"; echo "<input type=\"hidden\" name=\"id\" value=\"".$parent["ID"]."\">\n"; echo "<input type=\"submit\" name=\"submit\" value=\" 回復(fù) \"><br>"; } echo "ID.".$parent["ID"]." 作者:"; if($parent["mail"]){ echo "<a href=\"mailto:".$parent["mail"]."\">".$parent["name"]."</a>"; } else { echo $parent["name"]; } echo " ".$parent["timestamp"]."<br>"; if($parent["icon"] && $CONF_showicon=="1"){ echo "<img src=\"$CONF_icon/icon".$parent["icon"].".gif\">"; } echo $parent["comment"];}//############## 儗僗昞帵 ##################function dispchild($child){ global $CONF_icon; global $CONF_showicon; echo "<hr size=\"1\">"; echo "<b>".$child["title"]."</b><br>"; echo "ID.".$child["ID"]." 回復(fù)者:"; if($child["mail"]){ echo "<a href=\"mailto:".$child["mail"]."\">".$child["name"]."</a>"; } else { echo $child["name"]; } echo " ".$child["timestamp"]."<br>\n"; if($child["icon"] && $CONF_showicon == "1"){ echo "<img src=\"$CONF_icon/icon".$child["icon"].".gif\" align=\"absmiddle\">"; } echo "</td><td>".$child["comment"]."<p>\n</td></tr></table>";}function closeres(){ echo "</blockquote></form><hr>\n";}//############## 儁乕僕僫價(jià) ##################function pagenavi($total, $offset){ global $CONF_pagemax; global $CONF_home; global $CONF_pastlog; global $view; $next = $offset + $CONF_pagemax; $prev = $offset - $CONF_pagemax; echo "\n<!-- Page navigation -->\n"; if($offset > $CONF_pagemax-1){ echo "<a href=\"index.php?offset=$prev"; if($view == "past"){ echo "&view=past"; } echo "\"><<上一頁</a> "; } ($total % $pagemax)? $pagenum = ($total/$CONF_pagemax) + 1: $pagenum = ($total/$CONF_pagemax); if($total <= $CONF_pagemax) $pagenum = 0; $c = 0; $page = 1; if($total > $CONF_pagemax){ echo "[<b> "; while($pagenum > 0){ if($offset == $c){ $str .= " $page "; } else { $str .= " <a href=\"index.php?offset=$c"; if($view =="past"){ $str .= "&view=past"; } $str .= "\">$page</a> "; } $page++; $pagenum--; $c = $c + $CONF_pagemax; } echo "$str </b>] "; } if($next < $total){ echo "<a href=\"index.php?offset=$next"; if ($view == "past"){ echo "&view=past"; } echo "\">下一頁>></a> "; } echo "<hr>[ <a href=\"$CONF_home\">返回主頁</a> ]<br> "; if($view != "past"){ if(file($CONF_pastlog)){ echo "[ <a href=\"index.php?view=past\">以前的留言</a> ]<br>"; } } echo " [<a href=\"search.php\"> 搜索</a> ]<br><hr>"; echo " [ <a href=\"index.php\">留言板首頁</a> ] "; echo "\n<!-- end of Page navigation -->\n";}?>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -