当前位置: 首页>>代码示例>>PHP>>正文


PHP Menu::SetDatabase方法代码示例

本文整理汇总了PHP中Menu::SetDatabase方法的典型用法代码示例。如果您正苦于以下问题:PHP Menu::SetDatabase方法的具体用法?PHP Menu::SetDatabase怎么用?PHP Menu::SetDatabase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Menu的用法示例。


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

示例1: Build

 function Build()
 {
     if ($this->name != "") {
         $menu = new Menu();
         $menu->SetDatabase($this->database);
         $menu->SetName($this->name);
         $order = "c.modu_name";
         if ($this->order == ORDER_BY_ORDER) {
             $order = "a.mnit_order";
         } else {
             $order = "c.modu_name";
         }
         if ($menu->SelectByName()) {
             $select = "select c.modu_name, c.modu_url " . "from menu_itens a, menus b , modules c " . "where a.mnit_menu_id = b.menu_id " . "and b.menu_name = \"" . $this->name . "\" " . "and c.modu_id = a.mnit_modu_id " . "order by " . $order;
             $result = $this->database->Execute($select);
             return $result;
         }
     }
     return false;
 }
开发者ID:googlecode-mirror,项目名称:schifers,代码行数:20,代码来源:cdMenuBuilder.php

示例2: MenuItem

				<td bgcolor="#FFFFFF" width="30%" valign="center" align="right">
					Id:&nbsp;
				</td>
				<td bgcolor="#FFFFFF" width="70%" valign="center" align="left">
					<select name="p_mnit_id">
						<option value="">Selecione</option>

<?php 
$menu_items = new MenuItem();
$menu_items->SetDatabase($database);
$result = $menu_items->SelectOrderBy();
while ($data = $database->FetchArray($result)) {
    $mnit_id = $data["mnit_id"];
    $menu = new Menu();
    $menu->SetId($data["mnit_menu_id"]);
    $menu->SetDatabase($database);
    $menu->SelectById();
    $module = new Module();
    $module->SetId($data["mnit_modu_id"]);
    $module->SetDatabase($database);
    $module->SelectById();
    echo "<option value=\"" . $mnit_id . "\">" . $menu->GetName() . " - " . $module->GetName() . "</option>";
}
?>

					</select>
				</td>
			</tr>
			<tr>
				<td bgcolor="#FFFFFF" width="100%" valign="center" align="center" colspan="2">
					<a href="javascript:Select();">Selecionar</a>&nbsp;
开发者ID:googlecode-mirror,项目名称:schifers,代码行数:31,代码来源:pgMenuItemQuery.php

示例3: DropTables

 function DropTables()
 {
     $moderator = new Moderator();
     $moderator->SetDatabase($this);
     $moderator->Drop();
     $message = new Message();
     $message->SetDatabase($this);
     $message->Drop();
     $topic = new Topic();
     $topic->SetDatabase($this);
     $topic->Drop();
     $user_info = new UserInfo();
     $user_info->SetDatabase($this);
     $user_info->Drop();
     $session = new Session();
     $session->SetDatabase($this);
     $session->Drop();
     $new = new News();
     $new->SetDatabase($this);
     $new->Drop();
     $shout = new Shout();
     $shout->SetDatabase($this);
     $shout->Drop();
     $paragraph = new Paragraph();
     $paragraph->SetDatabase($this);
     $paragraph->Drop();
     $privilege = new Privilege();
     $privilege->SetDatabase($this);
     $privilege->Drop();
     $role = new Role();
     $role->SetDatabase($this);
     $role->Drop();
     $menu_item = new MenuItem();
     $menu_item->SetDatabase($this);
     $menu_item->Drop();
     $module = new Module();
     $module->SetDatabase($this);
     $module->Drop();
     $page = new Page();
     $page->SetDatabase($this);
     $page->Drop();
     $article = new Article();
     $article->SetDatabase($this);
     $article->Drop();
     $subject = new Subject();
     $subject->SetDatabase($this);
     $subject->Drop();
     $menu = new Menu();
     $menu->SetDatabase($this);
     $menu->Drop();
     $profile = new Profile();
     $profile->SetDatabase($this);
     $profile->Drop();
     $user = new User();
     $user->SetDatabase($this);
     $user->Drop();
 }
开发者ID:googlecode-mirror,项目名称:schifers,代码行数:57,代码来源:cdDatabase.php


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