diff --git a/Apollo/api/application/models/Broadcast_model.php b/Apollo/api/application/models/Broadcast_model.php
index f7e48e48..50640bb2 100644
--- a/Apollo/api/application/models/Broadcast_model.php
+++ b/Apollo/api/application/models/Broadcast_model.php
@@ -270,6 +270,7 @@ class Broadcast_model extends CI_Model
curl_close($ch);
$arrss = explode('
', $output);
+ array_pop($arrss);
// Array
// (
// [0] => MsgID
@@ -280,9 +281,10 @@ class Broadcast_model extends CI_Model
// )
$time = date('Y-m-d H:i:s');
$dateTime = $time;
- for($i=0, $c = count($arrss) ; $i< $c; $i++){
+ $c = count($arrss);
+ for($i=0 ; $i < $c; $i++){
// echo $arrss[$i];exit();
- if( $arrss[$i] === '') {
+ if( end($arrss)) {
break;
} else {
$a = explode('|', $arrss[$i]);
@@ -292,14 +294,17 @@ class Broadcast_model extends CI_Model
$delvOn = $a[3];
$qury1 = "SELECT * FROM T_BroadcastDeliveryCron WHERE MsgId = '$msgId'";
$choe = $this->db->query($qury1)->first_row();
+ // print_r($choe);exit();
if($this->db->query($qury1)->first_row()){
$qury2 = "UPDATE T_BroadcastDeliveryCron SET DeliveredStatus = '$delvStatus', DeliveredOn = '$delvOn' WHERE MsgId = '$msgId'";
+
$choe2 = $this->db->query($qury2);
- continue;
+ // continue;
} else {
$qury3 = " INSERT INTO T_BroadcastDeliveryCron (MsgId, MobileNumber, DeliveredStatus, DeliveredOn, CreatedOn) VALUES('$msgId', '$msgNumb', '$delvStatus', '$delvOn', '$dateTime')";
+
$choe3 = $this->db->query($qury3);
- continue;
+ // continue;
}
}
}
diff --git a/Apollo/api/application/models/Student_model.php b/Apollo/api/application/models/Student_model.php
index 3138c349..34c7ac20 100755
--- a/Apollo/api/application/models/Student_model.php
+++ b/Apollo/api/application/models/Student_model.php
@@ -37,7 +37,7 @@ class Student_model extends CI_Model
// echo $loginUserId, $loginUserBranchId, $loginUserType; exit();
if ($loginUserType == SUPER_ADMIN) {
// list for super admin based on branch
- if($getSearchData["University"] === '' && $getSearchData["Course"] === '' && $getSearchData["Course"] === '') {
+ if($getSearchData["University"] === '' && $getSearchData["Course"] === '' && $getSearchData["Status"] === '') {
$this->db->select('*');
$this->db->from(STUDENTS);
$this->db->order_by('CreatedOn', 'DESC');
@@ -62,19 +62,34 @@ class Student_model extends CI_Model
$University = $getSearchData['University'];
$Course = $getSearchData['Course'];
- $Batch = $getSearchData['Batch'];
+ // $Batch = $getSearchData['Batch'];
+ $Batch='';
+ $StuStatus = $getSearchData['Status'];
- $subQuery = "SELECT S.*
+ if($StuStatus == '' ){
+ $subQuery = "SELECT S.*
FROM ".STUDENTS." as S LEFT JOIN ".STUDENTCOURSE." as SC ON SC.StudentID = S.StudentID
LEFT JOIN ".UNIVERSITY." as U ON SC.UniversityID = U.UniversityID LEFT JOIN ".COURSE." as C ON
SC.CourseID = C.CourseID
WHERE
SC.UniversityID LIKE '%$University%'
AND SC.CourseID LIKE '%$Course%'
- AND SC.BatchCode LIKE '%$Batch%'
AND S.BranchCode = '$loginUserBranchId'
GROUP BY SC.StudentID
ORDER BY S.CreatedOn";
+} else {
+ $subQuery = "SELECT S.*
+ FROM ".STUDENTS." as S LEFT JOIN ".STUDENTCOURSE." as SC ON SC.StudentID = S.StudentID
+ LEFT JOIN ".UNIVERSITY." as U ON SC.UniversityID = U.UniversityID LEFT JOIN ".COURSE." as C ON
+ SC.CourseID = C.CourseID
+ WHERE
+ SC.UniversityID LIKE '%$University%'
+ AND SC.CourseID LIKE '%$Course%'
+ AND S.IsActive = '$StuStatus'
+ AND S.BranchCode = '$loginUserBranchId'
+ GROUP BY SC.StudentID
+ ORDER BY S.CreatedOn";
+}
$stuDetails = $this->db->query($subQuery);
@@ -127,7 +142,7 @@ class Student_model extends CI_Model
} else if ($loginUserType == ADMIN) {
// list for admin
- if($getSearchData["University"] === '' && $getSearchData["Course"] === '' && $getSearchData["Course"] === '') {
+ if($getSearchData["University"] === '' && $getSearchData["Course"] === '' && $getSearchData["Status"] === '') {
// print_r($getSearchData);exit();
$this->db->select('*');
$this->db->from(STUDENTS);
@@ -154,19 +169,34 @@ class Student_model extends CI_Model
$University = $getSearchData['University'];
$Course = $getSearchData['Course'];
- $Batch = $getSearchData['Batch'];
-
- $subQuery = "SELECT S.*
+ // $Batch = $getSearchData['Batch'];
+ $Batch='';
+ $StuStatus = $getSearchData['Status'];
+if($StuStatus == '' ){
+ $subQuery = "SELECT S.*
FROM ".STUDENTS." as S LEFT JOIN ".STUDENTCOURSE." as SC ON SC.StudentID = S.StudentID
LEFT JOIN ".UNIVERSITY." as U ON SC.UniversityID = U.UniversityID LEFT JOIN ".COURSE." as C ON
SC.CourseID = C.CourseID
WHERE
SC.UniversityID LIKE '%$University%'
AND SC.CourseID LIKE '%$Course%'
- AND SC.BatchCode LIKE '%$Batch%'
AND S.BranchCode = '$loginUserBranchId'
GROUP BY SC.StudentID
ORDER BY S.CreatedOn";
+} else {
+ $subQuery = "SELECT S.*
+ FROM ".STUDENTS." as S LEFT JOIN ".STUDENTCOURSE." as SC ON SC.StudentID = S.StudentID
+ LEFT JOIN ".UNIVERSITY." as U ON SC.UniversityID = U.UniversityID LEFT JOIN ".COURSE." as C ON
+ SC.CourseID = C.CourseID
+ WHERE
+ SC.UniversityID LIKE '%$University%'
+ AND SC.CourseID LIKE '%$Course%'
+ AND S.IsActive = '$StuStatus'
+ AND S.BranchCode = '$loginUserBranchId'
+ GROUP BY SC.StudentID
+ ORDER BY S.CreatedOn";
+}
+
$stuDetails = $this->db->query($subQuery);
@@ -182,7 +212,9 @@ class Student_model extends CI_Model
} else if ($loginUserType == EMPLOYEE) {
// list for staff
-
+ // list for admin
+ if($getSearchData["University"] === '' && $getSearchData["Course"] === '' && $getSearchData["Status"] === '') {
+ // print_r($getSearchData);exit();
$this->db->select('*');
$this->db->from(STUDENTS);
$this->db->order_by('CreatedOn', 'DESC');
@@ -195,6 +227,58 @@ class Student_model extends CI_Model
} else {
$results['studentList'] = false;
}
+ } else {
+ // print_r($getSearchData);exit();
+ // $this->db->select('t1.*');
+ // // $this->db->from(STUDENTS);
+ // $this->db->from('' . STUDENTS . ' as t1');
+ // $this->db->order_by('t1.CreatedOn', 'DESC');
+ // $this->db->where('t1.BranchCode', $loginUserBranchId);
+ // $this->db->from('' . STUDENTCOURSE . ' as t2', 't2.StudentID = t1.StudentID', 'LEFT');
+ // $this->db->where('t2.UniversityID', $getSearchData["University"]);
+ // $this->db->where('t2.CourseID', $getSearchData["Course"]);
+
+ $University = $getSearchData['University'];
+ $Course = $getSearchData['Course'];
+ // $Batch = $getSearchData['Batch'];
+ $Batch='';
+ $StuStatus = $getSearchData['Status'];
+
+ if($StuStatus == '' ){
+ $subQuery = "SELECT S.*
+ FROM ".STUDENTS." as S LEFT JOIN ".STUDENTCOURSE." as SC ON SC.StudentID = S.StudentID
+ LEFT JOIN ".UNIVERSITY." as U ON SC.UniversityID = U.UniversityID LEFT JOIN ".COURSE." as C ON
+ SC.CourseID = C.CourseID
+ WHERE
+ SC.UniversityID LIKE '%$University%'
+ AND SC.CourseID LIKE '%$Course%'
+ AND S.BranchCode = '$loginUserBranchId'
+ GROUP BY SC.StudentID
+ ORDER BY S.CreatedOn";
+} else {
+ $subQuery = "SELECT S.*
+ FROM ".STUDENTS." as S LEFT JOIN ".STUDENTCOURSE." as SC ON SC.StudentID = S.StudentID
+ LEFT JOIN ".UNIVERSITY." as U ON SC.UniversityID = U.UniversityID LEFT JOIN ".COURSE." as C ON
+ SC.CourseID = C.CourseID
+ WHERE
+ SC.UniversityID LIKE '%$University%'
+ AND SC.CourseID LIKE '%$Course%'
+ AND S.IsActive = '$StuStatus'
+ AND S.BranchCode = '$loginUserBranchId'
+ GROUP BY SC.StudentID
+ ORDER BY S.CreatedOn";
+}
+ $stuDetails = $this->db->query($subQuery);
+
+ // $stuDetails = $this->db->get();
+ $checkArr = $stuDetails->result();
+ if (count($checkArr) > 0) {
+ $results['studentList'] = true;
+ $results['student_details'] = $stuDetails->result();
+ } else {
+ $results['studentList'] = false;
+ }
+ }
} else {
$results['studentList'] = false;
diff --git a/Apollo/assets/i18n/en.json b/Apollo/assets/i18n/en.json
index 108722c4..0292f8ad 100755
--- a/Apollo/assets/i18n/en.json
+++ b/Apollo/assets/i18n/en.json
@@ -127,8 +127,8 @@
},
"sendSMSPage": {
"MAIN": "BROADCAST",
- "SENDSMS": "SMS SEND",
- "SENDSMSDETAILS": "SEND SMS DETAILS"
+ "SENDSMS": "SMS SENT",
+ "SENDSMSDETAILS": "SENT SMS DETAILS"
}
}
},
diff --git a/Apollo/assets/js/config.router.js b/Apollo/assets/js/config.router.js
index 59619510..465a0910 100755
--- a/Apollo/assets/js/config.router.js
+++ b/Apollo/assets/js/config.router.js
@@ -394,18 +394,18 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com
}).state('app.broadCast.sendSMSPage', {
url: '/sendSMS',
templateUrl: "assets/views/sendSMS/sendSMSsuperadmin.html",
- title: 'send SMS',
+ title: 'sent SMS',
resolve: loadSequence('spin', 'ladda', 'angular-ladda', 'sendSMSsuperadminCtrl','ngTable'),
ncyBreadcrumb: {
- label: 'send SMS'
+ label: 'sent SMS'
}
}).state('app.broadCast.sendSMSDetails', {
url: '/sendSMSDetails',
templateUrl: "assets/views/sendSMS/sendSMSDetailssuperadmin.html",
- title: 'Send SMS Details',
+ title: 'Sent SMS Details',
resolve: loadSequence('spin', 'ladda', 'angular-ladda', 'sendSMSDetailssuperadminCtrl','ngTable'),
ncyBreadcrumb: {
- label: 'Send SMS Details'
+ label: 'Sent SMS Details'
}
}).state('app.daybook.income', {
url: '/income',
diff --git a/Apollo/assets/js/controllers/answerBookletStatusCtrl.js b/Apollo/assets/js/controllers/answerBookletStatusCtrl.js
index d630787d..1d2656f2 100755
--- a/Apollo/assets/js/controllers/answerBookletStatusCtrl.js
+++ b/Apollo/assets/js/controllers/answerBookletStatusCtrl.js
@@ -187,7 +187,7 @@ app.controller('answerBookletStatusCtrl', ["$scope", "toaster", "$filter", "ngTa
// Select one row in a table once
$scope.setOneSelect = function (value) {
angular.forEach($scope.searchResultDetails, function (item) {
- item.Selected = value;
+ item.Selected = false;
});
value.Selected = true;
$scope.OpenWindowStatus = true;
diff --git a/Apollo/assets/js/controllers/applicationStatusCtrl.js b/Apollo/assets/js/controllers/applicationStatusCtrl.js
index a572e999..27ed034c 100755
--- a/Apollo/assets/js/controllers/applicationStatusCtrl.js
+++ b/Apollo/assets/js/controllers/applicationStatusCtrl.js
@@ -180,14 +180,14 @@ app.controller('applicationStatusCtrl', ["$scope", "toaster", "$filter", "ngTabl
// mobile number search functionlity
$scope.mySearchChangeFunc = function (val) {
- if (val > 0) {
- $scope.allSelectedHide = true;
- $scope.allSelected('undefined');
- $scope.OpenWindowStatus = false;
- } else {
- $scope.allSelected('undefined');
- $scope.allSelectedHide = false;
- }
+ // if (val > 0) {
+ // $scope.allSelectedHide = true;
+ // $scope.allSelected('undefined');
+ // $scope.OpenWindowStatus = false;
+ // } else {
+ // $scope.allSelected('undefined');
+ // $scope.allSelectedHide = false;
+ // }
}
// End: mobile number search functionlity
@@ -220,7 +220,7 @@ app.controller('applicationStatusCtrl', ["$scope", "toaster", "$filter", "ngTabl
// Select one row in a table once
$scope.setOneSelect = function (value) {
angular.forEach($scope.searchResultDetails, function (item) {
- item.Selected = value;
+ item.Selected = false;
});
value.Selected = true;
$scope.OpenWindowStatus = true;
diff --git a/Apollo/assets/js/controllers/batchCtrl.js b/Apollo/assets/js/controllers/batchCtrl.js
index a517b823..b823a6c2 100755
--- a/Apollo/assets/js/controllers/batchCtrl.js
+++ b/Apollo/assets/js/controllers/batchCtrl.js
@@ -100,7 +100,12 @@ app.controller('batchCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTabl
},
reset: function (form) {
- $scope.myModel = angular.copy($scope.master);
+ $scope.myModel = {
+ "batchCode": "",
+ "batchName": "",
+ "universityName":"",
+ "switchsetting": true
+ };
form.$setPristine(true);
}
};
diff --git a/Apollo/assets/js/controllers/certificationStatusCtrl.js b/Apollo/assets/js/controllers/certificationStatusCtrl.js
index 457f552a..18c6e239 100755
--- a/Apollo/assets/js/controllers/certificationStatusCtrl.js
+++ b/Apollo/assets/js/controllers/certificationStatusCtrl.js
@@ -175,14 +175,14 @@ app.controller('certificationStatusCtrl', ["$scope", "toaster", "$filter", "ngTa
// mobile number search functionlity
$scope.mySearchChangeFunc = function (val) {
- if (val > 0) {
- $scope.allSelectedHide = true;
- $scope.allSelected('undefined');
- $scope.OpenWindowStatus = false;
- } else {
- $scope.allSelected('undefined');
- $scope.allSelectedHide = false;
- }
+ // if (val > 0) {
+ // $scope.allSelectedHide = true;
+ // $scope.allSelected('undefined');
+ // $scope.OpenWindowStatus = false;
+ // } else {
+ // $scope.allSelected('undefined');
+ // $scope.allSelectedHide = false;
+ // }
}
// End: mobile number search functionlity
@@ -217,7 +217,7 @@ app.controller('certificationStatusCtrl', ["$scope", "toaster", "$filter", "ngTa
// Select one row in a table once
$scope.setOneSelect = function (value) {
angular.forEach($scope.searchResultDetails, function (item) {
- item.Selected = value;
+ item.Selected = false;
});
value.Selected = true;
$scope.OpenWindowStatus = true;
diff --git a/Apollo/assets/js/controllers/studentCtrl.js b/Apollo/assets/js/controllers/studentCtrl.js
index d0568b18..2be7f8cd 100755
--- a/Apollo/assets/js/controllers/studentCtrl.js
+++ b/Apollo/assets/js/controllers/studentCtrl.js
@@ -125,13 +125,23 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
};
$scope.searchData = {
- "University": "",
+ "University": "",
"Course": "",
"Status": ""
}
$scope.myUnivSearch = "";
$scope.getUniveId = function (univ) {
- let name = JSON.parse(univ);
+ if( univ === ''){
+ $scope.myUnivSearch = "";
+ $scope.searchData.University = '';
+ $scope.searchData.Course = '';
+ $scope.searchData.Batch = '';
+ $scope.courseData = name.Course;
+ $scope.batchData = name.Batch;
+ $scope.OpenWindowStatus = false;
+ $scope.getStudentList();
+ } else {
+ let name = JSON.parse(univ);
$scope.searchData.University = name.UniversityID;
$scope.searchData.Course = '';
$scope.searchData.Batch = '';
@@ -139,6 +149,8 @@ $scope.myUnivSearch = "";
$scope.batchData = name.Batch;
$scope.OpenWindowStatus = false;
$scope.getStudentList();
+ }
+
};
diff --git a/Apollo/assets/js/controllers/studyMaterialStatusCtrl.js b/Apollo/assets/js/controllers/studyMaterialStatusCtrl.js
index 7adbdb08..65f7285b 100755
--- a/Apollo/assets/js/controllers/studyMaterialStatusCtrl.js
+++ b/Apollo/assets/js/controllers/studyMaterialStatusCtrl.js
@@ -151,13 +151,13 @@ app.controller('studyMaterialStatusCtrl', ["$scope", "toaster", "$filter", "ngTa
// mobile number search functionlity
$scope.mySearchChangeFunc = function (val) {
if (val > 0) {
- $scope.allSelectedHide = true;
- $scope.allSelected('undefined');
- $scope.OpenWindowStatus = false;
+ // $scope.allSelectedHide = true;
+ // $scope.allSelected('undefined');
+ // $scope.OpenWindowStatus = false;
} else {
- $scope.allSelected('undefined');
- $scope.allSelectedHide = false;
- $scope.OpenWindowStatus = false;
+ // $scope.allSelected('undefined');
+ // $scope.allSelectedHide = false;
+ // $scope.OpenWindowStatus = false;
}
}
// End: mobile number search functionlity
@@ -189,7 +189,7 @@ app.controller('studyMaterialStatusCtrl', ["$scope", "toaster", "$filter", "ngTa
// Select one row in a table once
$scope.setOneSelect = function (value) {
angular.forEach($scope.searchResultDetails, function (item) {
- item.Selected = value;
+ item.Selected = false;
});
value.Selected = true;
$scope.OpenWindowStatus = true;
diff --git a/Apollo/assets/views/sendSMS/sendSMSDetailssuperadmin.html b/Apollo/assets/views/sendSMS/sendSMSDetailssuperadmin.html
index f0cbd3ec..48df2df5 100644
--- a/Apollo/assets/views/sendSMS/sendSMSDetailssuperadmin.html
+++ b/Apollo/assets/views/sendSMS/sendSMSDetailssuperadmin.html
@@ -77,14 +77,14 @@