最新公告
  • 欢迎您光临329687站长资源网,本站秉承服务宗旨 履行“站长”责任,销售只是起点 服务永无止境!立即加入我们
  • 开发方法

    1、需要新增两个文件:huiyuan_add.php和huiyuan.htm。huiyuan_add.php放在/dede/文件夹下,huiyuan_add.htm放在/dede/templets/文件夹下。

    huiyuan_add.php代码如下:

    <?php
    require(dirname(__FILE__)."/config.php");
    $ENV_GOBACK_URL="member_main.php";
    if($dopost=="add"){
    $jointime=$logintime=time();
    $loginip=$joinip=GetIP();
    $dsql->ExecuteNoneQuery("INSERTINTOdede_memberSET`mtype`=&#039;$mtype&#039;,`userid`=&#039;$userid&#039;,`pwd`=&#039;$password&#039;,`uname`=&#039;$uname&#039;,`sex`=&#039;$sex&#039;,`rank`=&#039;$rank&#039;,`money`=&#039;$money&#039;,`email`=&#039;$email&#039;,`scores`=&#039;$scores&#039;,`matt`=&#039;0&#039;,`face`=&#039;&#039;,`safequestion`=&#039;0&#039;,`safeanswer`=&#039;$safeanswer&#039;,`jointime`=&#039;$jointime&#039;,`joinip`=&#039;$joinip&#039;,`logintime`=&#039;$logintime&#039;,`loginip`=&#039;$loginip&#039;;");
    ShowMsg(&#039;恭喜,成功添加一个用户!&#039;,$ENV_GOBACK_URL);
    exit();
    }
    else{
    includeDedeInclude(&#039;templets/huiyuan_add.htm&#039;);
    }
    ?>

    huiyuan_add.htm 的代码如下:

    <html>
    <head>
    <metahttp-equiv=&#039;Content-Type&#039;content=&#039;text/html;charset=gb2312&#039;>
    <title>添加会员</title>
    <linkhref="css/base.css"rel="stylesheet"type="text/css">
    <scriptlanguage=&#039;javascript&#039;src=&#039;../data/enums/area.js&#039;></script>
    <script>
    functioncheckSubmit()
    {
    if(document.form2.email.value=="")
    {
    document.form2.email.focus();
    alert("Email不能为空!");
    returnfalse;
    }
    if(document.form2.uname.value=="")
    {
    document.form2.uname.focus();
    alert("用户昵称不能为空!");
    returnfalse;
    }
    }
    </script>
    </head>
    <bodybackground=&#039;img/allbg.gif&#039;leftmargin=&#039;8&#039;topmargin=&#039;8&#039;>
    <tablewidth="98%"border="0"align="center"cellpadding="3"cellspacing="1"bgcolor="#D1DDAA">
    <tr>
    <tdheight="19"background="img/tbg.gif"><ahref=&#039;<?phpecho$ENV_GOBACK_URL;?>&#039;><b>会员管理</b></a>&gt;&gt;添加会员</td>
    </tr>
    <tr>
    <tdheight="200"bgcolor="#FFFFFF"align=&#039;center&#039;>
    <tablewidth="98%"border="0"cellspacing="0"cellpadding="6">
    <tr>
    <tdcolspan="2"height="10"></td>
    </tr>
    <formname="form2"action="huiyuan_add.php"method="post"onSubmit="returncheckSubmit();">
    <inputtype="hidden"name="dopost"value="add"/>
    <tr>
    <tdwidth="17%"align="right"class=&#039;bline&#039;>用户名:</td>
    <tdwidth="83%"class=&#039;bline&#039;>
    <inputname="userid"type="text"value=""id="userid"size="20"style="width:150px;height:20px"/>
    </td>
    </tr>
    <tr>
    <tdalign="right"class=&#039;bline&#039;>密码:</td>
    <tdclass=&#039;bline&#039;>
    <inputtype="text"name="pwd"id="pwd"/>
    </td>
    </tr>
    <tr>
    <tdalign="right"class=&#039;bline&#039;>用户类型:</td>
    <tdclass=&#039;bline&#039;>
    <?phpecho$row[&#039;mtype&#039;];?>
    <inputtype="radio"name="mtype"class="np"value="个人"checked=&#039;1&#039;/>
    个人&nbsp;
    <inputtype="radio"name="mtype"class="np"value="企业"/>企业
    </td>
    </tr>
    <tr>
    <tdalign="right"class=&#039;bline&#039;>电子邮箱:</td>
    <tdclass=&#039;bline&#039;>
    <inputname="email"type="text"id="email"value="<?phpecho$row[&#039;email&#039;]?>"style="width:150px;height:20px"/>
    </td>
    </tr>
    <tr>
    <tdalign="right"class=&#039;bline&#039;>昵称:</td>
    <tdclass=&#039;bline&#039;>
    <inputname="uname"type="text"value="<?phpecho$row[&#039;uname&#039;]?>"id="uname"size="20"style="width:150px;height:20px"/>
    </td>
    </tr>
    <tr>
    <tdalign="right"class=&#039;bline&#039;>性别:</td>
    <tdclass=&#039;bline&#039;>
    <inputtype="radio"name="sex"class="np"value="男"checked=&#039;1&#039;/>
    男&nbsp;
    <inputtype="radio"name="sex"class="np"value="女"/>
    女
    <inputtype="radio"name="sex"class="np"value=""/>
    保密
    </td>
    </tr>
    <tr>
    <tdalign="right"class=&#039;bline&#039;>等级:</td>
    <tdclass=&#039;bline&#039;><?php
    $MemberTypes=&#039;&#039;;
    $dsql->SetQuery("Selectrank,membernameFrom`dede_arcrank`whererank>0");
    $dsql->Execute(&#039;n&#039;);
    $MemberTypes[0]="限制会员";
    while($nrow=$dsql->GetObject(&#039;n&#039;)){
    $MemberTypes[$nrow->rank]=$nrow->membername;
    }
    $options="<selectname=&#039;rank&#039;style=&#039;width:180px&#039;>rn";
    foreach($MemberTypesas$k=>$v)
    {
    if($k!=$row[&#039;rank&#039;])$options.="<optionvalue=&#039;$k&#039;>$v</option>rn";
    else$options.="<optionvalue=&#039;$k&#039;selected>$v</option>rn";
    }
    $options.="</select>rn";
    echo$options;
    ?></td>
    </tr>
    <tr>
    <tdheight="67"align="right">&nbsp;</td>
    <tdheight="67">
    <inputtype="submit"name="Submit"value="确定添加"class=&#039;coolbg&#039;/>
    &nbsp;&nbsp;
    <inputtype="reset"name="Submit22"value="重置表单"class=&#039;coolbg&#039;/>
    </td>
    </tr>
    </form>
    </table>
    </td>
    </tr>
    </table>
    </body>
    </html>

    打开dedeincinc_menu.php,找到

    在其下面增加如下代码

    完成。


    329站长网 » 织梦后台直接添加会员功能开发方法

    常见问题FAQ

    免费下载或者VIP会员专享资源能否直接商用?
    本站所有资源版权均属于原作者所有,这里所提供资源均只能用于参考学习用,请勿直接商用。若由于商用引起版权纠纷,一切责任均由使用者承担。更多说明请参考 VIP介绍。
    提示下载完但解压或打开不了?
    最常见的情况是下载不完整: 可对比下载完压缩包的与网盘上的容量,若小于网盘提示的容量则是这个原因。这是浏览器下载的bug,建议用百度网盘软件或迅雷下载。若排除这种情况,可在对应资源底部留言,或 联络我们.。
    找不到素材资源介绍文章里的示例图片?
    对于PPT,KEY,Mockups,APP,网页模版等类型的素材,文章内用于介绍的图片通常并不包含在对应可供下载素材包内。这些相关商业图片需另外购买,且本站不负责(也没有办法)找到出处。 同样地一些字体文件也是这种情况,但部分素材会在素材包内有一份字体下载链接清单。
    329687站长资源网
    一个专注于各种网站源码、程序模板、技术教程分享的站长资源下载平台
    • 4会员总数(位)
    • 1950资源总数(个)
    • 0本周发布(个)
    • 0 今日发布(个)
    • 203稳定运行(天)

    提供最优质的资源集合

    立即查看 了解详情