To jest tylko wersja do druku, aby zobaczyć pełną wersję tematu, kliknij TUTAJ
phpBB2 by Przemo
Support forów phpBB2 modified by Przemo

Problem z modyfikacją - [PROBLEM] Generator Blankietów Przelewu podglad wydruku

mafialuka - 24-04-2011, 12:23
Temat postu: [PROBLEM] Generator Blankietów Przelewu podglad wydruku
Witam mam problem z tym modem wersja blankiet 2.0

Pisałem w temacie http://www.przemo.org/php...ic.php?t=101341

Tez mam problem z title ;/

Kod:
$tytulprzelewu    = 'Tytul przelewu'.' '.$nick;



Kod:
$tytulprzelewu    = 'Admin'.' '.$nick;



I pokazuje tylko Admin bez nicka na forum ;/ albo samo Tytuł Przelewu. Formularz mam nasztywno nick z forum.

Pomocy ; )

Majkelo - 24-04-2011, 12:29

2.0 :?:
mafialuka - 24-04-2011, 13:11

by bobek97

http://www.przemo.org/php...er,asc,start,15

kevin_ - 24-04-2011, 13:14

nie chce mi sie pobierać moda, ale masz w ogóle zdefiniowaną zmienną $nick?

ewentualnie zastąp ją na:
Kod:

phpbb_clean_username($userdata['username'])

mafialuka - 24-04-2011, 13:33

Hmm chyba nie mam. A w którym miejscu?

druczek body tpl


Kod:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2">
<link rel="shortcut icon" href="favicon.ico" />
<style type="text/css">
    .main { position: relative; width: 610px; height: 395px; font-family: Courier New; font-size: 12pt; font-weight: bold; letter-spacing:9.1px; }
    .blankiet1 { z-index:0; }
    .blankiet2 { z-index:1; }
  .odbiorca1 { position: absolute; top: 17px; left: 50px;text-transform:uppercase}
    .odbiorca2 { position: absolute; top: 48px; left: 50px;text-transform:uppercase}
    .konto1 { position: absolute; top: 82px; left: 52px;text-transform:uppercase }
    .konto2 { position: absolute; top: 114px; left: 50px;text-transform:uppercase }
    .konto3 { position: absolute; top: 114px; left: 260px;text-transform:uppercase }
    .kwota1 { position: absolute; top: 114px; left: 338px;text-transform:uppercase }
    .kwota2 { position: absolute; top: 143px; left: 61px;text-transform:uppercase }
    .zlec1 { position: absolute; top: 175px; left: 50px;text-transform:uppercase }
    .zlec2 { position: absolute; top: 205px; left: 50px;text-transform:uppercase }
    .tytul1 { position: absolute; top: 236px; left: 50px;text-transform:uppercase }
    .tytul2 { position: absolute; top: 331px; left: 50px;text-transform:uppercase }
</style>

</head>
<body>
<form><input type="button" value="Drukuj" onclick="window.print();" style="font-family: Arial, Helvetica; font-size: 10pt;" ></form>
<div class="main">
<div class="blankiet1"><img src="{BLANKIET}" border="0" style="width: 610px; height: 395px;"></div>
<div class="blankiet2">
    <div class="odbiorca1">{ODBIORCA1}</div>
    <div class="odbiorca2">{ODBIORCA2}</div>
    <div class="konto1">{NRKONTA1}</div>
    <div class="konto2">{NRKONTA2}</div>
    <div class="konto3">{WALUTA}</div>
    <div class="kwota1">10,-</div>
    <div class="kwota2">dziesięć złotych</div>
    <div class="zlec1">{IMIENAZWISKO}</div>
    <div class="zlec2">{ADRES}</div>
    <div class="tytul1">{TYTUL}</div>
</div>
</div>
<div class="main">
<div class="blankiet1"><img src="{BLANKIET}" border="0" style="width: 610px; height: 395px;"></div>
<div class="blankiet2">
    <div class="odbiorca1">{ODBIORCA1}</div>
    <div class="odbiorca2">{ODBIORCA2}</div>
    <div class="konto1">{NRKONTA1}</div>
    <div class="konto2">{NRKONTA2}</div>
    <div class="konto3">{WALUTA}</div>
    <div class="kwota1">10,-</div>
    <div class="kwota2">dziesięć złotych</div>
    <div class="zlec1">{IMIENAZWISKO}</div>
    <div class="zlec2">{ADRES}</div>
    <div class="tytul1">{TYTUL}</div>
</div>
</div>
</body>
</html>


przelew body tpl

Kod:
<table class="forumline" width="100%" align="center" border="0">
<tr>
<th class="thHead" colspan="3" align="center"><font color=white>Generator Płatno&#347;ci SilentShot.pl</font></th>

<tr>
<td class="row1" align="center"><span class="postbody"><strong><font color=white>Informacje</font></strong></span></td>
<td class="row1" align="center"><span class="postbody"><strong><font color=white>Uzupełnij</font></strong></span></td>
</tr>
<tr>
<td class="row1" align="center"><span class="postbody"></td>
<td class="row1" align="center"><span class="postbody"></span></td>
</tr>
<form action="druczek.php" method="post">
<DL>

<tr>
<td class="row1" align="center"><span class="postbody"><label for="kwota"><font color=white>Kwota:</font></label></td>
<td class="row1" align="center"></input><font color=white>10 zł</span></td>

</tr>

<tr>
<td class="row1" align="center"><span class="postbody"><label for="kwotaslownie" maxlength="26"><font color=white>Kwota słownie:</font></label></td>
<td class="row1" align="center"><span class="postbody"><font color=white>dziesięć złotych</font></span></td>

</tr>
       
       
<tr>
<td class="row1" align="center"><span class="postbody"><label for="imieinazw"><font color=white>Twoje Imię i nazwisko + adres zamieszkania:</font></label></td>
<td class="row1" align="center"><span class="postbody"><input name="imieinazw" type="text" size=30 maxlength=27 />  &nbsp;&nbsp;</span></td>
</tr>
    <tr>
<td class="row1" align="center"><span class="postbody"><label for="adres"><font color=white>Twój adres zamieszkania cd:</font></label></td>
<td class="row1" align="center"><span class="postbody"><input name="adres" type="text" size=30 maxlength=27 />&nbsp;&nbsp;</span></td>
</tr>
    <tr>
<td class="row1" align="center"><span class="postbody"><label for="nick"><font color=white>Twój nick z forum:</font></label></td>

<td class="row1" align="center"><span class="postbody"><input name="nick" type="text" size=30 maxlength=27 value="{NICKFORUM}" readonly/>&nbsp;&nbsp;</span></td>
</tr>

        <tr>
<td class="row1" align="center"><span class="postbody"><label for="tyt1"><font color=white>Generuj</font></label></td>
<td class="row1" align="center"><span class="postbody"><label for="tyt1"><input type="submit" name="submit"  value="Wykonaj"></input>

</tr>
    </table>
</DL>
</form>


druczek.php

Kod:
<?php

define('IN_PHPBB', false);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

$page_title = 'Blankiet Przelewu';


//Konfiguracja
$odbiorca1         = 'SilentShot.pl';
$odbiorca2        = '';
$nrkonta1        = '04 124063511111001033283064';
$nrkonta2        = '';
$waluta            = 'PLN';
//Tytuł = Tytuł przelewu (np przemo.org) . Odstęp (spacja) . Nick z forum
$tytulprzelewu    = 'Tytul przelewu'.' '.$nick;
//Wszystkie POST'y
$kwota            = htmlspecialchars(trim($_POST['kwota']));
$kwotaslownie    = htmlspecialchars(trim($_POST['kwotaslownie']));
$imieinazw        = htmlspecialchars(trim($_POST['imieinazw']));
$adres            = htmlspecialchars(trim($_POST['adres']));
$nick            = htmlspecialchars(trim($_POST['nick']));
$template->set_filenames(array(
        'body' => 'druczek_body.tpl')
    );
   
    $template->assign_vars(array(
            'ODBIORCA1' => $odbiorca1,
            'ODBIORCA2' => $odbiorca2,
            'TYTUL' => $tytulprzelewu,
            'KWOTA' => $kwota,
            'KWOTASL' => $kwotaslownie,
            'IMIENAZWISKO' => $imieinazw,
            'ADRES' => $adres,
            'NRKONTA1' => $nrkonta1,
            'NRKONTA2' => $nrkonta2,
            'WALUTA' => $waluta,
            'BLANKIET' => $images['blankiet']
        ));
       
    $template->pparse('body');


?>


przelew.php

Kod:
<?php

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

$page_title = 'Generator Płatno&#347;ci SilentShot.pl';

include($phpbb_root_path . 'includes/page_header.'.$phpEx);

$template->set_filenames(array(
        'body' => 'przelew_body.tpl')
    );
   
    $template->assign_vars(array(
            'NICKFORUM' => $userdata['username']
        ));
       
    $template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>

kevin_ - 24-04-2011, 13:38

druczek.php, w złym miejscu masz zmienna $nick zdefiniowaną stąd nie wyświetla się login.
to:
Kod:

$nick            = htmlspecialchars(trim($_POST['nick']));


po np.
Kod:

$page_title = 'Blankiet Przelewu';


powinno zadziałać

mafialuka - 24-04-2011, 15:21

thx wielkie :)


Powered by phpBB modified by Przemo © 2003 phpBB Group