liuyan.php
留言
节点表模型类
信息表模型类
<?php if(!isset($GLOBALS["DR"])){$GLOBALS["DR"] = str_replace("\\", "/", $_SERVER["DOCUMENT_ROOT"]);} if(!isset($GLOBALS["webroot"])){$GLOBALS["webroot"] = preg_replace("/(.*\/).*/", "$1", str_replace("\\", "/", __DIR__));} require_once $GLOBALS["webroot"] . "/db.php"; require_once $GLOBALS["DR"] . "/base.php"; require $GLOBALS["DR"] . "/admin/require/html/nid.php"; require $GLOBALS["DR"] . "/admin/require/html/rid.php"; require $GLOBALS["DR"] . "/admin/require/doliuyanajax.php"; $fieldarr = [];$fieldtr = DB::getTr("select * from " . PREFIX . "field where nid = " . $nid); foreach ($fieldtr as $key => $value) {if ($value && !(in_array($key, ["attr", "pic", "width", "height"]))) {$fieldarr[$key] = 1;}} ?> <!doctype html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="Cache-Control" content="no-siteapp" /> <meta name="viewport" content="width=device-width, initial-scale=0"> <meta name="renderer" content="webkit"> <title> <?=$title;?> </title> <link rel="stylesheet" href="/_backup/html/css/amazeui_min.css"> <link rel="stylesheet" href="/_backup/html/css/app.css"> <link rel="alternate" media="only screen and(max-width: 640px)" href="http://www.sznest.net/_mfmb/0001/zxly/index_wap.html" /> </head> <body> <div class="bg_header"> <div class="header width"> <div class="logo"><img src="/_mfmb/0001/_backup/_upload/pc.png" alt=""></div> <div class="nav" id="nav"> <ul> <li class="hover"><a href="http://www.sznest.net/_mfmb/0001/" class="v1">首页</a> </li> <li><a href="http://www.sznest.net/_mfmb/0001/gywm/" class="v1">关于我们</a> <ul class="subnav"> <li><a href="http://www.sznest.net/_mfmb/0001/gywm/">公司简介</a></li> <li><a href="http://www.sznest.net/_mfmb/0001/gywm/qywh.html">企业文化</a></li> </ul> </li> <li><a href="http://www.sznest.net/_mfmb/0001/xwzx/" class="v1">新闻中心</a> <ul class="subnav"> <li><a href="http://www.sznest.net/_mfmb/0001/xwzx/hyzx/">行业资迅</a></li> <li><a href="http://www.sznest.net/_mfmb/0001/xwzx/gsdt/">公司动态</a></li> </ul> </li> <li><a href="http://www.sznest.net/_mfmb/0001/cpzs/" class="v1">产品展示</a> <ul class="subnav"> <li><a href="http://www.sznest.net/_mfmb/0001/cpzs/shjd/">生活家电</a></li> <li><a href="http://www.sznest.net/_mfmb/0001/cpzs/znjd/">智能家电</a></li> </ul> </li> <li><a href="http://www.sznest.net/_mfmb/0001/khal/" class="v1">客户案例</a> </li> <li><a href="http://www.sznest.net/_mfmb/0001/lxwm/" class="v1">联系我们</a> </li> </ul> </div> <div class="usernav"><a href="/_mfmb/0001/admin/">后台管理</a></div> </div> <div class="clear"></div> </div> <div class="bg_inner am-animation-scale-up am-animation-delay-1"> <div class="width banner_inner"> <div class="left"> <ul> <li class="hover"> <a>关于我们</a> </li> </ul> </div> <div class="right"> <span class="am-icon-phone am-icon-fw"></span>这里填写你的手机号码 <p>这里随便写什么</p> </div> </div> </div> <div class="width inner_container am-animation-slide-bottom am-animation-delay-1"> <ol class="am-breadcrumb am-breadcrumb-slash am-animation-slide-top am-animation-delay-1"> <li>当前位置:</li> <a href='http://www.sznest.net/_mfmb/0001/'>首页</a> >> <a href='http://www.sznest.net/_mfmb/0001/zxly/'>在线留言</a> </ol> <form class="am-form am-margin-top" name="ajaxform" id="ajaxform" method="post" enctype="multipart/form-data"> <input name="nid" type="hidden" value="10" /> <div class="am-input-group am-form-group"> <span class="am-input-group-label"> <i class="am-icon-user am-icon-fw"></i> </span> <input type="text" name="comname" class="am-form-field" placeholder="请输入公司名称"> </div> <div class="am-input-group am-form-group"> <span class="am-input-group-label"> <i class="am-icon-user am-icon-fw"></i> </span> <input type="text" name="name" class="am-form-field" placeholder="请输入您的姓名"> </div> <div class="am-input-group am-form-group"> <span class="am-input-group-label"> <i class="am-icon-phone am-icon-fw"></i> </span> <input type="text" name="mobile" maxlength="11" class="am-form-field contact" placeholder="请输入您的手机号码"> </div> <div class="am-input-group am-form-group"> <span class="am-input-group-label"> <i class="am-icon-fax am-icon-fw"></i> </span> <input type="text" name="wxh" class="am-form-field contact" placeholder="请输入您的微信号"> </div> <div class="am-input-group am-form-group"> <span class="am-input-group-label"> <i class="am-icon-fax am-icon-fw"></i> </span> <input type="text" name="email" class="am-form-field contact" placeholder="请输入您的邮箱"> </div> <div class="am-input-group am-form-group"> <span class="am-input-group-label"> <i class="am-icon-comments-o am-icon-fw"></i> </span> <textarea name="digest" rows="5" placeholder="请输入留言内容"></textarea> </div> <button type="button" class="am-btn am-btn-primary" id="submit">提交留言</button> <span class="error" id="message"></span> </form> </div> <div class="bg_foot am-scrollspy-init am-scrollspy-inview am-animation-slide-bottom" data-am-scrollspy="{animation:'slide-bottom',repeat:false}"> <div class="width footer"> <div class="left"> <dl> <dd><a href="http://www.sznest.net/_mfmb/0001/gywm/">关于我们</a></dd> <dt><a href="http://www.sznest.net/_mfmb/0001/gywm/"> 公司简介 </a></dt> <dt><a href="http://www.sznest.net/_mfmb/0001/gywm/qywh.html"> 企业文化 </a></dt> </dl> </div> <div class="left"> <dl> <dd><a href="http://www.sznest.net/_mfmb/0001/xwzx/">新闻中心</a></dd> <dt><a href="http://www.sznest.net/_mfmb/0001/xwzx/hyzx/"> 行业资迅 </a></dt> <dt><a href="http://www.sznest.net/_mfmb/0001/xwzx/gsdt/"> 公司动态 </a></dt> </dl> </div> <div class="left"> <dl> <dd><a href="http://www.sznest.net/_mfmb/0001/cpzs/">产品展示</a></dd> <dt><a href="http://www.sznest.net/_mfmb/0001/cpzs/shjd/"> 生活家电 </a></dt> <dt><a href="http://www.sznest.net/_mfmb/0001/cpzs/znjd/"> 智能家电 </a></dt> </dl> </div> <div class="left"> <dl> <dd><a href="http://www.sznest.net/_mfmb/0001/khal/">客户案例</a></dd> </dl> </div> <div class="left"> <dl> <dd>联系方式</dd> <dt> <p>客服电话:13798214959<br> 工作时间:24小时<br> 意见建议:249709197@qq.com</p> </dt> </dl> </div> <div class="search"> <form action="http://www.sznest.net/_mfmb/0001/search/index.php" method="get"> <span>站内搜索:</span> <input type="text" name="keyword" placeholder="请输入关键字"> <button type="submit"> 搜索 </button> </form> </div> <div class="clear"></div> </div> <div class="copyright"> 深圳市网巢科技有限公司 版权所有 © 2008-2018 Inc. 粤ICP备11083046号 <a href="/_mfmb/0001/admin/">后台登录</a></div> </div> <div class="plug_service am-scrollspy-init am-scrollspy-inview am-animation-slide-bottom" data-am-scrollspy="{animation:'slide-bottom',repeat:false,delay:1000}"> <ul> <li><a href="http://wpa.qq.com/msgrd?v=3&uin=249709197&site=qq&menu=yes" target="_blank"><span class="am-icon-qq"></span>客户咨询</a></li> <li><a href="http://www.sznest.net/_mfmb/0001/zxly/"><span class="am-icon-pencil-square-o"></span>在线留言</a></li> <li><a href="javascript:void(0);" title="用手机扫码浏览手机站"><span class="am-icon-mobile"></span>手机站</a> <div class="weixin_pic"><img src="/_mfmb/0001/_backup/_upload/wap.png" width="200"></div> </li> <!-- <li><a href="javascript:void(0);" title="微信小程序"><span class="am-icon-mobile"></span>微信小程序</a> <div class="weixin_pic"><img src="/_mfmb/0001/_backup/_upload/wxxcx.jpg" width="200"></div> </li> --> <li><a href="javascript:void(0);"><span class="am-icon-phone"></span>客服热线</a> <div class="hotline"><b>13798214959</b>工作时间:9:00-18:00</div> </li> <!-- <li><a href="javascript:void(0);"><span class="am-icon-wechat"></span>官方微信</a> <div class="weixin_pic"><img src="/_mfmb/0001/_backup/_upload/wx.jpg" width="200"> <p>微信号:<span>sznest</span></p> </div> </li> --> <li class="hover dis" id="backtop" style="display: list-item;"><a href="javascript:void(0);" data-am-smooth-scroll=""><span class="am-icon-chevron-up"></span>返回顶部</a></li> </ul> </div> <!--[if lt IE 9]> <div class="notsupport"> <h1>:( 非常遗憾</h1> <h2>您的浏览器版本太低,请升级您的浏览器</h2></div> <![endif]--> <script src="/_backup/html/js/jquery_min.js"></script> <script src="/_backup/html/js/amazeui_min.js"></script> <script src="/_backup/html/js/app.js"></script> <script type="text/javascript"> $("#submit").click(function(){ //这里的url不要使用带http://协议的,而要使用绝对路径,不然,如果当前的url是不带www的,而这里的ulr请求的是www的,那么,即使就会导致无法进入success里,而进入到了error中 url="/_mfmb/0001/html/liuyanajax.php"; $.ajax({ type: "POST", url: url, data: new FormData($("#ajaxform")[0]), dataType:"text",//如果dataType是json,服务器端需要返回json格式的字符串,如果返回不是json格式的字符串,那么会执行到error中,同时这里接受之后需要使用JSON.parse(data)来将JSON字符串转换为JSON对象var obj = JSON.parse(data); processData :false, // 不处理发送的数据,因为data值是Formdata对象,不需要对数据做处理,这一项也必须设置为假,否则也不能实现动态的效果 contentType :false, // 不设置Content-type请求头 success: function(data){ $("#message").text(data); }, error:function(XMLHttpRequest, textStatus, errorThrown){ //alert(XMLHttpRequest); //alert(textStatus); //alert(errorThrown); $("#message").text("网络错误"); }, }); }); </script> </body> </html>
<?php if(!isset($GLOBALS["DR"])){$GLOBALS["DR"] = str_replace("\\", "/", $_SERVER["DOCUMENT_ROOT"]);} if(!isset($GLOBALS["webroot"])){$GLOBALS["webroot"] = preg_replace("/(.*\/).*/", "$1", str_replace("\\", "/", __DIR__));} require_once $GLOBALS["webroot"] . "/db.php"; require_once $GLOBALS["DR"] . "/base.php"; require $GLOBALS["DR"] . "/admin/require/html/nid.php"; require $GLOBALS["DR"] . "/admin/require/html/rid.php"; require $GLOBALS["DR"] . "/admin/require/doliuyanajax.php"; $fieldarr = [];$fieldtr = DB::getTr("select * from " . PREFIX . "field where nid = " . $nid); foreach ($fieldtr as $key => $value) {if ($value && !(in_array($key, ["attr", "pic", "width", "height"]))) {$fieldarr[$key] = 1;}} ?> <!doctype html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="Cache-Control" content="no-siteapp" /> <meta name="viewport" content="width=device-width, initial-scale=0"> <meta name="renderer" content="webkit"> <title> <?=$title;?> </title> <link rel="stylesheet" href="/_backup/html/css/amazeui_min.css"> <link rel="stylesheet" href="/_backup/html/css/app.css"> <link rel="alternate" media="only screen and(max-width: 640px)" href="<?=$alternate;?>" /> </head> <body> <?php require Web::getHtmlPath() . "bodytop.php";?> <div class="width inner_container am-animation-slide-bottom am-animation-delay-1"> <ol class="am-breadcrumb am-breadcrumb-slash am-animation-slide-top am-animation-delay-1"> <li>当前位置:</li> <?=$navigationhtml;?> </ol> <form class="am-form am-margin-top" name="ajaxform" id="ajaxform" method="post" enctype="multipart/form-data"> <input name="nid" type="hidden" value="10" /> <div class="am-input-group am-form-group"> <span class="am-input-group-label"> <i class="am-icon-user am-icon-fw"></i> </span> <input type="text" name="comname" class="am-form-field" placeholder="请输入公司名称"> </div> <div class="am-input-group am-form-group"> <span class="am-input-group-label"> <i class="am-icon-user am-icon-fw"></i> </span> <input type="text" name="name" class="am-form-field" placeholder="请输入您的姓名"> </div> <div class="am-input-group am-form-group"> <span class="am-input-group-label"> <i class="am-icon-phone am-icon-fw"></i> </span> <input type="text" name="mobile" maxlength="11" class="am-form-field contact" placeholder="请输入您的手机号码"> </div> <div class="am-input-group am-form-group"> <span class="am-input-group-label"> <i class="am-icon-fax am-icon-fw"></i> </span> <input type="text" name="wxh" class="am-form-field contact" placeholder="请输入您的微信号"> </div> <div class="am-input-group am-form-group"> <span class="am-input-group-label"> <i class="am-icon-fax am-icon-fw"></i> </span> <input type="text" name="email" class="am-form-field contact" placeholder="请输入您的邮箱"> </div> <div class="am-input-group am-form-group"> <span class="am-input-group-label"> <i class="am-icon-comments-o am-icon-fw"></i> </span> <textarea name="digest" rows="5" placeholder="请输入留言内容"></textarea> </div> <button type="button" class="am-btn am-btn-primary" id="submit">提交留言</button> <span class="error" id="message"></span> </form> </div> <?php require Web::getHtmlPath() . 'bodyfoot.php';?> <?php require Web::getHtmlPath() . 'bodyright.php';?> <!--[if lt IE 9]> <div class="notsupport"> <h1>:( 非常遗憾</h1> <h2>您的浏览器版本太低,请升级您的浏览器</h2></div> <![endif]--> <script src="/_backup/html/js/jquery_min.js"></script> <script src="/_backup/html/js/amazeui_min.js"></script> <script src="/_backup/html/js/app.js"></script> <script type="text/javascript"> $("#submit").click(function(){ //这里的url不要使用带http://协议的,而要使用绝对路径,不然,如果当前的url是不带www的,而这里的ulr请求的是www的,那么,即使就会导致无法进入success里,而进入到了error中 url="<?=Web::getLiuyanAjaxStr();?>"; $.ajax({ type: "POST", url: url, data: new FormData($("#ajaxform")[0]), dataType:"text",//如果dataType是json,服务器端需要返回json格式的字符串,如果返回不是json格式的字符串,那么会执行到error中,同时这里接受之后需要使用JSON.parse(data)来将JSON字符串转换为JSON对象var obj = JSON.parse(data); processData :false, // 不处理发送的数据,因为data值是Formdata对象,不需要对数据做处理,这一项也必须设置为假,否则也不能实现动态的效果 contentType :false, // 不设置Content-type请求头 success: function(data){ $("#message").text(data); }, error:function(XMLHttpRequest, textStatus, errorThrown){ //alert(XMLHttpRequest); //alert(textStatus); //alert(errorThrown); $("#message").text("网络错误"); }, }); }); </script> </body> </html>