<?php

class skin_calendar {


function cal_edit_button($id) {
global $ibforums;

return <<<HTML
	<div align='right'><a href='{$ibforums->base_url}&act=calendar&code=edit&eventid=$id'><{P_EDIT}></a></div><br>
HTML;
}


function cal_show_event($event, $member, $event_type, $edit_button="") {
global $ibforums;

return <<<HTML

	<table width="<{tbl_width}>" align='center' border="0" cellspacing="1" cellpadding="0" bgcolor="<{tbl_border}>">
  	<tr> 
	 <td colspan='2' class='maintitle'  style='height:30px'>&nbsp;&nbsp;<b>{$ibforums->lang['event_date']} {$event['year']}Äê{$event['month_text']}{$event['mday']}ÈÕ</b>&nbsp;&nbsp;<b>[{$event['title']}] ($event_type)</b></td>
	</tr>
	<tr>
     <td class='mainbg'> 
       <table width="100%" border="0" cellspacing="1" cellpadding="4">
	    <tr>
		 <td valign='top' class='row1' width='25%'><span class='normalname'><a href='{$ibforums->base_url}&act=Profile&MID={$member['id']}'>{$member['name']}</a></span><br><br>{$member['avatar']}<span class='postdetails'><br>{$ibforums->lang['group']}{$member['g_title']}<br>{$ibforums->lang['posts']}{$member['posts']}<br>{$ibforums->lang['joined']}{$member['joined']}</span></td>
		 <td valign='top' height='100%' class='row1' width='75%'>
		 	$edit_button
			 <span class='postcolor'>
			  {$event['event_text']}
			 </span>
			 
		 </td>
	  </tr>
	  <tr>
		<td class='titlefoot' width='100%' align='center' colspan='2'>
		 <table border='0' cellspacing='0' cellpadding='0' width='100%' align='center'>
		  <tr>
		   <td align='center' valign='middle'>
			 &lt;&lt; <a href='{$ibforums->base_url}&act=calendar&d={$event['mday']}&m={$event['month']}&y={$event['year']}'>{$ibforums->lang['back']}</a>
		   </td>
		  </tr>
		 </table>
	   </td>
	  </tr>
	 </table>
	</td>
   </tr>
   </table>
   <br>

HTML;
}

function cal_page_events_start() {
global $ibforums;

return <<<HTML

	<br>
	<table cellpadding='0' cellspacing='0' border='0' width='<{tbl_width}>' align='center'>
	<tr>
	<td valign='middle' align='left'><span class='pagetitle'>{$ibforums->lang['cal_title_events']}</td>
	</tr>
	</table>

HTML;
}

function cal_birthday_start() {
global $ibforums;

return <<<HTML
	
	<table width="<{tbl_width}>" align='center' border="0" cellspacing="1" cellpadding="0" bgcolor="<{tbl_border}>">
  	<tr> 
	 <td class='maintitle'  style='height:30px'> 
		 <table width='100%' cellpadding='4' cellspacing='1'>
		  <tr>
		   <td align='left' class='maintitle'><b>{$ibforums->lang['cal_birthdays']}</b></td>
		  </tr>
		 </table>
	 </td>
  	</tr>
  	<tr> 
     <td class='mainbg'> 
       <table width="100%" border="0" cellspacing="1" cellpadding="4">
	    <tr>
	    <br>
		  <ul>
		 
	
HTML;
}

function cal_birthday_entry($uid, $uname, $age="") {
global $ibforums;

return <<<HTML
		<li><a href='{$ibforums->base_url}&act=Profile&MID=$uid'>$uname</a> ($age)</li>
HTML;
}


function cal_birthday_end() {
global $ibforums;

return <<<HTML
		</tr>
		<tr>
		   <td class='titlefoot' width='100%' align='center' colspan='7'>
			<table border='0' cellspacing='0' cellpadding='0' width='100%' align='center'>
			 <tr>
			  <td align='center' valign='middle'>
			  	&lt;&lt; <a href='{$ibforums->base_url}&act=calendar&d={$ibforums->input['d']}&m={$ibforums->input['m']}&y={$ibforums->input['y']}'>{$ibforums->lang['back']}</a>
			  </td>
			 </tr>
			</table>
		  </td>
		 </tr>
	   </table>
	  </td>
	 </tr>
	 </table>
HTML;
}



function cal_main_content($month, $year, $prev, $next) {
global $ibforums;

return <<<HTML

	<br>
	<form action='{$ibforums->base_url}&act=calendar' method='POST'>
	<table cellpadding='0' cellspacing='0' border='0' width='<{tbl_width}>' align='center'>
	<tr>
	<td valign='middle' align='left'><span class='pagetitle'>$year Äê $month</td>
	</tr>
	</table>
	
	<table width="<{tbl_width}>" align='center' border="0" cellspacing="1" cellpadding="0" bgcolor="<{tbl_border}>">
  	<tr> 
	 <td class='maintitle'  style='height:30px'> 
		 <table width='100%' cellpadding='4' cellspacing='1'>
		  <tr>
		   <td align='left' class='maintitle'><b>{$ibforums->lang['table_title']}</b></td>
		   <td align='right' class='maintitle' style='font-weight:bold'>[<a href='{$ibforums->base_url}&act=calendar&m={$prev['month_id']}&y={$prev['year_id']}'>{$prev['year_id']}Äê{$prev['month_name']}</a> ¡« <a href='{$ibforums->base_url}&act=calendar&m={$next['month_id']}&y={$next['year_id']}'>{$next['year_id']}Äê{$next['month_name']}</a>]
			  </td>
		  </tr>
		 </table>
	 </td>
  	</tr>
  	<tr> 
     <td class='mainbg'> 
       <table width="100%" border="0" cellspacing="1" cellpadding="4">
	    <tr>
		  <!--IBF.DAYS_TITLE_ROW-->
		
		  <!--IBF.DAYS_CONTENT-->
		 </tr>
		 <tr>
		   <td class='titlefoot' width='100%' align='center' colspan='7'>
			<table border='0' cellspacing='0' cellpadding='0' width='100%' align='center'>
			 <tr>
			  <td align='left' valign='middle'>
			  	<select name='y' class='forminput'><!--IBF.YEAR_BOX--></select>&nbsp;<select name='m' class='forminput'><!--IBF.MONTH_BOX--></select>&nbsp;&nbsp;<input type='submit' value='{$ibforums->lang['form_submit_show']}' class='forminput'>
			  </td>
			  <td align='center' valign='middle'><b>[<a href='{$ibforums->base_url}&act=calendar&code=newevent'>{$ibforums->lang['post_new_event']}</a>]</b></td>
			  <td align='right' style='font-weight:bold'>[<a href='{$ibforums->base_url}&act=calendar&m={$prev['month_id']}&y={$prev['year_id']}'>{$prev['year_id']}Äê{$prev['month_name']}</a> ¡« <a href='{$ibforums->base_url}&act=calendar&m={$next['month_id']}&y={$next['year_id']}'>{$next['year_id']}Äê{$next['month_name']}</a>]
			  </td>
			 </tr>
			</table>
		  </td>
		 </tr>
	   </table>
	  </td>
	 </tr>
	 </table>
	 </form>
	 
		
	
HTML;
}

function cal_day_bit($day) {
global $ibforums;

return <<<HTML

	<td width='14%' class='titlemedium'><b>$day</b></td>
HTML;
}


function cal_new_row() {
global $ibforums;

return <<<HTML

	</tr>
	<!-- NEW ROW-->
	<tr>
	
HTML;
}

function cal_blank_cell() {
global $ibforums;

return <<<HTML

	<td style='height:80px' class='row2'><br></td>
	
HTML;
}


function cal_date_cell($month_day, $events="") {
global $ibforums;

return <<<HTML

	<td style='height:80px' valign='top' class='row1' align='left'>$month_day $events</td>
	
HTML;
}

function cal_date_cell_today($month_day, $events="") {
global $ibforums;

return <<<HTML

	<td style='height:80px;border:2px;border-style:outset' valign='top' class='row1' align='left'><span class='highlight'><b>$month_day</b></span>$events</td>
	
HTML;
}


function cal_events_start() {
global $ibforums;

return <<<HTML
	<!--<ul>-->
	<br>
HTML;
}

function cal_events_wrap($link, $text) {
global $ibforums;

return <<<HTML
	<li type='square'><a href='{$ibforums->base_url}&act=calendar&$link'>$text</a>
HTML;
}

function cal_events_end() {
global $ibforums;

return <<<HTML
	<!--</ul>-->
HTML;
}

}
?>