Ejemplo n.º 1
0
                            <h4><a>Thông tin</a></h4>
                            <address>
                                <strong class="text-uppercase" style="font-size: 1.3em">Trung tâm tin học thành phố Sa Đéc</strong><br>
                                <i class="fa fa-map-marker"></i>  Số 530A, Nguyễn Sinh Sắc,Khóm 5, Phường 1, Thành Phố Sa Đéc, Đồng Tháp.<br>
                                <i class="fa fa-phone"></i> (0673) 861 534 - <i class="fa fa-fax"></i> (0673) 861 534
                            </address>
                        </div>
                        <div class="col-lg-3 col-sm-3">
                            <h4><a>Liên kết Website</a></h4>
                            <?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'formLink', 'htmlOptions' => array('class' => 'form-horizontal')));
?>
                            <div class="form-group">
                                <div class="col-lg-12">
                                    <?php 
echo $form->dropDownlist($this->link, 'linksite', Linksite::model()->getLinkSite(), array('empty' => 'Chọn liên kết site', 'class' => 'form-control'));
?>
                                </div>
                            </div>
                            <?php 
$this->endWidget();
?>
                            <script>
                                $('#Linksite_linksite').change(function () {
                                    var link = $('#Linksite_linksite option:selected').val();
                                    if (link != "") {
                                        window.open('http://' + link, '_blank');
                                    } else {
                                        alert('TRUNG TÂM TIN HỌC THÀNH PHỐ SA ĐÉC\nSố 530A, Nguyễn Sinh Sắc,Khóm 5, Phường 1, Thành Phố Sa Đéc, Đồng Tháp\nĐiện thoại: (0673) 861 534\nFax: (0673) 861 534')
                                    }
Ejemplo n.º 2
0
 /**
  * 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 Linksite the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Linksite::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }