ようこそ! このブログは、PHPとMysqlを使って作成したオリジナルプログラムを、QHMに読み込んで表示させています。

index.php

FrontPage

index.phpのソースコード

<?
require("MySmarty.class.php");
require('Settings.class.php');
require('Categories.class.php');
require('Topic.class.php');

$smarty = new MySmarty();
$settings  = new Settings;
$categories  = new Categories;
$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;

$topics = $topic->getTopics( $settings->maxtopics );
$category = $categories->getCategory();

if( $topics[0]['yyyy'] == '' ){
	$yyyy = date( "Y" );
	$mm = date( "m" );
} else {
	$yyyy = $topics[0]['yyyy'];
	$mm = $topics[0]['mm'];
}
$calender = $topic->makeTopicCalender( $yyyy , $mm );
$monthly = $topic->getTopicMothlyArc();

$smarty->assign( "settings", $set );
$smarty->assign( "topics", $topics );
$smarty->assign( "categorys", $category );
$smarty->assign( "calender", $calender );
$smarty->assign( "monthly", $monthly );

$smarty->display( "index.html" );

?>

powered by Quick Homepage Maker 4.25
based on PukiWiki 1.4.7 License is GPL. QHM

最新の更新 RSS  Valid XHTML 1.0 Transitional