All pastes #605102 Raw Edit

Miscellany

public php v1 · immutable
·published 2007-07-05 23:11 UTC
rendered paste body
<?phpinclude('common.php');if ($user->data['user_id'] == ANONYMOUS){	login_box(request_var('redirect', '../shop.php'));}$shop = new store();if ( !isset($_GET['store']) && !isset($_GET['action']) && !isset($_GET['id']) ){	game_header('Twilight War: Online - Market Isle');	$shop->build_shops($user_stats['user_zone']);	game_footer();}else if ( $_GET['action'] == 'details' && !empty($_GET['id']) ){	$store_id = ( !is_numeric($_GET['id']) ) ? game_die(GAME_ERROR, 'Not a valid store') : $_GET['id'];	game_header('Twilight War: Online - ');	$shop->build_inventory($store_id, $user_stats['user_zone']);	game_footer();}else if ( $_GET['action'] == 'purchase' && !empty($_GET['item']) && !empty($_GET['store']) ){	$store_id = ( !is_numeric($_GET['store']) ) ? game_die(GAME_ERROR, 'Not a valid store') : $_GET['store'];	$item_id = ( !is_numeric($_GET['item']) ) ? game_die(GAME_ERROR, 'Not a valid store') : $_GET['item'];	$shop->store_transaction($store_id, $item_id, $user->data['user_id'], 'buy');}else if ( $_GET['action'] == 'sell' && !empty($_GET['item']) && !empty($_GET['store']) ){	$store_id = ( !is_numeric($_GET['store']) ) ? game_die(GAME_ERROR, 'Not a valid store') : $_GET['store'];	$item_id = ( !is_numeric($_GET['item']) ) ? game_die(GAME_ERROR, 'Not a valid store') : $_GET['item'];	$shop->store_transaction($store_id, $item_id, $user->data['user_id'], 'sell');}?>