Początkujący
Postów: 174 Ostrzeżeń: 1
Data rejestracji: 06.05.2006 23:38
|
A więc tak
Sytuacja zdarza się na stronie www.elektroinstal... nie można otworzyć strony ani pod FF, IE oraz operą. Jak po jakimś czasie czasami się coś wyświetli albo coś jak screen z załącznika albo biała kartka z wiadomością MySQL server has gone away ( były jeszcze jakies dwie linijki ale tylko to zdąrzyłem zapamietać)
I teraz nie wiem gdzie leży wina czy u usługodawcy WWW czy Fusiona.
Po jakimś czasie, powiedzmy 2 godz. wszystko z powrotem wraca do normy czyli strona wyświetla się ok.
kod kalendarza :
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+------------------------------------------------------
| Original code by pirdani/
| Adapted for PHP-Fusion v. 6.0 by:
| janmol/ & paulsson/
+-----------------------------------------------------*/
if (file_exists(INFUSIONS."calendar_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."calendar_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."calendar_panel/locale/English.php";
}
?>
<body onload='setBallon("BallonTip");'>
<div id="BallonTip" style="POSITION:absolute; VISIBILITY:hidden; LEFT:-200px; Z-INDEX: 100"></div>
<?php
echo "<script language='JavaScript' src='".$settings['siteurl']."infusions/calendar_panel/cross.js'></script>
<script language='JavaScript' src='".$settings['siteurl']."infusions/calendar_panel/tooltips.js'></script>";
//if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
$eventtag = date(d);
$eventmonat = date(n);
$heute = dbquery("SELECT * FROM ".$db_prefix."kalender WHERE tag=$eventtag && monat=$eventmonat ORDER BY stunden");
$anz_heute = mysql_num_rows($heute);
for($a=0; $a<$anz_heute; $a++)
{
if(mysql_result($heute, $a, "year")=="N")
{
if(mysql_result($heute, $a, "jahr")==date("Y"))
{
if(mysql_result($heute, $a, "privat")=="Y")
{
if($userdata['user_id']==mysql_result($heute, $a, "user_id"))
{
$eventheute[$a]['title'] = mysql_result($heute, $a, "title");
$eventheute[$a]['id'] = mysql_result($heute, $a, "id");
$eventheute[$a]['stunden'] = mysql_result($heute, $a, "stunden");
$eventheute[$a]['minuten'] = mysql_result($heute, $a, "minuten");
}
}
else
{
$eventheute[$a]['title'] = mysql_result($heute, $a, "title");
$eventheute[$a]['id'] = mysql_result($heute, $a, "id");
$eventheute[$a]['stunden'] = mysql_result($heute, $a, "stunden");
$eventheute[$a]['minuten'] = mysql_result($heute, $a, "minuten");
}
}
}
else
{
if(mysql_result($heute, $a, "privat")=="Y")
{
if($userdata['user_id']==mysql_result($heute, $a, "user_id"))
{
$eventheute[$a]['title'] = mysql_result($heute, $a, "title");
$eventheute[$a]['id'] = mysql_result($heute, $a, "id");
$eventheute[$a]['stunden'] = mysql_result($heute, $a, "stunden");
$eventheute[$a]['minuten'] = mysql_result($heute, $a, "minuten");
}
}
else
{
$eventheute[$a]['title'] = mysql_result($heute, $a, "title");
$eventheute[$a]['id'] = mysql_result($heute, $a, "id");
$eventheute[$a]['stunden'] = mysql_result($heute, $a, "stunden");
$eventheute[$a]['minuten'] = mysql_result($heute, $a, "minuten");
}
}
}
if(date(t)==date(d))
{
$eventtag2 = 1;
if(date(n)==12)
{
$eventmonat2 = 1;
}
else
{
$eventmonat2 = date(n)+1;
}
}
else
{
$eventtag2 = date(d)+1;
$eventmonat2 = date(n);
}
$morgen = dbquery("SELECT * FROM " .$db_prefix. "kalender WHERE tag=$eventtag2 && monat=$eventmonat2 ORDER BY stunden");
$anz_morgen = mysql_num_rows($morgen);
for($a=0; $a<$anz_morgen; $a++)
{
if(mysql_result($morgen, $a, "year")=="N")
{
if(mysql_result($morgen, $a, "jahr")==date("Y"))
{
if(mysql_result($morgen, $a, "privat")=="Y")
{
if($userdata['user_id']==mysql_result($morgen, $a, "user_id"))
{
$eventmorgen[$a]['title'] = mysql_result($morgen, $a, "title");
$eventmorgen[$a]['id'] = mysql_result($morgen, $a, "id");
$eventmorgen[$a]['stunden'] = mysql_result($morgen, $a, "stunden");
$eventmorgen[$a]['minuten'] = mysql_result($morgen, $a, "minuten");
}
}
else
{
$eventmorgen[$a]['title'] = mysql_result($morgen, $a, "title");
$eventmorgen[$a]['id'] = mysql_result($morgen, $a, "id");
$eventmorgen[$a]['stunden'] = mysql_result($morgen, $a, "stunden");
$eventmorgen[$a]['minuten'] = mysql_result($morgen, $a, "minuten");
}
}
}
else
{
if(mysql_result($morgen, $a, "privat")=="Y")
{
if($userdata['user_id']==mysql_result($morgen, $a, "user_id"))
{
$eventmorgen[$a]['title'] = mysql_result($morgen, $a, "title");
$eventmorgen[$a]['id'] = mysql_result($morgen, $a, "id");
$eventmorgen[$a]['stunden'] = mysql_result($morgen, $a, "stunden");
$eventmorgen[$a]['minuten'] = mysql_result($morgen, $a, "minuten");
}
}
else
{
$eventmorgen[$a]['title'] = mysql_result($morgen, $a, "title");
$eventmorgen[$a]['id'] = mysql_result($morgen, $a, "id");
$eventmorgen[$a]['stunden'] = mysql_result($morgen, $a, "stunden");
$eventmorgen[$a]['minuten'] = mysql_result($morgen, $a, "minuten");
}
}
}
$hoehepanel = "12";
$breite = "14%";
//Overfřrer vćrdier fra sprogfilen
$wt[1] = $locale['k1'];
$wt[2] = $locale['k2'];
$wt[3] = $locale['k3'];
$wt[4] = $locale['k4'];
$wt[5] = $locale['k5'];
$wt[6] = $locale['k6'];
$wt[7] = $locale['k7'];
$monate[1] = $locale['k20'];
$monate[2] = $locale['k21'];
$monate[3] = $locale['k22'];
$monate[4] = $locale['k23'];
$monate[5] = $locale['k24'];
$monate[6] = $locale['k25'];
$monate[7] = $locale['k26'];
$monate[8] = $locale['k27'];
$monate[9] = $locale['k28'];
$monate[10] = $locale['k29'];
$monate[11] = $locale['k30'];
$monate[12] = $locale['k31'];
$kalmon = date(n);
$kaljah = date(Y);
$result = dbquery("SELECT panel_name FROM ".$db_prefix."panels WHERE panel_filename = 'calendar_panel'");
if (dbrows($result) != 0) {
$data = dbarray($result);
$panel_name = $data['panel_name'];
}
openside("$panel_name");
//Einfach nur Kalendermonatsblatt anzeigen mit allen Einträgen
//Bestimmen was der Erste im Monat ist (So, Mo, Di, Mi, Do, Fr, Sa)
if (date("w", mktime(0,0,0,$kalmon,1,$kaljah))==0)
{
$day = 7;
}
else
{
$day = date("w", mktime(0,0,0,$kalmon,1,$kaljah));
}
//Tabelle für Kalender beginnen
echo '<table width="100%" border="0">';
//Monat ausgeben
echo '<tr><td colspan="7" class="textbox"><center>'.$monate[date("n")].'</center></td></tr>';
//Wochentage erstellen (als Überschrift)
echo '<tr>';
for ($counter=1; $counter<8; $counter++)
{
echo '<th class="textbox" width="' . $breite . '">' . $wt[$counter] . '</th>';
}
echo '</tr>';
//Inhalt und Datum auslesen und im Array speichern
for ($i=1; $i<(date(t)+1); $i++)
{
$kzahl[$day] = $i;
$result = dbquery("SELECT * FROM ".$db_prefix."kalender WHERE monat=".date(n)." && tag=".$i." ORDER BY stunden");
$anz = mysql_num_rows($result);
for ($b=0; $b<$anz; $b++)
{
if(mysql_result($result, $b, "privat")=="N")
{
if(mysql_result($result, $b, "year")=="N")
{
if(date(Y) == mysql_result($result, $b, "jahr"))
{
$kainhalt[$day] = $kainhalt[$day] . '· ' . mysql_result($result, $b, "title"). '<br>';
}
}
else
{
$kainhalt[$day] = $kainhalt[$day] . '· ' . mysql_result($result, $b, "title"). '<br>';
}
}
else
{
if(mysql_result($result, $b, "user_id")==$userdata['user_id'])
{
if(mysql_result($result, $b, "year")=="N")
{
if($kj == mysql_result($result, $b, "jahr"))
{
$kainhalt[$day] = $kainhalt[$day] .'· ' . mysql_result($result, $b, "title"). '<br>';
}
}
else
{
$kainhalt[$day] = $kainhalt[$day] . '· ' . mysql_result($result, $b, "title"). '<br>';
}
}
}
}
$day++;
}
//Kalenderzeilen erstellen
for ($z=0; $z<6; $z++)
{
if (($kzahl[(($z*7)+1)]=="") && ($kzahl[(($z*7)+7)]==""))
{
}
else
{
echo '<tr>';
for ($x=1; $x<8; $x++)
{
$y = (($z * 7) + $x);
if ($kzahl[$y]=="")
{
echo '<td bgcolor="#FFFFFF" height="' . $hoehepanel .'"></td>';
}
else
{
if($kainhalt[$y] == "")
{
if($kzahl[$y] == date(d))
{
?>
<td class="textbox" valign="top" height="<? echo $hoehepanel; ?>">
<center>
<? echo $kzahl[$y]; ?>
</center>
</td>
<?
}
else
{
?>
<td bgcolor="#FFFFFF" valign="top" height="<? echo $hoehepanel; ?>">
<center>
<? echo $kzahl[$y]; ?>
</center>
</td>
<?
}
}
else
{
if($kzahl[$y] == date(d))
{
?>
<td class="textbox" valign="top" height="<? echo $hoehepanel; ?>">
<center><b>
<a onmouseover="showBallon('<? echo addslash($kainhalt[$y]); ?>', 0, 200); return true;" onmouseout="hideBallon(); return true;">
<? echo $kzahl[$y]; ?>
</a>
</b></center>
</td>
<?
}
else
{
?>
<td bgcolor="#FFFFFF" valign="top" height="<? echo $hoehepanel; ?>">
<center><b>
<a onmouseover="showBallon('<? echo addslash($kainhalt[$y]); ?>', 0, 200); return true;" onmouseout="hideBallon(); return true;">
<? echo $kzahl[$y]; ?>
</a>
</b></center>
</td>
<?
}
}
}
}
echo '</tr>';
}
}
//Luk kalendertabellen
echo '</table><br>';
//I dag og i morgen
if($anz_heute==0)
{
echo '<i> </i>';
}
else
{
echo "<b>".$locale['k133']."</b><br>";
for($a=0; $a<$anz_heute; $a++)
{
if($eventheute[$a]['title']=="")
{
}
else
{
echo '· ' . $eventheute[$a]['title'] . ' (' . $eventheute[$a]['stunden'] . ':' . $eventheute[$a]['minuten'] . ')<br>';
}
}
}
if($anz_morgen==0)
{
echo '<i> </i>';
}
else
{
echo "<b>".$locale['k151']."</b><br>";
for($a=0; $a<$anz_morgen; $a++)
{
if($eventmorgen[$a]['title']=="")
{
}
else
{
echo '· ' . $eventmorgen[$a]['title'] . ' (' . $eventmorgen[$a]['stunden'] . ':' . $eventmorgen[$a]['minuten'] . ')</a><br>';
}
}
}
//Viser fem nćste
echo "<b>".$locale['k153']."<br></b>";
echo "<img src='".THEME."images/bullet.gif'> <a href='".INFUSIONS."calendar_panel/show_event.php?m_month=0'>".$locale['k169']."</a>";
closeside();
//echo '</body>';
?>
|