コード例 #1
0
 * The script begins here                                                    *
 *                                                                           *
 *****************************************************************************/
/* assume everything's going to be fine... */
$ready = true;
/* preliminary interactive only initialization */
if (php_sapi_name() != 'cli') {
    session_start();
    /* fire up the templating engine for interactive scripts */
    $smarty = StMarksSmarty::getSmarty(true, __DIR__ . '/templates');
}
/* initialization that needs to happen for interactive and CLI scripts */
try {
    /* initialize global variables */
    $secrets = initSecrets();
    $sql = initMySql();
    $metadata = initAppMetadata();
} catch (CanvasAPIviaLTI_Exception $e) {
    $smarty->addMessage('Initialization Failure', $e->getMessage(), NotificationMessage::ERROR);
    $smarty->display();
    exit;
}
/* interactive initialization only */
if ($ready && php_sapi_name() != 'cli') {
    /* allow web apps to use common.inc.php without LTI authentication */
    if (!defined('IGNORE_LTI')) {
        try {
            if (midLaunch()) {
                $ready = false;
            } elseif (isset($_SESSION['toolProvider'])) {
                $toolProvider = $_SESSION['toolProvider'];
コード例 #2
0
ファイル: karte.php プロジェクト: nielssi/BeachExplorer
<?php

require "mySqlBase.php";
require "phpHelper.php";
initMySql();
$org = getAnimalInfo($_GET['id']);
?>
<div>
<script type="text/javascript">
    alert('asdasd');
</script>
    <div class="toolbar">
        <h1>Alle <?php 
echo $org['NAME'];
?>
 zeigen!</h1>
        <a class="back" href="#">zur&uuml;ck</a>
    </div>
    <div class="map_canvas" style="width:320px; height:400px"></div>
</div>