Location: PHPKode > projects > MembersGear > membersgear/admin/admin_messages.php
<?php
  require_once "../config/config.php";
  include_once(CONFIG_DIR.'/admin_messagelist.php'); 
  require_once INCLUDE_DIR."/users_class.php"; 
  require_once PHYSICAL_DIR."/includes/system_get_set_options_class.php";
    
  $users=new users_class();
  $option_obj=new system_get_set_options_class();
  
  if($users->IsAdminhavePermission($_SESSION[SESSION_PREFIX.'Admin_UserID'],'Can configure messages')==false)
  {
        Redirect('admin_nopermission.php',true);  
  }  
  if($_POST)
   {
         
               // $lsclosed_account=addslashes($_POST['closed_account']);
                
                $lsnot_logedin=addslashes($_POST['not_login']);
                
                
                $lsclocked_account=addslashes($_POST['locked_account']);
                
                $lsbaned_site=addslashes($_POST['baned_system']);
                
                $laccount_not_verified=addslashes($_POST['account_not_verified']);
                
                $lsAdmin_no_per=addslashes($_POST['admin_no_per']);     
                
                $lsSystemError=addslashes($_POST['system_error']);     
           
                $lsexpired_account=addslashes($_POST['expired_account']);
           
                $lsinvalid_product=addslashes($_POST['invalid_group']);
           
                $lsno_such_user=addslashes($_POST['no_such_user']);
                
                $lsusername_password_not_match=addslashes($_POST['user_name_password_not_match']);
           
                $lswrong_pass=addslashes($_POST['wrong_pass']);
          
                $lsemail_not_verified=addslashes($_POST['email_not_verified']);
          
                $lsaccount_not_verified_appovered=addslashes($_POST['account_not_varified_approved']);
          
                $lsno_username1=addslashes($_POST['no_username1']);
          
                $lsuser_exists=addslashes($_POST['user_exists']);
          
                $lspassword=addslashes($_POST['password']);
          
                $lspasswords=addslashes($_POST['passwords']);
          
                $lserr_duplicate_email=addslashes($_POST['err_duplicate_email']);
          
                $lserr_invalid_security_code=addslashes($_POST['err_invalid_security_code']);
          
                $lsproduct_signup_thank_you =addslashes($_POST['product_signup_thank_you']);
              
            
                $option_obj->update_option('MESSAGE_USER_NOT_LOGEDIN',$lsnot_logedin);
                $_SESSION[SESSION_PREFIX.'MESSAGE_USER_NOT_LOGEDIN']= $lsnot_logedin;
                
                
                //$option_obj->update_option('MESSAGE_CLOSED_ACCOUNT',$lsclosed_account);
                
                $option_obj->update_option('MESSAGE_LOCKED_ACCOUNT',$lsclocked_account);
                $_SESSION[SESSION_PREFIX.'MESSAGE_LOCKED_ACCOUNT']= $lsclocked_account;
                
                
                $option_obj->update_option('MESSAGE_BANED_SYSTEM',$lsbaned_site);
                $_SESSION[SESSION_PREFIX.'MESSAGE_BANED_SYSTEM']= $lsbaned_site;
                
                
                $option_obj->update_option('MESSAGE_ACCOUNT_NOT_VARIFIED',$laccount_not_verified);
                $_SESSION[SESSION_PREFIX.'MESSAGE_ACCOUNT_NOT_VARIFIED']= $laccount_not_verified;
                
          
                $option_obj->update_option('MESSAGE_ADMIN_NO_PERMISSION',$lsAdmin_no_per);
                $_SESSION[SESSION_PREFIX.'MESSAGE_ADMIN_NO_PERMISSION']= $lsAdmin_no_per;
                
                
                $option_obj->update_option('MESSAGE_SYSTEM_ERROR',$lsSystemError);
                $_SESSION[SESSION_PREFIX.'MESSAGE_SYSTEM_ERROR']= $lsSystemError;
                
                
                $option_obj->update_option('MESSAGE_EXPIRED_ACCOUNT',$lsexpired_account);
                $_SESSION[SESSION_PREFIX.'MESSAGE_EXPIRED_ACCOUNT']= $lsexpired_account;
                
                
                $option_obj->update_option('MESSAGE_INVALID_PRODUCT',$lsinvalid_product);
                $_SESSION[SESSION_PREFIX.'MESSAGE_INVALID_PRODUCT']= $lsinvalid_product;
                
                
                $option_obj->update_option('MESSAGE_NO_SUCH_USER',$lsno_such_user);
                $_SESSION[SESSION_PREFIX.'MESSAGE_NO_SUCH_USER']= $lsno_such_user;
                
               
                $option_obj->update_option('MESSAGE_USERNAME_PASSWORD_DOES_NOT_MATCH',$lsusername_password_not_match);
                $_SESSION[SESSION_PREFIX.'MESSAGE_USERNAME_PASSWORD_DOES_NOT_MATCH']= $lsusername_password_not_match;
                
               
                $option_obj->update_option('MESSAGE_WRONG_PASSWORD',$lswrong_pass);
                $_SESSION[SESSION_PREFIX.'MESSAGE_WRONG_PASSWORD']= $lswrong_pass;
                
               
                $option_obj->update_option('MESSAGE_EMAIL_NOT_VARIFIED',$lsemail_not_verified);
                $_SESSION[SESSION_PREFIX.'MESSAGE_EMAIL_NOT_VARIFIED']= $lsemail_not_verified;
                
              
                $option_obj->update_option('MESSAGE_ACCOUNT_NOT_VARIFIED_APPOVERED',$lsaccount_not_verified_appovered);
                $_SESSION[SESSION_PREFIX.'MESSAGE_ACCOUNT_NOT_VARIFIED_APPOVERED']= $lsaccount_not_verified_appovered;
                
              
                $option_obj->update_option('MESSAGE_NO_USERNAME_NORMAL',$lsno_username1);
                $_SESSION[SESSION_PREFIX.'MESSAGE_NO_USERNAME_NORMAL']= $lsno_username1;
                
              
                $option_obj->update_option('MESSAGE_USER_EXIST',$lsuser_exists);
                $_SESSION[SESSION_PREFIX.'MESSAGE_USER_EXIST']= $lsuser_exists;
                
              
                $option_obj->update_option('MESSAGE_NO_PASSWORD_NORMAL',$lspassword);
                $_SESSION[SESSION_PREFIX.'MESSAGE_NO_PASSWORD_NORMAL']= $lspassword;
                
              
                $option_obj->update_option('MESSAGE_PASSWORD_NOT_MATCH',$lspasswords);
                $_SESSION[SESSION_PREFIX.'MESSAGE_PASSWORD_NOT_MATCH']= $lspasswords;
                
            
                $option_obj->update_option('MESSAGE_DUPLICATE_EMAIL',$lserr_duplicate_email);
                $_SESSION[SESSION_PREFIX.'MESSAGE_DUPLICATE_EMAIL']= $lserr_duplicate_email;
                
              
                $option_obj->update_option('MESSAGE_INVALID_SECURITY_CODE',$lserr_invalid_security_code);
                $_SESSION[SESSION_PREFIX.'MESSAGE_INVALID_SECURITY_CODE']= $lserr_invalid_security_code;
                
            
                $option_obj->update_option('MESSAGE_PRODUCT_SIGNUP_THANK_YOU',$lsproduct_signup_thank_you);
                $_SESSION[SESSION_PREFIX.'MESSAGE_PRODUCT_SIGNUP_THANK_YOU']= $lsproduct_signup_thank_you;
                
                
                $message->SetMessage('Message configuration Updated Successfully.'); 
                Redirect('admin_messages.php',true);
            
             
   }
   else
    {    

        $smarty->assign('msg',$message->GetMessage()); 
        if(isset($_GET['err']))
         {
            if($_GET['err']=="true")
               $smarty->assign('err','true'); 
         }
         $smarty->display('admin_messages.tpl');
    }
  ?>
Return current item: MembersGear