浏览代码

Document (Window) Title: Update variable name to avoid conflict when paging is used.

Nate Jones 11 年之前
父节点
当前提交
d6673ecf78

+ 2 - 2
core/databases/database_edit.php

@@ -202,10 +202,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
 //show the header
 //show the header
 	require_once "resources/header.php";
 	require_once "resources/header.php";
 	if ($action == "update") {
 	if ($action == "update") {
-		$page["title"] = $text['title-database-edit'];
+		$document['title'] = $text['title-database-edit'];
 	}
 	}
 	if ($action == "add") {
 	if ($action == "add") {
-		$page["title"] = $text['title-database-add'];
+		$document['title'] = $text['title-database-add'];
 	}
 	}
 
 
 //show the content
 //show the content

+ 1 - 1
core/databases/databases.php

@@ -41,7 +41,7 @@ else {
 	}
 	}
 
 
 require_once "resources/header.php";
 require_once "resources/header.php";
-$page["title"] = $text['title-databases'];
+$document['title'] = $text['title-databases'];
 
 
 require_once "resources/paging.php";
 require_once "resources/paging.php";
 
 

+ 2 - 2
core/default_settings/default_setting_edit.php

@@ -162,10 +162,10 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
 //show the header
 //show the header
 	require_once "resources/header.php";
 	require_once "resources/header.php";
 	if ($action == "update") {
 	if ($action == "update") {
-		$page["title"] = $text['title-default_setting-edit'];
+		$document['title'] = $text['title-default_setting-edit'];
 	}
 	}
 	elseif ($action == "add") {
 	elseif ($action == "add") {
-		$page["title"] = $text['title-default_setting-add'];
+		$document['title'] = $text['title-default_setting-add'];
 	}
 	}
 
 
 //show the content
 //show the content

+ 1 - 1
core/default_settings/default_settings.php

@@ -41,7 +41,7 @@ else {
 	}
 	}
 
 
 require_once "resources/header.php";
 require_once "resources/header.php";
-$page["title"] = $text['title-default_settings'];
+$document['title'] = $text['title-default_settings'];
 
 
 require_once "resources/paging.php";
 require_once "resources/paging.php";
 
 

+ 2 - 2
core/domain_settings/domain_edit.php

@@ -551,10 +551,10 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
 //show the header
 //show the header
 	require_once "resources/header.php";
 	require_once "resources/header.php";
 	if ($action == "update") {
 	if ($action == "update") {
-		$page["title"] = $text['title-domain-edit'];
+		$document['title'] = $text['title-domain-edit'];
 	}
 	}
 	if ($action == "add") {
 	if ($action == "add") {
-		$page["title"] = $text['title-domain-add'];
+		$document['title'] = $text['title-domain-add'];
 	}
 	}
 
 
 //show the content
 //show the content

+ 2 - 2
core/domain_settings/domain_setting_edit.php

@@ -257,10 +257,10 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
 //show the header
 //show the header
 	require_once "resources/header.php";
 	require_once "resources/header.php";
 	if ($action == "update") {
 	if ($action == "update") {
-		$page["title"] = $text['title-domain_setting-edit'];
+		$document['title'] = $text['title-domain_setting-edit'];
 	}
 	}
 	elseif ($action == "add") {
 	elseif ($action == "add") {
-		$page["title"] = $text['title-domain_setting-add'];
+		$document['title'] = $text['title-domain_setting-add'];
 	}
 	}
 
 
 //show the content
 //show the content

+ 1 - 1
core/domain_settings/domains.php

@@ -94,7 +94,7 @@ else {
 
 
 //includes
 //includes
 	require_once "resources/header.php";
 	require_once "resources/header.php";
-	$page["title"] = $text['title-domains'];
+	$document['title'] = $text['title-domains'];
 
 
 	require_once "resources/paging.php";
 	require_once "resources/paging.php";
 
 

+ 1 - 1
core/menu/menu.php

@@ -41,7 +41,7 @@ else {
 	}
 	}
 
 
 require_once "resources/header.php";
 require_once "resources/header.php";
-$page["title"] = $text['title-menus'];
+$document['title'] = $text['title-menus'];
 
 
 require_once "resources/paging.php";
 require_once "resources/paging.php";
 
 

+ 2 - 2
core/menu/menu_edit.php

@@ -157,10 +157,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
 //show the header
 //show the header
 	require_once "resources/header.php";
 	require_once "resources/header.php";
 	if ($action == "update") {
 	if ($action == "update") {
-		$page["title"] = $text['title-menu-edit'];
+		$document['title'] = $text['title-menu-edit'];
 	}
 	}
 	if ($action == "add") {
 	if ($action == "add") {
-		$page["title"] = $text['title-menu-add'];
+		$document['title'] = $text['title-menu-add'];
 	}
 	}
 
 
 //show the content
 //show the content

+ 2 - 2
core/menu/menu_item_edit.php

@@ -305,10 +305,10 @@ else {
 //include the header
 //include the header
 	require_once "resources/header.php";
 	require_once "resources/header.php";
 	if ($action == "update") {
 	if ($action == "update") {
-		$page["title"] = $text['title-menu_item-edit'];
+		$document['title'] = $text['title-menu_item-edit'];
 	}
 	}
 	if ($action == "add") {
 	if ($action == "add") {
-		$page["title"] = $text['title-menu_item-add'];
+		$document['title'] = $text['title-menu_item-add'];
 	}
 	}
 
 
 	echo "<div align='center'>";
 	echo "<div align='center'>";

+ 1 - 1
core/upgrade/upgrade_schema.php

@@ -59,7 +59,7 @@
 			}
 			}
 
 
 		require_once "resources/header.php";
 		require_once "resources/header.php";
-		$page["title"] = $text['title-upgrade_schema'];
+		$document['title'] = $text['title-upgrade_schema'];
 
 
 		$display_type = 'html'; //html, text
 		$display_type = 'html'; //html, text
 	}
 	}

+ 1 - 1
core/user_settings/user_dashboard.php

@@ -67,7 +67,7 @@
 
 
 // load header
 // load header
 	require_once "resources/header.php";
 	require_once "resources/header.php";
-	$page["title"] = $text['title-user_dashboard'];
+	$document['title'] = $text['title-user_dashboard'];
 
 
 	echo "<br><b>".$text['header-user_dashboard']."</b><br>";
 	echo "<br><b>".$text['header-user_dashboard']."</b><br>";
 	echo $text['description-user_dashboard'];
 	echo $text['description-user_dashboard'];

+ 1 - 1
core/users/group_permissions.php

@@ -42,7 +42,7 @@ else {
 	}
 	}
 
 
 require_once "resources/header.php";
 require_once "resources/header.php";
-$page["title"] = $text['title-group_permissions'];
+$document['title'] = $text['title-group_permissions'];
 
 
 require_once "resources/paging.php";
 require_once "resources/paging.php";
 
 

+ 1 - 1
core/users/groupadd.php

@@ -78,7 +78,7 @@ if (strlen($group_name) > 0) {
 
 
 //include the header
 //include the header
 	include "resources/header.php";
 	include "resources/header.php";
-	$page["title"] = $text['title-group_add'];
+	$document['title'] = $text['title-group_add'];
 
 
 //show the content
 //show the content
 	echo "<div align='center'>";
 	echo "<div align='center'>";

+ 1 - 1
core/users/groupmembers.php

@@ -64,7 +64,7 @@ else {
 
 
 //include the header
 //include the header
 	require_once "resources/header.php";
 	require_once "resources/header.php";
-	$page["title"] = $text['title-group_members'];
+	$document['title'] = $text['title-group_members'];
 
 
 //show the content
 //show the content
 	$c = 0;
 	$c = 0;

+ 1 - 1
core/users/groups.php

@@ -44,7 +44,7 @@ else {
 
 
 //show the header
 //show the header
 	require_once "resources/header.php";
 	require_once "resources/header.php";
-	$page["title"] = $text['title-group_manager'];
+	$document['title'] = $text['title-group_manager'];
 	if (isset($_REQUEST["change"])) {
 	if (isset($_REQUEST["change"])) {
 		//get the values from the HTTP POST and save them as PHP variables
 		//get the values from the HTTP POST and save them as PHP variables
 		$change = check_str($_REQUEST["change"]);
 		$change = check_str($_REQUEST["change"]);

+ 1 - 1
core/users/index.php

@@ -42,7 +42,7 @@ else {
 
 
 //include the header
 //include the header
 	require_once "resources/header.php";
 	require_once "resources/header.php";
-	$page["title"] = $text['title-user_manager'];
+	$document['title'] = $text['title-user_manager'];
 
 
 //show the user list
 //show the user list
 	echo "<div align='center'>";
 	echo "<div align='center'>";

+ 1 - 1
core/users/signup.php

@@ -198,7 +198,7 @@ if (count($_POST)>0 && check_str($_POST["persistform"]) != "1") {
 
 
 //show the header
 //show the header
 	require_once "resources/header.php";
 	require_once "resources/header.php";
-	$page["title"] = $text['title-user_add'];
+	$document['title'] = $text['title-user_add'];
 
 
 //show the content
 //show the content
 	echo "<script>";
 	echo "<script>";

+ 1 - 1
core/users/usersupdate.php

@@ -369,7 +369,7 @@ else {
 
 
 //include the header
 //include the header
 	require_once "resources/header.php";
 	require_once "resources/header.php";
-	$page["title"] = $text['title-user_edit'];
+	$document['title'] = $text['title-user_edit'];
 
 
 //show the content
 //show the content
 	$table_width ='width="100%"';
 	$table_width ='width="100%"';

+ 2 - 2
resources/footer.php

@@ -27,7 +27,7 @@ include "root.php";
 require_once "resources/require.php";
 require_once "resources/require.php";
 
 
 //get the output from the buffer
 //get the output from the buffer
-	$body = $content_from_db.ob_get_contents(); 
+	$body = $content_from_db.ob_get_contents();
 	ob_end_clean(); //clean the buffer
 	ob_end_clean(); //clean the buffer
 
 
 //set a default template
 //set a default template
@@ -71,7 +71,7 @@ require_once "resources/require.php";
 
 
 //prepare the template to display the output
 //prepare the template to display the output
 	$custom_head = '';
 	$custom_head = '';
-	$output = str_replace ("<!--{title}-->", $page["title"], $template); //<!--{title}--> defined in each individual page
+	$output = str_replace ("<!--{title}-->", $document["title"], $template); //<!--{title}--> defined in each individual page
 	$output = str_replace ("<!--{head}-->", $custom_head, $output); //<!--{head}--> defined in each individual page
 	$output = str_replace ("<!--{head}-->", $custom_head, $output); //<!--{head}--> defined in each individual page
 	if (strlen($v_menu) > 0) {
 	if (strlen($v_menu) > 0) {
 		$output = str_replace ("<!--{menu}-->", $v_menu, $output); //defined in /resources/menu.php
 		$output = str_replace ("<!--{menu}-->", $v_menu, $output); //defined in /resources/menu.php