11 if (!isset($language) || (!isset(
$lang)))
13 $lang = language::inject(@
$lang,
"../system/plugins/signup/language/");
18 if (!isset($template)){
19 $template =
new template(
$db);
22 include
'../system/plugins/signup/classes/backend.php';
26 <!-- Content Wrapper. Contains page content -->
27 <div class=\"content-wrapper\" id=\"content-FX\">
28 <!-- Content Header (Page header) -->
29 <section class=\"content-header\">";
31 echo \YAWK\backend::getTitle(
$lang[
'SIGNUP'],
$lang[
'SIGNUP_SUBTEXT']);
32 echo
"<ol class=\"breadcrumb\">
33 <li><a href=\"index.php\" title=\"$lang[DASHBOARD]\"><i class=\"fa fa-dashboard\"></i> $lang[DASHBOARD]</a></li>
34 <li class=\"active\"><a href=\"index.php?page=pages\" title=\"$lang[PAGES]\"> $lang[PAGES]</a></li>
38 <section class=\"content\">";
42 if (isset($_POST[
'sent']))
44 if ($_POST[
'sent'] ===
'1')
46 foreach ($_POST as $property =>
$value)
48 if ($property !=
"sent")
50 if (substr($property, -5, 5) ==
'-long')
54 \YAWK\alert::draw(
"warning",
"$lang[ERROR]",
"Long Settings: Could not set long value <b>$value</b> of property <b>$property</b>",
"plugin=signup",
"4800");
57 else if (substr($property, -4, 4) ==
'-tpl')
59 if (!\
YAWK\settings::setTemplateSetting(
$db, $property,
$value))
61 \YAWK\alert::draw(
"warning",
"Error",
"Template Settings: Could not set template setting <b>$value</b> of property <b>$property</b>",
"plugin=signup",
"4800");
65 else if ($property ==
"signup_tospage")
67 if (empty($_POST[
'signup_tospage']))
74 \YAWK\alert::draw(
"warning",
"Error!",
"Settings: Could not set value <b>$value</b> of property <b>$property</b>",
"plugin=signup",
"4800");
77 $plugin = array(
"tos", $_POST[
'signup_tospage'], $_POST[
'signup_terms-long']);
78 if (!\
YAWK\plugin::createPluginPage(
$db, $_POST[
'signup_tospage'],
$plugin))
80 \YAWK\alert::draw(
"danger",
"Error!",
"Could not create terms of service page.",
"",
"");
84 else if ($property ==
"gid")
86 \YAWK\PLUGINS\SIGNUP\backend::setAllowedGroup(
$db,
$value);
100 $leftHtml =
"checked";
105 $rightHtml =
"checked";
110 $plainHtml =
"checked";
115 $centerHtml =
"checked";
123 if (\
YAWK\settings::getSetting(
$db,
"signup_firstname") ===
'1') {
124 $firstnameHtml =
"checked";
129 if (\
YAWK\settings::getSetting(
$db,
"signup_lastname") ===
'1') {
130 $lastnameHtml =
"checked";
135 if (\
YAWK\settings::getSetting(
$db,
"signup_street") ===
'1') {
136 $streetHtml =
"checked";
141 if (\
YAWK\settings::getSetting(
$db,
"signup_zipcode") ===
'1') {
142 $zipcodeHtml =
"checked";
147 if (\
YAWK\settings::getSetting(
$db,
"signup_city") ===
'1') {
148 $cityHtml =
"checked";
153 if (\
YAWK\settings::getSetting(
$db,
"signup_country") ===
'1') {
154 $countryHtml =
"checked";
159 if (\
YAWK\settings::getSetting(
$db,
"signup_gid") ===
'0'){
163 $gidHtmlOn =
"checked";
168 if (\
YAWK\settings::getSetting(
$db,
"userpage_hellogroup") ===
'1'){
169 $hellogroupHtml =
"checked"; }
171 $hellogroupHtml =
"";
173 if (\
YAWK\settings::getSetting(
$db,
"userpage_hello") ===
'1'){
174 $helloHtml =
"checked"; }
178 if (\
YAWK\settings::getSetting(
$db,
"userpage_msgplugin") ===
'1'){
179 $msgpluginHtml =
"checked"; }
183 if (\
YAWK\settings::getSetting(
$db,
"userpage_settings") ===
'1'){
184 $settingsHtml =
"checked"; }
188 if (\
YAWK\settings::getSetting(
$db,
"userpage_stats") ===
'1'){
189 $statsHtml =
"checked"; }
193 if (\
YAWK\settings::getSetting(
$db,
"userpage_help") ===
'1'){
194 $helpHtml =
"checked"; }
198 if (\
YAWK\settings::getSetting(
$db,
"userpage_profile") ===
'1'){
199 $profileHtml =
"checked"; }
203 if (\
YAWK\settings::getSetting(
$db,
"userpage_admin") ===
'1'){
204 $adminHtml =
"checked"; }
208 if (\
YAWK\settings::getSetting(
$db,
"userpage_dashboard") ===
'1'){
209 $dashboardHtml =
"checked"; }
213 if (\
YAWK\settings::getSetting(
$db,
"signup_adultcheck") ===
'1'){
214 $adultCheckHtml =
"checked"; }
216 $adultCheckHtml =
"";
220 <script
type=
"text/javascript" src=
"../system/plugins/signup/js/admin.js"></script>
222 <div
class=
"box box-default">
223 <div
class=
"box-body">
224 <form action=
"index.php?plugin=signup" class=
"form-inline" role=
"form" name=
"settings" method=
"POST">
226 <ul
class=
"nav nav-tabs" role=
"tablist">
227 <li role=
"presentation" class=
"active"><
a href=
"#layout" aria-controls=
"layout" role=
"tab" data-toggle=
"tab"><
i class=
"fa fa-object-group"></
i> &
nbsp;<?php echo
"$lang[LAYOUT]"; ?></
a>
229 <li role=
"presentation"><
a href=
"#groups" aria-controls=
"groups" role=
"tab" data-toggle=
"tab"><
i class=
"fa fa-users"></
i> &
nbsp;<?php echo
"$lang[USER_GROUPS]"; ?></
a></li>
230 <li role=
"presentation"><
a href=
"#fields" aria-controls=
"fields" role=
"tab" data-toggle=
"tab"><
i class=
"fa fa-exclamation-triangle"></
i> &
nbsp;<?php echo
"$lang[MANDATORY_FIELDS]"; ?></
a></li>
231 <li role=
"presentation"><
a href=
"#text" aria-controls=
"text" role=
"tab" data-toggle=
"tab"><
i class=
"fa fa-check-square-o"></
i> &
nbsp;<?php echo
"$lang[TEXT_BTN_STYLE]"; ?></
a></li>
232 <li role=
"presentation"><
a href=
"#termstab" aria-controls=
"termstab" role=
"tab" data-toggle=
"tab"><
i class=
"fa fa-legal"></
i> &
nbsp;<?php echo
"$lang[TERMS_OF_SERVICE]"; ?></
a></li>
236 <div
class=
"tab-content">
237 <div role=
"tabpanel" class=
"tab-pane fade in active" id=
"layout">
239 <!-- SUBMIT BUTTON -->
240 <input
type=
"submit" class=
"btn btn-success pull-right" value=
"<?php print $lang['SETTINGS_SAVE']; ?>">
241 <input
type=
"hidden" name=
"sent" value=
"1">
245 <legend><
i class=
"fa fa-object-group"></
i> &
nbsp;<?php print
"$lang[LAYOUT] <small>$lang[LAYOUT_SUBTEXT]</small>"; ?></legend>
246 <input
type=
"radio" id=
"layout_p" name=
"signup_layout" class=
"form-control" value=
"plain" <?php echo $plainHtml;?>>
247 <label
for=
"layout_p"><?php print
"$lang[COL_LAYOUT_1]"; ?></label><br>
248 <input
type=
"radio" id=
"layout_r" name=
"signup_layout" class=
"form-control" value=
"right" <?php echo $rightHtml;?>>
249 <label
for=
"layout_r"><?php print
"$lang[COL_LAYOUT_2]"; ?></label><br>
250 <input
type=
"radio" id=
"layout_l" name=
"signup_layout" class=
"form-control" value=
"left" <?php echo $leftHtml;?>>
251 <label
for=
"layout_l"><?php print
"$lang[COL_LAYOUT_3]"; ?></label><br>
252 <input
type=
"radio" id=
"layout_c" name=
"signup_layout" class=
"form-control" value=
"center" <?php echo $centerHtml;?>>
253 <label
for=
"layout_c"><?php print
"$lang[COL_LAYOUT_4]"; ?></label><br><br><br>
257 <legend><
i class=
"fa fa-header"></
i> &
nbsp;<?php echo
"$lang[SIGNUP_TITLE_TEXT] <small>$lang[SIGNUP_TITLE_SUBTEXT]</small>"; ?></legend>
258 <label
for=
"title"><?php echo
"$lang[SIGNUP_TITLE_TEXT] <small>($lang[SIGNUP_TITLE_LABEL_SUBTEXT])</small>"; ?></label><br>
259 <input
type=
"text" id=
"title" name=
"signup_title" class=
"form-control" size=
"64" value=
"<?php echo \YAWK\settings::getSetting($db, "signup_title
");?>" title=
"<?php echo "$lang[SIGNUP_TITLE_TEXT]
"; ?>"><br><br><br>
263 <legend><
i class=
"fa fa-question-circle"></
i> &
nbsp;<?php echo
"$lang[SIGNUP_ADULT_CHECK] <small>$lang[SIGNUP_ADULT_CHECK_SUBTEXT]</small>"; ?></legend>
264 <input
type=
"hidden" value=
'0' name=
"signup_adultcheck">
265 <input
type=
"checkbox" id=
"adultCheck" name=
"signup_adultcheck" class=
"form-control" value=
"1" title=
"<?php echo "$lang[SIGNUP_ADULT_CHECK]
"; ?>" <?php echo $adultCheckHtml; ?>>
266 <label
for=
"adultCheck"><?php echo
"$lang[ENABLE]?"; ?> <small><?php echo
"$lang[SIGNUP_ADULT_CHECK]"; ?></small></label>
269 <div role=
"tabpanel" class=
"tab-pane fade in" id=
"groups">
271 <!-- SUBMIT BUTTON -->
272 <input
type=
"submit" class=
"btn btn-success pull-right" value=
"<?php print $lang['SETTINGS_SAVE']; ?>">
273 <input
type=
"hidden" name=
"sent" value=
"1">
275 <!-- group selector -->
277 <legend><
i class=
"fa fa-users"></
i> &
nbsp;<?php echo
"$lang[SIGNUP_GROUP_TITLE] <small>$lang[SIGNUP_GROUP_TITLE_SUBTEXT]</small>";?></legend>
278 <input
type=
"radio" id=
"gidselect1" name=
"signup_gid" class=
"form-control" value=
"1" <?php echo $gidHtmlOn; ?>>
279 <label
for=
"gidselect1"><?php print
$lang[
'ENABLED']; ?> </label>&
nbsp;&
nbsp;<small><?php print
$lang[
'OR']; ?></small>&
nbsp;
280 <input
type=
"radio" id=
"gidselect2" name=
"signup_gid" class=
"form-control" value=
"0" <?php echo
$gidHtmlOff; ?>>
281 <label
for=
"gidselect2"><?php print
$lang[
'DISABLED']; ?> </label><br>
282 <!-- ACCESS CONTROL / PRIVACY -->
283 <select
name=
"gid[]" class=
"form-control" aria-multiselectable=
"true" multiple>
284 <?php \YAWK\PLUGINS\SIGNUP\backend::getUserGroupSelector(
$db); ?>
286 <h4><
a href=
"index.php?page=user-groups" title=
"<?php echo "$lang[SIGNUP_GROUPSETTINGS_SUBTEXT]
"; ?>">
287 <
i class=
"fa fa-wrench"></
i> &
nbsp;<?php echo
"$lang[SIGNUP_GROUPSETTINGS_EDIT]"; ?></
a>
288 <small>(<?php echo
"$lang[SIGNUP_GROUPSETTINGS_SUBTEXT]"; ?>)</small></h4><br><br>
291 <legend><
i class=
"fa fa-info"></
i> &
nbsp;<?php echo
"$lang[SIGNUP_GROUP_LEGEND_TEXT] <small>$lang[SIGNUP_GROUP_LEGEND_SUBTEXT]</small>";?></legend>
292 <select
name=
"gid-legend" id=
"gid-legend" class=
"form-control">
294 \YAWK\PLUGINS\SIGNUP\backend::getGroupSelector(
$db);
297 <label
for=
"gid-legend"><?php echo
"$lang[SELECT_GROUP]"; ?></label>
303 echo
"<!-- LEGEND INPUT FIELDS -->
304 <div id=\"$gid[0]_hidden\">
305 <label for=\"$gid[0]_hidden\">$gid[1] $lang[SIGNUP_LEGEND] <small class=\"text-muted\">$lang[SIGNUP_LEGEND_SUBTEXT]</small> </label><br>
306 <textarea name=\"signup_legend$gid[0]-long\" id=\"$gid[0]_hidden\" class=\"form-control\" cols=\"64\" rows=\"10\">";
307 echo \YAWK\settings::getLongSetting(
$db,
"signup_legend$gid[0]-long"); echo
"</textarea>
310 echo
"<!-- LEGEND INPUT FIELDS -->
311 <div id=\"0_hidden\">
312 <label for=\"0_hidden\">$lang[LEGEND] <small class=\"text-muted\">$lang[SIGNUP_LEGEND_SUBTEXT]</small> </label><br>
313 <textarea name=\"signup_legend0-long\" id=\"0_hidden\" class=\"form-control\" cols=\"64\" rows=\"10\">";
314 echo \YAWK\settings::getLongSetting(
$db,
"signup_legend0-long"); echo
"</textarea>
320 <div role=
"tabpanel" class=
"tab-pane fade in" id=
"fields">
322 <!-- SUBMIT BUTTON -->
323 <input
type=
"submit" class=
"btn btn-success pull-right" value=
"<?php print $lang['SETTINGS_SAVE']; ?>">
324 <input
type=
"hidden" name=
"sent" value=
"1">
326 <!-- mandatory & additional fields -->
328 <legend><
i class=
"fa fa-exclamation-triangle"></
i> &
nbsp;<?php echo
$lang[
'MANDATORY_FIELDS']; ?> <small><?php echo
$lang[
'THESE_ARE_REQUIRED']; ?></small></legend>
329 <input
type=
"checkbox" id=
"username" name=
"username" checked=
"checked" class=
"form-control" title=
"<?php echo $lang['USERNAME']; ?>" disabled>
330 <label
for=
"username"><?php echo
$lang[
'USERNAME']; ?> <small
class=
"text-danger"><?php echo
$lang[
'REQUIRED']; ?></small></label><br>
331 <input
type=
"checkbox" id=
"password" name=
"password" checked=
"checked" class=
"form-control" disabled>
332 <label
for=
"password"><?php echo
$lang[
'PASSWORD']; ?> <small
class=
"text-danger"><?php echo
$lang[
'REQUIRED']; ?></small> </label><br>
333 <input
type=
"checkbox" id=
"terms" name=
"terms" checked=
"checked" class=
"form-control" disabled>
334 <label
for=
"terms"><?php echo
$lang[
'TERMS_OF_SERVICE']; ?> <small
class=
"text-danger"><?php echo
$lang[
'REQUIRED']; ?></small></label><br><br>
337 <legend><
i class=
"fa fa-toggle-down"></
i> &
nbsp;<?php echo
$lang[
'OPTIONAL']; ?> <small><?php echo
$lang[
'OPTIONAL_SUBTEXT']; ?></small></legend>
338 <input
type=
"hidden" value=
'0' name=
"signup_firstname">
339 <input
type=
"checkbox" id=
"firstname" name=
"signup_firstname" class=
"form-control" value=
"1" title=
"<?php echo $lang['FIRSTNAME']; ?>" <?php echo $firstnameHtml; ?>>
340 <label
for=
"firstname"><?php echo
$lang[
'FIRSTNAME']; ?></label><br>
342 <input
type=
"hidden" value=
'0' name=
"signup_lastname">
343 <input
type=
"checkbox" id=
"lastname" name=
"signup_lastname" class=
"form-control" value=
"1" title=
"<?php echo $lang['LASTNAME']; ?>" <?php echo $lastnameHtml; ?>>
344 <label
for=
"lastname"><?php echo
$lang[
'LASTNAME']; ?></label><br>
346 <input
type=
"hidden" value=
'0' name=
"signup_street">
347 <input
type=
"checkbox" id=
"street" name=
"signup_street" class=
"form-control" value=
"1" title=
"<?php echo $lang['STREET']; ?>" <?php echo $streetHtml; ?>>
348 <label
for=
"street"><?php echo
$lang[
'STREET']; ?></label><br>
350 <input
type=
"hidden" value=
'0' name=
"signup_zipcode">
351 <input
type=
"checkbox" id=
"zipcode" name=
"signup_zipcode" class=
"form-control" value=
"1" title=
"<?php echo $lang['ZIPCODE']; ?>" <?php echo $zipcodeHtml; ?>>
352 <label
for=
"zipcode"><?php echo
$lang[
'ZIPCODE']; ?></label><br>
354 <input
type=
"hidden" value=
'0' name=
"signup_city">
355 <input
type=
"checkbox" id=
"city" name=
"signup_city" class=
"form-control" title=
"<?php echo $lang['CITY']; ?>" value=
"1" <?php echo $cityHtml; ?>>
356 <label
for=
"city"><?php echo
$lang[
'CITY']; ?></label><br>
358 <input
type=
"hidden" value=
'0' name=
"signup_country">
359 <input
type=
"checkbox" id=
"country" name=
"signup_country" class=
"form-control" value=
"1" title=
"<?php echo $lang['COUNTRY']; ?>" <?php echo $countryHtml; ?>>
360 <label
for=
"country"><?php echo
$lang[
'COUNTRY']; ?></label><br><br>
363 <div role=
"tabpanel" class=
"tab-pane fade in" id=
"text">
365 <!-- SUBMIT BUTTON -->
366 <input
type=
"submit" class=
"btn btn-success pull-right" value=
"<?php print $lang['SETTINGS_SAVE']; ?>">
367 <input
type=
"hidden" name=
"sent" value=
"1">
369 <!-- submit button text & style -->
371 <legend><
i class=
"fa fa-check-square-o"></
i> &
nbsp;<?php echo
$lang[
'SIGNUP_SUBMIT_BTN']; ?> <small><?php echo
$lang[
'SIGNUP_SUBMIT_BTN_SUBTEXT']; ?></small></legend>
372 <label
for=
"submittext"><?php echo
$lang[
'SIGNUP_SUBMIT_BTN'].
" ".
$lang[
'TEXT']; ?></label><br>
373 <input
type=
"text" id=
"submittext" name=
"signup_submittext" class=
"form-control" value=
"<?php echo \YAWK\settings::getSetting($db, "signup_submittext
");?>" title=
"<?php echo $lang['SIGNUP_SUBMIT_BTN']." ".$lang['TEXT']; ?>"><br>
374 <label
for=
"submitstyle"><?php echo
$lang[
'SIGNUP_SUBMIT_BTN'].
" ".
$lang[
'SIGNUP_SUBMIT_BTN_SUBTEXT']; ?> <small><?php echo
$lang[
'SIGNUP_SUBMIT_BTN_STYLES']; ?></small></label><br>
375 <input
type=
"text" id=
"submitstyle" name=
"signup_submitstyle" class=
"form-control" value=
"<?php echo \YAWK\settings::getSetting($db, "signup_submitstyle
");?>" title=
"<?php echo $lang['SIGNUP_SUBMIT_BTN']." ".$lang['SIGNUP_SUBMIT_BTN_SUBTEXT']; ?>">
378 <!--
error / valid text color -->
380 <legend><
i class=
"glyphicon glyphicon-text-color"></
i> &
nbsp;<?php echo
"$lang[COLORS] <small>$lang[SIGNUP_COLORS_SUBTEXT]</small>"; ?></legend>
381 <label
for=
"formerror"><?php echo
$lang[
'ERROR_TEXT_COLOR']; ?> <small>
default: #<?php echo template::getTemplateSetting(
$db,
"valueDefault",
"form-error", $user, $template) ;?></small></label><br>
382 <input
type=
"text" id=
"formerror" name=
"formerror-tpl" class=
"form-control color" value=
"<?php echo template::getTemplateSetting($db, "value
", "form-
error", $user, $template);?>" title=
"Error Text Color"><br>
383 <label
for=
"formvalid"><?php echo
$lang[
'VALID_TEXT_COLOR']; ?> <small>
default: #<?php echo template::getTemplateSetting(
$db,
"valueDefault",
"form-valid", $user, $template) ;?></small></label><br>
384 <input
type=
"text" id=
"formvalid" name=
"formvalid-tpl" class=
"form-control color" value=
"<?php echo template::getTemplateSetting($db, "value
", "form-valid
", $user, $template);?>" title=
"Valid Text Color"><br>
387 <div role=
"tabpanel" class=
"tab-pane fade in" id=
"termstab">
389 <!-- SUBMIT BUTTON -->
390 <input
type=
"submit" class=
"btn btn-success pull-right" value=
"<?php print $lang['SETTINGS_SAVE']; ?>">
391 <input
type=
"hidden" name=
"sent" value=
"1">
393 <!-- terms of service settings -->
395 <legend><
i class=
"fa fa-legal"></
i> &
nbsp;<?php print
$lang[
'TERMS_OF_SERVICE']; ?> <small><?php print
$lang[
'SETTINGS']; ?></small></legend>
396 <label
for=
"tos-long"><?php echo
$lang[
'TOS_TITLE']; ?></label><br>
397 <textarea
id=
"tos-long" name=
"signup_terms-long" class=
"form-control" cols=
"60" rows=
"10"><?php echo \YAWK\settings::getLongSetting(
$db,
"signup_terms-long");?></textarea><br><br>
398 <label
for=
"tospage"><?php echo
$lang[
'TOS_FILENAME']; ?> <small>
default: tos.html</small></label><br>
399 <input
type=
"text" id=
"tospage" name=
"signup_tospage" size=
"40" class=
"form-control" value=
"<?php echo \YAWK\settings::getSetting($db, "signup_tospage
");?>" title=
"Terms of Service Page Name"> .html<br><br>
400 <label
for=
"tostext"><?php echo
$lang[
'TOS_LINK_DESC']; ?> <small><?php echo
$lang[
'TOS_LINK_DESC_SUBTEXT']; ?></small></label><br>
401 <input
type=
"text" id=
"tostext" name=
"signup_tostext" size=
"40" class=
"form-control" value=
"<?php echo \YAWK\settings::getSetting($db, "signup_tostext
");?>" title=
"Terms of Service Link Description"><br><br>
402 <label
for=
"toscolor"><?php echo
"$lang[LINK] $lang[COLOR]"; ?></label><br>
403 <input
type=
"text" id=
"toscolor" name=
"signup_toscolor" class=
"form-control color" value=
"<?php echo \YAWK\settings::getSetting($db, "signup_toscolor
");?>" title=
"Terms of Service Link Color"><br>
static draw($type, $title, $text, $redirect, $delay)
Mysqli database class; returns db connection object.
The language class - support multilingual backend.
static setSetting($db, $property, $value, $lang)
Set value for property into settings database.
static getSetting($db, $property)
Get and return value for property from settings database.
The template controller - get and set template settings.
The default user class. Provide all functions to handle the user object.
This class serves methods to create backup from files.
if(isset($_POST['sent'])) $layout
print $lang['SETTINGS_SAVE']
<!-- backend language -->< h3 >< i class="fa fa-language"></i > & nbsp