|
|
关键字描述:风格 页面 定义 阿里巴巴 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 xkzzz_member set
spacename='$spacename',spaceimage='$spaceimage',news='$news',spacestyle='$spacestyle',mybb='$mybb'
where ID='.$cfg_ml-M_ID.';
本人精力有限,如有问题,请在本贴回复,请不要再加我QQ。
先级大家先看张图:
侠客站长站 http://www.jb51.net
这张图里面,就可以直接切换各种不同的企业风格。
修改方法,再次描述一下:
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 xkzzz_member where `$fieldname`='{$fieldvalue}'; );
if(!is_array($spaceInfos)){
必需把上面的 spacestyle 字段加进去。这样才能在更改个人空间里资料里自助选择。
3、在index_do.php文件里,把数据写进数据库
/*
更改个人空间资料
function EditSpace()
*/
else if($dopost==editSpace)
{
。。。。
$upquery = Update xkzzz_member set
spacename='$spacename',spaceimage='$spaceimage',news='$news',spacestyle='$spacestyle',mybb='$mybb'
where ID='.$cfg_ml-M_ID.';
http://www.jb51.net/uploads/soft/art/09/kkx.rar |
|