This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* MicroBlog | |
* Author:怡红公子 | |
* @package custom | |
*/ | |
?> | |
<?php $this->need('header.php'); ?> | |
<div class="grid_10" id="content"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul id="reply_contents_{$item['id']}"> | |
<!--{if ($SQL->GetNumRows($reply) > 0)}--> | |
<!--{while ($message = $SQL->FetchArray($reply))}--> | |
<php>$ip = explode('.', $message['ip']);</php> | |
<li id="reply_item_{$message['id']}"> | |
<div class="reply_avatar"><img src="<echo>"http://www.gravatar.com/avatar/" . md5( strtolower( trim( $message['email'] ) ) ) . "?d=" . urlencode( "http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=40") . "&s=40";</echo>" alt="" /></div> | |
<!--{if ($message['userid'] > 0)}--><span style="color:red"><echo>get_username_by_id($message['userid'])</echo>:</span><!--{else if ($message['geo'] == 'owner')}--><span style="color:red">博主:</span><!--{else}--><span style="color:#666"><!--{if ($message['nickname'])}--><strong><a href="{$message['url']}" target="_blank">{$message['nickname']}</a></strong> {$message['geo']}<!--{else}-->{$message['geo']} 网友<!--{/if}--> ({$ip[0]}.{$ip[1]}.{$ip[2]}.*):</span><!--{/if}--> <br /> | |
<echo>strip_tags($message['message'])</echo> <!--{if ($message['time'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p> | |
<!--{if ($options['allow_comment'] == 'false')}--> | |
<i>评论功能已关闭.</i> | |
<!--{else}--> | |
<!--{if (!$is_guest)}--> | |
登录身份:<a href="?act=profile"><echo>get_username_by_id($User['id'])</echo></a>. <a href="?act=logout">退出»</a> | |
<!--{else}--> | |
<input type="text" class="content" name="nickname" value="昵称" onblur="if(this.value==''){this.value='昵称';}" onfocus="if(this.value=='昵称'){this.value=''};" onkeydown="if(event.keyCode==13){return false;}" maxlength="10" style="width: 60px; margin: 0 10px 0 0; border-top: 0; border-left: 0; border-right: 0;background: transparent url(../images/name.png) no-repeat scroll left center;" id="reply_nickname_{$last_entry['id']}" /> | |
<input type="text" class="content" name="email" value="邮箱"onblur="if(this.value==''){this.value='邮箱';}" onfocus="if(this.value=='邮箱'){this.value=''};" onkeydown="if(event.keyCode==13){return false;}" maxlength="50" style="width: 60px; margin: 0 10px 0 0; border-top: 0; border-left: 0; border-right: 0;background: transparent url(../images/mail.png) no-repe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p> | |
<!--{if ($options['allow_comment'] == 'false')}--> | |
<i>评论功能已关闭.</i> | |
<!--{else}--> | |
<!--{if (!$is_guest)}--> | |
登录身份:<a href="?act=profile"><echo>get_username_by_id($User['id'])</echo></a>. <a href="?act=logout">退出»</a> | |
<!--{else}--> | |
<input type="text" class="content" name="nickname" value="昵称" onblur="if(this.value==''){this.value='昵称';}" onfocus="if(this.value=='昵称'){this.value=''};" onkeydown="if(event.keyCode==13){return false;}" maxlength="10" style="width: 60px; margin: 0 10px 0 0; border-top: 0; border-left: 0; border-right: 0;background: transparent url(../images/name.png) no-repeat scroll left center;" id="reply_nickname_{$item['id']}" /> | |
<input type="text" class="content" name="email" value="邮箱"onblur="if(this.value==''){this.value='邮箱';}" onfocus="if(this.value=='邮箱'){this.value=''};" onkeydown="if(event.keyCode==13){return false;}" maxlength="50" style="width: 60px; margin: 0 10px 0 0; border-top: 0; border-left: 0; border-right: 0; background: transparent url(../images/mail.png) no-repeat scr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case 'sendreply': | |
if ($options['allow_comment'] == 'false') | |
{ | |
Helper::PrintJavaScript("alert('对方评论功能已经关闭'); window.location = '" . BASE_URL . "?act=view&id=" . intval($_POST['entryid']) . "';"); | |
} | |
if (intval($_POST['entryid']) > 0 AND trim($_POST['message'])) | |
{ | |
if ($is_guest) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{template header} | |
<style type="text/css"> | |
@import 'css/jquery.lightbox.css'; | |
</style> | |
<script type="text/javascript" src="javascript/jquery.lightbox.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{template header} | |
<div id="main"> | |
<div class="comment_box"> | |
<!--{while ($item = $SQL->FetchArray($comments))}--> | |
<php>$even = $even == 'even' ? 'odd' : 'even'</php> | |
<div class="item"> | |
<img src="<echo>"http://www.gravatar.com/avatar/" . md5( strtolower( trim( $item['email'] ) ) ) . "?d=" . urlencode( "http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=40") . "&s=40";</echo>" class="avatar_{$even}" alt="<!--{if ($item['nickname'])}-->{$item['nickname']}<!--{else}-->{$item['geo']} 网友<!--{/if}-->" /> | |
<div class="text_main_{$even}"> | |
<div class="text"><a href="?act=view&id={$item['entryid']}"><span class="nickname"><!--{if ($item['nickname'])}-->{$item['nickname']}<!--{else}-->{$item['geo']} <t>网友</t><!--{/if}--></span>: <echo>strip_tags($item['message'])</echo></a> <span class="time">(<echo>Format::Date($item['time'])</echo>)</span></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul id="reply_contents_{$last_entry['id']}"> | |
<!--{if ($SQL->GetNumRows($last_entry_reply) > 0)}--> | |
<!--{while ($message = $SQL->FetchArray($last_entry_reply))}--> | |
<php>$ip = explode('.', $message['ip']);</php> | |
<li id="reply_item_{$message['id']}"> | |
<div class="reply_avatar"> | |
<img src="<echo>"http://www.gravatar.com/avatar/" . md5( strtolower( trim( $message['email'] ) ) ) . "?d=" . urlencode( "http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=40") . "&s=40";</echo>" alt="" /> | |
</div> | |
<!--{if ($message['userid'] > 0)}--><span style="color:red"><echo>get_username_by_id($message['userid'])</echo>:</span><!--{else if ($message['geo'] == 'owner')}--><span style="color:red">博主:</span><!--{else}--><span style="color:#666"><!--{if ($message['nickname'])}--><strong><a href="{$message['url']}" target="_blank">{$message['nickname']}</a></strong> {$message['geo']}<!--{else}-->{$message['geo']} 网友<!--{/if}--> ({$ip[0]}.{$ip[1]}.{$ip[2]}.*):</span><!--{/if}--><br /> | |
<echo>strip_tags($message['message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*我添加的自定义函数*/ | |
function CKURL($url){ | |
if($url=="")return "none";else | |
if(strlen($url)>50)return "none";else | |
if($url=="none")return "none";else | |
if(ereg("[a-zA-z]+://[^\s]*",$url))return $url;else | |
return "http://".$url; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sendReply(id) | |
{ | |
if ($('#reply_message_' + id).val() == '') | |
{ | |
alert('请输入回复内容.'); | |
return false; | |
} | |
var replyid = id; |