annotate recorder.php @ 153:4099ae0393eb

mod: do-record.shラッパを追加(まだ途中)
author epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
date Sun, 28 Mar 2010 22:56:00 +0900
parents
children 84220382fea8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
153
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
1 #!/usr/bin/php
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
2 <?php
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
3 $script_path = dirname( __FILE__ );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
4 chdir( $script_path );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
5 include_once( $script_path . '/config.php');
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
6 include_once( INSTALL_PATH . "/DBRecord.class.php" );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
7 include_once( INSTALL_PATH . "/Settings.class.php" );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
8 include_once( INSTALL_PATH . "/recLog.inc.php" );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
9 include_once( INSTALL_PATH . "/reclib.php" );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
10
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
11 // 緇剛
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
12
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
13 if( ! defined( RECORDER_CMD ) ) {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
14 define( "RECORDER_CMD", INSTALL_PATH . "/recorder.php" );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
15 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
16
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
17
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
18 // 潟潟違<祉若後篆
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
19
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
20 function epgrec_get_message() {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
21 global $msgh_r, $reserve_id;
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
22
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
23 $r = msg_receive($msgh_r, (int)$reserve_id , $msgtype, 1024, $message, TRUE, MSG_IPC_NOWAIT | MSG_NOERROR);
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
24 if( $r ) return $message;
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
25
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
26 return null;
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
27 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
28
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
29 // <祉若檎篆
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
30
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
31 function epgrec_send_message( $msg ) {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
32 global $msgh_w, $reserve_id;
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
33
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
34 msg_send( $msgh_w, (int)$reserve_id, $msg );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
35 sleep(1); // 御篆<緇
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
36 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
37
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
38
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
39 function epgrec_exec( $cmd ) {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
40 $descspec = array(
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
41 0 => array( 'file','/dev/null','r' ),
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
42 1 => array( 'file','/dev/null','w' ),
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
43 2 => array( 'file','/dev/null','w' ),
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
44 );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
45 $p = proc_open( $cmd, $descspec, $pipes );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
46 if( is_resource( $p ) ) return $p;
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
47
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
48 return false;
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
49 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
50
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
51 // 絎祉鴻潟絖祉鴻pid鴻菴
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
52 // 鴻鐚
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
53 //
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
54 function epgrec_childproc( $p )
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
55 {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
56 $st = proc_get_status( $p );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
57 $cpids = epgrec_childproc( $st['pid'] );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
58
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
59 // ps 絎茵
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
60 $d = array(
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
61 0 => array( 'file','/dev/null','r' ),
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
62 1 => array( 'pipe','w' ),
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
63 2 => array( 'file','/dev/null','w' ),
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
64 );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
65
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
66 $ps = proc_open( "/bin/ps -o pid,ppid -ax" , $d, $pipes );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
67 do {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
68 $st = proc_get_status( $ps );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
69 }while( $st['running'] );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
70
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
71 // 罔羣阪茯
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
72 $cpids = array();
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
73 while( ! feof( $pipes[1] ) ) {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
74 $line = fgets( $pipes[1] );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
75 $pids = preg_split( "/[\s]+/", $line );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
76 if( $pids[1] == $ppid ) {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
77 array_push( $cpids, $pids[0] );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
78 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
79 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
80 fclose( $pipes[1] );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
81 proc_close( $ps );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
82
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
83 return $cpids;
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
84 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
85
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
86 // 絎祉鴻潟絖祉鴻腟篋
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
87
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
88 function epgrec_termproc( $p )
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
89 {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
90 $cpids = epgrec_childproc( $p );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
91
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
92 @proc_terminate( $p );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
93 sleep(1);
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
94 @proc_terminate( $p ); // 2綺
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
95
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
96 foreach( $cpids as $cpid ) {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
97 @posix_kill( $cpid, SIGTERM ); // sigterm
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
98 usleep(100);
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
99 @posix_kill( $cpid, SIGKILL ); // sigkill
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
100 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
101
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
102 return true; // 篆荐若с
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
103 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
104
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
105 ////// 膩
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
106
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
107 $settings = Settings::factory();
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
108 $reserve_id = $argv[1];
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
109 $msgh_r = null; // 篆∞<祉若吾潟
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
110 $msgh_w = null; // 篆∞<祉若吾潟
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
111
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
112 // <祉若吾潟緇
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
113 $ipc_key = ftok( RECORDER_CMD, "R" );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
114 $msgh_r = msg_get_queue( $ipc_key );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
115
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
116 $ipc_key = ftok( RECORDER_CMD, "W" );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
117 $msgh_w = msg_get_queue( $ipc_key );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
118
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
119 try{
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
120 $rrec = new DBRecord( RESERVE_TBL, "id" , $reserve_id );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
121
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
122 // 祉緇
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
123 $starttime = toTimestamp($rrec->starttime);
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
124 $endtime = toTimestamp($rrec->endtime);
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
125
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
126 if( time() > $starttime ) {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
127 // サ牙私膣
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
128 $rrec->complete = 1; // 腟c
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
129 throw new RecException("recorder:: サ牙私膣絎茵", EPGREC_ERROR );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
130 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
131 reclog("recorder:: 牙ID".$rrec->id .":".$rrec->type.$rrec->channel.$rrec->title."牙祉吾с紮" );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
132
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
133 // 牙脂紮障у
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
134 while( time() < $starttime ) {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
135 if( ($message = epgrec_get_message() ) != null ) {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
136 switch( $message ) {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
137 case "terminate": // 腟篋腓
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
138 epgrec_send_message("success");
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
139 $rrec->complete = 1; // 腟c
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
140 throw new RecException("recorder:: 牙ID".$rrec->id .":".$rrec->type.$rrec->channel.$rrec->title."牙祉筝" );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
141 break;
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
142
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
143 case "stat":
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
144 epgrec_send_message("alive");
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
145 break;
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
146
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
147 default:
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
148 break;
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
149 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
150 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
151 usleep( 50 * 1000 ); // 50腱緇
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
152 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
153
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
154 // 牙脂紮
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
155
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
156 $proch = false;
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
157 if( ( $proch = epgrec_exec(DO_RECORD) ) !== false ) {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
158 // 牙糸篋緇
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
159 $rec_cont = true;
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
160 while( $rec_cont ){
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
161 $st = proc_get_status($proch);
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
162 if(! $st['running'] ) $rec_cont = false; // 牙糸篋
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
163
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
164 if( ($message = epgrec_get_message() ) != null ) {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
165 switch( $message ) {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
166 case "terminate": // 腟篋腓
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
167 if( epgrec_termproc( $proch ) == false ) {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
168 epgrec_send_message("error");
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
169 reclog( "牙祉潟潟罩≪с障", EPGREC_WARN );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
170 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
171 else {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
172 epgrec_send_message("success");
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
173 reclog("recorder:: 牙ID".$rrec->id .":".$rrec->type.$rrec->channel.$rrec->title."牙祉筝" );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
174 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
175 break;
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
176
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
177 case "stat":
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
178 epgrec_send_message("alive");
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
179 break;
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
180
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
181 default:
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
182 break;
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
183 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
184 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
185 sleep(1);
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
186 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
187 proc_close( $proch );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
188 $proch = false;
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
189 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
190 else {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
191 $rrec->complete = 1; // 腟c
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
192 throw new RecException("recorder:: 牙祉潟潟絎茵紊掩", EPGREC_ERROR );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
193 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
194
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
195 // 篋絎腟篋憜吾
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
196
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
197 if( time() < $endtime ) {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
198 $rrec->endtime = toDatetime( time() );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
199 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
200
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
201 // 絎篋違腴
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
202 $rrec->complete = '1';
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
203
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
204 // <c緇c鴻腆阪c純
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
205 sleep(15);
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
206 @exec("sync");
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
207
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
208 if( file_exists( INSTALL_PATH .$settings->spool . "/". $rrec->path ) ) {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
209 // 篋膣絎篋
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
210 reclog( "recorder:: 篋膣ID". $rrec->id .":".$rrec->type.$rrec->channel.$rrec->title."牙紫篋" );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
211
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
212 // 泣若篏
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
213 if( $settings->use_thumbs == 1 ) {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
214 $gen_thumbnail = INSTALL_PATH."/gen-thumbnail.sh";
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
215 if( defined("GEN_THUMBNAIL") )
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
216 $gen_thumbnail = GEN_THUMBNAIL;
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
217 @exec($gen_thumbnail);
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
218 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
219
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
220 if( $settings->mediatomb_update == 1 ) {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
221 $dbh = mysql_connect( $settings->db_host, $settings->db_user, $settings->db_pass );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
222 if( $dbh !== false ) {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
223 $sqlstr = "use ".$settings->db_name;
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
224 @mysql_query( $sqlstr );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
225 // ャ
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
226 $sqlstr = "set NAME utf8";
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
227 @mysql_query( $sqlstr );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
228 $sqlstr = "update mt_cds_object set metadata='dc:description=".mysql_real_escape_string($rrec->description)."&epgrec:id=".$reserve_id."' where dc_title='".$rrec->path."'";
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
229 @mysql_query( $sqlstr );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
230 $sqlstr = "update mt_cds_object set dc_title='".mysql_real_escape_string($rrec->title)."(".date("Y/m/d").")' where dc_title='".$rrec->path."'";
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
231 @mysql_query( $sqlstr );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
232 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
233 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
234 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
235 else { // 篋膣紊掩
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
236 reclog( "recomplete:: 篋膣ID". $rrec->id .":".$rrec->type.$rrec->channel.$rrec->title."牙祉紊掩罔≧", EPGREC_ERROR );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
237 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
238 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
239 catch( Exception $e ) {
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
240 reclog( "recorder:: ".$e->getMessage(), $e->getLevel() );
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
241 }
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
242
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
243 msg_remove_queue( $msgh_r ); // <祉若吾潟
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
244 msg_remove_queue( $msgh_w ); // <祉若吾潟
4099ae0393eb mod: do-record.shラッパを追加(まだ途中)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
245 ?>