function awec_post_process_events(&$events, &$out) { global $ec_today, $ec_tomorrow, $locale, $awec_settings; $count = 0; $current = 'others'; $path_event = INFUSIONS . 'aw_ecal_panel/view_event.php?id='; $path_birthday = INFUSIONS . 'aw_ecal_panel/birthday.php?id='; $show_details = $awec_settings['show_today_in_panel'] ? true : false; foreach ($events as $year => $y_data) { ksort($y_data, SORT_NUMERIC); foreach ($y_data as $month => $m_data) { ksort($m_data, SORT_NUMERIC); $today_month = $ec_today['mon'] == $month && $ec_today['year'] == $year; $tomorrow_month = $ec_tomorrow['mon'] == $month && $ec_tomorrow['year'] == $year; foreach ($m_data as $mday => $d_data) { if ($today_month && $ec_today['mday'] == $mday) { $current = 'today'; } else { if ($tomorrow_month && $ec_tomorrow['mday'] == $mday) { $current = 'tomorrow'; } else { $current = 'others'; } } foreach ($d_data as $ev) { $item = ''; if ($current != 'others') { if ($ev['start_time']) { $item .= $ev['start_time']; if ($ev['end_time']) { $item .= '-' . $ev['end_time']; } $item .= ' '; } } else { $item .= ec_format_fucking_date($year, $month, $mday) . ' '; } if ($ev['is_birthday']) { $path = $path_birthday . $ev['user_id']; } else { $path = $path_event . $ev['ev_id']; } $item .= '<a href="' . $path . '">' . $ev['ev_title'] . '</a>'; if ($show_details && $current == 'today') { $body = parseubb($ev['ev_body']); $body = explode(stripinput(AWEC_BREAK), $body); if (count($body) > 1) { $body[0] .= ' <a href="' . $path . '">' . $locale['EC207'] . '</a>'; } $item .= '<br /><span class="small2">' . $body[0] . '</span>'; } $out[$current][] = $item; ++$count; } } } } return $count; }
$sel_post_group .= ' <option value="' . $gid . '"' . ($gid == $awec_settings['post_group'] ? ' selected="selected"' : '') . '>' . $gname . '</option>'; } $sel_default_month_view = ''; foreach ($locale['awec_month_view'] as $key => $title) { $sel_default_month_view .= ' <option value="' . $key . '"' . ($key == $awec_settings['default_month_view'] ? ' selected="selected"' : '') . '>' . $title . '</option>'; } $sel_default_calendar_view = ''; foreach ($locale['awec_calendar_view'] as $key => $title) { $sel_default_calendar_view .= ' <option value="' . $key . '"' . ($key == $awec_settings['default_calendar_view'] ? ' selected="selected"' : '') . '>' . $title . '</option>'; } $res = dbquery("SELECT\n\tDATE_FORMAT(NOW(), '" . $awec_settings['birthdate_fmt'] . "') AS b_date,\n\tDATE_FORMAT(NOW(), '" . $awec_settings['date_fmt'] . "') AS s_date,\n\tTIME_FORMAT(NOW(), '" . $awec_settings['time_fmt'] . "') AS s_time\n\t"); $fmt_sample = dbarray($res); $fmt_sample['sidedate_fmt'] = ec_format_fucking_date(date('Y'), date('m'), date('d')); echo ' <form method="post" action="' . FUSION_SELF . '"> <table width="100%" cellspacing="1" border="0"> <colgroup> <col width="150" /> <col width="*" /> </colgroup> <tbody> <tr> <td>' . $locale['EC701'] . ':</td> <td> <select name="edit_group" class="textbox">' . $sel_edit_group . ' </select> </td> </tr>