当前位置: 首页>>代码示例>>PHP>>正文


PHP FreePBX::Modules方法代码示例

本文整理汇总了PHP中FreePBX::Modules方法的典型用法代码示例。如果您正苦于以下问题:PHP FreePBX::Modules方法的具体用法?PHP FreePBX::Modules怎么用?PHP FreePBX::Modules使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FreePBX的用法示例。


在下文中一共展示了FreePBX::Modules方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: webrtc_configpageinit

function webrtc_configpageinit($pagename)
{
    global $currentcomponent;
    global $amp_conf;
    $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : null;
    $extdisplay = isset($_REQUEST['extdisplay']) ? $_REQUEST['extdisplay'] : null;
    $extension = isset($_REQUEST['extension']) ? $_REQUEST['extension'] : null;
    $tech_hardware = isset($_REQUEST['tech_hardware']) ? $_REQUEST['tech_hardware'] : null;
    $supported_hardware = array('sip', 'pjsip', 'iax2', 'dahdi');
    // We only want to hook the 'extensions' pages.
    $th = !empty($_REQUEST['tech_hardware']) ? $_REQUEST['tech_hardware'] : '';
    if ($pagename != 'extensions' && in_array(str_replace('_generic', '', $th), $supported_hardware)) {
        return true;
    }
    $fw_ari = FreePBX::Modules()->getInfo('fw_ari');
    if (!empty($fw_ari['fw_ari']) && $fw_ari['fw_ari']['status'] == MODULE_STATUS_ENABLED) {
        if ($tech_hardware != null || $extdisplay != '' || $action == 'add') {
            $currentcomponent->addoptlistitem('webrtc_enable', 'no', 'No');
            $currentcomponent->addoptlistitem('webrtc_enable', 'yes', 'Yes');
            $currentcomponent->setoptlistopts('webrtc_enable', 'sort', false);
            $currentcomponent->addguifunc("webrtc_{$pagename}_configpageload");
            if (!empty($action)) {
                $currentcomponent->addprocessfunc("webrtc_{$pagename}_configprocess");
            }
        }
    }
}
开发者ID:ozererik,项目名称:webrtc,代码行数:27,代码来源:hook_core.php

示例2: moduleSearch

 public function moduleSearch()
 {
     $results = array();
     if (!isset($_REQUEST['query'])) {
         return array();
     }
     // Make the query string usable.
     $qs = htmlentities($_REQUEST['query'], ENT_QUOTES, 'UTF-8', false);
     $mods = \FreePBX::Modules()->getModulesByMethod("search");
     foreach ($mods as $mod) {
         \modgettext::push_textdomain(strtolower($mod));
         $this->FreePBX->{$mod}->search($qs, $results);
         \modgettext::pop_textdomain();
     }
     // Remove any results from the search that are unneeded.
     foreach ($results as $i => $r) {
         if ($r['type'] == "text" || isset($r['force'])) {
             // Always return text fields that were given back to us, or if the result
             // was forced to display.
             continue;
         }
         // We should try to use UTF-8 sensible matching if possible.
         if (function_exists("mb_stripos")) {
             if (mb_stripos($r['text'], $qs) === false) {
                 // Doesn't match? Remove.
                 unset($results[$i]);
             }
         } else {
             // Use UTF-8 unsafe check.
             if (stripos($r['text'], $qs) === false) {
                 // Doesn't match? Remove.
                 unset($results[$i]);
             }
         }
     }
     return $results;
 }
开发者ID:powerpbx,项目名称:framework,代码行数:37,代码来源:Search.class.php

示例3: languages_hook_core

function languages_hook_core($viewing_itemid, $target_menuid)
{
    $request = $_REQUEST;
    $extension = isset($request['extension']) ? $request['extension'] : '';
    $cidnum = isset($request['cidnum']) ? $request['cidnum'] : '';
    $extdisplay = isset($request['extdisplay']) ? $request['extdisplay'] : '';
    $action = isset($request['action']) ? $request['action'] : '';
    $language = isset($request['language']) ? $request['language'] : '';
    //set $extension,$cidnum if we dont already have them
    if (!$extension && !$cidnum) {
        $opts = explode('/', $extdisplay);
        $extension = $opts['0'];
        $cidnum = isset($opts['1']) ? $opts['1'] : '';
    } else {
        $extension = $extension;
        $cidnum = $cidnum;
    }
    //update if we have enough info
    if ($action == 'edtIncoming' || ($extension != '' || $cidnum != '') && $language != '') {
        languages_incoming_update($language = $language, $extension, $cidnum);
    }
    if ($action == 'delIncoming') {
        languages_incoming_delete($extension, $cidnum);
    }
    $html = '';
    if ($target_menuid == 'did') {
        $html .= '
			<!--Language-->
			<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="language">' . _("Language") . '</label>
									<i class="fa fa-question-circle fpbx-help-icon" data-for="language"></i>
								</div>
								<div class="col-md-9">
		';
        $language = languages_incoming_get($extension, $cidnum);
        if (FreePBX::Modules()->moduleHasMethod('Soundlang', 'getLanguages')) {
            $languages = FreePBX::Soundlang()->getLanguages();
            $html .= '<select class="form-control" id="language" name="language">';
            $html .= '<option value=""' . ($language == "" ? "SELECTED" : "") . '>' . _("Default") . '</option>';
            foreach ($languages as $key => $val) {
                $html .= '<option value="' . $key . '"' . ($language == $key ? "SELECTED" : "") . '>' . $val . '</option>';
            }
            $html .= '</select>';
        } else {
            $html .= '<input type="text" class="form-control" id="language" name="language" value="' . $language . '">';
        }
        $html .= '
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-12">
						<span id="language-help" class="help-block fpbx-help-block">' . _("Allows you to set the language for this DID.") . '</span>
					</div>
				</div>
			</div>
			<!--END Language-->
		';
    }
    return $html;
}
开发者ID:ringfreejohn,项目名称:pbxframework,代码行数:68,代码来源:functions.inc.php

示例4: json_encode

<?php

//	License for all code of this FreePBX module can be found in the license file inside the module directory
//	Copyright 2015 Sangoma Technologies.
//
//
?>
<script>
	var destinations = <?php 
echo json_encode(FreePBX::Modules()->getDestinations());
?>
;
</script>
<div id="toolbar-all">
	<a href="config.php?display=announcement&amp;view=form" class="btn btn-primary"><i class="fa fa-plus"></i> <?php 
echo _('Add');
?>
</a>
</div>
<table data-toolbar="#toolbar-all" data-toggle="table" data-url="ajax.php?module=announcement&amp;command=getJSON&amp;jdata=grid" data-maintain-selected="true" data-show-columns="true" data-show-toggle="true" data-toggle="table" data-pagination="true" data-search="true"  id="table-all">
	<thead>
		<tr>
			<th data-sortable="true" data-field="description"><?php 
echo _("Description");
?>
</th>
			<th data-sortable="true" data-field="post_dest" data-formatter="aDestFormatter"><?php 
echo _("Destination");
?>
</th>
			<th data-field="announcement_id" data-formatter="actionformatter"><?php 
开发者ID:ringfreejohn,项目名称:pbxframework,代码行数:31,代码来源:grid.php

示例5: sql

    $Ucp = FreePBX::create()->Ucp;
    $sql = "SELECT username,password,settings FROM ucp_users";
    $old = sql($sql, 'getAll', DB_FETCHMODE_ASSOC);
    foreach ($old as $user) {
        $assigned = json_decode($user['settings'], true);
        $ret = $userman->addUser($user['username'], $user['password'], 'none', 'User Migrated from UCP', array(), false);
        if ($ret['status']) {
            $userman->setAssignedDevices($ret['id'], $assigned['modules']['Voicemail']['assigned']);
            $userman->setModuleSettingByID($ret['id'], 'ucp|Voicemail', 'assigned', $assigned['modules']['Voicemail']['assigned']);
        }
    }
    $sql = 'DROP TABLE IF EXISTS ucp_users';
    $result = $db->query($sql);
}
switch (true) {
    case FreePBX::Modules()->checkStatus('ucp', MODULE_STATUS_NOTINSTALLED):
        //ok so auto enable UCP for all users
        $ucp = FreePBX::create()->Ucp;
        $ucp->enableAllUsers();
        break;
}
// VIEW_UCP_FOOTER_CONTENT
$set['value'] = 'views/dashfootercontent.php';
$set['defaultval'] =& $set['value'];
$set['readonly'] = 1;
$set['hidden'] = 1;
$set['level'] = 1;
$set['sortorder'] = 355;
$set['module'] = 'ucp';
//This will help delete the settings when module is uninstalled
$set['category'] = 'Styling and Logos';
开发者ID:umjinsun12,项目名称:dngshin,代码行数:31,代码来源:install.php

示例6: loadObject

 /**
  * Find the file for the object
  * @param string $objname The Object Name (same as class name, filename)
  * @param string $hint The location of the Class file
  * @return bool True if found or throws exception
  */
 private function loadObject($objname, $hint = null)
 {
     $objname = str_replace('FreePBX\\modules\\', '', $objname);
     $class = class_exists($this->moduleNamespace . $objname) ? $this->moduleNamespace . $objname : $objname;
     // If it already exists, we're fine.
     if (class_exists($class)) {
         //do reflection tests for ARI junk, we **dont** want to load ARI
         $class = new ReflectionClass($class);
         //this is a stop gap, remove in 13 or 14 when ARI is no longer used
         if (!$class->hasMethod('navMenu') && !$class->hasMethod('rank')) {
             return true;
         }
     }
     // This is the file we loaded the class from, for debugging later.
     $loaded = false;
     if ($hint) {
         if (!file_exists($hint)) {
             throw new Exception(sprintf(_("Attempted to load %s with a hint of %s and it didn't exist"), $objname, $hint));
         } else {
             $try = $hint;
         }
     } else {
         // Does this exist as a default Library inside BMO?
         $try = __DIR__ . "/{$objname}.class.php";
     }
     if (file_exists($try)) {
         include $try;
         $loaded = $try;
     } else {
         // It's a module, hopefully.
         // This is our root to search from
         $path = $this->Config->get_conf_setting('AMPWEBROOT') . "/admin/modules/";
         $active_modules = array_keys(FreePBX::create()->Modules->getActiveModules());
         foreach ($active_modules as $module) {
             // Lets try this one..
             //TODO: this needs to look with dirname not from webroot
             $try = $path . $module . "/{$objname}.class.php";
             if (file_exists($try)) {
                 //Now we need to make sure this is not a revoked module!
                 try {
                     $signature = FreePBX::Modules()->getSignature($module);
                     if (empty($signature['status'])) {
                         $revoked = false;
                     } else {
                         $revoked = $signature['status'] & GPG::STATE_REVOKED;
                     }
                 } catch (\Exception $e) {
                     $revoked = false;
                 }
                 //if revoked then dont load!
                 if (!$revoked) {
                     include $try;
                     $loaded = $try;
                 }
                 break;
             }
         }
     }
     // Right, after all of this we should now have our object ready to create.
     if (!class_exists($class) && !class_exists($this->moduleNamespace . $objname)) {
         // Bad things have happened.
         if (!$loaded) {
             $sobjname = strtolower($objname);
             throw new Exception(sprintf(_("Unable to locate the FreePBX BMO Class '%s'"), $objname) . sprintf(_("A required module might be disabled or uninstalled. Recommended steps (run from the CLI): 1) amportal a ma install %s 2) amportal a ma enable %s"), $sobjname, $sobjname));
             //die_freepbx(sprintf(_("Unable to locate the FreePBX BMO Class '%s'"),$objname), sprintf(_("A required module might be disabled or uninstalled. Recommended steps (run from the CLI): 1) amportal a ma install %s 2) amportal a ma enable %s"),$sobjname,$sobjname));
         }
         // We loaded a file that claimed to represent that class, but didn't.
         throw new Exception(sprintf(_("Attempted to load %s but it didn't define the class %s"), $try, $objname));
     }
     return true;
 }
开发者ID:umjinsun12,项目名称:dngshin,代码行数:77,代码来源:Self_Helper.class.php

示例7: tryEnable

 private function tryEnable($modulename, $force)
 {
     \FreePBX::Modules()->loadAllFunctionsInc();
     if (is_array($errors = $this->mf->enable($modulename, $this->force))) {
         $this->writeln(_("The following error(s) occured:"), "error", false);
         $this->writeln(' - ' . implode("\n - ", $errors), "error", false);
     } else {
         $this->writeln(sprintf(_("Module %s successfully enabled"), $modulename));
     }
 }
开发者ID:powerpbx,项目名称:framework,代码行数:10,代码来源:Moduleadmin.class.php

示例8: _

</span>
					</div>
			</div>
		</div>
		<div class="element-container">
			<div class="row">
				<div class="col-md-3">
					<label class="control-label" for="language"><?php 
echo _("Language Code");
?>
</label>
					<i class="fa fa-question-circle fpbx-help-icon" data-for="language"></i>
				</div>
				<div class="col-md-9">
					<?php 
if (\FreePBX::Modules()->checkStatus("soundlang")) {
    ?>
						<?php 
    $langs = \FreePBX::Soundlang()->getLanguages();
    $langs = is_array($langs) ? $langs : array();
    ?>
						<select name="language" class="form-control">
							<option value=""><?php 
    echo _("Default");
    ?>
</option>
							<?php 
    foreach ($langs as $key => $lang) {
        ?>
								<option value="<?php 
        echo $key;
开发者ID:lidl,项目名称:core,代码行数:31,代码来源:pjsip.php

示例9: runModulesOOBE

 public function runModulesOOBE($modname = false)
 {
     if (!$modname) {
         throw new \Exception("You didn't ask for a module");
     }
     $bmo = FreePBX::create();
     $mod = ucfirst($modname);
     // Firstly. Is that module already loaded? Pretty unlikely
     // at this stage of play..
     if (!class_exists("\\FreePBX\\modules\\{$mod}")) {
         // Unsurprisingly, it didn't. Let's load it.
         // We need to manually load it, as the autoloader WON'T.
         $hint = FreePBX::Config()->get("AMPWEBROOT") . "/admin/modules/{$modname}/{$mod}.class.php";
         $this->injectClass($mod, $hint);
     }
     // Now we can instantiate it
     $obj = FreePBX::$mod();
     // Awesome. Now, what was that oobe function again...?
     $xml = \FreePBX::Modules()->getXML($modname);
     $func = (string) $xml->oobe->attributes()->method;
     // Is someone taking crazy pills?
     if (!method_exists($obj, $func)) {
         // Do not i18n. This is for support, not end users.
         print "I'm sorry. The module {$modname} said that it was providing an OOBE, but when I actually asked it for '{$func}', it didn't exist. ";
         print "Please try again.\n";
         $this->completeOOBE($modname);
         return false;
     }
     // Awesome. Off you go then!
     return $obj->{$func}();
 }
开发者ID:lidl,项目名称:framework,代码行数:31,代码来源:OOBE.class.php

示例10: loadFunctionsInc

 /**
  * Try to load a functions.inc.php if not previously loaded
  * @param  string $module The module rawname
  */
 public function loadFunctionsInc($module)
 {
     if ($this->checkStatus($module)) {
         $path = $this->FreePBX->Config->get("AMPWEBROOT");
         $ifiles = get_included_files();
         $relative = $module . "/functions.inc.php";
         $absolute = $path . "/admin/modules/" . $relative;
         $data = \FreePBX::Modules()->getInfo($module);
         $needs_zend = isset($data[$module]['depends']['phpcomponent']) && stristr($data[$module]['depends']['phpcomponent'], 'zend');
         $licFileExists = glob('/etc/schmooze/license-*.zl');
         $complete_zend = !function_exists('zend_loader_install_license') || empty($licFileExists);
         if (file_exists($absolute)) {
             if ($needs_zend && class_exists('\\Schmooze\\Zend', false) && \Schmooze\Zend::fileIsLicensed($absolute) && $complete_zend) {
                 return false;
             }
             $include = true;
             foreach ($ifiles as $file) {
                 if (strpos($file, $relative) !== false) {
                     $include = false;
                     break;
                 }
             }
             if ($include) {
                 include $absolute;
             }
         }
     }
 }
开发者ID:lidl,项目名称:framework,代码行数:32,代码来源:Modules.class.php

示例11: _

<!--Language Code-->
<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="lang_code"><?php 
echo _("Language Code");
?>
</label>
						<i class="fa fa-question-circle fpbx-help-icon" data-for="lang_code"></i>
					</div>
					<div class="col-md-9">
<?php 
if (FreePBX::Modules()->moduleHasMethod('Soundlang', 'getLanguages')) {
    $languages = FreePBX::Soundlang()->getLanguages();
    ?>
						<select class="form-control" id="lang_code" name="lang_code">
<?php 
    foreach ($languages as $key => $val) {
        ?>
							<option value="<?php 
        echo $key;
        ?>
" <?php 
        echo $key == $lang_code ? "selected" : "";
        ?>
><?php 
        echo $val;
        ?>
开发者ID:ringfreejohn,项目名称:pbxframework,代码行数:31,代码来源:form.php

示例12: core_devices_configpageload

function core_devices_configpageload()
{
    global $currentcomponent;
    global $amp_conf;
    $tech_hardware = isset($_REQUEST['tech_hardware']) ? $_REQUEST['tech_hardware'] : null;
    if ($tech_hardware == 'virtual') {
        return true;
    }
    // Init vars from $_REQUEST[]
    $display = isset($_REQUEST['display']) ? $_REQUEST['display'] : null;
    $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : null;
    $extdisplay = isset($_REQUEST['extdisplay']) ? $_REQUEST['extdisplay'] : null;
    if ($action == 'del') {
        // Deleted
        if ($display != 'extensions') {
            $currentcomponent->addguielem('_top', new gui_subheading('del', $extdisplay . ' ' . _("deleted"), false));
        }
    } elseif ($extdisplay == '' && $tech_hardware == '') {
        // Adding
        if ($display != 'extensions') {
            $currentcomponent->addguielem('_top', new gui_pageheading('title', _("Add Device")), 0);
        } else {
            $currentcomponent->addguielem('_top', new gui_pageheading('title', _("Add an Extension")), 0);
        }
        $currentcomponent->addguielem('_top', new gui_label('instructions', _("Please select your Device below then click Submit")));
        $currentcomponent->addguielem('Device', new gui_selectbox('tech_hardware', $currentcomponent->getoptlist('devicelist'), '', _("Device"), '', false));
    } else {
        $deviceInfo = array();
        if ($extdisplay) {
            // Editing
            $deviceInfo = core_devices_get($extdisplay);
            if ($display != 'extensions') {
                $currentcomponent->addguielem('_top', new gui_pageheading('title', _("Device") . ": {$extdisplay}", false), 0);
                $delURL = '?' . $_SERVER['QUERY_STRING'] . '&action=del';
                $tlabel = sprintf(_("Delete Device %s"), $extdisplay);
                $label = '<span><img width="16" height="16" border="0" title="' . $tlabel . '" alt="" src="images/telephone_delete.png"/>&nbsp;' . $tlabel . '</span>';
                $currentcomponent->addguielem('_top', new gui_link('del', $label, $delURL, true, false), 0);
                if ($deviceInfo['device_user'] != 'none') {
                    $editURL = '?display=users&skip=0&extdisplay=' . $deviceInfo['user'];
                    $tlabel = $deviceInfo['devicetype'] == 'adhoc' ? sprintf(_("Edit Default User: %s"), $deviceInfo['user']) : sprintf(_("Edit Fixed User: %s"), $deviceInfo['user']);
                    $label = '<span><img width="16" height="16" border="0" title="' . $tlabel . '" alt="" src="images/user_edit.png"/>&nbsp;' . $tlabel . '</span>';
                    $currentcomponent->addguielem('_top', new gui_link('edit_user', $label, $editURL, true, false), 0);
                }
            }
        } else {
            $tmparr = explode('_', $tech_hardware);
            $deviceInfo['tech'] = $tmparr[0];
            $deviceInfo['hardware'] = $tmparr[1];
            unset($tmparr);
            if ($display != 'extensions') {
                $currentcomponent->addguielem('_top', new gui_pageheading('title', sprintf(_("Add %s Device"), strtoupper($deviceInfo['tech']))), 0);
            } else {
                $currentcomponent->addguielem('_top', new gui_pageheading('title', sprintf(_("Add %s Extension"), strtoupper($deviceInfo['tech']))), 0);
            }
        }
        // Ensure they exist before the extract
        $devinfo_description = $devinfo_emergency_cid = null;
        $devinfo_devicetype = $devinfo_user = $devinfo_hardware = null;
        $devinfo_tech = null;
        if (is_array($deviceInfo)) {
            extract($deviceInfo, EXTR_PREFIX_ALL, 'devinfo');
        }
        // Setup vars for use in the gui later on
        $fc_logon = featurecodes_getFeatureCode('core', 'userlogon');
        $fc_logoff = featurecodes_getFeatureCode('core', 'userlogoff');
        $msgInvalidDevID = _("Please enter a device id.");
        $msgInvalidDevDesc = _("Please enter a valid Description for this device");
        $msgInvalidEmergCID = _("Please enter a valid Emergency CID");
        $msgInvalidExtNum = _("Please enter a valid extension number.");
        // Actual gui
        $currentcomponent->addguielem('_top', new gui_hidden('action', $extdisplay ? 'edit' : 'add'));
        $currentcomponent->addguielem('_top', new gui_hidden('extdisplay', $extdisplay));
        if ($display != 'extensions') {
            $section = _("Device Info");
            if ($extdisplay) {
                // Editing
                $currentcomponent->addguielem($section, new gui_hidden('deviceid', $extdisplay));
            } else {
                // Adding
                $currentcomponent->addguielem($section, new gui_textbox('deviceid', $extdisplay, _("Device ID"), _("Give your device a unique integer ID.  The device will use this ID to authenticate to the system."), '!isInteger()', $msgInvalidDevID, false));
            }
            $currentcomponent->addguielem($section, new gui_textbox('description', $devinfo_description, _("Description"), _("The CallerID name for this device will be set to this description until it is logged into."), '!isAlphanumeric() || isWhitespace()', $msgInvalidDevDesc, false));
            $currentcomponent->addguielem($section, new gui_textbox('emergency_cid', $devinfo_emergency_cid, _("Emergency CID"), _("This CallerID will always be set when dialing out an Outbound Route flagged as Emergency.  The Emergency CID overrides all other CallerID settings."), '!isCallerID()', $msgInvalidEmergCID));
            $currentcomponent->addguielem($section, new gui_selectbox('devicetype', $currentcomponent->getoptlist('devicetypelist'), $devinfo_devicetype, _("Device Type"), _("Devices can be fixed or adhoc. Fixed devices are always associated to the same extension/user. Adhoc devices can be logged into and logged out of by users.") . ' ' . $fc_logon . ' ' . _("logs into a device.") . ' ' . $fc_logoff . ' ' . _("logs out of a device."), false));
            $currentcomponent->addguielem($section, new gui_selectbox('deviceuser', $currentcomponent->getoptlist('deviceuserlist'), $devinfo_user, _("Default User"), _("Fixed devices will always mapped to this user.  Adhoc devices will be mapped to this user by default.<br><br>If selecting 'New User', a new User Extension of the same Device ID will be set as the Default User."), false));
        } else {
            $section = _("Extension Options");
            $currentcomponent->addguielem($section, new gui_textbox('emergency_cid', $devinfo_emergency_cid, _("Emergency CID"), _("This CallerID will always be set when dialing out an Outbound Route flagged as Emergency.  The Emergency CID overrides all other CallerID settings."), '!isCallerID()', $msgInvalidEmergCID));
        }
        $currentcomponent->addguielem($section, new gui_hidden('tech', $devinfo_tech));
        $currentcomponent->addguielem($section, new gui_hidden('hardware', $devinfo_hardware));
        if ($devinfo_tech && $devinfo_tech != "virtual") {
            $section = _("Device Options");
            $devinfo_techd = $devinfo_tech == 'sip' ? 'CHAN_SIP' : strtoupper($devinfo_tech);
            if (FreePBX::Modules()->moduleHasMethod("sipsettings", "getBinds")) {
                $out = FreePBX::Sipsettings()->getBinds();
                foreach ($out[$devinfo_tech] as $ip => $data1) {
                    foreach ($data1 as $protocol => $port) {
                        $pport .= $ip . ":" . $port . ', ';
                    }
//.........这里部分代码省略.........
开发者ID:umjinsun12,项目名称:dngshin,代码行数:101,代码来源:functions.inc.php

示例13: define

//	Caller ID Tricfecta / Superfecta was invented by Ward Mundy,
//  based on another authors work.
//
//	v 1.0.0 - 1.1.0 Created / coded by Tony Shiffer
//	V 2.0.0 - 2.20 Principle developer Jeremy Jacobs
//  v 2.2.1		Significant development by Patrick ELX
//
//	This program is free software; you can redistribute it and/or modify it
//	under the terms of the GNU General Public License as published by
//	the Free Software Foundation; either version 2 of the License, or
//	(at your option) any later version.
//
//Define our rootpath
define("SUPERFECTA_ROOT_PATH", dirname(__FILE__) . '/');
include __DIR__ . "/includes/superfecta_base.php";
$module_info = FreePBX::Modules()->getInfo("superfecta");
$module_info = $module_info['superfecta'];
switch ($action) {
    case "add":
        $middle = load_view(__DIR__ . '/views/add_scheme.php', array("scheme_data" => FreePBX::Superfecta()->getSchemeDefaults()));
        break;
    case "schemecopy":
        //determine the highest order amount.
        $query = "SELECT MAX(ABS(value)) FROM superfectaconfig WHERE field = 'order'";
        $results = sql($query, "getAll");
        $new_order = $results[0][0] + 1;
        //set new scheme name
        $name_good = false;
        $new_name = $schemecopy . ' copy';
        $new_name_count = 2;
        while (!$name_good) {
开发者ID:klagler,项目名称:Caller-ID-Superfecta,代码行数:31,代码来源:page.superfecta.php

示例14: _

				</div>
			</div>
			<div class="row">
				<div class="col-md-12">
					<span id="maxcallbitrate-help" class="help-block fpbx-help-block"><?php 
echo _("Maximum bitrate for video calls in kb/s");
?>
</span>
				</div>
			</div>
		</div>
		<!--END Max Bit Rate-->
	</div>
</div>
<?php 
if (\FreePBX::Modules()->moduleHasMethod("certman", "getDefaultCertDetails")) {
    ?>
	<div class="section-title" data-for="csiptls"><h3>
		<i class="fa fa-minus"></i> <?php 
    echo _("TLS/SSL/SRTP Settings");
    ?>
</h3>
	</div>
	<div class="section" data-id="csiptls">
		<div class="element-container">
			<div class="row">
				<div class="form-group">
					<div class="col-md-3">
						<label class="control-label" for="tlsenable"><?php 
    echo _("Enable TLS");
    ?>
开发者ID:ringfreejohn,项目名称:pbxframework,代码行数:31,代码来源:chansip.page.php

示例15: foreach

    $set['defaultval'] = false;
    $set['readonly'] = 0;
    $set['hidden'] = 0;
    $set['level'] = 3;
    $set['module'] = 'cdr';
    $set['category'] = 'CDR Report Module';
    $set['emptyok'] = 0;
    $set['sortorder'] = 10;
    $set['name'] = 'Enable CEL Reporting';
    $set['description'] = 'Setting this true will enable the CDR module to drill down on CEL data for each CDR. Although the CDR module will assure there is a CEL table available, the reporting functionality in Asterisk and associated ODBC database and CEL configuration must be done outside of FreePBX either by the user or at the Distro level.';
    $set['type'] = CONF_TYPE_BOOL;
    $freepbx_conf->define_conf_setting('CEL_ENABLED', $set, true);
}
$info = FreePBX::Modules()->getInfo("cdr");
if (version_compare_freepbx($info['cdr']['dbversion'], "12.0.13", "<=")) {
    if (FreePBX::Modules()->checkStatus('ucp') && FreePBX::Modules()->checkStatus('userman')) {
        $users = FreePBX::Userman()->getAllUsers();
        foreach ($users as $user) {
            $exts = FreePBX::Ucp()->getSetting($user['username'], 'Settings', 'assigned');
            if (!empty($exts)) {
                FreePBX::Ucp()->setSetting($user['username'], 'Cdr', 'assigned', $exts);
            }
        }
    } elseif (FreePBX::Modules()->checkStatus('ucp', MODULE_STATUS_NEEDUPGRADE)) {
        out(_("Please upgrade UCP before this module so that settings can be properly migrated"));
        return false;
    } elseif (FreePBX::Modules()->checkStatus('userman', MODULE_STATUS_NEEDUPGRADE)) {
        out(_("Please upgrade Usermanager before this module so that settings can be properly migrated"));
        return false;
    }
}
开发者ID:umjinsun12,项目名称:dngshin,代码行数:31,代码来源:install.php


注:本文中的FreePBX::Modules方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。