<commit_before><?php
@include_once('config.php');
require_once('../includes/configcheck.php');
require_once('../includes/baseconfig.php');
require_once('../includes/helpers.php');
session_start();
?>
<!doctype html>
<!--
	TemPIC - Copyright 2014 PotcFdk, ukgamer

	Licensed under the Apache License, Version 2.0 (the "License");
	you may not use this file except in compliance with the License.
	You may obtain a copy of the License at
	
	http://www.apache.org/licenses/LICENSE-2.0
	
	Unless required by applicable law or agreed to in writing, software
	distributed under the License is distributed on an "AS IS" BASIS,
	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	See the License for the specific language governing permissions and
	limitations under the License.
-->
<?php
	// Make sure $files, $album_id and $remaining_time contain the data we want.

	if (!empty($_SESSION['files'])) {
		$files = $_SESSION['files'];
		$album_id = $_SESSION['album_id'];
		if (!empty($_SESSION['album_lifetime']) && !empty($LIFETIMES[$_SESSION['album_lifetime']]))
			$remaining_time = $LIFETIMES[$_SESSION['album_lifetime']];
	}

	if (empty($files) && isset($_GET['album'])) {
		$album_id = strip_album_id($_GET['album']);
		if (!empty($album_id)) {
			$_a = explode(":", $album_id, 2);
			$a_lifetime = $_a[0];
			$a_hash = $_a[1];
			
			if (!empty($LIFETIMES[$a_lifetime]) && file_exists($PATH_ALBUM.'/'.$a_lifetime.'/'.$a_hash.'.txt')) {
				$time  = time ();
				$album = unserialize(file_get_contents($PATH_ALBUM.'/'.$a_lifetime.'/'.$a_hash.'.txt'));
				if (!empty($album)) {
					$files = $album;
				}
				$remaining_time = $LIFETIMES[$a_lifetime]['time']*60 - ($time - filemtime ($PATH_ALBUM.'/'.$a_lifetime.'/'.$a_hash.'.txt'));
			}
		}
	}
?>
<html>
	<head>
		<meta charset="utf-8">
		<title><?php echo $INSTANCE_NAME; ?></title>

		<link rel="stylesheet" href="css/bootstrap.min.css">
		<link href="css/fileinput.min.css" media="all" rel="stylesheet" type="text/css" />
		<link href="css/copyrotate.css" media="all" rel="stylesheet" type="text/css" />
		<link href="css/tempic-front.css" media="all" rel="stylesheet" type="text/css" />
	</head>
	<body>
		<?php include('../includes/copyrotate.php'); ?>
		<div class="container">
			<div class="row">
				<div class="col-md-12">
					<div class="page-header">
						<h1><a href="<?php echo $URL_BASE.'/index_nojs.php'; ?>"><?php echo $INSTANCE_NAME; ?></a></h1>
					</div>

					<form class="form-horizontal" method="post" action="upload.php" enctype="multipart/form-data">
						<div class="form-group">
							<input type="hidden" name="nojs" value="true">
							<label for="file" class="col-md-1 control-label">Files</label>
							<div class="col-md-6">
								<input class="file" type="file" name="file[]" id="file" multiple="multiple">
							</div>
							<div class="col-md-2">
								<input class="submit" type="submit" name="submit" id="submit">
							</div>
							<div class="col-md-3">
								<select class="form-control" name="lifetime">
								<?php foreach ($LIFETIMES as $id => $data) : ?>
									<option value="<?php echo $id; ?>"<?php<commit_msg>Now notifying users that they are using the nojs version, added link to normal version.<commit_after><?php
@include_once('config.php');
require_once('../includes/configcheck.php');
require_once('../includes/baseconfig.php');
require_once('../includes/helpers.php');
session_start();
?>
<!doctype html>
<!--
	TemPIC - Copyright 2014 PotcFdk, ukgamer

	Licensed under the Apache License, Version 2.0 (the "License");
	you may not use this file except in compliance with the License.
	You may obtain a copy of the License at
	
	http://www.apache.org/licenses/LICENSE-2.0
	
	Unless required by applicable law or agreed to in writing, software
	distributed under the License is distributed on an "AS IS" BASIS,
	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	See the License for the specific language governing permissions and
	limitations under the License.
-->
<?php
	// Make sure $files, $album_id and $remaining_time contain the data we want.

	if (!empty($_SESSION['files'])) {
		$files = $_SESSION['files'];
		$album_id = $_SESSION['album_id'];
		if (!empty($_SESSION['album_lifetime']) && !empty($LIFETIMES[$_SESSION['album_lifetime']]))
			$remaining_time = $LIFETIMES[$_SESSION['album_lifetime']];
	}

	if (empty($files) && isset($_GET['album'])) {
		$album_id = strip_album_id($_GET['album']);
		if (!empty($album_id)) {
			$_a = explode(":", $album_id, 2);
			$a_lifetime = $_a[0];
			$a_hash = $_a[1];
			
			if (!empty($LIFETIMES[$a_lifetime]) && file_exists($PATH_ALBUM.'/'.$a_lifetime.'/'.$a_hash.'.txt')) {
				$time  = time ();
				$album = unserialize(file_get_contents($PATH_ALBUM.'/'.$a_lifetime.'/'.$a_hash.'.txt'));
				if (!empty($album)) {
					$files = $album;
				}
				$remaining_time = $LIFETIMES[$a_lifetime]['time']*60 - ($time - filemtime ($PATH_ALBUM.'/'.$a_lifetime.'/'.$a_hash.'.txt'));
			}
		}
	}
?>
<html>
	<head>
		<meta charset="utf-8">
		<title><?php echo $INSTANCE_NAME; ?></title>

		<link rel="stylesheet" href="css/bootstrap.min.css">
		<link href="css/fileinput.min.css" media="all" rel="stylesheet" type="text/css" />
		<link href="css/copyrotate.css" media="all" rel="stylesheet" type="text/css" />
		<link href="css/tempic-front.css" media="all" rel="stylesheet" type="text/css" />
	</head>
	<body>
		<?php include('../includes/copyrotate.php'); ?>
		<div class="container">
			<div class="row">
				<div class="col-md-12">
					<div class="page-header">
						<h1><a href="<?php echo $URL_BASE.'/index_nojs.php'; ?>"><?php echo $INSTANCE_NAME; ?></a></h1>
						<h4>NoJS version - <a href="/">click here</a> to access the normal version.</h4>
					</div>

					<form class="form-horizontal" method="post" action="upload.php" enctype="multipart/form-data">
						<div class="form-group">
							<input type="hidden" name="nojs" value="true">
							<label for="file" class="col-md-1 control-label">Files</label>
							<div class="col-md-6">
								<input class="file" type="file" name="file[]" id="file" multiple="multiple">
							</div>
							<div class="col-md-2">
								<input class="submit" type="submit" name="submit" id="submit">
							</div>
							<div class="col-md-3">
								<select class="form-control" name="lifetime">
								<?php foreach ($LIFETIMES as $id => $data) : ?>
									<option value="<?php echo $id; ?>"<?php
{'fraction_non_alphanumeric': 0.1966908922220504, 'fraction_numerical': 0.007113035410545848, 'mean_word_length': 4.061032863849765, 'pattern_counts': {'":': 2, '<': 97, '<?xml version=': 0, '>': 95, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5857350', 'n_tokens_mistral': 2540, 'n_tokens_neox': 2212, 'n_words': 503}