Index: trunk/install/php/deletemovie.php
===================================================================
--- trunk/install/php/deletemovie.php (リビジョン 124)
+++ trunk/install/php/deletemovie.php (リビジョン 1)
@@ -15,19 +15,4 @@
*/
-
-include("./foltialib.php");
-$con = m_connect();
-
-if ($useenvironmentpolicy == 1){
-if (!isset($_SERVER['PHP_AUTH_USER'])) {
- header("WWW-Authenticate: Basic realm=\"foltia\"");
- header("HTTP/1.0 401 Unauthorized");
- redirectlogin();
- exit;
-} else {
-login($con,$_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW']);
-}
-}//end if login
-
?>
@@ -41,4 +26,6 @@
録画番組削除
-削除番組はありません。\n";
-}else{
+次の番組を削除しました。
-$userclass = getuserclass($con);
-if ( $userclass <= 1){
-
-print "次の番組を削除しました。
-
+
- ファイル名 |
- タイトル |
- 話数 |
- サブタイ |
+ ファイル名 |
+ タイトル |
+ 話数 |
+ サブタイ |
- ";
+
+
+
+
+//--
foreach ($delete as $fName) {
-if( preg_match('/.MP4$/',$fName)){ //拡張子がMP4なら録画ライブラリ番組個別表示での削除 (showlibc.php)
+ $filesplit = split("-",$fName);
+
+if ($filesplit[1] == ""){
$query = "
-SELECT
-foltia_subtitle.pspfilename,
-foltia_program.title,
-foltia_subtitle.countno,
-foltia_subtitle.subtitle
-FROM foltia_subtitle,foltia_program
-WHERE foltia_subtitle.tid = foltia_program.tid AND foltia_subtitle.pspfilename = ?
-LIMIT 1";
-
-$rs = sql_query($con, $query, "DBクエリに失敗しました",array($fName));
-$rall = $rs->fetch();
-$rowdata = $rall[0];
-
-$title = htmlspecialchars($rall[1]);
-$count = htmlspecialchars($rall[2]);
-$subtitle = htmlspecialchars($rall[3]);
-
-print "
-
-$fName
|
-";
-
-if ($tid > 0 ){
- print "$title";
-}else{
- print "$title";
-}
-
-print " |
-$count
|
-$subtitle
|
-
\n
+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]
";
-
-//DBから削除
-if ($demomode){
+$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 = "
-DELETE FROM foltia_mp4files
-WHERE mp4filename = ?
+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クエリに失敗しました");
-$rs = sql_query($con, $query, "DBクエリに失敗しました",array($fName));
-
-//削除処理
-$oserr = system("$toolpath/perl/deletemovie.pl $fName");
-}//end if demomode
-
-}else{ //拡張子がMP4以外なら 録画一覧(録画順・番組順)の削除(showplaylist.php)
-
-$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.m2pfilename = ?
-";
-
-//$rs = m_query($con, $query, "DBクエリに失敗しました");
-//$rs = sql_query($con, $query, "DBクエリに失敗しました",array($filesplit[0] ,$filesplit[1]));
-$rs = sql_query($con, $query, "DBクエリに失敗しました",array($fName));
- $rall = $rs->fetchAll();
- $rowdata = $rall[0];
+$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]);
@@ -151,16 +101,11 @@
$subtitle = htmlspecialchars($subtitle);
+//--
+
+
print "
$fName
|
-";
-
-if ($tid > 0 ){
- print "$title";
-}else{
- print "$title";
-}
-
-print " |
+$title |
$count
|
$subtitle
|
@@ -174,8 +119,7 @@
$query = "
DELETE FROM foltia_m2pfiles
-WHERE m2pfilename = ?
+WHERE m2pfilename = '$fName'
";
-//$rs = m_query($con, $query, "DBクエリに失敗しました");
-$rs = sql_query($con, $query, "DBクエリに失敗しました",array($fName));
+$rs = m_query($con, $query, "DBクエリに失敗しました");
//削除処理
@@ -183,15 +127,9 @@
}//end if demomode
-}//end if .MP4拡張子分岐
-
}//foreach
-print "
\n";
-
-}else{//権限なし
- print "ファイル削除権限がありません。
";
-}
-}//if $delete == ""
?>
+
+