コード例 #1
0
ファイル: bltilaunch.php プロジェクト: ericvanboven/IMathAS
                                     return $out;
                                 }
                             }
                         }
                     }
                     return '';
                 }
                 $loc = findfolder($items, $keyparts[2], '0');
                 if ($loc == '') {
                     reporterror("invalid folder identifier in folder view launch");
                 }
                 $keyparts[3] = $loc;
             }
         } else {
             if ($keyparts[0] != 'sso' && $_SESSION['ltirole'] != 'instructor') {
                 reporterror("invalid key. unknown action type");
             }
         }
     }
 }
 //see if student is enrolled, if appropriate to action type
 if ($keyparts[0] == 'cid' || $keyparts[0] == 'aid' || $keyparts[0] == 'placein' || $keyparts[0] == 'folder' || $keyparts[0] == 'LTIkey') {
     if ($_SESSION['ltirole'] == 'instructor') {
         $query = "SELECT id FROM imas_teachers WHERE userid='{$userid}' AND courseid='{$cid}'";
         $result = mysql_query($query) or die("Query failed : " . mysql_error());
         if (mysql_num_rows($result) == 0) {
             //nope, not a teacher.  Set as tutor for this context_id
             $query = "SELECT id FROM imas_tutors WHERE userid='{$userid}' AND courseid='{$cid}'";
             $result = mysql_query($query) or die("Query failed : " . mysql_error());
             if (mysql_num_rows($result) == 0) {
                 //nope, not a tutor already.  Set as tutor for this context_id
コード例 #2
0
ファイル: admin_index.php プロジェクト: Git-Host/AMPPS
//Load the License Info - Loaded after langs loaded
loadlicense();
//Which Timezone is this PAGE ?
$globals['pgtimezone'] = (double) (empty($user['timezone']) ? $globals['timezone'] : $user['timezone']);
//ob_start('softaculous_buffer');
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# SOFTACULOUS IS DISABLED USING ACL
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if (!empty($globals['disabled'])) {
    reporterror($l['disable_softaculous_t'], $l['disable_softaculous'], $l['disable_softaculous_t']);
}
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# SOFTACULOUS RESELLER PANEL IS DISABLED
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if (!empty($globals['disable_reseller_panel']) && defined('SOFTRESELLER')) {
    reporterror($l['disable_reseller_admin_t'], $l['disable_reseller_admin'], $l['disable_reseller_admin_t']);
}
//////////////
// LETS START
//////////////
// Is it an API call ??
if (isset($_GET['api'])) {
    $globals['theme_folder'] = 'api';
}
$start_time = microtime_float();
//Time Stops for no one
if (empty($act)) {
    $act = optGET('act');
}
switch ($act) {
    //The DEFAULT Page