<?php
require_once(DEDEINC.'/arc.listview.class.php');
$query = "SELECT arc.* , tp.reid , tp.typename , tp.typedir , ch.addtable FROM `#@__archives` arc ".
"LEFT JOIN #@__arctype tp on tp.id=arc.typeid ".
"LEFT JOIN #@__channeltype as ch on arc.channel = ch.id WHERE arc.typeid='5' ORDER BY pubdate DESC LIMIT 0 , 10";
$arctitle = array();
$dsql->SetQuery($query);
$dsql->Execute();
while ($rowarc = $dsql->GetArray()) {
$arctitle[] = $rowarc;
}
?>
<div class="my_top">
<div class="my_title"><?php echo $ty['typename']; ?></div>
<div class="my_more"><a href="<?php echo substr($ty['typedir'], 9); ?>" target="_blank">更多>></a></div>
</div>
require_once(DEDEINC.'/arc.listview.class.php');
$query = "SELECT arc.* , tp.reid , tp.typename , tp.typedir , ch.addtable FROM `#@__archives` arc ".
"LEFT JOIN #@__arctype tp on tp.id=arc.typeid ".
"LEFT JOIN #@__channeltype as ch on arc.channel = ch.id WHERE arc.typeid='5' ORDER BY pubdate DESC LIMIT 0 , 10";
$arctitle = array();
$dsql->SetQuery($query);
$dsql->Execute();
while ($rowarc = $dsql->GetArray()) {
$arctitle[] = $rowarc;
}
?>
<div class="my_top">
<div class="my_title"><?php echo $ty['typename']; ?></div>
<div class="my_more"><a href="<?php echo substr($ty['typedir'], 9); ?>" target="_blank">更多>></a></div>
</div>
<div class="mylist">
<ul>
<?php
foreach($arctitle as $arc){
$arcurls = array();
$arcurls = GetOneArchive($arc['id']);
?>
<li><a href="<?php echo $arcurls['arcurl']; ?>" target="_blank"><?php echo $arc['title'];?></a></li>
<?php
}
?>
</ul>
</div>
注意:红色部分
<ul>
<?php
foreach($arctitle as $arc){
$arcurls = array();
$arcurls = GetOneArchive($arc['id']);
?>
<li><a href="<?php echo $arcurls['arcurl']; ?>" target="_blank"><?php echo $arc['title'];?></a></li>
<?php
}
?>
</ul>
</div>
注意:红色部分