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

PHP menu函数代码示例

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

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



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

示例1: lista

function lista($user)
{
    global $dateformat;
    $user = protect($user);
    requirelogin();
    $title = "Mensagens de {$user}";
    include "libs/accounts.php";
    // listar todas as mensagens de $user onde hidden = 'n' (para outro user ver)
    $output = menu($user) . url("message/send/{$user}", "[enviar mensagem]") . "<br>\n";
    $usr = resolveuser($user);
    $qry = mysql_query("SELECT `from`,`content`,`data` FROM messages WHERE `to`='{$usr}' AND `hidden`='n' ORDER BY id DESC LIMIT 30");
    if (mysql_numrows($qry) == 0) {
        $output .= 'Nenhuma mensagem!';
    } else {
        while ($row = mysql_fetch_array($qry)) {
            $user = mysql_query("SELECT login,foto FROM accounts WHERE id='{$row['from']}'");
            $user = mysql_fetch_array($user);
            $output .= '<p class="row">' . t("De") . ': ' . url("user/profile/{$user['login']}", $user['login']) . '<br/>';
            $output .= '<blockquote>
                 ' . bbcode($row['content']) . '
                  </blockquote>
                  <hr size="1"><i>' . date($dateformat, $row['data']) . '</i>
                  </p>';
        }
    }
    section($output, $title);
}
开发者ID:jesobreira,项目名称:soclwap,代码行数:27,代码来源:message.php


示例2: menu

function menu($parent, $indent)
{
    global $widthTotal, $menu;
    if (!isset($menu[$parent]->children)) {
        return;
    }
    foreach ($menu[$parent]->children as $sortorder => $id) {
        $items[] = $sortorder;
    }
    sort($items);
    if ($parent) {
        echo "\n{$indent} <ul>";
    }
    foreach ($items as $item) {
        $id = $menu[$parent]->children[$item];
        $target = $menu[$id]->target;
        $title = $menu[$id]->title;
        echo "\n{$indent}  <li><a href='{$target}'";
        if (!$parent) {
            echo " class='menu'";
            $widthTotal += $menu[$id]->width;
        }
        echo ">{$title}</a>";
        menu($id, $indent . "  ");
        echo "</li>";
    }
    if ($parent) {
        echo "\n{$indent} </ul>\n{$indent}";
    }
}
开发者ID:TaylorMonacelli,项目名称:phplib,代码行数:30,代码来源:menus.php


示例3: navigation

 protected function navigation()
 {
     if ($root = $this->store->getRootCategory()) {
         foreach ($root->children as $category) {
             menu('top.navigation')->add('cat-' . $category->id, ['href' => $category->url(), 'text' => $category->name(), 'children' => $this->children($category)]);
         }
     }
 }
开发者ID:BryceHappy,项目名称:lavender,代码行数:8,代码来源:FrontendHandler.php


示例4: backMenu

function backMenu()
{
    echo "\n0) Back to menu\n1) Exit\n> ";
    if (cin() == '0') {
        menu();
    } else {
        die("Grazie per aver utilizzato PWANEDDLER\n");
    }
}
开发者ID:AlexWillyOrion,项目名称:pwaneddler,代码行数:9,代码来源:pwaneddler.php


示例5: error_head

function error_head($class)
{
    global $ModPath, $ModStart;
    include "header.php";
    $mainlink = 'ad_l';
    menu($mainlink);
    SearchForm();
    echo '
   <div class="alert ' . $class . '" role="alert" align="center">';
}
开发者ID:Jireck-npds,项目名称:npds_dune,代码行数:10,代码来源:links-1.php


示例6: display_error

function display_error($msg)
{
    echo "<!DOCTYPE html>\n<html>\n";
    display_headers($title);
    echo "\n<body>";
    menu();
    echo '<div class="container" style="margin-top:-10px;"><div id="error" style="display:none;"></div></div>';
    echo "<script>show_error('" . $msg . "');</script>";
    echo "</body></html>";
}
开发者ID:0xc0d3r,项目名称:Attendance-Portal,代码行数:10,代码来源:functions.php


示例7: route

function route()
{
    switch (TRUE) {
        case isset($_GET['log_file']):
            view_log($_GET['log_file']);
            break;
        default:
            menu();
    }
}
开发者ID:eaglstun,项目名称:dbug,代码行数:10,代码来源:admin.php


示例8: admin

function admin($section)
{
    //загрузка представления
    $data = array();
    $data = info($section);
    $data['menu'] = menu($section);
    $data['bread'] = breadCrumbs($section);
    $data['page_name'] = 'Сайт';
    require "view/viewSite.php";
}
开发者ID:xarrper,项目名称:cms,代码行数:10,代码来源:index.php


示例9: showHeader

function showHeader($string)
{
    menu();
    ?>
    <div class="wrap">
        <h1 class="header-heading"><?php 
    echo $string;
    ?>
</h1>
    </div>
    <?php 
}
开发者ID:200755008,项目名称:Reingenierie,代码行数:12,代码来源:functions.php


示例10: markdown_menu

function markdown_menu($text)
{
    $parser_class = MARKDOWN_PARSER_CLASS;
    $parser = new $parser_class();
    # Transform text using parser.
    $result = $parser->transform($text);
    if (isset($parser->headers)) {
        return menu($parser->headers) . $result;
    } else {
        return $result;
    }
}
开发者ID:erikfrerejean,项目名称:phpbb,代码行数:12,代码来源:markdown2html.php


示例11: criar

 /**
  * Retorna o html do menu criado com o array passado por parâmetro.
  * 
  * @param array $data
  * @return string
  */
 public function criar($data = array())
 {
     if (!empty($data)) {
         $data = $this->_remove_unnecessary_fields($data);
     } else {
         $data = $this->menu_bar;
     }
     if ($this->restricted_urls != NULL) {
         $data = $this->_remove_restrict_urls($data);
     }
     $this->menu_html = menu($this->menu_bar);
     return $this->menu_html;
 }
开发者ID:ThiagoMMoura,项目名称:marciafarioli2,代码行数:19,代码来源:Top_bar.php


示例12: menu

function menu($menu)
{
    $buffer = null;
    foreach ($menu as $name => $link) {
        if (is_array($link)) {
            $buffer .= '<li class="dropdown"><a href="" class="dropdown-toggle js-activated" data-toggle="dropdown"> ' . $name . '</a>';
            $buffer .= '<ul class="dropdown-menu">' . menu($link) . '</ul></li>';
        } else {
            $buffer .= '<li><a href="' . $link . '">' . $name . '</a></li>';
        }
    }
    return $buffer;
}
开发者ID:argissa,项目名称:hw16-kochergin,代码行数:13,代码来源:function.php


示例13: contentheader

function contentheader()
{
    echo '<div id="header">';
    echo '<div class="frame">';
    echo '<div id="top_section">';
    banner("");
    menu("");
    echo '</div>';
    echo '<div id="upper_section" class="middletext">';
    ad();
    //user();
    echo '</div>';
    echo '</div>';
    echo '</div>';
}
开发者ID:mover5,项目名称:imobackup,代码行数:15,代码来源:layout.php


示例14: makeMenu

function makeMenu()
{
	return 
		menu("","","start/view.inc.php",
			array(
				menu("about","About","start/view.inc.php"),
				menu("news","News","news/view.inc.php"),
				menu("screenshots","Screenshots","screenshots/view.inc.php"),
				menu("features","Features","features/view.inc.php"),
				menu("download","Download","download/view.inc.php"),
				menu("contact","Contact/Impressum","contact/view.inc.php"),
				menu("http://antargis.berlios.de/docs","Documentation",""),
				menu("http://antargis.berlios.de/phpBB2","Forum...",""),
				menu("http://antargis.berlios.de/wiki","Wiki...",""),
				menu("http://developer.berlios.de/projects/antargis","Project site...","")));
}
开发者ID:BackupTheBerlios,项目名称:antargis-svn,代码行数:16,代码来源:menues.inc.php


示例15: viewdownloadcomments

function viewdownloadcomments($lid, $ttitle)
{
    global $prefix, $dbi, $admin, $bgcolor2, $module_name;
    include "header.php";
    include "modules/{$module_name}/d_config.php";
    menu(1);
    echo "<br>";
    $result = sql_query("SELECT ratinguser, rating, ratingcomments, ratingtimestamp FROM " . $prefix . "_downloads_votedata WHERE ratinglid = {$lid} AND ratingcomments != '' ORDER BY ratingtimestamp DESC", $dbi);
    $totalcomments = sql_num_rows($result, $dbi);
    $transfertitle = ereg_replace("_", " ", $ttitle);
    $transfertitle = stripslashes($transfertitle);
    $displaytitle = $transfertitle;
    OpenTable();
    echo "<center><font class=\"option\"><b>" . _DOWNLOADPROFILE . ": {$displaytitle}</b></font><br><br>";
    downloadinfomenu($lid, $ttitle);
    echo "<br><br><br>" . _TOTALOF . " {$totalcomments} " . _COMMENTS . "</font></center><br>" . "<table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" width=\"450\">";
    $x = 0;
    while (list($ratinguser, $rating, $ratingcomments, $ratingtimestamp) = sql_fetch_row($result, $dbi)) {
        $ratingcomments = stripslashes($ratingcomments);
        ereg("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $ratingtimestamp, $ratingtime);
        $ratingtime = strftime("%F", mktime($ratingtime[4], $ratingtime[5], $ratingtime[6], $ratingtime[2], $ratingtime[3], $ratingtime[1]));
        $date_array = explode("-", $ratingtime);
        $timestamp = mktime(0, 0, 0, $date_array["1"], $date_array["2"], $date_array["0"]);
        $formatted_date = date("F j, Y", $timestamp);
        /* Individual user information */
        $result2 = sql_query("SELECT rating FROM " . $prefix . "_downloads_votedata WHERE ratinguser = '{$ratinguser}'", $dbi);
        $usertotalcomments = sql_num_rows($result2, $dbi);
        $useravgrating = 0;
        while (list($rating2) = sql_fetch_row($result2, $dbi)) {
            $useravgrating = $useravgrating + $rating2;
        }
        $useravgrating = $useravgrating / $usertotalcomments;
        $useravgrating = number_format($useravgrating, 1);
        echo "<tr><td bgcolor=\"{$bgcolor2}\">" . "<font class=\"content\"><b> " . _USER . ": </b><a href=\"{$nukeurl}/modules.php?name=Your_Account&amp;op=userinfo&amp;username={$ratinguser}\">{$ratinguser}</a></font>" . "</td>" . "<td bgcolor=\"{$bgcolor2}\">" . "<font class=\"content\"><b>" . _RATING . ": </b>{$rating}</font>" . "</td>" . "<td bgcolor=\"{$bgcolor2}\" align=\"right\">" . "<font class=\"content\">{$formatted_date}</font>" . "</td>" . "</tr>" . "<tr>" . "<td valign=\"top\">" . "<font class=\"tiny\">" . _USERAVGRATING . ": {$useravgrating}</font>" . "</td>" . "<td valign=\"top\" colspan=\"2\">" . "<font class=\"tiny\">" . _NUMRATINGS . ": {$usertotalcomments}</font>" . "</td>" . "</tr>" . "<tr>" . "<td colspan=\"3\">" . "<font class=\"content\">";
        if (is_admin($admin)) {
            echo "<a href=\"admin.php?op=DownloadsModDownload&amp;lid={$lid}\"><img src=\"modules/{$module_name}/images/editicon.gif\" border=\"0\" alt=\"" . _EDITTHISDOWNLOAD . "\"></a>";
        }
        echo " {$ratingcomments}</font>" . "<br><br><br></td></tr>";
        $x++;
    }
    echo "</table><br><br><center>";
    downloadfooter($lid, $ttitle);
    echo "</center>";
    CloseTable();
    include "footer.php";
}
开发者ID:BackupTheBerlios,项目名称:domsmod-svn,代码行数:46,代码来源:comments.php


示例16: menu

 function menu($array)
 {
     foreach ($array as $key => $value) {
         if (is_array($value)) {
             echo '<div class=subMenu>' . '<div class="menuTitle">' . $value['title'] . '</div>';
             menu($value);
         } else {
             if ($key !== 'title' and $key !== 'self') {
                 $self = isset($array['self']) ? $array['self'] . '/' : '';
                 echo '<div class="menuItem">' . '<a href="' . DOMEN . '/' . $self . $key . '">' . $value . '</a>' . '</div>';
             }
         }
         if (is_array($value)) {
             echo '</div>';
         }
     }
 }
开发者ID:exlant,项目名称:tictactoe,代码行数:17,代码来源:controllerAdmin.class.php


示例17: menu

function menu($search, $lid)
{
    global $menu;
    if ($search->count(true)) {
        foreach ($search as $post) {
            echo '<li>';
            echo '<table class="cell-img" width="280" border="0">';
            echo '<tr>';
            echo '<th width="240"><a href="/?view=' . $post['_id'] . '">' . $post['name'] . '</a></th>';
            echo '</li>';
            if (!empty($_COOKIE[md5("role")]) && isset($_GET['leftmenu'])) {
                echo '<th width="20"><a class="left" href="/?chid=' . $post['_id'] . '"><img class="left" src="images/edit.png"></a></th>';
                echo '<th width="20"><a class="left" href="/?delid=' . $post['_id'] . '"><img class="left"  src="images/delete.png"></a></th>';
            }
            echo ' </tr>';
            echo '<tr>';
            echo '<th width="240" style="color: yellow; text-transform:none; text-align:right;">Додано: ' . date('d.m.Y', $post['time']) . '&nbsp;&nbsp;</th>';
            echo ' </tr>';
            echo ' </table> ';
            $id = $post['_id'];
            $service = $_COOKIE['site'];
            $criteria = array('toId' => $id);
            $search = $menu->find($criteria)->sort(array($_COOKIE['sortindex'] => 1));
            if ($_COOKIE['sortindex'] == 'time') {
                $search = $menu->find($criteria)->sort(array($_COOKIE['sortindex'] => -1));
            }
            if ($search->count(true)) {
                echo '<ul>';
                menu($search, $id);
                echo '</ul>';
            } else {
                if (!empty($_COOKIE[md5("role")]) && isset($_GET['leftmenu'])) {
                    echo '<ul>';
                    echo '<a href="/?ins=' . $id . '"><img src="images/plus.png"></a>';
                    echo '</ul>';
                }
            }
            echo '</li>';
        }
        if (!empty($_COOKIE[md5("role")]) && isset($_GET['leftmenu'])) {
            echo '<li>';
            echo '<a href="/?ins=' . $lid . '"><img src="images/plus.png"></a>';
            echo '</li>';
        }
    }
}
开发者ID:qlsove,项目名称:old.faq,代码行数:46,代码来源:menu.php


示例18: settings

 /**
  * Настройки
  */
 public function settings()
 {
     $handler = menu();
     $menus = array();
     if ($result = $handler->findAll()) {
         foreach ($result as $menu) {
             $menus[$menu->id] = $menu->name;
         }
     }
     $form = new Form(array('#name' => 'widget.menu', 'id' => array('type' => 'select', 'validate' => array('Required'), 'label' => t('Выберите меню'), 'value' => $this->options->id, 'values' => $menus), 'actions' => array('#class' => 'form-actions', 'save' => array())));
     if ($result = $form->result()) {
         $this->options->id = $result->id;
         if ($this->save()) {
             return TRUE;
         }
     }
     $form->show();
 }
开发者ID:brussens,项目名称:cogear2,代码行数:21,代码来源:Widget.php


示例19: notes

function notes($user)
{
    global $url;
    $output = null;
    $id_user = resolveuser($user);
    $qry = mysql_query("SELECT content FROM notes WHERE account='{$id_user}'");
    $output = menu($user);
    if (mysql_num_rows($qry) == 0) {
        $output .= 'Nenhuma notificação!';
    } else {
        while ($row = mysql_fetch_array($qry)) {
            $output .= "\n" . '<p class="note">
' . url("user/profile/{$user}", $user) . ' ' . $row['content'] . '
</p>';
        }
    }
    section($output, "Notificações de {$user}");
}
开发者ID:jesobreira,项目名称:soclwap,代码行数:18,代码来源:user.php


示例20: selectCheck

function selectCheck()
{
    $numargs = func_num_args();
    $args = func_get_args();
    $menu = menu();
    if ($numargs == 1) {
        if (!empty($menu[$args[0]])) {
            return true;
        }
    } elseif ($numargs == 2) {
        foreach ($menu[$args[0]]['citys'] as $k => $v) {
            if ($args[1] == $v['id']) {
                return true;
            }
        }
    }
    return false;
}
开发者ID:Nonac,项目名称:OSC4CQJTU,代码行数:18,代码来源:function.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP menuLink函数代码示例发布时间:2022-05-15
下一篇:
PHP mensajes函数代码示例发布时间: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