isError()) { $error_msg .= $group->getErrorMessage(); return false; } if ($group->approve(session_get_user())) { $feedback .= sprintf(_('Approving Project: %1$s'), $group->getUnixName()).'
'; } else { $error_msg .= sprintf(_('Error when approving Project: %1$s'), $group->getUnixName()).'
'; $error_msg .= $group->getErrorMessage(); return false; } return true; } $action = getStringFromRequest('action'); if ($action == 'activate') { $group_id = getIntFromRequest('group_id'); $list_of_groups = getStringFromRequest('list_of_groups'); $groups = explode(',', $list_of_groups); array_walk($groups, 'activate_group'); } else if ($action == 'delete') { $group_id = getIntFromRequest('group_id'); $response_id = getIntFromRequest('response_id'); $add_to_can = getStringFromRequest('add_to_can'); $response_text = getStringFromRequest('response_text'); $response_title = getStringFromRequest('response_title'); $group = group_get_object($group_id); if (!$group || !is_object($group)) { exit_no_group(); } elseif ($group->isError()) { exit_error($group->getErrorMessage(), 'admin'); } if (!$group->setStatus(session_get_user(), 'D')) { exit_error(_('Error during group rejection: ').$this->getErrorMessage(), 'admin'); } $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')), 'approve_projects'); // get current information $res_grp = db_query_params("SELECT * FROM groups WHERE status='P' AND is_template!=1", array(), $LIMIT); $rows = db_numrows($res_grp); if ($rows < 1) { print '

'._('No Pending Projects to Approve').'

'; site_admin_footer(array()); exit; } if ($rows > $LIMIT) { print '

'. _('Pending projects:'). " $LIMIT+ ($LIMIT shown)

"; } else { print '

'. _('Pending projects:'). " $rows

"; } while ($row_grp = db_fetch_array($res_grp)) { ?>

'. $row_grp['group_name'] . ''; ?>







" ._('Other Information')."

"; print ""; print ""; print ""; if ($row_grp['license']=="other") { print ""; } if (isset($row_grp['status_comment'])) { print ""; } $submitter = NULL ; $project = group_get_object ($row_grp['group_id']) ; foreach (get_group_join_requests ($project) as $gjr) { $submitter = user_get_object($gjr->getUserID()) ; echo ''; } if ($row_grp['built_from_template']) { $templateproject = group_get_object ($row_grp['built_from_template']) ; print ""; } echo "
"; print $row_grp['unix_box']; ?>
"; print $row_grp['http_domain']; ?>
" ._('Unix Project Name:'). "".$row_grp['unix_group_name']."
" ._('Submitted Description:'). "
".$row_grp['short_description']."
" ._('Purpose of submission:'). "
".$row_grp['register_purpose']."
" ._('License Other:'). "
".$row_grp['license_other']."
" ._('Pending reason:'). "".$row_grp['status_comment']."
' ._('Submitted by') .''. make_user_link($submitter->getUnixName(),$submitter->getRealName()) .'
" . _('Based on template project') . ''. $templateproject->getPublicName() .' ('. $templateproject->getUnixName().")

"; } //list of group_id's of pending projects $arr = util_result_column_to_array($res_grp, 0); $group_list = implode($arr, ','); echo '

'; site_admin_footer(array()); // Local Variables: // mode: php // c-file-style: "bsd" // End: ?>