Willkommen auf dem Portal für Mediengestalter
|
|
Autor |
Nachricht |
lowdoggnsu
Threadersteller
Dabei seit: 06.09.2005
Ort: -
Alter: -
Geschlecht: -
|
Verfasst Fr 16.09.2005 15:54
Titel Popup ein- und ausschaltbar |
|
|
Hi Leude.
Hab mir ein kostenloses PHP-Script für einen Newsmelder von artmedic runtergeladen
http://www.artmedic-phpscripts.de/index.php?page=513699311&f=1&i=734394556&s=513699311
Das Ding kann echt was. Nun möchte ich aber, dass die Einträge als Popup erscheinen. Ok, das hab ich zwar
mit Javascript gelöst, jedoch soll sich das Popup-Fenster über das Admin-Interface ein-und ausschalten können, falls es mal keine News gibt...und zwar mit einem seperaten Popupbutton, dass ich mir ins Admin-Interface setze.
Also wie schon gesagt, das mit dem Popup und mit dem Ein-Ausschaltbutton habe ich hinbekommen. Jedoch schaltet der Button das Popup nicht ein und aus. Ich bin ratlos!!! Vielleicht könnte mir hier ja jemand einen guten Tip geben. Vielen Dank schon ma im Vorraus.
|
|
|
|
|
Anti78
Dabei seit: 16.09.2003
Ort: Tbb/Mz/M
Alter: 46
Geschlecht:
|
Verfasst Fr 16.09.2005 16:01
Titel
|
|
|
Zeig doch mal das Script wie du es bis jetzt hast.
|
|
|
|
|
Anzeige
|
|
|
lowdoggnsu
Threadersteller
Dabei seit: 06.09.2005
Ort: -
Alter: -
Geschlecht: -
|
Verfasst Fr 16.09.2005 16:15
Titel
|
|
|
Ok, hier die Codes:
Dies ist das Login und das Hauptfenster:
Code: |
<html>
<head>
<title>Administration artmedic aktuell 2.0</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.titel {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
color: #FFFFFF;
text-decoration: none;
}
.titeldunkel {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
color: #333366;
text-decoration: none;
}
.text {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: normal;
color: #333366;
text-decoration: none;
}
.inputtext {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
color: #660066;
text-decoration: none;
background-color: #FFFFFF;
border: 1px solid #666699;
}
-->
</style>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<?php
if(!is_file("artmedic_aktuell_inc.php"))
{
echo "<br><br><center><p class=\"titeldunkel\">Es existiert noch keine Einstellungsdatei für artmedic aktuell!<br>
Führen Sie zunächst Setup durch.<br>
Klicken Sie <a href=\"artmedic_aktuell_setup.php\">hier</a>, um Setup durchzuführen.</p>";
exit;}
?>
<p> </p>
<table width="100%" height="100%" border="0" align="center" cellpadding="4" cellspacing="0">
<tr bgcolor="#666699">
<td height="20" colspan="2" class="titel">Administration artmedic aktuell
2.0</td>
</tr>
<tr>
<td width="15%" valign="top" bgcolor="#6666CC"><p> </p>
<p><a href="aktuell.php" target="_blank" class="titel">Anzeige
einspaltig</a></p> <p><a href="aktuell2.php" target="_blank" class="titel">Anzeige zweispaltig</a></p>
</td>
<td width="85%" align="center" valign="top" bgcolor="#FFFFFF" class="inputtext">
<?PHP
#############################################################################
# artmedic aktuell 2.0
# Copyright (c) 2003 Ellen Baitinger, http://www.artmedic.de (kontakt@artmedic.de) #
#
# This program is free software;
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#Dieses Script kann kostenlos auf privaten und kommerziellen Seiten eingesetzt und angepasst werden,
#solange Sie den Link auf artmedic webdesign und die Hinweise auf das Copyright und die Autorenschaft intakt lassen.
#Die Nutzung des Programms erfolgt auf eigene Gefahr. <br>
#Das Programm darf nicht weiterverkauft oder in anderer Weise zu Geld gemacht werden.
#############################################################################
require("artmedic_aktuell_inc.php");
if(isset($_POST['password'])){$password = $_POST['password'];}
if(isset($_GET['password'])){$password = $_GET['password'];}
$input = $_POST['input'];
if(!isset($password) and !isset($input))
{
?> <p> </p>
<table width="500" border="0" cellspacing="2" cellpadding="4">
<tr bgcolor="#666699">
<td class="titel">Passwort eingeben</td>
</tr>
<tr>
<td bgcolor="#9999CC">
<form name="form2" method="post" action="artmedic_aktuell_admin.php">
<input name="password" type="password" class="inputtext" id="password">
<input type="submit" name="Submit3" value="einloggen">
</form>
</td>
</tr>
</table>
<?PHP
}
if(isset($password) and $password!=$passwort and !isset($input))
{
?> <table width="500" border="0" cellspacing="2" cellpadding="4">
<tr bgcolor="#666699">
<td colspan="2" class="titel">Passwort eingeben</td>
</tr>
<tr>
<td width="100" nowrap bgcolor="#666699" class="titel">Falsches Passwort</td>
<td width="392" bgcolor="#CCCCFF">
<form name="form2" method="post" action="artmedic_aktuell_admin.php">
<input name="password" type="password" class="inputtext" id="password">
<input type="submit" name="Submit3" value="einloggen">
</form>
</td>
</tr>
</table>
<?PHP
}
if($password==$passwort and !isset($input))
{
?> <table width="100%" border="0" align="center" cellpadding="4" cellspacing="0">
<tr bgcolor="#666699">
<td height="20" colspan="2" class="titel"> <a href="artmedic_aktuell_admin.php?password=<?PHP echo $password; ?>" class="inputtext"> Neue
Meldung eingeben </a> <a href="artmedic_aktuell_delete.php?password=<?PHP echo $password; ?>" class="inputtext"> Aktuelle Meldungen
löschen </a> <a href="artmedic_aktuell_deletearchiv.php?password=<?PHP echo $password; ?>" class="inputtext"> Archiv-Meldungen
löschen </a>
<a href="artmedic_aktuell_popup.php?password=<?PHP echo $password; ?>" class="inputtext"> Pop-Up-Fenster
</a></td>
</tr>
</table>
<br> <table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><form action="artmedic_aktuell_admin.php" method="post" enctype="multipart/form-data" name="form1">
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr bgcolor="#666699">
<td colspan="3" class="titel">Neue Meldung</td>
</tr>
<tr bgcolor="#6666CC">
<td colspan="3" class="titel">Startzeit eingeben (wenn die Anzeige ab sofort
erfolgen soll, hier nichts eingeben)</td>
</tr>
<tr>
<td width="13%" valign="top" bgcolor="#CCCCFF" class="titeldunkel">Datum</td>
<td width="31%" nowrap bgcolor="#CCCCFF">
<input name="tagstart" type="text" class="inputtext" id="tag3" onKeyup="if (this.value.length == 2) document.all['form1'].monatstart.focus()" size="2" maxlength="2">
.
<input name="monatstart" type="text" class="inputtext" id="monat3" onKeyup="if (this.value.length == 2) document.all['form1'].jahrstart.focus()" size="2" maxlength="2">
.
<input name="jahrstart" type="text" class="inputtext" id="jahr2" onKeyup="if (this.value.length == 2) document.all['form1'].stundestart.focus()" size="2" maxlength="2">
</td>
<td width="56%" bgcolor="#ECECFF" class="text">z.B. 19.08.02 </td>
</tr>
<tr>
<td valign="top" bgcolor="#CCCCFF" class="titeldunkel">Uhrzeit</td>
<td bgcolor="#CCCCFF">
<input name="stundestart" type="text" class="inputtext" id="stunde3" onKeyup="if (this.value.length == 2) document.all['form1'].minutestart.focus()" size="2" maxlength="2">
:
<input name="minutestart" type="text" class="inputtext" id="minute3" onKeyup="if (this.value.length == 2) document.all['form1'].tagende.focus()" size="2" maxlength="2">
</td>
<td bgcolor="#ECECFF" class="text">z.B. 20:15 (wenn Sie keine Uhrzeit eingeben,
dann ist sie 00.00 Uhr)</td>
</tr>
<tr bgcolor="#6666CC">
<td colspan="3" valign="top" class="titel">Endzeit eingeben (wenn Sie hier
nichts eingeben, erfolgt die Anzeige unbegrenzt lange)</td>
</tr>
<tr>
<td valign="top" bgcolor="#CCCCFF" class="titeldunkel">Datum</td>
<td bgcolor="#CCCCFF">
<input name="tagende" type="text" class="inputtext" id="tag22" onKeyup="if (this.value.length == 2) document.all['form1'].monatende.focus()" size="2" maxlength="2">
.
<input name="monatende" type="text" class="inputtext" id="monat22" onKeyup="if (this.value.length == 2) document.all['form1'].jahrende.focus()" size="2" maxlength="2">
.
<input name="jahrende" type="text" class="inputtext" id="jahr22" onKeyup="if (this.value.length == 2) document.all['form1'].stundeende.focus()" size="2" maxlength="2">
</td>
<td bgcolor="#ECECFF" class="text">z.B. 19.08.02</td>
</tr>
<tr>
<td valign="top" bgcolor="#CCCCFF" class="titeldunkel">Uhrzeit</td>
<td bgcolor="#CCCCFF">
<input name="stundeende" type="text" class="inputtext" id="stunde22" onKeyup="if (this.value.length == 2) document.all['form1'].minuteende.focus()" size="2" maxlength="2">
:
<input name="minuteende" type="text" class="inputtext" id="minute22" onKeyup="if (this.value.length == 2) document.all['form1'].titel.focus()" size="2" maxlength="2">
</td>
<td bgcolor="#ECECFF" class="text"> z.B. 20:15 (wenn Sie keine Uhrzeit eingeben,
dann ist sie 00.00 Uhr)</td>
</tr>
<tr bgcolor="#6666CC">
<td colspan="3" valign="top" class="titel">Eingabe der Informationen</td>
</tr>
<tr>
<td valign="top" bgcolor="#CCCCFF" class="titeldunkel">Titel</td>
<td colspan="2" bgcolor="#ECECFF">
<input name="titel" type="text" class="inputtext" id="titel2" size="50">
</td>
</tr>
<tr>
<td valign="top" bgcolor="#CCCCFF" class="titeldunkel">Infotext</td>
<td colspan="2" bgcolor="#ECECFF">
<textarea name="infotext" cols="50" rows="8" class="inputtext" id="textarea"></textarea>
</td>
</tr>
<tr>
<td valign="top" bgcolor="#CCCCFF" class="titeldunkel">Bild<br>
<span class="text">optional</span></td>
<td colspan="2" bgcolor="#ECECFF" class="text"><input name="grafik" type="file" class="inputtext" size="40">
<br>
nur JPEG - Bildformat</td>
</tr>
<tr>
<td valign="top" bgcolor="#CCCCFF" class="titeldunkel">URL<br>
<span class="text">optional</span></td>
<td colspan="2" bgcolor="#ECECFF" class="text">
<input name="url" type="text" class="inputtext" id="url" size="50">
<br>
hier können Sie einen Link (>>> mehr info)
einfügen<br>
Wenn Sie nicht intern, sonder auf eine fremde Seite verlinken,
fügen Sie bitte die korrekteURL beginnend mit <span class="titeldunkel">http://</span>www..........
ein.</td>
</tr>
<tr>
<td align="right" valign="top" bgcolor="#CCCCFF" class="titeldunkel"><input name="archivieren" type="checkbox" id="archivieren" value="1"></td>
<td colspan="2" bgcolor="#ECECFF" class="text">Meldung soll
beim Löschen ins Newsarchiv verschoben werden</td>
</tr>
<tr bgcolor="#6666CC">
<td> </td>
<td colspan="2">
<input name="Submit" type="submit" class="inputtext" value="Meldung eintragen">
<input name="Submit2" type="reset" class="inputtext" value="Zurücksetzen">
<input name="input" type="hidden" id="input" value="1">
<input name="password" type="hidden" id="input2" value="<?PHP echo $password; ?>">
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<p>
<?PHP
}
if($input==1 and $password==$passwort){
?>
<table width="100%" border="0" align="center" cellpadding="4" cellspacing="0">
<tr bgcolor="#666699">
<td height="20" colspan="2" class="titel"> <a href="artmedic_aktuell_admin.php?password=<?PHP echo $password; ?>" class="inputtext"> Neue
Meldung </a> <a href="artmedic_aktuell_delete.php?password=<?PHP echo $password; ?>" class="inputtext"> Meldungen
löschen </a> <a href="artmedic_aktuell_deletearchiv.php?password=<?PHP echo $password; ?>" class="inputtext"> Archiv-Meldungen
löschen </a>
<a href="artmedic_aktuell_popup.php?password=<?PHP echo $password; ?>" class="inputtext"> Pop-Up-Fenster
</a></td>
</tr>
</table><br>
<table width="500" border="0" cellspacing="0" cellpadding="2">
<tr>
<td bgcolor="#666699" class="titel">Meldung wurde eingetragen</td>
</tr>
<tr>
<td bgcolor="#FFFFFF">
<?PHP
if($grafik_name!=""){
if($grafik_type != "image/pjpeg")
{die ("
Fehler: \"$grafik_name\" ist keine gültige JPEG-Datei<br><br><a href=\"javascript:history.go(-1);\">«« Zurück </A>");}}
//Startzeitpunkt festlegen
$jahrstart = $_POST['jahrstart'];
$monatstart = $_POST['monatstart'];
$tagstart = $_POST['tagstart'];
$stundestart = $_POST['stundestart'];
$minutestart = $_POST['minutestart'];
if(empty($stundestart)) {$stundestart = "0";}
if(empty($minutestart)) {$minutestart = "0";}
if(!empty($jahrstart))
{
$check = checkdate("$monatstart","$tagstart","$jahrstart");
if($check != 1)die("Der $tagstart.$monatstart.$jahrstart ist kein korrektes Datum.<br><br><a href=\"javascript:history.go(-1);\">«« Zurück </A>");
$timestampstart = mktime($stundestart,$minutestart,0,$monatstart,$tagstart,$jahrstart);
}
else
{$timestampstart = time();}
//stunde,minute,sekunde,M-d-Y
$datum1 = strftime("%a, %d.%m.%Y %H:%M", "$timestampstart");
$datum1 = ereg_replace("Thu", "Donnerstag", $datum1);
$datum1 = ereg_replace("Fri", "Freitag", $datum1);
$datum1 = ereg_replace("Sat", "Samstag", $datum1);
$datum1 = ereg_replace("Sun", "Sonntag", $datum1);
$datum1 = ereg_replace("Mon", "Montag", $datum1);
$datum1 = ereg_replace("Tue", "Dienstag", $datum1);
$datum1 = ereg_replace("Wed", "Mittwoch", $datum1);
echo "Startdatum: $datum1<br>";
//Klammerende ifjahrstart
//Ablaufzeitpunkt festlegen
$jahrende = $_POST['jahrende'];
$monatende = $_POST['monatende'];
$tagende = $_POST['tagende'];
$stundeende = $_POST['stundeende'];
$minuteende = $_POST['minuteende'];
if(!empty($jahrende))
{
$check = checkdate("$monatende","$tagende","$jahrende");
if($check != 1)die("Der $tagende.$monatende.$jahrende ist kein korrektes Datum.<br><br><a href=\"javascript:history.go(-1);\">«« Zurück </A>");
if(empty($stundeende)) {$stundeende = "0";}
if(empty($minuteende)) {$minuteende = "0";}
$timestampende = mktime("$stundeende","$minuteende",0,"$monatende","$tagende","$jahrende");
//stunde,minute,sekunde,M-d-Y
$datum2 = strftime("%a, %d.%m.%Y %H:%M", "$timestampende");
$datum2 = ereg_replace("Thu", "Donnerstag", $datum2);
$datum2 = ereg_replace("Fri", "Freitag", $datum2);
$datum2 = ereg_replace("Sat", "Samstag", $datum2);
$datum2 = ereg_replace("Sun", "Sonntag", $datum2);
$datum2 = ereg_replace("Mon", "Montag", $datum2);
$datum2 = ereg_replace("Tue", "Dienstag", $datum2);
$datum2 = ereg_replace("Wed", "Mittwoch", $datum2);
echo "Endzeitpunkt: $datum2<br>";
}
else
{
$timestampende = "";
$datum2 = "";
echo "zeitlich unbegrenzte Anzeige, Meldung muss bei Bedarf manuell gelöscht werden.";
}
//Daten aufbereiten
$infotext = $_POST['infotext'];
$titel = $_POST['titel'];
$url = $_POST['url'];
$infotext = ereg_replace("\n", "<br>", $infotext);
$infotext = ereg_replace("\r", "", $infotext);
$infotext = nl2br($infotext);
$infotext = stripslashes($infotext);
$infotext = preg_replace("/((http(s?):\/\/)|(www\.))([\w\_\-\/\.\?\=\&]+)/i", "<a href=\"http$3://$4$5\" target=\"_blank\">$2$4$5</a>", $infotext);
$infotext = preg_replace("/([\w\_\-\.]+)(@)([\w\_\-\.]+)/i", "<a href=\"mailto:$0\">$0</a>", $infotext);
$titel = stripslashes($titel);
//URL festlegen
if($url!="")
{$url = "<a href=\"$url\"> >>> mehr info</a>";}
else
{$url = "";}
//Bild festlegen
$id = time();
$bilderpfad ="$grafik_name";
@copy($grafik, $bilderpfad);
if(!is_file($bilderpfad))
{@move_uploaded_file($grafik, $bilderpfad);}
if(is_file($bilderpfad))
{
if($dest_width!="")
{
//Thumbnail erzeugen
$scr= "$bilderpfad";
$dest = "$id".".jpg";
$imageInfo = getimagesize($scr);
$src_width = $imageInfo[0];
$src_height = $imageInfo[1];
$dest_height = "$dest_width"*"$src_height"/"$src_width";
$src_img = imagecreatefromjpeg($scr);
$dst_img = imagecreatetruecolor($dest_width,$dest_height);
imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $dest_width, $dest_height, $src_width, $src_height);
imagejpeg($dst_img, $dest, 70);
imagedestroy($src_img);
imagedestroy($dst_img);
@unlink($bilderpfad);
$bilderpfad = $dest;
}
@chmod($bilderpfad,0644);
echo "<br>Bild $grafik_name ($grafik_size Bytes) wurde hochgeladen<br>";
$bildurl = "$scripturl"."$bilderpfad";
$bildhtml = "<td><img src=\"$bildurl\"></td>";
}
else
{
echo "<br>Info: Es wurde kein Bild hochgeladen.<br>";
$bildhtml = "";}
$archivieren = $_POST[archivieren];
//Daten speichern
$fp = fopen("$news", "a+");
if($fp){
flock($fp,2);
fputs ($fp, "$timestampstart&&$timestampende&&$datum1&&$titel&&$infotext&&$url&&$bilderpfad&&$bildhtml&&$archivieren&&\n");
flock($fp,3);
fclose ($fp);}
//Rückmeldung ausgeben
$newstemplate= fopen ("$template","r");
$newshtml = fread($newstemplate, filesize($template));
$newshtml = ereg_replace("%titel%","$titel",$newshtml);
$newshtml = ereg_replace("%datum%","$datum1",$newshtml);
$newshtml = ereg_replace("%infotext%","$infotext",$newshtml);
$newshtml = ereg_replace("%url%","$url",$newshtml);
$newshtml = ereg_replace("%bild%", "$bildhtml", $newshtml);
fclose ($newstemplate);
echo "$newshtml";
?>
</td>
</tr>
</table>
<?PHP
//Klammerende ifinput
}
?>
</td>
</tr>
</table>
<p> </p>
</body>
</html>
|
|
|
|
|
|
lowdoggnsu
Threadersteller
Dabei seit: 06.09.2005
Ort: -
Alter: -
Geschlecht: -
|
Verfasst Fr 16.09.2005 16:16
Titel
|
|
|
Und so hätte ich gerne das Popupmenü
Code: |
<?PHP
#############################################################################
# artmedic aktuell
# Copyright (c) 2003 Ellen Baitinger, http://www.artmedic.de (kontakt@artmedic.de) #
#
# This program is free software;
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#Dieses Script kann kostenlos auf privaten und kommerziellen Seiten eingesetzt und angepasst werden,
#solange Sie den Link auf artmedic webdesign und die Hinweise auf das Copyright und die Autorenschaft intakt lassen.
#Die Nutzung des Programms erfolgt auf eigene Gefahr. <br>
#Das Programm darf nicht weiterverkauft oder in anderer Weise zu Geld gemacht werden.
#############################################################################
require("artmedic_aktuell_inc.php");
if(isset($_POST['password'])){$password = $_POST['password'];}
if(isset($_GET['password'])){$password = $_GET['password'];}
if($password=="")
{include("artmedic_aktuell_admin.php");
exit;}
?>
<html>
<head>
<title>Pop-Up-Fenster</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.titel {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
color: #FFFFFF;
text-decoration: none;
}
.titeldunkel {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
color: #333366;
text-decoration: none;
}
.text {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: normal;
color: #333366;
text-decoration: none;
}
.inputtext {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
color: #660066;
text-decoration: none;
background-color: #FFFFFF;
border: 1px solid #666699;
}
-->
</style>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<p> </p>
<table width="100%" height="100%" border="0" align="center" cellpadding="4" cellspacing="0">
<tr bgcolor="#666699">
<td height="20" colspan="2" class="titel">Administration artmedic aktuell
2.0</td>
</tr>
<tr>
<td width="14%" valign="top" bgcolor="#6666CC"><p> </p>
<p><a href="aktuell.php" target="_blank" class="titel"></a></p>
<p><a href="aktuell2.php" target="_blank" class="titel"></a></p>
</td>
<td width="86%" align="center" valign="top" bgcolor="#FFFFFF" class="inputtext">
<table width="500" border="0" cellspacing="0" cellpadding="0">
</table>
<table width="100%" border="0" align="center" cellpadding="4" cellspacing="0">
<tr bgcolor="#666699">
<td height="20" colspan="2" class="titel"> <a href="artmedic_aktuell_admin.php?password=<?PHP echo $password; ?>" class="inputtext"> Neue
Meldung </a> <a href="artmedic_aktuell_delete.php?password=<?PHP echo $password; ?>" class="inputtext"> Meldungen
löschen </a> <a href="artmedic_aktuell_deletearchiv.php?password=<?PHP echo $password; ?>" class="inputtext"> Archiv-Meldungen
löschen </a></td>
</tr>
</table> <br> <table width="100" border="0" cellpadding="2" cellspacing="0" bgcolor="#CCCCFF">
<tr>
<td bgcolor="#666699" class="titel"align="center"><p>Pop-Up-Fenster </p>
<p><a href="artmedic_aktuell_popup_ein.php?password=<?PHP echo $password; $pop=true; ?>" class="inputtext">
ein </a>
<a href="artmedic_aktuell_popup_aus.php?password=<?PHP echo $password; $pop=false;?>" class="inputtext">
aus </a>
</td>
</tr>
<tr>
<td bgcolor="#D9E3FF" class="titeldunkel">
</td>
</tr>
</table>
<p> </p></table>
</body>
</html>
|
|
|
|
|
|
lowdoggnsu
Threadersteller
Dabei seit: 06.09.2005
Ort: -
Alter: -
Geschlecht: -
|
Verfasst Fr 16.09.2005 16:18
Titel
|
|
|
Und in der Form erscheint dann der Text, der im Popupfenster steht
Code: | <!--
artmedic aktuell, copyright by Ellen Baitinger, artmedic webdesign, http://www.artmedic.de
-->
<?PHP
require("artmedic_aktuell_inc.php");
//Aktuellen Zeitstempel ermitteln
$timestamp = time();
//Textdatenbank öffnen und einlesen
$daten = file($news);
natsort($daten);
$reverse = array_reverse($daten);
while (list ($line_num, $line) = each ($daten))
{
$ziffern = explode("&&","$line");
if($ziffern[1]<=$timestamp and $ziffern[1]!="")
{
if($ziffern[8]=="1")
{
//Ins Newsarchiv verschieben
$alt = "$ziffern[0]&&$ziffern[2]&&$ziffern[3]&&$ziffern[4]&&$ziffern[5]&&$ziffern[6]&&$ziffern[7]&&\n";
$ar = fopen($archiv, "a");
flock($ar,2);
fputs($ar, $alt);
flock($ar,3);
fclose($ar);
}
$aa = fopen($news, "r");
$contents = fread($aa, filesize($news));
fclose($aa);
$line=quotemeta($line);
$string = "";
$replace = ereg_replace($line, $string, $contents);
$ai = fopen($news, "w");
flock($ai,2);
fputs($ai, $replace);
flock($ai,3);
fclose($ai);
if($ziffern[8]!="1"){@unlink($ziffern[6]);}
clearstatcache();
}
}
include("artmedic_aktuell_archiv.php");
//Textdatenbank öffnen und einlesen
$anf = file($news);
natsort($anf);
$reverse = array_reverse($anf);
while(list($line_num, $line) = each($reverse))
{
$anz = explode("&&","$line");
if($anz[0]<=$timestamp)
{
//Vorlagendatei öffnen und füllen
$newstemplate= fopen($template,"r");
$newshtml = fread($newstemplate, filesize($template));
$newshtml = ereg_replace("%titel%","$anz[3]",$newshtml);
$newshtml = ereg_replace("%datum%","$anz[2]",$newshtml);
$newshtml = ereg_replace("%infotext%","$anz[4]",$newshtml);
$newshtml = ereg_replace("%url%","$anz[5]",$newshtml);
$newshtml = ereg_replace("%bild%","$anz[7]",$newshtml);
fclose($newstemplate);
echo $newshtml;
}}
//echo $archivlink;
//echo $copy;
?>
|
|
|
|
|
|
lowdoggnsu
Threadersteller
Dabei seit: 06.09.2005
Ort: -
Alter: -
Geschlecht: -
|
Verfasst Fr 16.09.2005 16:19
Titel
|
|
|
so, und hier noch die index.php
Code: | <?PHP
?>
<html>
<head>
<title>Neues aus dem Hause XY</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta name="author" content="wanner & kindt" />
<meta name="robots" content="follow" />
<meta name="robots" content="all" />
<!--Pop Up Fenster-->
<script type="text/javascript" src="artmedic_aktuell_popup_ein.php">
function pops () {
var win;
win=window.open("aktuell.php","NeuesPopup","width=420,height=500","resizable=no");
}
if (var popup=="true"){
pops();
}
else {
break;
}
</script>
</head>
<body onload="pops("aktuell.php","NeuesPopup","width=420,height=500","resizable=no")">
</body>
</html> |
|
|
|
|
|
|
|
|
Ähnliche Themen |
flash / Popup aus Popup?
Fenster öffnet Popup / Link im Popup öffnet Seite in Fenster
popup
PopUp?
Popup als Layer
Popup Position!
|
|
|
Du kannst keine Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum nicht antworten. Du kannst an Umfragen in diesem Forum nicht mitmachen.
|
|