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/junsu/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/queenjbs/junsu/gallery_view.php
<?
    require $_SERVER['DOCUMENT_ROOT']."/conf/conf_dir.php";
    $tableName = "photo_gallery";
    if($sessionLevel !=15){ //관리자 일떄 다 보이기.
        $where .= " and is_secret='N' ";
    }
    if($MG=="on"){ // member 회원 볼수있게함.
        $where .= "AND general_setting = 'on'";
        $url_tail .= "&MG=$MG";
    }
    $where .= "and is_delete = 'N'";
    $QUERY_PAGE  = "SELECT *,(select no from board_chuchun where module_no=a.no and module_name='$tableName' and uid_fk='$sessionIDX') as voted_chk FROM $tableName as a where no='$post_num' $where";


    $result= mysql_query($QUERY_PAGE,$db_con);
    $row = mysql_fetch_array($result);
    $Num = $row[no];
    if($Num){
    $regdate = substr($row[start_date],0,10);
    $regdateArr = explode("-",$regdate);

    if($row[voted_chk]){
      $voted_img_tail = "icon_main_gallery_01";
      $voted_count_color = "#FEC223";
    }else{
      $voted_img_tail = "icon_mv_like_off";
      $voted_count_color = "#838383";
    }

    //이미지 추출 시작
    $QUERY_silde  = "SELECT * FROM files WHERE module_name='gallery' and module_no='$Num' and module_type='C' ORDER BY order_by asc";
    $results= mysql_query($QUERY_silde,$db_con);
    $rows = mysql_fetch_array($results);
    $slideImg ="<img src='/files/muti/gallery/$rows[file_name]' style='width:100%; max-width:1000px;'/></br></br>";
    if(!$row[user_name])  $user_name = "管理者";

    //이미지 추출 끝

    $BRD_LIST .="
    <div class='gall_view_left'>$slideImg</div>

    <div class='gall_view_right'>
    <div class='view_date'>$regdateArr[0].$regdateArr[1].$regdateArr[2]</div>
    <div class='view_name'><img src='../images/sub/icon_emoticon.png' />$user_name</div>

    <div class='view_title'><h2>$row[subject]</h2>
    <p> $row[contents]</p></div>
    ";
    $results = Get_dbres("SELECT * FROM board_comment WHERE module_name='".$tableName."' and module_no='".$Num."' order by reg_date desc");
    //댓글
      while ($rows = mysql_fetch_array($results)) {

        if($rows[user_no] == $sessionIDX || $sessionLevel ==15) $img_del = "<a href='javascript: commnet_del($rows[idx]);' style='margin:3px;'><img src='../images/sub/icon_del.jpg' alt='del' /></a>";
        else $img_del ="";

        $COMMENT_LIST .="<li id='vi".$rows[idx]."' class='vi_name'  style='word-break:break-all;'><b>$rows[user_name]</b> <span class='vi_txt'>$rows[content] $img_del</span></li>";
      }
    }


    //next ,previous
    $prev_num = get_db("select min(no) from $tableName where (no > $row[no]) $where");
    $next_num= get_db("select max(no) from $tableName where (no < $row[no]) $where");
?>
    <!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
		<title>KIM JUNSU JAPAN OFFICAL FANCLUB</title>
    <link rel="stylesheet" type="text/css" href="../sys_css_js/css_common.css"/>
    <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript" ></script>
    <style>
.gallviewBox         			{position: relative; width:100%; z-index:2; max-width: 850px; margin: 0 auto;/*min-height: 100%;height: 100%;max-height: auto;*/}

.gall_view											  	{display:block; border:7px solid #fec223; padding:10px;}
.gall_view		.btn_top				{width:100%; height:28px; text-align:right;}

.gall_view_left 								{width:480px;padding:0 2% 0 1%;	display: inline-table; vertical-align:top;}
.gall_view_right 							{width:300px;  display:inline-table;  vertical-align:top;}

.gall_view_left img     {width:100%; margin:0 auto; display:block;}

.view_date					{color:rgb(254,194,35);  padding:2%; text-align:right;}
.view_name					{border-bottom: 1px solid #d3d3d3; font-weight:600; color:rgb(51,51,51); padding-bottom:15px;}
.view_name	img {vertical-align: middle; padding:2%;}

.view_title	  								{padding:6% 2% 6% 2%;}
.view_title	h2 							{font-size:1.25em; color:rgb(51,51,51); padding-bottom:10px;}
.view_title	p  							{color:rgb(254,194,35); font-size:0.875em;}

.view_comt     							{min-width:260px; height:280px; padding:10px;background-color:rgb(255,255,255);  overflow:scroll; overflow-x:hidden; }

.view_icon  ul							 { padding:6% 2% 6% 2%; margin:10px auto; display:block; height:18px;}
.view_icon  li								{	width:49%;  display:inline-block; color:#fec223;}
.view_icon .li_gubun	.li_like		{ text-align:left;}

.view_input     {display: table; width:100%;}
.inputcell 				 {display: table-cell;}
.inText input   {width:100%; min-height:40px; border: solid 1px rgb(154, 154, 154); padding-left:1%;}
.inSubmit input { width:100%;  min-height:44px; background-color:rgb(154,154,154);color:#fff;}

.proviewBox_contr a   {position:absolute; top:50%; margin-top:-16px;outline:0;width: 20px;height: 51px;text-indent: -9999px;z-index: 9999;}
 .btn_prev            {left:0px; background: url(../images/sub/icon_view_prew.jpg) no-repeat ;}
 .btn_next            {right:0px; background: url(../images/sub/icon_view_next.jpg) no-repeat;}


	.com_list              {width:100%; box-sizing:border-box;}
	.com_list  li        		{width:100%; padding:10px 5px 0 0; box-sizing:border-box;}
	.com_list  .vi_name    {color:rgb(51,51,51); font-size:1em;}
	.com_list  .vi_txt     {padding-left:10px; line-height:21px; }



	@media only screen and (max-width:840px)
	{
		  .gallviewBox 	 {	display:table; width:100%; padding:0px; margin:0px;}
			.gall_view_left { display:table; width:100%; padding:0px; margin:0px; }
			.gall_view_right {	display:table; width:100%; padding:0px; margin:0px; }

	}
</style>
    <script>
    $(document).ready(function(){
            var bheight = $('.profileviewBox').height();
            top.$.smartPop.resizeHeight(bheight);
						//우측 마우스 클릭 방지
						$(document).bind("contextmenu", function(e) {
							return false;
						});

		});

 $(document).bind('selectstart',function() {return false;});
 $(document).bind('dragstart',function(){return false;});



   //좋아요
function content_like(val,val2,val3){
   var check_login = val3;
   if(check_login < 3){
       alert("ログイン後、ご利用頂けます。");
       return false;
   }

   $.ajax({
       type: "POST",
       url: "like_ajax.php",
       dateType: "json",
       data: "num="+ val+"&division="+val2 ,
       cache: false,
       success: function(data){
									$("#voted_number"+val).html(data.now);
         if(data.checkUser == 0){
           $("#voted_img"+val).attr("src","/images/sub/icon_mv_like_off.png");

											$("#voted_color_"+val).css("color","#838383");
											$("#voted_number"+val).css("color","#838383");

         }else{
            $("#voted_img"+val).attr("src","/images/sub/icon_main_gallery_01.png");

											$("#voted_color_"+val).css("color","#FEC223");
											$("#voted_number"+val).css("color","#FEC223");
         }


       }
   });
}

    function chage_page(val_page){
       if(val_page){
       window.location.href="<?=$PHP_SELF?>?post_num="+val_page+"<?=$url_tail?>";
       }else{
        alert("最後のページです。");
        return false;
       }
    }

     function commentok(val,tableName){
      var obj = document.form;
     var f = obj.comment.value;
			var pattern = /^\s+|\s+$/g; //공백 못넣게 하는 패턴

			if(f.match(pattern)|| f.length < 2){
			alert("正しく入力してください。\n(文章の前にスペースが入っていたり、1文字のみでの登録はできません。)");
				f= "";
				obj.comment.focus();
			return ;
			}
      $.ajax({
          type: "POST",
          url: "comment_ajax.php",
          data: "num="+ val+"&division="+tableName +"&contents="+f ,
          cache: false,
          success: function(data){
           //alert(data);
            $("#com_new").prepend(data);
            var com_num= eval($("#comment_num").text())+1;
            $("#comment_num").html(com_num);
            $("#comment").val("");
          }
      });
    }

    function commnet_del(val){
     var result = confirm('登録された文章を消去いたしますか?');
     if(!result){
       return ;
     }

     $.ajax({
          type: "POST",
          url: "comment_del_ajax.php",
          data: "num="+ val,
          cache: false,
          success: function(data){
            //alert(data);
            $("#vi"+val).remove();
             var com_num= eval($("#comment_num").text())-1;
            $("#comment_num").html(com_num);
          }
      });

    }

		function pop_close(){
			var filter = "win16|win32|win64|mac";
			if(navigator.platform){
				if(0 > filter.indexOf(navigator.platform.toLowerCase())){
					//alert("Mobile");
					window.close();
				}else{
					//alert("PC");
					top.smartPopClose();
				}
			}
		}

    </script>
    </head>
    <body>

        <!-- 팝업 -->
        <div class="gallviewBox">
            <div class="proviewBox_contr">
                <a class="btn_prev" onclick="chage_page(<?=$prev_num?>)">prev</a>
                <a class="btn_next" onclick="chage_page(<?=$next_num?>)">next</a>
            </div>

            <div class="gall_view padding_s1">
            <div class="btn_top"><a href="javascript: pop_close();" ><img src="../images/sub/icon_view_close.png" /></a></div>


            <?=$BRD_LIST?>
            <div class="view_comt">
            <ul class="com_list ">
              <li id="com_new"></li>
            <?=$COMMENT_LIST?>

            </ul>
            </div>

            <div class="view_icon">
                <ul>
                <? echo "<li class='le' id='voted_color_".$Num."' style='color:".$voted_count_color.";font-weight:bold;'><a href='javascript: content_like($Num,\"$tableName\",$sessionLevel);'><img id='voted_img".$Num."' src='../images/sub/".$voted_img_tail.".png' width='24' /></a><span id='voted_number".$Num."' style='color:".$voted_count_color.";'>$row[voted_count]</span> 名</li>";
                ?>
                <!--<li class="li_like"><img src="../images/sub/icon_main_gallery_01.png" onclick="content_like(<?=$Num?>)" style="cursor:pointer;"/> <span id='voted_number<?=$Num?>' style='color:#FFC422;'><?=$row[voted_count]?></span>名</li>-->
                <li class="li_gubun"><img src="../images/sub/icon_main_gallery_03.png" /> <span id='comment_num' style='color:#FFC422;'><?=$row[reply_count]?></span></li>
                </ul>
            </div>

            <form  name="form" method="post" action="javascript: commentok('<?=$Num?>','<?=$tableName?>');">
            <div class="view_input">
            <div class="inputcell inText"><input type="text"  class="text"  name="comment" id="comment" placeholder="コメントを書く..." /></div>
            <div class="inputcell inSubmit"><input type="submit" value="登録"> </div>
            </div>
            </form>

            </div>
            </div>


        </div>
        <!-- 팝업 -->


    </body>
    </html>

Anon7 - 2021