|
205 | 205 | case 'castlist': |
206 | 206 | $sql="SELECT fullname, birthyear FROM $DVD_COMMON_ACTOR_TABLE WHERE lastname like '" . $db->sql_escape($_GET['alpha']) . "%' OR (lastname='' AND firstname like '" . $db->sql_escape($_GET['alpha']) . "%') " . $AdultFilter . " ORDER BY fullname"; |
207 | 207 | $result=$db->sql_query($sql); |
208 | | - echo "<description>Cast List - " . $_GET['alpha'] . "</description>"; |
| 208 | + echo "<description>Cast List - " . htmlentities($_GET['alpha']) . "</description>"; |
209 | 209 | while ($tmp = $db->sql_fetch_array($result)) { |
210 | 210 | $by=""; |
211 | 211 | if ($tmp['birthyear'] != 0) $by=" (" . $tmp['birthyear'] . ")"; |
|
233 | 233 | case 'crewlist': |
234 | 234 | $sql="SELECT fullname, birthyear FROM $DVD_COMMON_CREDITS_TABLE WHERE lastname like '" . $db->sql_escape($_GET['alpha']) . "%' OR (lastname='' AND firstname like '" . $db->sql_escape($_GET['alpha']) . "%') " . $AdultFilter . " ORDER BY fullname"; |
235 | 235 | $result=$db->sql_query($sql); |
236 | | - echo "<description>Crew List - " . $_GET['alpha'] . "</description>"; |
| 236 | + echo "<description>Crew List - " . htmlentities($_GET['alpha']) . "</description>"; |
237 | 237 | while ($tmp = $db->sql_fetch_array($result)) { |
238 | 238 | $by=""; |
239 | 239 | if ($tmp['birthyear'] != 0) $by=" (" . $tmp['birthyear'] . ")"; |
|
485 | 485 | } |
486 | 486 |
|
487 | 487 |
|
488 | | -if ($rss_report_leafs) |
| 488 | +if ($rss_report_leafs) { |
489 | 489 | $rss_report_condition = "boxchild = 0"; |
490 | | -else |
| 490 | +} else { |
491 | 491 | $rss_report_condition = "boxparent = ''"; |
492 | | - |
493 | | - |
| 492 | +} |
494 | 493 |
|
495 | 494 | $alphasql=""; |
496 | 495 | $alpha=""; |
497 | 496 | if (isset($_GET['asql'])) $alpha=$_GET['asql']; |
498 | 497 | if ($alpha != "") { |
499 | | - $alphasql="(sorttitle LIKE '" . substr($alpha,0,1) . "%'"; |
| 498 | + $alphasql="(sorttitle LIKE '" . $db->sql_escape(substr($alpha,0,1)) . "%'"; |
500 | 499 | for ($loop=1; $loop < strlen($alpha); $loop += 1) { |
501 | | - $alphasql.= " OR sorttitle LIKE '" . substr($alpha,$loop,1) . "%'"; |
| 500 | + $alphasql.= " OR sorttitle LIKE '" . $db->sql_escape(substr($alpha,$loop,1)) . "%'"; |
502 | 501 | } |
503 | 502 | $alphasql.=")"; |
504 | 503 | } |
|
534 | 533 | break; |
535 | 534 |
|
536 | 535 | case 'rating': |
537 | | - $rss_feeddescription = "DVDs filtered by Rating: ". $_GET['rating']; |
538 | | - $sql = "SELECT $fieldlist FROM $DVD_TABLE dvd WHERE $RemoveNoRSSTagged rating='$_GET[rating]' $AdultFilter AND collectiontype='owned' ORDER BY sorttitle"; |
| 536 | + $rss_feeddescription = "DVDs filtered by Rating: ". htmlentities($_GET['rating']); |
| 537 | + $sql = "SELECT $fieldlist FROM $DVD_TABLE dvd WHERE $RemoveNoRSSTagged rating='" . $db->sql_escape($_GET['rating']) . "' $AdultFilter AND collectiontype='owned' ORDER BY sorttitle"; |
539 | 538 | break; |
540 | 539 |
|
541 | 540 | case 'genre': |
542 | | - $rss_feeddescription = "DVDs filtered by Genre: ". $_GET['genre']; |
543 | | - $sql = "SELECT $fieldlist FROM $DVD_TABLE dvd JOIN $DVD_GENRE_TABLE gen ON dvd.id=gen.id WHERE $RemoveNoRSSTagged genre='$_GET[genre]' $AdultFilter AND collectiontype='owned' ORDER BY sorttitle"; |
| 541 | + $rss_feeddescription = "DVDs filtered by Genre: ". htmlentities($_GET['genre']); |
| 542 | + $sql = "SELECT $fieldlist FROM $DVD_TABLE dvd JOIN $DVD_GENRE_TABLE gen ON dvd.id=gen.id WHERE $RemoveNoRSSTagged genre='" . $db->sql_escape($_GET['genre']) . "' $AdultFilter AND collectiontype='owned' ORDER BY sorttitle"; |
544 | 543 | break; |
545 | 544 |
|
546 | 545 | case 'cast': |
|
550 | 549 | ."( " |
551 | 550 | ."SELECT count(*) FROM $DVD_ACTOR_TABLE a1, $DVD_COMMON_ACTOR_TABLE a2 " |
552 | 551 | ."WHERE id=dvd.id " |
553 | | - ." AND a2.caid=" . $_GET['caid'] . "" |
| 552 | + ." AND a2.caid=" . $db->sql_escape($_GET['caid']) . "" |
554 | 553 | ." AND a2.caid=a1.caid " |
555 | 554 | .") > 0 " |
556 | 555 | ."ORDER BY sorttitle"; |
|
564 | 563 | ."SELECT count(*) " |
565 | 564 | ."FROM $DVD_CREDITS_TABLE a1, $DVD_COMMON_CREDITS_TABLE a2 " |
566 | 565 | ."WHERE id=dvd.id " |
567 | | - ." AND a2.caid=" . $_GET['caid'] . "" |
| 566 | + ." AND a2.caid=" . $db->sql_escape($_GET['caid']) . "" |
568 | 567 | ." AND a2.caid=a1.caid " |
569 | 568 | .") > 0 " |
570 | 569 | ."ORDER BY sorttitle"; |
571 | 570 | break; |
572 | 571 |
|
573 | 572 | case 'feature': |
574 | | - $rss_feeddescription = "DVDs filtered by Feature: ". $_GET['feature']; |
575 | | - $sql = "SELECT $fieldlist FROM $DVD_TABLE dvd WHERE $RemoveNoRSSTagged collectiontype='owned' $AdultFilter AND feature$_GET[feature]=1 ORDER BY sorttitle"; |
| 573 | + $rss_feeddescription = "DVDs filtered by Feature: ". htmlentities($_GET['feature']); |
| 574 | + $sql = "SELECT $fieldlist FROM $DVD_TABLE dvd WHERE $RemoveNoRSSTagged collectiontype='owned' $AdultFilter AND feature" . $db->sql_escape($_GET['feature']). "=1 ORDER BY sorttitle"; |
576 | 575 | break; |
577 | 576 |
|
578 | 577 | case 'audiocontent': |
579 | | - $rss_feeddescription = "DVDs filtered by Audio Content: ". $_GET['audiocontent']; |
| 578 | + $rss_feeddescription = "DVDs filtered by Audio Content: ". htmlentities($_GET['audiocontent']); |
580 | 579 | $sql = "SELECT DISTINCT $fieldlist FROM $DVD_TABLE dvd LEFT JOIN $DVD_AUDIO_TABLE audio ON dvd.id=audio.id WHERE $RemoveNoRSSTagged " |
581 | | - ."audio.audiocontent='$_GET[audiocontent]' $AdultFilter AND collectiontype='owned' ORDER BY sorttitle"; |
| 580 | + ."audio.audiocontent='" . $db->sql_escape($_GET['audiocontent']) . "' $AdultFilter AND collectiontype='owned' ORDER BY sorttitle"; |
582 | 581 | break; |
583 | 582 |
|
584 | 583 | case 'audioformat': |
585 | | - $rss_feeddescription = "DVDs filtered by Audio Format: ". $_GET['audioformat']; |
| 584 | + $rss_feeddescription = "DVDs filtered by Audio Format: ". htmlentities($_GET['audioformat']); |
586 | 585 | $sql = "SELECT DISTINCT $fieldlist FROM $DVD_TABLE dvd LEFT JOIN $DVD_AUDIO_TABLE audio ON dvd.id=audio.id WHERE $RemoveNoRSSTagged " |
587 | | - ."audio.audioformat='$_GET[audioformat]' $AdultFilter AND collectiontype='owned' ORDER BY sorttitle"; |
| 586 | + ."audio.audioformat='" . $db->sql_escape($_GET['audioformat']) . "' $AdultFilter AND collectiontype='owned' ORDER BY sorttitle"; |
588 | 587 | break; |
589 | 588 |
|
590 | 589 | case 'subtitle': |
591 | | - $rss_feeddescription = "DVDs filtered by Subtitle: ". $_GET['subtitle']; |
| 590 | + $rss_feeddescription = "DVDs filtered by Subtitle: ". htmlentities($_GET['subtitle']); |
592 | 591 | $sql = "SELECT DISTINCT $fieldlist FROM $DVD_TABLE dvd LEFT JOIN $DVD_SUBTITLE_TABLE sub ON dvd.id=sub.id WHERE $RemoveNoRSSTagged " |
593 | | - ."sub.subtitle='$_GET[subtitle]' $AdultFilter AND collectiontype='owned' ORDER BY sorttitle"; |
| 592 | + ."sub.subtitle='" . $db->sql_escape($_GET['subtitle']) . "' $AdultFilter AND collectiontype='owned' ORDER BY sorttitle"; |
594 | 593 | break; |
595 | 594 |
|
596 | 595 | case 'studio': |
597 | | - $rss_feeddescription = "DVDs filtered by Studio: ". $_GET['studio']; |
| 596 | + $rss_feeddescription = "DVDs filtered by Studio: ". htmlentities($_GET['studio']); |
598 | 597 | $sql = "SELECT DISTINCT $fieldlist FROM $DVD_TABLE dvd LEFT JOIN $DVD_STUDIO_TABLE stud ON dvd.id=stud.id WHERE $RemoveNoRSSTagged " |
599 | | - ."stud.studio='$_GET[studio]' $AdultFilter AND collectiontype='owned' ORDER BY sorttitle"; |
| 598 | + ."stud.studio='" . $db->sql_escape($_GET['studio']) . "' $AdultFilter AND collectiontype='owned' ORDER BY sorttitle"; |
600 | 599 | break; |
601 | 600 |
|
602 | 601 | case 'loaned': |
603 | | - $rss_feeddescription = "DVDs loaned to " . $_GET['loaned']; |
604 | | - $sql = "SELECT $fieldlist FROM $DVD_TABLE dvd WHERE $RemoveNoRSSTagged loaninfo='$_GET[loaned]' $AdultFilter AND collectiontype='owned' ORDER BY sorttitle"; |
| 602 | + $rss_feeddescription = "DVDs loaned to " . htmlentities($_GET['loaned']); |
| 603 | + $sql = "SELECT $fieldlist FROM $DVD_TABLE dvd WHERE $RemoveNoRSSTagged loaninfo='" . $db->sql_escape($_GET['loaned']) . "' $AdultFilter AND collectiontype='owned' ORDER BY sorttitle"; |
605 | 604 | break; |
606 | 605 |
|
607 | 606 | case 'upcomingreleases': |
|
0 commit comments