Child pages
  • cPanel API 1 Functions - UI::showresult

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

This function prints a function's results within div tags.

Include Page
LIB:_cPanelAPI1NoEquivalent
LIB:_cPanelAPI1NoEquivalent

Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone
Expand
titleLiveAPI PHP Class
Code Block
languagephp
linenumberstrue
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$ui_display = $cpanel->api1('UI','showresult', array('resultkey') ); // Call the function.

Include Page
LIB:_LiveAPIPHPLink
LIB:_LiveAPIPHPLink

Expand
titleLiveAPI Perl Module
Code Block
languageperl
linenumberstrue
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $ui_display = $cpliveapi->api1('UI','showresult', ['resultkey'] ); # Call the function.

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink

 

Expand
titlecPanel Tag System (deprecated)

Include Page
LIB:_cPanelTagsWarning
LIB:_cPanelTagsWarning

Code Block
languagetext
<cpanel Module="UI::showresult( $FORM('resultkey'))">
Expand
titleCommand Line
Code Block
languagebash
cpapi1 --user=username UI showresult $Cpanel::Form

Include Page
LIB:_cPanelAPI1CLINote
LIB:_cPanelAPI1CLINote

Expand
titleOutput (HTML)
Code Block
<div>The contents of the result form data parameter</div>

   

Parameters

ParameterTypeDescriptionPossible valuesExample

resultkey

string

Required

The name of the function for which to display results.

 

A valid $Cpanel::Form value.

Note
titleNote:
  • This value must match the $Cpanel::FORM value for the same name.
  • You must call the function with the same form variable name.
$Cpanel::Form

Form Data

ParameterTypeDescriptionPossible valuesExample
errorBooleanWhether to display div class errors or the function's results.
  • 1 — Display div class errors.
  • 0 — Display result of the function.
0
resultstringThe parameter to display in the output.A string value.The contents of the result form data parameter.
resultkeystring

The name of the function for which to display results.

A valid $Cpanel::Form value.$Cpanel::Form


Returns

This function returns the result form parameter, in div tags.