a7244bd9d2610e431edc2f784c8f8b9bd97715e0
bernd some AJAX test

bernd authored 16 years ago

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

bernd authored 16 years ago

9) require_once('class/customer.php');
10) 
bernd some AJAX test

bernd authored 16 years ago

11) require_role(ROLE_SYSADMIN);
12) 
bernd CRM still incomplete and un...

bernd authored 16 years ago

13) $ajax_formtoken = generate_form_token('crm_crm_ajax');
bernd some AJAX test

bernd authored 16 years ago

14) 
bernd CRM still incomplete and un...

bernd authored 16 years ago

15) $result = array_unique(find_customers($_GET['q']));
bernd some AJAX test

bernd authored 16 years ago

16) sort($result);
17) foreach ($result as $val) {
bernd CRM still incomplete and un...

bernd authored 16 years ago

18)   $c = new Customer((int) $val);
19)   echo '<p style="margin-bottom: 0.5em;">'.internal_link('select_customer', 'Kunde '.$c->id.': <strong>'.$c->fullname.'</strong>', 'customer='.$c->id.'&formtoken='.$ajax_formtoken);
20)   echo '</p>';