Browse code

Restore eFiction 3.x bridges

Clarissa Walker authored on 2026/07/23 10:30:45
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,45 @@
1
+<?php
2
+if(!defined("_CHARSET")) exit( );
3
+$blockquery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_blocks WHERE block_name = 'login'");
4
+while($block = dbassoc($blockquery)) {
5
+	$blocks[$block['block_name']] = unserialize($block['block_variables']);
6
+	$blocks[$block['block_name']]['title'] = $block['block_title'];
7
+	 $blocks[$block['block_name']]['file'] = $block['block_file'];
8
+	$blocks[$block['block_name']]['status'] = $block['block_status'];
9
+}
10
+global $language;
11
+// Set $loggedin to 0 to see the block
12
+$loggedin = 0;
13
+include("blocks/login/login.php");
14
+// Then set it back to 1. 
15
+$loggedin = 1;
16
+if(file_exists("blocks/login/$language.php")) include("blocks/login/$language.php");
17
+else include("blocks/login/en.php");
18
+	if(isset($_POST['submit'])) {
19
+		$blocks['login']['acctlink'] = $_POST['acctlink'];
20
+		if(empty($_POST['form'])) unset($blocks['login']['form']);
21
+		else $blocks['login']['form'] = $_POST['form'];
22
+		$blocks['login']['template'] = addslashes(descript($_POST['template']));
23
+		save_blocks( $blocks );
24
+		unset($_GET['admin']);
25
+		$output .= write_message(_ACTIONSUCCESSFUL);
26
+	}
27
+	else {
28
+		if(empty($blocks['login']['template'])) $template = "";
29
+		else $template = $blocks['login']['template'];
30
+		$output .= "<div style='text-align: center;'><span class='label'>"._CURRENT.":</span><br /><div class=\"tblborder\" style=\"width: 80%; text-align: left; margin: 1ex auto;\">$content</div></div><br />";
31
+		$output .= _LOGINNOTE."<div id='settingsform'><form method=\"POST\" enctype=\"multipart/form-data\" action=\"admin.php?action=blocks&admin=login\">
32
+			<div><label for=\"template\">"._TEMPLATE.":</label><span style='clear: left;'>&nbsp;</span></div>
33
+			<div class=\"shorttextarea\"><textarea name=\"template\" rows=\"5\" style=\"width: 100%;\" cols=\"40\">".stripslashes($template)."</textarea>";
34
+		if($tinyMCE) 
35
+			$output .= "<div class='tinytoggle'><input type='checkbox' name='toggle' onclick=\"toogleEditorMode('template');\" checked><label for='toggle'>"._TINYMCETOGGLE."</label></div>";
36
+		$output .= "</div>
37
+			<label for=\"form\">"._DEFAULTOPTS.":</label> <select name=\"form\" id=\"form\" class=\"textbox\" ><option value=\"0\"".(empty($blocks['login']['form']) ? " selected" : "").">"._SHORT."</option>
38
+					<option value=\"1\"".(!empty($blocks['login']['form']) ? " selected" : "").">"._LONG."</option>
39
+			</select><br />
40
+			<label for=\"acctlink\">"._ACCTLINK."</label> <select name=\"acctlink\" id=\"acctlink\" class=\"textbox\" ><option value=\"0\"".(empty($blocks['login']['acctlink']) ? " selected" : "").">"._NO."</option>
41
+					<option value=\"1\"".(!empty($blocks['login']['acctlink']) ? " selected" : "").">"._YES."</option>
42
+			</select><br />
43
+			<INPUT type=\"submit\" class=\"button\" id=\"submit\" name=\"submit\" value=\""._SUBMIT."\"></form></div>";
44
+	}
45
+?>
0 46
\ No newline at end of file