git-svn-id: http://xe-core.googlecode.com/svn/trunk@1818 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-06-28 02:33:47 +00:00
parent 820860f4eb
commit 200ca43394
5 changed files with 105 additions and 92 deletions

View file

@ -82,101 +82,104 @@
</head>
<body>
<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?>&amp;year=<?=$year?>&amp;month=<?=$month?>&amp;method=prev_year&amp;callback_func=<?=$callback_func?>" class="left"><img src="../img/buttonLeft2.gif" alt="prev" width="11" height="11" /></a><?=$year?><a href="./calendar.php?fo_id=<?=$fo_id?>&amp;year=<?=$year?>&amp;month=<?=$month?>&amp;method=next_year&amp;callback_func=<?=$callback_func?>" class="right"><img src="../img/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?>&amp;year=<?=$year?>&amp;month=<?=$month?>&amp;method=prev_month&amp;callback_func=<?=$callback_func?>" class="left"><img src="../img/buttonLeft2.gif" alt="prev" width="11" height="11" /></a><span><?=$month?></span><a href="./calendar.php?fo_id=<?=$fo_id?>&amp;year=<?=$year?>&amp;month=<?=$month?>&amp;method=next_month&amp;callback_func=<?=$callback_func?>" class="right"><img src="../img/buttonRight2.gif" alt="next" width="11" height="11" /></a>
</div>
<div class="go">
<input type="text" class="inputTypeY" value="<?=$year?>" />
<input type="text" class="inputTypeM" value="<?=$month?>" />
<input name="" type="image" src="../img/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(date("Ymd")==$date_str){?><strong><?}?>
<?if($day){?><a href="#" onclick="selectDate('<?=$date?>','<?=$date_str?>','<?=$callback_func?>');return false;"><?=$day?></a><?}else{?>&nbsp;<?}?>
<?if(date("Ymd")==$date_str){?></strong><?}?>
</td>
<?
}
?>
</tr>
<?
}
?>
</table>
</div>
<div id="popup_content" >
<div id="popHeadder">
<h1>Calendar</h1>
</div>
</form>
<div id="popFooter">
<span class="close"><a href="#" onclick="window.close();" class="buttonTypeA"><img src="../img/blank.gif" alt="" class="leftCap" />close<img src="../img/blank.gif" alt="" class="rightCap" /></a></span>
<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?>&amp;year=<?=$year?>&amp;month=<?=$month?>&amp;method=prev_year&amp;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?>&amp;year=<?=$year?>&amp;month=<?=$month?>&amp;method=next_year&amp;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?>&amp;year=<?=$year?>&amp;month=<?=$month?>&amp;method=prev_month&amp;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?>&amp;year=<?=$year?>&amp;month=<?=$month?>&amp;method=next_month&amp;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(date("Ymd")==$date_str){?><strong><?}?>
<?if($day){?><a href="#" onclick="selectDate('<?=$date?>','<?=$date_str?>','<?=$callback_func?>');return false;"><?=$day?></a><?}else{?>&nbsp;<?}?>
<?if(date("Ymd")==$date_str){?></strong><?}?>
</td>
<?
}
?>
</tr>
<?
}
?>
</table>
</div>
</div>
</form>
<div id="popFooter">
<span class="close"><a href="#" onclick="window.close();" class="buttonTypeA"><img src="./images/blank.gif" alt="" class="leftCap" />close<img src="./images/blank.gif" alt="" class="rightCap" /></a></span>
</div>
</div>
<script type="text/javascript">
xAddEventListener(window,'load', setFixedPopupSize);
</script>
<script type="text/javascript">
xAddEventListener(window,'load', setFixedPopupSize);
var _isPoped = true;
</script>
</body>
</html>

View file

@ -1,5 +1,12 @@
@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 8px 0; text-align:center; border-bottom:1px solid #ededed; margin:0 15px; font:bold 1.2em Tahoma; color:#444444;}
@ -16,7 +23,10 @@
#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:30px; 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;}

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 B