if (<?php if ($_GET["b"] == 1) { echo '1'; } else { echo '0'; } ?> == 1) window.opener.porciento(parseInt(idate)); window.close(); } </script> <table border="0" cellspacing="0" cellpadding="3" width="100%"> <tr> <?php for ($i = 0; $i < 12; $i++) { $this_month->setMonth($i + 1); echo "\n\t<td width=\"8%\">" . "<a href=\"index.php?m=public&a=calendar&dialog=1&callback={$callback}&date=" . $this_month->format(FMT_TIMESTAMP_DATE) . "&uts={$prev_date}\" class=\"\">" . substr($this_month->format('%b'), 0, 1) . "</a>" . "</td>"; } ?> </tr> <tr> <?php echo "\n\t<td colspan=\"6\" align=\"left\">"; echo "<a href=\"index.php?m=public&a=calendar&dialog=1&callback={$callback}&date=" . $cal->prev_year->format(FMT_TIMESTAMP_DATE) . "&uts={$prev_date}\" class=\"\">" . $cal->prev_year->getYear() . "</a>"; echo "</td>"; echo "\n\t<td colspan=\"6\" align=\"right\">"; echo "<a href=\"index.php?m=public&a=calendar&dialog=1&callback={$callback}&date=" . $cal->next_year->format(FMT_TIMESTAMP_DATE) . "&uts={$prev_date}\" class=\"\">" . $cal->next_year->getYear() . "</a>"; echo "</td>"; ?> </tr> </table>
$current_date = new CDate(); $AppUI->setState('TimecardMonthlyMonth', $current_date->getMonth()); } $month = $AppUI->getState('TimecardMonthlyMonth'); if ($show_other_worksheets) { if (isset($_GET['user_id'])) { $AppUI->setState('TimecardMonthlyUserId', $_GET['user_id']); } else { $AppUI->setState('TimecardMonthlyUserId', $AppUI->user_id); } $user_id = $AppUI->getState('TimecardMonthlyUserId') ? $AppUI->getState('TimecardMonthlyUserId') : 0; } else { $user_id = $AppUI->user_id; } $start_report = new CDate(); $start_report->setMonth($month); $start_report->setYear($year); $start_report->setDay(1); $start_report->setTime(0, 0, 0); $end_report = new CDate(); $end_report->copy($start_report); $end_report->addMonths(1); $end_report->addDays(-1); $end_report->setTime(23, 59, 59); //Get hash of users $sql = "SELECT user_id, contact_email, concat(contact_last_name,' ',contact_first_name) as name FROM users LEFT JOIN contacts AS c ON users.user_contact = contact_id ORDER BY contact_last_name, contact_first_name;"; $result = db_loadList($sql); $people = array(); // users list foreach ($result as $row) { $people[$row['user_id']] = $row;
window.location = './index.php?m=calendar&a=day_view&date='+uts; } function clickWeek( uts, fdate ) { window.location = './index.php?m=calendar&a=week_view&date='+uts; } </script> <?php // establish the focus 'date' if (!$date) { $date = new CDate(); } else { $date = new CDate($date); } $date->setDay(1); $date->setMonth(1); $prev_year = $date->format(FMT_TIMESTAMP_DATE); $prev_year = (int) ($prev_year - 10000); $next_year = $date->format(FMT_TIMESTAMP_DATE); $next_year = (int) ($next_year + 10000); ?> <table class="std" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="center"> <table width="100%" cellspacing="0" cellpadding="4"> <tr> <td colspan="20" valign="top"> <table border="0" cellspacing="1" cellpadding="2" width="100%" class="motitle"> <tr> <td> <a href="<?php