Example #1
0
 protected function _setPostVars($post, $trim = true, $merge = false)
 {
     if (!$merge || $merge && empty($this->postVars)) {
         $this->postVars = $trim === true ? Funclib::trimValues($post) : $post;
     } else {
         if ($merge && !empty($this->postVars)) {
             $this->postVars = array_merge($this->postVars, $trim === true ? Funclib::trimValues($post) : $post);
         }
     }
 }
Example #2
0
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/**
* @author Ronny Bansemer
*/
session_start();
if (!empty($_SESSION['unternehmenid'])) {
    require '../include/constants.php';
    require INCLUDE_PATH . '/class/roh/mailer.php';
    require INCLUDE_PATH . '/class/funclib.php';
    require INCLUDE_PATH . '/class/email.php';
    require INCLUDE_PATH . '/class/querybuild.php';
    require INCLUDE_PATH . '/class/database.php';
    require INCLUDE_PATH . '/class/charhandling.php';
    DB::init(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE);
    $url = Funclib::trimValues($_GET);
    if (!empty($url['id'])) {
        $filename = 'all-statusmessages-from-sensor';
        $typ = 1;
        DB::query('SELECT
                        `sensorid`
                    FROM
                        `sensoren`
                    WHERE
                        `unternehmenid` = ?
                    AND
                        `sensorid` = ?', 2);
        DB::setParam($_SESSION['unternehmenid'], 'int');
        DB::setParam($url['id'], 'str');
        DB::exec();
    } else {