13 <!-- Content Wrapper. Contains page content -->
14 <div class=\"content-wrapper\" id=\"content-FX\">
15 <!-- Content Header (Page header) -->
16 <section class=\"content-header\">";
18 echo backend::getTitle(
$lang[
'WIDGET+'],
$lang[
'WIDGETS+_SUBTEXT']);
19 echo
"<ol class=\"breadcrumb\">
20 <li><a href=\"index.php\" title=\"$lang[DASHBOARD]\"><i class=\"fa fa-dashboard\"></i> $lang[DASHBOARD]</a></li>
21 <li><a href=\"index.php?page=widgets\" title=\"$lang[WIDGETS]\"> $lang[WIDGETS]</a></li>
22 <li class=\"active\"><a href=\"index.php?page=widget-new\" title=\"".$lang[
'WIDGET+'].
"\"> ".
$lang[
'WIDGET+'].
"</a></li>
26 <section class=\"content\">";
33 <div
class=
"col-md-5">
34 <div
class=
"box box-default">
35 <div
class=
"box-body">
36 <div
class=
"box-header with-border"><h3
class=
"box-title"><?php echo
$lang[
'WIDGET+']; ?></h3></div>
38 <form action=
"index.php?page=widgets&add=1" role=
"form" method=
"post">
39 <label
for=
"widgetType"><?php echo
$lang[
'CREATE']; ?>:</label>
40 <select
id=
"widgetType" name=
"widgetType" class=
"form-control">
41 <option value=
"empty" name=
"empty" disabled selected aria-disabled=
"true" aria-selected=
"true"><?php echo
$lang[
'SELECT_WIDGET']; ?></option>
43 foreach(
YAWK\widget::getWidgetsArray(
$db) as $widget){
44 echo
"<option value=\"".$widget[
'id'].
"\"";
46 if (isset($_POST[
'widget'])) {
47 if($_POST[
'widget'] ===
$page[
'id']){
48 echo
" selected=\"selected\"";
50 else if($widget->widget === $widget[
'id'] && !$_POST[
'widget']){
51 echo
" selected=\"selected\"";
54 echo
">".$widget[
'name'].
"</option>";
58 <label
for=
"pageID"><?php echo
$lang[
'ON_PAGE']; ?>:
59 <?php echo backend::printTooltip(
$lang[
'TT_WIDGET_PAGE']); ?></label>
60 <select
id=
"pageID" name=
"pageID" class=
"form-control">
61 <option value=
"0"><?php echo
$lang[
'ON_ALL_PAGES']; ?></option>
64 echo
"<option value=\"".$page[
'id'].
"\"";
66 if (isset($_POST[
'pageID'])) {
67 if($_POST[
'pageID'] ===
$page[
'id']){
68 echo
" selected=\"selected\"";
70 else if(
$page->page ===
$page[
'id'] && !$_POST[
'page']){
71 echo
" selected=\"selected\"";
74 echo
">".$page[
'title'].
"</option>";
78 <label
for=
"position"><?php echo
$lang[
'AT_POSITION']; ?>
79 <?php echo backend::printTooltip(
$lang[
'TT_WIDGET_POS']); ?></label>
80 <select
id=
"position" name=
"positions" class=
"form-control">
81 <option value=
""></option>
86 echo
"<option value=\"".$position[
$i].
"\"";
88 if (isset($_POST[
'positions'])) {
89 if($_POST[
'0'] ===
$position[
'positions']){
90 echo
" selected=\"selected\"";
93 echo
" selected=\"selected\"";
96 echo
">".$position[
$i].
"</option>";
101 <input
type=
"submit" class=
"btn btn-success pull-right" value=
"<?php echo $lang['CREATE']; ?>">
106 <div
class=
"col-md-7">
107 <div
class=
"box box-default">
108 <div
class=
"box-body">
109 <div
class=
"box-header with-border"><h3
class=
"box-title"><?php echo
$lang[
'WIDGET'].
" ".
$lang[
'OVERVIEW']; ?></h3></div>
110 <div
class=
"box-body">
119 if (is_dir(
'../system/widgets/'.$widget[
'folder'].
'/language/'))
125 echo
'<div class="box box-default">';
126 echo
'<div class="box-header with-border"><h3 class="box-title"><b>'.$widget[
'name'].
'</b></h3>
127 <br><span class="text-muted">'.$widget[
'description'].
'</span>';
128 if ($widget[
'status'] != 1) { echo
'WIDGET IS DISABLED'; }
129 echo
'<small><span class="pull-right text-muted">ID: '.$widget[
'id'].
'</span></small>
132 echo
'<div class="box-body">';
133 echo
'<div class="row">';
135 if (!empty($widget[
'icon']))
137 if (!empty($widget[
'color'])){ $colorMarkup =
'color:#'.$widget[
'color'].
';'; }
138 else { $colorMarkup=
'color:#666'; }
139 echo
'<div class="col-md-4 text-center" style="top:-20px;">';
140 echo
'<h1><i class="'.$widget[
'icon'].
'" style="vertical-align:middle;'.$colorMarkup.
'"></i></h1>';
143 echo
'<div class="col-md-4 text-center">';
147 echo
'<div class="col-md-8">';
149 if (!empty($widgetLang[
'WIDGET_INFO']))
151 echo $widgetLang[
'WIDGET_INFO'];
155 echo
'<small class="text-muted">'.$lang[
'WIDGET_INFO_MISSING'].
'<br><small>add WIDGET_INFO to system/widgets/'.$widget[
'folder'].
'/language/</small></small>';
print $lang['FILEMAN_UPLOAD']
Backend class serves a few useful functions for the admin backend.
Mysqli database class; returns db connection object.
The language class - support multilingual backend.
static inject(array $lang, string $pathToFile)
allow plugins to inject language tags to $lang array
This class serves methods to create backup from files.