Beispiel #1
0
 public function getUsers()
 {
     //settype($liamID, 'integer');
     $query = "SELECT * FROM members;";
     $res = $this->dbLIAM->query($query);
     return getResultArray($res);
 }
Beispiel #2
0
 private function getReport_AnswersWhitoutMarks()
 {
     $query = "SELECT 'Answers without Marks' as attr, " . "COUNT(*) AS value, 'fa-exclamation' AS icon FROM sqms_answer " . "WHERE answer NOT LIKE '%.%' " . "OR answer NOT LIKE '%?%'";
     $return = array();
     $res = $this->db->query($query);
     $return['reports'] = getResultArray($res);
     return $return;
 }
 private function getBrandList()
 {
     $query = "SELECT\n    brand_id AS 'ID',\n    brand_name,\n    discount,\n    event_partner_id,\n    `css-style`,\n    accesstoken,\n    login,\n    brandDescription,\n    brandDescriptionFooter,\n    deprecated,\n    brandImage,\n    brandHeadline,\n    brandDescriptionSidebar,\n    imprint,\n    `protection of data privacy`,\n    `terms and conditions`,\n    email\nFROM brand;";
     $res = $this->db->query($query);
     $return['brandlist'] = getResultArray($res);
     return $return;
 }
Beispiel #4
0
}
$grid1 = new grid($gridpath, true, $histpath, true);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $racelink);
curl_setopt($ch, CURLOPT_REFERER, 'http://cl.racemore.de/mpres/league/CL/');
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
$agent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36";
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
$date = getRaceDate($output);
$startersAndFinishers = explode(" of ", getFinishedRacers($output));
$starter = $startersAndFinishers[1];
$finisher = $startersAndFinishers[0];
$resultArray = getResultArray($output, $starter);
$grid1->addRace($resultArray, $finisher, $factor, $date, $finishermode);
$grid1->saveGrid();
echo "done";
//Holt datum aus DOM
function getRaceDate($htmlString)
{
    $pos = strpos($htmlString, '<td class="taba">Time</td>');
    $timeString = substr($htmlString, $pos + 53, 10);
    return $timeString;
}
//Holt Anzahl der Ankommer aus DOM
function getFinishedRacers($htmlString)
{
    $pos = strpos($htmlString, 'cars finished the race');
    $finishedString = substr($htmlString, $pos - 9, 8);