Skip to content

Commit

Permalink
add is file exists
Browse files Browse the repository at this point in the history
  • Loading branch information
ibnux committed Mar 3, 2024
1 parent 0745532 commit 77e48da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion ui/ui/user-dashboard.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@
<h3 class="box-title">{Lang::T('Announcement')}</h3>
</div>
<div class="box-body">
{include file="$_path/../pages/Announcement_Customer.html"}
{$Announcement_Customer = "{$PAGES_PATH}/Announcement_Customer.html"}
{if file_exists($Announcement_Customer)}
{include file=$Announcement_Customer}
{/if}
</div>
</div>
</div>
Expand Down
5 changes: 4 additions & 1 deletion ui/ui/user-login.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@
<div class="panel panel-info">
<div class="panel-heading">{Lang::T('Announcement')}</div>
<div class="panel-body">
{include file="$_path/../pages/Announcement.html"}
{$Announcement = "{$PAGES_PATH}/Announcement.html"}
{if file_exists($Announcement)}
{include file=$Announcement}
{/if}
</div>
</div>
</div>
Expand Down

0 comments on commit 77e48da

Please sign in to comment.