uawdijnntqw1x1x1
IP : 216.73.216.39
Hostname : diefsweb003.fsit.ch
Kernel : Linux diefsweb003.fsit.ch 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
wirbesti
/
.wp-cli
/
..
/
unwaehlbar.ch
/
src
/
..
/
voted.php
/
/
<?php require_once 'ip.php'; class voted { private $_database; function __construct(DBConnection $database) { $this->_database = $database; } public function getVotesByIP($politicians) { $votelist = $this->_initArray($politicians); if (count($votelist) == 0) { return $votelist; } $filter = $this->_createFilter($votelist); if (count($votelist) > 0) { $polfilter = "`politicianid` in ".$filter." AND "; } else { $polfilter = ''; } $ipaddress = getIPAddress(); $query = "SELECT `vote`, `politicianid` FROM `vote` v WHERE ".$polfilter." v.`ipaddress` = "."'".$ipaddress."'"; $rows = $this->_database->getQuery($query); foreach ($rows as $row) { $votelist[$row['politicianid']]['voted'] = $row['vote']; } return $votelist; } private function _initArray($politicians) { $votelist = array(); foreach ($politicians as $politician) { $votelist[$politician['aid']]['voted'] = false; } return $votelist; } private function _createFilter($votelist) { $filter = "("; foreach ($votelist as $key => $value) { $filter = $filter.$key.","; } $filter = substr($filter, 0, -1); $filter = $filter.")"; return $filter; } } ?>
/home/wirbesti/.wp-cli/../unwaehlbar.ch/src/../voted.php