@@ -253,7 +253,7 @@ function draw_search($template_p) {
253
253
}#end draw_search
254
254
255
255
function draw_week ($ template_p ) {
256
- global $ phpiCal_config , $ start_week_time , $ getdate , $ cal , $ master_array , $ dateFormat_week_list , $ current_view , $ day_array , $ timeFormat, $ timeFormat_small ;
256
+ global $ phpiCal_config , $ start_week_time , $ getdate , $ cal , $ master_array , $ dateFormat_week_list , $ current_view , $ day_array , $ timeFormat ;
257
257
258
258
// Figure out colspans and initialize weekarray
259
259
$ thisdate = $ start_week_time ;
@@ -306,6 +306,10 @@ function draw_week($template_p) {
306
306
while ($ day < $ phpiCal_config ->week_length ){
307
307
$ colspan = 0 ;
308
308
$ replace .= $ loop_begin ; # <td>
309
+
310
+ if ($ weekarray [$ day ] == $ getdate ) $ replace = str_replace ('{TODAY} ' , "rowToday " , $ replace );
311
+ $ replace = str_replace ('{TODAY} ' , "rowOff " , $ replace );
312
+
309
313
if (array_search ($ weekarray [$ day ], $ allday_uids )){
310
314
$ uid = array_search ($ weekarray [$ day ], $ allday_uids );
311
315
unset($ allday_uids [$ uid ]);
@@ -464,9 +468,14 @@ function draw_week($template_p) {
464
468
} else {
465
469
$ class = '' ;
466
470
$ dayborder = 0 ;
467
- }
471
+ }
472
+ $ tclass = $ class ;
473
+ if ($ thisday == $ getdate ) {
474
+ if ($ tclass ) $ tclass = ' class="weekborder weektoday" ' ;
475
+ else $ tclass = ' class="weektoday" ' ;
476
+ }
468
477
$ drawWidth = 1 ;
469
- $ weekdisplay .= '<td colspan=" ' . $ nbrGridCols [$ thisday ] . '" ' . $ class . '> </td> ' ."\n" ;
478
+ $ weekdisplay .= '<td colspan=" ' . $ nbrGridCols [$ thisday ] . '" ' . $ tclass . '> </td> ' ."\n" ;
470
479
} else {
471
480
# have events
472
481
$ emptyWidth = $ nbrGridCols [$ thisday ];
@@ -478,13 +487,18 @@ function draw_week($template_p) {
478
487
switch ($ el ["state " ]) {
479
488
case "begin " :
480
489
if ($ ended_counter ) {
481
- $ weekdisplay .= '<td colspan=" ' . $ ended_counter . '" ' .$ class .'> </td> ' ;
490
+ $ tclass = $ class ;
491
+ if ($ thisday == $ getdate ) {
492
+ if ($ tclass ) $ tclass = ' class="weekborder weektoday" ' ;
493
+ else $ tclass = ' class="weektoday" ' ;
494
+ }
495
+ $ weekdisplay .= '<td colspan=" ' . $ ended_counter . '" ' . $ tclass . '> </td> ' ;
482
496
$ ended_counter = 0 ;
483
497
}
484
498
$ event_length [$ thisday ][$ i ]["state " ] = "started " ;
485
499
$ uid = $ event_length [$ thisday ][$ i ]["key " ];
486
500
$ event_start = $ this_time_arr [$ uid ]['start_unixtime ' ];
487
- $ event_start = date ($ timeFormat_small , $ event_start );
501
+ $ event_start = date ($ timeFormat , $ event_start );
488
502
$ event_calno = $ this_time_arr [$ uid ]['calnumber ' ];
489
503
$ event_status = strtolower ($ this_time_arr [$ uid ]['status ' ]);
490
504
$ event_recur = $ this_time_arr [$ uid ]['recur ' ];
@@ -510,7 +524,12 @@ function draw_week($template_p) {
510
524
break ;
511
525
case "started " :
512
526
if ($ ended_counter ) {
513
- $ weekdisplay .= '<td colspan=" ' . $ ended_counter . '" ' .$ class .'> </td> ' ;
527
+ $ tclass = $ class ;
528
+ if ($ thisday == $ getdate ) {
529
+ if ($ tclass ) $ tclass = ' class="weekborder weektoday" ' ;
530
+ else $ tclass = ' class="weektoday" ' ;
531
+ }
532
+ $ weekdisplay .= '<td colspan=" ' . $ ended_counter . '" ' . $ tclass . '> </td> ' ;
514
533
$ ended_counter = 0 ;
515
534
}
516
535
break ;
@@ -528,7 +547,12 @@ function draw_week($template_p) {
528
547
$ emptyWidth += $ ended_counter ;
529
548
//fill empty space on the right
530
549
if ($ emptyWidth > 0 ) {
531
- $ weekdisplay .= "<td colspan= \"" . $ emptyWidth . "\" $ class> </td> \n" ;
550
+ $ tclass = $ class ;
551
+ if ($ thisday == $ getdate ) {
552
+ if ($ tclass ) $ tclass = ' class="weekborder weektoday" ' ;
553
+ else $ tclass = ' class="weektoday" ' ;
554
+ }
555
+ $ weekdisplay .= "<td colspan= \"" . $ emptyWidth . "\"$ tclass> </td> \n" ;
532
556
}
533
557
while (isset ($ event_length [$ thisday ][(sizeof ($ event_length [$ thisday ]) - 1 )]["state " ]) && $ event_length [$ thisday ][(sizeof ($ event_length [$ thisday ]) - 1 )]["state " ] == "ended " ) {
534
558
array_pop ($ event_length [$ thisday ]);
@@ -981,7 +1005,7 @@ function draw_month($template_p, $offset = '+0', $type) {
981
1005
$ start2 = date ($ timeFormat_small , $ val ['start_unixtime ' ]);
982
1006
if ($ type == 'large ' ) {
983
1007
$ switch ['EVENT ' ] .= '<div class="V9"><img src="templates/ ' .$ phpiCal_config ->template .'/images/monthdot_ ' .$ event_calno .'.gif" alt="" width="9" height="9" border="0" /> ' ;
984
- $ switch ['EVENT ' ] .= openevent ($ daylink , $ cal_time , $ uid , $ val , $ phpiCal_config ->month_event_lines , 10 , 'ps3 ' , "$ start2 " ). '' ;
1008
+ $ switch ['EVENT ' ] .= openevent ($ daylink , $ cal_time , $ uid , $ val , $ phpiCal_config ->month_event_lines , 10 , 'ps3 ' , "<span style= \" font-weight: bold; \" > $ start2</span> " );
985
1009
$ switch ['EVENT ' ] .= (isset ($ val ['location ' ]) && $ val ['location ' ] != '' && $ phpiCal_config ->month_locations == 'yes ' ) ? "<br /> " .$ val ['location ' ]."<br /> " : '' ;
986
1010
$ switch ['EVENT ' ] .= '</div> ' ;
987
1011
} else {
@@ -1033,7 +1057,7 @@ function nosearch() {
1033
1057
}
1034
1058
1035
1059
function monthbottom () {
1036
- global $ phpiCal_config , $ getdate , $ master_array , $ this_year , $ this_month , $ cal , $ timeFormat , $ timeFormat_small , $ dateFormat_week_list , $ lang ;
1060
+ global $ phpiCal_config , $ getdate , $ master_array , $ this_year , $ this_month , $ cal , $ timeFormat , $ dateFormat_week_list , $ lang ;
1037
1061
preg_match ("!<\!-- loop showbottomevents_odd on -->(.*)<\!-- loop showbottomevents_odd off -->!Uis " , $ this ->page , $ match1 );
1038
1062
preg_match ("!<\!-- loop showbottomevents_even on -->(.*)<\!-- loop showbottomevents_even off -->!Uis " , $ this ->page , $ match2 );
1039
1063
0 commit comments