Jump to content

Change start point


pondro600

Recommended Posts

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 by pondro600
Link to comment
Share on other sites

  1. You are out front (start) museum with 3 rooms.
  2. Out front museum is QR table with 3 QR code with picture.
  3. 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.
  4. For example, you scan QR code 'B' from start place (out front museum).
  5. In smartphone browser display map, how to go from 'start' point to room 'B'.
  6. You go into the some room (but you don't know which room), example to room 'A'.
  7. You scan code of picture.
  8. It's wrong, becouse it's not picture 'B', so in browser display map: room 'A' to room 'B'
  9. You go into the some room (but you don't know which room), example now it is room 'B'
  10. You scan code of picture. IT'S GREAT! This picture is your choose on start. In phone display information about picture 'B'.
  11. Scan again code QR from TABLE (with QR CODE) and your choose is picture 'C'.
  12. 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?

Link to comment
Share on other sites

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)?"

Link to comment
Share on other sites

 

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 :D

 

 

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 :D

 

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 :P.

Link to comment
Share on other sites

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 by ginerjm
Link to comment
Share on other sites

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 by pondro600
Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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

 

 

 

<?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']);
}
}
?>

 

 

 

 

function.php

 

 

 

<?php
function 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

 

 

<?php
switch($_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 by pondro600
Link to comment
Share on other sites

(Third attempt at this post in the last hour, so if it eventually appears several times blame the board)

 

 


  1. You are out front (start) museum with 3 rooms.
  2. Out front museum is QR table with 3 QR code with picture.
  3. 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.
  4. For example, you scan QR code 'B' from start place (out front museum).
  5. In smartphone browser display map, how to go from 'start' point to room 'B'.
  6. You go into the some room (but you don't know which room), example to room 'A'.
  7. You scan code of picture.
  8. It's wrong, becouse it's not picture 'B', so in browser display map: room 'A' to room 'B'
  9. You go into the some room (but you don't know which room), example now it is room 'B'
  10. You scan code of picture. IT'S GREAT! This picture is your choose on start. In phone display information about picture 'B'.
  11. Scan again code QR from TABLE (with QR CODE) and your choose is picture 'C'.
  12. 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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.