示例#1
0
 private function search($params = [])
 {
     $p = isset($params['p']) ? $params['p'] : 1;
     $type = isset($params['type']) ? $params['type'] : 1;
     $offset = ($p - 1) * $this->page_size;
     $query = Posts::find()->where(['status' => 1]);
     switch ($type) {
         case 2:
             $query->orderBy(['view_count' => SORT_DESC]);
             break;
         case 3:
             $query->andWhere(['original' => 1]);
             $query->orderBy(['id' => SORT_DESC]);
             break;
         default:
             $query->orderBy(['id' => SORT_DESC]);
             break;
     }
     $posts_info = $query->offset($offset)->limit($this->page_size)->all();
     $data = [];
     if ($posts_info) {
         foreach ($posts_info as $_post) {
             $tmp_tags = explode(",", $_post['tags']);
             $data[] = ['title' => DataHelper::encode($_post['title']), 'content' => nl2br(UtilHelper::blog_short($_post['content'], 200)), "tags" => $tmp_tags, 'image_url' => $_post['image_url'], 'view_url' => UrlService::buildWapUrl("/default/info", ["id" => $_post['id']])];
         }
     }
     return $data;
 }
示例#2
0
 public function actionError()
 {
     AppLogService::addLog();
     $reback_url = UrlService::buildWapUrl("/");
     $this->layout = false;
     return $this->render("@blog/views/error/index.php", ["title" => "Page Not Found", "msg" => "404警告! 很不幸,您探索了一个未知领域!", "reback_url" => $reback_url]);
 }
示例#3
0
 public function actionError()
 {
     AppLogService::addLog();
     $reback_url = UrlService::buildUrl("/");
     if (preg_match("/^wap/", Yii::$app->request->getPathInfo())) {
         $reback_url = UrlService::buildWapUrl("/");
     }
     $this->layout = false;
     return $this->render("index", ["title" => "Page Not Found", "msg" => "404警告! 很不幸,您探索了一个未知领域!", "reback_url" => $reback_url]);
 }
示例#4
0
 private function getAlbum()
 {
     $dir_path = \Yii::$app->params['upload']['pic3'];
     $album_list = [];
     if ($handle = opendir($dir_path)) {
         while (false !== ($entry = readdir($handle))) {
             if (in_array($entry, $this->ignore)) {
                 continue;
             }
             $album_list[$entry] = ["name" => $entry, 'switch' => \Yii::$app->params['switch']['cdn']['pic3'] ? 1 : 0, "cover_src_url" => GlobalUrlService::buildPicStaticUrl("pic3", "/{$entry}/1.jpg"), "info_url" => UrlService::buildWapUrl("/gallery/list", ['album' => $entry])];
         }
         closedir($handle);
     }
     return $album_list;
 }
示例#5
0
 public function actionCreate()
 {
     if (!$this->checkSignature()) {
         return false;
     }
     $from = $this->getSource();
     $domains = Yii::$app->params['domains'];
     $domain_m = $domains['m'];
     $domain_blog = $domains['blog'];
     $menu = ["button" => [["name" => "博客", "sub_button" => [["type" => "click", "name" => "原创文章", "key" => "blog_original"], ["name" => "文章列表", "type" => "view", "url" => UrlService::buildWapUrl("/default/index", ["from" => $from])], ["type" => "view", "name" => "图书馆", "url" => UrlService::buildWapUrl("/library/index", ["from" => $from])], ["name" => "富媒体", "type" => "view", "url" => UrlService::buildWapUrl("/richmedia/index", ["from" => $from])]]], ["name" => "小玩意", "sub_button" => [["type" => "click", "name" => "点歌", "key" => "ktv"], ["type" => "view", "name" => "密码生成", "url" => UrlService::buildGameUrl("/tools/index", ['from' => $from])], ["type" => "view", "name" => "微信墙", "url" => UrlService::buildWapUrl("/wechat_wall/index", ['from' => $from])]]], ["name" => "关于", "sub_button" => [["type" => "view", "name" => "关于", "url" => UrlService::buildWapUrl("/my/about", ["from" => $from])], ["type" => "view", "name" => "赞助", "url" => UrlService::buildWapUrl("/my/about", ["from" => $from, "#" => "contact"])]]]]];
     $access_token = WxrequestController::getAccessToken();
     if (!$access_token) {
         $access_token = WxrequestController::getAccessToken(true);
     }
     return WxrequestController::send("menu/create?access_token=" . $access_token, json_encode($menu, JSON_UNESCAPED_UNICODE), 'POST');
 }
示例#6
0
 public function beforeAction($action)
 {
     $this->setTitle();
     $this->setDescription();
     $this->setKeywords();
     Yii::$app->response->getHeaders()->set("Content-Security-Policy", UtilHelper::getCspHeader(YII_ENV));
     if (!UtilHelper::isPC() && !in_array($action->getUniqueId(), $this->ignoreRedirectAction)) {
         $url = UrlService::buildWapUrl("/" . $action->getUniqueId(), $_GET);
         $this->redirect($url);
         return false;
     }
     if (!in_array($action->getUniqueId(), $this->allowAllAction)) {
     }
     if (!$this->getUUID()) {
         $this->setUUID();
     }
     return true;
 }
示例#7
0
 public function actionInfo()
 {
     $song_id = $this->get("song_id", 1237792);
     $reback_url = UrlService::buildWapUrl("/default/index");
     $type = intval($this->get("type", 2));
     if (!$song_id) {
         return $this->redirect($reback_url);
     }
     $info = Music::findOne(['song_id' => $song_id, 'type' => $type, 'status' => 1]);
     if (!$info) {
         $info = QQMusicService::getSongInfo($song_id);
         QQMusicService::saveMusic($info);
     }
     $data = ["song_title" => DataHelper::encode($info['song_title']), "song_author" => DataHelper::encode($info['song_author']), "cover_image" => $info['cover_image'], "song_url" => $info['song_url'], "song_id" => $info['song_id']];
     $this->setTitle("点歌台");
     $this->setSubTitle("点歌台");
     return $this->render("info", ["info" => $data]);
 }
示例#8
0
 public function actionStep()
 {
     $type = $this->get("type", "daily");
     $total_step = 0;
     $data_step = [];
     $x_cat = [];
     if ($type == "monthly") {
         $avg = 6000;
         $step = 3;
         $total_days = 0;
         $date_to = date("Ymd");
         $date_from = date("Ymd", strtotime(' -30 day'));
         $step_list = HealthDay::find()->where([">=", "date", $date_from])->andWhere(["<=", "date", $date_to])->orderBy("id asc")->all();
         if ($step_list) {
             foreach ($step_list as $_one_step) {
                 $data_step[] = $_one_step["quantity"];
                 $x_cat[] = (strtotime($_one_step['date']) + 8 * 3600) * 1000;
                 $total_days++;
                 $total_step += $_one_step["quantity"];
             }
         }
         $title = '<span class="sub_title">步数<br/><span>日平均值:' . ceil($total_step / $total_days) . '</span></span>';
         $sub_title = '<span class="sub_title">' . number_format($total_step) . ' 步<br/><span>' . "{$date_from} ~ {$date_to}</span></span>";
     } else {
         $avg = 40;
         $step = 3;
         $date_to = "";
         $date_from = "";
         $step_list = HealthLog::find()->where(["date" => date("Ymd")])->orderBy("id asc")->all();
         if ($step_list) {
             $date_from = date("H:i", strtotime($step_list[0]['time_from']));
             foreach ($step_list as $_one_step) {
                 $data_step[] = $_one_step["quantity"];
                 $total_step += $_one_step["quantity"];
                 $x_cat[] = (strtotime($_one_step['time_from']) + 8 * 3600) * 1000;
                 $date_to = date("H:i", strtotime($_one_step['time_from']));
             }
         }
         $title = '<span class="sub_title">步数<br/><span>小时平均值:' . ceil($total_step / date("H")) . '</span></span>';
         $sub_title = '<span class="sub_title">' . number_format($total_step) . ' 步<br/><span>' . "{$date_from} ~ {$date_to}</span></span>";
     }
     $data = ['data' => $data_step, 'x_cat' => $x_cat, 'avg' => $avg, 'step' => $step, 'title' => $title, 'sub_title' => $sub_title];
     return $this->render("step", ['data' => json_encode($data), 'type' => $type, 'urls' => ["daily" => UrlService::buildUrl("/run/step", ["type" => "daily"]), "monthly" => UrlService::buildUrl("/run/step", ["type" => "monthly"])]]);
 }
示例#9
0
 public function actionInfo($id)
 {
     $id = intval($id);
     if (!$id) {
         return $this->goHome();
     }
     $post_info = Posts::findOne(['id' => $id, 'status' => 1]);
     if (!$post_info) {
         return $this->goHome();
     }
     $author = Yii::$app->params['author'];
     $tags = explode(",", $post_info['tags']);
     $content = preg_replace("/brush:(\\w+);toolbar:false/", "prettyprint linenums", $post_info['content']);
     $content = str_replace("<pre>", "<pre class='prettyprint linenums'>", $content);
     $data = ["id" => $post_info['id'], "title" => $post_info['title'], "content" => $content, "original" => $post_info['original'], 'view_count' => $post_info['view_count'], "tags" => $tags, 'date' => date("Y.m.d", strtotime($post_info['updated_time'])), 'author' => $author, "url" => UrlService::buildUrl("/default/info", ["id" => $post_info['id']])];
     $prev_info = Posts::find()->where(["<", "id", $id])->andWhere(['status' => 1])->orderBy("id desc")->one();
     $next_info = Posts::find()->where([">", "id", $id])->andWhere(['status' => 1])->orderBy("id asc")->one();
     $this->setTitle($post_info['title']);
     return $this->render("detail", ["info" => $data, "prev_info" => $prev_info, "next_info" => $next_info, "recommend_blogs" => RecommendService::getRecommendBlog($id)]);
 }
示例#10
0
 private function search($params = [])
 {
     $p = isset($params['p']) ? $params['p'] : 1;
     $offset = ($p - 1) * $this->page_size;
     $query = Book::find()->where(['status' => 1]);
     $books = $query->orderBy("id desc")->offset($offset)->limit($this->page_size)->all();
     $data = [];
     if ($books) {
         foreach ($books as $_book) {
             $tmp_author = @json_decode($_book['creator'], true);
             $tmp_author = $tmp_author ? $tmp_author[0] : '&nbsp;';
             if (stripos($tmp_author, "(") !== false) {
                 $tmp_author = substr($tmp_author, 0, stripos($tmp_author, "("));
             }
             if (stripos($tmp_author, "(") !== false) {
                 $tmp_author = substr($tmp_author, 0, stripos($tmp_author, "("));
             }
             $data[] = ["title" => DataHelper::encode($_book['subtitle']), 'author' => $tmp_author ? $tmp_author : "&nbsp;", 'imager_url' => GlobalUrlService::buildPic1Static($_book['image_url']), 'view_url' => UrlService::buildWapUrl("/library/info", ["id" => $_book["id"]])];
         }
     }
     return $data;
 }
示例#11
0
 public static function buildFront($refresh = false)
 {
     $cache = new FileCache();
     $cache_key = "tag_post";
     $root_path = UtilHelper::getRootPath();
     $cache->cachePath = $root_path . '/common/logs/cache';
     $data = $cache[$cache_key];
     if (!$data || $refresh) {
         $data = ["tag" => [], "post_hot" => [], "post_origin" => [], "post_latest" => []];
         $tags = PostsTags::find()->select("tag,count(*) as num ")->groupBy("tag")->orderBy("num desc")->limit(20)->all();
         if ($tags) {
             foreach ($tags as $_tag) {
                 $data['tag'][] = $_tag['tag'];
             }
         }
         $post_hot = Posts::find()->where(['status' => 1])->orderBy(['view_count' => SORT_DESC])->limit(10)->all();
         if ($post_hot) {
             foreach ($post_hot as $_post_info) {
                 $data['post_hot'][] = ["id" => $_post_info['id'], "title" => DataHelper::encode($_post_info["title"]), "detail_url" => UrlService::buildUrl("/default/info", ["id" => $_post_info['id']])];
             }
         }
         $post_origin = Posts::find()->where(['status' => 1, 'original' => 1])->orderBy(['id' => SORT_DESC])->limit(10)->all();
         if ($post_origin) {
             foreach ($post_origin as $_post_info) {
                 $data['post_origin'][] = ["id" => $_post_info['id'], "title" => DataHelper::encode($_post_info["title"]), "detail_url" => UrlService::buildUrl("/default/info", ["id" => $_post_info['id']])];
             }
         }
         $post_latest = Posts::find()->where(['status' => 1])->orderBy(['id' => SORT_DESC])->limit(10)->all();
         if ($post_latest) {
             foreach ($post_latest as $_post_info) {
                 $data['post_latest'][] = ["id" => $_post_info['id'], "title" => DataHelper::encode($_post_info["title"]), "detail_url" => UrlService::buildUrl("/default/info", ["id" => $_post_info['id']])];
             }
         }
         $data = json_encode($data);
         $cache[$cache_key] = $data;
     }
     return $data;
 }
示例#12
0
 public function actionDo()
 {
     $data = [];
     $kw = $this->get("kw", "");
     if ($kw) {
         $this->setTitle($kw);
         $search_key = ['LIKE', 'search_key', '%' . strtr($kw, ['%' => '\\%', '_' => '\\_', '\\' => '\\\\']) . '%', false];
         $query = IndexSearch::find()->where($search_key);
         $list = $query->orderBy("id desc")->all();
         if ($list) {
             foreach ($list as $_item) {
                 if ($_item['book_id']) {
                     $tmp_title = DataHelper::encode($_item['title']);
                     $tmp_view_url = UrlService::buildWapUrl("/library/info", ['id' => $_item['book_id']]);
                 } else {
                     $tmp_title = DataHelper::encode($_item['title']);
                     $tmp_view_url = UrlService::buildWapUrl("/default/info", ['id' => $_item['post_id']]);
                 }
                 $data[] = ['title' => $tmp_title, 'content' => nl2br(UtilHelper::blog_short($_item['description'], 200)), 'image_url' => $_item['image'], 'view_url' => $tmp_view_url];
             }
         }
     }
     return $this->render("do", ["post_list" => $data, 'kw' => $kw]);
 }
示例#13
0
文件: index.php 项目: apanly/dream
echo UrlService::buildWapUrl("/default/index", ["type" => 1]);
?>
"
       class="am-btn am-btn-default am-u-sm-3 am-u-md-3">文章</a>
    <a href="<?php 
echo UrlService::buildWapUrl("/default/index", ["type" => 2]);
?>
"
       class="am-btn am-btn-default am-u-sm-3 am-u-md-3">热门</a>
    <a href="<?php 
echo UrlService::buildWapUrl("/default/index", ["type" => 3]);
?>
"
       class="am-btn am-btn-default am-u-sm-3 am-u-md-3">原创</a>
    <a href="<?php 
echo UrlService::buildWapUrl("/search/do");
?>
"
       class="am-btn am-btn-default am-u-sm-3 am-u-md-3"><span class="am-icon-search"></span></a>
</div>
<div data-am-widget="list_news" class="am-list-news am-list-news-default">
    <div class="am-list-news-bd">
        <ul class="am-list">
            <?php 
echo $post_list_html;
?>
        </ul>
    </div>
    <div class="loading">
        <div class="bubble">
            <div class="bubble1"></div>
示例#14
0
文件: footer.php 项目: apanly/dream
                <span class="am-icon-picture-o"></span>
                <span class="am-navbar-label">富媒体</span>
            </a>
        </li>
        <li>
            <a href="<?php 
echo UrlService::buildWapUrl("/my/about");
?>
" class="am-btn-default">
                <span class="am-icon-user"></span>
                <span class="am-navbar-label">关于</span>
            </a>
        </li>
        <li>
            <a href="<?php 
echo UrlService::buildGameUrl("/tools/index");
?>
" class="am-btn-default">
                <span class="am-icon-gamepad"></span>
                <span class="am-navbar-label">小玩意</span>
            </a>
        </li>
    </ul>
</div>


<div data-am-widget="gotop" class="am-gotop am-gotop-fixed" style="display: none;">
    <a href="#top" title="回到顶部">
        <span class="am-gotop-title">回到顶部</span>
        <i class="am-gotop-icon am-icon-chevron-up"></i>
    </a>
示例#15
0
文件: item.php 项目: apanly/dream
                        <?php 
            echo $_post_info['content'];
            ?>
                    </div>
                </div>
                <?php 
            if ($_post_info['tags']) {
                ?>
                    <div class="am-g" style="display: none;">
                        <div class="am-u-sm-12" style="padding: 0;margin-top: 5px;">
                            <i class="am-icon-tags"></i>
                            <?php 
                foreach ($_post_info['tags'] as $_tag) {
                    ?>
                                <a href="<?php 
                    echo UrlService::buildWapUrl("/search/do", ['kw' => $_tag]);
                    ?>
"><?php 
                    echo $_tag;
                    ?>
</a>
                            <?php 
                }
                ?>
                        </div>
                    </div>
                <?php 
            }
            ?>
            </li>
        <?php 
示例#16
0
 public function goLibraryHome()
 {
     return $this->redirect(UrlService::buildWapUrl("/library/index"));
 }
示例#17
0
 public function actionSitemap()
 {
     $data = [];
     $tags = [];
     $type = $this->get("type", "blog");
     switch ($type) {
         case "m":
             $domain_host = Yii::$app->params['domains']['m'];
             $sitemap_filename = "m_sitemap.xml";
             break;
         default:
             $domain_host = Yii::$app->params['domains']['blog'];
             $sitemap_filename = "sitemap.xml";
             break;
     }
     $index_urls = ['m' => ["/default/index?type=1", "/default/index?type=2", "/default/index?type=3", "/library/index", "/richmedia/index", "/my/about", "http://www.vincentguo.cn"], 'blog' => ["/default/index?type=1", "/default/index?type=2", "/default/index?type=3", "/library/index", "/richmedia/index", "/default/donation", "/default/about", "http://m.vincentguo.cn"]];
     if (isset($index_urls[$type])) {
         foreach ($index_urls[$type] as $_index_url) {
             if (preg_match("/^http/", $_index_url)) {
                 $tmp_url = $_index_url;
             } else {
                 if ($type == "m") {
                     $tmp_url = UrlService::buildWapUrl($_index_url);
                 } else {
                     $tmp_url = UrlService::buildUrl($_index_url);
                 }
             }
             $data[] = ["loc" => $tmp_url, "priority" => 1.0, "lastmod" => date("Y-m-d"), "changefreq" => "daily"];
         }
     }
     $post_list = Posts::find()->where(["status" => 1])->orderBy("id desc")->all();
     if ($post_list) {
         foreach ($post_list as $_post_info) {
             if ($type == "m") {
                 $tmp_url = UrlService::buildWapUrl("/default/info", ["id" => $_post_info['id']]);
             } else {
                 $tmp_url = UrlService::buildUrl("/default/info", ["id" => $_post_info['id']]);
             }
             $data[] = ["loc" => $tmp_url, "priority" => 1.0, "lastmod" => date("Y-m-d", strtotime($_post_info['updated_time'])), "changefreq" => "daily"];
             $tmp_tags = explode(",", $_post_info['tags']);
             $tags = array_merge($tags, $tmp_tags);
         }
     }
     $book_list = Book::find()->where(['status' => 1])->orderBy("id desc")->all();
     if ($book_list) {
         foreach ($book_list as $_book_info) {
             if ($type == "m") {
                 $tmp_url = UrlService::buildWapUrl("/library/info", ["id" => $_book_info['id']]);
             } else {
                 $tmp_url = UrlService::buildUrl("/library/info", ["id" => $_book_info['id']]);
             }
             $data[] = ["loc" => $tmp_url, "priority" => 1.0, "lastmod" => date("Y-m-d", strtotime($_book_info['updated_time'])), "changefreq" => "daily"];
             $tmp_tags = explode(",", $_book_info['tags']);
             $tags = array_merge($tags, $tmp_tags);
         }
     }
     $tags = array_unique($tags);
     if ($tags) {
         foreach ($tags as $_tag) {
             if ($type == "m") {
                 $tmp_url = UrlService::buildWapUrl("/search/do", ["kw" => $_tag]);
             } else {
                 $tmp_url = UrlService::buildUrl("/search/do", ["kw" => $_tag]);
             }
             $data[] = ["loc" => $tmp_url, "priority" => 1.0, "lastmod" => date("Y-m-d", time()), "changefreq" => "daily"];
         }
     }
     $xml_content = $this->renderPartial("sitemap", ["data" => $data]);
     $app_root = Yii::$app->getBasePath();
     $file_path = $app_root . "/web/{$sitemap_filename}";
     file_put_contents($file_path, $xml_content);
     $this->layout = false;
     return "ok";
 }
示例#18
0
文件: index.php 项目: apanly/dream
            <?php 
    }
    ?>
            <span class="page-number">第 <?php 
    echo $page_info['current'];
    ?>
 页 &frasl; 共 <?php 
    echo $page_info['total_page'];
    ?>
                页</span>
            <?php 
    if ($page_info['next']) {
        ?>
                <a class="older-posts"
                   href="<?php 
        echo UrlService::buildUrl("/default/index", ["type" => $type, "p" => $page_info['current'] + 1]);
        ?>
"
                   title="下一页"><i class="fa fa-angle-right"></i></a>
            <?php 
    }
    ?>
        </nav>
    <?php 
}
?>

</main>
<?php 
echo Yii::$app->controller->renderPartial("/public/side");
?>
示例#19
0
文件: donation.php 项目: apanly/dream
	<article class="post">
		<table class="table table-bordered text-center">
			<thead>
			<tr>
				<td>赞助人</td>
				<td>赞助金额</td>
				<td width="200">赞助原因</td>
			</tr>
			</thead>
			<tbody>
			<tr>
				<td>唐萪衷</td>
				<td>88.00</td>
				<td class="text-left">
					做档案录入需要拍照上传保存,参考博文:<a target="_blank" href="<?php 
echo UrlService::buildUrl('/default/info', ['id' => 150]);
?>
">HTML5 拍照上传</a>
				</td>
			</tr>
			</tbody>
		</table>
	</article>
</div>
<div class="col-md-4 sidebar">
	<div class="widget">
		<h4 class="title">感谢您的支持</h4>
		<div class="content m_qrcode">
			<img title="扫一扫手机阅读" src="<?php 
echo GlobalUrlService::buildStaticUrl("/images/pay/pay_wechat.jpg");
?>
示例#20
0
 public function actionWechat()
 {
     return $this->redirect(UrlService::buildWapUrl("/my/about#contact"));
 }
示例#21
0
文件: detail.php 项目: apanly/dream
    ?>
"><i
                    class="fa fa-angle-left fa-fw"></i> <?php 
    echo DataHelper::encode($prev_info['title']);
    ?>
</a>
        <?php 
}
?>
        &nbsp;
        <?php 
if ($next_info) {
    ?>
            <a class="btn btn-default"
               href="<?php 
    echo UrlService::buildUrl("/default/info", ["id" => $next_info['id'], "flag" => "next"]);
    ?>
"><?php 
    echo DataHelper::encode($next_info['title']);
    ?>
                <i class="fa fa-angle-right fa-fw"></i></a>
        <?php 
}
?>
    </div>


</main>
        <?php 
echo Yii::$app->controller->renderPartial("/public/blog_side", ["recommend_blogs" => $recommend_blogs, "qr_text" => GlobalUrlService::buildWapUrl("/default/info", ['id' => $info['id']])]);
?>
示例#22
0
文件: main.php 项目: apanly/dream
                    <span class="am-icon-picture-o"></span>
                    <span class="am-navbar-label">美女</span>
                </a>
            </li>
            <li id="menu_tools">
                <a href="<?php 
echo UrlService::buildGameUrl("/tools/index");
?>
" class="am-btn-default">
                    <span class="am-icon-paper-plane"></span>
                    <span class="am-navbar-label">工具</span>
                </a>
            </li>
            <li  id="menu_music">
                <a href="<?php 
echo UrlService::buildGameUrl("/music/index");
?>
" class="am-btn-default">
                    <span class="am-icon-music"></span>
                    <span class="am-navbar-label">点歌</span>
                </a>
            </li>
        </ul>
    </div>
    <div data-am-widget="gotop" class="am-gotop am-gotop-fixed" style="display: none;">
        <a href="#top" title="回到顶部">
            <span class="am-gotop-title">回到顶部</span>
            <i class="am-gotop-icon am-icon-chevron-up"></i>
        </a>
    </div>
    <input type="hidden" id="access_domain" value="<?php 
示例#23
0
文件: index.php 项目: apanly/dream
<?php

use blog\components\StaticService;
use blog\components\UrlService;
StaticService::includeAppCssStatic("/css/wap/richmedia/index.css", \blog\assets\WapAsset::className());
StaticService::includeAppJsStatic("/js/wap/richmedia/index.js", \blog\assets\WapAsset::className());
?>
<div class="am-g" id="se_btn">
    <a href="javascript:void(0);" class="am-btn am-btn-default am-u-sm-6 am-u-md-6 am-u-lg-6 am-btn-primary">
        看今朝
    </a>
    <a href="<?php 
echo UrlService::buildWapUrl("/gallery/index");
?>
" class="am-btn am-btn-default am-u-sm-6 am-u-md-6 am-u-lg-6">
        想当年
    </a>
</div>
<ul data-am-widget="gallery" class="am-gallery am-avg-sm-1 am-gallery-overlay">
    <?php 
echo $media_list_html;
?>
</ul>
<div class="am-g">
    <div class="loading">
        <div class="bubble">
            <div class="bubble1"></div>
            <div class="bubble2"></div>
        </div>
        <p class="loading_txt">富媒体马上来</p>
    </div>
示例#24
0
文件: main.php 项目: apanly/dream
                    <span class="am-icon-home"></span>
                    <span class="am-navbar-label">相册</span>
                </a>
            </li>
            <li>
                <a href="<?php 
echo UrlService::buildMateUrl("/contact/index");
?>
" class="am-btn-warning">
                    <span class="am-icon-paper-plane"></span>
                    <span class="am-navbar-label">通讯录</span>
                </a>
            </li>
            <li>
                <a href="<?php 
echo UrlService::buildMateUrl("/contact/index");
?>
" class="am-btn-warning">
                    <span class="am-icon-paper-plane"></span>
                    <span class="am-navbar-label">我</span>
                </a>
            </li>
        </ul>
    </div>
    <div data-am-widget="gotop" class="am-gotop am-gotop-fixed" style="display: none;">
        <a href="#top" title="回到顶部">
            <span class="am-gotop-title">回到顶部</span>
            <i class="am-gotop-icon am-icon-chevron-up"></i>
        </a>
    </div>
    <input type="hidden" id="access_domain" value="<?php 
示例#25
0
文件: info.php 项目: apanly/dream
            <?php 
    }
    ?>
        </div>
        <?php 
}
?>
        <div class="am-panel am-panel-default" style="margin-top: 10px;">
            <div class="am-panel-hd">智能推荐</div>
            <ul class="am-list">
                <?php 
foreach ($recommend_blogs as $_recommend_blog_info) {
    ?>
                <li>
                    <a href="<?php 
    echo UrlService::buildWapUrl("/default/info", ["id" => $_recommend_blog_info["id"], "flag" => "recommend"]);
    ?>
"><?php 
    echo $_recommend_blog_info["title"];
    ?>
</a>
                </li>
                <?php 
}
?>
            </ul>
        </div>

        <div class="am-article-bd text-right" style="display: none;">
            <i class="am-icon-btn am-warning  am-icon-thumbs-up"></i>
            喜欢
示例#26
0
文件: index.php 项目: apanly/dream
<?php

use blog\components\StaticService;
use blog\components\UrlService;
StaticService::includeAppJsStatic("/js/wap/gallery/index.js", \blog\assets\WapAsset::className());
?>
<div class="am-g" id="se_btn">
    <a href="<?php 
echo UrlService::buildWapUrl("/richmedia/index");
?>
" class="am-btn am-btn-default am-u-sm-6 am-u-md-6 am-u-lg-6">
        看今朝
    </a>
    <a href="javascript:void(0);" class="am-btn am-btn-default am-u-sm-6 am-u-md-6 am-u-lg-6      am-btn-primary">
        想当年
    </a>
</div>
<ul data-am-widget="gallery" class="am-gallery am-avg-sm-1 am-gallery-overlay am-no-layout"  >
    <?php 
foreach ($gallery_list as $_item) {
    ?>
    <li>
        <div class="am-gallery-item">
            <a href="<?php 
    echo $_item["info_url"];
    ?>
">
                <img  data="<?php 
    echo $_item["switch"];
    ?>
" data-src="<?php 
示例#27
0
文件: index.php 项目: apanly/dream
    ?>
                <a href="<?php 
    echo UrlService::buildGameUrl("/mv/index", ['p' => $p - 1]);
    ?>
" class="am-btn am-btn-primary am-fl">上一组</a>
            <?php 
} else {
    ?>
                <a href="javascript:void(0);" class="am-btn am-btn-default am-fl">上一组</a>
            <?php 
}
?>

            <?php 
if ($urls['has_next']) {
    ?>
                <a href="<?php 
    echo UrlService::buildGameUrl("/mv/index", ['p' => $p + 1]);
    ?>
" class="am-btn am-btn-primary am-fr">下一组</a>
            <?php 
} else {
    ?>
                <a href="javascript:void(0);" class="am-btn am-btn-default am-fr">下一组</a>
            <?php 
}
?>
        </div>
    </div>
</div>
示例#28
0
文件: index.php 项目: apanly/dream
"> <?php 
    echo $_person_title;
    ?>
</option>
                    <?php 
}
?>
                </select>
            </div>
        </div>

        <div class="am-form-group">
            <div class="am-u-sm-9 am-u-sm-offset-3">
                <button type="button" class="am-btn am-btn-primary save">报名</button>
                <span style="margin-left: 20px;"><a href="<?php 
echo UrlService::buildMateUrl("/default/list");
?>
">已报名列表</a></span>
            </div>
        </div>
        <div class="am-form-group">
            <div class="am-u-sm-12">
            <ul class="am-list">
                <li style="color: #ff0000;">1.可重复报名,以最后报名信息的为准</li>
                <li>2.回校时间定于2016年5月1日,票请自己订购</li>
                <li>3.在湖北十堰母校安排统一由 谭伟 组织</li>
                <li>4.群二维码如下<br/><img src="<?php 
echo GlobalUrlService::buildStaticUrl("/images/mate/qun.jpg");
?>
" width="350"/></li>
            </ul>
示例#29
0
    </div>
    <div class="widget hidden content_index_wrap">
        <h4 class="title">目录</h4>
        <div class="content">

        </div>
    </div>
    <div class="widget">
        <h4 class="title">智能推荐</h4>
        <div class="content recommend_posts">
                <?php 
foreach ($recommend_blogs as $_recommend_blog_info) {
    ?>
                <p>
                    <a href="<?php 
    echo UrlService::buildUrl("/default/info", ["id" => $_recommend_blog_info["id"], "flag" => "recommend", "source_id" => $_recommend_blog_info['source_id']]);
    ?>
"><?php 
    echo $_recommend_blog_info["title"];
    ?>
</a>
                </p>
                <?php 
}
?>
        </div>
    </div>
    <div class="widget hide">
        <h4 class="title">阅读目录</h4>
        <div class="content" id="content">
示例#30
0
 public static function getSongInfo($song_id)
 {
     $ret = [];
     $url = "http://s.plcloud.music.qq.com/fcgi-bin/fcg_list_songinfo.fcg?idlist=%s&callback=jsonCallback&url=1";
     $url = sprintf($url, $song_id);
     $data_jsonp = trim(HttpClient::get($url));
     $data_json = mb_substr($data_jsonp, 13, -1);
     $find = ['code:', 'data:', 'url:', 'url1:'];
     $replace = ['"code":', '"data":', '"url":', '"url1":'];
     $data_json = str_replace($find, $replace, $data_json);
     $data = @json_decode($data_json, true);
     if ($data && isset($data['code']) && $data['code'] == 0) {
         $song_attr_f = explode("|", $data['data'][$song_id]);
         if (isset($song_attr_f[4])) {
             $tmp_song_id = $song_attr_f[0];
             $tmp_img_id = $song_attr_f[4];
             $tmp_mid = $song_attr_f[20];
             $ret = ['song_id' => $tmp_song_id, 'type' => 2, 'cover_image' => self::getCoverImageUrl($tmp_img_id), "lrc" => "", "song_url" => self::getSongUrl($tmp_song_id, ".mp3"), "song_title" => $song_attr_f[1], "song_author" => $song_attr_f[3], "text" => $data, "format_data" => ['image_id' => $tmp_img_id, 'mid' => $tmp_mid], "status" => 1, "view_url" => UrlService::buildGameUrl("/music/info", ['song_id' => $tmp_song_id])];
         }
     }
     return $ret;
 }