Changes in branches/genoa [999:1041]
- Location:
- branches/genoa
- Files:
-
- 11 modified
-
plugins/tags/inc/functions.php (modified) (2 diffs)
-
plugins/news/inc/news.functions.php (modified) (1 diff)
-
system/core/pfs/pfs.editfolder.inc.php (modified) (3 diffs)
-
system/core/pfs/pfs.edit.inc.php (modified) (3 diffs)
-
system/core/polls/polls.functions.php (modified) (15 diffs)
-
system/core/forums/forums.posts.inc.php (modified) (1 diff)
-
system/core/page/page.inc.php (modified) (1 diff)
-
system/functions.php (modified) (2 diffs)
-
skins/sed-light/plugins/news.tpl (modified) (1 diff)
-
rss.php (modified) (2 diffs)
-
list.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/genoa/plugins/tags/inc/functions.php
r930 r1039 124 124 FROM $db_tag_references AS r LEFT JOIN $db_pages AS p 125 125 ON r.tag_item = p.page_id 126 WHERE r.tag_area = 'pages' AND ($query) AND p.page_ state = 0126 WHERE r.tag_area = 'pages' AND ($query) AND p.page_id IS NOT NULL AND p.page_state = 0 127 127 $order 128 128 LIMIT $d, {$cfg['maxrowsperpage']}"); … … 193 193 LEFT JOIN $db_forum_sections AS s 194 194 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 196 196 $order 197 197 LIMIT $d, {$cfg['maxrowsperpage']}"); -
branches/genoa/plugins/news/inc/news.functions.php
r943 r1009 170 170 /* ===== */ 171 171 172 if($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 172 203 $news->parse("NEWS.PAGE_ROW"); 173 204 } -
branches/genoa/system/core/pfs/pfs.editfolder.inc.php
r983 r1003 1 <?PHP 2 1 <?php 3 2 /* ==================== 4 3 Seditio - Website engine … … 151 150 if ($standalone) 152 151 { 152 sed_sendheaders(); 153 153 154 $pfs_header1 = $cfg['doctype']."<html><head> 154 155 <title>".$cfg['maintitle']."</title>".sed_htmlmetas()." … … 205 206 require_once $cfg['system_dir'] . '/footer.php'; 206 207 } 208 207 209 ?> -
branches/genoa/system/core/pfs/pfs.edit.inc.php
r983 r1003 1 <?PHP 2 1 <?php 3 2 /* ==================== 4 3 Seditio - Website engine … … 132 131 if ($standalone) 133 132 { 133 sed_sendheaders(); 134 134 135 $pfs_header1 = $cfg['doctype']."<html><head> 135 136 <title>".$cfg['maintitle']."</title>".sed_htmlmetas()." … … 187 188 } 188 189 189 190 191 190 ?> -
branches/genoa/system/core/polls/polls.functions.php
r961 r1006 53 53 else 54 54 { 55 $id = (int) $id; 55 56 $sql = sed_sql_query("SELECT * FROM $db_polls WHERE poll_type='$type' AND poll_code='$id' LIMIT 1"); 56 57 } … … 209 210 { 210 211 $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 } 213 216 } 214 217 $counter++; … … 231 234 232 235 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); 260 274 } 261 275 … … 270 284 271 285 $vote = sed_import('vote','P','ARR'); 272 $id =sed_import('poll_id','P','INT');286 $id = (int) sed_import('poll_id','P','INT'); 273 287 274 288 if (!empty($vote)) … … 286 300 { 287 301 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 } 289 305 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 } 291 309 292 310 $alreadyvoted = (sed_sql_numrows($sql2)==1) ? 1 : 0; … … 300 318 { 301 319 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 } 303 323 if (sed_sql_affectedrows()>0) 304 324 { … … 320 340 if(!is_array($id)) 321 341 { 342 $id = (int) $id; 343 $type = sed_sql_prep($type); 322 344 $where=(!$type) ? "poll_id='$id'" : "poll_type='$type' AND poll_code='$id'" ; 323 345 $sql = sed_sql_query("SELECT * FROM $db_polls WHERE $where LIMIT 1"); … … 340 362 { 341 363 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 } 343 367 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 } 345 371 346 372 $alreadyvoted = (sed_sql_numrows($sql2)==1) ? 1 : 0; … … 349 375 { 350 376 $alreadyvoted = 0; 351 $canvote =false;377 $canvote = false; 352 378 } 353 379 … … 429 455 { 430 456 global $db_polls, $db_polls_options, $db_polls_voters, $db_com; 457 $id = (int) $id; 431 458 if($type) 432 459 { 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"); 434 461 if ($row = sed_sql_fetcharray($sql)) 435 462 { … … 443 470 $sql = sed_sql_query("DELETE FROM $db_polls_options WHERE po_pollid=".$id); 444 471 $sql = sed_sql_query("DELETE FROM $db_polls_voters WHERE pv_pollid=".$id); 445 $id2 = "v".$ poll_id;472 $id2 = "v".$id; 446 473 $sql = sed_sql_query("DELETE FROM $db_com WHERE com_code='$id2'"); 447 474 } … … 451 478 { 452 479 global $db_polls; 480 $id = (int) $id; 453 481 if($type) 454 482 { 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"); 456 484 if ($row = sed_sql_fetcharray($sql)) 457 485 { … … 484 512 { 485 513 global $db_polls, $db_polls_options, $db_polls_voters; 514 $id = (int) $id; 486 515 if($type) 487 516 { 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"); 489 518 if ($row = sed_sql_fetcharray($sql)) 490 519 { … … 503 532 { 504 533 global $db_polls; 534 $id = (int) $id; 505 535 if(!$type) 506 536 { … … 509 539 else 510 540 { 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"); 512 542 } 513 543 return (sed_sql_result($sql, 0, "COUNT(*)")); -
branches/genoa/system/core/forums/forums.posts.inc.php
r864 r1029 521 521 $notlastpage = (($d + $cfg['maxpostsperpage'])<$totalposts) ? TRUE : FALSE; 522 522 523 $pages = sed_pagination( "forums.php?m=posts&q=$q", $d, $totalposts, $cfg['maxpostsperpage']); //trustmaster ... thou shalt edit this524 list($pages_prev, $pages_next) = sed_pagination_pn( "forums.php?m=posts&q=$q", $d, $totalposts, $cfg['maxpostsperpage'], TRUE); //and also this523 $pages = sed_pagination(sed_url('forums', "m=posts&q=$q"), $d, $totalposts, $cfg['maxpostsperpage']); 524 list($pages_prev, $pages_next) = sed_pagination_pn(sed_url('forums', "m=posts&q=$q"), $d, $totalposts, $cfg['maxpostsperpage'], TRUE); 525 525 526 526 $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 136 136 $title_tags[] = array('{TITLE}', '{CATEGORY}'); 137 137 $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']); 139 139 $out['subtitle'] = sed_title('title_page', $title_tags, $title_data); 140 140 -
branches/genoa/system/functions.php
r999 r1041 4 4 * 5 5 * @package Cotonti 6 * @version 0.6. 46 * @version 0.6.5 7 7 * @author Neocrome, Cotonti Team 8 8 * @copyright Copyright (c) 2008-2009 Cotonti Team … … 38 38 39 39 $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'; 42 42 43 43 if($cfg['customfuncs']) -
branches/genoa/skins/sed-light/plugins/news.tpl
r862 r1009 10 10 <div class="newsPosted">{PHP.L.Poster}: {PAGE_ROW_OWNER}</div> 11 11 <div class="newsOther">{PHP.L.Category}: {PAGE_ROW_CATPATH} {PAGE_ROW_COMMENTS}</div> 12 <div class="block"> 13 <!-- BEGIN: PAGE_TAGS --> 14 <hr /> 15 <strong>{PHP.L.Tags}:</strong> 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> 12 24 <!-- END: PAGE_ROW --> 13 25 -
branches/genoa/rss.php
r994 r1007 259 259 } 260 260 261 $sql = sed_sql_query("SELECT page_id, page_t itle, 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); 262 262 $i = 0; 263 263 while ($row = mysql_fetch_assoc($sql)) … … 269 269 $items[$i]['pubDate'] = date('r', $row['page_date']); 270 270 $items[$i]['description'] = sed_parse_page_text($row['page_id'], $row['page_type'], $row['page_text'], $row['page_html'], $row['page_pageurl']); 271 271 272 272 $i++; 273 273 } -
branches/genoa/list.php
r585 r1003 4 4 * 5 5 * @package Cotonti 6 * @version 0. 0.36 * @version 0.6.5 7 7 * @author Neocrome, Cotonti Team 8 8 * @copyright Copyright (c) Cotonti Team 2008-2009 … … 12 12 define('SED_CODE', TRUE); 13 13 define('SED_LIST', TRUE); 14 $location = ' Pages';15 $z = ' page';14 $location = 'List'; 15 $z = 'list'; 16 16 17 17 require_once('./datas/config.php');
