diff --git a/20241118/kilenc/Vera.ttf b/20241118/kilenc/Vera.ttf new file mode 100644 index 0000000..58cd6b5 Binary files /dev/null and b/20241118/kilenc/Vera.ttf differ diff --git a/20241118/kilenc/head.php b/20241118/kilenc/head.php new file mode 100644 index 0000000..44eaa21 --- /dev/null +++ b/20241118/kilenc/head.php @@ -0,0 +1,94 @@ +$maxmeret) + { + $uploadOK = 0; + echo "Túl nagy állomány"; + } + + if ($kepkiterjesztes!="jpg" && $kepkiterjesztes!="png") + { + $uploadOK = 0; + echo "Nem megengedett képformátum"; + } + + if ($uploadOK==1) + { + + $vanmar = 0; + if (file_exists($celfajl)) + { + $vanmar = 1; + } + + if (move_uploaded_file($_FILES["kepfajl"]["tmp_name"],$celfajl)==true) + { + if ($vanmar==0){ + $_SESSION["kepek"][] = $celfajl; + + vizjel($celkonyvtar, $celfajl); + } + } + } +} + + + +//Képek listázása tényleges állományok alapján +$kepek = glob($celkonyvtar."*"); + +foreach ($kepek as $img) + { + echo ''; + } + +//Képek listázása feltöltés után SESSION-ből +/* +if (isset($_SESSION["kepek"])) + { + foreach ($_SESSION["kepek"] as $value) + { + echo ''; + } + } +*/ +?> \ No newline at end of file diff --git a/20241118/kilenc/html.php b/20241118/kilenc/html.php new file mode 100644 index 0000000..91a2225 --- /dev/null +++ b/20241118/kilenc/html.php @@ -0,0 +1,24 @@ + + + + + + + + Képek kezelése + + + +

Képek feltöltése PHP-val

+
+ Név:
+
+ +
+ + + \ No newline at end of file diff --git a/20241118/kilenc/images/gyik.jpg b/20241118/kilenc/images/gyik.jpg new file mode 100644 index 0000000..2183bd5 Binary files /dev/null and b/20241118/kilenc/images/gyik.jpg differ diff --git a/20241118/kilenc/images/orarend.jpg b/20241118/kilenc/images/orarend.jpg new file mode 100644 index 0000000..b28b9eb Binary files /dev/null and b/20241118/kilenc/images/orarend.jpg differ diff --git a/20241118/kilenc/kepek/gyik.jpg b/20241118/kilenc/kepek/gyik.jpg new file mode 100644 index 0000000..2183bd5 Binary files /dev/null and b/20241118/kilenc/kepek/gyik.jpg differ diff --git a/20241118/kilenc/kepek/langos.jpg b/20241118/kilenc/kepek/langos.jpg new file mode 100644 index 0000000..106dd22 Binary files /dev/null and b/20241118/kilenc/kepek/langos.jpg differ diff --git a/20241118/kilenc/kepek/orarend.jpg b/20241118/kilenc/kepek/orarend.jpg new file mode 100644 index 0000000..b28b9eb Binary files /dev/null and b/20241118/kilenc/kepek/orarend.jpg differ diff --git a/20241118/kilenc/kepek/vízjeles.jpg b/20241118/kilenc/kepek/vízjeles.jpg new file mode 100644 index 0000000..9e751b5 Binary files /dev/null and b/20241118/kilenc/kepek/vízjeles.jpg differ diff --git a/20241118/obj.php b/20241118/obj.php new file mode 100644 index 0000000..400a4c1 --- /dev/null +++ b/20241118/obj.php @@ -0,0 +1,41 @@ +kor = $kor; + $this->nev = $nev; + } + + public function adjegy($jegy){ + $this->jegyek[] = $jegy; + } + + public function atlagkiszamit(){ + if (count($this->jegyek) == 0){ + return 0; + } else{ + return array_sum($this->jegyek) / count($this->jegyek); + } + } + + public function adatkiir(){ + $atlag = $this->atlagkiszamit(); + echo "Név: {$this->nev},\nKor: {$this->kor}, Átlag:" + .number_format($atlag, 2); + } + } + + $digi = new Tanulo("Szabó Márton", 19); + $digi->adjegy(5); + $digi->adjegy(2); + $digi->adjegy(4); + $digi->adjegy(5); + $digi->adatkiir(); + + +?> \ No newline at end of file