This is an example:

....    
    
                              <SPAN class="{$color_cf}">Cod: </SPAN>
                              [color=#ff0033]{if $prev eq "ok"}[/color]
                                 <span 
class="testonero">{$cf_prod}</span><input name="cf_prod"
type="hidden" value="{$cf_prod}" size="25" maxlength="16">

                  
                              [color=#ff0033]{else}[/color]
                                 <input name="cf_prod" type="text" 
id="text_cf_prod" 
value="{$cf_prod}" size="25" maxlength="16">
                  </td>
                    </tr> 
                                   <input name="tipologia" id="tipologia" 
type="hidden"
value="PS" size="2">                       
                                </td>
                              </tr>   
                              [color=#ff0033]{/if}[/color]


Smarty is the most important template engine in php that allows separation
between html code (view) and php code (model & controller)

{if $prev eq "ok"}
 then html code will be:  <span class="testonero">{$cf_prod}</span><input
name="cf_prod" type="hidden" value="{$cf_prod}" size="25" maxlength="16">

else the html code will be:

 <input name="cf_prod" type="text" id="text_cf_prod"  value="{$cf_prod}"
size="25" maxlength="16">
                  </td>
                    </tr> 
                                   <input name="tipologia" id="tipologia" 
type="hidden"
value="PS" size="2">                       
                                </td>
                              </tr>   

The: [color=#ff0033]{if $prev eq "ok"}[/color], [color=#ff0033]{else}[/color]
and [color=#ff0033]{/if}[/color], [color=#ff0033]{$cf_prod}[/color]..etc.. is
smarty syntax embedd in html code

-- 
<http://forum.pspad.com/read.php?6,35337,35723>
PSPad freeware editor http://www.pspad.com

Odpovedet emailem