00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 string diaButtons( long long key,
00011 string iLabel=" Insert ",
00012 string uLabel=" Update ",
00013 string dLabel=" Delete ",
00014 string rLabel=" Reset New ",
00015 string kLabel=" Keep New "
00016 )
00017 {
00018 string ret;
00019 if( key )
00020 {
00021 if(uLabel.length())
00022 {
00023 ret += "<input type='button' onclick='doUpdate()' name='action' class='action' value='";
00024 ret += uLabel;
00025 ret += "'> ";
00026 }
00027 if( dLabel.length() )
00028 {
00029 ret += "<input type='button' onclick='doDelete()' name='action' class='action' value='";
00030 ret += dLabel;
00031 ret += "'> \n";
00032 }
00033 if( rLabel.length() )
00034 {
00035 ret += "<input type='button' onclick='doReset()' name='action' class='action' value='";
00036 ret += rLabel;
00037 ret += "'> ";
00038 }
00039 if( kLabel.length() )
00040 {
00041 ret += "<input type='button' onclick='doNew()' name='action' class='action' value='";
00042 ret += kLabel;
00043 ret += "'>";
00044 }
00045 }
00046 else
00047 {
00048 if( iLabel.length() )
00049 {
00050 ret += "<input type='button' onclick='doInsert()' name='action' class='action' value='";
00051 ret += iLabel;
00052 ret += "'>";
00053 }
00054 else if( uLabel.length() )
00055 {
00056
00057 ret += "<input type='button' onclick='doInsert()' name='action' class='action' value='";
00058 ret += uLabel;
00059 ret += "'>";
00060 }
00061 }
00062 return ret;
00063 }