1
|
1 <?php
|
|
2 header("Expires: Thu, 01 Dec 1994 16:00:00 GMT");
|
|
3 header("Last-Modified: ". gmdate("D, d M Y H:i:s"). " GMT");
|
|
4 header("Cache-Control: no-cache, must-revalidate");
|
|
5 header("Cache-Control: post-check=0, pre-check=0", false);
|
|
6 header("Pragma: no-cache");
|
|
7
|
|
8
|
|
9 include_once("config.php");
|
|
10 include_once(INSTALL_PATH . "/DBRecord.class.php" );
|
|
11 include_once(INSTALL_PATH . "/reclib.php" );
|
|
12
|
|
13 if( ! isset( $_GET['reserve_id'] )) jdialog("予約番号が指定されていません", "recordedTable.php");
|
|
14 $reserve_id = $_GET['reserve_id'];
|
|
15
|
|
16 try{
|
|
17 $rrec = new DBRecord( TBL_PREFIX.RESERVE_TBL, "id", $reserve_id );
|
|
18
|
|
19 $start_time = toTimestamp($rrec->starttime);
|
|
20 $end_time = toTimestamp($rrec->endtime );
|
|
21 $duration = $end_time - $start_time + FORMER_TIME;
|
|
22
|
|
23 $dh = $duration / 3600;
|
|
24 $duration = $duration % 3600;
|
|
25 $dm = $duration / 60;
|
|
26 $duration = $duration % 60;
|
|
27 $ds = $duration;
|
|
28
|
|
29 $title = htmlspecialchars(str_replace(array("\r\n","\r","\n"), '', $rrec->title),ENT_QUOTES);
|
|
30 $abstract = htmlspecialchars(str_replace(array("\r\n","\r","\n"), '', $rrec->description),ENT_QUOTES);
|
|
31
|
|
32 header("Content-type: video/x-ms-asf; charset=\"UTF-8\"");
|
|
33 header('Content-Disposition: inline; filename="'.$rrec->path.'.asx"');
|
|
34 echo "<ASX version = \"3.0\">";
|
|
35 echo "<PARAM NAME = \"Encoding\" VALUE = \"UTF-8\" />";
|
|
36 echo "<ENTRY>";
|
|
37 echo "<REF HREF=\"".INSTALL_URL."/sendstream.php?reserve_id=".$rrec->id ."\" />";
|
|
38 echo "<REF HREF=\"".INSTALL_URL.SPOOL."/".$rrec->path ."\" />";
|
|
39 echo "<TITLE>".$title."</TITLE>";
|
|
40 echo "<ABSTRACT>".$abstract."</ABSTRACT>";
|
|
41 echo "<DURATION VALUE=";
|
|
42 echo '"'.sprintf( "%02d:%02d:%02d",$dh, $dm, $ds ).'" />';
|
|
43 echo "</ENTRY>";
|
|
44 echo "</ASX>";
|
|
45 }
|
|
46 catch(exception $e ) {
|
|
47 exit( $e->getMessage() );
|
|
48 }
|
|
49 ?> |