added news
This commit is contained in:
211
_class/class_news.php
Normal file
211
_class/class_news.php
Normal file
@@ -0,0 +1,211 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
//HÍREK OSZTÁLY
|
||||||
|
|
||||||
|
class news {
|
||||||
|
private $n_id;
|
||||||
|
private $n_title;
|
||||||
|
private $n_date;
|
||||||
|
private $n_text;
|
||||||
|
private $n_deleted;
|
||||||
|
private $n_user_ua_id; //only id
|
||||||
|
private $n_user; //obj
|
||||||
|
|
||||||
|
public function set_news_data_by_id($_n_id) {
|
||||||
|
global $sql;
|
||||||
|
$news_data_assoc_array = $sql->assoc_array("select * from news where n_id = " . $_n_id);
|
||||||
|
$news_data_array = $news_data_assoc_array[0];
|
||||||
|
foreach ($news_data_array as $field => $value) {
|
||||||
|
$function_name = "set_" . $field;
|
||||||
|
$this->$function_name($value); //alapadatok beállítása
|
||||||
|
if ($field == 'n_user_ua_id' && !empty($value)) {
|
||||||
|
$coach = new user();
|
||||||
|
$coach->set_user_data_by_id($value);
|
||||||
|
$this->set_n_user($coach);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function create_news($_values, $user_id = null) {
|
||||||
|
global $sql, $user;
|
||||||
|
if (null === $user_id) {
|
||||||
|
$user_id = $user->get_ua_id();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($_values['n_title'])) {
|
||||||
|
$title = 'null';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$title = $_values['n_title'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $sql->insert_into('news', array(
|
||||||
|
'n_title' => $title,
|
||||||
|
'n_user_ua_id' => $user_id,
|
||||||
|
'n_text' => $_values['n_text'],
|
||||||
|
'n_date' => $_values['n_date']
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function update_news($_values, $n_id) {
|
||||||
|
global $sql, $user;
|
||||||
|
|
||||||
|
if (!isset($_values['n_title'])) {
|
||||||
|
$title = 'null';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$title = $_values['n_title'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql->update_table('news', array(
|
||||||
|
'n_title' => $title,
|
||||||
|
'n_text' => $_values['n_text'],
|
||||||
|
'n_date' => $_values['n_date']
|
||||||
|
), array(
|
||||||
|
'n_id' => $n_id,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function get_n_id()
|
||||||
|
{
|
||||||
|
return $this->n_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mixed $n_id
|
||||||
|
*
|
||||||
|
* @return self
|
||||||
|
*/
|
||||||
|
public function set_n_id($n_id)
|
||||||
|
{
|
||||||
|
$this->n_id = $n_id;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function get_n_title()
|
||||||
|
{
|
||||||
|
return $this->n_title;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mixed $n_title
|
||||||
|
*
|
||||||
|
* @return self
|
||||||
|
*/
|
||||||
|
public function set_n_title($n_title)
|
||||||
|
{
|
||||||
|
$this->n_title = $n_title;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function get_n_date()
|
||||||
|
{
|
||||||
|
return $this->n_date;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mixed $n_date
|
||||||
|
*
|
||||||
|
* @return self
|
||||||
|
*/
|
||||||
|
public function set_n_date($n_date)
|
||||||
|
{
|
||||||
|
$this->n_date = $n_date;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function get_n_text()
|
||||||
|
{
|
||||||
|
return $this->n_text;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mixed $n_text
|
||||||
|
*
|
||||||
|
* @return self
|
||||||
|
*/
|
||||||
|
public function set_n_text($n_text)
|
||||||
|
{
|
||||||
|
$this->n_text = $n_text;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function get_n_deleted()
|
||||||
|
{
|
||||||
|
return $this->n_deleted;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mixed $n_deleted
|
||||||
|
*
|
||||||
|
* @return self
|
||||||
|
*/
|
||||||
|
public function set_n_deleted($n_deleted)
|
||||||
|
{
|
||||||
|
$this->n_deleted = $n_deleted;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function get_n_user_ua_id()
|
||||||
|
{
|
||||||
|
return $this->n_user_ua_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mixed $n_user_ua_id
|
||||||
|
*
|
||||||
|
* @return self
|
||||||
|
*/
|
||||||
|
public function set_n_user_ua_id($n_user_ua_id)
|
||||||
|
{
|
||||||
|
$this->n_user_ua_id = $n_user_ua_id;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function get_n_user()
|
||||||
|
{
|
||||||
|
return $this->n_user;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mixed $n_user
|
||||||
|
*
|
||||||
|
* @return self
|
||||||
|
*/
|
||||||
|
public function set_n_user($n_user)
|
||||||
|
{
|
||||||
|
$this->n_user = $n_user;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
@@ -244,6 +244,10 @@ class page {
|
|||||||
# STATISZTIKÁK
|
# STATISZTIKÁK
|
||||||
include('include_stats.php');
|
include('include_stats.php');
|
||||||
break;
|
break;
|
||||||
|
case 'news':
|
||||||
|
# INFORMÁCIÓS FAL
|
||||||
|
include('include_information.php');
|
||||||
|
break;
|
||||||
case 'delete_training_type':
|
case 'delete_training_type':
|
||||||
# EDZÉS TÍPUS TÖRLÉS
|
# EDZÉS TÍPUS TÖRLÉS
|
||||||
include('include_delete_training_type.php');
|
include('include_delete_training_type.php');
|
||||||
@@ -288,6 +292,10 @@ class page {
|
|||||||
# BEVÉTEL TÖRLÉS
|
# BEVÉTEL TÖRLÉS
|
||||||
include('include_delete_money_income.php');
|
include('include_delete_money_income.php');
|
||||||
break;
|
break;
|
||||||
|
case 'delete_news':
|
||||||
|
# HÍR TÖRLÉS
|
||||||
|
include('include_delete_news.php');
|
||||||
|
break;
|
||||||
case 'logout':
|
case 'logout':
|
||||||
# kijelentkezés
|
# kijelentkezés
|
||||||
$from = "admin";
|
$from = "admin";
|
||||||
@@ -321,7 +329,7 @@ class page {
|
|||||||
break;
|
break;
|
||||||
case 'information':
|
case 'information':
|
||||||
# információk
|
# információk
|
||||||
include('include_information.php');
|
include('include_information_wall.php');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
include('include_diary.php');
|
include('include_diary.php');
|
||||||
@@ -341,7 +349,7 @@ class page {
|
|||||||
break;
|
break;
|
||||||
case 'information':
|
case 'information':
|
||||||
# információk
|
# információk
|
||||||
include('include_information.php');
|
include('include_information_wall.php');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
include('include_diary.php');
|
include('include_diary.php');
|
||||||
|
|||||||
@@ -317,6 +317,15 @@ a.addbutton.noti {
|
|||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.list.news .date_separator {
|
||||||
|
color: black;
|
||||||
|
background-color: #19f40c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list.news .date_separator:hover {
|
||||||
|
background-color: #24991e;
|
||||||
|
}
|
||||||
|
|
||||||
.list_item label {
|
.list_item label {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@@ -604,6 +613,12 @@ h1.apply {
|
|||||||
border-left: 3px solid black;
|
border-left: 3px solid black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.info-wall {
|
||||||
|
border-top: 2px solid #0a4404;
|
||||||
|
border-left: none;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.toggle {
|
.toggle {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 120px;
|
height: 120px;
|
||||||
@@ -847,6 +862,12 @@ form#auto_filters > div > label {
|
|||||||
margin: 20px;
|
margin: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.info-wall {
|
||||||
|
border-left: 2px solid #0a4404;
|
||||||
|
border-top: none;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.diary_header {
|
.diary_header {
|
||||||
width: 35%;
|
width: 35%;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,3 +97,25 @@ div.list div.actual_balance:hover {
|
|||||||
.full {
|
.full {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.diary_container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: stretch;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.diary_container > div {
|
||||||
|
flex: 1 1 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 1250px) {
|
||||||
|
.diary_container {
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list.news, .list.entries {
|
||||||
|
width: 100%;
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
BIN
_image/news.png
Normal file
BIN
_image/news.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
@@ -186,6 +186,10 @@ switch ($this->get_id()) {
|
|||||||
|
|
||||||
$smarty->display('training_template_create.tpl');
|
$smarty->display('training_template_create.tpl');
|
||||||
break;
|
break;
|
||||||
|
case 'news':
|
||||||
|
# hír létrehozása
|
||||||
|
$smarty->display('news_create.tpl');
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
# code...
|
# code...
|
||||||
break;
|
break;
|
||||||
|
|||||||
9
_include/include_delete_news.php
Normal file
9
_include/include_delete_news.php
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
if ($this->is_id()) {
|
||||||
|
$sql->update_table('news', array('n_deleted' => 1), array('n_id' => $this->get_id()));
|
||||||
|
log::register('delete_news', $this->get_id());
|
||||||
|
header("Location: /admin/news");
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
@@ -70,6 +70,18 @@ order by object_date ASC;
|
|||||||
$smarty->assign('actions', $de_array);
|
$smarty->assign('actions', $de_array);
|
||||||
$smarty->assign('balance_transfer', $balance_transfer);
|
$smarty->assign('balance_transfer', $balance_transfer);
|
||||||
|
|
||||||
|
//get news
|
||||||
|
$news_assoc_array = $sql->assoc_array('SELECT * FROM news WHERE n_deleted = 0 ORDER BY n_date DESC;');
|
||||||
|
|
||||||
|
$news_array = array();
|
||||||
|
foreach ($news_assoc_array as $key => $news) {
|
||||||
|
$new_news = new news();
|
||||||
|
$new_news->set_news_data_by_id($news['n_id']);
|
||||||
|
$news_array[] = $new_news;
|
||||||
|
}
|
||||||
|
|
||||||
|
$smarty->assign('news_array',$news_array);
|
||||||
|
|
||||||
//$smarty->assign('balance', $balance);
|
//$smarty->assign('balance', $balance);
|
||||||
$smarty->display('user_diary.tpl');
|
$smarty->display('user_diary.tpl');
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,29 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
# INFORMÁCIÓK
|
# INFORMÁCIÓS FAL ELEMEI
|
||||||
|
|
||||||
$info_query = "SELECT set_id FROM setting_value JOIN setting ON setv_setting_set_id = set_id WHERE set_name = 'Információk'";
|
if ($this->is_id()) {
|
||||||
|
$news = new news();
|
||||||
|
$news->set_news_data_by_id($this->get_id());
|
||||||
|
|
||||||
$setv_id = $sql->single_variable($info_query);
|
$smarty->assign('news',$news);
|
||||||
|
$smarty->display('news_data_edit.tpl');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//lista
|
||||||
|
$news_query = "SELECT * FROM news WHERE n_deleted = 0 AND n_user_ua_id = " . $user->get_ua_id() . " ORDER BY n_date DESC";
|
||||||
|
|
||||||
$new_setval = new setting_value();
|
$news_assoc_array = $sql->assoc_array($news_query);
|
||||||
$new_setval->set_setting_value_data_by_id($setv_id);
|
|
||||||
$smarty->assign('setting', $new_setval);
|
$news_array = array();
|
||||||
|
foreach ($news_assoc_array as $key => $news) {
|
||||||
|
$new_news = new news();
|
||||||
|
$new_news->set_news_data_by_id($news['n_id']);
|
||||||
|
$news_array[] = $new_news;
|
||||||
|
}
|
||||||
|
|
||||||
|
$smarty->assign('news_array', $news_array);
|
||||||
|
$smarty->display('news_list.tpl');
|
||||||
|
}
|
||||||
|
|
||||||
$smarty->display('information.tpl');
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
14
_include/include_information_wall.php
Normal file
14
_include/include_information_wall.php
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
# INFORMÁCIÓK
|
||||||
|
|
||||||
|
$info_query = "SELECT set_id FROM setting_value JOIN setting ON setv_setting_set_id = set_id WHERE set_name = 'Információk'";
|
||||||
|
|
||||||
|
$setv_id = $sql->single_variable($info_query);
|
||||||
|
|
||||||
|
$new_setval = new setting_value();
|
||||||
|
$new_setval->set_setting_value_data_by_id($setv_id);
|
||||||
|
$smarty->assign('setting', $new_setval);
|
||||||
|
|
||||||
|
$smarty->display('information.tpl');
|
||||||
|
?>
|
||||||
@@ -568,6 +568,21 @@ if (isset($_POST['action'])) {
|
|||||||
log::register('update_training_template', $_POST['tt_id']);
|
log::register('update_training_template', $_POST['tt_id']);
|
||||||
header('Location: /admin/training_templates/'.$_POST['tt_id']);
|
header('Location: /admin/training_templates/'.$_POST['tt_id']);
|
||||||
break;
|
break;
|
||||||
|
case 'news_create':
|
||||||
|
# új hír
|
||||||
|
unset($_POST['action']);
|
||||||
|
$new_news_id = news::create_news($_POST);
|
||||||
|
log::register('new_news', $new_news_id);
|
||||||
|
header('Location: /admin/news/'.$new_news_id);
|
||||||
|
break;
|
||||||
|
case 'news_update':
|
||||||
|
unset($_POST['action']);
|
||||||
|
$n_id = $_POST['n_id'];
|
||||||
|
unset($_POST['n_id']);
|
||||||
|
news::update_news($_POST, $n_id);
|
||||||
|
log::register('update_news', $n_id);
|
||||||
|
header('Location: /admin/news/'.$n_id);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
# code...
|
# code...
|
||||||
break;
|
break;
|
||||||
|
|||||||
16
queries/news_20190729.sql
Normal file
16
queries/news_20190729.sql
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
CREATE TABLE `news` (
|
||||||
|
`n_id` INT NOT NULL AUTO_INCREMENT,
|
||||||
|
`n_title` VARCHAR(255) NULL DEFAULT NULL,
|
||||||
|
`n_date` DATETIME NOT NULL,
|
||||||
|
`n_text` TEXT NULL DEFAULT NULL,
|
||||||
|
`n_user_ua_id` INT NOT NULL,
|
||||||
|
`n_deleted` INT NULL DEFAULT 0,
|
||||||
|
PRIMARY KEY (`n_id`));
|
||||||
|
|
||||||
|
INSERT INTO `subpage` (`spage_url`, `spage_title`, `spage_page_id`) VALUES ('news', 'Információk', '1');
|
||||||
|
|
||||||
|
INSERT INTO `log_category` (`logc_name`, `logc_title`, `logc_type`, `logc_table`, `logc_field`, `logc_selector`) VALUES ('new_news', 'Új hír', '1', 'news', 'n_title', 'n_id');
|
||||||
|
INSERT INTO `log_category` (`logc_name`, `logc_title`, `logc_type`, `logc_table`, `logc_field`, `logc_selector`) VALUES ('update_news', 'Hír módosítása', '1', 'news', 'n_title', 'n_id');
|
||||||
|
INSERT INTO `log_category` (`logc_name`, `logc_title`, `logc_type`, `logc_table`, `logc_field`, `logc_selector`) VALUES ('delete_news', 'Hír törlése', '1', 'news', 'n_title', 'n_id');
|
||||||
|
|
||||||
|
DELETE FROM `subpage` WHERE `spage_name` = 'information';
|
||||||
27
template/templates/news_create.tpl
Normal file
27
template/templates/news_create.tpl
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<div class="form_wrapper">
|
||||||
|
<form method="post">
|
||||||
|
<input type="hidden" name="action" value="news_create">
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label for="n_title">Cím:</label>
|
||||||
|
<div><input type="text" name="n_title" id="n_title"></div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label for="n_date">Dátum:</label>
|
||||||
|
<div><input type="text" name="n_date" id="n_date" value='{$smarty.now|date_format:"%Y-%m-%d %H:%M"}' required></div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label for="n_text">Szöveg:</label>
|
||||||
|
<div><textarea type="text" name="n_text" id="n_text"></textarea></div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<input class="button black" type="submit" value="Létrehozás">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
CKEDITOR.replace('n_text');
|
||||||
|
</script>
|
||||||
31
template/templates/news_data_edit.tpl
Normal file
31
template/templates/news_data_edit.tpl
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<div class="form_wrapper">
|
||||||
|
<div class="buttons">
|
||||||
|
<a href="/admin/delete_news/{$news->get_n_id()}" class="addbutton delete-big">Hír törlése</a>
|
||||||
|
</div>
|
||||||
|
<form method="post">
|
||||||
|
<input type="hidden" name="action" value="news_update">
|
||||||
|
<input type="hidden" name="n_id" value="{$news->get_n_id()}">
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label for="n_title">Cím:</label>
|
||||||
|
<div><input type="text" name="n_title" id="n_title" value="{$news->get_n_title()}"></div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label for="n_date">Dátum:</label>
|
||||||
|
<div><input type="text" name="n_date" id="n_date" value='{$news->get_n_date()|date_format:"%Y-%m-%d %H:%M"}' required></div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label for="n_text">Szöveg:</label>
|
||||||
|
<div><textarea type="text" name="n_text" id="n_text">{$news->get_n_text()}</textarea></div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<input class="button black" type="submit" value="Mentés">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
CKEDITOR.replace('n_text');
|
||||||
|
</script>
|
||||||
15
template/templates/news_list.tpl
Normal file
15
template/templates/news_list.tpl
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<div class="buttons">
|
||||||
|
<a href="/admin/create/news" class="addbutton add-big">Új hír hozzádása</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="list">
|
||||||
|
{foreach $news_array as $news}
|
||||||
|
<a href="/admin/news/{$news->get_n_id()}">
|
||||||
|
<div class="list_item">
|
||||||
|
<img src="/_image/news.png">
|
||||||
|
{$news->get_n_title()}
|
||||||
|
<span style="font-weight: normal; font-style: italic;"> {$news->get_n_date()|date_format:"%Y.%m.%d %H:%M"}</span>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
{/foreach}
|
||||||
|
</div>
|
||||||
@@ -1,155 +1,175 @@
|
|||||||
<div class="list">
|
<div class="diary_container">
|
||||||
|
|
||||||
{foreach $actions as $action}
|
<div class="list half_width entries">
|
||||||
|
|
||||||
{if $action@first}
|
{foreach $actions as $action}
|
||||||
<div style="margin-bottom: 30px;">
|
|
||||||
<div class="list_item line_height14 bigger_space actual_balance">
|
{if $action@first}
|
||||||
<span class="size20 bold">
|
<div style="margin-bottom: 30px;">
|
||||||
Aktuális egyenleg: {$action->get_de_balance()|number_format:0:'':' '} Ft
|
<div class="list_item line_height14 bigger_space actual_balance">
|
||||||
</span>
|
<span class="size20 bold">
|
||||||
|
Aktuális egyenleg: {$action->get_de_balance()|number_format:0:'':' '} Ft
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
{if $action->get_de_training()|is_a:'training'}
|
||||||
|
|
||||||
|
{if !$action@first &&
|
||||||
|
$actions[$action@index-1]->get_de_training()|is_a:'training' &&
|
||||||
|
$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2 != $actions[$action@index-1]->get_de_training()->get_tr_date()|substr:5:2
|
||||||
|
|
||||||
|
||
|
||||||
|
|
||||||
|
!$action@first &&
|
||||||
|
$actions[$action@index-1]->get_de_money_deposit()|is_a:'money_deposit' &&
|
||||||
|
$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2 != $actions[$action@index-1]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
<span onclick="block_action('block_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}');" class="date_separator clickable">{$actions[$action@index]->get_de_training()->get_tr_date()|substr:0:4}.
|
||||||
|
|
||||||
{if $action->get_de_training()|is_a:'training'}
|
|
||||||
|
|
||||||
{if !$action@first &&
|
|
||||||
$actions[$action@index-1]->get_de_training()|is_a:'training' &&
|
|
||||||
$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2 != $actions[$action@index-1]->get_de_training()->get_tr_date()|substr:5:2
|
|
||||||
|
|
||||||
||
|
|
||||||
|
|
||||||
!$action@first &&
|
|
||||||
$actions[$action@index-1]->get_de_money_deposit()|is_a:'money_deposit' &&
|
|
||||||
$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2 != $actions[$action@index-1]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<span onclick="block_action('block_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}');" class="date_separator clickable">{$actions[$action@index]->get_de_training()->get_tr_date()|substr:0:4}.
|
|
||||||
{$months[$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2]}
|
|
||||||
({$user_login->get_training_number_in_month({$action->get_de_training()->get_tr_date()|substr:0:4},{$action->get_de_training()->get_tr_date()|substr:5:2})} edzés)
|
|
||||||
<div class="diary_header">
|
|
||||||
<span class="balance_text" id="balance_text_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}">Egyenleg</span>
|
|
||||||
<img src="/_image/open_folder.png">
|
|
||||||
</div>
|
|
||||||
</span>
|
|
||||||
<div id="block_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}" class="month_block">
|
|
||||||
|
|
||||||
{elseif $action@first}
|
|
||||||
<span onclick="block_action('block_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}');" class="date_separator clickable">{$actions[$action@index]->get_de_training()->get_tr_date()|substr:0:4}.
|
|
||||||
{$months[$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2]}
|
|
||||||
({$user_login->get_training_number_in_month({$action->get_de_training()->get_tr_date()|substr:0:4},{$action->get_de_training()->get_tr_date()|substr:5:2})} edzés)
|
|
||||||
<div class="diary_header">
|
|
||||||
<span class="balance_text" id="balance_text_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}">Egyenleg</span>
|
|
||||||
<img src="/_image/open_folder.png">
|
|
||||||
</div>
|
|
||||||
</span>
|
|
||||||
<div id="block_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}" class="month_block">
|
|
||||||
|
|
||||||
{/if}
|
|
||||||
<div class="row">
|
|
||||||
<div class="list_item line_height14 bigger_space">
|
|
||||||
<span class="size20 bold">
|
|
||||||
{$action->get_de_training()->get_tr_date()|substr:0:4}.
|
|
||||||
{$months[$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2]}
|
{$months[$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2]}
|
||||||
{$action->get_de_training()->get_tr_date_day()}.
|
({$user_login->get_training_number_in_month({$action->get_de_training()->get_tr_date()|substr:0:4},{$action->get_de_training()->get_tr_date()|substr:5:2})} edzés)
|
||||||
{$days[$action->get_de_training()->get_tr_date_day_of_week()]}
|
<div class="diary_header">
|
||||||
{$action->get_de_training()->get_tr_date_time()}
|
<span class="balance_text" id="balance_text_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}">Egyenleg</span>
|
||||||
|
<img src="/_image/open_folder.png">
|
||||||
|
</div>
|
||||||
</span>
|
</span>
|
||||||
<br>
|
<div id="block_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}" class="month_block">
|
||||||
{if $action->get_de_training()->get_tr_training_type_trt_id()}{$action->get_de_training()->get_tr_type_name_by_id()} edzés{/if}
|
|
||||||
{$action->get_de_training()->get_tr_duration()} p
|
{elseif $action@first}
|
||||||
{if $action->get_de_training()->is_coach()}
|
<span onclick="block_action('block_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}');" class="date_separator clickable">{$actions[$action@index]->get_de_training()->get_tr_date()|substr:0:4}.
|
||||||
{foreach $action->get_de_training()->get_tr_coaches_name() as $coach_name}
|
{$months[$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2]}
|
||||||
{if $coach_name@first}({/if}{$coach_name}{if $coach_name@last}){else}, {/if}
|
({$user_login->get_training_number_in_month({$action->get_de_training()->get_tr_date()|substr:0:4},{$action->get_de_training()->get_tr_date()|substr:5:2})} edzés)
|
||||||
{/foreach}
|
<div class="diary_header">
|
||||||
|
<span class="balance_text" id="balance_text_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}">Egyenleg</span>
|
||||||
|
<img src="/_image/open_folder.png">
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
<div id="block_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}" class="month_block">
|
||||||
|
|
||||||
{/if}
|
{/if}
|
||||||
|
<div class="row">
|
||||||
{assign var="discount" value=""}
|
<div class="list_item line_height14 bigger_space">
|
||||||
{if $action->get_de_has_discount()}
|
|
||||||
{if $action->get_de_discount_id() == 1}
|
|
||||||
{assign var="discount" value="Próba kedvezmény"}
|
|
||||||
{elseif $action->get_de_discount_id() == 2}
|
|
||||||
{assign var="discount" value="Havi 10+ kedvezmény"}
|
|
||||||
{elseif $action->get_de_discount_id() == 3}
|
|
||||||
{assign var="discount" value="Duplázó kedvezmény"}
|
|
||||||
{/if}
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<div class="extra_row">
|
|
||||||
<span class="bold">Egyenleg: {if $action->get_de_balance()>0}+{/if}{$action->get_de_balance()|number_format:0:'':' '} Ft</span>
|
|
||||||
{if $discount != ""}<br>{$discount}{/if}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="side_block">
|
|
||||||
|
|
||||||
|
|
||||||
<span class="bold" style="font-size: 20px;">{if $action->get_de_balance()>0}+{/if}{$action->get_de_balance()|number_format:0:'':' '} Ft</span><br>{$discount}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{elseif $action->get_de_money_deposit()|is_a:'money_deposit'}
|
|
||||||
|
|
||||||
|
|
||||||
{if !$action@first &&
|
|
||||||
$actions[$action@index-1]->get_de_training()|is_a:'training' &&
|
|
||||||
$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2 != $actions[$action@index-1]->get_de_training()->get_tr_date()|substr:5:2
|
|
||||||
|
|
||||||
||
|
|
||||||
|
|
||||||
!$action@first &&
|
|
||||||
$actions[$action@index-1]->get_de_money_deposit()|is_a:'money_deposit' &&
|
|
||||||
$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2 != $actions[$action@index-1]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<span onclick="block_action('block_{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2}');" class="date_separator clickable">{$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}.
|
|
||||||
{$months[$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2]}
|
|
||||||
({$user_login->get_training_number_in_month({$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4},{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2})} edzés)
|
|
||||||
<img src="/_image/open_folder.png">
|
|
||||||
</span>
|
|
||||||
<div id="block_{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2}" class="month_block">
|
|
||||||
|
|
||||||
{elseif $action@first}
|
|
||||||
|
|
||||||
<span onclick="block_action('block_{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2}');" class="date_separator clickable">{$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}.
|
|
||||||
{$months[$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2]}
|
|
||||||
({$user_login->get_training_number_in_month({$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4},{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2})} edzés)
|
|
||||||
<img src="/_image/open_folder.png">
|
|
||||||
</span>
|
|
||||||
<div id="block_{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2}" class="month_block">
|
|
||||||
|
|
||||||
|
|
||||||
{/if}
|
|
||||||
<div class="row">
|
|
||||||
<div class="list_item line_height14 bigger_space money_deposit">
|
|
||||||
<span class="size20 bold">
|
<span class="size20 bold">
|
||||||
{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}.
|
{$action->get_de_training()->get_tr_date()|substr:0:4}.
|
||||||
{$months[$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2]}
|
{$months[$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2]}
|
||||||
{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date_day()}.
|
{$action->get_de_training()->get_tr_date_day()}.
|
||||||
|
{$days[$action->get_de_training()->get_tr_date_day_of_week()]}
|
||||||
|
{$action->get_de_training()->get_tr_date_time()}
|
||||||
</span>
|
</span>
|
||||||
<br>
|
<br>
|
||||||
befizetés: {$action->get_de_money_deposit()->get_mod_money_income()->get_mi_sum(true)} Ft
|
{if $action->get_de_training()->get_tr_training_type_trt_id()}{$action->get_de_training()->get_tr_type_name_by_id()} edzés{/if}
|
||||||
|
{$action->get_de_training()->get_tr_duration()} p
|
||||||
|
{if $action->get_de_training()->is_coach()}
|
||||||
|
{foreach $action->get_de_training()->get_tr_coaches_name() as $coach_name}
|
||||||
|
{if $coach_name@first}({/if}{$coach_name}{if $coach_name@last}){else}, {/if}
|
||||||
|
{/foreach}
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
{assign var="discount" value=""}
|
||||||
|
{if $action->get_de_has_discount()}
|
||||||
|
{if $action->get_de_discount_id() == 1}
|
||||||
|
{assign var="discount" value="Próba kedvezmény"}
|
||||||
|
{elseif $action->get_de_discount_id() == 2}
|
||||||
|
{assign var="discount" value="Havi 10+ kedvezmény"}
|
||||||
|
{elseif $action->get_de_discount_id() == 3}
|
||||||
|
{assign var="discount" value="Duplázó kedvezmény"}
|
||||||
|
{/if}
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<div class="extra_row">
|
||||||
|
<span class="bold">Egyenleg: {if $action->get_de_balance()>0}+{/if}{$action->get_de_balance()|number_format:0:'':' '} Ft</span>
|
||||||
|
{if $discount != ""}<br>{$discount}{/if}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="side_block">
|
<div class="side_block">
|
||||||
{assign var="discount" value=""}
|
|
||||||
|
|
||||||
<span class="bold" style="font-size: 20px;">{if $action->get_de_balance()>0}+{/if}{$action->get_de_balance()|number_format:0:'':' '} Ft</span><br>{$discount}
|
<span class="bold" style="font-size: 20px;">{if $action->get_de_balance()>0}+{/if}{$action->get_de_balance()|number_format:0:'':' '} Ft</span><br>{$discount}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{elseif $action->get_de_money_deposit()|is_a:'money_deposit'}
|
||||||
|
|
||||||
|
|
||||||
|
{if !$action@first &&
|
||||||
|
$actions[$action@index-1]->get_de_training()|is_a:'training' &&
|
||||||
|
$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2 != $actions[$action@index-1]->get_de_training()->get_tr_date()|substr:5:2
|
||||||
|
|
||||||
|
||
|
||||||
|
|
||||||
|
!$action@first &&
|
||||||
|
$actions[$action@index-1]->get_de_money_deposit()|is_a:'money_deposit' &&
|
||||||
|
$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2 != $actions[$action@index-1]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<span onclick="block_action('block_{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2}');" class="date_separator clickable">{$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}.
|
||||||
|
{$months[$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2]}
|
||||||
|
({$user_login->get_training_number_in_month({$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4},{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2})} edzés)
|
||||||
|
<img src="/_image/open_folder.png">
|
||||||
|
</span>
|
||||||
|
<div id="block_{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2}" class="month_block">
|
||||||
|
|
||||||
|
{elseif $action@first}
|
||||||
|
|
||||||
|
<span onclick="block_action('block_{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2}');" class="date_separator clickable">{$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}.
|
||||||
|
{$months[$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2]}
|
||||||
|
({$user_login->get_training_number_in_month({$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4},{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2})} edzés)
|
||||||
|
<img src="/_image/open_folder.png">
|
||||||
|
</span>
|
||||||
|
<div id="block_{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2}" class="month_block">
|
||||||
|
|
||||||
|
|
||||||
|
{/if}
|
||||||
|
<div class="row">
|
||||||
|
<div class="list_item line_height14 bigger_space money_deposit">
|
||||||
|
<span class="size20 bold">
|
||||||
|
{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}.
|
||||||
|
{$months[$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2]}
|
||||||
|
{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date_day()}.
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
befizetés: {$action->get_de_money_deposit()->get_mod_money_income()->get_mi_sum(true)} Ft
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="side_block">
|
||||||
|
{assign var="discount" value=""}
|
||||||
|
<span class="bold" style="font-size: 20px;">{if $action->get_de_balance()>0}+{/if}{$action->get_de_balance()|number_format:0:'':' '} Ft</span><br>{$discount}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
{if $action@last}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/if}
|
||||||
|
{/foreach}
|
||||||
|
</div>
|
||||||
|
<div class="info-wall">
|
||||||
|
<div class="list news">
|
||||||
|
<div style="margin-bottom: 40px;">
|
||||||
|
<h1 class="size20 bold">
|
||||||
|
Hírek, információk
|
||||||
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
|
{foreach $news_array as $news}
|
||||||
{/if}
|
<span onclick="news_block_action('news_block_{$news->get_n_id()}');" class="date_separator clickable">
|
||||||
|
{$news->get_n_title()} - {$news->get_n_date()|date_format:"%Y.%m.%d %H:%M"}
|
||||||
{if $action@last}
|
</span>
|
||||||
|
<div id="news_block_{$news->get_n_id()}" class="news_block">
|
||||||
</div>
|
{$news->get_n_text()}
|
||||||
|
</div>
|
||||||
{/if}
|
{/foreach}
|
||||||
{/foreach}
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -157,8 +177,6 @@
|
|||||||
function open_block(block_id) {
|
function open_block(block_id) {
|
||||||
$("#"+block_id).slideDown("slow");
|
$("#"+block_id).slideDown("slow");
|
||||||
$("#balance_text_"+block_id.substr(-6)).addClass('active_header');
|
$("#balance_text_"+block_id.substr(-6)).addClass('active_header');
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function close_block(block_id) {
|
function close_block(block_id) {
|
||||||
@@ -166,6 +184,14 @@ function close_block(block_id) {
|
|||||||
$("#balance_text_"+block_id.substr(-6)).removeClass('active_header');
|
$("#balance_text_"+block_id.substr(-6)).removeClass('active_header');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function open_news_block(block_id) {
|
||||||
|
$("#"+block_id).slideDown();
|
||||||
|
}
|
||||||
|
|
||||||
|
function close_news_block(block_id) {
|
||||||
|
$("#"+block_id).slideUp();
|
||||||
|
}
|
||||||
|
|
||||||
function block_action(block_id) {
|
function block_action(block_id) {
|
||||||
if ($("#"+block_id).is(':hidden')) {
|
if ($("#"+block_id).is(':hidden')) {
|
||||||
open_block(block_id);
|
open_block(block_id);
|
||||||
@@ -175,6 +201,14 @@ function block_action(block_id) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function news_block_action(block_id) {
|
||||||
|
if ($("#"+block_id).is(':hidden')) {
|
||||||
|
open_news_block(block_id);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
close_news_block(block_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$( document ).ready(function() {
|
$( document ).ready(function() {
|
||||||
var divs = $( "div[class=month_block]" );
|
var divs = $( "div[class=month_block]" );
|
||||||
@@ -183,6 +217,15 @@ $( document ).ready(function() {
|
|||||||
|
|
||||||
open_block(div_list[0].id);
|
open_block(div_list[0].id);
|
||||||
|
|
||||||
|
var divs = $( "div[class=news_block]" );
|
||||||
|
$( ".list.news" ).find( divs ).hide();
|
||||||
|
var div_list = $( ".list" ).find( divs );
|
||||||
|
|
||||||
|
var i = 1;
|
||||||
|
while (i <= div_list.length && i <= 3) {
|
||||||
|
open_news_block(div_list[i-1].id);
|
||||||
|
++i;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user