diff --git a/admin/template/img/sidemenu-point-bg.png b/admin/template/img/sidemenu-point-bg.png
index 35aa26c4..96c9d794 100644
Binary files a/admin/template/img/sidemenu-point-bg.png and b/admin/template/img/sidemenu-point-bg.png differ
diff --git a/admin/users_groups.php b/admin/users_groups.php
index 0241b08d..6535fb6b 100644
--- a/admin/users_groups.php
+++ b/admin/users_groups.php
@@ -2,7 +2,7 @@
/*---------------------------------------------\
| |
| Author: Andrey Brykin (Drunya) |
-| Version: 1.1 |
+| Version: 1.2 |
| Project: CMS |
| package CMS AtomX |
| subpackege Admin Panel module |
@@ -23,6 +23,9 @@
include_once '../sys/boot.php';
include_once ROOT . '/admin/inc/adm_boot.php';
+// If for menu
+$_GET['m'] = 'users';
+
$pageTitle = __('Users');
$pageNav = $pageTitle;
diff --git a/admin/users_list.php b/admin/users_list.php
index c224fff6..6e3b5d18 100644
--- a/admin/users_list.php
+++ b/admin/users_list.php
@@ -2,7 +2,7 @@
/*-----------------------------------------------\
| |
| Author: Andrey Brykin (Drunya) |
-| Version: 1.2.3 |
+| Version: 1.3 |
| Project: CMS |
| package CMS AtomX |
| subpackege Admin Panel module |
@@ -25,7 +25,10 @@
include_once '../sys/boot.php';
include_once ROOT . '/admin/inc/adm_boot.php';
-
+// If for menu
+$_GET['m'] = 'users';
+
+
$pageTitle = __('Users');
diff --git a/admin/users_rating.php b/admin/users_rating.php
index 31551fa0..79b6713e 100644
--- a/admin/users_rating.php
+++ b/admin/users_rating.php
@@ -1,29 +1,30 @@
select('users_settings', DB_COUNT, array('cond' => array('type' => 'reg_rules')));
if ($check > 0) {
$FpsDB->save('users_settings',
array(
'values' => $_POST['message'],
), array(
'type' => 'reg_rules',
)
);
} else {
$FpsDB->save('users_settings',
array(
'values' => $_POST['message'],
'type' => 'reg_rules',
)
);
}
} else {
echo '
' . __('Fill in rules') . '';
}
}
$query = $FpsDB->select('users_settings', DB_FIRST, array('cond' => array('type' => 'reg_rules')));
if (count($query) > 0) {
$current_rules = $query[0]['values'];
}
?>
\ No newline at end of file
+select('users_settings', DB_COUNT, array('cond' => array('type' => 'reg_rules')));
if ($check > 0) {
$FpsDB->save('users_settings',
array(
'values' => $_POST['message'],
), array(
'type' => 'reg_rules',
)
);
} else {
$FpsDB->save('users_settings',
array(
'values' => $_POST['message'],
'type' => 'reg_rules',
)
);
}
} else {
echo '
' . __('Fill in rules') . '';
}
}
$query = $FpsDB->select('users_settings', DB_FIRST, array('cond' => array('type' => 'reg_rules')));
if (count($query) > 0) {
$current_rules = $query[0]['values'];
}
?>
\ No newline at end of file
diff --git a/admin/users_rules.php b/admin/users_rules.php
index 472d8c65..18fc20d2 100644
--- a/admin/users_rules.php
+++ b/admin/users_rules.php
@@ -1,29 +1,30 @@
showInfoMessage() а не redirect().
52. Фикс faq.php.
-
+53. Фикс телефон.
Новое
diff --git a/install/do_queries.php b/install/do_queries.php
index 2e25d795..d306fe33 100644
--- a/install/do_queries.php
+++ b/install/do_queries.php
@@ -357,7 +357,7 @@
`pol` ENUM( 'f', 'm', '' ) DEFAULT '' NOT NULL,
`jabber` VARCHAR( 100 ) DEFAULT '' NOT NULL,
`city` VARCHAR( 100 ) DEFAULT '' NOT NULL,
- `telephone` BIGINT( 15 ) DEFAULT 0 NOT NULL,
+ `telephone` VARCHAR( 15 ) DEFAULT '' NOT NULL,
`byear` INT( 4 ) DEFAULT 0 NOT NULL,
`bmonth` INT( 2 ) DEFAULT 0 NOT NULL,
`bday` INT( 2 ) DEFAULT 0 NOT NULL,
diff --git a/modules/users/index.php b/modules/users/index.php
index 2a6d849a..ab8b097d 100644
--- a/modules/users/index.php
+++ b/modules/users/index.php
@@ -2,12 +2,12 @@
/*---------------------------------------------\
| |
| @Author: Andrey Brykin (Drunya) |
-| @Version: 1.7.0 |
+| @Version: 1.7.1 |
| @Project: CMS |
| @Package AtomX CMS |
| @subpackege Users Module |
| @copyright ©Andrey Brykin 2010-2014 |
-| @last mod 2017/10/15 |
+| @last mod 2018/09/25 |
|----------------------------------------------|
| |
| any partial or not partial extension |
@@ -621,7 +621,7 @@ private function _getNewPassword()
public function edit_form()
{
if (!isset($_SESSION['user'])) redirect('/');
-
+
//turn access
$this->ACL->turn(array('users', 'edit_mine'));
@@ -685,7 +685,7 @@ public function edit_form()
$data->setBmonth_selector(createOptionsFromParams(1, 12, $data->getBmonth()));
$data->setBday_selector(createOptionsFromParams(1, 31, $data->getBday()));
-
+
$unlinkfile = '';
if (is_file(ROOT . '/sys/avatars/' . $_SESSION['user']['id'] . '.jpg')) {
$unlinkfile = '
'
@@ -718,7 +718,7 @@ public function update()
//turn access
$this->ACL->turn(array('users', 'edit_mine'));
-
+
$markers = array();
@@ -726,12 +726,11 @@ public function update()
'bmonth', 'bday', 'url', 'about', 'signature', 'email_notification', 'summer_time');
$fields_settings = (array)$this->Register['Config']->read('fields', 'users');
$fields_settings = array_merge($fields_settings, array('email'));
-
-
+
foreach ($fields as $field) {
$$field = (isset($_POST[$field])) ? trim($_POST[$field]) : '';
}
-
+
if ('1' === $pol) $pol = 'm';
else if ('2' === $pol) $pol = 'f';
@@ -753,7 +752,7 @@ public function update()
$icq = mb_substr($icq, 0, 12);
$jabber = mb_substr($jabber, 0, 100);
$city = mb_substr($city, 0, 50);
- $telephone = number_format(mb_substr((int)$telephone, 0, 20), 0, '', '');
+ $telephone = number_format(mb_substr($telephone, 0, 20), 0, '', '');
$byear = intval(mb_substr($byear, 0, 4));
$bmonth = intval(mb_substr($bmonth, 0, 2));
$bday = intval(mb_substr($bday, 0, 2));
@@ -763,7 +762,7 @@ public function update()
$email_notification = intval($email_notification);
$summer_time = intval($summer_time);
-
+
// Если заполнено поле "Текущий пароль" - значит пользователь
// хочет изменить его или поменять свой e-mail
$changePassword = false;
@@ -780,20 +779,20 @@ public function update()
if ($email != $_SESSION['user']['email']) $changeEmail = true;
}
-
+
$errors = $this->Register['Validate']->check($this->Register['action']);
// Additional fields
if (is_object($this->AddFields)) {
try {
- $_addFields = $this->AddFields->checkFields();
+ $_addFields = $this->AddFields->checkFields();
} catch (Exception $e) {
- $errors[] = $this->AddFields->getErrors();
+ $errors[] = $this->AddFields->getErrors();
}
}
-
+
$tmp_key = rand(0, 9999999);
if (!empty($_FILES['avatar']['name'])) {
@@ -816,6 +815,7 @@ public function update()
$timezone = (int)$_POST['timezone'];
if ($timezone < -12 || $timezone > 12) $timezone = 0;
+
// if an Errors
if (!empty($errors)) {
@@ -824,9 +824,10 @@ public function update()
'telephone' => null, 'city' => null, 'jabber' => null, 'byear' => null,
'bmonth' => null, 'bday' => null, 'email_notification' => null, 'summer_time' => null), $_POST);
$_SESSION['FpsForm']['errors'] = $errors;
+
redirect('/users/edit_form/');
}
-
+
// Если выставлен флажок "Удалить загруженный ранее файл"
if (isset( $_POST['unlink']) and is_file(ROOT . '/sys/avatars/' . $_SESSION['user']['id'] . '.jpg')) {
@@ -839,13 +840,14 @@ public function update()
}
unlink(ROOT . '/sys/tmp/images/' . $tmp_key . '.jpg');
}
-
+
// Все поля заполнены правильно - записываем изменения в БД
if (!empty($url) && mb_substr($url, 0, mb_strlen('http://')) !== 'http://') $url = 'http://' . $url;
-
+
$user = $this->Model->getById($_SESSION['user']['id']);
-
+
+
if ( $changePassword ) {
$user->setPassw(md5($newpassword));
$_SESSION['user']['passw'] = md5( $newpassword );
@@ -855,6 +857,7 @@ public function update()
$_SESSION['user']['email'] = $email;
}
+
$user->setTimezone($timezone);
$user->setUrl($url);
$user->setIcq($icq);
@@ -869,18 +872,20 @@ public function update()
$user->setSignature($signature);
$user->setEmail_notification($email_notification);
$user->setSummer_time($summer_time);
- $user->save();
-
+
+
// Additional fields saving
if (is_object($this->AddFields)) {
$this->AddFields->save($_SESSION['user']['id'], $_addFields);
}
-
// Теперь надо обновить данные о пользователе в массиве $_SESSION['user']
$_SESSION['user'] = array_merge($_SESSION['user'], $user->asArray());
+ $user->save();
+
+
// ... и в массиве $_COOKIE
if ( isset( $_COOKIE['autologin'] ) ) {
$path = "/";
@@ -888,6 +893,7 @@ public function update()
setcookie( 'userid', $_SESSION['user']['id'], time() + 3600 * 24 * Config::read('cookie_time'), $path );
setcookie( 'password', $_SESSION['user']['passw'], time() + 3600 * 24 * Config::read('cookie_time'), $path );
}
+
if ($this->Log) $this->Log->write('editing user', 'user id(' . $_SESSION['user']['id'] . ')');
return $this->showInfoMessage(__('Your profile has been changed'), getProfileUrl($_SESSION['user']['id']));
}
@@ -1072,7 +1078,7 @@ public function update_by_admin($id = null)
$icq = mb_substr($icq, 0, 12);
$jabber = mb_substr($jabber, 0, 100);
$city = mb_substr($city, 0, 50);
- $telephone = number_format(mb_substr((int)$telephone, 0, 20), 0, '', '');
+ $telephone = number_format(mb_substr($telephone, 0, 20), 0, '', '');
$byear = intval(mb_substr($byear, 0, 4));
$bmonth = intval(mb_substr($bmonth, 0, 2));
$bday = intval(mb_substr($bday, 0, 2));
diff --git a/sys/inc/fpsentity.class.php b/sys/inc/fpsentity.class.php
index 2579a2df..2743076b 100644
--- a/sys/inc/fpsentity.class.php
+++ b/sys/inc/fpsentity.class.php
@@ -1 +1 @@
- $value) {
$funcName = 'set' . ucfirst($k);
$this->$funcName($value);
}
}
}
public function __invoke($params = array())
{
$this->__construct($params);
return $this;
}
public function __call($method, $params)
{
if (false !== strpos($method, 'set')) {
$name = str_replace('set', '', $method);
$name = strtolower($name);
$this->$name = $params[0];
} else if (false !== strpos($method, 'get')) {
$name = str_replace('get', '', $method);
$name = strtolower($name);
return (isset($this->$name))
? /*($name === 'id') ? intval($this->$name) : */$this->$name
: null;
}
return $this;
}
protected function checkProperty($var)
{
//return (null === $var) ? false : true;
if (is_object($var)) return true;
return (!isset($this->{$var}) || $this->{$var} === null) ? false : true;
}
public function asArray()
{
$args = get_object_vars($this);
$args = array_map(function($n){
if (is_object($n) && is_callable(array($n, 'asArray'))) {
return $n->asArray();
}
return $n;
}, $args);
return $args;
}
protected function save()
{
$args = func_get_args();
$table = (string)$args[0];
$params = (array)$args[1];
$Register = Register::getInstance();
$self_id = $Register['DB']->save($table, $params);
if (!$this->id) $this->id = intval($self_id);
return $this->id;
}
}
\ No newline at end of file
+ $value) {
$funcName = 'set' . ucfirst($k);
$this->$funcName($value);
}
}
}
public function __invoke($params = array())
{
$this->__construct($params);
return $this;
}
public function __call($method, $params)
{
if (false !== strpos($method, 'set')) {
$name = str_replace('set', '', $method);
$name = strtolower($name);
$this->$name = $params[0];
} else if (false !== strpos($method, 'get')) {
$name = str_replace('get', '', $method);
$name = strtolower($name);
return (isset($this->$name))
? /*($name === 'id') ? intval($this->$name) : */$this->$name
: null;
}
return $this;
}
protected function checkProperty($var)
{
//return (null === $var) ? false : true;
if (is_object($var)) return true;
return (!isset($this->{$var}) || $this->{$var} === null) ? false : true;
}
public function asArray()
{
$args = get_object_vars($this);
$args = array_map(function($n){
if (is_object($n) && is_callable(array($n, 'asArray'))) {
return $n->asArray();
}
return $n;
}, $args);
return $args;
}
protected function save()
{
$Register = Register::getInstance();
$args = array();
$args[0] = $Register['module'];
$args[1] = (isset($_SESSION['user'])) ? $_SESSION['user'] : false;
array_pop($args[1]);
$table = (string)$args[0];
$params = (array)$args[1];
$self_id = $Register['DB']->save($table, $params);
if (!$this->id) $this->id = intval($self_id);
return $this->id;
}
}
\ No newline at end of file
diff --git a/template/default/css/style.css b/template/default/css/style.css
index 19131d99..d4023d7d 100644
--- a/template/default/css/style.css
+++ b/template/default/css/style.css
@@ -441,6 +441,10 @@ box-shadow: 0 0 100px rgba(255, 255, 255, 0.2); -webkit-box-shadow: 0 0 100px rg
.sidertop ul {list-style-type: none; width: 65%; min-width:650px; height: 50px;padding-left: 50px;margin: 0; float: left;}
.sidertop ul li {float: left; border-right: 1px solid #474747; position:relative;}
.sidertop ul li:first-child {border-left: 1px solid #474747;}
+
+.sidertop ul.uMenuRoot2 {display: none; position: relative; top: 0px; padding: 0px; height: auto; z-index: 999; background: #999;}
+.sidertop ul.uMenuRoot3 {}
+
.sidertop ul li a {display: block; height: 50px;line-height: 50px;padding: 0 15px; font-family: ArialNarrow, Arial, sans-serif; color: #000; font-stretch: condensed; text-shadow: none; transition: all 0.7s ease-in-out 0s;}
.sidertop ul li:hover a {text-decoration: none;
background-image: -webkit-radial-gradient(center 100%, rgba(255, 255, 255, 0.20), transparent);
@@ -448,7 +452,7 @@ background-image: -moz-radial-gradient(center 100%, rgba(255, 255, 255, 0.15), t
background-image: -o-radial-gradient(center 100%, rgba(255, 255, 255, 0.15), transparent);
background-image: -ms-radial-gradient(center 100%, rgba(255, 255, 255, 0.15), transparent);
background-color: rgba(0, 0, 0, 0.15);}
-.sidertop ul li:active, .sidertop ul li.active {box-shadow: inset 0 0 10px #000;border: 1px solid #747474;border-width: 0 1px;margin-left: -1px;background-color: rgba(0, 0, 0, 0.05); }
+.sidertop ul li:active, .sidertop ul li.active {box-shadow: inset 0 0 10px #000;border: 1px solid #747474;border-width: 0 1px;margin-left: -1px;background-color: rgba(0, 0, 0, 0.05);}
.sidertop ul li:first-child:active, .sidertop ul li.active:first-child {margin-left: 0;}
.sidertop ul li:hover ul.atm-menu {
-moz-transform-origin: center top;
@@ -563,6 +567,10 @@ border-radius: 10px; -moz-border-radius: 10px; -webkit-border-radius: 10px; -kht
box-shadow: inset 0 2px 5px #000; -webkit-box-shadow: inset 0 2px 5px #000; -moz-box-shadow: inset 0 2px 5px #000;
}
+.content h1 {font-size: 20px; text-align: center;}
+.content h2 {font-size: 18px;}
+
+
.content {color: #3c3c3c;font-size: 15px;}
.content a, .greenlink {font-family: Arial,HelveticaCY,Helvetica,sans-serif;color: #780;text-shadow: none;}
.content a:hover, .greenlink:hover {text-decoration: underline;color: #97ad00;}
@@ -1272,32 +1280,47 @@ background: rgba(177, 199, 150, 1);
-webkit-border-radius: 0px;
}
.sidertop {
- height: 101px;
+ height: 50px;
background: url('../img/bg_side.jpg') repeat;
border-radius: 0px;
-moz-border-radius: 0px;
-webkit-border-radius: 0px;
-khtml-border-radius: 0px;
}
+ .search {
+ display: none;
+ }
.sidertop .fpsMainMenu {
- height: 100px;
- min-width: 350px;
- width: 57%;
- padding-left: 0px;
+ display: none;
+ }
+ .sidertop ul.uMenuRoot2 {
+ display: block;
+ background: #676767;
+ width: 100%;
+ }
+ .sidertop ul.uMenuRoot2 li {
+ float: none;
+ border: 0px solid #676767;
+ }
+ .sidertop li:hover ul {
+ display: block;
+ background-color: #676767;
+ }
+ .sidertop ul li ul {
+ height: auto;
+ padding: 0px;
+ width: 100%;
+ display: none;
}
- .sidertop .fpsMainMenu li {
- border-bottom: 1px solid #474747;
- box-shadow: inset 0 0 0 #000;
- margin-left: 0;
- /*display: none;*/
+ .content .lastpostsbutton {
+ margin: 5px 5px 0 0;
}
- .sidertop .fpsMainMenu li.active {
- box-shadow: inset 0 0 0 #000;
- margin-left: 0;
- /*display: none;*/
+ .activewindow div .uslinkminpro {
+ /*position: absolute;
+ z-index: 999999;*/
}
- .sidertop .fpsMainMenu li:first-child {
- border-left: 0px solid #474747;
+ .activewindow div .uslinkminpro a {
+ height: 24px;
}
.mezdyblock {
diff --git a/template/default/html/default/main.html b/template/default/html/default/main.html
index 135b2076..de179a4a 100644
--- a/template/default/html/default/main.html
+++ b/template/default/html/default/main.html
@@ -141,6 +141,20 @@
{{ mainmenu }}
+
+
+
+
-
+
{{ navigation }}
@@ -170,7 +184,7 @@
{% if pagination %}
{{ meta }}
{{ 'Pages:'|lang }} {{ pagination }}
{% endif %}
- {{ content }}
+ {{ content }}
{{ comments_pagination }}
{{ comments }}
{{ comments_pagination }}
@@ -261,4 +275,4 @@