function saveTemplateAction()
 {
     $modelname = $this->_request->getParam("model", 'Eau_Model_Company');
     $uiName = $this->_request->getParam("uiName", 'default');
     $templeteData = $this->_request->getParam("template", '');
     $fname = $this->_request->getParam("templateName", '');
     $templeatLocation = TEMPLATES_DIR . "/" . $modelname;
     $templeatPath = $templeatLocation . "/" . App_Formatter::cleanFileNames($fname) . ".txt";
     if (!is_dir($templeatLocation)) {
         @mkdir($templeatLocation, 0777, true);
     }
     $objFopen = fopen($templeatPath, 'w');
     fwrite($objFopen, $templeteData);
     fclose($objFopen);
     $this->_helper->redirector('template-design', null, null, array('model' => $modelname, 'uiName' => $uiName));
 }
Example #2
0
     $userFolderPath = self::getSession("pathOfUserTemporaryFolder", "");
     if (!is_dir($userFolderPath)) {
         self::createUserTemporaryFolder();
     }
     return self::getSession("pathOfUserTemporaryFolder", "");
 }
 static function createUserTemporaryFolder()
 {
     $userFolderName = strtolower(App_Formatter::cleanFileNames(App_Env::getUser()->getLoginid()));
     $userFolderPath = TEM_DOCUMENTS . "/" . $userFolderName;
     if (!is_dir($userFolderPath)) {
         @mkdir($userFolderPath, 0777, true);