static void webmain_real()
{
glocal string document;
glocal string user;
glocal CONNECT_INFO con;
glocal.con.port = "/dev/bod.sock";
glocal.con.secret = util_readsecret();
("/etc/bolixonode.conf",true);
if (strncmp(line,"node=",5)==0){
util_setnodeurl(line+5);
}
return 0;
const char *pt = w_image.c_str();
if (*pt == '/') pt++;
const char *ptuser = pt;
pt = strchr(pt,'/');
bool image = true;
if (pt == NULL){
glocal.user = ptuser;
image = false;
}else if (strstr(pt,".html")!=NULL){
glocal.user = string (ptuser,pt-ptuser);
glocal.document = pt+1;
image = false;
}
if (!image){
glocal bool exist = false;
glocal bool pubdir = false;
glocal string website;
glocal string interest;
(glocal.con,glocal.user);
glocal.exist = exist;
glocal.pubdir = pubdir;
glocal.website = website;
glocal.interest = interest;
if (!glocal.exist){
tlmpweb_title (glocal.user.c_str());
util_defstyles();
DIV f; f.dispflex().flowcol().print();
DIV o; o.flexfixe().print();
{
DIV dd; dd.sfloat("right").print();
/-
}
o.flexfixe().print();
DIV d; d.borderradius(5).border(1,"black").marginauto().w(50).paddings(20,20).vpaddings(20,20).vmargins(50,0).print();
/-
htmlprintf (MSG_U(E_NOPUBLICPAGE,"No public page for user %s"),glocal.user.c_str());
/-
/-#I_CHECKBOLIXODIR You may want to do a search on the
/-
/-#I_DIRECTORY Bolixo.org directory
/-
}else{
webtable_ctrloutput();
();
();
glocal vector *msgs = &msgs;
glocal int ret = -1;
(glocal.con,glocal.user,offset,nb);
if (success){
glocal.ret = 0;
glocal.msgs->clear();
for (auto &m:messages) glocal.msgs->push_back(m);
}
return glocal.ret;
glocal int ret = -1;
glocal vector *files = &files;
(glocal.con,glocal.user,string_f("/project%s",path.ptr),offset,nb);
if (success){
glocal.ret = 0;
glocal.files->clear();
for (auto &f:files) glocal.files->push_back(f);
}
return glocal.ret;
glocal int ret = -1;
glocal BOB_TYPE *content = &content;
(glocal.con,glocal.user,string_f("/project/%s",path.ptr),0);
if (success){
glocal.ret = 0;
*glocal.content = content;
}
return glocal.ret;
string tmp = util_flipspaces(modified.ptr);
const char *modified_ptr = tmp.c_str();
if (is_image){
const char *slash = name.ptr[0] == '/' ? "" : "/";
return string_f("/public/%s/project%s%s?mod=%s",glocal.user.c_str(),slash,name.ptr,modified_ptr);
}else{
return string_f("/public/%s?file=%s&mod=%s",glocal.user.c_str(),name.ptr,modified_ptr);
}
return string_f("/public/%s/msg/%s?mod=%s",glocal.user.c_str(),name.ptr,modified.ptr);
("/etc/bolixonode.conf",true);
//if (strncmp(line,"node=",5)==0) nodename = line+5;
if (strncmp(line,"dirserver=",10)==0) util_setdirserver(line+10);
//if (strncmp(line,"org=",4)==0) org = line+4;
return 0;
tlmpweb_title (glocal.user.c_str());
//tlmpweb_setbaseurl(string_f("/Public/%s",glocal.user.c_str()));
util_defstyles();
?>
tlmpweb_body ("white",NULL);
// These DIV are there so the layout is properly computed by the javascript fixsize (created by util_endscript())
DIV dm("","main"); dm.w(100).print();
DIV dh("","head"); dh.print();
dh.end();
DIV db("tabs","body"); db.w(100).print();
FORM_HIDDEN t(w_image);
public_display (*this,glocal.con,glocal.user,glocal.pubdir,glocal.website,glocal.interest);
if (util_sendpublicfile(glocal.con,name)==-1){
tlmpweb_httpnotfound();
}
util_endscript(string_f("image=%s",glocal.user.c_str()));
}
}else{
if (util_sendpublicfile(glocal.con,w_image.c_str())==-1){
tlmpweb_httpnotfound();
}
}
}