本文整理汇总了PHP中Catalogsys类的典型用法代码示例。如果您正苦于以下问题:PHP Catalogsys类的具体用法?PHP Catalogsys怎么用?PHP Catalogsys使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Catalogsys类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetCatalog
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;
}
}
示例2: array
}
},
'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'))));
?>
示例3:
<?php
echo Catalogsys::model()->getcatalog('maritalstatushelp');
示例4: actionUpload
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;
}
示例5: downloaddata
});
</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'))));
?>
示例6: actionUpload
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;
}
示例7: showdetail
</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')));