<?php echo '唯美设计QQ:474902417商业模板保护！请到官网上购买正版模板 http://addon.discuz.com/?@1439.developer';exit;?>
<!--{template home/space_min_header_tab}-->

<style id="diy_style" type="text/css"></style>
<div class="wp">
	<!--[diy=diy1]--><div id="diy1" class="area"></div><!--[/diy]-->
</div>

<div class="container-area">

	<div class="container-area-left">
		<!--{subtemplate home/space_my_nav}-->
	</div>

	<div class="container-area-right cl">

		<!--[diy=diycontenttop]--><div id="diycontenttop" class="area"></div><!--[/diy]-->

		<div class="bg-box-radius">
			<div class="middle-title-wrap border-bottom">
				<h2 class="middle-title">我的{lang favorite}</h2>
			</div>
			<div class="tab-menu-info">
				<ul class="sort-show-wrap">
					<li>
						<span>分类</span>
						<div class="sort-list-box">							
							<a href="home.php?mod=space&do=favorite&type=all" $actives[all]>{lang favorite_all}</a>
							<a href="home.php?mod=space&do=favorite&type=thread" $actives[thread]>{lang favorite_thread}</a>
							<a href="home.php?mod=space&do=favorite&type=forum" $actives[forum]>{lang favorite_forum}</a>
							<!--{if helper_access::check_module('group')}--><a href="home.php?mod=space&do=favorite&type=group" $actives[group]>{lang favorite_group}</a><!--{/if}-->
							<!--{if helper_access::check_module('blog')}--><a href="home.php?mod=space&do=favorite&type=blog" $actives[blog]>{lang favorite_blog}</a><!--{/if}-->
							<!--{if helper_access::check_module('album')}--><a href="home.php?mod=space&do=favorite&type=album" $actives[album]>{lang favorite_album}</a><!--{/if}-->
							<!--{if helper_access::check_module('portal')}--><a href="home.php?mod=space&do=favorite&type=article" $actives[article]>{lang favorite_article}</a><!--{/if}-->
							<!--{hook/space_favorite_nav_extra}-->
						</div>
					</li>
				</ul>
			</div>
		</div>

		<br/>

		<div class="bg-box-radius cl">
			<div class="datum-item-box border-bottom">
				<!--{if $list}-->
				<form method="post" autocomplete="off" name="delform" id="delform" action="home.php?mod=spacecp&ac=favorite&op=delete&type=$_GET[type]&checkall=1" onsubmit="showDialog('{lang del_select_favorite_confirm}', 'confirm', '', '$(\'delform\').submit();'); return false;">
				<input type="hidden" name="formhash" value="{FORMHASH}" />
				<input type="hidden" name="delfavorite" value="true" />
				<ul id="favorite_ul" class="">
					<!--{loop $list $k $value}-->
					<li id="fav_$k" class="bbda ptm pbm">
						<a class="y" id="a_delete_$k" href="home.php?mod=spacecp&ac=favorite&op=delete&favid=$k" onclick="showWindow(this.id, this.href, 'get', 0);">{lang delete}</a>
						<input type="checkbox" name="favorite[]" class="pc" value="$k" vid="$value[id]" />
						<!--{if $_GET['type'] == 'all'}--><span>$value[icon]</span><!--{/if}-->
						<a href="$value[url]" target="_blank">$value[title]</a> <span class="xg1"><!--{date($value[dateline], 'u')}--></span>
						<!--{if $value[description]}-->
						<div class="quote">
							<blockquote id="quote_preview">$value[description]</blockquote>
						</div>
						<!--{/if}-->
					</li>
					<!--{/loop}-->
				</ul>
				<p class="mtm pns">
					<label for="chkall" onclick="checkall(this.form, 'favorite')"><input type="checkbox" name="chkall" id="chkall" class="pc vm" />{lang select_all}</label>
					<button type="submit" name="delsubmit" value="true" class="pn vm"><em>{lang del_favorite}</em></button>
					<!--{if $_GET[type] == "thread"}-->
						<button type="button" name="collectionsubmit" value="true" class="pnc vm" onclick="collection_favorite()"><em>{lang collection_favorite}</em></button>
					<!--{/if}-->
				</p>
				</form>
				<!--{if $multi}--><div class="pgs cl mtm">$multi</div><!--{/if}-->
				<!--{else}-->
				<div class="work-null">
					<div class="work-null-inner">
						<span class="null-images"></span>
						<div class="work-null-tips">
							<p class="subject-title">{lang no_favorite_yet}</p>
						</div>
					</div>
				</div>
				<!--{/if}-->
				<!--[diy=diycontentbottom]--><div id="diycontentbottom" class="area"></div><!--[/diy]-->
			</div>
		</div>

	</div>

</div>

<div class="wp mtn">
	<!--[diy=diy3]--><div id="diy3" class="area"></div><!--[/diy]-->
</div>


<script type="text/javascript">
	function favorite_delete(favid) {
		var el = $('fav_' + favid);
		if(el) {
			el.style.display = "none";
		}
	}
	<!--{if $_GET[type] == "thread"}-->
	function collection_favorite() {
		var form = $('delform');
		var prefix = '^favorite';
		var tids = '';
		for(var i = 0; i < form.elements.length; i++) {
			var e = form.elements[i];		
			if(e.name.match(prefix) && e.checked) {
				tids += 'tids[]=' + e.getAttribute('vid') + '&';
			}
		}
		if(tids) {
			showWindow(null, 'forum.php?mod=collection&action=edit&op=addthread&' + tids);
		}
	}
	function update_collection() {}
	<!--{/if}-->
</script>
<!--{template home/space_min_footer_tab}-->

