Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

307 subscriptions #446

Draft
wants to merge 89 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
be201b2
307 first commit
clement-sanz Sep 30, 2024
9224613
307 update install sql
clement-sanz Oct 1, 2024
1661081
307 display memberships users
clement-sanz Oct 2, 2024
495b57c
307 redirect after delete from edition
clement-sanz Oct 2, 2024
c992717
307 manage input for save
clement-sanz Oct 3, 2024
8e62210
307 add currecny and disabled features
clement-sanz Oct 3, 2024
4f042a1
307 update sql install
clement-sanz Oct 4, 2024
df1416a
307 add histo membership front
clement-sanz Oct 4, 2024
4409051
Merge branch 'master' into 307_subscriptions
MacWarrior Oct 7, 2024
db359be
Fix SQL
MacWarrior Oct 7, 2024
d216174
307 fixes
clement-sanz Oct 8, 2024
3952816
Merge remote-tracking branch 'remotes/origin/master' into 307_subscri…
clement-sanz Oct 8, 2024
4516138
307 update dispaly view_user
clement-sanz Oct 8, 2024
a7b8346
307 fixes;
clement-sanz Oct 9, 2024
4ee600a
Merge branch 'master' into 307_subscriptions
MacWarrior Oct 9, 2024
ec3ed74
Fix SQL, cleanup
MacWarrior Oct 9, 2024
3a39284
Merge branch 'master' into 307_subscriptions
MacWarrior Oct 9, 2024
a4e5a36
Merge branch 'master' into 307_subscriptions
MacWarrior Oct 10, 2024
ef4d3de
307 fixes
clement-sanz Oct 14, 2024
bf74e87
307 _ 14 implement user_membership status
clement-sanz Oct 14, 2024
2a6d61d
307 add table for transaction
clement-sanz Oct 14, 2024
31c69f4
307 fix migrations
clement-sanz Oct 14, 2024
b20c970
307 fix insert Membership
clement-sanz Oct 15, 2024
40e9719
307 fixes manage user level; redirect loop; new user_membership
clement-sanz Oct 15, 2024
cf6d0c0
307 implement public videos
clement-sanz Oct 17, 2024
0c2208b
Merge branch 'master' into 307_subscriptions
MacWarrior Oct 17, 2024
b04c70a
307 rework links
clement-sanz Oct 17, 2024
b468359
307 if public video default broadcast is logged
clement-sanz Oct 17, 2024
bcdc339
Update vhost, update page 404
MacWarrior Oct 17, 2024
08c499e
335 fix videos publics access
clement-sanz Oct 17, 2024
709c73a
Merge branch '307_subscriptions' of https://github.com/MacWarrior/cli…
clement-sanz Oct 17, 2024
1e31ea3
Merge branch 'master' into 307_subscriptions
MacWarrior Oct 17, 2024
6498b3f
Merge branch 'master' into 307_subscriptions
MacWarrior Oct 17, 2024
e5177c6
307 fix error
clement-sanz Oct 18, 2024
cc240fd
Merge branch '307_subscriptions' of https://github.com/MacWarrior/cli…
clement-sanz Oct 18, 2024
c6f7963
307 fix error
clement-sanz Oct 18, 2024
1432844
307 default translation for user levels
clement-sanz Oct 18, 2024
c65b1bf
335 update front end membership
clement-sanz Oct 18, 2024
b7463d6
Merge branch 'master' into 307_subscriptions
MacWarrior Oct 18, 2024
2522ad6
Fix SQL, fix typos, cleanup
MacWarrior Oct 18, 2024
1c16d81
335 - fixes and updates
clement-sanz Oct 23, 2024
05d96a4
335 missings translations
clement-sanz Oct 23, 2024
49db7e6
Merge branch 'master' into 307_subscriptions
MacWarrior Oct 28, 2024
f37ce5d
335 fixes & changes
clement-sanz Oct 29, 2024
3119cf3
335 factorize login / login as user + changes
clement-sanz Oct 30, 2024
b0e8c9e
Merge remote-tracking branch 'remotes/origin/master' into 307_subscri…
clement-sanz Nov 4, 2024
c9c3254
335 manage default page
clement-sanz Nov 4, 2024
5ca022d
Fix SQL
MacWarrior Nov 4, 2024
19cec89
335 fix translation + install and redirect
clement-sanz Nov 5, 2024
24c0b8c
Merge branch 'master' into 307_subscriptions
MacWarrior Nov 6, 2024
bb48425
335 fix search + display menu mobile
clement-sanz Nov 6, 2024
fb24ceb
335 fixes
clement-sanz Nov 6, 2024
fe6e608
Merge remote-tracking branch 'remotes/origin/master' into 307_subscri…
clement-sanz Nov 7, 2024
d409577
335 fix burger menu (mobile)
clement-sanz Nov 7, 2024
a064276
335 fix display search on small screen
clement-sanz Nov 7, 2024
4f7b1a6
Merge branch 'master' into 307_subscriptions
MacWarrior Nov 14, 2024
c99a9d3
Fix CSS mobile
MacWarrior Nov 15, 2024
27e66dc
Merge remote-tracking branch 'remotes/origin/master' into 307_subscri…
clement-sanz Nov 19, 2024
ea110e0
335 fix mysql8 compatibility + install
clement-sanz Nov 19, 2024
91db0cf
335 add fields allowed emails and only_visible_eligible
clement-sanz Nov 19, 2024
70b10b2
335 hide membership if not authorized
clement-sanz Nov 19, 2024
91818bc
Merge branch 'master' into 307_subscriptions
MacWarrior Nov 27, 2024
145dc2d
Merge remote-tracking branch 'remotes/origin/master' into 307_subscri…
clement-sanz Nov 29, 2024
f7ed540
335 add error for invalid email
clement-sanz Nov 29, 2024
002b11d
Merge remote-tracking branch 'remotes/origin/master' into 307_subscri…
clement-sanz Dec 2, 2024
0d60a9d
335 fix funcitons
clement-sanz Dec 2, 2024
ed1ab0c
335 fix generate permission for migration
clement-sanz Dec 2, 2024
6f6cda2
Merge branch 'master' into 307_subscriptions
MacWarrior Dec 5, 2024
4664c0f
Fix permission check, cleanup
MacWarrior Dec 6, 2024
610bfe9
335 fix install default_homepage permission
clement-sanz Dec 6, 2024
7ded7d6
Merge branch 'master' into 307_subscriptions
MacWarrior Dec 6, 2024
d0a6517
Merge branch 'master' into 307_subscriptions
MacWarrior Dec 11, 2024
8ac4adb
Merge branch 'master' into 307_subscriptions
MacWarrior Dec 12, 2024
1db345f
Merge branch 'master' into 307_subscriptions
MacWarrior Dec 12, 2024
a003106
307_subscriptions : correction logincheck
nvanhaezebrouck Dec 12, 2024
668ffb0
Fix merge
MacWarrior Dec 12, 2024
085e28b
Merge branch '307_subscriptions' of https://github.com/MacWarrior/cli…
MacWarrior Dec 12, 2024
9a46c91
Update migration
MacWarrior Dec 12, 2024
d5b5c7f
Update myaccount
MacWarrior Dec 12, 2024
bd47265
Merge branch 'master' into 307_subscriptions
MacWarrior Dec 12, 2024
c5c9322
307 subscription : debut interface de selection des abonnements
nvanhaezebrouck Dec 16, 2024
a295c4a
307 subscriptions
nvanhaezebrouck Dec 16, 2024
bf72922
Merge branch 'master' into 307_subscriptions
MacWarrior Dec 17, 2024
5410872
Fix typo
MacWarrior Dec 17, 2024
56c9d4c
Merge remote-tracking branch 'origin/master' into 307_subscriptions
clement-sanz Jan 6, 2025
1a53143
335 fix merge
clement-sanz Jan 6, 2025
eeb370f
335 default user_level implementation
clement-sanz Jan 6, 2025
790f1fe
Merge remote-tracking branch 'remotes/origin/master' into 307_subscri…
clement-sanz Jan 6, 2025
3fd8d97
335 hide membership linked to default user level
clement-sanz Jan 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion upload/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,17 @@ RewriteEngine on
RewriteRule ^videos/(.*)/(.*)/(.*)/(.*)/(.*) videos.php?cat=$1&sort=$3&time=$4&page=$5&seo_cat_name=$2 [L]
RewriteRule ^videos/([0-9]+) videos.php?page=$1 [L]
RewriteRule ^videos/?$ videos.php?%{QUERY_STRING} [L]
RewriteRule ^video/(.*)/(.*) watch_video.php?v=$1&%{QUERY_STRING} [L]
RewriteRule ^videos_public/(.*)/(.*)/(.*)/(.*)/(.*) videos_public.php?cat=$1&sort=$3&time=$4&page=$5&seo_cat_name=$2 [L]
RewriteRule ^videos_public/([0-9]+) videos_public.php?page=$1 [L]
RewriteRule ^videos_public/?$ videos_public.php?%{QUERY_STRING} [L]

#Alternate watch video links
RewriteRule ^(.*)\_v([0-9]+) watch_video.php?v=$2&%{QUERY_STRING} [L]
RewriteRule ^video/([0-9]+)_(.*) watch_video.php?v=$1&%{QUERY_STRING} [L]
RewriteRule ^video/(.*)/(.*) watch_video.php?v=$1&%{QUERY_STRING} [L]
RewriteRule ^video_public\-(.*)\_v([0-9]+) watch_public_video.php?v=$2&%{QUERY_STRING} [L]
RewriteRule ^video_public/([0-9]+)_(.*) watch_public_video.php?v=$1&%{QUERY_STRING} [L]
RewriteRule ^video_public/(.*)/(.*) watch_public_video.php?v=$1&%{QUERY_STRING} [L]

#Users, Channel & Management
RewriteRule ^channels/(.*)/(.*)/(.*)/(.*)/(.*) channels.php?cat=$1&sort=$3&time=$4&page=$5&seo_cat_name=$2 [L]
Expand Down
15 changes: 15 additions & 0 deletions upload/404.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@
define('THIS_PAGE', '404');
require 'includes/config.inc.php';

if( !empty($_SERVER['REQUEST_URI']) ){
$url_new = ['video_public', 'videos_public'];
foreach($url_new as $url){
if (strpos($_SERVER['REQUEST_URI'], $url) !== false) {
$msg = 'Vhosts are outdated, URL not recognized : ' . $_SERVER['REQUEST_URI'];
error_log($msg);
DiscordLog::sendDump($msg);

if( User::getInstance()->hasAdminAccess() && in_dev() ) {
e($msg);
}
}
}
}

if (file_exists(LAYOUT . '/404.html')) {
template_files('404.html');
} else {
Expand Down
15 changes: 15 additions & 0 deletions upload/actions/admin_activate_membership.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
define('THIS_PAGE', 'update_phrase');
require_once dirname(__FILE__, 2) . '/includes/admin_config.php';

User::getInstance()->hasPermissionAjax('admin_access');

$id_membership = $_POST['id_membership'];
$membership = Membership::getInstance()->getOne(['id_membership'=>$id_membership]);
if (empty($membership)) {
e(lang('cant_delete_membership_at_least_one_user'));
$success = false;
} else {
$success = Membership::getInstance()->update(['id_membership'=>$id_membership, 'disabled'=>$_POST['disabled']]);
}
echo json_encode(['msg'=>getTemplateMsg(), 'success'=>$success]);
15 changes: 15 additions & 0 deletions upload/actions/admin_activate_user_level.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
define('THIS_PAGE', 'activate_user_level');
require_once dirname(__FILE__, 2) . '/includes/admin_config.php';

User::getInstance()->hasPermissionAjax('admin_access');

$user_level_id = $_POST['user_level_id'];
$user_level = userquery::getInstance()->get_level_details($user_level_id);
if (empty($user_level)) {
e(lang('user_level_not_found'));
$success = false;
} else {
$success = User::getInstance()->toggleUserLevelActivation($user_level_id, $_POST['active'] == 'true');
}
echo json_encode(['msg'=>getTemplateMsg(), 'success'=>$success]);
23 changes: 23 additions & 0 deletions upload/actions/admin_delete_membership.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php
define('THIS_PAGE', 'update_phrase');
require_once dirname(__FILE__, 2) . '/includes/admin_config.php';

User::getInstance()->hasPermissionAjax('admin_access');

$id_membership = $_POST['id_membership'];
$membership = Membership::getInstance()->getOne(['id_membership'=>$id_membership, 'get_user_membership'=>true]);
if (!empty($membership['id_user_membership'])) {
e(lang('cant_delete_membership_at_least_one_user'));
$success = false;
} else {
$success = Membership::getInstance()->delete($id_membership);
}
if ($success) {
e(lang('membership_deleted'), 'm');
}
$url='';
if (!empty($_POST['redirect'])) {
SessionMessageHandler::add_message(lang('membership_deleted'));
$url = DirPath::getUrl('admin_area') .'memberships.php';
}
echo json_encode(['msg'=>getTemplateMsg(), 'success'=>$success, 'url'=>$url]);
24 changes: 24 additions & 0 deletions upload/actions/admin_get_membership_history.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
define('THIS_PAGE', 'get_membership_history');
require_once dirname(__FILE__, 2) . '/includes/admin_config.php';

User::getInstance()->hasPermissionAjax('admin_access');

if (!empty($_POST['page'])) {
$sql_limit = create_query_limit($_POST['page'], config('video_list_view_video_history'));
}
$params = [
'userid' => $_POST['userid'],
'limit' => $sql_limit ?? '',
'order' => ' date_start DESC '
];
$results = Membership::getInstance()->getAllHistoMembershipForUser($params);
$params['count'] = true;
unset($params['limit']);
$totals_pages = count_pages(Membership::getInstance()->getAllHistoMembershipForUser($params), config('video_list_view_video_history')) ;
pages::getInstance()->paginate($totals_pages, $_POST['page'], 'javascript:pageViewHistory(#page#, ' . $_POST['userid'] . ');');

display_user_membership_history([
'results' => $results,
'modal' => ($_POST['modal'] ?? true)
], $_POST['userid']);
3 changes: 3 additions & 0 deletions upload/actions/file_uploader.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@
, 'allow_embedding' => 'yes'
, 'broadcast' => 'public'
];
if (config('enable_public_video_page') == 'yes') {
$vidDetails['broadcast'] = 'logged';
}

$vid = $Upload->submit_upload($vidDetails);

Expand Down
2 changes: 1 addition & 1 deletion upload/actions/video_view_history.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
define('THIS_PAGE', 'info_tmdb');
define('THIS_PAGE', 'video_view_history');
require_once dirname(__FILE__, 2) . '/includes/admin_config.php';

if (config('enable_access_view_video_history') != 'yes' && config('enable_video_view_history') != 'yes') {
Expand Down
56 changes: 56 additions & 0 deletions upload/admin_area/edit_membership.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php
define('THIS_PAGE', 'membership_user_levels');
global $pages, $Upload, $eh, $myquery, $cbvid, $breadcrumb;
require_once dirname(__FILE__, 2) . '/includes/admin_config.php';

User::getInstance()->hasPermissionOrRedirect('admin_access');
$pages->page_redir();

/* Generating breadcrumb */

$membership=[];
//TODO check inputs required etc.
if (!empty($_POST['id_membership'])) {
if (Membership::getInstance()->update($_POST)) {
e(lang('user_level_successfully_saved'),'m');
} else {
$membership = $_POST;
}
} elseif (!empty($_POST)) {
if (Membership::getInstance()->insert($_POST)) {
SessionMessageHandler::add_message(lang('user_level_successfully_saved'), 'm', get_server_url() . DirPath::getUrl('admin_area') . 'memberships.php');
} else {
$membership = $_POST;
}
}

if (empty($membership)) {
$membership = Membership::getInstance()->getOne(['id_membership' => $_REQUEST['id_membership'] ?: 0]);
}
assign('membership', $membership);
assign('frequencies', Membership::getInstance()->getFrequencies());
assign('currencies', Membership::getInstance()->getAllCurrency());
assign('user_levels', userquery::getInstance()->get_levels() ?: []);

global $breadcrumb;
$breadcrumb[0] = [
'title' => lang('memberships'),
'url' => ''
];
$breadcrumb[1] = [
'title' => lang('user_levels'),
'url' => DirPath::getUrl('admin_area') . 'memberships.php'
];
$titre = lang((!empty($membership) ? 'edit_' : 'add_') . 'membership');
$breadcrumb[2] = [
'title' => $titre,
'url' => DirPath::getUrl('admin_area') . 'edit_membership.php' . (!empty($membership) ? '?id_membership=' . $membership['id_membership'] : '')
];

$min_suffixe = in_dev() ? '' : '.min';
ClipBucket::getInstance()->addAdminJS([
'pages/membership/edit_membership' . $min_suffixe . '.js' => 'admin',
]);
subtitle($titre);
template_files('edit_membership.html');
display_it();
4 changes: 2 additions & 2 deletions upload/admin_area/edit_video.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@
} else {
//add parameter to display message after redirect
if ($_GET['mode'] == 'delete') {
sessionMessageHandler::add_message(lang('video_deleted'), 'm', get_server_url() . DirPath::getUrl('admin_area') . 'video_manager.php');
SessionMessageHandler::add_message(lang('video_deleted'), 'm', get_server_url() . DirPath::getUrl('admin_area') . 'video_manager.php');
}
sessionMessageHandler::add_message(lang('class_vdo_del_err'), 'e', get_server_url() . DirPath::getUrl('admin_area') . 'video_manager.php');
SessionMessageHandler::add_message(lang('class_vdo_del_err'), 'e', get_server_url() . DirPath::getUrl('admin_area') . 'video_manager.php');
}

$resolution_list = getResolution_list($data);
Expand Down
6 changes: 1 addition & 5 deletions upload/admin_area/login_as_user.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
}
$pages->page_redir();

if ($_GET['revert']) {
userquery::getInstance()->revert_from_user();
redirect_to('/admin_area');
}
$uid = $_GET['uid'];

$udetails = userquery::getInstance()->get_user_details(user_id());
Expand All @@ -27,6 +23,6 @@
}

if (userquery::getInstance()->login_as_user($uid)) {
redirect_to(get_server_url());
User::redirectAfterLogin();
}
display_it();
8 changes: 7 additions & 1 deletion upload/admin_area/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@
, 'video_enable_nsfw_check'
, 'photo_nsfw_check_model'
, 'video_nsfw_check_model'
, 'enable_membership'
, 'enable_public_video_page'
];

$config_booleans_to_refactor = [
Expand Down Expand Up @@ -474,7 +476,11 @@
'photo_enable_nsfw_check',
'video_enable_nsfw_check',
'photo_nsfw_check_model',
'video_nsfw_check_model'
'video_nsfw_check_model',
'number_featured_video',
'video_list_view_video_history',
'enable_membership',
'enable_public_video_page'
];

foreach ($opt_list as $optl) {
Expand Down
2 changes: 1 addition & 1 deletion upload/admin_area/manage_playlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
'url' => DirPath::getUrl('admin_area') . 'manage_playlist.php?mode=edit_playlist&pid=' . display_clean($pid)
];
} else {
sessionMessageHandler::add_message(lang('playlist_not_exist'), 'e', get_server_url() . DirPath::getUrl('admin_area') . 'manage_playlist.php');
SessionMessageHandler::add_message(lang('playlist_not_exist'), 'e', get_server_url() . DirPath::getUrl('admin_area') . 'manage_playlist.php');
}
break;
}
Expand Down
48 changes: 48 additions & 0 deletions upload/admin_area/memberships.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php
define('THIS_PAGE', 'membership_user_levels');
global $pages, $Upload, $eh, $myquery, $cbvid, $breadcrumb;
require_once dirname(__FILE__, 2) . '/includes/admin_config.php';

User::getInstance()->hasPermissionOrRedirect('admin_access');
/* Generating breadcrumb */
global $breadcrumb;
$breadcrumb[0] = [
'title' => lang('memberships'),
'url' => ''
];
$breadcrumb[1] = [
'title' => lang('user_levels'),
'url' => DirPath::getUrl('admin_area') . 'memberships.php'
];


$page = mysql_clean($_GET['page']);
$params['limit'] = create_query_limit($page, config('admin_pages'));
$params['group'] = Membership::getInstance()->getTablename() .'.id_membership';
$params['get_nb_users'] = true;
$memberships = Membership::getInstance()->getAll($params);
assign('memberships', $memberships);
if (empty($memberships)) {
$total_rows = 0;
} else {
if (count($memberships) < config('admin_pages') && ($page == 1 || empty($page))) {
$total_rows = count($memberships);
} else {
$params['count'] = true;
unset($params['limit']);
unset($params['order']);
unset($params['get_nb_users']);
$total_rows = Membership::getInstance()->getAll($params);
}
}
$total_pages = count_pages($total_rows, config('admin_pages'));
$pages->paginate($total_pages, $page);

$min_suffixe = in_dev() ? '' : '.min';
ClipBucket::getInstance()->addAdminJS([
'pages/membership/memberships' . $min_suffixe . '.js' => 'admin',
]);

subtitle(lang('user_levels'));
template_files('memberships.html');
display_it();
2 changes: 1 addition & 1 deletion upload/admin_area/styles/cb_2014/layout/add_members.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ <h2>Add New User</h2>
<select class="form-control" name="level" id="level">
{assign var=levels value=$userquery->get_levels()}
{foreach from=$levels item=level}
<option value="{$level.user_level_id}" {if isset($smarty.post.level) && $smarty.post.level==$level.user_level_id} selected{elseif $level.user_level_id==2}selected{/if}>{$level.user_level_name}</option>
<option value="{$level.user_level_id}" {if isset($smarty.post.level) && $smarty.post.level==$level.user_level_id} selected{elseif $level.user_level_id== UserLevel::getDefaultId()}selected{/if}>{$level.user_level_name}</option>
{/foreach}
</select>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<div class="advanceSearchButton clearfix">
<a href="#" class="btn btn-primary btn-sm pull-right current after" onclick="$('#searchdiv').toggle();return false;" style="top: 15px;">
{lang code="com_advance_results"}
<i class="glyphicon glyphicon-chevron-down down"></i>
<i class="glyphicon glyphicon-chevron-up up" style="display:none;"></i>
</a>
</div>

<div class="search_box well" id="searchdiv" {if !$username && !$user_level_id} style="display:none;"{/if}>
<form id="users_memberships_search" name="users_memberships_search" method="post" action="users_memberships.php" >
<input type="hidden" name="sort" id="sort" value="{$sort}">
<input type="hidden" name="sort_order" id="sort_order" value="{$sort_order}">
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label for="username">{lang('username')}</label>
<input class="form-control" name="username" type="text" id="username" value="{$username}" />
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="user_level_id">{lang('user_levels')}</label>
<select class="form-control" name="user_level_id" id="user_level_id">
<option value=""></option>
{foreach from=$user_levels item=user_level}
<option value="{$user_level.id_membership}" {if $user_level_id == $user_level.id_membership}selected{/if} >
{lang($user_level.user_level_name|strtolower|replace:' ':'_')} - {lang('frequency_'|cat:$user_level.frequency)}
</option>
{/foreach}
</select>
</div>
</div>
</div>
<div class="form-group">
<input type="submit" name="search" id="search" value='{lang code="search"}' class="btn btn-success btn-sm"/>
</div>
</form>
</div>
Loading