dedecms实现首页顶部会员登陆框的方法
修改dede/member_mainphp中的分页数,
$dlist->pageSize = 20; //修改此处的pagesize为你需要显示的数量<php/
附件管理
@version $Id: media_mainphp 1 11:17 2010年7月19日Z tianya $
@package DedeCMSAdministrator
@copyright Copyright (c) 2007 - 2010, DesDev, Inc
@license http://helpdedecmscom/usersguide/licensehtml
@link http://wwwdedecmscom
/
require_once(dirname(__FILE__)"/configphp");
require_once(DEDEINC"/datalistcpclassphp");
require_once(DEDEINC"/commonfuncphp");
setcookie("ENV_GOBACK_URL",$dedeNowurl,time()+3600,"/");
if(empty($dopost)) $dopost = '';
//文件式管理器
if($dopost=='filemanager')
{
if(file_exists('/file_manage_mainphp'))
{
header("location:file_manage_mainphpactivepath=$cfg_medias_dir");
}
else
{
ShowMsg("找不到文件管理器,可能已经卸载!","-1");
}
exit();
}
//数据库管理
// ------------------------------------------------------------------------
if(empty($keyword)) $keyword = "";
$addsql = " WHERE (utitle LIKE '%$keyword%' OR uurl LIKE '%$keyword%') ";
if(empty($membertype))
{
$membertype = 0;
}
if($membertype==1)
{
$addsql = " AND umid>0 ";
}
else if($membertype==2)
{
$addsql = " AND umid>0 ";
}
if(empty($mediatype))
{
$mediatype = 0;
}
if($mediatype>1)
{
$addsql = " AND umediatype='$membertype' ";
}
$sql = "SELECT uaid,utitle,uurl,umediatype,ufilesize,umid,uuptime
,auserid AS adminname,muserid AS membername
FROM #@__uploads u
LEFT JOIN #@__admin a ON aid = umid
LEFT JOIN #@__member m ON mmid = umid
$addsql ORDER BY uaid DESC";
$dlist = new DataListCP();
$dlist->pageSize = 20; //修改此处的pagesize为你需要显示的数量
$dlist->SetParameter("mediatype",$mediatype);
$dlist->SetParameter("keyword",$keyword);
$dlist->SetParameter("membertype",$membertype);
$dlist->SetTemplate(DEDEADMIN"/templets/media_mainhtm");
$dlist->SetSource($sql);
$dlist->Display();
function MediaType($tid,$nurl)
{
if($tid==1)
{
return "<a href=\"javascript:;\" onClick=\"ChangeImage('$nurl');\"><img src='/include/dialog/img/picviewnonegif' name='picview' border='0' alt='预览'></a>";
}
else if($tid==2)
{
return "FLASH";
}
else if($tid==3)
{
return "视频/音频";
}
else
{
return "附件/其它";
}
}
function GetFileSize($fs)
{
$fs = $fs/1024;
return trim(sprintf("%101f",$fs)" K");
}
function UploadAdmin($adminid,$mid)
{
if($adminid!='') return $adminid;
else return $mid;
}
用编辑器打开\dede\templets\index_menu2htm 文件,修改123行到140行之间的内容,删除
<a id='link100' class='mm'>
<div onClick="ShowMainMenu(100)">模块</div>
</a>
<a id='link3' class='mm'>
<div onClick="ShowMainMenu(3)">采集</div>
</a> <a id='link6' class='mm'>
<div onClick="ShowMainMenu(6)">会员</div>
</a>
<a id='link7' class='mm'>
<div onClick="ShowMainMenu(7)">模板</div>
</a>
然后保存文件就好了。
这个就是个布局问题,登陆框很简单的,你只需要把布局定格在顶部就行了,那个的看你自己想放在顶部的什么位置了!自己试着去布局一下,实在不行,上网页布局网站down一个来修改自己想要的风格就行了!
0条评论