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


PHP build_link函数代码示例

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


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

示例1: check_banned

if ($config["usebwordprot"] >= BWORD_POST) {
    $post["posttext"] = check_banned($post["posttext"]);
}
if (isset($config['auto_close']) && $config['auto_close'] > 0) {
    thwb_query("UPDATE  " . $pref . "thread SET threadclosed = '1' WHERE threadtime < '" . (time() - ($config['auto_close'] + 1) * 86400) . "'");
}
if (isset($config['auto_delete']) && $config['auto_delete'] > 0) {
    thwb_query("DELETE FROM " . $pref . "thread WHERE threadtime < " . (time() - $config['auto_delete'] * 86400) . "");
}
// neue nachricht posten
thwb_query("INSERT INTO " . $pref . "post (posttime, posttext, userid, threadid, postemailnotify, postsmilies, postcode, postip, postguestname)\n    VALUES('{$ctime}',\n    '" . addslashes(preparse_code($post['posttext'])) . "',\n    '{$g_user['userid']}',\n    '{$thread['threadid']}',\n    '" . ($post['postemailnotify'] ? 1 : 0) . "',\n    '" . ($post['postsmilies'] ? 1 : 0) . "',\n    '" . ($post['postcode'] ? 1 : 0) . "',\n    '" . addslashes($REMOTE_ADDR) . "',\n    '" . $post['postguestname'] . "')");
// Replys um 1 erh&ouml;hen in der board datenbank
thwb_query("UPDATE " . $pref . "board SET\n    boardlastpost='{$ctime}',\n    boardposts=boardposts+1,\n    boardlastpostby='" . addslashes($g_user['username']) . "',\n    boardthreadtopic='" . addslashes($thread['threadtopic']) . "',\n    boardthreadid={$thread['threadid']} WHERE boardid='{$board['boardid']}'");
if ($g_user['userid']) {
    // Den postings wert des postenden users erh&ouml;hen
    thwb_query("UPDATE " . $pref . "user SET userlastpost={$ctime}, userposts=userposts+1 WHERE userid='{$g_user['userid']}'");
}
// Replys um 1 erh&ouml;hen in der topic datenbank + time aktualisieren
thwb_query("UPDATE " . $pref . "thread SET threadtime='{$ctime}', threadreplies=threadreplies+1,\n    threadlastreplyby='" . addslashes($g_user['username']) . "' WHERE threadid='{$thread['threadid']}'");
// email zeug
if ($config['use_email']) {
    $TRegmail = new Template("./templates/mail/newreply.mail");
    $r_email = thwb_query("SELECT DISTINCT\n        user.useremail as useremail, thread.threadtopic as threadtopic\n    FROM\n        " . $pref . "post as post, " . $pref . "user as user, " . $pref . "thread as thread\n    WHERE\n        thread.threadid={$thread['threadid']} AND\n        post.threadid={$thread['threadid']} AND\n        post.userid=user.userid AND\n        post.postemailnotify=1 AND\n        user.userid<>{$g_user['userid']}");
    while ($email = mysql_fetch_array($r_email)) {
        $text = '';
        eval($TRegmail->GetTemplate("text"));
        @mail($email['useremail'], $config['board_name'] . " - Neue Antwort", $text, "From: {$config['board_admin']}");
    }
}
header("Location: " . build_link("showtopic.php?threadid={$thread['threadid']}&time={$time}&pagenum=lastpage#bottom", true));
开发者ID:adrianbroher,项目名称:thwboard,代码行数:30,代码来源:reply.php

示例2: build_link

    $i = 1;
}
$imax = $page + PADDING;
if ($imax > $pages) {
    $imax = $pages;
}
for ($i; $i <= $imax; $i++) {
    if ($i == $page) {
        $pagesstring .= "&gt;" . $i . "&lt; ";
    } else {
        $pagesstring .= "[<a class=\"hefo\" href=\"" . build_link("memberlist.php?orderby={$orderby}&amp;ordertype={$ordertype}&amp;search=" . urlencode($search) . "&amp;char={$char}&amp;page={$i}") . "\">" . $i . "</a>] ";
    }
}
// letzte seite
if ($page + PADDING < $pages) {
    $pagesstring .= '... [<a class="hefo" href="' . build_link('memberlist.php?orderby=' . $orderby . '&amp;char=' . $char . '&amp;ordertype=' . $ordertype . '&amp;search=' . urlencode($search) . '&amp;page=' . $pages) . '">Letzte Seite</a>]';
}
$MEMBER_ROWS = '';
$r_user = thwb_query("SELECT userid, username, useremail, usericq, userhomepage, userjoin, userposts, userlocation,\n    userhideemail, userlastpost FROM " . $pref . "user " . $where . " ORDER BY {$orderby} {$ordertype} LIMIT " . intval($page - 1) * $config['userperpage'] . ", " . $config['userperpage']);
if (!mysql_num_rows($r_user)) {
    $MEMBER_ROWS = '<tr bgcolor="' . $style['CellA'] . '">
          <td align="center" class="stdfont" colspan="8">Keine User gefunden!</td>
        </tr>';
    $pages = 1;
    $pagesstring = "&gt;1&lt;";
} else {
    while ($user = mysql_fetch_array($r_user)) {
        $i % 2 == 0 ? $user['bgcolor'] = $style['CellA'] : ($user['bgcolor'] = $style['CellB']);
        $user['userjoin'] = form_date($user['userjoin']);
        $user['userlastpost'] = form_date($user['userlastpost']);
        $user['userlocation'] = chopstring(parse_code($user['userlocation']), 50);
开发者ID:adrianbroher,项目名称:thwboard,代码行数:31,代码来源:memberlist.php

示例3: define

// ===================================================
// Hier kann die maximale Anzahl der Avatar-Bilder pro
// Zeile eingestellt werden, einfach die vorgegebene
// Nummer durch die gewünschte Zahl ersetzen:
$maxpics = 5;
// ===================================================
define('THWB_NOSESSION_PAGE', true);
include "./inc/header.inc.php";
$navpath .= 'Alle Avatare auflisten';
$Tframe = new Template("templates/" . $style['styletemplate'] . "/frame.html");
$Tavatar = new Template("templates/" . $style['styletemplate'] . "/listavatar.html");
if (isset($sortbyname) && $sortbyname) {
    $avatar_sort = "{$style['stdfont']}<a href=\"" . build_link("listavatar.php") . "\">Nach Avatar-Nummer sortieren</a>{$style['stdfontend']}";
    $orderby = "avatarname";
} else {
    $avatar_sort = "{$style['stdfont']}<a href=\"" . build_link("listavatar.php?sortbyname=1") . "\">Nach Namen sortieren</a>{$style['stdfontend']}";
    $orderby = "avatarid";
}
$start = $e = 0;
$r_avatar = thwb_query("SELECT avatarid, avatarname, avatarurl FROM " . $pref . "avatar ORDER BY {$orderby}");
$avatar_rows = '';
while ($avatar_data = mysql_fetch_array($r_avatar)) {
    $start++;
    $avatar_rows .= "<td" . ($e % 2 == 0 ? ' bgcolor="' . $style['CellA'] . '"' : ' bgcolor="' . $style['CellB'] . '"') . "><img src=\"{$avatar_data['avatarurl']}\" border=\"0\"><br><b>" . $style['smallfont'] . "{$avatar_data['avatarid']}. {$avatar_data['avatarname']}</font></b></td>\n";
    if ($start == $maxpics) {
        $avatar_rows .= "</tr><tr>";
        $start = 0;
        $e++;
    }
}
eval($Tavatar->GetTemplate("CONTENT"));
开发者ID:adrianbroher,项目名称:thwboard,代码行数:31,代码来源:listavatar.php

示例4: or

<?php

/*
          ThWboard - PHP/MySQL Bulletin Board System
        ==============================================
            (c) 2000-2004-2002 by
          download the latest version:
            http://www.thwboard.de
          This  program is  free  software;  you can
          redistribute it and/or modify it under the
          terms of the GNU General Public License as
          published by the Free Software Foundation;
          either  version 2 of  the License,  or (at
          your option) any later version.
        ==============================================
*/
define('THWB_NOSESSION_PAGE', true);
require './inc/header.inc.php';
$a_pages = array('index' => 'H&auml;ufig gestellte Fragen', 'format' => 'Formatierung und Smilies', 'page1' => 'Benutzerfunktionen', 'page2' => 'Generelle Boardbenutzung', 'page3' => 'Lesen und Schreiben von Nachrichten');
if (!isset($page) || !file_exists('./templates/' . $style['styletemplate'] . '/faq_' . $page . '.html') || !isset($a_pages[$page])) {
    $page = "index";
}
$Tframe = new Template('./templates/' . $style['styletemplate'] . '/frame.html');
$Tfaq = new Template('templates/' . $style['styletemplate'] . '/faq_' . $page . '.html');
$navpath .= '<a class="bglink" href="' . build_link("help.php") . '">FAQ</a> &raquo; ' . $a_pages[$page];
eval($Tfaq->GetTemplate("CONTENT"));
eval($Tframe->GetTemplate());
开发者ID:adrianbroher,项目名称:thwboard,代码行数:27,代码来源:help.php

示例5: logLine

     logLine(" CallerID Changed to: {$tmpCallerID}\n");
     $query = "UPDATE asterisk_log SET CallerID='" . $tmpCallerID . "', callstate='Dial' WHERE asterisk_id='" . $id . "'";
     db_checked_query($query);
 }
 //
 // CLICK TO DIAL OUTBOUND HANDLING - WE ALREADY KNOW THE ASSOCIATED RECORD SO NO NEED TO LOOK IT UP
 //
 if ($e['Event'] == 'NewAccountCode' && strpos($e['AccountCode'], "LICKTODIAL") != false) {
     $id = AMI_getUniqueIdFromEvent($e);
     if (findLoggedCallByAsteriskId($id) === FALSE) {
         logLine("The AccountCode is" . $e['AccountCode']);
         logLine(" Account Code ID is: {$id}\n");
         $time = time();
         $callerID = stripExtensionFromAccountCode($e['Channel']);
         $result = findCallDetailsByClickToDialString($e['AccountCode']);
         $beanLink = build_link($result['module'], $result['record']);
         $query = "INSERT INTO asterisk_log (asterisk_id, callstate, direction, callerID, channel, timestamp_call, bean_module, bean_id, bean_name, bean_link, user_extension) " . "VALUES('{$id}', 'Connected', 'O', '{$result['number']}', '{$e['Channel']}', FROM_UNIXTIME('{$time}'), '{$result['dbtable']}', '{$result['record']}', '{$result['query']['name']}', '{$beanLink}', '{$callerID}')";
         logLine($query);
         //. "bean_link='" . $result['query'][''] . "' "
         //. "bean_description='" . $result['parent_module'] . "' "
         //. "bean_description='" . $result['parent_id'] . "' "
         //. "bean_description='" . $result['parent_name'] . "' "
         //. "bean_description='" . $result['parent_link'] . "'";
         db_checked_query($query);
     }
 }
 // Had to switch to using Dial End commands because when using hangups I couldn't do calls to cell phones properly... (basically there are so many
 // hangup events it killed me...
 // Queues have the opposite issue... I can't detect the end of a Queue call unfortuntely...
 // Queues -- Could not use Dial End, only Hangup would work.
 //
开发者ID:nitouser,项目名称:yaai,代码行数:31,代码来源:asteriskLogger.php

示例6: array

      * =======================================
      */
     $ets_outter->main_title = $config->get('site_name') . ": " . $l['title-art-list'];
     $ets_outter->page_title = $l['title-art-list'];
     $USESKIN = skin_article_list;
     $all = $db->getAllArray("# GETTING ALL ARTICLES\r\n\t\tSELECT a.article_id, a.subject, a.date, u.user_id, u.username\r\n\t\tFROM " . db_articles . " AS a, " . db_users . " AS u\r\n\t\tWHERE a.author_id = u.user_id\r\n\t\tORDER BY a.date DESC;");
     $i = 0;
     $ets->articles = array();
     foreach ($all as $a) {
         stripslashes_array($a);
         $ets->articles[$i]->subject = $a['subject'];
         $ets->articles[$i]->date = date($config->get('art_date_list'), $a['date']);
         $ets->articles[$i]->author = $a['username'];
         $ets->articles[$i]->url_article = build_link('index.php', array('action' => 'article', 'id' => $a['article_id']));
         $ets->articles[$i]->author_url_profile = build_link('profile.php', array('user' => $a['user_id']));
         $ets->articles[$i]->author_url_blogs = build_link('blog.php', array('user' => $a['user_id']));
         $i++;
     }
     break;
 case 'validate':
     /**
      * =======================================
      *	V A L I D A T E   U S E R
      * =======================================
      */
     // validate a users email address.
     $ets->page_body = "";
     $USESKIN = skin_basic;
     if ($user->isLogedIn || !isset($_PATH['code'])) {
         $ets->page_body .= $l['validate_failed'];
     } else {
开发者ID:nickfun,项目名称:newlifeblogger,代码行数:31,代码来源:index.php

示例7: COUNT

<?php

/**
 * =======================================
 *		V I E W
 * =======================================
 */
if (!defined('IN_NLB3')) {
    echo 'NLB3 Denies Direct Access';
    exit;
}
$USESKIN = skin_basic;
$ets_outter->main_title = $config->get('site_name') . ": " . $l['title-usercp'];
$ets_outter->page_title = $l['title-view'];
$name = $user->get('username');
// get number of private blogs
$private = $db->getArray('SELECT COUNT(blog_id) AS c 
FROM ' . db_blogs . ' 
WHERE access=' . access_private . '
AND author_id="' . $user->get('user_id') . '";');
$private = $private['c'];
$body = $l['ucp-view-blogs'];
$body = str_replace("%PUBLIC%", $user->get('blog_count'), $body);
$body = str_replace("%PRIVATE%", $private, $body);
$body = str_replace("%USER%", $user->get('username'), $body);
$body = str_replace("%LINK%", build_link('blog.php', array('user' => $user->id)), $body);
$ets->page_body = $body;
开发者ID:nickfun,项目名称:newlifeblogger,代码行数:27,代码来源:view.php

示例8: getComments

    /**
     * @return array
     * @param int $id
     * @param string
     * @param string
     * @param object nlb_user
     * @param string
     * @desc Grabs and formats all the comments to blog $id and sets them up for ETS
     * @date 02-10-04
     */
    function getComments($id, $date_format, $lang_anon, &$user, $lang_edit)
    {
        // get ones posted by real users
        $real = $this->sql->getAllArray('# Grab real comments
		SELECT c.comment_id, c.author_id, c.date, c.body, u.username
		FROM ' . db_comments . ' AS c, ' . db_users . ' AS u
		WHERE c.parent_id = ' . $id . ' AND c.author_id = u.user_id
		ORDER BY c.date ASC;');
        // get guest posts
        $guest = $this->sql->getAllArray('# Grab guest comments
		SELECT comment_id, author_id, date, body
		FROM ' . db_comments . '
		WHERE author_id = -1 AND parent_id = ' . $id . '
		ORDER BY date ASC;');
        /*
        	Because I'm using two querys to grab the comments, I have the problem of sorting
        	the results. I'm throwing all the results together in $grab. Then I go throuh them
        	and build a new array, with the date of the post as the key. Now I can use ksort()
        	to sort by key (asc) and the comments will be in the propper order. The key doesn't
        	matter in the templates, as ETS will just loop through them in order. Probally 
        	costs more memory this way, but the job gets done.
        	
        	We won't have to bulid $grab if there are only one type of comments, so im trying
        	to detect if ksort is needed or not below.
        */
        if (empty($real) && empty($guest)) {
            $all = array();
            // no comments
        } elseif (empty($real)) {
            $all = $guest;
            // only guest comments
        } elseif (empty($guest)) {
            $all = $real;
            // only real comments
        } else {
            // a mix of real and guest comments.
            $grab = array_merge($real, $guest);
            foreach ($grab as $val) {
                $all[$val['date']] = $val;
            }
            ksort($all);
        }
        // loop through real, get id nubers to check for avatars
        $av_ins = false;
        $avatars = array();
        if (count($real) != 0) {
            $av_ins = '(';
            foreach ($real as $r) {
                $av_ins .= $r['author_id'] . ', ';
            }
            $av_ins = substr($av_ins, 0, -2);
            $av_ins .= ')';
            $r = $this->sql->query('SELECT owner_id, isCustom, file, type
			FROM ' . db_avatars . '
			WHERE owner_id IN' . $av_ins . ' AND type != 2;');
            while ($row = mysql_fetch_assoc($r)) {
                if (isset($avatars[$row['owner_id']]) && $avatars[$row['owner_id']]['type'] != 3) {
                    $avatars[$row['owner_id']] = $row;
                }
                if (!isset($avatars[$row['owner_id']])) {
                    $avatars[$row['owner_id']] = $row;
                }
            }
        }
        $c = array();
        $i = 0;
        foreach ($all as $comment) {
            $c[$i]->date = date($date_format, $comment['date']);
            //$body = stripslashes( $comment['body'] );
            $body = $comment['body'];
            $body = htmlspecialchars($body);
            $body = nl2br($body);
            $body = $this->addSmiles($body);
            $body = insertBBCode($body);
            $c[$i]->body = $body;
            if ($comment['author_id'] == -1) {
                // a guest post!
                $c[$i]->author = $lang_anon;
                $c[$i]->guest = true;
            } else {
                // comment by normal user!
                $c[$i]->author = $comment['username'];
                $c[$i]->author_url_blog = build_link('blog.php', array('user' => $comment['author_id']));
                $c[$i]->author_url_profile = build_link('profile.php', array('user' => $comment['author_id']));
                // avatar check
                if (isset($avatars[$comment['author_id']])) {
                    if ($avatars[$comment['author_id']]['isCustom'] == 1) {
                        $c[$i]->avatar_url = script_path . 'avatars/' . $avatars[$comment['author_id']]['file'];
                    } else {
                        $c[$i]->avatar_url = script_path . 'avatars/default/' . $avatars[$comment['author_id']]['file'];
//.........这里部分代码省略.........
开发者ID:nickfun,项目名称:newlifeblogger,代码行数:101,代码来源:nlb_blog.class.php

示例9: thwb_query

        $a_stats['admin_board_text'] = $a_stats['admin_kategorien_text'] = $a_stats['admin_themen_text'] = $a_stats['admin_views_text'] = $a_stats['admin_beitrag_text'] = '';
    }
    // create $a_stats['admins']
    $r_stats = thwb_query("SELECT userid, username FROM " . $pref . "user WHERE userisadmin = 1 AND usernodelete = 0 ORDER BY username ASC");
    $a_stats['admins'] = '';
    while ($datarow = mysql_fetch_array($r_stats)) {
        $a_stats['admins'] .= '<a href="v_profile.php?userid=' . $datarow['userid'] . '" target="_blank">' . $datarow['username'] . '</a>, ';
    }
    $a_stats['admins'] = substr($a_stats['admins'], 0, -2);
    mysql_free_result($r_stats);
    unset($datarow);
    // create $a_stats['uradmins']
    $r_stats = thwb_query("SELECT userid, username FROM " . $pref . "user WHERE userisadmin = 1 AND usernodelete = 1 ORDER BY username ASC");
    $a_stats['uradmins'] = '';
    while ($datarow = mysql_fetch_array($r_stats)) {
        $a_stats['uradmins'] .= '<a href="' . build_link('v_profile.php?userid=' . $datarow['userid']) . '" target="_blank">' . $datarow['username'] . '</a>, ';
    }
    $a_stats['uradmins'] = substr($a_stats['uradmins'], 0, -2);
    mysql_free_result($r_stats);
    unset($datarow);
    // create $a_stats['newmember']
    $r_stats = thwb_query("SELECT userid, username FROM " . $pref . "user ORDER BY userjoin DESC LIMIT 5");
    $a_stats['newmember'] = '';
    while ($datarow = mysql_fetch_array($r_stats)) {
        $a_stats['newmember'] .= '<a href="' . build_link('v_profile.php?userid=' . $datarow['userid']) . '" target="_blank">' . $datarow['username'] . '</a>, ';
    }
    $a_stats['newmember'] = substr($a_stats['newmember'], 0, -2);
    mysql_free_result($r_stats);
    unset($datarow);
    eval($t_stats->GetTemplate('stats'));
}
开发者ID:adrianbroher,项目名称:thwboard,代码行数:31,代码来源:default.stats.php

示例10: Permission

            permissions
################################################################################
*/
global $P;
if (isset($board['boardid'])) {
    $P = new Permission($g_user['groupids'], $board['boardid']);
    requires_permission(P_VIEW);
} else {
    $P = new Permission($g_user['groupids']);
}
/*
################################################################################
            create navigation path ( forum / board / thread .. )
################################################################################
*/
$navigation[] = "<a class=\"bglink\" href=\"" . build_link("index.php") . "\">{$config['board_name']}</a>";
$navigation = thwb_array_reverse($navigation);
while (list($key, $val) = each($navigation)) {
    $navpath .= "{$val} &raquo; ";
}
/*
################################################################################
            static stuff
################################################################################
*/
$topicicon = array('fullalpha', 'smile', 'wink', 'angry', 'frown', 'biggrin', 'gumble', 'question', 'strange', 'rolleyes', 'oah', 'prefect');
/*
#################################################################################
            additional template stuff
#################################################################################
*/
开发者ID:adrianbroher,项目名称:thwboard,代码行数:31,代码来源:header.inc.php

示例11: build_link

                $ets->blog[$i]->avatar = '<img src="' . $av_file . '" />';
            }
            $i++;
        }
        // setup tags for next/prev pages.
        if ($page > 0) {
            $ets->url_page_prev = build_link('friends.php', array('page' => $page - 1, 'user' => $USERID));
        }
        if ($total > $page_start + $perpage) {
            $ets->url_page_next = build_link('friends.php', array('page' => $page + 1, 'user' => $USERID));
        }
    }
    $ets->username = $u->get('username');
    $ets->USER_TEMPLATE = serialize(array('type' => 'friends', 'user_id' => $USERID));
    $OUTTER = serialize(array('type' => 'outter'));
} else {
    if ($user->isLogedIn) {
        jsRedirect(script_path . 'friends.php/user/' . $this->id);
    } else {
        jsRedirect(script_path . 'index.php');
    }
}
// debug( $ets ); exit;
// setup some standard tags
$uid_array = array('user' => $USERID);
$ets->url_home = build_link('blog.php', $uid_array);
$ets->url_profile = build_link('profile.php', $uid_array);
$ets->url_friends = build_link('friends.php', $uid_array);
$ets->rss_url = build_link('rss.php', array('id' => $USERID));
$ets->rss_img = '<a href="' . $ets->rss_url . '"><img src="' . script_path . 'xml.gif" border="0" /></a>';
printt($ets, $OUTTER);
开发者ID:nickfun,项目名称:newlifeblogger,代码行数:31,代码来源:friends.php

示例12: buildMainNav

/**
 * @return ARRAY
 * @param ARRAY
 * @param OBJECT nlb_user
 * @desc Builds main navigation links. nlb_user object must be initialize and working.
 * @date 01-08-03
 */
function buildMainNav($l, &$user)
{
    $i = 0;
    $menu[$i]->text = $l['nav-home'];
    $menu[$i]->link = script_path . 'index.php';
    $i++;
    $menu[$i]->text = $l['nav-members'];
    $menu[$i]->link = script_path . 'members.php';
    $i++;
    $menu[$i]->text = $l['nav-articles'];
    $menu[$i]->link = build_link('index.php', array('action' => 'list_articles'));
    $i++;
    $menu[$i]->text = $l['nav-stats'];
    $menu[$i]->link = script_path . 'stats.php';
    $i++;
    $menu[$i]->text = $l['nav-search'];
    $menu[$i]->link = script_path . 'search.php';
    $i++;
    if ($user->isLogedIn) {
        // these show up when user is loged in
        $menu[$i]->text = $l['nav-logout'];
        $menu[$i]->link = script_path . 'login.php?action=logout';
        $i++;
        $menu[$i]->text = $l['nav-user'];
        $menu[$i]->link = script_path . 'usercp.php';
    } else {
        // these when is not loged in
        $menu[$i]->text = $l['nav-login'];
        $menu[$i]->link = script_path . 'login.php';
        $i++;
        $menu[$i]->text = $l['nav-register'];
        $menu[$i]->link = script_path . 'register.php';
    }
    if ($user->isLogedIn && $user->isAllowed('admin')) {
        // when user is an admin
        $i++;
        $menu[$i]->text = $l['nav-admin'];
        $menu[$i]->link = script_path . 'admincp.php';
    }
    return $menu;
}
开发者ID:nickfun,项目名称:newlifeblogger,代码行数:48,代码来源:functions.php

示例13: count

}
// setup next/prev links
$total = $db->getArray("SELECT count(*) as c FROM " . db_users . ";");
$total = $total['c'];
if ($page > 0) {
    $ets->url_page_prev = build_link('members.php', array('page' => $page - 1, 'sort' => $sort, 'way' => $way));
}
if ($total > $perpage * ($page + 1)) {
    $ets->url_page_next = build_link('members.php', array('page' => $page + 1, 'sort' => $sort, 'way' => $way));
}
// build sort links
$i = 0;
foreach ($allowed_sort as $item) {
    $ets->sort[$i]->item = $l['mem-sort-' . $item];
    $ets->sort[$i]->asc = $l['mem-asc'];
    $ets->sort[$i]->desc = $l['mem-desc'];
    $ets->sort[$i]->url_asc = build_link('members.php', array('sort' => $item, 'way' => 'asc'));
    $ets->sort[$i]->url_desc = build_link('members.php', array('sort' => $item, 'way' => 'desc'));
    $i++;
}
$ets_outter->recent_blogs = $b->getRecent($config);
$ets_outter->main_title = $config->get('site_name') . ": " . $l['title-memlist'];
$ets_outter->page_title = $l['title-memlist'];
$ets_outter->sitenav = buildMainNav($l, $user);
$ets_outter->query_count = $db->getquerycount();
$ets_outter->script_path = script_path;
$ets_outter->gen_time = mymicrotime($timer_start, 5);
$ets_outter->welcome[] = $user->getWelcomeTags();
printt($ets_outter, skin_header);
printt($ets, skin_members);
printt($ets_outter, skin_footer);
开发者ID:nickfun,项目名称:newlifeblogger,代码行数:31,代码来源:members.php

示例14: validateEmail

    /**
     * @return bool
     * @param object nlb_config $config
     * @desc Force a user to validate his email address. Returns true if sent, false otherwise
     * @date 02-08-04
     */
    function validateEmail(&$config)
    {
        global $l;
        $mail = new nlb_mail($this->sql);
        if ($mail->Active) {
            // make code.
            $code = md5(uniqid(rand(), true));
            $link = build_link('index.php', array('action' => 'validate', 'code' => $code));
            $link = full_url . $link;
            $body = $l['validation_email'];
            $body = str_replace("%LINK%", $link, $body);
            $body = str_replace("%SITE%", $config->get('site_name'), $body);
            $body = str_replace("%USER%", $this->get('username'), $body);
            $mail->AddAddress($this->get('email'), $this->get('username'));
            $mail->Subject = $l['validation_subject'];
            $mail->Body = $body;
            if (!$mail->Send()) {
                // mail was not sent, must set user to valid.
                $this->set('valid', 1);
                $this->updateDB();
                return false;
            }
            // add record in validation table.
            $this->sql->query(' # Add validation row
			INSERT INTO `nlb3_validate` ( `validate_id` , `owner_id` , `code` , `date` )
			VALUES (
			"", "' . $this->id . '", "' . $code . '", "' . time() . '"
			);');
            $this->set('valid', 0);
            $this->updateDB();
            return true;
        }
        // Server is not sending email's, assume user gave a good email.
        $this->set('valid', 1);
        $this->updateDB();
        return false;
    }
开发者ID:nickfun,项目名称:newlifeblogger,代码行数:43,代码来源:nlb_user.class.php

示例15: build_link

        }
    } else {
        $replytext = '';
    }
    if ($config['smilies']) {
        $smilies_on_off = "AN";
    } else {
        $smilies_on_off = "AUS";
    }
    if ($config['use_email']) {
        $notifyavailable = '';
    } else {
        $notifyavailable = ' (Derzeit nicht verf&uuml;gbar)';
    }
    if ($g_user['userid']) {
        $replyusername = "{$style['stdfont']}{$g_user['userhtmlname']}{$style['stdfontend']}{$style['smallfont']} [ <a href=\"" . build_link('logout.php?uid=' . $g_user['userid']) . "\">Logout</a> ]{$style['smallfontend']}";
    } else {
        if ($g_user['userid'] == 0 && $P->has_permission(P_REPLY)) {
            $replyusername = '<input class="tbinput" name="post[postguestname]" type="text">' . $style['smallfont'] . ' (Minimal ' . $config['min_usernamelength'] . ', maximal ' . $config['max_usernamelength'] . ' Zeichen, keine Sonderzeichen) <b>Das Forum speichert ihre IP-Addresse!</b>' . $style['smallfontend'];
        } else {
            $replyusername = '';
        }
    }
    $Treply = new Template("./templates/" . $style['styletemplate'] . "/replyform.html");
    eval($Treply->GetTemplate("REPLYFORM"));
}
thwb_query("UPDATE " . $pref . "thread SET threadviews=threadviews+1 WHERE threadid='{$thread['threadid']}'");
$JUMP_MENU = jumpmenu($board['boardid']);
$navpath .= 'Threadansicht';
$titleprepend = htmlspecialchars($thread['threadtopic']) . ' - ';
eval($Tpostings->GetTemplate("CONTENT"));
开发者ID:adrianbroher,项目名称:thwboard,代码行数:31,代码来源:showtopic.php


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