그림처럼 날짜별로 업체 주문을 받는 스킨을 사용중입니다.
배달이 완료되면 일일이 게시물들을 수정해서 배달완료 로 변경해야 되는데요.
몇개 없을때는 문제가 아닌데 많은니까 시간이 많이 걸리고 번거롭네요.
wr_3 여분필드에 "배달예정" "배달완료" 를 셀렉트 형태로 사용중인데요.
배달이 완료되면 1일 전체게시물을 배달완료로 바꿀수 있는 방법이 없을까요?
회원님들의 도움을 부탁드립니다.
배달이 완료되면 일일이 게시물들을 수정해서 배달완료 로 변경해야 되는데요.
몇개 없을때는 문제가 아닌데 많은니까 시간이 많이 걸리고 번거롭네요.
wr_3 여분필드에 "배달예정" "배달완료" 를 셀렉트 형태로 사용중인데요.
배달이 완료되면 1일 전체게시물을 배달완료로 바꿀수 있는 방법이 없을까요?
회원님들의 도움을 부탁드립니다.
첨부파일
댓글을 작성하시려면 로그인이 필요합니다.
댓글 2개
또는 특정 날짜에 해당하는 전체 업체의 배달상태를 한꺼번에 변경하는 방법도 가능합니다.
도움을 드리고 싶으나 사용하시는 스킨 소스코드가 필요합니다.
list.skin.php 정도만 있으면 되겠네요.
또 답변 해 주셨네요. 감사합니다.
염치불구하고 list페이지 소스 올립니다.
꾸벅.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
//가로 세로 폭 지정
if (eregi('%', $width)) { $col_width = "14%"; }
else { $col_width = round($width/7); }
$col_height= 80 ;
$prevmonth = $month - 1;
$nextmonth = $month + 1;
$prevyear = $year;
$nextyear = $year;
if ($month == 1) {
$prevmonth = 12;
$prevyear = $year - 1;
} elseif ($month == 12) {
$nextmonth = 1;
$nextyear = $year + 1;
}
$maxdate = date(t, mktime(0, 0, 0, $month, 1, $year)); // the final date of $month
$offset = date(w, mktime(0, 0, 0, $month, 1, $year));
?>
<a href="<?=$board_skin_path?>/excel.skin.php?bo_table=<?=$bo_table?>" onfocus=this.blur()><img src="<?=$g4[path]?>/img/exl.gif" align=absmiddle border=0></a>
<script type="text/javascript" src="<?=$board_skin_path?>/print_contents.cheditor.js"></script>
<a href="#" onclick="javascript:print_contents2('view_Contents', 'commentContents', '<?=$g4[title]?>')">프린트하기</a>
<img src='<?=$board_skin_path?>/img/1.gif' border=0 align=absmiddle> 배달예정
<img src='<?=$board_skin_path?>/img/2.gif' border=0 align=absmiddle> 배달완료
<img src='<?=$board_skin_path?>/img/3.gif' border=0 align=absmiddle> 배달에러
<img src='<?=$board_skin_path?>/img/5.gif' border=0 align=absmiddle> 일정
<div id="view_Contents">
<table width="100%" height="39" border="0" cellpadding="0" cellspacing="0" background="<?=$board_skin_path?>/img/bar_bg.gif" >
<tr>
<td width="10"> </td>
<td valign="bottom">
<a href='board.php?bo_table=<?=$bo_table?>&mode=m2'><img src="<?=$board_skin_path?>/img/btn_s_01.gif" border=0></a><a href='board.php?bo_table=<?=$bo_table?>&mode=m'><img src="<?=$board_skin_path?>/img/btn_s2_02.gif" border=0></a><a href='board.php?bo_table=<?=$bo_table?>&mode=w'><img src="<?=$board_skin_path?>/img/btn_s2_03.gif" border=0></a><a href='board.php?bo_table=<?=$bo_table?>&mode=l'><img src="<?=$board_skin_path?>/img/btn_s2_04.gif" border=0></a></td>
<td align="right">
<div align="right">
</span><span class="day4"><?=$year?></span><span class="day5">년</span>
<a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&mode=m2&"?><?if ($month == 1) { $year_pre=$year-1; $month_pre=$month; } else {$year_pre=$year-1; $month_pre=$month;} echo ("year=$year_pre&month=$month_pre");?>" target="_self" onfocus="this.blur()"><img src="<?=$board_skin_path?>/img/y_prev.gif" border="0" title="<?=$year_pre?>년" align="abbottom" /></a> <a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&mode=m2&"?><?if ($month == 12) { $year_pre=$year+1; $month_pre=$month; } else {$year_pre=$year+1; $month_pre=$month;} echo ("&year=$year_pre&month=$month_pre");?>" target="_self" onfocus="this.blur()"><img src="<?=$board_skin_path?>/img/y_next.gif" border="0" title="<?=$year_pre?>년" align="abbottom" /></a> <span class="day4">
<?=$month?>
</span><span class="day5">월</span> <a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&mode=m2&"?><?if ($month == 1) { $year_pre=$year-1; $month_pre=12; } else {$year_pre=$year; $month_pre=$month-1;} echo ("year=$year_pre&month=$month_pre");?>" target="_self" onfocus="this.blur()"><img src="<?=$board_skin_path?>/img/m_prev.gif" border="0" title="<?=$month_pre?>월" align="abbottom" /></a> <a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&mode=m2&"?><? if ($month == 12) { $year_pre=$year+1; $month_pre=1; } else {$year_pre=$year; $month_pre=$month+1;} echo ("&year=$year_pre&month=$month_pre");?>" target="_self" onfocus="this.blur()"><img src="<?=$board_skin_path?>/img/m_next.gif" border="0" title="<?=$month_pre?>월" align="abbottom" /></a></div> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tbline1" >
<tr>
<td class="tbline2 bbs_head bbs_fhead" align="center" width="<?=$col_width?>">일</td>
<td class="tbline2 bbs_head bbs_fhead" align="center" width="<?=$col_width?>">월</td>
<td class="tbline2 bbs_head bbs_fhead" align="center" width="<?=$col_width?>">화</td>
<td class="tbline2 bbs_head bbs_fhead" align="center" width="<?=$col_width?>">수</td>
<td class="tbline2 bbs_head bbs_fhead" align="center" width="<?=$col_width?>">목</td>
<td class="tbline2 bbs_head bbs_fhead" align="center" width="<?=$col_width?>">금</td>
<td class="tbline2 bbs_head bbs_fhead" align="center" width="<?=$col_width?>">토</td>
</tr>
<?
$sum=0;
$cel_mon = sprintf("%02d",$month);
$query = "SELECT * FROM $write_table WHERE left(wr_link1,6) = '$year$cel_mon' ORDER BY wr_id ASC";
$result = sql_query($query);
// 내용을 보여주는 부분
while ($row = mysql_fetch_array($result)) {
for ($i = 1 ; $i <= $maxdate; $i++) {
if( substr($row[wr_link1],6,2) == $i ) {
// 하루통계내기
$cel_day = sprintf("%02d",$i);
$rowsumday = sql_fetch(" select sum(wr_7) as sum_aday from $write_table where left(wr_link1,8) = '$year$cel_mon$cel_day'");
$sum_day[$i] = $rowsumday[sum_aday]; // 이렇게 수정하세요. (이 줄로 대체)
switch ($row[wr_3]) {
case 배달예정 :
$html_day[$i].= "<br><img src='$board_skin_path/img/1.gif' border=0 align=absmiddle hspace=2 vspace=2>";
break;
case 배달완료 :
$html_day[$i].= "<br><img src='$board_skin_path/img/2.gif' border=0 align=absmiddle hspace=2 vspace=2>";
break;
case 배달에러 :
$html_day[$i].= "<br><img src='$board_skin_path/img/3.gif' border=0 align=absmiddle hspace=2 vspace=2>";
break;
case 지출 :
$html_day[$i].= "<br><img src='$board_skin_path/img/4.gif' border=0 align=absmiddle hspace=2 vspace=2>";
break;
default :
$html_day[$i].= "<br><img src='$board_skin_path/img/5.gif' border=0 align=absmiddle hspace=2 vspace=2>";
}
if( $row[wr_6]==입금){
$html_day[$i].= "<img src='$board_skin_path/img/in.gif' border=0 align=absmiddle hspace=2 vspace=2>";
}
if($row[wr_3]==배달예정||$row[wr_3]==배달완료||$row[wr_3]==배달에러){
$html_day[$i].= "<a href='./board.php?bo_table=$bo_table&wr_id=$row[wr_id]'>".$row[wr_9]."</a>". " "."<font color=#ff6600>$row[wr_7]</font>"."\n";
}else{
$html_day[$i].= "<a href='./board.php?bo_table=$bo_table&wr_id=$row[wr_id]'>".$row[wr_subject]."</a>"."\n";
}
}}
}
$rowsum = sql_fetch(" select sum(wr_7) as sum_in from $write_table ");
$rowsum_in = $rowsum[sum_in];
echo "총계수:";
echo " ";
echo "$rowsum_in";
?>
<?
// 달력의 틀을 보여주는 부분
$temp = 7 - (($maxdate + $offset)%7);
if ($temp == 7) $temp = 0;
$count_day = 1;
$count_last = $maxdate + $offset + $temp;
for ($count = 1; $count <= $count_last; $count++) {
if (($count%7) == 1) echo ("<tr>\n"); // 주당 7개씩 한쎌씩을 쌓는다.
// 날짜가 있을경우
if ($offset < $count && $count <= $maxdate + $offset) {
$daytext = "$count_day"; // $count_day 는 숫자
$bgcolor = "#FFFFFF"; //일반날짜
if ($thisyear==$year && $thismonth==$month && $thisday==$count_day) {$daytext = "<font color=#ffffff style=background-color:#FF5400;font-weight:bold>$daytext</font>"; $bgcolor = "#ecff98";} //오늘날짜
if ($count%7 == 1) {$daytext = "<font color=#FF0000>$daytext</font>"; $bgcolor = "#FEFAFF";} // 일요일
if ($count%7 == 0) {$daytext = "<font color=#0000FF>$daytext</font>"; $bgcolor = "#F0F8FF";} // 토요일
$tmp = sprintf("%02d",$month)."-".sprintf("%02d",$count_day);
if ($nal[$tmp]) {
$title = trim($nal[$tmp][1]);
$title1 = cut_str($title,8);
if (trim($nal[$tmp][2]) == "*") {
$daytext = "<font color=#FF0000>$daytext</font> <font color=#804180><a title=$title>$title1</a></font>";
$bgcolor = "#FEFAFF";
} //공휴일
else {
$daytext = "$daytext <font color=#804180><a title=$title>$title1</a></font>";
}
}
// 여기까지 숫자와 들어갈 내용에 대한 변수들의 세팅이 끝나고
// 이제 여기 부터 직접 셀이 그려지면서 그 안에 내용이 들어 간다.
echo ("<td height=$col_height class=tbline2 bgcolor=$bgcolor valign=top>\n");
//글쓰기 권한여부
if ($write_href) {
$f_date = $year.sprintf("%02d",$month).sprintf("%02d",$count_day);
echo " <a href='$write_href&write[wr_link1]=$f_date'>$daytext</a>\n";
}
else {
echo "$daytext\n";
}
echo $html_day[$count_day];
echo "<br>";
// 적당한 위치에 합계... 표시
echo "1일합계 : {$sum_day[$count_day]}"; //1일 총계
echo "<br>";
$tt="$sum_day[$count_day]";
$ttt+="$tt";
echo" 누계:";
echo" $ttt";
echo ("</td>\n"); // 한칸을 마무리
$count_day++; // 날짜를 카운팅
}
// 날짜가 없을경우
else { echo ("<td height=$col_height class=tbline2 bgcolor=#FBFBFB valign=top> </td>\n"); }
if (($count%7) == 0) echo ("</tr>\n");
}
?>
</table>
<?
$rowsum2 = sql_query("select wr_9, sum(wr_7) as sum_in2 from $write_table group by wr_9 order by sum_in2 desc") ;
for ($i=1; $row = sql_fetch_array($rowsum2); $i++) {
echo "$i. $row[wr_9]";
echo " ";
echo " $row[sum_in2]";
echo "<br><br>";
}
?>
</div>