123456789101112131415161718192021222324252627282930 |
- <?php
- namespace Content\Lib;
- use Dever;
- class Common
- {
- public function getInfoLink($type, $id)
- {
- if ($type == 'content/article' || $type == 1) {
- return Dever::url('blog_info?id=' . $id, 'main');
- } elseif ($type == 'content/album' || $type == 2) {
- return Dever::url('photos_info?id=' . $id, 'main');
- } elseif ($type == 'content/video' || $type == 3) {
- return Dever::url('videos_info?id=' . $id, 'main');
- }
- }
- public function getCateLink($type, $id)
- {
- if ($type == 'content/article' || $type == 1) {
- return Dever::url('blog?id=' . $id, 'main');
- } elseif ($type == 'content/album' || $type == 2) {
- return Dever::url('photos?id=' . $id, 'main');
- } elseif ($type == 'content/video' || $type == 3) {
- return Dever::url('videos?id=' . $id, 'main');
- }
- }
- }
|