Dedecms仿阿里巴巴,自定义企业级风格页面
发布时间:2020-12-14 04:15:07 所属栏目:Dedecms 来源:网络整理
导读:关键字描述:风格 页面 定义 阿里巴巴 ? " spacestyle ? 最新补充:? ? 1) 附件附index.php company.php 有修改好的,修改过的地方都有注释,都是比较简单!? ? ? A、space_info 文件里加上这个表单,好让用户选择不同的 spacestyle? ? INPUT name="spacesty
关键字描述:风格 页面 定义 阿里巴巴 ? " < spacestyle
?
最新补充:?
?
1) 附件附index.php company.php 有修改好的,修改过的地方都有注释,都是比较简单!?
?
?
A、space_info 文件里加上这个表单,好让用户选择不同的 spacestyle?
?
<INPUT name="spacestyle" type=radio value="redstyle" <?php if($spacestyle=="redstyle") echo " checked";?> />?
?
B、index_do.php文件里,把数据写进数据库 (加红色字体部分)?
/*?
更改个人空间资料?
function EditSpace()?
*/?
else if($dopost=="editSpace")?
{?
?
。。。。?
$upquery = "Update [url=mailto:xkzzz_member]xkzzz_member[/url] set?
spacename='$spacename',spaceimage='$spaceimage',news='$news',spacestyle='$spacestyle',mybb='$mybb'?
where ID='".$cfg_ml->M_ID."';?
?
?
修改方法,再次描述一下:?
?
1 、在space_info.htm 空间修改模板文件中,在"空间名称"下添加如下数据?
?
<tr>?
<td height="24" colspan="2" bgcolor="#FBFEEF" > 空间风格:</td>?
</tr>?
<tr>?
<td height="35" colspan="2" > ?
<input name="spacestyle" type="text" id="spacsytle" size="35" value="<?php echo $spacestyle?>"> (这里用select 如果是多风格的话,安全些)?
</td>?
</tr>?
?
?
加上这一项,作用是添加 spacestyle 数据到数据库当中,样式可以多种,上图中我是通过radio进行单选的。 大家可以根据自己的情况,定义自己的文件夹。?
?
2、 在member/index.php文件里。?
//会员空间主页面?
/*------------------?
function ShowSpaceIndex()?
------------------*/?
elseif($action=="")?
{?
require_once(dirname(__FILE__)."/../include/inc_channel_unit_functions.php");?
$notarchives = "yes";?
$dsql = new DedeSql(false);?
$spaceInfos = $dsql->GetOne("Select ID,userid,`type`,uname,c1,c2,spaceshow,logintime,spacename,spaceimage,news,scores,spacestyle,membertype,sex,matt From [url=mailto:xkzzz_member]xkzzz_member[/url] where `$fieldname`='{$fieldvalue}'; ");?
if(!is_array($spaceInfos)){?
?
?
必需把上面的 spacestyle 字段加进去。这样才能在更改个人空间里资料里自助选择。?
?
?
3、在index_do.php文件里,把数据写进数据库?
?
/*?
更改个人空间资料?
function EditSpace()?
*/?
else if($dopost=="editSpace")?
{?
?
。。。。?
$upquery = "Update [url=mailto:xkzzz_member]xkzzz_member[/url] set?
spacename='$spacename',mybb='$mybb'?
where ID='".$cfg_ml->M_ID."';
上一篇:织梦Dedecms限制栏目列表生成的最大页数 下一篇:Dedecms5.1后台添加HTML更新-更新栏目缓存方法 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |