aboutsummaryrefslogtreecommitdiff
path: root/admin/settings
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2011-04-17 20:13:07 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2011-04-17 20:13:07 -0400
commit0077cb99704fe863cf731fc5cab792af2ede96c2 (patch)
treedd68f44971aa2aee821f588d33b250dcd2fe57e3 /admin/settings
parente8b28c5e910d92cbec3d4baa6e98f025e8418d28 (diff)
downloadbayonetcms-0077cb99704fe863cf731fc5cab792af2ede96c2.tar.gz
Backporting retarded amount of changes outside of version control
Diffstat (limited to 'admin/settings')
-rw-r--r--admin/settings/functions.php152
-rw-r--r--admin/settings/index.php104
-rw-r--r--admin/settings/style.css126
3 files changed, 191 insertions, 191 deletions
diff --git a/admin/settings/functions.php b/admin/settings/functions.php
index 1e3ada4..74155fa 100644
--- a/admin/settings/functions.php
+++ b/admin/settings/functions.php
@@ -1,77 +1,77 @@
-<?php
-/**
- * Bayonet Content Management System
- * Copyright (C) 2008 Joseph Hunkeler & Evan O'Connell
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
- * Note to anyone feeling the need to edit this file...
- * You MUST declare $db as global inside your functions in order access MySQL from here.
- */
-
-
-function changePassword(){
-echo "<script type=\"text/javascript\" src=\"scripts/mocha.js\"></script>";
- global $db;
-
- if(isset($_POST['processed']))
- {
- $password = $_POST['password'];
- $confirm = $_POST['confirm'];
-
- if($password != $confirm){
- ReportError("The passwords you entered did not match.");
- PageRedirect(3, "?op=settings&change=password");
- return;
- }else if(strlen($password)<6){
- ReportError("The password you entered is less than 6 characters.");
- PageRedirect(3, "?op=settings&change=password");
- return;
- }
- $newpassword = crypt(md5($password),'iamnotadirtywhorebitch');
- $username = $_SESSION['username'];
- $db->Query("UPDATE `bayonet_users` SET `password` = '$newpassword' WHERE `username` = '$username' LIMIT 1");
-
- echo "Your password has successfully been changed.";
- PageRedirect(3,"?op=settings");
- return;
- }
-?>
-<div id="pwordCont">
-<form method="POST" action="<?php $_SERVER['PHP_SELF']?>">
-<h1>Change Your Password</h1>
- <table>
- <tr>
- <td class="right">Password: </td>
- <td><input type="password" id="inputPassword" name="password" style="width:200px;" /></td>
- <td>
- <table cellspacing="0">
- <tr><td>Password Strength:</td><td id="complexity"></td></tr>
- <tr><td colspan="2"><div class="outer"><div id="rating"></div></div></td></tr>
- </table>
- </td>
- </tr>
- <tr><td></td><td style="text-align:center; color:#626262;">Minimum of 6 Characters</td><td></td></tr>
- <tr>
- <td>Confirm Password: </td>
- <td><input type="password" name="confirm" style="width:200px;" /></td>
- </tr>
- <tr><td colspan="2"><input type="submit" value="Change Password" name="processed" /></td>
- </table>
-</form>
-</div>
-<?php
+<?php
+/**
+ * Bayonet Content Management System
+ * Copyright (C) 2008 Joseph Hunkeler & Evan O'Connell
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * Note to anyone feeling the need to edit this file...
+ * You MUST declare $db as global inside your functions in order access MySQL from here.
+ */
+
+
+function changePassword(){
+echo "<script type=\"text/javascript\" src=\"scripts/mocha.js\"></script>";
+ global $db;
+
+ if(isset($_POST['processed']))
+ {
+ $password = $_POST['password'];
+ $confirm = $_POST['confirm'];
+
+ if($password != $confirm){
+ ReportError("The passwords you entered did not match.");
+ PageRedirect(3, "?op=settings&change=password");
+ return;
+ }else if(strlen($password)<6){
+ ReportError("The password you entered is less than 6 characters.");
+ PageRedirect(3, "?op=settings&change=password");
+ return;
+ }
+ $newpassword = crypt(md5($password),'iamnotadirtywhorebitch');
+ $username = $_SESSION['username'];
+ $db->Query("UPDATE `bayonet_users` SET `password` = '$newpassword' WHERE `username` = '$username' LIMIT 1");
+
+ echo "Your password has successfully been changed.";
+ PageRedirect(3,"?op=settings");
+ return;
+ }
+?>
+<div id="pwordCont">
+<form method="POST" action="<?php $_SERVER['PHP_SELF']?>">
+<h1>Change Your Password</h1>
+ <table>
+ <tr>
+ <td class="right">Password: </td>
+ <td><input type="password" id="inputPassword" name="password" style="width:200px;" /></td>
+ <td>
+ <table cellspacing="0">
+ <tr><td>Password Strength:</td><td id="complexity"></td></tr>
+ <tr><td colspan="2"><div class="outer"><div id="rating"></div></div></td></tr>
+ </table>
+ </td>
+ </tr>
+ <tr><td></td><td style="text-align:center; color:#626262;">Minimum of 6 Characters</td><td></td></tr>
+ <tr>
+ <td>Confirm Password: </td>
+ <td><input type="password" name="confirm" style="width:200px;" /></td>
+ </tr>
+ <tr><td colspan="2"><input type="submit" value="Change Password" name="processed" /></td>
+ </table>
+</form>
+</div>
+<?php
} \ No newline at end of file
diff --git a/admin/settings/index.php b/admin/settings/index.php
index e3c8946..49ad784 100644
--- a/admin/settings/index.php
+++ b/admin/settings/index.php
@@ -1,53 +1,53 @@
-<?php
-/**
- * Bayonet Content Management System
- * Copyright (C) 2008 Joseph Hunkeler & Evan O'Connell
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
- ?>
- <link rel="stylesheet" type="text/css" href="settings/style.css" media="screen"/>
- <div style="text-align:left;"><h2>- Account Settings</h2>
- -<a href="?op=settings&change=password" >Change password</a>, email, name<br />
- </div>
-
- <?php
-
-if(!defined("ADMIN_FILE"))
-{
- die("Access denied.");
-}
-
-include $basedir.'settings/functions.php';
-
- if(isset($_GET['change']))
- {
- $change = $_GET['change'];
- if($change == "password"){
- changePassword();
- }else if($change == "email"){
- changeEmail();
- }
- //return;
- }
-
-
-?>
-
- </tr>
- </table>
-
-
-
+<?php
+/**
+ * Bayonet Content Management System
+ * Copyright (C) 2008 Joseph Hunkeler & Evan O'Connell
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+ ?>
+ <link rel="stylesheet" type="text/css" href="settings/style.css" media="screen"/>
+ <div style="text-align:left;"><h2>- Account Settings</h2>
+ -<a href="?op=settings&change=password" >Change password</a>, email, name<br />
+ </div>
+
+ <?php
+
+if(!defined("ADMIN_FILE"))
+{
+ die("Access denied.");
+}
+
+include $basedir.'settings/functions.php';
+
+ if(isset($_GET['change']))
+ {
+ $change = $_GET['change'];
+ if($change == "password"){
+ changePassword();
+ }else if($change == "email"){
+ changeEmail();
+ }
+ //return;
+ }
+
+
+?>
+
+ </tr>
+ </table>
+
+
+
\ No newline at end of file
diff --git a/admin/settings/style.css b/admin/settings/style.css
index 9969542..ff45ec6 100644
--- a/admin/settings/style.css
+++ b/admin/settings/style.css
@@ -1,64 +1,64 @@
-/* START>> PASSWORD STYLES */
-
-input{
- font-family: "Lucida Grande", "Verdana", sans-serif;
-}
-
-#pwordCont{
- font-family: "Lucida Grande", "Verdana", sans-serif;
- width: 820px;
- font-size:12px;
- margin-left: auto;
- margin-right: auto;
- padding: 50px 0 0 0;
-}
-
-#complexity{
- color: #000;
- font-size: 10px;
- text-align: center;
-}
-
-.outer {
- width:180px;
- height:5px;
- background-color: #CCC;
-}
-
-.default {
- height:5px;
- background-color: #CCC;
- width:0px;
-}
-.short {
- height:5px;
- background-color: #aa0033;
- width:15px;
-}
-.weak {
- height:5px;
- background-color: #aa0033;
- width:45px;
-}
-.good {
- height:5px;
- background-color: #6699cc;
- width:90px;
-}
-.strong {
- height:5px;
- background-color: #008000;
- width:135px;
-}
-.secure {
- height:5px;
- background-color: #008000;
- width:180px;
-}
-
-span.value{
- font-weight:bold;
- float: right;
-}
-
+/* START>> PASSWORD STYLES */
+
+input{
+ font-family: "Lucida Grande", "Verdana", sans-serif;
+}
+
+#pwordCont{
+ font-family: "Lucida Grande", "Verdana", sans-serif;
+ width: 820px;
+ font-size:12px;
+ margin-left: auto;
+ margin-right: auto;
+ padding: 50px 0 0 0;
+}
+
+#complexity{
+ color: #000;
+ font-size: 10px;
+ text-align: center;
+}
+
+.outer {
+ width:180px;
+ height:5px;
+ background-color: #CCC;
+}
+
+.default {
+ height:5px;
+ background-color: #CCC;
+ width:0px;
+}
+.short {
+ height:5px;
+ background-color: #aa0033;
+ width:15px;
+}
+.weak {
+ height:5px;
+ background-color: #aa0033;
+ width:45px;
+}
+.good {
+ height:5px;
+ background-color: #6699cc;
+ width:90px;
+}
+.strong {
+ height:5px;
+ background-color: #008000;
+ width:135px;
+}
+.secure {
+ height:5px;
+ background-color: #008000;
+ width:180px;
+}
+
+span.value{
+ font-weight:bold;
+ float: right;
+}
+
/* END>> PASSWORD STYLES */ \ No newline at end of file