14 <!-- Content Wrapper. Contains page content -->
15 <div class=\"content-wrapper\" id=\"content-FX\">
16 <!-- Content Header (Page header) -->
17 <section class=\"content-header\">";
19 echo backend::getTitle(
$lang[
'USER'],
$lang[
'USER_ADD_SUBTEXT']);
20 echo
"<ol class=\"breadcrumb\">
21 <li><a href=\"index.php\" title=\"$lang[DASHBOARD]\"><i class=\"fa fa-dashboard\"></i> $lang[DASHBOARD]</a></li>
22 <li><a href=\"index.php?page=users\" title=\"$lang[USERS]\"> $lang[USERS]</a></li>
23 <li class=\"active\"><a href=\"index.php?page=user-new\" title=\"".$lang[
'USER+'].
"\"> ".
$lang[
'USER+'].
"</a></li>
27 <section class=\"content\">";
29 if(!isset($_POST[
'username'])){ ?>
31 <div
class=
"box box-default">
32 <div
class=
"box-body">
33 <!-- ADD USER FORM -->
34 <form
class=
"form" action=
"index.php?page=user-new" method=
"post">
36 <div
class=
"col-md-6">
37 <h1><small><
i class=
"fa fa-user">&
nbsp; </
i><?php echo
"$lang[NAME], $lang[EMAIL], $lang[PASSWORD]"; ?></small></h1>
38 <label
for=
"username"><
b><?php echo
"$lang[USERNAME]"; ?></
b></label> <input
type=
"text" id=
"username" class=
"form-control" name=
"username" maxlength=
"100">
39 <label
for=
"email"><
b><?php echo
"$lang[EMAIL]"; ?></
b></label><input
type=
"text" id=
"email" class=
"form-control" name=
"email" maxlength=
"100">
40 <label
for=
"password1"><
b><?php echo
"$lang[PASSWORD]"; ?></
b></label><input
name=
"password1" id=
"password1" class=
"form-control" maxlength=
"100" type=
"password">&
nbsp;
41 <label
for=
"password2"><
b><?php echo
"$lang[REPEAT]"; ?></
b></label><input
name=
"password2" id=
"password2" class=
"form-control" maxlength=
"100" type=
"password">&
nbsp;<br><br>
43 <input
type=
"submit" id=
"savebutton" class=
"btn btn-success" value=
"<?php echo "$lang[CREATE_USER]
"; ?>">
46 <h1><small><
i class=
"fa fa-lock">&
nbsp; </
i><?php echo
"$lang[DATA_ACCESS_AND_PRIVACY]"; ?></small></h1>
48 <select
name=
"gid" style=
"width: 240px;" class=
"form-control" >
49 <option value=
"2"><?php echo
"$lang[USER]"; ?></option>
50 <option value=
"1">---</option>
52 foreach(
YAWK\sys::getGroups(
$db,
"users") as $role){
54 echo
"<option value=\"".$role[
'id'].
"\"";
55 echo
">".$role[
'value'].
"</option>";
61 <label
for=
"mystatus"><input
name=
"mystatus" id=
"mystatus" value=
"1" type=
"checkbox" /><
i class=
"fa fa-lock"></
i> <?php echo
"$lang[LOGIN_LOCK]"; ?></label>&
nbsp;
62 <label
for=
"privacy"><input
name=
"privacy" id=
"privacy" value=
"1" type=
"checkbox" /><
i class=
"fa fa-eye-open"></
i> <?php echo
"$lang[HIDE_FROM_WHOIS_ONLINE]"; ?></label>&
nbsp;
65 <div
class=
"col-md-6">
67 <!-- OPTIONAL USER SETTINGS -->
68 <h1><small><
i class=
"fa fa-home">&
nbsp; </
i><?php echo
"$lang[OPTIONAL_PERSONAL_DATA]"; ?></small></h1>
69 <label
for=
"firstname"><?php echo
"$lang[FIRSTNAME]"; ?>:</label><input
type=
"text" class=
"form-control" id=
"firstname" name=
"firstname" maxlength=
"100">
70 <label
for=
"lastname"><?php echo
"$lang[LASTNAME]"; ?>:</label><input
type=
"text" class=
"form-control" id=
"lastname" name=
"lastname" maxlength=
"100">
71 <label
for=
"street"><?php echo
"$lang[STREET]"; ?></label><input
type=
"text" class=
"form-control" id=
"street" name=
"street" maxlength=
"100">
72 <label
for=
"zipcode"><?php echo
"$lang[ZIPCODE]"; ?></label><input
type=
"text" class=
"form-control" id=
"zipcode" name=
"zipcode" maxlength=
"12">
73 <label
for=
"city"><?php echo
"$lang[CITY]"; ?></label><input
type=
"text" class=
"form-control" id=
"city" name=
"city" maxlength=
"100">
74 <label
for=
"country"><?php echo
"$lang[COUNTRY]"; ?></label><input
type=
"text" class=
"form-control" id=
"country" name=
"country" maxlength=
"100">
77 <!-- SOCIAL MEDIA USER SETTINGS -->
78 <h1><small><
i class=
"fa fa-thumbs-o-up"></
i> <?php echo
"$lang[SOCIAL_MEDIA_LINKS]"; ?></small></h1>
79 <label
for=
"url"><
i class=
"fa fa-globe"></
i> <?php echo
"$lang[WEBSITE]"; ?></label><input
type=
"text" class=
"form-control" id=
"url" name=
"url" maxlength=
"100" placeholder=
"http://">
80 <label
for=
"twitter"><
i class=
"fa fa-twitter"></
i> <?php echo
"$lang[TWITTER]"; ?></label><input
type=
"text" class=
"form-control" id=
"twitter" name=
"twitter" maxlength=
"100" placeholder=
"http://www.twitter.com/username">
81 <label
for=
"facebook"><
i class=
"fa fa-facebook"></
i> <?php echo
"$lang[FACEBOOK]"; ?></label><input
type=
"text" class=
"form-control" id=
"facebook" name=
"facebook" maxlength=
"100" placeholder=
"http://www.facebook.com/username">
106 if (isset($_POST[
'job']) && (!empty($_POST[
'job'])))
108 $job =
$db->quote($_POST[
'job']);
115 if (!isset($_POST[
'privacy']) OR (empty($_POST[
'privacy'])))
121 $privacy =
$db->quote($_POST[
'privacy']);
124 if (!isset($_POST[
'mystatus']) OR (empty($_POST[
'mystatus'])))
130 $blocked =
$db->quote($_POST[
'mystatus']);
132 $gid =
$db->quote($_POST[
'gid']);
138 print alert::draw(
"success",
"$lang[SUCCESS]",
"$lang[USER] <strong>".
$username.
"</strong> $lang[ADDED]",
"page=users",
"1200");
142 print alert::draw(
"danger",
"$lang[ERROR]",
"$lang[USER] <strong>".
$username.
"</strong> $lang[NOT] $lang[ADDED]",
"page=users",
"4800");
print $lang['FILEMAN_UPLOAD']
Throws a fancy Bootstrap Alert (success, info, warning or danger)
Backend class serves a few useful functions for the admin backend.
Mysqli database class; returns db connection object.
The language class - support multilingual backend.
The default user class. Provide all functions to handle the user object.
This class serves methods to create backup from files.
<!-- backend language -->< h3 >< i class="fa fa-language"></i > & nbsp