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

PHP getStringFromServer函数代码示例

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

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



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

示例1: show_news_item

    function show_news_item($result, $i, $approved, $selectable)
    {
        global $HTML;
        echo '<tr ' . $HTML->boxGetAltRowStyle($i) . '><td width="20%">';
        if ($selectable) {
            echo '<input type="checkbox" ' . 'name="news_id[]" value="' . db_result($result, $i, 'id') . '" />';
        }
        echo date(_('Y-m-d'), db_result($result, $i, 'post_date')) . '</td>
       		<td width="45%">';
        echo '
       		<a href="' . getStringFromServer('PHP_SELF') . '?approve=1&amp;id=' . db_result($result, $i, 'id') . '">' . db_result($result, $i, 'summary') . '</a>
       		</td>

       		<td width="35%">' . util_make_link_g(db_result($result, $i, 'unix_group_name'), db_result($result, $i, 'group_id'), db_result($result, $i, 'group_name') . ' (' . db_result($result, $i, 'unix_group_name') . ')') . '</td>
       		</tr>';
    }
开发者ID:neymanna,项目名称:fusionforge,代码行数:16,代码来源:news_admin_utils.php


示例2: viewcvs_execute

/**
 *      viewcvs_execute() - Call to viewcvs.cgi and returned the output.
 *
 *      @return String the output of the ViewCVS command.
 */
function viewcvs_execute($repos_name, $repos_type)
{
    $request_uri = getStringFromServer('REQUEST_URI');
    $query_string = getStringFromServer('QUERY_STRING');
    $viewcvs_path = $GLOBALS['sys_urlroot'] . '/scm/viewvc';
    // this is very important ...
    $path = getStringFromServer('PATH_INFO');
    if ($path == '') {
        $path = getStringFromServer('ORIG_PATH_INFO');
    }
    if ($path != '') {
        // hack: path must always end with /
        if ($path[strlen($path) - 1] != '/') {
            $path .= '/';
        }
    } else {
        $path = '/';
    }
    if ($repos_type == "cvs") {
        $repos_root = $GLOBALS['cvsdir_prefix'] . '/' . $repos_name;
    } else {
        if ($repos_type == "svn") {
            $repos_root = $GLOBALS['svndir_prefix'] . '/' . $repos_name;
        } else {
            die("Invalid repository type");
        }
    }
    if (!is_dir($repos_root)) {
        $content = _('The repository for this project isn\'t created yet. It will be created in the next few minutes.');
        return $content;
    }
    $query_string = str_replace('\\&', '&', make_arg_cmd_safe($query_string));
    $query_string = str_replace('\\*', '*', $query_string);
    $path = str_replace('\\*', '*', make_arg_cmd_safe($path));
    $command = 'HTTP_COOKIE="' . make_arg_cmd_safe(getStringFromServer('HTTP_COOKIE')) . '" ' . 'REMOTE_ADDR="' . make_arg_cmd_safe(getStringFromServer('REMOTE_ADDR')) . '" ' . 'QUERY_STRING="' . $query_string . '" ' . 'SERVER_SOFTWARE="' . make_arg_cmd_safe(getStringFromServer('SERVER_SOFTWARE')) . '" ' . 'SCRIPT_NAME="' . make_arg_cmd_safe(getStringFromServer('SCRIPT_NAME')) . '" ' . 'HTTP_USER_AGENT="' . make_arg_cmd_safe(getStringFromServer('HTTP_USER_AGENT')) . '" ' . 'HTTP_ACCEPT_ENCODING="' . make_arg_cmd_safe(getStringFromServer('HTTP_ACCEPT_ENCODING')) . '" ' . 'HTTP_ACCEPT_LANGUAGE="' . make_arg_cmd_safe(getStringFromServer('HTTP_ACCEPT_LANGUAGE')) . '" ' . 'PATH_INFO="' . $path . '" ' . 'PATH="' . make_arg_cmd_safe(getStringFromServer('PATH')) . '" ' . 'REPOSITORY_ROOT="' . make_arg_cmd_safe($repos_root) . '" ' . 'REPOSITORY_TYPE="' . $repos_type . '" ' . 'REPOSITORY_NAME="' . make_arg_cmd_safe($repos_name) . '" ' . 'HTTP_HOST="' . make_arg_cmd_safe(getStringFromServer('HTTP_HOST')) . '" ' . 'DOCROOT="/themes/' . $GLOBALS['sys_theme'] . '/viewvc" ' . $viewcvs_path . '/bin/cgi/viewvc.cgi 2>&1';
    ob_start();
    passthru($command);
    $content = ob_get_contents();
    ob_end_clean();
    return $content;
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:46,代码来源:viewvc_utils.php


示例3: reports_header

/**
 * reports_header() - Show the reports header
 *
 * @param		int		The group ID
 * @param		array	Array of select box values
 * @param		string	The select box title
 * @param		string	Any additional HTML
 */
function reports_header($group_id, $vals, $titles, $html = '')
{
    global $what;
    global $period;
    global $span;
    print '<form method="get" action="' . getStringFromServer('PHP_SELF') . '#b">';
    print $html;
    print html_build_select_box_from_arrays($vals, $titles, 'what', $what, false);
    $periods = array('day' => 'Last day', 'week' => 'Last week');
    $vals = array('day', 'week', 'month', 'year', 'lifespan');
    $texts = array(_('Last day(s)'), _('Last week(s)'), _('Last month(s)'), _('Last year(s)'), _('Project lifespan'));
    if (!$period) {
        $period = "lifespan";
    }
    print _('for');
    print html_build_select_box_from_arrays(array('', '1', '4', '7', '12', '14', '30', '52'), array('', '1', '4', '7', '12', '14', '30', '52'), 'span', $span, false);
    print html_build_select_box_from_arrays($vals, $texts, 'period', $period, false);
    print "<input type=\"hidden\" name=\"group_id\" value=\"{$group_id}\" />";
    print ' <input type="submit" value="' . _('Show') . '" />';
    print "</form>\n";
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:29,代码来源:tool_reports.php


示例4:

    $GLOBALS['BROWSER_VER'] = 0;
    $GLOBALS['BROWSER_AGENT'] = 'OTHER';
}
/*
	Determine platform
*/
if (strstr(getStringFromServer('HTTP_USER_AGENT'), 'Win')) {
    $GLOBALS['BROWSER_PLATFORM'] = 'Win';
} else {
    if (strstr(getStringFromServer('HTTP_USER_AGENT'), 'Mac')) {
        $GLOBALS['BROWSER_PLATFORM'] = 'Mac';
    } else {
        if (strstr(getStringFromServer('HTTP_USER_AGENT'), 'Linux')) {
            $GLOBALS['BROWSER_PLATFORM'] = 'Linux';
        } else {
            if (strstr(getStringFromServer('HTTP_USER_AGENT'), 'Unix')) {
                $GLOBALS['BROWSER_PLATFORM'] = 'Unix';
            } else {
                $GLOBALS['BROWSER_PLATFORM'] = 'Other';
            }
        }
    }
}
/*
echo "\n\nAgent: ".getStringFromServer('HTTP_USER_AGENT');
echo "\nIE: ".browser_is_ie();
echo "\nMac: ".browser_is_mac();
echo "\nWindows: ".browser_is_windows();
echo "\nPlatform: ".browser_get_platform();
echo "\nVersion: ".browser_get_version();
echo "\nAgent: ".browser_get_agent();
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:browser.php


示例5: getStringFromServer

			<li>
				<a href="' . getStringFromServer('PHP_SELF') . '?group_id=' . $group_id . '&amp;add_list=1">' . _('Add Mailing List') . '</a>
			</li>
		</ul>';
        $mlCount = count($mlArray);
        if ($mlCount > 0) {
            $tableHeaders = array(_('Mailing list'), '', '');
            echo $HTML->listTableTop($tableHeaders);
            for ($i = 0; $i < $mlCount; $i++) {
                $currentList =& $mlArray[$i];
                if ($currentList->isError()) {
                    echo '<tr ' . $HTML->boxGetAltRowStyle($i) . '><td colspan="3">';
                    echo $currentList->getErrorMessage();
                    echo '</td></tr>';
                } else {
                    echo '<tr ' . $HTML->boxGetAltRowStyle($i) . '><td width="60%">' . '<strong>' . $currentList->getName() . '</strong><br />' . htmlspecialchars($currentList->getDescription()) . '</td>' . '<td width="20%" style="text-align:center"><a href="' . getStringFromServer('PHP_SELF') . '?group_id=' . $group_id . '&amp;group_list_id=' . $currentList->getID() . '&amp;change_status=1">' . _('Update') . '</a></td>' . '<td width="20%" style="text-align:center">';
                    if ($currentList->getStatus() == MAIL__MAILING_LIST_IS_REQUESTED) {
                        echo _('Not activated yet');
                    } else {
                        echo '<a href="' . $currentList->getExternalAdminUrl() . '">' . _('Administrate') . '</a></td>';
                    }
                    echo '</tr>';
                }
            }
            echo $HTML->listTableBottom();
        }
        mail_footer(array());
    }
} else {
    exit_no_group();
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:index.php


示例6: db_query

    $res_db = db_query("\n\t\tSELECT *\n\t\tFROM prdb_dbs\n\t\tWHERE state=" . $dbstate . "\n\t\tORDER BY dbname\n\t");
    while ($row_db = db_fetch_array($res_db)) {
        print '<li>' . util_make_link('/project/admin/database.php?group_id=' . $row_db['group_id'], $row_db['dbname']) . '</li>';
    }
    print "</ul>";
}
?>
<hr />

<h3><?php 
echo _('Add an already active database');
?>
</h3>

<form name="madd" method="post" action="<?php 
echo getStringFromServer('PHP_SELF');
?>
">

<table>

<tr>
<td><?php 
echo _('Group Unix Name:');
echo utils_requiredField();
?>
</td>
<td><input type="text" name="groupname" /></td>
</tr>

<tr>
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:database.php


示例7: exit_permission_denied

 */
require_once 'env.inc.php';
require_once $gfwww . 'include/pre.php';
global $sys_show_source;
if (!$sys_show_source) {
    exit_permission_denied();
}
$file = getStringFromRequest('file');
if (!$file) {
    exit_error(_('Missing File Argument'), _('A file must be specified for this page.'));
}
if (strstr($file, '..')) {
    exit_error(_('Invalid File Argument'), _('The file argument is invalid.'));
}
$dir = dirname($file);
// If this is a legal dir, then it is under the docroot, else use basename
if ($dir) {
    $fname = getStringFromServer('DOCUMENT_ROOT') . $file;
} else {
    $fname = basename($file);
}
if (!file_exists($fname) || @is_dir($fname)) {
    exit_error(_('File Not Found'), _('Cannot find specified file to display.'));
}
$HTML->header(array('title' => sprintf(_('Source of %1$s'), $file)));
show_source($fname);
$HTML->footer(array());
// Local Variables:
// mode: php
// c-file-style: "bsd"
// End:
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:source.php


示例8: getExtraTabs

 private function getExtraTabs()
 {
     include $GLOBALS['Language']->getContent('layout/extra_tabs', null, null, '.php');
     if ($GLOBALS['sys_use_snippet'] != 0) {
         $selected = (bool) strstr(getStringFromServer('REQUEST_URI'), '/snippet/');
         array_unshift($additional_tabs, array('link' => '/snippet/', 'title' => $GLOBALS['Language']->getText('menu', 'code_snippet'), 'selected' => $selected));
     }
     return $additional_tabs;
 }
开发者ID:rinodung,项目名称:tuleap,代码行数:9,代码来源:FlamingParrot_Theme.class.php


示例9: outerTabs

 function outerTabs($params)
 {
     global $Language;
     $TABS_DIRS[] = '/';
     $TABS_TITLES[] = $Language->getText('menu', 'home');
     if (user_isloggedin()) {
         $TABS_DIRS[] = '/my/';
         $TABS_TITLES[] = $Language->getText('menu', 'my_personal_page');
     }
     if ($GLOBALS['sys_use_trove'] != 0) {
         $TABS_DIRS[] = '/softwaremap/';
         $TABS_TITLES[] = $Language->getText('menu', 'projectree');
     }
     if ($GLOBALS['sys_use_snippet'] != 0) {
         $TABS_DIRS[] = '/snippet/';
         $TABS_TITLES[] = $Language->getText('menu', 'code_snippet');
     }
     if (user_ismember(1, 'A')) {
         $TABS_DIRS[] = '/admin/';
         $TABS_TITLES[] = $Language->getText('menu', 'admin');
     }
     $TABS_DIRS[] = '/site/';
     $TABS_TITLES[] = $Language->getText('include_layout', 'Help');
     /*
     		if (user_ismember($GLOBALS['sys_stats_group'])) {
     			$TABS_DIRS[]='/reporting/';
     			$TABS_TITLES[]=$Language->getText('menu','reporting');
     		}
     */
     $selected_top_tab = isset($params['selected_top_tab']) ? $params['selected_top_tab'] : '';
     if (isset($params['group']) && $params['group']) {
         // get group info using the common result set
         $pm = ProjectManager::instance();
         $project = $pm->getProject($params['group']);
         if ($project && is_object($project)) {
             if ($project->isError()) {
             } else {
                 $selected = array_search("/softwaremap/", $TABS_DIRS);
             }
         }
     } else {
         if (strstr(getStringFromServer('REQUEST_URI'), '/my/') || strstr(getStringFromServer('REQUEST_URI'), '/themes/') || strstr(getStringFromServer('REQUEST_URI'), '/account/')) {
             $selected = array_search("/my/", $TABS_DIRS);
         } elseif (strstr(getStringFromServer('REQUEST_URI'), 'softwaremap')) {
             $selected = array_search("/softwaremap/", $TABS_DIRS);
         } elseif (strstr(getStringFromServer('REQUEST_URI'), '/snippet/')) {
             $selected = array_search("/snippet/", $TABS_DIRS);
         } elseif (strstr(getStringFromServer('REQUEST_URI'), '/site/')) {
             $selected = array_search("/site/", $TABS_DIRS);
         } elseif (strstr(getStringFromServer('REQUEST_URI'), '/reporting/')) {
             $selected = array_search('/reporting/', $TABS_DIRS);
         } elseif ((strstr(getStringFromServer('REQUEST_URI'), '/admin/') || $selected_top_tab == 'admin') && user_ismember(1, 'A')) {
             $selected = array_search('/admin/', $TABS_DIRS);
         } elseif ($selected_top_tab && array_search($selected_top_tab, $TABS_DIRS) !== FALSE) {
             $selected = array_search($selected_top_tab, $TABS_DIRS);
         } else {
             $selected = 0;
         }
     }
     echo $this->tabGenerator($TABS_DIRS, $TABS_TITLES, false, $selected, null, '100%');
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:61,代码来源:TabbedLayout.class.php


示例10: util_make_url

" />
<?php 
$theme_cssfile = $GLOBALS['sys_themeroot'] . $GLOBALS['sys_theme'] . '/css/theme.css';
if (file_exists($theme_cssfile)) {
    echo '
<link rel="stylesheet" type="text/css" href="' . util_make_url('/themes/' . $GLOBALS['sys_theme'] . '/css/theme.css') . '" />
';
}
echo '

</head>
<body>
<h1>' . $feedback . '</h1>

<table border="3" cellpadding="4" rules="groups" frame="box" width="100%" class="tablecontent">
	<form action="' . getStringFromServer('PHP_SELF') . '?func=query&group_id=' . $group_id . '&atid=' . $ath->getID() . '" method="post">
	<input type="hidden" name="form_key" value="' . form_generate_key() . '">
	<tr>
		<td>
			<input type="submit" name="submit" value="' . _('Save Changes') . '" />
		</td>
		<td>';
if (db_numrows($res) > 0) {
    echo html_build_select_box($res, 'query_id', $query_id, false) . '';
}
echo '
		</td>
	</tr>
	<tr class="tablecontent">
		<td>
		<input type="radio" name="query_action" value="1" ' . (!$query_id ? 'checked' : '') . '>' . _('Name and Save Query') . '<br />';
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:query.php


示例11: get_group_join_requests

//
//	Pending requests
//
echo $HTML->boxMiddle(_('Pending Requests'));
$reqs =& get_group_join_requests($group);
if (count($reqs) < 1) {
    echo _('No Pending Requests');
} else {
    for ($i = 0; $i < count($reqs); $i++) {
        $user =& user_get_object($reqs[$i]->getUserId());
        if (!$user || !is_object($user)) {
            echo "Invalid User";
        }
        ?>
		<form action="<?php 
        echo getStringFromServer('PHP_SELF') . '?group_id=' . $group_id;
        ?>
" method="post">
		<input type="hidden" name="submit" value="y" />
		<input type="hidden" name="form_userid" value="<?php 
        echo $user->getId();
        ?>
" />
		<tr><td><input type="hidden" name="form_unix_name" value="<?php 
        echo $user->getUnixName();
        ?>
" /><?php 
        echo util_make_link_u($user->getUnixName(), $user->getId(), $user->getRealName());
        ?>
</td>
		<td><?php 
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:index.php


示例12: exit_not_logged_in

/**
 * exit_not_logged_in() - Exit with not logged in error
 */
function exit_not_logged_in()
{
    //instead of a simple error page, now take them to the login page
    header("Location: " . util_make_url("/account/login.php?return_to=" . urlencode(getStringFromServer('REQUEST_URI'))));
    exit;
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:9,代码来源:exit.php


示例13: header


//.........这里部分代码省略.........
        ?>
" width="1%" height="26"><img src="<?php 
        echo util_get_image_theme("upper_left_corner.png");
        ?>
" width="16" height="26" alt=" "></td>
                <td background="<?php 
        echo util_get_image_theme("top_border.png");
        ?>
" align="left" colspan="3" width="99%"><a href="/"><img src="<?php 
        echo util_get_image_theme("codex_banner_lc.png");
        ?>
"  height="26" border="0" alt="<?php 
        echo $GLOBALS['sys_name'] . ' ' . $Language->getText('include_layout', 'banner');
        ?>
"></a></td>
                <td><img src="<?php 
        echo util_get_image_theme("upper_right_corner.png");
        ?>
" width="16" height="26" alt=" "></td>
        </tr>


<!-- Second line with menus and content -->
        <tr>

                <td background="<?php 
        echo util_get_image_theme("left_border.png");
        ?>
" align="left" valign="bottom" alt=""><img src="<?php 
        echo util_get_image_theme("bottom_left_corner.png");
        ?>
" width="16" height="16" alt=""></td>

                <td colspan="3" >
<!-- start main body cell -->


        <div align="left">
        <table style=menus cellpadding="0" cellspacing="0" border="0" width="100%">

                <tr valign="top">
                    <td class="menuframe">

        <!-- VA Linux Stats Counter -->
        <?php 
        if (!session_issecure()) {
            print '<IMG src="' . util_get_image_theme("clear.png") . '" width=140 height=1 alt="' . $Language->getText('include_layout', 'counter') . '"><BR>';
        } else {
            print html_blankimage(1, 140) . '<br>';
        }
        $main_body_class = '';
        if (isset($params['toptab']) && is_string($params['toptab'])) {
            $main_body_class = 'service-' . $params['toptab'];
        }
        ?>


        <!-- Company Logo here -->
        <P>
    <?php 
        print '<center><IMG src="' . util_get_image_theme("organization_logo.png") . '" alt="' . $GLOBALS['sys_org_name'] . ' ' . $Language->getText('include_layout', 'logo') . '"></center><BR>';
        ?>

        <!-- menus -->
        <?php 
        // html_blankimage(1,140);
        menu_print_sidebar($params);
        ?>
        <P>
        </TD>

        <td width="15" background="<?php 
        echo util_get_image_theme("fade.png");
        ?>
" nowrap>&nbsp;</td>

        <td class="contenttable <?php 
        echo $main_body_class;
        ?>
">
        <BR>
<?php 
        if (isset($params['group']) && $params['group']) {
            echo $this->project_tabs($params['toptab'], $params['group']);
        } else {
            if (strstr(getStringFromServer('REQUEST_URI'), '/my/') || strstr(getStringFromServer('REQUEST_URI'), '/account/')) {
                $tabs = array(array('link' => '/my/', 'label' => $Language->getText('my_index', 'my_dashboard')), array('link' => '/account/', 'label' => $Language->getText('my_index', 'account_maintenance')));
                echo '<hr SIZE="1" NoShade>';
                foreach ($tabs as $tab) {
                    $this->tab_entry($tab['link'], '', $tab['label'], strstr(getStringFromServer('REQUEST_URI'), '/my/') ? 0 : (strstr(getStringFromServer('REQUEST_URI'), '/account') ? 2 : 1), '');
                }
                echo '<hr SIZE="1" NoShade>';
            }
        }
        echo $this->getBreadCrumbs();
        echo $this->getToolbar();
        echo $this->_getFeedback();
        $this->_feedback->display();
        echo $this->getNotificationPlaceholder();
    }
开发者ID:pombredanne,项目名称:tuleap,代码行数:101,代码来源:Layout.class.php


示例14: ShowResultSet

/**
 * ShowResultSet() - Show a generic result set
 * Very simple, plain way to show a generic result set
 *
 * @param	int		The result set ID
 * @param	string	The title of the result set
 * @param	bool	The option to turn URL's into links
 * @param	bool	The option to display headers
 * @param	array	The db field name -> label mapping
 * @param	array   Don't display these cols
 *
 */
function ShowResultSet($result, $title = '', $linkify = false, $displayHeaders = true, $headerMapping = array(), $excludedCols = array())
{
    global $group_id, $HTML;
    if ($result) {
        $rows = db_numrows($result);
        $cols = db_numfields($result);
        echo '<table border="0" width="100%">';
        /*  Create  the  headers  */
        $headersCellData = array();
        $colsToKeep = array();
        for ($i = 0; $i < $cols; $i++) {
            $fieldName = db_fieldname($result, $i);
            if (in_array($fieldName, $excludedCols)) {
                continue;
            }
            $colsToKeep[] = $i;
            if (isset($headerMapping[$fieldName])) {
                if (is_array($headerMapping[$fieldName])) {
                    $headersCellData[] = $headerMapping[$fieldName];
                } else {
                    $headersCellData[] = array($headerMapping[$fieldName]);
                }
            } else {
                $headersCellData[] = array($fieldName);
            }
        }
        /*  Create the title  */
        if (strlen($title) > 0) {
            $titleCellData = array();
            $titleCellData[] = array($title, 'colspan="' . count($headersCellData) . '"');
            echo $HTML->multiTableRow('', $titleCellData, TRUE);
        }
        /* Display the headers */
        if ($displayHeaders) {
            echo $HTML->multiTableRow('', $headersCellData, TRUE);
        }
        /*  Create the rows  */
        for ($j = 0; $j < $rows; $j++) {
            echo '<tr ' . $HTML->boxGetAltRowStyle($j) . '>';
            for ($i = 0; $i < $cols; $i++) {
                if (in_array($i, $colsToKeep)) {
                    if ($linkify && $i == 0) {
                        $link = '<a href="' . getStringFromServer('PHP_SELF') . '?';
                        $linkend = '</a>';
                        if ($linkify == "bug_cat") {
                            $link .= 'group_id=' . $group_id . '&amp;bug_cat_mod=y&amp;bug_cat_id=' . db_result($result, $j, 'bug_category_id') . '">';
                        } else {
                            if ($linkify == "bug_group") {
                                $link .= 'group_id=' . $group_id . '&amp;bug_group_mod=y&amp;bug_group_id=' . db_result($result, $j, 'bug_group_id') . '">';
                            } else {
                                if ($linkify == "patch_cat") {
                                    $link .= 'group_id=' . $group_id . '&amp;patch_cat_mod=y&amp;patch_cat_id=' . db_result($result, $j, 'patch_category_id') . '">';
                                } else {
                                    if ($linkify == "support_cat") {
                                        $link .= 'group_id=' . $group_id . '&amp;support_cat_mod=y&amp;support_cat_id=' . db_result($result, $j, 'support_category_id') . '">';
                                    } else {
                                        if ($linkify == "pm_project") {
                                            $link .= 'group_id=' . $group_id . '&amp;project_cat_mod=y&amp;project_cat_id=' . db_result($result, $j, 'group_project_id') . '">';
                                        } else {
                                            $link = $linkend = '';
                                        }
                                    }
                                }
                            }
                        }
                    } else {
                        $link = $linkend = '';
                    }
                    echo '<td>' . $link . db_result($result, $j, $i) . $linkend . '</td>';
                }
            }
            echo '</tr>';
        }
        echo '</table>';
    } else {
        echo db_error();
    }
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:90,代码来源:utils.php


示例15: sprintf

            if ($ff->isError()) {
                echo '<h1>' . sprintf(_('No Forums Found For %1$s'), $g->getPublicName()) . '</h1>';
                echo $ff->getErrorMessage();
                forum_footer(array());
                exit;
            }
            /*
            	List the existing forums so they can be edited.
            */
            for ($j = 0; $j < count($farr); $j++) {
                if (!is_object($farr[$j])) {
                    //just skip it - this object should never have been placed here
                } elseif ($farr[$j]->isError()) {
                    echo $farr[$j]->getErrorMessage();
                } else {
                    echo '<a href="' . getStringFromServer('PHP_SELF') . '?group_id=' . $group_id . '&amp;change_status=1&amp;group_forum_id=' . $farr[$j]->getID() . '">' . $farr[$j]->getName() . '</a><br />' . $farr[$j]->getDescription() . '<br /><a href="monitor.php?group_id=' . $group_id . '&amp;group_forum_id=' . $farr[$j]->getID() . '">Monitoring Users</a><p>';
                }
            }
            forum_footer(array());
        }
    }
} else {
    /*
    	Not logged in or insufficient privileges
    */
    if (!$group_id) {
        exit_no_group();
    } else {
        exit_permission_denied();
    }
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:index.php


示例16: exit_error

        exit_error(_('Error'), $d->getErrorMessage());
    } else {
        if ($type == 'editor') {
            //release the cookie for the document contents (should expire at the end of the session anyway)
            setcookie("gforgecurrentdocdata", "", time() - 3600);
        }
        Header('Location: ' . util_make_url('/docman/?group_id=' . $group_id . '&feedback=' . _('Document submitted sucessfully')));
        exit;
    }
} else {
    //if (getStringFromRequest('Option')) {
    //option was selected, proceed to show each one
    $option_selected = getStringFromRequest('option_selected');
    docman_header(_('Document Manager: Submit New Documentation'), _('Project: %1$s'));
    echo '<p>' . _('<strong>Document Title</strong>:  Refers to the relatively brief title of the document (e.g. How to use the download server)<br /><strong>Description:</strong> A brief description to be placed just under the title.') . '</p>
		<form name="adddata" action="' . getStringFromServer('PHP_SELF') . '?group_id=' . $group_id . '" method="post" enctype="multipart/form-data">
		<table border="0" width="75%">
		<tr>
			<td>
			<strong>' . _('Document Title') . ' :</strong>' . utils_requiredField() . sprintf(_('(at least %1$s characters)'), 5) . '<br />
			<input type="text" name="title" size="40" maxlength="255" />
			</td>
		</tr>
	
		<tr>
			<td>
			<strong>' . _('Description') . ' :</strong>' . utils_requiredField() . sprintf(_('(at least %1$s characters)'), 10) . '<br />
			<input type="text" name="description" size="50" maxlength="255" />
			</td>
		</tr>';
    echo '
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:new.php


示例17: viewvc_utils_track_browsing

function viewvc_utils_track_browsing($group_id, $type)
{
    $query_string = getStringFromServer('QUERY_STRING');
    $request_uri = getStringFromServer('REQUEST_URI');
    if (strpos($query_string, "view=markup") !== FALSE || strpos($query_string, "view=auto") !== FALSE || strpos($request_uri, "*checkout*") !== FALSE || strpos($query_string, "annotate=") !== FALSE) {
        if ($type == 'svn') {
            $browse_column = 'svn_browse';
            $table = 'group_svn_full_history';
        } else {
            if ($type == 'cvs') {
                $browse_column = 'cvs_browse';
                $table = 'group_cvs_full_history';
            }
        }
        $user_id = user_getid();
        $year = strftime("%Y");
        $mon = strftime("%m");
        $day = strftime("%d");
        $db_day = $year . $mon . $day;
        $sql = "SELECT " . $browse_column . " FROM " . $table . " WHERE group_id = " . db_ei($group_id) . " AND user_id = " . $user_id . " AND day = '" . $db_day . "'";
        $res = db_query($sql);
        if (db_numrows($res) > 0) {
            db_query("UPDATE " . $table . " SET " . $browse_column . "=" . $browse_column . "+1 WHERE group_id = " . db_ei($group_id) . " AND user_id = " . $user_id . " AND day = '" . $db_day . "'");
        } else {
            db_query("INSERT INTO " . $table . " (group_id,user_id,day," . $browse_column . ") VALUES (" . db_ei($group_id) . "," . $user_id . ",'" . $db_day . "',1)");
        }
    }
}
开发者ID:rinodung,项目名称:tuleap,代码行数:28,代码来源:viewvc_utils.php


示例18: outerTabs

 function outerTabs($params)
 {
     global $Language, $sys_use_trove, $sys_use_snippet;
     $selected_top_tab = '';
     if (isset($params['selected_top_tab'])) {
         $selected_top_tab = $params['selected_top_tab'];
     }
     $menuTree = new TreeNode();
     $sthSelected = false;
     $menuTree->addChild(new TreeNode(array('link' => '/', 'title' => $Language->getText('menu', 'home'))));
     // We need to keep a reference on this node in order to set the
     // selected value in the data. See bottom of this function.
     $homeNode =& $menuTree->getChild(0);
     if (user_isloggedin()) {
         $selected = isset($params['selected_top_tab']) && $params['selected_top_tab'] == '/my/' || strstr(getStringFromServer('REQUEST_URI'), '/my/') || strstr(getStringFromServer('REQUEST_URI'), '/account/');
         $sthSelected = $sthSelected || $selected;
         $mynode = new TreeNode(array('link' => '/my/', 'title' => $Language->getText('menu', 'my_personal_page'), 'selected' => $selected));
         if ($selected) {
             $selected = isset($params['selected_top_tab']) && $params['selected_top_tab'] == '/my/' || (bool) strstr(getStringFromServer('REQUEST_URI'), '/my/');
             $mynode->addChild(new TreeNode(array('link' => '/my/', 'title' => $Language->getText('my_index', 'my_dashboard'), 'selected' => $selected)));
             $selected = (bool) strstr(getStringFromServer('REQUEST_URI'), '/account/');
             $mynode->addChild(new TreeNode(array('link' => '/account/', 'title' => $Language->getText('my_index', 'account_maintenance'), 'selected' => $selected)));
         }
         $menuTree->addChild($mynode);
     } else {
         $selected = (bool) strstr(getStringFromServer('REQUEST_URI'), '/my/');
         $sthSelected = $sthSelected || $selected;
         $menuTree->addChild(new TreeNode(array('link' => '/my/', 'title' => $Language->getText('menu', 'my_personal_page'), 'selected' => $selected)));
     }
     if ($GLOBALS['sys_use_trove'] != 0 || isset($params['group']) && $params['group']) {
         $selected = false;
         if (isset($params['group']) && $params['group']) {
             // get group info using the common result set
             $pm = ProjectManager::instance();
             $project = $pm->getProject($params['group']);
             if ($project && is_object($project)) {
                 if ($project->isError()) {
                     die('is error');
                 } else {
                     $sthSelected = true;
                     $projTree = $this->project_tabs($params['toptab'], $params['group']);
                     $projTree->setData(array('link' => '/softwaremap/', 'title' => $Language->getText('menu', 'projectree'), 'selected' => true));
                     //'link'=>'/projects/'.$project->getUnixName().'/'
                     //,'title'=>$project->getPublicName()
                     //,'selected' => true));
                     $menuTree->addChild($projTree);
                 }
             }
         } else {
             $selected = (bool) strstr(getStringFromServer('REQUEST_URI'), 'softwaremap');
             $sthSelected = $sthSelected || $selected;
             $menuTree->addChild(new TreeNode(array('link' => '/softwaremap/', 'title' => $Language->getText('menu', 'projectree'), 'selected' => $selected)));
         }
     }
     if ($GLOBALS['sys_use_snippet'] != 0) {
         $selected = (bool) strstr(getStringFromServer('REQUEST_URI'), '/snippet/');
         $sthSelected = $sthSelected || $selected;
         $menuTree->addChild(new TreeNode(array('link' => '/snippet/', 'title' => $Language->getText('menu', 'code_snippet'), 'selected' => $selected)));
     }
     if (user_ismember(1, 'A')) {
         $selected = strpos(getStringFromServer('REQUEST_URI'), '/admin/') === 0 || $selected_top_tab === 'admin';
         $sthSelected = $sthSelected || $selected;
         $menuTree->addChild(new TreeNode(array('link' => '/admin/', 'title' => $Language->getText('menu', 'admin'), 'selected' => $selected)));
     }
     $selected = (bool) (strstr(getStringFromServer('REQUEST_URI'), '/site/') || $selected_top_tab === 'site');
     $sthSelected = $sthSelected || $selected;
     $menuTree->addChild(new TreeNode(array('link' => '/site/', 'title' => $Language->getText('include_layout', 'Help'), 'selected' => $selected)));
     $additional_tabs = array();
     include $GLOBALS['Language']->getContent('layout/extra_tabs', null, null, '.php');
     foreach ($additional_tabs as $t) {
         $sthSelected = $sthSelected || $t['selected'];
         $menuTree->addChild(new TreeNode($t));
     }
     // Set selected value for 'home' link (this is the selected tab
     // if no other was previously selected)
     $homeNodeData =& $homeNode->getData();
     $homeNodeData['selected'] = !$sthSelected;
     $buildMenuVisitor = new BuildMenuVisitor();
     $menuTree->accept($buildMenuVisitor);
     echo $buildMenuVisitor->getHtml();
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:81,代码来源:DivBasedTabbedLayout.class.php


示例19: _

echo _('New Virtual Host <em>(e.g. vhost.org)</em>');
?>
 </td>
	<td> <input type="text" size="15" maxlength="255" name="vhost_name" /> </td>
	<td> <input type="submit" value="<?php 
echo _('Create');
?>
" /> </td>
</tr>
</table>
</form>

<?php 
$res_db = db_query("\n\tSELECT *\n\tFROM prweb_vhost \n\tWHERE group_id='" . $group->getID() . "'\n");
if (db_numrows($res_db) > 0) {
    $title = array();
    $title[] = _('Virtual Host');
    $title[] = _('Operations');
    echo $GLOBALS['HTML']->listTableTop($title);
    while ($row_db = db_fetch_array($res_db)) {
        print '	<tr>
			<td>' . $row_db['vhost_name'] . '</td>
			<td>[ <strong><a href="' . getStringFromServer('PHP_SELF') . '?group_id=' . $group->getID() . '&amp;vhostid=' . $row_db['vhostid'] . '&amp;deletevhost=1">' . _('Delete') . '</a></strong>]
			</tr>	
		';
    }
    echo $GLOBALS['HTML']->listTableBottom();
} else {
    echo '<p>' . _('No VHOSTs defined') . 'No VHOSTs defined</p>';
}
project_admin_footer(array());
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:vhost.php


示例20: exit_not_logged_in

 *
 * @version   $Id$
 *
 */
$no_gz_buffer = true;
require_once '../env.inc.php';
require_once $gfwww . 'include/pre.php';
requi 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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