Редакция 526 | Редакция 528 | К новейшей редакции | Весь файл | Учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 526 | Редакция 527 | ||
---|---|---|---|
Строка 26... | Строка 26... | ||
26 | $DName = $secure->checkStr($_POST["dname"],1); |
26 | $DName = $secure->checkStr($_POST["dname"],1); |
27 | $DUA = $secure->checkStr($_POST["dua"],1); |
27 | $DUA = $secure->checkStr($_POST["dua"],1); |
28 | $DType = $secure->checkInt($_POST["dtype"]); |
28 | $DType = $secure->checkInt($_POST["dtype"]); |
29 | $DLogo = 0; |
29 | $DLogo = 0; |
30 | 30 | ||
31 | if ($_FILES["distlogo"]["type"]!=0) { |
31 | if ($_POST["distlogo"]!="") { |
32 | $folder = $picture.$DUA."-orig.png"; |
32 | $folder = $picture.$DUA."-orig.png"; |
33 | $folderN = $picture.$DUA.".png"; |
33 | $folderN = $picture.$DUA.".png"; |
34 | $folderEM = $picture.$DUA."-em.png"; |
34 | $folderEM = $picture.$DUA."-em.png"; |
35 | 35 | ||
36 | if (move_uploaded_file($datafile["distlogo"]["tmp_name"],$folder)) { |
36 | if (move_uploaded_file($_FILES["distlogo"]["tmp_name"],$folder)) { |
37 | chmod($folder, 0644); |
37 | chmod($folder, 0644); |
38 | list($width, $height) = GetImageSize($folder); |
38 | list($width, $height) = GetImageSize($folder); |
39 | $percent = 32/$height; |
39 | $percent = 32/$height; |
40 | $newwidth = $width * $percent; |
40 | $newwidth = $width * $percent; |
41 | $newheight = $height * $percent; |
41 | $newheight = $height * $percent; |
Строка 74... | Строка 74... | ||
74 | $DName = $secure->checkStr($_POST["dname"],1); |
74 | $DName = $secure->checkStr($_POST["dname"],1); |
75 | $DUA = $secure->checkStr($_POST["dua"],1); |
75 | $DUA = $secure->checkStr($_POST["dua"],1); |
76 | $DType = $secure->checkInt($_POST["dtype"]); |
76 | $DType = $secure->checkInt($_POST["dtype"]); |
77 | $DLogo = 0; |
77 | $DLogo = 0; |
78 | 78 | ||
79 | // debug patch
|
- | |
80 | phpinfo(); |
- | |
81 | - | ||
82 | if ($_FILES["distlogo"]["type"]!=0) { |
79 | if ($_POST["distlogo"]!="") { |
83 | $folder = $picture.$DUA."-orig.png"; |
80 | $folder = $picture.$DUA."-orig.png"; |
84 | $folderN = $picture.$DUA.".png"; |
81 | $folderN = $picture.$DUA.".png"; |
85 | $folderEM = $picture.$DUA."-em.png"; |
82 | $folderEM = $picture.$DUA."-em.png"; |
86 | 83 | ||
87 | if (move_uploaded_file($datafile["distlogo"]["tmp_name"],$folder)) { |
84 | if (move_uploaded_file($_FILES["distlogo"]["tmp_name"],$folder)) { |
88 | chmod($folder, 0644); |
85 | chmod($folder, 0644); |
89 | list($width, $height) = GetImageSize($folder); |
86 | list($width, $height) = GetImageSize($folder); |
90 | $percent = 32/$height; |
87 | $percent = 32/$height; |
91 | $newwidth = $width * $percent; |
88 | $newwidth = $width * $percent; |
92 | $newheight = $height * $percent; |
89 | $newheight = $height * $percent; |
Строка 111... | Строка 108... | ||
111 | }
|
108 | }
|
112 | }
|
109 | }
|
113 | 110 | ||
114 | $r = $core->updateDistribution($ID, $DName, $DType, $DUA, $DLogo); |
111 | $r = $core->updateDistribution($ID, $DName, $DType, $DUA, $DLogo); |
115 | if ($r["ERR"]==0) { |
112 | if ($r["ERR"]==0) { |
116 | // header("Location: ".$manager."\n\n");
|
113 | header("Location: ".$manager."\n\n"); |
117 | } else { |
114 | } else { |
118 | echo $r["ERRINFO"]; |
115 | echo $r["ERRINFO"]; |
119 | }
|
116 | }
|
120 | 117 | ||
121 | break; |
118 | break; |