Commit 6b8ee3cc authored by platyhouse's avatar platyhouse

.

parent 7e757506
......@@ -2,90 +2,12 @@
// ptyPost(".")
</script>
<?php
$newAppVer = "2.2.0";
{
require_once(PLATYFRAMEWORK_SYSTEMDIR . "/platyLibrary/external/simpleHtmlDom/simple_html_dom.php");
$package_name = $this->config->mobileapp->packageName;
$fileName = "/tmp/play_google_com_store_".$package_name;
// 파일이 없거나 3시간이 지났다면 다시 읽기
$filemtime = filemtime($fileName);
if (!file_exists($fileName) || $filemtime < time() - (60 * 60 * 3)) {
$content = file_get_contents('https://play.google.com/store/apps/details?id=' . $package_name);
file_put_contents($fileName, $content);
}
else
$content = file_get_contents($fileName);
$html = pty_str_get_html($content, true);
if (isset($html) && $html) {
foreach ($html->find('div') as $i => $element) {
if ($element->plaintext == "Current Version" || $element->plaintext == "현재 버전") {
$appVersion = trim($element->next_sibling()->plaintext);
}
}
/*
//업체명 파싱
foreach ($html->find('a.primary') as $element) {
$data['company'] = $element->plaintext;
}
//어플이름 파싱
foreach ($html->find('div[itemprop=name]') as $element) {
$data['name'] = $element->find('div', 0)->plaintext;
}
//카테고리
foreach ($html->find('a.category') as $element) {
$data['cate'] = $element->find('span', 0)->plaintext;
}
//메인 아이콘
foreach ($html->find('img.cover-image') as $element) {
$data['icon'][] = $element->src;
}
//썸네일 이미지 파싱
foreach ($html->find('img.full-screenshot') as $element) {
$data['thumb'][] = $element->src;
}
//설명글 파싱
foreach ($html->find('div.app-orig-desc') as $element) {
$data['description'] = $element->plaintext;
}
//최신버전 파싱
foreach ($html->find('div[itemprop=softwareVersion]') as $element) {
$data['version'][] = $element->plaintext;
}
foreach ($html->find('div[itemprop=numDownloads]') as $element) {
$data['downloadCount'][] = $element->plaintext;
}
$appVersion = trim($data['version'][0]);
*/
if (version_compare($newAppVer, $appVersion) > 0)
{
$needUpdate = true;
}
}
// ptyDebug("$needUpdate, $newAppVer, $appVersion", "needUpdate");
}
?>
<? if ($needUpdate) { ?>
<div class="animated flash alert alert-info alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-bell"></i> 앱 업데이트 안내 - v<?=$newAppVer?></h4>
새로운 버전이 출시되었습니다. <a href="/admin/support/notice/item/?id=19">이동</a> 하여 가이드에 따라 최신 앱을 등록해 주세요<br>
새로운 버전이 출시되었습니다. <a href="http://dev.storyshare.platyhouse.com/admin/support/notice/items/?id=575">이동</a> 하여 가이드에 따라 최신 앱을 등록해 주세요<br>
<? if (false) { ?>관리자페이지 문의 : 010-6363-7977(매니져) <? } ?>
</div>
<? } ?>
......@@ -99,6 +21,13 @@ $newAppVer = "2.2.0";
</div>
<? } ?>
<? if (false) {?>
<!-- 서버 모니터링 시작 -->
<script id="ptyadsense_script" type="text/javascript" src="//apps.platyhouse.com/modules/ptyadsense/script_v1.js" async></script>
<div id="ptyadsense_contents" data-accessToken="<?=$ptyAppsAccessToken?>"></div>
<!-- 서버 모니터링 종료 -->
<? } ?>
<? if (false) { ?>
<div class="row">
<div class="col-lg-12 col-xs-12">
......@@ -178,6 +107,12 @@ $newAppVer = "2.2.0";
</div>
</div>
</div>
<? if (false) {?>
<!-- 서버 모니터링 시작 -->
<script id="ptyservermonitor-script" type="text/javascript" src="//apps.platyhouse.com/modules/ptyservermonitor/script_v1.js" async></script>
<div id="ptyservermonitor_contents" data-accessToken="ss<?=$servermonitorAccessToken?>"></div>
<!-- 서버 모니터링 종료 -->
<? } ?>
<div class="row">
<div class="col-md-12">
<?= $this->loader->controller("widget/user/latestList") ?>
......
......@@ -431,11 +431,20 @@ function getSidebarMenus($list, $parent){
</ol>
</section>
<section class="content">
<? if ($this->config->shorturl->genericAccessToken == "") { ?>
<div class="animated fadeIn alert alert-error alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-bell"></i> 중요 안내</h4>
짧은 주소로 이용되던 Bitly 의 새로운 API 정책으로 인해 API 를 다시 설정해야 합니다. <a href="/admin/app/config/shorturl/">이동</a> 하여 가이드에 맞춰 작업해 주세요<br>
<div class="animated fadeIn alert alert-error alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-bell"></i> 중요 안내</h4>
짧은 주소로 이용되던 Bitly 의 새로운 API 정책으로 인해 API 를 다시 설정해야 합니다. <a href="/admin/app/config/shorturl/">이동</a>
하여 가이드에 맞춰 작업해 주세요<br>
</div>
<? } ?>
<? if (false) { ?>
<!-- 에드센스 시작 -->
<script id="ptyadsense-script" type="text/javascript" src="https://apps.platyhouse.com/modules/ptyadsense/script_v1.js"></script>
<div style='height: 100px' id="ptyadsense" serviceUserId="storyshare" userId="platyhouse" data-href="https://apps.platyhouse.com/modules/ptyadsense/scriptv1/datahref/?page=index" data-width="100%" data-row="3">
<a href="https://apps.platyhouse.com/modules/ptyadsense/scriptv1/href/">AdSense</a>
</div>
<!-- 서버 모니터링 종료 -->
<? } ?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment