Notice: Undefined variable: sql_user in /var/userdata/web/psa-association.com/website/www/inc/ez_sql_mysqli.php on line 358

Notice: Undefined variable: sql_password in /var/userdata/web/psa-association.com/website/www/inc/ez_sql_mysqli.php on line 358

Notice: Undefined variable: sql_dbname in /var/userdata/web/psa-association.com/website/www/inc/ez_sql_mysqli.php on line 358

Notice: Undefined variable: sql_host in /var/userdata/web/psa-association.com/website/www/inc/ez_sql_mysqli.php on line 358
$value){ if(!in_array($key,$noEscape)) $_GET[$key] = $db->escape($value); } } // POST paraméterek takarítása if(isset($_POST)){ foreach($_POST as $key => $value){ if(!in_array($key,$noEscape)) $_POST[$key] = $db->escape($value); } } // Rendszerparam�terek bet�lt�se if ($prms=$db->get_results("SELECT * FROM settings")) { foreach ($prms as $prm) { ${$prm->variable} = $prm->value; } } // Pluginek f�ggv�nyk�nyvt�rainak bet�lt�se if ($qrys = $db->get_results("SELECT * FROM plugins")) { foreach ($qrys as $qry) { if(file_exists("plugins/$qry->plugin/inc/lib.inc.php")) include_once ("plugins/$qry->plugin/inc/lib.inc.php"); } } // // F�f�ggv�nyek // include_once("inc/lib/seo.lib.inc.php"); include_once("inc/lib/page.lib.inc.php"); include_once("inc/lib/string.lib.inc.php"); include_once("inc/lib/status.lib.inc.php"); include_once("inc/lib/instable.lib.inc.php"); include_once("inc/lib/translate.lib.inc.php"); include_once("inc/phpmailer/PHPMailerAutoload.php"); include_once('inc/SimpleImage.php'); include_once('inc/simple_html_dom.php'); include_once("inc/upload.php"); // M�veletnapl� kit�lt�se function loger( $at, $act, $obj ) { global $_SESSION, $db; $most = date ( "Y-m-d H:i:s", time() ); if ( $obj == "" ) $obj = "-"; $ins = $db->query( "INSERT INTO logs ( logdatetime, uID, actiontype, action, object ) VALUES ( '$most', '".$_SESSION["uID"]."', '$at', '$act', '$obj' )" ); } // Levelez� f�ggv�ny function mailer($mparam,$minta,$kinek,$targy,$kitol) { global $mail_error; $mail = new bTemplate(); if ($mparam != "") { foreach ($mparam as $kulcs => $ertek) { $mail->set($kulcs, $ertek); } } if (file_exists("plugins/core/mail/main.tpl")) { $mail->set("level", $mail->fetch($minta)); $leveltorzs = $mail->fetch("plugins/core/mail/main.tpl"); } else{ $leveltorzs = $mail->fetch($minta); } $mail = new PHPMailer; $mail->CharSet = "UTF-8"; $mail->setFrom($kitol); $mail->addAddress($kinek); $mail->addAddress('kover@lws.hu'); $mail->isHTML(true); $mail->Subject = $targy; $mail->Body = $leveltorzs; if(!$mail->send()) { $mail_error = $mail->ErrorInfo; return false; } else { return true; } } // nyelves�t�s function langtrans($modul, $pre = "") { global $_SESSION, ${$pre."tpl"}, $base_lang; if (file_exists("plugins/$modul/inc/".$_SESSION["lang"].".inc")){ include("plugins/$modul/inc/".$_SESSION["lang"].".inc"); } else { include("plugins/$modul/inc/$base_lang.inc"); } foreach (${$modul."_lang"} as $kulcs => $ertek){ ${$pre."tpl"}->set("lang_".$kulcs, $ertek); } } // Settings t�bl�k kezel�se function settings_form($plugin){ global $_SESSION, $db; $sets = $db->get_results("SELECT * FROM ".$plugin."_settings WHERE lang = '".$_SESSION["lang"]."' AND mstag = '".$_SESSION["mstag"]."'"); if ($sets) { $i=1; foreach ($sets as $set) { $adat[$i]["label"] = $set->{"desc_".$_SESSION["lang"]}; $adat[$i]["variable"] = $set->variable; $adat[$i]["value"] = $set->value; $i++; } return $adat; } else { return false; } } function save_settings_form($table, $data){ global $_SESSION, $db; foreach ($data as $kulcs => $ertek) { $db->query("UPDATE ".$table."_settings SET value = '$ertek' WHERE variable = '$kulcs'"); } } // uezenet es hibakezeles function set_error($err){ global $_SESSION, $db; if ( $hiba = $db->get_var("SELECT error FROM errors WHERE errtag = '".$err."'")) { $_SESSION["err"] = $hiba."
"; } else { $_SESSION["err"] = "Ismeretlen hiba: ".$err."! Jelezze a rendszergazdának.
"; } } function set_msg($msg){ global $_SESSION, $db; if ( $msg = $db->get_var("SELECT message FROM messages WHERE msgtag = '".$msg."'")) { $_SESSION["msg"] = $msg."
"; } else { $_SESSION["msg"] = "Ismeretlen üzenetkód: ".$msg."!"." Jelezze a rendszergazdának."."
"; } } function get_error(){ global $_SESSION; $retval = isset($_SESSION["err"]) ? $_SESSION["err"] : ""; if($retval != ""){ $_SESSION["err"] = ""; return "
".$retval."
"; } else { return ""; } } function get_msg(){ global $_SESSION; $retval = isset($_SESSION["msg"]) ? $_SESSION["msg"] : ""; if($retval != ""){ $_SESSION["msg"] = ""; return "
".$retval."
"; } else { return ""; } } // backLink valtozo ertekeit kezelo fgv function backLink($i = 0){ global $_SESSION; $length = count($_SESSION["backlink"]); return $length > 2 ? "&".$_SESSION["backlink"][$length-2-$i] : ""; } // template kitoltese adatokkal function setTags($row){ global $tpl; if(!empty($row)){ foreach($row as $key => $value){ $tpl->set($key,addslashes($value)); if($value == 1){ $tpl->set($key."_chkd"," checked='checked'"); } elseif($value == 0){ $tpl->set($key."_chkd",""); } } } } function getArrayFromRows($rows, $selected = 0, $selectedId = 0){ $retval = array(); $select = false; if(!empty($rows)){ foreach($rows as $row){ $arr = array(); foreach($row as $key => $value){ $arr[$key] = $value; } if($selected && $arr["id"] == $selectedId){ $arr['selected'] = true; $select = true; } array_push($retval, $arr); } if(!$select && $selected) $retval[0]['selected'] = true; } return $retval; } // több fájl feltöltése esetén egy kis tömb variáció function reArrayFiles(&$file_post) { $file_ary = array(); $file_count = count($file_post['name']); $file_keys = array_keys($file_post); for ($i=0; $i<$file_count; $i++) { foreach ($file_keys as $key) { $file_ary[$i][$key] = $file_post[$key][$i]; } } return $file_ary; } ?>'; // Delimeters for beginnings of loops var $BAldelim = '<'; var $BArdelim = '>'; // Delimeters for ends of loops var $EAldelim = ''; // Internal variables var $scalars = array(); var $arrays = array(); var $carrays = array(); var $ifs = array(); /*--------------------------------------------------------------*\ Method: bTemplate() Simply sets the base path (if you don't set the default). \*--------------------------------------------------------------*/ function bTemplate($base_path = NULL, $reset_vars = TRUE) { if($base_path) $this->base_path = $base_path; $this->reset_vars = $reset_vars; } /*--------------------------------------------------------------*\ Method: set() Sets all types of variables (scalar, loop, hash). \*--------------------------------------------------------------*/ function set($tag, $var, $if = NULL) { if(is_array($var)) { $this->arrays[$tag] = $var; if($if) { $result = $var ? TRUE : FALSE; $this->ifs[] = $tag; $this->scalars[$tag] = $result; } } else { $this->scalars[$tag] = $var; if($if) $this->ifs[] = $tag; } } /*--------------------------------------------------------------*\ Method: set_cloop() Sets a cloop (case loop). \*--------------------------------------------------------------*/ function set_cloop($tag, $array, $cases) { $this->carrays[$tag] = array( 'array' => $array, 'cases' => $cases); } /*--------------------------------------------------------------*\ Method: reset_vars() Resets the template variables. \*--------------------------------------------------------------*/ function reset_vars($scalars, $arrays, $carrays, $ifs) { if($scalars) $this->scalars = array(); if($arrays) $this->arrays = array(); if($carrays) $this->carrays = array(); if($ifs) $this->ifs = array(); } /*--------------------------------------------------------------*\ Method: get_tags() Formats the tags & returns a two-element array. \*--------------------------------------------------------------*/ function get_tags($tag, $directive) { $tags['b'] = $this->BAldelim . $directive . $tag . $this->BArdelim; $tags['e'] = $this->EAldelim . $directive . $tag . $this->EArdelim; return $tags; } /*--------------------------------------------------------------*\ Method: get_tag() Formats a tag for a scalar. \*--------------------------------------------------------------*/ function get_tag($tag) { return $this->ldelim . 'tag:' . $tag . $this->rdelim; } /*--------------------------------------------------------------*\ Method: get_statement() Extracts a portion of a template. \*--------------------------------------------------------------*/ function get_statement($t, &$contents) { // Locate the statement $tag_length = strlen($t['b']); $fpos = strpos($contents, $t['b']) + $tag_length; $lpos = strpos($contents, $t['e']); $length = $lpos - $fpos; // Extract & return the statement return substr($contents, $fpos, $length); } /*--------------------------------------------------------------*\ Method: parse() Parses all variables into the template. \*--------------------------------------------------------------*/ function parse($contents) { // Process the ifs if(!empty($this->ifs)) { foreach($this->ifs as $value) { $contents = $this->parse_if($value, $contents); } } // Process the scalars foreach($this->scalars as $key => $value) { $contents = str_replace($this->get_tag($key), $value, $contents); } // Process the arrays foreach($this->arrays as $key => $array) { $contents = $this->parse_loop($key, $array, $contents); } // Process the carrays foreach($this->carrays as $key => $array) { $contents = $this->parse_cloop($key, $array, $contents); } // Reset the arrays if($this->reset_vars) $this->reset_vars(FALSE, TRUE, TRUE, FALSE); // Return the contents return $contents; } /*--------------------------------------------------------------*\ Method: parse_if() Parses an if statement. There is some weirdness here because the tag doesn't conform to convention, so some things have to be done manually. \*--------------------------------------------------------------*/ function parse_if($tag, $contents) { // Get the tags $t = $this->get_tags($tag, 'if:'); // Get the entire statement $entire_statement = $this->get_statement($t, $contents); // Get the else tag $tags['b'] = NULL; $tags['e'] = $this->BAldelim . 'else:' . $tag . $this->BArdelim; // See if there's an else statement if(($else = strpos($entire_statement, $tags['e']))) { // Get the if statement $if = $this->get_statement($tags, $entire_statement); // Get the else statement $else = substr($entire_statement, $else + strlen($tags['e'])); } else { $else = NULL; $if = $entire_statement; } // Process the if statement $this->scalars[$tag] ? $replace = $if : $replace = $else; // Parse & return the template return str_replace($t['b'] . $entire_statement . $t['e'], $replace, $contents); } /*--------------------------------------------------------------*\ Method: parse_loop() Parses a loop (recursive function). \*--------------------------------------------------------------*/ function parse_loop($tag, $array, $contents) { // Get the tags & loop $t = $this->get_tags($tag, 'loop:'); $loop = $this->get_statement($t, $contents); $parsed = NULL; // Process the loop foreach($array as $key => $value) { if(is_numeric($key) && is_array($value)) { $i = $loop; foreach($value as $key2 => $value2) { if(!is_array($value2)) { // Replace associative array tags $i = str_replace($this->get_tag($tag . '[].' . $key2), $value2, $i); } else { // Check to see if it's a nested loop $i = $this->parse_loop($tag . '[].' . $key2, $value2, $i); } } } elseif(is_string($key) && !is_array($value)) { $contents = str_replace($this->get_tag($tag . '.' . $key), $value, $contents); } elseif(!is_array($value)) { $i = str_replace($this->get_tag($tag . '[]'), $value, $loop); } // Add the parsed iteration if(isset($i)) $parsed .= rtrim($i); } // Parse & return the final loop return str_replace($t['b'] . $loop . $t['e'], $parsed, $contents); } /*--------------------------------------------------------------*\ Method: parse_cloop() Parses a cloop (case loop) (recursive function). \*--------------------------------------------------------------*/ function parse_cloop($tag, $array, $contents) { // Get the tags & loop $t = $this->get_tags($tag, 'cloop:'); $loop = $this->get_statement($t, $contents); // Set up the cases $array['cases'][] = 'default'; $case_content = array(); $parsed = NULL; // Get the case strings foreach($array['cases'] as $case) { $ctags[$case] = $this->get_tags($case, 'case:'); $case_content[$case] = $this->get_statement($ctags[$case], $loop); } // Process the loop foreach($array['array'] as $key => $value) { if(is_numeric($key) && is_array($value)) { // Set up the cases if(isset($value['case'])) $current_case = $value['case']; else $current_case = 'default'; unset($value['case']); $i = $case_content[$current_case]; // Loop through each value foreach($value as $key2 => $value2) { $i = str_replace($this->get_tag($tag . '[].' . $key2), $value2, $i); } } // Add the parsed iteration $parsed .= rtrim($i); } // Parse & return the final loop return str_replace($t['b'] . $loop . $t['e'], $parsed, $contents); } /*--------------------------------------------------------------*\ Method: fetch() Returns the parsed contents of the specified template. \*--------------------------------------------------------------*/ function fetch($file_name) { // Prepare the path $file = $this->base_path . $file_name; // Open the file $fp = fopen($file, 'rb'); if(!$fp) return FALSE; // Read the file $contents = fread($fp, filesize($file)); // Close the file fclose($fp); // Parse and return the contents return $this->parse($contents); } } ?>
Notice: Undefined variable: site_protocol in /var/userdata/web/psa-association.com/website/www/index.php on line 26

Notice: Undefined variable: site_domain in /var/userdata/web/psa-association.com/website/www/index.php on line 26

Notice: Undefined variable: base_lang in /var/userdata/web/psa-association.com/website/www/index.php on line 30

Notice: Undefined variable: base_mstag in /var/userdata/web/psa-association.com/website/www/index.php on line 34

Warning: Require $dbuser and $dbpassword to connect to a database server in /var/userdata/web/psa-association.com/website/www/inc/ez_sql_mysqli.php on line 92

Notice: Undefined property: ezSQL_mysqli::$dbh in /var/userdata/web/psa-association.com/website/www/inc/ez_sql_mysqli.php on line 128

Fatal error: Uncaught Error: Call to a member function query() on null in /var/userdata/web/psa-association.com/website/www/inc/ez_sql_mysqli.php:128 Stack trace: #0 /var/userdata/web/psa-association.com/website/www/inc/ez_sql_mysqli.php(265): ezSQL_mysqli->select(NULL, '') #1 /var/userdata/web/psa-association.com/website/www/inc/ez_sql_core.php(164): ezSQL_mysqli->query('SELECT * FROM m...') #2 /var/userdata/web/psa-association.com/website/www/index.php(34): ezSQLcore->get_row('SELECT * FROM m...') #3 {main} thrown in /var/userdata/web/psa-association.com/website/www/inc/ez_sql_mysqli.php on line 128