JuKu /
JuKuCMS
| 1 | <?php |
||
| 2 | |||
| 3 | /** |
||
| 4 | * Copyright (c) 2018 Justin Kuenzel (jukusoft.com) |
||
| 5 | * |
||
| 6 | * Licensed under the Apache License, Version 2.0 (the "License"); |
||
| 7 | * you may not use this file except in compliance with the License. |
||
| 8 | * You may obtain a copy of the License at |
||
| 9 | * |
||
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
||
| 11 | * |
||
| 12 | * Unless required by applicable law or agreed to in writing, software |
||
| 13 | * distributed under the License is distributed on an "AS IS" BASIS, |
||
| 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||
| 15 | * See the License for the specific language governing permissions and |
||
| 16 | * limitations under the License. |
||
| 17 | */ |
||
| 18 | |||
| 19 | |||
| 20 | /** |
||
| 21 | * Project: RocketCMS |
||
| 22 | * License: Apache 2.0 license |
||
| 23 | * User: Justin |
||
| 24 | * Date: 30.03.2018 |
||
| 25 | * Time: 16:25 |
||
| 26 | */ |
||
| 27 | |||
| 28 | $start_time = microtime(true); |
||
| 29 | |||
| 30 | $end_time = microtime(true); |
||
| 31 | $exec_time = $end_time - $start_time; |
||
| 32 | |||
| 33 | define('ROOT_PATH', dirname(__FILE__) . "/../"); |
||
| 34 | |||
| 35 | require(ROOT_PATH . "system/packages/com.jukusoft.cms.xtpl/xtpl/xtemplate.class.php"); |
||
| 36 | |||
| 37 | $template = new XTemplate(dirname(__FILLE__) . "/index.tpl"); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 38 | |||
| 39 | $template->assign("CHARSET", "UTF-8"); |
||
| 40 | $template->assign("TITLE", "My title"); |
||
| 41 | $template->assign("CSS_HASH_ALL", "" . md5("test")); |
||
| 42 | $template->assign("JS_HASH_ALL_HEADER", md5("test")); |
||
| 43 | $template->assign("JS_HASH_ALL_FOOTER", md5("test")); |
||
| 44 | $template->assign("HTML_TEXT", "<b>A bold text</b>"); |
||
| 45 | $template->assign("{BASE_URL}", "/twig_performance/"); |
||
| 46 | $template->assign("STYLE_PATH", "styles/"); |
||
| 47 | $template->assign("USERID", -1); |
||
| 48 | $template->assign("USERNAME", "Guest"); |
||
| 49 | $template->assign("LOGOUT_URL", "logout.html"); |
||
| 50 | $template->assign("CONTENT", "test content"); |
||
| 51 | $template->assign("FOOTER", "FOOTER"); |
||
| 52 | $template->assign("COPYRIGHT", "Copyright (c) 2018 JuKuSoft.com"); |
||
| 53 | $template->assign("VERSION", "1.0.0"); |
||
| 54 | $template->assign("BUILD", "1001"); |
||
| 55 | |||
| 56 | $template->parse("main"); |
||
| 57 | echo $template->text("main"); |
||
| 58 | |||
| 59 | echo "<!-- Execution time: " . $exec_time . " seconds -->"; |
||
| 60 | |||
| 61 | ?> |
||
|
0 ignored issues
–
show
It is not recommended to use PHP's closing tag
?> in files other than templates.
Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore. A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever. Loading history...
|
|||
| 62 |