- <?php
- if ( !defined( "IN_UCHOME" ) ) exit( "Access Denied" );
- $hash = $_GET['hash'];
- $id = (int)$_GET['id'];
- if (empty($hash) || strlen($hash) != 32 || empty($id)) brand_error();
- $player = get_player($id);
- if(empty($player)) brand_error();
- $has_brand = false;
- foreach($player[1] as $p){
- if($p['hash'] == $hash){
- $has_brand = true;
- break;
- }
- }
- if ($has_brand == false) brand_error();
- $data = get_brand($id, 'b');
- if(empty($data) || !$data['has_brand']) brand_error();
- if(isset($_POST['myFormAc']) && $_POST['myFormAc'] == 'update'){
- update_player();
- exit();
- }
- $id = (int)$_GET['id'];
- if (empty($id)) showmessage('参数错误', 'brand.php?ac=index', 1);
- $data = get_brand($id, 'b');
- $data['brand'] = $data['has_brand'] ? get_player($data['id']) : array();
- if(empty($data)) showmessage('参数错误', 'brand.php?ac=index', 1);
- $hash = substr(md5($data['id'] . UC_KEY) , 0, 10);
- include_once( template( "brand/view/player" ) );
- function brand_error()
- {
- showmessage('参数错误', 'brand.php?ac=index', 2);
- }
- function check_only($hash)
- {
- global $_SC;
- global $_SGLOBAL;
- $hash = addslashes($hash);
- $query = $_SGLOBAL['db']->query("select count(*) as num from {$_SC['tablepre']}yake_dianying_player where hash = '{$hash}' ");
- $num = $_SGLOBAL['db']->fetch_array($query);
- return $num['num'];
- }
- ?>
复制代码 这代码需要登陆才可以访问,如何设为不登陆可以打开
|