컨텐츠관리 가 업데이트후 작동되지않습니다.

간만에 그누보드G5 영카드 버전을 업데이트 하였는데 업데이트전까지 잘 작동하던 조회수및 컨텐츠관리 가 작동하지 않습니다 업데이트로 인하여 소스를 수정해야되는부분이 있는걸까요 ?

 

Copy
<?php$sub_menu = "300110";include_once('./_common.php'); include_once("./admin.head.php");?><script> function startafterminute(){		interval = document.frm.interval.value;		timer = setInterval ("myfn()", 1000 * 60 * interval);		myfn();	} function myfn(myform){	if(myform.bo_tbl.value == ""){alert('* 게시판을 선택해 주세요! *');myform.bo_tbl.focus();return false;}	if(myform.myinc.value == "0"){alert('* 증가값을 0이상으로 해주세요! *');myform.myinc.focus();return false;}	return true;}   </script><style>.hd{border-top:1px #6b95bd solid;border-bottom:1px #6b95bd solid;font-size:11px}</style><?phpif(empty($mode))$mode = "new"; if($mode == "new"){?> <form name="myfrm" method="post" action="<?php echo $PHP_SELF?>" onsubmit="return myfn(this);"><input type="hidden" name="mode" value="insert"><input type="hidden" name="type" value="inc"><fieldset>    <legend>게시물 조회수 관리</legend> 	 - 게시물 조회수 증가 : <select name="bo_tbl">			<option value="" selected>게시판 선택!!</option>			<option value="all">전체게시판</option>	<?php		$sql = "select * from g5_board order by bo_order"; 		$result = sql_query($sql); 		while($row=sql_fetch_array($result)){ 			$sql2 = "select * from g5_group where gr_id = '$row[gr_id]'";			$result2 = sql_query($sql2);			$row2=sql_fetch_array($result2);			echo "<option value='".$row[bo_subject]." - ".$row[bo_table]."'>".$row2[gr_subject]."-".$row[bo_subject]."</option>";		}	?>	</select>		증가값: <input type="test" name = "myinc" size="5" value="231">&nbsp;&nbsp;		갯수(최근글 순): <input type="test" name = "mycnt" size="5" value="100">&nbsp;&nbsp;		<input type="submit" value="=처리=" onClick="document.frm.auto.value='Y';startafterminute(600);"></fieldset></form> <?php } else if($mode == "insert"){  	if($bo_tbl == "all"){ //게시판 전체		$sql = "select * from g5_board order by bo_table";		$result = mysql_query($sql); 		for ($i=0; $row=mysql_fetch_array($result); $i++){ 				 $arr[$i] = $row[bo_table];			}		for($i = 0 ; $i < sizeof($arr);$i++){			$sql1 = "select * from g5_write_".$arr[$i]."  where wr_is_comment=0 order by wr_id desc limit 0, ".$mycnt;			$result1 = mysql_query($sql1);			for ($j=0; $row1=mysql_fetch_array($result1); $j++){				$myinc2 =  $row1[wr_hit] + rand(1, $myinc);				$sql2 = "update g5_write_".$arr[$i]." set wr_hit =".$myinc2." where  wr_is_comment=0 and wr_id = '$row1[wr_id]'";				sql_query($sql2);  				}		}	}else{ //특정게시판		$lnk = explode(" - ",$bo_tbl);		$sql1 = "select * from g5_write_".$lnk[1]."  where wr_is_comment=0 order by wr_id desc limit 0, ".$mycnt;		echo $sql11;		$result1 = mysql_query($sql1);		$tot = mysql_num_rows($result1); 		$nn = 0;		while($row1=mysql_fetch_array($result1)){			$nn++;			$myinc2 =  $row1[wr_hit] + rand(1, $myinc);			$sql2 = "update g5_write_".$lnk[1]." set wr_hit =".$myinc2." where wr_is_comment=0 and wr_id = '".$row1[wr_id]."'";			mysql_query($sql2);		} 	} //inner-if	if($bo_tbl == "all")$bo_tbl="전체";	$sql = "insert into g5_board_count(wr_type, bo_tbl, wr_value, wr_count,wr_date) value('증가','$bo_tbl','$myinc','$mycnt',now())";	mysql_query($sql);	echo "<script>location.href='$PHP_SELF';</script>";} //outer-if $qry = "select count(*) as cnt from g5_board_count";$row = sql_fetch($qry);$total_count = $row[cnt];$rows = $config[cf_page_rows];$total_page  = ceil($total_count / $rows);  // 전체 페이지 계산if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)$from_record = ($page - 1) * $rows; // 시작 열을 구함?><table width=90% cellpadding=0 border=0 cellspacing=0 align="center" style="margin:20px 5px 5px 5px;border:0px solid #ccc"><tr bgcolor='#f8f8f9'>    <th class="hd" align="center"width="5%" height="30" >번호</th>	<th class="hd"  width="15%" >조회수처리</th>	<th class="hd"  width="25%" >테이블</th>	<th class="hd"  width="15%" >증가값</th>	<th class="hd"  width="15%" >범위(최신글)</th>	<th class="hd"  width="25%" >처리일자</th></tr><?php$qry = "select * from g5_board_count order by wr_id desc limit $from_record, $rows";$res= mysql_query($qry);while($li = mysql_fetch_array($res)){	?> 	<tr bgcolor='#f8f8f9'>    <td align="center" height="30"><?php echo $li[wr_id]?></td>	<td align="center"><?php echo $li[wr_type]?></td>	<td align="center">	<?php		$lnk = explode(" - ",$li[bo_tbl]);		if($li[bo_tbl] == "전체") echo $li[bo_tbl];		else echo "<a href=".$g4['path']."/bbs/board.php?bo_table=".$lnk[1].">".$li[bo_tbl]."</a>";	?>	</td>	<td align="center"><?php echo $li[wr_value]?></td>	<td align="center"><?php echo $li[wr_count]?></td>	<td align="center"><?php echo $li[wr_date]?></td></tr><?php}?> </table><?php$pagelist = get_paging($config[cf_write_pages], $page, $total_page, "$_SERVER[PHP_SELF]?$qstr&page=");echo "<table width=90% cellpadding=3 cellspacing=1>";echo "<tr><td width=100% align=right>$pagelist</td></tr></table>\n";?><?phpinclude_once("./admin.tail.php");?>

답변 2개

자문자답 입니다 

 

php7 지원업데이트 이후  mysql 및 mysqli 함수 차이점에서 생기는 문제였습니다 .

 

편리님 말씀대로 

MySQLi 지원 버전으로 패치를 한 경우 mysql_query 함수 등을 사용하면 mysqli 와 혼용으로

오류가 발생합니다. config.php 파일의 G5_MYSQLI_USE 설정을 false 로 변경해 보시기 바랍니다.

 

참고하시면 작동합니다.

 

업데이트시에 뭔가 빠진부분이 있는거같은데

 

해당 소스로는 답이 안나옵니다.

답변을 작성하려면 로그인이 필요합니다.