간단한 소스 수정 소액벌이 요청좀요
MSSQl2008 과 그누보드가 연동이 되어 있습니다 .
오즈게임에서 API 키등을 넣고 연동 받아서 하는 게임입니다 .
몇개월전에 수정 햇엇는데 까먹어 버렷네요
단간한 용돈벌이하실불
algml7952@nate.com 네이트주세요
가격은 협의 입니다.
게임 머니를 MSSQL쪽의 데이타로 연결하고 싶은데
$query = 'Select AccountID, GoblinPoint, WCoinC From T_InGameShop_Point Where AccountID = 그누아이디연동;';
$rg = mssql_query($query);
$rg1 = mssql_fetch_array($rg);
WCoinC 머니로 연결하고 싶습니다.
예전에 다른 게임을 $rg1[WCoinC] 로 해서 간단하게 연결햇는데 계속 연결이 안되네요 .
소스 보신후 페이 알려주시고요
[code]
<?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" => @base64_encode( $_SERVER['HTTP_HOST'] ) ,"path" => @base64_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'] = @base64_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 ;
?>
[/code]
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기