$text = $_POST['text']; $filename = $_FILES['img']['name']; $rozmiar0 = $_FILES['img']['size']; $rodzaj = $_FILES['img']['type']; try { if ($title != null && $text != null && $filename != null && $rozmiar0 != null) { $file_info = upload::getInfo($title, $rozmiar0, $rodzaj, $text); //Title echo nl2br($file_info[0]); //Size in MB echo nl2br($file_info[1]); //Description echo nl2br($file_info[3]); //Type of image echo nl2br($file_info[2]); $object = factory::upload_factory(); $object->sprawdz_bledy($_FILES['img']['error']); $check = $object->sprawdz_typ($filename); $file_extension = upload::getExtension($filename); try { if ($check) { $final_filename = rand(); $final_filename .= "_"; $final_filename .= $filename; @($zapisz = $object->saveImage($final_filename)); // $file_name.="."; // $file_name.=$file_extension; if ($zapisz) { echo "<h1 class=\"grey text-center\">Zapisano obrazek do oczekujących</h1>"; echo '<div class="post-border well well-lg " style="background-color:rgba(16,16,16,0.95);border:15px solid #272727;">' . '<li style="list-style-type:none;text-align:center;font-weight:bold;color:white;">' . $title; echo "<img src=\"uploaded_images/{$filename}\" class=\"img-responsive\">";
<?php ob_start(); require_once 'loader.php'; /* * This site was created to operate on rating in website. It saves a votes form users to database. */ try { if (isset($_GET['rate']) && $_GET['rate'] != null) { $rating = factory::upload_factory(); $rating->rating($_GET['rate'], $_GET['id']); echo '<h1 class="text-center grey">Głos został oddany!</h1>'; } } catch (Exception $e) { echo '<h1 class="text-center grey">' . $e->getMessage() . '</h1>'; if (isset($_GET['site'])) { header("refresh:1;url=http://projects.e-kei.pl/inba/index.php?site=" . $_GET['site'] . ""); } else { if (isset($_GET['id'])) { header("refresh:1;url=http://projects.e-kei.pl/inba/index.php?is=" . $_GET['id'] . ""); } } } if (!isset($e)) { if (isset($_GET['site'])) { header("refresh:1;url=http://projects.e-kei.pl/inba/index.php?site=" . $_GET['site'] . ""); } else { if (isset($_GET['id'])) { header("refresh:1;url=http://projects.e-kei.pl/inba/index.php?ids=" . $_GET['id'] . ""); } }