Not sure how to put this...

Let's say you are developing a commercial script. To prevent someone from copying/reselling your code, you encode your PHP scripts with something like Zend Encoder.

But now, whoever buys your scripts are unable to change anything design-wise except through external CSS or something.

So, what is a good way to deploy scripts but still giving the customer control over the design/HTML?

One script I've seen (from GoldCoders [yuck]), uses these files called something.tpl which just has the HTML and then some inline code which looks like PHP code but it is embedded with { } braces.

If you want to see what I mean, you can download the free script and look at the code:
http://www.goldcoders.com/?page=hyiplister

Here is a snippet...

HTML Code:
<td colspan=4>
  {if $listing.hyip_status == 1}<img src="images/m_pay.gif" border=0 alt="Paying" title="Paying" align=absmiddle>{/if}
  {if $listing.hyip_status == 2}<img src="images/m_wait.gif" border=0 alt="Waiting" title="Waiting" align=absmiddle>{/if}
  {if $listing.hyip_status == 3}<img src="images/m_prob.gif" border=0 alt="Problem" title="Problem" align=absmiddle>{/if}
  {if $listing.hyip_status == 4}<img src="images/m_npay.gif" border=0 alt="Not Paying" title="Not Paying" align=absmiddle>{/if}
 </td>
I'm guessing those .tpl files are included() but how are they embedding PHP code in them?

What is a good way to deploy encoded PHP scripts, and still letting the customer change the design?

I use external CSS files for all of the design-related content but I think more control would be better...