HomeHelpTrac

source: tags/6.1/links.php @ 10242

Revision 10242, 2.8 KB checked in by Alexander Trofimov, 3 years ago (diff)

dolphin 6.1.5, initial commit

Line 
1<?
2
3/***************************************************************************
4*                            Dolphin Smart Community Builder
5*                              -----------------
6*     begin                : Mon Mar 23 2006
7*     copyright            : (C) 2006 BoonEx Group
8*     website              : http://www.boonex.com/
9* This file is part of Dolphin - Smart Community Builder
10*
11* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.
12* http://creativecommons.org/licenses/by/3.0/
13*
14* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
15* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16* See the Creative Commons Attribution 3.0 License for more details.
17* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,
18* see license.txt file; if not, write to marketing@boonex.com
19***************************************************************************/
20
21require_once( 'inc/header.inc.php' );
22require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
23require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' );
24require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' );
25
26// --------------- page variables / login
27
28$_page['name_index']    = 15;
29$_page['css_name']      = 'links.css';
30
31
32if ( !( $logged['admin'] = member_auth( 1, false ) ) )
33    if ( !( $logged['member'] = member_auth( 0, false ) ) )
34        if ( !( $logged['aff'] = member_auth( 2, false )) )
35            $logged['moderator'] = member_auth( 3, false );
36
37
38$_page['header'] = _t( "_LINKS_H", $site['title'] );
39$_page['header_text'] = _t( "_LINKS_H1", $site['title'] );
40//$_page['header_text'] = ('g4' != $tmpl) ? _t( "_LINKS_H1", $site['title'] ) : "<img src=\"{$site['images']}links.gif\">";
41
42// --------------- page components
43
44$_ni = $_page['name_index'];
45$_page_cont[$_ni]['page_main_code'] = PageCompPageMainCode();
46
47// --------------- [END] page components
48
49PageCode();
50
51// --------------- page components functions
52
53/**
54 * page code function
55 */
56function PageCompPageMainCode()
57{
58    global $tmpl;
59
60    $links_res = db_res( "SELECT * FROM `Links`" );
61   
62    if ( !mysql_num_rows( $links_res ) )
63        $out .= "<div class=\"no_links\">"._t( "_NO_LINKS" )."</div>\n";
64
65    else
66    {
67        while ( $link_arr = mysql_fetch_array( $links_res ) )
68        {
69            $link_url = process_line_output( $link_arr['URL'], 1000 );
70            $link_title = process_line_output( $link_arr['Title'] );
71            $link_desc = process_text_output( $link_arr['Description'] );
72            $out .= "<div class=\"links_cont\">\n";
73            $out .= "<div class=\"clear_both\"></div>\n";
74            $out .= "<div class=\"links_header\">";
75            $out .= "<a href=\"$link_url\">$link_title</a></div>\n";
76            $out .= "<div class=\"links_snippet\">$link_desc</div>\n";
77            $out .= "<div class=\"clear_both\"></div></div>\n";
78        }
79    }
80   
81    return $out;
82}
83
84?>
Note: See TracBrowser for help on using the repository browser.