録画番組削除
次の番組を削除しました。
ファイル名 |
タイトル |
話数 |
サブタイ |
//--
foreach ($delete as $fName) {
$filesplit = split("-",$fName);
if ($filesplit[1] == ""){
$query = "
SELECT
foltia_program.tid,foltia_program.title,foltia_subtitle.subtitle
FROM foltia_subtitle , foltia_program
WHERE foltia_program.tid = foltia_subtitle.tid
AND foltia_subtitle.tid = $filesplit[0]
";
$rs = m_query($con, $query, "DBクエリに失敗しました");
$rowdata = pg_fetch_row($rs, $row);
//print" $fName./$rowdata[1]//$rowdata[2]
\n";
$title = $rowdata[1];
$subtitle = "";
$count = "";
}else{
$query = "
SELECT
foltia_program.tid,foltia_program.title,foltia_subtitle.countno,foltia_subtitle.subtitle
FROM foltia_subtitle , foltia_program
WHERE foltia_program.tid = foltia_subtitle.tid
AND foltia_subtitle.tid = $filesplit[0]
AND foltia_subtitle.countno = $filesplit[1]
";
$rs = m_query($con, $query, "DBクエリに失敗しました");
$rowdata = pg_fetch_row($rs, $row);
//print" $fName./$rowdata[1]/$rowdata[2]/$rowdata[3]
\n";
$title = $rowdata[1];
$count = $rowdata[2];
$subtitle = $rowdata[3];
}//end if 話数がNULL
$tid = htmlspecialchars($rowdata[0]);
$title = htmlspecialchars($title);
$count = htmlspecialchars($count);
$subtitle = htmlspecialchars($subtitle);
//--
print "
$fName
|
$title |
$count
|
$subtitle
|
\n
";
//DBから削除
if ($demomode){
}else{
$query = "
DELETE FROM foltia_m2pfiles
WHERE m2pfilename = '$fName'
";
$rs = m_query($con, $query, "DBクエリに失敗しました");
//削除処理
$oserr = system("$toolpath/perl/deletemovie.pl $fName");
}//end if demomode
}//foreach
?>