Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bootstrap now handles the display of most pages on Sekai now. Added script to automatically update DNS servers. Added new page templates to simplify page building. Added a few comments. Changed the layouts of countless pages. Changed the structure of dependancies. Changed the usage of quotes everywhere. Fixed errors in chan post submission.
- Loading branch information
Sek-ai
committed
May 23, 2017
1 parent
d05a50f
commit 08bfcee
Showing
29 changed files
with
859 additions
and
537 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
file_get_contents("http://freedns.afraid.org/dynamic/update.php?VG10OE8yclVyMVlMeHNubmNvQVhxVm1UOjE2NzgxNTU1"); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
<?php | ||
session_start(); | ||
include($_SERVER['DOCUMENT_ROOT'].'/access/sql.php'); | ||
$get = mysqli_query($link,"SELECT password FROM login WHERE username = '".$_SESSION['username']."'"); | ||
include("{$_SERVER["DOCUMENT_ROOT"]}/access/sql.php"); | ||
$get = mysqli_query($link,"SELECT password FROM login WHERE username = '{$_SESSION["username"]}'"); | ||
$oldPassword = mysqli_fetch_array($get,MYSQLI_ASSOC); | ||
if(password_verify($_POST['oldpassword'],$oldPassword['password'])) { | ||
if($_POST['newpassword'] == $_POST['confirmpassword']) { | ||
$newPassword = password_hash($_POST['newpassword'],PASSWORD_DEFAULT); | ||
if(mysqli_query($link,"UPDATE login SET password = '$newPassword' WHERE username = '".$_SESSION['username']."'")) { | ||
if(password_verify($_POST["oldpassword"],$oldPassword["password"])) { | ||
if($_POST["newpassword"] == $_POST["confirmpassword"]) { | ||
$newPassword = password_hash($_POST["newpassword"],PASSWORD_DEFAULT); | ||
if(mysqli_query($link,"UPDATE login SET password = '$newPassword' WHERE username = '{$_SESSION["username"]}'")) { | ||
mysqli_close($link); | ||
header("Location: /account/password/?success=1"); | ||
header("Location: /account/?passwordsuccess=1"); | ||
exit(); | ||
} else { | ||
echo('MYSQL ERROR: '.mysqli_error($link)); | ||
echo("MYSQL ERROR: ".mysqli_error($link)); | ||
mysqli_close($link); | ||
exit(); | ||
} | ||
} else { | ||
mysqli_close($link); | ||
header('Location: /account/password/?error=2'); | ||
header("Location: /account/password/?passworderror=2"); | ||
exit(); | ||
} | ||
} else { | ||
mysqli_close($link); | ||
header('Location: /account/password/?error=1'); | ||
header("Location: /account/password/?passworderror=1"); | ||
exit(); | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,108 @@ | ||
<?php include("{$_SERVER['DOCUMENT_ROOT']}/webassets/default.php");?> | ||
<title>Sekai: Account</title> | ||
<p class="subTitle" style="color:white;font-size:150%">Sekai > Account</p> | ||
<p>[<a href="/">Return</a>]<br> | ||
[<a href="/account/password/">Change Password</a>]<br> | ||
<form method="post" action="/access/preferences.php" style="font-family:Arial,Verdana,Tahoma;color:white;"> | ||
<input type="radio" name="linkstyle" value="0" required<?php if($_SESSION['linkstyle']==0){echo(' checked');}?>>4chan Style Hyperlinks<br> | ||
<input type="radio" name="linkstyle" value="1" required<?php if($_SESSION['linkstyle']==1){echo(' checked');}?>>YouTube Style Hyperlinks<br><br> | ||
<input type="radio" name="tilestyle" value="0" required<?php if($_SESSION['tilestyle']==0){echo(' checked');}?>>GIF Menu Tiles (Color)<br> | ||
<input type="radio" name="tilestyle" value="1" required<?php if($_SESSION['tilestyle']==1){echo(' checked');}?>>GIF Menu Tiles (Greyscale)<br> | ||
<input type="radio" name="tilestyle" value="2" required<?php if($_SESSION['tilestyle']==2){echo(' checked');}?>>PNG Menu Tiles<br><br> | ||
<input type="number" name="postsshown" value="<?php echo($_SESSION['postsshown']);?>" required min="5" max="50" style="max-width:3em;"> Threads shown on each 世界chan page<br><br> | ||
<input type="submit" value="Update Preferences"> | ||
</form> | ||
<?php | ||
include("{$_SERVER['DOCUMENT_ROOT']}/webassets/defaultHeader.php"); | ||
include("{$_SERVER['DOCUMENT_ROOT']}/webassets/defaultBody.php"); | ||
include("{$_SERVER['DOCUMENT_ROOT']}/webassets/defaultNavbar.php"); | ||
?> | ||
<br> | ||
<div class="row" style="justify-content:center;margin:0px;"> | ||
<div class="card-group" style="width:40rem;"> | ||
<div class="card"> | ||
<div class="card-header"> | ||
Change website preferences | ||
</div> | ||
<div class="card-block"> | ||
<form method="POST" action="/access/preferences.php"> | ||
<fieldset class="form-group"> | ||
<legend> | ||
Hyperlink style | ||
</legend> | ||
<div class="form-check"> | ||
<label class="form-check-label"> | ||
<input type="radio" class="form-check-input" name="linkstyle" value="0"<?php if($_SESSION["linkstyle"]==0){echo(" checked");}?>> | ||
4chan Style Hyperlinks | ||
</label> | ||
</div> | ||
<div class="form-check"> | ||
<label class="form-check-label"> | ||
<input type="radio" class="form-check-input" name="linkstyle" value="1"<?php if($_SESSION["linkstyle"]==1){echo(" checked");}?>> | ||
YouTube Style Hyperlinks | ||
</label> | ||
</div> | ||
</fieldset> | ||
<fieldset class="form-group"> | ||
<legend> | ||
Homepage tile style | ||
</legend> | ||
<div class="form-check"> | ||
<label class="form-check-label"> | ||
<input type="radio" class="form-check-input" name="tilestyle" value="0"<?php if($_SESSION["tilestyle"]==0){echo(" checked");}?>> | ||
Animated and colored tiles | ||
</label> | ||
</div> | ||
<div class="form-check"> | ||
<label class="form-check-label"> | ||
<input type="radio" class="form-check-input" name="tilestyle" value="1"<?php if($_SESSION["tilestyle"]==1){echo(" checked");}?>> | ||
Animated and grey tiles | ||
</label> | ||
</div> | ||
<div class="form-check"> | ||
<label class="form-check-label"> | ||
<input type="radio" class="form-check-input" name="tilestyle" value="2"<?php if($_SESSION["tilestyle"]==2){echo(" checked");}?>> | ||
Static tiles | ||
</label> | ||
</div> | ||
</fieldset> | ||
<fieldset class="form-group"> | ||
<legend> | ||
世界chan threads per page | ||
</legend> | ||
<div class="form-check"> | ||
<label class="form-check-label"> | ||
<input type="number" class="form-check-input" name="postsshown" value="<?php echo("{$_SESSION["postsshown"]}");?>"> | ||
posts | ||
</label> | ||
</div> | ||
</fieldset> | ||
<input type="submit" class="btn btn-success" value="Update preferences"> | ||
</form> | ||
</div> | ||
</div> | ||
<br> | ||
<div class="card"> | ||
<div class="card-header"> | ||
Change password | ||
</div> | ||
<div class="card-block"> | ||
<form method="POST" action="/access/password.php"> | ||
<fieldset class="form-group"> | ||
<legend> | ||
Current password | ||
</legend> | ||
<div class="form-check"> | ||
<input type="password" class="form-control" name="oldpassword" id="oldpassword" maxlength="16" required> | ||
</div> | ||
</fieldset> | ||
<fieldset class="form-group"> | ||
<legend> | ||
New password | ||
</legend> | ||
<div class="form-check"> | ||
<input type="password" class="form-control" name="newpassword" id="newpassword" maxlength="16" required> | ||
</div> | ||
</fieldset> | ||
<fieldset class="form-group"> | ||
<legend> | ||
Confirm password | ||
</legend> | ||
<div class="form-check"> | ||
<input type="password" class="form-control" name="confirmpassword" id="confirmpassword" maxlength="16" required> | ||
</div> | ||
</fieldset> | ||
<input type="submit" class="btn btn-success" value="Update password"> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.