Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
$IsAuth = false; | |
$User = array(); | |
// connect to database | |
try { $db = new PDO('sqlite:'.BASEPATH.DBNAME); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); } catch (PDOException $e) { die('Unable to open database. SQLite reported: '.$e->getMessage()); } | |
// create table if it doesn't already exist | |
if (count($db->query('SELECT 1 FROM sqlite_master WHERE name = \'users\' AND type=\'table\'')->fetchAll()) == 0) { $db->exec("CREATE TABLE users (id INTEGER NOT NULL,name VARCHAR(255) DEFAULT '',email VARCHAR(255) DEFAULT '',token VARCHAR(255) DEFAULT '',vars TEXT,created INTEGER,status INTEGER NOT NULL DEFAULT 0,PRIMARY KEY (id));"); } | |
// Set token for user and send email |
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
[{"articles": [[2010, 6], [2011, 10], [2012, 11], [2013, 23], [2006, 1]], | |
"total": 51, "name": "The Journal of neuroscience"}, | |
{"articles": [[2008, 1], [2010, 3], [2011, 4], [2012, 17], [2013, 10]], | |
"total": 35, "name": "Nature neuroscience"}] |
NewerOlder