Ejemplo n.º 1
0
/***********************
 * 定義
***********************/
require_once "cinderella/ipfTemplate.php";
require_once "cinderella/ipfDB.php";
/***********************
 * セッション格納処理
***********************/
require_once "cinderella/user_class/startingClass.php";
$ins_startingClass = new startingClass();
$sysinfo = $ins_startingClass->getStartingData(9);
//9はログインチェックしない
/***********************
 * コンストラクタ
***********************/
$ins_ipfTemplate = new ipfTemplate();
$ins_ipfDB = new ipfDB();
$ins_ipfDB->ini("cinderella");
$INI_DATA = parse_ini_file("cinderella/ipf.ini");
require_once "define.php";
/***********************
 * 画面表示処理
***********************/
//自動ログイン
$coupon_id = $_GET['id'];
$PAGE_VALUE['coupon_id'] = $coupon_id;
if (!$coupon_id) {
    header('Location: index.php');
}
$PAGE_VALUE[comment_img_err] = '';
$PAGE_VALUE['comment'] = $_POST['comment'];
Ejemplo n.º 2
0
<?
require_once "./ipfTemplate.php";
$a = new ipfTemplate();

//ループのサンプル
//サンプルのため$valuesという連想配列を作っておく、通常はDBからのデータを入れる
$values[0] = array(
			"name" => "日本太郎",
			"address" => "東京都皇居1-1-1",
			"email" => "*****@*****.**"
);
$values[1] = array(
			"name" => "東京花子",
			"address" => "東京都東京区2-2-2",
			"email" => "*****@*****.**"
);

$values2[0] = array(
			"name" => "2日本太郎",
			"address" => "2東京都皇居1-1-1",
			"email" => "*****@*****.**"
);
$values2[1] = array(
			"name" => "2東京花子",
			"address" => "2東京都東京区2-2-2",
			"email" => "*****@*****.**"
);

$templateData2 = $a->loadTemplate("hoge2.template");//明示的にテンプレートファイルを指定する
foreach($values as $value){
	 $result2 .= $a->makeTemplateData($templateData2, $value);//「.=」である点に注意