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 2024-五一综合模拟赛
  • ¥15 如何将下列的“无限压缩存储器”设计出来
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口