public function vxDrawStock($c) { if (!BABEL_FEATURE_NODE_STOCK) { return false; } else { if ($o = $c->load('babel_node_stock_' . $this->nod_id)) { if ($o == '') { return false; } else { echo $o; return true; } } else { $special = false; $fix = ''; if (preg_match('/^6([0-9]{5})$/', $this->nod_name) || $this->nod_name == 'sh000001') { $special = 'sh'; if ($this->nod_name == 'sh000001') { $this->nod_name = '000001'; $fix = '+' . urlencode('-深发展'); } } if ((preg_match('/^0([0-9]{5})$/', $this->nod_name) || $this->nod_name == '399001' || preg_match('/^3([0-9]{5})$/', $this->nod_name)) && $special == false) { $special = 'sz'; } $o = ''; if ($special == 'sh' || $special == 'sz') { $o .= '<tr><td align="center" class="hf" colspan="4" style="border-top: 1px solid #EEE;">'; $o .= '<script type="text/javascript"><!-- google_ad_client = "pub-9823529788289591"; google_alternate_color = "FFFFFF"; google_ad_width = 728; google_ad_height = 90; google_ad_format = "728x90_as"; google_ad_type = "text_image"; //2007-06-14: V2EX google_ad_channel = "0814641667"; google_color_border = "FFFFFF"; google_color_bg = "FFFFFF"; google_color_link = "999999"; google_color_text = "000000"; google_color_url = "00CC00"; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>'; $o .= '</td></tr>'; $news = fetch_rss('http://news.google.com/news?hl=zh-CN&ned=cn&q=' . $this->nod_name . '+%7C+' . urlencode($this->nod_title) . $fix . '&ie=UTF-8&output=rss'); $blogs = fetch_rss('http://blogsearch.google.com/blogsearch_feeds?hl=en&q=' . $this->nod_name . '+%7C+' . urlencode($this->nod_title) . $fix . '&ie=utf-8&num=10&output=rss'); $tn = fetch_rss('http://feeds.technorati.com/search/' . $this->nod_name); $o .= '<tr><td align="left" class="hf" colspan="4" style="border-top: 1px solid #EEE;">'; $o .= '<span class="tip_i">'; $o .= '<img src="/img/pico_right.gif" align="absmiddle" /> '; $o .= $this->nod_header . ' <a href="#stock_chart" class="t">行情图表</a> | <a href="#stock_blogs" class="t"><img src="/img/googleblogsearch.gif" align="absmiddle" alt="Google Blog Search results for ' . $this->nod_title . '" border="0" /></a> | <a href="#stock_news" class="t">新闻资讯</a> | <a href="#stock_tn"><img src="/img/technorati.gif" align="absmiddle" alt="Technorati results for ' . $this->nod_title . '" border="0" /></a></span>'; $o .= _vo_hr(); $o .= '<div class="notify" style="margin-bottom: 5px;"><div style="float: right;"><a href="#;" onclick="window.scrollTo(0, 0);">回到顶部</a></div><span style="font-size: 14px;">'; $o .= _vo_ico_silk('chart_line'); $o .= ' ' . $this->nod_header . ' 的行情图表 <a name="stock_chart"></a></span></div>'; $o .= '<div align="center">'; $o .= '<script type="text/javascript" src="/js/babel_stock_switcher.js"> </script>'; $o .= '<script type="text/javascript">market = "' . $special . '"; code = "' . $this->nod_name . '";</script>'; $o .= '<span class="tip_i">图表切换<img src="/img/pico_right.gif" align="absmiddle" /> <a href="#;" onclick="stock_get_realtime();" class="t">分时行情</a> | <a href="#;" onclick="stock_get_k_min5();" class="t">5 分钟 K 线</a> | <a href="#;" onclick="stock_get_k_daily();" class="t">日 K 线</a> | <a href="#;" onclick="stock_get_k_weekly();" class="t">周 K 线</a> | <a href="#;" onclick="stock_get_k_monthly();" class="t">月 K 线</a> | <a href="#;" onclick="stock_get_rsi();" class="o">RSI</a> | <a href="#;" onclick="stock_get_macd();" class="o">MACD</a> | <a href="#;" onclick="stock_get_kdj();" class="o">KDJ</a> | <a href="#;" onclick="stock_get_mike();" class="o">MIKE</a></span><br />'; $o .= '<img id="stock_chart" src="http://image.sinajs.cn/newchart/min/n/' . $special . $this->nod_name . '.gif?' . time() . '" class="code" /></div>'; $o .= _vo_hr(); $o .= '<div class="notify"><div style="float: right;"><a href="#;" onclick="window.scrollTo(0, 0);">回到顶部</a></div><span style="font-size: 14px;">'; $o .= _vo_ico_silk('comments'); $o .= ' 来自 Google Blog Search 的关于 ' . $this->nod_header . ' 的最新消息 <a name="stock_blogs"></a></span></div>'; $i = 0; foreach ($blogs->items as $blog) { $i++; $css_class = $i % 2 == 0 ? 'even' : 'odd'; $d = str_replace('<b>', '', $blog['description']); $d = str_replace('</b>', '', $d); $t = str_replace('<b>', '', $blog['title']); $t = str_replace('</b>', '', $t); $o .= '<div class="geo_home_entry_' . $css_class . '">'; $o .= '<span style="font-size: 13px; display: block; margin-bottom: 5px;">'; $o .= _vo_ico_silk('bullet_blue'); $o .= ' <a href="' . $blog['link'] . '" class="var" style="color: ' . rand_color() . '">' . $t . '</a></span>'; $o .= $d; $o .= '</div>'; unset($blog); } $o .= _vo_hr(); $o .= '<div class="notify"><div style="float: right;"><a href="#;" onclick="window.scrollTo(0, 0);">回到顶部</a></div><span style="font-size: 14px;">'; $o .= _vo_ico_silk('world'); $o .= ' 来自互联网的关于 ' . $this->nod_header . ' 的最新资讯 <a name="stock_news"></a></span></div>'; $i = 0; foreach ($news->items as $item) { $i++; $css_class = $i % 2 == 0 ? 'even' : 'odd'; $n = str_replace('<br><table border=0 width= valign=top cellpadding=2 cellspacing=7>', '<table border=0 width= valign=top cellpadding=0 cellspacing=2>', $item['description']); $n = str_replace('<font color=#CC0033>' . $this->nod_title . '</font>', $this->nod_title, $n); $n = str_replace('<font color=#CC0033>' . $this->nod_title . $this->nod_name . '</font>', $this->nod_title . $this->nod_name, $n); $n = str_replace('<font color=#CC0033>' . $this->nod_name . $this->nod_title . '</font>', $this->nod_name . $this->nod_title, $n); $n = str_replace('<font color=#CC0033>' . $this->nod_name . '</font>', $this->nod_name, $n); $n = preg_replace('/<a href="([^"]+)" target=_blank>([^<]+)<\\/a><br>/', '<span style="font-size: 13px; display: block; margin-bottom: 5px;">' . _vo_ico_silk('bullet_black') . ' <a class="var" style="color: ' . rand_color() . '" rel="nofollow" href="$1" target="_blank">$2</a></span>', $n); $n = str_replace('<a class=p', '<img src="/img/pico_right.gif" align="absmiddle" /> <a class="t"', $n); $n = str_replace('<font size=-1>', '<font style="font-size: 12px;">', $n); $o .= '<div class="geo_home_entry_' . $css_class . '">' . $n . '</div>'; unset($item); } $o .= _vo_hr(); $o .= '<div class="notify"><div style="float: right;"><a href="#;" onclick="window.scrollTo(0, 0);">回到顶部</a></div><span style="font-size: 14px;">'; $o .= _vo_ico_silk('comments'); $o .= ' 来自 Technorati 的关于 ' . $this->nod_header . ' 的最新消息 <a name="stock_tn"></a></span></div>'; $i = 0; foreach ($tn->items as $blog) { $i++; $css_class = $i % 2 == 0 ? 'even' : 'odd'; $d = str_replace('<br /><br /><img width="1" height="1"', '<img width="1" height="1"', $blog['description']); $d = str_replace('Posted in', '<span class="tip"><small>Posted in</small></span>', $d); $t = $blog['title']; $o .= '<div class="geo_home_entry_' . $css_class . '">'; $o .= '<span style="font-size: 13px; display: block; margin-bottom: 5px;">'; $o .= _vo_ico_silk('bullet_blue'); $o .= ' <a href="' . $blog['link'] . '" class="var" style="color: ' . rand_color() . '">' . $t . '</a></span>'; $o .= $d; $o .= '</div>'; unset($blog); } $o .= _vo_hr(); $o .= '<span class="tip_i">各大财经网站关于 ' . $this->nod_title . ' (' . $this->nod_name . ') 的相关信息<img src="/img/pico_right.gif" align="absmiddle" /> '; $o .= '<a href="http://finance.sina.com.cn/realstock/company/' . $special . $this->nod_name . '/nc.shtml" class="var" style="color: ' . rand_color() . '" rel="external nofollow">新浪</a> | '; $o .= '<a href="http://stockdata.stock.hexun.com/dynamic/default.aspx?stockid=' . $this->nod_name . '" class="var" style="color: ' . rand_color() . '" rel="external nofollow">和讯</a> | '; $o .= '<a href="http://hq.eastmoney.com/' . $this->nod_name . '.html" class="var" style="color: ' . rand_color() . '" rel="external nofollow">东方财富网</a> | '; $o .= '<a href="http://quote.stockstar.com/stock/external_quote.asp?code=' . $special . 'ag' . $this->nod_name . '" class="var" style="color: ' . rand_color() . '" rel="external nofollow">证券之星</a> | '; $o .= '<a href="http://share.jrj.com.cn/cominfo/ggxw_' . $this->nod_name . '.htm" class="var" style="color: ' . rand_color() . '" rel="external nofollow">金融界</a>'; $o .= '</span>'; $o .= _vo_hr(); $o .= '<a href="#;" onclick="window.scrollTo(0, 0)">回到顶部</a>'; $o .= '<script type="text/javascript">stock_charts_preload();</script>'; $o .= '</td></tr>'; echo $o; $c->save($o, 'babel_node_stock_' . $this->nod_id); return true; } else { $c->save($o, 'babel_node_stock_' . $this->nod_id); return false; } } } }
public function vxBlogLink($Weblog) { _v_m_s(); echo '<link type="text/css" rel="stylesheet" href="/css/themes/' . BABEL_THEME . '/css_weblog.css" />'; _v_b_l_s(); _v_ico_map(); echo ' <a href="/">' . Vocabulary::site_name . '</a> > ' . $this->User->usr_nick_plain . ' > <a href="/blog/admin.vx">' . $this->lang->weblogs() . '</a> > <a href="/blog/' . Weblog::DEFAULT_ACTION . '/' . $Weblog->blg_id . '.vx">' . make_plaintext($Weblog->blg_title) . '</a> > ' . $this->lang->blog_manage_links() . ' <span class="tip_i"><small>alpha</small></span>'; _v_d_e(); _v_b_l_s(); _v_d_tr_s(); echo ''; _v_d_e(); echo ''; _v_ico_tango_32('categories/applications-internet'); echo ' <a href="/blog/admin.vx">控制台</a> > <h1 class="ititle">' . make_plaintext($Weblog->blg_title); echo '</h1>'; _v_hr(); if (isset($_SESSION['babel_message_weblog'])) { if ($_SESSION['babel_message_weblog'] != '') { echo '<div class="notify">' . $_SESSION['babel_message_weblog'] . '</div>'; $_SESSION['babel_message_weblog'] = ''; } } else { $_SESSION['babel_message_weblog'] = ''; } echo '<div class="blog_block">'; echo '<div class="blog_view"><span class="tip_i">'; _v_ico_silk('picture'); echo ' <a href="/blog/portrait/' . $Weblog->blg_id . '.vx">' . $this->lang->blog_icon() . '</a>'; echo ' | '; _v_ico_silk('layout'); echo ' <a href="/blog/theme/' . $Weblog->blg_id . '.vx">' . $this->lang->blog_theme() . '</a>'; echo ' | '; _v_ico_silk('cog_edit'); echo ' <a href="/blog/config/' . $Weblog->blg_id . '.vx">' . $this->lang->blog_settings() . '</a> | <a href="http://' . BABEL_WEBLOG_SITE . '/' . $Weblog->blg_name . '/?.rand=' . rand(11, 99) . '" target="_blank">' . $this->lang->blog_view() . '</a> <img src="/img/ext.png" align="absmiddle" /></span></div>'; echo '<table width="98%" cellpadding="0" cellspacing="0" border="0">'; echo '<tr>'; echo '<td width="114" rowspan="3" align="left">'; if ($Weblog->blg_portrait != '') { echo '<img src="/img/b/' . $Weblog->blg_portrait . '.' . BABEL_PORTRAIT_EXT . '" class="blog_portrait" border="0" />'; } else { echo '<img src="/img/p_blog.png" class="blog_portrait" border="0" />'; } echo '</td>'; echo '<td height="35">'; echo '<h1 class="ititle">' . make_plaintext($Weblog->blg_title) . '</h1>'; if (intval($Weblog->blg_dirty) == 1) { echo ' <span class="tip">'; _v_ico_silk('error'); echo ' 需要重新构建</span>'; } echo '</td>'; echo '</tr>'; echo '<tr>'; echo '<td valign="top" height="45">'; echo '</td>'; echo '</tr>'; echo '<tr>'; echo '<td valign="top" height="24"><span class="tip_i">'; _v_ico_silk('pencil'); echo ' <a href="/blog/compose/' . $Weblog->blg_id . '.vx">' . $this->lang->blog_compose() . '</a>'; echo ' | '; _v_ico_silk('table_multiple'); echo ' <a href="/blog/list/' . $Weblog->blg_id . '.vx">' . $this->lang->blog_manage_articles() . '</a>'; echo ' | '; _v_ico_silk('page_white_stack'); echo ' <a href="/blog/pages/' . $Weblog->blg_id . '.vx">' . 'Pages' . '</a>'; echo ' | '; _v_ico_silk('link'); echo ' <strong>' . $this->lang->blog_manage_links() . '</strong>'; echo ' | '; _v_ico_silk('arrow_refresh'); echo ' <a href="/blog/build/' . $Weblog->blg_id . '.vx">' . $this->lang->blog_rebuild() . '</a>'; echo ' | '; _v_ico_silk('cross'); echo ' <a href="#;" onclick="if (confirm(' . "'你确认要彻底关闭这个博客网站吗?\\n\\n这些数据被删除后将无法恢复。'" . ')) { location.href = ' . "'/blog/destroy/" . $Weblog->blg_id . ".vx'; } else { return false; }" . '">' . $this->lang->blog_destroy() . '</a>'; echo '</td>'; echo '</tr>'; echo '</table>'; _v_hr(); echo '<span class="tip">'; _v_ico_silk('chart_bar'); echo ' 建立于 ' . date('Y 年 n 月 j 日', $Weblog->blg_created) . ',其中 ' . $Weblog->blg_entries . ' 篇文章共获得了 ' . $Weblog->blg_comments . ' 条评论</span>'; _v_hr(); echo '<h1 class="silver">'; _v_ico_silk('link_edit'); echo ' 请按照 Nexus Weblog Link 描述格式来设置你的 Weblog 上的链接'; echo '</h1>'; echo '<table cellpadding="5" cellspacing="" border="0" class="form">'; echo '<form action="/blog/link/save/' . $Weblog->blg_id . '.vx" method="post" id="form_blog_link">'; echo '<tr><td colspan="2" align="left">'; echo '<textarea class="ml" style="width: 550px;" rows="15" name="blg_links">'; if (count($Weblog->blg_links) > 0) { echo Weblog::vxGenerateLinksText($Weblog->blg_links); } echo '</textarea>'; echo '</td></tr>'; echo '<tr><td width="500" colspan="2" valign="middle" align="right" class="toolbar">'; echo '<input type="submit" value="保存" class="btn_white" /> '; echo '<input type="button" value="取消" class="btn_white" onclick="location.href=' . "'/blog/list/{$Weblog->blg_id}.vx'" . ';" />'; echo '</td></tr>'; echo '</form>'; echo '</table>'; _v_hr(); echo '<h1 class="silver">'; _v_ico_silk('link'); echo ' 当前的链接设置'; echo '</h1>'; if (count($Weblog->blg_links) > 0) { echo '<ul class="blog_link">'; foreach ($Weblog->blg_links as $category) { echo '<li><span class="text_large">'; _v_ico_silk('folder_link'); echo ' ' . str_replace('\\|', '|', $category['category']) . '</span>'; echo '<ul class="blog_link">'; foreach ($category['links'] as $link) { echo '<li>'; _v_ico_silk('bullet_blue'); echo ' ' . str_replace('\\|', '|', $link['title']); echo ' - '; echo '<a href="' . $link['url'] . '" rel="nofollow" target="_blank" class="regular">' . $link['url'] . '</a>'; echo '</li>'; } echo '</ul>'; echo '</li>'; } echo '</ul>'; } else { echo '目前还没有设置任何链接及链接分类'; } echo '</div>'; $sql = "SELECT blg_id, blg_title FROM babel_weblog WHERE blg_uid = {$this->User->usr_id} AND blg_id != {$Weblog->blg_id} ORDER BY blg_title"; $sql_md5 = md5($sql); if ($o = $this->cs->get($sql_md5)) { } else { $rs = mysql_query($sql); $o = ''; if (mysql_num_rows($rs) > 0) { $o .= _vo_hr(); $o .= '<span class="tip_i">我的其他博客网站 '; while ($_weblog = mysql_fetch_array($rs)) { $o .= '<a href="/blog/list/' . $_weblog['blg_id'] . '.vx" class="var" style="color: ' . rand_color() . '">' . make_plaintext($_weblog['blg_title']) . '</a> '; } $o .= '</span>'; } mysql_free_result($rs); $this->cs->save($o, $sql_md5); } echo $o; _v_d_e(); _v_d_e(); }