Total Users Online: 0 üye, 232 guest | Tarih/Saat: 2026-05-25 02:28
 
BBcode Youtube Kodu
2010-03-13 16:39 GMT  oklu Alnt
StratoS
Seditio
User is: Online status   Gender_M
Posts: 47
Ülke: İzmir - 35
Meslek: Uzman
Age: 38

Te?ekk?r ederim, Sevgili Kaan...

Hakk?n ?denmez hi?bir ?ekilde...

Kodlar:

Kod:
<?PHP

/* ====================
Seditio - Website engine
Copyright Neocrome
http://www.neocrome.net
[BEGIN_SED]
File=system/functions.php
Version=125
Updated=2009-jun-22
Type=Core
Author=Neocrome
Description=Functions
[END_SED]
==================== */

if (!defined('SED_CODE')) { die('Wrong URL.'); }

$cfg = array();
$out = array();
$plu = array();
$sys = array();
$usr = array();

/* ======== Pre-sets ========= */

$i = explode(' ', microtime());
$sys['starttime'] = $i[1] + $i[0];

unset ($warnings, $moremetas, $morejavascript, $error_string,  $sed_cat, $sed_smilies, $sed_acc, $sed_catacc, $sed_rights, $sed_config, $sql_config, $sed_usersonline, $sed_plugins, $sed_parser, $sed_groups, $rsedition, $rseditiop, $rseditios, $tcount, $qcount);

$cfg['authmode'] = 3; // (1:cookies, 2:sessions, 3:cookies+sessions)
$cfg['xmlclient'] = FALSE; // For testing-purposes only, else keep it off
$cfg['enablecustomhf'] = FALSE; // To enable header.$location.tpl and footer.$location.tpl
$cfg['pfs_dir'] = 'datas/users/';
$cfg['av_dir'] = 'datas/avatars/';
$cfg['photos_dir'] = 'datas/photos/';
$cfg['sig_dir'] = 'datas/signatures/';
$cfg['defav_dir'] = 'datas/defaultav/';
$cfg['th_dir'] = 'datas/thumbs/';
$cfg['pagination'] = ' [%s]';
$cfg['pagination_cur'] = ' <strong>> %s <</strong>';
$cfg['pfsmaxuploads'] = 8;
$cfg['version'] = '125';
$cfg['dbversion'] = '125a';
$cfg['sqldb'] = 'mysql';

/* ======== Names of the SQL tables ========= */

$sed_dbnames = array ('auth', 'auth_default', 'banlist', 'cache', 'com', 'core', 'config', 'forum_sections', 'forum_structure', 'forum_topics', 'forum_posts', 'groups', 'groups_users', 'logger', 'online', 'pages', 'parser', 'pfs', 'pfs_folders', 'plugins', 'pm', 'polls_options', 'polls', 'polls_voters', 'rated', 'ratings', 'referers', 'smilies', 'stats', 'structure', 'trash', 'users');

foreach($sed_dbnames as $k => $i)
{
$j = 'db_'.$i;
$$j = 'sed_'.$i;
}

/* ================== Replacements for PHP5-only functions ================== */

if (!function_exists('str_split'))
{
function str_split($txt, $length=1)
{
if ($length<1)
{ return(FALSE); }
$res = array();
for ($i=0; $i<mb_strlen($txt); $i+=$length)
{ $res[] = substr($txt, $i, $length); }
return($res);
}
}

/* ------------------ */

function sed_alphaonly($text)
{
return(preg_replace('/[^a-zA-Z0-9_]/', '', $text));
}

/* ------------------ */

function sed_auth($area, $option, $mask='RWA')
{
global $sys, $usr;

$mn['R'] = 1;
$mn['W'] = 2;
$mn['1'] = 4;
$mn['2'] = 8;
$mn['3'] = 16;
$mn['4'] = 32;
$mn['5'] = 64;
$mn['A'] = 128;

$masks = str_split($mask);
$res = array();

foreach($masks as $k => $ml)
{
if(empty($mn[$ml]))
{
$sys['auth_log'][] = $area.".".$option.".".$ml."=0";
$res[] = FALSE;
}
elseif ($option=='any')
{
$cnt = 0;

if (is_array($usr['auth'][$area]))
{
foreach($usr['auth'][$area] as $k => $g)
{ $cnt += (($g & $mn[$ml]) == $mn[$ml]); }
}
$cnt = ($cnt==0 && $usr['auth']['admin']['a'] && $ml=='A') ? 1 : $cnt;

$sys['auth_log'][] = ($cnt>0) ? $area.".".$option.".".$ml."=1" : $area.".".$option.".".$ml."=0";
$res[] = ($cnt>0) ? TRUE : FALSE;
}
else
{
$sys['auth_log'][] = (($usr['auth'][$area][$option] & $mn[$ml]) == $mn[$ml]) ? $area.".".$option.".".$ml."=1" : $area.".".$option.".".$ml."=0";
$res[] = (($usr['auth'][$area][$option] & $mn[$ml]) == $mn[$ml]) ? TRUE : FALSE;
}
}
if (count($res)==1)
{ return ($res[0]); }
   else
{ return($res); }
}

/* ------------------ */

function sed_auth_build($userid, $maingrp=0)
{
global $db_auth, $db_groups_users;

$groups = array();
$authgrid = array();
$tmpgrid = array();

if ($userid==0 || $maingrp==0)
{
$groups[] = 1;
}
else
{
$groups[] = $maingrp;
$sql = sed_sql_query("SELECT gru_groupid FROM $db_groups_users WHERE gru_userid='$userid'");

while ($row = sed_sql_fetcharray($sql))
   { $groups[] = $row['gru_groupid']; }
}

    $sql_groups = implode(',', $groups);
$sql = sed_sql_query("SELECT auth_code, auth_option, auth_rights FROM $db_auth WHERE auth_groupid IN (".$sql_groups.") ORDER BY auth_code ASC, auth_option ASC");

while ($row = sed_sql_fetcharray($sql))
    { $authgrid[$row['auth_code']][$row['auth_option']] |= $row['auth_rights']; }

    return($authgrid);
}

/* ------------------ */

function sed_auth_clear($id='all')
{
global $db_users;

if($id=='all')
{ $sql = sed_sql_query("UPDATE $db_users SET user_auth='' WHERE 1"); }
else
{ $sql = sed_sql_query("UPDATE $db_users SET user_auth='' WHERE user_id='$id'"); }
return( sed_sql_affectedrows());
}

/* ------------------ */

function sed_bbcode($text)
{
global $L, $skin, $sys, $cfg, $sed_groups, $sed_parser;

$text = sed_bbcode_autourls($text);
$text = " ".$text;

foreach($sed_parser[0] as $bbcode => $bbcodehtml)
{
if (!empty($bbcodehtml['bb1']))
{ $text = str_replace($bbcodehtml['bb1'], $bbcodehtml['code1'], $text); }
if (!empty($bbcodehtml['bb2']))
{ $text = str_replace($bbcodehtml['bb2'], $bbcodehtml['code2'], $text); }
}

foreach($sed_parser[1] as $bbcode => $bbcodehtml)
{
if (!empty($bbcodehtml['bb1']))
{ $text = preg_replace($bbcodehtml['bb1'], $bbcodehtml['code1'], $text); }
if (!empty($bbcodehtml['bb2']))
{ $text = preg_replace($bbcodehtml['bb2'], $bbcodehtml['code2'], $text); }
}

return(substr($text,1));
}

/* ------------------ */

function sed_bbcode_autourls($text)
{
$text = ' '.$text;
$text = preg_replace("#([\n ])([a-z0-9]+?)://([^\t \n\r]+)#i", "\\1[url]\\2://\\3[/url]", $text);
$text = preg_replace("#([\n ])([a-z0-9-_.]+?@[A-z0-9-]+\.[^,\t \n\r]+)#i", "\\1[email]\\2[/email]", $text);
return(substr($text,1));
}

/* ------------------ */

function sed_bbcode_urls($text)
{
global $cfg;
$bbcodes2 = array(
'\\[youtube\\]([^\\([]*)\\[/youtube\\]' => '<object width="400" height="329"><param name="movie" value="http://www.youtube.com/v/\\1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/\\1" type="application/x-shockwave-flash" wmode="transparent" width="400" height="329"></embed></object>',
'\\[thumb=([^\\\'\;\?([]*)\.(jpg|jpeg|gif|png)\\]([^\\[]*)\.(jpg|jpeg|gif|png)\\[/thumb\\]' => '\\1.\\2',
'\\[pfs]([^\\[]*)\\[/pfs\\]' => $cfg['pfs_dir'].'\\1',
'$' => '&ැ',
'[b]' => '<strong>',
'[/b]' => '</strong>',
'[p]' => '<p>',
'[/p]' => '</p>',
'[u]' => '<u>',
'[/u]' => '</u>',
'[i]' => '<em>',
'[/i]' => '</em>',
'[hr]' => '<hr />',
'[_]' => '&nbsp;',
'[__]' => '&nbsp; &nbsp;',
'[list]' => '<ul type="square">',
'[/list]' => '</ul>',
'[red]' => '<span style="color:#F93737">',
'[/red]' => '</span>',
'[white]' => '<span style="color:#FFFFFF">',
'[/white]' => '</span>',
'[green]' => '<span style="color:#09DD09">',
'[/green]' => '</span>',
'[blue]' => '<span style="color:#018BFF">',
'[/blue]' => '</span>',
'[orange]' => '<span style="color:#FF9900">',
'[/orange]' => '</span>',
'[yellow]' => '<span style="color:#FFFF00">',
'[/yellow]' => '</span>',
'[purple]' => '<span style="color:#A22ADA">',
'[/purple]' => '</span>',
'[black]' => '<span style="color:#000000">',
'[/black]' => '</span>',
'[grey]' => '<span style="color:#B9B9B9">',
'[/grey]' => '</span>',
'[pink]' => '<span style="color:#FFC0FF">',
'[/pink]' => '</span>',
'[sky]' => '<span style="color:#D1F4F9">',
'[/sky]' => '</span>',
'[sea]' => '<span style="color:#171A97">',
'[/sea]' => '</span>',
'[quote]' => '<blockquote><img src=\"skins/Che/images/alinti.gif/" alt="" /><hr />',
'[/quote]' => '<hr /></blockquote>',
'[br]' => '<br />',
'[more]' => '',


);

foreach($bbcodes as $bbcode => $bbcodehtml)
{ $text = eregi_replace($bbcode,$bbcodehtml,$text); }

return($text);
}

/* ------------------ */

function sed_block($allowed)
{
if (!$allowed)
{
global $sys;
header("Location: message.php?msg=930&".$sys['url_redirect']);
exit;
}
return(FALSE);
}
Konuyla İlgili Diğer Başlıklar
üye konu açarken güvenlik kodu
PHP: JSON: AJAX: Youtube Video Aramaları
Üye Kayıt Sayfasında Sorulu Güvenlik kodu
Youtube'dan Ramazan'a özel hazırlık!
Youtube sorunu

Bu mesaj Kaan tarafından 2011-04-18 01:33 GMT, 5516 Gün önce düzenlendi.

 

Powered by Seditio © 2009-2012 All Rights Reserved