summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2011-06-03 11:41:41 -0700
committerJesse Morgan <jesse@jesterpm.net ; true>2011-06-03 11:41:41 -0700
commit26f071d6cca5c3a8b9f3b18aa010f2d98236f804 (patch)
tree1b939a1dd2366065d9913c38ad2437f3302a32d1
parent6b39990a2e1e2fd1a051f238b9574900df662d30 (diff)
Cleaned up old file
-rw-r--r--htdocs/moderate/src/accounts.inc.php67
1 files changed, 0 insertions, 67 deletions
diff --git a/htdocs/moderate/src/accounts.inc.php b/htdocs/moderate/src/accounts.inc.php
deleted file mode 100644
index fac6c7c..0000000
--- a/htdocs/moderate/src/accounts.inc.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-/* $Id: accounts.inc.php 134 2011-03-08 23:35:57Z jessemorgan $ */
-
-function getAccount($id) {
- $query = "SELECT * FROM jpm_users WHERE"
- . "`id`='$id' OR `email`='$id'";
-
- $db = getDatabase();
-
- $results = array();
-
- try {
- $results = $db->fetchAssocRow($query);
-
- } catch (Cif_Database_Exception $e) {
- $results = false;
- }
-
- return $results;
-}
-
-function updatePassword($id, $password) {
- $db = getDatabase();
-
- $row['password'] = sha1($password);
-
- $db->update('jpm_users', $row, "WHERE `id`='$id'");
-}
-
-function getAccounts($s) {
- $query = "SELECT * FROM jpm_users";
-
- if (!is_null($s)) {
- $s = addslashes($s);
- $query .= " WHERE name LIKE '%$s%' OR email LIKE '%$s%'";
- }
-
- $query .= " ORDER BY name";
-
- $db = getDatabase();
-
- $results = array();
-
- try {
- $results = $db->fetchAssocRows($query);
-
- } catch (Cif_Database_Exception $e) {
- $results = array();
- }
-
- return $results;
-}
-
-function generatePassword() {
- $alphabet = "ABCDEFGHJKLMNPQRSTUVWXYZabcdefghjkmnpqrstuvwxyz123456789!@#$%*()";
- $length = strlen($alphabet);
-
- $password = '';
- for ($i = 0; $i < 8; $i++) {
- $pos = rand(0, $length - 1);
- $password .= substr($alphabet, $pos, 1);
- }
-
- return $password;
-}
-
-?>