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


PHP check_experiment_allowed函数代码示例

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


在下文中一共展示了check_experiment_allowed函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: check_allow

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);
    }
}
if ($proceed) {
    if (!check_allow('experiment_restriction_override')) {
        check_experiment_allowed($_REQUEST['experiment_id'], "admin/experiment_show.php?experiment_id=" . $experiment_id);
    }
}
if ($proceed) {
    if (isset($_REQUEST['edit']) && $_REQUEST['edit']) {
        if ($settings['enable_payment_module'] == 'y') {
            if (isset($_REQUEST['payment_types'])) {
                $_REQUEST['payment_types'] = id_array_to_db_string(multipicker_json_to_array($_REQUEST['payment_types']));
            }
            if (isset($_REQUEST['payment_budgets'])) {
                $_REQUEST['payment_budgets'] = id_array_to_db_string(multipicker_json_to_array($_REQUEST['payment_budgets']));
            }
        }
        $_REQUEST['session_start'] = ortime__array_to_sesstime($_REQUEST, 'session_start_');
        $registered = experiment__count_participate_at($edit['experiment_id'], $edit['session_id']);
        $time_changed = false;
开发者ID:danorama,项目名称:orsee,代码行数:31,代码来源:session_edit.php

示例2: redirect

        $upload_id = $_REQUEST['i'];
    } else {
        redirect("admin/download_main");
    }
}
if ($proceed) {
    $upload = orsee_db_load_array("uploads", $upload_id, "upload_id");
    if (!isset($upload['upload_id'])) {
        redirect('admin/download_main.php');
    }
}
if ($proceed) {
    if ($upload['experiment_id'] > 0) {
        $experiment_id = $upload['experiment_id'];
        if (!check_allow('experiment_restriction_override')) {
            check_experiment_allowed($experiment_id, "admin/experiment_show.php?experiment_id=" . $experiment_id);
        }
    } else {
        $experiment_id = 0;
    }
}
if ($proceed) {
    if ($experiment_id > 0) {
        $experiment = orsee_db_load_array("experiments", $experiment_id, "experiment_id");
        if (!isset($experiment['experiment_id'])) {
            $experiment_id = 0;
        }
    }
}
if ($proceed) {
    if ($experiment_id > 0) {
开发者ID:danorama,项目名称:orsee,代码行数:31,代码来源:download_file.php

示例3: orsee_db_load_array

    } else {
        $reallydelete = false;
    }
    $session = orsee_db_load_array("sessions", $session_id, "session_id");
    $reg = experiment__count_participate_at($session['experiment_id'], $session_id);
    if ($reg > 0) {
        $allow = check_allow('session_nonempty_delete', 'session_edit.php?session_id=' . $session_id);
    } else {
        if (!check_allow('session_nonempty_delete')) {
            check_allow('session_empty_delete', 'session_edit?session_id=' . $session_id);
        }
    }
}
if ($proceed) {
    if (!check_allow('experiment_restriction_override')) {
        check_experiment_allowed($session['experiment_id'], "admin/experiment_show.php?experiment_id=" . $session['experiment_id']);
    }
}
if ($proceed) {
    if ($reallydelete) {
        // transaction?
        $pars = array(':session_id' => $session_id);
        $query = "UPDATE " . table('participate_at') . "\n\t\t\t\tSET session_id='0', pstatus_id=0 \n       \t\t\tWHERE session_id= :session_id";
        $result = or_query($query, $pars);
        $pars = array(':session_id' => $session_id);
        $query = "DELETE FROM " . table('sessions') . " \n         \t\tWHERE session_id= :session_id";
        $result = or_query($query, $pars);
        message(lang('session_deleted'));
        log__admin("session_delete", "session:" . session__build_name($session, $settings['admin_standard_language']) . "\n,session_id:" . $session_id);
        redirect('admin/experiment_show.php?experiment_id=' . $session['experiment_id']);
    }
开发者ID:kfarr2,项目名称:psu-orsee,代码行数:31,代码来源:session_delete.php

示例4: redirect

include "header.php";
if ($proceed) {
    if (!$_REQUEST['experiment_id']) {
        redirect("admin/");
    } else {
        $experiment_id = $_REQUEST['experiment_id'];
    }
}
if ($proceed) {
    $allow = check_allow('experiment_show', 'experiment_main.php');
}
if ($proceed) {
    // load experiment data into array experiment
    $experiment = orsee_db_load_array("experiments", $experiment_id, "experiment_id");
    if (!check_allow('experiment_restriction_override')) {
        check_experiment_allowed($experiment, "admin/experiment_main.php");
    }
}
if ($proceed) {
    // check if we are supposed to deactivate a permanent query
    if ($settings['allow_permanent_queries'] == 'y' && check_allow('experiment_assign_query_permanent_deactivate') && isset($_REQUEST['permanent_deactivate']) && $_REQUEST['permanent_deactivate']) {
        $done = query__reset_permanent($experiment_id);
        redirect('admin/experiment_show.php?experiment_id=' . $experiment_id);
    }
}
if ($proceed) {
    $experiment_total_payment = 0;
    // load sessions if lab experiment
    $sessions = array();
    if ($experiment['experiment_type'] == "laboratory") {
        $pars = array(':experiment_id' => $experiment['experiment_id']);
开发者ID:danorama,项目名称:orsee,代码行数:31,代码来源:experiment_show.php

示例5: ob_start

<?php

// part of orsee. see orsee.org
ob_start();
$menu__area = "experiments_new";
$title = "edit_experiment";
$jquery = array('arraypicker', 'textext', 'datepicker');
include "header.php";
if ($proceed) {
    if (isset($_REQUEST['experiment_id']) && $_REQUEST['experiment_id']) {
        $allow = check_allow('experiment_edit', 'experiment_show.php?experiment_id=' . $_REQUEST['experiment_id']);
        if ($proceed) {
            $edit = orsee_db_load_array("experiments", $_REQUEST['experiment_id'], "experiment_id");
            $edit['experiment_show_type'] = $edit['experiment_type'] . ',' . $edit['experiment_ext_type'];
            if (!check_allow('experiment_restriction_override')) {
                check_experiment_allowed($edit, "admin/experiment_show.php?experiment_id=" . $edit['experiment_id']);
            }
        }
    } else {
        $allow = check_allow('experiment_edit', 'experiment_main.php');
    }
}
if ($proceed) {
    $continue = true;
    if (isset($_REQUEST['edit']) && $_REQUEST['edit']) {
        $_REQUEST['experiment_class'] = id_array_to_db_string(multipicker_json_to_array($_REQUEST['experiment_class']));
        $_REQUEST['experimenter'] = id_array_to_db_string(multipicker_json_to_array($_REQUEST['experimenter']));
        $_REQUEST['experimenter_mail'] = id_array_to_db_string(multipicker_json_to_array($_REQUEST['experimenter_mail']));
        if ($settings['enable_ethics_approval_module'] == 'y' && check_allow('experiment_edit_ethics_approval_details')) {
            $_REQUEST['ethics_expire_date'] = ortime__array_to_sesstime($_REQUEST, 'ethics_expire_date_');
        }
开发者ID:kfarr2,项目名称:psu-orsee,代码行数:31,代码来源:experiment_edit.php


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