사이드뷰 출력시키려면 어떻게 바꿔줘야하나요?? > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

사이드뷰 출력시키려면 어떻게 바꿔줘야하나요?? 정보

사이드뷰 출력시키려면 어떻게 바꿔줘야하나요??

본문

자료실에 있는 자동출석부(근태관리부) 페이지고요 158번째 줄
<td class="lo_td5" title="<?=$row[mb_nick]?>"><?=$row[mb_name]?></td> 에다가
클릭했을 때 사이드뷰를 출력하고 싶은데요...어떻게 바꿔줘야 하나요???

또 mb_9 필드를 이용해 소속을 써주는데 같은 소속끼리는 모여서 보이도록
정렬하려면 어찌해야할지....... 알려주세요ㅠㅠ




<?
/*
################ License ###############
#프로그램명:회원출석부(DB저장용)
#제작자 : 조정영 (http://www.carmidas.com)
#저작권 : Free
########################################
*/

include_once("./_common.php");

if (!$member[mb_level] >= 9)  {  // 회원이 아니라면...
    echo "<script>
          alert('비회원은 입장 불가합니다.');
    location.href='$g4[path]/bbs/login.php?wr_id=&url=../';
    </script>";
}

$sql_common = " from g4_member";

$sql_search = " where mb_level =9 ";  

if ($stx) {
	$stxx = explode(" ", $stx);
    $sql_search .= " and ( ";
    switch ($sfl) {
        case "mb_id" :
            $sql_search .= " ($sfl = '$stx') ";
            break;
		case "mb_name" :
            $sql_search .= " ($sfl like '%$stx%') ";
            break;
		case "mb_nick" :
            $sql_search .= " ($sfl like '%$stx%') ";
            break;

		default : 
            $sql_search .= " ($sfl like '%$stx%') ";
            break;
    }
    $sql_search .= " ) ";
}

if ($sst)
    $sql_order = " order by $sst $sod ";
else
    $sql_order = " order by mb_9 desc ";


$sql = " select count(mb_id) as cnt
       $sql_common 
       $sql_search 
       $sql_order ";
$row = sql_fetch($sql);

$total_count = $row[cnt];


//한페이지에 보여질 리스트 숫자..
$rows = 40;
//$rows = $config[cf_page_rows];
$total_page  = ceil($total_count / $rows);  // 전체 페이지 계산
if (!$page) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함

$sql = " select mb_id, mb_9, mb_nick, mb_name
          $sql_common 
          $sql_search
          $sql_order 
          limit $from_record, $rows ";
$result = sql_query($sql);

$listall = "<a href='$_SERVER[PHP_SELF]'><img src='./btn_search2.gif' align='absmiddle' border='0'></a>";

////////
$g4['title'] = "출석부";
include_once("./_head.php");

$qstr2 = "year=$year&month=$month&sfl=$sfl&stx=$stx";
$pagelist = get_paging($config['cf_write_pages'], $page, $total_page, "?$qstr2&page=");


// 년 월 선택하지 않았을경우 오늘날자로 기본검색
if(!$year) { $year = substr($g4[time_ymdhis],0,4);  }
if(!$month) { $month = substr($g4[time_ymdhis],5,2);  }
?>
<div class="content_search"> <!-- 컨텐츠 중앙 -->
<script language="javascript" src="<?=$g4[path]?>/js/sideview.js"></script>
<style>
.lo_td1 { width:50px;padding:5px;margin:0px;text-align:center;background:#ededed; } 
.lo_td2 { width:90px;padding:5px;margin:0px;text-align:center;background:#ededed; } 

.day_td1 { width:22px;padding:1px;margin:0px;text-align:center;background:#ededed; } 
.day_td2 { width:22px;padding:1px;margin:0px;text-align:center;} 

.lo_td4 { width:50px;padding:5px;margin:0px;text-align:center;background:#ffffff; } 
.lo_td5 { width:90px;padding:5px;margin:0px;text-align:left;background:#ffffff; } 

</style>
<!-- ############### 검색  ################# -->
<form name=fsearch method=get style="margin:0px;">
<table width="100%" cellpadding="2" cellspacing="1" bgcolor="#dddddd" align="center">
	<tr height="30px" align="center" bgcolor="#ffffff">
		<td style="text-align:left;padding:0px 0px 0px 5px;">
			<? include("file_menu.php");?>
			<? $tyear= substr($g4[time_ymdhis],0,4); // 년도셀렉트박스에서 사용 ?>
			<select name="year">
				<option value="">년선택</option>
				<? for( $i=2008; $i <= $tyear;$i++){ # 2000년부터 현재년도 +1 까지?>
				<option value="<?=$i?>" <? if($i == $year) echo "selected";?>> <?=$i?> 년</option>
				<? }?>
			</select>
			<select name="month">
				<option value="">월선택</option>
				<? for( $i=1; $i <= 12;$i++){ # 2000년부터 현재년도 +1 까지
					if($i < '10') { $m = "0".$i; } else { $m = $i; }
				?>
				<option value="<?=$m?>" <? if($m == $month) echo "selected";?>> <?=$m?> 월</option>
				<? }?>
			</select>
			&nbsp;&nbsp;&nbsp;&nbsp;
			<select name="sfl">
				<option value='mb_id'>아이디</option>
				<option value='mb_name'>이름</option>
				<option value='mb_nick'>닉네임</option>
			</select>
			<input type="text"  class="input3" name="stx" itemname='검색어' value='<?=$stx?>'>
		    <input type="image" src='./btn_search.gif'  align="absmiddle">
			<? if($year || $month || $stx || $fr_date){ echo $listall; } ?>
			&nbsp;&nbsp;&nbsp;::총 <font color="red"><b><?=$total_count?></b></font> 개 
		</td>
	</tr>
	<? if ($stx) {  echo "<script>document.fsearch.sfl.value = '$sfl';</script>"; } ?>
</table>
<? if ($member[mb_level] >= 9) { ?>

</form>
<!-- ######## 검색 끝 ############ -->
<br/>
<div style="width:600px;margin:auto;height:30px;text-align:center;font-weight:bold;font-size:13pt;padding:7px 0px 0px 0px;">
<?=$year?>년 <?=$month?>월 출석부 
</div>
<table cellpadding="0" cellspacing="1" style="background:#cccccc;">
	<tr align="center">
		<td class="lo_td1">소속</td>
		<td class="lo_td2">팀원</td>
		<? for($i=1; $i < '32'; $i++){ ?>
		<td class="day_td1"><?=$i?></td>
		<? } ?>
		<td class="day_td1">H</td>
	</tr>
	<? 
	for ($i=1; $row=sql_fetch_array($result); $i++)  {
	$count = 0;
	?>
	<tr>
		<td class="lo_td4"><?=$row[mb_9]?></td>
		<td class="lo_td5" title="<?=$row[mb_nick]?>"><?=$row[mb_name]?></td>
		<? 
		for($s=1; $s < '32'; $s++){
		if($s < '10') { $day = "0".$s; } else { $day = $s; }
		$YM = $year."-".$month;
		$sql2 = "select lo_date from g4_login_member where lo_id = '{$row[mb_id]}' and lo_date like '{$YM}-{$day}%'";
		$row2 = sql_fetch($sql2);
		
		$lo1 = explode(" ",$row2[lo_date]);
		$lo2 = explode("-", $lo1[0]);
		if($s == $lo2[2]) { $bg = "bgcolor='#ff8000'"; $count = $count + 1;} else { $bg = "bgcolor='#ffffff'"; }
			?>
		<td class="day_td2" <?=$bg?> style="color:#ffffff;"><?=$lo2[2]?></td>
		<? } ?>
		<td class="day_td2" bgcolor="#fff800"><?=$count?></td>
	</tr>
	<?
			}
	if($total_count == '0'){  	?>
	<tr bgcolor="#ffffff">
		<td height="100px" colspan="3" align="center">
			검색된 자료가 없습니다.
		</td>
	</tr>
	<? } ?>
	
</table>	 
<? } ?>
<div style="width:600px;margin:auto;height:30px;text-align:center;font-weight:bold;font-size:13pt;padding:7px 0px 0px 0px;">
<?=$pagelist?>
</div>




</div>
<?
include_once("./_tail.php");
?>

댓글 전체

전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT