Fixed demo network map relationships creation

This commit is contained in:
Enrique Martin 2024-03-15 13:39:12 +01:00
parent 95e7c7185a
commit 20011387d7
2 changed files with 178 additions and 81 deletions

View File

@ -53,7 +53,7 @@ refresh[2]="0"
source[2]="0"
source_data[2]="{\"tagente\":{\"nombre\":\"freebsd-1\"}}"
options[2]=""
style[2]="{\"shape\":\"circle\",\"image\":\"images/networkmap/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-1\"}"
style[2]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-1\"}"
id[3]="3"
id_map[3]="2"
@ -66,7 +66,7 @@ refresh[3]="0"
source[3]="0"
source_data[3]="{\"tagente\":{\"nombre\":\"macos-1\"}}"
options[3]=""
style[3]="{\"shape\":\"circle\",\"image\":\"images/networkmap/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-1\"}"
style[3]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-1\"}"
id[4]="4"
id_map[4]="2"
@ -79,7 +79,7 @@ refresh[4]="0"
source[4]="0"
source_data[4]="{\"tagente\":{\"nombre\":\"windows-1\"}}"
options[4]=""
style[4]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-1\"}"
style[4]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-1\"}"
id[5]="5"
id_map[5]="2"
@ -92,7 +92,7 @@ refresh[5]="0"
source[5]="0"
source_data[5]="{\"tagente\":{\"nombre\":\"windows-2\"}}"
options[5]=""
style[5]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-2\"}"
style[5]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-2\"}"
id[6]="6"
id_map[6]="2"
@ -105,7 +105,7 @@ refresh[6]="0"
source[6]="0"
source_data[6]="{\"tagente\":{\"nombre\":\"linux-1\"}}"
options[6]=""
style[6]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-1\"}"
style[6]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-1\"}"
id[7]="7"
id_map[7]="2"
@ -118,7 +118,7 @@ refresh[7]="0"
source[7]="0"
source_data[7]="{\"tagente\":{\"nombre\":\"linux-2\"}}"
options[7]=""
style[7]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-2\"}"
style[7]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-2\"}"
id[8]="8"
id_map[8]="2"
@ -131,7 +131,7 @@ refresh[8]="0"
source[8]="0"
source_data[8]="{\"tagente\":{\"nombre\":\"linux-3\"}}"
options[8]=""
style[8]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-3\"}"
style[8]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-3\"}"
id[9]="9"
id_map[9]="2"
@ -144,7 +144,7 @@ refresh[9]="0"
source[9]="0"
source_data[9]="{\"tagente\":{\"nombre\":\"linux-4\"}}"
options[9]=""
style[9]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-4\"}"
style[9]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-4\"}"
id[10]="10"
id_map[10]="2"
@ -157,7 +157,7 @@ refresh[10]="0"
source[10]="0"
source_data[10]="{\"tagente\":{\"nombre\":\"cisco-2\"}}"
options[10]=""
style[10]="{\"shape\":\"circle\",\"image\":\"images/networkmap/cisco@os.svg\",\"width\":null,\"height\":null,\"label\":\"cisco-2\"}"
style[10]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/cisco@os.svg\",\"width\":null,\"height\":null,\"label\":\"cisco-2\"}"
id[11]="11"
id_map[11]="2"
@ -170,7 +170,7 @@ refresh[11]="0"
source[11]="0"
source_data[11]="{\"tagente\":{\"nombre\":\"freebsd-2\"}}"
options[11]=""
style[11]="{\"shape\":\"circle\",\"image\":\"images/networkmap/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-2\"}"
style[11]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-2\"}"
id[12]="12"
id_map[12]="2"
@ -183,7 +183,7 @@ refresh[12]="0"
source[12]="0"
source_data[12]="{\"tagente\":{\"nombre\":\"macos-2\"}}"
options[12]=""
style[12]="{\"shape\":\"circle\",\"image\":\"images/networkmap/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-2\"}"
style[12]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-2\"}"
id[13]="13"
id_map[13]="2"
@ -196,7 +196,7 @@ refresh[13]="0"
source[13]="0"
source_data[13]="{\"tagente\":{\"nombre\":\"windows-3\"}}"
options[13]=""
style[13]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-3\"}"
style[13]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-3\"}"
id[14]="14"
id_map[14]="2"
@ -209,7 +209,7 @@ refresh[14]="0"
source[14]="0"
source_data[14]="{\"tagente\":{\"nombre\":\"windows-4\"}}"
options[14]=""
style[14]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-4\"}"
style[14]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-4\"}"
id[15]="15"
id_map[15]="2"
@ -222,7 +222,7 @@ refresh[15]="0"
source[15]="0"
source_data[15]="{\"tagente\":{\"nombre\":\"linux-5\"}}"
options[15]=""
style[15]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-5\"}"
style[15]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-5\"}"
id[16]="16"
id_map[16]="2"
@ -235,7 +235,7 @@ refresh[16]="0"
source[16]="0"
source_data[16]="{\"tagente\":{\"nombre\":\"linux-6\"}}"
options[16]=""
style[16]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-6\"}"
style[16]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-6\"}"
id[17]="17"
id_map[17]="2"
@ -248,7 +248,7 @@ refresh[17]="0"
source[17]="0"
source_data[17]="{\"tagente\":{\"nombre\":\"linux-7\"}}"
options[17]=""
style[17]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-7\"}"
style[17]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-7\"}"
id[18]="18"
id_map[18]="2"
@ -261,7 +261,7 @@ refresh[18]="0"
source[18]="0"
source_data[18]="{\"tagente\":{\"nombre\":\"linux-8\"}}"
options[18]=""
style[18]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-8\"}"
style[18]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-8\"}"
id[19]="19"
id_map[19]="2"
@ -274,7 +274,7 @@ refresh[19]="0"
source[19]="0"
source_data[19]="{\"tagente\":{\"nombre\":\"cisco-3\"}}"
options[19]=""
style[19]="{\"shape\":\"circle\",\"image\":\"images/networkmap/cisco@os.svg\",\"width\":null,\"height\":null,\"label\":\"cisco-3\"}"
style[19]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/cisco@os.svg\",\"width\":null,\"height\":null,\"label\":\"cisco-3\"}"
id[20]="20"
id_map[20]="2"
@ -287,7 +287,7 @@ refresh[20]="0"
source[20]="0"
source_data[20]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
options[20]=""
style[20]="{\"shape\":\"circle\",\"image\":\"images/networkmap/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-3\"}"
style[20]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-3\"}"
id[21]="21"
id_map[21]="2"
@ -300,7 +300,7 @@ refresh[21]="0"
source[21]="0"
source_data[21]="{\"tagente\":{\"nombre\":\"macos-3\"}}"
options[21]=""
style[21]="{\"shape\":\"circle\",\"image\":\"images/networkmap/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-3\"}"
style[21]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-3\"}"
id[22]="22"
id_map[22]="2"
@ -313,7 +313,7 @@ refresh[22]="0"
source[22]="0"
source_data[22]="{\"tagente\":{\"nombre\":\"windows-5\"}}"
options[22]=""
style[22]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-5\"}"
style[22]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-5\"}"
id[23]="23"
id_map[23]="2"
@ -326,7 +326,7 @@ refresh[23]="0"
source[23]="0"
source_data[23]="{\"tagente\":{\"nombre\":\"windows-6\"}}"
options[23]=""
style[23]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-6\"}"
style[23]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-6\"}"
id[24]="24"
id_map[24]="2"
@ -339,7 +339,7 @@ refresh[24]="0"
source[24]="0"
source_data[24]="{\"tagente\":{\"nombre\":\"linux-9\"}}"
options[24]=""
style[24]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-9\"}"
style[24]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-9\"}"
id[25]="25"
id_map[25]="2"
@ -352,7 +352,7 @@ refresh[25]="0"
source[25]="0"
source_data[25]="{\"tagente\":{\"nombre\":\"linux-10\"}}"
options[25]=""
style[25]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-10\"}"
style[25]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-10\"}"
id[26]="26"
id_map[26]="2"
@ -365,7 +365,7 @@ refresh[26]="0"
source[26]="0"
source_data[26]="{\"tagente\":{\"nombre\":\"linux-11\"}}"
options[26]=""
style[26]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-11\"}"
style[26]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-11\"}"
id[27]="27"
id_map[27]="2"
@ -378,13 +378,13 @@ refresh[27]="0"
source[27]="0"
source_data[27]="{\"tagente\":{\"nombre\":\"linux-12\"}}"
options[27]=""
style[27]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-12\"}"
style[27]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-12\"}"
[trel_item]
id[1]="1"
id_parent[1]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[1]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"11\",\"x\":\"1184\",\"y\":\"-25\",\"z\":\"0\"}}"
id_parent[1]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[1]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-1\"}},\"x\":\"1184\",\"y\":\"-25\",\"z\":\"0\"}}"
id_map[1]="2"
id_parent_source_data[1]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
id_child_source_data[1]="{\"tagente\":{\"nombre\":\"freebsd-1\"}}"
@ -394,8 +394,8 @@ id_item[1]="0"
deleted[1]="0"
id[2]="2"
id_parent[2]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[2]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"10\",\"x\":\"1268\",\"y\":\"235\",\"z\":\"0\"}}"
id_parent[2]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[2]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"macos-1\"}},\"x\":\"1268\",\"y\":\"235\",\"z\":\"0\"}}"
id_map[2]="2"
id_parent_source_data[2]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
id_child_source_data[2]="{\"tagente\":{\"nombre\":\"macos-1\"}}"
@ -405,8 +405,8 @@ id_item[2]="0"
deleted[2]="0"
id[3]="3"
id_parent[3]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[3]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"8\",\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}"
id_parent[3]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[3]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-1\"}},\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}"
id_map[3]="2"
id_parent_source_data[3]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
id_child_source_data[3]="{\"tagente\":{\"nombre\":\"windows-1\"}}"
@ -416,8 +416,8 @@ id_item[3]="0"
deleted[3]="0"
id[4]="4"
id_parent[4]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[4]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"9\",\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}"
id_parent[4]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[4]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-2\"}},\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}"
id_map[4]="2"
id_parent_source_data[4]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
id_child_source_data[4]="{\"tagente\":{\"nombre\":\"windows-2\"}}"
@ -427,8 +427,8 @@ id_item[4]="0"
deleted[4]="0"
id[5]="5"
id_parent[5]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"8\",\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}"
id_child[5]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"4\",\"x\":\"342\",\"y\":\"-273\",\"z\":\"0\"}}"
id_parent[5]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-1\"}},\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}"
id_child[5]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-1\"}},\"x\":\"342\",\"y\":\"-273\",\"z\":\"0\"}}"
id_map[5]="2"
id_parent_source_data[5]="{\"tagente\":{\"nombre\":\"windows-1\"}}"
id_child_source_data[5]="{\"tagente\":{\"nombre\":\"linux-1\"}}"
@ -438,8 +438,8 @@ id_item[5]="0"
deleted[5]="0"
id[6]="6"
id_parent[6]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"8\",\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}"
id_child[6]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"5\",\"x\":\"240\",\"y\":\"-7\",\"z\":\"0\"}}"
id_parent[6]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-1\"}},\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}"
id_child[6]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-2\"}},\"x\":\"240\",\"y\":\"-7\",\"z\":\"0\"}}"
id_map[6]="2"
id_parent_source_data[6]="{\"tagente\":{\"nombre\":\"windows-1\"}}"
id_child_source_data[6]="{\"tagente\":{\"nombre\":\"linux-2\"}}"
@ -449,8 +449,8 @@ id_item[6]="0"
deleted[6]="0"
id[7]="7"
id_parent[7]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"9\",\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}"
id_child[7]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"6\",\"x\":\"214\",\"y\":\"275\",\"z\":\"0\"}}"
id_parent[7]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-2\"}},\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}"
id_child[7]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-3\"}},\"x\":\"214\",\"y\":\"275\",\"z\":\"0\"}}"
id_map[7]="2"
id_parent_source_data[7]="{\"tagente\":{\"nombre\":\"windows-2\"}}"
id_child_source_data[7]="{\"tagente\":{\"nombre\":\"linux-3\"}}"
@ -460,8 +460,8 @@ id_item[7]="0"
deleted[7]="0"
id[8]="8"
id_parent[8]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"9\",\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}"
id_child[8]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"7\",\"x\":\"226\",\"y\":\"595\",\"z\":\"0\"}}"
id_parent[8]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-2\"}},\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}"
id_child[8]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-4\"}},\"x\":\"226\",\"y\":\"595\",\"z\":\"0\"}}"
id_map[8]="2"
id_parent_source_data[8]="{\"tagente\":{\"nombre\":\"windows-2\"}}"
id_child_source_data[8]="{\"tagente\":{\"nombre\":\"linux-4\"}}"
@ -471,8 +471,8 @@ id_item[8]="0"
deleted[8]="0"
id[9]="9"
id_parent[9]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[9]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"22\",\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}"
id_parent[9]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[9]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-2\"}},\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}"
id_map[9]="2"
id_parent_source_data[9]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
id_child_source_data[9]="{\"tagente\":{\"nombre\":\"cisco-2\"}}"
@ -482,8 +482,8 @@ id_item[9]="0"
deleted[9]="0"
id[10]="10"
id_parent[10]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[10]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"21\",\"x\":\"892\",\"y\":\"-47\",\"z\":\"0\"}}"
id_parent[10]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[10]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-2\"}},\"x\":\"892\",\"y\":\"-47\",\"z\":\"0\"}}"
id_map[10]="2"
id_parent_source_data[10]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
id_child_source_data[10]="{\"tagente\":{\"nombre\":\"freebsd-2\"}}"
@ -493,8 +493,8 @@ id_item[10]="0"
deleted[10]="0"
id[11]="11"
id_parent[11]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[11]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"20\",\"x\":\"1150\",\"y\":\"409\",\"z\":\"0\"}}"
id_parent[11]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}"
id_child[11]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"macos-2\"}},\"x\":\"1150\",\"y\":\"409\",\"z\":\"0\"}}"
id_map[11]="2"
id_parent_source_data[11]="{\"tagente\":{\"nombre\":\"cisco-1\"}}"
id_child_source_data[11]="{\"tagente\":{\"nombre\":\"macos-2\"}}"
@ -504,8 +504,8 @@ id_item[11]="0"
deleted[11]="0"
id[12]="12"
id_parent[12]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"22\",\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}"
id_child[12]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"18\",\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}"
id_parent[12]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-2\"}},\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}"
id_child[12]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-3\"}},\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}"
id_map[12]="2"
id_parent_source_data[12]="{\"tagente\":{\"nombre\":\"cisco-2\"}}"
id_child_source_data[12]="{\"tagente\":{\"nombre\":\"windows-3\"}}"
@ -515,8 +515,8 @@ id_item[12]="0"
deleted[12]="0"
id[13]="13"
id_parent[13]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"22\",\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}"
id_child[13]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"19\",\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}"
id_parent[13]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-2\"}},\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}"
id_child[13]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-4\"}},\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}"
id_map[13]="2"
id_parent_source_data[13]="{\"tagente\":{\"nombre\":\"cisco-2\"}}"
id_child_source_data[13]="{\"tagente\":{\"nombre\":\"windows-4\"}}"
@ -526,8 +526,8 @@ id_item[13]="0"
deleted[13]="0"
id[14]="14"
id_parent[14]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"18\",\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}"
id_child[14]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"14\",\"x\":\"314\",\"y\":\"845\",\"z\":\"0\"}}"
id_parent[14]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-3\"}},\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}"
id_child[14]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-5\"}},\"x\":\"314\",\"y\":\"845\",\"z\":\"0\"}}"
id_map[14]="2"
id_parent_source_data[14]="{\"tagente\":{\"nombre\":\"windows-3\"}}"
id_child_source_data[14]="{\"tagente\":{\"nombre\":\"linux-5\"}}"
@ -537,8 +537,8 @@ id_item[14]="0"
deleted[14]="0"
id[15]="15"
id_parent[15]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"18\",\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}"
id_child[15]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"15\",\"x\":\"474\",\"y\":\"1043\",\"z\":\"0\"}}"
id_parent[15]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-3\"}},\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}"
id_child[15]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-6\"}},\"x\":\"474\",\"y\":\"1043\",\"z\":\"0\"}}"
id_map[15]="2"
id_parent_source_data[15]="{\"tagente\":{\"nombre\":\"windows-3\"}}"
id_child_source_data[15]="{\"tagente\":{\"nombre\":\"linux-6\"}}"
@ -548,8 +548,8 @@ id_item[15]="0"
deleted[15]="0"
id[16]="16"
id_parent[16]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"19\",\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}"
id_child[16]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"16\",\"x\":\"1812\",\"y\":\"1011\",\"z\":\"0\"}}"
id_parent[16]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-4\"}},\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}"
id_child[16]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-7\"}},\"x\":\"1812\",\"y\":\"1011\",\"z\":\"0\"}}"
id_map[16]="2"
id_parent_source_data[16]="{\"tagente\":{\"nombre\":\"windows-4\"}}"
id_child_source_data[16]="{\"tagente\":{\"nombre\":\"linux-7\"}}"
@ -559,8 +559,8 @@ id_item[16]="0"
deleted[16]="0"
id[17]="17"
id_parent[17]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"19\",\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}"
id_child[17]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"17\",\"x\":\"1828\",\"y\":\"723\",\"z\":\"0\"}}"
id_parent[17]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-4\"}},\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}"
id_child[17]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-8\"}},\"x\":\"1828\",\"y\":\"723\",\"z\":\"0\"}}"
id_map[17]="2"
id_parent_source_data[17]="{\"tagente\":{\"nombre\":\"windows-4\"}}"
id_child_source_data[17]="{\"tagente\":{\"nombre\":\"linux-8\"}}"
@ -570,8 +570,8 @@ id_item[17]="0"
deleted[17]="0"
id[18]="18"
id_parent[18]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"10\",\"x\":\"1268\",\"y\":\"235\",\"z\":\"0\"}}"
id_child[18]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"32\",\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}"
id_parent[18]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"macos-1\"}},\"x\":\"1268\",\"y\":\"235\",\"z\":\"0\"}}"
id_child[18]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-3\"}},\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}"
id_map[18]="2"
id_parent_source_data[18]="{\"tagente\":{\"nombre\":\"macos-1\"}}"
id_child_source_data[18]="{\"tagente\":{\"nombre\":\"cisco-3\"}}"
@ -581,8 +581,8 @@ id_item[18]="0"
deleted[18]="0"
id[19]="19"
id_parent[19]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"7\",\"x\":\"226\",\"y\":\"595\",\"z\":\"0\"}}"
id_child[19]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_parent[19]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-4\"}},\"x\":\"226\",\"y\":\"595\",\"z\":\"0\"}}"
id_child[19]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_map[19]="2"
id_parent_source_data[19]="{\"tagente\":{\"nombre\":\"linux-4\"}}"
id_child_source_data[19]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
@ -592,8 +592,8 @@ id_item[19]="0"
deleted[19]="0"
id[20]="20"
id_parent[20]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[20]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"30\",\"x\":\"-140\",\"y\":\"299\",\"z\":\"0\"}}"
id_parent[20]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[20]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"macos-3\"}},\"x\":\"-140\",\"y\":\"299\",\"z\":\"0\"}}"
id_map[20]="2"
id_parent_source_data[20]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
id_child_source_data[20]="{\"tagente\":{\"nombre\":\"macos-3\"}}"
@ -603,8 +603,8 @@ id_item[20]="0"
deleted[20]="0"
id[21]="21"
id_parent[21]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[21]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"28\",\"x\":\"-390\",\"y\":\"385\",\"z\":\"0\"}}"
id_parent[21]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[21]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-5\"}},\"x\":\"-390\",\"y\":\"385\",\"z\":\"0\"}}"
id_map[21]="2"
id_parent_source_data[21]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
id_child_source_data[21]="{\"tagente\":{\"nombre\":\"windows-5\"}}"
@ -614,8 +614,8 @@ id_item[21]="0"
deleted[21]="0"
id[22]="22"
id_parent[22]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[22]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"29\",\"x\":\"-470\",\"y\":\"671\",\"z\":\"0\"}}"
id_parent[22]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[22]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-6\"}},\"x\":\"-470\",\"y\":\"671\",\"z\":\"0\"}}"
id_map[22]="2"
id_parent_source_data[22]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
id_child_source_data[22]="{\"tagente\":{\"nombre\":\"windows-6\"}}"
@ -625,8 +625,8 @@ id_item[22]="0"
deleted[22]="0"
id[23]="23"
id_parent[23]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[23]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"24\",\"x\":\"-296\",\"y\":\"899\",\"z\":\"0\"}}"
id_parent[23]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[23]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-9\"}},\"x\":\"-296\",\"y\":\"899\",\"z\":\"0\"}}"
id_map[23]="2"
id_parent_source_data[23]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
id_child_source_data[23]="{\"tagente\":{\"nombre\":\"linux-9\"}}"
@ -636,8 +636,8 @@ id_item[23]="0"
deleted[23]="0"
id[24]="24"
id_parent[24]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[24]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"25\",\"x\":\"-25\",\"y\":\"961\",\"z\":\"0\"}}"
id_parent[24]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}"
id_child[24]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-10\"}},\"x\":\"-25\",\"y\":\"961\",\"z\":\"0\"}}"
id_map[24]="2"
id_parent_source_data[24]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}"
id_child_source_data[24]="{\"tagente\":{\"nombre\":\"linux-10\"}}"
@ -647,8 +647,8 @@ id_item[24]="0"
deleted[24]="0"
id[25]="25"
id_parent[25]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"32\",\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}"
id_child[25]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"26\",\"x\":\"1683\",\"y\":\"13\",\"z\":\"0\"}}"
id_parent[25]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-3\"}},\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}"
id_child[25]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-11\"}},\"x\":\"1683\",\"y\":\"13\",\"z\":\"0\"}}"
id_map[25]="2"
id_parent_source_data[25]="{\"tagente\":{\"nombre\":\"cisco-3\"}}"
id_child_source_data[25]="{\"tagente\":{\"nombre\":\"linux-11\"}}"
@ -658,8 +658,8 @@ id_item[25]="0"
deleted[25]="0"
id[26]="26"
id_parent[26]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"32\",\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}"
id_child[26]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"27\",\"x\":\"2135\",\"y\":\"51\",\"z\":\"0\"}}"
id_parent[26]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-3\"}},\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}"
id_child[26]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-12\"}},\"x\":\"2135\",\"y\":\"51\",\"z\":\"0\"}}"
id_map[26]="2"
id_parent_source_data[26]="{\"tagente\":{\"nombre\":\"cisco-3\"}}"
id_child_source_data[26]="{\"tagente\":{\"nombre\":\"linux-12\"}}"

View File

@ -280,6 +280,13 @@ class Prd
*/
private $itemsReferences;
/**
* Current prdData.
*
* @var array
*/
private $currentPrdData;
/**
* Constructor.
@ -2282,12 +2289,38 @@ class Prd
$value = implode($csv_separator, $ref_arr);
} else {
$columns_ref = $this->getOneColumnRefs($ref['table']);
$value = $this->searchValue(
$ref['columns'],
$ref['table'],
$ref['id'],
$value
);
// Get reference in value
if($columns_ref !== false) {
foreach ($columns_ref as $col => $col_ref) {
if (array_key_exists($col, $value[$ref['table']])) {
$sql = sprintf(
'SELECT * FROM %s WHERE %s = "%s"',
$ref['table'],
$col,
$value[$ref['table']][$col],
);
$row = db_get_row_sql($sql);
$this->getReferenceFromValue(
$ref['table'],
$col,
$col_ref,
$row,
$value[$ref['table']][$col]
);
}
}
}
}
}
@ -2413,12 +2446,38 @@ class Prd
$value = implode($csv_separator, $ref_arr);
} else {
$columns_ref = $this->getOneColumnRefs($ref['table']);
$value = $this->searchValue(
$ref['columns'],
$ref['table'],
$ref['id'],
$value
);
// Get reference in value
if($columns_ref !== false) {
foreach ($columns_ref as $col => $col_ref) {
if (array_key_exists($col, $value[$ref['table']])) {
$sql = sprintf(
'SELECT * FROM %s WHERE %s = "%s"',
$ref['table'],
$col,
$value[$ref['table']][$col],
);
$row = db_get_row_sql($sql);
$this->getReferenceFromValue(
$ref['table'],
$col,
$col_ref,
$row,
$value[$ref['table']][$col]
);
}
}
}
}
}
}
@ -2435,7 +2494,7 @@ class Prd
*
* @return boolean
*/
private function getValueFromReference($table, $column, $reference, &$value)
private function getValueFromReference($table, $column, $reference, $item, &$value)
{
if (isset($reference['conditional_refs']) === true) {
// Conditional refs.
@ -2445,8 +2504,8 @@ class Prd
if (isset($condition['when']) === true
&& isset($condition['ref']) === true
) {
if (isset($this->currentItem['parsed'][array_key_first($condition['when'])]) === true) {
$compare_value = $this->currentItem['parsed'][array_key_first($condition['when'])];
if (isset($item[array_key_first($condition['when'])]) === true) {
$compare_value = $item[array_key_first($condition['when'])];
if ($this->evalConditionalRef($compare_value, $condition['when']) === true
&& empty($value) === false
@ -2656,6 +2715,7 @@ class Prd
$result = '';
$prd_data = $this->getOnePrdData($type);
$this->currentPrdData = $prd_data;
if (empty($prd_data) === false) {
$result .= '[prd_data]'.LINE_BREAK.LINE_BREAK;
$result .= 'type="'.$type.'"'.LINE_BREAK;
@ -2903,6 +2963,7 @@ class Prd
unset($data_file['prd_data']);
$prd_data = $this->getOnePrdData($type);
$this->currentPrdData = $prd_data;
if ($prd_data !== false) {
// Begin transaction.
$db = $config['dbconnection'];
@ -2941,6 +3002,7 @@ class Prd
$table,
$column,
$column_refs[$column],
$this->currentItem['parsed'],
$value
);
@ -2968,6 +3030,7 @@ class Prd
$table,
$column,
$json_refs[$column][$json_key],
$this->currentItem['parsed'],
$json_value
) === true
) {
@ -3064,8 +3127,42 @@ class Prd
&& empty($array_value[$ref['table']]) === false
) {
$where = '';
$columns_ref = $this->getOneColumnRefs($ref['table']);
foreach ($ref['columns'] as $column_name) {
if (isset($array_value[$ref['table']][$column_name])) {
// Get value from crossed reference in current value
if (isset($this->crossed_refs[$ref['table']]) === true
&& empty($this->crossed_refs[$ref['table']]['ref']) === false
&& in_array($column_name, $this->crossed_refs[$ref['table']]['ref'])
) {
$parent_table = $this->crossed_refs[$ref['table']]['parent_table'];
foreach ($this->crossed_refs[$ref['table']]['ref'] as $k => $f) {
$itemReference = $this->getItemReference(
$parent_table,
$this->crossed_refs[$parent_table]['value'][$k],
$array_value[$ref['table']][$f]
);
if ($itemReference !== false) {
$array_value[$ref['table']][$column_name] = $itemReference;
}
}
}
if($columns_ref !== false) {
if (array_key_exists($column_name, $columns_ref)) {
$temp_value = $array_value[$ref['table']][$column_name];
$temp_value = (is_array($temp_value) ? json_encode($temp_value) : $temp_value);
// Get value from reference in current value
$ref_value = $this->getValueFromReference($ref['table'], $column_name, $columns_ref[$column_name], $array_value[$ref['table']], $temp_value);
if ($ref_value === true) {
$array_value[$ref['table']][$column_name] = $temp_value;
}
}
}
$where .= sprintf(
"%s = '%s' AND ",
$column_name,