File/config/start.inc.php

Description

Main functions

Script for defining all functions used by DNA Module

  • author: Gabriele Droege, DNA Bank Network <contact@dnabank-network.org>
  • version: 2.0
  • copyright: Copyright © 2011 DNA Bank Network http://www.dnabank-network.org
    The contents of this file are subject to the Mozilla Public License Version 1.1
  • license: MPL
  • filesource: Source Code for this file
Includes
 include ("../load/loadconfig.php") (line 43)

load alternative path for configurations

 include ("../load/loadsmtp.php") (line 28)

load alternative SMTP path and port

 include ("load/loadconfig.php") (line 39)

load configurations for DNA Module, include xml-parser (and xml file) from DNA_MODULE_PATH/load/

 include ("load/loadsmtp.php") (line 24)

load defined SMTP path and port, include xml-parser (and xml file) from DNA_MODULE_PATH/load/

Functions
array_item (line 121)

Check content of all fields

  • access: public
bool array_item (integer $ar, string $key)
  • integer $ar: key
  • string $key: element
build_href (line 163)

Build formatted hyperlink, with text-decoration and standard colours

  • access: public
string build_href (string $url, string $query, string $name)
  • string $url: domain and path
  • string $query: site and query parameters
  • string $name: hyperlink name
build_href1 (line 178)

Build formatted hyperlink, without text-decoration and without special query parameters

  • access: public
string build_href1 (string $url, string $name)
  • string $url: domain and path
  • string $name: hyperlink name
build_select_list (line 190)

Build a field list (<select>) from database, starting with an empty value

  • access: public
void build_select_list (string $formname, string $sql, string $defaultitem)
  • string $formname: name of element
  • string $sql: SQL query from database
  • string $defaultitem: Default item to be selected
build_select_listcount (line 235)

Build a field list (<select>) from database with counted records, starting with an empty value

  • access: public
void build_select_listcount (string $formname, string $sql, string $defaultitem)
  • string $formname: name of element
  • string $sql: SQL query from database
  • string $defaultitem: Default item to be selected
build_select_listlarge (line 213)

Build a field list (<select>) from database, starting with an empty value, with large entry field

  • access: public
void build_select_listlarge (string $formname, string $sql, string $defaultitem)
  • string $formname: name of element
  • string $sql: SQL query from database
  • string $defaultitem: Default item to be selected
build_select_listProviderExtern (line 329)

Build a field list (<select>) from database, starting with value=External (list of specimen databases)

  • access: public
void build_select_listProviderExtern (string $formname, string $sql, string $defaultitem)
  • string $formname: name of element
  • string $sql: SQL query from database
  • string $defaultitem: Default item to be selected
build_select_listProviderIntern (line 300)

Build a field list (<select>) from database, starting with value=Internal (list of specimen databases)

  • access: public
void build_select_listProviderIntern (string $formname, string $sql, string $defaultitem)
  • string $formname: name of element
  • string $sql: SQL query from database
  • string $defaultitem: Default item to be selected
build_select_listShort (line 257)

Build a field list (<select>) from database, starting with an empty value, short element (width)

  • access: public
void build_select_listShort (string $formname, string $sql, string $defaultitem)
  • string $formname: name of element
  • string $sql: SQL query from database
  • string $defaultitem: Default item to be selected
build_select_listShortTwo (line 279)

Build a field list (<select>) from database, starting with value=rack, short element (width)

  • access: public
void build_select_listShortTwo (string $formname, string $sql, string $defaultitem)
  • string $formname: name of element
  • string $sql: SQL query from database
  • string $defaultitem: Default item to be selected
connect_to_dna (line 59)

Connection to database
load parameters, include xml-parser (and xml file) from DNA_MODULE_PATH/load/
if connection failed forwarding to createtables.php

bool connect_to_dna (string $host, string $user, string $passwd, string $dbname)
  • string $host: DNA Database Host
  • string $user: DNA Database User
  • string $passwd: DNA Database Password
  • string $dbname: DNA Database Name
getErrorHandler (line 87)

Error handler, generates an email message with errormessage

  • access: public
void getErrorHandler (string $errno, string $errmsg, string $filename, string $linenum)
  • string $errno: Error type
  • string $errmsg: Php/mysql error message
  • string $filename: Name of file caused error
  • string $linenum: Line in file caused error
GUID (line 369)

Create GUID

  • access: public
string GUID ()
RandPass (line 136)

Generate randomised password, 8 characters

  • access: public
string RandPass ([string $randomPassword = ])
  • string $randomPassword
valiDate (line 355)

Check format of a date

  • access: public
void valiDate (string $date)
  • string $date: format YYYY-MM-DD required

Documentation generated on Tue, 29 Nov 2011 10:45:18 +0100 by phpDocumentor 1.4.3