예제 #1
0
                <?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>
예제 #2
0
<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>
예제 #3
0
 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;
     }
 }
예제 #4
0
    ?>
"><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">
예제 #5
0
?>
" 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;
 }