關鍵字描述:風格 頁面 定義 阿里巴巴 " < 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."';