3 require_once 'ConvertStyle.php';
5 class Pman_Core_MailTemplateList extends Pman_Core_ConvertStyle
8 function get($v, $opts=array())
10 $fopts = HTML_FlexyFramework::get()->HTML_Template_Flexy;
12 $templateDir = explode(PATH_SEPARATOR, $fopts['templateDir']);
14 $base = 'http://' . $_SERVER['SERVER_NAME'] . $this->rootURL;
16 // $path = '/home/edward/gitlive/web.madeinnz/Pman/Shop/templates/mail/register.body.html';
18 // $data = $this->convertStyle($base, $path, false);
20 // print_r($data);exit;
24 foreach ($templateDir as $dir){
26 if(!file_exists($dir . '/mail')){
30 if ($handle = opendir($dir . '/mail')) {
31 while (false !== ($entry = readdir($handle))) {
32 if ($entry == "." || $entry == ".." || !preg_match('/\.html$/', $entry)) {
36 $path = "$dir/mail/$entry";
40 'content' => $this->convertStyle($base, $path, false)