|
1 <?php |
|
2 |
|
3 /** |
|
4 * @author Bettina Schwarzer, Fritz-Haber-Institut |
|
5 * @copyright 06/2011 |
|
6 * |
|
7 * Suche Vertraege und Anzeige Updateformular |
|
8 */ |
|
9 |
|
10 error_reporting(E_ALL ^ E_NOTICE); |
|
11 |
|
12 include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/dbconnect.inc.php"); |
|
13 $dbc = new dbconnection(); |
|
14 |
|
15 // $cid = $_POST["con_id"]; |
|
16 $pname = $_POST["partname"]; |
|
17 $pid = trim(substr($pname,0,strpos($pname,"-"))); |
|
18 /* |
|
19 if (isset($cid) && $cid) |
|
20 header("Location: http://achilleus/fhiiqm/vertrag_upd.php?uid=$cid"); |
|
21 else |
|
22 */ |
|
23 { |
|
24 ?> |
|
25 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
26 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
|
27 |
|
28 <head> |
|
29 <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> |
|
30 <link href="../css/db.css" rel="STYLESHEET" type="TEXT/CSS" /> |
|
31 <link rel="stylesheet" type="text/css" href="/fhiiqm/css/jquery/jquery.autocomplete.css" /> |
|
32 |
|
33 <!-- <script type="text/javascript" src="js/jquery/jquery.js"></script> --> |
|
34 <script type="text/javascript" src="/fhiiqm/js/jquery/jquery-1.6.2.min.js"></script> |
|
35 <script type="text/javascript" src="/fhiiqm/js/jquery/jquery.autocomplete.js"></script> |
|
36 |
|
37 <style type="text/css"> |
|
38 .ac_input { |
|
39 width: 400px; |
|
40 } |
|
41 .ac_results { |
|
42 width: 400px; |
|
43 background: #BCEEFB; |
|
44 cursor: pointer; |
|
45 position: absolute; |
|
46 left: 0; |
|
47 font-size: 70%; |
|
48 z-index: 101; |
|
49 } |
|
50 .ac_results ul { |
|
51 width: 400px; |
|
52 list-style: none; |
|
53 padding: 0px; |
|
54 margin: 0px; |
|
55 border: 1px solid #000; |
|
56 } |
|
57 .ac_results li { |
|
58 width: 400px; |
|
59 padding: 2px 5px; |
|
60 } |
|
61 .ac_results a { |
|
62 width: 100%; |
|
63 } |
|
64 /* thanks udoline: this fixed position error into msie */ |
|
65 .ac_results iframe { |
|
66 width: 400px; |
|
67 position: absolute; |
|
68 } |
|
69 .ac_loading { |
|
70 /* background : url('/indicator.gif') right center no-repeat; */ |
|
71 background : url('img/jquery/loading.gif') right center no-repeat; |
|
72 } |
|
73 .over { |
|
74 background: yellow; |
|
75 color: #FFAA00; |
|
76 } |
|
77 </style></head> |
|
78 |
|
79 <title>Suche Partner</title> |
|
80 </head> |
|
81 |
|
82 <body onload="document.fpartner.partname.focus();"> |
|
83 <div class="float-r"><img src="../img/document_mark_as_final.png" border="0" alt="Vertragssuche" title="Vertragssuche"/></div> |
|
84 <div align="center"> |
|
85 <h3>Partnersuche</h3> |
|
86 <table> |
|
87 <tr><td class="bigger">Bitte Partnerbezeichnung oder Teil davon eingeben und dann Partner</td></tr> |
|
88 <tr><td class="bigger">aus angebotener Liste durch Anklicken wählen:</td></tr> |
|
89 <form name="fpartner" id="fpartner" action="<?php $_SERVER['PHP_SELF']?>" method="post" enctype="application/x-www-form-urlencoded"> |
|
90 <!-- <input type="hidden" name="con_id"> --> |
|
91 <tr><td><input id="partname" name="partname" type="text" value="<?php echo $pname; ?>"/> |
|
92 </td></tr> |
|
93 </form> |
|
94 <tr><td>Falls keine Liste angezeigt wird, existiert kein Partner mit den eingegebenen Zeichen!</td></tr> |
|
95 </table> |
|
96 |
|
97 <script type="text/javascript"> |
|
98 function selectItem(li) { |
|
99 // hier Übergabe ID und Verweis auf Seite |
|
100 document.fpartner.submit(); |
|
101 return false; |
|
102 } |
|
103 |
|
104 function pickedpart( li ) { |
|
105 // document.fcontract.con_id.value = li.data; |
|
106 document.fpartner.partname.value = li.data; |
|
107 } |
|
108 |
|
109 function formatItem(row) { |
|
110 return row[0]; |
|
111 } |
|
112 |
|
113 $(document).ready(function() { |
|
114 $("#partname").autocomplete("partner_list_autocomplete.php", { |
|
115 minChars:2, |
|
116 matchSubset:1, |
|
117 matchContains:1, |
|
118 cacheLength:20, |
|
119 // onItemSelect:selectItem, |
|
120 onItemSelect:pickedpart, |
|
121 formatItem:formatItem, |
|
122 selectOnly:1 |
|
123 }); |
|
124 }); |
|
125 </script> |
|
126 </div> |
|
127 </body> |
|
128 </html> |
|
129 <?php |
|
130 } |
|
131 ?> |