Example #1
0
		}
		$linkToInfoStr2.="</ul>";
 }
 $xmlSites2=str_replace("<","&lt;",$xmlSites);
*/
$adminPanel = "";
if (L_auth::isAdmin($userID) || $flight->belongsToUser($userID)) {
    //P. Wild 15.2.2008 extension
    $adminPanel = "<b>" . _TIMES_VIEWED . ":</b> " . $flight->timesViewed . "  ";
    $adminPanel .= "<b>" . _SUBMISION_DATE . ":</b> " . $flight->dateAdded . " :: ";
    // see all scoring:
    if (0) {
        require_once dirname(__FILE__) . '/CL_flightScore.php';
        $flightScore = new flightScore($flight->flightID);
        $flightScore->getFromDB();
        $adminPanel .= "<PRE>" . $flightScore->toSyncJSON() . "</PRE>";
        $adminPanel .= "<hr><HR>";
        $adminPanel .= "<PRE>" . print_r($flightScore->scores, 1) . "</PRE>";
    }
    //	$adminPanel.='<pre>'.processIGC($flight->getIGCFilename());
    if (L_auth::isAdmin($userID)) {
        // DEBUG TIMEZONE DETECTION
        // $firstPoint=new gpsPoint($flight->FIRST_POINT);
        $firstPoint = new gpsPoint('', $flight->timezone);
        $firstPoint->setLat($flight->firstLat);
        $firstPoint->setLon($flight->firstLon);
        $firstPoint->gpsTime = $flight->firstPointTM;
        // $time=substr($flight->FIRST_POINT,1,6);
        $time = date('H:i:s', $firstPoint->gpsTime);
        $zone = getUTMzoneLocal($firstPoint->lon, $firstPoint->lat);
        $timezone1 = ceil(-$firstPoint->lon / (180 / 12));
Example #2
0
 function makeScoreLogEntry()
 {
     global $CONF_server_id;
     $flightScore = new flightScore($this->flightID);
     $flightScore->getFromDB();
     require_once dirname(__FILE__) . '/CL_actionLogger.php';
     $log = new Logger();
     $log->userID = $this->userID;
     $log->ItemType = 1;
     // flight;
     $log->ItemID = $this->serverID && $this->serverID != $CONF_server_id ? $this->original_ID : $this->flightID;
     // 0 at start will fill in later if successfull
     $log->ServerItemID = $this->serverID ? $this->serverID : $CONF_server_id;
     $log->ActionID = 8;
     //1  => add  2  => edit , 8=score flight;
     $log->ActionXML = "{\n" . $flightScore->toSyncJSON() . "\n}";
     $log->Modifier = 0;
     $log->ModifierID = 0;
     $log->ServerModifierID = 0;
     $log->Result = 1;
     // if (!$log->Result) $log->ResultDescription ="Problem in puting flight to DB $query";
     if (!$log->put()) {
         echo "Problem in logger<BR>";
     }
 }