-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.php
89 lines (76 loc) · 63.9 KB
/
install.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php
require('inc_db.php');
require('config.php');
echo "Creating mysql tables (if not exist)... ";
$result=execQuery("CREATE TABLE IF NOT EXISTS diagrams (
id int(10) unsigned NOT NULL AUTO_INCREMENT,
userID int(10) unsigned NOT NULL,
name varchar(255) NOT NULL,
isEmpty enum('N','Y') NOT NULL DEFAULT 'N',
editorType varchar(255) NOT NULL,
lastUpdate datetime NOT NULL,
fwprop mediumtext NOT NULL,
svg mediumtext NOT NULL,
width int(10) unsigned NOT NULL,
height int(10) unsigned NOT NULL,
PRIMARY KEY (id),
KEY name (name,userID),
KEY userID (userID)
) ");
$result=execQuery("CREATE TABLE IF NOT EXISTS sessions (
id char(32) NOT NULL,
lastUpdate datetime NOT NULL,
userID varchar(255) NOT NULL,
userIP varchar(255) NOT NULL,
sessionData text NOT NULL,
PRIMARY KEY (id),
KEY lastUpdate (lastUpdate),
KEY userID (userID),
KEY userIP (userIP)
) ");
$result=execQuery("CREATE TABLE IF NOT EXISTS users (
id int(10) unsigned NOT NULL AUTO_INCREMENT,
email varchar(255) NOT NULL,
pass varchar(255) NOT NULL,
fullName varchar(255) NOT NULL,
registered datetime NOT NULL,
lastLogin datetime NOT NULL,
passResetCode varchar(255) NOT NULL,
idMap MEDIUMTEXT NOT NULL,
PRIMARY KEY (id),
UNIQUE KEY email (email)
) ");
$result=execQuery("CREATE TABLE IF NOT EXISTS shares (
id int(10) unsigned NOT NULL AUTO_INCREMENT,
diagramID int(10) unsigned NOT NULL,
email varchar(255) NOT NULL,
perm enum('ro','rw') NOT NULL,
PRIMARY KEY (id),
KEY diagramID (diagramID)
) ");
$result=execQuery("CREATE TABLE IF NOT EXISTS history (
id int(10) unsigned NOT NULL AUTO_INCREMENT,
diagramID int(10) unsigned NOT NULL,
userID int(10) unsigned NOT NULL,
name varchar(255) NOT NULL,
isEmpty enum('N','Y') NOT NULL DEFAULT 'N',
editorType varchar(255) NOT NULL,
lastUpdate datetime NOT NULL,
fwprop mediumtext NOT NULL,
svg mediumtext NOT NULL,
width int(10) unsigned NOT NULL,
height int(10) unsigned NOT NULL,
PRIMARY KEY (id),
KEY diagramID (diagramID)
) ");
echo "Done. MySQL installation successful.<br>";
echo "Creating example user...<br>";
execQuery('INSERT IGNORE INTO users VALUES(\''.$exampleUserID.'\', \''.$exampleUsername.'\', \''.md5($exampleUserpass).'\', \'Example User\', \'2013-07-30 19:29:51\', \'2013-07-30 20:27:50\', \'\', \'\')');
echo "Inserting example machines...<br>";
execQuery('INSERT IGNORE INTO diagrams VALUES(1, \''.$exampleUserID.'\', \'New State Machine\', \'Y\', \'State Machine\', NOW(), \'{\\n "states": [],\\n "connections": [],\\n "globals": {\\n "paperPanX": 0,\\n "paperPanY": 0,\\n "attrs": {\\n "x": 0,\\n "y": 0,\\n "width": 1920,\\n "height": 912,\\n "r": 0,\\n "rx": 0,\\n "ry": 0,\\n "fill": "#eee",\\n "stroke": "#000",\\n "stroke-width": 0\\n },\\n "fwprop": {\\n "smName": "",\\n "editorType": "Sm",\\n "globalvar": [\\n {\\n "type": "int",\\n "name": "",\\n "value": ""\\n }\\n ],\\n "smIncludes": "",\\n "smNotes": "",\\n "memalloc": "dynamic"\\n }\\n }\\n}\', \'<svg height="400" version="1.1" width="800" xmlns="http://www.w3.org/2000/svg" style="overflow: hidden; position: relative;" viewBox="0 0 800 400" preserveAspectRatio="xMinYMin"><desc style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Created with Raphaël 2.1.0</desc><defs style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></defs><rect x="0" y="0" width="1920" height="912" r="0" rx="0" ry="0" fill="#eeeeee" stroke="#000" stroke-width="0" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></rect><rect x="232.00033277398325" y="227" width="8" height="8" r="4" rx="4" ry="4" fill="#ff0000" stroke="#000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); display: none;" stroke-width="1"></rect></svg>\', 800, 400)');
execQuery('INSERT IGNORE INTO diagrams VALUES(2, \''.$exampleUserID.'\', \'New Procedure\', \'Y\',\'Procedure\', NOW(), \'{\\n "states": [],\\n "connections": [],\\n "globals": {\\n "paperPanX": 0,\\n "paperPanY": 0,\\n "attrs": {\\n "x": 0,\\n "y": 0,\\n "width": 1920,\\n "height": 912,\\n "r": 0,\\n "rx": 0,\\n "ry": 0,\\n "fill": "#eee",\\n "stroke": "#000",\\n "stroke-width": 0\\n },\\n "fwprop": {\\n "smName": "",\\n "editorType": "Pr",\\n "globalvar": [\\n {\\n "type": "int",\\n "name": "",\\n "value": ""\\n }\\n ],\\n "smIncludes": "",\\n "smNotes": "",\\n "memalloc": "dynamic"\\n }\\n }\\n}\', \'<svg height="400" version="1.1" width="800" xmlns="http://www.w3.org/2000/svg" style="overflow: hidden; position: relative;" viewBox="0 0 800 400" preserveAspectRatio="xMinYMin"><desc style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Created with Raphaël 2.1.0</desc><defs style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></defs><rect x="0" y="0" width="1920" height="912" r="0" rx="0" ry="0" fill="#eeeeee" stroke="#000" stroke-width="0" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></rect><rect x="232.00033277398325" y="227" width="8" height="8" r="4" rx="4" ry="4" fill="#ff0000" stroke="#000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); display: none;" stroke-width="1"></rect></svg>\', 800, 400)');
execQuery('INSERT IGNORE INTO diagrams VALUES (3, \''.$exampleUserID.'\', \'Example 1\', \'N\', \'State Machine\', \'2015-03-24 03:14:01\', \'{\n "states": [\n {\n "id": 1,\n "attrs": {\n "x": 199,\n "y": 184,\n "width": 100,\n "height": 100,\n "r": 10,\n "rx": 10,\n "ry": 10,\n "fill": "#fff",\n "stroke": "#666",\n "stroke-width": 1,\n "fill-opacity": 100\n },\n "fwprop": {\n "autoid": 1,\n "type": "state",\n "note": "",\n "identifier": "STATE_S1",\n "entryFunc": "",\n "doFunc": "",\n "exitFunc": "Action2",\n "entryType": "function",\n "entryCode": "",\n "doType": "function",\n "doCode": "",\n "exitType": "function",\n "exitCode": ""\n },\n "selected": false\n },\n {\n "id": 4,\n "attrs": {\n "x": 234,\n "y": 93,\n "width": 30,\n "height": 30,\n "r": 15,\n "rx": 15,\n "ry": 15,\n "fill": "#fff",\n "stroke": "#666",\n "stroke-width": 1,\n "fill-opacity": 100\n },\n "fwprop": {\n "autoid": 1,\n "type": "init",\n "note": "Initial state"\n },\n "selected": false\n },\n {\n "id": 5,\n "attrs": {\n "x": 514,\n "y": 184,\n "width": 100,\n "height": 100,\n "r": 10,\n "rx": 10,\n "ry": 10,\n "fill": "#fff",\n "stroke": "#666",\n "stroke-width": 1,\n "fill-opacity": 100\n },\n "fwprop": {\n "autoid": 2,\n "type": "state",\n "note": "",\n "identifier": "STATE_S2",\n "entryFunc": "Action4",\n "doFunc": "Action3",\n "exitFunc": "",\n "entryType": "function",\n "entryCode": "",\n "doType": "function",\n "doCode": "",\n "exitType": "function",\n "exitCode": ""\n },\n "selected": false\n },\n {\n "id": 8,\n "attrs": {\n "x": 388,\n "y": 219,\n "width": 30,\n "height": 30,\n "r": 0,\n "rx": 0,\n "ry": 0,\n "fill": "#ffffff",\n "stroke": "#666",\n "stroke-width": 1,\n "fill-opacity": 100,\n "transform": "r45"\n },\n "fwprop": {\n "autoid": 1,\n "type": "choice",\n "note": "Choice pseudo state",\n "identifier": "CPS1"\n },\n "selected": false\n },\n {\n "id": 9,\n "attrs": {\n "x": 551,\n "y": 356,\n "width": 26,\n "height": 26,\n "r": 13,\n "rx": 13,\n "ry": 13,\n "fill": "#000",\n "stroke": "#666",\n "stroke-width": 1,\n "fill-opacity": 100\n },\n "fwprop": {\n "autoid": 1,\n "type": "final",\n "note": "Final state"\n },\n "selected": false\n }\n ],\n "connections": [\n {\n "attrs": {\n "fill": "none",\n "stroke": "#000",\n "path": [\n [\n "M",\n 249,\n 128\n ],\n [\n "L",\n 249,\n 176\n ]\n ],\n "stroke-width": 2,\n "stroke-linecap": "round",\n "stroke-linejoin": "round",\n "stroke-dasharray": ""\n },\n "fwprop": {\n "order": 1,\n "identifier": "",\n "guardFunc": "",\n "actionFunc": "Action1"\n },\n "shiftx": 31,\n "shifty": 6,\n "vertexes": [],\n "shiftxy": {\n "x": 0,\n "y": 0\n },\n "stateFromID": 4,\n "stateToID": 1,\n "selected": false\n },\n {\n "attrs": {\n "fill": "none",\n "stroke": "#000",\n "path": [\n [\n "M",\n 304,\n 234\n ],\n [\n "L",\n 370,\n 234\n ]\n ],\n "stroke-width": 2,\n "stroke-linecap": "round",\n "stroke-linejoin": "round",\n "stroke-dasharray": ""\n },\n "fwprop": {\n "order": 1,\n "identifier": "Trigger1",\n "guardFunc": "",\n "actionFunc": ""\n },\n "shiftx": 0,\n "shifty": -4,\n "vertexes": [],\n "shiftxy": {\n "x": 0,\n "y": 0\n },\n "stateFromID": 1,\n "stateToID": 8,\n "selected": false\n },\n {\n "attrs": {\n "fill": "none",\n "stroke": "#000",\n "path": [\n [\n "M",\n 390.12860435170455,\n 250.48695622365943\n ],\n [\n "L",\n 314,\n 348\n ],\n [\n "L",\n 249,\n 348\n ],\n [\n "L",\n 249,\n 292\n ]\n ],\n "stroke-width": 2,\n "stroke-linecap": "round",\n "stroke-linejoin": "round",\n "stroke-dasharray": ""\n },\n "fwprop": {\n "order": 1,\n "identifier": "",\n "guardFunc": "Guard1",\n "actionFunc": ""\n },\n "shiftx": -38,\n "shifty": 25,\n "vertexes": [\n {\n "x": 314,\n "y": 348,\n "hasMoved": true\n },\n {\n "x": 249,\n "y": 348,\n "hasMoved": true\n }\n ],\n "shiftxy": {\n "x": 0,\n "y": 0\n },\n "stateFromID": 8,\n "stateToID": 1,\n "selected": false\n },\n {\n "attrs": {\n "fill": "none",\n "stroke": "#000",\n "path": [\n [\n "M",\n 433,\n 234\n ],\n [\n "L",\n 506,\n 234\n ]\n ],\n "stroke-width": 2,\n "stroke-linecap": "round",\n "stroke-linejoin": "round",\n "stroke-dasharray": ""\n },\n "fwprop": {\n "order": 2,\n "identifier": "",\n "guardFunc": "Guard2",\n "actionFunc": ""\n },\n "shiftx": 0,\n "shifty": -4,\n "vertexes": [],\n "shiftxy": {\n "x": 0,\n "y": 0\n },\n "stateFromID": 8,\n "stateToID": 5,\n "selected": false\n },\n {\n "attrs": {\n "fill": "none",\n "stroke": "#000",\n "path": [\n [\n "M",\n 564,\n 289\n ],\n [\n "L",\n 564,\n 348\n ]\n ],\n "stroke-width": 2,\n "stroke-linecap": "round",\n "stroke-linejoin": "round",\n "stroke-dasharray": ""\n },\n "fwprop": {\n "order": "1",\n "identifier": "Trigger2",\n "guardFunc": "Guard2",\n "actionFunc": "Action2",\n "guardType": "function",\n "guardCode": "",\n "actionType": "function",\n "actionCode": "",\n "note": ""\n },\n "shiftx": -73,\n "shifty": 10,\n "vertexes": [],\n "shiftxy": {\n "x": 0,\n "y": 0\n },\n "stateFromID": 5,\n "stateToID": 9,\n "selected": false\n }\n ],\n "globals": {\n "paperPanX": 48,\n "paperPanY": 3,\n "attrs": {\n "x": 48,\n "y": 3,\n "width": 1920,\n "height": 955,\n "r": 0,\n "rx": 0,\n "ry": 0,\n "fill": "#eee",\n "stroke": "#000",\n "stroke-width": 0\n },\n "fwprop": {\n "globalvar": [\n {\n "type": "int",\n "name": "",\n "value": ""\n }\n ],\n "smName": "Example 1",\n "editorType": "Sm",\n "smIncludes": "",\n "smNotes": "",\n "memalloc": "dynamic",\n "displayInfo": 0,\n "displayOrder": 1,\n "smTags": "example"\n }\n }\n}\', \'<svg height="329" version="1.1" width="455" xmlns="http://www.w3.org/2000/svg" style="background-color: #eeeeee; overflow: hidden; position: relative;" viewBox="179 73 455 329" preserveAspectRatio="xMinYMin"><desc style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Created with Raphaël 2.1.2</desc><defs style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></defs><rect x="48" y="3" width="1920" height="955" r="0" rx="0" ry="0" fill="#eeeeee" stroke="#000" stroke-width="0" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></rect><rect x="234" y="93" width="30" height="30" r="15" rx="15" ry="15" fill="#ffffff" stroke="#666666" stroke-width="1" fill-opacity="100" transform="matrix(1,0,0,1,0.5,0.5)" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); fill-opacity: 100;"></rect><rect x="199" y="184" width="100" height="100" r="10" rx="10" ry="10" fill="#ffffff" stroke="#666666" stroke-width="1" fill-opacity="100" transform="matrix(1,0,0,1,0.5,0.5)" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); fill-opacity: 100;"></rect><text x="209" y="217" text-anchor="start" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: start; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: default;" font-size="10px" stroke-width="1"><tspan dy="-14.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: bold;"> STATE_S1 </tspan><tspan dy="12" x="209" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> </tspan><tspan dy="12" x="209" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> </tspan><tspan dy="12" x="209" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: bold;"> Exit:</tspan><tspan x="209" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" dx="42">Action2</tspan><tspan dy="12" x="209" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></tspan></text><path fill="#000000" stroke="#000000" d="M209,217.5L289,217.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" stroke-width="1"></path><path fill="none" stroke="#000000" d="M249,128L249,176" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); stroke-linecap: round; stroke-linejoin: round;" stroke-dasharray="-2"></path><path fill="#000000" stroke="#000000" d="M10,0L0,5L10,10L7,6L7,4Z" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" transform="matrix(0,-1,1,0,244,180.5)" stroke-width="1"></path><text x="280" y="148" text-anchor="middle" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: move;" stroke-width="1"><tspan dy="3.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> / Action1</tspan></text><rect x="388" y="219" width="30" height="30" r="0" rx="0" ry="0" fill="#ffffff" stroke="#666666" stroke-width="1" fill-opacity="100" transform="matrix(0.7071,0.7071,-0.7071,0.7071,283.499,-216.427)" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); fill-opacity: 100;"></rect><path fill="none" stroke="#000000" d="M304,234L370,234" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); stroke-linecap: round; stroke-linejoin: round;" stroke-dasharray="-2"></path><path fill="#000000" stroke="#000000" d="M10,0L0,5L10,10L7,6L7,4Z" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" transform="matrix(-1,0,0,-1,374.5,239)" stroke-width="1"></path><text x="337" y="220" text-anchor="middle" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: move;" stroke-width="1"><tspan dy="3.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Trigger1</tspan></text><path fill="none" stroke="#000000" d="M390.12860435170455,250.48695622365943L314,348L249,348L249,292" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); stroke-linecap: round; stroke-linejoin: round;" stroke-dasharray="-2"></path><path fill="#000000" stroke="#000000" d="M10,0L0,5L10,10L7,6L7,4Z" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" transform="matrix(0,1,-1,0,254,287.5)" stroke-width="1"></path><text x="276" y="361" text-anchor="middle" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: move;" stroke-width="1"><tspan dy="3.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">1: [Guard1] </tspan></text><rect x="514" y="184" width="100" height="100" r="10" rx="10" ry="10" fill="#ffffff" stroke="#666666" stroke-width="1" fill-opacity="100" transform="matrix(1,0,0,1,0.5,0.5)" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); fill-opacity: 100;"></rect><text x="524" y="223" text-anchor="start" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: start; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: default;" font-size="10px" stroke-width="1"><tspan dy="-20.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: bold;"> STATE_S2 </tspan><tspan dy="12" x="524" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> </tspan><tspan dy="12" x="524" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> </tspan><tspan dy="12" x="524" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: bold;"> Entry:</tspan><tspan x="524" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" dx="42">Action4</tspan><tspan dy="12" x="524" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: bold;"> Do:</tspan><tspan x="524" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" dx="42">Action3</tspan><tspan dy="12" x="524" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></tspan></text><path fill="#000000" stroke="#000000" d="M524,217.5L604,217.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" stroke-width="1"></path><path fill="none" stroke="#000000" d="M433,234L506,234" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); stroke-linecap: round; stroke-linejoin: round;" stroke-dasharray="-2"></path><path fill="#000000" stroke="#000000" d="M10,0L0,5L10,10L7,6L7,4Z" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" transform="matrix(-1,0,0,-1,510.5,239)" stroke-width="1"></path><text x="469" y="220" text-anchor="middle" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: move;" stroke-width="1"><tspan dy="3.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">2: [Guard2] </tspan></text><rect x="560" y="303.0024533000251" width="8" height="8" r="4" rx="4" ry="4" fill="#ff0000" stroke="#000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); display: none;"></rect><rect x="560" y="286.9968430195004" width="8" height="8" r="4" rx="4" ry="4" fill="#83e5fe" stroke="#000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); display: none;"></rect><rect x="551" y="356" width="26" height="26" r="13" rx="13" ry="13" fill="#000000" stroke="#666666" stroke-width="1" fill-opacity="100" transform="matrix(1,0,0,1,0.5,0.5)" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); fill-opacity: 100;"></rect><path fill="none" stroke="#000000" d="M564,289L564,348" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); stroke-linecap: round; stroke-linejoin: round;" stroke-dasharray="-2"></path><path fill="#000000" stroke="#000000" d="M10,0L0,5L10,10L7,6L7,4Z" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" transform="matrix(0,-1,1,0,559,352.5)" stroke-width="1"></path><text x="491" y="318" text-anchor="middle" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: move;" stroke-width="1"><tspan dy="3.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Trigger2 [Guard2] / Action2</tspan></text></svg>\', 455, 329)');
execQuery('INSERT IGNORE INTO diagrams VALUES (4, \''.$exampleUserID.'\', \'Example 2\', \'N\', \'State Machine\', \'2015-03-24 03:14:28\', \'{\n "states": [\n {\n "id": 41,\n "attrs": {\n "x": 221,\n "y": 184,\n "width": 100,\n "height": 100,\n "r": 10,\n "rx": 10,\n "ry": 10,\n "fill": "#fff",\n "stroke": "#666",\n "stroke-width": 1,\n "fill-opacity": 100\n },\n "fwprop": {\n "autoid": 1,\n "type": "state",\n "note": "",\n "identifier": "STATE_S1",\n "entryFunc": "",\n "doFunc": "",\n "exitFunc": "Action2",\n "entryType": "function",\n "entryCode": "",\n "doType": "function",\n "doCode": "",\n "exitType": "function",\n "exitCode": ""\n },\n "selected": false\n },\n {\n "id": 44,\n "attrs": {\n "x": 256,\n "y": 23,\n "width": 30,\n "height": 30,\n "r": 15,\n "rx": 15,\n "ry": 15,\n "fill": "#fff",\n "stroke": "#666",\n "stroke-width": 1,\n "fill-opacity": 100\n },\n "fwprop": {\n "autoid": 1,\n "type": "init",\n "note": "Initial state"\n },\n "selected": false\n },\n {\n "id": 45,\n "attrs": {\n "x": 475,\n "y": 22,\n "width": 160,\n "height": 424,\n "r": 10,\n "rx": 10,\n "ry": 10,\n "fill": "#fff",\n "stroke": "#666",\n "stroke-width": 1,\n "fill-opacity": 100\n },\n "fwprop": {\n "autoid": 2,\n "type": "state",\n "note": "",\n "identifier": "STATE_S2",\n "entryFunc": "Action4",\n "doFunc": "Action3",\n "exitFunc": "",\n "entryType": "function",\n "entryCode": "",\n "doType": "function",\n "doCode": "",\n "exitType": "function",\n "exitCode": ""\n },\n "selected": false\n },\n {\n "id": 48,\n "attrs": {\n "x": 378,\n "y": 219,\n "width": 30,\n "height": 30,\n "r": 0,\n "rx": 0,\n "ry": 0,\n "fill": "#ffffff",\n "stroke": "#666",\n "stroke-width": 1,\n "fill-opacity": 100,\n "transform": "r45"\n },\n "fwprop": {\n "autoid": 1,\n "type": "choice",\n "note": "Choice pseudo state",\n "identifier": "CPS1"\n },\n "selected": false\n },\n {\n "id": 49,\n "attrs": {\n "x": 542,\n "y": 511,\n "width": 26,\n "height": 26,\n "r": 13,\n "rx": 13,\n "ry": 13,\n "fill": "#000",\n "stroke": "#666",\n "stroke-width": 1,\n "fill-opacity": 100\n },\n "fwprop": {\n "autoid": 1,\n "type": "final",\n "note": "Final state"\n },\n "selected": false\n },\n {\n "id": 50,\n "attrs": {\n "x": 540,\n "y": 110,\n "width": 30,\n "height": 30,\n "r": 15,\n "rx": 15,\n "ry": 15,\n "fill": "#fff",\n "stroke": "#666",\n "stroke-width": 1,\n "fill-opacity": 100\n },\n "fwprop": {\n "autoid": 2,\n "type": "init",\n "note": "Embedded initial state creates an embedded state machine."\n },\n "selected": false\n },\n {\n "id": 51,\n "attrs": {\n "x": 505,\n "y": 172,\n "width": 100,\n "height": 100,\n "r": 10,\n "rx": 10,\n "ry": 10,\n "fill": "#fff",\n "stroke": "#666",\n "stroke-width": 1,\n "fill-opacity": 100\n },\n "fwprop": {\n "autoid": 3,\n "type": "state",\n "note": "",\n "identifier": "STATE_ES1",\n "entryFunc": "Action5",\n "doFunc": "",\n "exitFunc": "",\n "entryType": "function",\n "doType": "function",\n "exitType": "function",\n "entryCode": "",\n "doCode": "",\n "exitCode": ""\n },\n "selected": false\n },\n {\n "id": 54,\n "attrs": {\n "x": 505,\n "y": 306,\n "width": 100,\n "height": 100,\n "r": 10,\n "rx": 10,\n "ry": 10,\n "fill": "#fff",\n "stroke": "#666",\n "stroke-width": 1,\n "fill-opacity": 100\n },\n "fwprop": {\n "autoid": 4,\n "type": "state",\n "note": "",\n "identifier": "STATE_ES2",\n "entryFunc": "",\n "doFunc": "",\n "exitFunc": "Action6",\n "entryType": "function",\n "doType": "function",\n "exitType": "function",\n "entryCode": "",\n "doCode": "",\n "exitCode": ""\n },\n "selected": false\n }\n ],\n "connections": [\n {\n "attrs": {\n "fill": "none",\n "stroke": "#000",\n "path": [\n [\n "M",\n 271,\n 58\n ],\n [\n "L",\n 271,\n 176\n ]\n ],\n "stroke-width": 2,\n "stroke-linecap": "round",\n "stroke-linejoin": "round",\n "stroke-dasharray": ""\n },\n "fwprop": {\n "order": 1,\n "identifier": "",\n "guardFunc": "",\n "actionFunc": "Action1"\n },\n "shiftx": 29,\n "shifty": 5,\n "vertexes": [],\n "shiftxy": {\n "x": 0,\n "y": 0\n },\n "stateFromID": 44,\n "stateToID": 41,\n "selected": false\n },\n {\n "attrs": {\n "fill": "none",\n "stroke": "#000",\n "path": [\n [\n "M",\n 326,\n 234\n ],\n [\n "L",\n 360,\n 234\n ]\n ],\n "stroke-width": 2,\n "stroke-linecap": "round",\n "stroke-linejoin": "round",\n "stroke-dasharray": ""\n },\n "fwprop": {\n "order": 1,\n "identifier": "Trigger1",\n "guardFunc": "",\n "actionFunc": ""\n },\n "shiftx": 6,\n "shifty": -8,\n "vertexes": [],\n "shiftxy": {\n "x": 0,\n "y": 0\n },\n "stateFromID": 41,\n "stateToID": 48,\n "selected": false\n },\n {\n "attrs": {\n "fill": "none",\n "stroke": "#000",\n "path": [\n [\n "M",\n 393,\n 264\n ],\n [\n "L",\n 393,\n 337\n ],\n [\n "L",\n 271,\n 337\n ],\n [\n "L",\n 271,\n 292\n ]\n ],\n "stroke-width": 2,\n "stroke-linecap": "round",\n "stroke-linejoin": "round",\n "stroke-dasharray": ""\n },\n "fwprop": {\n "order": 1,\n "identifier": "",\n "guardFunc": "Guard1",\n "actionFunc": ""\n },\n "shiftx": -12,\n "shifty": 24,\n "vertexes": [\n {\n "x": 393,\n "y": 337,\n "hasMoved": true\n },\n {\n "x": 271,\n "y": 337,\n "hasMoved": true\n }\n ],\n "shiftxy": {\n "x": 0,\n "y": 0\n },\n "stateFromID": 48,\n "stateToID": 41,\n "selected": false\n },\n {\n "attrs": {\n "fill": "none",\n "stroke": "#000",\n "path": [\n [\n "M",\n 423,\n 234\n ],\n [\n "L",\n 467,\n 234\n ]\n ],\n "stroke-width": 2,\n "stroke-linecap": "round",\n "stroke-linejoin": "round",\n "stroke-dasharray": ""\n },\n "fwprop": {\n "order": 2,\n "identifier": "",\n "guardFunc": "Guard2",\n "actionFunc": ""\n },\n "shiftx": -6,\n "shifty": -8,\n "vertexes": [],\n "shiftxy": {\n "x": 0,\n "y": 0\n },\n "stateFromID": 48,\n "stateToID": 45,\n "selected": false\n },\n {\n "attrs": {\n "fill": "none",\n "stroke": "#000",\n "path": [\n [\n "M",\n 555,\n 451\n ],\n [\n "L",\n 555,\n 503\n ]\n ],\n "stroke-width": 2,\n "stroke-linecap": "round",\n "stroke-linejoin": "round",\n "stroke-dasharray": ""\n },\n "fwprop": {\n "order": "1",\n "identifier": "Trigger2",\n "guardFunc": "Guard2",\n "actionFunc": "Action2",\n "guardType": "function",\n "guardCode": "",\n "actionType": "function",\n "actionCode": "",\n "note": ""\n },\n "shiftx": -78,\n "shifty": 12,\n "vertexes": [],\n "shiftxy": {\n "x": 0,\n "y": 0\n },\n "stateFromID": 45,\n "stateToID": 49,\n "selected": false\n },\n {\n "attrs": {\n "fill": "none",\n "stroke": "#000",\n "path": [\n [\n "M",\n 555,\n 277\n ],\n [\n "L",\n 555,\n 298\n ]\n ],\n "stroke-width": 2,\n "stroke-linecap": "round",\n "stroke-linejoin": "round",\n "stroke-dasharray": ""\n },\n "fwprop": {\n "order": 1,\n "identifier": "Trigger3",\n "guardFunc": "",\n "actionFunc": "",\n "guardType": "function",\n "actionType": "function",\n "guardCode": "",\n "actionCode": ""\n },\n "shiftx": -29,\n "shifty": 12,\n "vertexes": [],\n "shiftxy": {\n "x": 0,\n "y": 0\n },\n "stateFromID": 51,\n "stateToID": 54,\n "selected": false\n },\n {\n "attrs": {\n "fill": "none",\n "stroke": "#000",\n "path": [\n [\n "M",\n 555,\n 145\n ],\n [\n "L",\n 555,\n 164\n ]\n ],\n "stroke-width": 2,\n "stroke-linecap": "round",\n "stroke-linejoin": "round",\n "stroke-dasharray": ""\n },\n "fwprop": {\n "order": "1",\n "identifier": "",\n "guardFunc": "",\n "actionFunc": "",\n "guardType": "function",\n "actionType": "function",\n "guardCode": "",\n "actionCode": "",\n "note": ""\n },\n "shiftx": 0,\n "shifty": 0,\n "vertexes": [],\n "shiftxy": {\n "x": 0,\n "y": 0\n },\n "stateFromID": 50,\n "stateToID": 51,\n "selected": false\n }\n ],\n "globals": {\n "paperPanX": 58,\n "paperPanY": -58,\n "attrs": {\n "x": 58,\n "y": -58,\n "width": 1920,\n "height": 955,\n "r": 0,\n "rx": 0,\n "ry": 0,\n "fill": "#eee",\n "stroke": "#000",\n "stroke-width": 0\n },\n "fwprop": {\n "globalvar": [\n {\n "type": "int",\n "name": "",\n "value": ""\n }\n ],\n "smName": "Example 2",\n "editorType": "Sm",\n "smIncludes": "",\n "smNotes": "",\n "memalloc": "dynamic",\n "displayInfo": 0,\n "displayOrder": 1,\n "smTags": "example"\n }\n }\n}\', \'<svg height="555" version="1.1" width="454" xmlns="http://www.w3.org/2000/svg" style="background-color: #eeeeee; overflow: hidden; position: relative;" viewBox="201 2 454 555" preserveAspectRatio="xMinYMin"><desc style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Created with Raphaël 2.1.2</desc><defs style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></defs><rect x="58" y="-58" width="1920" height="955" r="0" rx="0" ry="0" fill="#eeeeee" stroke="#000" stroke-width="0" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></rect><rect x="221" y="184" width="100" height="100" r="10" rx="10" ry="10" fill="#ffffff" stroke="#666666" stroke-width="1" fill-opacity="100" transform="matrix(1,0,0,1,0.5,0.5)" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); fill-opacity: 100;"></rect><text x="231" y="217" text-anchor="start" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: start; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: default;" font-size="10px" stroke-width="1"><tspan dy="-14.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: bold;"> STATE_S1 </tspan><tspan dy="12" x="231" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> </tspan><tspan dy="12" x="231" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> </tspan><tspan dy="12" x="231" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: bold;"> Exit:</tspan><tspan x="231" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" dx="42">Action2</tspan><tspan dy="12" x="231" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></tspan></text><path fill="#000000" stroke="#000000" d="M231,217.5L311,217.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" stroke-width="1"></path><rect x="256" y="23" width="30" height="30" r="15" rx="15" ry="15" fill="#ffffff" stroke="#666666" stroke-width="1" fill-opacity="100" transform="matrix(1,0,0,1,0.5,0.5)" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); fill-opacity: 100;"></rect><path fill="none" stroke="#000000" d="M271,58L271,176" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); stroke-linecap: round; stroke-linejoin: round;" stroke-dasharray="-2"></path><path fill="#000000" stroke="#000000" d="M10,0L0,5L10,10L7,6L7,4Z" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" transform="matrix(0,-1,1,0,266,180.5)" stroke-width="1"></path><text x="300" y="112" text-anchor="middle" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: move;" stroke-width="1"><tspan dy="3.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> / Action1</tspan></text><rect x="475" y="22" width="160" height="424" r="10" rx="10" ry="10" fill="#ffffff" stroke="#666666" stroke-width="1" fill-opacity="100" transform="matrix(1,0,0,1,0.5,0.5)" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); fill-opacity: 100;"></rect><text x="485" y="61" text-anchor="start" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: start; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: default;" font-size="10px" stroke-width="1"><tspan dy="-20.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: bold;"> STATE_S2 </tspan><tspan dy="12" x="485" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> </tspan><tspan dy="12" x="485" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> </tspan><tspan dy="12" x="485" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: bold;"> Entry:</tspan><tspan x="485" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" dx="42">Action4</tspan><tspan dy="12" x="485" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: bold;"> Do:</tspan><tspan x="485" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" dx="42">Action3</tspan><tspan dy="12" x="485" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></tspan></text><path fill="#000000" stroke="#000000" d="M485,55.5L625,55.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" stroke-width="1"></path><rect x="542" y="511" width="26" height="26" r="13" rx="13" ry="13" fill="#000000" stroke="#666666" stroke-width="1" fill-opacity="100" transform="matrix(1,0,0,1,0.5,0.5)" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); fill-opacity: 100;"></rect><path fill="none" stroke="#000000" d="M555,451L555,503" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); stroke-linecap: round; stroke-linejoin: round;" stroke-dasharray="-2"></path><path fill="#000000" stroke="#000000" d="M10,0L0,5L10,10L7,6L7,4Z" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" transform="matrix(0,-1,1,0,550,507.5)" stroke-width="1"></path><text x="477" y="479" text-anchor="middle" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: move;" stroke-width="1"><tspan dy="3.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Trigger2 [Guard2] / Action2</tspan></text><rect x="540" y="110" width="30" height="30" r="15" rx="15" ry="15" fill="#ffffff" stroke="#666666" stroke-width="1" fill-opacity="100" transform="matrix(1,0,0,1,0.5,0.5)" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); fill-opacity: 100;"></rect><rect x="505" y="172" width="100" height="100" r="10" rx="10" ry="10" fill="#ffffff" stroke="#666666" stroke-width="1" fill-opacity="100" transform="matrix(1,0,0,1,0.5,0.5)" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); fill-opacity: 100;"></rect><text x="515" y="205" text-anchor="start" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: start; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: default;" font-size="10px" stroke-width="1"><tspan dy="-14.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: bold;"> STATE_ES1 </tspan><tspan dy="12" x="515" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> </tspan><tspan dy="12" x="515" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> </tspan><tspan dy="12" x="515" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: bold;"> Entry:</tspan><tspan x="515" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" dx="42">Action5</tspan><tspan dy="12" x="515" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></tspan></text><path fill="#000000" stroke="#000000" d="M515,205.5L595,205.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" stroke-width="1"></path><path fill="none" stroke="#000000" d="M555,145L555,164" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); stroke-linecap: round; stroke-linejoin: round;" stroke-dasharray="-2"></path><path fill="#000000" stroke="#000000" d="M10,0L0,5L10,10L7,6L7,4Z" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" transform="matrix(0,-1,1,0,550,168.5)" stroke-width="1"></path><text x="555" y="144" text-anchor="middle" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: move;" stroke-width="1"><tspan dy="5.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></tspan></text><rect x="505" y="306" width="100" height="100" r="10" rx="10" ry="10" fill="#ffffff" stroke="#666666" stroke-width="1" fill-opacity="100" transform="matrix(1,0,0,1,0.5,0.5)" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); fill-opacity: 100;"></rect><text x="515" y="339" text-anchor="start" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: start; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: default;" font-size="10px" stroke-width="1"><tspan dy="-14.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: bold;"> STATE_ES2 </tspan><tspan dy="12" x="515" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> </tspan><tspan dy="12" x="515" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> </tspan><tspan dy="12" x="515" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: bold;"> Exit:</tspan><tspan x="515" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" dx="42">Action6</tspan><tspan dy="12" x="515" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></tspan></text><path fill="#000000" stroke="#000000" d="M515,339.5L595,339.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" stroke-width="1"></path><path fill="none" stroke="#000000" d="M555,277L555,298" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); stroke-linecap: round; stroke-linejoin: round;" stroke-dasharray="-2"></path><path fill="#000000" stroke="#000000" d="M10,0L0,5L10,10L7,6L7,4Z" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" transform="matrix(0,-1,1,0,550,302.5)" stroke-width="1"></path><text x="526" y="289" text-anchor="middle" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: move;" stroke-width="1"><tspan dy="3.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Trigger3</tspan></text><rect x="273.0083859716542" y="333" width="8" height="8" r="4" rx="4" ry="4" fill="#ff0000" stroke="#000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); display: none;" stroke-width="1"></rect><rect x="389" y="261.99043332599103" width="8" height="8" r="4" rx="4" ry="4" fill="#83e5fe" stroke="#000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); display: none;" stroke-width="1"></rect><rect x="378" y="219" width="30" height="30" r="0" rx="0" ry="0" fill="#ffffff" stroke="#666666" stroke-width="1" fill-opacity="100" transform="matrix(0.7071,0.7071,-0.7071,0.7071,280.57,-209.356)" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); fill-opacity: 100;"></rect><path fill="none" stroke="#000000" d="M326,234L360,234" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); stroke-linecap: round; stroke-linejoin: round;" stroke-dasharray="-2"></path><path fill="#000000" stroke="#000000" d="M10,0L0,5L10,10L7,6L7,4Z" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" transform="matrix(-1,0,0,-1,364.5,239)" stroke-width="1"></path><text x="349" y="216" text-anchor="middle" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: move;" stroke-width="1"><tspan dy="3.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Trigger1</tspan></text><path fill="none" stroke="#000000" d="M393,264L393,337L271,337L271,292" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); stroke-linecap: round; stroke-linejoin: round;" stroke-dasharray="-2"></path><path fill="#000000" stroke="#000000" d="M10,0L0,5L10,10L7,6L7,4Z" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" transform="matrix(0,1,-1,0,276,287.5)" stroke-width="1"></path><text x="334" y="351" text-anchor="middle" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: move;" stroke-width="1"><tspan dy="3.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">1: [Guard1] </tspan></text><path fill="none" stroke="#000000" d="M423,234L467,234" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); stroke-linecap: round; stroke-linejoin: round;" stroke-dasharray="-2"></path><path fill="#000000" stroke="#000000" d="M10,0L0,5L10,10L7,6L7,4Z" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" transform="matrix(-1,0,0,-1,471.5,239)" stroke-width="1"></path><text x="439" y="216" text-anchor="middle" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: move;" stroke-width="1"><tspan dy="3.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">2: [Guard2] </tspan></text></svg>\', 454, 555)');
execQuery('INSERT IGNORE INTO diagrams VALUES (5, \''.$exampleUserID.'\', \'Example 3\', \'N\', \'Procedure\', \'2015-03-24 03:15:10\', \'{\n "states": [\n {\n "id": 82,\n "attrs": {\n "x": 179,\n "y": 91,\n "width": 30,\n "height": 30,\n "r": 15,\n "rx": 15,\n "ry": 15,\n "fill": "#fff",\n "stroke": "#666",\n "stroke-width": 1,\n "fill-opacity": 100\n },\n "fwprop": {\n "autoid": 1,\n "type": "init",\n "note": "Initial node. The procedure starts here"\n },\n "selected": false\n },\n {\n "id": 83,\n "attrs": {\n "x": 262,\n "y": 91,\n "width": 104,\n "height": 30,\n "r": 10,\n "rx": 10,\n "ry": 10,\n "fill": "#fff",\n "stroke": "#666",\n "stroke-width": 1,\n "fill-opacity": 100\n },\n "fwprop": {\n "autoid": 1,\n "type": "state",\n "note": "Action node 1",\n "identifier": "NODE1",\n "entryFunc": "Action1",\n "doFunc": "",\n "exitFunc": "",\n "entryType": "function",\n "doType": "function",\n "exitType": "function",\n "entryCode": "",\n "doCode": "",\n "exitCode": ""\n },\n "selected": false\n },\n {\n "id": 85,\n "attrs": {\n "x": 302,\n "y": 264,\n "width": 24,\n "height": 24,\n "r": 0,\n "rx": 0,\n "ry": 0,\n "fill": "#fff",\n "stroke": "#666",\n "stroke-width": 1,\n "fill-opacity": 100,\n "transform": "r45"\n },\n "fwprop": {\n "autoid": 1,\n "type": "choice",\n "note": "Decision node",\n "identifier": "DECISION1"\n },\n "selected": false\n },\n {\n "id": 86,\n "attrs": {\n "x": 142,\n "y": 336,\n "width": 104,\n "height": 30,\n "r": 10,\n "rx": 10,\n "ry": 10,\n "fill": "#fff",\n "stroke": "#666",\n "stroke-width": 1,\n "fill-opacity": 100\n },\n "fwprop": {\n "autoid": 2,\n "type": "state",\n "note": "Action node 3",\n "identifier": "NODE3",\n "entryFunc": "Action1",\n "doFunc": "",\n "exitFunc": "",\n "entryType": "function",\n "doType": "function",\n "exitType": "function",\n "entryCode": "",\n "doCode": "",\n "exitCode": ""\n },\n "selected": false\n },\n {\n "id": 88,\n "attrs": {\n "x": 262,\n "y": 176,\n "width": 104,\n "height": 30,\n "r": 10,\n "rx": 10,\n "ry": 10,\n "fill": "#fff",\n "stroke": "#666",\n "stroke-width": 1,\n "fill-opacity": 100\n },\n "fwprop": {\n "autoid": 3,\n "type": "state",\n "note": "Action node 2",\n "identifier": "NODE2",\n "entryFunc": "Action2",\n "doFunc": "",\n "exitFunc": "",\n "entryType": "function",\n "doType": "function",\n "exitType": "function",\n "entryCode": "",\n "doCode": "",\n "exitCode": ""\n },\n "selected": false\n },\n {\n "id": 90,\n "attrs": {\n "x": 372,\n "y": 336,\n "width": 104,\n "height": 30,\n "r": 10,\n "rx": 10,\n "ry": 10,\n "fill": "#fff",\n "stroke": "#666",\n "stroke-width": 1,\n "fill-opacity": 100\n },\n "fwprop": {\n "autoid": 4,\n "type": "state",\n "note": "Action node 4",\n "identifier": "NODE4",\n "entryFunc": "Action2",\n "doFunc": "",\n "exitFunc": "",\n "entryType": "function",\n "doType": "function",\n "exitType": "function",\n "entryCode": "",\n "doCode": "",\n "exitCode": ""\n },\n "selected": false\n },\n {\n "id": 92,\n "attrs": {\n "x": 301,\n "y": 399,\n "width": 26,\n "height": 26,\n "r": 13,\n "rx": 13,\n "ry": 13,\n "fill": "#000",\n "stroke": "#666",\n "stroke-width": 1,\n "fill-opacity": 100\n },\n "fwprop": {\n "autoid": 1,\n "type": "final",\n "note": "Final node. The procedure terminates here"\n },\n "selected": false\n }\n ],\n "connections": [\n {\n "attrs": {\n "fill": "none",\n "stroke": "#000",\n "path": [\n [\n "M",\n 214,\n 106\n ],\n [\n "L",\n 254,\n 106.00000000000001\n ]\n ],\n "stroke-width": 2,\n "stroke-linecap": "round",\n "stroke-linejoin": "round",\n "stroke-dasharray": ""\n },\n "fwprop": {\n "order": 1,\n "identifier": "",\n "guardFunc": "",\n "actionFunc": "",\n "guardType": "function",\n "actionType": "function",\n "guardCode": "",\n "actionCode": ""\n },\n "shiftx": 0,\n "shifty": 0,\n "vertexes": [],\n "shiftxy": {\n "x": 0,\n "y": 0\n },\n "stateFromID": 82,\n "stateToID": 83,\n "selected": false\n },\n {\n "attrs": {\n "fill": "none",\n "stroke": "#000",\n "path": [\n [\n "M",\n 314,\n 126\n ],\n [\n "L",\n 314,\n 168\n ]\n ],\n "stroke-width": 2,\n "stroke-linecap": "round",\n "stroke-linejoin": "round",\n "stroke-dasharray": ""\n },\n "fwprop": {\n "order": "1",\n "identifier": "",\n "guardFunc": "Guard1",\n "actionFunc": "",\n "guardType": "function",\n "actionType": "function",\n "guardCode": "",\n "actionCode": "",\n "note": ""\n },\n "shiftx": 31,\n "shifty": 5,\n "vertexes": [],\n "shiftxy": {\n "x": 0,\n "y": 0\n },\n "stateFromID": 83,\n "stateToID": 88,\n "selected": false\n },\n {\n "attrs": {\n "fill": "none",\n "stroke": "#000",\n "path": [\n [\n "M",\n 314,\n 211\n ],\n [\n "L",\n 314,\n 246\n ]\n ],\n "stroke-width": 2,\n "stroke-linecap": "round",\n "stroke-linejoin": "round",\n "stroke-dasharray": ""\n },\n "fwprop": {\n "order": "1",\n "identifier": "",\n "guardFunc": "wait",\n "actionFunc": "",\n "guardType": "code",\n "actionType": "function",\n "guardCode": "exec_counter > 3;",\n "actionCode": "",\n "note": ""\n },\n "shiftx": 29,\n "shifty": 6,\n "vertexes": [],\n "shiftxy": {\n "x": 0,\n "y": 0\n },\n "stateFromID": 88,\n "stateToID": 85,\n "selected": false\n },\n {\n "attrs": {\n "fill": "none",\n "stroke": "#000",\n "path": [\n [\n "M",\n 287,\n 276\n ],\n [\n "L",\n 194,\n 276\n ],\n [\n "L",\n 194,\n 328\n ]\n ],\n "stroke-width": 2,\n "stroke-linecap": "round",\n "stroke-linejoin": "round",\n "stroke-dasharray": ""\n },\n "fwprop": {\n "order": "1",\n "identifier": "",\n "guardFunc": "Guard1",\n "actionFunc": "",\n "guardType": "function",\n "actionType": "function",\n "guardCode": "",\n "actionCode": "",\n "note": ""\n },\n "shiftx": 29,\n "shifty": -5,\n "vertexes": [\n {\n "x": 194,\n "y": 276,\n "hasMoved": true\n }\n ],\n "shiftxy": {\n "x": 0,\n "y": 0\n },\n "stateFromID": 85,\n "stateToID": 86,\n "selected": false\n },\n {\n "attrs": {\n "fill": "none",\n "stroke": "#000",\n "path": [\n [\n "M",\n 341,\n 276\n ],\n [\n "L",\n 424,\n 276\n ],\n [\n "L",\n 424,\n 328\n ]\n ],\n "stroke-width": 2,\n "stroke-linecap": "round",\n "stroke-linejoin": "round",\n "stroke-dasharray": ""\n },\n "fwprop": {\n "order": "2",\n "identifier": "",\n "guardFunc": "Guard2",\n "actionFunc": "",\n "guardType": "function",\n "actionType": "function",\n "guardCode": "",\n "actionCode": "",\n "note": ""\n },\n "shiftx": -38,\n "shifty": -6,\n "vertexes": [\n {\n "x": 424,\n "y": 276,\n "hasMoved": true\n }\n ],\n "shiftxy": {\n "x": 0,\n "y": 0\n },\n "stateFromID": 85,\n "stateToID": 90,\n "selected": false\n },\n {\n "attrs": {\n "fill": "none",\n "stroke": "#000",\n "path": [\n [\n "M",\n 194,\n 371\n ],\n [\n "L",\n 194,\n 412\n ],\n [\n "L",\n 293,\n 412\n ]\n ],\n "stroke-width": 2,\n "stroke-linecap": "round",\n "stroke-linejoin": "round",\n "stroke-dasharray": ""\n },\n "fwprop": {\n "order": 1,\n "identifier": "",\n "guardFunc": "",\n "actionFunc": "",\n "guardType": "function",\n "actionType": "function",\n "guardCode": "",\n "actionCode": ""\n },\n "shiftx": 0,\n "shifty": 0,\n "vertexes": [\n {\n "x": 194,\n "y": 412,\n "hasMoved": true\n }\n ],\n "shiftxy": {\n "x": 0,\n "y": 0\n },\n "stateFromID": 86,\n "stateToID": 92,\n "selected": false\n },\n {\n "attrs": {\n "fill": "none",\n "stroke": "#000",\n "path": [\n [\n "M",\n 424,\n 371\n ],\n [\n "L",\n 424,\n 412\n ],\n [\n "L",\n 335,\n 412\n ]\n ],\n "stroke-width": 2,\n "stroke-linecap": "round",\n "stroke-linejoin": "round",\n "stroke-dasharray": ""\n },\n "fwprop": {\n "order": 1,\n "identifier": "",\n "guardFunc": "",\n "actionFunc": "",\n "guardType": "function",\n "actionType": "function",\n "guardCode": "",\n "actionCode": ""\n },\n "shiftx": 0,\n "shifty": 0,\n "vertexes": [\n {\n "x": 424,\n "y": 412,\n "hasMoved": true\n }\n ],\n "shiftxy": {\n "x": 0,\n "y": 0\n },\n "stateFromID": 90,\n "stateToID": 92,\n "selected": false\n }\n ],\n "globals": {\n "paperPanX": 0,\n "paperPanY": 0,\n "attrs": {\n "x": 0,\n "y": 0,\n "width": 1920,\n "height": 955,\n "r": 0,\n "rx": 0,\n "ry": 0,\n "fill": "#eee",\n "stroke": "#000",\n "stroke-width": 0\n },\n "fwprop": {\n "globalvar": [\n {\n "type": "int",\n "name": "",\n "value": ""\n },\n {\n "type": "int",\n "name": "exec_counter",\n "value": "1"\n }\n ],\n "memalloc": "static",\n "smName": "Example 3",\n "editorType": "Pr",\n "smIncludes": "",\n "smNotes": "",\n "displayInfo": 0,\n "displayOrder": 1,\n "smTags": "example"\n }\n }\n}\', \'<svg height="374" version="1.1" width="374" xmlns="http://www.w3.org/2000/svg" style="background-color: #eeeeee; overflow: hidden; position: relative;" viewBox="122 71 374 374" preserveAspectRatio="xMinYMin"><desc style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Created with Raphaël 2.1.2</desc><defs style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></defs><rect x="0" y="0" width="1920" height="955" r="0" rx="0" ry="0" fill="#eeeeee" stroke="#000" stroke-width="0" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></rect><rect x="179" y="91" width="30" height="30" r="15" rx="15" ry="15" fill="#ffffff" stroke="#666666" stroke-width="1" fill-opacity="100" transform="matrix(1,0,0,1,0.5,0.5)" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); fill-opacity: 100;"></rect><rect x="302" y="264" width="24" height="24" r="0" rx="0" ry="0" fill="#ffffff" stroke="#666666" stroke-width="1" fill-opacity="100" transform="matrix(0.7071,0.7071,-0.7071,0.7071,287.1299,-141.193)" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); fill-opacity: 100;"></rect><rect x="372" y="336" width="104" height="30" r="10" rx="10" ry="10" fill="#ffffff" stroke="#666666" stroke-width="1" fill-opacity="100" transform="matrix(1,0,0,1,0.5,0.5)" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); fill-opacity: 100;"></rect><text x="382" y="351" text-anchor="start" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: start; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: default;" font-size="10px" stroke-width="1"><tspan dy="3.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: bold;"> NODE4:  Action2</tspan></text><path fill="none" stroke="#000000" d="M341,276L424,276L424,328" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); stroke-linecap: round; stroke-linejoin: round;" stroke-dasharray="-2"></path><path fill="#000000" stroke="#000000" d="M10,0L0,5L10,10L7,6L7,4Z" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" transform="matrix(0,-1,1,0,419,332.5)" stroke-width="1"></path><text x="370" y="260" text-anchor="middle" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: move;" stroke-width="1"><tspan dy="3.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">2: [Guard2] </tspan></text><rect x="301" y="399" width="26" height="26" r="13" rx="13" ry="13" fill="#000000" stroke="#666666" stroke-width="1" fill-opacity="100" transform="matrix(1,0,0,1,0.5,0.5)" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); fill-opacity: 100;"></rect><path fill="none" stroke="#000000" d="M424,371L424,412L335,412" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); stroke-linecap: round; stroke-linejoin: round;" stroke-dasharray="-2"></path><path fill="#000000" stroke="#000000" d="M10,0L0,5L10,10L7,6L7,4Z" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" transform="matrix(1,0,0,1,330.5,407)" stroke-width="1"></path><text x="400" y="402" text-anchor="middle" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: move;" stroke-width="1"><tspan dy="402" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></tspan></text><rect x="142" y="336" width="104" height="30" r="10" rx="10" ry="10" fill="#ffffff" stroke="#666666" stroke-width="1" fill-opacity="100" transform="matrix(1,0,0,1,0.5,0.5)" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); fill-opacity: 100;"></rect><text x="152" y="351" text-anchor="start" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: start; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: default;" font-size="10px" stroke-width="1"><tspan dy="3.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: bold;"> NODE3:  Action1</tspan></text><path fill="none" stroke="#000000" d="M287,276L194,276L194,328" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); stroke-linecap: round; stroke-linejoin: round;" stroke-dasharray="-2"></path><path fill="#000000" stroke="#000000" d="M10,0L0,5L10,10L7,6L7,4Z" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" transform="matrix(0,-1,1,0,189,332.5)" stroke-width="1"></path><text x="243" y="261" text-anchor="middle" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: move;" stroke-width="1"><tspan dy="3.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">1: [Guard1] </tspan></text><path fill="none" stroke="#000000" d="M194,371L194,412L293,412" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); stroke-linecap: round; stroke-linejoin: round;" stroke-dasharray="-2"></path><path fill="#000000" stroke="#000000" d="M10,0L0,5L10,10L7,6L7,4Z" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" transform="matrix(-1,0,0,-1,297.5,417)" stroke-width="1"></path><text x="223" y="402" text-anchor="middle" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: move;" stroke-width="1"><tspan dy="402" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></tspan></text><rect x="420" y="272.9923357963562" width="8" height="8" r="4" rx="4" ry="4" fill="#ff0000" stroke="#000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); display: none;" stroke-width="1"></rect><rect x="338.99015307449736" y="272" width="8" height="8" r="4" rx="4" ry="4" fill="#83e5fe" stroke="#000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); display: none;" stroke-width="1"></rect><rect x="262" y="176" width="104" height="30" r="10" rx="10" ry="10" fill="#ffffff" stroke="#666666" stroke-width="1" fill-opacity="100" transform="matrix(1,0,0,1,0.5,0.5)" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); fill-opacity: 100;"></rect><text x="272" y="191" text-anchor="start" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: start; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: default;" font-size="10px" stroke-width="1"><tspan dy="3.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: bold;"> NODE2:  Action2</tspan></text><path fill="none" stroke="#000000" d="M314,211L314,246" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); stroke-linecap: round; stroke-linejoin: round;" stroke-dasharray="-2"></path><path fill="#000000" stroke="#000000" d="M10,0L0,5L10,10L7,6L7,4Z" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" transform="matrix(0,-1,1,0,309,250.5)" stroke-width="1"></path><text x="343" y="224" text-anchor="middle" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: move;" stroke-width="1"><tspan dy="3.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> [wait] </tspan></text><rect x="262" y="91" width="104" height="30" r="10" rx="10" ry="10" fill="#ffffff" stroke="#666666" stroke-width="1" fill-opacity="100" transform="matrix(1,0,0,1,0.5,0.5)" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); fill-opacity: 100;"></rect><text x="272" y="106" text-anchor="start" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: start; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: default;" font-size="10px" stroke-width="1"><tspan dy="3.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: bold;"> NODE1:  Action1</tspan></text><path fill="none" stroke="#000000" d="M214,106L254,106.00000000000001" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); stroke-linecap: round; stroke-linejoin: round;" stroke-dasharray="-2"></path><path fill="#000000" stroke="#000000" d="M10,0L0,5L10,10L7,6L7,4Z" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" transform="matrix(-1,0,0,-1,258.5,111)" stroke-width="1"></path><text x="234" y="96" text-anchor="middle" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: move;" stroke-width="1"><tspan dy="96" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></tspan></text><path fill="none" stroke="#000000" d="M314,126L314,168" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); stroke-linecap: round; stroke-linejoin: round;" stroke-dasharray="-2"></path><path fill="#000000" stroke="#000000" d="M10,0L0,5L10,10L7,6L7,4Z" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" transform="matrix(0,-1,1,0,309,172.5)" stroke-width="1"></path><text x="345" y="142" text-anchor="middle" font="10px "Arial"" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Arial; cursor: move;" stroke-width="1"><tspan dy="3.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> [Guard1] </tspan></text></svg>\', 374, 374)');
echo "Done";
?>