function Check_Required_extensions()
{
    global $required_extensions;
    $checks = array();
    foreach ($required_extensions as $extensions) {
        $checks[$extensions] = in_array($extensions, get_loaded_extensions());
    }
    DisplayResults($checks);
}
Пример #2
0
$studyid = GetVariable("studyid");
$fileviewtype = GetVariable("fileviewtype");
?>
<body>
<div style="font-size:10pt">
<?php 
/* determine action */
switch ($action) {
    case 'viewlogs':
        DisplayLogs($id, $analysisid);
        break;
    case 'viewfiles':
        DisplayFiles($id, $analysisid, $fileviewtype);
        break;
    case 'viewresults':
        DisplayResults($analysisid, $studyid);
        break;
    default:
}
?>
</div><?php 
/* ------------------------------------ functions ------------------------------------ */
/* -------------------------------------------- */
/* ------- DisplayLogs ------------------------ */
/* -------------------------------------------- */
function DisplayLogs($id, $analysisid)
{
    $sqlstring = "select * from analysis a left join studies b on a.study_id = b.study_id left join enrollment c on b.enrollment_id = c.enrollment_id left join subjects d on c.subject_id = d.subject_id left join pipelines e on e.pipeline_id = a.pipeline_id where a.analysis_id = {$analysisid}";
    //echo $sqlstring;
    $result = MySQLiQuery($sqlstring, __FILE__, __LINE__);
    $row = mysqli_fetch_array($result, MYSQLI_ASSOC);
Пример #3
0
	/* ----- setup variables ----- */
	$action = GetVariable("action");
	$id = GetVariable("id");
	$analysisid = GetVariable("analysisid");
	$studyid = GetVariable("studyid");
	$fileviewtype = GetVariable("fileviewtype");

?>
<body>
<div style="font-size:10pt">
<?	
	/* determine action */
	switch ($action) {
		case 'viewlogs': DisplayLogs($id, $analysisid); break;
		case 'viewfiles': DisplayFiles($id, $analysisid, $fileviewtype); break;
		case 'viewresults': DisplayResults($analysisid, $studyid); break;
		default:
	}
?></div><?
	/* ------------------------------------ functions ------------------------------------ */

	
	/* -------------------------------------------- */
	/* ------- DisplayLogs ------------------------ */
	/* -------------------------------------------- */
	function DisplayLogs($id, $analysisid) {

		$sqlstring = "select * from analysis a left join studies b on a.study_id = b.study_id left join enrollment c on b.enrollment_id = c.enrollment_id left join subjects d on c.subject_id = d.subject_id left join pipelines e on e.pipeline_id = a.pipeline_id where a.analysis_id = $analysisid";
		//echo $sqlstring;
		$result = MySQLiQuery($sqlstring,__FILE__,__LINE__);
		$row = mysqli_fetch_array($result, MYSQLI_ASSOC);
Пример #4
0
function PopulateResult()
{
    global $baseDir;
    global $viewport;
    $currentVideo = array_key_exists('video', $_REQUEST) ? $_REQUEST['video'] : '';
    if (strlen($currentVideo)) {
        ProcessVideo($currentVideo);
        $info = json_decode(file_get_contents("{$baseDir}/{$currentVideo}/video.json"), true);
        if (isset($info) && is_array($info) && array_key_exists('viewport', $info)) {
            $viewport = $info['viewport'];
        }
        $progress = array();
        $progress['video'] = $currentVideo;
        $progress['videoDir'] = "{$baseDir}/{$currentVideo}";
        $progress['frames'] = LoadFrames($currentVideo);
        $progress['progress'] = array();
        VisualProgressOriginal($progress, 'Original', true);
        VisualProgressOriginal($progress, 'Original+white', false);
        VisualProgressEMD($progress, 'EMD');
        VisualProgressEMDRelative($progress, 'EMD Relative');
        VisualProgressEMDPath($progress, 'EMD Path');
        DisplayResults($progress);
    } else {
        echo '<p>Select a video in the list to see it\'s analysis</p>';
    }
}
Пример #5
0
function Check_Email_Marketer()
{
    $init_file = './../com/init.php';
    if (is_readable($init_file)) {
        define('IEM_NO_CONTROLLER', true);
        require_once $init_file;
    }
    $required = array();
    // Require PHP 5.1.3 or above
    $required['PHP 5.1.3 or above'] = array('result' => in_array(version_compare('5.1.3', phpversion()), array(0, -1)), 'feature' => 'Application', 'fix' => 'Please ask your host to upgrade your server to PHP version 5.1.3 or above');
    // Compatibility Mode with ZendEngline 1 (ie. PHP 4) needs to be disabled
    $required['Zend Engine 1 Compatibility Disabled'] = array('result' => !CHECK_ZENDENGINE1_COMPATIBILITY, 'feature' => 'Application', 'fix' => 'Please ask your web host to disable "ze1_compatibility_mode" in php.ini (or in .htaccess)');
    // "Safe Mode" must be disabled
    $required['Safe Mode Disabled'] = CHECK_SAFE_MODE;
    // "File Uploads" must be enabled
    $required['File Uploads'] = CHECK_FILE_UPLOADS;
    //Check MySQL
    $required['MySQL Available'] = array('result' => CHECK_MYSQL_AVAILABLE, 'version' => MYSQL_VERSION_CHECK);
    $db_checked = false;
    if (defined('MYSQL_VERSION_CHECK')) {
        $db_checked = true;
    }
    if (defined('SENDSTUDIO_DATABASE_TYPE')) {
        switch (SENDSTUDIO_DATABASE_TYPE) {
            case 'pgsql':
                $required['PostgreSQL'] = array('result' => FALSE, 'feature' => 'PostgreSQL', 'fix' => 'PostgreSQL is not supported by Email Marketer');
                break;
        }
    }
    if (!$db_checked) {
        $required['MySQL version 4.1.1 or above Availabe'] = 'unknown';
    }
    //Check MBSTRING
    $required['mbstring Available'] = CHECK_MBSTRING_AVAILABLE;
    // DOM Extension requred for surveys
    $required['DOM Extension Enabled'] = CHECK_DOM_AVAILABLE;
    //cURL
    $required['cURL Available'] = CHECK_CURL_AVAILABLE;
    // Session autostart must be disabled
    $required['Session Autostart Disabled'] = !CHECK_SESSION_AUTOSTART;
    // IMAP module is required
    $required['IMAP Available'] = array('result' => CHECK_IMAP_AVAILABLE, 'feature' => 'Bounce processing', 'fix' => 'Please ask your web host to install IMAP PHP extension module');
    // Need to be able to access outside location
    $required['Remote URL Access Available'] = ACCESS_REMOTE_URL;
    // Require GD module
    $required['GD Available'] = array('result' => CHECK_GD_AVAILABLE, 'feature' => 'CAPTCHA and Printing statistics', 'fix' => 'Please ask your web host to install IMAP PHP extension module');
    // Mod security must be disabled
    $required['Mod Security Disabled'] = !CHECK_MOD_SECURITY_ENABLED;
    //fsockopen for SMTP
    $optional = array('fsockopen() Available' => array('result' => CHECK_FSOCKOPEN_AVAILABLE, 'feature' => 'Sending emails via remote SMTP servers', 'fix' => 'Please ask your web host to allow the use of the fsockopen() function.'));
    DisplayResults($required, 'Required');
    DisplayResults($optional, 'Optional');
}