Ejemplo n.º 1
0
<h2>新闻祥情
<?php 
echo $title;
?>
</h2>
<br/>
标题:<?php 
echo $item['title'];
?>
日期:<?php 
echo $item['date'];
?>
本新闻的链接:
<?php 
echo yii\helpers\Url::to(['news/item-detail', 'title' => $title]);
//有点像java中的servlet
echo $this->context->renderPartial('_copright.php');
Ejemplo n.º 2
0
<form method="POST" >
    <div style="margin-bottom: 3px">
        <textarea name="sql_code" id="sql_code" class="form-control" rows='6'><?php 
echo @$sql_code;
?>
</textarea>
    </div>
    <div>
        <?php 
//$onof = \frontend\models\SysOnoffSql::findOne(1);
//if ($onof->status === 'on'):
?>
            <button class="btn btn-danger"><i class="glyphicon glyphicon-refresh"></i> รันชุดคำสั่ง</button>
            <!--<button name="save" value="yes" class="btn btn-success"><i class="glyphicon glyphicon-floppy-saved"></i> จัดเก็บ</button>
            <a href="<?php 
echo yii\helpers\Url::to(['sqlscript/index']);
?>
" class="btn btn-primary">คลัง script</a>-->
 <?php 
//else:
?>
            <!--<label> ผู้ดูแลระบบปิดใช้งาน </label>-->

        <?php 
//endif;
?>
    </div>
</form>

<hr>
<div style="overflow: auto">
Ejemplo n.º 3
0
echo Yii::$app->user->isGuest ? 'Guest' : Yii::$app->user->identity->username;
?>
                                            <small>Member since Nov. <?php 
echo date('Y');
?>
</small>
                                        </p>
                                    </li>                                    
                                    <!-- Menu Footer-->
                                    <li class="user-footer">
                                        <div class="pull-left">
                                            <a href="#" class="btn btn-default btn-flat">Profile</a>
                                        </div>
                                        <div class="pull-right">
                                            <?php 
echo Yii::$app->user->isGuest ? yii\bootstrap\Html::a('Login', yii\helpers\Url::to(['/site/login']), ['class' => 'btn btn-default btn-flat']) : yii\bootstrap\Html::a('Logout', yii\helpers\Url::to(['/site/logout']), ['class' => 'btn btn-default btn-flat']);
?>
                                        </div>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </div>
                </nav>
            </header>        
            <?php 
require 'left_menu.php';
?>
            <div class="content-wrapper">  
                <section class="content-header">
                    <h1>
Ejemplo n.º 4
0
<?php

/*
 * @author Lmy
 * QQ:6232967
 * Create at 2015-12-24 11:09:21
 */
echo \yii\widgets\Breadcrumbs::widget(['homeLink' => ['label' => '首页', 'url' => yii\helpers\Url::to(['site/index']), 'template' => '<div class="weizhi-zt">您现在的位置:{link}'], 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], 'options' => ['class' => 'weizhi'], 'tag' => 'div', 'itemTemplate' => ' &gt; {link}', 'activeItemTemplate' => ' &gt; {link}']) . "</div>";
?>

Ejemplo n.º 5
0

<div class="main news_zd">
    	<div class="news_title">
            <h3><?php 
echo $model->title;
?>
</h3>
            <p><?php 
echo date('Y-m-d', $model->create_at);
?>
<span>万虎网络</span></p>
            <a href="<?php 
echo yii\helpers\Url::to(['about/news']);
?>
">返回</a>
        </div>
        <div class="news_zdnr">
        	<?php 
echo $model->content;
?>
        </div>
    </div>
Ejemplo n.º 6
0
	else if(confirm('请确认是否赎回?'))
		{
			if(_wait == 0)
	        {
				_wait = 30;
				_time();
		    }
	        else
	        {
				alert('为了保证安全,请等待'+_wait+'秒再次操作!');
				return false;
			}
			$("#loading").css("display","block");
			$.post(
					'<?php 
echo yii\helpers\Url::to(['money/redemption']);
?>
',
					{'money':money,'_csrf':"<?php 
echo Yii::$app->request->getCsrfToken();
?>
"},
					function(data){
							alert(data);
							if(data == '赎回成功')
							{
								window.location.href=window.location.href;
							}
							else
							{
								$("#loading").css("display","none");
Ejemplo n.º 7
0
echo GridView::widget(['dataProvider' => $urlDataProvider, 'filterModel' => $urlFilterModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'name', 'header' => 'Прямая ссылка на товар', 'format' => 'raw', 'value' => function ($model) {
    $name = empty($model->name) ? 'Ссылка на товар' : $model->name;
    return Html::a(Html::encode($name), $model->link);
}], ['header' => 'Рекомендательная ссылка', 'format' => 'raw', 'value' => function ($model) {
    $link = \yii\helpers\Url::to(['purchase/create', 'affiliate_id' => \Yii::$app->user->identity->id, 'url_id' => $model->id], true);
    //return Html::a(Html::encode($model->link), $link) . '<div class="addthis_sharing_toolbox" data-url="' . $link . '" data-title="Покупай тут"></div>';
    return Html::textInput('', $link, ['style' => 'width:100%']) . '<div class="addthis_sharing_toolbox" data-url="' . $link . '" data-title="Покупай тут"></div>';
}]]]);
?>
    
    <h1>Комментарии</h1>
    
    <?php 
echo ListView::widget(['dataProvider' => $commentDataProvider, 'itemView' => '/comment/_item']);
?>
    
    <h1>Добавить комментарий</h1>
    
    <?php 
echo $this->render('/comment/_form', ['model' => $comment, 'action' => yii\helpers\Url::to(['comment/create', 'shop_id' => $comment->user_id])]);
?>
    
</div>

<?php 
$script = <<<EOD
    \$("input[type='text']").on("click", function () {
        \$(this).select();
    });
EOD;
$this->registerJs($script);
Ejemplo n.º 8
0
                        <tr>
                            <td><strong>Course</strong></td>
                            <td>
                                <?php 
    $course = app\models\Course::findOne($video->course_id)->name;
    ?>
                                <?php 
    echo strlen($course) > 25 ? substr($course, 0, 25) . '...' : $course;
    ?>
                            </td>
                        </tr>
                        <tr>
                            <td><strong>Date</strong></td>
                            <td>
                                <?php 
    echo date("M j, Y, g:i a", strtotime($video->created_at));
    ?>
                            </td>
                        </tr>
                    </table>
                    <p class=""><a class="btn btn-info btn-xs btn-block" href="<?php 
    echo yii\helpers\Url::to(['video/view', 'id' => $video->id, 'course_id' => $video->course_id]);
    ?>
">view</a></p>
                </div>
            </div>
        </div>
    <?php 
}
?>
</div>
Ejemplo n.º 9
0
echo yii\helpers\Url::to(['site/step2']);
?>
",{'password':newpass,'repeatpassword':repeatpass, '_csrf':'<?php 
echo yii::$app->request->getCsrfToken();
?>
'},function (data){
						  if(data == '密码修改成功')
						  {
						  	 alert(data);
						  	 window.location.href="<?php 
echo yii\helpers\Url::to(['site/login']);
?>
";
						  }
						  else if(data == '密码修改失败,请联系客服!')
						  {
							  alert(data);
							  window.location.href="<?php 
echo yii\helpers\Url::to(['site/index']);
?>
";
						  }
						  else
						  {
							  $("#nextspan").css("display","block");
						  }
					  	});
					}
			});
	 });
</script>
Ejemplo n.º 10
0
 private function registerAssets()
 {
     Yii::$app->view->registerJS("\r\n            function checkEnter(event, element) {\r\n                if (event.keyCode == 13) {\r\n                    \$('#formDefault').submit();\r\n                }\r\n            }\r\n            \r\n            \$('.buttonLike').click(function(){\r\n                var id = '" . ArrayHelper::getValue($this->_params, 'parent_id') . "';\r\n                var type = \$(this).attr('data-type');\r\n                var comment_id = \$(this).attr('data-id');\r\n                \$.ajax({\r\n                    url: '" . yii\helpers\Url::to(['/question/ajax/like']) . "',\r\n                    type: 'post',\r\n                    data: {type: type, comment_id: comment_id, id: id},\r\n                }).done(function (status) {\r\n                    if (status != 1){\r\n                        \$('.buttonLike[data-id=\"' + comment_id + '\"]').text('Like')\r\n                        \$('.buttonLike[data-id=\"' + comment_id + '\"]').attr('data-type', 'like');\r\n                    } else {\r\n                        \$('.buttonLike[data-id=\"' + comment_id + '\"]').text('Unlike')\r\n                        \$('.buttonLike[data-id=\"' + comment_id + '\"]').attr('data-type', 'unlike');\r\n                    }\r\n                });\r\n            });\r\n        ", yii\web\View::POS_END);
 }
Ejemplo n.º 11
0
        <?php 
echo View::render("@www/views/layouts/ucenter.php", ['infos_rar' => $infos_rar]);
?>
        <div class="shadowBox page-con6">
            <p class="spage-con16T"><span>邀请注册</span></p>

            <div class="spage-con17">
                <p class="spage-con132T">* 邀请注册</p>

                <form action="#">
                    <table class="spage-con17con">
                        <tr>
                            <td class="tr">邀请链接 :</td>
                            <td><input id="invitation_url" class="spage-con17input" type="text"
                                       value="<?php 
echo yii::$app->urlManager->hostInfo . yii\helpers\Url::to(['site/signup', 'code' => $invitation_code]);
?>
"/><a
                                    class="spage-con17btn" href="javascript:void(0);"
                                    onclick="return copyUrl();">复制链接</a></td>
                        </tr>
                        <tr>
                            <td class="tr">邀请码 :</td>
                            <td class="spage-con17num"><?php 
echo $invitation_code;
?>
</td>
                        </tr>
                    </table>
                </form>
            </div>
Ejemplo n.º 12
0
<?php

/*
 * @author Lmy
 * QQ:6232967
 * Create at 2016-1-6 20:25:13
 */
echo \yii\widgets\Breadcrumbs::widget(['homeLink' => ['label' => '首页', 'url' => yii\helpers\Url::to(['mobile/index']), 'template' => '{link}'], 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], 'options' => ['class' => 'currentposition'], 'tag' => 'div', 'itemTemplate' => ' &gt; {link}', 'activeItemTemplate' => ' &gt; {link}']);
Ejemplo n.º 13
0
<?php

echo "Detail item with title <b>{$title}</b><br><br>";
if ($itemFound != null) {
    echo "<table border='1'>";
    foreach ($itemFound as $key => $value) {
        echo "<tr>\n    <th>{$key}</th>\n    <th>{$value}</th>\n    </tr>";
    }
    echo "</table><br>";
    echo "Url for this items is: " . yii\helpers\Url::to(['news/item-detail', 'title' => $title]);
} else {
    echo "<i>No item found</i>";
}
Ejemplo n.º 14
0
<?php

$directoryAsset = Yii::$app->assetManager->getPublishedUrl('@almasaeed/');
?>
<div class="main">
	<div class="zhuce" style="margin-top:30px;margin-bottom:30px;">
		<div class="xj-xjwan"> 
			<div class="clearFloat">
				<p class="xj-xjwanl"><img width="85px" height="82px" src="<?php 
echo $directoryAsset;
?>
/images/xj-success.png" alt=""></p>
				<div class="xj-xjwanW">
					<p class="xj-xjwanWbig">密码重置成功!</p>
					<p class="xj-xjwanWsmall">请牢记您的新密码~</p>
				</div>
			</div>
			<p class="xj-xjwanBtn">
				<a href="<?php 
echo yii\helpers\Url::to(['site/login']);
?>
">前往登录</a>
			</p>
		</div>
	</div>
</div>
Ejemplo n.º 15
0
use app\modules\search\SearchAssets;
$query = yii\helpers\Html::encode($query);
$this->params['breadcrumbs'][] = ['label' => 'Блог', 'url' => ['/blog']];
$this->title = "Результаты поиска по запросу \"{$query}\"";
$this->params['breadcrumbs'][] = $this->title;
SearchAssets::register($this);
$this->registerJs("jQuery('.search').highlight('{$query}');");
?>

<div class="row">
    <?php 
if (!empty($hits)) {
    foreach ($hits as $hit) {
        ?>
            <h3><a href="<?php 
        echo yii\helpers\Url::to($hit->url, true);
        ?>
"><?php 
        echo $hit->title;
        ?>
</a></h3>
            <p class="search"><?php 
        echo $hit->body;
        ?>
</p>
            <hr/>
            <?php 
    }
} else {
    ?>
        <div class="alert alert-danger"><h3>По запросу "<?php 
Ejemplo n.º 16
0
        <div class="col-lg-5">
            <?php 
$form = ActiveForm::begin(['id' => 'login-form']);
?>
                <?php 
echo $form->field($model, 'identity');
?>
                <?php 
echo $form->field($model, 'password')->passwordInput();
?>
                <?php 
echo $form->field($model, 'rememberMe')->checkbox();
?>
                <div style="color:#999;margin:1em 0">
                    <?php 
echo Yii::t('frontend', 'If you forgot your password you can reset it <a href="{link}">here</a>', ['link' => yii\helpers\Url::to(['sign-in/request-password-reset'])]);
?>
                </div>
                <div class="form-group">
                    <?php 
echo Html::submitButton(Yii::t('frontend', 'Login'), ['class' => 'btn btn-primary', 'name' => 'login-button']);
?>
                </div>
                <div class="form-group">
                    <?php 
echo Html::a(Yii::t('frontend', 'Need an account? Sign up.'), ['signup']);
?>
                </div>
                <h2><?php 
echo Yii::t('frontend', 'Log in with');
?>
Ejemplo n.º 17
0
echo $form->field($model, 'category_id')->dropDownList($cateList);
?>
        <?php 
echo $form->field($model, 'brand_id')->dropDownList($brandList);
?>
        <?php 
echo $form->field($model, 'mini_mum')->textInput(['maxlength' => true]);
?>
        <?php 
echo $form->field($model, 'keywords')->textInput(['maxlength' => true]);
?>
        <?php 
echo $form->field($model, 'brief')->textarea(['maxlength' => true]);
?>
        <?php 
echo $form->field($model, 'description')->widget(UeditorWidget::className(), ['clientOptions' => ['serverUrl' => yii\helpers\Url::to(['ueditor'])]]);
?>
        <?php 
echo $form->field($model, 'image')->widget(UploadifyWidget::className(), ['route' => 'catalog/product/uploadify', 'dir' => 'product', 'num' => '6']);
?>
        <?php 
echo $form->field($model, 'date_available')->textInput(['maxlength' => true]);
?>
        <?php 
echo $form->field($model, 'tax_class_id')->textInput(['maxlength' => true]);
?>
        <?php 
echo $form->field($model, 'sort')->input('number');
?>
        <?php 
echo $form->field($model, 'status')->checkbox();
Ejemplo n.º 18
0
$this->beginBody();
?>

<div class="wrap">
    <div class="header">
        <div class="container">
            <h2 class="site-name">管理平台</h2>
            <?php 
NavBar::begin();
if (Yii::$app->user->identity->isSupperAdmin()) {
    $menuItems = [['label' => '会员管理', 'url' => ['/member/index'], 'items' => [['label' => '注册会员', 'url' => ['/member/create']], ['label' => '审核会员', 'url' => ['/member/unapprovedindex']], ['label' => '正式会员', 'url' => ['/member/approvedindex']], ['label' => '全部会员', 'url' => ['/member/index']]]], ['label' => '基金管理', 'url' => ['/fund/history'], 'items' => [['label' => '基金设置', 'url' => ['/fund/settings']], ['label' => '添加基金资产', 'url' => ['/fund/add']], ['label' => '基金资产', 'url' => ['/fund/history']]]], ['label' => '股票管理', 'url' => ['/stack/index'], 'items' => [['label' => '股票记录', 'url' => ['/stack/index']], ['label' => '股价动态', 'url' => ['/stack/trends']], ['label' => '股票交易', 'url' => ['/stack/transactions']], ['label' => '股票资产', 'url' => ['/stack/fund']], ['label' => '添加资产', 'url' => ['/stack/buy']], ['label' => '假日安排', 'url' => ['/date/index']]]], ['label' => '货币管理', 'url' => ['/account/list'], 'items' => [['label' => '增减货币', 'url' => yii\helpers\Url::to('/account/add?type=in')], ['label' => '账户管理', 'url' => yii\helpers\Url::to('/account/list')], ['label' => '出账明细', 'url' => yii\helpers\Url::to('/account/outlist')], ['label' => '入账明细', 'url' => yii\helpers\Url::to('/account/inlist')], ['label' => '提现管理', 'url' => yii\helpers\Url::to('/account/cashlist')]]], ['label' => '信息管理', 'url' => ['/news/index'], 'items' => [['label' => '公告管理', 'url' => yii\helpers\Url::to('/news/index')], ['label' => '添加公告', 'url' => yii\helpers\Url::to('/news/create')], ['label' => '留言管理', 'url' => yii\helpers\Url::to('/message/index')]]], ['label' => '系统管理', 'url' => ['/backup/index'], 'items' => [['label' => '数据库备份', 'url' => yii\helpers\Url::to('/backup/index')], ['label' => '密码修改', 'url' => yii\helpers\Url::to('/system/password')], ['label' => '系统设置', 'url' => yii\helpers\Url::to('/system/index')], ['label' => '系统日志', 'url' => yii\helpers\Url::to('/system/log')]]], Yii::$app->user->isGuest ? ['label' => 'Login', 'url' => ['/site/login']] : ['label' => '(' . Yii::$app->user->identity->username . ')退出', 'url' => ['/site/logout'], 'linkOptions' => ['data-method' => 'post']]];
} else {
    if (Yii::$app->user->identity->isStackTwoAdmin()) {
        $menuItems = [['label' => '股票管理', 'url' => ['/stack/index'], 'items' => [['label' => '股票记录', 'url' => ['/stack/index']], ['label' => '股价动态', 'url' => ['/stack/trends']], ['label' => '股票交易', 'url' => ['/stack/transactions']], ['label' => '假日安排', 'url' => ['/date/index']], ['label' => '股票资产', 'url' => ['/stack/fund']]]], ['label' => '货币管理', 'url' => ['/account/list'], 'items' => [['label' => '账户管理', 'url' => yii\helpers\Url::to('/account/list')]]], ['label' => '系统管理', 'url' => ['/backup/index'], 'items' => [['label' => '密码修改', 'url' => yii\helpers\Url::to('/system/password')]]], Yii::$app->user->isGuest ? ['label' => 'Login', 'url' => ['/site/login']] : ['label' => '(' . Yii::$app->user->identity->username . ')退出', 'url' => ['/site/logout'], 'linkOptions' => ['data-method' => 'post']]];
    } else {
        $menuItems = [['label' => '股票管理', 'url' => ['/stack/index'], 'items' => [['label' => '股票记录', 'url' => ['/stack/index']], ['label' => '股价动态', 'url' => ['/stack/trends']], ['label' => '股票交易', 'url' => ['/stack/transactions']], ['label' => '假日安排', 'url' => ['/date/index']]]], ['label' => '系统管理', 'url' => ['/backup/index'], 'items' => [['label' => '密码修改', 'url' => yii\helpers\Url::to('/system/password')]]], Yii::$app->user->isGuest ? ['label' => 'Login', 'url' => ['/site/login']] : ['label' => '(' . Yii::$app->user->identity->username . ')退出', 'url' => ['/site/logout'], 'linkOptions' => ['data-method' => 'post']]];
    }
}
echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => $menuItems]);
NavBar::end();
?>
        </div>
    </div>

    <div class="container">
        <?php 
foreach (Yii::$app->session->getAllFlashes() as $key => $message) {
    echo '<div class="alert alert-' . $key . '">' . $message . '</div>';
}
?>
        <?php 
Ejemplo n.º 19
0
                            sendCode = false;
                            $('#sendCodeBtn').html('已发送');
                            alert('短信发送成功');

                        }
                    });
            }
        });
        $('#submit').click(function () {
            var phone = $("input[name='username']").val();
            var password = $("input[name='password']").val();
            var validate_code = $("input[name='validate_code']").val();
            var url_code = $("input[name='url_code']").val();
            var actibity_source = '中秋节活动';
            $.post("<?php 
echo yii\helpers\Url::to(['events/signup']);
?>
",
                {
                    'phone' : phone,
                    '_csrf' : '<?php 
echo yii::$app->request->getCsrfToken();
?>
',
                    'password' : password,
                    'validate_code' : validate_code,
                    'invite_code' : url_code,
                    'actibity_source' : actibity_source
                },
                function (data){
                    data = JSON.parse(data);
Ejemplo n.º 20
0
echo $form->field($model, 'classify')->textInput()->dropDownList($model->musicClassify());
?>

    <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => 128]);
?>

    <?php 
//  echo $form->field($model, 'content')->widget(
//     MarkdownEditor::classname(),
//     ['height' => 300, 'encodeLabels' => false]
// );
?>

    <?php 
echo $form->field($model, 'content')->widget(Ueditor::classname(), ['style' => 'width:100%;height:400px', 'renderTag' => true, 'jsOptions' => ['serverUrl' => yii\helpers\Url::to(['upload']), 'autoHeightEnable' => true, 'autoFloatEnable' => true]]);
?>


    <?php 
echo $form->field($model, 'describe')->textInput(['maxlength' => 1024]);
?>

    <?php 
echo $form->field($model, 'status')->textInput()->dropDownList($model->getList());
?>

    <?php 
echo $form->field($model, 'tags')->textInput();
?>
    <div class="hint-block">特别注意:多个标签请用 <font color="red"><strong>半角逗号</strong></font> 分隔。</div>
Ejemplo n.º 21
0
<?php

use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel backend\models\RegionSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Regions';
$this->params['breadcrumbs'][] = $this->title;
?>

<div class="container-fluid">

    <div class="panel panel-primary">
        <div class="panel-heading">
            <h3 class="panel-title"><?php 
echo Html::encode($this->title);
?>
  <a href="<?php 
echo yii\helpers\Url::to(['region/create']);
?>
"><i class="fa fa-plus pull-right"></i></a></h3>
        </div>
        <div class="panel-body pd-0">
            <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'layout' => "{items}\n{pager}", 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'name', 'address', 'city', 'state', ['class' => 'yii\\grid\\ActionColumn']]]);
?>

        </div>
    </div>
</div>
Ejemplo n.º 22
0
        <?php 
foreach ($posts as $post) {
    ?>
            <div class="post clearfix">
                <h2><?php 
    echo $post->title;
    ?>
</h2>

                <p><?php 
    echo mb_substr($post->content, 0, 256, 'UTF-8');
    ?>
...</p>
                <a href="<?php 
    echo yii\helpers\Url::to($post->slug);
    ?>
">Read more</a>
                <span
                    class="pull-right">Published <b><?php 
    echo date(Yii::$app->settings->get('general.dateformat'), $post->published_at);
    ?>
</b></span>

            </div>
        <?php 
}
?>

        <div class="text-center">
            <?php 
Ejemplo n.º 23
0
<?php

/**
 * @var yii\web\View $this
 * @var app\models\Book $modelBook
 */
$this->title = 'CRUD Books';
?>

<h1>Добавление новой книги</h1>

<p>
    <a class="btn btn-primary" href="<?php 
echo yii\helpers\Url::to(['back-book/index']);
?>
">Управление</a>
</p>

<?php 
echo $this->render('/back/book/_form', ['modelBook' => $modelBook]);
?>

Ejemplo n.º 24
0
/**
 * @var yii\web\View $this
 * @var app\models\Author $modelAuthor
 * @var yii\data\ActiveDataProvider $dataProvider
 *
 * Панель управления книгами.
 */
use yii\helpers\Html;
$this->title = 'CRUD Author';
?>

<h1>Управление авторами</h1>

<p>
    <a class="btn btn-primary" href="<?php 
echo yii\helpers\Url::to(['back-author/create']);
?>
">Добавить</a>
</p>

<hr>

<?php 
echo yii\grid\GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $modelAuthor, 'columns' => ['id', 'name', ['attribute' => 'description', 'value' => function ($modelAuthor) {
    /** @var app\models\Author $modelAuthor */
    return \yii\helpers\BaseStringHelper::truncateWords($modelAuthor->description, 10);
}], ['attribute' => 'photo', 'format' => 'html', 'value' => function ($modelAuthor) {
    /** @var app\models\Author $modelAuthor */
    return $modelAuthor->photo ? Html::img($modelAuthor->photo) : '';
}], ['format' => 'html', 'label' => 'Опции', 'value' => function ($modelAuthor) {
    /** @var app\models\Author $modelAuthor */
Ejemplo n.º 25
0
                    opacity: .5,
                    color: '#fff'
                }});

            },
            error: function (error) {
                //error(error);
                $('#contenido').unblock();
            },
            success: function (response) {
                $('#contenido').unblock();
                response = JSON.parse(response);
                if( response.success )
                {
                    window.open('<?php 
echo yii\helpers\Url::to(['/siap/tesoreria/descargar-archivo']);
?>
', "_self");
                }
                else
                {
                    alert(response.message);
                }
            }
        });
        return false;
    });
    $("#agregarProveedor").click();
    $("#agregarProveedor").click();
    $("#proveedores tr").each(function()
    {
Ejemplo n.º 26
0
    $con = new app\components\Ncontent($n->fulltexts);
    ?>
                                                <li class="timeline__step done">
                                                    <input class="timeline__step-radio" id="trigger1{{identifier}}" name="trigger{{identifier}}" type="radio">
                        
                                                    <label class="timeline__step-label" for="trigger1{{identifier}}">
                                                        <span class="timeline__step-content">
            <?php 
    echo date("j M Y", strtotime($n->startdate));
    ?>
                                                        </span>
                                                    </label>
                        
                                                    <span class="timeline__step-content" style="padding: 10px;">
                                                        <a href="<?php 
    echo yii\helpers\Url::to(['site/view', 'id' => $n->id]);
    ?>
">
                                                            <img src="<?php 
    echo $con->getImg();
    ?>
" style="width: 100%; padding: 15px;"/><br/>
            <?php 
    echo $n->title;
    ?>
<br/>
                                                        </a>
                                                        <p style="text-align: left; word-wrap: break-word;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <?php 
    echo $con->getLimitText();
    ?>
?>
 <div class="requisicion-form">
    <div class='panel panel-primary'>
        <div class='panel-heading'>
            <h4 align="center">REQUISICIÓN  BIENES Y SUMINISTROS</h4>
        </div>
        <div class='panel-body'>
            <!--aqui va el cuerpo del formulario-->
        
        <?php 
$form = ActiveForm::begin(['id' => 'form_bienesysuministros', 'enableClientValidation' => true, 'enableAjaxValidation' => false, 'validateOnSubmit' => true, 'validateOnChange' => true, 'validateOnType' => true]);
?>
 
         
        <?php 
echo $form->field($tipoproducto, 'descripcion')->dropDownlist(ArrayHelper::map(Tipoproducto::find()->where(['not', ['puc' => null]])->orderBy('descripcion')->all(), 'idtipoproducto', 'descripcion'), ['prompt' => '--seleccion un producto--', 'onchange' => "\$.ajax({\n\t\t\t  sync: false,\n\t\t\t  type: 'POST',\n\t\t\t  cache: false,\n\t\t\t  url: '" . yii\helpers\Url::to(['requisicion/get-productopuc']) . "',\n\t\t\t  beforeSend: function(xhr){\n\t\t\t  /*\$('#pcont').block({css:{\n\t\t\t\t\tborder: 'none',\n\t\t\t\t\tpadding: '15px',\n\t\t\t\t\tbackgroundColor: '#000',\n\t\t\t\t\t'-webkit-border-radius': '10px',\n\t\t\t\t\t'-moz-border-radius': '10px',\n\t\t\t\t\topacity: .5,\n\t\t\t\t\tcolor: '#fff'\n\t\t\t\t}});*/\n\t\t\t },\n\t\t\tdata: {idtipoproducto: \$('#tipoproducto-descripcion').val()},\n\t\t\terror: function(error){\n\t\t\t  error(error);\n\t\t\t  //\$('#pcont').unblock();\n\t\t\t},\n\t\t\tsuccess: function(response){\n\t\t\t   response = JSON.parse(response);\n\t\t\t\t  if( response.success){\n\t\t\t               \$('#pucproducto').val(response.llamada);\n                                       \$('#pucd').val(response.categoria);\n                                       \$('#oculto1').val(response.idpuc);\n                                       \$('#oculto2').val(response.llamada);\n                                       \$('#pucoculto').val(response.llamada);\n                                       \n\t\t\t\t   }\n\t\t\t\t\t else{\n\t\t\t\t\t      alert(response.mensaje);\n\t\t\t\t\t      //\$('#pcont').unblock();\n\t\t\t\t\t }\n\t\t\t}\n\t   });"])->label('Tipo Producto');
?>
            
<label>PUC-PRODUCTO</label>
<input type="text" name="pucproducto" id="pucproducto" class="form-control" readonly="true"> <br>

<!--tabla productos-->
<div class="form-group">
    <label>PRODUCTOS</label>
    <table id="tablaproductosbs" class="table table-hover table-condensed table-striped ">
        <thead>
            <tr bgcolor="#CED8F6">
                <th>#</th>
                <th>Cantidad</th>
                <th>Producto</th>
                <th>Unidad</th>
Ejemplo n.º 28
0
<ul class="nav navbar-nav">
<li class="dropdown notifications-menu">
	<a href="#" class="dropdown-toggle" data-toggle="dropdown" title="<?php 
echo Yii::t('app', 'Select Language');
?>
">
		<i class="fa fa-language fa-lg"></i>
    </a>
	<ul class="dropdown-menu" style="<?php 
echo Yii::$app->language == 'ar' ? 'left: 0 !important; right: auto !important;' : '';
?>
">
		<li class="header">
			<?php 
echo Html::beginForm(yii\helpers\Url::to(['/site/language']), NULL, ['style' => 'margin: 10px; padding-bottom: 35px;']);
?>
			<div class="col-sm-6 col-xs-6 no-padding">
			<?php 
echo Html::label(Yii::t('app', 'Select Language'), 'language');
?>
			</div>
			<div class="col-sm-6 col-xs-6" style="padding-left:7px;">
			<?php 
echo Html::dropDownList('language', Yii::$app->language, ['en' => Yii::t('app', 'English'), 'gu' => Yii::t('app', 'Gujarati (ગુજરાતી)'), 'hi' => Yii::t('app', 'Hindi (हिन्दी)'), 'fr' => Yii::t('app', 'French (français)'), 'es' => Yii::t('app', 'Spanish (Latin American)'), 'ar' => Yii::t('app', 'Arabic (العربية)')], ['class' => 'form-control', 'onchange' => 'this.form.submit()', 'style' => 'padding: 5px;', 'title' => Yii::t('app', 'Select Language')]);
?>
			</div>

			<?php 
echo Html::endForm();
?>
Ejemplo n.º 29
0
    <?php 
echo $form->field($model, 'status')->dropDownList(\backend\models\Article::getArrayStatus());
?>
    <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'intro')->textarea(['rows' => 6]);
?>



    <?php 
//外部TAG
echo Html::tag('script', $model->content, ['id' => Html::getInputId($model, 'content'), 'name' => Html::getInputName($model, 'content'), 'type' => 'text/plain']);
echo Ueditor::widget(['model' => $model, 'attribute' => 'content', 'renderTag' => false, 'jsOptions' => ['serverUrl' => yii\helpers\Url::to(['upload']), 'autoHeightEnable' => true, 'autoFloatEnable' => true]]);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? '创建' : '更新', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>

</div>
Ejemplo n.º 30
0
        		  	$.post("<?php 
echo yii\helpers\Url::to(['money/bindcard']);
?>
",{'request_no':request_no,'ticket':ticket,'code':code, 'phone':phone,'idcard':idcard,'bankcard':bankcard,'username':username,'_csrf':'<?php 
echo yii::$app->request->getCsrfToken();
?>
'},function (data){
        			  
        			  $("#ticket").val("");
        			  $("#request_no").val("");
        			  $("#loading").css("display","none");
        		  	  alert(data);
        		  	  if(data == '绑卡成功')
        		  	  {
        		  	  	location.href="<?php 
echo yii\helpers\Url::to(['money/recharge']);
?>
";
        		  	  }
        		  });
            	}
        		else
        		{
        			wait = 0;
        			alert('请获取手机验证码');
            	}
    			
    		}
    		else
    		{
    			wait = 0;