Prijava na forum:
Ime:
Lozinka:
Prijavi me trajno:
Trajanje:
Registruj nalog:
Ime:
Lozinka:
Ponovi Lozinku:
E-mail:

ConQUIZtador
nazadnapred
Korisnici koji su trenutno na forumu 0 članova i 0 gostiju pregledaju ovu temu.


Tema za pitanja
o SMF forumu, phpBB2 i phpBB3 forumu, Wordpress i Joomla CMS sistemima!

Za vecinu drugih pitanja nacicete odgovor citajuci Top teme!

Idi dole
Stranice:
Počni novu temu Nova anketa Odgovor Štampaj Dodaj temu u favorite Pogledajte svoje poruke u temi
Tema: Kako postavitit cutenews u ovaj kod  (Pročitano 1850 puta)
05. Maj 2007, 18:28:20
Ucesnik diskusija

Zodijak
Pol
Poruke 106
OS
Windows XP
Browser
Mozilla Firefox 2.0.0.3
Kod:
<?


require_once( 'inc/header.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' );



// --------------- page variables and login

$_page['name_index']     = 18;
$_page['css_name']        = 'terms_of_use.css';

if ( !( $logged['admin'] = member_auth( 1, false ) ) )
    if ( !( $logged['member'] = member_auth( 0, false ) ) )
        if ( !( $logged['aff'] = member_auth( 2, false )) )
            $logged['moderator'] = member_auth( 3, false );


$_page['header'] = _t( "_STORY_HE" );
$_page['header_text'] = _t( "_STORY_HE1" );


// --------------- page components

$_ni = $_page['name_index'];
$_page_cont[$_ni]['page_main_code'] = PageCompPageMainCode();







// --------------- [END] page components

PageCode();

// --------------- page components functions

/**
* page code function
*/
function PageCompPageMainCode()
{
    global $oTemplConfig;



    $ret = _t( "_STORY_HE" );


    return DesignBoxContent( _t( "_STORY_HE1" ), $ret, $oTemplConfig -> PageCompThird_db_num);
}
?>

cutenews kod
Kod:
<?PHP
$number=15;
$category=1;
include("/home/nothingb/public_html/storynews/show_news.php");
?>
IP sačuvana
social share
Pogledaj profil
 
Prijava na forum:
Ime:
Lozinka:
Zelim biti prijavljen:
Trajanje:
Registruj nalog:
Ime:
Lozinka:
Ponovi Lozinku:
E-mail:
Moderator
Capo di tutti capi


Underpromise; overdeliver.

Zodijak Gemini
Pol Muškarac
Poruke Odustao od brojanja
Zastava 44°49′N - 20°29′E
OS
Windows XP
Browser
Opera 9.20
mob
Apple iPhone 6s
Cutenews code se postavlja u "template" a ne u "engine" ...
IP sačuvana
social share
Pobednik, pre svega.

Napomena: Moje privatne poruke, icq, msn, yim, google talk i mail ne sluze za pruzanje tehnicke podrske ili odgovaranje na pitanja korisnika. Za sva pitanja postoji adekvatan deo foruma. Pronadjite ga! Takve privatne poruke cu jednostavno ignorisati!
Preporuke za clanove: Procitajte najcesce postavljana pitanja!
Pogledaj profil WWW GTalk Twitter Facebook
 
Prijava na forum:
Ime:
Lozinka:
Zelim biti prijavljen:
Trajanje:
Registruj nalog:
Ime:
Lozinka:
Ponovi Lozinku:
E-mail:
Ucesnik diskusija

Zodijak
Pol
Poruke 106
OS
Windows XP
Browser
Mozilla Firefox 2.0.0.3
Evo ga dizajn. A gdje sada staviti?
Kod:
<?


require_once( 'header.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'admin.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'db.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'prof.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'banners.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'membership_levels.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'params.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'languages.inc.php');
require_once( BX_DIRECTORY_PATH_INC . 'menu.inc.php');

//require_once( BX_DIRECTORY_PATH_ROOT . "templates/tmpl_{$tmpl}/scripts/menu_design.php" );
require_once( BX_DIRECTORY_PATH_ROOT . "templates/tmpl_{$tmpl}/scripts/functions.php" );
require_once( BX_DIRECTORY_PATH_ROOT . "templates/tmpl_{$tmpl}/scripts/BxTemplMenu.php" );





$db_color_index = 0;

$_page['js'] = 1;

/**
* Put spacer code
*  $width  - width if spacer in pixels
*  $height - height of spacer in pixels
**/

function spacer( $width, $height )
{
global $site;

    return '<img src="' . $site['images'] . 'spacer.gif" width="' . $width . '" height="' . $height . '" alt="" />';
}

/**
* Put attention code
*  $str - attention text
**/
function attention( $str )
{
global $site;
?>
<table cellspacing="2" cellpadding="1">
<tr>
<td valign="top">
<img src="<?= $site['icons'] ?>sign.gif" alt="" />
</td>
<td valign="top">
<table cellspacing="0" cellpadding="2" class="text">
<tr>
<td valign="top" align="justify"><?= $str ?></td>
</tr>
</table>
</td>
</tr>
</table>
<?
}

/**
* Put design progress bar code
*  $text     - progress bar text
*  $width    - width of progress bar in pixels
*  $max_pos  - maximal position of progress bar
*  $curr_pos - current position of progress bar
**/
function DesignProgressPos ( $text, $width, $max_pos, $curr_pos, $progress_num = '1' )
{
if ( $max_pos ) $percent = $curr_pos * 100 / $max_pos;
return DesignProgress ( $text, $width, $percent, $progress_num );
}

/**
* Put design progress bar code
*  $text     - progress bar text
*  $width    - width of progress bar in pixels
*  $percent  - current position of progress bar in percents
**/
function DesignProgress ( $text, $width, $percent, $progress_num  )
{
global $site;

$ret = "";
$ret .= '<div class="rate_block" style="width:' . $width . 'px;">';
$ret .= '<div class="rate_text">';
$ret .= $text;
$ret .= '</div>';
$ret .= '<div class="rate_scale">';
$ret .= '<div style="position:relative; height:10px; font-size:1px; width:' . round($percent) . '%; background-image:url(' . $site['icons'] . 'scale_index_' . $progress_num . '.gif); background-repeat:repeat-x;"></div>';
$ret .= '</div>';
$ret .= '</div>';

return $ret;
}


// design box
$fs = filesize ( "{$dir['root']}templates/tmpl_{$tmpl}/designbox_0.html" );
$f = fopen ( "{$dir['root']}templates/tmpl_{$tmpl}/designbox_0.html", "r" );
$templ_designbox0 = fread ( $f, $fs );
fclose ( $f );

$fs = filesize ( "{$dir['root']}templates/tmpl_{$tmpl}/designbox_1.html" );
$f = fopen ( "{$dir['root']}templates/tmpl_{$tmpl}/designbox_1.html", "r" );
$templ_designbox1 = fread ( $f, $fs );
fclose ( $f );

$fs = filesize ( "{$dir['root']}templates/tmpl_{$tmpl}/designbox_2.html" );
$f = fopen ( "{$dir['root']}templates/tmpl_{$tmpl}/designbox_2.html", "r" );
$templ_designbox2 = fread ( $f, $fs );
fclose ( $f );


/**
* Put "design box" HTML code
*  $title        - title text
*  $width        - width in pixels
*  $height       - height in pixels
*  $align        - align or other <td> formatter
*       for example: "align=center"
* $db_num        - number of design box template (for "act" skin only)
**/
function DesignBoxContent ( $title, $content, $db_num = 0, $caption_item = '' )
{
global $site;
global $templ_designbox0;
global $templ_designbox1;
global $templ_designbox2;
    global $dbh_letters;
    global $tmpl;

    switch ($dbh_letters)
    {
        case "upper": $f = "strtoupper"; break;
        case "lower": $f = "strtolower"; break;
        case "fupper": $f = "ucfirst"; break;
        case "aupper": $f = "ucwords"; break;
        default: $f = "sprintf";
    }


if ( strlen($height) ) $height = " height=\"$height\" ";

    if ($db_num == 2) // && !$templ_designbox2 )
    {
    $templ = $templ_designbox2;
    }
    elseif( $db_num == 1) // && !$templ_designbox1 )
    {
    $templ = $templ_designbox1;
    }
    else//if( !$templ_designbox0 )
    {
    $templ = $templ_designbox0;
    }

    // replace path to the images
$s = $site['images'];
    $s = str_replace ( $site['url'], "", $site['images'] );
$templ = str_replace ( $s, $site['images'], $templ );

    // replace template variables
$templ = str_replace ( "__title__", $f($title), $templ );
$templ = str_replace ( "__caption_item__", $caption_item, $templ );
$templ = str_replace ( "__designbox_content__", $content, $templ );
    $templ = str_replace ( "__images__", $site['images'], $templ );
if ( function_exists( 'colors_select' ) )
$templ = str_replace ( "__designBoxColor__", colors_select(), $templ );

    if ($tmpl == 'act')
    {
    if ($index_db_color_randomize == 1)
        {
            $templ = str_replace ( "__db_color__", get_active_color(), $templ );
        }
        else
        {
             $templ = str_replace ( "__db_color__", $index_db_color, $templ );
        }
    }

return  $templ;
}


/**
* Put "design box" with border HTML code
*  $title        - title text
*  $width        - width in pixels
*  $height       - height in pixels
*  $align        - align or other <td> formatter
*                  for example: "align=center"
**/
function DesignBoxContentBorder ( $title, $content, $caption_item='' )
{
    global $site;
    global $dir;
    global $tmpl;
    global $service_db_color;

    global $dbh_letters;

    switch ($dbh_letters)
    {
        case "upper": $f_case = "strtoupper"; break;
        case "lower": $f_case = "strtolower"; break;
        case "fupper": $f_case = "ucfirst"; break;
        case "aupper": $f_case = "ucwords"; break;
        default: $f_case = "sprintf";
    }

// design box with border: reading template
$fs = filesize ( "{$dir['root']}templates/tmpl_{$tmpl}/designbox_border.html" );
$f = fopen ( "{$dir['root']}templates/tmpl_{$tmpl}/designbox_border.html", "r" );
$templ_designbox_border = fread ( $f, $fs );
fclose ( $f );


    $templ = $templ_designbox_border;

    // replace template variables
    $templ = str_replace ( "__title__", $f_case($title), $templ );
    $templ = str_replace ( "__caption_item__", $caption_item, $templ );
    $templ = str_replace ( "__designbox_content__", $content, $templ );

    return  $templ;
}


/**
* members statistic block
*/
function PageCompMemberStatN( $w, $h)
{
        global $site;
        global $prof;
        global $tmpl;


        $free_mode = getParam("free_mode") == "on" ? 1 : 0;

// members statistics

$total_c = strlen( $_POST['total_c'] ) ? $_POST['total_c'] : getParam( "default_country" );
$total_c2 = strlen( $_POST['total_c2'] ) ? $_POST['total_c2'] : getParam( "default_country" );
$total_arr = db_arr( "SELECT COUNT(ID) FROM `Profiles` WHERE Status = 'Active'" );
$total_arr_week = db_arr( "SELECT COUNT(ID) FROM `Profiles` WHERE Status = 'Active' AND (TO_DAYS(NOW()) - TO_DAYS(LastReg)) <= 7" );
$total_arr_gold = db_arr( "SELECT COUNT(DISTINCT IDMember)
FROM ProfileMemLevels
INNER JOIN Profiles ON Profiles.ID = ProfileMemLevels.IDMember
WHERE
(DateExpires IS NULL OR DateExpires > NOW()) AND
(DateStarts IS NULL OR DateStarts <= NOW()) AND
(Profiles.Status = 'Active')" );
        $total_c_arr = db_arr( "SELECT COUNT(ID) FROM `Profiles` WHERE Status = 'Active' AND `Country` = '". process_db_input($total_c) ."'" );
        $total_members = $total_arr[0];
        $total_c_members = $total_c_arr[0];

        $total_c_members_onl = get_users_online_number('c', $total_c2 );
        $total_arr_chatting = get_users_online_number('t');
        $members_online = get_users_online_number();

        $c_arr = $prof[countries];

        $out = "";
$out .= '<table cellpadding="0" cellspacing="0" border="0" align="center" width="150"><tr><td>';
    $out .= "<table cellpadding=1 cellspacing=1 class=text border=0 align=center>";
    $out .= "<tr><td width=17><img src=$site[images]group1.gif></td><td width=100%><b>&nbsp;"._t("_Currently Online")."</b></td></tr>\n";
    $out .= "<tr><td height=5 class=memb_stat colspan=2><img src=$site[images]spacer.gif width=6 height=1></td></tr>\n";
        $out .= "<tr><td width=17 align='right'><img src='$site[images]us2.gif'></td><td width=100% align=\"left\">&nbsp;"._t("_Total")." -  $members_online</td></tr>\n";
    $out .= "<tr><td width=17 align='right'><img src='$site[images]us3.gif'></td><td width=100% align=\"left\">&nbsp;"._t("_Chatting")." - $total_arr_chatting </td></tr>\n";
    $out .= "<tr><td width=17 align='right'><img src='$site[images]us4.gif'></td><td width=100% align=\"left\">&nbsp;$total_c_members_onl "._t("_members")." "._t("_from").":</td></tr>\n";
    $out .= '<form action="'.$_SERVER[PHP_SELF].'" method="post" name="cForm2"><tr><td align=right colspan=2>';
    $out .= "<input type=hidden name=total_c value=$total_c>";
    $out .= '<select class=index name=total_c2 onChange="javascript: document.forms[\'cForm2\'].submit();">';
    foreach ( $c_arr as $key => $value )
    {
            $out .= "<option value=$key";
            if ( $key == $total_c2 )
                $out .= " selected";
            $out .= '>'._t( '__'.$value ).'</option>';
    }
    $out .= '</select>';
    $out .= '</td></form></tr>';
    $out .= "<tr><td height=1 colspan=2><img src=$site[images]spacer.gif width=1 height=1></td></tr>\n";
    $out .= "</table>\n";


    $out .= "<br />";

    $out .= "<table cellpadding=1 cellspacing=1 class=text>";
    $out .= "<tr><td height=2><img src=$site[images]spacer.gif height=2></td></tr>\n";
    $out .= "<tr><td width=17><img src=$site[images]group2.gif></td><td width=100%><b>&nbsp;"._t("_Total Registered")."</b></td></tr>\n";
    $out .= "<tr><td height=1 class=memb_stat colspan=2><img src=$site[images]spacer.gif width=1 height=1></td></tr>\n";
    $out .= "<tr><td width=17 align='right'><img src=$site[images]us6.gif></td><td width=100% align=\"left\">&nbsp;"._t("_Total")." - $total_arr[0]</td></tr>\n";

        if ( !$free_mode )
    $out .= "<tr><td width=17 align='right'><img src=$site[images]us4.gif></td><td width=100% align=\"left\">&nbsp;"._t("_Gold Members")." - $total_arr_gold[0] </td></tr>\n";

    $out .= "<tr><td width=17 align='right'><img src=$site[images]us7.gif></td><td width=100% align=\"left\">&nbsp;"._t("_New this week")." - $total_arr_week[0] </td></tr>\n";
    $out .= "<tr><td width=17 align='right'><img src=$site[images]us1.gif></td><td width=100% align=\"left\">&nbsp;$total_c_members "._t("_members")." "._t("_from").":</td></tr>\n";
    if ($tmpl == 'g4') $out .= "<tr><td><img src=\"" . $site[images] . "spacer.gif\" height=\"5\"></td></tr>";
    $out .= '<form action="'.$_SERVER[PHP_SELF].'" method="post" name="cForm"><tr><td align=right colspan=2>';
    $out .= "<input type=hidden name=total_c2 value=$total_c2>";
    $out .= '<select class=index name=total_c onChange="javascript: document.forms[\'cForm\'].submit();">';
    foreach ( $c_arr as $key => $value )
    {
            $out .= "<option value=$key";
            if ( $key == $total_c )
                $out .= " selected";
                        $out .= '>'._t( '__'.$value ).'</option>';
    }
    $out .= '</select>';
    $out .= '</td></form></tr>';
    $out .= "<tr><td height=1 colspan=2><img src=$site[images]spacer.gif width=1 height=1></td></tr>\n";
    $out .= '</table>';
    $out .= '</td></tr></table>';

    return DesignBoxContent ( _t("_members"), $w, $out, $h );


}

/**
* Put top code for the page
**/
function PageCode( $admintmpl=0 )
{
global $dir;
    global $site;
global $_page;
global $_page_comp;
global $logged;
global $langHTMLCharset;
global $tmpl;
global $ADMIN;
global $tmi_letters;
global $dbh_letters;
global $membership_only;
global $max_thumb_height;
global $max_thumb_width;
global $_page_cont;

$ni = $_page['name_index'];
global $oTemplConfig;
$oTemplMenu = new BxTemplMenu( $oTemplConfig );

$free_mode = getParam("free_mode") == "on" ? 1 : 0;
$membership_only = getParam("membership_only") == "on" ? 1 : 0;

// reading templates
        if(!$admintmpl)
{
    $fn = "{$dir['root']}templates/tmpl_{$tmpl}/page_{$ni}.html";
    if ( !file_exists($fn) ) $fn = "{$dir['root']}templates/tmpl_{$tmpl}/default.html";
}
else
{
             $fn = "{$dir['root']}admin/tmpl_admin.html";
}

$fs = filesize ( $fn );
$f = fopen ( $fn, "r" );
$templ = fread ( $f, $fs );
fclose ( $f );

// process includes


$templ = preg_replace_callback ("/__include (.*)__/", "TmplInclude", $templ);
$templ = preg_replace_callback ("/__includebase (.*)__/", "TmplIncludeBase", $templ);


PageStaticComponents();

// lang block
if ( (int)getParam('lang_enable')  )
{
ob_start();
lang_select_txt();
$_page_cont[0]['switch_lang_block'] = ob_get_contents();
ob_end_clean();
}
else
{
$_page_cont[0]['switch_lang_block'] = "";
}
// charset
$_page_cont[0]['page_charset'] = $langHTMLCharset;


//change templates
if ( 'on' == getParam("enable_template"))
$_page_cont[0]['switch_skin_block'] = templates_select_txt();
else
$_page_cont[0]['switch_skin_block'] = '';

//Path to css
if( strlen( $_page['css_name'] ) > 0 )
{
$filename = $dir['root'] . $site['css_dir'] . $_page['css_name'];
if ( file_exists( $filename ) && is_file( $filename ) )
{
$_page_cont[0]['styles'] = '<link href="' . $site['css_dir'] . $_page['css_name'] . '" rel="stylesheet" type="text/css" />';
}
else
{
$_page_cont[0]['styles'] = '';
}
}
else
{
$_page_cont[0]['styles'] = '';
}


//Path to js
if( strlen( $_page['js_name'] ) > 0 )
{
$filename = $dir['root'] . 'inc/js/' . $_page['js_name'];
if ( file_exists( $filename ) && is_file( $filename ) )
{
$langDelete = _t('_delete');
$langLoading = _t('_loading ...');
$langDeleteMessage = _t('_poll successfully deleted');
$langMakeIt = _t('_make it');
if ( $site['js_init'] ) $_page_cont[0]['java_script'] = $site['js_init'];
$_page_cont[0]['java_script'] .= <<<EOJ
<script type="text/javascript" language="javascript">
<!--
var site_url = '{$site['url']}';
var lang_delete = '{$langDelete}';
var lang_loading = '{$langLoading}';
var lang_delete_message = '{$langDeleteMessage}';
var lang_make_it = '{$langMakeIt}';
//-->
</script>
<script src="{$site['url']}inc/js/{$_page['js_name']}" type="text/javascript" language="javascript"></script>
EOJ;
}
else
{
$_page_cont[0]['java_script'] = '';
}
}
else
{
$_page_cont[0]['java_script'] = '';
}



$_page_cont[0]['css_dir'] = $site['css_dir'];
$_page_cont[0]['plugins'] = $site['plugins'];

$_page_cont[0]['thumb_width'] = $max_thumb_width;
$_page_cont[0]['thumb_height'] = $max_thumb_height;

$_page_cont[0]['site_url'] = $site['url'];
$_page_cont[0]['images'] = $site['images'];
$_page_cont[0]['icons'] = $site['icons'];
$_page_cont[0]['zodiac'] = $site['zodiac'];

$_page_cont[0]['bottom_text'] = _t( "_bottom_text", date("Y") );
$_page_cont[0]['copyright'] = _t( "_copyright", date("Y") );

//place meta data on site pages
$_page_cont[0]['meta_keywords'] = process_line_output( getParam("MetaKeyWords") );
$_page_cont[0]['meta_description'] = process_line_output( getParam("MetaDescription") );

if( strlen( $_page['extra_js'] ) )
{
$_page_cont[0]['extra_js'] = $_page['extra_js'];
}
else
{
$_page_cont[0]['extra_js'] = '';
}

if( strlen( $_page['extra_css'] ) )
{
$_page_cont[0]['extra_css'] = $_page['extra_css'];
}
else
{
$_page_cont[0]['extra_css'] = '';
}





// top menu items
$_page_cont[0]['top_menu'] = $oTemplMenu -> getTopMenu();

// bottom menu items
{
$_page_cont[0]['BMI_Home'] = '<a class="bottommenu" href="' . $site['url'] . 'index.php">' . _t("_Home") . '</a>';
        $_page_cont[0]['BMI_About'] = '<a class="bottommenu" href="' . $site['url'] . 'about_us.php">' . _t("_About Us") . '</a>';
        $_page_cont[0]['BMI_Privacy'] = '<a class="bottommenu" href="' . $site['url'] . 'privacy.php">' . _t("_Privacy") . '</a>';
        $_page_cont[0]['BMI_Termsofuse'] = '<a class="bottommenu" href="' . $site['url'] . 'terms_of_use.php">' . _t("_Terms_of_use") . '</a>';
        $_page_cont[0]['BMI_Services'] = '<a class="bottommenu" href="' . $site['url'] . 'services.php">' . _t("_Services") . '</a>';
        $_page_cont[0]['BMI_FAQ'] = '<a class="bottommenu" href="' . $site['url'] . 'faq.php">' . _t("_FAQ") . '</a>';
        $_page_cont[0]['BMI_Articles'] = '<a class="bottommenu" href="' . $site['url'] . 'articles.php">' . _t("_Articles") . '</a>';
        $_page_cont[0]['BMI_Stories'] = '<a class="bottommenu" href="' . $site['url'] . 'stories.php">' . _t("_Stories2") . '</a>';
        $_page_cont[0]['BMI_Links'] = '<a class="bottommenu" href="' . $site['url'] . 'links.php">' . _t("_Links") . '</a>';
        $_page_cont[0]['BMI_Bann'] = '<a class="bottommenu" href="' . $site['url'] . 'banner/">' . _t("_Razmjena Bannera") . '</a>';
$_page_cont[0]['BMI_Invitefriend'] = '<a class="bottommenu" href="javascript:void(0);" onclick="return launchTellFriend();">' . _t("_Invite a friend") . '</a>';
        $_page_cont[0]['BMI_Contacts'] = '<a class="bottommenu" href="' . $site['url'] . 'contact.php">' . _t("_Contacts") . '</a>';
$_page_cont[0]['BMI_Browse'] = '<a class="bottommenu" href="' . $site['url'] . 'browse.php">' . _t("_Browse Profiles") . '</a>';

$_page_cont[0]['BMI_Contactus'] = '<a class="bottommenu" href="' . $site['url'] . 'contact.php">' . _t("_contact_us") . '</a>';
$_page_cont[0]['BMI_Privacy_Policy'] = '<a class="bottommenu" href="' . $site['url'] . 'privacy.php">' . _t("_PRIVACY_H") . '</a>';

}

switch ($dbh_letters)
{
case "upper": $f_dbh = "strtoupper"; break;
case "lower": $f_dbh = "strtolower"; break;
case "fupper": $f_dbh = "ucfirst"; break;
case "aupper": $f_dbh = "ucwords"; break;
default: $f_dbh = "sprintf";
}
// member/visitor menu
if ( $logged['admin'] )
{
$_page_cont[0]['menu_right_header'] = $f_dbh("admin menu");
$func = "MenuLoggedAdmin";
//$_page_cont[0]['menu_right'] = $func();
$_page_cont[0]['menu_right'] = $oTemplMenu -> loggedAdminMenu();
}
elseif ( $logged['aff'] )
{
$_page_cont[0]['menu_right_header'] = $f_dbh("affiliate menu");
$func = "MenuLoggedAff";
//$_page_cont[0]['menu_right'] = $func();loggedAffMenu()
$_page_cont[0]['menu_right'] = $oTemplMenu->loggedAffMenu();
}
elseif ( $logged['moderator'] )
{
$_page_cont[0]['menu_right_header'] = "moderator menu";
$func = "MenuLoggedModerator";
$_page_cont[0]['menu_right'] = $func();
}
elseif ( $logged['member'] )
{
$_page_cont[0]['menu_right_header'] = $f_dbh(_t("_Member menu"));
$func = "MenuLoggedMember";
//$_page_cont[0]['menu_right'] = $func();
$_page_cont[0]['menu_right'] = $oTemplMenu -> loggedMemberMenu();
}
else
{
$_page_cont[0]['menu_right_header'] = $f_dbh(_t("_Visitor menu"));
$func = "MenuMember";
//$_page_cont[0]['menu_right'] = $func();
$_page_cont[0]['menu_right'] = $oTemplMenu->visitorMenu();
}

if ( !strlen($_page_cont[$ni]['custom_menu']) ) $_page_cont[0]['custom_menu'] = "";

if ( !strlen($_page_cont[$ni]['add_to_header']) ) $_page_cont[0]['add_to_header'] = "";

$check_res = checkAction( (int)$_COOKIE['memberID'], ACTION_ID_USE_IM );
$enable_im = getParam("enable_im");


if ( $enable_im && $check_res[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED && !$ADMIN )
{
$_page_cont[0]['IM_title'] = _t("_IM title");
$_page_cont[0]['IM'] = RetIM();
}
else
{
$_page_cont[0]['IM_title'] = "";
        $_page_cont[0]['IM'] = "";
}

$enable_shoutBox = ('on' == getParam("enable_shoutBox")) ? 1 : 0;
if( $enable_shoutBox )
{
$_page_cont[0]['shout_box_title'] = _t("_shout_box_title");
$_page_cont[0]['shout_box'] = loadShoutbox();
}
else
{
$_page_cont[0]['shout_box_title'] = '';
$_page_cont[0]['shout_box'] = '';
}


// page header
$_page_cont[0]['page_header'] = $_page['header'];
$_page_cont[0]['page_header_text'] = $_page['header_text'];

    // banner rotation/shifting system
        if ( strstr($templ, "__banner_top__") )
                $_page_cont[0]['banner_top'] = banner_put_nv(1);

        if ( strstr($templ, "__banner_left__") )
                $_page_cont[0]['banner_left'] = banner_put_nv(2);

        if ( strstr($templ, "__banner_right__") )
                $_page_cont[0]['banner_right'] = banner_put_nv(3);

        if ( strstr($templ, "__banner_bottom__") )
                $_page_cont[0]['banner_bottom'] = banner_put_nv(4);


        //end of banner rotation/shifting system

//===================================== Ray IM Integration Begin ==============================================================
//
$enable_ray = (getParam( 'enable_ray' ) == 'on');
if ( $enable_ray && $logged['member'] )
{
$sRayHeaderPath = $dir['root'] . "ray/inc/header.inc.php";
$iId = (int)$_COOKIE['memberID'];
$sPassword = getPassword($iId);

$_page_cont[0]['ray_invite_js'] = "<script src=\"" . $site['url'] . "ray/modules/im/js/invite.js\" type=\"text/javascript\" language=\"javascript\"></script>\n\t";
$_page_cont[0]['ray_invite_js'] .= "<script src=\"" . $site['url'] . "ray/modules/presence/js/update.js\" type=\"text/javascript\" language=\"javascript\"></script>\n\t";

ob_start();
require_once($dir['root'] . "ray/modules/im/invite.php");
$_page_cont[0]['ray_invite_swf'] = ob_get_contents();
ob_end_clean();
}
else
{
$_page_cont[0]['ray_invite_js'] = "";
$_page_cont[0]['ray_invite_swf'] = "";
}
//===================================== Ray Im Integration End ================================================================
//
list($col_class1, $col_class2) = split(',',getParam('compose_index_cols'));
$_page_cont[0]['left_column'] = 'left_column_' . $col_class1;
$_page_cont[0]['right_column'] = 'right_column_' . $col_class2;


foreach ( $_page_cont[0] as $key => $value )
{
    $templ = str_replace ( "__${key}__", $value, $templ );
}

if ( is_array($_page_cont[$ni]) )
{
    foreach ( $_page_cont[$ni] as $key => $value )
    {
$templ = str_replace ( "__${key}__", $value, $templ );
    }
}


        echo $templ;


}


/**
* callback function for including template files
*/
function TmplInclude($m)
{
global $dir;
global $tmpl;

// read include file

$fn = "{$dir['root']}templates/tmpl_$tmpl/{$m[1]}";
if (file_exists ($fn))
{
$fp = fopen ($fn, "r");
if ($fp)
{
$s = fread ($fp, filesize ($fn));
fclose ($fp);
return $s;
}
}

return "<b>error reading {$m[1]}</b>";
}

function TmplIncludeBase($m)
{
global $dir;
global $tmpl;

// read include file


$fn = "{$dir['root']}templates/base/{$m[1]}";
if (file_exists ($fn))
{
$fp = fopen ($fn, "r");
if ($fp)
{
$s = fread ($fp, filesize ($fn));
fclose ($fp);
return $s;
}
}

return "<b>error reading {$m[1]}</b>";
}


/**
* Affiliate's member authentocation and setting up cookies
**/
function SetCookieFromAffiliate()
{
global $en_aff;

    if ($en_aff && $_GET['idAff'])
    {
if ( !strstr($_GET['idAff'],"@") )
{
$_GET['idAff'] = (int)$_GET['idAff'];
$res = db_res("SELECT ID FROM aff WHERE ID={$_GET['idAff']} AND `Status`='active'");
}
else
$res = db_res("SELECT ID FROM aff WHERE email='{$_GET['idAff']}' AND `Status`='active'");

if ( mysql_num_rows($res) )
{
setcookie( "idAff", $_GET['idAff'], time() + 10000 * 3600, "/" );
}
    }
}

/**
* Friend's member authentocation and setting up cookies
**/
function SetCookieFromFriend()
{
global $en_aff;

if ( $en_aff && $_GET['idFriend'] )
{
$idFriend = getID( $_GET['idFriend'], 1 );
if ( $idFriend )
setcookie( "idFriend", $idFriend, time() + 10000 * 3600, "/" );
    }
}

/**
* Generating random profiles view
**/
function profile_view()
{
global $logged;
global $dir;
global $site;
global $tmpl;
global $max_thumb_height;
global $max_thumb_width;

$profiles_num = 10;

$ret = "
<center>
<table width=\"100%\" cellpadding=4 cellspacing=4>
<td align=center>
<form method=GET action=\"{$_SERVER['PHP_SELF']}\">
"._t("_Enter profile ID").":<br />
<input class=no type=\"text\" name=\"ID\" size=20>&nbsp;<input class=no type=\"submit\" value=\""._t("_Fetch")."!\">
</form>";

// random profiles
if ( !$logged['admin'] )
{
// $max_thumb_width = getParam( "thumb_width" );
// $max_thumb_height = getParam( "thumb_height" );
$rand_prof_res = db_res( "SELECT `ID`, `NickName`, `Sex`, `Pic_0_addon`, `Sound` FROM `Profiles` WHERE `Status` = 'Active' AND `Picture` = '1' ORDER BY RAND() LIMIT $profiles_num" );
$ret .= "
<br />
<table class=small cellspacing=1 cellpadding=1 align=center>
<tr>
<td colspan=5>$profiles_num "._t("_random profiles").":</td>
</tr>
<tr class=table>";
$i = 0;
while ( $row = mysql_fetch_assoc($rand_prof_res) )
{
if ( $i % 5 == 0 )
{
$ret .= "
</tr>
<tr class=table>";
}
$img_src = file_exists( "{$dir['profileImage']}{$row['ID']}_0_{$row['Pic_0_addon']}.jpg" ) ? "{$row['ID']}_0_{$row['Pic_0_addon']}.jpg" : ($row['Sex'] == 'female' ? "woman.jpg" : "man.jpg");
$ret .= "
<td align=\"center\" width=\"$max_thumb_width\" height=\"$max_thumb_height\">
<a href=\"profile.php?ID={$row['ID']}\"><img src=\"{$site['profileImage']}{$img_src}\" alt=\""._t("_See PERSON's Profile", $row['NickName'])."\" border=0></a>
</td>";
$i++;
}
while ( $i < $profiles_num )
{
if ( $i % 5 == 0 )
{
$ret .= "
</tr>
<tr class=table>";
}
$ret .= "
<td align=\"center\" width=\"$max_thumb_width\" height=\"$max_thumb_height\">
<img src=\"{$site['profileImage']}man.jpg\" border=0>
</td>";
$i++;
}
$ret .= "
</tr>
</table>";
}
$ret .= "
</td>
</table>
</center>";

return $ret;
}


/**
* Custom Menu Function for Profile
**/
function DesignQuickSearch()
{
    global $site;
global $search_start_age;
global $search_end_age;

    $gl_search_start_age    = (int)$search_start_age;
    $gl_search_end_age      = (int)$search_end_age;

if ( $_COOKIE['memberID'] > 0 )
{
$arr_sex = db_arr("SELECT Sex FROM Profiles WHERE ID = ".(int)$_COOKIE['memberID']);
    $member_sex = $arr_sex[Sex];
}
else
    $member_sex = 'male';

ob_start();

?>

<!-- Quick Search -->

<form method="get" action="search_result.php">
<table cellspacing=2 cellpadding=0 border=0 align="center">

    <tr>
        <td align=right><?=_t("_I am a")?> - </td>
        <td><select name="Sex">
<?php
    
echo SelectOptions("Sex"$member_sex);
?>

        </select>
        </td>
    </tr>

    <tr>
        <td align=right><?=_t("_Seeking for a")?> - </td>
        <td><select name="LookingFor">
<?php
    
echo SelectOptions("LookingFor", ($member_sex=='male' 'female':'male') );
?>

        </select></td>
    </tr>
    <tr>
        <td align=right><?=_t("_Aged from")?> - </td>
        <td><select name="DateOfBirth_start">
        <?
        for ( $i = $gl_search_start_age ; $i < $gl_search_end_age ; $i++ )
        {
            $sel = $i == $gl_search_start_age ? 'selected="selected"' : '';
            echo "<option value=\"$i\" $sel>$i</option>";
        }
        ?>
        </select>
        </td>
    </tr>
    <tr>
        <td align=right><?=_t("_to")?> - </td>
        <td><select name="DateOfBirth_end">
        <?
        for ( $i = $gl_search_start_age ; $i <= $gl_search_end_age ; $i++ )
{
            $sel = ($i == $gl_search_end_age) ? 'selected="selected"' : '';
            echo "<option value=\"$i\" $sel>$i</option>";
        }
        ?>
        </select>
        </td>
    </tr>

    <tr>
        <td align=right><?=_t("_With photos only")?> - </td>
        <td><input type=checkbox name=photos_only /></td>
    </tr>

    <tr>
        <td></td>
        <td><input class=no type=submit value="<?=_t("_Find")?>!" /></td>
    </tr>
    </table></form>

<!-- [ END ] Quick Search -->

<?php

    $ret 
ob_get_contents();
    
ob_end_clean();

    return 
$ret;

}

/**
 * Use this function in pages if you want to not cache it.
 **/
function send_headers_page_changed()
{
$now        gmdate('D, d M Y H:i:s') . ' GMT';

header("Expires: $now");
header("Last-Modified: $now");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
}

/**
 * return code for "SELECT" html element
 *  $fieldname - field name for wich will be retrived values
 *  $default   - default value to be selected, if empty then default value will be retrived from database
 **/
function SelectOptions$fieldname$default "" )
{
global $enable_couple;

$ret "";
$arr db_arr ("SELECT extra". (strlen($default) ? "" ", search_default") ." FROM `ProfilesDesc` WHERE `name` = '$fieldname'");
if ( !strlen($default) )
$default $arr['search_default'];
// remove couples if they are not enabled
if ( ($fieldname == 'Sex' || $fieldname == 'LookingFor') && !$enable_couple )
{
$arr['extra'] = preg_replace("/(^|,|)'couple'($|,|)/"''$arr['extra']);
}
$vals preg_split ("/[,\']+/"$arr['extra'], -1PREG_SPLIT_NO_EMPTY);
foreach ( $vals as $v )
{
$v trim($v);
if ( !strlen($v) ) continue;
if ( $v == $default )
$ret .= "<option selected=\"selected\" value=\"$v\">"._t("_$v")."</option>\n";
else
$ret .= "<option value=\"$v\">"._t("_$v")."</option>\n";
}
return $ret;
}

SetCookieFromAffiliate();
SetCookieFromFriend();

/**
 * Return code for IM window
 */
function RetIM()
{
global $site;
global $tmpl;
global $oTemplConfig;

$ID = (int)$_COOKIE['memberID'];

    
$im_width strstr($oTemplConfig -> im_width,'%') ? $oTemplConfig -> im_width $oTemplConfig -> im_width-1;
    
$im_height $oTemplConfig -> im_height;

$im_win $_COOKIE['im_win'] ? $_COOKIE['im_win'] : 'none';

$langOpenNewWindow _t("_Open in new window");
$langShow _t("_Show");
$langHide _t("_Hide");
$linkDivider "&nbsp;|&nbsp;";

if ($im_win == 'none')
{
$div_hide "none";
$div_show "inline";
}
else
{
$div_hide "inline";
$div_show "none";
}

$out .= <<<EOF
<script type="text/javascript">
<!--
function imShowHide()
{

var im_win = document.getElementById('im_win');
var show = document.getElementById('show');
var hide = document.getElementById('hide');

if (im_win.style.display == 'none')
{
document.cookie = "im_win=inline;";
im_win.style.display = 'inline';
show.style.display= 'none';
hide.style.display = 'inline';
}
else
{
document.cookie = "im_win=none;";
im_win.style.display = 'none';
show.style.display= 'inline';
hide.style.display = 'none';
}
}
//-->
</script>

<table width="
$im_width" cellspacing="0" cellpadding="0" class="text" border="0">
<tr>
<td width="
$im_width" align="center" height="20">
<a target="_blank" href="
{$site['url']}im.php">{$langOpenNewWindow}</a>{$linkDivider}<a href="javascript:void(0);" onclick="javascript: imShowHide();"><span id="show" style="display:{$div_show}">{$langShow}</span><span id="hide" style="display:{$div_hide}">{$langHide}</span></a>
</td>
</tr>
<tr>
<td width="
$im_width">
<div id="im_win" style="display: 
$im_win;">
<iframe id="IFrameIMFL" name="IFrameIMFL" frameborder="0" scrolling="no" height="
$im_height" width="$im_width" src="{$site['url']}im.php">
</iframe>
</div>
</td>
</tr>
</table>
EOF;

    
$im_width strstr($im_width,'%') ? $im_width $im_width+1;

    return 
DesignBoxContent_t("_IM title"), $out$oTemplConfig -> PageRetIM_db_num );
}


function 
loadShoutbox()
{

    global 
$site;
global $oTemplConfig;



$reloadtime 60000;
    
$s_win $_COOKIE['s_win'] ? $_COOKIE['s_win']  : 'inline';


$out '

<script type="text/javascript">
<!--
function sShowHide()
{
var s_win = document.getElementById(\'shout\');

if (s_win.style.display == \'none\')
{
document.cookie = "s_win=inline;";
s_win.style.display = \'inline\';
}
else
{
document.cookie = "s_win=none;";
s_win.style.display = \'none\';
}
}

//-->
</script>

<table border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="center" width="' 
$oTemplConfig -> framewidth '" height="20" style="text-align:center;">
<a href="javascript:void(0);" onClick="sShowHide();">Show/Hide</a>
</td>
</tr>'
;

$out .= '<tr><td>
<div id="shout" style="display: '
.$s_win.'">
<iframe id="loadshoutbox" name="loadshoutbox" src="'
.$site['url'].'shoutbox.php" marginwidth="0" marginheight="0" width="' $oTemplConfig -> framewidth.'" height="' $oTemplConfig -> frameheight '" frameborder="0" scrolling="no">
<font color="#FFFFFF"><a href="'
.$site['url'].'shoutbox.php">View the shoutbox</a></font>
</iframe>
</div>
</td></tr>
</table>'
;


return DesignBoxContent _t("_shout_box_title"), $out,  $oTemplConfig -> loadShoutbox_db_num);

}


/**
 * parse string and replace text to smiles where possible
 */
function process_smiles$str )
{
global $site;

$res db_res("SELECT `code`, `smile_url`, `emoticon` FROM smiles");
while ( $arr mysql_fetch_array($res) )
{
$str str_replace$arr['code'], "<img border=\"0\" alt=\"{$arr['emoticon']}\" src=\"{$site['smiles']}{$arr['smile_url']}\" />"$str );
}
return $str;
}

/**
 * put html code for inserting smiles
 */
function put_smiles $textarea$br 999 )
{
global $site;

    
$res db_res("SELECT `code`, `smile_url`, `emoticon` FROM smiles ORDER BY `ID` ASC,`smile_url`");
$i 0;
    while ( 
$arr mysql_fetch_array($res) )
    {
        if ( 
$smile_url == $arr['smile_url'] ) continue;
        
$smile_url $arr['smile_url'];
$counter " var counter = document.getElementById('{$textarea}counter'); if (counter) { counter.value=document.getElementById('{$textarea}').value.length; }";
        
$ret .=  "<a
            href=\"javascript:void(null);\"
            onClick=\"emoticon(document.getElementById('
{$textarea}'),'{$arr['code']}'); $counter;\"
            title=\"
{$arr['emoticon']}\"
            ><img border=0
            alt=\"
{$arr['emoticon']}\"
            src=\"
{$site['smiles']}{$arr['smile_url']}\" /></a> \n";

if ( ((++$i) % $br) == $ret .= "<br />";

    }
return $ret;
}

function 
get_active_color()
{
    global 
$db_color_index;
    
$db_colors = array ( 'green''magenta''orange''violet''yellow' );
    
$index $db_color_index;

// Update color index.
    
if ( == $db_color_index)
    {
        
$db_color_index 0;
    }
    else
    {
        
$db_color_index++;
    }
    return 
$db_colors[$index];
}


function 
get_member_thumbnail$ID$float )
{
require_once( BX_DIRECTORY_PATH_ROOT 'profilePhotos.php' );
$oPhoto = new ProfilePhotos$ID );
$oPhoto -> getActiveMediaArray();
$aFile $oPhoto -> getPrimaryPhotoArray();

if( extFileExists$oPhoto -> sMediaDir 'thumb_' $aFile['med_file'] ) )
{
$sFileName $oPhoto -> sMediaUrl 'thumb_' $aFile['med_file'];
}
else
{
$sFileName getTemplateIcon'no_photo.gif' );
}

$style 
'width:' $oPhoto -> aMediaConfig['size']['thumbWidth'] . 'px;' .
'height:' $oPhoto -> aMediaConfig['size']['thumbHeight'] . 'px;' .
'background-image:url(' $sFileName ');';

$ret '';
$ret .= '<div class="thumbnail_block" style="float:' $float '; ">';
$ret .= '<a href="' $oPhoto -> aMediaConfig['site']['url'] . 'profile.php?ID=' $ID '">';
$ret .= '<img src="' getTemplateIcon'spacer.gif' ) . '" style="' $style '" alt="' process_line_output$aFileName['med_title'] ) . '" />';
$ret .= '</a>';
$ret .= '</div>';

return $ret;
}


?>
IP sačuvana
social share
Pogledaj profil
 
Prijava na forum:
Ime:
Lozinka:
Zelim biti prijavljen:
Trajanje:
Registruj nalog:
Ime:
Lozinka:
Ponovi Lozinku:
E-mail:
Moderator
Capo di tutti capi


Underpromise; overdeliver.

Zodijak Gemini
Pol Muškarac
Poruke Odustao od brojanja
Zastava 44°49′N - 20°29′E
OS
Windows XP
Browser
Opera 9.20
mob
Apple iPhone 6s
Pa ubacujes tamo gde hoces da se pojavi, samo sto moras code prilagoditi posto ubacujes u php fajl, ne treba ti <?PHP , ?> ...
IP sačuvana
social share
Pobednik, pre svega.

Napomena: Moje privatne poruke, icq, msn, yim, google talk i mail ne sluze za pruzanje tehnicke podrske ili odgovaranje na pitanja korisnika. Za sva pitanja postoji adekvatan deo foruma. Pronadjite ga! Takve privatne poruke cu jednostavno ignorisati!
Preporuke za clanove: Procitajte najcesce postavljana pitanja!
Pogledaj profil WWW GTalk Twitter Facebook
 
Prijava na forum:
Ime:
Lozinka:
Zelim biti prijavljen:
Trajanje:
Registruj nalog:
Ime:
Lozinka:
Ponovi Lozinku:
E-mail:
Ucesnik diskusija

Zodijak
Pol
Poruke 106
OS
Windows XP
Browser
Mozilla Firefox 2.0.0.3
ali problem je kaj je taj design.inc.php vezan za druge stranice. Pa ako stavim kod za Cutenews u njega i sve ostale stranice će to dobiti, a ja ne bi.
IP sačuvana
social share
Pogledaj profil
 
Prijava na forum:
Ime:
Lozinka:
Zelim biti prijavljen:
Trajanje:
Registruj nalog:
Ime:
Lozinka:
Ponovi Lozinku:
E-mail:
Moderator
Capo di tutti capi


Underpromise; overdeliver.

Zodijak Gemini
Pol Muškarac
Poruke Odustao od brojanja
Zastava 44°49′N - 20°29′E
OS
Windows XP
Browser
Opera 9.20
mob
Apple iPhone 6s
A ti onda nauci kako da ga ubacis samo za tu stranicu na kojoj ti hoces...
Sigurno postoji neki if koji se moze vezati samo a tu stranu...
IP sačuvana
social share
Pobednik, pre svega.

Napomena: Moje privatne poruke, icq, msn, yim, google talk i mail ne sluze za pruzanje tehnicke podrske ili odgovaranje na pitanja korisnika. Za sva pitanja postoji adekvatan deo foruma. Pronadjite ga! Takve privatne poruke cu jednostavno ignorisati!
Preporuke za clanove: Procitajte najcesce postavljana pitanja!
Pogledaj profil WWW GTalk Twitter Facebook
 
Prijava na forum:
Ime:
Lozinka:
Zelim biti prijavljen:
Trajanje:
Registruj nalog:
Ime:
Lozinka:
Ponovi Lozinku:
E-mail:
Idi gore
Stranice:
Počni novu temu Nova anketa Odgovor Štampaj Dodaj temu u favorite Pogledajte svoje poruke u temi
nazadnapred
Prebaci se na:  

Poslednji odgovor u temi napisan je pre više od 6 meseci.  

Temu ne bi trebalo "iskopavati" osim u slučaju da imate nešto važno da dodate. Ako ipak želite napisati komentar, kliknite na dugme "Odgovori" u meniju iznad ove poruke. Postoje teme kod kojih su odgovori dobrodošli bez obzira na to koliko je vremena od prošlog prošlo. Npr. teme o određenom piscu, knjizi, muzičaru, glumcu i sl. Nemojte da vas ovaj spisak ograničava, ali nemojte ni pisati na teme koje su završena priča.

web design

Forum Info: Banneri Foruma :: Burek Toolbar :: Burek Prodavnica :: Burek Quiz :: Najcesca pitanja :: Tim Foruma :: Prijava zloupotrebe

Izvori vesti: Blic :: Wikipedia :: Mondo :: Press :: Naša mreža :: Sportska Centrala :: Glas Javnosti :: Kurir :: Mikro :: B92 Sport :: RTS :: Danas

Prijatelji foruma: Triviador :: Nova godina Beograd :: nova godina restorani :: FTW.rs :: MojaPijaca :: Pojacalo :: 011info :: Burgos :: Sudski tumač Novi Beograd

Pravne Informacije: Pravilnik Foruma :: Politika privatnosti :: Uslovi koriscenja :: O nama :: Marketing :: Kontakt :: Sitemap

All content on this website is property of "Burek.com" and, as such, they may not be used on other websites without written permission.

Copyright © 2002- "Burek.com", all rights reserved. Performance: 0.104 sec za 16 q. Powered by: SMF. © 2005, Simple Machines LLC.