当前位置: 首页>>代码示例>>PHP>>正文


PHP gcms::loadtemplate方法代码示例

本文整理汇总了PHP中gcms::loadtemplate方法的典型用法代码示例。如果您正苦于以下问题:PHP gcms::loadtemplate方法的具体用法?PHP gcms::loadtemplate怎么用?PHP gcms::loadtemplate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gcms的用法示例。


在下文中一共展示了gcms::loadtemplate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 if (!empty($where)) {
     $sql = "SELECT C.`id`,C.`topic`,C.`youtube` FROM `" . DB_VIDEO . "` AS C";
     $sql .= " INNER JOIN `" . DB_MODULES . "` AS M ON M.`owner`='video' AND M.`id`=C.`module_id` {$where}";
     $list = $cache->get($sql);
     if (!$list) {
         $list = $db->customQuery($sql);
         $cache->save($sql, $list);
     }
     if (empty($cols) && sizeof($list) == 1) {
         $youtube = $list[0]['youtube'];
     }
 }
 $widget = array();
 if (empty($youtube)) {
     $patt = array('/{ID}/', '/{THUMB}/', '/{YOUTUBE}/', '/{TOPIC}/', '/{DESCRIPTION}/', '/{VIEWS}/', '/{COLS}/');
     $skin = gcms::loadtemplate('video', 'video', 'listitem');
     $a = gcms::rndname(5);
     $widget[] = '<div class=video_list id=video_list_' . $a . '><div class="ggrid margin-box">';
     foreach ($list as $i => $item) {
         $replace = array();
         $replace[] = $item['id'];
         $replace[] = is_file(DATA_PATH . "video/{$item['youtube']}.jpg") ? DATA_URL . "video/{$item['youtube']}.jpg" : WEB_URL . '/modules/video/img/nopicture.jpg';
         $replace[] = $item['youtube'];
         $replace[] = $item['topic'];
         $replace[] = gcms::getVars($item, 'description', '');
         $replace[] = gcms::getVars($item, 'views', '');
         $replace[] = $cols;
         $widget[] = preg_replace($patt, $replace, $skin);
     }
     $widget[] = '</div></div>';
     $widget[] = '<script>';
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:index.php

示例2: array

<?php

// modules/member/forgot.php
if (defined('MAIN_INIT')) {
    // title
    $title = $lng['LNG_FORGOT_TITLE'];
    // breadcrumbs
    $breadcrumb = gcms::loadtemplate('', '', 'breadcrumb');
    $breadcrumbs = array();
    // หน้าหลัก
    $breadcrumbs['HOME'] = gcms::breadcrumb('icon-home', WEB_URL . '/index.php', $install_modules[$module_list[0]]['menu_tooltip'], $install_modules[$module_list[0]]['menu_text'], $breadcrumb);
    // url ของหน้านี้
    $breadcrumbs['MODULE'] = gcms::breadcrumb('', gcms::getURL('forgot'), $lng['LNG_FORGOT_TITLE'], $lng['LNG_FORGOT_TITLE'], $breadcrumb);
    if (isset($config['custom_forgot']) && is_file(ROOT_PATH . $config['custom_forgot'])) {
        // custom register form
        include ROOT_PATH . $config['custom_forgot'];
    } else {
        // แสดงฟอร์ม member/forgotfrm.html
        $patt = array('/{BREADCRUMS}/', '/{(LNG_[A-Z0-9_]+)}/e', '/{WEBURL}/', '/{MODAL}/');
        $replace = array();
        $replace[] = implode("\n", $breadcrumbs);
        $replace[] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
        $replace[] = WEB_URL;
        $replace[] = gcms::getVars($_POST, 'action', '') == 'modal' ? 'true' : 'false';
        $content = gcms::pregReplace($patt, $replace, gcms::loadtemplate('member', 'member', 'forgotfrm'));
    }
    // เลือกเมนู
    $menu = 'forgot';
}
开发者ID:phannack,项目名称:GCMS,代码行数:29,代码来源:forgot.php

示例3: isset

if (defined('MAIN_INIT') && preg_match('/^[a-z0-9]{4,}$/', $module) && isset($install_modules[$module])) {
    // module
    $index = $install_modules[$module];
    // อ่าน config
    gcms::r2config($index['config'], $index);
    // ค่าที่ส่งมา
    $id = $index['module_id'];
    $cat = isset($cat) ? $cat : 0;
    $new_date = (int) $index['new_date'];
    $interval = isset($interval) ? (int) $interval : 0;
    $cols = isset($cols) ? (int) $cols : 1;
    $rows = isset($rows) ? (int) $rows : 0;
    $show = isset($show) && preg_match('/^[a-z0-9]+$/', $show) ? $show : '';
    if ($rows > 0) {
        $count = $rows * $cols;
    } else {
        $count = isset($count) ? (int) $count : 0;
        $count = $count == 0 ? $index['news_count'] : $count;
    }
    $sort = isset($sort) ? (int) $sort : $index['news_sort'];
    if ($count > 0) {
        $styles = isset($styles) && in_array($styles, array('list', 'icon', 'thumb')) ? $styles : 'list';
        // แสดงผล
        $patt = array('/{ID}/', '/{DETAIL}/', '/{MODULE}/');
        $replace = array();
        $replace[0] = "widget_" . (empty($index['module']) ? '' : $index['module']) . "_{$id}_{$cat}_{$count}_{$new_date}_{$sort}_{$cols}_{$styles}_{$show}";
        $replace[1] = "<script>getWidgetNews('{$replace['0']}', 'document', {$interval});</script>";
        $replace[2] = $index['module'];
        $widget = preg_replace($patt, $replace, gcms::loadtemplate($index['module'], 'document', 'widget'));
    }
}
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:index.php

示例4: array

            $t = $m;
        }
        $canonical = gcms::getURL($index['module']);
        $breadcrumbs['MODULE'] = gcms::breadcrumb('', $canonical, $t, $m, $breadcrumb);
        // อัลบัม
        $canonical = gcms::getURL($index['module'], '', 0, 0, "id={$index['category_id']}");
        $index['category'] = gcms::ser2Str($index, 'category');
        $breadcrumbs['CATEGORY'] = gcms::breadcrumb('', $canonical, $index['category'], $index['category'], $breadcrumb);
        // แสดงผล list รายการ
        $patt = array('/{BREADCRUMS}/', '/{NAME}/', '/{POSITION}/', '/{CATEGORY}/', '/{DETAIL}/', '/{ADDRESS}/', '/{PHONE}/', '/{EMAIL}/', '/{PICTURE}/');
        $replace = array();
        $replace[] = implode("\n", $breadcrumbs);
        $replace[] = $index['name'];
        $replace[] = $index['position'];
        $replace[] = $index['category'];
        $replace[] = $index['detail'];
        $replace[] = $index['address'];
        $replace[] = $index['phone'];
        $replace[] = $index['email'];
        $replace[] = $index['picture'] != '' && is_file(DATA_PATH . "personnel/{$index['picture']}") ? DATA_URL . "personnel/{$index['picture']}" : WEB_URL . '/modules/personnel/img/noicon.jpg';
        $content = preg_replace($patt, $replace, gcms::loadtemplate($index['module'], 'personnel', 'view'));
        // ตัวแปรหลังจากแสดงผลแล้ว
        $custom_patt['/{W}/'] = $config['personnel_image_w'];
        // title,keywords,description
        $title = $index['topic'];
        $keywords = $index['keywords'];
        $description = $index['description'];
    }
    // เลือกเมนู
    $menu = empty($install_modules[$index['module']]['alias']) ? $index['module'] : $install_modules[$index['module']]['alias'];
}
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:view.php

示例5: array

            $breadcrumbs['HOME'] = gcms::breadcrumb('icon-home', $canonical, $install_modules[$module_list[0]]['menu_tooltip'], $install_modules[$module_list[0]]['menu_text'], $breadcrumb);
            // breadcrumb ของ โมดูล
            $breadcrumbs['MODULE'] = gcms::breadcrumb('', gcms::getURL($index['module']), $install_modules[$index['module']]['menu_tooltip'], $install_modules[$index['module']]['menu_text'], $breadcrumb);
            // antispam
            $register_antispamchar = gcms::rndname(32);
            $_SESSION[$register_antispamchar] = gcms::rndname(4);
            // แสดงผล
            $patt = array('/{BREADCRUMS}/', '/{ANTISPAM}/', '/{ANTISPAMVAL}/', '/{QID}/', '/{RID}/', '/{DETAIL}/', '/{MODULEID}/', '/{TOPIC}/');
            $replace = array();
            $replace[] = implode("\n", $breadcrumbs);
            $replace[] = $register_antispamchar;
            $replace[] = $isAdmin ? $_SESSION[$register_antispamchar] : '';
            $replace[] = $index['index_id'];
            $replace[] = $index['id'];
            $replace[] = htmlspecialchars(preg_replace('/&#39;/', "'", $index['detail']));
            $replace[] = $index['module_id'];
            $replace[] = $index['topic'];
            $content = preg_replace($patt, $replace, gcms::loadtemplate($index['module'], 'document', 'editreply'));
            // title,keywords,description
            $title = "{$lng['LNG_EDIT']} {$index['topic']}";
            $keywords = $title;
            $description = $title;
        } else {
            $title = $lng['LNG_DATA_NOT_FOUND'];
            $content = '<div class=error>' . $title . '</div>';
        }
    } else {
        $title = $lng['LNG_DOCUMENT_NOT_FOUND'];
        $content = '<div class=error>' . $title . '</div>';
    }
}
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:edit.php

示例6: array

    // title
    $title = $lng['LNG_REGISTER_TITLE'];
    // breadcrumbs
    $breadcrumb = gcms::loadtemplate('', '', 'breadcrumb');
    $breadcrumbs = array();
    // หน้าหลัก
    $breadcrumbs['HOME'] = gcms::breadcrumb('icon-home', WEB_URL . '/index.php', $install_modules[$module_list[0]]['menu_tooltip'], $install_modules[$module_list[0]]['menu_text'], $breadcrumb);
    // url ของหน้านี้
    $breadcrumbs['MODULE'] = gcms::breadcrumb('', gcms::getURL('register'), $lng['LNG_REGISTER_TITLE'], $lng['LNG_REGISTER_TITLE'], $breadcrumb);
    if (isset($config['custom_register']) && is_file(ROOT_PATH . $config['custom_register'])) {
        // custom register form
        include ROOT_PATH . $config['custom_register'];
    } else {
        // antispam
        $register_antispamchar = gcms::rndname(32);
        $_SESSION[$register_antispamchar] = gcms::rndname(4);
        // แสดงฟอร์ม registerfrm.html
        $patt = array('/{BREADCRUMS}/', '/<PHONE>(.*)<\\/PHONE>/isu', '/<IDCARD>(.*)<\\/IDCARD>/isu', '/<INVITE>(.*)<\\/INVITE>/isu', '/{(LNG_[A-Z0-9_]+)}/e', '/{ANTISPAM}/', '/{WEBURL}/', '/{MODAL}/', '/{INVITE}/');
        $replace = array();
        $replace[] = implode("\n", $breadcrumbs);
        $replace[] = empty($config['member_phone']) ? '' : '\\1';
        $replace[] = empty($config['member_idcard']) ? '' : '\\1';
        $replace[] = empty($config['member_invitation']) ? '' : '\\1';
        $replace[] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
        $replace[] = $register_antispamchar;
        $replace[] = WEB_URL;
        $replace[] = gcms::getVars($_POST, 'action', '') != 'modal' ? 'false' : 'true';
        $replace[] = gcms::getVars($_COOKIE, PREFIX . '_invite', '');
        $content = gcms::pregReplace($patt, $replace, gcms::loadtemplate('member', 'member', 'registerfrm'));
    }
}
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:register.php

示例7: date

 if (!empty($match[9]) && preg_match('/^[a-z0-9]+$/', $match[9])) {
     $sql .= " AND Q.`show_news` LIKE '%" . $match[9] . "=1%'";
 }
 $sql .= " AND Q.`published`='1' AND Q.`published_date`<='" . date('Y-m-d', $mmktime) . "' AND Q.`index`='0'";
 $sql .= " ORDER BY " . $sorts[$match[6]] . " LIMIT {$match['4']}";
 $datas = $cache->get($sql);
 if (!$datas) {
     $datas = $db->customQuery($sql);
     $cache->save($sql, $datas);
 }
 // styles
 $styles = in_array($match[8], array('list', 'icon', 'thumb')) ? $match[8] : 'list';
 // เครื่องหมาย new
 $valid_date = $mmktime - $match[5];
 // template
 $skin = gcms::loadtemplate($index['module'], 'document', 'widgetitem');
 $patt = array('/{BG}/', '/{URL}/', '/{TOPIC}/', '/{DETAIL}/', '/{CATEGORY}/', '/{DATE}/', '/{UID}/', '/{SENDER}/', '/{STATUS}/', '/{COMMENTS}/', '/{VISITED}/', '/{THUMB}/', '/{ICON}/');
 $widget = array();
 $bg = 'bg2';
 foreach ($datas as $i => $item) {
     if ($i > 0 && $i % $match[7] == 0) {
         $widget[] = '</div><div class="row ' . $styles . 'view">';
     }
     $bg = $bg == 'bg1' ? 'bg2' : 'bg1';
     $replace = array();
     $replace[] = "{$bg} background" . rand(0, 5);
     if ($config['module_url'] == '1') {
         $replace[] = gcms::getURL($index['module'], $item['alias']);
     } else {
         $replace[] = gcms::getURL($index['module'], '', 0, $item['id']);
     }
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:getnews.php

示例8: preg_replace

                $replace[] = $item['youtube'];
                $replace[] = $item['topic'];
                $replace[] = $item['description'];
                $replace[] = $item['views'];
                $items[] = preg_replace($patt, $replace, $skin);
            }
            // URL สำหรับแบ่งหน้า
            $url = '<a href="' . gcms::getURL($index['module'], '', 0, 0, "page=%d") . '">%d</a>';
            // แสดงผล list รายการ
            $patt = array('/{BREADCRUMS}/', '/{TOPIC}/', '/{DETAIL}/', '/{LIST}/', '/{SPLITPAGE}/', '/{COLS}/', '/{ID}/');
            $replace = array();
            $replace[] = implode("\n", $breadcrumbs);
            $replace[] = $index['topic'];
            $replace[] = nl2br($index['detail']);
            $replace[] = implode("\n", $items);
            $replace[] = gcms::pagination($totalpage, $page, $url);
            $replace[] = $config['video_cols'];
            $replace[] = $index['module_id'];
            $content = preg_replace($patt, $replace, gcms::loadtemplate($index['module'], 'video', 'list'));
        }
        // title,keywords,description
        $title = $index['topic'];
        $keywords = $index['keywords'];
        $description = $index['description'];
        // เลือกเมนู
        $menu = empty($install_modules[$index['module']]['alias']) ? $index['module'] : $install_modules[$index['module']]['alias'];
    } else {
        $title = $lng['LNG_DATA_NOT_FOUND'];
        $content = '<div class=error>' . $title . '</div>';
    }
}
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:list.php

示例9: array

        }
        // tabs
        $tabs = array();
        foreach ($member_tabs as $key => $values) {
            if ($values[0] != '') {
                if ($key == $tab) {
                    $class = "tab select {$key}";
                    $title = $title == '' ? $lng[mb_substr($values[0], 1, -1)] : $title;
                } else {
                    $class = "tab {$key}";
                }
                if (preg_match('/^http:\\/\\/.*/', $values[1])) {
                    $tabs[] = '<li class="' . $class . '"><a href="' . $values[1] . '">' . $values[0] . '</a></li>';
                } else {
                    $tabs[] = '<li class="' . $class . '"><a href="{WEBURL}/index.php?module=editprofile&amp;tab=' . $key . '">' . $values[0] . '</a></li>';
                }
            }
        }
        $patt = array('/{BREADCRUMS}/', '/{TAB}/', '/{DETAIL}/');
        $replace = array();
        $replace[] = implode("\n", $breadcrumbs);
        $replace[] = implode('', $tabs);
        $replace[] = $content;
        $content = preg_replace($patt, $replace, gcms::loadtemplate('member', 'member', 'main'));
        // เลือกเมนูตาม tab
        $menu = $tab;
    }
} else {
    $title = $lng['LNG_LOGIN_NOT_FOUND'];
    $content = '<div class=error>' . $title . '</div>';
}
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:editprofile.php

示例10: foreach

        foreach ($datas as $item) {
            $replace = array();
            $replace[] = $item['color'];
            $replace[] = gcms::getUrl($index['module'], '', 0, 0, "id={$item['id']}");
            $replace[] = $item['topic'];
            $replace[] = $item['description'];
            preg_match('/^(([0-9]+):([0-9]+)):[0-9]+$/', $item['t'], $m);
            $replace[] = $m[1];
            $calendar[] = preg_replace($patt, $replace, $skin);
        }
        // แสดงผล
        $patt = array('/{BREADCRUMS}/', '/{LIST}/', '/{TOPIC}/', '/{(LNG_[A-Z0-9_]+)}/e', '/{YEAR}/', '/{MONTH}/', '/{DATE}/', '/{URL}/');
        $replace = array();
        $replace[] = implode("\n", $breadcrumbs);
        $replace[] = implode('', $calendar);
        $replace[] = $index['topic'];
        $replace[] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
        $replace[] = (int) $match[1] + $lng['YEAR_OFFSET'];
        $replace[] = $lng['MONTH_SHORT'][(int) $match[2] - 1];
        $replace[] = (int) $match[3];
        $replace[] = $canonical;
        $content = gcms::pregReplace($patt, $replace, gcms::loadtemplate($index['module'], 'event', 'day'));
        // title,keywords,description
        $title = $index['topic'];
        $keywords = $index['keywords'];
        $description = $index['detail'];
    }
} else {
    $title = $lng['LNG_DATA_NOT_FOUND'];
    $content = '<div class=error>' . $title . '</div>';
}
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:day.php

示例11: array

        $content = '<div class=error>' . $title . '</div>';
    } else {
        // antispam
        $register_antispamchar = gcms::rndname(32);
        $_SESSION[$register_antispamchar] = gcms::rndname(4);
        // title
        $title = $lng['LNG_SENDMAIL_TITLE'];
        // breadcrumbs
        $breadcrumb = gcms::loadtemplate('', '', 'breadcrumb');
        $breadcrumbs = array();
        // หน้าหลัก
        $breadcrumbs['HOME'] = gcms::breadcrumb('icon-home', WEB_URL . '/index.php', $install_modules[$module_list[0]]['menu_tooltip'], $install_modules[$module_list[0]]['menu_text'], $breadcrumb);
        // แสดงผล member/sendmail.html
        $patt = array('/{BREADCRUMS}/', '/{(LNG_[A-Z0-9_]+)}/e', '/{TITLE}/', '/{SENDER}/', '/{RECIEVER}/', '/{RECIEVERID}/', '/{ANTISPAM}/', '/{ANTISPAMVAL}/');
        $replace = array();
        $replace[] = implode("\n", $breadcrumbs);
        $replace[] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
        $replace[] = $title;
        $replace[] = $isMember ? $_SESSION['login']['email'] : '';
        $replace[] = implode(',', $emails);
        $replace[] = implode(',', $ids);
        $replace[] = $register_antispamchar;
        $replace[] = $isAdmin ? $_SESSION[$register_antispamchar] : '';
        $content = gcms::pregReplace($patt, $replace, gcms::loadtemplate('member', 'member', 'sendmail'));
        // เลือกเมนู
        $menu = 'sendmail';
    }
} else {
    $title = $lng['LNG_NOT_LOGIN'];
    $content = '<div class=error>' . $title . '</div>';
}
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:sendmail.php

示例12: array

<?php

// modules/board/categories.php
if (defined('MAIN_INIT') && is_array($index)) {
    // list รายการหมวดหมู่
    $listitem = gcms::loadtemplate($index['module'], 'board', 'categoryitem');
    $patt = array('/{THUMB}/', '/{URL}/', '/{TOPIC}/', '/{COUNT}/', '/{COMMENTS}/', '/{DETAIL}/');
    $sql = "SELECT * FROM `" . DB_CATEGORY . "` WHERE `module_id`='{$index['id']}' ORDER BY `category_id` DESC";
    $datas = $cache->get($sql);
    if (!$datas) {
        $datas = $db->customQuery($sql);
        $cache->save($sql, $datas);
    }
    foreach ($datas as $item) {
        $replace = array();
        $icon = gcms::ser2Str($item, 'icon');
        if ($icon != '' && is_file(DATA_PATH . "board/{$icon}")) {
            $replace[] = DATA_URL . "board/{$icon}";
        } else {
            $replace[] = WEB_URL . "/{$index['default_icon']}";
        }
        $replace[] = gcms::getURL($index['module'], '', $item['category_id']);
        $replace[] = gcms::ser2Str($item, 'topic');
        $replace[] = $item['c1'];
        $replace[] = $item['c2'];
        $replace[] = gcms::ser2Str($item, 'detail');
        $list[] = preg_replace($patt, $replace, $listitem);
    }
    // canonical
    if ($index['module'] != $module_list[0]) {
        $canonical = gcms::getURL($index['module']);
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:categories.php

示例13: array

    // breadcrumbs
    $breadcrumb = gcms::loadtemplate('', '', 'breadcrumb');
    $breadcrumbs = array();
    // หน้าหลัก
    $breadcrumbs['HOME'] = gcms::breadcrumb('icon-home', WEB_URL . '/index.php', $install_modules[$module_list[0]]['menu_tooltip'], $install_modules[$module_list[0]]['menu_text'], $breadcrumb);
    // หน้าค้นหา
    $canonical = WEB_URL . '/index.php?module=search&q=' . urlencode($search);
    $breadcrumbs['MODULE'] = gcms::breadcrumb('', $canonical, '{LNG_SEARCH}', '{LNG_SEARCH}', $breadcrumb);
    // แสดงผล
    $patt = array('/{BREADCRUMS}/', '/{(LNG_[A-Z0-9_]+)}/e', '/{WEBURL}/', '/{MODULE}/', '/{SEARCH}/', '/{RESULT}/', '/{LIST}/', '/{SPLITPAGE}/');
    $replace = array();
    $replace[] = implode("\n", $breadcrumbs);
    $replace[] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
    $replace[] = WEB_URL;
    $replace[] = $module;
    $replace[] = $search;
    $replace[] = sizeof($list) == 0 ? '' : sprintf($lng['ALL_SEARCH'], $start + 1, $end, $rows, $search, number_format($time_end - $time_start, 4));
    if ($search == '') {
        $replace[] = $lng['LNG_SEARCH_TIP'];
    } elseif (sizeof($list) == 0) {
        $replace[] = sprintf($lng['LNG_SEARCH_NOT_FOUND'], $search) . $lng['LNG_SEARCH_TIP'];
    } else {
        $replace[] = gcms::HighlightSearch(implode("\n", $list), $search);
    }
    $replace[] = $splitpage;
    $content = gcms::pregReplace($patt, $replace, gcms::loadtemplate('search', 'search', 'search'));
    // title, keywords, description
    $title = ($search == '' ? "" : "{$search} - ") . $lng['LNG_SEARCH'];
    $keywords = "{$title} {$keywords}";
    $description = "{$title} {$description}";
}
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:main.php

示例14: elseif

        } elseif ($result['displayname'] != '') {
            $u[] = $result['displayname'];
        } else {
            $u[] = $result['email'];
        }
        $replace[] = implode(' ', $u);
        if (is_file(ROOT_PATH . 'modules/pm/send.php')) {
            $replace[] = '<a class=icon-email-sent title="{LNG_PM_SEND_TITLE}" href="index.php?module=pm-send&amp;to=' . $result['id'] . '">&nbsp;</a>';
        } else {
            $replace[] = '<a class=icon-email-sent title="{LNG_MAIL_TO}" href="index.php?module=sendmail&amp;to=' . $result['id'] . '">&nbsp;</a>';
        }
        $replace[] = in_array($result['sex'], array_keys($lng['SEX'])) ? $result['sex'] : 'u';
        $replace[] = gcms::mktime2date($result['create_date'], 'd M Y');
        $replace[] = $result['website'] == '' ? '-' : "<a href=\"http://{$result['website']}\" target=_blank>{$result['website']}</a>";
        $replace[] = number_format($result['visited']);
        $replace[] = $result['fb'] == 1 ? 'icon-facebook' : '';
        $replace[] = gcms::mktime2date($result['lastvisited'], 'd M Y');
        $replace[] = $result['post'];
        $replace[] = $result['reply'];
        $replace[] = $config['member_status'][(int) $result['status']];
        $replace[] = $result['point'];
        $replace[] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
        $content = gcms::pregReplace($patt, $replace, gcms::loadtemplate('member', 'member', 'view'));
    } else {
        $title = $lng['LNG_ID_NOT_FOUND'];
        $content = '<div class=error>' . $title . '</div>';
    }
} else {
    $title = $lng['LNG_DATA_NOT_FOUND'];
    $content = '<div class=error>' . $title . '</div>';
}
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:main.php

示例15: array

 $start = $index['list_per_page'] * ($page - 1);
 // เรียงลำดับ
 $sorts = array('I.`last_update` DESC,I.`id` DESC', 'I.`create_date` DESC,I.`id` DESC', 'I.`published_date` DESC,I.`last_update` DESC', 'I.`id` DESC');
 // query
 $sql = "SELECT M.`module`,I.`id`,D.`topic`,I.`alias`,D.`description`,I.`last_update`,I.`create_date`,I.`comment_date`,I.`visited`,I.`comments`,I.`picture`,I.`member_id`,U.`status`,U.`displayname`,U.`email`";
 $sql .= " {$sql1} LEFT JOIN `" . DB_USER . "` AS U ON U.`id`=I.`member_id` {$where}";
 $sql .= " ORDER BY " . $sorts[$index['sort']] . " LIMIT {$start},{$index['list_per_page']}";
 $datas = $cache->get($sql);
 if (!$datas) {
     $datas = $db->customQuery($sql);
     $cache->save($sql, $datas);
 }
 // วันที่สำหรับเครื่องหมาย new
 $valid_date = $mmktime - $index['new_date'];
 // อ่านรายการลงใน $list
 $listitem = gcms::loadtemplate($index['module'], 'document', 'listitem');
 $patt = array('/{ID}/', '/{URL}/', '/{TOPIC}/', '/{DETAIL}/', '/{UID}/', '/{SENDER}/', '/{STATUS}/', '/{DATE}/', '/{DATEISO}/', '/{VISITED}/', '/{COMMENTS}/', '/{THUMB}/', '/{ICON}/');
 foreach ($datas as $item) {
     $replace = array();
     $replace[] = $item['id'];
     if ($config['module_url'] == '1') {
         $replace[] = gcms::getURL($item['module'], $item['alias']);
     } else {
         $replace[] = gcms::getURL($item['module'], '', 0, $item['id']);
     }
     $replace[] = $item['topic'];
     $replace[] = $item['description'];
     $replace[] = $item['member_id'];
     $replace[] = empty($item['displayname']) ? $item['email'] : $item['displayname'];
     $replace[] = $item['status'];
     $replace[] = gcms::mktime2date($item['create_date'], 'd M Y');
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:stories.php


注:本文中的gcms::loadtemplate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。