本文整理汇总了PHP中paloSantoGrid类的典型用法代码示例。如果您正苦于以下问题:PHP paloSantoGrid类的具体用法?PHP paloSantoGrid怎么用?PHP paloSantoGrid使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了paloSantoGrid类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: listarUsuarios
function listarUsuarios($pDB, $smarty, $module_name, $local_templates_dir)
{
global $arrLang;
$oUsuarios = new UsuariosECCP($pDB);
$smarty->assign(array('MODULE_NAME' => $module_name, 'LABEL_CREATE_USER' => _tr('New ECCP User')));
// Manejar posible borrado de agentes
if (isset($_POST['delete']) && isset($_POST['id']) && ctype_digit($_POST['id'])) {
$bExito = $oUsuarios->borrarUsuario($_POST['id']);
if (!$bExito) {
$smarty->assign(array('mb_title' => _tr('Error when deleting user'), 'mb_message' => $oUsuarios->errMsg));
}
}
// Listar todos los agentes
$oGrid = new paloSantoGrid($smarty);
$oGrid->setLimit(50);
$oGrid->setTotal($oUsuarios->contarUsuarios());
$offset = $oGrid->calculateOffset();
$listaAgentes = $oUsuarios->listarUsuarios(NULL, $offset, $oGrid->getLimit());
$arrData = array();
foreach ($listaAgentes as $t) {
$arrData[] = array('<input type="radio" name="id" value="' . $t['id'] . '" />', htmlentities($t['username'], ENT_COMPAT, 'UTF-8'), '<a href="?menu=' . $module_name . '&action=edit_user&id=' . $t['id'] . '">[' . _tr('Edit') . ']</a>');
}
$url = construirURL(array('menu' => $module_name), array('nav', 'start'));
$arrGrid = array("title" => _tr('ECCP User List'), "url" => $url, "icon" => 'images/user.png', "width" => "99%", "columns" => array(0 => array("name" => '<input type="submit" class="button" name="delete" value="' . htmlentities(_tr('Delete'), ENT_COMPAT, 'UTF-8') . '" onclick="return confirmSubmit(' . "'" . htmlentities(_tr('Are you sure to delete this user?'), ENT_COMPAT, 'UTF-8') . "'" . ')" />'), 1 => array("name" => _tr('Name')), 2 => array("name" => _tr('Options'))));
$oGrid->showFilter($smarty->fetch("{$local_templates_dir}/filter-list-users.tpl"));
$sContenido = $oGrid->fetchGrid($arrGrid, $arrData, $arrLang);
if (strpos($sContenido, '<form') === FALSE) {
$sContenido = "<form method=\"POST\" style=\"margin-bottom:0;\" action=\"{$url}\">{$sContenido}</form>";
}
return $sContenido;
}
开发者ID:hardikk,项目名称:HNH,代码行数:31,代码来源:index.php
示例2: listPackages
function listPackages($smarty, $module_name, $local_templates_dir, $arrConf)
{
$oPackages = new PaloSantoPackages($arrConf['ruta_yum']);
$submitInstalado = getParameter('submitInstalado');
$nombre_paquete = getParameter('nombre_paquete');
$smarty->assign(array('module_name' => $module_name, 'RepositoriesUpdate' => _tr('Repositories Update'), 'Search' => _tr('Search'), 'UpdatingRepositories' => _tr('Updating Repositories'), 'InstallPackage' => _tr('Installing Package'), 'UpdatePackage' => _tr('Updating Package'), 'accionEnProceso' => _tr('There is an action in process'), 'msgConfirmDelete' => _tr('You will uninstall package along with everything what it depends on it. System can lose important functionalities or become unstable! Are you sure want to Uninstall?'), 'msgConfirmInstall' => _tr('Are you sure want to Install this package?'), 'UninstallPackage' => _tr('Uninstalling Package'), 'msgConfirmUpdate' => _tr('Are you sure want to Update this package?')));
$arrPaquetes = $oPackages->listarPaquetes($submitInstalado == 'all' ? 'all' : 'installed', $nombre_paquete);
if ($oPackages->bActualizar) {
$smarty->assign("mb_title", _tr("Message"));
$smarty->assign("mb_message", _tr("The repositories are not up to date. Click on the") . " <b>\"" . _tr('Repositories Update') . "\"</b> " . _tr("button to list all available packages."));
}
// Pagination
$limit = 20;
$total = count($arrPaquetes);
$oGrid = new paloSantoGrid($smarty);
$oGrid->setLimit($limit);
$oGrid->setTotal($total);
$offset = $oGrid->calculateOffset();
$end = $oGrid->getEnd();
$arrPaquetes = array_slice($arrPaquetes, $offset, $limit);
$arrData = array();
foreach ($arrPaquetes as $paquete) {
$packageActions = array();
$tmpPaquete = $paquete['name'] . '.' . $paquete['arch'];
if ($paquete['canupdate']) {
$packageActions[] = "<a href='#' onclick=" . "confirmUpdate('{$tmpPaquete}')" . ">[" . _tr('Update') . "]</a>";
}
if (is_null($paquete['version'])) {
$packageActions[] = "<a href='#' onclick=" . "installaPackage('{$tmpPaquete}',0)" . ">[" . _tr('Install') . "]</a>";
} else {
$packageActions[] = "<a href='#' onclick=" . "confirmDelete('{$tmpPaquete}')" . ">[" . _tr('Uninstall') . "]</a>";
}
$rowData = array($paquete['name'], $paquete['arch'], $paquete['summary'], is_null($paquete['version']) ? _tr('(not installed)') : $paquete['version'] . '-' . $paquete['release'], is_null($paquete['latestversion']) ? _tr('(not available)') : $paquete['latestversion'] . '-' . $paquete['latestrelease'], $paquete['repo'], implode(' ', $packageActions));
if ($paquete['canupdate']) {
$rowData[0] = '<b>' . $rowData[0] . '</b>';
$rowData[4] = '<b>' . $rowData[4] . '</b>';
}
$arrData[] = $rowData;
}
$url = array('menu' => $module_name, 'submitInstalado' => $submitInstalado, 'nombre_paquete' => $nombre_paquete);
$arrGrid = array("title" => _tr('Packages'), "icon" => "web/apps/{$module_name}/images/system_updates_packages.png", "width" => "99%", "start" => $total == 0 ? 0 : $offset + 1, "end" => $end, "total" => $total, "url" => $url, "columns" => array(array("name" => _tr("Package Name")), array("name" => _tr("Architecture")), array("name" => _tr("Package Info")), array('name' => _tr('Current Version')), array('name' => _tr('Available Version')), array("name" => _tr("Repositor Place")), array("name" => _tr("Status"))));
/*Inicio Parte del Filtro*/
$arrFilter = filterField();
$oFilterForm = new paloForm($smarty, $arrFilter);
if (getParameter('submitInstalado') == 'all') {
$arrFilter["submitInstalado"] = 'all';
$tipoPaquete = _tr('All Package');
} else {
$arrFilter["submitInstalado"] = 'installed';
$tipoPaquete = _tr('Package Installed');
}
$arrFilter["nombre_paquete"] = $nombre_paquete;
$oGrid->addFilterControl(_tr("Filter applied ") . _tr("Status") . " = {$tipoPaquete}", $arrFilter, array("submitInstalado" => "installed"), true);
$oGrid->addFilterControl(_tr("Filter applied ") . _tr("Name") . " = {$nombre_paquete}", $arrFilter, array("nombre_paquete" => ""));
$oGrid->addButtonAction('update_repositorios', _tr('Repositories Update'), null, 'mostrarReloj()');
$oGrid->showFilter($oFilterForm->fetchForm("{$local_templates_dir}/new.tpl", '', $arrFilter));
return $oGrid->fetchGrid($arrGrid, $arrData);
}
开发者ID:lordbasex,项目名称:elastix-gui,代码行数:58,代码来源:index.php
示例3: listFax
function listFax($smarty, $module_name, $local_templates_dir)
{
$limit = 30;
$oFax = new paloFax();
$total = $oFax->getTotalFax();
$oGrid = new paloSantoGrid($smarty);
$oGrid->setLimit($limit);
$oGrid->setTotal($total);
$oGrid->pagingShow(true);
$oGrid->setURL("?menu=faxlist");
$oGrid->setTitle(_tr("Virtual Fax List"));
$oGrid->setIcon("/modules/{$module_name}/images/fax_virtual_fax_list.png");
$arrColumns = array(_tr("Virtual Fax Name"), _tr("Fax Extension"), _tr("Secret"), _tr("Destination Email"), _tr("Caller ID Name"), _tr("Caller ID Number"), _tr("Status"));
$oGrid->setColumns($arrColumns);
$offset = $oGrid->calculateOffset();
$arrFax = $oFax->getFaxList($offset, $limit);
$arrFaxStatus = $oFax->getFaxStatus();
$arrData = array();
foreach ($arrFax as $fax) {
$arrTmp = array();
$arrTmp[0] = " <a href='?menu=faxnew&action=view&id=" . $fax['id'] . "'>" . $fax['name'] . "</a>";
$arrTmp[1] = $fax['extension'];
$arrTmp[2] = $fax['secret'];
$arrTmp[3] = $fax['email'];
$arrTmp[4] = $fax['clid_name'] . " ";
$arrTmp[5] = $fax['clid_number'] . " ";
$arrTmp[6] = $arrFaxStatus['modems']['ttyIAX' . $fax['dev_id']] . ' on ttyIAX' . $fax['dev_id'];
$arrData[] = $arrTmp;
}
$session = getSession();
$session['faxlist']['faxListStatus'] = $arrData;
putSession($session);
$oGrid->setData($arrData);
return $oGrid->fetchGrid();
}
开发者ID:hardikk,项目名称:HNH,代码行数:35,代码来源:index.php
示例4: reportTelefonosinactivos
function reportTelefonosinactivos($smarty, $module_name, $local_templates_dir, &$pDB, $arrConf)
{
$pTelefonosinactivos = new paloSantoTelefonosinactivos($pDB);
$filter_field = getParameter("filter_field");
$filter_value = getParameter("filter_value");
//begin grid parameters
$oGrid = new paloSantoGrid($smarty);
$oGrid->setTitle(_tr("Teléfonos inactivos"));
$oGrid->pagingShow(true);
// show paging section.
$oGrid->enableExport();
// enable export.
$oGrid->setNameFile_Export(_tr("Teléfonos inactivos"));
$url = array("menu" => $module_name, "filter_field" => $filter_field, "filter_value" => $filter_value);
$oGrid->setURL($url);
$arrColumns = array(_tr("Cliente"), _tr("Cédula"), _tr("Descripción"), _tr("Telefono"), _tr("Acción"));
$oGrid->setColumns($arrColumns);
$total = $pTelefonosinactivos->getNumTelefonosinactivos($filter_field, $filter_value);
$arrData = null;
if ($oGrid->isExportAction()) {
$limit = $total;
// max number of rows.
$offset = 0;
// since the start.
} else {
$limit = 200;
// Default 20
$oGrid->setLimit($limit);
$oGrid->setTotal($total);
$offset = $oGrid->calculateOffset();
}
$arrResult = $pTelefonosinactivos->getTelefonosinactivos($limit, $offset, $filter_field, $filter_value);
if (is_array($arrResult) && $total > 0) {
foreach ($arrResult as $key => $value) {
$arrTmp[0] = $value['cliente'];
$arrTmp[1] = $value['ci'];
$arrTmp[2] = $value['descripcion'];
$arrTmp[3] = $value['telefono'];
$arrTmp[4] = "<a href=index.php?menu={$module_name}&id={$value['id']}&action=activar>Activar</a>";
$arrData[] = $arrTmp;
}
}
$oGrid->setData($arrData);
//begin section filter
$oFilterForm = new paloForm($smarty, createFieldFilter());
$smarty->assign("SHOW", _tr("Show"));
$htmlFilter = $oFilterForm->fetchForm("{$local_templates_dir}/filter.tpl", "", $_POST);
//end section filter
$oGrid->showFilter(trim($htmlFilter));
$content = $oGrid->fetchGrid();
//end grid parameters
return $content;
}
开发者ID:veraveramanolo,项目名称:cpc2c_uio,代码行数:53,代码来源:index.php
示例5: reportDHCP_Configuration
function reportDHCP_Configuration($smarty, $module_name, $local_templates_dir, &$pDB, $arrConf)
{
$pDHCP_Configuration = new paloSantoDHCP_Configuration($pDB);
$filter_field = getParameter("filter_field");
$filter_value = getParameter("filter_value");
$action = getParameter("nav");
$start = getParameter("start");
//begin grid parameters
$oGrid = new paloSantoGrid($smarty);
$nameOpt = array("hostname" => _tr('Host Name'), "ipaddress" => _tr('IP Address'), "macaddress" => _tr('MAC Address'));
if (isset($nameOpt[$filter_field])) {
$valorFiltro = $nameOpt[$filter_field];
} else {
$valorFiltro = "";
}
$oGrid->addFilterControl(_tr("Filter applied ") . " " . $valorFiltro . " = {$filter_value}", $_POST, array("filter_field" => "hostname", "filter_value" => ""));
$totalDHCP_Configuration = $pDHCP_Configuration->contarIpFijas($filter_field, $filter_value);
$oGrid->addNew("new_dhcpconft", _tr("Assign IP Address"));
$oGrid->deleteList("Are you sure you wish to delete the DHCP configuration.", "delete_dhcpConf", _tr("Delete"));
$limit = 20;
$total = $totalDHCP_Configuration;
$oGrid->setLimit($limit);
$oGrid->setTotal($total);
$oGrid->calculatePagination($action, $start);
$offset = $oGrid->getOffsetValue();
$end = $oGrid->getEnd();
$arrData = null;
$arrResult = $pDHCP_Configuration->leerIPsFijas($limit, $offset, $filter_field, $filter_value);
if (is_array($arrResult) && $total > 0) {
foreach ($arrResult as $key => $value) {
$arrTmp[0] = "<input type='checkbox' name='DhcpConfID_{$value['id']}' />";
$arrTmp[1] = "<a href='?menu={$module_name}&action=view_dhcpconf&id=" . $value['id'] . "'>" . $value['hostname'] . "</a>";
$arrTmp[2] = $value['ipaddress'];
$arrTmp[3] = $value['macaddress'];
$arrData[] = $arrTmp;
}
}
$buttonDelete = "";
$arrGrid = array("title" => _tr('Assign IP Address to Host'), "icon" => "web/apps/{$module_name}/images/system_network_assign_ip_address.png", "width" => "99%", "start" => $total == 0 ? 0 : $offset + 1, "end" => $end, "total" => $total, "url" => array('menu' => $module_name, 'filter_field' => $filter_field, 'filter_value' => $filter_value), "columns" => array(0 => array("name" => $buttonDelete, "property1" => ""), 1 => array("name" => _tr('Host Name'), "property1" => ""), 2 => array("name" => _tr('IP Address'), "property1" => ""), 3 => array("name" => _tr('MAC Address'), "property1" => "")));
//begin section filter
$arrFormFilterDHCP_Configuration = createFieldFilter();
$oFilterForm = new paloForm($smarty, $arrFormFilterDHCP_Configuration);
$smarty->assign("SHOW", _tr('Show'));
$htmlFilter = $oFilterForm->fetchForm("{$local_templates_dir}/filter.tpl", "", $_POST);
//end section filter
$oGrid->showFilter(trim($htmlFilter));
$contenidoModulo = $oGrid->fetchGrid($arrGrid, $arrData);
//end grid parameters
return $contenidoModulo;
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:50,代码来源:index.php
示例6: getParameter
function reportListadodecampañas($smarty, $module_name, $local_templates_dir, &$pDB, $arrConf)
{
$pListadodecampañas = new paloSantoListadodecampañas($pDB);
$filter_field = getParameter("filter_field");
$filter_value = getParameter("filter_value");
//begin grid parameters
$oGrid = new paloSantoGrid($smarty);
$oGrid->setTitle(_tr("Listado de bases recargables"));
$oGrid->pagingShow(true);
// show paging section.
$oGrid->enableExport();
// enable export.
$oGrid->setNameFile_Export(_tr("Listado de campañas"));
$url = array("menu" => $module_name, "filter_field" => $filter_field, "filter_value" => $filter_value);
$oGrid->setURL($url);
$arrColumns = array(_tr("Nombre"), _tr("Campania"), _tr("Fecha Inicial"), _tr("Fecha Final"), _tr("# de Clientes"), _tr("Acción"));
$oGrid->setColumns($arrColumns);
$total = $pListadodecampañas->getNumListadodecampañas($filter_field, $filter_value);
$arrData = null;
if ($oGrid->isExportAction()) {
$limit = $total;
// max number of rows.
$offset = 0;
// since the start.
} else {
$limit = 20;
$oGrid->setLimit($limit);
$oGrid->setTotal($total);
$offset = $oGrid->calculateOffset();
}
$arrResult = $pListadodecampañas->getListadodecampañas($limit, $offset, $filter_field, $filter_value);
if (is_array($arrResult) && $total > 0) {
foreach ($arrResult as $key => $value) {
$arrBasesAgentes = $pListadodecampañas->getBasesAgentes($value['id']);
$arrTmp[0] = $value['nombre'];
$arrTmp[1] = $value['campania'];
$arrTmp[2] = $value['fecha_inicio'];
$arrTmp[3] = $value['fecha_fin'];
$arrTmp[4] = $value['clientes'];
if ($value['status'] == "A") {
$arrTmp[5] = "<a href=index.php?menu=hispana_listado_recarga&action=inactivar&id=" . $value['id'] . ">Inactivar</a>";
} else {
$arrTmp[5] = "<a href=index.php?menu=hispana_listado_recarga&action=activar&id=" . $value['id'] . ">Activar</a>";
}
$arrTmp[5] = $arrTmp[5] . "/ <a href=index.php?menu=hispana_base_recarga&edit_base=si&id_base=" . $value['id_base'] . "&id_campania=" . $value['id_campania'] . ">Editar</a>";
$arrData[] = $arrTmp;
}
}
$oGrid->setData($arrData);
//begin section filter
$oFilterForm = new paloForm($smarty, createFieldFilter());
$smarty->assign("SHOW", _tr("Show"));
$htmlFilter = $oFilterForm->fetchForm("{$local_templates_dir}/filter.tpl", "", $_POST);
//end section filter
$oGrid->showFilter(trim($htmlFilter));
$content = $oGrid->fetchGrid();
//end grid parameters
return $content;
}
开发者ID:veraveramanolo,项目名称:cpc2c_uio,代码行数:59,代码来源:index.php
示例7: listRepositories
function listRepositories($smarty, $module_name, $local_templates_dir, $arrConf)
{
$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();
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" => _tr("Repositories"), "icon" => "web/apps/{$module_name}/images/system_updates_repositories.png", "width" => "99%", "start" => $total == 0 ? 0 : $offset + 1, "end" => $end, "total" => $total, "columns" => array(0 => array("name" => _tr("Active"), "property1" => ""), 1 => array("name" => _tr("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);
return $contenidoModulo;
}
开发者ID:lordbasex,项目名称:elastix-gui,代码行数:59,代码来源:index.php
示例8: reportListadodebases
function reportListadodebases($smarty, $module_name, $local_templates_dir, &$pDB, $arrConf)
{
$pListadodebases = new paloSantoListadodebases($pDB);
$filter_field = getParameter("filter_field");
$filter_value = getParameter("filter_value");
//begin grid parameters
$oGrid = new paloSantoGrid($smarty);
$oGrid->setTitle(_tr("Listado de bases"));
$oGrid->pagingShow(true);
// show paging section.
$oGrid->enableExport();
// enable export.
$oGrid->setNameFile_Export(_tr("Listado de bases"));
$url = array("menu" => $module_name, "filter_field" => $filter_field, "filter_value" => $filter_value);
$oGrid->setURL($url);
$arrColumns = array(_tr("Base"), _tr("CI"), _tr("Nombre"), _tr("Apellido"), _tr("Provincia"), _tr("Ciudad"), _tr("Nacimiento"), _tr("Correo personal"), _tr("Correo trabajo"), _tr("Estado civil"), _tr("Action"));
$oGrid->setColumns($arrColumns);
$total = $pListadodebases->getNumListadodebases($filter_field, $filter_value);
$arrData = null;
if ($oGrid->isExportAction()) {
$limit = $total;
// max number of rows.
$offset = 0;
// since the start.
} else {
//$limit = 20;
$limit = 200;
$oGrid->setLimit($limit);
$oGrid->setTotal($total);
$offset = $oGrid->calculateOffset();
}
$arrResult = $pListadodebases->getListadodebases($limit, $offset, $filter_field, $filter_value);
if (is_array($arrResult) && $total > 0) {
foreach ($arrResult as $key => $value) {
$arrTmp[0] = $value['base'];
$arrTmp[1] = $value['ci'];
$arrTmp[2] = $value['nombre'];
$arrTmp[3] = $value['apellido'];
$arrTmp[4] = $value['provincia'];
$arrTmp[5] = $value['ciudad'];
$arrTmp[6] = $value['nacimiento'];
$arrTmp[7] = $value['correo_personal'];
$arrTmp[8] = $value['correo_trabajo'];
$arrTmp[9] = $value['estado_civil'];
$arrTmp[10] = "<a href='?menu=hispana_clientes_datosbasicos&ci=" . $value['ci'] . "'>Editar</a>";
$arrData[] = $arrTmp;
}
}
$oGrid->setData($arrData);
//begin section filter
$oFilterForm = new paloForm($smarty, createFieldFilter());
$smarty->assign("SHOW", _tr("Show"));
$htmlFilter = $oFilterForm->fetchForm("{$local_templates_dir}/filter.tpl", "", $_POST);
//end section filter
$oGrid->showFilter(trim($htmlFilter));
$content = $oGrid->fetchGrid();
//end grid parameters
return $content;
}
开发者ID:veraveramanolo,项目名称:cpc2c_uio,代码行数:59,代码来源:index.php
示例9: getParameter
function reportReporteGeneraldeGestión($smarty, $module_name, $local_templates_dir, &$pDB, $arrConf)
{
$pReporteGeneraldeGestión = new paloSantoReporteGeneraldeGestión($pDB);
$filter_field = getParameter("filter_field");
$filter_value = getParameter("filter_value");
//begin grid parameters
$oGrid = new paloSantoGrid($smarty);
$oGrid->setTitle(_tr("Reporte General de Gestión"));
$oGrid->pagingShow(true);
// show paging section.
$oGrid->enableExport();
// enable export.
$oGrid->setNameFile_Export(_tr("Reporte General de Gestión"));
$url = array("menu" => $module_name, "filter_field" => $filter_field, "filter_value" => $filter_value);
$oGrid->setURL($url);
$arrColumns = array(_tr("Campaña"), _tr("Cliente"), _tr("CI"), _tr("Teléfono"), _tr("Agente"), _tr("Calltype"), _tr("Fecha"), _tr("Audio"));
$oGrid->setColumns($arrColumns);
$total = $pReporteGeneraldeGestión->getNumReporteGeneraldeGestión($filter_field, $filter_value);
$arrData = null;
if ($oGrid->isExportAction()) {
$limit = $total;
// max number of rows.
$offset = 0;
// since the start.
} else {
$limit = 20;
$oGrid->setLimit($limit);
$oGrid->setTotal($total);
$offset = $oGrid->calculateOffset();
}
$arrResult = $pReporteGeneraldeGestión->getReporteGeneraldeGestión($limit, $offset, $filter_field, $filter_value);
if (is_array($arrResult) && $total > 0) {
foreach ($arrResult as $key => $value) {
$arrTmp[0] = $value['campania'];
$arrTmp[1] = $value['cliente'];
$arrTmp[2] = $value['cedula'];
$arrTmp[3] = $value['telefono'];
$arrTmp[4] = $value['agente'];
$arrTmp[5] = $value['calltype'];
$arrTmp[6] = $value['fecha'];
if (stripos($value['calltype'], "contactado") >= 0) {
$arrTmp[7] = "<a href=monitoring_translator.php?action=download&id=" . $value['timestamp'] . "&rawmode=yes>Descargar</a>";
}
//$arrTmp[7] = "";
$arrData[] = $arrTmp;
}
}
$oGrid->setData($arrData);
//begin section filter
$oFilterForm = new paloForm($smarty, createFieldFilter());
$smarty->assign("SHOW", _tr("Show"));
$htmlFilter = $oFilterForm->fetchForm("{$local_templates_dir}/filter.tpl", "", $_POST);
//end section filter
$oGrid->showFilter(trim($htmlFilter));
$content = $oGrid->fetchGrid();
//end grid parameters
return $content;
}
开发者ID:veraveramanolo,项目名称:cpc2c_uio,代码行数:58,代码来源:index1.php
示例10: reportIncomingcallsmonitoring
function reportIncomingcallsmonitoring($smarty, $module_name, $local_templates_dir, &$pDB, $arrConf, $arrLang)
{
$pIncomingcallsmonitoring = new paloSantoIncomingcallsmonitoring($pDB);
$filter_field = getParameter("filter_field");
$filter_value = getParameter("filter_value");
$action = getParameter("nav");
$start = getParameter("start");
//begin grid parameters
$oGrid = new paloSantoGrid($smarty);
$totalIncomingcallsmonitoring = $pIncomingcallsmonitoring->ObtainNumIncomingcallsmonitoring($filter_field, $filter_value);
$limit = 20;
$total = $totalIncomingcallsmonitoring;
$oGrid->setLimit($limit);
$oGrid->setTotal($total);
$oGrid->calculatePagination($action, $start);
$offset = $oGrid->getOffsetValue();
$end = $oGrid->getEnd();
$url = "?menu={$module_name}&filter_field={$filter_field}&filter_value={$filter_value}";
$arrData = null;
$arrResult = $pIncomingcallsmonitoring->ObtainIncomingcallsmonitoring($limit, $offset, $arrLang, $filter_field, $filter_value);
if (is_array($arrResult)) {
foreach ($arrResult as $key => $value) {
$arrTmp[0] = $value['queue'];
$arrTmp[1] = isset($value['entered']) ? $value['entered'] : "0";
$arrTmp[2] = isset($value['answered']) ? $value['answered'] : "0";
$arrTmp[3] = isset($value['abandoned']) ? $value['abandoned'] : "0";
$arrTmp[4] = isset($value['waiting_calls']) ? $value['waiting_calls'] : "0";
$arrTmp[5] = isset($value['without_monitoring']) ? $value['without_monitoring'] : "0";
$arrData[] = $arrTmp;
}
}
$arrGrid = array("title" => $arrLang["Incoming calls monitoring"], "icon" => "images/list.png", "width" => "99%", "start" => $total == 0 ? 0 : $offset + 1, "end" => $end, "total" => $total, "url" => $url, "columns" => array(0 => array("name" => $arrLang["Queue"], "property1" => ""), 1 => array("name" => $arrLang["Entered"], "property1" => ""), 2 => array("name" => $arrLang["Answered"], "property1" => ""), 3 => array("name" => $arrLang["Abandoned"], "property1" => ""), 4 => array("name" => $arrLang["Waiting calls"], "property1" => ""), 5 => array("name" => $arrLang["Without monitoring"], "property1" => "")));
//begin section filter
$arrFormFilterIncomingcallsmonitoring = createFieldFilter($arrLang);
$oFilterForm = new paloForm($smarty, $arrFormFilterIncomingcallsmonitoring);
// $smarty->assign("SHOW", $arrLang["Show"]);
// $htmlFilter = $oFilterForm->fetchForm("$local_templates_dir/filter.tpl","",$_POST);
//end section filter
// $oGrid->showFilter(trim($htmlFilter));
$content = $oGrid->fetchGrid($arrGrid, $arrData, $arrLang);
if (strpos($content, '<form') === FALSE) {
$content = "<form method=\"POST\" style=\"margin-bottom:0;\" action=\"{$url}\">{$sContenido}</form>";
}
$sReloadScript = <<<SCRIPT_RELOAD
<script>
function reload() {
xajax_create_report();
setTimeout("reload()",5000);
}
reload();
</script>
SCRIPT_RELOAD;
$content = $sReloadScript . $content;
return $content;
}
开发者ID:hardikk,项目名称:HNH,代码行数:55,代码来源:index.php
示例11: reportDhcpClientlist
function reportDhcpClientlist($smarty, $module_name, $local_templates_dir, &$pDB, $arrConf)
{
$pDhcpClientlist = new paloSantoDhcpClienList($pDB);
$filter_field = "";
$filter_value = "";
$action = getParameter("nav");
$start = getParameter("start");
//begin grid parameters
$oGrid = new paloSantoGrid($smarty);
$limit = 20;
$arrResult = $pDhcpClientlist->getDhcpClientList();
$total = count($arrResult);
$oGrid->setLimit($limit);
$oGrid->setTotal($total);
$oGrid->calculatePagination($action, $start);
$offset = $oGrid->getOffsetValue();
$end = $oGrid->getEnd();
$url = "?menu={$module_name}";
$arrData = null;
if (is_array($arrResult) && count($arrResult) > 0) {
for ($i = 1; $i <= $total; $i++) {
//$arrTmp[0] = "<input type='checkbox' name='DhcpListID_$i' />";
// $arrTmp[1] = "<a href='?menu=$module_name&action=show&id=".$id."'>".$arrResult[$id]['iphost']."</a>";
$arrTmp[0] = "" . $arrResult[$i]['iphost'];
$arrTmp[1] = "" . $arrResult[$i]['macaddress'];
$arrTmp[2] = "<a href='?menu={$module_name}&action=see_dhcpclient&id=" . $i . "'>" . _tr("View Details") . "</a>";
$arrData[] = $arrTmp;
}
}
$buttonDelete = "<input type='submit' name='delete_dhcpclient' value='" . _tr("Delete") . "' class='button' onclick=\" return confirmSubmit('" . _tr("Are you sure you wish to delete the Ip.") . "');\" />";
$arrGrid = array("title" => _tr("DHCP Client List"), "icon" => "web/apps/{$module_name}/images/system_network_dhcp_client_list.png", "width" => "99%", "start" => $total == 0 ? 0 : $offset + 1, "end" => $end, "total" => $total, "url" => $url, "columns" => array(0 => array("name" => _tr("IP Address"), "property1" => ""), 1 => array("name" => _tr("MAC Address"), "property1" => ""), 2 => array("name" => _tr("Action"), "property1" => "")));
//begin section filter
// $arrFormFilterDhcplist = createFieldFilter();
// $oFilterForm = new paloForm($smarty, $arrFormFilterDhcplist);
// $smarty->assign("SHOW", _tr("Show"));
$smarty->assign("NEW_DHCPCLIENT", _tr("New Dhcp client"));
// $htmlFilter = $oFilterForm->fetchForm("$local_templates_dir/filter.tpl","",$_POST);
//end section filter
// $oGrid->showFilter(trim($htmlFilter));
$contenidoModulo = $oGrid->fetchGrid($arrGrid, $arrData);
if (strpos($contenidoModulo, '<form') === FALSE) {
$contenidoModulo = "<form method='POST' style='margin-bottom:0;' action={$url}>{$contenidoModulo}</form>";
}
//end grid parameters
return $contenidoModulo;
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:46,代码来源:index.php
示例12: listURL
function listURL($pDB, $smarty, $module_name, $local_templates_dir)
{
$urls = new externalUrl($pDB);
$grid = new paloSantoGrid($smarty);
$dtypes = descOpenType();
// para el pagineo
$grid->setLimit(15);
$grid->setTotal($urls->countURLs());
$offset = $grid->calculateOffset();
$listaUrls = $urls->getURLs($grid->getLimit(), $grid->getOffsetValue());
$data = array();
foreach ($listaUrls as $tuplaUrl) {
$data[] = array($tuplaUrl['active'] ? _tr('Yes') : _tr('No'), $dtypes[$tuplaUrl['opentype']], htmlentities($tuplaUrl['urltemplate'], ENT_COMPAT, 'UTF-8'), htmlentities($tuplaUrl['description'], ENT_COMPAT, 'UTF-8'), "<a href='?menu={$module_name}&action=edit_url&id_url=" . $tuplaUrl['id'] . "'>[" . _tr('Edit') . "]</a>");
}
//$grid->addNew("?menu=$module_name&action=new_url", _tr('New URL'), true);
$grid->showFilter("<div align=\"right\"><a href=\"?menu={$module_name}&action=new_url\"><b>" . _tr('New URL') . "»</b></a></div>");
$grid->setTitle(_tr('External URLs'));
$grid->setColumns(array(_tr('Active'), _tr('Opens in'), _tr('URL Template'), _tr('Description'), _tr('Options')));
$grid->setData($data);
return $grid->fetchGrid();
}
开发者ID:hardikk,项目名称:HNH,代码行数:21,代码来源:index.php
示例13: reportMemberList
function reportMemberList($smarty, $module_name, $local_templates_dir, &$pDB, $arrConf, $credentials)
{
global $arrPermission;
$pEmailList = new paloSantoEmailList($pDB);
$id_list = getParameter("id");
if ($credentials['userlevel'] == 'superadmin') {
$emailList = $pEmailList->getEmailList($id_list);
} else {
$emailList = $pEmailList->getEmailList($id_list, $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);
}
$field_type = getParameter("filter_type");
$field_pattern = getParameter("filter_txt");
$smarty->assign("IDEMAILLIST", $id_list);
$smarty->assign("ACTION", 'view_memberlist');
$smarty->assign("SHOW", _tr("Show"));
$smarty->assign("RETURN", _tr("Return"));
$smarty->assign("LINK", "?menu={$module_name}&action=export&id={$id_list}&rawmode=yes");
$smarty->assign("EXPORT", _tr("Export Members"));
$edit_permission = in_array('edit_list', $arrPermission);
$totalMembers = $pEmailList->getTotalMembers($id_list);
$oGrid = new paloSantoGrid($smarty);
$limit = 20;
$oGrid->setLimit($limit);
$oGrid->setTotal($totalMembers);
$oGrid->setTitle(_tr("List Members of") . " " . $pEmailList->getListName($id_list));
$oGrid->setIcon("web/apps/{$module_name}/images/email.png");
$oGrid->pagingShow(true);
$offset = $oGrid->calculateOffset();
$url['menu'] = $module_name;
$url['action'] = 'view_memberlist';
$url['id'] = $id_list;
$url['filter_type'] = $field_type;
$url['filter_txt'] = $field_pattern;
$oGrid->setURL($url);
if ($edit_permission) {
$arrColumns[] = '';
}
$arrColumns[] = _tr("Member name");
$arrColumns[] = _tr("Member email");
$oGrid->setColumns($arrColumns);
$arrResult = $pEmailList->getMembers($limit, $offset, $id_list, $field_type, $field_pattern);
$arrData = null;
//print_r($arrResult);
if (is_array($arrResult) && $totalMembers > 0) {
foreach ($arrResult as $list) {
$arrTmp = array();
if ($edit_permission) {
$arrTmp[] = "<input type='checkbox' name='del_emailmembers[{$list["mailmember"]}]'>";
}
$arrTmp[] = $list["namemember"];
$arrTmp[] = $list["mailmember"];
$arrData[] = $arrTmp;
}
}
$arrFormFilterMembers = createFieldFilterViewMembers();
$oFilterForm = new paloForm($smarty, $arrFormFilterMembers);
$arrType = array("name" => _tr("Name"), "email" => _tr("Email"));
if (!is_null($field_type)) {
$nameField = $arrType[$field_type];
} else {
$nameField = "";
}
$oGrid->customAction("return", _tr("Return"));
if ($edit_permission) {
$oGrid->addNew("new_memberlist", _tr("Add Member(s) to List"));
$oGrid->deleteList(_tr("Are you sure you wish to delete the Email List(s)."), "remove_memberlist", _tr("Delete"));
}
$oGrid->customAction("?menu={$module_name}&action=export&id={$id_list}&rawmode=yes", _tr("Export Members"), null, true);
$oGrid->addFilterControl(_tr("Filter applied: ") . $nameField . " = " . $field_pattern, $_POST, array("filter_type" => "name", "filter_txt" => ""));
$htmlFilter = $oFilterForm->fetchForm("{$local_templates_dir}/view_members.tpl", "", $_POST);
$oGrid->showFilter(trim($htmlFilter));
$content = $oGrid->fetchGrid(array(), $arrData);
return $content;
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:80,代码来源:index.php
示例14: _moduleContent
function _moduleContent(&$smarty, $module_name)
{
include_once "libs/paloSantoGrid.class.php";
include_once "libs/paloSantoDB.class.php";
include_once "libs/paloSantoForm.class.php";
include_once "libs/paloSantoConfig.class.php";
include_once "libs/paloSantoTrunk.class.php";
require_once "libs/misc.lib.php";
//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'];
$contenido = '';
$msgError = '';
$pConfig = new paloConfig("/etc", "amportal.conf", "=", "[[:space:]]*=[[:space:]]*");
$arrConfig = $pConfig->leer_configuracion(false);
$dsn = $arrConfig['AMPDBENGINE']['valor'] . "://" . $arrConfig['AMPDBUSER']['valor'] . ":" . $arrConfig['AMPDBPASS']['valor'] . "@" . $arrConfig['AMPDBHOST']['valor'] . "/asterisk";
$pDB = new paloDB($dsn);
$pDBSetting = new paloDB($arrConf['elastix_dsn']['settings']);
$pDBTrunk = new paloDB($arrConfModule['dsn_conn_database_1']);
$arrForm = array("default_rate" => array("LABEL" => $arrLang["Default Rate"], "REQUIRED" => "yes", "INPUT_TYPE" => "TEXT", "INPUT_EXTRA_PARAM" => "", "VALIDATION_TYPE" => "float", "VALIDATION_EXTRA_PARAM" => ""), "default_rate_offset" => array("LABEL" => $arrLang["Default Rate Offset"], "REQUIRED" => "yes", "INPUT_TYPE" => "TEXT", "INPUT_EXTRA_PARAM" => "", "VALIDATION_TYPE" => "float", "VALIDATION_EXTRA_PARAM" => ""));
$oForm = new paloForm($smarty, $arrForm);
$oForm->setViewMode();
//obtener el valor de la tarifa por defecto
$arrDefaultRate['default_rate'] = get_key_settings($pDBSetting, "default_rate");
$arrDefaultRate['default_rate_offset'] = get_key_settings($pDBSetting, "default_rate_offset");
$smarty->assign("EDIT", $arrLang["Edit"]);
$smarty->assign("REQUIRED_FIELD", $arrLang["Required field"]);
$strReturn = $oForm->fetchForm("{$local_templates_dir}/default_rate.tpl", $arrLang["Default Rate Configuration"], $arrDefaultRate);
if (isset($_POST['edit_default'])) {
$arrDefaultRate['default_rate'] = get_key_settings($pDBSetting, "default_rate");
$arrDefaultRate['defau
|
请发表评论