a7244bd9d2610e431edc2f784c8f8b9bd97715e0
bernd weird things with SVN

bernd authored 15 years ago

1) <?php
2) 
3) require_once('inc/base.php');
4) require_once('inc/debug.php');
5) 
bernd CRM still incomplete and un...

bernd authored 15 years ago

6) require_once('class/customer.php');
7) 
bernd weird things with SVN

bernd authored 15 years ago

8) require_once('session/start.php');
9) require_once('crm.php');
10) 
11) require_role(ROLE_SYSADMIN);
12) 
13) 
bernd CRM still incomplete and un...

bernd authored 15 years ago

14) $debug = '';
15) if ($debugmode)
16)   $debug = 'debug&amp;';
17) 
bernd weird things with SVN

bernd authored 15 years ago

18) html_header('<script type="text/javascript" src="'.$prefix.'js/ajax.js" ></script>
19) <script type="text/javascript">
20) <!--
21) 
bernd CRM still incomplete and un...

bernd authored 15 years ago

22) function doRequest() {
23)   ajax_request(\'crm_ajax\', \''.$debug.'q=\'+document.getElementById(\'query\').value, got_response)
24) }
25) 
26) function keyPressed() {
27)   if(window.mytimeout) window.clearTimeout(window.mytimeout);
28)   window.mytimeout = window.setTimeout(doRequest, 500);
29)   return true;
30) }
31) 
bernd weird things with SVN

bernd authored 15 years ago

32) function got_response() {
33)   if (xmlHttp.readyState == 4) {
34)     document.getElementById(\'response\').innerHTML = xmlHttp.responseText;
35)   }
36) }
37) 
38) // -->
39) </script>
40) ');
41) 
bernd CRM still incomplete and un...

bernd authored 15 years ago

42) 
43) output('<h3>Customer Relationship Management</h3>');
44) 
45) 
46) 
47) output(html_form('crm_main', '', '', 'Kunde nach Stichwort suchen: <input type="text" id="query" onkeyup="keyPressed()" />
bernd weird things with SVN

bernd authored 15 years ago

48) '));
49) output('<div id="response"></div>');
50) 
bernd CRM still incomplete and un...

bernd authored 15 years ago

51) if (isset($_SESSION['crm_customer'])) {
52)   $cid = $_SESSION['crm_customer'];
53)   $cust = new Customer($cid);
54) 
55)   $hostingcont = hosting_contracts($cust->id);
56)   $hosting = '<ul>';
57)   foreach ($hostingcont AS $h) {
58)     $hosting .= '<li>Hosting: ';
59)   }
60)   $hosting .= '</ul>';
61) 
62)   output('<h3>Aktueller Kunde</h3>
63) <div><strong>'.$cust->fullname.'</strong><br />
64) Firma: '.$cust->firma.'<br />
65) Name: '.$cust->vorname.' '.$cust->nachname.'<br />
66) Adresse: '.$cust->adresse.' - '.$cust->plz.' '.$cust->ort.'</div>
67) 
68) 
69) <h3>Kundendaten</h3>
70) 
71) 
72) <h4>Letzte Rechnungen</h4>
73) 
74) 
75) <h4>Kommende Rechnungsposten</h4>
76) 
77) ');
78)    
79)   output ( print_r($cust, true) );
80) }
81)