1
0
Fork 0

check data in register

This commit is contained in:
Christopher 2021-11-05 05:43:12 +01:00
parent 6155c95327
commit 17bb2da152
2 changed files with 15 additions and 9 deletions

View File

@ -4,14 +4,20 @@
//Add User to DB if not exist
$QueueStatement = $RUNTIME['PDO']->prepare("INSERT IGNORE INTO users VALUES (?, ?, ?)");
$QueueStatement->execute(array($data['RegionOwnerID'], $data['RegionOwnerName'], $data['RegionOwnerMail']));
$QueueStatement->execute(array(@$data['RegionOwnerID'], @$data['RegionOwnerName'], @$data['RegionOwnerMail']));
//Add Grid to DB if not exist
$rawGridInfo = getDataFromHTTP(@$data['RegionOwnerURL']['HomeURI']."get_grid_info");
$gridInfo = new SimpleXMLElement($rawGridInfo);
$QueueStatement = $RUNTIME['PDO']->prepare("INSERT IGNORE INTO grids VALUES (?, ?, ?, ?)");
$QueueStatement->execute(array($gridInfo->gridname, @$data['RegionOwnerURL']['HomeURI'], @$data['RegionOwnerURL']['AssetServerURI'], @$data['RegionOwnerURL']['IMServerURI']));
if(count($data['RegionOwnerURL']) != 0)
{
if(isset($data['RegionOwnerURL']['HomeURI'])
{
$rawGridInfo = getDataFromHTTP(@$data['RegionOwnerURL']['HomeURI']."get_grid_info");
$gridInfo = new SimpleXMLElement($rawGridInfo);
$QueueStatement = $RUNTIME['PDO']->prepare("INSERT IGNORE INTO grids VALUES (?, ?, ?, ?)");
$QueueStatement->execute(array($gridInfo->gridname, @$data['RegionOwnerURL']['HomeURI'], @$data['RegionOwnerURL']['AssetServerURI'], @$data['RegionOwnerURL']['IMServerURI']));
}
}
//Add Region to DB if not exist
$QueueStatement = $RUNTIME['PDO']->prepare("INSERT INTO queue VALUES (?, ?, ?)");

View File

@ -123,18 +123,18 @@ function getTopRegionHTML($row)
$row['Description'] = "(Es wurde noch keine Beschreibung hinterlegt.)";
return '<section id="banner"><div class="content"><header><h1>'.substr($row['Name'], 0, 50).'</h1><p>Online: '.$row['OnlineCount'].'</p></header><p>'.substr($row['Description'], 0, 800).'</p><ul class="actions"><a href="region_-'.$row['UUID'].'.html" class="button big html5lightbox">Menr Infos</a></ul></div>
<span class="image object"><img style="min-height: 450px; max-height: 45px;" src="./data/RegionImages/'.$row['Image'].'.jpg" alt="Region Image '.substr($row['Name'], 0, 50).'" /></span></section>';
<span class="image object"><img style="min-height: 450px; max-height: 450px;" src="./data/RegionImages/'.$row['Image'].'.jpg" alt="Region Image '.substr($row['Name'], 0, 50).'" /></span></section>';
}
function getRegionHTML($row)
{
if(!file_exists("./data/RegionImages/".$row['Image']."jpg"))
if(!file_exists("./data/RegionImages/".$row['Image'].".jpg"))
$row['Image'] = "notFound";
if(!isset($row['Description']))
$row['Description'] = "(Es wurde noch keine Beschreibung hinterlegt.)";
return '<article><a href="index.php?page=regionInfo&id='.$row['UUID'].'" class="image"><img src="./data/RegionImages/'.$row['Image'].'.jpg" alt="Region Image '.substr($row['Name'], 0, 50).'" /></a>
return '<article><a href="index.php?page=regionInfo&id='.$row['UUID'].'" class="image"><img style="min-height: 250px; max-height: 250px;" src="./data/RegionImages/'.$row['Image'].'.jpg" alt="Region Image '.substr($row['Name'], 0, 50).'" /></a>
<h3>'.substr($row['Name'], 0, 50).'</h3><p>Online: '.$row['OnlineCount'].'</p><p>'.substr($row['Description'], 0, 300).'</p><ul class="actions"><li><a href="region_'.$row['UUID'].'.html" class="button html5lightbox">Menr Infos</a></li></ul></article>';
}
?>