本文整理匯總了PHP中project_admin_header函數的典型用法代碼示例。如果您正苦於以下問題:PHP project_admin_header函數的具體用法?PHP project_admin_header怎麽用?PHP project_admin_header使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了project_admin_header函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: display
/**
* Output repo management sub screen to the browser
*/
public function display()
{
project_admin_header(array('title' => $GLOBALS['Language']->getText('project_admin_editugroup', 'edit_ug'), 'group' => $this->ugroup->getProjectId(), 'help' => 'project-admin.html#creating-a-user-group'));
echo '<h1><a href="/project/admin/ugroup.php?group_id=' . $this->ugroup->getProjectId() . '">' . $GLOBALS['Language']->getText('project_admin_utils', 'ug_admin') . '</a> - ' . $this->ugroup->getName() . '</h1>';
echo '<div class="tabbable tabs-left">';
echo '<ul class="nav nav-tabs">';
foreach ($this->panes as $key => $pane) {
$this->displayTab($pane);
}
echo '</ul>';
echo '<div class="tab-content">';
echo '<div class="tab-pane active">';
echo $this->view->getContent();
echo '</div>';
echo '</div>';
$GLOBALS['HTML']->footer(array());
}
示例2: display_db_params
}
if ($project->usesTracker()) {
require './artifact_export.php';
require './artifact_history_export.php';
require './artifact_deps_export.php';
}
echo '<p>' . $Language->getText('project_export_index', 'proj_db_success') . '</p>';
display_db_params();
site_project_footer(array());
} else {
$GLOBALS['Response']->addFeedback('info', $Language->getText('project_export_index', 'proj_db_no_data'), CODENDI_PURIFIER_DISABLED);
$GLOBALS['Response']->redirect('index.php?group_id=' . $group_id);
}
break;
default:
project_admin_header(array('title' => $pg_title, 'help' => 'project-admin.html#project-data-export'));
// Display the welcome screen
echo '
<p> ' . $Language->getText('project_export_index', 'export_to_csv_or_db', array(help_button('project-admin.html#project-data-export', false, $Language->getText('project_export_index', 'online_help')))) . '</p>';
echo '
<h3> ' . $Language->getText('project_export_index', 'export_to_csv_hdr', array(help_button('project-admin.html#text-file-export'))) . '</h3>';
echo '
<p> ' . $Language->getText('project_export_index', 'export_to_csv_msg') . '</p>';
// Show all the fields currently available in the system
$entry_label = array();
$entry_data_export_links = array();
$entry_data_export_format_links = array();
$history_data_export_links = array();
$history_data_export_format_links = array();
$dependencies_data_export_links = array();
$dependencies_data_export_format_links = array();
示例3: session_require
<?php
//
// SourceForge: Breaking Down the Barriers to Open Source Development
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
// $Id: editaliases.php,v 1.2 2003/11/13 11:29:26 helix Exp $
require "pre.php";
require $DOCUMENT_ROOT . '/project/admin/project_admin_utils.php';
session_require(array('group' => $group_id, 'admin_flags' => 'A'));
project_admin_header(array(title => "Edit Aliases", group => $group_id));
?>
<P><B>Alias List</B>
<BR><A href="editaliases-new.php?group_id=<?php
print $group_id;
?>
">[Add New Alias]</A>
<P>New aliases or alias changes take effect at the next 6 hour cron job.
<P><TABLE width=100% cellpadding=1 cellspacing=0 border=1>
<TR>
<TD><B>Username</B></TD>
<TD><B>Domain</B></TD>
<TD><B>Forward Address</B></TD>
<TD> </TD>
</TR>
<?php
$res_mail = db_query("SELECT * FROM mailaliases WHERE group_id={$group_id}");
示例4: db_error
if (!$update_success) {
$GLOBALS['Response']->addFeedback('error', $Language->getText('project_admin_editgroupinfo', 'upd_fail', db_error() ? db_error() : ' '));
} else {
$GLOBALS['Response']->addFeedback('info', $Language->getText('project_admin_editgroupinfo', 'upd_success'));
}
}
$project_manager->clearProjectFromCache($currentproject->getID());
$currentproject = $project_manager->getProject($currentproject->getID());
// update info for page
$res_grp = db_query("SELECT * FROM groups WHERE group_id='" . db_ei($group_id) . "'");
if (db_numrows($res_grp) < 1) {
exit_no_group();
}
$row_grp = db_fetch_array($res_grp);
$descfieldsvalue = $currentproject->getProjectsDescFieldsValue();
project_admin_header(array('title' => $Language->getText('project_admin_editgroupinfo', 'editing_g_info'), 'group' => $group_id, 'help' => 'project-admin.html#project-public-information'));
echo '<FORM action="?group_id=' . $group_id . '" method="post" id="project_info_form">';
$renderer = TemplateRendererFactory::build()->getRenderer(ForgeConfig::get('codendi_dir') . '/src/templates/project/');
if ($user_can_choose_visibility) {
$presenter = new ProjectVisibilityPresenter($Language, ForgeConfig::areRestrictedUsersAllowed(), $currentproject->getAccess());
echo $renderer->renderToString('project_visibility', $presenter);
}
if ($user_can_choose_truncated_emails) {
$truncated_mails_impacted_services = array();
$file_service = $currentproject->getService(Service::FILE);
if ($file_service) {
$truncated_mails_impacted_services[] = $file_service->getInternationalizedName();
}
$svn_service = $currentproject->getService(Service::SVN);
if ($svn_service) {
$truncated_mails_impacted_services[] = $svn_service->getInternationalizedName();
示例5: ob_start
//
// SourceForge: Breaking Down the Barriers to Open Source Development
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
// $Id: newrelease.php,v 1.2 2003/11/13 11:29:26 helix Exp $
ob_start();
require 'pre.php';
require 'frs.class';
require $DOCUMENT_ROOT . '/project/admin/project_admin_utils.php';
session_require(array('group' => $group_id));
$project =& group_get_object($group_id);
if (!$project->userIsReleaseTechnician()) {
exit_permission_denied();
}
project_admin_header(array('title' => 'Release New File Version', 'group' => $group_id));
// Create a new FRS object
$frs = new FRS($group_id);
if ($submit) {
$release_id = $frs->frsAddRelease($release_name, $package_id);
if (!$frs->isError()) {
header("Location: editreleases.php?package_id={$package_id}&release_id={$release_id}&group_id={$group_id}");
ob_end_flush();
?>
<h3>Release Added!</h3>
Click here to <a href="editreleases.php?package_id=<?php
echo $package_id;
?>
&release_id=<?php
echo $release_id;
示例6: extract_history
$eol = "\n";
$result = extract_history($atid);
$rows = db_numrows($result);
if ($export == 'artifact_history') {
// Send the result in CSV format
if ($result && $rows > 0) {
$tbl_name = str_replace(' ', '_', 'artifact_history_' . $at->getItemName());
header('Content-Type: text/csv');
header('Content-Disposition: filename=' . $tbl_name . '_' . $dbname . '.csv');
echo build_csv_header($col_list, $lbl_list) . $eol;
while ($arr = db_fetch_array($result)) {
prepare_artifact_history_record($at, $art_field_fact, $arr);
echo build_csv_record($col_list, $arr) . $eol;
}
} else {
project_admin_header(array('title' => $pg_title));
echo '<h3>' . $Language->getText('project_export_artifact_history_export', 'art_hist_export') . '</h3>';
if ($result) {
echo '<P>' . $Language->getText('project_export_artifact_history_export', 'no_hist_found');
} else {
echo '<P>' . $Language->getText('project_export_artifact_history_export', 'db_access_err', $GLOBALS['sys_name']);
echo '<br>' . db_error();
}
site_project_footer(array());
}
} else {
if ($export == "artifact_history_format") {
echo '<h3>' . $Language->getText('project_export_artifact_history_export', 'hist_export_format') . '</h3>';
echo '<p>' . $Language->getText('project_export_artifact_history_export', 'hist_export_format_msg') . '</p>';
$record = pick_a_record_at_random($result, $rows, $col_list);
prepare_artifact_history_record($at, $art_field_fact, $record);
示例7: exit_error
if (!$gjr || !is_object($gjr) || $gjr->isError()) {
$feedback .= 'Error Getting GroupJoinRequest';
} else {
if (!$gjr->reject()) {
exit_error('Error', $gjr->getErrorMessage());
} else {
$feedback .= 'Rejected';
}
}
}
}
}
}
$group->clearError();
$adminheadertitle = sprintf(_('Project Admin: %1$s'), $group->getPublicName());
project_admin_header(array('title' => $adminheadertitle, 'group' => $group->getID()));
/*
Show top box listing trove and other info
*/
?>
<table width="100%" cellpadding="2" cellspacing="2" border="0">
<tr valign="top">
<td width="50%">
<?php
echo $HTML->boxTop(_('Misc. Project Information'));
?>
<br />
示例8: project_admin_header
$password = $request->getValidated('password');
$email = $request->getValidated('email');
if ($password) {
$generic_user->setPassword($password);
}
$generic_user->setEmail($email);
if ($user_manager->updateDb($generic_user)) {
$GLOBALS['Response']->addFeedback('info', $Language->getText('project_admin', 'generic_member_updated'));
} else {
$GLOBALS['Response']->addFeedback('warning', $Language->getText('project_admin', 'generic_member_not_changed'));
}
$GLOBALS['HTML']->redirect($redirect_url);
}
$hp = Codendi_HTMLPurifier::instance();
$title = $Language->getText('project_admin', 'generic_member_settings');
project_admin_header(array('title' => $title, 'group' => $group_id, 'help' => 'project-admin.html'));
echo '<h2>' . $title . '</h2>';
echo '<form method="POST" action="">';
echo $token->fetchHTMLInput();
echo '<input type="hidden" name="group_id" value="' . (int) $group_id . '" />
<p>
<label for="newtracker_login"><b>' . $Language->getText('account_login', 'name') . '</b>:<br />
' . $generic_user->getUserName() . '
</p>
<p>
<label for="newtracker_real_name"><b>' . $Language->getText('account_register', 'realname') . '</b>:</label><br />
' . $generic_user->getRealName() . '
</p>
<p>
<label for="generic_user_email"><b>' . $Language->getText('account_change_email', 'title') . '</b>:</label><br />
<input type="email" name="email" id="generic_user_email" value="' . $hp->purify($generic_user->getEmail(), CODENDI_PURIFIER_CONVERT_HTML) . '" />
示例9: plugin_hook
$group->addUser($keys[$i], $addrole[$keys[$i]]);
//plugin webcal
//change assistant for webcal
$params[0] = $keys[$i];
$params[1] = $group_id;
plugin_hook('change_cal_permission', $params);
}
Header("Location: index.php?group_id={$group_id}&feedback=Successful");
}
if (!$accumulated_ids) {
exit_error('Error', 'No IDs Were Passed');
} else {
$arr = explode(',', $accumulated_ids);
$res = db_query("SELECT user_id,user_name,realname FROM users\n\t\tWHERE status='A' and type_id='1' and user_id IN ('" . implode('\',\'', $arr) . "') \n\t\tORDER BY realname ASC");
}
project_admin_header(array('title' => _('Edit Role'), 'group' => $group_id));
echo '
<h2>' . _('Add Users From List') . '</h2>
<p>
' . _('Choose the role for each user and then press "Add All".') . '
<p>
<form action="' . getStringFromServer('PHP_SELF') . '?group_id=' . $group_id . '" method="post">';
if (!$res || db_numrows($res) < 1) {
echo "No Matching Users Found";
} else {
$titles[] = _('Real name');
$titles[] = _('Unix name');
$titles[] = _('Role');
echo $HTML->listTableTop($titles);
//
// Everything is built on the multi-dimensial arrays in the Role object
示例10: exit_error
if (!$ugroup_id) {
exit_error($Language->getText('global', 'error'), 'The ugroup ID is missing');
}
$res = ugroup_db_get_ugroup($ugroup_id);
if (!$res) {
exit_error($Language->getText('global', 'error'), $Language->getText('project_admin_editugroup', 'ug_not_found', array($ugroup_id, db_error())));
}
if (!isset($ugroup_name) || !$ugroup_name) {
$ugroup_name = db_result($res, 0, 'name');
}
if (!isset($ugroup_description) || !$ugroup_description) {
$ugroup_description = db_result($res, 0, 'description');
} else {
$ugroup_description = stripslashes($ugroup_description);
}
project_admin_header(array('title' => $Language->getText('project_admin_editugroup', 'edit_ug'), 'group' => $group_id, 'help' => 'UserGroups.html#UGroupCreation'));
print '<P><h2>' . $Language->getText('project_admin_editugroup', 'ug_admin', $ugroup_name) . '</h2>';
echo '<p>' . $Language->getText('project_admin_editugroup', 'upd_ug_name') . '</p>';
echo '<form method="post" name="form_create" action="/project/admin/ugroup.php?group_id=' . $group_id . '" onSubmit="return selIt();">
<input type="hidden" name="func" value="do_update">
<input type="hidden" name="group_id" value="' . $group_id . '">
<input type="hidden" name="ugroup_id" value="' . $ugroup_id . '">';
display_name_and_desc_form($ugroup_name, $ugroup_description);
echo '<tr><td></td><td><input type="submit" value="' . $Language->getText('global', 'btn_submit') . '" /></td></tr>';
echo '</table>';
echo '</form>';
$ugroupUpdateUsersAllowed = true;
$em->processEvent(Event::UGROUP_UPDATE_USERS_ALLOWED, array('ugroup_id' => $ugroup_id, 'allowed' => &$ugroupUpdateUsersAllowed));
echo '<hr /><p><b>' . $Language->getText('project_admin_editugroup', 'group_members') . '</b></p>';
echo '<div style="padding-left:10px">';
// Get existing members from group
示例11: Valid_WhiteList
$btn_update = $Language->getText('plugin_ldap', 'ugroup_edit_btn_update');
$vSubmit = new Valid_WhiteList('submit', array($btn_update));
$vSubmit->required();
if ($request->isPost() && $request->valid($vSubmit)) {
if ($request->get('submit') == $btn_update) {
$vUserAdd = new Valid_String('user_add');
$vUserAdd->required();
if ($request->valid($vUserAdd)) {
$ldapUserGroupManager->addListOfUsersToGroup($request->get('user_add'));
}
}
}
//
// Display
//
$ugroupRow = ugroup_db_get_ugroup($ugroupId);
$ugroupName = util_translate_name_ugroup($row['name']);
$clean_ugroupName = $hp->purify($ugroupName);
project_admin_header(array('title' => $Language->getText('project_admin_editugroup', 'edit_ug'), 'group' => $group_id));
echo '<h2>' . $Language->getText('project_admin_editugroup', 'ug_admin', $clean_ugroupName) . '</h2>';
echo '<p>' . $GLOBALS['Language']->getText('plugin_ldap', 'ugroup_edit_group_add_users_help') . '</p>';
echo '<form name="plugin_ldap_edit_ugroup" method="post" action="">';
echo '<input type="hidden" name="ugroup_id" value="' . $ugroupId . '" />';
echo '<input type="hidden" name="func" value="add_user" />';
echo '<p>' . $GLOBALS['Language']->getText('plugin_ldap', 'ugroup_edit_group_add_users') . ' <textarea name="user_add" id="user_add" rows="2" cols="60" wrap="soft"/></textarea></p>';
echo '<input type="submit" name="submit" value="' . $btn_update . '" />';
// JS code for autocompletion on "add_user" field defined on top.
$js = "new UserAutoCompleter('user_add',\r\n '" . util_get_dir_image_theme() . "',\r\n true);";
$GLOBALS['Response']->includeFooterJavascriptSnippet($js);
echo '</form>';
project_admin_footer(array());
示例12: session_require
// http://sourceforge.net
//
// $Id: homepage-edit.php,v 1.2 2003/11/13 11:29:26 helix Exp $
require "pre.php";
require "account.php";
require $DOCUMENT_ROOT . '/project/admin/project_admin_utils.php';
session_require(array('group' => $group_id, 'admin_flags' => 'A'));
if ($GLOBALS[Submit]) {
if ($form_homepage) {
db_query("UPDATE groups SET homepage='{$form_homepage}' " . "WHERE group_id={$group_id}");
session_redirect("/project/admin/?group_id={$group_id}");
}
}
$res_grp = db_query("SELECT homepage FROM groups WHERE group_id={$group_id}");
$row_grp = db_fetch_array($res_grp);
project_admin_header(array('title' => 'Edit Homepage URL', 'group' => $group_id));
?>
<P>Editing URL for project: <B><?php
html_a_group($group_id);
?>
</B>
<P><FORM action="homepage-edit.php" method="post">
New URL:
<BR><I>Without "http://". Example "myproject.<?php
echo $GLOBALS['sys_default_domain'];
?>
".</I>
<BR><INPUT type="text" name="form_homepage" value="<?php
print $row_grp[homepage];
?>
示例13: project_admin_header
//
// Cancel operations
//
$GLOBALS['Response']->redirect('/project/admin/index.php?group_id=' . $groupId);
} else {
//
// Display to user what will be done with project members.
//
$toRemove = $ldapGroupManager->getUsersToBeRemoved($bindOption);
$toAdd = $ldapGroupManager->getUsersToBeAdded($bindOption);
$notImpacted = $ldapGroupManager->getUsersNotImpacted($bindOption);
if (is_array($toAdd)) {
// Display
$um = UserManager::instance();
$hp = Codendi_HTMLPurifier::instance();
project_admin_header(array('title' => $GLOBALS['Language']->getText('plugin_ldap', 'project_members_synchro_title'), 'group' => $groupId));
echo '<h1>' . $GLOBALS['Language']->getText('plugin_ldap', 'project_members_synchro_title') . '</h1>';
echo '<p>' . $GLOBALS['Language']->getText('plugin_ldap', 'project_members_synchro_warning') . '</p>';
echo '<p>' . $GLOBALS['Language']->getText('plugin_ldap', 'group_members_synchro_sumup', array(count($toRemove), count($toAdd), count($notImpacted))) . '</p>';
echo '<table width="100%">';
echo '<tr><td width="50%" valign="top">';
$GLOBALS['HTML']->box1_top($GLOBALS['Language']->getText('plugin_ldap', 'group_members_synchro_to_remove', array(count($toRemove))));
echo '<ul>';
foreach ($toRemove as $userId) {
if ($user = $um->getUserById($userId)) {
echo '<li>' . $user->getRealName() . ' (' . $user->getUserName() . ')</li>';
}
}
echo '</ul>';
$GLOBALS['HTML']->box1_bottom();
echo '</td><td width="50%" valign="top">';
示例14: renderDefinitionFormat
public function renderDefinitionFormat()
{
project_admin_header(array('title' => $GLOBALS['Language']->getText('plugin_docman', 'export_format')));
echo '<h3>' . $GLOBALS['Language']->getText('plugin_docman', 'perm_exp_format') . '</h3>';
echo '<p>' . $GLOBALS['Language']->getText('plugin_docman', 'perm_exp_format_msg') . '</p>';
$title_arr = array($GLOBALS['Language']->getText('plugin_docman', 'format_label'), $GLOBALS['Language']->getText('plugin_docman', 'format_sample'), $GLOBALS['Language']->getText('plugin_docman', 'format_description'));
echo html_build_list_table_top($title_arr);
$i = 0;
echo "<tr class='" . util_get_alt_row_color($i++) . "'>";
echo "<td><b>" . $GLOBALS['Language']->getText('plugin_docman', 'format_id') . "</b></td>";
echo "<td>53</td>";
echo "<td>" . $GLOBALS['Language']->getText('plugin_docman', 'format_id_desc') . "</td>";
echo "</tr>";
echo "<tr class='" . util_get_alt_row_color($i++) . "'>";
echo "<td><b>" . $GLOBALS['Language']->getText('plugin_docman', 'format_path') . "</b></td>";
echo "<td>/My Folder/My Document</td>";
echo "<td>" . $GLOBALS['Language']->getText('plugin_docman', 'format_path_desc') . "</td>";
echo "</tr>";
echo "<tr class='" . util_get_alt_row_color($i++) . "'>";
echo "<td><b>" . $GLOBALS['Language']->getText('plugin_docman', 'format_type') . "</b></td>";
echo "<td>File</td>";
echo "<td>" . $GLOBALS['Language']->getText('plugin_docman', 'format_type_desc') . "</td>";
echo "</tr>";
echo "<tr class='" . util_get_alt_row_color($i++) . "'>";
echo "<td><b>" . $GLOBALS['Language']->getText('plugin_docman', 'format_user_group') . "</b></td>";
echo "<td>Developper Group</td>";
echo "<td>" . $GLOBALS['Language']->getText('plugin_docman', 'format_user_group_desc') . "</td>";
echo "</tr>";
echo "</table>";
site_project_footer(array());
}
示例15: getIntFromRequest
}
} else {
$feedback .= "Operation failed. Password and Password Confirm are not the same";
}
}
if (getStringFromRequest('deletedbconfirm')) {
$dbid = getIntFromRequest('dbid');
//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' => _('Database Information') . '', 'group' => $group_id));
// XXX ogi: where's deletedb defined?
if ($deletedb == 1) {
print "<hr /><strong><div align=\"center\">" . _('Click to confirm deletion') . "[ <a href=\"" . getStringFromServer('PHP_SELF') . "?deletedbconfirm=1&group_id=" . $group_id . "&dbid={$dbid}\">'._('CONFIRM DELETE').'</a> ] </div></strong> <hr />";
}
$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,4)\n\t)\n");
if (db_numrows($res_db) > 0) {
print '
<p><strong><span style="text-decoration:underline">' . _('Add New Database') . '</span></strong></p>
<p><em>' . _('Clicking on "create" will schedule the creation of the database, and email the details to the project administrators') . '</em></p>
<p><strong>' . _('Database Type') . ':</strong></p>
<p><form action="' . getStringFromServer('PHP_SELF') . '" method="post">
<input type="hidden" name="createdb" value="1" />
<input type="hidden" name="group_id" value="' . $group_id . '" />