function submenu_option($title, $url, $id = null)
 {
     global $path_to_root;
     display_note(menu_link($path_to_root . $url, $title, $id), 0, 1);
 }
예제 #2
0
파일: renderer.php 프로젝트: M-Shahbaz/FA
 function display_applications(&$waapp)
 {
     global $path_to_root;
     $selected_app = $waapp->get_selected_application();
     if (!$_SESSION["wa_current_user"]->check_application_access($selected_app)) {
         return;
     }
     if (method_exists($selected_app, 'render_index')) {
         $selected_app->render_index();
         return;
     }
     echo "<table width='100%' cellpadding='0' cellspacing='0'>";
     foreach ($selected_app->modules as $module) {
         if (!$_SESSION["wa_current_user"]->check_module_access($module)) {
             continue;
         }
         // image
         echo "<tr>";
         // values
         echo "<td valign='top' class='menu_group'>";
         echo "<table border=0 width='100%'>";
         echo "<tr><td class='menu_group'>";
         echo $module->name;
         echo "</td></tr><tr>";
         echo "<td class='menu_group_items'>";
         foreach ($module->lappfunctions as $appfunction) {
             $img = $this->get_icon($appfunction->category);
             if ($appfunction->label == "") {
                 echo "&nbsp;<br>";
             } elseif ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) {
                 echo $img . menu_link($appfunction->link, $appfunction->label) . "<br>\n";
             } elseif (!$_SESSION["wa_current_user"]->hide_inaccessible_menu_items()) {
                 echo $img . '<span class="inactive">' . access_string($appfunction->label, true) . "</span><br>\n";
             }
         }
         echo "</td>";
         if (sizeof($module->rappfunctions) > 0) {
             echo "<td width='50%' class='menu_group_items'>";
             foreach ($module->rappfunctions as $appfunction) {
                 $img = $this->get_icon($appfunction->category);
                 if ($appfunction->label == "") {
                     echo "&nbsp;<br>";
                 } elseif ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) {
                     echo $img . menu_link($appfunction->link, $appfunction->label) . "<br>\n";
                 } elseif (!$_SESSION["wa_current_user"]->hide_inaccessible_menu_items()) {
                     echo $img . '<span class="inactive">' . access_string($appfunction->label, true) . "</span><br>\n";
                 }
             }
             echo "</td>";
         }
         echo "</tr></table></td></tr>";
     }
     echo "</table>";
 }
예제 #3
0
 function display_applications(&$waapp)
 {
     global $path_to_root;
     $sel_app = $waapp->get_selected_application();
     foreach ($sel_app->modules as $module) {
         // image
         echo "<table width='100%' align='center'><tr>";
         echo "<td valign='top' class='menu_group'>";
         echo "<table border=0 width='100%'>";
         echo "<tr><td class='menu_group'>";
         echo $module->name;
         echo "</td></tr><tr>";
         echo "<td width='50%' class='menu_group_items'>";
         $img = "<img src='{$path_to_root}/themes/studio/images/folder.gif' width='14' height='14' border='0'>&nbsp;&nbsp;";
         /*if ($_SESSION["language"]->dir == "rtl")
         			$class = "right";
         		else
         			$class = "left";*/
         foreach ($module->lappfunctions as $appfunction) {
             if ($appfunction->label == "") {
                 echo "<div class='empty'>&nbsp;<br></div>\n";
             } elseif ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) {
                 echo "<div>" . $img . menu_link($appfunction->link, $appfunction->label . "</div>");
             } else {
                 echo "<div>" . $img . "<span class='inactive'>" . access_string($appfunction->label, true) . "</span></div>\n";
             }
         }
         echo "</td>\n";
         if (sizeof($module->rappfunctions) > 0) {
             echo "<td width='50%' class='menu_group_items'>";
             foreach ($module->rappfunctions as $appfunction) {
                 if ($appfunction->label == "") {
                     echo "<div class='empty'>&nbsp;<br></div>\n";
                 } elseif ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) {
                     echo "<div>" . $img . menu_link($appfunction->link, $appfunction->label . "</div>");
                 } else {
                     echo "<div>" . $img . "<span class='inactive'>" . access_string($appfunction->label, true) . "</span></div>\n";
                 }
             }
             echo "</td>\n";
         }
         echo "</tr></table></td></tr></table>\n";
     }
 }
예제 #4
0
 function shortcut($url, $label)
 {
     echo "<li>";
     echo menu_link($url, $label);
     echo "</li>";
 }
예제 #5
0
 function display_applications(&$waapp)
 {
     $selected_app = $waapp->get_selected_application();
     if (!$_SESSION["wa_current_user"]->check_application_access($selected_app)) {
         return;
     }
     if (method_exists($selected_app, 'render_index')) {
         $selected_app->render_index();
         return;
     }
     foreach ($selected_app->modules as $module) {
         // image
         echo "<table width='100%'><tr>";
         echo "<td valign='top' class='menu_group'>";
         echo "<table border=0 width='100%'>";
         echo "<tr><td class='menu_group'>";
         echo $module->name;
         echo "</td></tr><tr>";
         echo "<td width='50%' class='menu_group_items'>";
         echo "<ul>\n";
         if ($_SESSION["language"]->dir == "rtl") {
             $class = "right";
         } else {
             $class = "left";
         }
         foreach ($module->lappfunctions as $appfunction) {
             if ($appfunction->label == "") {
                 echo "<li class='empty'>&nbsp;</li>\n";
             } elseif ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) {
                 echo "<li>" . menu_link($appfunction->link, $appfunction->label) . "</li>";
             } else {
                 echo "<li><span class='inactive'>" . access_string($appfunction->label, true) . "</span></li>\n";
             }
         }
         echo "</ul></td>\n";
         if (sizeof($module->rappfunctions) > 0) {
             echo "<td width='50%' class='menu_group_items'>";
             echo "<ul>\n";
             foreach ($module->rappfunctions as $appfunction) {
                 if ($appfunction->label == "") {
                     echo "<li class='empty'>&nbsp;</li>\n";
                 } elseif ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) {
                     echo "<li>" . menu_link($appfunction->link, $appfunction->label) . "</li>";
                 } else {
                     echo "<li><span class='inactive'>" . access_string($appfunction->label, true) . "</span></li>\n";
                 }
             }
             echo "</ul></td>\n";
         }
         echo "</tr></table></td></tr></table>\n";
     }
 }
예제 #6
0
echo make_link('/news/', 'News');
echo '</h3>';
echo '<h3>Documentation</h3>';
echo '<div class="indent">';
echo menu_link("PECL specific docs", "/doc/index.php");
echo menu_link("Mailing Lists &amp; Support Resources", "/support.php");
echo '</div>';
echo '<h3>Downloads</h3>';
echo '<div class="indent">';
echo menu_link("Browse All Packages", "packages.php");
echo menu_link("Search Packages", "package-search.php");
echo menu_link("Download Statistics", "package-stats.php");
echo '</div>';
if (!empty($auth_user)) {
    echo '<h3>Developers</h3>';
    echo '<div class="indent">';
    echo menu_link("Upload Release", "release-upload.php");
    echo menu_link("New Package", "package-new.php");
    echo '</div>';
    if (user::isAdmin($auth_user->handle)) {
        echo '<h3>Administrators</h3>';
        echo '<div class="indent">';
        echo menu_link("Overview", "/admin/");
        echo menu_link("Maintainers", "/admin/package-maintainers.php");
        echo menu_link("Categories", "/admin/category-manager.php");
        echo '</div>';
    }
}
// XXX Hide for the moment?
menu_link("I want to publish my PHP Extension in PECL", "account-request.php");
response_footer();
예제 #7
0
        $current = 'dfgdsfg';
    }
    $active = $current === true || strpos($current, $url) !== false ? ' class="active"' : '';
    return '<li><a' . $active . ' href="' . $url . '"><span class="menu-item-' . $class_text . '">' . $text . '</span></a></li>';
}
?>
<div class="topbar">
	<div class="fill">
		<div class="container">
        	<a class="brand" href="/"><img class="brand" src="/img/logo-beta.png" alt="Gift Circle" /></a>
			
			<div class="pull-right">
				<ul class="nav">
			
				<?php 
if ($logged_in) {
    foreach (array("/home/dashboard" => 'Dashboard', "/list/my" => 'My Lists', "/gift/shopping" => 'Shopping List', "/friend/list" => 'Friends', "/home/faqs" => 'FAQs', "/user/logout" => 'Logout') as $url => $text) {
        echo menu_link($url, $text);
    }
} else {
    foreach (array("/home" => 'Home', "/home/whatis" => 'What is Gift Circle?', "/home/faqs" => 'FAQs', "/user/login" => 'Login', "/user/register" => 'Signup') as $url => $text) {
        echo menu_link($url, $text);
    }
}
?>
				</ul>
			</div>
		</div>
	</div>
</div>
예제 #8
0
 function display_applications(&$waapp)
 {
     global $path_to_root;
     $i = 0;
     $sel_app = $waapp->get_selected_application();
     if (!$_SESSION["wa_current_user"]->check_application_access($sel_app)) {
         return;
     }
     if (method_exists($sel_app, 'render_index')) {
         $sel_app->render_index();
         return;
     }
     if ($sel_app->id == "system") {
         $imgs2 = array("page_edit.png", "page_edit.png", "page_edit.png", "page_edit.png", "folder.gif");
     } else {
         $imgs2 = array("folder.gif", "report.png", "page_edit.png", "money.png", "folder.gif");
     }
     foreach ($sel_app->modules as $module) {
         // image
         echo "<table width='95%' align='center'><tr>";
         echo "<td valign='top' class='menu_group'>";
         echo "<table border=0 width='100%'>";
         echo "<tr><td class='menu_group'>";
         echo $module->name;
         echo "</td></tr><tr>";
         echo "<td width='50%' class='menu_group_items'>";
         $img = "<img src='{$path_to_root}/themes/elegant/images/" . $imgs2[$i] . "' width='14' height='14' border='0'>&nbsp;&nbsp;";
         if ($_SESSION["language"]->dir == "rtl") {
             $class = "right";
         } else {
             $class = "left";
         }
         foreach ($module->lappfunctions as $appfunction) {
             if ($appfunction->label == "") {
                 echo "<div class='empty'>&nbsp;<br></div>\n";
             } elseif ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) {
                 echo "<div>" . $img . menu_link($appfunction->link, $appfunction->label . "</div>");
             } else {
                 echo "<div>" . $img . "<span class='inactive'>" . access_string($appfunction->label, true) . "</span></div>\n";
             }
         }
         echo "</td>\n";
         if (sizeof($module->rappfunctions) > 0) {
             echo "<td width='50%' class='menu_group_items'>";
             foreach ($module->rappfunctions as $appfunction) {
                 if ($appfunction->label == "") {
                     echo "<div class='empty'>&nbsp;<br></div>\n";
                 } elseif ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) {
                     echo "<div>" . $img . menu_link($appfunction->link, $appfunction->label . "</div>");
                 } else {
                     echo "<div>" . $img . "<span class='inactive'>" . access_string($appfunction->label, true) . "</span></div>\n";
                 }
             }
             echo "</td>\n";
         }
         echo "</tr></table></td></tr></table>\n";
         $i++;
     }
 }
예제 #9
0
auth_require(true);
if (!empty($_GET['phpinfo'])) {
    phpinfo();
    exit;
}
$acreq = isset($_GET['acreq']) ? strip_tags(htmlspecialchars($_GET['acreq'], ENT_QUOTES)) : null;
$SIDEBAR_DATA = '
This is the PEAR administration page.<br />
<noscript><p>
<!-- be annoying! -->
<b><blink>You must enable Javascript to use this page!</blink></b>
</p></noscript>
';
response_header("PEAR Administration");
menu_link("Package maintainers", "package-maintainers.php");
menu_link("Manage categories", "category-manager.php");
echo hdelim();
// {{{ adding and deleting notes
if (!empty($_REQUEST['cmd'])) {
    if ($_REQUEST['cmd'] == "Add note" && !empty($_REQUEST['note']) && !empty($_REQUEST['key']) && !empty($_REQUEST['id'])) {
        note::add($_REQUEST['key'], $_REQUEST['id'], $_REQUEST['note']);
        unset($_REQUEST['cmd']);
    } elseif ($_REQUEST['cmd'] == "Delete note" && !empty($_REQUEST['id'])) {
        /**
         * Delete note
         */
        note::remove($_REQUEST['id']);
    } elseif ($_REQUEST['cmd'] == "Open Account" && !empty($_REQUEST['uid'])) {
        /**
         * Open account
         */