-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /var/www/html/z_admin.bk.240724/php/member/
File Upload :
Current File : /var/www/html/z_admin.bk.240724/php/member/act.point.php

<?

if ( empty($total['numid']))
	script_bk ( ' À߸øµÈ Á¢±ÙÀÔ´Ï´Ù. ' );

$lastHistory = $exe->qry_fetch( " from tbl_{$total[table]}_point as mp left outer join tbl_{$total[table]} as m on mp.real_no = m.numid where m.numid = '{$total[numid]}' order by mp.numid desc limit 1 " , " point , totalpoint , m.numid , m.id " ) ;

if ( empty($lastHistory['numid'])) {
	$action = array (
		'keycode'		=> $total['code'] ,
		'write_date'	=> $total['now'] ,
		'ip'			=> $total['ip'] ,
		'real_no'		=> $total['numid'] ,
		'real_id'		=> $lastHistory['id'] ,
		'point'			=> ( $_POST['point_type'] == 'Àû¸³' )?$_POST['point']:'-'.$_POST['point'] ,
		'totalpoint'	=> ( $_POST['point_type'] == 'Àû¸³' )?$_POST['point']:'-'.$_POST['point'] ,
		'contents'		=> str_convert($_POST['point_code'])
	) ;
	$lastNum = $exe->qry_insert( $action , "tbl_{$total[table]}_point" ) ;
} else {
	$action = array (
		'keycode'		=> $total['code'] ,
		'write_date'	=> $total['now'] ,
		'ip'			=> $total['ip'] ,
		'real_no'		=> $total['numid'] ,
		'real_id'		=> $lastHistory['id'] ,
		'point'			=> ( $_POST['point_type'] == 'Àû¸³' )?$_POST['point']:'-'.$_POST['point'] ,
		'contents'		=> str_convert($_POST['point_code'])
	) ;
	if ( $_POST['point_type'] == 'Àû¸³' )
		$action['totalpoint'] = $lastHistory['totalpoint'] + $_POST['point'] ;
	else
		$action['totalpoint'] = $lastHistory['totalpoint'] - $_POST['point'] ;
	$lastNum = $exe->qry_insert( $action , "tbl_{$total[table]}_point" ) ;
}

if ( $_POST['point_type'] == 'Àû¸³' ) {
	$exe->qry_update(" have_point = have_point + {$_POST[point]} " , "tbl_{$total[table]}" , " numid={$total[numid]} " ) ;
} else {
	$exe->qry_update(" have_point = have_point - {$_POST[point]} " , "tbl_{$total[table]}" , " numid={$total[numid]} " ) ;
}

script_re ( $total['cmnnb'] . '&mode=point' ) ;

?>

Copyright © 2017 || Recoded By Mr.Bumblebee