From a1d2c9a53df58e2cd3527a20a9fb59c0074104ae Mon Sep 17 00:00:00 2001 From: MartyniP Date: Thu, 27 Sep 2012 13:43:51 +0100 Subject: [PATCH] Updated sql file --- admin/users.php | 2 ++ phurl3db.sql | 28 +++++++++++++++++++++++----- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/admin/users.php b/admin/users.php index 0ace2f6..ced7c23 100644 --- a/admin/users.php +++ b/admin/users.php @@ -36,6 +36,7 @@ $_ERROR[] = "User suspened
"; mysql_query("UPDATE ".DB_PREFIX."users SET suspended='1' WHERE id='".$sId."'"); mysql_query("DELETE FROM ".DB_PREFIX."session WHERE uId='".$sId."'"); + header('Location: '.get_phurl_option('site_url').'/admin/users.php'); } } } @@ -54,6 +55,7 @@ } else { $_ERROR[] = "User unsuspened
"; mysql_query("UPDATE ".DB_PREFIX."users SET suspended='0' WHERE id='".$sId."'"); + header('Location: '.get_phurl_option('site_url').'/admin/users.php'); } } } diff --git a/phurl3db.sql b/phurl3db.sql index 73bd286..9211fd1 100644 --- a/phurl3db.sql +++ b/phurl3db.sql @@ -2,11 +2,23 @@ -- Database: `phurl3` -- -- --- Dump from 22:01 22/09/2012 by Martyn Watton +-- Dump from 13:43 27/09/2012 by Martyn Watton -- -- -------------------------------------------------------- +-- +-- Table structure for table `phurl_api` +-- + +CREATE TABLE IF NOT EXISTS `phurl_api` ( + `apiKey` varchar(32) NOT NULL, + `time` int(11) NOT NULL, + `remain` int(11) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + -- -- Table structure for table `phurl_options` -- @@ -23,10 +35,12 @@ CREATE TABLE IF NOT EXISTS `phurl_options` ( INSERT INTO `phurl_options` (`option`, `value`) VALUES ('shortcode_type', 'r'), ('site_url', 'http://phurl3.lo'), -('site_title', 'Lorem Ipsum URL Shortener'), +('site_title', 'phurl 3.0'), ('site_slogan', 'URLs made shorter, URLs made simpler.'), ('theme_path', 'includes/themes/default/'), -('phurl_version', '3.0'); +('phurl_version', '3.0'), +('api_limit', '250'), +('phurl_numericalversion', '300'); -- -------------------------------------------------------- @@ -43,6 +57,8 @@ CREATE TABLE IF NOT EXISTS `phurl_session` ( PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; +-- -------------------------------------------------------- + -- -- Table structure for table `phurl_settings` -- @@ -119,6 +135,7 @@ CREATE TABLE IF NOT EXISTS `phurl_users` ( `password` varchar(64) NOT NULL, `apiKey` varchar(32) NOT NULL, `type` enum('n','a') NOT NULL, + `suspended` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; @@ -126,5 +143,6 @@ CREATE TABLE IF NOT EXISTS `phurl_users` ( -- Dumping data for table `phurl_users` -- -INSERT INTO `phurl_users` (`id`, `uname`, `fname`, `lname`, `email`, `password`, `apiKey`, `type`) VALUES -(1, '', '', '', '', '', '20GigZMpBL32vIaY', 'a'); +INSERT INTO `phurl_users` (`id`, `uname`, `fname`, `lname`, `email`, `password`, `apiKey`, `type`, `suspended`) VALUES +(1, '', '', '', '', '', '20GigZMpBL32vIaY', 'a', '0'); +