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


PHP Content::processAdminUI方法代码示例

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


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

示例1: processAdminUI

 /**
  * Processes the input of the administration interface for RssAggregator
  *
  * @return void
  */
 public function processAdminUI()
 {
     if ($this->DEPRECATEDisOwner(User::getCurrentUser()) || User::getCurrentUser()->DEPRECATEDisSuperAdmin()) {
         parent::processAdminUI();
         /*
          * number_of_display_items
          */
         $name = "rss_aggregator_" . $this->id . "_display_num_items";
         $this->setDisplayNumItems($_REQUEST[$name]);
         /*
          * algorithm_strength
          */
         $name = "rss_aggregator_" . $this->id . "_algorithm_strength";
         $this->setAlgorithmStrength($_REQUEST[$name]);
         /*
          * feed_expansion
          */
         $name = "rss_aggregator_" . $this->id . "_feed_expansion";
         $this->setFeedExpansionMode($_REQUEST[$name]);
         /*
          * feed_ordering
          */
         $name = "rss_aggregator_" . $this->id . "_feed_ordering";
         $this->setFeedOrdering($_REQUEST[$name]);
         /*
          * display_empty_feeds
          */
         $name = "rss_aggregator_" . $this->id . "_display_empty_feeds";
         !empty($_REQUEST[$name]) ? $this->setDisplayEmptyFeed(true) : $this->setDisplayEmptyFeed(false);
         /*
          * max_item_age
          */
         $name = "rss_aggregator_" . $this->id . "_max_item_age";
         $this->setMaxItemAge($_REQUEST[$name]);
         foreach ($this->content_rss_aggregator_feeds_rows as $feed_row) {
             $this->processFeedAdminUI($feed_row);
             /*
              * Delete feeds
              */
             $name = "rss_aggregator_" . $this->id . "_feed_" . md5($feed_row['url']) . "_delete";
             if (isset($_REQUEST[$name])) {
                 $this->removeFeed($feed_row['url']);
             }
         }
         /*
          * Add new feed
          */
         $name = "rss_aggregator_{$this->id}_feed_add";
         if (!empty($_REQUEST[$name])) {
             $this->addFeed($_REQUEST[$name]);
         }
     }
 }
开发者ID:soitun,项目名称:wifidog-auth,代码行数:58,代码来源:RssAggregator.php

示例2: processAdminUI

 /**
  * Processes the input of the administration interface for Langstring
  *
  * @return void
  */
 public function processAdminUI()
 {
     // Init values.
     $result = null;
     if ($this->DEPRECATEDisOwner(User::getCurrentUser()) || User::getCurrentUser()->DEPRECATEDisSuperAdmin()) {
         parent::processAdminUI();
         $generateur_form_select = new FormSelectGenerator();
         $sql = "SELECT * FROM content_langstring_entries WHERE content_langstring_entries.langstrings_id = '{$this->id}'";
         $this->mBd->execSql($sql, $result, false);
         if ($result != null) {
             while (list($key, $value) = each($result)) {
                 $language = $generateur_form_select->getResult("langstrings_" . $this->id . "_substring_{$value['langstring_entries_id']}_language", null);
                 if (empty($language)) {
                     $language = '';
                     $languageSQL = 'NULL';
                 } else {
                     $languageSQL = "'" . $language . "'";
                 }
                 if (!empty($_REQUEST["langstrings_" . $this->id . "_substring_{$value['langstring_entries_id']}_erase"]) && $_REQUEST["langstrings_" . $this->id . "_substring_{$value['langstring_entries_id']}_erase"] == true) {
                     $this->mBd->execSqlUpdate("DELETE FROM content_langstring_entries WHERE langstrings_id = '{$this->id}' AND langstring_entries_id='{$value['langstring_entries_id']}'", FALSE);
                     // Create new cache object.
                     $_cache = new Cache('langstrings_' . $this->id . '_substring_' . $language . '_string', $this->id);
                     // Check if caching has been enabled.
                     if ($_cache->isCachingEnabled) {
                         // Remove old cached data.
                         $_cache->eraseCachedData();
                     }
                 } else {
                     // Strip HTML tags !
                     $string = $_REQUEST["langstrings_" . $this->id . "_substring_{$value['langstring_entries_id']}_string"];
                     $string = $this->mBd->escapeString(strip_tags($string, $this->allowed_html_tags));
                     // If PEAR::HTML_Safe is available strips down all potentially dangerous content
                     $_HtmlSafe = new HtmlSafe();
                     if ($_HtmlSafe->isHtmlSafeEnabled) {
                         // Add "embed" and "object" to the default set of dangerous tags
                         $_HtmlSafe->setDeleteTags(array("embed", "object"), true);
                         // Strip HTML
                         $string = $_HtmlSafe->parseHtml($string);
                     }
                     if ($value['value'] != $string || $language != $value['locales_id']) {
                         $this->mBd->execSqlUpdate("UPDATE content_langstring_entries SET locales_id = {$languageSQL} , value = '{$string}' WHERE langstrings_id = '{$this->id}' AND langstring_entries_id='{$value['langstring_entries_id']}'", FALSE);
                         $this->touch();
                         // Create new cache object.
                         $_cache = new Cache('langstrings_' . $this->id . '_substring_' . $language . '_string', $this->id);
                         // Check if caching has been enabled.
                         if ($_cache->isCachingEnabled) {
                             // Remove old cached data.
                             $_cache->eraseCachedData();
                             // Save data into cache.
                             $_cache->saveCachedData($string);
                         }
                     }
                 }
             }
         }
         //Nouvelles chaîne(s)
         self::processNewUI($this->id, false);
     }
 }
开发者ID:soitun,项目名称:wifidog-auth,代码行数:64,代码来源:Langstring.php

示例3: processAdminUI

 /**
  * Processes the input of the administration interface for IFrame
  *
  * @return void
  */
 public function processAdminUI()
 {
     if ($this->DEPRECATEDisOwner(User::getCurrentUser()) || User::getCurrentUser()->DEPRECATEDisSuperAdmin()) {
         parent::processAdminUI();
         // If the URL is not empty
         $name = "iframe_" . $this->id . "_url";
         if (!empty($_REQUEST[$name])) {
             $this->setUrl($_REQUEST[$name]);
         } else {
             $this->setUrl("");
         }
         $name = "iframe_" . $this->id . "_width";
         $this->setWidth(intval($_REQUEST[$name]));
         $name = "iframe_" . $this->id . "_height";
         $this->setHeight(intval($_REQUEST[$name]));
     }
 }
开发者ID:cnlangzi,项目名称:wifidog-auth,代码行数:22,代码来源:IFrame.php

示例4: processAdminUI

 /**
  * Processes the input of the administration interface for ContentGroupElement
  *
  * @return void
  */
 public function processAdminUI()
 {
     $db = AbstractDb::getObject();
     // Init values
     $allowed_node_rows = null;
     $errmsg = null;
     parent::processAdminUI();
     /* display_order */
     $name = "content_group_element_" . $this->id . "_display_order";
     $this->setDisplayOrder($_REQUEST[$name]);
     // valid_from_timestamp
     $name = "content_group_element_" . $this->id . "_valid_from";
     $this->setValidFromDate(DateTimeWD::processSelectDateTimeUI($name, DateTimeWD::INTERFACE_DATETIME_FIELD)->getIso8601FormattedString());
     // valid_until_timestamp
     $name = "content_group_element_" . $this->id . "_valid_until";
     $this->setValidUntilDate(DateTimeWD::processSelectDateTimeUI($name, DateTimeWD::INTERFACE_DATETIME_FIELD)->getIso8601FormattedString());
     /* content_group_element_has_allowed_nodes */
     $sql = "SELECT * FROM content_group_element_has_allowed_nodes WHERE content_group_element_id='{$this->id}'";
     $db->execSql($sql, $allowed_node_rows, false);
     if ($allowed_node_rows != null) {
         foreach ($allowed_node_rows as $allowed_node_row) {
             $node = Node::getObject($allowed_node_row['node_id']);
             $name = "content_group_element_" . $this->id . "_allowed_node_" . $node->GetId() . "_remove";
             if (!empty($_REQUEST[$name]) && $_REQUEST[$name] == true) {
                 $sql = "DELETE FROM content_group_element_has_allowed_nodes WHERE content_group_element_id='{$this->id}' AND node_id='" . $node->GetId() . "'";
                 $db->execSqlUpdate($sql, false);
             }
         }
     }
     $name = "content_group_element_{$this->id}_new_allowed_node_submit";
     if (!empty($_REQUEST[$name]) && $_REQUEST[$name] == true) {
         $name = "content_group_element_{$this->id}_new_allowed_node";
         $node = Node::processSelectUI($name);
         $node_id = $node->GetId();
         $db->execSqlUpdate("INSERT INTO content_group_element_has_allowed_nodes (content_group_element_id, node_id) VALUES ('{$this->id}', '{$node_id}')", FALSE);
     }
     /* displayed_content_id */
     if (empty($this->content_group_element_row['displayed_content_id'])) {
         // Could be either a new content or existing content ( try both successively )
         $displayed_content = Content::processNewContentUI("content_group_element_{$this->id}_new_displayed_content");
         if ($displayed_content == null) {
             $displayed_content = Content::processSelectExistingContentUI("content_group_element_{$this->id}_new_displayed_existing_element");
         }
         if ($displayed_content != null) {
             $displayed_content_id = $displayed_content->GetId();
             $db->execSqlUpdate("UPDATE content_group_element SET displayed_content_id = '{$displayed_content_id}' WHERE content_group_element_id = '{$this->id}'", FALSE);
         }
     } else {
         $displayed_content = self::getObject($this->content_group_element_row['displayed_content_id']);
         $name = "content_group_element_{$this->id}_erase_displayed_content";
         if (!empty($_REQUEST[$name]) && $_REQUEST[$name] == true) {
             if ($displayed_content->delete($errmsg) != false) {
                 $db->execSqlUpdate("UPDATE content_group_element SET displayed_content_id = NULL WHERE content_group_element_id = '{$this->id}'", FALSE);
             } else {
                 echo $errmsg;
             }
         } else {
             $displayed_content->processAdminUI();
         }
     }
 }
开发者ID:soitun,项目名称:wifidog-auth,代码行数:66,代码来源:ContentGroupElement.php

示例5: processAdminUI

 /**
  * Processes the input of the administration interface for Picture
  *
  * @return void
  */
 public function processAdminUI()
 {
     $db = AbstractDb::getObject();
     if ($this->DEPRECATEDisOwner(User::getCurrentUser()) || User::getCurrentUser()->DEPRECATEDisSuperAdmin()) {
         parent::processAdminUI();
         /*display_num_items*/
         $name = "shoutbox_{this->getId()}_display_num_items";
         $this->setDisplayNumItems($_REQUEST[$name]);
         /*max_shout_chars*/
         $name = "shoutbox_{this->getId()}_max_num_chars";
         $this->setMaxShoutChars($_REQUEST[$name]);
         /*shout_field_size*/
         $name = "shoutbox_{this->getId()}_shout_field_size";
         $this->setShoutFieldSize($_REQUEST[$name]);
         /* OnclickContent */
         $content = $this->getOnClickContent();
         if (!$content) {
             $name = "shoutbox_" . $this->id . "_onclick_content_new";
             $content = self::processNewContentUI($name);
             $this->setOnClickContent($content);
         } else {
             $name = "shoutbox_" . $this->id . "_onclick_content_erase";
             if (!empty($_REQUEST[$name]) && $_REQUEST[$name] == true) {
                 $this->setOnClickContent(null);
                 $content->delete($errmsg);
             } else {
                 $content->processAdminUI();
             }
         }
     }
 }
开发者ID:cnlangzi,项目名称:wifidog-auth,代码行数:36,代码来源:ShoutBox.php

示例6: processAdminUI

 /**
  * Processes the input of the administration interface for RssAggregator
  *
  * @return void
  */
 public function processAdminUI()
 {
     //echo "File::processAdminUI()<br/>\n";
     if ($this->DEPRECATEDisOwner(User::getCurrentUser()) || User::getCurrentUser()->DEPRECATEDisSuperAdmin()) {
         parent::processAdminUI();
         // If no file was uploaded, update filename and mime type
         if (!empty($_REQUEST["file_mode" . $this->getId()])) {
             if ($this->configEnableEditFilename && !empty($_REQUEST["file_file_name" . $this->getId()])) {
                 $this->setFilename($_REQUEST["file_file_name" . $this->getId()]);
             }
             $file_mode = $_REQUEST["file_mode" . $this->getId()];
             if ($file_mode == "by_upload") {
                 if ($this->configEnableEditMimeType && isset($_REQUEST["file_mime_type" . $this->getId()])) {
                     $this->setMimeType($_REQUEST["file_mime_type" . $this->getId()]);
                 }
                 $this->setBinaryDataFromPostVar("file_file_upload" . $this->getId());
                 $this->setURL(null);
                 // Reset the remote file size ( not used )
                 $this->setRemoteFileSize(0);
             } else {
                 if ($file_mode == "remote") {
                     $this->setURL($_REQUEST["file_url" . $this->getId()]);
                     $this->setBinaryDataOid(null);
                     // When switching from local to remote, this field does not exist yet
                     if (isset($_REQUEST["file_old_remote_size" . $this->getId()])) {
                         if ($_REQUEST["file_remote_size" . $this->getId()] != $_REQUEST["file_old_remote_size" . $this->getId()]) {
                             $this->setRemoteFileSize($_REQUEST["file_remote_size" . $this->getId()]);
                         }
                     } else {
                         $this->setRemoteFileSize(0);
                     }
                 }
             }
         }
     }
 }
开发者ID:cnlangzi,项目名称:wifidog-auth,代码行数:41,代码来源:File.php

示例7: processAdminUI

 /**
  * Processes the input of the administration interface for embedded content
  *
  * @return void
  */
 public function processAdminUI()
 {
     if ($this->DEPRECATEDisOwner(User::getCurrentUser()) || User::getCurrentUser()->DEPRECATEDisSuperAdmin()) {
         $db = AbstractDb::getObject();
         // Init values
         $errmsg = null;
         parent::processAdminUI();
         if (empty($this->embedded_content_row['embedded_file_id'])) {
             $embedded_content_file = self::processNewContentUI("embedded_file_{$this->id}_new");
             if ($embedded_content_file != null) {
                 $embedded_content_file_id = $embedded_content_file->GetId();
                 $db->execSqlUpdate("UPDATE content_embedded_content SET embedded_file_id = '{$embedded_content_file_id}' WHERE embedded_content_id = '{$this->id}'", FALSE);
             } else {
                 echo _("You MUST choose a File object or any of its siblings.");
                 $embedded_content_file->delete($errmsg);
             }
         } else {
             $embedded_content_file = self::getObject($this->embedded_content_row['embedded_file_id']);
             $name = "embeddedcontent_" . $this->id . "_embedded_file_erase";
             if (!empty($_REQUEST[$name]) && $_REQUEST[$name] == true) {
                 $db->execSqlUpdate("UPDATE content_embedded_content SET embedded_file_id = NULL WHERE embedded_content_id = '{$this->id}'", FALSE);
                 $embedded_content_file->delete($errmsg);
             } else {
                 $embedded_content_file->processAdminUI();
                 $name = "embedded_content_attributes" . $this->getId();
                 $this->setAttributes($_REQUEST[$name]);
                 $name = "embedded_content_parameters" . $this->getId();
                 $this->setParameters($_REQUEST[$name]);
             }
         }
         if (empty($this->embedded_content_row['fallback_content_id'])) {
             $fallback_content = self::processNewContentUI("fallback_content_{$this->id}_new");
             if ($fallback_content != null) {
                 $fallback_content_id = $fallback_content->GetId();
                 $db->execSqlUpdate("UPDATE content_embedded_content SET fallback_content_id = '{$fallback_content_id}' WHERE embedded_content_id = '{$this->id}'", FALSE);
             }
         } else {
             $fallback_content = self::getObject($this->embedded_content_row['fallback_content_id']);
             $name = "fallback_content_" . $this->id . "_fallback_content_erase";
             if (!empty($_REQUEST[$name]) && $_REQUEST[$name] == true) {
                 $db->execSqlUpdate("UPDATE content_embedded_content SET fallback_content_id = NULL WHERE embedded_content_id = '{$this->id}'", FALSE);
                 $fallback_content->delete($errmsg);
             } else {
                 $fallback_content->processAdminUI();
             }
         }
         $this->refresh();
     }
 }
开发者ID:cnlangzi,项目名称:wifidog-auth,代码行数:54,代码来源:EmbeddedContent.php

示例8: processAdminUI

 function processAdminUI()
 {
     // Init values
     $errmsg = null;
     if ($this->DEPRECATEDisOwner(User::getCurrentUser()) || User::getCurrentUser()->DEPRECATEDisSuperAdmin()) {
         parent::processAdminUI();
         /* content_ordering_mode */
         $name = "content_group_" . $this->id . "_content_ordering_mode";
         $this->setContentOrderingMode(FormSelectGenerator::getResult($name, null));
         /*content_changes_on_mode */
         $name = "content_group_" . $this->id . "_content_changes_on_mode";
         $this->setContentChangesOnMode(FormSelectGenerator::getResult($name, null));
         /* allow_repeat*/
         $name = "content_group_" . $this->id . "_allow_repeat";
         $this->setAllowRepeat(FormSelectGenerator::getResult($name, null));
         /*display_num_elements*/
         $name = "content_group_" . $this->id . "_display_num_elements";
         $this->setDisplayNumElements($_REQUEST[$name]);
         /* content_group_element */
         $name = "content_group_" . $this->id . "_expired_elements_shown";
         if (empty($_REQUEST[$name])) {
             $additionalWhere = "AND (valid_until_timestamp IS NULL OR valid_until_timestamp >= CURRENT_TIMESTAMP) \n";
         } else {
             $additionalWhere = null;
         }
         foreach ($this->getElements($additionalWhere) as $element) {
             $name = "content_group_" . $this->id . "_element_" . $element->GetId() . "_erase";
             if (!empty($_REQUEST[$name]) && $_REQUEST[$name] == true) {
                 $element->delete($errmsg);
             } else {
                 $element->processAdminUI();
             }
         }
         // The two following calls will either add a new element or add an existing one ( depending on what button the user clicked
         /* We explicitely call the ContentGroupElement version of processNewContentUI */
         ContentGroupElement::processNewContentUI("content_group_{$this->id}_new_element", $this);
         // Last parameters allows for existing content ( if any was selected )
         ContentGroupElement::processNewContentUI("content_group_{$this->id}_existing_element", $this, true);
     }
 }
开发者ID:cnlangzi,项目名称:wifidog-auth,代码行数:40,代码来源:ContentGroup.php

示例9: processAdminUI

 function processAdminUI()
 {
     if ($this->DEPRECATEDisOwner(User::getCurrentUser()) || User::getCurrentUser()->DEPRECATEDisSuperAdmin()) {
         parent::processAdminUI();
         $generator = new FormSelectGenerator();
         $name = "flickr_photostream_" . $this->id . "_api_key";
         !empty($_REQUEST[$name]) ? $this->setApiKey($_REQUEST[$name]) : $this->setApiKey(null);
         $name = "flickr_photostream_" . $this->id . "_api_shared_secret";
         !empty($_REQUEST[$name]) ? $this->setApiSharedSecret($_REQUEST[$name]) : $this->setApiSharedSecret(null);
         $name = "flickr_photostream_" . $this->id . "_photo_batch_size";
         !empty($_REQUEST[$name]) ? $this->setPhotoBatchSize($_REQUEST[$name]) : $this->setPhotoBatchSize(null);
         if ($generator->isPresent("DisplayMode" . $this->getID(), "FlickrPhotostream")) {
             $this->setDisplayMode($generator->getResult("DisplayMode" . $this->getID(), "FlickrPhotostream"));
         }
         if ($generator->isPresent("SelectionMode" . $this->getID(), "FlickrPhotostream")) {
             $this->setSelectionMode($generator->getResult("SelectionMode" . $this->getID(), "FlickrPhotostream"));
         }
         // Check for existing API key
         if ($this->getAPIKey() && $this->getSelectionMode()) {
             try {
                 switch ($this->getSelectionMode()) {
                     // Process common data for groups and users
                     case self::SELECT_BY_GROUP:
                         if ($generator->isPresent("GroupPhotoPool" . $this->getID(), "FlickrPhotostream")) {
                             $this->setGroupId($generator->getResult("GroupPhotoPool" . $this->getID(), "FlickrPhotostream"));
                         }
                     case self::SELECT_BY_USER:
                         $name = "flickr_photostream_" . $this->id . "_reset_user_id";
                         if (!empty($_REQUEST[$name]) || !$this->getFlickrUserId()) {
                             $this->setUserId(null);
                             $name = "flickr_photostream_" . $this->id . "_email";
                             if (!empty($_REQUEST[$name]) && ($flickr_user = $this->getUserByEmail($_REQUEST[$name])) != null) {
                                 $this->setUserId($flickr_user->getId());
                                 $this->setUserName($flickr_user->getName());
                             } else {
                                 echo _("Could not find a Flickr user with this e-mail.");
                             }
                         }
                         break;
                     case self::SELECT_BY_TAGS:
                         $name = "flickr_photostream_" . $this->id . "_tags";
                         if (!empty($_REQUEST[$name])) {
                             $this->setTags($_REQUEST[$name]);
                         } else {
                             $this->setTags(null);
                         }
                         if ($generator->isPresent("TagMode" . $this->getID(), "FlickrPhotostream")) {
                             $this->setTagMode($generator->getResult("TagMode" . $this->getID(), "FlickrPhotostream"));
                         }
                         break;
                 }
             } catch (Exception $e) {
                 echo _("Could not complete successfully the saving procedure.");
             }
             $name = "flickr_photostream_" . $this->id . "_display_title";
             !empty($_REQUEST[$name]) ? $this->setDisplayTitle(true) : $this->setDisplayTitle(false);
             $name = "flickr_photostream_" . $this->id . "_display_tags";
             !empty($_REQUEST[$name]) ? $this->setDisplayTags(true) : $this->setDisplayTags(false);
             $name = "flickr_photostream_" . $this->id . "_display_description";
             !empty($_REQUEST[$name]) ? $this->setDisplayDescription(true) : $this->setDisplayDescription(false);
             if ($generator->isPresent("PreferredSize" . $this->getID(), "FlickrPhotostream")) {
                 $this->setPreferredSize($generator->getResult("PreferredSize" . $this->getID(), "FlickrPhotostream"));
             }
         }
     }
 }
开发者ID:soitun,项目名称:wifidog-auth,代码行数:66,代码来源:FlickrPhotostream.php


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