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


PHP validateSystemid函数代码示例

本文整理汇总了PHP中validateSystemid函数的典型用法代码示例。如果您正苦于以下问题:PHP validateSystemid函数的具体用法?PHP validateSystemid怎么用?PHP validateSystemid使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     if (validateSystemid($this->getSystemid())) {
         $this->loadElementData();
     }
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:10,代码来源:class_element_admin.php

示例2: actionBrowserChooser

 /**
  * @return string
  * @autoTestable
  * @permissions view
  */
 protected function actionBrowserChooser()
 {
     $strReturn = "";
     if ($this->getParam("CKEditorFuncNum") != "") {
         $strReturn .= "<script type=\"text/javascript\">window.opener.KAJONA.admin.folderview.selectCallbackCKEditorFuncNum = " . (int) $this->getParam("CKEditorFuncNum") . ";</script>";
     }
     $intCounter = 1;
     $strReturn .= $this->objToolkit->listHeader();
     if (class_module_system_module::getModuleByName("pages") !== null) {
         $strAction = $this->objToolkit->listButton(class_link::getLinkAdmin("pages", "pagesFolderBrowser", "&pages=1&form_element=" . $this->getParam("form_element") . "&bit_link=1", $this->getLang("wysiwygPagesBrowser"), $this->getLang("wysiwygPagesBrowser"), "icon_folderActionOpen"));
         $strReturn .= $this->objToolkit->genericAdminList(generateSystemid(), $this->getLang("wysiwygPagesBrowser"), "", $strAction, $intCounter++);
     }
     $strRepoId = class_module_system_setting::getConfigValue("_mediamanager_default_filesrepoid_");
     if (validateSystemid($strRepoId) && class_module_system_module::getModuleByName("mediamanager") !== null && class_objectfactory::getInstance()->getObject($strRepoId) !== null) {
         $strAction = $this->objToolkit->listButton(class_link::getLinkAdmin("mediamanager", "folderContentFolderviewMode", "&systemid=" . $strRepoId . "&form_element=" . $this->getParam("form_element") . "&bit_link=1", $this->getLang("wysiwygFilesBrowser"), $this->getLang("wysiwygFilesBrowser"), "icon_folderActionOpen"));
         $strReturn .= $this->objToolkit->genericAdminList(generateSystemid(), $this->getLang("wysiwygFilesBrowser"), "", $strAction, $intCounter++);
     }
     $strRepoId = class_module_system_setting::getConfigValue("_mediamanager_default_imagesrepoid_");
     if (validateSystemid($strRepoId) && class_module_system_module::getModuleByName("mediamanager") !== null && class_objectfactory::getInstance()->getObject($strRepoId) !== null) {
         $strAction = $this->objToolkit->listButton(class_link::getLinkAdmin("mediamanager", "folderContentFolderviewMode", "&systemid=" . $strRepoId . "&form_element=" . $this->getParam("form_element") . "&bit_link=1", $this->getLang("wysiwygImagesBrowser"), $this->getLang("wysiwygImagesBrowser"), "icon_folderActionOpen"));
         $strReturn .= $this->objToolkit->genericAdminList(generateSystemid(), $this->getLang("wysiwygImagesBrowser"), "", $strAction, $intCounter++);
     }
     if (class_module_system_module::getModuleByName("mediamanager") !== null) {
         $strAction = $this->objToolkit->listButton(class_link::getLinkAdmin("mediamanager", "folderContentFolderviewMode", "&form_element=" . $this->getParam("form_element") . "&bit_link=1", $this->getLang("wysiwygRepoBrowser"), $this->getLang("wysiwygRepoBrowser"), "icon_folderActionOpen"));
         $strReturn .= $this->objToolkit->genericAdminList(generateSystemid(), $this->getLang("wysiwygRepoBrowser"), "", $strAction, $intCounter++);
     }
     $strReturn .= $this->objToolkit->listFooter();
     return $strReturn;
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:34,代码来源:class_module_folderview_admin.php

示例3: validate

 /**
  * Validates the passed chunk of data.
  * In most cases, this'll be a string-object.
  *
  * @param string $objValue
  * @return bool
  */
 public function validate($objValue)
 {
     if (!is_string($objValue)) {
         return false;
     }
     return validateSystemid($objValue);
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:14,代码来源:class_systemid_validator.php

示例4: test_getWorkflowsForSystemid_1

 /**
  * Tests method getWorkflowsForSystemid with existing workflow objects
  */
 public function test_getWorkflowsForSystemid_1()
 {
     $arrWorkflows = class_module_workflows_workflow::getAllworkflows();
     $arrMap = array();
     //1. Collect all workflows for all objects
     /** @var  class_module_workflows_workflow */
     foreach ($arrWorkflows as $objWorkflow) {
         $strAffectedSystemId = $objWorkflow->getStrAffectedSystemid();
         if (!validateSystemid($strAffectedSystemId)) {
             continue;
         }
         $strWorkflowClass = $objWorkflow->getStrClass();
         if (!array_key_exists($strAffectedSystemId, $arrMap)) {
             $arrMap[$strAffectedSystemId] = array();
         }
         if (!array_key_exists($strWorkflowClass, $arrMap[$strAffectedSystemId])) {
             $arrMap[$strAffectedSystemId][$strWorkflowClass] = 1;
         } else {
             $arrMap[$strAffectedSystemId][$strWorkflowClass]++;
         }
     }
     //2. Now assert
     foreach ($arrMap as $strSystemId => $arrClasses) {
         $arrWorkflows = class_module_workflows_workflow::getWorkflowsForSystemid($strSystemId, false, array_keys($arrClasses));
         $this->assertEquals(count($arrWorkflows), array_sum($arrClasses));
         $arrWorkflows = class_module_workflows_workflow::getWorkflowsForSystemid($strSystemId, false);
         $this->assertEquals(count($arrWorkflows), array_sum($arrClasses));
         foreach ($arrMap[$strSystemId] as $strClass => $intCount) {
             $arrWorkflows = class_module_workflows_workflow::getWorkflowsForSystemid($strSystemId, false, $strClass);
             $this->assertEquals(count($arrWorkflows), $intCount);
             $arrWorkflows = class_module_workflows_workflow::getWorkflowsForSystemid($strSystemId, false, array($strClass));
             $this->assertEquals(count($arrWorkflows), $intCount);
         }
     }
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:38,代码来源:test_WorkflowTest.php

示例5: getValueAsText

 /**
  * Returns a textual representation of the formentries' value.
  * May contain html, but should be stripped down to text-only.
  *
  * @return string
  */
 public function getValueAsText()
 {
     if (validateSystemid($this->getStrValue())) {
         $objUser = new class_module_user_user($this->getStrValue());
         return $objUser->getStrDisplayName();
     }
     return "";
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:14,代码来源:class_formentry_user.php

示例6: format

 /**
  * Converts the passed value to a formatted value.
  * In most scenarios, the value is written directly to the template.
  *
  * @param mixed $strValue
  *
  * @return string
  */
 public function format($strValue)
 {
     if (validateSystemid($strValue)) {
         $objUser = new class_module_user_user($strValue);
         return $objUser->getStrDisplayName();
     }
     return $strValue;
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:16,代码来源:class_user_templatemapper.php

示例7: actionDownload

 /**
  * Sends the requested file to the browser
  * @return string
  */
 public function actionDownload()
 {
     //Load filedetails
     if (validateSystemid($this->getSystemid())) {
         /** @var $objFile class_module_mediamanager_file */
         $objFile = class_objectfactory::getInstance()->getObject($this->getSystemid());
         //Succeeded?
         if ($objFile instanceof class_module_mediamanager_file && $objFile->getIntRecordStatus() == "1" && $objFile->getIntType() == class_module_mediamanager_file::$INT_TYPE_FILE) {
             //Check rights
             if ($objFile->rightRight2()) {
                 //Log the download
                 class_module_mediamanager_logbook::generateDlLog($objFile);
                 //Send the data to the browser
                 $strBrowser = getServer("HTTP_USER_AGENT");
                 //Check the current browsertype
                 if (uniStrpos($strBrowser, "IE") !== false) {
                     //Internet Explorer
                     class_response_object::getInstance()->addHeader("Content-type: application/x-ms-download");
                     class_response_object::getInstance()->addHeader("Content-type: x-type/subtype\n");
                     class_response_object::getInstance()->addHeader("Content-type: application/force-download");
                     class_response_object::getInstance()->addHeader("Content-Disposition: attachment; filename=" . preg_replace('/\\./', '%2e', saveUrlEncode(trim(basename($objFile->getStrFilename()))), substr_count(basename($objFile->getStrFilename()), '.') - 1));
                 } else {
                     //Good: another browser vendor
                     class_response_object::getInstance()->addHeader("Content-Type: application/octet-stream");
                     class_response_object::getInstance()->addHeader("Content-Disposition: attachment; filename=" . saveUrlEncode(trim(basename($objFile->getStrFilename()))));
                 }
                 //Common headers
                 class_response_object::getInstance()->addHeader("Expires: Mon, 01 Jan 1995 00:00:00 GMT");
                 class_response_object::getInstance()->addHeader("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
                 class_response_object::getInstance()->addHeader("Pragma: no-cache");
                 class_response_object::getInstance()->addHeader("Content-description: JustThum-Generated Data\n");
                 class_response_object::getInstance()->addHeader("Content-Length: " . filesize(_realpath_ . $objFile->getStrFilename()));
                 //End Session
                 $this->objSession->sessionClose();
                 class_response_object::getInstance()->sendHeaders();
                 //Loop the file
                 $ptrFile = @fopen(_realpath_ . $objFile->getStrFilename(), 'rb');
                 fpassthru($ptrFile);
                 @fclose($ptrFile);
                 ob_flush();
                 flush();
                 return "";
             } else {
                 class_response_object::getInstance()->setStrStatusCode(class_http_statuscodes::SC_FORBIDDEN);
             }
         } else {
             class_response_object::getInstance()->setStrStatusCode(class_http_statuscodes::SC_NOT_FOUND);
         }
     } else {
         class_response_object::getInstance()->setStrStatusCode(class_http_statuscodes::SC_NOT_FOUND);
     }
     //if we reach up here, something gone wrong :/
     class_response_object::getInstance()->setStrRedirectUrl(str_replace(array("_indexpath_", "&amp;"), array(_indexpath_, "&"), class_link::getLinkPortalHref(class_module_system_setting::getConfigValue("_pages_errorpage_"))));
     class_response_object::getInstance()->sendHeaders();
     class_response_object::getInstance()->sendContent();
     return "";
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:61,代码来源:download.php

示例8: generateFieldsFromObject

 /**
  * @inheritDoc
  */
 public function generateFieldsFromObject()
 {
     parent::generateFieldsFromObject();
     if (validateSystemid($this->getField("userid")->getStrValue())) {
         $this->getField("userid")->setBitMandatory(true);
         $this->getField("forename")->setBitMandatory(false);
         $this->getField("lastname")->setBitMandatory(false);
         $this->getField("email")->setBitMandatory(false);
     }
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:13,代码来源:class_module_eventmanager_participant_formgenerator.php

示例9: generateImage

 /**
  * Here happens the magic: creating the image and sending it to the browser
  * @return void
  */
 public function generateImage()
 {
     //switch the different modes - may be want to generate a detailed image-view
     if (validateSystemid($this->strSystemid) && validateSystemid($this->strElementId)) {
         class_carrier::getInstance()->getObjConfig()->loadConfigsDatabase(class_carrier::getInstance()->getObjDB());
         $this->generateMediamanagerImage();
     } else {
         class_carrier::getInstance()->getObjSession()->sessionClose();
         $this->resizeImage();
     }
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:15,代码来源:image.php

示例10: actionPwdReset

 /**
  * Creates a form in order to change the password - if the authcode is valid
  *
  * @return string
  */
 protected function actionPwdReset()
 {
     $strReturn = "";
     if (!validateSystemid($this->getParam("systemid"))) {
         return $this->getLang("login_change_error", "user");
     }
     $objUser = new class_module_user_user($this->getParam("systemid"));
     if ($objUser->getStrAuthcode() != "" && $this->getParam("authcode") == $objUser->getStrAuthcode() && $objUser->getStrUsername() != "") {
         if ($this->getParam("reset") == "") {
             //Loading a small form to change the password
             $strTemplateID = $this->objTemplate->readTemplate("/elements.tpl", "login_form");
             $arrTemplate = array();
             $strForm = "";
             $strForm .= $this->objToolkit->getTextRow($this->getLang("login_password_form_intro", "user"));
             $strForm .= $this->objToolkit->formHeader(class_link::getLinkAdminHref($this->getArrModule("modul"), "pwdReset"));
             $strForm .= $this->objToolkit->formInputText("username", $this->getLang("login_loginUser", "user"), "", "inputTextShort");
             $strForm .= $this->objToolkit->formInputPassword("password1", $this->getLang("login_loginPass", "user"), "", "inputTextShort");
             $strForm .= $this->objToolkit->formInputPassword("password2", $this->getLang("login_loginPass2", "user"), "", "inputTextShort");
             $strForm .= $this->objToolkit->formInputSubmit($this->getLang("login_changeButton", "user"), "", "", "inputSubmitShort");
             $strForm .= $this->objToolkit->formInputHidden("reset", "reset");
             $strForm .= $this->objToolkit->formInputHidden("authcode", $this->getParam("authcode"));
             $strForm .= $this->objToolkit->formInputHidden("systemid", $this->getParam("systemid"));
             $strForm .= $this->objToolkit->formClose();
             $arrTemplate["form"] = $strForm;
             $arrTemplate["loginTitle"] = $this->getLang("login_loginTitle", "user");
             $arrTemplate["loginJsInfo"] = $this->getLang("login_loginJsInfo", "user");
             $arrTemplate["loginCookiesInfo"] = $this->getLang("login_loginCookiesInfo", "user");
             //An error occurred?
             if ($this->getParam("loginerror") == 1) {
                 $arrTemplate["error"] = $this->getLang("login_loginError", "user");
             }
             $strReturn = $this->objTemplate->fillTemplate($arrTemplate, $strTemplateID);
         } else {
             //check the submitted passwords.
             $strPass1 = trim($this->getParam("password1"));
             $strPass2 = trim($this->getParam("password2"));
             if ($strPass1 == $strPass2 && checkText($strPass1, 3, 200) && $objUser->getStrUsername() == $this->getParam("username")) {
                 if ($objUser->getObjSourceUser()->isPasswordResettable() && method_exists($objUser->getObjSourceUser(), "setStrPass")) {
                     $objUser->getObjSourceUser()->setStrPass($strPass1);
                     $objUser->getObjSourceUser()->updateObjectToDb();
                 }
                 $objUser->setStrAuthcode("");
                 $objUser->updateObjectToDb();
                 class_logger::getInstance()->addLogRow("changed password of user " . $objUser->getStrUsername(), class_logger::$levelInfo);
                 $strReturn .= $this->getLang("login_change_success", "user");
             } else {
                 $strReturn .= $this->getLang("login_change_error", "user");
             }
         }
     } else {
         $strReturn .= $this->getLang("login_change_error", "user");
     }
     return $strReturn;
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:59,代码来源:class_module_login_admin.php

示例11: loadData

 /**
  * Returns the ready switch-htmlcode
  *
  * @return string
  */
 public function loadData()
 {
     //fallback for old elements not yet using the template
     if (!isset($this->arrElementData["char1"]) || $this->arrElementData["char1"] == "") {
         $this->arrElementData["char1"] = "languageswitch.tpl";
     }
     $arrObjLanguages = class_module_languages_language::getObjectList(true);
     //load the languageset in order to generate more specific switches
     $objLanguageset = class_module_languages_languageset::getLanguagesetForSystemid($this->getParam("systemid"));
     //Iterate over all languages
     $strRows = "";
     foreach ($arrObjLanguages as $objOneLanguage) {
         //Check, if the current page has elements
         $objPage = class_module_pages_page::getPageByName($this->getPagename());
         $objPage->setStrLanguage($objOneLanguage->getStrName());
         if ($objPage === null) {
             continue;
         }
         if ((int) $objPage->getNumberOfElementsOnPage(true) == 0) {
             continue;
         }
         $strTargetSystemid = null;
         if ($objLanguageset != null) {
             $strTargetSystemid = $objLanguageset->getSystemidForLanguageid($objOneLanguage->getSystemid());
         }
         //the languageswitch is content aware. check if the target id is a news-entry
         $strSeoAddon = "";
         if (validateSystemid($strTargetSystemid)) {
             $objRecord = class_objectfactory::getInstance()->getObject($strTargetSystemid);
             $strSeoAddon = $objRecord->getStrDisplayName();
         }
         //and the link
         $arrTemplate = array();
         if ($strTargetSystemid === null) {
             $arrTemplate["href"] = getLinkPortalHref($objPage->getStrName(), "", "", "", "", $objOneLanguage->getStrName(), $strSeoAddon);
         } else {
             $arrTemplate["href"] = getLinkPortalHref($objPage->getStrName(), "", $this->getAction(), "", $strTargetSystemid, $objOneLanguage->getStrName(), $strSeoAddon);
         }
         $arrTemplate["langname_short"] = $objOneLanguage->getStrName();
         $arrTemplate["langname_long"] = $this->getLang("lang_" . $objOneLanguage->getStrName());
         $strTemplateRowID = $this->objTemplate->readTemplate("/element_languageswitch/" . $this->arrElementData["char1"], "languageswitch_entry");
         $strTemplateActiveRowID = $this->objTemplate->readTemplate("/element_languageswitch/" . $this->arrElementData["char1"], "languageswitch_entry_active");
         if ($objOneLanguage->getStrName() == $this->getStrPortalLanguage()) {
             $strRows .= $this->fillTemplate($arrTemplate, $strTemplateActiveRowID);
         } else {
             $strRows .= $this->fillTemplate($arrTemplate, $strTemplateRowID);
         }
     }
     $strTemplateWrapperID = $this->objTemplate->readTemplate("/element_languageswitch/" . $this->arrElementData["char1"], "languageswitch_wrapper");
     return $this->fillTemplate(array("languageswitch_entries" => $strRows), $strTemplateWrapperID);
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:56,代码来源:class_element_languageswitch_portal.php

示例12: executeTask

 /**
  * @see interface_admin_systemtask::executeTask()
  * @return string
  */
 public function executeTask()
 {
     if (!class_module_system_module::getModuleByName("system")->rightRight2()) {
         return $this->getLang("commons_error_permissions");
     }
     //try to load and update the systemrecord
     if (validateSystemid($this->getParam("systemstatus_systemid"))) {
         $objRecord = new class_module_system_common($this->getParam("systemstatus_systemid"));
         $objRecord->setIntRecordStatus($this->getParam("systemstatus_status"));
         $objRecord->updateObjectToDb();
         return $this->objToolkit->getTextRow($this->getLang("systemtask_status_success"));
     }
     return $this->objToolkit->getTextRow($this->getLang("systemtask_status_error"));
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:18,代码来源:class_systemtask_systemstatus.php

示例13: generateFieldsFromObject

 /**
  * @inheritDoc
  */
 public function generateFieldsFromObject()
 {
     parent::generateFieldsFromObject();
     if (validateSystemid($this->getField("messagerefid")->getStrValue()) && $this->getField("body")->getStrValue() == "") {
         $objRefMessage = class_objectfactory::getInstance()->getObject($this->getField("messagerefid")->getStrValue());
         if ($objRefMessage instanceof class_module_messaging_message) {
             $arrBody = preg_split('/$\\R?^/m', $objRefMessage->getStrBody());
             array_walk($arrBody, function (&$strValue) {
                 $strValue = "> " . $strValue;
             });
             $this->getField("body")->setStrValue("\r\n\r\n\r\n" . implode("\r\n", $arrBody));
         }
     }
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:17,代码来源:class_module_messaging_message_formgenerator.php

示例14: processDirectly

 /**
  * Handles the processing of objects directly
  */
 private function processDirectly()
 {
     $objIndex = new class_module_search_indexwriter();
     //start by processing the records to be deleted
     foreach (self::$arrToDelete as $strOneId => $strObject) {
         $objIndex->removeRecordFromIndex($strOneId);
     }
     //add new records
     foreach (self::$arrToIndex as $strOneId => $objInstance) {
         if (!is_object($objIndex) && validateSystemid($objInstance)) {
             $objInstance = class_objectfactory::getInstance()->getObject($objInstance);
         }
         $objIndex->indexObject($objInstance);
     }
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:18,代码来源:class_module_search_request_endprocessinglistener.php

示例15: handleEvent

 /**
  * Implementing callback to react on user-delete events
  *
  * Called whenever a record was deleted using the common methods.
  * Implement this method to be notified when a record is deleted, e.g. to to additional cleanups afterwards.
  * There's no need to register the listener, this is done automatically.
  *
  * Make sure to return a matching boolean-value, otherwise the transaction may be rolled back.
  *
  * @param string $strEventName
  * @param array $arrArguments
  *
  * @return bool
  */
 public function handleEvent($strEventName, array $arrArguments)
 {
     //unwrap arguments
     list($strSystemid, $strSourceClass) = $arrArguments;
     if ($strSourceClass == "class_module_user_user" && validateSystemid($strSystemid)) {
         $objORM = new class_orm_objectlist();
         $objORM->addWhereRestriction(new class_orm_objectlist_property_restriction("strUser", class_orm_comparator_enum::Equal(), $strSystemid));
         $objORM->setObjHandleLogicalDeleted(class_orm_deletedhandling_enum::INCLUDED());
         $arrWidgets = $objORM->getObjectList("class_module_dashboard_widget");
         foreach ($arrWidgets as $objWidget) {
             $objWidget->deleteObjectFromDatabase();
         }
     }
     return true;
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:29,代码来源:class_module_dashboard_recorddeletedlistener.php


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