Help me. Chciałem zrobić sobie {IF... ale mi nie działa.
Mam tak:
  1. <?
  2. $tpl->read('edycja_profilu_dane');
  3. $tpl->load(array(
  4. "ACTION" => $PHP_SELF.'?site=login&amp;xcmd=edycja_db&amp;x=profilu',
  5. "URODZINY_D" => $urodziny_d,
  6. "URODZINY_M" => $urodziny_m,
  7. "URODZINY_R" => $urodziny_r,
  8. "ERROR_MAIL" => $error['mail'],
  9. "ERROR_ZAP" => $error['zap'],
  10. "ERROR_PASS" => $error['pass']
  11. ));
  12. echo $tpl->give();
  13. ?>

i w themie:
  1. <?php
  2. {IF:{ERROR_PASS}!=''}
  3. <tr><td class="x_01" colspan="2" style="font-color: red">{ERROR_PASS}</td></tr>
  4. {ENDIF}
  5. ?>
a if robie tak:
  1. <?
  2. $this->give=preg_replace_callback("/{IF:(.*)!=(.*)}(.*){ENDIF}/", 'ifs', $this->give);
  3. function ifs($match)
  4. {
  5. if($match[1]!=$match[3])
  6. {
  7. return $match[4];
  8. }
  9. else
  10. {
  11. return '';
  12. }
  13.  
  14. }
  15. ?>
I mi niestety nie działa sad.gif. Z góry dzienx. Pozdrawiam tongue.gif

Halo!! pomoze mi ktos