• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP timer函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: exec

 public function exec()
 {
     // Download binary file
     if ($this->_binary_file) {
         // Send headers
         $this->_sendHeaders();
         // Send file
         readfile($this->_binary_file);
         exit;
     }
     // 404? (without template)
     if (!$this->_template || !Template::exists($this->_template) && $this->_template != '_404') {
         $this->setData('cache.excluded', true);
         $this->_template = '_404';
     }
     // Output
     timer('start', 'template_parse');
     ob_start();
     Template::parse($this->_template, $this->_data);
     $content = ob_get_clean();
     $content = Event::filter('content', $content);
     timer('end', 'template_parse');
     // If not excluding cache, then save cache
     if (!$this->getData('cache.excluded')) {
         Cache::factory()->save($this->_headers, $content, $this->getData('page_ttl'));
     }
     // Send headers
     $this->_sendHeaders();
     // Send content
     echo Event::filter('cache', $content);
 }
开发者ID:andelux,项目名称:landingpages,代码行数:31,代码来源:Response.php


示例2: display

function display($data)
{
    global $base, $ev;
    echo $data, "\n";
    if ($ev) {
        $ev->delTimer();
    }
    $ev = null;
    timer();
}
开发者ID:jinguanio,项目名称:david,代码行数:10,代码来源:timer.php


示例3: cek_login

function cek_login()
{
    $timeout = $_SESSION[timeout];
    if (time() < $timeout) {
        timer();
        return true;
    } else {
        unset($_SESSION[timeout]);
        return false;
    }
}
开发者ID:r3k4,项目名称:banksoal,代码行数:11,代码来源:timeout.php


示例4: returntimer

function returntimer($pagetimer)
{
    /*$intertime = timer() - $timer;
    	//if ($_SERVER['REQUEST_TIME']) $intertime = timer() - $_SERVER['REQUEST_TIME'];
    	$lol = substr($intertime, 2, 3);
    	if ($lol[0] == 0 && $lol[1] == 0) $lol = $lol[2];
    	elseif ($lol[0] == 0) $lol = $lol[1].$lol[2];
    
    	$intertime = ($intertime >= 1 ? substr($intertime, 0, 5)." sec" : $lol."ms");
    	return $intertime;*/
    $timer = round(timer() - $pagetimer, 3);
    return $timer[0] == 0 ? round(substr($timer, 2)) . " ms" : $timer . "  sec";
}
开发者ID:biton-project,项目名称:Litecoin-Wallet,代码行数:13,代码来源:functions.php


示例5: create

 public function create()
 {
     //$core = Singleton::factory('Core');
     $title = KvLite::get('site', 'title');
     $this->headTitle($title)->setSeparator(' :: ');
     $this->genMeta();
     //$this->headLink()->prependStylesheet('/asset/css/layout.css');
     //$this->headLink()->prependStylesheet('/asset/css/main.css');
     //$this->headLink()->prependStylesheet('/asset/css/base.css');
     if (defined('TIMERSTART') && !defined('TIMERTOTAL')) {
         timer();
     }
     return $this->render('layout.phtml');
 }
开发者ID:robotamer,项目名称:oldstuff,代码行数:14,代码来源:Template.php


示例6: print_lateral

function print_lateral($nick, $cargo_ID = false, $time, $siglas = '', $user_ID = '', $avatar = '', $votos = 0, $voto = false, $tipo = 'msg', $item_ID = 0)
{
    global $pol;
    if ($cargo_ID == 99) {
        $cargo = 'Extranjero';
    }
    return '<table border="0" width="100%"><tr>
<td width="40" valign="top">' . ($avatar == 'true' ? '<span>' . avatar($user_ID, 40) . '</span>' : '') . '</td>
<td align="right" valign="top" nowrap="nowrap">
<b>' . ($cargo_ID ? '<img src="' . IMG . 'cargos/' . $cargo_ID . '.gif" /> ' : '') . crear_link($nick) . '</b><br />
<span class="min">' . timer($time) . ' ' . $siglas . '</span> 
<span id="' . $tipo . $item_ID . '">' . confianza($votos) . '</span>' . ($pol['pais'] == PAIS && $item_ID != 0 && $user_ID != $pol['user_ID'] ? '<br />
<span id="data_' . $tipo . $item_ID . '" class="votar" type="' . $tipo . '" name="' . $item_ID . '" value="' . $voto . '"></span>' : '') . '
</td></tr></table>';
}
开发者ID:rafacouto,项目名称:VirtualPol,代码行数:15,代码来源:c-foro.php


示例7: returntimer

function returntimer($pagetimer)
{
    // better then previous but still bit shitty assumes all pages are +10ms :)
    $timer = timer() - $pagetimer;
    if ($timer[0] == 0) {
        if (substr($timer, 2, 1) == 0) {
            $timer = substr($timer, 3, 2) . " ms";
        } else {
            $timer = substr($timer, 2, 3) . " ms";
        }
        // +100 ms
    } else {
        $timer = $timer . "  sec";
    }
    return $timer;
}
开发者ID:bitonsource,项目名称:applebyte-faucet,代码行数:16,代码来源:functions.php


示例8: run

 public function run()
 {
     //            $lock = SynLockFactory::getFileSynLock(0x1234);
     //            tprintError("try to get the lock....");
     //            $lock->tryLock();
     //            tprintOk("get the lock.");
     //            sleep(10);
     //            tprintWarning("release the lock.");
     //            $lock->unlock();
     $model = Loader::model("news");
     $timer = timer();
     for ($i = 0; $i < 1000000; $i++) {
         $data = array('name' => 'xiaoming', 'pass' => 'xiaoming_pass', 'address' => 'china ShenZhen');
         $model->insert($data);
     }
     tprintOk("插入完成,耗时:" . (timer() - $timer) . " 秒");
 }
开发者ID:yangjian102621,项目名称:herosphp,代码行数:17,代码来源:TestTask.class.php


示例9: prepareUser

 public function prepareUser()
 {
     $i = microtime(true);
     error_log(' [TIMER] ------------');
     $this->loadCandidates();
     timer($i, 'loadCandidates');
     $this->loadDiscussion();
     timer($i, 'loadDiscussion');
     $this->loadResponses2();
     timer($i, 'loadResponses');
     $this->prepareActivity();
     timer($i, 'prepareActivity');
     $this->prepareSort();
     timer($i, 'prepareSort');
     $this->sortA();
     timer($i, 'sortA');
 }
开发者ID:r4mp,项目名称:Foodle,代码行数:17,代码来源:ActivityStream.php


示例10: display_forum_tags

    function display_forum_tags($info)
    {
        $locale = fusion_get_locale();
        echo render_breadcrumbs();
        if (isset($_GET['tag_id'])) {
            // thread design
            echo "<!--pre_forum-->\n";
            echo "<div class='forum-title m-t-20'>" . $locale['forum_0341'] . "</div>\n";
            echo "<div class='filter'>\n";
            forum_filter($info);
            echo "</div>\n";
            if (!empty($info['threads']['pagenav'])) {
                echo "<div class='text-right'>\n";
                echo $info['threads']['pagenav'];
                echo "</div>\n";
            }
            if (!empty($info['threads'])) {
                echo "<div class='forum-container list-group-item'>\n";
                if (!empty($info['threads']['sticky'])) {
                    foreach ($info['threads']['sticky'] as $cdata) {
                        render_thread_item($cdata);
                    }
                }
                if (!empty($info['threads']['item'])) {
                    foreach ($info['threads']['item'] as $cdata) {
                        render_thread_item($cdata);
                    }
                }
                echo "</div>\n";
            } else {
                echo "<div class='text-center'>" . $locale['forum_0269'] . "</div>\n";
            }
            if (!empty($info['threads']['pagenav'])) {
                echo "<div class='text-right hidden-xs m-t-15'>\n";
                echo $info['threads']['pagenav'];
                echo "</div>\n";
            }
            if (!empty($info['threads']['pagenav2'])) {
                echo "<div class='hidden-sm hidden-md hidden-lg m-t-15'>\n";
                echo $info['threads']['pagenav2'];
                echo "</div>\n";
            }
        } else {
            ?>
            <div class="row m-0">
                <?php 
            if (!empty($info['tags'])) {
                ?>
                    <?php 
                unset($info['tags'][0]);
                ?>
                    <?php 
                foreach ($info['tags'] as $tag_id => $tag_data) {
                    ?>
                        <div class="col-xs-12 col-sm-4" style="height: 200px; max-height:200px; background-color: <?php 
                    echo $tag_data['tag_color'];
                    ?>
">
                            <a href="<?php 
                    echo $tag_data['tag_link'];
                    ?>
">
                                <div class="panel-body">
                                    <h4 class="text-white"><?php 
                    echo $tag_data['tag_title'];
                    ?>
</h4>
                                    <p class="text-white"><?php 
                    echo $tag_data['tag_description'];
                    ?>
</p>
                                </div>
                                <hr/>
                                <?php 
                    if (!empty($tag_data['threads'])) {
                        ?>
                                <span class="tag_result text-white">
                                    <?php 
                        echo trim_text($tag_data['threads']['thread_subject'], 10) . " - " . timer($tag_data['threads']['thread_lastpost']);
                        ?>
                                </span>
                                <?php 
                    }
                    ?>
                            </a>
                        </div>
                    <?php 
                }
                ?>
                <?php 
            }
            ?>
            </div>
            <?php 
        }
    }
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:96,代码来源:forum_tags.php


示例11: dirname

require dirname(__DIR__) . "/logic.php";
require __DIR__ . "/lib_mongodb.php";
require __DIR__ . "/autoload.php";
use model\User;
use model\Question;
use model\Answer;
$base_url = 'http://www.zhihu.com';
$ids = Question::getIds();
echo "there are ", count($ids), " questions to fetch\n";
$sum = $existing_sum = 1;
foreach ($ids as $qid) {
    $url = "{$base_url}/question/{$qid}";
    timer();
    list($code, $content) = odie_get($url);
    slog($url . " [{$code}]");
    $t = timer();
    echo "Fetch question {$qid} [{$code}] {$t} ms\n";
    $username_list = get_username_list($content);
    timer();
    foreach ($username_list as $username => $nickname) {
        echo "\t{$username}";
        if (User::saveUser($username, $nickname)) {
            $existing_sum++;
        }
        $sum++;
    }
    Question::setFetched($qid);
    $rate = intval((1 - $existing_sum / $sum) * 100);
    $t = timer();
    echo "\tSave: {$t} ms\t Rate {$rate}%\n";
}
开发者ID:linzelong,项目名称:zhihu-archive,代码行数:31,代码来源:fetch_user_by_question_mongo.php


示例12: die

<?php

if (!defined('UC_SYSOP')) {
    die('Direct access denied.');
}
show_blocks('d');
?>
<td valign="top" width="155">
<?php 
show_blocks('r');
?>
</td>
<?php 
// Variables for End Time
$seconds = timer() - $tstart;
$phptime = $seconds - $querytime;
$query_time = $querytime;
$percentphp = number_format($phptime / $seconds * 100, 2);
$percentsql = number_format($query_time / $seconds * 100, 2);
$seconds = substr($seconds, 0, 8);
// Хочешь убрать копирайт? (TBVERSION) - Поддержки разработчика, заплати! Не будь быдлом!
print "</td></tr></table>\n";
print "<table class=\"bottom\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr valign=\"top\">\n";
print "<td width=\"49%\" class=\"bottom\"><div align=\"center\"><br /><b>" . TBVERSION . (BETA ? BETA_NOTICE : "") . "<br />" . sprintf($tracker_lang["page_generated"], $seconds, $queries, $percentphp, $percentsql) . "</b></div></td>\n";
print "</tr></table>\n";
print "</body></html>\n";
开发者ID:klldll,项目名称:tbdev,代码行数:26,代码来源:stdfoot.php


示例13: session_start

<?
// LTC WALLET
session_start();
include("functions.php");
$start = timer();

include("config.php");
include("bitcoin.inc");
include("address.inc");
include("recaptchalib.inc");
include ("adscaptchalib.inc");

//captha
$publickey = "6LfYSssSAAAAAF2w_TeMklmv-6VWUDhcECr9rWfI";
$privatekey = "6LfYSssSAAAAAPntQz9H0twbsdyk8kQHO_F4mupD";

// init

#$btclient = new bitcoinClient("http",$btclogin["username"],$btclogin["password"],$btclogin["host"],$btclogin["port"]);
#$addr = new Address($btclient,$sqlogin);
#$derp = $btclient->getinfo();
//Wallet by microwallet
$microwallet = new Microwallet('YOUR_API_KEY_HERE');


//$this->PDO_Conn = new PDO("mysql:host={$sqllogin['host']};dbname={$sqllogin['dbname']}", $sqllogin['username'], $sqllogin['password']);
$dbconn = mysql_connect($sqlogin['host'],$sqlogin['username'],$sqlogin['password']);
mysql_select_db($sqlogin['dbname']);

// time for pages ..
开发者ID:pomoke,项目名称:bitcoin-faucet,代码行数:30,代码来源:wallet.php


示例14: htmlentities

             echo '<img style="margin: 0 0 -3px 0;border: 0px;" src="../files/blogs/anime_icon_' . $row['id'] . '.jpg" alt="" width="32" height="32"/>&#160;';
             echo '</td><td>';
             echo '<a href="../blogs/index.php?act=view&amp;id=' . $row['id'] . '">' . htmlentities($row['name'], ENT_QUOTES, 'UTF-8') . '</a> <br />(' . date('d.m.o / H:i', $row['time'] + $sdvigclock * 3600) . ')<br />';
             echo '</td></tr></table>';
         } else {
             echo '<a href="../blogs/index.php?act=view&amp;id=' . $row['id'] . '">' . htmlentities($row['name'], ENT_QUOTES, 'UTF-8') . '</a> (' . date('d.m.o / H:i', $row['time'] + $sdvigclock * 3600) . ')<br />';
         }
         echo '<div class="sub"></div>';
         $text = $row['text'];
         if (mb_strlen($text) > 100) {
             $str = mb_substr($text, 0, 100);
             $text = mb_substr($str, 0, mb_strrpos($str, ' ')) . '...';
         }
         echo functions::checkout($text, 2, 1);
         if ($row['time'] > time()) {
             echo '<div class="sub func">Waktu tersisa untuk disembunyikan: ' . timer($row['time'] - time()) . '</div>';
         }
         echo '</div>
 <div class="bmenu"><a href="manage.php?act=newsedit&amp;id=' . $row['id'] . '">Edit Blogs</a> | <a href="manage.php?act=delnews&amp;id=' . $row['id'] . '">Delete</a></div>';
         ++$i;
     }
     echo '<div class="phdr">Total Blogs: ' . $total . '</div>';
     if ($total > $kmess) {
         echo '<p>' . functions::display_pagination('index.php?act=animes&amp;mod=list&amp;', $start, $total, $kmess) . '</p>';
         echo '<p><form action="index.php" method="get">
 <input type="hidden" name="act" value="mod_news"/>
 <input type="hidden" name="mod" value="list"/>
 <input type="text" name="page" size="2"/>
 <input type="submit" value="' . $lng['to_page'] . ' &gt;&gt;"/></form></p>';
     }
 } else {
开发者ID:chegestar,项目名称:catroxs,代码行数:31,代码来源:manage.php


示例15: form_button

                echo form_button('preview', $locale['articles_0240'], $locale['articles_0240'], array('class' => 'btn-default m-r-10'));
                echo form_button('publish', $locale['articles_0242'], $locale['articles_0242'], array('class' => 'btn-primary m-r-10'));
                echo form_button('delete', $locale['articles_0243'], $locale['articles_0243'], array('class' => 'btn-warning m-r-10'));
                echo closeform();
            }
        }
    }
} else {
    $result = dbquery("SELECT\n\t\t\tts.submit_id, ts.submit_datestamp, ts.submit_criteria, tu.user_id, tu.user_name, tu.user_avatar, tu.user_status\n\t\t\tFROM " . DB_SUBMISSIONS . " ts\n\t\t\tLEFT JOIN " . DB_USERS . " tu ON ts.submit_user=tu.user_id\n\t\t\tWHERE submit_type='a' order by submit_datestamp desc\n\t\t\t");
    $rows = dbrows($result);
    if ($rows > 0) {
        echo "<div class='well'>" . sprintf($locale['articles_0044'], format_word($rows, $locale['fmt_submission'])) . "</div>\n";
        echo "<table class='table table-striped'>\n";
        echo "<tr>\n";
        echo "<th>" . $locale['articles_0041'] . "</th>\n<th>" . $locale['articles_0046'] . "</th><th>" . $locale['articles_0047'] . "</th><th>" . $locale['articles_0048'] . "</th>";
        echo "</tr>\n";
        echo "<tbody>\n";
        while ($data = dbarray($result)) {
            $submit_criteria = unserialize($data['submit_criteria']);
            echo "<tr>\n";
            echo "<td><a href='" . clean_request("submit_id=" . $data['submit_id'], array("section", "aid"), TRUE) . "'>" . $submit_criteria['article_subject'] . "</a></td>\n";
            echo "<td>" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "</td>\n";
            echo "<td>" . timer($data['submit_datestamp']) . "</td>\n";
            echo "<td>" . $data['submit_id'] . "</td>\n";
            echo "</tr>\n";
        }
        echo "</tbody>\n</table>\n";
    } else {
        echo "<div class='well text-center m-t-20'>" . $locale['articles_0042'] . "</div>\n";
    }
}
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:31,代码来源:article_submissions.php


示例16: render_dashboard


//.........这里部分代码省略.........
        echo "</div>\n";
        closeside();
        echo "</div>\n";
    }
    echo "</div>\n";
    echo "<div class='row'>\n";
    echo "<div class='col-xs-12 co-sm-6 col-md-6 col-lg-3'>\n";
    openside("<span class='text-smaller text-uppercase'><strong>" . $locale['283'] . "</strong></span><span class='pull-right badge'>" . number_format($infusions_count) . "</span>");
    if ($infusions_count > 0) {
        global $global_infusions;
        echo "<div class='comment_content'>\n";
        if (!empty($global_infusions)) {
            foreach ($global_infusions as $inf_id => $inf_data) {
                echo "<span class='badge m-b-10'>" . $inf_data['inf_title'] . "</span>\n";
            }
        }
        echo "</div>\n";
        closeside("" . (checkrights("I") ? "<div class='text-right text-uppercase'>\n<a class='text-smaller' href='" . ADMIN . "infusions.php" . $aidlink . "'>" . $locale['285'] . "</a><i class='entypo right-open-mini'></i></div>\n" : '') . "");
    } else {
        echo "<div class='text-center'>" . $locale['284'] . "</div>\n";
        closeside();
    }
    // comments
    echo "</div>\n<div class='col-xs-12 co-sm-6 col-md-6 col-lg-3'>\n";
    openside("<span class='text-smaller text-uppercase'><strong>" . $locale['277'] . "</strong></span><span class='pull-right badge'>" . number_format($global_comments['rows']) . "</span>");
    if (count($global_comments['data']) > 0) {
        foreach ($global_comments['data'] as $i => $comment_data) {
            echo "<!--Start Comment Item-->\n";
            echo "<div data-id='{$i}' class='comment_content clearfix p-t-10 p-b-10' " . ($i > 0 ? "style='border-top:1px solid #ddd;'" : '') . " >\n";
            echo "<div class='pull-left display-inline-block' style='margin-top:0px; margin-bottom:10px;'>" . display_avatar($comment_data, "25px", "", FALSE, "", "") . "</div>\n";
            echo "<div id='comment_action-{$i}' class='btn-group pull-right display-none' style='position:absolute; right: 30px; margin-top:25px;'>\n\n\t\t\t\t<a class='btn btn-xs btn-default' title='" . $locale['274'] . "' href='" . ADMIN . "comments.php" . $aidlink . "&amp;ctype=" . $comment_data['comment_type'] . "&amp;comment_item_id=" . $comment_data['comment_item_id'] . "'><i class='entypo eye'></i></a>\n\t\t\t\t<a class='btn btn-xs btn-default' title='" . $locale['275'] . "' href='" . ADMIN . "comments.php" . $aidlink . "&amp;action=edit&amp;comment_id=" . $comment_data['comment_id'] . "&amp;ctype=" . $comment_data['comment_type'] . "&amp;comment_item_id=" . $comment_data['comment_item_id'] . "'><i class='entypo pencil'></i></a>\n\t\t\t\t<a class='btn btn-xs btn-default' title='" . $locale['276'] . "' href='" . ADMIN . "comments.php" . $aidlink . "&amp;action=delete&amp;comment_id=" . $comment_data['comment_id'] . "&amp;ctype=" . $comment_data['comment_type'] . "&amp;comment_item_id=" . $comment_data['comment_item_id'] . "'><i class='entypo trash'></i></a></div>\n";
            echo "<strong>" . profile_link($comment_data['user_id'], $comment_data['user_name'], $comment_data['user_status']) . "</strong>\n";
            echo "<span class='text-lighter'>" . $locale['273'] . "</span> <a href='" . sprintf($link_type[$comment_data['comment_type']], $comment_data['comment_item_id']) . "'><strong>" . $comments_type[$comment_data['comment_type']] . "</strong></a>";
            echo "<br/>\n" . timer($comment_data['comment_datestamp']) . "<br/>\n";
            echo "<span class='text-smaller text-lighter'>" . trimlink(parseubb($comment_data['comment_message']), 70) . "</span>\n";
            echo "</div>\n";
            echo "<!--End Comment Item-->\n";
        }
        if (isset($global_comments['comments_nav'])) {
            echo "<div class='clearfix'>\n";
            echo "<span class='pull-right text-smaller'>" . $global_comments['comments_nav'] . "</span>";
            echo "</div>\n";
        }
    } else {
        echo "<div class='text-center'>" . $global_comments['nodata'] . "</div>\n";
    }
    closeside();
    echo "</div>\n<div class='col-xs-12 co-sm-6 col-md-6 col-lg-3'>\n";
    // Ratings
    openside("<span class='text-smaller text-uppercase'><strong>" . $locale['278'] . "</strong></span>");
    if (count($global_ratings['data']) > 0) {
        foreach ($global_ratings['data'] as $i => $ratings_data) {
            echo "<!--Start Rating Item-->\n";
            echo "<div class='comment_content clearfix p-t-10 p-b-10' " . ($i > 0 ? "style='border-top:1px solid #ddd;'" : '') . " >\n";
            echo "<div class='pull-left display-inline-block' style='margin-top:0px; margin-bottom:10px;'>" . display_avatar($ratings_data, "25px", "", FALSE, "", "") . "</div>\n";
            echo "<strong>" . profile_link($ratings_data['user_id'], $ratings_data['user_name'], $ratings_data['user_status']) . "</strong>\n";
            echo "<span class='text-lighter'>" . $locale['273a'] . "</span>\n";
            echo "<a href='" . sprintf($link_type[$ratings_data['rating_type']], $ratings_data['rating_item_id']) . "'><strong>" . $comments_type[$ratings_data['rating_type']] . "</strong></a>";
            echo "<span class='text-lighter m-l-10'>" . str_repeat("<i class='fa fa-star fa-fw'></i>", $ratings_data['rating_vote']) . "</span>\n<br/>";
            echo timer($ratings_data['rating_datestamp']) . "<br/>\n";
            echo "</div>\n";
            echo "<!--End Rating Item-->\n";
        }
        if (isset($global_ratings['ratings_nav'])) {
            echo "<div class='clearfix'>\n";
            echo "<span class='pull-right text-smaller'>" . $global_ratings['ratings_nav'] . "</span>";
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:67,代码来源:functions.php


示例17: render_thread_item

 function render_thread_item($data)
 {
     global $locale, $info, $userdata;
     echo "<div class='thread-item' id='thread_" . $data['thread_id'] . "'>\n";
     echo "<div class='row m-0'>\n";
     echo "<div class='col-xs-12 col-sm-9 col-md-6 p-l-0'>\n";
     echo "<div class='pull-left m-r-10 m-t-5'>\n" . $data['thread_last']['avatar'] . "</div>\n";
     $thead_icons = '';
     foreach ($data['thread_icons'] as $icon) {
         $thead_icons .= $icon;
     }
     echo "<div class='overflow-hide'>\n";
     echo "<a class='forum-link' href='" . $data['thread_link']['link'] . "'>" . $data['thread_link']['title'] . "</a>\n<span class='m-l-10 m-r-10 text-lighter'>" . $thead_icons . "</span>\n";
     echo "<div class='text-smaller'>" . $data['thread_starter'] . "</div>\n";
     echo $data['thread_pages'];
     echo isset($data['track_button']) ? "<div class='forum_track'><a onclick=\"return confirm('" . $locale['global_060'] . "');\" href='" . $data['track_button']['link'] . "'>" . $data['track_button']['name'] . "</a>\n</div>\n" : '';
     echo "</div>\n";
     echo "</div>\n";
     // end grid
     echo "<div class='hidden-xs col-sm-3 col-md-3 p-l-0 p-r-0 text-center'>\n";
     echo "<div class='display-inline-block forum-stats p-5 m-r-5 m-b-0'>\n";
     echo "<h4 class='text-bigger strong text-dark m-0'>" . number_format($data['thread_views']) . "</h4>\n";
     echo "<span>" . format_word($data['thread_views'], $locale['fmt_views'], 0) . "</span>";
     echo "</div>\n";
     echo "<div class='display-inline-block forum-stats p-5 m-r-5 m-b-0'>\n";
     echo "<h4 class='text-bigger strong text-dark m-0'>" . number_format($data['thread_postcount']) . "</h4>\n";
     echo "<span>" . format_word($data['thread_postcount'], $locale['fmt_post'], 0) . "</span>";
     echo "</div>\n";
     if ($data['forum_type'] == '4') {
         echo "<div class='display-inline-block forum-stats p-5 m-r-5 m-b-0'>\n";
         echo "<h4 class='text-bigger strong text-dark m-0'>" . number_format($data['vote_count']) . "</h4>\n";
         echo "<span>" . format_word($data['vote_count'], $locale['fmt_vote'], 0) . "</span>";
         echo "</div>\n";
     }
     echo "</div>\n";
     // end grid
     echo "<div class='forum-lastuser hidden-xs hidden-sm col-md-3'>\n\t\t\t" . $data['thread_last']['profile_link'] . " " . timer($data['thread_last']['time']) . "<br/>\n\t\t\t" . fusion_first_words(strip_tags($data['thread_last']['post_message']), 10) . "\n\t\t</div>\n";
     echo "</div>\n";
     echo "</div>\n";
 }
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:40,代码来源:forum_main.php


示例18: get_thread_post


//.........这里部分代码省略.........
              */
             // Quote & Edit Link
             if ($this->getThreadPermission("can_reply")) {
                 if (!$this->thread_info['thread']['thread_locked']) {
                     $pdata['post_quote'] = array('link' => INFUSIONS . "forum/viewthread.php?action=reply&amp;forum_id=" . $pdata['forum_id'] . "&amp;thread_id=" . $pdata['thread_id'] . "&amp;post_id=" . $pdata['post_id'] . "&amp;quote=" . $pdata['post_id'], 'title' => $locale['forum_0266']);
                     if (iMOD || ($forum_settings['forum_edit_lock'] == TRUE && $pdata['is_last_post'] || $forum_settings['forum_edit_lock'] == FALSE) && $userdata['user_id'] == $pdata['post_author'] && ($forum_settings['forum_edit_timelimit'] <= 0 || time() - $forum_settings['forum_edit_timelimit'] * 60 < $pdata['post_datestamp'])) {
                         $pdata['post_edit'] = array('link' => INFUSIONS . "forum/viewthread.php?action=edit&amp;forum_id=" . $pdata['forum_id'] . "&amp;thread_id=" . $pdata['thread_id'] . "&amp;post_id=" . $pdata['post_id'], 'title' => $locale['forum_0265']);
                     }
                     $pdata['post_reply'] = array('link' => INFUSIONS . "forum/viewthread.php?action=reply&amp;forum_id=" . $pdata['forum_id'] . "&amp;thread_id=" . $pdata['thread_id'] . "&amp;post_id=" . $pdata['post_id'], 'title' => $locale['forum_0509']);
                 } elseif (iMOD) {
                     $pdata['post_edit'] = array('link' => INFUSIONS . "forum/viewthread.php?action=edit&amp;forum_id=" . $pdata['forum_id'] . "&amp;thread_id=" . $pdata['thread_id'] . "&amp;post_id=" . $pdata['post_id'], 'title' => $locale['forum_0265']);
                 }
             }
             // rank img
             if ($pdata['user_level'] <= USER_LEVEL_ADMIN) {
                 if ($forum_settings['forum_ranks']) {
                     $pdata['user_rank'] = show_forum_rank($pdata['user_posts'], $pdata['user_level'], $pdata['user_groups']);
                     // in fact now is get forum rank
                 } else {
                     $pdata['user_rank'] = getuserlevel($pdata['user_level']);
                 }
             } else {
                 if ($forum_settings['forum_ranks']) {
                     $pdata['user_rank'] = iMOD ? show_forum_rank($pdata['user_posts'], 104, $pdata['user_groups']) : show_forum_rank($pdata['user_posts'], $pdata['user_level'], $pdata['user_groups']);
                 } else {
                     $pdata['user_rank'] = iMOD ? $locale['userf1'] : getuserlevel($pdata['user_level']);
                 }
             }
             // Website
             if ($pdata['user_web'] && (iADMIN || $pdata['user_status'] != 6 && $pdata['user_status'] != 5)) {
                 $user_web_url_prefix = !preg_match("@^http(s)?\\:\\/\\/@i", $pdata['user_web']) ? "http://" . $pdata['user_web'] : $pdata['user_web'];
                 $pdata['user_web'] = array('link' => $user_web_url_prefix . $pdata['user_web'], 'title' => $locale['forum_0364']);
             } else {
                 $pdata['user_web'] = array('link' => '', 'title' => '');
             }
             // PM link
             $pdata['user_message'] = array('link' => '', 'title' => '');
             if (iMEMBER && $pdata['user_id'] != $userdata['user_id'] && (iADMIN || $pdata['user_status'] != 6 && $pdata['user_status'] != 5)) {
                 $pdata['user_message'] = array('link' => BASEDIR . 'messages.php?msg_send=' . $pdata['user_id'], "title" => $locale['send_message']);
             }
             // User Sig
             if ($pdata['user_sig'] && isset($pdata['post_showsig']) && $pdata['user_status'] != 6 && $pdata['user_status'] != 5) {
                 $pdata['user_sig'] = nl2br(parseubb(parsesmileys(stripslashes($pdata['user_sig'])), "b|i|u||center|small|url|mail|img|color"));
             } else {
                 $pdata['user_sig'] = "";
             }
             // Voting - need up or down link - accessible to author also the vote
             // answered and on going questions.
             // Answer rating
             $pdata['vote_message'] = '';
             //echo $data['forum_type'] == 4 ? "<br/>\n".(number_format($data['thread_postcount']-1)).$locale['forum_0365']."" : ''; // answers
             // form components
             $pdata['post_checkbox'] = iMOD ? "<input type='checkbox' name='delete_post[]' value='" . $pdata['post_id'] . "'/>" : '';
             $pdata['post_votebox'] = '';
             if ($this->thread_info['thread']['forum_type'] == 4) {
                 if ($this->getThreadPermission("can_rate")) {
                     // can vote.
                     $pdata['vote_up'] = array('link' => INFUSIONS . "forum/postify.php?post=voteup&amp;forum_id=" . $pdata['forum_id'] . "&amp;thread_id=" . $pdata['thread_id'] . "&amp;post_id=" . $pdata['post_id'], "title" => $locale['forum_0265']);
                     $pdata['vote_down'] = array('link' => INFUSIONS . "forum/postify.php?post=votedown&amp;forum_id=" . $pdata['forum_id'] . "&amp;thread_id=" . $pdata['thread_id'] . "&amp;post_id=" . $pdata['post_id'], "title" => $locale['forum_0265']);
                     $pdata['post_votebox'] = "<div class='text-center'>\n";
                     $pdata['post_votebox'] .= "<a href='" . $pdata['vote_up']['link'] . "' class='btn btn-default btn-xs m-b-5 p-5' title='" . $locale['forum_0265'] . "'>\n<i class='entypo up-dir icon-xs'></i></a>";
                     $pdata['post_votebox'] .= "<h3 class='m-0'>" . (!empty($pdata['vote_points']) ? $pdata['vote_points'] : 0) . "</h3>\n";
                     $pdata['post_votebox'] .= "<a href='" . $pdata['vote_down']['link'] . "' class='btn btn-default btn-xs m-t-5 p-5' title='" . $locale['forum_0265'] . "'>\n<i class='entypo down-dir icon-xs'></i></a>";
                     $pdata['post_votebox'] .= "</div>\n";
                 } else {
                     $pdata['post_votebox'] = "<div class='text-center'>\n";
                     $pdata['post_votebox'] .= "<h3 class='m-0'>" . (!empty($pdata['vote_points']) ? $pdata['vote_points'] : 0) . "</h3>\n";
                     $pdata['post_votebox'] .= "</div>\n";
                 }
             }
             // Edit Reason - NOT WORKING?
             $pdata['post_edit_reason'] = '';
             if ($pdata['post_edittime']) {
                 $edit_reason = "<div class='edit_reason m-t-10'><small>" . $locale['forum_0164'] . profile_link($pdata['post_edituser'], $pdata['edit_name'], $pdata['edit_status']) . $locale['forum_0167'] . showdate("forumdate", $pdata['post_edittime']) . "</small>\n";
                 if ($pdata['post_editreason'] && iMEMBER) {
                     $edit_reason .= "<br /><a id='reason_pid_" . $pdata['post_id'] . "' rel='" . $pdata['post_id'] . "' class='reason_button small' data-target='reason_div_pid_" . $pdata['post_id'] . "'>";
                     $edit_reason .= "<strong>" . $locale['forum_0165'] . "</strong>";
                     $edit_reason .= "</a>\n";
                     $edit_reason .= "<div id='reason_div_pid_" . $pdata['post_id'] . "' class='reason_div small'>" . $pdata['post_editreason'] . "</div>\n";
                 }
                 $edit_reason .= "</div>\n";
                 $pdata['post_edit_reason'] = $edit_reason;
                 $this->edit_reason = TRUE;
             }
             // Custom Post Message Link/Buttons
             $pdata['post_links'] = '';
             $pdata['post_links'] .= !empty($pdata['post_quote']) ? "<a class='btn btn-xs btn-default' title='" . $pdata['post_quote']["title"] . "' href='" . $pdata['post_quote']['link'] . "'>" . $pdata['post_quote']['title'] . "</a>\n" : '';
             $pdata['post_links'] .= !empty($pdata['post_edit']) ? "<a class='btn btn-xs btn-default' title='" . $pdata['post_edit']["title"] . "' href='" . $pdata['post_edit']['link'] . "'>" . $pdata['post_edit']['title'] . "</a>\n" : '';
             $pdata['post_links'] .= !empty($pdata['print']) ? "<a class='btn btn-xs btn-default' title='" . $pdata['print']["title"] . "' href='" . $pdata['print']['link'] . "'>" . $pdata['print']['title'] . "</a>\n" : '';
             $pdata['post_links'] .= !empty($pdata['user_web']) ? "<a class='btn btn-xs btn-default' class='forum_user_actions' href='" . $pdata['user_web']['link'] . "' target='_blank'>" . $pdata['user_web']['title'] . "</a>\n" : '';
             $pdata['post_links'] .= !empty($pdata['user_message']) ? "<a class='btn btn-xs btn-default' href='" . $pdata['user_message']['link'] . "' target='_blank'>" . $pdata['user_message']['title'] . "</a>\n" : '';
             // Post Date
             $pdata['post_date'] = $locale['forum_0524'] . " " . timer($pdata['post_datestamp']) . " - " . showdate('forumdate', $pdata['post_datestamp']);
             $pdata['post_shortdate'] = $locale['forum_0524'] . " " . timer($pdata['post_datestamp']);
             $pdata['post_longdate'] = $locale['forum_0524'] . " " . showdate('forumdate', $pdata['post_datestamp']);
             $this->thread_info['post_items'][$pdata['post_id']] = $pdata;
             $i++;
         }
     }
 }
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:101,代码来源:Viewthread.php


示例19: parseInfo

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP timer_start函数代码示例发布时间:2022-05-23
下一篇:
PHP timeout函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap