|
1
|
1
|
new file mode 100644
|
|
...
|
...
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+<?php
|
|
|
2
|
+if(!defined("_CHARSET")) exit( );
|
|
|
3
|
+if(!isMEMBER) {
|
|
|
4
|
+if(!isset($_SESSION)) session_start();
|
|
|
5
|
+if(isset($_GET['sid']) && isNumber($_GET['sid'])) $_SESSION['login_url'] = $url."/viewstory.php?sid=".$_GET['sid'];
|
|
|
6
|
+else $_SESSION['login_url'] = $url."/user.php";
|
|
|
7
|
+ $longform = "{penname} {password} {rememberme} {go} <div id='loginlinks'>{register} | {lostpwd}</div>";
|
|
|
8
|
+ $shortform = "{penname} {password} {rememberme} {go}";
|
|
|
9
|
+ $content = "<form method=\"POST\"enctype=\"multipart/form-data\" id=\"loginblock\" action=\"".PATHTOSMF."index.php?action=login2\"><input type=\"hidden\" name=\"cookielength\" value=\"-1\" />";
|
|
|
10
|
+ $replace = array("<label for=\"penname\">"._PENNAME.":</label><INPUT type=\"text\" class=\"textbox\" name=\"user\" id=\"user\">",
|
|
|
11
|
+ "<label for=\"pswd\">"._PASSWORD.":</label><INPUT type=\"password\" class=\"textbox\" id=\"passwrd\" name=\"passwrd\">",
|
|
|
12
|
+ "<span id='rememberme'><INPUT type=\"checkbox\" class=\"checkbox\" name=\"cookieneverexp\" id=\"cookieneverexp\" value=\"1\"><label for=\"cookieneverexp\">"._REMEMBERME."</label></span>",
|
|
|
13
|
+ (!empty($pagelinks['register']['link']) ? $pagelinks['register']['link'] : ""), $pagelinks['lostpassword']['link'],
|
|
|
14
|
+ "<INPUT type=\"submit\" class=\"button\" name=\"submit\" value=\""._GO."\">");
|
|
|
15
|
+ $search = array("@\{penname\}@", "@\{password\}@", "@\{rememberme\}@", "@\{register\}@", "@\{lostpwd\}@", "@\{go\}@");
|
|
|
16
|
+ if(!empty($blocks['login']['template'])) $content .= preg_replace($search, $replace, stripslashes($blocks['login']['template']));
|
|
|
17
|
+ else $content .= preg_replace( $search, $replace , (!empty($blocks['login']['form']) ? $longform : $shortform));
|
|
|
18
|
+ $content .= "</form>";
|
|
|
19
|
+}
|
|
|
20
|
+else if(!empty($blocks['login']['acctlink'])) $content = $pagelinks['login']['link'];
|
|
|
21
|
+else $content = "";
|
|
|
22
|
+?>
|
|
0
|
23
|
\ No newline at end of file
|