function display()
 {
     global $db;
     $focus = new Tour();
     $focus->retrieve($_GET['record']);
     if (isset($_POST['department']) && isset($_POST['department']) != '') {
         $data = $focus->loadAreaByDepartment($_POST['department']);
         if (count($data) > 0) {
             $area_options .= '<option value ="">none</option>';
             foreach ($data as $row) {
                 $selected = '';
                 if ($focus->area == $row['id']) {
                     $selected = 'selected="selected"';
                 }
                 $area_options .= "<option data-code='" . $row['code'] . "' data-country='" . $row['country_id'] . "' value='" . $row['id'] . "' " . $selected . ">" . $row['name'] . '-' . $row['country'] . "</option>";
             }
             echo $area_options;
         }
     }
 }
Beispiel #2
0
$ss->assign("MODIFIED_BY", $focus->modified_by_name);
if (empty($focus->assigned_user_id) && empty($focus->id)) {
    $focus->assigned_user_id = $current_user->id;
}
if (empty($focus->assigned_name) && empty($focus->id)) {
    $focus->assigned_user_name = $current_user->full_name;
}
$ss->assign("ASSIGNED_USER_OPTIONS", get_select_options_with_id(get_user_array(TRUE, "Active", $focus->assigned_user_id), $focus->assigned_user_id));
$ss->assign("ASSIGNED_USER_NAME", $focus->assigned_user_name);
$ss->assign("ASSIGNED_USER_ID", $focus->assigned_user_id);
$ss->assign('CALENDAR_DATEFORMAT', $timedate->get_cal_date_format());
$ss->assign('USER_DATEFORMAT', $timedate->get_user_date_format());
/***
 * Code generate ra tour area
 */
$areas = $focus->loadAreaByDepartment($focus->deparment);
//$area_options = "<option data-code='' value=''>--None--</option>";
$area_pattern = "";
$frame_types_pattern = "F|H|O";
// fix bug 1567
/*foreach ($areas as $value) {
    $selected = "";
    if($value['id']==$focus->area){
    $selected = "selected";
    }
    $area_options .= "<option $selected data-code='" . $value['code'] . "' data-country='" . $value['country_id'] . "' value='" . $value['id'] . "'>" . $value['name'].' - '.$value['country'] . "</option>";


    } */
$country_id = '';
if (count($areas) > 0) {