]>
src.bluestatic.org Git - isso.git/blob - dev/conditionaltest.php
2 // <if> conditional tests
9 require_once('../kernel.php');
12 $isso->apppath
= $isso->fetch_sourcepath(getcwd());
13 $isso->sourcepath
= $isso->fetch_sourcepath($isso->apppath
. '../');
14 $isso->application
= 'Template Test';
15 $isso->appversion
= '$Id$';
18 $isso->load('template
');
20 // ###################################################################
22 $data = '<tr valign
="middle">
24 <span style
="float: right; display: inline" class="smallfont">
25 1 <if condition
="$show[\'edit\']">
26 2 <if condition
="$show[\'receive\']">
27 <a href
="item.php?do=finishget&id=$iteminfo[itemid]" title
="Remove"><img src
="{$template->templatedir}images/remove_item.png" alt
="Remove Item" border
="0" /></a
>
29 <a href
="item.php?do=edit&id=$iteminfo[itemid]" title
="Edit"><img src
="{$template->templatedir}images/edit_item.png" alt
="Edit Item" border
="0" /></a
>
30 <a href
="item.php?do=got&id=$iteminfo[itemid]" title
="Received"><img src
="{$template->templatedir}images/receive_item.png" alt
="Received Item" border
="0" /></a
>
33 3 <if condition
="$show[\'purchase\'] OR $show[\'unpurchase\']">
34 4 <if condition
="$show[\'purchase\']">
35 <a href
="item.php?do=purchase&id=$iteminfo[itemid]" title
="Purchase"><img src
="{$template->templatedir}images/purchase_item.png" alt
="Purchase Item" border
="0" /></a
>
37 5 <if condition
="$show[\'unpurchase\']">
38 <a href
="item.php?do=unpurchase&id=$iteminfo[itemid]" title
="Un-purchase"><img src
="{$template->templatedir}images/unpurchase_item.png" alt
="Un-purchase Item" border
="0" /></a
>
41 (<a href
="mailto:$iteminfo[email]">$iteminfo[email
]</a
>)
46 <if condition
="$iteminfo[\'url\']"><a href
="$iteminfo[url]" target
="_blank">$iteminfo[name
]</a
><else />$iteminfo[name
]</if>
48 <td
class="alt2">$iteminfo[price
]</td
>
49 <td
class="alt1">$iteminfo[rating
]</td
>
50 <td
class="alt2">$iteminfo[notes
]</td
>
51 <td
class="alt1">$iteminfo[dateline
]</td
>
54 // ###################################################################
56 $data2 = '1 <if condition
="test"> -0
57 2 <if condition
="hi"> -1
61 3 <if condition
="a"> -2
69 4 <if condition
="hi"> -1
72 5 <if condition
="asdfa"> -2
80 // ###################################################################
93 // ###################################################################
95 $parsed = $template->_parse($data2);
99 echo highlight_string('$test = "' . $parsed . '";', true);
103 eval('$test = "' . $parsed . '";');