当前位置: 首页>>代码示例>>PHP>>正文


PHP pc_db_close函数代码示例

本文整理汇总了PHP中pc_db_close函数的典型用法代码示例。如果您正苦于以下问题:PHP pc_db_close函数的具体用法?PHP pc_db_close怎么用?PHP pc_db_close使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了pc_db_close函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display_section_blogs

function display_section_blogs($sec)
{
    global $pcconfig;
    if (!$pcconfig["SECTION"][$sec]) {
        echo "对不起,目前尚无该分类。[<a href=\"javascript:history.go(-1);\">返回</a>]";
        return;
    }
    echo "下面是<font class=f4>" . html_format($pcconfig["SECTION"][$sec]) . "</font>分类的Blog:<br /><hr size=1>";
    @($pno = (int) $_GET["pno"]);
    if ($pno < 1) {
        $pno = 1;
    }
    $link = pc_db_connect();
    if ($sec == "others") {
        $query = "SELECT username , corpusname , description , createtime  FROM users WHERE theme LIKE 'others%' OR theme = '' ORDER BY modifytime DESC LIMIT " . $pcconfig["THEMLIST"] * ($pno - 1) . "," . $pcconfig["THEMLIST"] . ";";
    } else {
        $query = "SELECT username , corpusname , description , createtime  FROM users WHERE theme LIKE '" . addslashes($sec) . "%' ORDER BY modifytime DESC LIMIT " . $pcconfig["THEMLIST"] * ($pno - 1) . "," . $pcconfig["THEMLIST"] . ";";
    }
    $result = mysql_query($query, $link);
    $numRows = mysql_num_rows($result);
    ?>
<ul style="margin-left: 20px;"><?php 
    for ($i = 0; $i < $numRows; $i++) {
        $rows = mysql_fetch_array($result);
        echo "<li><strong><a href=\"index.php?id=" . $rows["username"] . "\">" . html_format($rows["corpusname"]) . "</a></strong>[" . time_format_date1($rows["createtime"]) . "]:" . html_format($rows["description"], TRUE) . "</li>";
    }
    ?>
</ul>
<p align=center class=f1>
<?php 
    if ($pno > 1) {
        echo "<a href=\"pcsec.php?sec=" . $sec . "&pno=" . ($pno - 1) . "\">上一页</a>\n";
    }
    if ($numRows == $pcconfig["THEMLIST"]) {
        echo "<a href=\"pcsec.php?sec=" . $sec . "&pno=" . ($pno + 1) . "\">下一页</a>\n";
    }
    pc_db_close($link);
    ?>
</p><?php 
}
开发者ID:bianle,项目名称:www2,代码行数:40,代码来源:pcsec.php

示例2: pc_db_connect

//20min更新一次
if (pc_update_cache_header()) {
    return;
}
@($pno = (int) $_GET["pno"]);
$pno = $pno < 1 ? 1 : $pno;
$type = @$_GET["t"] == "c" ? "c" : "n";
$link = pc_db_connect();
if ($type == "n") {
    $newBlogs = getNewBlogs($link, $pno);
    $newNum = count($newBlogs["useretems"]);
} else {
    $newComments = getNewComments($link, $pno);
    $newNum = count($newComments);
}
pc_db_close($link);
pc_html_init("gb2312", $pcconfig["BBSNAME"] . "Blog");
?>
<br><br>
<p align=center class=f2>
欢迎使用<?php 
echo $pcconfig["BBSNAME"];
?>
Blog系统
</p>
<?php 
display_navigation_bar($type);
?>
<hr size=1>
<center>
<p align=center class=f1><strong>
开发者ID:bianle,项目名称:www2,代码行数:31,代码来源:pcnew.php

示例3: pc_reject_apply

function pc_reject_apply($link, $userid, $applyAgain)
{
    global $currentuser;
    if (!$userid) {
        return FALSE;
    }
    if ($applyAgain != 3) {
        $applyAgain = 2;
    }
    $query = "UPDATE newapply SET apptime = apptime ,manager = '" . addslashes($currentuser["userid"]) . "',management = '" . $applyAgain . "' WHERE username = '" . addslashes($userid) . "';";
    if (!mysql_query($query, $link)) {
        $errstr = "MySQL Error: " . mysql_error($link);
        pc_db_close($link);
        exit($errstr);
    }
    //log一下
    $action = $currentuser["userid"] . " 驳回 " . $userid . " 的BLOG申请(www)";
    if ($applyAgain == 3) {
        $content = $action . ";\n并不允许再申请BLOG。";
    } else {
        $content = "";
    }
    pc_logs($link, $action, $content, $userid);
}
开发者ID:bianle,项目名称:www2,代码行数:24,代码来源:pcadmin_app.php


注:本文中的pc_db_close函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。