<?php
// 本文档自动生成,仅供测试运行
class IndexAction extends Action
{
/**
+----------------------------------------------------------
* 默认操作
+----------------------------------------------------------
*/
public function index()
{
$this->assign("title","净水器");
$User = M("User"); // 实例化User对象
$result = $User->add($data);
if ($result){
// 设置成功后的跳转页面地址 默认的返回页面是$_SERVER["HTTP_REFERER"]
$this->assign("jumpUrl","index");
$this->success("新增成功!");
}else{
// 错误页面的默认跳转页面是返回上一页 通常可以不用设置
$this->error("新增错误!");
}
$this->display();
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="refresh" content="200; url='{$Url}'" />
<title>成功提示信息</title>
</head>
<body>
<table width="500" border="1" align="center" cellpadding="3" cellspacing="0">
<tr>
<th align="center" bgcolor="#cccccc">成功信息提示</th>
</tr>
<tr>
<td>{$message}<br />
成功处理的标题信息:{$msgTitle}<br />
<present name="message">
自定义成功信息:{$message}<br />
</present>
<present name="error">
自定义错误信息:{$error}<br />
</present>
跳转页面路径:{$jumpUrl}<br />
停留时间:{$waitSecond}<br />
2秒后返回指定页面!<br />
如果浏览器无法跳转,<a href="__ROOT__/{$jumpUrl}" rel="external nofollow" rel="external nofollow" >请点击此处</a>。</td>
</tr>
</table>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="refresh" content="2; url='{$Url}'" />
<title>成功提示信息</title>
</head>
<body>
<table width="400" border="1" align="center" cellpadding="3" cellspacing="0">
<tr>
<th align="center" bgcolor="#cccccc">错误信息提示</th>
</tr>
<tr>
<td>{$message}<br />
成功处理的标题信息:{$msgTitle}<br />
<present name="message">
自定义成功信息:{$message}<br />
</present>
<present name="error">
自定义错误信息:{$error}<br />
</present>
跳转页面路径:{$jumpUrl}<br />
停留时间:{$waitSecond}<br />
2秒后返回指定页面!<br />
如果浏览器无法跳转,<a href="__ROOT__/{$jumpUrl}" rel="external nofollow" rel="external nofollow" >请点击此处</a>。</td>
</tr>
</table>
</body>
</html>
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有