<?phprequire_once(dirname(__FILE__) . "/../include/common.inc.php");
require_once DEDEINC . "/arc.partview.class.php";
if ($title == '')
{
ShowMsg('关键字不能为空!', '-1');
exit();
}
$row = $dsql->GetOne("SELECT id FROM `dede__archives` WHERE title = '$title' ");
if (is_array($row))
{
$chRow = $dsql->GetOne("SELECT c.addtable FROM dede__archives AS a LEFT JOIN dede_channeltype AS c ON a.channel=c.id where a.id='{$row['id']}'");
$addtable = trim($chRow['addtable']);
$result = $dsql->GetOne("SELECT arc.*,addf.* FROM `dede__archives` arc LEFT JOIN `{$addtable}` addf ON arc.id=addf.aid WHERE arc.arcrank>-1 AND arc.id = '{$row['id']}'");
$pv = new PartView();
foreach ($result as $k => $v)
{
$pv->Fields[$k] = $v;
}
$pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $cfg_df_style . "/so.htm");
$pv->Display();
}
else
{
ShowMsg('没有相关记录!', '-1');
}
exit();