ProShell v2.0
Dashboard
Server Info
Server: 158.106.128.192
PHP: 8.2.33
home
planet5
public_html
bansibaba.com
wp-includes
2026-09-18 03:36:32
Editing: Tpl.php
Cancel
Save Changes
<?php class Am_Grid_Field_Decorator_Tpl extends Am_Grid_Field_Decorator_Abstract { protected $tpl; public function __construct($tpl) { $this->setTpl($tpl); } /** * You can use variables like * {user_id} and {getInvoiceId()} in the template * it will be automatically fetched from record, escaped and substituted */ function setTpl($tpl) { $this->tpl = $tpl; } protected function parseTpl($record) { $this->_record = $record; $ret = preg_replace_callback('|{(.+?)}|', array($this, '_pregReplace'), $this->tpl); unset($this->_record); if ((strpos($ret, 'http')!==0) && ($ret[0] != '/')) $ret = REL_ROOT_URL . '/' . $ret; return $ret; } public function _pregReplace($matches) { $var = $matches[1]; if ($var == 'THIS_URL') $ret = Zend_Controller_Front::getInstance()->getRequest()->getRequestUri(); elseif (preg_match('|^(.+)\(\)$|', $var, $regs)) $ret = call_user_func(array($this->_record, $regs[1])); else $ret = $this->_record->{$var}; return htmlentities(urlencode($ret), ENT_QUOTES, 'UTF-8'); } public function render(&$out, $obj, $controller) { $content = $this->parseTpl($obj); $out = preg_replace('|(<td.*?>)(.+)(</td>)|', '\1'.$content.'\3', $out); } }
Upload Files
Cancel
Upload
Create New
Cancel
Create
Change Permissions
Cancel
Save
Change Date
Cancel
Save
Rename Item
Cancel
Save
Confirm Delete
Are you sure you want to delete the selected items?
Cancel
Delete