<div class="primary_container"> <div class="primary_container_body" style="margin-top: 20px"> <div class="pendding_click"> <div id="container_course"> <div class="dataListCourse"> <h2 class="course_title">ALL COURSES</h2> <div style="width:100%; float: left;" id="CourseMyList"> <div class="container_test"> <div class="box_test"> <div id="container_course"> <div class="col-md-12" style="padding-bottom:15px;"> <b style="float:left;margin:5px 0;">Filter</b> <div class="col-md-3"> <?php echo CHtml::dropDownList('company', "", CHtml::listData(WCompany::model()->findAll(), 'company_code', 'company_name'), array("onchange" => "LoadCourseOption();", 'id' => "company", 'prompt' => '--' . Yii::t('web/home', 'Select Company') . '--', 'class' => 'form-control')); ?> </div> <div class="col-md-3"> <?php echo CHtml::dropDownList('cate', "", CHtml::listData(WCourseCat::model()->findAll(), 'id', 'course_cat'), array("onchange" => "LoadCourseOption();", 'id' => "cate", 'prompt' => '--' . Yii::t('web/home', 'Select Category') . '--', 'class' => 'form-control')); ?> </div> <b style="float:left;margin:5px 0;">Type</b> <div class="col-md-2"> <select id="course_type" name="course_type" onchange="LoadCourseOption();" class="form-control"> <option value="0" selected="selected">Select All</option> <option value="1">Course New</option> <option value="2">Pendding</option> <option value="5">Activated - Waiting for ...</option> <option value="3">Start - Studying...</option>
<?php echo $form->textArea($model, 'address', array('size' => 60, 'maxlength' => 255, 'class' => 'form-control')); ?> <?php echo $form->error($model, 'address'); ?> </td> </tr> <tr> <td width="130"><?php echo $form->labelEx($model, 'company_code'); ?> </td> <td style="padding-bottom: 10px;"> <?php echo $form->dropDownList($model, 'company_code', CHtml::listData(WCompany::model()->findAll('status=:status', array(':status' => 1)), "company_code", "company_name"), array('class' => 'form-control')); ?> <?php echo $form->error($model, 'company_code'); ?> </td> </tr> <tr> <td valign="top"></td> <td> <?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save', array('class' => 'btn btn-success', 'id' => 'btn_sumit', 'onclick' => 'return formSubmit();')); ?> </td> </tr>
?> "><span class="btn_right">Test Result of All courses</span></a> <?php } ?> <div class="clear"></div> </div> </div> <div class="primary_container"> <div class="primary_container_test" style="box-shadow: 0px 0px 0px; border: 0px; "> <div class="container_test"> <div class="box_test"> <div class="form-group" style="width: 100%; float: left;"> <div class="col-sm-1">Filter: </div> <div class="col-sm-3"><?php echo CHtml::dropDownList('company_code', 'id', CHtml::listData(WCompany::model()->findAll(), 'company_code', 'company_name'), array('prompt' => '--' . Yii::t('web/home', 'Chọn công ty') . '--', 'class' => 'form-control', 'style' => 'width:250px;', "onchange" => "return LoadTestParent()")); ?> </div> <div class="col-sm-3"><?php echo CHtml::dropDownList('test_cat_id', 'id', CHtml::listData(WTestCat::model()->findAll(), 'id', 'test_cat'), array('prompt' => '--' . Yii::t('web/home', 'Chọn danh mục') . '--', 'class' => 'form-control', 'style' => 'width:250px;', "onchange" => "return LoadTestParent()")); ?> </div> <div class="col-sm-2"> <select id="filter_test" onchange="return LoadTestParent()" class="form-control"> <option value="">-- Filter Test --</option> <option value="1">Pre-test</option> <option value="0">Post-test</option> <option value="2">Both</option> </select> </div> <div class="col-sm-3">
public static function UpdateStatus($company_code) { $com = WCompany::model()->find('company_code=:company_code', array(':company_code' => $company_code)); $com->status = 0; $update = $com->update(); if ($update == true) { return true; } else { return false; } }
if ($data['supervisor_code']) { echo WUser::getFullNameSuperUser($data['supervisor_code']); } else { echo 'N/A'; } ?> </p></td> </tr> <?php } else { ?> <tr class="company"> <td><p>Company : </p></td> <td class="value"><p><?php if ($data['company_code']) { echo WCompany::getNameCompany($item['company_code']); } else { echo 'N/A'; } ?> </p></td> </tr> <?php } ?> <tr class="fullname"> <td><p>Gender : </p></td> <td class="value"><p><?php // var_dump($data['sex']); if ($data['sex']) { if ($data['sex'] == 0) {
public function actionCreateTrainer() { $cs = Yii::app()->getClientScript(); //$cs->registerScriptFile(Yii::app()->theme->baseUrl.'/js/ckeditor/ckeditor.js'); $cs->registerCssFile(Yii::app()->theme->baseUrl . '/js/jqueryUpload/jquery.fileupload.css'); $cs->registerScriptFile(Yii::app()->theme->baseUrl . '/js/bootstrap-datepicker/bootstrap-datetimepicker.js', CClientScript::POS_END); $cs->registerScriptFile(Yii::app()->theme->baseUrl . '/js/jqueryUpload/jquery.ui.widget.js', CClientScript::POS_END); $cs->registerScriptFile(Yii::app()->theme->baseUrl . '/js/jqueryUpload/jquery.fileupload.js', CClientScript::POS_END); $model = new WUser(); // Uncomment the following line if AJAX validation is needed // $this->performAjaxValidation($model); if (isset($_POST['WUser'])) { $model->attributes = $_POST['WUser']; $model->password = CFunction::encrypt(Yii::app()->params->password_default, Yii::app()->params->hashkey); $model->company_code = $_POST['WUser']['company_code']; $model->user_group_id = 1; $model->status = 1; if ($model->save()) { WCompany::UpdateStatus($model->company_code); $this->redirect(array('AllTrainer')); } } $this->render('/wManagerUser/createtrainer', array('model' => $model)); }
</font> <!-- Created date: <font class="time_last"> <?php if (!empty($item['created_date'])) { echo date('d-m-Y', $item['created_date']); } else { echo 'N/A'; } ?> </font> --> </span> </td> <td> <?php echo !empty($item['company_code']) ? WCompany::getNameCompany($item['company_code']) : 'N/A'; ?> </td> <td><?php echo !empty($item['email']) ? $item['email'] : 'N/A'; ?> </td> <td><?php echo !empty($item['phone']) ? $item['phone'] : 'N/A'; ?> </td> <td><?php echo !empty($item['address']) ? $item['address'] : 'N/A'; ?> </td>
?> " class="btn btn-warning" style="float: right;margin-top: 15px;margin-right: 10px; font-weight: bold;"><?php echo Yii::t('web/home', 'Category Course'); ?> </a> <div class="clear"></div> </div> </div> <div class="primary_container"> <div class="primary_container_body" style="margin-top: 20px"> <div class="col-md-12" style="padding-bottom:15px;"> <b style="float:left;margin:5px 0;">Filter</b> <div class="col-md-3"> <?php echo CHtml::dropDownList('company', 'company_code', CHtml::listData(WCompany::model()->findAll(), 'company_code', 'company_name'), array("onchange" => "load_content3();", 'id' => "company", "name" => "companyList", 'prompt' => '--' . Yii::t('web/home', 'Select Company') . '--', 'class' => 'form-control', 'style' => 'width:180px;')); ?> </div> <div class="col-md-3"> <?php echo CHtml::dropDownList('cate', 'course_cat_id', CHtml::listData(WCourseCat::model()->findAll(), 'id', 'course_cat'), array("onchange" => "load_content3();", 'id' => "cate", "name" => "categoryList", 'prompt' => '--' . Yii::t('web/home', 'Select Category') . '--', 'class' => 'form-control', 'style' => 'width:180px;')); ?> </div> <div class="col-md-2"> <select id="course_type" name="course_type" onchange="load_content3();" class="form-control"> <option value="0" selected="selected">Select All</option> <option value="1">Pendding</option> <option value="2">Activated</option> <option value="3">Studying...</option> <option value="4">Closed</option> </select>
/** * Returns the data model based on the primary key given in the GET variable. * If the data model is not found, an HTTP exception will be raised. * @param integer $id the ID of the model to be loaded * @return WCompany the loaded model * @throws CHttpException */ public function loadModel($id) { $model = WCompany::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }