[原创+讨论] 这样的代码有意义吗!?
htmlconfig.php
<?php
//1.LOGO
define("_MY_LOGO",'<a href="./" id="logo"><span></span></a>');
//2.TOPLINK
define("_MY_TOPLINK",'<ul id="toplink"><li><a href="./" class="home">首页</a></li><li><a href="login.php" class="login">登录</a></li><li><a href="reg.php" class="reg">会员注册</a></li></ul>');
//3.AD
define("_MY_AD1",'<div id="myad"></div>');
//4.END
define("_MY_END",'<div id="end" class="endc"><ul>
<li><a href="./">首页</a></li>
<li><a href="#">网站地图</a></li>
<li><a href="#">联系我们</a></li>
</ul></div>');
//5.左栏
define("_MY_LEFT",'<div id="left">{left_list}</div>');
//6.content
define("_MY_CONTENT",'<div id="content">{content_list}</div>');
//7.右栏
define("_MY_RIGHT",'<div id="right">{right_list}</div>');
//8.text
define("_MY_TEXT",'<div class="iText">{text_list}</div>');
//9.copyright
define("_DIV_COPYRIGHT",'<div id="copyright">版权声明</div>');
?>
login.php
<?php
session_start();
require_once("config.php");
require_once("class/login.class.php");
require_once("class/myHtmlTemplate.php");//自己的模板实例类
$th = new myHtmlTemplate;
$list = <<<HTML
<form action="login.php" method="post" onsubmit="" id="iLogin" class="cLogin">
<h1>会员登录</h1>
<div class="list">
<ul>
<li>会员ID <input type="text" name="userid"></li>
<li>会员密码 <input type="password" name="password"><a href="mypwd.php">忘记密码了?</a></li>
<li>登录目标 <label><input type="radio" name="os" id="ios" value="1" checked="checked" />网站会员</label>
<label><input type="radio" name="loginos" id="ios" value="2" />后台管理</label>
</li>
<li>验证代码 <input name="code" type="text" class="login" id="icode" size="5" maxlength="4" dataType="Integer" max="9999" min="0000" msg="验证码错误" />
<img id="imcode" src="newcodeimg.php" />
<a href="#" onclick="document.getElementById('imcode').src='newcodeimg.php';return false;">重新获得验证码</a>
</li>
<li class="submit">
<input type="submit" value=" 登录 " />
</li>
</ul>
</div>
</form>
HTML;
$tem->body["body_list"] = '<div id="main">' . $top . _MY_AD1 . _MY_LEFT . $list. ' </div>' . _MY_END . _DIV_COPYRIGHT;
echo $tem->html("XHTML1T"); //以xhtml模式显示
?>
有图在附件中.
相关推荐
原创DIV+CSS+JS无缝滚动代码(从右向左)
原创DIV+CSS+JS无缝滚动代码(从右向左)
编译原理NFA-DFA转化原创代码以及算法详解
编译原理老师讲完NFA_DFA布置的作业,因为我是搞ACM的,这个题目用到的算法自己经常用,于是我就用bfs+dfs+状态压缩乱搞搞弄出个代码来,功能ok,100%原创,仅仅提供大家参考。这个是输出的表格部分,我们的程序还支持自动输出dfa的图形,我感觉画图比这个算法还难。。。在另一个资源里再下载。
C#+sqlServer实现的日记本程序源代码(原创)
C#+sqlServer实现的日记本程序源代码,VS2005平台开发,图形用户界面,简单实用,对常见Bug进行了专门的处理,程序的健壮性很强
[浪曦][原创][A342]Struct+Hibernate+DisplayTag标签+js+Div+css 第4讲(zk原创).exe
[浪曦][原创][A342]Struct+Hibernate+DisplayTag标签+js+Div+css 第4讲(zk原创).exe[浪曦][原创][A342]Struct+Hibernate+DisplayTag标签+js+Div+css 第4讲(zk原创).exe
VB写的黑屏软件+程序源代码(原创)
VB写的黑屏软件+程序源代码(原创) 运行后 1.出现黑屏界面了 双击一下黑屏的界面 然后输入密码 密码是我的QQ:243226766 (提前用笔记下) 输入中光标会隐身掉 否则重新双击 输入完成后点enter键 2.不行的话 重启下机子就行了 没加入开机自动启动项 加入开机自动启动项 360会提示木马 '以下三行是 其他的待测 代码目前注释掉了 'Set reg = CreateObject("wscript.shell") 'reg.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr", "1" 'reg.regwrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\svchost", "C:\WINDOWS\system\svchost.exe"


基础编程
