<?php require_once('includes/requirecompere.inc.php'); $CMD_TMPL_NAME='place.compose'; $plc_id=0+TGET('plc_id'); $mb_id=current_mb_id(); if (!$plc_id) { redirect("./"); return; } $DBConn->connect(true); $plcinfo=db_load_place($DBConn,$plc_id,$mb_id); $mbinfo=db_load_compere($DBConn,$mb_id); if (!$plcinfo || $plcinfo['mb_id_owner']!=$mb_id) { redirect("./"); return; } $dataset['MODIFY']=array(0); $dataset['ENTERING']=array(0); $countrymap=loadCountryNames(); $countries=array_deassociate($countrymap,'code','name'); array_unshift($countries,array('code'=>'','name'=>'')); if (TGET('op')=='revise' && $_SESSION['reserv.inputcache.domain']=='place') { $dataset+=$_SESSION['reserv.inputcache.data']; $dataset+=$_SESSION['reserv.inputcache.errorareas']; array_assoc_set_iif( $countries, 'code', $dataset['plc_country'], 'SELECTED', array(0), 'UNSELECTED', array(0) ); $dataset['country_name']=$countrymap[$dataset['plc_country']]; } else { $dataset+=$plcinfo; array_assoc_set_iif( $countries, 'code', $plcinfo['plc_country'], 'SELECTED', array(0), 'UNSELECTED', array(0) ); } $dataset['COUNTRIES']=$countries; ?>