64 lines
1.5 KiB
PHP
64 lines
1.5 KiB
PHP
<?php
|
|
|
|
/**
|
|
*
|
|
* Class ki vsebuje funkcije potrebne za posiljanje vabil preko SQUALO
|
|
*
|
|
*/
|
|
|
|
class SurveyInvitationsSqualo {
|
|
|
|
private $anketa;
|
|
|
|
private $squaloEnabled;
|
|
private $squaloActive;
|
|
|
|
public function __construct($anketa){
|
|
|
|
$this->anketa = $anketa;
|
|
|
|
// Preverimo ce je squalo omogocen na tej instalaciji in anketi
|
|
$this->squaloEnabled = $this->checkSqualoEnabled() ? true : false;
|
|
|
|
// Preverimo ce je squalo vklopljen na anketi
|
|
$this->squaloActive = $this->checkSqualoActive() ? true : false;
|
|
}
|
|
|
|
|
|
public function squaloEnabled(){
|
|
return $this->squaloEnabled;
|
|
}
|
|
|
|
public function squaloActive(){
|
|
return $this->squaloActive;
|
|
}
|
|
|
|
|
|
// Preverimo ce je squalo omogocen na instalaciji
|
|
private function checkSqualoEnabled(){
|
|
global $mysql_database_name;
|
|
global $admin_type;
|
|
global $squalo_user;
|
|
global $squalo_key;
|
|
|
|
// Zaenkrat imajo squalo samo admini
|
|
if($admin_type != 0)
|
|
return false;
|
|
|
|
// Squalo je omogocen samo na testu, www in virtualkah
|
|
if($mysql_database_name != 'www1kasi' && $mysql_database_name != 'test1kasi' && $mysql_database_name != 'real1kasi')
|
|
return false;
|
|
|
|
// Zaenkrat imajo squalo samo admini
|
|
if(!isset($squalo_user) || $squalo_user == '' || !isset($squalo_key) || $squalo_key == '')
|
|
return false;
|
|
|
|
return false;
|
|
}
|
|
|
|
// Preverimo ce je squalo vklopljen na anketi
|
|
private function checkSqualoActive(){
|
|
|
|
return false;
|
|
}
|
|
} |