• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP generateSystemid函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: 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


示例2: __construct

 /**
  * Contructor
  *
  * @param $objElementData
  */
 public function __construct($objElementData)
 {
     parent::__construct($objElementData);
     if ($this->getParam("action") == "saveGuestbook") {
         $this->setStrCacheAddon(generateSystemid());
     }
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:12,代码来源:class_element_guestbook_portal.php


示例3: generateLogEntry

 /**
  * Generates a new entry in the log-table
  *
  * @param string $strSeachterm
  *
  * @return bool
  * @static
  */
 public static function generateLogEntry($strSeachterm)
 {
     $objLanguage = new class_module_languages_language();
     $strLanguage = $objLanguage->getStrPortalLanguage();
     $strQuery = "INSERT INTO " . _dbprefix_ . "search_log \n                    (search_log_id, search_log_date, search_log_query, search_log_language) VALUES\n                    (?, ?, ?, ? )";
     return class_carrier::getInstance()->getObjDB()->_pQuery($strQuery, array(generateSystemid(), (int) time(), $strSeachterm, $strLanguage));
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:15,代码来源:class_module_search_log.php


示例4: generateDlLog

 /**
  * Generates an entry in the logbook an increases the hits-counter
  *
  * @param \class_module_mediamanager_file $objFile
  */
 public static function generateDlLog(class_module_mediamanager_file $objFile)
 {
     $objDB = class_carrier::getInstance()->getObjDB();
     $strQuery = "INSERT INTO " . _dbprefix_ . "mediamanager_dllog\n\t                   (downloads_log_id, downloads_log_date, downloads_log_file, downloads_log_user, downloads_log_ip) VALUES\n\t                   (?, ?, ?, ?, ?)";
     $objDB->_pQuery($strQuery, array(generateSystemid(), (int) time(), basename($objFile->getStrFilename()), class_carrier::getInstance()->getObjSession()->getUsername(), getServer("REMOTE_ADDR")));
     $objFile->increaseHits();
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:12,代码来源:class_module_mediamanager_logbook.php


示例5: setUp

 protected function setUp()
 {
     $objObject = $this->createObject("class_module_system_aspect", "");
     self::$arrObjectIds[] = $objObject->getSystemid();
     $objSearchIndexWriter = new class_module_search_indexwriter();
     $objSearchIndexWriter->clearIndex();
     $objSearchDocument_1 = new class_module_search_document();
     $objSearchDocument_1->setStrSystemId($objObject->getSystemid());
     $objSearchDocument_1->setDocumentId(generateSystemid());
     $objSearchDocument_1->addContent("title", "hallo");
     $objSearchDocument_1->addContent("text", "welt");
     $objSearchDocument_1->addContent("subtitle", "blub");
     $objSearchDocument_1->addContent("text2", "blub");
     $objObject = $this->createObject("class_module_search_search", "");
     self::$arrObjectIds[] = $objObject->getSystemid();
     $objSearchDocument_2 = new class_module_search_document();
     $objSearchDocument_2->setStrSystemId($objObject->getSystemid());
     $objSearchDocument_2->setDocumentId(generateSystemid());
     $objSearchDocument_2->addContent("title", "hallo");
     $objSearchDocument_2->addContent("text", "welt");
     $objObject = $this->createObject("class_module_system_aspect", "");
     self::$arrObjectIds[] = $objObject->getSystemid();
     $objSearchDocument_3 = new class_module_search_document();
     $objSearchDocument_3->setStrSystemId($objObject->getSystemid());
     $objSearchDocument_3->setDocumentId(generateSystemid());
     $objSearchDocument_3->addContent("title", "lorem ipsum dolor ipsum");
     $objSearchDocument_3->addContent("text", "dolor ipsum sit amet, consetetur.");
     $objSearchIndexWriter->updateSearchDocumentToDb($objSearchDocument_1);
     $objSearchIndexWriter->updateSearchDocumentToDb($objSearchDocument_2);
     $objSearchIndexWriter->updateSearchDocumentToDb($objSearchDocument_3);
     parent::setUp();
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:32,代码来源:test_searchBooleanQueryTest.php


示例6: testCopyPage

 public function testCopyPage()
 {
     $strTitle = generateSystemid();
     $objPage = new class_module_pages_page();
     $objPage->setStrName($strTitle);
     $objPage->setStrBrowsername(generateSystemid());
     $objPage->setStrSeostring(generateSystemid());
     $objPage->setStrDesc(generateSystemid());
     $objPage->setStrTemplate("standard.tpl");
     $objPage->updateObjectToDb();
     $strOldSystemid = $objPage->getSystemid();
     $objPagelement = new class_module_pages_pageelement();
     $objPagelement->setStrPlaceholder("text_paragraph");
     $objPagelement->setStrName("text");
     $objPagelement->setStrElement("paragraph");
     $objPagelement->updateObjectToDb($objPage->getSystemid());
     $objPagelement = new class_module_pages_pageelement($objPagelement->getSystemid());
     //and finally create the object
     /** @var $objElement class_element_paragraph_admin */
     $objElement = $objPagelement->getConcreteAdminInstance();
     $objElement->setStrTitle("autotest");
     $objElement->doBeforeSaveToDb();
     $objElement->updateForeignElement();
     $objElement->doAfterSaveToDb();
     //copy the page itself
     $objPage->copyObject();
     $strNewSystemid = $objPage->getSystemid();
     $this->flushDBCache();
     $objOldPage = new class_module_pages_page($strOldSystemid);
     $objNewPage = new class_module_pages_page($strNewSystemid);
     $this->assertNotEquals($objOldPage->getStrName(), $objNewPage->getStrName());
     $this->assertEquals($objOldPage->getStrBrowsername(), $objNewPage->getStrBrowsername());
     $this->assertEquals($objOldPage->getStrSeostring(), $objNewPage->getStrSeostring());
     $this->assertEquals($objOldPage->getStrDesc(), $objNewPage->getStrDesc());
     $this->assertEquals($objOldPage->getStrTemplate(), $objNewPage->getStrTemplate());
     $arrOldElements = class_module_pages_pageelement::getAllElementsOnPage($strOldSystemid);
     $arrNewElements = class_module_pages_pageelement::getAllElementsOnPage($strNewSystemid);
     $this->assertEquals(count($arrOldElements), count($arrNewElements));
     $this->assertEquals(1, count($arrOldElements));
     $this->assertEquals(1, count($arrNewElements));
     $objOldElement = $arrOldElements[0];
     $objNewElement = $arrNewElements[0];
     $this->assertEquals($objOldElement->getStrPlaceholder(), $objNewElement->getStrPlaceholder());
     $this->assertEquals($objOldElement->getStrLanguage(), $objNewElement->getStrLanguage());
     $this->assertEquals($objOldElement->getStrElement(), $objNewElement->getStrElement());
     /** @var class_element_paragraph_admin $objOldElementInstance */
     $objOldElementInstance = $objOldElement->getConcreteAdminInstance();
     $arrOldElementData = $objOldElementInstance->loadElementData();
     /** @var class_element_paragraph_admin $objNewElementInstance */
     $objNewElementInstance = $objNewElement->getConcreteAdminInstance();
     $arrNewElementData = $objNewElementInstance->loadElementData();
     $this->assertNotEquals($arrOldElementData["content_id"], $arrNewElementData["content_id"]);
     $this->assertEquals($arrOldElementData["paragraph_title"], $arrNewElementData["paragraph_title"]);
     $this->assertEquals($objOldElementInstance->getStrTitle(), $objNewElementInstance->getStrTitle());
     $this->assertEquals($objOldElementInstance->getStrTitle(), "autotest");
     $this->assertEquals($objNewElementInstance->getStrTitle(), "autotest");
     $objNewPage->deleteObjectFromDatabase();
     $objOldPage->deleteObjectFromDatabase();
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:59,代码来源:test_pagesTest.php


示例7: __construct

 public function __construct($strName = "")
 {
     if ($strName == "") {
         $strName = generateSystemid();
     }
     parent::__construct("", $strName);
     //set the default validator
     $this->setObjValidator(new class_dummy_validator());
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:9,代码来源:class_formentry_headline.php


示例8: __construct

 public function __construct($strForm = "", $strName = "", $objSourceObject = null)
 {
     if ($strName == "") {
         $strName = generateSystemid();
     }
     class_formentry_base::__construct($strForm, $strName, $objSourceObject);
     //set the default validator
     $this->setObjValidator(new class_dummy_validator());
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:9,代码来源:class_formentry_autoheadline.php


示例9: testImportExport

 public function testImportExport()
 {
     class_carrier::getInstance()->getObjRights()->setBitTestMode(true);
     $strName = generateSystemid();
     $strBrowsername = generateSystemid();
     $strSeoString = generateSystemid();
     $strDesc = generateSystemid();
     $objPage = new class_module_pages_page();
     $objPage->setStrName($strName);
     $objPage->setStrBrowsername($strBrowsername);
     $objPage->setStrSeostring($strSeoString);
     $objPage->setStrDesc($strDesc);
     $objPage->setStrTemplate("standard.tpl");
     $objPage->updateObjectToDb();
     $strPagesystemid = $objPage->getSystemid();
     $objPagelement = new class_module_pages_pageelement();
     $objPagelement->setStrPlaceholder("text_paragraph");
     $objPagelement->setStrName("text");
     $objPagelement->setStrElement("paragraph");
     $objPagelement->updateObjectToDb($objPage->getSystemid());
     $objElement = new class_element_paragraph_admin($objPagelement->getSystemid());
     $objElement->setSystemid($objPagelement->getSystemid());
     $objElement->loadElementData();
     $objElement->setStrTitle("para_title");
     $objElement->updateForeignElement();
     $objPagelement = new class_module_pages_pageelement($objPagelement->getSystemid());
     class_carrier::getInstance()->setParam("pageExport", $strName);
     $objPageExport = new class_systemtask_pageexport();
     $objPageExport->executeTask();
     $objPage->deleteObjectFromDatabase();
     class_orm_rowcache::flushCache();
     class_db::getInstance()->flushQueryCache();
     $this->assertNull(class_module_pages_page::getPageByName($strName));
     $this->assertFileExists(_realpath_ . _projectpath_ . "/temp/" . $strPagesystemid . ".xml");
     class_carrier::getInstance()->setParam("pageimport_file", _projectpath_ . "/temp/" . $strPagesystemid . ".xml");
     $objImport = new class_systemtask_pageimport();
     $objImport->executeTask();
     $objPage = class_module_pages_page::getPageByName($strName);
     $this->assertNotNull($objPage);
     $this->assertEquals($objPage->getStrName(), $strName);
     $this->assertEquals($objPage->getStrDesc(), $strDesc);
     $this->assertEquals($objPage->getStrSeostring(), $strSeoString);
     $this->assertEquals($objPage->getStrBrowsername(), $strBrowsername);
     $objElements = class_module_pages_pageelement::getAllElementsOnPage($objPage->getSystemid());
     $this->assertEquals(1, count($objElements));
     $objElements = $objElements[0];
     $this->assertEquals($objElements->getStrClassAdmin(), "class_element_paragraph_admin.php");
     $objElement = $objElements->getConcreteAdminInstance();
     $objElement->setSystemid($objElements->getSystemid());
     $objElement->loadElementData();
     $this->assertEquals("para_title", $objElement->getStrTitle());
     $objPage->deleteObjectFromDatabase();
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:53,代码来源:test_pageimportexportTest.php


示例10: processDeferred

 /**
  * Creates a new workflow-instance in order to index changed objects in a decoupled process
  */
 private function processDeferred()
 {
     $arrRows = array();
     foreach (array_keys(self::$arrToIndex) as $strOneId) {
         $arrRows[] = array(generateSystemid(), $strOneId, class_search_enum_indexaction::INDEX() . "");
     }
     foreach (array_keys(self::$arrToDelete) as $strOneId) {
         $arrRows[] = array(generateSystemid(), $strOneId, class_search_enum_indexaction::DELETE() . "");
     }
     $objQueue = new class_search_indexqueue();
     $objQueue->addRowsToQueue($arrRows);
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:15,代码来源:class_module_search_request_endprocessinglistener.php


示例11: handleEvent

 /**
  * Called whenever a record was copied.
  * copies the tag-assignments from the source object to the target object
  *
  * @param string $strEventName
  * @param array $arrArguments
  *
  * @return bool
  */
 public function handleEvent($strEventName, array $arrArguments)
 {
     //unwrap arguments
     $strOldSystemid = $arrArguments[0];
     $strNewSystemid = $arrArguments[1];
     $strQuery = "SELECT tags_tagid, tags_attribute, tags_owner\n                       FROM " . _dbprefix_ . "tags_member\n                      WHERE tags_systemid = ?";
     $arrRows = class_carrier::getInstance()->getObjDB()->getPArray($strQuery, array($strOldSystemid));
     foreach ($arrRows as $arrSingleRow) {
         $strQuery = "INSERT INTO " . _dbprefix_ . "tags_member (tags_memberid, tags_tagid, tags_systemid, tags_attribute, tags_owner) VALUES (?, ?, ?, ?, ?)";
         class_carrier::getInstance()->getObjDB()->_pQuery($strQuery, array(generateSystemid(), $arrSingleRow["tags_tagid"], $strNewSystemid, $arrSingleRow["tags_attribute"], $arrSingleRow["tags_owner"]));
     }
     return true;
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:22,代码来源:class_module_tags_recordcopiedlistener.php


示例12: test

 public function test()
 {
     $objDB = class_carrier::getInstance()->getObjDB();
     echo "testing database...\n";
     echo "current driver: " . class_carrier::getInstance()->getObjConfig()->getConfig("dbdriver") . "\n";
     echo "\tcreating a new table...\n";
     $arrFields = array();
     $arrFields["temp_id"] = array("char20", false);
     $arrFields["temp_long"] = array("long", true);
     $arrFields["temp_double"] = array("double", true);
     $arrFields["temp_char10"] = array("char10", true);
     $arrFields["temp_char20"] = array("char20", true);
     $arrFields["temp_char100"] = array("char100", true);
     $arrFields["temp_char254"] = array("char254", true);
     $arrFields["temp_char500"] = array("char500", true);
     $arrFields["temp_text"] = array("text", true);
     $this->assertTrue($objDB->createTable("temp_autotest", $arrFields, array("temp_id")), "testTx createTable");
     echo "\ttesting non-tx mode..\n";
     echo "\tcreating 50 records...\n";
     $intI = 1;
     $strQuery = "INSERT INTO " . _dbprefix_ . "temp_autotest\n            (temp_id, temp_long, temp_double, temp_char10, temp_char20, temp_char100, temp_char254, temp_char500, temp_text)\n            VALUES\n            ('" . generateSystemid() . "', 123456" . $intI . ", 23.45" . $intI . ", '" . $intI . "', 'char20" . $intI . "', 'char100" . $intI . "', 'char254" . $intI . "', 'char500" . $intI . "', 'text" . $intI . "')";
     $this->assertTrue($objDB->_query($strQuery), "testTx insert");
     echo "\tgetRow test\n";
     $strQuery = "SELECT * FROM " . _dbprefix_ . "temp_autotest ORDER BY temp_long ASC";
     $arrRow = $objDB->getPArray($strQuery, array());
     $this->assertEquals(count($arrRow), 1, "testDataBase getRow count");
     $this->assertEquals($arrRow[0]["temp_char10"], "1", "testTx getRow content");
     $objDB->flushQueryCache();
     echo "starting tx...\n";
     $objDB->transactionBegin();
     $intI = 2;
     $strQuery = "INSERT INTO " . _dbprefix_ . "temp_autotest\n            (temp_id, temp_long, temp_double, temp_char10, temp_char20, temp_char100, temp_char254, temp_char500, temp_text)\n            VALUES\n            ('" . generateSystemid() . "', 123456" . $intI . ", 23.45" . $intI . ", '" . $intI . "', 'char20" . $intI . "', 'char100" . $intI . "', 'char254" . $intI . "', 'char500" . $intI . "', 'text" . $intI . "')";
     $this->assertTrue($objDB->_query($strQuery), "testTx insert");
     echo "rollback...\n";
     $objDB->transactionRollback();
     $arrCount = $objDB->getPRow("SELECT COUNT(*) FROM " . _dbprefix_ . "temp_autotest", array());
     $this->assertEquals($arrCount["COUNT(*)"], 1, "testTx rollback");
     $objDB->flushQueryCache();
     echo "starting tx...\n";
     $objDB->transactionBegin();
     $this->assertTrue($objDB->_query($strQuery), "testTx insert");
     echo "commit...\n";
     $objDB->transactionCommit();
     $arrCount = $objDB->getPRow("SELECT COUNT(*) FROM " . _dbprefix_ . "temp_autotest", array());
     $this->assertEquals($arrCount["COUNT(*)"], 2, "testTx rollback");
     $objDB->flushQueryCache();
     echo "\tdeleting table\n";
     $strQuery = "DROP TABLE " . _dbprefix_ . "temp_autotest";
     $this->assertTrue($objDB->_query($strQuery), "testTx dropTable");
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:50,代码来源:test_databaseTxTest.php


示例13: updateObjectToDb

 /**
  * Updates the current object to the database.
  * Overwrites class_roots' logic since a ldap group is not reflected in the system-table
  *
  * @param bool $strPrevId
  *
  * @return bool
  */
 public function updateObjectToDb($strPrevId = false)
 {
     //mode-splitting
     if ($this->getSystemid() == "") {
         class_logger::getInstance(class_logger::USERSOURCES)->addLogRow("saved new ldap group " . $this->getStrSystemid(), class_logger::$levelInfo);
         $strGrId = generateSystemid();
         $this->setSystemid($strGrId);
         $strQuery = "INSERT INTO " . _dbprefix_ . "user_group_ldap\r\n                          (group_ldap_id, group_ldap_dn, group_ldap_cfg) VALUES\r\n                          (?, ?, ?)";
         return $this->objDB->_pQuery($strQuery, array($strGrId, $this->getStrDn(), $this->getIntCfg()));
     } else {
         class_logger::getInstance(class_logger::USERSOURCES)->addLogRow("updated ldap group " . $this->getSystemid(), class_logger::$levelInfo);
         $strQuery = "UPDATE " . _dbprefix_ . "user_group_ldap\r\n                            SET group_ldap_dn=?, group_ldap_cfg=?\r\n                          WHERE group_ldap_id=?";
         return $this->objDB->_pQuery($strQuery, array($this->getStrDn(), $this->getIntCfg(), $this->getSystemid()));
     }
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:23,代码来源:class_usersources_group_ldap.php


示例14: updateObjectToDb

 /**
  * Updates the current object to the database
  *
  * @param bool $strPrevId
  *
  * @return bool
  */
 public function updateObjectToDb($strPrevId = false)
 {
     if ($this->getSystemid() == "") {
         $strUserid = generateSystemid();
         $this->setSystemid($strUserid);
         $strQuery = "INSERT INTO " . _dbprefix_ . "user_ldap (\r\n                        user_ldap_id, \r\n                        user_ldap_email, user_ldap_familyname,\r\n                        user_ldap_givenname, user_ldap_dn, user_ldap_cfg\r\n\r\n                        ) VALUES (?,?,?,?,?,?)";
         class_logger::getInstance(class_logger::USERSOURCES)->addLogRow("new ldap user: " . $this->getStrDN(), class_logger::$levelInfo);
         return $this->objDB->_pQuery($strQuery, array($strUserid, $this->getStrEmail(), $this->getStrName(), $this->getStrForename(), $this->getStrDN(), $this->getIntCfg()));
     } else {
         $strQuery = "UPDATE " . _dbprefix_ . "user_ldap SET\r\n                        user_ldap_email=?, user_ldap_familyname=?, user_ldap_givenname=?, user_ldap_dn=?, user_ldap_cfg=? WHERE user_ldap_id = ?";
         $arrParams = array($this->getStrEmail(), $this->getStrFamilyname(), $this->getStrGivenname(), $this->getStrDN(), $this->getIntCfg(), $this->getSystemid());
         class_logger::getInstance(class_logger::USERSOURCES)->addLogRow("updated user " . $this->getStrDN(), class_logger::$levelInfo);
         return $this->objDB->_pQuery($strQuery, $arrParams);
     }
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:22,代码来源:class_usersources_user_ldap.php


示例15: generateLog

 /**
  * Generates a login-log-entry
  *
  * @param int $intStatus
  * @param string $strOtherUsername
  *
  * @return bool
  * @static
  */
 public static function generateLog($intStatus = 1, $strOtherUsername = "")
 {
     $arrParams = array();
     $strQuery = "INSERT INTO " . _dbprefix_ . "user_log\n\t\t\t\t\t\t(user_log_id, user_log_userid, user_log_date, user_log_status, user_log_ip, user_log_sessid) VALUES\n\t\t\t\t\t\t(?, ?, ?, ?, ?, ?)";
     $arrParams[] = generateSystemid();
     if ($strOtherUsername == "") {
         $arrParams[] = class_carrier::getInstance()->getObjSession()->getUserID() == "" ? "0" : class_carrier::getInstance()->getObjSession()->getUserID();
     } else {
         $arrParams[] = $strOtherUsername;
     }
     $arrParams[] = class_date::getCurrentTimestamp();
     $arrParams[] = (int) $intStatus;
     $arrParams[] = getServer("REMOTE_ADDR");
     $arrParams[] = class_carrier::getInstance()->getObjSession()->getInternalSessionId();
     return class_carrier::getInstance()->getObjDB()->_pQuery($strQuery, $arrParams);
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:25,代码来源:class_module_user_log.php


示例16: updateObjectToDb

 /**
  * Updates the current state to the database
  *
  * @param bool $strPrevId
  *
  * @return bool
  */
 public function updateObjectToDb($strPrevId = false)
 {
     //new one or existing one?
     if ($this->getSystemid() == "") {
         $strSystemid = generateSystemid();
         $this->setSystemid($strSystemid);
     } else {
         //remove old records
         $strQuery = "DELETE FROM " . _dbprefix_ . "languages_languageset WHERE languageset_id = ?";
         $this->objDB->_pQuery($strQuery, array($this->getSystemid()));
     }
     class_logger::getInstance()->addLogRow("updating languageset " . $this->getSystemid(), class_logger::$levelInfo);
     $arrValues = array();
     foreach ($this->arrLanguageSet as $strLanguage => $strSystemid) {
         $arrValues[] = array($this->getSystemid(), $strLanguage, $strSystemid);
     }
     return $this->objDB->multiInsert("languages_languageset", array("languageset_id", "languageset_language", "languageset_systemid"), $arrValues);
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:25,代码来源:class_module_languages_languageset.php


示例17: testInserts

 public function testInserts()
 {
     $objDB = class_carrier::getInstance()->getObjDB();
     echo "testing database...\n";
     echo "current driver: " . class_carrier::getInstance()->getObjConfig()->getConfig("dbdriver") . "\n";
     echo "\tcreating a new table...\n";
     $arrFields = array();
     $arrFields["temp_id"] = array("char20", false);
     $arrFields["temp_char100"] = array("char100", true);
     $arrFields["temp_char254"] = array("char254", true);
     $this->assertTrue($objDB->createTable("temp_autotest", $arrFields, array("temp_id")), "testDataBase createTable");
     echo "\tcreating 50 records...\n";
     $arrValues = array();
     for ($intI = 1; $intI <= 50; $intI++) {
         $arrValues[] = array(generateSystemid(), "text long " . $intI, "text " . $intI);
     }
     $this->assertTrue($objDB->multiInsert("temp_autotest", array("temp_id", "temp_char254", "temp_char100"), $arrValues));
     $arrRow = $objDB->getPRow("SELECT COUNT(*) FROM " . _dbprefix_ . "temp_autotest", array());
     $this->assertEquals($arrRow["COUNT(*)"], 50);
     for ($intI = 1; $intI <= 50; $intI++) {
         $arrRow = $objDB->getPRow("SELECT COUNT(*) FROM " . _dbprefix_ . "temp_autotest WHERE temp_char100 = ?", array("text " . $intI));
         $this->assertEquals($arrRow["COUNT(*)"], 1);
         $arrRow = $objDB->getPRow("SELECT * FROM " . _dbprefix_ . "temp_autotest WHERE temp_char100 = ?", array("text " . $intI));
         $this->assertEquals($arrRow["temp_char254"], "text long " . $intI);
     }
     $strQuery = "DELETE FROM " . _dbprefix_ . "temp_autotest";
     $this->assertTrue($objDB->_pQuery($strQuery, array()), "testDataBase truncateTable");
     $objDB->flushQueryCache();
     $strQuery = "SELECT COUNT(*) FROM " . _dbprefix_ . "temp_autotest";
     $this->assertEquals(0, $objDB->getPRow($strQuery, array())["COUNT(*)"], "testDataBase countLimitReach");
     $objDB->flushQueryCache();
     echo "\tcreating 1200 records...\n";
     $arrValues = array();
     for ($intI = 1; $intI <= 1200; $intI++) {
         $arrValues[] = array(generateSystemid(), "text long " . $intI, "text " . $intI);
     }
     $this->assertTrue($objDB->multiInsert("temp_autotest", array("temp_id", "temp_char254", "temp_char100"), $arrValues));
     $strQuery = "SELECT COUNT(*) FROM " . _dbprefix_ . "temp_autotest";
     $this->assertEquals(1200, $objDB->getPRow($strQuery, array())["COUNT(*)"], "testDataBase countLimitReach");
     $strQuery = "DROP TABLE " . _dbprefix_ . "temp_autotest";
     $this->assertTrue($objDB->_pQuery($strQuery, array()), "testDataBase dropTable");
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:42,代码来源:test_databaseMultiInsertTest.php


示例18: testTagAssignment

 public function testTagAssignment()
 {
     if (class_module_system_module::getModuleByName("pages") === null) {
         return true;
     }
     $strName = generateSystemid();
     $arrPages = class_module_pages_page::getAllPages();
     if (count($arrPages) == 0) {
         return;
     }
     $objTag = new class_module_tags_tag();
     $objTag->setStrName($strName);
     $objTag->updateObjectToDb();
     foreach ($arrPages as $objOnePage) {
         $objTag->assignToSystemrecord($objOnePage->getSystemid());
         break;
     }
     $arrFolder = class_module_pages_folder::getFolderList();
     foreach ($arrFolder as $objOneFolder) {
         $objTag->assignToSystemrecord($objOneFolder->getSystemid());
         break;
     }
     $this->flushDBCache();
     $objTag = class_module_tags_tag::getTagByName($strName);
     $this->assertEquals($objTag->getIntAssignments(), 2);
     $arrPlainAssignments = $objTag->getListOfAssignments();
     $this->assertEquals(count($arrPlainAssignments), 2);
     $arrAssignment = $objTag->getArrAssignedRecords();
     $this->assertEquals(count($arrAssignment), 2);
     $this->assertTrue($arrAssignment[0] instanceof class_module_pages_page || $arrAssignment[0] instanceof class_module_pages_folder);
     $this->assertTrue($arrAssignment[1] instanceof class_module_pages_page || $arrAssignment[1] instanceof class_module_pages_folder);
     $strOldSysid = $objTag->getSystemid();
     $objTag->copyObject();
     $this->assertNotEquals($strOldSysid, $objTag->getSystemid());
     $this->assertEquals($objTag->getStrName(), $strName . "_1");
     $this->assertEquals($objTag->getIntAssignments(), 2);
     $arrAssignment = $objTag->getArrAssignedRecords();
     $this->assertEquals(count($arrAssignment), 2);
     $this->assertTrue($arrAssignment[0] instanceof class_module_pages_page || $arrAssignment[0] instanceof class_module_pages_folder);
     $this->assertTrue($arrAssignment[1] instanceof class_module_pages_page || $arrAssignment[1] instanceof class_module_pages_folder);
     $objTag->deleteObjectFromDatabase();
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:42,代码来源:test_tagsTest.php


示例19: testIndexEvent

 public function testIndexEvent()
 {
     if (class_module_system_module::getModuleByName("tags") == null || class_module_system_module::getModuleByName("system") == null) {
         return;
     }
     $strSearchKey1 = generateSystemid();
     $objAspect = new class_module_system_aspect();
     $objAspect->setStrName($strSearchKey1);
     $objAspect->updateObjectToDb();
     $objSearchCommons = new class_module_search_commons();
     $objSearchParams = new class_module_search_search();
     $objSearchParams->setStrQuery($strSearchKey1);
     $arrResult = $objSearchCommons->doIndexedSearch($objSearchParams, null);
     $this->assertEquals(count($arrResult), 1);
     $this->assertEquals($arrResult[0]->getObjObject()->getStrSystemid(), $objAspect->getStrSystemid());
     $strSearchKey2 = generateSystemid();
     $objTag = new class_module_tags_tag();
     $objTag->setStrName($strSearchKey2);
     $objTag->updateObjectToDb();
     $objSearchParams = new class_module_search_search();
     $objSearchParams->setStrQuery($strSearchKey2);
     $arrResult = $objSearchCommons->doIndexedSearch($objSearchParams, null);
     $this->assertEquals(count($arrResult), 1);
     $this->assertEquals($arrResult[0]->getObjObject()->getStrSystemid(), $objTag->getStrSystemid());
     $objTag->assignToSystemrecord($objAspect->getStrSystemid());
     $arrResult = $objSearchCommons->doIndexedSearch($objSearchParams, null);
     $this->assertEquals(count($arrResult), 2);
     $objSearchParams->setStrInternalFilterModules(_system_modul_id_);
     $arrResult = $objSearchCommons->doIndexedSearch($objSearchParams, null);
     $this->assertEquals(count($arrResult), 1);
     $this->assertEquals($arrResult[0]->getObjObject()->getStrSystemid(), $objAspect->getStrSystemid());
     $objTag->removeFromSystemrecord($objAspect->getStrSystemid());
     //the aspect itself should not be found any more
     $objSearchParams = new class_module_search_search();
     $objSearchParams->setStrQuery($strSearchKey2);
     $arrResult = $objSearchCommons->doIndexedSearch($objSearchParams, null);
     $this->assertEquals(count($arrResult), 1);
     $this->assertEquals($arrResult[0]->getObjObject()->getStrSystemid(), $objTag->getStrSystemid());
     $objAspect->deleteObjectFromDatabase();
     $objTag->deleteObjectFromDatabase();
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:41,代码来源:test_searchIndexEventTest.php


示例20: processPackageUpload

 /**
  * The real "download" or "upload" should be handled right here.
  * All packages have to be downloaded to /project/temp in order to be processed afterwards.
  *
  * @return string the filename of the package downloaded
  */
 public function processPackageUpload()
 {
     //fetch the upload, validate a few settings and copy the package to /project/temp
     $arrSource = class_carrier::getInstance()->getParam("provider_local_file");
     $strTarget = "/project/temp/" . generateSystemid() . ".zip";
     $objFilesystem = new class_filesystem();
     //Check file for correct filters
     $strSuffix = uniStrtolower(uniSubstr($arrSource["name"], uniStrrpos($arrSource["name"], ".")));
     if (in_array($strSuffix, array(".zip"))) {
         if ($objFilesystem->copyUpload($strTarget, $arrSource["tmp_name"])) {
             class_logger::getInstance(class_logger::PACKAGEMANAGEMENT)->addLogRow("uploaded package " . $arrSource["name"] . " to " . $strTarget, class_logger::$levelInfo);
             class_resourceloader::getInstance()->flushCache();
             class_classloader::getInstance()->flushCache();
             class_reflection::flushCache();
             return $strTarget;
         }
     }
     class_logger::getInstance(class_logger::PACKAGEMANAGEMENT)->addLogRow("error in uploaded package " . $arrSource["name"] . " either wrong format or not writeable target folder", class_logger::$levelInfo);
     @unlink($arrSource["tmp_name"]);
     return null;
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:27,代码来源:class_module_packagemanager_contentprovider_local.php



注:本文中的generateSystemid函数示例整理自Github/MSDocs等源码及文档管理平台,相关


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP generateToken函数代码示例发布时间:2022-05-15
下一篇:
PHP generateSubmitButton函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap