Dokoncan modul za volitve
This commit is contained in:
parent
3137848fc0
commit
6751beb39c
@ -1393,15 +1393,20 @@ class SurveyAdminSettings {
|
||||
$referal = SurveySetting::getInstance()->getSurveyMiscSetting('survey_referal');
|
||||
$date = SurveySetting::getInstance()->getSurveyMiscSetting('survey_date');
|
||||
|
||||
// Preverimo ce je vklopljen modul za volitve - potem ne pustimo nobenih preklopov
|
||||
$voting_disabled = '';
|
||||
if(SurveyInfo::getInstance()->checkSurveyModule('voting')){
|
||||
$voting_disabled = ' disabled';
|
||||
}
|
||||
|
||||
echo '<fieldset class="wide">';
|
||||
echo '<legend>'.$lang['srv_sledenje'].'</legend>';
|
||||
|
||||
echo '<p>'.$lang['srv_metadata_desc'].'</p>';
|
||||
|
||||
echo '<span class="nastavitveSpan1 wide"><label>'.$lang['srv_sledenje_browser'].':</label></span> <label for="survey_browser_1"><input type="radio" name="survey_browser" id="survey_browser_1" value="1"'.($browser==1?' checked':'').'>'.$lang['no'].'</label> <label for="survey_browser_0"><input type="radio" name="survey_browser" id="survey_browser_0" value="0"'.($browser==0?' checked':'').'>'.$lang['yes'].'</label><br class="clr"/>';
|
||||
echo '<span class="nastavitveSpan1 wide"><label>'.$lang['srv_sledenje_referal'].':</label></span> <label for="survey_referal_1"><input type="radio" name="survey_referal" id="survey_referal_1" value="1"'.($referal==1?' checked':'').'>'.$lang['no'].'</label> <label for="survey_referal_0"><input type="radio" name="survey_referal" id="survey_referal_0" value="0"'.($referal==0?' checked':'').'>'.$lang['yes'].'</label><br class="clr"/>';
|
||||
echo '<span class="nastavitveSpan1 wide"><label>'.$lang['srv_sledenje_date'].':</label></span> <label for="survey_date_1"><input type="radio" name="survey_date" id="survey_date_1" value="1"'.($date==1?' checked':'').'>'.$lang['no'].'</label> <label for="survey_date_0"><input type="radio" name="survey_date" id="survey_date_0" value="0"'.($date==0?' checked':'').'>'.$lang['yes'].'</label><br class="clr"/>';
|
||||
echo '<span class="nastavitveSpan1 wide"><label>'.$lang['srv_sledenje_browser'].':</label></span> <label for="survey_browser_1"><input type="radio" name="survey_browser" id="survey_browser_1" value="1"'.($browser==1?' checked':'').' '.$voting_disabled.'>'.$lang['no'].'</label> <label for="survey_browser_0"><input type="radio" name="survey_browser" id="survey_browser_0" value="0"'.($browser==0?' checked':'').'>'.$lang['yes'].'</label><br class="clr"/>';
|
||||
echo '<span class="nastavitveSpan1 wide"><label>'.$lang['srv_sledenje_referal'].':</label></span> <label for="survey_referal_1"><input type="radio" name="survey_referal" id="survey_referal_1" value="1"'.($referal==1?' checked':'').' '.$voting_disabled.'>'.$lang['no'].'</label> <label for="survey_referal_0"><input type="radio" name="survey_referal" id="survey_referal_0" value="0"'.($referal==0?' checked':'').'>'.$lang['yes'].'</label><br class="clr"/>';
|
||||
echo '<span class="nastavitveSpan1 wide"><label>'.$lang['srv_sledenje_date'].':</label></span> <label for="survey_date_1"><input type="radio" name="survey_date" id="survey_date_1" value="1"'.($date==1?' checked':'').' '.$voting_disabled.'>'.$lang['no'].'</label> <label for="survey_date_0"><input type="radio" name="survey_date" id="survey_date_0" value="0"'.($date==0?' checked':'').'>'.$lang['yes'].'</label><br class="clr"/>';
|
||||
|
||||
echo '</fieldset>';
|
||||
|
||||
@ -1412,14 +1417,14 @@ class SurveyAdminSettings {
|
||||
echo '<fieldset>';
|
||||
echo '<legend>'.$lang['srv_sledenje_ip_title'].'</legend>';
|
||||
|
||||
echo '<span class="nastavitveSpan1 wide"><label>'.$lang['srv_sledenje_ip'].':</label></span> <label for="survey_ip_1"><input type="radio" name="survey_ip" id="survey_ip_1" value="1"'.($ip==1?' checked':'').'>'.$lang['no'].'</label> <label for="survey_ip_0"><input type="radio" name="survey_ip" id="survey_ip_0" value="0"'.($ip==0?' checked':'').'>'.$lang['yes'].'</label>';
|
||||
echo '<span class="nastavitveSpan1 wide"><label>'.$lang['srv_sledenje_ip'].':</label></span> <label for="survey_ip_1"><input type="radio" name="survey_ip" id="survey_ip_1" value="1"'.($ip==1?' checked':'').' '.$voting_disabled.'>'.$lang['no'].'</label> <label for="survey_ip_0"><input type="radio" name="survey_ip" id="survey_ip_0" value="0"'.($ip==0?' checked':'').'>'.$lang['yes'].'</label>';
|
||||
if($ip == 0 && $ip_show != 1)
|
||||
echo '<div class="spaceLeft floatRight red" style="display:inline; width:520px;">'.$lang['srv_sledenje_ip_alert'].'</div>';
|
||||
|
||||
echo '<br class="clr"/>';
|
||||
|
||||
if($ip == 0 && ($admin_type == 0 || $admin_type == 1)){
|
||||
echo '<span class="nastavitveSpan1 wide"><label>'.$lang['srv_show_ip'].':</label></span> <label for="survey_show_ip_0"><input type="radio" name="survey_show_ip" id="survey_show_ip_0" value="0"'.($ip_show==0?' checked':'').'>'.$lang['no'].'</label> <label for="survey_show_ip_1"><input type="radio" name="survey_show_ip" id="survey_show_ip_1" value="1"'.($ip_show==1?' checked':'').'>'.$lang['yes'].'</label>';
|
||||
echo '<span class="nastavitveSpan1 wide"><label>'.$lang['srv_show_ip'].':</label></span> <label for="survey_show_ip_0"><input type="radio" name="survey_show_ip" id="survey_show_ip_0" value="0"'.($ip_show==0?' checked':'').' '.$voting_disabled.'>'.$lang['no'].'</label> <label for="survey_show_ip_1"><input type="radio" name="survey_show_ip" id="survey_show_ip_1" value="1"'.($ip_show==1?' checked':'').'>'.$lang['yes'].'</label>';
|
||||
if($ip_show == 1)
|
||||
echo '<div class="spaceLeft floatRight red" style="display:inline; width:520px;">'.$lang['srv_show_ip_alert'].'</div>';
|
||||
}
|
||||
@ -1433,7 +1438,7 @@ class SurveyAdminSettings {
|
||||
echo '<fieldset class="wide">';
|
||||
echo '<legend>'.$lang['srv_sledenje_identifikatorji_title'].' '.Help::display('srv_email_with_data').'</legend>';
|
||||
|
||||
echo '<span class="nastavitveSpan1 wide"><label>'.$lang['srv_sledenje_identifikatorji'].':</label></span> <label for="show_email_0"><input type="radio" name="show_email" id="show_email_0" value="0"'.($row['show_email']==0?' checked':'').'>'.$lang['no'].'</label> <label for="show_email_1"><input type="radio" name="show_email" id="show_email_1" value="1"'.($row['show_email']==1?' checked':'').'>'.$lang['yes'].'</label>';
|
||||
echo '<span class="nastavitveSpan1 wide"><label>'.$lang['srv_sledenje_identifikatorji'].':</label></span> <label for="show_email_0"><input type="radio" name="show_email" id="show_email_0" value="0"'.($row['show_email']==0?' checked':'').' '.$voting_disabled.'>'.$lang['no'].'</label> <label for="show_email_1"><input type="radio" name="show_email" id="show_email_1" value="1"'.($row['show_email']==1?' checked':'').'>'.$lang['yes'].'</label>';
|
||||
if($row['show_email'] == 1)
|
||||
echo '<div class="spaceLeft floatRight red" style="display:inline; width:520px;">'.$lang['srv_show_mail_with_data3'].'</div>';
|
||||
|
||||
@ -8699,6 +8704,12 @@ class SurveyAdminSettings {
|
||||
}
|
||||
elseif ($_GET['a'] == 'voting'){
|
||||
|
||||
// Ce so vabila ze vklopljena ne pustimo vklopa
|
||||
if(!isset($modules['voting']) && SurveyInfo::getInstance()->checkSurveyModule('email')){
|
||||
$disabled = ' disabled="disabled"';
|
||||
$css_disabled = ' gray';
|
||||
}
|
||||
|
||||
echo '<fieldset><legend>'.$lang['srv_voting'].'</legend>';
|
||||
echo '<label class="strong'.$css_disabled.'"><input type="checkbox" id="advanced_module_voting" name="voting" value="1" '. (isset($modules['voting']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'voting\');" />';
|
||||
echo $lang['srv_vrsta_survey_type_18'] . '</label>';
|
||||
|
@ -1427,7 +1427,7 @@ class SurveyDataCollect{
|
||||
$_dataLine .= STR_DLMT. (($rowUser['status'] == 5 || $rowUser['status'] == 6) && $rowUser['lurker'] == 0 ? '1' : '0');
|
||||
|
||||
# dodamo email (invitation)k podatkom - če je bilo poslano z emailom ali je uporabnik ročno vnesel email
|
||||
$_dataLine .= STR_DLMT. ((int)$rowUser['inv_res_id'] > 0
|
||||
$_dataLine .= STR_DLMT. ((int)$rowUser['inv_res_id'] > 0 || (int)$rowUser['inv_res_id'] == -1
|
||||
# uporabnik je bil dodan z email vabilom
|
||||
? ((int)$rowUser['status'] == 1 || (int)$rowUser['status'] >= 3
|
||||
# email je bil odposlan
|
||||
|
@ -1110,9 +1110,11 @@ class SurveyDataDisplay{
|
||||
echo ' <input type="checkbox" onclick="setDataView(\''.VAR_METAFULL.'\',$(this).is(\':checked\'))" '.( self::$_VARS[VAR_METAFULL] ? ' checked="checked"' : '').(self::$_VARS[VAR_SHOW_SYSTEM] ? ' disabled' : '').' id="fullmeta" /><label for="fullmeta" '.(self::$_VARS[VAR_SHOW_SYSTEM] ? ' class="gray"' : '').'>'.$lang['srv_displaydata_meta'].'</label>';
|
||||
echo '</li>';
|
||||
|
||||
// Preverimo ce je vklopljen modul za volitve - potem nimamo identifikatorjev
|
||||
if(!SurveyInfo::getInstance()->checkSurveyModule('voting')){
|
||||
|
||||
// če imamo sistemske podatke katere moramo prikazovati ločeno - IDENTIFIKATORJI
|
||||
if(!isset(self::$_HEADERS['_settings']['count_system_data_variables']) || (isset(self::$_HEADERS['_settings']['count_system_data_variables']) && (int)self::$_HEADERS['_settings']['count_system_data_variables'] > 0)) {
|
||||
|
||||
echo '<li>';
|
||||
echo ' <label><input type="checkbox" onclick="setDataView(\''.VAR_SHOW_SYSTEM.'\',$(this).is(\':checked\'))" '.( self::$_VARS[VAR_SHOW_SYSTEM] ? ' checked="checked"' : '').' id="showsystem" />'.$lang['srv_displaydata_system_data'].'</label>';
|
||||
echo '</li>';
|
||||
@ -1122,6 +1124,7 @@ class SurveyDataDisplay{
|
||||
echo '<li>';
|
||||
echo ' <label class="gray"><input type="checkbox" checked="checked" disabled="disabled" id="showsystem" />'.$lang['srv_displaydata_system_data'].'</label>';
|
||||
echo '</li>';
|
||||
}
|
||||
}
|
||||
|
||||
// datum
|
||||
|
@ -1302,7 +1302,6 @@ class SurveyInvitationsNew {
|
||||
function viewRecipients($errors = array(), $msgs = array()) {
|
||||
global $lang, $site_url, $admin_type;
|
||||
|
||||
//echo '<h2>'.$lang['srv_inv_edit_recipients_heading'].'</h2>';
|
||||
$noEmailing = SurveySession::get('inv_noEmailing');
|
||||
|
||||
$row = $this->surveySettings;
|
||||
@ -1402,8 +1401,7 @@ class SurveyInvitationsNew {
|
||||
|
||||
}
|
||||
# preštejemo koliko imamo vseh respondentov in koliko jih je brez e-maila
|
||||
$sql_string_all = "SELECT id FROM srv_invitations_recipients WHERE ank_id = '".$this->sid."' AND deleted = '0'";
|
||||
$sql_query_all = sisplet_query($sql_string_all);
|
||||
$sql_query_all = sisplet_query("SELECT id FROM srv_invitations_recipients WHERE ank_id = '".$this->sid."' AND deleted = '0'");
|
||||
$count_all = mysqli_num_rows($sql_query_all);
|
||||
|
||||
$sql_string_withot_email = "SELECT count(*) FROM srv_invitations_recipients WHERE ank_id = '".$this->sid."' AND deleted = '0' AND email IS NULL AND sent='0'";
|
||||
@ -1448,8 +1446,11 @@ class SurveyInvitationsNew {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# dodamo še ostala polja
|
||||
if(!SurveyInfo::getInstance()->checkSurveyModule('voting'))
|
||||
$fields['last_status'] = 1;
|
||||
|
||||
$sql_select_fields[] = 'i.last_status';
|
||||
$fields['date_inserted'] = 1;
|
||||
$fields['date(date_expired)'] = 1;
|
||||
@ -1460,9 +1461,6 @@ class SurveyInvitationsNew {
|
||||
$fields['list_id'] = 1;
|
||||
$sql_select_fields[] = 'i.list_id';
|
||||
|
||||
#štetje vabil
|
||||
#$fields['count_inv'] = 1;
|
||||
#$sql_select_fields[] = 'count(siar.arch_id) AS count_inv';
|
||||
|
||||
#dodamo paginacijo in poiščemo zapise
|
||||
$page = isset($_GET['page']) ? $_GET['page'] : '1';
|
||||
@ -1537,6 +1535,7 @@ class SurveyInvitationsNew {
|
||||
$lists = array();
|
||||
$lists['-1'] = array('name'=>$lang['srv_invitation_new_templist']);
|
||||
$lists['0'] = array('name'=>$lang['srv_invitation_new_templist_author']);
|
||||
|
||||
if (count($lids) > 0 ) {
|
||||
$sql_string_lists = "SELECT * from srv_invitations_recipients_profiles WHERE pid IN(".implode(',',$lids).") ";
|
||||
$sql_query_lists = sisplet_query($sql_string_lists);
|
||||
@ -1544,6 +1543,7 @@ class SurveyInvitationsNew {
|
||||
$lists[$row_lists['pid']] = array('name'=>$row_lists['name']);
|
||||
}
|
||||
}
|
||||
|
||||
if (count($msgs) > 0) {
|
||||
echo '<span class="inv_msg_note">';
|
||||
foreach($msgs as $msg) {
|
||||
@ -1551,6 +1551,7 @@ class SurveyInvitationsNew {
|
||||
}
|
||||
echo '</span>';
|
||||
}
|
||||
|
||||
if (count($errors) > 0) {
|
||||
echo '<span class="inv_error_note">';
|
||||
foreach($errors as $error) {
|
||||
@ -1558,15 +1559,17 @@ class SurveyInvitationsNew {
|
||||
}
|
||||
echo '</span>';
|
||||
}
|
||||
|
||||
if ($count_all > 0 ) {
|
||||
|
||||
# dodamo filtriranje
|
||||
|
||||
echo '<div id="inv_rec_filter">';
|
||||
echo '<label>'.$lang['srv_invitation_recipients_filter'].'</label> <input id="inv_rec_filter_value" type="text" onchange="inv_filter_recipients(); return false;" value="'.$_SESSION['inv_filter']['value'].'">';
|
||||
#echo '<img src="'.$site_url.'admin/survey/icons/icons/wand.png">';
|
||||
|
||||
echo ' <label><input id="inv_rec_filter_on" type="checkbox" onchange="inv_filter_recipients(); return false;"'.(isset($_SESSION['inv_filter_on']) && $_SESSION['inv_filter_on'] == true ? ' checked="true"' : '').'>';
|
||||
echo $lang['srv_invitation_recipients_filter_advanced'].'</label>';
|
||||
|
||||
if (isset($_SESSION['inv_filter_on']) && $_SESSION['inv_filter_on'] == true ) {
|
||||
echo ' ';
|
||||
echo ' ';
|
||||
@ -1605,16 +1608,6 @@ class SurveyInvitationsNew {
|
||||
echo '</div>';
|
||||
|
||||
|
||||
/* // Prestavljeno na dno
|
||||
if ($count_without_email > 0) {
|
||||
# add to database without sending e-mail
|
||||
|
||||
echo '<div id="inv_rec_add_to_db" >';
|
||||
echo '<span>'.$lang['srv_invitation_recipients_activate'].'</span> ';
|
||||
echo '<span class="as_link" onclick="inv_add_rec_to_db(); return false;" target="_blank">'.$lang['srv_invitation_recipients_activate_here'].'</span>';
|
||||
echo '</div>';
|
||||
}*/
|
||||
|
||||
echo '<form id="frm_inv_rec_export" name="resp_uploader" method="post" autocomplete="off">';
|
||||
echo '<input type="hidden" name="anketa" id="anketa" value="'.$this->sid.'">';
|
||||
echo '<input type="hidden" name="noNavi" id="noNavi" value="true">';
|
||||
@ -1667,16 +1660,10 @@ class SurveyInvitationsNew {
|
||||
|
||||
|
||||
echo '<table id="tbl_recipients_list">';
|
||||
|
||||
echo '<tr>';
|
||||
# checkbox
|
||||
echo '<th class="tbl_icon" colspan="'.($this->surveySettings['show_email']==1?'4':'3').'" > </th>';
|
||||
/*
|
||||
* # uredi
|
||||
echo '<th class="tbl_liks"> </th>';
|
||||
# izbrisi
|
||||
echo '<th class="tbl_liks"> </th>';
|
||||
|
||||
*/
|
||||
|
||||
foreach ($fields AS $fkey =>$field) {
|
||||
if ($field == 1) {
|
||||
@ -3958,9 +3945,9 @@ class SurveyInvitationsNew {
|
||||
// Pri volitvah zaradi anonimizacije ignoriramo vse identifikatorje
|
||||
if($voting){
|
||||
$_r = sisplet_query("INSERT INTO srv_user
|
||||
(ank_id, cookie, pass, last_status, time_insert, inv_res_id)
|
||||
(ank_id, cookie, pass, last_status, inv_res_id)
|
||||
VALUES
|
||||
('".$this->sid."', '".$_user_data['cookie']."', '".$_user_data['password']."', '".$_user_data['status']."', NOW(), '".$_user_data['id']."') ON DUPLICATE KEY UPDATE cookie = '".$_user_data['cookie']."', pass='".$_user_data['password']."'
|
||||
('".$this->sid."', '".$_user_data['cookie']."', '".$_user_data['password']."', '".$_user_data['status']."', '-1') ON DUPLICATE KEY UPDATE cookie = '".$_user_data['cookie']."', pass='".$_user_data['password']."'
|
||||
");
|
||||
}
|
||||
else{
|
||||
@ -4585,6 +4572,7 @@ class SurveyInvitationsNew {
|
||||
echo '<th>'.$lang['srv_inv_recipients_password'].'</th>';
|
||||
echo '<th>'.$lang['srv_inv_recipients_firstname'].'</th>';
|
||||
echo '<th>'.$lang['srv_inv_recipients_lastname'].'</th>';
|
||||
if(!SurveyInfo::getInstance()->checkSurveyModule('voting'))
|
||||
echo '<th>'.$lang['srv_inv_recipients_last_status'].'</th>';
|
||||
echo '<th>'.$lang['srv_inv_recipients_list_id'].'</th>';
|
||||
echo '</tr>';
|
||||
@ -4598,6 +4586,7 @@ class SurveyInvitationsNew {
|
||||
echo '<td>'.$sql_row['password'].'</td>';
|
||||
echo '<td>'.$sql_row['firstname'].'</td>';
|
||||
echo '<td>'.$sql_row['lastname'].'</td>';
|
||||
if(!SurveyInfo::getInstance()->checkSurveyModule('voting'))
|
||||
echo '<td>'.$lang['srv_userstatus_'.$sql_row['last_status']].' ('.$sql_row['last_status'].')'.'</td>';
|
||||
echo '<td>'.$lists[$sql_row['list_id']].'</td>';
|
||||
echo '</tr>';
|
||||
@ -4810,6 +4799,10 @@ class SurveyInvitationsNew {
|
||||
function addSystemVariables($variables) {
|
||||
global $site_path, $lang;
|
||||
|
||||
// Pri modulu za volitve so responsi anonimni, zato nimamo nobenih sistemskih spremenljivk
|
||||
if(SurveyInfo::getInstance()->checkSurveyModule('voting'))
|
||||
return;
|
||||
|
||||
$system_fields = array(
|
||||
'inv_field_email' => 'email',
|
||||
'inv_field_firstname' => 'ime',
|
||||
@ -5876,9 +5869,9 @@ class SurveyInvitationsNew {
|
||||
// Pri volitvah zaradi anonimizacije ignoriramo vse identifikatorje
|
||||
if($voting){
|
||||
sisplet_query("INSERT INTO srv_user
|
||||
(ank_id, cookie, pass, last_status, time_insert, inv_res_id)
|
||||
(ank_id, cookie, pass, last_status, inv_res_id)
|
||||
VALUES
|
||||
('".$this->sid."', '".$user_data['cookie']."', '".$user_data['password']."', '".$user_data['status']."', NOW(), '".$user_data['id']."') ON DUPLICATE KEY UPDATE last_status=VALUES(last_status), inv_res_id=VALUES(inv_res_id)
|
||||
('".$this->sid."', '".$user_data['cookie']."', '".$user_data['password']."', '".$user_data['status']."', '-1') ON DUPLICATE KEY UPDATE last_status=VALUES(last_status)
|
||||
");
|
||||
}
|
||||
else{
|
||||
@ -6736,7 +6729,9 @@ class SurveyInvitationsNew {
|
||||
echo '</span></span>';
|
||||
|
||||
echo '<div id="inv_arch_mail_preview">';
|
||||
|
||||
echo '<table id="tbl_recipients_list">';
|
||||
|
||||
echo '<tr>';
|
||||
echo '<th class="tbl_icon" title="'.$lang['srv_inv_recipients_sent'].'">'.$lang['srv_inv_recipients_sent'].'</th>';
|
||||
echo '<th class="tbl_icon" title="'.$lang['srv_inv_recipients_responded'].'">'.$lang['srv_inv_recipients_responded'].'</th>';
|
||||
@ -6746,9 +6741,11 @@ class SurveyInvitationsNew {
|
||||
echo '<th>'.$lang['srv_inv_recipients_firstname'].'</th>';
|
||||
echo '<th>'.$lang['srv_inv_recipients_lastname'].'</th>';
|
||||
echo '<th>'.$lang['srv_inv_recipients_max_archive_status'].'</th>';
|
||||
if(!SurveyInfo::getInstance()->checkSurveyModule('voting'))
|
||||
echo '<th>'.$lang['srv_inv_recipients_last_status'].'</th>';
|
||||
echo '<th>'.$lang['srv_inv_recipients_list_id'].'</th>';
|
||||
echo '</tr>';
|
||||
|
||||
while ($sql_row = mysqli_fetch_assoc($sql_query)) {
|
||||
echo '<tr>';
|
||||
echo '<td><span class="as_link" onclick="showRecipientTracking(\''.$sql_row['res_id'].'\'); return false;"><img src="'.$site_url.'admin/survey/img_0/'.((int)$sql_row['sent'] == 1 ? 'email_sent.png' : 'email_open.png').'"></span></td>';
|
||||
@ -6760,11 +6757,14 @@ class SurveyInvitationsNew {
|
||||
echo '<td>'.$sql_row['lastname'].'</td>';
|
||||
$status = $arch_user_max_status[$sql_row['res_id']];
|
||||
echo '<td>'.$lang['srv_userstatus_'.$status].' ('.$status.')'.'</td>';
|
||||
if(!SurveyInfo::getInstance()->checkSurveyModule('voting'))
|
||||
echo '<td>'.$lang['srv_userstatus_'.$sql_row['last_status']].' ('.$sql_row['last_status'].')'.'</td>';
|
||||
echo '<td>'.$lists[$sql_row['list_id']].'</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
echo '</table>';
|
||||
|
||||
echo '</div>'; // inv_select_mail_preview
|
||||
|
||||
echo '</div>'; // id="arc_content"
|
||||
@ -6875,8 +6875,20 @@ class SurveyInvitationsNew {
|
||||
|
||||
echo '<table style="width:50%"><tr>';
|
||||
|
||||
# nov način z trackingom
|
||||
if ($this->newTracking == true) {
|
||||
// Pri volitvah prikazemo samo osnovne stevilke - zaradi anonimizacije ni trackinga
|
||||
if(SurveyInfo::getInstance()->checkSurveyModule('voting')){
|
||||
|
||||
$userAccess = UserAccess::getInstance($global_user_id);
|
||||
|
||||
// Ce so izklopljena ne prikazemo leve strani
|
||||
if((int)$isEmail > 0 && $userAccess->checkUserAccess($what='invitations')){
|
||||
echo '<td style="padding-right:10px;vertical-align: top;">';
|
||||
$this->displayInvitationStatusVoting();
|
||||
echo '</td>';
|
||||
}
|
||||
}
|
||||
// Nov način z trackingom
|
||||
elseif($this->newTracking == true) {
|
||||
|
||||
$userAccess = UserAccess::getInstance($global_user_id);
|
||||
|
||||
@ -7215,7 +7227,8 @@ class SurveyInvitationsNew {
|
||||
}
|
||||
}
|
||||
|
||||
function displayInvitationStatusNew() {
|
||||
// Prikaz statusov posiljanj
|
||||
private function displayInvitationStatusNew() {
|
||||
global $lang, $admin_type, $global_user_id, $site_url, $site_path, $app_settings;
|
||||
|
||||
$isEmail = (int)SurveyInfo::getInstance()->checkSurveyModule('email');
|
||||
@ -7230,14 +7243,16 @@ class SurveyInvitationsNew {
|
||||
echo '<p>';
|
||||
|
||||
#koliko je vseh uporabnikov v bazi
|
||||
$sql_string = "SELECT count(*) as cnt FROM srv_invitations_recipients WHERE ank_id = '".$this->sid."' AND deleted ='0'";
|
||||
$sql_query = sisplet_query($sql_string);
|
||||
$sql_query = sisplet_query("SELECT count(*) as cnt FROM srv_invitations_recipients WHERE ank_id = '".$this->sid."' AND deleted ='0'");
|
||||
list($cnt_all_in_db) = mysqli_fetch_row($sql_query);
|
||||
|
||||
#zloopamo skozi posamezna pošiljanja in preštejemo vse potrebno
|
||||
$sql_string = "SELECT sia.id, sia.tip, rec_in_db, DATE_FORMAT(sia.date_send,'%d.%m.%Y, %T') AS ds, u.name, u.surname, u.email FROM srv_invitations_archive AS sia INNER JOIN users AS u ON sia.uid = u.id WHERE ank_id = '".$this->sid."' ORDER BY sia.date_send ASC;";
|
||||
#$sql_string = "SELECT * FROM srv_invitations_archive WHERE ank_id = '".$this->sid."'";
|
||||
$sql_query = sisplet_query($sql_string);
|
||||
$sql_query = sisplet_query("SELECT sia.id, sia.tip, rec_in_db, DATE_FORMAT(sia.date_send,'%d.%m.%Y, %T') AS ds, u.name, u.surname, u.email
|
||||
FROM srv_invitations_archive AS sia
|
||||
INNER JOIN users AS u ON sia.uid = u.id
|
||||
WHERE ank_id = '".$this->sid."'
|
||||
ORDER BY sia.date_send ASC;
|
||||
");
|
||||
|
||||
$array_dashboard = array();
|
||||
$array_archive_subdata = array();
|
||||
@ -7678,6 +7693,146 @@ class SurveyInvitationsNew {
|
||||
}
|
||||
}
|
||||
|
||||
// Prikaz statusov posiljanj pri volitvah
|
||||
private function displayInvitationStatusVoting() {
|
||||
global $lang, $admin_type, $global_user_id, $site_url, $site_path, $app_settings;
|
||||
|
||||
$isEmail = (int)SurveyInfo::getInstance()->checkSurveyModule('email');
|
||||
|
||||
$userAccess = UserAccess::getInstance($global_user_id);
|
||||
|
||||
// Email vabila so omogocena
|
||||
if ((int)$isEmail > 0 && $userAccess->checkUserAccess($what='invitations')) {
|
||||
|
||||
echo '<fieldset class="inv_fieldset"><legend>'.$lang['srv_inv_nav_email_status'].'</legend>';
|
||||
echo '<div class="inv_filedset_inline_div">';
|
||||
echo '<p>';
|
||||
|
||||
#koliko je vseh uporabnikov v bazi in kolkim je bil mail poslan
|
||||
$sql_count = sisplet_query("SELECT count(id) as cnt, sent
|
||||
FROM srv_invitations_recipients
|
||||
WHERE ank_id='".$this->sid."' AND deleted ='0'
|
||||
GROUP BY sent
|
||||
");
|
||||
|
||||
$cnt_all_in_db = 0;
|
||||
$cnt_sent_in_db = 0;
|
||||
while($row_count = mysqli_fetch_array($sql_count)){
|
||||
|
||||
$cnt_all_in_db += (int)$row_count['cnt'];
|
||||
|
||||
if($row_count['sent'] == '1'){
|
||||
$cnt_sent_in_db += (int)$row_count['cnt'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo '<table class="inv_dashboard_table">';
|
||||
|
||||
// Vsi v bazi
|
||||
echo '<tr>';
|
||||
echo '<th>'.$lang['srv_inv_dashboard_tbl_all'].'</th>';
|
||||
echo '<th>'.(int)$cnt_all_in_db.'</th>';
|
||||
echo '<th>-</th>';
|
||||
echo '<th>100%</th>';
|
||||
echo '</tr>';
|
||||
|
||||
// Poslani
|
||||
echo '<tr>';
|
||||
echo '<td>'.$lang['srv_inv_dashboard_tbl_send'].'</td>';
|
||||
echo '<td>'.(int)$cnt_sent_in_db.'</td>';
|
||||
echo '<td>'.((int)$cnt_sent_in_db > 0 ? '100%' : '0%').'</td>';
|
||||
echo '<td>'.$this->formatNumber(((int)$cnt_sent_in_db > 0 ? (int)$cnt_sent_in_db*100/(int)$cnt_all_in_db : 0),0,'%').'</td>';
|
||||
echo '</tr>';
|
||||
|
||||
echo '</table>';
|
||||
|
||||
echo '</p>';
|
||||
echo '</div>';
|
||||
echo '</fieldset>';
|
||||
}
|
||||
// Email vabila niso omogocena
|
||||
else {
|
||||
echo '<fieldset class="inv_fieldset"><legend>'.$lang['srv_inv_nav_email_status'].'</legend>';
|
||||
echo '<div class="inv_filedset_inline_div">';
|
||||
echo '<p>';
|
||||
|
||||
echo $lang['srv_inv_dashboard_not_enabled'];
|
||||
|
||||
# uporabnik nima pravic omogočit vabil
|
||||
if (!$userAccess->checkUserAccess($what='invitations')) {
|
||||
echo '<br/>'.$lang['srv_inv_dashboard_no_permissions'];
|
||||
}
|
||||
# uporabnik lahko vklopi email vabila
|
||||
else {
|
||||
echo ' <a href="#" onclick="enableEmailInvitation(this);">'.$lang['srv_omogoci'].'</a>';
|
||||
}
|
||||
|
||||
echo '</p>';
|
||||
echo '</div>';
|
||||
echo '</fieldset>';
|
||||
}
|
||||
|
||||
|
||||
// predpripravimo podatke za vsa pošiljanja
|
||||
/*$cnt_by_sendings = array();
|
||||
|
||||
$all_units_count = count($cnt_by_user);
|
||||
if ($all_units_count > 0) {
|
||||
foreach ($cnt_by_user AS $uid => $ucnt) {
|
||||
$cnt_by_sendings[$ucnt]++;
|
||||
}
|
||||
|
||||
echo '<br/>';
|
||||
|
||||
#pregled po pošiljanjih
|
||||
echo '<fieldset class="inv_fieldset">';
|
||||
|
||||
echo '<legend>';
|
||||
echo '<span class="pointer" onClick="$(this).parent().parent().find(\'.inv_filedset_inline_div\').toggle(); $(this).find(\'.plus\').toggle();$(this).find(\'.minus\').toggle();">';
|
||||
echo '<span class="plus strong displayNone blue">+ </span>';
|
||||
echo '<span class="minus strong blue">- </span>';
|
||||
echo '<span class="legend blue">'.$lang['srv_inv_nav_email_sending_status'].'</span>';
|
||||
echo '</span>';
|
||||
echo Help::display('srv_inv_cnt_by_sending');
|
||||
echo '</legend>';
|
||||
|
||||
echo '<br/>';
|
||||
|
||||
echo '<div class="inv_filedset_inline_div">';
|
||||
echo '<table style="border-spacing:0px; padding:0px; margin:0 0 20px 15px;">';
|
||||
echo '<colgrup>';
|
||||
echo '<col style="min-width:150px;"/>';
|
||||
echo '<col style="min-width:150px;"/>';
|
||||
echo '<col style="min-width:150px;"/>';
|
||||
echo '</colgrup>';
|
||||
echo '<tr>';
|
||||
echo '<th class="anl_al">'.$lang['srv_inv_sending_overview_cnt'].'</th>';
|
||||
echo '<th class="anl_al">'.$lang['srv_inv_sending_overview_units'].'</th>';
|
||||
echo '<th class="anl_al">'.$lang['srv_inv_sending_overview_percentage'].'</th>';
|
||||
echo '</tr>';
|
||||
if ($cnt_by_sendings > 0) {
|
||||
foreach ($cnt_by_sendings AS $cnt => $units) {
|
||||
echo '<tr>';
|
||||
echo '<td>'.$cnt.'</td>';
|
||||
echo '<td>'.$units.'</td>';
|
||||
$percent = ($all_units_count > 0) ? $units / $all_units_count * 100 : 0;
|
||||
echo '<td>'.Common::formatNumber ($percent,0,null,'%').'</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
}
|
||||
echo '<tr>';
|
||||
echo '<td class="anl_bt_dot red">'.$lang['srv_inv_sending_overview_sum'].'</td>';
|
||||
echo '<td class="anl_bt_dot red">'.$all_units_count.'</td>';
|
||||
$percent = ($all_units_count > 0) ? $all_units_count / $all_units_count * 100 : 0;
|
||||
echo '<td class="anl_bt_dot red">'.Common::formatNumber ($percent,0,null,'%').'</td>';
|
||||
echo '</tr>';
|
||||
echo '</table>';
|
||||
echo '</div>';
|
||||
echo '</fieldset>';
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
function showInvitationSettings() {
|
||||
global $lang, $admin_type, $global_user_id, $site_url, $site_path, $app_settings;
|
||||
@ -7754,6 +7909,12 @@ class SurveyInvitationsNew {
|
||||
|
||||
echo '<div id="surveyInvitationSetting">';
|
||||
|
||||
// Preverimo ce je vklopljen modul za volitve - potem ne pustimo nobenih preklopov
|
||||
$voting_disabled = '';
|
||||
if(SurveyInfo::getInstance()->checkSurveyModule('voting')){
|
||||
$voting_disabled = ' disabled';
|
||||
}
|
||||
|
||||
$individual = (int)$this->surveySettings['individual_invitation'];
|
||||
|
||||
// Individualizirana vabila - GLAVNA NASTAVITEV
|
||||
@ -7763,8 +7924,8 @@ class SurveyInvitationsNew {
|
||||
echo ' '.Help::display('srv_user_base_individual_invitaition_note2').' </label>';
|
||||
else
|
||||
echo ' '.Help::display('srv_user_base_individual_invitaition_note').' </label>';
|
||||
echo '<label><input type="radio" name="individual_invitation" value="0" id="individual_invitation_0"'.($individual == 0 ? ' checked="checked"' : '').' onChange="surveyBaseSettingRadio(\'individual_invitation\',true);"/>'.$lang['no1'].'</label>';
|
||||
echo '<label><input type="radio" name="individual_invitation" value="1" id="individual_invitation_1"'.($individual == 1 ? ' checked="checked"' : '').' onChange="surveyBaseSettingRadio(\'individual_invitation\',true);"/>'.$lang['yes'].'</label>';
|
||||
echo '<label><input type="radio" name="individual_invitation" value="0" id="individual_invitation_0"'.($individual == 0 ? ' checked="checked"' : '').' '.$voting_disabled.' onChange="surveyBaseSettingRadio(\'individual_invitation\',true);"/>'.$lang['no1'].'</label>';
|
||||
echo '<label><input type="radio" name="individual_invitation" value="1" id="individual_invitation_1"'.($individual == 1 ? ' checked="checked"' : '').' '.$voting_disabled.' onChange="surveyBaseSettingRadio(\'individual_invitation\',true);"/>'.$lang['yes'].'</label>';
|
||||
echo '</p>';
|
||||
|
||||
// Ce niso indvidualizirana imamo samo nacin posiljanja
|
||||
@ -7773,8 +7934,8 @@ class SurveyInvitationsNew {
|
||||
// Nacin posiljanja (email, posta, sms...)
|
||||
echo '<p>';
|
||||
echo '<label class="lbl_email_setting">'.$lang['srv_inv_message_type'].': '.Help::display('srv_inv_sending_type').'</label>';
|
||||
echo '<label><input type="radio" name="inv_messages_noEmailing" value="0" id="inv_messages_noEmailing_1"'.($noEmailing == 0 ? ' checked="checked"' : '').' onChange="noEmailingToggle(\'0\');"/>'.$lang['srv_inv_message_noemailing_0'].'</label>';
|
||||
echo '<label><input type="radio" name="inv_messages_noEmailing" value="1" id="inv_messages_noEmailing_1"'.($noEmailing == 1 ? ' checked="checked"' : '').' onChange="noEmailingToggle(\'1\');"/>'.$lang['srv_inv_message_noemailing_1'].'</label>';
|
||||
echo '<label><input type="radio" name="inv_messages_noEmailing" value="0" id="inv_messages_noEmailing_1"'.($noEmailing == 0 ? ' checked="checked"' : '').' '.$voting_disabled.' onChange="noEmailingToggle(\'0\');"/>'.$lang['srv_inv_message_noemailing_0'].'</label>';
|
||||
echo '<label><input type="radio" name="inv_messages_noEmailing" value="1" id="inv_messages_noEmailing_1"'.($noEmailing == 1 ? ' checked="checked"' : '').' '.$voting_disabled.' onChange="noEmailingToggle(\'1\');"/>'.$lang['srv_inv_message_noemailing_1'].'</label>';
|
||||
echo '</p>';
|
||||
|
||||
// Nacin dokumentiranja (posta, sms, drugo)
|
||||
@ -7782,9 +7943,9 @@ class SurveyInvitationsNew {
|
||||
$noEmailingType = SurveySession::get('inv_noEmailing_type');
|
||||
echo '<p>';
|
||||
echo '<label class="lbl_email_setting">'.$lang['srv_inv_message_type_external'].':</label>';
|
||||
echo '<label><input type="radio" name="noMailType" value="0" id="noMailType1"'.($noEmailingType == 0 ? ' checked="checked"' : '').' onClick="noEmailingType(\'0\');" />'.$lang['srv_inv_message_noemailing_type1'].'</label>';
|
||||
echo '<label><input type="radio" name="noMailType" value="1" id="noMailType2"'.($noEmailingType == 1 ? ' checked="checked"' : '').' onClick="noEmailingType(\'1\');" />'.$lang['srv_inv_message_noemailing_type2'].'</label>';
|
||||
echo '<label><input type="radio" name="noMailType" value="2" id="noMailType3"'.($noEmailingType == 2 ? ' checked="checked"' : '').' onClick="noEmailingType(\'2\');" />'.$lang['srv_inv_message_noemailing_type3'].'</label>';
|
||||
echo '<label><input type="radio" name="noMailType" value="0" id="noMailType1"'.($noEmailingType == 0 ? ' checked="checked"' : '').' '.$voting_disabled.' onClick="noEmailingType(\'0\');" />'.$lang['srv_inv_message_noemailing_type1'].'</label>';
|
||||
echo '<label><input type="radio" name="noMailType" value="1" id="noMailType2"'.($noEmailingType == 1 ? ' checked="checked"' : '').' '.$voting_disabled.' onClick="noEmailingType(\'1\');" />'.$lang['srv_inv_message_noemailing_type2'].'</label>';
|
||||
echo '<label><input type="radio" name="noMailType" value="2" id="noMailType3"'.($noEmailingType == 2 ? ' checked="checked"' : '').' '.$voting_disabled.' onClick="noEmailingType(\'2\');" />'.$lang['srv_inv_message_noemailing_type3'].'</label>';
|
||||
echo '</p>';
|
||||
}
|
||||
}
|
||||
@ -7794,8 +7955,8 @@ class SurveyInvitationsNew {
|
||||
// Nacin posiljanja (email, posta, sms...)
|
||||
echo '<p>';
|
||||
echo '<label class="lbl_email_setting">'.$lang['srv_inv_message_type'].': '.Help::display('srv_inv_sending_type').'</label>';
|
||||
echo '<label><input type="radio" name="inv_messages_noEmailing" value="0" id="inv_messages_noEmailing_1"'.($noEmailing == 0 ? ' checked="checked"' : '').' onChange="noEmailingToggle(\'0\');"/>'.$lang['srv_inv_message_noemailing_0'].'</label>';
|
||||
echo '<label><input type="radio" name="inv_messages_noEmailing" value="1" id="inv_messages_noEmailing_1"'.($noEmailing == 1 ? ' checked="checked"' : '').' onChange="noEmailingToggle(\'1\');"/>'.$lang['srv_inv_message_noemailing_1'].'</label>';
|
||||
echo '<label><input type="radio" name="inv_messages_noEmailing" value="0" id="inv_messages_noEmailing_1"'.($noEmailing == 0 ? ' checked="checked"' : '').' '.$voting_disabled.' onChange="noEmailingToggle(\'0\');"/>'.$lang['srv_inv_message_noemailing_0'].'</label>';
|
||||
echo '<label><input type="radio" name="inv_messages_noEmailing" value="1" id="inv_messages_noEmailing_1"'.($noEmailing == 1 ? ' checked="checked"' : '').' '.$voting_disabled.' onChange="noEmailingToggle(\'1\');"/>'.$lang['srv_inv_message_noemailing_1'].'</label>';
|
||||
echo '</p>';
|
||||
|
||||
// Nacin dokumentiranja (posta, sms, drugo)
|
||||
@ -7803,9 +7964,9 @@ class SurveyInvitationsNew {
|
||||
$noEmailingType = SurveySession::get('inv_noEmailing_type');
|
||||
echo '<p>';
|
||||
echo '<label class="lbl_email_setting">'.$lang['srv_inv_message_type_external'].':</label>';
|
||||
echo '<label><input type="radio" name="noMailType" value="0" id="noMailType1"'.($noEmailingType == 0 ? ' checked="checked"' : '').' onClick="noEmailingType(\'0\');" />'.$lang['srv_inv_message_noemailing_type1'].'</label>';
|
||||
echo '<label><input type="radio" name="noMailType" value="1" id="noMailType2"'.($noEmailingType == 1 ? ' checked="checked"' : '').' onClick="noEmailingType(\'1\');" />'.$lang['srv_inv_message_noemailing_type2'].'</label>';
|
||||
echo '<label><input type="radio" name="noMailType" value="2" id="noMailType3"'.($noEmailingType == 2 ? ' checked="checked"' : '').' onClick="noEmailingType(\'2\');" />'.$lang['srv_inv_message_noemailing_type3'].'</label>';
|
||||
echo '<label><input type="radio" name="noMailType" value="0" id="noMailType1"'.($noEmailingType == 0 ? ' checked="checked"' : '').' '.$voting_disabled.' onClick="noEmailingType(\'0\');" />'.$lang['srv_inv_message_noemailing_type1'].'</label>';
|
||||
echo '<label><input type="radio" name="noMailType" value="1" id="noMailType2"'.($noEmailingType == 1 ? ' checked="checked"' : '').' '.$voting_disabled.' onClick="noEmailingType(\'1\');" />'.$lang['srv_inv_message_noemailing_type2'].'</label>';
|
||||
echo '<label><input type="radio" name="noMailType" value="2" id="noMailType3"'.($noEmailingType == 2 ? ' checked="checked"' : '').' '.$voting_disabled.' onClick="noEmailingType(\'2\');" />'.$lang['srv_inv_message_noemailing_type3'].'</label>';
|
||||
echo '</p>';
|
||||
}
|
||||
|
||||
@ -7813,8 +7974,8 @@ class SurveyInvitationsNew {
|
||||
if($noEmailing != 1){
|
||||
echo '<p>';
|
||||
echo '<label class="lbl_email_setting">'.$lang['usercode_required1'].':'.Help::display('usercode_required').'</label>';
|
||||
echo '<label><input type="radio" name="usercode_required" value="0" id="usercode_required_0"'.($row['usercode_required'] == 0 ? ' checked="checked"' : '').' onChange="surveyBaseSettingRadio(\'usercode_required\',true);"/>'.$lang['usercode_required2'].'</label>';
|
||||
echo '<label><input type="radio" name="usercode_required" value="1" id="usercode_required_1"'.($row['usercode_required'] == 1 ? ' checked="checked"' : '').' onChange="surveyBaseSettingRadio(\'usercode_required\',true);"/>'.$lang['usercode_required3'].'</label>';
|
||||
echo '<label><input type="radio" name="usercode_required" value="0" id="usercode_required_0"'.($row['usercode_required'] == 0 ? ' checked="checked"' : '').' '.$voting_disabled.' onChange="surveyBaseSettingRadio(\'usercode_required\',true);"/>'.$lang['usercode_required2'].'</label>';
|
||||
echo '<label><input type="radio" name="usercode_required" value="1" id="usercode_required_1"'.($row['usercode_required'] == 1 ? ' checked="checked"' : '').' '.$voting_disabled.' onChange="surveyBaseSettingRadio(\'usercode_required\',true);"/>'.$lang['usercode_required3'].'</label>';
|
||||
echo '</p>';
|
||||
}
|
||||
|
||||
@ -7834,7 +7995,7 @@ class SurveyInvitationsNew {
|
||||
|
||||
echo '<p>';
|
||||
echo '<label for="usercode_skip_0" class="lbl_email_setting">'.$lang['srv_user_base_access_check'].' '.Help::display('srv_inv_no_code').'</label>';
|
||||
echo '<input type="checkbox" name="usercode_skip_checkbox" value="0" id="usercode_skip_0"'.($row['usercode_skip'] != 0 ? ' checked="checked"' : '').' onChange="surveyBaseSettingRadio(\'usercode_skip\',true);" />';
|
||||
echo '<input type="checkbox" name="usercode_skip_checkbox" value="0" id="usercode_skip_0"'.($row['usercode_skip'] != 0 ? ' checked="checked"' : '').' '.$voting_disabled.' onChange="surveyBaseSettingRadio(\'usercode_skip\',true);" />';
|
||||
echo '</p>';
|
||||
if($row['usercode_skip'] > 0){
|
||||
echo '<div style="float: left; margin: -10px 0 0 15px;">';
|
||||
|
@ -800,7 +800,11 @@ class InitClass extends Controller
|
||||
if (!$sql2) echo mysqli_error($GLOBALS['connect_db']);
|
||||
$row2 = mysqli_fetch_array($sql2);
|
||||
|
||||
if (mysqli_num_rows($sql2) > 0) { // pravilna koda
|
||||
// Pravilna koda
|
||||
if (mysqli_num_rows($sql2) > 0) {
|
||||
|
||||
// Ce imamo vklopljen modul za volitve preskocimo kar nekaj korakov (anonimizacija)
|
||||
if(!SurveyInfo::checkSurveyModule('voting')){
|
||||
|
||||
// Dodatno preverimo ce koda se ni potekla
|
||||
$sqlC = sisplet_query("SELECT * FROM srv_invitations_recipients WHERE ank_id='".get('anketa')."' AND TRIM(password)='".$usercode."' AND DATE(NOW())>DATE(date_expired) AND date_expired!='0000-00-00 00:00:00'");
|
||||
@ -809,14 +813,13 @@ class InitClass extends Controller
|
||||
die();
|
||||
}
|
||||
|
||||
$rand = $row2['cookie'];
|
||||
|
||||
# nastavimo še da je uporabnik odgovoril na anketo za nov način e-mail vabil
|
||||
$sqlString = "UPDATE srv_invitations_recipients SET responded = '1', date_responded = NOW() WHERE ank_id='" . get('anketa') . "' AND TRIM(password) ='$usercode' AND responded = '0'";
|
||||
sisplet_query($sqlString);
|
||||
sisplet_query("UPDATE srv_invitations_recipients SET responded = '1', date_responded = NOW() WHERE ank_id='" . get('anketa') . "' AND TRIM(password) ='$usercode' AND responded = '0'");
|
||||
|
||||
sisplet_query("COMMIT");
|
||||
}
|
||||
|
||||
$rand = $row2['cookie'];
|
||||
|
||||
$this->set_cookie('survey-' . get('anketa'), $rand, $this->expire);
|
||||
|
||||
@ -1199,12 +1202,16 @@ class InitClass extends Controller
|
||||
}
|
||||
# dodamo še tracking arhivov vabil
|
||||
if (get('user_inv_archive') > 0 && $inv_res_id > 0) {
|
||||
# ignoriramo podvojene kluče
|
||||
$updateString = "INSERT IGNORE INTO srv_invitations_tracking (inv_arch_id, time_insert, res_id, status) VALUES ('" . (int)get('user_inv_archive') . "',NOW(),'$inv_res_id','$status')";
|
||||
|
||||
$s = sisplet_query($updateString);
|
||||
# ignoriramo podvojene kluče
|
||||
$s = sisplet_query("INSERT IGNORE INTO srv_invitations_tracking
|
||||
(inv_arch_id, time_insert, res_id, status)
|
||||
VALUES
|
||||
('" . (int)get('user_inv_archive') . "',NOW(),'$inv_res_id','$status')
|
||||
");
|
||||
if (!$s) echo mysqli_error($GLOBALS['connect_db']);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
}
|
||||
|
||||
# potrebno bo osvežit seznam anket
|
||||
|
Loading…
x
Reference in New Issue
Block a user