Loading plugins/media/icon.webp.h +59 −101 Original line number Diff line number Diff line #define icondatalen 397 #define icondatalen 464 const unsigned char icondata[icondatalen] = { 0x52, 0x49, 0x46, 0x46, 0xc8, 0x01, 0x00, 0x00, 0x57, 0x45, 0x42, 0x50, 0x56, 0x50, 0x38, 0x4c, 0xbc, 0x01, 0x00, 0x00, 0x2f, 0x1b, 0xc0, 0x06, 0x10, 0x35, 0x40, 0x6c, 0xdb, 0x46, 0x90, 0x94, 0x5a, 0x0f, 0xcb, 0x6f, 0x63, 0x7b, 0x9f, 0xc9, 0xce, 0xee, 0x77, 0xe0, 0x44, 0xc8, 0xb5, 0x6d, 0xeb, 0xd8, 0xb3, 0x13, 0xa3, 0x73, 0x67, 0xdb, 0x36, 0x2f, 0xc0, 0xec, 0xf8, 0x22, 0x6a, 0x33, 0x72, 0x03, 0xb6, 0x9d, 0xca, 0xec, 0xf4, 0xc6, 0x49, 0x67, 0xdb, 0x76, 0xf2, 0x1b, 0x0f, 0x15, 0xb8, 0x6d, 0xa3, 0xa4, 0xd2, 0x31, 0x0e, 0x3e, 0xc1, 0xc8, 0x06, 0x82, 0x05, 0x82, 0x07, 0xf1, 0x1f, 0x19, 0x38, 0xf3, 0x28, 0x33, 0xe3, 0x4c, 0x52, 0xc1, 0x20, 0xf8, 0x57, 0x61, 0x06, 0x0b, 0x88, 0x28, 0x9e, 0x60, 0xbd, 0x3c, 0x3c, 0xa0, 0x61, 0xa2, 0x40, 0xce, 0x2a, 0xbc, 0x9b, 0x36, 0x33, 0x19, 0x4a, 0x92, 0xc9, 0x7e, 0xc0, 0x8c, 0x03, 0x0c, 0x8f, 0x99, 0x02, 0x92, 0xff, 0x38, 0x66, 0xba, 0xe0, 0x28, 0x7a, 0x74, 0x93, 0x90, 0xa1, 0xbd, 0x97, 0x00, 0xe3, 0x31, 0x73, 0x82, 0x91, 0x25, 0xbf, 0x9c, 0x89, 0x29, 0x78, 0xec, 0x25, 0x41, 0xe7, 0x82, 0xae, 0x53, 0x3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90, 0x85, 0x95, 0x66, 0x73, 0x4b, 0x05, 0xb7, 0xea, 0xcf, 0x5a, 0xb3, 0x4b, 0x3f, 0xfd, 0xf2, 0x68, 0x4a, 0x16, 0x57, 0x1a, 0x05, 0xa1, 0x27, 0x56, 0x86, 0x76, 0xf4, 0x68, 0xf3, 0x5b, 0xb5, 0x80, 0xb9, 0x00, 0xe1, 0x9c, 0xa9, 0xbf, 0xd8, 0xbc, 0x79, 0x85, 0xb2, 0x28, 0x95, 0x7f, 0xd9, 0xfc, 0x56, 0x7d, 0xf3, 0xd5, 0xc1, 0xe6, 0x0e, 0x09, 0x24, 0x39, 0x97, 0x4c, 0x24, 0x11, 0x42, 0x94, 0x4d, 0xca, 0xc8, 0x21, 0x12, 0xa2, 0xb7, 0x17, 0x10, 0x1e, 0x0c, 0x86, 0x90, 0x81, 0x27, 0x69, 0xf9, 0x01, 0x4f, 0xb2, 0xb7, 0x99, 0x2e, 0x90, 0xee, 0x2f, 0xfe, 0x55, 0xa8, 0x86, 0x02, 0x26, 0x26, 0xa1, 0x4f, 0x69, 0x31, 0x41, 0xec, 0xb1, 0x2f, 0x08, 0x63, 0x85, 0x46, 0x4d, 0x9b, 0xa1, 0x98, 0x99, 0xa1, 0x5c, 0x33, 0x94, 0x99, 0x31, 0x43, 0xc9, 0xc4, 0xcc, 0x98, 0x54, 0xce, 0xac, 0x20 }; src/blogi.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ blogi::Blogi::Blogi(netplus::socket *serversocket) : event(serversocket){ PlgArgs->database= new Postgresql(PlgArgs->config->getdbopts()); PlgArgs->session= new Session(); PlgArgs->auth=new Auth(PlgArgs->database,PlgArgs->session); PlgArgs->edit=new Editor(); PlgArgs->edit=new Editor(PlgArgs->config); TemplateConfig tplcfg; tplcfg.config=Config::getInstance(); Loading src/editor.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -28,12 +28,12 @@ #include <algorithm> #include "editor.h" #include "conf.h" blogi::Editor::Editor() blogi::Editor::Editor(Config *conf) { _firstIcon=nullptr; _lastIcon=nullptr; _Config=conf; } blogi::Editor::~Editor(){ Loading @@ -60,7 +60,7 @@ void blogi::Editor::displayEditor(const char* inputname,const char *value, libht char url[512]; target << "<div id=\"editor\"><ul> "; for(Icons *curicon=_firstIcon; curicon; curicon=curicon->_nextIcon){ target << "<li><img src=\"" << Config::getInstance()->buildurl("editor/icon/",url,512) << curicon->_Name target << "<li><img src=\"" << _Config->buildurl("editor/icon/",url,512) << curicon->_Name << "." << curicon->_Type << "\" alt=\"" << curicon->_Description << "\" /></li>"; } target << "</ul><textarea name=\"" << inputname << "\">"; Loading @@ -71,10 +71,10 @@ void blogi::Editor::displayEditor(const char* inputname,const char *value, libht void blogi::Editor::Controller(netplus::con* curcon, libhttppp::HttpRequest* req){ char url[512]; if(strncmp(req->getRequestURL(),Config::getInstance()->buildurl("editor/icon/",url,512), strlen(Config::getInstance()->buildurl("editor/icon/",url,512) ))==0){ if(strncmp(req->getRequestURL(),_Config->buildurl("editor/icon/",url,512), strlen(_Config->buildurl("editor/icon/",url,512) ))==0){ std::string reqfile; std::copy(req->getRequestURL()+strlen(Config::getInstance()->buildurl("editor/icon/",url,512)), std::copy(req->getRequestURL()+strlen(_Config->buildurl("editor/icon/",url,512)), req->getRequestURL()+strlen(req->getRequestURL()),std::inserter<std::string>(reqfile,reqfile.begin())); for(Icons *curicon=_firstIcon; curicon; curicon=curicon->_nextIcon){ if(reqfile.substr(0,reqfile.find("."))==curicon->_Name){ Loading src/editor.h +4 −1 Original line number Diff line number Diff line Loading @@ -30,12 +30,14 @@ #include <string> #include "conf.h" #pragma once namespace blogi { class Editor{ public: Editor(); Editor(Config *conf); ~Editor(); void addIcon(const unsigned char *icon,size_t iconsize,const char *name,const char *type,const char *description); Loading Loading @@ -65,5 +67,6 @@ namespace blogi { Icons *_firstIcon; Icons *_lastIcon; Config *_Config; }; }; Loading
plugins/media/icon.webp.h +59 −101 Original line number Diff line number Diff line #define icondatalen 397 #define icondatalen 464 const unsigned char icondata[icondatalen] = { 0x52, 0x49, 0x46, 0x46, 0xc8, 0x01, 0x00, 0x00, 0x57, 0x45, 0x42, 0x50, 0x56, 0x50, 0x38, 0x4c, 0xbc, 0x01, 0x00, 0x00, 0x2f, 0x1b, 0xc0, 0x06, 0x10, 0x35, 0x40, 0x6c, 0xdb, 0x46, 0x90, 0x94, 0x5a, 0x0f, 0xcb, 0x6f, 0x63, 0x7b, 0x9f, 0xc9, 0xce, 0xee, 0x77, 0xe0, 0x44, 0xc8, 0xb5, 0x6d, 0xeb, 0xd8, 0xb3, 0x13, 0xa3, 0x73, 0x67, 0xdb, 0x36, 0x2f, 0xc0, 0xec, 0xf8, 0x22, 0x6a, 0x33, 0x72, 0x03, 0xb6, 0x9d, 0xca, 0xec, 0xf4, 0xc6, 0x49, 0x67, 0xdb, 0x76, 0xf2, 0x1b, 0x0f, 0x15, 0xb8, 0x6d, 0xa3, 0xa4, 0xd2, 0x31, 0x0e, 0x3e, 0xc1, 0xc8, 0x06, 0x82, 0x05, 0x82, 0x07, 0xf1, 0x1f, 0x19, 0x38, 0xf3, 0x28, 0x33, 0xe3, 0x4c, 0x52, 0xc1, 0x20, 0xf8, 0x57, 0x61, 0x06, 0x0b, 0x88, 0x28, 0x9e, 0x60, 0xbd, 0x3c, 0x3c, 0xa0, 0x61, 0xa2, 0x40, 0xce, 0x2a, 0xbc, 0x9b, 0x36, 0x33, 0x19, 0x4a, 0x92, 0xc9, 0x7e, 0xc0, 0x8c, 0x03, 0x0c, 0x8f, 0x99, 0x02, 0x92, 0xff, 0x38, 0x66, 0xba, 0xe0, 0x28, 0x7a, 0x74, 0x93, 0x90, 0xa1, 0xbd, 0x97, 0x00, 0xe3, 0x31, 0x73, 0x82, 0x91, 0x25, 0xbf, 0x9c, 0x89, 0x29, 0x78, 0xec, 0x25, 0x41, 0xe7, 0x82, 0xae, 0x53, 0x3c, 0xf1, 0x4a, 0xaf, 0x80, 0xb0, 0xf6, 0x52, 0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 0xcf, 0x5a, 0xb3, 0x4b, 0x3f, 0xfd, 0xf2, 0x68, 0x4a, 0x16, 0x57, 0x1a, 0x05, 0xa1, 0x27, 0x56, 0x86, 0x76, 0xf4, 0x68, 0xf3, 0x5b, 0xb5, 0x80, 0xb9, 0x00, 0xe1, 0x9c, 0xa9, 0xbf, 0xd8, 0xbc, 0x79, 0x85, 0xb2, 0x28, 0x95, 0x7f, 0xd9, 0xfc, 0x56, 0x7d, 0xf3, 0xd5, 0xc1, 0xe6, 0x0e, 0x09, 0x24, 0x39, 0x97, 0x4c, 0x24, 0x11, 0x42, 0x94, 0x4d, 0xca, 0xc8, 0x21, 0x12, 0xa2, 0xb7, 0x17, 0x10, 0x1e, 0x0c, 0x86, 0x90, 0x81, 0x27, 0x69, 0xf9, 0x01, 0x4f, 0xb2, 0xb7, 0x99, 0x2e, 0x90, 0xee, 0x2f, 0xfe, 0x55, 0xa8, 0x86, 0x02, 0x26, 0x26, 0xa1, 0x4f, 0x69, 0x31, 0x41, 0xec, 0xb1, 0x2f, 0x08, 0x63, 0x85, 0x46, 0x4d, 0x9b, 0xa1, 0x98, 0x99, 0xa1, 0x5c, 0x33, 0x94, 0x99, 0x31, 0x43, 0xc9, 0xc4, 0xcc, 0x98, 0x54, 0xce, 0xac, 0x20 };
src/blogi.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ blogi::Blogi::Blogi(netplus::socket *serversocket) : event(serversocket){ PlgArgs->database= new Postgresql(PlgArgs->config->getdbopts()); PlgArgs->session= new Session(); PlgArgs->auth=new Auth(PlgArgs->database,PlgArgs->session); PlgArgs->edit=new Editor(); PlgArgs->edit=new Editor(PlgArgs->config); TemplateConfig tplcfg; tplcfg.config=Config::getInstance(); Loading
src/editor.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -28,12 +28,12 @@ #include <algorithm> #include "editor.h" #include "conf.h" blogi::Editor::Editor() blogi::Editor::Editor(Config *conf) { _firstIcon=nullptr; _lastIcon=nullptr; _Config=conf; } blogi::Editor::~Editor(){ Loading @@ -60,7 +60,7 @@ void blogi::Editor::displayEditor(const char* inputname,const char *value, libht char url[512]; target << "<div id=\"editor\"><ul> "; for(Icons *curicon=_firstIcon; curicon; curicon=curicon->_nextIcon){ target << "<li><img src=\"" << Config::getInstance()->buildurl("editor/icon/",url,512) << curicon->_Name target << "<li><img src=\"" << _Config->buildurl("editor/icon/",url,512) << curicon->_Name << "." << curicon->_Type << "\" alt=\"" << curicon->_Description << "\" /></li>"; } target << "</ul><textarea name=\"" << inputname << "\">"; Loading @@ -71,10 +71,10 @@ void blogi::Editor::displayEditor(const char* inputname,const char *value, libht void blogi::Editor::Controller(netplus::con* curcon, libhttppp::HttpRequest* req){ char url[512]; if(strncmp(req->getRequestURL(),Config::getInstance()->buildurl("editor/icon/",url,512), strlen(Config::getInstance()->buildurl("editor/icon/",url,512) ))==0){ if(strncmp(req->getRequestURL(),_Config->buildurl("editor/icon/",url,512), strlen(_Config->buildurl("editor/icon/",url,512) ))==0){ std::string reqfile; std::copy(req->getRequestURL()+strlen(Config::getInstance()->buildurl("editor/icon/",url,512)), std::copy(req->getRequestURL()+strlen(_Config->buildurl("editor/icon/",url,512)), req->getRequestURL()+strlen(req->getRequestURL()),std::inserter<std::string>(reqfile,reqfile.begin())); for(Icons *curicon=_firstIcon; curicon; curicon=curicon->_nextIcon){ if(reqfile.substr(0,reqfile.find("."))==curicon->_Name){ Loading
src/editor.h +4 −1 Original line number Diff line number Diff line Loading @@ -30,12 +30,14 @@ #include <string> #include "conf.h" #pragma once namespace blogi { class Editor{ public: Editor(); Editor(Config *conf); ~Editor(); void addIcon(const unsigned char *icon,size_t iconsize,const char *name,const char *type,const char *description); Loading Loading @@ -65,5 +67,6 @@ namespace blogi { Icons *_firstIcon; Icons *_lastIcon; Config *_Config; }; };