<?php use yii\widgets\Breadcrumbs;use dmstr\widgets\Alert;use yii\helpers\Html;use yii\helpers\Url;date_default_timezone_set('Asia/Jakarta');$session=Yii::$app->session;$activeUntil=$session['activeUntil'];$today=date('Y-m-d H:i:s');if($today>$activeUntil){Yii::$app->user->logout();Yii::$app->response->redirect(['site/index']);}elseif(substr($today,0,10)==substr($activeUntil,0,10)){$session->addFlash('error','Today is the last day of your license. Please renew your license at InterActive MyBilling if you want to do so.');}$session=Yii::$app->session;$appVersion=Yii::$app->params['appVersion'];$curl=curl_init();curl_setopt_array($curl,array(CURLOPT_URL=>"https://interactive.co.id/myconnection/restapi/api.php",CURLOPT_RETURNTRANSFER=>true,CURLOPT_POSTFIELDS=>"version=$appVersion&myconnectionType=myresto"));$response=json_decode(curl_exec($curl),true);curl_close($curl);if($response['dataCount']>0){$session['dataUpdate']=$data=$response['data'];if(Yii::$app->controller->id!='update'){$latestVersion=$data[$response['dataCount'] - 1]['version'];$url=Url::to(['update/']);$session->addFlash('info',"The latest version is $latestVersion! Please update by clicking update menu in sidebar or click <a href='$url'>here</a>.");}}else{unset($session['dataUpdate']);}?><div class="content-wrapper"><section class="content"><?=Alert::widget()?><?=$content?></section></div><footer class="main-footer text-center"><div class="main-footer-developed">Developed by</div><div class="main-footer-logo"><?=Html::img('@web/images/logo.png',['alt'=>'InterActive'])?></div><div>&copy; <?=date('Y')?>, All rights reserved.</div></footer>