mới update lại hệ cái trừ tiền cho thx mod + urealhide nè
giờ mở thx_machine.php ra
ai làm bước cuối trên của tui thì bỏ đi làm cái này mới nha
tìm và xoá
CODE
$DB->query("update ibf_members set `cash`=`cash`-20 where id ='{$this->ibforums->member['id']}'");
CODE
$DB->query("update ibf_members set `cash`=`cash`+20 where id ='{$this->topic['starter_id']}'");
bỏ 2 cái đó đi trước khi làm
rùi giờ làm lại
CODE
Get first post time, but only if we're using sort by date
thêm vào sau đó
CODE
$bvd = $DB->simple_exec_query( array( 'select' => 'cash', 'from' => 'members', 'where' => "id=".$ibforums->member['id']) );
$dvb = $DB->simple_exec_query( array( 'select' => 'starter_id', 'from' => 'topics', 'where' => "tid=".$ibforums->input['t']) );
$bcount = "";
$dcount = "";
if ($ibforums->member['id'])
{
if ($bvd['cash'] >= 20
{
$bcount = "cash=cash- 20"
$DB->simple_construct( array( 'update' => 'members',
'set' => $bcount,
'where' => 'id='.$ibforums->member['id']
) );
$DB->simple_exec();
} else {
$std->Error( array( LEVEL => 1, MSG => 'nomoney') );
}
$dcount = "cash=cash+ 20"
$DB->simple_construct( array( 'update' => 'members',
'set' => $dcount,
'where' => 'id='.$dvb['starter_id']
) );
$DB->simple_exec();
}
mở lang_eror.php
CODE
'nomoney' => "ko có đủ tiền",
rùi đó test dùm tui coi mới ngồi viết ra post lên đây luôn, chưa test ai test hộ có thưởng