From 1fbe28f7dd011e4f8fff7440573b11803406a6fe Mon Sep 17 00:00:00 2001 From: Chaoyi Zha Date: Sun, 31 May 2015 15:39:47 -0400 Subject: [PATCH 1/3] Remove duplicate keys --- setup.php | 110 +++++++++++++++++++++++++++--------------------------- 1 file changed, 54 insertions(+), 56 deletions(-) diff --git a/setup.php b/setup.php index f5e889f..7ddcd4d 100644 --- a/setup.php +++ b/setup.php @@ -178,68 +178,66 @@ `quota` int(11) NOT NULL, PRIMARY KEY (`apikey`), UNIQUE KEY `email` (`email`), - KEY `email_2` (`email`), - KEY `valid` (`valid`), - KEY `aindex` (`valid`,`email`) + KEY `email` (`email`), + KEY `valid` (`valid`) );'); sqlrun(' - CREATE TABLE `auth` ( - `username` varchar(50) NOT NULL, - `password` text NOT NULL, - `email` varchar(65) NOT NULL, - `rkey` varchar(65) NOT NULL, - `role` varchar(37) NOT NULL, - `valid` tinyint(1) NOT NULL DEFAULT "0", - `uid` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, - `theme` varchar(65) NOT NULL, - `ip` tinytext NOT NULL, - KEY `valid` (`valid`), - KEY `email3` (`email`), - KEY `username2` (`username`) - );'); + CREATE TABLE `auth` ( + `username` varchar(50) NOT NULL, + `password` text NOT NULL, + `email` varchar(65) NOT NULL, + `rkey` varchar(65) NOT NULL, + `role` varchar(37) NOT NULL, + `valid` tinyint(1) NOT NULL DEFAULT "0", + `uid` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, + `theme` varchar(65) NOT NULL, + `ip` tinytext NOT NULL, + KEY `valid` (`valid`), + KEY `email` (`email`), + KEY `username` (`username`) + );'); sqlrun(' - CREATE TABLE `redirinfo` ( - `rurl` text NOT NULL, - `rid` smallint(200) NOT NULL AUTO_INCREMENT, - `baseval` varchar(30) NOT NULL, - `ip` varchar(90) NOT NULL, - `iscustom` varchar(4) NOT NULL, - `user` tinytext NOT NULL, - `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `country` varchar(10) NOT NULL, - `lkey` tinytext NOT NULL, - `clicks` int(11) NOT NULL, - `pw` int(120) NOT NULL, - `etc` text, - `etc2` text, - PRIMARY KEY (`rid`), - KEY `baseval` (`baseval`), - KEY `baseval_2` (`baseval`), - KEY `ip` (`ip`), - KEY `iscustom` (`iscustom`) - );'); + CREATE TABLE `redirinfo` ( + `rurl` text NOT NULL, + `rid` smallint(200) NOT NULL AUTO_INCREMENT, + `baseval` varchar(30) NOT NULL, + `ip` varchar(90) NOT NULL, + `iscustom` varchar(4) NOT NULL, + `user` tinytext NOT NULL, + `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `country` varchar(10) NOT NULL, + `lkey` tinytext NOT NULL, + `clicks` int(11) NOT NULL, + `pw` int(120) NOT NULL, + `etc` text, + `etc2` text, + PRIMARY KEY (`rid`), + KEY `baseval` (`baseval`), + KEY `ip` (`ip`), + KEY `iscustom` (`iscustom`) + );'); sqlrun(' - CREATE TABLE `redirinfo-temp` ( - `rurl` text NOT NULL, - `rid` smallint(200) NOT NULL AUTO_INCREMENT, - `baseval` varchar(30) NOT NULL, - `ip` varchar(90) NOT NULL, - `iscustom` varchar(4) NOT NULL, - `user` tinytext NOT NULL, - `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `country` tinytext NOT NULL, - `theme` varchar(65) NOT NULL, - `clicks` int(11) NOT NULL, - `pw` int(120) NOT NULL, - `etc` text, - `etc2` text, - PRIMARY KEY (`rid`), - KEY `baseval` (`baseval`), - KEY `ip` (`ip`), - KEY `iscustom` (`iscustom`) - );'); + CREATE TABLE `redirinfo-temp` ( + `rurl` text NOT NULL, + `rid` smallint(200) NOT NULL AUTO_INCREMENT, + `baseval` varchar(30) NOT NULL, + `ip` varchar(90) NOT NULL, + `iscustom` varchar(4) NOT NULL, + `user` tinytext NOT NULL, + `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `country` tinytext NOT NULL, + `theme` varchar(65) NOT NULL, + `clicks` int(11) NOT NULL, + `pw` int(120) NOT NULL, + `etc` text, + `etc2` text, + PRIMARY KEY (`rid`), + KEY `baseval` (`baseval`), + KEY `ip` (`ip`), + KEY `iscustom` (`iscustom`) + );'); $acctpass = hashpass($_POST['acctpass']); $nr = sha1(rstr(50)); sqlrun("INSERT INTO auth (username,email,password,rkey,valid,role) VALUES ('{$_POST['acct']}','{$_POST['acctemail']}','{$acctpass}','{$nr}','1','adm') "); From e551a16c152694a39006590bcb8455a003eda24e Mon Sep 17 00:00:00 2001 From: Chaoyi Zha Date: Sun, 31 May 2015 15:51:30 -0400 Subject: [PATCH 2/3] Resize custom URL box --- css/main.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/css/main.css b/css/main.css index 50f86b8..c4f0fea 100644 --- a/css/main.css +++ b/css/main.css @@ -17,3 +17,7 @@ footer { padding-top: 20px; padding-bottom: 20px; } +.form-control#custom { + width: 120px; + display: inline; +} From 684e474c1ceb9acd9814b0a475401f1f3a826795 Mon Sep 17 00:00:00 2001 From: Chaoyi Zha Date: Sun, 31 May 2015 15:53:00 -0400 Subject: [PATCH 3/3] Add bootstrap to custom url box --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index b460707..96fbed7 100644 --- a/index.php +++ b/index.php @@ -22,7 +22,7 @@ require_once('layout-headerlg.php'); Secret

-
Customize link:

/


+
Customize link:

/


Check Availability

Link Options