if ( !defined('IN_MYEVENT') )
{
die("You are not allowed to access this page directly !");
}
include_once $myevent_path."config.php";
include_once $myevent_path.'lang_slo.php';
include_once $myevent_path."includes/template.php" ;
if (@phpversion() >= '5.0.0' && (!@ini_get('register_long_arrays') || @ini_get('register_long_arrays') == '0' || strtolower(@ini_get('register_long_arrays')) == 'off'))
{
$HTTP_POST_VARS = $_POST;
$HTTP_GET_VARS = $_GET;
$HTTP_SERVER_VARS = $_SERVER;
$HTTP_COOKIE_VARS = $_COOKIE;
$HTTP_ENV_VARS = $_ENV;
$HTTP_POST_FILES = $_FILES;
// _SESSION is the only superglobal which is conditionally set
if (isset($_SESSION))
{
$HTTP_SESSION_VARS = $_SESSION;
}
}
// Protect against GLOBALS tricks
if (isset($HTTP_POST_VARS['GLOBALS']) || isset($HTTP_POST_FILES['GLOBALS']) || isset($HTTP_GET_VARS['GLOBALS']) || isset($HTTP_COOKIE_VARS['GLOBALS']))
{
die("Ne hekat! ! IP zabeležen.");
}
if (isset($_POST['GLOBALS']) || isset($_FILES['GLOBALS']) || isset($_GET['GLOBALS']) || isset($_COOKIE['GLOBALS']) || isset($_REQUEST['GLOBALS'] ))
{
die("Ne hekat! ! IP zabeležen.");
}
if (isset($_SESSION) && !is_array($_SESSION))
{
die("Ne hekat! ! IP zabeležen.");
}
if (isset($_GET['eventdate']))
{ $eventdate = htmlspecialchars($_GET['eventdate']);
// change dateformat
if ( $dateformat == 1) {
list($yyyy, $mm, $dd) = explode('-',$eventdate); }
else { list($dd, $mm, $yyyy ) = explode('-',$eventdate); }
$monthno = $mm;
$year = $yyyy;
$displaydate = date('d M Y', mktime(0,0,0,$mm,$dd,$yyyy));
$eventdate = $yyyy."-".$mm."-".$dd;
$imageno = $dd ;
}
else
{
$today = date('Y-m-d', time());
$eventdate = $today;
// list($yyyy, $mm, $dd) = explode('-',$eventdate);
$monthno = date('n', time());
$year = date('Y', time());
$displaydate = date('d M Y', time());
$imageno = date('d', time());
}
if (isset($_GET['monthno']) )
{ $monthno = intval(htmlspecialchars($_GET['monthno'])); }
elseif (!isset($monthno) )
{ $monthno= date('n', time()); }
if (isset($_GET['year']) or isset($_GET['year']))
{ $year = intval(htmlspecialchars($_GET['year'])); }
elseif (!isset($year) )
{ $year = date('Y', time()); }
if (isset($_GET['view']))
{ $view = htmlspecialchars($_GET['view']);
}
else
{ $view = 0; }
$monthfulltext = date("F", mktime(0, 0, 0, $monthno, 1, $year));
$monthshorttext = date("M", mktime(0, 0, 0, $monthno, 1, $year));
$day_in_mth = date("t", mktime(0, 0, 0, $monthno, 1, $year)) ;
$day_text = date("D", mktime(0, 0, 0, $monthno, 1, $year));
$today = date('Y-m-d', time());
//$template = new Template('./templates/') ;
?>
Današnji dogodki |
|
Datum: |
Na ta dan ni vnešenih nobenih dogodkov! |
|
Dec |
|
|
$monthchange = $monthno - 1;
$yearchange = $year;
if($monthchange == 0) {
$monthchange = 12;
$yearchange = $year - 1;
} else {
$yearchange = $year;
}
?>
" /> |
echo $lang["$monthfulltext"] . " " . $year ?> |
$monthchange = $monthno + 1;
if($monthchange == 13) {
$monthchange = 1;
$yearchange = $year + 1;
} else {
$yearchange = $year;
}
?>
" /> |
if($sundayfirst) { ?>
echo $lang['Sun']; ?> |
echo $lang['Mon']; ?> |
echo $lang['Tue']; ?> |
echo $lang['Wed']; ?> |
echo $lang['Thu']; ?> |
echo $lang['Fri']; ?> |
echo $lang['Sat']; ?> |
} else { ?>
echo $lang['Mon']; ?> |
echo $lang['Tue']; ?> |
echo $lang['Wed']; ?> |
echo $lang['Thu']; ?> |
echo $lang['Fri']; ?> |
echo $lang['Sat']; ?> |
echo $lang['Sun']; ?> |
} ?>
$day_of_wk = date("w", mktime(0, 0, 0, $monthno, 1, $year));
if($sundayfirst) {
if($day_of_wk <> 0) {
for($i = 0; $i < $day_of_wk; $i++) { ?>
|
}
}
} else {
if($day_of_wk == 0) {
$day_of_wk = 7;
}
if($day_of_wk != 1) {
for($i = 1; $i < $day_of_wk; $i++) { ?>
|
}
}
}
for($date_of_mth = 1; $date_of_mth <= $day_in_mth; $date_of_mth++) {
$date_no = date("j", mktime(0, 0, 0, $monthno, $date_of_mth, $year));
$day_of_wk = date("w", mktime(0, 0, 0, $monthno, $date_of_mth, $year));
if(!$sundayfirst) {
if($day_of_wk == 0)
$day_of_wk = 7;
}
$currentdate = date("Y-m-j", mktime(0, 0, 0, $monthno, $date_of_mth, $year));
$sql = "SELECT t1.* FROM event t1 WHERE t1.date = '$currentdate' order by t1.event_id asc";
$results = mysql_query($sql) or die("Cannot query the database.
" . mysql_error());
$event = mysql_num_rows($results);
// change Dateformat
if($dateformat == 1) {
$currentdate = date("Y-m-j", mktime(0, 0, 0, $monthno, $date_of_mth, $year));
} else {
$currentdate = date("j-m-Y", mktime(0, 0, 0, $monthno, $date_of_mth, $year));
}
////////////////////
if($date_no == date('j', time()) && $monthno == date('n', time())) {
if($event > 0) {
$alt = "" . $lang['Events'] . " :
";
while($row = mysql_fetch_array($results)) {
$alt .= " " . "- " . $row['event_desc'] . "
";
}
$alt = strip_tags($alt, "
");
if($mode == 3) {
$linkdate = "" . $date_no .
"";
}
} else {
$linkdate = $date_no;
}
?>
echo $linkdate ?> |
} else {
if($event > 0) {
$alt = "" . $lang['Events'] . " :
";
while($row = mysql_fetch_array($results)) {
$alt .= $bullet . " " . "- " . $row['event_desc'] . "
";
}
$alt = strip_tags($alt, "
");
if($mode == 3) {
$linkdate = "" . $date_no .
"";
}
} else {
$linkdate = $date_no;
}
if($day_of_wk == 0 or $day_of_wk == 7) {
$class = "sunday";
} else {
$class = "tddate";
}
?>
echo $linkdate ?>
}
if($sundayfirst) {
if($day_of_wk == 6) { ?>
|
}
if($day_of_wk < 6 && $date_of_mth == $day_in_mth) {
for($i = $day_of_wk; $i < 6; $i++) {
?>
|
echo "\n";
}
?>
}
} else {
if($day_of_wk == 7) { ?>
}
if($day_of_wk < 7 && $date_of_mth == $day_in_mth) {
for($i = $day_of_wk; $i < 7; $i++) {
?>
|
echo "\n";
}
?>
}
}
}
?>