Example #1
0
<?php

/**
 * @package Helios Calendar
 * @license GNU General Public License version 2 or later; see LICENSE
 */
set_time_limit(600);
define('hcAdmin', true);
include '../loader.php';
admin_logged_in();
action_headers();
$token = isset($_POST['token']) ? cIn(strip_tags($_POST['token'])) : '';
if (!check_form_token($token)) {
    go_home();
}
include HCLANG . '/admin/tools.php';
$catID = $_POST['catID'];
$catIDWhere = '0,' . implode(',', $_POST['catID']);
$tID = isset($_POST['tID']) && is_numeric($_POST['tID']) ? cIn(strip_tags($_POST['tID'])) : 0;
$mID = isset($_POST['mID']) && is_numeric($_POST['mID']) ? cIn(strip_tags($_POST['mID'])) : 0;
$expVars = array(1 => array('tag' => '[event_id]', 'field' => '29'), 2 => array('tag' => '[event_title]', 'field' => '0'), 3 => array('tag' => '[event_desc]', 'field' => '1'), 4 => array('tag' => '[event_date]', 'field' => '30'), 5 => array('tag' => '[event_time_start]', 'field' => '2'), 6 => array('tag' => '[event_time_end]', 'field' => '3'), 7 => array('tag' => '[event_cost]', 'field' => '4'), 8 => array('tag' => '[event_billboard]', 'field' => '5'), 9 => array('tag' => '[contact_name]', 'field' => '6'), 10 => array('tag' => '[contact_email]', 'field' => '7'), 11 => array('tag' => '[contact_phone]', 'field' => '8'), 12 => array('tag' => '[contact_url]', 'field' => '9'), 13 => array('tag' => '[space]', 'field' => '10'), 14 => array('tag' => '[loc_name]', 'field' => 'X'), 15 => array('tag' => '[loc_address]', 'field' => 'X'), 16 => array('tag' => '[loc_address2]', 'field' => 'X'), 17 => array('tag' => '[loc_city]', 'field' => 'X'), 18 => array('tag' => '[loc_region]', 'field' => 'X'), 19 => array('tag' => '[loc_postal]', 'field' => 'X'), 20 => array('tag' => '[loc_country]', 'field' => 'X'), 21 => array('tag' => '[loc_url]', 'field' => '26'), 22 => array('tag' => '[cal_url]', 'field' => 'X'), 23 => array('tag' => '[date_series]', 'field' => 'X'), 24 => array('tag' => '[date_unique]', 'field' => '30'), 25 => array('tag' => '[category_unique]', 'field' => '31'), 26 => array('tag' => '[desc_notags]', 'field' => '1'));
$result = doQuery("SELECT * FROM " . HC_TblPrefix . "templates WHERE IsActive = 1 AND PkID = '" . $tID . "'");
if (hasRows($result)) {
    $content = mysql_result($result, 0, 2);
    $header = mysql_result($result, 0, 3);
    $footer = mysql_result($result, 0, 4);
    $ext = mysql_result($result, 0, 5);
    $groupBy = mysql_result($result, 0, 7);
    $sortBy = mysql_result($result, 0, 8);
    $cleanUp = explode("\n", mysql_result($result, 0, 9));
    $dateFormat = mysql_result($result, 0, 10);
Example #2
0
 /**
  * Edit potfolio of providers
  *
  * Returns all programmers rating reviews
  *
  * @access	private
  * @param	string
  * @return	string
  */
 function editPortfolio()
 {
     //language file
     $this->lang->load('enduser/editProfile', $this->config->item('language_code'));
     //Check For Buyer Session
     if (!isProgrammer()) {
         $this->session->set_flashdata('flash_message', $this->common_model->flash_message('error', $this->lang->line('You must be logged in as a Programmer')));
         redirect('info');
     }
     //load validation libraray
     $this->load->library('form_validation');
     //Load Form Helper
     $this->load->helper('form');
     //Intialize values for library and helpers
     $this->form_validation->set_error_delimiters($this->config->item('field_error_start_tag'), $this->config->item('field_error_end_tag'));
     //Get Form Data
     if ($this->input->post('editPortfolio')) {
         //Set rules
         //echo $_FILES['attachment1']['name'];exit;
         $this->form_validation->set_rules('title', 'lang:portfolio_title_validation', 'required|trim|xss_clean');
         $this->form_validation->set_rules('description', 'lang:portfolio_description_validation', 'required|trim|xss_clean');
         $this->form_validation->set_rules('categories[]', 'lang:portfolio_categories_validation', 'required');
         if ($_FILES['thumbnail']['name'] != '') {
             $this->form_validation->set_rules('thumbnail', 'lang:portfolio_thumbnail_validation', 'callback__thumbnail_check');
         }
         if ($_FILES['attachment1']['name'] != '') {
             $this->form_validation->set_rules('attachment1', 'lang:portfolio_attachment1_validation', 'callback__attachment1_check');
         }
         if ($_FILES['attachment2']['name'] != '') {
             $this->form_validation->set_rules('attachment2', 'lang:portfolio_attachment2_validation', 'callback__attachment2_check');
         }
         if ($this->form_validation->run()) {
             if (check_form_token() === false) {
                 $this->session->set_flashdata('flash_message', $this->common_model->flash_message('error', $this->lang->line('token_error')));
                 redirect('info');
             }
             //pr($this->outputData['file']);exit;
             $categories = $this->input->post('categories');
             $ids = implode(',', $categories);
             $updateData = array();
             $updateData['title'] = $this->input->post('title');
             $updateData['description'] = $this->input->post('description');
             $updateData['categories'] = $ids;
             $updateData['user_id'] = $this->loggedInUser->id;
             $condition2 = array('portfolio.id' => $this->input->post('portid'));
             $port = $this->user_model->getPortfolio($condition2);
             $folio = $port->row();
             $path = $this->config->item('basepath') . 'files/portfolios/';
             if (isset($this->outputData['file'])) {
                 $files = array($folio->main_img);
                 //delete image files from server
                 delete_file($path, $files);
                 $updateData['main_img'] = $this->outputData['file']['file_name'];
             }
             if (isset($this->outputData['file1'])) {
                 $files = array($folio->attachment1);
                 //delete image files from server
                 delete_file($path, $files);
                 $updateData['attachment1'] = $this->outputData['file1']['file_name'];
                 $thumb1 = $this->outputData['file1']['file_path'] . $this->outputData['file1']['raw_name'] . "_thumb" . $this->outputData['file1']['file_ext'];
                 //createthumb($this->outputData['file1']['full_path'],$thumb1,120,90);
                 GenerateThumbFile($this->outputData['file1']['full_path'], $thumb1, 120, 90);
                 //$this->skills_model->cr_thumb($this->outputData['file1']['full_path']);
             }
             if (isset($this->outputData['file2'])) {
                 $files = array($folio->attachment2);
                 //delete image files from server
                 delete_file($path, $files);
                 $updateData['attachment2'] = $this->outputData['file2']['file_name'];
                 $thumb2 = $this->outputData['file2']['file_path'] . $this->outputData['file2']['raw_name'] . "_thumb" . $this->outputData['file2']['file_ext'];
                 GenerateThumbFile($this->outputData['file2']['full_path'], $thumb2, 120, 90);
                 //$this->skills_model->cr_thumb($this->outputData['file2']['full_path']);
             }
             $updateKey = array('portfolio.id' => $this->input->post('portid'));
             //Edit Portfolio
             $this->user_model->updatePortfolio($updateKey, $updateData);
             //Notification message
             $this->session->set_flashdata('flash_message', $this->common_model->flash_message('success', $this->lang->line('provider_portfolio_success')));
             redirect('programmer/managePortfolio');
         }
         //Form Validation End
     }
     //If - Form Submission End
     //Get Categories
     $this->outputData['categories'] = $this->skills_model->getCategories();
     //Get Portfolio
     $condition = array('portfolio.user_id' => $this->loggedInUser->id);
     $this->outputData['portfolio'] = $this->user_model->getPortfolio($condition);
     $condition2 = array('portfolio.id' => $this->uri->segment(3));
     $this->outputData['editPortfolio'] = $this->user_model->getPortfolio($condition2);
     //Get Categories
     $this->outputData['categories'] = $this->skills_model->getCategories();
     //pr($this->outputData['getPortfolio']->result());exit;
     $this->load->view('programmer/managePorfolio', $this->outputData);
 }
Example #3
0
 /**
  * Loads confirm page for buyer
  *
  * @access	public
  * @param	nil
  * @return	void
  */
 function confirm()
 {
     //language file
     $this->lang->load('enduser/buyerConfirm', $this->config->item('language_code'));
     //Load Models - for this function
     $this->load->model('skills_model');
     //load validation libraray
     $this->load->library('form_validation');
     //Load Form Helper
     $this->load->helper('form');
     //Intialize values for library and helpers
     $this->form_validation->set_error_delimiters($this->config->item('field_error_start_tag'), $this->config->item('field_error_end_tag'));
     //Get Form Data
     if ($this->input->post('buyerConfirm', TRUE)) {
         //Set rules
         $this->form_validation->set_rules('username', 'lang:buyer_name_validation', 'required|trim|min_length[5]|xss_clean|callback__check_username|alpha_space');
         $this->form_validation->set_rules('password', 'lang:password', 'required|trim|min_length[5]|max_length[16]|xss_clean|matches[ConfirmPassword]');
         $this->form_validation->set_rules('ConfirmPassword', 'ConfirmPassword', 'required|trim|min_length[5]|max_length[16]|xss_clean');
         $this->form_validation->set_rules('name', 'lang:name_validation', 'trim|min_length[5]|xss_clean');
         $this->form_validation->set_rules('logo', 'lang:logo_validation', 'callback__logo_check');
         $this->form_validation->set_rules('country', 'lang:country_validation', 'required|xss_clean');
         $this->form_validation->set_rules('state', 'lang:state_validation', 'trim|xss_clean');
         $this->form_validation->set_rules('city', 'lang:city_validation', 'trim|xss_clean');
         $this->form_validation->set_rules('signup_agree_terms', 'lang:signup_agree_terms_validation', 'required');
         $this->form_validation->set_rules('signup_agree_contact', 'lang:signup_agree_contact_validation', 'required');
         $this->form_validation->set_rules('confirmKey', 'Confirmation Key', 'callback__check_activation_key');
         $this->form_validation->set_rules('msn', 'msn', 'trim|xss_clean');
         $this->form_validation->set_rules('gtalk', 'gtalk', 'trim|xss_clean');
         $this->form_validation->set_rules('yahoo', 'yahoo', 'trim|xss_clean');
         $this->form_validation->set_rules('skype', 'skype', 'trim|xss_clean');
         if ($this->form_validation->run()) {
             if (check_form_token() === false) {
                 $this->session->set_flashdata('flash_message', $this->common_model->flash_message('error', $this->lang->line('token_error')));
                 redirect('info');
             }
             $updateData = array();
             $updateData['refid'] = $this->session->userdata('refId');
             $updateData['user_name'] = $this->input->post('username', TRUE);
             $updateData['password'] = md5($this->input->post('password', TRUE));
             $updateData['name'] = $this->input->post('name', TRUE);
             $updateData['bid_notify'] = $this->input->post('notify_bid', TRUE);
             $updateData['message_notify'] = $this->input->post('notify_message', TRUE);
             $updateData['country_symbol'] = $this->input->post('country', TRUE);
             $updateData['state'] = $this->input->post('state', TRUE);
             $updateData['city'] = $this->input->post('city', TRUE);
             $updateData['user_status'] = '1';
             if (isset($this->outputData['file'])) {
                 $updateData['logo'] = $this->outputData['file']['file_name'];
                 $thumb1 = $this->outputData['file']['file_path'] . $this->outputData['file']['raw_name'] . "_thumb" . $this->outputData['file']['file_ext'];
                 GenerateThumbFile($this->outputData['file']['full_path'], $thumb1, 49, 48);
             }
             //Create User
             $updateKey = array('activation_key' => $this->input->post('confirmKey', TRUE));
             // print_r($updateData);
             $this->user_model->updateUser($updateKey, $updateData);
             $this->session->unset_userdata('refId');
             $user = $this->user_model->getUsers($updateKey);
             $userDetails = $user->row();
             $contacts = array();
             $contacts['msn'] = $this->input->post('contact_msn', TRUE);
             $contacts['gtalk'] = $this->input->post('contact_gtalk', TRUE);
             $contacts['yahoo'] = $this->input->post('contact_yahoo', TRUE);
             $contacts['skype'] = $this->input->post('contact_skype', TRUE);
             $contacts['user_id'] = $userDetails->id;
             $this->user_model->insertUserContacts($contacts);
             if (count($userDetails) > 0) {
                 //Get the last insert username
                 $condition = array('users.activation_key' => $this->uri->segment(3));
                 $registerusers = $this->user_model->getUsers($condition);
                 $registerusers = $registerusers->row();
                 //Send email to the user after registration
                 $conditionUserMail = array('email_templates.type' => 'registration');
                 $result = $this->email_model->getEmailSettings($conditionUserMail);
                 $rowUserMailConent = $result->row();
                 $splVars = array("!site_name" => $this->config->item('site_title'), "!username" => $updateData['user_name'], "!password" => $this->input->post('password'), "!usertype" => 'Buyer', "!siteurl" => site_url(), "!contact_url" => site_url('contact'));
                 $mailSubject = strtr($rowUserMailConent->mail_subject, $splVars);
                 $mailContent = strtr($rowUserMailConent->mail_body, $splVars);
                 $toEmail = $registerusers->email;
                 $fromEmail = $this->config->item('site_admin_mail');
                 $this->email_model->sendHtmlMail($toEmail, $fromEmail, $mailSubject, $mailContent);
                 $insertData = array();
                 $insertData['username'] = $this->input->post('username');
                 $insertData['password'] = md5($this->input->post('password'));
                 $expire = 60 * 60 * 24 * 100;
                 $this->auth_model->setUserCookie('user_name', $insertData['username'], $expire);
                 $this->auth_model->setUserCookie('user_password', $insertData['password'], $expire);
                 redirect('users/login');
             }
             //Notification message
             $this->session->set_flashdata('flash_message', $this->common_model->flash_message('success', $this->lang->line('buyer_confirm_success')));
             redirect('info/index/success');
         }
         //Form Validation End
     }
     //If - Form Submission End
     //Get Countries
     $this->outputData['countries'] = $this->common_model->getCountries();
     //Get Activation Key
     $activation_key = $this->uri->segment(3, '0');
     //Conditions
     $conditions = array('users.role_id' => '1', 'users.activation_key' => $activation_key);
     $query = $this->user_model->getUsers($conditions);
     if ($query->num_rows == 1) {
         $row = $query->row();
     } else {
         $this->session->set_flashdata('flash_message', $this->common_model->flash_message('error', $this->lang->line('buyer_activationkey_error')));
         redirect('info');
     }
     //Puhal changes To get the Privacy Policy Contents
     $like = array('page.url' => '%privacy%');
     $this->outputData['page_content'] = $this->page_model->getPages(NULL, $like, NULL);
     //Puhal Chnages To get the company and conditions Contents
     $like = array('page.url' => '%ter%');
     $like1 = array('page.url' => '%cond%');
     $this->outputData['page_content1'] = $this->page_model->getPages(NULL, $like, $like1);
     $this->outputData['confirmed_mail'] = $row->email;
     $this->load->view('buyer/buyerConfirm', $this->outputData);
 }
Example #4
0
		}
		//-->
		</script>';
} else {
    $token = '';
    $token = $token == '' && isset($_POST['token']) ? cIn(strip_tags($_POST['token'])) : $token;
    $token = $token == '' && isset($_GET['tkn']) ? cIn(strip_tags($_GET['tkn'])) : $token;
    appInstructions(1, "Merging_Locations", $hc_lang_locations['TitleMerge'], $hc_lang_locations['InstructMerge2']);
    $locName = '';
    if (isset($_GET['l'])) {
        $locName = isset($_GET['l']) ? strip_tags(str_replace("'", "\"", $_GET['l'])) : '';
    } elseif (isset($_POST['locName'])) {
        $locName = isset($_POST['locName']) ? strip_tags(str_replace("'", "\"", $_POST['locName'])) : '';
    }
    $result = doQuery("SELECT PkID, Name, IsPublic, \r\n\t\t\t\t\t\t\t(SELECT COUNT(PkID) FROM " . HC_TblPrefix . "events e WHERE e.StartDate >= '" . SYSDATE . "' AND e.LocID = l.PkID) AS EventCnt\r\n\t\t\t\t\t\tFROM " . HC_TblPrefix . "locations l\r\n\t\t\t\t\t\tWHERE IsActive = 1 AND\r\n\t\t\t\t\t\t\t(MATCH(Name,Address,Address2) AGAINST('" . cIn($locName, 0) . "' IN BOOLEAN MODE) OR NAME LIKE('%" . cIn($locName) . "%'))\r\n\t\t\t\t\t\tORDER BY IsPublic, Name");
    if (!hasRows($result) || $locName == '' || !check_form_token($token)) {
        echo '
			<p>' . $hc_lang_locations['NoLoc'] . '</p>
			<p><a href="' . AdminRoot . '/index.php?com=locsearch">' . $hc_lang_locations['NoLocLink'] . '</a></p>';
    } else {
        echo '
			<form name="frmMergeLocation" id="frmMergeLocation" method="post" action="' . AdminRoot . '/index.php?com=location&amp;m=1" onsubmit="return validate();">';
        set_form_token();
        echo '
			<div class="catCtrl">
				[ <a href="javascript:;" onclick="checkAllArray(\'frmMergeLocation\',\'locID[]\');">' . $hc_lang_core['SelectAll'] . '</a>
				&nbsp;|&nbsp; <a href="javascript:;" onclick="uncheckAllArray(\'frmMergeLocation\',\'locID[]\');">' . $hc_lang_core['DeselectAll'] . '</a> ]
			</div>
			<ul class="data">
				<li class="row header uline">
					<div style="width:65%;">' . $hc_lang_locations['NameLabel'] . '</div>
Example #5
0
 * @package Helios Calendar
 * @license GNU General Public License version 2 or later; see LICENSE
 */
if (!defined('hcAdmin')) {
    header("HTTP/1.1 403 No Direct Access");
    exit;
}
include HCLANG . '/admin/locations.php';
$hc_Side[] = array(CalRoot . '/index.php?com=location', 'map.png', $hc_lang_locations['LinkMap'], 1);
$locIDs = isset($_POST['locID']) ? implode(',', array_filter($_POST['locID'], 'is_numeric')) : '';
$token = '';
$token = $token == '' && isset($_POST['token']) ? cIn(strip_tags($_POST['token'])) : $token;
$token = $token == '' && isset($_GET['tkn']) ? cIn(strip_tags($_GET['tkn'])) : $token;
appInstructions(1, "Merging_Locations", $hc_lang_locations['TitleMerge'], $hc_lang_locations['InstructMerge3']);
$result = doQuery("SELECT PkID, Name, IsPublic, \r\n\t\t\t\t\t\t(SELECT COUNT(PkID) FROM " . HC_TblPrefix . "events e WHERE e.StartDate >= '" . cIn(SYSDATE) . "' AND e.LocID = l.PkID) AS EventCnt\r\n\t\t\t\t\tFROM " . HC_TblPrefix . "locations l\r\n\t\t\t\t\tWHERE IsActive = 1 AND PkID IN (" . $locIDs . ")\r\n\t\t\t\t\tORDER BY IsPublic, Name");
if (hasRows($result) && check_form_token($token)) {
    echo '
		<form name="frmMergeLocation" id="frmMergeLocation" method="post" action="' . AdminRoot . '/components/LocationMergeAction.php" onsubmit="return validate();">';
    set_form_token();
    echo '
		<input type="hidden" name="locIDs" id="locIDs" value="' . $locIDs . '" />
		<ul class="data">
			<li class="row header uline">
				<div style="width:65%;">' . $hc_lang_locations['NameLabel'] . '</div>
				<div style="width:15%;">' . $hc_lang_locations['StatusLabel'] . '</div>
				<div class="number" style="width:10%;">' . $hc_lang_locations['Events'] . '</div>
				<div style="width:10%;">&nbsp;</div>
			</li>';
    $cnt = 0;
    while ($row = mysql_fetch_row($result)) {
        $hl = $cnt % 2 == 1 ? ' hl' : '';
Example #6
0
 /**
  * View the cancellation/Dispute case
  *
  * @access	private
  * @param	case id
  * @return	contents
  */
 function viewCase()
 {
     //Load Language
     $this->lang->load('enduser/cancelProject', $this->config->item('language_code'));
     //Check Whether User Logged In Or Not
     if (isLoggedIn() === false) {
         $this->session->set_flashdata('flash_message', $this->common_model->flash_message('error', $this->lang->line('Please login to view case')));
         redirect('info');
     }
     //If Admin try to access this url...redirect him
     if (isAdmin() === true) {
         $this->session->set_flashdata('flash_message', $this->common_model->flash_message('error', $this->lang->line('Please login to view case')));
         redirect('info');
     }
     //Load model
     $this->load->helper('users');
     $this->load->helper('projectcases');
     //load validation libraray
     $this->load->library('form_validation');
     //Load Form Helper
     $this->load->helper('form');
     //Intialize values for library and helpers
     $this->form_validation->set_error_delimiters($this->config->item('field_error_start_tag'), $this->config->item('field_error_end_tag'));
     //Get Form Data
     if ($this->input->post('respondCase')) {
         //Set rules
         if ($this->input->post('updates') == '0') {
             $this->form_validation->set_rules('problem_description', 'lang:problem_description_validation', 'required|trim|xss_clean');
         } else {
             $this->form_validation->set_rules('problem_description', 'lang:problem_description_validation', 'trim|xss_clean');
         }
         $this->form_validation->set_rules('comments', '', 'trim|xss_clean');
         if ($this->form_validation->run()) {
             if (check_form_token() === false) {
                 $this->session->set_flashdata('flash_message', $this->common_model->flash_message('error', $this->lang->line('token_error')));
                 redirect('info');
             }
             $insertData = array();
             $insertData['parent'] = $this->input->post('case_id');
             $insertData['problem_description'] = $this->input->post('problem_description');
             $insertData['private_comments'] = $this->input->post('comments');
             $insertData['user_id'] = $this->loggedInUser->id;
             $insertData['created'] = get_est_time();
             if ($this->input->post('updates') != '0') {
                 $insertData['updates'] = $this->input->post('updates');
             }
             //Create Case
             $this->dispute_model->insertProjectCase($insertData);
             $project_id = $this->input->post('project_id');
             $condition2 = array('projects.id' => $project_id);
             $res = $this->skills_model->getProjects($condition2);
             $prj = $res->row();
             if (isProgrammer()) {
                 $other_user = $prj->user_name;
                 $user_type = 'Provider';
             }
             if (isBuyer()) {
                 $provider_id = $prj->programmer_id;
                 $providerRow = getUserInfo($provider_id);
                 $other_user = $providerRow->user_name;
                 $user_type = 'Buyer';
             }
             //Send Mail to other user about the case
             $conditionUserMail = array('email_templates.type' => 'respond_case');
             $result = $this->email_model->getEmailSettings($conditionUserMail);
             $rowUserMailConent = $result->row();
             //Update the details
             $splVars = array("!project_name" => '<a href="' . site_url('project/view/' . $prj->id) . '">' . $prj->project_name . '</a>', "!pr_name" => $prj->project_name, "!other_user" => $other_user, "!contact_url" => site_url('contact'), "!user" => $this->loggedInUser->user_name, '!site_title' => $this->config->item('site_title'), "!link" => site_url('dispute/viewCase/' . $insertData['parent']));
             $mailSubject = strtr($rowUserMailConent->mail_subject, $splVars);
             $mailContent = strtr($rowUserMailConent->mail_body, $splVars);
             $toEmail = $prj->email;
             $fromEmail = $this->config->item('site_admin_mail');
             $this->email_model->sendHtmlMail($toEmail, $fromEmail, $mailSubject, $mailContent);
             //Send acknowledgement Mail to siteadmin
             $conditionUserMail = array('email_templates.type' => 'response_case_admin');
             $result = $this->email_model->getEmailSettings($conditionUserMail);
             $rowUserMailConent = $result->row();
             //Update the details
             $splVars = array("!project_name" => '<a href="' . site_url('project/view/' . $prj->id) . '">' . $prj->project_name . '</a>', "!user" => $this->loggedInUser->user_name, '!user_type' => $user_type, '!case_id' => $insertData['parent']);
             $mailSubject = strtr($rowUserMailConent->mail_subject, $splVars);
             $mailContent = strtr($rowUserMailConent->mail_body, $splVars);
             $toEmail = $this->config->item('site_admin_mail');
             $fromEmail = $prj->email;
             $this->email_model->sendHtmlMail($toEmail, $fromEmail, $mailSubject, $mailContent);
             //Notification message
             $this->session->set_flashdata('flash_message', $this->common_model->flash_message('success', $this->lang->line('response added successfully')));
             redirect('dispute/viewCase/' . $insertData['parent']);
         }
     }
     if ($this->input->post('reopen')) {
         $insertData = array();
         $insertData['parent'] = $this->input->post('case_id');
         $insertData['user_id'] = $this->loggedInUser->id;
         $insertData['created'] = get_est_time();
         $insertData['updates'] = $this->lang->line('case reopened');
         //Create Case
         $this->dispute_model->insertProjectCase($insertData);
         //prepare update data
         $updateData = array();
         $updateData['status'] = 'open';
         //update case
         $this->skills_model->updateProjectCase($this->input->post('case_id'), $updateData);
         //Notification message
         $this->session->set_flashdata('flash_message', $this->common_model->flash_message('success', $this->lang->line('Case reopened successfully')));
         redirect('dispute/viewCase/' . $insertData['parent']);
     }
     $caseid = $this->uri->segment('3', 0);
     $condition2 = array('project_cases.id' => $caseid);
     $res = $this->dispute_model->getProjectCases($condition2);
     if ($res->num_rows() == 0) {
         //Notification message
         $this->session->set_flashdata('flash_message', $this->common_model->flash_message('error', $this->lang->line('Invalid input given')));
         redirect('info');
     }
     $this->outputData['projectCase'] = $res->row();
     $condition3 = array('project_cases.parent' => $caseid);
     $this->outputData['caseResolution'] = $this->dispute_model->getProjectCases($condition3);
     //pr($this->outputData['projectCase']);exit;
     //$this->outputData['provider'] = getUserInfo($this->outputData['project']->programmer_id);
     $this->load->view('dispute/viewCase', $this->outputData);
 }