25 |
25 |
26 include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/dbconnect.inc.php"); |
26 include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/dbconnect.inc.php"); |
27 $dbc = new dbconnection(); |
27 $dbc = new dbconnection(); |
28 |
28 |
29 // $cid = $_POST["con_id"]; |
29 // $cid = $_POST["con_id"]; |
30 $cname = $_POST["conbez"]; |
30 if (isset($_POST["conbez"]) && $_POST["conbez"]) |
|
31 $cname = $_POST["conbez"]; |
|
32 if (!$cname) $cname = $_POST["conprod"]; |
|
33 if (!$cname) $cname = $_POST["conpart"]; |
31 $cid = trim(substr($cname,0,strpos($cname,"-"))); |
34 $cid = trim(substr($cname,0,strpos($cname,"-"))); |
32 // echo "cname = $cname, cid = $cid<br />\n"; |
35 // echo "cname = $cname, cid = $cid<br />\n"; |
33 if (isset($cid) && $cid) |
36 if (isset($cid) && $cid) |
34 header("Location: vertrag_upd.php?uid=$cid"); |
37 header("Location: vertrag_upd.php?uid=$cid"); |
35 else |
38 else |
77 // $("#fcontract").submit(); |
80 // $("#fcontract").submit(); |
78 }), |
81 }), |
79 */ |
82 */ |
80 close: (function(event,ui){ |
83 close: (function(event,ui){ |
81 $("#fcontract").submit();}) |
84 $("#fcontract").submit();}) |
|
85 }); |
|
86 $("#conprod").autocomplete({ |
|
87 minLength: 2, |
|
88 source: "/fhiiqm/inc/vertrag_prod_list_ac.inc.php", |
|
89 close: (function(event,ui){ |
|
90 $("#fcontractpr").submit();}) |
|
91 }); |
|
92 $("#conpart").autocomplete({ |
|
93 minLength: 2, |
|
94 source: "/fhiiqm/inc/vertrag_list_ac.inc.php?part=1", |
|
95 close: (function(event,ui){ |
|
96 $("#fcontractpa").submit();}) |
82 }); |
97 }); |
83 $("input[id='conbez']").addClass("long50"); |
98 $("input[id='conbez']").addClass("long50"); |
84 }); |
99 }); |
85 </script> |
100 </script> |
86 <div align="center"> |
101 <div align="center"> |
87 <h3>Vertragssuche</h3> |
102 <h3>Vertragssuche</h3> |
88 <table> |
103 <table> |
89 <tr><td class="bigger">Bitte <i>Vertragsbezeichnung</i> oder Teil davon eingeben und dann Vertrag</td></tr> |
104 <tr><td class="bigger">Bitte <i>Vertragsbezeichnung</i> bzw. Teil davon eingeben</td></tr> |
90 <tr><td class="bigger">aus angebotener Liste durch Anklicken wählen:</td></tr> |
|
91 <form name="fcontract" id="fcontract" action="<?php $_SERVER['PHP_SELF']?>" method="post" enctype="application/x-www-form-urlencoded"> |
105 <form name="fcontract" id="fcontract" action="<?php $_SERVER['PHP_SELF']?>" method="post" enctype="application/x-www-form-urlencoded"> |
92 |
106 |
93 <tr><td><div class="ui-widget"> |
107 <tr><td><div class="ui-widget"> |
94 <input class="long50" id="conbez" name="conbez" type="text" value="<?php echo $cname; ?>"/> |
108 <input class="long50" id="conbez" name="conbez" type="text" value=""/> |
95 </div></td></tr> |
109 </div></td></tr> |
96 |
110 |
97 </form> |
111 </form> |
|
112 <tr><td class="bigger">oder <i>Vertragspartner</i> bzw. Teil davon eingeben</td></tr> |
|
113 <form name="fcontractpa" id="fcontractpa" action="<?php $_SERVER['PHP_SELF']?>" method="post" enctype="application/x-www-form-urlencoded"> |
|
114 |
|
115 <tr><td><div class="ui-widget"> |
|
116 <input class="long50" id="conpart" name="conpart" type="text" value=""/> |
|
117 </div></td></tr> |
|
118 |
|
119 </form> |
|
120 <tr><td class="bigger">oder <i>Produkt</i> bzw. Teil davon eingeben</td></tr> |
|
121 <form name="fcontractpr" id="fcontractpr" action="<?php $_SERVER['PHP_SELF']?>" method="post" enctype="application/x-www-form-urlencoded"> |
|
122 |
|
123 <tr><td><div class="ui-widget"> |
|
124 <input class="long50" id="conprod" name="conprod" type="text" value=""/> |
|
125 </div></td></tr> |
|
126 |
|
127 </form> |
|
128 <tr><td class="bigger">dann Vertrag aus angebotener Liste durch Anklicken wählen</td></tr> |
98 <tr><td>Falls keine Liste angezeigt wird, existiert kein Vertrag mit den eingegebenen Zeichen!</td></tr> |
129 <tr><td>Falls keine Liste angezeigt wird, existiert kein Vertrag mit den eingegebenen Zeichen!</td></tr> |
99 </table> |
130 </table> |
100 </div> |
131 </div> |
101 </body> |
132 </body> |
102 </html> |
133 </html> |