diff options
author | Christian Pointner <equinox@helsinki.at> | 2015-12-16 17:07:25 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2015-12-16 17:07:35 (GMT) |
commit | 67e786d43bc65dad5c0ffe816af08c19e7f55c40 (patch) | |
tree | eebc54d160bbaa148724eefd9abaac8637b1d8bc | |
parent | af53fbda45a1d75344ded495cc56c7f37a3460d4 (diff) |
added inital version of musicgrid.cgi (not working at the moment)
-rw-r--r-- | contrib/grid-sample-out.xml | 845 | ||||
-rwxr-xr-x | rh-bin/musicgrid.cgi | 81 |
2 files changed, 926 insertions, 0 deletions
diff --git a/contrib/grid-sample-out.xml b/contrib/grid-sample-out.xml new file mode 100644 index 0000000..fdffda8 --- /dev/null +++ b/contrib/grid-sample-out.xml @@ -0,0 +1,845 @@ +select GRID.DOW,GRID.HOUR,CLOCKS.NAME,CLOCKS.SHORT_NAME,CLOCKS.COLOR from CLOCKS,(select 1 as DOW ,0 as HOUR,CLOCK0 as CLOCK from SERVICES where NAME='Music' UNION select 1 as DOW ,1 as HOUR,CLOCK1 as CLOCK from SERVICES where NAME='Music' UNION select 1 as DOW ,2 as HOUR,CLOCK2 as CLOCK from SERVICES where NAME='Music' UNION select 1 as DOW ,3 as HOUR,CLOCK3 as CLOCK from SERVICES where NAME='Music' UNION select 1 as DOW ,4 as HOUR,CLOCK4 as CLOCK from SERVICES where NAME='Music' UNION select 1 as DOW ,5 as HOUR,CLOCK5 as CLOCK from SERVICES where NAME='Music' UNION select 1 as DOW ,6 as HOUR,CLOCK6 as CLOCK from SERVICES where NAME='Music' UNION select 1 as DOW ,7 as HOUR,CLOCK7 as CLOCK from SERVICES where NAME='Music' UNION select 1 as DOW ,8 as HOUR,CLOCK8 as CLOCK from SERVICES where NAME='Music' UNION select 1 as DOW ,9 as HOUR,CLOCK9 as CLOCK from SERVICES where NAME='Music' UNION select 1 as DOW ,10 as HOUR,CLOCK10 as CLOCK from SERVICES where NAME='Music' UNION select 1 as DOW ,11 as HOUR,CLOCK11 as CLOCK from SERVICES where NAME='Music' UNION select 1 as DOW ,12 as HOUR,CLOCK12 as CLOCK from SERVICES where NAME='Music' UNION select 1 as DOW ,13 as HOUR,CLOCK13 as CLOCK from SERVICES where NAME='Music' UNION select 1 as DOW ,14 as HOUR,CLOCK14 as CLOCK from SERVICES where NAME='Music' UNION select 1 as DOW ,15 as HOUR,CLOCK15 as CLOCK from SERVICES where NAME='Music' UNION select 1 as DOW ,16 as HOUR,CLOCK16 as CLOCK from SERVICES where NAME='Music' UNION select 1 as DOW ,17 as HOUR,CLOCK17 as CLOCK from SERVICES where NAME='Music' UNION select 1 as DOW ,18 as HOUR,CLOCK18 as CLOCK from SERVICES where NAME='Music' UNION select 1 as DOW ,19 as HOUR,CLOCK19 as CLOCK from SERVICES where NAME='Music' UNION select 1 as DOW ,20 as HOUR,CLOCK20 as CLOCK from SERVICES where NAME='Music' UNION select 1 as DOW ,21 as HOUR,CLOCK21 as CLOCK from SERVICES where NAME='Music' UNION select 1 as DOW ,22 as HOUR,CLOCK22 as CLOCK from SERVICES where NAME='Music' UNION select 1 as DOW ,23 as HOUR,CLOCK23 as CLOCK from SERVICES where NAME='Music' UNION select 2 as DOW ,0 as HOUR,CLOCK24 as CLOCK from SERVICES where NAME='Music' UNION select 2 as DOW ,1 as HOUR,CLOCK25 as CLOCK from SERVICES where NAME='Music' UNION select 2 as DOW ,2 as HOUR,CLOCK26 as CLOCK from SERVICES where NAME='Music' UNION select 2 as DOW ,3 as HOUR,CLOCK27 as CLOCK from SERVICES where NAME='Music' UNION select 2 as DOW ,4 as HOUR,CLOCK28 as CLOCK from SERVICES where NAME='Music' UNION select 2 as DOW ,5 as HOUR,CLOCK29 as CLOCK from SERVICES where NAME='Music' UNION select 2 as DOW ,6 as HOUR,CLOCK30 as CLOCK from SERVICES where NAME='Music' UNION select 2 as DOW ,7 as HOUR,CLOCK31 as CLOCK from SERVICES where NAME='Music' UNION select 2 as DOW ,8 as HOUR,CLOCK32 as CLOCK from SERVICES where NAME='Music' UNION select 2 as DOW ,9 as HOUR,CLOCK33 as CLOCK from SERVICES where NAME='Music' UNION select 2 as DOW ,10 as HOUR,CLOCK34 as CLOCK from SERVICES where NAME='Music' UNION select 2 as DOW ,11 as HOUR,CLOCK35 as CLOCK from SERVICES where NAME='Music' UNION select 2 as DOW ,12 as HOUR,CLOCK36 as CLOCK from SERVICES where NAME='Music' UNION select 2 as DOW ,13 as HOUR,CLOCK37 as CLOCK from SERVICES where NAME='Music' UNION select 2 as DOW ,14 as HOUR,CLOCK38 as CLOCK from SERVICES where NAME='Music' UNION select 2 as DOW ,15 as HOUR,CLOCK39 as CLOCK from SERVICES where NAME='Music' UNION select 2 as DOW ,16 as HOUR,CLOCK40 as CLOCK from SERVICES where NAME='Music' UNION select 2 as DOW ,17 as HOUR,CLOCK41 as CLOCK from SERVICES where NAME='Music' UNION select 2 as DOW ,18 as HOUR,CLOCK42 as CLOCK from SERVICES where NAME='Music' UNION select 2 as DOW ,19 as HOUR,CLOCK43 as CLOCK from SERVICES where NAME='Music' UNION select 2 as DOW ,20 as HOUR,CLOCK44 as CLOCK from SERVICES where NAME='Music' UNION select 2 as DOW ,21 as HOUR,CLOCK45 as CLOCK from SERVICES where NAME='Music' UNION select 2 as DOW ,22 as HOUR,CLOCK46 as CLOCK from SERVICES where NAME='Music' UNION select 2 as DOW ,23 as HOUR,CLOCK47 as CLOCK from SERVICES where NAME='Music' UNION select 3 as DOW ,0 as HOUR,CLOCK48 as CLOCK from SERVICES where NAME='Music' UNION select 3 as DOW ,1 as HOUR,CLOCK49 as CLOCK from SERVICES where NAME='Music' UNION select 3 as DOW ,2 as HOUR,CLOCK50 as CLOCK from SERVICES where NAME='Music' UNION select 3 as DOW ,3 as HOUR,CLOCK51 as CLOCK from SERVICES where NAME='Music' UNION select 3 as DOW ,4 as HOUR,CLOCK52 as CLOCK from SERVICES where NAME='Music' UNION select 3 as DOW ,5 as HOUR,CLOCK53 as CLOCK from SERVICES where NAME='Music' UNION select 3 as DOW ,6 as HOUR,CLOCK54 as CLOCK from SERVICES where NAME='Music' UNION select 3 as DOW ,7 as HOUR,CLOCK55 as CLOCK from SERVICES where NAME='Music' UNION select 3 as DOW ,8 as HOUR,CLOCK56 as CLOCK from SERVICES where NAME='Music' UNION select 3 as DOW ,9 as HOUR,CLOCK57 as CLOCK from SERVICES where NAME='Music' UNION select 3 as DOW ,10 as HOUR,CLOCK58 as CLOCK from SERVICES where NAME='Music' UNION select 3 as DOW ,11 as HOUR,CLOCK59 as CLOCK from SERVICES where NAME='Music' UNION select 3 as DOW ,12 as HOUR,CLOCK60 as CLOCK from SERVICES where NAME='Music' UNION select 3 as DOW ,13 as HOUR,CLOCK61 as CLOCK from SERVICES where NAME='Music' UNION select 3 as DOW ,14 as HOUR,CLOCK62 as CLOCK from SERVICES where NAME='Music' UNION select 3 as DOW ,15 as HOUR,CLOCK63 as CLOCK from SERVICES where NAME='Music' UNION select 3 as DOW ,16 as HOUR,CLOCK64 as CLOCK from SERVICES where NAME='Music' UNION select 3 as DOW ,17 as HOUR,CLOCK65 as CLOCK from SERVICES where NAME='Music' UNION select 3 as DOW ,18 as HOUR,CLOCK66 as CLOCK from SERVICES where NAME='Music' UNION select 3 as DOW ,19 as HOUR,CLOCK67 as CLOCK from SERVICES where NAME='Music' UNION select 3 as DOW ,20 as HOUR,CLOCK68 as CLOCK from SERVICES where NAME='Music' UNION select 3 as DOW ,21 as HOUR,CLOCK69 as CLOCK from SERVICES where NAME='Music' UNION select 3 as DOW ,22 as HOUR,CLOCK70 as CLOCK from SERVICES where NAME='Music' UNION select 3 as DOW ,23 as HOUR,CLOCK71 as CLOCK from SERVICES where NAME='Music' UNION select 4 as DOW ,0 as HOUR,CLOCK72 as CLOCK from SERVICES where NAME='Music' UNION select 4 as DOW ,1 as HOUR,CLOCK73 as CLOCK from SERVICES where NAME='Music' UNION select 4 as DOW ,2 as HOUR,CLOCK74 as CLOCK from SERVICES where NAME='Music' UNION select 4 as DOW ,3 as HOUR,CLOCK75 as CLOCK from SERVICES where NAME='Music' UNION select 4 as DOW ,4 as HOUR,CLOCK76 as CLOCK from SERVICES where NAME='Music' UNION select 4 as DOW ,5 as HOUR,CLOCK77 as CLOCK from SERVICES where NAME='Music' UNION select 4 as DOW ,6 as HOUR,CLOCK78 as CLOCK from SERVICES where NAME='Music' UNION select 4 as DOW ,7 as HOUR,CLOCK79 as CLOCK from SERVICES where NAME='Music' UNION select 4 as DOW ,8 as HOUR,CLOCK80 as CLOCK from SERVICES where NAME='Music' UNION select 4 as DOW ,9 as HOUR,CLOCK81 as CLOCK from SERVICES where NAME='Music' UNION select 4 as DOW ,10 as HOUR,CLOCK82 as CLOCK from SERVICES where NAME='Music' UNION select 4 as DOW ,11 as HOUR,CLOCK83 as CLOCK from SERVICES where NAME='Music' UNION select 4 as DOW ,12 as HOUR,CLOCK84 as CLOCK from SERVICES where NAME='Music' UNION select 4 as DOW ,13 as HOUR,CLOCK85 as CLOCK from SERVICES where NAME='Music' UNION select 4 as DOW ,14 as HOUR,CLOCK86 as CLOCK from SERVICES where NAME='Music' UNION select 4 as DOW ,15 as HOUR,CLOCK87 as CLOCK from SERVICES where NAME='Music' UNION select 4 as DOW ,16 as HOUR,CLOCK88 as CLOCK from SERVICES where NAME='Music' UNION select 4 as DOW ,17 as HOUR,CLOCK89 as CLOCK from SERVICES where NAME='Music' UNION select 4 as DOW ,18 as HOUR,CLOCK90 as CLOCK from SERVICES where NAME='Music' UNION select 4 as DOW ,19 as HOUR,CLOCK91 as CLOCK from SERVICES where NAME='Music' UNION select 4 as DOW ,20 as HOUR,CLOCK92 as CLOCK from SERVICES where NAME='Music' UNION select 4 as DOW ,21 as HOUR,CLOCK93 as CLOCK from SERVICES where NAME='Music' UNION select 4 as DOW ,22 as HOUR,CLOCK94 as CLOCK from SERVICES where NAME='Music' UNION select 4 as DOW ,23 as HOUR,CLOCK95 as CLOCK from SERVICES where NAME='Music' UNION select 5 as DOW ,0 as HOUR,CLOCK96 as CLOCK from SERVICES where NAME='Music' UNION select 5 as DOW ,1 as HOUR,CLOCK97 as CLOCK from SERVICES where NAME='Music' UNION select 5 as DOW ,2 as HOUR,CLOCK98 as CLOCK from SERVICES where NAME='Music' UNION select 5 as DOW ,3 as HOUR,CLOCK99 as CLOCK from SERVICES where NAME='Music' UNION select 5 as DOW ,4 as HOUR,CLOCK100 as CLOCK from SERVICES where NAME='Music' UNION select 5 as DOW ,5 as HOUR,CLOCK101 as CLOCK from SERVICES where NAME='Music' UNION select 5 as DOW ,6 as HOUR,CLOCK102 as CLOCK from SERVICES where NAME='Music' UNION select 5 as DOW ,7 as HOUR,CLOCK103 as CLOCK from SERVICES where NAME='Music' UNION select 5 as DOW ,8 as HOUR,CLOCK104 as CLOCK from SERVICES where NAME='Music' UNION select 5 as DOW ,9 as HOUR,CLOCK105 as CLOCK from SERVICES where NAME='Music' UNION select 5 as DOW ,10 as HOUR,CLOCK106 as CLOCK from SERVICES where NAME='Music' UNION select 5 as DOW ,11 as HOUR,CLOCK107 as CLOCK from SERVICES where NAME='Music' UNION select 5 as DOW ,12 as HOUR,CLOCK108 as CLOCK from SERVICES where NAME='Music' UNION select 5 as DOW ,13 as HOUR,CLOCK109 as CLOCK from SERVICES where NAME='Music' UNION select 5 as DOW ,14 as HOUR,CLOCK110 as CLOCK from SERVICES where NAME='Music' UNION select 5 as DOW ,15 as HOUR,CLOCK111 as CLOCK from SERVICES where NAME='Music' UNION select 5 as DOW ,16 as HOUR,CLOCK112 as CLOCK from SERVICES where NAME='Music' UNION select 5 as DOW ,17 as HOUR,CLOCK113 as CLOCK from SERVICES where NAME='Music' UNION select 5 as DOW ,18 as HOUR,CLOCK114 as CLOCK from SERVICES where NAME='Music' UNION select 5 as DOW ,19 as HOUR,CLOCK115 as CLOCK from SERVICES where NAME='Music' UNION select 5 as DOW ,20 as HOUR,CLOCK116 as CLOCK from SERVICES where NAME='Music' UNION select 5 as DOW ,21 as HOUR,CLOCK117 as CLOCK from SERVICES where NAME='Music' UNION select 5 as DOW ,22 as HOUR,CLOCK118 as CLOCK from SERVICES where NAME='Music' UNION select 5 as DOW ,23 as HOUR,CLOCK119 as CLOCK from SERVICES where NAME='Music' UNION select 6 as DOW ,0 as HOUR,CLOCK120 as CLOCK from SERVICES where NAME='Music' UNION select 6 as DOW ,1 as HOUR,CLOCK121 as CLOCK from SERVICES where NAME='Music' UNION select 6 as DOW ,2 as HOUR,CLOCK122 as CLOCK from SERVICES where NAME='Music' UNION select 6 as DOW ,3 as HOUR,CLOCK123 as CLOCK from SERVICES where NAME='Music' UNION select 6 as DOW ,4 as HOUR,CLOCK124 as CLOCK from SERVICES where NAME='Music' UNION select 6 as DOW ,5 as HOUR,CLOCK125 as CLOCK from SERVICES where NAME='Music' UNION select 6 as DOW ,6 as HOUR,CLOCK126 as CLOCK from SERVICES where NAME='Music' UNION select 6 as DOW ,7 as HOUR,CLOCK127 as CLOCK from SERVICES where NAME='Music' UNION select 6 as DOW ,8 as HOUR,CLOCK128 as CLOCK from SERVICES where NAME='Music' UNION select 6 as DOW ,9 as HOUR,CLOCK129 as CLOCK from SERVICES where NAME='Music' UNION select 6 as DOW ,10 as HOUR,CLOCK130 as CLOCK from SERVICES where NAME='Music' UNION select 6 as DOW ,11 as HOUR,CLOCK131 as CLOCK from SERVICES where NAME='Music' UNION select 6 as DOW ,12 as HOUR,CLOCK132 as CLOCK from SERVICES where NAME='Music' UNION select 6 as DOW ,13 as HOUR,CLOCK133 as CLOCK from SERVICES where NAME='Music' UNION select 6 as DOW ,14 as HOUR,CLOCK134 as CLOCK from SERVICES where NAME='Music' UNION select 6 as DOW ,15 as HOUR,CLOCK135 as CLOCK from SERVICES where NAME='Music' UNION select 6 as DOW ,16 as HOUR,CLOCK136 as CLOCK from SERVICES where NAME='Music' UNION select 6 as DOW ,17 as HOUR,CLOCK137 as CLOCK from SERVICES where NAME='Music' UNION select 6 as DOW ,18 as HOUR,CLOCK138 as CLOCK from SERVICES where NAME='Music' UNION select 6 as DOW ,19 as HOUR,CLOCK139 as CLOCK from SERVICES where NAME='Music' UNION select 6 as DOW ,20 as HOUR,CLOCK140 as CLOCK from SERVICES where NAME='Music' UNION select 6 as DOW ,21 as HOUR,CLOCK141 as CLOCK from SERVICES where NAME='Music' UNION select 6 as DOW ,22 as HOUR,CLOCK142 as CLOCK from SERVICES where NAME='Music' UNION select 6 as DOW ,23 as HOUR,CLOCK143 as CLOCK from SERVICES where NAME='Music' UNION select 0 as DOW ,0 as HOUR,CLOCK144 as CLOCK from SERVICES where NAME='Music' UNION select 0 as DOW ,1 as HOUR,CLOCK145 as CLOCK from SERVICES where NAME='Music' UNION select 0 as DOW ,2 as HOUR,CLOCK146 as CLOCK from SERVICES where NAME='Music' UNION select 0 as DOW ,3 as HOUR,CLOCK147 as CLOCK from SERVICES where NAME='Music' UNION select 0 as DOW ,4 as HOUR,CLOCK148 as CLOCK from SERVICES where NAME='Music' UNION select 0 as DOW ,5 as HOUR,CLOCK149 as CLOCK from SERVICES where NAME='Music' UNION select 0 as DOW ,6 as HOUR,CLOCK150 as CLOCK from SERVICES where NAME='Music' UNION select 0 as DOW ,7 as HOUR,CLOCK151 as CLOCK from SERVICES where NAME='Music' UNION select 0 as DOW ,8 as HOUR,CLOCK152 as CLOCK from SERVICES where NAME='Music' UNION select 0 as DOW ,9 as HOUR,CLOCK153 as CLOCK from SERVICES where NAME='Music' UNION select 0 as DOW ,10 as HOUR,CLOCK154 as CLOCK from SERVICES where NAME='Music' UNION select 0 as DOW ,11 as HOUR,CLOCK155 as CLOCK from SERVICES where NAME='Music' UNION select 0 as DOW ,12 as HOUR,CLOCK156 as CLOCK from SERVICES where NAME='Music' UNION select 0 as DOW ,13 as HOUR,CLOCK157 as CLOCK from SERVICES where NAME='Music' UNION select 0 as DOW ,14 as HOUR,CLOCK158 as CLOCK from SERVICES where NAME='Music' UNION select 0 as DOW ,15 as HOUR,CLOCK159 as CLOCK from SERVICES where NAME='Music' UNION select 0 as DOW ,16 as HOUR,CLOCK160 as CLOCK from SERVICES where NAME='Music' UNION select 0 as DOW ,17 as HOUR,CLOCK161 as CLOCK from SERVICES where NAME='Music' UNION select 0 as DOW ,18 as HOUR,CLOCK162 as CLOCK from SERVICES where NAME='Music' UNION select 0 as DOW ,19 as HOUR,CLOCK163 as CLOCK from SERVICES where NAME='Music' UNION select 0 as DOW ,20 as HOUR,CLOCK164 as CLOCK from SERVICES where NAME='Music' UNION select 0 as DOW ,21 as HOUR,CLOCK165 as CLOCK from SERVICES where NAME='Music' UNION select 0 as DOW ,22 as HOUR,CLOCK166 as CLOCK from SERVICES where NAME='Music' UNION select 0 as DOW ,23 as HOUR,CLOCK167 as CLOCK from SERVICES where NAME='Music') as GRID where GRID.CLOCK = CLOCKS.NAME;Content-type: application/xml; charset=UTF-8 +Status: 200 + +<grid> + <clock dow="1" hour="0"> + <name>clp Pool26</name> + <color>P26</color> + <title>unknown title</title> + </clock> + <clock dow="1" hour="1"> + <name>clp Pool37</name> + <color>P37</color> + <title>unknown title</title> + </clock> + <clock dow="1" hour="2"> + <name>clp Pool02 bumbumtschak</name> + <color>P02</color> + <title>unknown title</title> + </clock> + <clock dow="1" hour="3"> + <name>clp Pool30</name> + <color>P30</color> + <title>unknown title</title> + </clock> + <clock dow="1" hour="4"> + <name>clp Pool08</name> + <color>P08</color> + <title>unknown title</title> + </clock> + <clock dow="1" hour="5"> + <name>clp Pool22</name> + <color>P22</color> + <title>unknown title</title> + </clock> + <clock dow="1" hour="6"> + <name>clp Pool22</name> + <color>P22</color> + <title>unknown title</title> + </clock> + <clock dow="1" hour="7"> + <name>clp Pool16</name> + <color>P16</color> + <title>unknown title</title> + </clock> + <clock dow="1" hour="8"> + <name>clp Pool09</name> + <color>P09</color> + <title>unknown title</title> + </clock> + <clock dow="1" hour="9"> + <name>clp Pool33</name> + <color>P33</color> + <title>unknown title</title> + </clock> + <clock dow="1" hour="10"> + <name>clp Pool04</name> + <color>P04</color> + <title>unknown title</title> + </clock> + <clock dow="1" hour="11"> + <name>clp Pool27</name> + <color>P27</color> + <title>unknown title</title> + </clock> + <clock dow="1" hour="12"> + <name>clp Pool41</name> + <color>P41</color> + <title>unknown title</title> + </clock> + <clock dow="1" hour="13"> + <name>clp Pool05</name> + <color>P05</color> + <title>unknown title</title> + </clock> + <clock dow="1" hour="14"> + <name>clp Pool25</name> + <color>P25</color> + <title>unknown title</title> + </clock> + <clock dow="1" hour="15"> + <name>clp Pool13</name> + <color>P13</color> + <title>unknown title</title> + </clock> + <clock dow="1" hour="16"> + <name>clp Pool18</name> + <color>P18</color> + <title>unknown title</title> + </clock> + <clock dow="1" hour="17"> + <name>clp Pool18</name> + <color>P18</color> + <title>unknown title</title> + </clock> + <clock dow="1" hour="18"> + <name>clp Pool14</name> + <color>P14</color> + <title>unknown title</title> + </clock> + <clock dow="1" hour="19"> + <name>clp Pool17</name> + <color>P17</color> + <title>unknown title</title> + </clock> + <clock dow="1" hour="20"> + <name>clp Pool17</name> + <color>P17</color> + <title>unknown title</title> + </clock> + <clock dow="1" hour="21"> + <name>clp Pool14</name> + <color>P14</color> + <title>unknown title</title> + </clock> + <clock dow="1" hour="22"> + <name>clp Pool15</name> + <color>P15</color> + <title>unknown title</title> + </clock> + <clock dow="1" hour="23"> + <name>clp Pool07</name> + <color>P07</color> + <title>unknown title</title> + </clock> + <clock dow="2" hour="0"> + <name>clp Pool07</name> + <color>P07</color> + <title>unknown title</title> + </clock> + <clock dow="2" hour="1"> + <name>clp Pool36</name> + <color>P36</color> + <title>unknown title</title> + </clock> + <clock dow="2" hour="2"> + <name>clp Pool24</name> + <color>P24</color> + <title>unknown title</title> + </clock> + <clock dow="2" hour="3"> + <name>clp Pool37</name> + <color>P37</color> + <title>unknown title</title> + </clock> + <clock dow="2" hour="4"> + <name>clp Pool10</name> + <color>P10</color> + <title>unknown title</title> + </clock> + <clock dow="2" hour="5"> + <name>clp Pool35</name> + <color>P35</color> + <title>unknown title</title> + </clock> + <clock dow="2" hour="6"> + <name>clp Pool27</name> + <color>P27</color> + <title>unknown title</title> + </clock> + <clock dow="2" hour="7"> + <name>clp Pool26</name> + <color>P26</color> + <title>unknown title</title> + </clock> + <clock dow="2" hour="8"> + <name>clp Pool11</name> + <color>P11</color> + <title>unknown title</title> + </clock> + <clock dow="2" hour="9"> + <name>clp Pool23</name> + <color>P23</color> + <title>unknown title</title> + </clock> + <clock dow="2" hour="10"> + <name>clp Pool19</name> + <color>P19</color> + <title>unknown title</title> + </clock> + <clock dow="2" hour="11"> + <name>clp Pool19</name> + <color>P19</color> + <title>unknown title</title> + </clock> + <clock dow="2" hour="12"> + <name>clp Pool31</name> + <color>P31</color> + <title>unknown title</title> + </clock> + <clock dow="2" hour="13"> + <name>clp Pool26</name> + <color>P26</color> + <title>unknown title</title> + </clock> + <clock dow="2" hour="14"> + <name>clp Pool10</name> + <color>P10</color> + <title>unknown title</title> + </clock> + <clock dow="2" hour="15"> + <name>clp Pool10</name> + <color>P10</color> + <title>unknown title</title> + </clock> + <clock dow="2" hour="16"> + <name>clp Pool10</name> + <color>P10</color> + <title>unknown title</title> + </clock> + <clock dow="2" hour="17"> + <name>clp Pool04</name> + <color>P04</color> + <title>unknown title</title> + </clock> + <clock dow="2" hour="18"> + <name>clp Pool04</name> + <color>P04</color> + <title>unknown title</title> + </clock> + <clock dow="2" hour="19"> + <name>clp Pool04</name> + <color>P04</color> + <title>unknown title</title> + </clock> + <clock dow="2" hour="20"> + <name>clp Pool04</name> + <color>P04</color> + <title>unknown title</title> + </clock> + <clock dow="2" hour="21"> + <name>clp Pool05</name> + <color>P05</color> + <title>unknown title</title> + </clock> + <clock dow="2" hour="22"> + <name>clp Pool23</name> + <color>P23</color> + <title>unknown title</title> + </clock> + <clock dow="2" hour="23"> + <name>clp Pool35</name> + <color>P35</color> + <title>unknown title</title> + </clock> + <clock dow="3" hour="0"> + <name>clp Pool32</name> + <color>P32</color> + <title>unknown title</title> + </clock> + <clock dow="3" hour="1"> + <name>clp Pool07</name> + <color>P07</color> + <title>unknown title</title> + </clock> + <clock dow="3" hour="2"> + <name>clp Pool30</name> + <color>P30</color> + <title>unknown title</title> + </clock> + <clock dow="3" hour="3"> + <name>clp Pool10</name> + <color>P10</color> + <title>unknown title</title> + </clock> + <clock dow="3" hour="4"> + <name>clp Pool10</name> + <color>P10</color> + <title>unknown title</title> + </clock> + <clock dow="3" hour="5"> + <name>clp Pool22</name> + <color>P22</color> + <title>unknown title</title> + </clock> + <clock dow="3" hour="6"> + <name>clp Pool22</name> + <color>P22</color> + <title>unknown title</title> + </clock> + <clock dow="3" hour="7"> + <name>clp Pool11</name> + <color>P11</color> + <title>unknown title</title> + </clock> + <clock dow="3" hour="8"> + <name>clp Pool11</name> + <color>P11</color> + <title>unknown title</title> + </clock> + <clock dow="3" hour="9"> + <name>clp Pool05</name> + <color>P05</color> + <title>unknown title</title> + </clock> + <clock dow="3" hour="10"> + <name>clp Pool25</name> + <color>P25</color> + <title>unknown title</title> + </clock> + <clock dow="3" hour="11"> + <name>clp Pool11</name> + <color>P11</color> + <title>unknown title</title> + </clock> + <clock dow="3" hour="12"> + <name>clp Pool28</name> + <color>P28</color> + <title>unknown title</title> + </clock> + <clock dow="3" hour="13"> + <name>clp Pool10</name> + <color>P10</color> + <title>unknown title</title> + </clock> + <clock dow="3" hour="14"> + <name>clp Pool10</name> + <color>P10</color> + <title>unknown title</title> + </clock> + <clock dow="3" hour="15"> + <name>clp Pool10</name> + <color>P10</color> + <title>unknown title</title> + </clock> + <clock dow="3" hour="16"> + <name>clp Pool06</name> + <color>P06</color> + <title>unknown title</title> + </clock> + <clock dow="3" hour="17"> + <name>clp Pool04</name> + <color>P04</color> + <title>unknown title</title> + </clock> + <clock dow="3" hour="18"> + <name>clp Pool04</name> + <color>P04</color> + <title>unknown title</title> + </clock> + <clock dow="3" hour="19"> + <name>clp Pool04</name> + <color>P04</color> + <title>unknown title</title> + </clock> + <clock dow="3" hour="20"> + <name>clp Pool05</name> + <color>P05</color> + <title>unknown title</title> + </clock> + <clock dow="3" hour="21"> + <name>clp Pool23</name> + <color>P23</color> + <title>unknown title</title> + </clock> + <clock dow="3" hour="22"> + <name>clp Pool15</name> + <color>P15</color> + <title>unknown title</title> + </clock> + <clock dow="3" hour="23"> + <name>clp Pool12</name> + <color>P12</color> + <title>unknown title</title> + </clock> + <clock dow="4" hour="0"> + <name>clp Pool12</name> + <color>P12</color> + <title>unknown title</title> + </clock> + <clock dow="4" hour="1"> + <name>clp Pool12</name> + <color>P12</color> + <title>unknown title</title> + </clock> + <clock dow="4" hour="2"> + <name>clp Pool21</name> + <color>P21</color> + <title>unknown title</title> + </clock> + <clock dow="4" hour="3"> + <name>clp Pool05</name> + <color>P05</color> + <title>unknown title</title> + </clock> + <clock dow="4" hour="4"> + <name>clp Pool05</name> + <color>P05</color> + <title>unknown title</title> + </clock> + <clock dow="4" hour="5"> + <name>clp Pool06</name> + <color>P06</color> + <title>unknown title</title> + </clock> + <clock dow="4" hour="6"> + <name>clp Pool06</name> + <color>P06</color> + <title>unknown title</title> + </clock> + <clock dow="4" hour="7"> + <name>clp Pool23</name> + <color>P23</color> + <title>unknown title</title> + </clock> + <clock dow="4" hour="8"> + <name>clp Pool07</name> + <color>P07</color> + <title>unknown title</title> + </clock> + <clock dow="4" hour="9"> + <name>clp Pool24</name> + <color>P24</color> + <title>unknown title</title> + </clock> + <clock dow="4" hour="10"> + <name>clp Pool08</name> + <color>P08</color> + <title>unknown title</title> + </clock> + <clock dow="4" hour="11"> + <name>clp Pool26</name> + <color>P26</color> + <title>unknown title</title> + </clock> + <clock dow="4" hour="12"> + <name>clp Pool11</name> + <color>P11</color> + <title>unknown title</title> + </clock> + <clock dow="4" hour="13"> + <name>clp Pool 42</name> + <color>P42</color> + <title>unknown title</title> + </clock> + <clock dow="4" hour="14"> + <name>clp Pool10</name> + <color>P10</color> + <title>unknown title</title> + </clock> + <clock dow="4" hour="15"> + <name>clp Pool29</name> + <color>P29</color> + <title>unknown title</title> + </clock> + <clock dow="4" hour="16"> + <name>clp Pool29</name> + <color>P29</color> + <title>unknown title</title> + </clock> + <clock dow="4" hour="17"> + <name>clp Pool10</name> + <color>P10</color> + <title>unknown title</title> + </clock> + <clock dow="4" hour="18"> + <name>clp Pool05</name> + <color>P05</color> + <title>unknown title</title> + </clock> + <clock dow="4" hour="19"> + <name>clp Pool35</name> + <color>P35</color> + <title>unknown title</title> + </clock> + <clock dow="4" hour="20"> + <name>clp Pool35</name> + <color>P35</color> + <title>unknown title</title> + </clock> + <clock dow="4" hour="21"> + <name>clp Pool33</name> + <color>P33</color> + <title>unknown title</title> + </clock> + <clock dow="4" hour="22"> + <name>clp Pool31</name> + <color>P31</color> + <title>unknown title</title> + </clock> + <clock dow="4" hour="23"> + <name>clp Pool21</name> + <color>P21</color> + <title>unknown title</title> + </clock> + <clock dow="5" hour="0"> + <name>clp Pool07</name> + <color>P07</color> + <title>unknown title</title> + </clock> + <clock dow="5" hour="1"> + <name>clp Pool10</name> + <color>P10</color> + <title>unknown title</title> + </clock> + <clock dow="5" hour="2"> + <name>clp Pool05</name> + <color>P05</color> + <title>unknown title</title> + </clock> + <clock dow="5" hour="3"> + <name>clp Pool21</name> + <color>P21</color> + <title>unknown title</title> + </clock> + <clock dow="5" hour="4"> + <name>clp Pool09</name> + <color>P09</color> + <title>unknown title</title> + </clock> + <clock dow="5" hour="5"> + <name>clp Pool09</name> + <color>P09</color> + <title>unknown title</title> + </clock> + <clock dow="5" hour="6"> + <name>clp Pool10</name> + <color>P10</color> + <title>unknown title</title> + </clock> + <clock dow="5" hour="7"> + <name>clp Pool10</name> + <color>P10</color> + <title>unknown title</title> + </clock> + <clock dow="5" hour="8"> + <name>clp Pool11</name> + <color>P11</color> + <title>unknown title</title> + </clock> + <clock dow="5" hour="9"> + <name>clp Pool02 bumbumtschak</name> + <color>P02</color> + <title>unknown title</title> + </clock> + <clock dow="5" hour="10"> + <name>clp Pool02 bumbumtschak</name> + <color>P02</color> + <title>unknown title</title> + </clock> + <clock dow="5" hour="11"> + <name>clp Pool36</name> + <color>P36</color> + <title>unknown title</title> + </clock> + <clock dow="5" hour="12"> + <name>clp Pool10</name> + <color>P10</color> + <title>unknown title</title> + </clock> + <clock dow="5" hour="13"> + <name>clp Pool35</name> + <color>P35</color> + <title>unknown title</title> + </clock> + <clock dow="5" hour="14"> + <name>clp Pool03 echochamber</name> + <color>P03</color> + <title>unknown title</title> + </clock> + <clock dow="5" hour="15"> + <name>clp Pool03 echochamber</name> + <color>P03</color> + <title>unknown title</title> + </clock> + <clock dow="5" hour="16"> + <name>clp Pool35</name> + <color>P35</color> + <title>unknown title</title> + </clock> + <clock dow="5" hour="17"> + <name>clp Pool24</name> + <color>P24</color> + <title>unknown title</title> + </clock> + <clock dow="5" hour="18"> + <name>clp Pool24</name> + <color>P24</color> + <title>unknown title</title> + </clock> + <clock dow="5" hour="19"> + <name>clp Pool05</name> + <color>P05</color> + <title>unknown title</title> + </clock> + <clock dow="5" hour="20"> + <name>clp Pool05</name> + <color>P05</color> + <title>unknown title</title> + </clock> + <clock dow="5" hour="21"> + <name>clp Pool05</name> + <color>P05</color> + <title>unknown title</title> + </clock> + <clock dow="5" hour="22"> + <name>clp Pool25</name> + <color>P25</color> + <title>unknown title</title> + </clock> + <clock dow="5" hour="23"> + <name>clp Pool07</name> + <color>P07</color> + <title>unknown title</title> + </clock> + <clock dow="6" hour="0"> + <name>clp Pool07</name> + <color>P07</color> + <title>unknown title</title> + </clock> + <clock dow="6" hour="1"> + <name>clp Pool26</name> + <color>P26</color> + <title>unknown title</title> + </clock> + <clock dow="6" hour="2"> + <name>clp Pool32</name> + <color>P32</color> + <title>unknown title</title> + </clock> + <clock dow="6" hour="3"> + <name>clp Pool13</name> + <color>P13</color> + <title>unknown title</title> + </clock> + <clock dow="6" hour="4"> + <name>clp Pool14</name> + <color>P14</color> + <title>unknown title</title> + </clock> + <clock dow="6" hour="5"> + <name>clp Pool33</name> + <color>P33</color> + <title>unknown title</title> + </clock> + <clock dow="6" hour="6"> + <name>clp Pool15</name> + <color>P15</color> + <title>unknown title</title> + </clock> + <clock dow="6" hour="7"> + <name>clp Pool10</name> + <color>P10</color> + <title>unknown title</title> + </clock> + <clock dow="6" hour="8"> + <name>clp Pool31</name> + <color>P31</color> + <title>unknown title</title> + </clock> + <clock dow="6" hour="9"> + <name>clp Pool10</name> + <color>P10</color> + <title>unknown title</title> + </clock> + <clock dow="6" hour="10"> + <name>clp Pool17</name> + <color>P17</color> + <title>unknown title</title> + </clock> + <clock dow="6" hour="11"> + <name>clp Pool10</name> + <color>P10</color> + <title>unknown title</title> + </clock> + <clock dow="6" hour="12"> + <name>clp Pool38</name> + <color>P38</color> + <title>unknown title</title> + </clock> + <clock dow="6" hour="13"> + <name>clp Pool38</name> + <color>P38</color> + <title>unknown title</title> + </clock> + <clock dow="6" hour="14"> + <name>clp Pool05</name> + <color>P05</color> + <title>unknown title</title> + </clock> + <clock dow="6" hour="15"> + <name>clp Pool10</name> + <color>P10</color> + <title>unknown title</title> + </clock> + <clock dow="6" hour="16"> + <name>clp Pool11</name> + <color>P11</color> + <title>unknown title</title> + </clock> + <clock dow="6" hour="17"> + <name>clp Pool11</name> + <color>P11</color> + <title>unknown title</title> + </clock> + <clock dow="6" hour="18"> + <name>clp Pool14</name> + <color>P14</color> + <title>unknown title</title> + </clock> + <clock dow="6" hour="19"> + <name>clp Pool14</name> + <color>P14</color> + <title>unknown title</title> + </clock> + <clock dow="6" hour="20"> + <name>clp Pool11</name> + <color>P11</color> + <title>unknown title</title> + </clock> + <clock dow="6" hour="21"> + <name>clp Pool11</name> + <color>P11</color> + <title>unknown title</title> + </clock> + <clock dow="6" hour="22"> + <name>clp Pool11</name> + <color>P11</color> + <title>unknown title</title> + </clock> + <clock dow="6" hour="23"> + <name>clp Pool20</name> + <color>P20</color> + <title>unknown title</title> + </clock> + <clock dow="0" hour="0"> + <name>clp Pool20</name> + <color>P20</color> + <title>unknown title</title> + </clock> + <clock dow="0" hour="1"> + <name>clp Pool20</name> + <color>P20</color> + <title>unknown title</title> + </clock> + <clock dow="0" hour="2"> + <name>clp Pool20</name> + <color>P20</color> + <title>unknown title</title> + </clock> + <clock dow="0" hour="3"> + <name>clp Pool10</name> + <color>P10</color> + <title>unknown title</title> + </clock> + <clock dow="0" hour="4"> + <name>clp Pool21</name> + <color>P21</color> + <title>unknown title</title> + </clock> + <clock dow="0" hour="5"> + <name>clp Pool13</name> + <color>P13</color> + <title>unknown title</title> + </clock> + <clock dow="0" hour="6"> + <name>clp Pool13</name> + <color>P13</color> + <title>unknown title</title> + </clock> + <clock dow="0" hour="7"> + <name>clp Pool40</name> + <color>P40</color> + <title>unknown title</title> + </clock> + <clock dow="0" hour="8"> + <name>clp Pool06</name> + <color>P06</color> + <title>unknown title</title> + </clock> + <clock dow="0" hour="9"> + <name>clp Pool11</name> + <color>P11</color> + <title>unknown title</title> + </clock> + <clock dow="0" hour="10"> + <name>clp Pool31</name> + <color>P31</color> + <title>unknown title</title> + </clock> + <clock dow="0" hour="11"> + <name>clp Pool26</name> + <color>P26</color> + <title>unknown title</title> + </clock> + <clock dow="0" hour="12"> + <name>clp Pool38</name> + <color>P38</color> + <title>unknown title</title> + </clock> + <clock dow="0" hour="13"> + <name>clp Pool38</name> + <color>P38</color> + <title>unknown title</title> + </clock> + <clock dow="0" hour="14"> + <name>clp Pool26</name> + <color>P26</color> + <title>unknown title</title> + </clock> + <clock dow="0" hour="15"> + <name>clp Pool34</name> + <color>P34</color> + <title>unknown title</title> + </clock> + <clock dow="0" hour="16"> + <name>clp Pool23</name> + <color>P23</color> + <title>unknown title</title> + </clock> + <clock dow="0" hour="17"> + <name>clp Pool16</name> + <color>P16</color> + <title>unknown title</title> + </clock> + <clock dow="0" hour="18"> + <name>clp Pool16</name> + <color>P16</color> + <title>unknown title</title> + </clock> + <clock dow="0" hour="19"> + <name>clp Pool10</name> + <color>P10</color> + <title>unknown title</title> + </clock> + <clock dow="0" hour="20"> + <name>clp Pool10</name> + <color>P10</color> + <title>unknown title</title> + </clock> + <clock dow="0" hour="21"> + <name>clp Pool13</name> + <color>P13</color> + <title>unknown title</title> + </clock> + <clock dow="0" hour="22"> + <name>clp Pool24</name> + <color>P24</color> + <title>unknown title</title> + </clock> + <clock dow="0" hour="23"> + <name>clp Pool17</name> + <color>P17</color> + <title>unknown title</title> + </clock> +</grid> diff --git a/rh-bin/musicgrid.cgi b/rh-bin/musicgrid.cgi new file mode 100755 index 0000000..6e18e7e --- /dev/null +++ b/rh-bin/musicgrid.cgi @@ -0,0 +1,81 @@ +#!/usr/bin/perl +# +# rhwebimport +# +# Copyright (C) 2014-2015 Christian Pointner <equinox@helsinki.at> +# Copyright (C) 2015 Peter Grassberger <petertheone@gmail.com> +# +# This file is part of rhwebimport. +# +# rhwebimport is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# any later version. +# +# rhwebimport is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with rhwebimport. If not, see <http://www.gnu.org/licenses/>. +# + +use strict; +use CGI; +use POSIX; +use XML::Quote; +use RHRD::rddb; + +my $status = 'ERROR'; +my $errorstring = 'unknown'; +my $responsecode = 500; +my @clocks = (); + +my $q = CGI->new; +my $username = $q->param('LOGIN_NAME'); +my $token = $q->param('PASSWORD'); + +(my $ctx, $status, $errorstring) = RHRD::rddb::init(); +if(defined $ctx) { + my $result = 1; +# ($result, $status, $errorstring) = RHRD::rddb::check_token($ctx, $username, $token); + if($result == 1) { + # TODO: check if user is allowed to read/edit music pools + # TODO: dispatch command get,set + $responsecode = 200; + @clocks = RHRD::rddb::get_musicpools_clocks($ctx); + if(!defined $clocks[0] && defined $clocks[1]) { + $responsecode = 500; + $status = $clocks[1]; + $errorstring = $clocks[2]; + } + } elsif($result == 0) { + $responsecode = 401; + } else { + $responsecode = 500; + } + RHRD::rddb::destroy($ctx); +} + + +print "Content-type: application/xml; charset=UTF-8\n"; +print "Status: $responsecode\n\n"; + +# TODO: dispatch command get,set +if($responsecode != 200) { + print "<RDWebResult>\n"; + print " <ResponseCode>" . xml_quote($responsecode) . "</ResponseCode>\n"; + print " <ErrorString>" . xml_quote($errorstring) . "</ErrorString>\n"; + print "</RDWebResult>\n"; +} else { + print "<grid>\n"; + for my $href (@clocks) { + print " <clock dow=\"" . xml_quote($href->{'DOW'}) . "\" hour=\"" . xml_quote($href->{'HOUR'}) . "\">\n"; + print " <name>" . xml_quote($href->{'NAME'}) . "</name>\n"; + print " <color>" . xml_quote($href->{'COLOR'}) . "</color>\n"; + print " <title>" . xml_quote($href->{'TITLE'}) . "</title>\n"; + print " </clock>\n"; + } + print "</grid>\n"; +} |