comparison mediatomb.php @ 13:b0fc647167f5

modified: mediatomb.php modified: recomplete.php
author yoneda <yoneda@debian.localnet.mda.or.jp>
date Tue, 14 Jul 2009 00:19:55 +0900
parents c4cb171f9453
children cf19005e65d1
comparison
equal deleted inserted replaced
12:c4cb171f9453 13:b0fc647167f5
1 #!/usr/bin/php 1 #!/usr/bin/php
2 <?php 2 <?php
3 3
4 include_once('config.php'); 4 include_once('config.php');
5 include_once(INSTALL_PATH.'/DBRecord.class.php'); 5 include_once(INSTALL_PATH.'/DBRecord.class.php');
6 include_once(INSTALL_PATH.'/reclib.php');
6 7
7 try { 8 try {
8 9
9 $recs = DBRecord::createRecords(TBL_PREFIX.RESERVE_TBL ); 10 $recs = DBRecord::createRecords(TBL_PREFIX.RESERVE_TBL );
10 11
15 mysql_query( $sqlstr ); 16 mysql_query( $sqlstr );
16 $sqlstr = "set NAME utf8"; 17 $sqlstr = "set NAME utf8";
17 mysql_query( $sqlstr ); 18 mysql_query( $sqlstr );
18 19
19 foreach( $recs as $rec ) { 20 foreach( $recs as $rec ) {
21 $title = $rec->title."(".date("Y/m/d", toTimestamp($rec->starttime)).")";
20 $sqlstr = "update mt_cds_object set metadata='dc:description=".$rec->description."' where dc_title='".$rec->path."'"; 22 $sqlstr = "update mt_cds_object set metadata='dc:description=".$rec->description."' where dc_title='".$rec->path."'";
21 mysql_query( $sqlstr ); 23 mysql_query( $sqlstr );
22 $sqlstr = "update mt_cds_object set dc_title='".$rec->title."' where dc_title='".$rec->path."'"; 24 $sqlstr = "update mt_cds_object set dc_title='".$title."' where dc_title='".$rec->path."'";
23 mysql_query( $sqlstr ); 25 mysql_query( $sqlstr );
24 } 26 }
25 } 27 }
26 catch( Exception $e ) { 28 catch( Exception $e ) {
27 exit( $e->getMessage() ); 29 exit( $e->getMessage() );