You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1735 lines
73 KiB
1735 lines
73 KiB
<?php
|
|
// +----------------------------------------------------------------------
|
|
// | YFCMF [ WE CAN DO IT MORE SIMPLE ]
|
|
// +----------------------------------------------------------------------
|
|
// | Copyright (c) 2015-2016 http://www.rainfer.cn All rights reserved.
|
|
// +----------------------------------------------------------------------
|
|
// | Author: rainfer <81818832@qq.com>
|
|
// +----------------------------------------------------------------------
|
|
namespace app\home\controller;
|
|
|
|
use think\Db;
|
|
use think\Validate;
|
|
use think\Request;
|
|
use think\captcha\Captcha;
|
|
use app\cult4\model\Cult4apply;
|
|
use app\home\model\Cultureapply;
|
|
use app\capital\model\Capitaldetail;
|
|
use app\home\model\Bdapply;
|
|
class Index extends Base{
|
|
|
|
protected function test14(){
|
|
$users=Db::name("member_list")->field('member_list_id,verified,member_list_username,member_list_pwd,signature,member_list_nickname,member_list_tel,member_list_nickname2,member_list_tel2,member_list_tel3,member_list_groupid')->where(['member_list_groupid'=>7])->select();
|
|
$count=0;
|
|
foreach ($users as &$row){
|
|
$tels=array($row['member_list_tel'],$row['member_list_tel2'],$row['member_list_tel3']);
|
|
$where=[];
|
|
$where['member_list_groupid']=['neq',7];
|
|
$where['member_list_tel']=['in',$tels];
|
|
$check=Db::name("member_list")->field('member_list_id,verified,member_list_username,member_list_pwd,signature,member_list_nickname,member_list_tel,member_list_nickname2,member_list_tel2,member_list_tel3,member_list_groupid')->where($where)->find();
|
|
if($check){
|
|
$update=[];
|
|
$update['signature']=$row['signature'];
|
|
$update['verified']=1;
|
|
if($check['member_list_nickname']==$check['member_list_tel']&&$check['member_list_tel']==$row['member_list_tel']){
|
|
$update['member_list_nickname']=$row['member_list_nickname'];
|
|
}
|
|
Db::name("member_list")->where(['member_list_id'=>$check['member_list_id']])->update($update);
|
|
$count++;
|
|
dump($row);
|
|
dump($check);
|
|
echo "=================\n\r";
|
|
}
|
|
}
|
|
echo "count:"+$count;
|
|
}
|
|
protected function test13(){
|
|
|
|
|
|
$users=Db::name("member_list")->field('member_list_id,member_list_username,member_list_pwd,signature,member_list_nickname,member_list_tel,member_list_nickname2,member_list_tel2,member_list_tel3')->where(['member_list_groupid'=>7])->select();
|
|
|
|
$expTitle="会员平台用户列表";
|
|
$expCellName=[];
|
|
array_push($expCellName,['member_list_id','ID']);
|
|
array_push($expCellName,['member_list_username','账号']);
|
|
//array_push($expCellName,['member_list_pwd','密码']);
|
|
array_push($expCellName,['signature','公司名称']);
|
|
array_push($expCellName,['member_list_tel','法定代表人']);
|
|
array_push($expCellName,['member_list_nickname','名字']);
|
|
array_push($expCellName,['member_list_nickname2','授权人']);
|
|
array_push($expCellName,['member_list_tel2','授权人联系方式']);
|
|
array_push($expCellName,['member_list_tel3','授权人联系方式']);
|
|
|
|
$expTableData=$users;
|
|
$res=exportExcel($expTitle,$expCellName,$expTableData);
|
|
}
|
|
protected function test4(){
|
|
//$idlist=[299,298,329,323,331,330,385,264];
|
|
//$idlist=[1159,1147,1170,1162,1163,1157,1164,1165,1166,1167,1168,1169,1174,1152,1175,1172,1173,1181,1188,1196,1194];
|
|
//$idlist=[1069,1121,1133,1135,1136,1137,1144,1145,1146,1151,1158];
|
|
//$idlist=[245,246,248,250,1182,1183,1187,1178,1189,1191,1192,1193,1212,1214,1213,1206];
|
|
//$idlist=[253,257,254,256,265,258,260,247,255,261,262,267,1184,1185,1186,1209];
|
|
//$idlist=[1224,1225,1237];
|
|
$idlist=[1247,1252,1251,1256,1255,1258,1216,1217];
|
|
//$idlist=[1215,1218,1219,1240,1220,1223,1230,1232,1233,1234,1236,1238,1231,1241,1244];
|
|
$idlist=[1246,1248,1221,1235,1242,1261,1222,1267,1268,1265,1263,1275,1274,1279,1278,1280,1281,1287,1310,1257,1276,1282,1283,1286,1271,1288,1291];
|
|
$idlist=[1290,1296,1272,1273,1295,1293,1297,1362,1298,1299,1311,1312,1313,1321,1314,1315,1316,1260,1317,1245,1249,1285,1319,1320,1357,1358,1359,1362,1363,1364,1360];
|
|
asort($idlist);
|
|
foreach ($idlist as $aid){
|
|
$baseinfo=db('cult4baseinfo')->field('c_name,p_name,t_apply_username,code,apply_type')->where(['apply_id'=>$aid])->find();
|
|
$ctitle='企业公告';
|
|
if($baseinfo['apply_type']==1){
|
|
$baseinfo_name=$baseinfo['c_name'];
|
|
}elseif ($baseinfo['apply_type']==2){
|
|
$baseinfo_name=$baseinfo['p_name'];
|
|
$ctitle='项目公告';
|
|
}else{
|
|
$baseinfo_name=$baseinfo['t_apply_username'];
|
|
$ctitle='人才公告';
|
|
}
|
|
if($baseinfo_name){
|
|
$where=['n_title'=>['like','%'.$baseinfo_name.'%']];
|
|
if($baseinfo['code']){
|
|
$where['n_content']=['like','%'.$baseinfo['code'].'%'];
|
|
}
|
|
//插入到前台公告
|
|
$query=Db::name('bsgg')->where($where)->delete();
|
|
echo $query;
|
|
echo Db::name('bsgg')->getLastSql();echo "<br/>";
|
|
}
|
|
|
|
}
|
|
$query=Db::name('cult4apply')->where(['apply_id'=>['in',$idlist]])->delete();
|
|
echo $query;
|
|
echo Db::name('cult4apply')->getLastSql();echo "<br/>";
|
|
$query=Db::name('cult4baseinfo')->where(['apply_id'=>['in',$idlist]])->delete();
|
|
echo $query;
|
|
echo Db::name('cult4baseinfo')->getLastSql();echo "<br/>";
|
|
$query=Db::name('cult4check')->where(['apply_id'=>['in',$idlist]])->delete();
|
|
echo $query;
|
|
echo Db::name('cult4check')->getLastSql();echo "<br/>";
|
|
$query=Db::name('cult4checkboard')->where(['apply_id'=>['in',$idlist]])->delete();
|
|
echo $query;
|
|
echo Db::name('cult4checkboard')->getLastSql();echo "<br/>";
|
|
$query=Db::name('cult4checkdd')->where(['apply_id'=>['in',$idlist]])->delete();
|
|
echo $query;
|
|
echo Db::name('cult4checkdd')->getLastSql();echo "<br/>";
|
|
$query=Db::name('cult4checkfee')->where(['apply_id'=>['in',$idlist]])->delete();
|
|
echo $query;
|
|
echo Db::name('cult4checkfee')->getLastSql();echo "<br/>";
|
|
$query=Db::name('cult4checkjc')->where(['apply_id'=>['in',$idlist]])->delete();
|
|
echo $query;
|
|
echo Db::name('cult4checkjc')->getLastSql();echo "<br/>";
|
|
$query=Db::name('cult4checkmc')->where(['apply_id'=>['in',$idlist]])->delete();
|
|
echo $query;
|
|
echo Db::name('cult4checkmc')->getLastSql();echo "<br/>";
|
|
$query=Db::name('cult4checknm')->where(['apply_id'=>['in',$idlist]])->delete();
|
|
echo $query;
|
|
echo Db::name('cult4checknm')->getLastSql();echo "<br/>";
|
|
$query=Db::name('cult4checkpro')->where(['apply_id'=>['in',$idlist]])->delete();
|
|
echo $query;
|
|
echo Db::name('cult4checkpro')->getLastSql();echo "<br/>";
|
|
$query=Db::name('cult4checkreview')->where(['apply_id'=>['in',$idlist]])->delete();
|
|
echo $query;
|
|
echo Db::name('cult4checkreview')->getLastSql();echo "<br/>";
|
|
$query=Db::name('cult4checkrisk')->where(['apply_id'=>['in',$idlist]])->delete();
|
|
echo $query;
|
|
echo Db::name('cult4checkrisk')->getLastSql();echo "<br/>";
|
|
$query=Db::name('cult4fee')->where(['apply_id'=>['in',$idlist]])->delete();
|
|
echo $query;
|
|
echo Db::name('cult4fee')->getLastSql();echo "<br/>";
|
|
$query=Db::name('cult4notice')->where(['apply_id'=>['in',$idlist]])->delete();
|
|
echo $query;
|
|
echo Db::name('cult4notice')->getLastSql();echo "<br/>";
|
|
$query=Db::name('cult4proassign')->where(['apply_id'=>['in',$idlist]])->delete();
|
|
echo $query;
|
|
echo Db::name('cult4proassign')->getLastSql();echo "<br/>";
|
|
$query=Db::name('cult4upfiles')->where(['apply_id'=>['in',$idlist]])->delete();
|
|
echo $query;
|
|
echo Db::name('cult4upfiles')->getLastSql();echo "<br/>";
|
|
}
|
|
public function createnotice(){
|
|
$datas=Db::name('finance')->field('c_id,c_year,c_class,c_parent,c_gptime,c_num,c_size,c_price,c_content,c_name')->where('capital_desc is null and c_kind=11')->select();
|
|
|
|
foreach ($datas as $row){
|
|
$sfields=[];
|
|
$captype='';
|
|
$cparent=$row['c_parent'];
|
|
$parents=[1=>5,15,35,45,55];
|
|
|
|
if($cparent){
|
|
$cparent=explode(',', $cparent);
|
|
foreach ($cparent as $cp){
|
|
if(in_array($cp,[1,2,3,4,5])){
|
|
$captype=isset($parents[$cp])?$parents[$cp]:'';
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
array_push($sfields,['资产是否存在抵押情况','']);
|
|
array_push($sfields,['托管方报价',$row['c_price']]);
|
|
$year=intval($row['c_year']);
|
|
$cclass=intval($row['c_class']);
|
|
$years=['1'=>'明朝','清朝','民国','其它'];
|
|
$classs=[1=>'徽派','晋派','京派','苏派','闽派 ','川派','岭南派','赣派','其他'];
|
|
if(isset($years[$year])){
|
|
$year=$years[$year];
|
|
}
|
|
if(isset($classs[$cclass])){
|
|
$cclass=$classs[$cclass];
|
|
}
|
|
if($captype==5){
|
|
array_push($sfields,['资产等级','']);
|
|
array_push($sfields,['构件数量',$row['c_num']]);
|
|
array_push($sfields,['古建资产年代',$year]);
|
|
array_push($sfields,['建筑材质','']);
|
|
array_push($sfields,['建筑规格','']);
|
|
array_push($sfields,['古建资产风格',$cclass]);
|
|
array_push($sfields,['古建资产面积',$row['c_size']]);
|
|
}
|
|
if($captype==15){
|
|
array_push($sfields,['土地性质','']);
|
|
array_push($sfields,['古建资产面积',$row['c_size']]);
|
|
array_push($sfields,['现存古村/古镇现状','']);
|
|
array_push($sfields,['古建数量',$row['c_num']]);
|
|
}
|
|
if($captype==35){
|
|
array_push($sfields,['构件数量',$row['c_num']]);
|
|
array_push($sfields,['构件类型','']);
|
|
array_push($sfields,['古建资产年代',$year]);
|
|
array_push($sfields,['构件材质','']);
|
|
array_push($sfields,['构件规格','']);
|
|
}
|
|
if($captype==45){
|
|
array_push($sfields,['土地性质','']);
|
|
array_push($sfields,['古建资产面积',$row['c_size'].'平方米']);
|
|
array_push($sfields,['房屋数量',$row['c_num']]);
|
|
array_push($sfields,['园区配套设施','']);
|
|
array_push($sfields,['园区业态分布','']);
|
|
array_push($sfields,['房屋详细情况','']);
|
|
}
|
|
|
|
if($captype==55){
|
|
array_push($sfields,['地理位置','']);
|
|
array_push($sfields,['古建资产面积',$row['c_size']]);
|
|
array_push($sfields,['古建资产年代',$year]);
|
|
array_push($sfields,['建筑材质','']);
|
|
array_push($sfields,['建筑规格','']);
|
|
array_push($sfields,['古建资产风格',$cclass]);
|
|
}
|
|
if(empty($captype)){
|
|
array_push($sfields,['','']);
|
|
array_push($sfields,['','']);
|
|
array_push($sfields,['','']);
|
|
array_push($sfields,['','']);
|
|
array_push($sfields,['','']);
|
|
}
|
|
|
|
$capdate=$row['c_gptime']?date("Y-m-d",$row['c_gptime']):'';
|
|
array_push($sfields,['托管日期(一年有效期)',$capdate]);
|
|
|
|
$ccontent='<table align="center" width="100%" border="0" cellspacing="1" cellpadding="0" style="line-height:36px;background:#dcdcdc;font-size:16px;">
|
|
<tbody><tr><td colspan="4" style="line-height:36px;background:rgba(240,240,240,1);color:#707070;" align="center"><strong>资产简介</strong></td></tr>
|
|
<tr><td colspan="4" style="line-height:36px;background:rgba(240,240,240,1);background:#fff;padding:15px 25px;color:#707070;" >'.$row['c_content'].'</td></tr>';
|
|
$html='';
|
|
if(count($sfields)){
|
|
$temp=[];
|
|
$str1=$str2='';
|
|
foreach ($sfields as $k=>$field){
|
|
if(count($temp)==4){
|
|
$ccontent.='<tr>'.$str1.'</tr><tr>'.$str2.'</tr>';
|
|
$str1=$str2='';
|
|
$temp=[];
|
|
}
|
|
$str1.='<td style="line-height:36px;background:rgba(240,240,240,1);color:#707070;width:25%;" align="center"><strong>'.$field[0].'</strong></td>';
|
|
$str2.='<td style="line-height:26px;background:#fff;color:#a0a0a0;padding:5px 10px;width:25%;" align="center">'.$field[1].'</td>';
|
|
array_push($temp,$field);
|
|
}
|
|
if(count($temp)){
|
|
$str1=$str2='';
|
|
foreach ($temp as $k=>$field){
|
|
$str1.='<td style="line-height:36px;background:rgba(240,240,240,1);color:#707070;width:25%;" align="center"><strong>'.$field[0].'</strong></td>';
|
|
$str2.='<td style="line-height:26px;background:#fff;color:#a0a0a0;padding:5px 10px;width:25%;" align="center">'.$field[1].'</td>';
|
|
}
|
|
|
|
for($i=1;$i<=(4-count($temp));$i++){
|
|
$str1.='<td style="line-height:36px;background:rgba(240,240,240,1);color:#707070;width:25%;" align="center"> </td>';
|
|
$str2.='<td style="line-height:26px;background:#fff;color:#a0a0a0;padding:5px 10px;width:25%;" align="center"> </td>';
|
|
}
|
|
$ccontent.='<tr>'.$str1.'</tr><tr>'.$str2.'</tr>';
|
|
}
|
|
}
|
|
|
|
$ccontent.='<tr><td colspan="4" style="line-height:36px;background:rgba(240,240,240,1);color:#707070;" align="center"><strong>其他披露信息</strong></td></tr>
|
|
<tr>
|
|
<td colspan="4" style="line-height:36px;background:rgba(240,240,240,1);background:#fff;padding:15px 25px;color:#707070;" >--</td>
|
|
</tr></tbody></table><br/><br/>';
|
|
$ccontent.='<table align="center" width="100%" border="0" cellspacing="1" cellpadding="0" style="line-height:36px;background:#dcdcdc;font-size:16px;"><tbody><tr><td colspan="2" style="line-height:36px;background:rgba(240,240,240,1);color:#707070;" align="center"><strong>托管方简况</strong></td></tr>
|
|
<tr><td style="line-height:36px;background:#fff;color:#a0a0a0;width:440px" align="center"> 托管方名称 </td>
|
|
<td style="line-height:36px;background:#fff;color:#a0a0a0;padding:0px 10px;">'.$row['c_name'].'</td>
|
|
</tr>
|
|
<tr><td style="line-height:36px;background:#fff;color:#a0a0a0;width:440px" align="center"> 注册地(住所) </td>
|
|
<td style="line-height:36px;background:#fff;color:#a0a0a0;padding:0px 10px;">--</td>
|
|
</tr>
|
|
<tr><td style="line-height:36px;background:#fff;color:#a0a0a0;width:440px" align="center"> 公司类型(经济性质) </td>
|
|
<td style="line-height:36px;background:#fff;color:#a0a0a0;padding:0px 10px;">--</td>
|
|
</tr>
|
|
<tr><td style="line-height:24px;padding:10px 25px;background:#fff;color:#a0a0a0;width:390px" align="center"> 审计报告和评估报告中的保留意见、重要揭示、<br/> 特别事项说明中涉及托管标的提示提醒等内容 </td>
|
|
<td style="line-height:36px;background:#fff;color:#a0a0a0;padding:0px 10px;">--</td>
|
|
</tr></tbody></table><br/><br/>';
|
|
$ccontent.='<table align="center" width="100%" border="0" cellspacing="1" cellpadding="0" style="line-height:36px;background:#dcdcdc;font-size:16px;"><tbody><tr><td style="line-height:36px;background:rgba(240,240,240,1);color:#707070;" align="center"><strong>中国古建资产交易平台托管方承诺</strong></td></tr><tr class="firstRow">
|
|
<td style="padding:20px 15px;background:#fff;color:#a0a0a0;">本公司/本人自愿将持有的古建资产托管于深圳文化产权交易所古建资产管理中心中国古建资产托管交易平台,现就标的资产相关事宜作如下承诺:<br/>1、本次托管资产不存在任何权属纠纷,不存在质押、抵押、其他担保或第三方权益或限制情形,亦不存在法院或其他有权机关冻结、查封、拍卖之情形。托管资产交付或者转移不存在法律障碍。<br/>
|
|
2、本公司/本人向贵所提供的文件、证件及有关附件材料真实、合法、有效,复印文本与原件一致,并对因提交虚假文件、证件所引发的一切后果承担相应的法律责任。<br/>本公司/本人保证遵守以上承诺,如违反上述承诺或有违规行为,给深圳文化产权交易所或交易相关方造成损失的,愿意承担法律责任及相应的经济赔偿责任。<br/></td></tr></tbody></table><br/><br/>';
|
|
$ccontent.='<table align="center" width="100%" border="0" cellspacing="1" cellpadding="0" style="line-height:36px;background:#dcdcdc;font-size:16px;"><tbody><tr><td colspan="3" style="line-height:36px;background:rgba(240,240,240,1);color:#707070;" align="center"><strong>交易条件与受让方资格条件</strong></td></tr>
|
|
<tr class="firstRow"><td valign="middle" style="width:300px;background:#fff;color:#a0a0a0;" rowspan="2" align="center">交易条件</td><td style="width:300px;line-height:36px;background:#fff;color:#a0a0a0;" rowspan="1" align="center" valign="middle">交易价款支付方式</td><td valign="middle" style="line-height:36px;color:#8a8888;background:#fff;padding-left:10px;" align="left">一次性支付</td>
|
|
</tr><tr><td valign="middle" rowspan="1" style="width:300px;line-height:36px;background:#fff;color:#a0a0a0;" align="center">受让方资格条件</td>
|
|
<td valign="middle" style="line-height:36px;color:#8a8888;background:#fff;padding:0px 10px;" align="left">1、意向受让方应为依法设立并有效存续的企业法人、其他经济组织或自然人。<br>2、意向受让方具有良好的商业信用。<br>3、意向受让方应具有良好的财务状况和支付能力。<br>4、意向受让方向深圳文化产权交易所提供的文件、证件及有关附件材料真实、合法、有效,复印文本与原件一致。<br>5、符合国家法律、行政法规规定的其他条件。</td></tr></tbody></table><br/><br/>';
|
|
$ccontent.='<table align="center" width="100%" border="0" cellspacing="1" cellpadding="0" style="line-height:36px;background:#dcdcdc;font-size:16px;"><tbody><tr><td colspan="2" style="line-height:36px;background:rgba(240,240,240,1);color:#707070;" align="center"><strong>受托机构</strong></td></tr><tr class="firstRow">
|
|
<td valign="top" style="width:300px;line-height:36px;background:#fff;color:#a0a0a0;" align="center">受托机构名称</td><td valign="middle" style="line-height:36px;background:#fff;color:#a0a0a0;padding-left:10px;" align="center">深圳文化产权交易所有限公司</td></tr><tr>
|
|
<td valign="top" style="width:300px;line-height:36px;color:#a0a0a0;background:#fff;" align="center">联系电话</td><td valign="middle" style="line-height:36px;background:#fff;color:#a0a0a0;padding-left:10px;" align="center">0755—88266839</td></tr></tbody></table>';
|
|
|
|
Db::name('finance')->where(['c_id'=>$row['c_id']])->update(['task'=>1,'capital_desc'=>$ccontent]);
|
|
|
|
}
|
|
}
|
|
public function yibanpai(){
|
|
return $this->fetch(':yibanpai');
|
|
}
|
|
public function index()
|
|
{
|
|
|
|
//首页轮播
|
|
$home_slides=Db::name('link')->where(['lk_cid'=>16,'lk_status'=>1])->order('lk_order')->select();
|
|
$this->assign("home_slides",$home_slides);
|
|
|
|
$home_slides_json=json_encode($home_slides);
|
|
$this->assign("home_slides_json",$home_slides_json);
|
|
//荣誉墙
|
|
$home_ryq=Db::name('link')->where(['lk_cid'=>10,'lk_status'=>1])->order('lk_order')->select();
|
|
$this->assign("home_ryq",$home_ryq);
|
|
|
|
$home_ryq_json=json_encode($home_ryq);
|
|
$this->assign("home_ryq_json",$home_ryq_json);
|
|
|
|
|
|
$this->assign("login",input("login"));
|
|
|
|
$whole =input('name','');
|
|
$this->assign("name",$whole);
|
|
|
|
$hscount=0;
|
|
$gy_list= array();
|
|
if($whole){
|
|
//国有项目数据
|
|
$gy_list=Db::name('gyxm')->where(['c_status'=>1])->where('c_name|c_code','like','%'.$whole.'%')->order('c_time desc')->select();
|
|
}
|
|
$this->assign("gy_list",$gy_list);
|
|
$count=0;
|
|
if(count($gy_list)){
|
|
$count=count($gy_list)>5?6:count($gy_list);
|
|
}
|
|
$this->assign("gy_list_count",$count);
|
|
|
|
$show1=$this->getShowList(1);
|
|
|
|
$this->assign('show1',$show1);
|
|
|
|
$showtg=[64=>'音乐资产托管'];
|
|
$this->assign('showtg',$showtg);
|
|
$show2=$this->getShowList(2);
|
|
$this->assign('show2',$show2);
|
|
|
|
$show1_json=json_encode($show1);
|
|
$this->assign("show1_json",$show1_json);
|
|
$show2_json=json_encode($show2);
|
|
$this->assign("show2_json",$show2_json);
|
|
|
|
$where=['n_kind'=>17,'n_status'=>1];
|
|
$list=Db::name('news')->field('n_id as c_id,n_title as c_name,n_img as c_logo,n_kind as c_kind')->where($where)->order('n_order desc,n_time desc')->limit(50)->select();
|
|
|
|
foreach ($list as $k=>$item){
|
|
$list[$k]['c_jump']=url('news/artist',['c_id'=>$item['c_id']]);
|
|
}
|
|
$show16_json=json_encode([1=>$list]);
|
|
$this->assign("show16_json",$show16_json);
|
|
$show3=$this->getShowList(3);
|
|
$this->assign('show3',$show3);
|
|
|
|
//$types=config('tuoguan.parents');
|
|
$types=[
|
|
11=>'古陶瓷专区',
|
|
7=>'邢东艺术专区',
|
|
10=>'蓝图胜艺术专区',
|
|
9=>'宝安收藏家专区',
|
|
18=>'河南自贸区专区',
|
|
8=>'演员艺术创作和收藏专区',
|
|
12=>'古典艺术',
|
|
13=>'近现代艺术',
|
|
14=>'当代艺术',
|
|
15=>'工艺美术',
|
|
19=>'蓝宝石托管专区',
|
|
];
|
|
$maps=[];
|
|
$show4=$this->getShowList(4);
|
|
$maps[1]=$show4;
|
|
foreach ($types as $key=>$type){
|
|
$show4=$this->getShowList(4,$key);
|
|
$maps[$key]=$show4;
|
|
}
|
|
$this->assign('showtypes',$types);
|
|
|
|
$showtypes_json=json_encode($types);
|
|
$this->assign("showtypes_json",$showtypes_json);
|
|
$show4_json=json_encode($maps);
|
|
$this->assign("show4_json",$show4_json);
|
|
|
|
$cates=[1=>'A担保回购式','B撮合回购式','C登记备案式'];
|
|
$this->assign('showcates',$cates);
|
|
|
|
$show9=$this->getShowList(9);
|
|
$show9_json=json_encode($show9);
|
|
$this->assign("show9_json",$show9_json);
|
|
|
|
$show12=$this->getShowList(12);
|
|
$show12_json=json_encode([1=>$show12]);
|
|
$this->assign("show12_json",$show12_json);
|
|
|
|
//$show6=$this->getShowList(6);
|
|
//$this->assign('show6',$show6);
|
|
|
|
//$show7=$this->getShowList(7);
|
|
//$this->assign('show7',$show7);
|
|
|
|
//$show8=$this->getShowList(8);
|
|
//$this->assign('show8',$show8);
|
|
|
|
|
|
$show10=$this->getShowList([15]);
|
|
$maps=[];
|
|
$maps[0]=$show10;
|
|
$childs=array(1=>'德化专区','金溪专区','普宁专区');
|
|
|
|
foreach ($childs as $key=>$type){
|
|
$show10=$this->getShowList(15,$key);
|
|
$maps[$key]=$show10;
|
|
}
|
|
|
|
$show15_json=json_encode($maps);
|
|
$this->assign("show15_json",$show15_json);
|
|
|
|
$gjchilds_json=json_encode($childs);
|
|
$this->assign("gjchilds_json",$gjchilds_json);
|
|
|
|
$show13=$this->getShowList(13);
|
|
$this->assign('show13',$show13);
|
|
$show14=$this->getShowList(14);
|
|
$this->assign('show14',$show14);
|
|
|
|
|
|
|
|
$where=['c_status'=>1];
|
|
$list=Db::name('bigdata')->field('c_id,c_name,c_price,c_code,c_gptime,c_pay,c_seller,c_url as c_jump')->where($where)->order('c_gptime desc,c_order desc')->limit(100)->select();
|
|
$big_json=json_encode(array(0=>$list));
|
|
$this->assign('big_json',$big_json);
|
|
|
|
//本所新闻
|
|
$home_news=Db::name('bsyw')->field('n_id,n_title,n_cid,n_time,n_top')->where(['n_status'=>1,'n_cid'=>['in',[1,3]]])->order('n_top desc,n_order asc,n_time desc')->limit(7)->select();
|
|
|
|
$home_news_json=json_encode($home_news);
|
|
$this->assign("home_news_json",$home_news_json);
|
|
//本所新闻最新一条数据
|
|
$news=[];
|
|
if(count($home_news)){
|
|
$news=array_shift($home_news);
|
|
}
|
|
$this->assign("home_news",$home_news);
|
|
$this->assign("home_news_not",$news);
|
|
//本所公告
|
|
$home_ggs=Db::name('bsgg')->field('a.n_id,a.n_title,a.n_cid,a.n_time,a.n_top')->alias('a')->join(config('database.prefix').'type b','a.n_cid=b.type_id')->where(['n_status'=>1,'type_type'=>11])->order('n_top desc,n_order asc,n_time desc')->limit(7)->select();
|
|
|
|
$home_ggs_json=json_encode($home_ggs);
|
|
$this->assign("home_ggs_json",$home_ggs_json);
|
|
|
|
//政策
|
|
$home_bszc=Db::name('bszc')->field('a.n_id,a.n_title,a.n_cid,a.n_time')->alias('a')->join(config('database.prefix').'type b','a.n_cid=b.type_id')->where(['n_status'=>1,'type_type'=>21])->order('n_order,n_time desc')->limit(7)->select();
|
|
|
|
$home_bszc_json=json_encode($home_bszc);
|
|
$this->assign("home_bszc_json",$home_bszc_json);
|
|
//本所公告最新一条数据
|
|
$notice=[];
|
|
if(count($home_ggs)){
|
|
$notice=array_shift($home_ggs);
|
|
}
|
|
$this->assign("home_ggs",$home_ggs);
|
|
$this->assign("home_ggs_not",$notice);
|
|
|
|
//融资快讯
|
|
$home_rzkx=Db::name('sczcxy')->field('a.n_id,a.n_title,a.n_cid,a.n_time,a.n_top')->alias('a')->join(config('database.prefix').'type b','a.n_cid=b.type_id')->where(['n_status'=>1,'type_type'=>30,'a.n_cid'=>2])->order('n_order,n_time desc')->limit(7)->select();
|
|
|
|
$home_rzkx_json=json_encode($home_rzkx);
|
|
$this->assign("home_rzkx_json",$home_rzkx_json);
|
|
|
|
//融资快讯最新数据第一条
|
|
$rzkx=[];
|
|
if(count($home_rzkx)){
|
|
$rzkx=array_shift($home_rzkx);
|
|
}
|
|
$this->assign("home_rzkx",$home_rzkx);
|
|
$this->assign("home_rzkx_not",$rzkx);
|
|
|
|
//业务导航
|
|
//$this->getLinks(11);
|
|
//功能导航
|
|
//$this->getPages(2);
|
|
//文化金服导航
|
|
//$this->getPages(1);
|
|
//国有业务导航
|
|
//$this->getLinks(14);
|
|
$where=[];
|
|
$where['type_type']=14;
|
|
$where['type_id']=17;
|
|
$links=Db::name('link')->alias('a')
|
|
->join(config('database.prefix').'type b','a.lk_cid=b.type_id')
|
|
->where($where)->order('lk_order desc,lk_time desc')->select();
|
|
$this->assign('weipantong',$links);
|
|
$big_data_arr=Db::name('bigdata')->field('c_id,c_name,c_code,c_gptime,c_logo,c_seller,c_url as c_jump')->where(array('c_hot' => 1,'c_status' => 1))->order('c_gptime desc,c_order desc')->limit(40)->select();
|
|
$big_data_json=json_encode(array(0=>$big_data_arr));
|
|
$this->assign('big_data_json',$big_data_json);
|
|
$xczq_data_arr=Db::name('menu')->field('id,menu_name,menu_address')->where(' parentid = 305 and id in (315,316) and menu_open = 1')->select();
|
|
$this->assign('xczq_data_json',json_encode($xczq_data_arr));
|
|
$szxct_data_arr=Db::name('video')->field('vd_id,vd_img,vd_video')->where("vd_name = '关于深圳文化产权交易所' and vd_status = 1")->order('vd_order asc')->find();
|
|
$this->assign('szxct_data_json',json_encode($szxct_data_arr));
|
|
$cateRes = Db::name('menu')->field('menu_name,menu_address')->where(array('parentid' => 19,'menu_open' => 1))->order('listorder ASC')->select();
|
|
$this->assign('vd_class_json',json_encode($cateRes));
|
|
// $zqjs_data_arr=Db::name('video')->alias('a')
|
|
// ->join(config('database.prefix').'type b','a.vd_cid=b.type_id')
|
|
// ->field('vd_id,vd_img,vd_video')
|
|
// ->where('type_type=16 and vd_status=1 and type_id=9')->order('vd_id desc')->select();
|
|
// $this->assign('zqjs_data_json',json_encode($zqjs_data_arr));
|
|
// $hyjs_data_arr=Db::name('video')->alias('a')
|
|
// ->join(config('database.prefix').'type b','a.vd_cid=b.type_id')
|
|
// ->field('vd_id,vd_img,vd_video')
|
|
// ->where('type_type=16 and vd_status=1 and type_id=10')->order('vd_id desc')->select();
|
|
// $this->assign('hyjs_data_json',json_encode($hyjs_data_arr));
|
|
// $rddt_data_arr=Db::name('video')->alias('a')
|
|
// ->join(config('database.prefix').'type b','a.vd_cid=b.type_id')
|
|
// ->field('vd_id,vd_img,vd_video')
|
|
// ->where('type_type=16 and vd_status=1 and type_id=11')->order('vd_id desc')->select();
|
|
// $this->assign('rddt_data_json',json_encode($rddt_data_arr));
|
|
// $hdhg_data_arr=Db::name('video')->alias('a')
|
|
// ->join(config('database.prefix').'type b','a.vd_cid=b.type_id')
|
|
// ->field('vd_id,vd_img,vd_video')
|
|
// ->where('type_type=16 and vd_status=1 and type_id=12')->order('vd_id desc')->select();
|
|
// $this->assign('hdhg_data_arr',json_encode($hdhg_data_arr));
|
|
return $this->view->fetch(':newindex');
|
|
}
|
|
public function buildapply(){
|
|
if(request()->isPost()){
|
|
$data=input("post.");
|
|
$rule=[
|
|
'__token__'=>'token'
|
|
];
|
|
$msg=[
|
|
'__token__'=>'令牌验证失败'
|
|
];
|
|
$validate = new Validate($rule,$msg);
|
|
$result = $validate->check($data);
|
|
if(!$result){
|
|
$this->error('令牌验证失败',url("buildapply"));
|
|
}
|
|
|
|
$error='';
|
|
$username=$data['username'];
|
|
$mobile=$data['mobile'];
|
|
$weixin=$data['weixin'];
|
|
$email=$data['email'];
|
|
$province=$data['province'];
|
|
$city=$data['city'];
|
|
$town=$data['town'];
|
|
$address=$data['address'];
|
|
$orgname=$data['orgname'];
|
|
$belong=$data['belong'];
|
|
$belongother=$data['belongother'];
|
|
$material=isset($data['material'])?$data['material']:[];
|
|
$materialother=$data['materialother'];
|
|
$area=$data['area'];
|
|
$style=isset($data['style'])?$data['style']:[];
|
|
$buildage=$data['buildage'];
|
|
$buildstyle=$data['buildstyle'];
|
|
$evaluation=$data['evaluation'];
|
|
$tgservice=isset($data['tgservice'])?$data['tgservice']:[];
|
|
$mgservice=isset($data['mgservice'])?$data['mgservice']:[];
|
|
$tfservice=isset($data['tfservice'])?$data['tfservice']:[];
|
|
$useservice=isset($data['useservice'])?$data['useservice']:[];
|
|
$opservice=isset($data['opservice'])?$data['opservice']:'';
|
|
$opother=$data['opother'];
|
|
|
|
$closepic=isset($data['closepic'])&&$data['closepic']?$data['closepic']:[];
|
|
$visionpic=isset($data['visionpic'])&&$data['visionpic']?$data['visionpic']:[];
|
|
$allpic=isset($data['allpic'])&&$data['allpic']?$data['allpic']:[];
|
|
$planepic=isset($data['planepic'])&&$data['planepic']?$data['planepic']:[];
|
|
if(empty($username))$error='姓名必填';
|
|
if(empty($mobile))$error='手机必填';
|
|
if(empty($weixin))$error='微信必填';
|
|
if(empty($email))$error='邮箱必填';
|
|
if(empty($province))$error='省份必填';
|
|
if(empty($city))$error='城市必填';
|
|
if(empty($town))$error='区必填';
|
|
if(empty($orgname))$error='所有人必填';
|
|
if(empty($belong))$error='产权情况选';
|
|
if($belong==7&&empty($belongother))$error='其他产权情况必填';
|
|
if(count($material)==0)$error='建筑材质必选';
|
|
if(in_array(7, $material)&&empty($materialother))$error='其他建筑材质必填';
|
|
if(empty($area))$error='面积必填';
|
|
if(count($style)==0)$error='类型必选';
|
|
if(empty($buildage))$error='建筑年代必填';
|
|
if(empty($buildstyle))$error='建筑风格必填';
|
|
if($opservice==7&&empty($opother))$error='业务合作必填';
|
|
if(!empty($error))$this->error($error);
|
|
$row=array();
|
|
$row['create_time']=time();
|
|
$row['username']=$username;
|
|
$row['mobile']=$mobile;
|
|
$row['province']=$province;
|
|
$row['city']=$city;
|
|
$row['town']=$town;
|
|
$row['address']=$address;
|
|
$row['weixin']=$weixin;
|
|
$row['email']=$email;
|
|
$row['orgname']=$orgname;
|
|
$row['belong']=$belong;
|
|
if($row['belong']==7)$row['belongother']=$belongother;
|
|
$row['material']=implode(',',$material);
|
|
if($row['material']==7)$row['materialother']=$materialother;
|
|
$row['area']=$area;
|
|
$row['style']=json_encode($style);
|
|
$row['buildage']=$buildage;
|
|
$row['buildstyle']=$buildstyle;
|
|
$row['evaluation']=$evaluation;
|
|
$row['closepic']=$closepic;
|
|
$row['visionpic']=$visionpic;
|
|
$row['allpic']=$allpic;
|
|
$row['planepic']=$planepic;
|
|
$row['tgservice']=implode(',',$tgservice);
|
|
$row['mgservice']=implode(',',$mgservice);
|
|
$row['tfservice']=implode(',',$tfservice);
|
|
$row['useservice']=implode(',',$useservice);
|
|
$row['opservice']=$opservice;
|
|
if($row['opservice']==7)$row['opother']=$opother;
|
|
|
|
$query=Db::name('buildapply')->insert($row);
|
|
if(!$query){
|
|
$this->error('提交失败');
|
|
}else{
|
|
$this->success('提交成功');
|
|
}
|
|
}else{
|
|
$province=Db::name('Region')->field('id,name')->where(['type'=>1])->order('id asc')->select();
|
|
$city=Db::name('Region')->field('id,pid,name')->where(['type'=>2])->order('id asc')->select();
|
|
$town=Db::name('Region')->field('id,pid,name')->where(['type'=>3])->order('id asc')->select();
|
|
|
|
foreach ($city as $k=>$row){
|
|
$row['towns']=[];
|
|
$pid=$row['id'];
|
|
foreach ($town as $item){
|
|
if($item['pid']==$pid){
|
|
array_push($row['towns'], $item);
|
|
}
|
|
}
|
|
$city[$k]=$row;
|
|
}
|
|
|
|
$regions=[];
|
|
foreach ($province as $k=>$item){
|
|
$id=$item['id'];
|
|
$regions[$id]=[];
|
|
}
|
|
foreach ($city as $row){
|
|
$pid=$row['pid'];
|
|
array_push($regions[$pid], $row);
|
|
}
|
|
$this->assign('regions',$regions);
|
|
$this->assign('province',$province);
|
|
|
|
|
|
$appId='wxd01a3ce9b62eda90';
|
|
$appSecret='a194a96bb9144cbb29c3a74635dd936c';
|
|
|
|
$jssdk=new \weixin\Jssdk($appId, $appSecret);
|
|
$signPackage = $jssdk->GetSignPackage();
|
|
$this->assign('signPackage',$signPackage);
|
|
|
|
$title='中国古建资产管理计划诉求登记申报表';
|
|
$img='http://www.szcaee.cn/app/home/view/szwjs/index/Public/Img/slogo.png';
|
|
$link=url('buildapply',[],false,true);
|
|
$share=array();
|
|
$share['title']=$title;
|
|
$share['desc']=$title;
|
|
$share['link']=$link;
|
|
$share['imgUrl']=$img;
|
|
$this->assign('share',$share);
|
|
$this->assign('title',$title);
|
|
return $this->view->fetch('buildapply');
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 申请表
|
|
* @return string
|
|
*/
|
|
public function apply(){
|
|
$cid=input('cid',1,'intval');
|
|
if(!in_array($cid,[1,2]))$cid=1;
|
|
|
|
if(request()->isPost()){
|
|
$data=input("post.");
|
|
$rule=[
|
|
'__token__'=>'token'
|
|
];
|
|
$msg=[
|
|
'__token__'=>'令牌验证失败'
|
|
];
|
|
$validate = new Validate($rule,$msg);
|
|
$result = $validate->check($data);
|
|
if(!$result){
|
|
$this->error('令牌验证失败',url("apply",['cid'=>$cid]));
|
|
}
|
|
$org_name=input('post.orgname','');
|
|
$org_code=input('post.orgcode','');
|
|
$address=input('post.address','');
|
|
$credcard=input('post.credcard','');
|
|
$credfile=input('post.credfile','');
|
|
$mobile=input('post.mobile','');
|
|
$telphone=input('post.telphone','');
|
|
$openacc=input('post.openacc',1);
|
|
$quota=input('post.quota','');
|
|
$promise=input('post.promise',0,'intval');
|
|
$experience=input('post.experience','');
|
|
$direction=input('post.direction','');
|
|
$avatar=input('post.avatar','');
|
|
$cred_type=input('post.cred_type','','intval');
|
|
$username=input('post.legal','');
|
|
$contact=input('post.contact','');
|
|
$join_year=input('post.join_year',0,'intval');
|
|
$org_poster=input('post.org_poster','');
|
|
$error='';
|
|
if($cid==1){
|
|
if(empty($org_name))$error='机构名称必填';
|
|
if(empty($org_code))$error='机构信用代码必填';
|
|
if(empty($address))$error='机构联系地址必填';
|
|
if(empty($org_poster))$error='营业执照必须上传';
|
|
if(empty($username))$error='法人姓名必填';
|
|
if(empty($credcard))$error='法人身份证号码必填';
|
|
if(empty($credfile))$error='法人身份证照片必须上传';
|
|
if(empty($contact))$error='联系人必填';
|
|
if(empty($mobile))$error='手机号码必填';
|
|
}else{
|
|
$username=input('post.username','');
|
|
if(empty($username))$error='姓名必填必填';
|
|
if(empty($avatar))$error='个人照片必须上传';
|
|
if(empty($cred_type))$error='证件类型必选';
|
|
if(empty($credcard))$error='证件号码号码必填';
|
|
if(empty($address))$error='联系地址必填';
|
|
if(empty($mobile))$error='手机号码必填';
|
|
if(empty($join_year))$error='艺术品投资年限必填';
|
|
}
|
|
if(!empty($error))$this->error($error);
|
|
|
|
$data=array();
|
|
$data['username']=$username;
|
|
$data['address']=$address;
|
|
$data['cred_num']=$credcard;
|
|
$data['cred_poster']=$credfile;
|
|
$data['mobile']=$mobile;
|
|
$data['telphone']=$telphone;
|
|
$data['open_acc']=$openacc;
|
|
$data['quota']=$quota;
|
|
$data['is_agress']=$promise;
|
|
$data['cid']=$cid;
|
|
$data['create_time']=time();
|
|
$data['experience']=$experience;
|
|
$data['direction']=$direction;
|
|
if($cid==1){
|
|
$data['contact']=$contact;
|
|
$data['org_name']=$org_name;
|
|
$data['org_code']=$org_code;
|
|
$data['org_poster']=$org_poster;
|
|
$data['username']=$username;
|
|
}else{
|
|
$data['join_year']=$join_year;
|
|
$data['avatar']=$avatar;
|
|
$data['cred_type']=$cred_type;
|
|
}
|
|
|
|
$query=Db::name('apply')->insert($data);
|
|
if(!$query){
|
|
$this->error('提交失败');
|
|
}else{
|
|
$this->success('提交成功');
|
|
}
|
|
}
|
|
|
|
$this->assign('cid',$cid);
|
|
$tpl='apply';
|
|
if($cid==2)$tpl='apply2';
|
|
|
|
$this->assign('cid',$cid);
|
|
$tpl='apply';
|
|
if($cid==2)$tpl='apply2';
|
|
$appId='wxd01a3ce9b62eda90';
|
|
$appSecret='a194a96bb9144cbb29c3a74635dd936c';
|
|
|
|
$jssdk=new \weixin\Jssdk($appId, $appSecret);
|
|
$signPackage = $jssdk->GetSignPackage();
|
|
$this->assign('signPackage',$signPackage);
|
|
|
|
$title='机构';
|
|
if($cid==2)$title='个人';
|
|
|
|
$title='深圳文交所艺术品投资与收藏俱乐部理事申请表('.$title.')';
|
|
$img='http://www.szcaee.cn/app/home/view/szwjs/index/Public/Img/slogo.png';
|
|
$link=url('apply',['cid'=>$cid],false,true);
|
|
$share=array();
|
|
$share['title']=$title;
|
|
$share['desc']=$title;
|
|
$share['link']=$link;
|
|
$share['imgUrl']=$img;
|
|
$this->assign('share',$share);
|
|
return $this->view->fetch($tpl);
|
|
}
|
|
/**
|
|
* 专项债申报入口
|
|
* @return string
|
|
*/
|
|
public function apply2(){
|
|
$agree=input('agree','','intval');
|
|
if(!$agree){
|
|
if(request()->isAjax()){
|
|
return json_encode(['code' => 500, 'msg' => '请阅读并同意协议', 'data' => []], JSON_UNESCAPED_UNICODE);
|
|
}else{
|
|
$this->error('请阅读并同意协议',url('home/Index/index'));
|
|
}
|
|
}
|
|
$this->assign('agree',$agree);
|
|
$cid=input('cid',1,'intval');
|
|
if(!in_array($cid,[1,2]))$cid=1;
|
|
$uid=session('hid');
|
|
if(!$uid){
|
|
if(request()->isAjax()){
|
|
return json_encode(['code' => 500, 'msg' => '重新登陆', 'data' => []], JSON_UNESCAPED_UNICODE);
|
|
}else{
|
|
$this->error('请先登录',url('home/Index/index'));
|
|
}
|
|
}
|
|
if(request()->isPost()){
|
|
$data=input("post.");
|
|
|
|
$rule=[
|
|
//'__token__'=>'token',
|
|
'orgname'=>'require',
|
|
'major'=>'require',
|
|
'address'=>'require',
|
|
'buscode'=>'require',
|
|
'established'=>'require',
|
|
'regcapital'=>'require',
|
|
'netassets'=>'require',
|
|
'regaddr'=>'require',
|
|
'poscode'=>'require',
|
|
'raisedfunds'=>'require',
|
|
'3yearin'=>'require',
|
|
'3yearasset'=>'require',
|
|
'description'=>'require',
|
|
'comnum'=>'require',
|
|
'mortgage'=>'require',
|
|
'financefile'=>'require',
|
|
'relatedfile'=>'require',
|
|
];
|
|
$msg=[
|
|
'__token__'=>'令牌验证失败',
|
|
'orgname'=>'企业名称必填',
|
|
'major'=>'主营业务必填',
|
|
'address'=>'行政区域必填',
|
|
'buscode'=>'营业执照必填',
|
|
'established'=>'成立时间必填',
|
|
'regcapital'=>'注册资本必填',
|
|
'netassets'=>'净资产必填',
|
|
'regaddr'=>'注册地址必填',
|
|
'poscode'=>'邮政编码必填',
|
|
'raisedfunds'=>'募集资金用途必填',
|
|
'3yearin'=>'平均3年营业收入必填',
|
|
'3yearasset'=>'平均3年净利润必填',
|
|
'description'=>'企业概要必填',
|
|
'comnum'=>'员工总数必填',
|
|
'mortgage'=>'已发债情况必填',
|
|
'financefile'=>'请上传财务报表',
|
|
'relatedfile'=>'请上传相关资料',
|
|
];
|
|
|
|
$validate = new Validate($rule,$msg);
|
|
$result = $validate->check($data);
|
|
$token=request()->token();
|
|
if(!$result){
|
|
$this->error($validate->getError(),url("apply2",['token'=>$token]));
|
|
}
|
|
$data['legal']=json_encode($data['legal']);
|
|
$data['org']=json_encode($data['org']);
|
|
$data['cont']=json_encode($data['cont']);
|
|
$data['parter']=json_encode($data['parter']);
|
|
$data['pro']=json_encode($data['pro']);
|
|
$data['base']=json_encode($data['base']);
|
|
$data['user_id']=$uid;
|
|
$data['create_time']=time();
|
|
$data['cid']=1;
|
|
$apply=new Cultureapply($data);
|
|
$query=$apply->allowField(true)->save();
|
|
if(!$query){
|
|
$this->error('提交失败',url("apply2",['token'=>$token]));
|
|
}else{
|
|
$this->success('提交成功');
|
|
}
|
|
}
|
|
|
|
$tpl='cultureapply';
|
|
$appId='wxd01a3ce9b62eda90';
|
|
$appSecret='a194a96bb9144cbb29c3a74635dd936c';
|
|
|
|
$jssdk=new \weixin\Jssdk($appId, $appSecret);
|
|
$signPackage = $jssdk->GetSignPackage();
|
|
$this->assign('signPackage',$signPackage);
|
|
|
|
$title='机构';
|
|
|
|
$title='深圳文交所文化和旅游产业专项债券顾问咨询服务申请表('.$title.')';
|
|
$img='http://www.szcaee.cn/app/home/view/szwjs/index/Public/Img/slogo.png';
|
|
$link=url('apply',['cid'=>$cid],false,true);
|
|
$share=array();
|
|
$share['title']=$title;
|
|
$share['desc']=$title;
|
|
$share['link']=$link;
|
|
$share['imgUrl']=$img;
|
|
$this->assign('share',$share);
|
|
return $this->view->fetch($tpl);
|
|
}
|
|
/**
|
|
* 投资基金申报入口
|
|
* @return string
|
|
*/
|
|
public function apply3(){
|
|
$agree=input('agree','','intval');
|
|
|
|
if(!$agree){
|
|
if(request()->isAjax()){
|
|
return json_encode(['code' => 500, 'msg' => '请阅读并同意协议', 'data' => []], JSON_UNESCAPED_UNICODE);
|
|
}else{
|
|
$this->error('请阅读并同意协议',url('home/Index/index'));
|
|
}
|
|
}
|
|
$this->assign('agree',$agree);
|
|
|
|
$cid=input('cid',1,'intval');
|
|
if(!in_array($cid,[1,2]))$cid=1;
|
|
$uid=session('hid');
|
|
if(!$uid){
|
|
if(request()->isAjax()){
|
|
return json_encode(['code' => 500, 'msg' => '重新登陆', 'data' => []], JSON_UNESCAPED_UNICODE);
|
|
}else{
|
|
$this->error('请先登录',url('home/Index/index'));
|
|
}
|
|
}
|
|
if(request()->isPost()){
|
|
|
|
$data=input("post.");
|
|
$rule=[
|
|
//'__token__'=>'token',
|
|
'orgname'=>'require',
|
|
'major'=>'require',
|
|
'address'=>'require',
|
|
'buscode'=>'require',
|
|
'established'=>'require',
|
|
'regcapital'=>'require',
|
|
'netassets'=>'require',
|
|
'regaddr'=>'require',
|
|
'poscode'=>'require',
|
|
'raisedfunds'=>'require',
|
|
'3yearin'=>'require',
|
|
'3yearasset'=>'require',
|
|
'description'=>'require',
|
|
'comnum'=>'require',
|
|
'financefile'=>'require',
|
|
'relatedfile'=>'require',
|
|
];
|
|
$msg=[
|
|
'__token__'=>'令牌验证失败',
|
|
'orgname'=>'企业名称必填',
|
|
'major'=>'主营业务必填',
|
|
'address'=>'行政区域必填',
|
|
'buscode'=>'营业执照必填',
|
|
'established'=>'成立时间必填',
|
|
'regcapital'=>'注册资本必填',
|
|
'netassets'=>'净资产必填',
|
|
'regaddr'=>'注册地址必填',
|
|
'poscode'=>'邮政编码必填',
|
|
'raisedfunds'=>'募集资金用途必填',
|
|
'3yearin'=>'平均3年营业收入必填',
|
|
'3yearasset'=>'平均3年净利润必填',
|
|
'description'=>'企业概要必填',
|
|
'comnum'=>'员工总数必填',
|
|
'financefile'=>'请上传财务报表',
|
|
'relatedfile'=>'请上传商业计划书',
|
|
];
|
|
|
|
$validate = new Validate($rule,$msg);
|
|
$result = $validate->check($data);
|
|
$token=request()->token();
|
|
if(!$result){
|
|
$this->error($validate->getError(),url("apply3",['token'=>$token]));
|
|
}
|
|
$data['legal']=json_encode($data['legal']);
|
|
$data['org']=json_encode($data['org']);
|
|
$data['cont']=json_encode($data['cont']);
|
|
$data['parter']=json_encode($data['parter']);
|
|
$data['base']=json_encode($data['base']);
|
|
$data['user_id']=$uid;
|
|
$data['create_time']=time();
|
|
$data['cid']=2;
|
|
$apply=new Cultureapply($data);
|
|
$query=$apply->allowField(true)->save();
|
|
if(!$query){
|
|
$this->error('提交失败',url("apply3",['token'=>$token]));
|
|
}else{
|
|
$this->success('提交成功');
|
|
}
|
|
}
|
|
|
|
$tpl='cultureapply2';
|
|
$appId='wxd01a3ce9b62eda90';
|
|
$appSecret='a194a96bb9144cbb29c3a74635dd936c';
|
|
|
|
$jssdk=new \weixin\Jssdk($appId, $appSecret);
|
|
$signPackage = $jssdk->GetSignPackage();
|
|
$this->assign('signPackage',$signPackage);
|
|
|
|
$title='机构';
|
|
|
|
$title='深圳文交所文化和旅游产业专项债券顾问咨询服务申请表('.$title.')';
|
|
$img='http://www.szcaee.cn/app/home/view/szwjs/index/Public/Img/slogo.png';
|
|
$link=url('apply',['cid'=>$cid],false,true);
|
|
$share=array();
|
|
$share['title']=$title;
|
|
$share['desc']=$title;
|
|
$share['link']=$link;
|
|
$share['imgUrl']=$img;
|
|
$this->assign('share',$share);
|
|
return $this->view->fetch($tpl);
|
|
}
|
|
/**
|
|
* 投资基金申报入口
|
|
* @return string
|
|
*/
|
|
public function apply4(){
|
|
$tpl='cultureapply2';
|
|
$appId='wxd01a3ce9b62eda90';
|
|
$appSecret='a194a96bb9144cbb29c3a74635dd936c';
|
|
|
|
$jssdk=new \weixin\Jssdk($appId, $appSecret);
|
|
$signPackage = $jssdk->GetSignPackage();
|
|
$this->assign('signPackage',$signPackage);
|
|
|
|
$title='机构';
|
|
|
|
$activity=db('activity')->where(['id'=>1])->find();
|
|
$apply=$activity['apply']?json_decode($activity['apply'],true):[];
|
|
|
|
$rule=[];
|
|
$msg=['__token__'=>'令牌验证失败',];
|
|
$data=[];
|
|
$data['aid']=1;
|
|
if(count($apply)){
|
|
$uway=input('post.uway');
|
|
foreach ($apply as $k=>$row){
|
|
if($row['ftype']=='checkbox'||$row['ftype']=='select'||$row['ftype']=='radio'){
|
|
$apply[$k]['foptions']=explode("||",$row['foptions']);
|
|
}
|
|
if(request()->isPost()){
|
|
$ftag=$row['ftag'];
|
|
if($row['frequire']){
|
|
if($uway!=1)$rule[$ftag]='require';
|
|
$fmsg='必填';
|
|
switch ($row['ftype']){
|
|
case 'checkbox':
|
|
case 'select':
|
|
case 'radio':
|
|
$fmsg='必选';
|
|
break;
|
|
case 'file':
|
|
$fmsg='必上传';
|
|
break;
|
|
}
|
|
$msg[$ftag]=$row['fname'].$fmsg;
|
|
}
|
|
if(isset($_POST[$ftag])){
|
|
$data[$ftag]=input("post.$ftag");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if(request()->isPost()){
|
|
|
|
$post=input("post.");
|
|
$validate = new Validate($rule,$msg);
|
|
$result = $validate->check($post);
|
|
$token=request()->token();
|
|
if(!$result){
|
|
$this->error($validate->getError(),url("apply4",['token'=>$token]));
|
|
}
|
|
$data['create_time']=time();
|
|
|
|
$query=Db::name('activityapply')->insert($data);
|
|
if(!$query){
|
|
$this->error('提交失败',url("apply3",['token'=>$token]));
|
|
}else{
|
|
$this->success('提交成功');
|
|
}
|
|
}
|
|
$this->assign('apply',$apply);
|
|
$this->assign('activity',$activity);
|
|
|
|
$title=$activity['title'];
|
|
$img='http://www.szcaee.cn/app/home/view/szwjs/index/Public/Img/slogo.png';
|
|
$link=url('apply4',false,true);
|
|
$share=array();
|
|
$share['title']=$title;
|
|
$share['desc']=$title;
|
|
$share['link']=$link;
|
|
$share['imgUrl']=$img;
|
|
$this->assign('share',$share);
|
|
return $this->view->fetch();
|
|
}
|
|
/**
|
|
* 投资基金申报入口
|
|
* @return string
|
|
*/
|
|
public function apply6(){
|
|
$tpl='bigdataapply1';
|
|
$agree=input('agree','','intval');
|
|
$title='全国文化大数据求购信息登记表';
|
|
$this->assign("title",$title);
|
|
|
|
$cid=input('cid',1,'intval');
|
|
if(!in_array($cid,[1,2]))$cid=1;
|
|
|
|
if(request()->isPost()){
|
|
|
|
$data=input("post.");
|
|
$rule=[
|
|
//'__token__'=>'token',
|
|
"num"=>"require",
|
|
"price"=>"require",
|
|
"datatype"=>"require",
|
|
"rights"=>"require",
|
|
"pay"=>"require",
|
|
"range"=>"require",
|
|
"scope"=>"require",
|
|
];
|
|
if($cid==1){
|
|
$crule=[
|
|
"org[name]"=>"require",
|
|
"org[code]"=>"require",
|
|
"org[legal]"=>"require",
|
|
"org[contact]"=>"require",
|
|
"org[addr]"=>"require",
|
|
"org[tel]"=>"require"
|
|
];
|
|
array_merge($rule,$crule);
|
|
}else{
|
|
$crule=[
|
|
"pri[name]"=>"require",
|
|
"pri[code]"=>"require",
|
|
"pri[job]"=>"require",
|
|
"pri[addr]"=>"require",
|
|
"pri[tel]"=>"require",
|
|
];
|
|
array_merge($rule,$crule);
|
|
}
|
|
$msg=[
|
|
'__token__'=>'令牌验证失败',
|
|
'price'=>'求购规模必填',
|
|
'num'=>'求购数量必填',
|
|
'datatype'=>'求购数据类别必选',
|
|
'rights'=>'求购数据权利类型必选',
|
|
'pay'=>'求购交易方式必选',
|
|
'range'=>'求购数据范围必选',
|
|
'scope'=>'拟应用场景必选',
|
|
'relatedfile'=>'请上传示例数据',
|
|
"org[name]"=>"机构名称必填",
|
|
"org[code]"=>"机构信用代码必填",
|
|
"org[legal]"=>"必填",
|
|
"org[contact]"=>"联系人必填",
|
|
"org[addr]"=>"联系地址必填",
|
|
"org[tel]"=>"联系电话必填",
|
|
"pri[name]"=>"姓名必填",
|
|
"pri[code]"=>"身份证号码必填",
|
|
"pri[job]"=>"职业/职称必填",
|
|
"pri[addr]"=>"联系地址必填",
|
|
"pri[tel]"=>"手机必填",
|
|
];
|
|
$num=input('num');
|
|
$total=input('price');
|
|
$validate = new Validate($rule,$msg);
|
|
$result = $validate->check($data);
|
|
$token=request()->token();
|
|
if(!$result){
|
|
$this->error($validate->getError(),url("apply6",['token'=>$token]));
|
|
}
|
|
$data['org']=json_encode($data['org']);
|
|
$data['pri']=json_encode($data['pri']);
|
|
$data['create_time']=time();
|
|
$data['cid']=$cid;
|
|
$data['num']=$num;
|
|
$data['price']=$total;
|
|
$data['datatype']=json_encode($_POST['datatype']);
|
|
$data['datakind']=input('datakind');
|
|
$data['rights']=json_encode($_POST['rights']);
|
|
$data['pay']=json_encode($_POST['pay']);
|
|
$data['range']=json_encode($_POST['range']);
|
|
$data['scope']=json_encode($_POST['scope']);
|
|
$data['relatedfile']=input('relatedfile');
|
|
$data['rangeother']=input('rangeother');
|
|
$data['rightsother']=input('rightsother');
|
|
$data['datatypeother']=input('datatypeother');
|
|
$data['scopeother']=input('scopeother');
|
|
$data['kind']=1;
|
|
$apply=new Bdapply($data);
|
|
$query=$apply->allowField(true)->save();
|
|
if(!$query){
|
|
$this->error('提交失败',url("apply6",['token'=>$token]));
|
|
}else{
|
|
$this->success('提交成功');
|
|
}
|
|
}
|
|
|
|
$appId='wxd01a3ce9b62eda90';
|
|
$appSecret='a194a96bb9144cbb29c3a74635dd936c';
|
|
|
|
$jssdk=new \weixin\Jssdk($appId, $appSecret);
|
|
$signPackage = $jssdk->GetSignPackage();
|
|
$this->assign('signPackage',$signPackage);
|
|
|
|
$img='http://www.szcaee.cn/app/home/view/szwjs/index/Public/Img/slogo.png';
|
|
$link=url('apply6',['cid'=>$cid],false,true);
|
|
$share=array();
|
|
$share['title']=$title;
|
|
$share['desc']=$title;
|
|
$share['link']=$link;
|
|
$share['imgUrl']=$img;
|
|
$this->assign('share',$share);
|
|
return $this->view->fetch($tpl);
|
|
}
|
|
|
|
/**
|
|
* 投资基金申报入口
|
|
* @return string
|
|
*/
|
|
public function apply7(){
|
|
$tpl='bigdataapply2';
|
|
$appId='wxa0cb14dc087a5d99';
|
|
$appSecret='fe3853cbea525e10a9e704d1428fe357';
|
|
|
|
$jssdk=new \weixin\Jssdk($appId, $appSecret);
|
|
$signPackage = $jssdk->GetSignPackage();
|
|
$this->assign('signPackage',$signPackage);
|
|
|
|
$title='全国文化大数据转让信息登记表';
|
|
|
|
|
|
$rule=[];
|
|
$msg=['__token__'=>'令牌验证失败',];
|
|
|
|
if(request()->isPost()){
|
|
|
|
$cid=input('cid',1,'intval');
|
|
$post=input("post.");
|
|
$rule=[
|
|
//'__token__'=>'token',
|
|
"num"=>"require",
|
|
"price"=>"require",
|
|
"allprice"=>"require",
|
|
"products"=>"require",
|
|
];
|
|
if($cid==1){
|
|
$crule=[
|
|
"org[name]"=>"require",
|
|
"org[code]"=>"require",
|
|
"org[legal]"=>"require",
|
|
"org[contact]"=>"require",
|
|
"org[addr]"=>"require",
|
|
"org[tel]"=>"require"
|
|
];
|
|
array_merge($rule,$crule);
|
|
}else{
|
|
$crule=[
|
|
"pri[name]"=>"require",
|
|
"pri[code]"=>"require",
|
|
"pri[job]"=>"require",
|
|
"pri[addr]"=>"require",
|
|
"pri[tel]"=>"require",
|
|
];
|
|
array_merge($rule,$crule);
|
|
}
|
|
$msg=[
|
|
'__token__'=>'令牌验证失败',
|
|
'price'=>'按单个标的合计金额必填',
|
|
'allprice'=>'全部标的捆绑报价必填',
|
|
'num'=>'标的数量必填',
|
|
"org[name]"=>"机构名称必填",
|
|
"org[code]"=>"机构信用代码必填",
|
|
"org[legal]"=>"必填",
|
|
"org[contact]"=>"联系人必填",
|
|
"org[addr]"=>"联系地址必填",
|
|
"org[tel]"=>"联系电话必填",
|
|
"pri[name]"=>"姓名必填",
|
|
"pri[code]"=>"身份证号码必填",
|
|
"pri[job]"=>"职业/职称必填",
|
|
"pri[addr]"=>"联系地址必填",
|
|
"pri[tel]"=>"手机必填",
|
|
"products"=>"标的清单必填",
|
|
];
|
|
|
|
$validate = new Validate($rule,$msg);
|
|
$result = $validate->check($post);
|
|
$token=request()->token();
|
|
|
|
if(!$result){
|
|
$this->error($validate->getError(),url("apply7",['token'=>$token]));
|
|
}
|
|
$data=$post;
|
|
$data['kind']=2;
|
|
$data['create_time']=time();
|
|
$data['cid']=$cid;
|
|
$data['org']=json_encode($data['org']);
|
|
$data['pri']=json_encode($data['pri']);
|
|
$data['create_time']=time();
|
|
$data['products']=htmlspecialchars_decode($data['products']);
|
|
$apply=new Bdapply($data);
|
|
$query=$apply->allowField(true)->save();
|
|
if(!$query){
|
|
$this->error('提交失败',url("apply7",['token'=>$token]));
|
|
}else{
|
|
$this->success('提交成功');
|
|
}
|
|
}
|
|
|
|
$img='http://www.szcaee.cn/app/home/view/szwjs/index/Public/Img/slogo.png';
|
|
$link=url('apply7',false,true);
|
|
$share=array();
|
|
$share['title']=$title;
|
|
$share['desc']=$title;
|
|
$share['link']=$link;
|
|
$share['imgUrl']=$img;
|
|
$this->assign('share',$share);
|
|
$this->assign('title',$title);
|
|
return $this->view->fetch($tpl);
|
|
}
|
|
public function bigdata(){
|
|
$this->assign('title','全国文化大数据委托信息登记表');
|
|
return $this->view->fetch('bigdataapply');
|
|
}
|
|
public function bdadd(){
|
|
return $this->view->fetch();
|
|
}
|
|
/**
|
|
* 古建申请表
|
|
* @return string
|
|
*/
|
|
public function apply5(){
|
|
$cid=input('cid',1,'intval');
|
|
if(!in_array($cid,[1,2]))$cid=1;
|
|
|
|
if(request()->isPost()){
|
|
$data=input("post.");
|
|
$rule=[
|
|
'__token__'=>'token'
|
|
];
|
|
$msg=[
|
|
'__token__'=>'令牌验证失败'
|
|
];
|
|
$validate = new Validate($rule,$msg);
|
|
$result = $validate->check($data);
|
|
if(!$result){
|
|
$this->error('令牌验证失败',url("apply5",['cid'=>$cid]));
|
|
}
|
|
$org_name=input('post.orgname','');
|
|
$org_code=input('post.orgcode','');
|
|
$address=input('post.address','');
|
|
$credcard=input('post.credcard','');
|
|
$mobile=input('post.mobile','');
|
|
$promise=input('post.promise',1,'intval');
|
|
$direction=input('post.direction','');
|
|
$cred_type=input('post.cred_type','','intval');
|
|
$username=input('post.legal','');
|
|
$contact=input('post.contact','');
|
|
$orgdesc=input('post.org_desc','');
|
|
$exp=input('post.experience','');
|
|
$infor=input('post.infor','');
|
|
$join_year=input('post.join_year',0,'intval');
|
|
$error='';
|
|
if($cid==1){
|
|
if(empty($org_name))$error='机构名称必填';
|
|
if(empty($org_code))$error='机构信用代码必填';
|
|
if(empty($address))$error='联系地址必填';
|
|
if(empty($username))$error='法人姓名必填';
|
|
if(empty($credcard))$error='法人身份证号码必填';
|
|
if(empty($contact))$error='联系人必填';
|
|
if(empty($mobile))$error='联系电话必填';
|
|
}else{
|
|
$username=input('post.username','');
|
|
if(empty($username))$error='姓名必填必填';
|
|
if(empty($cred_type))$error='证件类型必选';
|
|
if(empty($credcard))$error='证件号码号码必填';
|
|
if(empty($address))$error='联系地址必填';
|
|
if(empty($mobile))$error='手机号码必填';
|
|
if(empty($join_year))$error='投资年限必填';
|
|
}
|
|
if(!empty($error))$this->error($error);
|
|
|
|
$data=array();
|
|
$data['username']=$username;
|
|
$data['address']=$address;
|
|
$data['mobile']=$mobile;
|
|
$data['is_agress']=$promise;
|
|
$data['cid']=$cid;
|
|
$data['kind']=2;
|
|
$data['create_time']=time();
|
|
$data['cred_num']=$credcard;
|
|
if($cid==1){
|
|
$data['contact']=$contact;
|
|
$data['org_name']=$org_name;
|
|
$data['org_code']=$org_code;
|
|
$data['direction']=$direction;
|
|
$data['org_desc']=$orgdesc;
|
|
}else{
|
|
$data['join_year']=$join_year;
|
|
$data['cred_type']=$cred_type;
|
|
$data['experience']=$exp;
|
|
$data['infor']=$infor;
|
|
}
|
|
|
|
$query=Db::name('apply')->insert($data);
|
|
if(!$query){
|
|
$this->error('提交失败');
|
|
}else{
|
|
$this->success('提交成功');
|
|
}
|
|
}
|
|
|
|
$this->assign('cid',$cid);
|
|
$tpl='apply51';
|
|
if($cid==2)$tpl='apply52';
|
|
|
|
$appId='wxd01a3ce9b62eda90';
|
|
$appSecret='a194a96bb9144cbb29c3a74635dd936c';
|
|
|
|
$jssdk=new \weixin\Jssdk($appId, $appSecret);
|
|
$signPackage = $jssdk->GetSignPackage();
|
|
$this->assign('signPackage',$signPackage);
|
|
|
|
$title='机构';
|
|
if($cid==2)$title='个人';
|
|
|
|
$title='古建合作机构信息登记表('.$title.')';
|
|
$img='http://www.szcaee.cn/app/home/view/szwjs/index/Public/Img/slogo.png';
|
|
$link=url('apply5',['cid'=>$cid],false,true);
|
|
$share=array();
|
|
$share['title']=$title;
|
|
$share['desc']=$title;
|
|
$share['link']=$link;
|
|
$share['imgUrl']=$img;
|
|
$this->assign("title",$title);
|
|
$this->assign('share',$share);
|
|
return $this->view->fetch($tpl);
|
|
}
|
|
/**
|
|
* 获取lcwhcyb
|
|
* @param unknown $cid
|
|
*/
|
|
protected function getPages($cid){
|
|
$list=Db::name('lc_whcyb')->where(['whcyb_status'=>1,'whcyb_cid'=>$cid])->order('whcyb_sort desc,whcyb_time desc')->limit(50)->select();
|
|
$this->assign('pages'.$cid,$list);
|
|
return $list;
|
|
}
|
|
protected function getLinks($kind){
|
|
$check=Db::name('type')->where(['type_status'=>1,'type_type'=>14,'type_id'=>$kind])->count();
|
|
$list=[];
|
|
if($check){
|
|
$list=Db::name('link')->where(['lk_status'=>1,'lk_cid'=>$kind])->order('lk_order desc,lk_id desc')->limit(50)->select();
|
|
}
|
|
$this->assign('links'.$kind,$list);
|
|
}
|
|
protected function getShowList($kind,$type='',$child='',$fields='c_parent,c_child,c_id,c_name,c_logo,c_mold,c_jcname,c_price,c_cid,c_code,c_gptime,c_type,c_kind,c_gprice,c_jump,c_infostime,c_infoetime'){
|
|
if(is_array($kind)){
|
|
$where=['c_status'=>1,'c_kind'=>['in',$kind]];
|
|
}else{
|
|
$where=['c_status'=>1,'c_kind'=>$kind];
|
|
}
|
|
$limit=50;
|
|
if($kind==4){
|
|
|
|
$limit=150;
|
|
if(in_array($kind,array(4,11))&&empty($type)){
|
|
$where['c_parent']=array('<>','');
|
|
}
|
|
if($type){
|
|
$where['c_parent']=array('like',[$type.',%','%,'.$type.'%',$type],'OR');
|
|
}
|
|
}else{
|
|
if($type){
|
|
$where['c_type']=$type;
|
|
}
|
|
}
|
|
$order='c_order desc,c_time desc';
|
|
if(is_array($kind)&&in_array('11',$kind)){
|
|
$order='c_time desc,c_order desc';
|
|
}
|
|
$list=Db::name('finance')->field($fields)->where($where)->order($order)->limit($limit)->select();
|
|
|
|
foreach ($list as $k=>$item){
|
|
if($item['c_jump']){
|
|
if(strpos(strtolower($item['c_jump']),'http')===false){
|
|
$list[$k]['c_jump']='http://'.$item['c_jump'];
|
|
} elseif ($kind == 2 && $_SERVER['HTTP_HOST'] != 'www.szcaee.cn') {
|
|
$url = $_SERVER['HTTP_HOST'] ?: $_SERVER['REMOTE_ADDR'].':'.$_SERVER['SERVER_PORT'];
|
|
$list[$k]['c_jump']=str_replace('https://www.szcaee.cn','http://'.$url,$item['c_jump']);
|
|
}
|
|
}
|
|
if($type==16){
|
|
$list[$k]['c_jump']=url('news/finance',['c_id'=>$item['c_id'],'kind'=>$kind,'parent'=>$type]);
|
|
}
|
|
if($kind==13){
|
|
$parents=['1'=>'服务联盟','产业联盟 ','投资联盟'];
|
|
$parent=isset($parents[$item['c_mold']])?$parents[$item['c_mold']]:'-';
|
|
$list[$k]['c_mold']=$parent;
|
|
}
|
|
|
|
}
|
|
return $list;
|
|
}
|
|
/**
|
|
*留言
|
|
*/
|
|
public function addmsg(){
|
|
if (!request()->isPost()){
|
|
$this->error(lang('submission mode incorrect'));
|
|
}else{
|
|
$rule = [
|
|
'__contact__' =>'require|token:__contact__'
|
|
];
|
|
$message =[
|
|
'__contact__.require'=>'令牌缺失'
|
|
];
|
|
$validate=new Validate($rule,$message);
|
|
$result=$validate->check(input());
|
|
$token=request()->token('__contact__');
|
|
if(!$result){
|
|
$this->error($validate->getError(),url('listn/contact'),['token'=>$token]);
|
|
}
|
|
|
|
$verify =new Captcha ();
|
|
if (!$verify->check(input('verify'), 'msg')) {
|
|
$this->error(lang('verifiy incorrect'),url('listn/contact'),['token'=>$token]);
|
|
}
|
|
$data=array(
|
|
'plug_sug_name'=>input('plug_sug_name'),
|
|
'plug_sug_tel'=>input('plug_sug_tel'),
|
|
'plug_sug_email'=>input('plug_sug_email'),
|
|
'plug_sug_content'=>input('plug_sug_content'),
|
|
'plug_sug_addtime'=>time(),
|
|
'plug_sug_open'=>0,
|
|
'plug_sug_ip'=>request()->ip(),
|
|
);
|
|
$rst=Db::name('plug_sug')->insert($data);
|
|
if($rst!==false){
|
|
$this->success(lang('message success'));
|
|
}else{
|
|
$this->error(lang('message failed'),url('listn/contact'),['token'=>$token]);
|
|
}
|
|
}
|
|
}
|
|
/**
|
|
* 古村落振兴计划
|
|
*/
|
|
public function gucun(){
|
|
return $this->fetch();
|
|
}
|
|
/**
|
|
* 金溪专区
|
|
*/
|
|
public function jinxi(){
|
|
return $this->fetch();
|
|
}
|
|
/**
|
|
* 德化专区
|
|
*/
|
|
public function dehua(){
|
|
return $this->fetch();
|
|
}
|
|
/**
|
|
* 活动报名接口
|
|
* @return string
|
|
*/
|
|
public function activity(){
|
|
$id=input('id','','intval');
|
|
if(!$id){
|
|
$token=request()->token();
|
|
$this->error('缺少参数',"",['token'=>$token]);
|
|
}
|
|
|
|
$activity=db('activity')->where(['id'=>$id])->find();
|
|
$kind=$activity?$activity['kind']:'';
|
|
$apply=$activity['apply']?json_decode($activity['apply'],true):[];
|
|
|
|
$start=$activity['start_date'];
|
|
$end=$activity['end_date'];
|
|
$cur=time();
|
|
$state=1;
|
|
if($end<$cur)$state=-1;
|
|
if($start>$cur)$state=0;
|
|
$activity['state']=$state;
|
|
|
|
if(count($apply)){
|
|
foreach ($apply as $k=>$row){
|
|
if($row['ftype']=='checkbox'||$row['ftype']=='select'||$row['ftype']=='radio'){
|
|
$apply[$k]['foptions']=explode("||",$row['foptions']);
|
|
}
|
|
}
|
|
}
|
|
if(request()->isPost()){
|
|
$login=$activity['login'];
|
|
$where=['aid'=>$id];
|
|
$uid='';
|
|
if($login){
|
|
$uid=session('hid');
|
|
if(!$uid){
|
|
$this->error('请先登录',url('home/Index/index'));
|
|
return false;
|
|
}
|
|
$where['uid']=$uid;
|
|
}
|
|
if($state==0){
|
|
$token=request()->token();
|
|
$this->error("活动未开始","",['token'=>$token]);
|
|
return false;
|
|
}
|
|
if($state==-1){
|
|
$token=request()->token();
|
|
$this->error("活动已结束","",['token'=>$token]);
|
|
return false;
|
|
}
|
|
$rule=['__token__'=>'require|token'];
|
|
$msg=[];
|
|
if($login){
|
|
$check=Db::name('activityapply')->where($where)->count();
|
|
if($check){
|
|
$token=request()->token();
|
|
$this->error("此活动您已提交过报名","",['token'=>$token]);
|
|
return false;
|
|
}
|
|
}
|
|
$data=[];
|
|
$data['uid']=$uid;
|
|
$data['aid']=$id;
|
|
if(count($apply)){
|
|
foreach ($apply as $k=>$row){
|
|
|
|
if(request()->isPost()){
|
|
$ftag=$row['ftag'];
|
|
if($row['frequire']){
|
|
$fmsg='必填';
|
|
switch ($row['ftype']){
|
|
case 'checkbox':
|
|
case 'select':
|
|
case 'radio':
|
|
$fmsg='必选';
|
|
break;
|
|
case 'file':
|
|
$fmsg='必上传';
|
|
break;
|
|
}
|
|
$msg[$ftag]=$row['fname'].$fmsg;
|
|
}
|
|
if(isset($_POST[$ftag])){
|
|
if($row['ftype']=='checkbox'){
|
|
$val=$_POST["".$ftag];
|
|
$val=implode(",", $val);
|
|
}else{
|
|
$val=input("post.$ftag");
|
|
}
|
|
$data[$ftag]=$val;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
$post=input("post.");
|
|
$validate = new Validate($rule,$msg);
|
|
$result = $validate->check($post);
|
|
$token=request()->token();
|
|
if(!$result){
|
|
$this->error($validate->getError(),"",['token'=>$token]);
|
|
}
|
|
$data['create_time']=time();
|
|
$query=Db::name('activityapply')->insert($data);
|
|
if(!$query){
|
|
$this->error('提交失败',"",['token'=>$token]);
|
|
}else{
|
|
|
|
$notice_title='您好,您的('.$activity['title'].')已报名成功 ';
|
|
$notice='';
|
|
$sl_data=[
|
|
'notice_title'=>$notice_title,
|
|
'notice'=>$notice_title,
|
|
'user_id'=>$uid,
|
|
'apply_id'=>$id,
|
|
'create_id'=>$uid,
|
|
'create_type'=>1,
|
|
'create_time'=>time()
|
|
];
|
|
Db::name('activitynotice')->insert($sl_data);
|
|
|
|
$this->success('提交成功');
|
|
}
|
|
}
|
|
$this->assign('id',$id);
|
|
$this->assign('apply',$apply);
|
|
$this->assign('activity',$activity);
|
|
$tpl="";
|
|
if($kind==3){
|
|
$appId='wxd01a3ce9b62eda90';
|
|
$appSecret='a194a96bb9144cbb29c3a74635dd936c';
|
|
|
|
$jssdk=new \weixin\Jssdk($appId, $appSecret);
|
|
$signPackage = $jssdk->GetSignPackage();
|
|
$this->assign('signPackage',$signPackage);
|
|
$title=$activity['title'];
|
|
$title='中国古建资产托管交易平台('.$title.')';
|
|
$img='http://www.szcaee.cn/app/home/view/szwjs/index/Public/Img/slogo.png';
|
|
$link=url('activity',['id'=>$id],false,true);
|
|
$share=array();
|
|
$share['title']=$title;
|
|
$share['desc']=$title;
|
|
$share['link']=$link;
|
|
$share['imgUrl']=$img;
|
|
$this->assign("title",$title);
|
|
$this->assign('share',$share);
|
|
$tpl="actgujian";
|
|
}
|
|
return $this->view->fetch($tpl);
|
|
}
|
|
|
|
public function actlist(){
|
|
$list= Db::name('activity')->where(['status'=>1,'end_date'=>['lt',time()],'poster'=>['neq','']])->order('sort desc')->paginate(9);
|
|
$show = $list->render();
|
|
$this->assign("list",$list);
|
|
$this->assign("pageshow",$show);
|
|
return $this->view->fetch();
|
|
}
|
|
}
|
|
|