1<?php 2/* get country names */ 3$sql = "SELECT code,name FROM mgw_countries ORDER BY name"; 4$ADODB_FETCH_MODE=ADODB_FETCH_NUM; 5if(($res = $conn->GetAll($sql))===false) exit(showSQLerror($sql, $conn->ErrorMsg(), __LINE__, __FILE__)); 6$ADODB_FETCH_MODE=ADODB_FETCH_ASSOC; 7array_unshift($res, array("",Lang::getLanguageString("chosecountrytext"))); 8 9/* settings array */ 10$settings["contact"] = array( // modulename (will be translated on runtime) 11 "settings" => array( // a sub option of this modules settings (will be translated on runtime) 12 "quicksearchmethod" => array( // an option - configtagname in db 13 "method" => "checkbox", // options method 14 "choices" => array( // option values 15 array("name"=>"firstname","value"=>"mgw_contacts.firstname"), // name to be displayed, value to be posted 16 array("name"=>"lastname","value"=>"mgw_contacts.lastname"), // the name will be placed behind the checkbox 17 array("name"=>"company","value"=>"mgw_companies.name1"), 18 array("name"=>"email","value"=>"mgw_contacts.email"), 19 array("name"=>"city","value"=>"mgw_contacts.priv_city"), 20 array("name"=>"note_contact","value"=>"mgw_contacts.note"), 21 array("name"=>"note_company","value"=>"mgw_companies.note")), 22 "name" => "qsearchoptions", // [optionable] name of the option (will be translated on runtime) 23 "type" => "str", // configtag value, row in the db which holds the data (TODO: MAKE THIS UNNESECARY) 24 "note" => "searchnote", 25 "description" => "What fields to look for when quick searching", 26 "selections" => 1, 27 "dimensions" => 1, 28 "default" => array("mgw_contacts.firstname","mgw_contacts.lastname","mgw_companies.name1") 29 ), 30 "name_display" => array( 31 "method" => "select", 32 "choices" => array( 33 array('name' => '', 'value' => array( 34 array('lastfirst', 'lastfirst'), 35 array('firstlast', 'firstlast') 36 )) 37 ), 38 "type" => "str", 39 "name" => "name_display", 40 "translate" => true, 41 "description" => "how to display names", 42 "selections" => 0, 43 "dimensions" => 0, 44 "default" => array('lastfirst') 45 ), 46 "favourite_countries" => array( 47 "method" => "select", 48 "choices" => array( 49 array("name" => "(1.)","value"=>$res), // name to be displayed (behind selectbox), array of names and values to put in selectbox 50 array("name" => "(2.)","value"=>$res), // selectbox option values have index 0 in the value array 51 array("name" => "(3.)","value"=>$res), // selectbox option names have index 1 52 array("name" => "(4.)","value"=>$res), 53 array("name" => "(5.)","value"=>$res)), 54 "type" => "str", 55 "name" => "favcountries", 56 "translate" => false, 57 "description" => "list of top 5 favourite countries", 58 "selections" => 0, 59 "dimensions" => 1, 60 "default" => array("DEU","FRA","CZE","GBR") 61 ), 62 "show_company_id" => array( 63 "method" => "checkbox", // if no choices array is given to a selectbox a single checkbox with value '1' will be displayed 64 "name" => "showcompid", 65 "type" => "int", 66 "description" => "1 if company id is to be shown, 0 if not", 67 "default" => "0" 68 ), 69 "use_dialer" => array( 70 "method" => "checkbox", 71 "name" => "usedialer", 72 "type" => "int", 73 "description" => "1 if dialer is to be shown, 0 if not", 74 "default" => "0" 75 ) 76 ) 77); 78 79?> 80