Clean Printing of and array in a table
ONLY FOR DEBUG
static public printCleanArray ( $tab, $pad, $jsexpand = false ) : nothing | ||
$tab | the array to display | |
$pad | Pad used (default 0) | |
$jsexpand | Expand using JS ? (default false) | |
return | nothing |
/** * Display information from LDAP server for user **/ private function showLdapDebug() { if ($this->fields['authtype'] != Auth::LDAP) { return false; } echo "<div class='spaced'>"; echo "<table class='tab_cadre_fixe'>"; echo "<tr><th colspan='4'>" . __('LDAP directory') . "</th></tr>"; echo "<tr class='tab_bg_2'><td>" . __('User DN') . "</td>"; echo "<td>" . $this->fields['user_dn'] . "</td></tr>\n"; if ($this->fields['user_dn']) { echo "<tr class='tab_bg_2'><td>" . __('User information') . "</td><td>"; $config_ldap = new AuthLDAP(); $ds = false; if ($config_ldap->getFromDB($this->fields['auths_id'])) { $ds = $config_ldap->connect(); } if ($ds) { $info = AuthLdap::getUserByDn($ds, $this->fields['user_dn'], array('*', 'createTimeStamp', 'modifyTimestamp')); if (is_array($info)) { Html::printCleanArray($info); } else { _e('No item to display'); } } else { _e('Connection failed'); } echo "</td></tr>\n"; } echo "</table></div>"; }
function testViewHtml($limit, $where) { global $PluginSccmSccm; $PluginSccmSccm->getDevices($where); foreach ($PluginSccmSccm->devices as $device_values) { $PluginSccmSccmxml = new PluginSccmSccmxml($device_values); $PluginSccmSccmxml->setAccessLog(); $PluginSccmSccmxml->setAccountInfos(); $PluginSccmSccmxml->setHardware(); $PluginSccmSccmxml->setOS(); $PluginSccmSccmxml->setBios(); $PluginSccmSccmxml->setProcessors(); $PluginSccmSccmxml->setSoftwares(); $PluginSccmSccmxml->setUsers(); $PluginSccmSccmxml->setNetworks(); $PluginSccmSccmxml->setDrives(); $SXML = $PluginSccmSccmxml->sxml; Html::printCleanArray($PluginSccmSccmxml->object2array($SXML)); } }
/** * Show API Debug **/ protected function showDebug() { Html::printCleanArray($this); }
function plugin_example_dynamicReport($parm) { if ($parm["item_type"] == 'PluginExampleExample') { // Do all what you want for export depending on $parm echo "Personalized export for type " . $parm["display_type"]; echo 'with additional datas : <br>'; echo "Single data : add1 <br>"; print $parm['add1'] . '<br>'; echo "Array data : add2 <br>"; Html::printCleanArray($parm['add2']); // Return true if personalized display is done return true; } // Return false if no specific display is done, then use standard display return false; }