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


PHP gcms::getUrl方法代码示例

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


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

示例1: array

     if ($n > 0 && ($old_order != $item['order'] || $item['order'] > 0 && $n % $item['order'] == 0)) {
         $items[] = '</ul><ul>';
         $old_order = $item['order'];
         $n = 0;
     }
     $replace = array();
     $replace[] = $item['id'];
     $replace[] = $item['name'];
     $replace[] = $item['position'];
     $replace[] = $item['detail'];
     $replace[] = $item['address'];
     $replace[] = $item['phone'];
     $replace[] = $item['email'];
     $replace[] = $item['order'];
     $replace[] = $item['picture'] != '' && is_file(DATA_PATH . "personnel/{$item['picture']}") ? DATA_URL . "personnel/{$item['picture']}" : WEB_URL . '/modules/personnel/img/noicon.jpg';
     $replace[] = gcms::getUrl($index['module'], 0, 0, '', "id={$item['id']}");
     $items[] = preg_replace($patt, $replace, $skin);
     $n++;
 }
 // แสดงผล list รายการ
 $patt = array('/{BREADCRUMS}/', '/{LIST}/', '/{TOPIC}/', '/{DETAIL}/', '/{CATEGORY}/');
 $replace = array();
 $replace[] = implode("\n", $breadcrumbs);
 $replace[] = sizeof($items) == 0 ? '<div class=error>{LNG_LIST_EMPTY}</div>' : '<article>' . implode("\n", $items) . '</ul></article>';
 $replace[] = $index['topic'];
 $replace[] = $index['detail'];
 $replace[] = gcms::getVars($categories, $id, '');
 $content = preg_replace($patt, $replace, gcms::loadtemplate($index['module'], 'personnel', 'main'));
 // title,keywords,description
 $title = $index['topic'];
 $keywords = $index['keywords'];
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:list.php

示例2: while

     $data .= '<td class="ex"><span class="d">' . ($days_of_last_month - $weekday + $start) . '</span></td>';
     $start++;
 }
 $weekday++;
 while ($day <= $endday) {
     if ($today == $day && $month == $c_month && $year == $c_year) {
         $c = ' class="current"';
     } elseif ($weekday == 1) {
         $c = ' class="su"';
     } else {
         $c = '';
     }
     $data .= '<td' . $c . '><a class="d">' . $day . '</a><p>';
     if (isset($events[$day])) {
         foreach ($events[$day] as $item) {
             $data .= '<a href="' . gcms::getUrl($item['module'], '', 0, 0, "d={$c_year}-{$c_month}-{$day}") . '" class=cuttext style="background-color:' . $item['color'] . '" title="' . $item['topic'] . '">' . $item['topic'] . '</a>';
         }
     }
     $data .= '</p></td>';
     if ($weekday == 7 && $day != $endday) {
         $calendar[] = $data . '</td>';
         $data = '<tr class="date row">';
         $weekday = 0;
     }
     $day++;
     $weekday++;
 }
 $n = 1;
 while ($weekday <= 7) {
     $data .= '<td class="ex"><span class="d">' . $n . '</span></td>';
     $weekday++;
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:calendar.php

示例3: foreach

 $widget[] = '<div id=widget_personnel class=widget_personnel>';
 $sql = "SELECT * FROM `" . DB_PERSONNEL . "` WHERE `category_id`='{$match['1']}' AND `module_id`='{$module['id']}' ORDER BY `order`,`id`";
 $saved = $cache->get($sql);
 if (!$saved) {
     $saved = $db->customQuery($sql);
     $cache->save($sql, $saved);
 }
 if (sizeof($saved) > 0) {
     foreach ($saved as $i => $item) {
         $url = gcms::getUrl($module['module'], '', 0, 0, "id={$item['id']}");
         $picture = $item['picture'] != '' && is_file(DATA_PATH . "personnel/{$item['picture']}") ? DATA_URL . "personnel/{$item['picture']}" : WEB_URL . '/modules/personnel/img/noicon.jpg';
         $widget[] = '<div class=' . ($i == 0 ? 'currItem' : 'item') . '>';
         $widget[] = '<a class=thumbnail href="' . $url . '"><img src=' . $picture . ' alt=personnel class=nozoom></a>';
         $widget[] = '<p class=detail>';
         $widget[] = '<a class=name href="' . $url . '">' . $item['name'] . '</a>';
         $widget[] = '<a class=position href="' . gcms::getUrl($module['module'], '', 0, 0, "cat={$item['category_id']}") . '">' . $item['position'] . '</a>';
         $widget[] = '</p>';
         $widget[] = '</div>';
     }
 }
 $widget[] = '</div>';
 // group
 if ($match[3] == 'menu') {
     $widget[] = '<nav class=sidemenu><ul>';
     $sql = "SELECT `category_id`,`topic` FROM `" . DB_CATEGORY . "` WHERE `module_id`='{$module['id']}' ORDER BY `category_id`";
     $saved = $cache->get($sql);
     if (!$saved) {
         $saved = $db->customQuery($sql);
         $cache->save($sql, $saved);
     }
     foreach ($saved as $item) {
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:index.php


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