그누보드5 mb_point 변경방법

그누보드5 mb_point 변경방법

QA

그누보드5 mb_point 변경방법

본문

=============mssql의 아이디나 비번은 연동되어 있습니다 .=================
$query = 'Select AccountID, GoblinPoint, WCoinC From T_InGameShop_Point Where AccountID = \''.$_mbR['mb_id'].'\';';
$rg = mssql_query($query);
$rg1 = mssql_fetch_array($rg);

WCoinC 이것을 게임머니로 사용할려고 합니다.
게임머니 수정을 어느것을 해야 할지 모르겠습니다.
부탁 드립니다 . 
저희홈페이지 특성상 mssql 을 사용중인데 다른 사다리는 $data['mb_point']=$rg1[WCoinC]; 이런식으로 수정햇더니 연동이 되었습니다 .
부탁드리겠습니다 .

=============mssql의 아이디나 비번은 연동되어 있습니다 .=================
 

 

 

 

원본링크  http://g5.oddsgame.co.kr/bbs/board.php?bo_table=download&wr_id=1

 

 

 


<?PHP require_once ( "./_common.php" ) ;
 ?>
<?PHP require_once ( "./config.php" ) ;
$_POST['conduct'] = Trim( $_POST['conduct'] ) ;
switch ( $_POST['conduct'] ) {case "check.callback" :$_rtnArray = Array ( "result" => 200 , "origin" => _encode( $_SERVER['HTTP_HOST'] ) ,"path" => _encode( @pathinfo( $_SERVER['PHP_SELF'] , PATHINFO_DIRNAME ) ) ) ;
break ;
case "buy.arcade" :$_POST['authkey'] = Trim( $_POST['authkey'] ) ;
$_POST['uuid'] = intval( $_POST['uuid'] ) ;
$_POST['amount'] = intval( $_POST['amount'] ) ;
$_POST['po_rel_table'] = Trim( $_POST['po_rel_table'] ) ;
$_POST['po_content'] = Trim( $_POST['po_content'] ) ;
$_POST['po_rel_action'] = Trim( $_POST['po_rel_action'] ) ;
if ( ! in_array( $_SERVER['HTTP_REFERER'] , Array( $_SERVER['HTTP_HOST'] , $_ODDS_INFO_ARRAY['DOMAIN'] , $_ODDS_INFO_ARRAY['DOMAIN_TEST'] ) )|| ( $_ODDS_INFO_ARRAY['AUTH_KEY'] != $_POST['authkey'] ) ) {$_rtnArray = Array ( "result" => -403 , "message" => "정상적인 접근이 아닙니다." ) ;
} else if ( ( $_POST['uuid'] <= 0 ) || ( $_POST['amount'] <= 0 ) ) {$_rtnArray = Array ( "result" => -412 , "message" => "필수 입력값이 누락되었습니다." ) ;
} else {$_rtnArray = Array ( "result" => -1 , "message" => "일시적인 서비스 지연입니다.\n잠시 후 다시 시도해 주세요." ) ;
$_query = "SELECT mb_no , mb_id , mb_point FROM ".$g5['member_table']." WHERE mb_no = '".$_POST['uuid']."' " ;
$_mbR = sql_fetch( $_query ) ;
$_mbR['mb_no'] = intval( $_mbR['mb_no'] ) ;
$_mbR['mb_point'] = intval( $_mbR['mb_point'] ) ;
if ( $_mbR['mb_no'] <= 0 ) {$_rtnArray = Array ( "result" => -401 , "message" => "로그인이 필요한 서비스입니다." ) ;
} else {if ( $_POST['amount'] > $_mbR['mb_point'] ) $_rtnArray = Array ( "result" => -39 , "message" => "보유 포인트가 부족합니다." ) ;
else {if ( empty( $_POST['po_rel_table'] ) ) $_POST['po_rel_table'] = "^".$_POST['conduct'] ;
if ( empty( $_POST['po_content'] ) ) $_POST['po_content'] = "오락실 게임 구매" ;
if ( empty( $_POST['po_rel_action'] ) ) $_POST['po_rel_action'] = $_POST['conduct']."|".microtime(true) ;
$_isApply = insert_point( $_mbR['mb_id'] , ( $_POST['amount'] * -1 ) , $_POST['po_content'] , $_POST['po_rel_table'] , $_mbR['mb_id'] , $_POST['po_rel_action'] ) ;
$_isApply = intval( $_isApply ) ;
if ( $_isApply == 1 ) {$_query = "SELECT po_id FROM ".$g5['point_table']." WHERE mb_id = '".$_mbR['mb_id']."' "." AND po_rel_table = '".$_POST['po_rel_table']."' "." AND po_rel_id = '".$_mbR['mb_id']."' "." AND po_rel_action = '".$_POST['po_rel_action']."' " ;
$_checkR = sql_fetch( $_query ) ;
$_rtnArray = Array ( "result" => 200 , "message" => "" , "link_uid" => $_mbR['mb_id'], "link_buy" => intval( $_checkR['po_id'] ) , "mb_point" => ( $_row['mb_point'] - $_POST['amount'] ) ) ;
}}}}break ;
case "give.arcade" :$_POST['authkey'] = Trim( $_POST['authkey'] ) ;
$_POST['datas'] = @urldecode( $_POST['datas'] ) ;
$_POST['datas'] = @strtr( $_POST['datas'] , '-_' , '+/+' ) ;
$_POST['datas'] = _decode( $_POST['datas'] ) ;
$_POST['datas'] = json_decode( $_POST['datas'] , true ) ;
if ( ! in_array( $_SERVER['HTTP_REFERER'] , Array( $_SERVER['HTTP_HOST'] , $_ODDS_INFO_ARRAY['DOMAIN'] , $_ODDS_INFO_ARRAY['DOMAIN_TEST'] ) )|| ( $_ODDS_INFO_ARRAY['AUTH_KEY'] != $_POST['authkey'] ) ) {$_rtnArray = Array ( "result" => -403 , "message" => "정상적인 접근이 아닙니다." ) ;
} else if ( ! is_array( $_POST['datas'] ) || ( COUNT( $_POST['datas'] ) <= 0 ) ) {$_rtnArray = Array ( "result" => -412 , "message" => "필수 입력값이 누락되었습니다." ) ;
} else {$_rtnArray = Array ( "result" => -1 , "message" => "일시적인 서비스 지연입니다.\n잠시 후 다시 시도해 주세요." ) ;
$_success = $_failure = 0 ;
for ( $_nRepeat = 0 ;
 $_nRepeat < COUNT( $_POST['datas'] ) ;
 $_nRepeat++ ) {$_row = $_POST['datas'][$_nRepeat] ;
$_row['uuid'] = intval( $_row['uuid'] ) ;
$_row['dividend'] = intval( $_row['dividend'] ) ;
if ( ( $_row['uuid'] <= 0 ) || ( $_row['dividend'] <= 0 ) ) continue ;
$_query = "SELECT mb_no , mb_id , mb_point FROM ".$g5['member_table']." WHERE mb_no = '".$_row['uuid']."' " ;
$_mbR = sql_fetch( $_query ) ;
$_mbR['mb_no'] = intval( $_mbR['mb_no'] ) ;
$_mbR['mb_point'] = intval( $_mbR['mb_point'] ) ;
if ( $_mbR['mb_no'] <= 0 ) { $_failure++ ;
 $_interworkConductArray[] = Array ("uuid" => $_row['uuid'] ,"result" => $_row['result'] ,"link_uid" => $_mbR['mb_id'] ,"link_give" => -1 ,"mb_point" => $_row['mb_point']) ;
} else {if ( empty( $_row['po_rel_table'] ) ) $_row['po_rel_table'] = "^".$_POST['conduct'] ;
if ( empty( $_row['po_content'] ) ) $_row['po_content'] = "오락실 게임 구매 배당 지급" ;
if ( empty( $_row['po_rel_action'] ) ) $_row['po_rel_action'] = $_POST['conduct']."|".microtime(true) ;
$_isApply = insert_point( $_mbR['mb_id'] , $_row['dividend'] , $_row['po_content'] , $_row['po_rel_table'] , $_mbR['mb_id'] , $_row['po_rel_action'] ) ;
$_isApply = intval( $_isApply ) ;
if ( $_isApply == 1 ) {$_success++ ;
$_query = "SELECT po_id FROM ".$g5['point_table']." WHERE mb_id = '".$_mbR['mb_id']."' "." AND po_rel_table = '".$_row['po_rel_table']."' "." AND po_rel_id = '".$_mbR['mb_id']."' "." AND po_rel_action = '".$_row['po_rel_action']."' " ;
$_checkR = sql_fetch( $_query ) ;
$_interworkConductArray[] = Array ("uuid" => $_row['uuid'] ,"result" => $_row['result'] ,"link_uid" => $_mbR['mb_id'] ,"link_give" => intval( $_checkR['po_id'] ) ,"mb_point" => ( $_mbR['mb_point'] - $_row['dividend'] )) ;
}}}$_rtnArray = Array ( "result" => 200 , "message" => "" , "success" => $_success , "failure" => $_failure , "datas" => $_interworkConductArray ) ;
}break ;
default : $_rtnArray = Array ( "result" => -400 , "message" => "정상적인 호출이 아닙니다." ) ;
break;
 }if ( ! defined( 'G5_MYSQLI_USE' ) ) define( 'G5_MYSQLI_USE' , false ) ;
if ( is_array( $_rtnArray ) && ( COUNT( $_rtnArray ) > 0 ) ) echo json_encode( $_rtnArray );
if ( function_exists( 'mysqli_query' ) && G5_MYSQLI_USE ) @mysqli_close( ) ;
else @mysql_close( ) ;
exit ;
?>

이 질문에 댓글 쓰기 :

답변 1

질문의도를 파악하기 조금 힘드네요.

질문에 작성해주신 코드와  올려주신 예제 소스와

연결고리가 없어요.

 

제가 질문을 이해한게 맞다면..

$_mbR['mb_point'] = intval( $_mbR['mb_point'] ) ;

$_mbR['mb_point'] =$rg1[WCoinC];

로 바꾸면 될거같아요

MSSQl2008 과 그누보드가 연동이 되어 있습니다 .

오즈게임에서 API 키등을 넣고 연동 받아서 하는 게임입니다 .


게임 머니를 MSSQL쪽의 데이타로 연결하고 싶은데

$query = 'Select AccountID, GoblinPoint, WCoinC From T_InGameShop_Point Where AccountID = 그누아이디연동;';
$rg = mssql_query($query);
$rg1 = mssql_fetch_array($rg);

WCoinC 머니로 연결하고 싶습니다.
예전에 다른 게임을 $rg1[WCoinC] 로 해서 간단하게 연결햇는데 계속 연결이 안되네요 .

답변을 작성하시기 전에 로그인 해주세요.
전체 59,559
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT