Server IP : 92.204.138.22 / Your IP : 18.118.16.91 Web Server : Apache System : Linux ns1009439.ip-92-204-138.us 4.18.0-553.8.1.el8_10.x86_64 #1 SMP Tue Jul 2 07:26:33 EDT 2024 x86_64 User : internationaljou ( 1019) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/internationaljou/SSRG-01-03-2024/application/models/ |
Upload File : |
<?php class Ijhss_archive_model extends CI_Model { function __construct() { parent::__construct(); } /* ijhss */ public function current_issue_title() { $this->db->select("*,DATE_FORMAT(b.reg_date, '%M %Y') as monthyear"); $this->db->from('current_issue'); $this->db->join('ijhss b','b.issue=current_issue.issue'); $this->db->where('journal','IJHSS'); $this->db->where('b.volume=current_issue.volume'); $this->db->where('b.issue=current_issue.issue'); //$this->db->where('b.year=DATE_FORMAT(Now(),"%Y")'); $this->db->order_by("b.volume","desc"); $this->db->order_by("b.issue","desc"); $this->db->limit(1); $query = $this->db->get()->result(); //$query = $this->db->last_query(); return $query; } public function current_issue() { $this->db->select("*,DATE_FORMAT(b.reg_date, '%M %Y') as monthyear"); $this->db->from('current_issue'); $this->db->join('ijhss b','b.issue=current_issue.issue'); $this->db->where('journal','IJHSS'); $this->db->where('b.volume=current_issue.volume'); $this->db->where('b.issue=current_issue.issue'); //$this->db->where('b.year=DATE_FORMAT(Now(),"%Y")'); $this->db->where('status','Active'); $this->db->order_by("b.volume","desc"); $this->db->order_by("b.issue","desc"); $query = $this->db->get()->result(); //$query = $this->db->last_query(); return $query; } public function current_issue_numofrows() { $this->db->select("*,DATE_FORMAT(b.reg_date, '%M %Y') as monthyear"); $this->db->from('current_issue'); $this->db->join('ijhss b','b.issue=current_issue.issue'); $this->db->where('journal','IJHSS'); $this->db->where('b.volume=current_issue.volume'); $this->db->where('b.issue=current_issue.issue'); //$this->db->where('b.year=DATE_FORMAT(Now(),"%Y")'); $this->db->where('status','Active'); $this->db->order_by("b.volume","desc"); $this->db->order_by("b.issue","desc"); $query = $this->db->get(); $query= $query->num_rows(); //$query = $this->db->last_query(); return $query; } public function getarchieve_year() { $this->db->select("year"); $this->db->from('ijhss'); $this->db->distinct(); $this->db->where('status','Active'); $this->db->order_by("year","desc"); $query = $this->db->get()->result(); $i=0; foreach($query as $year){ //print_r($year->year); $query[$i]->sub = $this->getarchieve_year_second($year->year); $i++; } return $query; } public function getarchieve_year_second($yearvalue) { $this->db->select('issue,volume,COUNT( Distinct issue) as issuecount'); $this->db->from('ijhss'); $this->db->distinct(); $this->db->where('status','Active'); //$this->db->where('year','2014'); $this->db->where('year',$yearvalue); $this->db->group_by('issue'); $this->db->group_by('volume'); $this->db->order_by("volumeno","desc"); $this->db->order_by("issueno","desc"); $query = $this->db->get()->result(); //$query = $this->db->get(); //echo $query = $this->db->last_query(); echo ";"; return $query; $i=0; foreach($query as $year){ //print_r($year->year); $query[$i]->sub = $this->getarchieve_year_second($year->year); $i++; } return $query; } public function archive_details_model() { $volume_issue = $_REQUEST['page']; $volume = explode('-',$volume_issue); $volume3 = str_replace("Volume","Volume ",$volume['0']); //Volume 1 $issue3 = str_replace("Issue","Issue ",$volume['1']); // Issue 6 $year3 = $volume['2']; $this->db->select("*,DATE_FORMAT(reg_date, '%M %Y') as monthyear"); $this->db->from('ijhss'); $this->db->where('volume',$volume3); $this->db->where('issue',$issue3); $this->db->where('year',$year3); $this->db->where('status','Active'); $this->db->order_by("paperid","asc"); $query = $this->db->get()->result(); //echo $query = $this->db->last_query(); return $query; } public function archive_details_title() { $volume_issue = $_REQUEST['page']; $volume = explode('-',$volume_issue); $volume3 = str_replace("Volume","Volume ",$volume['0']); //Volume 1 $issue3 = str_replace("Issue","Issue ",$volume['1']); // Issue 6 $year3 = $volume['2']; $this->db->select("*,DATE_FORMAT(reg_date, '%M %Y') as monthyear"); $this->db->from('ijhss'); $this->db->where('volume',$volume3); $this->db->where('issue',$issue3); $this->db->where('year',$year3); $this->db->where('status','Active'); $this->db->limit(1); $query = $this->db->get()->result(); //echo $query = $this->db->last_query(); return $query; } public function archive_details_num() { $volume_issue = $_REQUEST['page']; $volume = explode('-',$volume_issue); $volume3 = str_replace("Volume","Volume ",$volume['0']); //Volume 1 $issue3 = str_replace("Issue","Issue ",$volume['1']); // Issue 6 $year3 = $volume['2']; $this->db->select("*,DATE_FORMAT(reg_date, '%M %Y') as monthyear"); $this->db->from('ijhss'); $this->db->where('volume',$volume3); $this->db->where('issue',$issue3); $this->db->where('year',$year3); $this->db->where('status','Active'); $query = $this->db->get(); $query = $query->num_rows(); //$query = $this->db->last_query(); return $query; } public function paper_details() { $Sno = $_REQUEST['Id']; $this->db->select("*"); $this->db->from('ijhss'); $this->db->where('sno',$Sno); $query = $this->db->get()->result(); return $query; } } ?>