示例#1
0
        exit;
    }
    $userinfo = Ko_Tool_Adapter::VConv($uid, array('user_baseinfo', array('logo80')));
    $photolist = $photoApi->getPhotoListBySeq($uid, $albumid, '0_0_0', $num, $next, $next_boundary, 'imageView2/2/w/240');
    $render = new KRender_www();
    if ($loginuid == $uid) {
        $allalbumlist = $photoApi->getAllAlbumList($uid);
        $render->oSetData('allalbumlist', $allalbumlist);
    }
    $render->oSetTemplate('www/photo/album.html')->oSetData('userinfo', $userinfo)->oSetData('albuminfo', $albuminfo)->oSetData('photolist', $photolist)->oSetData('page', array('num' => $num, 'next' => $next, 'next_boundary' => $next_boundary))->oSend();
});
Ko_Web_Route::VGet('item', function () {
    $loginApi = new KUser_loginApi();
    $loginuid = $loginApi->iGetLoginUid();
    $uid = Ko_Web_Request::IGet('uid');
    $photoid = Ko_Web_Request::IGet('photoid');
    $storageApi = new KStorage_Api();
    $photoApi = new KPhoto_Api();
    $photoinfo = $photoApi->getPhotoInfo($uid, $photoid);
    if (empty($photoinfo)) {
        Ko_Web_Response::VSetRedirect('/');
        Ko_Web_Response::VSend();
        exit;
    }
    $photoinfo['image_src'] = $storageApi->sGetUrl($photoinfo['image'], '');
    $photoinfo['image_small'] = $storageApi->sGetUrl($photoinfo['image'], 'imageView2/1/w/60');
    $photoinfo['image_exif'] = $storageApi->aGetImageExif($photoinfo['image']);
    $agentinfo = KUser_agentApi::get();
    if ($agentinfo['screen']['height'] < 1000) {
        $photoinfo['image'] = $storageApi->sGetUrl($photoinfo['image'], 'imageView2/2/w/600/h/600');
        $photoinfo['imagesize'] = 600;
示例#2
0
文件: blog.php 项目: firaga/operation
            Ko_Web_Response::VSend();
            exit;
        }
        $htmlrender->oSetData(KContent_Api::BLOG_TITLE, $blogid);
        $htmlrender->oSetData(KContent_Api::BLOG_CONTENT, $blogid);
    } else {
        $bloginfo = array();
        $htmlrender->oSetData(KContent_Api::DRAFT_CONTENT, $uid);
        $htmlrender->oSetData(KContent_Api::DRAFT_TITLE, $uid);
    }
    $render = new KRender_www();
    $render->oSetTemplate('www/blog/post.html')->oSetData('userinfo', $userinfo)->oSetData('bloginfo', $bloginfo)->oSetData('blogcontent', $htmlrender)->oSetData('taginfos', $taginfos)->oSend();
});
Ko_Web_Route::VGet('item', function () {
    $uid = Ko_Web_Request::IGet('uid');
    $blogid = Ko_Web_Request::IGet('blogid');
    $tag = Ko_Web_Request::SGet('tag');
    $userinfo = Ko_Tool_Adapter::VConv($uid, array('user_baseinfo', array('logo80')));
    $blogApi = new KBlog_Api();
    $taginfos = $blogApi->aGetAllTaginfo($uid);
    $bloginfo = $blogApi->aGet($uid, $blogid);
    if (empty($bloginfo) || in_array('回收站', $bloginfo['tags'])) {
        Ko_Web_Response::VSetRedirect('user?uid=' . $uid);
        Ko_Web_Response::VSend();
        exit;
    }
    if (0 == strlen($tag)) {
        $tag = $blogApi->sGetPriorTag($bloginfo['tags']);
    }
    $prevnextInfo = $blogApi->aGetPrevNextTitle($uid, $blogid, $tag);
    $contentApi = new KContent_Api();