


Quickly build a backend management system template based on thinkphp
当我们在搭建网站的时候,后端开发人员在编写后台的管理系统的时候,往往会因为缺少一个合适的后台管理系统的模板,而必须去重新编写一个,这几天由于工作上的安排,需要去研究一下thinkcmf的后台管理系统,于是发现那个模式是相当不错,感觉基本每个后台管理系统都可以套用,我把它的主题框架划分了4个大块,三级菜单栏、内容iframe、标签栏、顶栏,如下图:
是不是觉得挺可以的?是不是有种所有后台管理系统都可以套用的赶脚勒?由于整个后台过于庞大,但我们又只是要其这样的主体UI框架,其他的都不要,于是我把它重新复制粘贴了一下,把我们需要的这个UI的实现给提取出来了,
查看效果:http://www.live086.cn/Text/(空间2015/09/23会停用,所以可以下载面的源码,直接放在本地服务器(wampserver)就可以运行)
获取源码:http://pan.baidu.com/s/1gdEqUYJ 密码:c951
这个UI比较特别的地方在,我们在选择三级菜单栏时,右侧的内容iframe会即时的更换,所选择的菜单项也会以标签的形式出现在标签栏上,可以随意切换,关闭,同时也可以点击刷新当前的内容iframe,整个操作起来舒服简单方便,其代码主要从几个方面来实现这些功能:
openapp(url, appid, appname, selectObj)
这是一个核心的函数,就是打开与菜单栏或是标签栏相对应的iframe,url是iframe的路径,thinkphp用U方法生成,appid是iframe的唯一标识,必传,在切换标签栏的时候和iframe隐藏与否有很重要的作用,否则会出现点击菜单栏没有效果的,具体可以下载源码去看,appname则是标签显示名称,selectObj是触发对象
$current_iframe[0].contentWindow.location.reload();
而刷新功能则是使用到iframe的属性contentWindow,相当于获得iframe的window对象,于是可以达到刷新的作用
至于三级菜单怎么实现?关闭标签的实现?其他细节功能可以查看源码去看!
以上就介绍了基于thinkphp的后台管理系统模板快速搭建,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

To run the ThinkPHP project, you need to: install Composer; use Composer to create the project; enter the project directory and execute php bin/console serve; visit http://localhost:8000 to view the welcome page.

ThinkPHP has multiple versions designed for different PHP versions. Major versions include 3.2, 5.0, 5.1, and 6.0, while minor versions are used to fix bugs and provide new features. The latest stable version is ThinkPHP 6.0.16. When choosing a version, consider the PHP version, feature requirements, and community support. It is recommended to use the latest stable version for best performance and support.

Steps to run ThinkPHP Framework locally: Download and unzip ThinkPHP Framework to a local directory. Create a virtual host (optional) pointing to the ThinkPHP root directory. Configure database connection parameters. Start the web server. Initialize the ThinkPHP application. Access the ThinkPHP application URL and run it.

Understand the meaning of HTTP 301 status code: common application scenarios of web page redirection. With the rapid development of the Internet, people's requirements for web page interaction are becoming higher and higher. In the field of web design, web page redirection is a common and important technology, implemented through the HTTP 301 status code. This article will explore the meaning of HTTP 301 status code and common application scenarios in web page redirection. HTTP301 status code refers to permanent redirect (PermanentRedirect). When the server receives the client's

Performance comparison of Laravel and ThinkPHP frameworks: ThinkPHP generally performs better than Laravel, focusing on optimization and caching. Laravel performs well, but for complex applications, ThinkPHP may be a better fit.

HTTP Status Code 200: Explore the Meaning and Purpose of Successful Responses HTTP status codes are numeric codes used to indicate the status of a server's response. Among them, status code 200 indicates that the request has been successfully processed by the server. This article will explore the specific meaning and use of HTTP status code 200. First, let us understand the classification of HTTP status codes. Status codes are divided into five categories, namely 1xx, 2xx, 3xx, 4xx and 5xx. Among them, 2xx indicates a successful response. And 200 is the most common status code in 2xx

How to monitor the scrolling of an iframe requires specific code examples. When we use the iframe tag to embed other web pages in a web page, sometimes we need to perform some specific operations on the content in the iframe. One of the common needs is to listen for the scroll event of the iframe so that the corresponding code can be executed when the scroll occurs. The following will introduce how to use JavaScript to monitor the scrolling of an iframe, and provide specific code examples for reference. Get the iframe element First, we need

ThinkPHP installation steps: Prepare PHP, Composer, and MySQL environments. Create projects using Composer. Install the ThinkPHP framework and dependencies. Configure database connection. Generate application code. Launch the application and visit http://localhost:8000.
