本文整理汇总了PHP中paloForm类的典型用法代码示例。如果您正苦于以下问题:PHP paloForm类的具体用法?PHP paloForm怎么用?PHP paloForm使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了paloForm类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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 = " ";
}
$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 = " ";
}
$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
示例16: formLanguage
function formLanguage($smarty, $module_name, $local_templates_dir, $arrConf, $pACL, $uid)
{
global $arrPermission;
$lang = get_language();
$error_msg = '';
$archivos = array();
$langElastix = array();
$contenido = '';
$msgError = '';
$arrDefaultRate = array();
$conexionDB = FALSE;
include "configs/languages.conf.php";
//este archivo crea el arreglo language que contine los idiomas soportados
//por elastix
leer_directorio("/usr/share/elastix/lang", $error_msg, $archivos);
if (count($archivos) > 0) {
foreach ($languages as $lang => $lang_name) {
if (in_array("{$lang}.lang", $archivos)) {
$langElastix[$lang] = $lang_name;
}
}
}
if (count($langElastix) > 0) {
$arrFormLanguage = createFieldForm($langElastix);
$oForm = new paloForm($smarty, $arrFormLanguage);
if (empty($pACL->errMsg)) {
$conexionDB = TRUE;
} else {
$msgError = _tr("You can't change language") . '.-' . _tr("ERROR") . ":" . $pACL->errMsg;
}
// $arrDefaultRate['language']="es";
$smarty->assign("CAMBIAR", _tr("Save"));
$smarty->assign("MSG_ERROR", $msgError);
$smarty->assign("conectiondb", $conexionDB);
$smarty->assign("icon", "web/apps/{$module_name}/images/system_preferencies_language.png");
if (in_array('edit', $arrPermission)) {
$smarty->assign('EDIT_LANG', true);
}
//obtener el valor del lenguage por defecto
$defLang = $pACL->getUserProp($uid, 'language');
if (empty($defLang) || $defLang === false) {
$defLang = "en";
}
$arrDefault['language'] = $defLang;
$htmlForm = $oForm->fetchForm("{$local_templates_dir}/language.tpl", _tr("Language"), $arrDefault);
$contenido = "<form method='POST' style='margin-bottom:0;' action='?menu={$module_name}'>" . $htmlForm . "</form>";
}
return $contenido;
}
开发者ID:lordbasex,项目名称:elastix-gui,代码行数:49,代码来源:index.php
示例17: formCurrency
function formCurrency($smarty, $module_name, $local_templates_dir, &$pDB, $arrConf, $arrLang)
{
$pCurrency = new paloSantoCurrency($pDB);
$arrFormCurrency = createFieldForm($arrLang);
$oForm = new paloForm($smarty, $arrFormCurrency);
//CARGAR CURRENCY GUARDADO
$curr = loadCurrentCurrency($pDB);
if ($curr == false) {
$curr = "\$";
}
$smarty->assign("SAVE", $arrLang["Save"]);
$smarty->assign("REQUIRED_FIELD", $arrLang["Required field"]);
$smarty->assign("icon", "modules/{$module_name}/images/system_preferences_currency.png");
$_POST['currency'] = $curr;
$htmlForm = $oForm->fetchForm("{$local_templates_dir}/form.tpl", $arrLang["Currency"], $_POST);
$contenidoModulo = "<form method='POST' style='margin-bottom:0;' action='?menu={$module_name}'>" . $htmlForm . "</form>";
return $contenidoModulo;
}
开发者ID:hardikk,项目名称:HNH,代码行数:18,代码来源:index.php
示例18: new_module
function new_module($smarty, $module_name, $local_templates_dir, $arrLangModule, &$pDB_acl)
{
require_once 'libs/paloSantoACL.class.php';
global $arrConfig;
$pACL = new paloACL($pDB_acl);
$groups = $pACL->getGroups();
$ip = $_SERVER["SERVER_ADDR"];
foreach ($groups as $value) {
$arrGroups[$value[0]] = $value[1];
}
$arrFormElements = array("group_permissions" => array("LABEL" => $arrLangModule["Group Permission"], "REQUIRED" => "yes", "INPUT_TYPE" => "SELECT", "INPUT_EXTRA_PARAM" => $arrGroups, "VALIDATION_TYPE" => "text", "VALIDATION_EXTRA_PARAM" => "", "EDITABLE" => "no", "SIZE" => "3", "MULTIPLE" => true));
$oForm = new paloForm($smarty, $arrFormElements);
$smarty->assign("SAVE", $arrLangModule["Save"]);
$smarty->assign("REQUIRED_FIELD", $arrLangModule["Required field"]);
$smarty->assign("general_information", $arrLangModule["General Information"]);
$smarty->assign("location", $arrLangModule["Location"]);
$smarty->assign("module_description", $arrLangModule["Module Description"]);
$smarty->assign("option_type", $arrConfig['arr_type']);
$smarty->assign("email", $arrLangModule["Your e-mail"]);
$smarty->assign("module_name_label", $arrLangModule["Module Name"]);
$smarty->assign("id_module_label", $arrLangModule["Module Id"]);
$smarty->assign("arrGroups", $arrGroups);
$smarty->assign("your_name_label", $arrLangModule["Your Name"]);
$smarty->assign("module_type", $arrLangModule["Module Type"]);
$smarty->assign("type_grid", $arrLangModule["Grid"]);
$smarty->assign("type_form", $arrLangModule["Form"]);
$smarty->assign("type_framed", $arrLangModule["Framed"]);
$smarty->assign("Field_Name", $arrLangModule["Field Name"]);
$smarty->assign("Type_Field", $arrLangModule["Type Field"]);
$smarty->assign("Url", $arrLangModule["Url"]);
$smarty->assign("level_2", $arrLangModule["Level 2"]);
$smarty->assign("level_3", $arrLangModule["Level 3"]);
$smarty->assign("parent_1_exists", $arrLangModule["Level 1 Parent Exists"]);
$smarty->assign("parent_2_exists", $arrLangModule["Level 2 Parent Exists"]);
$smarty->assign("peYes", $arrLangModule["Yes"]);
$smarty->assign("peNo", $arrLangModule["No"]);
$smarty->assign("module_level", $arrLangModule["Module Level"]);
$smarty->assign("level_1_parent_name", $arrLangModule["Level 1 Parent Name"]);
$smarty->assign("level_1_parent_id", $arrLangModule["Level 1 Parent Id"]);
$smarty->assign("icon", "modules/{$module_name}/images/developer.png");
$html = $oForm->fetchForm("{$local_templates_dir}/new_module.tpl", $arrLangModule["Build Module"], $_POST);
//$contenidoModulo = "<form method='POST' style='margin-bottom:0;' action='?menu=$module_name'>".$html."</form>";
return $html;
}
开发者ID:hardikk,项目名称:HNH,代码行数:44,代码来源:index.php
示例19: viewFormMemberList
function viewFormMemberList($smarty, $module_name, $local_templates_dir, &$pDB, $arrConf, $credentials)
{
$pEmailList = new paloSantoEmailList($pDB);
$id_emailList = getParameter("id");
if ($credentials['userlevel'] == 'superadmin') {
$emailList = $pEmailList->getEmailList($id_emailList);
} else {
$emailList = $pEmailList->getEmailList($id_emailList, $credentials['domain']);
}
if ($emailList == false) {
$smarty->assign("mb_title", _tr("Error"));
$error = $emailList === false ? _tr("Couldn't be retrieved Email List data") : _tr("Email List does not exist");
$smarty->assign("mb_message", $error);
return reportEmailList($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $credentials);
}
$title = _tr("New List Member");
$smarty->assign("MEMBER", "save_newMember");
$info = _tr("You must enter each email line by line, like the following") . ":<br /><br /><b>" . _tr("[email protected]") . "<br />" . _tr("[email protected]") . "<br />" . _tr("[email protected]") . "</b><br /><br />" . _tr("You can also enter a name for each email, like the following") . ":<br /><br /><b>" . _tr("Name1 Lastname1 <[email protected]>") . "<br />" . _tr("Name2 Lastname2 <[email protected]>") . "<br />" . _tr("Name3 Lastname3 <[email protected]>") . "</b>";
$smarty->assign("SAVE", _tr("Add"));
$smarty->assign("IDEMAILLIST", $id_emailList);
$smarty->assign("ACTION", 'view_memberlist');
$arrFormMemberlist = createFieldFormMember();
$oForm = new paloForm($smarty, $arrFormMemberlist);
$smarty->assign("REQUIRED_FIELD", _tr("Required field"));
$smarty->assign("CANCEL", _tr("Cancel"));
$smarty->assign("INFO", $info);
$smarty->assign("icon", "web/apps/{$module_name}/images/email.png");
$htmlForm = $oForm->fetchForm("{$local_templates_dir}/form_member.tpl", $title, $_POST);
$content = "<form method='POST' style='margin-bottom:0;' action='?menu={$module_name}'>" . $htmlForm . "</form>";
return $content;
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:31,代码来源:index.php
示例20: listRepositories
function listRepositories($smarty, $module_name, $local_templates_dir, $arrConf)
{
global $arrLang;
$oRepositories = new PaloSantoRepositories();
$arrReposActivos = array();
$typeRepository = getParameter("typeRepository");
if (isset($_POST['submit_aceptar'])) {
foreach ($_POST as $key => $value) {
if (substr($key, 0, 5) == 'repo-') {
$arrReposActivos[] = substr($key, 5);
}
}
$oRepositories->setRepositorios($arrConf['ruta_repos'], $arrReposActivos, $typeRepository, $arrConf["main_repos"]);
}
$option["main"] = "";
$option["others"] = "";
$option["all"] = "";
$arrRepositorios = $oRepositories->getRepositorios($arrConf['ruta_repos'], $typeRepository, $arrConf["main_repos"]);
$limit = 40;
$total = count($arrRepositorios);
$oGrid = new paloSantoGrid($smarty);
$oGrid->setLimit($limit);
$oGrid->setTotal($total);
$offset = $oGrid->calculateOffset();
$end = $oGrid->getEnd();
$arrData = array();
$version = $oRepositories->obtenerVersionDistro();
$arch = $oRepositories->obtenerArquitectura();
// print($arch);
if (is_array($arrRepositorios)) {
for ($i = $offset; $i < $end; $i++) {
$activo = "";
if ($arrRepositorios[$i]['activo']) {
$activo = "checked='checked'";
}
$arrData[] = array("<input {$activo} name='repo-" . $arrRepositorios[$i]['id'] . "' type='checkbox' id='repo-{$i}' />", $valor = str_replace(array("\$releasever", "\$basearch"), array($version, $arch), $arrRepositorios[$i]['name']));
}
}
if (isset($typeRepository)) {
$oGrid->setURL("?menu={$module_name}&typeRepository={$typeRepository}");
$_POST["typeRepository"] = $typeRepository;
} else {
$oGrid->setURL("?menu={$module_name}");
$_POST["typeRepository"] = "main";
}
$arrGrid = array("title" => $arrLang["Repositories"], "icon" => "modules/repositories/images/system_updates_repositories.png", "width" => "99%", "start" => $total == 0 ? 0 : $offset + 1, "end" => $end, "total" => $total, "columns" => array(0 => array("name" => $arrLang["Active"], "property1" => ""), 1 => array("name" => $arrLang["Name"], "property1" => "")));
$oGrid->customAction('submit_aceptar', _tr('Save/Update'));
$oGrid->addButtonAction("default", _tr('Default'), null, "defaultValues({$total},'{$version}','{$arch}')");
$FilterForm = new paloForm($smarty, createFilter());
$arrOpt = array("main" => _tr('Main'), "others" => _tr('Others'), "all" => _tr('All'));
if (isset($arrOpt[$typeRepository])) {
$valorfiltro = $arrOpt[$typeRepository];
} else {
$valorfiltro = _tr('Main');
}
$oGrid->addFilterControl(_tr("Filter applied ") . _tr("Repo") . " = " . $valorfiltro, $_POST, array("typeRepository" => "main"), true);
$htmlFilter = $FilterForm->fetchForm("{$local_templates_dir}/new.tpl", "", $_POST);
$oGrid->showFilter($htmlFilter);
$contenidoModulo = $oGrid->fetchGrid($arrGrid, $arrData, $arrLang);
return $contenidoModulo;
}
开发者ID:hardikk,项目名称:HNH,代码行数:61,代码来源:index.php
注:本文中的paloForm类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论