Location: PHPKode > projects > H-tracker > subtitles.php
<?
//
//  H-Tracker v0.2
//    http://h-tracker.org
//    Based on TorrentTrader (http://www.torrenttrader.org)
//
//
require_once("backend/functions.php");
dbconn();
//made by putyn @tbdev 

if(!function_exists(safe)){
function safe($var) {
    return str_replace(array('&', '>', '<', '"', '\'' ), array('&amp;', '&gt;', '&lt;', '&quot;', '&#039;' ), str_replace(array('&gt;', '&lt;', '&quot;', '&#039;', '&amp;'), array('>', '<', '"', '\'', '&'), $var));
}
}

$updir = $site_config['subs_dir'];
$maxsize = 500 * 1024;

$action = (isset($_GET["action"]) ? safe($_GET["action"]) : (isset($_POST["action"]) ? safe($_POST["action"]) : ''));
$mode = (isset($_GET["mode"]) ? safe($_GET["mode"]) : "");


if ($_SERVER["REQUEST_METHOD"] == "POST")
{
if ($action == "upload" || $action == "edit")
{
$lang = isset($_POST["language"]) ? safe($_POST["language"]) : "";
if (empty($lang))
show_error_msg("Upload failed","No language selected");

$releasename = isset($_POST["releasename"]) ? safe($_POST["releasename"]) : "";
if (empty($releasename))
show_error_msg("Upload failed","Use a descriptive name for you subtitle");

$imdb = isset($_POST["imdb"]) ? safe($_POST["imdb"]) : "";
if (empty($imdb))
show_error_msg("Upload failed","You forgot to add the imdb link");

$comment = isset($_POST["comment"]) ? safe($_POST["comment"]) : "";
$poster = isset($_POST["poster"]) ? safe($_POST["poster"]) : ""; 
if (empty($poster))
$poster = "images/nocover.jpg"; 
$fps = isset($_POST["fps"]) ? safe($_POST["fps"]) : "";
$cd = isset($_POST["cd"]) ? safe($_POST["cd"]) : "";

if ($action == "upload") {

$file = $_FILES["sub"];
if (!isset($file))
show_error_msg("Upload failed","The file can't be empty!");

if ($file["size"] > $maxsize)
show_error_msg("Upload failed","What the hell did you upload?");

$fname = $file["name"];
$temp_name = $file["tmp_name"];

$ext = (substr($fname ,-3));
$allowed = array("srt", "sub","txt");
if (!in_array($ext,$allowed))
show_error_msg("Upload failed","File not allowed only .srt , .sub , .txt  files");

$new_name = md5(time());
$filename = "$new_name.$ext";
$date = get_date_time();
$owner = $CURUSER["id"];
mysql_query("INSERT INTO subtitles (name , filename,imdb,comment, lang, fps, poster, cds, added, owner ) VALUES (" .implode(",", array_map("sqlesc", array($releasename, $filename,$imdb,$comment, $lang, $fps,$poster, $cd , $date, $owner ))).")") or sqlerr(__FILE__, __LINE__);

move_uploaded_file($temp_name, "$updir/$filename");
$id = mysql_insert_id();
header("Refresh: 0; url=subtitles.php?mode=details&id=$id");
}//end upload

if ($action == "edit"){

$id = isset($_POST["id"]) ? 0 + $_POST["id"] : 0; 
if ($id == 0)
show_error_msg("Err","Not a valid id");
else 
{
$res = mysql_query("SELECT * FROM subtitles WHERE id={$id} ") or sqlerr(__FILE__, __LINE__);
$arr = mysql_fetch_assoc($res);

if (mysql_num_rows($res) == 0)
show_error_msg("Sorry","There is no subtitle with that id");

if ($CURUSER["id"] != $arr["owner"] && get_user_class() < 5)
	show_error_msg("You're not the owner! How did that happen?\n");

	$updateset = array();
	if ($arr["name"] != $releasename)
	$updateset[] = "name = " . sqlesc($releasename);
	if ($arr["imdb"] != $imdb)
	$updateset[] = "imdb = " . sqlesc($imdb);
	if ($arr["lang"] != $lang)
	$updateset[] = "lang = " . sqlesc($lang);
	if ($arr["poster"] != $poster)
	$updateset[] = "poster = " . sqlesc($poster);
	if ($arr["fps"] != $fps)
	$updateset[] = "fps = " . sqlesc($fps);
	if ($arr["cds"] != $cd)
	$updateset[] = "cds = " . sqlesc($cd);
	if ($arr["comment"] != $comment)
	$updateset[] = "comment = " . sqlesc($comment);
	if (count($updateset) > 0)
	mysql_query("UPDATE subtitles SET " . join(",", $updateset) . " WHERE id ={$id} ") or sqlerr(__FILE__, __LINE__);
	header("Refresh: 0; url=subtitles.php?mode=details&id=$id");
	
}
}//end edit
}//end upload && edit 
}//end POST


if($mode == "upload" || $mode == "edit")
{

if ($mode == "edit"){
$id = isset($_GET["id"]) ? 0 + $_GET["id"] : 0;
if ($id == 0)
show_error_msg("Err","Not a valid id");
else 
{
$res = mysql_query("SELECT id, name, imdb, poster, fps, comment, cds, lang FROM subtitles WHERE id={$id} ") or sqlerr(__FILE__, __LINE__);
$arr = mysql_fetch_assoc($res);
if (mysql_num_rows($res) == 0)
show_error_msg("Sorry","There is no subtitle with that id");
}
}

stdhead("".($mode == "upload" ? "Upload new Subtitle" : "Edit subtitle ".$arr["name"]."")."");
begin_frame("".($mode == "upload" ? "New Subtitle" : "Edit subtitle ".$arr["name"]."")."");?>
<script type="text/javascript">
function checkext(upload_field)
{
    var re_text = /\.sub|\.srt|\.txt/i;
    var filename = upload_field.value;

    /* Checking file type */
    if (filename.search(re_text) == -1)
    {
        alert("File does not have allowed (sub, srt, txt) extension");
        upload_field.form.reset();
        return false;
    }
}
</script>
<form enctype="multipart/form-data" method="post" action="<?$PHP_SELF?>">
<table width="98%" class="ttable_head" align="center" cellpadding="5" cellspacing="0">
<? if ($mode == "upload") {?>
<tr><td colspan="2" align="center" class="ttable_col1"><font color="red"><b>Only .srt, .sub , .txt  file are accepted<br>Max file size <?=mksize($maxsize)?><b></font></td></tr>
<? } ?>
<tr><td class="ttable_col1" border="1">Language&nbsp;<font color="red">*</font></td><td align="left"><select name="language" title="Select the subtitle language">
	<option value="">- Select -</option>
	<option value="ro" <?=($mode == "edit" && $arr["lang"] == "ro" ? "selected=\"selected\"" : "")?>>Romanian</option>
	<option value="eng" <?=($mode == "edit" && $arr["lang"] == "eng" ? "selected=\"selected\"" : "")?>>English</option>
	<option value="swe" <?=($mode == "edit" && $arr["lang"] == "swe" ? "selected=\"selected\"" : "")?>>Swedish</option>
	<option value="dan" <?=($mode == "edit" && $arr["lang"] == "dan" ? "selected=\"selected\"" : "")?>>Danish</option>
	<option value="nor" <?=($mode == "edit" && $arr["lang"] == "nor" ? "selected=\"selected\"" : "")?>>Norwegian</option>
	<option value="fin" <?=($mode == "edit" && $arr["lang"] == "fin" ? "selected=\"selected\"" : "")?>>Finnish</option>
	<option value="spa" <?=($mode == "edit" && $arr["lang"] == "spa" ? "selected=\"selected\"" : "")?>>Spanish</option>
	<option value="fre" <?=($mode == "edit" && $arr["lang"] == "fre" ? "selected=\"selected\"" : "")?>>French</option>
</select>
</td></tr>
<tr><td class="ttable_col1" border="1">Release Name&nbsp;<font color="red">*</font></td><td align="left"><input type="text" name="releasename" size="50" value="<?=($mode == "edit" ? $arr["name"] : "")?>"  title="The releasename of the movie (Example:Disturbia.2007.DVDRip.XViD-aAF)"/></td></tr>
<tr><td class="ttable_col1" border="1">IMDB link&nbsp;<font color="red">*</font></td><td align="left"><input type="text" name="imdb" size="50" value="<?=($mode == "edit" ? $arr["imdb"] : "")?>" title="Copy&Paste the link from IMDB for this movie"/></td></tr>
<? if ($mode == "upload") {?>
<tr><td class="ttable_col1" border="1">SubFile&nbsp;<font color="red">*</font></td><td align="left"><input type="file" name="sub" size="36" onChange="checkext(this)" title="Only .rar and .zip file allowed"/></td></tr>
<? }?>
<tr><td class="ttable_col1" border="1">Poster</td><td align="left"><input type="text" name="poster" size="50" value="<?=($mode == "edit" ? $arr["poster"] : "")?>" title="Direct link to a picture"/></td></tr>
<tr><td class="ttable_col1" border="1">Comments</td><td align="left"><textarea rows="5" cols="45" name="comment" title="Any specific details about this subtitle we need to know"><?=($mode == "edit" ? $arr["comment"] : "")?></textarea>
<tr><td class="ttable_col1" border="1">FPS</td><td align="left"><select name="fps">
<option value="0">- Select -</option>
<option value="23.976" <?=($mode == "edit" && $arr["fps"] == "23.976" ? "selected=\"selected\"" : "")?> >23.976</option>
<option value="23.980" <?=($mode == "edit" && $arr["fps"] == "23.980" ? "selected=\"selected\"" : "")?>>23.980</option>
<option value="24.000" <?=($mode == "edit" && $arr["fps"] == "24.000" ? "selected=\"selected\"" : "")?>>24.000</option>
<option value="25.000" <?=($mode == "edit" && $arr["fps"] == "25.000" ? "selected=\"selected\"" : "")?>>25.000</option>
<option value="29.970" <?=($mode == "edit" && $arr["fps"] == "29.970" ? "selected=\"selected\"" : "")?>>29.970</option>
<option value="30.000" <?=($mode == "edit" && $arr["fps"] == "30.000" ? "selected=\"selected\"" : "")?>>30.000</option>
</select>
</td></tr>
<tr><td class="ttable_col1" border="1">CD<br/>number</td><td align="left"><select name="cd">
<option value="0" >- Select -</option>
<option value="1" <?=($mode == "edit" && $arr["cds"] == "1" ? "selected=\"selected\"" : "")?>>1CD</option>
<option value="2" <?=($mode == "edit" && $arr["cds"] == "2" ? "selected=\"selected\"" : "")?>>2CD</option>
<option value="3" <?=($mode == "edit" && $arr["cds"] == "3" ? "selected=\"selected\"" : "")?>>3CD</option>
<option value="4" <?=($mode == "edit" && $arr["cds"] == "4" ? "selected=\"selected\"" : "")?>>4CD</option>
<option value="5" <?=($mode == "edit" && $arr["cds"] == "5" ? "selected=\"selected\"" : "")?>>5CD</option>
<option value="255" <?=($mode == "edit" && $arr["cds"] == "255" ? "selected=\"selected\"" : "")?>>More</option>

</select>
</td></tr>
<tr><td colspan="2" align="center" class="ttable_col1">
<? if($mode == "upload") {?>
<input type="submit" class="lbutton" value="Upload it" />
<input type="hidden" name="action" value="upload">
<? } else { ?>
<input type="submit" value="Edit it"/>
<input type="hidden" name="action" value="edit" />
<input type="hidden" name="id" value="<?=$arr["id"]?>" />
<?}?>
</td></tr>
</table>
</form>
<?
end_frame();
stdfoot();
}
//delete subtitle
elseif ($mode == "delete")
{
$id = isset($_GET["id"]) ? 0 + $_GET["id"] : 0;
if ($id == 0)
show_error_msg("Err","Not a valid id");
else 
{
$res = mysql_query("SELECT id, name, filename FROM subtitles WHERE id={$id} ") or sqlerr(__FILE__, __LINE__);
$arr = mysql_fetch_assoc($res);
if (mysql_num_rows($res) == 0)
show_error_msg("Sorry","There is no subtitle with that id");

$sure = (isset($_GET["sure"]) && $_GET["sure"] == "yes") ? "yes" : "no" ;
if ($sure == "no" )
show_error_msg("Sanity check...","Your are about to delete subtitile <b>".safe($arr["name"])."</b> . Click <a href=subtitles.php?mode=delete&amp;id=$id&amp;sure=yes>here</a> if you are sure.",1) ;
else{
mysql_query("DELETE FROM subtitles WHERE id={$id} ") or sqlerr(__FILE__,__LINE__);
$file = $updir.'/'.$arr["filename"];
@unlink($file);
header("Refresh: 0; url=subtitles.php");
}
}
}
//end delete subtitle
elseif ($mode == "details")
{
$id = isset($_GET["id"]) ? 0 + $_GET["id"] : 0;
if ($id == 0)
show_error_msg("Err","Not a valid id");
else 
{
$res = mysql_query("SELECT s.id, s.name,s.lang, s.imdb,s.fps,s.poster,s.cds,s.hits,s.added,s.owner,s.comment, u.username FROM subtitles AS s LEFT JOIN users AS u ON s.owner=u.id  WHERE s.id={$id} ") or sqlerr(__FILE__, __LINE__);
$arr = mysql_fetch_assoc($res);
if (mysql_num_rows($res) == 0)
show_error_msg("Sorry","There is no subtitle with that id");

if ($arr["lang"] == "ro")
$lang = "<img src=\"images/subtitles/Romania.png\" border=\"0\" alt=\"Romanian\" title=\"Romanian\" />";
elseif ($arr["lang"] == "eng")
$lang = "<img src=\"images/subtitles/England.png\" border=\"0\" alt=\"English\" title=\"English\" />";
elseif ($arr["lang"] == "swe")
$lang = "<img src=\"images/subtitles/Sweden.png\" border=\"0\" alt=\"Swedish\" title=\"Swedish\" />";
elseif ($arr["lang"] == "dan")
$lang = "<img src=\"images/subtitles/Denmark.png\" border=\"0\" alt=\"Danish\" title=\"Danish\" />";
elseif ($arr["lang"] == "nor")
$lang = "<img src=\"images/subtitles/Norway.png\" border=\"0\" alt=\"Norwegian\" title=\"Norwegian\" />";
elseif ($arr["lang"] == "fin")
$lang = "<img src=\"images/subtitles/Finland.png\" border=\"0\" alt=\"Finnish\" title=\"Finnish\" />";
elseif ($arr["lang"] == "spa")
$lang = "<img src=\"images/subtitles/Spain.png\" border=\"0\" alt=\"Spanish\" title=\"Spanish\" />";
elseif ($arr["lang"] == "fre")
$lang = "<img src=\"images/subtitles/France.png\" border=\"0\" alt=\"French\" title=\"French\" />";
else
$lang = "<b>Other</b>";
stdhead("Details for ".safe($arr["name"])."");
begin_frame("Details for ".safe($arr["name"])."");

?>
<table width="98%" cellpadding="5" cellspacing="0" class="ttable_col1" border="0" align="center"">
<tr><td width="150" rowspan="10" valign="top" align="center"><a href="<?=$arr["poster"]?>" rel="ibox"><img src="<?=$arr["poster"]?>" width="130" height="165" border="0" alt="<?=$arr["name"]?>" /></a>
<br/><br/><form action="downloadsub.php" method="post">
<input type="hidden" name="sid" value="<?=$arr["id"]?>" />
<input type="submit" value="Download"/>
<input type="hidden" name="action" value="download" />
</form><br/>
<a href="#" onclick="window.open('subtitles.php?mode=preview&id=<?=$arr["id"]?>','','height=500,width=400,resizable=yes,scrollbars=yes,position=center')" ><input type="submit" value="Preview"/></a>
</td></tr>
<tr><td align="left">Name :&nbsp;<b><?=safe($arr["name"])?></b></td></tr>
<tr><td align="left">IMDb :&nbsp;<a href="<?=safe($arr["imdb"])?>" target="_blank" ><?=safe($arr["imdb"])?></a></td></tr>
<tr><td align="left">Language :&nbsp;<?=$lang?></td></tr>
<?
if (!empty($arr["comment"])) {
?>
<tr><td align="left"><fieldset><legend><b>Comment</b></legend>&nbsp;<?=safe($arr["comment"])?></fieldset></td></tr>
<?}?>
<tr><td align="left">FPS :&nbsp;<b><? print($arr["fps"] == 0 ? "Unknow" : safe($arr["fps"]));?></b></td></tr>
<tr><td align="left">Cd# :&nbsp;<b><? print($arr["cds"] == 0 ? "Unknow" : ($arr["cds"] == 255 ? "More than 5 " : safe($arr["cds"])) );?></b></td></tr>
<tr><td align="left">Hits :&nbsp;<b><?=$arr["hits"]?></b></td></tr>
<tr><td align="left">Uploader :&nbsp;<b><a href="account-details.php?id=<?=$arr["owner"]?>" target="_blank"><?=$arr["username"]?></a>&nbsp;&nbsp;
<? if ($arr["owner"] == $CURUSER["id"] || get_user_class() > 5) { ?>
<a href="subtitles.php?mode=edit&amp;id=<?=$arr["id"]?>"><img src="images/buttons/edit.png" title="Edit Subtitle" style="border:none;padding:2px;" /></a>
<a href="subtitles.php?mode=delete&amp;id=<?=$arr["id"]?>"><img src="images/buttons/delete.png" title="Delete Subtitle" style="border:none;padding:2px;" /></a>
<? }?>
</td></tr>
<tr><td align="left">Added :&nbsp;<b><?=$arr["added"]?></b></td></tr>
</table>
<?
end_frame();
stdfoot();
}
}
elseif ($mode== "preview")
{
$id = isset($_GET["id"]) ? 0 + $_GET["id"] : 0;
if ($id == 0)
show_error_msg("Err","Not a valid id");
else 
{
$res = mysql_query("SELECT id, name,filename FROM subtitles  WHERE id={$id} ") or sqlerr(__FILE__, __LINE__);
$arr = mysql_fetch_assoc($res);
if (mysql_num_rows($res) == 0)
show_error_msg("Sorry","There is no subtitle with that id");
$file = $updir."/".$arr["filename"]; 
$fileContent = file_get_contents($file);

print("<html><title>Preview for - ".$arr["name"]."</title>
<body bgcolor=\"#CCCCCC\">
<div style=\"white-space:pre; color:#333333;font-family:tahoma; font-size:12px;\">".safe($fileContent)."</div></body></html>");
}
}
else
{

$s = (isset($_GET["s"]) ? safe($_GET["s"]) : "");
$w = (isset($_GET["w"]) ? safe($_GET["w"]) : "");

if ($s && $w == "name")
$where = "WHERE s.name LIKE ".sqlesc("%".$s."%");
elseif ($s && $w == "imdb")
$where = "WHERE s.imdb LIKE ".sqlesc("%".$s."%");
elseif ($s && $w == "comment")
$where = "WHERE s.comment LIKE ".sqlesc("%".$s."%");
else $where = "";

$link = ($s && $w ? "s=$s&amp;w=$w&amp;" : "");

$count = get_row_count("subtitles AS s","$where");
if ($count == 0 && !$s && !$w)
show_error_msg ("Error","There is no subtitle, go <a href=\"subtitles.php?mode=upload\">here</a> and start uploading.",1);
stdhead("Subtitles");
begin_frame("Subtitles");

$perpage = 5;
list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, "subtitles.php?".$link);
$res = sql_query("SELECT s.id, s.name,s.lang, s.imdb,s.fps,s.poster,s.cds,s.hits,s.added,s.owner,s.comment, u.username FROM subtitles AS s LEFT JOIN users AS u ON s.owner=u.id $where ORDER BY s.added DESC $limit ") or sqlerr(__FILE__, __LINE__);

 
?>
<table width="98%" cellpadding="5" cellspacing="0" border="1" align="center" style="font-weight:bold" >
<tr><td class="ttable_col1" align="center">Search</td></tr>
<tr>
<td align="center">
<form action="subtitles.php" method="get">
<input size="50" value="<?=$s?>" name="s" type="text" />
<select name="w" >
<option value="name" <?=($w == "name" ? "selected" : "")?>>Name</option>
<option value="imdb" <?=($w == "imdb" ? "selected" : "")?>>IMDb</option>
<option value="comment" <?=($w == "comment" ? "selected" : "")?> >Comments</option>
</select>

<input type="submit" class="lbutton" value="Search" />&nbsp;<input type="button" onClick="window.location.href='subtitles.php?mode=upload'" class="lbutton" value="Upload" />
</form>
</td></tr>
<? if ($s) {?>
<tr><td style="border:none;">Search result for <i>"<?=$s?>"</i><br/>
<?=(mysql_num_rows($res) == 0 ? "Nothing found! Try again with a refined search string." : "" )?>
</td></tr>
<?}?>
</table>
<br/>
<?
if (mysql_num_rows($res) > 0) {
if ($count > $perpage )
print("<div align=\"left\" style=\"padding:5px\">$pagertop</div>");

 ?>
<table width="98%" cellpadding="5" cellspacing="0" border="1" align="center" style="font-weight:bold" >
<tr><td class="ttable_col1" align="center">Language</td>
<td class="ttable_col1" align="left" style="width:80%">Name</td>
<td class="ttable_col1" align="center">IMDb</td>
<td class="ttable_col1" align="center">FPS</td>
<td class="ttable_col1" align="center">CD#</td>
<?
while ($arr = mysql_fetch_assoc($res)) {
if ($arr["lang"] == "ro")
$lang = "<img src=\"images/subtitles/Romania.png\" border=\"0\" alt=\"Romanian\" title=\"Romanian\" />";
elseif ($arr["lang"] == "eng")
$lang = "<img src=\"images/subtitles/England.png\" border=\"0\" alt=\"English\" title=\"English\" />";
elseif ($arr["lang"] == "swe")
$lang = "<img src=\"images/subtitles/Sweden.png\" border=\"0\" alt=\"Swedish\" title=\"Swedish\" />";
elseif ($arr["lang"] == "dan")
$lang = "<img src=\"images/subtitles/Denmark.png\" border=\"0\" alt=\"Danish\" title=\"Danish\" />";
elseif ($arr["lang"] == "nor")
$lang = "<img src=\"images/subtitles/Norway.png\" border=\"0\" alt=\"Norwegian\" title=\"Norwegian\" />";
elseif ($arr["lang"] == "fin")
$lang = "<img src=\"images/subtitles/Finland.png\" border=\"0\" alt=\"Finnish\" title=\"Finnish\" />";
elseif ($arr["lang"] == "spa")
$lang = "<img src=\"images/subtitles/Spain.png\" border=\"0\" alt=\"Spanish\" title=\"Spanish\" />";
elseif ($arr["lang"] == "fre")
$lang = "<img src=\"images/subtitles/France.png\" border=\"0\" alt=\"French\" title=\"French\" />";
else
$lang = "<b>Other</b>";
$char1 = 20; //cut name length 
$smallname = CutName(htmlspecialchars($arr["name"]), $char1);
$dispname = "$smallname";
$char2 = 37; //cut name length 
$smallname2 = CutName(htmlspecialchars($arr["name"]), $char2);
if ($arr["owner"] == $CURUSER["id"] || get_user_class() > 5) { 
?>
<td class="ttable_col1" align="center">Tools</td>
<?}?>

<tr valign="middle">
<td align="center"><?=$lang?></td>
<?
 print("<td><a href=\"subtitles.php?mode=details&amp;id=$arr[id]\" onMouseover=\"return overlib('<table width=100% class=ttable_col1 cellspacing=0 cellpadding=5 align=center><tr><td class=ttable_head colspan=2 align=center>$smallname</td></tr><tr valign=top><td align=center><img border=0 width=120 src=$arr[poster]></td><td><div align=left><b>Date Added: </b><br>" . $arr["added"] . "<br /><b>Uploader: </b>". $arr["username"] . "<br /></div><div align=left><b><b>Hits: </b>" . $arr["hits"] . "<br /></div></td></tr></table>')\"; onMouseout=\"return nd()\">$smallname2</a>");
?>
<td align="center"><a href="<?=safe($arr["imdb"])?> "  target="_blank"><img src="images/imdb.gif" border="0"/></a></td>
<td align="center"><?=($arr["fps"] == 0 ? "Unknow" : safe($arr["fps"]));?></td>
<td align="center"><?=($arr["cds"] == 0 ? "Unknow" : ($arr["cds"] == 255 ? "More than 5 " : safe($arr["cds"])) );?></td>
<? if ($arr["owner"] == $CURUSER["id"] || get_user_class() > 5) {
?>
<td align="center" nowrap="nowrap">
<a href="subtitles.php?mode=edit&amp;id=<?=$arr["id"]?>"><img src="images/buttons/edit.png" title="Edit Subtitle" style="border:none;padding:2px;" /></a>
<a href="subtitles.php?mode=delete&amp;id=<?=$arr["id"]?>"><img src="images/buttons/delete.png" title="Delete Subtitle" style="border:none;padding:2px;" /></a>
</td>
<? } ?>

</tr>
<? } ?>
</table>
<? }

end_frame();
stdfoot();
}
?>
Return current item: H-tracker