• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_links函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_links函数的典型用法代码示例。如果您正苦于以下问题:PHP get_links函数的具体用法?PHP get_links怎么用?PHP get_links使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_links函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: show_main_page

function show_main_page($dbconn, $diary_login)
{
    $sql = "SELECT u.uid, s.page_main, s.format_note FROM " . TABLE_SETTINGS . " AS s, " . TABLE_USERS . " AS u WHERE u.login='" . $diary_login . "' AND s.uid=u.uid LIMIT 1";
    $result = pg_query($dbconn, $sql) or die(pg_last_error($dbconn));
    $data = pg_fetch_object($result, NULL);
    echo assign_vars($data->page_main, array('{login}' => $diary_login, '{diary}' => get_last_notes($dbconn, $diary_login, $data->format_note), '{hrefguestbook}' => 'http://' . $_SERVER['SERVER_NAME'] . '/' . PAGE_GUESTBOOK, '{archive}' => get_archive($dbconn, $diary_login), '{links}' => get_links($dbconn, $diary_login)));
}
开发者ID:BackupTheBerlios,项目名称:diarusie-svn,代码行数:7,代码来源:index.inc.php


示例2: get_links_list_ster

function get_links_list_ster($order = 'name', $hide_if_empty = 'obsolete')
{
    $order = strtolower($order);
    // Handle link category sorting
    $direction = 'ASC';
    if ('_' == substr($order, 0, 1)) {
        $direction = 'DESC';
        $order = substr($order, 1);
    }
    if (!isset($direction)) {
        $direction = '';
    }
    $cats = get_categories("type=link&orderby={$order}&order={$direction}&hierarchical=0");
    // Display each category
    if ($cats) {
        foreach ((array) $cats as $cat) {
            // Handle each category.
            // Display the category name
            echo '  <li id="linkcat-' . $cat->cat_ID . '" class="linkcat"><h2>' . $cat->cat_name . "</h2>\n\t<ul>\n";
            // Call get_links() with all the appropriate params
            get_links($cat->cat_ID, '<li>', "</li>", ": ", true, 'name', true);
            // Close the last category
            echo "\n\t</ul>\n</li>\n";
        }
    }
}
开发者ID:BGCX261,项目名称:zhiqiang-blog-svn-to-git,代码行数:26,代码来源:linkpage.php


示例3: admin_links

function admin_links()
{
    global $db;
    $tpl = new smarty();
    ob_start();
    $tpl->display(DESIGN . '/tpl/admin/links.html');
    $content = ob_get_contents();
    ob_end_clean();
    main_content(SERVER, $content, '', 1);
    get_links();
}
开发者ID:ECP-Black,项目名称:ECP,代码行数:11,代码来源:links.php


示例4: getPinboardLinks

function getPinboardLinks($username, $password)
{
    $pinboard = '';
    if ($xmlstr = get_links("https://api.pinboard.in/v1/posts/recent?count=5", $username, $password)) {
        $xml = simplexml_load_string($xmlstr);
        foreach ($xml->post as $post) {
            $pinboard .= '<li><a href="' . $post->attributes()->href . '" target="_blank" on>' . $post->attributes()->description . '</a></li>';
        }
    } else {
        $pinboard = '<li>No links :( </li>';
    }
    return $pinboard;
}
开发者ID:JamieKnight,项目名称:Bouncer,代码行数:13,代码来源:index.php


示例5: form

function form($predef = "")
{
    global $mytrail, $i, $trailperms, $caps;
    if (is_array($predef)) {
        print_trail_direct(array(), $mytrail, $trailperms, -1, $predef, has_caps($caps, CAP_SUPERUSER));
    } else {
        $links = get_links($mytrail['path']);
        if (is_array($links)) {
            print_trail_direct($links, $mytrail, $trailperms, $i, "", has_caps($caps, CAP_SUPERUSER));
            //the output is printed directly for usability reasons when
            //hanling big trails under slow response time conditions
        }
    }
}
开发者ID:pilif,项目名称:linktrail,代码行数:14,代码来源:editlink.php


示例6: widget_links_with_style

function widget_links_with_style() {
   global $wpdb;
   $link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->linkcategories");
   foreach ($link_cats as $link_cat) {
	 ?>
    <div class="widget_style">
     <div class="right_bg">
        <div class="right_head"><h2><?php echo $link_cat->cat_name; ?></h2></div>
			<ul>
			<?php get_links($link_cat->cat_id, '<li>', '</li>', '<br />', FALSE, 'id', TRUE, 	TRUE, -1, TRUE); ?>
			</ul>
	</div>
    </div>
   <?php } ?>
   <?php }
开发者ID:baroquon,项目名称:charolais,代码行数:15,代码来源:functions.php


示例7: get_links

function get_links($targetUrl, $depth)
{
    global $urls, $linkFilter, $frameDepth, $actualFrameDepth;
    if (!$targetUrl) {
        return;
    }
    if ($frameDepth - $depth > $actualFrameDepth) {
        $actualFrameDepth = $frameDepth - $depth;
    }
    $html = file_get_contents($targetUrl);
    $dom = new DOMDocument();
    @$dom->loadHTML($html);
    $xpath = new DOMXPath($dom);
    $bases = $xpath->evaluate("/html/head//base");
    if ($bases->length > 0) {
        $baseItem = $bases->item($bases->length - 1);
        $base = $baseItem->getAttribute('href');
    } else {
        $base = $targetUrl;
    }
    if ($depth > 0) {
        $frames = $xpath->evaluate("/html/body//iframe");
        for ($i = 0; $i < $frames->length; $i++) {
            $frame = $frames->item($i);
            $url = make_absolute($frame->getAttribute('src'), $base);
            if ($url != $targetUrl) {
                get_links($url, $depth - 1);
            }
        }
        $frames = $xpath->evaluate("/html/body//frame");
        for ($i = 0; $i < $frames->length; $i++) {
            $frame = $frames->item($i);
            $url = make_absolute($frame->getAttribute('src'), $base);
            if ($url != $targetUrl) {
                get_links($url, $depth - 1);
            }
        }
    }
    $hrefs = $xpath->evaluate("/html/body//a");
    for ($i = 0; $i < $hrefs->length; $i++) {
        $href = $hrefs->item($i);
        $url = $href->getAttribute('href');
        $absolute = make_absolute($url, $base);
        if (preg_match("@" . $linkFilter . "@i", parse_url($absolute, PHP_URL_PATH))) {
            array_push($urls, $absolute);
        }
    }
}
开发者ID:manishkhanchandani,项目名称:mkgxy,代码行数:48,代码来源:viewer-links.php


示例8: widget_itheme_links

function widget_itheme_links()
{
    ?>
      <!--sidebox start -->
      <div id="links" class="dbx-box">
        <h3 class="dbx-handle"><?php 
    _e('Links');
    ?>
</h3>
        <div class="dbx-content">
          <ul>
            <?php 
    get_links('-1', '<li>', '</li>', '<br />', FALSE, 'id', FALSE, FALSE, -1, FALSE);
    ?>
          </ul>
        </div>
      </div>
      <!--sidebox end --><?php 
}
开发者ID:phatboyg,项目名称:phatboyg.github.io,代码行数:19,代码来源:functions.php


示例9: get_menu_items

 function get_menu_items($user_level, $connection)
 {
     return get_links($user_level, $connection, 1);
     /*
             $result = mysqli_query($connection, "SELECT * FROM menu_items WHERE security_level <= ".sanitize($user_level)." and language = 'en' and visible = 1 ORDER BY menu_order") or die(mysqli_error($connection));
             if (mysqli_num_rows($result) > 0) {
                 while ($row = mysqli_fetch_assoc($result)) {
                     $menu_names[] = $row['menu_text'];
                     if ($row['use_iframe'] == 1) {
                         $menu_links[] = "show_page.php?id=".$row['id'];
                     } else {
                         $menu_links[] = $row['link'];
                     }
     
                 }
             }
             $retval[0] = $menu_names;
             $retval[1] = $menu_links;
             return $retval;*/
 }
开发者ID:salahbj,项目名称:smoothoperator,代码行数:20,代码来源:layout.php


示例10: get_initialized_data

function get_initialized_data($CUSOMER_ENV = TRUE)
{
    $links =& get_links(TRUE);
    $data = array();
    //its not so wise to send all links for the possibility of usage
    //its not also secure
    foreach ($links as $key => $link) {
        $data[$key] = get_link($key);
    }
    if (!$CUSOMER_ENV) {
        return $data;
    }
    //
    //now we are in customer env
    $data['header_description'] = '';
    $data['header_keywords'] = '';
    $data['header_canonical_url'] = '';
    $data['header_title'] = '';
    return $data;
}
开发者ID:NaszvadiG,项目名称:BurgeCMF,代码行数:20,代码来源:init_helper.php


示例11: widget_links_with_style

function widget_links_with_style()
{
    global $wpdb;
    $link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM {$wpdb->linkcategories}");
    foreach ($link_cats as $link_cat) {
        ?>

  <h3><?php 
        echo $link_cat->cat_name;
        ?>
</h3>

   <ul>
   <?php 
        get_links($link_cat->cat_id, '<li>', '</li>', '<br />', FALSE, 'rand', TRUE, TRUE, -1, TRUE);
        ?>
   </ul>

   <?php 
    }
    ?>
   <?php 
}
开发者ID:jeremylightsmith,项目名称:blog,代码行数:23,代码来源:functions.php


示例12: wp_loginout

			<li><?php 
    wp_loginout();
    ?>
</li>
	</ul>

<h2><?php 
    _e('Monthly Archives');
    ?>
</h2>
	<ul><?php 
    wp_get_archives('type=monthly');
    ?>
</ul>

<h2><?php 
    _e('Blogroll');
    ?>
</h2>
    <ul><?php 
    get_links(-1, '<li>', '</li>', ' - ');
    ?>
</ul>
<?php 
}
?>
</div> 
<!-- [sidebar2] -->

</div> <!-- [sidebar] -->
开发者ID:howardlei82,项目名称:IGSM-Website,代码行数:30,代码来源:sidebar.php


示例13: foreach

    ?>
,<?php 
    echo $group->name;
}
?>
" />
                                            </div>
                                        </div>
          
                                        <div class="control-group">
                                            <label class="control-label" for="tags">Parent</label>
                                            <div class="controls controls-row">
                                                <select name="parent">
                                                    <option value="0">No Parent</option>
                                                    <?php 
foreach (get_links() as $db_link) {
    ?>
                                                    <option value="<?php 
    echo $db_link->id;
    ?>
"><?php 
    echo $db_link->name;
    ?>
</option>
                                                    <?php 
}
?>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="control-group">
开发者ID:hscale,项目名称:builder-engine,代码行数:31,代码来源:add_link.php


示例14: wp_get_archives

				</ul>

			<h3>Archives</h3>
			
			<ul>
				<?php 
    wp_get_archives('type=monthly');
    ?>
				</ul>
		

			<h3>Resources</h3>
			
			<ul>
				<?php 
    get_links('-1', '<li>', '</li>', '<br />');
    ?>
				</ul>
			
			
			
			<h3>Meta</h3>
			<ul>
					<?php 
    wp_register();
    ?>
					<li><?php 
    wp_loginout();
    ?>
</li>
					<li><a href="http://validator.w3.org/check/referer" title="This page validates as XHTML 1.0 Transitional">Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a></li>
开发者ID:jeremylightsmith,项目名称:blog,代码行数:31,代码来源:sidebar.php


示例15: index_url

function index_url($url, $level, $site_id, $md5sum, $domain, $indexdate, $sessid, $can_leave_domain, $reindex)
{
    global $entities, $min_delay;
    global $command_line;
    global $min_words_per_page;
    global $supdomain;
    global $mysql_table_prefix, $user_agent, $tmp_urls, $delay_time, $domain_arr;
    $needsReindex = 1;
    $deletable = 0;
    $url_status = url_status($url);
    $thislevel = $level - 1;
    if (strstr($url_status['state'], "Relocation")) {
        $url = preg_replace("/ /", "", url_purify($url_status['path'], $url, $can_leave_domain));
        if ($url != '') {
            $result = mysql_query("select link from " . $mysql_table_prefix . "temp where link='{$url}' && id = '{$sessid}'");
            echo mysql_error();
            $rows = mysql_numrows($result);
            if ($rows == 0) {
                mysql_query("insert into " . $mysql_table_prefix . "temp (link, level, id) values ('{$url}', '{$level}', '{$sessid}')");
                echo mysql_error();
            }
        }
        $url_status['state'] == "redirected";
    }
    /*
    		if ($indexdate <> '' && $url_status['date'] <> '') {
    			if ($indexdate > $url_status['date']) {
    				$url_status['state'] = "Date checked. Page contents not changed";
    				$needsReindex = 0;
    			}
    		}*/
    ini_set("user_agent", $user_agent);
    if ($url_status['state'] == 'ok') {
        $OKtoIndex = 1;
        $file_read_error = 0;
        if (time() - $delay_time < $min_delay) {
            sleep($min_delay - (time() - $delay_time));
        }
        $delay_time = time();
        if (!fst_lt_snd(phpversion(), "4.3.0")) {
            $file = file_get_contents($url);
            if ($file === FALSE) {
                $file_read_error = 1;
            }
        } else {
            $fl = @fopen($url, "r");
            if ($fl) {
                while ($buffer = @fgets($fl, 4096)) {
                    $file .= $buffer;
                }
            } else {
                $file_read_error = 1;
            }
            fclose($fl);
        }
        if ($file_read_error) {
            $contents = getFileContents($url);
            $file = $contents['file'];
        }
        $pageSize = number_format(strlen($file) / 1024, 2, ".", "");
        printPageSizeReport($pageSize);
        if ($url_status['content'] != 'text') {
            $file = extract_text($file, $url_status['content']);
        }
        printStandardReport('starting', $command_line);
        $newmd5sum = md5($file);
        if ($md5sum == $newmd5sum) {
            printStandardReport('md5notChanged', $command_line);
            $OKtoIndex = 0;
        } else {
            if (isDuplicateMD5($newmd5sum)) {
                $OKtoIndex = 0;
                printStandardReport('duplicate', $command_line);
            }
        }
        if (($md5sum != $newmd5sum || $reindex == 1) && $OKtoIndex == 1) {
            $urlparts = parse_url($url);
            $newdomain = $urlparts['host'];
            $type = 0;
            /*		if ($newdomain <> $domain)
            					$domainChanged = 1;
            
            				if ($domaincb==1) {
            					$start = strlen($newdomain) - strlen($supdomain);
            					if (substr($newdomain, $start) == $supdomain) {
            						$domainChanged = 0;
            					}
            				}*/
            // remove link to css file
            //get all links from file
            $data = clean_file($file, $url, $url_status['content']);
            if ($data['noindex'] == 1) {
                $OKtoIndex = 0;
                $deletable = 1;
                printStandardReport('metaNoindex', $command_line);
            }
            $wordarray = unique_array(explode(" ", $data['content']));
            if ($data['nofollow'] != 1) {
                $links = get_links($file, $url, $can_leave_domain, $data['base']);
                $links = distinct_array($links);
//.........这里部分代码省略.........
开发者ID:hoelzro,项目名称:Bifrost,代码行数:101,代码来源:spider.php


示例16: _e

    ?>
          </ul>
        </div>
      </div>
      <!--sidebox end -->

      <!--sidebox start -->
      <div id="links" class="dbx-box">
        <h3 class="dbx-handle"><?php 
    _e('Links', TDOMAIN);
    ?>
</h3>
        <div class="dbx-content">
          <ul>
            <?php 
    get_links('-1', '<li>', '</li>', '<br />', FALSE, 'id', FALSE, FALSE, -1, FALSE);
    ?>
          </ul>
        </div>
      </div>
      <!--sidebox end -->

      <!--sidebox start -->
      <div id="meta" class="dbx-box">
        <h3 class="dbx-handle"><?php 
    _e('Meta', TDOMAIN);
    ?>
</h3>
        <div class="dbx-content">
          <ul>
			<?php 
开发者ID:JustDevZero,项目名称:Wordpress,代码行数:31,代码来源:sidebar.php


示例17: UTW_ShowRelatedPostsForCurrentPost

	</ul>
	
	<?php 
if (is_single()) {
    ?>
	<h2>Related Entries</h2>
	<ul>
		<?php 
    UTW_ShowRelatedPostsForCurrentPost("posthtmllist");
    ?>
	</ul>               
	<?php 
}
?>
	
	<h2>My Homeboys (And Girls)</h2>
	<ul>
		<?php 
get_links('-1', '<li>', '</span></li>', '<span>', FALSE, 'id', TRUE, FALSE, 10, FALSE, TRUE);
?>
	</ul>
	
	<div id="footer">
		<p>Powered by <a href="http://wordpress.org/">Wordpress <?php 
bloginfo('version');
?>
</a></p>
		<p>Designed by <a href="http://whalesalad.com/">Michael Whalen</a></p>	
	</div>
		
</div>
开发者ID:ricardomaur,项目名称:elixir,代码行数:31,代码来源:sidebar.php


示例18: wp_list_pages

		<h2>Pages</h2>
		<ul>
		<?php 
wp_list_pages('title_li=&depth=1');
?>
		</ul>
		
		<h2>Archives</h2>
		<ul>
		<?php 
wp_get_archives('type=monthly');
?>
		</ul>
		
		<h2>Meta</h2>
		<ul>
			<?php 
wp_register();
?>
			<li><?php 
wp_loginout();
?>
</li>
		</ul>
		
		<h2>Blogroll</h2>
		<ul class="blogroll">
			<?php 
get_links('-1', '<li>', '</li>', '', FALSE, 'name', FALSE, FALSE, -1, TRUE);
?>
		</ul>
开发者ID:pravin,项目名称:wordpress,代码行数:31,代码来源:sidebar.php


示例19: array

    }
}
// 获取最近文章列表
if ($page == 0) {
    $page = 1;
}
$query_sql = "SELECT a.id,a.cid,a.uid,a.ruid,a.title,a.addtime,a.edittime,a.comments,c.name as cname,u.avatar as uavatar,u.name as author,ru.name as rauthor\r\n    FROM `yunbbs_articles` a \r\n    LEFT JOIN `yunbbs_categories` c ON c.id=a.cid\r\n    LEFT JOIN `yunbbs_users` u ON a.uid=u.id\r\n    LEFT JOIN `yunbbs_users` ru ON a.ruid=ru.id\r\n    ORDER BY `edittime` DESC LIMIT " . ($page - 1) * $options['list_shownum'] . "," . $options['list_shownum'];
$query = $DBS->query($query_sql);
$articledb = array();
while ($article = $DBS->fetch_array($query)) {
    // 格式化内容
    $article['addtime'] = showtime($article['addtime']);
    $article['edittime'] = showtime($article['edittime']);
    $articledb[] = $article;
}
unset($article);
$DBS->free_result($query);
// 页面变量
$title = $options['name'] . ' - page ' . $page;
$site_infos = get_site_infos();
$newest_nodes = get_newest_nodes();
if (count($newest_nodes) == $options['newest_node_num']) {
    $bot_nodes = get_bot_nodes();
}
$show_sider_ad = "1";
$links = get_links();
if ($options['site_des']) {
    $meta_des = htmlspecialchars(mb_substr($options['site_des'], 0, 150, 'utf-8')) . ' - page ' . $page;
}
$pagefile = dirname(__FILE__) . '/templates/default/' . $tpl . 'indexpage.php';
include dirname(__FILE__) . '/templates/default/' . $tpl . 'layout.php';
开发者ID:power12317,项目名称:Youbbs-Openshift2,代码行数:31,代码来源:indexpage.php


示例20: htmlspecialchars

    <form id="searchform" method="get" action="<?php 
    echo htmlspecialchars($_SERVER['PHP_SELF']);
    ?>
">
    <div>
        <input class="searchfield" type="text" name="s" id="s" value="" title="Enter keyword to search" />
        <input class="submit" type="submit" value="search" title="Click to search archives" />
    </div>
    </form>
</div>
</div>

<h3>Blogroll</h3>
<ul>
<?php 
    get_links('-1', '<li>', '</li>', '', 0, 'name', 0, 0, -1, 0);
    ?>
</ul>

<h3>Archives</h3>
<ul>
<?php 
    wp_get_archives('type=monthly');
    ?>
</ul>

<h3>Categories</h3>
<ul>
    <?php 
    wp_list_cats();
    ?>
开发者ID:sebdi,项目名称:wp-journalist,代码行数:31,代码来源:sidebar.php



注:本文中的get_links函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_links_list函数代码示例发布时间:2022-05-15
下一篇:
PHP get_linkrating函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap