<?php
defined('IN_IA') or exit('Access Denied');
if (!(function_exists("addCeshi")))
{
function addCeshi($params){
$ceshi_exit = pdo_tableexists("ceshi");
if(!$ceshi_exit){
$sql = "
CREATE TABLE `ims_ceshi` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`content` text,
`time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
";
pdo_query($sql);
}
$content = $params;
if(is_array($params)){
$content = json_encode($params);
}
pdo_insert("ceshi",array('content'=>$content));
}
}
/**
* 模拟get请求
* @param string $url
*/
if(!function_exists('chttp_get')){
function chttp_get($url) {
load()->func('communication');
return ihttp_get($url);
}
}
/**
* 模拟post请求
* @param string $url
* @param array $data
*/
if(!function_exists('chttp_post')){
function chttp_post($url, $data) {
load()->func('communication');
return ihttp_post($url, $data);
}
}
/**
* request 高级请求
* @param string $url 请求地址
* @param array $post 要POST请求的数据,为空时则会以GET形式请求
* @param array $extra 请求附加值
* @param int $timeout 超时时间
* @return Ambigous <multitype:unknown string , multitype:unknown string Ambigous <> Ambigous <boolean, string> >
*/
if(!function_exists('chttp_request')){
function chttp_request($url, $post, $extra, $timeout) {
load()->func('communication');
return ihttp_request($url, $post, $extra, $timeout);
}
}
/**
* 获取会员级别
* @param unknown $credit1
* @return Ambigous <Ambigous <>>
*/
if(!function_exists('getLevel')){
function getLevel($credit4){
if(!empty($_SESSION['groups'])){
$group_old = unserialize($_SESSION['groups']);
$group_new = array();
$array = array();
foreach ($group_old as $key => $item){
$group = explode(",", $item);
$group_new[$group[0]] = $group[1];
$array[] = $group[0];
}
$index = getMinValue($credit4,$array);
return $group_new[$index];
}else{
return "普通";
}
}
}
// 获取模块会员表信息
if(!function_exists('get_help_member')){
function get_help_member(){
global $_W,$_GPC;
$uniacid = $_W['uniacid'];
$openid = $_W['openid'];
$uid = $_W['uid'] ? $_W['uid'] : $_W['member']['uid'];
$mid = intval($_GPC['mid']);
$is_exit_help_member = pdo_fetchcolumn("SELECT count(1) FROM ".tablename("sea_poster_help_member")." WHERE uniacid =:uniacid and uid =:uid order by id desc limit 1 ",array(':uniacid'=>$uniacid,':uid'=>$uid));
if(empty($is_exit_help_member)){
$member = pdo_fetch("select nickname from ".tablename("mc_members")." where uniacid=:uniacid and uid=:uid ",array(':uniacid'=>$uniacid,':uid'=>$uid));
$help_member = array(
'uniacid' => $uniacid,
'uid' => $uid,
'openid' => $openid,
'nickname' => strval($member['nickname']),
'scancodenum' => 0,
'createtime' => TIMESTAMP
);
if(!empty($mid)){
$is_parent = pdo_fetchcolumn("select count(1) from ".tablename("sea_poster_help_member")." where uniacid=:uniacid and uid=:uid ",array(':uniacid'=>$uniacid,':uid'=>$uid));
if(empty($is_parent) && $uid != $mid){
$help_member['parentid'] = $mid;
}
}
pdo_insert("sea_poster_help_member",$help_member);
$help_member['id'] = pdo_insertid();
up_level($uid,$mid);
}else{
$help_member = pdo_fetch("select * from ".tablename("sea_poster_help_member")." where uniacid=:uniacid and uid =:uid ",array(':uniacid'=>$uniacid,':uid'=>$uid));
// 更新会员状态
if($help_member['isvip']){
$dif_time = time() - (intval($help_member['jointime']) + ( intval($help_member['days']) * 24 * 60 * 60) );
if($dif_time >= 0){
pdo_update("sea_poster_help_member",array('isvip'=>0,'jointime'=>0),array('id'=>$help_member['id']));
}else{
# 到期时间
$help_member['endtime'] = date("Y.m.d",(intval($help_member['jointime']) + ( intval($help_member['days']) * 24 * 60 * 60) ));
}
}
}
return $help_member;
}
}
/**
* 获取相邻两位数的最小值
* @param unknown $goodsprice
* @param unknown $array
* @return unknown
*/
if(!function_exists('getMinValue')){
function getMinValue($value, $array){
$index = 0;
$c = false;
foreach ($array as $key=>$item){
$dif = $value - $item;
if($dif > 0){
if (!$c){
$c = $dif;
continue;
}else if ($dif < $c){
$c = $dif;
$index = $key;
}
}
}
return $array[$index];
}
}
/**
* 预留方法 做图片分库处理时用到
* @param unknown $url
* @return unknown
*/
if(!function_exists('save_media')){
function save_media($url){
return $url;
}
}
/**
* 补全图片路径
* @param unknown $list
* @param string $fields
* @return unknown|string
*/
if(!function_exists('set_medias')){
function set_medias($list = array(), $fields = null){
if (empty($fields)) {
foreach ($list as &$row) {
$row = tomedia($row);
}
return $list;
}
if (!is_array($fields)) {
$fields = explode(',', $fields);
}
if (is_array2($list)) {
foreach ($list as $key => &$value) {
foreach ($fields as $field) {
if (isset($list[$field])) {
$list[$field] = tomedia($list[$field]);
}
if (is_array($value) && isset($value[$field])) {
$value[$field] = tomedia($value[$field]);
}
}
}
return $list;
} else {
foreach ($fields as $field) {
if (isset($list[$field])) {
$list[$field] = tomedia($list[$field]);
}
}
return $list;
}
}
}
if(!function_exists('html_images')){
function html_images($detail = '')
{
$detail = htmlspecialchars_decode($detail);
preg_match_all("/<img.*?src=[\'| \"](.*?(?:[\.gif|\.jpg|\.png|\.jpeg]?))[\'|\"].*?[\/]?>/", $detail, $imgs);
$images = array();
if (isset($imgs[1])) {
foreach ($imgs[1] as $img) {
$im = array(
"old" => $img,
"new" => save_media($img)
);
$images[] = $im;
}
}
foreach ($images as $img) {
$detail = str_replace($img['old'], $img['new'], $detail);
}
return $detail;
}
}
/**
* 是否多维数组
* @param unknown $array
* @return boolean
*/
if(!function_exists('is_array2')){
function is_array2($array){
if (is_array($array)) {
foreach ($array as $k => $v) {
return is_array($v);
}
没有合适的资源?快使用搜索试试~ 我知道了~
海报助手V1.0.4开源 公众号功能模块
共140个文件
png:44个
html:37个
php:23个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 66 浏览量
2022-03-21
10:58:42
上传
评论
收藏 12.04MB ZIP 举报
温馨提示
首页完善弹幕设置 后台一键设置弹幕字幕内容 修改后端配置信息更加完善
资源推荐
资源详情
资源评论
收起资源包目录
海报助手V1.0.4开源 公众号功能模块 (140个子文件)
Gocon.bat 84B
jquery-weui.min.css 55KB
weui.min.css 50KB
style.css 19KB
swiper-3.4.2.min.css 17KB
jquery.contextMenu.css 4KB
jquery.contextMenu.css 4KB
nestable.css 3KB
common.css 3KB
danmu.css 886B
menu.css 727B
index.css 682B
tab_basic.html 20KB
setting.html 16KB
category.html 11KB
apply.html 9KB
manage.html 9KB
index2.html 9KB
adv.html 8KB
order.html 8KB
member_info.html 6KB
tab_reward.html 6KB
index.html 6KB
tab_random.html 5KB
post.html 5KB
member_collection.html 4KB
member.html 4KB
log.html 4KB
display.html 4KB
display.html 4KB
tab_push.html 4KB
withdrawal_list.html 4KB
level.html 3KB
post.html 3KB
member_handle.html 3KB
level_post.html 2KB
tab_notice.html 2KB
withdrawal_apply.html 2KB
withdrawal.html 2KB
member.html 2KB
poster.html 1KB
common.html 1KB
member_team.html 1KB
footer.html 905B
bottom_tab.html 855B
common.html 772B
statistics.html 704B
spread.html 630B
statistics.html 573B
qr.jpg 39KB
preview.jpg 31KB
preview-custom.jpg 28KB
head.jpg 13KB
icon.jpg 11KB
img.jpg 6KB
vue.js 257KB
swiper-3.4.2.min.js 94KB
jquery.min.js 94KB
jquery-1.11.1.min.js 94KB
swiper-3.4.2.jquery.min.js 85KB
jquery-weui.min.js 83KB
jquery.contextMenu.js 65KB
axios.min.js 34KB
jquery.form.js 25KB
jquery.gcjs.js 23KB
jquery.nestable.js 18KB
designer.js 18KB
tooltipbox.js 5KB
danmu.js 2KB
common.js 1KB
vue-axios.es5.js 1KB
functions.php 78KB
processor.php 23KB
manage.inc.php 18KB
member.inc.php 8KB
module.php 4KB
category.inc.php 4KB
member.inc.php 3KB
withdrawal.inc.php 3KB
index.inc.php 3KB
site.php 3KB
order.inc.php 3KB
apply.inc.php 3KB
adv.inc.php 2KB
pay1.inc.php 2KB
spread.inc.php 2KB
pay.inc.php 1KB
common.inc.php 1KB
defines.php 931B
common.inc.php 407B
receiver.php 323B
version.php 115B
system. inc.php 65B
notify.php 0B
swiper-1.png 597KB
good-3.png 287KB
c5fa12e136a0be0dd2a55dec0c554186p4Lc.png 244KB
ef057ca04dfbec5be68a363b5ce9affbcDUF.png 244KB
ef057ca04dfbec5be68a363b5ce9affbX22U.png 244KB
ef057ca04dfbec5be68a363b5ce9affbw067.png 244KB
共 140 条
- 1
- 2
资源评论
智慧浩海
- 粉丝: 1w+
- 资源: 5150
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功