db = $db_object; } function generateYearsCombo($name,$selected){ echo ""; } function generateYearsCombo2($name,$selected){ echo ""; } function generateFunctionCodesCombo($selected){ $sql = "select id_position, code from positions_codes order by code asc"; $res = $this->db->Execute ($sql) or die ("Could not get codes!"); echo ""; } function generateFacultiesCombo($id_faculty){ $sql = "select id_faculty, name from faculties order by id_faculty asc"; $res = $this->db->Execute ($sql) or die ("Could not get faculties!"); echo ""; } function generateFacultiesCombo2($id_faculty){ $sql = "select id_faculty, name from faculties order by id_faculty asc"; $res = $this->db->Execute ($sql) or die ("Could not get faculties!"); echo ""; } function generateLanguagesCombo($id_student,$selected){ $sql = "select l.id_lang, l.name from langs l order by l.name asc"; $res = $this->db->Execute ($sql) or die ("Could not get languages!"); echo ""; } function generateLevelsCombo($name, $selected){ echo ""; } function generateCountriesCombo($name, $id_country,$onchange){ $sql = "select id_country, name from countries order by name asc"; $res = $this->db->Execute ($sql) or die ("Could not get countries!"); if ($onchange=="") echo ""; while ($row = $res->FetchRow()){ if ($id_country == $row["id_country"]){ echo ""; } else echo ""; } echo ""; } function generateClassificationsCombo($id_classification){ $sql = "select id_classification, code from classifications order by code asc"; $res = $this->db->Execute ($sql) or die ("Could not get classifications!"); echo ""; } function generateNomenclatorsCombo($name, $table,$selected){ $sql = "select id_code, name from $table order by name asc"; $res = $this->db->Execute ($sql) or die ("Could not get classifications!"); echo ""; } function generateCountiesCombo($name, $id_county,$onchange){ $sql = "select id_county, name from counties order by name asc"; $res = $this->db->Execute ($sql) or die ("Could not get countries!"); if ($onchange == '') echo ""; while ($row = $res->FetchRow()){ if ($id_county == $row["id_county"]){ echo ""; } else echo ""; } echo ""; } function generateCountiesSelect($selected){ $sql = "select id_county, name from counties order by name asc"; $res = $this->db->Execute ($sql) or die ("Could not get countries!"); $selected = explode(",", $selected); echo ""; } function generateLanguagesSelect($selected){ $sql = "select l.id_lang, l.name from langs l order by l.name asc"; $res = $this->db->Execute ($sql) or die ("Could not get languages!"); $selected = explode(",", $selected); echo ""; } function generateFacultySeriesJS(){ echo ""; } function sendMail ($to, $from,$subject, $body){ $message = ' $subject
' . $body .'
'; /* To send HTML mail, you can set the Content-type header. */ $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; /* additional headers */ $headers .= "From: $from\r\n"; if (mail($to,$subject,$message,$headers)){ return true; }else { return false; } } function getCountryNameById($id){ if ($id=='') $id=0; $sql = "select name from countries where id_country=$id"; $res = $this->db->Execute ($sql) or die ("Could not get country name!" . $this->db->ErrorMsg()); $row = $res->FetchRow(); return $row[0]; } function getCountyNameById($id){ if ($id=='') $id=0; $sql = "select name from counties where id_county=$id"; $res = $this->db->Execute ($sql) or die ("Could not get county name!" . $this->db->ErrorMsg()); $row = $res->FetchRow(); return $row[0]; } function getCodeByTypeAndId($type,$id) { $sql = "select name from $type where id_code=$id"; $res = $this->db->Execute ($sql) or die ("Could not get codes!" . $this->db->ErrorMsg()); if ($res->RecordCount != 0){ $row = $res->FetchRow(); return $row[0]; } else return "-"; } function generateMonthsCombo($name, $selected){ echo ""; } } ?>