annotate programTable.php @ 129:1e93ea03ebd9

mod: typoをfix
author Sushi-k <epgrec@park.mda.or.jp>
date Wed, 17 Mar 2010 20:39:36 +0900
parents 7a64d5e3baee
children f5d58cf2842f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
1 <?php
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
2 include_once('config.php');
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
3 include_once( INSTALL_PATH . '/DBRecord.class.php' );
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
4 include_once( INSTALL_PATH . '/Smarty/Smarty.class.php' );
37
e5f9aa34d06f change: modify all script for web base setting
yoneda <epgrec@park.mda.or.jp>
parents: 10
diff changeset
5 include_once( INSTALL_PATH . '/Settings.class.php' );
115
7a64d5e3baee mod: キーワード検索を整理
yoneda <epgrec@park.mda.or.jp>
parents: 106
diff changeset
6 include_once( INSTALL_PATH . '/Keyword.class.php' );
37
e5f9aa34d06f change: modify all script for web base setting
yoneda <epgrec@park.mda.or.jp>
parents: 10
diff changeset
7
e5f9aa34d06f change: modify all script for web base setting
yoneda <epgrec@park.mda.or.jp>
parents: 10
diff changeset
8 $settings = Settings::factory();
e5f9aa34d06f change: modify all script for web base setting
yoneda <epgrec@park.mda.or.jp>
parents: 10
diff changeset
9
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
10 $options = " WHERE starttime > '".date("Y-m-d H:i:s", time() + 300 )."'";
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
11
77
cb7da56c4198 modified: Keyword.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 67
diff changeset
12 //
cb7da56c4198 modified: Keyword.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 67
diff changeset
13 $weekofdays = array(
cb7da56c4198 modified: Keyword.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 67
diff changeset
14 array( "name" => "", "id" => 0, "selected" => "" ),
cb7da56c4198 modified: Keyword.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 67
diff changeset
15 array( "name" => "", "id" => 1, "selected" => "" ),
cb7da56c4198 modified: Keyword.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 67
diff changeset
16 array( "name" => "羂", "id" => 2, "selected" => "" ),
cb7da56c4198 modified: Keyword.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 67
diff changeset
17 array( "name" => "", "id" => 3, "selected" => "" ),
cb7da56c4198 modified: Keyword.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 67
diff changeset
18 array( "name" => "", "id" => 4, "selected" => "" ),
cb7da56c4198 modified: Keyword.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 67
diff changeset
19 array( "name" => "", "id" => 5, "selected" => "" ),
cb7da56c4198 modified: Keyword.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 67
diff changeset
20 array( "name" => "", "id" => 6, "selected" => "" ),
cb7da56c4198 modified: Keyword.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 67
diff changeset
21 array( "name" => "", "id" => 7, "selected" => "" ),
cb7da56c4198 modified: Keyword.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 67
diff changeset
22 );
cb7da56c4198 modified: Keyword.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 67
diff changeset
23
106
57676bb30f64 add: 時間帯で絞り込みを追加
Sushi-k <epgrec@park.mda.or.jp>
parents: 77
diff changeset
24
77
cb7da56c4198 modified: Keyword.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 67
diff changeset
25 $autorec_modes = $RECORD_MODE;
cb7da56c4198 modified: Keyword.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 67
diff changeset
26 $autorec_modes[(int)($settings->autorec_mode)]['selected'] = "selected";
cb7da56c4198 modified: Keyword.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 67
diff changeset
27
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
28 $search = "";
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
29 $use_regexp = 0;
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
30 $type = "*";
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
31 $category_id = 0;
115
7a64d5e3baee mod: キーワード検索を整理
yoneda <epgrec@park.mda.or.jp>
parents: 106
diff changeset
32 $channel_id = 0;
7a64d5e3baee mod: キーワード検索を整理
yoneda <epgrec@park.mda.or.jp>
parents: 106
diff changeset
33 $weekofday = 7;
106
57676bb30f64 add: 時間帯で絞り込みを追加
Sushi-k <epgrec@park.mda.or.jp>
parents: 77
diff changeset
34 $prgtime = 24;
57676bb30f64 add: 時間帯で絞り込みを追加
Sushi-k <epgrec@park.mda.or.jp>
parents: 77
diff changeset
35
115
7a64d5e3baee mod: キーワード検索を整理
yoneda <epgrec@park.mda.or.jp>
parents: 106
diff changeset
36 // <若帥
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
37 if(isset( $_POST['do_search'] )) {
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
38 if( isset($_POST['search'])){
115
7a64d5e3baee mod: キーワード検索を整理
yoneda <epgrec@park.mda.or.jp>
parents: 106
diff changeset
39 $search = $_POST['search'];
7a64d5e3baee mod: キーワード検索を整理
yoneda <epgrec@park.mda.or.jp>
parents: 106
diff changeset
40 if( isset($_POST['use_regexp']) && ($_POST['use_regexp']) ) {
7a64d5e3baee mod: キーワード検索を整理
yoneda <epgrec@park.mda.or.jp>
parents: 106
diff changeset
41 $use_regexp = (int)($_POST['use_regexp']);
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
42 }
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
43 }
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
44 if( isset($_POST['type'])){
115
7a64d5e3baee mod: キーワード検索を整理
yoneda <epgrec@park.mda.or.jp>
parents: 106
diff changeset
45 $type = $_POST['type'];
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
46 }
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
47 if( isset($_POST['category_id'])) {
115
7a64d5e3baee mod: キーワード検索を整理
yoneda <epgrec@park.mda.or.jp>
parents: 106
diff changeset
48 $category_id = (int)($_POST['category_id']);
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
49 }
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
50 if( isset($_POST['station'])) {
115
7a64d5e3baee mod: キーワード検索を整理
yoneda <epgrec@park.mda.or.jp>
parents: 106
diff changeset
51 $channel_id = (int)($_POST['station']);
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
52 }
77
cb7da56c4198 modified: Keyword.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 67
diff changeset
53 if( isset($_POST['weekofday']) ) {
115
7a64d5e3baee mod: キーワード検索を整理
yoneda <epgrec@park.mda.or.jp>
parents: 106
diff changeset
54 $weekofday = (int)($_POST['weekofday']);
77
cb7da56c4198 modified: Keyword.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 67
diff changeset
55 }
106
57676bb30f64 add: 時間帯で絞り込みを追加
Sushi-k <epgrec@park.mda.or.jp>
parents: 77
diff changeset
56 if( isset($_POST['prgtime']) ) {
57676bb30f64 add: 時間帯で絞り込みを追加
Sushi-k <epgrec@park.mda.or.jp>
parents: 77
diff changeset
57 $prgtime = (int)($_POST['prgtime']);
57676bb30f64 add: 時間帯で絞り込みを追加
Sushi-k <epgrec@park.mda.or.jp>
parents: 77
diff changeset
58 }
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
59 }
106
57676bb30f64 add: 時間帯で絞り込みを追加
Sushi-k <epgrec@park.mda.or.jp>
parents: 77
diff changeset
60
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
61 $do_keyword = 0;
115
7a64d5e3baee mod: キーワード検索を整理
yoneda <epgrec@park.mda.or.jp>
parents: 106
diff changeset
62 if( ($search != "") || ($type != "*") || ($category_id != 0) || ($channel_id != 0) )
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
63 $do_keyword = 1;
10
152b146bd276 fixed: mysql_connect before mysql_real_escape_string
Sushi-k <epgrec@park.mda.or.jp>
parents: 1
diff changeset
64
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
65 try{
115
7a64d5e3baee mod: キーワード検索を整理
yoneda <epgrec@park.mda.or.jp>
parents: 106
diff changeset
66 $precs = Keyword::search( $search, $use_regexp, $type, $category_id, $channel_id, $weekofday, $prgtime );
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
67
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
68 $programs = array();
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
69 foreach( $precs as $p ) {
37
e5f9aa34d06f change: modify all script for web base setting
yoneda <epgrec@park.mda.or.jp>
parents: 10
diff changeset
70 $ch = new DBRecord(CHANNEL_TBL, "id", $p->channel_id );
e5f9aa34d06f change: modify all script for web base setting
yoneda <epgrec@park.mda.or.jp>
parents: 10
diff changeset
71 $cat = new DBRecord(CATEGORY_TBL, "id", $p->category_id );
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
72 $arr = array();
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
73 $arr['type'] = $p->type;
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
74 $arr['station_name'] = $ch->name;
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
75 $arr['starttime'] = $p->starttime;
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
76 $arr['endtime'] = $p->endtime;
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
77 $arr['title'] = $p->title;
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
78 $arr['description'] = $p->description;
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
79 $arr['id'] = $p->id;
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
80 $arr['cat'] = $cat->name_en;
37
e5f9aa34d06f change: modify all script for web base setting
yoneda <epgrec@park.mda.or.jp>
parents: 10
diff changeset
81 $arr['rec'] = DBRecord::countRecords(RESERVE_TBL, "WHERE program_id='".$p->id."'");
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
82
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
83 array_push( $programs, $arr );
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
84 }
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
85
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
86 $k_category_name = "";
77
cb7da56c4198 modified: Keyword.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 67
diff changeset
87 $crecs = DBRecord::createRecords(CATEGORY_TBL);
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
88 $cats = array();
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
89 $cats[0]['id'] = 0;
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
90 $cats[0]['name'] = "鴻";
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
91 $cats[0]['selected'] = $category_id == 0 ? "selected" : "";
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
92 foreach( $crecs as $c ) {
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
93 $arr = array();
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
94 $arr['id'] = $c->id;
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
95 $arr['name'] = $c->name_jp;
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
96 $arr['selected'] = $c->id == $category_id ? "selected" : "";
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
97 if( $c->id == $category_id ) $k_category_name = $c->name_jp;
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
98 array_push( $cats, $arr );
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
99 }
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
100
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
101 $types = array();
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
102 $types[0]['name'] = "鴻";
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
103 $types[0]['value'] = "*";
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
104 $types[0]['selected'] = $type == "*" ? "selected" : "";
57
73350e16077a fix: bug
Sushi-k <epgrec@park.mda.or.jp>
parents: 39
diff changeset
105 if( $settings->gr_tuners != 0 ) {
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
106 $arr = array();
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
107 $arr['name'] = "GR";
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
108 $arr['value'] = "GR";
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
109 $arr['selected'] = $type == "GR" ? "selected" : "";
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
110 array_push( $types, $arr );
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
111 }
57
73350e16077a fix: bug
Sushi-k <epgrec@park.mda.or.jp>
parents: 39
diff changeset
112 if( $settings->bs_tuners != 0 ) {
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
113 $arr = array();
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
114 $arr['name'] = "BS";
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
115 $arr['value'] = "BS";
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
116 $arr['selected'] = $type == "BS" ? "selected" : "";
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
117 array_push( $types, $arr );
67
a2c4665b310c add: CS support (thanks to dakku)
Sushi-k <epgrec@park.mda.or.jp>
parents: 57
diff changeset
118
a2c4665b310c add: CS support (thanks to dakku)
Sushi-k <epgrec@park.mda.or.jp>
parents: 57
diff changeset
119 // CS
a2c4665b310c add: CS support (thanks to dakku)
Sushi-k <epgrec@park.mda.or.jp>
parents: 57
diff changeset
120 if ($settings->cs_rec_flg != 0) {
a2c4665b310c add: CS support (thanks to dakku)
Sushi-k <epgrec@park.mda.or.jp>
parents: 57
diff changeset
121 $arr = array();
a2c4665b310c add: CS support (thanks to dakku)
Sushi-k <epgrec@park.mda.or.jp>
parents: 57
diff changeset
122 $arr['name'] = "CS";
a2c4665b310c add: CS support (thanks to dakku)
Sushi-k <epgrec@park.mda.or.jp>
parents: 57
diff changeset
123 $arr['value'] = "CS";
a2c4665b310c add: CS support (thanks to dakku)
Sushi-k <epgrec@park.mda.or.jp>
parents: 57
diff changeset
124 $arr['selected'] = $type == "CS" ? "selected" : "";
a2c4665b310c add: CS support (thanks to dakku)
Sushi-k <epgrec@park.mda.or.jp>
parents: 57
diff changeset
125 array_push( $types, $arr );
a2c4665b310c add: CS support (thanks to dakku)
Sushi-k <epgrec@park.mda.or.jp>
parents: 57
diff changeset
126 }
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
127 }
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
128
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
129 $k_station_name = "";
37
e5f9aa34d06f change: modify all script for web base setting
yoneda <epgrec@park.mda.or.jp>
parents: 10
diff changeset
130 $crecs = DBRecord::createRecords(CHANNEL_TBL);
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
131 $stations = array();
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
132 $stations[0]['id'] = 0;
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
133 $stations[0]['name'] = "鴻";
115
7a64d5e3baee mod: キーワード検索を整理
yoneda <epgrec@park.mda.or.jp>
parents: 106
diff changeset
134 $stations[0]['selected'] = (! $channel_id) ? "selected" : "";
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
135 foreach( $crecs as $c ) {
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
136 $arr = array();
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
137 $arr['id'] = $c->id;
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
138 $arr['name'] = $c->name;
115
7a64d5e3baee mod: キーワード検索を整理
yoneda <epgrec@park.mda.or.jp>
parents: 106
diff changeset
139 $arr['selected'] = $channel_id == $c->id ? "selected" : "";
7a64d5e3baee mod: キーワード検索を整理
yoneda <epgrec@park.mda.or.jp>
parents: 106
diff changeset
140 if( $channel_id == $c->id ) $k_station_name = $c->name;
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
141 array_push( $stations, $arr );
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
142 }
77
cb7da56c4198 modified: Keyword.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 67
diff changeset
143 $weekofdays["$weekofday"]["selected"] = "selected" ;
106
57676bb30f64 add: 時間帯で絞り込みを追加
Sushi-k <epgrec@park.mda.or.jp>
parents: 77
diff changeset
144
57676bb30f64 add: 時間帯で絞り込みを追加
Sushi-k <epgrec@park.mda.or.jp>
parents: 77
diff changeset
145 // 絽
57676bb30f64 add: 時間帯で絞り込みを追加
Sushi-k <epgrec@park.mda.or.jp>
parents: 77
diff changeset
146 $prgtimes = array();
57676bb30f64 add: 時間帯で絞り込みを追加
Sushi-k <epgrec@park.mda.or.jp>
parents: 77
diff changeset
147 for( $i=0; $i < 25; $i++ ) {
57676bb30f64 add: 時間帯で絞り込みを追加
Sushi-k <epgrec@park.mda.or.jp>
parents: 77
diff changeset
148 array_push( $prgtimes,
57676bb30f64 add: 時間帯で絞り込みを追加
Sushi-k <epgrec@park.mda.or.jp>
parents: 77
diff changeset
149 array( "name" => ( $i == 24 ? "" : sprintf("%0d鐔",$i) ),
57676bb30f64 add: 時間帯で絞り込みを追加
Sushi-k <epgrec@park.mda.or.jp>
parents: 77
diff changeset
150 "value" => $i,
57676bb30f64 add: 時間帯で絞り込みを追加
Sushi-k <epgrec@park.mda.or.jp>
parents: 77
diff changeset
151 "selected" => ( $i == $prgtime ? "selected" : "" ) )
57676bb30f64 add: 時間帯で絞り込みを追加
Sushi-k <epgrec@park.mda.or.jp>
parents: 77
diff changeset
152 );
57676bb30f64 add: 時間帯で絞り込みを追加
Sushi-k <epgrec@park.mda.or.jp>
parents: 77
diff changeset
153 }
57676bb30f64 add: 時間帯で絞り込みを追加
Sushi-k <epgrec@park.mda.or.jp>
parents: 77
diff changeset
154
57676bb30f64 add: 時間帯で絞り込みを追加
Sushi-k <epgrec@park.mda.or.jp>
parents: 77
diff changeset
155
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
156
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
157 $smarty = new Smarty();
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
158 $smarty->assign("sitetitle","腟罎膣");
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
159 $smarty->assign("do_keyword", $do_keyword );
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
160 $smarty->assign( "programs", $programs );
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
161 $smarty->assign( "cats", $cats );
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
162 $smarty->assign( "k_category", $category_id );
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
163 $smarty->assign( "k_category_name", $k_category_name );
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
164 $smarty->assign( "types", $types );
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
165 $smarty->assign( "k_type", $type );
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
166 $smarty->assign( "search" , $search );
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
167 $smarty->assign( "use_regexp", $use_regexp );
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
168 $smarty->assign( "stations", $stations );
115
7a64d5e3baee mod: キーワード検索を整理
yoneda <epgrec@park.mda.or.jp>
parents: 106
diff changeset
169 $smarty->assign( "k_station", $channel_id );
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
170 $smarty->assign( "k_station_name", $k_station_name );
77
cb7da56c4198 modified: Keyword.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 67
diff changeset
171 $smarty->assign( "weekofday", $weekofday );
cb7da56c4198 modified: Keyword.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 67
diff changeset
172 $smarty->assign( "k_weekofday", $weekofdays["$weekofday"]["name"] );
cb7da56c4198 modified: Keyword.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 67
diff changeset
173 $smarty->assign( "weekofday", $weekofday );
cb7da56c4198 modified: Keyword.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 67
diff changeset
174 $smarty->assign( "weekofdays", $weekofdays );
cb7da56c4198 modified: Keyword.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 67
diff changeset
175 $smarty->assign( "autorec_modes", $autorec_modes );
106
57676bb30f64 add: 時間帯で絞り込みを追加
Sushi-k <epgrec@park.mda.or.jp>
parents: 77
diff changeset
176 $smarty->assign( "prgtimes", $prgtimes );
57676bb30f64 add: 時間帯で絞り込みを追加
Sushi-k <epgrec@park.mda.or.jp>
parents: 77
diff changeset
177 $smarty->assign( "prgtime", $prgtime );
1
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
178 $smarty->display("programTable.html");
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
179 }
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
180 catch( exception $e ) {
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
181 exit( $e->getMessage() );
f5a9f0eb4858 deleted: LICENSE.ja
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
182 }
115
7a64d5e3baee mod: キーワード検索を整理
yoneda <epgrec@park.mda.or.jp>
parents: 106
diff changeset
183 ?>