<?
require("MySmarty.class.php");
require('Settings.class.php');
require('Topic.class.php');
$keywd = $_GET['keywd'];/*GETで受け取り*/
if( $keywd=='' ){ /*POSTで受け取り*/
$keywd = $_POST['keywd'];
}
$smarty = new MySmarty();
$settings = new Settings;
$topic = new Topic;
$settings->loadSettings();
$set['maintitle'] = $settings->maintitle;
$set['subtitle'] = $settings->subtitle;
$set['maxtopics'] = $settings->maxtopics;
$set['username'] = $settings->username;
$set['passwd'] = $settings->passwd;
$set['mailaddr'] = $settings->mailaddr;
if( $keywd != '' ){ /* $keywdが空でないなら */
$topics = $topic->getTopicsSearch( $keywd ); /* getTopicsSearch(関数で処理 */
}
/* スマーティに変数として渡す */
$smarty->assign( "settings", $set );
$smarty->assign( "topics", $topics );
$smarty->assign( "keywd", $keywd );
$smarty->display( "search.html" );
?>
0 件のコメント:
コメントを投稿