<?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.
// -----------------------------------------------------------------------

?>

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


<div class="col_left1">
	<div class="box">
		<div class="box_top">
			<?php echo $lang['hdr_tags'];?><br />
		</div>
		
		<div class="box_mid">
			<div class="content">
				<p>
					<?php echo $lang['txt_tag_intro'];?><br />
				</p>
				
				<?php
				if (isset($node_tags)) {
				?>
				<p>
					<?php
					foreach($node_tags as $key => $i):
					?>
					<a href="sn_profile.php?user_id=<?php echo $i['user_id'];?>"><?php echo $i['tag_body'];?></a>
					<?php
					if (count($node_tags) > $key+1) {
						echo ", ";
					}
					endforeach;
				?>
				</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">
	<?php
	if ($this->user_acs->checkPermission($resource_ids['node']['tagging'], $privilege_ids['allow_sch_tag_mgmt'])) { //resourece_id, Priv_id
	?>
	<div class="box">
		<div class="box_top">
			<?php echo $lang['hdr_schedule_tags'];?><br />
		</div>
		
		<div class="box_mid">
			<div class="content">
				<p>
					<?php echo $lang['txt_schedule_tags'];?><br />
				</p>
				
				<?php
				if (isset($schedule_tags)) {
				?>
				<p>
					<?php
					$tags = "";
					foreach($schedule_tags as $key => $i):
						$tags .= "<a href='search.php?tag=" . $i['tag_body']. "'>" . $i['tag_body'] . "</a>";
						if (count($schedule_tags) > $key+1) {
							$tags .= ", ";
						}
					endforeach;
					echo $tags;
				?>
				</p>
				<?php }?>
				
				<?php
				$tags = "";
				if (isset($schedule_tags)) {
					foreach ($schedule_tags as $key => $i):
						$tags .= $i['tag_body'];
						if (count($schedule_tags) > $key+1) {
							$tags .= ", ";
						}
					endforeach;
				}
				?>
				
				<p>
					<input width="30" name="tags" value="<?php echo $tags;?>" />
					<input type="image" src="<?php echo $templatePath;?>img/go.png" name="update_schedule_tag" value="1" class="go" /><br />
				</p>
			</div>
		</div>
	</div>
		
	<div class="box_bottom">
		<span class="box_bottom_right"></span>
		<span class="box_bottom_left"></span>
	</div>
	<?php }?>
</div>
</form>
