Example #1
0
 /**
  * find for the userID of the existing user or creates a new one
  */
 private static function createUser()
 {
     $userHandler = new UserHandler();
     UPCompCore::$userID = $userHandler->getUserID();
 }
Example #2
0
<?php

/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
require_once "../public/UPCompCore.php";
UPCompCore::loadCoreEvents();
if (strpos($_POST["objectID"], ",") !== false) {
    $objects = explode(",", $_POST["objectID"]);
    foreach ($objects as $obj) {
        $ev = new TestingEvent($_POST["userID"], $obj, $_POST["eventName"], $_POST["eventValue"], $_POST["where"]);
        // echo $ev->getSQL();
        $eHandler = new TestingEventHandler($ev);
        $eHandler->saveEvent();
    }
} else {
    $ev = new TestingEvent($_POST["userID"], $_POST["objectID"], $_POST["eventName"], $_POST["eventValue"], $_POST["where"]);
    $eHandler = new TestingEventHandler($ev);
    // echo $ev->getSQL();
    $eHandler->saveEvent();
}