";
}
/** Function to get the StdfilterHTML strings for the given primary module
* @ param $module : Type String
* @ param $selected : Type String(optional)
* This Generates the HTML Combo strings for the standard filter for the given reports module
* This Returns a HTML sring
*/
function getPrimaryStdFilterHTML($module,$selected="")
{
global $app_list_strings;
global $ogReport;
global $current_language;
$ogReport->oCustomView=new CustomView();
$result = $ogReport->oCustomView->getStdCriteriaByModule($module);
$mod_strings = return_module_language($current_language,$module);
if(isset($result))
{
foreach($result as $key=>$value)
{
if(isset($mod_strings[$value]))
{
if($key == $selected)
{
$shtml .= "";
}else
{
$shtml .= "";
}
}else
{
if($key == $selected)
{
$shtml .= "";
}else
{
$shtml .= "";
}
}
}
}
return $shtml;
}
/** Function to get the StdfilterHTML strings for the given secondary module
* @ param $module : Type String
* @ param $selected : Type String(optional)
* This Generates the HTML Combo strings for the standard filter for the given reports module
* This Returns a HTML sring
*/
function getSecondaryStdFilterHTML($module,$selected="")
{
global $app_list_strings;
global $ogReport;
global $current_language;
$ogReport->oCustomView=new CustomView();
if($module != "")
{
$secmodule = explode(":",$module);
for($i=0;$i < count($secmodule) ;$i++)
{
$result = $ogReport->oCustomView->getStdCriteriaByModule($secmodule[$i]);
$mod_strings = return_module_language($current_language,$secmodule[$i]);
if(isset($result))
{
foreach($result as $key=>$value)
{
if(isset($mod_strings[$value]))
{
if($key == $selected)
{
$shtml .= "";
}else
{
$shtml .= "";
}
}else
{
if($key == $selected)
{
$shtml .= "";
}else
{
$shtml .= "";
}
}
}
}
}
}
return $shtml;
}
/** Function to get the reports under a report folder
* @ param $folderid : Type Integer
* This Returns $reports_array in the following format
* $reports_array = array ($reportid=>$reportname,$reportid=>$reportname1,.............,$reportidn=>$reportname)
*/
function getReportsinFolder($folderid)
{
global $adb;
$query = 'select reportid,reportname from vtiger_report where folderid=?';
$result = $adb->pquery($query, array($folderid));
$reports_array = Array();
for($i=0;$i < $adb->num_rows($result);$i++)
{
$reportid = $adb->query_result($result,$i,'reportid');
$reportname = $adb->query_result($result,$i,'reportname');
$reports_array[$reportid] = $reportname;
}
if(count($reports_array) > 0)
return $reports_array;
else
return false;
}
?>