- Daftar
- 4 Oct 1988
- Post
- ★
- Like diterima
- 9.150
[hide]
HASIL JADI
BUAT FOLDER PUBLIC YANG STRUKTUR DIDALAMNYA
PART1
CSS = UPLOAD.CSS
INCLUDE = ACOUNT,CONTACT,FAQ,FOOTER,HEADER,LOGIN,MAIN,MESSAGE,TC,REG,VIEW
upload.css
acount.php
contact.php
faq.php
footer.php
header.php
login.php
[/hide]
*tidak untuk konten adult/sara .etc 18+ / melanggar hukum
*hanya untuk view tutorial
HASIL JADI
BUAT FOLDER PUBLIC YANG STRUKTUR DIDALAMNYA
PART1
CSS = UPLOAD.CSS
INCLUDE = ACOUNT,CONTACT,FAQ,FOOTER,HEADER,LOGIN,MAIN,MESSAGE,TC,REG,VIEW
upload.css
Code:
@import url('http://fonts.googleapis.com/css?family=Open Sans:400,600');
* {
margin: 0;
padding: 0;
}
body {
color: #666;
}
body {
background-color: #F3F3F3;
font-family: 'Open Sans', 'Arial', sans-serif;
font-size: 0.875em;
font-weight: 400;
}
a {
color: #09F;
text-decoration: none;
}
p {
margin-bottom: 10px;
}
p:last-child {
margin-bottom: 0;
}
li {
margin-bottom: 5px;
list-style-type: none;
}
li:last-child {
margin-bottom: 0;
}
form[name='login'] input, form[name='register'] input {
display: block;
margin-bottom: 10px;
background-color: #F3F3F3;
}
form[name='login'] input:last-child, form[name='register'] input:last-child {
margin-bottom: 0;
}
input {
width: 100%;
padding: 5px;
color: #666;
border: none;
outline: none;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
form[name='login'] input, form[name='register'] input {
padding: 10px 10px;
}
form[name='login'] input[type='submit'], form[name='register'] input[type='submit'] {
padding: 15px 10px;
background-color: #3BF;
color: #FFF;
text-transform: uppercase;
}
.black,
#faq li:nth-child(odd) {
color: #000;
}
.box {
margin-bottom: 10px;
padding: 10px;
background-color: #FFF;
}
.box:last-child {
margin-bottom: 0;
}
.title {
margin-bottom: 15px;
color: #06F;
font-weight: 600;
}
.hidden {
display: none;
}
.sidebar-box {
color: #FFF;
}
.sidebar-box li {
margin: 0 10px 5px 0;
}
.sidebar-box li:last-child {
margin-bottom: 0;
}
.sidebar-box input {
width: 100%;
background-color: #FFF;
}
.code {
padding: 2px;
background-color: #777;
}
.tc {
margin-bottom: 15px;
}
.tc:last-child {
margin-bottom: 0;
}
.tc li {
margin: 0 0 5px 30px;
list-style-type: square;
}
.tc li:last-child {
margin-bottom: 0;
}
.user-image-box {
display: inline-block;
margin: 0 5px 15px;
}
.user-image {
border: #F3F3F3 solid 5px;
}
.image-actions {
text-align: left;
}
.delete, #report a {
color: #F33;
}
#header {
padding: 0 20px;
background-color: #222;
color: #FFF;
text-transform: uppercase;
}
#navbar {
float: right;
}
#navbar li {
display: inline-block;
border-left: #444 solid 1px;
}
#navbar li:last-child {
border-right: #444 solid 1px;
}
#navbar li a {
display: inline-block;
padding: 20px 20px;
color: #FFF;
}
#navbar li a:hover {
background-color: #111;
color: #FFF;
}
#logo {
padding: 20px 0;
}
#main {
margin: 10px 10px 0;
}
#select-image {
padding: 30px 10px;
background-color: #3BF;
color: #FFF;
text-align: center;
text-transform: uppercase;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}
#select-image:hover {
background-color: #2AF;
}
#cancel-image {
margin-bottom: 10px;
color: #F33;
text-align: center;
font-size: 0.75em;
font-weight: bold;
}
#cancel-image span {
cursor: pointer;
}
#download-url {
width: 250px;
float: right;
padding: 0;
}
#download-url input {
padding: 15px 10px;
background-color: #9A6;
color: #FFF;
text-transform: uppercase;
}
#download-url input:hover {
background-color: #796;
cursor: pointer;
}
#select-url {
margin-right: 250px;
padding: 0;
cursor: text;
}
#select-url-input {
padding: 15px 10px;
}
#allowed-ext {
text-transform: uppercase;
}
#sidebar {
float: right;
width: 270px;
}
#links {
background-color: #3BF;
}
#info {
margin-bottom: 10px;
background-color: #111;
}
#report {
text-align: center;
}
#report a {
font-size: 0.75em;
font-weight: bold;
}
#image {
margin: 0 280px 20px 0;
text-align: center;
}
#image img {
max-width: 100%;
}
#user-images {
text-align: center;
}
#faq li:nth-child(even) {
margin-bottom: 10px;
}
#faq li:last-child {
margin-bottom: 0;
}
#footer {
clear: both;
margin: 10px 20px 0;
color: #DDD;
text-align: center;
}
#footer a {
margin: 0 10px;
color: #999;
}
Code:
<?php
if (!defined('IN_SCRIPT'))
{
header('location: ../index.php');
exit;
}
?>
<div class="box">
<p class="title">Your account</p>
<p>Welcome to your account. You can view all of your uploads here, see the upload time and delete them</p>
<div id="user-images"><!--
<?php
while (mysqli_stmt_fetch($images))
{
?>
--><div class="user-image-box">
<a href="<?php echo VIEW_PATH . $id; ?>"><img class="user-image" src="thumbs/<?php echo $id . '.jpg'; ?>" alt="<?php echo $id; ?>" /></a>
<ul class="image-actions">
<li>uploaded <?php echo $time; ?></li>
<li><a class="delete" href="delete.php?id=<?php echo $id; ?>">DELETE image</a></li>
</ul>
</div><!--
<?php
}
?>
--></div>
<?php
mysqli_stmt_close($images);
mysqli_close($db);
?>
</div>
Code:
<?php
if (!defined('IN_SCRIPT'))
{
header('location: ../index.php');
exit;
}
?>
<div class="box">
<p class="title">Contact</p>
<p>If you would like to contact us, please email <?php echo CONTACT_EMAIL; ?></p>
</div>
Code:
<?php
if (!defined('IN_SCRIPT'))
{
header('location: ../index.php');
exit;
}
$i = 0;
$allowed_size = ALLOWED_SIZE;
while ($allowed_size >= 1000)
{
$allowed_size = ($allowed_size / 1000);
++$i;
}
$units = array('', 'K', 'M');
$size = round($allowed_size, 1) . $units[$i];
?>
<div class="box">
<p class="title">FAQs</p>
<ul id="faq">
<li>Is <?php echo SITE_NAME; ?> really free?</li>
<li>Yes! It is 100% free to use</li>
<li>Which types of image can I upload?</li>
<li>You can upload images with the following extensions: <span class="black">PNG, JPG, GIF</span></li>
<li>Can I upload big images?</li>
<li>Yes! You can upload any image up to <span class="black"><?php echo $size; ?>B</span> in size</li>
<li>Will you delete my image after X days?</li>
<li>Nope. We will only delete your image if it is against our terms & conditions</li>
<li>Can people browse through uploaded images?</li>
<li>Nope. Every upload is given a random, non-sequential ID</li>
</ul>
</div>
Code:
<?php
if (!defined('IN_SCRIPT'))
{
header('location: ../index.php');
exit;
}
?>
</div>
<div id="footer">
<a href="faq.php">FAQ</a>|<a href="tc.php">Terms & Conditions</a>|<a href="contact.php">Contact</a>
<!-- page generated in <?php echo round((microtime(true) - $start), 5); ?> seconds with <?php echo $db_queries; ?> DB quer<?php echo ($db_queries === 1 ? 'y' : 'ies'); ?> -->
</div>
<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/upload.js" type="text/javascript"></script>
</body>
</html>
Code:
<?php
if (!defined('IN_SCRIPT'))
{
header('location: ../index.php');
exit;
}
?>
<!DOCTYPE html>
<html>
<head>
<title><?php echo SITE_NAME; ?></title>
<link href="css/upload.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<ul id="navbar">
<!-- need to use a dirty hack here to avoid whitespace in between navbar buttons -->
<li><a href="index.php">upload</a></li><!--
<?php
if (isset($_SESSION['user']))
{
?>
--><li><a href="account.php">my account</a></li><!--
--><li><a href="logout.php">logout</a></li>
<?php
}
else
{
?>
--><li><a href="login.php">login</a></li><li><a href="register.php">register</a></li>
<?php
}
?>
</ul>
<div id="logo"><?php echo SITE_NAME; ?></div>
</div>
<div id="main">
Code:
<?php
if (!defined('IN_SCRIPT'))
{
header('location: ../index.php');
exit;
}
?>
<div class="box">
<p class="title">Log in</p>
<p>Log in to your account to manage your uploads</p>
<form name="login" method="POST" action="login.php">
<input name="email" type="text" placeholder="email..." />
<input name="password" type="password" placeholder="password..." />
<input name="submit" type="submit" value="Log in" />
</form>
</div>
Terakhir diubah: