Nate Jones 10 роки тому
батько
коміт
859bd1926f

+ 4 - 11
core/apps/apps.php

@@ -56,17 +56,10 @@ require_once "resources/paging.php";
 	}
 	}
 
 
 //show the content
 //show the content
-	echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
-	echo "	<tr>\n";
-	echo "		<td width='50%' align='left' nowrap><b>".$text['header-apps']."</b></td>\n";
-	echo "		<td width='50%' align='right'>&nbsp;</td>\n";
-	echo "	</tr>\n";
-	echo "	<tr>\n";
-	echo "		<td align='left' colspan='2'>\n";
-	echo "			".$text['description-apps']."<br /><br />\n";
-	echo "		</td>\n";
-	echo "	</tr>\n";
-	echo "</table>\n";
+	echo "<b>".$text['header-apps']."</b>\n";
+	echo "<br /><br />\n";
+	echo $text['description-apps'];
+	echo "<br /><br />\n";
 
 
 	$c = 0;
 	$c = 0;
 	$row_style["0"] = "row_style0";
 	$row_style["0"] = "row_style0";

+ 5 - 5
core/default_settings/default_settings.php

@@ -261,7 +261,7 @@ if (permission_exists("domain_select") && permission_exists("domain_setting_add"
 	echo "<form name='frm' id='frm' method='post' action=''>";
 	echo "<form name='frm' id='frm' method='post' action=''>";
 	echo "<input type='hidden' name='action' id='action' value=''>";
 	echo "<input type='hidden' name='action' id='action' value=''>";
 
 
-	echo "<table width='100%' border='0'>\n";
+	echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
 	echo "	<tr>\n";
 	echo "	<tr>\n";
 	echo "		<td width='50%' align='left' valign='top' nowrap='nowrap'>";
 	echo "		<td width='50%' align='left' valign='top' nowrap='nowrap'>";
 	echo "			<b>".$text['header-default_settings']."</b>";
 	echo "			<b>".$text['header-default_settings']."</b>";
@@ -439,8 +439,10 @@ if (permission_exists("domain_select") && permission_exists("domain_setting_add"
 			}
 			}
 			echo "	</td>\n";
 			echo "	</td>\n";
 			echo "</tr>\n";
 			echo "</tr>\n";
+
 			$previous_category = $row['default_setting_category'];
 			$previous_category = $row['default_setting_category'];
-			if ($c==0) { $c=1; } else { $c=0; }
+			$c = ($c == 0) ? 1 : 0;
+
 		} //end foreach
 		} //end foreach
 		unset($sql, $result, $row_count);
 		unset($sql, $result, $row_count);
 	} //end if results
 	} //end if results
@@ -468,12 +470,10 @@ if (permission_exists("domain_select") && permission_exists("domain_setting_add"
 	echo "</table>";
 	echo "</table>";
 	echo "<br />";
 	echo "<br />";
 	echo $paging_controls;
 	echo $paging_controls;
-	echo "<br /><br />";
+	echo "<br /><br /><br />";
 
 
 	echo "</form>";
 	echo "</form>";
 
 
-	echo "<br /><br />";
-
 	// check or uncheck all category checkboxes
 	// check or uncheck all category checkboxes
 	if (sizeof($subcat_ids) > 0) {
 	if (sizeof($subcat_ids) > 0) {
 		echo "<script>\n";
 		echo "<script>\n";

+ 2 - 1
core/domain_settings/domain_edit.php

@@ -691,10 +691,11 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
 	echo "		</td>\n";
 	echo "		</td>\n";
 	echo "	</tr>";
 	echo "	</tr>";
 	echo "</table>";
 	echo "</table>";
+	echo "<br /><br />";
+
 	echo "</form>";
 	echo "</form>";
 
 
 	if ($action == "update") {
 	if ($action == "update") {
-		echo "<br /><br />";
 		require "domain_settings.php";
 		require "domain_settings.php";
 	}
 	}
 
 

+ 1 - 1
core/domain_settings/domain_settings.php

@@ -275,7 +275,7 @@ if (sizeof($_REQUEST) > 1) {
 	if (permission_exists('domain_setting_add')) {
 	if (permission_exists('domain_setting_add')) {
 		echo 		"<a href='domain_setting_edit.php?domain_uuid=".check_str($_GET['id'])."' alt='".$text['button-add']."'>$v_link_label_add</a>";
 		echo 		"<a href='domain_setting_edit.php?domain_uuid=".check_str($_GET['id'])."' alt='".$text['button-add']."'>$v_link_label_add</a>";
 	}
 	}
-	if (permission_exists('domain_setting_delete')) {
+	if (permission_exists('domain_setting_delete') && $result_count > 0) {
 		echo "<a href='javascript:void(0);' onclick=\"if (confirm('".$text['confirm-delete']."')) { document.getElementById('action').value = 'delete'; document.getElementById('domain_frm').submit(); }\" alt='".$text['button-delete']."'>".$v_link_label_delete."</a>";
 		echo "<a href='javascript:void(0);' onclick=\"if (confirm('".$text['confirm-delete']."')) { document.getElementById('action').value = 'delete'; document.getElementById('domain_frm').submit(); }\" alt='".$text['button-delete']."'>".$v_link_label_delete."</a>";
 	}
 	}
 	echo "		</td>\n";
 	echo "		</td>\n";

+ 14 - 8
core/users/group_permissions.php

@@ -317,19 +317,23 @@ require_once "resources/require.php";
 	echo "<form method='post' name='frm' action=''>\n";
 	echo "<form method='post' name='frm' action=''>\n";
 	echo "<table cellpadding='0' cellspacing='0' width='100%' border='0'>\n";
 	echo "<table cellpadding='0' cellspacing='0' width='100%' border='0'>\n";
 	echo "	<tr>\n";
 	echo "	<tr>\n";
-	echo "		<td width='50%' align=\"left\" nowrap=\"nowrap\"><b>".$text['header-group_permissions'].$group_name."</b></td>\n";
-	echo "		<td width='50%' align=\"right\">\n";
-	echo "			<input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='groups.php'\" value='".$text['button-back']."'> ";
+	echo "		<td width='50%' align=\"left\" nowrap=\"nowrap\" valign='top'>";
+	echo "			<b>".$text['header-group_permissions'].$group_name."</b>";
+	echo "			<br><br>";
+	echo "		</td>\n";
+	echo "		<td width='50%' align=\"right\" valign='top'>\n";
+	echo "			<input type='button' class='btn' alt='".$text['button-back']."' onclick=\"window.location='groups.php'\" value='".$text['button-back']."'> ";
 	echo "			<input type='button' class='btn' alt='".$text['button-copy']."' onclick='copy_group();' value='".$text['button-copy']."'>";
 	echo "			<input type='button' class='btn' alt='".$text['button-copy']."' onclick='copy_group();' value='".$text['button-copy']."'>";
+	echo "			<input type='submit' class='btn' name='submit' value='".$text['button-save']."'>\n";
 	echo "		</td>\n";
 	echo "		</td>\n";
 	echo "	</tr>\n";
 	echo "	</tr>\n";
 	echo "	<tr>\n";
 	echo "	<tr>\n";
 	echo "		<td align=\"left\" colspan='2'>\n";
 	echo "		<td align=\"left\" colspan='2'>\n";
-	echo "			".$text['description-group_permissions']."<br /><br />\n";
+	echo "			".$text['description-group_permissions']."\n";
 	echo "		</td>\n";
 	echo "		</td>\n";
 	echo "	</tr>\n";
 	echo "	</tr>\n";
 	echo "</table>\n";
 	echo "</table>\n";
-	echo "<br />\n";
+	echo "<br /><br />\n";
 
 
 	$c = 0;
 	$c = 0;
 	$row_style["0"] = "row_style0";
 	$row_style["0"] = "row_style0";
@@ -340,8 +344,9 @@ require_once "resources/require.php";
 			$app_name = $app['name'];
 			$app_name = $app['name'];
 			$description = $app['description']['en-us'];
 			$description = $app['description']['en-us'];
 
 
-			echo "<strong>".$app_name."</strong><br />\n";
-			echo $description."<br /><br />\n";
+			echo "<b>".$app_name."</b><br />\n";
+			if ($description != '') { echo $description."<br />\n"; }
+			echo "<br>";
 
 
 			echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
 			echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
 			echo "	<tr>\n";
 			echo "	<tr>\n";
@@ -363,11 +368,12 @@ require_once "resources/require.php";
 			}
 			}
 
 
 			echo "	<tr>\n";
 			echo "	<tr>\n";
-			echo "		<td colspan='3' align='right' style='padding-top: 5px;'><input type='submit' name='submit' class='btn' value='".$text['button-save']."'></td>\n";
+			echo "		<td colspan='3' align='right' style='padding-top: 15px;'><input type='submit' name='submit' class='btn' value='".$text['button-save']."'></td>\n";
 			echo "	</tr>\n";
 			echo "	</tr>\n";
 			echo "</table>";
 			echo "</table>";
 			echo "<br />\n";
 			echo "<br />\n";
 		} //end foreach
 		} //end foreach
+		echo "<br>";
 		unset($sql, $result, $row_count);
 		unset($sql, $result, $row_count);
 
 
 		echo "<script>\n";
 		echo "<script>\n";

+ 31 - 42
core/users/groupmembers.php

@@ -69,17 +69,41 @@ else {
 	$row_style["0"] = "row_style0";
 	$row_style["0"] = "row_style0";
 	$row_style["1"] = "row_style1";
 	$row_style["1"] = "row_style1";
 
 
-	echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
+	echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
 	echo "	<tr>\n";
 	echo "	<tr>\n";
-	echo "		<td align='left'>\n";
-	echo "			<span  class=\"\" height='50'><b>".$text['header-group_members'].$group_name."</b></span>";
-	echo "		</td>\n";
-	echo "		<td align='right' nowrap='nowrap'>\n";
-	echo "			<input type='button' class='btn' name='' alt='back' onclick=\"window.location='groups.php'\" value='".$text['button-back']."'>";
-	echo "			&nbsp;&nbsp;&nbsp;\n";
+	echo "		<td width='100%' align='left' valign='top'>\n";
+	echo "			<b>".$text['header-group_members'].$group_name."</b>";
 	echo "		</td>\n";
 	echo "		</td>\n";
+	echo "		<td align='right' nowrap='nowrap' valign='middle'>\n";
+	echo "			<input type='button' class='btn' style='margin-right: 15px;' alt='".$text['button-back']."' onclick=\"window.location='groups.php'\" value='".$text['button-back']."'>";
+	echo "		</td>";
+	if (permission_exists('group_member_add')) {
+		echo "		<td align='right' nowrap='nowrap' valign='top'>\n";
+		echo "			<form method='post' action='groupmemberadd.php'>";
+		$sql = "SELECT * FROM v_users ";
+		$sql .= "where domain_uuid = '$domain_uuid' ";
+		$sql .= "order by username ";
+		$prep_statement = $db->prepare(check_sql($sql));
+		$prep_statement->execute();
+		echo "			<select name=\"user_uuid\" style='width: 200px;' class='formfld'>\n";
+		echo "				<option value=\"\"></option>\n";
+		$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
+		foreach($result as $field) {
+			$username = $field['username'];
+			if (if_group_members($db, $group_name, $field['user_uuid']) && !in_array($field['user_uuid'], $group_users)) {
+				echo "		<option value='".$field['user_uuid']."'>".$field['username']."</option>\n";
+			}
+		}
+		echo "			</select>";
+		unset($sql, $result);
+		echo "			<input type='hidden' name='group_name' value='$group_name'>";
+		echo "			<input type='submit' class='btn' value='".$text['button-add_member']."'>";
+		echo "			</form>";
+		echo "		</td>\n";
+	}
 	echo "	</tr>\n";
 	echo "	</tr>\n";
 	echo "</table>\n";
 	echo "</table>\n";
+	echo "<br>";
 
 
 	$sql = "SELECT u.user_uuid, u.username, g.group_user_uuid FROM v_group_users as g, v_users as u ";
 	$sql = "SELECT u.user_uuid, u.username, g.group_user_uuid FROM v_group_users as g, v_users as u ";
 	$sql .= "where g.user_uuid = u.user_uuid ";
 	$sql .= "where g.user_uuid = u.user_uuid ";
@@ -122,42 +146,7 @@ else {
 	$strlist .= "</table>\n";
 	$strlist .= "</table>\n";
 	echo $strlist;
 	echo $strlist;
 
 
-	echo "<br>";
-
-	echo "<form method='post' action='groupmemberadd.php'>";
-	echo "<table width='250'>";
-	echo "	<tr>";
-	echo "		<td width='60%' align='right'>";
-
-	$sql = "SELECT * FROM v_users ";
-	$sql .= "where domain_uuid = '$domain_uuid' ";
-	$sql .= "order by username ";
-	$prep_statement = $db->prepare(check_sql($sql));
-	$prep_statement->execute();
-
-	echo "<select name=\"user_uuid\" style='width: 200px;' class='formfld'>\n";
-	echo "<option value=\"\"></option>\n";
-	$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
-	foreach($result as $field) {
-		$username = $field['username'];
-		if (if_group_members($db, $group_name, $field['user_uuid']) && !in_array($field['user_uuid'], $group_users)) {
-			echo "<option value='".$field['user_uuid']."'>".$field['username']."</option>\n";
-		}
-	}
-	echo "</select>";
-	unset($sql, $result);
-
-	echo "		</td>";
-	echo "		<td align='right'>";
-	if (permission_exists('group_member_add')) {
-		echo "          <input type='hidden' name='group_name' value='$group_name'>";
-		echo "          <input type='submit' class='btn' value='".$text['button-add_member']."'>";
-	}
-	echo "      </td>";
-	echo "	</tr>";
-	echo "</table>";
 	echo "<br><br>";
 	echo "<br><br>";
-	echo "</form>";
 
 
 //include the footer
 //include the footer
 	require_once "resources/footer.php";
 	require_once "resources/footer.php";

+ 10 - 8
core/users/groups.php

@@ -57,13 +57,13 @@ require_once "resources/require.php";
 	}
 	}
 
 
 //show the content
 //show the content
-	echo "<div class='' style='padding:0px;'>\n";
-	echo "<table width='100%'>";
-	echo "<td>";
-
-	echo "<table width='100%' border='0'><tr>";
-	echo "<td width='50%'><b>".$text['header-group_manager']."</b><br><br></td>";
-	echo "<td width='50%' align='right'>";
+	echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>";
+	echo "<tr>";
+	echo "<td width='50%' valign='top'>";
+	echo "	<b>".$text['header-group_manager']."</b>";
+	echo "	<br><br>";
+	echo "</td>";
+	echo "<td width='50%' align='right' valign='top'>";
 	if (permission_exists('user_view')) {
 	if (permission_exists('user_view')) {
 		echo "  <input type='button' class='btn' onclick=\"window.location='index.php'\" value='".$text['header-user_manager']."'>";
 		echo "  <input type='button' class='btn' onclick=\"window.location='index.php'\" value='".$text['header-user_manager']."'>";
 	}
 	}
@@ -71,7 +71,9 @@ require_once "resources/require.php";
 		echo "	<input type='button' class='btn' alt='".$text['button-restore']."' onclick=\"window.location='permissions_default.php'\" value='".$text['button-restore']."'>";
 		echo "	<input type='button' class='btn' alt='".$text['button-restore']."' onclick=\"window.location='permissions_default.php'\" value='".$text['button-restore']."'>";
 	}
 	}
 	echo "</td>\n";
 	echo "</td>\n";
-	echo "</tr></table>";
+	echo "</tr>";
+	echo "</table>";
+	echo "<br>";
 
 
 	$sql = "SELECT * FROM v_groups ";
 	$sql = "SELECT * FROM v_groups ";
 	$sql .= "where domain_uuid = '$domain_uuid' ";
 	$sql .= "where domain_uuid = '$domain_uuid' ";

+ 0 - 9
core/users/index.php

@@ -43,16 +43,7 @@ else {
 	$document['title'] = $text['title-user_manager'];
 	$document['title'] = $text['title-user_manager'];
 
 
 //show the user list
 //show the user list
-	echo "	<table width='100%' border='0'>";
-	echo "		<tr>";
-	echo "			<td align='left' width='100%'>";
 	require_once "users.php";
 	require_once "users.php";
-	echo "				<br />";
-	echo "				<br />";
-	echo "				<br />";
-	echo "			</td>";
-	echo "		</tr>";
-	echo "	</table>";
 
 
 //include the footer
 //include the footer
 	include "resources/footer.php";
 	include "resources/footer.php";

+ 3 - 3
core/users/users.php

@@ -46,9 +46,9 @@ $field_value = $_REQUEST["field_value"];
 	echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
 	echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
 	echo "<form method='post' action=''>";
 	echo "<form method='post' action=''>";
 	echo "<tr>\n";
 	echo "<tr>\n";
-	echo "<td align='left' width='90%' nowrap><b>".$text['header-user_manager']."</b></td>\n";
-	echo "<td align='right' nowrap='nowrap'>".$text['label-search_by'].":&nbsp;</td>";
-	echo "<td align='left'>\n";
+	echo "<td align='left' width='90%' nowrap='nowrap' valign='top'><b>".$text['header-user_manager']."</b></td>\n";
+	echo "<td align='right' nowrap='nowrap' valign='middle'>".$text['label-search_by']."&nbsp;</td>";
+	echo "<td align='left' valign='top'>\n";
 	echo "	<select name='field_name' style='width:150px' class='formfld'>\n";
 	echo "	<select name='field_name' style='width:150px' class='formfld'>\n";
 	echo "	<option value=''></option>\n";
 	echo "	<option value=''></option>\n";
 	if ($field_name == "username") {
 	if ($field_name == "username") {