| @@ 1939-1948 (lines=10) @@ | ||
| 1936 | $content = str_replace(array('<?php', '<?=', '<?', '?>'), array("{$sp}b", "{$sp}p", "{$sp}s", "{$sp}e"), $content); |
|
| 1937 | ||
| 1938 | $pieces = explode('<@IF:', $content); |
|
| 1939 | foreach ($pieces as $i => $split) { |
|
| 1940 | if ($i === 0) { |
|
| 1941 | $content = $split; |
|
| 1942 | continue; |
|
| 1943 | } |
|
| 1944 | list($cmd, $text) = explode('>', $split, 2); |
|
| 1945 | $cmd = str_replace("'", "\'", $cmd); |
|
| 1946 | $content .= "<?php if(\$this->_parseCTagCMD('" . $cmd . "')): ?>"; |
|
| 1947 | $content .= $text; |
|
| 1948 | } |
|
| 1949 | $pieces = explode('<@ELSEIF:', $content); |
|
| 1950 | foreach ($pieces as $i => $split) { |
|
| 1951 | if ($i === 0) { |
|
| @@ 1950-1959 (lines=10) @@ | ||
| 1947 | $content .= $text; |
|
| 1948 | } |
|
| 1949 | $pieces = explode('<@ELSEIF:', $content); |
|
| 1950 | foreach ($pieces as $i => $split) { |
|
| 1951 | if ($i === 0) { |
|
| 1952 | $content = $split; |
|
| 1953 | continue; |
|
| 1954 | } |
|
| 1955 | list($cmd, $text) = explode('>', $split, 2); |
|
| 1956 | $cmd = str_replace("'", "\'", $cmd); |
|
| 1957 | $content .= "<?php elseif(\$this->_parseCTagCMD('" . $cmd . "')): ?>"; |
|
| 1958 | $content .= $text; |
|
| 1959 | } |
|
| 1960 | ||
| 1961 | $content = str_replace(array('<@ELSE>', '<@ENDIF>'), array('<?php else:?>', '<?php endif;?>'), $content); |
|
| 1962 | ob_start(); |
|