/****************************************************** ' System :Eco-footprint 会員ページ ' Content:今日の実績入力(灯油) '******************************************************/ $top = '.'; $inc = "$top/../inc"; include("$inc/common.php"); include("$inc/database.php"); $inc = "$top/inc"; include("$inc/result_input.php"); include("$inc/mypage.php"); // commitフラグをチェックして表示を変える function commit_check($column, $column_name, $flag, $size, $maxlength) { if ($flag) return $column; else return ""; } // ゼロ→null function zero_to_null($num) { if ($num == 0) return ''; else return $num; } // セッション処理 if (!$_SESSION['ss_result_input']) $_SESSION['ss_result_input'] = new result_input; $reg = &$_SESSION['ss_result_input']; $reg->get_ym(); $reg->get_member_info(); $reg->read_db(); $reg->get_last_day($reg->bd_y, $reg->bd_m); $ol_use = explode(',', $reg->ol_use); $ol_sum = explode(',', $reg->ol_sum); // やっぱり入力する if ($inp == 'on' && $reg->commit_flag == 0) { $sql = "UPDATE t_base_data SET bd_ol_inp_cd=null WHERE bd_seq_no=" . $reg->bd_seq_no; db_exec($sql); } // 設定ページ表示確認 $reg->disp_page('ol'); // カレンダー処理 define('DAY_SEC', 24*60*60); $today = getdate(); $year = $reg->bd_y; $month = $reg->bd_m; $d = strtotime("$year/$month/1"); $st = $d - date('w', $d) * DAY_SEC; $d = strtotime("$year/" . ($month + 1) . "/1"); $ed = $d + (6 - date('w', $d)) * DAY_SEC; ?>