diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-09-14 16:42:03 +0000 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-09-14 16:42:03 +0000 |
commit | d65c3cc7605c08d4c6fad5e244824c2554a1003b (patch) | |
tree | 2baf78216aa4ae5efc3edd165174f51a9674a973 /series | |
parent | e71ae5c0492257b6fd74443b9f3f8575a63f9228 (diff) | |
download | instadisc-d65c3cc7605c08d4c6fad5e244824c2554a1003b.tar.gz instadisc-d65c3cc7605c08d4c6fad5e244824c2554a1003b.tar.bz2 instadisc-d65c3cc7605c08d4c6fad5e244824c2554a1003b.zip |
Series: Removed 'personal' field
Refs #53
Diffstat (limited to 'series')
-rw-r--r-- | series/trunk/admin/addsub.php | 2 | ||||
-rw-r--r-- | series/trunk/admin/editsub.php | 2 | ||||
-rw-r--r-- | series/trunk/includes/instadisc.php | 6 | ||||
-rw-r--r-- | series/trunk/index.php | 9 | ||||
-rw-r--r-- | series/trunk/instadisc.sql | 3 |
5 files changed, 9 insertions, 13 deletions
diff --git a/series/trunk/admin/addsub.php b/series/trunk/admin/addsub.php index 2ba2bb5..4fdd907 100644 --- a/series/trunk/admin/addsub.php +++ b/series/trunk/admin/addsub.php | |||
@@ -50,7 +50,7 @@ if (!isset($_GET['submit'])) | |||
50 | { | 50 | { |
51 | showForm($_POST['id'], $_POST['title'], $_POST['url'], $_POST['category'], $_POST['password'], $errors); | 51 | showForm($_POST['id'], $_POST['title'], $_POST['url'], $_POST['category'], $_POST['password'], $errors); |
52 | } else { | 52 | } else { |
53 | instaDisc_initSubscription($_SESSION['username'], $_POST['id'], $_POST['url'], $_POST['title'], $_POST['category'], $_POST['personal'], $_POST['password']); | 53 | instaDisc_initSubscription($_SESSION['username'], $_POST['id'], $_POST['url'], $_POST['title'], $_POST['category'], $_POST['password']); |
54 | 54 | ||
55 | $template = new FITemplate('addedsub'); | 55 | $template = new FITemplate('addedsub'); |
56 | $template->add('SITENAME', instaDisc_getConfig('siteName')); | 56 | $template->add('SITENAME', instaDisc_getConfig('siteName')); |
diff --git a/series/trunk/admin/editsub.php b/series/trunk/admin/editsub.php index 20c9001..e49a971 100644 --- a/series/trunk/admin/editsub.php +++ b/series/trunk/admin/editsub.php | |||
@@ -74,7 +74,7 @@ if (!isset($_GET['submit'])) | |||
74 | { | 74 | { |
75 | showForm($_POST['id'], $_POST['title'], $_POST['url'], $_POST['category'], $_POST['password'], $errors); | 75 | showForm($_POST['id'], $_POST['title'], $_POST['url'], $_POST['category'], $_POST['password'], $errors); |
76 | } else { | 76 | } else { |
77 | instaDisc_initSubscription($_SESSION['username'], $_POST['id'], $_POST['url'], $_POST['title'], $_POST['category'], $_POST['personal'], $_POST['password']); | 77 | instaDisc_initSubscription($_SESSION['username'], $_POST['id'], $_POST['url'], $_POST['title'], $_POST['category'], $_POST['password']); |
78 | 78 | ||
79 | $template = new FITemplate('editedsub'); | 79 | $template = new FITemplate('editedsub'); |
80 | $template->add('SITENAME', instaDisc_getConfig('siteName')); | 80 | $template->add('SITENAME', instaDisc_getConfig('siteName')); |
diff --git a/series/trunk/includes/instadisc.php b/series/trunk/includes/instadisc.php index fcf93e1..bfaaf7f 100644 --- a/series/trunk/includes/instadisc.php +++ b/series/trunk/includes/instadisc.php | |||
@@ -67,7 +67,7 @@ function instaDisc_changePassword($username, $password) | |||
67 | $setconfig3 = mysql_fetch_array($setconfig2); | 67 | $setconfig3 = mysql_fetch_array($setconfig2); |
68 | } | 68 | } |
69 | 69 | ||
70 | function instaDisc_initSubscription($username, $subscriptionID, $subscriptionURL, $subscriptionTitle, $subscriptionCategory, $subscriptionPersonal, $subscriptionPassword) | 70 | function instaDisc_initSubscription($username, $subscriptionID, $subscriptionURL, $subscriptionTitle, $subscriptionCategory, $subscriptionPassword) |
71 | { | 71 | { |
72 | $getuser = "SELECT * FROM users WHERE username = \"" . $username . "\""; | 72 | $getuser = "SELECT * FROM users WHERE username = \"" . $username . "\""; |
73 | $getuser2 = mysql_query($getuser); | 73 | $getuser2 = mysql_query($getuser); |
@@ -84,10 +84,10 @@ function instaDisc_initSubscription($username, $subscriptionID, $subscriptionURL | |||
84 | return false; | 84 | return false; |
85 | } | 85 | } |
86 | 86 | ||
87 | $setsub = "UPDATE subscriptions SET title = \"" . mysql_real_escape_string($subscriptionTitle) . "\", url = \"" . mysql_real_escape_string($subscriptionURL) . "\", category = \"" . mysql_real_escape_string($subscriptionCategory) . "\", personal = \"" . mysql_real_escape_string($subscriptionPersonal) . "\", password = \"" . mysql_real_escape_string($subscriptionPassword) . "\" WHERE identity = \"" . mysql_real_escape_string($subscriptionID) . "\""; | 87 | $setsub = "UPDATE subscriptions SET title = \"" . mysql_real_escape_string($subscriptionTitle) . "\", url = \"" . mysql_real_escape_string($subscriptionURL) . "\", category = \"" . mysql_real_escape_string($subscriptionCategory) . "\", password = \"" . mysql_real_escape_string($subscriptionPassword) . "\" WHERE identity = \"" . mysql_real_escape_string($subscriptionID) . "\""; |
88 | $setsub2 = mysql_query($setsub); | 88 | $setsub2 = mysql_query($setsub); |
89 | } else { | 89 | } else { |
90 | $inssub = "INSERT INTO subscriptions (identity, title, url, category, personal, username, password) VALUES (\"" . mysql_real_escape_string($subscriptionID) . "\",\"" . mysql_real_escape_string($subscriptionTitle) . "\",\"" . mysql_real_escape_string($subscriptionURL) . "\",\"" . mysql_real_escape_string($subscriptionCategory) . "\",\"" . mysql_real_escape_string($subscriptionPersonal) . "\",\"" . mysql_real_escape_string($username) . "\",\"" . mysql_real_escape_string($subscriptionPassword) . "\")"; | 90 | $inssub = "INSERT INTO subscriptions (identity, title, url, category, username, password) VALUES (\"" . mysql_real_escape_string($subscriptionID) . "\",\"" . mysql_real_escape_string($subscriptionTitle) . "\",\"" . mysql_real_escape_string($subscriptionURL) . "\",\"" . mysql_real_escape_string($subscriptionCategory) . "\",\"" . mysql_real_escape_string($username) . "\",\"" . mysql_real_escape_string($subscriptionPassword) . "\")"; |
91 | $inssub2 = mysql_query($inssub); | 91 | $inssub2 = mysql_query($inssub); |
92 | } | 92 | } |
93 | 93 | ||
diff --git a/series/trunk/index.php b/series/trunk/index.php index 9d8cb05..76eb9ff 100644 --- a/series/trunk/index.php +++ b/series/trunk/index.php | |||
@@ -10,12 +10,9 @@ $template->add('SITENAME', instaDisc_getConfig('siteName')); | |||
10 | $subs = instaDisc_getAllSubscriptions(); | 10 | $subs = instaDisc_getAllSubscriptions(); |
11 | foreach ($subs as $name => $value) | 11 | foreach ($subs as $name => $value) |
12 | { | 12 | { |
13 | if ($value['personal'] == 'false') | 13 | $template->adds_block('SUBSCRIPTIONS', array( 'IDENTITY' => $value['identity'], |
14 | { | 14 | 'TITLE' => $value['title'], |
15 | $template->adds_block('SUBSCRIPTIONS', array( 'IDENTITY' => $value['identity'], | 15 | 'CATEGORY' => $value['category'])); |
16 | 'TITLE' => $value['title'], | ||
17 | 'CATEGORY' => $value['category'])); | ||
18 | } | ||
19 | } | 16 | } |
20 | 17 | ||
21 | $template->display(); | 18 | $template->display(); |
diff --git a/series/trunk/instadisc.sql b/series/trunk/instadisc.sql index bb2018c..3e5071d 100644 --- a/series/trunk/instadisc.sql +++ b/series/trunk/instadisc.sql | |||
@@ -3,7 +3,7 @@ | |||
3 | -- http://www.phpmyadmin.net | 3 | -- http://www.phpmyadmin.net |
4 | -- | 4 | -- |
5 | -- Host: localhost | 5 | -- Host: localhost |
6 | -- Generation Time: Sep 14, 2008 at 10:12 AM | 6 | -- Generation Time: Sep 14, 2008 at 12:41 PM |
7 | -- Server version: 5.0.51 | 7 | -- Server version: 5.0.51 |
8 | -- PHP Version: 5.2.4-2ubuntu5.3 | 8 | -- PHP Version: 5.2.4-2ubuntu5.3 |
9 | -- | 9 | -- |
@@ -37,7 +37,6 @@ CREATE TABLE `subscriptions` ( | |||
37 | `url` varchar(255) NOT NULL, | 37 | `url` varchar(255) NOT NULL, |
38 | `category` varchar(255) NOT NULL, | 38 | `category` varchar(255) NOT NULL, |
39 | `password` varchar(255) NOT NULL, | 39 | `password` varchar(255) NOT NULL, |
40 | `personal` varchar(5) NOT NULL, | ||
41 | `username` varchar(255) NOT NULL, | 40 | `username` varchar(255) NOT NULL, |
42 | `lastUpdated` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, | 41 | `lastUpdated` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, |
43 | PRIMARY KEY (`id`), | 42 | PRIMARY KEY (`id`), |