Mercurial > epgrec.yaz
annotate install/step1.php @ 96:b0095925b3da
merged with upstream
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Wed, 03 Mar 2010 00:19:53 +0900 |
parents | 3ec5ca5e56ca |
children | 84220382fea8 |
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", |
84 | 50 INSTALL_PATH."/storeProgram.php", |
56
be9e4520cfec
change: GEN_THUMBNAIL
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
47
diff
changeset
|
51 $gen_thumbnail, |
32
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 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
54 echo "<p><b>ディレクトリのパーミッションチェック(777)</b></p>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
55 echo "<div>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
56 foreach($rw_dirs as $value ) { |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
57 echo $value; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
58 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
59 $perm = getPerm( $value ); |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
60 if( $perm != "777" ) { |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
61 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
|
62 } |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
63 echo "...".$perm."...ok<br>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
64 } |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
65 echo "</div>"; |
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 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
68 echo "<p><b>ファイルのパーミッションチェック(755)</b></p>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
69 echo "<div>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
70 foreach($exec_files as $value ) { |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
71 echo $value; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
72 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
73 $perm = getPerm( $value ); |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
74 if( !($perm == "755" || $perm == "775" || $perm == "777") ) { |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
75 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
|
76 } |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
77 echo "...".$perm."...ok<br>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
78 } |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
79 echo "</div>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
80 |
76
69e0dabc765a
fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
56
diff
changeset
|
81 if( !file_exists( "/usr/local/bin/grscan" ) ) { |
69e0dabc765a
fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
56
diff
changeset
|
82 |
32
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
83 echo "<p><b>地上デジタルチャンネルの設定確認</b></p>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
84 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
85 echo "<div>現在、config.phpでは以下のチャンネルの受信が設定されています。受信不可能なチャンネルが混ざっていると番組表が表示できません。</div>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
86 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
87 echo "<ul>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
88 foreach( $GR_CHANNEL_MAP as $key => $value ) { |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
89 echo "<li>物理チャンネル".$value."</li>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
90 } |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
91 echo "</ul>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
92 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
93 echo '<p><a href="step2.php">以上を確認し次の設定に進む</a></p>'; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
94 |
76
69e0dabc765a
fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
56
diff
changeset
|
95 } |
69e0dabc765a
fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
56
diff
changeset
|
96 else { |
69e0dabc765a
fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
56
diff
changeset
|
97 |
69e0dabc765a
fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
56
diff
changeset
|
98 echo'<p><b>地上デジタルチャンネルの設定</b><p>'; |
69e0dabc765a
fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
56
diff
changeset
|
99 echo ' |
69e0dabc765a
fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
56
diff
changeset
|
100 <form method="post" action="grscan.php" > |
69e0dabc765a
fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
56
diff
changeset
|
101 <div>地上デジタルチャンネルスキャンを開始します。スキャンにはおよそ10~20分程度はかかります。ケーブルテレビをお使いの方は下のチェックボックスをオンにしてください</div> |
69e0dabc765a
fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
56
diff
changeset
|
102 <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
|
103 |
69e0dabc765a
fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
56
diff
changeset
|
104 <input type="submit" value="スキャンを開始する" /> |
69e0dabc765a
fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
56
diff
changeset
|
105 </form>'; |
69e0dabc765a
fixed: Reservation.class.php
Sushi-k <epgrec@park.mda.or.jp>
parents:
56
diff
changeset
|
106 } |
47 | 107 ?> |