<?php
    if(empty($_GET['k']) || empty($_GET['key']))
        alert_2(1,'请选择一个游戏','',3);
    $pdo = get_pdo();
    $game_row = $pdo -> query('select a.*,b.name from '.DB_PRE.'z_games_content as a left join '.DB_PRE."z_games_class as b on a.class_id=b.id where a.id='{$_GET['key']}' limit 1",'');
    if(empty($game_row))
        alert_2(1,'你选择的游戏已删除','',3);
    $pdo ->sql('update '.DB_PRE."z_games_content set on_read=on_read+1 where id='{$_GET['key']}'");
    $game_out = empty($_COOKIE['game_out']) ? "{$game_row['id']}":"{$_COOKIE['game_out']},{$game_row['id']}";
    setcookie('game_out',$game_out,time()+99999);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" id="fullpage0"  class="">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $game_row['title']; ?> - <?php echo $game_row['name']; ?>小游戏 - 郝海川博客0</title>
<meta name="keywords" content="关键词是" />
<meta name="description" content="描述" />
<meta http-equiv="x-ua-compatible" content="ie=7" />
<link href="./sundry/static_file/img/favicon.ico" rel="icon" type="image/x-icon" />
<link href="./sundry/static_file/img/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link href="<?php echo TPL; ?>/css/css30.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="./sundry/static_file/js/jquery.js"></script>
</head>
<body class="b1_bg" id="styleBackground" style="">
<div id="shadow"></div>
<!--头部-->

<SCRIPT type="text/javascript" src="<?php echo TPL; ?>/js/js30.js"></SCRIPT>
<div class="site_tbar">
  <div class="site_tbar_inner">
    <div class="site_tbar_wri">
    <?php
	$nav = include_nav();
	foreach($nav as $v){
		if($v['nav_xianshi']!='1' || $v['nav_parent_id']!='0'){
			continue;
		}
		?>
		
      <a href="<?php if($v['nav_type']=='0'){
	echo $v['nav_link'];
}else if($v['nav_type']=='1'){
	echo "index.php?h=index&c=moxing_list&moxing_id={$v['nav_moxing']}&lanmu_id={$v['nav_id']}";
}else if($v['nav_type']=='2'){
	//模块
}else if($v['nav_type']=='100'){
	echo 'index.php';
}

?>" <?php
	if($v['nav_dakai']=='1'){
		echo 'target="_blank"';
	}
?> title="<?php echo str_replace('_ueditor_page_break_tag_','',$v['nav_yincang']);
		?>"><?php echo str_replace('_ueditor_page_break_tag_','',$v['nav_name']);
		?></a>
    
		<?php
	}
?>
    </div>
    <div class="site_tbar_so">
      <form method="get" action="games.php">
        <input type="hidden" name="h" value="index">
        <input type="hidden" name="c" value="search">
        <input onBlur="if (value ==''){value='请输入游戏名称'}" name="keyword" id="smart_input" autocomplete="off"  class="ipt1" onFocus="if (value =='请输入游戏名称'){value =''}" value="请输入游戏名称" />
        <input class="inp" value="" type="submit" />
      </form>
    </div>
  </div>
</div>
<!--头部end http://flash.7k7k.com/cms/cms10/20141213/0850041068/2.swf -->
<style type="text/css">
.n_box p{font-size:13px;}
</style>
<?php
$game_row['swf'] = empty($game_row['swf']) ? "http://a.static.ithhc.cn{$game_row['swf2']}" : $game_row['swf'];
$flash='<embed type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" id="gameobj" name="gameobj" width="100%" height="100%" src="'.$game_row['swf'].'" allowscriptaccess="never" allownetworking="internal" wmode="window" quality="high">'
?>

<!--游戏框-->
<div class="play_box">
  <div><a id="bestposition"></a></div>
  <div class="play_box_cen" id="mb_content">
  	    <!--换肤-->
    <div class="hf--w" id="pf_on" onmouseover="openchgskin()" onmouseout="closechgskin()" name="boxstyle">
      <div class="ri_hf">
        <ul>
          <li><img id="bstyle11" title="天空畅想" onclick="setStyle(11);return false;" src="<?php echo TPL; ?>/img/play/pf10.jpg" /></li>
          <li><img id="bstyle12" title="童年" onclick="setStyle(12);return false;" src="<?php echo TPL; ?>/img/play/pf11.jpg" /></li>
          <li><img id="bstyle13" title="夏日荷花" onclick="setStyle(13);return false;" src="<?php echo TPL; ?>/img/play/pf12.jpg" /></li>
          <li><img id="bstyle14" title="夜晚" onclick="setStyle(14);return false;" src="<?php echo TPL; ?>/img/play/pf13.jpg" /></li>
          <li><img id="bstyle15" title="海底世界" onclick="setStyle(15);return false;" src="<?php echo TPL; ?>/img/play/pf14.jpg" /></li>
          <li><img id="bstyle1" title="天空" onclick="setStyle(1);return false;" src="<?php echo TPL; ?>/img/play/pf0.jpg" /></li>
          <li><img id="bstyle2" title="迪士尼" onclick="setStyle(2);return false;" src="<?php echo TPL; ?>/img/play/pf1.jpg" /></li>
          <li><img id="bstyle3" title="保护动物" onclick="setStyle(3);return false;" src="<?php echo TPL; ?>/img/play/pf2.jpg" /></li>
          <li><img id="bstyle4" title="夕阳西下" onclick="setStyle(4);return false;" src="<?php echo TPL; ?>/img/play/pf3.jpg" /></li>
          <li><img id="bstyle5" title="早上好！" onclick="setStyle(5);return false;" src="<?php echo TPL; ?>/img/play/pf4.jpg" /></li>
          <li><img id="bstyle6" title="喜羊羊与灰太狼" onclick="setStyle(6);return false;" src="<?php echo TPL; ?>/img/play/pf5.jpg" /></li>
          <li><img id="bstyle7" title="圣诞快乐" onclick="setStyle(7);return false;" src="<?php echo TPL; ?>/img/play/pf6.jpg" /></li>
          <li><img id="bstyle8" title="星空" onclick="setStyle(8);return false;" src="<?php echo TPL; ?>/img/play/pf7.jpg" /></li>
          <li><img id="bstyle9" title="海底世界" onclick="setStyle(9);return false;" src="<?php echo TPL; ?>/img/play/pf8.jpg" /></li>
          <li><img id="bstyle10" title="向日葵" onclick="setStyle(10);return false;" src="<?php echo TPL; ?>/img/play/pf9.jpg" /></li>
        </ul>
      </div>
      <div class="ri_hf_bg--w"></div>
	  <iframe scrolling="no" frameborder="0" src="about:blank"></iframe>
    </div>
    <!--换肤end-->
    <div class="play_box_wri">
      <div name="boxstyle" class="play_box_2">
	  		<div class="p_tit--w" id="gtitle"><h1 style="width:182px;"><a href="games.php?h=index&c=game_content&k=<?php echo $_GET['k']; ?>&key=<?php echo $_GET['key']; ?>" title="<?php echo $game_row['title']; ?>" target="_blank"><?php echo $game_row['title']; ?></a></h1></div>
		  				  <div class="play_box_tit_ri">
          <a href="" onclick="openchgskin();return false;" onmouseout="closechgskin()" onfocus="this.blur();"><img src="<?php echo TPL; ?>/img/play/btn_hf--w.gif" /></a>
          <img class="gd" src="<?php echo TPL; ?>/img/play/btn_gd--w.gif" id="turnedOff" onclick="turnOff()">
          <div id="turnedOn">
          	<embed name="kd" src="<?php echo TPL; ?>/img/kd.swf" quality="high" allowScriptAccess="always" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="50" height="26"></embed>
          </div>
          </div>
      </div>
      <!--游戏-->
      <div class="game" id="mb_game">
        <div class="game_le" id="left_box" style="width:640px;height:460px;">
          <div id="loadingdiv" style="display:block"></div>
          <!--播放参数开始-->
          <style type="text/css">
           /* #addiv{position:relative;top:10px;left:10px;z-index:9999;height:100%;width:100%;}*/
          </style>
          <div class="qp_d">
            <div title="退出全屏" class="tc_qp" style="color:#FFFFFF;position:fixed;top:20px;right:20px;background:url(<?php echo TPL; ?>/img/play/ico_btn1_.png) no-repeat -573px -5px;height:31px;width:31px;display:none;cursor:pointer;"></div>
          <div id="addiv" style="margin:0;">
<?php echo $flash; ?>
<?php /*<div class="ad_hidden" style="width:100%;height:100%;position:absolute;left:0;top:7px;text-align:left;background:#D6F0FF;">
  <div class="timez" style="position:absolute;right:20px;top:0;color:#FF8400;font-size:20px;font-weight:bold;">10</div>
  <div style="width:400px;height:300px;background:#ffffff;margin:70px auto 0;">
    <a href="" target="_blank"><img src="" style="width:100%;height:100%;"></a>
  </div>
</div>
<script type="text/javascript">
  var cc = window.setInterval(aa,1000);
var tt = $('.timez').text();
  function aa(){
      $('.timez').text(tt);
    if(tt<1){
      $('.ad_hidden').hide();
      window.clearInterval(cc);
    }
    tt--;
  }
</script>

*/ ?>



</div>

                     </div>
          <div id="swfdiv" >
		  <div id="pusher"></div>
		  </div>
     
          <!--播放参数结束-->
          <!--fullpage s-->
		  <div id="fullpage2" class="method" style="right:0px;display:none">
              <iframe scrolling="no" frameborder="0" src="about:blank"></iframe>
              <span title="<?php /*查看操作说明*/ ?>" onclick="chgTips();return false;"></span>
          </div>
          <div id="fullpage3" style="height:900px;display:none">
              <iframe scrolling="no" frameborder="0" src="about:blank"></iframe>
              <div id="methodinfo" style="height:885px;"></div>
          </div>
		  <!--fullpage e-->
        </div>
        <div class="game_ri" id="right_box">
          <div class="ri_box_t--w" id="cstyle1">
          	<a style="cursor:pointer" href="#" id="relationgamesclass" onclick="return false;" onmouseover="tabchg('1');this.blur();return false;" target="_self" onfocus="this.blur();">相关游戏</a>
                        <a class="tab_on" href="#" style="cursor:pointer" id="optionnoteclass" onclick="return false;" onmouseover="tabchg('2');this.blur();return false;" target="_self" onfocus="this.blur();">操作说明</a>
                        <a href="#" id="webgameclass" onclick="return false;" onmouseover="tabchg('3');this.blur();return false;" target="_self" onfocus="this.blur();">热门游戏</a>
          </div>
          <div class="ri_box_c--w" id="cstyle2">
          <div id="rightdivheight" style="height:444px;">
            <!--相关游戏-->
            <div style="display:none;" id="relationgames">
              <div class='wb1'><ul id='slide'>
                <li><div name='r_t' class='ga2'>
                  <dl>
<?php
    $new_art_arr = get_similar_game($game_row['title'],11);
        foreach($new_art_arr as $v){
?>
                          <?php if(empty($v['pic'])){$v['pic']=FILE_PATH."{$v['pic2']}";} ?>
                    <dt><a title='<?php echo $v['title']; ?>' target="_blank" href='games.php?h=index&c=game_content&k=2&key=<?php echo $v['id']; ?>'><img alt='<?php echo $v['title']; ?>' title='<?php echo $v['title']; ?>' name='lzimg_4' src='<?php echo $v['pic']; ?>' /></a><a title='<?php echo $v['title']; ?>' target="_blank" href='games.php?h=index&c=game_content&k=2&key=<?php echo $v['id']; ?>'><?php echo mb_substr($v['title'],0,'5','utf-8'); ?></a></dt>
        <?php } ?>
                   </dl></div></li></ul></div>            </div>
            <!--相关游戏 end-->
<link rel="stylesheet" type="text/css" href="<?php echo TPL; ?>/css/c.css">

            <!--操作指南-->
                        <div class="" id="optionnote">
              <div class="n_box">
                            <b>游戏玩法</b>
              <div class='howto'>
                <style type="text/css">
                  .howto li{margin-left:5px;}
                </style>
                <?php echo str_replace('game_keyboard','',str_replace('ol','ul',$game_row['zhinan'])); ?>&nbsp;
              </div><div class='clear'></div><p class='p_fg2'></p>                                          <b>如何开始</b>
              <div class="n_box_tex">
                <?php echo $game_row['kaishi']; ?>&nbsp;              </div>
              <p class="p_fg2"></p>
                                          <b>游戏目标</b>
              <div class="n_box_tex">
                <P><?php echo $game_row['mubiao']; ?>&nbsp;</P>              </div>
                            </div>
            </div>
                        <!--操作指南 end-->
            <!--网页游戏-->
            <div id="webgame" class="ga3">
              <dl>
<?php
  $res = $pdo -> query('select title,pic,id,pic2 from '.DB_PRE."z_games_content where class_id='{$_GET['k']}' order by on_read desc limit 12");
  $res = empty($res) ? array() : $res;
  foreach($res as $v){
?>
<?php if(empty($v['pic'])){$v['pic']=FILE_PATH."{$v['pic2']}";} ?>
 <dt><a title='<?php echo $v['title']; ?>' target="_blank" href='games.php?h=index&c=game_content&k=2&key=<?php echo $v['id']; ?>'><img alt='<?php echo $v['title']; ?>' title='<?php echo $v['title']; ?>' name='lzimg_4' lz_src='<?php echo $v['pic']; ?>' /></a><a title='<?php echo $v['title']; ?>' target="_blank" href='games.php?h=index&c=game_content&k=2&key=<?php echo $v['id']; ?>'><?php echo mb_substr($v['title'],0,'5','utf-8'); ?></a></dt>
  <?php } ?>

         </dl>
            </div>
            <!--网页游戏 end-->
                           <div class="ri_box_c_pag" id="turnpage">
                <div id="pagleft"></div>
              </div>
                       </div>

            <div class="clear"></div>
          </div>
        </div>
      </div>
      <!--游戏-->
      <!--控制栏-->
      <script type="text/javascript">
        function hhc_replay(){
          $('#addiv').empty();
          $('#addiv').append('<?php echo $flash; ?>');
        }
        function hhc_big(){
          if($('#left_box').width()=='640'){
            $('#mb_content').css('width','1086px');
            $('#mb_game').css('width','1049px');
            $('#left_box').css('width','740px');
            $('#left_box').css('height','550px');
            $('#padswf').css('height','679px');
          }else if($('#left_box').width()=='740'){
            $('#mb_content').css('width','1200px');
            $('#mb_game').css('width','1100px');
            $('#left_box').css('width','800px');
            $('#left_box').css('height','650px');
            $('#padswf').css('height','779px');
          }
        }
        function hhc_small(){
          if($('#left_box').width()=='740'){
            $('#mb_content').css('width','970px');
            $('#mb_game').css('width','943px');
            $('#left_box').css('width','640px');
            $('#left_box').css('height','460px');
            $('#padswf').css('height','603px');
          }else if($('#left_box').width()=='800'){
            $('#mb_content').css('width','1086px');
            $('#mb_game').css('width','1049px');
            $('#left_box').css('width','740px');
            $('#left_box').css('height','550px');
            $('#padswf').css('height','679px');
          }
        }
          function hhc_all(){
            $('.qp_d').css('position','fixed');
            $('.qp_d').css('top','0');
            $('.qp_d').css('left','0');
            $('.qp_d').css('width','100%');
           /* alert($(document).height());
            //$('.qp_d').css('height',+'px');*/
            $('.tc_qp').show();
          }

          $(function(){
            $('.tc_qp').click(function(){
              $('.qp_d').css('position','static');
               $('.tc_qp').hide();
            })
                document.onkeydown=function(event){
             var e = event || window.event || arguments.callee.caller.arguments[0];
              if(e && e.keyCode==27){ 
                  $('.qp_d').css('position','static');
                   $('.tc_qp').hide();
                }
         }; 
          })
      </script>
      <div class="btn_ico" name="boxstyle" style="float:right;">
        <div class="btn_ico_le--w" style="width:230px;float:right;margin-right:20px;">
        <a id="fs_a" href="javascript:void(0)" onclick="hhc_replay();" onfocus="this.blur();" target="_self">重玩</a>
        <a id="zb_a" onclick="hhc_big()" href="javascript:void(0)" onfocus="this.blur();" target="_self">放大</a>
        <a id="zs_a" onclick="hhc_small()" href="javascript:void(0)" onfocus="this.blur();" target="_self">缩小</a>
                <a id="ctrlbg" onclick="hhc_all()" target="_self" onfocus="this.blur();">全屏游戏</a>
                </div>

      </div>
      <!--控制栏end-->
    </div>
    <div name="boxstyle"><embed width="100%" style="height:603px;" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" quality="high" src="<?php echo TPL; ?>/img/play/game_play_bg.swf" wmode="transparent" name="padswf" id="padswf"></embed></div>
  </div>
</div>
<!--游戏框end-->
<div class="common1_t mt" name="introd"></div>
<div class="common1_c" name="introd">


<!--你可能喜欢玩的游戏-->
<div id="plike">
<div class="l_game">
	<div class="ri_box_c_pag l_game_pag">
    <a id="tfpg1" target="_self" class="pagon" href="javascript:switchpage(5,'pg',1);">1</a>
    <a id="tfpg2" target="_self" href="javascript:switchpage(5,'pg',2);">2</a>
    <a id="tfpg3" target="_self" href="javascript:switchpage(5,'pg',3);">3</a>
    <a id="tfpg4" target="_self" href="javascript:switchpage(5,'pg',4);">4</a>
    <a id="tfpg5" target="_self" href="javascript:switchpage(5,'pg',5);">5</a>
</div>
</div>
<div class="l_game_img">
	<a class="l_uico" id="pg_pre" target="_self" href="javascript:switchpage(5,'pg',5);" title="上一页" style="outline:none" onfocus="this.blur();"></a>
    <div id="r_t"></div>
    <a class="l_dico" id="pg_nex" target="_self" href="javascript:switchpage(5,'pg',2);" title="下一页" style="outline:none" onfocus="this.blur();"></a>
</div>
</div>
<!--你可能喜欢玩的游戏end-->
  <!--游戏说明-->
  <div class="game_cz">
    <div style="margin-bottom:10px;">
	    </div>
      <style type="text/css">
        .olt_con p img{max-width:960px;}
      </style>
    <div class="game_cz_fg"></div>
        <div class="olt_con"><P><?php echo $game_row['jianjie']; ?>&nbsp;</P></div>

      </div>
  <!--相同游戏-->
    
        <!--相同游戏end-->
  <div class="game_fl">
    <div class="game_cz_fg"></div>
    <b>游戏名:</b><a href="games.php?h=index&c=game_content&k=<?php echo $_GET['k']; ?>&key=<?php echo $game_row['id']; ?>"><?php echo $game_row['title']; ?></a><b>分类:</b><a href="games.php?h=index&c=game_list&k=<?php echo $_GET['k']; ?>"><?php echo $game_row['name']; ?></a> <b>日期:</b><?php echo date('Y-m-d',$game_row['time']); ?><b>大小:</b><?php echo $game_row['size']; ?>     </div>
  <!--游戏说明end-->

 

  
</div>
<div class="common1_b" name="introd"></div>
<!--操作说明外框-->

<!--版权-->
<div class="common1_t" name="introd"></div>
<div class="common1_c" name="introd">
    <div id="copy_footer">
    <div class="copy_fleft1">
      <div class="copy_fl2">健康游戏忠告</div>
      <div class="copy_fr2">抵制不良游戏，拒绝盗版游戏 注意自我保护，谨防受骗上当<br>
        适度游戏益脑，沉迷游戏伤身 合理安排时间，享受健康生活</div>
    </div>
    <div class="copy_fright1">本站作品为网友提供，如果侵犯了您的版权，请联系我们，本站将在3个工作日内删除<br>
      提示：本站为防止低俗内容出现，用户上传游戏请先联系我们，谢谢 </div>
   <div class="copy_about">
     　@ 郝海川博客0 &nbsp;&nbsp;沪ICP备14034501号&nbsp; Program By<a style="padding:0 5px;" target="_blank" href="http://www.ithhc.cn/">郝海川博客</a>&nbsp;&nbsp;</div>
  </div>
  <div class="clear"></div>
</div>
<div class="common1_b" name="introd"></div>
<!--版权-->

</body>
</html>
<!--content-end-->
