|
@@ -8,6 +8,7 @@ defined('InShopNC') or exit('Access Invalid!');
|
|
|
|
|
|
include(BASE_CONFIG_PATH . CONFIG_PREFIX . '/refill.ini.php');
|
|
|
require_once(BASE_HELPER_PATH . '/stat_helper.php');
|
|
|
+require_once(BASE_ROOT_PATH . '/helper/refill/functional.php');
|
|
|
|
|
|
class merchantControl extends SystemControl
|
|
|
{
|
|
@@ -152,7 +153,8 @@ class merchantControl extends SystemControl
|
|
|
showMessage('机构信息有误');
|
|
|
}
|
|
|
|
|
|
- if (chksubmit()) {
|
|
|
+ if (chksubmit())
|
|
|
+ {
|
|
|
$update_credit_bonus = ncPriceFormat($_POST['credit_bonus']);
|
|
|
$operatetype = $_POST['operatetype'];
|
|
|
if ($update_credit_bonus > 0) {
|
|
@@ -170,8 +172,27 @@ class merchantControl extends SystemControl
|
|
|
$update['org_pwd'] = trim($_POST['password']);
|
|
|
$update['password'] = md5($update['org_pwd']);
|
|
|
$update['alarm_amount'] = $_POST['alarm_amount'] ?? 0;
|
|
|
- $update['time_out'] = intval($_POST['time_out']);
|
|
|
- $update['night_timeout'] = intval($_POST['night_timeout']);
|
|
|
+
|
|
|
+ $day_timeout = intval($_POST['day_timeout']);
|
|
|
+ $night_timeout = intval($_POST['night_timeout']);
|
|
|
+
|
|
|
+ if($day_timeout <= 0) {
|
|
|
+ $day_timeout = 180;
|
|
|
+ }
|
|
|
+
|
|
|
+ if($night_timeout < $day_timeout) {
|
|
|
+ $night_timeout = $day_timeout;
|
|
|
+ }
|
|
|
+
|
|
|
+ $update['day_timeout'] = $day_timeout;
|
|
|
+ $update['night_timeout'] = $night_timeout;
|
|
|
+
|
|
|
+ if(refill\functional::isDay()) {
|
|
|
+ $update['time_out'] = intval($_POST['day_timeout']);
|
|
|
+ } else {
|
|
|
+ $update['time_out'] = intval($_POST['night_timeout']);
|
|
|
+ }
|
|
|
+
|
|
|
$update['quality'] = intval($_POST['quality']);
|
|
|
$update['oil_quality'] = intval($_POST['oil_quality']);
|
|
|
$member_id = $merchant['admin_id'];
|