예제 #1
0
                 $prev27[$c['_date']]['C'] = $c;
             }
             if ($ngbs['A']) {
                 if (($A = promotion::GetFromDaily($ngbs['A']['user_id'], $nday, date('Y-m-d', $min_pro_to))) && ($E = promotion::GetFromDaily($ngbs['E']['user_id'], $nday, date('Y-m-d', $min_pro_to)))) {
                     foreach ($A as $a) {
                         $prev27[$a['_date']]['A'] = $a;
                     }
                     foreach ($E as $e) {
                         $prev27[$e['_date']]['E'] = $e;
                     }
                 } else {
                 }
                 // хоть может в лог какой писать...
             }
             if ($ngbs['B']) {
                 if (($B = promotion::GetFromDaily($ngbs['B']['user_id'], $nday, date('Y-m-d', $min_pro_to))) && ($D = promotion::GetFromDaily($ngbs['D']['user_id'], $nday, date('Y-m-d', $min_pro_to)))) {
                     foreach ($B as $b) {
                         $prev27[$b['_date']]['B'] = $b;
                     }
                     foreach ($D as $d) {
                         $prev27[$d['_date']]['D'] = $d;
                     }
                 }
             }
             // Если $min_pro_to >= СЕГОДНЯ, то цикл завершится. (Сегодняшняя посещаемость не нужна, т.к. берем только целые дни.)
             $nday = date('Y-m-d', $min_pro_to);
         }
     }
 }
 $sh = 0;
 while ($nday == $tnday) {