Application/Erpadmin/Controller/ErpadminbaseController.class.php

(完整代码) 1KB

<?php

	/*******************************************************************\
	|																	|
	|	房哨(多中介管理运营平台系统)									|
	|																	|
	|	© 2018-2023 http://www.kaidandashi.com/ All rights reserved.	|
	|																	|
	|	本系统由淮南市银泰软件科技有限公司提供技术支持					|
	|																	|
	|	QQ号:984784483													|
	|																	|
	\*******************************************************************/

	namespace Erpadmin\Controller;
	use Think\Controller;
	use Common\Controller\BaseController;
	class ErpadminbaseController extends BaseController {

		public function _initialize(){
			parent::_initialize();
			if (!isset($_SESSION['erp_user'])) {
				$this->redirect('Login/index');
			}
			$this->userinfo = session('erp_user');
		}

		public function getThisWeekOf($date){
			$dates = array();
			$time = strtotime($date.' 12:00:00');
			$w = date('w', $time);
			if($w == 0){
				$nextMonday = 1;
			} else {
				$nextMonday = 7 - $w + 1;
			}
			for($i = $nextMonday; $i<$nextMonday + 7; $i++){
				$dates[] = date('Y-m-d', $time + 3600*24*$i - 3600*24*7);
			}
			return $dates;
		}

		public function getNextWeekOf($date){
			$dates = array();
			$time = strtotime($date.' 12:00:00');
			$w = date('w', $time);
			if($w == 0){
				$nextMonday = 1;
			} else {
				$nextMonday = 7 - $w + 1;
			}
			for($i = $nextMonday; $i<$nextMonday + 7; $i++){
				$dates[] = date('Y-m-d', $time + 3600*24*$i);
			}
			return $dates;
		}

	}

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。