<?php $CMD_TMPL_NAME='optioninfo'; $o_id=TGET('o_id'); $cs_id=TGET('cs_id'); $mb_id=current_mb_id(); $op=TGET('op'); $DBConn->connect(true); $option=db_load_option_by_id($DBConn,$o_id,true,true); $course=$cs_id?db_load_course_by_id($DBConn,$cs_id):array(); $localCurrencyNameMap=loadLocalCurrencyNameMap(); $USE_THEME_BY_USER_ID=$option['mb_id_owner']; $dataset+=$option; $dataset+=$course; $dataset['o_price_base']=format_money($dataset['o_price_base'],$course['cs_currency']); $dataset['o_price_step']=format_money($dataset['o_price_step'],$course['cs_currency']); $dataset['DETAIL']=array(0); $dataset['CONFIRMING']=array(0); $dataset['THUMBNAIL']=$dataset['o_thumbnail_url']?array(0):array(); $dataset['THUMBNAIL-NONE']=$dataset['o_thumbnail_url']?array():array(0); $dataset['IS-OWNER']=$option['mb_id_owner']==$mb_id?array(0):array(); $dataset['RETURN-COURSE']=$op=='course.detail'?array(0):array(); $dataset['RETURN-MANAGE']=!$dataset['RETURN-COURSE'] && $dataset['IS-OWNER']?array(0):array(); $dataset['local_currency_unit']=mapCurrencyLocalName($localCurrencyNameMap,$course['cs_currency']); if ($op=='course.detail') turnoff_mainmenu(); ?>