24 lines
723 B
C++
24 lines
723 B
C++
#include "__ifrow.h"
|
|
#include "Exception.h"
|
|
#include "MString.h"
|
|
#include "__mysql.h"
|
|
#include <stdlib.h>
|
|
#include <unistd.h>
|
|
|
|
namespace jet {
|
|
|
|
__ifrow::__ifrow(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, this, "else") {
|
|
output = false;
|
|
if(!hasContainer)
|
|
throw coreutils::Exception("ifrow tag must have a container.");
|
|
if(!global.sessionExists(variables["sessionid"]))
|
|
throw coreutils::Exception("sessionid does not exist.");
|
|
resolveKeyword("sessionid");
|
|
if(global.getSession(variables["sessionid"])->hasRow())
|
|
processContainer(container);
|
|
else
|
|
processContainer(container2);
|
|
}
|
|
|
|
}
|