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


PHP showtime函数代码示例

本文整理汇总了PHP中showtime函数的典型用法代码示例。如果您正苦于以下问题:PHP showtime函数的具体用法?PHP showtime怎么用?PHP showtime使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: ldapTimeToNormalTime

function ldapTimeToNormalTime($ldapTime)
{
    if ($ldapTime == 0) {
        return "Never";
    }
    // divide by 10.000.000 to get seconds from 100-nanosecond intervals
    $winInterval = round($ldapTime / 10000000);
    // substract seconds from 1601-01-01 -> 1970-01-01
    $unixTimestamp = $winInterval - 11644473600;
    return showtime($unixTimestamp);
}
开发者ID:nirn,项目名称:karnaf,代码行数:11,代码来源:check_user.php

示例2: squery

<table border="1" width="100%" cellpadding="0" cellspacing="0">
<tr class="Karnaf_Head2"><td colspan="2">Replies</td></tr>
<?php 
    $query2 = squery("SELECT title,reply,r_time,r_from FROM karnaf_replies WHERE tid=%d ORDER BY r_time", $id);
    $cnt = 0;
    while ($result2 = sql_fetch_array($query2)) {
        $cnt++;
        ?>
<tr class="Karnaf_P_Head"><td colspan="2">Reply #<?php 
        echo $cnt;
        ?>
 from <?php 
        echo $result2['r_from'];
        ?>
 at <?php 
        echo showtime($result2['r_time']);
        ?>
</td></tr>
<tr>
<td class="ticket_replies" colspan="2">
<?php 
        if (!empty($result2['title'])) {
            echo "Title: ";
            show_board_body($result2['title']);
            echo "<hr>\n";
        }
        echo show_board_body(preg_replace("/(\\*)?\\[image\\:\\sironSource\\](\\*)?.*Thank\\syou\\./s", "*** Signature ***", $result2['reply']));
        ?>
</td>
</tr>
<?php 
开发者ID:nirn,项目名称:karnaf,代码行数:31,代码来源:view.php

示例3: showtime2

    echo '
<div class="post-list">
    <div class="item-avatar"><a href="/user/', $article['uid'], '">';
    if (!$is_spider) {
        echo '<img src="/avatar/large/', $article['uavatar'], '.png" alt="', $article['author'], '" />';
    } else {
        echo '<img src="/static/grey.gif" data-original="/avatar/large/', $article['uavatar'], '.png" alt="', $article['author'], '" />';
    }
    echo '    </a></div>
    <div class="item-content">
        <h1><a rel="bookmark" href="/topics/', $article['id'], '">', $article['title'], '</a></h1>
        <span class="item-date"><i class="fa fa-archive"></i> <a href="/nodes/', $article['cid'], '">', $article['cname'], '</a>&nbsp;&nbsp;<i class="fa fa-user"></i> <a href="/user/', $article['uid'], '">', $article['author'], '</a>';
    if ($article['comments']) {
        echo '&nbsp;&nbsp;<i class="fa fa-clock-o"></i> <time datetime="', showtime2($article['edittime']), '" pubdate="pubdate" data-updated="true">', showtime($article['edittime']), '</time>&nbsp;&nbsp;<i class="fa fa-user-secret"></i> 最后回复来自 <a href="/user/', $article['ruid'], '">', $article['rauthor'], '</a>';
    } else {
        echo '&nbsp;&nbsp;<i class="fa fa-clock-o"></i> <time datetime="', showtime2($article['addtime']), '" pubdate="pubdate" data-updated="true">', showtime($article['addtime']), '</time>';
    }
    echo '        </span>
    </div>';
    if ($article['comments']) {
        $gotopage = ceil($article['comments'] / $options['commentlist_num']);
        if ($gotopage == 1) {
            $c_page = '';
        } else {
            $c_page = '/' . $gotopage;
        }
        echo '<div class="item-count"><a href="/topics/', $article['id'], $c_page, '#reply', $article['comments'], '">', $article['comments'], '</a></div>';
    }
    echo '    <div class="c"></div>
</div>';
}
开发者ID:kingstudio,项目名称:youbbs,代码行数:31,代码来源:home.php

示例4: array

} else {
    $c_content = '';
}
// 获取分类
$c_obj = $DBS->fetch_one_array("SELECT * FROM yunbbs_categories WHERE id='" . $t_obj['cid'] . "'");
// 获取评论
if ($t_obj['comments']) {
    if ($page == 0) {
        $page = 1;
    }
    $query_sql = "SELECT c.id,c.uid,c.addtime,c.content,u.avatar as avatar,u.name as author\n        FROM yunbbs_comments c \n        LEFT JOIN yunbbs_users u ON c.uid=u.id\n        WHERE c.articleid='{$tid}' ORDER BY c.id ASC LIMIT " . ($page - 1) * $options['commentlist_num'] . "," . $options['commentlist_num'];
    $query = $DBS->query($query_sql);
    $commentdb = array();
    while ($comment = $DBS->fetch_array($query)) {
        // 格式化内容
        $comment['addtime'] = showtime($comment['addtime']);
        if ($is_spider || $tpl) {
            // 手机浏览和搜索引擎访问不用 jquery.lazyload
            $comment['content'] = set_content($comment['content'], 1);
        } else {
            $comment['content'] = set_content($comment['content']);
        }
        $commentdb[] = $comment;
    }
    unset($comment);
    $DBS->free_result($query);
}
// 增加浏览数
$DBS->unbuffered_query("UPDATE yunbbs_articles SET views=views+1 WHERE id='{$tid}'");
// 如果id在提醒里则清除
if ($cur_user && $cur_user['notic'] && strpos(' ' . $cur_user['notic'], $tid . ',')) {
开发者ID:zhangwenhua029,项目名称:YouBBS-EOEN,代码行数:31,代码来源:topicpage.php

示例5: dirname

include dirname(__FILE__) . '/config.php';
include dirname(__FILE__) . '/common.php';
if (!$cur_user || $cur_user['flag'] < 99) {
    exit('error: 403 Access Denied');
}
$mid = intval($_GET['mid']);
if ($mid == $cur_user['id']) {
    header('location: /setting');
    exit;
}
$query = "SELECT * FROM yunbbs_users WHERE id='{$mid}'";
$m_obj = $DBS->fetch_one_array($query);
if (!$m_obj) {
    exit('404');
}
$m_obj['regtime'] = showtime($m_obj['regtime']);
$tip1 = '';
$tip2 = '';
$tip3 = '';
$tip4 = '';
$av_time = '';
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $action = $_POST['action'];
    if ($action == 'info') {
        $email = addslashes(filter_chr(trim($_POST['email'])));
        $url = char_cv(filter_chr(trim($_POST['url'])));
        $about = addslashes(trim($_POST['about']));
        if ($DBS->unbuffered_query("UPDATE yunbbs_users SET email='{$email}', url='{$url}', about='{$about}' WHERE id='{$mid}'")) {
            //更新缓存
            $m_obj['email'] = $email;
            $m_obj['url'] = $url;
开发者ID:ichobits,项目名称:youBBS-ACICFG,代码行数:31,代码来源:admin-setuser.php

示例6: index

 public function index()
 {
     // dynamically generate the quick links from the permissions for the selected module
     $eglet = new SimpleMenuEGlet(new SimpleRenderer());
     $eglet->setMenuData($this->dashboard_module, $system->pid);
     $eglet->setSmarty($this->view);
     if (count($eglet->getContents()) > 0) {
         $this->view->set('eglets', array('Quick Links' => $eglet));
     }
     #$cache			= Cache::Instance();
     #$eglet_store	= $cache->get(array('eglet_store', $this->module));
     // ATTN: we're avoiding the cache because eglets are appearing (and not appearing)
     // where they should be. it seems the module grouping isn't actually working
     $eglet_store = FALSE;
     $ao =& AccessObject::Instance(EGS_USERNAME);
     if (FALSE === $eglet_store) {
         // get user's uzlet preferences
         $prefs = UserPreferences::Instance(EGS_USERNAME);
         $user_uzlets = $prefs->getPreferenceValue('dashboard_contents', $this->dashboard_module);
         $user_uzlets = is_array($user_uzlets) ? array_flip($user_uzlets) : array();
         // discover what uzlet_id's belong to the module we're working with
         $uzlets = new UzletCollection();
         $sh = new SearchHandler($uzlets, FALSE);
         if (count($user_uzlets) > 0) {
             // get the uzlet details for the user's uzlet preferences
             $db = DB::Instance();
             $uzlet_names = array();
             foreach ($user_uzlets as $name => $value) {
                 $uzlet_names[] = $db->qstr($name);
             }
             $sh->addConstraint(new Constraint('name', 'in', '(' . implode(',', $uzlet_names) . ')'));
         } else {
             // user preferences are not set, get the default(preset) uzlets for the module
             $sh->addConstraint(new Constraint('preset', 'is', TRUE));
             if ($this->dashboard_module == 'dashboard') {
                 $sh->addConstraint(new Constraint('dashboard', 'is', TRUE));
                 // only include uzlets for modules the user has access to
                 foreach ($ao->permissions as $permission) {
                     if ($permission['type'] == 'm' && !empty($permission['module_id'])) {
                         $modules[$permission['module_id']] = $permission['module_id'];
                     }
                 }
                 if (count($modules) > 0) {
                     $sh->addConstraint(new Constraint('module_id', 'in', '(' . implode(',', $modules) . ')'));
                 } else {
                     $sh->addConstraint(new Constraint('module_id', '=', -1));
                 }
             } else {
                 $sh->addConstraint(new Constraint('module', '=', $this->dashboard_module));
             }
         }
         $sh->addConstraint(new Constraint('enabled', 'is', TRUE));
         $rows = $uzlets->load($sh, null, RETURN_ROWS);
         $uzlets = array();
         if (!empty($rows)) {
             if (empty($user_uzlets)) {
                 // no user uzlet preferences so set uzlets to the default(preset) for the module
                 foreach ($rows as $uzlet) {
                     $uzlets[$uzlet['name']] = $uzlet;
                 }
             } else {
                 // Preserve order of user's uzlet preferences
                 foreach ($rows as $uzlet) {
                     if (isset($user_uzlets[$uzlet['name']])) {
                         $user_uzlets[$uzlet['name']] = $uzlet;
                     }
                 }
                 // Remove any user's uzlet preferences that are no longer valid
                 foreach ($user_uzlets as $name => $uzlet) {
                     if (!is_array($uzlet)) {
                         unset($user_uzlets[$name]);
                     }
                 }
                 $uzlets = $user_uzlets;
             }
         }
         $this->view->set('uzlets', $uzlets);
     }
     showtime('pre-pop');
     $this->view->set('can_edit', $ao->can_manage_uzlets());
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:81,代码来源:DashboardController.php

示例7: showtime

    echo '
<div class="post-list">
    <div class="item-avatar"><a href="/user/', $article['uid'], '">';
    if (!$is_spider) {
        echo '<img src="/avatar/large/', $article['uavatar'], '.png" alt="', $article['author'], '" />';
    } else {
        echo '<img src="/static/grey.gif" data-original="/avatar/large/', $article['uavatar'], '.png" alt="', $article['author'], '" />';
    }
    echo '    </a></div>
    <div class="item-content">
        <h1><a href="/topics/', $article['id'], '">', $article['title'], '</a></h1>
        <span class="item-date"><i class="fa fa-archive"></i> <a href="/nodes/', $article['cid'], '">', $article['cname'], '</a>&nbsp;&nbsp;<i class="fa fa-user"></i> <a href="/user/', $article['uid'], '">', $article['author'], '</a>';
    if ($article['comments']) {
        echo '&nbsp;&nbsp;<i class="fa fa-clock-o"></i> ', showtime($article['edittime']), '&nbsp;&nbsp;<i class="fa fa-user-secret"></i> 最后回复来自 <a href="/user/', $article['ruid'], '">', $article['rauthor'], '</a>';
    } else {
        echo '&nbsp;&nbsp;<i class="fa fa-clock-o"></i> ', showtime($article['addtime']);
    }
    echo '        </span>
    </div>';
    if ($article['comments']) {
        $gotopage = ceil($article['comments'] / $options['commentlist_num']);
        if ($gotopage == 1) {
            $c_page = '';
        } else {
            $c_page = '/' . $gotopage;
        }
        echo '<div class="item-count"><a href="/topics/', $article['id'], $c_page, '#reply', $article['comments'], '">', $article['comments'], '</a></div>';
    }
    echo '    <div class="c"></div>
</div>';
}
开发者ID:gdsellerPd,项目名称:YouBBS-EOEN,代码行数:31,代码来源:home.php

示例8: index

 public function index(DataObjectCollection $collection, $sh = '', &$c_query = null)
 {
     showtime('start-controller-index');
     $collection->setParams();
     if (!$sh instanceof SearchHandler) {
         $sh = $this->setSearchHandler($collection);
     }
     showtime('sh-extracted');
     if (isset($this->search) && !isset($this->_data['orderby']) && !isset($this->_data['page'])) {
         $cc = $this->search->toConstraintChain();
         $sh->addConstraintChain($cc);
         $sh->save();
         // cache the search string
         $search_string_array = array('fop' => $this->search->toString('fop'), 'html' => $this->search->toString('html'));
         $_SESSION['search_strings'][EGS_USERNAME][$sh->search_id] = $search_string_array;
     }
     // Need to set the orderby of the collection in the searchhandler?
     // But if this is set in the collection, seems to take it
     // so why not here?
     showtime('pre-load');
     $collection->load($sh, $c_query);
     $this->view->set('total_records', $collection->total_records);
     $this->view->set('num_records', $collection->num_records);
     $this->view->set('num_pages', $collection->num_pages);
     $this->view->set('cur_page', $collection->cur_page);
     showtime('post-load');
     $this->view->set(strtolower($collection->getModelName()) . 's', $collection);
     if (isset($this->_data['json'])) {
         $this->view->set('echo', $collection->toJSON());
     }
     if ($this->_templateName === false) {
         $this->_templateName = $this->getTemplateName('index');
     }
     showtime('end-controller-index');
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:35,代码来源:Controller.php

示例9: index

 public function index(DataObjectCollection $collection, $sh = '', &$c_query = null)
 {
     $display_fields = array();
     $model = $collection->getModel();
     // If selection of display fields is disabled, don't set them up
     if (!$this->search->disable_field_selection) {
         foreach ($model->getFields() as $fieldname => $field) {
             if ($fieldname != 'id' && $fieldname != 'usercompanyid' && substr($fieldname, -3) != '_id' && !isset($model->belongsToField[$fieldname])) {
                 $display_fields[$fieldname] = $field->tag;
             }
         }
         $selected_fields = array();
         if (isset($this->_data['Search']['display_fields'])) {
             foreach ($this->_data['Search']['display_fields'] as $fieldname => $field) {
                 $selected_fields[$fieldname] = prettify($field);
             }
         } else {
             foreach ($collection->getFields() as $fieldname => $field) {
                 if (substr($fieldname, -3) != '_id') {
                     $selected_fields[$fieldname] = $field->tag;
                 }
             }
         }
         $this->view->set('selected_fields', $selected_fields);
         $display_fields = array_diff($display_fields, $selected_fields);
         $this->view->set('display_fields', $display_fields);
     }
     if (!isset($this->_data['ajax_print'])) {
         parent::index($collection, $sh, $c_query);
         return;
     }
     showtime('start-controller-index');
     $collection->setParams();
     if (!$sh instanceof SearchHandler) {
         $sh = $this->setSearchHandler($collection);
     }
     showtime('sh-extracted');
     // Need to set the orderby of the collection in the searchhandler?
     // But if this is set in the collection, seems to take it
     // so why not here?
     showtime('pre-load');
     // TODO: Printing needs looking at; the model is too complicated and
     // therefore maintenance is difficult. Needs breaking down into more
     // logical discrete units.
     // BEWARE: the following may not work for all cases
     // needs extensive testing; this is implemented for selectorController output
     if ($this->_data['session_key'] == 'undefined') {
         $sh->setLimit(0);
         $collection->load($sh);
         $this->PrintCollection($collection);
     }
     // echo 'controller::index setting printing session data<br>';
     // in this instance we can only pass the data through the session
     // but it's only the collection name and search id :-)
     $_SESSION['printing'][$this->_data['session_key']]['collection'] = get_class($collection);
     $_SESSION['printing'][$this->_data['session_key']]['search_id'] = $this->_data['search_id'];
     exit;
     showtime('end-controller-index');
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:59,代码来源:printController.php

示例10: foreach

</div>

<div class="main-box home-box-list">';
foreach ($articledb as $article) {
    echo '
<div class="post-list">
    <div class="item-avatar"><a href="/user/', $article['uid'], '">
    <img src="/avatar/normal/', $article['uavatar'], '.png" alt="', $article['author'], '" />
    </a></div>
    <div class="item-content count', $article['comments'], '">
        <h1><a rel="bookmark" href="/topics/', $article['id'], '">', $article['title'], '</a></h1>
        <span class="item-date"><i class="fa fa-archive"></i> <a href="/nodes/', $article['cid'], '">', $article['cname'], '</a>';
    if ($article['comments']) {
        echo '&nbsp;&nbsp;<i class="fa fa-user"></i> <a href="/user/', $article['ruid'], '">', $article['rauthor'], '</a>&nbsp;&nbsp;<i class="fa fa-clock-o"></i> <time datetime="', showtime2($article['edittime']), '" pubdate="pubdate" data-updated="true">', showtime($article['edittime']), '</time>回复';
    } else {
        echo '&nbsp;&nbsp;<i class="fa fa-user"></i> <a href="/user/', $article['uid'], '">', $article['author'], '</a>&nbsp;&nbsp;<i class="fa fa-clock-o"></i> <time datetime="', showtime2($article['addtime']), '" pubdate="pubdate" data-updated="true">', showtime($article['addtime']), '</time>发表';
    }
    echo '        </span>
    </div>';
    if ($article['comments']) {
        $gotopage = ceil($article['comments'] / $options['commentlist_num']);
        if ($gotopage == 1) {
            $c_page = '';
        } else {
            $c_page = '/' . $gotopage;
        }
        echo '<div class="item-count"><a href="/topics/', $article['id'], $c_page, '#reply', $article['comments'], '">', $article['comments'], '</a></div>';
    }
    echo '    <div class="c"></div>
</div>';
}
开发者ID:kingstudio,项目名称:youbbs,代码行数:31,代码来源:ios_home.php

示例11: count

echo '
<div class="nav-title">
        <i class="fa fa-angle-double-right"></i> <a href="/nodes/', $c_obj['id'], '">', $c_obj['name'], '</a> (', $c_obj['articles'], ')';
if ($cur_user['notic']) {
    $notic_n = count(array_unique(explode(',', $cur_user['notic']))) - 1;
    echo '<span class="nopic"><a href="/notifications"><i class="fa fa-bell"></i> 您有', $notic_n, '条消息</a></span>';
}
echo '    <div class="c"></div>
</div>

<div class="main-box">
<div class="topic-title">
    <div class="topic-title-main float-left">
        <h1>', $t_obj['title'], '</h1>
        <div class="topic-title-date">
        <i class="fa fa-clock-o"></i><time datetime="', showtime2($t_obj['edittime']), '" pubdate="pubdate" data-updated="true">', showtime($t_obj['addtime']), '</time>&nbsp;&nbsp;<i class="fa fa-eye"></i>', $t_obj['views'], '阅读';
if ($t_obj['favorites']) {
    echo '&nbsp;&nbsp;<i class="fa fa-star"></i>', $t_obj['favorites'], '收藏';
}
if ($cur_user && $cur_user['flag'] > 4) {
    if ($in_favorites) {
        echo '&nbsp;&nbsp;<i class="fa fa-star-o"></i><a href="/favorites?act=del&id=', $t_obj['id'], '" title="取消收藏">取消</a>';
    } else {
        echo '&nbsp;&nbsp;<i class="fa fa-star"></i><a href="/favorites?act=add&id=', $t_obj['id'], '" title="收藏">收藏</a>';
    }
    if ($cur_user['flag'] >= 99) {
        echo '&nbsp;&nbsp;<i class="fa fa-pencil-square"></i><a href="/admin-edit-post-', $t_obj['id'], '">编辑</a>';
    }
}
echo '        </div>
    </div>
开发者ID:kingstudio,项目名称:youbbs,代码行数:31,代码来源:ios_postpage.php

示例12: array_push

    }
    if (!empty($_POST['ip'])) {
        $querystr .= " AND ip='%s'";
        array_push($argv, $_POST['ip']);
    }
    $querystr .= " ORDER BY date,id LIMIT " . $next . "," . ($next + $limit + 1);
    array_unshift($argv, $querystr);
    $query = squery_args($argv);
    $i = 0;
    while ($result = sql_fetch_array($query)) {
        $i++;
        if ($i > $limit) {
            echo "<tr><td colspan=\"4\" align=\"center\">*** There are more results... ***</td></tr>";
            break;
        }
        $sdate = showtime($result['date']);
        if (isodd($i)) {
            $class = "";
        } else {
            $class = "alt";
        }
        ?>
<tr>
<td class=<?php 
        echo $class;
        ?>
><?php 
        echo $sdate;
        ?>
</td>
<td class=<?php 
开发者ID:nirn,项目名称:karnaf,代码行数:31,代码来源:mng_viewlogs.php

示例13: array

    } else {
        if ($act == 'pass') {
            $tip1 = '数据库更新失败,修改尚未保存,请稍后再试';
        } else {
            $tip2 = '数据库更新失败,修改尚未保存,请稍后再试';
        }
    }
}
// users表flag 列没加入到索引,如果用户上10万,获取下面用户有点慢,8~10秒
// 获取最近等待审核的用户
$query_sql = "SELECT id,name,regtime FROM yunbbs_users WHERE flag=1 ORDER BY id DESC LIMIT 10";
$query = $DBS->query($query_sql);
$userdb = array();
while ($user = $DBS->fetch_array($query)) {
    // 格式化内容
    $user['regtime'] = showtime($user['regtime']);
    $userdb[] = $user;
}
// 获取最近被禁用的用户
$query_sql = "SELECT id,name,regtime FROM yunbbs_users WHERE flag=0 ORDER BY id DESC LIMIT 10";
$query = $DBS->query($query_sql);
$userdb2 = array();
while ($user = $DBS->fetch_array($query)) {
    // 格式化内容
    $user['regtime'] = showtime($user['regtime']);
    $userdb2[] = $user;
}
// 页面变量
$title = '用户管理';
$pagefile = CURRENT_DIR . '/templates/default/' . $tpl . 'admin-user.php';
include CURRENT_DIR . '/templates/default/' . $tpl . 'layout.php';
开发者ID:zhangwenhua029,项目名称:YouBBS-EOEN,代码行数:31,代码来源:admin-user.php

示例14: count

$table_msgCount = $DBS->fetch_one_array("SELECT count(1) as count FROM `yunbbs_messages` \n                    WHERE (FromUID={$cur_uid} and ToUID={$cid}) OR (FromUID = {$cid} and ToUID={$cur_uid})");
$total_msg = $table_msgCount['count'];
// 处理正确的页数
// 第一页是1
$total_page = ceil($total_msg / $options['list_shownum']);
if ($page <= 0 || $total_page == 0) {
    $page = 1;
} elseif ($page > $total_page) {
    $page = $total_page;
}
$query_sql = "SELECT m.*,u1.avatar FROM `yunbbs_messages` m\n                inner join yunbbs_users u1 on m.FromUID=u1.id\n                WHERE (FromUID={$cur_uid} and ToUID={$cid}) OR (FromUID = {$cid} and ToUID={$cur_uid})\n                order by id desc limit " . ($page - 1) * $options['list_shownum'] . "," . $options['list_shownum'];
$query = $DBS->query($query_sql);
$messagedb = array();
while ($message = $DBS->fetch_array($query)) {
    // 格式化内容
    if ($message['IsRead'] == '0' && $message['ToUID'] == $cur_uid) {
        $message['Title'] = "<span class=\"label label-success\">未读</span>";
    } else {
        $message['Title'] = '';
    }
    $message['AddTime'] = showtime($message['AddTime']);
    $messagedb[] = $message;
}
unset($message);
$DBS->free_result($query);
//  设置此人发给我的消息为已读
$DBS->unbuffered_query("UPDATE yunbbs_messages SET IsRead=1 WHERE FromUID={$cid} and ToUID={$cur_uid}");
// 页面变量
$title = '发私信';
$pagefile = CURRENT_DIR . '/templates/default/' . $tpl . 'newmessage.php';
include CURRENT_DIR . '/templates/default/' . $tpl . 'layout.php';
开发者ID:gdsellerPd,项目名称:YouBBS-EOEN,代码行数:31,代码来源:newmessage.php

示例15: foreach

</div>

<div class="main-box home-box-list">';
foreach ($articledb as $article) {
    echo '
<div class="post-list">
    <div class="item-avatar"><a href="/user/', $article['uid'], '">
    <img src="/avatar/normal/', $article['uavatar'], '.png" alt="', $article['author'], '" />
    </a></div>
    <div class="item-content count', $article['comments'], '">
        <h1><a href="/topics/', $article['id'], '">', $article['title'], '</a></h1>
        <span class="item-date"><i class="fa fa-archive"></i> <a href="/nodes/', $article['cid'], '">', $article['cname'], '</a>';
    if ($article['comments']) {
        echo '&nbsp;&nbsp;<i class="fa fa-user"></i> <a href="/user/', $article['ruid'], '">', $article['rauthor'], '</a>&nbsp;&nbsp;<i class="fa fa-clock-o"></i> ', showtime($article['edittime']), '回复';
    } else {
        echo '&nbsp;&nbsp;<i class="fa fa-user"></i> <a href="/user/', $article['uid'], '">', $article['author'], '</a>&nbsp;&nbsp;<i class="fa fa-clock-o"></i> ', showtime($article['addtime']), '发表';
    }
    echo '        </span>
    </div>';
    if ($article['comments']) {
        $gotopage = ceil($article['comments'] / $options['commentlist_num']);
        if ($gotopage == 1) {
            $c_page = '';
        } else {
            $c_page = '/' . $gotopage;
        }
        echo '<div class="item-count"><a href="/topics/', $article['id'], $c_page, '#reply', $article['comments'], '">', $article['comments'], '</a></div>';
    }
    echo '    <div class="c"></div>
</div>';
}
开发者ID:gdsellerPd,项目名称:YouBBS-EOEN,代码行数:31,代码来源:ios_home.php


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