예제 #1
0
 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));
 }
예제 #2
0
파일: Env.php 프로젝트: hugi2002/mylibrary
     $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);