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


PHP gcms::getURL方法代码示例

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


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

示例1: boardList

function boardList($sql, &$list)
{
    global $db, $cache, $patt, $listitem, $config, $cat, $valid_date, $index, $page;
    $datas = $cache->get($sql);
    if (!$datas) {
        $datas = $db->customQuery($sql);
        $cache->save($sql, $datas);
    }
    foreach ($datas as $item) {
        $ctiime = $item['comment_date'] > 0 ? $item['comment_date'] : $item['last_update'];
        $replace = array();
        $replace[] = $item['id'];
        if ($item['pin'] > 0) {
            $replace[] = WEB_URL . '/' . SKIN . 'board/img/pin.png';
        } elseif (is_file(DATA_PATH . "board/thumb-{$item['picture']}")) {
            $replace[] = DATA_URL . "board/thumb-{$item['picture']}";
        } elseif (is_file(DATA_PATH . "board/{$item['picture']}")) {
            $replace[] = DATA_URL . "board/{$item['picture']}";
        } else {
            $replace[] = WEB_URL . "/{$index['default_icon']}";
        }
        $replace[] = gcms::getURL($index['module'], '', $cat, 0, "wbid={$item['id']}");
        $replace[] = $item['topic'];
        $replace[] = (int) $item['member_id'];
        $replace[] = $item['sender'];
        $replace[] = $item['status'];
        $replace[] = gcms::mktime2date($item['create_date']);
        $replace[] = date(DATE_ISO8601, $item['create_date']);
        $replace[] = number_format($item['visited']);
        $replace[] = number_format($item['comments']);
        $replace[] = $item['comment_date'] == 0 ? ' ' : gcms::mktime2date($item['comment_date']);
        $replace[] = $item['comment_date'] == 0 ? ' ' : $item['commentator'];
        $replace[] = (int) $item['commentator_id'];
        $replace[] = $item['replyer_status'];
        $replace[] = $ctiime >= $valid_date ? $item['comment_date'] > 0 ? ' update' : ' new' : '';
        $list[] = preg_replace($patt, $replace, $listitem);
    }
}
开发者ID:phannack,项目名称:GCMS,代码行数:38,代码来源:stories.php

示例2: sitemap

echo sitemap(WEB_URL . '/index.php', $cdate);
// query โมดูลที่ติดตั้งแล้วทั้งหมด
$sql = "SELECT M.`module`,M.`owner`,I.`language`,M.`id`";
$sql .= " FROM `" . DB_MODULES . "` AS M";
$sql .= " LEFT JOIN `" . DB_INDEX . "` AS I ON I.`module_id`=M.`id` AND I.`index`='1'";
$datas = $cache->get($sql);
if (!$datas) {
    $datas = $db->customQuery($sql);
    $cache->save($sql, $datas);
}
$modules = array();
$owners = array();
foreach ($datas as $item) {
    $modules[$item['id']] = $item['module'];
    $owners[$item['owner']][] = $item['id'];
    echo sitemap(gcms::getURL($item['module'], '', 0, 0, $item['language'] == '' ? '' : "lang={$item['language']}", false), $cdate);
}
// modules
$dir = ROOT_PATH . 'modules/';
$f = @opendir($dir);
if ($f) {
    while (false !== ($owner = readdir($f))) {
        if ($owner != '.' && $owner != '..') {
            if (is_file($dir . "{$owner}/sitemap.php")) {
                include $dir . "{$owner}/sitemap.php";
            }
        }
    }
    closedir($f);
}
echo '</urlset>';
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:sitemap.php

示例3: array

 } else {
     // breadcrumbs
     $breadcrumb = gcms::loadtemplate($index['module'], '', 'breadcrumb');
     $breadcrumbs = array();
     // หน้าหลัก
     $breadcrumbs['HOME'] = gcms::breadcrumb('icon-home', $canonical, $install_modules[$module_list[0]]['menu_tooltip'], $install_modules[$module_list[0]]['menu_text'], $breadcrumb);
     // โมดูล
     if ($index['module'] != $module_list[0]) {
         if (isset($install_modules[$index['module']]['menu_text'])) {
             $m = $install_modules[$index['module']]['menu_text'];
             $t = $install_modules[$index['module']]['menu_tooltip'];
         } else {
             $m = ucwords($index['module']);
             $t = $m;
         }
         $canonical = gcms::getURL($index['module']);
         $breadcrumbs['MODULE'] = gcms::breadcrumb('', $canonical, $t, $m, $breadcrumb);
     }
     // อัปเดทการเปิดดู
     if (!isset($_REQUEST['visited'])) {
         $index['visited']++;
         $db->edit(DB_INDEX, $index['id'], array('visited' => $index['visited']));
     }
     $cache->save($sql, $index);
     // แทนที่ลงใน template ของโมดูล
     $patt = array('/{BREADCRUMS}/', '/{TOPIC}/', '/{DETAIL}/', '/{MODULE}/');
     $replace = array();
     $replace[] = implode("\n", $breadcrumbs);
     $replace[] = $index['topic'];
     $replace[] = gcms::showDetail($index['detail'], true, false);
     $replace[] = $module;
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:main.php

示例4: IN

<?php

// modules/event/sitemap.php
if (is_array($owners['event'])) {
    $sql = "SELECT `id`,`begin_date`,`module_id`";
    $sql .= " FROM `" . DB_EVENTCALENDAR . "`";
    $sql .= " WHERE `module_id` IN(" . implode(',', $owners['event']) . ") AND `published`='1' AND `published_date`<='{$cdate}'";
    $datas = $cache->get($sql);
    if (!$datas) {
        $datas = $db->customQuery($sql);
        $cache->save($sql, $datas);
    }
    foreach ($datas as $item) {
        echo '<url>';
        echo '<loc>' . gcms::getURL($modules[$item['module_id']], '', 0, 0, "id={$item['id']}") . '</loc>';
        list($d, $t) = explode(' ', $item['begin_date']);
        echo '<lastmod>' . $d . '</lastmod>';
        echo '<changefreq>daily</changefreq>';
        echo '<priority>0.5</priority>';
        echo '</url>';
    }
}
开发者ID:phannack,项目名称:GCMS,代码行数:22,代码来源:sitemap.php

示例5: array

<?php

// modules/member/dologin.php
if (defined('MAIN_INIT')) {
    // title
    $title = $lng['LNG_LOGIN'];
    // breadcrumbs
    $breadcrumb = gcms::loadtemplate('member', '', '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('dologin'), strip_tags($lng['LNG_LOGIN_TITLE']), $lng['LNG_LOGIN'], $breadcrumb);
    if (!gcms::isMember()) {
        // อ่านข้อมูลจาก cookie
        $login_email = empty($_COOKIE[PREFIX . '_login_email']) ? '' : gcms::decode($_COOKIE[PREFIX . '_login_email']);
        $login_password = empty($_COOKIE[PREFIX . '_login_password']) ? '' : gcms::decode($_COOKIE[PREFIX . '_login_password']);
        $login_remember = empty($_COOKIE[PREFIX . '_login_remember']) ? 0 : (int) $_COOKIE[PREFIX . '_login_remember'];
        if (!empty($config['custom_login']) && is_file(ROOT_PATH . $config['custom_login'])) {
            // custom login form
            include_once ROOT_PATH . $config['custom_login'];
        } else {
            // ฟอร์ม login
            $patt = array('/{BREADCRUMS}/', '/{(LNG_[A-Z0-9_]+)}/e', '/{WEBTITLE}/', '/{SUBTITLE}/', '/{EMAIL}/', '/{PASSWORD}/', '/{REMEMBER}/', '/{WEBURL}/', '/{FACEBOOK}/', '/{NEXT}/');
            $replace = array();
            $replace[] = implode("\n", $breadcrumbs);
            $replace[] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
            $replace[] = $config['web_title'];
            $replace[] = empty($error) ? $config['web_description'] : '<span class=error>' . $error . '</span>';
            $replace[] = $login_email;
            $replace[] = $login_password;
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:dologin.php

示例6: array

 // template
 $skin = gcms::loadfile(ROOT_PATH . 'widgets/relate/widgetitem.html');
 $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[2] == 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']);
     }
     $replace[] = $item['topic'];
     $replace[] = $item['description'];
     $replace[] = gcms::ser2Str($item, 'category');
     $replace[] = gcms::mktime2date($item['create_date'], 'd M Y');
     $replace[] = $item['member_id'];
     $replace[] = $item['displayname'] == '' ? $item['email'] : $item['displayname'];
     $replace[] = $item['status'];
     $replace[] = number_format($item['comments']);
     $replace[] = number_format($item['visited']);
     if ($item['picture'] != '' && is_file(DATA_PATH . "document/{$item['picture']}")) {
         $replace[] = DATA_URL . "document/{$item['picture']}";
     } else {
         $replace[] = WEB_URL . "/{$index['default_icon']}";
     }
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:getnews.php

示例7: sizeof

 // จัดการแบ่งหน้าเพื่อแสดงผล
 $rows = sizeof($list);
 $maxlink = 9;
 $totalpage = round($rows / $list_per_page);
 $totalpage += $totalpage * $list_per_page < $rows ? 1 : 0;
 $page = $page < 1 ? 1 : $page;
 $page = $page > $totalpage ? $totalpage : $page;
 $start = $list_per_page * ($page - 1);
 $end = $start + $list_per_page > $rows ? $rows : $start + $list_per_page;
 if ($rows > 0) {
     for ($i = $rows - 1; $i >= 0; $i--) {
         if ($i >= $end || $i < $start) {
             unset($list[$i]);
         }
     }
     $url = '<a href="' . gcms::getURL('search', '', 0, 0, 'page=%1&amp;q=' . urlencode($search)) . '">%1</a>';
     if ($totalpage > $maxlink) {
         $s = $page - floor($maxlink / 2);
         if ($s < 1) {
             $s = 1;
         } elseif ($s + $maxlink > $totalpage) {
             $s = $totalpage - $maxlink + 1;
         }
     } else {
         $s = 1;
     }
     $splitpage = $s > 1 ? str_replace('%1', 1, $url) : ' ';
     for ($i = $s; $i <= $totalpage && $maxlink > 0; $i++) {
         $splitpage .= $i == $page ? '<strong>' . $i . '</strong> ' : str_replace('%1', $i, $url);
         $maxlink--;
     }
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:main.php

示例8: preg_replace

         $replace[] = gcms::showip($item['ip']);
         $replace[] = $i + 1;
         $replace[] = $item['id'];
         $comments[] = preg_replace($patt, $replace, $skin);
     }
 }
 if ($canReply) {
     // antispam
     $register_antispamchar = gcms::rndname(32);
     $_SESSION[$register_antispamchar] = gcms::rndname(4);
 }
 // url ของหน้านี้
 if ($config['module_url'] == '1') {
     $canonical = gcms::getURL($index['module'], $index['alias']);
 } else {
     $canonical = gcms::getURL($index['module'], '', 0, $index['id']);
 }
 // แก้ไขบทความ เจ้าของหรือ mod
 $canEdit = is_file(ROOT_PATH . 'modules/document/write.php') && ($moderator || $isMember && $login['id'] == $index['member_id']);
 // แทนที่ลงใน template ของโมดูล
 $patt = array('/{BREADCRUMS}/', '/{COMMENTLIST}/', '/{REPLYFORM}/', '/{TOPIC}/', '/<MEMBER>(.*)<\\/MEMBER>/s', '/(edit-{QID}-0-0-{MODULE})/', '/(delete-{QID}-0-0-{MODULE})/', '/(quote-{QID}-0-0-{MODULE})/', '/{DETAIL}/', '/{LANGUAGE}/', '/{UID}/', '/{DISPLAYNAME}/', '/{IMG}/', '/{STATUS}/', '/{DATE}/', '/{DATEISO}/', '/{CATEGORY}/', '/{VISITED}/', '/{TAGS}/', '/{COMMENTS}/', '/{QID}/', '/{LOGIN_PASSWORD}/', '/{LOGIN_EMAIL}/', '/{ANTISPAM}/', '/{ANTISPAMVAL}/', '/{DELETE}/', '/{MODULE}/', '/{MODULEID}/', '/{VOTE}/', '/{VOTE_COUNT}/', '/{CATID}/');
 $replace = array();
 $replace[] = implode("\n", $breadcrumbs);
 $replace[] = sizeof($comments) == 0 ? '' : implode("\n", $comments);
 $replace[] = $canReply ? gcms::loadtemplate($index['module'], 'document', 'reply') : '';
 $replace[] = $index['topic'];
 $replace[] = $isMember ? '' : '$1';
 $replace[] = $canEdit ? '\\1' : 'hidden';
 $replace[] = $canDelete ? '\\1' : 'hidden';
 $replace[] = $canReply ? '\\1' : 'hidden';
 $replace[] = gcms::HighlightSearch(gcms::showDetail($index['detail'], $canview, false), $search);
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:view.php

示例9: array

// modules/member/editprofile.php
if (defined('MAIN_INIT') && $isMember) {
    // ข้อมูล user ที่ login
    $user = $db->getRec(DB_USER, $_SESSION['login']['id']);
    if (!$user) {
        $title = $lng['LNG_MEMBER_NOT_FOUND'];
        $content = '<div class=error>' . $title . '</div>';
    } else {
        // 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_MEMBER_EDIT_TITLE'], $lng['LNG_MEMBER_EDIT_TITLE'], $breadcrumb);
        if ($user['fb'] == 1) {
            unset($member_tabs['password']);
        }
        // ตรวจสอบ tab ที่เลือก
        $title = '';
        $tab = gcms::getVars($_REQUEST, 'tab', '');
        $file = isset($member_tabs[$tab][1]) ? $member_tabs[$tab][1] : '';
        if ($file == '' || !is_file(ROOT_PATH . "{$file}.php")) {
            // เรียก tab แรก ถ้าไม่มีการระบุ tab มา
            reset($member_tabs);
            $tab = key($member_tabs);
            $file = $member_tabs[$tab][1];
        }
        if ($file != 'modules/member/editprofile') {
            include ROOT_PATH . "{$file}.php";
开发者ID:phannack,项目名称:GCMS,代码行数:30,代码来源:editprofile.php

示例10: array

     }
     $items = array();
     $patt = array('/{ID}/', '/{THUMB}/', '/{YOUTUBE}/', '/{TOPIC}/', '/{DESCRIPTION}/', '/{VIEWS}/');
     $skin = gcms::loadtemplate($index['module'], 'video', 'listitem');
     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[] = $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'];
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:list.php

示例11: date

    $count = $count <= 0 ? 10 : $count;
    // วันที่วันนี้
    $cdate = date("D, d M Y H:i:s +0700", $mmktime);
    $today = date('Y-m-d', $mmktime);
    // ตรวจสอบโมดูลที่เรียก
    $sql = "SELECT M.`id`,M.`module`,M.`owner`,D.`topic`,D.`description`,M.`config`";
    $sql .= " FROM `" . DB_INDEX . "` AS I";
    $sql .= " INNER JOIN `" . DB_MODULES . "` AS M ON M.`id`=I.`module_id` AND M.`module`='{$module}'";
    $sql .= " INNER JOIN `" . DB_INDEX_DETAIL . "` AS D ON D.`id`=I.`id` AND D.`module_id`=I.`module_id` AND D.`language` IN ('" . LANGUAGE . "','')";
    $sql .= " WHERE I.`module_id`=M.`id` AND I.`index`='1' AND I.`language` IN ('" . LANGUAGE . "','')";
    $sql .= " AND I.`published`='1' AND I.`published_date`<='{$today}'";
    $sql .= " LIMIT 1";
    $modules = $db->customQuery($sql);
    if (sizeof($modules) == 1) {
        $modules = $modules[0];
        echo '<' . '?xml version="1.0" encoding="UTF-8"?' . '>';
        echo '<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">';
        echo '<channel>';
        echo '<atom:link href="' . WEB_URL . '/' . $module . '.rss" rel="self" type="application/rss+xml" />';
        echo "<title>" . $modules['topic'] . "</title>";
        echo '<link>' . gcms::getURL($modules['module']) . '</link>';
        echo '<description><![CDATA[' . $modules['description'] . ']]></description>';
        echo "<pubDate>{$cdate}</pubDate>";
        echo "<lastBuildDate>{$cdate}</lastBuildDate>";
        if (is_file(ROOT_PATH . "modules/{$modules['owner']}/feed.php")) {
            include ROOT_PATH . "modules/{$modules['owner']}/feed.php";
        }
        echo '</channel>';
        echo '</rss>';
    }
}
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:feed.php

示例12: ucwords

 // หน้าหลัก
 $breadcrumbs['HOME'] = gcms::breadcrumb('icon-home', $canonical, $install_modules[$module_list[0]]['menu_tooltip'], $install_modules[$module_list[0]]['menu_text'], $breadcrumb);
 // โมดูล
 if ($index['module'] != $module_list[0]) {
     if (isset($install_modules[$index['module']]['menu_text'])) {
         $m = $install_modules[$index['module']]['menu_text'];
         $t = $install_modules[$index['module']]['menu_tooltip'];
     } else {
         $m = ucwords($index['module']);
         $t = $m;
     }
     $canonical = gcms::getURL($index['module']);
     $breadcrumbs['MODULE'] = gcms::breadcrumb('', $canonical, $t, $m, $breadcrumb);
 }
 // url ของหน้านี้
 $canonical = gcms::getURL($index['module'], '', 0, 0, "m={$match['1']}-{$match['2']}");
 // โหลด calendar
 $calendar = array();
 $sql = "SELECT D.`id`,D.`color`,D.`topic`,D.`description`,TIME(D.`begin_date`) AS `t`";
 $sql .= " FROM `" . DB_EVENTCALENDAR . "` AS D";
 $sql .= " WHERE D.`module_id`='{$index['module_id']}' AND YEAR(D.`begin_date`)='{$match['1']}' AND MONTH(D.`begin_date`)='{$match['2']}' AND DAY(D.`begin_date`)='{$match['3']}'";
 $sql .= " AND D.`published`='1' AND D.`published_date`<='" . date('Y-m-d', $mmktime) . "'";
 $sql .= " ORDER BY D.`begin_date` ASC";
 $datas = $cache->get($sql);
 if (!$datas) {
     $datas = $db->customQuery($sql);
     $cache->save($sql, $datas);
 }
 $skin = gcms::loadtemplate($index['module'], 'event', 'dayitem');
 $patt = array('/{COLOR}/', '/{URL}/', '/{TOPIC}/', '/{DESCRIPTION}/', '/{TIME}/');
 foreach ($datas as $item) {
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:day.php

示例13: foreach

<?php

// widgets/categories/index.php
if (defined('MAIN_INIT') && preg_match('/^[a-z]{4,}$/', $module) && isset($install_modules[$module])) {
    $index = $install_modules[$module];
    $sql = "SELECT `category_id`,`topic` FROM `" . DB_CATEGORY . "` WHERE `module_id`='{$index['module_id']}' ORDER BY `category_id` DESC";
    $datas = $cache->get($sql);
    if (!$datas) {
        $datas = $db->customQuery($sql);
        $cache->save($sql, $datas);
    }
    foreach ($datas as $item) {
        $widget[] = '<li><a href="' . gcms::getURL($index['module'], '', $item['category_id']) . '">' . gcms::ser2Str($item, 'topic') . '</a></li>';
    }
    if (sizeof($widget) > 0) {
        $widget = '<ul>' . implode("\n", $widget) . '</ul>';
    }
}
开发者ID:phannack,项目名称:GCMS,代码行数:18,代码来源:index.php

示例14: array

 $categories = array();
 if ($index && $canEdit) {
     // breadcrumbs
     $breadcrumb = gcms::loadtemplate($index['module'], '', 'breadcrumb');
     $breadcrumbs = array();
     // หน้าหลัก
     $breadcrumbs['HOME'] = gcms::breadcrumb('icon-home', $canonical, $install_modules[$module_list[0]]['menu_tooltip'], $install_modules[$module_list[0]]['menu_text'], $breadcrumb);
     // โมดูล
     if (isset($install_modules[$index['module']]['menu_text'])) {
         $m = $install_modules[$index['module']]['menu_text'];
         $t = $install_modules[$index['module']]['menu_tooltip'];
     } else {
         $m = ucwords($index['module']);
         $t = $m;
     }
     $breadcrumbs['MODULE'] = gcms::breadcrumb('', gcms::getURL($index['module']), $t, $m, $breadcrumb);
     if ($rid == 0) {
         $categories[0] = '<option value=0>{LNG_NO_CATEGORY}</option>';
         $sql = "SELECT `category_id`,`topic` FROM `" . DB_CATEGORY . "` WHERE `module_id`='{$index['module_id']}' ORDER BY `category_id`";
         foreach ($db->customQuery($sql) as $item) {
             if ($moderator || $index['category_id'] == $item['category_id']) {
                 $sel = $index['category_id'] == $item['category_id'] ? ' selected' : '';
                 $categories[$item['category_id']] = "<option value={$item['category_id']}{$sel}>" . gcms::ser2Str($item, 'topic') . "</option>";
             }
         }
         if (sizeof($categories) > 1) {
             unset($categories[0]);
         }
     }
     // antispam
     $register_antispamchar = gcms::rndname(32);
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:edit.php

示例15: 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


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