当前位置: 首页>>代码示例>>PHP>>正文


PHP orsee_db_load_array函数代码示例

本文整理汇总了PHP中orsee_db_load_array函数的典型用法代码示例。如果您正苦于以下问题:PHP orsee_db_load_array函数的具体用法?PHP orsee_db_load_array怎么用?PHP orsee_db_load_array使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了orsee_db_load_array函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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>&nbsp;</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>&nbsp;</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


注:本文中的orsee_db_load_array函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。