let me show you the code I am using:
Index.php
Code:
<html>
<head>
<meta name="Content" content="Operating System, C++, C, Tutorials, Programs">
<meta name="Author" content="Codemaster Snake (Neeraj Kumar)">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Magneto - Home</title>
<style>
<!--
a
{
color: #006000; text-decoration: none
}
a:hover
{
color: #E91720; text-decoration: underline
}
.alphabox
{
border-right: #999999 1px solid; border-top: #999999 1px solid; font-size: 11px; filter: progid:DXImageTransform.Microsoft.Alpha( style=0,opacity=50); border-left: #999999 1px solid; color: #000000; border-bottom: #999999 1px solid; font-family: verdana; height: 18px; background-color: #efefef
}
.radiobutton
{
font-size: 11px; filter: progid:DXImageTransform.Microsoft.Alpha( style=0,opacity=50);
}
//-->
</style>
<script language="Javascript">
window.status="Loading Website.....";
function date()
{
function makeArray()
{
for (i = 0; i<makeArray.arguments.length; i++)
this[i + 1] = makeArray.arguments[i];
}
var months = new makeArray('January','February','March','April','May','June', 'July','August','September','October','November','December');
var date = new Date();
var day = date.getDate();
var month = date.getMonth() + 1;
var yy = date.getYear();
var year = (yy < 1000) ? yy + 1900 : yy;
document.write(day + " " + months[month] + "' " + year);
}
function search()
{
if(gsearch.searchbox.value=='')
{
alert("Enter Some Text To be Found In Search Box!");
gsearch.searchbox.value="Google Search!";
return;
}
if(gsearch.searchoption.value=='site')
{
squery="http://www.google.co.in/search?hl=en&q=" + gsearch.searchbox.value + " site: www.geocities.com/sohalnk" + "&meta=";
}
else squery="http://www.google.co.in/search?hl=en&q=" + gsearch.searchbox.value + "&meta=";
window.open(squery);
gsearch.searchbox.value="Google Search!";
}
function animate(tdval)
{
tdval.style.backgroundColor = "#FAFAFB";
}
function unanimate(tdval)
{
tdval.style.backgroundColor = "";
}
</script>
</head>
<body text="#505050" leftMargin="0" topMargin="0" bottommargin="0" marginheight="0" marginwidth="0" bgcolor="#FFFFFF">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; font-family: Verdana; font-size: 8pt" width="750" class="toptablegradient" bgcolor="#FFFFFF">
<tr>
<td rowspan="2" width="10" background="images/lgrad.jpg"></td>
<td width="190" bgcolor="#F33333" height="70" valign="bottom">
<font size="6" color="#FFFFFF">
[img]images/logo.gif[/img]</font></td>
<td height="70">
<table border="0" cellpadding="2" cellspacing="0" style="border-collapse: collapse; font-family: Verdana; font-size: 8pt" width="100%" height="100%">
<tr>
<td width="100%">
<table border="1" cellpadding="0" cellspacing="0" style="border-style:dotted; border-width:1; border-collapse: collapse; font-family: Verdana; font-size: 8pt" width="468" bordercolor="#435E8F" height="60">
<tr>
<td>Advertisement</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="10" rowspan="2" background="images/rgrad.jpg"></td>
</tr>
<tr>
<td width="190" height="30" bgcolor="#000000"><font color="#FFFFFF">Future
Of Operating Systems</font></td>
<td height="30" bgcolor="#CCCCCC" background="images/menugrad.jpg">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; font-family: Verdana; font-size: 10pt" width="100%" height="28">
<tr>
<td align="center">Home</td>
<td bgcolor="#FFFFFF" width="2" align="center"></td>
<td align="center" onmouseover="javascript:animate(this);" onmouseout="javascript:unanimate(this);">
Forums</td>
<td bgcolor="#FFFFFF" width="2" align="center"></td>
<td align="center" onmouseover="javascript:animate(this);" onmouseout="javascript:unanimate(this);">
Downloads</td>
<td bgcolor="#FFFFFF" width="2" align="center"></td>
<td align="center" onmouseover="javascript:animate(this);" onmouseout="javascript:unanimate(this);">
Tutorials</td>
<td bgcolor="#FFFFFF" width="2" align="center"></td>
<td align="center" onmouseover="javascript:animate(this);" onmouseout="javascript:unanimate(this);">
Links</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; font-family: Verdana; font-size: 8pt" width="750" bgcolor="#FFFFFF">
<tr>
<td rowspan="4" width="10" background="images/lgrad.jpg"></td>
<td valign="top" colspan="3"></td>
<td width="10" rowspan="4" background="images/rgrad.jpg"></td>
</tr>
<tr>
<td width="175" valign="top">
<table border="0" cellpadding="3" cellspacing="0" style="border-collapse: collapse; font-family: Verdana; font-size: 8pt" width="100%">
<tr>
<td width="100%">
<p align="right">
<script language="Javascript">
date();
document.write("");
</script>
</p>
</td>
</tr>
<tr>
<td width="100%"><hr color="#999999" width="98%" size="1"></td>
</tr>
<tr>
<td width="100%">
<div align="center">
<center>
<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse; font-family: Verdana; font-size: 8pt" width="98%" bordercolor="#5587B9">
<tr>
<form method="get" action="http://www.google.com/custom" target="_top">
<td align="left"><a href="http://www.google.com/">
[img]http://www.google.com/logos/Logo_25wht.gif[/img]</img></a>
<input type="hidden" name="domains" value="magneto.easyhost4all.info">
</input>
<input type="text" name="q" size="15" maxlength="255" class="alphabox"></input>
<input type="submit" name="sa" value="Go" class="alphabox"></input>
<input type="radio" name="sitesearch" value checked="checked" class="radiobutton"></input>
web
<input type="radio" name="sitesearch" value="magneto.easyhost4all.info" class="radiobutton"></input>
site
<input type="hidden" name="client" value="pub-7101442121611017">
</input><input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="ISO-8859-1"></input>
<input type="hidden" name="oe" value="ISO-8859-1"></input>
<input type="hidden" name="safe" value="active"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1;">
</input><input type="hidden" name="hl" value="en"></input>
</td>
</form>
</tr>
</table>
</center>
</div>
</td>
</tr>
<tr>
<td width="100%"><hr color="#999999" width="98%" size="1"></td>
</tr>
<tr>
<td width="100%">Latest Release:
• koolOS ver 2.1</td>
</tr>
<tr>
<td width="100%"><hr color="#999999" width="98%" size="1"></td>
</tr>
<tr>
<td width="100%"><span style="font-size: 9pt;">My Guestbook:</span><div align="right">
<a title="View Geustbook!" href="http://geocities.yahoo.com/gb/view?member=sohalnk">
View</a> /
<a title="Sign Guestbook!" href="http://geocities.yahoo.com/gb/sign?member=sohalnk">
Sign</a></div>
</td>
</tr>
<tr>
<td width="100%"><hr color="#999999" width="98%" size="1"></td>
</tr>
<tr>
<td width="100%"><font style="font-size: 9pt;" face="Verdana">OS Dev
Ring:
</font> ● <font face="Verdana">
<a href="http://www.osdev.org/cgi-bin/ring.cgi?os_num=291&option=prev">
Previous Site</a>
</font> ● <font face="Verdana">
List Sites
</font> ● <font face="Verdana">
<a href="http://www.osdev.org/cgi-bin/ring.cgi?os_num=291&option=next">
Next Site</a>
</font> ● <font face="Verdana">
<a href="http://www.osdev.org/cgi-bin/ring.cgi?os_num=291&option=random">
Random Site</a></font></td>
</tr>
<tr>
<td width="100%"><hr color="#999999" width="98%" size="1"></td>
</tr>
<tr>
<td width="100%">For best results
we recommend Firefox
<a href="http://www.firefox.com">
[img]images/take.gif[/img]</a></td>
</tr>
</table>
</td>
<td width="1" bgcolor="#CCCCCC"></td>
<td valign="top">
<table border="0" cellpadding="3" cellspacing="0" style="border-collapse: collapse; font-family: Verdana; font-size: 8pt" width="100%">
<tr>
<td><font size="2">
[img]images/bullet.gif[/img]Welcome
To Magneto's Homepage
</font>
Welcome to Magneto's website! At last my OS got it's permanent
name (previously koolOS).... I don't know why I have chosen this
name but I am happy with it and won't is it ever again (I'll try to).
Now that I had named my OS and completed this website, I now can get back
to work and develop Magneto. It's still in it's stages of development
and it's going on pretty well and it is taking shape of a real operating
system. I will release Magneto's next version very soon! So, Keep
checking back for release.
It will be a command line Operating System just like MS-DOS And
FreeDOS (for the time being). I am making a GUI for it but it will
take a long time for that. It uses text mode of 80x25 resolution.
It also display a (stupid) graphics welcome and good bye screen when you
start it and shut it. It uses VGA mode 0x13 (or 13h) for that. In future
it will support many more resolutions!
I want to make it as simple as possible and more and more user friendly.
I hope to achieve that one day! I am still learning about Operating Systems
and hope it would develop into a real Operating System. If you have any
suggestions or any thing you would like to share for Magneto then
<a href="file:///c:/Documents%20and%20Settings/Codemaster%20Snake/My%20Documents/my%20web/back/data/contactme.htm">
Email Me</a>!.
You can download Magneto's latest version from downloads section. Read
Magneto's release notes
<a href="file:///c:/Documents%20and%20Settings/Codemaster%20Snake/My%20Documents/my%20web/back/data/rnotes.htm">
here</a>.
<a target="_blank" href="file:///c:/Documents%20and%20Settings/Codemaster%20Snake/My%20Documents/my%20web/back/images/kos21sshot.gif">
Screen shot of Magneto</a>.</td>
</tr>
<tr><td></td></tr>
<tr>
<td><font size="2">
[img]images/bullet.gif[/img]Magneto's Developer Desk
</font><table border="0" cellpadding="3" cellspacing="0" style="border-collapse: collapse; font-family: Verdana; font-size: 8pt" width="100%">
<tr>
<td width="100%"><?php
include("./php/fetch.php");
?></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" colspan="3"></td>
</tr>
</table>
</center>
</div>
<script>
window.status="Welcome To Magneot's Website!";
</script>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; font-family: Verdana; font-size: 8pt" bordercolor="#111111" width="750" id="AutoNumber3">
<tr>
<td background="images/lgrad.jpg" width="10" rowspan="2"></td>
<td bgcolor="#F33333" height="20">
<p align="center"><font color="#FFFFFF"><a href="javascript:">
<font color="#FFFFFF">Home</font></a> | About Us |
<font color="#FFFFFF">Contact Us</font></font></p>
</td>
<td background="images/rgrad.jpg" width="10" rowspan="2"></td>
</tr>
<tr>
<td bgcolor="#CCCCCC" height="30">
<p align="center"><font style="font-size: 7pt">Site is best viewed with Firefox.
Use this site at own <font color="#F33333">RISK</font>.</font></p>
</td>
</tr>
<tr>
<td background="images/lgrad.jpg" width="10"></td>
<td bgcolor="#FFFFFF" height="30">
<script type="text/javascript"><!--
google_ad_client = "pub-7101442121611017";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "image";
google_ad_channel ="7583965051";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
<td background="images/rgrad.jpg" width="10"></td>
</tr>
</table>
</center>
</div>
</body>
</html>
fetch.php:
Code:
<?php
//
// This path points to the directory where phpBB is installed. Do
// not enter an URL here. The path must end with a trailing
// slash.
//
// Examples:
// forum in /aaa/bbb/ccc/ and script in /aaa/bbb/ccc/
// --> $phpbb_root_path = './';
// forum in /aaa/bbb/ccc/ and script in /aaa/bbb/
// --> $phpbb_root_path = './ccc/';
// forum in /aaa/bbb/ccc/ and script in /aaa/bbb/ddd/
// --> $phpbb_root_path = '../ccc/';
//
$phpbb_root_path = '../forums/';
//
// prevent hacking attempts - phpBB needs this line to work
//
define ('IN_PHPBB', true);
//
// lets make a little check if your root_path is correct ;-)
//
if (!file_exists($phpbb_root_path . 'extension.inc'))
{
die ('<tt>phpBB Fetch All:
$phpbb_root_path is wrong and does not point to your forum.</tt>');
}
//
// now we include (integrate) some files which we need
//
//
// this is a phpBB file
//
include_once ($phpbb_root_path . 'extension.inc');
//
// again a phpBB file
//
include_once ($phpbb_root_path . 'common.' . $phpEx);
//
// phpBB file, too
//
include_once ($phpbb_root_path . 'includes/bbcode.' . $phpEx);
//
// well, this is 'our' file - the common Fetch All file needed
// every time you use Fetch All
//
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/common.' . $phpEx);
//
// since we are 'only' displaying some news we only need this one
//
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/posts.' . $phpEx);
//
// these lines will setup the phpBB session management which we need
// for proper security settings - just don't touch them unless you know
// what you are doing
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// here we go: fetch some news!
//
$news = phpbb_fetch_posts(3,POST_FETCH_LAST);
//
// disconnect from the database
//
phpbb_disconnect();
//
// Hint:
//
// If you are curious what's in the $news array
// --> uncomment the following line
// You will see all elements of the array along with
// their keys and values.
//
// echo ('<pre>'); print_r($news); die();
?>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; font-family: Verdana; font-size: 8pt" width="100%" bordercolor="#5587B9">
<tr>
<td>
<?php
//
// output all postings - this is the common method of displaying
// fetched data --> it is called a for() loop
//
// the for loop will go through every element of our result; thus
// it displays all entries
//
// an element will be displayed by
//
// echo $news[$i]['topic_title'];
//
// which displays the topic title of the current posting of the loop
//
for($i = 0; $i < count($news); $i++)
{
?>
<table border="0" cellpadding="3" cellspacing="0" style="border-collapse: collapse; font-family: Verdana; font-size: 8pt" width="100%">
<tr>
<td>
Title: <font size="2"><?php echo $news[$i]['topic_title']; ?></font>
</td>
</tr>
<tr>
<td>Posted by
<a href="<?php echo append_sid($phpbb_root_path . 'profile.php?mode=viewprofile&u=' . $news[$i]['user_id']); ?>">
<?php echo $news[$i]['username']; ?></a> on <?php echo $news[$i]['date']; ?> at <?php echo $news[$i]['time']; ?>
<hr color="#999999" width="70%" size="1">
<?php echo $news[$i]['post_text']; ?>
<hr color="#999999" width="70%" size="1">
<div align="right">(<?php echo $news[$i]['topic_replies']; ?>)
<a href="<?php echo append_sid($phpbb_root_path . 'viewtopic.php?t=' . $news[$i]['topic_id']); ?>">
Comment<?php if ($news[$i]['topic_replies'] != 1) { echo 's'; } ?></a></div>
</td>
</tr>
</table>
<hr size="2">
<?php
}
?>
</td>
</tr>
</table>
Idon't know php programming really just experimenting with it.....
please help