@@ 2226-2262 (lines=37) @@ | ||
2223 | * |
|
2224 | * @return string |
|
2225 | */ |
|
2226 | public static function xtubeConvertOrderByIn($orderby) |
|
2227 | { |
|
2228 | switch (trim($orderby)) { |
|
2229 | case 'titleA': |
|
2230 | $orderby = 'title ASC'; |
|
2231 | break; |
|
2232 | case 'dateA': |
|
2233 | $orderby = 'published ASC'; |
|
2234 | break; |
|
2235 | case 'hitsA': |
|
2236 | $orderby = 'hits ASC'; |
|
2237 | break; |
|
2238 | case 'ratingA': |
|
2239 | $orderby = 'rating ASC'; |
|
2240 | break; |
|
2241 | case 'countryA': |
|
2242 | $orderby = 'country ASC'; |
|
2243 | break; |
|
2244 | case 'titleD': |
|
2245 | $orderby = 'title DESC'; |
|
2246 | break; |
|
2247 | case 'hitsD': |
|
2248 | $orderby = 'hits DESC'; |
|
2249 | break; |
|
2250 | case 'ratingD': |
|
2251 | $orderby = 'rating DESC'; |
|
2252 | break; |
|
2253 | case'dateD': |
|
2254 | $orderby = 'published DESC'; |
|
2255 | break; |
|
2256 | case 'countryD': |
|
2257 | $orderby = 'country DESC'; |
|
2258 | break; |
|
2259 | } |
|
2260 | ||
2261 | return $orderby; |
|
2262 | } |
|
2263 | ||
2264 | /** |
|
2265 | * @param $orderby |
|
@@ 2312-2348 (lines=37) @@ | ||
2309 | * |
|
2310 | * @return string |
|
2311 | */ |
|
2312 | public static function xtubeConvertOrderByOut($orderby) |
|
2313 | { |
|
2314 | switch ($orderby) { |
|
2315 | case 'title ASC': |
|
2316 | $orderby = 'titleA'; |
|
2317 | break; |
|
2318 | case 'published ASC': |
|
2319 | $orderby = 'dateA'; |
|
2320 | break; |
|
2321 | case 'hits ASC': |
|
2322 | $orderby = 'hitsA'; |
|
2323 | break; |
|
2324 | case 'rating ASC': |
|
2325 | $orderby = 'ratingA'; |
|
2326 | break; |
|
2327 | case 'country ASC': |
|
2328 | $orderby = 'countryA'; |
|
2329 | break; |
|
2330 | case 'title DESC': |
|
2331 | $orderby = 'titleD'; |
|
2332 | break; |
|
2333 | case 'published DESC': |
|
2334 | $orderby = 'dateD'; |
|
2335 | break; |
|
2336 | case 'hits DESC': |
|
2337 | $orderby = 'hitsD'; |
|
2338 | break; |
|
2339 | case 'rating DESC': |
|
2340 | $orderby = 'ratingD'; |
|
2341 | break; |
|
2342 | case 'country DESC': |
|
2343 | $orderby = 'countryD'; |
|
2344 | break; |
|
2345 | } |
|
2346 | ||
2347 | return $orderby; |
|
2348 | } |
|
2349 | ||
2350 | // updaterating() |
|
2351 | // @param $sel_id |