| | |
| | | } |
| | | } |
| | | |
| | | $authsql = $app->tform->getAuthSQL('r', 'client'); |
| | | |
| | | //* Begin of the form definition of the first tab. The name of the tab is called "message". We refer |
| | | //* to this name in the $form["tab_default"] setting above. |
| | | $form["tabs"]['message'] = array ( |
| | |
| | | 'formtype' => 'SELECT', |
| | | 'default' => $sm_default_recipient_id, |
| | | 'datasource' => array ( 'type' => 'SQL', |
| | | 'querystring' => 'SELECT userid,username FROM sys_user WHERE userid != 1 AND {AUTHSQL} ORDER BY username', |
| | | 'querystring' => "SELECT sys_user.userid, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_user, client WHERE sys_user.userid != 1 AND sys_user.client_id = client.client_id AND $authsql ORDER BY sys_user.username", |
| | | 'keyfield' => 'userid', |
| | | 'valuefield' => 'username' |
| | | 'valuefield' => 'contactname' |
| | | ), |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISINT', |
| | | 'errmsg'=> 'recipient_id_is_not_integer'), |