Hallo Forum,
ich habe eeinen kalender gebastelt und einen dazugehöriges blogscript.Allerdings weiss ich nicht wie ich die beiden dinge verknüpfen soll>> der kalender kann eine verknüpfung zu einer sql datenbank herstellen
hier das blogscript:
und hier das kalenderscript:
[CODE]
$events_from_database = true; //Set to true if you want to retrieve events
$database = "xxxxxxx"; //Name of the database within the event_table
$server = "xxxxx"; //Name of the server
$username = "xxxxxx"; //MySQL username
$password = "xxxxxxx"; //MySQL password
$event_table = "calendar_events"; //Name of the calendar_events
//
/////////////////////////////////////////////
/////////////////////////////////////////////
//Load the language into usable variables
//
//darussol: TRANSLATION (18 May 2004)
// : Fill in the names of the days/months in variables
//e-man : LOAD TRANSLATION FILE INTO VARIABLES (from darussol)(19 May 2004)
// : Put the days/months names from language file into a array
$language_file = "calendar." . $calendar_language; //Language file into variable
$fd = fopen( $language_file, "r" ); //Open the language file
$fd = fread( $fd, filesize( $language_file ) ); //Read the opened file
$language_array = explode( "\n" , $fd ); //Put file info into array
$dayname = array_slice($language_array,0,7); //The names of the days
$monthname = array_slice($language_array,7); //The rest of the language file are the monthnames
//
/////////////////////////////////////////////
/////////////////////////////////////////////
//Use the date to build up the calendar. From the Query_string or the current date
//
if( isset( $_GET['date'] ) )
list($month,$year) = explode("-",$_GET['date']);
else
{
$month = date("m");
$year = date("Y");
}
//
/////////////////////////////////////////////
$date_string = mktime(0,0,0,$month,1,$year); //The date string we need for some info... saves space ^_^
$day_start = date("w",$date_string); //The number of the 1st day of the week
/////////////////////////////////////////////
//Filter the current $_GET['date'] from the QUERY_STRING
//
$QUERY_STRING = ereg_replace("&date=".$month."-".$year,"",$_SERVER['QUERY_STRING']);
[CODE]
wie kann ich die beiden sachen miteinander verknüpfen..d.h. ich klicke auf den mit php erzeugten kalender und öffne den blogeintrag vom 12.09.2006... was muss ich wo genau hinschreiben??
Bitte helft mir..
ich muss die seite bis montag im netz haben, aber aufgrund meiner sehr wenigen php/sql kenntnisse kämpfe ich schon seit 5 tagen mit diesem problem...
ich habe eeinen kalender gebastelt und einen dazugehöriges blogscript.Allerdings weiss ich nicht wie ich die beiden dinge verknüpfen soll>> der kalender kann eine verknüpfung zu einer sql datenbank herstellen
hier das blogscript:
PHP-Code:
<h1><?php echo $title; ?></h1>
<div align="left"><p align="left">
<?php
if (($action=="main" || $action=="upload_successful") &&
isset($_SESSION['admin'])) echo '<p class="browse">[ <a href="'.basename($_SERVER["PHP_SELF"]).'?action=entry">'.$new_entry_marking.'</a> ]</p>';
elseif ($action=="entry" && isset($_SESSION['admin'])) echo '<p class="browse">[ <a href="'.basename($_SERVER["PHP_SELF"]).'?action=upload">'.$upload_image_marking.'</a> ]
[ <a class="textlink" href="'.basename($_SERVER["PHP_SELF"]).'">'.$back_marking.'</a> ]</p>';
elseif (isset($id)) echo '<p class="browse">[ <a class="textlink" href="'.basename($_SERVER["PHP_SELF"]).'">'.$back_marking.'</a> ]</p>';
else echo " ";
switch ($show)
{
case "main":
if (isset($_GET['p'])) $p = $_GET['p'];
$data = file($entry_file);
$entry_count = count($data);
for ($row = 0; $row < $entry_count; $row++)
{
$parts = explode("|", $data[$row]);
if ((int)$parts[1] <= time()) $data_s[] = $data[$row];
}
if (isset($data_s)) $entry_count = count($data_s);
if (empty($p)) $p = 0;
$last = ($p+1) * $entries_per_page;
if ($last > $entry_count) $last = $entry_count;
if ($entry_count == 0) { echo "<i>".$still_no_entries_marking."</i>"; }
// read entry file and show each entry:
for ($i = $p*$entries_per_page; $i < $last; $i++)
{
$nr = $entry_count -$i;
$parts = explode("|", $data_s[$i]);
[CODE]
$events_from_database = true; //Set to true if you want to retrieve events
$database = "xxxxxxx"; //Name of the database within the event_table
$server = "xxxxx"; //Name of the server
$username = "xxxxxx"; //MySQL username
$password = "xxxxxxx"; //MySQL password
$event_table = "calendar_events"; //Name of the calendar_events
//
/////////////////////////////////////////////
/////////////////////////////////////////////
//Load the language into usable variables
//
//darussol: TRANSLATION (18 May 2004)
// : Fill in the names of the days/months in variables
//e-man : LOAD TRANSLATION FILE INTO VARIABLES (from darussol)(19 May 2004)
// : Put the days/months names from language file into a array
$language_file = "calendar." . $calendar_language; //Language file into variable
$fd = fopen( $language_file, "r" ); //Open the language file
$fd = fread( $fd, filesize( $language_file ) ); //Read the opened file
$language_array = explode( "\n" , $fd ); //Put file info into array
$dayname = array_slice($language_array,0,7); //The names of the days
$monthname = array_slice($language_array,7); //The rest of the language file are the monthnames
//
/////////////////////////////////////////////
/////////////////////////////////////////////
//Use the date to build up the calendar. From the Query_string or the current date
//
if( isset( $_GET['date'] ) )
list($month,$year) = explode("-",$_GET['date']);
else
{
$month = date("m");
$year = date("Y");
}
//
/////////////////////////////////////////////
$date_string = mktime(0,0,0,$month,1,$year); //The date string we need for some info... saves space ^_^
$day_start = date("w",$date_string); //The number of the 1st day of the week
/////////////////////////////////////////////
//Filter the current $_GET['date'] from the QUERY_STRING
//
$QUERY_STRING = ereg_replace("&date=".$month."-".$year,"",$_SERVER['QUERY_STRING']);
[CODE]
wie kann ich die beiden sachen miteinander verknüpfen..d.h. ich klicke auf den mit php erzeugten kalender und öffne den blogeintrag vom 12.09.2006... was muss ich wo genau hinschreiben??
Bitte helft mir..
ich muss die seite bis montag im netz haben, aber aufgrund meiner sehr wenigen php/sql kenntnisse kämpfe ich schon seit 5 tagen mit diesem problem...
Kommentar