Example #1
0
 function aLinks_Extra($mode)
 {
     if ($mode != 'upd') {
         return array();
     }
     $app = trim($this->row['application']);
     // KFD 2/4/08, part of SVN system.  If this node has been set up
     //     as a server that pulls from SVN, we do not offer the build
     //     option on applications anymore, that is only for dev
     //     workstation and old-fashioned non-svn servers.
     $retval = array();
     if (OptionGet('DEV_STATION', 'Y') == 'Y' || $app == 'andro' || OptionGet('BUILD_ALL_APPS', 'N') == 'Y') {
         $retval[] = hLinkBuild($app, 'Build This Application');
         $retval[] = hLinkPopup('', 'View Most Recent Log', array("gp_page" => "a_builder_log", "gp_out" => "info", 'x2' => 1, 'txt_application' => $app));
     }
     // If no authoritative node is listed, we must be it, so list
     // an option.  Otherwise allow code control options.
     $lnk1 = "?gp_page=appversions_p&gp_app=" . trim($this->row['application']);
     $lnk2 = "?gp_page=a_scontrol&gp_skey=" . $this->row['skey'];
     //hprint_r($this->row);
     if (isset($this->row['node'])) {
         if (trim($this->row['node']) == 'LOCAL' || trim($this->row['node']) == '' || is_null($this->row['node'])) {
             $retval[] = hLink('', "Publish Current Code", $lnk1);
         } else {
             $retval[] = hLink('', "Source Code Functions", $lnk2);
         }
     }
     return $retval;
 }
Example #2
0
 function aLinks_Extra($mode)
 {
     if ($mode != 'upd') {
         return array();
     }
     $caption = !is_null($this->row['version']) && trim($this->row['version']) != '' ? 'Upgrade This Instance' : 'Build This Instance';
     return array(hLink('', $caption, "?gp_page=instances_p" . "&gp_app=" . urlencode(trim($this->row['application'])) . '&x2=1' . '&gp_inst=' . urlencode(trim($this->row['instance']))));
 }
Example #3
0
function tmpModuleLeft()
{
    // April 4, 2007, KFD.  Allow a breakout here
    if (function_exists('appModuleLeft')) {
        $continue = appModuleLeft();
        return $continue;
    }
    //echo "<br/>";
    if (!LoggedIn()) {
        return;
    }
    // Only display menu if
    if (OptionGet('MENULEFT', 'Y') == 'Y') {
        $module = SessionGet("AGMENU_MODULE");
        $AGMENU = SessionGet("AGMENU");
        $kount = 0;
        if (isset($AGMENU[$module])) {
            $desc = $AGMENU[$module]['description'];
            echo "<ul class=\"nav nav-list\">";
            echo "<li class=\"nav-header\">{$desc}</li>";
            foreach ($AGMENU[$module]['items'] as $key => $info) {
                $hExtra = ' tabindex="' . hpTabIndexNext(100) . '"';
                // We may make the first item the focused item if nothing else
                // has been picked yet.  This code runs when rendering is going on
                // and the class-specific biz code has all run already, so it will
                // not override any business-specific focus setting
                if (vgfGet('HTML_focus') == '') {
                    $hExtra .= ' ID="FIRSTSPLITMENU" NAME="FIRSTSPLITMENU" ';
                    vgfSet('HTML_focus', 'FIRSTSPLITMENU');
                }
                $kount++;
                $d = '?gp_page=' . $key;
                $h = hLink("mainlevel", $info['description'], $d, $hExtra);
                echo "\n<li>{$h}</li>";
                // Possibly two more links
                if (ArraySafe($info, 'linknew') == 'Y') {
                    $hx = ' tabindex="' . hpTabIndexNext(100) . '" style="margin-left:30px"';
                    $h = hLink("mainlevel", 'New', $d . '&gp_mode=ins', $hx);
                    echo "\n<li>{$h}</td></li>";
                }
                if (ArraySafe($info, 'linksearch') == 'Y') {
                    $hx = ' tabindex="' . hpTabIndexNext(100) . '" style="margin-left:30px"';
                    $h = hLink("mainlevel", 'Search', $d . '&gp_mode=search', $hx);
                    echo "\n<li>{$h}</li>";
                }
            }
            echo "</ul>";
        }
    }
    if (isset($continue)) {
        return $continue;
    }
    //while ($kount++ < 30) { echo "<br>"; }
}
Example #4
0
 function MenuModule()
 {
     $AGMENU = SessionGet('AGMENU');
     $module = gp('x_module');
     $x = 1;
     $ax = array();
     foreach ($AGMENU[$module]['items'] as $menu_name => $menu_info) {
         $hl = "?x_module={$module}&x_menu={$menu_name}";
         $h = hLink('', $menu_info['description'], $hl);
         echo "{$x} - {$h}<br><br><br><br>";
         $x++;
         $ax[] = $x;
     }
     echo "Z - <a href=\"?gp_page=x_welcome\">Exit</a><br><br><br><br>";
     $ax[] = 'Z';
 }
Example #5
0
/**
* This routine is useful when you need to make a lot of links that will be
* very similar.  First you assign a default or 'stub' hyperlink by using
* [[vgaSet]] to assign a value to 'hLinkStub'.
*
* When hLinkFromStub is called, it adds the value of 'hLinkStub' to the
* href for the link it returns.
*
* The first parameter is an [[Optional CSS Class]].  The value of the
* "href" is made by combining the [[Global Variable]] 'hLinkStub' to the
* value passed in.
*
* This routine strips a leading '&' or '?' from the HREF passed in, and
* then prepends an appropriate '&' or '?'.
*
* INPUTS
*	string $class CSS Class
*	string $caption Text within <a> element
*	string $href Hypertext reference
*/
function hLinkFromStub($class, $caption, $href)
{
    $hStub = vgaGet('hLinkStub');
    $hPrefix = $hStub == '' ? '?' : '&';
    if (substr($href, 0, 1) == '?') {
        $href = substr($href, 1);
    }
    if (substr($href, 0, 1) == '&') {
        $href = substr($href, 1);
    }
    return hLink($class, $caption, $hStub . $hPrefix . $href);
}