本文整理汇总了PHP中orsee_db_load_array函数的典型用法代码示例。如果您正苦于以下问题:PHP orsee_db_load_array函数的具体用法?PHP orsee_db_load_array怎么用?PHP orsee_db_load_array使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了orsee_db_load_array函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: check_allow
if (isset($status_id)) {
$allow = check_allow('participantstatus_edit', 'participant_status_main.php');
} else {
$allow = check_allow('participantstatus_add', 'participant_status_main.php');
}
}
if ($proceed) {
if (isset($status_id) && $status_id == 0) {
$not_unconfirmed = false;
} else {
$not_unconfirmed = true;
}
// load languages
$languages = get_languages();
if (isset($status_id)) {
$status = orsee_db_load_array("participant_statuses", $status_id, "status_id");
if (!isset($status['status_id'])) {
redirect('admin/participant_status_main.php');
}
if ($proceed) {
$pars = array(':status_id' => $status_id);
$query = "SELECT * from " . table('lang') . " WHERE content_type='participant_status_name' AND content_name= :status_id";
$status_name = orsee_query($query, $pars);
$query = "SELECT * from " . table('lang') . " WHERE content_type='participant_status_error' AND content_name= :status_id";
$status_error = orsee_query($query, $pars);
}
} else {
$status = array('is_default_active' => 'n', 'is_default_inactive' => 'n', 'access_to_profile' => 'n', 'eligible_for_experiments' => 'n');
$status_name = array();
$status_error = array();
}
开发者ID:kfarr2,项目名称:psu-orsee,代码行数:31,代码来源:participant_status_edit.php
示例2: check_allow
if (isset($_REQUEST['job_name'])) {
$job_name = $_REQUEST['job_name'];
} else {
$job_name = "";
}
if ($job_name) {
$allow = check_allow('regular_tasks_edit', 'cronjob_main.php');
} else {
$allow = check_allow('regular_tasks_add', 'cronjob_main.php');
}
}
if ($proceed) {
// load languages
$languages = get_languages();
if ($job_name) {
$job = orsee_db_load_array("cron_jobs", $job_name, "job_name");
} else {
$job = array('job_name' => '', 'enabled' => 'n', 'job_last_exec' => 0, 'job_time' => '');
}
$continue = true;
if (isset($_REQUEST['edit']) && $_REQUEST['edit']) {
if (!$_REQUEST['job_name']) {
message(lang('name_for_cronjob_required'));
$continue = false;
}
if ($continue) {
$done = orsee_db_save_array($_REQUEST, "cron_jobs", $job_name, "job_name");
log__admin("cronjob_edit", $_REQUEST['job_name']);
message(lang('changes_saved'));
redirect("admin/cronjob_edit.php?job_name=" . $job_name);
$proceed = false;
开发者ID:danorama,项目名称:orsee,代码行数:31,代码来源:cronjob_edit.php
示例3: message
}
} else {
message(lang('database_error'));
redirect('admin/lang_item_edit.php?id=' . $id . '&item=' . $item);
}
} else {
$titem = $_REQUEST;
if ($new_id == "content_shortcut") {
$titem['content_name'] = $_REQUEST['content_shortcut'];
}
}
}
}
if ($proceed) {
if ($id) {
$titem = orsee_db_load_array("lang", $id, "lang_id");
} else {
$titem = array('content_name' => '');
}
show_message();
// form
echo ' <FORM action="lang_item_edit.php" METHOD=POST>
<INPUT type=hidden name="id" value="' . $id . '">
<INPUT type=hidden name="item" value="' . $item . '">
<TABLE class="or_formtable">
<TR><TD colspan=2>
<TABLE width="100%" border=0 class="or_panel_title"><TR>
<TD style="background: ' . $color['panel_title_background'] . '; color: ' . $color['panel_title_textcolor'] . '" align="center">
' . $header . '
</TD>
开发者ID:danorama,项目名称:orsee,代码行数:31,代码来源:lang_item_edit.php
示例4: lang__get_language_names
function lang__get_language_names()
{
$names = orsee_db_load_array("lang", "lang_name", "content_name");
return $names;
}
开发者ID:danorama,项目名称:orsee,代码行数:5,代码来源:language.php
示例5: orsee_db_load_array
} else {
$session_id = "";
}
if ($session_id) {
$edit = orsee_db_load_array("sessions", $session_id, "session_id");
} else {
$addit = true;
}
}
if ($proceed) {
if (isset($_REQUEST['experiment_id'])) {
$experiment_id = $_REQUEST['experiment_id'];
} else {
$experiment_id = $edit['experiment_id'];
}
$experiment = orsee_db_load_array("experiments", $experiment_id, "experiment_id");
if (!isset($experiment['experiment_id'])) {
redirect("admin/");
}
}
if ($proceed) {
$allow = check_allow('session_edit', 'experiment_show.php?experiment_id=' . $experiment_id);
}
if ($proceed) {
if (!check_allow('experiment_restriction_override')) {
check_experiment_allowed($experiment_id, "admin/experiment_show.php?experiment_id=" . $experiment_id);
}
}
if ($proceed) {
if (isset($experiment_id) && $experiment_id) {
$allow = check_allow('session_edit', 'experiment_show.php?experiment_id=' . $experiment_id);
开发者ID:danorama,项目名称:orsee,代码行数:31,代码来源:session_edit.php
示例6: elseif
if (isset($mailboxes[$id])) {
$continue = true;
}
} elseif ($mode == 'experiment') {
$experiment = orsee_db_load_array("experiments", $id, "experiment_id");
if (isset($experiment['experiment_id'])) {
$continue = true;
}
} elseif ($mode == 'session') {
$session = orsee_db_load_array("sessions", $id, "session_id");
if (isset($session['session_id'])) {
$continue = true;
$experiment = orsee_db_load_array("experiments", $session['experiment_id'], "experiment_id");
}
} elseif ($mode == 'participant') {
$participant = orsee_db_load_array("participants", $id, "participant_id");
if (isset($participant['participant_id'])) {
$continue = true;
}
}
} elseif ($mode == 'trash' && check_allow('emails_trash_view')) {
$continue = true;
} elseif ($mode == 'listmailboxes') {
$continue = true;
}
}
if (!$continue) {
$mode = "inbox";
}
}
if ($proceed) {
开发者ID:danorama,项目名称:orsee,代码行数:31,代码来源:emails_main.php
示例7: check_allow
}
if ($proceed) {
$allow = check_allow('lang_symbol_delete', 'lang_symbol_edit.php?lang_id=' . $lang_id);
}
if ($proceed) {
if (isset($_REQUEST['betternot']) && $_REQUEST['betternot']) {
redirect('admin/lang_symbol_edit.php?lang_id=' . $lang_id);
}
}
if ($proceed) {
if (isset($_REQUEST['reallydelete']) && $_REQUEST['reallydelete']) {
$reallydelete = true;
} else {
$reallydelete = false;
}
$symbol = orsee_db_load_array("lang", $lang_id, "lang_id");
if (!isset($symbol['lang_id'])) {
redirect("admin/lang_main.php");
}
}
if ($proceed) {
if ($reallydelete) {
$pars = array(':lang_id' => $lang_id);
$query = "DELETE FROM " . table('lang') . " \n \t\tWHERE lang_id= :lang_id";
$result = or_query($query, $pars);
message(lang('symbol_deleted'));
log__admin("language_symbol_delete", "lang_id:lang," . $symbol['content_name']);
redirect('admin/lang_edit.php');
}
}
if ($proceed) {
开发者ID:kfarr2,项目名称:psu-orsee,代码行数:31,代码来源:lang_symbol_delete.php
示例8: orsee_db_save_array
$continue = true;
$_REQUEST['content_type'] = "lang";
if ($lang_id) {
$done = orsee_db_save_array($_REQUEST, "lang", $lang_id, "lang_id");
} else {
$lang_id = lang__insert_to_lang($_REQUEST);
}
message(lang('changes_saved'));
log__admin("language_symbol_edit", "lang_id:lang," . $_REQUEST['content_name']);
redirect("admin/lang_symbol_edit.php?lang_id=" . $lang_id);
}
}
if ($proceed) {
// if lang id given, load data
if ($lang_id) {
$content = orsee_db_load_array("lang", $lang_id, "lang_id");
} else {
$content = array('content_name' => '');
}
if ($lang_id && !isset($content['lang_id'])) {
redirect("admin/lang_main.php");
}
}
if ($proceed) {
echo '<center>';
// form
echo ' <FORM action="lang_symbol_edit.php" method=post>
<INPUT type=hidden name="lang_id" value="' . $lang_id . '">
<TABLE class="or_formtable">
<TR><TD colspan="2">
开发者ID:kfarr2,项目名称:psu-orsee,代码行数:31,代码来源:lang_symbol_edit.php
示例9: table
$query = "UPDATE " . table('participate_at') . "\n\t\t\t\t\t\t\tSET session_id = :session_id, pstatus_id=0,\n\t\t\t\t\t\t\tpayment_type=0, payment_amt=0 \n\t\t\t\t\t\t\tWHERE participant_id = :participant_id \n\t\t\t\t\t\t\tAND experiment_id= :experiment_id";
$done = or_query($query, $pars);
if (count($allmids) > 0) {
participant__update_last_enrolment_time($allmids);
}
// clean up participation statuses for 'no session's
$query = "UPDATE " . table('participate_at') . "\n\t\t\t\t\t\t\tSET pstatus_id = '0' \n\t\t\t\t\t\t\tWHERE session_id='0'";
$done = or_query($query);
message(lang('changes_saved'));
$m_message = '<UL>';
foreach ($new_session as $msession => $mparts) {
$m_message .= '<LI>' . count($mparts) . ' ';
if ($msession == 0) {
$m_message .= lang('xxx_subjects_removed_from_registration');
} else {
$tsession = orsee_db_load_array("sessions", $msession, "session_id");
$m_message .= lang('xxx_subjects_moved_to_session_xxx') . '
<A HREF="' . thisdoc() . '?experiment_id=' . $experiment_id . '&session_id=' . $msession . '">' . session__build_name($tsession) . '</A>';
$tpartnr = experiment__count_participate_at($experiment_id, $msession);
if ($tsession['part_needed'] + $tsession['part_reserve'] < $tpartnr) {
$mmessage .= lang('subjects_number_exceeded');
}
}
}
$m_message .= '</UL>';
message($m_message);
$target = "experiment:" . $experiment['experiment_name'];
if ($session_id) {
$target .= "\nsession_id:" . $session_id;
}
log__admin("experiment_edit_participant_list", $target);
开发者ID:kfarr2,项目名称:psu-orsee,代码行数:31,代码来源:experiment_participants_show.php
示例10: redirect
$title = "delete_participation_status";
include "header.php";
if ($proceed) {
if (isset($_REQUEST['pstatus_id'])) {
$pstatus_id = $_REQUEST['pstatus_id'];
} else {
$pstatus_id = "";
}
if ($pstatus_id != '' && $pstatus_id == 0) {
redirect('admin/participation_status_edit.php?pstatus_id=' . $pstatus_id);
} elseif (!$pstatus_id) {
redirect('admin/participation_status_main.php');
}
}
if ($proceed) {
$pstatus = orsee_db_load_array("participation_statuses", $pstatus_id, "pstatus_id");
if (!isset($pstatus['pstatus_id'])) {
redirect('admin/participation_status_main.php');
}
}
if ($proceed) {
if (isset($_REQUEST['betternot']) && $_REQUEST['betternot']) {
redirect('admin/participation_status_edit.php?pstatus_id=' . $pstatus_id);
}
}
if ($proceed) {
if (isset($_REQUEST['reallydelete']) && $_REQUEST['reallydelete']) {
$reallydelete = true;
} else {
$reallydelete = false;
}
开发者ID:kfarr2,项目名称:psu-orsee,代码行数:31,代码来源:participation_status_delete.php
示例11: experimentmail__send_registration_notice
function experimentmail__send_registration_notice($line)
{
global $settings;
$reg = experiment__count_participate_at($line['experiment_id'], $line['session_id']);
$experimenters = db_string_to_id_array($line['experimenter_mail']);
foreach ($experimenters as $experimenter) {
$admin = orsee_db_load_array("admin", $experimenter, "admin_id");
if (isset($admin['admin_id'])) {
$tlang = $admin['language'] ? $admin['language'] : $settings['admin_standard_language'];
$lang = load_language($tlang);
$admin['session_name'] = session__build_name($line, $tlang);
$admin['experiment_name'] = $line['experiment_name'];
$admin['registered'] = $reg;
$admin['status'] = session__get_status($line, $tlang, $reg);
$admin['needed'] = $line['part_needed'];
$admin['reserve'] = $line['part_reserve'];
$subject = load_language_symbol('subject_for_registration_notice', $tlang);
$subject .= ' ' . $admin['experiment_name'] . ', ' . $admin['session_name'];
$recipient = $admin['email'];
$mailtext = load_mail("admin_registration_notice", $tlang) . "\n" . experimentmail__get_admin_footer($tlang, $admin) . "\n";
$message = process_mail_template($mailtext, $admin);
$now = time();
$list_name = lang('participant_list_filename') . ' ' . date("Y-m-d", $now);
$list_filename = str_replace(" ", "_", $list_name) . ".pdf";
$list_file = pdfoutput__make_part_list($line['experiment_id'], $line['session_id'], 'registered', 'lname,fname', true, $tlang);
$done = experimentmail__mail_attach($recipient, $settings['support_mail'], $subject, $message, $list_filename, $list_file);
}
}
// update session table : reg_notice_sent
$pars = array(':session_id' => $line['session_id']);
$query = "UPDATE " . table('sessions') . " SET reg_notice_sent='y' WHERE session_id= :session_id ";
$done2 = or_query($query, $pars);
return $done;
}
开发者ID:danorama,项目名称:orsee,代码行数:34,代码来源:experimentmail.php
示例12: get_languages
}
$menu__area = "options";
$title = "data_for_exptype";
include "header.php";
if ($proceed) {
// load languages
$languages = get_languages();
if ($exptype_id) {
$allow = check_allow('experimenttype_edit', 'experiment_type_main.php');
} else {
$allow = check_allow('experimenttype_add', 'experiment_type_main.php');
}
}
if ($proceed) {
if ($exptype_id) {
$exptype = orsee_db_load_array("experiment_types", $exptype_id, "exptype_id");
$map = explode(",", $exptype['exptype_mapping']);
foreach ($map as $etype) {
$exptype['exptype_map'][$etype] = $etype;
}
$query = "SELECT * from " . table('lang') . " WHERE content_type='experiment_type' AND content_name='" . $exptype_id . "'";
$selfdesc = orsee_query($query);
} else {
$exptype = array('exptype_name' => '', 'exptype_description' => '');
$selfdesc = array();
}
$continue = true;
if (isset($_REQUEST['edit']) && $_REQUEST['edit']) {
if (!$_REQUEST['exptype_name']) {
message(lang('name_for_exptype_required'));
$continue = false;
开发者ID:danorama,项目名称:orsee,代码行数:31,代码来源:experiment_type_edit.php
示例13: participant__show_admin_form
function participant__show_admin_form($edit, $button_title = "", $errors, $extra = "")
{
global $lang, $settings, $color;
$out = array();
if (!isset($edit['participant_id'])) {
$edit['participant_id'] = '';
}
if (!isset($edit['subpool_id'])) {
$edit['subpool_id'] = 1;
}
$subpool = orsee_db_load_array("subpools", $edit['subpool_id'], "subpool_id");
if (!$subpool['subpool_id']) {
$subpool = orsee_db_load_array("subpools", 1, "subpool_id");
}
$edit['subpool_id'] = $subpool['subpool_id'];
$pools = subpools__get_subpools();
foreach ($pools as $p => $pool) {
$out['is_subjectpool_' . $p] = false;
}
$out['is_subjectpool_' . $subpool['subpool_id']] = true;
echo '<FORM action="' . thisdoc() . '" method="POST">';
echo '<table border="0">';
echo '<TR><TD valign="top">';
echo '<TABLE class="or_formtable" style="width: 100%; height: 100%; max-width: 100%"><TR><TD>';
// get the participant form
participant__show_inner_form($edit, $errors, true);
echo '</TD></TR></TABLE>';
echo '</TD><TD valign="top">';
echo '<TABLE class="or_formtable" style="width: 100%; height: 100%; max-width: 100%; background: ' . $color['list_shade2'] . '"><TR><TD>';
echo '<INPUT type="hidden" name="participant_id" value="' . $edit['participant_id'] . '">';
global $hide_header;
if (isset($hide_header) && $hide_header) {
echo '<INPUT type="hidden" name="hide_header" value="true">';
}
$adminformoutput = participant__get_inner_admin_form($edit, $errors);
if ($adminformoutput) {
echo '<TABLE width="100%">
<TR><TD valign="top" bgcolor="' . $color['list_shade1'] . '">';
echo $adminformoutput;
echo '</TD></TR></TABLE>';
}
echo '<BR>';
// then show the rest
// initialize
if (!isset($edit['participant_id'])) {
$edit['participant_id'] = '???';
}
if (!isset($edit['participant_id_crypt'])) {
$edit['participant_id_crypt'] = '???';
}
if (isset($edit['creation_time'])) {
$tout['creation_time'] = ortime__format($edit['creation_time'], '', lang('lang'));
} else {
$tout['creation_time'] = '';
}
if (!isset($edit['rules_signed'])) {
$edit['rules_signed'] = '';
}
if (!isset($edit['session_id'])) {
$edit['session_id'] = '';
}
if (!isset($edit['remarks'])) {
$edit['remarks'] = '';
}
echo '<table width="100%">';
echo ' <tr><td>' . lang('subpool') . '</td>
<td>' . subpools__select_field("subpool_id", $edit['subpool_id']) . '</td></tr>';
echo '<tr><td colspan=2> </td></tr>';
echo ' <tr><td>' . lang('id') . '</td>
<td>' . $edit['participant_id'] . ' (' . $edit['participant_id_crypt'] . ')</td></tr>
<tr><td>' . lang('creation_time') . '</td>
<td>';
if (isset($edit['creation_time'])) {
echo ortime__format($edit['creation_time'], '', lang('lang'));
} else {
echo '???';
}
echo ' </td></tr>';
if ($settings['enable_rules_signed_tracking'] == 'y') {
echo '<tr><td>' . lang('rules_signed') . '</td>
<td>' . participant__rules_signed_form_field($edit['rules_signed']) . '</td></tr>';
}
echo '<tr><td valign="top">' . lang('remarks') . '</td>
<td>' . participant__remarks_form_field($edit['remarks']) . '</td></tr>';
echo '<tr><td colspan=2> </td></tr>';
echo '<tr><td colspan=2 align=left>
' . participant__add_to_session_checkbox() . ' ' . lang('register_sub_for_session') . '<BR>
' . participant__add_to_session_select($edit['session_id'], $edit['participant_id']) . '
</td></tr>';
echo '</td></tr></table>';
echo '</TD></TR><TR><TD valign="bottom" bgcolor="' . $color['list_shade2'] . '">';
echo '<table>
<tr style="outline: 2px solid red;">
<td>
<B>' . lang('participant_status') . '</B>: ';
if (check_allow('participants_change_status')) {
if (!isset($_REQUEST['status_id'])) {
$_REQUEST['status_id'] = "";
}
if ($_REQUEST['status_id'] == '0') {
//.........这里部分代码省略.........
开发者ID:danorama,项目名称:orsee,代码行数:101,代码来源:participant.php
示例14: array
$menu__area = "options_main";
$jquery = array();
include "header.php";
if ($proceed) {
$user_columns = participant__userdefined_columns();
if (!isset($_REQUEST['mysql_column_name']) || !isset($user_columns[$_REQUEST['mysql_column_name']])) {
redirect('admin/options_participant_profile.php');
} else {
$field_name = $_REQUEST['mysql_column_name'];
}
}
if ($proceed) {
$allow = check_allow('pform_config_field_configure', 'options_participant_profile.php');
}
if ($proceed) {
$field = orsee_db_load_array("profile_fields", $field_name, "mysql_column_name");
$allvalues = participantform__allvalues();
if (!isset($field['mysql_column_name'])) {
$new = true;
$field = array('mysql_column_name' => $field_name, 'enabled' => 'y', 'name_lang' => $field_name, 'type' => 'select_lang');
} else {
$new = false;
$prop = db_string_to_property_array($field['properties']);
unset($field['properties']);
foreach ($prop as $k => $v) {
$field[$k] = $v;
}
}
foreach ($allvalues as $k => $v) {
if (!isset($field[$k])) {
$field[$k] = $v;
开发者ID:kfarr2,项目名称:psu-orsee,代码行数:31,代码来源:options_participant_profile_edit.php
示例15: redirect
if ($proceed) {
if (isset($_REQUEST['betternot']) && $_REQUEST['betternot']) {
redirect('admin/admin_edit.php?admin_id=' . $admin_id);
$proceed = false;
}
}
if ($proceed) {
if (isset($_REQUEST['reallydelete']) && $_REQUEST['reallydelete']) {
$reallydelete = true;
} else {
$reallydelete = false;
}
$allow = check_allow('admin_delete', 'admin_edit.php?admin_id=' . $admin_id);
}
if ($proceed) {
$admin = orsee_db_load_array("admin", $admin_id, "admin_id");
echo '<center>';
if ($reallydelete) {
$pars = array(':admin_id' => $admin_id);
$query = "DELETE FROM " . table('admin') . "\n WHERE admin_id= :admin_id";
$result = or_query($query, $pars);
log__admin("admin_delete", $admin['adminname']);
message(lang('admin_deleted') . ': ' . $admin['adminname']);
redirect('admin/admin_show.php');
$proceed = false;
}
}
if ($proceed) {
// form
$num_experiments = experiment__count_experiments("experimenter LIKE :adminname", array(':adminname' => '%|' . $admin['adminname'] . '|%'));
if ($num_experiments > 0) {
开发者ID:danorama,项目名称:orsee,代码行数:31,代码来源:admin_delete.php
示例16: downloads__list_files_experiment
function downloads__list_files_experiment($experiment_id, $showsize = false, $showtype = false, $showdate = false)
{
global $lang, $color, $expadmindata;
$out = '';
$continue = true;
if ($continue) {
$experiment = orsee_db_load_array("experiments", $experiment_id, "experiment_id");
if (!isset($experiment['experiment_id'])) {
$continue = false;
}
}
if ($continue) {
$experimenters = db_string_to_id_array($experiment['experimenter']);
if (!(in_array($expadmindata['admin_id'], $experimenters) && check_allow('file_view_experiment_my') || check_allow('file_view_experiment_all'))) {
$continue = false;
}
}
if ($continue) {
if (check_allow('file_download_experiment_all')) {
$allow_dl = true;
} elseif (in_array($expadmindata['admin_id'], $experimenters) && check_allow('file_download_experiment_my')) {
$allow_dl = true;
} else {
$allow_dl = false;
}
if (check_allow('file_delete_experiment_all')) {
$allow_delete = true;
} elseif (in_array($expadmindata['admin_id'], $experimenters) && check_allow('file_delete_experiment_my')) {
$allow_delete = true;
} else {
$allow_delete = false;
}
if (check_allow('file_edit_experiment_all')) {
$allow_edit = true;
} elseif (in_array($expadmindata['admin_id'], $experimenters) && check_allow('file_edit_experiment_my')) {
$allow_edit = true;
} else {
$allow_edit = false;
}
$query = "SELECT " . table('uploads') . ".*, " . table('sessions') . ".session_start\n FROM " . table('uploads') . " LEFT JOIN " . table('sessions') . "\n ON " . table('uploads') . ".session_id = " . table('sessions') . ".session_id\n WHERE " . table('uploads') . ".experiment_id= :experiment_id\n ORDER BY session_start, upload_type, upload_name, upload_id";
$pars = array(':experiment_id' => $experiment_id);
$result = or_query($query, $pars);
if (pdo_num_rows($result) > 0) {
$shade = true;
$categories = lang__load_lang_cat('file_upload_category');
$uptype = -1;
$tsession_id = -1;
$cols = 3;
if ($showsize) {
$cols++;
}
if ($showtype) {
$cols++;
}
if ($showdate) {
$cols++;
}
if ($allow_edit) {
$cols++;
}
if ($allow_delete) {
$cols++;
}
$out .= '<TABLE width="100%" border=0 cellspacing="0">';
while ($upload = pdo_fetch_assoc($result)) {
if ($shade) {
$bgcolor = ' bgcolor="' . $color['list_shade1'] . '"';
$shade = false;
} else {
$bgcolor = ' bgcolor="' . $color['list_shade2'] . '"';
$shade = true;
}
if ($upload['session_id'] != $tsession_id) {
$tsession_id = $upload['session_id'];
$uptype = 0;
$out .= '<TR bgcolor="' . $color['list_shade_subtitle'] . '">
<TD colspan=' . $cols . '>';
if ($upload['session_id'] > 0) {
$out .= '<i>' . lang('session') . ' ' . ortime__format(ortime__sesstime_to_unixtime($upload['session_start'])) . '</i>';
} else {
$out .= '<i>' . lang('no_session') . '</i>';
}
$out .= '</TD></TR>';
}
if ($upload['upload_type'] != $uptype) {
$uptype = $upload['upload_type'];
$out .= '<TR bgcolor="' . $color['list_shade_subtitle'] . '">
<TD> </TD>
<TD colspan=' . ($cols - 1) . '>';
if (isset($categories[$uptype])) {
$out .= $categories[$uptype];
} else {
$out .= '???';
}
$out .= '</TD></TR>';
}
$out .= '<TR' . $bgcolor . '><TD> </TD><TD>';
if ($allow_dl) {
$out .= '<A HREF="download_file.php' . '/' . rawurlencode($upload['upload_name'] . '.' . $upload['upload_suffix']) . '?t=d&i=' . $upload['upload_id'] . '">';
}
//.........这里部分代码省略.........
开发者ID:bgreiner,项目名称:orsee,代码行数:101,代码来源:updownloads.php
示例17: ob_start
ob_start();
$menu__area = "options";
$title = "edit_admin_type";
include "header.php";
if ($proceed) {
$allow = check_allow('admin_type_edit', 'admin_type_show.php');
}
if ($proceed) {
if (isset($_REQUEST['type_id']) && $_REQUEST['type_id']) {
$type_id = $_REQUEST['type_id'];
} else {
$type_id = "";
}
$rights = array();
if ($type_id) {
$type = orsee_db_load_array("admin_types", $type_id, "type_id");
} else {
$type = array();
}
if (isset($_REQUEST['save']) && $_REQUEST['save']) {
$continue = true;
$type = $_REQUEST;
if (!$type_id && !$type['type_name']) {
message(lang('error_admintype_name_required'));
$continue = false;
}
if (isset($type['right_list'])) {
$trights = array();
foreach ($type['right_list'] as $key => $value) {
if ($value) {
$trights[] = $key;
开发者ID:kfarr2,项目名称:psu-orsee,代码行数:31,代码来源:admin_type_edit.php
示例18: pdfoutput__make_part_list
function pdfoutput__make_part_list($experiment_id, $session_id = "", $pstatus = "", $focus = "", $sort = "", $file = false, $tlang = "")
{
global $settings;
if ($tlang == "") {
global $lang;
} else {
$lang = load_language($tlang);
}
$experiment = orsee_db_load_array("experiments", $experiment_id, "experiment_id");
$pstatuses = expregister__get_participation_statuses();
if ($session_id) {
$clause = "session_id = '" . $session_id . "'";
$title = lang('registered_subjects');
} elseif (isset($pstatuses[$pstatus])) {
$clause = "pstatus_id = '" . $pstatus . "'";
if ($pstatus == 0) {
$clause .= " AND session_id != 0";
}
$title = lang('subjects_in_participation_status') . ' "' . $pstatuses[$pstatus]['internal_name'] . '"';
} elseif ($focus == 'enroled') {
$clause = "session_id != 0";
$title = lang('registered_subjects');
}
$cols = participant__get_result_table_columns('session_participants_list_pdf');
if ($session_id) {
unset($cols['session_id']);
}
// load sessions of this experiment
$pars = array(':experiment_id' => $experiment_id);
$query = "SELECT *\n\t\t\tFROM " . table('sessions') . "\n\t\t\tWHERE experiment_id= :experiment_id\n\t\t\tORDER BY session_start";
$result = or_query($query, $pars);
global $thislist_sessions;
$thislist_sessions = array();
while ($line = pdo_fetch_assoc($result)) {
$thislist_sessions[$line['session_id']] = $line;
}
// load participant data for this session/experiment
$pars = array(':experiment_id' => $experiment_id);
$select_query = "SELECT * FROM " . table('participate_at') . ", " . table('participants') . " \n\t\t\t\t\tWHERE " . table('participate_at') . ".experiment_id= :experiment_id\n\t\t\t\t\tAND " . table('participate_at') . ".participant_id=" . table('participants') . ".participant_id\n\t\t\t\t\tAND (" . $clause . ")";
$order = query__get_sort('session_participants_list_pdf', $sort);
if (!$order) {
$order = table('participants') . ".participant_id";
}
$select_query .= " ORDER BY " . $order;
// get result
$result = or_query($select_query, $pars);
$participants = array();
while ($line = pdo_fetch_assoc($result)) {
$participants[] = $line;
}
$result_count = count($participants);
// load sessions of this experiment
$pars = array(':texperiment_id' => $experiment_id);
$squery = "SELECT *\n FROM " . table('sessions') . "\n\t\t\tWHERE experiment_id= :texperiment_id \n ORDER BY session_start";
$result = or_query($squery, $pars);
$thislist_sessions = array();
while ($line = pdo_fetch_assoc($result)) {
$thislist_sessions[$line['session_id']] = $line;
}
// reorder by session date if ordered by session id
if ($sort == "session_id") {
$temp_participants = $participants;
$participants = array();
foreach ($thislist_sessions as $sid => $s) {
foreach ($temp_participants as $p) {
if ($p['session_id'] == $sid) {
$participants[] = $p;
}
}
}
}
unset($temp_participants);
// determine table title
$table_title = $experiment['experiment_public_name'];
if ($session_id) {
$table_title .= ', ' . lang('session') . ' ' . str_replace(" ", " ", session__build_name($thislist_sessions[$session_id]));
}
$table_title .= ' - ' . $title;
// determine table headings
$table_headings = participant__get_result_table_headcells_pdf($cols);
$table_data = array();
$pnr = 0;
foreach ($participants as $p) {
$pnr++;
$p['order_number'] = $pnr;
$row = participant__get_result_table_row_pdf($cols, $p);
$table_data[] = $row;
}
// prepare pdf
include_once '../tagsets/class.ezpdf.php';
$pdf = new Cezpdf('a4', 'landscape');
$pdf->selectFont('../tagsets/fonts/Times-Roman.afm');
$fontsize = $settings['participant_list_pdf_table_fontsize'] ? $settings['participant_list_pdf_table_fontsize'] : 10;
$titlefontsize = $settings['participant_list_pdf_title_fontsize'] ? $settings['participant_list_pdf_title_fontsize'] : 12;
$y = $pdf->ezTable($table_data, $table_headings, $table_title, array('gridlines' => 31, 'showHeadings' => 1, 'shaded' => 2, 'shadeCol' => array(1, 1, 1), 'shadeCol2' => array(0.9, 0.9, 0.9), 'fontSize' => $fontsize, 'titleFontSize' => $titlefontsize, 'rowGap' => 1, 'colGap' => 3, 'innerLineThickness' => 0.5, 'outerLineThickness' => 1, 'maxWidth' => 800, 'width' => 800, 'protectRows' => 2));
if ($file) {
$pdffilecode = $pdf->output();
return $pdffilecode;
} else {
$pdf->ezStream(array('Content-Disposition' => 'participant_list.pdf', 'Accept-Ranges' => 0, 'compress' => 1));
//.........这里部分代码省略.........
开发者ID:kfarr2,项目名称:psu-orsee,代码行数:101,代码来源:pdfoutput.php
示例19: redirect
$redir .= "&";
} else {
$redir .= "?";
}
$redir .= "s=" . $session_id;
redirect($redir);
}
} elseif (isset($_REQUEST['cancel']) && $_REQUEST['cancel'] && isset($settings['allow_subject_cancellation']) && $settings['allow_subject_cancellation'] == 'y') {
$continue = true;
if (!$session_id) {
$continue = false;
log__participant("interfere enrolment cancellation- no session_id", $participant_id);
message(lang('error_session_id_register'));
redirect("public/participant_show_mob.php" . $token_string);
} else {
$session = orsee_db_load_array("sessions", $session_id, "session_id");
if (!isset($session['session_id'])) {
log__participant("interfere enrolment cancellation - invalid session_id", $participant_id);
message(lang('error_session_id_register'));
redirect("public/participant_show_mob.php" . $token_string);
}
}
if ($proceed) {
$participate_at = expregister__get_participate_at($participant_id, $session['experiment_id']);
if (!isset($participate_at['session_id']) || $participate_at['session_id'] != $session_id) {
$continue = false;
redirect("public/participant_show_mob.php" . $token_string);
}
}
if ($proceed) {
$cancellation_deadline = sessions__get_cancellation_deadline($session);
开发者ID:kfarr2,项目名称:psu-orsee,代码行数:31,代码来源:participant_show_mob.php
示例20: admin__load_admin_rights
function admin__load_admin_rights($admin_type)
{
$admin_type = orsee_db_load_array("admin_types", $admin_type, "type_name");
$trights = explode(",", $admin_type['rights']);
$rights = array();
foreach ($trights as $right) {
$rights[$right] = true;
}
return $rights;
}
开发者ID:kfarr2,项目名称:psu-orsee,代码行数:10,代 |
请发表评论