witam.pomoze ktos? [HTML] pobierz, plaintext
  1. /album-kart.cba.pl
[HTML] pobierz, plaintext mianowicie menu na tej stronie sie rozwija ładnie elegancko na pierwszy rzut oka,ale gdy chce wejść na jeden z odnosnikow w tym menu nic sie nie dzieje...co mam zrobic aby zadziałało?
funkcje:
  1. <?php
  2.  
  3. // katalog stron
  4. $dir = 'html';
  5.  
  6. // strona domyslna
  7. $default_page = 'home.php';
  8.  
  9. $pages = glob($dir.'/*.php');
  10. $arr_params = explode('/', $_SERVER['QUERY_STRING']);
  11. if(!in_array($dir.'/'.$default = $arr_params[0].'.php', $pages)) {
  12. $default = $default_page;
  13. }
  14. include("$dir/$default");
  15.  
  16. }
  17.  
  18. function cardList($noie) {
  19.  
  20. $noie = 1;
  21. if(preg_match('/MSIE/', $_SERVER['HTTP_USER_AGENT'])) {
  22. $noie = 0;
  23. }
  24.  
  25. if($noie) {
  26. echo '<ul class="menulist" id="listMenuRoot">
  27. <li><a href="index.php">strona glowna</a></li>
  28. <li>
  29. <a href="index.php?list">lista</a>
  30. <ul>';
  31.  
  32.  
  33. function loadCategories() {
  34.  
  35. $index_query = mysql_query("SELECT * FROM zbyster_category");
  36. while($index_result = mysql_fetch_array($index_query)) {
  37. echo '<option value="'.$index_result[0].'"> '.$index_result[1];
  38. }
  39.  
  40. }
  41.  
  42.  
  43.  
  44. function loadUnderCategories() {
  45.  
  46. $index_query = mysql_query("SELECT * FROM zbyster_category_2");
  47. while($index_result = mysql_fetch_array($index_query)) {
  48. echo '<option value="'.$index_result[0].'"> '.$index_result[1];
  49. }
  50.  
  51. }
  52.  
  53.  
  54.  
  55. function cutStringTo($text, $number) {
  56. $letters = 70;
  57. if(strlen($text) > $letters) {
  58. while($text[$letters]) {
  59. if(!preg_match('/(\W)/', $text[$letters++])) { //(\s|<|>|\/)
  60. continue;
  61. }
  62. else {
  63. $text = substr($text, 0, ($letters - 1));
  64. $text .= '... <a href="index.php?view/'.$number.'">czytaj więcej</a>.';
  65. break;
  66. }
  67. }
  68. }
  69. return $text;
  70. }
  71. return mysql_query($query);
  72.  
  73. }
  74.  
  75.  
  76.  
  77. function ifSearchIsNan($string, $list_query) {
  78.  
  79. if(mysql_num_rows($list_query) === 0) {
  80. echo $string;
  81. }
  82.  
  83. }
  84.  
  85.  
  86.  
  87. function checkViewLink() {
  88.  
  89. $arr_params = explode('/', $_SERVER['QUERY_STRING']);
  90. $arr_params = (int) $arr_params[1];
  91.  
  92. // sprawdzenie
  93. $view_query = mysql_query("SELECT * FROM zbyster_card WHERE id = '$arr_params'");
  94. if(mysql_num_rows($view_query) !== 1) {
  95. header('Location: index.php?list');
  96. }
  97.  
  98. return array($view_query, $arr_params);
  99.  
  100.  
  101.  
  102. ?>