<div id="lat_lon"> <h3>LAT: </h3> <div id="lat"></div> <h3>LON: </h3> <div id="lon"></div> </div> <div id="panel"> <input id="address" type="textbox" value=""> <input type="button" value="Trazi" onclick="codeAddress()"> </div> <div id="map-canvas"></div> <div id="teretane"> <?php $teretane = Teretana::getAll(); foreach ($teretane as $row) { ?> <div id="teretana"> <h4><?php echo $row->naziv; ?> </h4> <p>Adresa: <?php echo $row->adresa; ?> </p> <p><?php echo $row->opis; ?> </p>
$a = $conn->prepare("update motivation_quote set status=1 where id={$id}"); $a->execute(); header("Location: admin.php?id=2&cat=dodaj_motivaciju.php"); } //brisanje motivacije if (isset($_POST['delete_motivation'])) { $db = Singleton::getInstance(); $conn = $db->conn; $id = $_POST["id"]; $prep = $conn->prepare("delete from motivation_quote where id={$id}"); $prep->execute(); header("Location: admin.php?id=2&cat=dodaj_motivaciju.php"); } //dodavanje teretane if (isset($_POST['teretana'])) { $ter = new Teretana(); $ter->naziv = $_POST['naziv']; $ter->adresa = $_POST['adresa']; $ter->lat = $_POST['lat']; $ter->lon = $_POST['lon']; $ter->opis = $_POST['opis']; $ter->insert(); header("Location: admin.php?id=2&cat=dodaj_teretanu.php"); } //dodavanje vezbe if (isset($_POST['dodaj_vezbu'])) { $vezba = new Vezbe(); $naziv = $_POST['naziv']; $search = array("?", ":", "ć", "Ć"); $replace = array("", "-", "c", "C"); $naziv = str_replace($search, $replace, $naziv);