Mailinglisten-Archive |
Hallo Peter,
in Deiner Nachricht vom 26.02.2004/13:40 schriebst Du (unter anderem):
> Ist das das ganze Skript? Wenn nein, poste mal das ganze Skript
Gerne:
<?php
include_once($DOCUMENT_ROOT."/php/h_dbaccount.php");
$table = "h_lagerware_etiketten";
if ($mode == "Anlegen") {
echo "Preis: $qmm_preis";
echo $_POST["qmm_preis"] .' '.$_POST["obermaterial"] ;
unset($mode);
// Neuer Datensatz und Zuweisung der Variablenwerte
$Query = "insert into $table
( etiketten_id,
etikettentyp,
breite,
hoehe,
obermaterial,
farbe,
material_id,
kleber,
rollendurchmesser,
wicklung,
etiketten_rolle,
preis_netto,
bahnen,
kerndurchmesser,
qmm_preis,
anzahl_einheiten,
aktiv
)
values
( '$etiketten_id',
'$etikettentyp',
'$breite',
'$hoehe',
'$obermaterial',
'$farbe',
'$material_id',
'$kleber',
'$rollendurchmesser',
'$wicklung',
'$etiketten_rolle',
'$preis_netto',
'$bahnen',
'$kerndurchmesser',
'$qmm_preis',
'$anzahl_einheiten',
'$aktiv'
)";
$result=mysql_db_query($dbDatabase, $Query) or die (mysql_error());
if ($result > 0){
header("location: $PHPSELF");
} else {
$message = "mysql_error()<br>";
$message .="Fehler beim Anlegen eines Datensatzes: $error <p> ";
include("meldung.php");
exit;
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta http-equiv="content-script-type" content="text/javascript">
<meta http-equiv="content-style-type" content="text/css">
<meta name="page-topic" content="Wirtschaft">
<meta name="distribution" content="Global">
<meta name="copyright" content="Reinhold Riedersberger">
<meta name="revisit" content="After 30 days">
<meta name="description" content="">
<meta name="keywords" content="">
<title></title>
<link rel="shortcut icon" href="http://www.etikettenwelt.de/favicon.ico">
<link rel="stylesheet" type="text/css" href="../etiketten.css">
</head>
<body bgcolor="#333333" text="#D4D4D4" link="#FFE4B5" vlink="#FFE4B5" alink="#FFE4B5">
<!-- InstanceBeginEditable name="Scripts" -->
<!-- Manche JS benoetigen Parameter, die im Body-Tag stehen muessen
Daher gleich alle individuellen JS hier plazieren! -->
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="Kopfzeile" --><!-- InstanceEndEditable -->
<table width="100%" border="0" cellpadding="4" cellspacing="2">
<tr>
<td class="linke-spalte" width="25%" valign="top"> <!-- #BeginLibraryItem "/Library/partnerschaften.lbi" --><h6>etikettenwelt.de</h6>
<span class="smallest">Partnerschaften für mehr Erfolg</span><br><br><!-- #EndLibraryItem -->
<noscript>
<p>Informationen zu Themen der Kennzeichnung und Identifikation (Etiketten, Etikettendrucker, Etikettenbedruckung Barcodescanner u.a.)</p>
</noscript>
</td>
<td align="left" valign="top" width="75%"> <!-- InstanceBeginEditable name="Hauptbereich" -->
<form name="form1" method="post" action="<?php echo $PHPSELF; ?>">
<h2>Etiketten - Lagerware</h2>
<p class="smaller">Feldwechsel mittels Tab(ulator)-Taste</p>
<table width="75%" border="0" cellspacing="3" cellpadding="3" style="border-collapse: collapse">
<tr>
<td>
<div align="right">Etiketten-ID</div>
</td>
<td>
<input name="etiketten_id" type="text" id="" value="<?php echo $zeile[etiketten_id]; ?>" tabindex="10" size="5" maxlength="5">
</td>
<td align="right" class="right">Wicklung</td>
<td>
<input name="wicklung" type="text" id="" value="<?php echo $zeile[wicklung]; ?>" size="1" maxlength="1">
</td>
</tr>
<tr>
<td>
<div align="right">Etikettentyp</div>
</td>
<td>
<?php
$option1 = "Haftetiketten";
$option2 = "Thermoetiketten";
?>
<select name="etikettentyp" id="select" tabindex="20">
<?php echo '<option value="'.$option1; if(isset($etikettentyp) && $etikettentyp==$option1) echo ' selected">'; else echo '">'?><?php echo "$option1"?><?php echo "</option"?>
<?php echo '<option value="'.$option2; if(isset($etikettentyp) && $etikettentyp==$option2) echo ' selected">'; else echo '">'?><?php echo "$option2"?><?php echo "</option"?>
</select>
</td>
<td class="right">Etiketten/Rolle</td>
<td>
<input name="etiketten_rolle" type="text" id="etiketten_rolle" value="<?php echo $zeile[etiketten_rolle]; ?>" size="5" maxlength="8">
</td>
</tr>
<tr>
<td class="right">Breite</div>
</td>
<td>
<input name="breite" type="text" id="" value="<?php echo $zeile[breite]; ?>" tabindex="30" size="5" maxlength="5">
</td>
<td class="right">Farbe</td>
<td>
<input name="farbe" type="text" id="farbe" value="<?php echo $zeile[farbe]; ?>" tabindex="60" size="20" maxlength="20">
</td>
</tr>
<tr>
<td class="right">Höhe</td>
<td>
<input name="hoehe" type="text" id="hoehe" value="<?php echo $zeile[hoehe]; ?>" tabindex="40" size="5" maxlength="5">
</td>
<td class="right">
<div align="right">Kleber</div>
</td>
<td>
<?php
$option1 = "Permanent";
$option2 = "Ablösbar";
?>
<select name="kleber">
<?php echo '<option value="'.$option1; if(isset($material_id) && $material_id==$option1) echo ' selected">'; else echo '">'.$option1.'</option"'?>
<?php echo '<option value="'.$option2; if(isset($material_id) && $material_id==$option2) echo ' selected">'; else echo '">'.$option2.'</option"'?>
</select>
</td>
</tr>
<tr>
<td class="right">Material-ID</td>
<td>
<?php
$option1 = "10";
$option2 = "20";
$option3 = "30";
$option4 = "40";
$option5 = "50";
$option6 = "60";
?>
<select name="material_id" id="" tabindex="50">
<?php echo '<option value="'.$option1; if(isset($material_id) && $material_id==$option1) echo ' selected">'; else echo '">'?>Papier<?php echo "</option"?>
<?php echo '<option value="'.$option2; if(isset($material_id) && $material_id==$option2) echo ' selected">'; else echo '">'?>Thermopapier<?php echo "</option"?>
<?php echo '<option value="'.$option3; if(isset($material_id) && $material_id==$option3) echo ' selected">'; else echo '">'?>Thermokunststoff<?php echo "</option"?>
<?php echo '<option value="'.$option4; if(isset($material_id) && $material_id==$option4) echo ' selected">'; else echo '">'?>Polyethylen<?php echo "</option"?>
<?php echo '<option value="'.$option5; if(isset($material_id) && $material_id==$option5) echo ' selected">'; else echo '">'?>Polypropylen<?php echo "</option"?>
<?php echo '<option value="'.$option6; if(isset($material_id) && $material_id==$option6) echo ' selected">'; else echo '">'?>Polyester<?php echo "</option"?>
</select>
</td>
<td class="right">Preis</td>
<td>
<input name="preis_netto" type="text" id="benutzer2" value="<?php echo $zeile[benutzer]; ?>" size="5" maxlength="5">
</td>
<?php
switch ($material_id) {
case "10":
$qmm_preis = "0.00011670";
$obermaterial = "Papier";
break;
case "20":
$qmm_preis = "0.00013840";
$obermaterial = "Thermopapier";
break;
case "30":
$qmm_preis = "0.00034200";
$obermaterial = "Thermokunststoff";
break;
case "40":
$qmm_preis = "0.00028690";
$obermaterial = "PE (Polyethylen)";
break;
case "50":
$qmm_preis = "0.00034200";
$obermaterial = "PP (Polypropylen)";
break;
case "60":
$qmm_preis = "0.00098420";
$obermaterial = "PET (Polyester)";
}
?>
</tr>
<tr>
<td align="right" class="right">Außen-ø</td>
<td>
<input name="rollendurchmesser" tabindex="80" type="text" id="rollendurchmesser" value="<?php echo $zeile[aussendurchmesser]; ?>" size="3" maxlength="3">
</td>
<td align="right" class="right">Kern-ø</td>
<td>
<div align="left">
<input name="kerndurchmesser" value="<?php echo $zeile[kerndurchmesser]; ?>" ttype="text" id="kerndurchmesser2" size="2">
</div>
</td>
</tr>
<tr>
<td align="right" class="right">Bahnen</td>
<td>
<?php
$option1 = "1";
$option2 = "2";
$option3 = "3";
$option4 = "4";
$option5 = "5";
$option6 = "6";
?>
<select name="bahnen" id="select" tabindex="">
<?php echo '<option value="'.$option1; if(isset($bahnen) && $bahnen==$option1) echo ' selected">'; else echo '">'?><?php echo "$option1"?><?php echo "</option"?>
<?php echo '<option value="'.$option2; if(isset($bahnen) && $bahnen==$option2) echo ' selected">'; else echo '">'?><?php echo "$option2"?><?php echo "</option"?>
<?php echo '<option value="'.$option3; if(isset($bahnen) && $bahnen==$option3) echo ' selected">'; else echo '">'?><?php echo "$option3"?><?php echo "</option"?>
<?php echo '<option value="'.$option4; if(isset($bahnen) && $bahnen==$option4) echo ' selected">'; else echo '">'?><?php echo "$option4"?><?php echo "</option"?>
<?php echo '<option value="'.$option5; if(isset($bahnen) && $bahnen==$option5) echo ' selected">'; else echo '">'?><?php echo "$option5"?><?php echo "</option"?>
<?php echo '<option value="'.$option6; if(isset($bahnen) && $bahnen==$option6) echo ' selected">'; else echo '">'?><?php echo "$option6"?><?php echo "</option"?>
</select>
<!-- input name="bahnen" type="text" id="bahnen" value="<?php echo $zeile[bahnen]; ?>" tabindex="4" size="5" maxlength="5" -->
</td>
<td align="right" class="right">Anzahl Einheiten</td>
<td>
<input name="anzahl_einheiten" tabindex="80" type="text" id="anzahl_einheiten" value="<?php echo $zeile[anzahl_einheiten]; ?>" size="3" maxlength="3">
</td>
</tr>
<tr>
<td align="right" class="right"> </td>
<td> </td>
<td align="right" class="right">Aktiv</td>
<td>
<input type="radio" name="aktiv" value="J" checked>
<input type="radio" name="aktiv" value="N">
</td>
</tr>
<tr>
<td class="right"> </td>
<td> </td>
<td align="right" class="right">
</td>
<td align="right">
<div align="left">
</div>
</td>
</tr>
<tr>
<td class="right"><input name="reset" type="reset" value="Reset"></td>
<td> </td>
<td class="right"> </td>
<td>
<?php echo "Test: $qmm_preis<br>"; ?>
<?php echo '<input name="qmm_preis" type="hidden" value="'.$qmm_preis.'">'?>
<?php echo '<input name="obermaterial" type="hidden" value="'.$obermaterial.'">'?>
<input name="mode" type="submit" value="Anlegen">
</td>
</tr>
</table>
</form>
<!-- InstanceEndEditable --> </td>
</tr>
</table>
<div align="center">
<!-- InstanceBeginEditable name="Horizontalindex" --><!-- #BeginLibraryItem "/Library/horizontalindex.lbi" --><table width="100%" border="0" cellpadding="2" cellspacing="3">
<tr>
<td class="fussmenue"><img src="../images/link.gif" width="10" height="10" alt=""> <a href="../v_inhalt.htm">Inhaltsverzeichnis</a></td>
<td class="fussmenue"> </td>
<td class="fussmenue"><img src="../images/link.gif" width="10" height="10" alt=""> <a href="../cgi-bin/search/search.pl" title="Suchen in diesen und weiteren Ident-Seiten"> Suchen</a></td>
<td class="fussmenue"> </td>
<td class="fussmenue"><img src="../images/link.gif" width="10" height="10" alt=""> <a href="../v_anmeldung_1.htm" title="Anmeldung für Händler/Hersteller aus der Ident-Branche">Anmeldung</a></td>
</tr>
<tr>
<td class="fussmenue"> </td>
<td class="fussmenue"> </td>
<td class="fussmenue"> </td>
<td class="fussmenue"> </td>
<td class="fussmenue"><img src="../images/link.gif" width="10" height="10" alt=""> <a href="index.php">Selbstverwaltung</a></td>
</tr>
</table>
</div>
</body>
</html>
--
Mit freundlichen Grüssen
Reinhold
php::bar PHP Wiki - Listenarchive