├── Andrew.jpg ├── Network_DB_2015-11-08.sql ├── Thumbs.db ├── captcha.php ├── checkuser.php ├── css ├── bootstrap-theme.css ├── bootstrap-theme.css.map ├── bootstrap-theme.min.css ├── bootstrap.css ├── bootstrap.css.map └── bootstrap.min.css ├── example26-1.php ├── explode.php ├── fonts ├── glyphicons-halflings-regular.eot ├── glyphicons-halflings-regular.svg ├── glyphicons-halflings-regular.ttf ├── glyphicons-halflings-regular.woff └── glyphicons-halflings-regular.woff2 ├── friends.php ├── functions.php ├── header.php ├── index.php ├── javascript.js ├── js ├── bootstrap.js ├── bootstrap.min.js └── npm.js ├── login.php ├── logout.php ├── members.php ├── messages.php ├── names.txt ├── popular.php ├── profile.php ├── robin.gif ├── securimage ├── AHGBold.ttf ├── LICENSE.txt ├── README.FONT.txt ├── README.md ├── README.txt ├── WavFile.php ├── audio │ ├── .htaccess │ ├── en │ │ ├── 0.wav │ │ ├── 1.wav │ │ ├── 10.wav │ │ ├── 11.wav │ │ ├── 12.wav │ │ ├── 13.wav │ │ ├── 14.wav │ │ ├── 15.wav │ │ ├── 16.wav │ │ ├── 17.wav │ │ ├── 18.wav │ │ ├── 19.wav │ │ ├── 2.wav │ │ ├── 20.wav │ │ ├── 3.wav │ │ ├── 4.wav │ │ ├── 5.wav │ │ ├── 6.wav │ │ ├── 7.wav │ │ ├── 8.wav │ │ ├── 9.wav │ │ ├── A.wav │ │ ├── B.wav │ │ ├── C.wav │ │ ├── D.wav │ │ ├── E.wav │ │ ├── F.wav │ │ ├── G.wav │ │ ├── H.wav │ │ ├── I.wav │ │ ├── J.wav │ │ ├── K.wav │ │ ├── L.wav │ │ ├── M.wav │ │ ├── MINUS.wav │ │ ├── N.wav │ │ ├── O.wav │ │ ├── P.wav │ │ ├── PLUS.wav │ │ ├── Q.wav │ │ ├── R.wav │ │ ├── S.wav │ │ ├── T.wav │ │ ├── TIMES.wav │ │ ├── U.wav │ │ ├── V.wav │ │ ├── W.wav │ │ ├── X.wav │ │ ├── Y.wav │ │ ├── Z.wav │ │ └── error.wav │ └── noise │ │ ├── check-point-1.wav │ │ ├── crowd-talking-1.wav │ │ ├── crowd-talking-6.wav │ │ ├── crowd-talking-7.wav │ │ └── kids-playing-1.wav ├── backgrounds │ ├── bg3.jpg │ ├── bg4.jpg │ ├── bg5.jpg │ └── bg6.png ├── captcha.html ├── database │ ├── .htaccess │ ├── index.html │ └── securimage.sq3 ├── example_form.ajax.php ├── example_form.php ├── images │ ├── audio_icon.png │ ├── loading.png │ └── refresh.png ├── securimage.css ├── securimage.js ├── securimage.php ├── securimage_play.php ├── securimage_play.swf ├── securimage_show.php └── words │ └── words.txt ├── setup.php ├── signup.php └── styles.css /Andrew.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/Andrew.jpg -------------------------------------------------------------------------------- /Network_DB_2015-11-08.sql: -------------------------------------------------------------------------------- 1 | # ************************************************************ 2 | # Sequel Pro SQL dump 3 | # Version 4499 4 | # 5 | # http://www.sequelpro.com/ 6 | # https://github.com/sequelpro/sequelpro 7 | # 8 | # Host: localhost (MySQL 5.5.38) 9 | # Database: Network_DB 10 | # Generation Time: 2015-11-08 19:59:18 +0000 11 | # ************************************************************ 12 | 13 | 14 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 15 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 16 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 17 | /*!40101 SET NAMES utf8 */; 18 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 19 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 20 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 21 | 22 | 23 | # Dump of table friends 24 | # ------------------------------------------------------------ 25 | 26 | DROP TABLE IF EXISTS `friends`; 27 | 28 | CREATE TABLE `friends` ( 29 | `user` varchar(16) DEFAULT NULL, 30 | `friend` varchar(16) DEFAULT NULL, 31 | KEY `user` (`user`(6)), 32 | KEY `friend` (`friend`(6)) 33 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 34 | 35 | LOCK TABLES `friends` WRITE; 36 | /*!40000 ALTER TABLE `friends` DISABLE KEYS */; 37 | 38 | INSERT INTO `friends` (`user`, `friend`) 39 | VALUES 40 | ('tom','andrew'), 41 | ('jeff','andrew'), 42 | ('andrew','gf'), 43 | ('jeff','gf'), 44 | ('timmy','gf'), 45 | ('tom','gf'), 46 | ('ff','andrew'), 47 | ('gf','andrew'), 48 | ('ar','rf'), 49 | ('as','rf'), 50 | ('asdf','rf'), 51 | ('bb','rf'), 52 | ('eee','rf'), 53 | ('ff','rf'), 54 | ('fff','rf'); 55 | 56 | /*!40000 ALTER TABLE `friends` ENABLE KEYS */; 57 | UNLOCK TABLES; 58 | 59 | 60 | # Dump of table members 61 | # ------------------------------------------------------------ 62 | 63 | DROP TABLE IF EXISTS `members`; 64 | 65 | CREATE TABLE `members` ( 66 | `user` varchar(16) DEFAULT NULL, 67 | `pass` varchar(512) DEFAULT NULL, 68 | KEY `user` (`user`(6)) 69 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 70 | 71 | LOCK TABLES `members` WRITE; 72 | /*!40000 ALTER TABLE `members` DISABLE KEYS */; 73 | 74 | INSERT INTO `members` (`user`, `pass`) 75 | VALUES 76 | ('jeff','$2y$10$qI.4WA6ky2zbEnXRPaTGH.aktsi0Ct..ffNqHwIPtoKJx5AYXr8V2'), 77 | ('tom','$2y$10$R5b3K9V7HGsdk6RoAcg4RO.Xlv9R5lnkmRaL/sYuziOTfPWjh.Ah.'), 78 | ('andrew','02e0a999c50b1f88df7a8f5a04e1b76b35ea6a88'), 79 | ('timmy','714f0731d7ff4ac3de2e9dfd7cf7ba1c4cb79cfa'), 80 | ('gf','4ebb4595eab529e499b9b866707a956aee2bf4ab'), 81 | ('ff','ed70c57d7564e994e7d5f6fd6967cea8b347efbc'), 82 | ('fred','31017a722665e4afce586950f42944a6d331dabf'), 83 | ('ar','23d8e0156062165ca3736e9f1e364d414e1d82d5'), 84 | ('t','8efd86fb78a56a5145ed7739dcb00c78581c5375'), 85 | ('tt','8c1017982b2032cc059203e3d83dd0ee2e7a86b3'), 86 | ('tp','903a0bf658baaaa89463ba893c88ae9c0be5a9bb'), 87 | ('bb','9a900f538965a426994e1e90600920aff0b4e8d2'), 88 | ('fff','f6949a8c7d5b90b4a698660bbfb9431503fbb995'), 89 | ('as','df211ccdd94a63e0bcb9e6ae427a249484a49d60'), 90 | ('jj','7323a5431d1c31072983a6a5bf23745b655ddf59'), 91 | ('asdf','3da541559918a808c2402bba5012f6c60b27661c'), 92 | ('eee','637a81ed8e8217bb01c15c67c39b43b0ab4e20f1'), 93 | ('sdaf','sdaf'), 94 | ('rf','22ee0097135072451429b5ac45630d52779cd49b'), 95 | ('jjj','c84c766f873ecedf75aa6cf35f1e305e095fec83'); 96 | 97 | /*!40000 ALTER TABLE `members` ENABLE KEYS */; 98 | UNLOCK TABLES; 99 | 100 | 101 | # Dump of table messages 102 | # ------------------------------------------------------------ 103 | 104 | DROP TABLE IF EXISTS `messages`; 105 | 106 | CREATE TABLE `messages` ( 107 | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, 108 | `auth` varchar(16) DEFAULT NULL, 109 | `recip` varchar(16) DEFAULT NULL, 110 | `pm` char(1) DEFAULT NULL, 111 | `time` int(10) unsigned DEFAULT NULL, 112 | `message` varchar(4096) DEFAULT NULL, 113 | PRIMARY KEY (`id`), 114 | KEY `auth` (`auth`(6)), 115 | KEY `recip` (`recip`(6)) 116 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 117 | 118 | LOCK TABLES `messages` WRITE; 119 | /*!40000 ALTER TABLE `messages` DISABLE KEYS */; 120 | 121 | INSERT INTO `messages` (`id`, `auth`, `recip`, `pm`, `time`, `message`) 122 | VALUES 123 | (1,'andrew','andrew','0',1446950200,'Hello there!'), 124 | (2,'gf','andrew','1',1446955331,'Test'), 125 | (3,'fred','tom','0',1447000376,'Hi Tom!'), 126 | (4,'rf','tom','0',1447008516,'Hi Tom! nice to meet you!'); 127 | 128 | /*!40000 ALTER TABLE `messages` ENABLE KEYS */; 129 | UNLOCK TABLES; 130 | 131 | 132 | # Dump of table profiles 133 | # ------------------------------------------------------------ 134 | 135 | DROP TABLE IF EXISTS `profiles`; 136 | 137 | CREATE TABLE `profiles` ( 138 | `user` varchar(16) DEFAULT NULL, 139 | `text` varchar(4096) DEFAULT NULL, 140 | KEY `user` (`user`(6)) 141 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 142 | 143 | LOCK TABLES `profiles` WRITE; 144 | /*!40000 ALTER TABLE `profiles` DISABLE KEYS */; 145 | 146 | INSERT INTO `profiles` (`user`, `text`) 147 | VALUES 148 | ('andrew','Just here to Help People out!'); 149 | 150 | /*!40000 ALTER TABLE `profiles` ENABLE KEYS */; 151 | UNLOCK TABLES; 152 | 153 | 154 | 155 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 156 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 157 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 158 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 159 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 160 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 161 | -------------------------------------------------------------------------------- /Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/Thumbs.db -------------------------------------------------------------------------------- /captcha.php: -------------------------------------------------------------------------------- 1 | check($_POST['captcha_code']) == false) { 16 | // the code was incorrect 17 | // you should handle the error so that the form processor doesn't continue 18 | // or you can use the following code if there is no validation or you do not know how 19 | echo "The security code entered was incorrect.

"; 20 | echo "Please go back and try again."; 21 | exit; 22 | } else echo "awesome"; 23 | ?> 24 | CAPTCHA Image 25 | 26 | [ Different Image ] -------------------------------------------------------------------------------- /checkuser.php: -------------------------------------------------------------------------------- 1 | num_rows) 9 | echo " ✘ " . 10 | "This username is taken"; 11 | else 12 | echo " ✔ " . 13 | "This username is available"; 14 | } 15 | 16 | 17 | ?> 18 | -------------------------------------------------------------------------------- /css/bootstrap-theme.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.5 (http://getbootstrap.com) 3 | * Copyright 2011-2015 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | .btn-default, 7 | .btn-primary, 8 | .btn-success, 9 | .btn-info, 10 | .btn-warning, 11 | .btn-danger { 12 | text-shadow: 0 -1px 0 rgba(0, 0, 0, .2); 13 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); 14 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); 15 | } 16 | .btn-default:active, 17 | .btn-primary:active, 18 | .btn-success:active, 19 | .btn-info:active, 20 | .btn-warning:active, 21 | .btn-danger:active, 22 | .btn-default.active, 23 | .btn-primary.active, 24 | .btn-success.active, 25 | .btn-info.active, 26 | .btn-warning.active, 27 | .btn-danger.active { 28 | -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); 29 | box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); 30 | } 31 | .btn-default.disabled, 32 | .btn-primary.disabled, 33 | .btn-success.disabled, 34 | .btn-info.disabled, 35 | .btn-warning.disabled, 36 | .btn-danger.disabled, 37 | .btn-default[disabled], 38 | .btn-primary[disabled], 39 | .btn-success[disabled], 40 | .btn-info[disabled], 41 | .btn-warning[disabled], 42 | .btn-danger[disabled], 43 | fieldset[disabled] .btn-default, 44 | fieldset[disabled] .btn-primary, 45 | fieldset[disabled] .btn-success, 46 | fieldset[disabled] .btn-info, 47 | fieldset[disabled] .btn-warning, 48 | fieldset[disabled] .btn-danger { 49 | -webkit-box-shadow: none; 50 | box-shadow: none; 51 | } 52 | .btn-default .badge, 53 | .btn-primary .badge, 54 | .btn-success .badge, 55 | .btn-info .badge, 56 | .btn-warning .badge, 57 | .btn-danger .badge { 58 | text-shadow: none; 59 | } 60 | .btn:active, 61 | .btn.active { 62 | background-image: none; 63 | } 64 | .btn-default { 65 | text-shadow: 0 1px 0 #fff; 66 | background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%); 67 | background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%); 68 | background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0)); 69 | background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%); 70 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0); 71 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 72 | background-repeat: repeat-x; 73 | border-color: #dbdbdb; 74 | border-color: #ccc; 75 | } 76 | .btn-default:hover, 77 | .btn-default:focus { 78 | background-color: #e0e0e0; 79 | background-position: 0 -15px; 80 | } 81 | .btn-default:active, 82 | .btn-default.active { 83 | background-color: #e0e0e0; 84 | border-color: #dbdbdb; 85 | } 86 | .btn-default.disabled, 87 | .btn-default[disabled], 88 | fieldset[disabled] .btn-default, 89 | .btn-default.disabled:hover, 90 | .btn-default[disabled]:hover, 91 | fieldset[disabled] .btn-default:hover, 92 | .btn-default.disabled:focus, 93 | .btn-default[disabled]:focus, 94 | fieldset[disabled] .btn-default:focus, 95 | .btn-default.disabled.focus, 96 | .btn-default[disabled].focus, 97 | fieldset[disabled] .btn-default.focus, 98 | .btn-default.disabled:active, 99 | .btn-default[disabled]:active, 100 | fieldset[disabled] .btn-default:active, 101 | .btn-default.disabled.active, 102 | .btn-default[disabled].active, 103 | fieldset[disabled] .btn-default.active { 104 | background-color: #e0e0e0; 105 | background-image: none; 106 | } 107 | .btn-primary { 108 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%); 109 | background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%); 110 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88)); 111 | background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%); 112 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0); 113 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 114 | background-repeat: repeat-x; 115 | border-color: #245580; 116 | } 117 | .btn-primary:hover, 118 | .btn-primary:focus { 119 | background-color: #265a88; 120 | background-position: 0 -15px; 121 | } 122 | .btn-primary:active, 123 | .btn-primary.active { 124 | background-color: #265a88; 125 | border-color: #245580; 126 | } 127 | .btn-primary.disabled, 128 | .btn-primary[disabled], 129 | fieldset[disabled] .btn-primary, 130 | .btn-primary.disabled:hover, 131 | .btn-primary[disabled]:hover, 132 | fieldset[disabled] .btn-primary:hover, 133 | .btn-primary.disabled:focus, 134 | .btn-primary[disabled]:focus, 135 | fieldset[disabled] .btn-primary:focus, 136 | .btn-primary.disabled.focus, 137 | .btn-primary[disabled].focus, 138 | fieldset[disabled] .btn-primary.focus, 139 | .btn-primary.disabled:active, 140 | .btn-primary[disabled]:active, 141 | fieldset[disabled] .btn-primary:active, 142 | .btn-primary.disabled.active, 143 | .btn-primary[disabled].active, 144 | fieldset[disabled] .btn-primary.active { 145 | background-color: #265a88; 146 | background-image: none; 147 | } 148 | .btn-success { 149 | background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%); 150 | background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%); 151 | background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641)); 152 | background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%); 153 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0); 154 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 155 | background-repeat: repeat-x; 156 | border-color: #3e8f3e; 157 | } 158 | .btn-success:hover, 159 | .btn-success:focus { 160 | background-color: #419641; 161 | background-position: 0 -15px; 162 | } 163 | .btn-success:active, 164 | .btn-success.active { 165 | background-color: #419641; 166 | border-color: #3e8f3e; 167 | } 168 | .btn-success.disabled, 169 | .btn-success[disabled], 170 | fieldset[disabled] .btn-success, 171 | .btn-success.disabled:hover, 172 | .btn-success[disabled]:hover, 173 | fieldset[disabled] .btn-success:hover, 174 | .btn-success.disabled:focus, 175 | .btn-success[disabled]:focus, 176 | fieldset[disabled] .btn-success:focus, 177 | .btn-success.disabled.focus, 178 | .btn-success[disabled].focus, 179 | fieldset[disabled] .btn-success.focus, 180 | .btn-success.disabled:active, 181 | .btn-success[disabled]:active, 182 | fieldset[disabled] .btn-success:active, 183 | .btn-success.disabled.active, 184 | .btn-success[disabled].active, 185 | fieldset[disabled] .btn-success.active { 186 | background-color: #419641; 187 | background-image: none; 188 | } 189 | .btn-info { 190 | background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); 191 | background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); 192 | background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2)); 193 | background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%); 194 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0); 195 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 196 | background-repeat: repeat-x; 197 | border-color: #28a4c9; 198 | } 199 | .btn-info:hover, 200 | .btn-info:focus { 201 | background-color: #2aabd2; 202 | background-position: 0 -15px; 203 | } 204 | .btn-info:active, 205 | .btn-info.active { 206 | background-color: #2aabd2; 207 | border-color: #28a4c9; 208 | } 209 | .btn-info.disabled, 210 | .btn-info[disabled], 211 | fieldset[disabled] .btn-info, 212 | .btn-info.disabled:hover, 213 | .btn-info[disabled]:hover, 214 | fieldset[disabled] .btn-info:hover, 215 | .btn-info.disabled:focus, 216 | .btn-info[disabled]:focus, 217 | fieldset[disabled] .btn-info:focus, 218 | .btn-info.disabled.focus, 219 | .btn-info[disabled].focus, 220 | fieldset[disabled] .btn-info.focus, 221 | .btn-info.disabled:active, 222 | .btn-info[disabled]:active, 223 | fieldset[disabled] .btn-info:active, 224 | .btn-info.disabled.active, 225 | .btn-info[disabled].active, 226 | fieldset[disabled] .btn-info.active { 227 | background-color: #2aabd2; 228 | background-image: none; 229 | } 230 | .btn-warning { 231 | background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); 232 | background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); 233 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316)); 234 | background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%); 235 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0); 236 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 237 | background-repeat: repeat-x; 238 | border-color: #e38d13; 239 | } 240 | .btn-warning:hover, 241 | .btn-warning:focus { 242 | background-color: #eb9316; 243 | background-position: 0 -15px; 244 | } 245 | .btn-warning:active, 246 | .btn-warning.active { 247 | background-color: #eb9316; 248 | border-color: #e38d13; 249 | } 250 | .btn-warning.disabled, 251 | .btn-warning[disabled], 252 | fieldset[disabled] .btn-warning, 253 | .btn-warning.disabled:hover, 254 | .btn-warning[disabled]:hover, 255 | fieldset[disabled] .btn-warning:hover, 256 | .btn-warning.disabled:focus, 257 | .btn-warning[disabled]:focus, 258 | fieldset[disabled] .btn-warning:focus, 259 | .btn-warning.disabled.focus, 260 | .btn-warning[disabled].focus, 261 | fieldset[disabled] .btn-warning.focus, 262 | .btn-warning.disabled:active, 263 | .btn-warning[disabled]:active, 264 | fieldset[disabled] .btn-warning:active, 265 | .btn-warning.disabled.active, 266 | .btn-warning[disabled].active, 267 | fieldset[disabled] .btn-warning.active { 268 | background-color: #eb9316; 269 | background-image: none; 270 | } 271 | .btn-danger { 272 | background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%); 273 | background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%); 274 | background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a)); 275 | background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%); 276 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0); 277 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 278 | background-repeat: repeat-x; 279 | border-color: #b92c28; 280 | } 281 | .btn-danger:hover, 282 | .btn-danger:focus { 283 | background-color: #c12e2a; 284 | background-position: 0 -15px; 285 | } 286 | .btn-danger:active, 287 | .btn-danger.active { 288 | background-color: #c12e2a; 289 | border-color: #b92c28; 290 | } 291 | .btn-danger.disabled, 292 | .btn-danger[disabled], 293 | fieldset[disabled] .btn-danger, 294 | .btn-danger.disabled:hover, 295 | .btn-danger[disabled]:hover, 296 | fieldset[disabled] .btn-danger:hover, 297 | .btn-danger.disabled:focus, 298 | .btn-danger[disabled]:focus, 299 | fieldset[disabled] .btn-danger:focus, 300 | .btn-danger.disabled.focus, 301 | .btn-danger[disabled].focus, 302 | fieldset[disabled] .btn-danger.focus, 303 | .btn-danger.disabled:active, 304 | .btn-danger[disabled]:active, 305 | fieldset[disabled] .btn-danger:active, 306 | .btn-danger.disabled.active, 307 | .btn-danger[disabled].active, 308 | fieldset[disabled] .btn-danger.active { 309 | background-color: #c12e2a; 310 | background-image: none; 311 | } 312 | .thumbnail, 313 | .img-thumbnail { 314 | -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); 315 | box-shadow: 0 1px 2px rgba(0, 0, 0, .075); 316 | } 317 | .dropdown-menu > li > a:hover, 318 | .dropdown-menu > li > a:focus { 319 | background-color: #e8e8e8; 320 | background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 321 | background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 322 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); 323 | background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); 324 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); 325 | background-repeat: repeat-x; 326 | } 327 | .dropdown-menu > .active > a, 328 | .dropdown-menu > .active > a:hover, 329 | .dropdown-menu > .active > a:focus { 330 | background-color: #2e6da4; 331 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 332 | background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 333 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); 334 | background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); 335 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); 336 | background-repeat: repeat-x; 337 | } 338 | .navbar-default { 339 | background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%); 340 | background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%); 341 | background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8)); 342 | background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%); 343 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0); 344 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 345 | background-repeat: repeat-x; 346 | border-radius: 4px; 347 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); 348 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); 349 | } 350 | .navbar-default .navbar-nav > .open > a, 351 | .navbar-default .navbar-nav > .active > a { 352 | background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); 353 | background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); 354 | background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2)); 355 | background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%); 356 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0); 357 | background-repeat: repeat-x; 358 | -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); 359 | box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); 360 | } 361 | .navbar-brand, 362 | .navbar-nav > li > a { 363 | text-shadow: 0 1px 0 rgba(255, 255, 255, .25); 364 | } 365 | .navbar-inverse { 366 | background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%); 367 | background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%); 368 | background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222)); 369 | background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%); 370 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0); 371 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 372 | background-repeat: repeat-x; 373 | border-radius: 4px; 374 | } 375 | .navbar-inverse .navbar-nav > .open > a, 376 | .navbar-inverse .navbar-nav > .active > a { 377 | background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%); 378 | background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%); 379 | background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f)); 380 | background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%); 381 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0); 382 | background-repeat: repeat-x; 383 | -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); 384 | box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); 385 | } 386 | .navbar-inverse .navbar-brand, 387 | .navbar-inverse .navbar-nav > li > a { 388 | text-shadow: 0 -1px 0 rgba(0, 0, 0, .25); 389 | } 390 | .navbar-static-top, 391 | .navbar-fixed-top, 392 | .navbar-fixed-bottom { 393 | border-radius: 0; 394 | } 395 | @media (max-width: 767px) { 396 | .navbar .navbar-nav .open .dropdown-menu > .active > a, 397 | .navbar .navbar-nav .open .dropdown-menu > .active > a:hover, 398 | .navbar .navbar-nav .open .dropdown-menu > .active > a:focus { 399 | color: #fff; 400 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 401 | background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 402 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); 403 | background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); 404 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); 405 | background-repeat: repeat-x; 406 | } 407 | } 408 | .alert { 409 | text-shadow: 0 1px 0 rgba(255, 255, 255, .2); 410 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); 411 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); 412 | } 413 | .alert-success { 414 | background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); 415 | background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); 416 | background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc)); 417 | background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%); 418 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0); 419 | background-repeat: repeat-x; 420 | border-color: #b2dba1; 421 | } 422 | .alert-info { 423 | background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%); 424 | background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%); 425 | background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0)); 426 | background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%); 427 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0); 428 | background-repeat: repeat-x; 429 | border-color: #9acfea; 430 | } 431 | .alert-warning { 432 | background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); 433 | background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); 434 | background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0)); 435 | background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%); 436 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0); 437 | background-repeat: repeat-x; 438 | border-color: #f5e79e; 439 | } 440 | .alert-danger { 441 | background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); 442 | background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); 443 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3)); 444 | background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%); 445 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0); 446 | background-repeat: repeat-x; 447 | border-color: #dca7a7; 448 | } 449 | .progress { 450 | background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); 451 | background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); 452 | background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5)); 453 | background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%); 454 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0); 455 | background-repeat: repeat-x; 456 | } 457 | .progress-bar { 458 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%); 459 | background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%); 460 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090)); 461 | background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%); 462 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0); 463 | background-repeat: repeat-x; 464 | } 465 | .progress-bar-success { 466 | background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%); 467 | background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%); 468 | background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44)); 469 | background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%); 470 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0); 471 | background-repeat: repeat-x; 472 | } 473 | .progress-bar-info { 474 | background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); 475 | background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); 476 | background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5)); 477 | background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%); 478 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0); 479 | background-repeat: repeat-x; 480 | } 481 | .progress-bar-warning { 482 | background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); 483 | background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); 484 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f)); 485 | background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%); 486 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0); 487 | background-repeat: repeat-x; 488 | } 489 | .progress-bar-danger { 490 | background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%); 491 | background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%); 492 | background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c)); 493 | background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%); 494 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0); 495 | background-repeat: repeat-x; 496 | } 497 | .progress-bar-striped { 498 | background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); 499 | background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); 500 | background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); 501 | } 502 | .list-group { 503 | border-radius: 4px; 504 | -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); 505 | box-shadow: 0 1px 2px rgba(0, 0, 0, .075); 506 | } 507 | .list-group-item.active, 508 | .list-group-item.active:hover, 509 | .list-group-item.active:focus { 510 | text-shadow: 0 -1px 0 #286090; 511 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%); 512 | background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%); 513 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a)); 514 | background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%); 515 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0); 516 | background-repeat: repeat-x; 517 | border-color: #2b669a; 518 | } 519 | .list-group-item.active .badge, 520 | .list-group-item.active:hover .badge, 521 | .list-group-item.active:focus .badge { 522 | text-shadow: none; 523 | } 524 | .panel { 525 | -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05); 526 | box-shadow: 0 1px 2px rgba(0, 0, 0, .05); 527 | } 528 | .panel-default > .panel-heading { 529 | background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 530 | background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 531 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); 532 | background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); 533 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); 534 | background-repeat: repeat-x; 535 | } 536 | .panel-primary > .panel-heading { 537 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 538 | background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 539 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); 540 | background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); 541 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); 542 | background-repeat: repeat-x; 543 | } 544 | .panel-success > .panel-heading { 545 | background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); 546 | background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); 547 | background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6)); 548 | background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%); 549 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0); 550 | background-repeat: repeat-x; 551 | } 552 | .panel-info > .panel-heading { 553 | background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); 554 | background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); 555 | background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3)); 556 | background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%); 557 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0); 558 | background-repeat: repeat-x; 559 | } 560 | .panel-warning > .panel-heading { 561 | background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); 562 | background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); 563 | background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc)); 564 | background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%); 565 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0); 566 | background-repeat: repeat-x; 567 | } 568 | .panel-danger > .panel-heading { 569 | background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%); 570 | background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%); 571 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc)); 572 | background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%); 573 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0); 574 | background-repeat: repeat-x; 575 | } 576 | .well { 577 | background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); 578 | background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); 579 | background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5)); 580 | background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%); 581 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0); 582 | background-repeat: repeat-x; 583 | border-color: #dcdcdc; 584 | -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); 585 | box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); 586 | } 587 | /*# sourceMappingURL=bootstrap-theme.css.map */ 588 | -------------------------------------------------------------------------------- /css/bootstrap-theme.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.5 (http://getbootstrap.com) 3 | * Copyright 2011-2015 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */.btn-danger,.btn-default,.btn-info,.btn-primary,.btn-success,.btn-warning{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-success.active,.btn-success:active,.btn-warning.active,.btn-warning:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-danger.disabled,.btn-danger[disabled],.btn-default.disabled,.btn-default[disabled],.btn-info.disabled,.btn-info[disabled],.btn-primary.disabled,.btn-primary[disabled],.btn-success.disabled,.btn-success[disabled],.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-danger,fieldset[disabled] .btn-default,fieldset[disabled] .btn-info,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-success,fieldset[disabled] .btn-warning{-webkit-box-shadow:none;box-shadow:none}.btn-danger .badge,.btn-default .badge,.btn-info .badge,.btn-primary .badge,.btn-success .badge,.btn-warning .badge{text-shadow:none}.btn.active,.btn:active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:focus,.btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.btn-default.active,.btn-default:active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:focus,.btn-primary:hover{background-color:#265a88;background-position:0 -15px}.btn-primary.active,.btn-primary:active{background-color:#265a88;border-color:#245580}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:focus,.btn-success:hover{background-color:#419641;background-position:0 -15px}.btn-success.active,.btn-success:active{background-color:#419641;border-color:#3e8f3e}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:focus,.btn-info:hover{background-color:#2aabd2;background-position:0 -15px}.btn-info.active,.btn-info:active{background-color:#2aabd2;border-color:#28a4c9}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:focus,.btn-warning:hover{background-color:#eb9316;background-position:0 -15px}.btn-warning.active,.btn-warning:active{background-color:#eb9316;border-color:#e38d13}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:focus,.btn-danger:hover{background-color:#c12e2a;background-position:0 -15px}.btn-danger.active,.btn-danger:active{background-color:#c12e2a;border-color:#b92c28}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#c12e2a;background-image:none}.img-thumbnail,.thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:focus .badge,.list-group-item.active:hover .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)} -------------------------------------------------------------------------------- /example26-1.php: -------------------------------------------------------------------------------- 1 | connect_error) die($connection->connect_error); 10 | 11 | function createTable($name, $query) { 12 | queryMysql("CREATE TABLE IF NOT EXISTS $name($query)"); 13 | echo "Table '$name' created or already exists.
"; 14 | } 15 | 16 | function queryMysql($query) { 17 | global $connection; 18 | $result = $connection->query($query); 19 | if (!$result) die($connection->error); 20 | return $result; 21 | } 22 | 23 | function destroySession() { 24 | $_SESSION = array(); 25 | 26 | if (session_id() != "" || isset($_COOKIE[session_name()])) 27 | setcookie(session_name(), '', time() - 2592000, '/'); 28 | 29 | session_destroy(); 30 | } 31 | 32 | function sanitizeString($var) { 33 | global $connection; 34 | $var = strip_tags($var); 35 | $var = htmlentities($var); 36 | $var = stripslashes($var); 37 | return $connection->real_escape_string($var); 38 | } 39 | 40 | function showProfile($user) { 41 | if (file_exists("$user.jpg")) 42 | echo ""; 43 | 44 | $result = queryMysql("SELECT * FROM profiles WHERE user='$user'"); 45 | 46 | if ($result->num_rows) { 47 | $row = $result->fetch_array(MYSQLI_ASSOC); 48 | echo stripslashes($row['text']) . "

"; 49 | } 50 | } 51 | 52 | ?> 53 | -------------------------------------------------------------------------------- /explode.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /friends.php: -------------------------------------------------------------------------------- 1 | $view's"; 14 | $name2 = "$view's"; 15 | $name3 = "$view is"; 16 | } 17 | 18 | echo "
"; 19 | 20 | // Uncomment this line if you wish the user�s profile to show here 21 | // showProfile($view); 22 | 23 | $followers = array(); 24 | $following = array(); 25 | 26 | $result = queryMysql("SELECT * FROM friends WHERE user='$view'"); 27 | $num = $result->num_rows; 28 | 29 | for ($j = 0; $j < $num; ++$j) { 30 | $row = $result->fetch_array(MYSQLI_ASSOC); 31 | $followers[$j] = $row['friend']; 32 | } 33 | 34 | $result = queryMysql("SELECT * FROM friends WHERE friend='$view'"); 35 | $num = $result->num_rows; 36 | 37 | for ($j = 0; $j < $num; ++$j) { 38 | $row = $result->fetch_array(MYSQLI_ASSOC); 39 | $following[$j] = $row['user']; 40 | } 41 | 42 | $mutual = array_intersect($followers, $following); 43 | $followers = array_diff($followers, $mutual); 44 | $following = array_diff($following, $mutual); 45 | $friends = FALSE; 46 | 47 | if (sizeof($mutual)) { 48 | echo "$name2 mutual friends"; 52 | $friends = TRUE; 53 | } 54 | 55 | if (sizeof($followers)) { 56 | echo "$name2 followers"; 60 | $friends = TRUE; 61 | } 62 | 63 | if (sizeof($following)) { 64 | echo "$name3 following"; 68 | $friends = TRUE; 69 | } 70 | 71 | if (!$friends) echo "
You don't have any friends yet.

"; 72 | 73 | echo "" . 74 | "View $name2 messages"; 75 | ?> 76 | 77 |

78 | 79 | 80 | -------------------------------------------------------------------------------- /functions.php: -------------------------------------------------------------------------------- 1 | connect_error) die($connection->connect_error); 11 | 12 | function createTable($name, $query) { 13 | queryMysql("CREATE TABLE IF NOT EXISTS $name($query)"); 14 | echo "Table '$name' created or already exists.
"; 15 | } 16 | 17 | function queryMysql($query) { 18 | global $connection; 19 | $result = $connection->query($query); 20 | if (!$result) die($connection->error); 21 | return $result; 22 | } 23 | 24 | function destroySession() { 25 | $_SESSION = array(); 26 | 27 | if (session_id() != "" || isset($_COOKIE[session_name()])) 28 | setcookie(session_name(), '', time() - 2592000, '/'); 29 | 30 | session_destroy(); 31 | } 32 | 33 | function sanitizeString($var) { 34 | global $connection; 35 | $var = strip_tags($var); 36 | $var = htmlentities($var); 37 | $var = stripslashes($var); 38 | return $connection->real_escape_string($var); 39 | } 40 | 41 | function showProfile($user) { 42 | if (file_exists("$user.jpg")) 43 | echo ""; 44 | 45 | $result = queryMysql("SELECT * FROM profiles WHERE user='$user'"); 46 | 47 | if ($result->num_rows) { 48 | $row = $result->fetch_array(MYSQLI_ASSOC); 49 | echo stripslashes($row['text']) . "

"; 50 | } 51 | } 52 | 53 | ?> 54 | -------------------------------------------------------------------------------- /header.php: -------------------------------------------------------------------------------- 1 | \n"; 5 | 6 | require_once 'functions.php'; 7 | 8 | $userstr = ' (Guest)'; 9 | 10 | if (isset($_SESSION['user'])) { 11 | $user = $_SESSION['user']; 12 | $loggedin = TRUE; 13 | $userstr = " ($user)"; 14 | } else $loggedin = FALSE; 15 | 16 | echo "$appname$userstr" . 18 | "" . 19 | "
$appname$userstr
" . 20 | "" . 21 | "" . 22 | ""; 23 | 24 | ?> 25 | 26 | 27 |
"; 38 | 39 | } else { 40 | echo("

" . 44 | "⇒ You must be logged in to " . 45 | "view this page.

"); 46 | } 47 | ?> 48 | 49 | 50 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 |

Please enter your details to log in

"; 4 | $error = $user = $pass = ""; 5 | 6 | if (isset($_POST['user'])) { 7 | $user = sanitizeString($_POST['user']); 8 | $pass = sanitizeString($_POST['pass']); 9 | 10 | if ($user == "" || $pass == "") 11 | $error = "Not all fields were entered
"; 12 | else { 13 | $result = queryMySQL("SELECT user,pass FROM members 14 | WHERE user='$user' AND pass='$pass'"); 15 | 16 | if ($result->num_rows == 0) { 17 | $error = "Username/Password 18 | invalid

"; 19 | } else { 20 | $_SESSION['user'] = $user; 21 | $_SESSION['pass'] = $pass; 22 | die("You are now logged in. Please " . 23 | "click here to continue.

"); 24 | } 25 | } 26 | } 27 | 28 | echo <<<_END 29 |
$error 30 | Username
32 | Password 34 | _END; 35 | ?> 36 | 37 |
38 |   39 | 40 |

41 | 42 | 43 | -------------------------------------------------------------------------------- /javascript.js: -------------------------------------------------------------------------------- 1 | // Example 26-14: javascript.js 2 | 3 | canvas = O('logo') 4 | context = canvas.getContext('2d') 5 | context.font = 'bold italic 97px Georgia' 6 | context.textBaseline = 'top' 7 | image = new Image() 8 | image.src = 'robin.gif' 9 | 10 | image.onload = function () { 11 | gradient = context.createLinearGradient(0, 0, 0, 89) 12 | gradient.addColorStop(0.00, '#faa') 13 | gradient.addColorStop(0.66, '#f00') 14 | context.fillStyle = gradient 15 | context.fillText("R bin's Nest", 0, 0) 16 | context.strokeText("R bin's Nest", 0, 0) 17 | context.drawImage(image, 64, 32) 18 | } 19 | 20 | function O(i) { 21 | return typeof i == 'object' ? i : document.getElementById(i) 22 | } 23 | function S(i) { 24 | return O(i).style 25 | } 26 | function C(i) { 27 | return document.getElementsByClassName(i) 28 | } 29 | -------------------------------------------------------------------------------- /js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.5 (http://getbootstrap.com) 3 | * Copyright 2011-2015 Twitter, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.5",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); -------------------------------------------------------------------------------- /js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /login.php: -------------------------------------------------------------------------------- 1 |

Please enter your details to log in

"; 4 | $error = $user = $pass = ""; 5 | 6 | if (isset($_POST['user'])) { 7 | $user = sanitizeString($_POST['user']); 8 | $pass = password_hash(sanitizeString($_POST['pass']), PASSWORD_DEFAULT); 9 | $pass = sha1(sanitizeString($_POST['pass'])); 10 | 11 | if ($user == "" || $pass == "") 12 | $error = "Not all fields were entered
"; 13 | else { 14 | $result = queryMySQL("SELECT user,pass FROM members 15 | WHERE user='$user' AND pass='$pass'"); 16 | 17 | if ($result->num_rows == 0) { 18 | $error = "Username/Password 19 | invalid

"; 20 | } else { 21 | $_SESSION['user'] = $user; 22 | $_SESSION['pass'] = $pass; 23 | die("You are now logged in. Please " . 24 | "click here to continue.

"); 25 | } 26 | } 27 | } 28 | echo $pass; 29 | echo <<<_END 30 |
$error 31 | Username
33 | Password 35 | _END; 36 | ?> 37 | 38 |
39 |   40 | 41 |

42 | 43 | 44 | 47 | //
48 | // 49 | // 50 | //
51 | //
52 | // 53 | // 54 | //
55 | //
56 | // 57 | // 58 | //

Example block-level help text here.

59 | //
60 | //
61 | // 64 | //
65 | // 66 | // 67 | //_END; 68 | 69 | ?> 70 | 71 | 72 | -------------------------------------------------------------------------------- /logout.php: -------------------------------------------------------------------------------- 1 | You have been logged out. Please " . 7 | "click here to refresh the screen."; 8 | } else echo "

" . 9 | "You cannot log out because you are not logged in"; 10 | ?> 11 | 12 |

13 | 14 | 15 | -------------------------------------------------------------------------------- /members.php: -------------------------------------------------------------------------------- 1 | "; 7 | 8 | if (isset($_GET['view'])) { 9 | $view = sanitizeString($_GET['view']); 10 | 11 | if ($view == $user) $name = "Your"; 12 | else $name = "$view's"; 13 | 14 | echo "

$name Profile

"; 15 | showProfile($view); 16 | echo "" . 17 | "View $name messages

"; 18 | die(""); 19 | } 20 | 21 | if (isset($_GET['add'])) { 22 | $add = sanitizeString($_GET['add']); 23 | 24 | $result = queryMysql("SELECT * FROM friends WHERE user='$add' AND friend='$user'"); 25 | if (!$result->num_rows) 26 | queryMysql("INSERT INTO friends VALUES ('$add', '$user')"); 27 | } elseif (isset($_GET['remove'])) { 28 | $remove = sanitizeString($_GET['remove']); 29 | queryMysql("DELETE FROM friends WHERE user='$remove' AND friend='$user'"); 30 | } 31 | 32 | $result = queryMysql("SELECT user FROM members ORDER BY user"); 33 | $num = $result->num_rows; 34 | 35 | echo "

Other Members

    "; 36 | 37 | for ($j = 0; $j < $num; ++$j) { 38 | $row = $result->fetch_array(MYSQLI_ASSOC); 39 | if ($row['user'] == $user) continue; 40 | 41 | echo "
  • " . $row['user'] . ""; 43 | $follow = "follow"; 44 | 45 | $result1 = queryMysql("SELECT * FROM friends WHERE 46 | user='" . $row['user'] . "' AND friend='$user'"); 47 | $t1 = $result1->num_rows; 48 | $result1 = queryMysql("SELECT * FROM friends WHERE 49 | user='$user' AND friend='" . $row['user'] . "'"); 50 | $t2 = $result1->num_rows; 51 | 52 | if (($t1 + $t2) > 1) echo " ↔ is a mutual friend"; 53 | elseif ($t1) echo " ← you are following"; 54 | elseif ($t2) { 55 | echo " → is following you"; 56 | $follow = "recip"; 57 | } 58 | 59 | if (!$t1) echo " [$follow]"; 60 | else echo " [drop]"; 61 | } 62 | ?> 63 | 64 |
65 | 66 | 67 | -------------------------------------------------------------------------------- /messages.php: -------------------------------------------------------------------------------- 1 | $view's"; 24 | $name2 = "$view's"; 25 | } 26 | 27 | echo "

$name1 Messages

"; 28 | showProfile($view); 29 | 30 | echo <<<_END 31 |
32 | Type here to leave a message:
33 |
34 | Public 35 | Private 36 |

37 | _END; 38 | 39 | if (isset($_GET['erase'])) { 40 | $erase = sanitizeString($_GET['erase']); 41 | queryMysql("DELETE FROM messages WHERE id=$erase AND recip='$user'"); 42 | } 43 | 44 | $query = "SELECT * FROM messages WHERE recip='$view' ORDER BY time DESC"; 45 | $result = queryMysql($query); 46 | $num = $result->num_rows; 47 | 48 | for ($j = 0; $j < $num; ++$j) { 49 | $row = $result->fetch_array(MYSQLI_ASSOC); 50 | 51 | if ($row['pm'] == 0 || $row['auth'] == $user || $row['recip'] == $user) { 52 | echo date('M jS \'y g:ia:', $row['time']); 53 | echo " " . $row['auth'] . " "; 54 | 55 | if ($row['pm'] == 0) 56 | echo "wrote: "" . $row['message'] . "" "; 57 | else 58 | echo "whispered: "" . 59 | $row['message'] . "" "; 60 | 61 | if ($row['recip'] == $user) 62 | echo "[erase]"; 64 | 65 | echo "
"; 66 | } 67 | } 68 | } 69 | 70 | if (!$num) echo "
No messages yet

"; 71 | 72 | echo "
Refresh messages"; 73 | ?> 74 | 75 |

76 | 77 | 78 | -------------------------------------------------------------------------------- /names.txt: -------------------------------------------------------------------------------- 1 | Avery   2 | Christoper   3 | Herbert   4 | Kelvin   5 | Jason   6 | Irwin   7 | Carl   8 | Octavio   9 | Branden   10 | Lance   11 | Cornell   12 | Vince   13 | Lewis   14 | Burl   15 | Dane   16 | Kennith   17 | Roy   18 | Mervin   19 | Refugio   20 | Hyman   21 | Kirby   22 | Blaine   23 | Denis   24 | Brooks   25 | Mohammad   26 | Stanton   27 | Frank   28 | Jonathan   29 | Raymond   30 | Mauricio   31 | Earnest   32 | Shelton   33 | Nick   34 | Edmond   35 | Louie   36 | Kurt   37 | Richie   38 | Young   39 | Rigoberto   40 | Stefan   41 | Cornelius   42 | Carlo   43 | Leon   44 | Delbert   45 | Erin   46 | Alonso   47 | Hoyt   48 | Cristobal   49 | Jeromy   50 | Virgil   -------------------------------------------------------------------------------- /popular.php: -------------------------------------------------------------------------------- 1 | "; 7 | 8 | if (isset($_GET['view'])) { 9 | $view = sanitizeString($_GET['view']); 10 | 11 | if ($view == $user) $name = "Your"; 12 | else $name = "$view's"; 13 | 14 | echo "

$name Profile

"; 15 | showProfile($view); 16 | echo "" . 17 | "View $name messages

"; 18 | die(""); 19 | } 20 | 21 | if (isset($_GET['add'])) { 22 | $add = sanitizeString($_GET['add']); 23 | 24 | $result = queryMysql("SELECT * FROM friends WHERE user='$add' AND friend='$user'"); 25 | if (!$result->num_rows) 26 | queryMysql("INSERT INTO friends VALUES ('$add', '$user')"); 27 | } elseif (isset($_GET['remove'])) { 28 | $remove = sanitizeString($_GET['remove']); 29 | queryMysql("DELETE FROM friends WHERE user='$remove' AND friend='$user'"); 30 | } 31 | 32 | $result = queryMysql("SELECT *, count(user) as n FROM friends GROUP BY user ORDER BY n DESC"); 33 | $num = $result->num_rows; 34 | 35 | echo "

Popular Members

    "; 36 | 37 | for ($j = 0; $j < $num; ++$j) { 38 | $row = $result->fetch_array(MYSQLI_ASSOC); 39 | if ($row['user'] == $user) continue; 40 | 41 | echo "
  • " . $row['user'] . ""; 43 | $follow = "follow"; 44 | 45 | $result1 = queryMysql("SELECT * FROM friends WHERE 46 | user='" . $row['user'] . "' AND friend='$user'"); 47 | $t1 = $result1->num_rows; 48 | $result1 = queryMysql("SELECT * FROM friends WHERE 49 | user='$user' AND friend='" . $row['user'] . "'"); 50 | $t2 = $result1->num_rows; 51 | 52 | // if (($t1 + $t2) > 1) echo " ↔ is a mutual friend"; 53 | // elseif ($t1) echo " ← you are following"; 54 | // elseif ($t2) { 55 | // echo " → is following you"; 56 | // $follow = "recip"; 57 | // } 58 | 59 | // if (!$t1) echo " [$follow]"; 60 | // else echo " [drop]"; 61 | 62 | echo " has ".$row['n']." friends"; 63 | } 64 | ?> 65 | 66 |
67 | 68 | 69 | -------------------------------------------------------------------------------- /profile.php: -------------------------------------------------------------------------------- 1 |

Your Profile

"; 7 | 8 | $result = queryMysql("SELECT * FROM profiles WHERE user='$user'"); 9 | 10 | if (isset($_POST['text'])) { 11 | $text = sanitizeString($_POST['text']); 12 | $text = preg_replace('/\s\s+/', ' ', $text); 13 | 14 | if ($result->num_rows) 15 | queryMysql("UPDATE profiles SET text='$text' where user='$user'"); 16 | else queryMysql("INSERT INTO profiles VALUES('$user', '$text')"); 17 | } else { 18 | if ($result->num_rows) { 19 | $row = $result->fetch_array(MYSQLI_ASSOC); 20 | $text = stripslashes($row['text']); 21 | } else $text = ""; 22 | } 23 | 24 | $text = stripslashes(preg_replace('/\s\s+/', ' ', $text)); 25 | 26 | if (isset($_FILES['image']['name'])) { 27 | $saveto = "$user.jpg"; 28 | move_uploaded_file($_FILES['image']['tmp_name'], $saveto); 29 | $typeok = TRUE; 30 | 31 | switch ($_FILES['image']['type']) { 32 | case "image/gif": 33 | $src = imagecreatefromgif($saveto); 34 | break; 35 | case "image/jpeg": // Both regular and progressive jpegs 36 | case "image/pjpeg": 37 | $src = imagecreatefromjpeg($saveto); 38 | break; 39 | case "image/png": 40 | $src = imagecreatefrompng($saveto); 41 | break; 42 | default: 43 | $typeok = FALSE; 44 | break; 45 | } 46 | 47 | if ($typeok) { 48 | list($w, $h) = getimagesize($saveto); 49 | 50 | $max = 100; 51 | $tw = $w; 52 | $th = $h; 53 | 54 | if ($w > $h && $max < $w) { 55 | $th = $max / $w * $h; 56 | $tw = $max; 57 | } elseif ($h > $w && $max < $h) { 58 | $tw = $max / $h * $w; 59 | $th = $max; 60 | } elseif ($max < $w) { 61 | $tw = $th = $max; 62 | } 63 | 64 | $tmp = imagecreatetruecolor($tw, $th); 65 | imagecopyresampled($tmp, $src, 0, 0, 0, 0, $tw, $th, $w, $h); 66 | imageconvolution($tmp, array(array(-1, -1, -1), 67 | array(-1, 16, -1), array(-1, -1, -1)), 8, 0); 68 | imagejpeg($tmp, $saveto); 69 | imagedestroy($tmp); 70 | imagedestroy($src); 71 | } 72 | } 73 | 74 | showProfile($user); 75 | 76 | echo <<<_END 77 |
78 |

Enter or edit your details and/or upload an image

79 |
80 | _END; 81 | ?> 82 | 83 | Image: 84 | 85 |

86 | 87 | 88 | -------------------------------------------------------------------------------- /robin.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/robin.gif -------------------------------------------------------------------------------- /securimage/AHGBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/AHGBold.ttf -------------------------------------------------------------------------------- /securimage/LICENSE.txt: -------------------------------------------------------------------------------- 1 | COPYRIGHT: 2 | Copyright (c) 2011 Drew Phillips 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, 6 | are permitted provided that the following conditions are met: 7 | 8 | - Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | - Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 18 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | POSSIBILITY OF SUCH DAMAGE. 25 | 26 | -------------------------------------------------------------------------------- /securimage/README.FONT.txt: -------------------------------------------------------------------------------- 1 | AHGBold.ttf is used by Securimage under the following license: 2 | 3 | Alte Haas Grotesk is a typeface that look like an helvetica printed in an old Muller-Brockmann Book. 4 | 5 | These fonts are freeware and can be distributed as long as they are 6 | together with this text file. 7 | 8 | I would appreciate very much to see what you have done with it anyway. 9 | 10 | yann le coroller 11 | www.yannlecoroller.com 12 | yann@lecoroller.com -------------------------------------------------------------------------------- /securimage/README.md: -------------------------------------------------------------------------------- 1 | ## Name: 2 | 3 | **Securimage** - A PHP class for creating captcha images and audio with many options. 4 | 5 | ## Version: 6 | 7 | **3.6.1** 8 | 9 | ## Author: 10 | 11 | Drew Phillips 12 | 13 | ## Download: 14 | 15 | The latest version can always be found at [phpcaptcha.org](https://www.phpcaptcha.org) 16 | 17 | ## Documentation: 18 | 19 | Online documentation of the class, methods, and variables can be found 20 | at http://www.phpcaptcha.org/Securimage_Docs/ 21 | 22 | ## Requirements: 23 | 24 | * PHP 5.2 or greater 25 | * GD 2.0 26 | * FreeType (Required, for TTF fonts) 27 | * PDO (if using Sqlite, MySQL, or PostgreSQL) 28 | 29 | ## Synopsis: 30 | 31 | **Within your HTML form** 32 | 33 |
34 | .. form elements 35 | 36 |
37 | 41 |
42 |
43 | 44 | 45 | **Within your PHP form processor** 46 | 47 | require_once 'securimage.php'; 48 | 49 | // Code Validation 50 | 51 | $image = new Securimage(); 52 | if ($image->check($_POST['captcha_code']) == true) { 53 | echo "Correct!"; 54 | } else { 55 | echo "Sorry, wrong code."; 56 | } 57 | 58 | ## Description: 59 | 60 | What is **Securimage**? 61 | 62 | Securimage is a PHP class that is used to generate and validate CAPTCHA images. 63 | 64 | The classes uses an existing PHP session or creates its own if none is found to 65 | store the CAPTCHA code. In addition, a database can be used instead of 66 | session storage. 67 | 68 | Variables within the class are used to control the style and display of the 69 | image. The class uses TTF fonts and effects for strengthening the security of 70 | the image. 71 | 72 | It also creates audible codes which are played for visually impared users. 73 | 74 | ## Copyright: 75 | Script 76 | Copyright (c) 2014 Drew Phillips 77 | All rights reserved. 78 | 79 | Redistribution and use in source and binary forms, with or without 80 | modification, are permitted provided that the following conditions are met: 81 | 82 | - Redistributions of source code must retain the above copyright notice, 83 | this list of conditions and the following disclaimer. 84 | - Redistributions in binary form must reproduce the above copyright notice, 85 | this list of conditions and the following disclaimer in the documentation 86 | and/or other materials provided with the distribution. 87 | 88 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 89 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 90 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 91 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 92 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 93 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 94 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 95 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 96 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 97 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 98 | POSSIBILITY OF SUCH DAMAGE. 99 | 100 | ## Licenses: 101 | 102 | **WavFile.php** 103 | 104 | The WavFile.php class used in Securimage by Drew Phillips and Paul Voegler 105 | is used under the BSD License. See WavFile.php for details. 106 | Many thanks to Paul Voegler (http://www.voegler.eu/) for contributing to 107 | Securimage. 108 | Script 109 | --------------------------------------------------------------------------- 110 | 111 | **Flash code for Securimage** 112 | 113 | Flash code created by Age Bosma & Mario Romero (animario@hotmail.com) 114 | Many thanks for releasing this to the project! 115 | 116 | --------------------------------------------------------------------------- 117 | 118 | **HKCaptcha** 119 | 120 | Portions of Securimage contain code from Han-Kwang Nienhuys' PHP captcha 121 | 122 | Han-Kwang Nienhuys' PHP captcha 123 | Copyright June 2007 124 | 125 | This copyright message and attribution must be preserved upon 126 | modification. Redistribution under other licenses is expressly allowed. 127 | Other licenses include GPL 2 or higher, BSD, and non-free licenses. 128 | The original, unrestricted version can be obtained from 129 | http://www.lagom.nl/linux/hkcaptcha/ 130 | 131 | --------------------------------------------------------------------------- 132 | 133 | **AHGBold.ttf** 134 | 135 | AHGBold.ttf (AlteHaasGroteskBold.ttf) font was created by Yann Le Coroller 136 | and is distributed as freeware. 137 | 138 | Alte Haas Grotesk is a typeface that look like an helvetica printed in an 139 | old Muller-Brockmann Book. 140 | 141 | These fonts are freeware and can be distributed as long as they are 142 | together with this text file. 143 | 144 | I would appreciate very much to see what you have done with it anyway. 145 | 146 | yann le coroller 147 | www.yannlecoroller.com 148 | yann@lecoroller.com 149 | 150 | --------------------------------------------------------------------------- 151 | 152 | **PopForge Flash Library** 153 | 154 | Portions of securimage_play.swf use the PopForge flash library for playing audio 155 | 156 | /** 157 | * Copyright(C) 2007 Andre Michelle and Joa Ebert 158 | * 159 | * PopForge is an ActionScript3 code sandbox developed by Andre Michelle 160 | * and Joa Ebert 161 | * http://sandbox.popforge.de 162 | * 163 | * PopforgeAS3Audio is free software; you can redistribute it and/or modify 164 | * it under the terms of the GNU General Public License as published by 165 | * the Free Software Foundation; either version 3 of the License, or 166 | * (at your option) any later version. 167 | * 168 | * PopforgeAS3Audio is distributed in the hope that it will be useful, 169 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 170 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 171 | * GNU General Public License for more details. 172 | * 173 | * You should have received a copy of the GNU General Public License 174 | * along with this program. If not, see 175 | */ 176 | 177 | -------------------------------------------------------------------------- 178 | 179 | **Graphics** 180 | 181 | Some graphics used are from the Humility Icon Pack by WorLord 182 | 183 | License: GNU/GPL (http://findicons.com/pack/1723/humility) 184 | http://findicons.com/icon/192558/gnome_volume_control 185 | http://findicons.com/icon/192562/gtk_refresh 186 | 187 | -------------------------------------------------------------------------- 188 | 189 | 190 | **Background noise sound files are from SoundJay.com** 191 | 192 | http://www.soundjay.com/tos.html 193 | 194 | All sound effects on this website are created by us and protected under 195 | the copyright laws, international treaty provisions and other applicable 196 | laws. By downloading sounds, music or any material from this site implies 197 | that you have read and accepted these terms and conditions: 198 | 199 | Sound Effects 200 | You are allowed to use the sounds free of charge and royalty free in your 201 | projects (such as films, videos, games, presentations, animations, stage 202 | plays, radio plays, audio books, apps) be it for commercial or 203 | non-commercial purposes. 204 | 205 | But you are NOT allowed to 206 | - post the sounds (as sound effects or ringtones) on any website for 207 | others to download, copy or use 208 | - use them as a raw material to create sound effects or ringtones that 209 | you will sell, distribute or offer for downloading 210 | - sell, re-sell, license or re-license the sounds (as individual sound 211 | effects or as a sound effects library) to anyone else 212 | - claim the sounds as yours 213 | - link directly to individual sound files 214 | - distribute the sounds in apps or computer programs that are clearly 215 | sound related in nature (such as sound machine, sound effect 216 | generator, ringtone maker, funny sounds app, sound therapy app, etc.) 217 | or in apps or computer programs that use the sounds as the program's 218 | sound resource library for other people's use (such as animation 219 | creator, digital book creator, song maker software, etc.). If you are 220 | developing such computer programs, contact us for licensing options. 221 | 222 | If you use the sound effects, please consider giving us a credit and 223 | linking back to us but it's not required. 224 | 225 | -------------------------------------------------------------------------------- /securimage/README.txt: -------------------------------------------------------------------------------- 1 | NAME: 2 | 3 | Securimage - A PHP class for creating captcha images and audio with many options. 4 | 5 | VERSION: 6 | 7 | 3.6.1 8 | 9 | AUTHOR: 10 | 11 | Drew Phillips 12 | 13 | DOWNLOAD: 14 | 15 | The latest version can always be 16 | found at http://www.phpcaptcha.org 17 | 18 | DOCUMENTATION: 19 | 20 | Online documentation of the class, methods, and variables can 21 | be found at http://www.phpcaptcha.org/Securimage_Docs/ 22 | 23 | REQUIREMENTS: 24 | 25 | PHP 5.2 or greater 26 | GD 2.0 27 | FreeType (Required, for TTF fonts) 28 | PDO (if using Sqlite, MySQL, or PostgreSQL) 29 | 30 | SYNOPSIS: 31 | 32 | require_once 'securimage.php'; 33 | 34 | **Within your HTML form** 35 | 36 |
37 | .. form elements 38 | 39 |
40 | 41 |
42 |
43 | 44 | 45 | **Within your PHP form processor** 46 | 47 | // Code Validation 48 | 49 | $image = new Securimage(); 50 | if ($image->check($_POST['captcha_code']) == true) { 51 | echo "Correct!"; 52 | } else { 53 | echo "Sorry, wrong code."; 54 | } 55 | 56 | DESCRIPTION: 57 | 58 | What is Securimage? 59 | 60 | Securimage is a PHP class that is used to generate and validate CAPTCHA 61 | images. 62 | 63 | The classes uses an existing PHP session or creates its own if 64 | none is found to store the CAPTCHA code. In addition, a database can be 65 | used instead of session storage. 66 | 67 | Variables within the class are used to control the style and display of 68 | the image. The class uses TTF fonts and effects for strengthening the 69 | security of the image. 70 | 71 | It also creates audible codes which are played for visually impared users. 72 | 73 | COPYRIGHT: 74 | 75 | Copyright (c) 2014 Drew Phillips 76 | All rights reserved. 77 | 78 | Redistribution and use in source and binary forms, with or without 79 | modification, are permitted provided that the following conditions are met: 80 | 81 | - Redistributions of source code must retain the above copyright notice, 82 | this list of conditions and the following disclaimer. 83 | - Redistributions in binary form must reproduce the above copyright notice, 84 | this list of conditions and the following disclaimer in the documentation 85 | and/or other materials provided with the distribution. 86 | 87 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 88 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 89 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 90 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 91 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 92 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 93 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 94 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 95 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 96 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 97 | POSSIBILITY OF SUCH DAMAGE. 98 | 99 | LICENSES: 100 | 101 | The WavFile.php class used in Securimage by Drew Phillips and Paul Voegler 102 | is used under the BSD License. See WavFile.php for details. 103 | Many thanks to Paul Voegler (http://www.voegler.eu/) for contributing to 104 | Securimage. 105 | 106 | --------------------------------------------------------------------------- 107 | Flash code created by Age Bosma & Mario Romero (animario@hotmail.com) 108 | Many thanks for releasing this to the project! 109 | 110 | --------------------------------------------------------------------------- 111 | Portions of Securimage contain code from Han-Kwang Nienhuys' PHP captcha 112 | 113 | Han-Kwang Nienhuys' PHP captcha 114 | Copyright June 2007 115 | 116 | This copyright message and attribution must be preserved upon 117 | modification. Redistribution under other licenses is expressly allowed. 118 | Other licenses include GPL 2 or higher, BSD, and non-free licenses. 119 | The original, unrestricted version can be obtained from 120 | http://www.lagom.nl/linux/hkcaptcha/ 121 | 122 | --------------------------------------------------------------------------- 123 | AHGBold.ttf (AlteHaasGroteskBold.ttf) font was created by Yann Le Coroller 124 | and is distributed as freeware. 125 | 126 | Alte Haas Grotesk is a typeface that look like an helvetica printed in an 127 | old Muller-Brockmann Book. 128 | 129 | These fonts are freeware and can be distributed as long as they are 130 | together with this text file. 131 | 132 | I would appreciate very much to see what you have done with it anyway. 133 | 134 | yann le coroller 135 | www.yannlecoroller.com 136 | yann@lecoroller.com 137 | 138 | --------------------------------------------------------------------------- 139 | Portions of securimage_play.swf use the PopForge flash library for 140 | playing audio 141 | 142 | /** 143 | * Copyright(C) 2007 Andre Michelle and Joa Ebert 144 | * 145 | * PopForge is an ActionScript3 code sandbox developed by Andre Michelle 146 | * and Joa Ebert 147 | * http://sandbox.popforge.de 148 | * 149 | * PopforgeAS3Audio is free software; you can redistribute it and/or modify 150 | * it under the terms of the GNU General Public License as published by 151 | * the Free Software Foundation; either version 3 of the License, or 152 | * (at your option) any later version. 153 | * 154 | * PopforgeAS3Audio is distributed in the hope that it will be useful, 155 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 156 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 157 | * GNU General Public License for more details. 158 | * 159 | * You should have received a copy of the GNU General Public License 160 | * along with this program. If not, see 161 | */ 162 | 163 | -------------------------------------------------------------------------- 164 | Some graphics used are from the Humility Icon Pack by WorLord 165 | 166 | License: GNU/GPL (http://findicons.com/pack/1723/humility) 167 | http://findicons.com/icon/192558/gnome_volume_control 168 | http://findicons.com/icon/192562/gtk_refresh 169 | 170 | -------------------------------------------------------------------------- 171 | Background noise sound files are from SoundJay.com 172 | http://www.soundjay.com/tos.html 173 | 174 | All sound effects on this website are created by us and protected under 175 | the copyright laws, international treaty provisions and other applicable 176 | laws. By downloading sounds, music or any material from this site implies 177 | that you have read and accepted these terms and conditions: 178 | 179 | Sound Effects 180 | You are allowed to use the sounds free of charge and royalty free in your 181 | projects (such as films, videos, games, presentations, animations, stage 182 | plays, radio plays, audio books, apps) be it for commercial or 183 | non-commercial purposes. 184 | 185 | But you are NOT allowed to 186 | - post the sounds (as sound effects or ringtones) on any website for 187 | others to download, copy or use 188 | - use them as a raw material to create sound effects or ringtones that 189 | you will sell, distribute or offer for downloading 190 | - sell, re-sell, license or re-license the sounds (as individual sound 191 | effects or as a sound effects library) to anyone else 192 | - claim the sounds as yours 193 | - link directly to individual sound files 194 | - distribute the sounds in apps or computer programs that are clearly 195 | sound related in nature (such as sound machine, sound effect 196 | generator, ringtone maker, funny sounds app, sound therapy app, etc.) 197 | or in apps or computer programs that use the sounds as the program's 198 | sound resource library for other people's use (such as animation 199 | creator, digital book creator, song maker software, etc.). If you are 200 | developing such computer programs, contact us for licensing options. 201 | 202 | If you use the sound effects, please consider giving us a credit and 203 | linking back to us but it's not required. 204 | 205 | -------------------------------------------------------------------------------- /securimage/audio/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all 2 | -------------------------------------------------------------------------------- /securimage/audio/en/0.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/0.wav -------------------------------------------------------------------------------- /securimage/audio/en/1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/1.wav -------------------------------------------------------------------------------- /securimage/audio/en/10.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/10.wav -------------------------------------------------------------------------------- /securimage/audio/en/11.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/11.wav -------------------------------------------------------------------------------- /securimage/audio/en/12.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/12.wav -------------------------------------------------------------------------------- /securimage/audio/en/13.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/13.wav -------------------------------------------------------------------------------- /securimage/audio/en/14.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/14.wav -------------------------------------------------------------------------------- /securimage/audio/en/15.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/15.wav -------------------------------------------------------------------------------- /securimage/audio/en/16.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/16.wav -------------------------------------------------------------------------------- /securimage/audio/en/17.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/17.wav -------------------------------------------------------------------------------- /securimage/audio/en/18.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/18.wav -------------------------------------------------------------------------------- /securimage/audio/en/19.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/19.wav -------------------------------------------------------------------------------- /securimage/audio/en/2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/2.wav -------------------------------------------------------------------------------- /securimage/audio/en/20.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/20.wav -------------------------------------------------------------------------------- /securimage/audio/en/3.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/3.wav -------------------------------------------------------------------------------- /securimage/audio/en/4.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/4.wav -------------------------------------------------------------------------------- /securimage/audio/en/5.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/5.wav -------------------------------------------------------------------------------- /securimage/audio/en/6.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/6.wav -------------------------------------------------------------------------------- /securimage/audio/en/7.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/7.wav -------------------------------------------------------------------------------- /securimage/audio/en/8.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/8.wav -------------------------------------------------------------------------------- /securimage/audio/en/9.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/9.wav -------------------------------------------------------------------------------- /securimage/audio/en/A.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/A.wav -------------------------------------------------------------------------------- /securimage/audio/en/B.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/B.wav -------------------------------------------------------------------------------- /securimage/audio/en/C.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/C.wav -------------------------------------------------------------------------------- /securimage/audio/en/D.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/D.wav -------------------------------------------------------------------------------- /securimage/audio/en/E.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/E.wav -------------------------------------------------------------------------------- /securimage/audio/en/F.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/F.wav -------------------------------------------------------------------------------- /securimage/audio/en/G.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/G.wav -------------------------------------------------------------------------------- /securimage/audio/en/H.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/H.wav -------------------------------------------------------------------------------- /securimage/audio/en/I.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/I.wav -------------------------------------------------------------------------------- /securimage/audio/en/J.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/J.wav -------------------------------------------------------------------------------- /securimage/audio/en/K.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/K.wav -------------------------------------------------------------------------------- /securimage/audio/en/L.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/L.wav -------------------------------------------------------------------------------- /securimage/audio/en/M.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/M.wav -------------------------------------------------------------------------------- /securimage/audio/en/MINUS.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/MINUS.wav -------------------------------------------------------------------------------- /securimage/audio/en/N.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/N.wav -------------------------------------------------------------------------------- /securimage/audio/en/O.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/O.wav -------------------------------------------------------------------------------- /securimage/audio/en/P.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/P.wav -------------------------------------------------------------------------------- /securimage/audio/en/PLUS.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/PLUS.wav -------------------------------------------------------------------------------- /securimage/audio/en/Q.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/Q.wav -------------------------------------------------------------------------------- /securimage/audio/en/R.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/R.wav -------------------------------------------------------------------------------- /securimage/audio/en/S.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/S.wav -------------------------------------------------------------------------------- /securimage/audio/en/T.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/T.wav -------------------------------------------------------------------------------- /securimage/audio/en/TIMES.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/TIMES.wav -------------------------------------------------------------------------------- /securimage/audio/en/U.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/U.wav -------------------------------------------------------------------------------- /securimage/audio/en/V.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/V.wav -------------------------------------------------------------------------------- /securimage/audio/en/W.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/W.wav -------------------------------------------------------------------------------- /securimage/audio/en/X.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/X.wav -------------------------------------------------------------------------------- /securimage/audio/en/Y.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/Y.wav -------------------------------------------------------------------------------- /securimage/audio/en/Z.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/Z.wav -------------------------------------------------------------------------------- /securimage/audio/en/error.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/en/error.wav -------------------------------------------------------------------------------- /securimage/audio/noise/check-point-1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/noise/check-point-1.wav -------------------------------------------------------------------------------- /securimage/audio/noise/crowd-talking-1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/noise/crowd-talking-1.wav -------------------------------------------------------------------------------- /securimage/audio/noise/crowd-talking-6.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/noise/crowd-talking-6.wav -------------------------------------------------------------------------------- /securimage/audio/noise/crowd-talking-7.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/noise/crowd-talking-7.wav -------------------------------------------------------------------------------- /securimage/audio/noise/kids-playing-1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/audio/noise/kids-playing-1.wav -------------------------------------------------------------------------------- /securimage/backgrounds/bg3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/backgrounds/bg3.jpg -------------------------------------------------------------------------------- /securimage/backgrounds/bg4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/backgrounds/bg4.jpg -------------------------------------------------------------------------------- /securimage/backgrounds/bg5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/backgrounds/bg5.jpg -------------------------------------------------------------------------------- /securimage/backgrounds/bg6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/backgrounds/bg6.png -------------------------------------------------------------------------------- /securimage/captcha.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 21 | 22 | 23 | Sample CAPTCHA HTML 24 | 25 | 26 | 27 | 28 |

Note: Running this on a PHP enabled server will likely work, but you should use example_form.php for testing instead.

29 | 30 |
31 | CAPTCHA Image 32 |
33 | 40 |
41 |
42 | 43 | Play CAPTCHA Audio 44 | 45 | 46 | 47 |
48 | 49 | 50 | Refresh Image 51 | 52 |
53 | 54 | 55 | 58 |
59 | 60 | 61 | 62 |
63 | 64 | 65 | 66 | 67 | 68 |

69 | 70 | 71 |
72 | 73 | CAPTCHA Image 74 | 75 | 76 |
77 | 78 | 90 |
91 | 92 |
93 | 94 | 95 | Play CAPTCHA Audio 96 | 97 | 98 | 99 |
100 | 101 | 102 | 103 | Refresh Image 104 | 105 |
106 | 107 | 108 | 109 | 128 |
129 | 130 | 131 | 132 | 133 |
134 | 135 | 136 | 137 | -------------------------------------------------------------------------------- /securimage/database/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all 2 | -------------------------------------------------------------------------------- /securimage/database/index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /securimage/database/securimage.sq3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/database/securimage.sq3 -------------------------------------------------------------------------------- /securimage/example_form.ajax.php: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | Securimage Example Form 21 | 29 | 30 | 31 | 32 |
33 | Example Form 34 | 35 |

36 | This is an example PHP form that processes user information, checks for errors, and validates the captcha code.
37 | This example form also demonstrates how to submit a form to itself to display error messages. 38 |

39 | 40 | 41 | 42 |
43 | 44 | 45 |

46 | Name*:
47 | 48 |

49 | 50 |

51 | Email*:
52 | 53 |

54 | 55 |

56 | URL:
57 | 58 |

59 | 60 |

61 | Message*:
62 | 63 |

64 | 65 |

66 | CAPTCHA Image 67 | 68 | 69 | 70 |   71 | Reload Image
72 | Enter Code*:
73 | 74 |

75 | 76 |

77 |
78 | 79 |

80 | 81 |
82 |
83 | 84 | 85 | 114 | 115 | 116 | 117 | 118 | $value) { 127 | if (!is_array($key)) { 128 | // sanitize the input data 129 | if ($key != 'ct_message') $value = strip_tags($value); 130 | $_POST[$key] = htmlspecialchars(stripslashes(trim($value))); 131 | } 132 | } 133 | 134 | $name = @$_POST['ct_name']; // name from the form 135 | $email = @$_POST['ct_email']; // email from the form 136 | $URL = @$_POST['ct_URL']; // url from the form 137 | $message = @$_POST['ct_message']; // the message from the form 138 | $captcha = @$_POST['ct_captcha']; // the user's entry for the captcha code 139 | $name = substr($name, 0, 64); // limit name to 64 characters 140 | 141 | $errors = array(); // initialize empty error array 142 | 143 | if (isset($GLOBALS['DEBUG_MODE']) && $GLOBALS['DEBUG_MODE'] == false) { 144 | // only check for errors if the form is not in debug mode 145 | 146 | if (strlen($name) < 3) { 147 | // name too short, add error 148 | $errors['name_error'] = 'Your name is required'; 149 | } 150 | 151 | if (strlen($email) == 0) { 152 | // no email address given 153 | $errors['email_error'] = 'Email address is required'; 154 | } else if ( !preg_match('/^(?:[\w\d-]+\.?)+@(?:(?:[\w\d]\-?)+\.)+\w{2,4}$/i', $email)) { 155 | // invalid email format 156 | $errors['email_error'] = 'Email address entered is invalid'; 157 | } 158 | 159 | if (strlen($message) < 20) { 160 | // message length too short 161 | $errors['message_error'] = 'Please enter a message'; 162 | } 163 | } 164 | 165 | // Only try to validate the captcha if the form has no errors 166 | // This is especially important for ajax calls 167 | if (sizeof($errors) == 0) { 168 | require_once dirname(__FILE__) . '/securimage.php'; 169 | $securimage = new Securimage(); 170 | 171 | if ($securimage->check($captcha) == false) { 172 | $errors['captcha_error'] = 'Incorrect security code entered'; 173 | } 174 | } 175 | 176 | if (sizeof($errors) == 0) { 177 | // no errors, send the form 178 | $time = date('r'); 179 | $message = "A message was submitted from the contact form. The following information was provided.

" 180 | . "Name: $name
" 181 | . "Email: $email
" 182 | . "URL: $URL
" 183 | . "Message:
" 184 | . "
$message
" 185 | . "

IP Address: {$_SERVER['REMOTE_ADDR']}
" 186 | . "Time: $time
" 187 | . "Browser: {$_SERVER['HTTP_USER_AGENT']}
"; 188 | 189 | if (isset($GLOBALS['DEBUG_MODE']) && $GLOBALS['DEBUG_MODE'] == false) { 190 | // send the message with mail() 191 | mail($GLOBALS['ct_recipient'], $GLOBALS['ct_msg_subject'], $message, "From: {$GLOBALS['ct_recipient']}\r\nReply-To: {$email}\r\nContent-type: text/html; charset=ISO-8859-1\r\nMIME-Version: 1.0"); 192 | } 193 | 194 | $return = array('error' => 0, 'message' => 'OK'); 195 | die(json_encode($return)); 196 | } else { 197 | $errmsg = ''; 198 | foreach($errors as $key => $error) { 199 | // set up error messages to display with each field 200 | $errmsg .= " - {$error}\n"; 201 | } 202 | 203 | $return = array('error' => 1, 'message' => $errmsg); 204 | die(json_encode($return)); 205 | } 206 | } // POST 207 | } // function process_si_contact_form() 208 | -------------------------------------------------------------------------------- /securimage/example_form.php: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | Securimage Example Form 22 | 23 | 34 | 35 | 36 | 37 |
38 | Example Form 39 | 40 |

41 | This is an example PHP form that processes user information, checks for errors, and validates the captcha code.
42 | This example form also demonstrates how to submit a form to itself to display error messages. 43 |

44 | 45 | 50 |
There was a problem with your submission. Errors are displayed below in red.

51 | 52 |
The captcha was correct and the message has been sent! The captcha was solved in seconds.

53 | 54 | 55 |
56 | 57 | 58 |

59 | 60 | 61 | 62 |

63 | 64 |

65 | 66 | 67 | 68 |

69 | 70 |

71 | 72 | 73 | 74 |

75 | 76 |

77 | 78 | 79 | 80 |

81 | 82 |
83 | 97 |
98 | 99 |

100 |
101 | 102 |

103 | 104 |
105 |
106 | 107 | 108 | 109 | 110 | $value) { 121 | if (!is_array($key)) { 122 | // sanitize the input data 123 | if ($key != 'ct_message') $value = strip_tags($value); 124 | $_POST[$key] = htmlspecialchars(stripslashes(trim($value))); 125 | } 126 | } 127 | 128 | $name = @$_POST['ct_name']; // name from the form 129 | $email = @$_POST['ct_email']; // email from the form 130 | $URL = @$_POST['ct_URL']; // url from the form 131 | $message = @$_POST['ct_message']; // the message from the form 132 | $captcha = @$_POST['ct_captcha']; // the user's entry for the captcha code 133 | $name = substr($name, 0, 64); // limit name to 64 characters 134 | 135 | $errors = array(); // initialize empty error array 136 | 137 | if (isset($GLOBALS['DEBUG_MODE']) && $GLOBALS['DEBUG_MODE'] == false) { 138 | // only check for errors if the form is not in debug mode 139 | 140 | if (strlen($name) < 3) { 141 | // name too short, add error 142 | $errors['name_error'] = 'Your name is required'; 143 | } 144 | 145 | if (strlen($email) == 0) { 146 | // no email address given 147 | $errors['email_error'] = 'Email address is required'; 148 | } else if ( !preg_match('/^(?:[\w\d-]+\.?)+@(?:(?:[\w\d]\-?)+\.)+\w{2,63}$/i', $email)) { 149 | // invalid email format 150 | $errors['email_error'] = 'Email address entered is invalid'; 151 | } 152 | 153 | if (strlen($message) < 20) { 154 | // message length too short 155 | $errors['message_error'] = 'Your message must be longer than 20 characters'; 156 | } 157 | } 158 | 159 | // Only try to validate the captcha if the form has no errors 160 | // This is especially important for ajax calls 161 | if (sizeof($errors) == 0) { 162 | require_once dirname(__FILE__) . '/securimage.php'; 163 | $securimage = new Securimage(); 164 | 165 | if ($securimage->check($captcha) == false) { 166 | $errors['captcha_error'] = 'Incorrect security code entered
'; 167 | } 168 | } 169 | 170 | if (sizeof($errors) == 0) { 171 | // no errors, send the form 172 | $time = date('r'); 173 | $message = "A message was submitted from the contact form. The following information was provided.

" 174 | . "Name: $name
" 175 | . "Email: $email
" 176 | . "URL: $URL
" 177 | . "Message:
" 178 | . "
$message
" 179 | . "

IP Address: {$_SERVER['REMOTE_ADDR']}
" 180 | . "Time: $time
" 181 | . "Browser: {$_SERVER['HTTP_USER_AGENT']}
"; 182 | 183 | $message = wordwrap($message, 70); 184 | 185 | if (isset($GLOBALS['DEBUG_MODE']) && $GLOBALS['DEBUG_MODE'] == false) { 186 | // send the message with mail() 187 | mail($GLOBALS['ct_recipient'], $GLOBALS['ct_msg_subject'], $message, "From: {$GLOBALS['ct_recipient']}\r\nReply-To: {$email}\r\nContent-type: text/html; charset=UTF-8\r\nMIME-Version: 1.0"); 188 | } 189 | 190 | $_SESSION['ctform']['timetosolve'] = $securimage->getTimeToSolve(); 191 | $_SESSION['ctform']['error'] = false; // no error with form 192 | $_SESSION['ctform']['success'] = true; // message sent 193 | } else { 194 | // save the entries, this is to re-populate the form 195 | $_SESSION['ctform']['ct_name'] = $name; // save name from the form submission 196 | $_SESSION['ctform']['ct_email'] = $email; // save email 197 | $_SESSION['ctform']['ct_URL'] = $URL; // save URL 198 | $_SESSION['ctform']['ct_message'] = $message; // save message 199 | 200 | foreach($errors as $key => $error) { 201 | // set up error messages to display with each field 202 | $_SESSION['ctform'][$key] = "$error"; 203 | } 204 | 205 | $_SESSION['ctform']['error'] = true; // set error floag 206 | } 207 | } // POST 208 | } 209 | 210 | $_SESSION['ctform']['success'] = false; // clear success value after running 211 | -------------------------------------------------------------------------------- /securimage/images/audio_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/images/audio_icon.png -------------------------------------------------------------------------------- /securimage/images/loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/images/loading.png -------------------------------------------------------------------------------- /securimage/images/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewsyc/Mini-PHP-social-network/4cb1d6412fff14b078ece3b15bd9d4443ea9e7ae/securimage/images/refresh.png -------------------------------------------------------------------------------- /securimage/securimage.css: -------------------------------------------------------------------------------- 1 | @CHARSET "UTF-8"; 2 | 3 | @-webkit-keyframes rotating /* Safari and Chrome */ { 4 | from { 5 | -ms-transform: rotate(0deg); 6 | -moz-transform: rotate(0deg); 7 | -webkit-transform: rotate(0deg); 8 | -o-transform: rotate(0deg); 9 | transform: rotate(0deg); 10 | } 11 | to { 12 | -ms-transform: rotate(360deg); 13 | -moz-transform: rotate(360deg); 14 | -webkit-transform: rotate(360deg); 15 | -o-transform: rotate(360deg); 16 | transform: rotate(360deg); 17 | } 18 | } 19 | @keyframes rotating { 20 | from { 21 | -ms-transform: rotate(0deg); 22 | -moz-transform: rotate(0deg); 23 | -webkit-transform: rotate(0deg); 24 | -o-transform: rotate(0deg); 25 | transform: rotate(0deg); 26 | } 27 | to { 28 | -ms-transform: rotate(360deg); 29 | -moz-transform: rotate(360deg); 30 | -webkit-transform: rotate(360deg); 31 | -o-transform: rotate(360deg); 32 | transform: rotate(360deg); 33 | } 34 | } 35 | .rotating { 36 | -webkit-animation: rotating 1.5s linear infinite; 37 | -moz-animation: rotating 1.5s linear infinite; 38 | -ms-animation: rotating 1.5s linear infinite; 39 | -o-animation: rotating 1.5s linear infinite; 40 | animation: rotating 1.5s linear infinite; 41 | } -------------------------------------------------------------------------------- /securimage/securimage.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Securimage CAPTCHA Audio Library 3 | * https://www.phpcaptcha.org/ 4 | * 5 | * Copyright 2015 phpcaptcha.org 6 | * Released under the BSD-3 license 7 | * See https://github.com/dapphp/securimage/blob/master/README.md 8 | */ 9 | 10 | var SecurimageAudio = function(options) { 11 | this.html5Support = true; 12 | this.flashFallback = false; 13 | this.captchaId = null; 14 | this.playing = false; 15 | this.reload = false; 16 | this.audioElement = null; 17 | this.controlsElement = null; 18 | this.playButton = null; 19 | this.playButtonImage = null; 20 | this.loadingImage = null; 21 | 22 | if (options.audioElement) { 23 | this.audioElement = document.getElementById(options.audioElement); 24 | } 25 | if (options.controlsElement) { 26 | this.controlsElement = document.getElementById(options.controlsElement); 27 | } 28 | 29 | this.init(); 30 | } 31 | 32 | SecurimageAudio.prototype.init = function() { 33 | var ua = navigator.userAgent.toLowerCase(); 34 | var ieVer = (ua.indexOf('msie') != -1) ? parseInt(ua.split('msie')[1]) : false; 35 | // ie 11+ detection 36 | if (!ieVer && null != (ieVer = ua.match(/trident\/.*rv:(\d+\.\d+)/))) 37 | ieVer = parseInt(ieVer[1]); 38 | 39 | var objAu = this.audioElement.getElementsByTagName('object'); 40 | if (objAu.length > 0) { 41 | objAu = objAu[0]; 42 | } else { 43 | objAu = null; 44 | } 45 | 46 | if (ieVer) { 47 | if (ieVer < 9) { 48 | // no html5 audio support, hide player controls 49 | this.controlsElement.style.display = 'none'; 50 | this.html5Support = false; 51 | return ; 52 | } else if ('' == this.audioElement.canPlayType('audio/wav')) { 53 | // check for mpeg tag - if not found then fallback to flash 54 | var sources = this.audioElement.getElementsByTagName('source'); 55 | var mp3support = false; 56 | var type; 57 | 58 | if (objAu) { 59 | this.flashFallback = true; 60 | } 61 | 62 | for (var i = 0; i < sources.length; ++i) { 63 | type = sources[i].attributes["type"].value; 64 | if (type.toLowerCase().indexOf('mpeg') >= 0 || type.toLowerCase().indexOf('mp3') >= 0) { 65 | mp3support = true; 66 | break; 67 | } 68 | } 69 | 70 | if (false == mp3support) { 71 | // browser supports