query("SELECT * FROM $table_themes WHERE title='$theme_theme'"); $theme_sql = $connect->query("SELECT * FROM $table_themes $active ORDER BY RAND()"); $theme_info = $theme_sql->fetch_array(); if($_SERVER['REQUEST_URI'] == '/' || $_SERVER['REQUEST_URI'] == '/index.php'){ $logo = unserialize($theme_info['photo']); $logo = $logo[0]; $color_menu = $theme_info['background']; }else{ $logo = './img/logo_new.png'; $color_menu = 'black'; } $header_back = $theme_info['background_img']; ?>
prepare("UPDATE global_media SET update_time='$update_time'"); $upd_sql->execute(); }?>
prepare("SELECT * FROM $table_graph WHERE activity = :num ORDER BY order_row DESC"); $num = 1; $graph_sql->bindParam(':num', $num); $graph_sql->execute(); while($graph = $graph_sql->fetch()){ ?>
prepare("SELECT * FROM $table ORDER by moment_time DESC LIMIT 30"); $rates = $pdo->prepare("select AVG(moment_value) as moment_value, UNIX_TIMESTAMP(rate_date) as moment_time from $table group by rate_date order by rate_date desc limit 30"); $rates->execute(); $i= 0; $arr=array(); //массив чтобы отстортировать в обратном порядке while($rate = $rates->fetch()){ $arr[$i] = $rate; $i++; } $rate_reversed = array_reverse($arr); foreach($rate_reversed as $rate){ ?>
0 руб