Exemple #1
0
<?php

require_once "config.php";
require_once DIR_LIB . "SetUpPC.php";
require_once DIR_LIB_COMMON . 'Template/MyTemplateEngine.php';
require_once DIR_HTDOCS . "formList.php";
$form = new formList();
// セッションの値を置換用変数にセットします					<---issetで調べる必要あり?
$items = $_SESSION;
// 選択項目のリストをセットします
foreach ($form->form_list as $form_name => $array) {
    foreach ($array as $key => $val) {
        $items[$form_name . "_list"][] = array($form_name . "_code" => $key, $form_name => $val);
    }
}
$tpl = new MyTemplateEngine();
// values, ignore_escape, add_br, ignore_encode, succeed_value
$tpl->showAll($items);
// echo "<pre>";
// print_r($_SESSION);
// echo "</pre>";
session_destroy();
Exemple #2
0
<?php

require_once "config.php";
require_once DIR_LIB . "SetUpPC.php";
require_once DIR_LIB_FUNCTION . "DB/Usersql.php";
require_once DIR_LIB_COMMON . 'Template/MyTemplateEngine.php';
// Template系
$items = array();
$DB = new DBUsersql();
$items["company_count"] = $DB->company->countAll();
$items["COMPANY_LIST"] = $DB->company->getAllCompany();
echo "<pre>";
print_r($items);
echo "</pre>";
// $new_company = array(
// 		"account" => "*****@*****.**",
// 		"password" => "xKeitax48",
// 		"created_at" => date("Y-m-d H:i:s")
// 	);
// $update_company = array(
// 		"company_id" => "3",
// 		"account" => "aaaa",
// 		"password" => "bbbbb"
// 	);
// $DB->company->insertOne($new_company);
// $DB->company->upsertOne($update_company);
$tpl = new MyTemplateEngine();
// values, ignore_escape, add_br, ignore_encode, succeed_value
$tpl->showAll($items, array("company_count"));
exit;