本文整理汇总了PHP中session_get_user_properties函数的典型用法代码示例。如果您正苦于以下问题:PHP session_get_user_properties函数的具体用法?PHP session_get_user_properties怎么用?PHP session_get_user_properties使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了session_get_user_properties函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: log_activity_log
function log_activity_log($page_name, $deletion, $creation, $upload, $action)
{
global $db;
$s_project_name = session_get_project_name();
$s_user_properties = session_get_user_properties();
$s_username = $s_user_properties['username'];
$s_session = session_get_ID();
$current_date = date("Y-m-d H:i:s");
$page_name = $page_name . " - " . $s_project_name;
$logs_tbl = LOGS_TBL;
$query = "\tINSERT INTO {$logs_tbl} ( User,\n \t\t\t\t\t\t\t\t\tPage,\n \t\t\t\t\t\t\t\t\tTimeStamp,\n \t\t\t\t\t\t\t\t\tSessionID,\n \t\t\t\t\t\t\t\t\tDeletion,\n \t\t\t\t\t\t\t\t\tCreation,\n \t\t\t\t\t\t\t\t\tUpload,\n \t\t\t\t\t\t\t\t\tAction )\n\n \t\t\tVALUES (\t'{$s_username}',\n \t\t\t\t\t\t'{$page_name}',\n \t\t\t\t\t\t'{$current_date}',\n \t\t\t\t\t\t'{$s_session}',\n \t\t\t\t\t\t'{$deletion}',\n \t\t\t\t\t\t'{$creation}',\n \t\t\t\t\t\t'{$upload}',\n \t\t\t\t\t\t'{$action}' )";
db_query($db, $query);
}
示例2: user_get_name_by_username
function user_get_name_by_username($username)
{
global $db;
$user_tbl = USER_TBL;
$f_email = USER_EMAIL;
$f_firstname = USER_FNAME;
$f_lastname = USER_LNAME;
$f_username = USER_UNAME;
$s_user_properties = session_get_user_properties();
$user_id = $s_user_properties['user_id'];
$query = "SELECT {$f_email}, {$f_firstname}, {$f_lastname}\n FROM {$user_tbl}\n WHERE {$f_username} = '{$username}'";
$rs =& db_query($db, $query);
$row = db_fetch_row($db, $rs);
return $row;
}
示例3: session_get_project_properties
$project_edit_page = 'project_edit_page.php';
$user_manage_page = 'user_manage_page.php';
$user_add_page = 'user_add_page.php';
$project_manage_action = 'project_manage_action.php';
$delete_page = 'delete_page.php';
$s_project_properties = session_get_project_properties();
$project_name = $s_project_properties['project_name'];
$project_id = $s_project_properties['project_id'];
$s_user_properties = session_get_user_properties();
$user_id = $s_user_properties['user_id'];
session_set_properties("project_manage", $_GET);
$selected_project_properties = session_get_properties("project_manage");
$selected_project_id = $selected_project_properties['project_id'];
$project_manager = user_has_rights($selected_project_id, $user_id, MANAGER);
$redirect_url = $page . "?project_id=" . $selected_project_id;
$s_user_properties = session_get_user_properties();
$user_id = $s_user_properties['user_id'];
$row_style = '';
$order_by = MAN_DOC_TYPE_NAME;
$order_dir = "ASC";
$page_number = 1;
util_set_order_by($order_by, $_GET);
util_set_order_dir($order_dir, $_GET);
util_set_page_number($page_number, $_GET);
util_set_order_by($order_by, $_POST);
util_set_order_dir($order_dir, $_POST);
util_set_page_number($page_number, $_POST);
html_window_title();
html_print_body();
html_page_title(project_get_name($selected_project_id) . " - " . lang_get('manage_project_page'));
html_page_header($db, $project_name);
示例4: html_print_menu
function html_print_menu()
{
$home_url = RTH_URL . "home_page.php";
$req_url = RTH_URL . "requirement_page.php";
$test_url = RTH_URL . "test_page.php";
$release_url = RTH_URL . "release_page.php";
$results_url = RTH_URL . "results_page.php";
$bug_url = BUGTRACKER_URL;
$reports_url = RTH_URL . "report_page.php";
$admin_url = RTH_URL . "admin_page.php";
$user_url = RTH_URL . "user_edit_my_account_page.php";
$help_url = RTH_URL . "help_index.php";
$logout_url = RTH_URL . "logout.php";
# set user url if user has admin rights
$s_user_properties = session_get_user_properties();
$user_id = $s_user_properties['user_id'];
$s_project_properties = session_get_project_properties();
$project_name = $s_project_properties['project_name'];
$project_id = $s_project_properties['project_id'];
if (user_has_rights($project_id, $user_id, ADMIN)) {
$user_url = RTH_URL . "user_manage_page.php";
}
# Get the session variables from the results page and append them on the query string if they are set
$s_results = session_get_display_options("results");
if (isset($s_results['release_id'])) {
$results_url = $results_url . "?release_id=" . $s_results['release_id'];
}
if (isset($s_results['build_id'])) {
$results_url = $results_url . "&build_id=" . $s_results['build_id'];
}
if (isset($s_results['testset_id'])) {
$results_url = $results_url . "&testset_id=" . $s_results['testset_id'];
}
if (isset($s_results['test_id'])) {
$results_url = "results_test_run_page.php?test_id=" . $s_results['test_id'] . "&testset_id=" . $s_results['testset_id'];
}
print "<table class=width100 cellspacing=0>" . NEWLINE;
print "<tr>" . NEWLINE;
print "<td class=menu>" . NEWLINE;
print "<a href='{$home_url}'>" . lang_get('home_link') . "</a> | " . NEWLINE;
print "<a href='{$req_url}'>" . lang_get('req_link') . "</a> | " . NEWLINE;
print "<a href='{$test_url}'>" . lang_get('test_link') . "</a> | " . NEWLINE;
print "<a href='{$release_url}'>" . lang_get('release_link') . "</a> | " . NEWLINE;
print "<a href='{$results_url}'>" . lang_get('results_link') . "</a> | " . NEWLINE;
print "<a href='{$bug_url}'";
if (BUGTRACKER != 'rth') {
print " target='new'";
}
print ">" . lang_get('bug_link') . "</a> | " . NEWLINE;
print "<a href='{$reports_url}'>" . lang_get('reports_link') . "</a> | " . NEWLINE;
print "<a href='{$admin_url}'>" . lang_get('admin_link') . "</a> | " . NEWLINE;
print "<a href='{$user_url}'>" . lang_get('user_link') . "</a> | " . NEWLINE;
print "<a href='{$help_url}' target=_blank>" . lang_get('help_link') . "</a> | " . NEWLINE;
print "<a href='{$logout_url}'>" . lang_get('logout_link') . "</a>" . NEWLINE;
print "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
print "</table>" . NEWLINE;
print "<br>" . NEWLINE;
}
示例5: test_change_last_update
function test_change_last_update($test_id)
{
global $db;
$test_tbl = TEST_TBL;
$f_test_id = TEST_ID;
$f_last_updated = TEST_LAST_UPDATED;
$f_last_updated_by = TEST_LAST_UPDATED_BY;
$last_updated_date = date_get_short_dt();
$s_user_properties = session_get_user_properties();
$s_user_name = $s_user_properties['username'];
$last_updated_by = $s_user_name;
$q = "UPDATE {$test_tbl}\n\t\t SET\n\t\t {$f_last_updated} = '{$last_updated_date}',\n\t\t {$f_last_updated_by} = '{$last_updated_by}'\n\t\t WHERE {$f_test_id} = '{$test_id}'";
db_query($db, $q);
}
示例6: error_format
function error_format($errno, $errstr, $errfile, $errline)
{
$dt = date("Y-m-d H:i:s (T)");
$user_details = session_get_user_properties();
$project_details = session_get_project_properties();
$user_name = $user_details['username'];
$project_name = $project_details['project_name'];
$error_type = error_type_map($errno);
$err = "{$error_type}" . NEWLINE;
$err .= "Time: " . $dt . "" . NEWLINE;
$err .= "Message: " . $errstr . "" . NEWLINE;
$err .= "File: " . $errfile . "" . NEWLINE;
$err .= "Line Number: " . $errline . "" . NEWLINE;
$err .= "User: " . $user_name . "" . NEWLINE;
$err .= "Project: " . $project_name . "" . NEWLINE;
$err .= "Server: " . $_SERVER['SERVER_NAME'] . "" . NEWLINE;
return $err;
}
示例7: file_add_supporting_test_doc_version
function file_add_supporting_test_doc_version($file_temp_name, $file_name, $test_id, $manual_test_id, $comments, $file_type)
{
global $db;
$project_properties = session_get_project_properties();
$file_upload_path = $project_properties['test_upload_path'];
$project_id = $project_properties['project_id'];
$redirect_page = "test_detail_page.php?test_id={$test_id}&project_id={$project_id}&tab=2";
$redirect_on_error = "test_add_doc_version_page.php?test_id={$test_id}&manual_test_id={$manual_test_id}";
$file_db_name = "";
# Check to make sure the file name is the same as the previous version
if (IGNORE_VERSION_FILENAME_VALIDATION || file_name_exists($test_id, $file_name)) {
# create a unique name for the file using the time function
$file_db_name = "SupportingTestDoc" . time() . "-{$file_name}";
# Get the current file version and increment it by one
$current_file_version = test_get_max_file_version($manual_test_id);
$file_version = util_increment_version($current_file_version);
# Make sure the temp file was uploaded successfully
if (move_uploaded_file($file_temp_name, $file_upload_path . $file_db_name)) {
$current_date = date("Y-m-d H:i:s");
$s_user = session_get_user_properties();
$username = $s_user['username'];
$td_vers_tbl = MAN_TD_VER_TBL;
$f_man_test_id = MAN_TD_VER_MANUAL_TEST_ID;
$f_file_name = MAN_TD_VER_FILENAME;
$f_timestamp = MAN_TD_VER_TIME_STAMP;
$f_version = MAN_TD_VER_VERSION;
$f_username = MAN_TD_VER_UPLOADED_BY;
$f_comments = MAN_TEST_DOCS_VERS_COMMENTS;
$f_file_type = MAN_TEST_DOCS_VERS_MANUAL_DOC_TYPE_NAME;
$q = "INSERT INTO {$td_vers_tbl} \n\t\t\t\t({$f_man_test_id}, {$f_file_name}, {$f_timestamp}, {$f_version}, {$f_username}, {$f_comments}, {$f_file_type}) \n\t\t\t\tVALUES ('{$manual_test_id}', '{$file_db_name}', '{$current_date}', '{$file_version}', '{$username}', '{$comments}', '{$file_type}')";
//print"$q<br>";
$db->Execute($q);
} else {
# The file wasn't uploaded to the temp directory successfully
error_report_show($redirect_page, FAILED_FILE_UPLOAD);
}
} else {
# The file name of the new version doesn't match the old
error_report_show($redirect_on_error, NO_MATCHING_FILE_NAME);
}
}
示例8: requirement_edit
function requirement_edit($project_id, $req_id, $req_version_id, $req_defect_id, $name, $area_covered, $type, $status, $detail, $reason_for_change, $functionality, $priority, $release_id)
{
global $db;
$tbl_req = REQ_TBL;
$f_req_proj_id = $tbl_req . "." . REQ_PROJECT_ID;
$f_req_id = $tbl_req . "." . REQ_ID;
$f_req_filename = $tbl_req . "." . REQ_FILENAME;
$f_req_area_covered = $tbl_req . "." . REQ_AREA_COVERED;
$f_req_type = $tbl_req . "." . REQ_TYPE;
$f_req_parent = $tbl_req . "." . REQ_PARENT;
$f_req_label = $tbl_req . "." . REQ_LABEL;
$f_req_unique_id = $tbl_req . "." . REQ_UNIQUE_ID;
$f_req_functionality = $tbl_req . "." . REQ_FUNCTIONALITY;
$f_req_locked_by = $tbl_req . "." . REQ_LOCKED_BY;
$f_req_locked_date = $tbl_req . "." . REQ_LOCKED_DATE;
$f_req_priority = $tbl_req . "." . REQ_PRIORITY;
$f_req_last_updated = $tbl_req . "." . REQ_LAST_UPDATED;
$tbl_req_ver = REQ_VERS_TBL;
$f_req_ver_uid = $tbl_req_ver . "." . REQ_VERS_UNIQUE_ID;
$f_req_ver_req_id = $tbl_req_ver . "." . REQ_VERS_REQ_ID;
$f_req_ver_version = $tbl_req_ver . "." . REQ_VERS_VERSION;
$f_req_ver_timestamp = $tbl_req_ver . "." . REQ_VERS_TIMESTAMP;
$f_req_ver_uploaded_by = $tbl_req_ver . "." . REQ_VERS_UPLOADED_BY;
$f_req_ver_filename = $tbl_req_ver . "." . REQ_VERS_FILENAME;
$f_req_ver_comments = $tbl_req_ver . "." . REQ_VERS_COMMENTS;
$f_req_ver_status = $tbl_req_ver . "." . REQ_VERS_STATUS;
$f_req_ver_shed_release = $tbl_req_ver . "." . REQ_VERS_SCHEDULED_RELEASE_IMP;
$f_req_ver_shed_build = $tbl_req_ver . "." . REQ_VERS_SCHEDULED_BUILD_IMP;
$f_req_ver_actual_release = $tbl_req_ver . "." . REQ_VERS_ACTUAL_RELEASE_IMP;
$f_req_ver_actual_build = $tbl_req_ver . "." . REQ_VERS_ACTUAL_BUILD_IMP;
$f_req_ver_detail = $tbl_req_ver . "." . REQ_VERS_DETAIL;
$f_req_ver_release = $tbl_req_ver . "." . REQ_VERS_ASSIGN_RELEASE;
$f_req_ver_reason_change = $tbl_req_ver . "." . REQ_VERS_REASON_CHANGE;
$f_req_ver_latest = $tbl_req_ver . "." . REQ_VERS_LATEST;
$f_req_ver_last_updated = $tbl_req_ver . "." . REQ_VERS_LAST_UPDATED;
$f_req_ver_last_updated_by = $tbl_req_ver . "." . REQ_VERS_LAST_UPDATED_BY;
$f_req_ver_defect_id = $tbl_req_ver . "." . REQ_VERS_DEFECT_ID;
$last_updated = date_get_short_dt();
$s_user_properties = session_get_user_properties();
$s_user_name = $s_user_properties['username'];
$last_updated_by = $s_user_name;
if ($area_covered == '') {
$area_covered = 0;
}
if ($type == '') {
$type = 0;
}
$q = "\tUPDATE {$tbl_req}\n\t\t\tSET\n\t\t\t\t{$f_req_filename} = '{$name}',\n\t\t\t\t{$f_req_area_covered} = '{$area_covered}',\n\t\t\t\t{$f_req_type} = '{$type}',\n\t\t\t\t{$f_req_priority} = '{$priority}',\n\t\t\t\t{$f_req_last_updated} = '{$last_updated}'\n\t\t\tWHERE\n\t\t\t\t{$f_req_id} = '{$req_id}'\n\t\t\t\tAND {$f_req_proj_id} = {$project_id}";
db_query($db, $q);
//print"$q<br>";
$q = "\tUPDATE {$tbl_req_ver}\n\t\t\tSET\n\t\t\t\t{$f_req_ver_status} \t\t\t= '{$status}',\n\t\t\t\t{$f_req_ver_detail} \t\t\t= '{$detail}',\n\t\t\t\t{$f_req_ver_reason_change}\t= '{$reason_for_change}',\n\t\t\t\t{$f_req_ver_last_updated}\t\t= '{$last_updated}',\n\t\t\t\t{$f_req_ver_last_updated_by}\t= '{$last_updated_by}',\n\t\t\t\t{$f_req_ver_defect_id}\t\t= '{$req_defect_id}'\n\t\t\tWHERE\n\t\t\t\t{$f_req_ver_uid} = '{$req_version_id}'";
db_query($db, $q);
//print"$q<br>";
requirement_edit_functionality($req_id, $functionality);
requirement_edit_release($req_version_id, $release_id);
}
示例9: bug_email_collect_recipients
function bug_email_collect_recipients($bug_id, $notify_type)
{
global $db;
$receive_own_email = BUG_EMAIL_ON_OWN_ACTIONS;
$recipients = "";
$recipient_ids = array();
$user_ids = array();
# Get the current project and user ids
$project_id = bug_get_field_value($bug_id, BUG_PROJECT_ID);
$s_user_properties = session_get_user_properties();
$user_id = $s_user_properties['user_id'];
$monitor_tbl = BUG_MONITOR_TBL;
$f_monitor_user_id = BUG_MONITOR_USER_ID;
$f_monitor_bug_id = BUG_MONITOR_BUG_ID;
$proj_user_tbl = PROJECT_USER_ASSOC_TBL;
$f_proj_user_id = PROJ_USER_USER_ID;
$f_proj_user_proj_id = PROJ_USER_PROJ_ID;
# Get user_ids for the bug
$q = "\tSELECT DISTINCT {$f_monitor_user_id}\n\t\t\tFROM {$monitor_tbl}\n\t\t\tWHERE {$f_monitor_bug_id} = {$bug_id}";
$rs = db_query($db, $q);
while ($row = db_fetch_row($db, $rs)) {
# check to see if we should add the user performing the action to the list of recipients
if ($row[BUG_MONITOR_USER_ID] == $user_id && !$receive_own_email) {
continue;
} else {
$user_ids[] = $row[BUG_MONITOR_USER_ID];
}
}
# Loop through each user_id and find out if the user wants to receive email for the action ($notify_type)
foreach ($user_ids as $id) {
switch ($notify_type) {
case "update_status":
$f_email_field = PROJ_USER_EMAIL_STATUS_BUG;
break;
case "add_bugnote":
$f_email_field = PROJ_USER_EMAIL_BUGNOTE_BUG;
break;
case "assign_bug":
$f_email_field = PROJ_USER_EMAIL_ASSIGNED_BUG;
break;
case "update_bug":
$f_email_field = PROJ_USER_EMAIL_UPDATE_BUG;
break;
}
# Find out if the user wants email for the specified action
$q_assoc = "SELECT {$f_email_field}\n\t\t\t\t\tFROM {$proj_user_tbl}\n\t\t\t\t\tWHERE {$f_proj_user_proj_id} = '{$project_id}'\n\t\t\t\t\tAND {$f_proj_user_id} = '{$id}'";
$rs_assoc = db_query($db, $q_assoc);
while ($row_assoc = db_fetch_row($db, $rs_assoc)) {
# If the project_user_assoc preference is Yes, add the user to the list of recipients
if ($row_assoc[$f_email_field] == 'Y') {
$recipient_ids[] = $id;
}
}
}
$recipients = user_get_email_by_user_id($recipient_ids);
return $recipients;
}
示例10: testset_add_tests_from_session
function testset_add_tests_from_session($testset_properties, $f_status, $property_set)
{
$checked_tests = array();
$project_id = session_get_project_id();
$s_user_properties = session_get_user_properties();
$s_project_properties = session_get_project_properties();
$testset_id = $testset_properties['testset_id'];
$testset_name = admin_get_testset_name($testset_id);
$build_id = $testset_properties['build_id'];
$build_name = admin_get_build_name($build_id);
$release_id = $testset_properties['release_id'];
$release_name = admin_get_release_name($release_id);
global $db;
$testsuite_tbl = TEST_TBL;
$f_test_id = TEST_TBL . "." . TEST_ID;
$f_project_id = TEST_TBL . "." . PROJECT_ID;
$f_deleted = TEST_TBL . "." . TEST_DELETED;
$f_archived = TEST_TBL . "." . TEST_ARCHIVED;
$ts_assoc_tbl = TEST_TS_ASSOC_TBL;
$f_ts_assoc_id = TEST_TS_ASSOC_TBL . "." . TEST_TS_ASSOC_ID;
$f_ts_assoc_test_id = TEST_TS_ASSOC_TBL . "." . TEST_TS_ASSOC_TEST_ID;
$q = "SELECT {$f_test_id},\n\t\t\t{$f_ts_assoc_id},\n\t\t\t{$f_status}\n\t FROM {$ts_assoc_tbl}\n\t RIGHT JOIN {$testsuite_tbl} ON {$f_ts_assoc_test_id} = {$f_test_id}\n\t WHERE {$f_project_id} = {$project_id}\n\t AND {$f_archived} = 'N'\n\t AND {$f_deleted} = 'N'\n\t GROUP BY {$f_test_id}";
$rs = db_query($db, $q);
while ($row = db_fetch_row($db, $rs)) {
if (isset($row[$f_status])) {
# If the checkbox is ticked, then form an association between Test/TestSet
if (session_records_ischecked($property_set, $row[TEST_ID], $row[$f_status])) {
$checked_tests[$row[TEST_ID]] = "on";
}
}
}
testset_edit($testset_id, $checked_tests);
}