Compare commits
No commits in common. "master" and "addfunctions" have entirely different histories.
master
...
addfunctio
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,7 +1,4 @@
|
|||||||
*.o
|
*.o
|
||||||
*~
|
*~
|
||||||
jet-2.0
|
jet-2.0
|
||||||
docs/JetCore.aux
|
|
||||||
docs/JetCore.dvi
|
|
||||||
docs/JetCore.log
|
|
||||||
docs/JetCore.toc
|
|
||||||
|
|||||||
51
Global.cpp
51
Global.cpp
@ -56,4 +56,55 @@ namespace jet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Global::setupFormData(coreutils::ZString &formdata) {
|
||||||
|
coreutils::ZString boundary = formdata.goeol();
|
||||||
|
while(!formdata.eod()) {
|
||||||
|
if(formdata.ifNext("Content-Disposition: form-data;")) {
|
||||||
|
formdata.skipWhitespace();
|
||||||
|
if(formdata.ifNext("name=\"")) {
|
||||||
|
coreutils::ZString name = formdata.getTokenInclude("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._-");
|
||||||
|
if(formdata.ifNext("\"")) {
|
||||||
|
formdata.goeol();
|
||||||
|
formdata.goeol();
|
||||||
|
coreutils::ZString data = formdata.getTokenExclude("-"); // TODO: Fix this parsing. Need a string exclusion method to check for 'boundary'.
|
||||||
|
data.trimCRLF();
|
||||||
|
formdata.ifNext(boundary);
|
||||||
|
int index = 0;
|
||||||
|
coreutils::MString namex;
|
||||||
|
do {
|
||||||
|
namex = "";
|
||||||
|
namex << name << ":" << index++;
|
||||||
|
} while(cgiVariables.count(namex) != 0);
|
||||||
|
cgiVariables[namex] = data;
|
||||||
|
if(formdata.ifNext("--"))
|
||||||
|
break;
|
||||||
|
formdata.goeol();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
throw coreutils::Exception("expecting closing double quote on variable name in received CGI data.");
|
||||||
|
} else
|
||||||
|
throw coreutils::Exception("expecting name subfield in received CGI data.");
|
||||||
|
} else
|
||||||
|
throw coreutils::Exception("expecting Content-Disposition header in received CGI data.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Global::setupFormURLEncoded(coreutils::ZString &formdata) {
|
||||||
|
while(!formdata.eod()) {
|
||||||
|
coreutils::ZString name = formdata.getTokenInclude("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._-");
|
||||||
|
if(formdata.ifNext("=")) {
|
||||||
|
coreutils::MString data = formdata.getTokenExclude("&");
|
||||||
|
formdata.ifNext("&");
|
||||||
|
int index = 0;
|
||||||
|
coreutils::MString namex;
|
||||||
|
do {
|
||||||
|
namex = "";
|
||||||
|
namex << name << ":" << index++;
|
||||||
|
} while(cgiVariables.count(namex) != 0);
|
||||||
|
cgiVariables[namex] = data.fromCGI();
|
||||||
|
} else
|
||||||
|
throw coreutils::Exception("expecting = after name in received CGI data.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
3
Global.h
3
Global.h
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
# include "MString.h"
|
# include "MString.h"
|
||||||
# include "CGIFormattedData.h"
|
# include "CGIFormattedData.h"
|
||||||
# include "CGIFormData.h"
|
|
||||||
# include <map>
|
# include <map>
|
||||||
|
|
||||||
namespace jet {
|
namespace jet {
|
||||||
@ -28,8 +27,8 @@ namespace jet {
|
|||||||
char *errorCursor = NULL;
|
char *errorCursor = NULL;
|
||||||
|
|
||||||
coreutils::CGIFormattedData cookies;
|
coreutils::CGIFormattedData cookies;
|
||||||
coreutils::CGIFormData *cgiData;
|
|
||||||
std::map<coreutils::MString, coreutils::MString> variables;
|
std::map<coreutils::MString, coreutils::MString> variables;
|
||||||
|
std::map<coreutils::MString, coreutils::MString> cgiVariables;
|
||||||
std::map<coreutils::MString, __mysql *> sessions;
|
std::map<coreutils::MString, __mysql *> sessions;
|
||||||
std::map<coreutils::MString, coreutils::MString> headers;
|
std::map<coreutils::MString, coreutils::MString> headers;
|
||||||
std::map<coreutils::MString, coreutils::MString> tags;
|
std::map<coreutils::MString, coreutils::MString> tags;
|
||||||
|
|||||||
123
Operand.cpp
123
Operand.cpp
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
namespace jet {
|
namespace jet {
|
||||||
|
|
||||||
Operand::Operand(coreutils::ZString &in, Tag &tag, bool stop) : in(in), tag(tag) {
|
Operand::Operand(coreutils::ZString &in, Tag &tag) {
|
||||||
|
|
||||||
doubleValue = 0;
|
doubleValue = 0;
|
||||||
|
|
||||||
@ -64,11 +64,6 @@ namespace jet {
|
|||||||
Operand op(parm1.string, tag);
|
Operand op(parm1.string, tag);
|
||||||
string = op.string;
|
string = op.string;
|
||||||
isNumber = op.isNumber;
|
isNumber = op.isNumber;
|
||||||
if(isNumber) {
|
|
||||||
doubleValue = op.doubleValue;
|
|
||||||
string = std::format("{:.12f}", doubleValue);
|
|
||||||
string.removeTrailingZeros();
|
|
||||||
}
|
|
||||||
boolean = op.boolean;
|
boolean = op.boolean;
|
||||||
} else
|
} else
|
||||||
throw coreutils::Exception("Expecting ) at end of EXPR expression.");
|
throw coreutils::Exception("Expecting ) at end of EXPR expression.");
|
||||||
@ -151,63 +146,9 @@ namespace jet {
|
|||||||
} else
|
} else
|
||||||
throw coreutils::Exception("Expecting ) at end of ABS expression.");
|
throw coreutils::Exception("Expecting ) at end of ABS expression.");
|
||||||
} else if(in.ifNextIgnoreCase("MAX")) {
|
} else if(in.ifNextIgnoreCase("MAX")) {
|
||||||
if(!in.ifNext("("))
|
|
||||||
throw coreutils::Exception("Expecting ( for MAX parameters.");
|
|
||||||
Operand *parm = new Operand(in, tag);
|
|
||||||
string = parm->string;
|
|
||||||
doubleValue = parm->doubleValue;
|
|
||||||
isNumber = parm->isNumber;
|
|
||||||
delete parm;
|
|
||||||
while(in.ifNext(",")) {
|
|
||||||
parm = new Operand(in, tag);
|
|
||||||
if(isNumber != parm->isNumber)
|
|
||||||
throw coreutils::Exception("All parameters in MAX expression must be same type.");
|
|
||||||
if(isNumber) {
|
|
||||||
if(parm->doubleValue > doubleValue) {
|
|
||||||
doubleValue = parm->doubleValue;
|
|
||||||
string = parm->string;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(parm->string > string) {
|
|
||||||
doubleValue = parm->doubleValue;
|
|
||||||
string = parm->string;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
delete parm;
|
|
||||||
}
|
|
||||||
if(!in.ifNext(")")) {
|
|
||||||
throw coreutils::Exception("Expecting ) at end of MAX expression.");
|
|
||||||
}
|
|
||||||
string.removeTrailingZeros();
|
|
||||||
} else if(in.ifNextIgnoreCase("MIN")) {
|
} else if(in.ifNextIgnoreCase("MIN")) {
|
||||||
if(!in.ifNext("("))
|
|
||||||
throw coreutils::Exception("Expecting ( for MIN parameters.");
|
|
||||||
Operand *parm = new Operand(in, tag);
|
|
||||||
string = parm->string;
|
|
||||||
doubleValue = parm->doubleValue;
|
|
||||||
isNumber = parm->isNumber;
|
|
||||||
delete parm;
|
|
||||||
while(in.ifNext(",")) {
|
|
||||||
parm = new Operand(in, tag);
|
|
||||||
if(isNumber != parm->isNumber)
|
|
||||||
throw coreutils::Exception("All parameters in MIN expression must be same type.");
|
|
||||||
if(isNumber) {
|
|
||||||
if(parm->doubleValue < doubleValue) {
|
|
||||||
doubleValue = parm->doubleValue;
|
|
||||||
string = parm->string;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(parm->string < string) {
|
|
||||||
doubleValue = parm->doubleValue;
|
|
||||||
string = parm->string;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
delete parm;
|
|
||||||
}
|
|
||||||
if(!in.ifNext(")")) {
|
|
||||||
throw coreutils::Exception("Expecting ) at end of MIN expression.");
|
|
||||||
}
|
|
||||||
string.removeTrailingZeros();
|
|
||||||
} else if(in.ifNextIgnoreCase("POW")) {
|
} else if(in.ifNextIgnoreCase("POW")) {
|
||||||
if(!in.ifNext("("))
|
if(!in.ifNext("("))
|
||||||
throw coreutils::Exception("Expecting ( for POW parameters.");
|
throw coreutils::Exception("Expecting ( for POW parameters.");
|
||||||
@ -333,27 +274,9 @@ namespace jet {
|
|||||||
} else
|
} else
|
||||||
throw coreutils::Exception("Expecting ) at end of TRUNC expression.");
|
throw coreutils::Exception("Expecting ) at end of TRUNC expression.");
|
||||||
} else if(in.ifNextIgnoreCase("CEIL")) {
|
} else if(in.ifNextIgnoreCase("CEIL")) {
|
||||||
if(!in.ifNext("("))
|
|
||||||
throw coreutils::Exception("Expecting ( for CEIL parameters.");
|
|
||||||
Operand parm1(in, tag);
|
|
||||||
if(in.ifNext(")")) {
|
|
||||||
doubleValue = ceil(parm1.doubleValue);
|
|
||||||
isNumber = true;
|
|
||||||
string = std::format("{:.12f}", doubleValue);
|
|
||||||
string.removeTrailingZeros();
|
|
||||||
} else
|
|
||||||
throw coreutils::Exception("Expecting ) at end of CEIL expression.");
|
|
||||||
} else if(in.ifNextIgnoreCase("FLOOR")) {
|
} else if(in.ifNextIgnoreCase("FLOOR")) {
|
||||||
if(!in.ifNext("("))
|
|
||||||
throw coreutils::Exception("Expecting ( for FLOOR parameters.");
|
|
||||||
Operand parm1(in, tag);
|
|
||||||
if(in.ifNext(")")) {
|
|
||||||
doubleValue = floor(parm1.doubleValue);
|
|
||||||
isNumber = true;
|
|
||||||
string = std::format("{:.12f}", doubleValue);
|
|
||||||
string.removeTrailingZeros();
|
|
||||||
} else
|
|
||||||
throw coreutils::Exception("Expecting ) at end of FLOOR expression.");
|
|
||||||
} else if(in.ifNextIgnoreCase("UNIXTIME")) {
|
} else if(in.ifNextIgnoreCase("UNIXTIME")) {
|
||||||
if(!in.ifNext("("))
|
if(!in.ifNext("("))
|
||||||
throw coreutils::Exception("Expecting ( for UNIXTIME.");
|
throw coreutils::Exception("Expecting ( for UNIXTIME.");
|
||||||
@ -364,21 +287,7 @@ namespace jet {
|
|||||||
int unixtime = seconds_since_epoch.count();
|
int unixtime = seconds_since_epoch.count();
|
||||||
string << unixtime;
|
string << unixtime;
|
||||||
} else
|
} else
|
||||||
throw coreutils::Exception("Expecting ) at end of UNIXTIME.");
|
throw coreutils::Exception("Expecting ) at end of UNIXTIME.");
|
||||||
}
|
|
||||||
else if(in.ifNextIgnoreCase("DATEDIFF")) {
|
|
||||||
if(!in.ifNext("("))
|
|
||||||
throw coreutils::Exception("Expecting ( for DATEDIFF.");
|
|
||||||
Operand parm1(in, tag);
|
|
||||||
if(!in.ifNext(","))
|
|
||||||
throw coreutils::Exception("Expecting , in DATEDIFF expression.");
|
|
||||||
Operand parm2(in, tag);
|
|
||||||
if(in.ifNext(")")) {
|
|
||||||
|
|
||||||
// TODO: Implement DATEDIFF.
|
|
||||||
|
|
||||||
} else
|
|
||||||
throw coreutils::Exception("Expecting ) at end of DATEDIFF expression.");
|
|
||||||
} else if(in.ifNextIgnoreCase("true")) {
|
} else if(in.ifNextIgnoreCase("true")) {
|
||||||
boolean = true;
|
boolean = true;
|
||||||
string = "true";
|
string = "true";
|
||||||
@ -397,15 +306,7 @@ namespace jet {
|
|||||||
throw coreutils::Exception("operand is not valid.");
|
throw coreutils::Exception("operand is not valid.");
|
||||||
|
|
||||||
in.skipWhitespace();
|
in.skipWhitespace();
|
||||||
|
|
||||||
if(!stop)
|
|
||||||
parseOperator();
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int Operand::parseOperator() {
|
|
||||||
|
|
||||||
if(in.ifNext("!=") || in.ifNext("<>")) {
|
if(in.ifNext("!=") || in.ifNext("<>")) {
|
||||||
Operand op(in, tag);
|
Operand op(in, tag);
|
||||||
if(isNumber && op.isNumber) {
|
if(isNumber && op.isNumber) {
|
||||||
@ -550,8 +451,6 @@ namespace jet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(in.ifNext("+")) {
|
if(in.ifNext("+")) {
|
||||||
if(isNumber) {
|
if(isNumber) {
|
||||||
Operand op(in, tag);
|
Operand op(in, tag);
|
||||||
@ -576,30 +475,28 @@ namespace jet {
|
|||||||
throw coreutils::Exception("operand is not a number.");
|
throw coreutils::Exception("operand is not a number.");
|
||||||
} else if(in.ifNext("*")) {
|
} else if(in.ifNext("*")) {
|
||||||
if(isNumber) {
|
if(isNumber) {
|
||||||
Operand op(in, tag, true);
|
Operand op(in, tag);
|
||||||
if(op.isNumber) {
|
if(op.isNumber) {
|
||||||
doubleValue *= op.doubleValue;
|
doubleValue *= op.doubleValue;
|
||||||
string = std::format("{:.12f}", doubleValue);
|
string = std::format("{:.12f}", doubleValue);
|
||||||
string.removeTrailingZeros();
|
string.removeTrailingZeros();
|
||||||
parseOperator();
|
|
||||||
} else
|
} else
|
||||||
throw coreutils::Exception("operand is not a number.");
|
throw coreutils::Exception("operand is not a number.");
|
||||||
} else
|
} else
|
||||||
throw coreutils::Exception("operand is not a number.");
|
throw coreutils::Exception("operand is not a number.");
|
||||||
} else if(in.ifNext("/")) {
|
} else if(in.ifNext("/")) {
|
||||||
if(isNumber) {
|
if(isNumber) {
|
||||||
Operand op(in, tag, true);
|
Operand op(in, tag);
|
||||||
if(op.isNumber) {
|
if(op.isNumber) {
|
||||||
doubleValue /= op.doubleValue;
|
doubleValue /= op.doubleValue;
|
||||||
string = std::format("{:.12f}", doubleValue);
|
string = std::format("{:.12f}", doubleValue);
|
||||||
string.removeTrailingZeros();
|
string.removeTrailingZeros();
|
||||||
parseOperator();
|
|
||||||
} else
|
} else
|
||||||
throw coreutils::Exception("operand is not a number.");
|
throw coreutils::Exception("operand is not a number.");
|
||||||
} else
|
} else
|
||||||
throw coreutils::Exception("operand is not a number.");
|
throw coreutils::Exception("operand is not a number.");
|
||||||
}
|
} else
|
||||||
return true;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,11 +10,8 @@ namespace jet {
|
|||||||
class Operand {
|
class Operand {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Operand(coreutils::ZString &in, Tag &tag, bool stop = false);
|
Operand(coreutils::ZString &in, Tag &tag);
|
||||||
|
|
||||||
coreutils::ZString ∈
|
|
||||||
Tag &tag;
|
|
||||||
|
|
||||||
bool isNumber;
|
bool isNumber;
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -26,8 +23,6 @@ namespace jet {
|
|||||||
coreutils::MString string = "";
|
coreutils::MString string = "";
|
||||||
|
|
||||||
double doubleValue;
|
double doubleValue;
|
||||||
|
|
||||||
int parseOperator();
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@ -6,7 +6,7 @@ namespace jet {
|
|||||||
SessionId::SessionId() {
|
SessionId::SessionId() {
|
||||||
unsigned char hashit[64];
|
unsigned char hashit[64];
|
||||||
unsigned char hash[SHA_DIGEST_LENGTH];
|
unsigned char hash[SHA_DIGEST_LENGTH];
|
||||||
setSize(40);
|
setSize(64);
|
||||||
sprintf((char *)hashit, "JETSESSION%ld", time(0));
|
sprintf((char *)hashit, "JETSESSION%ld", time(0));
|
||||||
SHA1(hashit, strlen((char *)hashit), hash);
|
SHA1(hashit, strlen((char *)hashit), hash);
|
||||||
sprintf(getData(), "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
|
sprintf(getData(), "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
|
||||||
|
|||||||
15
Tag.cpp
15
Tag.cpp
@ -407,14 +407,11 @@ namespace jet {
|
|||||||
else
|
else
|
||||||
return parent->keywords[name];
|
return parent->keywords[name];
|
||||||
} else if(variable.ifNext(":")) {
|
} else if(variable.ifNext(":")) {
|
||||||
if(global.cgi) {
|
renderVariableName(variable, name, modifier);
|
||||||
renderVariableName(variable, name, modifier);
|
if(name.find(":") == -1) {
|
||||||
if(name.find(":") == -1) {
|
name << ":0";
|
||||||
name << ":0";
|
}
|
||||||
}
|
return processModifier(global.cgiVariables[name], modifier);
|
||||||
return processModifier(global.cgiData[name], modifier);
|
|
||||||
} else
|
|
||||||
throw coreutils::Exception("cgi variable only allowed in cgi mode.");
|
|
||||||
} else if(variable.ifNext("@")) {
|
} else if(variable.ifNext("@")) {
|
||||||
// TODO: should only allow session variables. Allow substitution.
|
// TODO: should only allow session variables. Allow substitution.
|
||||||
} else if(variable.ifNext("%")) {
|
} else if(variable.ifNext("%")) {
|
||||||
@ -422,7 +419,7 @@ namespace jet {
|
|||||||
return getenv(name.c_str());
|
return getenv(name.c_str());
|
||||||
} else if(variable.ifNext("^")) {
|
} else if(variable.ifNext("^")) {
|
||||||
renderVariableName(variable, name, modifier);
|
renderVariableName(variable, name, modifier);
|
||||||
return global.cookies.data[name];
|
return global.cookies.data[variable];
|
||||||
} else {
|
} else {
|
||||||
renderVariableName(variable, name, modifier);
|
renderVariableName(variable, name, modifier);
|
||||||
name.split(".");
|
name.split(".");
|
||||||
|
|||||||
@ -13,8 +13,8 @@ namespace jet {
|
|||||||
|
|
||||||
if(global.cgi) {
|
if(global.cgi) {
|
||||||
outFile << "*** CGI VARIABLES ***" << std::endl;
|
outFile << "*** CGI VARIABLES ***" << std::endl;
|
||||||
// for (auto i = global.cgiVariables.begin(); i != global.cgiVariables.end(); i++)
|
for (auto i = global.cgiVariables.begin(); i != global.cgiVariables.end(); i++)
|
||||||
// outFile << i->first << "=[" << i->second << "]" << std::endl;
|
outFile << i->first << "=[" << i->second << "]" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
outFile << "*** GLOBAL VARIABLES ***" << std::endl;
|
outFile << "*** GLOBAL VARIABLES ***" << std::endl;
|
||||||
|
|||||||
31
__jet.cpp
31
__jet.cpp
@ -2,7 +2,6 @@
|
|||||||
#include "Exception.h"
|
#include "Exception.h"
|
||||||
#include "Global.h"
|
#include "Global.h"
|
||||||
#include "SessionId.h"
|
#include "SessionId.h"
|
||||||
#include <stdlib.h>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
@ -16,28 +15,32 @@ namespace jet {
|
|||||||
if(keywordDefined("sessiondir")) {
|
if(keywordDefined("sessiondir")) {
|
||||||
global.session = true;
|
global.session = true;
|
||||||
global.cookies = getenv("HTTP_COOKIE");
|
global.cookies = getenv("HTTP_COOKIE");
|
||||||
if(global.cookies.data["session"] != NULL) {
|
|
||||||
|
// if request_has_cookie then
|
||||||
// pull sessionfile from sessiondir.
|
// pull sessionfile from sessiondir.
|
||||||
// if last activity time is expired then ignore.
|
// if last activity time is expired then ignore.
|
||||||
// follow sessiontimeoutredirecturl.
|
// follow sessiontimeoutredirecturl.
|
||||||
} else {
|
// else
|
||||||
SessionId sessionId;
|
SessionId sessionId;
|
||||||
global.headers["Set-Cookie"] << "session=" << sessionId;
|
global.headers["Set-Cookie"] << "session=" << sessionId;
|
||||||
global.cookies.data["session"] = sessionId;
|
if(keywordDefined("sessiontimeout")) {
|
||||||
if(keywordDefined("sessiontimeout")) {
|
time_t timeout = time(0) + keywords["sessiontimeout"].asInteger();
|
||||||
time_t timeout = time(0) + keywords["sessiontimeout"].asInteger();
|
|
||||||
}
|
|
||||||
// also save last activity time in session file.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// also save last activity time in session file.
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
coreutils::ZString requestMethod(getenv("REQUEST_METHOD"));
|
coreutils::ZString requestMethod(getenv("REQUEST_METHOD"));
|
||||||
if(requestMethod == "POST") {
|
if(requestMethod == "POST") {
|
||||||
coreutils::ZString contentLength(getenv("CONTENT_LENGTH"));
|
coreutils::ZString contentLength(getenv("CONTENT_LENGTH"));
|
||||||
coreutils::ZString contentType(getenv("CONTENT_TYPE"));
|
coreutils::ZString contentType(getenv("CONTENT_TYPE"));
|
||||||
ZString boundary = "xxxx";
|
|
||||||
|
|
||||||
global.cgiData = new coreutils::CGIFormData(0, contentType, contentLength.asInteger(), boundary);
|
if(contentType == "multipart/form-data")
|
||||||
|
coreutils::IMFMultipart postdata(0, "");
|
||||||
|
|
||||||
|
// else if(contentType == "application/x-www-form-urlencoded")
|
||||||
|
// global.setupFormURLEncoded(postdata);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
processContainer(container, NULL, true);
|
processContainer(container, NULL, true);
|
||||||
|
|||||||
3
__jet.h
3
__jet.h
@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
#include "Tag.h"
|
#include "Tag.h"
|
||||||
#include "ZString.h"
|
#include "ZString.h"
|
||||||
//#include "IMFMessage.h"
|
#include "IMFRequest.h"
|
||||||
|
#include "IMFMessage.h"
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
namespace jet {
|
namespace jet {
|
||||||
|
|||||||
86
docs/JetCore.aux
Normal file
86
docs/JetCore.aux
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
\relax
|
||||||
|
\@writefile{toc}{\contentsline {chapter}{\numberline {1}Introduction}{5}{}\protected@file@percent }
|
||||||
|
\@writefile{lof}{\addvspace {10\p@ }}
|
||||||
|
\@writefile{lot}{\addvspace {10\p@ }}
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {1.1}Use Cases}{5}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {1.1.1}World Wide Web Site}{5}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {1.1.2}API Handling}{5}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {1.1.3}Asterisk Dial Plan Generator Tool}{5}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {chapter}{\numberline {2}Tags and Attributes}{7}{}\protected@file@percent }
|
||||||
|
\@writefile{lof}{\addvspace {10\p@ }}
|
||||||
|
\@writefile{lot}{\addvspace {10\p@ }}
|
||||||
|
\@writefile{toc}{\contentsline {chapter}{\numberline {3}User Defined Tags and Tag Libraries}{9}{}\protected@file@percent }
|
||||||
|
\@writefile{lof}{\addvspace {10\p@ }}
|
||||||
|
\@writefile{lot}{\addvspace {10\p@ }}
|
||||||
|
\@writefile{toc}{\contentsline {chapter}{\numberline {4}Variables and Variable Types}{11}{}\protected@file@percent }
|
||||||
|
\@writefile{lof}{\addvspace {10\p@ }}
|
||||||
|
\@writefile{lot}{\addvspace {10\p@ }}
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {4.1}Global Variables}{11}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {4.2}Local Variables}{12}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {4.3}Keyword Variables}{12}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {4.4}Environment Variables}{12}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {4.5}CGI Variables}{12}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {chapter}{\numberline {5}Expressions}{13}{}\protected@file@percent }
|
||||||
|
\@writefile{lof}{\addvspace {10\p@ }}
|
||||||
|
\@writefile{lot}{\addvspace {10\p@ }}
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {5.1}Operators}{13}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {5.1.1}Arithmetic Operators}{13}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {5.1.2}Boolean Operators}{13}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {5.2}Function Reference}{13}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {5.3}Date Functions}{13}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {5.3.1}unixtime}{13}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {5.4}Math Functions}{13}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {5.4.1}abs}{13}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {5.4.2}acos}{13}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {5.4.3}asin}{14}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {5.4.4}atan}{14}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {5.4.5}cos}{14}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {5.4.6}max}{14}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {5.4.7}min}{14}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {5.4.8}pow}{14}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {5.4.9}random}{14}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {5.4.10}sin}{14}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {5.5}String Functions}{14}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {5.5.1}concat}{14}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {5.5.2}integer}{14}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {5.5.3}left}{14}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {5.5.4}reverse}{14}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {5.5.5}right}{14}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {5.5.6}round}{14}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {5.5.7}substring}{14}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {5.5.8}tolower}{15}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {5.5.9}toupper}{15}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {5.5.10}trim}{15}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {5.5.11}expr}{15}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {chapter}{\numberline {6}Common Gateway Interface Features}{17}{}\protected@file@percent }
|
||||||
|
\@writefile{lof}{\addvspace {10\p@ }}
|
||||||
|
\@writefile{lot}{\addvspace {10\p@ }}
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {6.1}Session Control}{17}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {chapter}{\numberline {7}Tag Reference}{19}{}\protected@file@percent }
|
||||||
|
\@writefile{lof}{\addvspace {10\p@ }}
|
||||||
|
\@writefile{lot}{\addvspace {10\p@ }}
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {7.1}call}{19}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {7.2}comment}{19}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {7.3}cookie}{20}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {7.4}dump}{20}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {7.5}exclude}{20}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {7.6}expr}{20}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {7.7}for}{20}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {7.8}header}{20}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {7.9}if/else}{20}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {7.10}ifrow/else}{21}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {7.11}include}{21}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {7.12}jet}{21}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {7.13}mysql}{21}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {7.14}read}{21}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {7.15}set}{22}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {7.16}sql}{22}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {7.17}stream}{22}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {7.18}system}{22}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {7.19}tag}{22}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {7.20}until}{23}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {7.21}while}{23}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {7.22}whiledir}{23}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {7.23}whilerow}{23}{}\protected@file@percent }
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {7.24}write}{23}{}\protected@file@percent }
|
||||||
|
\gdef \@abspage@last{23}
|
||||||
BIN
docs/JetCore.dvi
Normal file
BIN
docs/JetCore.dvi
Normal file
Binary file not shown.
126
docs/JetCore.log
Normal file
126
docs/JetCore.log
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/Debian) (preloaded format=pdflatex 2024.11.17) 11 NOV 2025 10:01
|
||||||
|
entering extended mode
|
||||||
|
restricted \write18 enabled.
|
||||||
|
%&-line parsing enabled.
|
||||||
|
**JetCore.tex
|
||||||
|
(./JetCore.tex
|
||||||
|
LaTeX2e <2023-11-01> patch level 1
|
||||||
|
L3 programming layer <2024-01-22>
|
||||||
|
(/usr/share/texlive/texmf-dist/tex/latex/base/book.cls
|
||||||
|
Document Class: book 2023/05/17 v1.4n Standard LaTeX document class
|
||||||
|
(/usr/share/texlive/texmf-dist/tex/latex/base/bk10.clo
|
||||||
|
File: bk10.clo 2023/05/17 v1.4n Standard LaTeX file (size option)
|
||||||
|
)
|
||||||
|
\c@part=\count187
|
||||||
|
\c@chapter=\count188
|
||||||
|
\c@section=\count189
|
||||||
|
\c@subsection=\count190
|
||||||
|
\c@subsubsection=\count191
|
||||||
|
\c@paragraph=\count192
|
||||||
|
\c@subparagraph=\count193
|
||||||
|
\c@figure=\count194
|
||||||
|
\c@table=\count195
|
||||||
|
\abovecaptionskip=\skip48
|
||||||
|
\belowcaptionskip=\skip49
|
||||||
|
\bibindent=\dimen140
|
||||||
|
)
|
||||||
|
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
|
||||||
|
File: l3backend-pdftex.def 2024-01-04 L3 backend support: PDF output (pdfTeX)
|
||||||
|
\l__color_backend_stack_int=\count196
|
||||||
|
\l__pdf_internal_box=\box51
|
||||||
|
)
|
||||||
|
(./JetCore.aux)
|
||||||
|
\openout1 = `JetCore.aux'.
|
||||||
|
|
||||||
|
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 7.
|
||||||
|
LaTeX Font Info: ... okay on input line 7.
|
||||||
|
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 7.
|
||||||
|
LaTeX Font Info: ... okay on input line 7.
|
||||||
|
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 7.
|
||||||
|
LaTeX Font Info: ... okay on input line 7.
|
||||||
|
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 7.
|
||||||
|
LaTeX Font Info: ... okay on input line 7.
|
||||||
|
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 7.
|
||||||
|
LaTeX Font Info: ... okay on input line 7.
|
||||||
|
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 7.
|
||||||
|
LaTeX Font Info: ... okay on input line 7.
|
||||||
|
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 7.
|
||||||
|
LaTeX Font Info: ... okay on input line 7.
|
||||||
|
LaTeX Font Info: External font `cmex10' loaded for size
|
||||||
|
(Font) <12> on input line 9.
|
||||||
|
LaTeX Font Info: External font `cmex10' loaded for size
|
||||||
|
(Font) <8> on input line 9.
|
||||||
|
LaTeX Font Info: External font `cmex10' loaded for size
|
||||||
|
(Font) <6> on input line 9.
|
||||||
|
[1
|
||||||
|
|
||||||
|
|
||||||
|
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2
|
||||||
|
|
||||||
|
]
|
||||||
|
(./JetCore.toc
|
||||||
|
LaTeX Font Info: External font `cmex10' loaded for size
|
||||||
|
(Font) <7> on input line 2.
|
||||||
|
LaTeX Font Info: External font `cmex10' loaded for size
|
||||||
|
(Font) <5> on input line 2.
|
||||||
|
[3])
|
||||||
|
\tf@toc=\write3
|
||||||
|
\openout3 = `JetCore.toc'.
|
||||||
|
|
||||||
|
[4]
|
||||||
|
Chapter 1.
|
||||||
|
[5
|
||||||
|
|
||||||
|
] [6
|
||||||
|
|
||||||
|
]
|
||||||
|
Chapter 2.
|
||||||
|
[7] [8
|
||||||
|
|
||||||
|
]
|
||||||
|
Chapter 3.
|
||||||
|
[9] [10
|
||||||
|
|
||||||
|
]
|
||||||
|
Chapter 4.
|
||||||
|
[11{/usr/share/texmf/fonts/enc/dvips/cm-super/cm-super-ts1.enc}] [12]
|
||||||
|
Chapter 5.
|
||||||
|
[13
|
||||||
|
|
||||||
|
] [14] [15] [16
|
||||||
|
|
||||||
|
]
|
||||||
|
Chapter 6.
|
||||||
|
[17] [18]
|
||||||
|
Chapter 7.
|
||||||
|
[19
|
||||||
|
|
||||||
|
] [20] [21] [22] [23] (./JetCore.aux)
|
||||||
|
***********
|
||||||
|
LaTeX2e <2023-11-01> patch level 1
|
||||||
|
L3 programming layer <2024-01-22>
|
||||||
|
***********
|
||||||
|
)
|
||||||
|
Here is how much of TeX's memory you used:
|
||||||
|
508 strings out of 474222
|
||||||
|
9280 string characters out of 5748732
|
||||||
|
1936975 words of memory out of 5000000
|
||||||
|
22826 multiletter control sequences out of 15000+600000
|
||||||
|
564392 words of font info for 57 fonts, out of 8000000 for 9000
|
||||||
|
1141 hyphenation exceptions out of 8191
|
||||||
|
35i,6n,50p,280b,189s stack positions out of 10000i,1000n,20000p,200000b,200000s
|
||||||
|
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb></us
|
||||||
|
r/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb></usr/shar
|
||||||
|
e/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></usr/share/texli
|
||||||
|
ve/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></usr/share/texlive/texm
|
||||||
|
f-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb></usr/share/texlive/texmf-dist/
|
||||||
|
fonts/type1/public/amsfonts/cm/cmsl10.pfb></usr/share/texlive/texmf-dist/fonts/
|
||||||
|
type1/public/amsfonts/cm/cmtt10.pfb></usr/share/texmf/fonts/type1/public/cm-sup
|
||||||
|
er/sfrm1000.pfb>
|
||||||
|
Output written on JetCore.pdf (23 pages, 138298 bytes).
|
||||||
|
PDF statistics:
|
||||||
|
119 PDF objects out of 1000 (max. 8388607)
|
||||||
|
77 compressed objects within 1 object stream
|
||||||
|
0 named destinations out of 1000 (max. 500000)
|
||||||
|
1 words of extra memory for PDF output out of 10000 (max. 10000000)
|
||||||
|
|
||||||
BIN
docs/JetCore.pdf
BIN
docs/JetCore.pdf
Binary file not shown.
BIN
docs/JetCore.synctex.gz
Normal file
BIN
docs/JetCore.synctex.gz
Normal file
Binary file not shown.
@ -1,6 +1,4 @@
|
|||||||
\documentclass{book}
|
\documentclass{book}
|
||||||
\usepackage{fontspec}
|
|
||||||
\setmainfont{Roboto}
|
|
||||||
|
|
||||||
\title{JET Extension Tags}
|
\title{JET Extension Tags}
|
||||||
\author{Bradford Matthew Arant Sr.}
|
\author{Bradford Matthew Arant Sr.}
|
||||||
@ -168,19 +166,15 @@ operators, as follows:
|
|||||||
|
|
||||||
\section{Date Functions}
|
\section{Date Functions}
|
||||||
|
|
||||||
\subsection{datediff}
|
|
||||||
|
|
||||||
\subsection{unixtime}
|
\subsection{unixtime}
|
||||||
|
|
||||||
\section{Math Functions}
|
\section{Math Functions}
|
||||||
|
|
||||||
\subsection{abs}
|
\subsection{abs}
|
||||||
|
|
||||||
Returns the absolute value of the given parameter.
|
|
||||||
|
|
||||||
\subsection{acos}
|
\subsection{acos}
|
||||||
|
|
||||||
Returns to arc cosine of the given parameter.
|
Returns to arc-cosine of the given parameter.
|
||||||
|
|
||||||
\subsection{asin}
|
\subsection{asin}
|
||||||
|
|
||||||
@ -188,20 +182,10 @@ Returns to arc cosine of the given parameter.
|
|||||||
|
|
||||||
\subsection{cos}
|
\subsection{cos}
|
||||||
|
|
||||||
\subsection{floor}
|
|
||||||
|
|
||||||
\subsection{ceil}
|
|
||||||
|
|
||||||
\subsection{max}
|
\subsection{max}
|
||||||
|
|
||||||
Returns the greatest value item from a list of comma seperated values in a
|
|
||||||
list.
|
|
||||||
|
|
||||||
\subsection{min}
|
\subsection{min}
|
||||||
|
|
||||||
Returns the least value item from a list of comma seperated values in
|
|
||||||
a list.
|
|
||||||
|
|
||||||
\subsection{pow}
|
\subsection{pow}
|
||||||
|
|
||||||
\subsection{random}
|
\subsection{random}
|
||||||
@ -212,15 +196,11 @@ Use the random function to return a random number between 0 and 1.
|
|||||||
|
|
||||||
\section{String Functions}
|
\section{String Functions}
|
||||||
|
|
||||||
String functions are provided to accelerate the building and parsing of
|
String functions are provided to accelerate the building and parsing of strings passed into the expression. Numbers can be treated as a string or a number depending on the function called and the data state of the values being manipulated.
|
||||||
strings passed into the expression. Numbers can be treated as a string or
|
|
||||||
a number depending on the function called and the data state of the values
|
|
||||||
being manipulated.
|
|
||||||
|
|
||||||
\subsection{concat}
|
\subsection{concat}
|
||||||
|
|
||||||
The concat function is used to assemble a string by concatenating one or
|
The concat tag is used to assemble a string by concatenating one or more values to formulate the resulting string.
|
||||||
more values to formulate the resulting string.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -228,12 +208,6 @@ more values to formulate the resulting string.
|
|||||||
|
|
||||||
\subsection{left}
|
\subsection{left}
|
||||||
|
|
||||||
Use the left function to return the number of characters specified in
|
|
||||||
the second parameter from the parameter passed as the first parameter.
|
|
||||||
|
|
||||||
If the number of characters to return is greater than the length of
|
|
||||||
the first parameter then the entire parameter is returned.
|
|
||||||
|
|
||||||
\subsection{reverse}
|
\subsection{reverse}
|
||||||
|
|
||||||
\subsection{right}
|
\subsection{right}
|
||||||
@ -568,4 +542,4 @@ a container to process for each row retrieved by the sql statement.
|
|||||||
|
|
||||||
Use the write tag to write data to the local file system.
|
Use the write tag to write data to the local file system.
|
||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
70
docs/JetCore.toc
Normal file
70
docs/JetCore.toc
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
\contentsline {chapter}{\numberline {1}Introduction}{5}{}%
|
||||||
|
\contentsline {section}{\numberline {1.1}Use Cases}{5}{}%
|
||||||
|
\contentsline {subsection}{\numberline {1.1.1}World Wide Web Site}{5}{}%
|
||||||
|
\contentsline {subsection}{\numberline {1.1.2}API Handling}{5}{}%
|
||||||
|
\contentsline {subsection}{\numberline {1.1.3}Asterisk Dial Plan Generator Tool}{5}{}%
|
||||||
|
\contentsline {chapter}{\numberline {2}Tags and Attributes}{7}{}%
|
||||||
|
\contentsline {chapter}{\numberline {3}User Defined Tags and Tag Libraries}{9}{}%
|
||||||
|
\contentsline {chapter}{\numberline {4}Variables and Variable Types}{11}{}%
|
||||||
|
\contentsline {section}{\numberline {4.1}Global Variables}{11}{}%
|
||||||
|
\contentsline {section}{\numberline {4.2}Local Variables}{12}{}%
|
||||||
|
\contentsline {section}{\numberline {4.3}Keyword Variables}{12}{}%
|
||||||
|
\contentsline {section}{\numberline {4.4}Environment Variables}{12}{}%
|
||||||
|
\contentsline {section}{\numberline {4.5}CGI Variables}{12}{}%
|
||||||
|
\contentsline {chapter}{\numberline {5}Expressions}{13}{}%
|
||||||
|
\contentsline {section}{\numberline {5.1}Operators}{13}{}%
|
||||||
|
\contentsline {subsection}{\numberline {5.1.1}Arithmetic Operators}{13}{}%
|
||||||
|
\contentsline {subsection}{\numberline {5.1.2}Boolean Operators}{13}{}%
|
||||||
|
\contentsline {section}{\numberline {5.2}Function Reference}{13}{}%
|
||||||
|
\contentsline {section}{\numberline {5.3}Date Functions}{13}{}%
|
||||||
|
\contentsline {subsection}{\numberline {5.3.1}unixtime}{13}{}%
|
||||||
|
\contentsline {section}{\numberline {5.4}Math Functions}{13}{}%
|
||||||
|
\contentsline {subsection}{\numberline {5.4.1}abs}{13}{}%
|
||||||
|
\contentsline {subsection}{\numberline {5.4.2}acos}{13}{}%
|
||||||
|
\contentsline {subsection}{\numberline {5.4.3}asin}{14}{}%
|
||||||
|
\contentsline {subsection}{\numberline {5.4.4}atan}{14}{}%
|
||||||
|
\contentsline {subsection}{\numberline {5.4.5}cos}{14}{}%
|
||||||
|
\contentsline {subsection}{\numberline {5.4.6}max}{14}{}%
|
||||||
|
\contentsline {subsection}{\numberline {5.4.7}min}{14}{}%
|
||||||
|
\contentsline {subsection}{\numberline {5.4.8}pow}{14}{}%
|
||||||
|
\contentsline {subsection}{\numberline {5.4.9}random}{14}{}%
|
||||||
|
\contentsline {subsection}{\numberline {5.4.10}sin}{14}{}%
|
||||||
|
\contentsline {section}{\numberline {5.5}String Functions}{14}{}%
|
||||||
|
\contentsline {subsection}{\numberline {5.5.1}concat}{14}{}%
|
||||||
|
\contentsline {subsection}{\numberline {5.5.2}integer}{14}{}%
|
||||||
|
\contentsline {subsection}{\numberline {5.5.3}left}{14}{}%
|
||||||
|
\contentsline {subsection}{\numberline {5.5.4}reverse}{14}{}%
|
||||||
|
\contentsline {subsection}{\numberline {5.5.5}right}{14}{}%
|
||||||
|
\contentsline {subsection}{\numberline {5.5.6}round}{14}{}%
|
||||||
|
\contentsline {subsection}{\numberline {5.5.7}substring}{14}{}%
|
||||||
|
\contentsline {subsection}{\numberline {5.5.8}tolower}{15}{}%
|
||||||
|
\contentsline {subsection}{\numberline {5.5.9}toupper}{15}{}%
|
||||||
|
\contentsline {subsection}{\numberline {5.5.10}trim}{15}{}%
|
||||||
|
\contentsline {subsection}{\numberline {5.5.11}expr}{15}{}%
|
||||||
|
\contentsline {chapter}{\numberline {6}Common Gateway Interface Features}{17}{}%
|
||||||
|
\contentsline {section}{\numberline {6.1}Session Control}{17}{}%
|
||||||
|
\contentsline {chapter}{\numberline {7}Tag Reference}{19}{}%
|
||||||
|
\contentsline {section}{\numberline {7.1}call}{19}{}%
|
||||||
|
\contentsline {section}{\numberline {7.2}comment}{19}{}%
|
||||||
|
\contentsline {section}{\numberline {7.3}cookie}{20}{}%
|
||||||
|
\contentsline {section}{\numberline {7.4}dump}{20}{}%
|
||||||
|
\contentsline {section}{\numberline {7.5}exclude}{20}{}%
|
||||||
|
\contentsline {section}{\numberline {7.6}expr}{20}{}%
|
||||||
|
\contentsline {section}{\numberline {7.7}for}{20}{}%
|
||||||
|
\contentsline {section}{\numberline {7.8}header}{20}{}%
|
||||||
|
\contentsline {section}{\numberline {7.9}if/else}{20}{}%
|
||||||
|
\contentsline {section}{\numberline {7.10}ifrow/else}{21}{}%
|
||||||
|
\contentsline {section}{\numberline {7.11}include}{21}{}%
|
||||||
|
\contentsline {section}{\numberline {7.12}jet}{21}{}%
|
||||||
|
\contentsline {section}{\numberline {7.13}mysql}{21}{}%
|
||||||
|
\contentsline {section}{\numberline {7.14}read}{21}{}%
|
||||||
|
\contentsline {section}{\numberline {7.15}set}{22}{}%
|
||||||
|
\contentsline {section}{\numberline {7.16}sql}{22}{}%
|
||||||
|
\contentsline {section}{\numberline {7.17}stream}{22}{}%
|
||||||
|
\contentsline {section}{\numberline {7.18}system}{22}{}%
|
||||||
|
\contentsline {section}{\numberline {7.19}tag}{22}{}%
|
||||||
|
\contentsline {section}{\numberline {7.20}until}{23}{}%
|
||||||
|
\contentsline {section}{\numberline {7.21}while}{23}{}%
|
||||||
|
\contentsline {section}{\numberline {7.22}whiledir}{23}{}%
|
||||||
|
\contentsline {section}{\numberline {7.23}whilerow}{23}{}%
|
||||||
|
\contentsline {section}{\numberline {7.24}write}{23}{}%
|
||||||
@ -24,24 +24,3 @@ mktextfm Bookman
|
|||||||
mktextfm Bookman
|
mktextfm Bookman
|
||||||
mktextfm Bookman
|
mktextfm Bookman
|
||||||
mktextfm Bookman
|
mktextfm Bookman
|
||||||
mktextfm Georgia
|
|
||||||
mktextfm Georgia
|
|
||||||
mktextfm Georgia
|
|
||||||
mktextfm Georgia/BI
|
|
||||||
mktextfm Georgia
|
|
||||||
mktextfm Georgia/B
|
|
||||||
mktextfm Georgia
|
|
||||||
mktextfm Georgia/I
|
|
||||||
mktextfm Georgia
|
|
||||||
mktextfm Georgia
|
|
||||||
mktextfm Georgia
|
|
||||||
mktextfm Georgia
|
|
||||||
mktextfm Georgia
|
|
||||||
mktextfm Georgia
|
|
||||||
mktextfm Georgia
|
|
||||||
mktextfm PadaukBook
|
|
||||||
mktextfm PadaukBook
|
|
||||||
mktextfm PadaukBook
|
|
||||||
mktextfm Gerramond
|
|
||||||
mktextfm URWBookman
|
|
||||||
mktextfm Bookman
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#!../jet-2.0
|
#!../jet-2.0
|
||||||
<jet cgi="true" name1="localname" filterblanklines="true" trimlines="true">
|
<jet cgi="true" name1="localname" filterblanklines="true" trimlines="true">
|
||||||
<mysql host="barant.com" database="barant" user="barant" password="uversa" sessionid="1">
|
<mysql host="localhost" database="barant" user="barant" password="uversa" sessionid="1">
|
||||||
<sql sessionid="1">select * from testdata</sql>
|
<sql sessionid="1">select * from testdata</sql>
|
||||||
<whilerow name="index" count="10" sessionid="1">
|
<whilerow name="index" count="10" sessionid="1">
|
||||||
$[1.id] $[1.text] $[1.value]
|
$[1.id] $[1.text] $[1.value]
|
||||||
|
|||||||
@ -12,17 +12,4 @@ $[righty]=56789
|
|||||||
$[trim]=this is a test
|
$[trim]=this is a test
|
||||||
<set name="integer" expr="integer(12430.54356546)" />
|
<set name="integer" expr="integer(12430.54356546)" />
|
||||||
$[integer]=12430
|
$[integer]=12430
|
||||||
<set name="result" expr="5 + 5 * 5" />
|
|
||||||
$[result]=30
|
|
||||||
<set name="result" expr="5 + 5 * 5 + 5" />
|
|
||||||
$[result]=35
|
|
||||||
<set name="result" expr="(5 * 2) + (5 * 5) + (5 * 2)" />
|
|
||||||
$[result]=45
|
|
||||||
<set name="fivexfive" expr="5 * 5" />
|
|
||||||
<set name="result" expr="5 * 2 + $[fivexfive] + 5 * 2" />
|
|
||||||
$[result]=45
|
|
||||||
<set name="result" expr="2 + 2 * 3 + 2" />
|
|
||||||
$[result]=10
|
|
||||||
<set name="result" expr="expr(2 + 2 * 3 + 2)" />
|
|
||||||
$[result]=10
|
|
||||||
</jet>
|
</jet>
|
||||||
|
|||||||
@ -64,22 +64,9 @@
|
|||||||
</for>
|
</for>
|
||||||
<call error="rc" pgm="/usr/bin/ls" arg1="-al" name="ls" />
|
<call error="rc" pgm="/usr/bin/ls" arg1="-al" name="ls" />
|
||||||
$[rc]
|
$[rc]
|
||||||
<set name="max" expr="max(1, 2, 3, 4, 5, 4, 3, 2, 1)" />
|
|
||||||
max=$[max]
|
|
||||||
<set name="max" expr="max('A', 'B', 'C', 'D', 'E', 'D', 'C', 'B', 'A')" />
|
|
||||||
max=$[max]
|
|
||||||
<set name="min" expr="min(1, 2, 3, 4, 5, 4, 3, 2, 1)" />
|
|
||||||
min=$[min]
|
|
||||||
<set name="min" expr="min('A', 'B', 'C', 'D', 'E', 'D', 'C', 'B', 'A')" />
|
|
||||||
min=$[min]
|
|
||||||
<set name="list" expr="'A', 'B', 'C', 'D', 'E', 'D', 'C', 'B', 'A'" />
|
|
||||||
<set name="minlist" expr="min($[list])" />
|
|
||||||
minlist=$[minlist]
|
|
||||||
<comment>
|
|
||||||
$[ls]
|
$[ls]
|
||||||
<read file="../compile" name="file" />
|
<read file="../compile" name="file" />
|
||||||
$[file]
|
$[file]
|
||||||
</comment>
|
|
||||||
<comment>
|
<comment>
|
||||||
<whiledir path="/var/www" filename="file" fullpath="fullpath" filenamenoextension="noext" sort="true">
|
<whiledir path="/var/www" filename="file" fullpath="fullpath" filenamenoextension="noext" sort="true">
|
||||||
$[file] $[fullpath] $[noext]
|
$[file] $[fullpath] $[noext]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user