case 1:
echo '<b>' . $content->getValue("dodaj", "niewypelniono") . '</b><br/><a href="dodaj.php">« ' . $content->getValue("global", "powrot") . '</a>';
exit;
break;
}
}
$tresc = @htmlspecialchars(mysqli_real_escape_string($db, $_POST['tresc']));
$tytul = @htmlspecialchars(mysqli_real_escape_string($db, $_POST['tytul']));
$zrodlo = @htmlspecialchars(mysqli_real_escape_string($db, $_POST['zrodlo']));
$autor = $user->userInfo("id");
$data = date('Y-m-d H:i:s');
$image = new SimpleImage();
$imageType = "";
switch ($_POST['type']) {
case 'tekst':
if (!$image->create($tresc)) {
echo '<b>' . $content->getValue("dodaj", "zadlugiText") . '</b><br/><a href="dodaj.php">« ' . $content->getValue("global", "powrot") . '</a>';
exit;
}
$imageType = "wiedza";
break;
case 'tekst_obrazek':
$data_img = date("YmdHis");
$sp1 = pathinfo($_FILES['obrazek']['name']);
$tmp_file = 'img/upload/tmp/' . $data_img . '.' . $sp1['extension'];
if (filesize($_FILES['obrazek']['tmp_name']) / 1024 >= $conf->pobierz('max_file_size')) {
echo '<b>' . sprintf($content->getValue("dodaj", "obrazekZaduzy"), $conf->pobierz('max_file_size')) . "KB" . '</b><br/><a href="dodaj.php">« ' . $content->getValue("global", "powrot") . '</a>';
exit;
}
switch (uploadFile('obrazek', 'img/upload/tmp/', array(1 => 'jpg', 'jpeg', 'gif', 'png', 'JPG', 'JPEG', 'GIF', 'PNG'), 0, $data_img)) {
case 0: