^_^
Verfasst: Sa 4. Jun 2005, 20:44
^_^
Das Diskussionsforum zum Open Source Content Management System
https://forum.contenido.org/
Code: Alles auswählen
//Ueberpruefen, ob Druckansicht eingeschaltet:
/*
s => Standartansicht,
b => Braillesegeraete,
p1 => Druckanzeige ohne Grafiken,
p2 => Druckanzeige mit Grafiken
*/
if($_REQUEST['style'] == p1 || $_REQUEST['style'] == p2)
{
echo '';
} else {
Der Modulcode ...
}
Code: Alles auswählen
<? session_start(); ?>
Code: Alles auswählen
<?php
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* Modulname : 110_Styleswitcher_Css-DateiHeader
* Author : Karin Daehne
* Copyright : Karin Daehne
* Created : 01-06-2005
* Version : V01-01
* Modified :
* Features : Einstellung der CSS-Datei(en) im Headbereich des Layoutes.
* Hier muessen im Array die CSS-Dateien zugewiesen werden zu den Modulen
* 111_Styleswitcher_Braille-Einstellung
* 112_Styleswitcher_Print
* 113_Styleswitcher_FrontEnd
*
************************************************/
session_register("style");
$cssStil = array(
s =>'css/style-standart.css',
b =>'css/style_braille.css',
p1 =>'css/style_print_pic.css',
p2 =>'css/style_print.css'
);
if (!empty($_REQUEST['style'])) $_SESSION['style'] = $_REQUEST['style'];
if (empty($_SESSION['style'])) $_SESSION['style'] = s;
$stil = $cssStil["{$_SESSION['style']}"];
echo "<link rel=\"stylesheet\" href=\"$stil\" type=\"text/css\" />\n";
?>
Code: Alles auswählen
//----- Druckansicht:
if ($_GET['style']==p1)
{
echo '<a href="front_content.php?idcat='.$idcat.'&idart='.$idart.'&lang='.$lang.'&style=p2" title="Zur Druckansicht mit Grafiken">Ausdruck mit Grafiken</a>
<span> | </span>
<a href="front_content.php?idcat='.$idcat.'&idart='.$idart.'&lang='.$lang.'&style=s" title="Zur Normalansicht">Normalansicht</a>';
} elseif ($_GET['style']==p2) {
echo '<a href="front_content.php?idcat='.$idcat.'&idart='.$idart.'&lang='.$lang.'&style=p1" title="Zur Druckansicht ohne Grafiken">Ausdruck ohne Grafiken</a>
<span> | </span>
<a href="front_content.php?idcat='.$idcat.'&idart='.$idart.'&lang='.$lang.'&style=s" title="Zur Normalansicht">Normalansicht</a>';
} else {
echo '<a href="front_content.php?idcat='.$idcat.'&idart='.$idart.'&lang='.$lang.'&style=p1" title="Zur Druckansicht"><img src="images/print.gif" width="25" height="11" alt="Druckansicht" border="0" /></a>';
}
Code: Alles auswählen
<?php
$loc = $_GET[drucken];
if ($loc == "") {
$css = "css/format.css"; // Standard CSS.Datei im Standardordner
} else {
$css = "css/print.css";
}
?>
Code: Alles auswählen
.navigation, #zusatzbild, hr
{
display:none;
}
Code: Alles auswählen
<link rel="stylesheet" type="text/css" media="screen" t href=" <?php echo "$css"; ?> " />
Code: Alles auswählen
<a href="front_content.php?idcat=<?php echo "$idcat"; ?>&drucken=true">Druckversion</a>
sollte doch eher idart sein, oder?apicalart hat geschrieben:Code: Alles auswählen
<a href="front_content.php?idcat=<?php echo "$idcat"; ?>&drucken=true">Druckversion</a>