root/websites/planet.php.gr.jp/trunk/app/plugin_smarty/block.if_admin.php
@
13476
| Revision 13476, 507 bytes (checked in by maru_cc, 5 years ago) | |
|---|---|
|
|
| Line | |
|---|---|
| 1 | <?php |
| 2 | /** |
| 3 | * block.if_admin.php |
| 4 | * |
| 5 | * @author maru_cc <tomoyuki.maruta@gmail.com> |
| 6 | * @package Haste |
| 7 | * @version $Id: $ |
| 8 | */ |
| 9 | |
| 10 | /** |
| 11 | * if admin |
| 12 | * |
| 13 | * @access public |
| 14 | * @author maru_cc <tomoyuki.maruta@gmail.com> |
| 15 | */ |
| 16 | function smarty_block_if_admin($params, $content, &$smarty, &$repeat) |
| 17 | { |
| 18 | if(!$repeat){ |
| 19 | if (isset($content)) { |
| 20 | if (!strlen($_SESSION['name']) || !$_SESSION['admin']) { |
| 21 | return ''; |
| 22 | } |
| 23 | return $content; |
| 24 | } |
| 25 | } |
| 26 | } |
| 27 | ?> |
Note: See TracBrowser
for help on using the browser.
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)