Changeset 15338
- Timestamp:
- 04/21/12 16:36:21 (11 years ago)
- Location:
- titan
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/doc/htmlapi.txt
r15335 r15338 7 7 8 8 query: sendrc 9 raw: nothing 9 10 desc: send rc code 10 11 param: rc code 11 12 12 13 query: getrectimer 14 raw: begin#end#justplay#repeate#name#serviceid#transpoderid#status#errstr#timestamp 13 15 desc: get aktive record timer 14 16 param: no 15 17 16 18 query: addrectimer 19 raw: ? 17 20 desc: add a record timer 18 21 param: ? 19 22 20 23 query: delrectimer 24 raw: ? 21 25 desc: delete a record timer 22 26 param: ? 23 27 24 28 query: editrectimer 29 raw: ? 25 30 desc: edit a record timer 26 31 param: ? 27 32 28 33 query: rectimersend 34 raw: ? 29 35 desc: ? 30 36 param: ? 31 37 32 38 query: getrectimerarchive 39 raw: begin#end#justplay#repeate#name#serviceid#transpoderid#status#errstr#timestamp 33 40 desc: get old record timer 34 41 param: no 35 42 36 43 query: setvol 44 raw: returns the aktive vol (0-100) 37 45 desc: set the volume 38 46 param: 0-100 39 47 40 48 query: setmute 49 raw: returns the aktive mute (0/1) 41 50 descr: set mute 42 51 param: 0/1 43 52 44 53 query: getbouquet 54 raw: bouquetname#type 45 55 desc: get a list of all bouquets 46 56 param: no 47 57 48 58 query: getsat 59 raw: satname#orbitalpos 49 60 desc: get a list of all sat 50 61 param: no 51 62 52 63 query: getprovider 64 raw: providername#number 53 65 desc: get a list of all provoder 54 66 param: no 55 67 56 68 query: getaz 69 raw: returns A-Z 57 70 desc: get chars A-Z 58 71 param: no 59 72 60 73 query: getchannelpage 74 raw: channelname#proz#serviceid#transponderid#channellist#servicetype#eventid 61 75 desc: get a channel page 76 param: 0 = 0, 1 = orbitalpos, 2 = providername, 3 = A-Z 62 77 param: type (0 = all, 1 = sat, 2 = provider, 3 = A-Z) 63 78 param: page nr 64 79 65 80 query: getallchannel 81 raw: channelname#proz#serviceid#transponderid#channellist#servicetype#eventid 66 82 desc: get all channel 67 83 param: no 68 84 69 85 query: getbouquetchannel 86 raw: channelname#proz#serviceid#transponderid#channellist#servicetype#eventid 70 87 desc: get all channel from a bouquet 71 88 param: bouquetname 72 89 73 90 query: getsatchannel 91 raw: channelname#proz#serviceid#transponderid#channellist#servicetype#eventid 74 92 desc: get all channel from a sat 75 93 param: orbitalposition 76 94 77 95 query: getproviderchannel 96 raw: channelname#proz#serviceid#transponderid#channellist#servicetype#eventid 78 97 desc: get all channel from a provider 79 98 param: providername 80 99 81 100 query: getazchannel 101 raw: channelname#proz#serviceid#transponderid#channellist#servicetype#eventid 82 102 desc: get all channel from first char 83 103 param: char (A-Z) 84 104 85 105 query: switch 106 raw: channelname#proz#serviceid#transponderid#channellist#servicetype#eventid 86 107 desc: change channel 87 108 param: channelid … … 89 110 90 111 query: getaktservice 112 raw: channelname#proz#serviceid#transponderid#channellist#servicetype#eventid 91 113 desc: get akt service 92 114 param: no 93 115 94 116 query: getepg 117 raw: epgshort#begin#end#subtitle#epglong 95 118 desc: get epg from a channel 96 119 param: channelid … … 99 122 100 123 query: getmovieepg 124 raw: returns .epg 101 125 desc: gets the epg to a recordet movie 102 126 param: movie name (full path) 103 127 104 128 query: getsingleepg 129 raw: epgshort#begin#end#subtitle 105 130 desc: get all epg to a channel 106 131 param: channelid … … 108 133 109 134 query: getgmultiepg 135 raw: ? 110 136 desc: get all epg from all channel in a bouquet 111 137 param: bouquetname … … 113 139 114 140 query: getepgsearch 141 raw: ? 115 142 desc: search epg entry 116 143 param: ? 117 144 118 145 query: getsignal 146 raw: ber#unc#signal#snr 119 147 desc: get tuner signals 120 148 param: no 121 149 122 150 query: getmoviefilelist 151 raw: name#type (dir = 0, file = 1) 123 152 desc: get a list of movies 124 param: path153 param: empty or path 125 154 param: page nr 126 155 127 156 query: delmoviefile 157 raw: ? 128 158 desc: delete a file 129 159 param: ? 130 160 131 161 query: getm3u 162 raw: m3u format 132 163 desc: get m3u file from a movie 133 164 param: moviename 134 165 135 166 query: getvideo 167 raw: http url string for video 136 168 desc: get html inline code for playing movie 137 169 param: moviename 138 170 139 171 query: getshoot 172 raw: fixtext shoot.html 140 173 desc: get a screenshot 141 174 param: type (gui, tv, gui + tv) 142 175 143 176 query: poweroff 177 raw: nothing 144 178 desc: poweroff the box 145 179 param: no 146 180 147 181 query: restart 182 raw: nothing 148 183 desc: restart the box 149 184 param: no 150 185 151 186 query: guirestart 187 raw: nothing 152 188 desc: gui restart the box 153 189 param: no 154 190 155 191 query: standby 192 raw: nothing 156 193 desc: set box in standby 157 194 param: no 158 195 159 196 query: boxstatus 197 raw: running or standby 160 198 desc: get boxstatus (running or standby) 161 199 param: no 162 200 163 201 query: message 202 raw: fixtext Message send 164 203 desc: shows the message on tv 165 204 param; message -
titan/titan/httpd.h
r14619 r15338 141 141 char* buf = NULL, *header = NULL, *param = NULL; 142 142 char* ext = NULL, *mime = NULL; 143 int buflen = 0, onlyheader = 0, code = 200 ;143 int buflen = 0, onlyheader = 0, code = 200, fmt = 0; 144 144 145 145 //create param … … 149 149 150 150 if(ostrcmp(query, "sendrc") == 0) 151 websendrc(param );151 websendrc(param, fmt); 152 152 if(ostrcmp(query, "getrectimer") == 0) 153 buf = webgetrectimer(param, 0 );153 buf = webgetrectimer(param, 0, fmt); 154 154 if(ostrcmp(query, "addrectimer") == 0) 155 buf = webaddrectimer(param );155 buf = webaddrectimer(param, fmt); 156 156 if(ostrcmp(query, "delrectimer") == 0) 157 buf = webdelrectimer(param );157 buf = webdelrectimer(param, fmt); 158 158 if(ostrcmp(query, "editrectimer") == 0) 159 buf = webeditrectimer(param );159 buf = webeditrectimer(param, fmt); 160 160 if(ostrcmp(query, "rectimersend") == 0) 161 buf = webrectimersend(param );161 buf = webrectimersend(param, fmt); 162 162 if(ostrcmp(query, "getrectimerarchive") == 0) 163 buf = webgetrectimer(param, 1 );163 buf = webgetrectimer(param, 1, fmt); 164 164 if(ostrcmp(query, "setvol") == 0) 165 buf = websetvol(param );165 buf = websetvol(param, fmt); 166 166 if(ostrcmp(query, "setmute") == 0) 167 buf = websetmute(param );167 buf = websetmute(param, fmt); 168 168 if(ostrcmp(query, "getbouquet") == 0) 169 buf = webgetbouquet( );169 buf = webgetbouquet(fmt); 170 170 if(ostrcmp(query, "getsat") == 0) 171 buf = webgetsat( );171 buf = webgetsat(fmt); 172 172 if(ostrcmp(query, "getprovider") == 0) 173 buf = webgetprovider( );173 buf = webgetprovider(fmt); 174 174 if(ostrcmp(query, "getaz") == 0) 175 buf = webgetaz( );175 buf = webgetaz(fmt); 176 176 if(ostrcmp(query, "getchannelpage") == 0) 177 buf = webgetchannelpage(param );177 buf = webgetchannelpage(param, fmt); 178 178 if(ostrcmp(query, "getallchannel") == 0) 179 buf = webgetchannel(0, 0, 1 );179 buf = webgetchannel(0, 0, 1, fmt); 180 180 if(ostrcmp(query, "getbouquetchannel") == 0) 181 buf = webgetbouquetchannel(param );181 buf = webgetbouquetchannel(param, fmt); 182 182 if(ostrcmp(query, "getsatchannel") == 0 && param != NULL) 183 buf = webgetchannel(atoi(param), 1, 1 );183 buf = webgetchannel(atoi(param), 1, 1, fmt); 184 184 if(ostrcmp(query, "getproviderchannel") == 0 && param != NULL) 185 buf = webgetchannel(atoi(param), 2, 1 );185 buf = webgetchannel(atoi(param), 2, 1, fmt); 186 186 if(ostrcmp(query, "getazchannel") == 0 && param != NULL) 187 buf = webgetchannel(atoi(param), 3, 1 );187 buf = webgetchannel(atoi(param), 3, 1, fmt); 188 188 if(ostrcmp(query, "switch") == 0) 189 buf = webswitch(param );189 buf = webswitch(param, fmt); 190 190 if(ostrcmp(query, "getaktservice") == 0) 191 buf = webgetaktservice( );191 buf = webgetaktservice(fmt); 192 192 if(ostrcmp(query, "getepg") == 0) 193 buf = webgetepg(param );193 buf = webgetepg(param, fmt); 194 194 if(ostrcmp(query, "getmovieepg") == 0) 195 buf = webgetmovieepg(param, getconfig("rec_streampath", NULL), 1 );195 buf = webgetmovieepg(param, getconfig("rec_streampath", NULL), 1, fmt); 196 196 if(ostrcmp(query, "getsingleepg") == 0) 197 buf = webgetsingleepg(param );197 buf = webgetsingleepg(param, fmt); 198 198 if(ostrcmp(query, "getgmultiepg") == 0) 199 buf = webgetgmultiepg(param );199 buf = webgetgmultiepg(param, fmt); 200 200 if(query != NULL && strstr(query, "getepgsearch") == query) 201 buf = webgetepgsearch(query, param );201 buf = webgetepgsearch(query, param, fmt); 202 202 if(ostrcmp(query, "getsignal") == 0) 203 buf = webgetsignal( );203 buf = webgetsignal(fmt); 204 204 if(ostrcmp(query, "getmoviefilelist") == 0) 205 buf = webgetfilelist(param, "getmoviefilelist", "delmoviefile", getconfig("rec_streampath", NULL), "*.avi *.dat *.divx *.flv *.mkv *.m4v *.mp4 *.mov *.mpg *.mpeg *.mts *.m2ts *.trp *.ts *.vdr *.vob *.wmv *.rm", 31 );205 buf = webgetfilelist(param, "getmoviefilelist", "delmoviefile", getconfig("rec_streampath", NULL), "*.avi *.dat *.divx *.flv *.mkv *.m4v *.mp4 *.mov *.mpg *.mpeg *.mts *.m2ts *.trp *.ts *.vdr *.vob *.wmv *.rm", 31, fmt); 206 206 if(ostrcmp(query, "delmoviefile") == 0) 207 buf = webdelfile(param, "getmoviefilelist", "delmoviefile", getconfig("rec_streampath", NULL), "*.avi *.dat *.divx *.flv *.mkv *.m4v *.mp4 *.mov *.mpg *.mpeg *.mts *.m2ts *.trp *.ts *.vdr *.vob *.wmv *.rm", 31 );207 buf = webdelfile(param, "getmoviefilelist", "delmoviefile", getconfig("rec_streampath", NULL), "*.avi *.dat *.divx *.flv *.mkv *.m4v *.mp4 *.mov *.mpg *.mpeg *.mts *.m2ts *.trp *.ts *.vdr *.vob *.wmv *.rm", 31, fmt); 208 208 if(ostrcmp(query, "getm3u") == 0) 209 209 { 210 buf = webgetm3u(param, *connfd); 211 ext = "Content-Disposition: attachment; filename=stream.m3u"; 212 mime = "text/plain"; 210 buf = webgetm3u(param, *connfd, fmt); 211 if(fmt == 0) 212 { 213 ext = "Content-Disposition: attachment; filename=stream.m3u"; 214 mime = "text/plain"; 215 } 213 216 } 214 217 if(ostrcmp(query, "getvideo") == 0) 215 buf = webgetvideo(param, *connfd );218 buf = webgetvideo(param, *connfd, fmt); 216 219 if(ostrcmp(query, "getshoot") == 0) 217 220 { 218 webgetshoot(param); 219 ext = "Location: shoot.html"; 220 onlyheader = 1; 221 code = 302; 221 webgetshoot(param, fmt); 222 if(fmt == 0) 223 { 224 ext = "Location: shoot.html"; 225 onlyheader = 1; 226 code = 302; 227 } 228 else 229 buf = ostrcat("shoot.html", NULL, 0, 0); 222 230 } 223 231 if(query != NULL && strstr(query, "poweroff") == query) … … 235 243 { 236 244 if(status.standby > 0) 237 sendoktext(connfd, "standby", auth); 245 { 246 if(fmt == 0) 247 sendoktext(connfd, "standby", auth); 248 else 249 buf = ostrcat("standby", NULL, 0, 0); 250 } 238 251 else 239 sendoktext(connfd, "running", auth); 252 { 253 if(fmt == 0) 254 sendoktext(connfd, "running", auth); 255 else 256 buf = ostrcat("running", NULL, 0, 0); 257 } 240 258 } 241 259 if(query != NULL && strstr(query, "message") == query) 242 buf = websendmessage(query );260 buf = websendmessage(query, fmt); 243 261 244 262 if(buf != NULL || onlyheader == 1) -
titan/titan/httpdfunc.h
r14751 r15338 87 87 } 88 88 89 void webcreatechannelbody(char** buf, int line, struct channel* chnode, char* channellist, int* maxlen, int* pos, int flag )89 void webcreatechannelbody(char** buf, int line, struct channel* chnode, char* channellist, int* maxlen, int* pos, int flag, int fmt) 90 90 { 91 91 char* tmpstr = NULL, *buf1 = NULL, *serviceid = NULL, *transponderid = NULL; … … 105 105 } 106 106 107 if(line == 0) 108 ostrcatbig(buf, "<tr class=line1>", maxlen, pos); 109 else 110 ostrcatbig(buf, "<tr class=line2>", maxlen, pos); 111 107 if(fmt == 0) 108 { 109 if(line == 0) 110 ostrcatbig(buf, "<tr class=line1>", maxlen, pos); 111 else 112 ostrcatbig(buf, "<tr class=line2>", maxlen, pos); 113 } 112 114 113 115 if(epgnode != NULL) … … 118 120 } 119 121 120 ostrcatbig(buf, "<td width=100% valign=middle nowrap class=link><div class=timelineborder><div class=timelinebar style=\"width: ", maxlen, pos); 121 tmpstr = oitoa(proz); 122 ostrcatbig(buf, tmpstr, maxlen, pos); 123 free(tmpstr); tmpstr = NULL; 124 ostrcatbig(buf, "%;\"> </div></div>", maxlen, pos); 122 if(fmt == 0) 123 { 124 ostrcatbig(buf, "<td width=100% valign=middle nowrap class=link><div class=timelineborder><div class=timelinebar style=\"width: ", maxlen, pos); 125 tmpstr = oitoa(proz); 126 ostrcatbig(buf, tmpstr, maxlen, pos); 127 free(tmpstr); tmpstr = NULL; 128 ostrcatbig(buf, "%;\"> </div></div>", maxlen, pos); 129 } 125 130 126 131 serviceid = oitoa(chnode->serviceid); 127 132 transponderid = olutoa(chnode->transponderid); 128 133 129 if( ret == 0)134 if(fmt == 0 && ret == 0) 130 135 { 131 136 ostrcatbig(buf, "<a target=aktservice class=link href=query?switch&", maxlen, pos); … … 138 143 } 139 144 140 ostrcatbig(buf, chnode->name, maxlen, pos); 141 if(ret == 0) ostrcatbig(buf, "</a>", maxlen, pos); 145 if(fmt == 0) 146 { 147 ostrcatbig(buf, chnode->name, maxlen, pos); 148 if(ret == 0) 149 ostrcatbig(buf, "</a>", maxlen, pos); 150 } 151 else 152 { 153 *buf = ostrcat(*buf, chnode->name, 1, 0); 154 *buf = ostrcat(*buf, "#", 1, 0); 155 *buf = ostrcat(*buf, oitoa(proz), 1, 1); 156 *buf = ostrcat(*buf, "#", 1, 0); 157 *buf = ostrcat(*buf, serviceid, 1, 0); 158 *buf = ostrcat(*buf, "#", 1, 0); 159 *buf = ostrcat(*buf, transponderid, 1, 0); 160 *buf = ostrcat(*buf, "#", 1, 0); 161 *buf = ostrcat(*buf, channellist, 1, 0); 162 *buf = ostrcat(*buf, "#", 1, 0); 163 *buf = ostrcat(*buf, oitoa(chnode->servicetype), 1, 1); 164 *buf = ostrcat(*buf, "#", 1, 0); 165 if(epgnode != NULL) 166 *buf = ostrcat(*buf, oitoa(epgnode->eventid), 1, 1); 167 else 168 *buf = ostrcat(*buf, "0", 1, 0); 169 *buf = ostrcat(*buf, "\n", 1, 0); 170 } 142 171 143 172 //akt epg 144 if( epgnode != NULL)173 if(fmt == 0 && epgnode != NULL) 145 174 { 146 175 if(flag == 0) … … 209 238 210 239 //tv - radio 211 if(chnode->servicetype == 0) 212 ostrcatbig(buf, "</td><td width=100 align=right valign=middle nowrap><img style=\"margin-left: 5\" border=0 src=img/tv.png alt=TV width=16 height=16>", maxlen, pos); 213 else 214 ostrcatbig(buf, "</td><td width=100 align=right valign=middle nowrap><img style=\"margin-left: 5\" border=0 src=img/radio.png alt=Radio width=16 height=16>", maxlen, pos); 215 216 //single epg 217 ostrcatbig(buf, "<a target=main href=query?getsingleepg&", maxlen, pos); 218 ostrcatbig(buf, serviceid, maxlen, pos); 219 ostrcatbig(buf, "&", maxlen, pos); 220 ostrcatbig(buf, transponderid, maxlen, pos); 221 ostrcatbig(buf, "><img style=\"margin-left: 5\" border=0 src=img/singleepg.png alt=\"Single EPG\" width=16 height=16></a>", maxlen, pos); 222 223 //m3u stream + webstream 224 if(ret == 0) 225 { 226 ostrcatbig(buf, "<a target=nothing href=query?getm3u&", maxlen, pos); 240 if(fmt == 0) 241 { 242 if(chnode->servicetype == 0) 243 ostrcatbig(buf, "</td><td width=100 align=right valign=middle nowrap><img style=\"margin-left: 5\" border=0 src=img/tv.png alt=TV width=16 height=16>", maxlen, pos); 244 else 245 ostrcatbig(buf, "</td><td width=100 align=right valign=middle nowrap><img style=\"margin-left: 5\" border=0 src=img/radio.png alt=Radio width=16 height=16>", maxlen, pos); 246 247 //single epg 248 ostrcatbig(buf, "<a target=main href=query?getsingleepg&", maxlen, pos); 227 249 ostrcatbig(buf, serviceid, maxlen, pos); 228 ostrcatbig(buf, " ,", maxlen, pos);250 ostrcatbig(buf, "&", maxlen, pos); 229 251 ostrcatbig(buf, transponderid, maxlen, pos); 230 ostrcatbig(buf, "><img style=\"margin-left: 5\" border=0 src=img/stream.png alt=Stream width=16 height=16></a>", maxlen, pos); 231 232 ostrcatbig(buf, "<a target=_blank href=query?getvideo&", maxlen, pos); 233 ostrcatbig(buf, serviceid, maxlen, pos); 234 ostrcatbig(buf, ",", maxlen, pos); 235 ostrcatbig(buf, transponderid, maxlen, pos); 236 ostrcatbig(buf, "><img style=\"margin-left: 5\" border=0 src=img/webstream.png alt=WebStream width=16 height=16></a>", maxlen, pos); 237 } 238 else 239 ostrcatbig(buf, "<img style=\"margin-left: 5\" border=0 src=img/cross.png alt=\"Channel not availabel\" width=16 height=16>", maxlen, pos); 240 ostrcatbig(buf, "</td></tr>", maxlen, pos); 252 ostrcatbig(buf, "><img style=\"margin-left: 5\" border=0 src=img/singleepg.png alt=\"Single EPG\" width=16 height=16></a>", maxlen, pos); 253 254 //m3u stream + webstream 255 if(ret == 0) 256 { 257 ostrcatbig(buf, "<a target=nothing href=query?getm3u&", maxlen, pos); 258 ostrcatbig(buf, serviceid, maxlen, pos); 259 ostrcatbig(buf, ",", maxlen, pos); 260 ostrcatbig(buf, transponderid, maxlen, pos); 261 ostrcatbig(buf, "><img style=\"margin-left: 5\" border=0 src=img/stream.png alt=Stream width=16 height=16></a>", maxlen, pos); 262 263 ostrcatbig(buf, "<a target=_blank href=query?getvideo&", maxlen, pos); 264 ostrcatbig(buf, serviceid, maxlen, pos); 265 ostrcatbig(buf, ",", maxlen, pos); 266 ostrcatbig(buf, transponderid, maxlen, pos); 267 ostrcatbig(buf, "><img style=\"margin-left: 5\" border=0 src=img/webstream.png alt=WebStream width=16 height=16></a>", maxlen, pos); 268 } 269 else 270 ostrcatbig(buf, "<img style=\"margin-left: 5\" border=0 src=img/cross.png alt=\"Channel not availabel\" width=16 height=16>", maxlen, pos); 271 ostrcatbig(buf, "</td></tr>", maxlen, pos); 272 } 241 273 242 274 free(buf1); … … 245 277 } 246 278 247 char* webgetbouquetchannel(char* param )279 char* webgetbouquetchannel(char* param, int fmt) 248 280 { 249 281 char* buf = NULL, *tmpstr = NULL, *tmpstr1 = NULL; … … 255 287 if(param == NULL) return NULL; 256 288 257 webcreateheadbig(&buf, &maxlen, "<meta http-equiv=refresh content=15>", &pos, 0);289 if(fmt == 0) webcreateheadbig(&buf, &maxlen, "<meta http-equiv=refresh content=15>", &pos, 0); 258 290 259 291 mbouquet = getmainbouquet(param); … … 270 302 if(chnode != NULL) 271 303 { 272 webcreatechannelbody(&buf, line, chnode, tmpstr1, &maxlen, &pos, 0 );304 webcreatechannelbody(&buf, line, chnode, tmpstr1, &maxlen, &pos, 0, fmt); 273 305 if(line == 0) 274 306 line = 1; … … 280 312 free(tmpstr1); tmpstr1 = NULL; 281 313 } 282 webcreatetailbig(&buf, &maxlen, &pos, 0);314 if(fmt == 0) webcreatetailbig(&buf, &maxlen, &pos, 0); 283 315 284 316 return buf; … … 289 321 //flag 2: provider 290 322 //flag 3: A-Z 291 char* webgetchannel(int param, int flag, int page )323 char* webgetchannel(int param, int flag, int page, int fmt) 292 324 { 293 325 char* buf = NULL, *tmpnr = NULL, *tmpstr = NULL, *tmpstr1 = NULL; … … 295 327 int line = 0, maxcount = 0, maxlen = 0, pos = 0; 296 328 297 webcreateheadbig(&buf, &maxlen, "<meta http-equiv=refresh content=15>", &pos, 0);329 if(fmt == 0) webcreateheadbig(&buf, &maxlen, "<meta http-equiv=refresh content=15>", &pos, 0); 298 330 299 331 if(flag == 0) tmpstr1 = ostrcat(tmpstr1, "(ALL)", 1, 0); … … 364 396 continue; 365 397 } 366 webcreatechannelbody(&buf, line, chnode, tmpstr1, &maxlen, &pos, 0 );398 webcreatechannelbody(&buf, line, chnode, tmpstr1, &maxlen, &pos, 0, fmt); 367 399 368 400 if(line == 0) … … 375 407 free(tmpstr); tmpstr = NULL; 376 408 377 if( maxcount > MAXHTMLLINE)409 if(fmt == 0 && maxcount > MAXHTMLLINE) 378 410 { 379 411 int i; … … 404 436 } 405 437 406 webcreatetailbig(&buf, &maxlen, &pos, 0);407 return buf; 408 } 409 410 char* webgetprovider( )438 if(fmt == 0) webcreatetailbig(&buf, &maxlen, &pos, 0); 439 return buf; 440 } 441 442 char* webgetprovider(int fmt) 411 443 { 412 444 char* buf = NULL, *tmpstr = NULL; … … 414 446 int line = 0, maxlen = 0, pos = 0; 415 447 416 webcreateheadbig(&buf, &maxlen, NULL, &pos, 0);448 if(fmt == 0) webcreateheadbig(&buf, &maxlen, NULL, &pos, 0); 417 449 418 450 while(node != NULL) 419 451 { 420 if(line == 0) 421 { 422 ostrcatbig(&buf, "<tr class=line1><td nowrap><a class=link href=\"query?getproviderchannel&", &maxlen, &pos); 423 tmpstr = oitoa(node->providerid); 424 ostrcatbig(&buf, tmpstr, &maxlen, &pos); 425 free(tmpstr); tmpstr = NULL; 426 ostrcatbig(&buf, "\">", &maxlen, &pos); 427 line = 1; 428 } 429 else 430 { 431 ostrcatbig(&buf, "<tr class=line2><td nowrap><a class=link href=\"query?getproviderchannel&", &maxlen, &pos); 432 tmpstr = oitoa(node->providerid); 433 ostrcatbig(&buf, tmpstr, &maxlen, &pos); 434 free(tmpstr); tmpstr = NULL; 435 ostrcatbig(&buf, "\">", &maxlen, &pos); 436 line = 0; 437 } 438 ostrcatbig(&buf, node->name, &maxlen, &pos); 439 ostrcatbig(&buf, "</td></tr>", &maxlen, &pos); 452 if(fmt == 0) 453 { 454 if(line == 0) 455 { 456 ostrcatbig(&buf, "<tr class=line1><td nowrap><a class=link href=\"query?getproviderchannel&", &maxlen, &pos); 457 tmpstr = oitoa(node->providerid); 458 ostrcatbig(&buf, tmpstr, &maxlen, &pos); 459 free(tmpstr); tmpstr = NULL; 460 ostrcatbig(&buf, "\">", &maxlen, &pos); 461 line = 1; 462 } 463 else 464 { 465 ostrcatbig(&buf, "<tr class=line2><td nowrap><a class=link href=\"query?getproviderchannel&", &maxlen, &pos); 466 tmpstr = oitoa(node->providerid); 467 ostrcatbig(&buf, tmpstr, &maxlen, &pos); 468 free(tmpstr); tmpstr = NULL; 469 ostrcatbig(&buf, "\">", &maxlen, &pos); 470 line = 0; 471 } 472 ostrcatbig(&buf, node->name, &maxlen, &pos); 473 ostrcatbig(&buf, "</td></tr>", &maxlen, &pos); 474 } 475 else 476 { 477 buf = ostrcat(buf, node->name, 1, 0); 478 buf = ostrcat(buf, "#", 1, 0); 479 buf = ostrcat(buf, oitoa(node->providerid), 1, 1); 480 buf = ostrcat(buf, "\n", 1, 0); 481 } 440 482 441 483 node = node->next; 442 484 } 443 485 444 webcreatetailbig(&buf, &maxlen, &pos, 0);445 return buf; 446 } 447 448 char* webgetsat( )486 if(fmt == 0) webcreatetailbig(&buf, &maxlen, &pos, 0); 487 return buf; 488 } 489 490 char* webgetsat(int fmt) 449 491 { 450 492 char* buf = NULL, *tmpstr = NULL; … … 452 494 int line = 0, maxlen = 0, pos = 0; 453 495 454 webcreateheadbig(&buf, &maxlen, NULL, &pos, 0);496 if(fmt == 0) webcreateheadbig(&buf, &maxlen, NULL, &pos, 0); 455 497 456 498 while(node != NULL) 457 499 { 458 if(line == 0) 459 { 460 ostrcatbig(&buf, "<tr class=line1><td nowrap><a class=link href=\"query?getsatchannel&", &maxlen, &pos); 461 tmpstr = oitoa(node->orbitalpos); 462 ostrcatbig(&buf, tmpstr, &maxlen, &pos); 463 free(tmpstr); tmpstr = NULL; 464 ostrcatbig(&buf, "\">", &maxlen, &pos); 465 line = 1; 466 } 467 else 468 { 469 ostrcatbig(&buf, "<tr class=line2><td nowrap><a class=link href=\"query?getsatchannel&", &maxlen, &pos); 470 tmpstr = oitoa(node->orbitalpos); 471 ostrcatbig(&buf, tmpstr, &maxlen, &pos); 472 free(tmpstr); tmpstr = NULL; 473 ostrcatbig(&buf, "\">", &maxlen, &pos); 474 line = 0; 475 } 476 ostrcatbig(&buf, node->name, &maxlen, &pos); 477 ostrcatbig(&buf, "</td></tr>", &maxlen, &pos); 500 if(fmt == 0) 501 { 502 if(line == 0) 503 { 504 ostrcatbig(&buf, "<tr class=line1><td nowrap><a class=link href=\"query?getsatchannel&", &maxlen, &pos); 505 tmpstr = oitoa(node->orbitalpos); 506 ostrcatbig(&buf, tmpstr, &maxlen, &pos); 507 free(tmpstr); tmpstr = NULL; 508 ostrcatbig(&buf, "\">", &maxlen, &pos); 509 line = 1; 510 } 511 else 512 { 513 ostrcatbig(&buf, "<tr class=line2><td nowrap><a class=link href=\"query?getsatchannel&", &maxlen, &pos); 514 tmpstr = oitoa(node->orbitalpos); 515 ostrcatbig(&buf, tmpstr, &maxlen, &pos); 516 free(tmpstr); tmpstr = NULL; 517 ostrcatbig(&buf, "\">", &maxlen, &pos); 518 line = 0; 519 } 520 ostrcatbig(&buf, node->name, &maxlen, &pos); 521 ostrcatbig(&buf, "</td></tr>", &maxlen, &pos); 522 } 523 else 524 { 525 buf = ostrcat(buf, node->name, 1, 0); 526 buf = ostrcat(buf, "#", 1, 0); 527 buf = ostrcat(buf, oitoa(node->orbitalpos), 1, 1); 528 buf = ostrcat(buf, "\n", 1, 0); 529 } 478 530 479 531 node = node->next; 480 532 } 481 533 482 webcreatetailbig(&buf, &maxlen, &pos, 0);483 return buf; 484 } 485 486 char* webgetaz( )534 if(fmt == 0) webcreatetailbig(&buf, &maxlen, &pos, 0); 535 return buf; 536 } 537 538 char* webgetaz(int fmt) 487 539 { 488 540 char* buf = NULL, *tmpstr = NULL, *tmpnr = NULL; … … 496 548 } 497 549 498 webcreateheadbig(&buf, &maxlen, NULL, &pos, 0);550 if(fmt == 0) webcreateheadbig(&buf, &maxlen, NULL, &pos, 0); 499 551 500 552 for(i = 65; i < 91; i++) 501 553 { 502 if(line == 0) 503 { 504 ostrcatbig(&buf, "<tr class=line1><td nowrap><a class=link href=\"query?getazchannel&", &maxlen, &pos); 505 tmpnr = oitoa(i); 506 ostrcatbig(&buf, tmpnr, &maxlen, &pos); 507 free(tmpnr); tmpnr = NULL; 508 ostrcatbig(&buf, "\">", &maxlen, &pos); 509 line = 1; 510 } 511 else 512 { 513 ostrcatbig(&buf, "<tr class=line2><td nowrap><a class=link href=\"query?getazchannel&", &maxlen, &pos); 514 tmpnr = oitoa(i); 515 ostrcatbig(&buf, tmpnr, &maxlen, &pos); 516 free(tmpnr); tmpnr = NULL; 517 ostrcatbig(&buf, "\">", &maxlen, &pos); 518 line = 0; 519 } 520 snprintf(tmpstr, 2, "%c", i); 521 ostrcatbig(&buf, tmpstr, &maxlen, &pos); 522 ostrcatbig(&buf, "</td></tr>", &maxlen, &pos); 523 } 524 525 webcreatetailbig(&buf, &maxlen, &pos, 0); 554 if(fmt == 0) 555 { 556 if(line == 0) 557 { 558 ostrcatbig(&buf, "<tr class=line1><td nowrap><a class=link href=\"query?getazchannel&", &maxlen, &pos); 559 tmpnr = oitoa(i); 560 ostrcatbig(&buf, tmpnr, &maxlen, &pos); 561 free(tmpnr); tmpnr = NULL; 562 ostrcatbig(&buf, "\">", &maxlen, &pos); 563 line = 1; 564 } 565 else 566 { 567 ostrcatbig(&buf, "<tr class=line2><td nowrap><a class=link href=\"query?getazchannel&", &maxlen, &pos); 568 tmpnr = oitoa(i); 569 ostrcatbig(&buf, tmpnr, &maxlen, &pos); 570 free(tmpnr); tmpnr = NULL; 571 ostrcatbig(&buf, "\">", &maxlen, &pos); 572 line = 0; 573 } 574 snprintf(tmpstr, 2, "%c", i); 575 ostrcatbig(&buf, tmpstr, &maxlen, &pos); 576 ostrcatbig(&buf, "</td></tr>", &maxlen, &pos); 577 } 578 else 579 { 580 snprintf(tmpstr, 2, "%c", i); 581 buf = ostrcat(buf, tmpstr, 1, 0); 582 buf = ostrcat(buf, "\n", 1, 0); 583 } 584 } 585 586 if(fmt == 0) webcreatetailbig(&buf, &maxlen, &pos, 0); 526 587 free(tmpstr); 527 588 return buf; 528 589 } 529 590 530 char* webgetbouquet( )591 char* webgetbouquet(int fmt) 531 592 { 532 593 char* buf = NULL; … … 534 595 int line = 0, maxlen = 0, pos = 0; 535 596 536 webcreateheadbig(&buf, &maxlen, NULL, &pos, 0);597 if(fmt == 0) webcreateheadbig(&buf, &maxlen, NULL, &pos, 0); 537 598 538 599 while(node != NULL) 539 600 { 540 if(line == 0) 541 { 542 ostrcatbig(&buf, "<tr class=line1><td width=100% nowrap><a class=link href=\"query?getbouquetchannel&", &maxlen, &pos); 601 if(fmt == 0) 602 { 603 if(line == 0) 604 { 605 ostrcatbig(&buf, "<tr class=line1><td width=100% nowrap><a class=link href=\"query?getbouquetchannel&", &maxlen, &pos); 606 ostrcatbig(&buf, node->name, &maxlen, &pos); 607 ostrcatbig(&buf, "\">", &maxlen, &pos); 608 line = 1; 609 } 610 else 611 { 612 ostrcatbig(&buf, "<tr class=line2><td width=100% nowrap><a class=link href=\"query?getbouquetchannel&", &maxlen, &pos); 613 ostrcatbig(&buf, node->name, &maxlen, &pos); 614 ostrcatbig(&buf, "\">", &maxlen, &pos); 615 line = 0; 616 } 617 ostrcatbig(&buf, node->name, &maxlen, &pos); 618 ostrcatbig(&buf, "</a></td>", &maxlen, &pos); 619 620 ostrcatbig(&buf, "<td width=50 nowrap align=right valign=middle><img style=\"margin-left: 5\" border=0 src=", &maxlen, &pos); 621 622 if(node->type == 0) 623 ostrcatbig(&buf, "img/tv.png width=16 height=16 alt=TV>", &maxlen, &pos); 624 else 625 ostrcatbig(&buf, "img/radio.png width=16 height=16 alt=Radio>", &maxlen, &pos); 626 ostrcatbig(&buf, "<a href=\"query?getgmultiepg&", &maxlen, &pos); 543 627 ostrcatbig(&buf, node->name, &maxlen, &pos); 544 628 ostrcatbig(&buf, "\">", &maxlen, &pos); 545 line = 1; 546 } 547 else 548 { 549 ostrcatbig(&buf, "<tr class=line2><td width=100% nowrap><a class=link href=\"query?getbouquetchannel&", &maxlen, &pos); 550 ostrcatbig(&buf, node->name, &maxlen, &pos); 551 ostrcatbig(&buf, "\">", &maxlen, &pos); 552 line = 0; 553 } 554 ostrcatbig(&buf, node->name, &maxlen, &pos); 555 ostrcatbig(&buf, "</a></td>", &maxlen, &pos); 556 557 ostrcatbig(&buf, "<td width=50 nowrap align=right valign=middle><img style=\"margin-left: 5\" border=0 src=", &maxlen, &pos); 558 559 if(node->type == 0) 560 ostrcatbig(&buf, "img/tv.png width=16 height=16 alt=TV>", &maxlen, &pos); 561 else 562 ostrcatbig(&buf, "img/radio.png width=16 height=16 alt=Radio>", &maxlen, &pos); 563 ostrcatbig(&buf, "<a href=\"query?getgmultiepg&", &maxlen, &pos); 564 ostrcatbig(&buf, node->name, &maxlen, &pos); 565 ostrcatbig(&buf, "\">", &maxlen, &pos); 566 ostrcatbig(&buf, "<img style=\"margin-left: 5\" border=0 width=16 height=16 alt=\"Graphical Multi EPG\" src=img/gmultiepg.png></a>", &maxlen, &pos); 567 ostrcatbig(&buf, "</td></tr>", &maxlen, &pos); 629 ostrcatbig(&buf, "<img style=\"margin-left: 5\" border=0 width=16 height=16 alt=\"Graphical Multi EPG\" src=img/gmultiepg.png></a>", &maxlen, &pos); 630 ostrcatbig(&buf, "</td></tr>", &maxlen, &pos); 631 } 632 else 633 { 634 buf = ostrcat(buf, node->name, 1, 0); 635 buf = ostrcat(buf, "#", 1, 0); 636 buf = ostrcat(buf, oitoa(node->type), 1, 1); 637 buf = ostrcat(buf, "\n", 1, 0); 638 } 568 639 569 640 node = node->next; 570 641 } 571 642 572 webcreatetailbig(&buf, &maxlen, &pos, 0);573 return buf; 574 } 575 576 char* websetmute(char* param )643 if(fmt == 0) webcreatetailbig(&buf, &maxlen, &pos, 0); 644 return buf; 645 } 646 647 char* websetmute(char* param, int fmt) 577 648 { 578 649 char* buf = NULL; … … 582 653 mute = atoi(param); 583 654 584 buf = ostrcat(buf, "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"><link rel=stylesheet type=text/css href=titan.css></head><body class=body><center>", 1, 0); 585 if(mute == 0) 586 buf = ostrcat(buf, "<a href=query?setmute&1><img src=img/speak_on.png border=0 alt=\"Mute on\"></img></a>", 1, 0); 655 if(fmt == 0) 656 { 657 buf = ostrcat(buf, "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"><link rel=stylesheet type=text/css href=titan.css></head><body class=body><center>", 1, 0); 658 if(mute == 0) 659 buf = ostrcat(buf, "<a href=query?setmute&1><img src=img/speak_on.png border=0 alt=\"Mute on\"></img></a>", 1, 0); 660 else 661 buf = ostrcat(buf, "<a href=query?setmute&0><img src=img/speak_off.png border=0 alt=\"Mute off\"></img></a>", 1, 0); 662 buf = ostrcat(buf, "</center></body></html>", 1, 0); 663 } 587 664 else 588 buf = ostrcat(buf, "<a href=query?setmute&0><img src=img/speak_off.png border=0 alt=\"Mute off\"></img></a>", 1, 0); 589 buf = ostrcat(buf, "</center></body></html>", 1, 0); 665 { 666 if(mute == 0) 667 buf = ostrcat(buf, "0", 1, 0); 668 else 669 buf = ostrcat(buf, "1", 1, 0); 670 } 590 671 591 672 if(mute != status.mute) … … 595 676 } 596 677 597 char* websetvol(char* param )678 char* websetvol(char* param, int fmt) 598 679 { 599 680 char* buf = NULL; … … 605 686 vol = atoi(param); 606 687 607 buf = ostrcat(buf, "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"><link rel=stylesheet type=text/css href=titan.css></head><body class=body><center>", 1, 0); 608 if(vol >=10) 609 buf = ostrcat(buf, "<a href=query?setvol&10><img src=img/led_on.png border=0></img></a> ", 1, 0); 688 if(fmt == 0) 689 { 690 buf = ostrcat(buf, "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"><link rel=stylesheet type=text/css href=titan.css></head><body class=body><center>", 1, 0); 691 if(vol >=10) 692 buf = ostrcat(buf, "<a href=query?setvol&10><img src=img/led_on.png border=0></img></a> ", 1, 0); 693 else 694 buf = ostrcat(buf, "<a href=query?setvol&10><img src=img/led_off.png border=0></img></a> ", 1, 0); 695 if(vol >=20) 696 buf = ostrcat(buf, "<a href=query?setvol&20><img src=img/led_on.png border=0></img></a> ", 1, 0); 697 else 698 buf = ostrcat(buf, "<a href=query?setvol&20><img src=img/led_off.png border=0></img></a> ", 1, 0); 699 if(vol >=30) 700 buf = ostrcat(buf, "<a href=query?setvol&30><img src=img/led_on.png border=0></img></a> ", 1, 0); 701 else 702 buf = ostrcat(buf, "<a href=query?setvol&30><img src=img/led_off.png border=0></img></a> ", 1, 0); 703 if(vol >=40) 704 buf = ostrcat(buf, "<a href=query?setvol&40><img src=img/led_on.png border=0></img></a> ", 1, 0); 705 else 706 buf = ostrcat(buf, "<a href=query?setvol&40><img src=img/led_off.png border=0></img></a> ", 1, 0); 707 if(vol >=50) 708 buf = ostrcat(buf, "<a href=query?setvol&50><img src=img/led_on.png border=0></img></a> ", 1, 0); 709 else 710 buf = ostrcat(buf, "<a href=query?setvol&50><img src=img/led_off.png border=0></img></a> ", 1, 0); 711 if(vol >=60) 712 buf = ostrcat(buf, "<a href=query?setvol&60><img src=img/led_on.png border=0></img></a> ", 1, 0); 713 else 714 buf = ostrcat(buf, "<a href=query?setvol&60><img src=img/led_off.png border=0></img></a> ", 1, 0); 715 if(vol >=70) 716 buf = ostrcat(buf, "<a href=query?setvol&70><img src=img/led_on.png border=0></img></a> ", 1, 0); 717 else 718 buf = ostrcat(buf, "<a href=query?setvol&70><img src=img/led_off.png border=0></img></a> ", 1, 0); 719 if(vol >=80) 720 buf = ostrcat(buf, "<a href=query?setvol&80><img src=img/led_on.png border=0></img></a> ", 1, 0); 721 else 722 buf = ostrcat(buf, "<a href=query?setvol&80><img src=img/led_off.png border=0></img></a> ", 1, 0); 723 if(vol >=90) 724 buf = ostrcat(buf, "<a href=query?setvol&90><img src=img/led_on.png border=0></img></a> ", 1, 0); 725 else 726 buf = ostrcat(buf, "<a href=query?setvol&90><img src=img/led_off.png border=0></img></a> ", 1, 0); 727 if(vol >=100) 728 buf = ostrcat(buf, "<a href=query?setvol&100><img src=img/led_on.png border=0></img></a> ", 1, 0); 729 else 730 buf = ostrcat(buf, "<a href=query?setvol&100><img src=img/led_off.png border=0></img></a> ", 1, 0); 731 buf = ostrcat(buf, "</center></body></html>", 1, 0); 732 } 610 733 else 611 buf = ostrcat(buf, "<a href=query?setvol&10><img src=img/led_off.png border=0></img></a> ", 1, 0); 612 if(vol >=20) 613 buf = ostrcat(buf, "<a href=query?setvol&20><img src=img/led_on.png border=0></img></a> ", 1, 0); 614 else 615 buf = ostrcat(buf, "<a href=query?setvol&20><img src=img/led_off.png border=0></img></a> ", 1, 0); 616 if(vol >=30) 617 buf = ostrcat(buf, "<a href=query?setvol&30><img src=img/led_on.png border=0></img></a> ", 1, 0); 618 else 619 buf = ostrcat(buf, "<a href=query?setvol&30><img src=img/led_off.png border=0></img></a> ", 1, 0); 620 if(vol >=40) 621 buf = ostrcat(buf, "<a href=query?setvol&40><img src=img/led_on.png border=0></img></a> ", 1, 0); 622 else 623 buf = ostrcat(buf, "<a href=query?setvol&40><img src=img/led_off.png border=0></img></a> ", 1, 0); 624 if(vol >=50) 625 buf = ostrcat(buf, "<a href=query?setvol&50><img src=img/led_on.png border=0></img></a> ", 1, 0); 626 else 627 buf = ostrcat(buf, "<a href=query?setvol&50><img src=img/led_off.png border=0></img></a> ", 1, 0); 628 if(vol >=60) 629 buf = ostrcat(buf, "<a href=query?setvol&60><img src=img/led_on.png border=0></img></a> ", 1, 0); 630 else 631 buf = ostrcat(buf, "<a href=query?setvol&60><img src=img/led_off.png border=0></img></a> ", 1, 0); 632 if(vol >=70) 633 buf = ostrcat(buf, "<a href=query?setvol&70><img src=img/led_on.png border=0></img></a> ", 1, 0); 634 else 635 buf = ostrcat(buf, "<a href=query?setvol&70><img src=img/led_off.png border=0></img></a> ", 1, 0); 636 if(vol >=80) 637 buf = ostrcat(buf, "<a href=query?setvol&80><img src=img/led_on.png border=0></img></a> ", 1, 0); 638 else 639 buf = ostrcat(buf, "<a href=query?setvol&80><img src=img/led_off.png border=0></img></a> ", 1, 0); 640 if(vol >=90) 641 buf = ostrcat(buf, "<a href=query?setvol&90><img src=img/led_on.png border=0></img></a> ", 1, 0); 642 else 643 buf = ostrcat(buf, "<a href=query?setvol&90><img src=img/led_off.png border=0></img></a> ", 1, 0); 644 if(vol >=100) 645 buf = ostrcat(buf, "<a href=query?setvol&100><img src=img/led_on.png border=0></img></a> ", 1, 0); 646 else 647 buf = ostrcat(buf, "<a href=query?setvol&100><img src=img/led_off.png border=0></img></a> ", 1, 0); 648 buf = ostrcat(buf, "</center></body></html>", 1, 0); 734 buf = ostrcat(buf, oitoa(vol), 1, 1); 649 735 650 736 if(param != NULL) … … 657 743 } 658 744 659 char* webgetaktservice( )745 char* webgetaktservice(int fmt) 660 746 { 661 747 char* buf = NULL; … … 663 749 int line = 0, maxlen = 0, pos = 0; 664 750 665 webcreateheadbig(&buf, &maxlen, NULL, &pos, 1);666 webcreatechannelbody(&buf, line, chnode, getconfig("channellist", NULL), &maxlen, &pos ,1 );667 webcreatetailbig(&buf, &maxlen, &pos, 1);668 669 return buf; 670 } 671 672 char* webswitch(char* param )751 if(fmt == 0) webcreateheadbig(&buf, &maxlen, NULL, &pos, 1); 752 webcreatechannelbody(&buf, line, chnode, getconfig("channellist", NULL), &maxlen, &pos ,1, fmt); 753 if(fmt == 0) webcreatetailbig(&buf, &maxlen, &pos, 1); 754 755 return buf; 756 } 757 758 char* webswitch(char* param, int fmt) 673 759 { 674 760 if(status.channelswitch == 1) goto end; … … 701 787 702 788 end: 703 return webgetaktservice( );704 } 705 706 char* webgetm3u(char* param, int connfd )789 return webgetaktservice(fmt); 790 } 791 792 char* webgetm3u(char* param, int connfd, int fmt) 707 793 { 708 794 char* buf = NULL, *ip = NULL, *tmpbuf = NULL; … … 739 825 } 740 826 741 char* webgetvideo(char* param, int connfd )827 char* webgetvideo(char* param, int connfd, int fmt) 742 828 { 743 829 char* buf = NULL, *ip = NULL, *tmpbuf = NULL; … … 756 842 if(ip == NULL) return NULL; 757 843 758 buf = ostrcat(buf, "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"><link rel=stylesheet type=text/css href=titan.css></head><body class=body><table border=0 width=100% height=100%><tr><td align=center valign=middle>", 1, 0); 759 buf = ostrcat(buf, "<embed width=100% height=100% type=application/x-vlc-plugin name=video autoplay=yes target=\"http://", 1, 0); 844 if(fmt == 0) 845 { 846 buf = ostrcat(buf, "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"><link rel=stylesheet type=text/css href=titan.css></head><body class=body><table border=0 width=100% height=100%><tr><td align=center valign=middle>", 1, 0); 847 buf = ostrcat(buf, "<embed width=100% height=100% type=application/x-vlc-plugin name=video autoplay=yes target=\"http://", 1, 0); 848 } 849 else 850 buf = ostrcat(buf, "http://", 1, 0); 851 760 852 buf = ostrcat(buf, ip, 1, 0); 761 853 buf = ostrcat(buf, ":", 1, 0); … … 769 861 buf = ostrcat(buf, param, 1, 0); 770 862 free(tmpbuf); tmpbuf = NULL; 771 buf = ostrcat(buf, "\" />", 1, 0); 772 //buf = ostrcat(buf, "<a href=javascript:; onclick='document.video.play()'>Play</a>", 1, 0); 773 //buf = ostrcat(buf, "<a href=javascript:; onclick='document.video.stop()'>Stop</a>", 1, 0); 774 //buf = ostrcat(buf, "<a href=javascript:; onclick='document.video.fullscreen()'>Fullscreen</a>", 1, 0); 775 buf = ostrcat(buf, "</td></tr></body></html>", 1, 0); 776 777 return buf; 778 } 779 780 char* webgetchannelpage(char* param) 863 864 if(fmt == 0) 865 { 866 buf = ostrcat(buf, "\" />", 1, 0); 867 //buf = ostrcat(buf, "<a href=javascript:; onclick='document.video.play()'>Play</a>", 1, 0); 868 //buf = ostrcat(buf, "<a href=javascript:; onclick='document.video.stop()'>Stop</a>", 1, 0); 869 //buf = ostrcat(buf, "<a href=javascript:; onclick='document.video.fullscreen()'>Fullscreen</a>", 1, 0); 870 buf = ostrcat(buf, "</td></tr></body></html>", 1, 0); 871 } 872 873 return buf; 874 } 875 876 char* webgetchannelpage(char* param, int fmt) 781 877 { 782 878 char* param1 = NULL, *param2 = NULL; … … 796 892 if(param1 == NULL || param2 == NULL) return NULL; 797 893 798 return webgetchannel(atoi(param), atoi(param1), atoi(param2) );894 return webgetchannel(atoi(param), atoi(param1), atoi(param2), fmt); 799 895 } 800 896 … … 805 901 } 806 902 807 char* websendmessage(char* param )903 char* websendmessage(char* param, int fmt) 808 904 { 809 905 char* text = NULL, *buf = NULL; … … 819 915 addtimer(&webmessage, START, 1000, 1, (void*)text, NULL, NULL); 820 916 821 buf = webcreatehead(buf, NULL, 1); 822 buf = ostrcat(buf, "<tr><td align=center valign=top><font class=biglabel><br><br>Message Send !!!</font></td></tr>", 1, 0); 823 buf = webcreatetail(buf, 1); 824 825 return buf; 826 } 827 828 char* webgetsignal() 917 if(fmt == 0) 918 { 919 buf = webcreatehead(buf, NULL, 1); 920 buf = ostrcat(buf, "<tr><td align=center valign=top><font class=biglabel><br><br>Message Send !!!</font></td></tr>", 1, 0); 921 buf = webcreatetail(buf, 1); 922 } 923 else 924 buf = ostrcat(buf, "Message Send", 1, 0); 925 926 return buf; 927 } 928 929 char* webgetsignal(int fmt) 829 930 { 830 931 char* buf = NULL, *tmpnr = NULL; … … 838 939 snr = (snr * 100) / 0xffff; 839 940 840 buf = webcreatehead(buf, "<meta http-equiv=refresh content=1>", 0); 841 842 buf = ostrcat(buf, "<tr><td align=center><font class=biglabel><br><br>BER: ", 1, 0); 843 tmpnr = oitoa(ber); 844 buf = ostrcat(buf, tmpnr, 1, 0); 845 free(tmpnr); tmpnr = NULL; 846 847 buf = ostrcat(buf, "<br>UNC: ", 1, 0); 848 tmpnr = oitoa(unc); 849 buf = ostrcat(buf, tmpnr, 1, 0); 850 free(tmpnr); tmpnr = NULL; 851 852 buf = ostrcat(buf, "<br>SIG: ", 1, 0); 853 tmpnr = oitoa(signal); 854 buf = ostrcat(buf, tmpnr, 1, 0); 855 free(tmpnr); tmpnr = NULL; 856 857 buf = ostrcat(buf, "<br>SNR: ", 1, 0); 858 tmpnr = oitoa(snr); 859 buf = ostrcat(buf, tmpnr, 1, 0); 860 free(tmpnr); tmpnr = NULL; 861 862 buf = ostrcat(buf, "</font></td></tr>", 1, 0); 863 buf = webcreatetail(buf, 0); 864 return buf; 865 } 866 867 char* webgetepg(char* param) 941 if(fmt == 0) 942 { 943 buf = webcreatehead(buf, "<meta http-equiv=refresh content=1>", 0); 944 945 buf = ostrcat(buf, "<tr><td align=center><font class=biglabel><br><br>BER: ", 1, 0); 946 tmpnr = oitoa(ber); 947 buf = ostrcat(buf, tmpnr, 1, 0); 948 free(tmpnr); tmpnr = NULL; 949 950 buf = ostrcat(buf, "<br>UNC: ", 1, 0); 951 tmpnr = oitoa(unc); 952 buf = ostrcat(buf, tmpnr, 1, 0); 953 free(tmpnr); tmpnr = NULL; 954 955 buf = ostrcat(buf, "<br>SIG: ", 1, 0); 956 tmpnr = oitoa(signal); 957 buf = ostrcat(buf, tmpnr, 1, 0); 958 free(tmpnr); tmpnr = NULL; 959 960 buf = ostrcat(buf, "<br>SNR: ", 1, 0); 961 tmpnr = oitoa(snr); 962 buf = ostrcat(buf, tmpnr, 1, 0); 963 free(tmpnr); tmpnr = NULL; 964 965 buf = ostrcat(buf, "</font></td></tr>", 1, 0); 966 buf = webcreatetail(buf, 0); 967 } 968 else 969 { 970 buf = ostrcat(buf, oitoa(ber), 1, 1); 971 buf = ostrcat(buf, "#", 1, 0); 972 buf = ostrcat(buf, oitoa(unc), 1, 1); 973 buf = ostrcat(buf, "#", 1, 0); 974 buf = ostrcat(buf, oitoa(signal), 1, 1); 975 buf = ostrcat(buf, "#", 1, 0); 976 buf = ostrcat(buf, oitoa(snr), 1, 1); 977 } 978 979 return buf; 980 } 981 982 char* webgetepg(char* param, int fmt) 868 983 { 869 984 char* buf = NULL, *buf1 = NULL, *tmpstr = NULL, *param1 = NULL, *param2 = NULL; … … 892 1007 if(epgnode == NULL) return NULL; 893 1008 894 buf = webcreatehead(buf, NULL, 0);1009 if(fmt == 0) buf = webcreatehead(buf, NULL, 0); 895 1010 896 1011 buf1 = malloc(MINMALLOC); … … 901 1016 } 902 1017 903 buf = ostrcat(buf, "<tr><td><font class=biglabel>", 1, 0);1018 if(fmt == 0) buf = ostrcat(buf, "<tr><td><font class=biglabel>", 1, 0); 904 1019 if(epgnode->title != NULL) 905 1020 { 906 1021 buf = ostrcat(buf, epgnode->title, 1, 0); 907 buf = ostrcat(buf, " (", 1, 0); 908 loctime = olocaltime(&epgnode->starttime); 909 if(loctime != NULL) 910 strftime(buf1, MINMALLOC, "%H:%M -", loctime); 911 free(loctime); loctime = NULL; 912 loctime = olocaltime(&epgnode->endtime); 913 if(loctime != NULL) 914 strftime(&buf1[7], MINMALLOC - 8, " %H:%M", loctime); 915 free(loctime); loctime = NULL; 916 buf = ostrcat(buf, buf1, 1, 0); 917 buf = ostrcat(buf, ")", 1, 0); 918 } 919 buf = ostrcat(buf, "<br><br></font></td></tr>", 1, 0); 920 921 buf = ostrcat(buf, "<tr><td><font class=label>", 1, 0); 1022 if(fmt == 0) 1023 { 1024 buf = ostrcat(buf, " (", 1, 0); 1025 loctime = olocaltime(&epgnode->starttime); 1026 if(loctime != NULL) 1027 strftime(buf1, MINMALLOC, "%H:%M -", loctime); 1028 free(loctime); loctime = NULL; 1029 loctime = olocaltime(&epgnode->endtime); 1030 if(loctime != NULL) 1031 strftime(&buf1[7], MINMALLOC - 8, " %H:%M", loctime); 1032 free(loctime); loctime = NULL; 1033 buf = ostrcat(buf, buf1, 1, 0); 1034 buf = ostrcat(buf, ")", 1, 0); 1035 } 1036 } 1037 if(fmt == 0) 1038 { 1039 buf = ostrcat(buf, "<br><br></font></td></tr>", 1, 0); 1040 buf = ostrcat(buf, "<tr><td><font class=label>", 1, 0); 1041 } 1042 else 1043 { 1044 buf = ostrcat(buf, "#", 1, 0); 1045 buf = ostrcat(buf, olutoa(epgnode->starttime), 1, 1); 1046 buf = ostrcat(buf, "#", 1, 0); 1047 buf = ostrcat(buf, olutoa(epgnode->endtime), 1, 1); 1048 buf = ostrcat(buf, "#", 1, 0); 1049 } 1050 922 1051 if(epgnode->subtitle != NULL) 923 1052 buf = ostrcat(buf, epgnode->subtitle, 1, 0); 924 buf = ostrcat(buf, "<br><br></font></td></tr>", 1, 0); 925 926 buf = ostrcat(buf, "<tr><td><font class=label>", 1, 0); 1053 1054 if(fmt == 0) 1055 { 1056 buf = ostrcat(buf, "<br><br></font></td></tr>", 1, 0); 1057 buf = ostrcat(buf, "<tr><td><font class=label>", 1, 0); 1058 } 1059 else 1060 buf = ostrcat(buf, "#", 1, 0); 1061 927 1062 tmpstr = epgdescunzip(epgnode); 928 1063 if(tmpstr != NULL) 929 1064 buf = ostrcat(buf, tmpstr, 1, 0); 930 1065 free(tmpstr); tmpstr = NULL; 931 buf = ostrcat(buf, "</font></td></tr>", 1, 0); 932 933 buf = webcreatetail(buf, 0); 1066 1067 if(fmt == 0) 1068 { 1069 buf = ostrcat(buf, "</font></td></tr>", 1, 0); 1070 buf = webcreatetail(buf, 0); 1071 } 934 1072 935 1073 free(buf1); … … 937 1075 } 938 1076 939 char* webgetsingleepg(char* param )1077 char* webgetsingleepg(char* param, int fmt) 940 1078 { 941 1079 int line = 0, maxlen = 0, pos = 0; … … 956 1094 epgnode = getepgakt(chnode);; 957 1095 958 webcreateheadbig(&buf, &maxlen, NULL, &pos, 0);1096 if(fmt == 0) webcreateheadbig(&buf, &maxlen, NULL, &pos, 0); 959 1097 960 1098 buf1 = malloc(MINMALLOC); … … 967 1105 while(epgnode != NULL) 968 1106 { 969 if(line == 0) 970 { 971 ostrcatbig(&buf, "<tr class=line1>", &maxlen, &pos); 972 line = 1; 973 } 974 else 975 { 976 ostrcatbig(&buf, "<tr class=line2>", &maxlen, &pos); 977 line = 0; 978 } 979 980 981 ostrcatbig(&buf, "<td nowrap><a target=main class=link href=query?getepg&", &maxlen, &pos); 982 tmpstr = oitoa(chnode->serviceid); 983 ostrcatbig(&buf, tmpstr, &maxlen, &pos); 984 buf2 = ostrcat("<td nowrap><a target=main class=link href=query?addrectimer&",tmpstr, 0, 0); 985 buf2 = ostrcat(buf2, "&", 0, 0); 986 free(tmpstr); tmpstr = NULL; 987 ostrcatbig(&buf, "&", &maxlen, &pos); 988 tmpstr = olutoa(chnode->transponderid); 989 ostrcatbig(&buf, tmpstr, &maxlen, &pos); 990 buf2 = ostrcat(buf2, tmpstr, 0, 0); 991 buf2 = ostrcat(buf2, "&", 0, 0); 992 free(tmpstr); tmpstr = NULL; 993 ostrcatbig(&buf, "&", &maxlen, &pos); 994 tmpstr = oitoa(epgnode->eventid); 995 ostrcatbig(&buf, tmpstr, &maxlen, &pos); 996 buf2 = ostrcat(buf2, tmpstr, 0, 0); 997 buf2 = ostrcat(buf2, ">", 0, 0); 998 free(tmpstr); tmpstr = NULL; 999 ostrcatbig(&buf, ">", &maxlen, &pos); 1000 1001 loctime = olocaltime(&epgnode->starttime); 1002 if(loctime != NULL) 1107 if(fmt == 0) 1108 { 1109 if(line == 0) 1110 { 1111 ostrcatbig(&buf, "<tr class=line1>", &maxlen, &pos); 1112 line = 1; 1113 } 1114 else 1115 { 1116 ostrcatbig(&buf, "<tr class=line2>", &maxlen, &pos); 1117 line = 0; 1118 } 1119 1120 ostrcatbig(&buf, "<td nowrap><a target=main class=link href=query?getepg&", &maxlen, &pos); 1121 tmpstr = oitoa(chnode->serviceid); 1122 ostrcatbig(&buf, tmpstr, &maxlen, &pos); 1123 buf2 = ostrcat("<td nowrap><a target=main class=link href=query?addrectimer&",tmpstr, 0, 0); 1124 buf2 = ostrcat(buf2, "&", 0, 0); 1125 free(tmpstr); tmpstr = NULL; 1126 ostrcatbig(&buf, "&", &maxlen, &pos); 1127 tmpstr = olutoa(chnode->transponderid); 1128 ostrcatbig(&buf, tmpstr, &maxlen, &pos); 1129 buf2 = ostrcat(buf2, tmpstr, 0, 0); 1130 buf2 = ostrcat(buf2, "&", 0, 0); 1131 free(tmpstr); tmpstr = NULL; 1132 ostrcatbig(&buf, "&", &maxlen, &pos); 1133 tmpstr = oitoa(epgnode->eventid); 1134 ostrcatbig(&buf, tmpstr, &maxlen, &pos); 1135 buf2 = ostrcat(buf2, tmpstr, 0, 0); 1136 buf2 = ostrcat(buf2, ">", 0, 0); 1137 free(tmpstr); tmpstr = NULL; 1138 ostrcatbig(&buf, ">", &maxlen, &pos); 1139 1140 loctime = olocaltime(&epgnode->starttime); 1141 if(loctime != NULL) 1003 1142 strftime(buf1, MINMALLOC, "%d.%m _ %H:%M __ ", loctime); 1004 1143 //strftime(buf1, MINMALLOC, "%H:%M -", loctime); 1005 free(loctime); loctime = NULL; 1006 //loctime = olocaltime(&epgnode->endtime); 1007 //if(loctime != NULL) 1008 // strftime(&buf1[7], MINMALLOC - 8, " %H:%M ", loctime); 1009 //free(loctime); loctime = NULL; 1010 ostrcatbig(&buf, buf1, &maxlen, &pos); 1011 ostrcatbig(&buf, " ", &maxlen, &pos); 1012 ostrcatbig(&buf, epgnode->title, &maxlen, &pos); 1013 if(epgnode->subtitle != NULL) 1014 { 1015 ostrcatbig(&buf, " (", &maxlen, &pos); 1016 ostrcatbig(&buf, epgnode->subtitle, &maxlen, &pos); 1017 ostrcatbig(&buf, ")", &maxlen, &pos); 1018 } 1019 ostrcatbig(&buf, "</a></td>", &maxlen, &pos); 1020 ostrcatbig(&buf, buf2, &maxlen, &pos); 1021 ostrcatbig(&buf, "<img border=0 width=16 height=16 src=img/timer.png alt=\"set timer\"/>", &maxlen, &pos); 1022 ostrcatbig(&buf, "</a></td></tr>", &maxlen, &pos); 1144 free(loctime); loctime = NULL; 1145 //loctime = olocaltime(&epgnode->endtime); 1146 //if(loctime != NULL) 1147 // strftime(&buf1[7], MINMALLOC - 8, " %H:%M ", loctime); 1148 //free(loctime); loctime = NULL; 1149 ostrcatbig(&buf, buf1, &maxlen, &pos); 1150 ostrcatbig(&buf, " ", &maxlen, &pos); 1151 ostrcatbig(&buf, epgnode->title, &maxlen, &pos); 1152 if(epgnode->subtitle != NULL) 1153 { 1154 ostrcatbig(&buf, " (", &maxlen, &pos); 1155 ostrcatbig(&buf, epgnode->subtitle, &maxlen, &pos); 1156 ostrcatbig(&buf, ")", &maxlen, &pos); 1157 } 1158 1159 ostrcatbig(&buf, "</a></td>", &maxlen, &pos); 1160 ostrcatbig(&buf, buf2, &maxlen, &pos); 1161 ostrcatbig(&buf, "<img border=0 width=16 height=16 src=img/timer.png alt=\"set timer\"/>", &maxlen, &pos); 1162 ostrcatbig(&buf, "</a></td></tr>", &maxlen, &pos); 1163 } 1164 else 1165 { 1166 buf = ostrcat(buf, epgnode->title, 1, 0); 1167 buf = ostrcat(buf, "#", 1, 0); 1168 buf = ostrcat(buf, olutoa(epgnode->starttime), 1, 1); 1169 buf = ostrcat(buf, "#", 1, 0); 1170 buf = ostrcat(buf, olutoa(epgnode->endtime), 1, 1); 1171 buf = ostrcat(buf, "#", 1, 0); 1172 buf = ostrcat(buf, epgnode->subtitle, 1, 0); 1173 buf = ostrcat(buf, "\n", 1, 0); 1174 } 1023 1175 1024 1176 epgnode = epgnode->next; … … 1026 1178 } 1027 1179 1028 webcreatetailbig(&buf, &maxlen, &pos, 0);1180 if(fmt == 0) webcreatetailbig(&buf, &maxlen, &pos, 0); 1029 1181 1030 1182 free(buf1); … … 1038 1190 } 1039 1191 1040 char* webgetgmultiepg(char* param )1192 char* webgetgmultiepg(char* param, int fmt) 1041 1193 { 1042 1194 int page = 1, i, line = 0, treffer = 0, maxlen = 0, pos = 0; … … 1205 1357 } 1206 1358 1207 void webgetshoot(char* param )1359 void webgetshoot(char* param, int fmt) 1208 1360 { 1209 1361 char* cmd = NULL, *tmpstr = NULL; … … 1231 1383 } 1232 1384 1233 char* webgetepgsearch(char* query, char* param )1385 char* webgetepgsearch(char* query, char* param, int fmt) 1234 1386 { 1235 1387 int line = 0, maxlen = 0, pos = 0, maxcount = 0, page = 1; … … 1269 1421 } 1270 1422 1271 webcreateheadbig(&buf, &maxlen, NULL, &pos, 0);1423 if(fmt == 0) webcreateheadbig(&buf, &maxlen, NULL, &pos, 0); 1272 1424 while(chnode != NULL) 1273 1425 { … … 1286 1438 } 1287 1439 1288 if( line== 0)1440 if(fmt == 0) 1289 1441 { 1290 ostrcatbig(&buf, "<tr class=line1>", &maxlen, &pos); 1291 line = 1; 1442 if(line == 0) 1443 { 1444 ostrcatbig(&buf, "<tr class=line1>", &maxlen, &pos); 1445 line = 1; 1446 } 1447 else 1448 { 1449 ostrcatbig(&buf, "<tr class=line2>", &maxlen, &pos); 1450 line = 0; 1451 } 1292 1452 } 1293 else 1453 1454 if(fmt == 0) 1294 1455 { 1295 ostrcatbig(&buf, "<tr class=line2>", &maxlen, &pos); 1296 line = 0; 1456 ostrcatbig(&buf, "<td nowrap><a target=main class=link href=query?getepg&", &maxlen, &pos); 1457 tmpstr = oitoa(chnode->serviceid); 1458 buf2 = ostrcat("<td nowrap><a target=main class=link href=query?addrectimer&", tmpstr, 0, 0); 1459 buf2 = ostrcat(buf2, "&", 0, 0); 1460 ostrcatbig(&buf, tmpstr, &maxlen, &pos); 1461 free(tmpstr); tmpstr = NULL; 1462 ostrcatbig(&buf, "&", &maxlen, &pos); 1463 tmpstr = olutoa(chnode->transponderid); 1464 ostrcatbig(&buf, tmpstr, &maxlen, &pos); 1465 buf2 = ostrcat(buf2, tmpstr, 0, 0); 1466 buf2 = ostrcat(buf2, "&", 0, 0); 1467 free(tmpstr); tmpstr = NULL; 1468 ostrcatbig(&buf, "&", &maxlen, &pos); 1469 tmpstr = oitoa(epgnode->eventid); 1470 ostrcatbig(&buf, tmpstr, &maxlen, &pos); 1471 buf2 = ostrcat(buf2, tmpstr, 0, 0); 1472 buf2 = ostrcat(buf2, ">", 0, 0); 1473 free(tmpstr); tmpstr = NULL; 1474 ostrcatbig(&buf, ">", &maxlen, &pos); 1297 1475 } 1298 1299 ostrcatbig(&buf, "<td nowrap><a target=main class=link href=query?getepg&", &maxlen, &pos);1300 tmpstr = oitoa(chnode->serviceid);1301 buf2 = ostrcat("<td nowrap><a target=main class=link href=query?addrectimer&",tmpstr, 0, 0);1302 buf2 = ostrcat(buf2, "&", 0, 0);1303 ostrcatbig(&buf, tmpstr, &maxlen, &pos);1304 free(tmpstr); tmpstr = NULL;1305 ostrcatbig(&buf, "&", &maxlen, &pos);1306 tmpstr = olutoa(chnode->transponderid);1307 ostrcatbig(&buf, tmpstr, &maxlen, &pos);1308 buf2 = ostrcat(buf2, tmpstr, 0, 0);1309 buf2 = ostrcat(buf2, "&", 0, 0);1310 free(tmpstr); tmpstr = NULL;1311 ostrcatbig(&buf, "&", &maxlen, &pos);1312 tmpstr = oitoa(epgnode->eventid);1313 ostrcatbig(&buf, tmpstr, &maxlen, &pos);1314 buf2 = ostrcat(buf2, tmpstr, 0, 0);1315 buf2 = ostrcat(buf2, ">", 0, 0);1316 free(tmpstr); tmpstr = NULL;1317 ostrcatbig(&buf, ">", &maxlen, &pos);1318 1476 1319 1477 loctime = olocaltime(&epgnode->starttime); … … 1336 1494 ostrcatbig(&buf, ")", &maxlen, &pos); 1337 1495 } 1338 ostrcatbig(&buf, "</a><br><font class=smalllabel1>", &maxlen, &pos); 1496 if(fmt == 0) 1497 ostrcatbig(&buf, "</a><br><font class=smalllabel1>", &maxlen, &pos); 1498 else 1499 ostrcatbig(&buf, "#", &maxlen, &pos); 1339 1500 ostrcatbig(&buf, epgnode->subtitle, &maxlen, &pos); 1340 ostrcatbig(&buf, "</font></td>", &maxlen, &pos); 1341 ostrcatbig(&buf, buf2, &maxlen, &pos); 1342 ostrcatbig(&buf, "<img border=0 width=16 height=16 src=img/timer.png alt=\"set timer\"/>", &maxlen, &pos); 1343 ostrcatbig(&buf, "</a></td></tr>", &maxlen, &pos); 1501 if(fmt == 0) 1502 { 1503 ostrcatbig(&buf, "</font></td>", &maxlen, &pos); 1504 ostrcatbig(&buf, buf2, &maxlen, &pos); 1505 ostrcatbig(&buf, "<img border=0 width=16 height=16 src=img/timer.png alt=\"set timer\"/>", &maxlen, &pos); 1506 ostrcatbig(&buf, "</a></td></tr>", &maxlen, &pos); 1507 } 1508 else 1509 ostrcatbig(&buf, "#", &maxlen, &pos); 1344 1510 } 1345 1511 epgnode = epgnode->next; … … 1349 1515 } 1350 1516 1351 if(maxcount > MAXHTMLLINE )1517 if(maxcount > MAXHTMLLINE && fmt == 0) 1352 1518 { 1353 1519 int i; … … 1373 1539 } 1374 1540 1375 webcreatetailbig(&buf, &maxlen, &pos, 0);1541 if(fmt == 0) webcreatetailbig(&buf, &maxlen, &pos, 0); 1376 1542 free(buf1); 1377 1543 return buf; … … 1383 1549 //flagbit 3: show stream icon 1384 1550 //flagbit 4: show websteam icon 1385 char* webgetfilelist(char* param, char* link, char* dellink, char* path, char* mask, int flag )1551 char* webgetfilelist(char* param, char* link, char* dellink, char* path, char* mask, int flag, int fmt) 1386 1552 { 1387 1553 char* buf = NULL, *tmppath = NULL, *tmpnr = NULL, *param1 = NULL; … … 1427 1593 createfilelist(webdir, filelist, 0); 1428 1594 1429 ostrcatbig(&buf, "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"><link rel=stylesheet type=text/css href=titan.css><script type=text/javascript src=titan.js></script></head><body class=body><center><table width=100%>", &maxlen, &pos);1595 if(fmt == 0) ostrcatbig(&buf, "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"><link rel=stylesheet type=text/css href=titan.css><script type=text/javascript src=titan.js></script></head><body class=body><center><table width=100%>", &maxlen, &pos); 1430 1596 1431 1597 node = filelist; … … 1441 1607 } 1442 1608 1443 if(line == 0) 1444 { 1445 ostrcatbig(&buf, "<tr class=line1>", &maxlen, &pos); 1446 line = 1; 1609 if(fmt == 0) 1610 { 1611 if(line == 0) 1612 { 1613 ostrcatbig(&buf, "<tr class=line1>", &maxlen, &pos); 1614 line = 1; 1615 } 1616 else 1617 { 1618 ostrcatbig(&buf, "<tr class=line2>", &maxlen, &pos); 1619 line = 0; 1620 } 1621 1622 ostrcatbig(&buf, "<td>", &maxlen, &pos); 1623 } 1624 if(node->input != NULL) //dir 1625 { 1626 if(fmt == 0) 1627 { 1628 ostrcatbig(&buf, "<img border=0 width=16 height=16 src=img/folder.png alt=Directory> <a class=link href=\"query?", &maxlen, &pos); 1629 ostrcatbig(&buf, link, &maxlen, &pos); 1630 ostrcatbig(&buf, "&", &maxlen, &pos); 1631 ostrcatbig(&buf, node->input, &maxlen, &pos); 1632 ostrcatbig(&buf, "\">", &maxlen, &pos); 1633 ostrcatbig(&buf, node->text, &maxlen, &pos); 1634 ostrcatbig(&buf, "</a><td> </td>", &maxlen, &pos); 1635 } 1636 else 1637 { 1638 ostrcatbig(&buf, node->text, &maxlen, &pos); 1639 ostrcatbig(&buf, "#0", &maxlen, &pos); 1640 ostrcatbig(&buf, "\n", &maxlen, &pos); 1641 } 1447 1642 } 1448 1643 else 1449 1644 { 1450 ostrcatbig(&buf, "<tr class=line2>", &maxlen, &pos); 1451 line = 0; 1452 } 1453 1454 ostrcatbig(&buf, "<td>", &maxlen, &pos); 1455 if(node->input != NULL) //dir 1456 { 1457 ostrcatbig(&buf, "<img border=0 width=16 height=16 src=img/folder.png alt=Directory> <a class=link href=\"query?", &maxlen, &pos); 1458 ostrcatbig(&buf, link, &maxlen, &pos); 1459 ostrcatbig(&buf, "&", &maxlen, &pos); 1460 ostrcatbig(&buf, node->input, &maxlen, &pos); 1461 ostrcatbig(&buf, "\">", &maxlen, &pos); 1462 ostrcatbig(&buf, node->text, &maxlen, &pos); 1463 ostrcatbig(&buf, "</a><td> </td>", &maxlen, &pos); 1464 } 1465 else 1466 { 1467 ostrcatbig(&buf, "<font class=label1>", &maxlen, &pos); 1468 ostrcatbig(&buf, node->text, &maxlen, &pos); 1469 ostrcatbig(&buf, "</font></td>", &maxlen, &pos); 1470 1471 ostrcatbig(&buf, "<td width=80 align=right>", &maxlen, &pos); 1472 //epg png 1473 if(checkbit(flag, 1) == 1) 1645 if(fmt == 0) 1474 1646 { 1475 ostrcatbig(&buf, "<a href=\"query?getmovieepg&", &maxlen, &pos); 1476 ostrcatbig(&buf, filelistpath->text, &maxlen, &pos); 1477 ostrcatbig(&buf, "/", &maxlen, &pos); 1647 ostrcatbig(&buf, "<font class=label1>", &maxlen, &pos); 1478 1648 ostrcatbig(&buf, node->text, &maxlen, &pos); 1479 ostrcatbig(&buf, "\">", &maxlen, &pos); 1480 ostrcatbig(&buf, "<img border=0 src=img/movieepg.png width=16 height=16 alt=EPG></a>", &maxlen, &pos); 1649 ostrcatbig(&buf, "</font></td>", &maxlen, &pos); 1650 1651 ostrcatbig(&buf, "<td width=80 align=right>", &maxlen, &pos); 1652 1653 //epg png 1654 if(checkbit(flag, 1) == 1) 1655 { 1656 ostrcatbig(&buf, "<a href=\"query?getmovieepg&", &maxlen, &pos); 1657 ostrcatbig(&buf, filelistpath->text, &maxlen, &pos); 1658 ostrcatbig(&buf, "/", &maxlen, &pos); 1659 ostrcatbig(&buf, node->text, &maxlen, &pos); 1660 ostrcatbig(&buf, "\">", &maxlen, &pos); 1661 ostrcatbig(&buf, "<img border=0 src=img/movieepg.png width=16 height=16 alt=EPG></a>", &maxlen, &pos); 1662 } 1663 //delete png 1664 if(checkbit(flag, 2) == 1) 1665 { 1666 ostrcatbig(&buf, "<img border=0 src=img/delete.png width=16 height=16 alt=Delete onclick='delquestion(\"", &maxlen, &pos); 1667 ostrcatbig(&buf, "query?", &maxlen, &pos); 1668 ostrcatbig(&buf, dellink, &maxlen, &pos); 1669 ostrcatbig(&buf, "&", &maxlen, &pos); 1670 ostrcatbig(&buf, filelistpath->text, &maxlen, &pos); 1671 ostrcatbig(&buf, "&", &maxlen, &pos); 1672 tmpnr = oitoa(page); 1673 ostrcatbig(&buf, tmpnr, &maxlen, &pos); 1674 free(tmpnr); tmpnr = NULL; 1675 ostrcatbig(&buf, "&", &maxlen, &pos); 1676 ostrcatbig(&buf, node->text, &maxlen, &pos); 1677 ostrcatbig(&buf, "\");'>", &maxlen, &pos); 1678 } 1679 //stream png 1680 if(checkbit(flag, 3) == 1) 1681 { 1682 ostrcatbig(&buf, "<a target=nothing href=\"query?getm3u&0,0,", &maxlen, &pos); 1683 ostrcatbig(&buf, filelistpath->text, &maxlen, &pos); 1684 ostrcatbig(&buf, "/", &maxlen, &pos); 1685 ostrcatbig(&buf, node->text, &maxlen, &pos); 1686 ostrcatbig(&buf, "\">", &maxlen, &pos); 1687 1688 ostrcatbig(&buf, "<img border=0 src=img/stream.png width=16 height=16 alt=Stream></a>", &maxlen, &pos); 1689 } 1690 //webstream png 1691 if(checkbit(flag, 4) == 1) 1692 { 1693 ostrcatbig(&buf, "<a target=_blank href=\"query?getvideo&0,0,", &maxlen, &pos); 1694 ostrcatbig(&buf, filelistpath->text, &maxlen, &pos); 1695 ostrcatbig(&buf, "/", &maxlen, &pos); 1696 ostrcatbig(&buf, node->text, &maxlen, &pos); 1697 ostrcatbig(&buf, "\">", &maxlen, &pos); 1698 1699 ostrcatbig(&buf, "<img border=0 src=img/webstream.png width=16 height=16 alt=WebStream></a>", &maxlen, &pos); 1700 1701 ostrcatbig(&buf, "<a target=_blank href=\"", &maxlen, &pos); 1702 ostrcatbig(&buf, filelistpath->text, &maxlen, &pos); 1703 ostrcatbig(&buf, "/", &maxlen, &pos); 1704 ostrcatbig(&buf, node->text, &maxlen, &pos); 1705 ostrcatbig(&buf, "\">", &maxlen, &pos); 1706 1707 ostrcatbig(&buf, "<img border=0 src=img/icon_restart.png width=16 height=16 alt=Download></a>", &maxlen, &pos); 1708 } 1481 1709 } 1482 //delete png 1483 if(checkbit(flag, 2) == 1) 1710 else 1484 1711 { 1485 ostrcatbig(&buf, "<img border=0 src=img/delete.png width=16 height=16 alt=Delete onclick='delquestion(\"", &maxlen, &pos);1486 ostrcatbig(&buf, "query?", &maxlen, &pos);1487 ostrcatbig(&buf, dellink, &maxlen, &pos);1488 ostrcatbig(&buf, "&", &maxlen, &pos);1489 ostrcatbig(&buf, filelistpath->text, &maxlen, &pos);1490 ostrcatbig(&buf, "&", &maxlen, &pos);1491 tmpnr = oitoa(page);1492 ostrcatbig(&buf, tmpnr, &maxlen, &pos);1493 free(tmpnr); tmpnr = NULL;1494 ostrcatbig(&buf, "&", &maxlen, &pos);1495 1712 ostrcatbig(&buf, node->text, &maxlen, &pos); 1496 ostrcatbig(&buf, "\");'>", &maxlen, &pos); 1713 ostrcatbig(&buf, "#1", &maxlen, &pos); 1714 ostrcatbig(&buf, "\n", &maxlen, &pos); 1497 1715 } 1498 //stream png 1499 if(checkbit(flag, 3) == 1) 1500 { 1501 ostrcatbig(&buf, "<a target=nothing href=\"query?getm3u&0,0,", &maxlen, &pos); 1502 ostrcatbig(&buf, filelistpath->text, &maxlen, &pos); 1503 ostrcatbig(&buf, "/", &maxlen, &pos); 1504 ostrcatbig(&buf, node->text, &maxlen, &pos); 1505 ostrcatbig(&buf, "\">", &maxlen, &pos); 1506 1507 ostrcatbig(&buf, "<img border=0 src=img/stream.png width=16 height=16 alt=Stream></a>", &maxlen, &pos); 1508 } 1509 //webstream png 1510 if(checkbit(flag, 4) == 1) 1511 { 1512 ostrcatbig(&buf, "<a target=_blank href=\"query?getvideo&0,0,", &maxlen, &pos); 1513 ostrcatbig(&buf, filelistpath->text, &maxlen, &pos); 1514 ostrcatbig(&buf, "/", &maxlen, &pos); 1515 ostrcatbig(&buf, node->text, &maxlen, &pos); 1516 ostrcatbig(&buf, "\">", &maxlen, &pos); 1517 1518 ostrcatbig(&buf, "<img border=0 src=img/webstream.png width=16 height=16 alt=WebStream></a>", &maxlen, &pos); 1519 // 1520 // 1521 ostrcatbig(&buf, "<a target=_blank href=\"", &maxlen, &pos); 1522 ostrcatbig(&buf, filelistpath->text, &maxlen, &pos); 1523 ostrcatbig(&buf, "/", &maxlen, &pos); 1524 ostrcatbig(&buf, node->text, &maxlen, &pos); 1525 ostrcatbig(&buf, "\">", &maxlen, &pos); 1526 1527 ostrcatbig(&buf, "<img border=0 src=img/icon_restart.png width=16 height=16 alt=Download></a>", &maxlen, &pos); 1528 } 1529 } 1530 ostrcatbig(&buf, "</td>", &maxlen, &pos); 1531 ostrcatbig(&buf, "</tr>", &maxlen, &pos); 1716 } 1717 if(fmt == 0) 1718 { 1719 ostrcatbig(&buf, "</td>", &maxlen, &pos); 1720 ostrcatbig(&buf, "</tr>", &maxlen, &pos); 1721 } 1532 1722 } 1533 1723 … … 1566 1756 } 1567 1757 1568 webcreatetailbig(&buf, &maxlen, &pos, 0);1758 if(fmt == 0) webcreatetailbig(&buf, &maxlen, &pos, 0); 1569 1759 delmarkedscreennodes(webdir, FILELISTDELMARK); 1570 1760 return buf; 1571 1761 } 1572 1762 1573 char* webgetmovieepg(char* param, char* path, int flag )1763 char* webgetmovieepg(char* param, char* path, int flag, int fmt) 1574 1764 { 1575 1765 char* buf = NULL, *tmpstr = NULL; … … 1579 1769 FILE* fd = NULL; 1580 1770 1581 webcreateheadbig(&buf, &maxlen, NULL, &pos, 0); 1582 ostrcatbig(&buf, "<tr><td><font class=biglabel>", &maxlen, &pos); 1771 if(fmt == 0) 1772 { 1773 webcreateheadbig(&buf, &maxlen, NULL, &pos, 0); 1774 ostrcatbig(&buf, "<tr><td><font class=biglabel>", &maxlen, &pos); 1775 } 1583 1776 1584 1777 if(flag == 1) … … 1601 1794 { 1602 1795 c = fgetc(fd); 1603 if( c == '\n')1796 if(fmt == 0 && c == '\n') 1604 1797 { 1605 1798 if(first == 1) … … 1611 1804 continue; 1612 1805 } 1613 sprintf(tstr, "%c", c); 1614 ostrcatbig(&buf, tstr, &maxlen, &pos); 1806 if(c != EOF) 1807 { 1808 sprintf(tstr, "%c", c); 1809 ostrcatbig(&buf, tstr, &maxlen, &pos); 1810 } 1615 1811 } 1616 1812 fclose(fd); 1617 1813 } 1618 ostrcatbig(&buf, "</font></td></tr>", &maxlen, &pos); 1619 1620 webcreatetailbig(&buf, &maxlen, &pos, 0); 1814 1815 if(fmt == 0) 1816 { 1817 ostrcatbig(&buf, "</font></td></tr>", &maxlen, &pos); 1818 webcreatetailbig(&buf, &maxlen, &pos, 0); 1819 } 1621 1820 1622 1821 free(tmpstr); tmpstr = NULL; … … 1624 1823 } 1625 1824 1626 char* webdelfile(char* param, char* link, char* dellink, char* path, char* mask, int flag )1825 char* webdelfile(char* param, char* link, char* dellink, char* path, char* mask, int flag, int fmt) 1627 1826 { 1628 1827 char* buf = NULL, *param1 = NULL, *param2 = NULL, *tmpparam = NULL; … … 1657 1856 tmpparam = ostrcat(tmpparam, param1, 1, 0); 1658 1857 1659 buf = webgetfilelist(tmpparam, link, dellink, path, mask, flag );1858 buf = webgetfilelist(tmpparam, link, dellink, path, mask, flag, fmt); 1660 1859 free(tmpparam); tmpparam = NULL; 1661 1860 return buf; 1662 1861 } 1663 1862 1664 void websendrc(char* param )1863 void websendrc(char* param, int fmt) 1665 1864 { 1666 1865 int rccode = 0; … … 1672 1871 //flag 0: get aktiv timer 1673 1872 //flag 1: get old timer 1674 char* webgetrectimer(char* param, int flag )1873 char* webgetrectimer(char* param, int flag, int fmt) 1675 1874 { 1676 1875 char* buf = NULL, *buf1 = NULL; … … 1687 1886 } 1688 1887 1689 ostrcatbig(&buf, "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"><link rel=stylesheet type=text/css href=titan.css><script type=text/javascript src=titan.js></script></head><body class=body><center><table width=100%>", &maxlen, &pos);1888 if(fmt == 0) ostrcatbig(&buf, "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"><link rel=stylesheet type=text/css href=titan.css><script type=text/javascript src=titan.js></script></head><body class=body><center><table width=100%>", &maxlen, &pos); 1690 1889 1691 1890 while(node != NULL) … … 1696 1895 continue; 1697 1896 } 1698 if(line == 0) 1699 { 1700 ostrcatbig(&buf, "<tr class=line1><td>", &maxlen, &pos); 1701 line = 1; 1702 } 1703 else 1704 { 1705 ostrcatbig(&buf, "<tr class=line2><td>", &maxlen, &pos); 1706 line = 0; 1707 } 1708 1709 loctime = olocaltime(&node->begin); 1710 if(loctime != NULL) 1711 strftime(buf1, MINMALLOC, "%d-%m-%Y %H:%M -", loctime); 1712 free(loctime); loctime = NULL; 1713 loctime = olocaltime(&node->end); 1714 if(loctime != NULL) 1715 strftime(&buf1[18], MINMALLOC - 19, " %H:%M ", loctime); 1716 free(loctime); loctime = NULL; 1717 1718 ostrcatbig(&buf, "<font class=label1>", &maxlen, &pos); 1719 ostrcatbig(&buf, buf1, &maxlen, &pos); 1720 1721 ostrcatbig(&buf, " (", &maxlen, &pos); 1722 if(node->justplay == 0) 1723 ostrcatbig(&buf, "rec - ", &maxlen, &pos); 1724 else 1725 ostrcatbig(&buf, "switch - ", &maxlen, &pos); 1726 if(node->repeate == 0) 1727 ostrcatbig(&buf, "once", &maxlen, &pos); 1728 else 1729 ostrcatbig(&buf, "repeate", &maxlen, &pos); 1730 1731 ostrcatbig(&buf, ")</font><br><font class=smalllabel1>", &maxlen, &pos); 1732 if(node->name == NULL || strlen(node->name) == 0) 1733 ostrcatbig(&buf, "---", &maxlen, &pos); 1734 else 1735 ostrcatbig(&buf, node->name, &maxlen, &pos); 1736 1737 chnode = getchannel(node->serviceid, node->transponderid); 1738 if(chnode != NULL) 1739 { 1897 if(fmt == 0) 1898 { 1899 if(line == 0) 1900 { 1901 ostrcatbig(&buf, "<tr class=line1><td>", &maxlen, &pos); 1902 line = 1; 1903 } 1904 else 1905 { 1906 ostrcatbig(&buf, "<tr class=line2><td>", &maxlen, &pos); 1907 line = 0; 1908 } 1909 1910 loctime = olocaltime(&node->begin); 1911 if(loctime != NULL) 1912 strftime(buf1, MINMALLOC, "%d-%m-%Y %H:%M -", loctime); 1913 free(loctime); loctime = NULL; 1914 loctime = olocaltime(&node->end); 1915 if(loctime != NULL) 1916 strftime(&buf1[18], MINMALLOC - 19, " %H:%M ", loctime); 1917 free(loctime); loctime = NULL; 1918 1919 ostrcatbig(&buf, "<font class=label1>", &maxlen, &pos); 1920 ostrcatbig(&buf, buf1, &maxlen, &pos); 1921 1740 1922 ostrcatbig(&buf, " (", &maxlen, &pos); 1741 ostrcatbig(&buf, chnode->name, &maxlen, &pos); 1742 ostrcatbig(&buf, ")", &maxlen, &pos); 1743 } 1744 ostrcatbig(&buf, "<br>", &maxlen, &pos); 1745 1746 if(node->status == 0) 1747 ostrcatbig(&buf, "waiting", &maxlen, &pos); 1748 else if(node->status == 1) 1749 ostrcatbig(&buf, "running", &maxlen, &pos); 1750 else if(node->status == 2) 1751 ostrcatbig(&buf, "succes", &maxlen, &pos); 1752 else if(node->status == 3) 1753 { 1754 ostrcatbig(&buf, "error", &maxlen, &pos); 1755 if(node->errstr != NULL && strlen(node->errstr) > 0) 1923 if(node->justplay == 0) 1924 ostrcatbig(&buf, "rec - ", &maxlen, &pos); 1925 else 1926 ostrcatbig(&buf, "switch - ", &maxlen, &pos); 1927 if(node->repeate == 0) 1928 ostrcatbig(&buf, "once", &maxlen, &pos); 1929 else 1930 ostrcatbig(&buf, "repeate", &maxlen, &pos); 1931 1932 ostrcatbig(&buf, ")</font><br><font class=smalllabel1>", &maxlen, &pos); 1933 if(node->name == NULL || strlen(node->name) == 0) 1934 ostrcatbig(&buf, "---", &maxlen, &pos); 1935 else 1936 ostrcatbig(&buf, node->name, &maxlen, &pos); 1937 1938 chnode = getchannel(node->serviceid, node->transponderid); 1939 if(chnode != NULL) 1756 1940 { 1757 1941 ostrcatbig(&buf, " (", &maxlen, &pos); 1758 ostrcatbig(&buf, node->errstr, &maxlen, &pos);1942 ostrcatbig(&buf, chnode->name, &maxlen, &pos); 1759 1943 ostrcatbig(&buf, ")", &maxlen, &pos); 1760 1944 } 1761 } 1762 1763 ostrcatbig(&buf, "</font>", &maxlen, &pos); 1764 1765 if(flag == 0) 1766 { 1767 ostrcatbig(&buf, "</td><td width=40 align=right>", &maxlen, &pos); 1768 1769 //edit png 1770 ostrcatbig(&buf, "<a target=main href=\"query?editrectimer", &maxlen, &pos); 1771 ostrcatbig(&buf, "&", &maxlen, &pos); 1772 ostrcatbig(&buf, node->timestamp, &maxlen, &pos); 1773 ostrcatbig(&buf, "\">", &maxlen, &pos); 1774 1775 ostrcatbig(&buf, "<img border=0 src=img/edit.png width=16 height=16 alt=\"Edit Timer\"></a>", &maxlen, &pos); 1776 1777 //delete png 1778 ostrcatbig(&buf, "<img border=0 src=img/delete.png width=16 height=16 alt=Delete onclick='delquestion(\"", &maxlen, &pos); 1779 ostrcatbig(&buf, "query?delrectimer", &maxlen, &pos); 1780 ostrcatbig(&buf, "&", &maxlen, &pos); 1781 ostrcatbig(&buf, node->timestamp, &maxlen, &pos); 1782 //ostrcatbig(&buf, filelistpath->text, &maxlen, &pos); 1783 //ostrcatbig(&buf, "&", &maxlen, &pos); 1784 //tmpnr = oitoa(page); 1785 //ostrcatbig(&buf, tmpnr, &maxlen, &pos); 1786 //free(tmpnr); tmpnr = NULL; 1787 //ostrcatbig(&buf, "&", &maxlen, &pos); 1788 //ostrcatbig(&buf, node->text, &maxlen, &pos); 1789 ostrcatbig(&buf, "\");'>", &maxlen, &pos); 1790 } 1791 1792 ostrcatbig(&buf, "</td></tr>", &maxlen, &pos); 1945 ostrcatbig(&buf, "<br>", &maxlen, &pos); 1946 1947 if(node->status == 0) 1948 ostrcatbig(&buf, "waiting", &maxlen, &pos); 1949 else if(node->status == 1) 1950 ostrcatbig(&buf, "running", &maxlen, &pos); 1951 else if(node->status == 2) 1952 ostrcatbig(&buf, "succes", &maxlen, &pos); 1953 else if(node->status == 3) 1954 { 1955 ostrcatbig(&buf, "error", &maxlen, &pos); 1956 if(node->errstr != NULL && strlen(node->errstr) > 0) 1957 { 1958 ostrcatbig(&buf, " (", &maxlen, &pos); 1959 ostrcatbig(&buf, node->errstr, &maxlen, &pos); 1960 ostrcatbig(&buf, ")", &maxlen, &pos); 1961 } 1962 } 1963 1964 ostrcatbig(&buf, "</font>", &maxlen, &pos); 1965 1966 if(flag == 0) 1967 { 1968 ostrcatbig(&buf, "</td><td width=40 align=right>", &maxlen, &pos); 1969 1970 //edit png 1971 ostrcatbig(&buf, "<a target=main href=\"query?editrectimer", &maxlen, &pos); 1972 ostrcatbig(&buf, "&", &maxlen, &pos); 1973 ostrcatbig(&buf, node->timestamp, &maxlen, &pos); 1974 ostrcatbig(&buf, "\">", &maxlen, &pos); 1975 1976 ostrcatbig(&buf, "<img border=0 src=img/edit.png width=16 height=16 alt=\"Edit Timer\"></a>", &maxlen, &pos); 1977 1978 //delete png 1979 ostrcatbig(&buf, "<img border=0 src=img/delete.png width=16 height=16 alt=Delete onclick='delquestion(\"", &maxlen, &pos); 1980 ostrcatbig(&buf, "query?delrectimer", &maxlen, &pos); 1981 ostrcatbig(&buf, "&", &maxlen, &pos); 1982 ostrcatbig(&buf, node->timestamp, &maxlen, &pos); 1983 //ostrcatbig(&buf, filelistpath->text, &maxlen, &pos); 1984 //ostrcatbig(&buf, "&", &maxlen, &pos); 1985 //tmpnr = oitoa(page); 1986 //ostrcatbig(&buf, tmpnr, &maxlen, &pos); 1987 //free(tmpnr); tmpnr = NULL; 1988 //ostrcatbig(&buf, "&", &maxlen, &pos); 1989 //ostrcatbig(&buf, node->text, &maxlen, &pos); 1990 ostrcatbig(&buf, "\");'>", &maxlen, &pos); 1991 } 1992 1993 ostrcatbig(&buf, "</td></tr>", &maxlen, &pos); 1994 } 1995 else 1996 { 1997 buf = ostrcat(buf, olutoa(node->begin), 1, 1); 1998 buf = ostrcat(buf, "#", 1, 0); 1999 buf = ostrcat(buf, olutoa(node->end), 1, 1); 2000 buf = ostrcat(buf, "#", 1, 0); 2001 buf = ostrcat(buf, oitoa(node->justplay), 1, 1); 2002 buf = ostrcat(buf, "#", 1, 0); 2003 buf = ostrcat(buf, oitoa(node->repeate), 1, 1); 2004 buf = ostrcat(buf, "#", 1, 0); 2005 buf = ostrcat(buf, node->name, 1, 0); 2006 buf = ostrcat(buf, "#", 1, 0); 2007 buf = ostrcat(buf, oitoa(node->serviceid), 1, 1); 2008 buf = ostrcat(buf, "#", 1, 0); 2009 buf = ostrcat(buf, olutoa(node->transponderid), 1, 1); 2010 buf = ostrcat(buf, "#", 1, 0); 2011 buf = ostrcat(buf, oitoa(node->status), 1, 1); 2012 buf = ostrcat(buf, "#", 1, 0); 2013 buf = ostrcat(buf, node->errstr, 1, 0); 2014 buf = ostrcat(buf, "#", 1, 0); 2015 buf = ostrcat(buf, node->timestamp, 1, 1); 2016 buf = ostrcat(buf, "\n", 1, 0); 2017 } 1793 2018 1794 2019 node = node->next; 1795 2020 } 1796 2021 1797 webcreatetailbig(&buf, &maxlen, &pos, 0);2022 if(fmt == 0) webcreatetailbig(&buf, &maxlen, &pos, 0); 1798 2023 1799 2024 free(buf1); … … 1801 2026 } 1802 2027 1803 char* webaddrectimer(char* param )2028 char* webaddrectimer(char* param, int fmt) 1804 2029 { 1805 2030 char* buf = NULL, *buf1 = NULL, *buf2 = NULL, *param1 = NULL, *param2 = NULL; … … 1895 2120 } 1896 2121 1897 char* webrectimersend(char* param )2122 char* webrectimersend(char* param, int fmt) 1898 2123 { 1899 2124 char* buf = NULL, *string = NULL, *name = NULL, *begin = NULL, *end = NULL, *type = NULL, *anode = NULL, *channelname = NULL, *sid = NULL, *tid = NULL, *ext = NULL; … … 2065 2290 2066 2291 if(ext == NULL) 2067 buf = webgetrectimer(NULL, 0 );2292 buf = webgetrectimer(NULL, 0, fmt); 2068 2293 else 2069 2294 { … … 2078 2303 } 2079 2304 2080 char* webeditrectimer(char* param )2305 char* webeditrectimer(char* param, int fmt) 2081 2306 { 2082 2307 char* buf = NULL, *buf1 = NULL, *buf2 = NULL; … … 2160 2385 } 2161 2386 2162 char* webdelrectimer(char* param )2387 char* webdelrectimer(char* param, int fmt) 2163 2388 { 2164 2389 char* buf = NULL, *string = NULL, *timerid = NULL; … … 2199 2424 buf = ostrcat(buf, "ok -> timer deleted", 1, 0); 2200 2425 else 2201 buf = webgetrectimer(NULL, 0 );2426 buf = webgetrectimer(NULL, 0, fmt); 2202 2427 2203 2428 return buf;
Note: See TracChangeset
for help on using the changeset viewer.