public function actionIndex() { $mainpage = Mainpage::model()->findByPk(0); $arrayAboutUs = $this->initAboutus(); $this->render('index', array( 'mainpage'=>array( 'title'=>$mainpage->title, 'header1'=>$mainpage->header1, 'linkName'=>$mainpage->linkName, 'subLineImage'=>$mainpage->subLineImage, 'subheader1'=>$mainpage->subheader1, ), 'block1'=>$arrayAboutUs['objAbout1'], 'block2'=>$arrayAboutUs['objAbout2'], 'block3'=>$arrayAboutUs['objAbout3'], )); }
/** * This is the default 'index' action that is invoked * when an action is not explicitly requested by users. */ public function actionIndex() { // renders the view file 'protected/views/site/index1.php' // using the default layout 'protected/views/layouts/main.php' $mainpage = Mainpage::model()->findByPk(0); $arraySteps = $this->initSteps(); $arrayAboutUs = $this->initAboutus(); $this->render('index', array( 'mainpageModel'=>$mainpage, 'mainpage'=>array( 'stepSize'=>$mainpage->stepSize, ), 'block1'=>$arrayAboutUs['objAbout1'], 'block2'=>$arrayAboutUs['objAbout2'], 'block3'=>$arrayAboutUs['objAbout3'], 'step1'=>$arraySteps['step1'], 'step2'=>$arraySteps['step2'], 'step3'=>$arraySteps['step3'], 'step4'=>$arraySteps['step4'], 'step5'=>$arraySteps['step5'], )); }
<body onload="centerPage()"> <?php /* @var $this SiteController */ ?> <script src="<?php echo Yii::app()->request->baseUrl; ?>/scripts/sliderMainpage.js"></script> <?php $this->renderPartial('_slider'); ?> <?php $mainpageModel = new Mainpage(); $this->pageTitle = $mainpageModel->getTitle(); $subLineImage = StaticFilesHelper::createPath('image', 'mainpage', 'line1.png'); $massAbout=array($block1,$block2,$block3); ?> <?php $this->renderPartial('_aboutUs', array('massAbout' => $massAbout, 'subLineImage' => $subLineImage));?> <?php $stepsArray=array($step1,$step2,$step3,$step4,$step5);?> <?php $this->renderPartial('_steps', array('mainpageModel' => $mainpageModel, 'mainpage' => $mainpage, 'stepsArray' =>$stepsArray)); ?> <?php if(Yii::app()->user->isGuest) { $this->renderPartial('_form'); } ?> </body>
<?php $model=new StudentReg(); $mainpage = new Mainpage(); ?> <script src="//ulogin.ru/js/ulogin.js"></script> <link type="text/css" rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl; ?>/css/regform.css" /> <div style="position:relative;"><a name="form" style="position:absolute; top:-60px;"></a></div> <div class="regFormBG" > <div class="regFormBox"> <p class="zagolovok"><?php echo Yii::t('regform','0009'); ?></p> <p class="zagolovok2"><?php echo Yii::t('regform','0010'); ?></p> <div class="signInForm"> <?php $form=$this->beginWidget('CActiveForm', array( 'id'=>'studentreg-form', 'action' => array('site/rapidreg'), // Please note: When you enable ajax validation, make sure the corresponding // controller action is handling ajax validation correctly. // There is a call to performAjaxValidation() commented in generated controller code. // See class documentation of CActiveForm for details on this. 'enableClientValidation'=>true, 'enableAjaxValidation'=>true, 'clientOptions'=>array('validateOnSubmit'=>true,'validateOnChange'=>false), )); ?> <div class="rowemail"> <?php $placeHolderEmail = Yii::t('regform','0014');?> <?php echo $form->textField($model,'email',array('class'=>'signInEmail','placeholder'=>$placeHolderEmail,'size'=>60,'maxlength'=>255)); ?> <?php echo $form->error($model,'email',array('id'=>'emailErr')); ?>