[root@moodle mod_tmp]# diff -urNwbBE mrbs/web/trailer.php ../blocks/mrbs/web/trailer.php --- mrbs/web/trailer.php 2012-10-21 19:24:42.000000000 +0800 +++ ../blocks/mrbs/web/trailer.php 2014-08-08 10:14:44.113281218 +0800 @@ -18,8 +18,6 @@ require_once(dirname(dirname(dirname(dirname(__FILE__)))).'/config.php'); if ( $pview != 1 ) { -echo "<P><HR><B>".get_string('viewday','block_mrbs').":</B>\n"; - if(!isset($year)) $year = strftime("%Y");
@@ -33,7 +31,7 @@ $params = array(); else $params = array('area'=>$area); - +/* for($i = -6; $i <= 7; $i++) { $ctime = mktime(0, 0, 0, $month, $day + $i, $year);
@@ -45,12 +43,12 @@ $cday = date("d", $ctime); if ($i != -6) echo " | "; if ($i == 0) echo '<b>[ '; - $url = new moodle_url('/blocks/mrbs/web/day.php', array_merge(array('year'=>$cyear, 'month'=>$cmonth, 'day'=>$cday), $params)); + $url = new moodle_url('/blocks/mrbs/web/week.php', array_merge(array('year'=>$cyear, 'month'=>$cmonth, 'day'=>$cday), $params)); echo "<a href=\"".$url."\">$str</a>\n"; if ($i == 0) echo ']</b> '; } - -echo "<BR><B>".get_string('viewweek','block_mrbs').":</B>\n"; +*/ +echo "<HR><B>".get_string('viewweek','block_mrbs').":</B>\n"; if (!empty($room)) { if (is_object($room)) {
@@ -63,8 +61,7 @@ $ctime = mktime(0, 0, 0, $month, $day, $year); // How many days to skip back to first day of week: $skipback = (date("w", $ctime) - $weekstarts + 7) % 7; - -for ($i = -4; $i <= 4; $i++) +for ($i = -18; $i <= 18; $i++) //dywang { $ctime = mktime(0, 0, 0, $month, $day + 7 * $i - $skipback, $year); @@ -72,7 +69,7 @@ $cday = date("d", $ctime); $cmonth = date("m", $ctime); $cyear = date("Y", $ctime); - if ($i != -4) echo " | "; + if ($i != -18) echo " | "; if ($view_week_number) {
@@ -88,6 +85,7 @@ if ($i == 0) echo ']</b> '; } +/* echo "<BR><B>".get_string('viewmonth','block_mrbs').":</B>\n"; for ($i = -2; $i <= 6; $i++) { @@ -102,10 +100,10 @@ echo "<a href=\"".$url."\">$str</a>\n"; if ($i == 0) echo ']</b> '; } - +*/
echo "<HR>"; $thisurl = new moodle_url($PAGE->url, array('pview'=>1)); -echo '<p><center><a href="'.$thisurl.'">' . get_string('ppreview','block_mrbs') . '</a></center><p>'; }