function isSecretPass($gCookie, $uid, $dbid) { global $isRoot, $isAdmin, $v_LogId, $table, $THIS_FILE; if (!strstr($gCookie, $table . "_" . $uid . "_")) { if (!$v_LogId || $v_LogId && $v_LogId != $dbid) { if (!$isRoot && !$isAdmin) { putErrPage(getErrorMsg(4)); } } } }
<?php session_start(); include './conf/db_info.php'; include './conf/db/' . $DB[kind] . '.php'; include './lib/init_check.php'; $DB_CONNECT = isConnectDb($DB[host], $DB[user], $DB[pass]); $DB_USEMYDB = isSelecteDb($DB[name], $DB_CONNECT); if (!$DB_CONNECT) { putErrPage(getErrorMsg(0)); } if (!$DB_USEMYDB) { putErrPage(getErrorMsg(1)); } include './conf/root_info.php'; include './conf/member_info.php'; $initTime = getNowTimes(); $MEMBER = getMemberLog($HTTP_SESSION_VARS[KimsLogId], 1, $DB_CONNECT); $v_LogId = $MEMBER[MB_ID]; $isRoot = getIsRoot(); $isAdmin = 0; $skin[head] = $skin[head] ? $skin[head] : 'default'; $skin[foot] = $skin[foot] ? $skin[foot] : 'default'; $HeadImg = './template/header/' . $skin[head] . '/image'; $FootImg = './template/footer/' . $skin[foot] . '/image'; $SearImg = './lib/module/search/image'; include './lib/module/search/func.php'; @(include './template/header/' . $skin[head] . '/header.php'); include './lib/init_open.php'; @(include './lib/module/search/search.php'); @(include './bbs/lib/include/inline/hidden.php');
} $ViewPerm = getEnterPerm($bbs[ViewPm], "", true, true); if (!$ViewPerm) { putErrPage(getErrorMsg(2)); } $WritePerm = getEnterPerm($bbs[WritePm], "", true, true); if (!$WritePerm) { $Wauth = "none"; } $ReplyPerm = getEnterPerm($bbs[ReplyPm], "", true, true); if (!$ReplyPerm) { $Rauth = "none"; } $RCD = db_fetch_array(db_query("SELECT * FROM kimsbod7_{$table}_dat WHERE BB_UID='{$uid}'", $DB_CONNECT)); if (!$RCD[BB_UID]) { putErrPage(getErrorMsg(3)); } if ($RCD[BB_SECRET]) { isSecretPass($HTTP_SESSION_VARS[kimsboard7_secr], $RCD[BB_UID], $RCD[BB_MB_ID]); } putReadCount($table, $uid, $HTTP_SESSION_VARS[kimsboard7_view], $bbs[HowCount]); $gvDownJsQue = "0,0,0,0,0,0,0"; if ($RCD[BB_FILE] || $RCD[BB_LINK]) { $Enable_Down = getEnterPerm($bbs[DownloadPm], $RCD[BB_MB_ID], $RCD[BB_FILE], $RCD[BB_LINK]); $gvUpfileStr = $Enable_Down ? getMultiFileStr($RCD[BB_FILE], "./bbs/table/" . $table . "/upload") : ''; $gvUpfileNum = getMultiFileNum($RCD[BB_FILE]) + getMultiFileNum($RCD[BB_LINK]); $gvDownJsQue = $Enable_Down . ",'" . $gvUpfileStr . "'," . $gvUpfileNum . "," . $RCD[BB_DOWN] . ",'" . $table . "'," . $RCD[BB_UID] . ",'" . $bbs[Skin] . "'"; $gvDownJsQue = $Enable_Down ? $gvDownJsQue . ",'" . $RCD[BB_LINK] . "'" : $gvDownJsQue . ",''"; } $gvModifyQue = "'modify'," . $isRoot . "," . $isAdmin . ",'" . $v_LogId . "','" . $RCD[BB_MB_ID] . "','" . $RCD[BB_UID] . "','',event"; $gvDeleteQue = "'delete'," . $isRoot . "," . $isAdmin . ",'" . $v_LogId . "','" . $RCD[BB_MB_ID] . "','" . $RCD[BB_UID] . "','',event";
$Field_Arr = array("BB_PID", "", "", "", "BB_SUBJECT", "BB_NAME", "BB_HIT", "BB_REQ", "BB_DOWN", "BB_UID", "BB_HOME_URL", "BB_PREVIEW", "BB_IP", "BB_AGENT", "BB_ADD"); $addarr = explode(',', $bbs[add_field]); for ($k = 0; $k < 10; $k++) { $addarrexp = explode('|', trim($addarr[$k])); if (!$addarrexp[0]) { continue; } $Field_Arr[] = $addarrexp[1]; } $Title_Arr = explode(',', $bbs[sbjstr]); $Title_Num = sizeof($Title_Arr); $Seted_Arr = explode(',', $bbs[sbjset]); $Seted_Num = sizeof($Seted_Arr); $ListPerm = getEnterPerm($bbs[ListPm], "", true, true); if (!$ListPerm) { putErrPage(getErrorMsg(2)); } $ViewPerm = getEnterPerm($bbs[ViewPm], "", true, true); if (!$ViewPerm) { $Vauth = "disabled"; } $WritePerm = getEnterPerm($bbs[WritePm], "", true, true); if (!$WritePerm) { $Wauth = "none"; } $ReplyPerm = getEnterPerm($bbs[ReplyPm], "", true, true); if (!$ReplyPerm) { $Rauth = "none"; } $LimitArr = explode(',', trim($bbs[NoticeUid])); $recnum = $grecnum && $grecnum < 200 ? $grecnum : $bbs[recnum];
<?php if (!$uid) { putErrPage(getErrorMsg(3)); } $UID_DATA = db_fetch_array(db_query("SELECT * FROM kimsbod7_" . $table . "_dat WHERE BB_UID='{$uid}'", $DB_CONNECT)); if (!getPassCheck($COMP_PASS, $UID_DATA[BB_PASS], $UID_DATA[BB_MB_ID])) { putErrPage(getErrorMsg(4)); } $KEY_UPDATE = db_query("SELECT * FROM kimsbod7_" . $table . "_key WHERE KY_PID <= " . $UID_DATA[BB_PID] . " ORDER BY KY_KEY DESC", $DB_CONNECT); $ROW_DATA = db_fetch_array(db_query("SELECT MIN(BB_PID) FROM kimsbod7_" . $table . "_dat", $DB_CONNECT)); $NKEY = $ROW_DATA[0]; while ($KEY = db_fetch_array($KEY_UPDATE)) { $DEL_QUE = "SELECT BB_PID FROM kimsbod7_" . $table . "_dat "; $DEL_QUE .= "WHERE BB_PID >= {$NKEY} AND BB_PID < " . $KEY[KY_PID] . " ORDER BY BB_PID DESC LIMIT 0,1"; $UKEY = db_fetch_array(db_query($DEL_QUE, $DB_CONNECT)); $NKEY = $KEY[KY_PID]; if ($UKEY[BB_PID]) { db_query("UPDATE kimsbod7_" . $table . "_key SET KY_PID='" . $UKEY[BB_PID] . "' WHERE KY_KEY='" . $KEY[KY_KEY] . "'", $DB_CONNECT); } else { db_query("DELETE FROM kimsbod7_" . $table . "_key WHERE KY_KEY='" . $KEY[KY_KEY] . "'", $DB_CONNECT); } } $CMT_DATA = db_query("SELECT * FROM kimsbod7_" . $table . "_rpl WHERE RP_PARENT='{$uid}'", $DB_CONNECT); while ($CMT = db_fetch_array($CMT_DATA)) { getUpfileDelete($CMT[RP_FILE], $table); } getUpfileDelete($UID_DATA[BB_FILE], $table); db_query("DELETE FROM kimsbod7_" . $table . "_dat WHERE BB_UID='" . $uid . "'", $DB_CONNECT); db_query("DELETE FROM kimsbod7_" . $table . "_rpl WHERE RP_PARENT='" . $uid . "'", $DB_CONNECT); if ($bbs[rec_give]) {