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


PHP paloSantoGrid::setTplFile方法代码示例

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


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

示例1: reportClientesagendados

function reportClientesagendados($smarty, $module_name, $local_templates_dir, &$pDB, $arrConf)
{
    $pClientesagendados = new paloSantoClientesagendados($pDB);
    $filter_field = getParameter("filter_field");
    $filter_value = getParameter("filter_value");
    //begin grid parameters
    $oGrid = new paloSantoGrid($smarty);
    $oGrid->setTplFile("/var/www/html/modules/{$module_name}/themes/default/_list.tpl");
    $oGrid->setTitle(_tr("Clientes agendados"));
    $oGrid->pagingShow(true);
    // show paging section.
    $oGrid->enableExport();
    // enable export.
    $oGrid->setNameFile_Export(_tr("Clientes agendados"));
    $url = array("menu" => $module_name, "filter_field" => $filter_field, "filter_value" => $filter_value);
    $oGrid->setURL($url);
    $arrColumns = array(_tr("Apellido"), _tr("Nombre"), _tr("CI"), _tr("Campaña"), _tr("Fecha de agendamiento"), _tr("Call type"), _tr("Agente agendado"), "<input class=\"button\" type=\"submit\" name=\"action\" value=\"Reasignar\">");
    $oGrid->setColumns($arrColumns);
    $total = $pClientesagendados->getNumClientesagendados($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 = $pClientesagendados->getClientesagendados($limit, $offset, $filter_field, $filter_value);
    if (is_array($arrResult) && $total > 0) {
        foreach ($arrResult as $key => $value) {
            $arrTmp[0] = $value['apellido'];
            $arrTmp[1] = $value['nombre'];
            $arrTmp[2] = $value['ci'];
            $arrTmp[3] = $value['nombre_campania'];
            $arrTmp[4] = $value['fecha_agendamiento'];
            $arrTmp[5] = $value['ultimo_calltype'];
            $arrTmp[6] = $value['agente_agendado'];
            if (empty($value['id_campania_cliente'])) {
                $arrTmp[7] = getFormSelectAgentesCampaniaRecargable($pClientesagendados, $value['id_campania'], $value['id_campania_recargable_cliente'], $value['agente_agendado']);
            } else {
                $arrTmp[7] = getFormSelectAgentesCampania($pClientesagendados, $value['id_campania'], $value['id_campania_cliente'], $value['agente_agendado']);
            }
            $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,代码行数:60,代码来源:index.php

示例2: reportClientesCampania

function reportClientesCampania($smarty, $module_name, $local_templates_dir, &$pDB, $arrConf)
{
    $pClientesagendados = new paloSantoClientesCampania($pDB);
    $filter_field = getParameter("filter_field");
    $filter_value = getParameter("filter_value");
    //begin grid parameters
    $oGrid = new paloSantoGrid($smarty);
    $oGrid->setTplFile("/var/www/html/modules/{$module_name}/themes/default/_list.tpl");
    $oGrid->setTitle(_tr("Clientes por campaña"));
    $oGrid->pagingShow(true);
    // show paging section.
    $oGrid->enableExport();
    // enable export.
    $oGrid->setNameFile_Export(_tr("Clientes por campaña"));
    $url = array("menu" => $module_name, "filter_field" => $filter_field, "filter_value" => $filter_value);
    $oGrid->setURL($url);
    $arrColumns = array(_tr("CI"), _tr("Cliente"), _tr("Campaña"), _tr("Agendamiento"), _tr("Agendado a"), _tr("Acción"));
    $oGrid->setColumns($arrColumns);
    $total = $pClientesagendados->getNumClientesCampania($filter_field, $filter_value);
    $arrData = null;
    if ($oGrid->isExportAction()) {
        $limit = $total;
        // max number of rows.
        $offset = 0;
        // since the start.
    } else {
        $limit = 100;
        $oGrid->setLimit($limit);
        $oGrid->setTotal($total);
        $offset = $oGrid->calculateOffset();
    }
    $arrResult = $pClientesagendados->getClientesCampania($limit, $offset, $filter_field, $filter_value);
    if (is_array($arrResult) && $total > 0) {
        foreach ($arrResult as $key => $value) {
            $arrTmp[0] = $value['ci'];
            $arrTmp[1] = $value['cliente'];
            $arrTmp[2] = $value['campania'];
            $arrTmp[3] = $value['fecha_agendamiento'];
            $arrTmp[4] = $value['agente_agendado'];
            //$arrTmp[3] = getFormSelectAgentesCampania($pClientesagendados,$value['id_campania'],$value['id_campania_cliente'],$value['agente_agendado']);
            $arrTmp[5] = "<a href='index.php?menu={$module_name}&id_campania_cliente={$value['id_campania_cliente']}&action=agendar'>Agendar</a>" . " / <a href='index.php?menu=hispana_clientes_datosbasicos&id_cliente=" . $value['id_cliente'] . "'>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,代码行数:55,代码来源:index.php


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