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
/*我添加的自定义函数*/ | |
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; |
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
<html> | |
<head> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
</head> | |
<body> | |
<div id="sina"></div> | |
<script type="text/javascript"> | |
$(function() { | |
$.getJSON('https://api.weibo.com/2/statuses/user_timeline.json?source=2546437393&screen_name=mattdallas&callback=?', function(content){ | |
var statuses = content.data.statuses; |
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 | |
function wholeweek($gdate = "", $first = 0) //get the week's start time and end time | |
{ | |
if (!$gdate) $gdate = date("Y-m-d"); | |
$w = date("w", strtotime($gdate)); | |
$dn = $w ? $w - $first : 6; | |
$st = date("Y-m-d", strtotime("$gdate -" . $dn . " days")); | |
$en = strtotime("$st +6 days"); | |
return array(strtotime($st),$en); |
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
import urllib2 | |
def xiami_decode(s): | |
s = s.strip() | |
if not s: | |
return False | |
result = [] | |
line = int(s[0]) | |
rows = len(s[1:]) / line | |
extra = len(s[1:]) % line |
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 | |
header('Content-Type:application/javascript;charset=utf-8'); | |
require_once("global.php"); | |
if (!isset($_GET['mount'])){ | |
$_GET['mount']='10'; | |
} | |
?> | |
document.getElementById('pagecookery').innerHTML='<?php | |
if(ereg("^[0-9]*$",$_GET['mount'])){ | |
$sql='SELECT * FROM entry ORDER BY time DESC LIMIT '.$_GET['mount']; |