diff --git a/inc/config.php b/inc/config.php index 7aa5375..4cee201 100644 --- a/inc/config.php +++ b/inc/config.php @@ -2,7 +2,7 @@ $_CONFIG = array( //数据库相关 'db' =>array( - 'ip'=>'127.0.0.1', #数据库服务器IP + 'ip'=>'10.0.0.38', #数据库服务器IP 'username'=>'root', #用户名 'pwd'=>'root', #密码 'database'=>'leguevent', #数据库名 diff --git a/pmcalendar.php b/pmcalendar.php index 38975b1..a532df1 100644 --- a/pmcalendar.php +++ b/pmcalendar.php @@ -110,16 +110,16 @@ $issxarole = in_array($user['name'], $SXAROLES); //可以添加上线卡片 $isyqeroles = in_array($user['name'], $YQEROLES); //调试 -// $user['name'] = "罗松柏"; -// $canEdit = 1; -//$isgxyyerole=1; -//$isgxcperole=1; -//$isgxyferole=1; -//$isxfvrole=1; -//$isxfyyerole=1; -//$isdbcperole=1; -//$isdbyferole=1; -//$isyqeroles =1; +$user['name'] = "吴昊"; +$canEdit = 1; +$isgxyyerole=1; +$isgxcperole=1; +$isgxyferole=1; +$isxfvrole=1; +$isxfyyerole=1; +$isdbcperole=1; +$isdbyferole=1; +$isyqeroles =1; function fix2($v) { @@ -250,6 +250,13 @@ if ($act == 'newevent') { $sql = DB::update('calendar', $dict, "id='{$id}'"); DB::exe($sql); + +// 钉钉通知 + if(in_array($event['event'],['打包','版本更新','上线'])) { + $yanqiType = $isYanqi == 1 ? '延期' : '提前'; + push("{$user['name']}对【{$event['game']}】进行了{$yanqiType}调整", "{$user['name']}对【{$event['game']}】进行了{$yanqiType}调整\n\n调整时间:由原来的{$event['start']} {$event['event']}\n\n 调整到:{$dict['end']}\n\n调整原因:{$reason}", '吴昊'); + } + we('1'); } else if ($act == 'delevent') { $id = r('id');