Browse Source

you can now change logo in enhanced theme using default setting

luis daniel lucio quiroz 11 years ago
parent
commit
03832ae857
1 changed files with 17 additions and 4 deletions
  1. 17 4
      themes/enhanced/template.php

+ 17 - 4
themes/enhanced/template.php

@@ -1171,12 +1171,18 @@ legend {
 								<td>
 									<?php
 									if ($_SERVER['PHP_SELF'] != PROJECT_PATH."/resources/install.php") {
+										if (isset($_SESSION['theme']['logo']['text'])){
+											$logo = $_SESSION['theme']['logo']['text'];
+										}
+										else {
+											$logo = PROJECT_PATH."/themes/enhanced/images/logo.png";
+										}
 										if (strlen(PROJECT_PATH) > 0) {
-											echo "<a href='".PROJECT_PATH."'><img src='".PROJECT_PATH."/themes/enhanced/images/logo.png' /></a>";
+											echo "<a href='".PROJECT_PATH."'><img src='$logo' /></a>";
 										}
 										else {
 											if (!$default_login) {
-												echo "<a href='/'><img src='/themes/enhanced/images/logo.png' /></a>";
+												echo "<a href='/'><img src='$logo' /></a>";
 											}
 										}
 									}
@@ -1316,13 +1322,20 @@ legend {
 	</div>
 
 	<?php
+	if (isset($_SESSION['theme']['logo']['text'])){
+		$logo = $_SESSION['theme']['logo']['text'];
+	}
+	else {
+		$logo = PROJECT_PATH."/themes/enhanced/images/logo.png";
+	}
+
 	if ($default_login) {
 		?>
 		<div id="default_login">
 			<table cellpadding='0' cellspacing='0' border='0' width='100%' height='100%'>
 				<tr>
 					<td align='center' valign='middle'>
-						<a href='<?php echo PROJECT_PATH; ?>/'><img src='<?php echo PROJECT_PATH; ?>/themes/enhanced/images/logo.png'></a>
+						<a href='<?php echo PROJECT_PATH; ?>/'><img src='<?php echo $logo; ?>'></a>
 						<br />
 						<!--{body}-->
 						<br /><br /><br />
@@ -1338,4 +1351,4 @@ legend {
 	?>
 
 </body>
-</html>
+</html>