| | 10 | } |
|---|
| | 11 | |
|---|
| | 12 | function announcement_getdest($exten) { |
|---|
| | 13 | return array('app-announcement-'.$exten.',s,1'); |
|---|
| | 14 | } |
|---|
| | 15 | |
|---|
| | 16 | function announcement_getdestinfo($dest) { |
|---|
| | 17 | global $active_modules; |
|---|
| | 18 | |
|---|
| | 19 | if (substr(trim($dest),0,17) == 'app-announcement-') { |
|---|
| | 20 | $exten = explode(',',$dest); |
|---|
| | 21 | $exten = substr($exten[0],17); |
|---|
| | 22 | |
|---|
| | 23 | $thisexten = announcement_get($exten); |
|---|
| | 24 | if (empty($thisexten)) { |
|---|
| | 25 | return array(); |
|---|
| | 26 | } else { |
|---|
| | 27 | $type = isset($active_modules['announcement']['type'])?$active_modules['announcement']['type']:'setup'; |
|---|
| | 28 | return array('description' => 'Annoucement : '.$thisexten['description'], |
|---|
| | 29 | 'edit_url' => 'config.php?display=announcement&type='.$type.'&extdisplay='.urlencode($exten), |
|---|
| | 30 | ); |
|---|
| | 31 | } |
|---|
| | 32 | } else { |
|---|
| | 33 | return false; |
|---|
| | 34 | } |
|---|
| 74 | | $sql = "SELECT announcement_id, description, recording, allow_skip, post_dest, return_ivr, noanswer, repeat_msg FROM announcement WHERE announcement_id = ".addslashes($announcement_id); |
|---|
| 75 | | $row = $db->getRow($sql); |
|---|
| | 99 | $sql = "SELECT announcement_id, description, recording, allow_skip, post_dest, return_ivr, noanswer, repeat_msg FROM announcement WHERE announcement_id = '".addslashes($announcement_id)."'"; |
|---|
| | 100 | $row = $db->getRow($sql,DB_FETCHMODE_ASSOC); |
|---|