", "SJIS", "UTF-8" ); include( "/home/www/htdocs/share/error.htm" ); exit; } if( $satonoter && $satonoter->exist() ) { // } else { $error_msg = mb_convert_encoding( "ログインしていないと里山ノートを保存できません。
", "SJIS", "UTF-8" ); include( "/home/www/htdocs/share/error.htm" ); exit; } // DB 接続 if( ! ( $db = pg_connect( DB_CONN ) ) ) { $error_msg = mb_convert_encoding( "現在サーバーが保守中か大変混雑しているためご利用いただけません。
", "SJIS", "UTF-8" ); include( "/home/www/htdocs/share/error.htm" ); exit; } // イメージ保存 $tmpfn = "../tmp/" . time() . ".png"; pg_query( $db, "BEGIN" ); pg_lo_export( $db, $satonoter->getVal( SATONOTER_ICONIMAGE ), $tmpfn ); pg_query( $db, "COMMIT" ); $username = $satonoter->getVal( SATONOTER_NICKNAME ) . "さんの"; // $clearat = $satonoter->getAry( SATONOTER_A_COMPLETE, SATONOTE_VOL - 1 ); 2011/11/24 $clearat = $satonoter->getAry( SATONOTER_A_COMPLETE, 1 ); $pdf = new TCPDF( 'L', 'pt', PDF_PAGE_FORMAT, true, 'utf-8', false ); $pdf->SetCreator( PDF_CREATOR ); $pdf->SetAuthor( 'House Wellness Foods Corporation., Ltd.' ); $pdf->SetTitle( 'Genkiiro no Sato' ); $pdf->SetSubject( 'My Satoyama Note' ); $pdf->SetPrintHeader( false ); $pdf->SetDefaultMonospacedFont( PDF_FONT_MONOSPACED ); $pdf->setImageScale( PDF_IMAGE_SCALE_RATIO ); $pdf->setLanguageArray( $l ); // set font $pdf->SetFont( 'arialunicid0', '', 18 ); $pdf->AddPage(); // 背景イメージ // $pdf->Image( 'img/bg.png', 36, 52 ); $pdf->Image( 'img/bg_autumn.png', 36, 52 ); // ニックネーム $pdf->SetXY( 72, 200 ); $pdf->Write( 0, $username, '', 0, 'L', true, 0, false, false, 0 ); // クリア $pdf->SetXY( 72, 500 ); $pdf->Write( 0, $clearat, '', 0, 'L', true, 0, false, false, 0 ); // アイコンイメージ $pdf->Image( $tmpfn, 110, 320, 80, 80 ); // スタンプイメージ // $pdf->Image( "img/stamp01.png", 490, 408, 81, 78 ); // $pdf->Image( "img/stamp02.png", 343, 365, 80, 78 ); // $pdf->Image( "img/stamp03.png", 440, 307, 78, 76 ); // $pdf->Image( "img/stamp04.png", 567, 267, 78, 76 ); // $pdf->Image( "img/stamp05.png", 455, 204, 77, 80 ); // $pdf->Image( "img/stamp06.png", 346, 144, 79, 81 ); $pdf->Image( "img/stamp07.png", 490, 408, 81, 78 ); $pdf->Image( "img/stamp08.png", 343, 365, 80, 78 ); $pdf->Image( "img/stamp09.png", 440, 307, 78, 76 ); $pdf->Image( "img/stamp10.png", 567, 267, 78, 76 ); $pdf->Image( "img/stamp11.png", 455, 204, 77, 80 ); $pdf->Image( "img/stamp12.png", 346, 144, 79, 81 ); // var_dump( $satonoter->getStatus( SATONOTER_TRIVIA, SATONOTE_VOL, 0 ) ); exit; if( $satonoter->getStatus( SATONOTER_TRIVIA, SATONOTE_VOL, 0 ) == "1" ) { // $pdf->Image( "img/animal01.png", 450, 400, 58, 105 ); $pdf->Image( "img/animal07.png", 532, 390, 131, 59 ); } if( $satonoter->getStatus( SATONOTER_TRIVIA, SATONOTE_VOL, 1 ) == "1" ) { // $pdf->Image( "img/animal02.png", 250, 420, 103, 81 ); $pdf->Image( "img/animal08.png", 390, 400, 93, 81 ); } if( $satonoter->getStatus( SATONOTER_TRIVIA, SATONOTE_VOL, 2 ) == "1" ) { // $pdf->Image( "img/animal03.png", 380, 280, 68, 59 ); $pdf->Image( "img/animal09.png", 382, 280, 72, 90 ); } // var_dump( $satonoter->getStatus( SATONOTER_TRIVIA, SATONOTE_VOL, 3 ) ); exit; if( $satonoter->getStatus( SATONOTER_TRIVIA, SATONOTE_VOL, 3 ) == "1" ) { // $pdf->Image( "img/animal04.png", 650, 260, 117, 68 ); $pdf->Image( "img/animal10.png", 590, 320, 117, 68 ); } if( $satonoter->getStatus( SATONOTER_TRIVIA, SATONOTE_VOL, 4 ) == "1" ) { // $pdf->Image( "img/animal05.png", 520, 200, 73, 49 ); $pdf->Image( "img/animal11.png", 510, 180, 117, 77 ); } if( $satonoter->getStatus( SATONOTER_TRIVIA, SATONOTE_VOL, 5 ) == "1" ) { // $pdf->Image( "img/animal06.png", 440, 140, 69, 56 ); $pdf->Image( "img/animal12.png", 334, 205, 68, 77 ); } $pdf->AddPage(); $pdf->Image( 'img/page_01_aw.jpg', 36, 52 ); $pdf->AddPage(); $pdf->Image( 'img/page_02_aw.jpg', 36, 52 ); $pdf->Output( 'mynote.pdf', 'I' ); unlink( $tmpfn ); ?>