<?
function SV()
{
    $sv = new c_SV();
    return $sv;
}

class c_SV
{
    private $table_name = 'obj_site_mo_session_DTW';

    function get_SV_by_id($id, $options=array())
    { 
        $rec=array();
        
        $debug=$options['debug'];
        
        if ($id) { 
            $rec=execSQL_van('select pers.*, t.pkey as sign_key, t.obj_name as second_sign, '
                    . ' t.point_count as second_sign_point_count, t.time_sign as second_sign_time_sign, t.point_per_sec as second_sign_point_per_sec, '
                    . ' t2.obj_name as standart_sign, mos.signature_DTW_mp_Cost as second_DTW_mp_Cost, '
                    . ' t2.point_count as standart_sign_point_count, t2.time_sign as standart_sign_time_sign, t2.point_per_sec as standartd_sign_point_per_sec '
                    . ' from ' . $this->table_name . ' as t'
                    . ' inner join obj_site_mo_session as mos on mos.pkey = t.parent'
                    . ' inner join obj_site_personals as pers on pers.pkey = mos.member_id'
                    . ' inner join ' . $this->table_name . ' as t2 on t2.pkey = pers.sign_id'
                    . ' where t.pkey='. $id);
        }
        return $rec;
    }
    }

?>