本文整理汇总了PHP中error_report_show函数的典型用法代码示例。如果您正苦于以下问题:PHP error_report_show函数的具体用法?PHP error_report_show怎么用?PHP error_report_show使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了error_report_show函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ldap_authenticate
function ldap_authenticate($user_id, $password)
{
$ldap_server = LDAP_SERVER;
$ldap_port = LDAP_PORT;
$ldap_id = LDAP_ID;
$ldap_pwd = LDAP_PWD;
$ldap_root_dn = LDAP_DN;
$ldap_proto = LDAP_PROTOCOL;
//$ldap_user = '(&(lmaccessstatusid=active)(uid=' . $user_id . '))';
$ldap_user = '(uid=' . $user_id . ')';
$ldapconn = ldap_connect($ldap_server, $ldap_port);
if (!$ldapconn) {
error_report_show("login.php", LDAP_CONNECTION_FAILED);
}
if (!ldap_set_option($ldapconn, LDAP_OPT_PROTOCOL_VERSION, $ldap_proto)) {
error_report_show("login.php", LDAP_CONNECTION_FAILED);
}
$ldapbind = ldap_bind($ldapconn, $ldap_id, $ldap_pwd);
if (!$ldapbind) {
error_report_show("login.php", INVALID_LOGIN);
}
$ldapsearch = ldap_search($ldapconn, $ldap_root_dn, $ldap_user);
$ldapentries = ldap_get_entries($ldapconn, $ldapsearch);
$authenticated = false;
if ($ldapentries) {
# Try to authenticate to each until we get a match
for ($i = 0; $i < $ldapentries['count']; $i++) {
$dn = $ldapentries[$i]['dn'];
# Attempt to bind with the DN and password
if (@ldap_bind($ldapconn, $dn, $password)) {
$authenticated = true;
break;
}
}
}
ldap_close($ldapconn);
ldap_free_result($ldapsearch);
return $authenticated;
}
示例2: Copyright
<?php
# ---------------------------------------------------------------------
# rth is a requirement, test, and bugtracking system
# Copyright (C) 2005 George Holbrook - rth@lists.sourceforge.net
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
#----------------------------------------------------------------------
# ------------------------------------
# Project Add Area Tested Action
#
# $RCSfile: project_add_area_action.php,v $ $Revision: 1.1.1.1 $
# ------------------------------------
include "./api/include_api.php";
auth_authenticate_user();
$project_id = session_get_project_id();
$redirect_page = 'project_manage_testareatested_page.php';
$proj_properties = session_get_properties("project_manage");
session_validate_form_set($_POST, $redirect_page);
if (project_test_area_exists($proj_properties['project_id'], session_validate_form_get_field('area_tested_required'))) {
error_report_show($redirect_page, DUPLICATE_TESTAREA);
}
project_add_area($proj_properties['project_id'], session_validate_form_get_field('area_tested_required'));
session_validate_form_reset();
html_print_operation_successful("add_area_tested_page", $redirect_page);
# ------------------------------------
# $Log: project_add_area_action.php,v $
# Revision 1.1.1.1 2005/11/30 23:00:57 gth2
# importing initial version - gth
#
# ------------------------------------
示例3: foreach
$ids = "";
$version_ids = "";
# if submit from test_page.php
if (isset($_POST['mass_req_update']) && isset($_POST['row_req_arr'])) {
$field = $_POST['action'];
$post_ids = $_POST['row_req_arr'];
//print_r($ids);
foreach ($post_ids as $req_id => $value) {
$version_array = $_POST['row_req_arr'][$req_id];
foreach ($version_array as $vers_id => $vers_val) {
$version_ids .= $vers_id . "|";
}
$ids .= $req_id . "|";
}
} else {
error_report_show($redirect_on_error, NO_REQ_SELECTED);
}
# Trim off last "|"
$version_ids = trim($version_ids, "|");
$ids = trim($ids, "|");
switch ($field) {
case 'status':
$form_title = lang_get('update_req_status');
$possible_values = requirement_get_statuses();
break;
case 'assigned_release':
$form_title = lang_get('update_req_release');
$possible_values = admin_get_all_release_names($project_id, $blank = true);
break;
}
print "<br>" . NEWLINE;
示例4: Copyright
<?php
# ---------------------------------------------------------------------
# rth is a requirement, test, and bugtracking system
# Copyright (C) 2005 George Holbrook - rth@lists.sourceforge.net
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
#----------------------------------------------------------------------
# ------------------------------------
# Project Add Req Doc Type Action
#
# $RCSfile: project_add_reqfunctionality_action.php,v $ $Revision: 1.1.1.1 $
# ------------------------------------
include "./api/include_api.php";
auth_authenticate_user();
$project_id = session_get_project_id();
$redirect_page = 'project_manage_reqfunctionality_page.php';
$proj_properties = session_get_properties("project_manage");
session_validate_form_set($_POST, $redirect_page);
if (project_reqfunctionality_exists($proj_properties['project_id'], session_validate_form_get_field('req_functionality_required'))) {
error_report_show($redirect_page, DUPLICATE_REQUIREMENT_FUNCTIONALITY);
}
project_add_req_functionality($proj_properties['project_id'], session_validate_form_get_field('req_functionality_required'));
session_validate_form_reset();
html_print_operation_successful("add_req_functionality_page", $redirect_page);
# ------------------------------------
# $Log: project_add_reqfunctionality_action.php,v $
# Revision 1.1.1.1 2005/11/30 23:00:57 gth2
# importing initial version - gth
#
# ------------------------------------
示例5: Copyright
# rth is a requirement, test, and bugtracking system
# Copyright (C) 2005 George Holbrook - rth@lists.sourceforge.net
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
#----------------------------------------------------------------------
# ------------------------------------
# Project Add Users Action
#
# $RCSfile: project_add_machine_action.php,v $ $Revision: 1.1.1.1 $
# ------------------------------------
include "./api/include_api.php";
auth_authenticate_user();
$project_id = session_get_project_id();
$redirect_page = 'project_manage_testmachines_page.php';
$proj_properties = session_get_properties("project_manage");
session_validate_form_set($_POST, $redirect_page);
if (project_machine_exists($proj_properties['project_id'], session_validate_form_get_field('machine_name_required'))) {
error_report_show($redirect_page, DUPLICATE_MACHINE_NAME);
}
if (project_ip_address_exists($proj_properties['project_id'], session_validate_form_get_field('machine_ip_required'))) {
error_report_show($redirect_page, DUPLICATE_IP_ADDRESS);
}
project_add_machine($proj_properties['project_id'], session_validate_form_get_field('machine_name_required'), session_validate_form_get_field('machine_location_required'), session_validate_form_get_field('machine_ip_required'));
session_validate_form_reset();
html_print_operation_successful("add_machine_page", $redirect_page);
# ------------------------------------
# $Log: project_add_machine_action.php,v $
# Revision 1.1.1.1 2005/11/30 23:00:57 gth2
# importing initial version - gth
#
# ------------------------------------
示例6: session_validate_form_get_field
$project_name = session_validate_form_get_field('project_name_required');
$project_folder_name = str_replace(" ", "", $project_name);
$project_description = session_validate_form_get_field('project_description');
$req_docs = FILE_UPLOAD_PATH . $project_folder_name . "_req_docs/";
$test_docs = FILE_UPLOAD_PATH . $project_folder_name . "_test_docs/";
$test_run_docs = FILE_UPLOAD_PATH . $project_folder_name . "_test_run_docs/";
$test_plan_docs = FILE_UPLOAD_PATH . $project_folder_name . "_test_plan_docs/";
$defect_docs = FILE_UPLOAD_PATH . $project_folder_name . "_defect_docs/";
# check username unique
if (!is_null(project_get_id($project_name))) {
error_report_show($add_page, PROJECT_NOT_UNIQUE);
}
if (mkdir($req_docs, 0700) && mkdir($test_docs, 0700) && mkdir($test_run_docs, 0700) && mkdir($test_plan_docs, 0700) && mkdir($defect_docs, 0700)) {
project_add($project_name, $project_description, $_POST['project_status'], isset($_POST['show_custom_1']) ? "Y" : "N", isset($_POST['show_custom_2']) ? "Y" : "N", isset($_POST['show_custom_3']) ? "Y" : "N", isset($_POST['show_custom_4']) ? "Y" : "N", isset($_POST['show_custom_5']) ? "Y" : "N", isset($_POST['show_custom_6']) ? "Y" : "N", isset($_POST['show_window']) ? "Y" : "N", isset($_POST['show_object']) ? "Y" : "N", isset($_POST['show_memory_stats']) ? "Y" : "N", isset($_POST['show_priority']) ? "Y" : "N", isset($_POST['show_test_input']) ? "Y" : "N", $req_docs, $test_docs, $test_run_docs, $test_plan_docs, $defect_docs);
} else {
error_report_show($add_page, UNABLE_TO_CREATE_PROJECT_FOLDERS);
}
// add new project to user settings
array_push($_SESSION['s_user_projects'], $project_name);
session_validate_form_reset();
html_print_operation_successful("project_add_page", $redirect_page);
# ------------------------------------
# $Log: project_add_action.php,v $
# Revision 1.5 2007/02/02 03:26:42 gth2
# make new project appear in the project list box when
# a new project is added - gth
#
# Revision 1.4 2006/12/05 04:57:21 gth2
# Allow users to rename project - gth
#
# Revision 1.3 2006/10/05 02:42:19 gth2
示例7: auth_login
function auth_login($username)
{
# check users project rights
$auth_return_code = auth_verify_user_settings($username);
if ($auth_return_code == NO_DEFAULT_PROJ || $auth_return_code == NO_USER_RIGHTS) {
error_report_show("login.php", $auth_return_code);
exit;
}
session_initialize();
session_setLogged_in(TRUE);
session_set_application_details(user_get_default_project_name($username), $username);
}
示例8: test_import_excel
function test_import_excel($test_id, $name)
{
global $db;
$ts_tbl = TEST_STEP_TBL;
$f_ts_id = TEST_STEP_ID;
$f_ts_test_id = TEST_STEP_TEST_ID;
$f_ts_step_no = TEST_STEP_NO;
$f_ts_action = TEST_STEP_ACTION;
$f_ts_input = TEST_STEP_TEST_INPUTS;
$f_ts_expected = TEST_STEP_EXPECTED;
$f_info_step = TEST_STEP_INFO_STEP;
$s_project_properties = session_get_project_properties();
$project_name = $s_project_properties['project_name'];
$redirect_on_error = "test_step_import_csv_page.php?test_id={$test_id}";
$uploaded_file = $_FILES[$name];
$file_name = $_FILES[$name]['name'];
$file_temp_name = $_FILES[$name]['tmp_name'];
$file_size = $_FILES[$name]['size'];
/*
print"file_name = $file_name<br>";
print"file_temp_name = $uploaded_file[tmp_name]<br>";
print"file_size = $uploaded_file[size]<br>";
*/
if ($file_size != '0' && is_uploaded_file($file_temp_name)) {
require_once './Excel/reader.php';
// ExcelFile($filename, $encoding);
$data = new Spreadsheet_Excel_Reader();
// Set output Encoding.
$data->setOutputEncoding('CP1251');
/***
* if you want you can change 'iconv' to mb_convert_encoding:
* $data->setUTFEncoder('mb');
*
**/
/***
* By default rows & cols indeces start with 1
* For change initial index use:
* $data->setRowColOffset(0);
*
**/
/***
* Some function for formatting output.
* $data->setDefaultFormat('%.2f');
* setDefaultFormat - set format for columns with unknown formatting
*
* $data->setColumnFormat(4, '%.3f');
* setColumnFormat - set format for column (apply only to number fields)
*
**/
$data->read($uploaded_file['tmp_name']);
//error_reporting(E_ALL ^ E_NOTICE);
$debug = false;
if (!$debug) {
$q = "DELETE FROM {$ts_tbl} WHERE {$f_ts_test_id} = '{$test_id}'";
db_query($db, $q);
}
for ($i = 1; $i <= $data->sheets[0]['numRows']; $i++) {
$step_no = '';
$action = '';
$test_input = '';
$expected = '';
$info = '';
//for ($j = 1; $j <= $data->sheets[0]['numCols']; $j++) {
//echo "\"".$data->sheets[0]['cells'][$i][1]."\",";
/*
print"i = $i<br>";
print"j = $j<br>";
*/
# Get record from CSV file
$step_no = @util_html_special_chars_string($data->sheets[0]['cells'][$i][1]);
$action = @util_html_special_chars_string($data->sheets[0]['cells'][$i][2]);
$test_input = @util_html_special_chars_string($data->sheets[0]['cells'][$i][3]);
$expected = @util_html_special_chars_string($data->sheets[0]['cells'][$i][4]);
$info = @util_html_special_chars_string($data->sheets[0]['cells'][$i][5]);
# We don't need to insert the column headers
if ($i > 1) {
# Insert into the Test Set table
$q = "\tINSERT INTO {$ts_tbl}\n\t\t\t\t\t\t( {$f_ts_test_id}, {$f_ts_step_no}, {$f_ts_action}, {$f_ts_input}, {$f_ts_expected}, {$f_info_step} )\n\t\t\t\t\tVALUES\n\t\t\t\t\t\t( '{$test_id}', '{$step_no}', '{$action}', '{$test_input}', '{$expected}', '{$info}' )";
if ($debug) {
print "{$q};<br>";
} else {
db_query($db, $q);
}
}
}
# Create a version of the file in Test Doc Version table if the upload was successful
if (file_name_exists($test_id, $file_name)) {
# Get the manual_test_id from the Manual Test Doc table and add a new file version
$manual_test_id = test_get_manual_test_id($test_id, $file_name);
file_add_supporting_test_doc_version($file_temp_name, $file_name, $test_id, $manual_test_id, $comments = "", $file_type = "");
} else {
# Add a new file
file_add_supporting_test_doc($file_temp_name, $file_name, $test_id, $comments = "", $file_type = "");
}
} else {
# The user tried to upload and empty file
error_report_show($redirect_on_error, NO_FILE_SPECIFIED);
}
}
示例9: html_window_title
$testset_id = $s_properties['testset_id'];
html_window_title();
html_print_body();
html_page_title($project_name . " - " . lang_get('results_mass_update_page'));
html_page_header($db, $project_name);
html_print_menu();
html_test_results_menu($db, $page, $project_id, $s_properties);
$ids = "" . NEWLINE;
# if submit from test_page.php
if (isset($_POST['mass_update']) && isset($_POST['row_results_arr'])) {
$field = $_POST['action'];
foreach ($_POST['row_results_arr'] as $key => $value) {
$ids .= $key . ":";
}
} else {
error_report_show("results_page.php", NO_TESTS_SELECTED);
}
print "<br>" . NEWLINE;
print "<form method=post action={$action_page}>" . NEWLINE;
print "<div align=center>" . NEWLINE;
print "<table class=width50>" . NEWLINE;
print "<tr>" . NEWLINE;
print "<td>" . NEWLINE;
print "<table class=inner rules=none border=0>" . NEWLINE;
print "<tr>" . NEWLINE;
print "<td class=form-header-l colspan=2>" . lang_get('update_test_result') . "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
util_add_spacer();
print "<tr>" . NEWLINE;
print "<td class=form-lbl-r>" . lang_get('test_comments') . "</td>" . NEWLINE;
print "<td class=left>" . NEWLINE;
示例10: session_getLogged_in
$logged_in = session_getLogged_in();
$username = $_POST['uname'];
$switch_project = $_POST['login']['switch_project'];
$redirect_page = $_POST['login']['page'];
$redirect_page_get = $_POST['login']['get'];
# If user not logged in, then redirect back to the page they tried to login from
# auth_authenticate_user() will display the login forms
if (!$logged_in) {
html_redirect($redirect_page . "?" . $redirect_page_get);
}
# Check that $switch_project is not blank and that the user has access rights to the project.
# Doing this to check access rights when loggin in from urls that contain the $_GET[project_id] variable.
if (!empty($switch_project) && user_has_rights(project_get_id($switch_project), user_get_id($username), USER)) {
$new_project_name = $switch_project;
} else {
error_report_show('login.php', PROJECT_SWITCH_FAILED);
}
session_set_new_project_name($new_project_name);
session_reset_project();
session_initialize();
session_setLogged_in(TRUE);
session_set_application_details($new_project_name, session_get_username());
if (isset($_POST['javascript_disabled'])) {
session_set_javascript_enabled(false);
} else {
session_set_javascript_enabled(true);
}
# redirect to the appropriate page
if (!empty($redirect_page)) {
html_redirect($redirect_page . "?" . $redirect_page_get);
} else {
示例11: file_add_bug_file
function file_add_bug_file($upload_file_temp_name, $upload_file_name, $bug_id, $redirect_page)
{
global $db;
$bug_file_tbl = BUG_FILE_TBL;
$f_bug_id = BUG_FILE_TBL . "." . BUG_FILE_BUG_ID;
$f_uploaded_by = BUG_FILE_TBL . "." . BUG_FILE_UPLOAD_DATE;
$f_uploaded_date = BUG_FILE_TBL . "." . BUG_FILE_UPLOAD_BY;
$f_display_name = BUG_FILE_TBL . "." . BUG_FILE_DISPLAY_NAME;
$f_file_name = BUG_FILE_TBL . "." . BUG_FILE_NAME;
$uploaded_by = session_get_username();
$current_date = date("Y-m-d H:i:s");
$project_properties = session_get_project_properties();
$file_upload_dir = $project_properties['defect_upload_path'];
# create a unique name for the file using the time function
$file_db_name = "BugFile" . time() . "-{$upload_file_name}";
# Throw error if user didn't enter a file name
if (!isset($upload_file_temp_name) || !is_uploaded_file($upload_file_temp_name)) {
error_report_show($redirect_page, REQUIRED_FIELD_MISSING);
}
# Insert a record into the bugfile table if the file upload was successful
if (move_uploaded_file($upload_file_temp_name, $file_upload_dir . $file_db_name)) {
$q = "INSERT INTO {$bug_file_tbl}\n\t\t\t\t( {$f_bug_id}, {$f_uploaded_by}, {$f_uploaded_date}, {$f_display_name}, {$f_file_name})\n\t\t\t VALUES\n\t\t\t\t('{$bug_id}', '{$uploaded_by}', '{$current_date}', '{$upload_file_name}', '{$file_db_name}')";
//print"$q<br>";
db_query($db, $q);
}
}
示例12: user_get_info_by_email
# if reset password was successful, send out email with new password details
if ($email) {
$user_details = user_get_info_by_email($email);
$username = $user_details[USER_UNAME];
$url = RTH_URL . "login.php";
$subject = "RTH: Password has been Reset";
$message = "Your RTH password has been reset." . NEWLINE . NEWLINE;
$message .= "Username: {$username}" . NEWLINE;
$message .= "Password: {$new_password}" . NEWLINE . NEWLINE;
$message .= "You may change your password by clicking '" . lang_get('user_link') . "' on the RTH menu." . NEWLINE . NEWLINE;
$message .= "Click the following link to login to RTH:" . NEWLINE;
$message .= "{$url}";
email_send($recipients = array($email), $subject, $message, $headers = "RTH_Admin");
print lang_get("reset_password");
} else {
error_report_show("login.php", ERROR_CANNOT_RESET_PASSWORD);
}
}
print "</div>";
print "<br>";
//auth_authenticate_user();
html_print_footer();
# ------------------------------
# $Log: login_reset_password_action.php,v $
# Revision 1.8 2008/02/05 13:14:48 cryobean
# bugfixes
#
# Revision 1.7 2006/12/05 05:29:20 gth2
# updates for 1.6.1 release
#
# Revision 1.6 2006/10/11 02:40:24 gth2
示例13: Copyright
<?php
# ---------------------------------------------------------------------
# rth is a requirement, test, and bugtracking system
# Copyright (C) 2005 George Holbrook - rth@lists.sourceforge.net
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
#----------------------------------------------------------------------
# ------------------------------------
# Test if Cookies are enabled
#
# $RCSfile: login_cookie_test.php,v $ $Revision: 1.1.1.1 $
# ------------------------------------
include "./api/include_api.php";
$login_cookie_username = util_get_cookie(USER_COOKIE_NAME, '');
$login_cookie_pwd = util_get_cookie(PWD_COOKIE_NAME, '');
if (empty($login_cookie_username) || empty($login_cookie_pwd)) {
error_report_show("login.php", COOKIES_NOT_ENABLED);
exit;
}
html_redirect("main.php");
# ------------------------------
# $Log: login_cookie_test.php,v $
# Revision 1.1.1.1 2005/11/30 23:00:57 gth2
# importing initial version - gth
#
# ------------------------------
示例14: session_validate_form_get_field
$detail = session_validate_form_get_field('req_detail_required', "", session_use_FCKeditor());
}
$req_reason_for_change = session_validate_form_get_field("req_reason_change");
$project_id = $_POST['project_id'];
$req_name = session_validate_form_get_field('req_name_required');
$req_area = session_validate_form_get_field('req_area_covered');
$req_type = session_validate_form_get_field('req_type');
$req_rec_or_file = $_POST['req_record_or_file'];
$req_version = session_validate_form_get_field('req_version');
$req_status = session_validate_form_get_field('req_status');
$req_priority = session_validate_form_get_field('req_priority');
$req_assigned_to = session_validate_form_get_field('req_assigned_to');
$req_assign_release = session_validate_form_get_field('req_assign_release');
$req_author = session_validate_form_get_field('req_author');
$req_functionality = session_validate_form_get_field('req_functionality');
//$req_untestable = session_validate_form_get_field('chk_untestable');
if (requirement_name_exists($project_id, $req_name)) {
error_report_show($add_req_page, DUPLICATE_REQ_NAME);
}
requirement_add($project_id, $req_name, $req_area, $req_type, $req_rec_or_file, $req_version, $req_status, $req_priority, $uploaded_filename, $detail, $req_reason_for_change, $req_assigned_to, $req_assign_release, $req_author, $req_functionality, $parent_req);
session_validate_form_reset();
html_print_operation_successful('req_add_page', "requirement_page.php");
# ------------------------------------
# $Log: requirement_add_action.php,v $
# Revision 1.2 2006/01/09 02:02:14 gth2
# fixing some defects found while writing help file
#
# Revision 1.1.1.1 2005/11/30 23:00:57 gth2
# importing initial version - gth
#
# ------------------------------------
示例15: session_validate_form_get_field
$duration = session_validate_form_get_field('test_duration');
$email_ba = session_validate_form_get_field('chk_email_ba_owner');
$email_qa = session_validate_form_get_field('chk_email_qa_owner');
$autopass = session_validate_form_get_field('chk_autopass');
//$steps = session_validate_form_get_field('chk_steps');
//$auto = session_validate_form_get_field('chk_auto');
//is not needed from now on, because of new field "chk_automanu",which validates if step XOR auto is set to YES
$performance = session_validate_form_get_field('chk_performance');
$automanu = session_validate_form_get_field('chk_automanu');
$steps = '';
$auto = '';
if (!util_date_isvalid($dateassigned) || !util_date_isvalid($dateexpcomplete) || !util_date_isvalid($dateactcomplete) || !util_date_isvalid($datebasignoff)) {
error_report_show("test_add_page.php", INVALID_DATE);
}
if (test_name_exists($project_id, $testname)) {
error_report_show("test_add_page.php", DUPLICATE_TESTNAME);
}
// Set default values for email_qa_owner and email_ba_owner
if ($email_ba == '') {
$email_ba = 'N';
}
if ($email_qa == '') {
$email_qa = 'N';
}
// set value of $steps XOR $auto to YES
if ($automanu == 'man') {
$steps = 'YES';
} else {
if ($automanu == 'auto') {
$auto = 'YES';
}