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


PHP paloForm类代码示例

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


在下文中一共展示了paloForm类的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: _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

示例4: 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

示例5: 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

示例6: 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

示例7: 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

示例8: 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"]);
    //Codigo para tomar en cuenta el nombre de applets para los archivos de idioma
    foreach ($arrApplets as &$applet) {
        $applet['name'] = _tr($applet['name']);
    }
    unset($applet);
    //
    $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("checkall", $arrLang["Check All"]);
    $smarty->assign("icon", "modules/{$module_name}/images/system_dashboard_applet_admin.png");
    //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'];
    $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:hardikk,项目名称:HNH,代码行数:29,代码来源: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: formTime

function formTime($smarty, $module_name, $local_templates_dir, $sZonaActual)
{
    $smarty->assign("TIME_TITULO", _tr("Date and Time Configuration"));
    $smarty->assign("INDEX_HORA_SERVIDOR", _tr("Current Datetime"));
    $smarty->assign("TIME_NUEVA_FECHA", _tr("New Date"));
    $smarty->assign("TIME_NUEVA_HORA", _tr("New Time"));
    $smarty->assign("TIME_NUEVA_ZONA", _tr("New Timezone"));
    $smarty->assign("INDEX_ACTUALIZAR", _tr("Apply changes"));
    $smarty->assign("TIME_MSG_1", _tr("The change of date and time can concern important  system processes.") . '  ' . _tr("Are you sure you wish to continue?"));
    $arrForm = array();
    $oForm = new paloForm($smarty, $arrForm);
    /*
        Para cambiar la zona horaria:
        1)	Abrir y mostrar columna 3 de /usr/share/zoneinfo/zone.tab que muestra todas las zonas horarias.
        2)	Al elegir fila de columna 3, verificar que sea de la forma abc/def y que
            existe el directorio /usr/share/zoneinfo/abc/def . Pueden haber N elementos
            en la elección, separados por / , incluyendo uno solo (sin / alguno)
        3)	Si existe /etc/localtime, borrarlo
        4)	Copiar archivo /usr/share/zoneinfo/abc/def a /etc/localtime
        5)	Si existe /var/spool/postfix/etc/localtime , removerlo y sobreescribr
            con el mismo archivo copiado a /etc/localtime
            
        Luego de esto, ejecutar cambio de hora local
    */
    $listaZonas = leeZonas();
    // Cargar de /etc/sysconfig/clock la supuesta zona horaria configurada.
    // El resto de contenido del archivo se preserva, y la clave ZONE se
    // escribirá como la última línea en caso de actualizar
    $sZonaActual = "America/New_York";
    $infoZona = NULL;
    $hArchivo = fopen('/etc/sysconfig/clock', 'r');
    if ($hArchivo) {
        $infoZona = array();
        while (!feof($hArchivo)) {
            $s = fgets($hArchivo);
            $regs = NULL;
            if (ereg('^ZONE="(.*)"', $s, $regs)) {
                $sZonaActual = $regs[1];
            } else {
                $infoZona[] = $s;
            }
        }
        fclose($hArchivo);
    }
    $sContenido = '';
    $mes = date("m", time());
    $mes = (int) $mes - 1;
    $smarty->assign("CURRENT_DATETIME", strftime("%Y,{$mes},%d,%H,%M,%S", time()));
    $smarty->assign('LISTA_ZONAS', $listaZonas);
    $smarty->assign('ZONA_ACTUAL', $sZonaActual);
    $smarty->assign("CURRENT_DATE", strftime("%d %b %Y", time()));
    $smarty->assign("icon", "web/apps/{$module_name}/images/system_preferences_datetime.png");
    $sContenido .= $oForm->fetchForm("{$local_templates_dir}/time.tpl", _tr('Date and Time Configuration'), $_POST);
    return $sContenido;
}
开发者ID:lordbasex,项目名称:elastix-gui,代码行数:55,代码来源:index.php

示例12: _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

示例13: 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

示例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: 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


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