Gumbo
Erfahrenes Mitglied
Ich wiederhole mich ungern:
Wozu soll das „javascript“-Pseudo-Protokoll dort sein?
Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
Wozu soll das „javascript“-Pseudo-Protokoll dort sein?
<script language=\"javascript\">
function open_event(date_stamp){
window.open(\"" . $calendar_script . "?show_event=true&event_date=\" + date_stamp, \"calendar_popup\",\"height=" . $event_popup_height . ",width=".$event_popup_width."\");
}
</script>
$link_start = "<a href="javascript:;" class="cal_event" onclick="javascript: open_event('".$year."-".$month."-".$i."');">";
if (isset ($_GET['show_event'])){
list ($year, $month, $day) = explode ("-", $_GET['event_date']);
$query = "
SELECT *
FROM " . $event_table . "
WHERE EventYear = '" . $year . "'
AND EventMonth = '" . $month . "'
AND EventDay = '" . $day . "'
ORDER BY EventTime ASC
";
$result = mysql_query($query);
while ($einzelnezeile = mysql_fetch_array($result)) {
//und irgendwie diese zeile anzeigen.
}
window.open(\"" . $calendar_script . "?show_event=true&event_date=\" + date_stamp, \"calendar_popup\",\"height=" . $event_popup_height . ",width=".$event_popup_width."\");
}
$result = mysql_query($query);
if ($events_from_database)
{
$database_connection = mysql_connect ($server, $username, $password);
mysql_select_db ($database, $database_connection);
$result = mysql_query("
SELECT *
FROM " . $event_table . "
WHERE
EventYear = '" . $year . "'
AND
EventMonth = '" . $month . "'
");
while ($record = mysql_fetch_assoc($result)){
$event[$record['EventDay']] = $record;
}
}
/////////////////////////////////////////////
//show events in popup?
//
if (isset ($_GET['show_event'])){
list ($year, $month, $day) = explode ("-", $_GET['event_date']);
$query = "
SELECT *
FROM " . $event_table . "
WHERE EventYear = '" . $year . "'
AND EventMonth = '" . $month . "'
AND EventDay = '" . $day . "'
ORDER BY EventTime ASC
";
/* connect to the database */
$database_connection = mysql_connect ($server, $username, $password);
mysql_select_db ($database, $database_connection);
$result = mysql_query ($query) or die(mysql_error());
/* loop through the results via a mysql_fetch_assoc () */
while ($record = mysql_fetch_assoc ($result)){
if ($color_alternated){
$color_alternated = false;
$background_color_row = $event_background_color1;
}
else{
$color_alternated = true;
$background_color_row = $event_background_color2;
}
/* if there is an event do */
if( isset($event[$i]) )
{
$link_start = "<a href=\"javascript:;\" class=\"cal_event\" onMouseover=\"javascript:this.T_STATIC=true;this.T_TEXTALIGN='justify'; this.T_BGCOLOR='#e2eef5';this.T_TITLE='".sprintf("%02d",$i).".".$month.".".$year."';this.T_OFFSETX=-60; this.T_WIDTH=120; return escape(' " . $Event_onmouseover . " ');\">";
$link_end = "</a>";
$class = "cal_event";
}
return escape('".$result."');\">";
§event_onmouseover = echo "<table width=\"120\"><tr><td></td></tr>"
<?php
$event_onmouseover = echo "".$_GET['show_event']." > ".$_GET['event_date']."<br />\n";
?>