Revision: 6444
          http://care2002.svn.sourceforge.net/care2002/?rev=6444&view=rev
Author:   mizuko
Date:     2010-06-30 09:32:16 +0000 (Wed, 30 Jun 2010)

Log Message:
-----------
see #54

Modified Paths:
--------------
    care2x/branches/gettext/modules/nursing/nursing-getmedx.php

Added Paths:
-----------
    care2x/branches/gettext/modules/nursing/include/inc_search_medicine.php

Removed Paths:
-------------
    care2x/branches/gettext/modules/nursing/include/inc_search_medicaments.php

Deleted: 
care2x/branches/gettext/modules/nursing/include/inc_search_medicaments.php
===================================================================
--- care2x/branches/gettext/modules/nursing/include/inc_search_medicaments.php  
2010-06-30 09:22:04 UTC (rev 6443)
+++ care2x/branches/gettext/modules/nursing/include/inc_search_medicaments.php  
2010-06-30 09:32:16 UTC (rev 6444)
@@ -1,41 +0,0 @@
-<?php
-$root_path = '../../../';
-require($root_path.'/include/helpers/inc_environment_global.php');
-global $db;
-
-$dbtable='care_pharma_products_main';
-$dbtablejoin='care_pharma_products_main_sub';  
-extract($_POST);
-$tmpBestellNum = '';
-for($i=0;$i<=$maxelements;$i++){
-       if($_POST['b'.$i])
-               $tmpBestellNum .=  "'" . $_POST['b'.$i] .'\',';
-}
-if($tmpBestellNum) $tmpBestellNum = substr($tmpBestellNum, 0, -1);  
-# clean input data
-$keyword=addslashes(trim($_POST['search']));
-///$db->debug=true;
-
-$sql="SELECT DISTINCT $dbtable.* FROM $dbtable RIGHT JOIN $dbtablejoin ON 
$dbtable.bestellnum = $dbtablejoin.bestellnum 
-               WHERE $dbtablejoin.pcs > 0 AND ( 
$dbtable.bestellnum='%$keyword%'
-               OR $dbtable.artikelnum LIKE '%$keyword%'
-               OR $dbtable.industrynum LIKE '%$keyword%'
-               OR $dbtable.artikelname LIKE '%$keyword%'
-               OR $dbtable.generic LIKE '%$keyword%'
-               OR $dbtable.description LIKE '%$keyword%')";
-if($tmpBestellNum) $sql .= " AND  $dbtable.bestellnum NOT IN ($tmpBestellNum)";
-$ergebnis=$db->Execute($sql);
-       
-if (!$ergebnis) {
-       echo "<li>Could not successfully run query ($sql) from DB: " . 
mysql_error(). "</li>";
-       exit;
-}      
-
-?>
-
-<ul>
-<?php while($zeile=$ergebnis->FetchRow()) { ?>
-       <li id="<?php echo stripslashes($zeile["bestellnum"]);?>">
-<div class="sx"><?php echo stripslashes($zeile["artikelname"]);echo " - ";echo 
stripslashes($zeile["generic"]); ?></div><span > / <?php echo 
stripslashes($zeile["packing"]);echo " - ";echo 
stripslashes($zeile["dose"]);?></span></li>
-                               <?php } ?>
-</ul>
\ No newline at end of file

Copied: care2x/branches/gettext/modules/nursing/include/inc_search_medicine.php 
(from rev 6440, 
care2x/branches/gettext/modules/nursing/include/inc_search_medicaments.php)
===================================================================
--- care2x/branches/gettext/modules/nursing/include/inc_search_medicine.php     
                        (rev 0)
+++ care2x/branches/gettext/modules/nursing/include/inc_search_medicine.php     
2010-06-30 09:32:16 UTC (rev 6444)
@@ -0,0 +1,41 @@
+<?php
+$root_path = '../../../';
+require($root_path.'/include/helpers/inc_environment_global.php');
+global $db;
+
+$dbtable='care_pharma_products_main';
+$dbtablejoin='care_pharma_products_main_sub';  
+extract($_POST);
+$tmpBestellNum = '';
+for($i=0;$i<=$maxelements;$i++){
+       if($_POST['b'.$i])
+               $tmpBestellNum .=  "'" . $_POST['b'.$i] .'\',';
+}
+if($tmpBestellNum) $tmpBestellNum = substr($tmpBestellNum, 0, -1);  
+# clean input data
+$keyword=addslashes(trim($_POST['search']));
+///$db->debug=true;
+
+$sql="SELECT DISTINCT $dbtable.* FROM $dbtable RIGHT JOIN $dbtablejoin ON 
$dbtable.bestellnum = $dbtablejoin.bestellnum 
+               WHERE $dbtablejoin.pcs > 0 AND ( 
$dbtable.bestellnum='%$keyword%'
+               OR $dbtable.artikelnum LIKE '%$keyword%'
+               OR $dbtable.industrynum LIKE '%$keyword%'
+               OR $dbtable.artikelname LIKE '%$keyword%'
+               OR $dbtable.generic LIKE '%$keyword%'
+               OR $dbtable.description LIKE '%$keyword%')";
+if($tmpBestellNum) $sql .= " AND  $dbtable.bestellnum NOT IN ($tmpBestellNum)";
+$ergebnis=$db->Execute($sql);
+       
+if (!$ergebnis) {
+       echo "<li>Could not successfully run query ($sql) from DB: " . 
mysql_error(). "</li>";
+       exit;
+}      
+
+?>
+
+<ul>
+<?php while($zeile=$ergebnis->FetchRow()) { ?>
+       <li id="<?php echo stripslashes($zeile["bestellnum"]);?>">
+<div class="sx"><?php echo stripslashes($zeile["artikelname"]);echo " - ";echo 
stripslashes($zeile["generic"]); ?></div><span > / <?php echo 
stripslashes($zeile["packing"]);echo " - ";echo 
stripslashes($zeile["dose"]);?></span></li>
+                               <?php } ?>
+</ul>
\ No newline at end of file

Modified: care2x/branches/gettext/modules/nursing/nursing-getmedx.php
===================================================================
--- care2x/branches/gettext/modules/nursing/nursing-getmedx.php 2010-06-30 
09:22:04 UTC (rev 6443)
+++ care2x/branches/gettext/modules/nursing/nursing-getmedx.php 2010-06-30 
09:32:16 UTC (rev 6444)
@@ -638,7 +638,7 @@
       </div>
       <div id="hint"></div>
       <script type="text/javascript">
-      var includeScript = "include/inc_search_medicaments.php?";
+      var includeScript = "include/inc_search_medicine.php?";
                var kot = new Ajax.Autocompleter("search","hint",includeScript, 
{afterUpdateElement : setSelectionId,autoSelect: true, minChars: 
2,callback:funxkot});
                
                function setSelectionId(text, li) {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Care2002-developers mailing list
Care2002-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/care2002-developers

Reply via email to