![]() |
FOSSology
3.2.0rc1
Open Source License Compliance by Open Source Software
|
Common function for UI operations. More...
Go to the source code of this file.
Functions | |
| Array2SingleSelect ($KeyValArray, $SLName="unnamed", $SelectedVal="", $FirstEmpty=false, $SelElt=true, $Options="", $ReturnKey=true) | |
| Build a single choice select pulldown. More... | |
| Fatal ($msg, $filenm, $lineno) | |
| Write message to stdout and die. More... | |
| debugbacktrace () | |
| Debug back trace. | |
| debugprint ($val, $title) | |
| Print debug message. More... | |
| HumanSize ($bytes) | |
| Translate a byte number to a proper type, xxx bytes to xxx B/KB/MB/GB/TB/PB. More... | |
| GetFileExt ($fname) | |
| Get File Extension (text after last period) More... | |
| GetArrayVal ($Key, $Arr) | |
| Get the value from a array(map) More... | |
| HostListOption () | |
| Get host list. More... | |
| DownloadString2File ($text, $name, $contentType) | |
| Send a string to a user as a download file. More... | |
| GetUploadtreeTableName ($upload_pk) | |
| Get the uploadtree table name for this upload_pk If upload_pk does not exist, return "uploadtree". More... | |
| GetUploadName ($upload_pk) | |
| Get Upload Name through upload id. More... | |
| GetUploadID ($uploadtreeid) | |
| Get upload id through uploadtreeid. More... | |
| Get1stUploadtreeID ($upload) | |
| Get 1st uploadtree id through upload id. More... | |
| Convert2BrowserTime ($server_time) | |
| Convert the server time to browser time. More... | |
Common function for UI operations.
Definition in file common-ui.php.
| Array2SingleSelect | ( | $KeyValArray, | |
$SLName = "unnamed", |
|||
$SelectedVal = "", |
|||
$FirstEmpty = false, |
|||
$SelElt = true, |
|||
$Options = "", |
|||
$ReturnKey = true |
|||
| ) |
Build a single choice select pulldown.
| array | $KeyValArray | Assoc array. Use key/val pairs for list |
| string | $SLName | Select list name (default is "unnamed"), |
| string | $SelectedVal | Initially selected value or key, depends on $SelElt |
| bool | $FirstEmpty | True if the list starts off with an empty choice (default is false) |
| bool | $SelElt | True (default) if $SelectedVal is a value False if $SelectedVal is a key |
| string | $Options | Optional. Options to add to the select statement. For example, "id=myid onclick= ..." |
| bool | $ReturnKey | True (default) return the Key as value, if False return the Value |
Definition at line 41 of file common-ui.php.
| Convert2BrowserTime | ( | $server_time | ) |
Convert the server time to browser time.
| time | $server_time | to be converted |
Definition at line 298 of file common-ui.php.
| debugprint | ( | $val, | |
| $title | |||
| ) |
Print debug message.
| mixed | $val | Variable to be printed |
| string | $title | Title of the variable |
Definition at line 98 of file common-ui.php.
| DownloadString2File | ( | $text, | |
| $name, | |||
| $contentType | |||
| ) |
Send a string to a user as a download file.
| string | $text | Text to download as file |
| string | $name | File name |
| string | $contentType | Download file Content-Type |
Definition at line 184 of file common-ui.php.
| Fatal | ( | $msg, | |
| $filenm, | |||
| $lineno | |||
| ) |
Write message to stdout and die.
| string | $msg | Message to write |
| string | $filenm | File name (FILE) |
| int | $lineno | Line number of the caller (LINE) |
Definition at line 75 of file common-ui.php.
| Get1stUploadtreeID | ( | $upload | ) |
Get 1st uploadtree id through upload id.
| int | $upload | Upload id |
Definition at line 279 of file common-ui.php.
| GetArrayVal | ( | $Key, | |
| $Arr | |||
| ) |
Get the value from a array(map)
| mixed | $Key | Key to look |
| array | $Arr | Within the Array, you can get value according to the key |
Definition at line 143 of file common-ui.php.
| GetFileExt | ( | $fname | ) |
Get File Extension (text after last period)
| string | $fname | File name |
Definition at line 127 of file common-ui.php.
| GetUploadID | ( | $uploadtreeid | ) |
Get upload id through uploadtreeid.
| int | $uploadtreeid | Uploadtree id |
Definition at line 258 of file common-ui.php.
| GetUploadName | ( | $upload_pk | ) |
Get Upload Name through upload id.
| int | $upload_id | Upload ID |
Definition at line 237 of file common-ui.php.
| GetUploadtreeTableName | ( | $upload_pk | ) |
Get the uploadtree table name for this upload_pk If upload_pk does not exist, return "uploadtree".
| int | $upload_pk |
Definition at line 219 of file common-ui.php.
| HostListOption | ( | ) |
Get host list.
Definition at line 160 of file common-ui.php.
| HumanSize | ( | $bytes | ) |
Translate a byte number to a proper type, xxx bytes to xxx B/KB/MB/GB/TB/PB.
| int | $bytes | Bytes to be converted |
Definition at line 109 of file common-ui.php.