wie bekomme ich die Artikelliste alphabetisch sortiert ?
Hier der Code:
Code: Alles auswählen
<?php
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* Modulname : Artikellink Dropdown-Menue
* Author : Mathias Berkenkamp, Jose Rodriguez, Ekkehard Dörre
* Copyright : Mathias Berkenkamp, Jose Rodriguez, Ekkehard Dörre
* Created : 24-09-2002
* Modified : 09-03-2003
* Letzte Änderung : 24-05-2004
* geändert durch : Christa Tabara
* Contenido-Version : 4.4.4
************************************************/
if ("CMS_VALUE[1]" == "0") {
echo "<TABLE cellspacing=\"0\" border=\"0\"><FORM name=\"quicklink\"><TR><TD NOWRAP><SELECT NAME=\"jump\" onChange=\"if (this.options[this.selectedIndex].value.length!=0) location=this.options[this.selectedIndex].value\">";
echo"<OPTION VALUE=link>Bitte wählen Sie</OPTION>";
// selected category
$selcat = "CMS_VALUE[0]";
// select all articles in category without start article
if ("CMS_VALUE[2]" == "0") {
$query = "SELECT ARTLANG.title,ARTLANG.idart, ARTLANG.idartlang FROM ".$cfg["tab"]["cat_art"]." AS CATART, ".$cfg["tab"]["art_lang"]." AS ARTLANG ".
"WHERE CATART.idcat = '$selcat' AND ARTLANG.idart = CATART.idart AND ARTLANG.idlang = '$lang' AND ".
"ARTLANG.online = '1' ORDER BY CATART.idart ";
// select all articles in category with start article
} else {
$query = "SELECT ARTLANG.title,ARTLANG.idart, ARTLANG.idartlang FROM ".$cfg["tab"]["cat_art"]." AS CATART, ".$cfg["tab"]["art_lang"]." AS ARTLANG ".
"WHERE CATART.idcat = '$selcat' AND ARTLANG.idart = CATART.idart AND ARTLANG.idlang = '$lang' AND ".
"ARTLANG.online = '1'AND CATART.is_start = '0' ORDER BY CATART.idart ";
}
// execute query
$db->query($query);
unset($articleID);
unset($linkID);
// get articles
$is_empty=1;
while ($db->next_record()) {
$articleID = $db->f("idartlang");
$linkID = $db->f("idart");
$link = $sess->url("front_content.php?client=$client&lang=$lang&idcat=$selcat&idart=$linkID");
$headline = $db->f("title");
// HTML template for one element
echo"<OPTION VALUE=$link>$headline</OPTION>";
unset($headline);
$is_empty=0;
} // end while
if ($is_empty == 1) {
echo "<OPTION>Keine Artikel</OPTION>";
}
echo"</SELECT></FORM>
<SCRIPT LANGUAGE=\"Javascript 1.1\"><!--
document.quicklink.jump.selectedIndex=0;
//--></SCRIPT></TD</TR></table>";
} else {}
?>
Code: Alles auswählen
"ARTLANG.online = '1' ORDER BY CATART.idart ";
Code: Alles auswählen
"ARTLANG.online = '1' ORDER BY ARTLANG.title ";