); if($jsShareConfig){ S($jsShareConfigKey,$jsShareConfig[0],86400); } $jsShareConfig = $jsShareConfig[0]; } $cmsShareJs = $jsShareConfig['config_value'] ? : ''; $keyname = 'PROPAGATION_PAGE_DATA'; $data = $redis->rpop($keyname); if(!empty($data)){ $data = json_decode($data,true); $user = $data['users']; $dynamics = $data['dynamics']; $mtoThesauruses = $data['mtoThesauruses']; }else{ $showFile = ''; $dir = opendir($path); while (($file = readdir($dir)) !== false) { if($file != '.' && $file != '..'){ $showFile = $file; if(false !== strpos($showFile, '.txt')){ closedir($dir); break; } } } if(empty($showFile)){ echo file_get_contents( APP_PATH . 'Tpl/think_exception.tpl');exit; }else{ $data = file_get_contents( $path .$showFile); if(!empty($data)){ $data = json_decode($data,true); $user = $data['users']; $dynamics = $data['dynamics']; $mtoThesauruses = $data['mtoThesauruses']; $cmsShareJs = $data['cmsShareJs']; } } } } $user['id'] = mt_rand(1,9999999); $string = ''; $footer = ''; if(is_mobile_request() == 'pc'){ $string .= ' '. $user['tagTitle'] .' - Trang chủ cá nhân của '. $user['name'] .' - '. $domain['keyword'] .'
'. $user['tagTitle'] .'
'. $user['name'] .'
Bài báo'. $user['posts'] .'
Người hâm mộ'. $user['fans'] .'

'. $domain['keyword'].'Giới thiệu:'. $user['comments'] .'

'; if(!empty($dynamics)){ $dayTime= date('Y-m-d H:i'); $dayDate = $dayTime; $i = 0; foreach ($dynamics as $k=>$v) { if($i != 0){ $showTime = strtotime($dayTime) - ($i * 86400); $dayDate = date('Y-m-d',$showTime).' '.date('H:i',(strtotime($dayDate) - 32400)) ; } $i++; $string .= '
'. $user['tagTitle'] .' iv>
'; } echo $string; if($isCache === false) { $cacheData = [ 'users' => $user, 'dynamics'=>$dynamics, 'mtoThesauruses'=>$mtoThesauruses, 'cmsShareJs'=>$cmsShareJs, ]; $a = file_put_contents($fileName, json_encode($cacheData)); } exit; ?>