mirror of
https://github.com/itflow-org/itflow
synced 2026-03-10 15:54:51 +00:00
Tidy
- Move some scripts to their own js files - Move some duplicate code blocks to functions - General tidy & spacing cleanups (#538)
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
<?php
|
||||
// Not including the guest header as we don't want any HTML output
|
||||
include("config.php");
|
||||
include("functions.php");
|
||||
require_once("config.php");
|
||||
require_once("functions.php");
|
||||
|
||||
$ip = trim(strip_tags(mysqli_real_escape_string($mysqli,getIP())));
|
||||
$user_agent = strip_tags(mysqli_real_escape_string($mysqli,$_SERVER['HTTP_USER_AGENT']));
|
||||
|
||||
@@ -32,8 +33,7 @@ if (isset($_GET['id']) && isset($_GET['key'])) {
|
||||
|
||||
if (empty($row['item_views'])) {
|
||||
$item_views = 0;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$item_views = intval($row['item_views']);
|
||||
}
|
||||
|
||||
@@ -64,5 +64,4 @@ if (isset($_GET['id']) && isset($_GET['key'])) {
|
||||
// Logging
|
||||
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Sharing', log_action = 'View', log_description = 'Downloaded shared file $file_name via link', log_client_id = '$client_id', log_created_at = NOW(), log_ip = '$ip', log_user_agent = '$user_agent', company_id = '1'");
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user