예제 #1
0
 public function init_flow_handle(Flow $flow)
 {
     if (Mobile::is_mobile()) {
         $vars = $flow->vars();
         mb_convert_variables('utf-8', 'utf-8,SJIS-win', $vars);
         $flow->vars($vars);
     }
 }
예제 #2
0
 public function flow_verify(Flow $flow)
 {
     if (!$flow->isSessions("_onetimeticket") || $flow->inVars("_onetimeticket") !== $flow->inSessions("_onetimeticket")) {
         $flow->vars("_onetimeticket", $flow->inSessions("_onetimeticket"));
         throw new Exception("invalid ticket");
     }
 }
예제 #3
0
 /**
  * Flowのモジュール
  * @param Flow $flow
  */
 public function flow_verify(Flow $flow)
 {
     if (!$flow->is_sessions("_onetimeticket") || $flow->in_vars("_onetimeticket") !== $flow->in_sessions("_onetimeticket")) {
         $flow->vars("_onetimeticket", $flow->in_sessions("_onetimeticket"));
         return false;
     }
     return true;
 }
예제 #4
0
파일: index.php 프로젝트: hisaboh/w2t
        $messages = omerge($messages, "key");
        rosort($messages, "created_at");
        return $messages;
    }
    public static function update($text)
    {
        R(new TwitterAPI())->update($text);
        R(new WassrAPI())->update($text);
    }
}
$flow = new Flow();
if ($flow->isPost() && $flow->isVars("text")) {
    Message::update($flow->inVars("text"));
    $flow->redirect_self();
}
$flow->vars("messages", Message::friends_timeline());
//$flow->output(__FILE__);
exit;
?>
<rt:template>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<form method="post">
	<textarea rows="3" cols="50" name="text"></textarea>
	<input type="submit" value="update" />
</form>
<table rt:param="messages" rt:var="m" border="1">
<tr>
예제 #5
0
파일: index.php 프로젝트: riaf/ringl
<?php

require dirname(__FILE__) . '/__settings__.php';
import('core.Flow');
import('core.Lib');
import('generic.module.JsOneTimeTicketFilter');
import('Chat');
class ringlTemplateFormatter
{
    function gurl()
    {
        return sprintf(def('chat@gserver'), mt_rand(0, 1000));
    }
}
$flow = new Flow();
$flow->handler(array('^/archives' => 'class=Chat,method=models,template=archive.html', '^/say' => 'class=Chat,method=say', '' => 'class=Chat,method=models,template=index.html'));
$flow->vars('rtf', new ringlTemplateFormatter());
$flow->output();