forked from 4ducky/4ducky
The PHP sources, templates and old jQuery-based scripts move unchanged into legacy/ for reference. Shared assets (media/, images/, favicon.ico, the default avatar) stay at the repository root. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
34 lines
838 B
PHP
34 lines
838 B
PHP
<?php
|
|
|
|
header("Content-type: text/html; charset=UTF-8");
|
|
require_once( 'lib/config.php' );
|
|
require_once( 'lib/users.php' );
|
|
require_once( 'lib/db.php' );
|
|
|
|
$user = new User();
|
|
$user->login();
|
|
|
|
$status = 'ready';
|
|
|
|
if (is_numeric($user->isSpamming())){
|
|
$status = 'failed';
|
|
if( $user->isSpamming() > 0 ){
|
|
$uploadErrors[] = 'Upload gesperrt bis: '.date("D M j G:i:s T Y",$user->isSpamming());
|
|
}
|
|
|
|
}elseif( $user->id && !$user->isSpamLocked() && !$user->isSpamer() && !$user->isSpamming() && !empty($_GET['url'])) {
|
|
$uploadErrors = array();
|
|
require_once( 'lib/imageuploader.php' );
|
|
if(
|
|
ImageUploader::copyFromUrl( $_GET['url'], '', $_SERVER['HTTP_REFERER'], $uploadErrors)
|
|
) {
|
|
$status = 'posted';
|
|
$user->logUpload();
|
|
} else {
|
|
$status = 'failed';
|
|
}
|
|
}
|
|
|
|
include( Config::$templates.'remotepost.tpl.php' );
|
|
|
|
?>
|