i am using the Ireport to do the interface of my report and i want to combine it with the ATK Framework using Zend studion.
but when i click "Print"(cetak), the page is blank. and the url showing the nokp=array.
is there anything wrong with my coding? please help. thank you.
<?php
atkimport("modules.report.dateutil");
atkimport("atk.utils.atkmessagequeue");
useattrib("atkTextAttribute");
// (1) ===================================
//class (nama class) extends atkNode{
class laporan_projek extends atkNode{
// (2) =================================
// function (nama class) (){
function laporan_projek (){
// (3) ====================================================
//$this->atkNode("nama class",NF_NO_ADD|NF_NO_DELETE|NF_NO_EDIT|NF_NO_SECURITY);
$this->atkNode("laporan_projek",NF_NO_ADD|NF_NO_DELETE|NF_NO_EDIT|NF_NO_SECURITY);
$this->addAllowedAction("report");
}//end construction
function action_report()
//
{
$ui = &$this->getUi();
global $g_sessionManager,$ATK_VARS;
$g_db=&atkGetDb();
$page=&$this->getPage();
$theme = &atkinstance("atk.ui.atktheme");
$page->register_style($theme->stylePath("style.css"));
$page->register_script(atkconfig("atkroot")."javascript/chainedselects.js");
$output='<form action="'.$_SERVER["PHP_SELF"].'" method="get" id="entryform" name="entryform">';
// (4) ======================================================
//$output.='<input type="hidden" name="atknodetype" value="nama folder.nama class">';
$output.='<input type="hidden" name="atknodetype" value="laporan.laporan_projek">';
$output.='<input type="hidden" name="atkaction" value="report">';
$attdatestart= $this->add(new atkDateAttribute("datestart","d F Y","d F Y",0,0,AF_OBLIGATORY));
$attdateend=$this->add(new atkDateAttribute("dateend","d F Y","d F Y",0,0,AF_OBLIGATORY));
//============================================================
$nokp=$this->add(new atkAttribute("nokp",0,0,AF_OBLIGATORY));
//$ic=$this->add(new atkAttribute("ic",0,0,AF_OBLIGATORY));
$dummyrec = array("datestart"=>array("year"=>$this->m_postvars['datestart']['year'],
"month"=>$this->m_postvars['datestart']['month'],
"day"=>$this->m_postvars['datestart']['day']));
$dummyrec1=array("dateend"=>array("year"=>$this->m_postvars['dateend']['year'],
"month"=>$this->m_postvars['dateend']['month'],
"day"=>$this->m_postvars['dateend']['day']));
//===============================================================
//$dummyrec2=array("nokp"=>array("nokp"=>$this->m_postvars['nokp']));
$dummyrec2= $this->m_postvars['nokp'];
//$dummyrec2=array("ic"=>array("nokp"=>$this->m_postvars['ic']['nokp']));
//$data1[]= array(atktext("Tarikh Terima Mula : "),$attdatestart->edit($dummyrec).atktext(" Hingga ").$attdateend->edit($dummyrec1));
$data[]= array(atktext("Tarikh Terima Mula : "),$attdatestart->edit($dummyrec).atktext(" Hingga ").$attdateend->edit($dummyrec1)
.atkText("No Kad Pengenalan:"),$nokp->edit($dummyrec2));
//===============================================================
//$data2[]= array(atkText("No Kad Pengenalan: "),$nokp->edit($dummyrec2));
//$data[]= array(atkText("No Kad Pengenalan: "),$ic->edit($dummyrec2));
$tbl = &atknew("atk.utils.atktablerenderer");
$output.=$tbl->render($data);
// $output.=$tbl->render($data2);
$output.='<input type="submit" value="'.atktext("REFRESH").'">';
$output.= '<div align=center>'.$this->getprojek().'</div>';
$output.='</form>';
$firstbox=$ui->renderAction($action, array("content"=>$content,
"formstart"=>$output,
"formend"=>'</form>',
"buttons"=>$buttons));
$boxedoutput= $ui->renderBox(array("title"=>$this->actionTitle('report'),
"content"=>$firstbox));
$page->addContent($this->renderActionPage("admin", $boxedoutput));
}
function getprojek()
{
global $g_sessionManager,$ATK_VARS;
$g_db=&atkGetDb();
$this->addStyle("style.css");
$ui = &$this->getUi();
$datestart= date("Y-m-d", mktime(0,0,0,$ATK_VARS['datestart']['month'], $ATK_VARS['datestart']['day'],$ATK_VARS['datestart']['year']));
$dateend= date("Y-m-d", mktime(0,0,0,$ATK_VARS['dateend']['month'], $ATK_VARS['dateend']['day'],$ATK_VARS['dateend']['year']));
$daerah=$getdaerah[1];
//===================================
$nokp= stringfields(mkdir(0,$ATK_VARS['nokp']));
//$ic= text("string", mkdir(0,0,$ATK_VARS['ic']['nokp']));
//$nokp= text("nokp",mkdir(string $nokp[,bool $recursive=false][,resourse] ),($ATK_VARS['nokp']));
//bool mkdir ( string $pathname [, int $mode = 0777 [, bool $recursive = false [, resource $context ]]] )
//$nokp=stringfields($nokp),mktime(0,$ATK_VARS['nokp']);
// (5) ============================================================(declare param yg dtmbah eg.nokp)
//$path=atkconfig("atkroot")."laporan/reportprojek.php?start={$datestart}&end={$dateend}";
//$path=atkconfig("atkroot")."(nama folder tmpt smpan ireport / nama class declare ireport).php?start={$datestart}&end={$dateend}&nokp={$nokp}";
$path=atkconfig("atkroot")."laporan/reportprojek.php?start={$datestart}&end={$dateend}&nokp={$nokp}";
$url='javascript:window.open("'.$path.'","myreport");return false;';
$output.='<center><input type="submit" onclick='.$url.' value="'.atktext("CETAK").'"><center>';
return $output;
}
}
?>

New Topic/Question
This topic is locked




MultiQuote



|