announsement
This commit is contained in:
parent
a5a0d738d6
commit
280c6aa338
@ -128,8 +128,8 @@ $route['getTotalStudent'] = 'Dashboard_Controller/getTotalStudent';
|
|||||||
$route['getTotalEmployee'] = 'Dashboard_Controller/getTotalEmployee';
|
$route['getTotalEmployee'] = 'Dashboard_Controller/getTotalEmployee';
|
||||||
$route['getTotalUsers'] = 'Dashboard_Controller/getTotalUsers';
|
$route['getTotalUsers'] = 'Dashboard_Controller/getTotalUsers';
|
||||||
|
|
||||||
|
/*login page announcement*/
|
||||||
$route['checkSMS'] = 'Student_Controller/checkSMS';
|
$route['getLoginAnnouncementDetails'] = 'Login_Controller/getLoginAnnouncementDetails';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -30,6 +30,7 @@ class Login_Controller extends REST_Controller {
|
|||||||
$this->methods['login_post']['limit'] = 100; // 100 requests per hour per user/key
|
$this->methods['login_post']['limit'] = 100; // 100 requests per hour per user/key
|
||||||
$this->methods['login_delete']['limit'] = 50; // 50 requests per hour per user/key
|
$this->methods['login_delete']['limit'] = 50; // 50 requests per hour per user/key
|
||||||
$this->load->model('Login_model', 'login_model');
|
$this->load->model('Login_model', 'login_model');
|
||||||
|
$this->load->model('Announcement_model', 'announcement_model');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,5 +87,34 @@ class Login_Controller extends REST_Controller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* get Announcement Details
|
||||||
|
* created by Surendiran
|
||||||
|
* */
|
||||||
|
public function getLoginAnnouncementDetails_post()
|
||||||
|
{
|
||||||
|
$requestedBy = $this->post('requestedBy');
|
||||||
|
|
||||||
|
|
||||||
|
$getAnnouncement = $this->announcement_model->getLoginAnnouncement();
|
||||||
|
|
||||||
|
if ($getAnnouncement)
|
||||||
|
{
|
||||||
|
$getAnnouncement['status'] = REST_Controller::HTTP_OK;
|
||||||
|
// Set the response and exit
|
||||||
|
$this->response($getAnnouncement, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Set the response and exit
|
||||||
|
$this->response([
|
||||||
|
'message' => 'No records found!',
|
||||||
|
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||||
|
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,4 +79,26 @@ class Announcement_model extends CI_Model {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* get announcement details
|
||||||
|
* created by Surendiran
|
||||||
|
* */
|
||||||
|
public function getLoginAnnouncement()
|
||||||
|
{
|
||||||
|
$this->db->select('Heading,description');
|
||||||
|
$this->db->from(ANNOUNCEMENT);
|
||||||
|
$this->db->where('IsActive',1);
|
||||||
|
$this->db->order_by('CreatedOn','DESC');
|
||||||
|
$announcementDetails = $this->db->get();
|
||||||
|
if($announcementDetails->result()){
|
||||||
|
$result['AnnouncementStatus'] = true;
|
||||||
|
$result['details'] = $announcementDetails->result();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$result['AnnouncementStatus'] = false;
|
||||||
|
$result['message'] = "No records found!";
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
angular.module("clip-two", [
|
angular.module("clip-two", [
|
||||||
'ngAnimate',
|
// 'ngAnimate',
|
||||||
'ngCookies',
|
'ngCookies',
|
||||||
'ngStorage',
|
'ngStorage',
|
||||||
'ngSanitize',
|
'ngSanitize',
|
||||||
|
|||||||
@ -79,4 +79,29 @@ app.controller('loginCtrl', ["$scope", "$http", "API_POINTS", "$state", '$rootSc
|
|||||||
form.$setPristine(true);
|
form.$setPristine(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$scope.myInterval = 2000; // load when html page load
|
||||||
|
$scope.init = function () {
|
||||||
|
$scope.getAnnouncementDetails();
|
||||||
|
}
|
||||||
|
$scope.getAnnouncementDetails = function () {
|
||||||
|
var req = {
|
||||||
|
method: 'POST',
|
||||||
|
url: apiPoint.url + 'getLoginAnnouncementDetails/',
|
||||||
|
headers: { 'Content-Type': 'application/json' },
|
||||||
|
data: {}
|
||||||
|
};
|
||||||
|
$http(req).then(function (response) {
|
||||||
|
if (response.data.AnnouncementStatus) {
|
||||||
|
$scope.slides = response.data.details;
|
||||||
|
// alert(JSON.stringify($scope.slides));
|
||||||
|
} else {
|
||||||
|
$scope.slides = [{
|
||||||
|
"Heading" : " ",
|
||||||
|
"description" : " "
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}]);
|
}]);
|
||||||
@ -1,117 +1,4 @@
|
|||||||
<style>
|
<div ng-controller="loginCtrl">
|
||||||
@import url(https://fonts.googleapis.com/css?family=Varela+Round);
|
|
||||||
|
|
||||||
|
|
||||||
.slides {
|
|
||||||
padding: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 420px;
|
|
||||||
display: block;
|
|
||||||
margin: 0 auto;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.slides * {
|
|
||||||
user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-khtml-user-select: none;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-webkit-touch-callout: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.slides input { display: none; }
|
|
||||||
|
|
||||||
.slide-container { display: block; }
|
|
||||||
|
|
||||||
.slide {
|
|
||||||
top: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 420px;
|
|
||||||
display: block;
|
|
||||||
position: absolute;
|
|
||||||
|
|
||||||
transform: scale(0);
|
|
||||||
|
|
||||||
transition: all .7s ease-in-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
.slide img {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav label {
|
|
||||||
width: 200px;
|
|
||||||
height: 100%;
|
|
||||||
display: none;
|
|
||||||
position: absolute;
|
|
||||||
|
|
||||||
opacity: 0;
|
|
||||||
z-index: 9;
|
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
transition: opacity .2s;
|
|
||||||
|
|
||||||
color: #FFF;
|
|
||||||
font-size: 156pt;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 380px;
|
|
||||||
font-family: "Varela Round", sans-serif;
|
|
||||||
background-color: rgba(255, 255, 255, .3);
|
|
||||||
text-shadow: 0px 0px 15px rgb(119, 119, 119);
|
|
||||||
}
|
|
||||||
|
|
||||||
.slide:hover + .nav label { opacity: 0.5; }
|
|
||||||
|
|
||||||
.nav label:hover { opacity: 1; }
|
|
||||||
|
|
||||||
.nav .next { right: 0; }
|
|
||||||
|
|
||||||
input:checked + .slide-container .slide {
|
|
||||||
opacity: 1;
|
|
||||||
|
|
||||||
transform: scale(1);
|
|
||||||
|
|
||||||
transition: opacity 1s ease-in-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
input:checked + .slide-container .nav label { display: block; }
|
|
||||||
|
|
||||||
.nav-dots {
|
|
||||||
width: 100%;
|
|
||||||
bottom: 9px;
|
|
||||||
height: 11px;
|
|
||||||
display: block;
|
|
||||||
position: absolute;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-dots .nav-dot {
|
|
||||||
top: -5px;
|
|
||||||
width: 11px;
|
|
||||||
height: 11px;
|
|
||||||
margin: 0 4px;
|
|
||||||
position: relative;
|
|
||||||
border-radius: 100%;
|
|
||||||
display: inline-block;
|
|
||||||
background-color: rgba(0, 0, 0, 0.6);
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-dots .nav-dot:hover {
|
|
||||||
cursor: pointer;
|
|
||||||
background-color: rgba(0, 0, 0, 0.8);
|
|
||||||
}
|
|
||||||
|
|
||||||
input#img-1:checked ~ .nav-dots label#img-dot-1,
|
|
||||||
input#img-2:checked ~ .nav-dots label#img-dot-2,
|
|
||||||
input#img-3:checked ~ .nav-dots label#img-dot-3,
|
|
||||||
input#img-4:checked ~ .nav-dots label#img-dot-4,
|
|
||||||
input#img-5:checked ~ .nav-dots label#img-dot-5{
|
|
||||||
background: rgba(0, 0, 0, 0.8);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<!-- start: LOGIN -->
|
|
||||||
<div class="row" style="margin-bottom: 1%;margin-top:-4%">
|
<div class="row" style="margin-bottom: 1%;margin-top:-4%">
|
||||||
<div class="col-md-2 col-md-offset-1 col-xs-10 col-xs-offset-1">
|
<div class="col-md-2 col-md-offset-1 col-xs-10 col-xs-offset-1">
|
||||||
<img ng-src="{{app.layout.logo}}" alt=""/>
|
<img ng-src="{{app.layout.logo}}" alt=""/>
|
||||||
@ -120,19 +7,31 @@ input#img-5:checked ~ .nav-dots label#img-dot-5{
|
|||||||
<div class="main-login col-xs-10 col-xs-offset-1 col-sm-7 col-sm-offset-5 col-md-6 col-md-offset-3">
|
<div class="main-login col-xs-10 col-xs-offset-1 col-sm-7 col-sm-offset-5 col-md-6 col-md-offset-3">
|
||||||
|
|
||||||
<!-- start: LOGIN BOX -->
|
<!-- start: LOGIN BOX -->
|
||||||
<div ng-controller="loginCtrl">
|
|
||||||
<style>
|
<style>
|
||||||
.alert {
|
.alert {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.carousel-indicators li {
|
||||||
|
border:1px solid #000 !important;
|
||||||
|
}
|
||||||
|
.carousel-indicators
|
||||||
|
{
|
||||||
|
position:fixed !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
.carousel-inner {
|
||||||
|
overflow:visible !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<form name="Form" id="form" novalidate class="form-inline" ng-submit="form.submit(Form)" method="post" style="margin-top:2%;">
|
<form name="Form" id="form" novalidate class="form-inline" ng-submit="form.submit(Form)" method="post" style="margin-top:2%;">
|
||||||
|
|
||||||
<div class="form-group" ng-class="{'has-error':Form.mobilenumber.$dirty && Form.mobilenumber.$invalid, 'has-success':Form.mobilenumber.$valid}">
|
<div class="form-group" ng-class="{'has-error':Form.mobilenumber.$dirty && Form.mobilenumber.$invalid, 'has-success':Form.mobilenumber.$valid}">
|
||||||
<span class="input-icon">
|
<span class="input-icon">
|
||||||
<input type="text" class="form-control" ng-model="myModel.userMobile" name="mobilenumber" placeholder="Mobile Number"
|
<input type="text" class="form-control" ng-model="myModel.userMobile" name="mobilenumber" placeholder="Mobile Number"
|
||||||
ng-minlength="10" ng-maxlength="12" ng-pattern="/^[0-9]*$/" required>
|
ng-minlength="10" ng-maxlength="12" ng-pattern="/^[0-9]*$/" required>
|
||||||
<i class="fa fa-mobile"></i>
|
<i class="fa fa-mobile"></i>
|
||||||
</span>
|
</span>
|
||||||
<span class="error text-small block" ng-if="Form.mobilenumber.$dirty && Form.mobilenumber.$error.required"> mobile number is required. </span>
|
<span class="error text-small block" ng-if="Form.mobilenumber.$dirty && Form.mobilenumber.$error.required"> mobile number is required. </span>
|
||||||
@ -142,17 +41,13 @@ input#img-5:checked ~ .nav-dots label#img-dot-5{
|
|||||||
<div class="form-group" ng-class="{'has-error':Form.password.$dirty && Form.password.$invalid, 'has-success':Form.password.$valid}">
|
<div class="form-group" ng-class="{'has-error':Form.password.$dirty && Form.password.$invalid, 'has-success':Form.password.$valid}">
|
||||||
|
|
||||||
<span class="input-icon">
|
<span class="input-icon">
|
||||||
<input type="password" placeholder="Passwords"
|
<input type="password" placeholder="Password"
|
||||||
class="form-control heighLight" name="password" ng-model="myModel.password"
|
class="form-control heighLight" name="password" ng-model="myModel.password"
|
||||||
ng-minlength="6"
|
ng-minlength="6"
|
||||||
required/>
|
required/>
|
||||||
<i class="fa fa-lock"></i>
|
<i class="fa fa-lock"></i>
|
||||||
<span class="error text-small block" ng-if="Form.password.$dirty && Form.password.$invalid"> Password Required</span></span>
|
<span class="error text-small block" ng-if="Form.password.$dirty && Form.password.$invalid"> Password Required</span></span>
|
||||||
<p><a class="forgot" ui-sref="login.forgot">
|
|
||||||
I forgot my password
|
|
||||||
</a></p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<button type="submit" class="btn btn-primary pull-right">
|
<button type="submit" class="btn btn-primary pull-right">
|
||||||
@ -160,8 +55,15 @@ input#img-5:checked ~ .nav-dots label#img-dot-5{
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div id="cl-effect-16" class="links cl-effect-16 col-xs-5 col-xs-offset-2 col-md-4 col-md-offset-5">
|
||||||
|
<a data-hover="I forgot my password" class="forgot" ui-sref="login.forgot">I forgot my password
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- end: LOGIN BOX -->
|
<!-- end: LOGIN BOX -->
|
||||||
@ -169,77 +71,42 @@ input#img-5:checked ~ .nav-dots label#img-dot-5{
|
|||||||
<!-- end: LOGIN -->
|
<!-- end: LOGIN -->
|
||||||
<!-- Start: View Of Announcement -->
|
<!-- Start: View Of Announcement -->
|
||||||
|
|
||||||
<div class="container-fluid container-fullw bg-white">
|
<div class="container-fluid container-fullw bg-white" style="height:300px;" data-ng-init="init()">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-sm-12 col-xs-12">
|
<div class="col-sm-12 col-xs-12" >
|
||||||
<ul class="slides">
|
|
||||||
<input type="radio" name="radio-btn" id="img-1" checked />
|
|
||||||
<li class="slide-container">
|
|
||||||
<div class="slide">
|
|
||||||
<img src="assets/images/s1.jpg" />
|
|
||||||
</div>
|
|
||||||
<div class="nav">
|
|
||||||
<label for="img-6" class="prev">‹</label>
|
|
||||||
<label for="img-2" class="next">›</label>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<input type="radio" name="radio-btn" id="img-2" />
|
|
||||||
<li class="slide-container">
|
|
||||||
<div class="slide">
|
|
||||||
<img src="assets/images/s2.jpg" />
|
|
||||||
</div>
|
|
||||||
<div class="nav">
|
|
||||||
<label for="img-1" class="prev">‹</label>
|
|
||||||
<label for="img-3" class="next">›</label>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<input type="radio" name="radio-btn" id="img-3" />
|
|
||||||
<li class="slide-container">
|
|
||||||
<div class="slide">
|
|
||||||
<img src="assets/images/s3.jpg" />
|
|
||||||
</div>
|
|
||||||
<div class="nav">
|
|
||||||
<label for="img-2" class="prev">‹</label>
|
|
||||||
<label for="img-4" class="next">›</label>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<input type="radio" name="radio-btn" id="img-4" />
|
|
||||||
<li class="slide-container">
|
|
||||||
<div class="slide">
|
|
||||||
<img src="assets/images/s5.jpg" />
|
|
||||||
</div>
|
|
||||||
<div class="nav">
|
|
||||||
<label for="img-3" class="prev">‹</label>
|
|
||||||
<label for="img-5" class="next">›</label>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<input type="radio" name="radio-btn" id="img-5" />
|
|
||||||
<li class="slide-container">
|
|
||||||
<div class="slide">
|
|
||||||
<img src="assets/images/s6.jpg" />
|
|
||||||
</div>
|
|
||||||
<div class="nav">
|
|
||||||
<label for="img-4" class="prev">‹</label>
|
|
||||||
<label for="img-6" class="next">›</label>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
|
<carousel interval="myInterval">
|
||||||
<li class="nav-dots">
|
|
||||||
<label for="img-1" class="nav-dot" id="img-dot-1"></label>
|
<slide ng-repeat="slide in slides" active="slide.active">
|
||||||
<label for="img-2" class="nav-dot" id="img-dot-2"></label>
|
<div class="col-md-8 col-md-offset-2">
|
||||||
<label for="img-3" class="nav-dot" id="img-dot-3"></label>
|
<h1 style="color:#cf1f1f"> {{slide.Heading}}</h1>
|
||||||
<label for="img-4" class="nav-dot" id="img-dot-4"></label>
|
<p ng-bind-html="slide.description"></p>
|
||||||
<label for="img-5" class="nav-dot" id="img-dot-5"></label>
|
<div class="carousel-caption">
|
||||||
</li>
|
|
||||||
</ul>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
|
||||||
|
</slide>
|
||||||
|
</carousel>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- End: View Of Announcement -->
|
</div>
|
||||||
|
<!-- End: View Of Announcement -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user