当前位置: 首页>>代码示例>>PHP>>正文


PHP Layout::GetErrorMessage方法代码示例

本文整理汇总了PHP中Layout::GetErrorMessage方法的典型用法代码示例。如果您正苦于以下问题:PHP Layout::GetErrorMessage方法的具体用法?PHP Layout::GetErrorMessage怎么用?PHP Layout::GetErrorMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Layout的用法示例。


在下文中一共展示了Layout::GetErrorMessage方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: SetLayoutXml

 /**
  * Sets the Layout Xml and writes it back to the database
  * @return 
  * @param $layoutid Object
  * @param $xml Object
  */
 private function SetLayoutXml($layoutid, $xml)
 {
     $layout = new Layout($this->db);
     if (!$layout->SetLayoutXml($layoutid, $xml)) {
         return $this->SetError($layout->GetErrorMessage());
     }
     return true;
 }
开发者ID:abbeet,项目名称:server39,代码行数:14,代码来源:region.data.class.php

示例2: SetLayoutXml

 /**
  * Sets the Layout Xml and writes it back to the database
  * @return 
  * @param $layoutid Object
  * @param $xml Object
  */
 private function SetLayoutXml($layoutid, $xml)
 {
     // Update Cache
     $this->layoutXml = $xml;
     $layout = new Layout($this->db);
     $layout->delayFinalise = $this->delayFinalise;
     if (!$layout->SetLayoutXml($layoutid, $xml)) {
         return $this->SetError($layout->GetErrorMessage());
     }
     return true;
 }
开发者ID:fignew,项目名称:xibo-cms,代码行数:17,代码来源:region.data.class.php

示例3: TemplateDelete

 /**
  * Delete Template
  * @return <XiboAPIResponse>
  */
 public function TemplateDelete()
 {
     if (!$this->user->PageAuth('template')) {
         return $this->Error(1, 'Access Denied');
     }
     $layout = new Layout();
     $layoutId = $this->GetParam('templateId', _INT);
     if (!$this->user->LayoutAuth($layoutId)) {
         return $this->Error(1, 'Access Denied');
     }
     if (!$layout->Delete($layoutId)) {
         return $this->Error($layout->GetErrorNumber(), $layout->GetErrorMessage());
     }
     return $this->Respond($this->ReturnId('success', true));
 }
开发者ID:fignew,项目名称:xibo-cms,代码行数:19,代码来源:rest.class.php

示例4: Import

 public function Import()
 {
     $db =& $this->db;
     $response = new ResponseManager();
     // What are we importing?
     $template = Kit::GetParam('template', _POST, _STRING, 'false');
     $template = $template == 'true';
     $layout = Kit::GetParam('layout', _POST, _STRING);
     $replaceExisting = Kit::GetParam('replaceExisting', _POST, _CHECKBOX);
     $importTags = Kit::GetParam('importTags', _POST, _CHECKBOX, !$template);
     // File data
     $tmpName = Kit::GetParam('hidFileID', _POST, _STRING);
     if ($tmpName == '') {
         trigger_error(__('Please ensure you have picked a file and it has finished uploading'), E_USER_ERROR);
     }
     // File name and extension (orignial name)
     $fileName = Kit::GetParam('txtFileName', _POST, _STRING);
     $fileName = basename($fileName);
     $ext = strtolower(substr(strrchr($fileName, "."), 1));
     // File upload directory.. get this from the settings object
     $fileLocation = Config::GetSetting('LIBRARY_LOCATION') . 'temp/' . $tmpName;
     Kit::ClassLoader('layout');
     $layoutObject = new Layout($this->db);
     if (!$layoutObject->Import($fileLocation, $layout, $this->user->userid, $template, $replaceExisting, $importTags)) {
         trigger_error($layoutObject->GetErrorMessage(), E_USER_ERROR);
     }
     $response->SetFormSubmitResponse(__('Layout Imported'));
     $response->Respond();
 }
开发者ID:rovak73,项目名称:xibo-cms,代码行数:29,代码来源:layout.class.php

示例5: DeleteTemplate

 /**
  * Deletes a template
  * @return
  */
 function DeleteTemplate()
 {
     // Check the token
     if (!Kit::CheckToken()) {
         trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR);
     }
     $db =& $this->db;
     $user =& $this->user;
     $response = new ResponseManager();
     $templateId = Kit::GetParam('templateId', _POST, _INT);
     if ($templateId == 0) {
         trigger_error(__('No template selected'), E_USER_ERROR);
     }
     // Is this user allowed to delete this template?
     $auth = $this->user->TemplateAuth($templateId, true);
     if (!$auth->del) {
         trigger_error(__('Access denied'), E_USER_ERROR);
     }
     // Use the data class
     $template = new Layout();
     // Delete the template
     if (!$template->Delete($templateId)) {
         trigger_error($template->GetErrorMessage(), E_USER_ERROR);
     }
     $response->SetFormSubmitResponse(__('The Template has been Deleted'));
     $response->Respond();
 }
开发者ID:fignew,项目名称:xibo-cms,代码行数:31,代码来源:template.class.php

示例6: LayoutDelete

 /**
  * Delete Layout
  * @return <XiboAPIResponse>
  */
 public function LayoutDelete()
 {
     if (!$this->user->PageAuth('layout')) {
         return $this->Error(1, 'Access Denied');
     }
     Kit::ClassLoader('Layout');
     $layout = new Layout($this->db);
     $layoutId = $this->GetParam('layoutId', _INT);
     if (!$this->user->LayoutAuth($layoutId)) {
         return $this->Error(1, 'Access Denied');
     }
     if (!$layout->Delete($layoutId)) {
         return $this->Error($layout->GetErrorNumber(), $layout->GetErrorMessage());
     }
     return $this->Respond($this->ReturnId('success', true));
 }
开发者ID:abbeet,项目名称:server39,代码行数:20,代码来源:rest.class.php

示例7: Copy

 /**
  * Copys a layout
  */
 public function Copy()
 {
     // Check the token
     if (!Kit::CheckToken()) {
         trigger_error('Token does not match', E_USER_ERROR);
     }
     $db =& $this->db;
     $user =& $this->user;
     $response = new ResponseManager();
     $layoutid = Kit::GetParam('layoutid', _POST, _INT);
     $layout = Kit::GetParam('layout', _POST, _STRING);
     $copyMedia = Kit::GetParam('copyMediaFiles', _POST, _CHECKBOX);
     Kit::ClassLoader('Layout');
     $layoutObject = new Layout($db);
     if (!$layoutObject->Copy($layoutid, $layout, $user->userid, (bool) $copyMedia)) {
         trigger_error($layoutObject->GetErrorMessage(), E_USER_ERROR);
     }
     $response->SetFormSubmitResponse(__('Layout Copied'));
     $response->Respond();
 }
开发者ID:abbeet,项目名称:server39,代码行数:23,代码来源:layout.class.php

示例8: Delete

 /**
  * Delete User
  * @return bool
  */
 public function Delete()
 {
     if (!isset($this->userId) || $this->userId == 0) {
         return $this->SetError(__('Missing userId'));
     }
     try {
         $dbh = PDOConnect::init();
         // Delete all layouts
         $layout = new Layout();
         if (!$layout->deleteAllForUser($this->userId)) {
             return $this->SetError($layout->GetErrorMessage());
         }
         // Delete all Campaigns
         $campaign = new Campaign();
         if (!$campaign->deleteAllForUser($this->userId)) {
             return $this->SetError($campaign->GetErrorMessage());
         }
         // Delete all media
         $media = new Media();
         if (!$media->deleteAllForUser($this->userId)) {
             return $this->SetError($media->GetErrorMessage());
         }
         // Delete all schedules that have not been caught by deleting layouts and campaigns
         // These would be schedules for other peoples layouts
         $schedule = new Schedule();
         if (!$schedule->deleteAllForUser($this->userId)) {
         }
         // Delete the user itself
         $sth = $dbh->prepare('DELETE FROM `user` WHERE userid = :userid');
         $sth->execute(array('userid' => $this->userId));
         // Delete from the session table
         $sth = $dbh->prepare('DELETE FROM `session` WHERE userid = :userid');
         $sth->execute(array('userid' => $this->userId));
         return true;
     } catch (Exception $e) {
         Debug::LogEntry('error', $e->getMessage(), get_class(), __FUNCTION__);
         if (!$this->IsError()) {
             $this->SetError(1, __('Unknown Error'));
         }
         return false;
     }
 }
开发者ID:fignew,项目名称:xibo-cms,代码行数:46,代码来源:userdata.data.class.php


注:本文中的Layout::GetErrorMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。