Jump to content

Rigodon

New Members
  • Posts

    8
  • Joined

  • Last visited

Rigodon's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, For some reason I map the script does not charge, my source page: The script map: <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAj_ODBkgxB4OHLp0Fsa-VcRQf68fUWII4n159N-cgzaYV2ilj2BTE5ip8WZMGe9OUHJsu_G068IPl8w" type="text/javascript"></script> <script type="text/javascript"> //<![CDATA[ function load() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map")); map.addControl(new GLargeMapControl()); var MapTypes = map.getMapTypes(); MapTypes[0].getName = function () { return "Mapa"; } MapTypes[1].getName = function () { return "Satelitarna"; } MapTypes[2].getName = function () { return "Hybrydowa"; } map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(54.352279593080354, 18.687057495117188), 14); var marker = new GMarker(new GLatLng(54.3522028, 18.6880193)); map.addOverlay(marker); } } //]]> </script> <div id="map" style=" width: 950px; height: 400px; background: url(http://web4you.com.pl/template/loader.gif); background-repeat: no-repeat; background-position: center;"> </div>
  2. hI, if I have a picture at: and I would view it at: , what I need to change in .htaccess?
  3. Hello, For all the subpages with the parameter of the GET charged me with some content-dependent file name of the page and the selected language. The problem is not the script but its visibility through the validator, because on this website, does not see the validator that the party index_content has been loaded and displays the code as: <table class="contentpaneopen"> // there should be loaded index file content, and indeed it is, but the validator can not see </table> https://validator.w3.org/check?uri=http%3A%2F%2Fprzembud.itecore.com%2F&charset=%28detect+automatically%29&doctype=Inline&ss=1&outline=1&group=0&No200=1&verbose=1&st=1&user-agent=W3C_Validator%2F1.3+http%3A%2F%2Fvalidator.w3.org%2Fservices My code of index.php (the only important part): <table class="contentpaneopen"> <?php $album = $_GET['album']; if (!empty($page) && empty($album)) { include ($langs . '/' . $page . '.php'); } else if (($page == 'gallery_album') && !empty($album)) { include ( 'galeria/' . $album . '.html'); } else if (empty($page) && empty($album)) { include ($langs . '/' . 'index_content.php'); } else { include ($langs . '/' . 'index_content.php'); } ?> </table> Once again, the page works properly index the content is loading, but why validator can not see? how to make saw. And if not, how to eliminate a bug in validatorze, but without deleting the table, just by typing there something that does not spoil other subpages, and does not add any apparent content. :>
  4. Hello, I'm starting with object-oriented programming and I have the problem that I do not know how to efficiently manage captured with methods. For example: class logowanie { public function valid_login_name() { $username = $_GET['username']; $login_name = 'd56b6asdsada53855679cb1d252da'; if(md5($username) === $login_name ){ echo "extra"; } elseif(md5($username) !== $login_name && !empty($username) ){ echo "błedny login"; } elseif(md5($username) == null) { echo "nie podales loginu"; } I Checks if the given login is the same as that stored in the variable. I know that I can refer to it by, for example: $login= new logowanie(); $login->valid_login_name(); I have also: class pozalogowaniu { public function afterloggin(){ header("Location: http://www.example.com/"); } } And now my question in the style of dump question. How to do it when I want to show the method "afterloggin" only if the method valid_login_name () returns the result from the first condition?
  5. I do this and actually does not work.. <?php // validator bledow error_reporting(E_ALL); ini_set('display_errors','1'); // $p=$_POST['pole']; // echo $p.'tal'; require("connection.php"); // ładujemy plik z połączeniem connection(); // DISPLAYING THE DATABASE $wynik = mysql_query("SELECT * FROM test") or die('error query'); if(mysql_num_rows($wynik) > 0) { /* if the result is positive, the display data*/ echo "<table cellpadding=\"2\" border=1>"; while($r = mysql_fetch_object($wynik)) { echo "<tr>"; echo "<td>".$r->name."</td>"; echo "<td>".$r->description."</td>"; echo "<td class='tdrzecz'> <form action='index.php' method='post'> <input type='checkbox' value='wartosc' name='checkbox[{$r->id}]'/> </td>"; echo "</tr>"; } echo "</table>"; echo 'Album Name:<br /> <input type="text" name="name" value="" /><br /> Description:<br /> <input type="text" name="description" value="" /><br /> <select name="select"> <option value="add">add</option> <option value="edit" selected>edit</option> <option value="remove">remove</option> </select> <input type="submit" nazwa="submit" value="submit" /> </form>'; if(isset($_POST['submit'])) // Checks the post var from the name of your submit button { $dane_z_tab = ($_POST['checkbox']); // echo "dane_z_tab ".$dane_z_tab.'<br />'; // $dane_z_tab It is an array when you select one checkbox // echo gettype($dane_z_tab).'<br />'; while ($val_checkbox = current($dane_z_tab)) { // echo "value_checkbox ".$val_checkbox; //value = "wartosc" if ($val_checkbox == 'wartosc') { $klucz = key($dane_z_tab).'<br />'; //pulling the key (id record) echo "Klucz: ".$klucz; } next($dane_z_tab); } $selectOption = $_POST['select']; $name = $_POST['name']; $description = $_POST['description']; echo "Klucz: ".$klucz; if ($selectOption == 'add' and $name and $description) { echo 'zaznaczyles dodawnaie'; $ins = mysql_query("INSERT INTO test SET name='$name', description='$description'"); }elseif ($selectOption == 'edit') { echo 'zaznaczyles edit'; mysql_query("UPDATE test SET name='$name',description='$description' WHERE id='$klucz'"); }else if($selectOption == 'remove' and isset($_POST['checkbox'])) { mysql_query("DELETE FROM test WHERE id='$klucz'"); echo 'zaznaczyles remove'; }} else { echo "no :("; } }
  6. Thanks for that answer. This problem with that script is still unsolved. This script is placed on 'kontente.bl.ee'
  7. Hi, Could someone help me with repair my code. I do not know why i need to click twice to change my data in database. Propably something with condition but i am not sure. <?php // validator bledow error_reporting(E_ALL); ini_set('display_errors','1'); // $p=$_POST['pole']; // echo $p.'tal'; require("connection.php"); // ładujemy plik z połączeniem connection(); // DISPLAYING THE DATABASE $wynik = mysql_query("SELECT * FROM test") or die('error query'); if(mysql_num_rows($wynik) > 0) { /* if the result is positive, the display data*/ echo "<table cellpadding=\"2\" border=1>"; while($r = mysql_fetch_object($wynik)) { echo "<tr>"; echo "<td>".$r->name."</td>"; echo "<td>".$r->description."</td>"; echo "<td class='tdrzecz'> <a href=\"index.php?a=edit&id={$r->id}\">EDIT</a> <form action='index.php' method='post'> <input type='checkbox' value='wartosc' name='checkbox[{$r->id}]'/> </td>"; echo "</tr>"; } ' </form>'; } echo "</table>"; echo 'Album Name:<br /> <input type="text" name="name" value="" /><br /> Description:<br /> <input type="text" name="description" value="" /><br /> <select name="select"> <option value="add">add</option> <option value="edit" selected>edit</option> <option value="remove">remove</option> </select> <input type="submit" nazwa="do" value="do" />'; $dane_z_tab = ($_POST['checkbox']); // echo "dane_z_tab ".$dane_z_tab.'<br />'; // $dane_z_tab It is an array when you select one checkbox // echo gettype($dane_z_tab).'<br />'; while ($val_checkbox = current($dane_z_tab)) { // echo "value_checkbox ".$val_checkbox; //value = "wartosc" if ($val_checkbox == 'wartosc') { $klucz = key($dane_z_tab).'<br />'; //pulling the key (id record) echo "Klucz: ".$klucz; } next($dane_z_tab); } $selectOption = $_POST['select']; $name = $_POST['name']; $description = $_POST['description']; echo "Klucz: ".$klucz; if ($selectOption == 'add' and $name and $description) { echo 'zaznaczyles dodawnaie'; $ins = mysql_query("INSERT INTO test SET name='$name', description='$description'"); }elseif ($selectOption == 'edit') { echo 'zaznaczyles edit'; mysql_query("UPDATE test SET name='$name',description='$description' WHERE id='$klucz'"); }else if($selectOption == 'remove' and isset($_POST['checkbox'])) { mysql_query("DELETE FROM test WHERE id='$klucz'"); echo 'zaznaczyles remove'; }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.