annotate install/step1.php @ 76:69e0dabc765a

fixed: Reservation.class.php modified: config.php.sample modified: index.php modified: install/step1.php modified: install/step3.php install/grscan.php
author Sushi-k <epgrec@park.mda.or.jp>
date Tue, 23 Feb 2010 19:58:30 +0900
parents be9e4520cfec
children cb7da56c4198
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
32
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
1 <?php
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
2
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
3 // パーミッションを返す
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
4 function getPerm( $file ) {
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
5
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
6 $ss = @stat( $file );
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
7 return sprintf("%o", ($ss['mode'] & 000777));
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
8 }
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
9
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
10 echo "<p><b>epgrecのインストール状態をチェックします</b></p>";
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
11
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
12 // config.phpの存在確認
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
13
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
14 if(! file_exists( "../config.php" ) ) {
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
15 @copy( "../config.php.sample", "../config.php" );
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
16 if( ! file_exists( "../config.php" ) ) {
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
17 exit("config.phpが存在しません<br>config.php.sampleをリネームし地上デジタルチャンネルマップを編集してください<br>");
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
18 }
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
19 }
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
20
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
21 include_once("../config.php");
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
22 include_once(INSTALL_PATH."/reclib.php");
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
23
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
24 // do-record.shの存在チェック
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
25
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
26 if(! file_exists( DO_RECORD ) ) {
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
27 exit("do-record.shが存在しません<br>do-record.sh.pt1やdo-record.sh.friioを参考に作成してください<br>" );
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
28 }
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
29
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
30
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
31 // パーミッションチェック
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
32
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
33 $rw_dirs = array(
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
34 INSTALL_PATH."/templates_c",
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
35 INSTALL_PATH."/video",
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
36 INSTALL_PATH."/thumbs",
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
37 INSTALL_PATH."/settings",
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
38 INSTALL_PATH."/cache",
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
39 );
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
40
56
be9e4520cfec change: GEN_THUMBNAIL
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents: 47
diff changeset
41 $gen_thumbnail = INSTALL_PATH."/gen-thumbnail.sh";
be9e4520cfec change: GEN_THUMBNAIL
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents: 47
diff changeset
42 if( defined("GEN_THUMBNAIL") )
be9e4520cfec change: GEN_THUMBNAIL
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents: 47
diff changeset
43 $gen_thumbnail = GEN_THUMBNAIL;
be9e4520cfec change: GEN_THUMBNAIL
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents: 47
diff changeset
44
32
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
45
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
46 $exec_files = array(
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
47 DO_RECORD,
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
48 COMPLETE_CMD,
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
49 INSTALL_PATH."/getepg.php",
56
be9e4520cfec change: GEN_THUMBNAIL
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents: 47
diff changeset
50 $gen_thumbnail,
32
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
51 );
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
52
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
53 echo "<p><b>ディレクトリのパーミッションチェック(777)</b></p>";
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
54 echo "<div>";
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
55 foreach($rw_dirs as $value ) {
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
56 echo $value;
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
57
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
58 $perm = getPerm( $value );
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
59 if( $perm != "777" ) {
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
60 exit('<font color="red">...'.$perm.'... missing</font><br>このディレクトリを書き込み許可にしてください(ex. chmod 777 '.$value.')</div>' );
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
61 }
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
62 echo "...".$perm."...ok<br>";
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
63 }
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
64 echo "</div>";
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
65
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
66
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
67 echo "<p><b>ファイルのパーミッションチェック(755)</b></p>";
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
68 echo "<div>";
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
69 foreach($exec_files as $value ) {
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
70 echo $value;
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
71
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
72 $perm = getPerm( $value );
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
73 if( !($perm == "755" || $perm == "775" || $perm == "777") ) {
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
74 exit('<font color="red">...'.$perm.'... missing</font><br>このファイルを実行可にしてください(ex. chmod 755 '.$value.')</div>');
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
75 }
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
76 echo "...".$perm."...ok<br>";
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
77 }
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
78 echo "</div>";
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
79
76
69e0dabc765a fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 56
diff changeset
80 if( !file_exists( "/usr/local/bin/grscan" ) ) {
69e0dabc765a fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 56
diff changeset
81
69e0dabc765a fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 56
diff changeset
82 include_once( INSTALL_PATH."/settings/gr_channel.php" );
69e0dabc765a fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 56
diff changeset
83
32
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
84 echo "<p><b>地上デジタルチャンネルの設定確認</b></p>";
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
85
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
86 echo "<div>現在、config.phpでは以下のチャンネルの受信が設定されています。受信不可能なチャンネルが混ざっていると番組表が表示できません。</div>";
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
87
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
88 echo "<ul>";
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
89 foreach( $GR_CHANNEL_MAP as $key => $value ) {
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
90 echo "<li>物理チャンネル".$value."</li>";
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
91 }
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
92 echo "</ul>";
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
93
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
94 echo '<p><a href="step2.php">以上を確認し次の設定に進む</a></p>';
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
95
76
69e0dabc765a fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 56
diff changeset
96 }
69e0dabc765a fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 56
diff changeset
97 else {
69e0dabc765a fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 56
diff changeset
98
69e0dabc765a fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 56
diff changeset
99 echo'<p><b>地上デジタルチャンネルの設定</b><p>';
69e0dabc765a fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 56
diff changeset
100 echo '
69e0dabc765a fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 56
diff changeset
101 <form method="post" action="grscan.php" >
69e0dabc765a fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 56
diff changeset
102 <div>地上デジタルチャンネルスキャンを開始します。スキャンにはおよそ10~20分程度はかかります。ケーブルテレビをお使いの方は下のチェックボックスをオンにしてください</div>
69e0dabc765a fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 56
diff changeset
103 <div>ケーブルテレビを使用:<input type="checkbox" name="catv" value="1" /></div>
69e0dabc765a fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 56
diff changeset
104
69e0dabc765a fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 56
diff changeset
105 <input type="submit" value="スキャンを開始する" />
69e0dabc765a fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 56
diff changeset
106 </form>';
69e0dabc765a fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents: 56
diff changeset
107 }
47
a701aaf6d216 add: gen-thumbnail.sh
Sushi-k <epgrec@park.mda.or.jp>
parents: 32
diff changeset
108 ?>