public function GetCatalog($menuname)
 {
     $menu = Catalogsys::model()->findbysql("select catalogval " . " from catalogsys a " . " inner join useraccess b on b.languageid = a.languageid " . " where lower(catalogname) = lower('" . $menuname . "') and lower(b.username) = lower('" . Yii::app()->user->id . "')");
     if ($menu != null) {
         return $menu->catalogval;
     } else {
         return $menuname;
     }
 }
            }
        },
        'cache': false
    });;
    return false;
}
</script>
<?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'createdialog', 'options' => array('title' => 'Form Dialog', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divcreate"></div>
<?php 
echo $this->renderPartial('_form', array('model' => $model));
$this->endWidget();
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'helpdialog', 'options' => array('title' => 'Help', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divhelp"></div>
<?php 
$this->endWidget();
?>
<h1><?php 
echo Catalogsys::model()->GetCatalog('materialgroup');
?>
</h1>
<?php 
$this->widget('ToolbarButton', array('isCreate' => true, 'isEdit' => true, 'isDelete' => true, 'isUpload' => true, 'UrlUpload' => 'index.php?r=materialgroup/upload', 'isDownload' => true, 'isRefresh' => true, 'isHelp' => true, 'OnClick' => "{helpdata(1)}", 'isRecordPage' => true, 'PageSize' => $pageSize, 'OnChange' => "\$.fn.yiiGridView.update('datagrid',{data:{pageSize: \$(this).val() }})"));
$this->widget('application.extensions.tipsy.Tipsy', array('fade' => false, 'gravity' => 'n', 'items' => array(array('id' => '#parentmatgroupcode', 'fallback' => Catalogsys::model()->getcatalog('entermaterialgroupid'), 'html' => true), array('id' => '#materialtypedescription', 'fallback' => Catalogsys::model()->getcatalog('entermaterialtypeid'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'materialtypeid'), 'fallback' => Catalogsys::model()->getcatalog('entermaterialtypeid'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'materialgroupcode'), 'fallback' => Catalogsys::model()->getcatalog('entermaterialgroupcode'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'description'), 'fallback' => Catalogsys::model()->getcatalog('enterdescription'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'parentmatgroupid'), 'fallback' => Catalogsys::model()->getcatalog('entermaterialgroupid'), 'html' => true))));
$this->widget('zii.widgets.grid.CGridView', array('id' => 'datagrid', 'dataProvider' => $model->search(), 'filter' => $model, 'selectableRows' => 1, 'template' => '{pager}<br>{items}{pager}', 'columns' => array(array('class' => 'CCheckBoxColumn', 'id' => 'ids'), array('name' => 'materialgroupid', 'visible' => false, 'value' => '$data->materialgroupid', 'htmlOptions' => array('width' => '1%')), array('name' => 'materialtypeid', 'value' => '($data->materialtype!==null)?$data->materialtype->description:""'), array('name' => 'materialgroupcode', 'value' => '$data->materialgroupcode', 'htmlOptions' => array('width' => '1%')), 'description', array('name' => 'parentmatgroupid', 'value' => '($data->parentmatgroup!==null)?$data->parentmatgroup->description:""'), array('class' => 'CCheckBoxColumn', 'name' => 'recordstatus', 'selectableRows' => '0', 'header' => 'Record Status', 'checked' => '$data->recordstatus'))));
?>

$this->breadcrumbs = array('Translocks');
$pageSize = Yii::app()->user->getState('pageSize', Yii::app()->params['defaultPageSize']);
?>
<script type="text/javascript">
function deletedata()
{jQuery.ajax({'url':'index.php?r=translock/delete','data':{'id':$.fn.yiiGridView.getSelection("datagrid")},'type':'post','dataType':'json','success':function(data)
{},'cache':false});;$.fn.yiiGridView.update('datagrid');return false;}
</script>
<script type="text/javascript">
function refreshdata()
{$.fn.yiiGridView.update('datagrid');return false;}
</script>
<script type="text/javascript">
function downloaddata() {
	window.open('/index.php?r=translock/download&id='+$.fn.yiiGridView.getSelection("datagrid"));
}
</script>
<?php 
$this->widget('application.extensions.tipsy.Tipsy', array('fade' => false, 'gravity' => 'n', 'items' => array(array('id' => array('model' => $model, 'attribute' => 'menuname'), 'fallback' => Catalogsys::model()->getcatalog('entermenuname'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'tableid'), 'fallback' => Catalogsys::model()->getcatalog('entertableid'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'lockedby'), 'fallback' => Catalogsys::model()->getcatalog('enterlockedby'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'lockeddate'), 'fallback' => Catalogsys::model()->getcatalog('enterlockeddate'), 'html' => true))));
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'helpdialog', 'options' => array('title' => 'Help', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
echo $this->renderPartial('_help');
$this->endWidget();
?>
<h1><?php 
echo Catalogsys::model()->GetCatalog('translock');
?>
</h1>
<?php 
$this->widget('ToolbarButton', array('isDelete' => true, 'isDownload' => true, 'isRefresh' => true, 'isHelp' => true, 'OnClick' => "{helpdata(1)}", 'isRecordPage' => true, 'PageSize' => $pageSize, 'OnChange' => "\$.fn.yiiGridView.update('datagrid',{data:{pageSize: \$(this).val() }})"));
$this->widget('zii.widgets.grid.CGridView', array('id' => 'datagrid', 'dataProvider' => $model->search(), 'filter' => $model, 'selectableRows' => 2, 'template' => '{pager}<br>{items}{pager}', 'columns' => array(array('class' => 'CCheckBoxColumn', 'id' => 'translockid'), array('name' => 'translockid', 'visible' => false, 'header' => 'ID', 'value' => '$data->translockid', 'htmlOptions' => array('width' => '1%')), 'menuname', 'tableid', 'lockedby', 'lockeddate')));
<?php

echo Catalogsys::model()->getcatalog('maritalstatushelp');
 public function actionUpload()
 {
     parent::actionUpload();
     $folder = $_SERVER['DOCUMENT_ROOT'] . Yii::app()->request->baseUrl . '/upload/';
     // folder for uploaded files
     $file = $folder . basename($_FILES['uploadfile']['name']);
     if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], $file)) {
         $row = 0;
         if (($handle = fopen($file, "r")) !== FALSE) {
             while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
                 if ($row > 0) {
                     $model = Tax::model()->findByPk((int) $data[0]);
                     if ($model === null) {
                         $model = new Tax();
                     }
                     $model->taxid = (int) $data[0];
                     $model->taxcode = $data[1];
                     $model->taxvalue = $data[2];
                     $model->description = $data[3];
                     $model->recordstatus = (int) $data[4];
                     try {
                         if (!$model->save()) {
                             $this->messages = $this->messages . Catalogsys::model()->getcatalog(' upload error at ' . $data[0]);
                         }
                     } catch (Exception $e) {
                         $this->messages = $this->messages . $e->getMessage();
                     }
                 }
                 $row++;
             }
         } else {
             $this->messages = $this->messages . ' memory or harddisk full';
         }
         fclose($handle);
     } else {
         $this->messages = $this->messages . ' check your directory permission';
     }
     if ($this->messages == '') {
         $this->messages = 'success';
     }
     echo $this->messages;
 }
<?php

echo Catalogsys::model()->getcatalog('usergrouphelp');
	});
</script>
<script type="text/javascript">
function downloaddata() {
	window.open('/index.php?r=purchasingorg/download&id='+$.fn.yiiGridView.getSelection("datagrid"));
}
</script>
<?php 
$this->widget('application.extensions.tipsy.Tipsy', array('fade' => false, 'gravity' => 'n', 'items' => array(array('id' => array('model' => $model, 'attribute' => 'purchasingorgcode'), 'fallback' => Catalogsys::model()->getcatalog('enterpurchasingorgcode'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'description'), 'fallback' => Catalogsys::model()->getcatalog('enterdescription'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'recordstatus'), 'fallback' => Catalogsys::model()->getcatalog('enterrecordstatus'), 'html' => true))));
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'createdialog', 'options' => array('title' => 'Form Dialog', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divcreate"></div>
<?php 
echo $this->renderPartial('_form', array('model' => $model));
$this->endWidget();
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'helpdialog', 'options' => array('title' => 'Help', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divhelp"></div>
<?php 
$this->endWidget();
?>
<h1><?php 
echo Catalogsys::model()->GetCatalog('purchasingorg');
?>
</h1>
<?php 
$this->widget('ToolbarButton', array('isCreate' => true, 'isEdit' => true, 'isDelete' => true, 'isUpload' => true, 'UrlUpload' => 'index.php?r=purchasingorg/upload', 'isDownload' => true, 'isRefresh' => true, 'isHelp' => true, 'OnClick' => "{helpdata(1)}", 'isRecordPage' => true, 'PageSize' => $pageSize, 'OnChange' => "\$.fn.yiiGridView.update('datagrid',{data:{pageSize: \$(this).val() }})"));
$this->widget('zii.widgets.grid.CGridView', array('id' => 'datagrid', 'dataProvider' => $model->search(), 'filter' => $model, 'selectableRows' => 1, 'template' => '{pager}<br>{items}{pager}', 'columns' => array(array('class' => 'CCheckBoxColumn', 'id' => 'ids'), array('name' => 'purchasingorgid', 'visible' => false, 'header' => 'ID', 'value' => '$data->purchasingorgid', 'htmlOptions' => array('width' => '1%')), array('name' => 'purchasingorgcode', 'value' => '$data->purchasingorgcode', 'htmlOptions' => array('width' => '1%')), 'description', array('class' => 'CCheckBoxColumn', 'name' => 'recordstatus', 'selectableRows' => '0', 'header' => 'Record Status', 'checked' => '$data->recordstatus'))));
?>

				}
			}
		});		
	});
</script>
<script type="text/javascript">
function downloaddata() {
	window.open('/index.php?r=religion/download&id='+$.fn.yiiGridView.getSelection("datagrid"));
}
</script>
<?php 
$this->widget('application.extensions.tipsy.Tipsy', array('fade' => false, 'gravity' => 'n', 'items' => array(array('id' => array('model' => $model, 'attribute' => 'religionname'), 'fallback' => Catalogsys::model()->getcatalog('enterreligionname'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'recordstatus'), 'fallback' => Catalogsys::model()->getcatalog('enterrecordstatus'), 'html' => true))));
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'createdialog', 'options' => array('title' => 'Form Dialog', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divcreate"></div>
<?php 
echo $this->renderPartial('_form', array('model' => $model));
$this->endWidget();
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'helpdialog', 'options' => array('title' => 'Help', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divhelp"></div>
<?php 
$this->endWidget();
?>
<h1><?php 
echo Catalogsys::model()->GetCatalog('religion');
?>
</h1>
<?php 
$this->widget('ToolbarButton', array('isCreate' => true, 'isEdit' => true, 'isDelete' => true, 'isUpload' => true, 'UrlUpload' => 'index.php?r=religion/upload', 'isDownload' => true, 'isRefresh' => true, 'isHelp' => true, 'OnClick' => "{helpdata(1)}", 'isRecordPage' => true, 'PageSize' => $pageSize, 'OnChange' => "\$.fn.yiiGridView.update('datagrid',{data:{pageSize: \$(this).val() }})"));
$this->widget('zii.widgets.grid.CGridView', array('id' => 'datagrid', 'dataProvider' => $model->search(), 'filter' => $model, 'selectableRows' => 1, 'afterAjaxUpdate' => 'function(id,data){ initTipsy(); }', 'template' => '{pager}<br>{items}{pager}', 'columns' => array(array('class' => 'CCheckBoxColumn', 'id' => 'ids'), array('name' => 'religionid', 'visible' => false, 'header' => 'ID', 'value' => '$data->religionid', 'htmlOptions' => array('width' => '1%')), 'religionname', array('class' => 'CCheckBoxColumn', 'name' => 'recordstatus', 'selectableRows' => '0', 'header' => 'Record Status', 'checked' => '$data->recordstatus'))));
	});
</script>
<script type="text/javascript">
function downloaddata() {
	window.open('/index.php?r=addresstype/download&id='+$.fn.yiiGridView.getSelection("datagrid"));
}
</script>
<?php 
$this->widget('application.extensions.tipsy.Tipsy', array('fade' => false, 'gravity' => 'n', 'items' => array(array('id' => array('model' => $model, 'attribute' => 'addresstypename'), 'fallback' => Catalogsys::model()->getcatalog('enteraddresstypename'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'recordstatus'), 'fallback' => Catalogsys::model()->getcatalog('enterrecordstatus'), 'html' => true))));
?>

<?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'createdialog', 'options' => array('title' => 'Form Dialog', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divcreate"></div>
<?php 
echo $this->renderPartial('_form', array('model' => $model));
$this->endWidget();
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'helpdialog', 'options' => array('title' => 'Help', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divhelp"></div>
<?php 
$this->endWidget();
?>
<h1><?php 
echo Catalogsys::model()->GetCatalog('addresstype');
?>
</h1>
<?php 
$this->widget('ToolbarButton', array('isCreate' => true, 'isEdit' => true, 'isDelete' => true, 'isUpload' => true, 'UrlUpload' => 'index.php?r=addresstype/upload', 'isDownload' => true, 'isRefresh' => true, 'isHelp' => true, 'OnClick' => "{helpdata(1)}", 'isRecordPage' => true, 'PageSize' => $pageSize, 'OnChange' => "\$.fn.yiiGridView.update('datagrid',{data:{pageSize: \$(this).val() }})"));
$this->widget('zii.widgets.grid.CGridView', array('id' => 'datagrid', 'dataProvider' => $model->search(), 'filter' => $model, 'selectableRows' => 1, 'afterAjaxUpdate' => 'function(id,data){ initTipsy(); }', 'template' => '{pager}<br>{items}{pager}', 'columns' => array(array('class' => 'CCheckBoxColumn', 'id' => 'addresstypeid'), array('name' => 'addresstypeid', 'visible' => false, 'header' => 'ID', 'value' => '$data->addresstypeid', 'htmlOptions' => array('width' => '1%')), 'addresstypename', array('class' => 'CCheckBoxColumn', 'name' => 'recordstatus', 'selectableRows' => '0', 'header' => 'Record Status', 'checked' => '$data->recordstatus'))));
<?php

echo Catalogsys::model()->getcatalog('groupaccesshelp');
				}
			}
		});		
	});
</script>
<script type="text/javascript">
function downloaddata() {
	window.open('/index.php?r=contacttype/download&id='+$.fn.yiiGridView.getSelection("datagrid"));
}
</script>
<?php 
$this->widget('application.extensions.tipsy.Tipsy', array('fade' => false, 'gravity' => 'n', 'items' => array(array('id' => array('model' => $model, 'attribute' => 'contacttypename'), 'fallback' => Catalogsys::model()->getcatalog('entercontacttypename'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'recordstatus'), 'fallback' => Catalogsys::model()->getcatalog('enterrecordstatus'), 'html' => true))));
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'createdialog', 'options' => array('title' => 'Form Dialog', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divcreate"></div>
<?php 
echo $this->renderPartial('_form', array('model' => $model));
$this->endWidget();
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'helpdialog', 'options' => array('title' => 'Help', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divhelp"></div>
<?php 
$this->endWidget();
?>
<h1><?php 
echo Catalogsys::model()->GetCatalog('contacttype');
?>
</h1>
<?php 
$this->widget('ToolbarButton', array('isCreate' => true, 'isEdit' => true, 'isDelete' => true, 'isUpload' => true, 'UrlUpload' => 'index.php?r=contacttype/upload', 'isDownload' => true, 'isRefresh' => true, 'isHelp' => true, 'OnClick' => "{helpdata(1)}", 'isRecordPage' => true, 'PageSize' => $pageSize, 'OnChange' => "\$.fn.yiiGridView.update('datagrid',{data:{pageSize: \$(this).val() }})"));
$this->widget('zii.widgets.grid.CGridView', array('id' => 'datagrid', 'dataProvider' => $model->search(), 'filter' => $model, 'selectableRows' => 1, 'afterAjaxUpdate' => 'function(id,data){ initTipsy(); }', 'template' => '{pager}<br>{items}{pager}', 'columns' => array(array('class' => 'CCheckBoxColumn', 'id' => 'contacttypeid'), array('name' => 'contacttypeid', 'visible' => false, 'header' => 'ID', 'value' => '$data->contacttypeid', 'htmlOptions' => array('width' => '1%')), 'contacttypename', array('class' => 'CCheckBoxColumn', 'name' => 'recordstatus', 'selectableRows' => '0', 'header' => 'Record Status', 'checked' => '$data->recordstatus'))));
				}
			}
		});		
	});
</script>
<script type="text/javascript">
function downloaddata() {
	window.open('/index.php?r=company/download&id='+$.fn.yiiGridView.getSelection("datagrid"));
}
</script>
<?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'createdialog', 'options' => array('title' => 'Form Dialog', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divcreate"></div>
<?php 
echo $this->renderPartial('_form', array('model' => $model, 'currency' => $currency, 'city' => $city));
$this->endWidget();
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'helpdialog', 'options' => array('title' => 'Help', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divhelp"></div>
<?php 
$this->endWidget();
?>
<h1><?php 
echo Catalogsys::model()->GetCatalog('company');
?>
</h1>
<?php 
$this->widget('ToolbarButton', array('isCreate' => true, 'isEdit' => true, 'isDelete' => true, 'isUpload' => true, 'UrlUpload' => 'index.php?r=company/upload', 'isDownload' => true, 'isRefresh' => true, 'isHelp' => true, 'OnClick' => "{helpdata(1)}", 'isRecordPage' => true, 'PageSize' => $pageSize, 'OnChange' => "\$.fn.yiiGridView.update('datagrid',{data:{pageSize: \$(this).val() }})"));
$this->widget('application.extensions.tipsy.Tipsy', array('fade' => false, 'gravity' => 'n', 'items' => array(array('id' => '#currencyname', 'fallback' => Catalogsys::model()->getcatalog('enterpopcurrencyname'), 'html' => true), array('id' => '#cityname', 'fallback' => Catalogsys::model()->getcatalog('enterpopcityname'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'companyname'), 'fallback' => Catalogsys::model()->getcatalog('entercompanyname'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'cityid'), 'fallback' => Catalogsys::model()->getcatalog('entercityid'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'currencyid'), 'fallback' => Catalogsys::model()->getcatalog('entercurrencyid'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'address'), 'fallback' => Catalogsys::model()->getcatalog('enteraddress'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'zipcode'), 'fallback' => Catalogsys::model()->getcatalog('enterzipcode'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'recordstatus'), 'fallback' => Catalogsys::model()->getcatalog('enterrecordstatus'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'taxno'), 'fallback' => Catalogsys::model()->getcatalog('entertaxno'), 'html' => true))));
$this->widget('zii.widgets.grid.CGridView', array('id' => 'datagrid', 'dataProvider' => $model->search(), 'filter' => $model, 'selectableRows' => 1, 'template' => '{pager}<br>{items}{pager}', 'columns' => array(array('class' => 'CCheckBoxColumn', 'id' => 'companyid'), array('name' => 'companyid', 'visible' => false, 'value' => '$data->companyid', 'htmlOptions' => array('width' => '1%')), 'companyname', 'address', array('name' => 'cityid', 'value' => '$data->city->cityname', 'htmlOptions' => array('width' => '1%')), 'zipcode', 'taxno', array('name' => 'currencyid', 'value' => '$data->currency->currencyname', 'htmlOptions' => array('width' => '1%')), array('class' => 'CCheckBoxColumn', 'name' => 'recordstatus', 'selectableRows' => '0', 'header' => 'Record Status', 'checked' => '$data->recordstatus'))));
<?php

echo Catalogsys::model()->getcatalog('purchasingorghelp');
 public function actionUpload()
 {
     parent::actionUpload();
     $folder = $_SERVER['DOCUMENT_ROOT'] . Yii::app()->request->baseUrl . '/upload/';
     // folder for uploaded files
     $file = $folder . basename($_FILES['uploadfile']['name']);
     if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], $file)) {
         $row = 0;
         if (($handle = fopen($file, "r")) !== FALSE) {
             while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
                 if ($row > 0) {
                     $model = Company::model()->findByPk((int) $data[0]);
                     if ($model === null) {
                         $model = new Company();
                     }
                     $model->companyid = (int) $data[0];
                     $model->companyname = $data[1];
                     $model->address = $data[2];
                     $city = City::model()->findbyattributes(array('cityname' => $data[3]));
                     if ($city !== null) {
                         $model->cityid = $city->cityid;
                     }
                     $model->zipcode = $data[4];
                     $model->taxno = $data[5];
                     $currency = Currency::model()->findbyattributes(array('currencyname' => $data[6]));
                     if ($currency !== null) {
                         $model->currencyid = $currency->currencyid;
                     }
                     $model->recordstatus = (int) $data[7];
                     try {
                         if (!$model->save()) {
                             $this->messages = $this->messages . Catalogsys::model()->getcatalog(' upload error at ' . $data[0]);
                         }
                     } catch (Exception $e) {
                         $this->messages = $this->messages . $e->getMessage();
                     }
                 }
                 $row++;
             }
         } else {
             $this->messages = $this->messages . ' memory or harddisk full';
         }
         fclose($handle);
     } else {
         $this->messages = $this->messages . ' check your directory permission';
     }
     if ($this->messages == '') {
         $this->messages = 'success';
     }
     echo $this->messages;
 }
<?php

echo Catalogsys::model()->getcatalog('accperiodhelp');
	});
</script>
<script type="text/javascript">
function downloaddata() {
	window.open('/index.php?r=identitytype/download&id='+$.fn.yiiGridView.getSelection("datagrid"));
}
</script>
<?php 
$this->widget('application.extensions.tipsy.Tipsy', array('fade' => false, 'gravity' => 'n', 'items' => array(array('id' => array('model' => $model, 'attribute' => 'identitytypename'), 'fallback' => Catalogsys::model()->getcatalog('enteridentitytypename'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'recordstatus'), 'fallback' => Catalogsys::model()->getcatalog('enterrecordstatus'), 'html' => true))));
?>

<?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'createdialog', 'options' => array('title' => 'Form Dialog', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divcreate"></div>
<?php 
echo $this->renderPartial('_form', array('model' => $model));
$this->endWidget();
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'helpdialog', 'options' => array('title' => 'Help', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divhelp"></div>
<?php 
$this->endWidget();
?>
<h1><?php 
echo Catalogsys::model()->GetCatalog('identitytype');
?>
</h1>
<?php 
$this->widget('ToolbarButton', array('isCreate' => true, 'isEdit' => true, 'isDelete' => true, 'isUpload' => true, 'UrlUpload' => 'index.php?r=identitytype/upload', 'isDownload' => true, 'isRefresh' => true, 'isHelp' => true, 'OnClick' => "{helpdata(1)}", 'isRecordPage' => true, 'PageSize' => $pageSize, 'OnChange' => "\$.fn.yiiGridView.update('datagrid',{data:{pageSize: \$(this).val() }})"));
$this->widget('zii.widgets.grid.CGridView', array('id' => 'datagrid', 'dataProvider' => $model->search(), 'filter' => $model, 'selectableRows' => 1, 'afterAjaxUpdate' => 'function(id,data){ initTipsy(); }', 'template' => '{pager}<br>{items}{pager}', 'columns' => array(array('class' => 'CCheckBoxColumn', 'id' => 'identitytypeid'), array('name' => 'identitytypeid', 'visible' => false, 'header' => 'ID', 'value' => '$data->identitytypeid', 'htmlOptions' => array('width' => '1%')), 'identitytypename', array('class' => 'CCheckBoxColumn', 'name' => 'recordstatus', 'selectableRows' => '0', 'header' => 'Record Status', 'checked' => '$data->recordstatus'))));
            }
        },
        'cache': false
    });;
    return false;
}
</script>
<?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'createdialog', 'options' => array('title' => 'Form Dialog', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divcreate"></div>
<?php 
echo $this->renderPartial('_form', array('model' => $model));
$this->endWidget();
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'helpdialog', 'options' => array('title' => 'Help', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divhelp"></div>
<?php 
$this->endWidget();
?>
<h1><?php 
echo Catalogsys::model()->GetCatalog('ownership');
?>
</h1>
<?php 
$this->widget('ToolbarButton', array('isCreate' => true, 'isEdit' => true, 'isDelete' => true, 'isUpload' => true, 'UrlUpload' => 'index.php?r=ownership/upload', 'isDownload' => true, 'isRefresh' => true, 'isHelp' => true, 'OnClick' => "{helpdata(1)}", 'isRecordPage' => true, 'PageSize' => $pageSize, 'OnChange' => "\$.fn.yiiGridView.update('datagrid',{data:{pageSize: \$(this).val() }})"));
$this->widget('application.extensions.tipsy.Tipsy', array('fade' => false, 'gravity' => 'n', 'items' => array(array('id' => array('model' => $model, 'attribute' => 'ownershipname'), 'fallback' => Catalogsys::model()->getcatalog('enterownershipname'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'recordstatus'), 'fallback' => Catalogsys::model()->getcatalog('enterrecordstatus'), 'html' => true))));
$this->widget('zii.widgets.grid.CGridView', array('id' => 'datagrid', 'dataProvider' => $model->search(), 'filter' => $model, 'selectableRows' => 1, 'template' => '{pager}<br>{items}{pager}', 'columns' => array(array('class' => 'CCheckBoxColumn', 'id' => 'ids'), array('name' => 'ownershipid', 'visible' => false, 'header' => 'ID', 'value' => '$data->ownershipid', 'htmlOptions' => array('width' => '1%')), array('name' => 'ownershipname', 'value' => '$data->ownershipname'), array('class' => 'CCheckBoxColumn', 'name' => 'recordstatus', 'selectableRows' => '0', 'header' => 'Record Status', 'checked' => '$data->recordstatus'))));
?>

				document.getElementById('divhelp').innerHTML = data.div;
                $('#helpdialog').dialog('open');
            } else {
                document.getElementById('messages').innerHTML = data.div;
            }
        },
        'cache': false
    });;
    return false;
}
</script>
<?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'createdialog', 'options' => array('title' => 'Form Dialog', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divcreate"></div>
<?php 
echo $this->renderPartial('_form', array('model' => $model));
$this->endWidget();
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'helpdialog', 'options' => array('title' => 'Help', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divhelp"></div>
<?php 
$this->endWidget();
?>
<h1><?php 
echo Catalogsys::model()->GetCatalog('employeestatus');
?>
</h1>
<?php 
$this->widget('ToolbarButton', array('isCreate' => true, 'isEdit' => true, 'isDelete' => true, 'isUpload' => true, 'UrlUpload' => 'index.php?r=employeestatus/upload', 'isDownload' => true, 'isRefresh' => true, 'isHelp' => true, 'OnClick' => "{helpdata(1)}", 'isRecordPage' => true, 'PageSize' => $pageSize, 'OnChange' => "\$.fn.yiiGridView.update('datagrid',{data:{pageSize: \$(this).val() }})"));
$this->widget('zii.widgets.grid.CGridView', array('id' => 'datagrid', 'dataProvider' => $model->search(), 'filter' => $model, 'selectableRows' => 1, 'template' => '{pager}<br>{items}{pager}', 'columns' => array(array('class' => 'CCheckBoxColumn', 'id' => 'ids'), array('name' => 'employeestatusid', 'visible' => false, 'header' => 'ID', 'value' => '$data->employeestatusid', 'htmlOptions' => array('width' => '1%')), 'employeestatusname', array('name' => 'taxvalue', 'type' => 'raw', 'value' => 'Yii::app()->numberFormatter->format(Yii::app()->params["defaultnumberprice"],$data->taxvalue)'), array('class' => 'CCheckBoxColumn', 'name' => 'recordstatus', 'selectableRows' => '0', 'header' => 'Record Status', 'checked' => '$data->recordstatus'))));
				}
			}
		});		
	});
</script>
<script type="text/javascript">
function downloaddata() {
	window.open('/index.php?r=orgstructure/download&id='+$.fn.yiiGridView.getSelection("datagrid"));
}
</script>
<?php 
$this->widget('application.extensions.tipsy.Tipsy', array('fade' => false, 'gravity' => 'n', 'items' => array(array('id' => '#parentstructurename', 'fallback' => Catalogsys::model()->getcatalog('enterparentid'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'structurename'), 'fallback' => Catalogsys::model()->getcatalog('enterstructurename'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'parentid'), 'fallback' => Catalogsys::model()->getcatalog('enterparentid'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'recordstatus'), 'fallback' => Catalogsys::model()->getcatalog('enterrecordstatus'), 'html' => true))));
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'createdialog', 'options' => array('title' => 'Form Dialog', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divcreate"></div>
<?php 
echo $this->renderPartial('_form', array('model' => $model, 'parent' => $parent));
$this->endWidget();
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'helpdialog', 'options' => array('title' => 'Help', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divhelp"></div>
<?php 
$this->endWidget();
?>
<h1><?php 
echo Catalogsys::model()->GetCatalog('orgstructure');
?>
</h1>
<?php 
$this->widget('ToolbarButton', array('isCreate' => true, 'isEdit' => true, 'isDelete' => true, 'isUpload' => true, 'UrlUpload' => 'index.php?r=orgstructure/upload', 'isDownload' => true, 'isRefresh' => true, 'isHelp' => true, 'OnClick' => "{helpdata(1)}", 'isRecordPage' => true, 'PageSize' => $pageSize, 'OnChange' => "\$.fn.yiiGridView.update('datagrid',{data:{pageSize: \$(this).val() }})"));
$this->widget('zii.widgets.grid.CGridView', array('id' => 'datagrid', 'dataProvider' => $model->search(), 'filter' => $model, 'selectableRows' => 1, 'afterAjaxUpdate' => 'function(id,data){ initTipsy(); }', 'template' => '{pager}<br>{items}{pager}', 'columns' => array(array('class' => 'CCheckBoxColumn', 'id' => 'ids'), array('name' => 'orgstructureid', 'visible' => false, 'header' => 'ID', 'value' => '$data->orgstructureid', 'htmlOptions' => array('width' => '1%')), 'structurename', array('name' => 'parentid', 'value' => '($data->parent!==null)?$data->parent->structurename:""'), array('class' => 'CCheckBoxColumn', 'name' => 'recordstatus', 'selectableRows' => '0', 'header' => 'Record Status', 'checked' => '$data->recordstatus'))));
<?php

echo Catalogsys::model()->getcatalog('hospitalcontacthelp');
	});
</script>
<script type="text/javascript">
function downloaddata() {
	window.open('/index.php?r=useraccess/download&id='+$.fn.yiiGridView.getSelection("datagrid"));
}
</script>
<?php 
$this->widget('application.extensions.tipsy.Tipsy', array('fade' => false, 'gravity' => 'n', 'items' => array(array('id' => '#languagename', 'fallback' => Catalogsys::model()->getcatalog('enterpoplanguagename'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'realname'), 'fallback' => Catalogsys::model()->getcatalog('enterrealname'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'username'), 'fallback' => Catalogsys::model()->getcatalog('enterusername'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'password'), 'fallback' => Catalogsys::model()->getcatalog('enterpassword'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'email'), 'fallback' => Catalogsys::model()->getcatalog('enteremail'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'phoneno'), 'fallback' => Catalogsys::model()->getcatalog('enterphoneno'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'languageid'), 'fallback' => Catalogsys::model()->getcatalog('enterlanguageid'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'recordstatus'), 'fallback' => Catalogsys::model()->getcatalog('enterrecordstatus'), 'html' => true))));
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'createdialog', 'options' => array('title' => 'Form Dialog', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divcreate"></div>
<?php 
echo $this->renderPartial('_form', array('model' => $model));
$this->endWidget();
?>

<?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'helpdialog', 'options' => array('title' => 'Help', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divhelp"></div>
<?php 
$this->endWidget();
?>
<h1><?php 
echo Catalogsys::model()->GetCatalog('useraccess');
?>
</h1>
<?php 
$this->widget('ToolbarButton', array('isCreate' => true, 'isEdit' => true, 'isDelete' => true, 'isUpload' => true, 'UrlUpload' => 'index.php?r=useraccess/upload', 'isDownload' => true, 'isRefresh' => true, 'isHelp' => true, 'OnClick' => "{helpdata(1)}", 'isRecordPage' => true, 'PageSize' => $pageSize, 'OnChange' => "\$.fn.yiiGridView.update('datagrid',{data:{pageSize: \$(this).val() }})"));
$this->widget('zii.widgets.grid.CGridView', array('id' => 'datagrid', 'dataProvider' => $model->search(), 'filter' => $model, 'selectableRows' => 1, 'template' => '{pager}<br>{items}{pager}', 'afterAjaxUpdate' => 'function(id,data){ initTipsy(); }', 'columns' => array(array('class' => 'CCheckBoxColumn', 'id' => 'useraccessid'), array('name' => 'useraccessid', 'visible' => false, 'header' => 'ID', 'value' => '$data->useraccessid', 'htmlOptions' => array('width' => '1%')), 'username', 'realname', 'email', 'phoneno', array('name' => 'languageid', 'value' => '($data->language!==null)?$data->language->languagename:""'), array('class' => 'CCheckBoxColumn', 'name' => 'recordstatus', 'selectableRows' => '0', 'header' => 'Record Status', 'checked' => '$data->recordstatus'))));
                    }
                });
    return false;
}
</script>
<script type="text/javascript">
function downloaddata() {
	window.open('/index.php?r=prheader/download&id='+$.fn.yiiGridView.getSelection("datagrid"));
}
</script>
<?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'createdialog', 'options' => array('title' => 'Form Dialog', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divcreate"></div>
<?php 
echo $this->renderPartial('_form', array('model' => $model, 'prmaterial' => $prmaterial));
$this->endWidget();
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'helpdialog', 'options' => array('title' => 'Help', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divhelp"></div>
<?php 
$this->endWidget();
?>
<h1><?php 
echo Catalogsys::model()->GetCatalog('prheader');
?>
</h1>
<?php 
$this->widget('ToolbarButton', array('isCreate' => true, 'isEdit' => true, 'isDelete' => true, 'isApprove' => true, 'isDownload' => true, 'isRefresh' => true, 'isHelp' => true, 'OnClick' => "{helpdata(1)}", 'isRecordPage' => true, 'PageSize' => $pageSize, 'OnChange' => "\$.fn.yiiGridView.update('datagrid',{data:{pageSize: \$(this).val() }})"));
$this->widget('zii.widgets.grid.CGridView', array('id' => 'datagrid', 'dataProvider' => $model->Searchwfstatus(), 'selectionChanged' => 'showdetail', 'filter' => $model, 'selectableRows' => 1, 'template' => '{pager}<br>{items}{pager}', 'columns' => array(array('class' => 'CCheckBoxColumn', 'id' => 'ids'), array('name' => 'prheaderid', 'visible' => false, 'header' => 'ID', 'value' => '$data->prheaderid', 'htmlOptions' => array('width' => '1%')), 'prno', 'headernote', array('name' => 'prdate', 'type' => 'raw', 'value' => 'date(Yii::app()->params["dateviewfromdb"], strtotime($data->prdate))'), array('name' => 'slocid', 'value' => '($data->sloc!==null)?$data->sloc->description:""'), array('name' => 'deliveryadviceid', 'value' => '($data->deliveryadvice!==null)?$data->deliveryadvice->dano:""'), array('header' => 'Status', 'value' => 'Wfstatus::model()->findstatusname("apppr",$data->recordstatus)'))));
$this->widget('zii.widgets.grid.CGridView', array('id' => 'indatagrid', 'dataProvider' => $prmaterial->Search(), 'template' => '{pager}<br>{items}{pager}', 'columns' => array(array('name' => 'prmaterialid', 'visible' => false, 'header' => 'ID', 'value' => '$data->prmaterialid', 'htmlOptions' => array('width' => '1%')), array('name' => 'productid', 'value' => '($data->product!==null)?$data->product->productname:""'), array('name' => 'qty', 'type' => 'raw', 'value' => 'Yii::app()->numberFormatter->format(Yii::app()->params["defaultnumberqty"],$data->qty)'), array('name' => 'unitofmeasureid', 'value' => '($data->unitofmeasure!==null)?$data->unitofmeasure->uomcode:""'), array('name' => 'requestedbyid', 'value' => '($data->requestedby!==null)?$data->requestedby->description:""'), array('name' => 'reqdate', 'type' => 'raw', 'value' => 'date(Yii::app()->params["dateviewfromdb"], strtotime($data->reqdate))'), 'itemtext')));
	});
</script>
<script type="text/javascript">
function downloaddata() {
	window.open('/index.php?r=workflow/download&id='+$.fn.yiiGridView.getSelection("datagrid"));
}
</script>
<?php 
$this->widget('application.extensions.tipsy.Tipsy', array('fade' => false, 'gravity' => 'n', 'items' => array(array('id' => array('model' => $model, 'attribute' => 'wfname'), 'fallback' => Catalogsys::model()->getcatalog('enterwfname'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'wfdesc'), 'fallback' => Catalogsys::model()->getcatalog('enterwfdesc'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'wfminstat'), 'fallback' => Catalogsys::model()->getcatalog('enterwfminstat'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'wfmaxstat'), 'fallback' => Catalogsys::model()->getcatalog('enterwfmaxstat'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'recordstatus'), 'fallback' => Catalogsys::model()->getcatalog('enterrecordstatus'), 'html' => true))));
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'createdialog', 'options' => array('title' => 'Form Dialog', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divcreate"></div>
<?php 
echo $this->renderPartial('_form', array('model' => $model));
$this->endWidget();
?>

<?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'helpdialog', 'options' => array('title' => 'Help', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divhelp"></div>
<?php 
$this->endWidget();
?>
<h1><?php 
echo Catalogsys::model()->GetCatalog('workflow');
?>
</h1>
<?php 
$this->widget('ToolbarButton', array('isCreate' => true, 'isEdit' => true, 'isDelete' => true, 'isUpload' => true, 'UrlUpload' => 'index.php?r=workflow/upload', 'isDownload' => true, 'isRefresh' => true, 'isHelp' => true, 'OnClick' => "{helpdata(1)}", 'isRecordPage' => true, 'PageSize' => $pageSize, 'OnChange' => "\$.fn.yiiGridView.update('datagrid',{data:{pageSize: \$(this).val() }})"));
$this->widget('zii.widgets.grid.CGridView', array('id' => 'datagrid', 'dataProvider' => $model->search(), 'filter' => $model, 'selectableRows' => 1, 'template' => '{pager}<br>{items}{pager}', 'columns' => array(array('class' => 'CCheckBoxColumn', 'id' => 'companyid'), array('name' => 'workflowid', 'visible' => false, 'value' => '$data->workflowid', 'htmlOptions' => array('width' => '1%')), 'wfname', 'wfdesc', 'wfminstat', 'wfmaxstat', array('class' => 'CCheckBoxColumn', 'name' => 'recordstatus', 'selectableRows' => '0', 'header' => 'Record Status', 'checked' => '$data->recordstatus'))));
				}
			}
		});		
	});
</script>
<script type="text/javascript">
function downloaddata() {
	window.open('/index.php?r=language/download&id='+$.fn.yiiGridView.getSelection("datagrid"));
}
</script>
<?php 
$this->widget('application.extensions.tipsy.Tipsy', array('fade' => false, 'gravity' => 'n', 'items' => array(array('id' => array('model' => $model, 'attribute' => 'languagename'), 'fallback' => Catalogsys::model()->getcatalog('enterlanguagename'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'recordstatus'), 'fallback' => Catalogsys::model()->getcatalog('enterrecordstatus'), 'html' => true))));
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'createdialog', 'options' => array('title' => 'Form Dialog', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divcreate"></div>
<?php 
echo $this->renderPartial('_form', array('model' => $model));
$this->endWidget();
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'helpdialog', 'options' => array('title' => 'Help', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divhelp"></div>
<?php 
$this->endWidget();
?>
<h1><?php 
echo Catalogsys::model()->GetCatalog('language');
?>
</h1>
<?php 
$this->widget('ToolbarButton', array('isCreate' => true, 'isEdit' => true, 'isDelete' => true, 'isUpload' => true, 'UrlUpload' => 'index.php?r=language/upload', 'isDownload' => true, 'isRefresh' => true, 'isHelp' => true, 'OnClick' => "{helpdata(1)}", 'isRecordPage' => true, 'PageSize' => $pageSize, 'OnChange' => "\$.fn.yiiGridView.update('datagrid',{data:{pageSize: \$(this).val() }})"));
$this->widget('zii.widgets.grid.CGridView', array('id' => 'datagrid', 'dataProvider' => $model->search(), 'filter' => $model, 'selectableRows' => 1, 'template' => '{pager}<br>{items}{pager}', 'columns' => array(array('class' => 'CCheckBoxColumn', 'id' => 'languageid'), array('name' => 'languageid', 'visible' => false, 'header' => 'ID', 'value' => '$data->languageid', 'htmlOptions' => array('width' => '1%')), 'languagename', array('class' => 'CCheckBoxColumn', 'name' => 'recordstatus', 'selectableRows' => '0', 'header' => 'Record Status', 'checked' => '$data->recordstatus'))));
<?php

echo Catalogsys::model()->getcatalog('sexhelp');
<?php

echo Catalogsys::model()->getcatalog('hospitalhelp');
}
</script>
<?php 
$this->widget('application.extensions.tipsy.Tipsy', array('fade' => false, 'gravity' => 'n', 'items' => array(array('id' => '#contacttype_name', 'fallback' => Catalogsys::model()->getcatalog('entercontacttypeid'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'fullname'), 'fallback' => Catalogsys::model()->getcatalog('enterfullname'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'permitexitname'), 'fallback' => Catalogsys::model()->getcatalog('entertaxno'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'accpiutangid'), 'fallback' => Catalogsys::model()->getcatalog('enteraccpiutangid'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'contacttypeid'), 'fallback' => Catalogsys::model()->getcatalog('entercontacttypeid'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'recordstatus'), 'fallback' => Catalogsys::model()->getcatalog('enterrecordstatus'), 'html' => true))));
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'createdialog', 'options' => array('title' => 'Form Dialog', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divcreate"></div>
<?php 
echo $this->renderPartial('_form', array('model' => $model, 'hospitaladdress' => $hospitaladdress, 'hospitalcontact' => $hospitalcontact, 'accpiutang' => $accpiutang));
$this->endWidget();
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'helpdialog', 'options' => array('title' => 'Help', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divhelp"></div>
<?php 
$this->endWidget();
?>
<h1><?php 
echo Catalogsys::model()->GetCatalog('hospital');
?>
</h1>
<?php 
$this->widget('ToolbarButton', array('isCreate' => true, 'isEdit' => true, 'isDelete' => true, 'isUpload' => true, 'UrlUpload' => 'index.php?r=hospital/upload', 'isDownload' => true, 'isRefresh' => true, 'isHelp' => true, 'OnClick' => "{helpdata(1)}", 'isRecordPage' => true, 'PageSize' => $pageSize, 'OnChange' => "\$.fn.yiiGridView.update('datagrid',{data:{pageSize: \$(this).val() }})"));
$this->widget('zii.widgets.grid.CGridView', array('id' => 'datagrid', 'dataProvider' => $model->search(), 'filter' => $model, 'selectableRows' => 1, 'selectionChanged' => 'showdetail', 'template' => '{pager}<br>{items}{pager}', 'columns' => array(array('class' => 'CCheckBoxColumn', 'id' => 'addressbookid'), array('name' => 'addressbookid', 'visible' => false, 'header' => 'ID', 'value' => '$data->addressbookid', 'htmlOptions' => array('width' => '1%')), 'fullname', 'taxno', array('name' => 'accpiutangid', 'value' => '($data->accpiutang!==null)?$data->accpiutang->accountname:""'), array('class' => 'CCheckBoxColumn', 'name' => 'recordstatus', 'selectableRows' => '0', 'header' => 'Record Status', 'checked' => '$data->recordstatus'))));
?>

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'inaddressdatagrid', 'dataProvider' => $hospitaladdress->search(), 'template' => '{pager}<br>{items}{pager}', 'columns' => array(array('name' => 'addressid', 'visible' => false, 'header' => 'ID', 'value' => '$data->addressid', 'htmlOptions' => array('width' => '1%')), array('name' => 'addressbookid', 'visible' => false, 'value' => '$data->addressbookid', 'htmlOptions' => array('width' => '1%')), array('name' => 'addresstypeid', 'header' => 'Address Type Name', 'value' => '$data->addresstype->addresstypename'), 'addressname', 'rt', 'rw', array('name' => 'cityid', 'header' => 'City', 'value' => '($data->city!==null)?$data->city->cityname:""'), array('name' => 'kelurahanid', 'header' => 'Sub Subdistrict', 'value' => '($data->kelurahan!==null)?$data->kelurahan->kelurahanname:""'), array('name' => 'subdistrictid', 'header' => 'Subdistrict', 'value' => '($data->subdistrict!==null)?$data->subdistrict->subdistrictname:""'), 'phoneno')));
?>

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'incontactdatagrid', 'dataProvider' => $hospitalcontact->search(), 'template' => '{pager}<br>{items}{pager}', 'columns' => array(array('name' => 'addresscontactid', 'visible' => false, 'header' => 'ID', 'value' => '$data->addresscontactid', 'htmlOptions' => array('width' => '1%')), array('name' => 'addressbookid', 'visible' => false, 'value' => '$data->addressbookid', 'htmlOptions' => array('width' => '1%')), array('name' => 'contacttypeid', 'value' => '($data->contacttype!==null)?$data->contacttype->contacttypename:""'), 'addresscontactname', 'phoneno', 'mobilephone', 'emailaddress')));
</script>
<script type="text/javascript">
function showdetail() {
    $.fn.yiiGridView.update('indatagrid', {
                    data: {
                        'Prmaterial[prheaderid]': $.fn.yiiGridView.getSelection("datagrid")[0]
                    }
                });
    return false;
}
</script>
<script type="text/javascript">
function downloaddata() {
	window.open('/smdev/index.php?r=prheader/download&id='+$.fn.yiiGridView.getSelection("datagrid"));
}
</script>
<?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'helpdialog', 'options' => array('title' => 'Help', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divhelp"></div>
<?php 
$this->endWidget();
?>
<h1><?php 
echo Catalogsys::model()->GetCatalog('reportpr');
?>
</h1>
<?php 
$this->widget('ToolbarButton', array('isDownload' => true, 'isRefresh' => true, 'isHelp' => true, 'OnClick' => "{helpdata(1)}", 'isRecordPage' => true, 'PageSize' => $pageSize, 'OnChange' => "\$.fn.yiiGridView.update('datagrid',{data:{pageSize: \$(this).val() }})"));
$this->widget('zii.widgets.grid.CGridView', array('id' => 'datagrid', 'dataProvider' => $model->Search(), 'selectionChanged' => 'showdetail', 'filter' => $model, 'selectableRows' => 1, 'template' => '{pager}<br>{items}{pager}', 'columns' => array(array('class' => 'CCheckBoxColumn', 'id' => 'ids'), array('name' => 'prheaderid', 'visible' => false, 'header' => 'ID', 'value' => '$data->prheaderid', 'htmlOptions' => array('width' => '1%')), 'prno', 'headernote', array('name' => 'prdate', 'type' => 'raw', 'value' => 'date(Yii::app()->params["dateviewfromdb"], strtotime($data->prdate))'), array('name' => 'slocid', 'value' => '($data->sloc!==null)?$data->sloc->description:""'), array('name' => 'deliveryadviceid', 'value' => '($data->deliveryadvice!==null)?$data->deliveryadvice->dano:""'), array('header' => 'Status', 'value' => 'Wfstatus::model()->findstatusname("apppr",$data->recordstatus)'))));
$this->widget('zii.widgets.grid.CGridView', array('id' => 'indatagrid', 'dataProvider' => $prmaterial->Search(), 'template' => '{pager}<br>{items}{pager}', 'columns' => array(array('name' => 'prmaterialid', 'visible' => false, 'header' => 'ID', 'value' => '$data->prmaterialid', 'htmlOptions' => array('width' => '1%')), array('name' => 'productid', 'value' => '($data->product!==null)?$data->product->productname:""'), array('name' => 'qty', 'type' => 'raw', 'value' => 'Yii::app()->numberFormatter->format(Yii::app()->params["defaultnumberqty"],$data->qty)'), array('name' => 'unitofmeasureid', 'value' => '($data->unitofmeasure!==null)?$data->unitofmeasure->uomcode:""'), array('name' => 'requestedbyid', 'value' => '($data->requestedby!==null)?$data->requestedby->description:""'), array('name' => 'reqdate', 'type' => 'raw', 'value' => 'date(Yii::app()->params["dateviewfromdb"], strtotime($data->reqdate))'), 'itemtext')));
            }
        },
        'cache': false
    });;
    return false;
}
</script>
<?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'createdialog', 'options' => array('title' => 'Form Dialog', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divcreate"></div>
<?php 
echo $this->renderPartial('_form', array('model' => $model, 'plant' => $plant));
$this->endWidget();
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'helpdialog', 'options' => array('title' => 'Help', 'autoOpen' => false, 'modal' => true, 'width' => 'auto', 'height' => 'auto')));
?>
<div id="divhelp"></div>
<?php 
$this->endWidget();
?>
<h1><?php 
echo Catalogsys::model()->GetCatalog('sloc');
?>
</h1>
<?php 
$this->widget('ToolbarButton', array('isCreate' => true, 'isEdit' => true, 'isDelete' => true, 'isUpload' => true, 'UrlUpload' => 'index.php?r=sloc/upload', 'isDownload' => true, 'isRefresh' => true, 'isHelp' => true, 'OnClick' => "{helpdata(1)}", 'isRecordPage' => true, 'PageSize' => $pageSize, 'OnChange' => "\$.fn.yiiGridView.update('datagrid',{data:{pageSize: \$(this).val() }})"));
$this->widget('application.extensions.tipsy.Tipsy', array('fade' => false, 'gravity' => 'n', 'items' => array(array('id' => '#plant_code', 'fallback' => Catalogsys::model()->getcatalog('enterplantid'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'plantid'), 'fallback' => Catalogsys::model()->getcatalog('enterplantid'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'sloccode'), 'fallback' => Catalogsys::model()->getcatalog('entersloccode'), 'html' => true), array('id' => array('model' => $model, 'attribute' => 'description'), 'fallback' => Catalogsys::model()->getcatalog('enterdescription'), 'html' => true))));
$this->widget('zii.widgets.grid.CGridView', array('id' => 'datagrid', 'dataProvider' => $model->search(), 'filter' => $model, 'selectableRows' => 1, 'template' => '{pager}<br>{items}{pager}', 'columns' => array(array('class' => 'CCheckBoxColumn', 'id' => 'ids'), array('name' => 'slocid', 'visible' => false, 'header' => 'ID', 'value' => '$data->slocid', 'htmlOptions' => array('width' => '1%')), array('name' => 'plantid', 'header' => 'Plant', 'value' => '$data->plant->plantcode', 'htmlOptions' => array('width' => '1%')), 'sloccode', 'description', array('class' => 'CCheckBoxColumn', 'name' => 'recordstatus', 'selectableRows' => '0', 'header' => 'Record Status', 'checked' => '$data->recordstatus'))));
?>

<?php

echo Catalogsys::model()->getcatalog('prheaderhelp');