// write word in random starting X position $word_start_x = $rand_func(5, 32); // y positions jiggled about later $word_start_y = 15; if ($col_type == 0) { $text_r = rand_color(); $text_g = rand_color(); $text_b = rand_color(); $text_colour2 = ImageColorAllocate($im2, $text_r, $text_g, $text_b); } // write each char in different font for ($i = 0; $i < strlen($word); $i++) { if ($col_type == 1) { $text_r = rand_color(); $text_g = rand_color(); $text_b = rand_color(); $text_colour2 = ImageColorAllocate($im2, $text_r, $text_g, $text_b); } $j = $rand_func(0, sizeof($font_locations) - 1); $font = ImageLoadFont($font_locations[$j]); ImageString($im2, $font, $word_start_x + $font_widths[$j] * $i, $word_start_y, $word[$i], $text_colour2); } // use last pixelwidth $font_pixelwidth = $font_widths[$j]; // for debug: //sendImage($im2); ////////////////////////////////////////////////////// ////// Morph Image: ////////////////////////////////////////////////////// // calculate how big the text is in pixels // (so we only morph what we need to)
$view->display('post.tpl'); break; case 'about': $view->display('about.tpl'); break; case 'manage': check_login(); /* Ing cache */ require_once 'models/Ing.class.php'; $Ing = new Ing(); if (!($ing_list = $cache->load('ing'))) { $ing_list = $Ing->output('LOCAL'); $view->assign(array('ing' => $ing_list, 'ingColor' => rand_color(true))); $view->assign('ing', $ing_list); $cache->save($ing_list, 'ing'); } else { $view->assign(array('ing' => $ing_list, 'ingColor' => rand_color(true))); } $view->assign('num_rows', $num_rows); $view->assign('row', $row); $show = new Show(); if (ROOT) { $topic_list = $show->getTopicList(true); } else { $topic_list = $show->getTopicList(); } $view->assign('topic_list', $topic_list); $view->assign('count', count($topic_list)); $view->display('manage.tpl'); break; }
function color_txt($str) { $len = mb_strlen($str); $colorTxt = ''; for ($i = 0; $i < $len; $i++) { $colorTxt .= '<span style="color:' . rand_color() . '">' . mb_substr($str, $i, 1, 'utf-8') . '</span>'; } return $colorTxt; }
function make_image($case) { $im = imagecreatetruecolor(600, 400); imagefill($im, 0, 0, imagecolorallocate($im, 255, 255, 255)); for ($i = 0; $i < 400; $i++) { add_rect($im); } $im2 = imagecreatetruecolor(600, 400); imagefill($im2, 0, 0, rand_color($im2, 0)); if ($case->have_ellipse) { add_ellipse($im2, $case); } imagecopymerge($im, $im2, 0, 0, 0, 0, 600, 400, 30); return $im; }
function getRandomColour($in_img) { $text_r = rand_color(); $text_g = rand_color(); $text_b = rand_color(); $rv_col = ImageColorAllocate($in_img, $text_r, $text_g, $text_b); return $rv_col; }
function rand_colors($length = 10, $s = false) { $arr = array(); for ($i = 0; $i < $length; $i++) { $tmp = ""; do { $tmp = rand_color($s); $arr[$i] = $tmp; } while (!in_array($tmp, $arr)); } return $arr; }
} } } else { while ($row = $result->fetch_assoc()) { $rows[] = $row; } } } $result = []; foreach ($rows as $key => $val) { if ($delta) { // http://bootstrapbay.com/blog/wp-content/uploads/2014/05/bootflat_sample_r8sbud.png $color = '#ED5565'; if ($val['value'] < 0) { $color = '#5D9CEC'; } } else { $color = rand_color(); } $arr = ['c' => [['v' => $val['label']], ['v' => $val['value']], ['v' => $color]]]; $result[] = $arr; } // JSON_PRETTY_PRINT| print json_encode($result, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE); $conn->close(); // http://stackoverflow.com/questions/5614530/generating-a-random-hex-color-code-with-php function rand_color() { $color = ['#5D(CEC', '#4FC11E9', '#4A89DC', '#3BAFDA', '#48CFAD', '#37BC9B', '#A0D468', '#8CC152', '#ED5565', '#DA4453', '#AC92EC', '#967ADC', '#EC87C0', '#D770AD', '#FFCE54', '#F6BB42', '#FC6E51', '#E9573F', '#E6E9ED', '#CCD1D9', '#AAB2BD', '#656d78']; return $color[rand(0, count($color) - 1)]; }
public function vxJSONHomeTabSection() { if (!isset($_GET['section_id'])) { $this->vxJSONHomeTabLatest(); } else { $section_id = intval($_GET['section_id']); $_data = new stdClass(); $Node = new Node($section_id, $this->db); if ($Node->nod_id != 0) { $_data->node = new stdClass(); $_data->node->nod_id = $Node->nod_id; $_data->node->nod_name = $Node->nod_name; $_data->node->nod_title = $Node->nod_title; $_data->node->nod_title_plain = make_plaintext($Node->nod_title); } $Node = null; $sql = 'SELECT nod_id, nod_name, nod_title, nod_topics FROM babel_node WHERE nod_sid = ' . $section_id . ' ORDER BY nod_topics DESC LIMIT 8'; $rs = mysql_query($sql, $this->db); if (mysql_num_rows($rs) > 0) { $_SESSION['babel_home_tab'] = 'section:' . $_data->node->nod_id . ':' . $_data->node->nod_name; } else { $_SESSION['babel_home_tab'] = 'latest'; } $_data->boards = array(); $i = 0; while ($Node = mysql_fetch_object($rs)) { $i++; $_data->boards[$i] = new stdClass(); $_data->boards[$i]->nod_id = $Node->nod_id; $_data->boards[$i]->nod_name = $Node->nod_name; $_data->boards[$i]->nod_title = $Node->nod_title; $_data->boards[$i]->nod_title_plain = make_plaintext($Node->nod_title); $_data->boards[$i]->nod_topics = $Node->nod_topics; $_data->boards[$i]->color = rand_color(); $Node = null; } mysql_free_result($rs); $sql = 'SELECT usr_id, usr_nick, usr_gender, usr_portrait, tpc_id, tpc_title, tpc_posts, tpc_created, tpc_lasttouched, nod_id, nod_title, nod_name FROM babel_user, babel_topic, babel_node WHERE tpc_uid = usr_id AND tpc_pid = nod_id AND nod_sid = ' . $section_id . ' AND tpc_flag IN (0, 2) AND tpc_pid NOT IN ' . BABEL_NODES_POINTLESS . ' ORDER BY tpc_lasttouched DESC LIMIT 20'; $rs = mysql_query($sql, $this->db); $_data->topics = array(); $i = 0; while ($Topic = mysql_fetch_object($rs)) { $i++; $_data->topics[$i] = new stdClass(); $_data->topics[$i]->usr_id = $Topic->usr_id; $_data->topics[$i]->usr_nick = $Topic->usr_nick; $_data->topics[$i]->usr_nick_plain = make_plaintext($Topic->usr_nick); $_data->topics[$i]->usr_gender = $Topic->usr_gender; $_data->topics[$i]->usr_portrait = $Topic->usr_portrait; $_data->topics[$i]->usr_portrait_img = $Topic->usr_portrait ? CDN_IMG . 'p/' . $Topic->usr_portrait . '_n.jpg' : CDN_IMG . 'p_' . $Topic->usr_gender . '_n.gif'; $_data->topics[$i]->tpc_id = $Topic->tpc_id; $_data->topics[$i]->tpc_title = $Topic->tpc_title; $_data->topics[$i]->tpc_title_plain = make_plaintext($Topic->tpc_title); $_data->topics[$i]->tpc_posts = $Topic->tpc_posts; $_data->topics[$i]->tpc_created = $Topic->tpc_created; $_data->topics[$i]->tpc_created_relative = make_descriptive_time($Topic->tpc_created); $_data->topics[$i]->tpc_lasttouched = $Topic->tpc_lasttouched; $_data->topics[$i]->tpc_lasttouched_relative = make_descriptive_time($Topic->tpc_lasttouched); $_data->topics[$i]->nod_id = $Topic->nod_id; $_data->topics[$i]->nod_title = $Topic->nod_title; $_data->topics[$i]->nod_title_plain = make_plaintext($Topic->nod_title); $_data->topics[$i]->nod_name = $Topic->nod_name; if ($Topic->tpc_posts > 5) { $_data->topics[$i]->color = rand_color(); } else { $_data->topics[$i]->color = rand_gray(2, 4); } $Topic = null; } mysql_free_result($rs); header('Content-type: text/plain; charset=utf-8'); header('Cache-control: no-cache, must-revalidate'); if (function_exists('json_encode')) { $encoded = json_encode($_data); } else { $encoded = Zend_Json::encode($_data); } echo $encoded; } }
function color_txt($str) { if (function_exists('iconv_strlen')) { $len = iconv_strlen($str); } else { if (function_exists('mb_strlen')) { $len = mb_strlen($str); } } $colorTxt = ''; for ($i = 0; $i < $len; $i++) { $colorTxt .= '<span style="color:' . rand_color() . '">' . msubstr($str, $i, 1, 'utf-8', '') . '</span>'; } return $colorTxt; }
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; } } } }
/** * 转换彩虹字 * @param string $str * @param int $size * @param bool $bold * @return string */ function color_txt($str, $size = 20, $bold = false) { $len = mb_strlen($str); $colorTxt = ''; if ($bold) { $bold = "bolder"; $bolder = "font-weight:" . $bold; } for ($i = 0; $i < $len; $i++) { $colorTxt .= '<span style="font-size:' . $size . 'px;' . $bolder . '; color:' . rand_color() . '">' . mb_substr($str, $i, 1, 'utf-8') . '</span>'; } return $colorTxt; }
private function vxHomeSectionRemix($node_id, $node_level = 1, $items = 3) { if ($node_level < 2) { $sql = "SELECT nod_id FROM babel_node WHERE nod_sid = {$node_id}"; $rs = mysql_query($sql, $this->db); $board_count = mysql_num_rows($rs); $board_ids = ''; $i = 0; while ($Board = mysql_fetch_object($rs)) { $i++; if ($i == $board_count) { $board_ids = $board_ids . $Board->nod_id; } else { $board_ids = $board_ids . $Board->nod_id . ', '; } } mysql_free_result($rs); $items = rand($items - 1, $items * 2); $sql = "SELECT usr_id, usr_nick, usr_gender, usr_portrait, nod_id, nod_name, nod_title, tpc_id, tpc_title, tpc_description, tpc_content, tpc_hits, tpc_posts, tpc_created, tpc_lasttouched FROM babel_topic, babel_user, babel_node WHERE nod_id = tpc_pid AND usr_id = tpc_uid AND tpc_posts > 1 AND tpc_hits > 10 AND tpc_pid IN ({$board_ids}) AND tpc_flag IN (0) ORDER BY tpc_lasttouched DESC LIMIT {$items}"; } else { $board_ids = $node_id; $items = 15; $sql = "SELECT usr_id, usr_nick, usr_gender, usr_portrait, nod_id, nod_name, nod_title, tpc_id, tpc_title, tpc_description, tpc_content, tpc_hits, tpc_posts, tpc_created, tpc_lasttouched FROM babel_topic, babel_user, babel_node WHERE nod_id = tpc_pid AND usr_id = tpc_uid AND tpc_pid IN ({$board_ids}) AND tpc_flag IN (0) ORDER BY tpc_lasttouched DESC LIMIT {$items}"; } $rs = mysql_query($sql, $this->db); $i = 0; $o = ''; while ($Topic = mysql_fetch_object($rs)) { $i++; $css_color = rand_color(); $o = $o . '<dl class="home_topic">'; $img_p = $Topic->usr_portrait ? CDN_IMG . 'p/' . $Topic->usr_portrait . '_n.jpg' : CDN_IMG . 'p_' . $Topic->usr_gender . '_n.gif'; $o .= '<h1 class="silver"> '; $o .= '<a href="/u/' . urlencode($Topic->usr_nick) . '" class="var"><img src="' . $img_p . '" align="absmiddle" class="portrait" border="0" /></a> '; $o .= '<a href="/topic/view/' . $Topic->tpc_id . '.html" class="regular">'; $o .= make_plaintext($Topic->tpc_title); $o .= '</a></h1><dd>'; $url = 'http://' . BABEL_DNS_NAME . '/topic/view/' . $Topic->tpc_id . '.html'; if (preg_match('/\\[media/i', $Topic->tpc_content)) { $o .= 'This topic contains multimedia content, please <a href="/topic/view/' . $Topic->tpc_id . '.html" class="regular">click here</a> to continue ...'; } else { $o .= make_excerpt_home($Topic); } if ($node_level < 2) { $o .= '<span class="tip_i" style="display: block; clear: left; margin-top: 10px; padding-top: 5px; padding-bottom: 5px; border-top: 1px solid #E0E0E0; font-size: 12px; font-size: 12px;">... <a href="/topic/view/' . $Topic->tpc_id . '.html#reply" class="regular">' . $this->lang->posts($Topic->tpc_posts) . '</a> | <a href="/topic/view/' . $Topic->tpc_id . '.html#replyForm" class="regular">' . $this->lang->join_discussion() . '</a> | ' . $this->lang->browse_node($Topic->nod_name, $Topic->nod_title) . ' | <a href="/u/' . urlencode($Topic->usr_nick) . '" class="regular">' . $Topic->usr_nick . '</a>'; } else { $o .= '<span class="tip_i" style="display: block; clear: left; margin-top: 10px; padding-top: 5px; padding-bottom: 5px; border-top: 1px solid #E0E0E0; font-size: 12px; font-size: 12px;">... <a href="/topic/view/' . $Topic->tpc_id . '.html#reply" class="regular">' . $this->lang->posts($Topic->tpc_posts) . '</a> | <a href="/topic/view/' . $Topic->tpc_id . '.html#replyForm" class="regular">' . $this->lang->join_discussion() . '</a> | <a href="/u/' . urlencode($Topic->usr_nick) . '" class="regular">' . $Topic->usr_nick . '</a>'; } $o .= ' | '; $title = urlencode($Topic->tpc_title); $o .= '<a href="http://del.icio.us/post?url=' . $url . '&title=' . $title . '" class="var" target="_blank"><img src="/img/prom/delicious.png" border="0" align="absmiddle" alt="Add to del.icio.us" /></a> | '; $o .= '<a href="http://reddit.com/submit?url=' . $url . '&title=' . $title . '" class="var" target="_blank"><img src="/img/prom/reddit.png" border="0" align="absmiddle" alt="Add to reddit" /></a> | '; $o .= '<a href="http://technorati.com/cosmos/search.html?url=' . $url . '" class="var" target="_blank"><img src="/img/prom/technorati.png" border="0" align="absmiddle" alt="Search in Technorati" /></a> | '; $o .= '<a href="http://ma.gnolia.com/bookmarklet/add?url=' . $url . '&title=' . $title . '" class="var" target="_blank"><img src="/img/prom/magnoliacom.png" border="0" align="absmiddle" alt="Add to Ma.gonolia" /></a> | '; $o .= '<a href="http://blogmarks.net/my/new.php?mini=1&truc=3&title=' . $title . '&url=' . $url . '" class="var" target="_blank"><img src="/img/prom/blogmarks.png" border="0" align="absmiddle" alt="Add to BlogMarks" /></a> | '; $o .= '<a href="http://www.furl.net/storeIt.jsp?t=' . $title . '&u=' . $url . '" class="var" target="_blank"><img src="/img/prom/furl.png" border="0" align="absmiddle" alt="Add to LookSmart FURL" /></a> | '; $o .= '<a href="http://www.spurl.net/spurl.php?v=3&title=' . $title . '&url=' . $url . '&blocked=" class="var" target="_blank"><img src="/img/prom/spurl.png" border="0" align="absmiddle" alt="Add to Spurl" /></a> | '; $o .= '<a href="http://simpy.com/simpy/LinkAdd.do?title=' . $title . '&href=' . $url . '¬e=&_doneURI=http%3A%2F%2Fwww.simpy.com%2F&v=6&src=bookmarklet" class="var" target="_blank"><img src="/img/prom/simpy.png" border="0" align="absmiddle" alt="Add to simpy" /></a> | '; $o .= '<a href="http://tailrank.com/share/?title=' . $title . '&link_href=' . $url . '&text=" class="var" target="_blank"><img src="/img/prom/tailrank.png" border="0" align="absmiddle" alt="Add to Tailrank" /></a>'; $o .= '</span></dd></dl>'; } mysql_free_result($rs); return $o; }
$_timeline[$_ing['ing_created']]['usr_nick'] = $_ing['usr_nick']; $_timeline[$_ing['ing_created']]['img_p'] = $_ing['usr_portrait'] == '' ? '/img/p_' . $_ing['usr_gender'] . '_n.gif' : '/img/p/' . $_ing['usr_portrait'] . '_n.jpg'; } /* Sort the timeline. */ krsort($_timeline); $c->save(serialize($_timeline), $tag_cache); } foreach ($_timeline as $time => $event) { echo '<div class="object">'; switch ($event['type']) { case 'topic': echo '<div class="head"><img src="' . $event['img_p'] . '" align="absmiddle" border="0" /> <a href="/u/' . urlencode($event['usr_nick']) . '" class="var" style="color: ' . rand_color() . '; font-weight: bold;">' . make_plaintext($event['usr_nick']) . '</a><span class="tip"> ... ' . make_descriptive_time($time) . '在 <a href="/go/' . urlencode($event['nod_name']) . '" class="var" style="color: ' . rand_color() . '; font-weight: bold;">' . make_plaintext($event['nod_title']) . '</a> 发表了新主题:</span></div>'; echo '<div class="body"><a href="' . $event['link'] . '" style="font-size: ' . $event['weight'] . 'px">' . make_plaintext($event['title']) . '</a></div>'; break; case 'ing': echo '<div class="head"><img src="' . $event['img_p'] . '" align="absmiddle" border="0" /> <a href="/u/' . urlencode($event['usr_nick']) . '" class="var" style="color: ' . rand_color() . '; font-weight: bold;">' . make_plaintext($event['usr_nick']) . '</a><span class="tip"> ... ' . make_descriptive_time($time) . '说:</span></div>'; echo '<div class="body"><a href="' . $event['link'] . '" style="font-size: ' . $event['weight'] . 'px">' . format_ubb($event['title']) . '</a></div>'; break; } echo '</div>'; } ?> </div> </div> </div> <div id="bottom"> <div id="bottom_inside"> © 2007 V2EX<br /> <a href="http://www.v2ex.com/" class="white">V2EX</a> | <a href="http://www.livid.cn/" class="white">Blog</a> | <a href="http://labs.v2ex.com/" class="white">Labs</a> | <a href="http://code.google.com/" class="white">Developers</a><br /> <small>V2EX Dashboard is a prototype design of future V2EX frontpage, it changes by time.</small> </div>
$__LIST__ = $tags; if (count($__LIST__) == 0) { echo ""; } else { foreach ($__LIST__ as $key => $vo) { ++$i; $mod = $i % 2; ?> <A HREF="__APP__/Blog/tag/name/<?php echo urlencode($vo["name"]); ?> "><span style="font-size:<?php echo getTitleSize($vo["count"]); ?> ;color:<?php echo rand_color($vo["id"]); ?> "><?php echo $vo["name"]; ?> </span></A> <?php } } } else { echo ""; } ?> </ul></div> </div> <div id="panelSearch" class="panel">