<?php
function __autoload($class_name) {
require_once $class_name . '.php';
}
function getItemTemplate($moduleName,$templateName,$element="") {
global $layoutHtmlDir;
return $layoutHtmlDir.$moduleName."/".$templateName."/".$element."item.html";
}
function getFormTemplate($moduleName,$templateName,$element="") {
global $layoutHtmlDir;
return $layoutHtmlDir.$moduleName."/".$templateName."/".$element."form.html";
}
function getTableTemplate($moduleName,$templateName,$element="") {
global $layoutHtmlDir;
return $layoutHtmlDir.$moduleName."/".$templateName."/".$element."table.html";
}
function getRowTemplate($moduleName,$templateName,$element="") {
global $layoutHtmlDir;
return $layoutHtmlDir.$moduleName."/".$templateName."/".$element."row.html";
}
function getCellTemplate($moduleName,$templateName,$element="") {
global $layoutHtmlDir;
return $layoutHtmlDir.$moduleName."/".$templateName."/".$element."cell.html";
}
function optionsToTable($options,$optionsTable) {
global $optionsDelimiter;
$options = explode($optionsDelimiter,$options);
if (is_array($options)) {
for ($i =0; $i <sizeof($options); $i++)
$result[$optionsTable[$options[$i]]] = true;
}
return $result;
}
function sqlText($text, $item1, $item2) {
global $aweSqlOperators;
return $item1.$aweSqlOperators[$text].$item2;
}
?>