Revision: 6491
          http://care2002.svn.sourceforge.net/care2002/?rev=6491&view=rev
Author:   mizuko
Date:     2010-06-30 12:29:34 +0000 (Wed, 30 Jun 2010)

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

Added Paths:
-----------
    
care2x/branches/gettext/modules/products/products-database-functions-datadelete.php
    
care2x/branches/gettext/modules/products/products-database-functions-eingabe.php
    
care2x/branches/gettext/modules/products/products-database-functions-manage.php

Removed Paths:
-------------
    
care2x/branches/gettext/modules/products/products-datenbank-functions-datadelete.php
    
care2x/branches/gettext/modules/products/products-datenbank-functions-eingabe.php
    
care2x/branches/gettext/modules/products/products-datenbank-functions-manage.php

Copied: 
care2x/branches/gettext/modules/products/products-database-functions-datadelete.php
 (from rev 6490, 
care2x/branches/gettext/modules/products/products-datenbank-functions-datadelete.php)
===================================================================
--- 
care2x/branches/gettext/modules/products/products-database-functions-datadelete.php
                         (rev 0)
+++ 
care2x/branches/gettext/modules/products/products-database-functions-datadelete.php
 2010-06-30 12:29:34 UTC (rev 6491)
@@ -0,0 +1,163 @@
+<?php
+error_reporting(E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR);
+require('./roots.php');
+require($root_path.'include/helpers/inc_environment_global.php');
+/**
+* CARE2X Integrated Hospital Information System Deployment 2.1 - 2004-10-02
+* GNU General Public License
+* Copyright 2002,2003,2004,2005 Elpidio Latorilla
+* elpi...@care2x.org, 
+*
+* See the file "copy_notice.txt" for the licence notice
+*/
+define('LANG_FILE','products.php');
+$local_user='ck_prod_db_user';
+require_once($root_path.'include/helpers/inc_front_chain_lang.php');
+
+require_once($root_path.'include/core/class_core.php');
+$core = & new Core;
+
+$thisfile=basename(__FILE__);
+
+switch($cat){
+
+       case "pharma":
+                                                       $title=$LDPharmacy;
+                                                       
$dbtable="care_pharma_products_main";
+                                                       
$imgpath=$root_path."uplodas/pharma/img/";
+                                                       
$breakfile=$root_path."modules/pharmacy/pharmacy-database-functions.php?sid=$sid&lang=$lang&userck=$userck";
+                                                       break;
+       case "medstock":
+                                                       $title=$LDMedDepot;
+                                                       
$dbtable="care_med_products_main";
+                                                       
$imgpath=$root_path."uplodas/medstock/img/";
+                                                       
$breakfile=$root_path."modules/medstock/medstock-database-functions.php?sid=$sid&lang=$lang&userck=$userck";
+                                                       break;
+       
+       default:  
{header("Location:".$root_path."language/".$lang."/lang_".$lang."_invalid-access-warning.php");
 exit;};
+
+}
+
+if(($mode=='delete')&&($sure)&&($keyword!='')&&($keytype!='')) {
+       
+       $deleteok=false;
+
+    $sql="DELETE  FROM $dbtable WHERE  $keytype='$keyword'";
+
+       if($ergebnis=$core->Transact($sql)){
+               header 
("location:products-database-functions-manage.php".URL_REDIRECT_APPEND."&from=deleteok&cat=$cat&userck=$userck");
+               $deleteok=true;
+       }
+       //echo $sql;
+}
+
+//simulate update to search the keyword
+$update=true;
+
+# Load search routine
+require("includes/inc_products_search_mod_database.php");
+
+# Start Smarty templating here
+ /**
+ * LOAD Smarty
+ */
+
+ # Note: it is advisable to load this after the inc_front_chain_lang.php so
+ # that the smarty script can use the user configured template theme
+
+ require_once($root_path.'gui/smarty_template/smarty_care.class.php');
+ $smarty = new smarty_care('common');
+
+ # Title in the title bar
+ $smarty->assign('sToolbarTitle',"$title $LDPharmaDb $LDManage");
+
+ # href for the back button
+// $smarty->assign('pbBack',$returnfile);
+
+ # href for the help button
+ 
$smarty->assign('pbHelp',"javascript:gethelp('products_db.php','delete','$from','$cat')");
+
+ # href for the close button
+ $smarty->assign('breakfile',$breakfile);
+
+ # Window bar title
+ $smarty->assign('sWindowTitle',"$title $LDPharmaDb $LDManage");
+
+
+ # Buffer page output
+ ob_start()
+
+?>
+
+<a name="pagetop"></a>
+
+<ul>
+<p>
+<br>
+
+<?php 
+if(!$sure)
+{
+        echo '
+               <table border=0>
+     <tr>
+       <td><img '.createMascot($root_path,'mascot1_r.gif','0','middle').'></td>
+       <td><FONT face="Verdana,Helvetica,Arial" size=3  color="#800000">
+               '.$LDConfirmDelete.'</font><br>
+               <font size=2>'.$LDAlertDelete.'</font><p>
+               <a 
href="products-database-functions-manage.php'.URL_APPEND.'&keyword='.$keyword.'&userck='.$userck.'&cat='.$cat.'&mode=search"><b><font
 color="#ff0000"><< '.$LDNoBack.'</font></b></a></td>
+     </tr>
+   </table>    ';
+}
+else
+{
+       if(!$deleteok) echo'
+                       <img 
'.createMascot($root_path,'mascot1_r.gif','0','middle').'><FONT 
face="Verdana,Helvetica,Arial" size=3  color="#800000">
+               '.$LDNoDelete.'</font><p>';
+}
+
+//simulate saved condition to force the static display of data
+$saveok=true;
+
+# Workaround to force display of form template
+$bShowThisForm = TRUE;
+
+# Load search results display routine
+require("includes/inc_products_search_result_mod.php");
+
+?>
+<p>
+<a href="<?php echo $breakfile ?>"><img <?php echo 
createLDImgSrc($root_path,'cancel.gif','0','right') ?>></a>
+
+<?php 
+
+if(!$sure) echo'
+       <form action="'.$thisfile.'" method="get" name=delform>
+ <input type="hidden" name="sure" value="1">
+ <input type="hidden" name="sid" value="'.$sid.'">
+ <input type="hidden" name="lang" value="'.$lang.'">
+ <input type="hidden" name="mode" value="delete">
+ <input type="hidden" name="cat" value="'.$cat.'">
+ <input type="hidden" name="userck" value="'.$userck.'">
+ <input type="hidden" name="keyword" value="'.$keyword.'">
+ <input type="hidden" name="keytype" value="'.$keytype.'">
+  <input type="submit" value="'.$LDYesDelete.'">
+ </form>
+';
+?>
+</ul>
+
+<?php
+
+$sTemp = ob_get_contents();
+ob_end_clean();
+
+# Assign the form template to mainframe
+
+ $smarty->assign('sMainFrameBlockData',$sTemp);
+
+ /**
+ * show Template
+ */
+ $smarty->display('common/mainframe.tpl');
+?>

Copied: 
care2x/branches/gettext/modules/products/products-database-functions-eingabe.php
 (from rev 6490, 
care2x/branches/gettext/modules/products/products-datenbank-functions-eingabe.php)
===================================================================
--- 
care2x/branches/gettext/modules/products/products-database-functions-eingabe.php
                            (rev 0)
+++ 
care2x/branches/gettext/modules/products/products-database-functions-eingabe.php
    2010-06-30 12:29:34 UTC (rev 6491)
@@ -0,0 +1,225 @@
+<?php
+//error_reporting(E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR);
+require('./roots.php');
+require($root_path.'include/helpers/inc_environment_global.php');
+define('LANG_FILE','products.php');
+$local_user='ck_prod_db_user';
+require_once($root_path.'include/helpers/inc_front_chain_lang.php');
+# Create products object
+require_once($root_path.'modules/products/model/class_product.php');
+$product_obj=new Product;
+
+///$db->debug=1;
+
+switch($cat) {
+       case "pharma":  
+                                       $title=$LDPharmacy;
+                                       
$breakfile=$root_path."modules/pharmacy/pharmacy-database-functions.php".URL_APPEND."&userck=$userck";
+                                       
$imgpath=$root_path."uplodas/pharma/img/";
+                                       break;
+       case "medstock":
+                                       $title=$LDMedDepot;
+                                       
$breakfile=$root_path."modules/medstock/medstock-database-functions.php".URL_APPEND."&userck=$userck";
+                                       
$imgpath=$root_path."uplodas/medstock/img/";
+                                       break;
+       default:  
{header("Location:".$root_path."language/".$lang."/lang_".$lang."_invalid-access-warning.php");
 exit;}; 
+}
+
+
+$thisfile='products-database-functions-eingabe.php';
+
+# Save data routine
+if($mode=='save') include('includes/inc_products_db_save_mod.php');
+
+# Start Smarty templating here
+ /**
+ * LOAD Smarty
+ */
+
+ # Note: it is advisable to load this after the inc_front_chain_lang.php so
+ # that the smarty script can use the user configured template theme
+
+ require_once($root_path.'gui/smarty_template/smarty_care.class.php');
+ $smarty = new smarty_care('common');
+
+ # Title in the title bar
+ $smarty->assign('sToolbarTitle',"$title::$LDPharmaDb::$LDNewProduct");
+
+ # href for the back button
+// $smarty->assign('pbBack',$returnfile);
+
+ # href for the help button
+ 
$smarty->assign('pbHelp',"javascript:gethelp('products_db.php','input','$mode','$cat')");
+
+ # href for the close button
+ $smarty->assign('breakfile',$breakfile);
+
+ # Window bar title
+ $smarty->assign('sWindowTitle',"$title::$LDPharmaDb::$LDNewProduct");
+
+ # Assign Body Onload javascript code
+ if($mode!='save'&&$mode!='update') 
$smarty->assign('sOnLoadJs','onLoad="document.inputform.bestellnum.focus()"');
+
+ # Collect javascript code
+
+ob_start();
+
+// Load the javascript code
+require('includes/inc_js_products.php');
+
+$sTemp = ob_get_contents();
+ob_end_clean();
+
+$smarty->append('JavaScript',$sTemp);
+
+ # Assign prompt messages
+if($saveok){
+       if($update) $smarty->assign('LDUpdateOk',$LDUpdateOk);
+               else $smarty->assign('LDDataSaved',$LDDataSaved);
+}
+
+if($error=="order_nr_exists"){
+       $smarty->assign('sMascotImg',"<img 
".createMascot($root_path,'mascot1_r.gif','0','absmiddle').">");
+       $smarty->assign('LDOrderNrExists',$LDOrderNrExists);
+}
+
+if($update&&(!$updateok)&&($mode=='save')) 
$smarty->assign('sNoSave',$LDDataNoSaved.'<a 
href="products-database-functions-eingabe.php'.URL_APPEND.'&cat='.$cat.'"><u>'.$LDClk2EnterNew.'</u></a>');
+
+ $smarty->assign('sFormStart','<form ENCTYPE="multipart/form-data" 
action="'.$thisfile.'" method="post" name="inputform" onSubmit="return 
prufform(this)">');
+ $smarty->assign('sFormEnd','</form>');
+
+ # Assign form elements
+ $smarty->assign('LDOrderNr',$LDOrderNr);
+ $smarty->assign('LDArticleName',$LDArticleName);
+ $smarty->assign('LDGeneric',$LDGeneric);
+ $smarty->assign('LDDescription',$LDDescription);
+ $smarty->assign('LDPacking',$LDPacking);
+ $smarty->assign('LDDose',$LDDose);
+ $smarty->assign('LDCAVE',$LDCAVE);
+ $smarty->assign('LDCategory',$LDCategory);
+ $smarty->assign('LDMinOrder',$LDMinOrder);
+ $smarty->assign('LDMaxOrder',$LDMaxOrder);
+ $smarty->assign('LDPcsProOrder',$LDPcsProOrder);
+ $smarty->assign('LDIndustrialNr',$LDIndustrialNr);
+ $smarty->assign('LDLicenseNr',$LDLicenseNr);
+ $smarty->assign('LDMinPieces',$LDMinPieces);
+ $smarty->assign('LDPicFile',$LDPicFile);
+
+ # Assign the preview picture
+
+ if(($saveok||$update)&&($picfilename!="")){
+       $smarty->assign('LDPreview',$LDPreview);
+       $smarty->assign('sProductImage','<img src="'.$imgpath.$picfilename.'" 
border=0 name="prevpic">');
+}else{
+       $smarty->assign('sProductImage','<img 
src="../../gui/img/common/default/pixel.gif" border=0 name="prevpic">');
+}
+
+ # Assign form inputs (or values)
+
+ if ($saveok||$update) $smarty->assign('sOrderNrInput',$bestellnum.'</b><input 
type="hidden" name="bestellnum" value="'.$bestellnum.'">');
+       else $smarty->assign('sOrderNrInput','<input type="text" 
name="bestellnum" value="'.$bestellnum.'" size=20 maxlength=20>');
+
+if ($saveok){
+       $smarty->assign('sArticleNameInput',$artname.'<input type="hidden" 
name="artname" value="'.$artname.'">');
+       $smarty->assign('sGenericInput',$generic.'<input type="hidden" 
name="generic" value="'.$generic.'">');
+       $smarty->assign('sDescriptionInput',nl2br($besc).'<input type="hidden" 
name="besc" value="'.$besc.'">');
+       $smarty->assign('sPackingInput',$pack.'<input type="hidden" name="pack" 
value="'.$pack.'">');
+       $smarty->assign('sDoseInput',$dose.'<input type="hidden" name="dose" 
value="'.$dose.'">');
+       $smarty->assign('sCAVEInput',$caveflag.'<input type="hidden" 
name="caveflag" value="'.$caveflag.'">');
+       $smarty->assign('sCategoryInput',$medgroup.'<input type="hidden" 
name="medgroup" value="'.$medgroup.'">');
+       $smarty->assign('sMinOrderInput',$minorder.'<input type="hidden" 
name="minorder" value="'.$minorder.'">');
+       $smarty->assign('sMaxOrderInput',$maxorder.'<input type="hidden" 
name="maxorder" value="'.$maxorder.'">');
+       $smarty->assign('sPcsProOrderInput',$proorder.'<input type="hidden" 
name="proorder" value="'.$proorder.'">');
+       $smarty->assign('sIndustrialNrInput',$artnum.'<input type="hidden" 
name="artnum" value="'.$artnum.'">');
+       $smarty->assign('sLicenseNrInput',$indusnum.'<input type="hidden" 
name="indusnum" value="'.$indusnum.'">');
+       $smarty->assign('sMinPiecesInput',$minpcs.'<input type="hidden" 
name="minpcs" value="'.$minpcs.'">');   
+       $smarty->assign('sPicFileInput',$picfilename.'<input type="hidden" 
name="bild" value="'.$picfilename.'">');
+}else{
+       $smarty->assign('sArticleNameInput','<input type="text" name="artname" 
value="'.$artname.'" size=40 maxlength=40>');
+       $smarty->assign('sGenericInput','<input type="text" name="generic" 
value="'.$generic.'" size=40 maxlength=60>');
+       $smarty->assign('sDescriptionInput','<textarea name="besc" cols=35 
rows=4>'.$besc.'</textarea>');
+       $smarty->assign('sPackingInput','<input type="text" name="pack" 
value="'.$pack.'"  size=40 maxlength=40>');
+       $smarty->assign('sDoseInput','<input type="text" name="dose" 
value="'.$dose.'"  size=40 maxlength=40>');
+       $smarty->assign('sCAVEInput','<input type="text" name="caveflag" 
value="'.$caveflag.'" size=40 maxlength=80>');
+       $smarty->assign('sCategoryInput','<input type="text" name="medgroup" 
value="'.$medgroup.'" size=20 maxlength=40>');
+       $smarty->assign('sMinOrderInput','<input type="text" name="minorder" 
value="'.$minorder.'" size=20 maxlength=9>');
+       $smarty->assign('sMaxOrderInput','<input type="text" name="maxorder" 
value="'.$maxorder.'" size=20 maxlength=9>');
+       $smarty->assign('sPcsProOrderInput','<input type="text" name="proorder" 
value="'.$proorder.'" size=20 maxlength=40>');
+       $smarty->assign('sIndustrialNrInput','<input type="text" name="artnum" 
value="'.$artnum.'" size=20 maxlength=20>');
+       $smarty->assign('sLicenseNrInput','<input type="text" name="indusnum" 
value="'.$indusnum.'" size=20 maxlength=20>');
+       $smarty->assign('sMinPiecesInput','<input type="text" name="minpcs" 
value="'.$minpcs.'" size=20 maxlength=20>');        
+       $smarty->assign('sPicFileInput','<input type="file" name="bild" 
onChange="getfilepath(this)">');
+
+       $smarty->assign('LDReset','<input type="reset" value="'.$LDReset.'" 
onClick="document.inputform.bestellnum.focus()" >');
+       $smarty->assign('LDSave','<input type="hidden" name="picref" 
value="'.$picfilename.'"><input type="submit" value="'.$LDSave.'">');
+}
+
+# Collect hidden inputs
+
+ob_start();
+$sTemp='';
+ ?>
+
+  <input type="hidden" name="sid" value="<?php echo $sid?>">
+  <input type="hidden" name="lang" value="<?php echo $lang?>">
+  <input type="hidden" name="cat" value="<?php echo $cat?>">
+  <input type="hidden" name="userck" value="<?php echo $userck?>">
+  <input type="hidden" name="picfilename" value="<?php echo  $picfilename ?>">
+  <input type="hidden" name="mode" value="<?php if($saveok) echo "update"; 
else echo "save"; ?>">
+  <input type="hidden" name="encoder" value="<?php echo  str_replace(" 
","+",$HTTP_COOKIES_VARS[$local_user.$sid])?>">
+  <input type="hidden" name="dstamp" value="<?php echo  
str_replace("_",".",date(Y_m_d))?>">
+  <input type="hidden" name="tstamp" value="<?php echo  
str_replace("_",".",date(H_i))?>">
+  <input type="hidden" name="lockflag" value="<?php echo  $lockflag?>">
+  <input type="hidden" name="update" value="<?php if($saveok) echo "1"; else 
echo $update;?>">
+  <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="2000000">
+<?php 
+
+$sTemp = ob_get_contents();
+ob_end_clean();
+
+# Append more hidden inputs acc. to mode
+
+if($update){
+       if($mode!="save"){ 
+               $sTemp = $sTemp.'
+         <input type="hidden" name="ref_bnum" value="'.$bestellnum.'">
+         <input type="hidden" name="ref_artnum" value="'.$artnum.'">
+        <input type="hidden" name="ref_indusnum" value="'.$indusnum.'">
+        <input type="hidden" name="ref_artname" value="'.$artname.'">
+        ';
+       }else{ 
+               $sTemp = $sTemp.'
+        <input type="hidden" name="ref_bnum" value="'.$ref_bnum.'">
+         <input type="hidden" name="ref_artnum" value="'.$ref_artnum.'">
+        <input type="hidden" name="ref_indusnum" value="'.$ref_indusnum.'">
+        <input type="hidden" name="ref_artname" value="'.$ref_artname.'">
+         ';
+       }
+}
+
+if($saveok){
+       
+       $smarty->assign('sNewProduct',"<a 
href=\"".$thisfile.URL_APPEND."&cat=$cat&userck=$userck&update=0\">$LDNewProduct</a>");
+       
+       # Show update button
+       $smarty->assign('sUpdateButton','<input type="image" 
'.createLDImgSrc($root_path,'update.gif','0').'>');
+       
+       $sBreakImg ='close2.gif';
+
+}else{
+
+       $sBreakImg ='cancel.gif';
+}
+$smarty->assign('sHiddenInputs',$sTemp);
+
+ $smarty->assign('sBreakButton','<a href="'.$breakfile.'"><img 
'.createLDImgSrc($root_path,$sBreakImg,'0','left').' 
alt="'.$LDBack2Menu.'"></a>');
+
+# Assign the form template to mainframe
+
+ $smarty->assign('sMainBlockIncludeFile','products/form.tpl');
+
+ /**
+ * show Template
+ */
+ $smarty->display('common/mainframe.tpl');
+?>
\ No newline at end of file

Copied: 
care2x/branches/gettext/modules/products/products-database-functions-manage.php 
(from rev 6490, 
care2x/branches/gettext/modules/products/products-datenbank-functions-manage.php)
===================================================================
--- 
care2x/branches/gettext/modules/products/products-database-functions-manage.php 
                            (rev 0)
+++ 
care2x/branches/gettext/modules/products/products-database-functions-manage.php 
    2010-06-30 12:29:34 UTC (rev 6491)
@@ -0,0 +1,274 @@
+<?php
+error_reporting(E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR);
+require('./roots.php');
+require($root_path.'include/helpers/inc_environment_global.php');
+
+define('LANG_FILE','products.php');
+$local_user='ck_prod_db_user';
+require_once($root_path.'include/helpers/inc_front_chain_lang.php');
+# Create products object
+require_once($root_path.'modules/products/model/class_product.php');
+$product_obj=new Product;
+
+$thisfile=basename(__FILE__);
+
+if(!isset($mode)) $mode="";
+if(!isset($cat)) $cat="";
+if(!isset($linecount)) $linecount="";
+switch($cat)
+{
+       case "pharma":  
+                                                       $title=$LDPharmacy;
+                                                       
$breakfile=$root_path."modules/pharmacy/pharmacy-database-functions.php".URL_APPEND."&userck=$userck";
+                                                       
$imgpath=$root_path."uplodas/pharma/img/";
+                                                       break;
+       case "medstock":
+                                                       $title=$LDMedDepot;
+                                                       
$breakfile=$root_path."modules/medstock/medstock-database-functions.php".URL_APPEND."&userck=$userck";
+                                                       
$imgpath=$root_path."uplodas/medstock/img/";
+                                                       break;
+       default:  
{header("Location:".$root_path."language/".$lang."/lang_".$lang."_invalid-access-warning.php");
 exit;}; 
+
+}
+
+if($mode=='save')
+{
+       include('includes/inc_products_db_save_mod.php');
+}
+
+if(!empty($mode)) include('includes/inc_products_search_mod_database.php');
+
+if($linecount==1) {  $from='multiple'; }
+
+# Start Smarty templating here
+ /**
+ * LOAD Smarty
+ */
+
+ # Note: it is advisable to load this after the inc_front_chain_lang.php so
+ # that the smarty script can use the user configured template theme
+
+ require_once($root_path.'gui/smarty_template/smarty_care.class.php');
+ $smarty = new smarty_care('common');
+
+ # Title in the title bar
+ $smarty->assign('sToolbarTitle',"$title $LDPharmaDb $LDManage");
+
+ # href for the back button
+// $smarty->assign('pbBack',$returnfile);
+
+ # href for the help button
+ 
$smarty->assign('pbHelp',"javascript:gethelp('products_db.php','mng','$from','$cat','$update')");
+
+ # href for the close button
+ $smarty->assign('breakfile',$breakfile);
+
+ # Window bar title
+ $smarty->assign('sWindowTitle',"$title $LDPharmaDb $LDManage");
+
+ # Assign Body Onload javascript code
+ $smarty->assign('sOnLoadJs','onLoad="document.suchform.keyword.select()"');
+
+ # Collect javascript code
+ ob_start()
+
+?>
+
+<script language="javascript" >
+<!--
+
+function pruf(d)
+{
+       if(d.keyword.value=="")
+       {
+               d.keyword.focus();
+                return false;
+       }
+       return true;
+}
+
+// -->
+</script>
+
+<?php
+
+# Javascript validator
+require('includes/inc_js_products.php');
+
+$sTemp = ob_get_contents();
+ob_end_clean();
+
+$smarty->append('JavaScript',$sTemp);
+
+# Buffer page output
+
+ob_start();
+
+?>
+
+<a name="pagetop"></a>
+
+<ul>
+
+<p>
+<br>
+
+<?php if($from=="deleteok") echo'
+       <FONT class="prompt">'.$LDDataRemoved.'</font>
+       <hr>';
+?>
+
+<form action="<?php echo $thisfile?>" method="get" name="suchform" 
onSubmit="return pruf(this)">
+       <table border=0 cellspacing=2 cellpadding=3>
+               <tr bgcolor=#ffffdd>
+                       <td colspan=2>
+                               <?php echo $LDSearchWordPrompt ?>
+                               <br><p>
+                       </td>
+               </tr>
+               <tr bgcolor=#ffffdd>
+                       <td align=right>
+                               <?php echo $LDSearchKey ?>:
+                       </td>
+                       <td>
+                               <input type="text" name="keyword" size=40 
maxlength=40 value="<?php echo $keyword ?>">
+                       </td>
+               </tr>
+               <tr>
+                       <td>&nbsp;
+                       </td>
+                       <td align="right"><input type="submit" value="<?php 
echo $LDSearch ?>" >
+                       </td>
+                </tr>
+       </table>
+               
+       <input type="hidden" name="sid" value="<?php echo $sid?>">
+       <input type="hidden" name="lang" value="<?php echo $lang?>">
+       <input type="hidden" name="cat" value="<?php echo $cat?>">
+       <input type="hidden" name="userck" value="<?php echo $userck?>">
+       <input type="hidden" name="mode" value="search">
+
+</form>
+
+<?php
+
+if($linecount==1) echo '
+                               <form ENCTYPE="multipart/form-data" 
action="'.$thisfile.'" method="post" name="inputform" onSubmit="return 
prufform(this)">';
+
+if($mode=='save'){
+       if($saveok) {
+               $smarty->assign('sMascotImg','<img 
'.createMascot($root_path,'mascot1_r.gif','0','absmiddle').'>');
+               $smarty->assign('sSaveFeedBack',$LDDataSaved);
+       }else{
+               echo $sql.'<p>';
+               $smarty->assign('sNoSave',$LDDataNoSaved.'<br><a 
href="products-database-functions-eingabe.php'.URL_APPEND.'">
+                       <u>'.$LDClk2EnterNew.'</u></a>');
+       }
+}
+
+# Workaround to force display of the form template
+$bShowThisForm = TRUE;
+
+# Load the form GUI
+require("includes/inc_products_search_result_mod.php");
+
+if($linecount==1){
+       //<input type="hidden" name="picfilename" value="'.$zeile[picfile].'"> 
+
+       echo '
+       <input type="hidden" name="encoder" 
value="'.strtr($_COOKIE[$local_user.$sid]," ","+").'">
+       <input type="hidden" name="dstamp" 
value="'.str_replace("_",".",date(Y_m_d)).'">
+       <input type="hidden" name="tstamp" 
value="'.str_replace("_",".",date(H_i)).'">
+       <input type="hidden" name="lock_flag" value="">
+       <input type="hidden" name="sid" value="'.$sid.'">
+       <input type="hidden" name="lang" value="'.$lang.'">
+       <input type="hidden" name="cat" value="'.$cat.'">
+       <input type="hidden" name="userck" value="'.$userck.'">
+       <input type="hidden" name="keyword" value="'.$zeile[bestellnum].'">
+       <input type="hidden" name="update" value="1">
+       <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="2000000">
+       ';
+
+       if($mode=='search'){
+               echo'
+         <input type="hidden" name="ref_bnum" value="'.$zeile[bestellnum].'">
+         <input type="hidden" name="ref_artnum" value="'.$zeile[artikelnum].'">
+        <input type="hidden" name="ref_indusnum" 
value="'.$zeile[industrynum].'">
+        <input type="hidden" name="ref_artname" 
value="'.$zeile[artikelname].'">
+        ';
+       }else{ 
+               echo'
+        <input type="hidden" name="ref_bnum" value="'.$ref_bnum.'">
+         <input type="hidden" name="ref_artnum" value="'.$ref_artnum.'">
+        <input type="hidden" name="ref_indusnum" value="'.$ref_indusnum.'">
+        <input type="hidden" name="ref_artname" value="'.$ref_artname.'">
+         ';
+       }
+       
+       if($update&&(!$saveok)){
+               echo'
+               <input type="hidden" name="mode" value="save">
+               <input type="hidden" name="picref" value="'.$zeile[picfile].'">
+               <input type="submit" value="'.$LDSave.'">
+               </form>';
+       }else{
+               echo'
+               <input type="hidden" name="mode" value="search">
+               <input type="submit" value="'.$LDUpdateData.'">
+               </form>';
+
+               echo'
+               <form action="products-database-functions-datadelete.php" 
method="get" name="delform">
+               <input type="hidden" name="sid" value="'.$sid.'">
+               <input type="hidden" name="lang" value="'.$lang.'">
+               <input type="hidden" name="userck" value="'.$userck.'">
+               <input type="hidden" name="cat" value="'.$cat.'">';
+               if($zeile[bestellnum]!="") echo '
+               <input type="hidden" name="keyword" 
value="'.$zeile[bestellnum].'">
+               <input type="hidden" name="keytype" value="bestellnum">';
+               else if($zeile[artikelnum]!="") echo '
+                               <input type="hidden" name="keyword" 
value="'.$zeile[artikelnum].'">
+                               <input type="hidden" name="keytype" 
value="artikelnum">';
+               else if($zeile[industrynum]!="") echo '
+                               <input type="hidden" name="keyword" 
value="'.$zeile[industrynum].'">
+                               <input type="hidden" name="keytype" 
value="industrynum">';
+               else if($zeile[artikelname]!="") echo '
+                               <input type="hidden" name="keyword" 
value="'.$zeile[artikelname].'">
+                               <input type="hidden" name="keytype" 
value="artikelname">';
+               else if($zeile[generic]!="") echo '
+                               <input type="hidden" name="keyword" 
value="'.$zeile[generic].'">
+                               <input type="hidden" name="keytype" 
value="generic">';
+               echo'
+               <input type="hidden" name="mode" value="delete">
+               <input type="hidden" name="sure" value="0">
+               <input type="hidden" name="cat" value="'.$cat.'">
+               <input type="submit" value="'.$LDRemoveFromDb.'">
+               </form>
+               ';
+       }
+}
+?>
+<p>
+
+<?php if ($from=="multiple")
+echo '
+<a 
href="products-database-functions-manage.php'.URL_APPEND.'&cat='.$cat.'"><img 
'.createLDImgSrc($root_path,'back2.gif','0','absmiddle').' 
alt="'.$LDBack.'"></a>
+';
+?>
+<a href="<?php echo $breakfile ?>"><img <?php echo 
createLDImgSrc($root_path,'cancel.gif','0') ?>></a>
+</ul>
+
+<?php
+
+$sTemp = ob_get_contents();
+ob_end_clean();
+
+# Assign the form template to mainframe
+
+ $smarty->assign('sMainFrameBlockData',$sTemp);
+
+ /**
+ * show Template
+ */
+ $smarty->display('common/mainframe.tpl');
+?>

Deleted: 
care2x/branches/gettext/modules/products/products-datenbank-functions-datadelete.php
===================================================================
--- 
care2x/branches/gettext/modules/products/products-datenbank-functions-datadelete.php
        2010-06-30 12:28:16 UTC (rev 6490)
+++ 
care2x/branches/gettext/modules/products/products-datenbank-functions-datadelete.php
        2010-06-30 12:29:34 UTC (rev 6491)
@@ -1,163 +0,0 @@
-<?php
-error_reporting(E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR);
-require('./roots.php');
-require($root_path.'include/helpers/inc_environment_global.php');
-/**
-* CARE2X Integrated Hospital Information System Deployment 2.1 - 2004-10-02
-* GNU General Public License
-* Copyright 2002,2003,2004,2005 Elpidio Latorilla
-* elpi...@care2x.org, 
-*
-* See the file "copy_notice.txt" for the licence notice
-*/
-define('LANG_FILE','products.php');
-$local_user='ck_prod_db_user';
-require_once($root_path.'include/helpers/inc_front_chain_lang.php');
-
-require_once($root_path.'include/core/class_core.php');
-$core = & new Core;
-
-$thisfile=basename(__FILE__);
-
-switch($cat){
-
-       case "pharma":
-                                                       $title=$LDPharmacy;
-                                                       
$dbtable="care_pharma_products_main";
-                                                       
$imgpath=$root_path."uplodas/pharma/img/";
-                                                       
$breakfile=$root_path."modules/pharmacy/pharmacy-database-functions.php?sid=$sid&lang=$lang&userck=$userck";
-                                                       break;
-       case "medstock":
-                                                       $title=$LDMedDepot;
-                                                       
$dbtable="care_med_products_main";
-                                                       
$imgpath=$root_path."uplodas/medstock/img/";
-                                                       
$breakfile=$root_path."modules/medstock/medstock-database-functions.php?sid=$sid&lang=$lang&userck=$userck";
-                                                       break;
-       
-       default:  
{header("Location:".$root_path."language/".$lang."/lang_".$lang."_invalid-access-warning.php");
 exit;};
-
-}
-
-if(($mode=='delete')&&($sure)&&($keyword!='')&&($keytype!='')) {
-       
-       $deleteok=false;
-
-    $sql="DELETE  FROM $dbtable WHERE  $keytype='$keyword'";
-
-       if($ergebnis=$core->Transact($sql)){
-               header 
("location:products-database-functions-manage.php".URL_REDIRECT_APPEND."&from=deleteok&cat=$cat&userck=$userck");
-               $deleteok=true;
-       }
-       //echo $sql;
-}
-
-//simulate update to search the keyword
-$update=true;
-
-# Load search routine
-require("includes/inc_products_search_mod_database.php");
-
-# Start Smarty templating here
- /**
- * LOAD Smarty
- */
-
- # Note: it is advisable to load this after the inc_front_chain_lang.php so
- # that the smarty script can use the user configured template theme
-
- require_once($root_path.'gui/smarty_template/smarty_care.class.php');
- $smarty = new smarty_care('common');
-
- # Title in the title bar
- $smarty->assign('sToolbarTitle',"$title $LDPharmaDb $LDManage");
-
- # href for the back button
-// $smarty->assign('pbBack',$returnfile);
-
- # href for the help button
- 
$smarty->assign('pbHelp',"javascript:gethelp('products_db.php','delete','$from','$cat')");
-
- # href for the close button
- $smarty->assign('breakfile',$breakfile);
-
- # Window bar title
- $smarty->assign('sWindowTitle',"$title $LDPharmaDb $LDManage");
-
-
- # Buffer page output
- ob_start()
-
-?>
-
-<a name="pagetop"></a>
-
-<ul>
-<p>
-<br>
-
-<?php 
-if(!$sure)
-{
-        echo '
-               <table border=0>
-     <tr>
-       <td><img '.createMascot($root_path,'mascot1_r.gif','0','middle').'></td>
-       <td><FONT face="Verdana,Helvetica,Arial" size=3  color="#800000">
-               '.$LDConfirmDelete.'</font><br>
-               <font size=2>'.$LDAlertDelete.'</font><p>
-               <a 
href="products-database-functions-manage.php'.URL_APPEND.'&keyword='.$keyword.'&userck='.$userck.'&cat='.$cat.'&mode=search"><b><font
 color="#ff0000"><< '.$LDNoBack.'</font></b></a></td>
-     </tr>
-   </table>    ';
-}
-else
-{
-       if(!$deleteok) echo'
-                       <img 
'.createMascot($root_path,'mascot1_r.gif','0','middle').'><FONT 
face="Verdana,Helvetica,Arial" size=3  color="#800000">
-               '.$LDNoDelete.'</font><p>';
-}
-
-//simulate saved condition to force the static display of data
-$saveok=true;
-
-# Workaround to force display of form template
-$bShowThisForm = TRUE;
-
-# Load search results display routine
-require("includes/inc_products_search_result_mod.php");
-
-?>
-<p>
-<a href="<?php echo $breakfile ?>"><img <?php echo 
createLDImgSrc($root_path,'cancel.gif','0','right') ?>></a>
-
-<?php 
-
-if(!$sure) echo'
-       <form action="'.$thisfile.'" method="get" name=delform>
- <input type="hidden" name="sure" value="1">
- <input type="hidden" name="sid" value="'.$sid.'">
- <input type="hidden" name="lang" value="'.$lang.'">
- <input type="hidden" name="mode" value="delete">
- <input type="hidden" name="cat" value="'.$cat.'">
- <input type="hidden" name="userck" value="'.$userck.'">
- <input type="hidden" name="keyword" value="'.$keyword.'">
- <input type="hidden" name="keytype" value="'.$keytype.'">
-  <input type="submit" value="'.$LDYesDelete.'">
- </form>
-';
-?>
-</ul>
-
-<?php
-
-$sTemp = ob_get_contents();
-ob_end_clean();
-
-# Assign the form template to mainframe
-
- $smarty->assign('sMainFrameBlockData',$sTemp);
-
- /**
- * show Template
- */
- $smarty->display('common/mainframe.tpl');
-?>

Deleted: 
care2x/branches/gettext/modules/products/products-datenbank-functions-eingabe.php
===================================================================
--- 
care2x/branches/gettext/modules/products/products-datenbank-functions-eingabe.php
   2010-06-30 12:28:16 UTC (rev 6490)
+++ 
care2x/branches/gettext/modules/products/products-datenbank-functions-eingabe.php
   2010-06-30 12:29:34 UTC (rev 6491)
@@ -1,225 +0,0 @@
-<?php
-//error_reporting(E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR);
-require('./roots.php');
-require($root_path.'include/helpers/inc_environment_global.php');
-define('LANG_FILE','products.php');
-$local_user='ck_prod_db_user';
-require_once($root_path.'include/helpers/inc_front_chain_lang.php');
-# Create products object
-require_once($root_path.'modules/products/model/class_product.php');
-$product_obj=new Product;
-
-///$db->debug=1;
-
-switch($cat) {
-       case "pharma":  
-                                       $title=$LDPharmacy;
-                                       
$breakfile=$root_path."modules/pharmacy/pharmacy-database-functions.php".URL_APPEND."&userck=$userck";
-                                       
$imgpath=$root_path."uplodas/pharma/img/";
-                                       break;
-       case "medstock":
-                                       $title=$LDMedDepot;
-                                       
$breakfile=$root_path."modules/medstock/medstock-database-functions.php".URL_APPEND."&userck=$userck";
-                                       
$imgpath=$root_path."uplodas/medstock/img/";
-                                       break;
-       default:  
{header("Location:".$root_path."language/".$lang."/lang_".$lang."_invalid-access-warning.php");
 exit;}; 
-}
-
-
-$thisfile='products-database-functions-eingabe.php';
-
-# Save data routine
-if($mode=='save') include('includes/inc_products_db_save_mod.php');
-
-# Start Smarty templating here
- /**
- * LOAD Smarty
- */
-
- # Note: it is advisable to load this after the inc_front_chain_lang.php so
- # that the smarty script can use the user configured template theme
-
- require_once($root_path.'gui/smarty_template/smarty_care.class.php');
- $smarty = new smarty_care('common');
-
- # Title in the title bar
- $smarty->assign('sToolbarTitle',"$title::$LDPharmaDb::$LDNewProduct");
-
- # href for the back button
-// $smarty->assign('pbBack',$returnfile);
-
- # href for the help button
- 
$smarty->assign('pbHelp',"javascript:gethelp('products_db.php','input','$mode','$cat')");
-
- # href for the close button
- $smarty->assign('breakfile',$breakfile);
-
- # Window bar title
- $smarty->assign('sWindowTitle',"$title::$LDPharmaDb::$LDNewProduct");
-
- # Assign Body Onload javascript code
- if($mode!='save'&&$mode!='update') 
$smarty->assign('sOnLoadJs','onLoad="document.inputform.bestellnum.focus()"');
-
- # Collect javascript code
-
-ob_start();
-
-// Load the javascript code
-require('includes/inc_js_products.php');
-
-$sTemp = ob_get_contents();
-ob_end_clean();
-
-$smarty->append('JavaScript',$sTemp);
-
- # Assign prompt messages
-if($saveok){
-       if($update) $smarty->assign('LDUpdateOk',$LDUpdateOk);
-               else $smarty->assign('LDDataSaved',$LDDataSaved);
-}
-
-if($error=="order_nr_exists"){
-       $smarty->assign('sMascotImg',"<img 
".createMascot($root_path,'mascot1_r.gif','0','absmiddle').">");
-       $smarty->assign('LDOrderNrExists',$LDOrderNrExists);
-}
-
-if($update&&(!$updateok)&&($mode=='save')) 
$smarty->assign('sNoSave',$LDDataNoSaved.'<a 
href="products-database-functions-eingabe.php'.URL_APPEND.'&cat='.$cat.'"><u>'.$LDClk2EnterNew.'</u></a>');
-
- $smarty->assign('sFormStart','<form ENCTYPE="multipart/form-data" 
action="'.$thisfile.'" method="post" name="inputform" onSubmit="return 
prufform(this)">');
- $smarty->assign('sFormEnd','</form>');
-
- # Assign form elements
- $smarty->assign('LDOrderNr',$LDOrderNr);
- $smarty->assign('LDArticleName',$LDArticleName);
- $smarty->assign('LDGeneric',$LDGeneric);
- $smarty->assign('LDDescription',$LDDescription);
- $smarty->assign('LDPacking',$LDPacking);
- $smarty->assign('LDDose',$LDDose);
- $smarty->assign('LDCAVE',$LDCAVE);
- $smarty->assign('LDCategory',$LDCategory);
- $smarty->assign('LDMinOrder',$LDMinOrder);
- $smarty->assign('LDMaxOrder',$LDMaxOrder);
- $smarty->assign('LDPcsProOrder',$LDPcsProOrder);
- $smarty->assign('LDIndustrialNr',$LDIndustrialNr);
- $smarty->assign('LDLicenseNr',$LDLicenseNr);
- $smarty->assign('LDMinPieces',$LDMinPieces);
- $smarty->assign('LDPicFile',$LDPicFile);
-
- # Assign the preview picture
-
- if(($saveok||$update)&&($picfilename!="")){
-       $smarty->assign('LDPreview',$LDPreview);
-       $smarty->assign('sProductImage','<img src="'.$imgpath.$picfilename.'" 
border=0 name="prevpic">');
-}else{
-       $smarty->assign('sProductImage','<img 
src="../../gui/img/common/default/pixel.gif" border=0 name="prevpic">');
-}
-
- # Assign form inputs (or values)
-
- if ($saveok||$update) $smarty->assign('sOrderNrInput',$bestellnum.'</b><input 
type="hidden" name="bestellnum" value="'.$bestellnum.'">');
-       else $smarty->assign('sOrderNrInput','<input type="text" 
name="bestellnum" value="'.$bestellnum.'" size=20 maxlength=20>');
-
-if ($saveok){
-       $smarty->assign('sArticleNameInput',$artname.'<input type="hidden" 
name="artname" value="'.$artname.'">');
-       $smarty->assign('sGenericInput',$generic.'<input type="hidden" 
name="generic" value="'.$generic.'">');
-       $smarty->assign('sDescriptionInput',nl2br($besc).'<input type="hidden" 
name="besc" value="'.$besc.'">');
-       $smarty->assign('sPackingInput',$pack.'<input type="hidden" name="pack" 
value="'.$pack.'">');
-       $smarty->assign('sDoseInput',$dose.'<input type="hidden" name="dose" 
value="'.$dose.'">');
-       $smarty->assign('sCAVEInput',$caveflag.'<input type="hidden" 
name="caveflag" value="'.$caveflag.'">');
-       $smarty->assign('sCategoryInput',$medgroup.'<input type="hidden" 
name="medgroup" value="'.$medgroup.'">');
-       $smarty->assign('sMinOrderInput',$minorder.'<input type="hidden" 
name="minorder" value="'.$minorder.'">');
-       $smarty->assign('sMaxOrderInput',$maxorder.'<input type="hidden" 
name="maxorder" value="'.$maxorder.'">');
-       $smarty->assign('sPcsProOrderInput',$proorder.'<input type="hidden" 
name="proorder" value="'.$proorder.'">');
-       $smarty->assign('sIndustrialNrInput',$artnum.'<input type="hidden" 
name="artnum" value="'.$artnum.'">');
-       $smarty->assign('sLicenseNrInput',$indusnum.'<input type="hidden" 
name="indusnum" value="'.$indusnum.'">');
-       $smarty->assign('sMinPiecesInput',$minpcs.'<input type="hidden" 
name="minpcs" value="'.$minpcs.'">');   
-       $smarty->assign('sPicFileInput',$picfilename.'<input type="hidden" 
name="bild" value="'.$picfilename.'">');
-}else{
-       $smarty->assign('sArticleNameInput','<input type="text" name="artname" 
value="'.$artname.'" size=40 maxlength=40>');
-       $smarty->assign('sGenericInput','<input type="text" name="generic" 
value="'.$generic.'" size=40 maxlength=60>');
-       $smarty->assign('sDescriptionInput','<textarea name="besc" cols=35 
rows=4>'.$besc.'</textarea>');
-       $smarty->assign('sPackingInput','<input type="text" name="pack" 
value="'.$pack.'"  size=40 maxlength=40>');
-       $smarty->assign('sDoseInput','<input type="text" name="dose" 
value="'.$dose.'"  size=40 maxlength=40>');
-       $smarty->assign('sCAVEInput','<input type="text" name="caveflag" 
value="'.$caveflag.'" size=40 maxlength=80>');
-       $smarty->assign('sCategoryInput','<input type="text" name="medgroup" 
value="'.$medgroup.'" size=20 maxlength=40>');
-       $smarty->assign('sMinOrderInput','<input type="text" name="minorder" 
value="'.$minorder.'" size=20 maxlength=9>');
-       $smarty->assign('sMaxOrderInput','<input type="text" name="maxorder" 
value="'.$maxorder.'" size=20 maxlength=9>');
-       $smarty->assign('sPcsProOrderInput','<input type="text" name="proorder" 
value="'.$proorder.'" size=20 maxlength=40>');
-       $smarty->assign('sIndustrialNrInput','<input type="text" name="artnum" 
value="'.$artnum.'" size=20 maxlength=20>');
-       $smarty->assign('sLicenseNrInput','<input type="text" name="indusnum" 
value="'.$indusnum.'" size=20 maxlength=20>');
-       $smarty->assign('sMinPiecesInput','<input type="text" name="minpcs" 
value="'.$minpcs.'" size=20 maxlength=20>');        
-       $smarty->assign('sPicFileInput','<input type="file" name="bild" 
onChange="getfilepath(this)">');
-
-       $smarty->assign('LDReset','<input type="reset" value="'.$LDReset.'" 
onClick="document.inputform.bestellnum.focus()" >');
-       $smarty->assign('LDSave','<input type="hidden" name="picref" 
value="'.$picfilename.'"><input type="submit" value="'.$LDSave.'">');
-}
-
-# Collect hidden inputs
-
-ob_start();
-$sTemp='';
- ?>
-
-  <input type="hidden" name="sid" value="<?php echo $sid?>">
-  <input type="hidden" name="lang" value="<?php echo $lang?>">
-  <input type="hidden" name="cat" value="<?php echo $cat?>">
-  <input type="hidden" name="userck" value="<?php echo $userck?>">
-  <input type="hidden" name="picfilename" value="<?php echo  $picfilename ?>">
-  <input type="hidden" name="mode" value="<?php if($saveok) echo "update"; 
else echo "save"; ?>">
-  <input type="hidden" name="encoder" value="<?php echo  str_replace(" 
","+",$HTTP_COOKIES_VARS[$local_user.$sid])?>">
-  <input type="hidden" name="dstamp" value="<?php echo  
str_replace("_",".",date(Y_m_d))?>">
-  <input type="hidden" name="tstamp" value="<?php echo  
str_replace("_",".",date(H_i))?>">
-  <input type="hidden" name="lockflag" value="<?php echo  $lockflag?>">
-  <input type="hidden" name="update" value="<?php if($saveok) echo "1"; else 
echo $update;?>">
-  <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="2000000">
-<?php 
-
-$sTemp = ob_get_contents();
-ob_end_clean();
-
-# Append more hidden inputs acc. to mode
-
-if($update){
-       if($mode!="save"){ 
-               $sTemp = $sTemp.'
-         <input type="hidden" name="ref_bnum" value="'.$bestellnum.'">
-         <input type="hidden" name="ref_artnum" value="'.$artnum.'">
-        <input type="hidden" name="ref_indusnum" value="'.$indusnum.'">
-        <input type="hidden" name="ref_artname" value="'.$artname.'">
-        ';
-       }else{ 
-               $sTemp = $sTemp.'
-        <input type="hidden" name="ref_bnum" value="'.$ref_bnum.'">
-         <input type="hidden" name="ref_artnum" value="'.$ref_artnum.'">
-        <input type="hidden" name="ref_indusnum" value="'.$ref_indusnum.'">
-        <input type="hidden" name="ref_artname" value="'.$ref_artname.'">
-         ';
-       }
-}
-
-if($saveok){
-       
-       $smarty->assign('sNewProduct',"<a 
href=\"".$thisfile.URL_APPEND."&cat=$cat&userck=$userck&update=0\">$LDNewProduct</a>");
-       
-       # Show update button
-       $smarty->assign('sUpdateButton','<input type="image" 
'.createLDImgSrc($root_path,'update.gif','0').'>');
-       
-       $sBreakImg ='close2.gif';
-
-}else{
-
-       $sBreakImg ='cancel.gif';
-}
-$smarty->assign('sHiddenInputs',$sTemp);
-
- $smarty->assign('sBreakButton','<a href="'.$breakfile.'"><img 
'.createLDImgSrc($root_path,$sBreakImg,'0','left').' 
alt="'.$LDBack2Menu.'"></a>');
-
-# Assign the form template to mainframe
-
- $smarty->assign('sMainBlockIncludeFile','products/form.tpl');
-
- /**
- * show Template
- */
- $smarty->display('common/mainframe.tpl');
-?>
\ No newline at end of file

Deleted: 
care2x/branches/gettext/modules/products/products-datenbank-functions-manage.php
===================================================================
--- 
care2x/branches/gettext/modules/products/products-datenbank-functions-manage.php
    2010-06-30 12:28:16 UTC (rev 6490)
+++ 
care2x/branches/gettext/modules/products/products-datenbank-functions-manage.php
    2010-06-30 12:29:34 UTC (rev 6491)
@@ -1,274 +0,0 @@
-<?php
-error_reporting(E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR);
-require('./roots.php');
-require($root_path.'include/helpers/inc_environment_global.php');
-
-define('LANG_FILE','products.php');
-$local_user='ck_prod_db_user';
-require_once($root_path.'include/helpers/inc_front_chain_lang.php');
-# Create products object
-require_once($root_path.'modules/products/model/class_product.php');
-$product_obj=new Product;
-
-$thisfile=basename(__FILE__);
-
-if(!isset($mode)) $mode="";
-if(!isset($cat)) $cat="";
-if(!isset($linecount)) $linecount="";
-switch($cat)
-{
-       case "pharma":  
-                                                       $title=$LDPharmacy;
-                                                       
$breakfile=$root_path."modules/pharmacy/pharmacy-database-functions.php".URL_APPEND."&userck=$userck";
-                                                       
$imgpath=$root_path."uplodas/pharma/img/";
-                                                       break;
-       case "medstock":
-                                                       $title=$LDMedDepot;
-                                                       
$breakfile=$root_path."modules/medstock/medstock-database-functions.php".URL_APPEND."&userck=$userck";
-                                                       
$imgpath=$root_path."uplodas/medstock/img/";
-                                                       break;
-       default:  
{header("Location:".$root_path."language/".$lang."/lang_".$lang."_invalid-access-warning.php");
 exit;}; 
-
-}
-
-if($mode=='save')
-{
-       include('includes/inc_products_db_save_mod.php');
-}
-
-if(!empty($mode)) include('includes/inc_products_search_mod_database.php');
-
-if($linecount==1) {  $from='multiple'; }
-
-# Start Smarty templating here
- /**
- * LOAD Smarty
- */
-
- # Note: it is advisable to load this after the inc_front_chain_lang.php so
- # that the smarty script can use the user configured template theme
-
- require_once($root_path.'gui/smarty_template/smarty_care.class.php');
- $smarty = new smarty_care('common');
-
- # Title in the title bar
- $smarty->assign('sToolbarTitle',"$title $LDPharmaDb $LDManage");
-
- # href for the back button
-// $smarty->assign('pbBack',$returnfile);
-
- # href for the help button
- 
$smarty->assign('pbHelp',"javascript:gethelp('products_db.php','mng','$from','$cat','$update')");
-
- # href for the close button
- $smarty->assign('breakfile',$breakfile);
-
- # Window bar title
- $smarty->assign('sWindowTitle',"$title $LDPharmaDb $LDManage");
-
- # Assign Body Onload javascript code
- $smarty->assign('sOnLoadJs','onLoad="document.suchform.keyword.select()"');
-
- # Collect javascript code
- ob_start()
-
-?>
-
-<script language="javascript" >
-<!--
-
-function pruf(d)
-{
-       if(d.keyword.value=="")
-       {
-               d.keyword.focus();
-                return false;
-       }
-       return true;
-}
-
-// -->
-</script>
-
-<?php
-
-# Javascript validator
-require('includes/inc_js_products.php');
-
-$sTemp = ob_get_contents();
-ob_end_clean();
-
-$smarty->append('JavaScript',$sTemp);
-
-# Buffer page output
-
-ob_start();
-
-?>
-
-<a name="pagetop"></a>
-
-<ul>
-
-<p>
-<br>
-
-<?php if($from=="deleteok") echo'
-       <FONT class="prompt">'.$LDDataRemoved.'</font>
-       <hr>';
-?>
-
-<form action="<?php echo $thisfile?>" method="get" name="suchform" 
onSubmit="return pruf(this)">
-       <table border=0 cellspacing=2 cellpadding=3>
-               <tr bgcolor=#ffffdd>
-                       <td colspan=2>
-                               <?php echo $LDSearchWordPrompt ?>
-                               <br><p>
-                       </td>
-               </tr>
-               <tr bgcolor=#ffffdd>
-                       <td align=right>
-                               <?php echo $LDSearchKey ?>:
-                       </td>
-                       <td>
-                               <input type="text" name="keyword" size=40 
maxlength=40 value="<?php echo $keyword ?>">
-                       </td>
-               </tr>
-               <tr>
-                       <td>&nbsp;
-                       </td>
-                       <td align="right"><input type="submit" value="<?php 
echo $LDSearch ?>" >
-                       </td>
-                </tr>
-       </table>
-               
-       <input type="hidden" name="sid" value="<?php echo $sid?>">
-       <input type="hidden" name="lang" value="<?php echo $lang?>">
-       <input type="hidden" name="cat" value="<?php echo $cat?>">
-       <input type="hidden" name="userck" value="<?php echo $userck?>">
-       <input type="hidden" name="mode" value="search">
-
-</form>
-
-<?php
-
-if($linecount==1) echo '
-                               <form ENCTYPE="multipart/form-data" 
action="'.$thisfile.'" method="post" name="inputform" onSubmit="return 
prufform(this)">';
-
-if($mode=='save'){
-       if($saveok) {
-               $smarty->assign('sMascotImg','<img 
'.createMascot($root_path,'mascot1_r.gif','0','absmiddle').'>');
-               $smarty->assign('sSaveFeedBack',$LDDataSaved);
-       }else{
-               echo $sql.'<p>';
-               $smarty->assign('sNoSave',$LDDataNoSaved.'<br><a 
href="products-database-functions-eingabe.php'.URL_APPEND.'">
-                       <u>'.$LDClk2EnterNew.'</u></a>');
-       }
-}
-
-# Workaround to force display of the form template
-$bShowThisForm = TRUE;
-
-# Load the form GUI
-require("includes/inc_products_search_result_mod.php");
-
-if($linecount==1){
-       //<input type="hidden" name="picfilename" value="'.$zeile[picfile].'"> 
-
-       echo '
-       <input type="hidden" name="encoder" 
value="'.strtr($_COOKIE[$local_user.$sid]," ","+").'">
-       <input type="hidden" name="dstamp" 
value="'.str_replace("_",".",date(Y_m_d)).'">
-       <input type="hidden" name="tstamp" 
value="'.str_replace("_",".",date(H_i)).'">
-       <input type="hidden" name="lock_flag" value="">
-       <input type="hidden" name="sid" value="'.$sid.'">
-       <input type="hidden" name="lang" value="'.$lang.'">
-       <input type="hidden" name="cat" value="'.$cat.'">
-       <input type="hidden" name="userck" value="'.$userck.'">
-       <input type="hidden" name="keyword" value="'.$zeile[bestellnum].'">
-       <input type="hidden" name="update" value="1">
-       <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="2000000">
-       ';
-
-       if($mode=='search'){
-               echo'
-         <input type="hidden" name="ref_bnum" value="'.$zeile[bestellnum].'">
-         <input type="hidden" name="ref_artnum" value="'.$zeile[artikelnum].'">
-        <input type="hidden" name="ref_indusnum" 
value="'.$zeile[industrynum].'">
-        <input type="hidden" name="ref_artname" 
value="'.$zeile[artikelname].'">
-        ';
-       }else{ 
-               echo'
-        <input type="hidden" name="ref_bnum" value="'.$ref_bnum.'">
-         <input type="hidden" name="ref_artnum" value="'.$ref_artnum.'">
-        <input type="hidden" name="ref_indusnum" value="'.$ref_indusnum.'">
-        <input type="hidden" name="ref_artname" value="'.$ref_artname.'">
-         ';
-       }
-       
-       if($update&&(!$saveok)){
-               echo'
-               <input type="hidden" name="mode" value="save">
-               <input type="hidden" name="picref" value="'.$zeile[picfile].'">
-               <input type="submit" value="'.$LDSave.'">
-               </form>';
-       }else{
-               echo'
-               <input type="hidden" name="mode" value="search">
-               <input type="submit" value="'.$LDUpdateData.'">
-               </form>';
-
-               echo'
-               <form action="products-database-functions-datadelete.php" 
method="get" name="delform">
-               <input type="hidden" name="sid" value="'.$sid.'">
-               <input type="hidden" name="lang" value="'.$lang.'">
-               <input type="hidden" name="userck" value="'.$userck.'">
-               <input type="hidden" name="cat" value="'.$cat.'">';
-               if($zeile[bestellnum]!="") echo '
-               <input type="hidden" name="keyword" 
value="'.$zeile[bestellnum].'">
-               <input type="hidden" name="keytype" value="bestellnum">';
-               else if($zeile[artikelnum]!="") echo '
-                               <input type="hidden" name="keyword" 
value="'.$zeile[artikelnum].'">
-                               <input type="hidden" name="keytype" 
value="artikelnum">';
-               else if($zeile[industrynum]!="") echo '
-                               <input type="hidden" name="keyword" 
value="'.$zeile[industrynum].'">
-                               <input type="hidden" name="keytype" 
value="industrynum">';
-               else if($zeile[artikelname]!="") echo '
-                               <input type="hidden" name="keyword" 
value="'.$zeile[artikelname].'">
-                               <input type="hidden" name="keytype" 
value="artikelname">';
-               else if($zeile[generic]!="") echo '
-                               <input type="hidden" name="keyword" 
value="'.$zeile[generic].'">
-                               <input type="hidden" name="keytype" 
value="generic">';
-               echo'
-               <input type="hidden" name="mode" value="delete">
-               <input type="hidden" name="sure" value="0">
-               <input type="hidden" name="cat" value="'.$cat.'">
-               <input type="submit" value="'.$LDRemoveFromDb.'">
-               </form>
-               ';
-       }
-}
-?>
-<p>
-
-<?php if ($from=="multiple")
-echo '
-<a 
href="products-database-functions-manage.php'.URL_APPEND.'&cat='.$cat.'"><img 
'.createLDImgSrc($root_path,'back2.gif','0','absmiddle').' 
alt="'.$LDBack.'"></a>
-';
-?>
-<a href="<?php echo $breakfile ?>"><img <?php echo 
createLDImgSrc($root_path,'cancel.gif','0') ?>></a>
-</ul>
-
-<?php
-
-$sTemp = ob_get_contents();
-ob_end_clean();
-
-# Assign the form template to mainframe
-
- $smarty->assign('sMainFrameBlockData',$sTemp);
-
- /**
- * show Template
- */
- $smarty->display('common/mainframe.tpl');
-?>


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