Roxen.git / server / config_interface / dbs / edit_group.pike

version» Context lines:

Roxen.git/server/config_interface/dbs/edit_group.pike:5:   #define _(X,Y) _STR_LOCALE("roxen_config",X,Y)      #define VERIFY(X) do { \    if( !id->variables["yes.x"] ) \    { \    return \    ("<table><tr><td colspan='2'>\n"+ \    sprintf((string)(X), group)+ \    "</td><tr><td><input type=hidden name=action value='&form.action;' />"\    "<submit-gbutton2 name='yes'>"+_(0,"Yes")+"</submit-gbutton2></td>\n"\ -  "<td align=right><a href="+Roxen.html_encode_string(id->not_query)+\ +  "<td align=right><a href='"+Roxen.html_encode_string(id->not_query)+\    "?group="+\ -  Roxen.html_encode_string(id->variables->group)+"><gbutton> "+\ +  Roxen.html_encode_string(id->variables->group)+"&amp;&usr.set-wiz-id;'><gbutton> "+\    _(0,"No")+" </gbutton></a></td>\n</table>\n"); \    } \   } while(0)      #define CU_AUTH id->misc->config_user->auth      string trim_sl( string x )   {    while( strlen(x) && x[-1] == '/' )    x = x[..strlen(x)-2];
Roxen.git/server/config_interface/dbs/edit_group.pike:96:       res += sprintf("<font size=+1><b>"+_(434,"Databases in the group %s")+    "</b></font><br />", c->lname );       array groups = DBManager.group_dbs( id->variables->group );    res += "<dl>\n";    if( sizeof(groups) )    foreach( groups, string d )    {    res += "<dt><b>"+ -  (view_mode ? "" : "<a href=browser.pike?db="+d+">")+d+ +  (view_mode ? "" : "<a href='browser.pike?db="+d+"&amp;&usr.set-wiz-id;'>")+d+    (view_mode ? "" : "</a>")+    "</b>";    if( string cm = DBManager.module_table_info( d, "" )->comment )    res += "<dd>"+cm+"</dd>";    res += "</dt>\n";    }    else    res += _(312,"(none)");    res += "</dl>\n";       if (!view_mode)    {    string button;    if ( sizeof(DBManager.group_dbs(id->variables->group)) )    button = sprintf("<gbutton textcolor='#BEC2CB'>%s</gbutton>",    _(352, "Delete group"));    else -  button = sprintf("<a href='%s?group=%s&action=%s'><gbutton>%s</gbutton></a>", +  button = sprintf("<a href='%s?group=%s&amp;action=%s&amp;&usr.set-wiz-id;'><gbutton>%s</gbutton></a>",    id->not_query, id->variables->group, "delete",    _(352, "Delete group"));    res += "<br />"+button;    }       return res + "\n</blockquote></st-page></content></tmpl>";   }         mixed delete_group( string group, RequestID id )   {    if( sizeof(DBManager.group_dbs( group )) )    return (string)_(353, "You can not delete this group because it is not empty.");    string msg = (string)_(354, "Are you sure you want to delete the group %s?");    VERIFY(msg);       DBManager.delete_group( group );    return Roxen.http_redirect( "/dbs/", id );   }