include ("db.php");
include ("language.php");
//HOME-HOME-HOME/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if ($m=='')
{
$ergebniscontent=mysql_query("SELECT * FROM okcontent WHERE unterkat='startsite' and hauptkat='startsite' and online='1'");
$checkhomec=mysql_fetch_array($ergebniscontent);
include ("contentmainstart.php");
$checkithomeb2=mysql_query("SELECT * FROM okcontent WHERE online='1' and home='1' and $lantitel NOT LIKE ''");
if (!$checkhomeb2=mysql_fetch_array($checkithomeb2))
{
print "";
}
else
{
$checkithomeb=mysql_query("SELECT * FROM okcontent WHERE online='1' and home='1' and $lantitel NOT LIKE ''");
if (!$checkhomeb=mysql_fetch_array($checkithomeb))
{print "";}
else
{
$checkithomeb2=mysql_query("SELECT * FROM okcontent WHERE online='1' and home='1'");
$checkhomeb2=mysql_fetch_array($checkithomeb2);
include ("vorschaulinksstart.php"); print "
";
}
}
}
/////////////////////////////////////////////////////////////////////////////////
if ($id!='')
{
$ergebniscontent=mysql_query("SELECT * FROM okcontent WHERE id='$id'");
while ($checkhomec=mysql_fetch_array($ergebniscontent))
{
include ("contentmain.php");
print "
";
}
}
/////////////////////////////////////////////////////////////////////////////////
if ($id=='' and $m!='')
{
$zaehler=0;
if ($hist=='')
{
$checkithomebc=mysql_query("SELECT * FROM okcontent WHERE (UNIX_TIMESTAMP(datum) > UNIX_TIMESTAMP(now()) || immer='immer') and online='1' and hauptkat='$m' and unterkat='$mu' and $lantitel NOT LIKE '' ORDER by prioritaet ASC");
}
else if ($hist=='1')
{
$checkithomebc=mysql_query("SELECT * FROM okcontent WHERE (UNIX_TIMESTAMP(datum) < UNIX_TIMESTAMP(now())) and online='1' and hauptkat='$m' and $lantitel NOT LIKE '' ORDER by datum DESC");
}
else if ($hist=='2')
{
$checkithomebc=mysql_query("SELECT * FROM okcontent WHERE (UNIX_TIMESTAMP(datum) > UNIX_TIMESTAMP(now()) || immer='immer') and online='1' and hauptkat='$m' and $lantitel NOT LIKE '' ORDER by datum ASC");
}
while ($checkhomebc=mysql_fetch_array($checkithomebc))
{
$zaehler++;
}
if ($zaehler>1)
{
if ($hist=='')
{
$checkithomeb=mysql_query("SELECT * FROM okcontent WHERE (UNIX_TIMESTAMP(datum) > UNIX_TIMESTAMP(now()) || immer='immer') and online='1' and hauptkat='$m' and unterkat='$mu' and $lantitel NOT LIKE '' ORDER by prioritaet ASC");
}
elseif ($hist=='1')
{
$checkithomeb=mysql_query("SELECT * FROM okcontent WHERE (UNIX_TIMESTAMP(datum) < UNIX_TIMESTAMP(now())) and online='1' and hauptkat='$m' and $lantitel NOT LIKE '' ORDER by datum DESC");
}
elseif ($hist=='2')
{
$checkithomeb=mysql_query("SELECT * FROM okcontent WHERE (UNIX_TIMESTAMP(datum) > UNIX_TIMESTAMP(now()) || immer='immer') and online='1' and hauptkat='$m' and $lantitel NOT LIKE '' ORDER by datum ASC");
}
while ($checkhomeb=mysql_fetch_array($checkithomeb))
{
include ("vorschaulinksa.php");
print "
";
}
}
else if ($zaehler==0 || $zaehler==1)
{
if ($hist=='')
{
$ergebniscontent=mysql_query("SELECT * FROM okcontent WHERE (UNIX_TIMESTAMP(datum) > UNIX_TIMESTAMP(now()) || immer='immer') and online='1' and hauptkat='$m' and unterkat='$mu' ORDER by prioritaet ASC");
}
elseif ($hist=='1')
{
$ergebniscontent=mysql_query("SELECT * FROM okcontent WHERE (UNIX_TIMESTAMP(datum) < UNIX_TIMESTAMP(now())) and online='1' and hauptkat='$m' ORDER by datum DESC");
}
elseif ($hist=='2')
{
$ergebniscontent=mysql_query("SELECT * FROM okcontent WHERE (UNIX_TIMESTAMP(datum) > UNIX_TIMESTAMP(now()) || immer='immer') and online='1' and hauptkat='$m' ORDER by datum ASC");
}
$checkhomec=mysql_fetch_array($ergebniscontent);
include ("contentmain.php");
print "
";
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////
if ($galid!='')
{
include ("galerie.php");
}
if ($m=='usercheck')
{
print "
";
if ($lan==de) {print "Username oder Password falsch, bitte versuchen Sie es erneut.";} if ($lan==it) {print "Username o password errato! Riprovare ad effettuare il login";}
print "
";
}
if ($m=='2' and $mu=='')
{
$checkithomeb=mysql_query("SELECT * FROM unterkat WHERE hauptkatid='2' ORDER by prioritaet ASC");
while ($checkhomeb=mysql_fetch_array($checkithomeb))
{
include ("vorschaulinksb.php");
}
}
if ($galerieliste==1)
{
$checkita=mysql_query("SELECT * FROM galeriekat WHERE online='1' ORDER by prioritaet ASC");
while($checka=mysql_fetch_array($checkita))
{
$checkitb=mysql_query("SELECT * FROM galerie WHERE galeriekat='$checka[id]' ORDER by prioritaet DESC");
$checkb=mysql_fetch_array($checkitb);
print "
$checka[$langaleriekat]

";
}
}
?>