示例#1
0
 public function calendarIndex($v7552cd149af7495ee7d8225974e50f80, $v972bf3f05d14ffbdb817bef60638ff00, $v84cdc76cabf41bd7c961f6ab12f117d8 = false, $v7436f942d5ea836cb84f1bb2527d8286 = false, $v12a055bf01a31369fe81ac35d85c7bc1 = 1, $v66f6181bcb4cff4cd38fbc804a036db6 = 'default')
 {
     list($v31912934b8f34be4364cc043cd8a0176, $v4aea309357d3d2b6db2d854df7b2cb21, $v965a7685c914026380d3c7016175e350, $vcd3886ae8293ea7c31578c12fc4e0b8a, $v38d22f83de5454f9463b73ef57e59183) = def_module::loadTemplates("./tpls/calendar/" . $v66f6181bcb4cff4cd38fbc804a036db6, 'calendar', 'week', 'day', 'day_a', 'day_null');
     $vb3b32a2d422265cd25c3323ed0157f81 = new selector('pages');
     $v7552cd149af7495ee7d8225974e50f80 = def_module::analyzeRequiredPath($v7552cd149af7495ee7d8225974e50f80);
     if (!$v7552cd149af7495ee7d8225974e50f80) {
         throw new publicException("Page #{$v7552cd149af7495ee7d8225974e50f80} not found");
     }
     $vb81ca7c0ccaa77e7aa91936ab0070695 = umiHierarchy::getInstance();
     $v6301cee35ea764a1e241978f93f01069 = $vb81ca7c0ccaa77e7aa91936ab0070695->getDominantTypeId($v7552cd149af7495ee7d8225974e50f80);
     if (!$v6301cee35ea764a1e241978f93f01069) {
         return;
     }
     $vb3b32a2d422265cd25c3323ed0157f81->types('object-type')->id($v6301cee35ea764a1e241978f93f01069);
     $vb3b32a2d422265cd25c3323ed0157f81->where('hierarchy')->page($v7552cd149af7495ee7d8225974e50f80)->childs($v12a055bf01a31369fe81ac35d85c7bc1);
     try {
         $v6a992d5529f459a44fee58c733255e86 = new calendarIndex($vb3b32a2d422265cd25c3323ed0157f81);
         $va0e7b2a565119c0a7ec3126a16016113 = $v6a992d5529f459a44fee58c733255e86->index($v972bf3f05d14ffbdb817bef60638ff00, $v84cdc76cabf41bd7c961f6ab12f117d8, $v7436f942d5ea836cb84f1bb2527d8286);
     } catch (baseException $ve1671797c52e15f763380b45e841ec32) {
         throw new publicException($ve1671797c52e15f763380b45e841ec32->getMessage());
     }
     $vae60f11ab51860bdb22794a943335a34 = array();
     $v659dfac5417796f5351cb780481795fe = ceil((sizeof($va0e7b2a565119c0a7ec3126a16016113['days']) + $va0e7b2a565119c0a7ec3126a16016113['first-day']) / 7);
     $vee21496299dbf88355a35db78a7c1e99 = $v659dfac5417796f5351cb780481795fe * 7;
     $v79f5fae92f4da5d4ad1eddea50cc575c = null;
     $v8e2dcfd7e7e24b1ca76c1193f645902b = selector::get('page')->id($v7552cd149af7495ee7d8225974e50f80);
     if ($v8e2dcfd7e7e24b1ca76c1193f645902b) {
         $v79f5fae92f4da5d4ad1eddea50cc575c = $v8e2dcfd7e7e24b1ca76c1193f645902b->link;
     }
     $vd56c863670800e22ac293bb8e275c1a3 = $v6a992d5529f459a44fee58c733255e86->timeStart;
     for ($v865c0c0b4ab0e063e5caa3387c1a8741 = 0; $v865c0c0b4ab0e063e5caa3387c1a8741 < $v659dfac5417796f5351cb780481795fe; $v865c0c0b4ab0e063e5caa3387c1a8741++) {
         $v44fdec47036f482b68b748f9d786801b = array();
         for ($v363b122c528f54df4a0446b6bab05515 = 0; $v363b122c528f54df4a0446b6bab05515 < 7; $v363b122c528f54df4a0446b6bab05515++) {
             $vb1bc248a7ff2b2e95569f56de68615df = $v865c0c0b4ab0e063e5caa3387c1a8741 * 7 + $v363b122c528f54df4a0446b6bab05515 - $va0e7b2a565119c0a7ec3126a16016113['first-day'] + 1;
             if ($vb1bc248a7ff2b2e95569f56de68615df > sizeof($va0e7b2a565119c0a7ec3126a16016113['days']) || $vb1bc248a7ff2b2e95569f56de68615df <= 0) {
                 $vb1bc248a7ff2b2e95569f56de68615df = false;
                 $v4f2afc9c4099ee1f39c9f551123e54bd = $v38d22f83de5454f9463b73ef57e59183;
                 $ve2942a04780e223b215eb8b663cf5353 = 0;
             } else {
                 $ve2942a04780e223b215eb8b663cf5353 = (int) $va0e7b2a565119c0a7ec3126a16016113['days'][$vb1bc248a7ff2b2e95569f56de68615df];
                 $v4f2afc9c4099ee1f39c9f551123e54bd = $ve2942a04780e223b215eb8b663cf5353 ? $vcd3886ae8293ea7c31578c12fc4e0b8a : $v965a7685c914026380d3c7016175e350;
             }
             $v2a304a1348456ccd2234cd71a81bd338 = null;
             if ($ve2942a04780e223b215eb8b663cf5353) {
                 $v83f1535f99ab0bf4e9d02dfd85d3e3f7 = $vd56c863670800e22ac293bb8e275c1a3 + 3600 * 24 * ($vb1bc248a7ff2b2e95569f56de68615df - 1);
                 $v0f826a89cf68c399c5f4cf320c1a5842 = $v83f1535f99ab0bf4e9d02dfd85d3e3f7 + 3600 * 24;
                 $v2a304a1348456ccd2234cd71a81bd338 = $v79f5fae92f4da5d4ad1eddea50cc575c . "?fields_filter[{$v972bf3f05d14ffbdb817bef60638ff00}][]={$v83f1535f99ab0bf4e9d02dfd85d3e3f7}&fields_filter[{$v972bf3f05d14ffbdb817bef60638ff00}][]=" . $v0f826a89cf68c399c5f4cf320c1a5842;
             }
             $v44fdec47036f482b68b748f9d786801b[] = def_module::parseTemplate($v4f2afc9c4099ee1f39c9f551123e54bd, array('@count' => $ve2942a04780e223b215eb8b663cf5353, '@link' => $v2a304a1348456ccd2234cd71a81bd338, '#day' => $vb1bc248a7ff2b2e95569f56de68615df));
         }
         $v172a8327fcd3685ab3c0f740d031da09 = array('void:days' => $v44fdec47036f482b68b748f9d786801b, 'nodes:day' => $v44fdec47036f482b68b748f9d786801b);
         $vae60f11ab51860bdb22794a943335a34[] = def_module::parseTemplate($v4aea309357d3d2b6db2d854df7b2cb21, $v172a8327fcd3685ab3c0f740d031da09);
     }
     return def_module::parseTemplate($v31912934b8f34be4364cc043cd8a0176, array('date' => $v6a992d5529f459a44fee58c733255e86->timeStart, 'year' => $va0e7b2a565119c0a7ec3126a16016113['year'], 'month' => $va0e7b2a565119c0a7ec3126a16016113['month'], 'void:weeks' => $vae60f11ab51860bdb22794a943335a34, 'nodes:week' => $vae60f11ab51860bdb22794a943335a34));
 }