Agen Terpercaya  
 
 
 
 
Pasang iklan, hanya lewat Contact Us.
Waspada penipuan iklan. Klik di sini untuk melihat daftar penipu.

SHARE MEMBUAT IMAGE HOSTING PART 1

RayMantic

Moderator
Staff member
Moderator
Daftar
4 Oct 1988
Post
×
Like diterima
9.120
Bimabet
[hide]
LINK DEMO DIBAWAH INI :


*link diatas tidak permanen/sementara ,jika nubi rasa cukup [server down]
*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;
}
acount.php
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>
contact.php
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>
faq.php
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 &amp; conditions</li>

        <li>Can people browse through uploaded images?</li>
        <li>Nope. Every upload is given a random, non-sequential ID</li>

    </ul>

</div>
footer.php
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 &amp; 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>
header.php
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">
login.php
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>
[/hide]
 
Terakhir diubah:
Bimabet
[hide]
main.php
Code:
lewat PM
message.php
Code:
<?php

if (!defined('IN_SCRIPT'))
{
    header('location: ../index.php');
    exit;
}

?>

<div class="box">

    <p class="title">Message</p>

    <p><?php echo $message; ?></p>

</div>
register.php
Code:
<?php

if (!defined('IN_SCRIPT'))
{
    header('location: ../index.php');
    exit;
}

?>

<div class="box">

    <p class="title">Register</p>

    <p>You can register an account which will allow you to keep track of your uploaded images</p>

    <form name="register" method="POST" action="register.php">
        <input name="email" type="text" placeholder="email..." />
        <input name="email-confirm" type="text" placeholder="confirm email..." />
        <input name="password" type="password" placeholder="password... (8 characters minimum)" />
        <input name="password-confirm" type="password" placeholder="confirm password... (8 characters minimum)" />
        <input name="submit" type="submit" value="Register" />
    </form>

</div>
tc.php
Code:
<?php

if (!defined('IN_SCRIPT'))
{
    header('location: ../index.php');
    exit;
}

?>

<div class="box">

    <p class="title">Terms &amp; Conditions</p>

    <p>You must not use <?php echo SITE_NAME; ?> to upload any of the following:</p>

    <ul class="tc">
        <li>Copyrighted images (images owned by someone else) unless you have explicit permission</li>
        <li>Images which are considered illegal</li>
    </ul>

    <p>Things to note when using <?php echo SITE_NAME; ?>:</p>

    <ul class="tc">
        <li>When uploading an image, your IP address will be stored. We will not provide this information to anybody unless requested by law enforcement authorities.</li>
        <li><?php echo SITE_NAME; ?> has the right to remove any images at it's discretion</li>
    </ul>

</div>
view.php
Code:
<?php

if (!defined('IN_SCRIPT'))
{
    header('location: ../index.php');
    exit;
}

?>

<div id="sidebar">

    <ul id="links" class="box sidebar-box">
        <li>preview link (email &amp; chat)</li>
        <li><input type="text" value="<?php echo VIEW_URL . $id; ?>" readonly /></li>
        <li>direct link (websites &amp; backgrounds)</li>
        <li><input type="text" value="<?php echo IMAGES_URL . $id . '.' . $ext; ?>" readonly /></li>
        <li>html code (websites)</li>
        <li><input type="text" size="25" value="<img src=&#34;<?php echo IMAGES_URL . $id . '.' . $ext; ?>&#34; alt=&#34;<?php echo $id; ?>&#34; />" readonly /></li>
        <li>bb code (forums)</li>
        <li><input type="text" size="25" value="[img]<?php echo IMAGES_URL . $id . '.' . $ext; ?>[/img]" readonly /></li>
        <li>linked bb code (forums)</li>
        <li><input type="text" size="25" value="[url=<?php echo VIEW_URL . $id; ?>][img]<?php echo IMAGES_URL . $id . '.' . $ext; ?>[/img][/url]" readonly /></li>
    </ul>

    <ul id="info" class="box sidebar-box">
        <li>image ID: <?php echo $id; ?></li>
        <li>image dimensions: <?php echo $dimensions[0] . 'x' . $dimensions[1]; ?></li>
        <li>image size: <?php echo ($size > 1024 ? round(($size / 1024), 1) . 'MB' : round($size, 1) . 'KB' ); ?></li>
        <li>image type: <?php echo $ext; ?></li>

<?php

if (isset($_SESSION['admin']))
{

?>

        <li>upload time: <?php echo $time; ?></li>
        <li>uploader IP: <?php echo $ip; ?></li>

<?php

}

?>

    </ul>

    <ul id="report">

<?php

if (isset($_SESSION['admin']) || (isset($_SESSION['user']) && ($_SESSION['user'] === $user)))
{

?>

        <li><a class="delete" href="delete.php?id=<?php echo $id; ?>">DELETE this image</a></li>

<?php

}

else
{

?>

        <li><a href="report.php?id=<?php echo $id; ?>">report this image</a></li>

<?php

}

if (isset($_SESSION['admin']))
{

?>

        <li><a id="ban" href="ban.php?id=<?php echo $user; ?>">BAN user and DELETE ALL IMAGES</a></li>

<?php

}

?>

    </ul>

</div>

<div id="image" class="box">
    <img src="<?php echo IMAGES_URL . $id . '.' . $ext; ?>" />
</div>
[/hide]
SAMBUNGAN DI PART 2
PART 1 SELESAI:)


HARGAILAH HASIL KARYA ORANG LAIN...APRESIASILAH.... KARENA BETAPA SUSAHNYA PARA ADMIN YANG SUDAH BERSEDIA MEMBUATKAN RUMAH BERUPA WEB/APLIKASI DLL UNTUK KITA NIKMATI.
 
Terakhir diubah:
Jav Toys
Gaple Online Indonesia
Pasang iklan hanya lewat CONTACT US
Back
Top
We are now part of LS Media Ltd