/** * Initialize status. */ private function _InitStatus() { // Get form name. $form_name = $this->Config()->form_name(); // Check secure. if (!$this->Form()->Secure($form_name)) { // Form page. $this->_status = self::_STATUS_FORM_; } else { // Secured. if (!Toolbox::GetRequest('confirmed')) { // Confirmation page. $this->_status = self::_STATUS_CONFIRM_; } else { // Confirmed. $this->_status = self::_STATUS_CONFIRMED_; if ($this->Mail()) { // Send mail was successful. $this->_status = self::_STATUS_SUCCESSED_; $this->Form()->Clear($form_name); } else { // Failed to send mail. $this->_status = self::_STATUS_FAILED_; $this->_error = $this->i18n()->En('Failed to send mail.'); } } } }
*/ /**************************************************************************************************** * * OnePiece * ****************************************************************************************************/ // Include of OnePiece framework. include '/www/op/core/OnePiece5.class.php'; // Set administrator setting. Env::Set('admin-ip', ''); Env::Set('admin-mail', ''); // Re:Setting error reporting. error_reporting(E_ALL & ~E_NOTICE); ini_set('display_errors', 0); // Re:Set Debug mode. if (OnePiece5::Admin() and Toolbox::GetRequest('debug')) { error_reporting(E_ALL & ~E_NOTICE); ini_set('display_errors', 1); } // Instanciate. $op = new OnePiece5(); // Include configuration file. if (file_exists('config.inc.php')) { include 'config.inc.php'; } /**************************************************************************************************** * * Dispatch * ****************************************************************************************************/ // Remove URL Query.
/** * op-unit-markdown/index.php * * @creation 2015-12-05 * @version 1.0 * @package op-unit-markdown * @author Tomoaki Nagahara <*****@*****.**> * @copyright Tomoaki Nagahara All right reserved. */ // Do check of include. if (!class_exists('OnePiece5')) { require ''; } // Set route table. Env::Set('controller-name', 'index,php'); Env::Set('route', Router::GetRoute()); // Init of unit root directory. if (!($root = Env::Get('unit-root'))) { $root = explode('/', dirname($_SERVER['SCRIPT_FILENAME'])); $root[count($root) - 1] = null; $root = join('/', $root); Env::Set('unit-root', $root); } // Instanciate $op = new OnePiece5(); if (Toolbox::GetRequest('testcase')) { $op->Template('testcase.php'); } else { $op->Template('action.php'); }
/** * Set OnePiece directory. * * Example: * $op_dir = '/www/op-core'; * $op_dir = 'C:\www\op-core'; */ $op_dir = '/www/op/core'; // Start time. $st = microtime(true); // Init op-core include './app/template/init-op-core.php'; // Create App object. $app = new App_i18n(); // Import config file.(setting file) $app->Import('app/config.php'); // Dispatch to end-point. $app->Dispatch(); // Access is from web browser. if (Toolbox::isHtml()) { // Display of ip address. if (Toolbox::GetRequest('admin')) { $app->p($_SERVER['REMOTE_ADDR']); } // memory check. $app->mark('memory check'); // Finish time. $en = microtime(true); // Will to display the execution time. printf('<div style="font-size:smaller;">Execute time is %s seconds.</div>', $en - $st); }
<?php /** * op-unit-markdown/action.php * * @creation 2015-11-15 * @version 1.0 * @package op-unit-markdown * @author Tomoaki Nagahara <*****@*****.**> * @copyright Tomoaki Nagahara All right reserved. */ // Markdown include './Markdown.model.php'; $md = new Model_Markdown(); $html = null; if ($file = Toolbox::GetRequest('file')) { $html .= $md->toHtml("testcase/{$file}.md"); } else { $html .= $md->toHtml('testcase/headline.md'); $html .= $md->toHtml('testcase/list.md'); $html .= $md->toHtml('testcase/paragraph.md'); $html .= $md->toHtml('testcase/decoration.md'); $html .= $md->toHtml('testcase/anchor.md'); $html .= $md->toHtml('testcase/image.md'); $html .= $md->toHtml('testcase/code.md'); $html .= $md->toHtml('testcase/blockquote.md'); } // Load index template. $this->Template('index.phtml', array('html' => $html));