Beispiel #1
0
 public static function DRP_Units($dropdownName, $selectedID = "", $extraRow = "", $width = "", $where = "")
 {
     $query = "select ouid,ptitle from org_new_units";
     $query .= $where != "" ? " where " . $where : "";
     $obj = new AutoComplete_DROPDOWN();
     $temp = parent::runquery($query);
     $obj->datasource = $temp;
     $obj->valuefield = "%ouid%";
     $obj->textfield = "%ptitle%";
     $obj->width = $width;
     $obj->Style = 'class="x-form-text x-form-field" style="width:' . $width . '" ';
     $obj->id = $dropdownName;
     if (!empty($extraRow)) {
         $obj->datasource = array_merge(array(array("ouid" => "-1", "ptitle" => $extraRow)), $obj->datasource);
     }
     $return = $obj->bind_dropdown($selectedID);
     return $return;
 }
Beispiel #2
0
 public static function DRP_JobFields($dropdownName, $selectedID = "", $extraRow = "", $width = "")
 {
     $query = "select jfid,title from job_fields";
     $obj = new AutoComplete_DROPDOWN();
     $temp = PdoDataAccess::runquery($query);
     $obj->datasource = $temp;
     $obj->valuefield = "%jfid%";
     $obj->textfield = "%title%";
     $obj->width = $width;
     $obj->Style = 'class="x-form-text x-form-field" style="width:' . $width . '" ';
     $obj->id = $dropdownName;
     if (!empty($extraRow)) {
         $obj->datasource = array_merge(array(array("jfid" => "-1", "title" => $extraRow)), $obj->datasource);
     }
     $return = $obj->bind_dropdown($selectedID);
     return $return;
 }