当前位置:首页 > 电脑知识 > 正文内容

燃爆了(phpcms模版)phpcms开发手册,如何调用phpcms登陆框模板,如何调用phpcms登陆框模板,

sauo3年前 (2022-12-15)电脑知识91

用PHPCMS套网站后台时,如果想要在单页面的侧边栏调用登陆框(首页、栏目页、列表页调用方法都一样),做出如下的效果图:

1、首先找到\phpcms\templates\default\member\mini.html这个文件

2、将其内容修改为

{php if(!HTTP_REFERER||strpos(HTTP_REFERER,&a=login))@header("Location: ".$_GET[forward]);}<style> body,html{background:none; padding:0; margin:0}.log{line-height:25px; height:139px; width:178px;float:left; font-size:12px; padding-top:10px; padding-left:5px;}.list {float:left; width:168px; height:30px; line-height:30px;}</style><body style="background-color:transparent"><div class="log">{if$_username}{L(hellow)}{get_nickname()}<br><a href="{APP_PATH}index.php?m=member&siteid={$siteid}" target="_blank">{L(member_center)}</a><a href="{APP_PATH}index.php?m=member&c=index&a=logout&forward={urlencode($_GET[forward])}&siteid={$siteid}" target="_top">{L(logout)}</a>{else}<form method="post" action="{APP_PATH}index.php?m=member&c=index&a=login" id="myform" name="myform" target="_top"><input type="hidden" name="forward" id="forward" value="{if $_GET[forward]}{$_GET[forward]}{else}{HTTP_REFERER}{/if}"><div class="list">:<input type="text" id="username" name="username" size="15"class="input-text"></div><div class="list">:<input type="password" id="password" name="password" size="16"class="input-text"></div><div class="list">:<input type="text" id="code" name="code" size="4"class="input-text">{form::checkcode(code_img,4,14,75,24)}</div><div class="list"><input type="submit" name="dosubmit" id="dosubmit" value="{L(login)}">|<a href="{APP_PATH}index.php?m=member&c=index&a=register&siteid={$siteid}" target="_blank">{L(register)}</a></div></form>{/if}</div></body>

在需要调用登陆框的位置引入下面的js:

<scripttype="text/javascript">document.write(<iframe src="{APP_PATH}index.php?m=member&c=index&a=mini&forward=+encodeURIComponent(location.href)+&siteid={get_siteid()}" allowTransparency="true" width="178" height="139" frameborder="0" scrolling="no"></iframe>)</script>
(window.slotbydup = window.slotbydup || []).push({ id: "u6835052", container: "_96bek913mdb", async: true });

本文链接:http://blog.sauo.top/?id=482 感谢分享!

分享到:

扫描二维码推送至手机访问。

版权声明:本文由冬眠先生个人博客发布,如需转载请注明出处。

本文链接:http://blog.sauo.top/?id=482

分享给朋友:

“燃爆了(phpcms模版)phpcms开发手册,如何调用phpcms登陆框模板,如何调用phpcms登陆框模板,” 的相关文章

万万没想到(Ubuntu安装ssh服务)ubuntu配置ssh服务器,ubuntu安装ssh服务器的方法,ubuntu安装ssh服务器的方法,

万万没想到(Ubuntu安装ssh服务)ubuntu配置ssh服务器,ubuntu安装ssh服务器的方法,ubuntu安装ssh服务器的方法,

免费领取腾讯云服务器! 安装了一个ubuntu系统,想着在内网中用ssh进行远程连接管理。下面这篇博文就说说如果在ubuntu系统中安装ssh远程管理服务。 ubuntu 安装ssh服务器的方法 1、安装 openssh-s...

新鲜出炉(ubuntu系统与centos系统区别)ubuntu还是centos,centos系统与ubuntu系统的区分,centos系统与ubuntu系统的区分,

免费领取腾讯云服务器! Linux的发行版有很多,而我们经常使用的为centos与ubuntu,下面这篇博文就说说这两个系统的发源与区别。 CentOS CentOS(Community Enterprise Operati...

这都可以(PHP百度百科)pHp是什么,php中关于strtotime函数31日取前几个月日期的BUG,php中关于strtotime函数31日取前几个月日期的BUG,

免费领取腾讯云服务器! 在使用php脚本中的 strtotime 函数取前几个月的日期时,发现每到31日时,取出的前几个月的日期都会出现错误。仔细检查了一下,发现在利用 strtotime 函数取前几个月的日期时,给 strtotime 函数的参数并不规范...

一篇读懂(PHP for循环)php跳出循环的语句,php中的几种循环语句,php中的几种循环语句,

免费领取腾讯云服务器! 列举几种php脚本中常用的几种循环语句,比如,for,foreach,do....while 等。 php for循环 for循环在很多语言中都经常用到,比如js语言,c语言,java语言等。...

没想到(PHP重定向)php获取重定向后的地址,php实现页面重定向的方法,php实现页面重定向的方法,

免费领取腾讯云服务器! php脚本实现页面重定向有多种方法,下面列几种简单的方法,供大家来参考一下。 php实现页面重定向的方法 方法1: 使用php中的 header() 函数来实现页面的跳转,实现重定向的...

一看就会(imagefilter过滤图像方法)php imagefill,php imagefilter()图片滤镜函数的用法与示例,php imagefilter()图片滤镜函数的用法与示例,

一看就会(imagefilter过滤图像方法)php imagefill,php imagefilter()图片滤镜函数的用法与示例,php imagefilter()图片滤镜函数的用法与示例,

免费领取腾讯云服务器! 有个小需求,需要使用php代码对图片进行颜色调整,比如变成灰色,改变图片的亮度,对比度等等。而php中就内置了一个图片的滤镜函数 imagefilter() ,下面就来具体说说这个函数的用法。 php imagefi...

发表评论

访客

看不清,换一张

◎欢迎参与讨论,请在这里发表您的看法和观点。