changeset 78:ded62b253bca

new file: channelInfo.php new file: channelSetSID.php new file: install/grscan.php
author Sushi-k <epgrec@park.mda.or.jp>
date Wed, 24 Feb 2010 20:23:03 +0900
parents cb7da56c4198
children 6eabffb0ccac
files channelInfo.php channelSetSID.php install/grscan.php
diffstat 3 files changed, 88 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/channelInfo.php	Wed Feb 24 20:23:03 2010 +0900
@@ -0,0 +1,36 @@
+<?php
+include_once('config.php');
+include_once( INSTALL_PATH . "/DBRecord.class.php" );
+include_once( INSTALL_PATH . "/Settings.class.php" );
+
+if( isset($_GET['channel_disc']) ) {
+	
+	try {
+		$crec = new DBRecord( CHANNEL_TBL, "channel_disc", $_GET['channel_disc'] );
+		
+		echo '<div class="prg_title">';
+		echo $crec->name . "</div>";
+		
+		// 種別
+		echo '<div class="prg_channel"><span class="labelLeft">種別:</span><span class="bold">';
+		echo $crec->type;
+		echo '</span></div>';
+		
+		// チャンネル
+		echo '<div class="prg_channel"><span class="labelLeft">物理チャンネル:</span><span class="bold">';
+		echo $crec->channel;
+		echo '</span></div>';
+		
+		// フォーム
+		echo '<form method="post" action="channelSetSID.php">';
+		echo '<div class="prg_channel"><span class="labelLeft">サービスID:</span>';
+		echo '<span><input type="text" name="n_sid" size="20" id="id_sid" value="'. $crec->sid .'" /></span>';
+		echo '<input type="hidden" name="n_channel_disc" id="id_disc" value="'. $crec->channel_disc .'" />';
+		echo '</div>';
+		echo '</form>';
+	}
+	catch( Exception $e ) {
+		echo "error:チャンネル情報の取得に失敗";
+	}
+}
+?>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/channelSetSID.php	Wed Feb 24 20:23:03 2010 +0900
@@ -0,0 +1,17 @@
+<?php
+include_once('config.php');
+include_once( INSTALL_PATH . "/DBRecord.class.php" );
+include_once( INSTALL_PATH . "/Settings.class.php" );
+
+
+if( isset($_POST['sid']) && isset($_POST['channel_disc']) ) {
+	
+	try {
+		$crec = new DBRecord( CHANNEL_TBL, "channel_disc", $_POST['channel_disc'] );
+		$crec->sid = trim($_POST['sid']);
+	}
+	catch( Exception $e ) {
+		// 無視
+	}
+}
+?>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/install/grscan.php	Wed Feb 24 20:23:03 2010 +0900
@@ -0,0 +1,35 @@
+<?php
+  include_once( "../config.php" );
+
+  $catv = "";
+
+  if( isset($_POST['catv']) ) {
+	if( $_POST['catv'] == 1) {
+		$catv = "catv";
+	}
+  }
+  echo '<p>チャンネルスキャン実行中...</p>';
+  flush();
+  ob_flush();
+
+  system("/usr/local/bin/grscan ".$catv." >".INSTALL_PATH."/settings/gr_channel.php" );
+
+  if( ! file_exists( INSTALL_PATH."/settings/gr_channel.php") ) {
+	exit("地上デジタルのスキャンに失敗したようです。自身で".INSTALL_PATH."/settings/gr_channel.phpを作成し、http://localhost/epgrec/install/step2.phpからインストールを再開させてください");
+  }
+  include_once( INSTALL_PATH."/settings/gr_channel.php" );
+
+echo "<p><b>地上デジタルチャンネルの設定確認</b></p>";
+
+echo "<div>現在、config.phpでは以下のチャンネルの受信が設定されています。受信不可能なチャ
+ンネルが混ざっていると番組表が表示できません。</div>";
+
+echo "<ul>";
+foreach( $GR_CHANNEL_MAP as $key => $value ) {
+        echo "<li>物理チャンネル".$value."</li>";
+}
+echo "</ul>";
+
+echo '<p><a href="step2.php">以上を確認し次の設定に進む</a></p>';
+
+?>