<?php
// -------------------------------------------------------------------------//
//			      RUNCMS                                        //
//                                                                          //
//	 reliable - Unique - Nocost &  Simplicity & ease off use            //
//                       < http://www.runcms.org >                          //
// -------------------------------------------------------------------------//


define("XOOPS_THEME", "runcms");
function themeheader($show_rblock=0) {
global $xoopsConfig, $xoopsUser, $meta;
?>

</head><body>
<?php OpenWaitBox();?>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#34404E">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="table1" height="87">
<tr bgcolor="003595" border="0" ><td bgcolor="990000" height="85" width="18" >
<a href="http://www.runcms.org"><img src="<?php echo XOOPS_URL."/themes/".XOOPS_THEME;?>/images/hubex.gif" height="85" width="18" border="0" /></a>
</td><td width="100%" height="85" align="left" valign="middle" background="<?php echo XOOPS_URL."/themes/".XOOPS_THEME;?>/images/logo1a.jpg">
</td><tr><td colspan="2">
<table background="<?php echo XOOPS_URL."/themes/".XOOPS_THEME;?>/images/knold7.gif" width="100%" height="25" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#34404E" bgcolor="#34404E" style="border-collapse: collapse">
<tr>
<?php if ($xoopsUser) { ?>
<td  class="topborder" align="left" valign="middle" width="173" heigth="14">&nbsp;<?php printf(_TH_WELCOME_BACK, $xoopsUser->uname());?>
&nbsp;
</td>
<?php } else { ?>
<form action="<?php echo XOOPS_URL;?>/user.php" method="post">
<td width="173" height="14" align="center" valign="middle">
<input type="hidden" name="op" value="login" />
<input type="text" class="login" size="10" name="uname" />
<input type="password" class="login" size="10" name="pass" />
<input type="image" class="image" name="submit" src="<?php echo XOOPS_URL."/themes/".XOOPS_THEME;?>/images/login1.gif" width="16" height="15" border="0" align="middle" alt="<?php echo _TH_LOGIN;?>" />
 </td></form>
<?php } ;?>
<td class="tmenu" id="topmenu" align="center" ><nobr><a href="<?php echo XOOPS_URL;?><?php echo _TH_LINK1;?>"><?php echo _TH_LINKN1;?></a><img name="spacer" src="<?php echo XOOPS_URL."/themes/".XOOPS_THEME;?>/images/spacer.gif" width="5" height="14" border="0" /></nobr>
<a id="topmenu" align="right"><nobr><a href="<?php echo XOOPS_URL;?><?php echo _TH_LINK2;?>"><?php echo _TH_LINKN2;?></a><img name="spacer" src="<?php echo XOOPS_URL."/themes/".XOOPS_THEME;?>/images/spacer.gif" width="5" height="14" border="0" /></nobr></a>
<a id="topmenu"  align="right"><nobr><a href="<?php echo XOOPS_URL;?><?php echo _TH_LINK3;?>"><?php echo _TH_LINKN3;?></a><img name="spacer" src="<?php echo XOOPS_URL."/themes/".XOOPS_THEME;?>/images/spacer.gif" width="5" height="14" border="0" /></nobr></a> 
<a id="topmenu" align="right"><nobr><a href="<?php echo XOOPS_URL;?><?php echo _TH_LINK4;?>"><?php echo _TH_LINKN4;?></a><img name="spacer" src="<?php echo XOOPS_URL."/themes/".XOOPS_THEME;?>/images/spacer.gif" width="5" height="14" border="0" /></nobr></a>
<a id="topmenu" align="right"><nobr><a href="<?php echo XOOPS_URL;?><?php echo _TH_LINK5;?>"><?php echo _TH_LINKN5;?></a><img name="spacer" src="<?php echo XOOPS_URL."/themes/".XOOPS_THEME;?>/images/spacer.gif" width="5" height="14" border="0" /></nobr></a>
<a id="topmenu" align="right"><nobr><a href="<?php echo XOOPS_URL;?><?php echo _TH_LINK6;?>"><?php echo _TH_LINKN6;?></a><img name="spacer" src="<?php echo XOOPS_URL."/themes/".XOOPS_THEME;?>/images/spacer.gif" width="5" height="14" border="0" /></nobr></a>
<a id="topmenu"  align="right"><nobr><a target="_blank" href="<?php echo _TH_LINK7;?>"><?php echo _TH_LINKN7;?></a><img name="spacer" src="<?php echo XOOPS_URL;?>/themes/<?php echo XOOPS_THEME;?>/images/spacer.gif" width="5" height="14" border="0" /></nobr></a>
<a id="topmenu"  align="right"><nobr><a target="_blank" href="<?php echo _TH_LINK8;?>"><?php echo _TH_LINKN8;?></a><img name="spacer" src="<?php echo XOOPS_URL;?>/themes/<?php echo XOOPS_THEME;?>/images/spacer.gif" width="5" height="14" border="0" /></nobr></a>
</td>
<form id="pagesearch" action="<?php echo XOOPS_URL;?>/search.php" method="post">
<td width="170" align="center" height="20">
<img style="cursor: hand;" onclick="xoopsGetElementById('pagesearch').submit();" align=middle src="<?php echo XOOPS_URL."/themes/".XOOPS_THEME;?>/images/search.gif" height="12" width="13" alt="<?php echo _TH_SEARCH;?>" />
<input type="text" class="login" name="query" size="20" />
<input type="hidden" name="action" value="results" />
</td></form></tr></table></td></tr></table>
<table width="100%" border="0" cellpadding="0" cellspacing="1">
<td align="left" valign="top" class="sidebar1" id="leftblocks" name="leftblocks">
<?php make_sidebar("left");?>
</td><td align="center" valign="top" width="100%" bgcolor="ffffff">
<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr>
<td bgcolor="ffffff" width="1">
<td bgcolor="ffffff" width="1">
</tr></table>
<center><?php showbanner();?></center>
<?php
}

/*************************************************************************/
/* Function themefooter()                                                */
/*                                                                       */
/* This is everything that appears right after any center stuff.         */
/*                                                                       */
/* themeheader<td>                                                       */
/* center stuff                                                          */
/* </td>themefooter                                                      */
/*************************************************************************/

function themefooter($show_rblock=0, $footer='') {
?>
<br /></td>
<td id="rightblocks" name="rightblocks" align="right" valign="top" class="sidebar2">
<?php make_sidebar("right");?>
</td></tr></table></td></tr></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>
<td class="footer" align="center" style="border-right:1px solid #ffffff;border-left:1px solid #ffffff;"><b><?php echo $footer;?></b><font color="#990000">Design By <a href="http://www.farsus.dk" style="text-decoration: none"><font color="#990000" >Farsus</font></a>
</td></tr></table></td></tr></table>
<table width="100%" border="0" cellspacing="0" cellpadding="4"><tr><td>
</td><td align="right"></td></tr></table>
<?php
}

/************************************************************/
/* Function themesidebox_left()                             */
/*                                                          */
/* Controls the look of your left blocks.                   */
/************************************************************/

function themesidebox_left($title='', $content) {
?>
<table width="173" border="0" cellpadding="0" cellspacing="0"><tr>
<td class="leftsidboxtitle"><?php echo $title;?></td>
</tr><tr><td class="leftsideboxcontent"><?php echo $content;?></td>
</tr></table>
<?php
}

/************************************************************/
/* Function themesidebox_right()                            */
/*                                                          */
/* Controls the look of your right blocks.                  */
/************************************************************/

function themesidebox_right($title='', $content) {
?>
<table width="170" border="0" cellpadding="0" cellspacing="0"><tr>
<td class="rightsidboxtitle"><?php echo $title;?></td>
</tr><tr><td class="rightsideboxcontent"><?php echo $content;?></td>
</tr></table>
<?php
}

/************************************************************/
/* Function themecenterbox_left()                           */
/*                                                          */
/* Controls the look of your left-center blocks.            */
/************************************************************/

function themecenterbox_left($title='', $content) {
?>
<table width="100%" border="0" cellpadding="0" cellspacing="1"><tr>
<td class="centerblocktitle"><?php echo $title;?></td>
</tr><tr>
<td class="centerblockcontent"><?php echo $content;?></td>
</tr></table>
<?php
}

/************************************************************/
/* Function themecenterbox_center()                         */
/*                                                          */
/* Controls the look of your center-center blocks.          */
/************************************************************/

function themecenterbox_center($title='', $content) {
?>
<table width="100%" border="0" cellpadding="0" cellspacing="1"><tr>
<td class="centerblocktitle"><?php echo $title;?></td>
</tr><tr>
<td><?php echo $content;?></td>
</tr></table>
<br />
<?php
}

/************************************************************/
/* Function themecenterbox_right()                          */
/*                                                          */
/* Controls the look of your right-center blocks.           */
/************************************************************/

function themecenterbox_right($title='', $content) {
?>
<table width="100%" border="0" cellpadding="0" cellspacing="1"><tr>
<td class="centerblocktitle"><?php echo $title;?></td>
</tr><tr>
<td class="centerblockcontent"><?php echo $content;?></td>
</tr></table>
<?php
}

/************************************************************/
/* Function themenews()                                     */
/*                                                          */
/* This function formats the stories on your homepage       */
/************************************************************/

function themenews(
			$poster,
			$time,
			$title,
			$counter,
			$thetext,
			$timglink,
			$adminlink,
			$morelink=''
			) {
?>
<div class="news"><table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr class="bg1"><td class="indextitle"><?php echo $title;?></td></tr><tr>
<td class="indextable2"><span class="postedby">
<img src="<?php echo XOOPS_URL."/themes/".XOOPS_THEME;?>/images/arrow_news.gif" width="6" height="9">&nbsp;<?php echo _TH_POSTEDBY;?> <?php echo $poster;?>. <?php echo _TH_ON;?> <?php echo $time;?> (<?php echo _TH_READS;?> <?php echo $counter;?>)
</span><div class="indextext"><p><?php echo $timglink;?> <?php echo $thetext;?></p>
</div></td></tr><tr><td class="more"><div align="right">
<?php echo $adminlink;?> <?php echo $morelink;?></div></td>
</tr></table>
</div>
<br />
<?php
}

/************************************************************/
/* Function themecenterposts()                              */
/*                                                          */
/* Controls the look of various center blocks,              */
/* like when you preview posts in the forum & news.         */
/************************************************************/

function themecenterposts($title='', $content) {
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr>
<td><div class="indextitle"><?php echo $title;?></div></td>
</tr><tr><td class="indextable"><div class="indextext">
<p><?php echo $content;?></p>
</div></td></tr></table><br />
<?php
}

/*************************************************************************/
/* Function theme_post()                                                 */
/*                                                                       */
/* Used for displaying thread content for comments in various modules.   */
/*************************************************************************/
function theme_post(
			$subject,
			$text,
			$color_number='',
			$subject_image='',
			$post_date='',
			$ip_image='',
			$reply_image='',
			$edit_image='',
			$delete_image='',
			$username='',
			$rank_title='',
			$rank_image='',
			$avatar_image='',
			$reg_date='',
			$posts='',
			$user_from='',
			$online_image='',
			$profile_image='',
			$pm_image='',
			$email_image='',
			$www_image='',
			$icq_image='',
			$aim_image='',
			$yim_image='',
			$msnm_image=''
			) {

if ($color_number == 1) {
	$bg1 = 'bg1';
	$bg2 = 'bg3';
	} else {
		$bg1 = 'bg3';
		$bg2 = 'bg1';
	}
?>
<br /><table border="0" cellpadding="0" cellspacing="0" align="center" valign="top" width="100%"><tr>
<td class="bg2"><table border="0" cellpadding="4" cellspacing="1" width="100%"><tr class="<?php echo $bg2;?>" align="left">
<td width="110" valign="absmiddle"><b><?php echo $username;?></b></td>
<td valign="absmiddle"><?php echo $subject_image;?> <b><?php echo $subject;?></b></td>
</tr><tr class="<?php echo $bg1;?>" align="left">
<td width="125" valign="top"><div align="center"><?php echo $rank_image;?><br />
<?php echo $rank_title;?><br /><br /><?php echo $avatar_image;?></div><br />
<div style="border: 1px solid #ECECEC; padding: 2px 2px 2px 2px;" class="<?php echo $bg2;?>">
<?php echo $reg_date;?><br /><?php echo $posts;?><br /><?php echo $user_from;?></div>
<br /><br /><centeR><?php echo $online_image;?></centeR>
<!-- SPACER IMAGE -->
<img width="125" height="1" src="<?php echo XOOPS_URL."/themes/".XOOPS_THEME;?>/images/pixel.gif">
</td><td valign="top"><table width="100%" border="0"><tr>
<td align="right" valign="absmiddle"><?php echo $ip_image;?> <?php echo $delete_image;?> <?php echo $edit_image;?> <?php echo $reply_image;?></td>
</tr><tr><td><?php echo $text;?></td></tr></table></td>
</tr><tr class="<?php echo $bg2;?>" align="left"><td align="center" nowrap><b>&raquo;</b><?php echo $post_date;?></td>
<td valign="absmiddle"><?php echo $profile_image;?> <?php echo $pm_image;?> <?php echo $email_image;?> <?php echo $www_image;?> <?php echo $icq_image;?> <?php echo $aim_image;?> <?php echo $yim_image;?> <?php echo $msnm_image;?></td>
</tr></table></td></tr></table>
<?php
}

/**************************************************************************/
/* Function theme_waitbox()                                               */
/*                                                                        */
/* Controls the look of the waitbox when it's turned on                   */
/**************************************************************************/
function theme_waitbox() {
?>
<table cellpadding="3" cellspacing="3" class="waitbox"><tr>
<td align="center">
<b><big><?php echo _TH_LOADING;?></big></b><br />
<img src="<?php echo XOOPS_URL."/themes/".XOOPS_THEME;?>/images/await.gif" alt="" />
<br /><?php echo _TH_PLEASEWAIT;?></td></tr>
</table>
<?php
}

/**************************************************************************/
/* OpenTable Functions                                                    */
/*                                                                        */
/* The look of certain tables opend/closed in variousparts of xoops, like */
/* the tables in the center of the admin section, and in various modules. */
/**************************************************************************/

function OpenTable($width='100%') {
?>
<table width="<?php echo $width;?>" border="0" cellspacing="1" cellpadding="0"><tr>
<td valign="top">
<table width="100%" border="0" cellspacing="1" cellpadding="8"><tr class="bg1">
<td valign="top">
<?php
}
function CloseTable() {
?>
</td></tr></table></td></tr></table>
<?php
}
?>
