Abgleich mit dem Stand auf dem Server. Irgendwie sind hier Commits verloren/nie gemacht worden.
This commit is contained in:
@@ -1270,7 +1270,7 @@ $retHtml = "";
|
||||
"<div class=\"wkInfoCardWkInfo\">".
|
||||
"<h3 class=\"fontWeightLighter\" >".$aWkEvent['Veranstaltung']."</h4>".
|
||||
"<dl>".
|
||||
"<dt>Altersklassen</dt><dd>".$aWkEvent['Altersklassen']."</dd>".
|
||||
"<dt>Altersklassen<a href=\"#hilfeAltersklassen\"><sup>?</sup></a></dt><dd>".$aWkEvent['Altersklassen']."</dd>".
|
||||
"<dt>Einschreibefrist</dt><dd>".(
|
||||
empty($aWkEvent['meldefrist'])?
|
||||
"fehlende Einschreibefrist"
|
||||
@@ -1337,5 +1337,39 @@ $retHtml = "";
|
||||
return $retHtml;
|
||||
}
|
||||
|
||||
function isUserAdmin($dbConn, $userId){
|
||||
$adminUsers =
|
||||
dbQuery(
|
||||
$dbConn,
|
||||
"SELECT `wkParticipo_user<=>userAttributes`.userId, `wkParticipo_userAttributes`.name from `wkParticipo_user<=>userAttributes` LEFT JOIN `wkParticipo_userAttributes` ON `wkParticipo_user<=>userAttributes`.attributeId = `wkParticipo_userAttributes`.id WHERE `wkParticipo_userAttributes`.name = :attributeName;",
|
||||
array(":attributeName"=>array('value'=>"isAdmin", 'data_type'=>PDO::PARAM_STR))
|
||||
);
|
||||
foreach($adminUsers as $adminUser)
|
||||
if($adminUser['userId']==$userId)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Stellt den cssCode mit den Variablendefinitionen bereit
|
||||
function colorThemeCss($colorArray = array('backgroundColor'=>"#FFAE00", 'highlightColor'=>"#FF8100", 'buttonColor'=>"#291670")){
|
||||
//$colorTypes = ["backgroundColor", "highlightColor", "buttonColor"];
|
||||
$defaultColors =['backgroundColor'=> "#FFAE00", 'highlightColor'=>"#FF8100", 'buttonColor'=>"#291670"];
|
||||
|
||||
//echo("DBG: colorArray:"); var_dump($colorArray);
|
||||
|
||||
// Inputdatenvalidierung
|
||||
foreach($defaultColors as $key=>$value){
|
||||
if( !preg_match("/^#(?:[0-9a-fA-F]{3}){1,2}$/", $colorArray[$key]) ){
|
||||
$colorArray[$key] = $defaultColors[$key];
|
||||
}
|
||||
}
|
||||
|
||||
$ret = ":root{";
|
||||
|
||||
foreach($colorArray as $key=>$value){
|
||||
$ret .= "--".$key.": ".$value."; ";
|
||||
}
|
||||
$ret .= "}";
|
||||
return $ret;
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user