- 注册时间
- 2011-4-18
- 最后登录
- 2012-3-24
- 在线时间
- 2 小时
- 阅读权限
- 10
- 积分
- 22
- 帖子
- 10
- 精华
- 0
- UID
- 39
|
本帖最后由 酒之小轻 于 2011-9-16 13:51 编辑
某菜鸟,用了一个博客程序,结果天天手工更新,已经快不行了
http://www.sojid.com/
现在那个菜鸟在http://www.sojid.com/dede装了一个DEDE采集
想调用DEDE最新10贴到sojid.com首页
<?php
/*
[JBLOG] (C) 2008-2009 JBLOG TEAM.
$QQ : 22823459
$Email : lisijie86@gmail.com
$Url : http://www.lisijie.org
*/
require(\'include/common.php\');
$get = array();
$querystring = $_SERVER[\'QUERY_STRING\'];
$modules = array(\'index\',\'category\',\'article\',\'archive\',\'rss\',\'link\',\'tag\',\'search\',\'ajax\',\'plugin\');
if ( $_CACHE[\'config\'][\'seo\'][\'rewrite\'] == 1 ) {
if ( substr($querystring,-1) == \'/\' ) {
$querystring = substr($querystring, 0, -1);
}
$get = explode(\'/\', $querystring);
unset($querystring);
if ( empty($get[0]) || !in_array($get[0], $modules)) {
if ( isset($_GET[\'ajax\']) ) {
$get[0] = \'ajax\';
$get[1] = $_GET[\'ajax\'];
}
}
if ( $get[0] == \'page\' || empty($get[0]) ) $get[0] = \'index\';
} else {
$querystring = explode(\'&\',$querystring);
foreach ( $querystring as $val ) {
$val = explode(\'=\',$val);
if ( empty($get) ) {
$get[0] = urldecode($val[0]);
$get[1] = urldecode($val[1]);
} else {
$get[] = urldecode($val[1]);
}
}
unset($querystring);
switch ($get[0]) {
case \'\' :
case \'page\' :
$get[0] = \'index\'; break;
case \'aid\' :
$get[0] = \'article\'; break;
case \'cid\' :
$get[0] = \'category\'; break;
case \'p\' :
$get[0] = \'plugin\'; break;
default :
}
}
if ( cache_page() ) {
require_once(JBLOG_ROOT.\'include/func_cachepage.php\');
get_cache_page();
}
//加载用户自定义函数
$file = JBLOG_ROOT.\'./themes/\'.$_CACHE[\'config\'][\'blog\'][\'theme\'].\'/function.php\';
if ( file_exists($file) ) {
include_once($file);
}
unset($file);
if (in_array($get[0], $modules)) {
define(\'MODULE\', $get[0]);
require_once(JBLOG_ROOT.\'./include/mod_\'.$get[0].\'.php\');
} else {
page_not_found();
}
footer();
?>
以上是博客首页
000000000000000000000000000000000000000000000000000000000000000000000000000000000
以下是DEDE首页
请问要怎么写?
<?php
if(!file_exists(dirname(__FILE__).\'/d/data/common.inc.php\'))
{
header(\'Location:dinstall/index.php\');
exit();
}
require_once (dirname(__FILE__) . \"/d/include/common.inc.php\");
require_once DEDEINC.\"/d/arc.partview.class.php\";
$GLOBALS[\'_arclistEnv\'] = \'index\';
$row = $dsql->GetOne(\"Select * From `#@__homepageset`\");
$row[\'templet\'] = MfTemplet($row[\'templet\']);
$pv = new PartView();
$pv->SetTemplet($cfg_basedir . $cfg_templets_dir . \"/\" . $row[\'templet\']);
$pv->Display();
?> |
|