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


PHP build_prefix_datastore函数代码示例

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


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

示例1: array

        // default to selecting "none"
        $enabled_forums = array(-1);
    }
    print_forum_chooser($vbphrase['use_prefix_set_in_these_forums'], 'forumids[]', $enabled_forums, $vbphrase['none'], false, true);
    print_submit_row();
}
// ########################################################################
if ($_POST['do'] == 'displayorder') {
    $vbulletin->input->clean_array_gpc('p', array('prefixset_order' => TYPE_ARRAY_UINT, 'prefix_order' => TYPE_ARRAY_UINT));
    foreach ($vbulletin->GPC['prefixset_order'] as $prefixsetid => $displayorder) {
        $db->query_write("\r\n\t\t\tUPDATE " . TABLE_PREFIX . "prefixset SET\r\n\t\t\t\tdisplayorder =  " . intval($displayorder) . "\r\n\t\t\tWHERE prefixsetid = '" . $db->escape_string($prefixsetid) . "'\r\n\t\t");
    }
    foreach ($vbulletin->GPC['prefix_order'] as $prefixid => $displayorder) {
        $db->query_write("\r\n\t\t\tUPDATE " . TABLE_PREFIX . "prefix SET\r\n\t\t\t\tdisplayorder =  " . intval($displayorder) . "\r\n\t\t\tWHERE prefixid = '" . $db->escape_string($prefixid) . "'\r\n\t\t");
    }
    build_prefix_datastore();
    define('CP_REDIRECT', 'prefix.php?do=list');
    print_stop_message('saved_display_order_successfully');
}
// ########################################################################
if ($_REQUEST['do'] == 'list') {
    $prefixsets_sql = $db->query_read("\r\n\t\tSELECT *\r\n\t\tFROM " . TABLE_PREFIX . "prefixset\r\n\t\tORDER BY displayorder\r\n\t");
    $prefixsets = array();
    while ($prefixset = $db->fetch_array($prefixsets_sql)) {
        $prefixsets["{$prefixset['prefixsetid']}"] = $prefixset;
        $prefixsets["{$prefixset['prefixsetid']}"]['prefixes'] = array();
    }
    $prefixes_sql = $db->query_read("\r\n\t\tSELECT *\r\n\t\tFROM " . TABLE_PREFIX . "prefix\r\n\t\tORDER BY displayorder\r\n\t");
    while ($prefix = $db->fetch_array($prefixes_sql)) {
        if (isset($prefixsets["{$prefix['prefixsetid']}"])) {
            $prefixsets["{$prefix['prefixsetid']}"]['prefixes']["{$prefix['prefixid']}"] = $prefix;
开发者ID:Kheros,项目名称:MMOver,代码行数:31,代码来源:prefix.php

示例2: post_delete

	/**
	* Additional data to update after a delete call (such as denormalized values in other tables).
	*
	* @param	boolean	Do the query?
	*/
	function post_delete($doquery = true)
	{
		$db =& $this->registry->db;

		// need to rebuild last post info in forums that use this prefix
		require_once(DIR . '/includes/functions_databuild.php');

		$forums = $db->query_read("
			SELECT forumid
			FROM " . TABLE_PREFIX . "forumprefixset
			WHERE prefixsetid = '" . $db->escape_string($this->fetch_field('prefixsetid')) . "'
		");
		while ($forum = $db->fetch_array($forums))
		{
			build_forum_counters($forum['forumid']);
		}

		$db->query_write("
			DELETE FROM " . TABLE_PREFIX . "forumprefixset
			WHERE prefixsetid = '" . $db->escape_string($this->fetch_field('prefixsetid')) . "'
		");

		// delete this set's phrases
		$db->query_write("
			DELETE FROM " . TABLE_PREFIX . "phrase
			WHERE varname = '" . $db->escape_string('prefixset_' .  $this->fetch_field('prefixsetid') . '_title') . "'
				AND fieldname = 'prefix'
		");

		// now find all the phrases for child prefixes to remove
		$prefix_phrases = array();
		$prefixids = array();

		$prefix_sql = $db->query_read("
			SELECT prefixid
			FROM " . TABLE_PREFIX . "prefix
			WHERE prefixsetid = '" . $db->escape_string($this->fetch_field('prefixsetid')) . "'
		");
		while ($prefix = $db->fetch_array($prefix_sql))
		{
			$prefix_phrases[] = "'" . $db->escape_string("prefix_$prefix[prefixid]_title_plain") . "'";
			$prefix_phrases[] = "'" . $db->escape_string("prefix_$prefix[prefixid]_title_rich") . "'";

			$prefixids[] = "'" . $db->escape_string($prefix['prefixid']) . "'";
		}

		if ($prefix_phrases)
		{
			$db->query_write("
				DELETE FROM " . TABLE_PREFIX . "phrase
				WHERE varname IN (" . implode(',', $prefix_phrases) . ")
					AND fieldname = 'global'
			");

			$db->query_write("
				UPDATE " . TABLE_PREFIX . "thread SET
					prefixid = ''
				WHERE prefixid IN (" . implode(',', $prefixids) . ")
			");
		}

		// now delete the child prefixes themselves
		$db->query_write("
			DELETE FROM " . TABLE_PREFIX . "prefix
			WHERE prefixsetid = '" . $db->escape_string($this->fetch_field('prefixsetid')) . "'
		");

		require_once(DIR . '/includes/adminfunctions_language.php');
		build_language();

		require_once(DIR . '/includes/adminfunctions_prefix.php');
		build_prefix_datastore();

		($hook = vBulletinHook::fetch_hook('prefixsetdata_delete')) ? eval($hook) : false;
		return true;
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:81,代码来源:class_dm_prefixset.php

示例3: post_delete

 /**
  * Additional data to update after a delete call (such as denormalized values in other tables).
  *
  * @param	boolean	Do the query?
  */
 function post_delete($doquery = true)
 {
     $db =& $this->registry->db;
     // need to rebuild last post info in forums that use this prefix
     //		require_once(DIR . '/includes/functions_databuild.php');
     //		$channels = $db->query_read("
     //			SELECT nodeid
     //			FROM " . TABLE_PREFIX . "channelprefixset
     //			WHERE prefixsetid = '" . $db->escape_string($this->fetch_field('prefixsetid')) . "'
     //		");
     //		while ($channel = $db->fetch_array($channels))
     //		{
     //			build_forum_counters($channel['forumid']);
     //		}
     $db->query_write("\n\t\t\tDELETE FROM " . TABLE_PREFIX . "channelprefixset\n\t\t\tWHERE prefixsetid = '" . $db->escape_string($this->fetch_field('prefixsetid')) . "'\n\t\t");
     // delete this set's phrases
     $db->query_write("\n\t\t\tDELETE FROM " . TABLE_PREFIX . "phrase\n\t\t\tWHERE varname = '" . $db->escape_string('prefixset_' . $this->fetch_field('prefixsetid') . '_title') . "'\n\t\t\t\tAND fieldname = 'prefix'\n\t\t");
     // now find all the phrases for child prefixes to remove
     $prefix_phrases = array();
     $prefixids = array();
     $prefix_sql = $db->query_read("\n\t\t\tSELECT prefixid\n\t\t\tFROM " . TABLE_PREFIX . "prefix\n\t\t\tWHERE prefixsetid = '" . $db->escape_string($this->fetch_field('prefixsetid')) . "'\n\t\t");
     while ($prefix = $db->fetch_array($prefix_sql)) {
         $prefix_phrases[] = "'" . $db->escape_string("prefix_{$prefix['prefixid']}_title_plain") . "'";
         $prefix_phrases[] = "'" . $db->escape_string("prefix_{$prefix['prefixid']}_title_rich") . "'";
         $prefixids[] = "'" . $db->escape_string($prefix['prefixid']) . "'";
     }
     if ($prefix_phrases) {
         $db->query_write("\n\t\t\t\tDELETE FROM " . TABLE_PREFIX . "phrase\n\t\t\t\tWHERE varname IN (" . implode(',', $prefix_phrases) . ")\n\t\t\t\t\tAND fieldname = 'global'\n\t\t\t");
         $db->query_write("\n\t\t\t\tUPDATE " . TABLE_PREFIX . "node SET\n\t\t\t\t\tprefixid = ''\n\t\t\t\tWHERE prefixid IN (" . implode(',', $prefixids) . ")\n\t\t\t");
     }
     // now delete the child prefixes themselves
     $db->query_write("\n\t\t\tDELETE FROM " . TABLE_PREFIX . "prefix\n\t\t\tWHERE prefixsetid = '" . $db->escape_string($this->fetch_field('prefixsetid')) . "'\n\t\t");
     require_once DIR . '/includes/adminfunctions_language.php';
     build_language();
     require_once DIR . '/includes/adminfunctions_prefix.php';
     build_prefix_datastore();
     // Legacy Hook 'prefixsetdata_delete' Removed //
     return true;
 }
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:44,代码来源:prefixset.php

示例4: post_delete

	/**
	* Additional data to update after a delete call (such as denormalized values in other tables).
	*
	* @param	boolean	Do the query?
	*/
	function post_delete($doquery = true)
	{
		$db =& $this->registry->db;

		$db->query_write("
			UPDATE " . TABLE_PREFIX . "thread SET
				prefixid = ''
			WHERE prefixid = '" . $db->escape_string($this->fetch_field('prefixid')) . "'
		");

		// need to rebuild last post info in forums that use this prefix
		require_once(DIR . '/includes/functions_databuild.php');

		$forums = $db->query_read("
			SELECT forumid
			FROM " . TABLE_PREFIX . "forumprefixset
			WHERE prefixsetid = '" . $db->escape_string($this->fetch_field('prefixsetid')) . "'
		");
		while ($forum = $db->fetch_array($forums))
		{
			build_forum_counters($forum['forumid']);
		}

		$db->query_write("
			DELETE FROM " . TABLE_PREFIX . "phrase
			WHERE varname IN (
					'" . $db->escape_string('prefix_' .  $this->fetch_field('prefixid') . '_title_plain') . "',
					'" . $db->escape_string('prefix_' .  $this->fetch_field('prefixid') . '_title_rich') . "'
				)
				AND fieldname = 'global'
		");

		require_once(DIR . '/includes/adminfunctions_language.php');
		build_language();

		require_once(DIR . '/includes/adminfunctions_prefix.php');
		build_prefix_datastore();

		($hook = vBulletinHook::fetch_hook('prefixdata_delete')) ? eval($hook) : false;
		return true;
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:46,代码来源:class_dm_prefix.php

示例5: post_delete

 /**
  * Additional data to update after a delete call (such as denormalized values in other tables).
  *
  * @param	boolean	Do the query?
  */
 function post_delete($doquery = true)
 {
     $db =& $this->registry->db;
     $db->query_write("\n\t\t\tUPDATE " . TABLE_PREFIX . "thread SET\n\t\t\t\tprefixid = ''\n\t\t\tWHERE prefixid = '" . $db->escape_string($this->fetch_field('prefixid')) . "'\n\t\t");
     // need to rebuild last post info in forums that use this prefix
     require_once DIR . '/includes/functions_databuild.php';
     //		$forums = $db->query_read("
     //			SELECT forumid
     //			FROM " . TABLE_PREFIX . "forumprefixset
     //			WHERE prefixsetid = '" . $db->escape_string($this->fetch_field('prefixsetid')) . "'
     //		");
     //		while ($forum = $db->fetch_array($forums))
     //		{
     //			build_forum_counters($forum['forumid']);
     //		}
     $db->query_write("\n\t\t\tDELETE FROM " . TABLE_PREFIX . "phrase\n\t\t\tWHERE varname IN (\n\t\t\t\t\t'" . $db->escape_string('prefix_' . $this->fetch_field('prefixid') . '_title_plain') . "',\n\t\t\t\t\t'" . $db->escape_string('prefix_' . $this->fetch_field('prefixid') . '_title_rich') . "'\n\t\t\t\t)\n\t\t\t\tAND fieldname = 'global'\n\t\t");
     require_once DIR . '/includes/adminfunctions_language.php';
     build_language();
     require_once DIR . '/includes/adminfunctions_prefix.php';
     build_prefix_datastore();
     // Legacy Hook 'prefixdata_delete' Removed //
     return true;
 }
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:28,代码来源:prefix.php


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