Quantcast
Channel: ASPRunner forums
Viewing all articles
Browse latest Browse all 2586

Semi Automatic Tabs on List Page

$
0
0
Good afternoon;

First of all I commented that my programming in PHP and the like is minimal.

I am trying to automate the creation of tabs in the list page with the help of some arrays.
Tabs should group by month and year.

In the code I have, the tabs are generated, but clicking on them does not show the data properly.



Any help is welcome

(Google translator)

List page Before Process Event
---------------------------------


$anos = array('2014', '2015', '2016', '2017', '2018','2019');
$mes = array('01', '02', '03', '04','05', '06', '07', '08','09', '10', '11', '12');
$mesp = array('ENE-', 'FEB-', 'MAR-', 'ABR-','MAY-', 'JUN-', 'JUL-', 'AGO-','SEP-', 'OCT-', 'NOV-', 'DIC-');
$identificador = 1;
global $conn;
foreach ($anos as $valor)	{
    $rano = $valor;
    $contador = 1;
    foreach ($mes as $valor)		{
        $rmes = $valor;
        $strSQLExists = "SELECT EMISION from dbo.DVCSII where MONTH(dbo.DVCSII.EMISION) = ".$rmes." AND YEAR(dbo.DVCSII.EMISION) = '".$rano."'";
        $rsExists = db_query($strSQLExists,$conn);
        $data=db_fetch_array($rsExists);

        if($data)	{
            $etiqueta = $mesp[$contador].$rano;
            $pageObject->addTab("MONTH(dbo.DVCSII.EMISION) = ".$rmes."AND YEAR(dbo.DVCSII.EMISION) = '".$rano."'", $etiqueta,$identificador);
            $contador++;
          $identificador++;
 			}
        }
        unset($rmes);
}
unset($rano);




Viewing all articles
Browse latest Browse all 2586