本文整理汇总了PHP中exit_error函数的典型用法代码示例。如果您正苦于以下问题:PHP exit_error函数的具体用法?PHP exit_error怎么用?PHP exit_error使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了exit_error函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: validate_file_id
function validate_file_id(&$file_id)
{
if (!$file_id) {
exit_error("You must specify the ID of the file with the --file_id parameter");
}
return true;
}
示例2: validate_release_id
function validate_release_id(&$release_id)
{
if (!$release_id) {
exit_error("You must specify the ID of the release with the --release_id parameter");
}
return true;
}
示例3: survey_header
function survey_header($params)
{
global $group_id, $is_admin_page, $Language;
$params['toptab'] = 'survey';
$params['group'] = $group_id;
$pm = ProjectManager::instance();
$project = $pm->getProject($group_id);
if (!$project->usesSurvey()) {
exit_error($Language->getText('global', 'error'), $Language->getText('survey_s_utils', 's_off'));
}
site_project_header($params);
echo "<P><B>";
// Admin link is displayed only if the user is a project administrator
if (user_ismember($group_id, 'A')) {
echo "<A HREF=\"/survey/admin/?group_id={$group_id}\">" . $Language->getText('survey_s_utils', 'admin') . "</A>";
}
if ($is_admin_page && $group_id && user_ismember($group_id, 'A')) {
echo " | <A HREF=\"/survey/admin/add_survey.php?group_id={$group_id}\">" . $Language->getText('survey_admin_index', 'add_s') . "</A>";
echo " | <A HREF=\"/survey/admin/edit_survey.php?func=browse&group_id={$group_id}\">" . $Language->getText('survey_admin_browse_survey', 'edit_s') . "</A>";
echo " | <A HREF=\"/survey/admin/add_question.php?group_id={$group_id}\">" . $Language->getText('survey_admin_index', 'add_q') . "</A>";
echo " | <A HREF=\"/survey/admin/edit_question.php?func=browse&group_id={$group_id}\">" . $Language->getText('survey_admin_browse_question', 'edit_q') . "</A>";
echo " | <A HREF=\"/survey/admin/show_results.php?group_id={$group_id}\">" . $Language->getText('survey_s_utils', 'show_r') . "</A>";
}
if (isset($params['help'])) {
if (user_ismember($group_id, 'A')) {
echo ' | ';
}
echo help_button($params['help'], false, $Language->getText('global', 'help'));
}
echo "</B><P>";
}
示例4: validate_is_dependent_on_artifact_ids
function validate_is_dependent_on_artifact_ids(&$dependencies)
{
if (!$dependencies) {
exit_error("You must specify the dependency(ies) using the --dependencies parameter. (If there is several dependencies, separate the IDs with a comma)");
}
return true;
}
示例5: validate_package_name
function validate_package_name(&$package_name)
{
if (!$package_name) {
exit_error("You must specify the name of the package with the --name parameter");
}
return true;
}
示例6: patch_header
function patch_header($params)
{
global $group_id, $DOCUMENT_ROOT;
$params['toptab'] = 'patch';
$params['group'] = $group_id;
//only projects can use the bug tracker, and only if they have it turned on
$project = project_get_object($group_id);
if (!$project->isProject()) {
exit_error('Error', 'Only Projects Can Use The Patch Manager');
}
if (!$project->usesPatch()) {
exit_error('Error', 'This Project Has Turned Off The Patch Manager');
}
site_project_header($params);
echo '<P><B><A HREF="/patch/?func=addpatch&group_id=' . $group_id . '">Submit A Patch</A>';
if (user_isloggedin()) {
echo ' | <A HREF="/patch/?func=browse&group_id=' . $group_id . '&set=my">My Patches</A>';
}
echo ' | <A HREF="/patch/?func=browse&group_id=' . $group_id . '&set=open">Open Patches</A>';
if (user_isloggedin()) {
echo ' | <A HREF="/patch/reporting/?group_id=' . $group_id . '">Reporting</A>';
}
echo ' | <A HREF="/patch/admin/?group_id=' . $group_id . '">Admin</A>';
echo '</B>';
}
示例7: bug_header
function bug_header($params)
{
global $group_id, $is_bug_page, $DOCUMENT_ROOT;
//used so the search box will add the necessary element to the pop-up box
$is_bug_page = 1;
//required params for site_project_header();
$params['group'] = $group_id;
$params['toptab'] = 'bugs';
$project = project_get_object($group_id);
//only projects can use the bug tracker, and only if they have it turned on
if (!$project->isProject()) {
exit_error('Error', 'Only Projects Can Use The Bug Tracker');
}
if (!$project->usesBugs()) {
exit_error('Error', 'This Project Has Turned Off The Bug Tracker');
}
echo site_project_header($params);
echo '<P><B><A HREF="/bugs/?func=addbug&group_id=' . $group_id . '">Submit A Bug</A>
| <A HREF="/bugs/?func=browse&group_id=' . $group_id . '&set=open">Open Bugs</A>';
if (user_isloggedin()) {
echo ' | <A HREF="/bugs/?func=browse&group_id=' . $group_id . '&set=my">My Bugs</A>';
echo ' | <A HREF="/bugs/?func=modfilters&group_id=' . $group_id . '">Filters</A>';
echo ' | <A HREF="/bugs/reporting/?group_id=' . $group_id . '">Reporting</A>';
}
echo ' | <A HREF="/bugs/admin/?group_id=' . $group_id . '">Admin</A></B>';
}
示例8: scm_header
/**
* GForge SCM Library
*
* Copyright 2004 (c) GForge LLC
*
* @version $Id$
* @author Tim Perdue tim@gforge.org
* @date 2005-04-16
*
* This file is part of GForge.
*
* GForge is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* 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
*/
function scm_header($params)
{
global $HTML, $sys_use_scm;
if (!$sys_use_scm) {
exit_disabled();
}
$project =& group_get_object($params['group']);
if (!$project || !is_object($project)) {
exit_error('Error', 'Could Not Get Project');
} elseif ($project->isError()) {
exit_error('Error', $project->getErrorMessage());
}
if (!$project->usesSCM()) {
exit_error('Error', _('Error - This project has turned off SCM.'));
}
site_project_header(array('title' => _('SCM Repository'), 'group' => $params['group'], 'toptab' => 'scm'));
/*
Show horizontal links
*/
if (session_loggedin()) {
$perm =& $project->getPermission(session_get_user());
if ($perm && is_object($perm) && !$perm->isError() && $perm->isAdmin()) {
echo $HTML->subMenu(array(_('SCM'), _('Admin'), _('Reporting')), array('/scm/?group_id=' . $params['group'], '/scm/admin/?group_id=' . $params['group'], '/scm/reporting/?group_id=' . $params['group']));
}
}
echo '<div style="width:99%">';
}
示例9: soapResult
function soapResult($params, $soap_result, $fieldnames = array(), $loaded_params = array())
{
if (!$loaded_params['others']['quiet']) {
$this->show_output($soap_result);
}
$session_string = $soap_result->session_hash;
$user_id = $soap_result->user_id;
$GLOBALS['LOG']->add("Logged in as user " . $loaded_params['soap']['loginname'] . " (user_id=" . $user_id . "), using session string " . $session_string);
if (!$loaded_params['others']['quiet']) {
echo "Logged in.\n";
}
$GLOBALS['soap']->setSessionString($session_string);
$GLOBALS['soap']->setSessionUser($loaded_params['soap']['loginname']);
$GLOBALS['soap']->setSessionUserID($user_id);
// If project was specified, get project information and store for future use
if (isset($loaded_params['others']['projectname'])) {
$group_id = $this->get_group_id($loaded_params['others']['projectname']);
if (!$group_id) {
exit_error('Project "' . $loaded_params['others']['projectname'] . '" doesn\'t exist');
}
$GLOBALS['soap']->setSessionGroupID($group_id);
$GLOBALS['LOG']->add("Using group #" . $group_id);
}
$GLOBALS['soap']->saveSession();
}
示例10: feature_header
function feature_header($params)
{
global $group_id, $DOCUMENT_ROOT;
//required by new site_project_header
$params['group'] = $group_id;
$params['toptab'] = 'feature';
//only projects can use the bug tracker, and only if they have it turned on
$project = project_get_object($group_id);
if (!$project->isProject()) {
exit_error('Error', 'Only Projects Can Use The Feature Request Manager');
}
if (!$project->usesFeature()) {
exit_error('Error', 'This Project Has Turned Off The Feature Request Manager');
}
site_project_header($params);
echo '<P><B><A HREF="/feature/?func=addfeature&group_id=' . $group_id . '">Submit A Feature Request</A>';
if (user_isloggedin()) {
echo ' | <A HREF="/feature/?func=browse&group_id=' . $group_id . '&set=my">My Feature Requests</A>';
}
echo ' | <A HREF="/feature/?func=browse&group_id=' . $group_id . '&set=open">Open Feature Requests</A>';
if (user_isloggedin()) {
echo ' | <A HREF="/feature/reporting/?group_id=' . $group_id . '">Reporting</A>';
}
echo ' | <A HREF="/feature/admin/?group_id=' . $group_id . '">Admin</A>';
echo '</B><P>';
}
示例11: DB_maj_base
/**
* Mettre à jour la base de l'établissement
*
* @param string $version_base_structure_actuelle
* @return void
*/
public static function DB_maj_base($version_base_structure_actuelle)
{
// ////////////////////////////////////////////////////////////////////////////////////////////////////
// On s'arrête si c'est un pb de fichier non récupéré ou de base inaccessible
// ////////////////////////////////////////////////////////////////////////////////////////////////////
if( !VERSION_BASE_STRUCTURE || !$version_base_structure_actuelle )
{
exit_error( 'Erreur MAJ BDD' /*titre*/ , 'Fichier avec version de la base manquant, ou base inaccessible.' /*contenu*/ );
}
// ////////////////////////////////////////////////////////////////////////////////////////////////////
// Le fichier commençant à devenir volumineux, les mises à jour ont été archivées par années dans des fichiers séparés.
// Lors d'un changement d'année n -> n+1, la mise à jour s'effectue dans le fichier n+1 (les 2 sont en fait possible, mais cela évite d'oublier sa création).
// ////////////////////////////////////////////////////////////////////////////////////////////////////
$annee_version_actuelle = (int)substr($version_base_structure_actuelle,0,4);
$annee_version_derniere = (int)substr(VERSION_BASE_STRUCTURE,0,4);
for( $annee=$annee_version_actuelle ; $annee<=$annee_version_derniere ; $annee++ )
{
require(CHEMIN_DOSSIER_SQL.'requetes_structure_maj_base_'.$annee.'.inc.php');
}
}
示例12: save
public function save(ServiceProFTPd $service, HTTPRequest $request)
{
if ($this->userIsAdmin($request)) {
$this->saveForAdmin($request);
}
exit_error($GLOBALS['Language']->getText('global', 'error_perm_denied'), $GLOBALS['Language']->getText('plugin_proftpd', 'error_not_admin'));
}
示例13: validate_parent
function validate_parent(&$parent)
{
if (!$parent) {
exit_error("You must specify the ID of the dst folder with the --parent parameter");
}
return true;
}
示例14: validate_cc_list
function validate_cc_list(&$cc_list)
{
if (!$cc_list) {
exit_error("You must specify the CC list using the --cc_list parameter");
}
return true;
}
示例15: validate_dependent_on_artifact_id
function validate_dependent_on_artifact_id(&$dependency)
{
if (!$dependency) {
exit_error("You must specify the dependency to delete using the --dependency parameter.");
}
return true;
}