<?php

// -----------------------------------------------------------------------
// This file is part of AROUNDMe
// 
// Copyright (C) 2003 - 2006 Barnraiser
// http://www.barnraiser.org/
// info@barnraiser.org
// 
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option) any
// later version.
// 
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with program; see the file COPYING. If not, write to the Free
// Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
// 02110-1301, USA.
// -----------------------------------------------------------------------
?>

<div class="col_left1">
	<div class="box">
		<div class="box_top">
			<?php echo $lang['hdr_network'];?><br />
		</div>
		
		<div class="box_mid">
			<div class="content">
			<p>
				<b><?php echo $lang['txt_degree1'];?></b><br />
			</p>
			
			<p>
				<a href="sn_list.php?relation=1"><?php echo $lang['href_view_relations'];?></a><br />
				<a href="sn_invite.php"><?php echo $lang['href_invite_relations'];?></a><br />
			</p>
			
			<p>
				<b><?php echo $lang['txt_network'];?></b><br />
			</p>
			
			<p>
				<a href="sn_list.php"><?php echo $lang['href_view_directory'];?></a><br />
			</p>
			
			</div>
		</div>
	</div>
	
	<div class="box_bottom">
		<span class="box_bottom_right"></span>
		<span class="box_bottom_left"></span>
	</div>
	
	<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="6" alt="" /><br />
	
	<div class="box">
		<div class="box_top">
			<?php echo $lang['hdr_week_schedule'];?><br />
		</div>
		
		<div class="box_mid">
			<div class="content">
				<?php
				if (!empty($schedule_items)) {
				?>
				
				<table border="0" cellspacing="0" cellpadding="4" width="100%">
					<?php
					foreach($schedule_items as $key => $i):
					?>
					<tr>
						<td valign="top">
							<a href="sch_view.php?schedule_id=<?php echo $i['schedule_id'];?>"><?php echo $this->date->formatDate($i['schedule_create_datetime'], 1);?></a><br />
							<?php echo $i['schedule_title'];?><br />
						</td>
					</tr>
					<?php
					endforeach;
					?>
				</table>
				<?php 
				}
				else {
				?>
				<p>
					<?php echo $lang['err_no_schedule'];?><br />
				</p>
				<?php }?>
			</div>
		</div>
	</div>
	
	<div class="box_bottom">
		<span class="box_bottom_right"></span>
		<span class="box_bottom_left"></span>
	</div>
	
	<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="6" alt="" /><br />
	
	<div class="box">
		<div class="box_top">
			<?php echo $lang['hdr_latest_comments'];?><br />
		</div>
		
		<div class="box_mid">
			<div class="content">
				<?php
				if (isset($comments)) {
				foreach($comments as $key => $i):
				?>
				<p>
					<?php echo $this->date->formatDate($i['comment_create_datetime'], 1);?>: <a href="sn_profile.php?user_id=<?php echo $i['user_id'];?>"><?php echo $i['profile_nic'];?></a>:&nbsp;
					<?php
					if ($rsp_item_type_ids['blog'] == $i['rsp_item_type_id']) {
					?>
					<a href="blg_view.php?blog_id=<?php echo $i['item_id'];?>"><?php echo $lang['rsp']['item_type'][$i['rsp_item_type_id']];?></a>
					<?php
					}
					elseif ($rsp_item_type_ids['library'] == $i['rsp_item_type_id']) {
					?>
					<a href="lib_view.php?library_id=<?php echo $i['item_id'];?>"><?php echo $lang['rsp']['item_type'][$i['rsp_item_type_id']];?></a>
					<?php
					}
					elseif ($rsp_item_type_ids['poll'] == $i['rsp_item_type_id']) {
					?>
					<a href="pol_view.php?poll_id=<?php echo $i['item_id'];?>"><?php echo $lang['rsp']['item_type'][$i['rsp_item_type_id']];?></a>
					<?php
					}
					elseif ($rsp_item_type_ids['forum'] == $i['rsp_item_type_id']) {
					?>
					<a href="frm_view.php?subject_id=<?php echo $i['item_id'];?>"><?php echo $lang['rsp']['item_type'][$i['rsp_item_type_id']];?></a>
					<?php
					}
					elseif ($rsp_item_type_ids['quiz'] == $i['rsp_item_type_id']) {
					?>
					<a href="quz_view.php?quiz_id=<?php echo $i['item_id'];?>"><?php echo $lang['rsp']['item_type'][$i['rsp_item_type_id']];?></a>
					<?php }?>
					<br />
				</p>
				
				<p>
					<?php 
					$i['comment_body'] = str_replace("<br />", "", $i['comment_body']);
					$i['comment_body'] = str_replace("<p>", "", $i['comment_body']);
					$i['comment_body'] = str_replace("</p>", "", $i['comment_body']);
					$i['comment_body'] = trim ($i['comment_body']);
					echo dots(200, $i['comment_body']);?><br />
				</p>
				
				<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="4" alt="" /><br />
				
				<?php
				endforeach;
				}
				else {
				?>
				<p>
					<?php echo $lang['err_no_latest_comments'];?><br />
				<p>
				<?php }?>
			</div>
		</div>
	</div>
	
	<div class="box_bottom">
		<span class="box_bottom_right"></span>
		<span class="box_bottom_left"></span>
	</div>
</div>

<div class="col_right1">
	<div class="box">
		<div class="box_top">
			<?php echo $lang['hdr_publishing'];?><br />
		</div>
		
		<div class="box_mid">
			<div class="content">
				<p>
					<b><?php echo $lang['txt_title_blog'];?></b><br />
					<?php echo $lang['txt_blog'];?><br />
				</p>
				
				<p align="right">
					<a href="blg_view.php?view=my_blog"><?php echo $lang['href_view_blog'];?></a>&nbsp;
					<a href="blg_edit.php"><?php echo $lang['href_add_blog_entry'];?></a><br />
				</p>
				
				<p>
					<b><?php echo $lang['txt_title_library'];?></b><br />
					<?php echo $lang['txt_library'];?><br />
				</p>
				
				<p align="right">
					<a href="lib_view.php?view=my_library"><?php echo $lang['href_view_library'];?></a><br />
				</p>
				
				<p>
					<b><?php echo $lang['txt_title_forum'];?></b><br />
					<?php echo $lang['txt_forum'];?><br />
				</p>
				
				<p align="right">
					<a href="frm_view.php?view=my_forum"><?php echo $lang['href_view_forum'];?></a>&nbsp;
					<a href="frm_edit.php"><?php echo $lang['href_add_subject'];?></a><br />
				</p>
				
				<p>
					<b><?php echo $lang['txt_title_poll'];?></b><br />
					<?php echo $lang['txt_poll'];?><br />
				</p>
				
				<p align="right">
					<a href="pol_view.php?view=my_polls"><?php echo $lang['href_view_polls'];?></a>&nbsp;
					<a href="pol_view.php?view=voted"><?php echo $lang['href_view_poll_voted'];?></a><br />
				</p>
				
				<p>
					<b><?php echo $lang['txt_title_quiz'];?></b><br />
					<?php echo $lang['txt_quiz'];?><br />
				</p>
				
				<p align="right">
					<a href="quz_view.php?view=my_quizzes"><?php echo $lang['href_view_quizzes'];?></a>&nbsp;
					<a href="quz_view.php?view=results"><?php echo $lang['href_view_quiz_results'];?></a><br />
				</p>
				
				
				<p>
					<b><?php echo $lang['txt_title_comment'];?></b><br />
					<?php echo $lang['txt_comments'];?><br />
				</p>
				
				<p align="right">
					<a href="search.php?type=comments"><?php echo $lang['href_view_comments'];?></a>&nbsp;
					<a href="search.php?view=received_comment"><?php echo $lang['href_view_received_comments'];?></a><br />
				</p>
			</div>
		</div>
	</div>
	
	<div class="box_bottom">
		<span class="box_bottom_right"></span>
		<span class="box_bottom_left"></span>
	</div>
</div>
