1.3 phptools.htm 0); $WithPointLen=$ResultLen + 1; $NewLen= $WithPointLen; $NewLen += $Num; if ($TextLen > $NewLen); $Result = substr($Text, 0, $NewLen); else; $Result = $Text; $hilf = $TextLen; while ($NewLen > $hilf); $Result += "0"; $hilf++; endwhile; endif; endif; return $Result; ); /*-------------------------------------------------------------------- ---- Wandelt alle Leerzeichen in einem String in Pluszeichen um ---------------------------------------------------------------------- --*/ Function StringToURL $Text ( $string = ""; $tok=strtok($Text," "); while ($tok); $string += $tok; $tok = strtok(" "); if ($tok); $string += "+"; endif; endwhile; return $string; ); /*-------------------------------------------------------------------- ---- Haengt eine Variable an eine URL an ---------------------------------------------------------------------- --*/ Function AppendURL $Name, $Value, $First ( $string = ""; if ($First); $string+="?"; else; $string+="&"; endif; $string += $Name + "=" + StringToURL($Value); return $string; ); /*-------------------------------------------------------------------- ---- Funktion zum Auslesen einer ID, die in einem String gespeichert ist ---------------------------------------------------------------------- --*/ Function GetID $Text( $hilf=""; if ( $Text); $hilf = strtok($Text, " "); endif; return $hilf; ); /*-------------------------------------------------------------------- ---- Funktion zum Fuellen vom Comboboxen ---------------------------------------------------------------------- ---*/ Function FillCombo $connection, $key, $name, $table, $variable, $value ( $query="select "+$key + "," + $name + " from " + $table + " order by " + $name; $combo=""; $result=pg_Exec($connection, $query); $res_num=pg_NumRows($result); $combo = "\n"; return $combo; ); /*-------------------------------------------------------------------- --- Tabelleneintrag mit einer bestimmten Ausrichtung definiert ---------------------------------------------------------------------- --*/ Function TableItem $Text, $Richtung ( echo " " + $Text + "\n"; ); /*-------------------------------------------------------------------- --- Funktion fuer versteckte Eingabefelder ---------------------------------------------------------------------- --*/ Function InputHiddenType $Name, $Wert ( echo "\n"; ); /*-------------------------------------------------------------------- --- Funktion fuer die Einbindung einer URL in ein Dokument ---------------------------------------------------------------------- --*/ Function Anker $Url, $Name ( $hilf= "" + $Name + "\n"; return $hilf; ); /*-------------------------------------------------------------------- --- Funktion fuer die Einbindung einer URL in ein Dokument (geklammert) ---------------------------------------------------------------------- --*/ Function ButtonBar $Url, $Name ( $hilf= "[" + $Name + "]\n"; /* $hilf= "\n"; */ return $hilf; ); /*-------------------------------------------------------------------- --- Funktion fuer die Einbindung einer URL in ein Dokument ---------------------------------------------------------------------- --*/ Function Form $Filename ( echo "
\n"; ); /*-------------------------------------------------------------------- --- Funktion fuer ein Eingabetextfeld ---------------------------------------------------------------------- --*/ Function InputText $Name, $Value, $Size ( $hilf= ""; return $hilf; ); /*-------------------------------------------------------------------- --- Funktion um einen Tabelleheader zu erzeugen ---------------------------------------------------------------------- -*/ Function CreateTable $Cellpadding, $Cellspacing, $Border ( $text = "