[Redizajn 1KA] - Naročila - v1
1. fieldset s podatki aktivnega paketa
This commit is contained in:
parent
935dffff6b
commit
ae93768b65
@ -10104,7 +10104,7 @@ class SurveyAdminSettings {
|
|||||||
echo '<fieldset><legend>'.$lang['edit_data'].'</legend>';
|
echo '<fieldset><legend>'.$lang['edit_data'].'</legend>';
|
||||||
|
|
||||||
//Prijavljeni kot, status, zadnja prijava, aktivni paket
|
//Prijavljeni kot, status, zadnja prijava, aktivni paket
|
||||||
echo '<div id="user_info_segment">';
|
echo '<div id="user_info_segment" class="bottom0">';
|
||||||
|
|
||||||
if($row['type'] == '0')
|
if($row['type'] == '0')
|
||||||
$type = $lang['admin_admin'];
|
$type = $lang['admin_admin'];
|
||||||
|
@ -560,6 +560,10 @@ class CrossRoad {
|
|||||||
$hide_header = 'hide_header';
|
$hide_header = 'hide_header';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($_GET['a'] == 'narocila') {
|
||||||
|
$layout_width = 'narrow';
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -318,16 +318,71 @@ class UserNarocila{
|
|||||||
$ua = UserAccess::getInstance($global_user_id);
|
$ua = UserAccess::getInstance($global_user_id);
|
||||||
$user_access = $ua->getAccess();
|
$user_access = $ua->getAccess();
|
||||||
|
|
||||||
// Ce ni polja v bazi oz je nastavljen paket na 1 ima osnovni paket
|
$sqlA = sisplet_query("SELECT ua.time_activate, ua.time_expire, uap.id AS package_id, uap.name AS package_name
|
||||||
if(!$user_access || $user_access['package_id'] == '1'){
|
FROM user_access ua, user_access_paket uap
|
||||||
echo '<p>'.$lang['srv_narocila_current_package'].':</span> <span class="bold">1KA</span></p>';
|
WHERE ua.usr_id='$global_user_id' AND uap.id=ua.package_id
|
||||||
|
");
|
||||||
|
$rowA = mysqli_fetch_array($sqlA);
|
||||||
|
|
||||||
|
echo '<div id="user_info_segment_narocila">';
|
||||||
|
|
||||||
|
echo '<div class="user_info text">';
|
||||||
|
if(AppSettings::getInstance()->getSetting('app_settings-commercial_packages') === true){
|
||||||
|
echo '<div class="setting_holder">'.$lang['srv_access_package'].':</div>';
|
||||||
|
if($rowA['package_id'] == '2' || $rowA['package_id'] == '3'){
|
||||||
|
echo '<div class="setting_holder">'.$lang['srv_narocila_current_start'].':</div>';
|
||||||
|
echo '<div class="setting_holder">'.$lang['srv_narocila_current_expire'].':</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
echo '<div class="user_info data bold">';
|
||||||
|
|
||||||
|
// Trenutni paket funkcionalnosti
|
||||||
|
|
||||||
|
$drupal_url = ($lang['id'] == '2') ? $site_url.'d/en/' : $site_url.'d/';
|
||||||
|
|
||||||
|
// Ni nobenega paketa
|
||||||
|
if(mysqli_num_rows($sqlA) == 0){
|
||||||
|
$package_string = $lang['paket_opis_1ka'].' ('.$lang['srv_access_package_free'].')</div><div class="setting_holder"><button class="medium yellow" type="button" onClick="window.location.href=\''.$drupal_url.''.$lang['srv_narocila_buyurl'].'\';">'.$lang['srv_narocila_buy'].'</button>';
|
||||||
}
|
}
|
||||||
// Imamo aktiviran paket - izpisemo podatke
|
|
||||||
else{
|
else{
|
||||||
echo '<div class="data"><span class="setting_title">'.$lang['srv_narocila_current_package'].':</span> <span class="bold">'.$user_access['package_name'],'</span></div>';
|
$userAccess = UserAccess::getInstance($global_user_id);
|
||||||
echo '<div class="data"><span class="setting_title">'.$lang['srv_narocila_current_start'].':</span> <span class="bold">'.date( 'd.m.Y', strtotime($user_access['time_activate'])).'</span></div>';
|
$package_name = $userAccess->getPackageName($rowA['package_id']);
|
||||||
echo '<div class="data"><span class="setting_title">'.$lang['srv_narocila_current_expire'].':</span> <span class="bold">'.date( 'd.m.Y', strtotime($user_access['time_expire'])),'</span></div>';
|
|
||||||
|
// Ce ima paket 2 ali 3
|
||||||
|
if($rowA['package_id'] == '2' || $rowA['package_id'] == '3'){
|
||||||
|
|
||||||
|
// Ce je paket ze potekel
|
||||||
|
if(strtotime($rowA['time_expire']) < time()){
|
||||||
|
|
||||||
|
$package_string = '<span>';
|
||||||
|
$package_string .= $package_name;
|
||||||
|
$package_string .= ' ('.$lang['srv_access_package_expire'].' '.date("d.m.Y", strtotime($rowA['time_expire'])).')';
|
||||||
|
$package_string .= '</span>';
|
||||||
|
|
||||||
|
$package_string .= '</div><div class="setting_holder"><button class="medium yellow" type="button" onClick="window.location.href=\''.$drupal_url.'izvedi-nakup/'.$rowA['package_id'].'/podatki/\';">'.$lang['srv_narocila_extend'].'</button>';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$package_string = '<div class="setting_holder">'.$package_name.'</div>';
|
||||||
|
$package_string .= '<div class="setting_holder">'.date("d.m.Y", strtotime($rowA['time_activate'])).'</div>';
|
||||||
|
$package_string .= '<div class="setting_holder">'.date("d.m.Y", strtotime($rowA['time_expire'])).'</div>';
|
||||||
|
|
||||||
|
$package_string .= '<div class="setting_holder"><button class="medium yellow" type="button" onClick="window.location.href=\''.$drupal_url.'izvedi-nakup/'.$rowA['package_id'].'/podatki/\';">'.$lang['srv_narocila_extend'].'</button></div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$package_string = $package_name;
|
||||||
|
$package_string .= ' ('.$lang['srv_access_package_free'].')';
|
||||||
|
|
||||||
|
$package_string .= '</div><div class="setting_holder"><button class="medium yellow" type="button" onClick="window.location.href=\''.$drupal_url.''.$lang['srv_narocila_buyurl'].'\';">'.$lang['srv_narocila_buy'].'</button>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
echo $package_string;
|
||||||
|
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
echo '</fieldset>';
|
echo '</fieldset>';
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
19
resources/sass/admin_new/pages/narocila.scss
Normal file
19
resources/sass/admin_new/pages/narocila.scss
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
div#user_info_segment_narocila {
|
||||||
|
background-color: $light-gray;
|
||||||
|
border: 1px solid $gray;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
padding: 32px 20px;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
|
||||||
|
.user_info {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
&.text {
|
||||||
|
margin-right: 50px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -14,4 +14,6 @@
|
|||||||
@import "settings/settings";
|
@import "settings/settings";
|
||||||
|
|
||||||
//New survey
|
//New survey
|
||||||
@import "new_survey_page/new_survey_page";
|
@import "new_survey_page/new_survey_page";
|
||||||
|
|
||||||
|
@import "narocila"
|
@ -16,7 +16,7 @@ div {
|
|||||||
|
|
||||||
padding: 32px 20px;
|
padding: 32px 20px;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user