/** * Just textile the text and return * * @param string $text Input text * @return string */ function do_textile($text) { Env::useLibrary('textile'); $textile = new Textile(); $text = $textile->TextileRestricted($text, false, false); return add_links($text); }
function do_textile($text) { $textile = new Textile(); $text = $textile->TextileRestricted($text, false, false); //return $text; return add_links($text); }
function add_all_links($url) { global $db; $sql = "select * from ve123_links where url like '%" . $url . "%'"; $result = $db->query($sql); $total = $db->num_rows($result); //记录总数i // echo $sql; // if($total<=0){header("location:links.php");exit;} $pagesize = 30; //每页显示数 $totalpage = ceil($total / $pagesize); $page = intval($_GET["page"]); if ($page <= 0) { $page = 1; } $offset = ($page - 1) * $pagesize; $query = $db->query($sql . " limit {$offset},{$pagesize}"); $str = "<html><head><title></title><link rel=\"stylesheet\" href=\"images/maincss.css\">"; $str .= "<meta http-equiv='Content-Type' content='text/html; charset=gb2312'></head><body >"; $str .= "<b>网站正在收录中……请稍候!<br>"; while ($row = $db->fetch_array($query)) { add_links($row["url"], false); $str .= $row["url"] . "<br>"; } if ($page <= $totalpage) { $str .= "<meta http-equiv=\"refresh\" content=3;url='?action=add_all_links&url=" . $url . "&page=" . ($page + 1) . "'>"; $str .= "</body></html>"; } else { $str .= "收录完毕<br>"; $str .= "<a href=\"links.php\">返回上一页</a>"; $str .= "</body></html>"; } echo $str; // add_all_links($url); }
function do_related_functions($func) { $functions = ''; $GLOBALS['functions'] = get_func_info(); foreach ($GLOBALS['functions'] as $name => $function) { if ($func & $function['function']) { $functions .= "<a name='{$name}'></a>\n"; $functions .= "<hr class='light'/>\n"; $text = add_links($function['short_desc']); if ($function['arguments'] === 'none') { $functions .= "<div class='name'><span class='type'>{$function['return_type']}</span> {$name}()</div>\n"; } else { $functions .= "<div class='name'><span class='type'>{$function['return_type']}</span> {$name}( <span class='type'>{$function['arguments']}</span> )</div>\n"; } $functions .= "<div class='short-description'>{$text}</div>\n"; if (isset($function['version'])) { $functions .= "<div class='version'>Introduced in version {$function['version']}</div>\n"; } $functions .= "<div class='description'>\n"; $functions .= $function['data']; $functions .= "</div>\n"; } } if (empty($functions)) { return; } echo '<h2>Related Functions</h2>'; echo "<div class='functions'>\n"; echo $functions; echo "</div>\n"; echo "<hr />\n"; }
function add_all_links($url) { global $db; $sql = "select * from ve123_links where url like '%" . $url . "%'"; $result = $db->query($sql); $total = $db->num_rows($result); $pagesize = 5; $totalpage = ceil($total / $pagesize); $page = intval($_GET['page']); if ($page <= 0) { $page = 1; } $offset = ($page - 1) * $pagesize; $query = $db->query($sql . " limit {$offset},{$pagesize}"); $str = "<html><head><title></title><link rel=\"stylesheet\" href=\"images/maincss.css\">"; $str .= "<meta http-equiv='Content-Type' content='text/html; charset=gb2312'></head><body >"; $str .= '<b>网站正在收录中……请稍候!<br>'; while ($row = $db->fetch_array($query)) { add_links($row['url'], false); $str .= $row['url'] . '<br>'; } $str .= "<meta http-equiv=\"refresh\" content=3;url='?action=add_all_links&url=" . $url . '&page=' . ($page + 1) . "'>"; $str .= '</body></html>'; echo $str; }
function arc_create_section($id, $data, $imagePath, $titlePath = '', $contentPath = '', $urlPath = '', $classes = '', $isVertical = true, $textLimit = 140, $constant_read_more = true, $link_urls = false) { ?> <div id="<?php echo $id; ?> " class="arc-sections <?php echo $classes; ?> "> <?php foreach ($data as $key => $value) { ?> <div class="arc-section"> <img src="<?php echo arc_convert_content($imagePath, $value); ?> "/> <h4><?php echo arc_convert_content($titlePath, $value); ?> </h4> <div class='arc-section-content'> <?php $clipped_result = false; $result_string = arc_limit_content($value, $contentPath, $textLimit, '.', '...', $clipped_result); echo $link_urls ? add_links($result_string) : $result_string; if ($constant_read_more || $clipped_result) { ?> <a class="arc-read-more" href="<?php echo arc_convert_content($urlPath, $value); ?> ">[Read More]</a> <?php } ?> </div> </div> <?php } ?> </div> <?php }
if ($load_page == 'all_settings') { $feature = $features[$load_page]; echo "<p class='intro'>{$feature[2]}</p>\n"; echo "<hr />\n"; do_related_settings(FUNC_ALL); } else { if ($load_page == 'all_functions') { $feature = $features[$load_page]; echo "<p class='intro'>{$feature[2]}</p>\n"; echo "<hr />\n"; do_related_functions(FUNC_ALL); } else { $feature = $features[$load_page]; echo "<p class='intro'>{$feature[2]}</p>\n"; echo "<hr class='light'/>\n"; echo add_links($feature[3]) . "\n"; echo "<hr style='clear: both'/>\n"; do_related_settings($feature[1]); do_related_functions($feature[1]); } } } if (isset($feature[4]) && isset($feature[4]['tabfields'])) { $tabFields = $feature[4]['tabfields']; } } else { $c = false; foreach ($features as $name => $feature) { if (in_array($name, array('all_functions', 'all_settings'))) { continue; }