public function _header($smarty) { //退出登录链接 $out_login_url = url("myweb", "home::outlogin"); $smarty->assign("out_login_url", $out_login_url); //个人中心链接 $usercenter_url = url("myweb", "usercenter::index"); $smarty->assign('usercenter_url', $usercenter_url); //说说链接 $comment_url = url("myweb", "usercenter::comment"); $smarty->assign('comment_url', $comment_url); //相册链接 $photo_url = url("myweb", "photo::index"); $smarty->assign('photo_url', $photo_url); //音乐链接 $music_url = url("myweb", "usercenter::photo", "photo"); $smarty->assign('music_url', $music_url); //日志链接 $journal_url = url("myweb", "journal::index"); $smarty->assign('journal_url', $journal_url); if (Legal::isMobileCall()) { $is_mobile = 'yes'; } else { $is_mobile = 'no'; } $smarty->assign("is_mobile", $is_mobile); if ($username = User::getLoginUsername()) { $smarty->assign("username", $username); } //首页 $smarty->assign('homeurl', HOMEURL); }