']/i","",$_GET['text']); $result = mysql_query("SELECT id,cy,url,src,title,description,dir,SIN(".$host_cislo."-id) as random FROM `".$tlinks."` WHERE title like '%".$searchkey."%' OR description like '%".$searchkey."%' OR url like '%".$searchkey."%' and status < '10' ORDER by sorder DESC".$get); $title = 'Поиск по "'.$searchkey.'"'; } elseif($_GET['id']) // Отдельная страница { $result = mysql_query("SELECT id,cy,url,src,title,description,dir FROM `".$tlinks."` WHERE id = '".$_GET['id']."' LIMIT 1"); $getinfo = mysql_fetch_array($result); mysql_data_seek($result,0); if (!$a_row['title']) { $title = "Каталог ссылок :: ".get_dir_by_id($getinfo['dir'])." :: ".preg_replace("/\/$/","",$getinfo['url']); } else { $title = $getinfo['title']; } } elseif (!empty($_GET['dir']) && is_numeric($_GET['dir'])) // Раздел { $result = mysql_query("SELECT id,cy,url,src,title,description,dir,SIN(".$host_cislo."-id) as random FROM `".$tlinks."` WHERE dir = '".$_GET['dir']."' and status < '10' ORDER by sorder DESC".$get); $add_this_dir = '
Добавить ссылку в этот раздел

'; // Доп настройки для разделов $dir_row = mfa("SELECT dir,subdir,subsubdir,main,title,description,keywords FROM `".$tdirs."` WHERE id = '".$_GET['dir']."' LIMIT 1"); $dirname = $dir_row[$dir_row['main']]; if ($dir_row['title']) { $title = setvariable($dir_row['title']); } else { $title = setvariable('Каталог ссылок :: {dirname} :: стр.{page}'); } } else { Header('Location: index.php'); exit(); } $num = mysql_num_rows($result); if ($num) { while ($a_row = mysql_fetch_array($result)) { if (!$_GET['id']) { $href = (get_key('str'))?$a_row['id'].".html":"http://".$a_row['url']; // Определяем то, куда будем ссылаться } else { $href = 'http://'.$a_row['url']; } $img = (fileext($a_row['src']) != 'swf')?"\"".$a_row['title']."\"":""; $links .= "
\n"; if ($a_row['src'] && get_key('useban')) { $links .= "\n"; $tic = ""; } else { $tic = " | CY: ".$a_row['cy'].""; } if ($a_row['url']) { if ($a_row['title']) { $add_title = "".strup($a_row['title'])."
"; } if ($a_row['url']) { $urll = parse_url('http://'.$a_row['url']); $siteurl = $urll['host']; } $desclink = (ereg("<",$a_row['description']))?strup($a_row[5]):$add_title."".strup(replace_back($a_row['description']))."
".$siteurl."".$tic; $links .= "
".$img."
CY: ".$a_row['cy']."
".$desclink."
\n"; } else { $links .= "".replace_back($a_row['description'])."\n"; } $title = replace_back($a_row['title']); $dir = $a_row['dir']; $desc = replace_back($a_row['description']); unset($add_title); } } else { $links .= ""; } ?> <?php echo $title; ?>
изображение

[".$i."] "; } else { echo "".$i." "; } } } ?>