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

PHP extract_values函数代码示例

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

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



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

示例1: edit

 public function edit()
 {
     date_default_timezone_set("Europe/Oslo");
     $date = new DateTime(phpgw::get_var('date'));
     $system_message = array();
     $system_message['building_id'] = intval(phpgw::get_var('building_id', 'GET'));
     $system_message['building_name'] = phpgw::get_var('building_name', 'GET');
     $system_message['cancel_link'] = self::link(array('menuaction' => $this->module . '.uisearch.index'));
     $system_message['created'] = $date->format('Y-m-d  H:m');
     $errors = array();
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $system_message = array_merge($system_message, extract_values($_POST, array('time', 'title', 'message', 'name', 'phone', 'email')));
         if ($system_message['message'] == '') {
             $errors['system_message'] = lang('Missing title');
         } elseif ($system_message['title'] == '') {
             $errors['system_message'] = lang('Missing message');
         } elseif ($system_message['name'] == '') {
             $errors['system_message'] = lang('Missing name');
         }
         if (!$errors) {
             $system_message['title'] = $system_message['building_name'] . " - " . $system . $system_message['title'];
             $receipt = $this->bo->add($system_message);
             $this->redirect(array('menuaction' => $this->module . '.uibuilding.show.index', 'id' => $system_message['building_id']));
         }
     }
     $this->flash_form_errors($errors);
     $this->use_yui_editor();
     self::render_template('system_message', array('system_message' => $system_message));
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:29,代码来源:class.uisystem_message.inc.php


示例2: edit

 public function edit()
 {
     $id = intval(phpgw::get_var('id', 'GET'));
     $resource = $this->bo->read_single($id);
     $resource['id'] = $id;
     $resource['building_link'] = self::link(array('menuaction' => 'booking.uibuilding.show', 'id' => $resource['id']));
     $resource['buildings_link'] = self::link(array('menuaction' => 'booking.uibuilding.index'));
     $resource['cancel_link'] = self::link(array('menuaction' => 'booking.uiresource.index'));
     $resource['types'] = $this->resource_types();
     $errors = array();
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $resource = array_merge($resource, extract_values($_POST, $this->fields));
         $errors = $this->bo->validate($resource);
         if (!$errors) {
             $receipt = $this->bo->update($resource);
             $this->redirect(array('menuaction' => 'booking.uiresource.show', 'id' => $resource['id']));
         }
     }
     $this->flash_form_errors($errors);
     self::add_javascript('booking', 'booking', 'resource_new.js');
     phpgwapi_yui::load_widget('datatable');
     phpgwapi_yui::load_widget('autocomplete');
     $activity_data = $this->activity_bo->fetch_activities();
     foreach ($activity_data['results'] as $acKey => $acValue) {
         $activity_data['results'][$acKey]['resource_id'] = $resource['activity_id'];
     }
     $this->use_yui_editor();
     self::render_template('resource_form', array('resource' => $resource, 'activitydata' => $activity_data));
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:29,代码来源:class.uiresource.inc.php


示例3: edit

 public function edit()
 {
     $id = intval(phpgw::get_var('id', 'GET'));
     if ($id) {
         $person = $this->bo->read_single($id);
         $person['id'] = $id;
         $person['contactpersons_link'] = self::link(array('menuaction' => 'booking.uicontactperson.index'));
         $person['edit_link'] = self::link(array('menuaction' => 'booking.uicontactperson.edit', 'id' => $person['id']));
     } else {
         $person = array();
     }
     $errors = array();
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $person = array_merge($person, extract_values($_POST, array('ssn', 'name', 'homepage', 'phone', 'email', 'description')));
         $errors = $this->bo->validate($person);
         if (!$errors) {
             if ($id) {
                 $receipt = $this->bo->update($person);
             } else {
                 $receipt = $this->bo->add($person);
             }
             $this->redirect(array('menuaction' => $this->module . '.uicontactperson.show', 'id' => $receipt['id']));
         }
     }
     $this->flash_form_errors($errors);
     self::add_stylesheet('phpgwapi/js/yahoo/assets/skins/sam/skin.css');
     self::add_javascript('yahoo', 'yahoo/yahoo-dom-event', 'yahoo-dom-event.js');
     self::add_javascript('yahoo', 'yahoo/element', 'element-min.js');
     self::add_javascript('yahoo', 'yahoo/dom', 'dom-min.js');
     self::add_javascript('yahoo', 'yahoo/container', 'container_core-min.js');
     self::add_javascript('yahoo', 'yahoo/editor', 'simpleeditor-min.js');
     self::add_template_file("contactperson_fields");
     self::render_template('contactperson_edit', array('person' => $person));
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:34,代码来源:class.uicontactperson.inc.php


示例4: generate_allocation

 function generate_allocation($season_id, $date, $to, $interval, $write = false)
 {
     $season = $this->so->read_single($season_id);
     $this->authorize_write($season_id);
     $valid = array();
     $invalid = array();
     do {
         $wday = $date->format('N');
         $tallocations = $this->so_wtemplate_alloc->read(array('filters' => array('season_id' => $season_id, 'wday' => $wday), 'sort' => 'from_'));
         foreach ($tallocations['results'] as $talloc) {
             $allocation = extract_values($talloc, array('season_id', 'organization_id', 'cost', 'resources', 'organization_name'));
             $allocation['active'] = '1';
             $allocation['from_'] = $date->format("Y-m-d") . ' ' . $talloc['from_'];
             $allocation['to_'] = $date->format("Y-m-d") . ' ' . $talloc['to_'];
             $allocation['building_name'] = $season['building_name'];
             $allocation['completed'] = 1;
             $errors = $this->bo_allocation->validate($allocation);
             if (!$errors) {
                 $valid[] = $allocation;
             } elseif (count($this->bo_allocation->filter_conflict_errors($errors)) === 0) {
                 $invalid[] = $allocation;
             } else {
                 throw new UnexpectedValueException('Encountered an unexpected validation error');
             }
         }
         if ($date->format('N') == 7) {
             if ($interval == 2) {
                 $date->modify('+7 days');
             } elseif ($interval == 3) {
                 $date->modify('+14 days');
             } elseif ($interval == 4) {
                 $date->modify('+21 days');
             }
         }
         $date->modify('+1 day');
         if ($date->format('Y-m-d') > $to->format('Y-m-d')) {
             if ($write) {
                 $this->so->db->transaction_begin();
                 foreach ($valid as $alloc) {
                     $this->bo_allocation->add($alloc);
                 }
                 $this->so->db->transaction_commit();
             }
             return array('valid' => $valid, 'invalid' => $invalid);
         }
     } while (true);
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:47,代码来源:class.boseason.inc.php


示例5: extract_values

<?php

require_once 'includes/allspells.php';
require_once 'includes/allreputation.php';
$smarty->config_load($conf_file, 'spell');
@(list($s1, $s2, $s3) = extract_values($podrazdel));
$cache_key = cache_key($s1, $s2, $s3);
if (!($spells = load_cache(SPELL_LISTING, $cache_key))) {
    unset($spells);
    $spells = array();
    if ($s1 == 7) {
        // Классовые
        $title = $smarty->get_config_vars('Class_spells');
        $rows = $DB->select('
				SELECT ?#, s.`spellID`, sla.skillID
				FROM ?_spell s, ?_skill_line_ability sla, ?_spellicons i
				WHERE
					s.spellID = sla.spellID
					AND s.levelspell > 0
					AND i.id=s.spellicon
					{AND sla.classmask & ?d}
					{AND sla.skillID=?d}
				ORDER BY s.levelspell
				{LIMIT ?d}
			', $spell_cols[2], isset($s2) ? pow(2, $s2 - 1) : DBSIMPLE_SKIP, isset($s3) ? $s3 : DBSIMPLE_SKIP, $AoWoWconf['limit'] != 0 ? $AoWoWconf['limit'] : DBSIMPLE_SKIP);
    } elseif ($s1 > 0) {
        switch ($s1) {
            case 6:
                $title = $smarty->get_config_vars('Weapon_spells');
                break;
            case 8:
开发者ID:BACKUPLIB,项目名称:Infinity_MaNGOS,代码行数:31,代码来源:spells.php


示例6: extract_form_data

 protected function extract_form_data($defaults = array())
 {
     $organization = array_merge($defaults, extract_values($_POST, $this->fields));
     $this->extract_customer_identifier($organization);
     return $organization;
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:6,代码来源:class.uiorganization.inc.php


示例7: edit

 public function edit()
 {
     $id = intval(phpgw::get_var('id', 'GET'));
     $building = $this->bo->read_single($id);
     $building['id'] = $id;
     $building['buildings_link'] = self::link(array('menuaction' => 'booking.uibuilding.index'));
     $building['cancel_link'] = self::link(array('menuaction' => 'booking.uibuilding.show', 'id' => $building['id']));
     $building['top-nav-bar-buildings'] = lang('Buildings');
     $config = CreateObject('phpgwapi.config', 'booking');
     $config->read();
     if ($config->config_data['extra_schedule'] == 'yes') {
         $building['extra'] = 1;
     } else {
         $building['extra'] = 0;
     }
     $errors = array();
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $building = array_merge($building, extract_values($_POST, $this->fields));
         $errors = $this->bo->validate($building);
         if (!$errors) {
             $receipt = $this->bo->update($building);
             $this->redirect(array('menuaction' => 'booking.uibuilding.show', 'id' => $receipt['id']));
         }
     }
     $this->flash_form_errors($errors);
     $this->use_yui_editor();
     self::render_template('building_form', array('building' => $building));
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:28,代码来源:class.uibuilding.inc.php


示例8: check_active

 public function check_active($url)
 {
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $activate = extract_values($_POST, array("status", "activate_id"));
         $this->bo->set_active(intval($activate['activate_id']), intval($activate['status']));
         $this->redirect(array('menuaction' => $url, 'id' => $activate['activate_id']));
     }
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:8,代码来源:class.uicommon.inc.php


示例9: extract_form_data

 protected function extract_form_data($defaults = array())
 {
     $entity = array_merge($defaults, extract_values($_POST, $this->fields));
     $this->agegroup_bo->extract_form_data($entity);
     $this->extract_customer_identifier($entity);
     return $entity;
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:7,代码来源:class.uievent.inc.php


示例10: edit

 public function edit()
 {
     $id = intval(phpgw::get_var('id', 'GET'));
     $document = $this->bo->read_single($id);
     $errors = array();
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $document = array_merge($document, extract_values($_POST, $this->fields));
         $errors = $this->bo->validate($document);
         if (!$errors) {
             $receipt = $this->bo->update($document);
             $this->redirect('booking.uidocumentation.index');
         }
     }
     self::add_javascript('booking', 'booking', 'document.js');
     $this->flash_form_errors($errors);
     $this->add_default_display_data($document);
     self::render_template('documentation_form', array('document' => $document));
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:18,代码来源:class.uidocumentation.inc.php


示例11: edit

 public function edit()
 {
     $id = intval(phpgw::get_var('id', 'GET'));
     $activity = $this->bo->read_single($id);
     $parent_activity = $this->bo->read_single($activity['parent_id']);
     $activities = $this->bo->fetch_activities();
     $activities = $activities['results'];
     $activity['id'] = $id;
     $activity['activities_link'] = self::link(array('menuaction' => 'booking.uiactivity.index'));
     $activity['building_link'] = self::link(array('menuaction' => 'booking.uibuilding.index'));
     $errors = array();
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         if ($_POST['parent_id'] == '0') {
             $_POST['parent_id'] = null;
         }
         $activity = array_merge($activity, extract_values($_POST, array('name', 'active', 'description', 'parent_id')));
         $errors = $this->bo->validate($activity);
         if (!$errors) {
             $receipt = $this->bo->update($activity);
             $this->redirect(array('menuaction' => 'booking.uiactivity.index'));
         }
     }
     $this->flash_form_errors($errors);
     $activity['cancel_link'] = self::link(array('menuaction' => 'booking.uiactivity.index'));
     self::render_template('activity_edit', array('activity' => $activity, 'parent' => $parent_activity, 'activities' => $activities));
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:26,代码来源:class.uiactivity.inc.php


示例12: extract_values

<?php

// Необходима функция iteminfo
require_once 'includes/allitems.php';
$smarty->config_load($conf_file, 'items');
// Разделяем из запроса класс, подкласс и тип вещей
@(list($class, $subclass, $type) = extract_values($podrazdel));
$cache_key = cache_key($class, $subclass, $type);
if (!($items = load_cache(7, $cache_key))) {
    unset($items);
    // Составляем запрос к БД, выполняющий поиск по заданным классу и подклассу
    $rows = $DB->select('
		SELECT ?#, i.entry, maxcount
			{, l.name_loc?d AS name_loc}
		FROM ?_icons, item_template i
			{LEFT JOIN (locales_item l) ON l.entry=i.entry AND ?d}
		WHERE
			id=displayid
			{ AND class = ? }
			{ AND subclass = ? }
			{ AND InventoryType = ? }
		ORDER BY quality DESC, name
		{ LIMIT ?d }
		', $item_cols[2], $_SESSION['locale'] ? $_SESSION['locale'] : DBSIMPLE_SKIP, $_SESSION['locale'] ? 1 : DBSIMPLE_SKIP, isset($class) ? $class : DBSIMPLE_SKIP, isset($subclass) ? $subclass : DBSIMPLE_SKIP, isset($type) ? $type : DBSIMPLE_SKIP, $AoWoWconf['limit'] != 0 ? $AoWoWconf['limit'] : DBSIMPLE_SKIP);
    $items = array();
    foreach ($rows as $row) {
        $items[] = iteminfo2($row);
    }
    save_cache(7, $cache_key, $items);
}
global $page;
开发者ID:Brueggus,项目名称:aowow,代码行数:31,代码来源:items.php


示例13: edit

 public function edit()
 {
     $id = intval(phpgw::get_var('id', 'GET'));
     $audience = $this->bo->read_single($id);
     $audience['id'] = $id;
     $audience['resource_link'] = self::link(array('menuaction' => 'booking.uiaudience.show', 'id' => $audience['id']));
     $audience['resources_link'] = self::link(array('menuaction' => 'booking.uiresource.index'));
     $audience['audience_link'] = self::link(array('menuaction' => 'booking.uiaudience.index'));
     $audience['building_link'] = self::link(array('menuaction' => 'booking.uibuilding.index'));
     $errors = array();
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $audience = array_merge($audience, extract_values($_POST, array('name', 'sort', 'description', 'active')));
         $errors = $this->bo->validate($audience);
         if (!$errors) {
             $audience = $this->bo->update($audience);
             $this->redirect(array('menuaction' => 'booking.uiaudience.index', 'id' => $audience['id']));
         }
     }
     $this->flash_form_errors($errors);
     $audience['cancel_link'] = self::link(array('menuaction' => 'booking.uiaudience.index'));
     self::render_template('audience_edit', array('audience' => $audience));
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:22,代码来源:class.uiaudience.inc.php


示例14: edit

 public function edit()
 {
     $id = intval(phpgw::get_var('id', 'GET'));
     if ($id) {
         $group = $this->bo->read_single($id);
         $group['id'] = $id;
         $group['organization_link'] = $this->link_to('show', array('ui' => 'organization', 'id' => $group['organization_id']));
         $group['cancel_link'] = $this->link_to('show', array('id' => $id));
         if ($this->is_inline()) {
             $group['cancel_link'] = $this->link_to_parent();
         }
     } else {
         $group = array();
         $group['cancel_link'] = $this->link_to('index', array('ui' => 'organization'));
         if ($this->is_inline()) {
             $group['organization_link'] = $this->link_to_parent();
             $group['cancel_link'] = $this->link_to_parent();
             $this->apply_inline_params($group);
         }
     }
     $group['organizations_link'] = $this->link_to('index', array('ui' => 'organization'));
     $errors = array();
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $group = array_merge($group, extract_values($_POST, array('name' => 'string', 'shortname' => 'string', 'organization_id' => 'string', 'organization_name' => 'string', 'description' => 'html', 'contacts' => 'string', 'active' => 'int', 'activity_id' => 'int', 'show_in_portal' => 'int')));
         if (!isset($group["active"])) {
             $group['active'] = '1';
         }
         $errors = $this->bo->validate($group);
         if (strlen($_POST['name']) > 50) {
             $errors['name'] = lang('Lengt of name is to long, max 50 characters long');
         }
         if (strlen($_POST['shortname']) > 11) {
             $errors['shortname'] = lang('Lengt of shortname is to long, max 11 characters long');
         }
         if (!$errors) {
             if ($id) {
                 $receipt = $this->bo->update($group);
             } else {
                 $receipt = $this->bo->add($group);
             }
             $this->redirect_to_parent_if_inline();
             $this->redirect($this->link_to_params('show', array('id' => $receipt['id'])));
         }
     }
     $this->flash_form_errors($errors);
     if (is_array($parent_entity = $this->get_parent_if_inline())) {
         $group[$this->get_current_parent_type() . '_id'] = $parent_entity['id'];
         $group[$this->get_current_parent_type() . '_name'] = $parent_entity['name'];
     }
     $this->use_yui_editor();
     $activities = $this->activity_bo->fetch_activities();
     $activities = $activities['results'];
     self::render_template('group_edit', array('group' => $group, 'module' => $this->module, 'activities' => $activities));
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:54,代码来源:class.uigroup.inc.php


示例15: add

 public function add()
 {
     $errors = array();
     $permission = array();
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $permission = extract_values($_POST, $this->fields);
         $errors = $this->bo->validate($permission);
         if (!$errors) {
             $receipt = $this->bo->add($permission);
             $this->redirect($this->generate_link_params('index'));
         }
     }
     self::add_javascript('booking', 'booking', 'permission_root.js');
     $this->add_default_display_data($permission);
     $this->flash_form_errors($errors);
     self::render_template('permission_root_form', array('permission' => $permission));
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:17,代码来源:class.uipermission_root.inc.php


示例16: edit

 public function edit()
 {
     $id = intval(phpgw::get_var('id', 'GET'));
     $allocation = $this->bo->read_single($id);
     $allocation['building'] = $this->building_bo->so->read_single($allocation['building_id']);
     $allocation['building_name'] = $allocation['building']['name'];
     $errors = array();
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         array_set_default($_POST, 'resources', array());
         $allocation = array_merge($allocation, extract_values($_POST, $this->fields));
         $organization = $this->organization_bo->read_single(intval(phpgw::get_var('organization_id', 'POST')));
         $errors = $this->bo->validate($allocation);
         if (!$errors) {
             try {
                 $receipt = $this->bo->update($allocation);
                 $this->bo->so->update_id_string();
                 $this->send_mailnotification_to_organization($organization, lang('Allocation changed'), phpgw::get_var('mail', 'POST'));
                 $this->redirect(array('menuaction' => 'booking.uiallocation.show', 'id' => $allocation['id']));
             } catch (booking_unauthorized_exception $e) {
                 $errors['global'] = lang('Could not update object due to insufficient permissions');
             }
         }
     }
     $this->flash_form_errors($errors);
     self::add_javascript('booking', 'booking', 'allocation.js');
     $allocation['resources_json'] = json_encode(array_map('intval', $allocation['resources']));
     $allocation['cancel_link'] = self::link(array('menuaction' => 'booking.uiallocation.show', 'id' => $allocation['id']));
     $allocation['application_link'] = self::link(array('menuaction' => 'booking.uiapplication.show', 'id' => $allocation['application_id']));
     self::render_template('allocation_edit', array('allocation' => $allocation));
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:30,代码来源:class.uiallocation.inc.php


示例17: edit

 public function edit()
 {
     $id = intval(phpgw::get_var('id', 'GET'));
     $document = $this->bo->read_single($id);
     $errors = array();
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $document = array_merge($document, extract_values($_POST, $this->fields));
         $errors = $this->bo->validate($document);
         if (!$errors) {
             try {
                 $receipt = $this->bo->update($document);
                 $this->redirect_to_parent_if_inline();
                 $this->redirect($this->get_owner_typed_link_params('index'));
             } catch (booking_unauthorized_exception $e) {
                 $errors['global'] = lang('Could not update object due to insufficient permissions');
             }
         }
     }
     self::add_javascript('booking', 'booking', 'document.js');
     $this->add_default_display_data($document);
     $this->flash_form_errors($errors);
     self::render_template('document_form', array('document' => $document));
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:23,代码来源:class.uidocument.inc.php


示例18: extract_values

<?php

// Необходима функция questinfo
require_once 'includes/allquests.php';
$smarty->config_load($conf_file, 'quest');
// Разделяем из запроса класс и подкласс квестов
@(list($Type, $ZoneOrSort) = extract_values($podrazdel));
$cache_key = cache_key($Type, $ZoneOrSort);
if (!($quests = load_cache(QUEST_LISTING, $cache_key))) {
    unset($quests);
    $rows = $DB->select("\n\t\tSELECT q.?#\n\t\t{\n\t\t\t, l.Title_loc?d AS Title_loc\n\t\t}\n\t\tFROM quest_template q\n\t\t{ LEFT JOIN (locales_quest l) ON l.entry=q.entry AND ? }\n\t\tWHERE\n\t\t\t1 = 1\n\t\t\t{ AND ZoneOrSort = ? }\n\t\t\t{ AND ZoneOrSort IN (?a) }\n\t\t\tAND q.Title NOT IN ('','----','?????')\n\t\t\tAND q.Title NOT LIKE '<DEPRECATED>%'\n\t\t\tAND q.Title NOT LIKE '<NYI>%'\n\t\t\tAND q.Title NOT LIKE '<nyi>%'\n\t\t\tAND q.Title NOT LIKE '<TEST>%'\n\t\t\tAND q.Title NOT LIKE '<TXT>%'\n\t\t\tAND q.Title NOT LIKE '<UNUSED%'\n\t\tORDER BY Title\n\t\t{LIMIT ?d}\n\t\t", $quest_cols[2], $_SESSION['locale'] > 0 ? $_SESSION['locale'] : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? 1 : DBSIMPLE_SKIP, isset($ZoneOrSort) ? $ZoneOrSort : DBSIMPLE_SKIP, !isset($ZoneOrSort) && isset($Type) ? $quest_class[$Type] : DBSIMPLE_SKIP, $AoWoWconf['limit'] > 0 ? $AoWoWconf['limit'] : DBSIMPLE_SKIP);
    $quests = array();
    foreach ($rows as $row) {
        $quests[] = GetQuestInfo($row, QUEST_DATAFLAG_LISTINGS);
    }
    save_cache(QUEST_LISTING, $cache_key, $quests);
}
if (!($quests_tot = load_cache(QUEST_TOT, 'quest_tot'))) {
    unset($quests_tot);
    $quests_tot = $DB->select("\n\t\tSELECT COUNT(q.entry) as quest_tot\n\t\tFROM quest_template q\n\t\tWHERE\n\t\t\tq.Title NOT IN ('','----','?????')\n\t\t\tAND q.Title NOT LIKE '<DEPRECATED>%'\n\t\t\tAND q.Title NOT LIKE '<NYI>%'\n\t\t\tAND q.Title NOT LIKE '<nyi>%'\n\t\t\tAND q.Title NOT LIKE '<TEST>%'\n\t\t\tAND q.Title NOT LIKE '<TXT>%'\n\t\t\tAND q.Title NOT LIKE '<UNUSED%'\n\t\t");
    save_cache(QUEST_LISTING, 'quest_tot', $quests_tot[0]['quest_tot']);
}
global $page;
$page = array('Mapper' => false, 'Book' => false, 'Title' => $smarty->get_config_vars('Quests'), 'tab' => 0, 'type' => 0, 'typeid' => 0, 'path' => path(0, 3, $Type, $ZoneOrSort));
$smarty->assign('page', $page);
$smarty->assign('quests', $quests);
$smarty->assign('quests_tot', is_array($quests_tot) ? $quests_tot[0]['quest_tot'] : $quests_tot);
// Количество MySQL запросов
$smarty->assign('mysql', $DB->getStatistics());
// Загружаем страницу
$smarty->display('quests.tpl');
开发者ID:Kheros,项目名称:tc_aowow,代码行数:31,代码来源:quests.php


示例19: extract_values

<?php

require_once 'includes/allachievements.php';
$smarty->config_load($conf_file, 'achievement');
@(list($category) = extract_values($podrazdel));
$cache_key = cache_key($category);
if (!($achievements = load_cache(24, $cache_key))) {
    unset($achievements);
    $rows = $DB->select('
			SELECT a.id, a.faction, a.name_loc?d AS name, a.description_loc?d AS description, a.category, a.points, s.iconname, z.areatableID
			FROM ?_spellicons s, ?_achievement a
			LEFT JOIN (?_zones z) ON a.map != -1 AND a.map = z.mapID
			WHERE
				a.icon = s.id
				{ AND a.category = ? }
			GROUP BY a.id
			ORDER BY a.`order` ASC
		', $_SESSION['locale'], $_SESSION['locale'], isset($category) ? $category : DBSIMPLE_SKIP);
    if ($rows) {
        $achievements = array();
        $achievements['data'] = array();
        foreach ($rows as $row) {
            $achievements['data'][] = achievementinfo2($row);
        }
        if (isset($category)) {
            $catrow = $DB->selectRow('
					SELECT c1.id, c1.name_loc?d AS name, c2.id AS id2
					FROM ?_achievementcategory c1
					LEFT JOIN (?_achievementcategory c2) ON c1.parentAchievement != -1 AND c1.parentAchievement = c2.id
					WHERE
						c1.id = ?
开发者ID:Brueggus,项目名称:aowow,代码行数:31,代码来源:achievements.php


示例20: cancel

 public function cancel()
 {
     $config = CreateObject('phpgwapi.config', 'booking');
     $config->read();
     if ($config->config_data['user_can_delete_allocations'] != 'yes') {
         $allocation = $this->bo->read_single(intval(phpgw::get_var('allocation_id', 'GET')));
         $organization = $this->organization_bo->read_single($allocation['organization_id']);
         $errors = array();
         if ($_SERVER['REQUEST_METHOD'] == 'POST') {
             $outseason = $_POST['outseason'];
             $recurring = $_POST['recurring'];
             $repeat_until = $_POST['repeat_until'];
             $field_interval = $_POST['field_interval'];
             $maildata = array();
             $maildata['outseason'] = $outseason;
             $maildata['recurring'] = $recurring;
             $maildata['repeat_until'] = $repeat_until;
             $maildata['field_interval'] = $field_interval;
             date_default_timezone_set("Europe/Oslo");
             $date = new DateTime(phpgw::get_var('date'));
             $system_message = array();
             $system_message['building_id'] = intval($allocation['building_id']);
             $system_message['building_name'] = $this->bo->so->get_building($system_message['building_id']);
             $system_message['created'] = $date->format('Y-m-d  H:m');
             $system_message = array_merge($system_message, extract_values($_POST, array('message')));
             $system_message['type'] = 'cancelation';
             $system_message['status'] = 'NEW';
             $system_message['name'] = $allocation['organization_name'] . ' - ' . $organization['contacts'][0]['name'];
             $system_message['phone'] = $organization['contacts'][0]['phone'];
             $system_message['email'] = $organization['contacts'][0]['email'];
             $system_message['title'] = lang('Cancelation of allocation from') . " " . $allocation['organization_name'];
             $link = self::link(array('menuaction' => 'booking.uiallocation.delete', 'allocation_id' => $allocation['id'], 'outseason' => $outseason, 'recurring' => $recurring, 'repeat_until' => $repeat_until, 'field_interval' => $field_interval));
             if (strpos($link, '/portico/bookingfrontend') !== false) {
                 $link = mb_strcut($link, 24, strlen($link));
                 $link = "/portico" . $link;
             } else {
                 $link = mb_strcut($link, 16, strlen($link));
             }
             $system_message['link'] = $link;
             $system_message['message'] = $system_message['message'] . "<br /><br />" . lang('To cancel allocation use this link') . " - <a href='" . $link . "'>" . lang('Delete') . "</a>";
             $this->bo->send_admin_notification($allocation, $maildata, $system_message);
             $this->system_message_bo->add($system_message);
             $this->redirect(array('menuaction' => 'bookingfrontend.uibuilding.schedule', 'id' => $system_message['building_id']));
         }
         $this->flash_form_errors($errors);
         $allocation['cancel_link'] = self::link(array('menuaction' => 'bookingfrontend.uibuilding.schedule', 'id' => $allocation['building_id']));
         $this->use_yui_editor();
         self::render_template('allocation_cancel', array('allocation' => $allocation));
     } else {
         $id = intval(phpgw::get_var('allocation_id', 'GET'));
         $from_date = phpgw::get_var('from_', 'GET');
         $to_date = phpgw::get_var('to_', 'GET');
         $outseason = phpgw::get_var('outseason', 'GET');
         $recurring = phpgw::get_var('recurring', 'GET');
         $repeat_until = phpgw::get_var('repeat_until', 'GET');
         $field_interval = intval(phpgw::get_var('field_interval', 'GET'));
         $allocation = $this->bo->read_single($id);
         $organization = $this->organization_bo->read_single($allocation['organization_id']);
         $season = $this->season_bo->read_single($allocation['season_id']);
         $step = phpgw::get_var('step', 'str', 'POST');
         if (!isset($step)) {
             $step = 1;
         }
         $errors = array();
         $invalid_dates = array();
         $valid_dates = array();
         if ($config->config_data['split_pool'] == 'yes') {
             $split = 1;
         } else {
             $split = 0;
         }
         $resources = $allocation['resources'];
         $activity = $this->organization_bo->so->get_resource_activity($resources);
         $mailadresses = $this->building_users($allocation['building_id'], $split, $activity);
         $maildata = array();
         $maildata['outseason'] = $outseason;
         $maildata['recurring'] = $recurring;
         $maildata['repeat_until'] = $repeat_until;
         $maildata['field_interval'] = $field_interval;
         if ($_SERVER['REQUEST_METHOD'] == 'POST') {
             $from_date = $_POST['from_'];
             $to_date = $_POST['to_'];
             if ($_POST['recurring'] != 'on' && $_POST['outseason'] != 'on') {
                 $err = $this->bo->so->check_for_booking($id);
                 if ($err) {
                     $errors['booking'] = lang('Could not delete allocation due to a booking still use it');
                 } else {
                     $res_names = '';
                     date_default_timezone_set("Europe/Oslo");
                     $date = new DateTime(phpgw::get_var('date'));
                     $system_message = array();
                     $system_message['building_id'] = intval($allocation['building_id']);
                     $system_message['building_name'] = $this->bo->so->get_building($system_message['building_id']);
                     $system_message['created'] = $date->format('Y-m-d  H:m');
                     $system_message = array_merge($system_message, extract_values($_POST, array('message')));
                     $system_message['type'] = 'cancelation';
                     $system_message['status'] = 'NEW';
                     $system_message['name'] = $allocation['organization_name'] . ' - ' . $organization['contacts'][0]['name'];
                     $system_message['phone'] = $organization['contacts'][0]['phone'];
                     $system_message['email'] = $organization['contacts'][0]['email'];
//.........这里部分代码省略.........
开发者ID:HaakonME,项目名称:porticoestate,代码行数:101,代码来源:class.uiallocation.inc.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP extraire_attribut函数代码示例发布时间:2022-05-15
下一篇:
PHP extract_text函数代码示例发布时间: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