삭제
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2327 201d5d3c-b55e-5fd7-737f-ddc643e51545
189
common/tpl/calendar.php
Normal file
|
|
@ -0,0 +1,189 @@
|
|||
<?php
|
||||
$year = sprintf("%04d",$_REQUEST['year']);
|
||||
$month = sprintf("%02d",$_REQUEST['month']);
|
||||
|
||||
$method = $_REQUEST['method'];
|
||||
$fo_id = $_REQUEST['fo_id'];
|
||||
$callback_func = $_REQUEST['callback_func'];
|
||||
|
||||
$day_str = $_REQUEST['day_str'];
|
||||
if($day_str && strlen($day_str)) {
|
||||
$year = substr($day_str,0,4);
|
||||
$month = substr($day_str,4,2);
|
||||
}
|
||||
|
||||
if(!(int)$year) $year = date("Y");
|
||||
if(!(int)$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/button.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../modules/admin/tpl/css/admin.css" type="text/css" />
|
||||
<link rel="stylesheet" href="./css/calendar.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
function selectDate(date_str, date_val, callback_func) {
|
||||
if(!opener) {
|
||||
window.close();
|
||||
return;
|
||||
}
|
||||
|
||||
var date_obj = opener.xGetElementById("date_<?=$fo_id?>");
|
||||
var str_obj = opener.xGetElementById("str_<?=$fo_id?>");
|
||||
|
||||
if(date_obj) date_obj.value = date_val;
|
||||
|
||||
if(str_obj) xInnerHtml(str_obj, date_str);
|
||||
|
||||
if(callback_func) eval('opener.'+callback_func+'('+date_val+')');
|
||||
|
||||
window.close();
|
||||
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="popup_content" >
|
||||
<div id="popHeadder">
|
||||
<h1>Calendar</h1>
|
||||
</div>
|
||||
|
||||
<form action="./calendar.php" method="get">
|
||||
<input type="hidden" name="fo_id" value="<?=$fo_id?>"/>
|
||||
<input type="hidden" name="callback_func" value="<?=$callback_func?>"/>
|
||||
|
||||
<div id="popBody">
|
||||
|
||||
<div class="calendar">
|
||||
<div class="yymm">
|
||||
<div class="yy">
|
||||
<a href="./calendar.php?fo_id=<?=$fo_id?>&year=<?=$year?>&month=<?=$month?>&method=prev_year&callback_func=<?=$callback_func?>" class="left"><img src="./images/buttonLeft2.gif" alt="prev" width="11" height="11" /></a><?=$year?><a href="./calendar.php?fo_id=<?=$fo_id?>&year=<?=$year?>&month=<?=$month?>&method=next_year&callback_func=<?=$callback_func?>" class="right"><img src="./images/buttonRight2.gif" alt="next" width="11" height="11" /></a>
|
||||
</div>
|
||||
<div class="mm">
|
||||
<p><?=date("M", mktime(0,0,0,$month,1,$year))?></p>
|
||||
<a href="./calendar.php?fo_id=<?=$fo_id?>&year=<?=$year?>&month=<?=$month?>&method=prev_month&callback_func=<?=$callback_func?>" class="left"><img src="./images/buttonLeft2.gif" alt="prev" width="11" height="11" /></a><span><?=$month?></span><a href="./calendar.php?fo_id=<?=$fo_id?>&year=<?=$year?>&month=<?=$month?>&method=next_month&callback_func=<?=$callback_func?>" class="right"><img src="./images/buttonRight2.gif" alt="next" width="11" height="11" /></a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="go">
|
||||
<input type="text" name="year" class="inputTypeY" value="<?=$year?>" />
|
||||
<input type="text" name="month" class="inputTypeM" value="<?=$month?>" />
|
||||
<input type="image" src="./images/buttonGo.gif" alt="Go" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table cellspacing="0" class="dd">
|
||||
|
||||
<?php
|
||||
for($i=0;$i<6;$i++) {
|
||||
?>
|
||||
<tr class="<?if($i==0){?>first<?}elseif($i==5){?>last<?}?>">
|
||||
<?php
|
||||
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 = "sun";
|
||||
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));
|
||||
|
||||
?>
|
||||
<td class="<?=$class_name?>">
|
||||
<?if($m==$month){?>
|
||||
<?if(date("Ymd")==$date_str){?><strong><?}?>
|
||||
<?if($day){?><a href="#" onclick="selectDate('<?=$date?>','<?=$date_str?>','<?=$callback_func?>');return false;"><?=$day?></a><?}else{?> <?}?>
|
||||
<?if(date("Ymd")==$date_str){?></strong><?}?>
|
||||
<?}else{?>
|
||||
<span class="disable"><?if($day){?><a href="#" onclick="selectDate('<?=$date?>','<?=$date_str?>','<?=$callback_func?>');return false;"><?=$day?></a><?}else{?> <?}?></span>
|
||||
<?}?>
|
||||
</td>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<div id="popFooter" class="tCenter">
|
||||
<a href="#" onclick="window.close();" class="button"><span>close</span></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
xAddEventListener(window,'load', setFixedPopupSize);
|
||||
var _isPoped = true;
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
47
common/tpl/common_layout.html
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html lang="{Context::getLangType()}" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="zeroboard xe (http://www.zeroboard.com)" />
|
||||
<!--@if($module_info->module)--><meta name="module" content="{$module_info->module}" />
|
||||
<!--@end--><!--@if($module_info->skin)--><meta name="module_skin" content="{$module_info->skin}" />
|
||||
<!--@end--><!--@if($layout_info->title)--><meta name="layout" content="{$layout_info->title} ({$layout_info->layout})" />
|
||||
<!--@end--><!--@if($layout->author)--><meta name="layout_maker" content="{$layout_info->author->name} ({$layout_info->author->homepage})" />
|
||||
<!--@end--><meta http-equiv="imagetoolbar" content="no" />
|
||||
<title>{Context::getBrowserTitle()}</title>
|
||||
<script type="text/javascript" src="./common/js/x.js"></script>
|
||||
<script type="text/javascript" src="./common/js/common.js"></script>
|
||||
<script type="text/javascript" src="./common/js/xml_handler.js"></script>
|
||||
<script type="text/javascript" src="./common/js/xml_js_filter.js"></script>
|
||||
<!--@foreach(Context::getJsFile() as $key => $js_file)--><script type="text/javascript" src="{$js_file}"></script>
|
||||
<!--@end--><!--@if($rss_url)--><link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{$rss_url}" />
|
||||
<!--@end--><link rel="stylesheet" href="./common/css/default.css" type="text/css" />
|
||||
<link rel="stylesheet" href="./common/css/button.css" type="text/css" />
|
||||
<!--@foreach(Context::getCssFile() as $key => $css_file)--><link rel="stylesheet" href="{$css_file}" type="text/css" />
|
||||
<!--@end--><!--@if($module=='admin' || strpos($act,'Admin')>0)--><link rel="stylesheet" href="./modules/admin/tpl/css/admin.css" type="text/css" />
|
||||
<!--@end--><script type="text/javascript">//<![CDATA[
|
||||
var current_url = "{$current_url}";
|
||||
var request_uri = "{$request_uri}";
|
||||
var current_mid = "{$mid}";
|
||||
var wating_message = "{$lang->msg_call_server}";
|
||||
//]]></script>
|
||||
|
||||
{Context::getHtmlHeader()}
|
||||
|
||||
</head>
|
||||
<body>
|
||||
{$zbxe_final_content}
|
||||
|
||||
{Context::getHtmlFooter()}
|
||||
|
||||
<div id="waitingforserverresponse" style="visibility:hidden"></div>
|
||||
<div id="fororiginalimagearea" style="visibility:hidden">
|
||||
<div id="fororiginalimageareabg">
|
||||
<img src="./images/blank.gif" alt="original image" border="0" id="fororiginalimage" />
|
||||
<img src="./images/original_image_box_close.gif" alt="close original image" border="0" onclick="closeOriginalImage()" id="closeOriginalImageBtn"/>
|
||||
</div>
|
||||
</div>
|
||||
<div id="membermenuarea"></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
33
common/tpl/css/calendar.css
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
@charset "utf-8";
|
||||
|
||||
body { margin:0; padding:0; }
|
||||
|
||||
#popup_content { width:370px; overflow:hidden;}
|
||||
#popHeadder { width:370px; }
|
||||
#popBody { width:350px; }
|
||||
#popFooter { width:370px; }
|
||||
|
||||
#popBody .calendar { width:350px; border:1px solid #c1c0bd; border-left:none; border-right:none; background:#f5f5f5; overflow:hidden; position:relative;}
|
||||
#popBody .calendar .yymm { width:143px; float:left;}
|
||||
#popBody .calendar .yymm .yy { padding:9px 0 6px 0; text-align:center; border-bottom:1px solid #ededed; margin:0 15px; font:bold 1.2em Tahoma; color:#444444;}
|
||||
#popBody .calendar .yymm .mm { margin:0 15px; border-top:1px solid #ffffff; border-bottom:1px solid #ededed; padding:10px 0 7px 0; text-align:center;}
|
||||
#popBody .calendar .yymm .mm p { color:#969696; font:1.6em "Times New Roman";}
|
||||
#popBody .calendar .yymm .mm span { font:4em "Times New Roman"; color:#158692; vertical-align:middle;}
|
||||
#popBody .calendar .yymm .go { padding:7px 0 0 0; margin:0 15px; text-align:center; border-top:1px solid #ffffff;}
|
||||
#popBody .calendar .yymm .go * { vertical-align:middle;}
|
||||
#popBody .calendar .yymm .go .inputTypeY { border:1px solid #c9c9c9; text-align:center; font:.9em Tahoma; color:#282828; width:31px; height:16px;}
|
||||
#popBody .calendar .yymm .go .inputTypeM { border:1px solid #c9c9c9; text-align:center; font:.9em Tahoma; color:#282828; width:20px; height:16px;}
|
||||
#popBody .calendar .yymm .left { vertical-align:middle; margin-right:14px;}
|
||||
#popBody .calendar .yymm .right { vertical-align:middle; margin-left:14px;}
|
||||
#popBody .calendar .yymm .left img,
|
||||
#popBody .calendar .yymm .right img { vertical-align:middle; position:relative; top:2px;}
|
||||
#popBody .calendar .dd { float:left; width:207px; background:#ffffff; border-left:10px solid #ffffff;}
|
||||
#popBody .calendar .dd td { border-bottom:1px solid #ededed; height:32px; text-align:center; color:#636363; font:.9em Tahoma;}
|
||||
#popBody .calendar .dd td a { color:#636363; font:.9em Tahoma;}
|
||||
#popBody .calendar .dd td strong { text-decoration:underline;}
|
||||
#popBody .calendar .dd td strong a { text-decoration:underline;}
|
||||
#popBody .calendar .dd td.sun { color:#c95b53;}
|
||||
#popBody .calendar .dd td.sun a { color:#c95b53;}
|
||||
#popBody .calendar .dd .first { height:35px;}
|
||||
#popBody .calendar .dd .last td { height:35px; border-bottom:none;}
|
||||
#popBody .calendar .dd td .disable a { color:#CCCCCC; }
|
||||
1
common/tpl/default_layout.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
{$content}
|
||||
BIN
common/tpl/images/blank.gif
Normal file
|
After Width: | Height: | Size: 43 B |
BIN
common/tpl/images/buttonGo.gif
Normal file
|
After Width: | Height: | Size: 454 B |
BIN
common/tpl/images/buttonLeft2.gif
Normal file
|
After Width: | Height: | Size: 58 B |
BIN
common/tpl/images/buttonRight2.gif
Normal file
|
After Width: | Height: | Size: 58 B |
BIN
common/tpl/images/calendar.gif
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
common/tpl/images/flvplayer.swf
Normal file
BIN
common/tpl/images/folder.gif
Normal file
|
After Width: | Height: | Size: 372 B |
BIN
common/tpl/images/form_buttons.gif
Executable file
|
After Width: | Height: | Size: 4 KiB |
BIN
common/tpl/images/form_buttons.png
Executable file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
common/tpl/images/icon_next.gif
Normal file
|
After Width: | Height: | Size: 649 B |
BIN
common/tpl/images/icon_nnext.gif
Normal file
|
After Width: | Height: | Size: 650 B |
BIN
common/tpl/images/icon_pprev.gif
Normal file
|
After Width: | Height: | Size: 650 B |
BIN
common/tpl/images/icon_prev.gif
Normal file
|
After Width: | Height: | Size: 648 B |
BIN
common/tpl/images/imgfolder.gif
Normal file
|
After Width: | Height: | Size: 622 B |
BIN
common/tpl/images/info.png
Normal file
|
After Width: | Height: | Size: 386 B |
BIN
common/tpl/images/join.gif
Normal file
|
After Width: | Height: | Size: 69 B |
BIN
common/tpl/images/joinbottom.gif
Normal file
|
After Width: | Height: | Size: 66 B |
BIN
common/tpl/images/line.gif
Normal file
|
After Width: | Height: | Size: 66 B |
BIN
common/tpl/images/minus.gif
Normal file
|
After Width: | Height: | Size: 86 B |
BIN
common/tpl/images/minusbottom.gif
Normal file
|
After Width: | Height: | Size: 85 B |
BIN
common/tpl/images/original_image_box_close.gif
Normal file
|
After Width: | Height: | Size: 610 B |
BIN
common/tpl/images/page.gif
Normal file
|
After Width: | Height: | Size: 582 B |
BIN
common/tpl/images/plus.gif
Normal file
|
After Width: | Height: | Size: 89 B |
BIN
common/tpl/images/plusbottom.gif
Normal file
|
After Width: | Height: | Size: 88 B |
BIN
common/tpl/images/widget.gif
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
common/tpl/images/widget_bg.jpg
Executable file
|
After Width: | Height: | Size: 24 KiB |
BIN
common/tpl/images/widget_text.gif
Executable file
|
After Width: | Height: | Size: 970 B |
7
common/tpl/popup_layout.html
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<!--%import("css/popup.css")-->
|
||||
<div id="popup_content">{$content}</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
xAddEventListener(window, 'load', setFixedPopupSize);
|
||||
var _isPoped = true;
|
||||
</script>
|
||||
3
common/tpl/refresh.html
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<script type="text/javascript">
|
||||
top.location.href = top.location.href;
|
||||
</script>
|
||||