douyan2821 2018-09-27 08:42
浏览 123
已采纳

多个登录页面模板php

I want to let super admin choose his user's login page template from available template in my script , if I have temp1 , temp2,temp3 for login page , how can I allow super admin to select one template for them , and when one user trying to access login page the template which choose by super admin will display , how can I do that using php , mysql

  • 写回答

1条回答 默认 最新

  • douyi3307 2018-09-27 08:57
    关注

    You could, for example, have a small table called login_template :

    ---------------------------------------------------
    | ID |  NAME  |         PATH             | ACTIVE |
    |-------------------------------------------------|
    | 1  | Temp1  | form/login/template1.php |   0    |
    |-------------------------------------------------|
    | 2  | Temp2  | form/login/template2.php |   1    |
    |-------------------------------------------------|
    | 3  | Temp3  | form/login/template3.php |   0    |
    |-------------------------------------------------|
    

    Then, you need to display all the entries of your login_template table in order to let the super admin choose which template he wants to activate.

    The easiest solution for that should be to create a new form with a radio button next to each entry. The super admin will then click on a radio button and submit the form in order to choose a template.

    When the form is submitted, you retrieve the ID of the template selected by the admin, and you enable this template in your database (and of course disable the old template selected).

    Good luck !

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于大棚监测的pcb板设计
  • ¥20 sim800c模块 at指令及平台
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计