pondro600 Posted September 17, 2014 Share Posted September 17, 2014 (edited) Hi everyone (sorry for my bad english), I have four objects, one object 'start', other objects, for example 'A', 'B', 'C'. 'A', 'B', 'C' are URL address. When I go first time to URL 'C', show tips how to go of point 'start' to 'C' point. When next time I display URL point 'B', show tips, how to go of point 'B' to point 'C' (analogously with point 'A'). When I go to URL 'C' again, show information about point 'C' (it's great, becouse, I displayed on start URL point 'C'). How can I set new point start? When we show information about point 'C', we go to URL 'B', we must display map, how to go of point 'C' to point 'B'. Now is display tips go of point 'B' to point 'C'. index.php <?php require_once('function.php'); session_start(); $obiekt = isset($_GET['obiekt']) ? $_GET['obiekt'] : 'obiekt1'; if (!isset($_SESSION['target'])) { $_SESSION['target'] = $obiekt; showStartMap('start',$obiekt); } else { if ($_SESSION['target'] == $obiekt) { showInfo($obiekt); session_unset(); session_destroy(); } else { showMap($obiekt, $_SESSION['cel']); } } ?> function.php <?php function showInfo($obiekt) { header('Location: /info.php?obiekt=' . $obiekt); die; } function showMap($obiektOf,$obiektTo) { header('Location: /map.php?z='.$obiektOf.'&do='.$obiektTo); } function showStartMap($start,$obiektDo) { header('Location: /map.php?z='.$start.'&do='.$obiektTo); } ?> map.php <?php $nameMap = 'map_'. $_GET['of'].'_'.$_GET['to'].'.png'; echo '<img src="/'.$nameMap.'" alt="map"/>'; ?> info.php <?php switch($_GET['obiekt']) { case 'obiekt1': echo '<img src="obiekt1.png">'; session_unset(); session_destroy(); break; case 'obiekt2': echo '<img src="obiekt2.png">'; session_unset(); session_destroy(); break; case 'obiekt3': echo '<img src="obiekt3.png">'; session_unset(); session_destroy(); break; } ?> Edited September 17, 2014 by pondro600 Quote Link to comment Share on other sites More sharing options...
ginerjm Posted September 18, 2014 Share Posted September 18, 2014 You English is fine - your description is not. Don't have a clue what you are describing. Quote Link to comment Share on other sites More sharing options...
pondro600 Posted September 18, 2014 Author Share Posted September 18, 2014 This is example of a situation in museum. Quote Link to comment Share on other sites More sharing options...
ginerjm Posted September 18, 2014 Share Posted September 18, 2014 What situation? Watching a video? Touring a gallery? Moving to another gallery? What are your objects? Quote Link to comment Share on other sites More sharing options...
pondro600 Posted September 18, 2014 Author Share Posted September 18, 2014 Touring a gallery. 1 object = 1 picture 1 picture = 1 room Quote Link to comment Share on other sites More sharing options...
ginerjm Posted September 18, 2014 Share Posted September 18, 2014 good luck. I just don't see what you are asking. Quote Link to comment Share on other sites More sharing options...
pondro600 Posted September 18, 2014 Author Share Posted September 18, 2014 (edited) How can I set new point start? When we show information about point 'C', we go to URL 'B', we must display map, how to go of point 'C' to point 'B'. Now is display tips go of point 'B' to point 'C'. Lol? Edited September 18, 2014 by pondro600 Quote Link to comment Share on other sites More sharing options...
pondro600 Posted September 20, 2014 Author Share Posted September 20, 2014 Someone help? Quote Link to comment Share on other sites More sharing options...
ginerjm Posted September 21, 2014 Share Posted September 21, 2014 how about just talking about what you want to do in more general terms? We don't have a clue about what your goal is here so we can't follow your intimate description of it. Speak in general terms and walk us thru your idea. Quote Link to comment Share on other sites More sharing options...
pondro600 Posted September 21, 2014 Author Share Posted September 21, 2014 You are out front (start) museum with 3 rooms. Out front museum is QR table with 3 QR code with picture. You scan some QR code with picture. This same codes are on every pictures in other room, and this same table with 3 QR CODE is in every room. For example, you scan QR code 'B' from start place (out front museum). In smartphone browser display map, how to go from 'start' point to room 'B'. You go into the some room (but you don't know which room), example to room 'A'. You scan code of picture. It's wrong, becouse it's not picture 'B', so in browser display map: room 'A' to room 'B' You go into the some room (but you don't know which room), example now it is room 'B' You scan code of picture. IT'S GREAT! This picture is your choose on start. In phone display information about picture 'B'. Scan again code QR from TABLE (with QR CODE) and your choose is picture 'C'. Now must display map from ROOM 'B' TO ROOM 'C'. Now here is problem, becouse in phone display map 'C' to 'B'. Correct: 'B' -> 'C'. Every map is image png, so I created:'start' -> 'A' | 'start' -> 'B' | 'start' -> 'C' | 'A' -> 'B' | 'A' -> 'C' 'B' -> 'A' | 'B' -> 'C' 'C -> 'A' | 'C' -> 'B' I created only 3 CODE QR. Sorry but that's the only way I can describe my problem. So maybe can I create a block diagram? Quote Link to comment Share on other sites More sharing options...
Barand Posted September 21, 2014 Share Posted September 21, 2014 OK for me as far as step 5, but then I have a couple of questions.You now have map to show you how to get from the start to room B, but in step 6 you are now in room A. So my first question is "If users cannot read maps, why bother?".However, that aside, you say the same QR codes are at the start and in every room, so in step 10, when you scan QR code B again it displays the map from A to B. Second question "How did it know you were in room A, especially as you shouldn't be there, and if it can do that why can't do it when you scan QR code C in room B (which is where you should be)?" Quote Link to comment Share on other sites More sharing options...
pondro600 Posted September 21, 2014 Author Share Posted September 21, 2014 You now have map to show you how to get from the start to room B, but in step 6 you are now in room A. So my first question is "If users cannot read maps, why bother?". Impossible However, that aside, you say the same QR codes are at the start and in every room, so in step 10, when you scan QR code B again it displays the map from A to B. Second question "How did it know you were in room A, especially as you shouldn't be there, and if it can do that why can't do it when you scan QR code C in room B (which is where you should be)?" No no, in step 10 I scan code QR, when I'm in room with picture 'B'. Code QR 'B' on start = code QR on picture in room 'B' = code QR with others code QR on table in every room. Rooms are not described, so any person make a mistake. I consider this situation First time scan code QR 'B' (on start) = display map: start -> 'B' Scan for any time: from room Z, from room Y, from room U, from room X = display map from Z/Y/U/X -> 'B' Scan code QR 'B' in room 'B' = information about picture 'B'. I don't know, if I understood you . Quote Link to comment Share on other sites More sharing options...
ginerjm Posted September 21, 2014 Share Posted September 21, 2014 (edited) ok - I think I follow your problem 1 - you need a map from every room to every other possible room 2 - you have them all on your phone? Or in each room as a qr code. 3 - I'm guessing that when a picture is scanned and it is not part of the inventory for the room you are supposed to be in that your it then knows what room you are really in and can then give you a new map. But what if I want to continue on in the mistaken room? 4 - So What is your problem? PS - as Barand said - if the user can't read the maps and get to the right room, why bother? Edited September 21, 2014 by ginerjm Quote Link to comment Share on other sites More sharing options...
pondro600 Posted September 21, 2014 Author Share Posted September 21, 2014 (edited) 1. I have this maps. In museum is 3 rooms + start. In 1 room is one picture with QR code. 2. Yes, this code QR are scan of screen notebook, in application Flash. In room 'A' are codes QR: 'A', 'B', 'C' on the table and code QR 'A' on the picture. In room 'B' are codes QR: 'A', 'B', 'C' on the table and code QR 'B' on the picture. In room 'C' are codes QR: 'A', 'B', 'C' on the table and code QR 'C' on the picture. 3. Only three room in museum + start. 1 room = one exhibit. 4. My scripts must be everything reset after I displayed information about exhibit 'A', 'B' or 'C' and some script must be set new point start. Example: I show information about exhibit in room 'B' and this room 'B' must be point 'start' now. Here I scan code QR 'C' = show map 'B' -> 'C' (now show me map: 'C' -> 'B') Edited September 21, 2014 by pondro600 Quote Link to comment Share on other sites More sharing options...
ginerjm Posted September 21, 2014 Share Posted September 21, 2014 Not sure I understand your last post. But my question still remains. What is Your Problem? Quote Link to comment Share on other sites More sharing options...
pondro600 Posted September 21, 2014 Author Share Posted September 21, 2014 I displayed information about picture 'B' - here it's ok Now I scan code QR, for example 'C'. In browser smartphone display map from room 'C' to room 'B'. It's not correct, becouse in browser must display map from 'B' to 'C'. Quote Link to comment Share on other sites More sharing options...
Barand Posted September 21, 2014 Share Posted September 21, 2014 To clarify, I meant step 7, not step 10, in my previous question. You are in the wrong room (A instead of B) and you scan a picture. Somehow this now knows you are in room A so gives you a map from A to room B. How does it know you want to go to room B? What are the pictures? What is the relationship between pictures and QR codes? Now you are B and want to go to C why can't you do exactly the same as you did in room A when you wanted to go to room B? (Which apparently was to scan a picture) Quote Link to comment Share on other sites More sharing options...
pondro600 Posted September 22, 2014 Author Share Posted September 22, 2014 (edited) I scan code QR application for Android. Browser show map: start -> room 'B'. I go to other room, for example 'A', I click on my phone button 'back', scan again QR code in room in museum: Example picture in room 'A': http://bankfotek.pl/image/1791835 <?php require_once('function.php'); session_start(); $object = isset($_GET['object']) ? $_GET['object'] : 'object'; if (!isset($_SESSION['target'])) { $_SESSION['target'] = $object; showStartMap('start',$object); } else { if ($_SESSION['target'] == $object) { showInfo($object); session_unset(); session_destroy(); } else { showMap($object, $_SESSION['target']); } } ?> My scripts: index.php <?phprequire_once('function.php');session_start();$object = isset($_GET['object']) ? $_GET['object'] : 'object';if (!isset($_SESSION['target'])) {$_SESSION['target'] = $object;showStartMap('start',$object);} else {if ($_SESSION['target'] == $object) {showInfo($object);session_unset();session_destroy();} else {showMap($object, $_SESSION['target']);}}?> function.php <?phpfunction showInfo($object){header('Location: /info.php?object=' . $object);die;}function showMap($objectOf,$objectTo){header('Location: /map.php?of='.$objectOf.'&to='.$objectTo);}function showStartMap($start,$objectTo){header('Location: /map.php?of='.$start.'&to='.$objectTo);}?> map.php <?php$nameMap = 'map_'. $_GET['of'].'_'.$_GET['to'].'.png';echo '<img src="/'.$nameMap.'" alt="map"/>';?> info.php <?phpswitch($_GET['object']) {case 'object1':echo '<img src="object1.png">';break;case 'object2':echo '<img src="object2.png">';break;case 'object3':echo '<img src="object3.png">';break;}?> Now you are B and want to go to C why can't you do exactly the same as you did in room A when you wanted to go to room B? (Which apparently was to scan a picture) YEAH!!! Here is problem. I don't know how can I do it. Becouse my scipts not save information about I got in intentional object on start. If showInfo($object); showInfo($object); must be new point start. Edited September 22, 2014 by pondro600 Quote Link to comment Share on other sites More sharing options...
pondro600 Posted September 25, 2014 Author Share Posted September 25, 2014 Barand, ginerjm or anyone you know, how can I fix it? Quote Link to comment Share on other sites More sharing options...
Barand Posted September 25, 2014 Share Posted September 25, 2014 (Third attempt at this post in the last hour, so if it eventually appears several times blame the board) You are out front (start) museum with 3 rooms. Out front museum is QR table with 3 QR code with picture. You scan some QR code with picture. This same codes are on every pictures in other room, and this same table with 3 QR CODE is in every room. For example, you scan QR code 'B' from start place (out front museum). In smartphone browser display map, how to go from 'start' point to room 'B'. You go into the some room (but you don't know which room), example to room 'A'. You scan code of picture. It's wrong, becouse it's not picture 'B', so in browser display map: room 'A' to room 'B' You go into the some room (but you don't know which room), example now it is room 'B' You scan code of picture. IT'S GREAT! This picture is your choose on start. In phone display information about picture 'B'. Scan again code QR from TABLE (with QR CODE) and your choose is picture 'C'. Now must display map from ROOM 'B' TO ROOM 'C'. According to the above you changed the start point from outside (original) to Room A and displayed map from A to B But you say you cannot change the start point. So no, I do not understand your problem and therefore cannot help. Quote Link to comment Share on other sites More sharing options...
pondro600 Posted September 25, 2014 Author Share Posted September 25, 2014 According to the above you changed the start point from outside (original) to Room A and displayed map from A to B But you say you cannot change the start point. So no, I do not understand your problem and therefore cannot help. Yeah, I don't know, how can I change the start point. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.