| @@ 1640-1649 (lines=10) @@ | ||
| 1637 | $content = str_replace(array('<?php', '<?=', '<?', '?>'), array("{$sp}b", "{$sp}p", "{$sp}s", "{$sp}e"), $content); |
|
| 1638 | ||
| 1639 | $pieces = explode('<@IF:', $content); |
|
| 1640 | foreach ($pieces as $i => $split) { |
|
| 1641 | if ($i === 0) { |
|
| 1642 | $content = $split; |
|
| 1643 | continue; |
|
| 1644 | } |
|
| 1645 | list($cmd, $text) = explode('>', $split, 2); |
|
| 1646 | $cmd = str_replace("'", "\'", $cmd); |
|
| 1647 | $content .= "<?php if(\$this->_parseCTagCMD('" . $cmd . "')): ?>"; |
|
| 1648 | $content .= $text; |
|
| 1649 | } |
|
| 1650 | $pieces = explode('<@ELSEIF:', $content); |
|
| 1651 | foreach ($pieces as $i => $split) { |
|
| 1652 | if ($i === 0) { |
|
| @@ 1651-1660 (lines=10) @@ | ||
| 1648 | $content .= $text; |
|
| 1649 | } |
|
| 1650 | $pieces = explode('<@ELSEIF:', $content); |
|
| 1651 | foreach ($pieces as $i => $split) { |
|
| 1652 | if ($i === 0) { |
|
| 1653 | $content = $split; |
|
| 1654 | continue; |
|
| 1655 | } |
|
| 1656 | list($cmd, $text) = explode('>', $split, 2); |
|
| 1657 | $cmd = str_replace("'", "\'", $cmd); |
|
| 1658 | $content .= "<?php elseif(\$this->_parseCTagCMD('" . $cmd . "')): ?>"; |
|
| 1659 | $content .= $text; |
|
| 1660 | } |
|
| 1661 | ||
| 1662 | $content = str_replace(array('<@ELSE>', '<@ENDIF>'), array('<?php else:?>', '<?php endif;?>'), $content); |
|
| 1663 | ob_start(); |
|