/
acilis_guncelle_islem.php
38 lines (36 loc) · 1.25 KB
/
acilis_guncelle_islem.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
session_start();
header("Content-Type: text/html; charset=utf-8");
DEFINE("_ADMIN_GIRDI","1");
include_once "config.php";
include_once $cfg["SiteRoot"]."db_connection.php";
include_once $cfg["SiteRoot"]."functions.php";
if(canUserAccessAdminArea()) {
$acilis_id=$_GET["acilis_id"];
$defaultUpdateData = [];
$updateData = [
"aktif" =>$_POST['aktif'],
];
$languageUpdateData = prepareLanguagePost(array("link"));
$diller=getLanguages();
if(count($diller)>0) {
foreach ($diller as $dil) {
$code=$dil["language_code"];
$uploadImageData_Big = [
"image" => $_FILES["resim_$code"],
"imagename" => 'popup_'.$code,
"resize" => true,
"uploadfolder" => $hostcfg["SiteRoot"].'upload/banner/',
"resizedata" => [ "width" => 800, "height" => 450, "type" =>'' ],
];
if( ($resim = uploadImage($uploadImageData_Big)) !==NULL) {
$defaultUpdateData += array("resim_".$code => $resim);
}
}
}
$updateData += $defaultUpdateData + $languageUpdateData;
$where = ["acilis_id" => $acilis_id];
updateTableData("acilis",$updateData,$where);
header("location:admin.php?cmd=acilis_guncelle&acilis_id=$acilis_id&result=guncellendi");
}
?>