private function createStaticSpotFile($site, $spot, $tplSpotId)
 {
     $staticspotPath = 'cache/templates/' . $site->getId() . '/staticspots/';
     $filename = $spot->systemName() . '_' . $tplSpotId . '.php';
     if (!is_dir($staticspotPath)) {
         $fm = new FileMaker();
         $fm->makeDirectory($staticspotPath);
     }
     $filepath = $staticspotPath . $filename;
     $fm = new FileMaker();
     $fm->makeFile($filepath, $spot->getContent());
     $serverpath = 'dynamic/includes';
     $uploader = new FTPUploader($site);
     $uploader->upload($serverpath, $filepath, $filename);
     return $this->serverSideInclude($serverpath . $filename);
 }
 public function __construct($page = false)
 {
     global $INK_User;
     if ($page != false) {
         $this->page = $page;
     }
     $this->site = $INK_User->getCustomer()->getSite();
     parent::__construct($this->site);
 }