view deleteKeyword.php @ 175:f68f63465a41 default tip

handles RecException instead of Exception
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Tue, 16 Apr 2013 15:24:02 +0900
parents f5a9f0eb4858
children
line wrap: on
line source

<?php
include_once('config.php');
include_once( INSTALL_PATH . '/DBRecord.class.php' );
include_once( INSTALL_PATH . '/Reservation.class.php' );
include_once( INSTALL_PATH . '/reclib.php' );
include_once( INSTALL_PATH . '/Keyword.class.php' );

if( isset($_GET['keyword_id'])) {
	try {
		$rec = new Keyword( "id", $_GET['keyword_id'] );
		$rec->delete();
	}
	catch( Exception $e ) {
		exit( "Error:" . $e->getMessage() );
	}
}
else exit( "Error:キーワードIDが指定されていません" );
?>