Project and Subject Edit Completed File
24012023
@ -84,7 +84,7 @@ $route['edit-degree/(:num)'] = 'degree/editDegree/$1';
|
||||
$route['semester'] = 'semester/semester_list';
|
||||
$route['add-semester'] = 'semester/add_semester';
|
||||
$route['edit-semester/(:num)'] = 'semester/editSemester/$1';
|
||||
|
||||
$route['view-semester/(:num)'] = 'semester/viewSemester/$1';
|
||||
|
||||
//subject//
|
||||
$route['subject'] = 'subject/subject_list';
|
||||
@ -102,7 +102,7 @@ $route['edit-faculty/(:num)'] = 'faculty/editFaculty/$1';
|
||||
$route['student'] = 'student/student_list';
|
||||
$route['add_student'] = 'student/add_student';
|
||||
$route['view-student/(:num)'] = 'student/viewStudent/$1';
|
||||
$route['edit_student/(:num)'] = 'student/edit_student/$1';
|
||||
$route['edit-student/(:num)'] = 'student/editStudent/$1';
|
||||
$route['deleted_student'] = 'student/deleted_student';
|
||||
|
||||
|
||||
@ -110,5 +110,5 @@ $route['deleted_student'] = 'student/deleted_student';
|
||||
$route['project'] = 'project/project_list';
|
||||
$route['add_project'] = 'project/add_project';
|
||||
$route['view-project/(:num)'] = 'project/viewProject/$1';
|
||||
$route['edit_project/(:num)'] = 'project/edit_project/$1';
|
||||
$route['edit-project/(:num)'] = 'project/editProject/$1';
|
||||
$route['deleted_project'] = 'project/deleted_project';
|
@ -148,60 +148,176 @@ class Project extends CI_Controller {
|
||||
}
|
||||
|
||||
|
||||
function edit_project($id)
|
||||
function editProject($id)
|
||||
{
|
||||
$data['dep']=$this->Project_model->get_dep();
|
||||
$data['stu']=$this->Project_model->get_stu();
|
||||
$data['sub']=$this->Project_model->get_sub();
|
||||
$data['semester']=$this->Project_model->get_semester();
|
||||
|
||||
$data['pro']=$this->Project_model->get_pro($id);
|
||||
$this->load->view('project/edit_project',$data);
|
||||
|
||||
$data['getMultipleImage']=$this->Project_model->getMultipleImage($id);
|
||||
|
||||
if($this->input->post('submit'))
|
||||
{
|
||||
$name=$this->input->post('projectName');
|
||||
$date=$this->input->post('date');
|
||||
$student=$this->input->post('student');
|
||||
$semester=$this->input->post('semester');
|
||||
$subject=$this->input->post('subject');
|
||||
//$gender=$this->input->post('gender');
|
||||
$department=$this->input->post('department');
|
||||
$projectName=$this->input->post('projectName');
|
||||
$code=$this->input->post('code');
|
||||
$studentId=$this->input->post('student');
|
||||
$semesterId=$this->input->post('semesterId');
|
||||
$subjectId=$this->input->post('subjectId');
|
||||
$departmentId=$this->input->post('departmentId');
|
||||
$titleImage=$this->input->post('titleImage');
|
||||
$oldImage=$this->input->post('oldImage');
|
||||
$description=$this->input->post('description');
|
||||
//$faculty=$this->input->post('faculty');
|
||||
$drivelink=$this->input->post('drivelink');
|
||||
$video=$this->input->post('vedio');
|
||||
$image=$this->input->post('image');
|
||||
$video=$this->input->post('video');
|
||||
|
||||
if($titleImage=="" ){$newImage=$oldImage;}
|
||||
if(file_exists($_FILES['titleImage']['tmp_name']))
|
||||
{
|
||||
$temp_user_img=$_FILES['titleImage']['tmp_name'];
|
||||
$newImage=str_replace(' ', '_', $_FILES["titleImage"]["name"]);
|
||||
$allowed = array('png,jpeg,jpg');
|
||||
$extension1 = pathinfo($newImage, PATHINFO_EXTENSION);
|
||||
$newImage='title'.date('ymdhis').'.'.$extension1;
|
||||
$targetPath='./uploads/project/';
|
||||
$targetFile=$targetPath.$newImage;
|
||||
move_uploaded_file($temp_user_img, $targetFile);
|
||||
}
|
||||
|
||||
$table="project";
|
||||
$where=array("id"=>$id);
|
||||
$values=array('projectName'=>$name,
|
||||
$values=array('projectName'=>$projectName,
|
||||
'date'=>$date,
|
||||
'studentId'=>$student,
|
||||
'semesterId'=>$semester,
|
||||
'subjectId'=>$subject,
|
||||
'departmentId'=>$department,
|
||||
// 'gender'=>$gender,
|
||||
'code'=>$code,
|
||||
'studentId'=>$studentId,
|
||||
'semesterId'=>$semesterId,
|
||||
'subjectId'=>$subjectId,
|
||||
'departmentId'=>$departmentId,
|
||||
'image'=>$newImage,
|
||||
'description'=>$description,
|
||||
//'faculty'=>$faculty,
|
||||
'drivelink'=>$drivelink,
|
||||
'vedio'=>$video,
|
||||
'image'=>$image,
|
||||
'updatedOn'=>date('Y-m-d'),
|
||||
'updatedBy'=>1,
|
||||
'status'=>1);
|
||||
'updatedBy'=>1);
|
||||
|
||||
$result=$this->Commonsql_model->updateTable($table,$where,$values);
|
||||
if($result)
|
||||
{
|
||||
$this->session->set_userdata('suc','successfully Updated');
|
||||
redirect('project');
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->session->set_userdata('err','Please try again');
|
||||
redirect('project');
|
||||
}
|
||||
//Image Multiple
|
||||
$title = $this->input->post('title');
|
||||
$profileimage = $this->input->post('profileimage');
|
||||
$projectDetailId = $this->input->post('projectDetailName');
|
||||
$oldImage = $this->input->post('profileimageOld');
|
||||
//print_r ($projectDetailId);exit;
|
||||
|
||||
//Update old datas
|
||||
foreach($title as $key=>$value)
|
||||
{
|
||||
|
||||
if($projectDetailId[$key]!="")
|
||||
{
|
||||
|
||||
if($_FILES['profileimage']['name'][$key])
|
||||
{
|
||||
$temp_file=$_FILES['profileimage']['tmp_name'][$key];
|
||||
$business_doc=str_replace(' ', '_', $_FILES["profileimage"]["name"][$key]);
|
||||
$extension1 = pathinfo($business_doc, PATHINFO_EXTENSION);
|
||||
$newImage=$id.'.'.$business_doc;
|
||||
$document='uploads/project/'.$newImage;
|
||||
|
||||
$targetPath = './uploads/project/';
|
||||
$targetFile=$targetPath.$newImage;
|
||||
|
||||
|
||||
if(move_uploaded_file($temp_file, $targetFile))
|
||||
{ }
|
||||
}
|
||||
else{
|
||||
$newImage=$oldImage[$key];
|
||||
}
|
||||
$tablename='projectdetail';
|
||||
$data=array('title'=>$title[$key],
|
||||
'image'=>$newImage);
|
||||
$where=array('id'=>$projectDetailId[$key]);
|
||||
$result=$this->Commonsql_model->updateTable($tablename,$where,$data);
|
||||
//echo $this->db->last_query();
|
||||
|
||||
}
|
||||
}
|
||||
//Remove Existing One
|
||||
$existingRow=$this->Project_model->getMultipleImage($id);
|
||||
//echo $this->db->last_query();
|
||||
if($existingRow->num_rows()>0)
|
||||
{
|
||||
//echo "test";exit;
|
||||
$primaryId=array();
|
||||
foreach($existingRow->result() as $list)
|
||||
{
|
||||
$primaryId[]=$list->id ;
|
||||
}
|
||||
}
|
||||
//Remove Row
|
||||
$diff=array_diff($primaryId,$projectDetailId);
|
||||
//print_r ($diff);exit;
|
||||
if($diff>0)
|
||||
{
|
||||
//echo "sdsds";exit;
|
||||
foreach($diff as $value)
|
||||
{
|
||||
$where=array('id'=>$value);
|
||||
$tablename="projectdetail";
|
||||
$values=array('status'=>0);
|
||||
if($projectDetailId[$key]!=""){
|
||||
$result=$this->Commonsql_model->updateTable($tablename,$where,$values);}
|
||||
//echo $this->db->last_query();
|
||||
}
|
||||
}
|
||||
//New Row Insertion
|
||||
if($projectDetailId[$key]=="")
|
||||
{
|
||||
|
||||
if($_FILES['profileimage']['tmp_name'])
|
||||
{
|
||||
$tempDocument=$_FILES['profileimage']['tmp_name'][$key];
|
||||
$getImage=str_replace(' ', '_', $_FILES["profileimage"]["name"][$key]);
|
||||
$extension1 = pathinfo($getImage, PATHINFO_EXTENSION);
|
||||
$image=$id.'.'.$getImage;
|
||||
//$document='uploads/subject/'.$business_document;
|
||||
$targetPath = './uploads/project/';
|
||||
$targetFile=$targetPath.$image;
|
||||
|
||||
|
||||
if(move_uploaded_file($tempDocument, $targetFile))
|
||||
{
|
||||
$tablename='projectdetail';
|
||||
$data=array('projectId'=>$id,
|
||||
'title'=>$title[$key],
|
||||
'image'=>$image,
|
||||
'status'=>1);
|
||||
|
||||
$result=$this->Commonsql_model->insert_table($tablename,$data);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if($result)
|
||||
{
|
||||
$this->session->set_userdata('suc','successfully Updated');
|
||||
redirect('project');
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->session->set_userdata('err','Please try again');
|
||||
redirect('project');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->load->view('project/edit_project',$data);
|
||||
}
|
||||
|
||||
function deleteProject()
|
||||
|
@ -32,6 +32,14 @@ class Semester extends CI_Controller {
|
||||
$this->load->view('semester/semester_list',$data);
|
||||
}
|
||||
|
||||
public function viewSemester($id)
|
||||
{
|
||||
if($this->session->userdata('id')==""){redirect('');}
|
||||
|
||||
$data['viewSemester']=$this->Semester_model->viewSemester($id);
|
||||
//echo $this->db->last_query();exit;
|
||||
$this->load->view('semester/view_semester',$data);
|
||||
}
|
||||
|
||||
function add_semester()
|
||||
{
|
||||
@ -48,12 +56,14 @@ class Semester extends CI_Controller {
|
||||
$subjectId=$this->input->post('subjectId');
|
||||
$departmentId=$this->input->post('departmentId');
|
||||
$degreeId=$this->input->post('degreeId');
|
||||
///echo $departmentId;
|
||||
|
||||
$subjectIdd = implode(",", (array)$subjectId);
|
||||
//echo $subjectIdd;exit;
|
||||
//echo $degreeId;
|
||||
$table="semester";
|
||||
$values=array('name'=>$name,
|
||||
'year'=>$year,
|
||||
'subjectId'=>$subjectId,
|
||||
'subjectId'=>$subjectIdd,
|
||||
'departmentId'=>$departmentId,
|
||||
'degreeId'=>$degreeId,
|
||||
'createdOn'=>date('Y-m-d'),
|
||||
@ -88,11 +98,13 @@ class Semester extends CI_Controller {
|
||||
$departmentId=$this->input->post('departmentId');
|
||||
$degreeId=$this->input->post('degreeId');
|
||||
|
||||
$subjectIdd = implode(",", (array)$subjectId);
|
||||
|
||||
$table="semester";
|
||||
$where=array("id"=>$id);
|
||||
$values=array( 'name'=>$name,
|
||||
'year'=>$year,
|
||||
'subjectId'=>$subjectId,
|
||||
'subjectId'=>$subjectIdd,
|
||||
'departmentId'=>$departmentId,
|
||||
'degreeId'=>$degreeId,
|
||||
'updatedOn'=>date('Y-m-d'),
|
||||
|
@ -105,11 +105,10 @@ class Student extends CI_Controller {
|
||||
}
|
||||
|
||||
|
||||
function edit_student($id)
|
||||
function editStudent($id)
|
||||
{
|
||||
|
||||
$data['stu']=$this->Student_model->get_stu($id);
|
||||
$this->load->view('student/edit_student',$data);
|
||||
$data['dep']=$this->Student_model->get_dep();
|
||||
$data['stu']=$this->Student_model->get_stu($id);
|
||||
|
||||
if($this->input->post('submit'))
|
||||
{
|
||||
@ -117,10 +116,25 @@ class Student extends CI_Controller {
|
||||
$number=$this->input->post('mobileNumber');
|
||||
$address=$this->input->post('address');
|
||||
$department=$this->input->post('department');
|
||||
$date=$this->input->post('date');
|
||||
$student=$this->input->post('student');
|
||||
$gender=$this->input->post('gender');
|
||||
$s_img=$this->input->post('image');
|
||||
|
||||
$hiddenImage=$this->input->post('hiddenImage');
|
||||
if (!is_dir('uploads/student')) {
|
||||
mkdir('./uploads/student', 0777, TRUE);
|
||||
}
|
||||
if(file_exists($_FILES['image']['tmp_name']))
|
||||
{
|
||||
$temp_user_img=$_FILES['image']['tmp_name'];
|
||||
$s_img=str_replace(' ', '_', $_FILES["image"]["name"]);
|
||||
$allowed = array('png,jpeg,jpg');
|
||||
$extension1 = pathinfo($s_img, PATHINFO_EXTENSION);
|
||||
$s_img=date('ymdhi').'.'.$extension1;
|
||||
$targetPath='./uploads/student/';
|
||||
$targetFile=$targetPath.$s_img;
|
||||
move_uploaded_file($temp_user_img, $targetFile);
|
||||
}
|
||||
|
||||
$table="student";
|
||||
$where=array("id"=>$id);
|
||||
@ -129,6 +143,7 @@ class Student extends CI_Controller {
|
||||
'studentId'=>$student,
|
||||
'address'=>$address,
|
||||
'department'=>$department,
|
||||
'dob'=>$date,
|
||||
'gender'=>$gender,
|
||||
'image'=>$s_img,
|
||||
//'update_on'=>date('Y-m-d'),
|
||||
@ -136,6 +151,7 @@ class Student extends CI_Controller {
|
||||
'status'=>1);
|
||||
|
||||
$result=$this->Commonsql_model->updateTable($table,$where,$values);
|
||||
//echo $this->db->last_query();exit;
|
||||
if($result)
|
||||
{
|
||||
$this->session->set_userdata('suc','successfully Updated');
|
||||
@ -149,10 +165,7 @@ class Student extends CI_Controller {
|
||||
}
|
||||
|
||||
}
|
||||
//echo "sdsd";exit;
|
||||
|
||||
//echo $this->db->last_query();exit;
|
||||
|
||||
$this->load->view('student/edit_student',$data);
|
||||
}
|
||||
|
||||
function deleteStudent()
|
||||
|
@ -86,17 +86,55 @@ class Subject extends CI_Controller {
|
||||
'createdBy'=>1,
|
||||
'status'=>1);
|
||||
$result=$this->Commonsql_model->insert_table($table,$values);
|
||||
if($result)
|
||||
{
|
||||
$this->session->set_userdata('suc','successfully added');
|
||||
redirect('subject');
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->session->set_userdata('err','Please try again');
|
||||
redirect('subject');
|
||||
}
|
||||
$subjectId=$this->db->insert_id();
|
||||
|
||||
//Image table insert
|
||||
$title = $this->input->post('title');
|
||||
|
||||
foreach($title as $key=>$value)
|
||||
{
|
||||
if($_FILES['profileimage']['tmp_name'])
|
||||
{
|
||||
if (!is_dir('uploads/subject')) {
|
||||
mkdir('./uploads/subject', 0777, TRUE);
|
||||
}
|
||||
$temp_vehicle_doc=$_FILES['profileimage']['tmp_name'][$key];
|
||||
$projectImage=str_replace(' ', '_', $_FILES["profileimage"]["name"][$key]);
|
||||
$extension1 = pathinfo($projectImage, PATHINFO_EXTENSION);
|
||||
$pImage=$subjectId.'.'.$projectImage;
|
||||
$document='uploads/subject/'.$pImage;
|
||||
|
||||
$targetPath = './uploads/subject/';
|
||||
$targetFile=$targetPath.$pImage;
|
||||
|
||||
|
||||
if(move_uploaded_file($temp_vehicle_doc, $targetFile))
|
||||
{
|
||||
$tablename='subjectdetail';
|
||||
$data=array('subjectId'=>$subjectId,
|
||||
'title'=>$title[$key],
|
||||
'image'=>$pImage,
|
||||
'status'=>1);
|
||||
|
||||
$subject=$this->Commonsql_model->insert_table($tablename,$data);
|
||||
//echo $this->db->last_query();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
//exit;
|
||||
if($result & $subject)
|
||||
{
|
||||
$this->session->set_userdata('suc','successfully added');
|
||||
redirect('subject');
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->session->set_userdata('err','Please try again');
|
||||
redirect('subject');
|
||||
}
|
||||
|
||||
}
|
||||
$this->load->view('subject/add_subject',$data);
|
||||
@ -110,6 +148,8 @@ class Subject extends CI_Controller {
|
||||
$data['degree']=$this->Subject_model->degreeList();
|
||||
$data['faculty']=$this->Subject_model->facultyList();
|
||||
|
||||
$data['getMultipleImage']=$this->Subject_model->getMultipleImage($id);
|
||||
///echo $this->db->last_query();exit;
|
||||
|
||||
if($this->input->post('submit'))
|
||||
{
|
||||
@ -155,8 +195,105 @@ class Subject extends CI_Controller {
|
||||
|
||||
$result=$this->Commonsql_model->updateTable($table,$where,$values);
|
||||
//echo $this->db->last_query();exit;
|
||||
if($result)
|
||||
|
||||
//Image Multiple
|
||||
$title = $this->input->post('title');
|
||||
$profileimage = $this->input->post('profileimage');
|
||||
$subjectDetailId = $this->input->post('subjectDetailName');
|
||||
$oldImage = $this->input->post('profileimageOld');
|
||||
//print_r ($subjectDetailId);exit;
|
||||
|
||||
//Update old datas
|
||||
foreach($title as $key=>$value)
|
||||
{
|
||||
|
||||
if($subjectDetailId[$key]!="")
|
||||
{
|
||||
|
||||
if($_FILES['profileimage']['name'][$key])
|
||||
{
|
||||
$temp_file=$_FILES['profileimage']['tmp_name'][$key];
|
||||
$business_doc=str_replace(' ', '_', $_FILES["profileimage"]["name"][$key]);
|
||||
$extension1 = pathinfo($business_doc, PATHINFO_EXTENSION);
|
||||
$newImage=$id.'.'.$business_doc;
|
||||
$document='uploads/subject/'.$newImage;
|
||||
|
||||
$targetPath = './uploads/subject/';
|
||||
$targetFile=$targetPath.$newImage;
|
||||
|
||||
|
||||
if(move_uploaded_file($temp_file, $targetFile))
|
||||
{ }
|
||||
}
|
||||
else{
|
||||
$newImage=$oldImage[$key];
|
||||
}
|
||||
$tablename='subjectdetail';
|
||||
$data=array('title'=>$title[$key],
|
||||
'image'=>$newImage);
|
||||
$where=array('id'=>$subjectDetailId[$key]);
|
||||
$result=$this->Commonsql_model->updateTable($tablename,$where,$data);
|
||||
//echo $this->db->last_query();
|
||||
|
||||
}
|
||||
}
|
||||
//Remove Existing One
|
||||
$existingRow=$this->Subject_model->getMultipleImage($id);
|
||||
//echo $this->db->last_query();
|
||||
if($existingRow->num_rows()>0)
|
||||
{
|
||||
//echo "test";exit;
|
||||
$primaryId=array();
|
||||
foreach($existingRow->result() as $list)
|
||||
{
|
||||
$primaryId[]=$list->id ;
|
||||
}
|
||||
}
|
||||
//Remove Row
|
||||
$diff=array_diff($primaryId,$subjectDetailId);
|
||||
//print_r ($diff);exit;
|
||||
if($diff>0)
|
||||
{
|
||||
//echo "sdsds";exit;
|
||||
foreach($diff as $value)
|
||||
{
|
||||
$where=array('id'=>$value);
|
||||
$tablename="subjectdetail";
|
||||
$values=array('status'=>0);
|
||||
if($subjectDetailId[$key]!=""){
|
||||
$result=$this->Commonsql_model->updateTable($tablename,$where,$values);}
|
||||
//echo $this->db->last_query();
|
||||
}
|
||||
}
|
||||
//New Row Insertion
|
||||
if($subjectDetailId[$key]=="")
|
||||
{
|
||||
|
||||
if($_FILES['profileimage']['tmp_name'])
|
||||
{
|
||||
$tempDocument=$_FILES['profileimage']['tmp_name'][$key];
|
||||
$getImage=str_replace(' ', '_', $_FILES["profileimage"]["name"][$key]);
|
||||
$extension1 = pathinfo($getImage, PATHINFO_EXTENSION);
|
||||
$image=$id.'.'.$getImage;
|
||||
//$document='uploads/subject/'.$business_document;
|
||||
$targetPath = './uploads/subject/';
|
||||
$targetFile=$targetPath.$image;
|
||||
|
||||
|
||||
if(move_uploaded_file($tempDocument, $targetFile))
|
||||
{
|
||||
$tablename='subjectdetail';
|
||||
$data=array('subjectId'=>$id,
|
||||
'title'=>$title[$key],
|
||||
'image'=>$image,
|
||||
'status'=>1);
|
||||
|
||||
$result=$this->Commonsql_model->insert_table($tablename,$data);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if($result)
|
||||
{
|
||||
$this->session->set_userdata('suc','successfully Updated');
|
||||
redirect('subject');
|
||||
@ -166,7 +303,6 @@ class Subject extends CI_Controller {
|
||||
$this->session->set_userdata('err','Please try again');
|
||||
redirect('subject');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->load->view('subject/edit_subject',$data);
|
||||
@ -185,6 +321,10 @@ class Subject extends CI_Controller {
|
||||
$where=array("id"=>$subjectId);
|
||||
$values=array('status'=>0);
|
||||
|
||||
$dTable="subjectdetail";
|
||||
$dWhere=array("subjectId"=>$subjectId);
|
||||
$dValue=array('status'=>0);
|
||||
|
||||
$result=$this->Commonsql_model->updateTable($table,$where,$values);
|
||||
if($result)
|
||||
{
|
||||
|
@ -146,4 +146,13 @@ class Project_model extends CI_Model {
|
||||
//echo $this->db->last_query(); exit;
|
||||
return $result;
|
||||
}
|
||||
function getMultipleImage($id)
|
||||
{
|
||||
$this->db->select('id,title,image,projectId');
|
||||
$this->db->from('projectdetail');
|
||||
$this->db->where(array('status'=>1,'projectId'=>$id));
|
||||
$query = $this->db->get();
|
||||
//echo $this->db->last_query();
|
||||
return $query;
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ class Semester_model extends CI_Model {
|
||||
function list_semester()
|
||||
{
|
||||
$this->db->select('s.id,s.name,s.year,sub.id as subId,sub.name as subName,dep.id as depId,dep.name as depName,deg.id as degId,deg.name as degName');
|
||||
$this->db->from('Semester as s');
|
||||
$this->db->from('semester as s');
|
||||
$this->db->join('subject as sub','sub.id=s.subjectId','INNER');
|
||||
$this->db->join('department as dep','dep.id=s.departmentId','INNER');
|
||||
$this->db->join('degree as deg','deg.id=s.degreeId','INNER');
|
||||
@ -47,6 +47,17 @@ class Semester_model extends CI_Model {
|
||||
$query = $this->db->get();
|
||||
//echo $this->db->last_query();exit;
|
||||
return $query;
|
||||
}
|
||||
function viewSemester($id)
|
||||
{
|
||||
$this->db->select('s.id,s.name,s.year,s.subjectId,dep.id as depId,dep.name as depName,deg.id as degId,deg.name as degName');
|
||||
$this->db->from('semester as s');
|
||||
$this->db->join('department as dep','dep.id=s.departmentId','INNER');
|
||||
$this->db->join('degree as deg','deg.id=s.degreeId','INNER');
|
||||
$this->db->where(array('s.status'=>1,'s.id'=>$id));
|
||||
$query = $this->db->get();
|
||||
//echo $this->db->last_query();exit;
|
||||
return $query;
|
||||
}
|
||||
function getSemester($id)
|
||||
{
|
||||
@ -58,4 +69,13 @@ class Semester_model extends CI_Model {
|
||||
return $query;
|
||||
}
|
||||
|
||||
function get_subject($id)
|
||||
{
|
||||
$this->db->select('*');
|
||||
$this->db->from('subject');
|
||||
$this->db->where(array('status'=>1,'id'=>$id));
|
||||
$query = $this->db->get();
|
||||
//echo $this->db->last_query();exit;
|
||||
return $query;
|
||||
}
|
||||
}
|
||||
|
@ -64,4 +64,13 @@ class Subject_model extends CI_Model {
|
||||
//echo $this->db->last_query();
|
||||
return $query;
|
||||
}
|
||||
function getMultipleImage($id)
|
||||
{
|
||||
$this->db->select('id,title,image,subjectId');
|
||||
$this->db->from('subjectdetail');
|
||||
$this->db->where(array('status'=>1,'subjectId'=>$id));
|
||||
$query = $this->db->get();
|
||||
//echo $this->db->last_query();
|
||||
return $query;
|
||||
}
|
||||
}
|
||||
|
@ -1,145 +1,307 @@
|
||||
<link href="<?=base_url();?>/assets/datatables/plugins/bootstrap/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
||||
<?php $this->load->view('includes/header');?>
|
||||
<div class="page-container">
|
||||
<?php $this->load->view('includes/sidebar');?>
|
||||
<div class="page-content-wrapper">
|
||||
<div class="page-content">
|
||||
<div class="page-bar">
|
||||
<div class="page-title-breadcrumb">
|
||||
<div class=" pull-left">
|
||||
<div class="page-title">Edit Project</div>
|
||||
</div>
|
||||
<ol class="breadcrumb page-breadcrumb pull-right">
|
||||
<li><i class="fa fa-home"></i> <a class="parent-item" href="<?=base_url();?>/dashboard">Home</a> <i class="fa fa-angle-right"></i>
|
||||
</li>
|
||||
<li class="active">Edit Project</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Midium Model -->
|
||||
<?php
|
||||
if(isset($pro) && $pro->num_rows()>0)
|
||||
{
|
||||
$p=$pro->row();
|
||||
$id=$p->id;
|
||||
$date=$p->date;
|
||||
$name=$p->projectName;
|
||||
//$code=$p->faculty;
|
||||
$student=$p->studentId;
|
||||
$semester=$p->semesterId;
|
||||
$subject=$p->subjectId;
|
||||
$code=$p->code;
|
||||
$department=$p->departmentId;
|
||||
$description=$p->description;
|
||||
$video=$p->vedio;
|
||||
//$drivelink=$p->drivelink;
|
||||
$image=$p->image;
|
||||
|
||||
} ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<div class="card card-box">
|
||||
<div class="card-head">
|
||||
<header>Edit Project</header>
|
||||
</div>
|
||||
<div class="card-body" id="bar-parent">
|
||||
<form action="<?=base_url();?>edit_project/<?=$id;?>" method="post" class="form-horizontal" >
|
||||
<div class="form-body">
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Project Date
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<input type="date" value="<?=$date;?>" name="date" data-required="1" placeholder="Enter Date" class="form-control input-height">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Name
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<input type="text" value="<?=$name;?>" name="projectName" data-required="1" placeholder="Enter Name" class="form-control input-height">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Code
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<input type="code" value="<?=$code;?>" name="code" data-required="1" placeholder="Enter Faculty" class="form-control input-height">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Student
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<input name="student" value="<?=$student;?>" type="text" placeholder="Enter Student" class="form-control error" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Semester
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<input name="semester" value="<?=$semester;?>" type="text" placeholder="Enter Semester" class="form-control error" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Subject
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<input name="semester" value="<?=$subject;?>" type="text" placeholder="Enter Subject" class="form-control error" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Department
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<input name="department" value="<?=$department;?>" type="text" placeholder="Enter Department" class="form-control input-height" /> </div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Description
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<input name="description" value="<?=$description;?>" type="text" placeholder="Enter Description" class="form-control input-height" /> </div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Video
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<input name="vedio" value="<?=$video;?>" type="text" placeholder="Enter Drive Link" class="form-control input-height" /> </div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Project Image
|
||||
</label>
|
||||
<div class="compose-editor">
|
||||
<input name="image" value="<?=$image;?>" type="file" class="form-control" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="offset-md-3 col-md-9">
|
||||
<input type="submit" name="submit" class="btn btn-info m-r-20" value="Submit">
|
||||
<button type="button" class="btn btn-default">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-container">
|
||||
<?php $this->load->view('includes/sidebar');?>
|
||||
<div class="page-content-wrapper">
|
||||
<div class="page-content">
|
||||
<div class="page-bar">
|
||||
<div class="page-title-breadcrumb">
|
||||
<div class=" pull-left">
|
||||
<div class="page-title">Edit Project</div>
|
||||
</div>
|
||||
<ol class="breadcrumb page-breadcrumb pull-right">
|
||||
<li><i class="fa fa-home"></i> <a class="parent-item" href="<?=base_url();?>/dashboard">Home</a> <i class="fa fa-angle-right"></i>
|
||||
</li>
|
||||
<li class="active">Edit Project</li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- Modal -->
|
||||
</div>
|
||||
<!-- Midium Model -->
|
||||
<?php
|
||||
if(isset($pro) && $pro->num_rows()>0)
|
||||
{
|
||||
$p=$pro->row();
|
||||
$id=$p->id;
|
||||
$date=$p->date;
|
||||
$name=$p->projectName;
|
||||
//$code=$p->faculty;
|
||||
$studentId=$p->studentId;
|
||||
$semesterId=$p->semesterId;
|
||||
$subjectId=$p->subjectId;
|
||||
$code=$p->code;
|
||||
$departmentId=$p->departmentId;
|
||||
$description=$p->description;
|
||||
$video=$p->vedio;
|
||||
$driveLink=$p->driveLink;
|
||||
$image=$p->image;
|
||||
|
||||
} ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<div class="card card-box">
|
||||
<div class="card-head">
|
||||
<header>Edit Project</header>
|
||||
</div>
|
||||
<div class="card-body" id="bar-parent">
|
||||
<form action="<?=base_url();?>edit-project/<?=$id;?>" method="post" enctype="multipart/form-data" >
|
||||
<div class="form-body">
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Project Date
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<input type="date" value="<?=$date;?>" name="date" data-required="1" placeholder="Enter Date" class="form-control input-height">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Name
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<input type="text" value="<?=$name;?>" name="projectName" data-required="1" placeholder="Enter Name" class="form-control input-height">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Code
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<input type="code" value="<?=$code;?>" name="code" data-required="1" placeholder="Enter Faculty" class="form-control input-height">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Student
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<select class="form-control select2" id="sudent_id" name="student" data-validation="required">
|
||||
<option value="" selected="selected">Select</option>
|
||||
<?php
|
||||
if(isset($stu) && $stu->num_rows()>0)
|
||||
{
|
||||
foreach($stu->result() as $student)
|
||||
{
|
||||
?> <option value="<?=$student->id;?>" <?php if($student->id==$studentId){ echo "selected"; } ?>><?=$student->name;?></option><?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Semester
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<select class="form-control select2" name="semesterId" data-validation="required">
|
||||
<option value="" selected="selected">Select</option>
|
||||
<?php
|
||||
if(isset($semester) && $semester->num_rows()>0)
|
||||
{
|
||||
foreach($semester->result() as $sem)
|
||||
{
|
||||
?> <option value="<?=$sem->id;?>" <?php if($sem->id==$semesterId){ echo "selected"; } ?>><?=$sem->name;?></option><?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Subject
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<select class="form-control select2" name="subjectId" data-validation="required">
|
||||
<option value="" selected="selected">Select</option>
|
||||
<?php
|
||||
if(isset($sub) && $sub->num_rows()>0)
|
||||
{
|
||||
foreach($sub->result() as $subject)
|
||||
{
|
||||
?> <option value="<?=$subject->id;?>" <?php if($subject->id==$subjectId){ echo "selected"; } ?>><?=$subject->name;?></option><?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Department.
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<select class="form-control select2" id="departmentId" name="departmentId" data-validation="required">
|
||||
<option value="" selected="selected">Select</option>
|
||||
<?php
|
||||
if(isset($dep) && $dep->num_rows()>0)
|
||||
{
|
||||
foreach($dep->result() as $depart)
|
||||
{
|
||||
?> <option value="<?=$depart->id;?>" <?php if($depart->id==$departmentId){ echo "selected"; } ?>><?=$depart->name;?></option><?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Title Image
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<input name="titleImage" type="file" data-validation="required" class="form-control input-height" />
|
||||
<img src="<?=base_url();?>uploads/project/<?=$image;?>" style="width:75px;height:75px;"/>
|
||||
<input name="oldImage" type="hidden" value="<?=$image;?>" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Description
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<textarea name="description" placeholder=" Enter Designation" data-validation="required" class="form-control" rows="5"><?=$description;?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Video
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<input name="video" value="<?=$video;?>" type="text" placeholder="Enter Video Link" class="form-control input-height" /> </div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Drive Link
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<input name="drivelink" value="<?=$driveLink;?>" type="text" placeholder="Enter Drive Link" class="form-control" /> </div>
|
||||
</div>
|
||||
<!--Multiple Add ---->
|
||||
<?php
|
||||
if(isset($getMultipleImage) && $getMultipleImage->num_rows()>0)
|
||||
{
|
||||
$totalCount=$getMultipleImage->num_rows();
|
||||
}
|
||||
?>
|
||||
<input type="hidden" value="<?=$totalCount;?>" id="hiddenCount"/>
|
||||
<hr>
|
||||
<div class="form-group row">
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-4"></div>
|
||||
<div class="col-md-1">
|
||||
<div class="add-new-button-blue addMore"><span style="padding-top:3px;" class="btn btn-primary">Add More<i class="fa fa-plus"></i></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if(isset($getMultipleImage) && $getMultipleImage->num_rows()>0)
|
||||
{
|
||||
$i=0;
|
||||
foreach($getMultipleImage->result() as $list)
|
||||
{
|
||||
$id =$list->id ;
|
||||
$title=$list->title;
|
||||
$image=$list->image;
|
||||
$projectId=$list->projectId;
|
||||
?>
|
||||
|
||||
<div class="form-group row duplicate1">
|
||||
<input type="hidden" value="<?=$id;?>" id="projectDetailId_<?=$i;?>" name="projectDetailName[<?=$i;?>]"/>
|
||||
<label class="control-label col-md-3">Title & Image
|
||||
</label>
|
||||
<div class="col-md-2 compose-editor">
|
||||
<input value="<?=$title;?>" data-validation="required" name="title[<?=$i;?>]" id="projectTitle_<?=$i;?>" type="text" class="form-control default">
|
||||
</div>
|
||||
<div class="col-md-2 compose-editor">
|
||||
<input name="profileimage[]" id="projectImage_<?=$i;?>" type="file" class="form-control default">
|
||||
<img src="<?=base_url();?>uploads/project/<?=$image;?>" style="width:75px;height:75px;"/>
|
||||
<input value="<?=$image;?>" name="profileimageOld[<?=$i;?>]" id="projectImageOld_<?=$i;?>" type="hidden" class="form-control default">
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<div class="add-new-button-blue removeButton"><span style="padding-top:3px;" class="btn btn-danger">Remove <i class="fa fa-minus"></i></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<!---Duplicate ---->
|
||||
<div class="form-group duplicate1 row hide" id="imageTemplate" >
|
||||
<input type="hidden" value="" id="projectDetailId" name="projectDetailNames[]"/>
|
||||
<label class="control-label col-md-3">
|
||||
</label>
|
||||
<div class="col-md-2 compose-editor">
|
||||
<input name="titles[]" data-validation="required" id="projectTitle" type="text" class="form-control default">
|
||||
</div>
|
||||
<div class="col-md-2 compose-editor">
|
||||
<input name="profileimages[]" data-validation="required" id="projectImage" type="file" class="form-control default">
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="add-new-button-blue removeButton" id="cat_add_id"><span class="btn btn-danger">Remove <i class="fa fa-minus"></i></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!---Duplicate ---->
|
||||
<!--End Multiple Add ---->
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="offset-md-3 col-md-9">
|
||||
<input type="submit" name="submit" class="btn btn-info m-r-20" value="Submit">
|
||||
<button type="button" class="btn btn-default">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $this->load->view('includes/footer');?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Modal -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $this->load->view('includes/footer');?>
|
||||
<script>
|
||||
//multiple add more
|
||||
invIndex = $('#hiddenCount').val();
|
||||
$('body').on('click','.addMore', function() {
|
||||
|
||||
invIndex++;
|
||||
var $template = $('#imageTemplate'),
|
||||
$clone = $template
|
||||
.clone(true)
|
||||
.removeClass('hide')
|
||||
.removeAttr('id')
|
||||
.attr('data-book-index', invIndex)
|
||||
.insertBefore($template);
|
||||
|
||||
// Update the name attributes
|
||||
$clone
|
||||
.find('[id="projectTitle"]').attr('id', 'projectTitle_'+invIndex).end()
|
||||
.find('[id="projectImage"]').attr('id', 'projectImage_'+invIndex).end()
|
||||
.find('[id="projectDetailId"]').attr('id', 'projectDetailId_'+invIndex).end()
|
||||
|
||||
.find('[name="titles[]"]').attr('name', 'title['+invIndex+']').end()
|
||||
.find('[name="profileimages[]"]').attr('name', 'profileimage['+invIndex+']').end()
|
||||
.find('[name="projectDetailNames[]"]').attr('name', 'projectDetailName['+invIndex+']').end()
|
||||
|
||||
})
|
||||
|
||||
.on('click', '.removeButton', function(){
|
||||
var $row = $(this).parents('.duplicate1'),
|
||||
index = $row.attr('data-book-index');
|
||||
$row.remove();
|
||||
|
||||
|
||||
});
|
||||
</script>
|
@ -82,7 +82,7 @@
|
||||
<a href="<?=base_url();?>view-project/<?=$id;?>" class="btn btn-success btn-xs">
|
||||
<i class="fa fa-eye"></i>
|
||||
</a>
|
||||
<a href="<?=base_url();?>edit_project/<?=$id;?>" class="btn btn-primary btn-xs">
|
||||
<a href="<?=base_url();?>edit-project/<?=$id;?>" class="btn btn-primary btn-xs">
|
||||
<i class="fa fa-pencil"></i>
|
||||
</a>
|
||||
<a data-id="<?=$id;?>" class="editsemesterclass btn btn-danger btn-xs">
|
||||
|
@ -53,8 +53,8 @@
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<select class="form-control select2" name="subjectId" data-validation="required">
|
||||
<option value="" selected="selected" id="subjectId" >Select</option>
|
||||
<select id="multiple" multiple class="form-control select2" name="subjectId[]" data-validation="required">
|
||||
<option value="">Select..</option>
|
||||
<?php
|
||||
if(isset($subject) && $subject->num_rows()>0)
|
||||
{
|
||||
|
@ -40,7 +40,8 @@
|
||||
$subjectId=$e->subjectId;
|
||||
$departmentId=$e->departmentId;
|
||||
$degreeId =$e->degreeId;
|
||||
|
||||
$subId = explode(",", $subjectId);
|
||||
//print_r($subId);
|
||||
} ?>
|
||||
<div class="card-body" id="bar-parent">
|
||||
<form class="form-horizontal" action="<?=base_url();?>edit-semester/<?=$id;?>" method="post">
|
||||
@ -65,14 +66,14 @@
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<select class="form-control select2" name="subjectId" data-validation="required">
|
||||
<option value="" selected="selected" id="subjectId" >Select</option>
|
||||
<select id="multiple" multiple class="form-control select2" name="subjectId[]" data-validation="required">
|
||||
<option value="" id="subjectId" >Select</option>
|
||||
<?php
|
||||
if(isset($subject) && $subject->num_rows()>0)
|
||||
{
|
||||
foreach($subject->result() as $list)
|
||||
{
|
||||
?> <option value="<?=$list->id;?>" <?php if($list->id==$subjectId){ echo "selected";}?>><?=$list->name;?></option><?php
|
||||
?> <option value="<?=$list->id;?>" <?php if (in_array($list->id,$subId)){ echo "selected";}?>><?=$list->name;?></option><?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -42,7 +42,6 @@
|
||||
<th> S.No</th>
|
||||
<th> Name</th>
|
||||
<th> Year </th>
|
||||
<th> Subject </th>
|
||||
<th> Department </th>
|
||||
<th> Degree </th>
|
||||
<th> Action </th>
|
||||
@ -70,10 +69,11 @@
|
||||
<td><?=$name;?></td>
|
||||
<td><?=$year;?></td>
|
||||
<td><?=$depName;?></td>
|
||||
<td><?=$subName;?></td>
|
||||
<td><?=$degName;?></td>
|
||||
<td>
|
||||
|
||||
<a href="<?=base_url();?>view-semester/<?=$id;?>" class="btn btn-success btn-xs">
|
||||
<i class="fa fa-eye"></i>
|
||||
</a>
|
||||
<a href="<?=base_url();?>edit-semester/<?=$id;?>" class="btn btn-primary btn-xs">
|
||||
<i class="fa fa-pencil"></i>
|
||||
</a>
|
||||
|
117
admin/application/views/semester/view_semester.php
Normal file
@ -0,0 +1,117 @@
|
||||
<!-- data tables -->
|
||||
<link href="<?=base_url();?>/assets/datatables/plugins/bootstrap/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
||||
<?php $this->load->view('includes/header');?>
|
||||
<?php
|
||||
$CI=& get_instance();
|
||||
|
||||
$CI->load->model('Semester_model');?>
|
||||
<!-- start page container -->
|
||||
<div class="page-container">
|
||||
<!-- start sidebar menu -->
|
||||
<?php $this->load->view('includes/sidebar');?>
|
||||
<!-- start page content -->
|
||||
<div class="page-content-wrapper">
|
||||
<div class="page-content">
|
||||
<div class="page-bar col-md-9" style="margin:0px auto;padding:0">
|
||||
<div class="page-title-breadcrumb">
|
||||
<div class=" pull-left">
|
||||
<div class="page-title">Semester View</div>
|
||||
</div>
|
||||
<ol class="breadcrumb page-breadcrumb pull-right">
|
||||
<li><i class="fa fa-home"></i> <a class="parent-item" href="<?=base_url();?>/dashboard">Home</a> <i class="fa fa-angle-right"></i>
|
||||
</li>
|
||||
<li> <a class="parent-item" href="<?=base_url();?>/semester">Semester</a> <i class="fa fa-angle-right"></i>
|
||||
</li>
|
||||
<li class="active">View Semester</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<?php $this->load->view('includes/msg');?>
|
||||
<div class="row">
|
||||
<div class="col-md-9" style="margin:0px auto;">
|
||||
<?php
|
||||
if(isset($viewSemester)&& $viewSemester->num_rows()>0)
|
||||
{
|
||||
$view=$viewSemester->row();
|
||||
|
||||
$id=$view->id;
|
||||
$name=$view->name;
|
||||
$year=$view->year;
|
||||
$subjectId=$view->subjectId;
|
||||
$depId=$view->depId;
|
||||
$depName=$view->depName;
|
||||
$degId=$view->degId;
|
||||
$degName=$view->degName;
|
||||
$subId = explode(",", $subjectId);
|
||||
//print_r ($facIdd);
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
<!-- BEGIN PROFILE SIDEBAR -->
|
||||
<div class="card card-topline-aqua">
|
||||
<div class="card-body no-padding height-9">
|
||||
<div class="row">
|
||||
<div class="profile-userpic">
|
||||
<div class="profile-usertitle-name"><?=$name;?></div> </div>
|
||||
</div>
|
||||
<div class="profile-usertitle">
|
||||
<div class="profile-usertitle-name"><?=$year;?></div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-6 b-r"> <strong>Department</strong>
|
||||
<br>
|
||||
<p class="text-muted"><?=$depName;?></p>
|
||||
</div>
|
||||
<div class="col-md-6 col-xs-6 b-r"> <strong>Degree</strong>
|
||||
<br>
|
||||
<p class="text-muted"><?=$degName;?></p>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-xs-6 b-r"> <strong>Subject</strong>
|
||||
<br>
|
||||
<?php
|
||||
|
||||
|
||||
foreach($subId as $subIdd)
|
||||
{
|
||||
$getSub=$CI->Semester_model->get_subject($subIdd);
|
||||
|
||||
if($getSub->num_rows()>0)
|
||||
{
|
||||
$list=$getSub->row();
|
||||
$subName=$list->name;
|
||||
}
|
||||
?>
|
||||
<div style="margin-top: 30px;" ><span class="label label-success"><?=$subName;?></span></div>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END SIDEBAR USER TITLE -->
|
||||
<!-- SIDEBAR BUTTONS -->
|
||||
|
||||
<!-- END SIDEBAR BUTTONS -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- END PROFILE CONTENT -->
|
||||
<!-- END BEGIN PROFILE SIDEBAR -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('includes/footer');?>
|
||||
<!-- data tables -->
|
||||
<script src="<?=base_url();?>/assets/datatables/jquery.dataTables.min.js"></script>
|
||||
<script src="<?=base_url();?>/assets/datatables/plugins/bootstrap/dataTables.bootstrap4.min.js"></script>
|
||||
<script src="<?=base_url();?>/assets/table_data.js"></script>
|
||||
|
@ -1,4 +1,6 @@
|
||||
<link href="<?=base_url();?>/assets/datatables/plugins/bootstrap/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="<?=base_url();?>assets/select2/css/select2.css" rel="stylesheet" type="text/css" />
|
||||
<link href="<?=base_url();?>assets/select2/css/select2-bootstrap.min.css" rel="stylesheet" type="text/css" />
|
||||
<?php $this->load->view('includes/header');?>
|
||||
<!--<style>
|
||||
.input-group .input-group-addon {
|
||||
@ -37,6 +39,8 @@
|
||||
<ol class="breadcrumb page-breadcrumb pull-right">
|
||||
<li><i class="fa fa-home"></i> <a class="parent-item" href="<?=base_url();?>/dashboard">Home</a> <i class="fa fa-angle-right"></i>
|
||||
</li>
|
||||
<li> <a class="parent-item" href="<?=base_url();?>/student">Students</a> <i class="fa fa-angle-right"></i>
|
||||
</li>
|
||||
<li class="active">Edit Student</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -49,11 +53,13 @@
|
||||
$id=$s->id;
|
||||
$name=$s->name;
|
||||
$number=$s->mobileNumber;
|
||||
$date=$s->dob;
|
||||
$address=$s->address;
|
||||
$student=$s->studentId;
|
||||
$department=$s->department;
|
||||
$image=$s->image;
|
||||
$gender=$s->gender;
|
||||
$s_img=$s->image;
|
||||
if($gender==1){$genType="Male";}else{$genType="Female";}
|
||||
|
||||
} ?>
|
||||
<div class="row">
|
||||
@ -63,7 +69,7 @@
|
||||
<header>Edit Student</header>
|
||||
</div>
|
||||
<div class="card-body" id="bar-parent">
|
||||
<form action="<?=base_url();?>edit_student/<?=$id;?>" method="post" >
|
||||
<form action="<?=base_url();?>edit-student/<?=$id;?>" method="post" enctype="multipart/form-data" >
|
||||
<div class="form-body">
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Name
|
||||
@ -89,6 +95,16 @@
|
||||
<input name="mobileNumber" value="<?=$number;?>" type="text" placeholder="Enter hod" class="form-control error" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Date Of Birth
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<div class="input-append date" id="dp3">
|
||||
<input type="date" value="<?=$date;?>" name="date" class="form-control input-height formDatePicker" placeholder="Date Of Birth" size="44" type="text" data-validation="required">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Address
|
||||
@ -103,25 +119,48 @@
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<input name="department" value="<?=$department;?>" type="text" placeholder="Enter hod" class="form-control input-height" /> </div>
|
||||
<select class="form-control select2" name="department" data-validation="required">
|
||||
<option value="" selected="selected" id="department" >Select</option>
|
||||
<?php
|
||||
if(isset($dep) && $dep->num_rows()>0)
|
||||
{
|
||||
foreach($dep->result() as $list1)
|
||||
{
|
||||
?> <option value="<?=$list1->id;?>" <?php if($list1->id==$department){ echo "selected";}?>><?=$list1->name;?></option><?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Gender
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<select class="form-control input-height" name="gender">
|
||||
<option value="">Select...</option>
|
||||
<option value="Male">Male</option>
|
||||
<option value="Female">Female</option>
|
||||
<select class="form-control select2" name="gender">
|
||||
<option value="<?=$gender;?>"><?=$genType;?></option>
|
||||
<option value="1">Male</option>
|
||||
<option value="2">Female</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Profile Img
|
||||
<label class="control-label col-md-3">Image
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="compose-editor">
|
||||
<input name="image" value="<?=$s_img;?>" type="file" class="form-control" >
|
||||
<div class="col-md-5">
|
||||
<input name="image" value="<?=$image;?>" type="file" placeholder="Enter Your Image" class="form-control" multiple>
|
||||
<input type="hidden" name="hiddenImage" value="<?=$image;?>">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<img src="<?=base_url();?>/uploads/student/<?=$image;?>" style="width:75px;height:75px;" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -145,3 +184,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php $this->load->view('includes/footer');?>
|
||||
<script src="<?=base_url();?>assets/select2/js/select2.js"></script>
|
||||
<script src="<?=base_url();?>assets/select2/js/select2-init.js"></script>
|
||||
<script src="<?=base_url();?>assets/jquery.form-validator.min.js"></script>
|
@ -83,7 +83,7 @@
|
||||
<a href="<?=base_url();?>view-student/<?=$id;?>" class="btn btn-success btn-xs">
|
||||
<i class="fa fa-eye"></i>
|
||||
</a>
|
||||
<a href="<?=base_url();?>edit_student/<?=$id;?>" class="btn btn-primary btn-xs">
|
||||
<a href="<?=base_url();?>edit-student/<?=$id;?>" class="btn btn-primary btn-xs">
|
||||
<i class="fa fa-pencil"></i>
|
||||
</a>
|
||||
<a data-id="<?=$id;?>" class="editsemesterclass btn btn-danger btn-xs">
|
||||
|
@ -4,126 +4,190 @@
|
||||
<link href="<?=base_url();?>assets/select2/css/select2.css" rel="stylesheet" type="text/css" />
|
||||
<link href="<?=base_url();?>assets/select2/css/select2-bootstrap.min.css" rel="stylesheet" type="text/css" />
|
||||
<div class="page-container">
|
||||
<!-- start sidebar menu -->
|
||||
<?php $this->load->view('includes/sidebar');?>
|
||||
<!-- start page content -->
|
||||
<div class="page-content-wrapper">
|
||||
<div class="page-content">
|
||||
<div class="page-bar">
|
||||
<div class="page-title-breadcrumb">
|
||||
<div class=" pull-left">
|
||||
<div class="page-title">Add Subject</div>
|
||||
</div>
|
||||
<ol class="breadcrumb page-breadcrumb pull-right">
|
||||
<li><i class="fa fa-home"></i> <a class="parent-item" href="<?=base_url();?>/dashboard">Home</a> <i class="fa fa-angle-right"></i>
|
||||
</li>
|
||||
<li> <a class="parent-item" href="<?=base_url();?>/subject">Subject</a> <i class="fa fa-angle-right"></i>
|
||||
</li>
|
||||
<li class="active">Add Subject</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Midium Model -->
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<div class="card card-box">
|
||||
<div class="card-head">
|
||||
<header>Subject</header>
|
||||
</div>
|
||||
<div class="card-body" id="bar-parent">
|
||||
<form class="form-horizontal" action="<?=base_url();?>add-subject" enctype="multipart/form-data" method="post">
|
||||
<div class="form-body">
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Name of the Subject.
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<input name="subject" type="text" data-validation="required" placeholder="Enter Subject Name" class="form-control input-height" /> </div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Subject Code
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<input type="text" name="subjectCode" data-validation="required" placeholder="Enter Subject Code" class="form-control input-height">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Degree
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<select class="form-control select2" name="degree" data-validation="required">
|
||||
<option value=""></option>
|
||||
<?php
|
||||
if(isset($degree) && $degree->num_rows()>0)
|
||||
{
|
||||
foreach($degree->result() as $list)
|
||||
{
|
||||
?> <option value="<?=$list->id;?>"><?=$list->name;?></option><?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Faculty
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<select id="multiple" name="faculty[]" class="form-control default select2-multiple" multiple data-validation="required">
|
||||
<option value="">Select..</option>
|
||||
<?php
|
||||
if(isset($faculty) && $faculty->num_rows()>0)
|
||||
{
|
||||
foreach($faculty->result() as $list1)
|
||||
{
|
||||
?> <option value="<?=$list1->id;?>"><?=$list1->name;?></option><?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Profile Images
|
||||
</label>
|
||||
<div class="col-md-5 compose-editor">
|
||||
<input type="file" name="profileImage" class="form-control default" data-validation="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Description
|
||||
</label>
|
||||
<div class="col-md-5 compose-editor">
|
||||
<textarea type="file" name="description" placeholder="Enter Subject Description" class="form-control default" ></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="offset-md-3 col-md-9">
|
||||
<input type="submit" name="submit" class="btn btn-info m-r-20" value="Submit">
|
||||
<button type="button" class="btn btn-default">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- start sidebar menu -->
|
||||
<?php $this->load->view('includes/sidebar');?>
|
||||
<!-- start page content -->
|
||||
<div class="page-content-wrapper">
|
||||
<div class="page-content">
|
||||
<div class="page-bar">
|
||||
<div class="page-title-breadcrumb">
|
||||
<div class=" pull-left">
|
||||
<div class="page-title">Add Subject</div>
|
||||
</div>
|
||||
<ol class="breadcrumb page-breadcrumb pull-right">
|
||||
<li><i class="fa fa-home"></i> <a class="parent-item" href="<?=base_url();?>/dashboard">Home</a> <i class="fa fa-angle-right"></i>
|
||||
</li>
|
||||
<li> <a class="parent-item" href="<?=base_url();?>/subject">Subject</a> <i class="fa fa-angle-right"></i>
|
||||
</li>
|
||||
<li class="active">Add Subject</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Modal -->
|
||||
<!-- Midium Model -->
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<div class="card card-box">
|
||||
<div class="card-head">
|
||||
<header>Subject</header>
|
||||
</div>
|
||||
<div class="card-body" id="bar-parent">
|
||||
<form class="form-horizontal" action="<?=base_url();?>add-subject" enctype="multipart/form-data" method="post">
|
||||
<div class="form-body">
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Name of the Subject.
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<input name="subject" type="text" data-validation="required" placeholder="Enter Subject Name" class="form-control input-height" /> </div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Subject Code
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<input type="text" name="subjectCode" data-validation="required" placeholder="Enter Subject Code" class="form-control input-height">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Degree
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<select class="form-control select2" name="degree" data-validation="required">
|
||||
<option value=""></option>
|
||||
<?php
|
||||
if(isset($degree) && $degree->num_rows()>0)
|
||||
{
|
||||
foreach($degree->result() as $list)
|
||||
{
|
||||
?> <option value="<?=$list->id;?>"><?=$list->name;?></option><?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Faculty
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<select id="multiple" name="faculty[]" class="form-control default select2-multiple" multiple data-validation="required">
|
||||
<option value="">Select..</option>
|
||||
<?php
|
||||
if(isset($faculty) && $faculty->num_rows()>0)
|
||||
{
|
||||
foreach($faculty->result() as $list1)
|
||||
{
|
||||
?> <option value="<?=$list1->id;?>"><?=$list1->name;?></option><?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Profile Images
|
||||
</label>
|
||||
<div class="col-md-5 compose-editor">
|
||||
<input type="file" name="profileImage" class="form-control default" data-validation="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Description
|
||||
</label>
|
||||
<div class="col-md-5 compose-editor">
|
||||
<textarea type="file" name="description" placeholder="Enter Subject Description" class="form-control default" ></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-md-3">Title & Image
|
||||
</label>
|
||||
|
||||
<div class="col-md-2 compose-editor">
|
||||
<input name="title[0]" id="subjectTitle_0" type="text" class="form-control default">
|
||||
</div>
|
||||
<div class="col-md-2 compose-editor">
|
||||
<input name="profileimage[0]" id="subjectImage_0" type="file" class="form-control default">
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="add-new-button-blue addMore"><span class="btn btn-primary">Add <i class="fa fa-plus"></i></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<!---Duplicate ---->
|
||||
<input type="hidden" value="0" id="view"/>
|
||||
<div class="form-group duplicate1 row hide" id="imageTemplate" >
|
||||
<label class="control-label col-md-3">
|
||||
</label>
|
||||
<div class="col-md-2 compose-editor">
|
||||
<input name="titles[]" id="subjectTitle" type="text" class="form-control default">
|
||||
</div>
|
||||
<div class="col-md-2 compose-editor">
|
||||
<input name="profileimages[]" id="subjectImage" type="file" class="form-control default">
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="add-new-button-blue removeButton" id="cat_add_id"><span class="btn btn-danger">Remove <i class="fa fa-minus"></i></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<!---Duplicate ---->
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="offset-md-3 col-md-9">
|
||||
<input type="submit" name="submit" class="btn btn-info m-r-20" value="Submit">
|
||||
<button type="button" class="btn btn-default">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Modal -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $this->load->view('includes/footer');?>
|
||||
<script src="<?=base_url();?>assets/select2/js/select2.js"></script>
|
||||
<script src="<?=base_url();?>assets/select2/js/select2-init.js"></script>
|
||||
<script src="<?=base_url();?>assets/jquery.form-validator.min.js"></script>
|
||||
<script>
|
||||
//multiple add more
|
||||
invIndex = 0;
|
||||
$('body').on('click','.addMore', function() {
|
||||
|
||||
invIndex++;
|
||||
var $template = $('#imageTemplate'),
|
||||
$clone = $template
|
||||
.clone(true)
|
||||
.removeClass('hide')
|
||||
.removeAttr('id')
|
||||
.attr('data-book-index', invIndex)
|
||||
.insertBefore($template);
|
||||
|
||||
// Update the name attributes
|
||||
$clone
|
||||
.find('[id="subjectTitle"]').attr('id', 'subjectTitle_'+invIndex).end()
|
||||
.find('[id="subjectImage"]').attr('id', 'subjectImage_'+invIndex).end()
|
||||
|
||||
.find('[name="titles[]"]').attr('name', 'title['+invIndex+']').end()
|
||||
.find('[name="profileimages[]"]').attr('name', 'profileimage['+invIndex+']').end()
|
||||
|
||||
})
|
||||
|
||||
.on('click', '.removeButton', function(){
|
||||
var $row = $(this).parents('.duplicate1'),
|
||||
index = $row.attr('data-book-index');
|
||||
$row.remove();
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
@ -149,6 +149,78 @@
|
||||
<textarea type="text" name="description" data-validation="required" placeholder="Enter Description" class="form-control input-height"><?=$description;?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!--Multiple Add ---->
|
||||
<?php
|
||||
if(isset($getMultipleImage) && $getMultipleImage->num_rows()>0)
|
||||
{
|
||||
$totalCount=$getMultipleImage->num_rows();
|
||||
}
|
||||
?>
|
||||
<input type="hidden" value="<?=$totalCount;?>" id="hiddenCount"/>
|
||||
<hr>
|
||||
<div class="form-group row">
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-4"></div>
|
||||
<div class="col-md-1">
|
||||
<div class="add-new-button-blue addMore"><span style="padding-top:3px;" class="btn btn-primary">Add More<i class="fa fa-plus"></i></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if(isset($getMultipleImage) && $getMultipleImage->num_rows()>0)
|
||||
{
|
||||
$i=0;
|
||||
foreach($getMultipleImage->result() as $list)
|
||||
{
|
||||
$id =$list->id ;
|
||||
$title=$list->title;
|
||||
$image=$list->image;
|
||||
$subjectId=$list->subjectId;
|
||||
?>
|
||||
|
||||
<div class="form-group row duplicate1">
|
||||
<input type="hidden" value="<?=$id;?>" id="subjectDetailId_<?=$i;?>" name="subjectDetailName[<?=$i;?>]"/>
|
||||
<label class="control-label col-md-3">Title & Image
|
||||
</label>
|
||||
<div class="col-md-2 compose-editor">
|
||||
<input value="<?=$title;?>" name="title[<?=$i;?>]" id="subjectTitle_<?=$i;?>" type="text" class="form-control default">
|
||||
</div>
|
||||
<div class="col-md-2 compose-editor">
|
||||
<input name="profileimage[]" id="subjectImage_<?=$i;?>" type="file" class="form-control default">
|
||||
<img src="<?=base_url();?>uploads/subject/<?=$image;?>" style="width:75px;height:75px;"/>
|
||||
<input value="<?=$image;?>" name="profileimageOld[<?=$i;?>]" id="subjectImageOld_<?=$i;?>" type="hidden" class="form-control default">
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<div class="add-new-button-blue removeButton"><span style="padding-top:3px;" class="btn btn-danger">Remove <i class="fa fa-minus"></i></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<!---Duplicate ---->
|
||||
|
||||
<div class="form-group duplicate1 row hide" id="imageTemplate" >
|
||||
<input type="hidden" value="" id="subjectDetailId" name="subjectDetailNames[]"/>
|
||||
<label class="control-label col-md-3">
|
||||
</label>
|
||||
<div class="col-md-2 compose-editor">
|
||||
<input name="titles[]" id="subjectTitle" type="text" class="form-control default">
|
||||
</div>
|
||||
<div class="col-md-2 compose-editor">
|
||||
<input name="profileimages[]" id="subjectImage" type="file" class="form-control default">
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="add-new-button-blue removeButton" id="cat_add_id"><span class="btn btn-danger">Remove <i class="fa fa-minus"></i></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!---Duplicate ---->
|
||||
<!--End Multiple Add ---->
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
@ -173,3 +245,37 @@
|
||||
<script src="<?=base_url();?>assets/select2/js/select2.js"></script>
|
||||
<script src="<?=base_url();?>assets/select2/js/select2-init.js"></script>
|
||||
<script src="<?=base_url();?>assets/jquery.form-validator.min.js"></script>
|
||||
<script>
|
||||
//multiple add more
|
||||
invIndex = $('#hiddenCount').val();
|
||||
$('body').on('click','.addMore', function() {
|
||||
|
||||
invIndex++;
|
||||
var $template = $('#imageTemplate'),
|
||||
$clone = $template
|
||||
.clone(true)
|
||||
.removeClass('hide')
|
||||
.removeAttr('id')
|
||||
.attr('data-book-index', invIndex)
|
||||
.insertBefore($template);
|
||||
|
||||
// Update the name attributes
|
||||
$clone
|
||||
.find('[id="subjectTitle"]').attr('id', 'subjectTitle_'+invIndex).end()
|
||||
.find('[id="subjectImage"]').attr('id', 'subjectImage_'+invIndex).end()
|
||||
.find('[id="subjectDetailId"]').attr('id', 'subjectDetailId_'+invIndex).end()
|
||||
|
||||
.find('[name="titles[]"]').attr('name', 'title['+invIndex+']').end()
|
||||
.find('[name="profileimages[]"]').attr('name', 'profileimage['+invIndex+']').end()
|
||||
.find('[name="subjectDetailNames[]"]').attr('name', 'subjectDetailName['+invIndex+']').end()
|
||||
|
||||
})
|
||||
|
||||
.on('click', '.removeButton', function(){
|
||||
var $row = $(this).parents('.duplicate1'),
|
||||
index = $row.attr('data-book-index');
|
||||
$row.remove();
|
||||
|
||||
|
||||
});
|
||||
</script>
|
Before Width: | Height: | Size: 637 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 545 B |
Before Width: | Height: | Size: 469 B |
Before Width: | Height: | Size: 545 B |
Before Width: | Height: | Size: 420 B |
Before Width: | Height: | Size: 446 B |
Before Width: | Height: | Size: 247 KiB |
Before Width: | Height: | Size: 260 KiB |
Before Width: | Height: | Size: 239 KiB |
Before Width: | Height: | Size: 93 KiB |
Before Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 380 KiB |
Before Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 380 KiB |
Before Width: | Height: | Size: 380 KiB |
Before Width: | Height: | Size: 380 KiB |
BIN
admin/uploads/department/230123053918.webp
Normal file
After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 967 KiB |
Before Width: | Height: | Size: 967 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 22 KiB |
BIN
admin/uploads/faculty/2301230548.webp
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
admin/uploads/faculty/2301230551.webp
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
admin/uploads/faculty/2301230553.webp
Normal file
After Width: | Height: | Size: 39 KiB |
BIN
admin/uploads/faculty/2301230555.webp
Normal file
After Width: | Height: | Size: 91 KiB |
BIN
admin/uploads/faculty/2301230603.webp
Normal file
After Width: | Height: | Size: 917 KiB |
BIN
admin/uploads/project/1.1.jpg
Normal file
After Width: | Height: | Size: 1.1 MiB |
BIN
admin/uploads/project/1.4.jpg
Normal file
After Width: | Height: | Size: 948 KiB |
BIN
admin/uploads/project/1.5.jpg
Normal file
After Width: | Height: | Size: 689 KiB |
Before Width: | Height: | Size: 91 KiB |
Before Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 427 KiB |
Before Width: | Height: | Size: 316 KiB |
Before Width: | Height: | Size: 219 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 103 KiB |
Before Width: | Height: | Size: 427 KiB |
Before Width: | Height: | Size: 427 KiB |
BIN
admin/uploads/project/title230124093956.jpg
Normal file
After Width: | Height: | Size: 1.1 MiB |
BIN
admin/uploads/project/title230124102715.webp
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
admin/uploads/project/title230124102722.jpg
Normal file
After Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
BIN
admin/uploads/subject/.1.jpg
Normal file
After Width: | Height: | Size: 1.1 MiB |
BIN
admin/uploads/subject/1.1.jpg
Normal file
After Width: | Height: | Size: 1.1 MiB |