Logo has to be either jpeg/png file "; } */ else { $savelogo="false"; $errormessage = " Logo has to be an Image "; } } else { $savelogo="false"; $errormessage = "Error Message
" ; deleteFile($uploaddir,$filename); } } else { $errorCode = $_FILES['binFile']['error']; if($errorCode == 4) { $savelogo="true"; $errorcode=""; $saveflag="true"; } else if($errorCode == 2) { $errormessage = "Sorry, the uploaded file exceeds the maximum filesize limit. Please try a file smaller than 1000000 bytes
"; $savelogo="false"; } else if($errorCode == 3) { $errormessage = "Problems in file upload. Please try again!
"; $savelogo="false"; } } function deleteFile($dir,$filename) { unlink($dir.$filename); } if($saveflag=="true") { $organization_name=$_REQUEST['organization_name']; $org_name=$_REQUEST['org_name']; $organization_address=$_REQUEST['organization_address']; $organization_city=$_REQUEST['organization_city']; $organization_state=$_REQUEST['organization_state']; $organization_code=$_REQUEST['organization_code']; $organization_country=$_REQUEST['organization_country']; $organization_phone=$_REQUEST['organization_phone']; $organization_fax=$_REQUEST['organization_fax']; $organization_website=$_REQUEST['organization_website']; $organization_logo=$_REQUEST['organization_logo']; $organization_logoname=$filename; if(!isset($organization_logoname)) $organization_logoname=""; $sql="select * from organizationdetails where organizationame = '".$org_name."'"; $result = $adb->query($sql); $org_name = $adb->query_result($result,0,'organizationame'); if($org_name=='') { $sql="insert into organizationdetails(organizationame,address,city,state,code,country,phone,fax,website,logoname) values( '".$organization_name ."','".$organization_address."','". $organization_city."','".$organization_state."','".$organization_code."','".$organization_country."','".$organization_phone."','".$organization_fax."','".$organization_website."','".$organization_logoname."')"; } else { if($savelogo=="false") { $organization_logoname=""; } $sql="update organizationdetails set organizationame = '".$organization_name."', address = '".$organization_address."', city = '".$organization_city."', state = '".$organization_state."', code = '".$organization_code."', country = '".$organization_country."' , phone = '".$organization_phone."' , fax = '".$organization_fax."', website = '".$organization_website."', logoname = '". $organization_logoname ."' where organizationame = '".$org_name."'"; } $adb->query($sql); if($savelogo=="true") { header("Location: index.php?module=Settings&action=OrganizationConfig"); } elseif($savelogo=="false") { include('themes/'.$theme.'/header.php'); echo $errormessage; return; } } ?>