<?php

/*******************************************************************************
 * Adatbázis műveleteket hajt végre
 ******************************************************************************/
if (!isset($config)) {
    require_once('config.php');
}

$msh->query("SELECT * FROM `" . JMLADATBAZIS . "`.`jml_sh404sef_urls` WHERE oldurl='hiba/404';");
$res = $msh->fetchAssoc();
if (count($res) == 0) {
    $msh->query("INSERT INTO `" . JMLADATBAZIS . "`.`jml_sh404sef_urls` (`oldurl`,`newurl`,`dateadd`) VALUES ('hiba/404','index.php?option=com_sppagebuilder&id=100&lang=hu&view=page','" . date('Y-m-d H:i:s') . "');");
}


$msh->query("SELECT * FROM `" . JMLADATBAZIS . "`.`eng_sh404sef_urls` WHERE oldurl='error/404';");
$res = $msh->fetchAssoc();
if (count($res) == 0) {
    $msh->query("INSERT INTO `" . JMLADATBAZIS . "`.`eng_sh404sef_urls` (`oldurl`,`newurl`,`dateadd`) VALUES ('error/404','index.php?option=com_sppagebuilder&id=100&lang=en&view=page','" . date('Y-m-d H:i:s') . "');");
}


$msh->query("SELECT * FROM `" . JMLADATBAZIS . "`.`eng_sh404sef_urls` WHERE oldurl='contact/online-demo';");
$res = $msh->fetchAssoc();
if (count($res) == 0) {
    $msh->query("INSERT INTO `" . JMLADATBAZIS . "`.`eng_sh404sef_urls` (`oldurl`,`newurl`,`dateadd`) VALUES ('contact/online-demo','index.php?option=com_presentation&lang=en','" . date('Y-m-d H:i:s') . "');");
}






$msh->query("UPDATE `" . JMLADATBAZIS . "`.`jml_sh404sef_urls` SET `newurl`='index.php?option=com_tcexam&lang=hu&view=tcexam' WHERE `oldurl`='oktatas/iskolak/oktatoi-vizsga/oktatoi-vizsga' LIMIT 99;");
