WEB开发网
开发学院WEB开发PHP 社区(php&&mysql)二 阅读

社区(php&&mysql)二

 2008-02-15 18:00:15 来源:WEB开发网   
核心提示:function sdatetime($str){ $str=ereg_replace("-","/",$str); $str=substr($str,5,strlen($str)-8); return $str;
function sdatetime($str){
  $str=ereg_replace("-","/",$str);
  $str=substr($str,5,strlen($str)-8);
  return $str;
}

function reAnum($sid){ //罴莱绞计
  $DROOT=getenv('DOCUMENT_ROOT');
  include("sql.php3");
  $db=MySQL(和PHP搭配之最佳组合)_connect($sql['host'], $sql['user'] , $sql['passwd']); 
  $qsql="SELECT id from bbs_docs where sid='$sid'";
  $rs=MySQL(和PHP搭配之最佳组合)_db_query($sql['db'],$qsql);
  return MySQL(和PHP搭配之最佳组合)_num_rows($rs);
}

function pagebar($pages) {
  global $pgno;
  //global $pages;
  global $PHP_SELF;
  global $aid;
  global $OPEN_LIST;
  echo "<TABLE width=85% border=0 cellPadding=0 cellSpacing=1 align=center bgcolor='#6CA6CD' class='num'>";
  echo "<tr><td>";
  if($pgno!=0) {
    $pu=$pgno-1;
    echo "<a href=$PHP_SELF?aid=$aid&pgno=$pu>[]</a>";     
  }   
  if($pgno<$pages) {
    $pd=$pgno+1;
    echo "<a href=$PHP_SELF?aid=$aid&pgno=$pd>[]</a>";     
  }   
  for($i=0;$i<=$pages;$i++) {
    if($pgno==$i) {
      echo "<b>";
      echo "[".($i+1)."]";
      echo "</b>";   
    } else {
      echo "<a href=$PHP_SELF?aid=$aid&pgno=$i>";
      echo "[".($i+1)."]";
      echo "</a>";   
    }
  }
  echo "</td>";
  echo "<TD align=right>";
    echo "<a href=$PHP_SELF?proc=view&aid=$aid>";
        echo "[祇ゅ彻]";
        echo "</a>";
  //echo "</TD>";

上一页 下一页

Tags:社区 php mysql

编辑录入:coldstar [复制链接] [打 印]
赞助商链接