Exemple #1
0
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>
最近更新的<?php 
Exemple #2
0
require "pcfuncs.php";
if ($loginok != 1) {
    html_nologin();
} elseif (!strcmp($currentuser["userid"], "guest")) {
    html_init("gb2312");
    html_error_quit("guest 没有Blog!");
    exit;
} else {
    $link = pc_db_connect();
    $pc = pc_load_infor($link, $currentuser["userid"]);
    if (!$pc || !pc_is_admin($currentuser, $pc)) {
        pc_db_close($link);
        html_error_quit("对不起,您要查看的Blog不存在");
        exit;
    }
    pc_html_init("gb2312", $pc["NAME"]);
    $buserid = $_GET["userid"];
    if ($_GET["act"] == "add" && $buserid) {
        $lookupuser = array();
        if (bbs_getuser($buserid, $lookupuser) == 0) {
            echo "<script language=\"javascript\">用户" . $buserid . "不存在!</script>";
        } else {
            $buserid = $lookupuser["userid"];
            if (!pc_in_blacklist($link, $buserid, $pc["UID"])) {
                pc_add_blacklist($link, $buserid, $pc["UID"]);
            }
        }
    }
    if ($_GET["act"] == "del" && $buserid) {
        pc_del_blacklist($link, $buserid, $pc["UID"]);
    }
Exemple #3
0
    echo "id=" . $rows[uid] . "&nid=" . $rows[nid] . "&tid=" . $rows[tid];
    ?>
&nbsp;-<?php 
    echo (int) (strlen($rows[body] . $rows[subject]) / 100) / 10;
    ?>
K-
<?php 
    echo time_format($rows[created]);
    ?>
-
</font>
</td></tr>
</table><br><br>	
<?php 
}
pc_html_init("gb2312", "Blog文章搜索");
?>
<br><br>
<p align="center" class="f2">
Blog日志搜索
</p>
<?php 
$userid = addslashes($_GET["userid"]);
@($keyword = myAddslashes(trim($_GET["keyword"])));
@($area = addslashes($_GET["area"]));
@($pno = (int) $_GET["pno"]);
if ($keyword) {
    $link = pc_db_connect();
    $query_i = "SELECT COUNT(*) FROM nodes WHERE `access` = 0 ";
    $query = "SELECT `nid`,`tid`,`uid`,`subject`,`body`,`created`,`htmltag` FROM nodes WHERE `access` = 0 ";
    if ($area != "_all") {
Exemple #4
0
<?php

require "pcadmin_inc.php";
function pc_load_special($link)
{
    $query = "SELECT uid , username , pctype , corpusname , description , visitcount , nodescount FROM users WHERE pctype != 0 ORDER BY username ASC ;";
    $result = mysql_query($query, $link);
    $pcs = array();
    while ($rows = mysql_fetch_array($result)) {
        $pcs[] = $rows;
    }
    return $pcs;
}
pc_admin_check_permission();
$link = pc_db_connect();
pc_html_init("gb2312", $pcconfig["BBSNAME"] . "特殊BLOG管理");
pc_admin_navigation_bar();
if ($_GET["userid"] && $_GET["conv"]) {
    $pcc = pc_load_infor($link, $_GET["userid"]);
    if (!$pcc) {
        html_error_quit($_GET["userid"] . "尚无BLOG");
        exit;
    }
    if (!$_GET["statnew"]) {
        $newtype = 7;
    } elseif (!$_GET["statnodes"]) {
        $newtype = 5;
    } elseif (!$_GET["statusers"]) {
        $newtype = 3;
    } else {
        $newtype = 1;
Exemple #5
0
if (!($pur == 3 && !pc_is_groupwork($pc))) {
    //Blog所有者的访问不进行计数  windinsn dec 10,2003
    pc_counter($link);
}
/*visit count end*/
//if( pc_cache( $pc["MODIFY"] ) )
//	return;
if ($tag == 0 || $tag == 1 || $tag == 2) {
    $blogMenus = pc_blog_menu($link, $pc, $tag);
    if (!$pc["DEFAULTTOPIC"] && $tag == 0 && !$tid) {
        $tid = $blogMenus[0]["TID"];
    }
} else {
    $blogMenus = NULL;
}
pc_html_init("gb2312", $pc["NAME"], "", "", $pc["BKIMG"]);
?>
<a name="top"></a>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
	<td>
	<table cellspacing="0" cellpadding="3" border="0" class="t0" width="100%" class="tt1">
		<tr>
			<td class="tt1">&nbsp;&nbsp;&nbsp;&nbsp;<?php 
echo "<a href=\"/\" class=\"f1\">" . $pcconfig["BBSNAME"] . "</a> - <a href='index.html' class=\"f1\">Blog</a> - <a href=\"index.php?id=" . $pc["USER"] . "\" class=\"f1\">" . $pc["NAME"] . "</a>";
?>
</td>
			<td align="right" class="tt1"><?php 
echo pc_personal_domainname($pc["USER"]);
?>
&nbsp;&nbsp;&nbsp;&nbsp;</td>
Exemple #6
0
<?php

/*
**  recommend articles
**  id:windinsn feb 28 , 2004
*/
require "pcfuncs.php";
if ($loginok != 1) {
    html_nologin();
}
pc_html_init("gb2312", "推荐日志");
if (!strcmp($currentuser["userid"], "guest")) {
    html_error_quit("guest 不能推荐文章!");
    exit;
}
$nid = $_GET["nid"];
$nid = intval($nid);
$link = pc_db_connect();
$query = "SELECT recommend , uid , theme  FROM nodes WHERE access = 0 AND type = 0 AND nid = " . $nid . " LIMIT 0 , 1;";
$result = mysql_query($query, $link);
$node = mysql_fetch_array($result);
if (!$node) {
    html_error_quit("对不起,您要推荐的文章不存在");
    exit;
}
if ($node[recommend] != 0) {
    html_error_quit("对不起,该文已被推荐");
    exit;
}
if (!isset($_GET['topic'])) {
    ?>
Exemple #7
0
            exit;
        }
        if (pc_file_num($link, $pc["UID"], $pid) + 1 > $pc["NLIM"]) {
            pc_html_init("gb2312", stripslashes($pc["NAME"]));
            html_error_quit("目标文件夹中的文件数已达上限 " . $pc["NLIM"] . " 个!");
            exit;
        }
        if (intval($_COOKIE["BLOGFAVNID"])) {
            if ($_COOKIE["BLOGFAVACTION"] == "favcut") {
                $query = "UPDATE nodes SET `pid` = '" . $pid . "' WHERE `nid` = '" . intval($_COOKIE["BLOGFAVNID"]) . "';";
            } elseif ($_COOKIE["BLOGFAVACTION"] == "favcopy") {
                $query = "SELECT * FROM nodes WHERE `nid` = '" . intval($_COOKIE["BLOGFAVNID"]) . "' LIMIT 0 , 1 ;";
                $result = mysql_query($query, $link);
                $rows = mysql_fetch_array($result);
                mysql_free_result($result);
                $query = "INSERT INTO `nodes` ( `nid` , `pid` , `type` , `source` , `hostname` , `changed` , `created` , `uid` , `comment` , `commentcount` , `subject` , `body` , `access` , `visitcount` , `tid` , `emote` ,`htmltag`) " . "VALUES ('', '" . $pid . "', '0', '" . addslashes($rows["source"]) . "', '" . addslashes($rows["hostname"]) . "', NOW( ) , '" . addslashes($rows["created"]) . "', '" . $pc["UID"] . "', '" . intval($rows["comment"]) . "', '" . intval($rows["commentcount"]) . "', '" . addslashes($rows["subject"]) . "', '" . addslashes($rows["body"]) . "', '3', '" . intval($rows["visitcount"]) . "', '" . intval($rows["tid"]) . "', '" . intval($rows["emote"]) . "','" . intval($rows["htmltag"]) . "');";
            }
            mysql_query($query, $link);
        }
        setcookie("BLOGFAVACTION");
        setcookie("BLOGFAVNID");
        pc_html_init("gb2312", stripslashes($pc["NAME"]));
        pc_update_record($link, $pc["UID"]);
        $log_action = "CUT/COPY FAV";
        pc_return("pcdoc.php?userid=" . $pc["USER"] . "&tag=3&pid=" . $pid);
    }
    if (pc_is_groupwork($pc)) {
        pc_group_logs($link, $pc, $log_action, $log_content);
    }
    html_normal_quit();
}
Exemple #8
0
    $nextMonth = get_next_month($yy, $mm);
    $nyy = $nextMonth[0];
    $nmm = $nextMonth[1];
    return array(number_format($yy * 10000000000 + $mm * 100000000 + 1000000, 0, "", ""), number_format(min(date("YmdHis"), $nyy * 10000000000 + $nmm * 100000000 + 1000000), 0, "", ""));
}
$userid = addslashes($_GET["userid"]);
$archDate = pc_check_archdate($_GET["y"], $_GET["m"]);
if (!$archDate) {
    pc_html_init("gb2312");
    html_error_quit("对不起,档案日期错误!");
    exit;
}
$link = pc_db_connect();
$pc = pc_load_infor($link, $userid);
if (!$pc) {
    pc_html_init("gb2312");
    pc_db_close($link);
    html_error_quit("对不起,您要查看的Blog不存在");
    exit;
}
//if( pc_cache( $pc["MODIFY"] ) )
//	return;
Header("Content-type: file/html");
Header("Content-Disposition: inline;filename=" . $pc["USER"] . "_blog_" . substr($archDate[0], 0, 8) . "_" . substr($archDate[1], 0, 8) . ".html");
echo '<?xml version="1.0" encoding="gb2312"?>';
?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- saved from url=<?php 
echo "http://" . $pcconfig["SITE"] . "/pc/pcarch.php?userid=" . $pc["USER"] . "&y=" . substr($archDate[0], 0, 4) . "&m=" . substr($archDate[0], 4, 2);
Exemple #9
0
        case 1:
            $query = "SELECT indexxsl,changed,hostname,stylesheet FROM userstyle WHERE uid = " . $pc["UID"] . " ;";
            $title = "Blog首页样式表";
            $key = "indexxsl";
            break;
        case 2:
            $query = "SELECT nodexsl,changed,hostname,stylesheet FROM userstyle WHERE uid = " . $pc["UID"] . " ;";
            $title = "Blog文章样式表";
            $key = "nodexsl";
            break;
        default:
            $query = "SELECT css,changed,hostname,stylesheet FROM userstyle WHERE uid = " . $pc["UID"] . " ;";
            $title = "Blog CSS样式";
            $key = "css";
    }
    pc_html_init("gb2312", $title);
    $result = mysql_query($query, $link);
    $rows = mysql_fetch_array($result);
    mysql_free_result($result);
    ?>
<br /><br />
<p align="center">
[<a href="pcstyle.php?userid=<?php 
    echo $pc["USER"];
    ?>
&type=1">首页样式表</a>]&nbsp;&nbsp;
[<a href="pcstyle.php?userid=<?php 
    echo $pc["USER"];
    ?>
&type=2">文章样式表</a>]&nbsp;&nbsp;
[<a href="pcstyle.php?userid=<?php 
Exemple #10
0
            html_error_quit("两次发文间隔过密,请休息几秒再试!");
            break;
        case -7:
            html_error_quit("无法读取索引文件! 请通知站务人员, 谢谢! ");
            break;
        case -8:
            html_error_quit("本文不可回复!");
            break;
        case -9:
            html_error_quit("系统内部错误, 请迅速通知站务人员, 谢谢!");
            break;
        case -21:
            html_error_quit("您的积分不符合当前讨论区的设定, 暂时无法在当前讨论区发表文章...");
            break;
    }
    pc_html_init("gb2312", "Blog申请");
    ?>
<table cellpadding=3 cellspacing=1 align=center class=TableBorder1>
<tr align=center><th width="100%">申请提交成功!</td>
</tr><tr><td width="100%" class=TableBody1>
您的BLOG申请已经提交成功,管理员会在两天内处理您的申请。<br/><br/>
本页面将在3秒后自动切换自Blog论坛<meta HTTP-EQUIV=REFRESH CONTENT='3; URL=/bbsdoc.php?board=<?php 
    echo $pcconfig["BOARD"];
    ?>
' >,<b>您可以选择以下操作:</b><br><ul>
<li><a href="/mainpage.php">返回首页</a></li>
<li><a href="/pc/index.html">返回Blog首页</a></li>
<li><a href="/bbsdoc.php?board=<?php 
    echo $pcconfig["BOARD"];
    ?>
">返回Blog论坛</a></li>
Exemple #11
0
    header("HTTP/1.1 404 NOT FOUND");
    html_init("gb2312", $pcconfig["BBSNAME"] . "Blog");
    html_error_quit("对不起,您要查看的Blog不存在");
    exit;
}
if ($pc["STYLE"]["SID"] == 9) {
    header("Location: indexxml.php?id=" . $pc["USER"]);
}
//自定义模板
$userPermission = pc_get_user_permission($currentuser, $pc);
$sec = $userPermission["sec"];
$pur = $userPermission["pur"];
$tags = $userPermission["tags"];
$nodes = pc_load_nodes($link, $pc, $pur, $pno);
$blogs = pc_blog_menu($link, $pc, 0);
if (!($pur == 3 && !pc_is_groupwork($pc))) {
    //Blog所有者的访问不进行计数  windinsn dec 10,2003
    pc_counter($link);
}
//if( pc_cache( $pc["MODIFY"] ) )
//	return;
pc_html_init("gb2312", $pc["NAME"], "", $pc["STYLE"]["CSSFILE"], $pc["BKIMG"]);
$totalnodes = 0;
get_calendar_array($link, $pc, $pur, $totalnodes);
?>
<script src="bc.js"></script>
<?php 
if (function_exists($pc["STYLE"]["INDEXFUNC"])) {
    $pc["STYLE"]["INDEXFUNC"]($link, $pc, $sec, $nodes, $blogs, $pur, $tags, $pno, $totalnodes);
}
pc_db_close($link);
Exemple #12
0
{
    $query = "SELECT * FROM trackback WHERE `nid` = '" . $nid . "' ;";
    $result = mysql_query($query, $link);
    $tbarr = array();
    for ($i = 0; $i < mysql_num_rows($result); $i++) {
        $tbarr[$i] = mysql_fetch_array($result);
    }
    mysql_free_result($result);
    return $tbarr;
}
$nid = (int) $_GET["nid"];
$uid = (int) $_GET["uid"];
$subject = html_format(base64_decode($_GET["subject"]));
$link = pc_db_connect();
$tbarr = pc_get_trackback($link, $nid);
pc_html_init("gb2312", $subject);
?>
<table cellspacing=0 cellpadding=3 border=0 width=100% class=t1>
	<tr>
		<td class=t2><font class=content>继续我们的讨论……</font></td>
	</tr>
	<tr>
		<td class=t8><font class=content>
		<strong>TrackBack Ping URL:</strong><br />
		http://<?php 
echo $pcconfig["SITE"];
?>
/pc/tb.php?id=<?php 
echo $nid;
?>
<br />