1 (edited by 2013-02-10 14:29:58)

Topic: Problem with search code?

Hello!

I have a strange problem with standard search code of the latest version of cutenews 1.5.2.

The code I got it from the file example2.php and build it into my little site. Here, for example - Visit My Website for see the problem bred and problem! Code has brought all the news without ever was searching! When you remove the code for the search, everything appears normal, by category.


Here is the entire code of the page:

Problematic lines are: line -122 (I think that is the problem here)
A script to search and display is the following lines:
92-94
114-124

How to make output for results (line 122)
else {include (".. / cutenews / show_news.php");}
   so as not to unreasonably displays all recorded in the database updates?

I use google translate, sorry for the spelling


<title>3D Devices Descriptions and Specifications </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<META NAME="robots" CONTENT="All">
<meta name="description" content="Main page for descriptions and specifications for 3D TVs, blu-rays, camcoders, digital cameras, 3d glasses, games and 3D monitors devices. Site 3D-universe.net">
<META NAME="subject" CONTENT="page for descriptions and specifications for 3D devices">
<meta name="keywords" content="3D, descriptions, specifications, 3d device descriptions, 3d device specifications, stereo cameras specification, 3D TV specification, 3D camcoder specification, camcoders reviews, 3D glasses specification, 3D blu-ray specification, 3D monitor specification, 3D phone specifications, 3D projector specification, dimensional device specifications">
<META NAME="Copyright" CONTENT="© 3D-universe.net">
<link href="../site_css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body,td,th {
    color: #000066;
}

-->
</style>
<link href="../site_css.css" rel="stylesheet" type="text/css" />
<!-- TemplateParam name="OptionalRegion1" type="boolean" value="true" -->
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
.style2 {color: #00FF33}
.style3 {color: #F80303}
.style4 {font-size: 18px}



-->
</style>
</head>

<body>
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="right" background="../Images/Za lika na saita/4eren 3d fon.png"><!-- #BeginLibraryItem "/Library/Main_navigation_menu.lbi" --><!-- saved from url=(0014)about:internet -->

<link href="../site_css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
    background-image: url(../Images/Za%20lika%20na%20saita/bql%203d%20fon.jpg);
}
.style5 {
    color: #FFFF99;
    font-weight: bold;
    font-size: 18px;
}
-->
</style>
<table width="100%" border="0" cellpadding="5" cellspacing="0" background="../Images/Za lika na saita/4eren 3d fon.png">
  <tr>
    <td width="24%"><div align="center">
      <p><img src="../Images/Za lika na saita/main_logo.png" alt="Site_logo" width="245" height="129"></p>
      <p class="style5">under construction </p>
    </div></td>
    <td width="50%"><div align="center"><span class="Stil_glavni_butoni">[url=http://3d-universe.net/3d-forum/viewtopic.php?f=40&t=28]<p class="Stil_glavni_butoni">How does 3D</p>
    [/url]</span><img src="../Images/Za lika na saita/How does 3D.jpg" alt="How_does_3D" width="470" height="100"></div></td>
    
    <td width="26%" rowspan="2" class="Stil_glavni_butoni"><!-- #BeginLibraryItem "/Library/Googal translate.lbi" --><link href="../site_css.css" rel="stylesheet" type="text/css">
<center>
<span class="Stil_glavni_butoni">View this site in your language!</span>
<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/translatemypage.xml&up_source_language=bg&w=160&h=60&title=&border=&output=js"></script></center>
<!-- #EndLibraryItem -->      <table border="0" cellpadding="0">
<form method="get" action="http://www.google.com/search">
<tr><td>
<input type="text"   name="q" size="20"
 maxlength="255" value="" />
<input type="submit" value="Google Search" />
<input type="checkbox"  name="sitesearch"
 value="3d-universe.net"checked />
<span class="Stil_glavni_butoni">quick search</span></td>
</tr>
</form>
</table></td>
  </tr>
  <tr>
    <td colspan="2" class="Stil_glavni_butoni"><div align="center">[url=../index.php]Home[/url]   [url=../News/3D news.php]3D News  [/url]  [url=../3D FAQs.php]3D FAQs[/url]   [url=Devices_ENG.php]3D Devices[/url]  [url=http://3d-universe.net/Gallery/] 3D-Gallery[/url]   [url=http://3d-universe.net/3d-forum/]Forum  [/url] [url=../3D Store.html] 3D Store [/url]  [url=../Aditional/aditional.html]Aditional 3Ds[/url]  [url=../About us.html]About us [/url]</div></td>
  </tr>
</table>
<!-- #EndLibraryItem --></td>
  </tr>
  <tr background="../Images/wallpapers/3D_wallpaper 12.jpeg">
    <td align="right"><div align="left" class="Stil_glavni_butoni">
      <div align="left">[url=Devices_BG.php]<span class="style1">3D</span> <span class="style2">устройства и</span> <span class="style3">спецификации</span>[/url] </div>
    </div></td>
  </tr>
  <tr>
    <td align="right" background="../Images/Za lika na saita/4eren 3d fon.png"><table width="100%" cellspacing="0" border="0" background="../Images/Za lika na saita/4eren 3d fon.png">
          <tr>
            <th width="25%" valign="top" rowspan="11" background="../Images/Za lika na saita/4eren 3d fon.png" scope="col"><p align="left" class="Stil_glavni_butoni">Quick search</p>
            <form method="post">
              <input type="text" name="story" size="14">
              <input type="hidden" name="do" value="search">
              </form><!-- #BeginLibraryItem "/Library/devices_specs_ENG.lbi" --><link href="../site_css.css" rel="stylesheet" type="text/css">
              <table width="100%" border="0">
                <tr>
                  <th scope="col" valign="top"><p align="center" class="Stil_glavni_butoni"><span id="result_box" lang="en" xml:lang="en">Descriptions and Specifications</span></p>
                    <p align="left" class="Stil_glavni_butoni">[url=3D_blu-rays_specs_ENG.php]3D Blu-Rays[/url]</p>
                    <p align="left" class="Stil_glavni_butoni">[url=3D_camcoders_specs_ENG.php]3D Camcoders[/url]</p>
                    <p align="left" class="Stil_glavni_butoni">[url=3D_digital_cameras_specs_ENG.php]3D Digital Cameras[/url]</p>
                    <p align="left" class="Stil_glavni_butoni">[url=3D_games_specs_ENG.php]3D Games[/url]</p>
                    <p align="left" class="Stil_glavni_butoni">[url=3D_glasses_specs_ENG.php]3D Glasses[/url]</p>
                    <p align="left" class="Stil_glavni_butoni">[url=3D_monitors_specs_ENG.php]3D Monitors[/url]</p>
                    <p align="left" class="Stil_glavni_butoni">[url=3D_phones_specs_ENG.php]3D Phones[/url]</p>
                    <p align="left" class="Stil_glavni_butoni">[url=3D_projectors_specs_ENG.php]3D Projectors[/url]</p>
                    <p align="left" class="Stil_glavni_butoni">[url=3D_TVs_specs_ENG.php]3D TVs[/url] </p>
                  <p align="left" class="Stil_glavni_butoni">[url=3D_others_devices_specs_ENG.php]3D Others Devices [/url]</p></th>
                </tr>
              </table>
            <!-- #EndLibraryItem -->            </th>
          </tr>
          <tr>
            <th bgcolor="#FFFFFF" scope="col"><?php

                                    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                    Here we decide what page to include
                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
                                    if($_POST['do'] == "search" or $_GET['dosearch'] == "yes"){ $subaction = "search"; $dosearch = "yes"; include("../cutenews/search.php"); }
                                    elseif($_GET['do'] == "archives"){ include("../cutenews/show_archives.php"); }
                                    elseif($_GET['do'] == "stats"){ echo"You can download the stats addon and include it here to show how many news, comments ... you have"; /* include("$path/stats.php"); */ }
                                    else{ include("../cutenews/show_news.php"); }

                                    ?></th>
            <th bgcolor="#FFFFFF" scope="col"> </th>
          </tr>
          <tr>
            <th bgcolor="#FFFFFF" scope="col"><div align="left">
              <?php
  $number = "2";
  $category = "11";
  include("../cutenews/show_news.php");
?> 
            </div></th>
            <th bgcolor="#FFFFFF" scope="col"><div align="left">
              <?php
  $number = "2";
  $category = "8";
  include("../cutenews/show_news.php");
?>
            </div></th>
          </tr>
        <tr>
          <th bgcolor="#FFFFFF" scope="col"><div align="left">
            <?php
  $number = "2";
  $category = "9";
  include("../cutenews/show_news.php");
?>
          </div></th>
          <th bgcolor="#FFFFFF" scope="col"><div align="left">
            <?php
  $number = "2";
  $category = "16";
  include("../cutenews/show_news.php");
?>
          </div></th>
        </tr>
        <tr>
        <th bgcolor="#FFFFFF" scope="col"><div align="left">
          <?php
  $number = "2";
  $category = "14";
  include("../cutenews/show_news.php");
?>
        </div></th>
        <th bgcolor="#FFFFFF" scope="col"><div align="left">
          <?php
  $number = "2";
  $category = "13";
  include("../cutenews/show_news.php");
?>
        </div></th>
      </tr>
      <tr>
    <th width="37%" bgcolor="#FFFFFF" scope="col"><div align="left">
      <?php
  $number = "2";
  $category = "12";
  include("../cutenews/show_news.php");
?>
    </div></th>
    <th width="37%" bgcolor="#FFFFFF" scope="col"><div align="left">
      <?php
  $number = "2";
  $category = "10";
  include("../cutenews/show_news.php");
?>
    </div></th>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF"><div align="left">
      <?php
  $number = "2";
  $category = "7";
  include("../cutenews/show_news.php");
?>
    </div></td>
    <td bgcolor="#FFFFFF"><div align="left">
      <?php
  $number = "2";
  $category = "15";
  include("../cutenews/show_news.php");
?>
    </div></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF"><div align="left"></div></td>
    <td bgcolor="#FFFFFF"><div align="left"></div></td>
  </tr>
</table>
</td>
  </tr>
  <tr>
    <td align="right" background="../Images/Za lika na saita/4eren 3d fon.png"><!-- #BeginLibraryItem "/Library/footer_google_Fbook_tuxo.lbi" --><!-- saved from url=(0014)about:internet -->
<link href="../site_css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {font-size: 14px}
-->
</style>

<table width="100%" border="1" cellspacing="0" cellpadding="0">
      <tr bgcolor="#000000">
        <td colspan="3">
        <table width="100%" border="0" cellspacing="2" cellpadding="0">
      <tr>
        <td width="31%">[url=http://www.3d-glasses-4u.com][img]../Images/advertisement/3d_glasses_banner.jpg[/img][/url]</td>
        <td width="19%"><div align="center">[url=http://3d-universe.net/3d-forum/viewforum.php?f=108]Watch 3D movies trailers[/url]</div></td>
        <td width="18%"> </td>
        <td bgcolor="#000000">
          <p align="center" class="Stil_glavni_butoni">Our 3D friends : <strong> [url=http://www.rokemneedlearts.com/carsindepth/wordpressblog/]Cars In Depth[/url]</strong></p>
          </td>
        </tr>
    </table></td>
      </tr>
      <tr bgcolor="#CCCCCC">
        <td><div align="center"><center>
          <span class="Stil_glavni_butoni">View this site in your language!</span>
<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/translatemypage.xml&up_source_language=bg&w=160&h=60&title=&border=&output=js"></script></center>
        </div> </td>
        <td><div align="center"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2F3d-universe.net&layout=standard&show_faces=true&width=450&action=like&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe></div> </td>
        <td><div align="center"><script  type="text/javascript">
<!-- NACHALO NA TYXO.BG BROYACH -->
d=document;
d.write('[url=http://www.tyxo.bg/?113167]<img width="88" height="31" border="0" alt="Tyxo.bg counter"');
d.write(' src="http://cnt.tyxo.bg/113167?rnd='+Math.round(Math.random()*2147483647));
d.write('&sp='+screen.width+'x'+screen.height+'&r='+escape(d.referrer)+'" />[/url]');
//-->
</script>
<noscript>[url=http://www.tyxo.bg/?113167][img]http://cnt.tyxo.bg/113167[/img][/url]</noscript>
<!-- KRAI NA TYXO.BG BROYACH --></div> </td>
      </tr>
</table>
<!-- #EndLibraryItem --></td>
  </tr>
  <tr>
    <td align="right" background="../Images/Za lika na saita/4eren 3d fon.png"></td>
  </tr>
  <tr>
    <td align="right" background="../Images/Za lika na saita/4eren 3d fon.png"><!-- #BeginLibraryItem "/Library/Footer_table.lbi" --><link href="../site_css.css" rel="stylesheet" type="text/css">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#000000">
  <tr>
    <td><div style="float:left">
    <p class="Stil_glavni_butoni">Razlog/Bulgaria</P>
    </div>
    <div style="float:right">    
    <p class="Stil_glavni_butoni">Copyright © 2010-2012 3D-universe.net</p>
    </div> </td>
  </tr>
</table>
<!-- #EndLibraryItem --></td>
  </tr>
</table>
<p class="style3"> </p>
</body>
</html>

Re: Problem with search code?

UP http://cutephp.com/forum/style_emoticons/default/sad.gif