Browse code

blocks/countdown/admin.php: Formatting changes

Clarissa Walker authored on 2026/09/24 10:38:54
Showing 1 changed files
... ...
@@ -25,10 +25,10 @@ include("blocks/countdown/block.php");
25 25
 	}
26 26
 	else  {
27 27
 		$output .= "<div style='text-align: center;'><b>"._CURRENT.":</b><br /><div class=\"tblborder\" style=\"width: 80%; margin: 0 auto; text-align: left;\">".$content."</div><br /></div>";
28
-		$output .= "<div id='settingsform'><form method=\"POST\" enctype=\"multipart/form-data\" action=\"admin.php?action=blocks&amp;admin=countdown\">
28
+		$output .= "<div id='settingsform' style=\"width: 35em; margin-right: 5%;\"><form method=\"POST\" enctype=\"multipart/form-data\" action=\"admin.php?action=blocks&amp;admin=countdown\">
29 29
 			<div><label for=\"target\">"._TARGETDATE.":</label><input type=\"text\" class=\"textbox\" name=\"target\" id=\"target\" value=\"".(!empty($blocks['countdown']['target']) ? $blocks['countdown']['target'] : date("m/d/Y G:H"))."\"></div>
30 30
 			<div><label for=\"CDformat\">"._FORMATCOUNT.":</label><input type=\"text\" class=\"textbox\" name=\"CDformat\" id=\"CDformat\" size=\"40\" value=\"".(empty($blocks['countdown']['CDformat']) ? _COUNTDOWNFORMAT : $blocks['countdown']['CDformat'])."\"></div>
31 31
 			<div><label for=\"finish\">"._FINISHMESSAGE.":</label><input type=\"text\" class=\"textbox\" name=\"finish\" id=\"finish\" size=\"40\" value=\"".(empty($blocks['countdown']['finish']) ? _COUNTDOWNOVER : $blocks['countdown']['finish'])."\"></div>
32
-			<INPUT type=\"submit\" name=\"submit\" class=\"button\" id=\"submit\" value=\""._SUBMIT."\"></form></div><div style='text-align: center;'>"._DATENOTE."</div>";
32
+			<INPUT type=\"submit\" name=\"submit\" style=' margin-left: 31.8%; margin-top: 0.3em;' class=\"button\" id=\"submit\" value=\""._SUBMIT."\"></form></div><div style='text-align: center;'>"._DATENOTE."</div>";
33 33
 	}
34
-?>
35 34
\ No newline at end of file
35
+?>
Browse code

3.5.6 efiction version

Jimako authored on 2024/03/09 16:09:42
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,34 @@
1
+<?php
2
+if(!defined("_CHARSET")) exit( );
3
+
4
+global $language, $numupdated;
5
+$blockquery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_blocks WHERE block_name = 'countdown'");
6
+while($block = dbassoc($blockquery)) {
7
+	if ($block['block_variables'])
8
+	{
9
+		$blocks[$block['block_name']] = unserialize($block['block_variables']);
10
+	}
11
+	$blocks[$block['block_name']]['title'] = $block['block_title'];
12
+	 $blocks[$block['block_name']]['file'] = $block['block_file'];
13
+	$blocks[$block['block_name']]['status'] = $block['block_status'];
14
+}
15
+include("blocks/countdown/block.php");
16
+	if(isset($_POST['submit'])) {
17
+		if(!empty($_POST['target'])) $blocks['countdown']['target'] = escapestring($_POST['target']);
18
+		else unset($blocks['countdown']['target']);
19
+		if(!empty($_POST['CDformat'])) $blocks['countdown']['CDformat'] = escapestring($_POST['CDformat']);
20
+		else unset($blocks['countdown']['CDformat']);
21
+		if(!empty($_POST['finish'])) $blocks['countdown']['CDfinal'] = escapestring($_POST['finish']);
22
+		else unset($blocks['countdown']['CDfinal']);
23
+		$output .= "<div style='text-align: center;'>"._ACTIONSUCCESSFUL."</div>";
24
+		save_blocks( $blocks );
25
+	}
26
+	else  {
27
+		$output .= "<div style='text-align: center;'><b>"._CURRENT.":</b><br /><div class=\"tblborder\" style=\"width: 80%; margin: 0 auto; text-align: left;\">".$content."</div><br /></div>";
28
+		$output .= "<div id='settingsform'><form method=\"POST\" enctype=\"multipart/form-data\" action=\"admin.php?action=blocks&amp;admin=countdown\">
29
+			<div><label for=\"target\">"._TARGETDATE.":</label><input type=\"text\" class=\"textbox\" name=\"target\" id=\"target\" value=\"".(!empty($blocks['countdown']['target']) ? $blocks['countdown']['target'] : date("m/d/Y G:H"))."\"></div>
30
+			<div><label for=\"CDformat\">"._FORMATCOUNT.":</label><input type=\"text\" class=\"textbox\" name=\"CDformat\" id=\"CDformat\" size=\"40\" value=\"".(empty($blocks['countdown']['CDformat']) ? _COUNTDOWNFORMAT : $blocks['countdown']['CDformat'])."\"></div>
31
+			<div><label for=\"finish\">"._FINISHMESSAGE.":</label><input type=\"text\" class=\"textbox\" name=\"finish\" id=\"finish\" size=\"40\" value=\"".(empty($blocks['countdown']['finish']) ? _COUNTDOWNOVER : $blocks['countdown']['finish'])."\"></div>
32
+			<INPUT type=\"submit\" name=\"submit\" class=\"button\" id=\"submit\" value=\""._SUBMIT."\"></form></div><div style='text-align: center;'>"._DATENOTE."</div>";
33
+	}
34
+?>
0 35
\ No newline at end of file