-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmake.php
More file actions
executable file
·118 lines (114 loc) · 5.56 KB
/
Copy pathmake.php
File metadata and controls
executable file
·118 lines (114 loc) · 5.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0"/>
<meta charset="UTF-8">
<title>314chan</title>
<link href="css/MIcons.css" rel="stylesheet">
<link href="css/materialize.css" type="text/css" rel="stylesheet" media="screen,projection"/>
<link href="css/style.css" type="text/css" rel="stylesheet" media="screen,projection"/>
<style>
h1{
text-align: center;
}
</style>
</head>
<body>
<div class="navbar-fixed">
<nav class="marooncolor" role="navigation">
<div class="nav-wrapper container"><a id="logo-container" href="/" class="brand-logo">314chan</a>
<ul class="right hide-on-med-and-down">
<li><a href="rules.html">Rules</a></li>
<li><a href="faq.html">FAQ</a></li>
<li><a href="news.html">News</a></li>
<li><a href="https://irc.314chan.org">IRC</a></li>
</ul>
<ul id="nav-mobile" class="side-nav">
<li><a href="rules.html">Rules</a></li>
<li><a href="faq.html">FAQ</a></li>
<li><a href="news.html">News</a></li>
<li><a href="https://irc.314chan.org">IRC</a></li>
</ul>
<a href="#" data-activates="nav-mobile" class="button-collapse"><i class="material-icons">menu</i></a>
</div>
</nav>
</div>
<div class="section no-pad-bot" id="index-banner">
<div class="container">
<br><br>
<div class="row">
<?php
include("config.php");
include("inc/mitsuba.php");
$conn = new mysqli($db_host, $db_username, $db_password, $db_database);
$haruko = new Mitsuba($conn);
if ($_POST) {
/* if($haruko->admin->boards->addBoard(strtolower($_POST['uri']), "imageboard", $_POST['bname'], $_POST['desc'], $_POST['desc'], 0, 1, 0, 0, 1, 1, 20, 60, 120, 2097152, 15, 0, 0, 1, 0, 2000, "Anonymous", "%", 1, 0, "", 1, 1, "", 0) > 0){
if ((!empty($_POST['uri'])) && ($haruko->common->isBoard($_POST['uri']))){
$haruko->caching->rebuildBoardCache($_POST['uri']);
echo "<h1>/".$_POST['uri']."/ Rebuilt!</h1>";
}else{
echo "<h1>Rebuilding apparently didn't work...</h1>";
}
if($haruko->admin->users->addUser($_POST['uname'], $_POST['pass'], 3, $_POST['uri'])){
echo "<h1>User Added.</h1>";
}else{
echo "<h1>User already exists or a MariaDB transaction failed... Contact parley.</h1>";
}
echo "<h1>Board Created!</h1><h3>Welcome to team314!<br />Login with your credentials at <a href='/mod.php'>mod.php</a></h3>";
}else{
echo "Error: <em>A MariaDB transaction failed, or the board/directory already exists.</em>";
}*/
echo "disabled.";
}else{
?>
<form class="col s12" method="POST">
<div class="row">
<div class="input-field col s12">
<label for="uri">Board Directory <small>(excluding leading/following slash) <strong>(max: 10)</strong></small></label>
<input placeholder="b" id="uri" name="uri" type="text" maxlength=10 class="validate" required autofocus autocomplete="off">
</div>
</div>
<div class="row">
<div class="input-field col s12">
<label for="bname">Board name<small> (Text next to board directory on board pages) <strong>(max: 100)</strong></small></label>
<input placeholder="Fortuitous Folly" id="bname" name="bname"type="text" maxlength=100 class="validate" required autocomplete="off">
</div>
</div>
<div class="row">
<div class="input-field col s12">
<label for="desc">Board Description <small><strong>(max: 100)</strong></small></label>
<textarea placeholder="The posts created here are lies, and are terms of idiotic chucklefuckery." id="desc" name="desc" maxlength=100 class="materialize-textarea" required></textarea>
</div>
</div>
<div class="row">
<div class="input-field col s6">
<label for="uname">Username <small></small></label>
<input placeholder="StaffyMcGee" id="uname" name="uname"type="text" maxlength=11 class="validate" autocomplete="off">
</div>
<div class="input-field col s6">
<label for="last_name">Password <small>(Please pick a secure password!)</small></label>
<input placeholder="••••••••" id="pass" name="pass" type="password" class="validate" autocomplete="off">
</div>
</div>
<div class="row">
<div class="input-field col s12">
<label for="first_name">Contact email <small>(For board recovery; optional.)</small></label>
<input placeholder="admin@314chan.org" id="email" name="email" type="email" class="validate" autocomplete="off">
</div>
</div>
<button class="btn waves-effect waves-light" type="submit">Submit<i class="material-icons right">send</i></button>
</form>
<?php
}
?>
</div>
</div>
</div>
<!-- Scripts-->
<script src="js/jquery.js"></script>
<script src="js/materialize.js"></script>
<script src="js/init.js"></script>
</body>
</html>