5 void footer(
string tab_name,
string extraInfo =
"");
7 void header(
int iid=0,
bool addSavingsPlan =
false,
bool addPlots =
false);
9 const string c_salt =
"k35f9vfgDtjTe1";
11 void next_step(
int stepNbr,
int subStepNbr);
13 void aside(
const string& textLine);
19 const string seriesColorsGoalPlot =
"[ 'rgba(160, 0, 0, 0.6)', 'rgba(0, 0, 160, 0.6)', 'rgba(0, 160, 0, 0.6)', \"#000\", \"#663\", \"#958c12\", \"#953579\", \"#4b5de4\", \"#d8b83f\", \"#ff5800\", \"#0085cc\"]";
23 const string assetClassColors =
"['#999', '#0c3', '#396', '#0c9', '#3cf', '#69f', '#96f', '#f93', '#fc3', '#f63', '#33f']";
28 string collapse_open(
string parent_id,
string title,
int nbr,
bool add_triangle =
true,
bool is_open =
true,
string xtra_body_class =
"");
29 string collapse_close(
string parent_id =
"",
int nbr = 0,
bool add_triangle =
true);
39 const std::map<int, string>
c_photos_phdb = {{1,
"phdb/ZM5K1325_01.jpg"}, {2,
"phdb/ZM5K1312_01b.jpg"},
40 {3,
"phdb/ZM5K1302_01c.jpg"},{4,
"phdb/ZM5K1313_01c.jpg"}, {5,
"fvdspieg1.jpg"}, {6,
"fvdspieg2.jpg"}};
46 typedef std::map<string, string>
STRMAP;
112 const string c_arrow =
" <img src=\"" +
oConfig.
css_dir +
"next.gif\" border=\"0\" width=\"5\" height=\"9\" alt=\"\" class=\"noPadding\"> ";
116 void navbar_item(
int k,
string usr_name =
"",
string tab_name =
"");
130 int step = 1, sub_step = 1;
131 steps[step][
"name"] =
"Home";
134 steps[step][
"must_login"] =
"N";
157 steps[step][
"name"] =
"Personalize";
160 steps[step][
"must_login"] =
"Y";
165 steps[step][
"name"] =
"Goals";
168 steps[step][
"must_login"] =
"Y";
174 steps[step][
"name"] =
"Inventory";
177 sub_steps[step][sub_step][
"name"] =
"Assets";
182 sub_steps[step][sub_step][
"name"] =
"Savings and expenses";
185 steps[step][
"must_login"] =
"Y";
190 steps[step][
"name"] =
"Feedback";
193 steps[step][
"must_login"] =
"Y";
198 steps[step][
"name"] =
"Simulation";
201 steps[step][
"must_login"] =
"Y";
206 steps[step][
"name"] =
"Follow-Up";
209 steps[step][
"must_login"] =
"Y";
217 if (theStep <= 1)
return 0;
232 if (theStep <= 0)
return 1;
233 if (theStep == 1)
return 0;
238 auto innerMapPtr = outerIt->second;
239 const int KeyInner = theSubStep + 1;
240 auto innerIt = innerMapPtr.find(KeyInner);
241 if (innerIt != innerMapPtr.end())
return theStep;
243 if (
steps.find(theStep+1) !=
steps.end())
return theStep + 1;
256 auto innerMapPtr = outerIt->second;
257 const int KeyInner = theSubStep+1;
258 auto innerIt = innerMapPtr.find(KeyInner);
259 if (innerIt != innerMapPtr.end())
268 auto innerMapPtr = outerIt->second;
269 const int KeyInner = 1;
270 auto innerIt = innerMapPtr.find(KeyInner);
271 if (innerIt != innerMapPtr.end())
286 if (theSubStep > 1)
return theSubStep - 1;
287 if (theStep <= 1)
return 0;
291 auto outerIt =
sub_steps.find(theStep - 1);
294 auto innerMapPtr = outerIt->second;
295 const int KeyInner = 1;
296 auto innerIt = innerMapPtr.find(KeyInner);
297 if (innerIt != innerMapPtr.end())
313 auto innerMapPtr = outerIt->second;
314 const int KeyInner = theSubStep;
315 auto innerIt = innerMapPtr.find(KeyInner);
316 if (innerIt == innerMapPtr.end())
336 if (step_name ==
"")
return 0;
341 catch (std::out_of_range& e)
344 std::cerr << e.what() << std::endl;
346 cout <<
"error no. HH001";
356 if (sub_step_name ==
"")
return 0;
361 catch (std::out_of_range& e)
364 std::cerr << e.what() << std::endl;
366 cout <<
"error no. HH002";
377 string s, s_nbr = to_string(nbr), s_in = (is_open)?
"in":
"";
381 s =
"\n<div class=\"panel panel-default\">";
382 s = s +
"\n<div class=\"brightgreenBox panel-heading\">";
383 s = s +
"<a data-toggle=\"collapse\" data-parent=\"#" + parent_id +
"\" data-target=\"#collapse" + s_nbr +
"\">";
385 if (add_triangle) s = s +
" <span class=\"glyphicon glyphicon-triangle-bottom\"></span>";
388 s = s +
"\n<div id=\"collapse" + s_nbr +
"\" class=\"panel-collapse collapse " + s_in +
"\">";
389 s = s +
"\n<div class=\"panel-body " + xtra_body_class +
"\">\n";
393 s=
"<div clas=\"alert-info\">\n";
409 string s_nbr = to_string(nbr);
410 s =
"<p><a data-toggle=\"collapse\" data-parent=\"#" + parent_id +
"\" data-target=\"#collapse" + s_nbr +
"\">";
412 if (add_triangle) s = s +
" <span class=\"glyphicon glyphicon-triangle-top\"></span>";
415 s = s +
"</div></div></div>\n";
440 cout <<
"<button class=\"btn btn-primary\" id=\"btnShow\">" <<
t_show_extra_info <<
"</button> ";
441 cout <<
"<button class=\"btn btn-primary\" id=\"btnHide\">" <<
t_hide_extra_info <<
"</button>";
442 cout <<
"<div id=\"extraInfo\">" <<
t_extraInfo[extraInfo] <<
"</div>";
445 bs_modal (t_show_extra_info +
" <span class=\"glyphicon glyphicon-info-sign\"></span>", t_extraInfo[extraInfo]);
448 cout <<
"<button class=\"btn btn-primary\" id=\"btnShow\">" << t_show_extra_info <<
"</button> ";
449 cout <<
"<button class=\"btn btn-primary\" id=\"btnHide\">" << t_hide_extra_info <<
"</button>";
450 cout <<
"<div id=\"extraInfo\">" << t_extraInfo[extraInfo] <<
"</div>";
457 cout <<
"</div><div class=\"alert alert-warning\">" <<
t_warning <<
"</div>\n";
459 cout <<
"<div class=\"footer\">";
463 cout <<
"<span class=\"glyphicon glyphicon-copyright-mark\"></span>";
469 cout <<
" Dr. Philippe De Brouwer (2015)</p>";
509 cout <<
"<br>---------[DEBUG INFO]---------\n<br>" + debug_info <<
"<br>\n-------[END DEBUG INFO]-------\n<br>";
532 struct tm * now = localtime( & t );
533 cout << (now->tm_year + 1900) <<
'-' << (now->tm_mon + 1) <<
'-' << now->tm_mday;
541 cout <<
"<nav id=\"nav\"><ul>";
543 cout <<
"<li><a href=\"" <<
oConfig.
wrapper_url <<
"/solutions.html\"><b>SOLUTIONS</b></a></li>";
544 cout <<
"<li><a href=\"" <<
oConfig.
wrapper_url <<
"/further_info.html\"><b>BACKGROUND INFORMATION</b></a></li>";
545 cout <<
"<li><a href=\"" <<
oConfig.
wrapper_url <<
"/about.html\"><b>ABOUT US</b></a></li>";
546 cout <<
"<li><a href=\"" <<
oConfig.
wrapper_url <<
"/contact.html\"><b>CONTACT</b></a></li>";
547 cout <<
"</ul></nav>\n";
549 cout <<
"<div class=\"history\"><a HREF=\"/\">eFinancialPlanner</a>";
550 cout <<
" <img src=\""<<
oConfig.
css_dir <<
"next.gif\" border=\"0\" width=\"5\" height=\"9\" alt=\"\" class=\"noPadding\"> ";
553 cout <<
"<div class=\"mainBody\" id=\"mainBodyAlone\"><div id=\"appWrapper\">";
564 if (iid != 0) cout <<
"Set-Cookie:iid=" << std::to_string(iid) <<
";\n";
570 cout <<
"\n<html lang=\"en-UK\">\n";
break;
572 cout <<
"\n<html lang=\"en-US\">\n";
break;
574 cout <<
"\n<html lang=\"en-UK\">\n";
577 cout <<
"<title>" <<
t_title <<
"</title>\n";
578 cout <<
"<meta charset=\"utf-8\">\n";
579 cout <<
"<meta name=\"Description\" content=\"Personal Financial Planning\">\n";
580 cout <<
"<meta name=\"Keywords\" content=\"financial planning, Philippe, De Brouwer, Philippe De Brouwer, PFP, Personal Financial Plan, Behavioral Finance, Behavioural Finance, Dr. Philippe J.S. De Brouwer\">\n";
581 cout <<
"<meta name=\"author\" content=\"Philippe De Brouwer\">\n";
582 cout <<
"<LINK REL=\"icon\" HREF=\"favicon.ico\" TYPE=\"image/ico\">\n";
583 cout <<
"<LINK REL=\"SHORTCUT ICON\" HREF=\"favicon.ico\">\n";
586 cout <<
"<script src=\"" <<
oConfig.
scripts_dir <<
"dist/jquery.min.js\"></script>\n";
593 cout <<
"<script src=\"" <<
oConfig.
scripts_dir <<
"dist/jquery.jqplot.min.js\"></script>\n";
594 cout <<
"<script src=\"" <<
oConfig.
scripts_dir <<
"jqplot.pieRenderer.min.js\"></script>\n";
595 cout <<
"<link rel=\"stylesheet\" type=\"text/css\" href=\"" <<
oConfig.
css_dir <<
"jquery.jqplot.min.css\">\n";
596 cout <<
"<style type=\"text/css\">.jqplot-data-label {color: #444;font-size: 1.1em;}</style>\n";
597 cout <<
"<script src=\"" <<
oConfig.
scripts_dir <<
"jqplot.customMarkerRenderer.js\"></script>\n";
605 if (addSavingsPlan) cout <<
"<script src=\"" <<
oConfig.
scripts_dir <<
"savings_plan_sh.js\"></script>\n";
608 cout <<
"<script src=\"" <<
oConfig.
scripts_dir <<
"datepicker/js/bootstrap-datepicker.js\"></script>\n";
609 cout <<
"<link rel=\"stylesheet\" type=\"text/css\" href=\"" <<
oConfig.
scripts_dir <<
"datepicker/css/datepicker.css\">\n";
615 cout <<
"<link rel=\"stylesheet\" type=\"text/css\" href=\"" <<
oConfig.
css_dir <<
"base2.css\">\n";
618 cout <<
"<link rel=\"stylesheet\" type=\"text/css\" href=\"" <<
oConfig.
css_dir <<
"base1.css\">\n";
619 cout <<
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n";
620 cout <<
"<link href=\"" <<
oConfig.
css_dir <<
"bootstrap/css/bootstrap.css\" rel=\"stylesheet\" media=\"screen\">\n";
621 cout <<
"<link href=\"" <<
oConfig.
css_dir <<
"bootstrap/css/bootstrap-responsive.css\" rel=\"stylesheet\" media=\"screen\">\n";
622 cout <<
"<link href=\"" <<
oConfig.
css_dir <<
"bootstrap/css/bootstrap-theme.css\" rel=\"stylesheet\">\n";
623 cout <<
"<script src=\"" <<
oConfig.
css_dir <<
"bootstrap/js/bootstrap.min.js\"></script>";
627 cout <<
"<link rel=\"stylesheet\" type=\"text/css\" href=\"" <<
oConfig.
css_dir <<
"base2.css\">\n";
634 cout <<
"<link href=\"https://fonts.googleapis.com/css?family=Corben:bold\" rel=\"stylesheet\" type=\"text/css\">";
635 cout <<
"<style>h1, h2, h3, h4, h5, h6 {font-family: 'Corben', Georgia, Times, serif;}</style>";
636 cout <<
"<link href=\"https://fonts.googleapis.com/css?family=Corben:bold\" rel=\"stylesheet\" type=\"text/css\">";
637 cout <<
"<style>div, body, p {font-family: 'Nobile', Helvetica, Arial, sans-serif;}</style>";
640 cout <<
"<link href=\"https://fonts.googleapis.com/css?family=Droid+Serif\" rel=\"stylesheet\" type=\"text/css\">";
641 cout <<
"<style>h1, h2, h3, h4, h5, h6 {font-family: 'Dorid Serif', Georgia, Times, serif;}</style>";
642 cout <<
"<link href=\"https://fonts.googleapis.com/css?family=Droid+Sans\" rel=\"stylesheet\" type=\"text/css\">";
643 cout <<
"<style>div, body, p {font-family: 'Droid Sans', Helvetica, Arial, sans-serif;}</style>";
646 cout <<
"<link href=\"https://fonts.googleapis.com/css?family=Ubuntu:bold\" rel=\"stylesheet\" type=\"text/css\">";
647 cout <<
"<style>h1, h2, h3, h4, h5, h6 {font-family: 'Ubuntu', Georgia, Times, serif;}</style>";
648 cout <<
"<style>div, body, p {font-family: sans-serif;}</style>";
651 cout <<
"<link href=\"https://fonts.googleapis.com/css?family=Ubuntu:bold\" rel=\"stylesheet\" type=\"text/css\">";
652 cout <<
"<style>h1, h2, h3, h4, h5, h6 {font-family: 'Ubuntu', Georgia, Times, serif;}</style>";
653 cout <<
"<link href=\"https://fonts.googleapis.com/css?family=Vollkorn\" rel=\"stylesheet\" type=\"text/css\">";
654 cout <<
"<style>div, body, p {font-family: 'Vollkorn', Georgia, Times, Serif;}</style>";
657 cout <<
"<link href=\"" <<
oConfig.
css_dir <<
"fonts/journal/font.css\" rel=\"stylesheet\" type=\"text/css\">";
658 cout <<
"<style>h1, h2, h3, h4, h5, h6 {font-weight:bold;font-family: 'JOURNAL', Georgia, Times, serif;}</style>";
659 cout <<
"<style>h1{font-size:4.5em;}h2{font-size:3.5em;}h3{font-size:2.5em;}h4{font-size:2em;}h5{font-size:1em;}</style>";
662 cout <<
"<style>div, body, p {font-family: sans-serif;}</style>";
665 cout <<
"<link href=\"" <<
oConfig.
css_dir <<
"fonts/journal/font.css\" rel=\"stylesheet\" type=\"text/css\">";
666 cout <<
"<style>h1, h2, h3, h4, h5, h6 {font-weight:bold;font-family: 'JOURNAL', Georgia, Times, serif;}</style>";
667 cout <<
"<style>h1{font-size:3.5em;}h2{font-size:2.5em;}h3{font-size:2em;}h4{font-size:1.75em;}h5{font-size:1.5em;}</style>";
668 cout <<
"<link href=\"" <<
oConfig.
css_dir <<
"fonts/gentium/font.css\" rel=\"stylesheet\" type=\"text/css\">";
669 cout <<
"<style>body {font-size: 17px;}table.jqplot-table-legend {font-size:.75em;}</style>";
670 cout <<
"<style>div, body, p {font-family: GentiumPlusW, sans-serif;}</style>";
674 cout <<
"<link href=\"" <<
oConfig.
css_dir <<
"fonts/gentium/font.css\" rel=\"stylesheet\" type=\"text/css\">";
675 cout <<
"<style>h1, h2, h3, h4, h5, h6 {font-weight:bold;font-family: GentiumPlusW, sans-serif;}</style>";
676 cout <<
"<style>body {font-size: 17px;}table.jqplot-table-legend {font-size:.75em;}</style>";
678 cout <<
"<style>div, body, p {font-family: GentiumPlusW, sans-serif;}</style>";
682 cout <<
"<style>h1, h2, h3, h4, h5, h6 {font-family: Georgia, Times, serif;}</style>";
683 cout <<
"<style>div, body, p {font-family: 'Droid Sans', Helvetica, Arial, sans-serif;}</style>";
693 cout <<
"<div class=\"container-fluid\">";
696 cout <<
"<div id=\"wrapper\">\n";
704 cout <<
"<div class=\"alert alert-warning\"><ul>" <<
error_message <<
"</ul>";
710 cout <<
"<div class=\"alert alert-info\"><ul>" <<
std_message <<
"</ul>";
736 using namespace cgicc;
740 form_iterator uid =
cgi.getElement(
"uid");
741 if(uid !=
cgi.getElements().end()) { isLogin = 1;}
else { isLogin = 0;}
743 cout << p(
"This simple process consists of three easy steps:");
744 cout <<
"<img src=\"" <<
oConfig.
www_dir <<
"/img/ranking.jpeg\" align=\"right\"/>";
749 cout << li(
"STEP 1: Make an inventory of your assets and main cash-flows (income and expenses)");
750 cout << li(
"STEP 2: Set Your personal financial goals");
751 cout << li(
"STEP 3: Contemplate on the Feedback");
753 cout <<
"<p>Next step: <button type=\"btn btn-primary\" class=\"btn btn-primary\" onclick=\"window.location.href=\'" +
oConfig.
soft_url +
"?a=rf\'\">Register</button> or ";
754 cout <<
"<button type=\"btn btn-primary\" class=\"btn btn-primary\" onclick=\"window.location.href=\'" +
oConfig.
soft_url +
"?a=lf\'\">Login</button></p>";
759 cout << li(
"STEP 1: <a href=\"" +
oConfig.
soft_url +
"?a=if\">Make an inventory of your assets and main cash-flows (income and expenses)</a>");
760 cout << li(
"STEP 2: <a href=\"" +
oConfig.
soft_url +
"?a=gf\">Set Your personal financial goals</a>");
761 cout << li(
"STEP 3: <a href=\"" +
oConfig.
soft_url +
"?a=f\">Contemplate on the Feedback</a>");
763 cout <<
"<p>Next step: <button type=\"btn btn-primary\" onclick=\"window.location.href=\'" +
oConfig.
soft_url +
"?a=gl\'\">Define Your Goals</button></p>";
790 form_iterator fvalue1 = formData.getElement(varName);
791 if( !fvalue1->isEmpty() && fvalue1 != (*formData).end()) {
return **fvalue1;}
else {
return "";}
793 catch(exception& e) { cout <<
"**ERROR!!**\n";
return "ERROR";}
811 cout <<
"<ul class=\"nav-tabs\">";
826 bool produce_sublist, is_active, is_disabled;
829 is_active = (k == active_tab_nbr)?
true:
false;
830 is_disabled = ((usr_name ==
"") && (
steps[k][
"must_login"] ==
"Y"))?
true:
false;
831 the_url = ((usr_name ==
"") && (
steps[k][
"must_login"] ==
"Y"))?
"#":
steps[k][
"url"];
837 cout <<
"<li role=\"presentation\" class=\"";
842 else if (is_disabled)
848 cout <<
" dropdown\"><a class=\"dropdown-toggle\" data-toggle=\"dropdown\" href=\"#\" role=\"button\" aria-expanded=\"false\">" <<
steps[k][
"name"] <<
"<span class=\"caret\"></span></a>";
852 cout <<
"\"><a href=\"" << the_url <<
"\">" <<
steps[k][
"name"] <<
"</a>";;
859 cout <<
"<ul class=\"dropdown-menu\" role=\"menu\">";
868 cout <<
"<li><A href=\"" <<
sub_steps[k][l][
"url"] <<
"\"";
869 if (l == selected_sub) {cout <<
" class=\"active\" ";}
870 cout <<
">" << sub_steps[k][l][
"name"] <<
"</a></li>";
880 cout <<
"<li role=\"presentation\" class=\"";
885 else if (is_disabled)
891 cout <<
" dropdown\"><a class=\"dropdown-toggle\" data-toggle=\"dropdown\" href=\"#\" role=\"button\" aria-expanded=\"false\">" <<
steps[k][
"name"] <<
"<span class=\"caret\"></span></a>";
895 cout <<
"\"><a href=\"" << the_url <<
"\">" <<
steps[k][
"name"] <<
"</a>";;
897 produce_sublist = (k == active_tab_nbr &&
sub_step_exists(k,1))?
true:
false;
902 cout <<
"<ul class=\"dropdown-menu\" role=\"menu\">";
911 cout <<
"<li><A href=\"" <<
sub_steps[k][l][
"url"] <<
"\"";
912 if (l == selected_sub) {cout <<
" class=\"active\" ";}
913 cout <<
">" << sub_steps[k][l][
"name"] <<
"</a></li>";
950 if (usr_name ==
"")
return;
956 cout <<
"<ul class=\"nav navbar-nav navbar-right\">";
957 cout <<
"<li class=\"dropdown\">";
958 cout <<
"<a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\" role=\"button\" aria-haspopup=\"true\" aria-expanded=\"false\">" << usr_name <<
" <span class=\"caret\"></span></a>";
959 cout <<
"<ul class=\"dropdown-menu\">";
972 cout <<
"<span class=\"floatRight\">";
973 cout <<
"logged in as: <i>" << usr_name <<
"</i> <br>" ;
1020 cout <<
"<br style=\"clear:all;\"/>";
1063 if (prevStepNbr != 0)
1069 back_symbol =
"<img src=\"" +
oConfig.
css_dir +
"arrow_right.svg\" width=\"150px\" height=\"12px\" >";
1072 back_symbol =
"<span class=\"glyphicon glyphicon-step-backward\"></span>";
1075 back_symbol =
" <span class=\"glyphicon glyphicon-step-forward\"></span>";
1080 cout <<
"\n<a class=\"btn btn-default\" href=\"";
1081 if (prevSubStepNbr == 0)
1083 cout <<
steps[prevStepNbr][
"url"] <<
"\">"<< back_symbol <<
t_prev_step <<
": " <<
steps[prevStepNbr][
"name"];
1087 cout <<
sub_steps[prevStepNbr][prevSubStepNbr][
"url"] <<
"\">" << back_symbol <<
t_prev_step <<
": " <<
sub_steps[prevStepNbr][prevSubStepNbr][
"name"];
1093 if (nextStepNbr != 0)
1095 cout <<
"\n<a class=\"btn btn-primary\" href=\"";
1096 if (nextSubStepNbr == 0)
1106 case '1' : cout <<
"<img src=\"" <<
oConfig.
css_dir <<
"arrow_right.svg\" width=\"150px\" height=\"12px\" >";
break;
1107 case '2' : cout <<
"<span class=\"glyphicon glyphicon-step-forward\"></span>";
break;
1108 default : cout <<
" <span class=\"glyphicon glyphicon-step-forward\"></span>";
break;
1127 cout <<
"\" alt=\"Philippe's picture\" align=\"center\" width=\"100px\">";
1128 cout <<
"<p>"" << textLine <<
""</p>";
1130 cout <<
"</aside>\n";
1140 cout <<
"<br><div id=\"share\">";
1141 cout <<
"<script src=\"//platform.linkedin.com/in.js\" type=\"text/javascript\">lang: en_US</script><script type=\"IN/Share\" data-counter=\"right\"></script>";
1142 cout <<
"<div id=\"fb-root\"></div>";
1143 cout <<
"<script>(function(d, s, id) {";
1144 cout <<
" var js, fjs = d.getElementsByTagName(s)[0];";
1145 cout <<
" if (d.getElementById(id)) return;";
1146 cout <<
" js = d.createElement(s); js.id = id;";
1147 cout <<
" js.src = \"//connect.facebook.net/en_GB/all.js#xfbml=1\";";
1148 cout <<
" fjs.parentNode.insertBefore(js, fjs);";
1149 cout <<
" }(document, 'script', 'facebook-jssdk'));</script>";
1150 cout <<
"<div class=\"fb-like\" data-href=\"" <<
oConfig.
soft_url <<
"\" data-layout=\"button\" data-action=\"like\" data-show-faces=\"false\" data-share=\"true\"></div></div>";
1163 cout <<
"<ol class =\"breadcrumb\">";
1167 cout <<
"<li><a HREF=\"" <<
steps[tab][
"url"] <<
"\">" <<
steps[tab][
"name"] <<
"</a></li>";
1168 if (tab != 0 && sub_tab != 0)
1170 cout <<
"<li><a HREF=\"" <<
sub_steps[tab][sub_tab][
"url"] <<
"\">" <<
sub_steps[tab][sub_tab][
"name"] <<
"</a></li>";
1173 cout <<
"<br style=\"clear:left;\"/>";
1180 cout <<
"" <<
c_arrow <<
"<a HREF=\"" << steps[tab][
"url"] <<
"\">" << steps[tab][
"name"] <<
"</a>";
1181 if (tab != 0 && sub_tab != 0)
1184 cout <<
"<a HREF=\"" <<
sub_steps[tab][sub_tab][
"url"] <<
"\">" <<
sub_steps[tab][sub_tab][
"name"] <<
"</a>";
1187 cout <<
"<br style=\"clear:left;\"/>";
1201 cout <<
"<br style=\"clear:all;\"/>\n";
1202 auto outerIt =
steps.find(tab);
1203 if (outerIt !=
steps.end())
1205 auto innerMapPtr = outerIt->second;
1206 const string KeyInner =
"title";
1207 auto innerIt = innerMapPtr.find(KeyInner);
1208 if (innerIt != innerMapPtr.end()) cout <<
"<h1>" <<
steps[tab][
"title"] <<
"</h1>";
1214 auto innerMapPtr = outer2It->second;
1215 const int KeyInner2 = sub_tab;
1216 auto innerIt = innerMapPtr.find(KeyInner2);
1217 if (innerIt != innerMapPtr.end())
1219 auto inner2MapPtr = innerIt->second;
1220 const string KeyInner3 =
"title";
1221 auto inner2It = inner2MapPtr.find(KeyInner3);
1222 if (inner2It != inner2MapPtr.end()) cout <<
"<h2>" <<
sub_steps[tab][sub_tab][
"title"] <<
"</h2>";
1235 if (the_color ==
"brightgreen") cout <<
"brightgreenBox";
1236 else if (the_color ==
"green") cout <<
"greenBox";
1237 else if (the_color ==
"amber") cout <<
"amberBox";
1238 else if (the_color ==
"red") cout <<
"redBox";
1239 else if (the_color ==
"darkred") cout <<
"darkredBox";
1240 else {cout <<
"amberBox";}
1249 if (the_color ==
"brightgreen") s =
"brightgreenBox";
1250 else if (the_color ==
"green") s =
"greenBox";
1251 else if (the_color ==
"amber") s =
"amberBox";
1252 else if (the_color ==
"red") s =
"redBox";
1253 else if (the_color ==
"darkred") s =
"darkredBox";
1254 else {s =
"amberBox";}
1267 s =
"<span class=\"";
1268 if (the_color ==
"brightgreen") s = s +
"glyphicon glyphicon-thumbs-up";
1269 else if (the_color ==
"green") s = s +
"glyphicon glyphicon-thumbs-up";
1270 else if (the_color ==
"amber") s = s +
"glyphicon glyphicon-alert";
1271 else if (the_color ==
"red") s = s +
"glyphicon glyphicon-thumbs-down";
1272 else if (the_color ==
"darkred") s = s +
"glyphicon glyphicon-thumbs-down";
1273 else {s = s +
"glyphicon";}
1274 s = s +
"\"></span>";
1278 if (the_color ==
"brightgreen") s =
":-D";
1279 else if (the_color ==
"green") s =
":-)";
1280 else if (the_color ==
"amber") s =
":-|";
1281 else if (the_color ==
"red") s =
":-(";
1282 else if (the_color ==
"darkred") s =
":'-(";
1296 string s =
"<a href=\"" +
oConfig.
soft_url +
"?a=d#use\">Terms of Use</a>";
1305 string s =
"<a href=\"" +
oConfig.
soft_url +
"?a=d#privacy\">Privacy Policy</a>";
1314 string s =
"<a href=\"" +
oConfig.
soft_url +
"?a=d#cookie\">Cookie Policy</a>";
bool show_aside
whether or not to show the side-box
void navbar_box(int k, string usr_name="")
const bool parse_wrapper
true will turn of the rendering of the menu related to the soft_server_url
unordered_map< string, string > t_titles
void bs_modal(string title, string content, string id="myModal", string b1_text="", string b1_url="")
void parse_title(int tab, int sub_tab)
int get_step_nbr(string step_name)
const string seriesColorsGoalPlot
void parse_breadcrumb(int tab, int sub_tab)
const string c_right_menu_urls[NBR_RIGHT_MENU]
void aside(const string &textLine)
int get_prev_step(int theStep, int theSubStep)
char font_combination
1=Corben&Nobile, 2=Droid (Serif and Sans), d = default (non-google fonts), 3=Ubuntu+Sans, 4=Ubuntu+Vollkorn, 5=handwritten+sans, 6 = handrwitten titles+serif! (pref 3 and 5)
int get_prev_sub_step(int theStep, int theSubStep)
const string c_photos_phdb_dir
void header(int iid=0, bool addSavingsPlan=false, bool addPlots=false)
string collapse_open(string parent_id, string title, int nbr, bool add_triangle=true, bool is_open=true, string xtra_body_class="")
const string t_breadcrumb
string error_message
global message variables
#define NBR_TABS
number of tabs in the main menu of the software
std::map< string, int > sub_step_nbrs
std::map< string, string > STRMAP
const string c_content_header
const string c_right_menu_names[NBR_RIGHT_MENU]
#define NBR_RIGHT_MENU
the number of menu items floated to the right
const std::map< int, string > c_photos_phdb
std::map< int, STEPDEF > sub_steps
int get_next_sub_step(int theStep, int theSubStep)
std::map< string, int > step_nbrs
void show_args(int argc, char **argv)
int get_next_step(int theStep, int theSubStep)
bool sub_step_exists(int theStep, int theSubStep)
string get_box_color_class(string the_color)
const string wrapper_name
void next_step(int stepNbr, int subStepNbr)
#define NBR_SUB_TABS
maximum number of tabs used in the sub-menu
const string t_hide_extra_info
int get_sub_step_nbr(string sub_step_name)
void show_toolBar(string tab_name, string usrName="")
void navbar_item(int k, string usr_name="", string tab_name="")
void footer(string tab_name, string extraInfo="")
string collapse_close(string parent_id="", int nbr=0, bool add_triangle=true)
unordered_map< string, string > t_extraInfo
string get_string(const std::string &varName)
unordered_map< string, string > t_after_title
string get_glyphicon(string the_color)
std::map< int, STRMAP > STEPDEF
const string assetClassColors
void cout_box_color(string the_color)
config oConfig
mysql connection mysql connector from dev.mysql.com
char language
1=UK English
const string t_show_extra_info
std::map< int, string > scale125i2s
a scale from 1 to 5, int to string