最終更新: 2017-06-19 13:13 作成時刻: 2017-06-19 13:13 RSS
view_all_bug_with_calendar.php

ステータス
優先度
マイルストーン
タグ
未設定

<?php # Mantis - a php based bugtracking system

# Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org # Copyright (C) 2002 - 2007 Mantis Team - mantisbt-dev@lists.sourceforge.net

# Mantis is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # Mantis is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Mantis. If not, see <http://www.gnu.org/licenses/>.

# -------------------------------------------------------- # $Revision: 1.62.2.1 $ # $Author: giallu $ # $Date: 2007-10-13 22:34:48 $ # # $Id: view_all_bug_page.php,v 1.62.2.1 2007-10-13 22:34:48 giallu Exp $ # --------------------------------------------------------

?> <?php

require_once( 'core.php' );
$t_core_path = config_get( 'core_path' );
require_once( $t_core_path.'compress_api.php' ); require_once( $t_core_path.'filter_api.php' ); require_once( $t_core_path.'last_visited_api.php' );
require_once( $t_core_path.'current_user_api.php' ); require_once( $t_core_path.'bug_api.php' ); require_once( $t_core_path.'string_api.php' ); require_once( $t_core_path.'date_api.php' ); require_once( $t_core_path.'icon_api.php' ); require_once( $t_core_path.'columns_api.php' );

// require_once( $t_core_path.'custom_field_api.php' ); ?> <?php auth_ensure_user_authenticated() ?> <?php

$f_page_number = gpc_get_int( 'page_number', 1 );
$t_per_page = null; $t_bug_count = null; $t_page_count = null;
$rows = filter_get_bug_rows( $f_page_number, $t_per_page, $t_page_count, $t_bug_count, null, null, null, true ); if ( $rows === false ) {
print_header_redirect( 'view_all_set.php?type=0' );
}
$t_bugslist = Array(); $t_row_count = sizeof( $rows ); for($i=0; $i < $t_row_count; $i++) {
array_push($t_bugslist, $rows$iid );
}
gpc_set_cookie( config_get( 'bug_list_cookie' ), implode( ',', $t_bugslist ) );
compress_enable();
html_page_top1( lang_get( 'view_bugs_link' ) );
if ( current_user_get_pref( 'refresh_delay' ) > 0 ) {
html_meta_redirect( 'view_all_bug_page.php?page_number='.$f_page_number, current_user_get_pref( 'refresh_delay' )*60 );
}
html_page_top2();
print_recently_visited();

// include( dirname( FILE ) . DIRECTORY_SEPARATOR . 'view_all_inc.php' );

$t_filter = current_user_get_bug_filter();
if( $t_filter ) {
list( $t_sort, ) = split( ',', $t_filter['sort'] ); list( $t_dir, ) = split( ',', $t_filter['dir'] );
}
$t_checkboxes_exist = false;
$t_icon_path = config_get( 'icon_path' ); $t_update_bug_threshold = config_get( 'update_bug_threshold' );
$t_columns = helper_get_columns_to_view( COLUMNS_TARGET_VIEW_PAGE );
$col_count = sizeof( $t_columns );
// debug

// for( $i = 0; $i < $col_count; $i++ ) { // if ( strpos( $t_columns$i, "51.(予定)作業開始日" ) !== false ) { // $objid00 = $i; // print "t_column[ ". $i ."] : " . $t_columns$i . "<br>"; // } // if ( strpos( $t_columns$i, "53.(実施)開始予定日時" ) !== false ) { // $objid01 = $i; // print "t_column[ ". $i ."] : " . $t_columns$i . "<br>"; // } // }

$t_filter_position = config_get( 'filter_position' );
# -- ====================== FILTER FORM ========================= -- if ( ( $t_filter_position & FILTER_POSITION_TOP ) == FILTER_POSITION_TOP ) {
filter_draw_selection_area( $f_page_number );
} # -- ====================== end of FILTER FORM ================== --
# -- ====================== BUG LIST ============================ --
$t_status_legend_position = config_get( 'status_legend_position' );
if ( $t_status_legend_position == STATUS_LEGEND_POSITION_TOP || $t_status_legend_position == STATUS_LEGEND_POSITION_BOTH ) {
html_status_legend();
}

# @@@ (thraxisp) this may want a browser check ( MS IE >= 5.0, Mozilla >= 1.0, Safari >=1.2, ...)

if ( ( ON == config_get( 'dhtml_filters' ) ) && ( ON == config_get( 'use_javascript' ) ) ){
?> <script type="text/javascript" language="JavaScript"> <!--
var string_loading = '<?php echo lang_get( 'loading' );?>';
// --> </script> <script type="text/javascript" language="JavaScript" src="javascript/xmlhttprequest.js"></script> <script type="text/javascript" language="JavaScript" src="javascript/addLoadEvent.js"></script> <script type="text/javascript" language="JavaScript" src="javascript/dynamic_filters.js"></script> <?php
}

?> <br /> <form name="bug_action" method="get" action="bug_actiongroup_page.php"> <table id="buglist" class="width100" cellspacing="1"> <tr>

<td class="form-title" colspan="<?php echo $col_count - 2; ?>">
<?php
# -- Viewing range info --
$v_start = 0; $v_end = 0;
if ( sizeof( $rows ) > 0 ) {
if( $t_filter )
$v_start = $t_filter['per_page'] * (int)($f_page_number-1) +1;
else
$v_start = 1;
$v_end = $v_start + sizeof( $rows ) -1;
}
echo lang_get( 'viewing_bugs_title' ); echo " ($v_start - $v_end / $t_bug_count)";
?>
<span class="small">

<?php

# -- Print and Export links --
print_bracket_link( 'print_all_bug_page.php', lang_get( 'print_all_bug_page_link' ) ); echo '&nbsp;'; if ( ON == config_get( 'use_jpgraph' ) ) {
print_bracket_link( 'bug_graph_page.php', lang_get( 'graph_bug_page_link' ) ); echo '&nbsp;';
} print_bracket_link( 'csv_export.php', lang_get( 'csv_export' ) );
?>

</span>

</td>
<td class="right" colspan="2">
<span class="small">

<?php

# -- Page number links -- $f_filter = gpc_get_int( 'filter', 0); print_page_links( 'view_all_bug_page.php', 1, $t_page_count, (int)$f_page_number, $f_filter );
?>
</span>
</td>

</tr> <?php # -- Bug list column header row -- ?> <tr class="row-category"> <?php

foreach( $t_columns as $t_column ) {
$t_title_function = 'print_column_title'; helper_call_custom_function( $t_title_function, array( $t_column ) );
}

?> </tr>

<?php # -- Spacer row -- ?> <tr class="spacer">

<td colspan="--->

<?php echo $col_count; ?>"></td> </tr> <?php

function anal_bug_rows ( $p_rows ) {
global $t_columns, $t_filter, $objdata;
$t_in_stickies = ( $t_filter && ( 'on' == $t_filter['sticky_issues'] ) );
mark_time( 'begin loop' );
# -- Loop over bug rows --
$t_rows = sizeof( $p_rows ); for( $i=0; $i < $t_rows; $i++ ) {
$t_row = $p_rows$i;
if ( ( 0 == $t_row['sticky'] ) && ( 0 == $i ) ) {
$t_in_stickies = false;
} if ( ( 0 == $t_row['sticky'] ) && $t_in_stickies ) { # demarcate stickies, if any have been shown

?>

<tr>
<td class="left" colspan="<?php echo sizeof( $t_columns ); ?>" bgcolor="#999999">&nbsp;</td>
</tr>

<?php

$t_in_stickies = false;
}
# choose color based on status $status_color = get_status_color( $t_row['status'] );
echo '<tr bgcolor="', $status_color, '" border="1">';
foreach( $t_columns as $t_column ) {
$t_column_value_function = 'print_column_value'; helper_call_custom_function( $t_column_value_function, array( $t_column, $t_row ) ); if ( $t_column == "custom_51.(予定)作業開始日" | $t_column == "custom_53.(実施)開始予定日時") {
$t_custom_field = substr( $t_column, 7); $t_field_id = custom_field_get_id_from_name( $t_custom_field ); $t_def = custom_field_get_definition( $t_field_id ); $t_value = custom_field_get_value_legacy($t_field_id, $t_row['id']);

// print "t_column: " . $t_column . ", t_field_id:" . $t_field_id .", bug_id :" . $t_row['id'] ; // print ", Summry :" . $t_row['summary'] . ", t_def: " .$t_def. ", t_value: " .$t_value. " date:". date("r", $t_value). "<br>";

print "Summry :" . $t_row['summary'] . ", bug_id: " .$t_row['id']. " date:". date("Y年m月d日 G:i:s", $t_value). "<br>";
//print $t_row6 . "&nbsb;"; //print "t_row custom_51: ".t_row$t_column."<br>"; }
}
echo '</tr>';
}
}
anal_bug_rows($rows); //debug
$rowsnum = sizeof($rows);

// for( $i=0; $i < $rowsnum; $i++ ) { // print_r($rows$i); // print "<br>"; // }

# -- ====================== end of BUG LIST ========================= --
# -- ====================== MASS BUG MANIPULATION =================== --

?>

<tr>
<td class="left" colspan="<?php echo $col_count-2; ?>">

<?php

if ( $t_checkboxes_exist && ON == config_get( 'use_javascript' ) ) {
echo "<input type=\"checkbox\" name=\"all_bugs\" value=\"all\" onclick=\"checkall('bug_action', this.form.all_bugs.checked)\" /><span class=\"small\">" . lang_get( 'select_all' ) . '</span>';
}
if ( $t_checkboxes_exist ) {

?>

<select name="action">
<?php print_all_bug_action_option_list() ?>
</select> <input type="submit" class="button" value="<?php echo lang_get( 'ok' ); ?>" />

<?php

} else {
echo '&nbsp;';
}

?>

</td> <?php # -- Page number links -- ?> <td class="right" colspan="2">
<span class="small">
<?php
$f_filter = gpc_get_int( 'filter', 0); print_page_links( 'view_all_bug_page.php', 1, $t_page_count, (int)$f_page_number, $f_filter );
?>
</span>
</td>
</tr>

<?php # -- ====================== end of MASS BUG MANIPULATION ========================= -- ?> </table> </form>

<?php

mark_time( 'end loop' );
if ( $t_status_legend_position == STATUS_LEGEND_POSITION_BOTTOM || $t_status_legend_position == STATUS_LEGEND_POSITION_BOTH ) {
html_status_legend();
}
# -- ====================== FILTER FORM ========================= -- if ( ( $t_filter_position & FILTER_POSITION_BOTTOM ) == FILTER_POSITION_BOTTOM ) {
filter_draw_selection_area( $f_page_number );
} # -- ====================== end of FILTER FORM ================== --

echo '<br />'; echo '<table class="width100" border="1" cellspacing="1">'; echo '<tr class="row-category">'; echo ' <th>日(曜)</th>'; echo ' <th>祭日名</th>'; echo ' <th>検討開始期間</th>'; echo ' <th>時刻</th>'; echo ' <th>SC-RP工事計画日</th>'; echo ' <th>SC-RP工事実行日</th>'; echo '</tr>';

$peri = 25; // 1時間刻みの場合、「25」。30分刻みなら「50」、15分刻みなら「100」 $lordwar = "<td align='center' rowspan='25'>"; //平日の無色設定 $lordrow = "<td rowspan='25'>"; //平日の無色設定 $lcolorPk = "<td align='center' bgcolor='#ffc0cb' rowspan='25'>"; //背景を pink に with align(location) and rowspan, peri=25 $coulorPk = "<td bgcolor='#ffc0cb' rowspan='25'>"; //背景を pink に with rowspan $lcolorDg = "<td align='center' bgcolor='#8fbc8f' rowspan='25'>"; //背景を darkseagreen に $coulorDg = "<td bgcolor='#8fbc8f' rowspan='25'>"; //背景を darkseagreen に $lcolorLb = "<td align='center' bgcolor='#b0c4de' rowspan='25'>"; //背景を lightsteelblue に $coulorLb = "<td bgcolor='#b0c4de' rowspan='25'>"; //背景を lightsteelblue に

// 今年の西暦をデフォルトとして表示するために事前設定 $nen = date("Y"); // 表示する日付の制御変数の設定 $nenxt = $nen + 1; // 6ヶ月後が年を超える場合の対処 $nenpr = $nen -1; // その月が1月の場合、年号を前年にするための変数 $gen = date("m"); // 今日の月を求める $genxt = $gen + 6; // 表示するための変数、デフォルト今日日付の前の月から6ヶ月後まで表示するための変数 if ( $gen == 1 ) { // 1月だったら変数設定を変える、1月の前月が0月となるため、年と月を修正する

$genpr = 12; $nen = $nenpr;

} else {

$genpr = $gen - 1;

}

$youbi = array("日","月","火","水","木","金","土"); //曜日を配列に入れる $tdiv = 0; //テーブルの数を数えるための変数

//for ($gatsu = 1; $gatsu <= 12; $gatsu++) { //月に1を足しながら12月まで繰り返し for ($gatsu = $genpr ; $gatsu < $genxt; $gatsu++) { //今日の月より前月より6ヶ月後まで表示

// 1日の曜日を取得して月始まりを判断する
$hi = 1; //"日"は 1 から始める
if ( $gatsu > 12 ) { $you = date("w", mktime(0, 0, 0, $gatsu-12, $hi, $nenxt)); //1日の曜日 } else { $you = date("w", mktime(0, 0, 0, $gatsu, $hi, $nen)); //1日の曜日 }
$you = date("w", mktime(0, 0, 0, $gatsu, $hi, $nen)); //1日の曜日
echo '<tr class="row-category">';
print "<tr><br></tr>\n"; //行変えする print "</table><br><td>\n"; print "<H1>" . $nen . "年" . $gatsu . "月</td></H1>\n";
print "<table class=\"width100\" border=\"1\" cellspacing=\"1\">";
$monday = 0; //初期値を 0 として変数 $you を設定 for ($i = $hi; $i < 32; $i++) { //日付に1を足しながら32日まで繰り返し
$you = date("w", mktime(0, 0, 0, $gatsu, $hi, $nen)); //曜日
$pidnt = date("U", mktime(0, 0, 0, $gatsu, $hi, $nen)); //Unix time 取得 配列のサフィックス利用
if ($you == 1) { //月曜日なら$mondayに+1
$monday++;
}
// 曜日祭日の計算と設定
$y2 = ($nen - 2000); $syunbun = (int)(20.69115 + 0.2421904 * $y2 - (int)($y2/4 + $y2/100 + $y2/400)); $syuubun = (int)(23.09000 + 0.2421904 * $y2 - (int)($y2/4 + $y2/100 + $y2/400));
if (($nen == date("Y")) && ($gatsu == date("n")) && ($hi == date("d"))) { //今日なら
print $lcolorDg . $hi . "(<a id=\"" . "本日\">" . $youbi$you . "</a>)</td>" . $coulorDg . "本日</td>" . $lcolorDg . $contstpl$pidnt ."</td>\n"; //背景を darkseagreen に
} elseif (($gatsu == 1) && ($hi == 1)) { //元日(1月1日なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "元旦</td>" . $lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 1) && ($hi == 2)) { //元日の振替休日(1月2日が月曜なら)
print $lcolorPk . $hi . '(' . $youbi$you . ")</td>" . $coulorPk . "三箇日</td>" . $lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 1) && ($hi == 3)) { //1月3日まで三箇日として休み設定
print $lcolorPk . $hi . '(' . $youbi$you . ")</td>" . $coulorPk . "三箇日</td>" . $lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 1) && ($monday == 2) && ($you == 1)) { //成人の日(1月の第2月曜なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "成人</td>" . $lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 2) && ($hi == 11)) { //建国記念の日(2月11日なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "建国</td>" .$lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 2) && ($hi == 12) && ($you == 1)) { //建国記念の日の振替休日(2月12日が月曜なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>". $coulorPk . "建国振替</td>" .$lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($nen > 1999 ) && ($gatsu == 3) && ($hi == $syunbun)) { //春分の日(計算式による)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "春分</td>" .$lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($nen > 1999 ) && ($gatsu == 3) && ($hi == ($syunbun + 1)) && ($you == 1)) { //春分の日の振替休日
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "春分振替</td>" .$lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($nen < 2007) && ($gatsu == 4) && ($hi == 29)) { //2006年みどりの日(4月29日なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "緑日</td>" .$lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($nen < 2007) && ($gatsu == 4) && ($hi == 30) && ($you == 1)) { //みどりの日の振替休日(4月30日が月曜なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "緑日振替</td>" . $lcolorPk . $conststpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($nen > 2006) && ($gatsu == 4) && ($hi == 29)) { //昭和の日(4月29日なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "昭和</td>" .$lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($nen > 2006) && ($gatsu == 4) && ($hi == 30) && ($you == 1)) { //昭和の日の振替休日(4月30日が月曜なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . $peri . "'>昭和振替</td>" .$lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 5) && ($hi == 3)) { //憲法記念日(5月3日なら)
if (($nen > 2006) && ($you == 0)) { //憲法記念日が日曜なら
$kokuminf = on; //振替休日有りの印を付ける
} print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "憲法</td>" .$lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif ((($nen < 2007) && ($gatsu == 5) && ($hi == 4) && ($you == 2)) or (($nen < 2007) && ($gatsu == 5) && ($hi == 4) && ($you == 3)) or (($nen < 2007) && ($gatsu == 5) && ($hi == 4) && ($you == 4)) or (($nen < 2007) && ($gatsu == 5) && ($hi == 4) && ($you == 5)) or (($nen < 2007) && ($gatsu == 5) && ($hi == 4) && ($you == 6))) {
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . $peri . "'>憲法振替</td>" .$lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($nen > 2006) && ($gatsu == 5) && ($hi == 4)) { //2007年以降みどりの日(5月4日なら)
if (($nen > 2006) && ($kokuminf != on) && ($you == 0)) { //みどりの日が日曜なら
$kokuminf = on; //振替休日有りの印を付ける
} print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "緑日</td>" .$lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 5) && ($hi == 5)) { //こどもの日(5月5日なら)
if (($nen > 2006) && ($kokuminf != on) && ($you == 0)) { //こどもの日が日曜なら
$kokuminf = on; //振替休日有りの印を付ける
} print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "子供振替</td>" .$lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($nen < 2007) && ($gatsu == 5) && ($hi == 6) && ($you == 1)) { //こどもの日の振替休日(5月6日が月曜なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "子供振替</td>" .$lcolorPk . $contstpl$pidnt . "</td>\n";//背景を pink に
} elseif (($nen > 2006) && ($kokuminf == on) && ($gatsu == 5) && ($hi == 6)) { //3連祝日のどれかが日曜なら振替休日
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "'>国民振替</td>" . $lcolorPk . $contstpl$pidnt . "</td>\n";//背景を pink に
} elseif (($gatsu == 7) && ($monday == 3) && ($you == 1)) { //海の日(7月の第3月曜なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "海日</td>" .$lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($nen > 2015) && ($gatsu == 8) && ($hi == 11)) { //2016年以降、山の日(8月11日)なら
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "山日</td>" .$lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($nen > 2015) && ($gatsu == 8) && ($hi == 12) && ($you == 1)) { //山の日の振替休日(8月12日が月曜なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "振替</td>" .$lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 9) && ($monday == 3) && ($you == 1)) { //敬老の日(9月の第3月曜なら)
$keiro = $hi; //敬老の日の日付(国民の祝日の有無確認のため) if (($syuubun - $keiro) == 2) { //敬老の日の2日後が秋分の日なら
$kokumin = $syuubun - 1;
} print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . ">敬老</td>" .$lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($kokumin) && (($gatsu == 9) && ($hi == $kokumin))) { //9月の国民の休日が有りなら
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>敬老振替<td rowspan='25'>" . "'</td>" .$lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($nen > 1999 ) && ($gatsu == 9) && ($hi == $syuubun)) { //秋分の日(計算式による)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "秋分</td>" .$lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($nen > 1999 ) && ($gatsu == 9) && ($hi == ($syuubun + 1)) && ($you == 1)) { //秋分の日の振替休日
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "'秋分振替</td>" .$lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 10) && ($monday == 2) && ($you == 1)) { //体育の日(10月の第2月曜なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "体育</td>" .$lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 11) && ($hi == 3)) { //文化の日(11月3日なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "文化</td>" .$lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 11) && ($hi == 4) && ($you == 1)) { //文化の日の振替休日(11月4日が月曜なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "文化振替</td>" .$lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 11) && ($hi == 23)) { //勤労感謝の日(11月23日なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "勤労</td>" . $lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 11) && ($hi == 24) && ($you == 1)) { //勤労感謝の日の振替休日(11月24日が月曜なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "勤労振替</td> \n"; //背景を pink に
} elseif (($gatsu == 12) && ($hi == 23)) { //天皇誕生日(12月23日なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "天皇</td>" .$lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 12) && ($hi == 24) && ($you == 1)) { //天皇誕生日の振替休日(12月24日が月曜なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "天皇振替</td>" . $lcolorPk . $contstpl$pidnt . ")</td>\n"; //背景を pink に
} elseif ($you == 0) { //日曜日なら
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "</td>" . $lcolorPk . $contstpl$pidnt . "</td>\n"; //背景を pink に
} elseif ($you == 6) { //土曜日なら
print $lcolorLb . $hi . "(" . $youbi$you . ")</td>" . $lcolorLb . "</td>" . $lcolorLb . $contstpl$pidnt . "</td>\n";//背景を lightsteelblue に
} else {
print $lordwar . $hi . "(" . $youbi$you . ")</td>" . $lordrow . "</td>" . $lordrow . $contstpl$pidnt . "</td>\n"; //平日表示
}
// stingll adding for ($j = 0; $j <= 23; $j++) {
$hidnt = date("U", mktime($j, 0, 0, $gatsu, $hi, $nen)); //Unix time 取得 配列のサフィックス利用 print "<tr align='right'><td>" . $j . ":00" . "</td><td>" . "ここにIDが入る予定" . "</td></tr>\n"; //24時間の表示
}
$hi++; if (checkdate($gatsu, $hi, $nen) == false) { //+1した日付がありえない日付だったら
break; //繰り返し処理を抜ける
} print "</tr>\n<tr>\n"; //行変えする
} $hi = $hi -1; //行き過ぎた日を1日戻す $you = date("w", mktime(0, 0, 0, $gatsu, $hi, $nen)); //曜日を配列に

} ?>

html_page_bottom1( FILE );

?>

2017-07-25
09:26 vastingll によるコメント

~# cat /var/www/htdocs/mantis/view_all_bug_with_calendar_page.php <?php # Mantis - a php based bugtracking system

# Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org # Copyright (C) 2002 - 2007 Mantis Team - mantisbt-dev@lists.sourceforge.net

# Mantis is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # Mantis is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Mantis. If not, see <http://www.gnu.org/licenses/>.

# -------------------------------------------------------- # $Revision: 1.62.2.1 $ # $Author: giallu $ # $Date: 2007-10-13 22:34:48 $ # # $Id: view_all_bug_page.php,v 1.62.2.1 2007-10-13 22:34:48 giallu Exp $ # --------------------------------------------------------

?> <?php

require_once( 'core.php' );
$t_core_path = config_get( 'core_path' );
require_once( $t_core_path.'compress_api.php' ); require_once( $t_core_path.'filter_api.php' ); require_once( $t_core_path.'last_visited_api.php' );
require_once( $t_core_path.'current_user_api.php' ); require_once( $t_core_path.'bug_api.php' ); require_once( $t_core_path.'string_api.php' ); require_once( $t_core_path.'date_api.php' ); require_once( $t_core_path.'icon_api.php' ); require_once( $t_core_path.'columns_api.php' );

# ------------------functions-------------------------- // tperi = 15 or 30 or <= 60

function DateByMinutes($mode = 'floor',$tmpi = NULL, $tperi = 60) { if (is_null($tmpi) || strlen($tmpi) == 0 ) {
$tmpi = time();
}
if ( !is_numeric($tmpi) || (strlen($tmpi) == 0) ) return "error<br>"; $nen = @date("Y",$tmpi); $gan = @date("n",$tmpi); $dan = @date("j",$tmpi); if ( is_null($tperi) ) $tperi = 540;
if ($mode == 'ceil') {
$minute = sprintf("%02s", ceil(date('i',$tmpi) / $tperi) * $tperi);
} else {
$minute = sprintf("%02s", floor(date('i',$tmpi) / $tperi) * $tperi);
} $time_string = @date("Y-n-j G:i", mktime(date('G',$tmpi), $minute, 0, $gan, $dan, $nen)); return $time_string; }

// tperi = 12 or 24

function DateByHours($mode = 'floor',$tmpi = NULL, $tperi = 360) { if (is_null($tmpi)) {
$tmpi = time(); // 現在時刻のUixTimeを取得
}
$josuu = $tperi/60; if ( !is_numeric($tmpi) || (strlen($tmpi) == 0) ) return "error<br>"; $nen = @date("Y",$tmpi); $gan = @date("n",$tmpi); $dan = @date("j",$tmpi);

// print "02: tmpi, nen, gan, dan: ".$tmpi.", ".$nen.", ".$gan.",".$dan."<br>";

if ($mode == 'ceil') {
$hour = sprintf("%02s", ceil(date('G',$tmpi) / $josuu) * $josuu);

// print "02.5c: minutes, nen, gan, dan: ".$minute.", ".$nen.", ".$gan.",".$dan."<br>";

} else {
$hour = sprintf("%02s", floor(date('G',$tmpi) / $josuu) * $josuu);

// print "02.5f: minutes, nen, gan, dan: ".$minute.", ".$nen.", ".$gan.",".$dan."<br>";

} $time_string = @date("Y-n-j G:i", mktime($hour, 0, 0, $gan, $dan, $nen));
//print "03: tmpi time_string: ".$tmpi.", ".$time_string."<br>";
return $time_string; }

//$peri = 60;

?> <!--<?php auth_ensure_user_authenticated() ?>--> <?php

$f_page_number = gpc_get_int( 'page_number', 1 );
$t_per_page = null; $t_bug_count = null; $t_page_count = null;
$rows = filter_get_bug_rows( $f_page_number, $t_per_page, $t_page_count, $t_bug_count, null, null, null, true ); if ( $rows === false ) {
print_header_redirect( 'view_all_set.php?type=0' );
}
$t_bugslist = Array(); $t_row_count = sizeof( $rows ); for($i=0; $i < $t_row_count; $i++) {
array_push($t_bugslist, $rows$iid );
}
gpc_set_cookie( config_get( 'bug_list_cookie' ), implode( ',', $t_bugslist ) );
compress_enable();
html_page_top1( lang_get( 'view_bugs_link' ) );
if ( current_user_get_pref( 'refresh_delay' ) > 0 ) {
html_meta_redirect( 'view_all_bug_page.php?page_number='.$f_page_number, current_user_get_pref( 'refresh_delay' )*60 );
}
html_page_top2();
print_recently_visited();
if ($_POSTnen) { //"年" がPOSTされてきたら $nen = $_POSTnen; // 日を0表示しないパターン } else { $nen = date("Y"); } if ($_POSTgen) { //"年" がPOSTされてきたら $gen = $_POSTgen; // 日を0表示しないパターン } else { $gen = date("n"); // 今日の月を求める } if ($_POSTped) { //"年" がPOSTされてきたら $ped = $_POSTped; // 日を0表示しないパターン } else { $ped = "540"; // 日を0表示しないパターン }
//print " 年月日:" . $nen . " year". $gen." month<br>";

?>

<H3> <form method="POST" action="view_all_bug_with_calendar_page.php"> <!--<select name="nen"> --> <!--<option <?php if ($nen == "2010") { print "selected";} ?> value="2010">2010</option> --> <!--<option <?php if ($nen == "2011") { print "selected";} ?> value="2011">2011</option> --> <!--<option <?php if ($nen == "2012") { print "selected";} ?> value="2012">2012</option> --> <!--<option <?php if ($nen == "2013") { print "selected";} ?> value="2013">2013</option> --> <!--<option <?php if ($nen == "2014") { print "selected";} ?> value="2014">2014</option> --> <!--<option <?php if ($nen == "2015") { print "selected";} ?> value="2015">2015</option> --> <!--<option <?php if ($nen == "2016") { print "selected";} ?> value="2016">2016</option> --> <!--<option <?php if ($nen == "2017") { print "selected";} ?> value="2017">2017</option> --> <!--<option <?php if ($nen == "2018") { print "selected";} ?> value="2018">2018</option> --> <!--<option <?php if ($nen == "2019") { print "selected";} ?> value="2019">2019</option> --> <!--<option <?php if ($nen == "2020") { print "selected";} ?> value="2020">2020</option> --> <!--<option <?php if ($nen == "2021") { print "selected";} ?> value="2021">2021</option> --> <!--<option <?php if ($nen == "2022") { print "selected";} ?> value="2022">2022</option> --> <!--<option <?php if ($nen == "2023") { print "selected";} ?> value="2023">2023</option> --> <!--<option <?php if ($nen == "2024") { print "selected";} ?> value="2024">2024</option> --> <!--<option <?php if ($nen == "2025") { print "selected";} ?> value="2025">2025</option> --> <!--<option <?php if ($nen == "2026") { print "selected";} ?> value="2026">2026</option> --> <!--<option <?php if ($nen == "2027") { print "selected";} ?> value="2027">2027</option> --> <!--</select> --> <?php print $nen; ?> 年 <!--<select name="gen">--> <!--<option <?php if ($gen == "01") { print "selected";} ?> value="01">01</option>--> <!--<option <?php if ($gen == "02") { print "selected";} ?> value="02">02</option>--> <!--<option <?php if ($gen == "03") { print "selected";} ?> value="03">03</option>--> <!--<option <?php if ($gen == "04") { print "selected";} ?> value="04">04</option>--> <!--<option <?php if ($gen == "05") { print "selected";} ?> value="05">05</option>--> <!--<option <?php if ($gen == "06") { print "selected";} ?> value="06">06</option>--> <!--<option <?php if ($gen == "07") { print "selected";} ?> value="07">07</option>--> <!--<option <?php if ($gen == "08") { print "selected";} ?> value="08">08</option>--> <!--<option <?php if ($gen == "09") { print "selected";} ?> value="09">09</option>--> <!--<option <?php if ($gen == "10") { print "selected";} ?> value="10">10</option>--> <!--<option <?php if ($gen == "11") { print "selected";} ?> value="11">11</option>--> <!--<option <?php if ($gen == "12") { print "selected";} ?> value="12">12</option>--> <!--</select> 月--> <?php print $gen; ?> 月 <select name="ped"> <option <?php if ($ped == "10") { print "selected";} ?> value="10">10分</option> <option <?php if ($ped == "15") { print "selected";} ?> value="15">15分</option> <option <?php if ($ped == "30") { print "selected";} ?> value="30">30分</option> <option <?php if ($ped == "60") { print "selected";} ?> value="60">60分</option> <option <?php if ($ped == "360") { print "selected";} ?> value="360">6時間</option> <option <?php if ($ped == "540") { print "selected";} ?> value="540">9時間</option> <option <?php if ($ped == "720") { print "selected";} ?> value="720">12時間</option> <option <?php if ($ped == "1440") { print "selected";} ?> value="1440">1日</option> </select> 刻み <input type="submit" value="Go"> </form>

</H3>

<?php // BUG-LIST ORG // require_once( $t_core_path.'custom_field_api.php' ); //adding if ($_POSTped) { //"年" がPOSTされてきたら

$tperi = $_POSTped; //POSTの値を受け取って変数に割り当てる

} else {

$tperi = 540; // 1時間刻みの場合「25」(3600s)。30分刻みなら「50」(1800s)、15分刻みなら「100」(900s))

}

// html rawspan 設定値

if ( $tperi == 15) {
$htmlrwsp = 97; // 時刻刻みに応じ、div する間隔を指定する変数
} elseif( $tperi == 30 ) {
$htmlrwsp = 49; // 時刻刻みに応じ、div する間隔を指定する変数
} elseif( $tperi == 60 ) {
$htmlrwsp = 25; // 時刻刻みに応じ、div する間隔を指定する変数
} elseif( $tperi == 360 ) {
$htmlrwsp = 5; // 時刻刻みに応じ、div する間隔を指定する変数
} elseif( $tperi == 540 ) {
$htmlrwsp = 4; // 時刻刻みに応じ、div する間隔を指定する変数
} elseif( $tperi == 720 ) {
$htmlrwsp = 3; // 時刻刻みに応じ、div する間隔を指定する変数
} else {
$htmlrwsp = 1; // 時刻刻みに応じ、div する間隔を指定する変数
}
$afm = 3; // 動作日の月から後何ヶ月表示するか設定する。
$nen = date("Y"); // 表示する日付の制御変数の設定 $nenxt = $nen + 1; // 6ヶ月後が年を超える場合の対処
//$nenpr = $nen -1; // その月が1月の場合、年号を前年にするための変数
$gen = date("n"); // 今日の月を求める $genxt = $gen + $afm; // 表示するための変数、デフォルト今日日付の前の月から6ヶ月後まで表示するための変数

if ( $gen == 1 ) { // 1月だったら変数設定を変える、1月の前月が0月となるため、年と月を修正する

$genpr = 12; $nen = $nenpr;

} else {

$genpr = $gen - 1;

}

$hen = date("j"); // 日を0表示しないパターン

// 範囲外の日付を配列格納しないための前の月の1日UnixTimeを取得 $rangepi = @date("U", mktime(0, 0, 0, $genpr, 1, $nen)); //Unix time 取得 配列のサフィックス利用 //print " Rangepi0 : " . $rangepi ."<BR>";

// include( dirname( FILE ) . DIRECTORY_SEPARATOR . 'view_all_inc.php' );

$t_filter = current_user_get_bug_filter();
if( $t_filter ) {
list( $t_sort, ) = split( ',', $t_filter['sort'] ); list( $t_dir, ) = split( ',', $t_filter['dir'] );
}
$t_checkboxes_exist = false;
$t_icon_path = config_get( 'icon_path' ); $t_update_bug_threshold = config_get( 'update_bug_threshold' );
$t_columns = helper_get_columns_to_view( COLUMNS_TARGET_VIEW_PAGE );
$col_count = sizeof( $t_columns );
$t_filter_position = config_get( 'filter_position' );
# -- ====================== FILTER FORM ========================= -- if ( ( $t_filter_position & FILTER_POSITION_TOP ) == FILTER_POSITION_TOP ) {
filter_draw_selection_area( $f_page_number );
} # -- ====================== end of FILTER FORM ================== --
# -- ====================== BUG LIST ============================ --
$t_status_legend_position = config_get( 'status_legend_position' );
if ( $t_status_legend_position == STATUS_LEGEND_POSITION_TOP || $t_status_legend_position == STATUS_LEGEND_POSITION_BOTH ) {
html_status_legend();
}

# @@@ (thraxisp) this may want a browser check ( MS IE >= 5.0, Mozilla >= 1.0, Safari >=1.2, ...)

if ( ( ON == config_get( 'dhtml_filters' ) ) && ( ON == config_get( 'use_javascript' ) ) ){
?> <script type="text/javascript" language="JavaScript"> <!--
var string_loading = '<?php echo lang_get( 'loading' );?>';
// --> </script> <script type="text/javascript" language="JavaScript" src="javascript/xmlhttprequest.js"></script> <script type="text/javascript" language="JavaScript" src="javascript/addLoadEvent.js"></script> <script type="text/javascript" language="JavaScript" src="javascript/dynamic_filters.js"></script> <?php
}

?> <br /> <form name="bug_action" method="get" action="bug_actiongroup_page.php"> <table id="buglist" class="width100" cellspacing="1"> <tr>

<td class="form-title" colspan="<?php echo $col_count - 2; ?>">
<?php
# -- Viewing range info --
$v_start = 0; $v_end = 0;
if ( sizeof( $rows ) > 0 ) {
if( $t_filter )
$v_start = $t_filter['per_page'] * (int)($f_page_number-1) +1;
else
$v_start = 1;
$v_end = $v_start + sizeof( $rows ) -1;
}
echo lang_get( 'viewing_bugs_title' ); echo " ($v_start - $v_end / $t_bug_count)";
?>
<span class="small">

<?php

# -- Print and Export links --
print_bracket_link( 'print_all_bug_with_calendar_page.php', lang_get( 'print_all_bug_page_link' ) ); echo '&nbsp;'; if ( ON == config_get( 'use_jpgraph' ) ) {
print_bracket_link( 'bug_graph_page.php', lang_get( 'graph_bug_page_link' ) ); echo '&nbsp;';
} print_bracket_link( 'csv_export.php', lang_get( 'csv_export' ) );
print_bracket_link( 'print_all_bug_page_comware.php', lang_get_defaulted( 'comware_export' ) ); print_bracket_link( 'columns_order_page.php', lang_get( 'set_config_sequence' ) );
?>

</span>

</td>
<td class="right" colspan="2">
<span class="small">

<?php

# -- Page number links -- $f_filter = gpc_get_int( 'filter', 0); //print_page_links( 'view_all_bug_page.php', 1, $t_page_count, (int)$f_page_number, $f_filter ); print_page_links( 'view_all_bug_with_calendar_page.php', 1, $t_page_count, (int)$f_page_number, $f_filter );
?>
</span>
</td>

</tr> <?php # -- Bug list column header row -- ?> <tr class="row-category"> <?php

foreach( $t_columns as $t_column ) {
$t_title_function = 'print_column_title'; helper_call_custom_function( $t_title_function, array( $t_column ) );
}

?> </tr>

<?php # -- Spacer row -- ?> <tr class="spacer">

<td colspan="--->

<?php echo $col_count; ?>"></td> </tr> <?php

function anal_bug_rows ( $p_rows ) {
global $t_columns, $t_filter, $objdata;
$t_in_stickies = ( $t_filter && ( 'on' == $t_filter['sticky_issues'] ) );
mark_time( 'begin loop' );
# -- Loop over bug rows --
$t_rows = sizeof( $p_rows ); for( $i=0; $i < $t_rows; $i++ ) {
$t_row = $p_rows$i;
if ( ( 0 == $t_row['sticky'] ) && ( 0 == $i ) ) {
$t_in_stickies = false;
} if ( ( 0 == $t_row['sticky'] ) && $t_in_stickies ) { # demarcate stickies, if any have been shown

?>

<tr>
<td class="left" colspan="<?php echo sizeof( $t_columns ); ?>" bgcolor="#999999">&nbsp;</td>
</tr>

<?php

$t_in_stickies = false;
}
# choose color based on status $status_color = get_status_color( $t_row['status'] );
echo '<tr bgcolor="', $status_color, '" border="1">';
echo '</tr>';
}
}

?>

<?php // 範囲外の日付を配列格納しないための前の月の1日UnixTimeを取得 $rangepi = @date("U", mktime(0, 0, 0, $genpr, 1, $nen)); //Unix time 取得 配列のサフィックス利用 //print " Rangepi : " . $rangepi ."<BR>";

$t_rows = sizeof( $rows ); for( $i=0; $i < $t_rows; $i++ ) {
$t_row = $rows$i;
foreach( $t_columns as $t_column ) {

// $t_value = NULL;

if ( $t_column == "custom_51.(予定)作業開始日" ) {
$t_custom_field = substr( $t_column, 7); $t_field_id = custom_field_get_id_from_name( $t_custom_field ); $t_def = custom_field_get_definition( $t_field_id ); $t_value = custom_field_get_value_legacy($t_field_id, $t_row['id']); if ( $t_value < $rangepi | ($t_value === NULL ) ) {
$lstwarn .= "51:".$t_row['id'] . ":".$t_row['summary']."(".prepare_user_name( $t_row['handler_id'] ).")→<br>\n";
} if ( $tperi > 60 ) {

// print "421:Hours<br>";

$pertm51 = DateByHours('floor',$t_value,$tperi); if ( strpos($pertm51,'error') == true ) continue;
} else {
$pertm51 = DateByMinutes('floor',$t_value,$tperi);
}
// 90000 を $peri で割ると単位秒数となるため以下の式を利用する

// if ( strpos($pertm51,'error') == true ) continue;

$kentoust$pertm51 .= string_get_bug_update_link($t_row['id']) . ":".$t_row['summary']."(".prepare_user_name($t_row['handler_id']).") →<br>\n";
} if ( $t_column == "custom_52.(予定)作業終了日" ) {

// print "<H1>52</H1><br> ";

$t_custom_field = substr( $t_column, 7); $t_field_id = custom_field_get_id_from_name( $t_custom_field ); $t_def = custom_field_get_definition( $t_field_id ); $t_value = custom_field_get_value_legacy($t_field_id, $t_row['id']);

// if ( !is_numeric($t_value) ) next($t_columns);

if ( $t_value < $rangepi | ($t_value === NULL ) ) {
$lstwarn .= "52:<-".$t_row['id'] . ":".$t_row['summary']."(".prepare_user_name( $t_row['handler_id'] ).")<br>\n";

// next($t_columns);

} if ( $tperi > 60 ) {
$pertm52 = DateByHours('floor',$t_value,$tperi);

// if ( strpos($pertm52,'error') == true ) continue;

} else {
$pertm52 = DateByMinutes('floor',$t_value,$tperi);
} //if ( strpos($pertm52,'error') == true ) continue; $fikentou$pertm52 .= "← ".string_get_bug_update_link($t_row['id']).":".$t_row['summary']."(".prepare_user_name($t_row['handler_id']).")<br>";
}
if ( $t_column == "custom_53.(実施)開始予定日時") {
$t_custom_field = substr( $t_column, 7); $t_field_id = custom_field_get_id_from_name( $t_custom_field ); $t_def = custom_field_get_definition( $t_field_id ); $t_value = custom_field_get_value_legacy($t_field_id, $t_row['id']);
if ( $t_value < $rangepi | ($t_value === NULL ) ) {
$lstwarn .= "53:".$t_row['id'] . ":".$t_row['summary']."(".prepare_user_name( $t_row['handler_id'] ).")→<br>\n";
} if ( $tperi > 60 ) {
$pertm53 = DateByHours('floor',$t_value,$tperi);
} else {
$pertm53 = DateByMinutes('floor',$t_value,$tperi);
} $sttm = @date("G:i",$t_value); $constrst$pertm53 .= string_get_bug_update_link($t_row['id']) .":". $t_row['summary']."(". prepare_user_name( $t_row['handler_id'] )."<".$sttm.">) →<br>\n";
}
if ( $t_column == "custom_54.(実施)作業終了日時") {
//print "<H1>54</H1><br> "; $t_custom_field = substr( $t_column, 7); $t_field_id = custom_field_get_id_from_name( $t_custom_field ); $t_def = custom_field_get_definition( $t_field_id ); $t_value = custom_field_get_value_legacy($t_field_id, $t_row['id']);
if ( $t_value < $rangepi | ($t_value === NULL ) ) {
$lstwarn .= "54:←" . $t_row['id'] . ":".$t_row['summary']."(".prepare_user_name( $t_row['handler_id'] ).")<br>\n";
} if ( $tperi > 60 ) {
$pertm54 = DateByHours('floor',$t_value,$tperi);
} else {
$pertm54 = DateByMinutes('floor',$t_value,$tperi);
} $sttm = @date("G:i",$t_value); $constrst$pertm54 .= "←" . string_get_bug_update_link($t_row['id']) .":". $t_row['summary']."(". prepare_user_name( $t_row['handler_id'] )."<".$sttm.">) <br>\n";
}
}
}
echo '</tr>';
//debug
//$rowsnum = sizeof($rows);

// for( $i=0; $i < $rowsnum; $i++ ) { // print_r($rows$i); // print "<br>"; // }

# -- ====================== end of BUG LIST ========================= --
# -- ====================== MASS BUG MANIPULATION =================== --

?>

<tr>
<td class="left" colspan="<?php echo $col_count-2; ?>">

<?php

if ( $t_checkboxes_exist && ON == config_get( 'use_javascript' ) ) {
echo "<input type=\"checkbox\" name=\"all_bugs\" value=\"all\" onclick=\"checkall('bug_action', this.form.all_bugs.checked)\" /><span class=\"small\">" . lang_get( 'select_all' ) . '</span>';
}
if ( $t_checkboxes_exist ) {

?>

<select name="action">
<?php print_all_bug_action_option_list() ?>
</select> <input type="submit" class="button" value="<?php echo lang_get( 'ok' ); ?>" />

<?php

} else {
echo '&nbsp;';
}

?>

</td> <?php # -- Page number links -- ?> <td class="right" colspan="2">
<span class="small">
<?php
$f_filter = gpc_get_int( 'filter', 0); print_page_links( 'view_all_bug_page.php', 1, $t_page_count, (int)$f_page_number, $f_filter );
?>
</span>
</td>
</tr>

<?php # -- ====================== end of MASS BUG MANIPULATION ========================= -- ?> </table> </form>

<?php

mark_time( 'end loop' );
if ( $t_status_legend_position == STATUS_LEGEND_POSITION_BOTTOM || $t_status_legend_position == STATUS_LEGEND_POSITION_BOTH ) {
html_status_legend();
}
# -- ====================== FILTER FORM ========================= -- if ( ( $t_filter_position & FILTER_POSITION_BOTTOM ) == FILTER_POSITION_BOTTOM ) {
filter_draw_selection_area( $f_page_number );
} # -- ====================== end of FILTER FORM ================== --

echo '<br />'; echo '<table class="sampleTable" border="1" cellspacing="1">'; echo '<tr class="row-category">'; echo ' <th width="50">日(曜)</th>'; echo ' <th width="50">祭日名</th>'; echo ' <th width="500">検討開始期間</th>'; echo ' <th width="50">時刻</th>'; echo ' <th width="900">SC-RP工事計画日</th>'; //echo ' <th>SC-RP工事実行日</th>'; echo '</tr>';

$lordwar = "<td width='50' align='center' valign='top' rowspan='". $htmlrwsp . "'>"; //平日の無色設定 $lordwar2 = "<td width='500' align='center' valign='top' rowspan='". $htmlrwsp . "'>"; //平日の無色設定 $lordrow = "<td width='50' valign='top' rowspan='" . $htmlrwsp ."'>"; //平日の無色設定 $lordrow2 = "<td width='500' valign='top' rowspan='" . $htmlrwsp ."'>"; //平日の無色設定 $lcolorPk = "<td width='50' align='center' valign='top' bgcolor='#ffc0cb' rowspan='" . $htmlrwsp . "'>"; //背景を pink に with align(location) and rowspan, peri=25 $lcolorPk2 = "<td width='500' align='center' valign='top' bgcolor='#ffc0cb' rowspan='" . $htmlrwsp . "'>"; //背景を pink に with align(location) and rowspan, peri=25 $coulorPk = "<td width='50' valign='top' bgcolor='#ffc0cb' rowspan='" . $htmlrwsp ."'>"; //背景を pink に with rowspan $coulorPk2 = "<td width='500' valign='top' bgcolor='#ffc0cb' rowspan='" . $htmlrwsp ."'>"; //背景を pink に with rowspan $lcolorDg = "<td width='50' valign='top' id='a0' align='center' bgcolor='#8fbc8f' rowspan='" . $htmlrwsp ."'>"; //背景を darkseagreen に $lcolorDg2 = "<td width='500' valign='top' id='a0' align='center' bgcolor='#8fbc8f' rowspan='" . $htmlrwsp ."'>"; //背景を darkseagreen に $coulorDg = "<td width='50' valign='top' bgcolor='#8fbc8f' rowspan='" . $htmlrwsp ."'>"; //背景を darkseagreen に $coulorDg2 = "<td width='500' valign='top' bgcolor='#8fbc8f' rowspan='" . $htmlrwsp ."'>"; //背景を darkseagreen に $lcolorLb = "<td width='50' align='center' valign='top' bgcolor='#b0c4de' rowspan='" . $htmlrwsp ."'>"; //背景を lightsteelblue に $lcolorLb2 = "<td width='500' align='center' valign='top' bgcolor='#b0c4de' rowspan='" . $htmlrwsp ."'>"; //背景を lightsteelblue に $coulorLb = "<td width='50' valign='top' bgcolor='#b0c4de' rowspan='" . $htmlrwsp ."'>"; //背景を lightsteelblue に $coulorLb2= "<td width='500' valign='top' bgcolor='#b0c4de' rowspan='" . $htmlrwsp ."'>"; //背景を lightsteelblue に

// 今年の西暦をデフォルトとして表示するために事前設定 $youbi = array("日","月","火","水","木","金","土"); //曜日を配列に入れる $tdiv = 0; //テーブルの数を数えるための変数

$month = 1; for ($gatsu = $genpr ; $gatsu <= $genxt; $gatsu++) { //今月から6ヶ月後まで表示

// 1日の曜日を取得して月始まりを判断する $hi = 1; //"日"は 1 から始める if ( $gatsu > 12 ) {
$you = @date("w", mktime(0, 0, 0, $gatsu-12, $hi, $nenxt)); //1日の曜日
$nen = $nenxt; $month = $gatsu - 12;
} else {
$you = @date("w", mktime(0, 0, 0, $gatsu, $hi, $nen)); //1日の曜日 $month = $gatsu;
}
echo '<tr class="row-category">';
print "<tr><br></tr>\n"; //行変えする print "</table><br><td>\n"; print "<H1>" . $nen . "年" . $gatsu . "月</td></H1>\n";
print "<table class=\"sampleTable\" border=\"1\" cellspacing=\"1\">";
$monday = 0; //初期値を 0 として変数 $you を設定 for ($i = $hi; $i < 32; $i++) { //日付に1を足しながら32日まで繰り返し
$you = @date("w", mktime(0, 0, 0, $gatsu, $hi, $nen)); //曜日
$pidnt = $nen."-".$gatsu."-".$hi." 0:00"; //Unix time 取得 配列のサフィックス利用

// print "pidnt : ". $pidnt ; // $pidnt = date("U", mktime(0, 0, 0, $gatsu, $hi, $nen)); //Unix time 取得 配列のサフィックス利用

if ($you == 1) { //月曜日なら$mondayに+1
$monday++;
}
// 曜日祭日の計算と設定
$y2 = ($nen - 2000); $syunbun = (int)(20.69115 + 0.2421904 * $y2 - (int)($y2/4 + $y2/100 + $y2/400)); $syuubun = (int)(23.09000 + 0.2421904 * $y2 - (int)($y2/4 + $y2/100 + $y2/400));
if (($nen == date("Y")) && ($gatsu == date("n")) && ($hi == date("d"))) { //今日なら
print $lcolorDg . $hi . "(<a id=\"" . "本日\">" . $youbi$you . "</a>)</td>" . $coulorDg . "本日</td>" . $lcolorDg2 . $kentoust$pidnt.$fikentou$pidnt ."</td>\n"; //背景を darkseagreen に
} elseif (($gatsu == 1) && ($hi == 1)) { //元日(1月1日なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "元旦</td>" . $lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 1) && ($hi == 2)) { //元日の振替休日(1月2日が月曜なら)
print $lcolorPk . $hi . '(' . $youbi$you . ")</td>" . $coulorPk . "三箇日</td>" . $lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 1) && ($hi == 3)) { //1月3日まで三箇日として休み設定
print $lcolorPk . $hi . '(' . $youbi$you . ")</td>" . $coulorPk . "三箇日</td>" . $lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 1) && ($monday == 2) && ($you == 1)) { //成人の日(1月の第2月曜なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "成人</td>" . $lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 2) && ($hi == 11)) { //建国記念の日(2月11日なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "建国</td>" .$lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 2) && ($hi == 12) && ($you == 1)) { //建国記念の日の振替休日(2月12日が月曜なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>". $coulorPk . "建国振替</td>" .$lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($nen > 1999 ) && ($gatsu == 3) && ($hi == $syunbun)) { //春分の日(計算式による)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "春分</td>" .$lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($nen > 1999 ) && ($gatsu == 3) && ($hi == ($syunbun + 1)) && ($you == 1)) { //春分の日の振替休日
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "春分振替</td>" .$lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($nen < 2007) && ($gatsu == 4) && ($hi == 29)) { //2006年みどりの日(4月29日なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "緑日</td>" .$lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($nen < 2007) && ($gatsu == 4) && ($hi == 30) && ($you == 1)) { //みどりの日の振替休日(4月30日が月曜なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "緑日振替</td>" . $lcolorPk2 . $kentoutst$pidnt . "</td>\n"; //背景を pink に
} elseif (($nen > 2006) && ($gatsu == 4) && ($hi == 29)) { //昭和の日(4月29日なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "昭和</td>" .$lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($nen > 2006) && ($gatsu == 4) && ($hi == 30) && ($you == 1)) { //昭和の日の振替休日(4月30日が月曜なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "'>昭和振替</td>" .$lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 5) && ($hi == 3)) { //憲法記念日(5月3日なら)
if (($nen > 2006) && ($you == 0)) { //憲法記念日が日曜なら
$kokuminf = on; //振替休日有りの印を付ける
} print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "憲法</td>" .$lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif ((($nen < 2007) && ($gatsu == 5) && ($hi == 4) && ($you == 2)) or (($nen < 2007) && ($gatsu == 5) && ($hi == 4) && ($you == 3)) or (($nen < 2007) && ($gatsu == 5) && ($hi == 4) && ($you == 4)) or (($nen < 2007) && ($gatsu == 5) && ($hi == 4) && ($you == 5)) or (($nen < 2007) && ($gatsu == 5) && ($hi == 4) && ($you == 6))) {
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "'>憲法振替</td>" .$lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($nen > 2006) && ($gatsu == 5) && ($hi == 4)) { //2007年以降みどりの日(5月4日なら)
if (($nen > 2006) && ($kokuminf != on) && ($you == 0)) { //みどりの日が日曜なら
$kokuminf = on; //振替休日有りの印を付ける
} print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "緑日</td>" .$lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 5) && ($hi == 5)) { //こどもの日(5月5日なら)
if (($nen > 2006) && ($kokuminf != on) && ($you == 0)) { //こどもの日が日曜なら
$kokuminf = on; //振替休日有りの印を付ける
} print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "子供振替</td>" .$lcolorPk . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($nen < 2007) && ($gatsu == 5) && ($hi == 6) && ($you == 1)) { //こどもの日の振替休日(5月6日が月曜なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "子供振替</td>" .$lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n";//背景を pink に
} elseif (($nen > 2006) && ($kokuminf == on) && ($gatsu == 5) && ($hi == 6)) { //3連祝日のどれかが日曜なら振替休日
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "'>国民振替</td>" . $lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n";//背景を pink に
} elseif (($gatsu == 7) && ($monday == 3) && ($you == 1)) { //海の日(7月の第3月曜なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "海日</td>" .$lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($nen > 2015) && ($gatsu == 8) && ($hi == 11)) { //2016年以降、山の日(8月11日)なら
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "山日</td>" .$lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($nen > 2015) && ($gatsu == 8) && ($hi == 12) && ($you == 1)) { //山の日の振替休日(8月12日が月曜なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "振替</td>" .$lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 9) && ($monday == 3) && ($you == 1)) { //敬老の日(9月の第3月曜なら)
$keiro = $hi; //敬老の日の日付(国民の祝日の有無確認のため) if (($syuubun - $keiro) == 2) { //敬老の日の2日後が秋分の日なら
$kokumin = $syuubun - 1;
} print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "敬老</td>" .$lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($kokumin) && (($gatsu == 9) && ($hi == $kokumin))) { //9月の国民の休日が有りなら
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>敬老振替<td rowspan='25'>" . "'</td>" .$lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($nen > 1999 ) && ($gatsu == 9) && ($hi == $syuubun)) { //秋分の日(計算式による)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "秋分</td>" .$lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($nen > 1999 ) && ($gatsu == 9) && ($hi == ($syuubun + 1)) && ($you == 1)) { //秋分の日の振替休日
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "'秋分振替</td>" .$lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 10) && ($monday == 2) && ($you == 1)) { //体育の日(10月の第2月曜なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "体育</td>" .$lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 11) && ($hi == 3)) { //文化の日(11月3日なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "文化</td>" .$lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 11) && ($hi == 4) && ($you == 1)) { //文化の日の振替休日(11月4日が月曜なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "文化振替</td>" .$lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 11) && ($hi == 23)) { //勤労感謝の日(11月23日なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "勤労</td>" . $lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 11) && ($hi == 24) && ($you == 1)) { //勤労感謝の日の振替休日(11月24日が月曜なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "勤労振替</td> \n"; //背景を pink に
} elseif (($gatsu == 12) && ($hi == 23)) { //天皇誕生日(12月23日なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "天皇</td>" .$lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif (($gatsu == 12) && ($hi == 24) && ($you == 1)) { //天皇誕生日の振替休日(12月24日が月曜なら)
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "天皇振替</td>" . $lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . ")</td>\n"; //背景を pink に
} elseif ($you == 0) { //日曜日なら
print $lcolorPk . $hi . "(" . $youbi$you . ")</td>" . $coulorPk . "</td>" . $lcolorPk2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //背景を pink に
} elseif ($you == 6) { //土曜日なら
print $lcolorLb . $hi . "(" . $youbi$you . ")</td>" . $lcolorLb . "</td>" . $lcolorLb2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n";//背景を lightsteelblue に
} else {
print $lordwar . $hi . "(" . $youbi$you . ")</td>" . $lordrow . "</td>" . $lordrow2 . $kentoust$pidnt.$fikentou$pidnt . "</td>\n"; //平日表示
}
// adding
if ( $tperi == 60 ){
for ($j = 0; $j <= 23 ; $j++) {
//$hidnt = date("U", mktime($j, 0, 0, $month, $hi, $nen)); //Unix time 取得 配列のサフィックス利用 $hidnt = $nen."-".$month."-".$hi." ".$j.":00"; //Unix time 取得 配列のサフィックス利用 print "<tr align='center'><td>" . $j . ":00" . "</td><td width='900'>" . $constrst$hidnt . "</td></tr>\n"; //24時間の表示

// print "constr25(value,date) :" .$hidnt.":". date("Y年m月d日 G:i:s", $hidnt). "<br>";

}
} elseif ( $tperi == 30 ){
for ($j = 0; $j <= 23 ; $j++) {
for ($k = 0 ; $k < 2; $k++ ) { // $hidnt = date("U", mktime($j, $k*30, 0, $month, $hi, $nen)); //Unix time 取得 配列のサフィックス利用
$minute = sprintf("%02d",$k*30);
$hidnt = $nen."-".$month."-".$hi." ".$j.":".$minute; //Unix time 取得 配列のサフィックス利用

// print "constr50(value,date) :" .$hidnt.":". date("Y年m月d日 G:i:s", $hidnt). "<br>";

print "<tr align='center'><td>" . $j . ":". $minute . "</td><td width='900'>" . $constrst$hidnt. "</td></tr>\n"; //24時間の表示、30分刻み
}
}
} elseif ( $tperi == 15 ) {
for ($j = 0; $j <= 23 ; $j++) {
for ($l = 0 ; $l < 4; $l++ ) {
//$hidnt = date("U", mktime($j, $l*15, 0, $month, $hi, $nen)); //Unix time 取得 配列のサフィックス利用 $minute = sprintf("%02d",$l*15);
$hidnt = $nen."-".$month."-".$hi." ".$j.":".$minute; //Unix time 取得 配列のサフィックス利用

// print "constr100(value,date) :" .$hidnt.":". date("Y年m月d日 G:i:s", $hidnt). "<br>"; // if ($hidnt == 1498536000 ) { // print "constr100(value,date) :" .$hidnt.":". date("Y年m月d日 G:i:s", $hidnt). $constrst$hidnt. "<br>"; // }

print "<tr align='center'><td>" . $j . ":". $minute . "</td><td width='900'>" . $constrst$hidnt. "</td></tr>\n"; //24時間の表示、15分刻み
}
}
} elseif ( $tperi == 360 ) {
for ($k = 0 ; $k < 4; $k++ ) {
if ( $k == 0 ) {
$hidnt = $nen."-".$month."-".$hi." 0:00"; //Unix time 取得 配列のサフィックス利用
print "<tr align='center'><td>0:00</td><td width='900'>" . $constrst$hidnt. "</td></tr>\n"; //24時間の表示、30分刻み
} elseif ( $k == 1 ) {
$hidnt = $nen."-".$month."-".$hi." 6:00"; //Unix time 取得 配列のサフィックス利用
print "<tr align='center'><td>6:00</td><td width='900'>" . $constrst$hidnt. "</td></tr>\n"; //24時間の表示、30分刻み
} elseif ( $k == 2 ) {
$hidnt = $nen."-".$month."-".$hi." 12:00"; //Unix time 取得 配列のサフィックス利用
print "<tr align='center'><td>12:00</td><td width='900'>" . $constrst$hidnt. "</td></tr>\n"; //24時間の表示、30分刻み
} else {
$hidnt = $nen."-".$month."-".$hi." 18:00"; //Unix time 取得 配列のサフィックス利用
print "<tr align='center'><td>18:00</td><td width='900'>" . $constrst$hidnt. "</td></tr>\n"; //24時間の表示、30分刻み
}
}
} elseif ( $tperi == 540 ) {
for ($m = 0 ; $m < 3; $m++ ) {
if ( $m == 0 ) {
$hidnt = $nen."-".$month."-".$hi." 0:00"; //Unix time 取得 配列のサフィックス利用
print "<tr align='center'><td>0:00</td><td width='900'>" . $constrst$hidnt. "</td></tr>\n"; //24時間の表示、30分刻み
} elseif ( $m == 1 ) {
$hidnt = $nen."-".$month."-".$hi." 9:00"; //Unix time 取得 配列のサフィックス利用
print "<tr align='center'><td>9:00</td><td width='900'>" . $constrst$hidnt. "</td></tr>\n"; //24時間の表示、30分刻み
} else {
$hidnt = $nen."-".$month."-".$hi." 18:00"; //Unix time 取得 配列のサフィックス利用
print "<tr align='center'><td>18:00</td><td width='900'>" . $constrst$hidnt. "</td></tr>\n"; //24時間の表示、30分刻み
}
}
} elseif ( $tperi == 720 ) {
for ($l = 0 ; $l < 2; $l++ ) {
if ( $l == 0 ) {
$hidnt = $nen."-".$month."-".$hi." 0:00"; //Unix time 取得 配列のサフィックス利用
print "<tr align='center'><td>00:00</td><td width='900'>" . $constrst$hidnt. "</td></tr>\n"; //24時間の表示、30分刻み
} else {
$hidnt = $nen."-".$month."-".$hi." 12:00"; //Unix time 取得 配列のサフィックス利用
print "<tr align='center'><td>12:00</td><td width='900'>" . $constrst$hidnt. "</td></tr>\n"; //24時間の表示、30分刻み
}
}
} else {
$hidnt = date("U", mktime(0, 0, 0, $month, $hi, $nen)); //Unix time 取得 配列のサフィックス利用 print "<td>全日</td><td width='900'>" . $constrst$hidnt. "</td>\n"; //24時間の表示、15分刻み
}
$hi++; if (checkdate($gatsu, $hi, $nen) == false) { //+1した日付がありえない日付だったら
break; //繰り返し処理を抜ける
} print "</tr>\n<tr>\n"; //行変えする
} $hi = $hi -1; //行き過ぎた日を1日戻す $you = date("w", mktime(0, 0, 0, $gatsu, $hi, $nen)); //曜日を配列に

}

html_page_bottom1( FILE ); print $lstwarn;

?>

2017-06-19
13:13 チケット(#50690) view_all_bug_with_calendar.php を作成しました (vastingll)