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=1"> <meta name="renderer" content="webkit"> <title> <?=$title;?> </title> <link rel="stylesheet" href="/_backup/wap/css/amazeui_min.css"> <link rel="stylesheet" href="/_backup/wap/css/app.css"> <link rel="canonical" href="http://www.sznest.net/_mfmb/0001/zxly/" /> </head> <body> <header class="header"> <div class="am-fr"> <!--注意,首页与其它页面就这里有点不同,如果是首页是下面的第一行,否则是第二行--> <a href="/_mfmb/0001/admin/" class="am-icon-user am-icon-sm"></a> <a href="javascript:history.go(-1)" class="am-icon-chevron-left am-icon-sm"></a> </div> <div class="am-fl"> <a href="javascript:;" class="am-icon-bars am-icon-sm" data-am-offcanvas="{target:'#nav_top'}"></a> </div> <div class="logo"> <a href="http://www.sznest.net/_mfmb/0001/index_wap.html"> <img src="/_backup/_upload/wap-logo.png" alt="" /></a> </div> <div class="clear"></div> </header> <div class="nav am-offcanvas" id="nav_top"> <div class="am-offcanvas-bar"> <ul id="collapase-nav"> <li class="am-panel"> <a href="http://www.sznest.net/_mfmb/0001/index_wap.html" title="首页">首页</a> </li> <li class="am-panel"> <span class="am-icon-angle-right" data-am-collapse="{parent:'#collapase-nav', target:'#nav_2'}"></span> <a href="http://www.sznest.net/_mfmb/0001/gywm/index_wap.html" title="关于我们">关于我们</a> <ul class="am-collapse" id="nav_2"> <li><a href="http://www.sznest.net/_mfmb/0001/gywm/index_wap.html" title="公司简介">公司简介</a></li> <li class = 'lastli'><a href="http://www.sznest.net/_mfmb/0001/gywm/qywh_wap.html" title="企业文化">企业文化</a></li> </ul> </li> <li class="am-panel"> <span class="am-icon-angle-right" data-am-collapse="{parent:'#collapase-nav', target:'#nav_3'}"></span> <a href="http://www.sznest.net/_mfmb/0001/xwzx/index_wap.html" title="新闻中心">新闻中心</a> <ul class="am-collapse" id="nav_3"> <li><a href="http://www.sznest.net/_mfmb/0001/xwzx/hyzx/index_wap.html" title="行业资迅">行业资迅</a></li> <li class = 'lastli'><a href="http://www.sznest.net/_mfmb/0001/xwzx/gsdt/index_wap.html" title="公司动态">公司动态</a></li> </ul> </li> <li class="am-panel"> <span class="am-icon-angle-right" data-am-collapse="{parent:'#collapase-nav', target:'#nav_4'}"></span> <a href="http://www.sznest.net/_mfmb/0001/cpzs/index_wap.html" title="产品展示">产品展示</a> <ul class="am-collapse" id="nav_4"> <li><a href="http://www.sznest.net/_mfmb/0001/cpzs/shjd/index_wap.html" title="生活家电">生活家电</a></li> <li class = 'lastli'><a href="http://www.sznest.net/_mfmb/0001/cpzs/znjd/index_wap.html" title="智能家电">智能家电</a></li> </ul> </li> <li class="am-panel"> <a href="http://www.sznest.net/_mfmb/0001/khal/index_wap.html" title="客户案例">客户案例</a> </li> <li class="am-panel lastli"> <a href="http://www.sznest.net/_mfmb/0001/lxwm/index_wap.html" title="联系我们">联系我们</a> </li> </ul> </div> </div> <article> <section> <div class="subject"> <b>我要留言</b> </div> <div class="clear"></div> <div class="intro"> <form class="am-form am-margin-top am-margin-bottom" 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="请输入公司名称" data-rule="公司名称:required;"> </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="请输入您的姓名" data-rule="姓名:required;"> </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="请输入您的手机号码" data-rule="required(from, .contact); mobile" data-msg-required="请至少填写一种联系方式"> </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="请输入您的微信号" data-rule="required(from, .contact); wxh"> </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="email" class="am-form-field" placeholder="请输入您的邮箱" data-rule="邮箱:required; email"> </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="content" rows="5" placeholder="请输入留言内容" data-rule="留言内容:required;"></textarea> </div> <button type="button" class="am-btn am-btn-block am-btn-primary" id="submit">提交留言</button> <span class="error" id="message"> </form> </div> </section> </article> <footer> <p>深圳市网巢科技有限公司 版权所有 © 2008-2018 Inc. 粤ICP备11083046号</p> </footer> <figure class="footnav"> <div class="search"> <form action="http://www.sznest.net/_mfmb/0001/search/index_wap.php" method="get"> <span><a href="javascript:void(0);" onClick="$('.search').toggle()" class="am-close">×</a>站内搜索:</span> <input type="text" name="keyword" placeholder="请输入关键字" /> <button type="submit" /> 搜索 </button> </form> </div> <ul> <li> <a href="http://www.sznest.net/_mfmb/0001/index_wap.html"> <span class="am-icon-home"></span>首页</a> </li> <li> <a href="tel:13798214959"> <span class="am-icon-phone"></span>手机</a> </li> <li> <a href="http://www.sznest.net/_mfmb/0001/zxly/index_wap.html"> <span class="am-icon-comment-o"></span>留言</a> </li> <li> <a href="javascript:void(0);" onClick="$('.search').toggle()"> <span class="am-icon-search"></span>搜索</a> </li> </ul> </figure> <script src="/_backup/wap/js/jquery_min.js"></script> <script src="/_backup/wap/js/amazeui_min.js"></script> <script src="/_backup/wap/js/app.js"></script> <script> $(".am-panel span").click(function(){ var classstr = $(this).attr("class"); if(classstr == 'am-icon-angle-right' || classstr == 'am-icon-angle-right am-collapsed'){ $(this).attr("class","am-icon-angle-down"); }else{ $(this).attr("class","am-icon-angle-right"); } }); </script> <script type="text/javascript"> $("#submit").click(function(){ 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=1"> <meta name="renderer" content="webkit"> <title> <?=$title;?> </title> <link rel="stylesheet" href="/_backup/wap/css/amazeui_min.css"> <link rel="stylesheet" href="/_backup/wap/css/app.css"> <link rel="canonical" href="<?=$canonical;?>" /> </head> <body> <?php require Web::getWapPath() . "bodytop.php";?> <article> <section> <div class="subject"> <b><?=$navigationhtml;?></b> </div> <div class="clear"></div> <div class="intro"> <form class="am-form am-margin-top am-margin-bottom" 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="请输入公司名称" data-rule="公司名称:required;"> </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="请输入您的姓名" data-rule="姓名:required;"> </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="请输入您的手机号码" data-rule="required(from, .contact); mobile" data-msg-required="请至少填写一种联系方式"> </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="请输入您的微信号" data-rule="required(from, .contact); wxh"> </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="email" class="am-form-field" placeholder="请输入您的邮箱" data-rule="邮箱:required; email"> </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="content" rows="5" placeholder="请输入留言内容" data-rule="留言内容:required;"></textarea> </div> <button type="button" class="am-btn am-btn-block am-btn-primary" id="submit">提交留言</button> <span class="error" id="message"> </form> </div> </section> </article> <?php require Web::getWapPath() . 'bodyfoot.php';?> <script src="/_backup/wap/js/jquery_min.js"></script> <script src="/_backup/wap/js/amazeui_min.js"></script> <script src="/_backup/wap/js/app.js"></script> <script> $(".am-panel span").click(function(){ var classstr = $(this).attr("class"); if(classstr == 'am-icon-angle-right' || classstr == 'am-icon-angle-right am-collapsed'){ $(this).attr("class","am-icon-angle-down"); }else{ $(this).attr("class","am-icon-angle-right"); } }); </script> <script type="text/javascript"> $("#submit").click(function(){ 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>