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 | |
define(P2_PATH,'http://pagecookery.net/'); //输入你的PageCookery地址,不要忘记最后的"/"哦! | |
include("config.php"); | |
mysql_connect(DATABASE_HOST, DATABASE_USER, DATABASE_PSSWORD) or | |
die("Could not connect: " . mysql_error()); | |
mysql_select_db(DATABASE_DB_NAME); |
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 | |
define(P2_PATH,'http://pagecookery.net/'); // please change to your P2 path, remember the ending slash. | |
function pcurl($url,$postargs=false) | |
{ | |
$ch = curl_init($url); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($ch, CURLOPT_VERBOSE, 1); |
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
<code lang="php"> | |
<?php | |
require_once("read.php"); //如果不是在首页调用的话则read.php替换为"你的typecho地址+read.php" | |
echo readit(); | |
?> | |
</code> |
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
//这个是调用文件,具体看代码第4行就知道是哪段代码了 | |
<div class="widget"> | |
<div id="twitter"><img src="http://blog.imnerd.org/T.png"></div> | |
<div class="pagecookery"> | |
<?php | |
require_once("read.php"); | |
echo readit(); | |
?> | |
</div> | |
</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
<?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
<?php | |
ob_start(); | |
$entry = $SQL->RunQuery("SELECT * FROM entry ORDER BY time DESC LIMIT 0, 50"); | |
$title = SITE_NAME . ' - RSS'; | |
echo urldecode('%3C%3Fxml+version=%221.0%22+encoding=%22utf-8%22%3F%3E'); | |
?><rss version="2.0"> | |
<channel> |
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
.pagecookery_list { | |
list-style-type:disc; | |
font-size:14px; | |
color:#666666; | |
line-height:1.7; | |
font-family:Georgia,Times,"Times New Roman",serif; | |
} | |
.pagecookery_list li { | |
border-bottom:1px dashed #CCCCCC; | |
list-style-type:none; |
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
<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 |
OlderNewer