anketa = $anketa; SurveyInfo::getInstance()->SurveyInit($this->anketa); } // Preverimo stevilo vprasanj v anketi public function checkLimitSpremenljivke(){ // Dobimo stevilo vprasanj v anketi $stevilo_vprasanj = SurveyInfo::getSurveyQuestionCount(); // Ce je v anketi ze vec vprasanj kot je limit if($stevilo_vprasanj > $this->limit_vprasanja) return true; else return false; } // Preverimo stevilo poslanih vabil public function checkLimitVabila(){ // Prestejemo poslana vabila $sql = sisplet_query("SELECT count(id) AS stevilo_vabil FROM srv_invitations_recipients WHERE ank_id='".$this->anketa."' AND sent='1' "); $row = mysqli_fetch_array($sql); $stevilo_vabil = $row['stevilo_vabil']; // Ce je poslanih ze vec vabil kot je limit if($stevilo_vabil > $this->limit_vabila) return true; else return false; } // Preverimo ce je anketa potencialno phishing public function checkPhishing(){ // Prestejemo vprasanja po tipu $sql = sisplet_query("SELECT count(s.id) AS count_questions FROM srv_spremenljivka s, srv_grupa g WHERE g.ank_id='".$this->anketa."' AND g.id=s.gru_id AND (tip='21' OR tip='5') "); $row = mysqli_fetch_array($sql); // Ce imamo v anketi manj kot 5 vprasanj in so vsa tipa nagovor ali text je potencialen phishing if($row['count_questions'] < 5) return true; else return false; } } ?>