<?php if(!defined('IN_DISCUZ')) exit('Access Denied'); hookscriptoutput('space_notice');
0
|| checktplrefresh('./template/default/home/space_notice.htm', './template/default/common/simplesearchform.htm', 1322059009, 'diy', './data/template/2_diy_home_space_notice.tpl.php', './template/chajian110_dx2', 'home/space_notice')
|| checktplrefresh('./template/default/home/space_notice.htm', './template/default/home/space_prompt_nav.htm', 1322059009, 'diy', './data/template/2_diy_home_space_notice.tpl.php', './template/chajian110_dx2', 'home/space_notice')
;?>
<?php $_G['home_tpl_titles'] = array('提醒');?><?php include template('common/header'); ?><div id="pt" class="bm cl"><?php if($_G['setting']['search']) { ?><?php $slist = array();?><?php if($_G['fid'] && $_G['forum']['status'] != 3 && $mod != 'group') { ?><?php
$slist[forumfid] = <<<EOF
<li><a href="javascript:;" rel="curforum" class="curtype">本版</a></li>
EOF;
?><?php } if($_G['setting']['portalstatus'] && $_G['setting']['search']['portal']['status'] && ($_G['group']['allowsearch'] & 1 || $_G['adminid'] == 1)) { ?><?php
$slist[portal] = <<<EOF
<li><a href="javascript:;" rel="article"
EOF;
 if(CURSCRIPT == 'portal') { 
$slist[portal] .= <<<EOF
 class="curtype"
EOF;
 } 
$slist[portal] .= <<<EOF
>文章</a></li>
EOF;
?><?php } if($_G['setting']['search']['forum']['status'] && ($_G['group']['allowsearch'] & 2 || $_G['adminid'] == 1)) { ?><?php
$slist[forum] = <<<EOF
<li><a href="javascript:;" rel="forum"
EOF;
 if((CURSCRIPT == 'forum' && !$_G['fid']) || (CURSCRIPT == 'home' && in_array($do, array('thread', 'activity', 'poll', 'reward', 'debate', 'trade')))) { 
$slist[forum] .= <<<EOF
 class="curtype"
EOF;
 } 
$slist[forum] .= <<<EOF
>帖子</a></li>
EOF;
?><?php } if($_G['setting']['homestatus'] && $_G['setting']['search']['blog']['status'] && ($_G['group']['allowsearch'] & 4 || $_G['adminid'] == 1)) { ?><?php
$slist[blog] = <<<EOF
<li><a href="javascript:;" rel="blog"
EOF;
 if(CURSCRIPT == 'home' && $do == 'blog') { 
$slist[blog] .= <<<EOF
 class="curtype"
EOF;
 } 
$slist[blog] .= <<<EOF
>日志</a></li>
EOF;
?><?php } if($_G['setting']['homestatus'] && $_G['setting']['search']['album']['status'] && ($_G['group']['allowsearch'] & 8 || $_G['adminid'] == 1)) { ?><?php
$slist[album] = <<<EOF
<li><a href="javascript:;" rel="album"
EOF;
 if(CURSCRIPT == 'home' && $do == 'album') { 
$slist[album] .= <<<EOF
 class="curtype"
EOF;
 } 
$slist[album] .= <<<EOF
>相册</a></li>
EOF;
?><?php } if($_G['setting']['groupstatus'] && $_G['setting']['search']['group']['status'] && ($_G['group']['allowsearch'] & 16 || $_G['adminid'] == 1)) { ?><?php
$slist[group] = <<<EOF
<li><a href="javascript:;" rel="group"
EOF;
 if(CURSCRIPT == 'group' || $_G['basescript']=='group') { 
$slist[group] .= <<<EOF
 class="curtype"
EOF;
 } 
$slist[group] .= <<<EOF
>{$_G['setting']['navs']['3']['navname']}</a></li>
EOF;
?><?php } ?><?php
$slist[user] = <<<EOF
<li><a href="javascript:;" rel="user"
EOF;
 if(CURSCRIPT == 'home' && !in_array($do, array('blog', 'album', 'thread', 'activity', 'poll', 'reward', 'debate', 'trade'))) { 
$slist[user] .= <<<EOF
 class="curtype"
EOF;
 } 
$slist[user] .= <<<EOF
>用户</a></li>
EOF;
?>
<?php if($slist) { ?>
<div id="sc" class="y"><?php $searchparams = makeSearchSignUrl();?><form id="sc_form" method="<?php if($_G['fid'] && !empty($searchparams['0'])) { ?>get<?php } else { ?>post<?php } ?>" autocomplete="off" onsubmit="searchFocus($('srchtxt'))" action="<?php if($_G['fid'] && !empty($searchparams['0'])) { ?><?php echo $searchparams['0'];?><?php } else { ?>search.php?searchsubmit=yes<?php } ?>" target="_blank">
<input type="hidden" name="formhash" value="<?php echo FORMHASH;?>" />
<input type="hidden" name="mod" id="sc_mod" value="title" />
<input type="hidden" name="srhfid" value="<?php echo $_G['fid'];?>" />
<input type="hidden" name="srhlocality" value="<?php echo $_G['basescript'];?>::<?php echo $_G['gp_do'];?>" />
<?php if(!empty($searchparams['1'])) { if(is_array($searchparams['1'])) foreach($searchparams['1'] as $key => $value) { ?><input type="hidden" name="<?php echo $key;?>" value="<?php echo $value;?>" />
<?php } } ?>
<table cellspacing="0" cellpadding="0">
<tr>
<td id="sc_txt_td"><input type="text" name="srchtxt" id="sc_txt" class="px z" value="请输入搜索内容" autocomplete="off" /></td>
<td id="sc_type_td"><span id="sc_type_w" class="px z"><a href="javascript:;" id="sc_type" class="showmenu xg1" onclick="showMenu(this.id);">搜索</a></span></td>
<td id="sc_btn_td"><button type="submit" name="searchsubmit" id="sc_btn" class="pn pnc" value="true"><strong>搜索</strong></button></td>
</tr>
</table>
<div id="sc_type_menu" class="p_pop cl" style="display: none">
<ul><?php echo implode('', $slist);; ?></ul>
</div>
</form>
<script type="text/javascript">initSearchmenu('scbar', '<?php echo $searchparams['0'];?>');</script>
</div>
<?php } } ?><div class="z">
<a href="./" class="nvhm" title="首页"><?php echo $_G['setting']['bbname'];?></a> <em>&rsaquo;</em>
<span>通知</span> <em>&rsaquo;</em>
<a href="home.php?mod=space&amp;do=notice">提醒</a>
</div>
</div>

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

<div id="ct" class="ct2_a wp cl">
<div class="mn">
<div class="bm bw0">
<h1 class="mt"><img alt="pm" src="<?php echo STATICURL;?>image/feed/nts.gif" class="vm" /> 提醒</h1>
<ul class="tb cl">
<li class="y"><a href="home.php?mod=spacecp&amp;ac=privacy&amp;op=filter" target="_blank" class="xi2">筛选设置</a></li>
<?php if($_G['setting']['my_app_status']) { ?>
<li<?php echo $actives['notice'];?>><a href="home.php?mod=space&amp;do=notice">提醒</a></li>
<li<?php echo $actives['userapp'];?>><a href="home.php?mod=space&amp;do=notice&amp;view=userapp">应用消息</a></li>
<?php } else { ?>
<li<?php echo $readtag['0'];?>><a href="home.php?mod=space&amp;do=notice">未读提醒</a></li>
<li<?php echo $readtag['1'];?>><a href="home.php?mod=space&amp;do=notice&amp;isread=1">已读提醒</a></li>
<?php } ?>
</ul>

<?php if($view=='userapp') { ?>

<script type="text/javascript">
function manyou_add_userapp(hash, url) {
if(isUndefined(url)) {
$(hash).innerHTML = "<tr><td colspan=\"2\">成功忽略了该条应用消息</td></tr>";
} else {
$(hash).innerHTML = "<tr><td colspan=\"2\">正在引导您进入……</td></tr>";
}
var x = new Ajax();
x.get('home.php?mod=misc&ac=ajax&op=deluserapp&hash='+hash, function(s){
if(!isUndefined(url)) {
location.href = url;
}
});
}
</script>

<div class="ct_vw cl">
<div class="ct_vw_sd">
<ul class="mtw">
<?php if($list) { ?><li><a href="home.php?mod=space&amp;do=notice&amp;view=userapp">全部应用消息</a></li><?php } if(is_array($apparr)) foreach($apparr as $type => $val) { ?><li class="mtn">
<a href="home.php?mod=userapp&amp;id=<?php echo $val['0']['appid'];?>&amp;uid=<?php echo $space['uid'];?>" title="<?php echo $val['0']['typename'];?>"><img src="http://appicon.manyou.com/icons/<?php echo $val['0']['appid'];?>" alt="<?php echo $val['0']['typename'];?>" class="vm" /></a>
<a href="home.php?mod=space&amp;do=notice&amp;view=userapp&amp;type=<?php echo $val['0']['appid'];?>"> <?php echo count($val);?> 个 <?php echo $val['0']['typename'];?> <?php if($val['0']['type']) { ?>请求<?php } else { ?>邀请<?php } ?></a>
</li>
<?php } ?>
</ul>
</div>
<div class="ct_vw_mn">
<?php if($list) { if(is_array($list)) foreach($list as $key => $invite) { ?><h4 class="mtw mbm">
<a href="home.php?mod=space&amp;do=notice&amp;view=userapp&amp;op=del&amp;appid=<?php echo $invite['0']['appid'];?>" class="y xg1">忽略该应用的所有邀请</a>
<a href="home.php?mod=userapp&amp;id=<?php echo $invite['0']['appid'];?>&amp;uid=<?php echo $space['uid'];?>" title="<?php echo $apparr[$invite['0']['appid']];?>"><img src="http://appicon.manyou.com/icons/<?php echo $invite['0']['appid'];?>" alt="<?php echo $apparr[$invite['0']['appid']];?>" class="vm" /></a> 
您有 <?php echo count($invite);?> 个 <?php echo $invite['0']['typename'];?> <?php if($invite['0']['type']) { ?>请求<?php } else { ?>邀请<?php } ?>
</h4>
<div class="xld xlda"><?php if(is_array($invite)) foreach($invite as $value) { ?><dl class="bbda cl">
<dd class="m avt mbn">
<a href="home.php?mod=space&amp;uid=<?php echo $value['fromuid'];?>"><?php echo avatar($value[fromuid],small);?></a>
</dd>
<dt id="<?php echo $value['hash'];?>">
<div class="xw0 xi3"><?php echo $value['myml'];?></div>
</dt>
</dl>
<?php } ?>
</div>
<?php } if($multi) { ?><div class="pgs cl"><?php echo $multi;?></div><?php } } else { ?>
<div class="emp">没有新的应用请求或邀请</div>
<?php } ?>
</div>
</div>

<?php } else { if($_G['setting']['my_app_status']) { ?>
<div class="tbmu">
<?php if(!empty($list)) { ?>
<span class="y">当您感觉有些通知对您造成骚扰时，请点击右侧小图标进行屏蔽</span>
<?php } ?>
<a href="home.php?mod=space&amp;do=notice"<?php echo $readtag['0'];?>>未读提醒</a><span class="pipe">|</span>
<a href="home.php?mod=space&amp;do=notice&amp;isread=1"<?php echo $readtag['1'];?>>已读提醒</a>
</div>
<?php } if(empty($list)) { ?>
<div class="emp mtw ptw hm xs2">
<?php if($_G['gp_isread'] != 1) { ?>
暂时没有新提醒，<a href="home.php?mod=space&amp;do=notice&amp;isread=1">点此查看已读提醒</a>
<?php } else { ?>
暂时没有提醒内容
<?php } ?>
</div>
<?php } ?>

<script type="text/javascript">

function deleteQueryNotice(uid, type) {
var dlObj = $(type + '_' + uid);
if(dlObj != null) {
var id = dlObj.getAttribute('notice');
var x = new Ajax();
x.get('home.php?mod=misc&ac=ajax&op=delnotice&inajax=1&id='+id, function(s){
dlObj.parentNode.removeChild(dlObj);
});
}
}

function errorhandle_pokeignore(msg, values) {
deleteQueryNotice(values['uid'], 'pokeQuery');
}
</script>

<?php if($list) { ?>
<div class="xld xlda">

<div class="nts"><?php if(is_array($list)) foreach($list as $key => $value) { ?><dl class="cl <?php if($key==1) { ?>bw0<?php } ?>" <?php echo $value['rowid'];?> notice="<?php echo $value['id'];?>">
<dd class="m avt mbn">
<?php if($value['authorid']) { ?>
<a href="home.php?mod=space&amp;uid=<?php echo $value['authorid'];?>"><?php echo avatar($value[authorid],small);?></a>
<?php } else { ?>
<img src="<?php echo IMGDIR;?>/systempm.png" alt="systempm" />
<?php } ?>
</dd>
<dt>
<a class="d b" href="home.php?mod=spacecp&amp;ac=common&amp;op=ignore&amp;authorid=<?php echo $value['authorid'];?>&amp;type=<?php echo $value['type'];?>&amp;handlekey=addfriendhk_<?php echo $value['authorid'];?>" id="a_note_<?php echo $value['id'];?>" onclick="showWindow(this.id, this.href, 'get', 0);" title="屏蔽">屏蔽</a>
<span class="xg1 xw0"><?php echo dgmdate($value[dateline], 'u');?></span>
</dt>
<dd class="ntc_body" style="<?php echo $value['style'];?>">
<?php echo $value['note'];?>
</dd>

<?php if($value['from_num']) { ?>
<dd class="xg1 xw0">还有 <?php echo $value['from_num'];?> 个相同通知被忽略</dd>
<?php } ?>

</dl>
<?php } ?>
</div>
</div>

<?php if($view!='userapp' && $space['notifications']) { ?>
<div class="mtm mbm"><a href="home.php?mod=space&amp;do=notice&amp;ignore=all">还有 <?php echo $value['from_num'];?> 个相同通知被忽略 <em>&rsaquo;</em></a></div>
<?php } if($multi) { ?><div class="pgs cl"><?php echo $multi;?></div><?php } } } ?>
</div>
</div>
<div class="appl"><div class="tbn">
<h2 class="mt bbda">通知</h2>
<ul>
<li <?php echo $opactives['pm'];?>><a href="home.php?mod=space&amp;do=pm">消息</a></li>
<li <?php echo $opactives['notice'];?>><a href="home.php?mod=space&amp;do=notice">提醒</a></li>	
</ul>
</div><div class="drag">
<!--[diy=diy2]--><div id="diy2" class="area"></div><!--[/diy]-->
</div>

</div>
</div>

<div class="wp mtn">
<!--[diy=diy3]--><div id="diy3" class="area"></div><!--[/diy]-->
</div><?php include template('common/footer'); ?>