Modul: Bild mit Beschreibung und Seitennavigation mit Pfeile

Gesperrt
ekke
Beiträge: 130
Registriert: Mi 18. Sep 2002, 18:26

Modul: Bild mit Beschreibung und Seitennavigation mit Pfeile

Beitrag von ekke »

Basierend auch Svens NavModul hier eine Erweiterung:
Bild
Navigation: zurück Bild1/aktives Bild2 (andere Farbe)/Bild3 weiter
Bildbeschreibung

Einstellung:
Fond Link
Fond aktiv
Hintereinander, Seiten mit Startseite

here we go:

Code: Alles auswählen

if ("CMS_VALUE[6]" == "") {$VALUE[6] = "/";}
if ("CMS_VALUE[7]" == "") {$VALUE[7] = ">";}


echo "<table align=\"left\" cellpadding=\"0\" cellspacing=\"0\">";
// schrift start

echo "<tr valign=\"top\">";
echo "<td width=\"202\">".$mod["font"].":</td>";
echo "  <td><select name=\"CMS_VAR[0]\" size=\"1\">";
if ("CMS_VALUE[0]" != 0) {echo "<option value=\"0\">".$lngForm["nothing"]."</option>";
} else {
echo "<option value=\"0\" selected>".$lngForm["nothing"]."</option>";
}

for ($i=1; $i<=50; $i++) {if ( $i != "CMS_VALUE[0]" ) {
echo "<option value=\"$i\">Font $i</option>";} else {echo "<option value=\"$i\" selected>Font $i</option>";}}
echo "</SELECT></td></tr>";
// die2.

echo "<tr valign=\"top\">";
echo "<td width=\"202\">".$mod["font"]." active :</td>";
echo "  <td><select name=\"CMS_VAR[9]\" size=\"1\">";
if ("CMS_VALUE[9]" != 0) {echo "<option value=\"0\">".$lngForm["nothing"]."</option>";
} else {
echo "<option value=\"0\" selected>".$lngForm["nothing"]."</option>";
}

for ($i=1; $i<=50; $i++) {if ( $i != "CMS_VALUE[9]" ) {
echo "<option value=\"$i\">Font $i</option>";} else {echo "<option value=\"$i\" selected>Font $i</option>";}}
echo "</SELECT></td></tr>";


// schrift ende Anordnung neben/untereinander


echo "<tr><td valign=\"top\">Anordnung:</td>";
echo "<td><input type=\"radio\" name=\"CMS_VAR[1]\" value=\"\"";

if ("CMS_VALUE[1]" == "") {
echo "checked"
;}

echo ">nacheinander<br><input type=\"radio\" name=\"CMS_VAR[1]\" value=\"0\"";
if ("CMS_VALUE[1]" == "0") {
echo "checked";
}

echo ">untereinander<br></tr><tr></tr><tr>";

// Sortierung


echo "<td valign=\"top\">Sortierung:</td>";
echo "<td><input type=\"radio\" name=\"CMS_VAR[8]\" value=\"title\"";

if("CMS_VALUE[8]" == "title") {
echo "checked";
}

echo">Seitentitel<br>";
echo "<input type=\"radio\" name=\"CMS_VAR[8]\" value=\"created\"";

if("CMS_VALUE[8]" == "created") {
echo "checked";
}

echo">Erstellungsdatum<br>";
echo "<input type=\"radio\" name=\"CMS_VAR[8]\" value=\"lastmodified\"";
if("CMS_VALUE[8]" == "lastmodified") {
echo "checked";
}

echo">letzte Änderung<br>";
echo "<input type=\"radio\" name=\"CMS_VAR[8]\" value=\"idsidelang\"";

if("CMS_VALUE[8]" == "idsidelang" OR "CMS_VALUE[8]" == "") {
echo "checked";
}

echo">unsortiert<br></tr>";

// Gruppen oder Seiten

echo "<tr>";
echo "<td valign=\"top\">Kategorie:<br>mit Startseite?</td>";
echo " <td><input type=\"radio\" name=\"CMS_VAR[2]\" value=\"0\"";

if ("CMS_VALUE[2]" == "0") {
echo "checked";
}
// fjskdfjlsdkf
echo">Gruppen<br> <input type=\"radio\" name=\"CMS_VAR[2]\" value=\"\"";

if ("CMS_VALUE[2]" == "") {
echo "checked";
}

echo">Seiten <input type=\"checkbox\" name=\"CMS_VAR[3]\" value=\"ja\"";

if ("CMS_VALUE[3]" == "ja") {
echo "checked";
}

echo">ja<br>";

echo " <select name=\"CMS_VAR[4]\" size=\"7\">";

if ("CMS_VALUE[4]" != 0) {
echo "<option value=\"0\">--- aktuell ---</option>";
} else {
echo "<option value=\"0\" selected>--- aktuell ---</option>";
}

$sql = "SELECT A.idcat, A.level, C.name FROM $cfgTab_cat_tree AS A, $cfgTab_cat AS B, $cfgTab_cat_lang AS C WHERE A.idcat=B.idcat AND B.idcat=C.idcat AND C.idlang='$lang' AND B.idclient='$client' ORDER BY A.idtree";

$db->query($sql);
while ($db->next_record()) {$spaces = "";
  for ($i=0; $i<$db->f("level"); $i++) {
  $spaces = $spaces . "    ";}

if ( $db->f("idcat") == "CMS_VALUE[4]") {
echo "<option value=\"".$db->f("idcat")."\" selected>$spaces ".$db->f("name")."</option>";} else {echo "<option value=\"".$db->f("idcat")."\">$spaces ".$db->f("name")."</option>";}
}
echo "  </select></td></tr><tr>";
echo "<td valign=\"top\">Bild für Trennzeichen:</td>";
echo "<td><select name=\"CMS_VAR[5]\" size=\"1\">";

if ("CMS_VALUE[5]" != 0) {
echo "<option value=\"0\">".$lngForm["nothing"]."</option>";
}  else {
echo "<option value=\"0\" selected>".$lngForm["nothing"]."</option>";
}

$sql = "SELECT * FROM $cfgTab_upl WHERE idclient='$client' AND filetype='img' ORDER BY filename";
$db->query($sql);

while ($db->next_record()) {if ($db->f("idupl") != "CMS_VALUE[5]") {
echo "<option value=\"".$db->f("idupl")."\">".$db->f("filename")."</option>";
} else {
echo "<option value=\"".$db->f("idupl")."\" selected>".$db->f("filename")."</option>";}
}

echo "</SELECT></td></tr><tr>";
echo "<td valign=\"top\">alternativ Text:</td>";
echo "<td><input type=\"text\" size=\"1\" style=\"width:20px;\" name=\"CMS_VAR[6]\" value=\"$VALUE[6]CMS_VALUE[6]\">";
echo " und <input type=\"text\" size=\"1\" style=\"width:20px;\" name=\"CMS_VAR[7]\"value=\"$VALUE[7]CMS_VALUE[7]\">";
echo "</td></tr></table>";







// output

$ImgPath = "";
$ImgPath = "CMS_IMG[0]";

$TabWidth = "610";
$TabHeight = "380";

// echo "<tr><td valign=\"top\">";

if ($ImgPath !="" and $ImgPath !="0") {
$ImgProps = GetImageSize($ImgPath);
}

echo "<table width=\"$TabWidth\" height=\"$TabHeight\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr>";
if ($ImgPath !="" and $ImgPath !="0") {
echo "<td width=\"$TabWidth\" class=\"fontCMS_VALUE[0]\" valign=\"top\"><img src=\"$ImgPath\" border=\"0\" $ImgProps[3] ></td>";
}else{
echo "<td width=\"$TabWidth\" class=\"fontCMS_VALUE[0]\" valign=\"top\"> </td>";
}
echo "</tr>";

echo "<tr>";
echo "<td>";
// ##############################
if ("CMS_VALUE[8]" == "") {
$sortfield = "idsidelang";
} else {
$sortfield = "CMS_VALUE[8]";
}
if ("CMS_VALUE[4]" == 0) {
$navmod_id = $idcat;
} else {
$navmod_id = "CMS_VALUE[4]";
}
if ("CMS_VALUE[5]" != "0") {
$sql = "SELECT * FROM $cfgTab_upl WHERE idupl='CMS_VALUE[5]'";$db->query($sql);$db->next_record();$navmod_img = "".$db->f("dirname")."/".$db->f("filename")."";}

if ($auth->auth["uid"] == "nobody"){
$pub = " AND C.public='1' ";
};
if ("CMS_VALUE[2]" == "") {if ("CMS_VALUE[3]" == "ja") {
$sql = "SELECT A.title AS title,A.idside AS idside,B.idcat AS idcat,C.parentid AS parentid FROM $cfgTab_side_lang AS A,$cfgTab_cat_side AS B,$cfgTab_cat AS C WHERE A.idside=B.idside AND B.idcat=C.idcat AND C.idclient='$client' AND B.idcat='$navmod_id' AND idlang='$lang' AND online='1' ORDER BY '$sortfield' ASC";

} else {

$sql = "SELECT A.title AS title,A.idside AS idside,B.idcat AS idcat,C.parentid AS parentid FROM $cfgTab_side_lang AS A,$cfgTab_cat_side AS B,$cfgTab_cat AS C WHERE A.idside=B.idside AND B.idcat=C.idcat AND C.idclient='$client' AND B.idcat='$navmod_id' AND idlang='$lang' AND online='1' AND is_start='0'";
}

} else {

$sql = "SELECT name AS title,A.idcat AS idcat,A.idtree AS idtree FROM $cfgTab_cat_tree AS A, $cfgTab_cat AS B, $cfgTab_cat_lang AS C WHERE A.idcat=B.idcat AND B.idcat=C.idcat AND B.idclient='$client' AND C.idlang='$lang' AND B.parentid='$navmod_id' AND C.visible='1' $pub ORDER BY A.idtree";
}

$db->query($sql);
// start Pfeil

for ($i=0; $i<$db->num_rows(); $i++) {$db->next_record();
if ($db->f("idside") == $idside){$ihabdich = $i;
}
}

$db->query($sql);
for ($i=0; $i<$db->num_rows(); $i++) {$db->next_record();
if ($i == $ihabdich -1){
$navmod_link_prev = "front_content.php?client=$client&lang=$lang&parent=$parent&subid=".$db->f("parentid")."&idcat=".$db->f("idcat")."&idside=".$db->f("idside")."";
$navmod_link_prev_title = $db->f("title");
}
if ($i == $ihabdich +1){
$navmod_link_next = "front_content.php?client=$client&lang=$lang&parent=$parent&subid=".$db->f("parentid")."&idcat=".$db->f("idcat")."&idside=".$db->f("idside")."";
$navmod_link_next_title = $db->f("title");
}
}

$db->query($sql);

for ($i=0; $i<$db->num_rows(); $i++) {$db->next_record();
if ($db->num_rows() != 0 & "CMS_VALUE[0]" != 0 &$i == 0 ) {
if ($navmod_link_prev != "") {
echo "<span class=\"fontCMS_VALUE[0]\"><a href=\"".$sess->url("$navmod_link_prev")."\" onMouseOver=\"on('".$navmod_link_prev_title."');return true;\" onMouseOut=\"off();return true;\" class=\"fontCMS_VALUE[0]\"><</a>";
}else{echo "<span class=\"fontCMS_VALUE[0]\"><img src=\"img_site/space.gif\" width=\"10\" height=\"1\" border=\"0\">";
}
echo"<img src=\"img_site/space.gif\" width=\"10\" height=\"1\" border=\"0\">";
}

if ("CMS_VALUE[2]" == "") {
// für seiten
$navmod_link = "front_content.php?client=$client&lang=$lang&parent=$parent&subid=".$db->f("parentid")."&idcat=".$db->f("idcat")."&idside=".$db->f("idside")."";
}else {
$navmod_link = "front_content.php?client=$client&lang=$lang&parent=$parent&subid=".$db->f("idtree")."&idcat=".$db->f("idcat")."&idside=".$db->f("idside")."";
}

if ("CMS_VALUE[1]" == "") {if ($db->f("idside") != $idside) {
echo "<a href=\"".$sess->url("$navmod_link")."\" onMouseOver=\"on('".$db->f("title")."');return true;\" onMouseOut=\"off();return true;\" class=\"fontCMS_VALUE[0]\">".$db->f("title")."</a>";
} else {
echo "<span class=\"fontCMS_VALUE[9]\">".$db->f("title")."</span>";
}

if ("$i" != $db->num_rows()-1) {if (!"$navmod_img") {
echo " CMS_VALUE[6] ";
} else {
echo " <img src=\"$navmod_img\" border=\"0\"> ";
}
}
} else {
if ("$i" != $db->num_rows()-1) {if (!"$navmod_img") {
echo "CMS_VALUE[7] ";
} else {
echo "<img src=\"$navmod_img\" border=\"0\"> ";
}

 echo "<a href=\"".$sess->url("$navmod_link")."\" onMouseOver=\"on('".$db->f("title")."');return true;\" onMouseOut=\"off();return true;\" class=\"fontCMS_VALUE[0]\">".$db->f("title")."</a><br>";
 } else {
 if (!"$navmod_img") {
 echo "CMS_VALUE[7] ";
 } else {
 echo "<img src=\"$navmod_img\" border=\"0\"> ";
 }

 echo "<a href=\"".$sess->url("$navmod_link")."\" onMouseOver=\"on('".$db->f("title")."');return true;\" onMouseOut=\"off();return true;\" class=\"fontCMS_VALUE[0]\">".$db->f("title")."</a>";
 }
 }
 if ($db->num_rows() != 0 & "CMS_VALUE[0]" != 0 &$i == $db->num_rows()-1) {
echo "</span><span class=\"fontCMS_VALUE[0]\"><img src=\"img_site/space.gif\" width=\"10\" height=\"1\" border=\"0\">";
if ($navmod_link_next != "") {
echo "<a href=\"".$sess->url("$navmod_link_next")."\" onMouseOver=\"on('".$navmod_link_next_title."');return true;\" onMouseOut=\"off();return true;\" class=\"fontCMS_VALUE[0]\">></a>";
}else{echo "<img src=\"img_site/space.gif\" width=\"10\" height=\"1\" border=\"0\">";
}




// end Pfeil
}
//echo "<br>\n";

// ############

echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td><img src=\"img_site/space.gif\" width=\"1\" height=\"15\" border=\"0\">";
echo "</td>";
echo "</tr>";
echo "<tr>";
// hier nutzlos, aber bei manchen veränderungen noch zu gebrauchen
$ImgDescr = "CMS_IMGDESCR[0]";
if ($ImgDescr !="") {
echo "<td width=\"$TabWidth\" class=\"fontCMS_VALUE[0]\" valign=\"top\">CMS_IMGDESCR[0]</td>";
} else {
echo "<td width=\"$TabWidth\" class=\"fontCMS_VALUE[0]\" valign=\"top\">CMS_IMGDESCR[0] </td>";
}
echo "</tr></table>";
Zur Diskussion erstmal hier, wenn OK dann lade ich es hoch auf Contdev.

Gruss ekke
JUG
Beiträge: 113
Registriert: Fr 20. Sep 2002, 12:24
Wohnort: Karlsruhe
Kontaktdaten:

Beitrag von JUG »

Hi,

wollte es grade verwenden, aber:
Parse error: parse error, unexpected $ in inc/con_editcontent.inc.php(123) : eval()'d code on line 629
Gesperrt