mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1051 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
2e2105491e
commit
cc44738b6d
12 changed files with 185 additions and 0 deletions
|
|
@ -405,6 +405,7 @@ var loaded_member_menu_list = new Array();
|
||||||
// className = "member_*" 일 경우의 object가 클릭되면 해당 회원의 메뉴를 출력함
|
// className = "member_*" 일 경우의 object가 클릭되면 해당 회원의 메뉴를 출력함
|
||||||
function chkMemberMenu(evt) {
|
function chkMemberMenu(evt) {
|
||||||
var area = xGetElementById("membermenuarea");
|
var area = xGetElementById("membermenuarea");
|
||||||
|
if(!area) return;
|
||||||
if(area.style.visibility!="hidden") area.style.visibility="hidden";
|
if(area.style.visibility!="hidden") area.style.visibility="hidden";
|
||||||
|
|
||||||
var e = new xEvent(evt);
|
var e = new xEvent(evt);
|
||||||
|
|
@ -496,3 +497,10 @@ function setMemberMenuObjCursor() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 날자 선택 (달력 열기)
|
||||||
|
function open_calendar(fo_id, day_str) {
|
||||||
|
if(typeof(day_str)=="undefined") day_str = "";
|
||||||
|
var url = "./common/tpl/calendar.php?fo_id="+fo_id+"&day_str="+day_str;
|
||||||
|
popopen(url, 'Calendar');
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@
|
||||||
$lang->cmd_open = "열기";
|
$lang->cmd_open = "열기";
|
||||||
$lang->cmd_setup = "설정";
|
$lang->cmd_setup = "설정";
|
||||||
$lang->cmd_apply = "적용";
|
$lang->cmd_apply = "적용";
|
||||||
|
$lang->cmd_open_calendar = "날자 선택";
|
||||||
|
|
||||||
$lang->enable = '가능';
|
$lang->enable = '가능';
|
||||||
$lang->disable = '불가능';
|
$lang->disable = '불가능';
|
||||||
|
|
@ -177,6 +178,7 @@
|
||||||
$lang->column_type_list['checkbox'] = '다중 선택 (checkbox)';
|
$lang->column_type_list['checkbox'] = '다중 선택 (checkbox)';
|
||||||
$lang->column_type_list['select'] = '단일 선택 (select)';
|
$lang->column_type_list['select'] = '단일 선택 (select)';
|
||||||
$lang->column_type_list['kr_zip'] = '한국주소 (zip)';
|
$lang->column_type_list['kr_zip'] = '한국주소 (zip)';
|
||||||
|
$lang->column_type_list['date'] = '일자 (년월일)';
|
||||||
//$lang->column_type_list['jp_zip'] = '일본주소 (zip)';
|
//$lang->column_type_list['jp_zip'] = '일본주소 (zip)';
|
||||||
$lang->column_name = '입력항목 이름';
|
$lang->column_name = '입력항목 이름';
|
||||||
$lang->column_title = '입력항목 제목';
|
$lang->column_title = '입력항목 제목';
|
||||||
|
|
|
||||||
153
common/tpl/calendar.php
Normal file
153
common/tpl/calendar.php
Normal file
|
|
@ -0,0 +1,153 @@
|
||||||
|
<?php
|
||||||
|
$year = $_REQUEST['year'];
|
||||||
|
$month = $_REQUEST['month'];
|
||||||
|
$method = $_REQUEST['method'];
|
||||||
|
$fo_id = $_REQUEST['fo_id'];
|
||||||
|
|
||||||
|
$day_str = $_REQUEST['day_str'];
|
||||||
|
if($day_str && strlen($day_str)) {
|
||||||
|
$year = substr($day_str,0,4);
|
||||||
|
$month = substr($day_str,4,2);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$year) $year = date("Y");
|
||||||
|
if(!$month) $month = date("m");
|
||||||
|
|
||||||
|
switch($method) {
|
||||||
|
case 'prev_year' :
|
||||||
|
$year = date("Y", mktime(0,0,0,1,1,$year)-60*60*24);
|
||||||
|
break;
|
||||||
|
case 'prev_month' :
|
||||||
|
$month --;
|
||||||
|
if($month < 1) {
|
||||||
|
$month = 12;
|
||||||
|
$year --;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'next_month' :
|
||||||
|
$month ++;
|
||||||
|
if($month > 12) {
|
||||||
|
$month = 1;
|
||||||
|
$year ++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'next_year' :
|
||||||
|
$year = date("Y", mktime(0,0,0,12,31,$year)+60*60*24);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$start_week = date("w", mktime(0,0,0,$month,1,$year));
|
||||||
|
$month_day = date("t", mktime(0,0,0,$month,1,$year));
|
||||||
|
$before_month_month_day = date("t", mktime(0,0,0,$month,1,$year)-60*60*24);
|
||||||
|
|
||||||
|
$next_year = date("m", mktime(0,0,0,12,31, $year)+60*60*24);
|
||||||
|
$next_month = date("m", mktime(0,0,0,$month,$month_day, $year)+60*60*24);
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html lang="ko" xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta http-equiv="imagetoolbar" content="no" />
|
||||||
|
<title>Calendar</title>
|
||||||
|
<script type="text/javascript" src="../js/x.js"></script>
|
||||||
|
<script type="text/javascript" src="../js/common.js"></script>
|
||||||
|
<script type="text/javascript" src="../js/xml_handler.js"></script>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="../css/default.css" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="./css/popup.css" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="./css/calendar.css" type="text/css" />
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function selectDate(date_str, date_val) {
|
||||||
|
if(!opener) {
|
||||||
|
window.close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var date_obj = opener.xGetElementById("date_<?=$fo_id?>");
|
||||||
|
var str_obj = opener.xGetElementById("str_<?=$fo_id?>");
|
||||||
|
|
||||||
|
if(!date_obj || !str_obj) {
|
||||||
|
window.close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
date_obj.value = date_val;
|
||||||
|
xInnerHtml(str_obj, date_str);
|
||||||
|
|
||||||
|
window.close();
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div id="popup_content" class="calendar_box">
|
||||||
|
<div class="calendar_title">
|
||||||
|
<table border="0" cellspacing="0" cellpadding="2" align="center">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="#" onclick="location.href='./calendar.php?fo_id=<?=$fo_id?>&year=<?=$year?>&month=<?=$month?>&method=prev_year';return false;"><img src="./images/icon_pprev.gif" border="0" alt="prev year" /></a>
|
||||||
|
<a href="#" onclick="location.href='./calendar.php?fo_id=<?=$fo_id?>&year=<?=$year?>&month=<?=$month?>&method=prev_month';return false;"><img src="./images/icon_prev.gif" border="0" alt="prev month" /></a>
|
||||||
|
</td>
|
||||||
|
<td><?=$year?>. <?=$month?></td>
|
||||||
|
<td>
|
||||||
|
<a href="#" onclick="location.href='./calendar.php?fo_id=<?=$fo_id?>&year=<?=$year?>&month=<?=$month?>&method=next_month';return false;"><img src="./images/icon_nnext.gif" border="0" alt="next month" /></a>
|
||||||
|
<a href="#" onclick="location.href='./calendar.php?fo_id=<?=$fo_id?>&year=<?=$year?>&month=<?=$month?>&method=next_year';return false;"><img src="./images/icon_next.gif" border="0" alt="next year" /></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="calendar_list">
|
||||||
|
<?php
|
||||||
|
for($i=0;$i<5;$i++) {
|
||||||
|
for($j=0;$j<7;$j++) {
|
||||||
|
$m = $month;
|
||||||
|
$y = $year;
|
||||||
|
|
||||||
|
$cell_no = $i*7 + $j;
|
||||||
|
|
||||||
|
if($cell_no < $start_week) {
|
||||||
|
$day = $before_month_month_day + $cell_no - $start_week + 1;
|
||||||
|
$m = $month - 1;
|
||||||
|
if($m<1) {
|
||||||
|
$m = 12;
|
||||||
|
$y = $year - 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$day = $cell_no - $start_week +1;
|
||||||
|
$m = $month;
|
||||||
|
|
||||||
|
if($day > $month_day) {
|
||||||
|
$day = $day - $month_day;
|
||||||
|
$m = $month + 1;
|
||||||
|
if($m>12) {
|
||||||
|
$m = 1;
|
||||||
|
$y = $year-1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($j==0) $class_name = "sunday";
|
||||||
|
elseif($j==6) $class_name = "saturday";
|
||||||
|
else $class_name= "";
|
||||||
|
|
||||||
|
$date = date("Y. m. d", mktime(0,0,0,$m, $day, $y));
|
||||||
|
$date_str = date("Ymd", mktime(0,0,0,$m, $day, $y));
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="calendar_cell <?=$class_name?>" onclick="selectDate('<?=$date?>','<?=$date_str?>');return false;"><div><?=$day?></div></div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
xAddEventListener(window,'load', setFixedPopupSize);
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
BIN
common/tpl/images/icon_next.gif
Normal file
BIN
common/tpl/images/icon_next.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 649 B |
BIN
common/tpl/images/icon_nnext.gif
Normal file
BIN
common/tpl/images/icon_nnext.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 650 B |
BIN
common/tpl/images/icon_pprev.gif
Normal file
BIN
common/tpl/images/icon_pprev.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 650 B |
BIN
common/tpl/images/icon_prev.gif
Normal file
BIN
common/tpl/images/icon_prev.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 648 B |
|
|
@ -66,6 +66,8 @@
|
||||||
{$val->value[0]} {$val->value[1]}
|
{$val->value[0]} {$val->value[1]}
|
||||||
<!--@elseif($val->column_type=='checkbox')-->
|
<!--@elseif($val->column_type=='checkbox')-->
|
||||||
{implode(",",$val->value)}
|
{implode(",",$val->value)}
|
||||||
|
<!--@elseif($val->column_type=='date')-->
|
||||||
|
{zdate($val->value, "Y-m-d")}
|
||||||
<!--@else-->
|
<!--@else-->
|
||||||
{$val->value}
|
{$val->value}
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
|
||||||
|
|
@ -210,6 +210,12 @@
|
||||||
<!--@elseif($val->column_type == 'jp_zip')-->
|
<!--@elseif($val->column_type == 'jp_zip')-->
|
||||||
<input type="text" name="{$val->column_name}" value="{$val->value}" />
|
<input type="text" name="{$val->column_name}" value="{$val->value}" />
|
||||||
|
|
||||||
|
<!-- 날자 입력 -->
|
||||||
|
<!--@elseif($val->column_type == 'date')-->
|
||||||
|
<input type="hidden" name="{$val->column_name}" id="date_{$val->column_name}" value="{$val->value}" />
|
||||||
|
<span id="str_{$val->column_name}">{zdate($val->value,"Y-m-d")}</span>
|
||||||
|
[<a href="#" onclick="open_calendar('{$val->column_name}','{$val->value}');return false;">{$lang->cmd_open_calendar}</a>]
|
||||||
|
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|
|
||||||
|
|
@ -193,6 +193,12 @@
|
||||||
<!--@elseif($val->column_type == 'jp_zip')-->
|
<!--@elseif($val->column_type == 'jp_zip')-->
|
||||||
<input type="text" name="{$val->column_name}" value="{$val->value}" />
|
<input type="text" name="{$val->column_name}" value="{$val->value}" />
|
||||||
|
|
||||||
|
<!-- 날자 입력 -->
|
||||||
|
<!--@elseif($val->column_type == 'date')-->
|
||||||
|
<input type="hidden" name="{$val->column_name}" id="date_{$val->column_name}" value="{$val->value}" />
|
||||||
|
<span id="str_{$val->column_name}">{zdate($val->value,"Y-m-d")}</span>
|
||||||
|
[<a href="#" onclick="open_calendar('{$val->column_name}');return false;">{$lang->cmd_open_calendar}</a>]
|
||||||
|
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|
|
||||||
|
|
@ -232,6 +232,12 @@
|
||||||
<!--@elseif($val->column_type == 'jp_zip')-->
|
<!--@elseif($val->column_type == 'jp_zip')-->
|
||||||
<input type="text" name="{$val->column_name}" value="{$val->value}" />
|
<input type="text" name="{$val->column_name}" value="{$val->value}" />
|
||||||
|
|
||||||
|
<!-- 날자 입력 -->
|
||||||
|
<!--@elseif($val->column_type == 'date')-->
|
||||||
|
<input type="hidden" name="{$val->column_name}" id="date_{$val->column_name}" value="{$val->value}" />
|
||||||
|
<span id="str_{$val->column_name}">{zdate($val->value,"Y-m-d")}</span>
|
||||||
|
[<a href="#" onclick="open_calendar('{$val->column_name}','{$val->value}');return false;">{$lang->cmd_open_calendar}</a>]
|
||||||
|
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,8 @@
|
||||||
{$val->value[0]} {$val->value[1]}
|
{$val->value[0]} {$val->value[1]}
|
||||||
<!--@elseif($val->column_type=='checkbox')-->
|
<!--@elseif($val->column_type=='checkbox')-->
|
||||||
{implode(",",$val->value)}
|
{implode(",",$val->value)}
|
||||||
|
<!--@elseif($val->column_type=='date')-->
|
||||||
|
{zdate($val->value, "Y-m-d")}
|
||||||
<!--@else-->
|
<!--@else-->
|
||||||
{$val->value}
|
{$val->value}
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue