<?php

// -----------------------------------------------------------------------
// This file is part of aroundme
//
// Copyright (C) 2003, 2005 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., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
// -----------------------------------------------------------------------

?>


<form action="my_bookmarks.php" method="post">

<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td width="370" valign="top">
			<div class="box_top">
				<?php echo $lang['hdr_watching'];?><br />
			</div>

			<div class="box_mid" style="padding: 9px;">
			<table width="100%" cellpadding="4" cellspacing="0" border="0">
				<tr>
					<td colspan="2">
						<b><?php echo $lang['hdr_subjects'];?></b><br />
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />
					</td>
				</tr>
				<?php
				if (isset($watched_subjects)) {
				foreach($watched_subjects as $key => $i):
				
				if (!empty($i['group_id'])) {
				    $url = "frm_item.php?group_id=" . $i['group_id'] . "&amp;subject_id=" . $i['subject_id'];
				}
				else {
					 $url = "frm_item.php?subject_id=" . $i['subject_id'];
				}
				?>
				<tr valign="top">
					<td>
						<a href="<?php echo $url;?>"><?php echo $i['subject_title'];?></a><br />
						<?php echo dots(120, $i['subject_body']);?><br />
						<?php
						if (isset($i['movement']['lastview_datetime'])) {
							echo $lang['txt_lastview'] . " " . $i['movement']['lastview_datetime'] . " (" . $lang['txt_movement'] . " ". $i['movement']['movement'] . ")";
						}
						?></span><br />
					</td>
					<td align="right" valign="top">
						<input type="checkbox" name="watch_subject_delete_id[]" value="<?php echo $i['subject_id'];?>" /><br />
					</td>
			    </tr>
				<?php
				endforeach;
				}
				?>
			</table>
			<hr />
			<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />

			<table width="100%" cellpadding="4" cellspacing="0" border="0">
				<tr>
					<td colspan="2">
						<b><?php echo $lang['hdr_library'];?></b><br />
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />
					</td>
				</tr>
				<?php
				if (isset($watched_library)) {
				foreach($watched_library as $key => $i):
				
				if (!empty($i['group_id'])) {
				    $url = "lib_item.php?group_id=" . $i['group_id'] . "&amp;library_id=" . $i['library_id'];
				}
				else {
					 $url = "lib_item.php?library_id=" . $i['library_id'];
				}
				?>
				<tr>
					<td>
						<?php
						if (isset($i['image'])) {
						?>
							<img align="left" src="get_file.php?file=<?php echo $i['image']['file'];?>" border="0" class="picture_left" alt="<?php echo $i['image']['file_title'];?>" />
						<?
						}
						?>
						<a href="<?php echo $url;?>"><?php echo $i['library_title'];?></a><br />
						<?php echo $i['library_synopsis'];?><br />
					</td>
					<td align="right" valign="top">
						<input type="checkbox" name="watch_library_delete_name[]" value="<?php echo $i['library_id'];?>"><br />
					</td>
			    </tr>
				<?php
				endforeach;
				}
				?>
			</table>

			<hr />
			<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />

			<table width="100%" cellpadding="4" cellspacing="0" border="0">
				<tr>
					<td colspan="2">
						<b><?php echo $lang['hdr_schedule'];?></b><br />
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />
					</td>
				</tr>
				<?php
				if (isset($watched_schedule_items)) {
				foreach($watched_schedule_items as $key => $i):
				
				if (!empty($i['group_id'])) {
				    $url = "sch_item.php?group_id=" . $i['group_id'] . "&amp;schedule_id=" . $i['schedule_id'];
				}
				else {
					 $url = "sch_item.php?schedule_id=" . $i['schedule_id'];
				}
				?>
			    <tr>
					<td>
						<?php
						if (isset($i['image'])) {
						?>
							<img align="left" src="get_file.php?file=<?php echo $i['image']['file'];?>" border="0" class="picture_left" alt="<?php echo $i['image']['file_title'];?>" />
						<?
						}
						?>
						<a href="<?php echo $url;?>"><?php echo $i['schedule_title'];?></a><br />
						<?php echo $i['schedule_start_datetime'];?><br />
						<?php echo $i['schedule_synopsis'];?><br />
					</td>
					<td align="right" valign="top">
						<input type="checkbox" name="watch_schedule_delete_id[]" value="<?php echo $i['schedule_id'];?>" /><br />
					</td>
			    </tr>
				<?php
				endforeach;
				}
				?>
			</table>

			<hr />
			<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />

			<table width="100%" cellpadding="4" cellspacing="0" border="0">
				<tr>
					<td colspan="2">
						<b><?php echo $lang['hdr_blogs'];?></b><br />
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />
					</td>
				</tr>
				<?php
				if (isset($watched_blogs)) {
				foreach($watched_blogs as $key => $i):
				
				if (!empty($i['group_id'])) {
				    $url = "blg_item.php?group_id=" . $i['group_id'] . "&amp;blog_id=" . $i['blog_id'];
				}
				else {
					 $url = "blg_item.php?blog_id=" . $i['blog_id'];
				}
				?>
				<tr>
					<td>
						<?php echo $i['blog_create_datetime'];?><br />
						<a href="<?php echo $url;?>"><?php echo $i['blog_title'];?></a><br />
						<?php echo $i['blog_synopsis'];?><br />
					</td>
					<td align="right" valign="top">
						<input type="checkbox" name="watch_blog_delete_id[]" value="<?php echo $i['blog_id'];?>" /><br />
					</td>
			    </tr>
				<?php
				endforeach;
				}
				?>
			</table>

			<hr />
			<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />

			<table width="100%" cellpadding="4" cellspacing="0" border="0">
				<tr>
					<td colspan="2">
						<b><?php echo $lang['hdr_polls'];?></b><br />
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />
					</td>
				</tr>
				<?php
				if (isset($watched_polls)) {
				foreach($watched_polls as $key => $i):
				
				if (!empty($i['group_id'])) {
				    $url = "pol_item.php?group_id=" . $i['group_id'] . "&amp;poll_id=" . $i['poll_id'];
				}
				else {
					 $url = "pol_item.php?poll_id=" . $i['poll_id'];
				}
				?>
				<tr>
					<td valign="top">
 						<?php
						$poll = $i;
						$poll_url = $url;
 						include $templatePath . "poll.inc.tpl.php";
 						?>
 					</td>
					<td align="right" valign="top">
						<input type="checkbox" name="watch_poll_delete_id[]" value="<?php echo $i['poll_id'];?>"><br />
					</td>
				</tr>
				<?php
				endforeach;
				}
				?>
			</table>
			</div>

			<div id="box_bottom">
				<table cellpadding="0" cellspacing="0" border="0" width="100%">
					<tr>
						<td align="left">
							<img src="<?php echo $templatePath;?>img/box_bottom_left.png" width="5" height="18" alt="" border="0" /><br />
						</td>
						<td align="left">
							<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="9" alt="" border="0" /><br />
						</td>
						<td align="right">
							<img src="<?php echo $templatePath;?>img/box_bottom_right.png" width="5" height="18" alt="" border="0" /><br />
						</td>
					</tr>
				</table>
			</div>
		</td>

		<td width="20">&nbsp;</td>

		<td width="370" valign="top">
			<div class="box_top">
				<?php echo $lang['hdr_my_bookmark'];?><br />
			</div>

			<div class="box_mid" style="padding: 9px;">
			<table width="100%" cellpadding="4" cellspacing="0" border="0">
				<tr>
					<td valign="top">
						<?php echo $lang['txt_delete_bookmark'];?><br />
					</td>
					<td align="right" valign="top">
						<input type="submit" name="delete_bookmark" value="<?php echo $lang['sub_delete'];?>" class="button_urgent" /><br />
					</td>
				</tr>
			</table>
			</div>

			<div id="box_bottom">
				<table cellpadding="0" cellspacing="0" border="0" width="100%">
					<tr>
						<td align="left">
							<img src="<?php echo $templatePath;?>img/box_bottom_left.png" width="5" height="18" alt="" border="0" /><br />
						</td>
						<td align="left">
							<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="9" alt="" border="0" /><br />
						</td>
						<td align="right">
							<img src="<?php echo $templatePath;?>img/box_bottom_right.png" width="5" height="18" alt="" border="0" /><br />
						</td>
					</tr>
				</table>
			</div>

			<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="10" alt="" /><br />

			<div class="box_top">
				<?php echo $lang['hdr_recommended'];?><br />
			</div>

			<div class="box_mid" style="padding: 9px;">
			<table width="100%" cellpadding="4" cellspacing="0" border="0">
				<tr>
					<td colspan="2">
						<b><?php echo $lang['hdr_subjects'];?></b><br />
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />
					</td>
				</tr>
				<?php
				if (isset($recommended_subjects)) {
				foreach($recommended_subjects as $key => $i):
				
				if (!empty($i['group_id'])) {
				    $url = "frm_item.php?group_id=" . $i['group_id'] . "&amp;subject_id=" . $i['subject_id'];
				}
				else {
					 $url = "frm_item.php?subject_id=" . $i['subject_id'];
				}
				?>
				<tr>
					<td>
						<a href="<?php echo $url;?>"><?php echo $i['subject_title'];?></a><br />
						<?php echo dots(120, $i['subject_body']);?><br />
					</td>
					<td align="right" valign="top">
						<input type="checkbox" name="rec_subject_delete_id[]" value="<?php echo $i['subject_id'];?>" /><br />
					</td>
			    </tr>
				<?php
				endforeach;
				}
				?>
			</table>

			<hr />
			<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />

			<table width="100%" cellpadding="4" cellspacing="0" border="0">
				<tr>
					<td colspan="2">
						<b><?php echo $lang['hdr_library'];?></b><br />
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />
					</td>
				</tr>
				<?php
				if (isset($recommended_library)) {
				foreach($recommended_library as $key => $i):
				
				if (!empty($i['group_id'])) {
				    $url = "lib_item.php?group_id=" . $i['group_id'] . "&amp;library_id=" . $i['library_id'];
				}
				else {
					 $url = "lib_item.php?library_id=" . $i['library_id'];
				}
				?>
				<tr>
					<td>
						<a href="<?php echo $url;?>"><?php echo $i['library_title'];?></a><br />
						<?php echo dots(120, $i['library_synopsis']);?><br />
					</td>
					<td align="right" valign="top">
						<input type="checkbox" name="rec_library_delete_id[]" value="<?php echo $i['library_id'];?>" /><br />
					</td>
				</tr>
				<?php
				endforeach;
				}
				?>
			</table>

			<hr />
			<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />

			<table width="100%" cellpadding="4" cellspacing="0" border="0">
				<tr>
					<td colspan="2">
						<b><?php echo $lang['hdr_schedule'];?></b><br />
					</td>
				</tr>
				<?php
				if (isset($recommended_schedule_items)) {
				foreach($recommended_schedule_items as $key => $i):
				
				if (!empty($i['group_id'])) {
				    $url = "sch_item.php?group_id=" . $i['group_id'] . "&amp;schedule_id=" . $i['schedule_id'];
				}
				else {
					 $url = "sch_item.php?schedule_id=" . $i['schedule_id'];
				}
				?>
			    <tr>
					<td>
						<?php
						if (isset($i['image'])) {
						?>
							<img align="left" src="get_file.php?file=<?php echo $i['image']['file'];?>" border="0" class="picture_left" alt="<?php echo $i['image']['file_title'];?>" />
						<?
						}
						?>
						<a href="<?php echo $url;?>"><?php echo $i['schedule_title'];?></a><br />
						<?php echo $i['schedule_start_datetime'];?><br />
						<?php echo $i['schedule_synopsis'];?><br />
					</td>
					<td align="right" valign="top">
						<input type="checkbox" name="rec_schedule_delete_id[]" value="<?php echo $i['schedule_id'];?>" /><br />
					</td>
			    </tr>
				<?php
				endforeach;
				}
				?>
			</table>

			<hr />
			<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />

			<table width="100%" cellpadding="4" cellspacing="0" border="0">
				<tr>
					<td colspan="2">
						<b><?php echo $lang['hdr_blogs'];?></b><br />
					</td>
				</tr>
				<?php
				if (isset($recommended_blogs)) {
				foreach($recommended_blogs as $key => $i):
				
				if (!empty($i['group_id'])) {
				    $url = "blg_item.php?group_id=" . $i['group_id'] . "&amp;blog_id=" . $i['blog_id'];
				}
				else {
					 $url = "blg_item.php?blog_id=" . $i['blog_id'];
				}
				?>
				<tr>
					<td>
						<a href="<?php echo $url;?>"><?php echo $i['blog_title'];?></a><br />
						<?php echo $i['blog_create_datetime'];?><br />
						<?php echo dots('120', $i['blog_synopsis']);?><br />
					</td>
					<td align="right" valign="top">
						<input type="checkbox" name="rec_blog_delete_id[]" value="<?php echo $i['blog_id'];?>"><br />
					</td>
			    </tr>
				<?php
				endforeach;
				}
				?>
			</table>

			<hr />
			<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />

			<table width="100%" cellpadding="4" cellspacing="0" border="0">
				<tr>
					<td colspan="2">
						<b><?php echo $lang['hdr_polls'];?></b><br />
					</td>
				</tr>
				<?php
				if (isset($recommended_polls)) {
				foreach($recommended_polls as $key => $i):
				
				if (!empty($i['group_id'])) {
				    $url = "pol_item.php?group_id=" . $i['group_id'] . "&amp;poll_id=" . $i['poll_id'];
				}
				else {
					 $url = "pol_item.php?poll_id=" . $i['poll_id'];
				}
				?>
				<tr>
					<td valign="top">
 						<?php
						$poll = $i;
						$poll_url = $url;
 						include $templatePath . "poll.inc.tpl.php";
 						?>
 					</td>
					<td align="right" valign="top">
						<input type="checkbox" name="rec_poll_delete_id[]" value="<?php echo $i['poll_id'];?>"><br />
					</td>
				</tr>
				<?php
				endforeach;
				}
				?>
			</table>
			</div>

			<div id="box_bottom">
				<table cellpadding="0" cellspacing="0" border="0" width="100%">
					<tr>
						<td align="left">
							<img src="<?php echo $templatePath;?>img/box_bottom_left.png" width="5" height="18" alt="" border="0" /><br />
						</td>
						<td align="left">
							<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="9" alt="" border="0" /><br />
						</td>
						<td align="right">
							<img src="<?php echo $templatePath;?>img/box_bottom_right.png" width="5" height="18" alt="" border="0" /><br />
						</td>
					</tr>
				</table>
			</div>
		</td>
	</tr>
</table>
</form>
