Esempio n. 1
0
<?php 
if ($boot) {
    echo 'window.parent.CONTENTS.location.replace(\'startframe.php?sid=' . $sid . '&lang=' . $lang . '&egal=' . $egal . '&cookie=' . $cookie . '\');';
}
?>
"
<?php 
echo 'bgcolor=' . $cfg['idx_bgcolor'];
if (!$cfg['dhtml']) {
    echo ' link=' . $cfg['idx_txtcolor'] . ' vlink=' . $cfg['idx_txtcolor'] . ' alink=' . $cfg['idx_alink'];
}
?>
 
 >
<center><img <?php 
echo createLogo($root_path, 'care_logo.gif', '0');
?>
></center>
<TABLE CELLPADDING=2 CELLSPACING=0 border=0 >
<FONT  FACE="Arial"  SIZE="-1">

<?php 
//echo $_COOKIE['ck_config']; // used only in debugging related to user config data
if ($result) {
    while ($menu = $result->FetchRow()) {
        if (preg_match('/LDLogin/i', $menu['LD_var'])) {
            if ($_COOKIE['ck_login_logged' . $sid] == 'true') {
                $menu['url'] = 'main/logout_confirm.php';
                $menu['LD_var'] = 'LDLogout';
            }
        }
if ($boot || $_chg_lang_) {
    $TP_js_onload = 'onLoad="if (window.focus) window.focus();window.parent.CONTENTS.location.replace(\'startframe.php?sid=' . $sid . '&lang=' . $lang . '&egal=' . $egal . '&cookie=' . $cookie . '\');"';
} else {
    $TP_js_onload = 'onLoad="if (window.focus) window.focus();"';
}
$TP_bgcolor = 'bgcolor="' . $cfg['idx_bgcolor'] . '"';
if (!$cfg['dhtml']) {
    $TP_link = 'link="' . $cfg['idx_txtcolor'] . '"';
    $TP_vlink = 'vlink="' . $cfg['idx_txtcolor'] . '"';
    $TP_alink = 'alink="' . $cfg['idx_alink'] . '"';
} else {
    $TP_link = '';
    $TP_vlink = '';
    $TP_alink = '';
}
$TP_logo = createLogo($root_path, 'care_logo_' . $dbtype . '.gif', '0');
$tp_body =& $TP_obj->load('tp_main_index_menu_body.htm');
eval("echo {$tp_body};");
#
# Generate the menu tree
#
//require("menu/$LocMenuTreeDir/mainmenu.inc.php");
require "./menu/dtree/mainmenu.inc.php";
?>

<TABLE CELLPADDING=0 CELLSPACING=0 border=0>

<?php 
//echo $_COOKIE['ck_config']; // used only in debugging related to user config data
//echo $GLOBALCONFIG['language_single']."<br>";
if ($GLOBALCONFIG['language_single'] != 1) {
# Extract the  confirmation record for display
if ($get_nr) {
    $sickconfirm = $single_obj->FetchRow();
} elseif (is_object($sickconfirm_obj)) {
    $sickconfirm = $sickconfirm_obj->FetchRow();
}
# Take over the dept number
$dept_nr = $sickconfirm['dept_nr'];
$TP_insco_1 = 'AOK';
$TP_insco_2 = 'BKK';
$TP_insco_3 = 'KKH';
$TP_insco_4 = 'TKK';
$TP_insco_5 = 'HKH';
$TP_insco_6 = 'BGG';
$TP_date_birth = formatDate2Local($date_birth, $date_format);
$TP_care_logo = createLogo($root_path, 'care_logo.gif', '0', 'right');
# Signature stamp of the department
$TP_dept_sigstamp = nl2br($sickconfirm['sig_stamp']);
# Logo of the department
$TP_width = '';
# Logo of the department
$logobuff = $root_path . 'gui/img/logos_dept/dept_' . $dept_nr . '.' . $sickconfirm['logo_mime_type'];
if (file_exists($logobuff)) {
    $TP_dept_logo = $logobuff;
    # Check the logo dimensions
    $logosize = GetImageSize($logobuff);
    # If height > $logo_ht_limit, use limit
    if ($logosize[1] > $logo_ht_limit) {
        $TP_height = 'height=' . $logo_ht_limit;
    } else {
        $TP_height = 'height=' . $logosize[1];
# Extract the  confirmation record for display
if ($get_nr) {
    $sickconfirm = $single_obj->FetchRow();
} elseif (is_object($sickconfirm_obj)) {
    $sickconfirm = $sickconfirm_obj->FetchRow();
}
# Take over the dept number
$dept_nr = $sickconfirm['dept_nr'];
$TP_insco_1 = 'AOK';
$TP_insco_2 = 'BKK';
$TP_insco_3 = 'KKH';
$TP_insco_4 = 'TKK';
$TP_insco_5 = 'HKH';
$TP_insco_6 = 'BGG';
$TP_date_birth = formatDate2Local($date_birth, $date_format);
$TP_care_logo = createLogo($root_path, 'care_logo.gif', '0', 'right', '', 'nodim', '25');
# Signature stamp of the department
$TP_dept_sigstamp = nl2br($sickconfirm['sig_stamp']);
$TP_width = '';
# Logo of the department
$logobuff = $root_path . 'gui/img/logos_dept/dept_' . $dept_nr . '.' . $sickconfirm['logo_mime_type'];
if (file_exists($logobuff)) {
    $TP_dept_logo = $logobuff;
    # Check the logo dimensions
    $logosize = GetImageSize($logobuff);
    # If height > $logo_ht_limit, use limit
    if ($logosize[1] > $logo_ht_limit) {
        $TP_height = 'height=' . $logo_ht_limit;
    } else {
        $TP_height = 'height=' . $logosize[1];
    }
Esempio n. 5
0
 /**
  * Loads site settings page.
  *
  * @access	private
  * @param	nil
  * @return	void
  */
 function index()
 {
     $this->load->model('settings_model');
     //pr($_POST);
     //load validation library
     $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 Details
     if ($this->input->post('siteSettings')) {
         //Set rules
         $this->form_validation->set_rules('site_title', 'lang:site_title_validation', 'required|trim|xss_clean');
         $this->form_validation->set_rules('site_slogan', 'lang:site_slogan_validation', 'required|alpha_space|trim|xss_clean');
         $this->form_validation->set_rules('site_admin_mail', 'lang:site_admin_mail_validation', 'required|trim|valid_email|xss_clean');
         $this->form_validation->set_rules('site_language', 'lang:site_language_validation', 'required|trim|xss_clean');
         $this->form_validation->set_rules('offline_message', 'lang:offline_message_validation', 'required|trim|xss_clean');
         $this->form_validation->set_rules('offline_message', 'lang:offline_message_validation', 'required|trim|xss_clean');
         $this->form_validation->set_rules('forced_escrow', 'lang:forced_escrow_validation', 'required|trim|xss_clean');
         $this->form_validation->set_rules('forced_escrow', 'lang:forced_escrow_validation', 'required|trim|xss_clean');
         $this->form_validation->set_rules('payment_settings', 'lang:payment_settings_validation', 'numeric|required|trim|xss_clean');
         $this->form_validation->set_rules('featured_projects_limit', 'lang:featured_projects_limit_validation', 'numeric|required|trim|xss_clean');
         $this->form_validation->set_rules('urgent_projects_limit', 'lang:urgent_projects_limit_validation', 'numeric|required|trim|xss_clean');
         $this->form_validation->set_rules('latest_projects_limit', 'lang:latest_projects_limit_validation', 'numeric|required|trim|xss_clean');
         $this->form_validation->set_rules('provider_commission_amount', 'lang:provider_commission_amount_validation', 'numeric|required|trim|xss_clean');
         $this->form_validation->set_rules('featured_projects_amount', 'lang:featured_projects_amount_validation', 'numeric|required|trim|xss_clean');
         $this->form_validation->set_rules('urgent_projects_amount', 'lang:urgent_projects_amount_validation', 'numeric|required|trim|xss_clean');
         $this->form_validation->set_rules('hide_projects_amount', 'lang:hide_projects_amount_validation', 'numeric|required|trim|xss_clean');
         $this->form_validation->set_rules('joblist_projects_amount', 'lang:joblist_projects_amount_validation', 'numeric|required|trim|xss_clean');
         $this->form_validation->set_rules('joblist_validity_days', 'lang:joblist_validity_days_validation', 'numeric|required|trim|xss_clean');
         $this->form_validation->set_rules('file_manager_limit', 'lang:file_manager_limit_validation', 'numeric|required|trim|xss_clean');
         $this->form_validation->set_rules('base_url', 'lang:base_url_validation', 'required|trim|xss_clean');
         $this->form_validation->set_rules('featured_projects_amount_cm', 'lang:featured_projects_amount_cm_validation', 'numeric|required|trim|xss_clean');
         $this->form_validation->set_rules('urgent_projects_amount_cm', 'lang:urgent_projects_amount_cm_validation', 'numeric|required|trim|xss_clean');
         $this->form_validation->set_rules('hide_projects_amount_cm', 'lang:hide_projects_amount_cm_validation', 'numeric|required|trim|xss_clean');
         $this->form_validation->set_rules('private_projects_amount_cm', 'lang:private_projects_amount_cm_validation', 'numeric|required|trim|xss_clean');
         $this->form_validation->set_rules('twitter_username', 'lang:twitter_username_validation', 'alpha_numeric|trim|xss_clean');
         $this->form_validation->set_rules('twitter_password', 'lang:twitter_password_validation', 'alpha_numeric|trim|xss_clean');
         //$this->form_validation->set_rules('file','Upload File','callback_upload_file');
         $this->form_validation->set_rules('private_project_amount', 'lang:private_project_amount_validation', 'numeric|required|trim|xss_clean');
         if ($this->form_validation->run()) {
             $updateData = array();
             $updateData['site_title'] = $this->input->post('site_title');
             $updateData['site_language'] = $this->input->post('site_language');
             $updateData['twitter_username'] = $this->input->post('twitter_username');
             $updateData['twitter_password'] = $this->input->post('twitter_password');
             $updateData['site_slogan'] = $this->input->post('site_slogan');
             $updateData['site_admin_mail'] = $this->input->post('site_admin_mail');
             $updateData['site_status'] = $this->input->post('site_status');
             $updateData['offline_message'] = $this->input->post('offline_message');
             $updateData['forced_escrow'] = $this->input->post('forced_escrow');
             $updateData['payment_settings'] = $this->input->post('payment_settings');
             $updateData['featured_projects_limit'] = $this->input->post('featured_projects_limit');
             $updateData['urgent_projects_limit'] = $this->input->post('urgent_projects_limit');
             $updateData['latest_projects_limit'] = $this->input->post('latest_projects_limit');
             $updateData['provider_commission_amount'] = $this->input->post('provider_commission_amount');
             $updateData['featured_projects_amount'] = $this->input->post('featured_projects_amount');
             $updateData['urgent_projects_amount'] = $this->input->post('urgent_projects_amount');
             $updateData['joblist_projects_amount'] = $this->input->post('joblist_projects_amount');
             $updateData['joblist_validity_days'] = $this->input->post('joblist_validity_days');
             $updateData['hide_projects_amount'] = $this->input->post('hide_projects_amount');
             $updateData['private_project_amount'] = $this->input->post('private_project_amount');
             $updateData['featured_projects_amount_cm'] = $this->input->post('featured_projects_amount_cm');
             $updateData['urgent_projects_amount_cm'] = $this->input->post('urgent_projects_amount_cm');
             $updateData['hide_projects_amount_cm'] = $this->input->post('hide_projects_amount_cm');
             $updateData['private_project_amount_cm'] = $this->input->post('private_projects_amount_cm');
             $updateData['file_manager_limit'] = $this->input->post('file_manager_limit');
             $updateData['base_url'] = $this->input->post('base_url');
             $updateData['created'] = get_est_time();
             if (isset($this->outputData['file'])) {
                 $this->load->helper('file');
                 $Data['file'] = $this->outputData['file']['file_name'];
                 $thumb1 = $this->outputData['file']['file_path'] . 'h1_logo.jpg';
                 createLogo($this->outputData['file']['full_path'], $thumb1, 276, 79);
             }
             // pr($updateData);
             //Update Site Settings
             $this->settings_model->updateSiteSettings($updateData);
             //Notification message
             $this->session->set_flashdata('flash_message', $this->common_model->admin_flash_message('success', $this->lang->line('updated_success')));
             redirect_admin('siteSettings');
         }
     }
     //If - Form Submission End
     $this->outputData['settings'] = $this->settings_model->getSiteSettings();
     $this->load->view('admin/settings/siteSettings', $this->outputData);
 }