Location: PHPKode > projects > Poddy > src/maintainance/list_pods.php
<?php
session_start();

$filter = $_REQUEST["filter"];
if (empty($filter)) {
	$filter = $_SESSION["filter"];
}
$_SESSION["filter"] = $filter;

?>
<html>
<head>
<title>List Podcasts</title>
</head>
<body>
<a href="index.php">Zum Hauptmen√ľ</a>
<hr/>

Sortierung: 
<a href="list_pods.php?order_by=title&order_dir=asc">Name aufsteigend</a>
<a href="list_pods.php?order_by=title&order_dir=desc">Name absteigend</a>
<a href="list_pods.php?order_by=addeddate&order_dir=asc">Datum aufsteigend</a>
<a href="list_pods.php?order_by=addeddate&order_dir=desc">Datum absteigend</a>

<hr/>

<form action="edit_pod.php"><input type="submit" value="Neuer RSS-Feed (manuell) "/></form>
<form action="import_pod.php"><input type="text" size="40" name="rss_url"/> UTF8:<input type="checkbox" name="utf8_decode" value="utf8_decode"/><input type="submit" value="RSS-Feed Import"/></form>
<form action="update_pods.php"><input type="submit" value="RSS-Listings importieren (Alle)" />Mit Icons:<input type="checkbox" name="update_icons" value="update_icons"/></form>
<form action="ingest_pods.php"><input type="submit" value="Dateien konvertieren (Alle)" /></form>

<hr/>

<form action="list_pods.php">
<input type="text" name="filter" value="<? echo $filter ?>"/><input type="submit" value="Filter"/>
</form>

<?php
require_once("../config.php");
require_once("lib/db_utils.php");
require_once("lib/guid_utils.php");
require_once("lib/path_utils.php");
require_once("lib/xml.php");



$sql = "select podcast.* from podcast ";
if (!empty($filter)) {
	$sql .= " where title like '%".$filter."%' ";
}
if (empty($_REQUEST["order_by"])) {
	$_REQUEST["order_by"] = "addeddate";
	$_REQUEST["order_dir"] = "desc";
}
$sql .= " order by ".$_REQUEST["order_by"]." ".$_REQUEST["order_dir"];

$podcasts = array();
$rs = db_query($sql);
while ($row = db_next_row($rs)) {
	$podcasts[] = $row;
}

echo "<table border='1'><tr><th>Titel</th><th>Pubdate</th><th>Url</th><th>Icon</th><th>Gelöscht</th><th>&nbsp;</th></tr>";
foreach ($podcasts as $podcast) {
	echo "<tr>";
	echo "<td><a href='list_items.php?podcast_id=".$podcast["id"]."'>".$podcast["title"]."</a></td>";
	echo "<td>".$podcast["pubdate"]."</td>";
	echo "<td>&nbsp;";
	if (!empty($podcast["link"])) {
		echo "<a href='".$podcast["link"]."' target='_blank'>WWW</a> ";
	}
	if (!empty($podcast["rss_url"])) {
		echo "<a href='".$podcast["rss_url"]."' target='_blank'>".$podcast["rss_url"]." (RSS)</a>";
	}
	echo "</td>";
	if ($podcast["has_icon"])
		echo "<td><img src='".URL_BASE_ICONS.get_icon_path($podcast, "png")."'/></td>";
	else 
		echo "<td>&nbsp;</td>";
	echo "<td>".($podcast["deleted"] == 1 ? "ja" : "nein")."</td>";
	echo "<td><a href='edit_pod.php?id=".$podcast["id"]."'>Bearbeiten</a>&nbsp;<a href='delete_pod.php?id=".$podcast["id"]."'>L&ouml;schen</a><br/>";
	if (!empty($podcast["rss_url"])) {
		echo "<a href='update_pods.php?id=".$podcast["id"]."'>RSS-Listing importieren</a> ";
	}
	echo "<a href='ingest_pods.php?podcast_id=".$podcast["id"]."'>Dateien konvertieren</a>&nbsp;</td>";
	echo "</tr>";
}
echo "</table>";
?>
</body>
</html>
Return current item: Poddy