Commit 4a45cebc authored by chenchuanwen's avatar chenchuanwen

Merge branch 'ccw' of git.shenbd.com:qm-develop/shenbd into ccw

parents f4c26d94 7dc8998f
<?php
echo 1;exit;
phpinfo();exit;
header("Content-type: text/html; charset=utf-8");
//利用PHP目录和文件函数遍历用户给出目录的所有的文件和文件夹,修改文件名称
function fRename($dirname)
......
......@@ -11,7 +11,7 @@ class ApiConst
const randLengh = 8;
//10天数秒
const tenDaySecond = 864000;
const tenDaySecond = 2592000;
//const tenDaySecond = 300;
//一天
const threeDaySecond =259200;
......
......@@ -20,6 +20,9 @@ class ImageConst{
//分类图标前缀
const categoryPicPrefix = 'category-pic-';
const categoryHeadPicPrefix = 'category-headpic-';
const topClassAdvImagePrefis = 'category-hdpic-'; //一级分类对应广告图前缀
//商家举报图片存放路径
......
......@@ -55,6 +55,7 @@ class GoodsClassServiceModel extends \Business\AbstractModel{
return array('totalCount'=>\Our\ApiConst::zero);
}
}
/**
* 获取平台全部一级分类
* @param $where
......@@ -65,7 +66,6 @@ class GoodsClassServiceModel extends \Business\AbstractModel{
//验证参数
$addressDao = \DAO\AddressModel::getInstance();
$validFlag = $addressDao->getValidAddress($where);
if(!$validFlag){
......@@ -220,7 +220,6 @@ class GoodsClassServiceModel extends \Business\AbstractModel{
if(!($newStoreIds&&in_array($signClass['store_id'],$newStoreIds))){
$newStoreIds[] = $signClass['store_id'];
}
}
}
foreach($returnClass as $key => $class){
......
......@@ -826,11 +826,12 @@ class StoreServiceModel extends \Business\AbstractModel{
//$expressStores = $this->getExpressStores($gcId,$condition);
$goodsClassList = $goodsClassDao->getOnlineSecondClassList($gcId);
if($goodsClassList){
foreach($goodsClassList as $goodsClass){
$returnStores = array();
$returnStores['gcName'] = htmlspecialchars_decode($goodsClass['gcName']);
//$returnStores['gcImg'] = \Our\Common::getStaticFile(\Our\ImageConst::categoryHeadPicPrefix.$goodsClass['gcId'].\Our\NameConst::jpgSuffix,\Our\ImageConst::defaultPath);
$returnStores['gcImg'] = \Our\Common::getStaticFile('category-headpic-default.jpg',\Our\ImageConst::defaultPath);
$existStoreIds = null;
$returnStores['stores'] = null;
$exitStore = array();
......@@ -863,7 +864,6 @@ class StoreServiceModel extends \Business\AbstractModel{
$returnStores['stores'][] =$purchasedStore;
}
}
if($returnStores['stores']){
foreach($returnStores['stores'] as $key => $tempStore){
$tempDistance[$key] = $tempStore['storeDistance'];
......@@ -873,13 +873,14 @@ class StoreServiceModel extends \Business\AbstractModel{
}
}
if($return){
/*var_dump(json_encode($return));
$tempReturn = array();
foreach($return as $tempVal){
$distance = min(array_column($tempVal['stores'],'storeDistance'));
$tempReturn[$distance] = $tempVal;
}
ksort($tempReturn);
$return = array_values($tempReturn);
$return = array_values($tempReturn);*/
return $return;
}
}
......
......@@ -392,7 +392,7 @@ elastic.master.scheme="http";
resources.database.params.driver = "pdo_mysql"
resources.database.params.hostname = "127.0.0.1"
resources.database.params.port = 3306
resources.database.params.database = "testqmcs"
resources.database.params.database = "qmcs"
resources.database.params.username = "root"
resources.database.params.password = "123456"
resources.database.params.charset = "UTF8"
......@@ -402,7 +402,7 @@ resources.database.params.driver_options.1002 = "SET NAMES utf8"
resources.database.slave.params.driver = "pdo_mysql"
resources.database.slave.params.hostname = "127.0.0.1"
resources.database.slave.params.port = 3306
resources.database.slave.params.database = "testqmcs"
resources.database.slave.params.database = "qmcs"
resources.database.slave.params.username = "root"
resources.database.slave.params.password = "123456"
resources.database.slave.params.charset = "UTF8"
......
<?php
phpinfo();exit;
echo json_encode($_SERVER);exit;
$res=file_exists('/www/web/testadmin_shenbd_com/public_html/data/upload/mall/avatar/member_avatar_26.jpg');
var_dump($res);
exit;
$www_file = '/home/wwwroot/mysite/';
//打开网站目录下的hooks.log文件 需要在服务器上创建 并给写权限
$fs = fopen($www_file . 'hooks.log', 'a');
fwrite($fs, '================ Update Start ===============' . PHP_EOL . PHP_EOL);
//自定义字串掩码 用于验证
$access_token = 's7kjjhh8767laq29KLJK9089883hjjkgfdrrpipoinmw';
//接受的ip数组,也就是允许哪些IP访问这个文件 这里是gitlab服务器IP
$access_ip = array('8.8.8.8');
//获取请求端的ip和token
$client_token = $_GET['token'];
$client_ip = $_SERVER['REMOTE_ADDR'];
//把请求的IP和时间写进log
fwrite($fs, 'Request on [' . date("Y-m-d H:i:s") . '] from [' . $client_ip . ']' . PHP_EOL);
//验证token 有错就写进日志并退出
if ($client_token !== $access_token) {
echo "error 403";
fwrite($fs, "Invalid token [{$client_token}]" . PHP_EOL);
exit(0);
}
//验证ip
if (!in_array($client_ip, $access_ip)) {
echo "error 503";
fwrite($fs, "Invalid ip [{$client_ip}]" . PHP_EOL);
exit(0);
}
//获取请求端发送来的信息,具体格式参见gitlab的文档
$json = file_get_contents('php://input');
$data = json_decode($json, true);
//如果有需要 可以打开下面,把传送过来的信息写进log
//fwrite($fs, 'Data: '.print_r($data, true).PHP_EOL);
//执行shell命令并把返回信息写进日志
$output = shell_exec("cd $www_file &;&; git checkout master &;&; git pull origin master 2>&;1");
fwrite($fs, 'Info:' . $output . PHP_EOL);
fwrite($fs, PHP_EOL . '================ Update End ===============' . PHP_EOL . PHP_EOL);
$fs and fclose($fs);
//网站目录$www_file='/home/wwwroot/mysite/';//打开网站目录下的hooks.log文件 需要在服务器上创建 并给写权限$fs = fopen($www_file.'hooks.log', 'a');fwrite($fs, '================ Update Start ==============='.PHP_EOL.PHP_EOL);//自定义字串掩码 用于验证$access_token = 's7kjjhh8767laq29KLJK9089883hjjkgfdrrpipoinmw';//接受的ip数组,也就是允许哪些IP访问这个文件 这里是gitlab服务器IP$access_ip = array('8.8.8.8');//获取请求端的ip和token$client_token = $_GET['token'];$client_ip = $_SERVER['REMOTE_ADDR'];//把请求的IP和时间写进logfwrite($fs, 'Request on ['.date("Y-m-d H:i:s").'] from ['.$client_ip.']'.PHP_EOL);//验证token 有错就写进日志并退出if ($client_token !== $access_token){echo "error 403";fwrite($fs, "Invalid token [{$client_token}]".PHP_EOL);exit(0);}//验证ipif ( !in_array($client_ip, $access_ip)){echo "error 503";fwrite($fs, "Invalid ip [{$client_ip}]".PHP_EOL);exit(0);}//获取请求端发送来的信息,具体格式参见gitlab的文档$json = file_get_contents('php://input');$data = json_decode($json, true);//如果有需要 可以打开下面,把传送过来的信息写进log//fwrite($fs, 'Data: '.print_r($data, true).PHP_EOL);//执行shell命令并把返回信息写进日志$output=shell_exec("cd $www_file &;&; git checkout master &;&; git pull origin master 2>&;1");fwrite($fs, 'Info:'. $output.PHP_EOL);fwrite($fs,PHP_EOL. '================ Update End ==============='.PHP_EOL.PHP_EOL);$fs and fclose($fs);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment