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/jaejoong_X/pages/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/queenjbs/jaejoong_X/pages/from.php
<?php
	include $_SERVER['DOCUMENT_ROOT']."/conf/conf_dir.php";

	$PAGE_GUBUN =	"11";

	include $_SERVER['DOCUMENT_ROOT']."/pages/inc_top.php";
	//counter
	if($sessionLevel < 10){
		echo "<script>parent.location.href = './guide.php'</script>";
		exit;
	}

	if($sessionLevel != 15){
			$userhitpage ="from";
			$hitcount = Get_db("select hit from user_hit where name = '$userhitpage' and startDay = '$today'");
			if(!$hitcount){
				$queryhit = "INSERT INTO user_hit ( id, name, hit, startDay) VALUES ( '', '$userhitpage', '1', '$today')";
			}else{
				$queryhit = "update user_hit set hit = hit+1 where name='$userhitpage' and startDay = '$today'";
			}
			$hitresult = mysql_query($queryhit, $db_con);
	}
		// =============================================== Query
		$tableName = "from";

		if(!$pageCount) $pageCount =15;

		$show_one_page			= $pageCount;
		$show_view_page			= 10;

		$page     = ( $page ) ? $page : 1;
		$offset   = ($page-1)*$show_one_page;

		if($key_word) {
					$key_word = str_replace(" ","",$key_word);
					$where = "AND $key LIKE '%$key_word%'";
		}

		if($tab==7){
			$where .= "AND general_setting = 'on'";
		}

		if($sessionLevel !=15){
			$where .= "AND is_secret = 'N'";
		}

		$order_by = ' ORDER BY is_notice asc,no desc';
		//$url_tail = "&tab=$tab&tabs=$tabs&key=$key&order_by=$order_by";

		$query_limit  = "limit $offset,$show_one_page";
		$pcLang = substr($_SERVER[HTTP_ACCEPT_LANGUAGE],0,2);

		$QUERY_TOTAL = "SELECT count(*) FROM board_$tableName where (original_no=0 or original_no='')  and is_delete ='N'  $where $order_by";
		$QUERY_PAGE  = "SELECT * FROM board_$tableName where (original_no=0 or original_no='') and is_delete ='N' $where $order_by $query_limit";
		//SELECT *, DATE_FORMAT(writedate, '%Y.%m.%d') AS date FROM tour_community WHERE 1=1 and idx not in (1179,1186) ORDER BY sort DESC ,depth ASC limit 0,15
		//echo $QUERY_PAGE;

		$total_count  = get_db($QUERY_TOTAL);
		$total_page   = ceil( $total_count / $show_one_page);
		$start_num    = $total_count - $offset;  //
		$viewlist     = ( !$total_count ) ? "" : Get_viewpage($page,$total_count,$show_one_page,$show_view_page,$url_tail);

		$result= mysql_query($QUERY_PAGE,$db_con);
		if(!$result) {
			error("DB_ERROR");
			exit;
		}
		$total = mysql_affected_rows();
	?>

 <div id="page_index">
  <a href="default.php">HOME</a> > FROM
 </div>

 <div id="sub_content_box">

  <table width="100%" class="basic_table">
   <colgroup>
    <col width='10%'>
    <col	width="70%">
    <col width='10%'>
    <col width='10%'>
   </colgroup>
   <thead>
    <tr>
     <th class="title_le">No</th>
     <th class="title_le">題目</th>
     <th class="title_le">登録</th>
     <th class="title_le">登録者</th>
    </tr>
   </thead>
   <tbody>
				<?
				if(!$total){

						echo "<tr><td colspan='4' align=center  height='50px'>登録された情報がございません。</td></tr>";

				}else{
					for($i=0; $i<$total; $i++) {
						$row = mysql_fetch_array($result);
						$regdate = substr($row[reg_date],0,10);
						$Num = $start_num - $i;
						$datgle=Get_db("select count(idx) from board_comment where module_name = '$tableName' and module_no='$row[no]'");

				?>
				<tr>
					<td class="ls"><?=$Num?></td>
					<td class="ls_le"><a href="from_view.php?num=<?=$row[no]?>&page=<?=$page?>"><?=$row[subject]?></a>
						<? if($datgle){echo "&nbsp;<b>[".$datgle."]</b>";} ?>
						<? if($regdate == $today){echo"<font color=orange><b>NEW</b></font>";} ?>
						<? if($row[is_secret] == 'Y'){echo "<font color='red'>[SECRET]</font>";} ?>
					</td>
					<td class="ls"><?=$regdate?></td>
					<td class="ls"><?=$row[user_name]?></td>
				</tr>
				<?
					$Num--;
					}
				}
				?>
    <tr>
    	<td colspan="4" class="bottom_ce" >

						<ul class="gal_list_area" style="padding-top:5px;">
       <li class="result">(全<?=$total_count?>件)</li>
       <li><?=$viewlist?></li>
       <li class="search" style="float:right;">
       <? if($_SESSION[S_LEVEL]){ ?>
        <a href="./from_write.php" id="btn">■ 書き込み ■</a>
       <? } ?>
       </li>
						</ul>

     </td>
    </tr>

	  </tbody>
		</table>
 </div>




<?php
  include"inc_footer.php";
?>
<script type="text/javascript">
	<!--
	function chklist(val){
		if(document.all("list"+val).style.display == "none"){
			$('#list'+val).fadeIn('slow');
			//document.all("list"+val).style.display='';
			//document.all("listBtn"+val).src='/images/sub/btn_fold_on.gif';
		}else{
			$('#list'+val).fadeOut('slow');
			//document.all("list"+val).style.display='none';
			//document.all("listBtn"+val).src='/images/sub/btn_fold_off.gif';
		}
	}
	function formChange(val,mode){
		if(mode == "del"){
			if(confirm("削除しましょうか?")){

			} else {
				return false;
			}

		}
		//내용변경
		document.form.idx.value = val;
		document.form.mode.value = mode;
		if(mode == 'write' || mode == 'proc'){
			document.form.method = "post";
		}else{
			document.form.method = "get";
		}
		document.form.action = "<?=$php_self?>";
		document.form.submit();

	}

	function board_proc(mode) {
		//document.form.idx.value = val;
		document.form.mode.value = mode;
		document.form.action = "<?=$php_self?>";
		document.form.submit();
	}
	-->
</script>
</body>
</html>

Anon7 - 2021