Merge branch 'master' of https://bitbucket.org/1ka/1ka
This commit is contained in:
commit
e710b864bc
@ -3264,13 +3264,13 @@ class SurveyAdminSettings {
|
|||||||
echo '<p><label>'.$lang['srv_email_setting_host'].'<input type="text" name="SMTPHost2" value="'.$enkaSettings['SMTPHost'].'" ></label>';
|
echo '<p><label>'.$lang['srv_email_setting_host'].'<input type="text" name="SMTPHost2" value="'.$enkaSettings['SMTPHost'].'" ></label>';
|
||||||
echo '</p>';
|
echo '</p>';
|
||||||
#delay
|
#delay
|
||||||
echo '<p><label>'.$lang['srv_email_setting_smtp_delay'].': <select name="SMTPDelay2">'
|
echo '<p><label>'.$lang['srv_email_setting_smtp_delay'].' '.Help::display('srv_inv_delay').': <select name="SMTPDelay2">'
|
||||||
. '<option value="0" '.($enkaSettings['SMTPDelay']=="0"?'selected="selected"':'') .'>0 </option>'
|
/*. '<option value="0" '.($enkaSettings['SMTPDelay']=="0"?'selected="selected"':'') .'>0 </option>'
|
||||||
. '<option value="10000" '.($enkaSettings['SMTPDelay']=="10000"?'selected="selected"':'') .'>0.01 sec (max 100 / sec)</option>'
|
. '<option value="10000" '.($enkaSettings['SMTPDelay']=="10000"?'selected="selected"':'') .'>0.01 sec (max 100 / sec)</option>'
|
||||||
. '<option value="20000" '.($enkaSettings['SMTPDelay']=="20000"?'selected="selected"':'') .'>0.02 sec (max 50 / sec)</option>'
|
. '<option value="20000" '.($enkaSettings['SMTPDelay']=="20000"?'selected="selected"':'') .'>0.02 sec (max 50 / sec)</option>'
|
||||||
. '<option value="50000" '.($enkaSettings['SMTPDelay']=="50000"?'selected="selected"':'') .'>0.05 sec (max 20 / sec)</option>'
|
. '<option value="50000" '.($enkaSettings['SMTPDelay']=="50000"?'selected="selected"':'') .'>0.05 sec (max 20 / sec)</option>'
|
||||||
. '<option value="100000" '.($enkaSettings['SMTPDelay']=="100000"?'selected="selected"':'') .'>0.1 sec (max 10 / sec)</option>'
|
. '<option value="100000" '.($enkaSettings['SMTPDelay']=="100000"?'selected="selected"':'') .'>0.1 sec (max 10 / sec)</option>'
|
||||||
. '<option value="200000" '.($enkaSettings['SMTPDelay']=="200000"?'selected="selected"':'') .'>0.2 sec (max 5 / sec)</option>'
|
. '<option value="200000" '.($enkaSettings['SMTPDelay']=="200000"?'selected="selected"':'') .'>0.2 sec (max 5 / sec)</option>'*/
|
||||||
. '<option value="500000" '.($enkaSettings['SMTPDelay']=="500000"?'selected="selected"':'') .'>0.5 sec (max 2 / sec)</option>'
|
. '<option value="500000" '.($enkaSettings['SMTPDelay']=="500000"?'selected="selected"':'') .'>0.5 sec (max 2 / sec)</option>'
|
||||||
. '<option value="1000000" '.($enkaSettings['SMTPDelay']=="1000000"?'selected="selected"':'') .'>1 sec (max 1 / sec)</option>'
|
. '<option value="1000000" '.($enkaSettings['SMTPDelay']=="1000000"?'selected="selected"':'') .'>1 sec (max 1 / sec)</option>'
|
||||||
. '<option value="2000000" '.($enkaSettings['SMTPDelay']=="2000000"?'selected="selected"':'') .'>2 sec (max 30 / min)</option>'
|
. '<option value="2000000" '.($enkaSettings['SMTPDelay']=="2000000"?'selected="selected"':'') .'>2 sec (max 30 / min)</option>'
|
||||||
|
@ -9927,13 +9927,13 @@ class SurveyInvitationsNew {
|
|||||||
echo '<p><label>'.$lang['srv_email_setting_reply'].'<input type="text" name="SMTPReplyTo0" value="'.$enkaSettings['SMTPReplyTo'].'" ></label>';
|
echo '<p><label>'.$lang['srv_email_setting_reply'].'<input type="text" name="SMTPReplyTo0" value="'.$enkaSettings['SMTPReplyTo'].'" ></label>';
|
||||||
echo '</p>';
|
echo '</p>';
|
||||||
#delay
|
#delay
|
||||||
echo '<p><label>'.$lang['srv_email_setting_smtp_delay'].': <select name="SMTPDelay0">'
|
echo '<p><label>'.$lang['srv_email_setting_smtp_delay'].' '.Help::display('srv_inv_delay').': <select name="SMTPDelay0">'
|
||||||
. '<option value="0" '.($enkaSettings['SMTPDelay']=="0"?'selected="selected"':'') .'>0 </option>'
|
/*. '<option value="0" '.($enkaSettings['SMTPDelay']=="0"?'selected="selected"':'') .'>0 </option>'
|
||||||
. '<option value="10000" '.($enkaSettings['SMTPDelay']=="10000"?'selected="selected"':'') .'>0.01 sec (max 100 / sec)</option>'
|
. '<option value="10000" '.($enkaSettings['SMTPDelay']=="10000"?'selected="selected"':'') .'>0.01 sec (max 100 / sec)</option>'
|
||||||
. '<option value="20000" '.($enkaSettings['SMTPDelay']=="20000"?'selected="selected"':'') .'>0.02 sec (max 50 / sec)</option>'
|
. '<option value="20000" '.($enkaSettings['SMTPDelay']=="20000"?'selected="selected"':'') .'>0.02 sec (max 50 / sec)</option>'
|
||||||
. '<option value="50000" '.($enkaSettings['SMTPDelay']=="50000"?'selected="selected"':'') .'>0.05 sec (max 20 / sec)</option>'
|
. '<option value="50000" '.($enkaSettings['SMTPDelay']=="50000"?'selected="selected"':'') .'>0.05 sec (max 20 / sec)</option>'
|
||||||
. '<option value="100000" '.($enkaSettings['SMTPDelay']=="100000"?'selected="selected"':'') .'>0.1 sec (max 10 / sec)</option>'
|
. '<option value="100000" '.($enkaSettings['SMTPDelay']=="100000"?'selected="selected"':'') .'>0.1 sec (max 10 / sec)</option>'
|
||||||
. '<option value="200000" '.($enkaSettings['SMTPDelay']=="200000"?'selected="selected"':'') .'>0.2 sec (max 5 / sec)</option>'
|
. '<option value="200000" '.($enkaSettings['SMTPDelay']=="200000"?'selected="selected"':'') .'>0.2 sec (max 5 / sec)</option>'*/
|
||||||
. '<option value="500000" '.($enkaSettings['SMTPDelay']=="500000"?'selected="selected"':'') .'>0.5 sec (max 2 / sec)</option>'
|
. '<option value="500000" '.($enkaSettings['SMTPDelay']=="500000"?'selected="selected"':'') .'>0.5 sec (max 2 / sec)</option>'
|
||||||
. '<option value="1000000" '.($enkaSettings['SMTPDelay']=="1000000"?'selected="selected"':'') .'>1 sec (max 1 / sec)</option>'
|
. '<option value="1000000" '.($enkaSettings['SMTPDelay']=="1000000"?'selected="selected"':'') .'>1 sec (max 1 / sec)</option>'
|
||||||
. '<option value="2000000" '.($enkaSettings['SMTPDelay']=="2000000"?'selected="selected"':'') .'>2 sec (max 30 / min)</option>'
|
. '<option value="2000000" '.($enkaSettings['SMTPDelay']=="2000000"?'selected="selected"':'') .'>2 sec (max 30 / min)</option>'
|
||||||
@ -10009,13 +10009,13 @@ class SurveyInvitationsNew {
|
|||||||
echo '</p>';
|
echo '</p>';
|
||||||
|
|
||||||
#delay
|
#delay
|
||||||
echo '<p><label>'.$lang['srv_email_setting_smtp_delay'].': <select name="SMTPDelay2">'
|
echo '<p><label>'.$lang['srv_email_setting_smtp_delay'].' '.Help::display('srv_inv_delay').': <select name="SMTPDelay2">'
|
||||||
. '<option value="0" '.($enkaSettings['SMTPDelay']=="0"?'selected="selected"':'') .'>0 </option>'
|
/*. '<option value="0" '.($enkaSettings['SMTPDelay']=="0"?'selected="selected"':'') .'>0 </option>'
|
||||||
. '<option value="10000" '.($enkaSettings['SMTPDelay']=="10000"?'selected="selected"':'') .'>0.01 sec (max 100 / sec)</option>'
|
. '<option value="10000" '.($enkaSettings['SMTPDelay']=="10000"?'selected="selected"':'') .'>0.01 sec (max 100 / sec)</option>'
|
||||||
. '<option value="20000" '.($enkaSettings['SMTPDelay']=="20000"?'selected="selected"':'') .'>0.02 sec (max 50 / sec)</option>'
|
. '<option value="20000" '.($enkaSettings['SMTPDelay']=="20000"?'selected="selected"':'') .'>0.02 sec (max 50 / sec)</option>'
|
||||||
. '<option value="50000" '.($enkaSettings['SMTPDelay']=="50000"?'selected="selected"':'') .'>0.05 sec (max 20 / sec)</option>'
|
. '<option value="50000" '.($enkaSettings['SMTPDelay']=="50000"?'selected="selected"':'') .'>0.05 sec (max 20 / sec)</option>'
|
||||||
. '<option value="100000" '.($enkaSettings['SMTPDelay']=="100000"?'selected="selected"':'') .'>0.1 sec (max 10 / sec)</option>'
|
. '<option value="100000" '.($enkaSettings['SMTPDelay']=="100000"?'selected="selected"':'') .'>0.1 sec (max 10 / sec)</option>'
|
||||||
. '<option value="200000" '.($enkaSettings['SMTPDelay']=="200000"?'selected="selected"':'') .'>0.2 sec (max 5 / sec)</option>'
|
. '<option value="200000" '.($enkaSettings['SMTPDelay']=="200000"?'selected="selected"':'') .'>0.2 sec (max 5 / sec)</option>'*/
|
||||||
. '<option value="500000" '.($enkaSettings['SMTPDelay']=="500000"?'selected="selected"':'') .'>0.5 sec (max 2 / sec)</option>'
|
. '<option value="500000" '.($enkaSettings['SMTPDelay']=="500000"?'selected="selected"':'') .'>0.5 sec (max 2 / sec)</option>'
|
||||||
. '<option value="1000000" '.($enkaSettings['SMTPDelay']=="1000000"?'selected="selected"':'') .'>1 sec (max 1 / sec)</option>'
|
. '<option value="1000000" '.($enkaSettings['SMTPDelay']=="1000000"?'selected="selected"':'') .'>1 sec (max 1 / sec)</option>'
|
||||||
. '<option value="2000000" '.($enkaSettings['SMTPDelay']=="2000000"?'selected="selected"':'') .'>2 sec (max 30 / min)</option>'
|
. '<option value="2000000" '.($enkaSettings['SMTPDelay']=="2000000"?'selected="selected"':'') .'>2 sec (max 30 / min)</option>'
|
||||||
|
@ -140,6 +140,10 @@ class MailAdapter{
|
|||||||
$this->settings['1ka']['SMTPUsername'] = $email_server_settings['secondary_mail']['SMTPUsername'];
|
$this->settings['1ka']['SMTPUsername'] = $email_server_settings['secondary_mail']['SMTPUsername'];
|
||||||
$this->settings['1ka']['SMTPPassword'] = $email_server_settings['secondary_mail']['SMTPPassword'];
|
$this->settings['1ka']['SMTPPassword'] = $email_server_settings['secondary_mail']['SMTPPassword'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Nastavimo default delay
|
||||||
|
if(!isset($this->settings['1ka']['SMTPDelay']) || $this->settings['1ka']['SMTPDelay'] == '' || $this->settings['1ka']['SMTPDelay'] == '0')
|
||||||
|
$this->settings['1ka']['SMTPDelay'] = 500000;
|
||||||
}
|
}
|
||||||
// Nimamo se nicesar v bazi - nastavimo default nastavitve
|
// Nimamo se nicesar v bazi - nastavimo default nastavitve
|
||||||
else{
|
else{
|
||||||
@ -160,6 +164,8 @@ class MailAdapter{
|
|||||||
if(isset($email_server_settings['SMTPSecure']))
|
if(isset($email_server_settings['SMTPSecure']))
|
||||||
$this->settings['1ka']['SMTPSecure'] = $email_server_settings['SMTPSecure'];
|
$this->settings['1ka']['SMTPSecure'] = $email_server_settings['SMTPSecure'];
|
||||||
|
|
||||||
|
// Nastavimo default delay
|
||||||
|
$this->settings['1ka']['SMTPDelay'] = 500000;
|
||||||
|
|
||||||
// Nastavimo gmail smtp
|
// Nastavimo gmail smtp
|
||||||
$this->settings['google']['SMTPHost'] = 'smtp.gmail.com';
|
$this->settings['google']['SMTPHost'] = 'smtp.gmail.com';
|
||||||
@ -167,6 +173,9 @@ class MailAdapter{
|
|||||||
$this->settings['google']['SMTPSecure'] = 'tls';
|
$this->settings['google']['SMTPSecure'] = 'tls';
|
||||||
$this->settings['google']['SMTPAuth'] = 1;
|
$this->settings['google']['SMTPAuth'] = 1;
|
||||||
|
|
||||||
|
// Nastavimo default delay
|
||||||
|
$this->settings['google']['SMTPDelay'] = 500000;
|
||||||
|
|
||||||
|
|
||||||
// Ce imamo nastavljeno, da se za posiljanje iz ankete uporabi isti smtp streznik kot za generalno posiljanje
|
// Ce imamo nastavljeno, da se za posiljanje iz ankete uporabi isti smtp streznik kot za generalno posiljanje
|
||||||
if($email_server_fromSurvey){
|
if($email_server_fromSurvey){
|
||||||
@ -234,6 +243,9 @@ class MailAdapter{
|
|||||||
$this->settings['smtp']['SMTPUsername'] = $email_server_settings['payments_mail']['SMTPUsername'];
|
$this->settings['smtp']['SMTPUsername'] = $email_server_settings['payments_mail']['SMTPUsername'];
|
||||||
$this->settings['smtp']['SMTPPassword'] = $email_server_settings['payments_mail']['SMTPPassword'];
|
$this->settings['smtp']['SMTPPassword'] = $email_server_settings['payments_mail']['SMTPPassword'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Nastavimo default delay
|
||||||
|
$this->settings['smtp']['SMTPDelay'] = 500000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -569,9 +581,10 @@ class MailAdapter{
|
|||||||
$SL->write();
|
$SL->write();
|
||||||
|
|
||||||
|
|
||||||
// Dodamo pavzo po pošiljanju ce je nastavljena!
|
// Dodamo pavzo po pošiljanju ce je nastavljena - default je vedno 2 / sekundo
|
||||||
if (isset($settings['SMTPDelay']) && intval($settings['SMTPDelay']) > 0) {
|
$delay = (isset($settings['SMTPDelay']) && intval($settings['SMTPDelay']) > 0) ? $settings['SMTPDelay'] : 500000;
|
||||||
usleep ($settings['SMTPDelay']);
|
if($delay > 0){
|
||||||
|
usleep ($delay);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $success;
|
return $success;
|
||||||
|
@ -1880,8 +1880,9 @@ class BodyController extends Controller
|
|||||||
if($rowa['subsequent_answers'] == '0' && $admin_type != '0'){
|
if($rowa['subsequent_answers'] == '0' && $admin_type != '0'){
|
||||||
|
|
||||||
// Preverimo, ce je uporabnik ze bil na strani
|
// Preverimo, ce je uporabnik ze bil na strani
|
||||||
if(Check::getInstance()->check_subsequent_visit())
|
if(Check::getInstance()->check_subsequent_visit()){
|
||||||
Js::getInstance()->disableSubsequentAnswers();
|
echo '<script>disableSubsequentAnswers();</script>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// nov zgornji link pri uporabnosti
|
// nov zgornji link pri uporabnosti
|
||||||
|
@ -2803,20 +2803,4 @@ class JsController extends Controller
|
|||||||
|
|
||||||
return '(' . $expression . ')';
|
return '(' . $expression . ')';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Disable odgovorov, ce je ze izpolnjeval to stran in ima vklopljeno nastavitev, da ni dovoljeno naknadno vnasanje odogovorov
|
|
||||||
public static function disableSubsequentAnswers(){
|
|
||||||
|
|
||||||
echo '<script>';
|
|
||||||
echo ' $(":radio").prop("disabled", true);';
|
|
||||||
echo ' $(":checkbox").prop("disabled", true);';
|
|
||||||
echo ' $(":text").prop("disabled", true);';
|
|
||||||
echo ' $(":password").prop("disabled", true);';
|
|
||||||
echo ' $(":button").prop("disabled", true);';
|
|
||||||
echo ' $(":image").prop("disabled", true);';
|
|
||||||
echo ' $(":file").prop("disabled", true);';
|
|
||||||
echo '</script>';
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
@ -113,15 +113,6 @@ class SaveSurvey extends Model
|
|||||||
$question_resp_comment = SurveySetting::getInstance()->getSurveyMiscSetting('question_resp_comment');
|
$question_resp_comment = SurveySetting::getInstance()->getSurveyMiscSetting('question_resp_comment');
|
||||||
|
|
||||||
|
|
||||||
// Disable odgovorov, ce je ze izpolnjeval to stran in ima vklopljeno nastavitev, da ni dovoljeno naknadno vnasanje odogovorov
|
|
||||||
if($rowa['subsequent_answers'] == '0' && $admin_type != '0'){
|
|
||||||
|
|
||||||
// Preverimo, ce je uporabnik ze bil na strani
|
|
||||||
if(Check::getInstance()->check_subsequent_visit())
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tele spremenljivke so za vse INSERTe, ki se vnasajo v tabele (z imenom spremenljivke)
|
* Tele spremenljivke so za vse INSERTe, ki se vnasajo v tabele (z imenom spremenljivke)
|
||||||
* Namen je ta, da se vnosi kesirajo in naenkrat vnesejo v bazo, kar pohitri celotno zadevo
|
* Namen je ta, da se vnosi kesirajo in naenkrat vnesejo v bazo, kar pohitri celotno zadevo
|
||||||
|
@ -1939,3 +1939,33 @@ function checkUpload(upload, id){
|
|||||||
function removeUpload(id){
|
function removeUpload(id){
|
||||||
$('#' + id).val(null);
|
$('#' + id).val(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Disablamo vse inpute in jim dodamo input hidden, da se posta odgovor
|
||||||
|
function disableSubsequentAnswers(){
|
||||||
|
|
||||||
|
// Disable radio and checkbox
|
||||||
|
$('input[type="radio"], input[type="checkbox"]').each(function() {
|
||||||
|
|
||||||
|
if($(this).prop("checked") == true){
|
||||||
|
var name = $(this).attr("name");
|
||||||
|
var value = $(this).val();
|
||||||
|
|
||||||
|
$(this).before("<input type=\"hidden\" name=\""+name+"\" value=\""+value+"\">");
|
||||||
|
}
|
||||||
|
|
||||||
|
$(this).prop("disabled", "true");
|
||||||
|
});
|
||||||
|
|
||||||
|
// Disable radio and checkbox
|
||||||
|
$('input[type="text"], textarea, input[type="password"], input[type="email"]').each(function() {
|
||||||
|
|
||||||
|
var name = $(this).attr("name");
|
||||||
|
var value = $(this).val();
|
||||||
|
|
||||||
|
$(this).before("<input type=\"hidden\" name=\""+name+"\" value=\""+value+"\">");
|
||||||
|
|
||||||
|
$(this).prop("disabled", "true");
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -9335,3 +9335,7 @@ UPDATE misc SET value='20.10.20' WHERE what="version";
|
|||||||
ALTER TABLE user_access_paypal_transaction CHANGE transaction_id transaction_id VARCHAR(100) NOT NULL DEFAULT '';
|
ALTER TABLE user_access_paypal_transaction CHANGE transaction_id transaction_id VARCHAR(100) NOT NULL DEFAULT '';
|
||||||
|
|
||||||
UPDATE misc SET value='20.10.25' WHERE what="version";
|
UPDATE misc SET value='20.10.25' WHERE what="version";
|
||||||
|
|
||||||
|
INSERT INTO srv_help (help, what) VALUES ('Pri pošiljanju email vabil na več naslovov je vklopljena zakasnitev, kar pomeni da med e-poštnim sporočilom, poslanim enemu naslovniku, in e-poštnim sporočilom, poslanim naslednjemu naslovniku, preteče najmanj 2 sekundi. Ta čas lahko po potrebi spremenite (glede na zmogljivosti vašega strežnika). ', 'srv_inv_delay');
|
||||||
|
|
||||||
|
UPDATE misc SET value='20.10.29' WHERE what="version";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user