当前位置:网站首页>Lighten the source code -- lighten the app system development function introduction to the beautiful world lighten the app system development source code in China
Lighten the source code -- lighten the app system development function introduction to the beautiful world lighten the app system development source code in China
2022-06-25 12:27:00 【Procedure 15528175269】
Lighting is based on lighting APP Collected urban characteristic content 、AR Three dimensional positioning 、AI Panoramic artificial intelligence services 、 Urban livelihood service merchants cluster 、 Urban characteristics light up the supply and demand of people and other big data ,3D The three-dimensional simulation target presents the virtual simulation world
Lighten up APP System development function introduction :
Real time online reading of pushed city feature information , Browse related content easily ;
Release urban feature trends , It is convenient to take pictures of the city , Share the city with netizens ;
View message information online , Provide convenient interactive functions , Online instant interaction ;
Give your favorite city features a dynamic compliment , When browsing, you can clearly like ;
Set up a powerful search function , Support online keyword input and immediate search query ;
Support inviting friends to use , Easy sharing software , Learn about the characteristics of the city together ;
<?php
class vote_joinControl extends skyMvc{
public $shop_app;
public function __construct(){
parent::__construct();
}
public function onInit(){
}
public function onDefault(){
$vid=get_post("vid",'i');
$vote=M("mod_vote")->selectRow("id=".$vid);
$this->smarty->template_dir.="/".$vote['tpl'];
$this->smarty->goAssign(array(
"vote"=>$vote,
"skins"=>$this->smarty->template_dir,
));
$this->smarty->display("vote_item/index.html");
}
public function onList(){
$_GET["ajax"]=1;
$vid=get_post("vid",'i');
$bianhao=get('bianhao','i');
$where=" vid=".$vid." AND status=1 ";
if($bianhao){
$where.=" AND bianhao=".$bianhao;
}
$type=get("type");
switch($type){
case "hot":
$where.=" AND isrecommend=1 ";
$order=" vote_num DESC";
break;
default:
$order="id DESC";
break;
}
$start=get_post('per_page','i');
$limit=24;
$option=array(
"where"=>$where,
"order"=>$order,
"start"=>$start,
"limit"=>$limit,
);
$rscount=true;
$list=M("mod_vote_join")->select($option,$rscount);
if($list){
foreach($list as $k=>$v){
$v["imgurl"]=images_site($v["imgurl"]);
unset($v["telephone"]);
unset($v["address"]);
$list[$k]=$v;
}
}
$per_page=$start+$limit;
$per_page=$per_page<$rscount?$per_page:0;
$this->smarty->goAssign(array(
"list"=>$list,
"per_page"=>$per_page
));
}
public function onShow(){
$id=get_post("id","i");
$vid=get_post("vid","i");
$userid=M("login")->userid;
$vote=M("mod_vote")->selectRow("id=".$vid);
$join=M("mod_vote_join")->selectRow("id=".$id);
unset($join["telephone"]);
unset($join["address"]);
$author=M("user")->getUser($join["userid"]);
if(empty($vote) || empty($join)){
$this->goAll(" Parameter error ",1);
}
$join["imgurl"]=images_site($join["imgurl"]);
$join["url"]=images_site($join["url"]);
$imgs=array();
if(!empty($join["imgsdata"])){
$ims=explode(",",$join["imgsdata"]);
foreach($ims as $im){
if(!empty($im)){
$imgs[]=array(
"imgurl"=>htmlspecialchars($im),
"trueimgurl"=>images_site(htmlspecialchars($im))
);
}
}
}
$ut=M("mod_vote_join")->select(array(
"where"=>" vid=".$vid." AND status=1",
"order"=>" vote_num DESC",
"fields"=>"userid",
"limit"=>1000
));
$join['paiming']=" no ";
if($ut){
foreach($ut as $k=>$u){
if($u['userid']==$join['userid']){
$join['paiming']=$k+1;
break;
}
}
}
$this->smarty->template_dir.="/".$vote['tpl'];
$this->smarty->goassign(array(
"vote"=>$vote,
"join"=>$join,
"imgsdata"=>$imgs,
"author"=>$author,
"skins"=>$this->smarty->template_dir,
"seo"=>array(
"title"=>" I'm in ".$vote['title'].""
)
));
$this->smarty->display("vote_item/show.html");
}
public function onVote(){
M("login")->checkLogin();
$id=get_post('id','i');
$vid=get_post('vid','i');
$userid=M("login")->userid;
$vote=M("mod_vote")->selectRow("id=".$vid);
$join=M("mod_vote_join")->selectRow("id=".$id);
$g1=M("mod_vote_go")->selectRow(array("where"=>"joinid=".$id." AND userid=".$userid,"order"=>"id DESC"));
$time=date("Y-m-d H:i:s");
if(!empty($g1)){
if($vote['gotype']==1){
$this->goAll("",1);
}else{
if(substr($g1['time'],0,10)==date("Y-m-d")){
$this->goAll("",1);
}
}
}
if($v['gotype']==1){
$g2=M("mod_vote_go")->selectOne(array("where"=>"vid=".$vid." AND userid=".$userid,"fields"=>" count(*) as ct "));
if($g2>$vote['gonum']){
$this->goAll("",1);
}
}else{
$day=strtotime(date("Y-m-d"));
$g3=M("mod_vote_go")->selectOne(array("where"=>"vid=".$vid." AND userid=".$userid." AND time>'".$day."'","fields"=>" count(*) as ct "));
if($g3>=$vote['gonum']){
$this->goAll("",1);
}
}
M("mod_vote_go")->insert(array(
"userid"=>$userid,
"vid"=>$vid,
"joinid"=>$id,
"time"=>$time
));
M("mod_vote_join")->update(array(
"vote_num"=>$join['vote_num']+1
),"id=".$id);
M("mod_vote")->update(array(
"vote_num"=>$vote['vote_num']+1,
),"id=".$vid);
$this->goAll("",0);
}
public function onjoin(){
M("login")->checkLogin();
$id=get_post("id","i");
$userid=M("login")->userid;
$vote=M("mod_vote")->selectRow("id=".$id);
if(empty($vote) || $vote["status"]!=1){
$this->goAll("",1);
}
$vote["imgurl"]=images_site($vote["imgurl"]);
$row=M("mod_vote_join")->selectRow("userid=".$userid." AND status in(0,1) AND vid=".$id);
if($row){
if($row["imgurl"]){
$row["trueimgurl"]=images_site($row["imgurl"]);
}
if($row['status']==1){
$this->goAll(" Your information has been approved , Please contact customer service for modification ",1);
}
$row["url_www"]=images_site($row["url"]);
$imgs=array();
if(!empty($row["imgsdata"])){
$ims=explode(",",$row["imgsdata"]);
foreach($ims as $im){
if(!empty($im)){
$imgs[]=array(
"imgurl"=>htmlspecialchars($im),
"trueimgurl"=>images_site(htmlspecialchars($im))
);
}
}
}
}
$this->smarty->template_dir.="/".$vote['tpl'];
$this->smarty->goassign(array(
"vote"=>$vote,
"data"=>$row,
"imgsdata"=>$imgs,
"skins"=>$this->smarty->template_dir,
"seo"=>array(
"title"=>$vote['title']
)
));
$this->smarty->display("vote/join.html");
}
public function onSave(){
M("login")->checkLogin();
$id=get_post("id","i");
$userid=M("login")->userid;
$vote=M("mod_vote")->selectRow("id=".$id);
if(empty($vote)){
$this->goAll(" Parameter error ",1);
}
$row=M("mod_vote_join")->selectRow("userid=".$userid." AND vid=".$id);
$data['vid']=$id;
$data['dateline']=time();
$data['userid']=$userid;
$data['title']=post('title','h');
$data['nickname']=post('nickname','h');
$data['telephone']=post('telephone','h');
$data['address']=post('address','h');
if(!is_tel($data['telephone'])){
$this->goAll("",1);
}
if(empty($data['nickname'])){
$this->goAll("",1);
}
if(empty($data['address'])){
$this->goAll("",1);
}
if(empty($data['title'])){
$this->goAll("",1);
}
$data['imgurl']=post('imgurl','h');
$data['url']=post('url','h');
$data['content']=post('content','h');
$data['description']=post('description','h');
$data["imgsdata"]=post("imgsdata","h");
if(!empty($data["imgsdata"])){
$ims=explode(",",$data["imgsdata"]);
$imgs=array();
foreach($ims as $im){
if(!empty($im)){
$imgs[]=htmlspecialchars($im);
}
}
$data["imgsdata"]=implode(",",$imgs);
if(!empty($imgs)){
$data["imgurl"]=$imgs[0];
}
}
$data['status']=0;
if($row){
if($row['status']==1){
$this->goAll(" Your information has been approved , Please contact customer service for modification ",1);
}else{
M("mod_vote_join")->update($data,"id=".$row['id']);
}
$i=$row['id'];
}else{
$data["vote_num"]=0;
$ct=M("mod_vote_join")->selectOne(array(
"where"=>" vid=".$id,
"fields"=>"count(*) "
));
$bianhao=1000+$ct;
$data["bianhao"]=$bianhao;
$i=M("mod_vote_join")->insert($data);
M("mod_vote")->update(array(
"join_num"=>$vote['join_num']+1
),"id=".$id);
}
$url="/module.php?m=vote_join&a=show&vid=".$id."&id=".$i;
$this->goAll(" Thank you for your participation , Please wait for review ",0,0,$url);
}
}
?>边栏推荐
- The dist function of R language calculates the distance between two samples in dataframe data, returns the distance matrix between samples, and specifies the distance calculation method through the me
- The R language uses the follow up The plot function visualizes the longitudinal follow-up map of multiple ID (case) monitoring indicators, and uses stress The type parameter specifies the line type of
- Kotlin基础
- Repair the error that ECSHOP background orders prompt insufficient inventory when adding goods. Please reselect
- Use PHP script to view the opened extensions
- 15、wpf之button样式小记
- Flutter common commands and problems
- plt. GCA () picture frame and label
- Install MySQL client
- How can we differ LEFT OUTER JOIN vs Left Join [duplicate]
猜你喜欢

Architects reveal the difference between working in Alibaba, Tencent and meituan
![[regression analysis] understand ridge regression with case teaching](/img/95/91f6f2a018b8d320945b12562492eb.jpg)
[regression analysis] understand ridge regression with case teaching

What is principal component analysis? Dimension reduction of classical case analysis variables

19. Implementation of MVVM architecture based on WPF event to command

An easy-to-use seal design tool - (can be converted to ofd file)

What is the primordial universe

Understanding and construction of devsecops and Devops

2022 meisai topic C idea sharing + translation

刷入Magisk通用方法

使用php脚本查看已开启的扩展
随机推荐
Use PHP script to view the opened extensions
ARM 立即数
2022 meisai e topic ideas sharing + translation
If you also want to be we media, you might as well listen to Da Zhou's advice
R语言dist函数计算dataframe数据中两两样本之间的距离返回样本间距离矩阵,通过method参数指定距离计算的方法、例如欧几里得距离
Uncover gaussdb (for redis): comprehensive comparison of CODIS
What is principal component analysis? Dimension reduction of classical case analysis variables
Dark horse shopping mall ---2 Distributed file storage fastdfs
R语言使用nnet包的multinom函数构建无序多分类logistic回归模型、使用epiDisplay包的lrtest函数执行多个模型似然比检验对比两个模型的性能是否有差异
Explain factor analysis in simple terms, with case teaching (full)
Why should Apple change objc_ Type declaration for msgsend
什么是Flink?Flink能用来做什么?
MYSQL中对复杂JSON的更新
R language uses the scale function to scale the input data of neural network to the minimum and maximum, scale the data to between 0 and 1, and divide the data set into training set and test set
Why can't you Ping the website but you can access it?
揭秘GaussDB(for Redis):全面对比Codis
How to use SPSS to do grey correlation analysis? Quick grasp of hand-to-hand Teaching
confluence7.4. X upgrade record
Is it safe to open an account and buy stocks on the Internet?
刷入Magisk通用方法