Vote count:
0
I have this website www.amse.com.br
For some reason, every link on the website is not working, and I know where the problem is, but don't know why.
The index.php script handles the false URLs and brings information to the web page from the data base:
<?php
require_once("api/connector.class.inc");
$url_cod = (isset($_REQUEST['cod'])) ? $_REQUEST['cod'] : '';
$url_nm_secao = explode('/', $url_cod);
$url_id = Connector::getAllName("tab_url", "id_tabela", "nm_url='" . $url_nm_secao[count($url_nm_secao)-1] . "'");
$url_tabela = Connector::getAllName("tab_url", "nm_tabela", "nm_url='" . $url_nm_secao[count($url_nm_secao)-1] . "'");
if($url_tabela == "tab_produto"){
$_REQUEST["codigo"] = $url_id;
include_once "detalhe-produto.php";
}else if($url_tabela == "tab_subcategoria"){
$_REQUEST["subcategoria"] = $url_id;
include_once "lista-produto.php";
}else if($url_tabela == "tab_categoria"){
$_REQUEST["categoria"] = $url_id;
include_once "lista-produto.php";
}else if($url_tabela == "tab_grupo"){
$_REQUEST["grupo"] = $url_id;
include_once "lista-produto.php";
}else if($url_tabela == "tab_conteudo"){
$_REQUEST["codigo"] = $url_id;
include_once "detalhe.php";
}else{
if(isset($url_nm_secao[0]) && $url_nm_secao[0] == '' || $url_nm_secao[0] == 'index.php'){
include_once "home.php";
}elseif($url_nm_secao[0] != ''){
$paginas = array('contato', 'carrinho', 'cadastro', 'pagamento', 'logout', 'salvar-pedido', 'endereco-de-entrega', 'retorno', 'obrigado', 'meus-pedidos', 'salvar-orcamento');
if(isset($url_nm_secao[0]) && in_array($url_nm_secao[0], $paginas)){
include_once $url_nm_secao[0].".php";
}else if($url_nm_secao[0] == "finalizar-compra"){
$_REQUEST["compra"] = 1;
include_once "cadastro.php";
}
else if($url_nm_secao[0] == "busca"){
include_once "lista-produto.php";
}
else if($url_nm_secao[0] == "locacao"){
include_once "lista-locacao.php";
}
}else{
include_once "home.php";
}
} ?>
For example, http://ift.tt/1xCtGlF should bring up this page http://ift.tt/1xCtGlH
This should happen with every link on the website, but i'm getting 404.
If you need any more information, please leave on the comments!
asked 40 secs ago
PHP not working to create links
Aucun commentaire:
Enregistrer un commentaire