コード例 #1
0
 function process()
 {
     global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings, $app_strings;
     $mod_strings = return_module_language($current_language, 'GroupPrograms');
     parent::process();
     if ($this->viaAJAX) {
         // override for ajax call
         $this->ss->assign('saveOnclick', "onclick='if(check_form(\"toursQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"tours\"); else return false;'");
         $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_groupprograms\")';");
         //$this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_tours\")';");
     }
     $this->ss->assign('viaAJAX', $this->viaAJAX);
     $this->ss->assign('APP', $app_strings);
     $this->javascript = new javascript();
     $this->javascript->setFormName('MadeTourQuickCreate');
     $focus = new GroupProgram();
     $this->javascript->setSugarBean($focus);
     $this->javascript->addAllFields('');
     $json = getJSONobj();
     if (!empty($focus->status)) {
         $this->ss->assign('STATUS_DOM', get_select_options($app_list_strings['groupprogram_status_dom'], $focus->status));
     } else {
         $this->ss->assign('STATUS_DOM', get_select_options($app_list_strings['groupprogram_status_dom'], ''));
     }
     $git_popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'MadeTourQuickCreate', 'field_to_name_array' => array('id' => 'group_id', 'name' => 'group_name'));
     $this->ss->assign('gits_popup_request_data', json_encode($git_popup_request_data));
     // worksheet popup request data
     $worksheet_popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'MadeTourQuickCreate', 'field_to_name_array' => array('id' => 'worksheet_id', 'name' => 'worksheet'));
     $this->ss->assign('worksheet_popup_request_data', json_encode($worksheet_popup_request_data));
     // pick up airport guide
     $popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'MadeTourQuickCreate', 'field_to_name_array' => array('id' => 'guide_pick_up_at_airport_id', 'name' => 'guide_pick_up_at_airport', 'phone' => 'pick_up_phone'));
     $this->ss->assign('pick_up_airport', json_encode($popup_request_data));
     // insurance_popup_request_data
     $insurance_popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'MadeTourQuickCreate', 'field_to_name_array' => array('id' => 'insurance_id', 'name' => 'insurance'));
     $this->ss->assign('insurance_popup_request_data', json_encode($insurance_popup_request_data));
     // airlines_tickets_popup_request_data
     $airlines_tickets_popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'MadeTourQuickCreate', 'field_to_name_array' => array('id' => 'airlines_tickets_id', 'name' => 'airlines_tickets'));
     $this->ss->assign('airlines_tickets_popup_request_data', json_encode($airlines_tickets_popup_request_data));
     // operator
     $popup_operator_request_data = array('call_back_function' => 'set_return', 'form_name' => 'MadeTourQuickCreate', 'field_to_name_array' => array('id' => 'assigned_user_id', 'user_name' => 'operator', 'phone_mobile' => 'operator_phone'));
     $this->ss->assign('operator_users', json_encode($popup_operator_request_data));
     $popup_giude_request_data = array('call_back_function' => 'set_return', 'form_name' => 'MadeTourQuickCreate', 'field_to_name_array' => array('id' => 'guide_id', 'name' => 'guide', 'phone' => 'guide_phone'));
     $this->ss->assign('guide_users', json_encode($popup_giude_request_data));
     // leader popup request data
     $leader_popup_data_request = array("call_back_function" => "set_return", "form_name" => "MadeTourQuickCreate", 'field_to_name_array' => array('id' => 'leader_id', 'name' => 'team_leader', 'phone' => 'leader_phone'));
     $this->ss->assign('leader_popup_request_data', json_encode($leader_popup_data_request));
     // tour popup
     $tour_popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'MadeTourQuickCreate', 'field_to_name_array' => array('id' => 'tour_id', 'name' => 'tour_name', 'start_date' => 'start_date_group', 'end_date' => 'end_date_group'));
     $this->ss->assign('tour_popup_request_data', $json->encode($tour_popup_request_data));
     $this->ss->assign('additionalScripts', $this->javascript->getScript(false));
 }
コード例 #2
0
 function setup($parentFieldArray, $vardef, $displayParams, $tabindex, $twopass = true)
 {
     global $app_list_strings, $app_strings;
     parent::setup($parentFieldArray, $vardef, $displayParams, $tabindex, $twopass);
     $this->ss->assign('APP', $app_strings);
     $this->ss->assign('types', get_select_options_with_id($app_list_strings['aor_scheduled_report_schedule_types'], ''));
     $weekdays = $this->getWeekDays();
     $this->ss->assign('weekday_vals', json_encode($weekdays));
     $this->ss->assign('weekdays', get_select_options($weekdays, ''));
     $days = $this->getDays();
     $this->ss->assign('days', get_select_options($days, ''));
     function padNumbers($x)
     {
         return str_pad($x, 2, '0', STR_PAD_LEFT);
     }
     $minutes = array_map('padNumbers', range(0, 59));
     $hours = array_map('padNumbers', range(0, 23));
     $this->ss->assign('minutes', get_select_options($minutes, ''));
     $this->ss->assign('hours', get_select_options($hours, ''));
 }
コード例 #3
0
ファイル: student_form_view.php プロジェクト: nwtug/academia
                  
                  <tr>
                    <td nowrap="nowrap" class="label"> Class of Admission :<?php 
echo $indicator;
?>
 </td>
                    <td class="field" nowrap>
                      <?php 
if (!empty($isview) || !empty($i)) {
    echo "<span class='viewtext'>" . get_class_title($this, $studentdetails['admissionclass']) . "</span><input name='admissionclass' type='hidden' value='" . $studentdetails['admissionclass'] . "' />";
} else {
    echo get_required_field_wrap($requiredfields, 'admissionclass');
    ?>

                      <select name="admissionclass" id="admissionclass"  class="selectfield"> <?php 
    echo get_select_options($classes, 'id', 'class', !empty($studentdetails['admissionclass']) ? $studentdetails['admissionclass'] : '', 'Y', 'Select Class');
    ?>

                    </select>
                      <?php 
    echo get_required_field_wrap($requiredfields, 'admissionclass', 'end');
}
?>

                    </td>
                  </tr>
                  
                  <tr>
                    <td valign="top" nowrap="nowrap" class="label" style="padding-top:13px">Student No. :<?php 
echo $indicator;
?>
コード例 #4
0
ファイル: dso.php プロジェクト: newwavetechug/gpp
             <div class="col-md-4">
             <div class="col-md-12">
                <label class="control-label">  Rereference  Number </label>
                <div class="controls">
                    <input type="text" name="procurement_ref_no" value=""  class="input-medium span12">

                </div>
            </div>

            <div class="col-md-12" style="margin-top:5px; padding-right:5px;  ">

                <label class="control-label">Entity</label>
                <div class="controls ">
                    <select id="procurement-ref-no" class="col-md-6" name="entity" tabindex="1" style=" ">
                        <?php 
echo get_select_options($pdes, 'pdeid', 'pdename', !empty($formdata['entity']) ? $formdata['entity'] : '');
?>
                    </select>
                </div>
            </div>
         </div>


       <div class="col-md-4">
            <div class="col-md-12">
                <label class="control-label">Search by Dates:</label>
                <div class="controls">
                    <div class="input-append date date-picker col-md-6" style="padding-left:0px;" data-date="<?php 
echo !empty($formdata['date_posted_from']) ? custom_date_format('Y-m-d', $formdata['date_posted_from']) : date('Y-m-d');
?>
" data-date-format="yyyy-mm-dd" data-date-viewmode="days">
コード例 #5
0
ファイル: view.edit.php プロジェクト: sysraj86/carnivalcrm
 function assign()
 {
     global $app_list_strings;
     $content = $this->bean->cost_detail;
     $content = base64_decode($content);
     $content = json_decode($content);
     $this->ev->ss->assign('tour_name', $_REQUEST['tour_name']);
     $this->ev->ss->assign('tour_id', $_REQUEST['tour_id']);
     $this->ev->ss->assign('is_tour', $_REQUEST['is_tour']);
     $html = '';
     if ($this->bean->department == 'dos') {
         $cost_detail = $content->dos_cost_detail;
         if (count($cost_detail) > 0) {
             foreach ($cost_detail as $val) {
                 $html .= '<tr height="15">';
                 $html .= '<td class="tdborder"><select name="dos_hotel_standard[]" id="dos_hotel_standard">' . get_select_options($app_list_strings['quotes_dos_hotel_standard'], $val->dos_hotel_standard) . '</select></td>';
                 $html .= '<td class="tdborder"><input type="text" class="ticket_cost" name="ticket_cost[]" id="tickect_cost" value="' . format_number($val->ticket_cost) . '" /></td>';
                 $html .= '<td class="tdborder"><input type="text" class="facility_cost" name="facility_cost[]" id="facility_cost" value="' . format_number($val->facility_cost) . '"  /></td>';
                 $html .= '<td class="tdborder"><input type="text" class="single_room" name="single_room[]" id="single_room"  value="' . format_number($val->single_room) . '" /></td>';
                 $html .= '<td class="tdborder"><input type="text" class="foreign" name="foreign[]" id="foreign" value="' . format_number($val->foreign) . '"  /></td>';
                 $html .= '<td class="tdborder"><input type="button" class="btnAddRow" value="Add Row" /> &nbsp; <input type="button" class="btnDeleteRow" value="Delete Row"/></td>';
                 $html .= '</tr>';
             }
         }
         $this->ev->ss->assign('doshtml', $html);
         $this->ev->ss->assign('countdos', count($cost_detail));
     }
     if ($this->bean->department == 'ib') {
         $cost_detail_head = $content->cost_detail_head;
         $this->ev->ss->assign('group_site1', $cost_detail_head->group_site1);
         $this->ev->ss->assign('group_site2', $cost_detail_head->group_site2);
         $this->ev->ss->assign('group_site3', $cost_detail_head->group_site3);
         $this->ev->ss->assign('group_site4', $cost_detail_head->group_site4);
         $this->ev->ss->assign('group_site5', $cost_detail_head->group_site5);
         $this->ev->ss->assign('group_site6', $cost_detail_head->group_site6);
         $ib_cose_detai = $content->ib_cose_detai;
         if (count($ib_cose_detai) > 0) {
             foreach ($ib_cose_detai as $val) {
                 $html .= '<tr height="15">';
                 $html .= '<td class="tdborder"><select name="ib_hotel_standard[]" id="ib_hotel_standard">' . get_select_options_with_id($app_list_strings['quotes_ib_hotel_standard'], $val->ib_hotel_standard) . '</select></td>';
                 $html .= '<td class="tdborder"><input type="text" name="group_site1_cost[]" id="group_site1_cost" value="' . format_number($val->group_site1_cost) . '"/></td>';
                 $html .= '<td class="tdborder"><input type="text" name="group_site2_cost[]" id="group_site2_cost" value="' . format_number($val->group_site2_cost) . '"/></td>';
                 $html .= '<td class="tdborder"><input type="text" name="group_site3_cost[]" id="group_site3_cost" value="' . format_number($val->group_site3_cost) . '"/></td>';
                 $html .= '<td class="tdborder"><input type="text" name="group_site4_cost[]" id="group_site4_cost" value="' . format_number($val->group_site4_cost) . '"/></td>';
                 $html .= '<td class="tdborder"><input type="text" name="group_site5_cost[]" id="group_site5_cost" value="' . format_number($val->group_site5_cost) . '"/></td>';
                 $html .= '<td class="tdborder"><input type="text" name="group_site6_cost[]" id="group_site6_cost" value="' . format_number($val->group_site6_cost) . '"/></td>';
                 $html .= '<td class="tdborder"><input type="button" class="btnAddRow" value="Add Row" /> &nbsp; <input type="button" class="btnDeleteRow" value="Delete Row"/></td>';
                 $html .= '</tr>';
             }
         }
         $this->ev->ss->assign('ibhtml', $html);
         $this->ev->ss->assign('countib', count($ib_cose_detai));
     }
     if ($this->bean->department == 'ob') {
         $ob_cost_detail = $content->ob_cost_detail;
         $this->ev->ss->assign('ob_price', $ob_cost_detail->price);
         $this->ev->ss->assign('ob_tax', $ob_cost_detail->tax);
         $this->ev->ss->assign('ob_currency', get_select_options_with_id($app_list_strings['currency_dom'], $ob_cost_detail->currency));
         $this->ev->ss->assign('ob_total_price', $ob_cost_detail->total_price);
         $this->ev->ss->assign('price_note', $ob_cost_detail->price_note);
     }
 }
コード例 #6
0
ファイル: manageusers.php プロジェクト: Bakyenga/kyengs
                  </table></td>
                  </tr>
                
                <tr>
                  <td>Permission Group:*</td>
                  <td><table border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td><select name="usertype" class="textfield" id="usertype">
                        <?php 
if (isset($companyuserdetails['usertype'])) {
    $selected = $companyuserdetails['usertype'];
} else {
    $selected = '';
}
$user_rights_templates = $this->db->query($this->Query_reader->get_query_by_code('get_user_rights_templates', array('isinternal' => 'N')));
echo get_select_options($user_rights_templates->result_array(), 'rightsname', 'displayname', $selected);
?>
                        </select></td>
                        <td><input name="layerid" type="hidden" id="layerid" value="rights_div" />&nbsp;</td>
                        <td><input name="viewrights" type="button" class="button" id="viewrights" value="View Rights" onclick="updateDropDownDiv('usertype', 'none', 'rights_div', '<?php 
echo base_url() . "index.php/companyprofile/users/view_rights";
?>
','Select a template to view its assigned rights.')"/></td>
                      </tr>
                  </table></td>
                </tr>
                
                <tr>
                  <td><?php 
if (isset($id)) {
    ?>
コード例 #7
0
"/></td>
                    <td>&nbsp;</td>
                    <td valign="top">Location: </td>
                    <td valign="top"><select name="stateorprovince" id="stateorprovince" class="textfield">
                      <?php 
if (isset($employeedetails)) {
    $selected = trim($employeedetails['stateorprovince']);
} else {
    $selected = '';
}
$statearray = array();
$originalarray = get_all_states();
foreach ($originalarray as $state) {
    array_push($statearray, array('state' => $state));
}
echo get_select_options($statearray, 'state', 'state', $selected);
?>
                                        </select></td>
                  </tr>
                  <tr>
                    <td nowrap="nowrap">Gender:</td>
                    <td valign="top"><table border="0" cellpadding="4" cellspacing="0">
                      <tr>
                        <td nowrap="nowrap"><input name="gender_radio" id="female" type="radio" value="Female" onclick="passFormValue('female', 'gender', 'radio');" <?php 
if (isset($employeedetails) && $employeedetails['gender'] == 'Female') {
    echo " checked";
}
?>
/></td>
                        <td nowrap="nowrap">Female </td>
                        <td nowrap="nowrap"><input name="gender_radio" id="male" type="radio" value="Male" onclick="passFormValue('male', 'gender', 'radio');" <?php 
コード例 #8
0
ファイル: createjob_view.php プロジェクト: Bakyenga/kyengs
    echo $jobdetails['jobtitle'];
}
?>
">
                      <?php 
if (isset($jobdetails)) {
    $selected = trim($jobdetails['jobtitle']);
} else {
    $selected = '';
}
$jobarray = array();
$originalarray = get_all_jobs();
foreach ($originalarray as $jobs) {
    array_push($jobarray, array('job' => $jobs));
}
echo get_select_options($jobarray, 'job', 'job', $selected);
?>
                                        </select></td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td><input name="saveandnew" type="submit" id="saveandnew" value="Save &amp; New"  class="button"/>
                      <input name="save" type="submit" id="save" value="Save"  class="button"/></td>
                  </tr>
                </table></td>
			    </tr>
			  
コード例 #9
0
ファイル: add_ons.php プロジェクト: newwavetechug/gpp
#*********************************************************************************
# Displays forms used in AJAX when processing data on other forms without
# reloading the whole form.
#*********************************************************************************
#===============================================================================================
# Display for simple message results
#===============================================================================================
if (!empty($area) && in_array($area, array('save_recover_settings_results', 'add_delivery_data'))) {
    $table_HTML .= format_notice($msg);
} else {
    if (!empty($area) && $area == 'combo_list') {
        if (!empty($page_list)) {
            if (empty($select_text)) {
                $select_text = 'Select';
            }
            $table_HTML .= get_select_options($page_list, $value_field, $text_field, '', 'Y', $select_text);
        } else {
            $table_HTML .= "<option value=''>No items to show!</option>";
        }
    } else {
        if (!empty($area) && $area == 'users_list') {
            if (!empty($page_list)) {
                $table_HTML .= '<table class="table table-striped table-hover">' . '<thead>' . '<tr>' . '<th width="5%"></th>' . '<th>Name</th>' . '<th class="hidden-480">PDE</th>' . '<th class="hidden-480">User Group</th>' . '<th class="hidden-480">Email Address</th>' . '<th class="hidden-480">Phone No.</th>' . '<th>Date Added</th>' . '</tr>' . '</thead>' . '</tbody>';
                foreach ($page_list as $row) {
                    #user's role(s)
                    $user_roles_arr_text = get_user_roles_text($this, $row['userid'], $usergroups);
                    $user_roles_text = !empty($user_roles_arr_text) ? implode(', ', $user_roles_arr_text) : '<i>NONE</i>';
                    $delete_str = '<a title="Delete user details" href="javascript:void(0);" onclick="confirmDeleteEntity(\'' . base_url() . 'admin/delete_user/i/' . encryptValue($row['userid']) . '\', \'Are you sure you want to delete this user?\\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.\')"><i class="icon-trash"></i></a>';
                    $edit_str = '<a title="Edit user details" href="' . base_url() . 'user/load_user_form/i/' . encryptValue($row['userid']) . '"><i class="icon-edit"></i></a>';
                    $table_HTML .= '<tr>' . '<td>' . $delete_str . '&nbsp;&nbsp;' . $edit_str . '</td>' . '<td>' . (!empty($row['prefix']) ? $row['prefix'] . ' ' : '') . $row['firstname'] . ' ' . $row['lastname'] . '</td>' . '<td>' . $row['pdename'] . '</td>' . '<td>' . $user_roles_text . '</td>' . '<td>' . $row['emailaddress'] . '</td>' . '<td>' . $row['telephone'] . '</td>' . '<td>' . custom_date_format('d M, Y', $row['dateadded']) . '</td>' . '</tr>';
                }
コード例 #10
0
ファイル: grading_list_view.php プロジェクト: nwtug/academia
?>
</div>
                </li>
                <li>
                	<div class="label">Term:</div>
                	<div class="label_value"><?php 
echo $term['term'] . ', ' . $term['year'];
?>
</div>
                </li>
                
                <li>
                	<div class="label">Exam:</div>
                	<div class="label_value">
					<select name="term" id="select-marksheet-exam"  class="selectfield"> <?php 
echo get_select_options($exams, 'id', 'exam', '', 'Y', 'Select exam');
?>

                    </select>
                    <input type="hidden" id="cste" value="<?php 
echo $class['id'] . '^' . $subject['id'] . '^' . $term['id'];
?>
" />
                    </div>
                </li>
                <div style="clear: both;"></div>
            </ul>
        </td>
  	 </tr>
      <tr>
        <td align="left" nowrap="nowrap" valign="top">
コード例 #11
0
ファイル: CreateCustomLayout.php プロジェクト: Pengzw/c3crm
    $output .= '<h3 id="myModalLabel">' . $mod_strings['LBL_ADD_LAYOUT'] . '</h3>';
}
$output .= '</div>
                <div class="modal-body">
                    <table class="table-consdened">
                          <tr>
                            <td ><strong>' . $mod_strings['LBL_MANDATORY'] . '</strong></td>
                            <td><input name="fldMandatory" value="1" ' . $fieldmandatory . ' type="checkbox" ></td>
                        </tr>
                        <tr>
                            <td><strong>' . $mod_strings['FIELD_LABEL'] . '</strong></td>
                            <td><input type="text" size=20 name="fieldlabel" value="' . $fieldlabel . '" ></td>
                        </tr>
                        <tr>
                            <td ><strong>' . $mod_strings['LBL_LAYOUT_LABEL'] . '</strong></td>
                            <td width="50%" align="left"><select name="blockid">' . get_select_options($blockArr, $blockid) . '</select></td>
                        </tr>
                      
                        <tr>
                            <td ><strong>' . $mod_strings['LBL_BLOCK_ORDER'] . '</strong></td>
                            <td><input type="text" size=20 name="order" value="' . $order . '" ></td>
                        </tr>
                     </table>
                </div>
                <div class="modal-footer">
                    <button class="btn pull-left btn-small btn-primary" data-dismiss="modal" aria-hidden="true">
                    <i class ="icon-arrow-left icon-white"></i> ' . $app_strings['LBL_CANCEL_BUTTON_LABEL'] . '</button>
                    <button class="btn btn-small btn-success pull-right" type="submit"><i class="icon-ok icon-white"></i> ' . $app_strings['LBL_SAVE_BUTTON_LABEL'] . '</button>
                </div>
                </from>
              </div>';
コード例 #12
0
}
$xtpl->assign('RETURN_MODULE', 'Schedulers');
$xtpl->assign('RETURN_ID', $focus->id);
$xtpl->assign('RETURN_ACTION', 'DetailView');
// module specific
$xtpl->assign('ID', $focus->id);
$xtpl->assign('NAME', $focus->name);
if ($focus->catch_up == 1) {
    $xtpl->assign('CATCH_UP_CHECKED', 'CHECKED');
}
// job
if (strstr($focus->job, 'url::')) {
    $job_url = str_replace('url::', '', $focus->job);
} else {
    $job_url = 'http://';
}
$xtpl->assign('JOB_FUNCTION', $job_function);
$xtpl->assign('JOB_URL', $job_url);
$xtpl->assign('JOB_INTERVAL', $focus->job_interval);
$xtpl->assign('TIME_FROM', $focus->time_from);
$xtpl->assign('TIME_TO', $focus->time_to);
$xtpl->assign('STATUS_OPTIONS', get_select_options($mod_strings['scheduler_status_dom'], $focus->status));
$xtpl->assign('MINS', $exInterval[0]);
$xtpl->assign('HOURS', $exInterval[1]);
$xtpl->assign('DAY_OF_MONTH', $exInterval[2]);
$xtpl->assign('MONTHS', $exInterval[3]);
$xtpl->assign('DAY_OF_WEEK', $exInterval[4]);
$xtpl->assign('ROLLOVER', $email->rolloverStyle);
$xtpl->parse("main");
$xtpl->out("main");
//$focus->displayCronInstructions();
コード例 #13
0
ファイル: credit_form_view.php プロジェクト: nwtug/academia
                                            </td></tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top" nowrap="nowrap" class="label" style="padding-top:13px">Fee :</td>
                                <td class="field" nowrap>
                                    <?php 
if (!empty($isview)) {
    echo "<span class='viewtext'>" . $feedetails['fee'] . "</span>";
} else {
    echo get_required_field_wrap($requiredfields, 'fee');
    ?>

                                        <select name="fee" id="frequency"  class="selectfield"> <?php 
    echo get_select_options($fees, 'id', 'fee', !empty($formdata['fee']) ? $formdata['fee'] : '', 'Y', 'Select fee');
    ?>

                                        </select>
                                        <?php 
    echo get_required_field_wrap($requiredfields, 'fee', 'end');
}
?>

                                </td>
                            </tr>
                            <tr>
                                <td valign="top" nowrap="nowrap" class="label" style="padding-top:13px">Amount :<?php 
echo $indicator;
?>
</td>
コード例 #14
0
 function display()
 {
     $focus = new C_Reports();
     global $db;
     global $app_strings;
     global $app_list_strings;
     global $mod_strings;
     global $currentModule;
     $ketqua = '';
     $export = '';
     $file_name = '';
     $ss = new Sugar_Smarty();
     $ss->assign("APP", $app_strings);
     $ss->assign("MOD", $mod_strings);
     $ss->assign('CURRENT_MODULE', $currentModule);
     $ss->assign('KY', get_select_options($app_list_strings['tinhdiem_ky_dom'], ''));
     $ss->assign('THANG', get_select_options($app_list_strings['tinhdiem_thang_dom'], ''));
     $ss->assign('DEPARTMENT', get_select_options($app_list_strings['report_deparment_dom'], 'any'));
     if ((isset($_REQUEST['tinhdiem']) || isset($_REQUEST['tinhdiemsales']) || isset($_REQUEST['tinhdiemtelesales']) || isset($_REQUEST['xephang']) || isset($_REQUEST['xephangsales']) || isset($_REQUEST['xephangtelesales']) || isset($_REQUEST['export'])) && $_REQUEST['nam'] != '') {
         //////////////////////////////////////
         //Khai bao bien
         $ds_ketqua = array();
         $rate = '';
         $type_calculate = '';
         $type_value = '';
         $start_date = '';
         $end_date = '';
         $report_type = '';
         $check_sale_man = $_REQUEST['check_sale_man'];
         $sale_man = $_REQUEST['sale_man'];
         $sale_man_id = $_REQUEST['sale_man_id'];
         $department = $_REQUEST['department'];
         if (isset($_REQUEST['report_type'])) {
             $report_type = $_REQUEST['report_type'];
         }
         if (isset($_REQUEST['export'])) {
             $export = 1;
         }
         $ky = $_REQUEST['ky'];
         $thang = $_REQUEST['thang'];
         $nam = $_REQUEST['nam'];
         if ($check_sale_man == '1') {
             $ss->assign('CHECK_SALE_MAN', 'checked="checked"');
         } elseif ($check_sale_man == '0') {
             $ss->assign('CHECK_SALE_MAN', '');
         }
         $ss->assign('SALE_MAN', $sale_man);
         $ss->assign('SALE_MAN_ID', $sale_man_id);
         $ss->assign('KY', get_select_options($app_list_strings['tinhdiem_ky_dom'], $ky));
         $ss->assign('THANG', get_select_options($app_list_strings['tinhdiem_thang_dom'], $thang));
         $ss->assign('DEPARTMENT', get_select_options($app_list_strings['report_deparment_dom'], $department));
         $ss->assign('NAM', $nam);
         ///////////////////////////////////////
         // Tinh ngay bat dau va ngay ket thuc de cham diem
         if (isset($_REQUEST['xephangsales']) || isset($_REQUEST['xephangtelesales']) || isset($_REQUEST['xephang']) || $report_type == 5 || $report_type == 6 || $report_type == 7 || $report_type == 8) {
             foreach ($thang as $thang_unit) {
                 $start_date[] = $nam . '-' . $thang_unit . '-01';
                 $end_date[] = date('Y-m-d', strtotime('-1 second', strtotime('+1 month', strtotime($thang_unit . '/01/' . $nam . ' 00:00:00'))));
             }
         } else {
             if ($ky == '1') {
                 foreach ($thang as $thang_unit) {
                     $start_date[] = $nam . '-' . $thang_unit . '-01';
                     $end_date[] = $nam . '-' . $thang_unit . '-16';
                 }
             } else {
                 foreach ($thang as $thang_unit) {
                     $start_date[] = $nam . '-' . $thang_unit . '-16';
                     $end_date[] = date('Y-m-d', strtotime('-1 second', strtotime('+1 month', strtotime($thang_unit . '/01/' . $nam . ' 00:00:00'))));
                 }
             }
         }
         ////////////////////////////////////////
         // Lay ket qua
         if (isset($_REQUEST['tinhdiemtelesales']) || $report_type == 1 && $export == 1) {
             if ($report_type != 1) {
                 $report_type = 1;
             }
             $ketqua = $focus->getDanhSachDiemCuaNhanVienTeleSale($app_strings, $mod_strings, $ds_ketqua, $start_date, $end_date, $sale_man_id, $department, null, $export, $report_type);
             $type_value = 1;
             $type_calculate = $mod_strings['LBL_TINH_DIEM_TELESALES'];
         } elseif (isset($_REQUEST['tinhdiemsales']) || $report_type == 2 && $export == 1) {
             if ($report_type != 2) {
                 $report_type = 2;
             }
             $ketqua = $focus->getDanhSachDiemCuaNhanVienSale($app_strings, $mod_strings, $ds_ketqua, $start_date, $end_date, $sale_man_id, $department, null, $export, $report_type);
             $type_value = 2;
             $type_calculate = $mod_strings['LBL_TINH_DIEM_SALES'];
         } elseif (isset($_REQUEST['tinhdiem']) || ($report_type == 3 || $report_type == 4) && $export == 1) {
             $user = new User();
             $user->retrieve($sale_man_id);
             if ($user->type_sale == 'telesales' || $report_type == 3) {
                 if ($report_type != 3) {
                     $report_type = 3;
                 }
                 $ketqua = $focus->getDanhSachDiemCuaNhanVienTeleSale($app_strings, $mod_strings, $ds_ketqua, $start_date, $end_date, $sale_man_id, $department, null, $export, $report_type);
                 $type_value = 1;
                 $type_calculate = $mod_strings['LBL_TINH_DIEM_TELESALES'] . ' ' . $user->last_name;
             } elseif ($user->type_sale == 'sales' || $report_type == 4) {
                 if ($report_type != 4) {
                     $report_type = 4;
                 }
                 $ketqua = $focus->getDanhSachDiemCuaNhanVienSale($app_strings, $mod_strings, $ds_ketqua, $start_date, $end_date, $sale_man_id, $department, null, $export, $report_type);
                 $type_value = 2;
                 $type_calculate = $mod_strings['LBL_TINH_DIEM_SALES'] . ' ' . $user->last_name;
             }
         } elseif (isset($_REQUEST['xephangtelesales']) || $report_type == 5 && $export == 1) {
             if ($report_type != 5) {
                 $report_type = 5;
             }
             $ketqua = $focus->getDanhSachDiemCuaNhanVienTeleSale($app_strings, $mod_strings, $ds_ketqua, $start_date, $end_date, $sale_man_id, $department, 1, $export, $report_type);
             $type_value = 1;
             $rate = 1;
             $type_calculate = $mod_strings['LBL_XEP_HANG_TELESALES'];
         } elseif (isset($_REQUEST['xephangsales']) || $report_type == 6 && $export == 1) {
             if ($report_type != 6) {
                 $report_type = 6;
             }
             $ketqua = $focus->getDanhSachDiemCuaNhanVienSale($app_strings, $mod_strings, $ds_ketqua, $start_date, $end_date, $sale_man_id, $department, 1, $export, $report_type);
             $type_value = 2;
             $rate = 1;
             $type_calculate = $mod_strings['LBL_XEP_HANG_SALES'];
         } elseif (isset($_REQUEST['xephang']) || ($report_type == 7 || $report_type == 8) && $export == 1) {
             $user = new User();
             $user->retrieve($sale_man_id);
             if ($user->type_sale == 'telesales' || $report_type == 7) {
                 if ($report_type != 7) {
                     $report_type = 7;
                 }
                 $ketqua = $focus->getDanhSachDiemCuaNhanVienTeleSale($app_strings, $mod_strings, $ds_ketqua, $start_date, $end_date, $sale_man_id, $department, 1, $export, $report_type);
                 $type_value = 1;
                 $type_calculate = $mod_strings['LBL_XEP_HANG_TELESALES'] . ' ' . $user->last_name;
             } elseif ($user->type_sale == 'sales' || $report_type == 8) {
                 if ($report_type != 8) {
                     $report_type = 8;
                 }
                 $ketqua = $focus->getDanhSachDiemCuaNhanVienSale($app_strings, $mod_strings, $ds_ketqua, $start_date, $end_date, $sale_man_id, $department, 1, $export, $report_type);
                 $type_value = 2;
                 $type_calculate = $mod_strings['LBL_XEP_HANG_SALES'] . ' ' . $user->last_name;
             }
             $rate = 1;
         }
         /////////////////////////////////////////////
         // Kiem tra ky de chinh lai end_date, chinh lai thanh ngay 15.
         // Tuy chinh giao dien ben ngoai cho phu hop voi loai tinh diem.
         if ($ky == '1' && !isset($_REQUEST['xephangtelesales']) && !isset($_REQUEST['xephangsales']) && !isset($_REQUEST['xephang']) && $report_type != 5 && $report_type != 6 && $report_type != 7 && $report_type != 8) {
             $end_date_temp = explode('-', $end_date);
             $end_date_temp[2] -= 1;
             $end_date = $end_date_temp[0] . '-' . $end_date_temp[1] . '-' . $end_date_temp[2];
         }
         $file_name = $type_calculate;
         //   $type_calculate .= $mod_strings['LBL_START_DATE'].'<font color=red>'.date('d-m-Y',strtotime($start_date)).'</font>'.$mod_strings['LBL_END_DATE'].'<font color=red>'.date('d-m-Y',strtotime($end_date)).'</font>' ;
         //  $ss->assign('TYPE_CALCULATE',$type_calculate);
         $ss->assign('TYPE_VALUE', $type_value);
         $ss->assign('RATE', $rate);
         if ($ketqua == '') {
             $ketqua = '<tr><td colspan="16">' . $mod_strings['LBL_NODATA'] . '</td></tr>';
         }
         ////////////////////////////////////////////////
     } else {
         ///////////////////////////////////////////////
         // Neu khong co du lieu
         $ketqua = '<tr><td colspan="16">' . $mod_strings['LBL_NODATA'] . '</td></tr>';
     }
     /**
      * Kiem tra kieu du lieu :
      * 1. View Table
      * 2. File Excel
      */
     if ($export != 1) {
         $ss->assign('KETQUA', $ketqua);
         $ss->display("modules/C_Reports/tpls/tinhdiemnhanvien.tpl");
     } else {
         /**
          * Export To Excel:
          */
         if ($report_type == 1 || $report_type == 3) {
             $temp = file_get_contents("modules/C_Reports/tpls/FormExport_Telesales_files/sheet001.htm");
         } elseif ($report_type == 2 || $report_type == 4) {
             $temp = file_get_contents("modules/C_Reports/tpls/FormExport_Sales_files/sheet001.htm");
         } elseif ($report_type == 5 || $report_type == 7) {
             $temp = file_get_contents("modules/C_Reports/tpls/FormExport_Telesales_XepHang_files/sheet001.htm");
         } elseif ($report_type == 6 || $report_type == 8) {
             $temp = file_get_contents("modules/C_Reports/tpls/FormExport_Sales_XepHang_files/sheet001.htm");
         }
         $temp = str_replace('{TITLE}', $mod_strings['LBL_TITLE'], $temp);
         $temp = str_replace('{LBL_STT}', $mod_strings['LBL_STT'], $temp);
         $temp = str_replace('{LBL_SALE_NAME}', $mod_strings['LBL_SALE_NAME'], $temp);
         $temp = str_replace('{LBL_PHONGBAN}', $mod_strings['LBL_PHONGBAN'], $temp);
         $temp = str_replace('{LBL_LIST}', $mod_strings['LBL_LIST'], $temp);
         $temp = str_replace('{LBL_LEADS}', $mod_strings['LBL_LEADS'], $temp);
         $temp = str_replace('{LBL_ACCOUNT}', $mod_strings['LBL_ACCOUNT'], $temp);
         $temp = str_replace('{LBL_SUCCESS}', $mod_strings['LBL_SUCCESS'], $temp);
         $temp = str_replace('{LBL_TOTAL}', $mod_strings['LBL_TOTAL'], $temp);
         $temp = str_replace('{LBL_QUANTITY}', $mod_strings['LBL_QUANTITY'], $temp);
         $temp = str_replace('{LBL_SCORE}', $mod_strings['LBL_SCORE'], $temp);
         $temp = str_replace('{LBL_SCORE2}', $mod_strings['LBL_SCORE2'], $temp);
         $temp = str_replace('{LBL_SCOREx2}', $mod_strings['LBL_SCOREx2'], $temp);
         $temp = str_replace('{LBL_CUSTOMERS}', $mod_strings['LBL_CUSTOMERS'], $temp);
         $temp = str_replace('{LBL_KHACHMOI}', $mod_strings['LBL_KHACHMOI'], $temp);
         $temp = str_replace('{LBL_KHACHCU}', $mod_strings['LBL_KHACHCU'], $temp);
         $temp = str_replace('{LBL_TYLE}', $mod_strings['LBL_TYLE'], $temp);
         $temp = str_replace('{LBL_RAKING}', $mod_strings['LBL_RAKING'], $temp);
         $temp = str_replace('{LBL_KETQUA}', $mod_strings['LBL_KETQUA'], $temp);
         $temp = str_replace('{TYPE_CALCULATE}', $type_calculate, $temp);
         $temp = str_replace('{KETQUA}', $ketqua, $temp);
         ob_clean();
         header("Pragma: cache");
         $temp = chr(255) . chr(254) . mb_convert_encoding($temp, "UTF-16LE", "UTF-8");
         header("Content-type: application/x-msdownload");
         header("Content-disposition: xls; filename=" . $mod_strings['LBL_FILENAME'] . "_" . $file_name . ".xls; size=" . strlen($temp));
         echo $temp;
         exit;
     }
 }
コード例 #15
0
 /**
  * retrieves any signatures that the User may have created as <select>
  */
 function getSignatures($live = false, $defaultSig = '')
 {
     $q = 'SELECT * FROM users_signatures WHERE user_id = \'' . $this->id . '\' AND deleted = 0 ORDER BY name ASC';
     $r = $this->db->query($q);
     $sig = array("" => "");
     while ($a = $this->db->fetchByAssoc($r)) {
         $sig[$a['id']] = $a['name'];
     }
     $change = '';
     if (!$live) {
         $change = 'onChange="setSigEditButtonVisibility();" ';
     }
     $signs = '<select ' . $change . ' id="signature_id" name="signature_id" tabindex="390">';
     $signs .= get_select_options($sig, $defaultSig) . '</select>';
     return $signs;
 }
コード例 #16
0
ファイル: managecompany.php プロジェクト: Bakyenga/kyengs
} else {
    ?>
<select name="country" id="country" class="textfield">
                            <?php 
    $country_array = array();
    $i = 0;
    foreach (get_all_countries() as $country) {
        $country_array[$i]['country'] = $country;
        $i++;
    }
    if (isset($companydetails['country'])) {
        $selected = $companydetails['country'];
    } else {
        $selected = '';
    }
    echo get_select_options($country_array, 'country', 'country', $selected);
    ?>
                        </select>
                    <?php 
}
?>
</td>
                  </tr>
                <tr>
                  <td>Phone Number:</td>
                  <td><?php 
if (isset($action)) {
    echo "<b>" . $companydetails['telephone'] . "</b>";
} else {
    ?>
<input name="telephone" type="text" class="textfield" id="telephone" value="<?php 
コード例 #17
0
ファイル: sponsor_form_view.php プロジェクト: nwtug/academia
} else {
    ?>

                      <select name="nationality" id="nationality" class="selectfield">
                      <?php 
    if (!empty($formdata['nationality']) && $formdata['nationality'] != 'Others Not Listed Above') {
        $selected = $formdata['nationality'];
    } else {
        $selected = 'Uganda';
    }
    $allcountries = get_all_countries($this);
    $drop_list = array();
    foreach ($allcountries as $country) {
        array_push($drop_list, array('value' => $country['name'], 'display' => $country['name']));
    }
    echo get_select_options($drop_list, 'value', 'display', $selected);
    ?>
                     
                    </select>
                      <?php 
}
?>

                    </td>
                  </tr>
                  
                  <tr>
                    <td colspan="2" nowrap="nowrap" class="label">
					<input name="photo" type="hidden" id="photo" value=""/>
                    
					<?php 
コード例 #18
0
ファイル: EditView.php プロジェクト: sysraj86/carnivalcrm
*/
if ($focus->department != null) {
    $sugar_smarty->assign('DEPARTMENT', get_select_options($app_list_strings['deparment_dom'], $focus->department));
} else {
    $sugar_smarty->assign('DEPARTMENT', get_select_options($app_list_strings['deparment_dom'], ''));
}
if ($focus->type_sale != null) {
    $sugar_smarty->assign('TYPE_SALE', get_select_options($app_list_strings['user_typesale_dom'], $focus->type_sale));
} else {
    $sugar_smarty->assign('TYPE_SALE', get_select_options($app_list_strings['user_typesale_dom'], ''));
}
// Custom code by Hieu Nguyen
$sugar_smarty->assign('BIRTHDAY', $focus->birthday);
// End custom code
// Add By Thanh Le At 18/12/2012
$location = get_select_options($app_list_strings['user_location_dom'], $focus->location);
$sugar_smarty->assign('LOCATION', $location);
// End
$sugar_smarty->assign('REPORTS_TO_ID', $focus->reports_to_id);
$sugar_smarty->assign('REPORTS_TO_NAME', get_assigned_user_name($focus->reports_to_id));
$sugar_smarty->assign('PHONE_HOME', $focus->phone_home);
$sugar_smarty->assign('PHONE_MOBILE', $focus->phone_mobile);
$sugar_smarty->assign('PHONE_WORK', $focus->phone_work);
$sugar_smarty->assign('PHONE_OTHER', $focus->phone_other);
$sugar_smarty->assign('PHONE_FAX', $focus->phone_fax);
$sugar_smarty->assign('EMAIL1', $focus->email1);
$sugar_smarty->assign('EMAIL2', $focus->email2);
$sugar_smarty->assign('ADDRESS_STREET', $focus->address_street);
$sugar_smarty->assign('ADDRESS_CITY', $focus->address_city);
$sugar_smarty->assign('ADDRESS_STATE', $focus->address_state);
$sugar_smarty->assign('ADDRESS_POSTALCODE', $focus->address_postalcode);
コード例 #19
0
    function setFields()
    {
        global $app_list_strings, $mod_strings;
        //Setting type Field
        $this->ss->assign('CUSTOM_TYPE', '<select id="type" name="type" onchange="populateModuleVariables(this.options[this.selectedIndex].value)">' . get_select_options($app_list_strings[$this->bean->field_defs['type']['options']], $this->bean->type) . '</select>');
        //Loading Sample Files
        $json = getJSONobj();
        $samples;
        if ($handle = opendir('modules/AOS_PDF_Templates/samples')) {
            $sample_options_array[] = ' ';
            while (false !== ($file = readdir($handle))) {
                if ($value = ltrim(rtrim($file, '.php'), 'smpl_')) {
                    require_once 'modules/AOS_PDF_Templates/samples/' . $file;
                    $file = rtrim($file, '.php');
                    $file = new $file();
                    $fileArray = array($file->getType(), $file->getBody(), $file->getHeader(), $file->getFooter());
                    $fileArray = $json->encode($fileArray);
                    $value = $mod_strings['LBL_' . strtoupper($value)];
                    $sample_options_array[$fileArray] = $value;
                }
            }
            $samples = get_select_options($sample_options_array, '');
            closedir($handle);
        }
        $this->ss->assign('CUSTOM_SAMPLE', '<select id="sample" name="sample" onchange="insertSample(this.options[this.selectedIndex].value)">' . $samples . '</select>');
        //Setting Insertable fields
        require_once 'modules/AOS_Invoices/AOS_Invoices.php';
        require_once 'modules/AOS_Quotes/AOS_Quotes.php';
        $account_options_array = array('' => '');
        $contact_options_array = array('' => '');
        $lead_options_array = array('' => '');
        $user_options_array = array('' => '');
        $currencies_options_array = array('' => '');
        $quote_options_array = array('' => '');
        $invoice_options_array = array('' => '');
        $product_options_array = array('' => '');
        $service_options_array = array('' => '');
        //Getting Fields
        $account = new Account();
        foreach ($account->field_defs as $name => $arr) {
            if (!(isset($arr['dbType']) && strtolower($arr['dbType']) == 'id' || $arr['type'] == 'id' || $arr['type'] == 'link')) {
                if ($arr['vname'] != 'LBL_DELETED') {
                    $account_options_array['$accounts_' . $name] = translate($arr['vname'], 'Accounts');
                }
            }
        }
        $contact = new Contact();
        foreach ($contact->field_defs as $name => $arr) {
            if (!(isset($arr['dbType']) && strtolower($arr['dbType']) == 'id' || $arr['type'] == 'id' || $arr['type'] == 'link')) {
                if ($arr['vname'] != 'LBL_DELETED') {
                    $contact_options_array['$contacts_' . $name] = translate($arr['vname'], 'Contacts');
                }
            }
        }
        $lead = new Lead();
        foreach ($lead->field_defs as $name => $arr) {
            if (!(isset($arr['dbType']) && strtolower($arr['dbType']) == 'id' || $arr['type'] == 'id' || $arr['type'] == 'link')) {
                if ($arr['vname'] != 'LBL_DELETED') {
                    $lead_options_array['$leads_' . $name] = translate($arr['vname'], 'Leads');
                }
            }
        }
        $user = new User();
        foreach ($user->field_defs as $name => $arr) {
            if (!(isset($arr['dbType']) && strtolower($arr['dbType']) == 'id' || $arr['type'] == 'id' || $arr['type'] == 'link' || $arr['type'] == 'bool' || $arr['type'] == 'datetime' || $arr['link_type'] == 'relationship_info')) {
                if ($arr['vname'] != 'LBL_DELETED' && $arr['vname'] != 'LBL_USER_HASH' && $arr['vname'] != 'LBL_LIST_ACCEPT_STATUS' && $arr['vname'] != 'LBL_AUTHENTICATE_ID' && $arr['vname'] != 'LBL_MODIFIED_BY' && $arr['name'] != 'created_by_name') {
                    $user_options_array['$users_' . $name] = translate($arr['vname'], 'Users');
                }
            }
        }
        $currencies = new currency();
        foreach ($currencies->field_defs as $name => $arr) {
            if (!(isset($arr['dbType']) && strtolower($arr['dbType']) == 'id' || $arr['type'] == 'id' || $arr['type'] == 'link' || $arr['type'] == 'bool' || $arr['type'] == 'datetime' || $arr['link_type'] == 'relationship_info')) {
                if ($arr['vname'] != 'LBL_DELETED' && $arr['vname'] != 'LBL_CURRENCIES_HASH' && $arr['vname'] != 'LBL_LIST_ACCEPT_STATUS' && $arr['vname'] != 'LBL_AUTHENTICATE_ID' && $arr['vname'] != 'LBL_MODIFIED_BY' && $arr['name'] != 'created_by_name') {
                    $currencies_options_array['$currencies_' . $name] = translate($arr['vname'], 'Currencies');
                }
            }
        }
        $quote = new AOS_Quotes();
        foreach ($quote->field_defs as $name => $arr) {
            if (!(isset($arr['dbType']) && strtolower($arr['dbType']) == 'id' || $arr['type'] == 'id' || $arr['type'] == 'link')) {
                if ($arr['vname'] != 'LBL_DELETED') {
                    $quote_options_array['$aos_quotes_' . $name] = translate($arr['vname'], 'AOS_Quotes');
                }
            }
        }
        $invoice = new AOS_Invoices();
        foreach ($invoice->field_defs as $name => $arr) {
            if (!(isset($arr['dbType']) && strtolower($arr['dbType']) == 'id' || $arr['type'] == 'id' || $arr['type'] == 'link')) {
                if ($arr['vname'] != 'LBL_DELETED') {
                    $invoice_options_array['$aos_invoices_' . $name] = translate($arr['vname'], 'AOS_Invoices');
                }
            }
        }
        $product_quote = new AOS_Products_Quotes();
        foreach ($product_quote->field_defs as $name => $arr) {
            if (!(isset($arr['dbType']) && strtolower($arr['dbType']) == 'id' || $arr['type'] == 'id' || $arr['type'] == 'link')) {
                if ($arr['vname'] != 'LBL_DELETED' && $arr['vname'] != 'LBL_PRODUCT' && $arr['vname'] != 'LBL_DATE_ENTERED' && $arr['vname'] != 'LBL_DATE_MODIFIED' && $arr['vname'] != 'LBL_MODIFIED_NAME' && $arr['vname'] != 'LBL_CREATED' && $arr['vname'] != 'LBL_ASSIGNED_TO_NAME') {
                    $product_options_array['$aos_products_quotes_' . $name] = translate($arr['vname'], 'AOS_Products_Quotes');
                }
            }
        }
        $product_quote = new AOS_Products();
        foreach ($product_quote->field_defs as $name => $arr) {
            if (!(isset($arr['dbType']) && strtolower($arr['dbType']) == 'id' || $arr['type'] == 'id' || $arr['type'] == 'link')) {
                if ($arr['vname'] != 'LBL_DELETED' && $arr['vname'] != 'LBL_NAME') {
                    $product_options_array['$aos_products_' . $name] = translate($arr['vname'], 'AOS_Products');
                }
            }
        }
        $service_options_array['$aos_services_quotes_name'] = translate('LBL_SERVICE_NAME', 'AOS_Quotes');
        $service_options_array['$aos_services_quotes_number'] = translate('LBL_LIST_NUM', 'AOS_Products_Quotes');
        $service_options_array['$aos_services_quotes_service_unit_price'] = translate('LBL_SERVICE_PRICE', 'AOS_Quotes');
        $service_options_array['$aos_services_quotes_vat_amt'] = translate('LBL_VAT_AMT', 'AOS_Quotes');
        $service_options_array['$aos_services_quotes_vat'] = translate('LBL_VAT', 'AOS_Quotes');
        $service_options_array['$aos_services_quotes_service_total_price'] = translate('LBL_TOTAL_PRICE', 'AOS_Quotes');
        $account_mod_options_array['Accounts'] = translate('LBL_MODULE_NAME', 'Accounts');
        $contact_mod_options_array['Contacts'] = translate('LBL_MODULE_NAME', 'Contacts');
        $contact_mod_options_array['Accounts'] = translate('LBL_MODULE_NAME', 'Accounts');
        $lead_mod_options_array['Leads'] = translate('LBL_MODULE_NAME', 'Leads');
        $quote_mod_options_array['Quotes'] = translate('LBL_MODULE_NAME', 'AOS_Quotes');
        $quote_mod_options_array['Products'] = translate('LBL_MODULE_NAME', 'AOS_Products');
        $quote_mod_options_array['Services'] = translate('LBL_SERVICE_MODULE_NAME', 'AOS_Products_Quotes');
        $quote_mod_options_array['Accounts'] = translate('LBL_MODULE_NAME', 'Accounts');
        $quote_mod_options_array['Contacts'] = translate('LBL_MODULE_NAME', 'Contacts');
        $quote_mod_options_array['Users'] = translate('LBL_MODULE_NAME', 'Users');
        $quote_mod_options_array['Currencies'] = translate('LBL_MODULE_NAME', 'Currencies');
        $invoice_mod_options_array['Invoices'] = translate('LBL_MODULE_NAME', 'AOS_Invoices');
        $invoice_mod_options_array['Products'] = translate('LBL_MODULE_NAME', 'AOS_Products');
        $invoice_mod_options_array['Services'] = translate('LBL_SERVICE_MODULE_NAME', 'AOS_Products_Quotes');
        $invoice_mod_options_array['Accounts'] = translate('LBL_MODULE_NAME', 'Accounts');
        $invoice_mod_options_array['Contacts'] = translate('LBL_MODULE_NAME', 'Contacts');
        $invoice_mod_options_array['Users'] = translate('LBL_MODULE_NAME', 'Users');
        $invoice_mod_options_array['Currencies'] = translate('LBL_MODULE_NAME', 'Currencies');
        $account_options = get_select_options($account_options_array, '');
        $contact_options = get_select_options($contact_options_array, '');
        $lead_options = get_select_options($lead_options_array, '');
        $user_options = get_select_options($user_options_array, '');
        $currencies_options = get_select_options($currencies_options_array, '');
        $quote_options = get_select_options($quote_options_array, '');
        $invoice_options = get_select_options($invoice_options_array, '');
        $product_options = get_select_options($product_options_array, '');
        $service_options = get_select_options($service_options_array, '');
        $account_module_options = get_select_options($account_mod_options_array, '');
        $contact_module_options = get_select_options($contact_mod_options_array, '');
        $lead_module_options = get_select_options($lead_mod_options_array, '');
        $quote_module_options = get_select_options($quote_mod_options_array, '');
        $invoice_module_options = get_select_options($invoice_mod_options_array, '');
        if ($this->bean->type == 'Quotes') {
            $mod_options = $quote_module_options;
            $var_options = $quote_options;
        } else {
            if ($this->bean->type == 'Invoices') {
                $mod_options = $invoice_module_options;
                $var_options = $invoice_options;
            } else {
                if ($this->bean->type == 'Accounts') {
                    $mod_options = $account_module_options;
                    $var_options = $account_options;
                } else {
                    if ($this->bean->type == 'Contacts') {
                        $mod_options = $contact_module_options;
                        $var_options = $contact_options;
                    } else {
                        if ($this->bean->type == 'Leads') {
                            $mod_options = $lead_module_options;
                            $var_options = $lead_options;
                        } else {
                            $mod_options = $quote_module_options;
                            $var_options = $quote_options;
                        }
                    }
                }
            }
        }
        $account_options = preg_replace("'\n'", '', $account_options);
        $contact_options = preg_replace("'\n'", '', $contact_options);
        $lead_options = preg_replace("'\n'", '', $lead_options);
        $user_options = preg_replace("'\n'", '', $user_options);
        $currencies_options = preg_replace("'\n'", '', $currencies_options);
        $quote_options = preg_replace("'\n'", '', $quote_options);
        $invoice_options = preg_replace("'\n'", '', $invoice_options);
        $product_options = preg_replace("'\n'", '', $product_options);
        $service_options = preg_replace("'\n'", '', $service_options);
        $account_module_options = preg_replace("'\n'", '', $account_module_options);
        $contact_module_options = preg_replace("'\n'", '', $contact_module_options);
        $lead_module_options = preg_replace("'\n'", '', $lead_module_options);
        $quote_module_options = preg_replace("'\n'", '', $quote_module_options);
        $invoice_module_options = preg_replace("'\n'", '', $invoice_module_options);
        $insert_fields = <<<HTML
\t\t<select name='module_name' id='module_name' tabindex="50" onchange="populateVariables(this.options[this.selectedIndex].value);">
\t\t\t{$mod_options}
\t\t</select>
\t\t<select name='variable_name' id='variable_name' tabindex="50" onchange="showVariable(this.options[this.selectedIndex].value);">
\t\t\t{$var_options}
\t\t</select>
\t\t<input type="text" size="30" tabindex="60" name="variable_text" id="variable_text" />
\t\t<input type='button' tabindex="70" onclick='insert_variable(document.EditView.variable_text.value);' class='button' value='Insert'>
\t\t<script type="text/javascript">
\t\t\tvar quoteOptions = "{$quote_options}";
\t\t\tvar invoiceOptions = "{$invoice_options}";
\t\t\tvar accountOptions = "{$account_options}";
\t\t\tvar contactOptions = "{$contact_options}";
\t\t\tvar leadOptions = "{$lead_options}";
\t\t\tvar userOptions = "{$user_options}";
\t\t\tvar currenciesOptions = "{$currencies_options}";
\t\t\tvar productOptions = "{$product_options}";
\t\t\tvar serviceOptions = "{$service_options}";
\t\t\t
\t\t\tvar accountModOptions = "{$account_module_options}";
\t\t\tvar contactModOptions = "{$contact_module_options}";
\t\t\tvar leadModOptions = "{$lead_module_options}";
\t\t\tvar quoteModOptions = "{$quote_module_options}";
\t\t\tvar invoiceModOptions = "{$invoice_module_options}";
\t\t</script>
HTML;
        $this->ss->assign('INSERT_FIELDS', $insert_fields);
    }
コード例 #20
0
                            </select>
                        </div>
                    </div>
                    <div class="control-group <?php 
    echo in_array('bid_security', $requiredfields) ? 'error' : '';
    ?>
">
                        <label class="control-label">Bid security:</label>
                        <div class="controls">
                            <input type="text" name="bid_security_amount" value="<?php 
    echo !empty($formdata['bid_security_amount']) ? addCommas($formdata['bid_security_amount'], 0) : '';
    ?>
" class="input-medium numbercommas" />
                            <select id="bid-security-currency" class="input-small m-wrap" name="bid_security_currency">
                                <?php 
    echo get_select_options($currencies, 'id', 'title', !empty($formdata['bid_security_currency']) ? $formdata['bid_security_currency'] : 1);
    ?>
                            </select>
                        </div>
                    </div>
                    <div class="control-group <?php 
    echo in_array('invitation_to_bid_date', $requiredfields) ? 'error' : '';
    ?>
">
                        <label class="control-label">Invitation to bid date:<span>*</span></label>
                        <div class="controls">
                            <div class="input-append date date-picker" data-date="<?php 
    echo !empty($formdata['invitation_to_bid_date']) ? custom_date_format('Y-m-d', $formdata['invitation_to_bid_date']) : date('Y-m-d');
    ?>
" data-date-format="yyyy-mm-dd" data-date-viewmode="days">
                                <input name="invitation_to_bid_date" data-date="<?php 
コード例 #21
0
                  </tr>
                  <tr>
                    <td valign="top" nowrap="nowrap" class="label" style="padding-top:13px">Item:<?php 
echo $indicator;
?>
</td>
                    <td class="field" nowrap>
                      <?php 
if (!empty($isview)) {
    echo "<span class='viewtext'>" . $transactiondetails['rank'] . "</span>";
} else {
    echo get_required_field_wrap($requiredfields, 'rank');
    ?>

                      <select name="account" id="account"  class="selectfield"> <?php 
    echo get_select_options($accounts, 'id', 'title', !empty($formdata['title']) ? $formdata['title'] : '', 'Y', 'Select Account');
    ?>

                    </select>
                      <?php 
    echo get_required_field_wrap($requiredfields, 'rank', 'end');
}
?>

                   </td>
                  </tr>
                  <tr>
                    <td valign="top" nowrap="nowrap" class="label" style="padding-top:13px">Notes:</td>
                    <td class="field" nowrap>
                      <?php 
if (!empty($isview)) {
コード例 #22
0
                            <span class="add-on">
                                <i class="fa fa-calendar"></i>
                            </span>
                        </div>
                  </div>
                </div>
                <div class="control-group">
                    <label class="control-label">Total actual payments made: <span>*</span></label>
                    <div class="controls">
                      <input type="text" name="total_actual_payments" value="<?php 
echo !empty($formdata['total_actual_payments']) ? addCommas($formdata['total_actual_payments'], 0) : '';
?>
" class="input-medium numbercommas" />
<select id="total_actual_payments_currency" class="input-small m-wrap" name="total_actual_payments_currency">
                                <?php 
echo get_select_options($currencies, 'id', 'title', !empty($formdata['total_actual_payments_currency']) ? $formdata['total_actual_payments_currency'] : 1);
?>
                            </select>
                  </div>
                </div>
                <div class="control-group">
                    <label class="control-label">Date of actual completion:<span>*</span></label>
                    <div class="controls">
          <div class="input-append date date-picker" data-date="<?php 
echo !empty($formdata['actual_completion_date']) && str_replace('-', '', $formdata['actual_completion_date']) > 0 ? custom_date_format('Y-m-d', $formdata['actual_completion_date']) : date('Y-m-d');
?>
" data-date-format="yyyy-mm-dd" data-date-viewmode="days">
                            <input name="actual_completion_date" data-date="<?php 
echo !empty($formdata['actual_completion_date']) && str_replace('-', '', $formdata['actual_completion_date']) > 0 ? custom_date_format('Y-m-d', $formdata['actual_completion_date']) : date('Y-m-d');
?>
" data-date-format="yyyy-mm-dd" data-date-viewmode="days" class="m-ctrl-medium date-picker"  type="text" value="<?php 
コード例 #23
0
ファイル: ppms_f.php プロジェクト: newwavetechug/gpp
                </select>
            </div>
        </div>


    <?php 
}
?>

    <div class="control-group">
        <label class="control-label">Financial year:</label>

        <div class="controls">
            <select id="financial_year" class="input-large m-wrap" name="financial_year" tabindex="2">
                <?php 
echo get_select_options($financial_years, 'fy', 'label', !empty($formdata['financial_year']) ? $formdata['financial_year'] : '');
?>
            </select>
        </div>
    </div>


    <div class="control-group ">
        <label class="control-label">Month:</label>


        <div class="controls">

            <div class="input-append date date-picker"  data-date-format="yyyy-mm-dd"
                 data-date-viewmode="days">
                <input name="from_date"   data-date="<?php 
コード例 #24
0
ファイル: view.edit.php プロジェクト: sysraj86/carnivalcrm
 function display()
 {
     global $mod_strings, $app_list_strings, $current_user, $db;
     // Contract Value:
     $html = '
             <table cellpadding="0" cellspacing="0" border="1" width="100%" style="border-collapse:collapse" class="table_clone" id="contract_value">
                     <thead>
                         <tr bgcolor="#CCCCCC">
                             <th align="center"> ' . $mod_strings['LBL_CONTRACT_SERVICE'] . '</th>
                             <th align="center"> ' . $mod_strings['LBL_CONTRACT_SOLUONG'] . '</th> 
                             <th align="center"> ' . $mod_strings['LBL_CONTRACT_GIATOUR'] . '</th>
                             <th align="center"> ' . $mod_strings['LBL_CONTRACT_THUE'] . '</th>
                             <th align="center"> ' . $mod_strings['LBL_CONTRACT_THANHTIEN'] . '</th>
                             <th align="center">&nbsp;</th>
                         </tr>
                     </thead>
                     <tbody>
         ';
     if ($this->bean->contract_values_line_count() > 0) {
         $html .= $this->bean->get_contract_values_editview_line();
     } else {
         $html .= '<tr>';
         $html .= '<td  align="center"> ';
         //                        $html .= '<input name="age[]" type="text" id="age" value="" />';
         $html .= '<select class="type_service" name="type_service[]" id="type_service">' . get_select_options($app_list_strings['contract_type_service_dom'], '') . '</select>
                               <input name="age[]" type="text" style="display:none" id="age" value="" />
                     ';
         $html .= '</td>';
         $html .= '<td align="center">';
         $html .= '<input name="tong_sl_khach[]" type="text" id="tong_sl_khach" class="tinhtoan" value="" />';
         $html .= '</td> ';
         $html .= '<td align="center">';
         $html .= '<input name="gia_tour[]" type="text" id="gia_tour" class="tinhtoan " value="" /> ';
         $html .= '</td>';
         $html .= '<td align="center">';
         $html .= '<input name="thue[]" type="text" id="thue" class="tinhtoan" value="" /> ';
         $html .= '</td>';
         $html .= '<td align="center">';
         $html .= '<input readonly="readonly" name="thanhtien[]" type="text" id="thanhtien" class="tinhtoan thanhtien" value=""  />';
         $html .= '<input type="hidden" name="contract_value_id[]" id="contract_value_id" value=""/> <input type="hidden" name="deleted[]" id="deleted" value="0"/>';
         $html .= '</td>';
         $html .= '<td align="center">';
         $html .= '<input type="button" class="btnAddRow" value="Add row" />';
         $html .= '<input type="button" class="btnDelRow" value="Delete row" />';
         $html .= '</td>';
         $html .= '</tr> ';
     }
     $html .= '</tbody>
                     </table>';
     $this->ev->ss->assign("contract_value", $html);
     // Contract Condition:
     $html = '
               <table cellpadding="0" cellspacing="0" border="0" width="100%" class="table_clone" id="contract_condition">
                     <tbody>
         ';
     if ($this->bean->contract_condition_line_count() > 0) {
         $html .= $this->bean->get_contract_condition_editview_line();
     } else {
         $curency = get_select_options_with_id($app_list_strings['currency_dom'], 'VND');
         $html .= '<tr>';
         $html .= '<td>';
         $html .= '<fieldset>';
         $html .= '<table cellpadding="0" cellspacing="0" border="0" width="100%"> ';
         $html .= '<tr>';
         $html .= '<td>';
         $html .= '<input name="dotthanhtoan[]" id="dotthanhtoan" type="text" value=""/><input name="event[]" type="text" id="event" value=""/> Bên B thanh toán cho bên A <input name="phantram[]" id="phantram" class="percent" type="text" value=""/> % số tiền là  <input name="tienthanhtoan[]" type="text"  id="tienthanhtoan" value=""/> <select name="tiente_thanhtoan[]" class="tientethanhtoan" id="tiente_thanhtoan">' . $curency . '</select> <br />';
         $html .= '<input type="hidden" name="contract_condition_id[]" id="contract_condition_id" value=""/>  <input type="hidden" name="deleted[]" id="deleted" value="0"/>';
         $html .= 'Bằng chữ: <input name="in_word[]" type="text" id="in_word" value=""  size="90"/>';
         $html .= '</td>';
         $html .= '</tr>';
         $html .= '</table>';
         $html .= '</fieldset>';
         $html .= '</td>';
         $html .= '<td>';
         $html .= '<input  type="button" class="btnAddRow" value="Add row" />';
         $html .= '<input  type="button" class="btnDelRow" value="Delete" />';
         $html .= '</td>';
         $html .= '</tr>';
     }
     $html .= '</tbody>
                     </table>';
     $this->ev->ss->assign("contract_condition", $html);
     $this->ev->ss->assign("tongtien", format_number($this->bean->tongtien));
     /*** Bo sung VPDD cho nhung chi nhanh khac 
      *** By Thanh Le At 18/12/2012 ***********/
     if ($current_user->department == 'han') {
         $this->bean->vpdd = 'CÔNG TY TNHH MỘT THÀNH VIÊN DV DL LỄ HỘI (TẠI HÀ NỘI)';
         $this->bean->vpdd_diachi = 'Phòng 306, Tòa nhà DMC, 535 Kim Mã, Ba Đình, Hà Nội';
         $this->bean->vpdd_dienthoai = '(04) 37246881';
         $this->bean->vpdd_fax = '(04) 37246882';
     } elseif ($current_user->department == 'han') {
         $this->bean->vpdd = 'CÔNG TY TNHH MỘT THÀNH VIÊN DV DL LỄ HỘI (TẠI HUẾ)';
         $this->bean->vpdd_diachi = '23 Chu Văn An, Thành Phố Huế, Việt Nam';
         $this->bean->vpdd_dienthoai = '(054) 3819855';
         $this->bean->vpdd_fax = '(054) 3819857';
     }
     /* End */
     /** Tu dong general SO HĐ *******
      *** By Thanh Le At 18/12/2012 **/
     if ($this->bean->number == '') {
         $user = $current_user;
         if ($this->bean->assigned_user_id != '') {
             $user = new User();
             $user->retrieve($this->bean->assigned_user_id);
         }
         // get Location :
         $location = strtoupper($user->location);
         // Get Derparment :
         $derparment = strtoupper($user->department);
         // Get Year :
         $now = getdate();
         $year = $now['year'];
         // Get Autonumber :
         $sql = 'SELECT Max(autonumber) as auto FROM contracts';
         $result = $db->query($sql);
         $row = $db->fetchByAssoc($result);
         $autonumber = $row1['auto'] + 1;
         // Number of contract
         $this->bean->number = $location . $derparment . $year . $autonumber;
     }
     /* End */
     parent::display();
 }
コード例 #25
0
                <a href="javascript:;" class="icon-remove"></a>
            </span>
    </div>
    <div class="widget-body">
        <!-- BEGIN FORM-->
        <form action="<?php 
echo base_url() . 'procurement/initiate_procurement' . (!empty($i) ? '/i/' . $i : '');
?>
" enctype="multipart/form-data" method="post" class="form-horizontal">
        	<div class="form_details">
            	<div class="control-group">
                    <label class="control-label">Procurement Ref. No <span>*</span></label>
                    <div class="controls">
                        <select id="procurement-ref-no" class="input-large m-wrap" name="procurement_ref_no" tabindex="1">
                            <?php 
echo get_select_options($procurement_plan_entries, 'procurement_ref_no', 'procurement_ref_no', !empty($formdata['procurement_ref_no']) ? $formdata['procurement_ref_no'] : '');
?>
                        </select>
                    </div>
                </div>
                <div id="procurement_plan_details">
                	<?php 
if (!empty($formdata['procurement_details'])) {
    ?>
                    <?php 
    $procurement_details = $formdata['procurement_details'];
    ?>
                        <div class="control-group">
                            <label class="control-label">Financial Year:</label>
                            <div class="controls">
								<?php 
コード例 #26
0
ファイル: user_form_v.php プロジェクト: newwavetechug/gpp
                            <?php 
    echo get_select_options($pdes, 'pdeid', 'pdename', !empty($formdata['pde']) ? $formdata['pde'] : '');
    ?>
                        </select>
                    </div>
                </div>
                <?php 
}
?>
                
                <div class="control-group">
                    <label class="control-label">User Group<span>*</span></label>
                    <div class="controls">
                        <select class="input-large m-wrap" name="roles" tabindex="1">
                            <?php 
echo get_select_options($usergroups, 'usergroupid', 'groupname', !empty($formdata['roles']) ? $formdata['roles'] : '');
?>
                        </select>
                    </div>
                </div>
                
                <div class="control-group <?php 
echo in_array('username', $requiredfields) ? 'error' : '';
?>
">
                    <label class="control-label">Username <span>*</span></label>
                    <div class="controls">
                        <input type="text" name="username" value="<?php 
echo !empty($formdata['username']) ? $formdata['username'] : '';
?>
" class="input-xlarge" />
コード例 #27
0
ファイル: CommonUtils.php プロジェクト: Pengzw/c3crm
function getModulePicklistOptionsHtml($module, $selected_key = "")
{
    global $log;
    $log->debug("Entering getModulePicklistOptionsHtml method ...");
    global $adb, $current_language;
    $sql = "SELECT ec_field.* FROM ec_field INNER JOIN ec_def_org_field ON ec_def_org_field.fieldid=ec_field.fieldid AND ec_def_org_field.visible=0 left join ec_tab on ec_tab.tabid=ec_field.tabid WHERE ec_field.uitype=15 and ec_tab.name='" . $module . "' ORDER BY ec_field.sequence";
    $result = $adb->query($sql);
    $rows = $adb->num_rows($result);
    $options = array();
    $cur_mod_strings = return_specified_module_language($current_language, $module);
    for ($j = 0; $j < $rows; $j++) {
        $columnname = $adb->query_result($result, $j, "columnname");
        $fieldlabel = $adb->query_result($result, $j, "fieldlabel");
        if (isset($cur_mod_strings[$fieldlabel])) {
            $fieldlabel = $cur_mod_strings[$fieldlabel];
        }
        $options[$columnname] = $fieldlabel;
    }
    $html_options = get_select_options($options, $selected_key);
    $log->debug("Exit getModulePicklistOptionsHtml method ...");
    return $html_options;
}
コード例 #28
0
ファイル: exam_form.php プロジェクト: nwtug/academia
                    
                    <tr>
                    <td valign="top" nowrap="nowrap" class="label" style="padding-top:13px">Term:<?php 
echo $indicator;
?>
</td>
                    <td class="field" nowrap>
                      <?php 
if (!empty($isview)) {
    echo "<span class='viewtext'>" . $formdata['term'] . "</span>";
} else {
    echo get_required_field_wrap($requiredfields, 'term');
    ?>

                      <select name="term" id="term"  class="selectfield"> <?php 
    echo get_select_options($terms, 'id', 'term', !empty($formdata['term']) ? $formdata['term'] : '', 'Y', 'Select Term');
    ?>

                    </select>
                      <?php 
    echo get_required_field_wrap($requiredfields, 'term', 'end');
}
?>

                    </td>
                    </tr>
                    
                   <tr>
                    <td valign="top" nowrap="nowrap" class="label" style="padding-top:13px">% Contribution to <br />
                    final term mark:<?php 
echo $indicator;
コード例 #29
0
ファイル: user.php プロジェクト: nwtug/academia
 function load_staff_form()
 {
     access_control($this);
     # Get the passed details into the url data array if any
     $urldata = $this->uri->uri_to_assoc(3, array('s', 'i', 'a'));
     # Pick all assigned data
     $data = assign_to_data($urldata);
     #user is editing
     if (!empty($data['i'])) {
         $userid = decryptValue($data['i']);
         #get the user's details
         $data['formdata'] = $this->Query_reader->get_row_as_array('get_school_user_by_id', array('id' => $userid));
         #Check if the user is simply viewing
         if (!empty($data['a']) && decryptValue($data['a']) == 'view') {
             $data['isview'] = "Y";
         }
     }
     #Get access groups
     $usergroupsResult = $this->db->query($this->Query_reader->get_query_by_code('get_user_groups', array('searchstr' => ' AND school = ' . $this->myschool['id'])));
     $data['usergroups'] = get_select_options($usergroupsResult->result_array(), 'id', 'groupname', empty($data['formdata']['usergroup']) ? '' : $data['formdata']['usergroup'], 'Y', 'Select');
     $this->load->view('user/staff_form_view', $data);
 }
コード例 #30
0
ファイル: _EditView.php プロジェクト: sysraj86/carnivalcrm
$ss->assign("GUIDE_NUM_OF_DATE", $focus->guide_num_of_date);
$ss->assign("EXPIRATION_DATE", $focus->expiration_date);
$ss->assign("JOURNEY", $focus->journey);
$ss->assign("PARENT_NAME", $focus->parent_name);
$ss->assign("PARENT_ID", $focus->parent_id);
$ss->assign("GUIDE_CURRENCY", get_select_options($app_list_strings['currency_dom'], $focus->guide_currency));
$ss->assign("CONTRACT_CONDITIONS", $focus->get_contract_condition_editview_line($mod_strings));
$ss->assign("CONTRACT_CONDITION_LINE_COUNT", $focus->contract_condition_line_count());
$ss->assign("TRANSPORTCONTRACT_LINE", $focus->get_transportcontract_editview());
$ss->assign("TRANSPORTCOUNT", $focus->get_transportcontract_line_count());
$ss->assign("SOLANTHANHTOAN", $focus->solanthanhtoan);
$ss->assign("NGUOIDAIDIENBENB", $focus->nguoidaidienbenb);
$ss->assign("NGUOIDAIDIENBENA", $focus->nguoidaidienbena);
$ss->assign("TENSANBAY", $focus->tensanbay);
$ss->assign('TEMPLATE', get_select_options($app_list_strings['template_ddown_c_list'], $focus->template_ddown_c));
$ss->assign('PARENT_TYPE', get_select_options($app_list_strings['contract_parent_type_display'], $focus->parent_type));
$popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'EditView', 'field_to_name_array' => array('id' => 'assigned_user_id', 'user_name' => 'assigned_user_name'));
$encoded_users_popup_request_data = $json->encode($popup_request_data);
$ss->assign('encoded_users_popup_request_data', $json->encode($popup_request_data));
$view_chang_log_data = array("call_back_function" => "set_return", "form_name" => "EditView", "field_to_name_array" => '[]');
$view_chang_log = $json->encode($view_chang_log_data);
$ss->assign('view_change_log', $json->encode($view_chang_log_data));
require_once 'include/javascript/javascript.php';
$javascript = new javascript();
$javascript->setFormName('EditView');
$javascript->setSugarBean($focus);
$javascript->addAllFields('');
echo $javascript->getScript();
if ($_REQUEST['record'] != '') {
    if ($focus->type == '') {
        $focus->type = 'Outbound';