/** * 构造方法 * @param null * @return boolean */ public function __construct($app) { parent::__construct($app); // $this->notify_url = kernel::openapi_url('openapi.ectools_payment/parse/weixin/weixin_payment_plugin_wxpayjsapi', 'callback'); $this->notify_url = url::to('wap/wxpayjsapi.html'); #test $this->submit_charset = 'UTF-8'; $this->signtype = 'sha1'; }
public function exceptionHandler($exception) { //如果不是逻辑错误, 则抛出让ecos处理. 如果是逻辑错误那么跳转页面 if (!$exception instanceof LogicException) { throw $exception; } $msg = $exception->getMessage(); $this->splash('error', $this->_action_url, $msg); return url::to($this->_action_url); }
function statusIssue($model) { if ($model->STATUS == 1) { /*REVIEW*/ // return Html::a('<i class="fa fa-square-o fa-md"></i> REVIEW','#',['class'=>'btn btn-info btn-xs', 'style'=>['width'=>'100px'],'title'=>'Review']); return Html::button(Yii::t('app', 'Review'), ['value' => url::to(['link-berita', 'id' => $model->ID]), 'id' => 'modal-btn-issue', 'class' => "btn btn-info btn-xs", 'style' => ['width' => '100px']]); } elseif ($model->STATUS == 2) { /*PROCESS*/ return Html::a('<i class="fa fa-check-square-o fa-md"></i> OPEN', url::toRoute(['/widget/berita/detail-berita-open', 'id' => $model->ID_ISSUE_REF]), ['class' => 'btn btn-success btn-xs', 'style' => ['width' => '100px'], 'title' => 'Process']); } elseif ($model->STATUS == 3) { /*CLODED*/ return Html::a('<i class="glyphicon glyphicon-remove"></i> CLOSED', url::toRoute(['/widget/berita/detail-berita-open', 'id' => $model->ID_ISSUE_REF]), ['class' => 'btn btn-danger btn-xs', 'style' => ['width' => '100px'], 'title' => 'Closed']); } }
/** * ShopEx licence * * @copyright Copyright (c) 2005-2010 ShopEx Technologies Inc. (http://www.shopex.cn) * @license http://ecos.shopex.cn/ ShopEx License */ function theme_widget_nav($setting) { $cur_url = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; $setting['max_leng'] = $setting['max_leng'] ? $setting['max_leng'] : 7; $setting['showinfo'] = $setting['showinfo'] ? $setting['showinfo'] : app::get('b2c')->_("更多"); foreach ($setting['urls'] as $key => $val) { $ret[$key]['title'] = $val['title']; $ret[$key]['url'] = url::to($val['link']); if (request::url() == $ret[$key]['url']) { $ret[$key]['hilight'] = true; } } return $ret; //$result; }
<?php use kartik\helpers\Html; use yii\helpers\Url; use yii\helpers\Json; use yii\web\Response; use yii\helpers\ArrayHelper; use yii\web\Request; use yii\bootstrap\Modal; use ptrnov\fusionchart\Chart; use ptrnov\fusionchart\ChartAsset; ChartAsset::register($this); $btn_srchChart = Html::button(Yii::t('app', 'Search Date'), ['value' => url::to(['ambil-tanggal-chart']), 'id' => 'modalButtonChartTgl', 'class' => "btn btn-info btn-sm"]); $mslineCustomerVisit = Chart::Widget(['urlSource' => url::base() . '/dashboard/rpt-esm-chart-salesmd/visit', 'userid' => '*****@*****.**', 'dataArray' => '[]', 'dataField' => '[]', 'type' => 'msline', 'renderid' => 'msline-salesmd-visit', 'autoRender' => true, 'width' => '100%', 'height' => '500%', 'chartOption' => ['caption' => 'Daily Customers Visits', 'subCaption' => 'Custommer Call, Active Customer, Efictif Customer', 'xaxisName' => 'Parents', 'yaxisName' => 'Total Child ', 'theme' => 'fint', 'is2D' => "0", 'showValues' => "1", 'palettecolors' => "#583e78,#008ee4,#f8bd19,#e44a00,#6baa01,#ff2e2e", 'bgColor' => "#ffffff", 'showBorder' => "0", 'showCanvasBorder' => "0"]]); $mslineCustomerVisitStock = Chart::Widget(['urlSource' => url::base() . '/dashboard/rpt-esm-chart-salesmd/visit-stock', 'userid' => '*****@*****.**', 'dataArray' => '[]', 'dataField' => '[]', 'type' => 'mscolumn3d', 'renderid' => 'msline-salesmd-visit-stock', 'autoRender' => true, 'width' => '100%', 'height' => '500%', 'chartOption' => ['caption' => 'Daily Customers Visits', 'subCaption' => 'Custommer Call, Active Customer, Efictif Customer', 'xaxisName' => 'Parents', 'yaxisName' => 'Total Child ', 'theme' => 'fint', 'is2D' => "0", 'showValues' => "1", 'palettecolors' => "#583e78,#008ee4,#f8bd19,#e44a00,#6baa01,#ff2e2e", 'bgColor' => "#ffffff", 'showBorder' => "0", 'showCanvasBorder' => "0"]]); $mslineCustomerVisitRequest = Chart::Widget(['urlSource' => url::base() . '/dashboard/rpt-esm-chart-salesmd/visit-request', 'userid' => '*****@*****.**', 'dataArray' => '[]', 'dataField' => '[]', 'type' => 'mscolumn3d', 'renderid' => 'msline-salesmd-visit-request', 'autoRender' => true, 'width' => '100%', 'height' => '500%', 'chartOption' => ['caption' => 'Daily Customers Visits', 'subCaption' => 'Custommer Call, Active Customer, Efictif Customer', 'xaxisName' => 'Parents', 'yaxisName' => 'Total Child ', 'theme' => 'fint', 'is2D' => "0", 'showValues' => "1", 'palettecolors' => "#583e78,#008ee4,#f8bd19,#e44a00,#6baa01,#ff2e2e", 'bgColor' => "#ffffff", 'showBorder' => "0", 'showCanvasBorder' => "0"]]); $mslineCustomerVisitSellout = Chart::Widget(['urlSource' => url::base() . '/dashboard/rpt-esm-chart-salesmd/visit-sellout', 'userid' => '*****@*****.**', 'dataArray' => '[]', 'dataField' => '[]', 'type' => 'mscolumn3d', 'renderid' => 'msline-salesmd-visit-sellout', 'autoRender' => true, 'width' => '100%', 'height' => '500%', 'chartOption' => ['caption' => 'Daily Customers Visits', 'subCaption' => 'Custommer Call, Active Customer, Efictif Customer', 'xaxisName' => 'Parents', 'yaxisName' => 'Total Child ', 'theme' => 'fint', 'is2D' => "0", 'showValues' => "1", 'palettecolors' => "#583e78,#008ee4,#f8bd19,#e44a00,#6baa01,#ff2e2e", 'bgColor' => "#ffffff", 'showBorder' => "0", 'showCanvasBorder' => "0"]]); ?> <div class="container-fluid" style="font-family: verdana, arial, sans-serif ;font-size: 8pt; padding-top:-150px"> <div class="col-xs-12 col-sm-12 col-dm-12 col-lg-12"> <div class="row" style="padding-bottom:10px" > <?php echo $btn_srchChart; ?> </div> </div> <div class="col-xs-12 col-sm-12 col-dm-12 col-lg-12"> <div class="row" >
public function configure() { // load all available config files $root = $this->roots()->config(); $configs = array('main' => $root . DS . 'config.php', 'host' => $root . DS . 'config.' . server::get('HTTP_HOST') . '.php', 'addr' => $root . DS . 'config.' . server::get('SERVER_ADDR') . '.php'); foreach ($configs as $config) { if (file_exists($config)) { include_once $config; } } // apply the options $this->options = array_merge($this->options, c::$data); // connect the url class with its handlers url::$home = $this->urls()->index(); url::$to = $this->option('url.to', function ($url = '') { if (url::isAbsolute($url)) { return $url; } $start = substr($url, 0, 1); switch ($start) { case '#': return $url; break; case '.': return page()->url() . '/' . $url; break; default: // don't convert absolute urls return url::makeAbsolute($url); break; } }); // setup the thumbnail generator thumb::$defaults['root'] = $this->roots->thumbs(); thumb::$defaults['url'] = $this->urls->thumbs(); thumb::$defaults['driver'] = $this->option('thumbs.driver'); thumb::$defaults['filename'] = $this->option('thumbs.filename'); }
?> <div class="yboard-ban-index"> <p class="header2"><?php echo Html::encode($this->title); ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'user_id', 'value' => function ($model, $index, $dataColumn) { return $model->member->profile->username; }], ['attribute' => 'banned_by', 'value' => function ($model, $index, $dataColumn) { return $model->banner->profile->username; }], ['attribute' => 'expires', 'format' => 'raw', 'value' => function ($model, $index, $dataColumn) { return Editable::widget(['value' => DateTimeCalculation::short($model->expires), 'name' => 'expires', 'options' => ['name' => 'expires'], 'format' => Editable::FORMAT_BUTTON, 'inputType' => Editable::INPUT_DATETIME, 'formOptions' => ['action' => url::to(['moderator/change-ban-period', 'id' => $model->id])]]); }], 'ip', 'email:email', ['class' => 'yii\\grid\\ActionColumn', 'template' => '{lift} {reason}', 'buttons' => ['lift' => function ($url, $model, $key) { return Html::a('<span class="glyphicon glyphicon-tint"></span>', '#', ['title' => YBoard::t('yboard', 'Lift Ban'), 'onclick' => 'if(confirm("' . YBoard::t('yboard', 'Do you really Lift this Ban') . '")) { banLift("' . Yii::$app->urlManager->createAbsoluteUrl([$this->context->module->id . '/moderator/ban-lift', 'id' => $model->id]) . '"); }return false; ']); }, 'reason' => function ($url, $model, $key) { return Html::a('<span class="glyphicon glyphicon-envelope"></span>', '#', ['title' => YBoard::t('yboard', 'Ban Reason'), 'onclick' => 'banMessage(\'' . $model->message . '\')']); }]]]]); ?> </div> <?php Dialog::begin(['id' => 'dlgBanMsg', 'clientOptions' => ['modal' => true, 'title' => YBoard::t('yboard', 'Ban Reason'), 'autoOpen' => false, 'modal' => true, 'height' => 'auto', 'min-height' => 100, 'width' => 200, 'buttons' => [['text' => YBoard::t('yboard', 'close'), 'class' => 'btn btn-sm btn-danger', 'click' => new \yii\web\JsExpression(' function() { $( this ).dialog( "close" ); }')]]]]); ?> <div id="dlgBanMsgText" class="alert alert-warning panel"></div>
/** * Generate a url for the application. * * @param string $path * @param mixed $parameters * @param bool $secure * @return string */ function url($path = null, $parameters = array(), $secure = null) { return url::to($path, $parameters, $secure); }
use yii\widgets\ActiveForm; use kartik\detail\DetailView; use yii\helpers\Url; use yii\helpers\ArrayHelper; //use kartik\editable\Editable; use kartik\grid\GridView; use kartik\tabs\TabsX; use kartik\money\MaskMoney; use ptrnov\fusionchart\Chart; use lukisongroup\assets\Profile; Profile::register($this); use lukisongroup\assets\AppAssetDahboardDatamaster; AppAssetDahboardDatamaster::register($this); use ptrnov\fusionchart\ChartAsset; ChartAsset::register($this); $btn_srchData = Html::button(Yii::t('app', 'Search Data'), ['value' => url::to(['ambil-monthly']), 'id' => 'modal-button-monthly-id', 'class' => "btn btn-info btn-sm"]); $mslineCustomerVisit = Chart::Widget(['urlSource' => url::base() . '/dashboard/rpt-esm-chart-salesmd/visit-per-sales?id=56', 'userid' => '*****@*****.**', 'dataArray' => '[]', 'dataField' => '[]', 'type' => 'msline', 'renderid' => 'msline-monthly-salesmd-visit', 'autoRender' => true, 'width' => '100%', 'height' => '500%', 'chartOption' => ['caption' => 'Daily Customers Visits', 'subCaption' => 'Custommer Call, Active Customer, Efictif Customer', 'xaxisName' => 'Parents', 'yaxisName' => 'Total Child ', 'theme' => 'fint', 'is2D' => "0", 'showValues' => "1", 'palettecolors' => "#583e78,#008ee4,#f8bd19,#e44a00,#6baa01,#ff2e2e", 'bgColor' => "#ffffff", 'showBorder' => "0", 'showCanvasBorder' => "0"]]); print_r('asd' . $test); ?> <div class="container-fluid w3-content pale-blue" style="max-width:1400px;max-height:1400px;margin-top:10px;font-family: verdana, arial, sans-serif ;font-size: 8pt"> <!-- The Grid --> <div class="row"> <!-- Left Column --> <div class="col-lg-3"> <!-- Profile --> <div class="w3-card-2 w3-round w3-pale-blue"> <div class="w3-container"> <h4 class="w3-center">My Profile</h4>
.body_withdrawrecord_index{ padding-top: 13px; } .body_withdrawrecord_index .portlet.box .portlet-body{ position: relative; padding-bottom: 40px; } .error{ color:red; } </style> <div class="body_withdrawrecord_index"> <div class="container-fluid"> <div class="apply_tit_div"><h2><img src="<?php echo url::to('@web/image/tx_tit_icon.png', true); ?> ">产品管理<span>withdraw center</span></h2></div> <div class="row-fluid"> <ul id="myTab" class="nav nav-tabs"> <li class="<?php echo $status == 'finishing' ? 'active' : ''; ?> "><a url="<?php echo Url::to('/product/index?status=finishing'); ?> " href="#waiting" data-toggle="tab">已处理</a></li> <li class="<?php echo $status == 'waiting' ? 'active' : ''; ?> "><a url="<?php
// readonly if ($model->CUST_GRP == $model->CUST_KD) { return true; } else { return false; } }, 'label' => 'Customer.Id', 'hAlign' => 'left', 'vAlign' => 'top', 'filter' => false, 'mergeHeader' => true, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '120px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(255, 154, 48, 1)']], 'contentOptions' => ['style' => ['vertical-align' => 'text-middle', 'text-align' => 'left', 'width' => '120px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']], 'editableOptions' => ['header' => 'Customers', 'inputType' => \kartik\editable\Editable::INPUT_SELECT2, 'size' => 'md', 'options' => ['data' => $parent, 'pluginOptions' => ['allowClear' => true]]]], ['attribute' => 'CUST_NM', 'label' => 'Customer Name', 'hAlign' => 'left', 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '250px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(255, 154, 48, 1)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '250px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['attribute' => 'cus.CUST_KTG_NM', 'label' => 'Category', 'filter' => $dropType, 'hAlign' => 'left', 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '100px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(255, 154, 48, 1)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '100px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['attribute' => 'custype.CUST_KTG_NM', 'filter' => $dropKtg, 'label' => 'Type', 'hAlign' => 'left', 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '230px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(255, 154, 48, 1)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '230px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'GEO', 'refreshGrid' => true, 'label' => 'Geo', 'hAlign' => 'left', 'vAlign' => 'top', 'filter' => true, 'filterType' => GridView::FILTER_SELECT2, 'filter' => $data_group, 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true, 'contentOptions' => ['style' => ['text-align' => 'left', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]]], 'filterInputOptions' => ['placeholder' => 'Select'], 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '120px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(255, 154, 48, 1)']], 'contentOptions' => ['style' => ['vertical-align' => 'text-middle', 'text-align' => 'center', 'width' => '120px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']], 'editableOptions' => ['header' => 'GEO', 'inputType' => \kartik\editable\Editable::INPUT_SELECT2, 'size' => 'xs', 'options' => ['data' => $data_group, 'pluginOptions' => ['allowClear' => true]], 'displayValueConfig' => $data_group]], ['class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'LAYER', 'refreshGrid' => true, 'label' => 'Layer', 'hAlign' => 'left', 'vAlign' => 'top', 'filter' => true, 'filterType' => GridView::FILTER_SELECT2, 'filter' => $data_layer, 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true, 'contentOptions' => ['style' => ['text-align' => 'left', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]]], 'filterInputOptions' => ['placeholder' => 'Select'], 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '120px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(255, 154, 48, 1)']], 'contentOptions' => ['style' => ['vertical-align' => 'text-middle', 'text-align' => 'center', 'width' => '120px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']], 'editableOptions' => ['header' => 'layer', 'inputType' => \kartik\editable\Editable::INPUT_SELECT2, 'size' => 'xs', 'options' => ['data' => $data_layer, 'pluginOptions' => ['allowClear' => true]], 'displayValueConfig' => $data_layer]], ['class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'DC_STATUS', 'refreshGrid' => true, 'hAlign' => 'left', 'vAlign' => 'top', 'filter' => true, 'filterType' => GridView::FILTER_SELECT2, 'filter' => $arraySttDC, 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true, 'contentOptions' => ['style' => ['text-align' => 'left', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]]], 'filterInputOptions' => ['placeholder' => 'Select'], 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '120px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(255, 154, 48, 1)']], 'contentOptions' => ['style' => ['vertical-align' => 'text-middle', 'text-align' => 'center', 'width' => '120px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']], 'editableOptions' => ['header' => 'INVENTORY', 'inputType' => \kartik\editable\Editable::INPUT_SELECT2, 'size' => 'xs', 'options' => ['data' => $arraySttDC, 'pluginOptions' => ['allowClear' => true]], 'displayValueConfig' => $arraySttDC]], ['attribute' => 'STATUS', 'filter' => $valStt, 'format' => 'raw', 'hAlign' => 'center', 'value' => function ($model) { if ($model->STATUS == 1) { return Html::a('<i class="fa fa-edit"></i> Enable', '', ['class' => 'btn btn-success btn-xs', 'title' => 'Aktif']); } else { if ($model->STATUS == 0) { return Html::a('<i class="fa fa-close"></i> Disable', '', ['class' => 'btn btn-danger btn-xs', 'title' => 'Deactive']); } } }, 'hAlign' => 'left', 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '80px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(255, 154, 48, 1)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '80px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['class' => 'kartik\\grid\\ActionColumn', 'template' => '{view}{edit}', 'header' => 'Action', 'dropdown' => true, 'dropdownOptions' => ['class' => 'pull-right dropup'], 'dropdownButton' => ['class' => 'btn btn-default btn-xs'], 'buttons' => ['view' => function ($url, $model, $key) { return Html::button(Yii::t('app', 'View Customers'), ['value' => url::to(['viewcust', 'id' => $model->CUST_KD]), 'id' => 'modalButtonCustomers', 'class' => "btn btn-default btn-xs", 'style' => ['width' => '170px', 'height' => '25px', 'border' => 'none']]); }, 'edit' => function ($url, $model, $key) { return '<li>' . Html::a('<i class="glyphicon glyphicon-globe"></i>' . Yii::t('app', 'Create Map'), ['create-map', 'id' => $model->CUST_KD], []) . '</li>'; }], 'headerOptions' => ['style' => ['text-align' => 'center', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(255, 154, 48, 1)']], 'contentOptions' => ['style' => ['text-align' => 'left', '//width' => '150px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]]], 'toolbar' => [''], 'panel' => ['type' => GridView::TYPE_INFO, 'heading' => '<i class="fa fa fa-tags fa-1x"></i> NOO - New Customer', 'before' => Html::a('<i class="glyphicon glyphicon-plus"></i> ' . Yii::t('app', 'Create ', ['modelClass' => 'Customers']), '/master/customers-noo/createcustomers', ['data-toggle' => "modal", 'id' => 'modcus', 'data-target' => "#createcus", 'class' => 'btn btn-success btn-sm']) . ' ' . Html::a('<i class="fa fa-history "></i> ' . Yii::t('app', 'Refresh', ['modelClass' => 'Customers1']), '/master/customers-noo', ['id' => 'refresh-cust-erp', 'data-pjax' => 0, 'class' => 'btn btn-info btn-sm']) . ' ' . Html::a('<i class="fa fa-file-excel-o"></i> ' . Yii::t('app', 'Export All'), '/export/export/export-data', ['id' => 'export-data-erp-customers', 'data-pjax' => 0, 'class' => 'btn btn-info btn-sm']) . ' ' . Html::a('<i class="fa fa-file-excel-o"></i> ' . Yii::t('app', 'Export selected'), '', ['id' => 'exportmodal-erp', 'data-pjax' => 0, 'data-toggle-export-erp' => 'erp-customers-modal', 'class' => 'btn btn-success btn-sm']) . ' ' . Html::a('<i class="fa fa-file-excel-o"></i> ' . Yii::t('app', 'Pilih Export'), '/export/export/pilih-export-data', ['data-toggle' => "modal", 'id' => 'exportmodal-erp-pilih', 'data-target' => "#export-mod", 'class' => 'btn btn-success btn-sm']) . ' ' . Html::a('<i class="fa fa-file-excel-o"></i> ' . Yii::t('app', 'Pilih delete'), '', ['data-toggle-delete-erp' => 'erp-customers-delete', 'id' => 'delete-all-erp', 'data-pjax' => 0, 'class' => 'btn btn-danger btn-sm'])], 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'gv-cus-erp']], 'summary' => false, 'hover' => true, 'responsive' => true, 'responsiveWrap' => true, 'bordered' => true, 'striped' => '4px', 'autoXlFormat' => true, 'export' => ['fontAwesome' => true, 'showConfirmAlert' => false, 'target' => GridView::TARGET_BLANK]]); ?> <div class="content"> <div class="row" style="padding-left:3px"> <div class="col-sm-12"> <?php echo $tabcustomersData; ?> </div> </div> </div> <?php
$this->registerJsFile('/static/typeahead/typeahead.bundle.min.js', ['position' => $this::POS_BEGIN]); // $this->registerJsFile('/static/typeahead/bloodhound.min.js', ['position' => $this::POS_BEGIN]); // $this->registerCssFile('/static/typeahead/bootstrap-tagsinput.css'); $model->news_type = is_null($model->news_type) ? 'news_post' : $model->news_type; $model->rel_tag = is_null($model->rel_tag) ? '' : $model->rel_tag; $model->rel_user = is_null($model->rel_user) ? '' : $model->rel_user; $model->rel_product = is_null($model->rel_product) ? '' : $model->rel_product; // 表单验证临时显示图片 if (!is_array($model->news_cover_url) && !is_null($model->news_cover_url) && !empty($model->news_cover_url)) { $model->news_cover_url = ['path' => $model->news_cover_url, 'base_url' => Yii::$app->urlManagerFrontend->createUrl('source')]; } // print_r($model->news_cover_url);exit; // 异步请求JS $remote['tag_url'] = url::to(['news/tags'], TRUE); $remote['news_url'] = url::to(['news/user?s=%QUERY'], TRUE); $remote['product_url'] = url::to(['news/product'], TRUE); ?> <style type="text/css"> .multi_radio label { margin-right: 20px; } .multi_radio input { margin-right: 2px; } </style> <div class="col-xs-12"> <?php $form = ActiveForm::begin(['options' => ['ENCTYPE' => 'multipart/form-data', 'type' => 'horizontal']]); ?> <?php echo $form->field($model, 'news_type')->radioList(['news_post' => '资讯文章', 'news_video' => '资讯视频'], ['class' => "multi_radio", 'separator' => ""])->label('');
$this->title = 'Perfil Eventos'; $this->params['breadcrumbs'][] = $this->title; ?> <div class="perfil-evento-index"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <p> <?php echo Html::button('Crear Eventos', ['value' => url::to('index.php?r=perfil-evento/create'), 'class' => 'btn btn-success', 'id' => 'modalButton']); ?> </p> <?php Modal::begin(['header' => '<h1>Crear Eventos</h1>', 'id' => 'modal', 'size' => 'modal-lg']); echo "<div id='modalContent'></div>"; Modal::end(); ?> <?php Pjax::begin(); ?> <?php
/** * Sets all defaults and loads the user configuration * * @param array $config */ protected static function configure($config = array()) { // start with a fresh configuration c::$data = array(); // set some defaults c::$data['root'] = dirname(__DIR__); c::$data['root.kirby'] = __DIR__; c::$data['root.content'] = c::$data['root'] . DS . 'content'; c::$data['root.site'] = c::$data['root'] . DS . 'site'; // the default timezone c::$data['timezone'] = 'UTC'; // tinyurl handling c::$data['tinyurl.enabled'] = true; c::$data['tinyurl.folder'] = 'x'; // disable the cache by default c::$data['cache'] = false; c::$data['cache.driver'] = 'file'; c::$data['cache.options'] = array(); // set the default license code c::$data['license'] = null; // url rewriting c::$data['rewrite'] = true; // markdown defaults c::$data['markdown'] = true; c::$data['markdown.extra'] = false; c::$data['markdown.breaks'] = true; // pass the config vars from the constructor // to be able to set all roots c::$data = array_merge(c::$data, $config); // set the subroots for site c::$data['root.cache'] = c::$data['root.site'] . DS . 'cache'; c::$data['root.plugins'] = c::$data['root.site'] . DS . 'plugins'; c::$data['root.templates'] = c::$data['root.site'] . DS . 'templates'; c::$data['root.snippets'] = c::$data['root.site'] . DS . 'snippets'; c::$data['root.controllers'] = c::$data['root.site'] . DS . 'controllers'; c::$data['root.config'] = c::$data['root.site'] . DS . 'config'; c::$data['root.tags'] = c::$data['root.site'] . DS . 'tags'; c::$data['root.accounts'] = c::$data['root.site'] . DS . 'accounts'; // auto css and js setup c::$data['auto.css.url'] = 'assets/css/templates'; c::$data['auto.css.root'] = c::$data['root'] . DS . 'assets' . DS . 'css' . DS . 'templates'; c::$data['auto.js.url'] = 'assets/js/templates'; c::$data['auto.js.root'] = c::$data['root'] . DS . 'assets' . DS . 'js' . DS . 'templates'; // load all available config files $configs = array('main' => c::$data['root.config'] . DS . 'config.php', 'host' => c::$data['root.config'] . DS . 'config.' . server::get('HTTP_HOST') . '.php', 'addr' => c::$data['root.config'] . DS . 'config.' . server::get('SERVER_ADDR') . '.php'); foreach ($configs as $confile) { if (file_exists($confile)) { include_once $confile; } } // pass the config vars from the constructor again to overwrite // stuff from the user config c::$data = array_merge(c::$data, $config); // detect and store the url static::url(); // default url handler if (empty(c::$data['url.to'])) { c::$data['url.to'] = function ($url = '') { if (url::isAbsolute($url)) { return $url; } $start = substr($url, 0, 1); switch ($start) { case '#': return $url; break; case '.': return page()->url() . '/' . $url; break; default: // don't convert absolute urls return url::makeAbsolute($url); break; } }; } // connect the url class with its handlers url::$home = c::$data['url']; url::$to = c::$data['url.to']; // setup the thumbnail generator thumb::$defaults['root'] = isset(c::$data['thumb.root']) ? c::$data['thumb.root'] : c::$data['root'] . DS . 'thumbs'; thumb::$defaults['url'] = isset(c::$data['thumb.url']) ? c::$data['thumb.url'] : 'thumbs'; thumb::$defaults['driver'] = isset(c::$data['thumb.driver']) ? c::$data['thumb.driver'] : 'gd'; thumb::$defaults['filename'] = isset(c::$data['thumb.filename']) ? c::$data['thumb.filename'] : '{safeName}-{hash}.{extension}'; // build absolute urls c::$data['auto.css.url'] = url::makeAbsolute(c::$data['auto.css.url'], url::$home); c::$data['auto.js.url'] = url::makeAbsolute(c::$data['auto.js.url'], url::$home); thumb::$defaults['url'] = url::makeAbsolute(thumb::$defaults['url'], url::$home); // cache setup if (c::$data['cache']) { if (c::$data['cache.driver'] == 'file' and empty(c::$data['cache.options'])) { c::$data['cache.options'] = array('root' => c::get('root.cache')); } cache::setup(c::$data['cache.driver'], c::$data['cache.options']); } else { cache::setup('mock'); } // set the timezone for all date functions date_default_timezone_set(c::$data['timezone']); // return the entire config array return c::$data; }
?> <?php $basicInfo = DetailView::widget(['model' => $model, 'options' => ['class' => 'table table-striped detail-view'], 'attributes' => [['label' => YBoard::t('yboard', 'Birthday'), 'value' => $birthday == null ? YBoard::t('yboard', 'None') : $model->profile->{$birthday}], ['label' => YBoard::t('yboard', 'Gender'), 'value' => $model->profile->{$gender} == 1 ? YBoard::t('yboard', 'Male') : YBoard::t('yboard', 'Female')], ['label' => YBoard::t('yboard', 'Joined'), 'value' => $regdate == null ? YBoard::t('yboard', 'None') : date_format(date_timezone_set(date_timestamp_set(date_create(), $model->profile->{$regdate}), $timezone), 'l, d-M-y H:i T')], ['attribute' => 'location', 'format' => 'raw', 'value' => Editable::widget(['model' => $model, 'attribute' => 'location', 'type' => 'primary', 'format' => Editable::FORMAT_BUTTON, 'inputType' => Editable::INPUT_TEXT, 'editableValueOptions' => ['class' => 'text-success pad15-right'], 'formOptions' => ['action' => url::to(['member/usercp', 'id' => $model->id])]])], ['attribute' => 'signature', 'format' => 'raw', 'value' => Editable::widget(['model' => $model, 'attribute' => 'signature', 'type' => 'primary', 'format' => Editable::FORMAT_BUTTON, 'inputType' => Editable::INPUT_TEXT, 'editableValueOptions' => ['class' => 'text-success pad15-right'], 'formOptions' => ['action' => url::to(['member/usercp', 'id' => $model->id])]])], 'status']]); ?> <?php $foroStatistics = DetailView::widget(['model' => $model, 'options' => ['class' => 'table table-striped detail-view'], 'attributes' => [['label' => YBoard::t('yboard', 'Last Visit'), 'value' => date_format(date_timezone_set(date_create($model->last_visit), $timezone), 'l, d-M-y H:i T')], 'appreciations', 'startedTopics', 'totalReplies', 'recentTopics:html']]); ?> <?php $webInfo = DetailView::widget(['model' => $model, 'options' => ['class' => 'table table-striped detail-view'], 'attributes' => [['attribute' => 'blogger', 'format' => 'raw', 'value' => Editable::widget(['model' => $model, 'attribute' => 'blogger', 'type' => 'primary', 'format' => Editable::FORMAT_BUTTON, 'inputType' => Editable::INPUT_TEXT, 'editableValueOptions' => ['class' => 'text-success pad15-right'], 'formOptions' => ['action' => url::to(['member/usercp', 'id' => $model->id])]])], ['attribute' => 'contact_email', 'format' => 'raw', 'value' => Editable::widget(['model' => $model, 'attribute' => 'contact_email', 'type' => 'primary', 'format' => Editable::FORMAT_BUTTON, 'inputType' => Editable::INPUT_DROPDOWN_LIST, 'data' => [1 => 'Allow', 0 => 'Forbid'], 'displayValueConfig' => [0 => YBoard::t('yboard', 'Forbidden'), 1 => YBoard::t('yboard', 'Allowed')], 'editableValueOptions' => ['class' => 'text-success pad15-right'], 'formOptions' => ['action' => url::to(['member/usercp', 'id' => $model->id])], 'pluginEvents' => ["editableSuccess" => "function(event, val) { \n //console.log('Successful submission of value ' + val); \n }"]])], ['attribute' => 'contact_pm', 'format' => 'raw', 'value' => Editable::widget(['model' => $model, 'attribute' => 'contact_pm', 'type' => 'primary', 'format' => Editable::FORMAT_BUTTON, 'inputType' => Editable::INPUT_DROPDOWN_LIST, 'data' => [1 => 'Allow', 0 => 'Forbid'], 'displayValueConfig' => [0 => YBoard::t('yboard', 'Forbidden'), 1 => YBoard::t('yboard', 'Allowed')], 'editableValueOptions' => ['class' => 'text-success pad15-right'], 'formOptions' => ['action' => url::to(['member/usercp', 'id' => $model->id])], 'pluginEvents' => ["editableSuccess" => "function(event, val) { \n //console.log('Successful submission of value ' + val); \n }"]])], ['attribute' => 'facebook', 'format' => 'raw', 'value' => Editable::widget(['model' => $model, 'attribute' => 'facebook', 'type' => 'primary', 'format' => Editable::FORMAT_BUTTON, 'inputType' => Editable::INPUT_TEXT, 'editableValueOptions' => ['class' => 'text-success pad15-right'], 'formOptions' => ['action' => url::to(['member/usercp', 'id' => $model->id])]])], ['attribute' => 'skype', 'format' => 'raw', 'value' => Editable::widget(['model' => $model, 'attribute' => 'skype', 'type' => 'primary', 'format' => Editable::FORMAT_BUTTON, 'inputType' => Editable::INPUT_TEXT, 'editableValueOptions' => ['class' => 'text-success pad15-right'], 'formOptions' => ['action' => url::to(['member/usercp', 'id' => $model->id])]])], ['attribute' => 'google', 'format' => 'raw', 'value' => Editable::widget(['model' => $model, 'attribute' => 'google', 'type' => 'primary', 'format' => Editable::FORMAT_BUTTON, 'inputType' => Editable::INPUT_TEXT, 'editableValueOptions' => ['class' => 'text-success pad15-right'], 'formOptions' => ['action' => url::to(['member/usercp', 'id' => $model->id])]])], ['attribute' => 'linkedin', 'format' => 'raw', 'value' => Editable::widget(['model' => $model, 'attribute' => 'linkedin', 'type' => 'primary', 'format' => Editable::FORMAT_BUTTON, 'inputType' => Editable::INPUT_TEXT, 'editableValueOptions' => ['class' => 'text-success pad15-right'], 'formOptions' => ['action' => url::to(['member/usercp', 'id' => $model->id])]])], ['attribute' => 'metacafe', 'format' => 'raw', 'value' => Editable::widget(['model' => $model, 'attribute' => 'metacafe', 'type' => 'primary', 'format' => Editable::FORMAT_BUTTON, 'inputType' => Editable::INPUT_TEXT, 'editableValueOptions' => ['class' => 'text-success pad15-right'], 'formOptions' => ['action' => url::to(['member/usercp', 'id' => $model->id])]])], ['attribute' => 'github', 'format' => 'raw', 'value' => Editable::widget(['model' => $model, 'attribute' => 'github', 'type' => 'primary', 'format' => Editable::FORMAT_BUTTON, 'inputType' => Editable::INPUT_TEXT, 'editableValueOptions' => ['class' => 'text-success pad15-right'], 'formOptions' => ['action' => url::to(['member/usercp', 'id' => $model->id])]])], ['attribute' => 'orkut', 'format' => 'raw', 'value' => Editable::widget(['model' => $model, 'attribute' => 'orkut', 'type' => 'primary', 'format' => Editable::FORMAT_BUTTON, 'inputType' => Editable::INPUT_TEXT, 'editableValueOptions' => ['class' => 'text-success pad15-right'], 'formOptions' => ['action' => url::to(['member/usercp', 'id' => $model->id])]])], ['attribute' => 'tumblr', 'format' => 'raw', 'value' => Editable::widget(['model' => $model, 'attribute' => 'tumblr', 'type' => 'primary', 'format' => Editable::FORMAT_BUTTON, 'inputType' => Editable::INPUT_TEXT, 'editableValueOptions' => ['class' => 'text-success pad15-right'], 'formOptions' => ['action' => url::to(['member/usercp', 'id' => $model->id])]])], ['attribute' => 'twitter', 'format' => 'raw', 'value' => Editable::widget(['model' => $model, 'attribute' => 'twitter', 'type' => 'primary', 'format' => Editable::FORMAT_BUTTON, 'inputType' => Editable::INPUT_TEXT, 'editableValueOptions' => ['class' => 'text-success pad15-right'], 'formOptions' => ['action' => url::to(['member/usercp', 'id' => $model->id])]])], ['attribute' => 'website', 'format' => 'raw', 'value' => Editable::widget(['model' => $model, 'attribute' => 'website', 'type' => 'primary', 'format' => Editable::FORMAT_BUTTON, 'inputType' => Editable::INPUT_TEXT, 'editableValueOptions' => ['class' => 'text-success pad15-right'], 'formOptions' => ['action' => url::to(['member/usercp', 'id' => $model->id])]])], ['attribute' => 'wordpress', 'format' => 'raw', 'value' => Editable::widget(['model' => $model, 'attribute' => 'wordpress', 'type' => 'primary', 'format' => Editable::FORMAT_BUTTON, 'inputType' => Editable::INPUT_TEXT, 'editableValueOptions' => ['class' => 'text-success pad15-right'], 'formOptions' => ['action' => url::to(['member/usercp', 'id' => $model->id])]])], ['attribute' => 'yahoo', 'format' => 'raw', 'value' => Editable::widget(['model' => $model, 'attribute' => 'yahoo', 'type' => 'primary', 'format' => Editable::FORMAT_BUTTON, 'inputType' => Editable::INPUT_TEXT, 'editableValueOptions' => ['class' => 'text-success pad15-right'], 'formOptions' => ['action' => url::to(['member/usercp', 'id' => $model->id])]])], ['attribute' => 'youtube', 'format' => 'raw', 'value' => Editable::widget(['model' => $model, 'attribute' => 'youtube', 'type' => 'primary', 'format' => Editable::FORMAT_BUTTON, 'inputType' => Editable::INPUT_TEXT, 'editableValueOptions' => ['class' => 'text-success pad15-right'], 'formOptions' => ['action' => url::to(['member/usercp', 'id' => $model->id])]])]]]); ?> <div class="yboard-member-view container"> <div class="row"> <div class="col-md-2"> <div class="center"> <?php echo Html::img(isset($model->profile->image) ? $model->profile->image : $this->context->module->getRegisteredImage("empty.jpeg"), ['id' => 'user-avatar']); ?> <p class="pad5-top"><?php echo ucfirst($model->profile->{$this->context->module->userNameColumn}); ?> </p>
// } // }, Modal::begin(['headerOptions' => ['id' => 'modalHeader'], 'id' => 'modal', 'size' => 'modal-sm']); echo "<div id='modalContent'></div>"; Modal::end(); /*modal*/ Modal::begin(['id' => 'modal-view_cus-crm', 'header' => '<div style="float:left;margin-right:10px" class="fa fa-user"></div><div><h5 class="modal-title"><b>VIEW User</b></h5></div>', 'size' => Modal::SIZE_LARGE, 'headerOptions' => ['style' => 'border-radius:5px; background-color: rgba(74, 206, 231, 1)']]); echo "<div id='modalContentcrm'></div>"; Modal::end(); /* * GRIDVIEW USER LIST : author wawan */ $gvUser = GridView::widget(['id' => 'gv-user-list-id', 'dataProvider' => $dataProviderUser, 'filterModel' => $searchModelUser, 'filterRowOptions' => ['style' => 'background-color:rgba(97, 211, 96, 0.3); align:center'], 'rowOptions' => function ($model, $key, $index, $grid) { return ['id' => $model->id, 'onclick' => 'detail(this,' . $model->id . '); return false;']; }, 'columns' => [['class' => 'kartik\\grid\\SerialColumn', 'width' => '10px', 'header' => 'No.', 'hAlign' => 'center', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma', 'font-size' => '8pt', 'background-color' => 'rgba(0, 95, 218, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma', 'font-size' => '8pt']], 'pageSummaryOptions' => ['style' => ['border-right' => '0px']]], ['attribute' => 'username', 'label' => 'User', 'hAlign' => 'left', 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '100px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(97, 211, 96, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '100px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]], ['attribute' => 'POSITION_SITE', 'label' => 'Site Login', 'hAlign' => 'left', 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '100px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(97, 211, 96, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '100px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]], ['attribute' => 'POSITION_LOGIN', 'label' => 'Position Login', 'hAlign' => 'left', 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '100px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(97, 211, 96, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '100px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]], ['class' => 'kartik\\grid\\ActionColumn', 'dropdown' => true, 'template' => '{view}', 'dropdownOptions' => ['class' => 'pull-right dropup'], 'dropdownButton' => ['class' => 'btn btn-default btn-xs'], 'buttons' => ['view' => function ($url, $model, $key) { return Html::button(Yii::t('app', 'View User Crm'), ['value' => url::to(['view-user-crm', 'id' => $model->id]), 'id' => 'modalButtoncrm', 'class' => "btn btn-default btn-xs", 'style' => ['width' => '170px', 'height' => '25px', 'border' => 'none']]); }], 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '150px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(97, 211, 96, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '150px', 'height' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]]], 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'gv-user-list-id']], 'panel' => ['heading' => '<h3 class="panel-title">USER LIST</h3>', 'type' => 'warning', 'before' => Html::a('<i class="glyphicon glyphicon-plus"></i> ' . Yii::t('app', 'Add User ', ['modelClass' => 'Kategori']), '/master/schedule-header/create-user', ['data-toggle' => "modal", 'data-target' => "#modal-create", 'class' => 'btn btn-success']), 'showFooter' => false], 'toolbar' => [], 'hover' => true, 'responsive' => true, 'responsiveWrap' => true, 'bordered' => true, 'striped' => '4px', 'autoXlFormat' => true, 'export' => false]); /* * GRIDVIEW USER LIST : author wawan */ // $info=GridView::widget([ // 'id'=>'gv-user-id', // 'dataProvider' => $dataProvider1, // // 'filterModel' => $searchModelUser, // 'filterRowOptions'=>['style'=>'background-color:rgba(97, 211, 96, 0.3); align:center'], // 'columns' => [ // [ //COL-0 // /* Attribute Serial No */ // 'class'=>'kartik\grid\SerialColumn', // 'width'=>'10px', // 'header'=>'No.',
use kartik\tabs\TabsX; use yii\helpers\Json; use yii\web\Response; use yii\helpers\ArrayHelper; use yii\web\Request; use kartik\daterange\DateRangePicker; use yii\db\ActiveRecord; use yii\data\ArrayDataProvider; function statusIssue($model) { if ($model->STATUS == 1) { /*REVIEW*/ return Html::a('<i class="fa fa-square-o fa-md"></i> REVIEW', '#', ['class' => 'btn btn-info btn-xs', 'style' => ['width' => '100px'], 'title' => 'Review']); } elseif ($model->STATUS == 2) { /*PROCESS*/ return Html::a('<i class="fa fa-check-square-o fa-md"></i> PROCESS', '#', ['class' => 'btn btn-success btn-xs', 'style' => ['width' => '100px'], 'title' => 'Process']); } elseif ($model->STATUS == 3) { /*CLODED*/ return Html::a('<i class="glyphicon glyphicon-remove"></i> CLOSED', '#', ['class' => 'btn btn-danger btn-xs', 'style' => ['width' => '100px'], 'title' => 'Closed']); } } $btn_srch = Html::button(Yii::t('app', 'Search Date'), ['value' => url::to(['ambil-tanggal-issue']), 'id' => 'modalButtonDashboardIssueTgl', 'class' => "btn btn-info btn-sm"]); $gridColumns = [['class' => 'kartik\\grid\\SerialColumn', 'contentOptions' => ['class' => 'kartik-sheet-style'], 'width' => '10px', 'header' => 'No.', 'noWrap' => true, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(126, 189, 188, 0.9)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['attribute' => 'TGL', 'label' => 'TGL', 'hAlign' => 'center', 'vAlign' => 'middle', 'filter' => false, 'noWrap' => true, 'mergeHeader' => true, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '50px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(126, 189, 188, 0.9)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '50px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['attribute' => 'NM_CUSTOMER', 'label' => 'CUSTOMER', 'hAlign' => 'left', 'filterOptions' => ['colspan' => 3], 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '150px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(126, 189, 188, 0.9)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '150px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['attribute' => 'UserNm', 'label' => 'SALES.NM', 'hAlign' => 'left', 'vAlign' => 'top', 'mergeHeader' => true, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '100px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(126, 189, 188, 0.9)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '100px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['attribute' => 'Geonm', 'label' => 'GEO', 'hAlign' => 'left', 'vAlign' => 'top', 'mergeHeader' => true, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '50px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(126, 189, 188, 0.9)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '50px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['attribute' => 'ISI_MESSAGES', 'label' => 'ISSUE NOTE', 'hAlign' => 'left', 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '400px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(126, 189, 188, 0.9)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '400px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['attribute' => 'STATUS', 'options' => ['id' => 'test-ro'], 'label' => 'Status', 'hAlign' => 'center', 'vAlign' => 'middle', 'mergeHeader' => true, 'contentOptions' => ['style' => 'width: 100px'], 'format' => 'html', 'value' => function ($model, $key, $index, $widget) { return statusIssue($model); }, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '80px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(126, 189, 188, 0.9)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '80px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]]]; $issueMemo = GridView::widget(['id' => 'gv-dashboard-issue', 'dataProvider' => $dataProviderIssue, 'filterModel' => $searchModelIssue, 'filterRowOptions' => ['style' => 'background-color:rgba(126, 189, 188, 0.9); align:center'], 'columns' => $gridColumns, 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'gv-dashboard-issue']], 'panel' => ['heading' => false, 'type' => 'success', 'before' => $btn_srch], 'toolbar' => [''], 'summary' => false]); echo $issueMemo; $this->registerJs("\t\t\r\n \$.fn.modal.Constructor.prototype.enforceFocus = function(){};\t\r\n\t\t\$(document).on('click','#modalButtonDashboardIssueTgl', function(ehead){ \t\t\t \r\n\t\t\t\$('#modal-dashboard-issue-tgl').modal('show')\r\n\t\t\t.find('#modalContentDasboardIssueTgl')\r\n\t\t\t.load(ehead.target.value);\r\n\t\t});\t\t \r\n\t\t\t \r\n\t", $this::POS_READY); Modal::begin(['id' => 'modal-dashboard-issue-tgl', 'header' => '<div style="float:left;margin-right:10px" class="fa fa-2x fa-search"></div><div><h4 class="modal-title"> SEARCH DATE</h4></div>', 'size' => Modal::SIZE_SMALL, 'headerOptions' => ['style' => 'border-radius:5px; background-color: rgba(90, 171, 255, 0.7)']]); echo "<div id='modalContentDasboardIssueTgl'></div>"; Modal::end();
'font-size'=>'8pt', 'background-color'=>'rgba(249, 215, 100, 1)', ] ], 'contentOptions'=>[ 'style'=>[ 'text-align'=>'center', 'font-family'=>'tahoma, arial, sans-serif', 'font-size'=>'8pt', //'background-color'=>'rgba(13, 127, 3, 0.1)', ] ], ]; */ $btn_srch = Html::a('<i class="fa fa-search"></i> Search Date', '/master/review-visit/ambil-tanggal', ['data-toggle' => "modal", 'data-target' => "#modal-tgl", 'class' => 'btn btn-info btn-sm']); $btn_srchReviewDetail = Html::button(Yii::t('app', 'Search Date'), ['value' => url::to(['ambil-tanggal']), 'id' => 'modalButtonReviewTgl', 'class' => "btn btn-info btn-sm"]); /*SHOW GRID VIEW LIST*/ $indexReviewDetail = GridView::widget(['id' => 'cust-visit-list', 'dataProvider' => $dataProviderHeader1, 'filterModel' => $searchModelHeader1, 'columns' => $attDinamik, 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'cust-visit-list']], 'summary' => false, 'panel' => ['heading' => '<div style="float:left;margin-right:10px" class="fa fa-2x fa-bicycle"></div><div><h4 class="modal-title">DAILY REVIEW CUSTOMER CALL</h4></div>' . ' ' . '<div style="float:right; margin-top:-22px;margin-right:0px;">' . $btn_srchReviewDetail . '</div>', 'type' => 'success'], 'toolbar' => ['']]); ?> <?php echo $indexReviewDetail; ?> <?php $this->registerJs("\t\t\n\t\t\$.fn.modal.Constructor.prototype.enforceFocus = function(){};\t\n\t\t\$(document).on('click','#modalButtonReviewTgl', function(ehead){ \t\t\t \n\t\t\t\$('#modal-review-tgl').modal('show')\n\t\t\t.find('#modalContentReviewTgl')\n\t\t\t.load(ehead.target.value);\n\t\t});\t\t \n\t\t\t \n\t", $this::POS_READY); Modal::begin(['id' => 'modal-review-tgl', 'header' => '<div style="float:left;margin-right:10px" class="fa fa-2x fa-search"></div><div><h4 class="modal-title"> SEARCH DATE</h4></div>', 'size' => Modal::SIZE_SMALL, 'headerOptions' => ['style' => 'border-radius:5px; background-color: rgba(90, 171, 255, 0.7)']]); echo "<div id='modalContentReviewTgl'></div>"; Modal::end(); //$("#msline-salesmd-visit").updateFusionCharts({dataSource: 'jsonURL', dataFormat: 'MyNewChart.json’}); ?>
$url = rtrim($url, '/'); return $length ? str::short($url, $length, $rep) : $url; } /** * Returns the URL for document root no * matter what the path is. * * @return string */ public static function index() { if (r::cli()) { return '/'; } else { return static::base() . preg_replace('!\\/index\\.php$!i', '', server::get('SCRIPT_NAME')); } } } // basic home url setup url::$home = url::base(); // basic url generator setup url::$to = function ($path = '/') { if (url::isAbsolute($path)) { return $path; } $path = ltrim($path, '/'); if (empty($path)) { return url::home(); } return url::home() . '/' . $path; };
<?php if (c::get('cdn.content')) { kirby()->urls()->content = c::get('cdn.content'); } if (c::get('cdn.thumbs')) { thumb::$defaults['url'] = c::get('cdn.thumbs'); } if (c::get('cdn.assets')) { $original = url::$to; url::$to = function () use($original) { $url = call($original, func_get_args()); if (!str::startsWith($url, kirby()->urls()->index())) { return $url; } if (str::contains($url, '/panel/assets')) { return $url; } $url = preg_replace_callback('!.*?\\/assets\\/(.*)$!', function ($match) { return c::get('cdn.assets') . '/' . $match[1]; }, $url); return $url; }; }
public function configure() { // load all available config files $root = $this->roots()->config(); $configs = array('main' => 'config.php', 'host' => 'config.' . server::get('SERVER_NAME') . '.php', 'addr' => 'config.' . server::get('SERVER_ADDR') . '.php'); $allowed = array_filter(dir::read($root), function ($file) { return substr($file, 0, 7) === 'config.' and substr($file, -4) === '.php'; }); foreach ($configs as $config) { $file = $root . DS . $config; if (in_array($config, $allowed, true) and file_exists($file)) { include_once $file; } } // apply the options $this->options = array_merge($this->options, c::$data); // overwrite the autodetected url if ($this->options['url']) { $this->urls->index = $this->options['url']; } // connect the url class with its handlers url::$home = $this->urls()->index(); url::$to = $this->option('url.to', function ($url = '', $lang = null) { if (url::isAbsolute($url)) { return $url; } $start = substr($url, 0, 1); switch ($start) { case '#': return $url; break; case '.': return page()->url() . '/' . $url; break; default: if ($page = page($url)) { // use the "official" page url return $page->url($lang); } else { // don't convert absolute urls return url::makeAbsolute($url); } break; } }); // setup the pagination redirect to the error page pagination::$defaults['redirect'] = $this->option('error'); // setting up the email class email::$defaults['service'] = $this->option('email.service'); email::$defaults['from'] = $this->option('email.from'); email::$defaults['to'] = $this->option('email.to'); email::$defaults['replyTo'] = $this->option('email.replyTo'); email::$defaults['subject'] = $this->option('email.subject'); email::$defaults['body'] = $this->option('email.body'); email::$defaults['options'] = $this->option('email.options'); // simple error handling if ($this->options['debug'] === true) { error_reporting(E_ALL); ini_set('display_errors', 1); } else { if ($this->options['debug'] === false) { error_reporting(0); ini_set('display_errors', 0); } } }
/*NO ATTRIBUTE*/ $attDinamik[] = ['class' => 'kartik\\grid\\SerialColumn', 'contentOptions' => ['class' => 'kartik-sheet-style'], 'width' => '10px', 'header' => 'No.', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(97, 211, 96, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]]; /*ACTION ATTRIBUTE*/ $attDinamik[] = ['class' => 'kartik\\grid\\ActionColumn', 'dropdown' => true, 'template' => '{view}', 'dropdownOptions' => ['class' => 'pull-left dropdown'], 'dropdownButton' => ['class' => 'btn btn-default btn-xs'], 'buttons' => ['edit0' => function ($url, $model, $key) { return '<li>' . Html::a('<span class="fa fa-edit fa-dm"></span>' . Yii::t('app', 'Set Identity'), ['/master/employe/edit-identity', 'id' => $model->GEO_ID], ['data-toggle' => "modal", 'data-target' => "#edit-title", 'data-title' => $model->GEO_ID]) . '</li>' . PHP_EOL; }, 'edit1' => function ($url, $model, $key) { return '<li>' . Html::a('<span class="fa fa-edit fa-dm"></span>' . Yii::t('app', 'Set Title'), ['/master/employe/edit-titel', 'id' => $model->GEO_ID], ['data-toggle' => "modal", 'data-target' => "#edit-title", 'data-title' => $model->GEO_ID]) . '</li>' . PHP_EOL; }, 'edit2' => function ($url, $model, $key) { return '<li>' . Html::a('<span class="fa fa-edit fa-dm"></span>' . Yii::t('app', 'Set Profile'), ['/master/employe/edit', 'id' => $model->GEO_ID], ['data-toggle' => "modal", 'data-target' => "#edit-profile", 'data-title' => $model->GEO_ID]) . '</li>' . PHP_EOL; }, 'edit3' => function ($url, $model, $key) { //$gF=getPermissionEmp()->GF_ID; //if ($gF<=4){ return '<li>' . Html::a('<span class="fa fa-money fa-dm"></span>' . Yii::t('app', 'Set Payroll'), ['/master/employe/edit', 'id' => $model->GEO_ID], ['data-toggle' => "modal", 'data-target' => "#edit-payroll"]) . '</li>' . PHP_EOL; //} }, 'view' => function ($url, $model, $key) { return '<li>' . Html::button('<span class="fa fa-eye fa-dm"></span> ' . Yii::t('app', 'View'), ['value' => url::to(['/master/employe/view', 'id' => $model->GEO_ID]), 'id' => 'modalButton', 'style' => ['width' => '100%', 'text-align' => 'left', 'border' => 0, 'background-color' => 'white', 'padding-left' => '20px']]) . '</li>' . PHP_EOL; /* return '<li>' .Html::a('<span class="fa fa-eye fa-dm"></span>'.Yii::t('app', 'View'),'', ['value'=>url::to(['/master/employe/view?id='.$model->GEO_ID]), //['value'=>url::to(['/master/employe/view','id'=>$model->GEO_ID]), 'id'=>'modalButton', //'data-toggle'=>"modal", //'data-target'=>"#modal-view", 'data-title'=> $model->GEO_ID, //'data-ajax'=>true, ]). '</li>' . PHP_EOL; */ }], 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(97, 211, 96, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'height' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]]; /*OTHER ATTRIBUTE*/ foreach ($valFields as $key => $value[]) { $filterWidgetOpt = ''; //$filterInputOpt=''; if ($value[$key]['FIELD'] == 'depNm') {
function install_options() { return array('database.host' => array('type' => 'text', 'vtype' => 'required', 'required' => true, 'title' => app::get('base')->_('数据库主机'), 'default' => '127.0.0.1'), 'database.username' => array('type' => 'text', 'vtype' => 'required', 'required' => true, 'title' => app::get('base')->_('数据库用户名'), 'default' => 'root'), 'database.password' => array('type' => 'password', 'title' => app::get('base')->_('数据库密码'), 'default' => ''), 'database.database' => array('type' => 'select', 'vtype' => 'required', 'required' => true, 'title' => app::get('base')->_('数据库名'), 'options_callback' => array('app' => 'base', 'method' => 'dbnames'), 'onfocus' => 'setuptools.getdata(\'base\', \'dbnames\', this);'), 'app.timezone' => array('type' => 'select', 'options' => base_location::timezone_list(), 'title' => app::get('base')->_('默认时区'), 'default' => '8', 'vtype' => 'required', 'required' => true), 'app.url' => array('type' => 'text', 'title' => app::get('base')->_('系统URL地址'), 'default' => url::to('/'), 'vtype' => 'required', 'required' => true)); }
use wenyuan\ueditor\Ueditor; //百度编辑器 use kartik\grid\GridView; Yii::$app->formatter->nullDisplay = ''; // 注册JS文件 $this->registerJsFile('/static/typeahead/bootstrap-tagsinput.min.js', ['position' => $this::POS_BEGIN]); // $this->registerJsFile('/static/typeahead/bootstrap-tagsinput.min.js.map', ['position' => $this::POS_BEGIN]); $this->registerJsFile('/static/typeahead/typeahead.bundle.min.js', ['position' => $this::POS_BEGIN]); // $this->registerJsFile('/static/typeahead/bloodhound.min.js', ['position' => $this::POS_BEGIN]); // $this->registerCssFile('/static/typeahead/bootstrap-tagsinput.css'); // $model->news_type = is_null($model->news_type) ? 'news_post' : $model->news_type; // $model->rel_tag = is_null($model->rel_tag) ? '' : $model->rel_tag; // $model->rel_user = is_null($model->rel_user) ? '' : $model->rel_user; // $model->rel_product = is_null($model->rel_product) ? '' : $model->rel_product; // 异步请求JS $remote['news_url'] = url::to(['news/ajax-recommend?s=%QUERY'], TRUE); ?> <style type="text/css"> .multi_radio label { margin-right: 20px; } .multi_radio input { margin-right: 2px; } .bootstrap-tagsinput { margin-bottom: 0px; border-radius: 0px; } </style> <div class="col-xs-12"> <?php
public function configure() { // load all available config files $root = $this->roots()->config(); $configs = array('main' => 'config.php', 'host' => 'config.' . server::get('SERVER_NAME') . '.php', 'addr' => 'config.' . server::get('SERVER_ADDR') . '.php'); $allowed = array_filter(dir::read($root), function ($file) { return substr($file, 0, 7) === 'config.' and substr($file, -4) === '.php'; }); foreach ($configs as $config) { $file = $root . DS . $config; if (in_array($config, $allowed, true) and file_exists($file)) { include_once $file; } } // apply the options $this->options = array_merge($this->options, c::$data); // overwrite the autodetected url if ($this->options['url']) { $this->urls->index = $this->options['url']; } // connect the url class with its handlers url::$home = $this->urls()->index(); url::$to = $this->option('url.to', function ($url = '') { if (url::isAbsolute($url)) { return $url; } $start = substr($url, 0, 1); switch ($start) { case '#': return $url; break; case '.': return page()->url() . '/' . $url; break; default: // don't convert absolute urls return url::makeAbsolute($url); break; } }); // setup the thumbnail generator thumb::$defaults['root'] = $this->roots->thumbs(); thumb::$defaults['url'] = $this->urls->thumbs(); thumb::$defaults['driver'] = $this->option('thumbs.driver'); thumb::$defaults['filename'] = $this->option('thumbs.filename'); // simple error handling if ($this->options['debug'] === true) { error_reporting(E_ALL); ini_set('display_errors', 1); } else { if ($this->options['debug'] === false) { error_reporting(0); ini_set('display_errors', 0); } } }
public function testSchema() { exit; $model = app::get('base')->model('setting'); $filter = ['app|than' => 2, 'app|lthan' => 2, 'app|nequal' => 2, 'app|notin' => array(1, 2, 3, 4), 'app|in' => array(1, 2, 3, 4), 'app|between' => [1, 10], 'app|has' => 'asdk']; echo $model->_filter($filter); exit; $filter = array('key' => 'aa4c2040d3220c132cf2fed9e31fb9ce324e137a', 'app' => 'kkk'); var_dump(app::get('base')->model('setting')->getList('app, key', $filter)); exit; $db = app::get('system')->database(); $db->exec('set SESSION autocommit=1;'); $db->exec('set @msgID = -1;'); var_dump($db->executeQuery('select @msgID')->fetchColumn()); exit; var_dump(with(new base_application_dbtable())->getAppTableNames('base')); exit; var_dump(url::to('/api')); exit; //$schema = new base_application_dbtable; //$dbinfo = $schema->detect($this->app,$this->table_name())->load(); if ($db->getSchemaManager()->tablesExist($real_table_name)) { $db->getSchemaManager()->dropTable($real_table_name); } //$appId = $this->target_app->app_id; $appId = 'syscategory'; $db = app::get($appId)->database(); $schema = new \Doctrine\DBAL\Schema\Schema(); //$table = $schema->createTable($this->real_table_name()); $table = $schema->createTable('syscategory_brand'); //$define = $this->load(); //$define = with(new base_application_dbtable)->detect($appId, 'brand')->load(); $define = $this->define; // 建立字段 $options['precision'] = 20; $options['scale'] = 3; $options['length'] = 0; $options['unsigned'] = 10; $options['fixed'] = true; // $options['unique'] = true; //$realType = $columnDefine['realtype']; $realType = 'integer'; $table->addColumn($columnName, $realType, $options); // 建立主键 if ($define['primary']) { $table->setPrimaryKey($define['primary']); } // 建立索引 if ($define['index']) { foreach ($define['index'] as $indexName => $indexDefine) { if (strtolower($indexDefine['prefix']) == 'unique') { $table->addUniqueIndex($indexDefine['columns'], $indexName); } else { $table->addIndex($indexDefine['columns'], $indexName); } } } $platform = $db->getDatabasePlatform(); $queries = $schema->toSql($platform); var_dump($queries); exit; }