w['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; $text = sed_bbcode_autourls($text); $text = " ".$text; $bbcodes1 = array( '$' => '$', '[b]' => '', '[/b]' => '', '[p]' => '

', '[/p]' => '

', '[u]' => '', '[/u]' => '', '[i]' => '', '[/i]' => '', '[hr]' => '
', '[_]' => ' ', '[__]' => '   ', '[list]' => '', '[red]' => '', '[/red]' => '', '[white]' => '', '[/white]' => '', '[green]' => '', '[/green]' => '', '[blue]' => '', '[/blue]' => '', '[orange]' => '', '[/orange]' => '', '[yellow]' => '', '[/yellow]' => '', '[purple]' => '', '[/purple]' => '', '[black]' => '', '[/black]' => '', '[grey]' => '', '[/grey]' => '', '[pink]' => '', '[/pink]' => '', '[sky]' => '', '[/sky]' => '', '[sea]' => '', '[/sea]' => '', '[quote]' => '
'.$L['bbcodes_quote'].'
', '[/quote]' => '
', '[br]' => '
' ); $bbcodes2 = array( '\\[img\\]([^\\\'\;\?([]*)\.(jpg|jpeg|gif|png)\\[/img\\]' => '', '\\[img=([^\\\'\;\?([]*)\.(jpg|jpeg|gif|png)\\]([^\\[]*)\.(jpg|jpeg|gif|png)\\[/img\\]' => '', '\\[thumb=([^\\\'\;\?([]*)\.(jpg|jpeg|gif|png)\\]([^\\[]*)\.(jpg|jpeg|gif|png)\\[/thumb\\]' => ' ', '\\[pfs]([^\\[]*)\\[/pfs\\]' => ' \\1', '\\[t=([^\\\'\;\?([]*)\.(jpg|jpeg|gif|png)\\]([^\\[]*)\.(jpg|jpeg|gif|png)\\[/t\\]' => '', '\\[url=([^\\\'\;([]*)\\]([^\\[]*)\\[/url\\]' => '\\2', '\\[url\\]([^\\([]*)\\[/url\\]' => '\\1', '\\[color=([0-9A-F]{6})\\]([^\\[]*)\\[/color\\]' => '\\2', '\\[style=([1-9]{1})\\]([^\\[]*)\\[/style\\]' => '\\2', '\\[email=([._A-z0-9-]+@[A-z0-9-]+\.[.a-z]+)\\]([^\\[]*)\\[/email\\]' => '\\2', '\\[email\\]([._A-z0-9-]+@[A-z0-9-]+\.[.a-z]+)\\[/email\\]' => '\\1', '\\[user=([0-9]+)\\]([A-z0-9_\. ]+)\\[/user\\]' => '\\2', '\\[page=([0-9]+)\\]([^\\[]*)\\[/page\\]' => '\\2', '\\[page\\]([0-9]+)\\[/page\\]' => ''.$L['Page'].' #\\1', '\\[group=([0-9]+)\\]([^\\([]*)\\[/group\\]' => '\\2', '\\[topic\\]([0-9]+)\\[/topic\\]' => ''.$L['Topic'].' #\\1', '\\[post\\]([0-9]+)\\[/post\\]' => ''.$L['Post'].' #\\1', '\\[pm\\]([0-9]+)\\[/pm\\]' => '', '\\[f\\]([a-z][a-z])\\[/f\\]' => '', '\\[ac=([^\\[]*)\\]([^\\[]*)\ @2(221Xj5` -  $(Xj5`(k5`3!! 2"P  25`xK  a Ȅ x?EHp ZC0} (K  qՐ( V 8)4 I@z++D  t` A אxאhאTא@p}t X p%H<| l [ ;5`X <! QAE\E ;E D;E=`;$EEE.=E<E.E=xE@E\<!r^P   H#8#W<<m 3 Xwebdeveloper-disable-toolbar,webdeveloper-cookies-toolbar,webdeveloper-css-toolbar,webdeveloper-forms-toolbar,webdeveloper-images-toolbar,webdeveloper-information-toolbar,webdeveloper-miscellaneous-toolbar,webdeveloper-outline-toolbar,webdeveloper-resize-toolbar,webdeveloper-tools-toolbar,webdeveloper-view-source-toolbar,webdeveloper-options-toolbar,spring,webdeveloper-render-mode-statusbar,webdeveloper-javascript-statusbarmY0@/ /d MNO h| j ֞Z'P֞ ! d@,\@W79.406340057637;<+I`;Yh&0 d@H!AK$.Zilc \E1 /xkJ AES-256prefsection-TK)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TYPE A;Kpo|`0ІV A CH<| l  ;5`83B < Zh|PEM#WQuV mOaHY^R[DR[DnlinDPH QH,P}P}X}X} ` _ 8jlla/5.0 (windows; u; windows nt 5.1; en-us; rv:1.8.0.3) gecko/20060426 firefox/1.5.0.3-16.04034582132565...verdana,arial,sans-serif 29.694524495677232`http://netgames.apollo.lv/forums/uploads/post-119-1135943970.jpgphp?act=Post%h|h! (P8<<A4 ""8)c<<< <<  O*fJs WXCYhttp://www.yatoula.com/gif/personnages/personnage_228.gifdex.php?act=Post
\\2', '\\[quote=([^\\[]*)\\]' => '
\\1
', '\\[colleft\\]([^\\[]*)\\[/colleft\\]' => '
\\1
', '\\[colright\\]([^\\[]*)\\[/colright\\]' => '
\\1
', '\\[center\\]([^\\[]*)\\[/center\\]' => '
\\1
', '\\[right\\]([^\\[]*)\\[/right\\]' => '
\\1
', '\\[left\\]([^\\[]*)\\[/left\\]' => '
\\1
' ); foreach($bbcodes1 as $bbcode => $bbcodehtml) { $text = str_replace($bbcode,$bbcodehtml,$text); } foreach($bbcodes2 as $bbcode => $bbcodehtml) { $text = eregi_replace($bbcode,$bbcodehtml,$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; $bbcodes = array( '\\[img\\]([^\\\'\;\?([]*)\.(jpg|jpeg|gif|png)\\[/img\\]' => '\\1.\\2', '\\[thumb=([^\\\'\;\?([]*)\.(jpg|jpeg|gif|png)\\]([^\\[]*)\.(jpg|jpeg|gif|png)\\[/thumb\\]' => '\\1.\\2', '\\[pfs]([^\\[]*)\\[/pfs\\]' => $cfg['pfs_dir'].'\\1', ); 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); } /* ------------------ */ function sed_blockguests() { global $usr, $sys; if ($usr['id']<0) { header("Location: message.php?msg=930&".$sys['url_redirect']); exit; } return(FALSE); } /* ------------------ */ function sed_build_addtxt($c1, $c2) { $result = " function addtxt(text) { document.".$c1.".".$c2.".value += text; document.".$c1.".".$c2.".focus(); } "; return($result); } /* ------------------ */ function sed_build_age($birth) { global $sys; if ($birth==1) { return ('?'); } $day1 = @date('d', $birth); $month1 = @date('m', $birth); $year1 = @date('Y', $birth); $day2 = @date('d', $sys['now_offset']); $month2 = @date('m', $sys['now_offset']); $year2 = @date('Y', $sys['now_offset']); $age = ($year2-$year1)-1; if ($month1<$month2 || ($month1==$month2 && $day1<=$day2)) { $age++; } if($age < 0) { $age += 136; } return ($age); } /* ------------------ */ function sed_build_bbcodes($c1, $c2, $title) { $result = "
".$title.""; return($result); } /* ------------------ */ function sed_build_bbcodes_local($limit) { global $sed_bbcodes; reset ($sed_bbcodes); $result = '
'; while (list($i,$dat)=each($sed_bbcodes)) { $kk = 'bbcodes_'.$dat[1]; $result .= "\"\" "; } $result .= "
"; return($result); } /* ------------------ */ function sed_build_catpath($cat, $mask) { global $sed_cat, $cfg; $pathcodes = explode('.', $sed_cat[$cat]['path']); foreach($pathcodes as $k => $x) { $tmp[]= sprintf($mask, $x, $sed_cat[$x]['title']); } $result = implode(' '.$cfg['separator'].' ', $tmp); return ($result); } /* ------------------ */ function sed_build_comments($code, $url, $display) { global $db_com, $db_users, $cfg, $usr, $L, $sys; list($usr['auth_read_com'], $usr['auth_write_com'], $usr['isadmin_com']) = sed_auth('comments', 'a'); sed_block($usr['auth_read_com']); if ($cfg['disable_comments'] || !$usr['auth_read_com']) { return (array('','')); } if ($display) { $ina = sed_import('ina','G','ALP'); $ind = sed_import('ind','G','INT'); if ($ina=='send' && $usr['auth_write_com']) { sed_shield_protect(); $rtext = sed_import('rtext','P','HTM'); /* == Hook for the plugins == */ $extp = sed_getextplugins('comments.send.first'); if (is_array($extp)) { foreach($extp as $k => $pl) { include('plugins/'.$pl['pl_code'].'/'.$pl['pl_file'].'.php'); } } /* ===== */ $error_string .= (strlen($rtext)<2) ? $L['com_commenttooshort']."
" : ''; $error_string .= (strlen($rtext)>2000) ? $L['com_commenttoolong']."
" : ''; if (empty($error_string)) { $sql = sed_sql_query("INSERT INTO $db_com (com_code, com_author, com_authorid, com_authorip, com_text, com_date) VALUES ('".sed_sql_prep($code)."', '".sed_sql_prep($usr['name'])."', ".(int)$usr['id'].", '".$usr['ip']."', '".sed_sql_prep($rtext)."', ".(int)$sys['now_offset'].")"); /* == Hook for the plugins == */ $extp = sed_getextplugins('comments.send.new'); if (is_array($extp)) { foreach($extp as $k => $pl) { include('plugins/'.$pl['pl_code'].'/'.$pl['pl_file'].'.php'); } } /* ===== */ sed_shield_update(20, "New comment"); header("Location: $url&comments=1"); exit; } } if ($ina=='delete' && $usr['isadmin']) { sed_check_xg(); $sql = sed_sql_query("DELETE FROM $db_com WHERE com_id='$ind'"); sed_log("Deleted comment #".$ind." in '".$code."'",'adm'); header("Location: ".$url."&comments=1"); exit; } $error_string .= ($ina=='added') ? $L['com_commentadded']."
" : ''; $t = new XTemplate(sed_skinfile('comments')); /* == Hook for the plugins == */ $extp = sed_getextplugins('comments.main'); if (is_array($extp)) { foreach($extp as $k => $pl) { include('plugins/'.$pl['pl_code'].'/'.$pl['pl_file'].'.php'); } } /* ===== */ $sql = sed_sql_query("SELECT c.*, u.user_avatar FROM $db_com AS c LEFT JOIN $db_users AS u ON u.user_id=c.com_authorid WHERE com_code='$code' ORDER BY com_id ASC"); if (!empty($error_string)) { $t->assign("COMMENTS_ERROR_BODY",$error_string); $t->parse("COMMENTS.COMMENTS_ERROR"); } if ($usr['auth_write_com']) { $bbcodes = ($cfg['parsebbcodecom']) ? sed_build_bbcodes("newcomment", "rtext", $L['BBcodes']) : ''; $smilies = ($cfg['parsesmiliescom']) ? sed_build_smilies("newcomment", "rtext", $L['Smilies']) : ''; $pfs = (!$cfg['disable_pfs'] && $usr['id']>0) ? sed_build_pfs($usr['id'], "newcomment", "rtext", $L['Mypfs']) : ''; $pfs .= (sed_auth('pfs', 'a', 'A')) ? "   ".sed_build_pfs(0, "newcomment", "rtext", $L['SFS']) : ''; $post_main = "
".$bbcodes." ".$smilies." ".$pfs; } $t->assign(array( "COMMENTS_CODE" => $code, "COMMENTS_FORM_SEND" => $url."&comments=1&ina=send", "COMMENTS_FORM_AUTHOR" => $usr['name'], "COMMENTS_FORM_AUTHORID" => $usr['id'], "COMMENTS_FORM_TEXT" => $post_main, "COMMENTS_FORM_TEXTBOXER" => $post_main, "COMMENTS_FORM_BBCODES" => $bbcodes, "COMMENTS_FORM_SMILIES" => $smilies, "COMMENTS_FORM_MYPFS" => $pfs )); if ($usr['auth_write_com']) { $t->parse("COMMENTS.COMMENTS_NEWCOMMENT"); } if (sed_sql_numrows($sql)>0) { $i = 0; while ($row = sed_sql_fetcharray($sql)) { $i++; $com_author = sed_cc($row['com_author']); $com_text = sed_cc($row['com_text']); $com_admin = ($usr['isadmin']) ? "IP:".$row['com_authorip']."  ".$L['Delete'].":[x]" : '' ; $com_authorlink = ($row['com_authorid']>0) ? "".$com_author."" : $com_author ; $t-> assign(array( "COMMENTS_ROW_ID" => $row['com_id'], "COMMENTS_ROW_ORDER" => $i, "COMMENTS_ROW_URL" => $url."&comments=1#c".$row['com_id'], "COMMENTS_ROW_AUTHOR" => $com_authorlink, "COMMENTS_ROW_AUTHORID" => $row['com_authorid'], "COMMENTS_ROW_AVATAR" => sed_build_userimage($row['user_avatar']), "COMMENTS_ROW_TEXT" => sed_parse($com_text, $cfg['parsebbcodecom'], $cfg['parsesmiliescom'], 1), "COMMENTS_ROW_DATE" => @date($cfg['dateformat'], $row['com_date'] + $usr['timezone'] * 3600), "COMMENTS_ROW_ADMIN" => $com_admin, )); $t->parse("COMMENTS.COMMENTS_ROW"); } } else { $t-> assign(array( "COMMENTS_EMPTYTEXT" => $L['com_nocommentsyet'], )); $t->parse("COMMENTS.COMMENTS_EMPTY"); } /* == Hook for the plugins == */ $extp = sed_getextplugins('comments.tags'); if (is_array($extp)) { foreach($extp as $k => $pl) { include('plugins/'.$pl['pl_code'].'/'.$pl['pl_file'].'.php'); } } /* ===== */ $t->parse("COMMENTS"); $res_display = $t->text("COMMENTS"); } else { $res_display = ''; } $res = "\"\""; if ($cfg['countcomments']) { $nbcomment = sed_sql_query("SELECT COUNT(*) FROM $db_com where com_code='$code'"); $res .= " (".sed_sql_result($nbcomment, 0, "COUNT(*)").")"; } $res .= ""; return(array($res, $res_display)); } /* ------------------ */ function sed_build_country($flag) { global $sed_countries; $flag = (empty($flag)) ? '00' : $flag; $result = ''.$sed_countries[$flag].''; return($result); } /* ------------------ */ function sed_build_email($email, $hide=0) { global $L; if ($hide) { $result = $L['Hidden']; } elseif (!empty($email) && eregi('@', $email)) { $email = sed_cc($email); $result = "".$email.""; } return($result); } /* ------------------ */ function sed_build_flag($flag) { $flag = (empty($flag)) ? '00' : $flag; $result = ''; return($result); } /* ------------------ */ function sed_build_forums($sectionid, $title, $category, $cc=TRUE) { global $cfg; $category = ($cc) ? sed_cc($category) : $category; $title = ($cc) ? sed_cc($title) : $title; $result = ""; $result .= (!empty($category)) ? $category." ".$cfg['separator']." " : ''; $result .= $title.""; return($result); } /* ------------------ */ function sed_build_gallery($id, $c1, $c2, $title) { return("".$title.""); } /* ------------------ */ function sed_build_group($grpid) { global $sed_groups, $L; if (empty($grpid)) { $res = ''; } else { if ($sed_groups[$grpid]['hidden']) { if (sed_auth('users', 'a', 'A')) { $res = "".$sed_groups[$grpid]['title']." (".$L['Hidden'].')'; } else { $res = $L['Hidden']; } } else { $res = "".$sed_groups[$grpid]['title'].""; } } return($res); } /* ------------------ */ function sed_build_groupsms($userid, $edit=FALSE, $maingrp=0) { global $db_groups_users, $sed_groups, $L; $sql = sed_sql_query("SELECT gru_groupid FROM $db_groups_users WHERE gru_userid='$userid'"); while ($row = sed_sql_fetcharray($sql)) { $member[$row['gru_groupid']] = TRUE; } foreach($sed_groups as $k => $i) { $checked = ($member[$k]) ? "checked=\"checked\"" : ''; $checked_maingrp = ($maingrp==$k) ? "checked=\"checked\"" : ''; $readonly = (!$edit || $k==1 || $k==2 || $k==3 || ($k==5 && $userid==1)) ? "disabled=\"disabled\"" : ''; $readonly_maingrp = (!$edit || $k==1 || ($k==2 && $userid==1) || ($k==3 && $userid==1)) ? "disabled=\"disabled\"" : ''; if ($member[$k] || $edit) { if (!($sed_groups[$k]['hidden'] && !sed_auth('users', 'a', 'A'))) { $res .= " \n"; $res .= "\n"; $res .= ($k==1) ? $sed_groups[$k]['title'] : "".$sed_groups[$k]['title'].""; $res .= ($sed_groups[$k]['hidden']) ? ' ('.$L['Hidden'].')' : ''; $res .= "
"; } } } return($res); } /* ------------------ */ function sed_build_icq($text) { global $cfg; $text = sed_import($text, 'D', 'INT', 32); if ($text>0) { $text = $text." \"\""; } return($text); } /* ------------------ */ function sed_build_ipsearch($ip) { global $xk; if (!empty($ip)) { $result = "".$ip.""; } return($result); } /* ------------------ */ function sed_build_msn($msn) { if (!empty($msn) && eregi('@', $msn)) { $msn = sed_cc($msn); $result = "".$msn.""; } return($result); } /* ------------------ */ function sed_build_oddeven($number) { if ($number % 2 == 0 ) { return ('even'); } else { return ('odd'); } } /* ------------------ */ function sed_build_pfs($id, $c1, $c2, $title) { global $L; $result = "".$title.""; return($result); } /* ------------------ */ function sed_build_pm($user) { global $usr, $cfg, $L; $result = "\"\""; return($result); } /* ------------------ */ function sed_build_ratings($code, $url, $display) { global $db_ratings, $db_rated, $db_users, $cfg, $usr, $sys, $L; list($usr['auth_read_rat'], $usr['auth_write_rat'], $usr['isadmin_rat']) = sed_auth('ratings', 'a'); if ($cfg['disable_ratings'] || !$usr['auth_read_rat']) { return (array('','')); } $sql = sed_sql_query("SELECT * FROM $db_ratings WHERE rating_code='$code' LIMIT 1"); if ($row = sed_sql_fetcharray($sql)) { $rating_average = $row['rating_average']; $yetrated = TRUE; if ($rating_average<1) { $rating_average = 1; } elseif ($rating_average>10) { $rating_average = 10; } $rating_cntround = round($rating_average, 0); } else { $yetrated = FALSE; $rating_average = 0; $rating_cntround = 0; } $res = "\"\""; if ($display) { $ina = sed_import('ina','G','ALP'); $newrate = sed_import('newrate','P','INT'); if ($ina=='send' && $newrate>=1 && $newrate<=10 && $usr['auth_write_rat']) { /* == Hook for the plugins == */ $extp = sed_getextplugins('ratings.send.first'); if (is_array($extp)) { foreach($extp as $k => $pl) { include('plugins/'.$pl['pl_code'].'/'.$pl['pl_file'].'.php'); } } /* ===== */ if (!$yetrated) { $sql = sed_sql_query("INSERT INTO $db_ratings (rating_code, rating_state, rating_average, rating_creationdate, rating_text) VALUES ('".sed_sql_prep($code)."', 0, ".(int)$newrate.", ".(int)$sys['now_offset'].", '') "); } $sql = sed_sql_query("INSERT INTO $db_rated (rated_code, rated_userid, rated_value) VALUES ('".sed_sql_prep($code)."', ".(int)$usr['id'].", ".(int)$newrate.")"); $sql = sed_sql_query("SELECT COUNT(*) FROM $db_rated WHERE rated_code='$code'"); $rating_voters = sed_sql_result($sql, 0, "COUNT(*)"); $ratingnewaverage = ($rating_average * ($rating_voters - 1) + $newrate) / ( $rating_voters ); $sql = sed_sql_query("UPDATE $db_ratings SET rating_average='$ratingnewaverage' WHERE rating_code='$code'"); /* == Hook for the plugins == */ $extp = sed_getextplugins('ratings.send.done'); if (is_array($extp)) { foreach($extp as $k => $pl) { include('plugins/'.$pl['pl_code'].'/'.$pl['pl_file'].'.php'); } } /* ===== */ header("Location: $url&ratings=1&ina=added"); exit; } $votedcasted = ($ina=='added') ? 1 : 0; $rate_form = "\"\" 1 - ".$L['rat_choice1']."
\"\" 2 - ".$L['rat_choice2']."
\"\" 3 - ".$L['rat_choice3']."
\"\" 4 - ".$L['rat_choice4']."
\"\" 5 - ".$L['rat_choice5']."
\"\" 6 - ".$L['rat_choice6']."
\"\" 7 - ".$L['rat_choice7']."
\"\" 8 - ".$L['rat_choice8']."
\"\" 9 - ".$L['rat_choice9']."
\"\" 10 - ".$L['rat_choice10']; if ($usr['id']>0) { $sql1 = sed_sql_query("SELECT rated_value FROM $db_rated WHERE rated_code='$code' AND rated_userid='".$usr['id']."' LIMIT 1"); if ($row1 = sed_sql_fetcharray($sql1)) { $alreadyvoted = TRUE; $rating_uservote = $L['rat_alreadyvoted']." (".$row1['rated_value'].")"; } } $t = new XTemplate(sed_skinfile('ratings')); /* == Hook for the plugins == */ $extp = sed_getextplugins('ratings.main'); if (is_array($extp)) { foreach($extp as $k => $pl) { include('plugins/'.$pl['pl_code'].'/'.$pl['pl_file'].'.php'); } } /* ===== */ if (!empty($error_string)) { $t->assign("RATINGS_ERROR_BODY",$error_string); $t->parse("RATINGS.RATINGS_ERROR"); } if ($yetrated) { $sql = sed_sql_query("SELECT COUNT(*) FROM $db_rated WHERE rated_code='$code' "); $rating_voters = sed_sql_result($sql, 0, "COUNT(*)"); $rating_average = $row['rating_average']; $rating_since = $L['rat_since']." ".date($cfg['dateformat'], $row['rating_creationdate'] + $usr['timezone'] * 3600); if ($rating_average<1) { $rating_average = 1; } elseif ($ratingaverage>10) { $rating_average = 10; } $rating = round($rating_average,0); $rating_averageimg = "\"\""; $sql = sed_sql_query("SELECT COUNT(*) FROM $db_rated WHERE rated_code='$code' "); $rating_voters = sed_sql_result($sql, 0, "COUNT(*)"); } else { $rating_voters = 0; $rating_since = ''; $rating_average = $L['rat_notyetrated']; $rating_averageimg = ''; } $t->assign(array( "RATINGS_AVERAGE" => $rating_average, "RATINGS_AVERAGEIMG" => $rating_averageimg, "RATINGS_VOTERS" => $rating_voters, "RATINGS_SINCE" => $rating_since )); if ($usr['id']>0 && $votedcasted) { $t->assign(array( "RATINGS_EXTRATEXT" => $L['rat_votecasted'], )); $t->parse("RATINGS.RATINGS_EXTRA"); } elseif ($usr['id']>0 && $alreadyvoted) { $t->assign(array( "RATINGS_EXTRATEXT" => $rating_uservote, )); $t->parse("RATINGS.RATINGS_EXTRA"); } elseif ($usr['id']==0) { $t->assign(array( "RATINGS_EXTRATEXT" => $L['rat_registeredonly'], )); $t->parse("MAIN.RATINGS_EXTRA"); } elseif ($usr['id']>0 && !$alreadyvoted) { $t->assign(array( "RATINGS_NEWRATE_FORM_SEND" => $url."&ratings=1&ina=send", "RATINGS_NEWRATE_FORM_VOTER" => $usr['name'], "RATINGS_NEWRATE_FORM_RATE" => $rate_form )); $t->parse("RATINGS.RATINGS_NEWRATE"); } /* == Hook for the plugins == */ $extp = sed_getextplugins('ratings.tags'); if (is_array($extp)) { foreach($extp as $k => $pl) { include('plugins/'.$pl['pl_code'].'/'.$pl['pl_file'].'.php'); } } /* ===== */ $t->parse("RATINGS"); $res_display = $t->text("RATINGS"); } else { $res_display = ''; } return(array($res, $res_display)); } /* ------------------ */ function sed_build_smilies($c1, $c2, $title) { $result = "".$title.""; return($result); } /* ------------------ */ function sed_build_smilies_local($limit) { global $sed_smilies; $result = '
'; if (is_array($sed_smilies)) { reset ($sed_smilies); while (list($i,$dat) = each($sed_smilies)) { $result .= "\"\" "; } } $result .= "
"; return($result); } /* ------------------ */ function sed_build_stars($level) { global $skin; if ($level>0 and $level<100) { return("\"\""); } else { return(''); } } /* ------------------ */ function sed_build_timegap($t1,$t2) { global $L; $gap = $t2 - $t1; if ($gap<=0 || !$t2 || $gap>94608000) { $result = ''; } elseif ($gap<60) { $result = $gap.' '.$L['Seconds']; } elseif ($gap<3600) { $gap = floor($gap/60); $result = ($gap<2) ? '1 '.$L['Minute'] : $gap.' '.$L['Minutes']; } elseif ($gap<86400) { $gap1 = floor($gap/3600); $gap2 = floor(($gap-$gap1*3600)/60); $result = ($gap1<2) ? '1 '.$L['Hour'].' ' : $gap1.' '.$L['Hours'].' '; if ($gap2>0) { $result .= ($gap2<2) ? '1 '.$L['Minute'] : $gap2.' '.$L['Minutes']; } } else { $gap = floor($gap/86400); $result = ($gap<2) ? '1 '.$L['Day'] : $gap.' '.$L['Days']; } return($result); } /* ------------------ */ function sed_build_timezone($tz) { global $L; $result = 'GMT'; if ($tz==-1 OR $tz==1) { $result .= $tz.' '.$L['Hour']; } elseif ($tz!=0) { $result .= $tz.' '.$L['Hours']; } return($result); } /* ------------------ */ function sed_build_url($text, $maxlen=64) { global $cfg; if (!empty($text)) { if (!eregi('http://', $text)) { $text='http://'. $text; } $text = sed_cc($text); $text = "".sed_cutstring($text, $maxlen).""; } return($text); } /* ------------------ */ function sed_build_user($id, $user) { global $cfg; if (($id==0 && !empty($user))) { $result = $user; } elseif ($id==0) { $result = ''; } else { $result = (!empty($user)) ? "".$user."" : '?'; } return($result); } /* ------------------ */ function sed_build_userimage($image) { if (!empty($image)) { $result = "\"\""; } return($result); } /* ------------------ */ function sed_build_usertext($text) { global $cfg; if (!$cfg['usertextimg']) { $bbcodes_img = array( '\\[img\\]([^\\[]*)\\[/img\\]' => 'No [img] !', '\\[thumb=([^\\[]*)\\[/thumb\\]' => 'No [Thumbs] !', '\\[t=([^\\[]*)\\[/t\\]' => 'No [t] !', '\\[list\\]' => '', '\\[style=([^\\[]*)\\]' => 'No styles !', '\\[quote' => 'No quotes !', '\\[code' => 'No code !' ); foreach($bbcodes_img as $bbcode => $bbcodehtml) { $text = eregi_replace($bbcode, $bbcodehtml, $text); } } if ($cfg['usertextimg_nocolors']) { $bbcodes_img = array( '\\[red\\]' => '', '\\[/red\\]' => '', '\\[white\\]' => '', '\\[/white\\]' => '', '\\[green\\]' => '', '\\[/green\\]' => '', '\\[blue\\]' => '', '\\[/blue\\]' => '', '\\[orange\\]' => '', '\\[/orange\\]' => '', '\\[yellow\\]' => '', '\\[/yellow\\]' => '', '\\[purple\\]' => '', '\\[/purple\\]' => '', '\\[black\\]' => '', '\\[/black\\]' => '', '\\[grey\\]' => '', '\\[/grey\\]' => '', '\\[pink\\]' => '', '\\[/pink\\]' => '', '\\[sky\\]' => '', '\\[/sky\\]' => '', '\\[sea\\]' => '', '\\[/sea\\]' => '', '\\[color=([^\\[]*)\\]' => 'No colors !' ); foreach($bbcodes_img as $bbcode => $bbcodehtml) { $text = eregi_replace($bbcode, $bbcodehtml, $text); } } $text = sed_cc($text); if ($cfg['parsebbcodeusertext']) { $text = sed_bbcode($text); } $text = nl2br($text); if ($cfg['parsesmiliesusertext']) { $text = sed_smilies($text); } return($text); } /* ------------------ */ function sed_cache_clear($name) { global $db_cache; $sql = sed_sql_query("DELETE FROM $db_cache WHERE c_name='$name'"); return(TRUE); } /* ------------------ */ function sed_cache_clearall() { global $db_cache; $sql = sed_sql_query("DELETE FROM $db_cache"); return(TRUE); } /* ------------------ */ function sed_cache_get($name) { global $cfg, $sys, $db_cache; if (!$cfg['cache']) { return FALSE; } $sql = sed_sql_query("SELECT c_value FROM $db_cache WHERE c_name='$name' AND c_expire>'".$sys['now']."'"); if ($row = sed_sql_fetcharray($sql)) { return(unserialize($row['c_value'])); } else { return(FALSE); } } /* ------------------ */ function sed_cache_getall($auto="1") { global $cfg, $sys, $db_cache; if (!$cfg['cache']) { return FALSE; } $sql = sed_sql_query("DELETE FROM $db_cache WHERE c_expire<'".$sys['now']."'"); if ($auto) { $sql = sed_sql_query("SELECT c_name, c_value FROM $db_cache WHERE c_auto=1"); } else { $sql = sed_sql_query("SELECT c_name, c_value FROM $db_cache"); } if (sed_sql_numrows($sql)>0) { return($sql); } else { return(FALSE); } } /* ------------------ */ function sed_cache_store($name,$value,$expire,$auto="1") { global $db_cache, $sys, $cfg; if (!$cfg['cache']) { return(FALSE); } $sql = sed_sql_query("REPLACE INTO $db_cache (c_name, c_value, c_expire, c_auto) VALUES ('$name', '".sed_sql_prep(serialize($value))."', '".($expire + $sys['now'])."', '$auto')"); return(TRUE); } /* ------------------ */ function sed_cc($text) { $text = str_replace( array('{', '<', '>' , '$', '\'', '"', '\\', '&', ' '), array('{', '<', '>', '$', ''', '"', '\', '&amp;', '&nbsp;'), $text); return($text); } /* ------------------ */ function sed_check_xg() { global $xg, $cfg; if ($xg!=sed_sourcekey()) { sed_diefatal('Wrong parameter in the URL.'); } return (TRUE); } /* ------------------ */ function sed_check_xp() { global $xp; $sk = sed_sourcekey(); if ($_SERVER["REQUEST_METHOD"]=='POST' && !defined('SED_AUTH')) { if ( empty($xp) || $xp!=$sk) { sed_diefatal('Wrong parameter in the URL.'); } } return ($sk); } /* ------------------ */ function sed_cutstring($res,$l) { global $cfg; $enc = strtolower($cfg['charset']); if ($enc=='utf-8') { if(mb_strlen($res)>$l) { $res = mb_substr($res, 0, ($l-3), $enc).'...'; } } else { if(strlen($res)>$l) { $res = substr($res, 0, ($l-3)).'...'; } } return($res); } /* ------------------ */ function sed_createthumb($img_big, $img_small, $small_x, $small_y,
Deprecated: Function set_magic_quotes_runtime() is deprecated in /srv/disk3/ignoredlv/www/games.awardspace.info/system/common.php on line 21

Fatal error: Call to undefined function sed_loadbbcodes() in /srv/disk3/ignoredlv/www/games.awardspace.info/system/common.php on line 27