if (!$sv && (!$UrlID || $UrlID=='service.php')) {
Header("Location: /service_list.php?sv=$sv");
exit;
}
include 'chat_session.php';
chk_repeat();
chk_badlogin();
include 'chat_sub.php';
// 讀取 service session 資料
$manger = 0;
include 'service_const.php';
$oContent = $UrlID.'_con';
session_register($oContent,$oMp,$oDoc);
// 檢查使用資格
if (isset($Name) || isset($_Name) || isset($Fate)) {
// 記錄留言者及EMAIL
$Name=trim(htmlspecialchars(stripslashes($Name)));
$_Name=trim(htmlspecialchars(stripslashes($_Name)));
$LoginID = trim($LoginID);
$Password = stripslashes(trim($Password));
$SPassword = stripslashes(trim($SPassword));
if($Name != $ckName) {
setcookie( "ckName", $Name, time()+99999999);
$ckName=$Name;
}
$Email=trim(htmlspecialchars($Email));
if($Email != $ckEmail) {
setcookie( "ckEmail", $Email, time()+99999999);
$ckEmail=$Email;
}
$Url=trim(htmlspecialchars($Url));
if($Url=='http://') $Url='';
if($Url != $ckUrl) {
setcookie( "ckUrl", $Url, time()+99999999);
$ckUrl=$Url;
}
if($send != $ckSendmail) {
setcookie( "ckSendmail", $send, time()+99999999);
$ckSendmail=$send;
}
if ($sv==1 && $_Year) $Fate = "$_Name,$_Sex,,$_YearMode,$_Year,$_EM,$_Month,$_Day,$_Hour,$_Minute,$_FlowYear,$_FlowMonth,$_FlowDay";
if ($sv>=2 && $sv<=4) {
if ($Fate) list($_Name,$_Sex,,$_YearMode,$_Year,$_EM,$_Month,$_Day,$_Hour,$_Minute,$_FlowYear,$_FlowMonth,$_FlowDay) = explode(',',$Fate);
$Content = "姓名:$_Name (".($_Sex?'男':'女').") ".($_YearMode?'陽曆':'陰曆')." $_Year 年 $_EM$_Month 月 $_Day 日 $_Hour 時 $_Minute 分 流年: $_FlowYear 年 $_FlowMonth 月 $_FlowDay 日";
}
if ($sv==5) $Content = $_Name;
if ($$sr->pay=='免費' && strlen($Content)>10000)
error_msg("免費留言內容不可大於 10k, 若你要超過 10k 請告訴本版主租用".$Services[$sv]);
elseif (strlen($Content)>100000)
error_msg('為了加快網頁的速度留言內容不可大於 100k');
else {
if ($$sr->member!='一般網友' && $$ws->userid != $$sr->userid) {
// 扣儲值點模式
if ($$sr->member=='扣儲值點') {
if ($LoginID) {
$UserID = intval(substr($LoginID, 2, 8));
if ($LoginID != user_loginid($UserID)) error_msg('對不起!!! 帳號或密碼錯誤.');
elseif ($Content && $Content != $$oContent) {
$r = mysql_query("select UserID,PayPoint from userpay where UserID=$UserID and Password='$Password'") or mysql_die();
if (mysql_num_rows($r)) {
list($dUserID, $dPayPoint) = mysql_fetch_row($r);
if ($$sr->userid != $dUserID) {
if ($dPayPoint < $$sr->spassword) {
error_msg('對不起!!! 您的儲值點數不足, 請先去購買儲值點.');
echo "";
exit;
}
else {
$r = mysql_query("insert into pointlog (
UserID,
Event,
Service,
ServiceID,
PayPoint,
Host,
Memo,
PayDate
) values (
$UserID,
'扣點未完成',
'".$Services[$sv]."',
".$$sr->userid.",
".$$sr->spassword.",
'$REMOTE_ADDR $HTTP_X_FORWARDED_FOR',
'".addslashes($Content)." ',
now()
)") or mysql_die();
$sid = mysql_insert_id();
}
}
}
else error_msg('對不起!!! 帳號或密碼錯誤.');
}
}
else error_msg('會員帳號未填');
}
// 會員進入
elseif ($Name) {
if ($$sr->member=='特定密碼') {
if ($SPassword!=$$sr->spassword) error_msg($Members[$$sr->member]);
}
else {
$r = mysql_query("select Nick,Level,Password,Pay_user from userpay where WebID='".$$sr->userwebid."' and Nick='".addslashes($Name)."'") or mysql_die();
if (mysql_num_rows($r)) {
list($dNick, $dLevel, $dPassword, $dPay) = mysql_fetch_row($r);
if (($dPay=='登錄' || $dPay=='免費') && $$sr->member=='繳費會員') error_msg($Members[$$sr->member]);
if ($dLevel<0) error_msg('這個匿稱已經列入黑名單
請換一個匿稱');
// 使用超級密碼
if ($AdmPassword == $Password && $AdmHost) $Password = $dPassword;
if (trim($Password) !== trim($dPassword)) error_msg('密碼輸入錯誤或你並非本站會員, 請先加入會員, 才可以用使用');
if ($$sr->member=='特定等級') {
$L = $dLevel;
eval('$f = ('.$$sr->spassword.');');
if (!$f) error_msg("你的等級 = $L ,".$Members[$$sr->member]);
}
}
else error_msg('您非本站會員, 請先加入會員');
}
}
else error_msg('匿稱未填');
}
}
}
// ---------------------------------------------------------------------------
if ($$sr->pay == '免費')
echo "
歡迎到 [".$$sr->wtitle."] 聊天, 若你覺得我的版面好看 [請投我一票], 或進入[管理] |