本帖最后由 jousst 于 2009-9-10 13:35 编辑
我在cp_profile.htm裡面加入以下這段碼- <tr>
- <th>工作地:</th>
- <td id="workcitybox">
- <script type="text/javascript" src="source/script_city2.js"></script>
- <script type="text/javascript">
- <!--
- showprovince('workprovince', 'workcity', '$space[workprovince]', 'workcitybox');
- showcity('workcity', '$space[workcity]', 'workprovince', 'workcitybox');
- //-->
- </script>
- <a href="cp.php?ac=friend&op=search&view=work" target="_blank">» 查找同城</a>
- </td>
- <td>
- <select name="friend[workcity]">
- <option value="0"{$friendarr[workcity][0]}>全用戶可見</option>
- <option value="1"{$friendarr[workcity][1]}>僅好友可見</option>
- <option value="3"{$friendarr[workcity][3]}>僅自己可見</option>
- </select>
- </td>
- </tr>
复制代码 但後台sql部分,我也需要另外加入兩個欄位workcity與workprovince
像下面這張圖一樣,我需新增兩個欄位
請教高手
我如何利用uch本身的後台功能加入這兩個欄位呢
我在後台看到原始residecity 和resideprovince的函數是這樣的(我自己改成work了)
SELECT COUNT( * ) AS `資料列列數` , `workprovince`
FROM `uchome_spacefield`
GROUP BY `workprovince`
ORDER BY `workprovince`
LIMIT 0 , 30
SELECT COUNT( * ) AS `資料列列數` , `workcity`
FROM `uchome_spacefield`
GROUP BY `workcity`
ORDER BY `workcity`
LIMIT 0 , 30
請高手協助~感謝 |