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


PHP URL::index方法代码示例

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


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

示例1: create_tree

function create_tree($id, &$tree, $indent = false)
{
    $content = $indent ? '<div style="margin-left: 8px;">' : '';
    while ($page = array_shift($tree)) {
        if ($page['id'] == $id) {
            $content .= '<b>&#8226; ' . $page['title'] . '</b><br />';
        } else {
            $content .= '&#8226; <a href="' . URL::index('&amp;id=' . $page['id']) . '">' . $page['title'] . '</a><br />';
        }
        if (isset($page['sub'])) {
            $content .= create_tree($id, $page['sub'], true);
        }
    }
    if ($indent) {
        $content .= '</div>';
    }
    return $content;
}
开发者ID:cbsistem,项目名称:nexos,代码行数:18,代码来源:functions.php

示例2: generate_user_info

function generate_user_info(&$row, $date_format, $group_mod, &$from, &$posts, &$joined, &$profile_img, &$profile, &$search_img, &$search, &$pm_img, &$pm, &$email_img, &$email, &$www_img, &$www)
{
    global $lang, $images, $board_config, $MAIN_CFG;
    static $ranksrow;
    if (!is_array($ranksrow)) {
        global $db;
        $ranksrow = $db->sql_ufetchrowset("SELECT * FROM " . RANKS_TABLE . " ORDER BY rank_special, rank_min", SQL_ASSOC);
    }
    $from = !empty($row['user_from']) ? $row['user_from'] : '&nbsp;';
    $joined = formatDateTime($row['user_regdate'], _DATESTRING2);
    $posts = $row['user_posts'] ? $row['user_posts'] : 0;
    $email_img = $email = '';
    for ($j = 0; $j < count($ranksrow); $j++) {
        if ($row['user_rank'] && $row['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] || !$row['user_rank'] && $row['user_posts'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special']) {
            $email = $ranksrow[$j]['rank_title'];
            $email_img = $ranksrow[$j]['rank_image'] ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $email . '" title="' . $email . '" style="border:0;" />' : '';
        }
    }
    $temp_url = URL::index("Your_Account&amp;profile=" . $row['user_id']);
    $profile_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['Read_profile'] . '" title="' . $lang['Read_profile'] . '" /></a>';
    $profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>';
    if (is_user() && is_active('Private_Messages')) {
        $temp_url = URL::index("Private_Messages&amp;mode=post&amp;" . POST_USERS_URL . "=" . $row['user_id']);
        $pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" style="border:0;" /></a>';
        $pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';
    } else {
        $pm = $pm_img = '';
    }
    if ($row['user_website'] == 'http:///' || $row['user_website'] == 'http://') {
        $row['user_website'] = '';
    }
    if ($row['user_website'] != '' && substr($row['user_website'], 0, 7) != 'http://') {
        $row['user_website'] = 'http://' . $row['user_website'];
    }
    $www_img = $row['user_website'] ? '<a href="' . $row['user_website'] . '" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" style="border:0;" /></a>' : '';
    $www = $row['user_website'] ? '<a href="' . $row['user_website'] . '" target="_userwww">' . $lang['Visit_website'] . '</a>' : '';
    $temp_url = URL::index("Forums&amp;file=search&amp;search_author=" . urlencode($row['user_id']) . "&amp;showresults=posts");
    $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" style="border:0;" /></a>';
    $search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';
    return;
}
开发者ID:cbsistem,项目名称:nexos,代码行数:41,代码来源:index.php

示例3: themeheader

function themeheader()
{
    global $slogan, $sitename, $mainindex, $adminindex, $cpgtpl, $site_logo, $userinfo, $CPG_SESS, $MAIN_CFG, $Blocks;
    if ($MAIN_CFG['global']['admingraphic'] & 4) {
        include 'includes/cssmainmenu.php';
    }
    $imgr = $imgl = '';
    // left blocks ?
    if ($Blocks->l && $Blocks->showblocks & 1) {
        $img = $Blocks->hideblock('600') ? 'plus.png' : 'minus.png';
        $imgl = '<img style="float:left; cursor:pointer;" alt="' . _TOGGLE . '" title="' . _TOGGLE . '" id="pic600" src="themes/' . $CPG_SESS['theme'] . '/images/' . $img . '" onclick="blockswitch(\'600\');" />';
    }
    // right blocks ?
    if ($Blocks->r && $Blocks->showblocks & 2) {
        $img = $Blocks->hideblock('601') ? 'plus.png' : 'minus.png';
        $imgr = '<img style="float:right; cursor:pointer;" alt="' . _TOGGLE . '" title="' . _TOGGLE . '" id="pic601" src="themes/' . $CPG_SESS['theme'] . '/images/' . $img . '" onclick="blockswitch(\'601\');" />';
    }
    $user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
    $css_ie = false !== strpos($user_agent, 'MSIE 7.0') ? 'ie7' : (preg_match('#MSIE ([0-6].[0-9]{1,2})#', $user_agent) ? 'ie6' : (isset($_SESSION['SECURITY']['UA']) && $_SESSION['SECURITY']['UA'] == 'Safari' ? 'safari' : (isset($_SESSION['SECURITY']['UA']) && $_SESSION['SECURITY']['UA'] == 'Opera' ? 'opera' : '')));
    $cpgtpl->assign_vars(array('CSS_IE' => $css_ie ? '<link rel="stylesheet" type="text/css" href="themes/' . $CPG_SESS['theme'] . '/style/' . $css_ie . '.css" />' : '', 'PUBLIC_HEADER' => !defined('ADMIN_PAGES'), 'B_L_VISIBLE' => $Blocks->hideblock('600') ? 'style="display: none"' : '', 'G_LEFTIMAGE' => $imgl, 'G_RIGHTIMAGE' => $imgr, 'S_IS_ADMIN' => is_admin(), 'S_IS_USER' => is_user(), 'S_USER_INFO' => _BWEL . ' ' . (is_user() ? $userinfo['username'] : _ANONYMOUS), 'S_LOGO' => $site_logo, 'S_SITENAME' => $sitename, 'S_HOME' => _HOME, 'S_DOWNLOADS' => is_active('Downloads') ? _DownloadsLANG : false, 'S_FORUMS' => _ForumsLANG, 'S_MY_ACCOUNT' => is_user() ? _Your_AccountLANG : _BREG, 'S_ADMIN' => _ADMINISTRATION, 'U_MAININDEX' => $mainindex, 'U_DOWNLOADS' => URL::index('Downloads'), 'U_FORUMS' => URL::index('Forums'), 'U_MY_ACCOUNT' => URL::index(is_user() ? 'Your_Account' : 'Your_Account&amp;file=register'), 'U_ADMININDEX' => $adminindex, 'S_MAIN_MENU' => isset($mmcontent) ? $mmcontent : false));
    $Blocks->display('l');
}
开发者ID:cbsistem,项目名称:nexos,代码行数:22,代码来源:theme.php

示例4: footmsg

function footmsg()
{
    global $db, $dbal, $foot1, $foot2, $foot3, $total_time, $start_mem;
    if ($foot1 != '') {
        $foot1 .= '<br />' . "\n";
    }
    if ($foot2 != '') {
        $foot1 .= $foot2 . '<br />' . "\n";
    }
    if ($foot3 != '') {
        $foot1 .= $foot3 . '<br />' . "\n";
    }
    if (is_admin()) {
        $db_log = $dbal->getConfiguration()->getSQLLogger();
        $end_time = get_microtime();
        $total_time = $end_time - START_TIME - $db->time;
        $new_total_time = $end_time - START_TIME - $db_log->time;
        $foot1 .= sprintf(_PAGEFOOTER, round($total_time, 4) . '|' . round($new_total_time, 4), $db->num_queries . '|' . $db_log->num_queries, round($db->time, 4) . '|' . round($db_log->time, 4));
        // only works if your PHP is compiled with the --enable-memory-limit configuration option
        if (function_exists('memory_get_usage') && $start_mem > 0) {
            $total_mem = memory_get_usage() - $start_mem;
            $foot1 .= '<br />Memory Usage: ' . ($total_mem >= 1048576 ? round(round($total_mem / 1048576 * 100) / 100, 2) . ' MB' : ($total_mem >= 1024 ? round(round($total_mem / 1024 * 100) / 100, 2) . ' KB' : $total_mem . ' Bytes'));
        }
        $foot1 .= '<br />';
    }
    // MS-Analysis Entry
    //	  require( "modules/MS_Analysis/mstrack.php" );
    $foot1 = '<div style="text-align:center;">' . $foot1 . '
	Interactive software released under <a href="http://dragonflycms.org/GNUGPL.html" target="_blank" title="GNU Public License Agreement">GNU GPL</a>,
	<a href="' . URL::index('credits') . '">Code Credits</a>,
	<a href="' . URL::index('privacy_policy') . '">Privacy Policy</a></div>';
    if (is_admin() || NEXOS_DEBUG) {
        $GLOBALS['cpgtpl']->assign_var('S_DEBUG_SQL', NEXOS_DEBUG || $GLOBALS['MAIN_CFG']['debug']['database'] ? $GLOBALS['cpgdebugger']->get_report('sql') : false);
        $GLOBALS['cpgtpl']->assign_var('S_DEBUG_PHP', $GLOBALS['cpgdebugger']->get_report('php'));
    }
    return $foot1;
}
开发者ID:cbsistem,项目名称:nexos,代码行数:37,代码来源:footer.php

示例5: ON

require "modules/" . $cpg_dir . "/include/load.inc";
$cpg_block = false;
$limit = $CONFIG['thumbcols'];
//number of thumbs
// $limit = 5; //number of pictures
$content = '';
// END USER DEFINEABLES
$result = $db->sql_query("SELECT pid, filepath, filename, p.aid, pic_rating, p.votes, p.title FROM " . $cpg_prefix . "pictures AS p INNER JOIN " . $cpg_prefix . "albums AS a ON (p.aid = a.aid AND " . VIS_GROUPS . ") WHERE approved=1 AND p.votes >= '{$CONFIG['min_votes_for_rating']}' GROUP BY pid ORDER BY ROUND((pic_rating+1)/2000) DESC, p.votes DESC LIMIT {$limit}");
$content .= '<br /><table width="100%" cols="' . $limit . '" border="0" cellpadding="0" cellspacing="0"><tr align="center">';
$pic = 0;
while ($row = $db->sql_fetchrow($result)) {
    if (defined('THEME_HAS_RATING_GRAPHICS')) {
        $theme_prefix = $CONFIG['theme'] . '/';
    } else {
        $theme_prefix = '';
    }
    $caption = '<img src="' . $CPG_M_DIR . '/' . $theme_prefix . 'images/rating' . round($row["pic_rating"] / 2000) . '.gif" align="center" alt="" />' . '<br />' . sprintf($lang_get_pic_data['n_votes'], $row['votes']) . '<br />';
    if ($CONFIG['seo_alts'] == 0) {
        $thumb_title = $row['filename'];
    } else {
        if ($row['title'] != '') {
            $thumb_title = $row['title'];
        } else {
            $thumb_title = substr($row['filename'], 0, -4);
        }
    }
    $content .= '<td align="center" valign="baseline"><a href="' . URL::index($cpg_dir . '&amp;file=displayimage&amp;meta=toprated&amp;cat=0&amp;pos=' . $pic) . '"><img src="' . get_pic_url($row, 'thumb') . '" alt="' . $thumb_title . '" title="' . $thumb_title . '" /><br />' . $caption . '</a></td>';
    $pic++;
}
$content .= '</tr><tr><td colspan="' . $limit . '" valign="baseline" align="center"><a href = "' . URL::index($cpg_dir) . '">' . _coppermineLANG . '</a></td></tr></table>';
开发者ID:cbsistem,项目名称:nexos,代码行数:30,代码来源:block-CPG-center-Top_rate_pictures.php

示例6: array

$s_characters .= '<option value="50">50</option>';
for ($i = 100; $i < 1100; $i += 100) {
    $selected = $i == 200 ? ' selected="selected"' : '';
    $s_characters .= '<option value="' . $i . '"' . $selected . '>' . $i . '</option>';
}
//
// Sorting
//
$s_sort_by = "";
for ($i = 0; $i < count($sort_by_types); $i++) {
    $s_sort_by .= '<option value="' . $i . '">' . $sort_by_types[$i] . '</option>';
}
//
// Search time
//
$previous_days = array(0, 1, 7, 14, 30, 90, 180, 364);
$previous_days_text = array($lang['All_Posts'], $lang['1_Day'], $lang['7_Days'], $lang['2_Weeks'], $lang['1_Month'], $lang['3_Months'], $lang['6_Months'], $lang['1_Year']);
$s_time = '';
for ($i = 0; $i < count($previous_days); $i++) {
    $selected = $topic_days == $previous_days[$i] ? ' selected="selected"' : '';
    $s_time .= '<option value="' . $previous_days[$i] . '"' . $selected . '>' . $previous_days_text[$i] . '</option>';
}
//
// Output the basic page
//
$page_title = $lang['Search'];
require_once "includes/phpBB/page_header.php";
make_jumpbox('viewforum');
$template->assign_vars(array('L_GO' => $lang['Go'], 'L_SEARCH_QUERY' => $lang['Search_query'], 'L_SEARCH_OPTIONS' => $lang['Search_options'], 'L_SEARCH_KEYWORDS' => $lang['Search_keywords'], 'L_SEARCH_KEYWORDS_EXPLAIN' => $lang['Search_keywords_explain'], 'L_SEARCH_AUTHOR' => $lang['Search_author'], 'L_SEARCH_AUTHOR_EXPLAIN' => $lang['Search_author_explain'], 'L_SEARCH_ANY_TERMS' => $lang['Search_for_any'], 'L_SEARCH_ALL_TERMS' => $lang['Search_for_all'], 'L_SEARCH_MESSAGE_ONLY' => $lang['Search_msg_only'], 'L_SEARCH_MESSAGE_TITLE' => $lang['Search_title_msg'], 'L_CATEGORY' => $lang['Category'], 'L_RETURN_FIRST' => $lang['Return_first'], 'L_CHARACTERS' => $lang['characters_posts'], 'L_SORT_BY' => $lang['Sort_by'], 'L_SORT_ASCENDING' => $lang['Sort_Ascending'], 'L_SORT_DESCENDING' => $lang['Sort_Descending'], 'L_SEARCH_PREVIOUS' => $lang['Search_previous'], 'L_DISPLAY_RESULTS' => $lang['Display_results'], 'L_FORUM' => $lang['Forum'], 'L_TOPICS' => $lang['Topics'], 'L_POSTS' => $lang['Posts'], 'S_SEARCH_ACTION' => URL::index("&amp;file=search&amp;mode=results"), 'S_CHARACTER_OPTIONS' => $s_characters, 'S_FORUM_OPTIONS' => $s_forums, 'S_CATEGORY_OPTIONS' => $s_categories, 'S_TIME_OPTIONS' => $s_time, 'S_SORT_OPTIONS' => $s_sort_by, 'S_HIDDEN_FIELDS' => ''));
$template->set_filenames(array('body' => 'forums/search_body.html'));
require_once 'includes/phpBB/page_tail.php';
开发者ID:cbsistem,项目名称:nexos,代码行数:31,代码来源:search.php

示例7: array

// Delete PM's
if (isset($mark_list) && !is_array($mark_list)) {
    // Set to empty array instead of '0' if nothing is selected.
    $mark_list = array();
}
if (!$confirm) {
    $s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" />';
    $s_hidden_fields .= isset($_POST['delete']) ? '<input type="hidden" name="delete" value="true" />' : '<input type="hidden" name="deleteall" value="true" />';
    for ($i = 0; $i < count($mark_list); $i++) {
        $s_hidden_fields .= '<input type="hidden" name="mark[]" value="' . intval($mark_list[$i]) . '" />';
    }
    //
    // Output confirmation page
    //
    $pagetitle = $lang['Confirm_delete_pm'];
    cpg_delete_msg(URL::index('&amp;folder=' . $folder), count($mark_list) == 1 ? $lang['Confirm_delete_pm'] : $lang['Confirm_delete_pms'], $s_hidden_fields);
} else {
    if ($delete_all) {
        switch ($folder) {
            case 'inbox':
                $delete_type = "privmsgs_to_userid = {$userinfo['user_id']} AND (\n\t\t\t\tprivmsgs_type = " . PM_READ_MAIL . " OR privmsgs_type = " . PM_NEW_MAIL . " OR privmsgs_type = " . PM_UNREAD_MAIL . " )";
                break;
            case 'outbox':
                $delete_type = "privmsgs_from_userid = {$userinfo['user_id']} AND ( privmsgs_type = " . PM_NEW_MAIL . " OR privmsgs_type = " . PM_UNREAD_MAIL . " )";
                break;
            case 'sentbox':
                $delete_type = "privmsgs_from_userid = {$userinfo['user_id']} AND privmsgs_type = " . PM_SENT_MAIL;
                break;
            case 'savebox':
                $delete_type = "( ( privmsgs_from_userid = {$userinfo['user_id']}\n\t\t\t\t\tAND privmsgs_type = " . PM_SAVED_OUT_MAIL . " )\n\t\t\t\tOR ( privmsgs_to_userid = " . $userinfo['user_id'] . "\n\t\t\t\t\tAND privmsgs_type = " . PM_SAVED_IN_MAIL . " ) )";
                break;
开发者ID:cbsistem,项目名称:nexos,代码行数:31,代码来源:delete.php

示例8: DailyStats

function DailyStats($year, $month, $date)
{
    require_once 'header.php';
    OpenTable();
    showHourlyStats($year, $month, $date);
    echo '<br />';
    echo "<center>[ <a href=\"" . URL::index() . "\">" . _BACKTOMAIN . "</a> | <a href=\"" . URL::index("&amp;file=details") . "\">" . _BACKTODETSTATS . "</a> ]</center>";
    CloseTable();
}
开发者ID:cbsistem,项目名称:nexos,代码行数:9,代码来源:index.php

示例9: loginmember

 private function loginmember($visitor_ip)
 {
     global $db, $prefix, $user_prefix, $sec_code, $CPG_SESS;
     $username = Fix_Quotes($_POST['ulogin']);
     $result = $db->sql_query('SELECT user_id, username, user_password, user_level, theme FROM ' . $user_prefix . "_users WHERE username='{$username}' AND user_id>1");
     if ($db->sql_numrows($result) < 1) {
         URL::redirect(URL::index('Your_Account&error=1&uname=' . urlencode(base64_encode($username))), true);
     }
     $setinfo = $db->sql_fetchrow($result, SQL_ASSOC);
     if ($setinfo['user_password'] != '' && $setinfo['user_level'] > 0) {
         $pass = md5($_POST['user_password']);
         if ($setinfo['user_password'] != $pass) {
             URL::redirect(URL::index('Your_Account&error=2'), true);
         }
         if ($sec_code & 2) {
             $gfxid = isset($_POST['gfxid']) ? $_POST['gfxid'] : 0;
             $code = $CPG_SESS['gfx'][$gfxid];
             $gfx_check = isset($_POST['gfx_check']) ? $_POST['gfx_check'] : '';
             if (strlen($gfx_check) < 2 || $code != $gfx_check) {
                 URL::redirect(URL::index('Your_Account&error=2'), true);
             }
         }
         $db->sql_query('DELETE FROM ' . $prefix . "_session WHERE host_addr={$visitor_ip} AND guest=1");
         unset($CPG_SESS['session_start']);
         $CPG_SESS['theme'] = $setinfo['theme'];
         return $this->setmemcookie($setinfo['user_id'], $pass, false);
     } else {
         if ($setinfo['user_level'] == 0) {
             URL::redirect(URL::index('Your_Account&profile=' . $setinfo['user_id']));
         } else {
             if ($setinfo['user_level'] == -1) {
                 URL::redirect(URL::index('Your_Account&profile=' . $setinfo['user_id']));
             }
         }
         URL::redirect(URL::index('Your_Account&error=2'), true);
     }
 }
开发者ID:cbsistem,项目名称:nexos,代码行数:37,代码来源:cpg_member.php

示例10: session_pagestart

 *	 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.
 *
 ***************************************************************************/
if (!defined('CPG_NUKE')) {
    exit;
}
require_once 'modules/' . $module_name . '/nukebb.php';
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_PROFILE);
init_userprefs($userdata);
//
// Start of program proper
//
if (isset($_GET['mode']) || isset($_POST['mode'])) {
    $mode = isset($_GET['mode']) ? $_GET['mode'] : $_POST['mode'];
    if ($mode == 'viewprofile') {
        $username = isset($_GET[POST_USERS_URL]) ? $_GET[POST_USERS_URL] : $_POST[POST_USERS_URL];
        URL::refresh(URL::index('Your_Account&profile=' . $username), 0);
    } else {
        if ($mode == 'email') {
            require_once 'includes/phpBB/usercp_email.php';
        }
    }
} else {
    URL::refresh(URL::index(), 0);
}
exit;
开发者ID:cbsistem,项目名称:nexos,代码行数:31,代码来源:profile.php

示例11: while

    $content .= '<img src="images/blocks/members.gif" alt="" />&nbsp;<span class="content"><b>' . _BMEM . ':</b></span><br />' . $who_where[0];
}
if ($online_num[1] > 0) {
    $content .= '<img src="images/blocks/visitors.gif" alt="" />&nbsp;<span class="content"><b>' . _BVIS . ':</b></span><br />' . $who_where[1];
}
if ($hidden > 0) {
    $content .= '<span class="content"><b>' . _BHID . ':</b></span> ' . $hidden;
}
$num = 0;
$content .= "\n<hr />\n" . '<span style="font-weight:bold; text-decoration:underline;">' . _STAFFONL . ':</span><br />';
$result = $db->sql_query("SELECT a.uname, u.user_id FROM " . $prefix . "_session AS a \n\tLEFT JOIN " . $user_prefix . "_users AS u ON u.username = a.uname \n\tWHERE guest = 2 \n\tORDER BY a.uname");
if ($db->sql_numrows($result) < 1) {
    $content .= '<br /><i>' . _STAFFNONE . '</i>';
} else {
    while ($row = $db->sql_fetchrow($result)) {
        $num++;
        if ($num < 10) {
            $content .= '0';
        }
        $content .= "{$num}: ";
        if ($row['user_id'] > 1) {
            if ($pm_active) {
                $content .= "<a href=\"" . URL::index("Private_Messages&amp;mode=post&amp;u={$row['user_id']}") . "\"><img src=\"images/blocks/email.gif\" style=\"border:0;\" alt=\"PM\" title=\"Send a private message to {$row['uname']}\" /></a>";
            }
            $content .= " <a href=\"" . URL::index("Your_Account&amp;profile={$row['user_id']}") . "\">{$row['uname']}</a><br />\n";
        } else {
            $content .= "{$row['uname']}<br />\n";
        }
    }
}
$db->sql_freeresult($result);
开发者ID:cbsistem,项目名称:nexos,代码行数:31,代码来源:block-User_Info.php

示例12: FROM

//number of thumbs
$title_length = 15;
//length of title below thumb
// marquee info at http://www.faqs.org/docs/htmltut/_MARQUEE.html
$body_length = 50;
//length of body of comment to show
$auth_length = 10;
//length of author name to show
$content = '<a name="scroller"></a><marquee loop="1" behavior="scroll" direction="up" height="150" scrollamount="1" scrolldelay="1" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'><p style="text-align:center;">';
// END USER DEFINEABLES
$result = $db->sql_query("SELECT p.pid, p.title, filepath, filename, msg_author, msg_date, msg_body FROM (" . $cpg_prefix . "comments as c, " . $cpg_prefix . "pictures AS p) INNER JOIN " . $cpg_prefix . "albums AS a ON (p.aid = a.aid AND " . VIS_GROUPS . ") WHERE c.pid=p.pid AND approved=1 ORDER BY msg_date DESC LIMIT {$length}");
$pic = 0;
$thumb_title = $date = $author = $messagebody = '';
while ($row = $db->sql_fetchrow($result)) {
    if ($CONFIG['seo_alts'] == 0) {
        $thumb_title = $row['filename'];
    } else {
        if ($row['title'] != '') {
            $thumb_title = $row['title'];
        } else {
            $thumb_title = substr($row['filename'], 0, -4);
        }
    }
    $date = formatDateTime($row['msg_date'], LASTCOM_DATE_FMT);
    $author = $row["msg_author"];
    $messagebody = $row["msg_body"];
    $content .= '<a href="' . URL::index($cpg_dir . '&amp;file=displayimage&amp;meta=lastcom&amp;cat=0&amp;pos=' . $pic) . '"><img src="' . get_pic_url($row, 'thumb') . '" style="border:0;" alt="' . $thumb_title . '" title="' . $thumb_title . '" /><br />' . truncate_stringblocks($author, $auth_length) . '</a> <br />' . truncate_stringblocks($messagebody, $body_length) . '<br />(' . $date . ')<br /><br />';
    $pic++;
}
$content .= '</p></marquee><p style="text-align:center;"><a href="' . URL::index($cpg_dir) . '">' . _coppermineLANG . '</a></p>';
开发者ID:cbsistem,项目名称:nexos,代码行数:30,代码来源:block-CPG-scroll-Last_comments.php

示例13: smilies_table

function smilies_table($mode, $field = 'message', $form = 'post')
{
    global $bb_codes, $db, $prefix, $smilies_path, $MAIN_CFG, $CPG_SESS;
    global $smilies_more, $smilies_desc;
    $url = $MAIN_CFG['server']['path'] . URL::index("smilies&amp;field={$field}&amp;form={$form}");
    $inline_cols = 4;
    $inline_rows = 5;
    $window_cols = 8;
    $content = '';
    if ($mode == 'window') {
        $content = $bb_codes['win_start'];
    } else {
        if (!defined('BBCODE_JS_ACTIVE')) {
            $content .= '<script src="includes/javascript/bbcode.js" type="text/javascript"></script>';
            define('BBCODE_JS_ACTIVE', 1);
        }
    }
    if ($mode == 'onerow') {
        $content .= '
<table width="450" border="0" cellspacing="0" cellpadding="0" class="forumline">';
    } else {
        $content .= '
<table width="100" border="0" cellspacing="0" cellpadding="5" class="forumline">';
    }
    $smilies = get_smilies();
    if (is_array($smilies)) {
        $num_smilies = 0;
        $rowset = array();
        #while ($row = $db->sql_fetchrow($result)) {
        for ($i = 0; $i < count($smilies); ++$i) {
            if (empty($rowset[$smilies[$i]['smile_url']])) {
                $rowset[$smilies[$i]['smile_url']]['code'] = str_replace("'", "\\'", str_replace('\\', '\\\\', $smilies[$i]['code']));
                # process the smiley description
                $rowset[$smilies[$i]['smile_url']]['emoticon'] = get_code_lang($smilies[$i]['emoticon'], $smilies_desc);
                $num_smilies++;
            }
        }
        if ($num_smilies) {
            $smilies_count = $mode == 'inline' ? min(19, $num_smilies) : $num_smilies;
            $smilies_split_row = $mode == 'inline' ? $inline_cols - 1 : $window_cols - 1;
            $s_colspan = $row = $col = 0;
            while (list($smile_url, $data) = each($rowset)) {
                if (!$col) {
                    $content .= '<tr align="center" valign="middle">';
                }
                $content .= "<td><a href=\"javascript:emoticon('" . $form . "', '" . $field . "', '" . $data['code'] . "')\"><img src=\"" . $smilies_path . $smile_url . "\" style=\"border:0;\" alt=\"" . $data['emoticon'] . "\" title=\"" . $data['emoticon'] . "\" /></a></td>";
                $s_colspan = max($s_colspan, $col + 1);
                if ($mode == 'onerow') {
                    if ($col >= 15) {
                        if ($num_smilies > 15) {
                            $content .= "<td colspan=\"{$s_colspan}\" class=\"nav\"><a href=\"{$url}\" onclick=\"window.open('{$url}', '_smilies', 'height=200,resizable=yes,scrollbars=yes,width=230');return false;\" target=\"_smilies\" class=\"nav\">{$smilies_more}</a></td>";
                        }
                        break;
                    }
                    $col++;
                } else {
                    if ($col == $smilies_split_row) {
                        $content .= '</tr>';
                        $col = 0;
                        if ($mode == 'inline' && $row == $inline_rows - 1) {
                            break;
                        }
                        $row++;
                    } else {
                        $col++;
                    }
                }
            }
            if ($col > 0) {
                $content .= '</tr>';
            }
            if ($mode == 'inline' && $num_smilies > $inline_rows * $inline_cols) {
                $content .= "<tr align=\"center\">\n\t\t\t\t\t<td colspan=\"{$s_colspan}\" class=\"nav\"><a href=\"{$url}\" onclick=\"window.open('{$url}', '_smilies', 'height=200,resizable=yes,scrollbars=yes,width=230');return false;\" target=\"_smilies\" class=\"nav\">{$smilies_more}</a></td>\n\t\t\t\t</tr>";
            }
        }
    }
    $content .= "\n</table>\n";
    if ($mode == 'window') {
        $content .= $bb_codes['win_end'];
    }
    return $content;
}
开发者ID:cbsistem,项目名称:nexos,代码行数:82,代码来源:nbbcode.php

示例14: pageheader

        $db->sql_freeresult($result);
        pageheader(DEL_USER);
        starttable("100%", DEL_USER . ' - ' . $user_data['username'], 6);
        // First delete the albums
        $result = $db->sql_query("SELECT aid FROM {$CONFIG['TABLE_ALBUMS']} WHERE category = '" . (FIRST_USER_CAT + $user_id) . "'", false, __FILE__, __LINE__);
        while ($album = $db->sql_fetchrow($result)) {
            delete_album($album['aid']);
        }
        // while
        $db->sql_freeresult($result);
        if ($need_caption) {
            output_caption();
        }
        // Then anonymize comments posted by the user
        $db->sql_query("UPDATE {$CONFIG['TABLE_COMMENTS']} SET  author_id = '0' WHERE  author_id = '{$user_id}'", false, __FILE__, __LINE__);
        // Do the same for pictures uploaded in public albums
        $db->sql_query("UPDATE {$CONFIG['TABLE_PICTURES']} SET  owner_id = '0' WHERE  owner_id = '{$user_id}'", false, __FILE__, __LINE__);
        // Finally delete the user
        //$db->sql_query("DELETE FROM {$CONFIG['TABLE_USERS']} WHERE user_id = '$user_id'", false, __FILE__, __LINE__);
        //suspend user instead
        $db->sql_query("UPDATE {$CONFIG['TABLE_USERS']} SET user_level=0, susdel_reason='" . PHOTOGALLERY . "' WHERE user_id = '{$user_id}'", false, __FILE__, __LINE__);
        echo "<tr><td colspan=\"6\" class=\"tablef\" align=\"center\">\n";
        echo "<div class=\"admin_menu_thumb\"><a href=\"" . URL::index("&amp;file=usermgr") . "\"  class=\"adm_menu\">" . CONTINU . "</a></div>\n";
        echo "</td></tr>";
        endtable();
        pagefooter();
        break;
    default:
        cpg_die(_ERROR, "{$what} command not found", __FILE__, __LINE__);
        break;
}
开发者ID:cbsistem,项目名称:nexos,代码行数:31,代码来源:delete.php

示例15: htmlprepare

    $s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="gid" value="' . $group_id . '" />';
    echo '</th>
	</tr>
	<tr>
	  <td class="row1" width="38%"><span class="gen">Group name:</span></td>
	  <td class="row2" width="62%">
		<input type="text" name="group_name" size="35" maxlength="40" value="' . htmlprepare($group_info['group_name']) . '" />
	  </td>
	</tr><tr>
	  <td class="row1" width="38%"><span class="gen">Group description:</span></td>
	  <td class="row2" width="62%">
		<textarea name="group_description" rows="10" cols="63">' . $group_info['group_description'] . '</textarea>
	  </td>
	</tr><tr>
	  <td class="row1" width="38%"><span class="gen">Group moderator:</span></td>
	  <td class="row2" width="62%"><input type="text" class="post" name="username" maxlength="50" size="20" value="' . $group_info['username'] . '" /> &nbsp; <input type="submit" name="usersubmit" value="Find a username" class="liteoption" onclick="window.open(\'' . URL::index('Forums&amp;file=search&amp;mode=searchuser&amp;popup=1&amp;menu=1') . '\', \'_phpbbsearch\', \'HEIGHT=250,resizable=yes,WIDTH=400\');return false;" /></td>
	</tr><tr>
	  <td class="row1" width="38%"><span class="gen">Group status:</span></td>
	  <td class="row2" width="62%">
		<input type="radio" name="group_type" value="0" ' . ($group_info['group_type'] == 0 ? ' checked="checked"' : '') . ' /> Open group &nbsp;
		<input type="radio" name="group_type" value="1" ' . ($group_info['group_type'] == 1 ? ' checked="checked"' : '') . ' /> Closed group &nbsp;
		<input type="radio" name="group_type" value="2" ' . ($group_info['group_type'] == 2 ? ' checked="checked"' : '') . ' /> Hidden group</td>
	</tr>';
    if (isset($_GET['edit'])) {
        echo '<tr>
	  <td class="row1" width="38%"><span class="gen">Delete the old group moderator?</span>
	  <br />
	  <span class="gensmall">If you\'re changing the group moderator, check this box to remove the old moderator from the group. Otherwise, do not check it, and the user will become a regular member of the group.</span></td>
	  <td class="row2" width="62%"><input type="checkbox" name="delete_old_moderator" value="1" />' . _YES . '</td>
	</tr><tr>
	  <td class="row1" width="38%"><span class="gen">Delete this group:</span></td>
开发者ID:cbsistem,项目名称:nexos,代码行数:31,代码来源:groups.php


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