好感動 ~~~可能有一點貢獻了 Q_Q
如果有人裝了 付費瀏覽 ,但出現現金不足的問題
可以看看以下方面能不能幫忙
代碼: 選擇全部
// Pay_Money_MOD By KCTONY
$pay_money = $postrow[$i]['pay_money'];
$pay_user = $postrow[$i]['pay_user'];
$pay_see = $postrow[$i]['pay_see'];
$user_id = 'id' . $userdata['user_id'] . ',';
$temp_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "#" . $postrow[$i]['post_id']);
$returnurl = '<br><br><a href=' . $temp_url . '> << 返回 >> <a>';
if ( $mode == 'pay_money' && $p == $postrow[$i]['post_id'] && $userdata['user_id'] > 0 )
{
if ( $userdata[[color=red]'user_money'[/color]] < $pay_money)
{
message_die(GENERAL_MESSAGE, $lang['Paymoney_Nomoney'] . $returnurl);
}
$sql = "UPDATE " . USERS_TABLE . " SET [color=#ff0044]user_money = user_money [/color]+ $pay_money WHERE user_id = " . $poster_id;
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, $lang['Paymoney_Cantupdate'], "", __LINE__, __FILE__, $sql);
}
$sql = "UPDATE " . USERS_TABLE . " SET [color=RED]user_money = user_money [/color]- $pay_money WHERE user_id = " . intval($userdata['user_id']);
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, $lang['Paymoney_Cantupdate'], "", __LINE__, __FILE__, $sql);
} else {
$sql = "UPDATE " . POSTS_TEXT_TABLE . " SET pay_user = '".$pay_user.$user_id."', pay_see = pay_see + 1, pay_gotmoney = pay_gotmoney + $pay_money WHERE post_id = ".$p;
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, $lang['Paymoney_Cantupda'], "", __LINE__, __FILE__, $sql);
} else {
$message = '<p><font color="#FF0000">' . $lang['Paymoney_Paytoposter'] . '</font><br>----------</p>'.$message;
}
}
} else {
if($pay_money > 0)
{
If ($poster_id == $userdata['user_id'])
{
$message = $message . '<p>----------<br><font color="#FF0000">' . $pay_see . $lang['Paymoney_Poster'] . $postrow[$i]['pay_gotmoney'] . $lang['Virtual_Money'] . '</font></p>';
} else {
if (stristr($pay_user,$user_id)) {
$message = $message . '<p>----------<br><font color="#FF0000">' . $lang['Paymoney_Payok'] . '</font><br>' . $pay_see . $lang['Paymoney_paysee'] . $postrow[$i]['pay_gotmoney'] . $lang['Virtual_Money'] . '</p>';
} else {
$temp_url = append_sid("viewtopic.$phpEx?mode=pay_money&" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "#" . $postrow[$i]['post_id']);
$message = '<font color="#FF0000">' . $lang['Paymoney_Need'] . $pay_money . $lang['Virtual_Money'] . '</font><br>' . $pay_see . $lang['Paymoney_paysee'] . $postrow[$i]['pay_gotmoney'] . $lang['Virtual_Money'] . ' <BR><form name="pay_money" action='.$temp_url.' method="post"> <input type="submit" name="pay_money" value=" 付錢 " class="mainoption" /></form>';
}
}
} else {
$message = $message;
}
}
// END Pay_Money_MOD
紅色的部分取決於所安裝的 是那個 money mod
竹貓OOHOO這個的virtual money 是 user_money
另外在phpbb point system的是用user_points
不過很奇怪.....分數加密的是 用 user_point =.=
你們是兩個 virtual money 和 point system也有裝嗎 ?