实现风格转换页面
来源:互联网 发布:淘宝怎么注销实名认证 编辑:程序博客网 时间:2024/05/18 00:45
index.php
<?php
session_start();
include("./conn.php");
include("./init.inc.php");
include("./FCKeditor/fckeditor.php");
//从php文件分配标量的模板变量
$page_title="新闻管理系统";
$tpl->assign("page_title",$page_title);
//从php文件分配数组到模板
$sql="select * from news";
$result=$mysqli->query($sql);
$data=array();
while($row=$result->fetch_assoc()){
$news[]=$row;
}
$tpl->assign("news",$news);
//来自配置文件的变量(作业)
//局部缓存关闭
//$tpl->register_block("nocache","fun1",false);
//根据地址栏的参数判断使用的模板
$action=$_REQUEST['action'];
switch($action){
case "addnewsview";
$tpl->template_dir="";
$tpl->assign("page_title",添加新闻);
$tpl->display("addnews.html",id);
break;
}
if(isset($_POST['select1'])){
$select1 = $_POST['select1'];
echo $select1;
$tpl->assign("select1",$select1);
}
$tpl->display("index.html");
?>
index.html
<html>
<head>
<meta http-equiv="content-type"content="text/html;charset=utf-8">
<title><{$page_title}></title>
<style type="text/css">
body{
margin-top:50px;
}
</style>
<{config_load file="foo.conf" section=$select1}>
<{$select1}>
</head>
<body>
<p>欢迎<{nocache}><{$username}><{/nocache}>登陆新闻管理系统</p>
<hr>
<table width="<{#width#}>" height="<{#height#}>" border="<{#border#}>" bgcolor="<{#bgcolor#}>">
<tr bgcolor="<{#bgcolor#}>">
<td style="font-family:华文彩云;">请选择画面风格</td>
<td>
<form action="index.php" method="post">
<select name="select1" >
<option value="one1">123</option>
<option value="one">可爱风格</option>
<option value="two">温馨风格</option>
<option value="three">动漫风格</option>
<option value="eight">绿色幽幽</option>
</select>
<input type="submit" name="submit" value="修改">
</form>
</td>
<tr>
</tr>
<td>系统管理</td>
<td>
<form name="myform" method="post" action="">
<table border=0>
<tr>
<td width=150>序号</td>
<td width=150>标题</td>
<td width=150>日期</td>
<td width=200>选择</td>
</tr>
<{section loop=$news name=news start=2 step=2 max=3}>
<tr>
<td><{$smarty.section.news.iteration}></td>
<td><{$smarty.section.news.index}></td>
<td><{$news[news].title}></td>
<td><{$news[news].date}></td>
<td><input type="checkbox" name="checkbox[]"></td>
</tr>
<{/section}>
</table>
</td>
</tr>
<tr>
<td><a href="./index.php?action=addnewsview">添加新闻</a></td>
<td><input type="submit" value="删除">
<input type="hidden" name="action" value="<{$actionvalue}>"/>
</form>
</td>
</tr>
</table>
</body>
</html>
- 实现风格转换页面
- 风格迁移转换的两种实现
- 页面风格
- 一个 Activity实现页面转换
- 用超级链接实现页面转换
- XHTMLCSS的静态页面实现多风格选择的方法
- Javascript和CSS实现页面多种风格的实时替换
- ASP.Net切换CSS实现多风格页面的办法?
- DIV+CSS布局网页页面实现多风格选…
- Android Design风格实现可折叠页面CoordinatorLayout+AppBarLayout+CollapsingToolbarLayout
- 如何实现一个标准的MD风格页面
- Ubuntu16.04+GTX1080配置TensorFlow并实现图像风格转换
- c语言实现代码C风格到C++风格的注释转换
- 定制Blog页面风格
- 页面风格统一要求
- OFBIZ的页面风格
- 404风格的页面
- 用JS实现页面背景转换
- 面向对象之自定义异常和RunTimeException
- LCD驱动调试
- 判断点是否在多边形中 射线判断法
- UIWebView获取网页的标题
- The C10K problem
- 实现风格转换页面
- 利用普通的按钮实现gridview的分页问题!
- 函数指针与指针函数
- (转,好文必须的)Android深入浅出之Binder机制
- JAVA面试题
- GridView中使用存储过程分页
- 字符串常量和指针
- zen-cart基本操作手册(二次开发手册)
- 利用 JAVA 操作 EXCEL 文件