forked from kevinowino869/mitrobill
Widget For Customer
This commit is contained in:
22
system/widgets/customer/html_php.php
Normal file
22
system/widgets/customer/html_php.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
class html_php
|
||||
{
|
||||
|
||||
public function getWidget($data = null)
|
||||
{
|
||||
global $ui;
|
||||
$ui->assign('card_header', $data['title']);
|
||||
ob_start();
|
||||
try{
|
||||
eval('?>'. $data['content']);
|
||||
}catch(Exception $e){
|
||||
echo $e->getMessage();
|
||||
echo "<br>";
|
||||
echo $e->getTraceAsString();
|
||||
}
|
||||
$content = ob_get_clean();
|
||||
$ui->assign('card_body', $content);
|
||||
return $ui->fetch('widget/card_html.tpl');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user