Esempio n. 1
0
 public function actionChangePassword()
 {
     $model = new ChangePasswordForm();
     if ($model->load(Yii::$app->request->post()) && $model->change()) {
         AlertHelper::appendAlert('success', Yii::t('happycode', 'Your password was changed.'));
         return $this->goBack();
     } else {
         return $this->render('change-password', ['model' => $model]);
     }
 }
Esempio n. 2
0
 public function actionAdd()
 {
     $model = new AddCodeForm();
     if ($model->load(Yii::$app->request->post()) && $model->add()) {
         AlertHelper::appendAlert('success', Yii::t('happycode', 'Your paste was successfully added and is currently waiting for administrator to approve it.'));
         return $this->redirect(['site/index']);
     } else {
         return $this->render('add-code', ['model' => $model]);
     }
 }
Esempio n. 3
0
</head>
<body>

<?php 
$this->beginBody();
?>
    <div class="wrap">
        <?php 
echo $this->render('banner');
?>
        <div class="container">
            <?php 
echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
?>
            <?php 
echo AlertHelper::render();
?>
            <?php 
echo $content;
?>
        </div>
    </div>

    <footer class="footer">
        <div class="container">
            <p class="pull-left">&copy; Shitcode.net <?php 
echo date('Y');
?>
, <?php 
echo Yii::powered();
?>