Vorlage:Legende: Unterschied zwischen den Versionen

Aus Afterbuy-Wiki
Wechseln zu:Navigation, Suche
Zeile 1: Zeile 1:
<table class="table table-hover sortable"><tr><th>Name</th><th>Beschreibung</th></tr>
+
<table class="table table-hover sortable">
 
<phptag>
 
<phptag>
 
if(is_array($argv) && !empty($argv)){
 
if(is_array($argv) && !empty($argv)){
 
array_shift( $argv );
 
array_shift( $argv );
print_r($argv);
+
$name="Name";
 +
if(isset($argv['name']) && trim($argv['name'])!=""){
 +
$name=trim($argv['name']);
 +
}
 +
$description="Beschreibung";
 +
if(isset($argv['description']) && trim($argv['description'])!=""){
 +
$description=trim($argv['description']);
 +
}
 
if(isset($argv[0]) && trim($argv[0])!=""){
 
if(isset($argv[0]) && trim($argv[0])!=""){
 +
echo '<tr><th>'.$name.'</th><th>'.$description.'</th></tr>';
 
$lines=explode('>>',$argv[0]);
 
$lines=explode('>>',$argv[0]);
 
foreach($lines as $line){
 
foreach($lines as $line){
 
  if(trim($line)!=""){
 
  if(trim($line)!=""){
 
  $cells=explode('::',trim($line));
 
  $cells=explode('::',trim($line));
  echo '<tr><td class="font-weight-bold" style="width:33%;" align="left">'.addcslashes ( trim($cells[0]),"'" ).'</td><td>'.addcslashes ( trim($cells[1]),"'").'</td></tr>';
+
  echo '<tr><td class="font-weight-bold" style="width:33%;" align="left">'.trim($cells[0]).'</td><td>'.trim($cells[1]).'</td></tr>';
 
  }
 
  }
 
}
 
}

Version vom 15. April 2021, 15:31 Uhr