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


PHP paloForm::fetchForm方法代码示例

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


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

示例1: showExtensionSettings

function showExtensionSettings($smarty, $module_name, $local_templates_dir, &$pDB, $arrConf)
{
    global $arrCredentials;
    $pMyExten = new paloMyExten($pDB, $arrCredentials['idUser']);
    if (getParameter('action') == 'save') {
        $my_exten = $_POST;
    } else {
        $my_exten = $pMyExten->getMyExtension();
    }
    if ($my_exten == false) {
        $smarty->assign("MSG_ERROR_FIELD", $pMyExten->getErrorMsg());
    }
    $smarty->assign("DISPLAY_NAME_LABEL", _tr("Display Name CID:"));
    $smarty->assign("clid_name", $my_exten['clid_name']);
    $smarty->assign("DISPLAY_EXT_LABEL", _tr("Extension number:"));
    $smarty->assign("DISPLAY_DEVICE_LABEL", _tr("Device:"));
    $smarty->assign("device", $my_exten['device']);
    $smarty->assign("extension", $my_exten['extension']);
    $smarty->assign("DISPLAY_CFC_LABEL", _tr("Call Forward Configuration"));
    $smarty->assign("DISPLAY_CMS_LABEL", _tr("Call Monitor Settings"));
    $smarty->assign("DISPLAY_VOICEMAIL_LABEL", _tr("Voicemail Configuration"));
    //$smarty->assign("SAVE_CONF_BTN",_tr("Save Configuration"));
    // $smarty->assign("CANCEL_BTN",_tr("Cancel"));
    //contiene los elementos del formulario
    $arrForm = createForm();
    $oForm = new paloForm($smarty, $arrForm);
    $html = $oForm->fetchForm("{$local_templates_dir}/form.tpl", _tr('extension'), $my_exten);
    $contenidoModulo = "<div><form  method='POST' style='margin-bottom:0;' name='{$module_name}' id='{$module_name}' action='?menu={$module_name}'>" . $html . "</form></div>";
    return $contenidoModulo;
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:30,代码来源:index.php

示例2: showConfigs

function showConfigs($smarty, $module_name, $local_templates_dir, $pDB, $arrCredentials)
{
    global $arrPermission;
    $fMaster = new paloFaxMaster($pDB);
    $arrForm = fieldFrorm();
    $oForm = new paloForm($smarty, $arrForm);
    $oForm->setEditMode();
    $smarty->assign("EDIT", in_array('edit', $arrPermission));
    if (getParameter("save_default")) {
        $arrDefault['fax_master'] = $_POST['fax_master'];
    } else {
        //obtener el valor de la tarifa por defecto
        $arrDefault['fax_master'] = $fMaster->getFaxMaster();
        if ($arrDefault['fax_master'] === false) {
            $smarty->assign("mb_title", "ERROR");
            $smarty->assign("mb_message", _tr("An error has ocurred to retrieved configuration.") . " " . $fMaster->getErrorMsg());
            $arrDefault['fax_master'] = '';
        }
    }
    $smarty->assign("FAXMASTER_MSG", _tr("Write the email address which will receive the notifications of received messages, errors and activity summary of the Fax Server"));
    $smarty->assign("icon", "web/apps/{$module_name}/images/fax_fax_master.png");
    $smarty->assign("APPLY_CHANGES", _tr("Save"));
    $smarty->assign("REQUIRED_FIELD", _tr("Required field"));
    $strReturn = $oForm->fetchForm("{$local_templates_dir}/fax_master.tpl", _tr("Fax Master Configuration"), $arrDefault);
    return $strReturn;
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:26,代码来源:index.php

示例3: viewFormEmailRelay

function viewFormEmailRelay($smarty, $module_name, $local_templates_dir, &$pDB, $arrConf)
{
    $pEmailRelay = new paloSantoEmailRelay($pDB);
    if (isset($_POST) && count($_POST) > 0) {
        $_DATA = $_POST;
    } else {
        $_DATA = $pEmailRelay->getMainConfigByAll();
    }
    $activated = $pEmailRelay->getStatus();
    if ($activated === "on") {
        $_DATA['status'] = "on";
    } else {
        $_DATA['status'] = "off";
        $_DATA['SMTP_Server'] = "custom";
    }
    $smarty->assign("CONFIGURATION_UPDATE", _tr('Save'));
    $smarty->assign("ENABLED", _tr("Enabled"));
    $smarty->assign("DISABLED", _tr("Disabled"));
    $smarty->assign("ENABLE", _tr("Enable"));
    $smarty->assign("DISABLE", _tr("Disable"));
    $smarty->assign("REQUIRED_FIELD", _tr("Required field"));
    $smarty->assign("STATUS", _tr('Status'));
    $smarty->assign("MSG_REMOTE_SMTP", _tr('Message Remote SMTP Server'));
    $smarty->assign("MSG_REMOTE_AUT", _tr('Message Remote Autentification'));
    $smarty->assign("icon", "../web/_common/images/list.png");
    $smarty->assign("Example", _tr("Ex"));
    $smarty->assign("lbldomain", _tr("Domain"));
    $arrFormEmailRelay = createFieldForm();
    $oForm = new paloForm($smarty, $arrFormEmailRelay);
    $htmlForm = $oForm->fetchForm("{$local_templates_dir}/form.tpl", _tr("Remote SMTP Delivery"), $_DATA);
    return "<form method='POST' style='margin-bottom:0; action='?menu={$module_name}'>" . $htmlForm . "</form>";
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:32,代码来源:index.php

示例4: _moduleContent

function _moduleContent(&$smarty, $module_name)
{
    //include module files
    include_once "modules/{$module_name}/configs/default.conf.php";
    $lang = get_language();
    $base_dir = dirname($_SERVER['SCRIPT_FILENAME']);
    $lang_file = "modules/{$module_name}/lang/{$lang}.lang";
    if (file_exists("{$base_dir}/{$lang_file}")) {
        include_once "{$lang_file}";
    } else {
        include_once "modules/{$module_name}/lang/en.lang";
    }
    //global variables
    global $arrConf;
    global $arrConfModule;
    global $arrLang;
    global $arrLangModule;
    $arrConf = array_merge($arrConf, $arrConfModule);
    $arrLang = array_merge($arrLang, $arrLangModule);
    //folder path for custom templates
    $base_dir = dirname($_SERVER['SCRIPT_FILENAME']);
    $templates_dir = isset($arrConf['templates_dir']) ? $arrConf['templates_dir'] : 'themes';
    $local_templates_dir = "{$base_dir}/modules/{$module_name}/" . $templates_dir . '/' . $arrConf['theme'];
    $formCampos = array();
    $txtCommand = isset($_POST['txtCommand']) ? $_POST['txtCommand'] : '';
    $oForm = new paloForm($smarty, $formCampos);
    $smarty->assign("asterisk", "Asterisk CLI");
    $smarty->assign("command", $arrLang["Command"]);
    $smarty->assign("txtCommand", htmlspecialchars($txtCommand));
    $smarty->assign("execute", $arrLang["Execute"]);
    $smarty->assign("icon", "modules/{$module_name}/images/pbx_tools_asterisk_cli.png");
    $result = "";
    if (!isBlank($txtCommand)) {
        $result = "<pre>";
        putenv("TERM=vt100");
        putenv("PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin");
        putenv("SCRIPT_FILENAME=" . strtok(stripslashes($txtCommand), " "));
        /* PHP scripts */
        $badchars = array("'", "`", "\\", ";", "\"");
        // Strip off any nasty chars.
        $fixedcmd = str_replace($badchars, "", $txtCommand);
        $ph = popen(stripslashes("asterisk -nrx \"{$fixedcmd}\""), "r");
        while ($line = fgets($ph)) {
            $result .= htmlspecialchars($line);
        }
        pclose($ph);
        $result .= "</pre>";
    }
    if ($result == "") {
        $result = "&nbsp;";
    }
    $smarty->assign("RESPUESTA_SHELL", $result);
    $contenidoModulo = $oForm->fetchForm("{$local_templates_dir}/new.tpl", $arrLang["Asterisk-Cli"], $_POST);
    return $contenidoModulo;
}
开发者ID:hardikk,项目名称:HNH,代码行数:55,代码来源:index.php

示例5: viewFormOverall_setting

function viewFormOverall_setting($smarty, $module_name, $local_templates_dir, &$pDB, $arrConf)
{
    $pOverall_setting = new paloSantoOverall_setting($pDB);
    $oForm = new paloForm($smarty);
    $smarty->assign("icon", "images/list.png");
    // get data
    $result = $pOverall_setting->getNotification();
    $smarty->assign("message", $result[0]['message']);
    $smarty->assign("isActive", $result[0]['isActive']);
    $content = $oForm->fetchForm("{$local_templates_dir}/form.tpl", "Thiết lập hệ thống");
    return $content;
}
开发者ID:hardikk,项目名称:HNH,代码行数:12,代码来源:index.php

示例6: display_form

function display_form($smarty, $module_name, $local_templates_dir)
{
    require_once "libs/paloSantoForm.class.php";
    if (getParameter('csvupload') != '') {
        upload_csv($smarty, $module_name);
    }
    if (getParameter('delete_all') != '') {
        delete_extensions($smarty, $module_name);
    }
    $smarty->assign(array('MODULE_NAME' => $module_name, 'LABEL_FILE' => _tr("File"), 'LABEL_UPLOAD' => _tr('Save'), 'LABEL_DOWNLOAD' => _tr("Download Extensions"), 'LABEL_DELETE' => _tr('Delete All Extensions'), 'CONFIRM_DELETE' => _tr("Are you really sure you want to delete all the extensions in this server?"), 'HeaderFile' => _tr("Header File Extensions Batch"), 'AboutUpdate' => _tr("About Update Extensions Batch")));
    $oForm = new paloForm($smarty, array());
    return $oForm->fetchForm("{$local_templates_dir}/extension.tpl", _tr('Extensions Batch'), $_POST);
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:13,代码来源:index.php

示例7: viewFormInstant_Messaging

function viewFormInstant_Messaging($smarty, $module_name, $local_templates_dir, $arrConf)
{
    $smarty->assign("icon", "modules/{$module_name}/images/instant_messaging.png");
    $smarty->assign("imess1_img", "modules/{$module_name}/images/spark.jpg");
    $smarty->assign("tag_manuf_description", _tr("Manufacturer Description"));
    $smarty->assign("download_link", _tr("Download Link"));
    $smarty->assign("tag_manufacturer", _tr("Manufacturer"));
    $smarty->assign("imess1_software_description", _tr("spark_software_description"));
    $smarty->assign("imess1_manufacturer_description", _tr("spark_manufacturer_description"));
    $oForm = new paloForm($smarty, array());
    $content = $oForm->fetchForm("{$local_templates_dir}/form.tpl", _tr("Instant Messaging"));
    return $content;
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:13,代码来源:index.php

示例8: viewFormSoftphones

function viewFormSoftphones($smarty, $module_name, $local_templates_dir, $arrConf)
{
    $smarty->assign("icon", "modules/{$module_name}/images/softphones.png");
    $smarty->assign("xlite_img", "modules/{$module_name}/images/x-lite-4-lrg.png");
    $smarty->assign("zoiper_img", "modules/{$module_name}/images/zoiper.png");
    $smarty->assign("tag_manuf_description", _tr("Manufacturer Description"));
    $smarty->assign("download_link", _tr("Download Link"));
    $smarty->assign("tag_manufacturer", _tr("Manufacturer"));
    $smarty->assign("xlite_software_description", _tr("xlite_software_description"));
    $smarty->assign("xlite_manufacturer_description", _tr("xlite_manufacturer_description"));
    $smarty->assign("zoiper_software_description", _tr("zoiper_software_description"));
    $smarty->assign("zoiper_manufacturer_description", _tr("zoiper_manufacturer_description"));
    $oForm = new paloForm($smarty, array());
    $content = $oForm->fetchForm("{$local_templates_dir}/form.tpl", _tr("Softphones"), array());
    return $content;
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:16,代码来源:index.php

示例9: viewFormFax_Utilities

function viewFormFax_Utilities($smarty, $module_name, $local_templates_dir, $arrConf)
{
    $smarty->assign("icon", "modules/{$module_name}/images/fax_utilities.png");
    $smarty->assign("fax1_img", "modules/{$module_name}/images/jhylafax.jpg");
    $smarty->assign("fax2_img", "modules/{$module_name}/images/winprinthylafax.jpg");
    $smarty->assign("tag_manuf_description", _tr("Manufacturer Description"));
    $smarty->assign("download_link", _tr("Download Link"));
    $smarty->assign("tag_manufacturer", _tr("Manufacturer"));
    $smarty->assign("fax1_software_description", _tr("jhylafax_software_description"));
    $smarty->assign("fax1_manufacturer_description", _tr("jhylafax_manufacturer_description"));
    $smarty->assign("fax2_software_description", _tr("winprint_software_description"));
    $smarty->assign("fax2_manufacturer_description", _tr("winprint_manufacturer_description"));
    $oForm = new paloForm($smarty, array());
    $content = $oForm->fetchForm("{$local_templates_dir}/form.tpl", _tr("Fax Utilities"), array());
    return $content;
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:16,代码来源:index.php

示例10: viewFormFestival

function viewFormFestival($smarty, $module_name, $local_templates_dir, $arrConf)
{
    $pFestival = new paloSantoFestival();
    $arrFormFestival = createFieldForm();
    $oForm = new paloForm($smarty, $arrFormFestival);
    $_DATA = $_POST;
    if ($pFestival->isFestivalActivated()) {
        $_DATA["status"] = "on";
    } else {
        $_DATA["status"] = "off";
    }
    $smarty->assign("SAVE", _tr("Save"));
    $smarty->assign("icon", "web/apps/{$module_name}/images/pbx_tools_festival.png");
    $htmlForm = $oForm->fetchForm("{$local_templates_dir}/form.tpl", _tr("Festival"), $_DATA);
    $content = "<form  method='POST' style='margin-bottom:0;' action='?menu={$module_name}'>" . $htmlForm . "</form>";
    return $content;
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:17,代码来源:index.php

示例11: _moduleContent

function _moduleContent(&$smarty, $module_name)
{
    global $arrConf;
    //folder path for custom templates
    $local_templates_dir = getWebDirModule($module_name);
    $txtCommand = isset($_POST['txtCommand']) ? trim($_POST['txtCommand']) : '';
    $oForm = new paloForm($smarty, array());
    $smarty->assign(array('asterisk' => _tr('Asterisk CLI'), 'command' => _tr('Command'), 'txtCommand' => htmlspecialchars($txtCommand), 'execute' => _tr('Execute'), 'icon' => "web/apps/{$module_name}/images/pbx_tools_asterisk_cli.png"));
    $result = "";
    if (!empty($txtCommand)) {
        $output = $retval = NULL;
        exec("/usr/sbin/asterisk -rnx " . escapeshellarg($txtCommand), $output, $retval);
        $result = '<pre>' . implode("\n", array_map('htmlspecialchars', $output)) . '</pre>';
    }
    if ($result == "") {
        $result = "&nbsp;";
    }
    $smarty->assign("RESPUESTA_SHELL", $result);
    return $oForm->fetchForm("{$local_templates_dir}/new.tpl", _tr('Asterisk-Cli'), $_POST);
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:20,代码来源:index.php

示例12: formCurrency

function formCurrency($smarty, $module_name, $local_templates_dir, &$pDB, $arrConf)
{
    global $arrPermission;
    $arrFormCurrency = createFieldForm();
    $oForm = new paloForm($smarty, $arrFormCurrency);
    //CARGAR CURRENCY GUARDADO
    $curr = loadCurrentCurrency($pDB);
    if ($curr == false) {
        $curr = "\$";
    }
    $smarty->assign("SAVE", _tr("Save"));
    $smarty->assign("REQUIRED_FIELD", _tr("Required field"));
    $smarty->assign("icon", "web/apps/{$module_name}/images/system_preferences_currency.png");
    $_POST['currency'] = $curr;
    if (in_array('edit', $arrPermission)) {
        $smarty->assign('EDIT_CURR', true);
    }
    $htmlForm = $oForm->fetchForm("{$local_templates_dir}/form.tpl", _tr("Currency"), $_POST);
    $contenidoModulo = "<form  method='POST' style='margin-bottom:0;' action='?menu={$module_name}'>" . $htmlForm . "</form>";
    return $contenidoModulo;
}
开发者ID:lordbasex,项目名称:elastix-gui,代码行数:21,代码来源:index.php

示例13: showApplets_Admin

function showApplets_Admin($module_name)
{
    global $smarty;
    global $arrLang;
    global $arrConf;
    $pAppletAdmin = new paloSantoAppletAdmin();
    $oForm = new paloForm($smarty, array());
    $arrApplets = $pAppletAdmin->getApplets_User($_SESSION["elastix_user"]);
    $smarty->assign("applets", $arrApplets);
    $smarty->assign("SAVE", $arrLang["Save"]);
    $smarty->assign("CANCEL", $arrLang["Cancel"]);
    $smarty->assign("Applet", $arrLang["Applet"]);
    $smarty->assign("Activated", $arrLang["Activated"]);
    $smarty->assign("icon", "web/apps/{$module_name}/images/system_dashboard_applet_admin.png");
    setActionTPL();
    //folder path for custom templates
    //folder path for custom templates
    $local_templates_dir = getWebDirModule($module_name);
    $htmlForm = $oForm->fetchForm("{$local_templates_dir}/applet_admin.tpl", $arrLang["Dashboard Applet Admin"], $_POST);
    $content = "<form  method='POST' style='margin-bottom:0;' action='?menu={$module_name}'>" . $htmlForm . "</form>";
    return $content;
}
开发者ID:lordbasex,项目名称:elastix-gui,代码行数:22,代码来源:index.php

示例14: formThemes

function formThemes($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $uid)
{
    global $arrPermission;
    if (!empty($pDB->errMsg)) {
        $smarty->assign("mb_message", _tr("Error when connecting to database") . "<br/>" . $pDB->errMsg);
    }
    // Definición del formulario de nueva campaña
    $smarty->assign("REQUIRED_FIELD", _tr("Required field"));
    $smarty->assign("CHANGE", _tr("Save"));
    $smarty->assign("icon", "web/apps/{$module_name}/images/system_preferences_themes.png");
    $oThemes = new PaloSantoThemes($pDB);
    $arr_themes = $oThemes->getThemes("/var/www/html/admin/web/themes/");
    $formThemes = createFieldForm($arr_themes);
    $oForm = new paloForm($smarty, $formThemes);
    if (in_array('edit', $arrPermission)) {
        $smarty->assign('EDIT_THEME', true);
    }
    $tema_actual = $oThemes->getThemeActual($uid);
    $arrTmp['themes'] = $tema_actual;
    $contenidoModulo = $oForm->fetchForm("{$local_templates_dir}/new.tpl", _tr("Change Theme"), $arrTmp);
    return $contenidoModulo;
}
开发者ID:lordbasex,项目名称:elastix-gui,代码行数:22,代码来源:index.php

示例15: array

 function handleJSON_registerform($smarty, $module_name, $appletlist)
 {
     $respuesta = array('status' => 'success', 'message' => '(no message)');
     $smarty->assign(array("SAVE" => _tr("Save"), "CANCEL" => _tr("Cancel"), "Card_Register" => _tr("Card Register"), 'MSG_UNREGISTERED' => _tr('Card has not been Registered')));
     $oForm = new paloForm($smarty, $this->_getFormFields());
     if (isset($_REQUEST['hwd'])) {
         $db = $this->_getdb();
         $tupla = $db->getFirstRowQuery('SELECT * FROM car_system WHERE hwd = ?', TRUE, array($_REQUEST['hwd']));
         if (is_array($tupla) && count($tupla) > 0) {
             $_REQUEST['vendor'] = $tupla['vendor'];
             $_REQUEST['num_serie'] = $tupla['num_serie'];
             if (!empty($tupla['num_serie'])) {
                 // Tarjeta ya ha sido registrada
                 $oForm->setViewMode();
             }
         }
     }
     $local_templates_dir = dirname($_SERVER['SCRIPT_FILENAME']) . "/modules/{$module_name}/applets/TelephonyHardware/tpl";
     $respuesta['title'] = _tr('Card Register');
     $respuesta['html'] = $oForm->fetchForm("{$local_templates_dir}/_register.tpl", $respuesta['title'], $_REQUEST);
     $json = new Services_JSON();
     Header('Content-Type: application/json');
     return $json->encode($respuesta);
 }
开发者ID:hardikk,项目名称:HNH,代码行数:24,代码来源:index.php


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