Ejemplo n.º 1
0
<span><?php 
    echo _("Enter the digits to dial for this Misc Destination.<br>Valid Range are from:<br>100 to 899<br>1000 to 8999<br>10000 to 89999");
    ?>
</span></a></td>
		<td>
			<input type="text" maxlength="5" size="5" name="destdial" value="<?php 
    echo isset($extension) ? $extension : '';
    ?>
">&nbsp;&nbsp;
		</td></tr>
		<tr><td colspan="2">&nbsp;</td></tr>
		<tr><td colspan="2">

<?php 
    $goto = getargs($extension, 1, 'ext-miscdests');
    echo drawselects('editMD', isset($goto) ? $goto : null, 0, 'fixINCOMING', '', '', 'fixCALLBACKEXT', 'fixMEETME');
    ?>

			</td></tr>
		<tr><td colspan="2"><br><h6><input name="Submit" type="submit" value="<?php 
    echo _("Submit Changes");
    ?>
"></h6>
		</td>
	</tr>
	</table>
<script language="javascript">
<!--

var theForm = document.editMD;
Ejemplo n.º 2
0
<!--Destination if no answer-->
<div class="element-container">
	<div class="row">
		<div class="col-md-12">
			<div class="row">
				<div class="form-group">
					<div class="col-md-3">
						<label class="control-label" for="goto0"><?php 
echo _("Destination if no answer");
?>
</label>
						<i class="fa fa-question-circle fpbx-help-icon" data-for="goto0"></i>
					</div>
					<div class="col-md-9">
						<?php 
echo drawselects($goto, 0, false, false);
?>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col-md-12">
			<span id="goto0-help" class="help-block fpbx-help-block"><?php 
echo _("Where to send callers if there is no answer.");
?>
</span>
		</div>
	</div>
</div>
Ejemplo n.º 3
0
"><?php 
    echo $default != '' ? $default : 'None';
    ?>
		</td>
	</tr>
<?php 
}
?>

	<tr><td colspan="2"><br><h5><?php 
echo _("Destination for Orphaned Parked Calls");
?>
:<hr></h5></td></tr>
<?php 
//draw goto selects
echo drawselects($goto, 0);
?>
	<tr>
		<td colspan="2"><br><h6><input name="Submit" type="submit" value="<?php 
echo _("Submit Changes");
?>
" tabindex="<?php 
echo ++$tabindex;
?>
"></h6></td>
	</tr>
	</table>

<script language="javascript">
<!--
Ejemplo n.º 4
0
function drawdestinations($count, $sel, $dest, $ivr_ret)
{
    global $tabindex, $id;
    ?>
	<tr>
	<td style="text-align:right;">
  <input title="<?php 
    echo _("Digits to press for this choice");
    ?>
" size="4" type="text" name="option<?php 
    echo $count;
    ?>
" value="<?php 
    echo $sel;
    ?>
" tabindex="<?php 
    echo ++$tabindex;
    ?>
">
	</td>
	<td>
		<?php 
    echo drawselects($dest, $count, false, false);
    ?>
	</td>
	<td>
		<small><a href="#" class="info"><?php 
    echo _("Return to IVR");
    ?>
<span><?php 
    echo _("Check this box to have this option return to a parent IVR if it was called from a parent IVR. If not, it will go to the chosen destination.<br><br>The return path will be to any IVR that was in the call path prior to this IVR which could lead to strange results if there was an IVR called in the call path but not immediately before this");
    ?>
</span></a></small>
		<input type="checkbox" name="ivr_ret<?php 
    echo $count;
    ?>
" value="ivr_ret" <?php 
    echo $ivr_ret ? 'CHECKED' : '';
    ?>
>
	<?php 
    if (function_exists('ivr_dests_hook_show')) {
        ivr_dests_hook_show($id, $dest);
    }
    ?>
		<img src="images/trash.png" style="cursor:pointer" title="<?php 
    echo _('Delete this entry. Dont forget to click \\"Save\\" to save changes!');
    ?>
" onclick="delEntry(<?php 
    echo $count;
    ?>
)">
	</td>
	</tr>
	

<?php 
}
Ejemplo n.º 5
0
						<!--Destination-->
						<div class="element-container">
							<div class="row">
								<div class="col-md-12">
									<div class="row">
										<div class="form-group">
											<div class="col-md-3 control-label">
												<label for="goto0"><?php 
echo _("Destination");
?>
</label>
												<i class="fa fa-question-circle fpbx-help-icon" data-for="goto0"></i>
											</div>
											<div class="col-md-9">
												<?php 
echo drawselects($dest, 0);
?>
											</div>
										</div>
									</div>
								</div>
							</div>
							<div class="row">
								<div class="col-md-12">
									<span id="goto0-help" class="help-block fpbx-help-block"><?php 
echo _("Choose the destination for this app when people dial the feature code");
?>
</span>
								</div>
							</div>
						</div>
Ejemplo n.º 6
0
echo ++$tabindex;
?>
" <?php 
echo $noanswer ? 'CHECKED' : '';
?>
 /></td>
	</tr>
	
	<tr><td colspan="2"><br><h5><?php 
echo _("Destination after playback");
?>
:<hr></h5></td></tr>

<?php 
//draw goto selects
echo drawselects($post_dest, 0);
?>
			
			<tr>
			<td colspan="2"><br><input name="Submit" type="submit" value="<?php 
echo _("Submit Changes");
?>
" tabindex="<?php 
echo ++$tabindex;
?>
">
			<?php 
if ($extdisplay) {
    echo '&nbsp;<input name="delete" type="submit" value="' . _("Delete") . '">';
}
?>
Ejemplo n.º 7
0
    public function coreDIDHook($page)
    {
        if ($page == 'did') {
            $target_menuid = $page;
            $tabindex = null;
            $type = isset($_REQUEST['type']) ? $_REQUEST['type'] : '';
            $extension = isset($_REQUEST['extension']) ? $_REQUEST['extension'] : '';
            $cidnum = isset($_REQUEST['cidnum']) ? $_REQUEST['cidnum'] : '';
            $extdisplay = isset($_REQUEST['extdisplay']) ? $_REQUEST['extdisplay'] : '';
            //if were editing, get save parms. Get parms
            if (!$extension && !$cidnum) {
                //set $extension,$cidnum if we dont already have them
                if ($extdisplay) {
                    $opts = explode('/', $extdisplay);
                    $extension = $opts['0'];
                    $cidnum = isset($opts['1']) ? $opts['1'] : '';
                } else {
                    $extension = $cidnum = '';
                }
            }
            $fax = fax_get_incoming($extension, $cidnum);
            $html = $fdinput = '';
            if ($target_menuid == 'did') {
                $fax_dahdi_faxdetect = fax_dahdi_faxdetect();
                $fax_sip_faxdetect = fax_sip_faxdetect();
                $dahdi = ast_with_dahdi() ? _('Dahdi') : _('Zaptel');
                $fax_detect = fax_detect();
                $fax_settings = fax_get_settings();
                //ensure that we are using destination for both fax detect and the regular calls
                $html = '<script type="text/javascript">$(document).ready(function(){
				$("input[name=Submit]").click(function(){
					if($("input[name=faxenabled]:checked").val()=="true" && !$("[name=gotoFAX]").val()){//ensure the user selected a fax destination
					alert(' . _('"You have selected Fax Detection on this route. Please select a valid destination to route calls detected as faxes to."') . ');return false; }	}) });</script>';
                $fdhelp = _("Attempt to detect faxes on this DID.");
                $fdhelp .= '<ul>';
                $fdhelp .= '<li>' . _("No: No attempts are made to auto-determine the call type; all calls sent to destination set in the 'General' tab. Use this option if this DID is used exclusively for voice OR fax.") . '</li>';
                $fdhelp .= '<li>' . _("Yes: try to auto determine the type of call; route to the fax destination if call is a fax, otherwise send to regular destination. Use this option if you receive both voice and fax calls on this line") . '</li>';
                if ($fax_settings['legacy_mode'] == 'yes' || $fax['legacy_email'] !== null) {
                    $fdhelp .= '<li>' . _('Legacy: Same as YES, only you can enter an email address as the destination. This option is ONLY for supporting migrated legacy fax routes. You should upgrade this route by choosing YES, and selecting a valid destination!') . '</li>';
                }
                $fdhelp .= '</ul>';
                //dont allow detection to be set if we have no valid detection types
                if (!$fax_dahdi_faxdetect && !$fax_sip_faxdetect && !$fax_detect['nvfax']) {
                    $js = "if (\$(this).val() == 'true'){alert('" . _('No fax detection methods found or no valid license. Faxing cannot be enabled.') . "');return false;}";
                    $fdinput .= '<input type="radio" name="faxenabled" id="faxenabled_yes" value="true"  onclick="' . $js . '"/><label for="faxenabled_yes">Yes</label></span>';
                    $fdinput .= '<input type="radio" id="faxenabled_no" name="faxenabled" value="false" CHECKED /><label for="faxenabled_no">No</label>';
                } else {
                    /*
                     * show detection options
                     *
                     * js to show/hide the detection settings. Second slide is always in a
                     * callback so that we ait for the fits animation to complete before
                     * playing the second
                     */
                    $faxing = !empty($fax);
                    $fdinput .= '<input type="radio" name="faxenabled" id="faxenabled_yes" value="true" ' . ($faxing ? 'CHECKED' : '') . ' /><label for="faxenabled_yes">' . _('Yes') . '</label>';
                    $fdinput .= '<input type="radio" name="faxenabled" id="faxenabled_no" value="false" ' . (!$faxing ? 'CHECKED' : '') . '/><label for="faxenabled_no">' . _('No') . '</label>';
                    if ($fax['legacy_email'] !== null || $fax_settings['legacy_mode'] == 'yes') {
                        $fdinput .= '<input type="radio" name="faxenabled" id="faxenabled_legacy" value="legacy"' . ($fax['legacy_email'] !== null ? ' CHECKED ' : '') . 'onclick="' . $jslegacy . '"/><label for="faxenabled_legacy">' . _('Legacy');
                    }
                }
                $html .= '
					<!--Detect Faxes-->
					<div class="element-container">
						<div class="row">
							<div class="col-md-12">
								<div class="row">
									<div class="form-group">
										<div class="col-md-3">
											<label class="control-label" for="faxenabled">' . _("Detect Faxes") . '</label>
											<i class="fa fa-question-circle fpbx-help-icon" data-for="faxenabled"></i>
										</div>
										<div class="col-md-9 radioset">
											' . $fdinput . '
										</div>
									</div>
								</div>
							</div>
						</div>
						<div class="row">
							<div class="col-md-12">
								<span id="faxenabled-help" class="help-block fpbx-help-block">' . $fdhelp . '</span>
							</div>
						</div>
					</div>
					<!--END Detect Faxes-->
				';
                $info = engine_getinfo();
                $fdthelp = _("Type of fax detection to use.");
                $fdthelp .= '<ul>';
                $fdthelp .= '<li>' . $dahdi . ': ' . _("use ") . $dahdi . _(" fax detection; requires 'faxdetect=' to be set to 'incoming' or 'both' in ") . $dahdi . '.conf</li>';
                $fdthelp .= '<li>' . _("Sip: use sip fax detection (t38). Requires asterisk 1.6.2 or greater and 'faxdetect=yes' in the sip config files") . '</li>';
                $fdthelp .= '<li>' . _("NV Fax Detect: Use NV Fax Detection; Requires NV Fax Detect to be installed and recognized by asterisk") . '</li>';
                $fdthelp .= '</ul>';
                $html .= '
				<!--Fax Detection type-->
				<div class="element-container ' . ($faxing ? '' : "hidden") . '" id="fdtype">
					<div class="row">
						<div class="col-md-12">
							<div class="row">
								<div class="form-group">
									<div class="col-md-3">
										<label class="control-label" for="faxdetection">' . _("Fax Detection type") . '</label>
										<i class="fa fa-question-circle fpbx-help-icon" data-for="faxdetection"></i>
									</div>
									<div class="col-md-9 radioset">
										<input type="radio" name="faxdetection" id="faxdetectiondahdi" value="dahdi" ' . ($fax['detection'] == "dahdi" ? "CHECKED" : "") . ' ' . ($fax_dahdi_faxdetect ? '' : 'disabled') . '>
										<label for="faxdetectiondahdi">' . _("Dahdi") . '</label>
										<input type="radio" name="faxdetection" id="faxdetectionnvfax" value="nvfax" ' . ($fax['detection'] == "nvfax" ? "CHECKED" : "") . ' ' . ($fax_detect['nvfax'] ? '' : 'disabled') . '>
										<label for="faxdetectionnvfax">' . _("NVFax") . '</label>
										<input type="radio" name="faxdetection" id="faxdetectionsip" value="sip" ' . ($fax['detection'] == "sip" ? "CHECKED" : "") . ' ' . ($info['version'] >= "1.6.2" && $fax_sip_faxdetect ? '' : 'disabled') . '>
										<label for="faxdetectionsip">' . _("SIP") . '</label>
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-md-12">
							<span id="faxdetection-help" class="help-block fpbx-help-block">' . $fdthelp . '</span>
						</div>
					</div>
				</div>
				<!--END Fax Detection type-->
				';
                if (!$fax['detectionwait']) {
                    $fax['detectionwait'] = 4;
                }
                //default wait time is 4 second
                $fdthelp = _('How long to wait and try to detect fax. Please note that callers to a Dahdi channel will hear ringing for this amount of time (i.e. the system wont "answer" the call, it will just play ringing).');
                $html .= '
				<!--Fax Detection Time-->
				<div class="element-container ' . ($faxing ? '' : "hidden") . '" id="fdtime">
					<div class="row">
						<div class="col-md-12">
							<div class="row">
								<div class="form-group">
									<div class="col-md-3">
										<label class="control-label" for="faxdetectionwait">' . _("Fax Detection Time") . '</label>
										<i class="fa fa-question-circle fpbx-help-icon" data-for="faxdetectionwait"></i>
									</div>
									<div class="col-md-9">
										<input type="number" min="2" max="11" class="form-control" id="faxdetectionwait" name="faxdetectionwait" value="' . $fax['detectionwait'] . '">
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-md-12">
							<span id="faxdetectionwait-help" class="help-block fpbx-help-block">' . $fdthelp . '</span>
						</div>
					</div>
				</div>
				<!--END Fax Detection Time-->
				';
                if (!empty($fax['legacy_email']) || $fax_settings['legacy_mode'] == 'yes') {
                    $fedhelp = _("Address to email faxes to on fax detection.<br />PLEASE NOTE: In this version of FreePBX, you can now set the fax destination from a list of destinations. Extensions/Users can be fax enabled in the user/extension screen and set an email address there. This will create a new destination type that can be selected. To upgrade this option to the full destination list, select YES to Detect Faxes and select a destination. After clicking submit, this route will be upgraded. This Legacy option will no longer be available after the change, it is provided to handle legacy migrations from previous versions of FreePBX only.");
                    $html .= '
					<!--Fax Email Destination-->
					<div class="element-container ' . ($faxing ? '' : "hidden") . '" id="fdemail">
						<div class="row">
							<div class="col-md-12">
								<div class="row">
									<div class="form-group">
										<div class="col-md-3">
											<label class="control-label" for="legacy_email"><?php echo _("Fax Email Destination") ?></label>
											<i class="fa fa-question-circle fpbx-help-icon" data-for="legacy_email"></i>
										</div>
										<div class="col-md-9">
											<input type="text" class="form-control" id="legacy_email" name="legacy_email" value="' . $fax['legacy_email'] . '">
										</div>
									</div>
								</div>
							</div>
						</div>
						<div class="row">
							<div class="col-md-12">
								<span id="legacy_email-help" class="help-block fpbx-help-block">' . $fedhelp . '</span>
							</div>
						</div>
					</div>
					<!--END Fax Email Destination-->
					';
                }
                $faxdesthelp = _('Where to send the faxes');
                $html .= '
				<!--Fax Destination-->
				<div class="element-container ' . ($faxing ? '' : "hidden") . '" id="fddest">
					<div class="row">
						<div class="col-md-12">
							<div class="row">
								<div class="form-group">
									<div class="col-md-3">
										<label class="control-label" for="gotofax">' . _("Fax Destination") . '</label>
										<i class="fa fa-question-circle fpbx-help-icon" data-for="gotofax"></i>
									</div>
									<div class="col-md-9">';
                $html .= $fax_detect ? drawselects(isset($fax['destination']) ? $fax['destination'] : null, 'FAX', false, false) : '';
                $html .= '
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-md-12">
							<span id="gotofax-help" class="help-block fpbx-help-block">' . $faxdesthelp . '</span>
						</div>
					</div>
				</div>
				<!--END Fax Destination-->
				<script type="text/javascript">
				$("[name=\'faxenabled\']").change(function(){
					if($(this).val() == \'true\'){
						$("#fdtype").removeClass("hidden");
						$("#fdtime").removeClass("hidden");
						$("#fddest").removeClass("hidden");
					}else{
						$("#fdtype").addClass("hidden");
						$("#fdtime").addClass("hidden");
						$("#fddest").addClass("hidden");
					}
				});
				</script>
				';
            }
            $ret = array();
            $ret[] = array('title' => _("Fax"), 'rawname' => 'fax', 'content' => $html);
            return $ret;
        }
    }
Ejemplo n.º 8
0
	<!--Timeout Destination-->
	<div class="element-container">
		<div class="row">
			<div class="col-md-12">
				<div class="row">
					<div class="form-group">
						<div class="col-md-3">
							<label class="control-label" for="gototimeout"><?php 
echo _("Timeout Destination");
?>
</label>
							<i class="fa fa-question-circle fpbx-help-icon" data-for="gototimeout"></i>
						</div>
						<div class="col-md-9">
							<?php 
echo drawselects($ivr['timeout_destination'], 'timeout');
?>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-md-12">
				<span id="gototimeout-help" class="help-block fpbx-help-block"><?php 
echo _("Destination to send the call to after Timeout Recording is played.");
?>
</span>
			</div>
		</div>
	</div>
Ejemplo n.º 9
0
	<!--Destination-->
	<div class="element-container">
		<div class="row">
			<div class="col-md-12">
				<div class="row">
					<div class="form-group">
						<div class="col-md-3">
							<label class="control-label" for="goto0"><?php 
echo _("Destination");
?>
</label>
							<i class="fa fa-question-circle fpbx-help-icon" data-for="goto0"></i>
						</div>
						<div class="col-md-9">
							<?php 
echo drawselects($dest, 0, false, false);
?>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-md-12">
				<span id="goto0-help" class="help-block fpbx-help-block"><?php 
echo _("Failover Destination.");
?>
</span>
			</div>
		</div>
	</div>
                                    $sources[$j]['showup'] = TRUE;
                                }
                                $c = count($conf['sources']) - 1;
                                if ($conf['sources'][$c] != $this_source_name) {
                                    $sources[$j]['showdown'] = TRUE;
                                }
                            }
                            $i++;
                        }
                    }
                }
            }
            ksort($sources);
            $conf['processors_list'] = $processors_list;
            $goto = !empty($conf['spam_destination']) ? $conf['spam_destination'] : '';
            $conf['interceptor_select'] = drawselects($goto, 0, FALSE, FALSE);
            $displayvars = array("sources" => $sources, "scheme_data" => $conf);
            $middle = load_view(__DIR__ . '/views/scheme.php', $displayvars);
        } else {
            $middle = _("Unknown Scheme");
        }
        break;
    default:
        if (isset($_POST['type'])) {
            $scheme = $_POST['scheme_name'];
            $type = $_POST['goto0'];
            $res = FreePBX::Superfecta()->addScheme($scheme, array('DID' => $_POST['DID'], 'CID_rules' => $_POST['CID_rules'], 'Curl_Timeout' => $_POST['Curl_Timeout'], 'processor' => $_POST['processor'], 'multifecta_timeout' => $_POST['multifecta_timeout'], 'Prefix_URL' => $_POST['Prefix_URL'], 'SPAM_Text' => $_POST['SPAM_Text'], 'SPAM_Text_Substitute' => $_POST['SPAM_Text_Substitute'], 'enable_interceptor' => $_POST['enable_interceptor'], 'SPAM_threshold' => $_POST['SPAM_threshold'], 'destination' => !empty($type) ? $_POST[$type . '0'] : ''));
        }
        $middle = load_view(__DIR__ . '/views/main.php', array("schemes" => FreePBX::Superfecta()->getAllSchemes()));
}
$currentScheme = !empty($_REQUEST['scheme']) ? $_REQUEST['scheme'] : '';
Ejemplo n.º 11
0
 public function ajaxHandler()
 {
     $ret = array("status" => true);
     switch ($_REQUEST['command']) {
         case "import":
             $ret = $this->import($_POST['type'], array($_POST['imports']), !empty($_POST['replace']) ? true : false);
             break;
         case "destinationdrawselect":
             global $active_modules;
             $active_modules = $this->freepbx->Modules->getActiveModules();
             $this->freepbx->Modules->getDestinations();
             $ret = array("status" => true, "destid" => $_POST['destid'], "html" => drawselects($_POST['value'], $_POST['id'], false, false));
             break;
     }
     return $ret;
 }
Ejemplo n.º 12
0
//build header
$h = array();
foreach ($headers as $mod => $header) {
    $h += $header;
}
$table->set_heading($h);
$count = 0;
foreach ($entries as $e) {
    $count++;
    //add ext to dial
    $row[] = form_input(array('name' => 'entries[ext][]', 'value' => $e['selection'], 'placeholder' => _('digits pressed')));
    //add destination. The last one gets a different count so that we can manipualte it on the page
    if ($count == count($entries)) {
        $row[] = drawselects($e['dest'], 'DESTID', $restrict_mods, false) . form_hidden('entries[goto][]', '');
    } else {
        $row[] = drawselects($e['dest'], $count, $restrict_mods, false) . form_hidden('entries[goto][]', '');
    }
    //return to ivr
    $row[] = '
		<span class="radioset">
		<input type="radio" name="entries[ivr_ret][DESTID' . $count . ']" id="entries' . $count . 'DESTIDyes" value="1" ' . ($e['ivr_ret'] ? "CHECKED" : "") . '>
		<label for="entries' . $count . 'DESTIDyes">' . _("Yes") . '</label>
		<input type="radio" name="entries[ivr_ret][DESTID' . $count . ']" id="entries' . $count . 'DESTIDno" value="" ' . ($e['ivr_ret'] ? "" : "CHECKED") . '>
		<label for="entries' . $count . 'DESTIDno">' . _("No") . '</label>
		</span>
	';
    //delete buttom
    $row[] = '<a href="#" alt="' . _('Delete this entry. Dont forget to click Submit to save changes!') . '" class="delete_entrie"><i class="fa fa-trash"></i></a>';
    //add module hooks
    if (isset($e['hooks']) && $e['hooks']) {
        foreach ($e['hooks'] as $module => $hooks) {
Ejemplo n.º 13
0
    $checked = "";
    $style = "display: none";
}
?>
    <td><input type="checkbox" name="destret" id="destret" <?php 
echo $checked;
?>
></td>
  </tr>

  <tr style='<?php 
echo $style;
?>
' id='hasreturn'>
    <td colspan=2><?php 
echo drawselects($current['dest'], 0, false, false);
?>
</td>
  </tr>

  <tr>
    <td colspan="2"><br>
    <?php 
if ($destid) {
    ?>
      <button type="submit" name="action" value="edit"><?php 
    echo _("Submit Changes");
    ?>
</button>
      <button type="submit" name="action" value="delete"><?php 
    echo _("Delete");
Ejemplo n.º 14
0
 function gui_drawselects($elemname, $index, $dest, $prompttext = '', $helptext = '', $canbeempty = true, $failvalidationmsg = '')
 {
     global $currentcomponent;
     $parent_class = get_parent_class($this);
     if (!$canbeempty) {
         $jsvalidation = '()';
         $jsvalidationtest = '!$("[name=goto' . $index . ']").val()';
         $failvalidationmsg = _('Please select a valid destination.');
     }
     parent::$parent_class($elemname, '', $prompttext, $helptext, $jsvalidation, $failvalidationmsg, '', $jsvalidationtest);
     $this->html_input = drawselects($dest, $index, false, false);
     //adttach a value to this element, so that we can find its value
     $currentcomponent->addguielem('', new gui_hidden($elemname, 'goto' . $index));
 }
Ejemplo n.º 15
0
function drawdestinations($count, $mode, $dest)
{
    ?>
	<tr> 
		<td style="text-align:right;">
		<a href="#" class="info"><strong><?php 
    echo $mode;
    ?>
</strong><span><?php 
    echo sprintf(_("Destination to use when set to %s mode"), $mode);
    ?>
</span></a>
		</td>
		<td> 
			<table> <?php 
    echo drawselects($dest, $count);
    ?>
 
			</table> 
		</td>
	</tr>
	<tr><td colspan=2><hr /></td></tr>
<?php 
}
Ejemplo n.º 16
0
					</div>
				</div>
				<div class="element-container">
					<div class="row">
						<div class="col-md-12">
							<div class="row">
								<div class="form-group">
									<div class="col-md-3">
										<label class="control-label" for="element12"><?php 
echo _('Send Spam Call To');
?>
</label>
										<i class="fa fa-question-circle fpbx-help-icon" data-for="element11"></i>
									</div>
									<div class="col-md-9"><?php 
echo drawselects('', 0, FALSE, FALSE);
?>
</div>
								</div>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-md-12">
							<span id="element12-help" class="help-block fpbx-help-block"><?php 
echo _('Where to send the call when it is detected as spam');
?>
</span>
						</div>
					</div>
				</div>
Ejemplo n.º 17
0
<!--Override Flow (Red/BLF on)-->
<div class="element-container">
	<div class="row">
		<div class="col-md-12">
			<div class="row">
				<div class="form-group">
					<div class="col-md-3">
						<label class="control-label" for="goto1"><?php 
echo _("Override Flow (Red/BLF on)");
?>
</label>
						<i class="fa fa-question-circle fpbx-help-icon" data-for="goto1"></i>
					</div>
					<div class="col-md-9">
						<?php 
echo drawselects(isset($dests['night']) ? $dests['night'] : '', 1);
?>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col-md-12">
			<span id="goto1-help" class="help-block fpbx-help-block"><?php 
echo _("Destination to use when set to Override Flow (Red/BLF on) mode");
?>
</span>
		</div>
	</div>
</div>
Ejemplo n.º 18
0
		<!--Set Destination-->
		<div class="element-container">
			<div class="row">
				<div class="col-md-12">
					<div class="row">
						<div class="form-group">
							<div class="col-md-3">
								<label class="control-label" for="goto0"><?php 
echo _("Set Destination");
?>
</label>
								<i class="fa fa-question-circle fpbx-help-icon" data-for="goto0"></i>
							</div>
							<div class="col-md-9">
								<?php 
echo drawselects(isset($destination) ? $destination : null, 0, array("core" => array("extensions", "voicemail"), "timeconditions", "sipstation"), false, '', false, false, true);
?>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-md-12">
					<span id="goto0-help" class="help-block fpbx-help-block"><?php 
echo _("Destination for route");
?>
</span>
				</div>
			</div>
		</div>
Ejemplo n.º 19
0
		<div class="col-md-12">
			<div class="row">
				<div class="form-group">
					<div class="col-md-3">
						<label class="control-label" for="goto1"><?php 
echo _("Destination non-matches");
?>
</label>
						<i class="fa fa-question-circle fpbx-help-icon" data-for="goto1"></i>
					</div>
					<div class="col-md-9">
						<?php 
if (isset($thisItem)) {
    echo drawselects($thisItem['falsegoto'], 1);
} else {
    echo drawselects(null, 1);
}
?>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col-md-12">
			<span id="goto1-help" class="help-block fpbx-help-block"><?php 
echo _("Destination if time does not matche");
?>
</span>
		</div>
	</div>
Ejemplo n.º 20
0
 public function __construct($elemname, $index = '', $dest = '', $prompttext = '', $helptext = '', $required = false, $failvalidationmsg = '', $nodest_msg = '', $disable = false, $class = '')
 {
     if (is_array($elemname)) {
         extract($elemname);
     }
     if (trim($index) == '') {
         trigger_error('$index can not be blank');
         return;
     }
     global $currentcomponent;
     $jsvalidation = isset($jsvalidation) ? $jsvalidation : '';
     $jsvalidationtest = isset($jsvalidationtest) ? $jsvalidationtest : '';
     parent::__construct($elemname, '', $prompttext, $helptext, $jsvalidation, $failvalidationmsg, '', $jsvalidationtest);
     $reset = isset($reset) && $reset ? true : false;
     $this->html_input = drawselects($dest, $index, false, false, $nodest_msg, $required, false, $reset, $disable, $class);
     $hidden = new gui_hidden($elemname, 'goto' . $index, false);
     $this->html_input .= $hidden->_html;
     $this->type = "select";
 }
Ejemplo n.º 21
0
		<div class="col-md-12">
			<div class="row">
				<div class="form-group">
					<div class="col-md-3">
						<label class="control-label" for="goto1"><?php 
echo _("Destination non-matches");
?>
</label>
						<i class="fa fa-question-circle fpbx-help-icon" data-for="goto1"></i>
					</div>
					<div class="col-md-9">
						<?php 
if (isset($thisItem)) {
    echo drawselects($thisItem['falsegoto'], 1, array("core" => array("extensions", "voicemail"), "ringgroups", "ivr"), false, '', false, false, true);
} else {
    echo drawselects(null, 1, array("core" => array("extensions", "voicemail"), "ringgroups", "ivr"), false, '', false, false, true);
}
?>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col-md-12">
			<span id="goto1-help" class="help-block fpbx-help-block"><?php 
echo _("Destination if time does not matche");
?>
</span>
		</div>
	</div>
Ejemplo n.º 22
0
        <td style="text-align:right;">
        <input size="2" type="text" name="ivr_option<?php 
                echo $i;
                ?>
" value="<?php 
                echo $dropts[$i] == '' ? $i + 1 : $dropts[$i];
                ?>
">
        </td>
        <td></td>
        <td>

<?php 
                $sql = "SELECT args FROM extensions WHERE extension = '" . $dropts[$i] . "' AND priority = '1' AND context = '" . $menu_id . "'";
                list($goto) = $db->getRow($sql);
                echo drawselects('prompt', $goto, $i, 'fixINCOMING', 'fixFAX', '', 'fixCALLBACKEXT', 'fixMEETME');
                ?>
        </td>
    </tr>

    <tr><td><br></td></tr>
<?php 
            }
            ?>
    </table>
    <h6>
    <input type="button" value="<?php 
            echo _("SAVE");
            ?>
" onClick="checkIVR(prompt,<?php 
            echo $_REQUEST['ivr_num_options'];
Ejemplo n.º 23
0
 function gui_drawselects($elemname, $index, $dest, $prompttext = '', $helptext = '', $required = false, $failvalidationmsg = '', $nodest_msg = '')
 {
     global $currentcomponent;
     $parent_class = get_parent_class($this);
     $jsvalidation = isset($jsvalidation) ? $jsvalidation : '';
     $jsvalidationtest = isset($jsvalidationtest) ? $jsvalidationtest : '';
     parent::$parent_class($elemname, '', $prompttext, $helptext, $jsvalidation, $failvalidationmsg, '', $jsvalidationtest);
     $this->html_input = drawselects($dest, $index, false, false, $nodest_msg, $required);
     //attach a value to this element, so that we can find its value
     $currentcomponent->addguielem('', new gui_hidden($elemname, 'goto' . $index, false));
 }
Ejemplo n.º 24
0
 * we need to get the latest drawselects with thosen goto target if we have it
 * and send it back. This could be more efficient by only getting the options for
 * the target and possibly related categories but the overhead is minimal to get
 * a single copy of the select box structure.
 */
$html = '';
switch ($popover_mode) {
    case 'display':
        $html .= "<script>popOverDisplay();</script>";
        break;
    case 'process':
        // Before calling drawselects we need to:
        //  - set the 'environment' like the parent page it is being generated for
        //  - tell it to dump it's cached internal structures and re-generate them
        // This is necessary because callback functions that drawselects uses can
        // generate context dependent results based on the calling module/display page
        //
        global $module_name, $module_page;
        $module_name_bak = $module_name;
        $module_page_bak = $module_page;
        $module_name = $_SESSION['module_name'];
        $module_page = $_SESSION['module_page'];
        $gotodest = fwmsg::get_dest();
        $drawselects_json = json_encode(drawselects($gotodest, 0, false, false, '', false, false, true));
        $html .= '<script>parent.closePopOver(' . $drawselects_json . ');</script>';
        $module_name = $module_name_bak;
        $module_page = $module_page_bak;
        break;
}
$html .= "\n";
echo $html;
Ejemplo n.º 25
0
" tabindex="<?php 
    echo ++$tabindex;
    ?>
"></td>
	</tr>
	<tr><td colspan="2"><br><h5><?php 
    echo _("Destination after Callback");
    ?>
:<hr></h5></td></tr>

<?php 
    //draw goto selects
    if (isset($thisItem)) {
        echo drawselects($thisItem['destination'], 0);
    } else {
        echo drawselects(null, 0);
    }
    ?>

	<tr>
		<td colspan="2"><br><h6><input name="submit" type="submit" value="<?php 
    echo _("Submit Changes");
    ?>
" tabindex="<?php 
    echo ++$tabindex;
    ?>
"></h6></td>		
	</tr>
	</table>
<script language="javascript">
<!--
Ejemplo n.º 26
0
<?php 
}
// if $extdisplay
?>

    <tr>
      <td colspan="2"><h5><a href=# class="info"><?php 
echo _("Optional Destination on Congestion");
?>
<span><?php 
echo _("If all the trunks fail because of Asterisk 'CONGESTION' dialstatus you can optionally go to a destination such as a unique recorded message or anywhere else. This destination will NOT be engaged if the trunk is reporting busy, invalid numbers or anything else that would imply the trunk was able to make an 'intelligent' choice about the number that was dialed. The 'Normal Congestion' behavior is to play the 'All Circuits Busy' recording or other options configured in the Route Congestion Messages module when installed.");
?>
<br></span></a><hr></h5></td>
    </tr>
<?php 
echo drawselects(!empty($dest) ? $dest : null, 0, false, true, _("Normal Congestion"), false);
?>


		<tr>
			<td colspan="2">
        <h6>
          <input name="Submit" type="submit" value="<?php 
echo _("Submit Changes");
?>
">
          <input name="copyroute" type="submit" value="<?php 
echo _("Duplicate Route");
?>
"/>
				</h6>
Ejemplo n.º 27
0
			<!--Set Destination-->
			<div class="element-container">
				<div class="row">
					<div class="col-md-12">
						<div class="row">
							<div class="form-group">
								<div class="col-md-3">
									<label class="control-label" for="goto0"><?php 
echo _("Set Destination");
?>
</label>
									<i class="fa fa-question-circle fpbx-help-icon" data-for="goto0"></i>
								</div>
								<div class="col-md-9">
									<?php 
echo drawselects(isset($destination) ? $destination : null, 0);
?>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-12">
						<span id="goto0-help" class="help-block fpbx-help-block"><?php 
echo _("Destination for route");
?>
</span>
					</div>
				</div>
			</div>
Ejemplo n.º 28
0
<?php

//Check if user is "logged in"
if (!defined('FREEPBX_IS_AUTH')) {
    die('No direct script access allowed');
}
//Handling form stuff....
isset($_REQUEST['action']) ? $action = $_REQUEST['action'] : ($action = '');
//the item we are currently displaying
isset($_REQUEST['itemid']) ? $itemid = $db->escapeSimple($_REQUEST['itemid']) : ($itemid = '');
switch ($action) {
    case "add":
        needreload();
        break;
    case "delete":
        needreload();
        redirect_standard();
        break;
    case "edit":
        needreload();
        redirect_standard();
        break;
}
$variables = array('astmanconnected' => $astman->connected(), 'listcommands' => $astman->ListCommands(), 'astdatabase' => $astman->database_show(), 'ds' => drawselects('', 1, false, false), 'amp_conf' => $amp_conf);
$html = load_view(dirname(__FILE__) . '/views/main.tpl', $variables);
echo $html;
$astman->database_put('family', 'key', 'valuer');
$out = $astman->database_get('family', 'key');
//echo $out;
Ejemplo n.º 29
0
            </select>
        </td>
    </tr>

			<tr><td colspan="2"><br><h5><?php 
    echo _("Destination if no answer");
    ?>
</h5></td></tr>

<?php 
    $goto = getargs(ltrim($extdisplay, 'GRP-'), 2, 'ext-group');
    ?>
			<tr><td colspan="2">

<?php 
    echo drawselects('editGRP', $goto, 0, 'fixINCOMING', '', '', '', '');
    ?>

			</td></tr>

			<tr>
			<td colspan="2"><br><h6><input name="Submit" type="button" value="Submit Changes" onclick="checkGRP(editGRP, <?php 
    echo $extdisplay ? "'edtGRP'" : "'addGRP'";
    ?>
);"></h6></td>
			</tr>

			</table>
			</form>
<?php 
}
Ejemplo n.º 30
0
<!--Destination if no answer-->
<div class="element-container">
	<div class="row">
		<div class="col-md-12">
			<div class="row">
				<div class="form-group">
					<div class="col-md-3">
						<label class="control-label" for="goto0"><?php 
echo _("Destination if no answer");
?>
</label>
						<i class="fa fa-question-circle fpbx-help-icon" data-for="goto0"></i>
					</div>
					<div class="col-md-9">
						<?php 
echo drawselects($goto, 0, array("core" => array("extensions", "voicemail")), false);
?>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col-md-12">
			<span id="goto0-help" class="help-block fpbx-help-block"><?php 
echo _("Where to send callers if there is no answer.");
?>
</span>
		</div>
	</div>
</div>