コード例 #1
0
 public function actionCambiar()
 {
     $model = USUARIOS::find()->where('id=:id', ['id' => $_GET["id"]])->one();
     $model->estatus_did = $_GET['estatus'];
     if ($model->save()) {
         return $this->redirect('index');
     }
 }
コード例 #2
0
ファイル: USUARIOSSEARCH.php プロジェクト: rzamarripa/shabel
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = USUARIOS::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['id' => $this->id, 'status' => $this->status, 'created_at' => $this->created_at, 'updated_at' => $this->updated_at]);
     $query->andFilterWhere(['like', 'username', $this->username])->andFilterWhere(['like', 'password_hash', $this->password_hash])->andFilterWhere(['like', 'email', $this->email])->andFilterWhere(['like', 'auth_key', $this->auth_key])->andFilterWhere(['like', 'password_reset_token', $this->password_reset_token]);
     return $dataProvider;
 }
コード例 #3
0
ファイル: SiteController.php プロジェクト: rzamarripa/du
 public function actionSignup()
 {
     $usuarioActual = UsuariosRoles::find()->where('usuarioId = :id', ['id' => Yii::$app->user->id])->all();
     $model = new SignupForm();
     $usuarios = USUARIOS::find()->all();
     if ($model->load(Yii::$app->request->post())) {
         if ($user = $model->signup()) {
             return $this->redirect(['roles', 'id' => $user->id]);
         }
     }
     foreach ($usuarioActual as $ur) {
         if ($ur->roles->nombre == 'Dev' or $ur->roles->nombre == 'Sistemas') {
             return $this->render('signup', ['model' => $model, 'usuarios' => $usuarios]);
         }
     }
     return $this->goHome();
 }
コード例 #4
0
ファイル: main.php プロジェクト: rzamarripa/shabel
	<!-- #BODY -->
	<!-- Possible Classes

		* 'smart-style-{SKIN#}'
		* 'smart-rtl'         - Switch theme mode to RTL
		* 'menu-on-top'       - Switch to top navigation (no DOM change required)
		* 'no-menu'			  - Hides the menu completely
		* 'hidden-menu'       - Hides the main menu but still accessable by hovering over left edge
		* 'fixed-header'      - Fixes the header
		* 'fixed-navigation'  - Fixes the main menu
		* 'fixed-ribbon'      - Fixes breadcrumb
		* 'fixed-page-footer' - Fixes footer
		* 'container'         - boxed layout mode (non-responsive: will not work with fixed-navigation & fixed-ribbon)
	-->
	<body class="menu-on-top pace-done">
		<?php $usuarioActual = USUARIOS::find()->where('id = :id',['id'=>Yii::$app->user->id])->one();?>
		<!-- HEADER -->
		<header  id="header">
			<div style="">
				
			</div>

			<!-- projects dropdown -->

			<!-- pulled right: nav area -->
			<div class="pull-right">
				
				<!-- collapse menu button -->
				<div id="hide-menu" class="btn-header pull-right">
					<span> <a href="javascript:void(0);" data-action="toggleMenu" title="Collapse Menu"><i class="fa fa-reorder"></i></a> </span>
				</div>