-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
starting basic structure. have preliminary db set up. nothing really done yet.
- Loading branch information
0 parents
commit 5f38cc2
Showing
9 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
.DS_Store |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.