admin"; // log if ($query) { $fp = fopen('log.txt', 'a'); $nl = "\n"; fputs($fp, $query." ".$num_found." ".$where.$nl); fclose($fp); } if ($num_found) { echo ''; // status added or updated if ($mode == "new") { echo ''; } echo ''; $linecolor = "row1"; while($row = mysql_fetch_object($ergebnis)) { echo ''; if ($linecolor == "row1") { $linecolor = "row2"; } else { $linecolor = "row1"; } // status added or updated if ($mode == "new") { echo ''; } if (!$titel = $row->titel) $titel = "no name"; echo '"; echo ""; echo ''; echo ""; } // wend } // end if $num_found // unteres vor/zurück schalt-menu if ($num_found && $query == "" && $mode == "" && $letter == "") { echo ''; } echo "
Demos
'; // Buchstabenleiste echo '
'; foreach(range('A','Z') as $char) { echo ' ',$char,''; } echo '
'; if ($letter) { echo "Found $num_found entries starting with $letter."; } else if ($num_found) { if ($query != "" or $mode != "") { if ($mode != "") { if ($mode == "new") { echo 'Found ',$num_found,' recently added or changed items ('; if ($days == 1) { echo 'today, week, month'; } else if ($days == 7) { echo 'today, week, month'; } else if ($days == 30) { echo 'today, week, month'; } else { echo '',$days,' days, today, week, month'; } echo ').'; } if ($mode == "wanted") echo "Found $num_found currently wanted items."; } else{ echo "Found $num_found cases of '$query':"; } } else{ echo "listing all $num_entries entries"; echo ', showing '; if ($range > 0) echo '<< '; $end = $range+$numshow; if ($end > $num_entries) $end = $num_entries; echo $range+1," to ",$end; if ($end < $num_entries) echo ' >>'; } } else if ($tooshort) { echo "Search string '$query' too short."; } else { echo "No match with '$query'."; } function buildlink() { global $query; global $letter; global $mode; global $edit; global $where; if ($query) echo '&query=',$query; if ($letter) echo '&letter=',$letter; if ($mode) echo '&mode=',$mode; if ($edit) echo '&edit=',$edit; if ($where) echo '&where=',$where; } function fixdate($date) { if ($date == "0000-00-00") return ""; return substr($date,0,4); /* if (substr($date, 5) == "00-00") return substr($date,0,4); if (substr($date, 8) == "00") return substr($date,0,7); return $date; */ } echo "
Title from Group at PartyType Date
'; $stat = "added"; if ($row->updated != "0000-00-00") $stat = "updated"; echo $stat; echo '',$titel; if ($row->picurl) echo ' [screenshoot]'; echo ''; if ($row->missing) echo ' missing'; if ($row->unreleased) echo ' unreleased'; echo ''; // group(s) column with GROUP to Group conversion $ind = 0; $names = explode(',',$row->gruppe); foreach($names as $name) { // $name = strtolower($name); // $name = ucwords($name); $names[$ind] = ''.$name.''; $ind++; } $name = implode(', ', $names); echo $name; echo ''; // Party column if ($partyid = $row->partyid) { $parties = mysql_query("SELECT name, date FROM parties WHERE id = '$partyid'"); $party = mysql_fetch_object($parties); echo ''; // echo '[party release]'; echo $party->name; echo ''; if (!$datum = $row->datum) $datum = $party->date; mysql_free_result($parties); } else { echo $row->releaseinfo; $datum = $row->datum; } echo "$row->klasse', fixdate($datum), '
'; echo "listing all $num_entries entries"; echo ', showing '; if ($range > 0) echo '<< '; $end = $range+$numshow; if ($end > $num_entries) $end = $num_entries; echo $range+1," to ",$end; if ($end < $num_entries) echo ' >>'; echo '
"; if (!$tooshort) mysql_free_result($ergebnis); ?>