From d65c3cc7605c08d4c6fad5e244824c2554a1003b Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 14 Sep 2008 16:42:03 +0000 Subject: Series: Removed 'personal' field Refs #53 --- series/trunk/admin/addsub.php | 2 +- series/trunk/admin/editsub.php | 2 +- series/trunk/includes/instadisc.php | 6 +++--- series/trunk/index.php | 9 +++------ series/trunk/instadisc.sql | 3 +-- 5 files changed, 9 insertions(+), 13 deletions(-) (limited to 'series/trunk') 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'])) { showForm($_POST['id'], $_POST['title'], $_POST['url'], $_POST['category'], $_POST['password'], $errors); } else { - instaDisc_initSubscription($_SESSION['username'], $_POST['id'], $_POST['url'], $_POST['title'], $_POST['category'], $_POST['personal'], $_POST['password']); + instaDisc_initSubscription($_SESSION['username'], $_POST['id'], $_POST['url'], $_POST['title'], $_POST['category'], $_POST['password']); $template = new FITemplate('addedsub'); $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'])) { showForm($_POST['id'], $_POST['title'], $_POST['url'], $_POST['category'], $_POST['password'], $errors); } else { - instaDisc_initSubscription($_SESSION['username'], $_POST['id'], $_POST['url'], $_POST['title'], $_POST['category'], $_POST['personal'], $_POST['password']); + instaDisc_initSubscription($_SESSION['username'], $_POST['id'], $_POST['url'], $_POST['title'], $_POST['category'], $_POST['password']); $template = new FITemplate('editedsub'); $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) $setconfig3 = mysql_fetch_array($setconfig2); } -function instaDisc_initSubscription($username, $subscriptionID, $subscriptionURL, $subscriptionTitle, $subscriptionCategory, $subscriptionPersonal, $subscriptionPassword) +function instaDisc_initSubscription($username, $subscriptionID, $subscriptionURL, $subscriptionTitle, $subscriptionCategory, $subscriptionPassword) { $getuser = "SELECT * FROM users WHERE username = \"" . $username . "\""; $getuser2 = mysql_query($getuser); @@ -84,10 +84,10 @@ function instaDisc_initSubscription($username, $subscriptionID, $subscriptionURL return false; } - $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) . "\""; + $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) . "\""; $setsub2 = mysql_query($setsub); } else { - $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) . "\")"; + $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) . "\")"; $inssub2 = mysql_query($inssub); } 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')); $subs = instaDisc_getAllSubscriptions(); foreach ($subs as $name => $value) { - if ($value['personal'] == 'false') - { - $template->adds_block('SUBSCRIPTIONS', array( 'IDENTITY' => $value['identity'], - 'TITLE' => $value['title'], - 'CATEGORY' => $value['category'])); - } + $template->adds_block('SUBSCRIPTIONS', array( 'IDENTITY' => $value['identity'], + 'TITLE' => $value['title'], + 'CATEGORY' => $value['category'])); } $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 @@ -- http://www.phpmyadmin.net -- -- Host: localhost --- Generation Time: Sep 14, 2008 at 10:12 AM +-- Generation Time: Sep 14, 2008 at 12:41 PM -- Server version: 5.0.51 -- PHP Version: 5.2.4-2ubuntu5.3 -- @@ -37,7 +37,6 @@ CREATE TABLE `subscriptions` ( `url` varchar(255) NOT NULL, `category` varchar(255) NOT NULL, `password` varchar(255) NOT NULL, - `personal` varchar(5) NOT NULL, `username` varchar(255) NOT NULL, `lastUpdated` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, PRIMARY KEY (`id`), -- cgit 1.4.1