Staż - 1').'" class="odznaka icon w Y1 state100">
'; if ($ar['Y'] >= 730) $b = '
'; if ($ar['Y'] >= 1825) $b = '
'; $badge .= $b; } //$badge = ''; $main['poem-m-badges'] = $badge; $uAuthor[$main['poem-m-author-hash']] = $main['poem-m-author-hash']; // // Cztery wiersze - boksy $poems_4 = $this->_Sql->select('*','poems','`active` = "1" AND `admin_active` = "1"','RAND() LIMIT 4'); $html = ''; for($c=0;$c<4;$c++) { $p = $poems_4[$c]; if (is_array($p)) { $tpl = $this->_Display->LoadTpl('mainPoemPreview4',true,false); //unset($poems[$p['hash']]); $p['raw'] = $this->_Sql->selectByHash($p['hash']); $p['data'] = $this->_Sql->parseByHash($p['raw']); unset($p['raw']); $tags = ''; $tu = array(); for($a=1;$a<=5;$a++) { if (isset($p['data']['v64']['_poem_tag_'.$a]) && $p['data']['v64']['_poem_tag_'.$a] != '-1') { if (!in_array($p['data']['v64']['_poem_tag_'.$a],$tu)) { $ttmp = explode(':',$this->_xml['tags'][$p['data']['v64']['_poem_tag_'.$a]]); $tags .= '#'.$ttmp[0].' '; $tu[] = $p['data']['v64']['_poem_tag_'.$a]; } } } $p['tags'] = $tags; $tpl = str_replace('[tags]',$p['tags'],$tpl); $tpl = str_replace('[title]',$p['data']['v1024']['_poem_title'],$tpl); $tpl = str_replace('[date]',toTimeSi($p['publish_date'],true),$tpl); $tpl = str_replace('[color-id]',$p['data']['v64']['_poem_color'],$tpl); $tpl = str_replace('[category]', $this->_xml['categories'][$p['data']['v64']['_poem_category']],$tpl); $tpl = str_replace('[hash]',$p['hash'],$tpl); $tpl = str_replace('[author-hash]',$p['client_hash'],$tpl); $tpl = str_replace('[author]',$uNicks[$p['client_hash']],$tpl); $uAuthor[$p['client_hash']] = $p['client_hash']; $tmp = explode("\n",$p['data']['v32768']['_poem_text']); $text = ''; for($a=0;$a<10;$a++) { if (isset($tmp[$a])) $text .= str_replace("\r",'',str_replace("\n",'',$tmp[$a])).'
'; } if (mb_strlen($text) > 150) { $text = ''; for($a=0;$a<9;$a++) { if (isset($tmp[$a])) $text .= str_replace("\r",'',str_replace("\n",'',$tmp[$a])).'
'; if (mb_strlen($text) > 150) { $text = mb_substr($text,0,200,'utf-8'); $a=10; } } $text .= '(...)'; } else { if (count($tmp) > 10) $text .= '(...)'; } // CLEANER $tmp = explode('
',$text); $ntmp = Array(); foreach ($tmp as $x) { if ($x != '' && $x != ' ' && $x != ' ' && $x != ' ') $ntmp[] = $x; } $text = implode('
',$ntmp); $tpl = str_replace('[text]',$text,$tpl); $add = ''; $tmp = explode('-',$p['data']['v64']['_poem_npom_date']); if ($p['data']['v64']['_poem_npom'] == "1" && $tmp[0] == date("Y") and $tmp[1] == date("m")) $add .= ''.$this->_Display->loadModule('widgets','Komunikat - Informacja Pretendent do Wiersza Miesiąca').''; if ($p['data']['v64']['_poem_npom_winner'] != '' && $p['data']['v64']['_poem_npom_winner'] != 0) $add .= 'Wiersz Miesiąca'.$this->_Display->loadModule('widgets','Komunikat - Informacja Zwycięzca Wiersz Miesiąca').''; $tpl = str_replace('[additional]',$add,$tpl); if($c==3 && $this->getAd('29')){ $html .= '
'.$this->getAd('29').'
'; } else { $html .= $tpl; } } } $main['poems-4-box'] = $html; // // Lista zwycięzców Nowego Wiersza Miesiąca $main['poems-npom-winners-hr'] = ''; $main['poems-npom-winners'] = ''; $main['poems-npom-winners-badge'] = ''; $r = $this->_Sql->select('*','var_v64','`name` = "_poem_npom_winner" AND `value` != ""','`value` DESC'); $winners = Array(); $wins = Array(); $newest = 0; foreach ($r as $l) { $m = $this->_Sql->select('*','poems','`hash` = "'.$l['hash'].'" AND `active` = "1" AND `admin_active` = "1"',''); if ($m != false && count($m) == 1) { if ($newest == 0) $newest = $l['value']; if (!isset($winners[$l['value']])) $winners[$l['value']] = Array(); $npoem = Array(); $npoem['main'] = $m; $npoem['winner'] = $l; $v64 = $this->_Sql->select('*','var_v64','`hash` = "'.$l['hash'].'"',''); foreach ($v64 as $v) { if ($v['name'] == "_poem_color") $npoem['data']['color'] = $v['value']; if ($v['name'] == "_poem_category") $npoem['data']['category'] = $v['value']; } $v1024 = $this->_Sql->select('*', 'var_v1024', '`name` = "_poem_title" AND `hash` = "'.$l['hash'].'"'); $npoem['data']['title'] = $v1024[0]['value']; $v32768 = $this->_Sql->select('*', 'var_v32768', '`name` = "_poem_text" AND `hash` = "'.$l['hash'].'"'); $npoem['data']['text'] = $v32768[0]['value']; $wins[$l['value']][] = $npoem; } } if ($newest != 0) { $winners = $wins[$newest]; $html = ''; $html .= '
'; foreach ($winners as $i) { $html .= '
'; $html .= '
'; $html .= ''; $html .= '
'.$this->_xml['categories'][$i['data']['category']].' / '.date("Y-m-d",$i['main'][0]['publish_date']).'
'; $html .= '
'.$uNicks[$i['main'][0]['client_hash']].''; $ar = cacheToArray($i['main'][0]['client_hash'].'_badges'); if ($ar['wx'] > 0) $html .= '
   (Wx'.$ar['wx'].')
'; $html .= '
'; $html .= '
'; $html .= '
'; } $html .= '
'; $main['poems-npom-winners-hr'] = '
'; $main['poems-npom-winners'] = $html; if (count($winners) == 1) { $main['poems-npom-winners-badge'] = '
'; } else { $main['poems-npom-winners-badge'] = '
'; } } // Lista wierszy w miesiącu i reszty $html = ''; $poems = $this->_Sql->select('*','poems','`active` = "1" AND `admin_active` = "1"','`publish_date` DESC LIMIT 8'); //$html .= '
'; for ($c=0;$c<1;$c++) { $list = ''; for ($b=0;$b<8;$b++) { $is_nop = false; $is_win = false; $is_dbt = false; $p = array_shift($poems); if (is_array($p)) { unset($poems[$p['hash']]); $p['raw'] = $this->_Sql->selectByHash($p['hash']); $p['data'] = $this->_Sql->parseByHash($p['raw']); unset($p['raw']); $tmp = explode('-',$p['data']['v64']['_poem_npom_date']); if ($p['data']['v64']['_poem_npom'] == "1") if (count($tmp) > 2) if ($tmp[0] == date("Y") && $tmp[1] == date("m")) $is_nop = true; if ($p['data']['v64']['_poem_npom_winner'] != '' && $p['data']['v64']['_poem_npom_winner'] != 0) $is_win = true; if ($p['data']['v64']['_poem_debut'] == 1) $is_dbt = true; $list .= '
'; $list .= '
'; $list .= '
'; $list .= '
'.$p['data']['v1024']['_poem_title'].'
'; $list .= '
'; $list .= '
'; $list .= '
'.$this->_xml['categories'][$p['data']['v64']['_poem_category']].'
'. toTimeSi($p['publish_date'],true).'
'; $list .= '
'; $list .= ''; $list .= '
'; if ($is_dbt) $list .= '
Debiut
'; if ($is_nop) $list .= '
'.$this->_Display->loadModule('widgets','Komunikat - Informacja Pretendent do Wiersza Miesiąca').'
'; if ($is_win) $list .= '
Wiersz Miesiąca'.$this->_Display->loadModule('widgets','Komunikat - Informacja Zwycięzca Wiersz Miesiąca').'
'; $list .= '
'; $list .= '
'; $uAuthor[$p['client_hash']] = $p['client_hash']; $list .= '
'; } } //$html .= '
'.$list.'
'; $html .= $list; } //$html .= '
'; $main['poems-list-box'] = $html; // // Lista pretendentów do Nowego Wiersza Miesiąca $html = ''; $pret = Array(); $py = date("Y"); $pm = date("m"); //$pm--; $day = date("d"); $co = 0; if ($day >= 1 && $day < $_npom_results) { $co = 0; } else { $r = $this->_Sql->selectRaw('SELECT * FROM `'._SQL_PRE.'poems`,`'._SQL_PRE.'var_v64` WHERE `'._SQL_PRE.'poems`.`active` = "1" AND `'._SQL_PRE.'poems`.`admin_active` = "1" AND (`'._SQL_PRE.'poems`.`hash` = `'._SQL_PRE.'var_v64`.`hash` AND `'._SQL_PRE.'var_v64`.`name` = "_poem_npom_fdate" AND `'._SQL_PRE.'var_v64`.`value` != "") ORDER BY `'._SQL_PRE.'var_v64`.`value` DESC LIMIT 20;'); $list = ''; foreach ($r as $l) { if ($co < 5) { $p = $l; $p['raw'] = $this->_Sql->selectByHash($p['hash']); $p['data'] = $this->_Sql->parseByHash($p['raw']); unset($p['raw']); $tmp = explode('-',$p['data']['v64']['_poem_npom_date']); $spm = $pm; if ($spm < 10) $spm = '0'.$spm; if ($tmp[0] == $py and $tmp[1] == $spm) { $list .= '
'; $list .= '
'; $list .= '
'; $list .= '
'.$p['data']['v1024']['_poem_title'].'
'; $list .= '
'; $list .= '
'; $list .= '
'.$this->_xml['categories'][$p['data']['v64']['_poem_category']].'
'. toTimeSi($p['publish_date'],true).'
'; $list .= '
'; $list .= ''; $list .= '
'; $uAuthor[$p['client_hash']] = $p['client_hash']; $list .= '
'; $co++; } } } } if ($co > 0) { $html = '

Nowi Pretendenci do Wiersza Miesiąca

'.$list.'więcej'; } else { $this->_Display->_fields[3]=8; $html = $this->_Display->loadModule('pages', 'getad'); } $main['poems-npom-pretenders'] = $html; // // Lista autorów w miesiącu $html = ''; $cache_a = cacheToArray('author_m'); if ($cache_a && $cache_a['cache-time'] > (date("U")-300)) { $html = $cache_a['html']; } else { foreach($poems as $p) { $uAuthor[$p['client_hash']] = $p['client_hash']; } shuffle($uAuthor); /* $ulist = Array(); $pu = $this->_Sql->select('`client_hash`','poems','`active` = "1" AND `admin_active` = "1"','RAND() LIMIT 20;'); foreach ($pu as $p) { $ulist[$p['client_hash']] = 1; } $cu = $this->_Sql->select('`client_hash`','comments','`state` = "1"','RAND() LIMIT 20;'); foreach ($cu as $p) { $ulist[$p['client_hash']] = 1; } $uListGo = Array(); foreach ($ulist as $p=>$pv) { if (isset($uNicks[$p])) $uListGo[] = $p; } shuffle($uListGo); */ for($a=0;$a<6;$a++) { $p = array_shift($uAuthor); if ($p != NULL) { $html .= '
'; $html .= '
'; $html .= ''; if (file_exists(_FILES.'/icons/hd/'.$p.'.jpg')) { $html .= '
'.$uNicks[$p].'
'; } else { $html .= '
'.$uNicks[$p].'
'; } $html .= '
'; $html .= '
'; $html .= ''.$uNicks[$p].''; $html .= '
'; $html .= '
'; $html .= '
'; $ar = cacheToArray($p.'_badges'); $badge = ''; if ($ar != false) { $b = ''; if ($ar['BETA'] == 1) $b = '
'; $badge .= $b; $b = ''; if ($ar['GOOD'] == 1) $b = '
'; $badge .= $b; $b = ''; if ($ar['HELP'] == 1) $b = '
'; $badge .= $b; $b = ''; if ($ar['HONOR'] == 1) $b = '
'; $badge .= $b; $b = ''; if ($ar['M'] >= 1) $b = '
'; if ($ar['M'] >= 2) $b = '
'; if ($ar['M'] >= 5) $b = '
'; if ($ar['M'] >= 10) $b = '
'; $badge .= $b; $b = ''; if ($ar['P'] >= 10) $b = '
'; if ($ar['P'] >= 50) $b = '
'; if ($ar['P'] >= 100) $b = '
'; if ($ar['P'] >= 500) $b = '
'; $badge .= $b; $b = ''; if ($ar['CG'] >= 100) $b = '
'; if ($ar['CG'] >= 500) $b = '
'; if ($ar['CG'] >= 1000) $b = '
'; if ($ar['CG'] >= 5000) $b = '
'; $badge .= $b; $b = ''; if ($ar['CP'] >= 100) $b = '
'; if ($ar['CP'] >= 500) $b = '
'; if ($ar['CP'] >= 1000) $b = '
'; if ($ar['CP'] >= 5000) $b = '
'; $badge .= $b; $b = ''; if ($ar['CAG'] >= 100) $b = '
'; if ($ar['CAG'] >= 500) $b = '
'; if ($ar['CAG'] >= 1000) $b = '
'; if ($ar['CAG'] >= 5000) $b = '
'; $badge .= $b; $b = ''; if ($ar['CAP'] >= 100) $b = '
'; if ($ar['CAP'] >= 500) $b = '
Fatal error: Uncaught Error: Class 'mainModule' not found in /home/twiersze/domains/twojewiersze.pl/public_html/viewer/_classes/display.class.php:320 Stack trace: #0 /home/twiersze/domains/twojewiersze.pl/public_html/viewer/_classes/display.class.php(881): Display->loadModule() #1 /home/twiersze/domains/twojewiersze.pl/public_html/viewer/_classes/display.class.php(284): Display->parseTpl() #2 /home/twiersze/domains/twojewiersze.pl/public_html/viewer/_classes/viewer.class.php(337): Display->loadTpl() #3 /home/twiersze/domains/twojewiersze.pl/public_html/viewer/_classes/viewer.class.php(49): Viewer->doWork() #4 /home/twiersze/domains/twojewiersze.pl/public_html/viewer/viewer.php(27): Viewer->init() #5 /home/twiersze/domains/twojewiersze.pl/public_html/index.php(90): require_once('/home/twiersze/...') #6 {main} thrown in /home/twiersze/domains/twojewiersze.pl/public_html/viewer/_classes/display.class.php on line 320