File: D:/HostingSpaces/SBogers59/ferrumbv.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 .= '/> ';
$output .= $this->_info['lang']['active'] . '<input type="radio" name="' . $this->_info['name'] .'" value="1"';
if($active == 1) $output .= 'checked';
$output .= '/>';
return $output;
}
}