Esempio n. 1
0
 function table()
 {
     if (!Rhaco::isVariable("_R_D_T_", "StageCategory")) {
         Rhaco::addVariable("_R_D_T_", new Table(Rhaco::constant("DATABASE_concert_PREFIX") . "stage_category", __CLASS__), "StageCategory");
     }
     return Rhaco::getVariable("_R_D_T_", null, "StageCategory");
 }
Esempio n. 2
0
 function table()
 {
     if (!Rhaco::isVariable("_R_D_T_", "Comment")) {
         Rhaco::addVariable("_R_D_T_", new Table(Rhaco::constant("DATABASE_concert_PREFIX") . "comment", __CLASS__), "Comment");
     }
     return Rhaco::getVariable("_R_D_T_", null, "Comment");
 }
 function table()
 {
     if (!Rhaco::isVariable("_R_D_T_", "Participant")) {
         Rhaco::addVariable("_R_D_T_", new Table(Rhaco::constant("DATABASE_kaigi_PREFIX") . "participant", __CLASS__), "Participant");
     }
     return Rhaco::getVariable("_R_D_T_", null, "Participant");
 }
Esempio n. 4
0
File: Rhaco.php Progetto: riaf/ethna
 /**
  *  Ethna_Renderer_Rhacoクラスのコンストラクタ
  *
  *  @access public
  */
 public function __construct($controller)
 {
     parent::__construct($controller);
     $this->template_dir = $controller->getTemplatedir() . '/';
     $this->compile_dir = $controller->getDirectory('template_c');
     Rhaco::constant('TEMPLATE_PATH', $this->template_dir);
     $this->engine = new TemplateParser_Ethna();
     /*
             $this->setTemplateDir($template_dir);
             $this->compile_dir = $compile_dir;
     */
     $this->engine->template_dir = $this->template_dir;
     $this->engine->compile_dir = $this->compile_dir;
     $this->engine->compile_id = md5($this->template_dir);
     // 一応がんばってみる
     if (is_dir($this->engine->compile_dir) === false) {
         Ethna_Util::mkdir($this->engine->compile_dir, 0755);
     }
     $this->_setDefaultPlugin();
 }
 function invalid($request)
 {
     if ($request->isVariable($this->serverVarName)) {
         $openid = new OpenIDAuth($request->getVariable($this->serverVarName));
         $openid->request();
         $endPointURL = $openid->getEndPointURL();
         if (empty($endPointURL)) {
             return false;
         }
         $openid->addParameter('openid.sreg.required', Rhaco::constant('openid.sreg.required', 'nickname'));
         $openid->addParameter('openid.sreg.optional', Rhaco::constant('openid.sreg.optional', 'email'));
         $openid->addParameter('openid.identity', Rhaco::constant('openid.identity', 'http://specs.openid.net/auth/2.0/identifier_select'));
         $openid->addParameter('openid.claimed_id', Rhaco::constant('openid.claimed_id', 'http://specs.openid.net/auth/2.0/identifier_select'));
         if (Rhaco::isVariable('openid.extraParameter')) {
             $params = Rhaco::getVariable('openid.extraParameter');
             foreach ($params as $name => $value) {
                 $openid->addParameter($name, $value);
             }
         }
         $this->_redirectForm($endPointURL, $openid->getEndPointHeaders($this->url, $this->endPointURL));
     }
 }
Esempio n. 6
0
<?php

require dirname(__FILE__) . '/__init__.php';
Rhaco::import('tag.HtmlParser');
$db = new DbUtil(Event::connection());
$p = new HtmlParser('index.html');
$p->setVariable('event', $db->get(new Event(), new C(Q::depend(), Q::eq(Event::columnId(), Rhaco::constant('CURRENT_EVENT', 1)))));
$p->setVariable('hatena', Rhaco::obj('HatenaSyntax', array('headlevel' => 4, 'id' => 'event_description')));
$p->write();
Esempio n. 7
0
<?php

require 'rhaco/Rhaco.php';
require '../TumblrAPI.php';
// いずれ rhaco に pit つくりたい
Rhaco::constant('TUMBLR_EMAIL', 'mailaddress');
Rhaco::constant('TUMBLR_PASSWORD', 'password');
$title = 'ケコーン';
$body = <<<_BOD
riaf: ごはんかってきた
sotarok: 今日は何カレー?
riaf: はるさめヌードルのカレーwwww
sotarok: なんであたってるんだwww
riaf: さすがwww
_BOD;
$type = 'conversation';
$tumblr = new TumblrAPI(Rhaco::constant('TUMBLR_EMAIL'), Rhaco::constant('TUMBLR_PASSWORD'));
$ret = $tumblr->write(array('title' => $title, 'conversation' => $body), $type);
Logger::d($ret);
Esempio n. 8
0
<?php

include_once "./__settings__.php";
Rhaco::constant('HTML_TEMPLATE_ARG_ESCAPE', true);
Esempio n. 9
0
        } else {
            if (isset($_SERVER["argc"]) && $_SERVER["argc"] == 2) {
                $rhacopath = $_SERVER["argv"][1];
            }
        }
    }
}
if (!empty($rhacopath)) {
    $rhacopath = str_replace("\\", "/", $rhacopath);
    if (substr($rhacopath, -1) != "/") {
        $rhacopath .= "/";
    }
}
if (@(include_once $rhacopath . "Rhaco.php")) {
    Rhaco::import("setup.SetupGenerator");
    Rhaco::constant("CONTEXT_PATH", Rhaco::filepath(dirname(__FILE__)));
    $setupGenerator = new SetupGenerator($rhacopath);
    exit;
} else {
    if (empty($_SERVER["HTTP_USER_AGENT"])) {
        print "usage: php setup.php [directory path of 'Rhaco.php']\n";
        exit;
    }
}
function search_rhacopath()
{
    $path = str_replace("\\", "/", getcwd());
    $rhacopath = "";
    $pathList = explode("/", $path);
    for ($i = 0; $i < sizeof($pathList); $i++) {
        if (sizeof($pathList) == $i + 1) {