チェンジセット 111

差分発生行の前後
無視リスト:
コミット日時:
2010/08/17 01:12:56 (14 年前)
コミッタ:
sorshi
ログメッセージ:

・放送波からのEPG番組表取得に対応。
・foltia_epgテーブル構成変更
・folcast.phpがSQLiteでまったく動作していなかったのを修正

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • trunk/install/mktable.sqlite.txt

    r95 r111  
    6262drop table foltia_epg; 
    6363create table foltia_epg ( 
    64 epgid integer   PRIMARY KEY
     64epgid integer   PRIMARY KEY AUTOINCREMENT
    6565startdatetime integer, 
    6666enddatetime integer, 
     
    173173INSERT INTO foltia_station VALUES (397, 'カートゥーンネットワーク', 0, '', '', '', '780', '', '1046.ontvjapan.com',NULL,NULL); 
    174174INSERT INTO foltia_station VALUES (263, 'アニマックス', 0, '', '', '', '782', '', '1047.ontvjapan.com',NULL,NULL); 
    175 INSERT INTO foltia_station VALUES (261, 'キッズステーション', 0, '', '', 'c', '781', '', '1045.ontvjapan.com',NULL,NULL); 
     175INSERT INTO foltia_station VALUES (261, 'キッズステーション', 0, '', '', 'c', '335', '', '1045.ontvjapan.com',NULL,NULL); 
    176176INSERT INTO foltia_station VALUES (449, 'ディスカバリーチャンネル', 0, '', '', '', '796', '', '1062.ontvjapan.com',NULL,NULL); 
    177177INSERT INTO foltia_station VALUES (448, 'MONDO21', 0, '', '', '', '722', '', '1049.ontvjapan.com',NULL,NULL); 
  • trunk/install/mktable.txt

    r95 r111  
    6262drop table foltia_epg; 
    6363create table foltia_epg ( 
    64 epgid int8   PRIMARY KEY
     64epgid int8   PRIMARY KEY SERIAL
    6565startdatetime int8, 
    6666enddatetime int8, 
     
    172172INSERT INTO foltia_station VALUES (397, 'カートゥーンネットワーク', 0, '', '', '', '780', '', '1046.ontvjapan.com',NULL,NULL); 
    173173INSERT INTO foltia_station VALUES (263, 'アニマックス', 0, '', '', '', '782', '', '1047.ontvjapan.com',NULL,NULL); 
    174 INSERT INTO foltia_station VALUES (261, 'キッズステーション', 0, '', '', 'c', '781', '', '1045.ontvjapan.com',NULL,NULL); 
     174INSERT INTO foltia_station VALUES (261, 'キッズステーション', 0, '', '', 'c', '335', '', '1045.ontvjapan.com',NULL,NULL); 
    175175INSERT INTO foltia_station VALUES (449, 'ディスカバリーチャンネル', 0, '', '', '', '796', '', '1062.ontvjapan.com',NULL,NULL); 
    176176INSERT INTO foltia_station VALUES (448, 'MONDO21', 0, '', '', '', '722', '', '1049.ontvjapan.com',NULL,NULL); 
  • trunk/install/perl/cron_foltia_dayly.sh

    r66 r111  
    1010# 
    1111 
    12 # XMLTVをつかってEPG番組表インポート 
     12#デジタル放送から一週間分のEPGを取得 
     13/home/foltia/perl/epgimport.pl long 
     14 
     15# XMLTVをつかってEPG番組表インポート(アナログ専用旧仕様) 
    1316# 
    14 /usr/bin/perl  /usr/bin/tv_grab_jp | /home/foltia/perl/xmltv2foltia.pl 
     17#/usr/bin/perl  /usr/bin/tv_grab_jp | /home/foltia/perl/xmltv2foltia.pl 
    1518# 2つの局設定使うような場合 
    1619#/usr/bin/perl  /usr/bin/tv_grab_jp --config-file ~/.xmltv/tv_grab_jp.conf.jcom  | /home/foltia/perl/xmltv2foltia.pl 
  • trunk/install/perl/db/Pg.pl

    r97 r111  
    2727'foltialib.changefilestatus.1' => "UPDATE foltia_subtitle SET filestatus = ?, lastupdate = now() WHERE pid = ?", 
    2828'foltialib.getfilestatus.1' => "SELECT filestatus FROM foltia_subtitle WHERE pid = ?", 
     29'foltialib.pid2sid.1' => "SELECT stationid FROM foltia_subtitle WHERE pid = ?", 
    2930 
    3031'getxml2db.1' => "SELECT count(*) FROM foltia_program WHERE tid = ?", 
     
    7273'updatem2pfiletable.4' => "INSERT into foltia_mp4files values (?, ?)", 
    7374 
    74 'xmltv2foltia.chkerase.1' => "DELETE FROM foltia_epg WHERE startdatetime > ? AND ontvchannel = ?", 
    75 'xmltv2foltia.registdb.1' => "SELECT max(epgid) FROM foltia_epg", 
    76 'xmltv2foltia.registdb.2' => "INSERT INTO foltia_epg VALUES (?, ?, ?, ?, ?, ?, ?, ?)", 
     75'xmltv2foltia.replaceepg.1' => "SELECT * FROM foltia_epg WHERE enddatetime > ? AND startdatetime < ? AND ontvchannel = ?", 
     76'xmltv2foltia.commitdb.1' => "DELETE FROM foltia_epg WHERE epgid = ?", 
     77'xmltv2foltia.commitdb.2' => "INSERT INTO foltia_epg VALUES (NULL, ?, ?, ?, ?, ?, ?, ?)" , 
     78 
     79'epgimport.1' => "SELECT count(*) FROM foltia_station WHERE stationid = ?" , 
     80'epgimport.2' => "SELECT digitalch,ontvcode FROM foltia_station WHERE stationid = ?" , 
     81'epgimport.3' => "SELECT digitalch,ontvcode FROM foltia_station WHERE ontvcode is not NULL AND digitalch >= 13 AND digitalch <= 62 ORDER BY digitalch ASC" , 
     82'epgimport.4' => "SELECT count(*) FROM foltia_station WHERE ontvcode is not NULL AND digitalch >= 100 AND digitalch <= 222 ORDER BY digitalch ASC" , 
     83'epgimport.5' => "SELECT count(*) FROM foltia_station WHERE ontvcode is not NULL AND digitalch >= 223 ORDER BY digitalch ASC" , 
     84'epgimport.6' => "SELECT  
     85 foltia_program.tid, stationname, foltia_program.title, 
     86 foltia_subtitle.countno, foltia_subtitle.subtitle, 
     87 foltia_subtitle.startdatetime as x, foltia_subtitle.lengthmin, 
     88 foltia_tvrecord.bitrate, foltia_subtitle.startoffset, 
     89 foltia_subtitle.pid, foltia_subtitle.epgaddedby, 
     90foltia_tvrecord.digital  
     91FROM foltia_subtitle , foltia_program ,foltia_station ,foltia_tvrecord 
     92WHERE foltia_tvrecord.tid = foltia_program.tid AND foltia_tvrecord.stationid = foltia_station .stationid AND foltia_program.tid = foltia_subtitle.tid AND foltia_station.stationid = foltia_subtitle.stationid 
     93AND foltia_subtitle.enddatetime >= ? AND foltia_subtitle.startdatetime < ?  
     94UNION  
     95SELECT  
     96 foltia_program.tid, stationname, foltia_program.title, 
     97 foltia_subtitle.countno, foltia_subtitle.subtitle, 
     98 foltia_subtitle.startdatetime, foltia_subtitle.lengthmin, 
     99 foltia_tvrecord.bitrate,  foltia_subtitle.startoffset, 
     100 foltia_subtitle.pid,  foltia_subtitle.epgaddedby, 
     101foltia_tvrecord.digital  
     102FROM foltia_tvrecord 
     103LEFT OUTER JOIN foltia_subtitle on (foltia_tvrecord.tid = foltia_subtitle.tid ) 
     104LEFT OUTER JOIN foltia_program on (foltia_tvrecord.tid = foltia_program.tid ) 
     105LEFT OUTER JOIN foltia_station on (foltia_subtitle.stationid = foltia_station.stationid ) 
     106WHERE foltia_tvrecord.stationid = 0 AND 
     107 foltia_subtitle.enddatetime >= ? AND foltia_subtitle.startdatetime < ? " , 
    77108 
    78109); 
  • trunk/install/perl/digitaltvrecording.pl

    r99 r111  
    3232$extendrecendsec = 10;                                                  #recording end second.  
    3333#$startupsleeptime = 52;                                        #process wait(MAX60sec) 
    34 $startupsleeptime = 27;                                       #process wait(MAX60sec) 
     34$startupsleeptime = 32;                                       #process wait(MAX60sec) 
    3535#------------------------------- 
    3636 
     
    373373                if ($recch == 333) { 
    374374                        $recch = "CS16";#333ch:アニメシアターX(AT-X)  
    375                 }elsif($recch == 330){ 
    376                         $recch = "CS22";#330ch:キッズステーション  
     375                #}elsif($recch == 330){ 
     376                #       $recch = "CS22";#330ch:キッズステーション #HD化により2010/4変更  
     377                }elsif($recch == 335){ 
     378                        $recch = "CS8";#335ch:キッズステーション HD 
    377379                }elsif($recch == 332){ 
    378380                        $recch = "CS20";#332ch:アニマックス  
  • trunk/install/perl/folprep.pl

    r94 r111  
    2929require "foltialib.pl"; 
    3030 
    31 #XMLゲット & DB更新 
    32 system("$toolpath/perl/getxml2db.pl"); 
     31 
     32#PID探し 
     33my $pid = $ARGV[0]; 
    3334 
    3435#引き数がアルか? 
    35 $pid = $ARGV[0] ; 
    3636if ($pid eq "" ){ 
    3737        #引き数なし出実行されたら、終了 
     
    4040} 
    4141 
    42 #PID探し 
    43 $pid = $ARGV[0]; 
     42my $stationid = ""; 
     43if ($pid <= 0){ 
     44        #EPG更新 & DB更新 
     45        $dbh = DBI->connect($DSN,$DBUser,$DBPass) ||die $DBI::error;; 
     46        $stationid = &pid2sid($pid); 
     47        system("$toolpath/perl/epgimport.pl $stationid"); 
     48}else{ 
     49        #XMLゲット & DB更新 
     50        system("$toolpath/perl/getxml2db.pl"); 
     51
    4452 
    4553#キュー再投入 
    46        &writelog("folprep  $toolpath/perl/addpidatq.pl $pid"); 
     54&writelog("folprep  $toolpath/perl/addpidatq.pl $pid"); 
    4755system("$toolpath/perl/addpidatq.pl $pid"); 
    4856 
  • trunk/install/perl/foltialib.pl

    r94 r111  
    381381}#endsub makemp4dir 
    382382 
    383  
    384  
    385  
     383sub pid2sid{ 
     384#番組IDからStation IDを取得 
     385my $pid = $_[0]; 
     386my $sth; 
     387    $sth = $dbh->prepare($stmt{'foltialib.pid2sid.1'}); 
     388    $sth->execute($pid); 
     389my @statusinfo = $sth->fetchrow_array; 
     390my $sid  = $statusinfo[0]; 
     391 
     392if ($sid eq ""){ 
     393        return  0 ; 
     394}else{ 
     395        return $sid; 
     396
     397 
     398}#end sub pid2sid 
    386399 
    387400 
  • trunk/install/perl/ipodtranscode.pl

    r97 r111  
    306306        # 中間ファイル消す 
    307307        &changefilestatus($pid,$FILESTATUSTRANSCODECOMPLETE); 
     308        &updatemp4file(); 
     309        }else{ 
     310                &writelog("ipodtranscode ERR ; Fail.Giving up!  MAQ${mp4filenamestring}.MP4"); 
     311                &changefilestatus($pid,999); 
     312        } 
    308313        unlink("${filenamebody}_HD.m2t"); 
    309314        unlink("${filenamebody}_tss.m2t"); 
     
    311316        unlink("$filenamebody.wav"); 
    312317        unlink("$filenamebody.base.mp4"); 
    313          
    314         &updatemp4file(); 
    315         }else{ 
    316                 &writelog("ipodtranscode ERR ; Fail MAQ${mp4filenamestring}.MP4"); 
    317         } 
     318 
    318319} 
    319320 
  • trunk/install/perl/schedulecheck.pl

    r94 r111  
    5353}#while 
    5454 
    55  
     55#EPG更新 
     56system("$toolpath/perl/epgimport.pl"); 
    5657} 
  • trunk/install/perl/xmltv2foltia.pl

    r94 r111  
    44# http://www.dcc-jpl.com/soft/foltia/ 
    55# 
    6 #xmltv2foltia.pl  
    7 #XMLTV日本語版の出力するXMLを受け取り、EPGデータベースに挿入します。 
    8 
    9 #↓本家に取り込まれたっぽい(未確認) 
    10 
    11 #XMLTVは 
    12 # http://www.systemcreate-inc.com/gsxr/pc/mythtv.html#patches 
    13 #のパッチをあてたものを想定しています。オリジナルと比較して、サブタイトルや内容など 
    14 #より詳細な内容を取得できます。 
    15 
    16 # usage;perl  /usr/bin/tv_grab_jp | ./xmltv2foltia.pl  
    17 
     6# xmltv2foltia.pl  
     7
     8# XMLTV日本語版形式のXMLを受け取り、EPGデータベースに挿入します。 
     9# アナログ時代はXMLTVを利用していましたが、現在はepgimport.plを使用します。 
     10
     11# usage 
     12# cat /tmp/__27-epg.xml | /home/foltia/perl/xmltv2foltia.pl 
    1813# 
    1914# DCC-JPL Japan/foltia project 
     
    2621# http://www.lr.pi.titech.ac.jp/~abekawa/perl/perl_unicode.html 
    2722use Jcode; 
    28 # use Data::Dumper;  
     23use Data::Dumper;  
    2924use Time::Local; 
    3025use DBI; 
     
    4338$today = strftime("%Y%m%d", localtime); 
    4439$todaytime = strftime("%Y%m%d%H%M", localtime); 
     40@deleteepgid = (); 
    4541 
    4642# DB Connect 
    4743$dbh = DBI->connect($DSN,$DBUser,$DBPass) ||die $DBI::error;; 
    48 $dbh->{AutoCommit} = 0; 
    4944 
    5045while(<>){ 
    5146#print $_; 
     47s/\xef\xbd\x9e/\xe3\x80\x9c/g; #wavedash 
     48s/\xef\xbc\x8d/\xe2\x88\x92/g; #hyphenminus 
     49s/&#([0-9A-Fa-f]{2,6});/(chr($1))/eg; #'遊戯王5D&#039;s'とかの数値参照対応を 
     50 
    5251Jcode::convert(\$_,'euc','utf8'); 
    5352#    from_to($_, "utf8","euc-jp"); 
     
    6968        eval("$_"); 
    7069#print Dumper($_) ; 
    71  
    72 }elsif(/<display-name lang=\"ja_JP/){ 
    73         s/^[\s]*//gio; 
    74         chomp(); 
    75         $channel{ja}  = &removetag($_); 
    76         #print Dumper($_) ; 
    77         #print "$result  \n"; 
    78  
    7970 
    8071}elsif(/<display-name lang=\"ja_JP/){ 
     
    136127        chomp(); 
    137128        $item{title}  = &removetag($_); 
     129        $item{title} =~ s/【.*】//g;#【解】とか 
     130        $item{title} =~ s/\[.*\]//g;#[二]とか  
    138131        #print Dumper($_) ; 
    139132        #print "$result  \n"; 
     
    188181#登録処理はココで 
    189182#&writelog("xmltv2foltia DEBUG call chkerase $item{'start'},$item{'channel'}"); 
    190  
    191         &chkerase($item{'start'}, $item{'channel'}); 
     183#旧仕様    #&chkerase($item{'start'}, $item{'channel'}); 
     184        &replaceepg($item{'start'}, $item{'channel'},$item{'stop'}); 
    192185        if ($item{'subtitle'} ne "" ){ 
    193186            $registdesc = $item{'subtitle'}." ".$item{'desc'}; 
     
    215208}# endif 
    216209}# while 
    217  
    218 $dbh->commit; 
     210&commitdb; 
     211 
    219212 
    220213#end 
    221214################ 
    222215 
    223 sub chkerase
    224 # xmltvからきた日付とチャンネルをfoltia epgと比較 
     216sub replaceepg
     217#消すEPGのIDを配列に追加します 
    225218my $foltiastarttime = $_[0]; # 14桁 
    226219my $ontvepgchannel =  $_[1]; 
    227 my $epgstartdate = substr($foltiastarttime,0,8); # 8桁 20050807 
    228 my  @epgcounts = ""; 
    229 my $DBQuery = ""; 
    230  
    231 #if ($currentworkdate eq "" ){#初回起動なら 
    232 if ( $currentworkch ne $ontvepgchannel){ 
    233  
    234  
    235 if ($epgstartdate >= $today){# xmltvtvから今日以降のデータが来ていれば 
    236 my $epgstartdatetime = $today * 10000 ; # 200508070000 12桁 
    237 # 新規に入る予定の未来の番組表、全部いったん消す 
    238 # $DBQuery =  "DELETE from foltia_epg where startdatetime > $epgstartdatetime AND ontvchannel = '$ontvepgchannel' "; 
    239             $sth = $dbh->prepare($stmt{'xmltv2foltia.chkerase.1'}); 
    240             $sth->execute($todaytime, $ontvepgchannel); 
    241             &writelog("xmltv2foltia DELETE EPG $epgstartdatetime:$stmt{'xmltv2foltia.chkerase.1'}"); 
    242 #$currentworkdate = "$today"; 
    243 $currentworkch = $ontvepgchannel ; 
    244 }else{ 
    245         &writelog("xmltv2foltia ERROR EPG INVALID:$epgstartdate:$today"); 
    246         #exit(); 
    247 }# endif xmltvtvから今日のデータが来ていれば 
    248 }#end if 初回起動なら 
    249  
    250 
     220my $foltiaendtime = $_[2]; # 14桁 
     221my @data = (); 
     222 
     223$foltiastarttime = substr($foltiastarttime,0,12); # 12桁 200508072254 
     224$foltiaendtime   = substr($foltiaendtime,0,12); # 12桁 200508072355 
     225 
     226$sth = $dbh->prepare($stmt{'xmltv2foltia.replaceepg.1'}); 
     227$sth->execute($foltiastarttime , $foltiaendtime , $ontvepgchannel); 
     228 
     229while (@data = $sth->fetchrow_array()) { 
     230        push(@deleteepgid,$data[0]); 
     231        #&writelog("xmltv2foltia DEBUG push(\@deleteepgid,$data[0]);"); 
     232}#end while  
     233}#endsub replaceepg 
     234 
    251235sub registdb{ 
    252236my $foltiastarttime = $_[0]; 
     
    258242 
    259243#&writelog("xmltv2foltia DEBUG $foltiastarttime:$foltiaendtime"); 
    260  
    261   
    262244$foltiastarttime = substr($foltiastarttime,0,12); 
    263245$foltiaendtime = substr($foltiaendtime,0,12); 
    264246 
    265 if($foltiastarttime > $todaytime){ 
    266          
    267       $sth = $dbh->prepare($stmt{'xmltv2foltia.registdb.1'}); 
    268               $sth->execute(); 
    269        @currentepgid = $sth->fetchrow_array; 
    270         
    271       if ($currentepgid[0] < 1 ){ 
    272               $newepgid = 1; 
    273       }else{ 
    274               $newepgid = $currentepgid[0];  
    275               $newepgid++;  
    276       } 
     247if($foltiaendtime > $todaytime){ 
     248# epgidはAUTOINCREMENTに変更した #2010/8/10  
     249#     $sth = $dbh->prepare($stmt{'xmltv2foltia.registdb.1'}); 
     250#             $sth->execute(); 
     251#      @currentepgid = $sth->fetchrow_array; 
     252#       
     253#     if ($currentepgid[0] < 1 ){ 
     254#             $newepgid = 1; 
     255#     }else{ 
     256#             $newepgid = $currentepgid[0];  
     257#             $newepgid++;  
     258#     } 
    277259#&writelog("xmltv2foltia DEBUG $currentepgid[0] /  $newepgid"); 
    278260my $lengthmin = &calclength($foltiastarttime , $foltiaendtime); 
    279 #       $newepgid = $dbh->quote($newepgid ); 
    280 #       $foltiastarttime = $dbh->quote($foltiastarttime); 
    281 #       $foltiaendtime = $dbh->quote($foltiaendtime ); 
    282 #       $lengthmin = $dbh->quote($lengthmin ); 
    283 #       $channel = $dbh->quote($channel ); 
    284 #       $title = $dbh->quote($title); 
    285 #       $desc = $dbh->quote($desc); 
    286 #       $category = $dbh->quote($category); 
    287  
    288         $sth = $dbh->prepare($stmt{'xmltv2foltia.registdb.2'}); 
    289         $sth->execute($newepgid, $foltiastarttime, $foltiaendtime, $lengthmin, $channel, $title, $desc, $category) || 
    290             warn "error: $newepgid, $foltiastarttime, $foltiaendtime, $lengthmin, $channel, $title, $desc, $category\n"; 
    291  
     261 
     262#print "xmltv2foltia DEBUG :INSERT INTO foltia_epg VALUES ($newepgid, $foltiastarttime, $foltiaendtime, $lengthmin, $channel, $title, $desc, $category)\n"; 
     263push (@foltiastarttime,$foltiastarttime); 
     264push (@foltiaendtime,$foltiaendtime);  
     265push (@lengthmin,$lengthmin);  
     266push (@channel,$channel);  
     267push (@title,$title);  
     268push (@desc,$desc); 
     269push (@category,$category); 
     270#       $sth = $dbh->prepare($stmt{'xmltv2foltia.registdb.2'}); 
     271#       $sth->execute($newepgid, $foltiastarttime, $foltiaendtime, $lengthmin, $channel, $title, $desc, $category) || warn "error: $newepgid, $foltiastarttime, $foltiaendtime, $lengthmin, $channel, $title, $desc, $category\n"; 
    292272# &writelog("xmltv2foltia DEBUG $DBQuery"); 
    293  
    294273}else{ 
    295274#&writelog("xmltv2foltia DEBUG SKIP $foltiastarttime:$foltiaendtime"); 
    296275}#未来じゃなければ挿入しない 
    297276 
     277}#end sub registdb 
     278 
     279sub commitdb{ 
     280$dbh->{AutoCommit} = 0; 
     281$dbh->do('BEGIN'); 
     282#print Dumper(\@dbarray); 
     283my $loopcount = @foltiastarttime; 
     284my $i = 0; 
     285 
     286#削除 
     287foreach $delid (@deleteepgid){ 
     288        $sth = $dbh->prepare($stmt{'xmltv2foltia.commitdb.1'}); 
     289        $sth->execute( $delid ) || warn "$delid\n"; 
     290#       &writelog("xmltv2foltia DEBUG : DELETE FROM foltia_epg WHERE epgid = $delid"); 
    298291} 
    299  
    300  
    301  
    302  
    303  
    304  
    305  
     292#追加 
     293for ($i=0;$i<$loopcount;$i++){ 
     294        $sth = $dbh->prepare($stmt{'xmltv2foltia.commitdb.2'}); 
     295        $sth->execute( $foltiastarttime[$i],$foltiaendtime[$i], $lengthmin[$i], $channel[$i], $title[$i], $desc[$i], $category[$i]) || warn "error: $foltiastarttime, $foltiaendtime, $lengthmin, $channel, $title, $desc, $category\n"; 
     296#&writelog("xmltv2foltia DEBUG : INSERT INTO foltia_epg VALUES ( NULL , $foltiastarttime[$i],$foltiaendtime[$i], $lengthmin[$i], $channel[$i], $title[$i], $desc[$i], $category[$i])"); 
     297}# end for 
     298$dbh->do('COMMIT'); 
     299$dbh->{AutoCommit} = 1; 
     300}#end sub commitdb 
    306301 
    307302sub removetag(){ 
  • trunk/install/php/folcast.php

    r102 r111  
    5252SELECT  foltia_program.tid,foltia_program.title, 
    5353foltia_subtitle.countno , foltia_subtitle.subtitle , foltia_subtitle.startdatetime, foltia_subtitle.pspfilename,foltia_subtitle.lengthmin,foltia_subtitle.enddatetime   FROM foltia_subtitle , foltia_program   WHERE \"pspfilename\" LIKE 'M%%'  AND foltia_program.tid = foltia_subtitle.tid AND foltia_program.tid = $tid    
    54 ORDER BY \"enddatetime\" DESC  
    55 limit  $max offset 0  
    56        "; 
     54ORDER BY enddatetime DESC  
     55 limit ? offset 0  
     56"; 
    5757 
    5858$titlequery = " 
     
    6363//      $titlers = m_query($con, $query, "DBクエリに失敗しました"); 
    6464        $titlers = sql_query($con, $query, "DBクエリに失敗しました",array($tid)); 
     65//      $titlers = sql_query($con, $titlequery, "DBクエリに失敗しました",array($tid)); 
    6566        $rowdata = $titlers->fetch(); 
    6667        $rsstitle = $rowdata[1]; 
     
    6970$query = " 
    7071SELECT  foltia_program.tid,foltia_program.title, 
    71 foltia_subtitle.countno , foltia_subtitle.subtitle , foltia_subtitle.startdatetime, foltia_subtitle.pspfilename,foltia_subtitle.lengthmin,foltia_subtitle.enddatetime   FROM foltia_subtitle , foltia_program   WHERE \"pspfilename\" LIKE 'M%%'  AND foltia_program.tid = foltia_subtitle.tid ORDER BY \"enddatetime\" DESC  
    72 offset 0 limit  ?  
     72foltia_subtitle.countno , foltia_subtitle.subtitle , foltia_subtitle.startdatetime, foltia_subtitle.pspfilename,foltia_subtitle.lengthmin,foltia_subtitle.enddatetime   FROM foltia_subtitle , foltia_program   WHERE \"pspfilename\" LIKE 'M%%'  AND foltia_program.tid = foltia_subtitle.tid ORDER BY enddatetime DESC  
     73limit  ? offset 0  
    7374        "; 
     75 
     76 
     77 
    7478        $rsstitle = "新規録画"; 
    7579}//if 
  • trunk/install/php/viewepg.php

    r94 r111  
    6767 
    6868$yesterday = date ("YmdHi",mktime($starthour , 0 , 0, $startmonth , $startday -1 , $startyear)); 
     69$dayyesterday = date ("m/d(D)",mktime($starthour , 0 , 0, $startmonth , $startday -1 , $startyear)); 
    6970$today0400 = date ("YmdHi",mktime(4 , 0 , 0, $startmonth , $startday  , $startyear)); 
     71$today0800 = date ("YmdHi",mktime(8 , 0 , 0, $startmonth , $startday  , $startyear)); 
    7072$today1200 = date ("YmdHi",mktime(12 , 0 , 0, $startmonth , $startday , $startyear)); 
     73$today1600 = date ("YmdHi",mktime(16 , 0 , 0, $startmonth , $startday , $startyear)); 
    7174$today2000 = date ("YmdHi",mktime(20 , 0 , 0, $startmonth , $startday , $startyear)); 
     75$today2359 = date ("YmdHi",mktime(23 , 59 , 0, $startmonth , $startday , $startyear)); 
    7276$day1after = date ("YmdHi",mktime($starthour , 0 , 0, $startmonth , $startday +1 , $startyear)); 
    73 $day1 = date ("m/d",mktime($starthour , 0 , 0, $startmonth , $startday +1 , $startyear)); 
     77$day1 = date ("m/d(D)",mktime($starthour , 0 , 0, $startmonth , $startday +1 , $startyear)); 
    7478$day2after = date ("YmdHi",mktime($starthour , 0 , 0, $startmonth , $startday +2 , $startyear)); 
    75 $day2 = date ("m/d",mktime($starthour , 0 , 0, $startmonth , $startday +2 , $startyear)); 
     79$day2 = date ("m/d(D)",mktime($starthour , 0 , 0, $startmonth , $startday +2 , $startyear)); 
    7680$day3after = date ("YmdHi",mktime($starthour , 0 , 0, $startmonth , $startday +3 , $startyear)); 
    77 $day3 = date ("m/d",mktime($starthour , 0 , 0, $startmonth , $startday +3 , $startyear)); 
     81$day3 = date ("m/d(D)",mktime($starthour , 0 , 0, $startmonth , $startday +3 , $startyear)); 
    7882$day4after = date ("YmdHi",mktime($starthour , 0 , 0, $startmonth , $startday +4 , $startyear)); 
    79 $day4 = date ("m/d",mktime($starthour , 0 , 0, $startmonth , $startday +4 , $startyear)); 
     83$day4 = date ("m/d(D)",mktime($starthour , 0 , 0, $startmonth , $startday +4 , $startyear)); 
    8084$day5after = date ("YmdHi",mktime($starthour , 0 , 0, $startmonth , $startday +5 , $startyear)); 
    81 $day5 = date ("m/d",mktime($starthour , 0 , 0, $startmonth , $startday +5 , $startyear)); 
     85$day5 = date ("m/d(D)",mktime($starthour , 0 , 0, $startmonth , $startday +5 , $startyear)); 
    8286$day6after = date ("YmdHi",mktime($starthour , 0 , 0, $startmonth , $startday +6 , $startyear)); 
    83 $day6 = date ("m/d",mktime($starthour , 0 , 0, $startmonth , $startday +6 , $startyear)); 
     87$day6 = date ("m/d(D)",mktime($starthour , 0 , 0, $startmonth , $startday +6 , $startyear)); 
    8488$day7after = date ("YmdHi",mktime($starthour , 0 , 0, $startmonth , $startday +7 , $startyear)); 
    85 $day7 = date ("m/d",mktime($starthour , 0 , 0, $startmonth , $startday +7 , $startyear)); 
     89$day7 = date ("m/d(D)",mktime($starthour , 0 , 0, $startmonth , $startday +7 , $startyear)); 
    8690 
    8791 
     
    115119 
    116120 
    117 print "←<A HREF=\"./viewepg.php?p=$page&start=$yesterday\">前の日</A> <A HREF=\"./viewepg.php\">現在</A> 当日(<A HREF=\"./viewepg.php?p=$page&start=$today0400\">4:00</A> <A HREF=\"./viewepg.php?p=$page&start=$today1200\">12:00</A> <A HREF=\"./viewepg.php?p=$page&start=$today2000\">20:00</A>) <A HREF=\"./viewepg.php?p=$page&start=$day1after\">次の日</A> <A HREF=\"./viewepg.php?p=$page&start=$day2after\">$day2</A> <A HREF=\"./viewepg.php?p=$page&start=$day3after\">$day3</A> <A HREF=\"./viewepg.php?p=$page&start=$day4after\">$day4</A> <A HREF=\"./viewepg.php?p=$page&start=$day5after\">$day5</A> <A HREF=\"./viewepg.php?p=$page&start=$day6after\">$day6</A> <A HREF=\"./viewepg.php?p=$page&start=$day7after\">$day7</A>→<BR>\n"; 
     121print "←<A HREF=\"./viewepg.php?p=$page&start=$yesterday\">$dayyesterday(前日)</A> <A HREF=\"./viewepg.php\">現在</A> 当日(<A HREF=\"./viewepg.php?p=$page&start=$today0400\">4:00</A> <A HREF=\"./viewepg.php?p=$page&start=$today0800\">8:00</A> <A HREF=\"./viewepg.php?p=$page&start=$today1200\">12:00</A> <A HREF=\"./viewepg.php?p=$page&start=$today1600\">16:00</A> <A HREF=\"./viewepg.php?p=$page&start=$today2000\">20:00</A> <A HREF=\"./viewepg.php?p=$page&start=$today2359\">24:00</A>) <A HREF=\"./viewepg.php?p=$page&start=$day1after\">$day1(翌日)</A> <A HREF=\"./viewepg.php?p=$page&start=$day2after\">$day2</A> <A HREF=\"./viewepg.php?p=$page&start=$day3after\">$day3</A> <A HREF=\"./viewepg.php?p=$page&start=$day4after\">$day4</A> <A HREF=\"./viewepg.php?p=$page&start=$day5after\">$day5</A> <A HREF=\"./viewepg.php?p=$page&start=$day6after\">$day6</A> <A HREF=\"./viewepg.php?p=$page&start=$day7after\">$day7</A>→<BR>\n"; 
    118122 
    119123 
     
    127131 
    128132print " $page / $pages (放送局) "; 
     133for ($i=1;$i<=$pages;$i++){ 
     134        print "<a href = \"./viewepg.php?p=$i&start=$start\">$i</a>・"; 
     135} 
     136 
    129137 
    130138if ($page < $pages){ 
    131139        $nextpage = $page + 1; 
    132         print "<a href = \"./viewepg.php?p=$nextpage&start=$start\">→</A>"; 
     140        print "<a href = \"./viewepg.php?p=$nextpage&start=$start\">→</a>"; 
    133141} 
    134142} 
     
    158166        SELECT ontvcode  
    159167        FROM foltia_station  
    160         WHERE \"ontvcode\" LIKE '%ontvjapan%'  
     168        WHERE \"ontvcode\" LIKE '%ontvjapan%'  
    161169        ORDER BY stationid ASC , stationrecch  
    162170        LIMIT ? OFFSET ? 
track feed