মঙ্গলবার, ২৮ মে, ২০১৩

<?php
class loginregistration{
public function login(){
?>
<div class="content">
<form method="post" action="">
Name:
<input type="text" name="" /><br/>
Password:
<input type="password" name=""/><br/>
</form>
</div>
<?php
}
public function registration(){
?>
<div class="content">
<form method="post" action="">
Name:
<input type="text" name="" /><br/>
Email:
<input type="text" name=""/><br/>
Contact:
<input type="text" name=""/><br/>
</form>
</div>
<?php
}
}

class page{
public function home(){
?>
<div class="content">
<p>This is a home page</p>
</div>
<?php
}
public function contact(){
?>
<div class="content">
<p>This is a contact page</p>
</div>
<?php
}
public function about(){
?>
<div class="content">
<p>This is a about page</p>
</div>
<?php
}
public function blog(){
?>
<div class="content">
<p>This is a Blog page</p>
</div>
<?php
}
}
class menues{
public function menu(){
?>
<ul>
<li><a href="t.php">Home</a></li>
<li><a href="t.php?page=contact">Contact</a></li>
<li><a href="t.php?page=about">About</a></li>
<li><a href="t.php?page=blog">Blog</a></li>
</ul>
<p><a href="t.php?page=login">Login</a></p>
<p><a href="t.php?page=registration">Registration</a></p>
<?php
}
}
?>
<html>
<head>
<style type="text/css">
.content {height:200px; background-color:E1E1E1;}
</style>
</head>
<body>
<?php
//For Menu
$menu = new menues;
$menu -> menu();
//For Login
$login = new loginregistration;
// if(isset($_GET['type'])=="login"){
// $login->login();
// }else if($_GET['type']=="registration"){
// $login->registration();
// }

//For Page
$page = new page;
if(!isset($_GET['page'])){
$page->home();
}else if($_GET['page']=="contact"){
$page->contact();
}else if($_GET['page']=="about"){
$page->about();
}else if($_GET['page']=="blog"){
$page->blog();
}else if($_GET['page']=="login"){
$login->login();
}else if($_GET['page']=="registration"){
$login->registration();
}else{
$page->home();
}
?>
</body>
</html>

কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন