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


PHP UniteFunctionsRev::ajaxResponseSuccess方法代码示例

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


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

示例1: operate

 /**
  * 
  * operate actions
  */
 public function operate()
 {
     $this->operations = new HelperUniteOperationsRev();
     $this->action = UniteFunctionsRev::getPostVariable("action");
     if (empty($this->action)) {
         $this->action = UniteFunctionsRev::getPostVariable("client_action");
     }
     $this->data = UniteFunctionsRev::getPostVariable("data", array());
     try {
         switch ($this->action) {
             case "add_slide":
                 $slideID = $this->operations->addSlideFromData($this->data);
                 UniteFunctionsRev::ajaxResponseSuccess("");
                 break;
             case "update_slider_duplicate":
                 $sliderID = $this->saveSlider();
                 $newSliderID = $this->operations->duplicateSlider($sliderID);
                 UniteFunctionsRev::ajaxResponseData(array("newSliderID" => $newSliderID));
                 break;
             case "update_slider":
                 $sliderID = $this->saveSlider();
                 UniteFunctionsRev::ajaxResponseData(array("sliderID" => $sliderID));
                 break;
             case "update_slide_close":
             case "update_slide_new":
             case "update_slide":
                 $slideID = $this->saveSlide();
                 UniteFunctionsRev::ajaxResponseData(array("slideID" => $slideID));
                 break;
             case "update_slide_duplicate":
                 $slideID = $this->saveSlide();
                 $newSlideID = $this->operations->duplicateSlide($slideID);
                 UniteFunctionsRev::ajaxResponseData(array("slideID" => $newSlideID));
                 break;
             case "get_captions_css":
                 $contentCSS = $this->operations->getCaptionsContent();
                 UniteFunctionsRev::ajaxResponseData($contentCSS);
                 break;
             case "update_captions_css":
                 $arrCaptions = $this->operations->updateCaptionsContentData($this->data);
                 UniteFunctionsRev::ajaxResponseSuccess("CSS file saved succesfully!", array("arrCaptions" => $arrCaptions));
                 break;
             case "restore_captions_css":
                 $this->operations->restoreCaptionsCss();
                 $contentCSS = $this->operations->getCaptionsContentOgirinal();
                 UniteFunctionsRev::ajaxResponseData($contentCSS);
                 break;
             case "get_release_log":
                 $content = HelperUniteRev::getReleaseLogContent();
                 UniteFunctionsRev::ajaxResponseData($content);
                 break;
             case "preview_slide":
                 $this->operations->putSlidePreviewByData($this->data);
                 break;
             case "preview_slider":
                 $sliderID = UniteFunctionsRev::getPostVariable("sliderid");
                 UniteFunctionsRev::validateNotEmpty($sliderID, "SliderID");
                 $this->operations->previewOutput($sliderID);
                 break;
             case "update_items_order":
                 $this->operations->updateSlidesOrderFromData($this->data);
                 UniteFunctionsRev::ajaxResponseSuccess("order updated");
                 break;
             case "toggle_publish_state":
                 //publish / unpublish item
                 $newState = $this->operations->publishUnpublishItemFromData($this->data);
                 UniteFunctionsRev::ajaxResponseSuccess("state updated", array("newstate" => $newState));
                 break;
             case "delete_slide":
                 $this->operations->deleteSlideFromData($this->data);
                 UniteFunctionsRev::ajaxResponseSuccess("Slide Deleted");
                 break;
             case "duplicate_slide":
                 $this->operations->duplicateSlideFromData($this->data);
                 UniteFunctionsRev::ajaxResponseSuccess("Slide Duplicated");
                 break;
             default:
                 UniteFunctionsRev::ajaxResponseError("ajax action not found: " . $this->action);
                 break;
         }
     } catch (Exception $e) {
         $message = $e->getMessage();
         UniteFunctionsRev::ajaxResponseError($message);
     }
     exit;
 }
开发者ID:DanyCan,项目名称:wisten.github.io,代码行数:90,代码来源:actions.class.php


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