本文整理汇总了PHP中group_getname函数的典型用法代码示例。如果您正苦于以下问题:PHP group_getname函数的具体用法?PHP group_getname怎么用?PHP group_getname使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了group_getname函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: db_query
$res = db_query("\n SELECT *\n FROM prweb_vhost\n WHERE vhostid='{$vhostid}'\n ");
$row = db_fetch_array($res);
$res_vh = db_query("\n\t\tSELECT vhost_name\n\t\tFROM prweb_vhost\n\t\tWHERE vhost_name='" . $row['vhost_name'] . "'\n\t\tAND vhostid!='{$vhostid}'\n\t\tAND state='1'\n\t");
if ($res_vh && db_numrows($res_vh) < 1) {
$res_up = db_query("\n\t\t\tUPDATE prweb_vhost\n\t\t\tSET state='1'\n\t\t\tWHERE vhostid='{$vhostid}'\n\t\t\tAND group_id='{$group_id}'\n\t\t");
if (!$res_up || db_affected_rows($res_up) < 1) {
$feedback .= "Could not update Virtual Host entry:" . db_error();
} else {
$feedback .= "Virtual Host undeleted";
$group->addHistory('Virtual Host ' . $row['vhost_name'] . ' Undeleted', '');
}
} else {
$feedback .= "Virtual Hostname already in use - " . $row['vhost_name'];
}
}
project_admin_header(array('title' => 'Editing Virtual Host Info', 'group' => $group_id, 'pagename' => 'project_admin_vhost', 'sectionvals' => array(group_getname($group_id))));
?>
<h2>Virtual Host Admin</h2>
<h3>Add New Virtual Host</h3>
<p>
To add a new virtual host - simply point a <b>CNAME</b> for <i>yourhost.org</i> at
<b>www.<?php
echo $GLOBALS['sys_default_domain'];
?>
</b>. <?php
echo $GLOBALS['sys_default_name'];
?>
does not currently host mail (i.e. cannot be an MX)
or DNS</b>.
示例2: project_admin_header
/*
Add a user to this project
They don't need unix access
*/
if (!$foundry->addUser($form_unix_name)) {
$feedback .= $foundry->getErrorMessage();
} else {
$feedback = ' User Added Successfully ';
}
}
}
}
}
}
}
project_admin_header(array('title' => group_getname($group_id) . " - Foundry Admin", 'group' => $group_id));
/*
Show the list of member projects
*/
echo '<TABLE width=100% cellpadding=2 cellspacing=2 border=0>
<TR valign=top><TD width=50%>';
$HTML->box1_top("Featured Projects");
$sql = "SELECT groups.group_name,groups.unix_group_name,groups.group_id,foundry_preferred_projects.rank " . "FROM groups,foundry_preferred_projects " . "WHERE foundry_preferred_projects.group_id=groups.group_id " . "AND foundry_preferred_projects.foundry_id='{$group_id}' " . "ORDER BY rank ASC";
$res_grp = db_query($sql);
$rows = db_numrows($res_grp);
if (!$res_grp || $rows < 1) {
echo 'No Projects';
echo db_error();
} else {
print '<TABLE WIDTH="100%" BORDER="0">
';
示例3: people_header
<?php
//
// SourceForge: Breaking Down the Barriers to Open Source Development
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
// $Id: index.php,v 1.2 2003/11/13 11:29:25 helix Exp $
require 'pre.php';
require '../people/people_utils.php';
people_header(array('title' => 'Help Wanted System'));
if ($group_id) {
echo '<H3>Project Help Wanted for ' . group_getname($group_id) . '</H3>
<P>
Here is a list of positions available for this project.
<P>';
echo people_show_project_jobs($group_id);
} else {
if ($category_id) {
echo '<H3>Projects looking for ' . people_get_category_name($category_id) . '</H3>
<P>
Click job titles for more detailed descriptions.
<P>';
echo people_show_category_jobs($category_id);
} else {
echo '
<H3>Projects Needing Help</H3>
The ' . $GLOBALS['sys_default_name'] . ' Project Help Wanted board is for non-commercial, project
volunteer openings. Commercial use is prohibited.
<P>
Project listings remain live for two weeks, or until closed by the
示例4: ShowResultSet
<TR>
<TD COLSPAN="3">
<B>The following tables show which statuses, technicians, and categories you can include in your filter.
</TD>
</TR>
<TR>
<TD VALIGN="TOP"><?php
ShowResultSet($result, "Bug Techs for " . group_getname($group_id));
?>
</TD>
<TD VALIGN="TOP"><?php
ShowResultSet($result2, "Bug Statuses");
?>
</TD>
<TD VALIGN="TOP"><?php
ShowResultSet($result3, "Bug Categories for " . group_getname($group_id));
?>
</TD>
<TR>
<TR>
<TD VALIGN="TOP"><?php
ShowResultSet($result4, "Bug Resolutions");
?>
</TD>
<TD VALIGN="TOP"><?php
ShowResultSet($result5, "Bug Groups");
?>
</TD>
<TD> </TD>
</TR>
</TABLE>
示例5: getStringFromRequest
}
$pluginname = 'taskboard';
$group_id = getStringFromRequest('group_id');
if (!$group_id) {
exit_error(_('Cannot Process your request : No ID specified'), 'home');
} else {
$group = group_get_object($group_id);
if (!$group) {
exit_no_group();
}
if (!$group->usesPlugin($pluginname)) {
//check if the group has the plugin active
exit_error(sprintf(_('First activate the %s plugin through the Project\'s Admin Interface'), $pluginname), 'home');
}
$taskboard = new TaskBoardHtml($group);
$taskboard->header(array('title' => 'Taskboard for ' . $group->getPublicName(), 'pagename' => "Taskboard", 'sectionvals' => array(group_getname($group_id)), 'group' => $group_id));
if ($taskboard->isError()) {
exit_error($taskboard->getErrorMessage());
} else {
if (count($taskboard->getUsedTrackersIds()) == 0) {
exit_error(_('Choose at least one tracker for using with taskboard.'));
}
$columns = $taskboard->getColumns();
$user_stories_tracker = $taskboard->getUserStoriesTrackerID();
$columns_number = count($columns) + ($user_stories_tracker ? 1 : 0);
$column_width = intval(100 / $columns_number);
?>
<div id="messages" class="warning" style="display: none;"></div>
<br/>
示例6: patch_header
patch_header(array('title' => 'Modify a Patch'));
$sql = "SELECT * FROM patch WHERE patch_id='{$patch_id}' AND group_id='{$group_id}'";
$result = db_query($sql);
if (db_numrows($result) > 0) {
echo '
<H2>[ Patch #' . $patch_id . ' ] ' . db_result($result, 0, 'summary') . '</H2>';
echo '
<FORM ACTION="' . $PHP_SELF . '" METHOD="POST" enctype="multipart/form-data">
<INPUT TYPE="HIDDEN" NAME="func" VALUE="postmodpatch">
<INPUT TYPE="HIDDEN" NAME="group_id" VALUE="' . $group_id . '">
<INPUT TYPE="HIDDEN" NAME="patch_id" VALUE="' . $patch_id . '">
<TABLE WIDTH="100%">
<TR>
<TD><B>Submitted By:</B><BR>' . user_getname(db_result($result, 0, 'submitted_by')) . '</TD>
<TD><B>Group:</B><BR>' . group_getname($group_id) . '</TD>
</TR>
<TR>
<TD><B>Date Submitted:</B><BR>
' . date($sys_datefmt, db_result($result, 0, 'open_date')) . '
</TD>
<TD><FONT SIZE="-1">
<INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="Submit Changes">
</TD>
</TR>
<TR>
<TD><B>Category:</B><BR>';
echo patch_category_box($group_id, 'patch_category_id', db_result($result, 0, 'patch_category_id'));
echo '
示例7: forum_header
// $Id: index.php,v 1.3 2004/01/13 13:15:24 helix Exp $
require 'pre.php';
require '../forum/forum_utils.php';
if ($group_id) {
forum_header(array('title' => 'Forums for ' . group_getname($group_id)));
if (user_isloggedin() && user_ismember($group_id)) {
$public_flag = '0,1';
} else {
$public_flag = '1';
}
$sql = "SELECT g.group_forum_id,g.forum_name, g.description, count(*) as total " . " FROM forum_group_list g " . " LEFT JOIN forum f USING (group_forum_id) " . " WHERE g.group_id='{$group_id}' AND g.is_public IN ({$public_flag})" . " group by g.group_forum_id, g.forum_name, g.description";
//echo "<p>$sql\n";
$result = db_query($sql);
$rows = db_numrows($result);
if (!$result || $rows < 1) {
echo '<H1>No forums found for ' . group_getname($group_id) . '</H1>';
echo db_error();
forum_footer(array());
exit;
}
echo '<H2>Discussion Forums</H2>
<P>Choose a forum and you can browse, search, and post messages.<P>';
/*
Put the result set (list of forums for this group) into a column with folders
*/
for ($j = 0; $j < $rows; $j++) {
echo '<A HREF="forum.php?forum_id=' . db_result($result, $j, 'group_forum_id') . '">' . html_image("images/ic/cfolder15.png", "15", "13", array("BORDER" => "0")) . ' ' . db_result($result, $j, 'forum_name') . '</A> ';
//message count
echo '(' . db_result($result, $j, 'total') . ' msgs)';
echo "<BR>\n";
echo db_result($result, $j, 'description') . '<P>';
示例8: db_query
if (!$offset || $offset < 0 || !is_numeric($offset)) {
$offset = 0;
}
if (!$limit || $limit < 0 || $limit > 50 || !is_numeric($limit)) {
$limit = 50;
}
$result = db_query($sql, $limit + 1, $offset);
$rows = db_numrows($result);
$more = 0;
if ($rows > $limit) {
$rows = $limit;
$more = 1;
}
if ($rows < 1) {
if ($group_id) {
echo '<h2>' . sprintf(_('No News Found For %s'), group_getname($group_id)) . '</h2>';
} else {
echo '<h2>' . _('No News Found') . '</h2>';
}
echo '
<p>' . _('No items were found') . '</p>';
echo db_error();
} else {
echo '<table width="100%" border="0">
<tr><td valign="top">';
for ($j = 0; $j < $rows; $j++) {
echo '
<a href="' . util_make_url('/forum/forum.php?forum_id=' . db_result($result, $j, 'forum_id')) . '">' . html_image("ic/cfolder15.png", "15", "13", array("border" => "0")) . ' ' . stripslashes(db_result($result, $j, 'summary')) . '</a> ';
echo '
<br />';
}
示例9: mail_header
require '../mail/mail_utils.php';
if ($group_id) {
mail_header(array('title' => 'Mailing Lists for ' . group_getname($group_id)));
if (user_isloggedin() && user_ismember($group_id)) {
$public_flag = '0,1';
} else {
$public_flag = '1';
}
echo '
<H2>Mailing Lists for ' . group_getname($group_id) . '</H2>';
$sql = "SELECT * FROM mail_group_list WHERE group_id='{$group_id}' AND is_public IN ({$public_flag})";
$result = db_query($sql);
$rows = db_numrows($result);
if (!$result || $rows < 1) {
echo '
<H1>No Lists found for ' . group_getname($group_id) . '</H1>';
echo '
<P>Project administrators use the admin link to request mailing lists.';
$HTML->footer(array());
exit;
}
echo "<P>Mailing lists provided via a " . $GLOBALS['sys_default_name'] . " version of " . "<A href=\"http://www.list.org\">GNU Mailman</A>. " . "Thanks to the Mailman and <A href=\"http://www.python.org\">Python</A> " . "crews for excellent software.";
echo "<P>Choose a list to browse, search, and post messages.<P>\n";
/*
Put the result set (list of mailing lists for this group) into a column with folders
*/
echo "<table WIDTH=\"100%\" border=0>\n" . "<TR><TD VALIGN=\"TOP\">\n";
for ($j = 0; $j < $rows; $j++) {
echo '<A HREF="https://' . $GLOBALS['sys_lists_host'];
if (db_result($result, $j, 'is_public') == 1) {
echo '/pipermail/';
示例10: html_a_group
function html_a_group($grp)
{
print '<A /project/?group_id=' . $grp . '>' . group_getname($grp) . '</A>';
}
示例11: wiki_header
<?php
//
// BerliOS: Fostering Open Source Development
// Copyright 2000-20040 (c) The BerliOS Crew
// http://www.berlios.de
//
// $Id $
require 'pre.php';
require '../wiki/wiki_utils.php';
if ($group_id) {
wiki_header(array('title' => 'Wikis for ' . group_getname($group_id)));
echo '
<H2>Wikis for ' . group_getname($group_id) . '</H2>';
echo '<p>' . html_image("images/ic/cfolder15.png", "15", "13", array("BORDER" => "0")) . ' ' . '<a href="http://openfacts.berlios.de/index-en.phtml?title=' . urlencode(group_getname($group_id)) . '">English</a>';
echo '<p>' . html_image("images/ic/cfolder15.png", "15", "13", array("BORDER" => "0")) . ' ' . '<a href="http://openfacts.berlios.de/index.phtml?title=' . urlencode(group_getname($group_id)) . '">Deutsch</a>';
echo '<p>' . html_image("images/ic/cfolder15.png", "15", "13", array("BORDER" => "0")) . ' ' . '<a href="http://openfacts.berlios.de/index-es.phtml?title=' . urlencode(group_getname($group_id)) . '">Español</a>';
wiki_footer(array());
} else {
exit_no_group();
}
示例12: db_numrows
global $group_id;
$rows = db_numrows($result);
$cols = db_numfields($result);
$title_arr = array();
$title_arr[] = 'Survey ID';
$title_arr[] = 'Survey Title';
echo html_build_list_table_top($title_arr);
for ($j = 0; $j < $rows; $j++) {
echo "<tr BGCOLOR=\"" . html_get_alt_row_color($j) . "\">\n";
echo "<TD><A HREF=\"survey.php?group_id={$group_id}&survey_id=" . db_result($result, $j, "survey_id") . "\">" . sprintf("%06d", db_result($result, $j, "survey_id")) . "</A></TD>";
for ($i = 1; $i < $cols; $i++) {
printf("<TD WIDTH=\"99%%\">%s</TD>\n", db_result($result, $j, $i));
}
echo "</tr>";
}
echo "</table>";
//</TD></TR></TABLE>");
}
$sql = "SELECT survey_id,survey_title FROM surveys WHERE group_id='{$group_id}' AND is_active='1'";
$result = db_query($sql);
if (!$result || db_numrows($result) < 1) {
echo "<H2>This Group Has No Active Surveys</H2>";
echo db_error();
} else {
echo "<H2>Surveys for " . group_getname($group_id) . "</H2>";
ShowResultsGroupSurveys($result);
}
survey_footer(array());
} else {
exit_no_group();
}
示例13: db_error
if (!$result || db_affected_rows($result) < 1) {
echo db_error();
$feedback .= ' ERROR doing update ';
} else {
$feedback .= ' NewsByte Updated. ';
}
}
/*
Show the list_queue
*/
$approve = '';
$list_queue = 'y';
}
}
project_admin_header(array('title' => group_getname($group_id) . ' - Foundry NewsBytes Admin', 'group' => $group_id));
echo '<h2>Foundry: ' . group_getname($group_id) . ' - NewsByte Admin<h2>
';
if ($approve) {
/*
Show the submit form
*/
$sql = "SELECT groups.unix_group_name,groups.group_name," . "news_bytes.* " . "FROM news_bytes,groups WHERE id='{$id}' " . "AND news_bytes.group_id = groups.group_id ";
$result = db_query($sql);
if (db_numrows($result) < 1) {
exit_error('Error', 'Error - not found');
}
echo '
<H3>Approve a NewsByte</H3>
<P>
<FORM ACTION="' . $PHP_SELF . '" METHOD="POST">
<INPUT TYPE="HIDDEN" NAME="news_id" VALUE="' . db_result($result, 0, 'id') . '">
示例14: db_query
} else {
/*
Just browse the bugs in this group
*/
$sql = "SELECT bug.group_id,bug.priority,bug.bug_id,bug.summary,bug.date,users.user_name AS submitted_by," . "user2.user_name AS assigned_to_user," . "bug.category_id," . "bug.bug_group_id," . "bug_category.category_name," . "bug_group.group_name," . "bug_status.status_name " . "FROM bug,bug_category,bug_group,bug_status,users,users user2 " . "WHERE users.user_id=bug.submitted_by " . "AND bug.status_id <> '3' " . "AND user2.user_id=bug.assigned_to " . "AND bug_category.bug_category_id=bug.category_id " . "AND bug_group.bug_group_id=bug.bug_group_id " . "AND bug_status.status_id=bug.status_id " . "AND bug.group_id='{$group_id}' " . "AND bug_id!='100'" . $order_by;
// echo "<p>Group Query: $sql\n";
}
} else {
/*
Use the query from the form post
*/
$sql = "SELECT bug.group_id,bug.priority,bug.bug_id,bug.summary,bug.date,users.user_name AS submitted_by," . "user2.user_name AS assigned_to_user," . "bug.category_id," . "bug.bug_group_id," . "bug_category.category_name," . "bug_group.group_name," . "bug_status.status_name " . "FROM bug,bug_category,bug_group,bug_status,users,users user2 " . "WHERE users.user_id=bug.submitted_by " . " {$status_str} {$assigned_str} {$bug_group_str} {$category_str} " . "AND user2.user_id=bug.assigned_to " . "AND bug_category.bug_category_id=bug.category_id " . "AND bug_group.bug_group_id=bug.bug_group_id " . "AND bug_status.status_id=bug.status_id " . "AND bug.group_id='{$group_id}' " . "AND bug_id!='100'" . $order_by;
// echo "<p>Form Query: $sql\n";
}
$result = db_query($sql, 51, $offset);
if ($result && db_numrows($result) > 0) {
echo "<h3>{$statement}</H3>";
//create a new $set string to be used for next/prev button
if ($set == 'custom') {
$set .= '&_assigned_to=' . $_assigned_to . '&_status=' . $_status . '&_category=' . $_category . '&_bug_group=' . $_bug_group;
}
show_buglist($result, $offset, $set);
echo '<P>* Denotes Bugs > 30 Days Old';
show_priority_colors_key();
$url = "/bugs/?group_id={$group_id}&set={$set}&order=";
echo '<P>Click a column heading to sort by that column, or <A HREF="' . $url . 'priority">Sort by Priority</A>';
} else {
echo "<H3>{$statement}</H3>\n\n\t\t<H2>No Matching Bugs Found for " . group_getname($group_id) . " or filters too restrictive</H2>";
echo db_error();
}
bug_footer(array());
示例15: db_query
$feedback .= "Operation failed. Password and Password Confirm are not the same";
}
} else {
$feedback .= "Operation failed. Password less than 8 characters";
}
}
if ($deletedbconfirm) {
//schedule for deletion
$res = db_query("\n\t\tUPDATE prdb_dbs \n\t\tSET state=3 \n\t\tWHERE dbid='{$dbid}'\n\t\tAND group_id='{$group_id}'\n\t");
if (!$res || db_affected_rows($res) < 1) {
$feedback .= 'Cannot delete database: ' . db_error();
} else {
$feedback .= "Database scheduled for deletion";
}
}
project_admin_header(array('title' => 'Editing Database Info', 'group' => $group_id, 'pagename' => 'project_admin_database', 'sectionvals' => array(group_getname($group_id))));
if ($deletedb == 1) {
print "<hr><b><center><font color=\"red\">Click to confirm deletion of DB {$dbname}</font> [ <a href=\"" . $PHP_SELF . "?deletedbconfirm=1&group_id=" . $group_id . "&dbid={$dbid}\">CONFIRM DELETE</a> ] </center></b> <hr>";
}
print "<H2>Database Admin</H2>\n";
$res_db = db_query("\n\tSELECT * \n\tFROM prdb_types \n\tWHERE dbsoftware NOT IN (\n\t\tSELECT dbsoftware \n\t\tFROM prdb_dbs,prdb_types \n\t\tWHERE dbtypeid=dbtype \n\t\tAND group_id={$group_id}\n\t\tAND state IN (1,2,3,4)\n\t)\n");
if (db_numrows($res_db) > 0) {
print '
<h3>Add New Database</h3>
<p>
<i>Clicking on "create" will schedule the creation of the database, and email the
details to the project administrators.</i>
<p>
<b>Database Type:</b>
<p>