Skip to content

Commit

Permalink
first commit. just starting
Browse files Browse the repository at this point in the history
starting basic structure. have preliminary db set up. nothing really
done yet.
  • Loading branch information
drakeapps committed Oct 3, 2012
0 parents commit 5f38cc2
Show file tree
Hide file tree
Showing 9 changed files with 104 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

.DS_Store
Empty file added api.php
Empty file.
18 changes: 18 additions & 0 deletions config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php



// SETUP
// Database info
$dbhost = "localhost";
$dbuser = "redditsync";
$dbpass = "GYn5UZGGqGWU9PzA";
$dbname = "redditsync";


$mysql = new mysqli($dbhost, $dbuser, $dbpass, $dbname);
if($mysql->connect_errno) {
echo "database connection failure <!-- ".$mysql->connect_error." -->";
die;
}

Empty file added create.php
Empty file.
8 changes: 8 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php



// check if user is logged in.
function checkLoggedIn($authid, $userid, $authhash) {

}
Empty file added index.php
Empty file.
Empty file added login.php
Empty file.
76 changes: 76 additions & 0 deletions mysql.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
--
-- Database: `redditsync`
--

-- --------------------------------------------------------

--
-- Table structure for table `authcodes`
--

CREATE TABLE IF NOT EXISTS `authcodes` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`userid` int(10) unsigned NOT NULL,
`username` varchar(30) NOT NULL,
`authhash` text NOT NULL,
`description` text NOT NULL,
`lastused` int(10) unsigned DEFAULT NULL,
`created` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `userid` (`userid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `links`
--

CREATE TABLE IF NOT EXISTS `links` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`linkid` varchar(20) NOT NULL,
`userid` int(10) unsigned NOT NULL,
`lastvisit` int(10) unsigned NOT NULL,
`lastcommenttime` int(10) unsigned NOT NULL,
`lastcommentcount` int(6) unsigned NOT NULL,
`firstvisit` int(10) unsigned NOT NULL,
`lastcall` text NOT NULL,
PRIMARY KEY (`id`),
KEY `linkid` (`linkid`,`userid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `logincodes`
--

CREATE TABLE IF NOT EXISTS `logincodes` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`userid` int(10) unsigned NOT NULL,
`authhash` text NOT NULL,
`lastlogin` int(10) unsigned NOT NULL,
`created` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `user`
--

CREATE TABLE IF NOT EXISTS `user` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(30) NOT NULL,
`passhash` text NOT NULL,
`salt` varchar(30) NOT NULL,
`lastlogin` int(10) unsigned DEFAULT NULL,
`lastactivity` int(10) unsigned DEFAULT NULL,
`lastip` varchar(15) DEFAULT NULL,
`numlink` int(8) unsigned DEFAULT NULL,
`numcomments` int(8) unsigned DEFAULT NULL,
`loginattempts` int(2) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Empty file added register.php
Empty file.

0 comments on commit 5f38cc2

Please sign in to comment.