Show
Ignore:
Location:
branches/genoa
Files:
11 modified

Legend:

Unmodified
Added
Removed
  • branches/genoa/plugins/tags/inc/functions.php

    r930 r1039  
    124124                FROM $db_tag_references AS r LEFT JOIN $db_pages AS p 
    125125                        ON r.tag_item = p.page_id 
    126                 WHERE r.tag_area = 'pages' AND ($query) AND p.page_state = 0 
     126                WHERE r.tag_area = 'pages' AND ($query) AND p.page_id IS NOT NULL AND p.page_state = 0 
    127127                $order 
    128128                LIMIT $d, {$cfg['maxrowsperpage']}"); 
     
    193193                LEFT JOIN $db_forum_sections AS s 
    194194                        ON t.ft_sectionid = s.fs_id 
    195                 WHERE r.tag_area = 'forums' AND ($query) 
     195                WHERE r.tag_area = 'forums' AND ($query) AND t.ft_id IS NOT NULL 
    196196                $order 
    197197                LIMIT $d, {$cfg['maxrowsperpage']}"); 
  • branches/genoa/plugins/news/inc/news.functions.php

    r943 r1009  
    170170        /* ===== */ 
    171171 
     172if($cfg['plugin']['tags']['pages']) 
     173{ 
     174    require_once(sed_langfile('tags')); 
     175    $item_id = $pag['page_id']; 
     176    $tags = sed_tag_list($item_id); 
     177    if(count($tags) > 0) 
     178    { 
     179        $tag_ii = 0; 
     180        foreach($tags as $tag) 
     181        { 
     182            $tag_u = sed_urlencode($tag, $cfg['plugin']['tags']['translit']); 
     183            $tl = $lang != 'en' && $tag_u != urlencode($tag) ? '&tl=1' : ''; 
     184            $news->assign(array( 
     185            'PAGE_TAGS_ROW_TAG' => $cfg['plugin']['tags']['title'] ? htmlspecialchars(sed_tag_title($tag)) : htmlspecialchars($tag), 
     186            'PAGE_TAGS_ROW_TAG_COUNT' => $tag_ii, 
     187            'PAGE_TAGS_ROW_URL' => sed_url('plug', 'e=tags&a=pages&t='.$tag_u.$tl) 
     188            )); 
     189            $news->parse('NEWS.PAGE_ROW.PAGE_TAGS.PAGE_TAGS_ROW'); 
     190            $tag_ii++; 
     191        } 
     192        $news->parse('NEWS.PAGE_ROW.PAGE_TAGS'); 
     193    } 
     194    else 
     195    { 
     196        $news->assign(array( 
     197            'PAGE_NO_TAGS' => $L['tags_Tag_cloud_none'], 
     198                )); 
     199        $news->parse('NEWS.PAGE_ROW.PAGE_NO_TAGS'); 
     200    } 
     201} 
     202 
    172203        $news->parse("NEWS.PAGE_ROW"); 
    173204    } 
  • branches/genoa/system/core/pfs/pfs.editfolder.inc.php

    r983 r1003  
    1 <?PHP 
    2  
     1<?php 
    32/* ==================== 
    43Seditio - Website engine 
     
    151150if ($standalone) 
    152151{ 
     152        sed_sendheaders(); 
     153 
    153154        $pfs_header1 = $cfg['doctype']."<html><head> 
    154155<title>".$cfg['maintitle']."</title>".sed_htmlmetas()." 
     
    205206        require_once $cfg['system_dir'] . '/footer.php'; 
    206207} 
     208 
    207209?> 
  • branches/genoa/system/core/pfs/pfs.edit.inc.php

    r983 r1003  
    1 <?PHP 
    2  
     1<?php 
    32/* ==================== 
    43Seditio - Website engine 
     
    132131if ($standalone) 
    133132{ 
     133        sed_sendheaders(); 
     134 
    134135        $pfs_header1 = $cfg['doctype']."<html><head> 
    135136<title>".$cfg['maintitle']."</title>".sed_htmlmetas()." 
     
    187188} 
    188189 
    189  
    190  
    191190?> 
  • branches/genoa/system/core/polls/polls.functions.php

    r961 r1006  
    5353        else 
    5454        { 
     55                        $id = (int) $id; 
    5556            $sql = sed_sql_query("SELECT * FROM $db_polls WHERE poll_type='$type' AND poll_code='$id' LIMIT 1"); 
    5657        } 
     
    209210                { 
    210211                    $poll_option_text[$j]=trim($poll_option_text[$j]); 
    211                     if($poll_option_text[$i] == $poll_option_text[$j] && ($poll_option_id[$j]=='new' || $cfg['del_dup_options']) ){ 
    212                         $poll_option_text[$j]=""; } 
     212                    if($poll_option_text[$i] == $poll_option_text[$j] && ($poll_option_id[$j]=='new' || $cfg['del_dup_options']) ) 
     213                                        { 
     214                        $poll_option_text[$j]=""; 
     215                                        } 
    213216                } 
    214217                $counter++; 
     
    231234 
    232235    if (!empty($poll_id) && empty($error_string)) 
    233     { 
    234         $option_count = (count($poll_option_id) ? count($poll_option_id) : 0); 
    235         if ($poll_id=='new') { 
    236             $sql = sed_sql_query("INSERT INTO $db_polls (poll_type, poll_state, poll_creationdate, poll_text, poll_multiple, poll_code) VALUES ('".sed_sql_prep($type)."', ".(int)$poll_state.", ".(int)$sys['now_offset'].", '".sed_sql_prep($poll_text)."', '".(int)$poll_multiple."', '".(int)$code."')"); 
    237             $newpoll_id = sed_sql_insertid(); } 
    238         else { 
    239             // TODO: CHECK if changed 
    240             $sql = sed_sql_query("UPDATE $db_polls SET  poll_state='".(int)$poll_state."', poll_text='".sed_sql_prep($poll_text)."', poll_multiple='".(int)$poll_multiple."' WHERE poll_id='$poll_id'"); 
    241             $newpoll_id = $poll_id; } 
    242         // Dinamic adding polloptions 
    243         for($count = 0; $count < $option_count; $count++) { 
    244             if ($poll_option_id[($count)]!="new") 
    245             { 
    246                 if ($poll_option_text[($count)]=="")// drop 
    247                 { $sql2 = sed_sql_query("DELETE FROM $db_polls_options WHERE po_id='".(int)$poll_option_id[($count)]."'"); } 
    248                 else // edit 
    249                 { $sql2 = sed_sql_query("UPDATE $db_polls_options SET po_text='".sed_sql_prep($poll_option_text[($count)])."' WHERE po_id='".(int)$poll_option_id[($count)]."'"); } 
    250             } 
    251             else //insert 
    252             { 
    253                 if ($poll_option_text[($count)]!="")// insert not empty 
    254                 { $sql2 = sed_sql_query("INSERT into $db_polls_options ( po_pollid, po_text, po_count) VALUES ('$newpoll_id', '".sed_sql_prep($poll_option_text[($count)])."', '0')"); } 
    255             } 
    256         } 
    257         return($newpoll_id); 
    258     } 
    259     return(false); 
     236        { 
     237                $option_count = (count($poll_option_id) ? count($poll_option_id) : 0); 
     238                if ($poll_id=='new') 
     239                { 
     240                        $sql = sed_sql_query("INSERT INTO $db_polls (poll_type, poll_state, poll_creationdate, poll_text, poll_multiple, poll_code) VALUES ('".sed_sql_prep($type)."', ".(int)$poll_state.", ".(int)$sys['now_offset'].", '".sed_sql_prep($poll_text)."', '".(int)$poll_multiple."', '".(int)$code."')"); 
     241                        $newpoll_id = sed_sql_insertid(); } 
     242                else 
     243                { 
     244                        // TODO: CHECK if changed 
     245                        $poll_id = (int) $poll_id; 
     246                        $sql = sed_sql_query("UPDATE $db_polls SET  poll_state='".(int)$poll_state."', poll_text='".sed_sql_prep($poll_text)."', poll_multiple='".(int)$poll_multiple."' WHERE poll_id='$poll_id'"); 
     247                        $newpoll_id = $poll_id; 
     248                } 
     249                // Dinamic adding polloptions 
     250                for($count = 0; $count < $option_count; $count++) 
     251                { 
     252                        if ($poll_option_id[($count)]!="new") 
     253                        { 
     254                                if ($poll_option_text[($count)]=="")// drop 
     255                                { 
     256                                        $sql2 = sed_sql_query("DELETE FROM $db_polls_options WHERE po_id='".(int)$poll_option_id[($count)]."'"); 
     257                                } 
     258                                else // edit 
     259                                { 
     260                                        $sql2 = sed_sql_query("UPDATE $db_polls_options SET po_text='".sed_sql_prep($poll_option_text[($count)])."' WHERE po_id='".(int)$poll_option_id[($count)]."'"); 
     261                                } 
     262                        } 
     263                        else //insert 
     264                        { 
     265                                if ($poll_option_text[($count)]!="")// insert not empty 
     266                                { 
     267                                        $sql2 = sed_sql_query("INSERT into $db_polls_options ( po_pollid, po_text, po_count) VALUES ('$newpoll_id', '".sed_sql_prep($poll_option_text[($count)])."', '0')"); 
     268                                } 
     269                        } 
     270                } 
     271                return($newpoll_id); 
     272        } 
     273        return(false); 
    260274} 
    261275 
     
    270284 
    271285    $vote = sed_import('vote','P','ARR'); 
    272     $id= sed_import('poll_id','P','INT'); 
     286    $id = (int) sed_import('poll_id','P','INT'); 
    273287 
    274288    if (!empty($vote)) 
     
    286300            { 
    287301                if ($usr['id']>0) 
    288                 {$sql2 = sed_sql_query("SELECT pv_id FROM $db_polls_voters WHERE pv_pollid='$id' AND (pv_userid='".$usr['id']."' OR pv_userip='".$usr['ip']."') LIMIT 1");} 
     302                { 
     303                                        $sql2 = sed_sql_query("SELECT pv_id FROM $db_polls_voters WHERE pv_pollid='$id' AND (pv_userid='".$usr['id']."' OR pv_userip='".$usr['ip']."') LIMIT 1"); 
     304                                } 
    289305                else 
    290                 {$sql2 = sed_sql_query("SELECT pv_id FROM $db_polls_voters WHERE pv_pollid='$id' AND pv_userip='".$usr['ip']."' LIMIT 1");} 
     306                { 
     307                                        $sql2 = sed_sql_query("SELECT pv_id FROM $db_polls_voters WHERE pv_pollid='$id' AND pv_userip='".$usr['ip']."' LIMIT 1"); 
     308                                } 
    291309 
    292310                $alreadyvoted = (sed_sql_numrows($sql2)==1) ? 1 : 0; 
     
    300318            { 
    301319                for($i = 0; $i<count($vote); $i++) 
    302                 {$sql2 = sed_sql_query("UPDATE $db_polls_options SET po_count=po_count+1 WHERE po_pollid='$id' AND po_id='".(int)$vote[$i]."'");} 
     320                { 
     321                                        $sql2 = sed_sql_query("UPDATE $db_polls_options SET po_count=po_count+1 WHERE po_pollid='$id' AND po_id='".(int)$vote[$i]."'"); 
     322                                } 
    303323                if (sed_sql_affectedrows()>0) 
    304324                { 
     
    320340    if(!is_array($id)) 
    321341    { 
     342                $id = (int) $id; 
     343                $type = sed_sql_prep($type); 
    322344        $where=(!$type) ? "poll_id='$id'" : "poll_type='$type' AND poll_code='$id'" ; 
    323345        $sql = sed_sql_query("SELECT * FROM $db_polls WHERE $where LIMIT 1"); 
     
    340362    { 
    341363        if ($usr['id']>0) 
    342         {$sql2 = sed_sql_query("SELECT pv_id FROM $db_polls_voters WHERE pv_pollid='$id' AND (pv_userid='".$usr['id']."' OR pv_userip='".$usr['ip']."') LIMIT 1");} 
     364        { 
     365                        $sql2 = sed_sql_query("SELECT pv_id FROM $db_polls_voters WHERE pv_pollid='$id' AND (pv_userid='".$usr['id']."' OR pv_userip='".$usr['ip']."') LIMIT 1"); 
     366                } 
    343367        else 
    344         {$sql2 = sed_sql_query("SELECT pv_id FROM $db_polls_voters WHERE pv_pollid='$id' AND pv_userip='".$usr['ip']."' LIMIT 1");} 
     368        { 
     369                        $sql2 = sed_sql_query("SELECT pv_id FROM $db_polls_voters WHERE pv_pollid='$id' AND pv_userip='".$usr['ip']."' LIMIT 1"); 
     370                } 
    345371 
    346372        $alreadyvoted = (sed_sql_numrows($sql2)==1) ? 1 : 0; 
     
    349375    { 
    350376        $alreadyvoted = 0; 
    351         $canvote        =false; 
     377        $canvote = false; 
    352378    } 
    353379 
     
    429455{ 
    430456    global $db_polls, $db_polls_options, $db_polls_voters, $db_com; 
     457        $id = (int) $id; 
    431458    if($type) 
    432459    { 
    433         $sql = sed_sql_query("SELECT poll_id FROM $db_polls WHERE poll_type='$type' AND poll_code='$id' LIMIT 1"); 
     460        $sql = sed_sql_query("SELECT poll_id FROM $db_polls WHERE poll_type='".sed_sql_prep($type)."' AND poll_code='$id' LIMIT 1"); 
    434461        if ($row = sed_sql_fetcharray($sql)) 
    435462        { 
     
    443470        $sql = sed_sql_query("DELETE FROM $db_polls_options WHERE po_pollid=".$id); 
    444471        $sql = sed_sql_query("DELETE FROM $db_polls_voters WHERE pv_pollid=".$id); 
    445         $id2 = "v".$poll_id; 
     472        $id2 = "v".$id; 
    446473        $sql = sed_sql_query("DELETE FROM $db_com WHERE com_code='$id2'"); 
    447474    } 
     
    451478{ 
    452479    global $db_polls; 
     480        $id = (int) $id; 
    453481    if($type) 
    454482    { 
    455         $sql = sed_sql_query("SELECT poll_id, poll_state FROM $db_polls WHERE poll_type='$type' AND poll_code='$id' LIMIT 1"); 
     483        $sql = sed_sql_query("SELECT poll_id, poll_state FROM $db_polls WHERE poll_type='".sed_sql_prep($type)."' AND poll_code='$id' LIMIT 1"); 
    456484        if ($row = sed_sql_fetcharray($sql)) 
    457485        { 
     
    484512{ 
    485513    global $db_polls, $db_polls_options, $db_polls_voters; 
     514        $id = (int) $id; 
    486515    if($type) 
    487516    { 
    488         $sql = sed_sql_query("SELECT poll_id FROM $db_polls WHERE poll_type='$type' AND poll_code='$id' LIMIT 1"); 
     517        $sql = sed_sql_query("SELECT poll_id FROM $db_polls WHERE poll_type='".sed_sql_prep($type)."' AND poll_code='$id' LIMIT 1"); 
    489518        if ($row = sed_sql_fetcharray($sql)) 
    490519        { 
     
    503532{ 
    504533    global $db_polls; 
     534        $id = (int) $id; 
    505535    if(!$type) 
    506536    { 
     
    509539    else 
    510540    { 
    511         $sql = sed_sql_query("SELECT COUNT(*)  FROM $db_polls WHERE poll_type='$type' AND poll_code='$id' LIMIT 1"); 
     541        $sql = sed_sql_query("SELECT COUNT(*)  FROM $db_polls WHERE poll_type='".sed_sql_prep($type)."' AND poll_code='$id' LIMIT 1"); 
    512542    } 
    513543    return (sed_sql_result($sql, 0, "COUNT(*)")); 
  • branches/genoa/system/core/forums/forums.posts.inc.php

    r864 r1029  
    521521$notlastpage = (($d + $cfg['maxpostsperpage'])<$totalposts) ? TRUE : FALSE; 
    522522 
    523 $pages = sed_pagination("forums.php?m=posts&amp;q=$q", $d, $totalposts, $cfg['maxpostsperpage']); //trustmaster ... thou shalt edit this 
    524 list($pages_prev, $pages_next) = sed_pagination_pn("forums.php?m=posts&amp;q=$q", $d, $totalposts, $cfg['maxpostsperpage'], TRUE); //and also this 
     523$pages = sed_pagination(sed_url('forums', "m=posts&q=$q"), $d, $totalposts, $cfg['maxpostsperpage']); 
     524list($pages_prev, $pages_next) = sed_pagination_pn(sed_url('forums', "m=posts&q=$q"), $d, $totalposts, $cfg['maxpostsperpage'], TRUE); 
    525525 
    526526$sql1 = sed_sql_query("SELECT s.fs_id, s.fs_title, s.fs_category, s.fs_masterid, s.fs_mastername, s.fs_allowpolls FROM $db_forum_sections AS s LEFT JOIN 
  • branches/genoa/system/core/page/page.inc.php

    r996 r1027  
    136136$title_tags[] = array('{TITLE}', '{CATEGORY}'); 
    137137$title_tags[] = array('%1$s', '%2$s'); 
    138 $title_data = array($pag['page_title'], $sed_cat[$c]['title']); 
     138$title_data = array($pag['page_title'], $sed_cat[$pag['page_cat']]['title']); 
    139139$out['subtitle'] = sed_title('title_page', $title_tags, $title_data); 
    140140 
  • branches/genoa/system/functions.php

    r999 r1041  
    44 * 
    55 * @package Cotonti 
    6  * @version 0.6.4 
     6 * @version 0.6.5 
    77 * @author Neocrome, Cotonti Team 
    88 * @copyright Copyright (c) 2008-2009 Cotonti Team 
     
    3838 
    3939$cfg['svnrevision'] = '$Rev$'; //DO NOT MODIFY this is set by SVN automatically 
    40 $cfg['version'] = '0.6.4'; 
    41 $cfg['dbversion'] = '0.6.4'; 
     40$cfg['version'] = '0.6.5'; 
     41$cfg['dbversion'] = '0.6.5'; 
    4242 
    4343if($cfg['customfuncs']) 
  • branches/genoa/skins/sed-light/plugins/news.tpl

    r862 r1009  
    1010    <div class="newsPosted">{PHP.L.Poster}: {PAGE_ROW_OWNER}</div> 
    1111    <div class="newsOther">{PHP.L.Category}: {PAGE_ROW_CATPATH} &nbsp;&nbsp; {PAGE_ROW_COMMENTS}</div> 
     12        <div class="block"> 
     13                <!-- BEGIN: PAGE_TAGS --> 
     14                <hr /> 
     15                <strong>{PHP.L.Tags}:</strong>&nbsp; 
     16                <!-- BEGIN: PAGE_TAGS_ROW --> 
     17                        <!-- IF {PAGE_TAGS_ROW_TAG_COUNT} > 0 -->, <!-- ENDIF --><a href="{PAGE_TAGS_ROW_URL}" title="{PAGE_TAGS_ROW_TAG}">{PAGE_TAGS_ROW_TAG}</a> 
     18                <!-- END: PAGE_TAGS_ROW --> 
     19                <!-- END: PAGE_TAGS --> 
     20                <!-- BEGIN: PAGE_NO_TAGS --> 
     21                        {PAGE_NO_TAGS} 
     22                <!-- END: PAGE_NO_TAGS --> 
     23        </div> 
    1224    <!-- END: PAGE_ROW --> 
    1325 
  • branches/genoa/rss.php

    r994 r1007  
    259259        } 
    260260 
    261         $sql = sed_sql_query("SELECT page_id, page_title, page_text, page_cat, page_date FROM $db_pages WHERE page_state=0 AND page_cat NOT LIKE 'system' AND page_cat IN ('".implode("','", $catsub)."') ORDER by page_date DESC LIMIT ".$cfg_maxitems); 
     261        $sql = sed_sql_query("SELECT page_id, page_type, page_title, page_text, page_cat, page_date FROM $db_pages WHERE page_state=0 AND page_cat NOT LIKE 'system' AND page_cat IN ('".implode("','", $catsub)."') ORDER by page_date DESC LIMIT ".$cfg_maxitems); 
    262262        $i = 0; 
    263263        while ($row = mysql_fetch_assoc($sql)) 
     
    269269                $items[$i]['pubDate'] = date('r', $row['page_date']); 
    270270                $items[$i]['description'] = sed_parse_page_text($row['page_id'], $row['page_type'], $row['page_text'], $row['page_html'], $row['page_pageurl']); 
    271  
     271         
    272272                $i++; 
    273273        } 
  • branches/genoa/list.php

    r585 r1003  
    44 * 
    55 * @package Cotonti 
    6  * @version 0.0.3 
     6 * @version 0.6.5 
    77 * @author Neocrome, Cotonti Team 
    88 * @copyright Copyright (c) Cotonti Team 2008-2009 
     
    1212define('SED_CODE', TRUE); 
    1313define('SED_LIST', TRUE); 
    14 $location = 'Pages'; 
    15 $z = 'page'; 
     14$location = 'List'; 
     15$z = 'list'; 
    1616 
    1717require_once('./datas/config.php');