<?
include "../../class/oci8.inc";
include "../../lib/user_function.inc";
$usrid = $sabiz_id;
if($grade < 555){goback(); exit();}
if(!$syear){
$syear = date("Y");
}
if(!$smonth){
$smonth = date("m");
}
if(!$sday){
$sday = date("d");
}
if(!checkdate($smonth,$sday,$syear)){
goback();exit();
}
// 일정의 마지막날에 대한 자료를 구한다.
$start_stamp = mktime(0,0,0,$smonth,$sday,$syear);
$stop_stamp = mktime(0,0,0,$smonth,$sday+13,$syear);
Stamp2Date($stop_stamp, &$eyear,&$emonth,&$eday);
$sched_count = 0;
$oci->connect();
$nowtime = (time() - 3600*24);
$query = "DELETE schedule WHERE stopdate < $nowtime ";
$oci->parseExec($query);
$oci->parseFree();
##################################
/* 소모임 소식란 */
##################################
function Society_news(){
/* 출력하는 양식을 설정하는 부분 */
?>
<table width='100%' border="0">
<tr>
<td>
<p><img src="images/news1.gif" width="185" height="28">
</td>
</tr>
<tr>
<td> <?
GLOBAL $usrid;
GLOBAL $oci;
$news = new Oracle_OCI;
$news->connect();
$query = "SELECT code,name FROM society WHERE code = any (SELECT code FROM smember WHERE id='$usrid')";
$oci->parseExec($query);
$total_count = 3;
$indx = 0;
$big_query = '';
while ($oci->fetch()){
$code = trim($oci->result(1));
$society_name = trim($oci->result(2));
$board = "board".$code;
$query = "SELECT thid,name,subject,signdate FROM
(SELECT thid,name,subject,signdate FROM $board ORDER BY signdate DESC)
WHERE rownum <= $total_count ";
$news->parseExec($query);
while($news->fetch()){
$indx++;
$thid = $news->result(1);
$NEWS_B[$indx*2+0] = $news->result(4);
/* 출력하는 양식을 설정하는 부분 */
$NEWS_B[$indx*2+1] = "<a href='/society/viewbody.html?code=$code&number=$thid'><font color="#FFB442">[$society_name]</font> ".$news->result(3)."</a>";
}
}
for($i= 0; $i <= $indx; $i ++){
for($j=$i+1 ; $j <= $indx; $j++){
if($NEWS_B[$i*2] < $NEWS_B[$j*2] ){
$temp0 = $NEWS_B[$i*2];
$temp1 = $NEWS_B[$i*2+1];
$NEWS_B[$i*2] = $NEWS_B[$j*2];
$NEWS_B[$i*2 +1 ] = $NEWS_B[$j*2 + 1];
$NEWS_B[$j*2] = $temp0;
$NEWS_B[$j*2 +1 ] = $temp1;
}
}
}
for($i = 0 ; $i < $total_count; $i++){
//echo $NEWS_B[$i*2+ 0]."<br>\n";
echo $NEWS_B[$i*2+ 1]."<br>\n";
}
$news->disconnect();
---------------------------------------------------------------------
제목에 있는 에러 메시지를 자주 봅니다.
그 이유가 79번 라인에 구문에러라고 알고 있는데
에러가 난 이유를 잘 모르겠습니다.
도와주세요.....
메일로 부탁드립니다
|