Ticket #208: category.patch
File category.patch, 2.6 KB (added by , 19 years ago) |
---|
-
themes/Default/video.php
40 40 if( $Filter_Category == -1) 41 41 echo "selected"; 42 42 echo ">All</option>\n"; 43 for($i=0;$i<=$Total_Categories;$i++) { 44 echo "<option value=$i "; 45 if( $i == $Filter_Category ) 46 echo "selected"; 47 echo ">"; 48 echo "$Category_String[$i]</option>\n"; 43 $i=0; // Represents the category's intid 44 $count=0; // Number of categories printed so far 45 while ($count <= $Total_Categories) { 46 // Check if a category exists with this intid. 47 if (isset($Category_String[$i])) { 48 echo "<option value=$i "; 49 if ($i == $Filter_Category) 50 echo "selected"; 51 echo ">"; 52 echo "$Category_String[$i]</option>\n"; 53 $count++; 54 } 55 $i++; 49 56 } 50 57 ?> 51 58 </select> … … 116 123 117 124 echo 'MythVideo:'; 118 125 echo " "; 119 echo "<a href=\" video.php?reverse=$new_reverse";126 echo "<a href=\"?reverse=$new_reverse"; 120 127 if($new_sortby) 121 128 echo "&sortby=$new_sortby"; 122 129 if($new_cat) … … 124 131 echo "\">"; 125 132 echo t('Reverse Order'); 126 133 echo "</a>"; 134 echo " | "; 135 echo "<a href=\"video.php\">Videos</a>"; 136 echo " | "; 137 echo "<a href=\"video_category.php\">Categories</a>"; 127 138 } 128 139 } 129 140 -
includes/sorting.php
185 185 return ($a->transcoder > $b->transcoder) ? 1 : -1; 186 186 } 187 187 188 function by_intid(&$a, &$b) { 189 if ($a->intid == $b->profile) return 0; 190 return ($a->intid > $b->intid) ? 1 : -1; 191 } 188 192 ?> -
video_edit.php
96 96 $result = mysql_query('SELECT * FROM videocategory') 97 97 or trigger_error('SQL Error: '.mysql_error(), FATAL); 98 98 while( $cat_data = mysql_fetch_assoc($result) ) { 99 $num_cat ++;99 $num_cat = $cat_data["intid"]; 100 100 $cat_str = $cat_data["category"]; ?> 101 101 <option <?if ($category == $num_cat) print "selected"; ?> value="<?print $num_cat; ?>"><?print $cat_str; ?></option> 102 102 <?}