| 256 | | /* |
|---|
| 257 | | * |
|---|
| 258 | | * this may or may not work to include a system default destination |
|---|
| 259 | | * Rememebr to reenable defautl destination in the gui as well |
|---|
| 260 | | * |
|---|
| 261 | | //get system default fax destination |
|---|
| 262 | | $sql='SELECT * FROM fax_details WHERE `key` = ? OR `key` = ?'; |
|---|
| 263 | | $system = $db->getAssoc($sql, false, array('system_instance', 'system_fax2email'), DB_FETCHMODE_ASSOC); |
|---|
| 264 | | if ($system_fax2email != 'disabled'){// if system default is enabled |
|---|
| 265 | | if($system_fax2email == 'system'){ |
|---|
| 266 | | $sys=array('user' => 'system', 'faxemail' => $systemfax2email, 'name' => 'System Default'); |
|---|
| 267 | | }else{//find user, loop thru the $result of the previous fetch which lists all users/emails |
|---|
| 268 | | foreach($result as $res => $user){ |
|---|
| 269 | | if ($user['user'] == $system_instance){ |
|---|
| 270 | | $systemfax2email = $user['faxemail']; |
|---|
| 271 | | break; |
|---|
| 272 | | } |
|---|
| 273 | | } |
|---|
| 274 | | $sys=array('user' => 'system', 'faxemail' => $systemfax2email, 'name' => 'System Default'); |
|---|
| 275 | | } |
|---|
| 276 | | array_unshift($results, $sys); |
|---|
| 277 | | } |
|---|
| 278 | | * |
|---|
| 279 | | * |
|---|
| 280 | | */ |
|---|
| 366 | | }else{//show detection options |
|---|
| 367 | | //js to show/hide the detection settings |
|---|
| 368 | | $js = "if(\$(this).val()=='true'){ |
|---|
| 369 | | \$('.faxdetect').slideDown();\$('.legacyemail').hide(); |
|---|
| 370 | | }else if(\$(this).val()=='false'){ |
|---|
| 371 | | \$('.faxdetect').slideUp(); \$('.legacyemail').hide(); |
|---|
| 372 | | }else if(\$(this).val()=='legacy'){ |
|---|
| 373 | | \$('.legacyemail').slideDown(); |
|---|
| 374 | | \$('.faxdest27').hide();\$('.legacyemail').show(); |
|---|
| 375 | | }"; |
|---|
| | 341 | }else{ |
|---|
| | 342 | /* |
|---|
| | 343 | * show detection options |
|---|
| | 344 | * |
|---|
| | 345 | * js to show/hide the detection settings. Second slide is always in a |
|---|
| | 346 | * callback so that we ait for the fits animation to complete before |
|---|
| | 347 | * playing the second |
|---|
| | 348 | */ |
|---|
| | 349 | $js="$('.legacyemail').slideUp('400',function(){ |
|---|
| | 350 | $('.faxdest').slideUp(); |
|---|
| | 351 | })"; |
|---|