| 283 | | $html.='';//legecay fax stuff goes here |
|---|
| 284 | | $html.='<tr><td><a href="#" class="info">'._("Fax Destination").'<span>'._('Where to send the call if we detect that its a fax').'.</span></a>:</td>'; |
|---|
| 285 | | $html.='</tr>'; |
|---|
| 286 | | $html.=$fax_detect?drawselects(isset($fax['destination'])?$fax['destination']:null,'FAX'):''; |
|---|
| | 275 | if($fax['legacy_email']){ |
|---|
| | 276 | $html.='<tr><td><a href="#" class="info">'._("Fax Email Destination").'<span>'._('Address to email faxes to on fax detection.<br />PLEASE NOTE: In current versions of FreePBX, you can set the fax destination from a list of destination as you would pick destinations in other areas of FreePBX. This email option has been migrated from the legecay fax implementation in FreePBX prior to version 2.7. To upgrade this option to the full destination list, please enter \'clear\' in this field and hit submit. You will then be upgraded. THIS PROCEDURE IS NON REVERSABEL!!').'.</span></a>:</td>'; |
|---|
| | 277 | $html.='<td><input name="faxlegacyemail" value="'.$fax['legacy_email'].'"></td></tr>'; |
|---|
| | 278 | }else{ |
|---|
| | 279 | $html.='<tr><td><a href="#" class="info">'._("Fax Destination").'<span>'._('Where to send the call if we detect that its a fax').'.</span></a>:</td></tr>'; |
|---|
| | 280 | $html.=$fax_detect?drawselects(isset($fax['destination'])?$fax['destination']:null,'FAX'):''; |
|---|
| | 281 | } |
|---|
| 333 | | if (($action == 'edtIncoming'||$action == 'addIncoming')&& $faxenabled=='true'){ |
|---|
| 334 | | fax_save_incoming($cidnum,$extension,$faxenabled,$faxdetection,$faxdetectionwait,$dest); |
|---|
| 335 | | } |
|---|
| 336 | | } |
|---|
| 337 | | } |
|---|
| 338 | | |
|---|
| 339 | | |
|---|
| 340 | | function fax_save_incoming($cidnum,$extension,$faxenabled,$faxdetection,$faxdetectionwait,$dest){ |
|---|
| 341 | | global $db; |
|---|
| 342 | | sql("INSERT INTO fax_incoming (cidnum, extension, faxenabled, faxdetection, faxdetectionwait, faxdestination) VALUES ('".$db->escapeSimple($cidnum)."', '".$db->escapeSimple($extension)."', '".$db->escapeSimple($faxenabled)."', '".$db->escapeSimple($faxdetection)."', '".$db->escapeSimple($faxdetectionwait)."', '".$db->escapeSimple($dest)."')"); |
|---|
| | 330 | if (($action == 'edtIncoming'||$action == 'addIncoming')&& $enabled=='true'){ |
|---|
| | 331 | fax_save_incoming($cidnum,$extension,$enabled,$detection,$detectionwait,$dest,$legacy_email); |
|---|
| | 332 | } |
|---|
| | 333 | } |
|---|
| | 334 | } |
|---|
| | 335 | |
|---|
| | 336 | |
|---|
| | 337 | function fax_save_incoming($cidnum,$extension,$enabled,$detection,$detectionwait,$dest,$legacy_email){ |
|---|
| | 338 | global $db; |
|---|
| | 339 | sql("INSERT INTO fax_incoming (cidnum, extension, enabled, detection, detectionwait, destination, legacy_email) VALUES ('".$db->escapeSimple($cidnum)."', '".$db->escapeSimple($extension)."', '".$db->escapeSimple($faxenabled)."', '".$db->escapeSimple($faxdetection)."', '".$db->escapeSimple($faxdetectionwait)."', '".$db->escapeSimple($dest)."','".$db->escapeSimple($legacy_email)."')"); |
|---|