Esempio n. 1
0
switch ($_REQUEST['action']) {
    case 'reset':
        // 初期設定
        setup_port();
        do_reset();
        setup_step();
        break;
    case 'fortune':
        // 占い
        do_fortune();
        break;
    case 'rotate':
        // アルパカ回転
        do_rotate();
        break;
    case 'flash':
        // LEDチカチカ
        do_flash();
        break;
    case 'step':
        // 障害対応用ちょっとずらし
        do_step();
        break;
    case 'stepset':
        do_stepset();
        break;
    default:
        echo "action unknown.";
        exit;
}
echo " //done.";
Esempio n. 2
0
<?php

// the facebook client library
include_once '../php/facebook.php';
// some basic library functions
include_once 'lib.php';
// this defines some of your basic setup
include_once 'config.php';
$facebook = new Facebook($api_key, $secret);
$facebook->require_frame();
$user = $facebook->require_login();
if (isset($_POST['to'])) {
    $prints_id = (int) $_POST['to'];
    $prints = do_step($user, $prints_id);
} else {
    if (isset($_GET['to'])) {
        $prints_id = (int) $_GET['to'];
    } else {
        $prints_id = $user;
    }
    $prints = get_prints($prints_id);
}
?>
<div style="padding: 10px;">
  <h2>Hi <fb:name firstnameonly="true" uid="<?php 
echo $user;
?>
" useyou="false"/>!</h2><br/>
  <a href="<?php 
echo $facebook->get_add_url();
?>
Esempio n. 3
0
        }
    }
    if (function_exists('check_step_' . $_REQUEST['laststep'])) {
        $callback = 'check_step_' . $_REQUEST['laststep'];
        list($ok, $errors) = $callback();
        if (!$ok) {
            $this_step = $_REQUEST['laststep'];
            $steps[$id_to_step_index[$this_step]]['errors'] = $errors;
        }
    }
    if (false !== ($fh = fopen(dirname(__FILE__) . '/instdata.tmp', 'w'))) {
        fwrite($fh, serialize($config));
        fclose($fh);
    }
}
list($result, $output) = do_step($this_step);
// print the page
if (!$output) {
    // default page = step 0
    $tpl = 'welcome.tpl';
    if (file_exists(dirname(__FILE__) . '/templates/default/welcome_' . $lang->getLang() . '.tpl')) {
        $tpl = 'welcome_' . $lang->getLang() . '.tpl';
    }
    $parser->setPath(dirname(__FILE__) . '/templates/default');
    $output = $parser->get($tpl, array());
}
$parser->output('index.tpl', array('debug' => CAT_DEBUG, 'steps' => $steps, 'nextstep' => $nextstep['id'], 'prevstep' => $prevstep['id'], 'status' => $currentstep['success'] ? true : false, 'output' => $output, 'this_step' => $this_step, 'dump' => print_r(array($this_step, $_REQUEST, $prevstep, $nextstep, $currentstep, $steps), 1)));
/**
 * check the basic prerequisites for the CMS installation; uses
 * precheck.php to do this. Returns the result of preCheckAddon() method
 **/