function run() { $data = array(); if (Funcs::$infoblock['banners']) { foreach (Funcs::$infoblock['banners'] as $item) { $x = 0; $path = explode("\r\n", $item['source']); foreach ($path as $p) { if (strpos($p, '*') !== false) { $p = substr($p, 0, strpos($p, '*')); if (strpos($_SERVER['REQUEST_URI'], $p) !== false) { $x = 1; } } else { if ($_SERVER['REQUEST_URI'] == $p) { $x = 1; } } } if ($x == 1) { $data[] = $item; } } } return View::Widget('banners', array('list' => $data, 'sales' => BannersWidget::getSales())); }
</td> </tr> </table> </form> <script> function checkForm(){ var f=0; $('#anketaform .required').each(function(){ if (jQuery.trim($(this).val())==''){ $(this).css('border','solid 1px red'); f=1; }else{ $(this).css('border',''); } }); if(f==1){ return false; }else{ return true; } } </script> </div> <div class="left-block-content"> <?php MenuWidget::LeftMenu(); ?> <?php BannersWidget::run(); ?> </div>