Seite 1 von 2

download

Verfasst: So 1. Feb 2004, 13:26
von kuchi
Moin,

wohl wissend, daß dieses auch schon irgendwo steht; kurze Frage
-> das download-Modul zeigt im frontend alle 9 möglichen Dateien an, obwohl im backend nur 1 als aktiv markiert wurde.
Wo könnte da der Haken sein?

Gruß kuchi

Verfasst: Mo 2. Feb 2004, 12:48
von emergence
wie sieht das modul aus ? ich kenne es nicht... gibts nen link ?

Verfasst: Mo 2. Feb 2004, 13:21
von wolfganggarella
hi kuchi,

das Download-Module selektiert wohl nur aus der upload-Tabelle alle pdf's.
'Ne Selektion mit dem zugehörigen Artikel der online ist sollte helfen.

Gruß
Wolfgang

download

Verfasst: Mo 2. Feb 2004, 18:03
von kuchi
Hi,

erstmal die codes:

Input:

Code: Alles auswählen

$query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'";

$db->query($query);

while ($db->next_record()) {
//$knurpsel replaces old $filename 
 $knurpsel[$db->f("idupl")] = $db->f("filename");

} // end while

function d_checked($which) {
  if ($which != "") {
    return "checked";
  } 
} // end function

echo "<table width=\"300\" cellspacing=\"1\" cellpadding=\"4\" border=\"0\" bgcolor=\"#000000\">
        <tr bgcolor=\"#cccccc\" align=\"center\">
          <td>Aktiv</td>
          <td>Datei wählen</td>
        </tr>
        <tr bgcolor=\"#ffffff\" align=\"center\">
          <td><input name=\"CMS_VAR[1]\" value=\"on\" type=\"checkbox\" ".d_checked("CMS_VALUE[1]")."></td>
          <td><select name=\"CMS_VAR[3]\">";

if (is_array($knurpsel)) {
  foreach ($knurpsel as $key => $value) {
    if ("CMS_VALUE[3]" == $key) {
      echo "<option selected=\"selected\" value=\"". $key ."\">". $value ."</option>";
    } else {
      echo "<option value=\"". $key ."\">". $value ."</option>";
    } // end if
  } // end foreach
} // end if

echo          "</select></td>
        </tr>
        <tr bgcolor=\"#ffffff\" align=\"center\">
          <td><input name=\"CMS_VAR[4]\" value=\"on\" type=\"checkbox\" ".d_checked("CMS_VALUE[4]")."></td>
          <td><select name=\"CMS_VAR[6]\">";

if (is_array($knurpsel)) {
  foreach ($knurpsel as $key => $value) {
    if ("CMS_VALUE[6]" == $key) {
      echo "<option selected=\"selected\" value=\"". $key ."\">". $value ."</option>";
    } else {
      echo "<option value=\"". $key ."\">". $value ."</option>";
    } // end if
  } // end foreach
} // end if

echo "         </select></td>
        </tr>
        <tr bgcolor=\"#ffffff\" align=\"center\">
          <td><input name=\"CMS_VAR[7]\" value=\"on\" type=\"checkbox\" ".d_checked("CMS_VALUE[7]")."></td>
          <td><select name=\"CMS_VAR[9]\">";

if (is_array($knurpsel)) {
  foreach ($knurpsel as $key => $value) {
    if ("CMS_VALUE[9]" == $key) {
      echo "<option selected=\"selected\" value=\"". $key ."\">". $value ."</option>";
    } else {
      echo "<option value=\"". $key ."\">". $value ."</option>";
    } // end if
  } // end foreach
} // end if

echo "        </select></td>
        </tr>
        <tr bgcolor=\"#ffffff\" align=\"center\">
          <td><input name=\"CMS_VAR[10]\" value=\"on\" type=\"checkbox\" ".d_checked("CMS_VALUE[10]")."></td>
          <td><select name=\"CMS_VAR[12]\">";

if (is_array($knurpsel)) {
  foreach ($knurpsel as $key => $value) {
    if ("CMS_VALUE[12]" == $key) {
      echo "<option selected=\"selected\" value=\"". $key ."\">". $value ."</option>";
    } else {
      echo "<option value=\"". $key ."\">". $value ."</option>";
    } // end if
  } // end foreach
} // end if

echo "        </select></td>
        </tr>
        <tr bgcolor=\"#ffffff\" align=\"center\">
          <td><input name=\"CMS_VAR[13]\" value=\"on\" type=\"checkbox\" ".d_checked("CMS_VALUE[13]")."></td>
          <td><select name=\"CMS_VAR[15]\">";

if (is_array($knurpsel)) {
  foreach ($knurpsel as $key => $value) {
    if ("CMS_VALUE[15]" == $key) {
      echo "<option selected=\"selected\" value=\"". $key ."\">". $value ."</option>";
    } else {
      echo "<option value=\"". $key ."\">". $value ."</option>";
    } // end if
  } // end foreach
} // end if

echo          "</select></td>
        </tr>
        <tr bgcolor=\"#ffffff\" align=\"center\">
          <td><input name=\"CMS_VAR[16]\" value=\"on\" type=\"checkbox\" ".d_checked("CMS_VALUE[16]")."></td>
          <td><select name=\"CMS_VAR[18]\">";

if (is_array($knurpsel)) {
  foreach ($knurpsel as $key => $value) {
    if ("CMS_VALUE[18]" == $key) {
      echo "<option selected=\"selected\" value=\"". $key ."\">". $value ."</option>";
    } else {
      echo "<option value=\"". $key ."\">". $value ."</option>";
    } // end if
  } // end foreach
} // end if

echo "         </select></td>
        </tr>
        <tr bgcolor=\"#ffffff\" align=\"center\">
          <td><input name=\"CMS_VAR[19]\" value=\"on\" type=\"checkbox\" ".d_checked("CMS_VALUE[19]")."></td>
          <td><select name=\"CMS_VAR[21]\">";

if (is_array($knurpsel)) {
  foreach ($knurpsel as $key => $value) {
    if ("CMS_VALUE[21]" == $key) {
      echo "<option selected=\"selected\" value=\"". $key ."\">". $value ."</option>";
    } else {
      echo "<option value=\"". $key ."\">". $value ."</option>";
    } // end if
  } // end foreach
} // end if

echo "        </select></td>
        </tr>
        <tr bgcolor=\"#ffffff\" align=\"center\">
          <td><input name=\"CMS_VAR[22]\" value=\"on\" type=\"checkbox\" ".d_checked("CMS_VALUE[22]")."></td>
          <td><select name=\"CMS_VAR[24]\">";

if (is_array($knurpsel)) {
  foreach ($knurpsel as $key => $value) {
    if ("CMS_VALUE[24]" == $key) {
      echo "<option selected=\"selected\" value=\"". $key ."\">". $value ."</option>";
    } else {
      echo "<option value=\"". $key ."\">". $value ."</option>";
    } // end if
  } // end foreach
} // end if

echo "        </select></td>
        </tr>
        <tr bgcolor=\"#ffffff\" align=\"center\">
          <td><input name=\"CMS_VAR[25]\" value=\"on\" type=\"checkbox\" ".d_checked("CMS_VALUE[25]")."></td>
          <td><select name=\"CMS_VAR[27]\">";

if (is_array($knurpsel)) {
  foreach ($knurpsel as $key => $value) {
    if ("CMS_VALUE[27]" == $key) {
      echo "<option selected=\"selected\" value=\"". $key ."\">". $value ."</option>";
    } else {
      echo "<option value=\"". $key ."\">". $value ."</option>";
    } // end if
  } // end foreach
} // end if

echo "        </select></td>
        </tr>
      </table>";
Output:

Code: Alles auswählen

<?php

echo "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">";

if ("CMS_VALUE[1]" == "on") {

  $s = "CMS_VALUE[3]";
  $query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";

  $db->query($query);
  $db->next_record();

  $file = $db->f("filename");
$href =  $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");


  echo "<tr><td colspan=\"2\" heigth=\"1\" bgcolor=\"#999999\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";
  echo "<tr height=\"20\">
          <td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#999999\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a></td>
          <td align=\"center\" width=\"20\" bgcolor=\"#999999\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\" onmouseover=\"disk.over(this)\" onmouseout=\"disk.out(this)\"></a></td>
        </tr>";
  echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";

} // end if

if ("CMS_VALUE[4]" == "on") {

  $s = "CMS_VALUE[6]";
  $query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
  $db->query($query);
  $db->next_record();

  $file = $db->f("filename");
 $href =  $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");

  echo "<tr height=\"20\">
          <td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#999966\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a></td>
          <td align=\"center\" width=\"20\" bgcolor=\"#999999\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\" onmouseover=\"disk.over(this)\" onmouseout=\"disk.out(this)\"></a></td>
        </tr>";
  echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";

} // end if

if ("CMS_VALUE[7]" == "on") {

  $s = "CMS_VALUE[9]";
  $query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
  $db->query($query);
  $db->next_record();

  $file = $db->f("filename");
  $href =  $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");

  echo "<tr height=\"20\">
          <td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#999999\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a></td>
          <td align=\"center\" width=\"20\" bgcolor=\"#999999\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\" onmouseover=\"disk.over(this)\" onmouseout=\"disk.out(this)\"></a></td>
        </tr>";
  echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";

} // end if

if ("CMS_VALUE[10]" == "on") {

  $s = "CMS_VALUE[12]";
  $query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
  $db->query($query);
  $db->next_record();

  $file = $db->f("filename");
  $href =  $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");

  echo "<tr height=\"20\">
          <td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#999966\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a></td>
          <td align=\"center\" width=\"20\" bgcolor=\"#999999\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\" onmouseover=\"disk.over(this)\" onmouseout=\"disk.out(this)\"></a></td>
        </tr>";
  echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";

} // end if

if ("CMS_VALUE[13]" == "on") {

  $s = "CMS_VALUE[15]";
  $query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
  $db->query($query);
  $db->next_record();

  $file = $db->f("filename");
 $href =  $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");

  echo "<tr height=\"20\">
          <td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#999999\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a></td>
          <td align=\"center\" width=\"20\" bgcolor=\"#999999\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\" onmouseover=\"disk.over(this)\" onmouseout=\"disk.out(this)\"></a></td>
        </tr>";
  echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";

} // end if

if ("CMS_VALUE[16]" == "on") {

  $s = "CMS_VALUE[18]";
  $query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
  $db->query($query);
  $db->next_record();

  $file = $db->f("filename");
 $href =  $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");

  echo "<tr height=\"20\">
          <td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#999966\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a></td>
          <td align=\"center\" width=\"20\" bgcolor=\"#999999\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\" onmouseover=\"disk.over(this)\" onmouseout=\"disk.out(this)\"></a></td>
        </tr>";
  echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";

} // end if


if ("CMS_VALUE[19]" == "on") {

  $s = "CMS_VALUE[21]";
  $query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
  $db->query($query);
  $db->next_record();

  $file = $db->f("filename");
 $href =  $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");

  echo "<tr height=\"20\">
          <td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#999999\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a></td>
          <td align=\"center\" width=\"20\" bgcolor=\"#999999\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\" onmouseover=\"disk.over(this)\" onmouseout=\"disk.out(this)\"></a></td>
        </tr>";
  echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";

} // end if

if ("CMS_VALUE[22]" == "on") {

  $s = "CMS_VALUE[24]";
  $query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
  $db->query($query);
  $db->next_record();

  $file = $db->f("filename");
  $href =  $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");

  echo "<tr height=\"20\">
          <td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#999966\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a></td>
          <td align=\"center\" width=\"20\" bgcolor=\"#999999\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\" onmouseover=\"disk.over(this)\" onmouseout=\"disk.out(this)\"></a></td>
        </tr>";
  echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";

} // end if

if ("CMS_VALUE[25]" == "on") {

  $s = "CMS_VALUE[27]";
  $query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
  $db->query($query);
  $db->next_record();

  $file = $db->f("filename");
  $href =  $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");

  echo "<tr height=\"20\">
          <td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#999999\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a></td>
          <td align=\"center\" width=\"20\" bgcolor=\"#999999\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\" onmouseover=\"disk.over(this)\" onmouseout=\"disk.out(this)\"></a></td>
        </tr>";
  echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";

} // end if




echo "</table>";

?>
Das Modul stammt so original aus dem Modul-Downloadbereich von Contenido.
Im backend kann man vor die neun möglichen files ein Häckchen machen um es zu aktivieren. Markiert man eines werden trotzdem alle angezeigt.

Habe das Problem noch nicht gefunden.

Gruß kuchi

Verfasst: Mo 2. Feb 2004, 22:43
von BerBlueSea
Hallo

Also bei mir geht diese Code ohne Probleme!!

Hab ihn noch etwas erweitert jetzt kann man auch eine beschreibung dazu geben!! macht sicher sind

lg

Code: Alles auswählen

<?php 



echo "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">"; 

if ("CMS_VALUE[1]" == "on") { 

  $s = "CMS_VALUE[3]"; 
  $query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'"; 

  $db->query($query); 
  $db->next_record(); 

  $file = $db->f("filename"); 
$href =  $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename"); 
  		$description = $db->f("description");

  echo "<tr><td colspan=\"2\" heigth=\"1\" bgcolor=\"#999999\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>"; 
  echo "<tr height=\"20\"> 
          <td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#999999\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a><BR>$description</td> 
          <td align=\"center\" width=\"20\" bgcolor=\"#999999\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\" ></a></td> 
        </tr>"; 
  echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>"; 

} // end if 

if ("CMS_VALUE[4]" == "on") { 

  $s = "CMS_VALUE[6]"; 
  $query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'"; 
  $db->query($query); 
  $db->next_record(); 

  $file = $db->f("filename"); 
$href =  $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename"); 
  		$description = $db->f("description");

  echo "<tr height=\"20\"> 
          <td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#999966\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a><BR>$description</td> 
          <td align=\"center\" width=\"20\" bgcolor=\"#999999\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\" ></a></td> 
        </tr>"; 
  echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>"; 

} // end if 

if ("CMS_VALUE[7]" == "on") { 

  $s = "CMS_VALUE[9]"; 
  $query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'"; 
  $db->query($query); 
  $db->next_record(); 

  $file = $db->f("filename"); 
  $href =  $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename"); 
  		$description = $db->f("description");
  		
  echo "<tr height=\"20\"> 
          <td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#999999\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a><BR>$description</td> 
          <td align=\"center\" width=\"20\" bgcolor=\"#999999\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\" ></a></td> 
        </tr>"; 
  echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>"; 

} // end if 

if ("CMS_VALUE[10]" == "on") { 

  $s = "CMS_VALUE[12]"; 
  $query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'"; 
  $db->query($query); 
  $db->next_record(); 

  $file = $db->f("filename"); 
  $href =  $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename"); 
  		$description = $db->f("description");
  		
  echo "<tr height=\"20\"> 
          <td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#999966\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a><BR>$description</td> 
          <td align=\"center\" width=\"20\" bgcolor=\"#999999\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\" ></a></td> 
        </tr>"; 
  echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>"; 

} // end if 

if ("CMS_VALUE[13]" == "on") { 

  $s = "CMS_VALUE[15]"; 
  $query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'"; 
  $db->query($query); 
  $db->next_record(); 

  $file = $db->f("filename"); 
$href =  $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename"); 
  		$description = $db->f("description");
  		
  echo "<tr height=\"20\"> 
          <td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#999999\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a><BR>$description</td> 
          <td align=\"center\" width=\"20\" bgcolor=\"#999999\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\"></a></td> 
        </tr>"; 
  echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>"; 

} // end if 

if ("CMS_VALUE[16]" == "on") { 

  $s = "CMS_VALUE[18]"; 
  $query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'"; 
  $db->query($query); 
  $db->next_record(); 

  $file = $db->f("filename"); 
$href =  $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename"); 
  		$description = $db->f("description");
  		
  echo "<tr height=\"20\"> 
          <td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#999966\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a><BR>$description</td> 
          <td align=\"center\" width=\"20\" bgcolor=\"#999999\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\" ></a></td> 
        </tr>"; 
  echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>"; 

} // end if 


if ("CMS_VALUE[19]" == "on") { 

  $s = "CMS_VALUE[21]"; 
  $query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'"; 
  $db->query($query); 
  $db->next_record(); 

  $file = $db->f("filename"); 
$href =  $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename"); 
  		$description = $db->f("description");
  		
  echo "<tr height=\"20\"> 
          <td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#999999\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a><BR>$description</td> 
          <td align=\"center\" width=\"20\" bgcolor=\"#999999\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\" ></a></td> 
        </tr>"; 
  echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>"; 

} // end if 

if ("CMS_VALUE[22]" == "on") { 

  $s = "CMS_VALUE[24]"; 
  $query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'"; 
  $db->query($query); 
  $db->next_record(); 

  $file = $db->f("filename"); 
  $href =  $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename"); 
  		$description = $db->f("description");
  		
  echo "<tr height=\"20\"> 
          <td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#999966\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a><BR>$description</td> 
          <td align=\"center\" width=\"20\" bgcolor=\"#999999\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\" ></a></td> 
        </tr>"; 
  echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>"; 

} // end if 

if ("CMS_VALUE[25]" == "on") { 

  $s = "CMS_VALUE[27]"; 
  $query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'"; 
  $db->query($query); 
  $db->next_record(); 

  $file = $db->f("filename"); 
  $href =  $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename"); 
  		$description = $db->f("description");
  		
  echo "<tr height=\"20\"> 
          <td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#999999\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a><BR>$description</td> 
          <td align=\"center\" width=\"20\" bgcolor=\"#999999\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\"></a></td> 
        </tr>"; 
  echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>"; 

} // end if 


echo "</table>"; 

?>

Hab den Code mal etwas Übersichtlicher gemacht

Verfasst: Di 3. Feb 2004, 00:37
von BerBlueSea
Input:

Code: Alles auswählen

###################
# over-worked by
# www.phpsolution.at
# Bernd Büchler
# Modified    : 3.2.2004
###################
# original
/***********************************************
* Modulname   :     Download
* Author      :     4fb - Jan Lengowski/ 4.3.1b mods by J. Matern
* Copyright   :     Contenido - four for business
* Created     :     26-08-2002
* Modified    :     05-07-2003
************************************************/


$wert = 0;
$werte = array(
"CMS_VAR[1]", "CMS_VALUE[1]", "CMS_VAR[3]", "CMS_VALUE[3]" ,
"CMS_VAR[4]", "CMS_VALUE[4]", "CMS_VAR[6]", "CMS_VALUE[6]" ,
"CMS_VAR[7]", "CMS_VALUE[7]", "CMS_VAR[9]", "CMS_VALUE[9]" ,
"CMS_VAR[10]", "CMS_VALUE[10]", "CMS_VAR[12]", "CMS_VALUE[12]" ,
"CMS_VAR[13]", "CMS_VALUE[13]", "CMS_VAR[15]", "CMS_VALUE[15]" ,
"CMS_VAR[16]", "CMS_VALUE[16]", "CMS_VAR[18]", "CMS_VALUE[18]" ,
"CMS_VAR[19]", "CMS_VALUE[19]", "CMS_VAR[21]", "CMS_VALUE[21]" ,
"CMS_VAR[22]", "CMS_VALUE[22]", "CMS_VAR[24]", "CMS_VALUE[24]" ,
"CMS_VAR[25]", "CMS_VALUE[25]", "CMS_VAR[27]", "CMS_VALUE[27]");

$query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'";

$db->query($query);

while ($db->next_record()) {
//$knurpsel replaces old $filename
$knurpsel[$db->f("idupl")] = $db->f("filename");

} // end while

function d_checked($which) {
  if ($which != "") {
    return "checked";
  }
} // end function

echo "<table width=\"300\" cellspacing=\"1\" cellpadding=\"4\" border=\"0\" bgcolor=\"#000000\">
        <tr bgcolor=\"#cccccc\" align=\"center\">
          <td>Aktiv</td>
          <td>Datei wählen</td>
        </tr>";
for ( $i = 0; $i < 9; $i++ ){
      echo "<tr bgcolor=\"#ffffff\" align=\"center\">
                 <td><input name=\"$werte[$wert]\" value=\"on\"";
      $wert++;
      echo "type=\"checkbox\" ".d_checked("$werte[$wert]")."></td>
                 <td>";
$wert++;
echo "<select name=\"$werte[$wert]\">";
      $wert++;
      if (is_array($knurpsel)) {
          foreach ($knurpsel as $key => $value) {
                   if ("$werte[$wert]" == $key) {
                        echo "<option selected=\"selected\" value=\"". $key ."\">". $value ."</option>";
                   } else {
                        echo "<option value=\"". $key ."\">". $value ."</option>";
                   } // end if
          } // end foreach
      } // end if

      echo "  </select></td></tr>";
      $wert++;
} // for ende
echo "</table>";
Output:

Code: Alles auswählen

<?php
###################
# over-worked by
# www.phpsolution.at
# Bernd Büchler
# 3.2.2004
###################
# original
/***********************************************
* Modulname   :     Download
* Author      :     4fb - Jan Lengowski/ 4.3.1b mods by J. Matern
* Copyright   :     Contenido - four for business
* Created     :     26-08-2002
* Modified    :     05-07-2003
************************************************/

$farbe_gerade = "#999999";
$farbe_ungerade = "#cccccc";
$wert = 0;
$werte = array("CMS_VALUE[1]", "CMS_VALUE[3]" , "CMS_VALUE[4]", "CMS_VALUE[6]" ,  "CMS_VALUE[7]", "CMS_VALUE[9]" ,
               "CMS_VALUE[10]", "CMS_VALUE[12]" , "CMS_VALUE[13]", "CMS_VALUE[15]" , "CMS_VALUE[16]", "CMS_VALUE[18]" ,
               "CMS_VALUE[19]", "CMS_VALUE[21]" , "CMS_VALUE[22]", "CMS_VALUE[24]" , "CMS_VALUE[25]", "CMS_VALUE[27]" );

echo "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">";

for ( $i = 0; $i < 9; $i++ ){
        if ( $werte[$wert] == "on") {
                if ($i % 2) $farbe = "$farbe_gerade";
                else $farbe = "$farbe_ungerade";
                  $wert ++;
                  $s = $werte[$wert];
                  $wert ++;
                  $query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
                  $db->query($query);
                  $db->next_record();

                  $file = $db->f("filename");
                  $href =  $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");
                  $description = $db->f("description");

                  echo "<tr><td colspan=\"2\" heigth=\"1\" bgcolor=\"$farbe\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";
                  echo "<tr height=\"20\">
                  <td style=\"padding-left:20px\" width=\"460\" bgcolor=\"$farbe\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a>
                   <BR>$description</td>
                  <td align=\"center\" width=\"20\" bgcolor=\"$farbe\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\"></a></td>
                </tr>";
                  echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";

        } // end if
} // end for

echo "</table>";
?>

download

Verfasst: So 8. Feb 2004, 21:26
von kuchi
Hallo BerBlueSea!

danke, Dein Modul funktioniert!

Gruß kuchi

Verfasst: Di 10. Feb 2004, 12:34
von toerag
hey habe gearde mal das DL-script ausprobiert, nur leider ist es nicht sichtbar :-(
http://toerag.de/load/dl.jpg dort ist es sichtbar aber nicht im layout :-( habe es nur mal testweise eingebaut... und es in den container 1 gepackt. doch dort ist nichts zu sehen.
was ist falsch? was muss ich da ändern??
hoffe ihr könt mir helfen...
greetz toerag

überarbeitung

Verfasst: Fr 20. Feb 2004, 14:19
von neu@cidnet.de
so ich hab das script mal en bissel überarbeitet und vergrößert :)
Was ist denn schon 9 gegen 19 ? :D

INPUT:

###################
# over-worked by
#
# Thomas Broich
# mywork@cidnet.de
#
# Modified : 20.2.2004
###################
# original
/***********************************************
* Modulname : Download
* Author : 4fb - Jan Lengowski/ 4.3.1b mods by J. Matern
* Copyright : Contenido - four for business
* Created : 26-08-2002
* Modified : 05-07-2003
************************************************/


$wert = 0;
$werte = array(
"CMS_VAR[1]", "CMS_VALUE[1]", "CMS_VAR[3]", "CMS_VALUE[3]" ,
"CMS_VAR[4]", "CMS_VALUE[4]", "CMS_VAR[6]", "CMS_VALUE[6]" ,
"CMS_VAR[7]", "CMS_VALUE[7]", "CMS_VAR[9]", "CMS_VALUE[9]" ,
"CMS_VAR[10]", "CMS_VALUE[10]", "CMS_VAR[12]", "CMS_VALUE[12]" ,
"CMS_VAR[13]", "CMS_VALUE[13]", "CMS_VAR[15]", "CMS_VALUE[15]" ,
"CMS_VAR[16]", "CMS_VALUE[16]", "CMS_VAR[18]", "CMS_VALUE[18]" ,
"CMS_VAR[19]", "CMS_VALUE[19]", "CMS_VAR[21]", "CMS_VALUE[21]" ,
"CMS_VAR[22]", "CMS_VALUE[22]", "CMS_VAR[24]", "CMS_VALUE[24]" ,
"CMS_VAR[25]", "CMS_VALUE[25]", "CMS_VAR[27]", "CMS_VALUE[27]" ,
"CMS_VAR[30]", "CMS_VALUE[30]", "CMS_VAR[32]", "CMS_VALUE[32]" ,
"CMS_VAR[35]", "CMS_VALUE[35]", "CMS_VAR[37]", "CMS_VALUE[37]" ,
"CMS_VAR[39]", "CMS_VALUE[39]", "CMS_VAR[41]", "CMS_VALUE[41]" ,
"CMS_VAR[43]", "CMS_VALUE[43]", "CMS_VAR[45]", "CMS_VALUE[45]" ,
"CMS_VAR[47]", "CMS_VALUE[47]", "CMS_VAR[49]", "CMS_VALUE[49]" ,
"CMS_VAR[51]", "CMS_VALUE[51]", "CMS_VAR[54]", "CMS_VALUE[54]" ,
"CMS_VAR[57]", "CMS_VALUE[57]", "CMS_VAR[60]", "CMS_VALUE[60]" ,
"CMS_VAR[62]", "CMS_VALUE[62]", "CMS_VAR[65]", "CMS_VALUE[65]" ,
"CMS_VAR[68]", "CMS_VALUE[68]", "CMS_VAR[71]", "CMS_VALUE[71]" ,
"CMS_VAR[74]", "CMS_VALUE[74]", "CMS_VAR[77]", "CMS_VALUE[77]");

$query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'";

$db->query($query);

while ($db->next_record()) {
//$knurpsel replaces old $filename
$knurpsel[$db->f("idupl")] = $db->f("filename");

} // end while

function d_checked($which) {
if ($which != "") {
return "checked";
}
} // end function

echo "<table width=\"350\" cellspacing=\"1\" cellpadding=\"4\" border=\"0\" bgcolor=\"#000000\">
<tr bgcolor=\"#cccccc\" align=\"center\">
<td class=text>Aktiv</td>
<td class=text>Datei wählen</td>
</tr>";
for ( $i = 0; $i < 19; $i++ ){
echo "<tr bgcolor=\"#ffffff\" align=\"center\">
<td><input name=\"$werte[$wert]\" value=\"on\"";
$wert++;
echo "type=\"checkbox\" ".d_checked("$werte[$wert]")."></td>
<td>";
$wert++;
echo "<select name=\"$werte[$wert]\">";
$wert++;
if (is_array($knurpsel)) {
foreach ($knurpsel as $key => $value) {
if ("$werte[$wert]" == $key) {
echo "<option selected=\"selected\" value=\"". $key ."\">". $value ."</option>";
} else {
echo "<option value=\"". $key ."\">". $value ."</option>";
} // end if
} // end foreach
} // end if

echo " </select></td></tr>";
$wert++;
} // for ende
echo "</table>";


:arrow: OUTPUT: :arrow:
<?php



echo "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">";

if ("CMS_VALUE[1]" == "on") {

$s = "CMS_VALUE[3]";
$query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";

$db->query($query);
$db->next_record();

$file = $db->f("filename");
$href = $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");
$description = $db->f("description");

echo "<tr><td colspan=\"2\" heigth=\"1\" bgcolor=\"#FFFF99\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";
echo "<tr height=\"20\">
<td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#FFFF99\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a><BR>$description</td>
<td align=\"center\" width=\"20\" bgcolor=\"#FFFF99\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\" ></a></td>
</tr>";
echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";

} // end if

if ("CMS_VALUE[4]" == "on") {

$s = "CMS_VALUE[6]";
$query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
$db->query($query);
$db->next_record();

$file = $db->f("filename");
$href = $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");
$description = $db->f("description");

echo "<tr height=\"20\">
<td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#FFFFcc\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a><BR>$description</td>
<td align=\"center\" width=\"20\" bgcolor=\"#FFFFcc\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\" ></a></td>
</tr>";
echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";

} // end if

if ("CMS_VALUE[7]" == "on") {

$s = "CMS_VALUE[9]";
$query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
$db->query($query);
$db->next_record();

$file = $db->f("filename");
$href = $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");
$description = $db->f("description");

echo "<tr height=\"20\">
<td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#FFFFff\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a><BR>$description</td>
<td align=\"center\" width=\"20\" bgcolor=\"#FFFFff\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\" ></a></td>
</tr>";
echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";

} // end if

if ("CMS_VALUE[10]" == "on") {

$s = "CMS_VALUE[12]";
$query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
$db->query($query);
$db->next_record();

$file = $db->f("filename");
$href = $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");
$description = $db->f("description");

echo "<tr height=\"20\">
<td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#FFFF99\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a><BR>$description</td>
<td align=\"center\" width=\"20\" bgcolor=\"#FFFF99\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\" ></a></td>
</tr>";
echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";

} // end if

if ("CMS_VALUE[13]" == "on") {

$s = "CMS_VALUE[15]";
$query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
$db->query($query);
$db->next_record();

$file = $db->f("filename");
$href = $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");
$description = $db->f("description");

echo "<tr height=\"20\">
<td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#FFFFcc\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a><BR>$description</td>
<td align=\"center\" width=\"20\" bgcolor=\"#FFFFcc\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\"></a></td>
</tr>";
echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";

} // end if

if ("CMS_VALUE[16]" == "on") {

$s = "CMS_VALUE[18]";
$query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
$db->query($query);
$db->next_record();

$file = $db->f("filename");
$href = $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");
$description = $db->f("description");

echo "<tr height=\"20\">
<td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#FFFFff\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a><BR>$description</td>
<td align=\"center\" width=\"20\" bgcolor=\"#FFFFff\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\" ></a></td>
</tr>";
echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";

} // end if


if ("CMS_VALUE[19]" == "on") {

$s = "CMS_VALUE[21]";
$query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
$db->query($query);
$db->next_record();

$file = $db->f("filename");
$href = $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");
$description = $db->f("description");

echo "<tr height=\"20\">
<td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#FFFF99\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a><BR>$description</td>
<td align=\"center\" width=\"20\" bgcolor=\"#FFFF99\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\" ></a></td>
</tr>";
echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";

} // end if

if ("CMS_VALUE[22]" == "on") {

$s = "CMS_VALUE[24]";
$query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
$db->query($query);
$db->next_record();

$file = $db->f("filename");
$href = $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");
$description = $db->f("description");

echo "<tr height=\"20\">
<td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#FFFFcc\" class=\"text11bn\" width=\"\"><a class=\"main\" target=\"_blank\" href=\"$href\">$file</a><BR>$description</td>
<td align=\"center\" width=\"20\" bgcolor=\"#FFFFcc\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\" ></a></td>
</tr>";
echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";

} // end if

if ("CMS_VALUE[25]" == "on") {

$s = "CMS_VALUE[27]";
$query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
$db->query($query);
$db->next_record();

$file = $db->f("filename");
$href = $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");
$description = $db->f("description");

echo "<tr height=\"20\">
<td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#FFFFff\" class=\"text11bn\" width=\"\"><a class=main target=\"_blank\" href=\"$href\">$file</a><BR>$description</td>
<td align=\"center\" width=\"20\" bgcolor=\"#FFFFff\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\"></a></td>
</tr>";
echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";


} // end if

if ("CMS_VALUE[30]" == "on") {

$s = "CMS_VALUE[32]";
$query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
$db->query($query);
$db->next_record();

$file = $db->f("filename");
$href = $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");
$description = $db->f("description");

echo "<tr height=\"20\">
<td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#FFFF99\" class=\"text11bn\" width=\"\"><a class=main target=\"_blank\" href=\"$href\">$file</a><BR>$description</td>
<td align=\"center\" width=\"20\" bgcolor=\"#FFFF99\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\"></a></td>
</tr>";
echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";


} // end if

if ("CMS_VALUE[35]" == "on") {

$s = "CMS_VALUE[37]";
$query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
$db->query($query);
$db->next_record();

$file = $db->f("filename");
$href = $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");
$description = $db->f("description");

echo "<tr height=\"20\">
<td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#FFFFCC\" class=\"text11bn\" width=\"\"><a class=main target=\"_blank\" href=\"$href\">$file</a><BR>$description</td>
<td align=\"center\" width=\"20\" bgcolor=\"#FFFFCC\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\"></a></td>
</tr>";
echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";


} // end if

if ("CMS_VALUE[39]" == "on") {

$s = "CMS_VALUE[41]";
$query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
$db->query($query);
$db->next_record();

$file = $db->f("filename");
$href = $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");
$description = $db->f("description");

echo "<tr height=\"20\">
<td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#FFFFff\" class=\"text11bn\" width=\"\"><a class=main target=\"_blank\" href=\"$href\">$file</a><BR>$description</td>
<td align=\"center\" width=\"20\" bgcolor=\"#FFFFff\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\"></a></td>
</tr>";
echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";


} // end if

if ("CMS_VALUE[43]" == "on") {

$s = "CMS_VALUE[45]";
$query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
$db->query($query);
$db->next_record();

$file = $db->f("filename");
$href = $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");
$description = $db->f("description");

echo "<tr height=\"20\">
<td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#FFFF99\" class=\"text11bn\" width=\"\"><a class=main target=\"_blank\" href=\"$href\">$file</a><BR>$description</td>
<td align=\"center\" width=\"20\" bgcolor=\"#FFFF99\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\"></a></td>
</tr>";
echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";


} // end if


if ("CMS_VALUE[47]" == "on") {

$s = "CMS_VALUE[49]";
$query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
$db->query($query);
$db->next_record();

$file = $db->f("filename");
$href = $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");
$description = $db->f("description");

echo "<tr height=\"20\">
<td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#FFFFcc\" class=\"text11bn\" width=\"\"><a class=main target=\"_blank\" href=\"$href\">$file</a><BR>$description</td>
<td align=\"center\" width=\"20\" bgcolor=\"#FFFFcc\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\"></a></td>
</tr>";
echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";


} // end if

if ("CMS_VALUE[51]" == "on") {

$s = "CMS_VALUE[54]";
$query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
$db->query($query);
$db->next_record();

$file = $db->f("filename");
$href = $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");
$description = $db->f("description");

echo "<tr height=\"20\">
<td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#FFFFff\" class=\"text11bn\" width=\"\"><a class=main target=\"_blank\" href=\"$href\">$file</a><BR>$description</td>
<td align=\"center\" width=\"20\" bgcolor=\"#FFFFff\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\"></a></td>
</tr>";
echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";


} // end if

if ("CMS_VALUE[57]" == "on") {

$s = "CMS_VALUE[60]";
$query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
$db->query($query);
$db->next_record();

$file = $db->f("filename");
$href = $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");
$description = $db->f("description");

echo "<tr height=\"20\">
<td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#FFFF99\" class=\"text11bn\" width=\"\"><a class=main target=\"_blank\" href=\"$href\">$file</a><BR>$description</td>
<td align=\"center\" width=\"20\" bgcolor=\"#FFFF99\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\"></a></td>
</tr>";
echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";


} // end if

if ("CMS_VALUE[62]" == "on") {

$s = "CMS_VALUE[65]";
$query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
$db->query($query);
$db->next_record();

$file = $db->f("filename");
$href = $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");
$description = $db->f("description");

echo "<tr height=\"20\">
<td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#FFFFcc\" class=\"text11bn\" width=\"\"><a class=main target=\"_blank\" href=\"$href\">$file</a><BR>$description</td>
<td align=\"center\" width=\"20\" bgcolor=\"#FFFFcc\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\"></a></td>
</tr>";
echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";


} // end if


if ("CMS_VALUE[68]" == "on") {

$s = "CMS_VALUE[71]";
$query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
$db->query($query);
$db->next_record();

$file = $db->f("filename");
$href = $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");
$description = $db->f("description");

echo "<tr height=\"20\">
<td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#FFFFff\" class=\"text11bn\" width=\"\"><a class=main target=\"_blank\" href=\"$href\">$file</a><BR>$description</td>
<td align=\"center\" width=\"20\" bgcolor=\"#FFFFff\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\"></a></td>
</tr>";
echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";


} // end if

if ("CMS_VALUE[74]" == "on") {

$s = "CMS_VALUE[77]";
$query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf'"." AND idupl = '$s'";
$db->query($query);
$db->next_record();

$file = $db->f("filename");
$href = $cfgClient[$client]["htmlpath"]["frontend"] . $cfgClient[$client]["upload"]. $db->f("dirname") . $db->f("filename");
$description = $db->f("description");

echo "<tr height=\"20\">
<td style=\"padding-left:20px\" width=\"460\" bgcolor=\"#FFFF99\" class=\"text11bn\" width=\"\"><a class=main target=\"_blank\" href=\"$href\">$file</a><BR>$description</td>
<td align=\"center\" width=\"20\" bgcolor=\"#FFFF99\"><a target=\"_blank\" href=\"$href\"><img src=\"images/icons/diskette_out.gif\" border=\"0\"></a></td>
</tr>";
echo "<tr><td colspan=\"2\" heigth=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";


} // end if


echo "</table><br><br>";

?>

download

Verfasst: Fr 20. Feb 2004, 15:03
von kuchi
hallo,

möchte auch andere Filetypen downloaden können:

$query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf' and 'jpg'";

z.B Bilder oder avi ; was ist an obiger Abfrage falsch...

Gruß kuchi

Verfasst: Fr 20. Feb 2004, 15:41
von neu@cidnet.de
ich hab meine nur für pdf gemacht :(
schaade. aber da müsste mal ja noch was dran basteln können. :)

Verfasst: So 2. Mai 2004, 17:14
von hyperjojo
hi,

kannst du nicht die WHERE-Abrage einfach komplett rauslassen?
Habs nit probiert, sollte dann aber doch gehen.
Dann werden alle Downloads gezeigt.

Wie sieht es denn mit dem Modul mit Beschreibung aus??
Ist das schon irgendwo produktiv im Einsatz? Sowas bräuchte ich, nur die Dateinamen machen bei mir keinen Sinn...

ciao

JoJo

Re: download

Verfasst: So 2. Mai 2004, 18:03
von Halchteranerin
Hi Kuchi,

habe den Thread jetzt erst gesehen ... deswegen weiss ich nicht, ob's noch aktuell ist.
kuchi hat geschrieben: $query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf' and 'jpg'";

z.B Bilder oder avi ; was ist an obiger Abfrage falsch...
Ganz einfach, das ist kein richtiges SQL. ;-) Richtig waere:

Code: Alles auswählen

$query = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE filetype = 'pdf' or filetype="jpg";
Bei weiteren Dateitypen musst Du das eben mit or filetype="Dateityp" 'verlaengern'. So ist die richtige Syntax.

Gruss
Christa

download

Verfasst: Mo 3. Mai 2004, 09:47
von kuchi
Hallo Christa,

danke Dir für die Hilfe, es war irgendwie schon noch aktuell. Aber Du weißt ja wir haben alle recht wenig Zeit. Werde die geänderte SQL-Abfrage mal testen und melde mich dann nochmal.


Gruß kuchi

Verfasst: Fr 7. Mai 2004, 10:39
von hyperjojo
hi,

ist vielleicht untergegangen:

Irgendwer hatte das Modul doch mal so angepasst, dass man jeden Download beschreiben kann.
Da hätte ich schwer Interesse dran. Und wenn dann noch mehr als nur 9 Downloads möglich sind, wäre mein Glück vollendet. ;)

Danke schonmal!

Johannes