<?php
header('Content-type: text/html; charset=utf-8'); // |===========================================================================|
// || IMP Links Manager v1.0 ||
// || System jest opatry na plikach tekstowych ||
// || Szanuj prawa autorskie i nie usuwaj tych informacji! ||
// || W razie problemów prosze wejsc na nasze forum: "forum.imps.boo.pl" ||
// |===========================================================================|
$scriptpath="linki";
}
if(eregi("://", $scriptpath)){ exit("<center>Nieautoryzowany dostęp!</center>"); }
?>
<br><br><center>Aby zainstalować skrypt <a href="#" onclick="window.open('
<? echo $scriptpath; ?>/install.php','Instalcja','width=655,height=444,resizable=0,scrollbars=no,menubar=no')">kliknij tutaj</a></center><br><br>
<?
}
else{
$config_plik=file($scriptpath."/config.ict.php"); $config=explode("||", $config_plik[1
]); if(file_exists($scriptpath."/dane/dzialy.".$config[6
])){ $dzialy=file($scriptpath."/dane/dzialy.".$config[6
]); }
require($scriptpath.'/functions.php');
$conf_strona=make_url($config[0]);
$pban="nie";
$ban_file=file($scriptpath."/ban.ict"); foreach($ban_file as $ban){
if($ban[1]==$_SERVER['REMOTE_ADDR']){
$pban="tak";
}
}
}
if(!isset($_GET['k']) && $_GET['katalog']!="add" && $_GET['katalog']!="add_save" && $_GET['komentarze']!="show" && $_GET['komentarze']!="add" && $_GET['komentarze']!="save" && $_GET['katalog']!="search" && $_GET['katalog']!="zglos" && $_GET['katalog']!="zglos_save"){ if($config[11]=="tak"){
tpl_replace
(array('{DODAJ}','{SPATH}','{SEARCH_FORM_BEGIN}','{SEARCH_INPUT}','{SEARCH_SUBMIT}','{SEARCH_FORM_END}','{SEARCH}'),array($conf_strona.'katalog=add',$scriptpath,'<form action="'.$conf_strona.'katalog=search" method="POST">','<input type="text" name="search_words" value="'.$_POST["search_words"].'">','<input type="submit" value="szukaj">','</form>',$conf_strona.'katalog=search'),$scriptpath.'/template/main/header.html'); }
if(file_exists($scriptpath."/dane/dzialy.".$config[6
])){ foreach($dzialy as $dzial){
if($config[2]=="tak"){
if(file_exists($scriptpath."/dane/".$dzial[0].".".$config[6
])){ $count_plik=file($scriptpath."/dane/".$dzial[0].".".$config[6
]); $count=count($count_plik); tpl_replace
(array('{KATEGORIA}','{ILOSC}','{SPATH}','{OPIS}','{SEARCH}'),array('<a href="'.$conf_strona.'k='.$dzial[0].'">'.$dzial[1].'</a>',$count,$scriptpath,$dzial[2
],$conf_strona.'katalog=search'),$scriptpath.'/template/main/main.html'); }
else{
tpl_replace
(array('{KATEGORIA}','{ILOSC}','{SPATH}','{OPIS}','{SEARCH}'),array('<a href="'.$conf_strona.'k='.$dzial[0].'">'.$dzial[1].'</a>','0',$scriptpath,$dzial[2
],$conf_strona.'katalog=search'),$scriptpath.'/template/main/main.html'); }
}
else{
if(file_exists($scriptpath."/dane/".$dzial[0].".".$config[6
])){ $count_plik=file($scriptpath."/dane/".$dzial[0].".".$config[6
]); $count=count($count_plik); if($count!=""){
tpl_replace
(array('{KATEGORIA}','{ILOSC}','{SPATH}','{OPIS}','{SEARCH}'),array('<a href="'.$conf_strona.'k='.$dzial[0].'">'.$dzial[1].'</a>',$count,$scriptpath,$dzial[2
],$conf_strona.'katalog=search'),$scriptpath.'/template/main/main.html'); }
}
}
}
}
if($config[11]=="tak"){
tpl_replace
(array('{DODAJ}','{SPATH}','{SEARCH_FORM_BEGIN}','{SEARCH_INPUT}','{SEARCH_SUBMIT}','{SEARCH_FORM_END}','{SEARCH}'),array($conf_strona.'katalog=add',$scriptpath,'<form action="'.$conf_strona.'katalog=search" method="POST">','<input type="text" name="search_words" value="'.$_POST["search_words"].'">','<input type="submit" value="szukaj">','</form>',$conf_strona.'katalog=search'),$scriptpath.'/template/main/footer.html'); }
}
if(file_exists($scriptpath."/dane/dzialy.".$config[6
])){ foreach($dzialy as $dzial){
switch($_GET['k']){
case "".$dzial[0]."":
if (!file_exists($scriptpath."/dane/".$dzial[0].".".$config[6])) { wiadomosc('<b>Brak wpisów w tej kategorii!</b><br><a href="'.$conf_strona.'katalog=add"><b>Dodaj stronę do katalogu</b></a>');
}
else {
$count_plik=file($scriptpath."/dane/".$dzial[0].".".$config[6
]); $count=count($count_plik); if($count==""){
wiadomosc('<b>Brak wpisów w tej kategorii!</b><br><a href="'.$conf_strona.'katalog=add"><b>Dodaj stronę do katalogu</b></a>');
}
else{
tpl_replace
(array('{KATEGORIA}','{SPATH}','{SEARCH}'),array($dzial[1
],$scriptpath,$conf_strona.'katalog=search'),$scriptpath.'/template/category/header.html'); $linki=file($scriptpath."/dane/".$dzial[0].".".$config[6
]); foreach ($linki as $link){
cenzor_replace("cenzor.ict");
emot_replace("emotki.ict");
imp_code_replace("code.ict");
tpl_replace
(array('{URL}','{NAZWA}','{OPIS}','{KLIKNIEC}','{SPATH}','{SEARCH}','{KOMENTARZE}','{ILE_KOMENTARZY}','{SREDNIA}','{ZGLOS}'),array($scriptpath.'/go.php?dzial='.$dzial[0].'&id='.$link[0
],$link[2
],$link[3
],$link[4
],$scriptpath,$conf_strona.'katalog=search',$conf_strona.'komentarze=show&link_id='.$dzial[0].'&kom_id='.$link[0
],ile_kom
($scriptpath),srednia
($link[0
]),$conf_strona.'katalog=zglos&kat_id='.$dzial[0].'&l_id='.$link[0
]),$scriptpath.'/template/category/links.html'); }
}
}
tpl_replace
(array('{WSTECZ}','{DODAJ}','{SPATH}','{SEARCH}'),array($conf_strona,$conf_strona.'katalog=add',$scriptpath,$conf_strona.'katalog=search'),$scriptpath.'/template/category/footer.html'); break;
}
}
}
switch($_GET['komentarze']){
case show:
if($config[12]=="tak"){
Niestety niedziała. Całego kodu nie idzie wkleić.

ponawiam pytanie

można zamknąć, już działa
