noalyss  Version-6.7.2
Public Member Functions
Menu_Ref Class Reference
Inheritance diagram for Menu_Ref:
Menu_Ref_sql

Public Member Functions

 format_code ()
 verify ()

Detailed Description

Definition at line 25 of file class_menu_ref.php.


Member Function Documentation

Definition at line 27 of file class_menu_ref.php.

References trim().

Referenced by verify().

    {
        $this->me_code=strtoupper($this->me_code);
        $this->me_code=trim($this->me_code);
        $this->me_code=str_replace('<','',$this->me_code);
        $this->me_code=str_replace('>','',$this->me_code);
    }

Reimplemented from Menu_Ref_sql.

Definition at line 34 of file class_menu_ref.php.

References $e, alert(), cn, format_code(), and trim().

    {
                try
                {
        parent::verify();
        if ( $this->me_code == -1)
        {
            $this->format_code();
            if ( $this->cn->get_value("select count(*) from menu_ref where me_code=$1",array($this->me_code)) > 0)
                    throw new Exception ('Doublon');
            if (trim($this->me_code)=='')
                    throw new Exception ('Ce menu existe déjà');
        }
        if ( ! file_exists('../include/'.$this->me_file)) throw new Exception ('Ce menu fichier '.$this->me_file." n'existe pas");

        return 0;
                } catch (Exception $e)
                {
                        alert($e->getMessage());
                        return -1;
                }
    }

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations