Location: PHPKode > projects > MembersGear > membersgear/member/user_support.php
<?php
  
 require_once "../config/config.php"; 
 require_once INCLUDE_DIR."/users_signup_class.php";
require_once INCLUDE_DIR."/users_class.php";
$users=new users_class();
  
  if(IS_USER_SUPPORT_LINK_VISIBLE == 'false')
  {
      $message->SetMessage('Sorry support functionality is disable by Administrator.');
      Redirect('user_edit_profile.php');
  }
     
 //**********************************************Begin Page code**********************************************     
 require_once INCLUDE_DIR."/phpmailer/Functions.php";
 
 $objUserSClass = new users_signup_class();
 
 $userQuery = 'SELECT concat(firstname,\' \',lastname) as fullname,email FROM '.TABLE_PREFIX.'users WHERE id=?';
 $lsValues = array($_SESSION[SESSION_PREFIX.'UserID']);
 $userData = $objUserSClass->View($userQuery,$lsValues,null);
 
 //print_r($userData);
 
 switch($_action)
 {
        case 'sendmail':
                $lsEmailSubject = '('.WEB_TITLE.' Support Request)-'.$_POST['txtSubject'];
                
                if(sendSupportMail($userData[0]['email'],$userData[0]['fullname'],$lsEmailSubject,$_POST['txtDescription']))
                {
                    //Redirect('user_default_page.php?msg=Support email send successfully.');      
                    $message->SetMessage('Support e-mail send successfully.');
                }
                else
                {
                    //Redirect('user_default_page.php?msg=Some error occure while sending support email.');
                    $message->SetMessage('Some error occure while sending support e-mail.');
                }
                //echo $message->GetMessage();
                //die;
                Redirect('user_default_page.php');
                break;
        default:
                $smarty->assign('UserName',$userData[0]['fullname']);
                $smarty->assign('Email',$userData[0]['email']);
                
                  
 }         
             
              $affiliateSettings=$users->getAffiliateSettings($_SESSION[SESSION_PREFIX."UserID"]); 
                if(is_array($affiliateSettings))
                   $smarty->assign('affiliate_text','Your Affiliate Link');     
               else
                 $smarty->assign('affiliate_text','Become An Affiliate'); 
              
             $SUPPORTPAGE = $smarty->fetch('user_support.tpl'); 
     
//**********************************************End Page code**********************************************
//Common Line

$smarty->assign('USER_CONTENT',     $SUPPORTPAGE); 

$smarty->display('user_page_main.tpl');

?>
Return current item: MembersGear