Exemplo n.º 1
0
            }
            $dbFav = CFavorites::GetByID($_REQUEST["id"]);
            while ($arFav = $dbFav->GetNext()) {
                if ($arFav["USER_ID"] == $uid) {
                    $res = CFavorites::Delete($_REQUEST["id"]);
                }
            }
            if ($res) {
                $favMenu = new CBXFavAdmMenu();
                $res = $favMenu->GenerateMenuHTML();
            }
            break;
        case 'get_list':
            $dbFav = CFavorites::GetList();
            while ($arFav = $dbFav->GetNext()) {
                if ($uid == $arFav["USER_ID"] || $arFav["COMMON"] == "Y") {
                    $res[] = array("NAME" => $arFav["NAME"], "URL" => $arFav["URL"], "LANGUAGE_ID" => $arFav["LANGUAGE_ID"]);
                }
            }
            if ($res) {
                $res = CUtil::PhpToJSObject($res);
            }
            break;
        case 'get_menu_html':
            $favMenu = new CBXFavAdmMenu();
            $res = $favMenu->GenerateMenuHTML();
            break;
    }
    echo $res;
}
require $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/epilog_admin_after.php";
Exemplo n.º 2
0
    ?>
</div>
													<div id='<?php 
    echo "_" . $menu['items_id'];
    ?>
'>
<?php 
    if (!empty($menu["items"])) {
        foreach ($menu["items"] as $submenu) {
            $menuScripts .= $adminMenu->Show($submenu);
        }
    } elseif ($menu['menu_id'] == 'desktop') {
        echo CBXFavAdmMenu::GetEmptyMenuHTML();
    }
    if ($menu['menu_id'] == 'desktop') {
        echo CBXFavAdmMenu::GetMenuHintHTML(empty($menu["items"]));
    }
    ?>
													</div>
												</div>
											</td>
										</tr>
									</table>
								</div>
							</div>
						</div>
<?php 
}
?>
						<div class="adm-submenu-separator"></div>
<?php 
Exemplo n.º 3
0
<script type="text/javascript">
	BX.addCustomEvent(BX.adminMenu, 'onMenuChange', BX.delegate(BX.adminFav.onMenuChange, this));
</script>

<?php 
$favMenu = new CBXFavAdmMenu();
$favMenuText = GetMessage("MAIN_PR_ADMIN_FAV");
$favMenuItems = $favMenu->GenerateItems();