KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /home/queenjbs/yuchun/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/queenjbs/yuchun/news_bk.php
<?
include"inc_top.php";
if(!$pageCount) $pageCount = 5;

$show_one_page      = $pageCount;
$show_view_page     = 7;
$page     = ( $page ) ? $page : 1;
$offset   = ($page-1)*$show_one_page;
$order_by ="order by sortNum,no desc,reg_date desc";

  //총 회원;
  if($sessionLevel !=15){ //관리자 일떄 다 보이기.
    $where .= " and is_secret='N' ";
  }

  if($MG=="on"){ // member 회원 볼수있게함.
    if($sessionLevel < 10){
      echo "<script>parent.location.href = './guide.html'</script>";
      exit;
    }
    $where .= "AND general_setting = 'on'";
    $url_tail .= "&MG=$MG";
    $tit_num = 4;
  }else{
  $tit_num = 1;
  }
  if($search_news) {
		$where = "AND (subject like '%".$search_news."%' OR contents like '%".$search_news."%') ";
  }

  $url_tail .= "&tab=$tab&search_news=$search_news";


  $pcLang = substr($_SERVER[HTTP_ACCEPT_LANGUAGE],0,2);

	if($pcLang == "ja" || $sessionLevel == 15){
			$langChk .= '1,'; //japan

		if($waaessionIDX){
			$langChk .= '3,'; //japan member
		}

	}
    /*
	if($sessionIDX){
			$langChk .= '2,'; //all member
	}
			$langChk .='0'; //all

	$where .= " and langChk in($langChk)";
    */

  $tableName = "board_news";
  $total_count  = get_db("SELECT count(*) FROM $tableName where is_delete = 'N' $where");
  $query_limit  = "limit $offset,$show_one_page";

  $QUERY_PAGE  = "SELECT * FROM $tableName where is_delete = 'N' $where $order_by $query_limit";

  $total_page   = ceil( $total_count / $show_one_page);
  $more_next_page = $page+1;
  $viewlist     = ( !$total_count ) ? "" : Get_viewpage($page,$total_count,$show_one_page,$show_view_page,$url_tail);
  $start_num    = $total_count - $offset;  //
  $result= mysql_query($QUERY_PAGE,$db_con);

  if(!$result) {
    error("DB_ERROR");
    exit;
  }
  $total = mysql_affected_rows();

  if(!$total)
  {
    $BRD_LIST = "<article class='post' style='text-align:center;'>情報がありません。</article>";
  }
  else
  {
    for($i=0; $i<$total; $i++)
    {
      unset($NUM_IMG,$New_icon);
      //$Num = ($total_count-$offset) - $i;
      $row = mysql_fetch_array($result);
      $Num = $row[no];
      $regdate = substr($row[reg_date],0,10);
      $regdateArr = explode("-",$regdate);

      if($regdate == $today){$New_icon="<font color=orange><b>NEW</b></font>";}

      if($row[is_notice] =='Y') $is_notice_chk="[お知らせ]";
      else $is_notice_chk="";

      if($row[is_secret] =='Y') $is_secret_chk="<font color=red>[관리자만 보임]</font>";
      else $is_secret_chk="";

      $RESULT_CONTENT = $row[contents];
      $RESULT_CONTENT = stripslashes($RESULT_CONTENT);
      //$RESULT_CONTENT=preg_replace("/ style=([^\"\']+) /"," ",$RESULT_CONTENT); // style=border:0... 따옴표가 없을때
      //$RESULT_CONTENT=preg_replace("/ style=(\"|\')?([^\"\']+)(\"|\')?/","",$RESULT_CONTENT); // style="border:0..." 따옴표 있을때 style='width:100%;max-width:650px;'

      $RESULT_CONTENT = preg_replace("/ height:(\"|\')?([^\"\']+)(\"|\')?;/","",$RESULT_CONTENT);
      $RESULT_CONTENT = preg_replace("/ width:(\"|\')?([^\"\']+)(\"|\')?;/","",$RESULT_CONTENT);

      $RESULT_CONTENT=preg_replace("/ height=(\"|\')?\d+(\"|\')?/","",$RESULT_CONTENT);
      $RESULT_CONTENT=preg_replace("/ width=(\"|\')?\d+(\"|\')?/","",$RESULT_CONTENT);

	 /*//더보기 버튼
	 $BTN_CONTENT_MORE ="<a  onclick='chklist($Num);' class='button big' style='cursor:pointer;'>......もっと見る</a>";
	  //요약글
	  $RESULT_CONTENT_SUMMARY = utf8_cutstr($RESULT_CONTENT,480,$tail=$BTN_CONTENT_MORE);
      */

      //로그인 하면 보이게 하는 구문.
      if($sessionLevel == "" && $row[general_setting] == 'on'){
		$membersJapansName = "<div style='width:100%;text-align:center; padding-bottom:2.5em;'>".$membersJapansName."</div>";
        $RESULT_CONTENT = $membersJapansName;
      }else{
        $RESULT_CONTENT = $RESULT_CONTENT;
      }


   if($row[general_setting] == 'on'){$is_notice_chk .="<font color='#067acc'>member only</font>";}
    $BRD_LIST .="
    <div class='post padding_s1' id='post".$Num."'>

        <div class='btn_top'><a href='javascript:chklist($Num);'><img id='listBtn".$Num."' src='../images/sub/icon_arr_more.jpg' /></a></div>
        <div class='post_date'>
            <div class='date_tit_le'>$regdateArr[0].$regdateArr[1]</div>
            <div class='date_tit_mi'>$regdateArr[2]</div>
            <div class='date_tit_ri'><h2>$row[subject] $is_notice_chk $is_secret_chk</h2></div>
        </div>

        <div id='list".$Num."' class='post_del'>
        <!--<a href='#' class='image featured'><img src='../images/top_big.jpg' ></a>-->
        <p class='line_h23px image featured'>$RESULT_CONTENT</p>
        </div>

        <div id='area".$Num."' class='post_social_area'>
        <div class='le' style='color:#FFC422;'><img src='../images/btn_news_good_num.jpg' /><span id='voted_number".$Num."' style='color:#FFC422;'>$row[voted_count]</span> 名</div>
        <div class='ri'>
        <ul >
            <li><a href='javascript: pagePrint($Num);'><IMG src='../images/sub/icon_print.png'></a></li>
            <li><a href='javascript: content_like($Num);'><IMG src='../images/sub/icon_like_b.png'></a></li>
            <li><a href='javascript: sendSns(\"facebook\",\"http://pro.yuchun.jp/news.php\",\"$row[subject]\");'><IMG src='../images/sub/icon_share.png'></a></li>
        </ul>
        </div>
        </div>

    </div>
    ";

  }
}
//검색 탭 리스트
if(!$tab) $tab=1;
?>

<script src="/sys_css_js/js_sns.js" type="text/javascript" ></script>
<script type="text/javascript" src="/plugin/smartPop/jquery.smartPop.js"></script>
<link rel="stylesheet" href="/plugin/smartPop/jquery.smartPop.css" />
<script type="text/javascript">
    function openshow(val,val2){
      $.smartPop.open({ background: "#000000", width: "100%", height: 300,borderColor:"#000000", border: 0, url: 'news_view.php?post_num='+val+'&MG='+val2 });
    }
    function smartPopClose()
    {
        $.smartPop.close();
    }

    window.onresize = function(event) {
        if( $("#smartPop").is($("#smartPop").show()) ) {
            var bWidth = $('#smartPop_frame').get(0).contentWindow.$('.profileviewBox').height();
            $.smartPop.resizeHeight(bWidth);
        }
    }


</script>

<script>
$(document).ready(function(){
    if($('#tab').val()){
        //alert($('#tab').val());
        icon_bar_view($('#tab').val());
   }
});

 function icon_bar_view(vid)
 {
    var sch_key = "<?=$url_tail?>";
     for(var k=1;k < 5; k++){
        if(vid == k){
            $.ajax({
                type: "POST",
                url: "news_search_ls_ajax.php",
                data: "num="+ vid +sch_key,
                cache: false,
                success: function(data){
                    $("#tob_bar_ls"+vid).empty();
                    $("#tob_bar_ls"+vid).html(data);
                }
            });
            var imgurl = "../images/btn_new_menu0"+k+"_r.jpg";
            $('#src_Tab'+k).attr("src", imgurl);
            $('#tob_bar_ls'+k).show();
            $('#tab').val(k);
        }else{
            var imgurl = "../images/btn_new_menu0"+k+".jpg";
            $('#src_Tab'+k).attr("src", imgurl);
            $('#tob_bar_ls'+k).hide();
        }
    }
}

function searchChk() {
	//검색
	document.form.action = "./news.php";
	document.form.submit();
}
function chklist(val){
	if(document.all("list"+val).style.display == "none"){
		$('#list'+val).fadeIn('slow');
        $('#area'+val).fadeIn('slow');
		document.all("listBtn"+val).src='/images/sub/icon_arr_more.jpg';
	}else{
		$('#list'+val).fadeOut('slow');
        $('#area'+val).fadeOut('slow');
		document.all("listBtn"+val).src='/images/sub/icon_arr_more2.jpg';
	}
}

function pagePrint(nid) {
    var sWinName = 'ArticlePrint';
    var sWinopts = 'Left=' + 300 + ', top=' + 300 + ', width=' + 800 + ',height=600 , scrollbars=1,resizable=1';

    var url = window.open('/article_print.php?post_num=' + nid, sWinName, sWinopts);
    if (url)
        url.focus();
}


function content_like(val){
    var check_login = "<?=$sessionLevel?>";
    if(check_login < 3){
        alert("로그인 후 사용 가능합니다.");
        return ;
    }

    $.ajax({
        type: "POST",
        url: "news_like_ajax.php",
        dateType: "json",
        data: "num="+ val+"&division=<?=$tableName?>" ,
        cache: false,
        success: function(data){
          if(data.checkUser == 0){
            alert("이미 누르셨습니다.");
          }else{
            $("#voted_number"+val).html(data.now);
          }

        }
    });

return false;
}


function left_paging(val_page,val_tail){
   var vid= $('#tab').val();
   $.ajax({
        type: "POST",
        url: "news_search_ls_ajax.php",
        data: "num="+ vid +"&page="+val_page+val_tail,
        cache: false,
        success: function(data){
            $("#tob_bar_ls"+vid).empty();
            $("#tob_bar_ls"+vid).html(data);
        }
    });

return false;
}
</script>
<SECTION>
 <ARTICLE class="article_news">

  <div class="article_news_area">

  	<!-- LEFT -->
  	<div class="con_left">
        <div class="con_tit"><img src="../images/sub/sub_tit_0<?=$tit_num?>.jpg" /></div>
            <div class="search_ar">
                <form name="form" method="post" target="_self" onsubmit="return false;" >
                    <input type="hidden" name="tab" id ="tab" value="<?=$tab?>">
                    <input type="hidden" name="tab" id ="MG" value="<?=$MG?>">
                    <input 	type="text"   id="search_news" name="search_news" placeholder="Search News" value="<?=$search_news?>">
                    <button type="submit" onClick="searchChk();" style="cursor:pointer;"><img src="../images/btn_news_search.jpg" /></button>
                </form>
            </div>

				<div class="icon_bar">
     <!-- //최신  -->
    <ul id="tob_bar_area1" class="icon_menu">
        <li class="icon_menu_ac1"><a href="javascript:icon_bar_view(1)"><img id="src_Tab1" src="../images/btn_new_menu01_r.jpg" width="56" height="56" /></a></li>
        <li class="icon_menu_ac2"><a href="javascript:icon_bar_view(2)"><img id="src_Tab2" src="../images/btn_new_menu02.jpg" width="56" height="56" /></a></li>
        <li class="icon_menu_ac3"><a href="javascript:icon_bar_view(3)"><img id="src_Tab3"  src="../images/btn_new_menu03.jpg" width="56" height="56" /></a></li>
        <li class="icon_menu_ac4"><a href="javascript:icon_bar_view(4)"><img id="src_Tab4" src="../images/btn_new_menu04.jpg" width="56" height="56" /></a></li>
    </ul>

     <div id="tob_bar_ls1" class="rec_list_ar"></div>
     <div id="tob_bar_ls2" class="rec_list_ar"></div>
     <div id="tob_bar_ls3" class="rec_list_ar"></div>
     <div id="tob_bar_ls4" class="rec_list_ar"></div>


    </div>





 	 </div>



  	<!-- RIGHT -->
    <div class="con_right" id="con_ls">
        <?=$BRD_LIST?>
        <div class="pagination02">
            <?=$viewlist?>
        </div>
    </div>



	</ARTICLE>
</SECTION>






<?

	include"inc_bottom.php";

?>
 <!-- MOUSE ACTION -->
 </body>
 </html>

Anon7 - 2021