$form_shortname = getStringFromRequest('form_shortname'); $form_fullname = getStringFromRequest('form_fullname'); $form_description = getStringFromRequest('form_description'); $newroot = trove_getrootcat($form_parent); if ($form_shortname) { $res = db_query("\n\t\t\tINSERT INTO trove_cat \n\t\t\t\t(shortname,fullname,description,parent,version,root_parent)\n\t\t\tVALUES (\n\t\t\t\t'" . htmlspecialchars($form_shortname) . "',\n\t\t\t\t'" . htmlspecialchars($form_fullname) . "',\n\t\t\t\t'" . htmlspecialchars($form_description) . "',\n\t\t\t\t'{$form_parent}',\n\t\t\t\t'" . date("Ymd", time()) . "01',\n\t\t\t\t'{$newroot}'\n\t\t\t)\n\t\t"); if (!$res || db_affected_rows($res) < 1) { form_release_key(getStringFromRequest("form_key")); exit_error(_('Error In Trove Operation'), db_error()); } } // update full paths now trove_genfullpaths($newroot, trove_getfullname($newroot), $newroot); session_redirect("/admin/trove/trove_cat_list.php"); } site_admin_header(array('title' => _('Site Admin: Trove - Add Node'))); ?> <h3><?php echo _('Add New Trove Category'); ?> </h3> <form action="trove_cat_add.php" method="post"> <input type="hidden" name="form_key" value="<?php echo form_generate_key(); ?> "> <p><?php echo _('Parent Category'); ?>
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GForge; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ require_once '../env.inc.php'; require_once $gfwww . 'include/pre.php'; require_once $gfwww . 'admin/admin_utils.php'; $search = getStringFromRequest('search'); $usersearch = getStringFromRequest('usersearch'); if (!$search) { exit_error(_('Error'), _('Refusing to display whole DB,That would display whole DB. Please use a CLI query if you wish to do this.')); } site_admin_header(array('title' => _('Admin Search Results'))); function format_name($name, $status) { if ($status == 'D') { return "<strong><strike>{$name}</strike></strong>"; } else { if ($status == 'S') { return "<strong><span style=\"text-decoration:underline\">{$name}</span></strong>"; } else { if ($status == 'H') { return "<strong><span style=\"text-decoration:underline\">{$name}</span></strong>"; } else { if ($status == 'P') { return "<strong><em>{$name}</em></strong>"; } else { if ($status == 'I') {
if (!$group->setStatus(session_get_user(), 'D')) { exit_error(_('Error during group rejection'), $this->getErrorMessage()); } $group->addHistory('rejected', 'x'); // Determine whether to send a canned or custom rejection letter and send it if ($response_id == 100) { $group->sendRejectionEmail(0, $response_text); if ($add_to_can) { add_canned_response($response_title, $response_text); } } else { $group->sendRejectionEmail($response_id); } } } site_admin_header(array('title' => _('Approving Pending Projects'))); // get current information $res_grp = db_query("SELECT * FROM groups WHERE status='P'", $LIMIT); $rows = db_numrows($res_grp); if ($rows < 1) { print "<h1>" . _('None Found') . "</h1>"; print "<p>" . _('No Pending Projects to Approve') . "</p>"; site_admin_footer(array()); exit; } if ($rows > $LIMIT) { print "<p>" . _('Pending projects:') . "{$LIMIT}+ ({$LIMIT} shown)</p>"; } else { print "<p>" . _('Pending projects:') . "{$rows}</p>"; } while ($row_grp = db_fetch_array($res_grp)) {
} else { return $this->master($request); } } } $GLOBALS['Response']->redirect('/admin/servers/'); } } //Process request if (!isset($_GET['r']) || !$_GET['r']) { $_REQUEST['action'] = 'index'; } else { $r = explode('/', $r); $_REQUEST['action'] = $r[0]; if (isset($r[1])) { $_REQUEST['id'] = $r[1]; } } require_once 'common/include/HTTPRequest.class.php'; $request =& HTTPRequest::instance(); $server_admin = new ServerAdmin(); $method = $_REQUEST['action']; if (method_exists($server_admin, $method)) { $html = $server_admin->{$method}($request); site_admin_header(array('title' => $server_admin->title)); echo '<h3>' . $server_admin->title . '</h3>'; echo $html; site_admin_footer(array()); } else { die('Invalid action ' . $method); }
global $Language; print '<br />'; for ($i = 0; $i < $GLOBALS[depth]; $i++) { print " "; } print html_image('ic/cfolder15.png', '15', '13', array()); print ' ' . $text . " "; print url_make_link("trove_cat_add.php?parent_trove_cat_id='.{$nodeid}.'", "[" . _('Add') . "]"); if ($nodeid != 0) { print url_make_link("trove_cat_edit.php?parent_trove_cat_id='.{$nodeid}.'", "[" . _('Edit') . "]"); print help_button('trove_cat', $nodeid) . "\n"; } $GLOBALS['depth']++; $res_child = db_query("\n\t\tSELECT trove_cat_id,fullname FROM trove_cat \n\t\tWHERE parent='{$nodeid}'\n\t\tAND trove_cat_id!=0;\n\t"); while ($row_child = db_fetch_array($res_child)) { printnode($row_child["trove_cat_id"], $row_child["fullname"]); } $GLOBALS["depth"]--; } // ######################################################## site_admin_header(array('title' => _('Site Admin: Trove - Category List'))); ?> <h3><?php echo _('Browse Trove Tree'); ?> </h3> <?php printnode(0, "root"); site_admin_footer(array());
/* Perform unsubscription */ $u =& user_get_object_by_name($user_name); if (!$u || !is_object($u)) { exit_error('Error', 'Could Not Get User'); } elseif ($u->isError()) { exit_error('Error', $u->getErrorMessage()); } if (!$u->unsubscribeFromMailings($type == 'ALL' ? 1 : 0)) { exit_error(_('Error, Could not unsubscribe user:'******'User unsubscribed') . '<br />'; } } site_admin_header(array('title' => _('Site Mailings Subscription Maintenance'))); ?> <h4> <?php echo _('Site Mailings Subscription Maintenance'); ?> </h4> <p> <?php printf(_('Use field below to find users which match given pattern with the %1$s username, real name, or email address (substring match is preformed, use \'%%\' in the middle of pattern to specify 0 or more arbitrary characters). Click on the username to unsubscribe user from site mailings (new form will appear).'), $GLOBALS['sys_name']); ?> </p> <form action="<?php
<?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.6 2006/01/13 12:20:49 helix Exp $ require "pre.php"; require $DOCUMENT_ROOT . '/admin/admin_utils.php'; session_require(array('group' => '1', 'admin_flags' => 'A')); site_admin_header(array('title' => "Site Admin")); $abc_array = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'); ?> <h2>Administrative Functions</h2> <p><i><b>Warning!</b> These functions currently have minimal error checking, if any. They are fine to play with but may not act as expected if you leave fields blank, etc... Also, navigating the admin functions with the <b>back</b> button is highly unadvised.</i> <h3>User Maintenance</h3> <ul> <li><a href="userlist.php">Display Full User List/Edit Users</a> <li>Display Users Beginning with : <?php for ($i = 0; $i < count($abc_array); $i++) { echo "<a href=\"userlist.php?user_name_search={$abc_array[$i]}\">{$abc_array[$i]}</a>|"; } ?> <br>
$em->processEvent('project_is_deleted', array('group_id' => $group_id)); } } } } // get current information $res_grp = db_query("SELECT * FROM groups WHERE group_id={$group_id}"); if (db_numrows($res_grp) < 1) { exit_error("ERROR", $Language->getText('admin_groupedit', 'error_group')); } $row_grp = db_fetch_array($res_grp); if ($request->exist('export')) { export_grouphistory($group_id, $event, $subEvents, $value, $startDate, $endDate, $by); exit; } site_admin_header(array('title' => $Language->getText('admin_groupedit', 'title'))); echo '<H2>' . $row_grp['group_name'] . '</H2>'; ?> <p> <A href="/project/admin/?group_id=<?php print $group_id; ?> "><B><BIG>[<?php echo $Language->getText('admin_groupedit', 'proj_admin'); ?> ]</BIG></B></A><BR/> <A href="userlist.php?group_id=<?php print $group_id; ?> "><B><BIG>[<?php
group_add_history('added foundry_data row', '', $group_id); $feedback .= ' CREATING NEW FOUNDRY_DATA ROW '; $r = db_query("INSERT INTO foundry_data (foundry_id) VALUES ('{$group_id}')"); if (!$r || db_affected_rows($r) < 1) { echo 'COULD NOT INSERT NEW FOUNDRY_DATA ROW: ' . db_error(); } } } } // get current information $res_grp = db_query("SELECT * FROM groups WHERE group_id={$group_id}"); if (db_numrows($res_grp) < 1) { exit_error("Invalid Group", "Invalid group was passed in."); } $row_grp = db_fetch_array($res_grp); site_admin_header(array('title' => "Editing Group")); echo '<h2>Group: ' . $row_grp['group_name'] . '</h2>'; ?> <?php print "<h3><A href=\"/project/admin/?group_id={$group_id}\">[Group Admin]</A>"; ?> <br><A href="userlist.php?group_id=<?php print $group_id; ?> ">[View/Edit Group Members]</A></h3> <p> <FORM action="<?php echo $PHP_SELF;
should be edited from that group's admin page */ require "pre.php"; require "account.php"; require $DOCUMENT_ROOT . '/admin/admin_utils.php'; session_require(array('group' => '1', 'admin_flags' => 'A')); if ($action == "update_user") { $user = user_get_object($user_id); $user->setEmail($email); $user->setShell($shell); $user->setUnixStatus($unix_status); if ($user->isError()) { $feedback = $user->getErrorMessage(); } } site_admin_header(array('title' => 'User Info')); // get users info $res_user = db_query("SELECT * FROM users WHERE user_id={$user_id}"); $row_user = db_fetch_array($res_user); ?> <h2>User: <?php print user_getname($user_id); ?> </h2> <p>User ID: <?php print $user_id; ?> <br>Status: <?php print $row_user['status']; ?> <br>Registered: <?php
<?php // // SourceForge: Breaking Down the Barriers to Open Source Development // Copyright 1999-2000 (c) The SourceForge Crew // http://sourceforge.net // require "pre.php"; require $DOCUMENT_ROOT . '/admin/admin_utils.php'; session_require(array('group' => '1', 'admin_flags' => 'A')); site_admin_header(array('title' => "User/Group Maintenance")); print "<h2>User/Group Maintenance</h2>\n"; if ($search == "") { exit_error("Refusing to display whole DB", "That would display whole DB. Please use a CLI query if you wish to do this."); } if ($usersearch) { print "<p>User Search Criteria: <b>%{$search}%</b><p>\n"; $sql = "select distinct * from users where user_id like '%{$search}%' or user_name like '%{$search}%' or email like '%{$search}%' or realname like '%{$search}%'"; $result = db_query($sql); if (db_numrows($result) < 1) { print "No matches.<p><a href=\"/admin/\">Back</a>"; } else { echo '<p>Key: <b>Active</b> <i>Deleted</i> Suspended (*)Pending <p> <table cellspacing="0" cellpadding="1" border="1"> <tr><th>UserName</th><th>User\'s Name</th><th>eMail</th><th>DevProfile</th><th colspan=\\"4\\">Set to Status</th></tr>'; while ($row = db_fetch_array($result)) {
* GForge is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GForge; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ require_once '../env.inc.php'; require_once $gfwww . 'include/pre.php'; require_once $gfcommon . 'include/account.php'; require_once $gfwww . 'include/canned_responses.php'; require_once $gfwww . 'admin/admin_utils.php'; require_once $gfwww . 'project/admin/project_admin_utils.php'; site_admin_header(array('title' => _('Site Admin: Edit Rejection Responses'))); function check_select_value($value, $type) { if ($value == "100") { print "<span class=\"important\">" . sprintf(_('You can\'t %1$s \\"None\\"!'), $GLOBALS['type']) . "</span><br />\n"; } } ?> <form method="post" action="<?php echo getStringFromServer('PHP_SELF'); ?> "> <?php echo _('Existing Responses:'); echo get_canned_responses();
<?php // // BerliOS: The Open Source Mediator // Copyright 2000-2004 (c) The BerliOS Crew // http://www.berlios.de // // $Id: group_donations.php,v 1.2 2005/02/11 11:09:08 helix Exp $ require "pre.php"; require $DOCUMENT_ROOT . '/admin/admin_utils.php'; session_require(array('group' => '1', 'admin_flags' => 'A')); site_admin_header(array('title' => "Group Donations")); echo '<H2>List of Group Donations</H2>'; // Administrative functions for Donations /* Set donation to approved */ if ($action == 'approve') { db_query("UPDATE group_donors SET status='A' WHERE user_id='{$user_id}' AND add_date='{$date}'"); echo '<p>Group Donation from ' . $user_id . ' at ' . date($sys_datefmt, $date) . ' (' . $date . ') is changed to APPROVED'; } /* Set donation to deleted */ if ($action == 'delete') { db_query("UPDATE group_donors SET status='D' WHERE user_id='{$user_id}' AND add_date='{$date}'"); echo '<p>Group Donation from ' . $user_id . ' at ' . date($sys_datefmt, $date) . ' (' . $date . ') is changed to DELETED'; } /* Set donation to pending */
if (!$res || db_affected_rows($res) < 1) { exit_error(_('Error In Trove Operation'), db_error()); } } session_redirect("/admin/trove/trove_cat_list.php"); } /* Main Code */ $trove_cat_id = getIntFromRequest("trove_cat_id"); $res_cat = db_query("SELECT * FROM trove_cat WHERE trove_cat_id={$trove_cat_id}"); if (db_numrows($res_cat) < 1) { exit_error(_('No Such Category, That trove cat does not exist')); } $row_cat = db_fetch_array($res_cat); site_admin_header(array('title' => _('Site Admin: Trove - Edit Category'))); ?> <h3><?php echo _('Edit Trove Category'); ?> </h3> <form action="trove_cat_edit.php" method="post"> <p><?php echo _('Parent Category:'); ?> <br /><select name="form_parent"> <?php
<li><a href="externaltools.php?tool=munin">munin</a></li> <li><a href="externaltools.php?tool=info">PHP info</a></li> <li><a href="externaltools.php?tool=APC">APC - PHP Cache</a></li> ' . $pluginsContent . ' </ul> </li> </ul>'); // Plugins ob_start(); $em->processEvent('site_admin_option_hook', null); $pluginsContent = ob_get_contents(); ob_end_clean(); $wPlugins = new Widget_Static($Language->getText('admin_main', 'header_plugins')); $wPlugins->setContent('<ul>' . $pluginsContent . '</ul>'); // Start output site_admin_header(array('title' => $Language->getText('admin_main', 'title'))); echo "<p><i>" . $Language->getText('admin_main', 'message') . "</i></p>"; echo '<table id="site_admin_main_table"><tr>'; echo '<td>'; $wUser->display(); $wProject->display(); echo "</td>"; echo '<td>'; $wUtils->display(); $wConf->display(); echo "</td>"; echo '<td>'; $wDoc->display(); $wStats->display(); $wPlugins->display(); echo "</td>";
<?php // // SourceForge: Breaking Down the Barriers to Open Source Development // Copyright 1999-2000 (c) The SourceForge Crew // http://sourceforge.net // // $Id: grouplist.php,v 1.4 2005/02/11 12:54:58 helix Exp $ require "pre.php"; require $DOCUMENT_ROOT . '/admin/admin_utils.php'; session_require(array('group' => '1', 'admin_flags' => 'A')); site_admin_header(array('title' => "Group List")); // start from root if root not passed in if (!$form_catroot) { $form_catroot = 1; } print "<h2>Group List</h2>\n"; // print "<p><a href=\"groupedit-add.php\">[Add Group]</a>"; print "<p>Group List for Category: "; if ($form_catroot == 1) { if (isset($group_name_search)) { print "<b>Groups that begin with {$group_name_search}</b>\n"; $res = db_query("SELECT group_name,unix_group_name,group_id,is_public,status,license " . "FROM groups WHERE group_name ILIKE '{$group_name_search}%' " . ($form_pending ? "AND WHERE status='P' " : "") . " ORDER BY group_name"); } else { print "<b>All Categories</b>\n"; $res = db_query("SELECT group_name,unix_group_name,group_id,is_public,status,license " . "FROM groups " . ($status ? "WHERE status='{$status}' " : "") . "ORDER BY group_name"); } // 2003-02-03 helix //} else { // print "<b>" . category_fullname($form_catroot) . "</b>\n"; //
wiki_attachment_restore_process($request, $group_id); break; } //} $focus = $request->get('focus'); if (!$focus) { $focus = 'frs_file'; } $idArray = array(); $nomArray = array(); $htmlArray = array(); frs_file_restore_view($group_id, $idArray, $nomArray, $htmlArray); wiki_attachment_restore_view($group_id, $idArray, $nomArray, $htmlArray); $params = array('group_id' => $group_id, 'id' => &$idArray, 'nom' => &$nomArray, 'focus' => $focus, 'html' => &$htmlArray); $em->processEvent('show_pending_documents', $params); site_admin_header(array('title' => $GLOBALS['Language']->getText('admin_groupedit', 'title'))); ?> <FORM action="?" method="POST"> <INPUT type="hidden" name="group_id" value="<?php print $group_id; ?> "> <?php $project = $pm->getProject($group_id, false, true); echo '<h3>' . $GLOBALS['Language']->getText('admin_show_pending_documents', 'pending_doc', array($group_id, $project->getUnixName())) . '</h3>'; echo '<p>' . $GLOBALS['Language']->getText('admin_show_pending_documents', 'delay_info', array($GLOBALS['sys_file_deletion_delay'])) . '</p>'; ?> <div class="systeme_onglets"> <div class="onglets"> <?php if (isset($params['id']) && $params['id']) {
require_once 'common/include/CSRFSynchronizerToken.class.php'; require_once 'common/user/GenericUserFactory.class.php'; session_require_site_admin(); $fake_project = new Project(array('group_id' => -1, 'unix_group_name' => $Language->getText('admin_generic_user', 'unix_name_template'), 'group_name' => $Language->getText('admin_generic_user', 'name_template'))); $sample_project = new Project(array('group_id' => -1, 'unix_group_name' => 'gpig', 'group_name' => 'Guinea Pig')); $fake_user = new PFUser(array()); $generic_user_factory = new GenericUserFactory(UserManager::instance(), ProjectManager::instance(), new GenericUserDao()); $fake_generic_user = $generic_user_factory->getGenericUser($fake_project, $fake_user); $sample_generic_user = $generic_user_factory->getGenericUser($sample_project, $fake_user); $name_css = ''; $valid_username_format = new Valid_GenericUserNameSuffix(''); if (!$valid_username_format->validate($sample_generic_user->getUnixName())) { $GLOBALS['Response']->addFeedback(Feedback::ERROR, $Language->getText('admin_generic_user', 'invalid_suffix', array(GenericUserFactory::CONFIG_KEY_SUFFIX))); $name_css = 'highlight'; } site_admin_header(array('title' => $Language->getText('admin_generic_user', 'title'))); echo '<h2>' . $Language->getText('admin_generic_user', 'title') . '</h2> <p>' . $Language->getText('admin_generic_user', 'help') . '</p> <p>' . $Language->getText('admin_generic_user', 'help_update', array(GenericUserFactory::CONFIG_KEY_SUFFIX)) . '</p> <p> <label><b>' . $Language->getText('account_register', 'realname') . '</b>:</label><br /> ' . $fake_generic_user->getRealName() . ' </p> <p> <label class="' . $name_css . '"><b>' . $Language->getText('account_login', 'name') . '</b>:<br /> ' . $fake_generic_user->getUnixName() . ' <div class="help">e.g. ' . $sample_generic_user->getUnixName() . '</div> </p> <p> <label><b>' . $Language->getText('admin_generic_user', 'email') . '</b>:</label><br /> <div class="help">' . $Language->getText('admin_generic_user', 'set_by_project') . '</div>
<?php // // BerliOS: The Open Source Mediator // Copyright 2000-2004 (c) The BerliOS Crew // http://www.berlios.de // // $Id: user_donations.php,v 1.2 2005/02/11 11:09:08 helix Exp $ require "pre.php"; require $DOCUMENT_ROOT . '/admin/admin_utils.php'; session_require(array('group' => '1', 'admin_flags' => 'A')); site_admin_header(array('title' => "User Donations")); echo '<H2>List of User Donations</H2>'; // Administrative functions for Donations /* Set donation to approved */ if ($action == 'approve') { db_query("UPDATE user_donors SET status='A' WHERE user_id='{$user_id}' AND add_date='{$date}'"); echo '<p>Donation from ' . $user_id . ' at ' . date($sys_datefmt, $date) . ' (' . $date . ') is updated to APPROVED status'; } /* Set donation to deleted */ if ($action == 'delete') { db_query("UPDATE user_donors SET status='D' WHERE user_id='{$user_id}' AND add_date='{$date}'"); echo '<p>Donation from ' . $user_id . ' at ' . date($sys_datefmt, $date) . ' (' . $date . ') is updated to DELETED status'; } /* Set donation to pending */
* the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GForge is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GForge; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ require_once '../env.inc.php'; require_once $gfwww . 'include/pre.php'; require_once $gfwww . 'admin/admin_utils.php'; site_admin_header(array('title' => _('Group List'))); $form_catroot = getStringFromRequest('form_catroot'); $form_pending = getStringFromRequest('form_pending'); $sortorder = getStringFromRequest('sortorder'); $group_name_search = getStringFromRequest('group_name_search'); $status = getStringFromRequest('status'); // start from root if root not passed in if (!$form_catroot) { $form_catroot = 1; } if (!isset($sortorder) || empty($sortorder)) { $sortorder = "group_name"; } if ($form_catroot == 1) { if (isset($group_name_search)) { echo "<p>" . _('Groups that begin with') . " <strong>" . $group_name_search . "</strong></p>\n";
exit_error('Error', 'Could Not Get Group'); } elseif ($group->isError()) { exit_error('Error', $group->getErrorMessage()); } if (getStringFromPost('submit')) { $sure = getIntFromPost('sure'); $reallysure = getIntFromPost('reallysure'); $reallyreallysure = getIntFromPost('reallyreallysure'); if (!$group->delete($sure, $reallysure, $reallyreallysure)) { exit_error('Error', $group->getErrorMessage()); } else { plugin_hook('delete_link', $_GET['group_id']); header("Location: " . util_make_url("/admin/?feedback=DELETED")); } } site_admin_header(array('title' => _('Permanently Delete Project'))); echo '<h2>' . _('Permanently and irretrievably delete project') . ': ' . $group->getPublicName() . '</h2>'; ?> <p> <form action="<?php echo getStringFromServer('PHP_SELF') . '?group_id=' . $group_id; ?> " method="post"> <input type="checkbox" value="1" name="sure"> <?php echo _('Confirm Delete'); ?> <br /> <input type="checkbox" value="1" name="reallysure"> <?php echo _('Confirm Delete'); ?>
* (at your option) any later version. * * GForge is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GForge; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ require_once '../env.inc.php'; require_once $gfwww . 'include/pre.php'; require_once $gfwww . 'admin/admin_utils.php'; require_once $gfcommon . 'include/cron_utils.php'; site_admin_header(array('title' => _('Site admin'))); $which = getIntFromRequest('which'); if (!$which || $which == 100) { $which = 100; $sql_str = ''; } else { $sql_str = " WHERE job='{$which}' "; } ?> <form action="<?php echo getStringFromServer('PHP_SELF'); ?> " method="get"> <?php echo html_build_select_box_from_arrays(array_keys($cron_arr), $cron_arr, 'which', $which, true, 'Any'); ?>
<?php // // SourceForge: Breaking Down the Barriers to Open Source Development // Copyright 1999-2000 (c) The SourceForge Crew // http://sourceforge.net // // $Id: userlist.php,v 1.5 2005/02/16 12:16:19 helix Exp $ require "pre.php"; require $DOCUMENT_ROOT . '/admin/admin_utils.php'; session_require(array('group' => '1', 'admin_flags' => 'A')); site_admin_header(array('title' => "User List")); function show_users_list($result, $status, $search) { print "<br>Status: <b>"; if ($status == "") { print "All"; } else { print $status; } print "</b>\n"; print "<br>Users Beginning with: <b>"; if ($search == "") { print "All"; } else { print $search; } print "</b>\n"; echo '<p>Key: <b>Active</b> <i>Deleted</i>
if (!$user || !is_object($user)) { exit_error('Error', 'Could Not Get User'); } elseif ($user->isError()) { exit_error('Error', $u->getErrorMessage()); } $res = db_query("\n\t\t\tINSERT INTO prdb_dbs(group_id, dbname, dbusername, dbuserpass, requestdate, dbtype, created_by, state)\n\t\t\tVALUES ({$group_id},'{$dbname}','{$dbname}','xxx'," . time() . ",1," . $user->getID() . ",1)\n\t\t"); if (!$res || db_affected_rows($res) < 1) { $feedback .= _('Error Adding Database') . db_error(); } else { $feedback .= _('Group') . " <em>" . $group->getUnixName() . "</em>" . _('added already active database'); } } else { $feedback .= "<strong>" . _('Unable to insert already active database.') . "</strong>"; } } site_admin_header(array('title' => _('Site Admin: Groups\' DB Maintenance'))); $res_db = db_query("\n\tSELECT stateid,statename,COUNT(*) AS count\n\tFROM prdb_dbs,prdb_states\n\tWHERE stateid=state\n\tGROUP BY statename,stateid\n"); echo '<h3>' . _('Statistics for Project Databases') . '</h3>'; if (db_numrows($res_db) > 0) { $title = array(); $title[] = _('Type'); $title[] = _('Count'); echo $GLOBALS['HTML']->listTableTop($title); while ($row_db = db_fetch_array($res_db)) { print '<tr><td style="text-align:center"><a href="' . getStringFromServer('PHP_SELF') . '?displaydb=1&dbstate=' . $row_db['stateid'] . '">' . $row_db['statename'] . '</a></td><td style="text-align:center">' . $row_db['count'] . '</td></tr>'; } echo $GLOBALS['HTML']->listTableBottom(); } else { echo '<p>' . _('No databases defined') . '</p>'; } if ($displaydb) {
if (!$u->setEmail($email) || $sys_use_shell && !$u->setShell($shell) || !$u->setStatus($status)) { exit_error(_('Could Not Complete Operation'), $u->getErrorMessage()); } if ($u->getUnixStatus() != 'N') { $u->setUnixStatus($status); } else { // make sure that user doesn't have LDAP entry $u->setUnixStatus('N'); } if ($u->isError()) { $feedback .= $u->getErrorMessage(); } else { $feedback .= _('Updated') . '<br />'; } } site_admin_header(array('title' => _('Site Admin: User Info'))); ?> <h3><?php echo _('Account Information'); ?> <sup>1</sup></h3> <form method="post" action="<?php echo getStringFromServer('PHP_SELF'); ?> "> <input type="hidden" name="action" value="update_user" /> <input type="hidden" name="user_id" value="<?php print $user_id; ?> " />
db_query("UPDATE groups SET status='D'" . " WHERE group_id='{$group_id}'"); $em->processEvent('project_is_deleted', array('group_id' => $group_id)); if ($special_access) { $GLOBALS['Response']->redirect('/my/'); } else { $GLOBALS['Response']->redirect('/admin/'); } } } // get current information $res_grp = db_query("SELECT * FROM groups WHERE status='P' ORDER BY register_time"); if (db_numrows($res_grp) < 1) { site_admin_header(array('title' => $Language->getText('admin_approve_pending', 'no_pending'))); echo $Language->getText('admin_approve_pending', 'no_pending'); } else { site_admin_header(array('title' => $Language->getText('admin_approve_pending', 'title'))); $pm = ProjectManager::instance(); while ($row_grp = db_fetch_array($res_grp)) { ?> <fieldset> <legend style="font-size:1.3em; font-weight: bold;"><?php echo $row_grp['group_name']; ?> </legend> <?php $group = $pm->getProject($row_grp['group_id']); $currentproject = $pm->getProject($row_grp['group_id']); $members_id = $group->getMembersId(); if (count($members_id) > 0) { $admin_id = $members_id[0];
} if (trim($mail_subject) == '[' . $GLOBALS['sys_name'] . ']') { form_release_key(getStringFromRequest('form_key')); exit_error(_('Missing parameter, You must give proper subject to the mailing')); } $res = db_query("\n\t\tINSERT INTO massmail_queue(type,subject,message,queued_date)\n\t\tVALUES ('{$mail_type}','{$mail_subject}','{$mail_message}'," . time() . ")\n\t"); if (!$res || db_affected_rows($res) < 1) { form_release_key(getStringFromRequest('form_key')); exit_error(_('Error Scheduling Mailing, Could not schedule mailing, database error:') . db_error()); } site_admin_header(array('title' => _('Massmail admin'))); print "<p>" . _('Mailing successfully scheduled for delivery') . "</p>"; site_admin_footer(array()); exit; } site_admin_header(array('title' => _('Massmail admin'))); print ' <h4>' . sprintf(_('Mail Engine for %1$s Subscribers'), $GLOBALS['sys_name']) . '</h4> '; print ' <p> <a href="#active">' . _('Active Deliveries') . '</a> </p> <p>' . _('Be <span class="important">VERY</span> careful with this form, because submitting it WILL lead to sending email to lots of users.') . '</p> '; print ' <form action="' . getStringFromServer('PHP_SELF') . '" method="post">' . '<input type="hidden" name="form_key" value="' . form_generate_key() . '">' . '<strong>Target Audience:</strong>' . utils_requiredField() . '<br />' . html_build_select_box_from_arrays(array(0, 'SITE', 'COMMNTY', 'DVLPR', 'ADMIN', 'ALL', 'SFDVLPR'), array(_('(select)'), _('Subscribers to "Site Updates"'), _('Subscribers to "Additional Community Mailings"'), _('All Project Developers'), _('All Project Admins'), _('All Users'), $GLOBALS['sys_name'] . _('Developers (test)')), 'mail_type', false, false) . '<br />'; print ' <p>