关键字描述:风格 页面 定义 阿里巴巴 " < 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',spaceimage='$spaceimage',news='$news',spacestyle='$spacestyle',mybb='$mybb'
where ID='".$cfg_ml->M_ID."';

免责声明:本站所有文章和图片均来自用户分享和网络收集,文章和图片版权归原作者及原出处所有,仅供学习与参考,请勿用于商业用途,如果损害了您的权利,请联系网站客服处理。

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。