asd
This commit is contained in:
commit
dc5ff7ddad
52
20240905/index.php
Normal file
52
20240905/index.php
Normal file
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
$valtozo = "asd";
|
||||
echo "asd <br>";
|
||||
|
||||
echo $valtozo;
|
||||
$valtozo = 12;
|
||||
echo "\n $valtozo";
|
||||
|
||||
/*
|
||||
//phpinfo();
|
||||
|
||||
$html = "
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
PHP-s html
|
||||
</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
asd
|
||||
</h1>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
";
|
||||
|
||||
echo $html;
|
||||
*/
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>
|
||||
<?php
|
||||
$cim = "CÍM";
|
||||
echo $cim;
|
||||
?>
|
||||
</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
<?php
|
||||
var_dump($cim)
|
||||
?>
|
||||
</h1>
|
||||
</body>
|
||||
</html>
|
60
20240909/index.php
Normal file
60
20240909/index.php
Normal file
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
define("KONSTVER", "v20240909", true);
|
||||
|
||||
echo KONSTVER;
|
||||
echo "<br>";
|
||||
|
||||
$tomb = array("hétfő", "kedd", "szerda", "csütörtök", "péntek", "szombat", "vasárnap");
|
||||
|
||||
var_dump($tomb);
|
||||
echo "<br>";
|
||||
for ($i=0; $i < count($tomb); $i++) {
|
||||
echo $tomb[$i]."<br>";
|
||||
}
|
||||
$tomb[] = "PATAINAP";
|
||||
|
||||
echo "<br>";
|
||||
|
||||
for ($i=0; $i < count($tomb); $i++) {
|
||||
echo $tomb[$i]."<br>";
|
||||
}
|
||||
|
||||
//$tomb = array("asd");
|
||||
|
||||
/*
|
||||
for ($i=0; $i < count($tomb); $i++) {
|
||||
echo $tomb[$i]."<br>";
|
||||
}
|
||||
*/
|
||||
|
||||
echo "Last element: " . $tomb[count($tomb) - 1];
|
||||
|
||||
//unset($tomb);
|
||||
|
||||
foreach ($tomb as $elem) {
|
||||
echo $elem."<br>";
|
||||
}
|
||||
|
||||
foreach ($_SERVER as $key => $value) {
|
||||
echo $key." értéke: ".$value."<br>";
|
||||
}
|
||||
|
||||
//var_dump($_SERVER);
|
||||
|
||||
|
||||
echo "Asszociatív tömb: <br>";
|
||||
|
||||
$atomb = array();
|
||||
$atomb["elso"] = "matyi";
|
||||
$atomb["masodik"] = "dani";
|
||||
|
||||
echo $atomb["elso"]."<br>";
|
||||
|
||||
echo $_GET["nev"]."<br>";
|
||||
|
||||
|
||||
if ($_GET["nev"] == "digi") {
|
||||
echo "Belépés engedéyezve";
|
||||
}
|
||||
|
||||
?>
|
8
20240912/.idea/.gitignore
vendored
Normal file
8
20240912/.idea/.gitignore
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
8
20240912/.idea/20240912.iml
Normal file
8
20240912/.idea/20240912.iml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
8
20240912/.idea/modules.xml
Normal file
8
20240912/.idea/modules.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/20240912.iml" filepath="$PROJECT_DIR$/.idea/20240912.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
19
20240912/.idea/php.xml
Normal file
19
20240912/.idea/php.xml
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="MessDetectorOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PHPCSFixerOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PHPCodeSnifferOptionsConfiguration">
|
||||
<option name="highlightLevel" value="WARNING" />
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PhpStanOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PsalmOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
</project>
|
51
20240912/index.php
Normal file
51
20240912/index.php
Normal file
|
@ -0,0 +1,51 @@
|
|||
|
||||
<?php
|
||||
$method = "GET";
|
||||
$islogin = false;
|
||||
if(isset($_GET["kod"])){
|
||||
switch($_GET["kod"]){
|
||||
case "1111":
|
||||
case "2222":
|
||||
case "3333":
|
||||
case "4444": $islogin = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
$islogin = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
if (!$islogin) {
|
||||
?>
|
||||
<form action="" method="<?php echo $method; ?>">
|
||||
<input type="text" name="nev">
|
||||
<input type="number" name="kod" min="1000" max="9999">
|
||||
<input type="submit" value="belepes">
|
||||
</form>
|
||||
|
||||
<?php
|
||||
}
|
||||
else
|
||||
echo "<h1>CSAO".$_GET["nev"]."</h1>";
|
||||
echo "<a href='/PHP_digivagyok/20240912/index.php'>Kijelentkezés</a>";
|
||||
?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
5
20240916/footer.php
Normal file
5
20240916/footer.php
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
echo '<div style="position: absolute; bottom: 3px;width: 100%;text-align: center; height: 30px; background: black; color: white;">
|
||||
Készítette Szabó Márton (c)2024
|
||||
</div>';
|
||||
?>
|
24
20240916/index.php
Normal file
24
20240916/index.php
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?php require_once 'negy.php'; ?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Alap web valami</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>
|
||||
POST használata
|
||||
</h1>
|
||||
<?php
|
||||
if ($islogin == false){
|
||||
require 'loginform.php';
|
||||
|
||||
} else {
|
||||
require 'logged.php';
|
||||
}
|
||||
?>
|
||||
<?php require_once 'footer.php'; ?>
|
||||
</body>
|
||||
</html>
|
9
20240916/logged.php
Normal file
9
20240916/logged.php
Normal file
|
@ -0,0 +1,9 @@
|
|||
<h3>
|
||||
Üdvözöllek
|
||||
|
||||
<?php
|
||||
echo $nev;
|
||||
?>
|
||||
</h3>
|
||||
|
||||
<a href="index.php"> KIJELENTKEZÉS</a>
|
6
20240916/loginform.php
Normal file
6
20240916/loginform.php
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
<form method="Post">
|
||||
Login: <input type="text" name="nev" title="Add meg a neved"><br>
|
||||
Jelszó: <input type="password" name="jelszo" title="Jelszó"><br>
|
||||
<button type="submit">Belépés</button>
|
||||
</form>
|
18
20240916/negy.php
Normal file
18
20240916/negy.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
$islogin = false;
|
||||
|
||||
if (isset($_POST["nev"]) && isset($_POST["jelszo"])) {
|
||||
$nev = $_POST["nev"];
|
||||
$jelszo = $_POST["jelszo"];
|
||||
|
||||
if(strlen($nev) > 3 && strlen($jelszo) > 4){
|
||||
if ($nev == 'admin' && $jelszo == 'admin'){
|
||||
$islogin = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
Loading…
Reference in New Issue
Block a user