causefx %!s(int64=8) %!d(string=hai) anos
pai
achega
fd585a29f1
Modificáronse 4 ficheiros con 8 adicións e 5 borrados
  1. 1 1
      homepage.php
  2. 2 1
      index.php
  3. 1 1
      settings.php
  4. 4 2
      user.php

+ 1 - 1
homepage.php

@@ -188,7 +188,7 @@ foreach(loadAppearance() as $key => $value) {
         </style>
     </head>
 
-    <body id="body-homepage" class="scroller-body" style="padding: 0px;">
+    <body id="body-homepage-<?php echo $group;?>" class="scroller-body" style="padding: 0px;">
         <div class="main-wrapper" style="position: initial;">
             <div id="content" class="container-fluid">
                 <br/>

+ 2 - 1
index.php

@@ -28,6 +28,7 @@ $loadingIcon = "images/organizr-load-w-thick.gif";
 $baseURL = "";
 $dbcreated = false;
 $splash = false;
+$group = (isset($group) ? $group : "guest");
 
 // Get Action
 if(isset($_POST['action'])) {
@@ -477,7 +478,7 @@ if(file_exists("images/settings2.png")) : $iconRotate = "false"; $settingsIcon =
 		<?php customCSS(); ?>
 	</style>
 
-	<body id="body-index" style="overflow: hidden">
+	<body id="body-index-<?php echo $group;?>" style="overflow: hidden">
 
 		<?php if (LOADINGSCREEN == "true") : ?>
 		<!--Preloader-->

+ 1 - 1
settings.php

@@ -344,7 +344,7 @@ $themeVersion = (!empty(INSTALLEDTHEME) ? explode("-", INSTALLEDTHEME)[1] : null
         </style>
     </head>
 
-    <body id="body-settings" class="scroller-body" style="padding: 0; background: #273238; overflow: hidden">
+    <body id="body-settings-<?php echo $group;?>" class="scroller-body" style="padding: 0; background: #273238; overflow: hidden">
         <div id="main-wrapper" class="main-wrapper">
 
             <!--Content-->

+ 4 - 2
user.php

@@ -27,7 +27,9 @@
         return substr($ip, $start, $end);
     }
 
-    define('GUEST_HASH', "guest-".guestHash(0, 5));
+	define('GUEST_HASH', "guest-".guestHash(0, 5));
+	$group = new User();
+	$group = $group->role;
 
 	class User
 	{
@@ -841,7 +843,7 @@
 			if($username && $username !="" && $username !=User::GUEST_USER) {
 				$query = "SELECT role FROM users WHERE username = '$username' COLLATE NOCASE";
 				foreach($this->database->query($query) as $data) { return $data["role"]; }}
-			return User::GUEST_USER;
+			return "guest";
 		}
         
        /* function get_user_group($username)