/*
* Server functions which handle file transfers and room directories.
*
- * Copyright (c) 1987-2015 by the citadel.org team
+ * Copyright (c) 1987-2016 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
char filename[PATH_MAX];
char pathname[PATH_MAX];
char MimeTestBuf[32];
- int which_floor;
int a;
int rv;
return;
}
- if (!strcasecmp(filename, "_floorpic_")) {
- which_floor = extract_int(cmdbuf, 1);
- snprintf(pathname, sizeof pathname, "%s/floor.%d", ctdl_image_dir, which_floor);
- }
- else if (!strcasecmp(filename, "_roompic_")) {
+ if (!strcasecmp(filename, "_roompic_")) {
assoc_file_name(pathname, sizeof pathname, &CC->room, ctdl_image_dir);
}
else {
{
int is_this_for_real;
char basenm[256];
- int which_floor;
int a;
if (num_parms(cmdbuf) < 2) {
basenm);
}
- if ((!strcasecmp(basenm, "_floorpic_"))
- && (CC->user.axlevel >= AxAideU)) {
- which_floor = extract_int(cmdbuf, 2);
- snprintf(CC->upl_path, sizeof CC->upl_path,
- "%s/floor.%d.gif",
- ctdl_image_dir,
- which_floor);
- }
-
if ((!strcasecmp(basenm, "_roompic_")) && (is_room_aide())) {
assoc_file_name(CC->upl_path, sizeof CC->upl_path, &CC->room, ctdl_image_dir);
}
# cmd=44,0,&.,&Enter,file using &Zmodem
#
# Command 57 is the local-file-upload command for users with their own
-# copy of the clientware. Commands 72-74 are for image uploads.
+# copy of the clientware. Commands 72-73 are for image uploads.
#
#cmd=57,0,&.,&Enter,&File
#cmd=72,0,&.,&Enter,&Image,user &Picture
#cmd=73,0,&.,&Enter,&Image,&Room banner
-#cmd=74,0,&.,&Enter,&Image,&Floor label
#
cmd=41,0,&.,&Enter,re&Gistration
cmd=4,0,&.,&Enter,&Message
case 73:
cli_image_upload(ipc, "_roompic_");
break;
-
- case 74:
- snprintf(aaa, sizeof aaa, "_floorpic_|%d", curr_floor);
- cli_image_upload(ipc, aaa);
- break;
-
case 75:
enternew(ipc, "roomname", aaa, 20);
r = CtdlIPCChangeRoomname(ipc, aaa, bbb);
display_graphics_upload("editgoodbuyepic");
}
-void display_editfloorpic(void) {
- StrBuf *PicAction;
-
- PicAction = NewStrBuf();
- StrBufPrintf(PicAction, "_floorpic_|%s", bstr("which_floor"));
- putbstr("__WHICHPIC", PicAction);
- putbstr("__PICDESC", NewStrBufPlain(_("the icon for this floor"), -1));
- putbstr("__UPLURL", NewStrBufPlain(HKEY("editfloorpic")));
- display_graphics_upload("editfloorpic");
-}
-
void editroompic(void) {
char buf[SIZ];
snprintf(buf, SIZ, "_roompic_|%s",
do_graphics_upload(buf);
}
-void editfloorpic(void){
- char buf[SIZ];
- snprintf(buf, SIZ, "_floorpic_|%s",
- bstr("which_floor"));
- do_graphics_upload(buf);
-}
-
void
InitModule_GRAPHICS
(void)
WebcitAddUrlHandler(HKEY("edithellopic"), "", 0, edithellopic, 0);
WebcitAddUrlHandler(HKEY("display_editgoodbuye"), "", 0, display_editgoodbyepic, 0);
WebcitAddUrlHandler(HKEY("editgoodbuyepic"), "", 0, editgoodbuyepic, 0);
- WebcitAddUrlHandler(HKEY("display_editfloorpic"), "", 0, display_editfloorpic, 0);
- WebcitAddUrlHandler(HKEY("editfloorpic"), "", 0, editfloorpic, 0);
}
<td>
<a href="delete_floor?floornum=<?FLOOR:ID>" style="font-size: -1"><?_("(delete floor)")></a><br>
<??("X",20)>
- <a href="display_editfloorpic?which_floor=<?FLOOR:ID>" style="font-size: -1"><?_("(edit graphic)")></a>
</td>
</tr>
</table>