fixed some erros

This commit is contained in:
root
2017-06-29 06:34:13 -04:00
parent 78c93db0fa
commit b879aae8e2
3 changed files with 73 additions and 1 deletions

11
README.md Normal file
View File

@@ -0,0 +1,11 @@
# OPTIONS
max_allowed_packet = 16M
CREATE USER 'image'@'localhost' IDENTIFIED BY 'image';
CREATE DATABASE image;
GRANT ALL PRIVILEGES ON image.* TO image@localhost;
# INSTALL
yum install httpd mysqld php php-gd -y

55
content/styles.css Normal file
View File

@@ -0,0 +1,55 @@
/* Custom background color for the nav-bar element. */
.navbar {
background-color: #d9edf7; /*matches bg-info*/
background-image: none;
background-repeat: no-repeat;
filter: none;
}
/* Support for custom-looking File Selection button. */
.btn-file {
position: relative;
overflow: hidden;
}
.btn-file input[type=file] {
position: absolute;
top: 0;
right: 0;
min-width: 100%;
min-height: 100%;
font-size: 100px;
text-align: right;
filter: alpha(opacity=0);
opacity: 0;
outline: none;
background: white;
cursor: inherit;
display: block;
}
/* Styling/framing for the image elements. */
img {
width: 192px;
background-color: white;
padding: 5px 5px 30px 5px;
cursor: pointer;
}
/* Custom queries for force line breaks depending on the resolution. */
@media (min-width: 1200px) {
.col-lg-2:nth-child(6n+1) {
clear: both;
}
}
@media (min-width: 992pxpx) and (max-width: 1200px) {
.col-md-4:nth-child(3n+1) {
clear: both;
}
}
@media (min-width: 768px) and (max-width: 992px) {
.col-sm-6:nth-child(2n+1) {
clear: both;
}
}

View File

@@ -1,7 +1,13 @@
<?php <?php
if ((isset($_GET['id']) && is_numeric($_GET['id'])) === FALSE) die; if ((isset($_GET['id']) && is_numeric($_GET['id'])) === FALSE) die;
if (!function_exists('getimagesizefromstring')) {
function getimagesizefromstring($string_data)
{
$uri = 'data://application/octet-stream;base64,' . base64_encode($string_data);
return getimagesize($uri);
}
}
include "images.php"; include "images.php";
$imageId = $_GET['id']; $imageId = $_GET['id'];
$image = Images::GetImage($imageId); $image = Images::GetImage($imageId);