HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers18/decoockpit.nl/wwwroot/kms/lib/form/types/field_type_active.class.php
<?php
/**
 * field_type_active.class.php
 * Created by Komma Mediadesign.
 * Author: mike
 * Date: 4/3/13
 */

class Field_Type_Active extends Form_Field
{
    public function construct(){}

    public function createInput()
    {
        if( ! isset($_SESSION[$this->_info['form_name']. '_data'][$this->_info['name']]))
        {
            $active = 1;
        }
        else
        {
            $active = $_SESSION[$this->_info['form_name']. '_data'][$this->_info['name']];
        }

        $output = '';
        $output .= $this->_info['lang']['non_active'] . '<input type="radio" name="' . $this->_info['name'] .'" value="0" ';
        if($active == 0) $output .= 'checked';
        $output .= '/>&nbsp;&nbsp;&nbsp;';
        $output .= $this->_info['lang']['active'] . '<input type="radio" name="' . $this->_info['name'] .'" value="1"';
        if($active == 1) $output .= 'checked';
        $output .= '/>';

        return $output;
    }
}