File: /home/httpd/html/seekya.com/DEAD/manage/admin_item.php
<?php session_start();
include("../includes/connect.php");
include("../includes/func.php");?>
<?php if (empty($_SESSION["admin"])) redirect("index.php?e=1");
$sql="SELECT V.*,C.category_name from video_master V,category_master C where V.video_category=C.category_id order by V.video_id desc";
$cmd = mysql_query($sql);
//Single Delete
if (!empty($_GET["delid"])) {
mysql_query("delete from `video_master` where `video_id`=" . $_GET["delid"]);
redirect($_SERVER["HTTP_REFERER"]);
}
?>
<?php include("includes/header.php"); ?>
<??>
<form name="frmMain" action="member.php" method=post>
<table width="98%" height="100" border="0" align="center" cellpadding="5" cellspacing="5">
<tr>
<td height="50"><span style="font-weight: bold">Video Management </span> <br><br>
<font size=1>NOTE:To download a video Right Click on "View Video" and select "Save target as..." option</font>
<hr size="1"> </td>
</tr>
<?php
//if any records retrieved
if (mysql_num_rows($cmd) != 0) {
?>
<tr>
<td class="BlackAri12B" colspan=2><table width="100%" border="0" cellpadding="2" cellspacing="1" class="bgDarkGray">
<tr class="bgLightGray">
<td width="5%"> </td>
<td width="20%" class="BlackAri12B">Video Title</td>
<td width="10%" class="BlackAri12B">Category</td>
<td width="60%" class="BlackAri12B">Description</td>
<td width="5%" class="BlackAri12B"><small>Status</small></td>
<td width="5%" class="BlackAri12B"><small>Home<br>page</small></td>
</tr>
<?php getErr("4"); ?>
<tr>
<td colspan="7" height="10" class="bgWhite"></td>
</tr>
<?php
//loop thru records and display category listing
while ($rs = mysql_fetch_array($cmd)) {
if ($bgclass == "bgExtraLightGray")
$bgclass = "bgWhite";
else
$bgclass = "bgExtraLightGray";
?>
<tr class="<?php echo($bgclass); ?>">
<td><table border="0" align="center">
<tr>
<td valign=top><a href="javascript:" onClick="openWin('itemPopup.php?video_id=<?php echo($rs["video_id"]); ?>', 'width=650, height=480');"><img src="../images/icons/view.gif" width="16" height="16" border="0" alt="Edit Record"></a></td>
<td><a href="admin_item.php?delid=<?php echo($rs["video_id"]); ?>" onClick="return window.confirm('Are you sure you want to delete this record.');"><img
src="../images/icons/delete.gif" width="16" height="16" border="0" alt="Delete Record"></a><br><br></td>
<tr><td colspan=2>
<?if (str_contains(strtolower($rs["video_image"]), "http://")) {?>
<img src="<?=$rs["video_image"];?>" width="50" height="50" border="0">
<?}
else
{
if ($rs["video_image"]!='') {?>
<img src="../videoimages/<?=$rs["video_image"];?>" width="50" height="50" border="0">
<?}
}?>
</td>
</tr>
</table></td>
<td class="BlackAri12" valign=top width="20%"><small> <?php echo($rs["video_title"]); ?><br><br>
Video Size(kb) : <?php echo($rs["video_size"]); ?><br><br>
<a href="../videodir/<?php echo($rs["video_file"]); ?>">
<?if (str_contains(strtolower($rs["video_file"]), "http://")) {?>
<a href="<?php echo($rs["video_file"]); ?>">
<?}
else
{
if ($rs["video_file"]!='') {?>
<a href="../videodir/<?php echo($rs["video_file"]); ?>">
<?}
}?>
<font size=1 color=blue>View Video</font></a>
<br><br>
<a href="../videoimages/<?php echo($rs["video_image"]); ?>" target=_blank>
<?if (str_contains(strtolower($rs["video_image"]), "http://")) {?>
<a href="<?php echo($rs["video_image"]); ?>" target=_blank>
<?}
else
{
if ($rs["video_image"]!='') {?>
<a href="../videoimages/<?php echo($rs["video_image"]); ?>" target=_blank>
<?}
}?>
<font size=1 color=blue>View Image</font></a>
</small></td>
<td class="BlackAri12" valign=top width="10%"><small> <?php echo($rs["category_name"]); ?></small>
</td>
<td class="BlackAri12" width="50%" valign=top> <small><?php echo($rs["video_description"]); ?><br><br>
<?php echo($rs["video_warning"]); ?>
</small>
<br><a href="createadmin.php?video_code=<?php echo($rs["video_code"]); ?>&frame=1" target=_blank><font size=1 color=blue>Create Thumbnail</a>
</td>
<td align="center"><?php stsfx($rs["video_status"]); ?></td>
<td align="center"><?php stsfx($rs["video_homepage"]); ?></td>
</tr>
<?php } ?>
</table></td>
</tr>
<?php } else { ?>
<tr>
<td align="center" class="err">No Item found.</td>
</tr>
<?php } ?>
<tr>
<td height="50" align="center"> </td>
</tr>
</table>
</form>
<?php include("includes/footer.php"); ?>