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


PHP action::record方法代码示例

本文整理汇总了PHP中action::record方法的典型用法代码示例。如果您正苦于以下问题:PHP action::record方法的具体用法?PHP action::record怎么用?PHP action::record使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在action的用法示例。


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

示例1: action

$require_current_course = true;
$guest_allowed = true;
$require_help = TRUE;
$helpTopic = 'AddCourseUnitscontent';

require_once '../../include/baseTheme.php';
require_once 'include/lib/fileDisplayLib.inc.php';
require_once 'include/action.php';
require_once 'functions.php';
require_once 'modules/document/doc_init.php';
require_once 'modules/tags/moduleElement.class.php';
require_once 'include/lib/modalboxhelper.class.php';
require_once 'include/lib/multimediahelper.class.php';

$action = new action();
$action->record(MODULE_ID_UNITS);

if (isset($_REQUEST['id'])) {
    $id = intval($_REQUEST['id']);
}
if (isset($_GET['cnt'])) {
    $cnt = intval($_REQUEST['cnt']);
}

$pageName = '';
$lang_editor = $language;
load_js('tools.js');
ModalBoxHelper::loadModalBox(true);

if (isset($_REQUEST['edit_submitW'])) { //update title and comments for week
    $title = $_REQUEST['weektitle'];
开发者ID:nikosv,项目名称:openeclass,代码行数:31,代码来源:index.php

示例2: q

// locate course id
$course_id = null;
$res1 = Database::get()->querySingle("SELECT course.id FROM course WHERE course.code = ?s", q($_GET['course']));
if ($res1) {
    $course_id = intval($res1->id);
}

if ($course_id == null) {
    header("Location: ${urlServer}");
    exit();
}

if ($uid) {
    require_once 'include/action.php';
    $action = new action();
    $action->record(MODULE_ID_VIDEO);
}

// ----------------------
// download video
// ----------------------
$res2 = Database::get()->querySingle("SELECT * FROM video
                  WHERE course_id = ?d AND id = ?d", $course_id, $_GET['id']);

if (!$res2) {
    header("Location: ${urlServer}");
    exit();
}

$valid = ($uid || course_status($course_id) == COURSE_OPEN) ? true : token_validate($row2['path'], $_GET['token'], 30);
if (!$valid) {
开发者ID:nikosv,项目名称:openeclass,代码行数:31,代码来源:file.php

示例3: action

 * ======================================================================== */
$require_current_course = true;
$require_help = true;
$helpTopic = 'Announce';
$guest_allowed = true;
include '../../include/baseTheme.php';
require_once 'include/lib/textLib.inc.php';
require_once 'include/sendMail.inc.php';
require_once 'include/lib/modalboxhelper.class.php';
require_once 'include/lib/multimediahelper.class.php';
require_once 'include/log.php';
require_once 'modules/search/indexer.class.php';
// The following is added for statistics purposes
require_once 'include/action.php';
$action = new action();
$action->record(MODULE_ID_ANNOUNCE);
define('RSS', 'modules/announcements/rss.php?c=' . $course_code);
//Identifying ajax request
if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
    if (isset($_POST['action']) && $is_editor) {
        if ($_POST['action'] == 'delete') {
            /* delete announcement */
            $row_id = intval($_POST['value']);
            $announce = Database::get()->querySingle("SELECT title, content FROM announcement WHERE id = ?d ", $row_id);
            $txt_content = ellipsize_html(canonicalize_whitespace(strip_tags($announce->content)), 50, '+');
            Database::get()->query("DELETE FROM announcement WHERE id= ?d", $row_id);
            Indexer::queueAsync(Indexer::REQUEST_REMOVE, Indexer::RESOURCE_ANNOUNCEMENT, $row_id);
            Log::record($course_id, MODULE_ID_ANNOUNCE, LOG_DELETE, array('id' => $row_id, 'title' => $announce->title, 'content' => $txt_content));
            exit;
        } elseif ($_POST['action'] == 'visible') {
            /* modify visibility */
开发者ID:kostastzo,项目名称:openeclass,代码行数:31,代码来源:index.php

示例4: action

  progress is not displayed at all.

  @Comments:
  ==============================================================================
 */

$require_current_course = TRUE;

include '../../include/baseTheme.php';
require_once 'include/lib/learnPathLib.inc.php';
require_once 'include/lib/fileDisplayLib.inc.php';

/* * ** The following is added for statistics purposes ** */
require_once 'include/action.php';
$action = new action();
$action->record(MODULE_ID_LP);
/* * *********************************** */

if (isset($_GET['unit'])) {
    $_SESSION['unit'] = intval($_GET['unit']);
}

// $_SESSION
if (isset($_GET['path_id'])) {
    $_SESSION['path_id'] = intval($_GET['path_id']);
} elseif ((!isset($_SESSION['path_id']) || $_SESSION['path_id'] == '')) {
    // if path id not set, redirect user to the list of learning paths
    header("Location: ./index.php?course=$course_code");
    exit();
}
开发者ID:nikosv,项目名称:openeclass,代码行数:30,代码来源:learningPath.php

示例5: array

require_once 'modules/graphics/plotter.php';
require_once 'include/log.php';
// Include autojudge connectors
$connectorFiles = array_diff(scandir('modules/work/connectors'), array('..', '.'));
foreach ($connectorFiles as $curFile) {
    require_once 'modules/work/connectors/' . $curFile;
}
// End including connectors
// For colorbox, fancybox, shadowbox use
require_once 'include/lib/modalboxhelper.class.php';
require_once 'include/lib/multimediahelper.class.php';
ModalBoxHelper::loadModalBox();
/* * ** The following is added for statistics purposes ** */
require_once 'include/action.php';
$action = new action();
$action->record(MODULE_ID_ASSIGN);
/* * *********************************** */
$workPath = $webDir . "/courses/" . $course_code . "/work";
$works_url = array('url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}", 'name' => $langWorks);
$toolName = $langWorks;
//-------------------------------------------
// main program
//-------------------------------------------
//Gets the student's assignment file ($file_type=NULL)
//or the teacher's assignment ($file_type=1)
if (isset($_GET['get'])) {
    if (isset($_GET['file_type']) && $_GET['file_type'] == 1) {
        $file_type = intval($_GET['file_type']);
    } else {
        $file_type = NULL;
    }
开发者ID:kostastzo,项目名称:openeclass,代码行数:31,代码来源:index.php

示例6: date

    if ($GLOBALS['language'] == 'el') {
        $timeNow = date("d-m-Y / H:i", time());
    } else {
        $timeNow = date("Y-m-d / H:i", time());
    }

    if (!file_exists($fileChatName)) {
        $fp = fopen($fileChatName, 'w') or die('<center>$langChatError</center>');
        fclose($fp);
    }

/* * ** The following is added for statistics purposes ** */
require_once 'include/action.php';
$action = new action();
$action->record(MODULE_ID_CHAT);
/* * *********************************** */

$toolName = $langChat;
// guest user not allowed
if (check_guest()) {
    $tool_content .= "<div class='alert alert-danger'>$langNoGuest</div>";
    draw($tool_content, 2, 'conference');
}

$head_content .= '<script type="text/javascript">
    function prepare_message() {
            document.chatForm.chatLine.value=document.chatForm.msg.value;
            document.chatForm.msg.value = "";
            document.chatForm.msg.focus();
            return true;
开发者ID:nikosv,项目名称:openeclass,代码行数:30,代码来源:index.php

示例7: action

}

define('HIDE_TOOL_TITLE', 1);
$guest_allowed = true;

require_once 'include/baseTheme.php';
require_once 'include/CAS/CAS.php';
require_once 'modules/auth/auth.inc.php';
require_once 'include/lib/textLib.inc.php';
require_once 'include/phpass/PasswordHash.php';

// unset system that records visitor only once by course for statistics
require_once 'include/action.php';
if (isset($dbname)) {
    $action = new action();
    $action->record('MODULE_ID_UNITS', 'exit');
}
unset($dbname);

// if we try to login... then authenticate user.
$warning = '';
if (isset($_SESSION['shib_uname'])) {
    // authenticate via shibboleth
    shib_cas_login('shibboleth');
} elseif (isset($_SESSION['cas_uname']) && !isset($_GET['logout'])) {
    // authenticate via cas
    shib_cas_login('cas');
} elseif (isset($_GET['provider'])) {
        //hybridauth authentication (Facebook, Twitter, Google, Yahoo, Live, LinkedIn)
        hybridauth_login();
} else {
开发者ID:nikosv,项目名称:openeclass,代码行数:31,代码来源:index.php

示例8: define

        define('GROUP_DOCUMENTS', true);
    } else {
        unset($group_id);
    }
}
$guest_allowed = true;
require_once '../../include/init.php';
require_once 'include/action.php';
require_once 'include/lib/fileManageLib.inc.php';
if (!defined('COMMON_DOCUMENTS')) {
    // check user's access to cours
    check_cours_access();
    // record file access
    if ($uid) {
        $action = new action();
        $action->record(MODULE_ID_DOCS);
    } else {
        $course_id = $_SESSION['course_id'];
    }
    // anonymous with access token needs course id set
}
require_once 'doc_init.php';
require_once 'include/lib/forcedownload.php';
if (defined('GROUP_DOCUMENTS')) {
    if (!$uid) {
        error($langNoRead);
    }
    if (!($is_editor or $is_member)) {
        error($langNoRead);
    }
}
开发者ID:kostastzo,项目名称:openeclass,代码行数:31,代码来源:file.php


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