前端增加合作意向

This commit is contained in:
李志强 2025-11-28 11:40:38 +08:00
parent e678ff337c
commit 46ae55b67d
3 changed files with 429 additions and 7 deletions

View File

@ -0,0 +1,18 @@
CREATE TABLE `pay_cooperation` (
`id` int(11) unsigned NOT NULL auto_increment,
`name` varchar(50) NOT NULL COMMENT '姓名',
`email` varchar(100) NOT NULL COMMENT '邮箱',
`phone` varchar(20) DEFAULT NULL COMMENT '电话',
`company` varchar(100) DEFAULT NULL COMMENT '公司名称',
`type` varchar(50) DEFAULT NULL COMMENT '合作类型',
`message` text NOT NULL COMMENT '合作详情',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态0待处理1已处理2已拒绝',
`admin_reply` text DEFAULT NULL COMMENT '管理员回复',
`ip` varchar(45) DEFAULT NULL COMMENT '提交IP',
`user_agent` varchar(255) DEFAULT NULL COMMENT '用户代理',
`addtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '提交时间',
`reply_time` int(10) unsigned DEFAULT NULL COMMENT '回复时间',
PRIMARY KEY (`id`),
KEY `status` (`status`),
KEY `addtime` (`addtime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='广告合作申请表';

View File

@ -0,0 +1,410 @@
<?php
// 计算根目录路径
$current_dir = __DIR__; // /template/index12/Template/index12
$root_path = dirname(dirname(dirname(dirname($current_dir)))); // 向上4级到根目录
require_once $root_path . '/config.php';
require_once $root_path . '/includes/common.php';
require_once $root_path . '/includes/functions.php';
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
<title>合作意向 - <?php echo $conf['title']?></title>
<meta name="keywords" content="<?php echo $conf['keywords']?>">
<meta name="description" content="<?php echo $conf['description']?>">
<!-- Preloader -->
<style>
@keyframes hidePreloader {
0% {
width: 100%;
height: 100%;
}
100% {
width: 0;
height: 0;
}
}
body>div.preloader {
position: fixed;
background: white;
width: 100%;
height: 100%;
z-index: 1071;
opacity: 0;
transition: opacity .5s ease;
overflow: hidden;
pointer-events: none;
display: flex;
align-items: center;
justify-content: center;
}
body:not(.loaded)>div.preloader {
opacity: 1;
}
body:not(.loaded) {
overflow: hidden;
}
body.loaded>div.preloader {
animation: hidePreloader .5s linear .5s forwards;
}
</style>
<script>
window.addEventListener("load", function() {
setTimeout(function() {
document.querySelector('body').classList.add('loaded');
}, 300);
});
</script>
<!-- Favicon -->
<link rel="icon" href="favicon.ico" type="image/png"><!-- Font Awesome -->
<link rel="stylesheet" href="/template/index12/Template/index12/static/css/all.min.css">
<link rel="stylesheet" href="//cdn.suyanw.cn/mouse/mouse.css">
<!-- Quick CSS -->
<link rel="stylesheet" href="/template/index12/Template/index12/static/css/quick-website.css" id="stylesheet">
</head>
<body>
<!-- Preloader -->
<div class="preloader">
<div class="spinner-border text-primary" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
<div class="modal fade" tabindex="-1" role="dialog" id="modal-cookies" data-backdrop="false" aria-labelledby="modal-cookies" aria-hidden="true">
<div class="modal-dialog modal-dialog-aside left-4 right-4 bottom-4">
<div class="modal-content bg-dark-dark">
<div class="modal-body">
<!-- Text -->
<p class="text-sm text-white mb-3">
We use cookies so that our themes work for you. By using our website, you agree to our use of cookies.
</p>
<!-- Buttons -->
<a href="javascript:;" class="btn btn-sm btn-white" target="_blank">Learn more</a>
<button type="button" class="btn btn-sm btn-primary mr-2" data-dismiss="modal">OK</button>
</div>
</div>
</div>
</div>
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-light bg-white">
<div class="container">
<!-- Brand -->
<a class="navbar-brand" href="/">
<img alt="Image placeholder" src="/template/index12/Core/Assets/Img/logo.png" id="navbar-logo">
</a>
<!-- Toggler -->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<!-- Collapse -->
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav mt-4 mt-lg-0 ml-auto">
<li class="nav-item ">
<a class="nav-link" href="/">首页</a>
</li>
<li class="nav-item ">
<a class="nav-link" target="_blank" href="/template/index12/cooperation.php">合作意向</a>
</li>
<li class="nav-item ">
<a class="nav-link" target="_blank" href="/doc.html">API开发文档</a>
</li>
<li class="nav-item ">
<a class="nav-link" target="_blank" href="/template/index12/Template/index12/contact.php">联系我们</a>
</li>
</ul>
<!-- Button -->
<a class="navbar-btn btn btn-sm btn-primary d-none d-lg-inline-block ml-3" href="/user/reg.php" target="_blank">
注册
</a>
<a class="navbar-btn btn btn-sm btn-warning d-none d-lg-inline-block" href="/user/login.php" target="_blank">
登录
</a>
<!-- Mobile button --><br>
<div class="d-lg-none text-center">
<a href="/user/reg.php" class="btn btn-primary btn-icon">商户登录</a>
<a href="/user/" class="btn btn-primary btn-icon">前往注册</a>
</div><br>
</div>
</div>
</nav>
<!-- Main content -->
<section class="slice py-5">
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-8">
<!-- Card -->
<div class="card">
<div class="card-body p-5">
<div class="text-center mb-5">
<h1 class="display-4">合作意向</h1>
<p class="lead text-muted">我们期待与您合作,共同发展</p>
</div>
<?php
if(isset($_POST['submit'])) {
$name = htmlspecialchars(trim($_POST['name']));
$email = htmlspecialchars(trim($_POST['email']));
$phone = htmlspecialchars(trim($_POST['phone']));
$company = htmlspecialchars(trim($_POST['company']));
$message = htmlspecialchars(trim($_POST['message']));
$type = htmlspecialchars(trim($_POST['type']));
// 验证必填字段
if(empty($name) || empty($email) || empty($message)) {
echo '<div class="alert alert-danger">请填写所有必填字段!</div>';
} elseif(!filter_var($email, FILTER_VALIDATE_EMAIL)) {
echo '<div class="alert alert-danger">请输入有效的邮箱地址!</div>';
} else {
// 保存到数据库
$ip = real_ip();
$user_agent = $_SERVER['HTTP_USER_AGENT'] ?? '';
$addtime = time();
$data = [
'name' => $name,
'email' => $email,
'phone' => $phone,
'company' => $company,
'type' => $type,
'message' => $message,
'ip' => $ip,
'user_agent' => $user_agent,
'addtime' => $addtime
];
global $DB;
$result = $DB->insert('cooperation', $data);
if($result) {
// 发送邮件通知管理员
$to = $conf['kfqq'] . '@qq.com'; // 管理员邮箱
$subject = "合作意向申请 - {$company}";
$email_body = "您有新的合作意向申请:\n\n";
$email_body .= "姓名:{$name}\n";
$email_body .= "邮箱:{$email}\n";
$email_body .= "电话:{$phone}\n";
$email_body .= "公司:{$company}\n";
$email_body .= "合作类型:{$type}\n";
$email_body .= "留言:\n{$message}\n";
$email_body .= "提交IP{$ip}\n";
$email_body .= "提交时间:" . date('Y-m-d H:i:s', $addtime) . "\n";
$headers = "From: {$email}\r\n";
$headers .= "Reply-To: {$email}\r\n";
$headers .= "X-Mailer: PHP/" . phpversion();
@mail($to, $subject, $email_body, $headers);
echo '<div class="alert alert-success">您的合作意向已成功提交!我们会尽快与您联系。</div>';
// 清空表单
$name = $email = $phone = $company = $message = $type = '';
} else {
echo '<div class="alert alert-danger">提交失败,请稍后重试或直接联系客服。</div>';
}
}
}
?>
<!-- Form -->
<form method="post" action="">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="name">联系人姓名 <span class="text-danger">*</span></label>
<input type="text" class="form-control" id="name" name="name" value="<?php echo isset($name) ? $name : ''; ?>" required>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="email">邮箱 <span class="text-danger">*</span></label>
<input type="email" class="form-control" id="email" name="email" value="<?php echo isset($email) ? $email : ''; ?>" required>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="phone">电话</label>
<input type="tel" class="form-control" id="phone" name="phone" value="<?php echo isset($phone) ? $phone : ''; ?>">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="company">公司名称</label>
<input type="text" class="form-control" id="company" name="company" value="<?php echo isset($company) ? $company : ''; ?>">
</div>
</div>
</div>
<div class="form-group">
<label for="type">合作类型</label>
<select class="form-control" id="type" name="type">
<option value="">请选择合作类型</option>
<option value="广告投放" <?php echo (isset($type) && $type == '广告投放') ? 'selected' : ''; ?>>广告投放</option>
<option value="渠道合作" <?php echo (isset($type) && $type == '渠道合作') ? 'selected' : ''; ?>>渠道合作</option>
<option value="技术合作" <?php echo (isset($type) && $type == '技术合作') ? 'selected' : ''; ?>>技术合作</option>
<option value="产品合作" <?php echo (isset($type) && $type == '产品合作') ? 'selected' : ''; ?>>产品合作</option>
<option value="其他合作" <?php echo (isset($type) && $type == '其他合作') ? 'selected' : ''; ?>>其他合作</option>
</select>
</div>
<div class="form-group">
<label for="message">合作意向说明 <span class="text-danger">*</span></label>
<textarea class="form-control" id="message" name="message" rows="6" required><?php echo isset($message) ? $message : ''; ?></textarea>
</div>
<div class="text-center">
<button type="submit" name="submit" class="btn btn-primary btn-lg">
<i class="fas fa-paper-plane mr-2"></i>提交合作意向
</button>
</div>
</form>
<div class="text-center mt-4">
<p class="text-muted">
<small>您也可以直接联系我们的客服:<br>
QQ<?php echo $conf['kfqq']?><br>
邮箱:<?php echo $conf['kfqq']?>@qq.com</small>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="position-relative" id="footer-main">
<div class="footer pt-lg-7 footer-dark bg-dark">
<!-- SVG shape -->
<div class="shape-container shape-line shape-position-top shape-orientation-inverse">
<svg width="2560px" height="100px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveaspectratio="none" x="0px" y="0px" viewbox="0 0 2560 100" style="enable-background:new 0 0 2560 100;" xml:space="preserve" class=" fill-section-secondary">
<polygon points="2560 0 2560 100 0 100"></polygon>
</svg>
</div>
<!-- Footer -->
<div class="container pt-4">
<div class="row">
<div class="col-lg-4 mb-5 mb-lg-0">
<!-- Theme's logo -->
<a href="/">
<img alt="Image placeholder" src="/template/index12/Core/Assets/Img/logo.png" id="footer-logo">
</a>
<!-- Webpixels' mission -->
<p class="mt-4 text-sm opacity-8 pr-lg-4">彩虹易支付免签约支付产品完美解决支付难题一站式接入支付宝微信财付通QQ钱包,微信wap帮助开发者快速集成到自己相应产品效率高见效快费率低</p>
<!-- Social -->
<ul class="nav mt-4">
<li class="nav-item">
<a class="nav-link pl-0" href="#" target="_blank">
<i class="fab fa-dribbble"></i>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" target="_blank">
<i class="fab fa-github"></i>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" target="_blank">
<i class="fab fa-instagram"></i>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" target="_blank">
<i class="fab fa-facebook"></i>
</a>
</li>
</ul>
</div>
<div class="col-lg-2 col-6 col-sm-4 ml-lg-auto mb-5 mb-lg-0">
<h6 class="heading mb-3">Link</h6>
<ul class="list-unstyled">
<li><a href="/doc.html">API开发文档</a></li>
<li><a href="/agreement.html">用户协议</a></li>
<li><a href="/template/index12/Template/index12/contact.php">联系我们</a></li>
</ul>
</div>
<div class="col-lg-2 col-6 col-sm-4 mb-5 mb-lg-0">
<h6 class="heading mb-3">About Us</h6>
<ul class="list-unstyled">
<li><a href="https://wpa.qq.com/msgrd?v=3&uin=<?php echo $conf['kfqq']?>&Site=pay&Menu=yes">在线客服</a></li>
<li><a href="https://wpa.qq.com/msgrd?v=3&uin=<?php echo $conf['kfqq']?>&Site=pay&Menu=yes">接口合作</a></li>
</ul>
</div>
<div class="col-lg-2 col-6 col-sm-4 mb-5 mb-lg-0">
<h6 class="heading mb-3">Contact Us</h6>
<ul class="list-unstyled">
<li><a >彩虹易支付</a></li>
<li><a >Email<?php echo $conf['kfqq']?>@qq.com</a></li>
<li><a href="https://wpa.qq.com/msgrd?v=3&uin=<?php echo $conf['kfqq']?>&Site=pay&Menu=yes">企业QQ<br><?php echo $conf['kfqq']?></a></li>
</ul>
</div>
</div><br>
<a class="mt-4 text-sm opacity-8 pr-lg-4" target="_blank">友情链接:</a>
<a class="mt-4 text-sm opacity-8 pr-lg-4" href="http://www.yonghengzy.cn/" target="_blank">永恒资源网</a>
<hr class="divider divider-fade divider-dark my-4">
<div class="row align-items-center justify-content-md-between pb-4">
<div class="col-md-6">
<div class="copyright text-sm font-weight-bold text-center text-md-left">
Copyright © 2016-2023 彩虹易支付 All rights reserved. 版权所有
</div>
</div>
<div class="col-md-6">
<ul class="nav justify-content-center justify-content-md-end mt-3 mt-md-0">
<li class="nav-item">
</li>
</ul>
</div>
</div>
</div>
</div>
</footer>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?214f77fa0e9b4af6d03f316b703f2560";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<!-- Core JS -->
<script src="/template/index12/Template/index12/static/js/jquery.min.js"></script>
<script src="/template/index12/Template/index12/static/js/bootstrap.bundle.min.js"></script>
<script src="/template/index12/Template/index12/static/js/svg-injector.min.js"></script>
<script src="/template/index12/Template/index12/static/js/feather.min.js"></script>
<!-- Quick JS -->
<script src="/template/index12/Template/index12/static/js/quick-website.js"></script>
<!-- Feather Icons -->
<script>
feather.replace({
'width': '1em',
'height': '1em'
})
</script>
<style>
.copyrights{text-indent:-9999px;height:0;line-height:0;font-size:0;overflow:hidden;}
</style>
</body>
</html>

View File

@ -1,9 +1,3 @@
<!--
本代码由 聚合支付 创建
技术支持 QQ:1692708252
严禁反编译、逆向等任何形式的侵权行为,违者将追究法律责任
-->
<!--查单说明开始-->
<?php
if(!defined('IN_CRONLITE'))exit();
?>
@ -120,7 +114,7 @@ if(!defined('IN_CRONLITE'))exit();
<a class="nav-link" href="/">首页</a>
</li>
<li class="nav-item ">
<a class="nav-link" target="_blank" href="https://wpa.qq.com/msgrd?v=3&uin=<?php echo $conf['kfqq']?>&Site=pay&Menu=yes">广告合作</a>
<a class="nav-link" target="_blank" href="/template/index12/Template/index12/cooperation.php">广告合作</a>
</li>
<li class="nav-item ">
<a class="nav-link" target="_blank" href="/doc.html">API开发文档</a>