__constructor();
}
//php5 constructor
function __constructor(){
//from php.net
//in php4 http_build_query is not available, this is a handwritten version
//php5 has such a function //is used for POST and GET stuff
if (!function_exists('http_build_query')) {
function http_build_query($data, $prefix='', $sep='', $key='') {
$ret = array();
foreach ((array)$data as $k => $v) {
if (is_int($k) && $prefix != null) $k = urlencode($prefix . $k);
if (!empty($key)) $k = $key.'['.urlencode($k).']';
if (is_array($v) || is_object($v))
array_push($ret, http_build_query($v, '', $sep, $k));
else array_push($ret, $k.'='.urlencode($v));
}
if (empty($sep)) $sep = ini_get('arg_separator.output');
return implode($sep, $ret);
}
}
}
//set the url of jquery.js //defaults to jquery.js but if you want to alter name/path
function setExternalJquery($url){
$this->externalJquery=$url;
}
//add external script like ';
return true;
}
//sets $this->jqueryScript
function setJqueryScript($script=''){
$this->jqueryScript=$script;
return true;
}
//appends $script to $this->jqueryScript
function addJqueryScript($script=''){
$this->setJqueryScript($this->jqueryScript . $script);
return true;
}
//outputs the variable $this->jqueryScript (no ';
foreach($this->externalScripts as $externalScript){
$result.=$externalScript;
}
if(!empty($this->errors)) {
$result.='';
return $result;
}
$result.='';
return $result;
}
//outputs the script, include