</div> </div> <div class="p-Tabs"> <ul class="clearfix"> <li class="one"><a href="#university-videos" class="scroll-me"><i class="sprite i-videos"></i>Videos</a></li> <li class="two active"><a href="#live-chat" class="scroll-me"><i class="sprite i-livechat"></i>Live Chat</a></li> <li class="three"><a href="#other-information" class="scroll-me"><i class="sprite i-otherinfo"></i>Other Information</a></li> </ul> </div> </div> </div> <?php $profilepic = \yii::$app->user->isGuest ? 'images/default_profile_pic.jpg' : ''; if (!\yii::$app->user->isGuest) { $usermode = Userform::find()->where(['id' => \Yii::$app->user->id])->one(); $profilepic = $usermode->userprofile['image'] != '' ? $usermode->userprofile['image'] : 'images/default_profile_pic.jpg'; ?> <div class="row addmarginB10"> <div class="col-lg-12"> <h3 id="live-chat" class="normal-heading text-uppercase addmarginB20">Live Chat</h3> </div> <div class="col-lg-8 col-md-8 col-sm-7"> <div class="c-mainWindow shadowBox"> <ul class="u-chatWindow" id="chatlog"> </ul> <div id="someonetyping" style="padding:10px 91px;"></div> <!--<div id='conversation'></div>--> <div class="c-input"> <input type="text" id="message_input" class="form-control" placeholder="Type Here..." /> <input type="submit" class="sendBtn" id="sendmsgbtn" onclick="sendMessage()" value="Send" />
public function actionInterview() { $userdetails = \Yii::$app->user->identity; $model = InterviewVideo::find()->where(['user_id' => $userdetails->id])->one(); //echo "<pre>";print_r($model->video);die; if (empty($model)) { $model = new InterviewVideo(); } $video = new Video(); $user = Userform::find()->where(['id' => $userdetails->id])->one(); if (empty($user)) { $user = new Userform(); } $userprofile = UserProfile::find()->where(['user_id' => $userdetails->id])->one(); if (empty($userprofile)) { $userprofile = new UserProfile(); } if (isset($_POST['Video'])) { $video->attributes = $_POST['Video']; $video->media_module_id = 5; // id 5 is interview video type in tlb_media_module table $model->user_id = $userdetails->id; if ($video->validate()) { $video->save(); $model->video_id = $video->id; $model->save(); } } return $this->render('interview', ['model' => $model, 'user' => $user, 'video' => $video, 'userprofile' => $userprofile]); }