dec($task);}}
switch($task)
{
case "default":
$this->fn_default_sum();
break;
case $task:
$task="fn_".$task;
if(method_exists($this,$task)){$this->$task();}
break;
default:
$this->fn_default_sum();
break;
}
}
public function fn_default_sum()
{
echo $this->FN_CREATEHEADER();
echo "";
echo "";
echo $this->FN_CLOSEHEADER();
echo $this->FN_CREATEBODY();
echo $this->FN_CREATEFOOTER();
}
public function fn_sumofyears()
{
$years=$_REQUEST['years'];
// $qry="select sum(totalsms) sumofyears from ".DB_DMCS.".tbl_smsc_sumyears where years='$years' and isdeleted=0";
// $sumofyears=$this->fn_get_fieldvalue("sumofyears",$qry);
//echo $sumofyears;
echo "5234";
}
public function fn_sumoftop5()
{
$years=$_REQUEST['years'];
$months=$_REQUEST['months'];
// $qry="select uptname,totalsms from ".DB_DMCS.".tbl_smsc_sumtop5month where years='$years' and period='$months' and isdeleted=0 order by totalsms desc";
// $rs=$this->selectquery($qry);
// if($rs)
// {
// $res=array();
// while($rw=$this->data_row_object($rs))
// {
// array_push($res,array($rw->uptname."|".$rw->totalsms));
// }
// echo json_encode($res);
// }
// $this->clearrecordset($rs);
}
public function fn_sumoftop3()
{
$years=$_REQUEST['years'];
$months=$_REQUEST['months'];
// $qry="select uptname,totalsms from ".DB_DMCS.".tbl_smsc_sumtop3years where years='$years' and isdeleted=0 order by totalsms desc";
// $rs=$this->selectquery($qry);
// if($rs)
// {
// $res=array();
// while($rw=$this->data_row_object($rs))
// {
// array_push($res,array($rw->uptname."|".$rw->totalsms));
// }
// echo json_encode($res);
// }
// $this->clearrecordset($rs);
}
}
?>