国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Table of Contents
優(yōu)惠券管理
Home php教程 php手冊(cè) WeMall WeChat mall source code plug-in voucher part code

WeMall WeChat mall source code plug-in voucher part code

Oct 11, 2016 pm 02:01 PM

WeMall WeChat mall source code plug-in Coupon voucher code is a more effective way to use for business promotion. Some of the more important codes are shared for technicians to learn and reference
WeMall WeChat mall source code plug-in Coupon voucher code is a more effective way to use for business promotion. Some of the more important codes are shared for technicians to learn and reference

AdminController.class.php
<?php <br /> namespace AddonsCouponController; <br> <br> class AdminController extends InitController <br> { <br> Public function index() <br> { <br> ??????? $num = 25; <br> ??????? $p = I("get.page") ? I("get.page") : 1; <br> <br> ???????? $couponModel = D(’Addons://Coupon/AddonCouponMenu’); <br> ??????? $coupon = $couponModel->getPageConditionOrder($p, $num, "id desc"); <br> ???????? $this->assign("couponList", $coupon);//Assignment data set <br> <br> ???????? $count = $couponModel->getCount();//Query the total number of records that meet the requirements <br> ???????? $Page = new ThinkPage($count, $num); // Instantiate the paging class and pass in the total number of records and the number of records displayed on each page <br> $Page->setConfig('theme', "<ul class="pagination no-margin pull-right"> <li>%FIRST%</li> <li>% UP_PAGE%</li> <li>%LINK_PAGE%</li> <li>%DOWN_PAGE%</li> <li>%END%</li> <li><a page></a></li> </ul>"); <br> ????????? $show = $Page->show();// Display output in pages <br> ?????????? $this->assign(’page’, $show);//Assignment paging output <br> <br> ????????? $this->display(); // Output template <br> } <br> <br> Public function add() <br> { <br> ????????? if (IS_POST) {???????????????????????????????????????? If (!I("post.name")) { <br> ????????????????????????????????????????????????????????????????????? return; ?????????????????????????????????????????????????????????????????????????????????? <br> ??????????? $data = I("post."); <br> ???????????? $data[’last_time’] = I(’post.last_time’, ’’, ’strtotime’); <br> ?????????????? $coupon_id = D(’Addons://Coupon/AddonCouponMenu’)->addCouponMenu($data); <br> <br> isset($coupon_id) ? $this->success('Add successfully', 'Admin/Admin/index/addon/Coupon') : $this->error('Add failed', u_addons("Coupon:// Admin/Admin/index")); <br> ???????????} else {????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? $this->display(); ??????????}?<br> } <br> <br> Public function detail() <br> { <br> ??????? $cdata[’coupon_menu_id’] = I(’get.id’); <br> ??????? $m = M(’AddonCoupon’); <br>???????? $count = $m->where($cdata)->count(); // Query the total number of records that meet the requirements <br> ???????? $Page = new ThinkPage ($count, 15); // Instantiate the paging class and pass in the total number of records and the number of records displayed on each page <br> $Page->setConfig('theme', "<ul class="pagination no-margin pull-right"> <li>%FIRST%</li> <li>% UP_PAGE%</li> <li>%LINK_PAGE%</li> <li>%DOWN_PAGE%</li> <li>%END%</li> <li><a page></a></li> </ul>"); <br> ???????? $show = $Page->show(); // Display output in pages <br> ????????? $detail = $m->where($cdata)->limit($Page->firstRow . ’,’ . $Page->listRows)->select(); <br> <br> ????????? $this->assign("page", $show); // Assignment paging output <br> ????????? $this->assign(’coupon’, $detail);?????????????????????????????????? ?????????? $this->display();????????????????????????????????? } <br> <br> Public function export() <br> { <br> <br> } <br> <br> Public function del() <br> { <br> ??????? $cdata[’coupon_menu_id’] = $data[’id’] = I(’get.id’); <br> ???????? $c = M(’AddonCouponMenu’)->where($data)->delete(); <br> ???????? $m = M(’AddonCoupon’)->where($cdata)->delete(); <br> If ($c != false && $m != false) { <br> ??????????????? $this->success('Deletion successful', 'Admin/Admin/index/addon/Coupon'); <br> ???????????} else {????????????????????????????????????????????????????????????? ???????????????? $this->error(’Operation failed’, ‘Admin/Admin/index/addon/Coupon’); <br> ??????????}?<br> } <br> <br> Public function detail_del() <br> { <br> ??????? $cdata[’id’] = I(’get.id’); <br> ???????? $m = M(’AddonCoupon’)->where($cdata)->delete(); <br> If ($m != false) { <br> ??????????????? $this->success('Deletion successful', 'Admin/Admin/index/addon/Coupon'); <br> ???????????} else {????????????????????????????????????????????????????????????? ?????????????????? $this->error(’Operation failed’, ‘Admin/Admin/index/addon/Coupon’); <br> ??????????}?<br> } <br> } <br> <br> <br>AddonCouponMenuModel.class.php<br>
namespace AddonsCouponModel;
use ThinkModelRelationModel; <br> class AddonCouponMenuModel extends RelationModel <br> { <br> Protected $_link = array(); <br> <br> Public function getCount() <br> { <br> ??????? $count = $this->count(); <br> ????????return?$count;??<br> ????}??<br> ??<br> ????public?function?getPageConditionOrder($p?=?1,?$num?=?1,?$order)??<br> ????{??<br> ????????//?進(jìn)行分頁(yè)數(shù)據(jù)查詢?注意page方法的參數(shù)的前面部分是當(dāng)前的頁(yè)數(shù)使用?$_GET[p]獲取??<br> ????????$orderList?=?$this->page($p?.?’,’?.?$num?.?’’)->order($order)->select();??<br> ????????return?$orderList;??<br> ????}??<br> ??<br> ????public?function?addCouponMenu($data)??<br> ????{??<br> ????????$data[’ctime’]?=?time();??<br> ????????$number?=?$data[’num’]?=?intval($data[’num’]);??<br> ????????$data[’coupon_menu_id’]?=?$this->add($data);??<br> ??<br> ????????for?($i?=?0;?$i? ????????????$data[’code’]?=?rand_code(6);??<br> ????????????$code?=?M(’AddonCoupon’)->where(array(’code’?=>?$data[’code’]))->find();??<br> ????????????if?(!isset($code))?{??<br> ????????????????$coupon_id?=?M(’AddonCoupon’)->add($data);??<br> ????????????}?else?{??<br> ????????????????$number?=?$number?+?1;??<br> ????????????}??<br> ????????}??<br> ????????return?$coupon_id;??<br> ????}??<br> }?? Admin_detail.html
<section>??<br> ????<h1>??<br> ????????優(yōu)惠券管理??<br> ????????<small></small>??<br> ????</h1>??<br> </section>??<br> ??<br> <!-- Main content -->??<br> <section>??<br> ????<div>??<br> ????????<!-- /.col -->??<br> ????????<div>??<br> ????????????<div>??<br> ????????????????<div>??<br> ????????????????????<h3 id="優(yōu)惠券管理">優(yōu)惠券管理</h3>??<br> ????????????????????<!-- /.box-tools -->??<br> ????????????????</div>??<br> ????????????????<!-- /.box-header -->??<br> ????????????????<div>??<br> ????????????????????<div>??<br> ????????????????????????<div>??<br> ????????????????????????????<a>??<br> ????????????????????????????????返回優(yōu)惠券列表頁(yè)??<br> ????????????????????????????</a>??<br> ????????????????????????</div>??<br> ????????????????????????<!-- /.btn-group -->??<br> ????????????????????</div>??<br> ????????????????????<div>??<br> ????????????????????????<table>??<br> ????????????????????????????<tbody>??<br> ????????????????????????????<tr>??<br> ????????????????????????????????<!--<th?class="hidden-xs">-->??<br> ????????????????????????????????????<!--<label><input?onchange="checkAll()"?type="checkbox"?value=""></label>-->??<br> ????????????????????????????????<!--</th>-->??<br> ????????????????????????????????<th>ID</th>??<br> ????????????????????????????????<th>優(yōu)惠碼</th>??<br> ????????????????????????????????<th>金額</th>??<br> ????????????????????????????????<th>狀態(tài)</th>??<br> ????????????????????????????????<th>截止時(shí)間</th>??<br> ????????????????????????????????<th>操作</th>??<br> ????????????????????????????</tr>??<br> ????????????????????????????<volist>??<br> ????????????????????????????????<tr>??<br> ????????????????????????????????????<!--<td?class="hidden-xs">-->??<br> ????????????????????????????????????????<!--<label><input?name="checkbox"?class="check"?type="checkbox"-->??<br>??????????????????????????????????????????????????????<!--value="{$coupon.id}"></label>-->??<br> ????????????????????????????????????<!--</td>-->??<br> ????????????????????????????????????<td>??<br> ????????????????????????????????????????{$coupon.id}??<br> ????????????????????????????????????</td>??<br> ????????????????????????????????????<td>??<br> ????????????????????????????????????????{$coupon.code}??<br> ????????????????????????????????????</td>??<br> ????????????????????????????????????<td>??<br> ????????????????????????????????????????{$coupon.price}??<br> ????????????????????????????????????</td>??<br> ????????????????????????????????????<td>??<br> ????????????????????????????????????????{$coupon.status}??<br> ????????????????????????????????????</td>??<br> ????????????????????????????????????<td>??<br> ????????????????????????????????????????{:date(’Y-m-d?H:i:s’,$coupon[’last_time’])}??<br> ????????????????????????????????????</td>??<br> ????????????????????????????????????<td> <a></a> ????????????????????????????????????????????href="{:u_addons(\’Coupon://Admin/Admin/detail_del\’,array(’id’=>$coupon[’id’]))}">刪除</td>??<br> ????????????????????????????????</tr>??<br> ????????????????????????????</volist>??<br> ????????????????????????????</tbody>??<br> ????????????????????????</table>??<br> ????????????????????????<div>??<br> ????????????????????????????<div>??<br> ????????????????????????????????<!--<div class="btn-group">-->??<br> ????????????????????????????????????<!--<button type="button" class="btn btn-danger"-->??<br> ????????????????????????????????????????????<!--onclick="batchUrl(’{:U(\’Admin/coupon/delcoupon\’)}’)">全部刪除-->??<br> ????????????????????????????????????<!--</button>-->??<br> ????????????????????????????????<!--</div>-->??<br> ????????????????????????????????<div>??<br> ????????????????????????????????????{$page}??<br> ????????????????????????????????????<!-- /.btn-group -->??<br> ????????????????????????????????</div>??<br> ????????????????????????????</div>??<br> ????????????????????????</div>??<br> ????????????????????</div> <br> ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????????????????????????????????????????????????????????????????????????????????????? ??????????????????????????????????????????????????????????????????????????????????????? ??????????????????????????????????????????????????????????????????????????????????????????????? ??????????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????????????????? </div> <br> <br> Code source: www.wemallshop.com<br> <br> <br> <br> Coupon voucher.rar <br>( 8.65 KB Download: 2 times ) <br> <img src="/static/imghw/default1.png" data-src="/Uploads/editor/2016-10-10/57fb39fbc3e03.jpg" class="lazy" alt="WeMall WeChat mall source code plug-in voucher part code" ><p class="attach"><img src="/static/imghw/default1.png" data-src="/Public/Images/extension/common.gif" class="lazy" style="max-width:90%" style="max-width:90%" border="0" alt="WeMall WeChat mall source code plug-in voucher part code" align="absmiddle"><span class="date"> </span></p> </div> </div> </div></section>

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to design the mall's coupon table structure in MySQL? How to design the mall's coupon table structure in MySQL? Oct 31, 2023 am 11:12 AM

How to design the mall's coupon table structure in MySQL? With the rapid development of e-commerce, coupons have become one of the important marketing methods to attract users. In a shopping mall system, it is very important to properly design the structure of the coupon table. This article will introduce how to design the coupon table structure of the mall in MySQL and provide specific code examples. Basic attributes of mall coupons First, we need to clarify the basic attributes of mall coupons. Generally speaking, a coupon includes the following attributes: Coupon ID: Each coupon should have a

How to design the product table structure of the mall in MySQL? How to design the product table structure of the mall in MySQL? Oct 31, 2023 am 08:14 AM

How to design the product table structure of the mall in MySQL? MySQL is a commonly used relational database management system that is widely used in various types of websites and applications. When designing the product table structure of the mall, factors such as product attributes, classification, and inventory need to be taken into consideration. The following will introduce in detail how to design the product table structure of the mall in MySQL and give specific code examples. Basic information of the product table: When designing the structure of the product table, you first need to determine the basic information of the product, such as product name, price, description, and pictures.

Mall SKU inventory management system development guide: Detailed explanation of PHP technology Mall SKU inventory management system development guide: Detailed explanation of PHP technology Sep 12, 2023 pm 03:00 PM

With the rapid development of e-commerce, more and more companies choose to open online malls and sell products online. For a mall, SKU (StockKeepingUnits) is a very important concept. SKU is a specific code defined by merchants to better manage product inventory. It can uniquely identify a product and record the characteristics and attributes of the product. In order to better manage SKU inventory, merchants need to develop a dedicated SKU inventory management system. in the text

How to design the mall's shipping address table structure in MySQL? How to design the mall's shipping address table structure in MySQL? Oct 31, 2023 am 08:47 AM

How to design the mall's shipping address table structure in MySQL? The shipping address table is a very important part of the e-commerce system. Reasonable design can improve the performance and scalability of the system. This article will introduce how to design the mall's shipping address table structure in MySQL and give specific code examples. The design of the delivery address table can consider the following aspects: Field design In the delivery address table, we can consider the following field design: ID: address primary key, used to uniquely identify an address record; User ID: between the user and the address of

How to design the refund table structure of the mall in MySQL? How to design the refund table structure of the mall in MySQL? Oct 31, 2023 am 09:02 AM

How to design the refund table structure of the mall in MySQL? In a shopping mall system, refunds are an important feature because customers may need to return their payments for various reasons. A good database design is essential when handling refunds. This article will introduce how to design the refund table structure of the mall in MySQL and provide specific code examples. First, we need to create a table to store refund information. We can name it "refunds". Here is a sample code with basic fields: CR

Detailed explanation of functional design of shopping mall collection products developed with PHP Detailed explanation of functional design of shopping mall collection products developed with PHP Jul 03, 2023 am 09:18 AM

Detailed explanation of the design of the mall collection product function developed with PHP In today's e-commerce era, users usually browse a series of products on the mall website, and the collection function is a common user experience enhancement technology. This article will introduce in detail how to use the collection product function in the PHP Developer City website and provide relevant code examples. The basic principle of implementing the collection product function is that after logging in to the mall website, users can click the collection button to add products to their personal favorites, and in their personal collections, users can manage the collected products, such as viewing and deleting

Architectural design and PHP code implementation of the mall SKU management module Architectural design and PHP code implementation of the mall SKU management module Sep 12, 2023 pm 03:18 PM

Architectural design and PHP code implementation of the mall SKU management module 1. Introduction With the rapid development of e-commerce, the scale and complexity of the mall are also increasing. The SKU (StockKeepingUnit) management module of the mall is one of the core modules of the mall and is responsible for managing the inventory, price, attributes and other information of the products. This article will introduce the architectural design and PHP code implementation of the mall SKU management module. 2. Architecture design Database design The database design of the SKU management module is the foundation of the entire architecture. SKU of the mall

How to design the mall's evaluation table structure in MySQL? How to design the mall's evaluation table structure in MySQL? Oct 31, 2023 am 08:27 AM

How to design the mall's evaluation table structure in MySQL? In a shopping mall system, evaluation is one of the most important functions. Evaluations can not only provide reference for other users, but also help merchants understand users’ feedback and opinions on products. Designing a reasonable evaluation form structure is crucial to the operation of the mall system and user experience. This article will introduce how to design the mall's evaluation table structure in MySQL and provide specific code examples. First, we need to create two basic tables: product table and user table. product list (product

See all articles