if ($m > 12) { $m -= 12; $y++; } $cal = new CALENDAR($y, $m); $cal->offset = $offset; $cal->weekNumbers = $weeks; $cal->tFontSize = 16; $cal->hFontSize = 13; $cal->dFontSize = 13; $cal->wFontSize = 13; echo $cal->create() . '<br>'; $y = $year; $m = $month + 2; if ($m > 12) { $m -= 12; $y++; } $cal = new CALENDAR($y, $m); $cal->offset = $offset; $cal->weekNumbers = $weeks; $cal->tFontSize = 16; $cal->hFontSize = 13; $cal->dFontSize = 13; $cal->wFontSize = 13; echo $cal->create(); ?> </td> </tr></table> </center></body> </html>
$res = $mdb2->query("\n SELECT ud.datum, n.title, d.name, u.cegnev\n FROM iShark_Users_Add2 AS ud\n\t\t\tLEFT JOIN iShark_Users AS u ON u.user_id = ud.user_id\n WHERE ud.user_id = '" . $_SESSION["user_id"] . "'\n "); $textlist = ""; $cegnev = ""; foreach ($res->fetchAll() as $value) { $cegnev = $value["cegnev"]; $dateExp = explode("-", $value["datum"]); if ($dateExp[1] == $prevmonth && $dateExp[0] == $prevyear) { $cal_prev->viewEvent($dateExp[2], $dateExp[2], "#A0B0C0", $value["title"] . " - " . $value["name"]); } if ($dateExp[1] == $month && $dateExp[0] == $year) { $cal->viewEvent($dateExp[2], $dateExp[2], "#A0B0C0", $value["title"] . " - " . $value["name"]); } if ($dateExp[1] == $nextmonth && $dateExp[0] == $nextyear) { $cal_next->viewEvent($dateExp[2], $dateExp[2], "#A0B0C0", $value["title"] . " - " . $value["name"]); } $textlist .= $value["datum"] . ' ' . $value["title"] . ' - ' . $value["name"] . '<br />'; } $tpl->assign("cal_prev", $cal_prev->create()); $tpl->assign("cal", $cal->create()); $tpl->assign("cal_next", $cal_next->create()); $tpl->assign("prevlink_year", $prevlink_year); $tpl->assign("prevlink_month", $prevlink_month); $tpl->assign("nextlink_year", $nextlink_year); $tpl->assign("nextlink_month", $nextlink_month); $tpl->assign("cegnev", $cegnev); $tpl->assign("textlist", $textlist); } } else { $site_errors[] = array('text' => $locale->get('error_not_act'), 'link' => 'javascript:history.back(-1)'); return; }