repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
CRUSTAAY/CSGame | src/com/krowcraft/javagame/client/GameApplet.java | 957 | package com.krowcraft.javagame.client;
import java.applet.Applet;
import java.awt.Graphics;
public class GameApplet extends Applet{
private static final long serialVersionUID = -2131413523377786640L;
public IOManager iomanager;
public RenderEngine engine;
public void init() {
Startup();
Player play = new Player(60,60,16,16,this, true);
play.setSprite(6, 1, false, this);
Mob m = new Mob(200,200,16,16, this);
m.setSprite(2, 1, false, this);
m.setSpeed(2);
}
private void Startup() {
iomanager = new IOManager(this);
iomanager.initSprite("sprite.png", 32, 32, 16, 16);
iomanager.initEntityManager();
engine = new RenderEngine(this);
iomanager.initKeyManager();
iomanager.initMouseManager();
}
public void paint(Graphics g){
g.drawImage(engine.getImage(), 0, 0, null);
}
public void update(Graphics g) {paint(g);}
public void appPaint(){repaint();}
}
| gpl-2.0 |
shlomsky/ivo | media/zoo/assets/js/submission.js | 1126 | /* Copyright (C) 2007 - 2011 YOOtheme GmbH, YOOtheme Proprietary Use License (http://www.yootheme.com/license) */
(function(b){var a=function(){};b.extend(a.prototype,{name:"SubmissionMysubmissions",options:{msgDelete:"Are you sure you want to delete this submission?"},initialize:function(e,d){this.options=b.extend({},this.options,d);var f=this;e.find("ul.submissions > li").each(function(){var c=b(this);c.find("h3.toggler").bind("click",function(){c.find("div.preview").toggleClass("hidden")})});e.find("a.delete-item").each(function(){b(this).bind("click",function(c){if(!confirm(f.options.msgDelete)){c.preventDefault();
c.stopPropagation()}})})}});b.fn[a.prototype.name]=function(){var e=arguments,d=e[0]?e[0]:null;return this.each(function(){var f=b(this);if(a.prototype[d]&&f.data(a.prototype.name)&&d!="initialize")f.data(a.prototype.name)[d].apply(f.data(a.prototype.name),Array.prototype.slice.call(e,1));else if(!d||b.isPlainObject(d)){var c=new a;a.prototype.initialize&&c.initialize.apply(c,b.merge([f],e));f.data(a.prototype.name,c)}else b.error("Method "+d+" does not exist on jQuery."+a.name)})}})(jQuery);
| gpl-2.0 |
Roma48/moesto | modules/mod_news_pro_gk5/tmpl/portal_modes/product_gallery_2/controller.php | 10279 | <?php
/**
* Product Gallery II
* @package News Show Pro GK5
* @Copyright (C) 2009-2013 Gavick.com
* @ All rights reserved
* @ Joomla! is Free Software
* @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* @version $Revision: GK5 1.3.3 $
**/
// access restriction
defined('_JEXEC') or die('Restricted access');
class NSP_GK5_Product_Gallery_2 {
// necessary class fields
private $parent;
private $mode;
// constructor
function __construct($parent) {
$this->parent = $parent;
// detect the supported Data Sources
if(stripos($this->parent->config['data_source'], 'com_content_') !== FALSE) {
$this->mode = 'com_content';
} else if(stripos($this->parent->config['data_source'], 'k2_') !== FALSE) {
$this->mode = 'com_k2';
} else if(stripos($this->parent->config['data_source'], 'com_virtuemart_') !== FALSE) {
$this->mode = 'com_virtuemart';
} else {
$this->mode = false;
}
}
// static function which returns amount of articles to render - VERY IMPORTANT!!
static function amount_of_articles($parent) {
return $parent->config['portal_mode_product_gallery_2_rows'] * $parent->config['portal_mode_product_gallery_2_cols'];
}
// output generator
function output() {
// amount
$amount = 0;
// count
for($i = 0; $i < count($this->parent->content); $i++) {
if($this->get_image($i)) {
$amount++;
}
}
// main wrapper
echo '<div class="gkNspPM gkNspPM-ProductGallery2" data-cols="'.$this->parent->config['portal_mode_product_gallery_2_cols'].'">';
// render images
for($i = 0; $i < count($this->parent->content); $i++) {
if($this->get_image($i)) {
echo '<div class="gkImage">';
echo '<a href="' . $this->get_link($i) . '"><img src="'.strip_tags($this->get_image($i)).'" alt="'.strip_tags($this->parent->content[$i]->title).'" /></a>';
echo '<h4><a href="' . $this->get_link($i) . '">' . $this->parent->content[$i]['title'] . '</a></h4>';
$store_output = $this->get_store($this->parent->config, $this->parent->content[$i]['id']);
echo '<div class="gkPrice">' . $store_output['price'] . '</div>';
if($this->parent->config['portal_mode_product_gallery_2_button'] == 'cart') {
echo '<div class="gkAddToCart">' . $store_output['cart'] . '</div>';
} else {
echo '<div class="gkAddToCart">';
echo '<a href="' . $this->get_link($i) . '" class="readon">' . JText::_('MOD_NEWS_PRO_GK5_PORTAL_MODE_PRODUCT_GALLERY_2_READON_TEXT') . '</a>';
echo '</div>';
}
if($this->parent->content[$i]['featured'] && $this->parent->config['vm_show_featured_badge']) {
echo '<sup class="nspBadge">'.JText::_('MOD_NEWS_PRO_GK5_NSP_FEATURED').'</sup>';
}
echo '</div>';
}
}
// closing main wrapper
echo '</div>';
}
// function used to retrieve the item URL
function get_link($num) {
if($this->mode == 'com_content') {
return ($this->parent->content[$num]['id'] != 0) ? JRoute::_(ContentHelperRoute::getArticleRoute($this->parent->content[$num]['id'], $this->parent->content[$num]['cid'])) : JRoute::_('index.php?option=com_users&view=login');
} else if($this->mode == 'com_k2') {
//
require_once (JPATH_SITE.DS.'components'.DS.'com_k2'.DS.'helpers'.DS.'route.php');
//
return urldecode(JRoute::_(K2HelperRoute::getItemRoute($this->parent->content[$num]['id'].':'.urlencode($this->parent->content[$num]['alias']), $this->parent->content[$num]['cid'].':'.urlencode($this->parent->content[$num]['cat_alias']))));
} else if($this->mode == 'com_virtuemart') {
$itemid = $this->parent->config['vm_itemid'];
$link = 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$this->parent->content[$num]['id'].'&virtuemart_category_id='.$this->parent->content[$num]['cid'].'&Itemid='.$itemid;
return $link;
} else {
return false;
}
}
// image generator
function get_image($num) {
// used variables
$url = false;
$output = '';
// select the proper image function
if($this->mode == 'com_content') {
// load necessary com_content View class
if(!class_exists('NSP_GK5_com_content_View')) {
require_once(JModuleHelper::getLayoutPath('mod_news_pro_gk5', 'com_content/view'));
}
// generate the com_content image URL only
$url = NSP_GK5_com_content_View::image($this->parent->config, $this->parent->content[$num], true, true);
} else if($this->mode == 'com_k2') {
// load necessary k2 View class
if(!class_exists('NSP_GK5_com_k2_View')) {
require_once(JModuleHelper::getLayoutPath('mod_news_pro_gk5', 'com_k2/view'));
}
// generate the K2 image URL only
$url = NSP_GK5_com_k2_View::image($this->parent->config, $this->parent->content[$num], true, true);
} else if($this->mode == 'com_virtuemart') {
// load necessary com_content View class
if(!class_exists('NSP_GK5_com_virtuemart_View')) {
require_once(JModuleHelper::getLayoutPath('mod_news_pro_gk5', 'com_virtuemart/view'));
}
// generate the com_content image URL only
$url = NSP_GK5_com_virtuemart_View::image($this->parent->config, $this->parent->content[$num], true, true);
}
// check if the URL exists
if($url === FALSE) {
return false;
} else {
// if URL isn't blank - return it!
if($url != '') {
return $url;
} else {
return false;
}
}
}
// store generator
// function used to show the store details
function get_store($config, $id) {
if($this->mode != 'com_virtuemart') {
return array(
"price" => '',
"cart" => ''
);
} else {
// if the VM is available
if (!class_exists( 'VmConfig' )) {
require(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart'.DS.'helpers'.DS.'config.php');
}
VmConfig::loadConfig();
// Load the language file of com_virtuemart.
JFactory::getLanguage()->load('com_virtuemart');
// load necessary classes
if (!class_exists( 'calculationHelper' )) {
require(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart'.DS.'helpers'.DS.'calculationh.php');
}
if (!class_exists( 'CurrencyDisplay' )) {
require(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart'.DS.'helpers'.DS.'currencydisplay.php');
}
if (!class_exists( 'VirtueMartModelVendor' )) {
require(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart'.DS.'models'.DS.'vendor.php');
}
if (!class_exists( 'VmImage' )) {
require(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart'.DS.'helpers'.DS.'image.php');
}
if (!class_exists( 'shopFunctionsF' )) {
require(JPATH_SITE.DS.'components'.DS.'com_virtuemart'.DS.'helpers'.DS.'shopfunctionsf.php');
}
if (!class_exists( 'calculationHelper' )) {
require(JPATH_COMPONENT_SITE.DS.'helpers'.DS.'cart.php');
}
if (!class_exists( 'VirtueMartModelProduct' )){
JLoader::import( 'product', JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'models' );
}
// load the base
$productModel = new VirtueMartModelProduct();
$product = $productModel->getProduct($id, 100, true, true, true);
$currency = CurrencyDisplay::getInstance();
$price = '<strong>'.$currency->createPriceDiv($config['vm_show_price_type'], '', $product->prices, true).'</strong>';
if($config['vm_add_to_cart'] == 1) {
vmJsApi::jPrice();
vmJsApi::writeJS();
}
$news_price = '<div class="PricebasePriceWithTax">';
//
if($config['vm_show_price_type'] != 'none') {
if($config['vm_display_type'] == 'text_price') {
$news_price .= '<span class="PricebasePriceWithTax">'.JText::_('MOD_NEWS_PRO_GK5_PRODUCT_PRICE').' '.$price.'</span>';
} else {
$news_price .= '<span class="PricebasePriceWithTax">'.$price.'</span>';
}
}
$news_price .= '</div>';
// display discount
if($config['vm_show_discount_amount'] == 1) {
$disc_amount = $currency->priceDisplay($product->prices['discountAmount'], $currency->getId());
$news_price.= '<small class="PricetaxAmount">' . JText::_('MOD_NEWS_PRO_GK5_PRODUCT_DISCOUNT_AMOUNT'). $disc_amount . '</small>';
}
// display tax
if($config['vm_show_tax'] == 1) {
$taxAmount = $currency->priceDisplay($product->prices['taxAmount'], $currency->getId());
$news_price.= '<small class="PricetaxAmount">' . JText::_('MOD_NEWS_PRO_GK5_PRODUCT_TAX_AMOUNT'). $taxAmount . '</small>';
}
// 'Add to cart' button
$news_cart = '';
if($config['portal_mode_product_gallery_2_button'] == 'cart') {
$code = '<div class="addtocart-area">';
$code .= '<form method="post" class="product" action="index.php">';
$code .= '<div class="addtocart-bar">';
$code .= '<span class="quantity-box" style="display: none"><input type="text" class="quantity-input" name="quantity[]" value="1" /></span>';
$addtoCartButton = '';
if($product->addToCartButton){
$addtoCartButton = $product->addToCartButton;
} else {
$addtoCartButton = shopFunctionsF::getAddToCartButton($product->orderable);
}
$code .= $addtoCartButton;
$code .= '</div>
<input type="hidden" class="pname" value="'.$product->product_name.'"/>
<input type="hidden" name="option" value="com_virtuemart" />
<input type="hidden" name="view" value="cart" />
<input type="hidden" name="task" value="add" />
<input type="hidden" name="virtuemart_product_id[]" value="'.$product->virtuemart_product_id.'" />
<input type="hidden" name="virtuemart_category_id[]" value="'.$product->virtuemart_category_id.'" />
</form>';
$code .= '</div>';
$news_cart .= $code;
}
// results
return array(
"price" => $news_price,
"cart" => $news_cart
);
}
}
}
// EOF
| gpl-2.0 |
taherbth/bestbuy-bestsell | wp-content/plugins/mega_main_menu/extensions/dynamic_styles/skin.php | 41412 | <?php
/**
* @package MegaMain
* @subpackage MegaMain
* @since mm 1.0
*/
if (! function_exists( 'mega_main_menu__array_skin' ) ) {
function mega_main_menu__array_skin ( $current_class ) {
$mega_menu_locations = is_array( $current_class->get_option( 'mega_menu_locations' ) )
? $current_class->get_option( 'mega_menu_locations' )
: array();
/* empty */
$out = '.empty{}/* empty */';
$out .= '
#mega_main_menu .nav_logo > .logo_link > img
{
max-height: ' . $current_class->get_option( 'logo_height', '90' ) . '%;
}
';
/* mega_menu_locations */
// array_shift( $mega_menu_locations );
if ( in_array( 'is_checkbox', $mega_menu_locations) ) {
$is_checkbox_key = array_search( 'is_checkbox', $mega_menu_locations );
unset( $mega_menu_locations[ $is_checkbox_key ] );
}
foreach ( $mega_menu_locations as $key => $location_name ) {
if ( is_array( $current_class->get_option( 'indefinite_location_mode' ) ) && in_array( 'true', $current_class->get_option( 'indefinite_location_mode' ) ) ) {
$location_class = '';
} else {
$location_class = '.' . $location_name;
}
$out .= '/* ' . $location_name . ' */
/* initial_height */
#mega_main_menu' . $location_class . '
{
min-height:' . $current_class->get_option( $location_name . '_first_level_item_height' ) . 'px;
}
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > .nav_logo > .logo_link,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > .nav_logo > .mobile_toggle,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > .nav_logo > .mobile_toggle > .mobile_button,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li > .item_link,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li > .item_link > .link_content,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li.nav_search_box,
#mega_main_menu' . $location_class . '.icons-left > .menu_holder > .menu_inner > ul > li > .item_link > i,
#mega_main_menu' . $location_class . '.icons-right > .menu_holder > .menu_inner > ul > li > .item_link > i,
#mega_main_menu' . $location_class . '.icons-top > .menu_holder > .menu_inner > ul > li > .item_link.disable_icon > .link_content,
#mega_main_menu' . $location_class . '.icons-top > .menu_holder > .menu_inner > ul > li > .item_link.menu_item_without_text > i,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li.nav_buddypress > .item_link > i.ci-icon-buddypress-user
{
height:' . $current_class->get_option( $location_name . '_first_level_item_height' ) . 'px;
line-height:' . $current_class->get_option( $location_name . '_first_level_item_height' ) . 'px;
}
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li > .item_link > .link_content > .link_text
{
height:' . $current_class->get_option( $location_name . '_first_level_item_height' ) . 'px;
}
#mega_main_menu' . $location_class . '.icons-top > .menu_holder > .menu_inner > ul > li > .item_link > i,
#mega_main_menu' . $location_class . '.icons-top > .menu_holder > .menu_inner > ul > li > .item_link > .link_content
{
height:' . ( $current_class->get_option( $location_name . '_first_level_item_height', 1 ) / 2 ) . 'px;
line-height:' . ( $current_class->get_option( $location_name . '_first_level_item_height', 1 ) / 3 ) . 'px;
}
#mega_main_menu' . $location_class . '.icons-top > .menu_holder > .menu_inner > ul > li > .item_link.with_icon > .link_content > .link_text
{
height:' . ( $current_class->get_option( $location_name . '_first_level_item_height', 1 ) / 3 ) . 'px;
}
#mega_main_menu' . $location_class . '.icons-top > .menu_holder > .menu_inner > ul > li > .item_link > i
{
padding-top:' . ( $current_class->get_option( $location_name . '_first_level_item_height', 1 ) / 3 / 2 ) . 'px;
}
#mega_main_menu' . $location_class . '.icons-top > .menu_holder > .menu_inner > ul > li > .item_link > .link_content
{
padding-bottom:' . ( $current_class->get_option( $location_name . '_first_level_item_height', 1 ) / 3 / 2 ) . 'px;
}
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li.nav_buddypress > .item_link > i:before
{
width:' . ( $current_class->get_option( $location_name . '_first_level_item_height', 1 ) * 0.6 ) . 'px;
}
/* initial_height_sticky */
#mega_main_menu' . $location_class . ' > .menu_holder.sticky_container > .menu_inner > .nav_logo > .logo_link,
#mega_main_menu' . $location_class . ' > .menu_holder.sticky_container > .menu_inner > .nav_logo > .mobile_toggle,
#mega_main_menu' . $location_class . ' > .menu_holder.sticky_container > .menu_inner > .nav_logo > .mobile_toggle > .mobile_button,
#mega_main_menu' . $location_class . ' > .menu_holder.sticky_container > .menu_inner > ul > li > .item_link,
#mega_main_menu' . $location_class . ' > .menu_holder.sticky_container > .menu_inner > ul > li > .item_link > .link_content,
#mega_main_menu' . $location_class . ' > .menu_holder.sticky_container > .menu_inner > ul > li.nav_search_box,
#mega_main_menu' . $location_class . '.icons-left > .menu_holder.sticky_container > .menu_inner > ul > li > .item_link > i,
#mega_main_menu' . $location_class . '.icons-right > .menu_holder.sticky_container > .menu_inner > ul > li > .item_link > i,
#mega_main_menu' . $location_class . '.icons-top > .menu_holder.sticky_container > .menu_inner > ul > li > .item_link.disable_icon > .link_content,
#mega_main_menu' . $location_class . '.icons-top > .menu_holder.sticky_container > .menu_inner > ul > li > .item_link.menu_item_without_text > i,
#mega_main_menu' . $location_class . ' > .menu_holder.sticky_container > .menu_inner > ul > li.nav_buddypress > .item_link > i.ci-icon-buddypress-user
{
height:' . $current_class->get_option( $location_name . '_first_level_item_height_sticky' ) . 'px;
line-height:' . $current_class->get_option( $location_name . '_first_level_item_height_sticky' ) . 'px;
}
#mega_main_menu' . $location_class . ' > .menu_holder.sticky_container > .menu_inner > ul > li > .item_link > .link_content > .link_text
{
height:' . $current_class->get_option( $location_name . '_first_level_item_height_sticky' ) . 'px;
}
#mega_main_menu' . $location_class . '.icons-top > .menu_holder.sticky_container > .menu_inner > ul > li > .item_link > i,
#mega_main_menu' . $location_class . '.icons-top > .menu_holder.sticky_container > .menu_inner > ul > li > .item_link > .link_content
{
height:' . ( $current_class->get_option( $location_name . '_first_level_item_height_sticky', 1 ) / 2 ) . 'px;
line-height:' . ( $current_class->get_option( $location_name . '_first_level_item_height_sticky', 1 ) / 3 ) . 'px;
}
#mega_main_menu' . $location_class . '.icons-top > .menu_holder.sticky_container > .menu_inner > ul > li > .item_link.with_icon > .link_content > .link_text
{
height:' . ( $current_class->get_option( $location_name . '_first_level_item_height_sticky', 1 ) / 3 ) . 'px;
}
#mega_main_menu' . $location_class . '.icons-top > .menu_holder.sticky_container > .menu_inner > ul > li > .item_link > i
{
padding-top:' . ( $current_class->get_option( $location_name . '_first_level_item_height_sticky', 1 ) / 3 / 2 ) . 'px;
}
#mega_main_menu' . $location_class . '.icons-top > .menu_holder.sticky_container > .menu_inner > ul > li > .item_link > .link_content
{
padding-bottom:' . ( $current_class->get_option( $location_name . '_first_level_item_height_sticky', 1 ) / 3 / 2 ) . 'px;
}
#mega_main_menu' . $location_class . ' > .menu_holder.sticky_container > .menu_inner > ul > li.nav_buddypress > .item_link > i:before
{
width:' . ( $current_class->get_option( $location_name . '_first_level_item_height_sticky', 1 ) * 0.6 ) . 'px;
}
#mega_main_menu' . $location_class . '.primary_style-buttons > .menu_holder.sticky_container > .menu_inner > ul > li > .item_link
{
margin:' . ( ( $current_class->get_option( $location_name . '_first_level_item_height_sticky', 1 ) - $current_class->get_option( $location_name . '_first_level_button_height', 1 ) ) / 2 ) . 'px 4px;
}
/* initial_height_mobile */
@media (max-width: 767px) { /* DO NOT CHANGE THIS LINE (See = Specific Options -> Responsive Resolution) */
#mega_main_menu' . $location_class . '
{
min-height:' . $current_class->get_option( $location_name . '_first_level_item_height_sticky' ) . 'px;
}
#mega_main_menu' . $location_class . '.mobile_minimized-enable > .menu_holder > .menu_inner > .nav_logo > .logo_link,
#mega_main_menu' . $location_class . '.mobile_minimized-enable > .menu_holder > .menu_inner > .nav_logo > .mobile_toggle,
#mega_main_menu' . $location_class . '.mobile_minimized-enable > .menu_holder > .menu_inner > .nav_logo > .mobile_toggle > .mobile_button,
#mega_main_menu' . $location_class . '.mobile_minimized-enable > .menu_holder > .menu_inner > ul > li > .item_link,
#mega_main_menu' . $location_class . '.mobile_minimized-enable > .menu_holder > .menu_inner > ul > li > .item_link > .link_content,
#mega_main_menu' . $location_class . '.mobile_minimized-enable > .menu_holder > .menu_inner > ul > li.nav_search_box,
#mega_main_menu' . $location_class . '.mobile_minimized-enable.icons-left > .menu_holder > .menu_inner > ul > li > .item_link > i,
#mega_main_menu' . $location_class . '.mobile_minimized-enable.icons-right > .menu_holder > .menu_inner > ul > li > .item_link > i,
#mega_main_menu' . $location_class . '.mobile_minimized-enable.icons-top > .menu_holder > .menu_inner > ul > li > .item_link.disable_icon > .link_content,
#mega_main_menu' . $location_class . '.mobile_minimized-enable.icons-top > .menu_holder > .menu_inner > ul > li > .item_link.menu_item_without_text > i,
#mega_main_menu' . $location_class . '.mobile_minimized-enable > .menu_holder > .menu_inner > ul > li.nav_buddypress > .item_link > i.ci-icon-buddypress-user
{
height:' . $current_class->get_option( $location_name . '_first_level_item_height_sticky' ) . 'px;
line-height:' . $current_class->get_option( $location_name . '_first_level_item_height_sticky' ) . 'px;
}
#mega_main_menu' . $location_class . '.mobile_minimized-enable > .menu_holder > .menu_inner > ul > li > .item_link > .link_content > .link_text
{
height:' . $current_class->get_option( $location_name . '_first_level_item_height_sticky' ) . 'px;
}
#mega_main_menu' . $location_class . '.mobile_minimized-enable.icons-top > .menu_holder > .menu_inner > ul > li > .item_link > i,
#mega_main_menu' . $location_class . '.mobile_minimized-enable.icons-top > .menu_holder > .menu_inner > ul > li > .item_link > .link_content
{
height:' . ( $current_class->get_option( $location_name . '_first_level_item_height_sticky', 1 ) / 2 ) . 'px;
line-height:' . ( $current_class->get_option( $location_name . '_first_level_item_height_sticky', 1 ) / 3 ) . 'px;
}
#mega_main_menu' . $location_class . '.mobile_minimized-enable.icons-top > .menu_holder > .menu_inner > ul > li > .item_link > i
{
padding-top:' . ( $current_class->get_option( $location_name . '_first_level_item_height_sticky', 1 ) / 3 / 2 ) . 'px;
}
#mega_main_menu' . $location_class . '.mobile_minimized-enable.icons-top > .menu_holder > .menu_inner > ul > li > .item_link > .link_content
{
padding-bottom:' . ( $current_class->get_option( $location_name . '_first_level_item_height_sticky', 1 ) / 3 / 2 ) . 'px;
}
#mega_main_menu' . $location_class . '.mobile_minimized-enable > .menu_holder > .menu_inner > ul > li.nav_buddypress > .item_link > i:before
{
width:' . ( $current_class->get_option( $location_name . '_first_level_item_height_sticky', 1 ) * 0.6 ) . 'px;
}
#mega_main_menu' . $location_class . '.primary_style-buttons > .menu_holder > .menu_inner > ul > li > .item_link
{
margin:' . ( ( $current_class->get_option( $location_name . '_first_level_item_height_sticky', 1 ) - $current_class->get_option( $location_name . '_first_level_button_height', 1 ) ) / 2 ) . 'px 4px;
}
}
/* style-buttons */
#mega_main_menu' . $location_class . '.primary_style-buttons > .menu_holder > .menu_inner > ul > li > .item_link,
#mega_main_menu' . $location_class . '.primary_style-buttons > .menu_holder > .menu_inner > ul > li > .item_link > .link_content,
#mega_main_menu' . $location_class . '.primary_style-buttons.icons-left > .menu_holder > .menu_inner > ul > li > .item_link > i,
#mega_main_menu' . $location_class . '.primary_style-buttons.icons-right > .menu_holder > .menu_inner > ul > li > .item_link > i,
#mega_main_menu' . $location_class . '.primary_style-buttons.icons-top > .menu_holder > .menu_inner > ul > li > .item_link.disable_icon > .link_content,
#mega_main_menu' . $location_class . '.primary_style-buttons.icons-top > .menu_holder > .menu_inner > ul > li > .item_link.menu_item_without_text > i,
#mega_main_menu' . $location_class . '.primary_style-buttons > .menu_holder > .menu_inner > ul > li.nav_buddypress > .item_link > i.ci-icon-buddypress-user
{
height:' . $current_class->get_option( $location_name . '_first_level_button_height' ) . 'px;
line-height:' . $current_class->get_option( $location_name . '_first_level_button_height' ) . 'px;
}
#mega_main_menu' . $location_class . '.primary_style-buttons > .menu_holder > .menu_inner > ul > li > .item_link > .link_content > .link_text
{
height:' . $current_class->get_option( $location_name . '_first_level_button_height' ) . 'px;
}
#mega_main_menu' . $location_class . '.primary_style-buttons > .menu_holder > .menu_inner > ul > li > .item_link
{
margin:' . ( ( $current_class->get_option( $location_name . '_first_level_item_height', 1 ) - $current_class->get_option( $location_name . '_first_level_button_height', 1 ) ) / 2 ) . 'px 4px;
}
#mega_main_menu' . $location_class . '.primary_style-buttons.icons-top > .menu_holder > .menu_inner > ul > li > .item_link > i,
#mega_main_menu' . $location_class . '.primary_style-buttons.icons-top > .menu_holder > .menu_inner > ul > li > .item_link > .link_content
{
height:' . ( $current_class->get_option( $location_name . '_first_level_button_height', 1 ) / 2 ) . 'px;
line-height:' . ( $current_class->get_option( $location_name . '_first_level_button_height', 1 ) / 3 ) . 'px;
}
#mega_main_menu' . $location_class . '.primary_style-buttons.icons-top > .menu_holder > .menu_inner > ul > li > .item_link.with_icon > .link_content > .link_text
{
height:' . ( $current_class->get_option( $location_name . '_first_level_button_height', 1 ) / 3 ) . 'px;
}
#mega_main_menu' . $location_class . '.primary_style-buttons.icons-top > .menu_holder > .menu_inner > ul > li > .item_link > i
{
padding-top:' . ( $current_class->get_option( $location_name . '_first_level_button_height', 1 ) / 3 / 2 ) . 'px;
}
#mega_main_menu' . $location_class . '.primary_style-buttons.icons-top > .menu_holder > .menu_inner > ul > li > .item_link > .link_content
{
padding-bottom:' . ( $current_class->get_option( $location_name . '_first_level_button_height', 1 ) / 3 / 2 ) . 'px;
}
/* color_scheme */
#mega_main_menu' . $location_class . ' > .menu_holder > .mmm_fullwidth_container
{
' . mm_common::css_gradient( $current_class->get_option( $location_name . '_menu_bg_gradient' ) ) . '
}
#mega_main_menu' . $location_class . ' > .menu_holder > .mmm_fullwidth_container
{
' . mm_common::css_bg_image( $current_class->get_option( $location_name . '_menu_bg_image' ) ) . '
}
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > .nav_logo > .mobile_toggle > .mobile_button,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li > .item_link,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li > .item_link .link_text,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li.nav_search_box *,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li .post_details > .post_title,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li .post_details > .post_title > .item_link
{
' . mm_common::css_font( $current_class->get_option( $location_name . '_menu_first_level_link_font') ) . '
}
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li > .item_link > i
{
font-size:' . $current_class->get_option( $location_name . '_menu_first_level_icon_font') . 'px;
}
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li > .item_link > i:before
{
width:' . $current_class->get_option( $location_name . '_menu_first_level_icon_font') . 'px;
}
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > .nav_logo > .mobile_toggle > .mobile_button,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li > .item_link,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li > .item_link *
{
color: ' . $current_class->get_option( $location_name . '_menu_first_level_link_color') . ';
}
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li > .item_link:after
{
border-color: ' . $current_class->get_option( $location_name . '_menu_first_level_link_color') . ';
}
#mega_main_menu' . $location_class . '.primary_style-buttons > .menu_holder > .menu_inner > .nav_logo > .mobile_toggle,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li > .item_link
{
' . mm_common::css_gradient( $current_class->get_option( $location_name . '_menu_first_level_link_bg') ) . '
}
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li:hover > .item_link,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li > .item_link:hover,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li > .item_link:focus,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li.current-menu-ancestor > .item_link,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li.current-page-ancestor > .item_link,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li.current-post-ancestor > .item_link,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li.current-menu-item > .item_link
{
' . mm_common::css_gradient( $current_class->get_option( $location_name . '_menu_first_level_link_bg_hover') ) . '
}
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li.nav_search_box > #mega_main_menu_searchform
{
background-color:' . $current_class->get_option( $location_name . '_menu_search_bg') . ';
}
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li.nav_search_box .field,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li.nav_search_box *,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li .icosearch
{
color: ' . $current_class->get_option( $location_name . '_menu_search_color') . ';
}
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li:hover > .item_link,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li > .item_link:hover,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li > .item_link:focus,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li:hover > .item_link *,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li.current-menu-ancestor > .item_link,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li.current-menu-ancestor > .item_link *,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li.current-page-ancestor > .item_link *,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li.current-post-ancestor > .item_link *,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li.current-menu-item > .item_link *
{
color: ' . $current_class->get_option( $location_name . '_menu_first_level_link_color_hover') . ';
}
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li.current-menu-ancestor > .item_link:after,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li.current-page-ancestor > .item_link:after,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li.current-post-ancestor > .item_link:after,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li.current-menu-item > .item_link:after,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li:hover > .item_link:after
{
border-color: ' . $current_class->get_option( $location_name . '_menu_first_level_link_color_hover') . ';
}
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li.default_dropdown .mega_dropdown,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li > .mega_dropdown,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li .mega_dropdown > li .post_details
{
' . mm_common::css_gradient( $current_class->get_option( $location_name . '_menu_dropdown_wrapper_gradient') ) . '
}
#mega_main_menu' . $location_class . ' .mega_dropdown *
{
color: ' . $current_class->get_option( $location_name . '_menu_dropdown_plain_text_color') . ';
}
#mega_main_menu' . $location_class . ' ul li .mega_dropdown > li > .item_link,
#mega_main_menu' . $location_class . ' ul li .mega_dropdown > li > .item_link .link_text,
#mega_main_menu' . $location_class . ' ul li .mega_dropdown,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li .post_details > .post_description
{
' . mm_common::css_font( $current_class->get_option( $location_name . '_menu_dropdown_link_font') ) . '
}
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul li .mega_dropdown > li > .item_link.with_icon
{
line-height: ' . $current_class->get_option( $location_name . '_menu_dropdown_icon_font') . 'px;
min-height: ' . $current_class->get_option( $location_name . '_menu_dropdown_icon_font') . 'px;
}
#mega_main_menu' . $location_class . ' li.default_dropdown > .mega_dropdown > .menu-item > .item_link > i,
#mega_main_menu' . $location_class . ' li.tabs_dropdown > .mega_dropdown > .menu-item > .item_link > i,
#mega_main_menu' . $location_class . ' li.widgets_dropdown > .mega_dropdown > .menu-item > .item_link > i,
#mega_main_menu' . $location_class . ' li.multicolumn_dropdown > .mega_dropdown > .menu-item > .item_link > i
{
width: ' . $current_class->get_option( $location_name . '_menu_dropdown_icon_font') . 'px;
height: ' . $current_class->get_option( $location_name . '_menu_dropdown_icon_font') . 'px;
line-height: ' . $current_class->get_option( $location_name . '_menu_dropdown_icon_font') . 'px;
font-size: ' . $current_class->get_option( $location_name . '_menu_dropdown_icon_font') . 'px;
margin-top: -' . ( is_numeric( $current_class->get_option( $location_name . '_menu_dropdown_icon_font', 12 ) ) ? ( $current_class->get_option( $location_name . '_menu_dropdown_icon_font', 12 ) / 2 ) : ( 12 / 2 ) ) . 'px;
}
#mega_main_menu' . $location_class . ' li.default_dropdown > .mega_dropdown > .menu-item > .item_link.with_icon > .link_content,
#mega_main_menu' . $location_class . ' li.tabs_dropdown > .mega_dropdown > .menu-item > .item_link.with_icon > .link_content,
#mega_main_menu' . $location_class . ' li.widgets_dropdown > .mega_dropdown > .menu-item > .item_link.with_icon > .link_content,
#mega_main_menu' . $location_class . ' li.multicolumn_dropdown > .mega_dropdown > .menu-item > .item_link.with_icon > .link_content
{
margin-left: ' . ( is_numeric( $current_class->get_option( $location_name . '_menu_dropdown_icon_font', 12 ) ) ? ( $current_class->get_option( $location_name . '_menu_dropdown_icon_font', 12 ) + 8 ) : ( 12 + 8 ) ) . 'px;
}
#mega_main_menu' . $location_class . '.language_direction-rtl li.default_dropdown > .mega_dropdown > .menu-item > .item_link.with_icon > .link_content,
#mega_main_menu' . $location_class . '.language_direction-rtl li.tabs_dropdown > .mega_dropdown > .menu-item > .item_link.with_icon > .link_content,
#mega_main_menu' . $location_class . '.language_direction-rtl li.widgets_dropdown > .mega_dropdown > .menu-item > .item_link.with_icon > .link_content,
#mega_main_menu' . $location_class . '.language_direction-rtl li.multicolumn_dropdown > .mega_dropdown > .menu-item > .item_link.with_icon > .link_content
{
margin-right: ' . ( is_numeric( $current_class->get_option( $location_name . '_menu_dropdown_icon_font', 12 ) ) ? ( $current_class->get_option( $location_name . '_menu_dropdown_icon_font', 12 ) + 8 ) : ( 12 + 8 ) ) . 'px;
}
#mega_main_menu' . $location_class . ' li.default_dropdown .mega_dropdown > li > .item_link,
#mega_main_menu' . $location_class . ' li.widgets_dropdown .mega_dropdown > li > .item_link,
#mega_main_menu' . $location_class . ' li.multicolumn_dropdown .mega_dropdown > li > .item_link,
#mega_main_menu' . $location_class . ' li.grid_dropdown .mega_dropdown > li > .item_link
{
' . mm_common::css_gradient( $current_class->get_option( $location_name . '_menu_dropdown_link_bg') ) . '
color: ' . $current_class->get_option( $location_name . '_menu_dropdown_link_color') . ';
}
#mega_main_menu' . $location_class . ' li .post_details > .post_icon > i,
#mega_main_menu' . $location_class . ' li .mega_dropdown .item_link *,
#mega_main_menu' . $location_class . ' li .mega_dropdown a,
#mega_main_menu' . $location_class . ' li .mega_dropdown a *,
/*
#mega_main_menu' . $location_class . ' li.default_dropdown .mega_dropdown > li > .item_link *,
#mega_main_menu' . $location_class . ' li.widgets_dropdown .mega_dropdown > li > .item_link *
#mega_main_menu' . $location_class . ' li.multicolumn_dropdown .mega_dropdown > li > .item_link *
#mega_main_menu' . $location_class . ' li.grid_dropdown .mega_dropdown > li > .item_link *,
*/
#mega_main_menu' . $location_class . ' li li .post_details a
{
color: ' . $current_class->get_option( $location_name . '_menu_dropdown_link_color') . ';
}
#mega_main_menu' . $location_class . ' li.default_dropdown > .mega_dropdown > .menu-item > .item_link:before
{
border-color: ' . $current_class->get_option( $location_name . '_menu_dropdown_link_color') . ';
}
#mega_main_menu' . $location_class . ' li.default_dropdown > .mega_dropdown > li > .item_link
{
border-color: ' . $current_class->get_option( $location_name . '_menu_dropdown_link_border_color') . ';
}
#mega_main_menu' . $location_class . ' ul .mega_dropdown > li.current-menu-item > .item_link,
#mega_main_menu' . $location_class . ' ul .mega_dropdown > li > .item_link:focus,
#mega_main_menu' . $location_class . ' ul .mega_dropdown > li > .item_link:hover,
/*
#mega_main_menu' . $location_class . ' ul li.default_dropdown > .mega_dropdown > li > .item_link:hover,
#mega_main_menu' . $location_class . ' ul li.default_dropdown > .mega_dropdown > li.current-menu-item > .item_link,
#mega_main_menu' . $location_class . ' ul li.widgets_dropdown > .mega_dropdown > li > .item_link:hover,
#mega_main_menu' . $location_class . ' ul li.widgets_dropdown > .mega_dropdown > li.current-menu-item > .item_link,
#mega_main_menu' . $location_class . ' ul li.tabs_dropdown > .mega_dropdown > li > .item_link:hover,
#mega_main_menu' . $location_class . ' ul li.tabs_dropdown > .mega_dropdown > li.current-menu-item > .item_link,
#mega_main_menu' . $location_class . ' ul li.multicolumn_dropdown > .mega_dropdown > li > .item_link:hover,
#mega_main_menu' . $location_class . ' ul li.multicolumn_dropdown > .mega_dropdown > li.current-menu-item > .item_link,
#mega_main_menu' . $location_class . ' ul li.post_type_dropdown > .mega_dropdown > li:hover > .item_link,
#mega_main_menu' . $location_class . ' ul li.post_type_dropdown > .mega_dropdown > li > .item_link:hover,
#mega_main_menu' . $location_class . ' ul li.post_type_dropdown > .mega_dropdown > li.current-menu-item > .item_link,
#mega_main_menu' . $location_class . ' ul li.grid_dropdown > .mega_dropdown > li:hover > .processed_image,
#mega_main_menu' . $location_class . ' ul li.grid_dropdown > .mega_dropdown > li:hover > .item_link,
#mega_main_menu' . $location_class . ' ul li.grid_dropdown > .mega_dropdown > li > .item_link:hover,
#mega_main_menu' . $location_class . ' ul li.grid_dropdown > .mega_dropdown > li.current-menu-item > .item_link,
*/
#mega_main_menu' . $location_class . ' ul li.post_type_dropdown > .mega_dropdown > li > .processed_image:hover
{
' . mm_common::css_gradient( $current_class->get_option( $location_name . '_menu_dropdown_link_bg_hover') ) . '
color: ' . $current_class->get_option( $location_name . '_menu_dropdown_link_color_hover') . ';
}
#mega_main_menu' . $location_class . ' .mega_dropdown > li.current-menu-item > .item_link *,
#mega_main_menu' . $location_class . ' .mega_dropdown > li > .item_link:focus *,
#mega_main_menu' . $location_class . ' .mega_dropdown > li > .item_link:hover *,
/*
#mega_main_menu' . $location_class . ' li[class*="_dropdown"] > .mega_dropdown > li > .item_link:focus *,
#mega_main_menu' . $location_class . ' li.default_dropdown > .mega_dropdown > li > .item_link:hover *,
#mega_main_menu' . $location_class . ' li.default_dropdown > .mega_dropdown > li.current-menu-item > .item_link *,
#mega_main_menu' . $location_class . ' li.widgets_dropdown > .mega_dropdown > li > .item_link:hover *,
#mega_main_menu' . $location_class . ' li.widgets_dropdown > .mega_dropdown > li.current-menu-item > .item_link *,
#mega_main_menu' . $location_class . ' li.tabs_dropdown > .mega_dropdown > li > .item_link:hover *,
#mega_main_menu' . $location_class . ' li.tabs_dropdown > .mega_dropdown > li.current-menu-item > .item_link *,
#mega_main_menu' . $location_class . ' li.multicolumn_dropdown > .mega_dropdown > li > .item_link:hover *,
#mega_main_menu' . $location_class . ' li.multicolumn_dropdown > .mega_dropdown > li.current-menu-item > .item_link *,
#mega_main_menu' . $location_class . ' li.post_type_dropdown > .mega_dropdown > li:hover > .item_link *,
#mega_main_menu' . $location_class . ' li.post_type_dropdown > .mega_dropdown > li.current-menu-item > .item_link *,
#mega_main_menu' . $location_class . ' li.grid_dropdown > .mega_dropdown > li:hover > .item_link *,
#mega_main_menu' . $location_class . ' li.grid_dropdown > .mega_dropdown > li a:hover *,
#mega_main_menu' . $location_class . ' li.grid_dropdown > .mega_dropdown > li.current-menu-item > .item_link *,
*/
#mega_main_menu' . $location_class . ' li.post_type_dropdown > .mega_dropdown > li > .processed_image:hover > .cover > a > i
{
color: ' . $current_class->get_option( $location_name . '_menu_dropdown_link_color_hover') . ';
}
#mega_main_menu' . $location_class . ' li.default_dropdown > .mega_dropdown > .menu-item.current-menu-item > .item_link:before,
#mega_main_menu' . $location_class . ' li.default_dropdown > .mega_dropdown > .menu-item > .item_link:focus:before,
#mega_main_menu' . $location_class . ' li.default_dropdown > .mega_dropdown > .menu-item > .item_link:hover:before
{
border-color: ' . $current_class->get_option( $location_name . '_menu_dropdown_link_color_hover') . ';
}
#mega_main_menu' . $location_class . '.primary_style-buttons > .menu_holder > .menu_inner > ul > li > .item_link,
#mega_main_menu' . $location_class . '.primary_style-buttons > .menu_holder > .menu_inner > .nav_logo > .mobile_toggle,
#mega_main_menu' . $location_class . '.primary_style-buttons.direction-vertical > .menu_holder > .menu_inner > ul > li:first-child > .item_link,
#mega_main_menu' . $location_class . ' > .menu_holder > .mmm_fullwidth_container,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li .post_details,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul .mega_dropdown
{
border-radius: ' . $current_class->get_option( $location_name . '_corners_rounding') . 'px;
}
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > span.nav_logo,
#mega_main_menu' . $location_class . '.primary_style-flat.direction-horizontal.first-lvl-align-left.no-logo > .menu_holder > .menu_inner > ul > li:first-child > .item_link,
#mega_main_menu' . $location_class . '.primary_style-flat.direction-horizontal.first-lvl-align-center.no-logo.no-search.no-woo_cart > .menu_holder > .menu_inner > ul > li:first-child > .item_link
{
border-radius: ' . $current_class->get_option( $location_name . '_corners_rounding') . 'px 0px 0px ' . $current_class->get_option( $location_name . '_corners_rounding') . 'px;
}
#mega_main_menu' . $location_class . '.direction-horizontal.no-search > .menu_holder > .menu_inner > ul > li.nav_woo_cart > .item_link,
#mega_main_menu' . $location_class . '.direction-horizontal.no-search.no-woo_cart > .menu_holder > .menu_inner > ul > li.nav_buddypress > .item_link,
#mega_main_menu' . $location_class . '.primary_style-flat.direction-horizontal.first-lvl-align-right.no-search.no-woo_cart > .menu_holder > .menu_inner > ul > li:last-child > .item_link,
#mega_main_menu' . $location_class . '.primary_style-flat.direction-horizontal.first-lvl-align-center.no-search.no-woo_cart > .menu_holder > .menu_inner > ul > li:last-child > .item_link
{
border-radius: 0px ' . $current_class->get_option( $location_name . '_corners_rounding') . 'px ' . $current_class->get_option( $location_name . '_corners_rounding') . 'px 0px;
}
#mega_main_menu' . $location_class . ' li.default_dropdown > .mega_dropdown > li:first-child > .item_link,
#mega_main_menu' . $location_class . '.direction-vertical > .menu_holder > .menu_inner > ul > li:first-child > .item_link
{
border-radius: ' . $current_class->get_option( $location_name . '_corners_rounding') . 'px ' . $current_class->get_option( $location_name . '_corners_rounding') . 'px 0px 0px;
}
#mega_main_menu' . $location_class . ' li.default_dropdown > .mega_dropdown > li:last-child > .item_link
{
border-radius: 0px 0px ' . $current_class->get_option( $location_name . '_corners_rounding') . 'px ' . $current_class->get_option( $location_name . '_corners_rounding') . 'px;
}
#mega_main_menu' . $location_class . ' .widgets_dropdown > .mega_dropdown > li.default_dropdown .mega_dropdown > li > .item_link,
#mega_main_menu' . $location_class . ' .multicolumn_dropdown > .mega_dropdown > li.default_dropdown .mega_dropdown > li > .item_link,
#mega_main_menu' . $location_class . ' ul .nav_search_box #mega_main_menu_searchform,
#mega_main_menu' . $location_class . ' .tabs_dropdown .mega_dropdown > li > .item_link,
#mega_main_menu' . $location_class . ' .tabs_dropdown .mega_dropdown > li > .mega_dropdown > li > .item_link,
#mega_main_menu' . $location_class . ' .widgets_dropdown > .mega_dropdown > li > .item_link,
#mega_main_menu' . $location_class . ' .multicolumn_dropdown > .mega_dropdown > li > .item_link,
#mega_main_menu' . $location_class . ' .grid_dropdown > .mega_dropdown > li > .item_link,
#mega_main_menu' . $location_class . ' .grid_dropdown > .mega_dropdown > li .processed_image,
#mega_main_menu' . $location_class . ' .post_type_dropdown > .mega_dropdown > li .item_link,
#mega_main_menu' . $location_class . ' .post_type_dropdown > .mega_dropdown > li .processed_image
{
border-radius: ' . ( $current_class->get_option( $location_name . '_corners_rounding', 1 ) / 2 ) . 'px;
}
';
$additional_styles_presets = $current_class->get_option( 'additional_styles_presets' );
if ( isset( $additional_styles_presets ) && is_array( $additional_styles_presets ) && count( $additional_styles_presets ) > 0 ) {
$out .= '/* additional_styles */ ';
foreach ( $current_class->get_option( 'additional_styles_presets' ) as $key => $value ) {
$out .= '
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul li.additional_style_' . $key . ' > .item_link
{
' . mm_common::css_gradient( $value['bg_gradient'] ) . '
color: ' . $value['text_color'] . ';
}
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul li.additional_style_' . $key . ' > .item_link > i
{
color: ' . $value['text_color'] . ';
font-size: ' . $value[ 'icon' ]['font_size'] . 'px;
}
#mega_main_menu' . $location_class . ' ul li .mega_dropdown li.additional_style_' . $key . ' > .item_link > i
{
width: ' . $value[ 'icon' ]['font_size'] . 'px;
height: ' . $value[ 'icon' ]['font_size'] . 'px;
line-height: ' . $value[ 'icon' ]['font_size'] . 'px;
font-size: ' . $value[ 'icon' ]['font_size'] . 'px;
margin-top: -' . ( $value[ 'icon' ]['font_size'] / 2 ) . 'px;
}
#mega_main_menu' . $location_class . ' ul li .mega_dropdown > li.additional_style_' . $key . ' > .item_link.with_icon > span
{
margin-left: ' . ( $value[ 'icon' ]['font_size'] + 8 ) . 'px;
}
#mega_main_menu' . $location_class . '.language_direction-rtl ul li .mega_dropdown > li.additional_style_' . $key . ' > .item_link.with_icon > span
{
margin-right: ' . ( $value[ 'icon' ]['font_size'] + 8 ) . 'px;
}
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul li.additional_style_' . $key . ' > .item_link *,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul li.additional_style_' . $key . ' > .item_link .link_content
{
color: ' . $value['text_color'] . ';
' . mm_common::css_font( $value[ 'font' ] ) . '
}
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li.current-menu-ancestor.additional_style_' . $key . ' > .item_link,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li.current-page-ancestor.additional_style_' . $key . ' > .item_link,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul > li.current-post-ancestor.additional_style_' . $key . ' > .item_link,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul li.current-menu-item.additional_style_' . $key . ' > .item_link,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul li.additional_style_' . $key . ':hover > .item_link,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul li.additional_style_' . $key . ' > .item_link:hover,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul li.additional_style_' . $key . ' > .item_link:focus
{
' . mm_common::css_gradient( $value['bg_gradient_hover'] ) . '
color: ' . $value['text_color_hover'] . ';
}
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul li.current-menu-ancestor.additional_style_' . $key . ' > .item_link > *,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul li.current-page-ancestor.additional_style_' . $key . ' > .item_link > *,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul li.current-post-ancestor.additional_style_' . $key . ' > .item_link > *,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul li.additional_style_' . $key . ' > .item_link:focus > *,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul li.additional_style_' . $key . ':hover > .item_link > i,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul li.additional_style_' . $key . ':hover > .item_link *,
#mega_main_menu' . $location_class . ' > .menu_holder > .menu_inner > ul li.additional_style_' . $key . ':hover > .item_link .link_content
{
color: ' . $value['text_color_hover'] . ';
}
';
}
}
} //foreach ( $mega_menu_locations as $key => $location_name ) {
/* set_of_custom_icons */
$set_of_custom_icons = $current_class->get_option( 'set_of_custom_icons' );
if ( is_array( $set_of_custom_icons ) && count( $set_of_custom_icons ) > 0 ) {
$out .= '/* set_of_custom_icons */ ';
foreach ( $set_of_custom_icons as $value ) {
$icon_name = str_replace( array( '/', strrchr( $value[ 'custom_icon' ], '.' ) ), '', strrchr( $value[ 'custom_icon' ], '/' ) );
$out .= '
i.ci-icon-' . $icon_name . ':before
{
background-image: url(' . $value[ 'custom_icon' ] . ');
}
';
if ( isset( $value[ 'custom_icon_hover' ] ) && $value[ 'custom_icon_hover' ] != '' ) {
$out .= '
#mega_main_menu li.current-menu-ancestor > .item_link > i.ci-icon-' . $icon_name . ':before,
#mega_main_menu li.current-page-ancestor > .item_link > i.ci-icon-' . $icon_name . ':before,
#mega_main_menu li.current-post-ancestor > .item_link > i.ci-icon-' . $icon_name . ':before,
#mega_main_menu li.current-menu-item > .item_link > i.ci-icon-' . $icon_name . ':before,
#mega_main_menu li:hover > .item_link > i.ci-icon-' . $icon_name . ':before,
i.ci-icon-' . $icon_name . ':hover:before
{
background-image: url(' . $value[ 'custom_icon_hover' ] . ');
}
';
}
}
}
/* skin extend */
if ( has_filter( 'mmm_skin_extend' ) ) {
$out .= '/* skin extend */' . apply_filters( 'mmm_skin_extend', $skin_extend = '' );
}
/* custom css */
$custom_css = $current_class->get_option( 'custom_css' );
$out .= ( isset( $custom_css ) && !empty( $custom_css ) )
? '/* custom css */ ' . $custom_css
: '';
$out .= ' /*' . date("Y-m-d H:i") . '*/';
/* RETURN */
return $out;
}
}
?> | gpl-2.0 |
ajyoon/MuseScore | mscore/inspector/inspectorGlissando.cpp | 1453 | //=============================================================================
// MuseScore
// Music Composition & Notation
// $Id:$
//
// Copyright (C) 2013 Werner Schweer
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2
// as published by the Free Software Foundation and appearing in
// the file LICENSE.GPL
//=============================================================================
#include "inspectorGlissando.h"
#include "musescore.h"
#include "libmscore/glissando.h"
#include "libmscore/score.h"
namespace Ms {
//---------------------------------------------------------
// InspectorGlissando
//---------------------------------------------------------
InspectorGlissando::InspectorGlissando(QWidget* parent)
: InspectorElementBase(parent)
{
g.setupUi(addWidget());
const std::vector<InspectorItem> iiList = {
{ P_ID::GLISS_TYPE, 0, false, g.type, g.resetType },
{ P_ID::GLISS_TEXT, 0, false, g.text, g.resetText },
{ P_ID::GLISS_SHOW_TEXT, 0, false, g.showText, g.resetShowText },
{ P_ID::GLISSANDO_STYLE, 0, false, g.glissandoStyle, g.resetGlissandoStyle },
{ P_ID::PLAY, 0, 0, g.playGlissando, g.resetPlayGlissando }
};
mapSignals(iiList);
}
}
| gpl-2.0 |
bradallred/gemrb | gemrb/GUIScripts/iwd2/CGPortrait.py | 6524 | # GemRB - Infinity Engine Emulator
# Copyright (C) 2003 The GemRB Project
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
#
#character generation, appearance (GUICG12)
import GemRB
import CharOverview
from GUIDefines import *
AppearanceWindow = 0
PortraitButton = 0
PortraitsTable = 0
LastPortrait = 0
Gender = 0
def SetPicture ():
global PortraitsTable, LastPortrait
PortraitName = PortraitsTable.GetRowName (LastPortrait)+"L"
PortraitButton.SetPicture (PortraitName)
return
def OnLoad ():
global AppearanceWindow, PortraitButton, PortraitsTable, LastPortrait
global Gender
Gender=GemRB.GetVar ("Gender")
AppearanceWindow = GemRB.LoadWindow (11, "GUICG")
CharOverview.PositionCharGenWin(AppearanceWindow)
#Load the Portraits Table
PortraitsTable = GemRB.LoadTable ("PICTURES")
PortraitsStart = PortraitsTable.FindValue (0, 2)
FemaleCount = PortraitsTable.GetRowCount () - PortraitsStart + 1
if Gender == 2:
LastPortrait = GemRB.Roll (1, FemaleCount, PortraitsStart-1)
else:
LastPortrait = GemRB.Roll (1, PortraitsTable.GetRowCount()-FemaleCount, 0)
PortraitButton = AppearanceWindow.GetControl (1)
PortraitButton.SetFlags (IE_GUI_BUTTON_PICTURE|IE_GUI_BUTTON_NO_IMAGE,OP_SET)
PortraitButton.SetState (IE_GUI_BUTTON_LOCKED)
LeftButton = AppearanceWindow.GetControl (2)
RightButton = AppearanceWindow.GetControl (3)
BackButton = AppearanceWindow.GetControl (5)
BackButton.SetText (15416)
BackButton.MakeEscape()
CustomButton = AppearanceWindow.GetControl (6)
CustomButton.SetText (17545)
DoneButton = AppearanceWindow.GetControl (0)
DoneButton.SetText (36789)
DoneButton.MakeDefault()
RightButton.SetEvent (IE_GUI_BUTTON_ON_PRESS, RightPress)
LeftButton.SetEvent (IE_GUI_BUTTON_ON_PRESS, LeftPress)
BackButton.SetEvent (IE_GUI_BUTTON_ON_PRESS, BackPress)
CustomButton.SetEvent (IE_GUI_BUTTON_ON_PRESS, CustomPress)
DoneButton.SetEvent (IE_GUI_BUTTON_ON_PRESS, NextPress)
while True:
if PortraitsTable.GetValue (LastPortrait, 0) == Gender:
SetPicture ()
break
LastPortrait = LastPortrait + 1
AppearanceWindow.Focus()
return
def RightPress ():
global LastPortrait
while True:
LastPortrait = LastPortrait + 1
if LastPortrait >= PortraitsTable.GetRowCount ():
LastPortrait = 0
if PortraitsTable.GetValue (LastPortrait, 0) == Gender:
SetPicture ()
return
def LeftPress ():
global LastPortrait
while True:
LastPortrait = LastPortrait - 1
if LastPortrait < 0:
LastPortrait = PortraitsTable.GetRowCount ()-1
if PortraitsTable.GetValue (LastPortrait, 0) == Gender:
SetPicture ()
return
def BackPress ():
if AppearanceWindow:
AppearanceWindow.Unload ()
GemRB.SetNextScript ("CharGen")
GemRB.SetVar ("Gender",0) #scrapping the gender value
return
def CustomDone ():
Window = CustomWindow
Portrait = PortraitList1.QueryText ()
GemRB.SetToken ("LargePortrait", Portrait)
Portrait = PortraitList2.QueryText ()
GemRB.SetToken ("SmallPortrait", Portrait)
if Window:
Window.Unload ()
if AppearanceWindow:
AppearanceWindow.Unload ()
GemRB.SetNextScript ("CharGen2")
return
def CustomAbort ():
if CustomWindow:
CustomWindow.Unload ()
return
def LargeCustomPortrait ():
Window = CustomWindow
Portrait = PortraitList1.QueryText ()
#small hack
if GemRB.GetVar ("Row1") == RowCount1:
return
Label = Window.GetControl (0x10000007)
Label.SetText (Portrait)
Button = Window.GetControl (6)
if Portrait=="":
Portrait = "NOPORTMD"
Button.SetState (IE_GUI_BUTTON_DISABLED)
else:
if PortraitList2.QueryText ()!="":
Button.SetState (IE_GUI_BUTTON_ENABLED)
Button = Window.GetControl (0)
Button.SetPicture (Portrait, "NOPORTMD")
return
def SmallCustomPortrait ():
Window = CustomWindow
Portrait = PortraitList2.QueryText ()
#small hack
if GemRB.GetVar ("Row2") == RowCount2:
return
Label = Window.GetControl (0x10000008)
Label.SetText (Portrait)
Button = Window.GetControl (6)
if Portrait=="":
Portrait = "NOPORTSM"
Button.SetState (IE_GUI_BUTTON_DISABLED)
else:
if PortraitList1.QueryText ()!="":
Button.SetState (IE_GUI_BUTTON_ENABLED)
Button = Window.GetControl (1)
Button.SetPicture (Portrait, "NOPORTSM")
return
def CustomPress ():
global PortraitList1, PortraitList2
global RowCount1, RowCount2
global CustomWindow
CustomWindow = Window = GemRB.LoadWindow (18)
PortraitList1 = Window.GetControl (2)
RowCount1 = len(PortraitList1.ListResources (CHR_PORTRAITS, 2))
PortraitList1.SetEvent (IE_GUI_TEXTAREA_ON_SELECT, LargeCustomPortrait)
PortraitList1.SetVarAssoc ("Row1",RowCount1)
PortraitList2 = Window.GetControl (4)
RowCount2 = len(PortraitList2.ListResources (CHR_PORTRAITS, 0))
PortraitList2.SetEvent (IE_GUI_TEXTAREA_ON_SELECT, SmallCustomPortrait)
PortraitList2.SetVarAssoc ("Row2",RowCount2)
Button = Window.GetControl (6)
Button.SetText (11973)
Button.MakeDefault()
Button.SetEvent (IE_GUI_BUTTON_ON_PRESS, CustomDone)
Button.SetState (IE_GUI_BUTTON_DISABLED)
Button = Window.GetControl (7)
Button.SetText (15416)
Button.MakeEscape()
Button.SetEvent (IE_GUI_BUTTON_ON_PRESS, CustomAbort)
Button = Window.GetControl (0)
PortraitName = PortraitsTable.GetRowName (LastPortrait)+"L"
Button.SetPicture (PortraitName, "NOPORTMD")
Button.SetState (IE_GUI_BUTTON_LOCKED)
Button = Window.GetControl (1)
PortraitName = PortraitsTable.GetRowName (LastPortrait)+"S"
Button.SetPicture (PortraitName, "NOPORTSM")
Button.SetState (IE_GUI_BUTTON_LOCKED)
Window.ShowModal (MODAL_SHADOW_NONE)
return
def NextPress ():
if AppearanceWindow:
AppearanceWindow.Unload ()
PortraitTable = GemRB.LoadTable ("pictures")
PortraitName = PortraitTable.GetRowName (LastPortrait )
GemRB.SetToken ("SmallPortrait", PortraitName+"S")
GemRB.SetToken ("LargePortrait", PortraitName+"L")
GemRB.SetVar ("PortraitIndex", LastPortrait)
GemRB.SetNextScript ("CharGen2") #Before race
return
| gpl-2.0 |
aelintra/sail | sail-4.0.1/opt/sark/php/sarkldap/delete.php | 377 | <?php
require_once "../srkLDAPHelperClass";
$ldap = new ldaphelper;
if (!$ldap->Connect()) {
echo "LDAP ERROR - " . ldap_error($ldap->ds);
}
$dn = "cn=" . $_REQUEST['id'] . "," . $ldap->addressbook . "," . $ldap->base;
if (ldap_delete($ldap->ds,$dn)) {
echo "ok";
}
else {
echo "LDAP ERROR - " . ldap_error($ldap->ds);
}
$ldap->Close();
?>
| gpl-2.0 |
dustints/katello | test/models/distributor_test.rb | 1239 | #
# Copyright 2014 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public
# License as published by the Free Software Foundation; either version
# 2 of the License (GPLv2) or (at your option) any later version.
# There is NO WARRANTY for this software, express or implied,
# including the implied warranties of MERCHANTABILITY,
# NON-INFRINGEMENT, or FITNESS FOR A PARTICULAR PURPOSE. You should
# have received a copy of GPLv2 along with this software; if not, see
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
require 'katello_test_helper'
module Katello
class DistributorTest < ActiveSupport::TestCase
def self.before_suite
models = ["Organization", "KTEnvironment", "User", "Distributor"]
services = ["Candlepin", "Pulp", "ElasticSearch"]
disable_glue_layers(services, models, true)
end
def self.after_suite
Distributor.delete_all
end
def setup
@distributor = Distributor.find(katello_distributors(:acme_distributor))
end
def test_create
new_distributor = @distributor.dup
refute new_distributor.save
new_distributor.name = "ACME Distributor2"
assert new_distributor.valid?
end
def test_update
assert @distributor.save!
end
end
end
| gpl-2.0 |
f4bio/drftpd3-extended | src/plugins/org.drftpd.vfs.perms.def/src/org/drftpd/vfs/perms/def/VFSDefaultPermission.java | 1423 | /*
* This file is part of DrFTPD, Distributed FTP Daemon.
*
* DrFTPD is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrFTPD is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrFTPD; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.drftpd.vfs.perms.def;
import java.util.StringTokenizer;
import org.apache.oro.text.regex.MalformedPatternException;
import org.drftpd.permissions.GlobPathPermission;
import org.drftpd.permissions.Permission;
import org.drftpd.vfs.perms.VFSPermHandler;
/**
* Default handler. Uses Glob patterns.
* @author fr0w
* @version $Id: VFSDefaultPermission.java 1925 2009-06-15 21:46:05Z tdsoul $
*/
public class VFSDefaultPermission extends VFSPermHandler {
public void handle(String directive, StringTokenizer st) throws MalformedPatternException {
addPermission(directive, new GlobPathPermission(st.nextToken(), Permission.makeUsers(st)));
}
}
| gpl-2.0 |
bluebluekaka/oas | oas/src/com/oas/objects/BaseOrder.java | 528 | package com.oas.objects;
public class BaseOrder {
private String orderCode;
private String creater;
private String operator;
public String getOrderCode() {
return orderCode;
}
public void setOrderCode(String orderCode) {
this.orderCode = orderCode;
}
public String getCreater() {
return creater;
}
public void setCreater(String creater) {
this.creater = creater;
}
public String getOperator() {
return operator;
}
public void setOperator(String operator) {
this.operator = operator;
}
}
| gpl-2.0 |
sum2012/mame | src/mame/drivers/macrossp.cpp | 31456 | // license:BSD-3-Clause
// copyright-holders:David Haywood
/*** DRIVER INFO **************************************************************
Macross Plus (c)1996 Banpresto
Quiz Bisyoujo Senshi Sailor Moon (c)1997 Banpresto
Driver by David Haywood
TODO:
- what is the 'bios' rom for? it appears to be data tables and is very different between games but we don't map it anywhere
- convert tilemaps to devices?
68020 interrupts
lev 1 : 0x64 : 0000 084c - unknown..
lev 2 : 0x68 : 0000 0882 - unknown..
lev 3 : 0x6c : 0000 08b0 - vblank?
lev 4 : 0x70 : 001f 002a - x
lev 5 : 0x74 : 001f 002a - x
lev 6 : 0x78 : 001f 002a - x
lev 7 : 0x7c : 001f 002a - x
**** README INFO **************************************************************
--- ROMSET: macrossp ---
Macross Plus
Banpresto Co., Ltd., 1996
PCB: BP964
CPU: MC68EC020FG25
SND: TMP68HC000N-16, OTTOR2 ES5506000102
OSC: 50.000MHz, 32.000MHz, 27.000MHz
RAM: TC55257CFL-85 x 8 (28 PIN TSOP), MCM62068AEJ25 x 12 (28 PIN SSOP), TC55328AJ-15 x 6 (28 PIN SSOP)
GFX: IKM-AA004 (208 PIN PQFP)
IKM-AA0062 (208 PIN PQFP)
IKM-AA005 x 2 (208 PIN PQFP)
DIPS: 2x 8-Position
DIPSW-1
------------------------------------------------------------------
DipSwitch Title | Function | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
------------------------------------------------------------------
| 1cn/1pl |off|off|off|off| |*
| 1cn/2pl |on |off|off|off| |
| 1cn/3pl |off|on |off|off| |
| 1cn/4pl |on |on |off|off| |
| 1cn/5pl |off|off|on |off| |
| 1cn/6pl |on |off|on |off| |
Coin Chute A | 1cn/7pl |off|on |on |off| |
| 2cn/1pl |on |on |on |off| |
| 2cn/3pl |off|off|off|on | |
| 2cn/5pl |on |off|off|on | |
| 3cn/1pl |off|on |off|on | |
| 3cn/2pl |on |on |off|on | |
| 3cn/4pl |off|off|on |on | |
| 4cn/1pl |on |off|on |on | |
| 4cn/3pl |off|on |on |on | |
| Free |on |on |on |on | |
------------------------------------------------------------------
| 1cn/1pl | |off|off|off|off|*
| 1cn/2pl | |on |off|off|off|
| 1cn/3pl | |off|on |off|off|
| 1cn/4pl | |on |on |off|off|
| 1cn/5pl | |off|off|on |off|
| 1cn/6pl | |on |off|on |off|
Coin Chute B | 1cn/7pl | |off|on |on |off|
| 2cn/1pl | |on |on |on |off|
| 2cn/3pl | |off|off|off|on |
| 2cn/5pl | |on |off|off|on |
| 3cn/1pl | |off|on |off|on |
| 3cn/2pl | |on |on |off|on |
| 3cn/4pl | |off|off|on |on |
| 4cn/1pl | |on |off|on |on |
| 4cn/3pl | |off|on |on |on |
| 5cn/3pl | |on |on |on |on |
------------------------------------------------------------------
DIPSW-2
------------------------------------------------------------------
DipSwitch Title | Function | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
------------------------------------------------------------------
| Normal |off|off| |*
Difficulty | Easy |on |off| |
Level | Hard |off|on | |
| V.Hard |on |on | |
------------------------------------------------------------------
| 3 | |off|off| |*
Players Count | 4 | |on |off| |
| 5 | |off|on | |
| 2 | |on |on | |
------------------------------------------------------------------
Demo Sound | Play | |off| |*
| Mute | |on | |
------------------------------------------------------------------
Screen Flip | Off | |off| |*
| On | |on | |
------------------------------------------------------------------
Title Screen Language | Japanese | |off| |*#
| English | |on | |
------------------------------------------------------------------
Test / Game Mode | Game | |off|*
| Test | |on |
------------------------------------------------------------------
* Denotes Factory Defualts
# English title page doesn't display the Japanese translation of the word "Macross"
ROMs: (Filename = ROM label, extension also on ROM label)
TOP ROM PCB
-----------
BP964A-C.U1 \
BP964A-C.U2 |
BP964A-C.U3 |
BP964A-C.U4 > 27C040
BP964A.U19 |
BP964A.U20 |
BP964A.U21 /
BP964A.U9 \
BP964A.U10 |
BP964A.U11 |
BP964A.U12 |
BP964A.U13 |
BP964A.U14 > 32M (44 pin SOP - surface mounted)
BP964A.U15 |
BP964A.U16 |
BP964A.U17 |
BP964A.U18 |
BP964A.U24 /
ROMs: (Filename = ROM Label)
MOTHERBOARD PCB
---------------
BP964A.U49 27C010
--- ROMSET: quizmoon ---
Quiz Bisyoujo Senshi Sailor Moon - Chiryoku Tairyoku Toki no Un -
(c)1997 Banpresto / Gazelle
BP965A
-----------
Motherboard
-----------
CPU : MC68EC020FG25
Sound: TMP68HC000N-16, ENSONIQ OTTO R2 (ES5506)
OSC : 50.000MHz (X1), 32.000MHz (X2), 27.000MHz (X3)
ROMs:
u49.bin - (ST 27c1001)
GALs (16V8B, not dumped):
u009.bin
u200.bin
Custom chips:
IKM-AA004 1633JF8433 JAPAN 9523YAA (U62, 208pin QFP)
IKM-AA005 1670F1541 JAPAN 9525EAI (U47&48, 208pin QFP)
IKM-AA006 1633JF8432 JAPAN 9525YAA (U31, 208pin QFP)
--------------
Mask ROM board
--------------
u5.bin - Main programs (TI 27c040)
u6.bin |
u7.bin |
u8.bin |
u1.bin | (ST 27c1001)
u2.bin |
u3.bin |
u4.bin /
u09.bin - Graphics (uPD23C32000GX)
u10.bin |
u11.bin |
u12.bin |
u13.bin |
u15.bin |
u17.bin / (uPD23C16000GX)
u20.bin - Sound programs (ST 27c1001)
u21.bin /
u24.bin - Samples (uPD23C32000GX)
u25.bin |
u26.bin |
u27.bin /
----------
PCB Layout
----------
MOTHERBOARD
|---------------------------------------------------------------|
|TA8205AH GAL16V8B(3) |----------------|BP964A_U49 |
| VOL |----------------||-------| TC55328 |
| TL074 ES5506 |AA005 | TC55328 |
| D6376 | | TC55328 |
| TC55257 |-------------| | | TC55328 |
| TC55257 | 68000 | |-------| |
| GAL16V8B(2) | | |
| 50MHz TC55257 |-------------| |-------| |
| TC55257 |AA005 | |-| |
| | | | | |
| TC55257 | | | | |
| |-------|TC55257 |-------| | | |
| |68EC020| | | |
| | | GAL16V8B(1) |-------| | | |
| |-------| |AA0062 | | | |
| MCM6206 MCM6206 | | | | |
| MCM6206 MCM6206 | | | | |
| |-------| |-| |
| MCM6206 MCM6206 |
| |-------| TC55328 |
| MCM6206 MCM6206 |AA004 | TC55328 |
| MCM6206 MCM6206 | | |
| MCM6206 MCM6206 | | 32MHz |
|DSW1(8) |----------------||-------| 27MHz |
|DSW2(8) |----------------| TC55257 TC55257 |
|---------------------------------------------------------------|
Notes:
68020 clock 25.000MHz [50/2] (QFP100)
68000 clock 16.000MHz [32/2] (SDIP64)
ES5506 clock 16.000MHz [32/2] (PLCC68)
VSync 60Hz
HSync 15.83kHz
TC55257 - Toshiba TC55257CFL-85 32k x8 SRAM (SOJ28)
TC55328 - Toshiba TC55328AJ-15 32k x8 SRAM (SOP28)
MCM6206 - Motorola MCM6206BAEJ25 32k x8 SRAM (SOJ28)
GAL16V8B(1) - stamped 'U008' (DIP20)
GAL16V8B(2) - stamped 'U200' (DIP20)
GAL16V8B(3) - stamped 'U009' (DIP20)
D6376 - NEC uPD6376 Audio 2-Channel 16-Bit D/A Converter (SOIC16)
Custom ICs -
IKM-AA004 1633JF8433 (QFP208)
IKM-AA0062 1633CF8461 (QFP208)
IKM-AA005 1670F1541 (x2, QFP208)
ROM Board
---------
MASK ROM BOARD
|----------------------------------------|
| |----------------| |
| |----------------| |
| U19 |
| *U27 *U26 |
| |
| |
| *U25 U24 *U23 *U22 |
| |
| |-| |
| U18 U17 U21 U20 | | |
| | | |
| | | |
| | | |
| U16 U15 U14 U13 | | |
| | | |
| | | |
| U9 U10 U11 U12 | | |
| |-| |
| |
| *U5 *U6 *U7 *U8 |
| |
| U1 U2 U3 U4 |
| |
| |----------------| |
| |----------------| |
|----------------------------------------|
Notes:
* - These locations not populated
ROMs at locations U1, U2, U3, U4, U19, U20 & U21 are 27C040 EPROMs
All other ROMs are surface mounted 32MBit SOP44 MaskROMs
******************************************************************************/
#include "emu.h"
#include "cpu/m68000/m68000.h"
#include "sound/es5506.h"
#include "includes/macrossp.h"
/*** VARIOUS READ / WRITE HANDLERS *******************************************/
READ32_MEMBER(macrossp_state::macrossp_soundstatus_r)
{
// logerror("%08x read soundstatus\n", space.device().safe_pc());
/* bit 1 is sound status */
/* bit 0 unknown - it is expected to toggle, vblank? */
m_snd_toggle ^= 1;
return (m_sndpending << 1) | m_snd_toggle;
}
WRITE32_MEMBER(macrossp_state::macrossp_soundcmd_w)
{
if (ACCESSING_BITS_16_31)
{
//logerror("%08x write soundcmd %08x (%08x)\n",space.device().safe_pc(),data,mem_mask);
soundlatch_word_w(space, 0, data >> 16, 0xffff);
m_sndpending = 1;
m_audiocpu->set_input_line(2, HOLD_LINE);
/* spin for a while to let the sound CPU read the command */
space.device().execute().spin_until_time(attotime::from_usec(50));
}
}
READ16_MEMBER(macrossp_state::macrossp_soundcmd_r)
{
// logerror("%06x read soundcmd\n",space.device().safe_pc());
m_sndpending = 0;
return soundlatch_word_r(space, offset, mem_mask);
}
WRITE16_MEMBER(macrossp_state::palette_fade_w)
{
// 0xff is written a few times on startup
if (data >> 8 != 0xff)
{
// range seems to be 40 (brightest) to 252 (darkest)
UINT8 fade = ((data >> 8) - 40) / 212.0 * 255.0;
m_screen->set_brightness(0xff - fade);
}
}
/*** MEMORY MAPS *************************************************************/
static ADDRESS_MAP_START( macrossp_map, AS_PROGRAM, 32, macrossp_state )
AM_RANGE(0x000000, 0x3fffff) AM_ROM
AM_RANGE(0x800000, 0x802fff) AM_RAM AM_SHARE("spriteram")
/* SCR A Layer */
AM_RANGE(0x900000, 0x903fff) AM_RAM_WRITE(macrossp_scra_videoram_w) AM_SHARE("scra_videoram")
AM_RANGE(0x904200, 0x9043ff) AM_RAM AM_SHARE("scra_linezoom") /* W/O? */
AM_RANGE(0x905000, 0x90500b) AM_RAM AM_SHARE("scra_videoregs") /* W/O? */
/* SCR B Layer */
AM_RANGE(0x908000, 0x90bfff) AM_RAM_WRITE(macrossp_scrb_videoram_w) AM_SHARE("scrb_videoram")
AM_RANGE(0x90c200, 0x90c3ff) AM_RAM AM_SHARE("scrb_linezoom") /* W/O? */
AM_RANGE(0x90d000, 0x90d00b) AM_RAM AM_SHARE("scrb_videoregs") /* W/O? */
/* SCR C Layer */
AM_RANGE(0x910000, 0x913fff) AM_RAM_WRITE(macrossp_scrc_videoram_w) AM_SHARE("scrc_videoram")
AM_RANGE(0x914200, 0x9143ff) AM_RAM AM_SHARE("scrc_linezoom")/* W/O? */
AM_RANGE(0x915000, 0x91500b) AM_RAM AM_SHARE("scrc_videoregs") /* W/O? */
/* Text Layer */
AM_RANGE(0x918000, 0x91bfff) AM_RAM_WRITE(macrossp_text_videoram_w) AM_SHARE("text_videoram")
AM_RANGE(0x91c200, 0x91c3ff) AM_RAM AM_SHARE("text_linezoom") /* W/O? */
AM_RANGE(0x91d000, 0x91d00b) AM_RAM AM_SHARE("text_videoregs") /* W/O? */
AM_RANGE(0xa00000, 0xa03fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
AM_RANGE(0xb00000, 0xb00003) AM_READ_PORT("INPUTS")
AM_RANGE(0xb00004, 0xb00007) AM_READ(macrossp_soundstatus_r) AM_WRITENOP // irq related?
AM_RANGE(0xb00008, 0xb0000b) AM_WRITENOP // irq related?
AM_RANGE(0xb0000c, 0xb0000f) AM_READ_PORT("DSW") AM_WRITENOP
AM_RANGE(0xb00010, 0xb00013) AM_WRITE16(palette_fade_w, 0x0000ffff)
AM_RANGE(0xb00020, 0xb00023) AM_WRITENOP
AM_RANGE(0xc00000, 0xc00003) AM_WRITE(macrossp_soundcmd_w)
AM_RANGE(0xf00000, 0xf1ffff) AM_RAM AM_SHARE("mainram") /* Main Ram */
// AM_RANGE(0xfe0000, 0xfe0003) AM_NOP
ADDRESS_MAP_END
static ADDRESS_MAP_START( macrossp_sound_map, AS_PROGRAM, 16, macrossp_state )
AM_RANGE(0x000000, 0x0fffff) AM_ROM
AM_RANGE(0x200000, 0x207fff) AM_RAM
AM_RANGE(0x400000, 0x40007f) AM_DEVREADWRITE8("ensoniq", es5506_device, read, write, 0x00ff)
AM_RANGE(0x600000, 0x600001) AM_READ(macrossp_soundcmd_r)
ADDRESS_MAP_END
/*** INPUT PORTS *************************************************************/
static INPUT_PORTS_START( macrossp )
PORT_START("INPUTS")
PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_UNUSED ) /* Unknown use */
PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x0000ffc0, IP_ACTIVE_LOW, IPT_UNUSED ) /* Unknown use */
PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x00200000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
PORT_BIT( 0x00800000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x10000000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x20000000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
PORT_START("DSW")
PORT_BIT( 0x0000ffff, IP_ACTIVE_LOW, IPT_UNUSED ) /* Unknown use, but not dipswitches */
PORT_DIPNAME( 0x000f0000, 0x000f0000, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4")
PORT_DIPSETTING( 0x00020000, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x00050000, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x00080000, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00040000, DEF_STR( 3C_2C ) )
PORT_DIPSETTING( 0x00010000, DEF_STR( 4C_3C ) )
PORT_DIPSETTING( 0x000f0000, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x00030000, DEF_STR( 3C_4C ) )
PORT_DIPSETTING( 0x00070000, DEF_STR( 2C_3C ) )
PORT_DIPSETTING( 0x000e0000, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x00060000, DEF_STR( 2C_5C ) )
PORT_DIPSETTING( 0x000d0000, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x000c0000, DEF_STR( 1C_4C ) )
PORT_DIPSETTING( 0x000b0000, DEF_STR( 1C_5C ) )
PORT_DIPSETTING( 0x000a0000, DEF_STR( 1C_6C ) )
PORT_DIPSETTING( 0x00090000, "1 Coins/7 Credits" )
PORT_DIPSETTING( 0x00000000, DEF_STR( Free_Play) )
PORT_DIPNAME( 0x00f00000, 0x00f00000, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8")
PORT_DIPSETTING( 0x00200000, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x00500000, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x00800000, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00000000, DEF_STR( 5C_3C ) )
PORT_DIPSETTING( 0x00400000, DEF_STR( 3C_2C ) )
PORT_DIPSETTING( 0x00100000, DEF_STR( 4C_3C ) )
PORT_DIPSETTING( 0x00f00000, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x00300000, DEF_STR( 3C_4C ) )
PORT_DIPSETTING( 0x00700000, DEF_STR( 2C_3C ) )
PORT_DIPSETTING( 0x00e00000, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x00600000, DEF_STR( 2C_5C ) )
PORT_DIPSETTING( 0x00d00000, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x00c00000, DEF_STR( 1C_4C ) )
PORT_DIPSETTING( 0x00b00000, DEF_STR( 1C_5C ) )
PORT_DIPSETTING( 0x00a00000, DEF_STR( 1C_6C ) )
PORT_DIPSETTING( 0x00900000, "1 Coins/7 Credits" )
PORT_DIPNAME( 0x03000000, 0x03000000, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2")
PORT_DIPSETTING( 0x02000000, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x03000000, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x01000000, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00000000, DEF_STR( Hardest ) )
PORT_DIPNAME( 0x0c000000, 0x0c000000, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:3,4")
PORT_DIPSETTING( 0x00000000, "2" )
PORT_DIPSETTING( 0x0c000000, "3" )
PORT_DIPSETTING( 0x08000000, "4" )
PORT_DIPSETTING( 0x04000000, "5" )
PORT_DIPNAME( 0x10000000, 0x10000000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:5")
PORT_DIPSETTING( 0x00000000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x10000000, DEF_STR( On ) )
PORT_DIPNAME( 0x20000000, 0x20000000, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:6") /* See above for dips listing.... also in Quiz game's test screens */
PORT_DIPSETTING( 0x20000000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
PORT_DIPNAME( 0x40000000, 0x00000000, DEF_STR( Language ) ) PORT_DIPLOCATION("SW2:7") /* See title page for difference :-) The Manual shows this as UNUSED */
PORT_DIPSETTING( 0x40000000, DEF_STR( Japanese ) )
PORT_DIPSETTING( 0x00000000, DEF_STR( English ) )
PORT_SERVICE_DIPLOC( 0x80000000, IP_ACTIVE_LOW, "SW2:8" )
INPUT_PORTS_END
static INPUT_PORTS_START( quizmoon )
PORT_INCLUDE(macrossp)
PORT_MODIFY("INPUTS")
PORT_DIPNAME( 0x00000010, 0x00000010, DEF_STR( Test ) )
PORT_DIPSETTING( 0x00000010, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
PORT_DIPNAME( 0x00000040, 0x00000040, DEF_STR( Tilt ) )
PORT_DIPSETTING( 0x00000040, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
PORT_MODIFY("DSW")
PORT_DIPUNUSED_DIPLOC( 0x40000000, 0x40000000, "SW2:7" ) /* no Language dipswitch for this game */
INPUT_PORTS_END
/*** GFX DECODE **************************************************************/
static const gfx_layout macrossp_char16x16x4layout =
{
16,16,
RGN_FRAC(1,1),
4,
{ 0,1,2,3 },
{ 0, 4, 8, 12, 16, 20, 24, 28, 32+0,32+4,32+8,32+12,32+16,32+20,32+24,32+28 },
{ 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64,
8*64, 9*64, 10*64,11*64,12*64,13*64,14*64,15*64},
16*64
};
static const gfx_layout macrossp_char16x16x8layout =
{
16,16,
RGN_FRAC(1,1),
8,
{ 0,1,2,3,4,5,6,7 },
{ 0, 8, 16, 24, 32, 40, 48, 56, 64+0,64+8,64+16,64+24,64+32,64+40,64+48,64+56 },
{ 0*128, 1*128, 2*128, 3*128, 4*128, 5*128, 6*128, 7*128,
8*128, 9*128, 10*128,11*128,12*128,13*128,14*128,15*128},
16*128
};
static GFXDECODE_START( macrossp )
GFXDECODE_ENTRY( "gfx1", 0, macrossp_char16x16x8layout, 0x000, 0x20 ) /* 8bpp but 6bpp granularity */
GFXDECODE_ENTRY( "gfx2", 0, macrossp_char16x16x8layout, 0x800, 0x20 ) /* 8bpp but 6bpp granularity */
GFXDECODE_ENTRY( "gfx3", 0, macrossp_char16x16x8layout, 0x800, 0x20 ) /* 8bpp but 6bpp granularity */
GFXDECODE_ENTRY( "gfx4", 0, macrossp_char16x16x8layout, 0x800, 0x20 ) /* 8bpp but 6bpp granularity */
GFXDECODE_ENTRY( "gfx5", 0, macrossp_char16x16x4layout, 0x800, 0x80 )
GFXDECODE_END
/*** MACHINE DRIVER **********************************************************/
WRITE_LINE_MEMBER(macrossp_state::irqhandler)
{
logerror("ES5506 irq %d\n", state);
/* IRQ lines 1 & 4 on the sound 68000 are definitely triggered by the ES5506,
but I haven't noticed the ES5506 ever assert the line - maybe only used when developing the game? */
// m_audiocpu->set_input_line(1, state ? ASSERT_LINE : CLEAR_LINE);
}
void macrossp_state::machine_start()
{
save_item(NAME(m_sndpending));
save_item(NAME(m_snd_toggle));
}
void macrossp_state::machine_reset()
{
m_sndpending = 0;
m_snd_toggle = 0;
}
static MACHINE_CONFIG_START( macrossp, macrossp_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68EC020, 50000000/2) /* 25 MHz */
MCFG_CPU_PROGRAM_MAP(macrossp_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", macrossp_state, irq3_line_hold) // there are others ...
MCFG_CPU_ADD("audiocpu", M68000, 32000000/2) /* 16 MHz */
MCFG_CPU_PROGRAM_MAP(macrossp_sound_map)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
MCFG_SCREEN_SIZE(32*16, 16*16)
MCFG_SCREEN_VISIBLE_AREA(0*16, 24*16-1, 0*16, 15*16-1)
MCFG_SCREEN_UPDATE_DRIVER(macrossp_state, screen_update_macrossp)
MCFG_SCREEN_VBLANK_DRIVER(macrossp_state, screen_eof_macrossp)
MCFG_GFXDECODE_ADD("gfxdecode", "palette", macrossp)
MCFG_PALETTE_ADD("palette", 4096)
MCFG_PALETTE_FORMAT(RGBX)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_SOUND_ADD("ensoniq", ES5506, 16000000)
MCFG_ES5506_REGION0("ensoniq.0")
MCFG_ES5506_REGION1("ensoniq.1")
MCFG_ES5506_REGION2("ensoniq.2")
MCFG_ES5506_REGION3("ensoniq.3")
MCFG_ES5506_CHANNELS(1) /* channels */
MCFG_ES5506_IRQ_CB(WRITELINE(macrossp_state, irqhandler))
MCFG_SOUND_ROUTE(0, "lspeaker", 0.1)
MCFG_SOUND_ROUTE(1, "rspeaker", 0.1)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( quizmoon, macrossp )
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_VISIBLE_AREA(0, 24*16-1, 0*8, 14*16-1)
MACHINE_CONFIG_END
/*** ROM LOADING *************************************************************/
ROM_START( macrossp )
ROM_REGION( 0x400000, "maincpu", 0 )
ROM_LOAD32_BYTE( "bp964a-c.u1", 0x000003, 0x080000, CRC(39da35e7) SHA1(022c902b0adf21090c650ce68e4b8b42498e1be6) )
ROM_LOAD32_BYTE( "bp964a-c.u2", 0x000002, 0x080000, CRC(86d0ca6a) SHA1(8cc1b4a83cbba8b07e1343c5c20e2590d3ce471a) )
ROM_LOAD32_BYTE( "bp964a-c.u3", 0x000001, 0x080000, CRC(fb895a7b) SHA1(547e5d3d43e503a15573748ab49a44e5569db1d7) )
ROM_LOAD32_BYTE( "bp964a-c.u4", 0x000000, 0x080000, CRC(8c8b966c) SHA1(881fa2b7aefc3ea916924b715d2cd0ceaffe2d92) )
ROM_REGION( 0x100000, "audiocpu", 0 )
ROM_LOAD16_BYTE( "bp964a.u20", 0x000001, 0x080000, CRC(12960cbb) SHA1(7182c4b36849a5d34ddf388bf5f4485ed360fe84) )
ROM_LOAD16_BYTE( "bp964a.u21", 0x000000, 0x080000, CRC(87bdd2fc) SHA1(c33f087ebca6e98db195404788ca8e0cc6663622) )
ROM_REGION( 0x20000, "user1", 0 )
ROM_LOAD( "bp964a.u49", 0x000000, 0x020000, CRC(ad203f76) SHA1(3eb86eeeb020349dfd88ebc8b4fc9579d1cc50fb) ) // 'BIOS'
ROM_REGION( 0x1000000, "gfx1", 0 ) /* sprites - 16x16x8 */
ROM_LOAD32_BYTE( "bp964a.u9", 0x000003, 0x400000, CRC(bd51a70d) SHA1(3447ae9d368e4e33df2d4e2848b4fd5aa0fc6840) )
ROM_LOAD32_BYTE( "bp964a.u10", 0x000002, 0x400000, CRC(ab84bba7) SHA1(d30876b2e45c4b78cda27d3c648100e60f739d9c) )
ROM_LOAD32_BYTE( "bp964a.u11", 0x000001, 0x400000, CRC(b9ae1d0b) SHA1(bc541a8bd622c99cf5065b3a793f0b5f6420ac64) )
ROM_LOAD32_BYTE( "bp964a.u12", 0x000000, 0x400000, CRC(8dda1052) SHA1(c374335e98859ae98ac392a7cdb44f15b4e1c23a) )
ROM_REGION( 0x800000, "gfx2", 0 ) /* backgrounds - 16x16x8 */
ROM_LOAD( "bp964a.u13", 0x000000, 0x400000, CRC(f4d3c5bf) SHA1(82522d276a6d49148da8a4fb11846a039429bcf8) )
ROM_LOAD( "bp964a.u14", 0x400000, 0x400000, CRC(4f2dd1b2) SHA1(30a2c9fb26bca8bb27fbc5637878f99e7f6ad8f4) )
ROM_REGION( 0x800000, "gfx3", 0 ) /* backgrounds - 16x16x8 */
ROM_LOAD( "bp964a.u15", 0x000000, 0x400000, CRC(5b97a870) SHA1(16f3921649b28ecb6d628871214f972333bbeca4) )
ROM_LOAD( "bp964a.u16", 0x400000, 0x400000, CRC(c8a0cd64) SHA1(2a30a4d4ec3f94631783eb08c62003b116bb2ee3) )
ROM_REGION( 0x800000, "gfx4", 0 ) /* backgrounds - 16x16x8 */
ROM_LOAD( "bp964a.u17", 0x000000, 0x400000, CRC(f2470876) SHA1(e683208432f71f3cc19ced245fa5b8a82466d19b) )
ROM_LOAD( "bp964a.u18", 0x400000, 0x400000, CRC(52ef21f3) SHA1(08fb1969ad0ffd0c5bf11d3d5448a26112d562b0) )
ROM_REGION( 0x400000, "gfx5", 0 ) /* foreground - 16x16x4 */
ROM_LOAD( "bp964a.u19", 0x000000, 0x080000, CRC(19c7acd9) SHA1(b7631e74f359c5570c44addf46c3e96c80adc6c3) )
ROM_REGION16_BE( 0x800000, "ensoniq.0", ROMREGION_ERASEFF )
ROM_LOAD16_BYTE( "bp964a.u24", 0x000000, 0x400000, CRC(93f90336) SHA1(75daa2f8cedc732cf5ef98254f61748c94b94aea) )
ROM_REGION16_BE( 0x400000, "ensoniq.1", 0 )
ROM_COPY( "ensoniq.0", 0x400000, 0x000000, 0x400000 )
ROM_REGION( 0x0600, "plds", 0 )
ROM_LOAD( "u8.u8", 0x0000, 0x0117, CRC(99bd3cc1) SHA1(b0d3ac93cb5d2857cf9c184c7a2b4afa0211d588) ) /* unprotected GAL16V8B */
ROM_LOAD( "u9.u9", 0x0200, 0x0117, CRC(480f4860) SHA1(7ff3723122cbdda5c0dcea5167508e9a7437f551) ) /* unprotected GAL16V8B */
ROM_LOAD( "u200.u200", 0x0400, 0x0117, CRC(9343ad76) SHA1(a2adf2510011078ee9fae65acdd2daa0ffab48f6) ) /* unprotected GAL16V8B */
ROM_END
ROM_START( quizmoon )
ROM_REGION( 0x400000, "maincpu", 0 )
ROM_LOAD32_BYTE( "u1.bin", 0x000003, 0x020000, CRC(ea404553) SHA1(123bb8e399a5b54c43f4eb41d3e5f52c6947900f) )
ROM_LOAD32_BYTE( "u2.bin", 0x000002, 0x020000, CRC(024eedff) SHA1(cbaa2b71980a2686e582331616dc36e34ecd9e67) )
ROM_LOAD32_BYTE( "u3.bin", 0x000001, 0x020000, CRC(545b1d17) SHA1(f1b15260942482857c48b574ada1e2a3b728f395) )
ROM_LOAD32_BYTE( "u4.bin", 0x000000, 0x020000, CRC(60b3d18c) SHA1(230342a084938fdbd2b4da23df2054391eab165b) )
ROM_LOAD32_BYTE( "u5.bin", 0x200003, 0x080000, CRC(4cc65f5e) SHA1(eebad4c1bf761f08cacbf8c75e7f7bd421ee65ca) )
ROM_LOAD32_BYTE( "u6.bin", 0x200002, 0x080000, CRC(d84b7c6c) SHA1(ba6ab34fb5c61aa1a97159b7aa3d89e978fb0538) )
ROM_LOAD32_BYTE( "u7.bin", 0x200001, 0x080000, CRC(656b2125) SHA1(ac3874e71ec0aa4e77ac0d556e4572606ce673c7) )
ROM_LOAD32_BYTE( "u8.bin", 0x200000, 0x080000, CRC(944df309) SHA1(ee85f6dbfe970b63943d01d9f8b491717a4d5a71) )
ROM_REGION( 0x100000, "audiocpu", 0 )
ROM_LOAD16_BYTE( "u20.bin", 0x000001, 0x020000, CRC(d7ad1ffb) SHA1(9d375285628b32296c93456a00bc005a3f40ce38) )
ROM_LOAD16_BYTE( "u21.bin", 0x000000, 0x020000, CRC(6fc625c6) SHA1(542bc025cf0e37686eae5d6c80bc5e047d6389fd) )
ROM_REGION( 0x20000, "user1", 0 )
ROM_LOAD( "u49.bin", 0x000000, 0x020000, CRC(1590ad81) SHA1(04fb8119d9eafc6d2a921700dfb11e9c8b705c88) ) // 'BIOS'
ROM_REGION( 0x1000000, "gfx1", 0 )
ROM_LOAD32_BYTE( "u9.bin", 0x0000003, 0x0400000, CRC(aaaf2ca9) SHA1(b9e59590daf4cdee4b1deeb6d4ecc80eb12a2e18) )
ROM_LOAD32_BYTE( "u10.bin", 0x0000002, 0x0400000, CRC(f0349691) SHA1(623a680ad164d407be0af585a15540f0dca995a4) )
ROM_LOAD32_BYTE( "u11.bin", 0x0000001, 0x0400000, CRC(893ab178) SHA1(ba68b9a3e81af4c2565715504ada35c7da3f135f) )
ROM_LOAD32_BYTE( "u12.bin", 0x0000000, 0x0400000, CRC(39b731b8) SHA1(2bf1d083fc6d8058a0d26b29714945e8be0e2c79) )
ROM_REGION( 0x400000, "gfx2", 0 )
ROM_LOAD( "u13.bin", 0x0000000, 0x0400000, CRC(3dcbb041) SHA1(fcff67113707fcf14d49538551724490498c0909) )
ROM_REGION( 0x400000, "gfx3", 0 )
ROM_LOAD( "u15.bin", 0x0000000, 0x0400000, CRC(b84224f0) SHA1(7163aec2cc118111b2c5d8deb61133d762a5d74c) )
ROM_REGION( 0x0200000, "gfx4", 0 )
ROM_LOAD( "u17.bin", 0x0000000, 0x0200000, CRC(ff93c949) SHA1(13917d73a6cb70d03d0335bd816bf6b094758d0b) )
ROM_REGION( 0x400000, "gfx5", ROMREGION_ERASE00 )
/* nothing on this game? */
ROM_REGION16_BE( 0x800000, "ensoniq.0", 0 )
ROM_LOAD16_BYTE( "u26.bin", 0x0000000, 0x0400000, CRC(6c8f30d4) SHA1(7e215589e4a52cbce7f2bb31b333f874a9f83d00) )
ROM_LOAD16_BYTE( "u24.bin", 0x0000001, 0x0400000, CRC(5b12d0b1) SHA1(c5ddff2053148a1da0710a10f48689bf5c736ae4) )
ROM_REGION16_BE( 0x400000, "ensoniq.1", 0 )
ROM_COPY( "ensoniq.0", 0x400000, 0x000000, 0x400000 )
ROM_REGION16_BE( 0x800000, "ensoniq.2", 0 )
ROM_LOAD16_BYTE( "u27.bin", 0x0000000, 0x0400000, CRC(bd75d165) SHA1(2da770d15c812cbfdb4e3048d320071edffccfa1) )
ROM_LOAD16_BYTE( "u25.bin", 0x0000001, 0x0400000, CRC(3b9689bc) SHA1(0857c3d3e9810f9468f7c17f8b795825c55a9f08) )
ROM_REGION16_BE( 0x400000, "ensoniq.3", 0 )
ROM_COPY( "ensoniq.2", 0x400000, 0x000000, 0x400000 )
ROM_END
WRITE32_MEMBER(macrossp_state::macrossp_speedup_w)
{
/*
PC :00018104 018104: addq.w #1, $f1015a.l
PC :0001810A 01810A: cmp.w $f10140.l, D0
PC :00018110 018110: beq 18104
*/
COMBINE_DATA(&m_mainram[0x10158 / 4]);
if (space.device().safe_pc() == 0x001810A) space.device().execute().spin_until_interrupt();
}
#ifdef UNUSED_FUNCTION
WRITE32_MEMBER(macrossp_state::quizmoon_speedup_w)
{
COMBINE_DATA(&m_mainram[0x00020 / 4]);
if (space.device().safe_pc() == 0x1cc) space.device().execute().spin_until_interrupt();
}
#endif
DRIVER_INIT_MEMBER(macrossp_state,macrossp)
{
m_maincpu->space(AS_PROGRAM).install_write_handler(0xf10158, 0xf1015b, write32_delegate(FUNC(macrossp_state::macrossp_speedup_w),this));
}
DRIVER_INIT_MEMBER(macrossp_state,quizmoon)
{
#ifdef UNUSED_FUNCTION
m_maincpu->space(AS_PROGRAM).install_write_handler(0xf00020, 0xf00023, write32_delegate(FUNC(macrossp_state::quizmoon_speedup_w),this));
#endif
}
GAME( 1996, macrossp, 0, macrossp, macrossp, macrossp_state, macrossp, ROT270, "MOSS / Banpresto", "Macross Plus", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
GAME( 1997, quizmoon, 0, quizmoon, quizmoon, macrossp_state, quizmoon, ROT0, "Banpresto", "Quiz Bisyoujo Senshi Sailor Moon - Chiryoku Tairyoku Toki no Un", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
| gpl-2.0 |
JozefAB/neoacu | administrator/components/com_guru/plugins/cron_GURU/gurucron.php | 977 | <?php
/*------------------------------------------------------------------------
# com_guru
# ------------------------------------------------------------------------
# author iJoomla
# copyright Copyright (C) 2013 ijoomla.com. All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites: http://www.ijoomla.com
# Technical Support: Forum - http://www.ijoomla.com.com/forum/index/
-------------------------------------------------------------------------*/
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport( 'joomla.plugin.plugin' );
class plgSystemGuruCron extends JPlugin{
function plgSystemGuruCron(&$subject, $config) {
parent::__construct($subject, $config);
}
function onAfterRender(){
$app = JFactory::getApplication();
if($app->isSite()){
require_once(JPATH_ROOT.DS.'components'.DS.'com_guru'.DS.'helpers'.DS.'cronjobs.php');
guru_cronjobs();
}
}
}
?> | gpl-2.0 |
Distrotech/icedtea6-1.12 | src/jtreg/com/sun/javatest/report/TestResultsByTitleComparator.java | 1752 | /*
* $Id$
*
* Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
package com.sun.javatest.report;
import java.util.Comparator;
import com.sun.javatest.TestResult;
class TestResultsByTitleComparator implements Comparator {
public int compare(Object o1, Object o2) {
TestResult tr1 = (TestResult)o1;
TestResult tr2 = (TestResult)o2;
return compare(tr1.getTestName(), tr2.getTestName());
}
private static int compare(String a, String b) {
if (a == null && b == null)
return 0;
if (a == null)
return -1;
if (b == null)
return +1;
return a.compareTo(b);
}
}
| gpl-2.0 |
mssnaveensharma/mjejaneriver-jaqui | administrator/components/com_jhotelreservation/models/applicationsettings.php | 6592 | <?php
/**
* @copyright Copyright (C) 2008-2009 CMSJunkie. All rights reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
defined('_JEXEC') or die( 'Restricted access' );
class JHotelReservationModelApplicationSettings extends JModelLegacy
{
function __construct()
{
parent::__construct();
$array = JRequest::getVar('applicationsettings_id', 0, '', 'array');
//var_dump($array);
if(isset($array[0])) $this->setId((int)$array[0]);
}
function setId($applicationsettings_id)
{
// Set id and wipe data
$this->_applicationsettings_id = $applicationsettings_id;
$this->_data = null;
}
/**
* Method to get applicationsettings
* @return object with data
*/
function &getData()
{
// Load the data
if (empty( $this->_data ))
{
$query = ' SELECT * FROM #__hotelreservation_applicationsettings';
$this->_db->setQuery( $query );
$this->_data = $this->_db->loadObject();
}
$config =JFactory::getConfig();
$this->_data->sendmail_from = $config->get( 'config.mailfrom' );
$this->_data->sendmail_name = $config->get( 'config.fromname' );
if (!$this->_data)
{
$this->_data = new stdClass();
$this->_data->applicationsettings_id = null;
$this->_data->is_enable_reservation = null;
$this->_data->currency_id = null;
$this->_data->special_notes = null;
$this->_data->terms_and_conditions = null;
$this->_data->is_enable_payment = null;
$this->_data->is_enable_https = null;
$this->_data->is_site_online = null;
$this->_data->css_style = null;
$this->_data->css_module_style = null;
$this->_data->company_name = null;
$this->_data->company_email = null;
$this->_data->policy = null;
$this->_data->currencies = array();
$this->_data->is_enable_extra_options = null;
$config =JFactory::getConfig();
$this->_data->sendmail_from = $config->get( 'config.mailfrom' );
$this->_data->sendmail_name = $config->get( 'config.fromname' );
$this->data->is_enable_offers = null;
$this->data->is_email_notify_canceled_pending = null;
$this->data->invoice_email = null;
$this->data->send_invoice_to_email = null;
$this->data->enable_hotel_tabs = null;
$this->data->enable_hotel_description = null;
$this->data->enable_hotel_facilitites = null;
$this->data->enable_hotel_information = null;
}
$config =JFactory::getConfig();
$this->_data->sendmail_from = $config->get( 'config.mailfrom' );
$this->_data->sendmail_name = $config->get( 'config.fromname' );
if( $this->_data)
{
$this->_data->card_types = array();
$this->_data->currencies = array();
$query = ' SELECT currency_id, description FROM #__hotelreservation_currencies';
//$this->_db->setQuery( $query );
$this->_data->currencies = $this->_getList( $query );
$this->_data->dateFormats = array();
$query = ' SELECT * FROM #__hotelreservation_date_formats';
//$this->_db->setQuery( $query );
$this->_data->dateFormats = $this->_getList( $query );
//var_dump($this->_data);
}
//JPATH_COMPONENT_SITE. DS.'assets'.DS
$this->_data->css_styles = glob(JPATH_COMPONENT_SITE. DS.'assets'.DS.'css'.DS.'*.css');
$this->_data->css_module_styles = glob(JPATH_ROOT.DS.'modules'.DS.'mod_jhotelreservation'. DS.'assets'.DS.'*.css');
$this->_data->languages = glob(JPATH_COMPONENT_ADMINISTRATOR. DS.'language'.DS.'*', GLOB_ONLYDIR);
return $this->_data;
}
function store( $data )
{
$row = $this->getTable();
if( count($data['card_type_ids'] > 0 ) )
$data['card_type_ids'] = implode(',', $data['card_type_ids'] );
else
$data['card_type_ids'] = '';
// Bind the form fields to the table
if (!$row->bind($data))
{
$this->setError($this->_db->getErrorMsg());
return false;
}
// Make sure the record is valid
if (!$row->check()) {
$this->setError($this->_db->getErrorMsg());
return false;
}
// Store the web link table to the database
if (!$row->store()) {
$this->setError( $this->_db->getErrorMsg() );
return false;
}
return true;
}
function getLanguages(){
$path = JLanguage::getLanguagePath(JPATH_ROOT);
$dirs = JFolder::folders( $path );
foreach ($dirs as $dir)
{
if(strlen($dir) != 5) continue;
$xmlFiles = JFolder::files( $path.DS.$dir, '^([-_A-Za-z]*)\.xml$' );
$xmlFile = reset($xmlFiles);
if(empty($xmlFile)) continue;
$data = JApplicationHelper::parseXMLLangMetaFile($path.DS.$dir.DS.$xmlFile);
$oneLanguage = new stdClass();
$oneLanguage->language = $dir;
$oneLanguage->name = $data['name'];
$languageFiles = JFolder::files( JPATH_COMPONENT.DS.'language'.DS. $dir, '^(.*)\.'.getBookingExtName().'\.ini$' );
$imageName = JFolder::files( JPATH_COMPONENT.DS.'language'.DS. $dir, '^(.*)\.'.getBookingExtName().'\.png$' );
$languageFile = reset($languageFiles);
if(!empty($languageFile)){
$linkEdit = 'index.php?option='.getBookingExtName().'&task=language.editLanguage&lngCode='.$oneLanguage->language;
$oneLanguage->edit = ' <a class="modal" title="'.JText::_('LNG_EDIT_LANGUAGE_FILE',true).'" href="'.$linkEdit.'" rel="{handler: \'iframe\', size:{x:800, y:500}}"><img id="image'.$oneLanguage->language.'" class="icon16" src="'.PATH_ASSETS_IMG.'edit.png" alt="'.JText::_('LNG_EDIT_LANGUAGE_FILE',true).'"/></a>';
}else{
$linkEdit = 'index.php?option='.getBookingExtName().'&task=language.editLanguage&lngCode='.$oneLanguage->language;
$oneLanguage->edit = ' <a class="modal" title="'.JText::_('LNG_ADD_LANGUAGE_FILE',true).'" href="'.$linkEdit.'" rel="{handler: \'iframe\', size:{x:800, y:500}}"><img id="image'.$oneLanguage->language.'" class="icon16" src="'.PATH_ASSETS_IMG.'edit.png" alt="'.JText::_('LNG_EDIT_LANGUAGE_FILE',true).'"/></a>';
}
$languages[] = $oneLanguage;
}
return $languages;
}
}
?> | gpl-2.0 |
shamim8888/Leaf | data/mapping/definitions/project.js | 94 | require("../mapper").define("project", "project-view-model", {
"id": "_id",
name: "name"
}); | gpl-2.0 |
luskyj89/mt-wordpress | wp-content/themes/valenti/comments.php | 5369 | <?php /* Comments page */
$commenter = wp_get_current_commenter();
$req = get_option( 'require_name_email' );
$aria_req = ( $req ? " aria-required='true'" : '' );
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!');
if ( post_password_required() ) { ?>
<div class="alert help">
<p class="nocomments"><?php _e("This post is password protected. Enter the password to view comments.", "cubell"); ?></p>
</div>
<?php
return;
}
?>
<?php if ( have_comments() ) : ?>
<h3 id="comments" class="cb-block-title"><?php comments_number(__("No Responses", "cubell"), __("One Response", "cubell"), _n('% Response', '% Responses', get_comments_number(),'cubell') );?></h3>
<nav id="comment-nav">
<ul class="clearfix">
<li><?php previous_comments_link() ?></li>
<li><?php next_comments_link() ?></li>
</ul>
</nav>
<ol class="commentlist">
<?php wp_list_comments('type=comment&callback=cb_comments&max_depth=3'); ?>
</ol>
<nav id="comment-nav">
<ul class="clearfix">
<li><?php previous_comments_link() ?></li>
<li><?php next_comments_link() ?></li>
</ul>
</nav>
<?php endif; ?>
<?php if ( comments_open() ) : ?>
<?php comment_form(
array(
'title_reply' => __( 'Leave a Reply', 'cubell'),
'title_reply_to' => __( 'Leave a Reply to %s', 'cubell' ),
'cancel_reply_link' => __( 'Cancel Reply', 'cubell' ),
'label_submit' => __( 'Submit', 'cubell' ),
'comment_notes_after' => '',
'comment_notes_before' => '<p class="comment-notes">' . __( 'Your email address will not be published.', 'cubell') .'</p>',
'comment_field' => '<p class="comment-form-comment"><label for="comment">' . __( 'Comment', 'cubell' ) .
'</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true">' .
'</textarea></p>',
'must_log_in' => '<p class="must-log-in">' .
sprintf(
__( 'You must be <a href="%s">logged in</a> to post a comment.', 'cubell' ),
wp_login_url( apply_filters( 'the_permalink', get_permalink() ) )
) . '</p>',
'logged_in_as' => '<p class="logged-in-as">' .
sprintf(
__( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>', 'cubell' ),
admin_url( 'profile.php' ),
$user_identity,
wp_logout_url( apply_filters( 'the_permalink', get_permalink( ) ) )
) . '</p>',
'fields' => apply_filters( 'comment_form_default_fields', array(
'author' =>
'<p class="comment-form-author">' .
'<label for="author">' . __( 'Name', 'cubell' ) .
( $req ? '<span class="required">*</span>' : '' ) . '</label> ' .
'<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) .
'" size="30"' . $aria_req . ' /></p>',
'email' =>
'<p class="comment-form-email"><label for="email">' . __( 'Email', 'cubell' ) .
( $req ? '<span class="required">*</span>' : '' ) . '</label> ' .
'<input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) .
'" size="30"' . $aria_req . ' /></p>',
'url' =>
'<p class="comment-form-url"><label for="url">' .
__( 'Website', 'cubell' ) . '</label>' .
'<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) .
'" size="30" /></p>'
)
),
)
); ?>
<?php endif; // if you delete this the sky will fall on your head ?> | gpl-2.0 |
doneself/agit | wp-content/plugins/frontier-post/include/frontier_new_category_post_widget.php | 3440 | <?php
/**
*
* Frontier post - Create post with preset category
*/
class frontier_new_category_posts_widget extends WP_Widget
{
var $defaults;
/** constructor */
function frontier_new_category_posts_widget()
{
$this->defaults = array(
'title' => __('New post from #category#','frontier-post'),
'link_name' => __('Create ','frontier-post').'#category#'.__(' post','frontier-post'),
'category' => 0,
'nolistwrap' => false,
'show_current_cat' => 1,
);
$widget_ops = array('description' => __( "Add new post from category", 'frontier-post') );
parent::WP_Widget(false, $name = 'Add category post', $widget_ops);
}
/** @see WP_Widget::widget */
function widget($args, $instance)
{
if(is_user_logged_in())
{
$tmp_cat_id = get_query_var("cat");
// Only show if on category archive pages
if ( !isset($tmp_cat_id) || $tmp_cat_id == 0 )
return;
$instance = array_merge($this->defaults, $instance);
$tmp_cat_name = get_cat_name($tmp_cat_id);
//error_log("cat id: ");
//error_log($tmp_cat_id);
// Set link & Title name
$tmp_link_name = str_replace('#category#', $tmp_cat_name, $instance['link_name']);
$tmp_title_name = str_replace('#category#', $tmp_cat_name, $instance['title']);
echo $args['before_widget'];
if( !empty($instance['title']) )
{
echo $args['before_title'];
//echo $instance['title'];
echo $tmp_title_name;
echo $args['after_title'];
}
?>
<div class="frontier-category-post-widget">
<?php
//echo "Category: ";
//echo $tmp_cat_name."(".$tmp_cat_id.")";
echo '<p><center><a href="'.frontier_post_add_link(null, $tmp_cat_id).'&frontier_new_cat_widget=true'.'">'.$tmp_link_name.'</a></center></p>';
?>
</div>
<?php
echo $args['after_widget'];
}
else // If not logged in
{
// echo "<p>".__("You need to login to see your posts", "frontier-post")."</p>";
}
}
/** @see WP_Widget::update */
function update($new_instance, $old_instance)
{
$tmp_boolean_fields = array('show_add_post', 'show_post_count');
foreach($this->defaults as $key => $value)
{
if( !isset($new_instance[$key]) )
{
//check if is one of the logical fields (checkbox) and set value to false, so it isnt empty...
if (in_array($key, $tmp_boolean_fields))
$new_instance[$key] = false;
else
$new_instance[$key] = $value;
}
}
return $new_instance;
}
/** @see WP_Widget::form */
function form($instance)
{
$instance = array_merge($this->defaults, $instance);
?>
<p>
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title', 'frontier-post'); ?>: </label>
<input type="text" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo esc_attr($instance['title']); ?>" />
<label for="<?php echo $this->get_field_id('link_name'); ?>"><?php _e('Link text', 'frontier-post'); ?>: </label>
<input type="text" id="<?php echo $this->get_field_id('link_name'); ?>" name="<?php echo $this->get_field_name('link_name'); ?>" value="<?php echo esc_attr($instance['link_name']); ?>" />
</p>
<?php
}
}
add_action('widgets_init', create_function('', 'return register_widget("frontier_new_category_posts_widget");'));
?> | gpl-2.0 |
Carlosbarrera585c/Laura | view/tipoId/editTemplate.html.php | 596 | <?php
use mvc\routing\routingClass as routing ?>
<?php
use mvc\i18n\i18nClass as i18n ?>
<?php
use mvc\view\viewClass as view ?>
<?php $descTipoId = tipoIdTableClass::DESC_TIPO_ID ?>
<?php view::includePartial('menu/menu') ?>
<div class="container container-fluid">
<div class="page-header titulo">
<h1><i class="fa fa-pencil-square"> <?php echo i18n::__('EditIdentification') ?>: <small><?php echo $objTipoId[0]->$descTipoId ?></small></i></h1>
</div>
<?php view::includePartial('tipoId/formTipo', array('objTipoId' => $objTipoId, 'desc_tipo_id' => $descTipoId)) ?>
</div> | gpl-2.0 |
aschnell/yast-storage-ng | src/lib/y2storage/data_transport.rb | 1107 | # Copyright (c) [2017] SUSE LLC
#
# All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of version 2 of the GNU General Public License as published
# by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, contact SUSE LLC.
#
# To contact SUSE LLC about this file by physical or electronic mail, you may
# find current contact information at www.suse.com.
require "y2storage/storage_enum_wrapper"
module Y2Storage
# Class to represent all the possible data transport layers
#
# This is a wrapper for the Storage::Transport enum
class DataTransport
include StorageEnumWrapper
wrap_enum "Transport"
# @return [Boolean]
def network?
to_sym == :iscsi || to_sym == :fcoe
end
end
end
| gpl-2.0 |
ridoo/sensorweb-rest-api | io/src/main/java/org/n52/io/request/RequestStyledParameterSet.java | 4200 | /*
* Copyright (C) 2013-2016 52°North Initiative for Geospatial Open Source
* Software GmbH
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation.
*
* If the program is linked with libraries which are licensed under one of
* the following licenses, the combination of the program with the linked
* library is not considered a "derivative work" of the program:
*
* - Apache License, version 2.0
* - Apache Software License, version 1.0
* - GNU Lesser General Public License, version 3
* - Mozilla Public License, versions 1.0, 1.1 and 2.0
* - Common Development and Distribution License (CDDL), version 1.0
*
* Therefore the distribution of the program linked with libraries licensed
* under the aforementioned licenses, is permitted by the copyright holders
* if the distribution is compliant with both the GNU General Public License
* version 2 and the aforementioned licenses.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*/
package org.n52.io.request;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Represents a parameter object to request a rendered chart output from
* multiple timeseries.
*/
public class RequestStyledParameterSet extends RequestParameterSet {
// TODO lean at revised prerendering config
/**
* Style options for each timeseriesId of interest.
*/
@JsonProperty(required = true)
private Map<String, StyleProperties> styleOptions;
private int width = 800;
private int height = 500;
private boolean grid = true;
private boolean legend = false;
/**
* Creates an instance with non-null default values.
*/
public RequestStyledParameterSet() {
styleOptions = new HashMap<>();
}
/**
* @return the requested width or negative number if no size was set.
*/
public int getWidth() {
return width;
}
/**
* @param width the image width to set.
*/
public void setWidth(int width) {
this.width = width;
}
/**
* @return the requested height or negative number if no size was set.
*/
public int getHeight() {
return height;
}
public void setHeight(int height) {
this.height = height;
}
@Override
public String[] getDatasets() {
return styleOptions.keySet().toArray(new String[0]);
}
/**
* @param grid <code>true</code> if charts shall be rendered on a grid,
* <code>false</code> otherwise.
*/
public void setGrid(boolean grid) {
this.grid = grid;
}
/**
* @return <code>true</code> if charts shall be rendered on a grid,
* <code>false</code> otherwise.
*/
public boolean isGrid() {
return grid;
}
public boolean isLegend() {
return legend;
}
public void setLegend(boolean legend) {
this.legend = legend;
}
public void setStyleOptions(Map<String, StyleProperties> renderingOptions) {
this.styleOptions = renderingOptions;
}
public StyleProperties getStyleOptions(String timeseriesId) {
return styleOptions.get(timeseriesId);
}
public StyleProperties getReferenceSeriesStyleOptions(String timeseriesId, String referenceSeriesId) {
if (!styleOptions.containsKey(timeseriesId)) {
return null;
}
StyleProperties styleProperties = styleOptions.get(timeseriesId);
Map<String, StyleProperties> properties = styleProperties.getReferenceValueStyleProperties();
return properties.containsKey(referenceSeriesId)
? properties.get(referenceSeriesId)
: null;
}
public void addSeriesWithStyleOptions(String timeseriesId, StyleProperties styleOptions) {
this.styleOptions.put(timeseriesId, styleOptions);
}
}
| gpl-2.0 |
jansed26/tmg-server | extensions/MobileFrontend/tests/browser/features/support/pages/mobile_options_page.rb | 249 | class MobileOptions
include PageObject
include URL
page_url URL.url("Special:MobileOptions")
label(:beta, css: "div.mobileoption:nth-child(3) > div:nth-child(1) > label:nth-child(2)")
button(:save_settings, id:"mw-mf-settings-save")
end
| gpl-2.0 |
kephale/java3d-core | src/classes/share/javax/media/j3d/CompressedGeometry.java | 15464 | /*
* Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package javax.media.j3d;
/**
* The compressed geometry object is used to store geometry in a
* compressed format. Using compressed geometry may increase the speed
* objects can be sent over the network. Note that the geometry will
* be decompressed in memory, so the application will not see any
* memory savings.
* <p>
* Compressed geometry may be passed to this CompressedGeometry object
* in one of two ways: by copying the data into this object using the
* existing constructor, or by passing a reference to the data.
* <p>
* <ul>
* <li>
* <b>By Copying:</b>
* The existing CompressedGeometry constructor copies the buffer of
* compressed geometry data into this CompressedGeometry object. This
* is appropriate for many applications, and allows Java 3D to verify
* the data once and then not worry about it again.
* </li>
* <li><b>By Reference:</b>
* A new constructor and set of methods in Java 3D version 1.2 allows
* compressed geometry data to be accessed by reference, directly from
* the user's array. To use this feature, you need to construct a
* CompressedGeometry object with the <code>byReference</code> flag
* set to <code>true</code>. In this mode, a reference to the input
* data is saved, but the data itself is not necessarily copied. Note
* that the compressed geometry header is still copied into this
* compressed geometry object. Data referenced by a
* CompressedGeometry object must not be modified after the
* CompressedGeometry object is constructed.
* Applications
* must exercise care not to violate this rule. If any referenced
* compressed geometry data is modified after construction,
* the results are undefined.
* </li>
* </ul>
*
* @deprecated As of Java 3D version 1.4.
*/
public class CompressedGeometry extends Geometry {
CompressedGeometryHeader cgHeader ;
/**
* Specifies that this CompressedGeometry object allows reading its
* byte count information.
*/
public static final int
ALLOW_COUNT_READ = CapabilityBits.COMPRESSED_GEOMETRY_ALLOW_COUNT_READ ;
/**
* Specifies that this CompressedGeometry object allows reading its
* header information.
*/
public static final int
ALLOW_HEADER_READ = CapabilityBits.COMPRESSED_GEOMETRY_ALLOW_HEADER_READ ;
/**
* Specifies that this CompressedGeometry object allows reading its
* geometry data component information.
*/
public static final int
ALLOW_GEOMETRY_READ =
CapabilityBits.COMPRESSED_GEOMETRY_ALLOW_GEOMETRY_READ ;
/**
* Specifies that this CompressedGeometry allows reading the geometry
* data reference information for this object. This is only used in
* by-reference geometry mode.
*
* @since Java 3D 1.2
*/
public static final int
ALLOW_REF_DATA_READ =
CapabilityBits.COMPRESSED_GEOMETRY_ALLOW_REF_DATA_READ;
// Array for setting default read capabilities
private static final int[] readCapabilities = {
ALLOW_COUNT_READ,
ALLOW_HEADER_READ,
ALLOW_GEOMETRY_READ,
ALLOW_REF_DATA_READ
};
/**
* Package scoped default constructor for use by cloneNodeComponent.
*/
CompressedGeometry() {
// set default read capabilities
setDefaultReadCapabilities(readCapabilities);
}
/**
* Creates a new CompressedGeometry NodeComponent by copying
* the specified compressed geometry data into this object.
* If the version number of compressed geometry, as specified by
* the CompressedGeometryHeader, is incompatible with the
* supported version of compressed geometry in the current version
* of Java 3D, then the compressed geometry object will not be
* rendered.
*
* @param hdr the compressed geometry header. This is copied
* into the CompressedGeometry NodeComponent.
*
* @param compressedGeometry the compressed geometry data. The
* geometry must conform to the format described in Appendix B of
* the <i>Java 3D API Specification</i>.
*
* @exception IllegalArgumentException if a problem is detected with the
* header
*
* @see CompressedGeometryHeader
* @see Canvas3D#queryProperties
*/
public CompressedGeometry(CompressedGeometryHeader hdr,
byte[] compressedGeometry) {
this(hdr, compressedGeometry, false) ;
}
/**
* Creates a new CompressedGeometry NodeComponent. The
* specified compressed geometry data is either copied into this
* object or is accessed by reference.
* If the version number of compressed geometry, as specified by
* the CompressedGeometryHeader, is incompatible with the
* supported version of compressed geometry in the current version
* of Java 3D, the compressed geometry object will not be
* rendered.
*
* @param hdr the compressed geometry header. This is copied
* into the CompressedGeometry NodeComponent.
*
* @param compressedGeometry the compressed geometry data. The
* geometry must conform to the format described in Appendix B of
* the <i>Java 3D API Specification</i>.
*
* @param byReference a flag that indicates whether the data is copied
* into this compressed geometry object or is accessed by reference.
*
* @exception IllegalArgumentException if a problem is detected with the
* header
*
* @see CompressedGeometryHeader
* @see Canvas3D#queryProperties
*
* @since Java 3D 1.2
*/
public CompressedGeometry(CompressedGeometryHeader hdr,
byte[] compressedGeometry,
boolean byReference) {
if ((hdr.size + hdr.start) > compressedGeometry.length)
throw new IllegalArgumentException
(J3dI18N.getString("CompressedGeometry0")) ;
// set default read capabilities
setDefaultReadCapabilities(readCapabilities);
// Create a separate copy of the given header.
cgHeader = new CompressedGeometryHeader() ;
hdr.copy(cgHeader) ;
// Create the retained object.
((CompressedGeometryRetained)this.retained).createCompressedGeometry
(cgHeader, compressedGeometry, byReference) ;
// This constructor is designed to accept byte arrays that may contain
// possibly many large compressed geometry blocks interspersed with
// non-J3D-specific metadata. Only one of these blocks is used per
// CompressedGeometry object, so set the geometry offset to zero in
// the header if the data itself is copied.
if (!byReference)
cgHeader.start = 0 ;
}
/**
* This constructor is not implemented.
*
* @exception UnsupportedOperationException this constructor is not
* implemented
*
* @since Java 3D 1.3
*/
public CompressedGeometry(CompressedGeometryHeader hdr,
J3DBuffer compressedGeometry) {
throw new UnsupportedOperationException(J3dI18N.getString("CompressedGeometry9")) ;
}
/**
* Returns the size, in bytes, of the compressed geometry buffer.
* The size of the compressed geometry header is not included.
*
* @return the size, in bytes, of the compressed geometry buffer.
*
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public int getByteCount() {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_COUNT_READ))
throw new CapabilityNotSetException
(J3dI18N.getString("CompressedGeometry1")) ;
return cgHeader.size ;
}
/**
* Copies the compressed geometry header from the CompressedGeometry
* NodeComponent into the passed in parameter.
*
* @param hdr the CompressedGeometryHeader object into which to copy the
* CompressedGeometry NodeComponent's header; the offset field may differ
* from that which was originally specified if a copy of the original
* compressed geometry byte array was created.
*
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @see CompressedGeometryHeader
*/
public void getCompressedGeometryHeader(CompressedGeometryHeader hdr) {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_HEADER_READ))
throw new CapabilityNotSetException
(J3dI18N.getString("CompressedGeometry2")) ;
cgHeader.copy(hdr) ;
}
/**
* Retrieves the compressed geometry associated with the
* CompressedGeometry NodeComponent object. Copies the compressed
* geometry from the CompressedGeometry node into the given array.
* The array must be large enough to hold all of the bytes.
* The individual array elements must be allocated by the caller.
*
* @param compressedGeometry the array into which to copy the compressed
* geometry.
*
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @exception IllegalStateException if the data access mode for this
* object is by-reference.
*
* @exception ArrayIndexOutOfBoundsException if compressedGeometry byte
* array is not large enough to receive the compressed geometry
*/
public void getCompressedGeometry(byte[] compressedGeometry) {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_GEOMETRY_READ))
throw new CapabilityNotSetException
(J3dI18N.getString("CompressedGeometry3")) ;
if (isByReference())
throw new IllegalStateException
(J3dI18N.getString("CompressedGeometry7")) ;
if (cgHeader.size > compressedGeometry.length)
throw new ArrayIndexOutOfBoundsException
(J3dI18N.getString("CompressedGeometry4")) ;
((CompressedGeometryRetained)this.retained).copy(compressedGeometry) ;
}
/**
* Decompresses the compressed geometry. Returns an array of Shape nodes
* containing the decompressed geometry objects, or null if the version
* number of the compressed geometry is incompatible with the decompressor
* in the current version of Java 3D.
*
* @return an array of Shape nodes containing the
* geometry decompressed from this CompressedGeometry NodeComponent
* object, or null if its version is incompatible
*
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*/
public Shape3D[] decompress() {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_GEOMETRY_READ))
throw new CapabilityNotSetException
(J3dI18N.getString("CompressedGeometry5")) ;
CompressedGeometryRetained cgr =
(CompressedGeometryRetained)this.retained ;
GeometryDecompressorShape3D decompressor =
new GeometryDecompressorShape3D() ;
// Decompress the geometry as TriangleStripArrays. A combination of
// TriangleStripArrays and TrianglesFanArrays is more compact but
// requires twice as many Shape3D objects, resulting in slower
// rendering performance.
//
// Using TriangleArray output is currently the fastest, given the
// strip sizes observed from various compressed geometry objects, but
// produces about twice as many vertices. TriangleStripArray produces
// the same number of Shape3D objects as TriangleArray using 1/2
// to 2/3 of the vertices, with only a marginal performance penalty.
//
return decompressor.toTriangleStripArrays(cgr) ;
}
/**
* Retrieves the data access mode for this CompressedGeometry object.
*
* @return <code>true</code> if the data access mode for this
* CompressedGeometry object is by-reference;
* <code>false</code> if the data access mode is by-copying.
*
* @since Java 3D 1.2
*/
public boolean isByReference() {
return ((CompressedGeometryRetained)this.retained).isByReference() ;
}
/**
* Gets the compressed geometry data reference.
*
* @return the current compressed geometry data reference.
*
* @exception IllegalStateException if the data access mode for this
* object is not by-reference.
*
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @since Java 3D 1.2
*/
public byte[] getCompressedGeometryRef() {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_REF_DATA_READ))
throw new CapabilityNotSetException
(J3dI18N.getString("CompressedGeometry6")) ;
if (!isByReference())
throw new IllegalStateException
(J3dI18N.getString("CompressedGeometry8")) ;
return ((CompressedGeometryRetained)this.retained).getReference() ;
}
/**
* Gets the compressed geometry data buffer reference, which is
* always null since NIO buffers are not supported for
* CompressedGeometry objects.
*
* @return null
*
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
*
* @since Java 3D 1.3
*/
public J3DBuffer getCompressedGeometryBuffer() {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_REF_DATA_READ))
throw new CapabilityNotSetException
(J3dI18N.getString("CompressedGeometry6")) ;
return null;
}
/**
* Creates the retained mode CompressedGeometryRetained object that this
* CompressedGeometry object will point to.
*/
@Override
void createRetained() {
this.retained = new CompressedGeometryRetained() ;
this.retained.setSource(this) ;
}
/**
* @deprecated replaced with cloneNodeComponent(boolean forceDuplicate)
*/
@Override
public NodeComponent cloneNodeComponent() {
CompressedGeometry cg = new CompressedGeometry() ;
// Duplicate data specific to this class.
cg.cgHeader = new CompressedGeometryHeader() ;
cgHeader.copy(cg.cgHeader) ;
// Duplicate the retained side.
CompressedGeometryRetained cgr = (CompressedGeometryRetained)retained ;
cgr.duplicate((CompressedGeometryRetained)cg.retained) ;
// Duplicate superclass data and return.
cg.duplicateNodeComponent(this) ;
return cg ;
}
}
| gpl-2.0 |
aklepner/kearnynj | sites/default/files/js/js_aczm2rRgH_slWBPnvD3KMrK7rwa1i99HOq8IUAb99Co.js | 20566 |
/**
* jQuery Once Plugin v1.2
* http://plugins.jquery.com/project/once
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
(function ($) {
var cache = {}, uuid = 0;
/**
* Filters elements by whether they have not yet been processed.
*
* @param id
* (Optional) If this is a string, then it will be used as the CSS class
* name that is applied to the elements for determining whether it has
* already been processed. The elements will get a class in the form of
* "id-processed".
*
* If the id parameter is a function, it will be passed off to the fn
* parameter and the id will become a unique identifier, represented as a
* number.
*
* When the id is neither a string or a function, it becomes a unique
* identifier, depicted as a number. The element's class will then be
* represented in the form of "jquery-once-#-processed".
*
* Take note that the id must be valid for usage as an element's class name.
* @param fn
* (Optional) If given, this function will be called for each element that
* has not yet been processed. The function's return value follows the same
* logic as $.each(). Returning true will continue to the next matched
* element in the set, while returning false will entirely break the
* iteration.
*/
$.fn.once = function (id, fn) {
if (typeof id != 'string') {
// Generate a numeric ID if the id passed can't be used as a CSS class.
if (!(id in cache)) {
cache[id] = ++uuid;
}
// When the fn parameter is not passed, we interpret it from the id.
if (!fn) {
fn = id;
}
id = 'jquery-once-' + cache[id];
}
// Remove elements from the set that have already been processed.
var name = id + '-processed';
var elements = this.not('.' + name).addClass(name);
return $.isFunction(fn) ? elements.each(fn) : elements;
};
/**
* Filters elements that have been processed once already.
*
* @param id
* A required string representing the name of the class which should be used
* when filtering the elements. This only filters elements that have already
* been processed by the once function. The id should be the same id that
* was originally passed to the once() function.
* @param fn
* (Optional) If given, this function will be called for each element that
* has not yet been processed. The function's return value follows the same
* logic as $.each(). Returning true will continue to the next matched
* element in the set, while returning false will entirely break the
* iteration.
*/
$.fn.removeOnce = function (id, fn) {
var name = id + '-processed';
var elements = this.filter('.' + name).removeClass(name);
return $.isFunction(fn) ? elements.each(fn) : elements;
};
})(jQuery);
;
var Drupal = Drupal || { 'settings': {}, 'behaviors': {}, 'locale': {} };
// Allow other JavaScript libraries to use $.
jQuery.noConflict();
(function ($) {
/**
* Override jQuery.fn.init to guard against XSS attacks.
*
* See http://bugs.jquery.com/ticket/9521
*/
var jquery_init = $.fn.init;
$.fn.init = function (selector, context, rootjQuery) {
// If the string contains a "#" before a "<", treat it as invalid HTML.
if (selector && typeof selector === 'string') {
var hash_position = selector.indexOf('#');
if (hash_position >= 0) {
var bracket_position = selector.indexOf('<');
if (bracket_position > hash_position) {
throw 'Syntax error, unrecognized expression: ' + selector;
}
}
}
return jquery_init.call(this, selector, context, rootjQuery);
};
$.fn.init.prototype = jquery_init.prototype;
/**
* Attach all registered behaviors to a page element.
*
* Behaviors are event-triggered actions that attach to page elements, enhancing
* default non-JavaScript UIs. Behaviors are registered in the Drupal.behaviors
* object using the method 'attach' and optionally also 'detach' as follows:
* @code
* Drupal.behaviors.behaviorName = {
* attach: function (context, settings) {
* ...
* },
* detach: function (context, settings, trigger) {
* ...
* }
* };
* @endcode
*
* Drupal.attachBehaviors is added below to the jQuery ready event and so
* runs on initial page load. Developers implementing AHAH/Ajax in their
* solutions should also call this function after new page content has been
* loaded, feeding in an element to be processed, in order to attach all
* behaviors to the new content.
*
* Behaviors should use
* @code
* $(selector).once('behavior-name', function () {
* ...
* });
* @endcode
* to ensure the behavior is attached only once to a given element. (Doing so
* enables the reprocessing of given elements, which may be needed on occasion
* despite the ability to limit behavior attachment to a particular element.)
*
* @param context
* An element to attach behaviors to. If none is given, the document element
* is used.
* @param settings
* An object containing settings for the current context. If none given, the
* global Drupal.settings object is used.
*/
Drupal.attachBehaviors = function (context, settings) {
context = context || document;
settings = settings || Drupal.settings;
// Execute all of them.
$.each(Drupal.behaviors, function () {
if ($.isFunction(this.attach)) {
this.attach(context, settings);
}
});
};
/**
* Detach registered behaviors from a page element.
*
* Developers implementing AHAH/Ajax in their solutions should call this
* function before page content is about to be removed, feeding in an element
* to be processed, in order to allow special behaviors to detach from the
* content.
*
* Such implementations should look for the class name that was added in their
* corresponding Drupal.behaviors.behaviorName.attach implementation, i.e.
* behaviorName-processed, to ensure the behavior is detached only from
* previously processed elements.
*
* @param context
* An element to detach behaviors from. If none is given, the document element
* is used.
* @param settings
* An object containing settings for the current context. If none given, the
* global Drupal.settings object is used.
* @param trigger
* A string containing what's causing the behaviors to be detached. The
* possible triggers are:
* - unload: (default) The context element is being removed from the DOM.
* - move: The element is about to be moved within the DOM (for example,
* during a tabledrag row swap). After the move is completed,
* Drupal.attachBehaviors() is called, so that the behavior can undo
* whatever it did in response to the move. Many behaviors won't need to
* do anything simply in response to the element being moved, but because
* IFRAME elements reload their "src" when being moved within the DOM,
* behaviors bound to IFRAME elements (like WYSIWYG editors) may need to
* take some action.
* - serialize: When an Ajax form is submitted, this is called with the
* form as the context. This provides every behavior within the form an
* opportunity to ensure that the field elements have correct content
* in them before the form is serialized. The canonical use-case is so
* that WYSIWYG editors can update the hidden textarea to which they are
* bound.
*
* @see Drupal.attachBehaviors
*/
Drupal.detachBehaviors = function (context, settings, trigger) {
context = context || document;
settings = settings || Drupal.settings;
trigger = trigger || 'unload';
// Execute all of them.
$.each(Drupal.behaviors, function () {
if ($.isFunction(this.detach)) {
this.detach(context, settings, trigger);
}
});
};
/**
* Encode special characters in a plain-text string for display as HTML.
*
* @ingroup sanitization
*/
Drupal.checkPlain = function (str) {
var character, regex,
replace = { '&': '&', '"': '"', '<': '<', '>': '>' };
str = String(str);
for (character in replace) {
if (replace.hasOwnProperty(character)) {
regex = new RegExp(character, 'g');
str = str.replace(regex, replace[character]);
}
}
return str;
};
/**
* Replace placeholders with sanitized values in a string.
*
* @param str
* A string with placeholders.
* @param args
* An object of replacements pairs to make. Incidences of any key in this
* array are replaced with the corresponding value. Based on the first
* character of the key, the value is escaped and/or themed:
* - !variable: inserted as is
* - @variable: escape plain text to HTML (Drupal.checkPlain)
* - %variable: escape text and theme as a placeholder for user-submitted
* content (checkPlain + Drupal.theme('placeholder'))
*
* @see Drupal.t()
* @ingroup sanitization
*/
Drupal.formatString = function(str, args) {
// Transform arguments before inserting them.
for (var key in args) {
switch (key.charAt(0)) {
// Escaped only.
case '@':
args[key] = Drupal.checkPlain(args[key]);
break;
// Pass-through.
case '!':
break;
// Escaped and placeholder.
case '%':
default:
args[key] = Drupal.theme('placeholder', args[key]);
break;
}
str = str.replace(key, args[key]);
}
return str;
};
/**
* Translate strings to the page language or a given language.
*
* See the documentation of the server-side t() function for further details.
*
* @param str
* A string containing the English string to translate.
* @param args
* An object of replacements pairs to make after translation. Incidences
* of any key in this array are replaced with the corresponding value.
* See Drupal.formatString().
*
* @param options
* - 'context' (defaults to the empty context): The context the source string
* belongs to.
*
* @return
* The translated string.
*/
Drupal.t = function (str, args, options) {
options = options || {};
options.context = options.context || '';
// Fetch the localized version of the string.
if (Drupal.locale.strings && Drupal.locale.strings[options.context] && Drupal.locale.strings[options.context][str]) {
str = Drupal.locale.strings[options.context][str];
}
if (args) {
str = Drupal.formatString(str, args);
}
return str;
};
/**
* Format a string containing a count of items.
*
* This function ensures that the string is pluralized correctly. Since Drupal.t() is
* called by this function, make sure not to pass already-localized strings to it.
*
* See the documentation of the server-side format_plural() function for further details.
*
* @param count
* The item count to display.
* @param singular
* The string for the singular case. Please make sure it is clear this is
* singular, to ease translation (e.g. use "1 new comment" instead of "1 new").
* Do not use @count in the singular string.
* @param plural
* The string for the plural case. Please make sure it is clear this is plural,
* to ease translation. Use @count in place of the item count, as in "@count
* new comments".
* @param args
* An object of replacements pairs to make after translation. Incidences
* of any key in this array are replaced with the corresponding value.
* See Drupal.formatString().
* Note that you do not need to include @count in this array.
* This replacement is done automatically for the plural case.
* @param options
* The options to pass to the Drupal.t() function.
* @return
* A translated string.
*/
Drupal.formatPlural = function (count, singular, plural, args, options) {
var args = args || {};
args['@count'] = count;
// Determine the index of the plural form.
var index = Drupal.locale.pluralFormula ? Drupal.locale.pluralFormula(args['@count']) : ((args['@count'] == 1) ? 0 : 1);
if (index == 0) {
return Drupal.t(singular, args, options);
}
else if (index == 1) {
return Drupal.t(plural, args, options);
}
else {
args['@count[' + index + ']'] = args['@count'];
delete args['@count'];
return Drupal.t(plural.replace('@count', '@count[' + index + ']'), args, options);
}
};
/**
* Returns the passed in URL as an absolute URL.
*
* @param url
* The URL string to be normalized to an absolute URL.
*
* @return
* The normalized, absolute URL.
*
* @see https://github.com/angular/angular.js/blob/v1.4.4/src/ng/urlUtils.js
* @see https://grack.com/blog/2009/11/17/absolutizing-url-in-javascript
* @see https://github.com/jquery/jquery-ui/blob/1.11.4/ui/tabs.js#L53
*/
Drupal.absoluteUrl = function (url) {
var urlParsingNode = document.createElement('a');
// Decode the URL first; this is required by IE <= 6. Decoding non-UTF-8
// strings may throw an exception.
try {
url = decodeURIComponent(url);
} catch (e) {}
urlParsingNode.setAttribute('href', url);
// IE <= 7 normalizes the URL when assigned to the anchor node similar to
// the other browsers.
return urlParsingNode.cloneNode(false).href;
};
/**
* Returns true if the URL is within Drupal's base path.
*
* @param url
* The URL string to be tested.
*
* @return
* Boolean true if local.
*
* @see https://github.com/jquery/jquery-ui/blob/1.11.4/ui/tabs.js#L58
*/
Drupal.urlIsLocal = function (url) {
// Always use browser-derived absolute URLs in the comparison, to avoid
// attempts to break out of the base path using directory traversal.
var absoluteUrl = Drupal.absoluteUrl(url);
var protocol = location.protocol;
// Consider URLs that match this site's base URL but use HTTPS instead of HTTP
// as local as well.
if (protocol === 'http:' && absoluteUrl.indexOf('https:') === 0) {
protocol = 'https:';
}
var baseUrl = protocol + '//' + location.host + Drupal.settings.basePath.slice(0, -1);
// Decoding non-UTF-8 strings may throw an exception.
try {
absoluteUrl = decodeURIComponent(absoluteUrl);
} catch (e) {}
try {
baseUrl = decodeURIComponent(baseUrl);
} catch (e) {}
// The given URL matches the site's base URL, or has a path under the site's
// base URL.
return absoluteUrl === baseUrl || absoluteUrl.indexOf(baseUrl + '/') === 0;
};
/**
* Generate the themed representation of a Drupal object.
*
* All requests for themed output must go through this function. It examines
* the request and routes it to the appropriate theme function. If the current
* theme does not provide an override function, the generic theme function is
* called.
*
* For example, to retrieve the HTML for text that should be emphasized and
* displayed as a placeholder inside a sentence, call
* Drupal.theme('placeholder', text).
*
* @param func
* The name of the theme function to call.
* @param ...
* Additional arguments to pass along to the theme function.
* @return
* Any data the theme function returns. This could be a plain HTML string,
* but also a complex object.
*/
Drupal.theme = function (func) {
var args = Array.prototype.slice.apply(arguments, [1]);
return (Drupal.theme[func] || Drupal.theme.prototype[func]).apply(this, args);
};
/**
* Freeze the current body height (as minimum height). Used to prevent
* unnecessary upwards scrolling when doing DOM manipulations.
*/
Drupal.freezeHeight = function () {
Drupal.unfreezeHeight();
$('<div id="freeze-height"></div>').css({
position: 'absolute',
top: '0px',
left: '0px',
width: '1px',
height: $('body').css('height')
}).appendTo('body');
};
/**
* Unfreeze the body height.
*/
Drupal.unfreezeHeight = function () {
$('#freeze-height').remove();
};
/**
* Encodes a Drupal path for use in a URL.
*
* For aesthetic reasons slashes are not escaped.
*/
Drupal.encodePath = function (item, uri) {
uri = uri || location.href;
return encodeURIComponent(item).replace(/%2F/g, '/');
};
/**
* Get the text selection in a textarea.
*/
Drupal.getSelection = function (element) {
if (typeof element.selectionStart != 'number' && document.selection) {
// The current selection.
var range1 = document.selection.createRange();
var range2 = range1.duplicate();
// Select all text.
range2.moveToElementText(element);
// Now move 'dummy' end point to end point of original range.
range2.setEndPoint('EndToEnd', range1);
// Now we can calculate start and end points.
var start = range2.text.length - range1.text.length;
var end = start + range1.text.length;
return { 'start': start, 'end': end };
}
return { 'start': element.selectionStart, 'end': element.selectionEnd };
};
/**
* Add a global variable which determines if the window is being unloaded.
*
* This is primarily used by Drupal.displayAjaxError().
*/
Drupal.beforeUnloadCalled = false;
$(window).bind('beforeunload pagehide', function () {
Drupal.beforeUnloadCalled = true;
});
/**
* Displays a JavaScript error from an Ajax response when appropriate to do so.
*/
Drupal.displayAjaxError = function (message) {
// Skip displaying the message if the user deliberately aborted (for example,
// by reloading the page or navigating to a different page) while the Ajax
// request was still ongoing. See, for example, the discussion at
// http://stackoverflow.com/questions/699941/handle-ajax-error-when-a-user-clicks-refresh.
if (!Drupal.beforeUnloadCalled) {
alert(message);
}
};
/**
* Build an error message from an Ajax response.
*/
Drupal.ajaxError = function (xmlhttp, uri, customMessage) {
var statusCode, statusText, pathText, responseText, readyStateText, message;
if (xmlhttp.status) {
statusCode = "\n" + Drupal.t("An AJAX HTTP error occurred.") + "\n" + Drupal.t("HTTP Result Code: !status", {'!status': xmlhttp.status});
}
else {
statusCode = "\n" + Drupal.t("An AJAX HTTP request terminated abnormally.");
}
statusCode += "\n" + Drupal.t("Debugging information follows.");
pathText = "\n" + Drupal.t("Path: !uri", {'!uri': uri} );
statusText = '';
// In some cases, when statusCode == 0, xmlhttp.statusText may not be defined.
// Unfortunately, testing for it with typeof, etc, doesn't seem to catch that
// and the test causes an exception. So we need to catch the exception here.
try {
statusText = "\n" + Drupal.t("StatusText: !statusText", {'!statusText': $.trim(xmlhttp.statusText)});
}
catch (e) {}
responseText = '';
// Again, we don't have a way to know for sure whether accessing
// xmlhttp.responseText is going to throw an exception. So we'll catch it.
try {
responseText = "\n" + Drupal.t("ResponseText: !responseText", {'!responseText': $.trim(xmlhttp.responseText) } );
} catch (e) {}
// Make the responseText more readable by stripping HTML tags and newlines.
responseText = responseText.replace(/<("[^"]*"|'[^']*'|[^'">])*>/gi,"");
responseText = responseText.replace(/[\n]+\s+/g,"\n");
// We don't need readyState except for status == 0.
readyStateText = xmlhttp.status == 0 ? ("\n" + Drupal.t("ReadyState: !readyState", {'!readyState': xmlhttp.readyState})) : "";
// Additional message beyond what the xmlhttp object provides.
customMessage = customMessage ? ("\n" + Drupal.t("CustomMessage: !customMessage", {'!customMessage': customMessage})) : "";
message = statusCode + pathText + statusText + customMessage + responseText + readyStateText;
return message;
};
// Class indicating that JS is enabled; used for styling purpose.
$('html').addClass('js');
// 'js enabled' cookie.
document.cookie = 'has_js=1; path=/';
/**
* Additions to jQuery.support.
*/
$(function () {
/**
* Boolean indicating whether or not position:fixed is supported.
*/
if (jQuery.support.positionFixed === undefined) {
var el = $('<div style="position:fixed; top:10px" />').appendTo(document.body);
jQuery.support.positionFixed = el[0].offsetTop === 10;
el.remove();
}
});
//Attach all behaviors.
$(function () {
Drupal.attachBehaviors(document, Drupal.settings);
});
/**
* The default themes.
*/
Drupal.theme.prototype = {
/**
* Formats text for emphasized display in a placeholder inside a sentence.
*
* @param str
* The text to format (plain-text).
* @return
* The formatted text (html).
*/
placeholder: function (str) {
return '<em class="placeholder">' + Drupal.checkPlain(str) + '</em>';
}
};
})(jQuery);
;
| gpl-2.0 |
Qwaz/solved-hacking-problem | GoogleCTF/2020 Quals/threading/prob/simple_lang/PEGTL/src/test/pegtl/file_cstream.cpp | 1031 | // Copyright (c) 2016-2017 Dr. Colin Hirsch and Daniel Frey
// Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/
#include <clocale>
#include <cstdio>
#include "test.hpp"
namespace tao
{
namespace TAOCPP_PEGTL_NAMESPACE
{
struct file_content : seq< TAOCPP_PEGTL_STRING( "dummy content" ), eol, discard >
{
};
struct file_grammar : seq< rep_min_max< 11, 11, file_content >, eof >
{
};
void unit_test()
{
const char* const filename = "src/test/pegtl/file_data.txt";
#if defined( _MSC_VER )
std::FILE* stream;
::fopen_s( &stream, filename, "rb" ); // NOLINT
#else
std::FILE* stream = std::fopen( filename, "rb" ); // NOLINT
#endif
TAOCPP_PEGTL_TEST_ASSERT( stream != nullptr );
TAOCPP_PEGTL_TEST_ASSERT( parse< file_grammar >( cstream_input<>( stream, 16, filename ) ) );
std::fclose( stream );
}
} // namespace TAOCPP_PEGTL_NAMESPACE
} // namespace tao
#include "main.hpp"
| gpl-2.0 |
timeraider4u/mkvtoolnix | src/mkvtoolnix-gui/util/windows_widget.cpp | 1796 | #include "common/common_pch.h"
#include <QDebug>
#include <QFont>
#include <windows.h>
#include "common/qt.h"
#include "mkvtoolnix-gui/app.h"
#include "mkvtoolnix-gui/util/widget.h"
namespace mtx { namespace gui { namespace Util {
QFont
logFontToQFont(LOGFONTW const &logFont) {
QFont font;
font.setFamily(QString::fromWCharArray(logFont.lfFaceName));
font.setItalic(logFont.lfItalic);
font.setUnderline(logFont.lfUnderline);
font.setStrikeOut(logFont.lfStrikeOut);
if (logFont.lfWeight != FW_DONTCARE) {
auto weight = logFont.lfWeight < 400 ? QFont::Light
: logFont.lfWeight < 600 ? QFont::Normal
: logFont.lfWeight < 700 ? QFont::DemiBold
: logFont.lfWeight < 800 ? QFont::Bold
: QFont::Black;
font.setWeight(weight);
}
auto verticalDPI = GetDeviceCaps(GetDC(0), LOGPIXELSY);
font.setPointSizeF(qAbs(logFont.lfHeight) * 72.0 / verticalDPI);
qDebug() << Q("logFontToQFont family %1 weight %2 (%3) height %4 (%5 DPI %6) italic %7 underline %8 strickeout %9")
.arg(font.family()).arg(logFont.lfWeight).arg(font.weight()).arg(logFont.lfHeight).arg(font.pointSizeF()).arg(verticalDPI).arg(font.italic()).arg(font.underline()).arg(font.strikeOut());
return font;
}
QFont
defaultUiFont() {
try {
NONCLIENTMETRICSW nonClientMetrics;
auto size = sizeof(nonClientMetrics);
memset(&nonClientMetrics, 0, size);
nonClientMetrics.cbSize = size;
if (!SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, size, &nonClientMetrics, 0))
throw false;
return logFontToQFont(nonClientMetrics.lfMessageFont);
} catch (bool) {
qDebug() << "Windows default font query failed; returning application font";
}
return App::font();
}
}}}
| gpl-2.0 |
rpereira-dev/VoxelEngine | VoxelEngine/src/com/grillecube/common/world/block/BlockLeaves.java | 956 | /**
** This file is part of the project https://github.com/toss-dev/VoxelEngine
**
** License is available here: https://raw.githubusercontent.com/toss-dev/VoxelEngine/master/LICENSE.md
**
** PEREIRA Romain
** 4-----7
** /| /|
** 0-----3 |
** | 5___|_6
** |/ | /
** 1-----2
*/
package com.grillecube.common.world.block;
public class BlockLeaves extends BlockCube {
public BlockLeaves(int blockID) {
super(blockID);
}
@Override
public String getName() {
return ("Leaves");
}
@Override
public boolean isOpaque() {
return (false);
}
@Override
public boolean hasTransparency() {
return (true);
}
@Override
public boolean isVisible() {
return (true);
}
}
| gpl-2.0 |
DrupalCampColorado/dcco-d8 | drush/drushrc.php | 902 | <?php
/**
* @file
* amazee.io drushrc.php file
*
* This file tells drush about the amazee.io environment
* It contains some defaults that the amazee.io team suggests, please edit them as required.
*/
### Base URL so Drush knows on which URL the site runs (needed for cron, etc.)
if (getenv('AMAZEEIO_BASE_URL')) {
$options['uri'] = getenv('AMAZEEIO_BASE_URL');
}
### Skip data for some tables during sql dumps and syncs
# These tables will be syncronized just as structure and not the data inside them, this makes syncing and dumping much faster
# In case you need these tables, call the 'sql-sync' or 'sql-dump' command with: --no-structure-tables-list
$command_specific['sql-sync'] = array('structure-tables-list' => 'cache,cache_*,history,sessions,watchdog,feeds_log');
$command_specific['sql-dump'] = array('structure-tables-list' => 'cache,cache_*,history,sessions,watchdog,feeds_log');
| gpl-2.0 |
CoinSpace/browsernizr | test/gamepad.js | 974 | var Modernizr = require('./../lib/Modernizr');
var prefixed = require('./../lib/prefixed');
/*!
{
"name": "GamePad API",
"property": "gamepads",
"authors": ["Eric Bidelman"],
"tags": ["media"],
"notes": [{
"name": "W3C spec",
"href": "http://www.w3.org/TR/gamepad/"
},{
"name": "HTML5 Rocks tutorial",
"href": "http://www.html5rocks.com/en/tutorials/doodles/gamepad/#toc-featuredetect"
}],
"warnings": [],
"polyfills": []
}
!*/
/* DOC
Detects support for the Gamepad API, for access to gamepads and controllers.
*/
// FF has Gamepad API support only in special builds, but not in any release (even behind a flag)
// Their current implementation has no way to feature detect, only events to bind to, but a patch
// will bring them up to date with the spec when it lands (and they'll pass this test)
// https://bugzilla.mozilla.org/show_bug.cgi?id=690935
Modernizr.addTest('gamepads', !!prefixed('getGamepads', navigator));
| gpl-2.0 |
omgbebebe/warzone2100 | src/gateway.cpp | 4155 | /*
This file is part of Warzone 2100.
Copyright (C) 1999-2004 Eidos Interactive
Copyright (C) 2005-2017 Warzone 2100 Project
Warzone 2100 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Warzone 2100 is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Warzone 2100; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* Gateway.c
*
* Routing gateway code.
*
*/
#include "lib/framework/frame.h"
#include "map.h"
#include "wrappers.h"
#include "gateway.h"
/// the list of gateways on the current map
static GATEWAY_LIST psGateways;
// Prototypes
static void gwFreeGateway(GATEWAY *psDel);
/******************************************************************************************************/
/* Gateway data access functions */
// get the size of the map
static SDWORD gwMapWidth()
{
return (SDWORD)mapWidth;
}
static SDWORD gwMapHeight()
{
return (SDWORD)mapHeight;
}
// set the gateway flag on a tile
static void gwSetGatewayFlag(SDWORD x, SDWORD y)
{
mapTile((UDWORD)x, (UDWORD)y)->tileInfoBits |= BITS_GATEWAY;
}
// clear the gateway flag on a tile
static void gwClearGatewayFlag(SDWORD x, SDWORD y)
{
mapTile((UDWORD)x, (UDWORD)y)->tileInfoBits &= ~BITS_GATEWAY;
}
/******************************************************************************************************/
/* Gateway functions */
// Initialise the gateway system
bool gwInitialise()
{
psGateways.clear();
return true;
}
// Shutdown the gateway system
void gwShutDown()
{
for (auto psGateway : psGateways)
{
gwFreeGateway(psGateway);
}
psGateways.clear();
}
// Add a gateway to the system
bool gwNewGateway(SDWORD x1, SDWORD y1, SDWORD x2, SDWORD y2)
{
GATEWAY *psNew;
SDWORD pos, temp;
ASSERT_OR_RETURN(false, x1 >= 0 && x1 < gwMapWidth() && y1 >= 0 && y1 < gwMapHeight()
&& x2 >= 0 && x2 < gwMapWidth() && y2 >= 0 && y2 < gwMapHeight()
&& (x1 == x2 || y1 == y2), "Invalid gateway coordinates (%d, %d, %d, %d)",
x1, y1, x2, y2);
psNew = (GATEWAY *)malloc(sizeof(GATEWAY));
// make sure the first coordinate is always the smallest
if (x2 < x1)
{
// y is the same, swap x
temp = x2;
x2 = x1;
x1 = temp;
}
else if (y2 < y1)
{
// x is the same, swap y
temp = y2;
y2 = y1;
y1 = temp;
}
// Initialise the gateway, correct out-of-map gateways
psNew->x1 = MAX(3, x1);
psNew->y1 = MAX(3, y1);
psNew->x2 = MIN(x2, mapWidth - 4);
psNew->y2 = MIN(y2, mapHeight - 4);
// add the gateway to the list
psGateways.push_back(psNew);
// set the map flags
if (psNew->x1 == psNew->x2)
{
// vertical gateway
for (pos = psNew->y1; pos <= psNew->y2; pos++)
{
gwSetGatewayFlag(psNew->x1, pos);
}
}
else
{
// horizontal gateway
for (pos = psNew->x1; pos <= psNew->x2; pos++)
{
gwSetGatewayFlag(pos, psNew->y1);
}
}
return true;
}
// Return the number of gateways.
int gwNumGateways()
{
return psGateways.size();
}
GATEWAY_LIST &gwGetGateways()
{
return psGateways;
}
// Release a gateway
static void gwFreeGateway(GATEWAY *psDel)
{
int pos;
if (psMapTiles) // this lines fixes the bug where we were closing the gateways after freeing the map
{
// clear the map flags
if (psDel->x1 == psDel->x2)
{
// vertical gateway
for (pos = psDel->y1; pos <= psDel->y2; pos++)
{
gwClearGatewayFlag(psDel->x1, pos);
}
}
else
{
// horizontal gateway
for (pos = psDel->x1; pos <= psDel->x2; pos++)
{
gwClearGatewayFlag(pos, psDel->y1);
}
}
}
free(psDel);
}
| gpl-2.0 |
argos-research/speed-dreams | src/modules/simu/simuv4/differential.cpp | 18630 | /***************************************************************************
file : differential.cpp
created : Sun Mar 19 00:06:33 CET 2000
copyright : (C) 2000 by Eric Espie
email : torcs@free.fr
version : $Id: differential.cpp 3945 2011-10-07 13:38:15Z wdbee $
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "sim.h"
void
SimDifferentialConfig(tCar *car, int index)
{
void *hdle = car->params;
const char *type;
const char *section;
switch (index) {
case TRANS_FRONT_DIFF:
section = SECT_FRNTDIFFERENTIAL;
break;
case TRANS_REAR_DIFF:
section = SECT_REARDIFFERENTIAL;
break;
case TRANS_CENTRAL_DIFF:
section = SECT_CENTRALDIFFERENTIAL;
break;
default:
GfLogWarning("No differential indexed %d exists, returning without configuration.", index);
return;
}
tDifferential *differential = &(car->transmission.differential[index]);
tCarSetupItem *setupDRatio = &(car->carElt->setup.differentialRatio[index]);
tCarSetupItem *setupDMinTB = &(car->carElt->setup.differentialMinTqBias[index]);
tCarSetupItem *setupDMaxTB = &(car->carElt->setup.differentialMaxTqBias[index]);
tCarSetupItem *setupDVisc = &(car->carElt->setup.differentialViscosity[index]);
tCarSetupItem *setupDLT = &(car->carElt->setup.differentialLockingTq[index]);
tCarSetupItem *setupDMaxSB = &(car->carElt->setup.differentialMaxSlipBias[index]);
tCarSetupItem *setupDCMaxSB = &(car->carElt->setup.differentialCoastMaxSlipBias[index]);
differential->I = GfParmGetNum(hdle, section, PRM_INERTIA, (char*)NULL, 0.1f);
differential->efficiency = GfParmGetNum(hdle, section, PRM_EFFICIENCY, (char*)NULL, 1.0f);
//differential->bias is unused as of 2015.11.15.
differential->bias = GfParmGetNum(hdle, section, PRM_BIAS, (char*)NULL, 0.1f);
setupDRatio->desired_value = setupDRatio->min = setupDRatio->max = 1.0f;
GfParmGetNumWithLimits(hdle, section, PRM_RATIO, (char*)NULL, &(setupDRatio->desired_value), &(setupDRatio->min), &(setupDRatio->max));
setupDRatio->changed = TRUE;
setupDRatio->stepsize = 0.1f;
setupDMinTB->desired_value = setupDMinTB->min = setupDMinTB->max = 0.05f;
GfParmGetNumWithLimits(hdle, section, PRM_MIN_TQ_BIAS, (char*)NULL, &(setupDMinTB->desired_value), &(setupDMinTB->min), &(setupDMinTB->max));
setupDMinTB->changed = TRUE;
setupDMinTB->stepsize = 0.01f;
setupDMaxTB->desired_value = setupDMaxTB->min = setupDMaxTB->max = 0.80f;
GfParmGetNumWithLimits(hdle, section, PRM_MAX_TQ_BIAS, (char*)NULL, &(setupDMaxTB->desired_value), &(setupDMaxTB->min), &(setupDMaxTB->max));
setupDMaxTB->changed = TRUE;
setupDMaxTB->stepsize = 0.01f;
setupDVisc->desired_value = setupDVisc->min = setupDVisc->max = 2.0f;
GfParmGetNumWithLimits(hdle, section, PRM_VISCOSITY_FACTOR, (char*)NULL, &(setupDVisc->desired_value), &(setupDVisc->min), &(setupDVisc->max));
setupDVisc->changed = TRUE;
setupDVisc->stepsize = 0.1f;
setupDLT->desired_value = setupDLT->min = setupDLT->max = 300.0f;
GfParmGetNumWithLimits(hdle, section, PRM_LOCKING_TQ, (char*)NULL, &(setupDLT->desired_value), &(setupDLT->min), &(setupDLT->max));
setupDLT->changed = TRUE;
setupDLT->stepsize = 10.0f;
setupDMaxSB->desired_value = setupDMaxSB->min = setupDMaxSB->max = 0.75f;
GfParmGetNumWithLimits(hdle, section, PRM_MAX_SLIP_BIAS, (char*)NULL, &(setupDMaxSB->desired_value), &(setupDMaxSB->min), &(setupDMaxSB->max));
setupDMaxSB->changed = TRUE;
setupDMaxSB->stepsize = 0.01f;
setupDCMaxSB->desired_value = setupDCMaxSB->min = setupDCMaxSB->max = setupDMaxSB->desired_value;
GfParmGetNumWithLimits(hdle, section, PRM_COAST_MAX_SLIP_BIAS, (char*)NULL, &(setupDCMaxSB->desired_value), &(setupDCMaxSB->min), &(setupDCMaxSB->max));
setupDCMaxSB->changed = TRUE;
setupDCMaxSB->stepsize = 0.01f;
type = GfParmGetStr(hdle, section, PRM_TYPE, VAL_DIFF_NONE);
if (strcmp(type, VAL_DIFF_LIMITED_SLIP) == 0) {
differential->type = DIFF_LIMITED_SLIP;
} else if (strcmp(type, VAL_DIFF_VISCOUS_COUPLER) == 0) {
differential->type = DIFF_VISCOUS_COUPLER;
} else if (strcmp(type, VAL_DIFF_SPOOL) == 0) {
differential->type = DIFF_SPOOL;
} else if (strcmp(type, VAL_DIFF_FREE) == 0) {
differential->type = DIFF_FREE;
} else if (strcmp(type, VAL_DIFF_15WAY_LSD) == 0) {
differential->type = DIFF_15WAY_LSD;
} else if (strcmp(type, VAL_DIFF_ELECTRONIC_LSD) == 0) {
differential->type = DIFF_ELECTRONIC_LSD;
} else {
differential->type = DIFF_NONE;
}
car->carElt->setup.differentialType[index] = differential->type;
//TODO: get allowed differential types from xml and store them
if (differential->efficiency > 1.0f) {differential->efficiency = 1.0f;}
if (differential->efficiency < 0.0f) {differential->efficiency = 0.0f;}
differential->feedBack.I = differential->I * differential->ratio * differential->ratio +
(differential->inAxis[0]->I + differential->inAxis[1]->I);
}
void
SimDifferentialReConfig(tCar *car, int index)
{/* called by SimTransmissionReConfig() in transmission.cpp */
tDifferential *differential = &(car->transmission.differential[index]);
tCarSetupItem *setupDRatio = &(car->carElt->setup.differentialRatio[index]);
tCarSetupItem *setupDMinTB = &(car->carElt->setup.differentialMinTqBias[index]);
tCarSetupItem *setupDMaxTB = &(car->carElt->setup.differentialMaxTqBias[index]);
tCarSetupItem *setupDVisc = &(car->carElt->setup.differentialViscosity[index]);
tCarSetupItem *setupDLT = &(car->carElt->setup.differentialLockingTq[index]);
tCarSetupItem *setupDMaxSB = &(car->carElt->setup.differentialMaxSlipBias[index]);
tCarSetupItem *setupDCMaxSB = &(car->carElt->setup.differentialCoastMaxSlipBias[index]);
//TODO: check if type is available
differential->type = car->carElt->setup.differentialType[index];
if (setupDRatio->changed) {
differential->ratio = MIN(setupDRatio->max, MAX(setupDRatio->min, setupDRatio->desired_value));
setupDRatio->value = differential->ratio;
setupDRatio->changed = FALSE;
}
if (setupDMinTB->changed) {
differential->dTqMin = MIN(setupDMinTB->max, MAX(setupDMinTB->min, setupDMinTB->desired_value));
setupDMinTB->value = differential->dTqMin;
setupDMinTB->changed = FALSE;
}
if (setupDMaxTB->changed) {
differential->dTqMax = MIN(setupDMaxTB->max, MAX(setupDMaxTB->min, setupDMaxTB->desired_value));
setupDMaxTB->value = differential->dTqMax;
setupDMaxTB->changed = FALSE;
}
if (setupDVisc->changed) {
differential->viscosity = MIN(setupDVisc->max, MAX(setupDVisc->min, setupDVisc->desired_value));
setupDVisc->value = differential->viscosity;
setupDVisc->changed = FALSE;
differential->viscomax = 1 - exp(-differential->viscosity);
}
if (setupDLT->changed) {
differential->lockInputTq = MIN(setupDLT->max, MAX(setupDLT->min, setupDLT->desired_value));
setupDLT->value = differential->lockInputTq;
setupDLT->changed = FALSE;
}
if (setupDMaxSB->changed) {
differential->dSlipMax = MIN(setupDMaxSB->max, MAX(setupDMaxSB->min, setupDMaxSB->desired_value));
setupDMaxSB->value = differential->dSlipMax;
setupDMaxSB->changed = FALSE;
}
if (setupDCMaxSB->changed) {
differential->dCoastSlipMax = MIN(setupDCMaxSB->max, MAX(setupDCMaxSB->min, setupDCMaxSB->desired_value));
setupDCMaxSB->changed = FALSE;
}
if ( (differential->type != DIFF_15WAY_LSD) && (differential->type != DIFF_ELECTRONIC_LSD) ) {
differential->dCoastSlipMax = differential->dSlipMax;
}
setupDCMaxSB->value = differential->dCoastSlipMax;
}
static void
updateSpool(tCar *car, tDifferential *differential, int first)
{
tdble DrTq;
tdble ndot;
tdble spinVel;
tdble BrTq;
tdble engineReaction;
tdble I;
tdble inTq, brkTq;
DrTq = differential->in.Tq * differential->efficiency;
I = differential->outAxis[0]->I + differential->outAxis[1]->I;
inTq = differential->inAxis[0]->Tq + differential->inAxis[1]->Tq;
brkTq = differential->inAxis[0]->brkTq + differential->inAxis[1]->brkTq;
ndot = SimDeltaTime * (DrTq - inTq) / I;
spinVel = differential->inAxis[0]->spinVel + ndot;
BrTq = (tdble) (- SIGN(spinVel) * brkTq);
ndot = SimDeltaTime * BrTq / I;
if (((ndot * spinVel) < 0.0) && (fabs(ndot) > fabs(spinVel))) {
ndot = -spinVel;
}
if ((spinVel == 0.0) && (ndot < 0.0)) ndot = 0;
spinVel += ndot;
if (first) {
engineReaction = SimEngineUpdateRpm(car, spinVel);
if (engineReaction != 0.0) {
spinVel = engineReaction;
}
}
differential->outAxis[0]->spinVel = differential->outAxis[1]->spinVel = spinVel;
differential->outAxis[0]->Tq = (differential->outAxis[0]->spinVel - differential->inAxis[0]->spinVel) / SimDeltaTime * differential->outAxis[0]->I;
differential->outAxis[1]->Tq = (differential->outAxis[1]->spinVel - differential->inAxis[1]->spinVel) / SimDeltaTime * differential->outAxis[1]->I;
}
void
SimDifferentialUpdate(tCar *car, tDifferential *differential, int first)
{
tdble DrTq, DrTq0, DrTq1;
tdble ndot0, ndot1;
tdble spinVel0, spinVel1;
tdble inTq0, inTq1;
tdble spdRatio/*, spdRatioMax*/;
tdble /*deltaSpd,*/ deltaTq;
tdble BrTq;
tdble engineReaction;
tdble meanv;
if (differential->type == DIFF_SPOOL) {
updateSpool(car, differential, first);
return;
}
DrTq = differential->in.Tq * differential->efficiency;
spinVel0 = differential->inAxis[0]->spinVel;
spinVel1 = differential->inAxis[1]->spinVel;
inTq0 = differential->inAxis[0]->Tq;
inTq1 = differential->inAxis[1]->Tq;
spdRatio = fabs(spinVel0 + spinVel1);
if (spdRatio != 0) {
spdRatio = fabs(spinVel0 - spinVel1) / spdRatio;
switch (differential->type) {
case DIFF_FREE:
// I would think that the following is what a FREE
// differential should look like, with both wheels
// independent and linked through a spider gear.
//
// The reaction from each wheel is transmitted back to the
// spider gear. If both wheels react equally, then the
// spider gear does not turn. If one of the wheel is
// immobile, so that DrTq/2=inTq0 for example, then the
// reaction does not act against the drivetrain, but since
// the spider gear can turn freely, it acts on the other wheel.
//
// This system is equivalent to a rotating gear attached
// in between two parallel surfaces, with DrTq being
// equivalent to a force acting in the center of the
// gear. If one surface is fixed, only the other surface
// moves and all the force is 'transferred' to the moving
// surface. Or, the way I like to think of it, the
// immobile surface reacts with an equal and opposite
// force[1] that cancels DrTq/2 exactly and which is
// transmitted directly with the rotating gear to the
// other, free, surface.
//
//
// A lot of explanation for 3 lines of code.. TODO: Check
// what bias would mean in such a system. Would it be
// implemented between the spider and the wheels? Or
// between the spider and the drivetrain? If the latter
// then it meanst the spider would always be turning, even
// under an even load. I think in this case it is safest
// to ignore it completely because it is frequently used
// in cars with just FWD or RWD, and very frequently in
// just the front part of 4WD cars, while the default
// differential bias setting is 0.1...
//
// [1] For an object to remain at rest, all forces acting
// on it must sum to 0.
{
float spiderTq = inTq1 - inTq0;
DrTq0 = DrTq*0.5f + spiderTq;
DrTq1 = DrTq*0.5f - spiderTq;
}
break;
case DIFF_LIMITED_SLIP:
// Limited slip differential with:
// - Gradual frictive locking
// - Open differential behaviour when not locked
//
// The spider gear transfers torque between the two axles
// When DrTq=lockInputTq, then the locking is at 66% (and
// almost 100% at double the torque). When the
// differential is locked, there is a pressure applied due
// to the different amount of spin of each wheel. This
// pressure creates a torque bias at the input, limited by
// dSlipMax.
// So the user should use lockInputTq to regulate how fast
// the differential locks and dSlipMax to regulate how much
// more torque should go to the slower moving wheel.
{
float spiderTq = inTq1 - inTq0;
float propTq = DrTq/differential->lockInputTq;
float rate = 0.0f;
if (propTq > 0.0f) {
rate = 1.0f - exp(-propTq*propTq);
}
float pressure = tanh(rate*(spinVel1-spinVel0));
float bias = differential->dSlipMax * 0.5f* pressure;
float open = 1.0f;// - rate;
DrTq0 = DrTq*(0.5f+bias) + spiderTq*open;
DrTq1 = DrTq*(0.5f-bias) - spiderTq*open;
}
break;
case DIFF_ELECTRONIC_LSD: ;
case DIFF_15WAY_LSD:
//Similar to DIFF_LIMITED_SLIP,
//but has different dSlipMax for power (acceleration)
//and coast (deceleration), instead working as a free
//differential in coast direction.
//Electronic LSD has the same working, but its parameters
//can be changed during driving.
{
float spiderTq = inTq1 - inTq0;
float propTq = DrTq/differential->lockInputTq;
float rate = 0.0f;
rate = 1.0f - exp(-propTq*propTq);
float pressure = tanh(rate*(spinVel1-spinVel0));
float bias = (DrTq >= 0 ? differential->dSlipMax : differential->dCoastSlipMax) * 0.5f* pressure;
float open = 1.0f;// - rate;
DrTq0 = DrTq*(0.5f+bias) + spiderTq*open;
DrTq1 = DrTq*(0.5f-bias) - spiderTq*open;
}
break;
case DIFF_VISCOUS_COUPLER:
if (spinVel0 >= spinVel1) {
DrTq0 = DrTq * differential->dTqMin;
DrTq1 = DrTq * (1 - differential->dTqMin);
} else {
deltaTq = (tdble) (differential->dTqMin + (1.0 - exp(-fabs(differential->viscosity * spinVel0 - spinVel1))) /
differential->viscomax * differential->dTqMax);
DrTq0 = DrTq * deltaTq;
DrTq1 = DrTq * (1 - deltaTq);
}
break;
default: /* NONE ? */
DrTq0 = DrTq1 = 0;
break;
}
} else {
DrTq0 = (tdble) (DrTq / 2.0);
DrTq1 = (tdble) (DrTq / 2.0);
}
ndot0 = SimDeltaTime * (DrTq0 - inTq0) / differential->outAxis[0]->I;
spinVel0 += ndot0;
ndot1 = SimDeltaTime * (DrTq1 - inTq1) / differential->outAxis[1]->I;
spinVel1 += ndot1;
BrTq = (tdble) (- SIGN(spinVel0) * differential->inAxis[0]->brkTq);
ndot0 = SimDeltaTime * BrTq / differential->outAxis[0]->I;
if (((ndot0 * spinVel0) < 0.0) && (fabs(ndot0) > fabs(spinVel0))) {
ndot0 = -spinVel0;
}
if ((spinVel0 == 0.0) && (ndot0 < 0.0)) ndot0 = 0;
spinVel0 += ndot0;
BrTq = (tdble) (- SIGN(spinVel1) * differential->inAxis[1]->brkTq);
ndot1 = SimDeltaTime * BrTq / differential->outAxis[1]->I;
if (((ndot1 * spinVel1) < 0.0) && (fabs(ndot1) > fabs(spinVel1))) {
ndot1 = -spinVel1;
}
if ((spinVel1 == 0.0) && (ndot1 < 0.0)) ndot1 = 0;
spinVel1 += ndot1;
if (first) {
meanv = (tdble) ((spinVel0 + spinVel1) / 2.0);
engineReaction = SimEngineUpdateRpm(car, meanv);
if (meanv != 0.0) {
engineReaction = engineReaction/meanv;
if ((spinVel1*spinVel0)>0) {
if (engineReaction != 0.0) {
spinVel1 *= engineReaction;
spinVel0 *= engineReaction;
}
}
}
}
differential->outAxis[0]->spinVel = spinVel0;
differential->outAxis[1]->spinVel = spinVel1;
differential->outAxis[0]->Tq = (differential->outAxis[0]->spinVel - differential->inAxis[0]->spinVel) / SimDeltaTime * differential->outAxis[0]->I;
differential->outAxis[1]->Tq = (differential->outAxis[1]->spinVel - differential->inAxis[1]->spinVel) / SimDeltaTime * differential->outAxis[1]->I;
}
| gpl-2.0 |
DankilltheShadow/omnetpp | src/base/messages/AirFrame_m.cc | 11486 | //
// Generated file, do not edit! Created by opp_msgc 4.4 from base/messages/AirFrame.msg.
//
// Disable warnings about unused variables, empty switch stmts, etc:
#ifdef _MSC_VER
# pragma warning(disable:4101)
# pragma warning(disable:4065)
#endif
#include <iostream>
#include <sstream>
#include "AirFrame_m.h"
USING_NAMESPACE
// Template rule which fires if a struct or class doesn't have operator<<
template<typename T>
std::ostream& operator<<(std::ostream& out,const T&) {return out;}
// Another default rule (prevents compiler from choosing base class' doPacking())
template<typename T>
void doPacking(cCommBuffer *, T& t) {
throw cRuntimeError("Parsim error: no doPacking() function for type %s or its base class (check .msg and _m.cc/h files!)",opp_typename(typeid(t)));
}
template<typename T>
void doUnpacking(cCommBuffer *, T& t) {
throw cRuntimeError("Parsim error: no doUnpacking() function for type %s or its base class (check .msg and _m.cc/h files!)",opp_typename(typeid(t)));
}
namespace Veins {
Register_Class(AirFrame);
AirFrame::AirFrame(const char *name, int kind) : ::cPacket(name,kind)
{
this->duration_var = 0;
this->state_var = 1;
this->type_var = 0;
this->id_var = 0;
this->protocolId_var = 0;
this->channel_var = 0;
}
AirFrame::AirFrame(const AirFrame& other) : ::cPacket(other)
{
copy(other);
}
AirFrame::~AirFrame()
{
}
AirFrame& AirFrame::operator=(const AirFrame& other)
{
if (this==&other) return *this;
::cPacket::operator=(other);
copy(other);
return *this;
}
void AirFrame::copy(const AirFrame& other)
{
this->signal_var = other.signal_var;
this->duration_var = other.duration_var;
this->state_var = other.state_var;
this->type_var = other.type_var;
this->id_var = other.id_var;
this->protocolId_var = other.protocolId_var;
this->channel_var = other.channel_var;
}
void AirFrame::parsimPack(cCommBuffer *b)
{
::cPacket::parsimPack(b);
doPacking(b,this->signal_var);
doPacking(b,this->duration_var);
doPacking(b,this->state_var);
doPacking(b,this->type_var);
doPacking(b,this->id_var);
doPacking(b,this->protocolId_var);
doPacking(b,this->channel_var);
}
void AirFrame::parsimUnpack(cCommBuffer *b)
{
::cPacket::parsimUnpack(b);
doUnpacking(b,this->signal_var);
doUnpacking(b,this->duration_var);
doUnpacking(b,this->state_var);
doUnpacking(b,this->type_var);
doUnpacking(b,this->id_var);
doUnpacking(b,this->protocolId_var);
doUnpacking(b,this->channel_var);
}
Signal& AirFrame::getSignal()
{
return signal_var;
}
void AirFrame::setSignal(const Signal& signal)
{
this->signal_var = signal;
}
simtime_t AirFrame::getDuration() const
{
return duration_var;
}
void AirFrame::setDuration(simtime_t duration)
{
this->duration_var = duration;
}
int AirFrame::getState() const
{
return state_var;
}
void AirFrame::setState(int state)
{
this->state_var = state;
}
int AirFrame::getType() const
{
return type_var;
}
void AirFrame::setType(int type)
{
this->type_var = type;
}
long AirFrame::getId() const
{
return id_var;
}
void AirFrame::setId(long id)
{
this->id_var = id;
}
int AirFrame::getProtocolId() const
{
return protocolId_var;
}
void AirFrame::setProtocolId(int protocolId)
{
this->protocolId_var = protocolId;
}
int AirFrame::getChannel() const
{
return channel_var;
}
void AirFrame::setChannel(int channel)
{
this->channel_var = channel;
}
class AirFrameDescriptor : public cClassDescriptor
{
public:
AirFrameDescriptor();
virtual ~AirFrameDescriptor();
virtual bool doesSupport(cObject *obj) const;
virtual const char *getProperty(const char *propertyname) const;
virtual int getFieldCount(void *object) const;
virtual const char *getFieldName(void *object, int field) const;
virtual int findField(void *object, const char *fieldName) const;
virtual unsigned int getFieldTypeFlags(void *object, int field) const;
virtual const char *getFieldTypeString(void *object, int field) const;
virtual const char *getFieldProperty(void *object, int field, const char *propertyname) const;
virtual int getArraySize(void *object, int field) const;
virtual std::string getFieldAsString(void *object, int field, int i) const;
virtual bool setFieldAsString(void *object, int field, int i, const char *value) const;
virtual const char *getFieldStructName(void *object, int field) const;
virtual void *getFieldStructPointer(void *object, int field, int i) const;
};
Register_ClassDescriptor(AirFrameDescriptor);
AirFrameDescriptor::AirFrameDescriptor() : cClassDescriptor("Veins::AirFrame", "cPacket")
{
}
AirFrameDescriptor::~AirFrameDescriptor()
{
}
bool AirFrameDescriptor::doesSupport(cObject *obj) const
{
return dynamic_cast<AirFrame *>(obj)!=NULL;
}
const char *AirFrameDescriptor::getProperty(const char *propertyname) const
{
cClassDescriptor *basedesc = getBaseClassDescriptor();
return basedesc ? basedesc->getProperty(propertyname) : NULL;
}
int AirFrameDescriptor::getFieldCount(void *object) const
{
cClassDescriptor *basedesc = getBaseClassDescriptor();
return basedesc ? 7+basedesc->getFieldCount(object) : 7;
}
unsigned int AirFrameDescriptor::getFieldTypeFlags(void *object, int field) const
{
cClassDescriptor *basedesc = getBaseClassDescriptor();
if (basedesc) {
if (field < basedesc->getFieldCount(object))
return basedesc->getFieldTypeFlags(object, field);
field -= basedesc->getFieldCount(object);
}
static unsigned int fieldTypeFlags[] = {
FD_ISCOMPOUND,
FD_ISEDITABLE,
FD_ISEDITABLE,
FD_ISEDITABLE,
FD_ISEDITABLE,
FD_ISEDITABLE,
FD_ISEDITABLE,
};
return (field>=0 && field<7) ? fieldTypeFlags[field] : 0;
}
const char *AirFrameDescriptor::getFieldName(void *object, int field) const
{
cClassDescriptor *basedesc = getBaseClassDescriptor();
if (basedesc) {
if (field < basedesc->getFieldCount(object))
return basedesc->getFieldName(object, field);
field -= basedesc->getFieldCount(object);
}
static const char *fieldNames[] = {
"signal",
"duration",
"state",
"type",
"id",
"protocolId",
"channel",
};
return (field>=0 && field<7) ? fieldNames[field] : NULL;
}
int AirFrameDescriptor::findField(void *object, const char *fieldName) const
{
cClassDescriptor *basedesc = getBaseClassDescriptor();
int base = basedesc ? basedesc->getFieldCount(object) : 0;
if (fieldName[0]=='s' && strcmp(fieldName, "signal")==0) return base+0;
if (fieldName[0]=='d' && strcmp(fieldName, "duration")==0) return base+1;
if (fieldName[0]=='s' && strcmp(fieldName, "state")==0) return base+2;
if (fieldName[0]=='t' && strcmp(fieldName, "type")==0) return base+3;
if (fieldName[0]=='i' && strcmp(fieldName, "id")==0) return base+4;
if (fieldName[0]=='p' && strcmp(fieldName, "protocolId")==0) return base+5;
if (fieldName[0]=='c' && strcmp(fieldName, "channel")==0) return base+6;
return basedesc ? basedesc->findField(object, fieldName) : -1;
}
const char *AirFrameDescriptor::getFieldTypeString(void *object, int field) const
{
cClassDescriptor *basedesc = getBaseClassDescriptor();
if (basedesc) {
if (field < basedesc->getFieldCount(object))
return basedesc->getFieldTypeString(object, field);
field -= basedesc->getFieldCount(object);
}
static const char *fieldTypeStrings[] = {
"Signal",
"simtime_t",
"int",
"int",
"long",
"int",
"int",
};
return (field>=0 && field<7) ? fieldTypeStrings[field] : NULL;
}
const char *AirFrameDescriptor::getFieldProperty(void *object, int field, const char *propertyname) const
{
cClassDescriptor *basedesc = getBaseClassDescriptor();
if (basedesc) {
if (field < basedesc->getFieldCount(object))
return basedesc->getFieldProperty(object, field, propertyname);
field -= basedesc->getFieldCount(object);
}
switch (field) {
default: return NULL;
}
}
int AirFrameDescriptor::getArraySize(void *object, int field) const
{
cClassDescriptor *basedesc = getBaseClassDescriptor();
if (basedesc) {
if (field < basedesc->getFieldCount(object))
return basedesc->getArraySize(object, field);
field -= basedesc->getFieldCount(object);
}
AirFrame *pp = (AirFrame *)object; (void)pp;
switch (field) {
default: return 0;
}
}
std::string AirFrameDescriptor::getFieldAsString(void *object, int field, int i) const
{
cClassDescriptor *basedesc = getBaseClassDescriptor();
if (basedesc) {
if (field < basedesc->getFieldCount(object))
return basedesc->getFieldAsString(object,field,i);
field -= basedesc->getFieldCount(object);
}
AirFrame *pp = (AirFrame *)object; (void)pp;
switch (field) {
case 0: {std::stringstream out; out << pp->getSignal(); return out.str();}
case 1: return double2string(pp->getDuration());
case 2: return long2string(pp->getState());
case 3: return long2string(pp->getType());
case 4: return long2string(pp->getId());
case 5: return long2string(pp->getProtocolId());
case 6: return long2string(pp->getChannel());
default: return "";
}
}
bool AirFrameDescriptor::setFieldAsString(void *object, int field, int i, const char *value) const
{
cClassDescriptor *basedesc = getBaseClassDescriptor();
if (basedesc) {
if (field < basedesc->getFieldCount(object))
return basedesc->setFieldAsString(object,field,i,value);
field -= basedesc->getFieldCount(object);
}
AirFrame *pp = (AirFrame *)object; (void)pp;
switch (field) {
case 1: pp->setDuration(string2double(value)); return true;
case 2: pp->setState(string2long(value)); return true;
case 3: pp->setType(string2long(value)); return true;
case 4: pp->setId(string2long(value)); return true;
case 5: pp->setProtocolId(string2long(value)); return true;
case 6: pp->setChannel(string2long(value)); return true;
default: return false;
}
}
const char *AirFrameDescriptor::getFieldStructName(void *object, int field) const
{
cClassDescriptor *basedesc = getBaseClassDescriptor();
if (basedesc) {
if (field < basedesc->getFieldCount(object))
return basedesc->getFieldStructName(object, field);
field -= basedesc->getFieldCount(object);
}
static const char *fieldStructNames[] = {
"Signal",
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
};
return (field>=0 && field<7) ? fieldStructNames[field] : NULL;
}
void *AirFrameDescriptor::getFieldStructPointer(void *object, int field, int i) const
{
cClassDescriptor *basedesc = getBaseClassDescriptor();
if (basedesc) {
if (field < basedesc->getFieldCount(object))
return basedesc->getFieldStructPointer(object, field, i);
field -= basedesc->getFieldCount(object);
}
AirFrame *pp = (AirFrame *)object; (void)pp;
switch (field) {
case 0: return (void *)(&pp->getSignal()); break;
default: return NULL;
}
}
}; // end namespace Veins
| gpl-2.0 |
Carlosbarrera585c/Laura | model/base/detalleEntradaBaseTableClass.php | 5511 | <?php
use mvc\model\table\tableBaseClass;
/**
* Description of usuarioBaseTableClass
*
* @author Carlos Alberto Barrera Montoya <carlosbarrera585@hotmail.com>
*/
class detalleEntradaBaseTableClass extends tableBaseClass {
private $id;
private $cantidad;
private $valor;
private $fecha_fabricacion;
private $fecha_vencimiento;
private $id_doc;
private $entrada_bodega_id;
private $insumo_id;
const ID = 'id';
const CANTIDAD = 'cantidad';
const CANTIDAD_LENGHT = 20;
const VALOR = 'valor';
const VALOR_LENGHT = 20;
const FECHA_FABRICACION = 'fecha_fabricacion';
const FECHA_VENCIMIENTO = 'fecha_vencimiento';
const ID_DOC = 'id_doc';
const ENTRADA_BODEGA_ID = 'entrada_bodega_id';
const FECHA = 'entrada_bodega_id';
const INSUMO_ID = 'insumo_id';
function getId() {
return $this->id;
}
function getCantidad() {
return $this->cantidad;
}
function getValor() {
return $this->valor;
}
function getFecha_fabricacion() {
return $this->fecha_fabricacion;
}
function getFecha_vencimiento() {
return $this->fecha_vencimiento;
}
function getId_doc() {
return $this->id_doc;
}
function getEntrada_bodega_id() {
return $this->entrada_bodega_id;
}
function getInsumo_id() {
return $this->insumo_id;
}
function setId($id) {
$this->id = $id;
}
function setCantidad($cantidad) {
$this->cantidad = $cantidad;
}
function setValor($valor) {
$this->valor = $valor;
}
function setFecha_fabricacion($fecha_fabricacion) {
$this->fecha_fabricacion = $fecha_fabricacion;
}
function setFecha_vencimiento($fecha_vencimiento) {
$this->fecha_vencimiento = $fecha_vencimiento;
}
function setId_doc($id_doc) {
$this->id_doc = $id_doc;
}
function setEntrada_bodega_id($entrada_bodega_id) {
$this->entrada_bodega_id = $entrada_bodega_id;
}
function setInsumo_id($insumo_id) {
$this->insumo_id = $insumo_id;
}
/**
* Obtiene el nombre de la tabla
* @return string
*/
static public function getNameTable() {
return 'detalle_entrada';
}
/**
* Método para borrar un registro de una tabla X en la base de datos
*
* @param array $ids Array con los campos por posiciones
* asociativas y los valores por valores a tener en cuenta para el borrado.
* Ejemplo $fieldsAndValues['id'] = 1
* @param boolean $deletedLogical [optional] Borrado lógico [por defecto] o
* borrado físico de un registro en una tabla de la base de datos
* @return PDOException|boolean
*/
public static function getNameField($field, $html = false, $table = null) {
return parent::getNameField($field, self::getNameTable(), $html);
}
public static function delete($ids, $deletedLogical = true, $table = null) {
return parent::delete($ids, $deletedLogical, self::getNameTable());
}
/**
* Método para insertar en una tabla usuario
*
* @param array $data Array asociativo donde las claves son los nombres de
* los campos y su valor sería el valor a insertar. Ejemplo:
* $data['nombre'] = 'Erika'; $data['apellido'] = 'Galindo';
* @return PDOException|boolean
*/
public static function insert($data, $table = null) {
return parent::insert(self::getNameTable(), $data);
}
/**
* Método para leer todos los registros de una tabla
*
* @param array $fields Array con los nombres de los campos a solicitar
* @param boolean $deletedLogical [optional] Indicación de borrado lógico
* o borrado físico
* @param array $orderBy [optional] Array con el o los nombres de los campos
* por los cuales se ordenará la consulta
* @param string $order [optional] Forma de ordenar la consulta
* (por defecto NULL), pude ser ASC o DESC
* @param integer $limit [optional] Cantidad de resultados a mostrar
* @param integer $offset [optional] Página solicitadad sobre la cantidad
* de datos a mostrar
* @return mixed una instancia de una clase estandar, la cual tendrá como
* variables publica los nombres de las columnas de la consulta o una
* instancia de \PDOException en caso de fracaso.
*/
public static function getAll($fields, $deletedLogical = null, $orderBy = null, $order = null, $limit = null, $offset = null, $where = null, $table = null) {
return parent::getAll(self::getNameTable(), $fields, $deletedLogical, $orderBy, $order, $limit, $offset, $where);
}
/**
* Método para actualizar un registro en una tabla de una base de datos
*
* @param array $ids Array asociativo con las posiciones por nombres de los
* campos y los valores son quienes serían las llaves a buscar.
* @param array $data Array asociativo con los datos a modificar,
* las posiciones por nombres de las columnas con los valores por los nuevos
* datos a escribir
* @return PDOException|boolean
*/
public static function update($ids, $data, $table = null) {
return parent::update($ids, $data, self::getNameTable());
}
}
| gpl-2.0 |
RealVNC/barry | desktop/src/ContactPhotoWidget.cc | 5539 | ///
/// \file ContactPhotoWidget.cc
/// Bitmap button that shows a Contact::Image photo
///
/*
Copyright (C) 2011-2012, Net Direct Inc. (http://www.netdirect.ca/)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License in the COPYING file at the
root directory of this project for more details.
*/
#include "ContactPhotoWidget.h"
#include "windowids.h"
#include <barry/barry.h>
#include <wx/mstream.h>
#include <iostream>
#include <fstream>
using namespace std;
#define MAX_IMAGE_HEIGHT 60
#define DEFAULT_IMAGE_WIDTH 50
ContactPhotoWidget::ContactPhotoWidget(wxWindow *parent,
wxWindowID id,
Barry::Contact &rec)
: m_rec(rec)
, m_file_filter(_T("Image files (*.bmp;*.jpg;*.png;*.xmp;*.tif)|*.bmp;*.jpg;*.png;*.xmp;*.tif;*.tiff|All files (*.*)|*.*"))
{
// limit size of image to 60 px height
int max_height = MAX_IMAGE_HEIGHT, width = 0;
if( m_rec.Image.size() ) {
width = LoadRecImage(max_height);
}
// anything loaded? if not, load "empty" bitmap
if( !m_bitmap.get() ) {
width = DEFAULT_IMAGE_WIDTH;
max_height = MAX_IMAGE_HEIGHT;
m_bitmap.reset( new wxBitmap(width, max_height) );
DrawNoPhoto(*m_bitmap, width, max_height);
}
// have bitmap, create our bitmap button
Create(parent, id, *m_bitmap, wxDefaultPosition,
wxSize(width, max_height));
}
int ContactPhotoWidget::LoadRecImage(int max_height)
{
// load m_rec.Image into a wxBitmap
wxMemoryInputStream stream(m_rec.Image.data(), m_rec.Image.size());
wxImage jpeg(stream, wxBITMAP_TYPE_JPEG);
float ratio = (float)max_height / jpeg.GetHeight();
int width = jpeg.GetWidth() * ratio;
jpeg.Rescale(width, max_height, wxIMAGE_QUALITY_HIGH);
m_bitmap.reset( new wxBitmap(jpeg) );
return width;
}
void ContactPhotoWidget::PromptAndSave(wxWindow *parent)
{
if( !m_rec.Image.size() ) {
wxMessageBox(_T("There is no photo available to save."),
_T("No Photo"),
wxICON_INFORMATION | wxOK);
return;
}
wxFileDialog dlg(parent, _T("Save Photo as JPEG..."), _T(""), _T(""),
_T("JPEG files (*.jpg)|*.jpg"),
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxFD_PREVIEW);
if( dlg.ShowModal() == wxID_OK ) {
ofstream ofs(dlg.GetPath().utf8_str(), ios::binary);
ofs.write(m_rec.Image.data(), m_rec.Image.size());
}
}
/// Returns true if a new image has been loaded (may want to resize)
bool ContactPhotoWidget::PromptAndLoad(wxWindow *parent)
{
wxFileDialog dlg(parent, _T("Load Photo..."), _T(""), _T(""),
m_file_filter,
wxFD_OPEN | wxFD_PREVIEW);
if( dlg.ShowModal() != wxID_OK )
return false;
// Load image in whatever format it's in
wxImage image;
if( !image.LoadFile(dlg.GetPath()) ) {
wxMessageBox(_T("Unable to load selected photo."),
_T("Photo Load Error"),
wxICON_ERROR | wxOK);
return false;
}
// Save image to memory as a JPEG
wxMemoryOutputStream stream;
if( !image.SaveFile(stream, wxBITMAP_TYPE_JPEG) ) {
wxMessageBox(_T("Unable to convert image to JPEG."),
_T("Photo Convert"),
wxICON_ERROR | wxOK);
return false;
}
// Store into Contact record
const char
*begin = (char*)stream.GetOutputStreamBuffer()->GetBufferStart(),
*end = (char*)stream.GetOutputStreamBuffer()->GetBufferEnd();
int size = end - begin;
m_rec.Image.assign(begin, size);
// Update our button
LoadRecImage(MAX_IMAGE_HEIGHT);
SetBitmapLabel(*m_bitmap);
SetSize(m_bitmap->GetWidth(), m_bitmap->GetHeight());
return true;
}
void ContactPhotoWidget::DeletePhoto()
{
// zap the record
m_rec.Image.clear();
// replace with message
wxSize client = GetClientSize();
int width = client.GetWidth();
int height = client.GetHeight();
m_bitmap.reset( new wxBitmap(width, height) );
DrawNoPhoto(*m_bitmap, width, height);
SetBitmapLabel(*m_bitmap);
}
void ContactPhotoWidget::DrawNoPhoto(wxBitmap &bm, int width, int height)
{
wxMemoryDC dc;
dc.SelectObject(bm);
// resources
wxColour textcolour(0xa9, 0xa5, 0xa2);
wxColour background(0xed, 0xec, 0xeb);
wxPen pen(background);
wxBrush brush(background);
wxString line1(_T("No")), line2(_T("Photo"));
int pointsize =wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)
.GetPointSize();
wxFont font(pointsize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL,
wxFONTWEIGHT_NORMAL);
// trim fontsize so it fits
wxSize line1_extent, line2_extent;
do {
font.SetPointSize(pointsize--);
dc.SetFont(font);
line1_extent = dc.GetTextExtent(line1);
line2_extent = dc.GetTextExtent(line2);
} while( line1_extent.GetWidth() > width ||
line2_extent.GetWidth() > width);
// setup DC
dc.SetPen(pen);
dc.SetBrush(brush);
dc.SetTextForeground(textcolour);
dc.SetTextBackground(background);
// calculate position
int total_height = line1_extent.GetHeight() + line2_extent.GetHeight();
int y1_start = (height - total_height) / 2;
int y2_start = y1_start + line1_extent.GetHeight();
int x1_start = (width - line1_extent.GetWidth()) / 2;
int x2_start = (width - line2_extent.GetWidth()) / 2;
// draw
dc.DrawRectangle(0, 0, width, height);
dc.DrawText(line1, x1_start, y1_start);
dc.DrawText(line2, x2_start, y2_start);
// cleanup
dc.SetPen(wxNullPen);
dc.SetBrush(wxNullBrush);
}
| gpl-2.0 |
Argalep/ServUO | Scripts/Services/Tomb of Kings/ToKTeleporter.cs | 1393 | using Server.Mobiles;
namespace Server.Items
{
public class ToKTeleporter : Item
{
private static readonly Point3D m_Dest = new Point3D(35, 215, -5);
[Constructable]
public ToKTeleporter()
: base(0x1BC3)
{
Name = "Tomb of Kings Antechamber Teleporter";
Visible = false;
Movable = false;
}
public ToKTeleporter(Serial serial)
: base(serial)
{
}
public override bool OnMoveOver(Mobile m)
{
if (m.IsPlayer())
{
BaseCreature.TeleportPets(m, m_Dest, Map.TerMur);
m.MoveToWorld(m_Dest, Map.TerMur);
m.PlaySound(0x1FE);
Effects.SendLocationParticles(m, 0x3728, 10, 10, 0x139F);
m.SendLocalizedMessage(1112182); // You have been returned to the antechamber of the tomb, directly in front of the Serpent's Breath.
return false;
}
return base.OnMoveOver(m);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
} | gpl-2.0 |
TheSanto/C-Codes | c++ PROJECT/add,sub,mult,div.cpp | 497 | #include<stdio.h>
#include<conio.h>
int main()
{
int a,b;
char ch;
printf("do you want to:\n");
printf("add,subtract,multyply or devide?\n");
do{
printf("enter first letter: ");
ch=getchar();
}while(ch!='a'&&ch!='s'&&ch!='m'&&ch!='d');
printf("\n");
printf("enter first number:");
scanf("%d",&a);
printf("enter seceond number:");
scanf("%d",&b);
if(ch=='a')printf("%d",a+b);
if(ch=='s')printf("%d",a-b);
if(ch=='m')printf("%d",a*b);
if(ch=='d')printf("%d",a/b);
return 0;
} | gpl-2.0 |
brusMX/elgg-iis | mod/file/languages/fr.php | 3303 | <?php
return array(
/**
* Menu items and titles
*/
'file' => "Fichiers",
'file:user' => "Fichiers de %s",
'file:friends' => "Fichiers des contacts",
'file:all' => "Tous les fichiers du site",
'file:edit' => "Modifier le fichier",
'file:more' => "Plus de fichiers",
'file:list' => "vue liste",
'file:group' => "Fichiers du groupe",
'file:gallery' => "vue galerie",
'file:gallery_list' => "Vue \"liste\" ou \"galerie\"",
'file:num_files' => "Nombre de fichiers à afficher",
'file:user:gallery'=>'Voir la galerie %s',
'file:upload' => "Envoyer un fichier",
'file:replace' => 'Remplacer le contenu du fichier (ne rien sélectionner pour ne pas changer)',
'file:list:title' => "de %s %s %s",
'file:title:friends' => "des contacts",
'file:add' => 'Envoyer un fichier',
'file:file' => "Fichier",
'file:list:list' => 'Basculer vers la vue en liste',
'file:list:gallery' => 'Basculer vers la vue en galerie',
'file:types' => "Type de fichiers téléchargés",
'file:type:' => 'Fichiers',
'file:type:all' => "Tous les fichiers",
'file:type:video' => "Vidéos",
'file:type:document' => "Documents",
'file:type:audio' => "Audio",
'file:type:image' => "Images",
'file:type:general' => "Autres types de fichiers",
'file:user:type:video' => "Vidéos de %s",
'file:user:type:document' => "Documents de %s",
'file:user:type:audio' => "Enregistrements audio de %s",
'file:user:type:image' => "Images de %s",
'file:user:type:general' => "Autres types de fichiers de %s",
'file:friends:type:video' => "Vidéos des contacts",
'file:friends:type:document' => "Documents des contacts",
'file:friends:type:audio' => "Enregistrements audio des contacts",
'file:friends:type:image' => "Images des contacts",
'file:friends:type:general' => "Autres types de fichiers des contacts",
'file:widget' => "Widget Fichiers",
'file:widget:description' => "Affiche une liste de vos derniers fichiers",
'groups:enablefiles' => 'Activer les fichiers de groupes',
'file:delete:confirm' => "Confirmez-vous vouloir supprimer ce fichier ?",
'file:upload_limit' => 'La taille de fichier maximale autorisée est de %s',
'file:tagcloud' => "Nuage de tags",
'file:display:number' => "Nombre de fichiers à afficher",
'river:create:object:file' => '%s a chargé le fichier %s',
'river:comment:object:file' => '%s a commenté le fichier %s',
'item:object:file' => 'Fichiers',
'file:notify:summary' => 'Nouveau fichier intitulé %s',
'file:notify:subject' => 'Nouveau fichier : %s',
'file:notify:body' =>
'%s à publié un nouveau fichier : %s
%s
Accéder à ce fichier et le commenter :
%s
',
/**
* Status messages
*/
'file:saved' => "Votre fichier a bien été enregistré.",
'file:deleted' => "Votre fichier a bien été supprimé.",
/**
* Error messages
*/
'file:none' => "Aucun fichier pour le moment.",
'file:uploadfailed' => "Désolé, votre fichier n'a pas pu être enregistré.",
'file:downloadfailed' => "Désolé, ce fichier n'est pas disponible en ce moment.",
'file:deletefailed' => "Votre fichier n'a pas pu être supprimé.",
'file:noaccess' => "Vous n'avez pas la permission de modifier ce fichier",
'file:cannotload' => "Une erreur s'est produite lors de l'envoi du fichier",
'file:nofile' => "Vous devez sélectionner un fichier",
);
| gpl-2.0 |
ipf/studip | lib/extern/modules/views/ExternSemBrowse.class.php | 24443 | <?
# Lifter002: TODO
# Lifter007: TODO
# Lifter003: TODO
# Lifter010: TODO
/**
* ExternSemBrowse.class.php
*
*
*
*
* @author Peter Thienel <pthienel@web.de>, Suchi & Berg GmbH <info@data-quest.de>
* @access public
* @modulegroup extern
* @module ExternSemBrowse
* @package studip_extern
*/
// +---------------------------------------------------------------------------+
// This file is part of Stud.IP
// ExternSemBrowse.class.php
//
// Copyright (C) 2003 Peter Thienel <pthienel@web.de>,
// Suchi & Berg GmbH <info@data-quest.de>
// +---------------------------------------------------------------------------+
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or any later version.
// +---------------------------------------------------------------------------+
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// +---------------------------------------------------------------------------+
global $RELATIVE_PATH_CALENDAR;
require_once('lib/classes/SemBrowse.class.php');
require_once('lib/dates.inc.php');
class ExternSemBrowse extends SemBrowse {
var $module;
var $config;
var $sem_types_position;
function ExternSemBrowse (&$module, $start_item_id) {
global $SEM_TYPE,$SEM_CLASS;
// prevent warnings if snapshot of database is empty
ob_start();
$semester = new SemesterData;
$all_semester = $semester->getAllSemesterData();
array_unshift($all_semester,0);
$this->group_by_fields = array( array('name' => _("Semester"), 'group_field' => 'sem_number'),
array('name' => _("Bereich"), 'group_field' => 'bereich'),
array('name' => _("DozentIn"), 'group_field' => 'fullname', 'unique_field' => 'username'),
array('name' => _("Typ"), 'group_field' => 'status'),
array('name' => _("Einrichtung"), 'group_field' => 'Institut', 'unique_field' => 'Institut_id'));
$this->module = $module;
$this->config = $this->module->config;
$this->sem_browse_data["group_by"] = $this->config->getValue("Main", "grouping");
$this->sem_dates = $all_semester;
$this->sem_dates[0] = array("name" => sprintf(_("vor dem %s"),$this->sem_dates[1]['name']));
// reorganize the $SEM_TYPE-array
foreach ($SEM_CLASS as $key_class => $class) {
$i = 0;
foreach ($SEM_TYPE as $key_type => $type) {
if ($type["class"] == $key_class) {
$i++;
$this->sem_types_position[$key_type] = $i;
}
}
}
$switch_time = mktime(0, 0, 0, date("m"),
date("d") + 7 * $this->config->getValue("Main", "semswitch"), date("Y"));
// get current semester
$current_sem = get_sem_num($switch_time) + 1;
switch ($this->config->getValue("Main", "semstart")) {
case "previous" :
if (isset($all_semester[$current_sem - 1]))
$current_sem--;
break;
case "next" :
if (isset($all_semester[$current_sem + 1]))
$current_sem++;
break;
case "current" :
break;
default :
if (isset($all_semester[$this->config->getValue("Main", "semstart")]))
$current_sem = $this->config->getValue("Main", "semstart");
}
$last_sem = $current_sem + $this->config->getValue("Main", "semrange");
if ($last_sem < $current_sem)
$last_sem = $current_sem;
if (!isset($all_semester[$last_sem]))
$last_sem = sizeof($all_semester);
for ($i = $last_sem; $i > $current_sem; $i--)
$this->sem_number[] = $i - 1;
$semclasses = $this->config->getValue("Main", "semclasses");
foreach ($SEM_TYPE as $key => $type) {
if (in_array($type["class"], $semclasses))
$this->sem_browse_data['sem_status'][] = $key;
}
$this->get_sem_range_tree($start_item_id, true);
}
function print_result ($args) {
global $_fullname_sql,$SEM_TYPE,$SEM_CLASS;
if (is_array($this->sem_browse_data['search_result']) && count($this->sem_browse_data['search_result'])) {
// show only selected subject areas
$selected_ranges = $this->config->getValue('SelectSubjectAreas', 'subjectareasselected');
if (!$this->config->getValue('SelectSubjectAreas', 'selectallsubjectareas')
&& count($selected_ranges)) {
if ($this->config->getValue('SelectSubjectAreas', 'reverseselection')) {
$sem_range_query = "AND seminar_sem_tree.sem_tree_id NOT IN ('".implode("','", $selected_ranges)."')";
} else {
$sem_range_query = "AND seminar_sem_tree.sem_tree_id IN ('".implode("','", $selected_ranges)."')";
}
} else {
$sem_range_query = '';
}
// show only selected SemTypes
$selected_semtypes = $this->config->getValue('ReplaceTextSemType', 'visibility');
$sem_types_array = array();
if (count($selected_semtypes)) {
for ($i = 0; $i < count($selected_semtypes); $i++) {
if ($selected_semtypes[$i] == '1') {
$sem_types_array[] = $i + 1;
}
}
$sem_types_query = "AND seminare.status IN ('" . implode("','", $sem_types_array) . "')";
} else {
$sem_types_query = '';
}
if ($this->sem_browse_data['group_by'] == 1){
if (!is_object($this->sem_tree)){
$the_tree = TreeAbstract::GetInstance("StudipSemTree");
} else {
$the_tree =& $this->sem_tree->tree;
}
$the_tree->buildIndex();
}
if (!$this->config->getValue("Main", "allseminars")) {
$sem_inst_query = " AND seminare.Institut_id='{$this->config->range_id}' ";
}
$dbv = new DbView();
if (!$nameformat = $this->config->getValue("Main", "nameformat"))
$nameformat = "no_title_short";
$query = "SELECT seminare.Seminar_id, seminare.status, seminare.Name
, seminare.Institut_id, Institute.Name AS Institut,Institute.Institut_id,
seminar_sem_tree.sem_tree_id AS bereich, "
. $_fullname_sql[$nameformat]
. " AS fullname, auth_user_md5.username,
" . $dbv->sem_number_sql . " AS sem_number, " . $dbv->sem_number_end_sql . " AS sem_number_end, " .
" seminar_user.position AS position " .
" FROM seminare
LEFT JOIN seminar_user ON (seminare.Seminar_id=seminar_user.Seminar_id AND seminar_user.status='dozent')
LEFT JOIN auth_user_md5 USING (user_id)
LEFT JOIN user_info USING (user_id)
LEFT JOIN seminar_sem_tree ON (seminare.Seminar_id = seminar_sem_tree.seminar_id)
LEFT JOIN seminar_inst ON (seminare.Seminar_id = seminar_inst.Seminar_id)
LEFT JOIN Institute ON (seminar_inst.institut_id = Institute.Institut_id)
WHERE seminare.Seminar_id IN('" . join("','", array_keys($this->sem_browse_data['search_result']))
. "')$sem_inst_query $sem_range_query $sem_types_query";
$db = new DB_Seminar($query);
$snap = new DbSnapshot($db);
if (isset($args['group']) && $args['group'] >= 0 && $args['group'] < 5) {
$this->sem_browse_data['group_by'] = $args['group'];
}
$group_field = $this->group_by_fields[$this->sem_browse_data['group_by']]['group_field'];
$data_fields[0] = "Seminar_id";
if ($this->group_by_fields[$this->sem_browse_data['group_by']]['unique_field']){
$data_fields[1] = $this->group_by_fields[$this->sem_browse_data['group_by']]['unique_field'];
}
$group_by_data = $snap->getGroupedResult($group_field, $data_fields);
$sem_data = $snap->getGroupedResult("Seminar_id");
if ($this->sem_browse_data['group_by'] == 0){
$group_by_duration = $snap->getGroupedResult("sem_number_end", array("sem_number","Seminar_id"));
foreach ($group_by_duration as $sem_number_end => $detail){
if ($sem_number_end != -1 && ($detail['sem_number'][$sem_number_end - 1] && count($detail['sem_number']) == 1)){
continue;
} else {
foreach ($detail['Seminar_id'] as $seminar_id => $foo){
$start_sem = key($sem_data[$seminar_id]["sem_number"]);
if ($sem_number_end == -1){
if (is_array($this->sem_number)){
$sem_number_end = $this->sem_number[0];
} else {
$sem_number_end = count($this->sem_dates) - 1;
}
}
for ($i = $start_sem; $i <= $sem_number_end; ++$i){
if ($this->sem_number === false || (is_array($this->sem_number) && in_array($i,$this->sem_number))){
if ($group_by_data[$i] && !$tmp_group_by_data[$i]){
foreach($group_by_data[$i]['Seminar_id'] as $id => $bar){
$tmp_group_by_data[$i]['Seminar_id'][$id] = true;
}
}
$tmp_group_by_data[$i]['Seminar_id'][$seminar_id] = true;
}
}
}
}
}
if (is_array($tmp_group_by_data)){
if ($this->sem_number !== false){
unset($group_by_data);
}
foreach ($tmp_group_by_data as $start_sem => $detail){
$group_by_data[$start_sem] = $detail;
}
}
}
foreach ($group_by_data as $group_field => $sem_ids){
foreach ($sem_ids['Seminar_id'] as $seminar_id => $foo){
$name = strtolower(key($sem_data[$seminar_id]["Name"]));
$name = str_replace("ä","ae",$name);
$name = str_replace("ö","oe",$name);
$name = str_replace("ü","ue",$name);
$group_by_data[$group_field]['Seminar_id'][$seminar_id] = $name;
}
uasort($group_by_data[$group_field]['Seminar_id'], 'strnatcmp');
}
switch ($this->sem_browse_data["group_by"]){
case 0:
krsort($group_by_data, SORT_NUMERIC);
break;
case 1:
uksort($group_by_data, create_function('$a,$b',
'$the_tree = TreeAbstract::GetInstance("StudipSemTree");
return (int)($the_tree->tree_data[$a]["index"] - $the_tree->tree_data[$b]["index"]);
'));
break;
case 3:
if ($order = $this->module->config->getValue("ReplaceTextSemType", "order")) {
foreach ($order as $position) {
if (isset($group_by_data[$position]))
$group_by_data_tmp[$position] = $group_by_data[$position];
}
$group_by_data = $group_by_data_tmp;
unset($group_by_data_tmp);
}
else {
uksort($group_by_data, create_function('$a,$b',
'global $SEM_CLASS,$SEM_TYPE;
return strnatcasecmp($SEM_TYPE[$a]["name"]." (". $SEM_CLASS[$SEM_TYPE[$a]["class"]]["name"].")",
$SEM_TYPE[$b]["name"]." (". $SEM_CLASS[$SEM_TYPE[$b]["class"]]["name"].")");'));
}
break;
default:
uksort($group_by_data, 'strnatcasecmp');
break;
}
$show_time = $this->config->getValue("Main", "time");
$show_lecturer = $this->config->getValue("Main", "lecturer");
if ($show_time && $show_lecturer) {
if (!$td2width = $this->config->getValue("LecturesInnerTable", "td2width"))
$td2width = 50;
$colspan = " colspan=\"2\"";
$td_time = $this->config->getAttributes("LecturesInnerTable", "td2");
$td_time .= " width=\"$td2width%\"";
$td_lecturer = " align=\"" . $this->config->getValue("LecturesInnerTable", "td3_align");
$td_lecturer .= "\" valign=\"" . $this->config->getValue("LecturesInnerTable", "td2_valign");
$td_lecturer .= "\" width=\"" . (100 - $td2width) . "%\"";
}
else {
$colspan = "";
$td_time = $this->config->getAttributes("LecturesInnerTable", "td2") . " width=\"100%\"";
$td_lecturer = " align=\"" . $this->config->getValue("LecturesInnerTable", "td3_align");
$td_lecturer .= "\" valign=\"" . $this->config->getValue("LecturesInnerTable", "td2_valign");
$td_lecturer .= " width=\"100%\"";
}
// erase output buffer with warnings and start unbuffered output
ob_end_clean();
echo "\n<table" . $this->config->getAttributes("TableHeader", "table") . ">\n";
if ($this->config->getValue("Main", "addinfo")) {
echo "\n<tr" . $this->config->getAttributes("InfoCountSem", "tr") . ">";
echo "<td" . $this->config->getAttributes("InfoCountSem", "td") . ">";
echo "<font" . $this->config->getAttributes("InfoCountSem", "font") . "> ";
echo count($sem_data);
echo $this->config->getValue("Main", "textlectures");
echo ", " . $this->config->getValue("Main", "textgrouping");
$group_by_name = $this->config->getValue("Main", "aliasesgrouping");
echo $group_by_name[$this->sem_browse_data['group_by']];
echo "</font></td></tr>";
}
if (count($group_by_data)) {
foreach ($group_by_data as $group_field => $sem_ids) {
echo "\n<tr" . $this->config->getAttributes("Grouping", "tr") . ">";
echo "<td" . $this->config->getAttributes("Grouping", "td") . ">";
echo "<font" . $this->config->getAttributes("Grouping", "font") . ">";
switch ($this->sem_browse_data["group_by"]){
case 0:
echo $this->sem_dates[$group_field]['name'];
break;
case 1:
if ($the_tree->tree_data[$group_field]) {
$range_path_level = $this->config->getValue("Main", "rangepathlevel");
echo htmlReady($the_tree->getShortPath($group_field, NULL, '>', $range_path_level ? $range_path_level - 1 : 0));
} else {
echo $this->config->getValue("Main", "textnogroups");
}
/*
$range_path_new = NULL;
if ($the_tree->tree_data[$group_field]) {
$range_path = explode(" ^ ", $the_tree->getShortPath($group_field, "^"));
$range_path_level = $this->config->getValue("Main", "rangepathlevel");
if ($range_path_level > sizeof($range_path))
$range_path_level = sizeof($range_path);
for ($i = $range_path_level - 1; $i < sizeof($range_path); $i++)
$range_path_new[] = $range_path[$i];
echo htmlReady(implode(" > ", $range_path_new));
}
else
echo $this->config->getValue("Main", "textnogroups");
*/
break;
case 2:
echo htmlReady($group_field);
break;
case 3:
$aliases_sem_type = $this->config->getValue("ReplaceTextSemType",
"class_{$SEM_TYPE[$group_field]['class']}");
if ($aliases_sem_type[$this->sem_types_position[$group_field] - 1])
echo $aliases_sem_type[$this->sem_types_position[$group_field] - 1];
else {
echo htmlReady($SEM_TYPE[$group_field]["name"]
." (". $SEM_CLASS[$SEM_TYPE[$group_field]["class"]]["name"].")");
}
break;
case 4:
echo htmlReady($group_field);
break;
}
echo "</font></td></tr>";
if (is_array($sem_ids['Seminar_id'])) {
$zebra = 0;
while (list($seminar_id,) = each($sem_ids['Seminar_id'])) {
$sem_name = key($sem_data[$seminar_id]["Name"]);
$sem_number_start = key($sem_data[$seminar_id]["sem_number"]);
$sem_number_end = key($sem_data[$seminar_id]["sem_number_end"]);
if ($sem_number_start != $sem_number_end){
$sem_name .= " (" . $this->sem_dates[$sem_number_start]['name'] . " - ";
$sem_name .= (($sem_number_end == -1) ? _("unbegrenzt") : $this->sem_dates[$sem_number_end]['name']) . ")";
}
echo "\n<tr" . $this->config->getAttributes("LecturesInnerTable", "tr").">";
if ($zebra % 2 && $this->config->getValue("LecturesInnerTable", "td_bgcolor2_"))
echo "<td width=\"100%\"".$this->config->getAttributes("LecturesInnerTable", "td", TRUE)."\">\n";
else
echo "<td width=\"100%\"".$this->config->getAttributes("LecturesInnerTable", "td")."\">\n";
$zebra++;
echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo "<tr" . $this->config->getAttributes("LecturesInnerTable", "tr1") . ">";
echo "<td$colspan" . $this->config->getAttributes("LecturesInnerTable", "td1") . ">";
echo "<font" . $this->config->getAttributes("LecturesInnerTable", "font1") . ">";
$sem_link["module"] = "Lecturedetails";
$sem_link["link_args"] = "seminar_id=$seminar_id";
$sem_link["content"] = htmlReady($sem_name);
$this->module->elements["SemLink"]->printout($sem_link);
echo "</font></td></tr>\n";
//create Turnus field
$temp_turnus_string = Seminar::GetInstance($seminar_id)->getDatesExport(array('show_room' => true));
//Shorten, if string too long (add link for details.php)
if (strlen($temp_turnus_string) >70) {
$temp_turnus_string = substr($temp_turnus_string, 0, strpos(substr($temp_turnus_string, 70, strlen($temp_turnus_string)), ',') +71);
$temp_turnus_string .= '...';
}
if ($show_time || $show_lecturer) {
echo "\n<tr" . $this->config->getAttributes('LecturesInnerTable', 'tr2') . '>';
if ($show_time) {
echo "<td$td_time>";
echo '<font' . $this->config->getAttributes('LecturesInnerTable', 'font2') . '>';
echo $temp_turnus_string . "</font></td>\n";
}
if ($show_lecturer) {
echo "<td$td_lecturer>";
echo '<font' . $this->config->getAttributes('LecturesInnerTable', 'font2') . '>(';
$doz_position = array_keys($sem_data[$seminar_id]['position']);
$doz_name = array_keys($sem_data[$seminar_id]['fullname']);
$doz_uname = array_keys($sem_data[$seminar_id]['username']);
if (is_array($doz_name)){
$lecturer_link['module'] = 'Persondetails';
if(count($doz_position) != count($doz_uname)) $doz_position = range(1, count($doz_uname));
array_multisort($doz_position, $doz_name, $doz_uname);
$i = 0;
foreach ($doz_name as $index => $value) {
if ($i == 4) {
echo '...';
break;
}
$lecturer_link['link_args'] = "username={$doz_uname[$index]}&seminar_id=$seminar_id";
$lecturer_link['content'] = htmlReady($value);
$this->module->elements['LecturerLink']->printout($lecturer_link);
if ($i != count($doz_name) - 1) {
echo ', ';
}
++$i;
}
echo ') ';
}
echo '</font></td>';
}
echo '</tr>';
}
echo "</table></td></tr>\n";
}
}
}
}
echo "</table>";
}
}
}
?>
| gpl-2.0 |
AznStyle/to | themes/dotclear-1.2.7.1/l10n/fr-utf8/main.lang.php | 16699 | <?php
# ***** BEGIN LICENSE BLOCK *****
# This file is part of DotClear.
# Copyright (c) 2004 Olivier Meunier and contributors. All rights
# reserved.
#
# DotClear is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# DotClear is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with DotClear; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ***** END LICENSE BLOCK *****
#
# DOT NOT MODIFY THIS FILE !
$GLOBALS['__l10n']['Login'] = 'Identifiant';
$GLOBALS['__l10n']['Password'] = 'Mot de passe';
$GLOBALS['__l10n']['Remember me'] = 'Se souvenir de moi';
$GLOBALS['__l10n']['You must accept cookies in order to use the private area.'] = 'Vous devez accepter les cookies pour utiliser l\'interface d\'administration.';
$GLOBALS['__l10n']['Login failed. Please try again.'] = 'Authentification échouée. Veuillez recommencer.';
$GLOBALS['__l10n']['ok'] = 'ok';
$GLOBALS['__l10n']['yes'] = 'oui';
$GLOBALS['__l10n']['no'] = 'non';
$GLOBALS['__l10n']['help'] = 'aide';
$GLOBALS['__l10n']['Error(s)'] = 'Erreur(s)';
$GLOBALS['__l10n']['Entries'] = 'Billets';
$GLOBALS['__l10n']['Entry'] = 'Billet';
$GLOBALS['__l10n']['Comment'] = 'Commentaire';
$GLOBALS['__l10n']['Comments'] = 'Commentaires';
$GLOBALS['__l10n']['Categories'] = 'Catégories';
$GLOBALS['__l10n']['Editor'] = 'Rédacteur';
$GLOBALS['__l10n']['Editors'] = 'Rédacteurs';
$GLOBALS['__l10n']['Preferences'] = 'Préférences';
$GLOBALS['__l10n']['Tools'] = 'Outils';
$GLOBALS['__l10n']['logout'] = 'déconnexion';
$GLOBALS['__l10n']['Close this window'] = 'Fermer cette fenêtre';
$GLOBALS['__l10n']['New entry'] = 'Nouveau billet';
$GLOBALS['__l10n']['Manage images'] = 'Gestion des images';
$GLOBALS['__l10n']['View blog'] = 'Voir le blog';
$GLOBALS['__l10n']['List of entries'] = 'Liste des billets';
$GLOBALS['__l10n']['%1$d entries match your search of %2$s.'] = '%1$d billets correspondent à votre recherche de %2$s.';
$GLOBALS['__l10n']['%1$d entrie matches your search of %2$s.'] = '%1$d billet correspond à votre recherche de %2$s.';
$GLOBALS['__l10n']['Last %d entries.'] = '%d derniers billets.';
$GLOBALS['__l10n']['Recent entries.'] = 'Billets récents.';
$GLOBALS['__l10n']['Offline entries.'] = 'Billets hors ligne.';
$GLOBALS['__l10n']['Selected entries.'] = 'Billets sélectionnés.';
$GLOBALS['__l10n']['Month'] = 'Mois';
$GLOBALS['__l10n']['Category'] = 'Catégorie';
$GLOBALS['__l10n']['No entry'] = 'Aucun billet';
$GLOBALS['__l10n']['show all'] = 'tout montrer';
$GLOBALS['__l10n']['hide all'] = 'tout cacher';
$GLOBALS['__l10n']['show/hide'] = 'montrer/masquer';
$GLOBALS['__l10n']['select all'] = 'tout sélectionner';
$GLOBALS['__l10n']['invert selection'] = 'inverser la sélection';
$GLOBALS['__l10n']['edit'] = 'modifier';
$GLOBALS['__l10n']['read'] = 'lire';
$GLOBALS['__l10n']['This entry is online'] = 'Ce billet est en ligne';
$GLOBALS['__l10n']['This entry is offline'] = 'Ce billet est hors ligne';
$GLOBALS['__l10n']['This entry is selected'] = 'Ce billet est sélectionné';
$GLOBALS['__l10n']['Online'] = 'En ligne';
$GLOBALS['__l10n']['Offline'] = 'Hors ligne';
$GLOBALS['__l10n']['%d comment'] = '%d commentaire';
$GLOBALS['__l10n']['%d comments'] = '%d commentaires';
$GLOBALS['__l10n']['%d trackback'] = '%d trackback';
$GLOBALS['__l10n']['%d trackbacks'] = '%d trackbacks';
$GLOBALS['__l10n']['set online'] = 'mettre en ligne';
$GLOBALS['__l10n']['set offline'] = 'mettre hors ligne';
$GLOBALS['__l10n']['Action on selected posts'] = 'Action sur les billets sélectionnés';
$GLOBALS['__l10n']['Are you sure you want to delete selected entries?'] = 'Êtes vous certain de vouloir supprimer les billets sélectionnés ?';
$GLOBALS['__l10n']['switch status'] = 'basculer l\'état';
$GLOBALS['__l10n']['change category'] = 'changer la catégorie';
$GLOBALS['__l10n']['change author'] = 'changer le rédacteur';
$GLOBALS['__l10n']['Change category for entries'] = 'Changer la catégorie des billets';
$GLOBALS['__l10n']['Category:'] = 'Catégorie :';
$GLOBALS['__l10n']['Change author for entries'] = 'Changer le rédacteur des billets';
$GLOBALS['__l10n']['Author:'] = 'Rédacteur :';
$GLOBALS['__l10n']['by %s - in %s'] = 'par %s - dans %s';
$GLOBALS['__l10n']['Search'] = 'Rechercher';
$GLOBALS['__l10n']['View all offline entries'] = 'Voir tous les billets hors ligne';
$GLOBALS['__l10n']['View all selected entries'] = 'Voir tous les billets sélectionnés';
$GLOBALS['__l10n']['Bookmarklet'] = 'Bookmarklet';
$GLOBALS['__l10n']['You can drag the following link to your links bar or add it to your bookmarks and when you "Blog this!" it will open up a popup window with information and a link to the site you\'re currently browsing so you can make a quick post about it.'] = 'Vous pouvez glisser le lien suivant dans votre barre de liens ou l\'ajouter à vos favoris. Quand vous cliquerez sur "Blog this!", une fenêtre s\'ouvrira avec les informations et un lien vers le site que vous visitez afin de commencer à écrire un billet à son propos.';
$GLOBALS['__l10n']['Back'] = 'Retour';
$GLOBALS['__l10n']['Back to entry'] = 'Retour au billet';
$GLOBALS['__l10n']['Back to list of entries'] = 'Retour à la liste des billets';
$GLOBALS['__l10n']['XHTML validation'] = 'Validation XHTML';
$GLOBALS['__l10n']['Trackback'] = 'Trackback';
$GLOBALS['__l10n']['Trackbacks'] = 'Trackbacks';
$GLOBALS['__l10n']['View entry'] = 'Voir le billet';
$GLOBALS['__l10n']['You have unsaved changes.'] = 'Vous n\'avez pas enregistré les modifications.';
$GLOBALS['__l10n']['Format'] = 'Format';
$GLOBALS['__l10n']['Status'] = 'État';
$GLOBALS['__l10n']['Closed'] = 'Fermés';
$GLOBALS['__l10n']['Open'] = 'Ouverts';
$GLOBALS['__l10n']['Selection'] = 'Sélection';
$GLOBALS['__l10n']['Add an image'] = 'Insérer une image';
$GLOBALS['__l10n']['Wiki formatting rules'] = 'Règles de formatage Wiki';
$GLOBALS['__l10n']['You can use the following shortcuts to refine your layout.'] = 'Vous pouvez utiliser les raccourcis suivants pour enrichir votre présentation.';
$GLOBALS['__l10n']['You are not allowed to edit a comment'] = 'Vous n\'avez pas le droit de modifier un commentaire';
$GLOBALS['__l10n']['Entry successfully removed'] = 'Billet supprimé avec succès';
$GLOBALS['__l10n']['Permanent link'] = 'Lien permanent';
$GLOBALS['__l10n']['Title'] = 'Titre';
$GLOBALS['__l10n']['URLed title'] = 'URL titre';
$GLOBALS['__l10n']['Use'] = 'Essayer';
$GLOBALS['__l10n']['Abstract'] = 'Chapô';
$GLOBALS['__l10n']['optional'] = 'facultatif';
$GLOBALS['__l10n']['More options'] = 'Plus d\'options';
$GLOBALS['__l10n']['Notepad'] = 'Bloc-notes';
$GLOBALS['__l10n']['Date'] = 'Date';
$GLOBALS['__l10n']['Hour'] = 'Heure';
$GLOBALS['__l10n']['now'] = 'maintenant';
$GLOBALS['__l10n']['preview'] = 'visualiser';
$GLOBALS['__l10n']['save'] = 'enregistrer';
$GLOBALS['__l10n']['convert into XHTML'] = 'transformer en XHTML';
$GLOBALS['__l10n']['delete'] = 'supprimer';
$GLOBALS['__l10n']['Are you sure you want to delete this entry?'] = 'Êtes vous certain de vouloir supprimer ce billet ?';
$GLOBALS['__l10n']['Trackbacks list'] = 'Liste des trackbacks';
$GLOBALS['__l10n']['No trackback'] = 'Aucun trackback';
$GLOBALS['__l10n']['Comments list'] = 'Liste des commentaires';
$GLOBALS['__l10n']['No comment'] = 'Aucun commentaire';
$GLOBALS['__l10n']['Are you sure you want to delete this comment?'] = 'Êtes vous certain de vouloir supprimer ce commentaire ?';
$GLOBALS['__l10n']['From'] = 'De';
$GLOBALS['__l10n']['On %A %e %B %Y, %I:%M %p'] = 'Le %A %e %B %Y à %H:%M';
$GLOBALS['__l10n']['Email'] = 'Email';
$GLOBALS['__l10n']['Site'] = 'Site';
$GLOBALS['__l10n']['Post a comment'] = 'Ajouter un commentaire';
$GLOBALS['__l10n']['Name'] = 'Nom';
$GLOBALS['__l10n']['Notice'] = 'Note';
$GLOBALS['__l10n']['This comment has to be in HTML format'] = 'Commentaire au format HTML uniquement';
$GLOBALS['__l10n']['Comments listed from most recent to oldest'] = 'Liste des commentaires du plus récent au plus ancien';
$GLOBALS['__l10n']['This comment is online'] = 'Ce commentaire est en ligne';
$GLOBALS['__l10n']['This comment is offline'] = 'Ce commentaire est hors ligne';
$GLOBALS['__l10n']['Page(s)'] = 'Page(s)';
$GLOBALS['__l10n']['No comment yet'] = 'Aucun commentaire pour le moment';
$GLOBALS['__l10n']['Edit a comment'] = 'Modifer un commentaire';
$GLOBALS['__l10n']['Action on selected comments'] = 'Action sur les commentaires sélectionnés';
$GLOBALS['__l10n']['Action on selected trackbacks'] = 'Action sur les rétroliens sélectionnés';
$GLOBALS['__l10n']['Are you sure you want to delete selected comments?'] = 'Êtes vous certain de vouloir supprimer les commentaires sélectionnés ?';
$GLOBALS['__l10n']['Are you sure you want to delete selected trackbacks?'] = 'Êtes vous certain de vouloir supprimer les rétroliens sélectionnés ?';
$GLOBALS['__l10n']['next page'] = 'page suiv.';
$GLOBALS['__l10n']['prev. page'] = 'page préc.';
$GLOBALS['__l10n']['Categories list'] = 'Liste des catégories';
$GLOBALS['__l10n']['New category'] = 'Nouvelle catégorie';
$GLOBALS['__l10n']['No category yet'] = 'Aucune catégorie pour le moment';
$GLOBALS['__l10n']['Move %s up'] = 'Déplacer %s vers le haut';
$GLOBALS['__l10n']['Move %s down'] = 'Déplacer %s ver le bas';
$GLOBALS['__l10n']['%d entry'] = '%d billet';
$GLOBALS['__l10n']['%d entries'] = '%d billets';
$GLOBALS['__l10n']['Drag items to change their positions.'] = 'Faites glisser les éléments pour changer leur position.';
$GLOBALS['__l10n']['Are you sure you want to delete this category?'] = 'Êtes vous certain de vouloir supprimer cette catégorie ?';
$GLOBALS['__l10n']['Are you sure you want to delete selected categories?'] = 'Êtes vous certain de vouloir supprimer les catégories sélectionnées ?';
$GLOBALS['__l10n']['Position'] = 'Position';
$GLOBALS['__l10n']['save order'] = 'enregister l\'ordre';
$GLOBALS['__l10n']['Reorder categories'] = 'Réordonner les catégories';
$GLOBALS['__l10n']['Delete selected categories'] = 'Supprimer les catégories sélectionnées';
$GLOBALS['__l10n']['Description'] = 'Description';
$GLOBALS['__l10n']['Category has been created'] = 'Catégorie créée';
$GLOBALS['__l10n']['Category has been updated'] = 'Catégorie mise à jour';
$GLOBALS['__l10n']['Category has been deleted'] = 'Catégorie supprimée';
$GLOBALS['__l10n']['Cannot delete category'] = 'Impossible de supprimer la catégorie';
$GLOBALS['__l10n']['List of editors'] = 'Liste des rédacteurs';
$GLOBALS['__l10n']['New editor'] = 'Nouveau rédacteur';
$GLOBALS['__l10n']['administrator'] = 'administrateur';
$GLOBALS['__l10n']['advanced editor'] = 'rédacteur avancé';
$GLOBALS['__l10n']['editor'] = 'rédacteur';
$GLOBALS['__l10n']['inactive'] = 'inactif';
$GLOBALS['__l10n']['Delete selected editors'] = 'Supprimer les rédacteurs sélectionnés';
$GLOBALS['__l10n']['Are you sure you want to delete this editor?'] = 'Êtes vous certain de vouloir supprimer ce rédacteur ?';
$GLOBALS['__l10n']['Are you sure you want to delete selected editors?'] = 'Êtes vous certain de vouloir supprimer les rédacteurs sélectionnés ?';
$GLOBALS['__l10n']['Editor creation'] = 'Création d\'un rédacteur';
$GLOBALS['__l10n']['Update of editor %s'] = 'Modification du rédacteur %s';
$GLOBALS['__l10n']['Note: Login must be letters or numbers.'] = 'Note : L\'identifiant ne doit contenir que des caractères alphanumériques.';
$GLOBALS['__l10n']['Firstname'] = 'Prénom';
$GLOBALS['__l10n']['Leave empty to keep password intact'] = 'Laissez vide pour garder le mot de passe';
$GLOBALS['__l10n']['Level'] = 'Niveau';
$GLOBALS['__l10n']['You are about to update you own profile. You will be disconnected after changes.'] = 'Vous allez modifier votre profil. Vous serez déconnecté après les changements.';
$GLOBALS['__l10n']['Editor created'] = 'Rédacteur créé';
$GLOBALS['__l10n']['Editor updated'] = 'Rédacteur modifié';
$GLOBALS['__l10n']['Editor deleted'] = 'Rédacteur supprimé';
$GLOBALS['__l10n']['User preferences'] = 'Préférences utilisateurs';
$GLOBALS['__l10n']['Nickname'] = 'Pseudo';
$GLOBALS['__l10n']['Prefered edit format'] = 'Format d\'édition préféré';
$GLOBALS['__l10n']['Default publication status'] = 'Statut de publication par défaut';
$GLOBALS['__l10n']['Prefered category'] = 'Catégorie préférée';
$GLOBALS['__l10n']['Language'] = 'Langue';
$GLOBALS['__l10n']['Entry edit field height'] = 'Hauteur de la zone d\'édition d\'un billet';
$GLOBALS['__l10n']['Number of hours between user\'s local time and the server time'] = 'Nombres d\'heures entre l\'heure de l\'utilisateur et celle du serveur';
$GLOBALS['__l10n']['Server time is %s'] = 'L\'heure du serveur est %s';
$GLOBALS['__l10n']['Entry validation'] = 'Validation du billet';
$GLOBALS['__l10n']['Comment validation'] = 'Validation du commentaire';
$GLOBALS['__l10n']['Cannot connect to server.'] = 'Impossible de se connecter au serveur.';
$GLOBALS['__l10n']['Valid entry'] = 'Billet valide';
$GLOBALS['__l10n']['Valid comment'] = 'Commentaire valide';
$GLOBALS['__l10n']['Invalid entry'] = 'Billet invalide';
$GLOBALS['__l10n']['Invalid comment'] = 'Commentaire invalide';
$GLOBALS['__l10n']['Errors list'] = 'Liste des erreurs';
$GLOBALS['__l10n']['Validation done with %s'] = 'Validation effectuée par le %s';
$GLOBALS['__l10n']['Directory %s is not writable. Check permissions.'] = 'Le répertoire %s n\'est pas accessible en écriture. Vérifiez les permissions.';
$GLOBALS['__l10n']['Directory %s does not exist.'] = 'Le répertoire %s n\'existe pas.';
$GLOBALS['__l10n']['Upload an image'] = 'Transférer une image';
$GLOBALS['__l10n']['Choose a file (max size %s)'] = 'Choisissez un fichier (taille maximum de %s)';
$GLOBALS['__l10n']['send'] = 'envoyer';
$GLOBALS['__l10n']['New directory'] = 'Nouveau répertoire';
$GLOBALS['__l10n']['Your images'] = 'Vos images';
$GLOBALS['__l10n']['Image does not exist'] = 'L\'image n\'existe pas';
$GLOBALS['__l10n']['Unable to delete image'] = 'Impossible de supprimer l\'image';
$GLOBALS['__l10n']['Image deleted'] = 'Image supprimée';
$GLOBALS['__l10n']['Image uploaded'] = 'Image transférée';
$GLOBALS['__l10n']['File size exceeds the authorized limit'] = 'La taille du fichier dépasse la limite autorisée';
$GLOBALS['__l10n']['File was only partially uploaded'] = 'Le fichier n\'a pas été transféré en entier';
$GLOBALS['__l10n']['No file'] = 'Aucun fichier';
$GLOBALS['__l10n']['The file %s is not an image'] = 'Le fichier %s n\'est pas une image';
$GLOBALS['__l10n']['An error occured while uploading the image'] = 'Une erreur s\'est produite lors du transfert de l\'image';
$GLOBALS['__l10n']['Wrong image type'] = 'Type d\'image incorrect';
$GLOBALS['__l10n']['Image is too large'] = 'L\'image est trop grande';
$GLOBALS['__l10n']['No file yet'] = 'Aucun fichier actuellement';
$GLOBALS['__l10n']['No thumbnail'] = 'Pas de miniature';
$GLOBALS['__l10n']['Try to create thumbnail'] = 'Essayer de faire la miniature';
$GLOBALS['__l10n']['Are you sure you want to delete this %s?'] = 'Êtes vous sûr de vouloir supprimer ce %s ?';
$GLOBALS['__l10n']['directory'] = 'répertoire';
$GLOBALS['__l10n']['file'] = 'fichier';
$GLOBALS['__l10n']['link'] = 'lien';
$GLOBALS['__l10n']['Pings'] = 'Pings';
$GLOBALS['__l10n']['Auto discovery of ping URLs'] = 'Découverte automatique des URLs à pinguer';
$GLOBALS['__l10n']['Insert here URLs to ping'] = 'Insérez ici les URLs à pinguer';
$GLOBALS['__l10n']['Summary to send'] = 'Extrait à envoyer';
$GLOBALS['__l10n']['Ping URLs'] = 'Pinguer les URLs';
$GLOBALS['__l10n']['Previous pings sent'] = 'Pings réalisés';
$GLOBALS['__l10n']['No ping yet'] = 'Aucun ping pour le moment';
$GLOBALS['__l10n']['Result'] = 'Résultat';
$GLOBALS['__l10n']['Back to tools'] = 'Retour aux outils';
$GLOBALS['__l10n']['Cannot open file'] = 'Impossible d\'ouvrir le fichier';
$GLOBALS['__l10n']['Plugin not valid'] = 'Plugin invalide';
$GLOBALS['__l10n']['This plugin still exists. Delete it before.'] = 'Le plugin existe déjà. Supprimez le avant.';
$GLOBALS['__l10n']['An error occured while downloading the file.'] = 'Une erreur s\'est produite lors du téléchargement du fichier';
$GLOBALS['__l10n']['An error occured while writing the file.'] = 'Une erreur s\'est produite lors de l\'écriture du fichier.';
?> | gpl-2.0 |
jcpl/jeffcolibrary.org | sites/default/modules/jeffcolibrary_blks/tpl/jcpl-events-today.tpl.php | 3092 | <script type="text/javascript" src="http://www.eventkeeper.com/ekfeed/JCPL_Calendar.js"></script>
<script type="text/javascript">
// new variable to handle long event names
var maxNameLength = 25;
// EventKeeper first returns a javascript variable called fString for FeedString
// which tells us what varibles are returned.
// characters in the string can be:
// D : date
// T : time
// N : name
// 1 : keyword 1
// 2 : keyword 2
// EventKeeper has created an javascript array variable called evtArray
// with fields = evt_date, evt_time, evt_name, evt_ID, evt_Key1 and evtKey2
// for this example we write out the data from this array in a table.
// outer table
document.write("<table align='center' bgcolor='#fcf8f5' cellpadding='0' cellspacing='0' width='100%'>");
document.write("<tr><td>");
// inner table with event data
document.write("<table align='center' cellpadding='0' cellspacing='0' width='100%'>");
// loop through the array, creating a table row for each row in the array.
for (i=0; i<evtArray.length; i++)
{
document.write("<tr valign='top'>");
// for demonstration purposes, we check FeedString.
// Since you know what data you've asked for you can hard code the array.
if (FeedString.indexOf("D") != -1)
document.write("<td width='14%' class='small' style='border-bottom:solid #555b53 1px\;padding:2px'>" + evtArray[i][evt_date] + "</td>");
if (FeedString.indexOf("P") != -1)
document.write("<td width='14%' class='small' style='border-bottom:solid #555b53 1px\;padding:4px'>" + evtArray[i][evt_date] + "</td>");
if (FeedString.indexOf("T") != -1)
document.write("<td width='15%' class='small' style='border-bottom:solid #555b53 1px\;padding:4px'>" + evtArray[i][evt_time] + "</td>");
if ((FeedString.indexOf("N") != -1) || (FeedString.indexOf("C") != -1))
{
{
// handle long event names
var theName = evtArray[i][evt_name];
if (theName.length > maxNameLength)
theName = theName.substring(0,maxNameLength-2) + '...';
// create the hyperlink based on the Event Name and the Event ID
var linkurl = 'http://www.eventkeeper.com/code/events.cfm?curOrg=JCPL';
linkurl += "#" + evtArray[i][evt_id];
var namelink = '<a class="left4a" href="' + linkurl + '" target="_blank" title="';
namelink += evtArray[i][evt_name] + '">' + '<b>' + theName + '</b>' + '</a>';
document.write("<td width='31%' class='small' style='border-bottom:solid #555b53 1px\;padding:4px'>" + namelink + "</td>");
}
}
if (FeedString.indexOf("1") != -1)
document.write("<td width='30%' class='small' style='border-bottom:solid #555b53 1px\;padding:4px'>" + evtArray[i][evt_key1] + "</td>");
if (FeedString.indexOf("2") != -1)
document.write("<td class='small' style='border-bottom:solid #555b53 1px'>" + evtArray[i][evt_key2] + "</td>");
document.write("</tr>");
}
document.write("</table></td></tr>");
document.write("<tr><td bgcolor='#fcf8f5' align='left' style='border-bottom:solid #555b53 1px;padding:2px'><a href='http://www.eventkeeper.com/code/events.cfm?curOrg=JCPL' class='left4a'><b>All Events</b></a></td></tr>");
// close the table tag
document.write("</table>");
</script>
| gpl-2.0 |
gabpaquin/npathway_blog | wp-content/themes/firmasite/members/single/messages/single.php | 3626 | <div id="message-thread" role="main">
<?php do_action( 'bp_before_message_thread_content' ); ?>
<?php if ( bp_thread_has_messages() ) : ?>
<h3 id="message-subject"><?php bp_the_thread_subject(); ?></h3>
<p id="message-recipients">
<span class="highlight label">
<?php if ( !bp_get_the_thread_recipients() ) : ?>
<?php _e( 'You are alone in this conversation.', 'firmasite' ); ?>
<?php else : ?>
<?php printf( __( 'Conversation between %s and you.', 'firmasite' ), bp_get_the_thread_recipients() ); ?>
<?php endif; ?>
</span>
<a class="button btn confirm" href="<?php bp_the_thread_delete_link(); ?>" title="<?php _e( "Delete Message", 'firmasite' ); ?>"><?php _e( 'Delete', 'firmasite' ); ?></a>
</p>
<?php do_action( 'bp_before_message_thread_list' ); ?>
<?php while ( bp_thread_messages() ) : bp_thread_the_message(); ?>
<div class="message-box <?php bp_the_thread_message_alt_class(); ?>">
<div class="message-metadata">
<?php do_action( 'bp_before_message_meta' ); ?>
<?php bp_the_thread_message_sender_avatar( 'type=thumb&width=30&height=30' ); ?>
<strong><a href="<?php bp_the_thread_message_sender_link(); ?>" title="<?php bp_the_thread_message_sender_name(); ?>"><?php bp_the_thread_message_sender_name(); ?></a> <span class="activity label label-info"><?php bp_the_thread_message_time_since(); ?></span></strong>
<?php do_action( 'bp_after_message_meta' ); ?>
</div><!-- .message-metadata -->
<?php do_action( 'bp_before_message_content' ); ?>
<div class="message-content">
<?php bp_the_thread_message_content(); ?>
</div><!-- .message-content -->
<?php do_action( 'bp_after_message_content' ); ?>
<div class="clear"></div>
</div><!-- .message-box -->
<?php endwhile; ?>
<?php do_action( 'bp_after_message_thread_list' ); ?>
<?php do_action( 'bp_before_message_thread_reply' ); ?>
<form id="send-reply" action="<?php bp_messages_form_action(); ?>" method="post" class="standard-form">
<div class="message-box">
<div class="message-metadata">
<?php do_action( 'bp_before_message_meta' ); ?>
<div class="avatar thumbnail-box">
<?php bp_loggedin_user_avatar( 'type=thumb&height=30&width=30' ); ?>
<strong><?php _e( 'Send a Reply', 'firmasite' ); ?></strong>
</div>
<?php do_action( 'bp_after_message_meta' ); ?>
</div><!-- .message-metadata -->
<div class="message-content">
<?php do_action( 'bp_before_message_reply_box' ); ?>
<?php
echo firmasite_wp_editor($content , 'message_content', 'content' );
/*
<textarea name="content" id="message_content" rows="15" cols="40"></textarea>
*/
?>
<?php do_action( 'bp_after_message_reply_box' ); ?>
<div class="submit">
<input type="submit" class="btn btn-primary" name="send" value="<?php _e( 'Send Reply', 'firmasite' ); ?>" id="send_reply_button"/>
</div>
<input type="hidden" id="thread_id" name="thread_id" value="<?php bp_the_thread_id(); ?>" />
<input type="hidden" id="messages_order" name="messages_order" value="<?php bp_thread_messages_order(); ?>" />
<?php wp_nonce_field( 'messages_send_message', 'send_message_nonce' ); ?>
</div><!-- .message-content -->
</div><!-- .message-box -->
</form><!-- #send-reply -->
<?php do_action( 'bp_after_message_thread_reply' ); ?>
<?php endif; ?>
<?php do_action( 'bp_after_message_thread_content' ); ?>
</div> | gpl-2.0 |
2ndy/RaspIM | usr/lib/python2.6/socket.py | 19999 | # Wrapper module for _socket, providing some additional facilities
# implemented in Python.
"""\
This module provides socket operations and some related functions.
On Unix, it supports IP (Internet Protocol) and Unix domain sockets.
On other systems, it only supports IP. Functions specific for a
socket are available as methods of the socket object.
Functions:
socket() -- create a new socket object
socketpair() -- create a pair of new socket objects [*]
fromfd() -- create a socket object from an open file descriptor [*]
gethostname() -- return the current hostname
gethostbyname() -- map a hostname to its IP number
gethostbyaddr() -- map an IP number or hostname to DNS info
getservbyname() -- map a service name and a protocol name to a port number
getprotobyname() -- map a protocol name (e.g. 'tcp') to a number
ntohs(), ntohl() -- convert 16, 32 bit int from network to host byte order
htons(), htonl() -- convert 16, 32 bit int from host to network byte order
inet_aton() -- convert IP addr string (123.45.67.89) to 32-bit packed format
inet_ntoa() -- convert 32-bit packed format IP to string (123.45.67.89)
ssl() -- secure socket layer support (only available if configured)
socket.getdefaulttimeout() -- get the default timeout value
socket.setdefaulttimeout() -- set the default timeout value
create_connection() -- connects to an address, with an optional timeout
[*] not available on all platforms!
Special objects:
SocketType -- type object for socket objects
error -- exception raised for I/O errors
has_ipv6 -- boolean value indicating if IPv6 is supported
Integer constants:
AF_INET, AF_UNIX -- socket domains (first argument to socket() call)
SOCK_STREAM, SOCK_DGRAM, SOCK_RAW -- socket types (second argument)
Many other constants may be defined; these may be used in calls to
the setsockopt() and getsockopt() methods.
"""
import _socket
from _socket import *
try:
import _ssl
except ImportError:
# no SSL support
pass
else:
def ssl(sock, keyfile=None, certfile=None):
# we do an internal import here because the ssl
# module imports the socket module
import ssl as _realssl
warnings.warn("socket.ssl() is deprecated. Use ssl.wrap_socket() instead.",
DeprecationWarning, stacklevel=2)
return _realssl.sslwrap_simple(sock, keyfile, certfile)
# we need to import the same constants we used to...
from _ssl import SSLError as sslerror
from _ssl import \
RAND_add, \
RAND_egd, \
RAND_status, \
SSL_ERROR_ZERO_RETURN, \
SSL_ERROR_WANT_READ, \
SSL_ERROR_WANT_WRITE, \
SSL_ERROR_WANT_X509_LOOKUP, \
SSL_ERROR_SYSCALL, \
SSL_ERROR_SSL, \
SSL_ERROR_WANT_CONNECT, \
SSL_ERROR_EOF, \
SSL_ERROR_INVALID_ERROR_CODE
import os, sys, warnings
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
try:
import errno
except ImportError:
errno = None
EBADF = getattr(errno, 'EBADF', 9)
EINTR = getattr(errno, 'EINTR', 4)
__all__ = ["getfqdn", "create_connection"]
__all__.extend(os._get_exports_list(_socket))
_realsocket = socket
# WSA error codes
if sys.platform.lower().startswith("win"):
errorTab = {}
errorTab[10004] = "The operation was interrupted."
errorTab[10009] = "A bad file handle was passed."
errorTab[10013] = "Permission denied."
errorTab[10014] = "A fault occurred on the network??" # WSAEFAULT
errorTab[10022] = "An invalid operation was attempted."
errorTab[10035] = "The socket operation would block"
errorTab[10036] = "A blocking operation is already in progress."
errorTab[10048] = "The network address is in use."
errorTab[10054] = "The connection has been reset."
errorTab[10058] = "The network has been shut down."
errorTab[10060] = "The operation timed out."
errorTab[10061] = "Connection refused."
errorTab[10063] = "The name is too long."
errorTab[10064] = "The host is down."
errorTab[10065] = "The host is unreachable."
__all__.append("errorTab")
def getfqdn(name=''):
"""Get fully qualified domain name from name.
An empty argument is interpreted as meaning the local host.
First the hostname returned by gethostbyaddr() is checked, then
possibly existing aliases. In case no FQDN is available, hostname
from gethostname() is returned.
"""
name = name.strip()
if not name or name == '0.0.0.0':
name = gethostname()
try:
hostname, aliases, ipaddrs = gethostbyaddr(name)
except error:
pass
else:
aliases.insert(0, hostname)
for name in aliases:
if '.' in name:
break
else:
name = hostname
return name
_socketmethods = (
'bind', 'connect', 'connect_ex', 'fileno', 'listen',
'getpeername', 'getsockname', 'getsockopt', 'setsockopt',
'sendall', 'setblocking',
'settimeout', 'gettimeout', 'shutdown')
if os.name == "nt":
_socketmethods = _socketmethods + ('ioctl',)
if sys.platform == "riscos":
_socketmethods = _socketmethods + ('sleeptaskw',)
# All the method names that must be delegated to either the real socket
# object or the _closedsocket object.
_delegate_methods = ("recv", "recvfrom", "recv_into", "recvfrom_into",
"send", "sendto")
class _closedsocket(object):
__slots__ = []
def _dummy(*args):
raise error(EBADF, 'Bad file descriptor')
# All _delegate_methods must also be initialized here.
send = recv = recv_into = sendto = recvfrom = recvfrom_into = _dummy
__getattr__ = _dummy
# Wrapper around platform socket objects. This implements
# a platform-independent dup() functionality. The
# implementation currently relies on reference counting
# to close the underlying socket object.
class _socketobject(object):
__doc__ = _realsocket.__doc__
__slots__ = ["_sock", "__weakref__"] + list(_delegate_methods)
def __init__(self, family=AF_INET, type=SOCK_STREAM, proto=0, _sock=None):
if _sock is None:
_sock = _realsocket(family, type, proto)
self._sock = _sock
for method in _delegate_methods:
setattr(self, method, getattr(_sock, method))
def close(self):
self._sock = _closedsocket()
dummy = self._sock._dummy
for method in _delegate_methods:
setattr(self, method, dummy)
close.__doc__ = _realsocket.close.__doc__
def accept(self):
sock, addr = self._sock.accept()
return _socketobject(_sock=sock), addr
accept.__doc__ = _realsocket.accept.__doc__
def dup(self):
"""dup() -> socket object
Return a new socket object connected to the same system resource."""
return _socketobject(_sock=self._sock)
def makefile(self, mode='r', bufsize=-1):
"""makefile([mode[, bufsize]]) -> file object
Return a regular file object corresponding to the socket. The mode
and bufsize arguments are as for the built-in open() function."""
return _fileobject(self._sock, mode, bufsize)
family = property(lambda self: self._sock.family, doc="the socket family")
type = property(lambda self: self._sock.type, doc="the socket type")
proto = property(lambda self: self._sock.proto, doc="the socket protocol")
_s = ("def %s(self, *args): return self._sock.%s(*args)\n\n"
"%s.__doc__ = _realsocket.%s.__doc__\n")
for _m in _socketmethods:
exec _s % (_m, _m, _m, _m)
del _m, _s
socket = SocketType = _socketobject
class _fileobject(object):
"""Faux file object attached to a socket object."""
default_bufsize = 8192
name = "<socket>"
__slots__ = ["mode", "bufsize", "softspace",
# "closed" is a property, see below
"_sock", "_rbufsize", "_wbufsize", "_rbuf", "_wbuf", "_wbuf_len",
"_close"]
def __init__(self, sock, mode='rb', bufsize=-1, close=False):
self._sock = sock
self.mode = mode # Not actually used in this version
if bufsize < 0:
bufsize = self.default_bufsize
self.bufsize = bufsize
self.softspace = False
# _rbufsize is the suggested recv buffer size. It is *strictly*
# obeyed within readline() for recv calls. If it is larger than
# default_bufsize it will be used for recv calls within read().
if bufsize == 0:
self._rbufsize = 1
elif bufsize == 1:
self._rbufsize = self.default_bufsize
else:
self._rbufsize = bufsize
self._wbufsize = bufsize
# We use StringIO for the read buffer to avoid holding a list
# of variously sized string objects which have been known to
# fragment the heap due to how they are malloc()ed and often
# realloc()ed down much smaller than their original allocation.
self._rbuf = StringIO()
self._wbuf = [] # A list of strings
self._wbuf_len = 0
self._close = close
def _getclosed(self):
return self._sock is None
closed = property(_getclosed, doc="True if the file is closed")
def close(self):
try:
if self._sock:
self.flush()
finally:
if self._close:
self._sock.close()
self._sock = None
def __del__(self):
try:
self.close()
except:
# close() may fail if __init__ didn't complete
pass
def flush(self):
if self._wbuf:
data = "".join(self._wbuf)
self._wbuf = []
self._wbuf_len = 0
buffer_size = max(self._rbufsize, self.default_bufsize)
data_size = len(data)
write_offset = 0
try:
while write_offset < data_size:
with warnings.catch_warnings():
if sys.py3kwarning:
warnings.filterwarnings("ignore", ".*buffer",
DeprecationWarning)
self._sock.sendall(buffer(data, write_offset, buffer_size))
write_offset += buffer_size
finally:
if write_offset < data_size:
remainder = data[write_offset:]
del data # explicit free
self._wbuf.append(remainder)
self._wbuf_len = len(remainder)
def fileno(self):
return self._sock.fileno()
def write(self, data):
data = str(data) # XXX Should really reject non-string non-buffers
if not data:
return
self._wbuf.append(data)
self._wbuf_len += len(data)
if (self._wbufsize == 0 or
self._wbufsize == 1 and '\n' in data or
self._wbuf_len >= self._wbufsize):
self.flush()
def writelines(self, list):
# XXX We could do better here for very long lists
# XXX Should really reject non-string non-buffers
lines = filter(None, map(str, list))
self._wbuf_len += sum(map(len, lines))
self._wbuf.extend(lines)
if (self._wbufsize <= 1 or
self._wbuf_len >= self._wbufsize):
self.flush()
def _get_wbuf_len(self):
return self._wbuf_len
def read(self, size=-1):
# Use max, disallow tiny reads in a loop as they are very inefficient.
# We never leave read() with any leftover data from a new recv() call
# in our internal buffer.
rbufsize = max(self._rbufsize, self.default_bufsize)
# Our use of StringIO rather than lists of string objects returned by
# recv() minimizes memory usage and fragmentation that occurs when
# rbufsize is large compared to the typical return value of recv().
buf = self._rbuf
buf.seek(0, 2) # seek end
if size < 0:
# Read until EOF
self._rbuf = StringIO() # reset _rbuf. we consume it via buf.
while True:
try:
data = self._sock.recv(rbufsize)
except error, e:
if e.args[0] == EINTR:
continue
raise
if not data:
break
buf.write(data)
return buf.getvalue()
else:
# Read until size bytes or EOF seen, whichever comes first
buf_len = buf.tell()
if buf_len >= size:
# Already have size bytes in our buffer? Extract and return.
buf.seek(0)
rv = buf.read(size)
self._rbuf = StringIO()
self._rbuf.write(buf.read())
return rv
self._rbuf = StringIO() # reset _rbuf. we consume it via buf.
while True:
left = size - buf_len
# recv() will malloc the amount of memory given as its
# parameter even though it often returns much less data
# than that. The returned data string is short lived
# as we copy it into a StringIO and free it. This avoids
# fragmentation issues on many platforms.
try:
data = self._sock.recv(left)
except error, e:
if e.args[0] == EINTR:
continue
raise
if not data:
break
n = len(data)
if n == size and not buf_len:
# Shortcut. Avoid buffer data copies when:
# - We have no data in our buffer.
# AND
# - Our call to recv returned exactly the
# number of bytes we were asked to read.
return data
if n == left:
buf.write(data)
del data # explicit free
break
assert n <= left, "recv(%d) returned %d bytes" % (left, n)
buf.write(data)
buf_len += n
del data # explicit free
#assert buf_len == buf.tell()
return buf.getvalue()
def readline(self, size=-1):
buf = self._rbuf
buf.seek(0, 2) # seek end
if buf.tell() > 0:
# check if we already have it in our buffer
buf.seek(0)
bline = buf.readline(size)
if bline.endswith('\n') or len(bline) == size:
self._rbuf = StringIO()
self._rbuf.write(buf.read())
return bline
del bline
if size < 0:
# Read until \n or EOF, whichever comes first
if self._rbufsize <= 1:
# Speed up unbuffered case
buf.seek(0)
buffers = [buf.read()]
self._rbuf = StringIO() # reset _rbuf. we consume it via buf.
data = None
recv = self._sock.recv
while True:
try:
while data != "\n":
data = recv(1)
if not data:
break
buffers.append(data)
except error, e:
# The try..except to catch EINTR was moved outside the
# recv loop to avoid the per byte overhead.
if e.args[0] == EINTR:
continue
raise
break
return "".join(buffers)
buf.seek(0, 2) # seek end
self._rbuf = StringIO() # reset _rbuf. we consume it via buf.
while True:
try:
data = self._sock.recv(self._rbufsize)
except error, e:
if e.args[0] == EINTR:
continue
raise
if not data:
break
nl = data.find('\n')
if nl >= 0:
nl += 1
buf.write(data[:nl])
self._rbuf.write(data[nl:])
del data
break
buf.write(data)
return buf.getvalue()
else:
# Read until size bytes or \n or EOF seen, whichever comes first
buf.seek(0, 2) # seek end
buf_len = buf.tell()
if buf_len >= size:
buf.seek(0)
rv = buf.read(size)
self._rbuf = StringIO()
self._rbuf.write(buf.read())
return rv
self._rbuf = StringIO() # reset _rbuf. we consume it via buf.
while True:
try:
data = self._sock.recv(self._rbufsize)
except error, e:
if e.args[0] == EINTR:
continue
raise
if not data:
break
left = size - buf_len
# did we just receive a newline?
nl = data.find('\n', 0, left)
if nl >= 0:
nl += 1
# save the excess data to _rbuf
self._rbuf.write(data[nl:])
if buf_len:
buf.write(data[:nl])
break
else:
# Shortcut. Avoid data copy through buf when returning
# a substring of our first recv().
return data[:nl]
n = len(data)
if n == size and not buf_len:
# Shortcut. Avoid data copy through buf when
# returning exactly all of our first recv().
return data
if n >= left:
buf.write(data[:left])
self._rbuf.write(data[left:])
break
buf.write(data)
buf_len += n
#assert buf_len == buf.tell()
return buf.getvalue()
def readlines(self, sizehint=0):
total = 0
list = []
while True:
line = self.readline()
if not line:
break
list.append(line)
total += len(line)
if sizehint and total >= sizehint:
break
return list
# Iterator protocols
def __iter__(self):
return self
def next(self):
line = self.readline()
if not line:
raise StopIteration
return line
_GLOBAL_DEFAULT_TIMEOUT = object()
def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT):
"""Connect to *address* and return the socket object.
Convenience function. Connect to *address* (a 2-tuple ``(host,
port)``) and return the socket object. Passing the optional
*timeout* parameter will set the timeout on the socket instance
before attempting to connect. If no *timeout* is supplied, the
global default timeout setting returned by :func:`getdefaulttimeout`
is used.
"""
msg = "getaddrinfo returns an empty list"
host, port = address
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
af, socktype, proto, canonname, sa = res
sock = None
try:
sock = socket(af, socktype, proto)
if timeout is not _GLOBAL_DEFAULT_TIMEOUT:
sock.settimeout(timeout)
sock.connect(sa)
return sock
except error, msg:
if sock is not None:
sock.close()
raise error, msg
| gpl-2.0 |
swnymor/Basket | wp-content/plugins/marketpress/marketpress-includes/plugins-gateway/simplify-files/lib/Simplify/Object.php | 2710 | <?php
/*
* Copyright (c) 2013, MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
* Neither the name of the MasterCard International Incorporated nor the names of its
* contributors may be used to endorse or promote products derived from this software
* without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
* SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/**
* Base class for all domain objects.
*/
class Simplify_Object {
private $properties = array();
/**
* @ignore
*/
public function __get($key) {
if (array_key_exists($key, $this->properties)) {
return $this->properties[$key];
} else {
return null;
}
}
/**
* @ignore
*/
public function __set($key, $value) {
$this->properties[$key] = $value;
}
/**
* Updates the object's properties with the values in the specified map.
* @param $hash array Map of values to set.
*/
public function setAll($hash) {
foreach ($hash as $key => $value) {
$this->$key = $value;
}
}
/**
* @ignore
*/
public function __toString() {
return json_encode($this->properties);
}
/**
* Returns the object's properties as a map.
* @return array map of properties.
*/
public function getProperties() {
return $this->properties;
}
} | gpl-2.0 |
mur47x111/GraalVM | graal/com.oracle.graal.lir/src/com/oracle/graal/lir/gen/DefaultLIRKindTool.java | 2440 | /*
* Copyright (c) 2014, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.oracle.graal.lir.gen;
import jdk.internal.jvmci.common.*;
import jdk.internal.jvmci.meta.*;
import com.oracle.graal.compiler.common.spi.*;
/**
* Default implementation of {@link LIRKindTool}. Returns the normal Java kind for primitive types.
* Subclasses still have to implement {@link #getObjectKind}.
*/
public class DefaultLIRKindTool implements LIRKindTool {
private final PlatformKind wordKind;
public DefaultLIRKindTool(PlatformKind wordKind) {
this.wordKind = wordKind;
}
public LIRKind getIntegerKind(int bits) {
if (bits <= 8) {
return LIRKind.value(Kind.Byte);
} else if (bits <= 16) {
return LIRKind.value(Kind.Short);
} else if (bits <= 32) {
return LIRKind.value(Kind.Int);
} else {
assert bits <= 64;
return LIRKind.value(Kind.Long);
}
}
public LIRKind getFloatingKind(int bits) {
switch (bits) {
case 32:
return LIRKind.value(Kind.Float);
case 64:
return LIRKind.value(Kind.Double);
default:
throw JVMCIError.shouldNotReachHere();
}
}
public LIRKind getObjectKind() {
return LIRKind.reference(Kind.Object);
}
public LIRKind getWordKind() {
return LIRKind.value(wordKind);
}
}
| gpl-2.0 |
sandrinr/XCSoar | src/Dialogs/ListPicker.cpp | 6041 | /*
Copyright_License {
XCSoar Glide Computer - http://www.xcsoar.org/
Copyright (C) 2000-2021 The XCSoar Project
A detailed list of copyright holders can be found in the file "AUTHORS".
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
}
*/
#include "Dialogs/ListPicker.hpp"
#include "HelpDialog.hpp"
#include "WidgetDialog.hpp"
#include "Widget/ListWidget.hpp"
#include "Widget/TextWidget.hpp"
#include "Widget/TwoWidgets.hpp"
#include "UIGlobals.hpp"
#include "Language/Language.hpp"
#include "ui/event/Timer.hpp"
#include "ui/event/PeriodicTimer.hpp"
#include <cassert>
class ListPickerWidget : public ListWidget {
unsigned num_items;
unsigned initial_value;
unsigned row_height;
bool visible;
ListItemRenderer &item_renderer;
WndForm &dialog;
/**
* This timer is used to postpone the initial UpdateHelp() call.
* This is necessary because the TwoWidgets instance is not fully
* initialised yet in Show(), and recursively calling into Widget
* methods is dangerous anyway.
*/
UI::Timer postpone_update_help{[this]{
UpdateHelp(GetList().GetCursorIndex());
}};
const TCHAR *const caption, *const help_text;
ItemHelpCallback_t item_help_callback;
TextWidget *help_widget;
TwoWidgets *two_widgets;
public:
ListPickerWidget(unsigned _num_items, unsigned _initial_value,
unsigned _row_height,
ListItemRenderer &_item_renderer,
WndForm &_dialog,
const TCHAR *_caption, const TCHAR *_help_text) noexcept
:num_items(_num_items), initial_value(_initial_value),
row_height(_row_height),
visible(false),
item_renderer(_item_renderer),
dialog(_dialog),
caption(_caption), help_text(_help_text),
item_help_callback(nullptr) {}
using ListWidget::GetList;
void EnableItemHelp(ItemHelpCallback_t _item_help_callback,
TextWidget &_help_widget,
TwoWidgets &_two_widgets) noexcept {
item_help_callback = _item_help_callback;
help_widget = &_help_widget;
two_widgets = &_two_widgets;
}
void UpdateHelp(unsigned index) noexcept {
if (!visible || item_help_callback == nullptr)
return;
help_widget->SetText(item_help_callback(index));
two_widgets->UpdateLayout();
}
void ShowHelp() noexcept {
HelpDialog(caption, help_text);
}
/* virtual methods from class Widget */
void Prepare(ContainerWindow &parent,
const PixelRect &rc) noexcept override {
ListControl &list = CreateList(parent, UIGlobals::GetDialogLook(), rc,
row_height);
list.SetLength(num_items);
list.SetCursorIndex(initial_value);
}
void Show(const PixelRect &rc) noexcept override {
ListWidget::Show(rc);
visible = true;
postpone_update_help.Schedule({});
}
void Hide() noexcept override {
visible = false;
postpone_update_help.Cancel();
ListWidget::Hide();
}
/* virtual methods from class ListControl::Handler */
void OnPaintItem(Canvas &canvas, const PixelRect rc,
unsigned idx) noexcept override {
item_renderer.OnPaintItem(canvas, rc, idx);
}
void OnCursorMoved(unsigned index) noexcept override {
UpdateHelp(index);
}
bool CanActivateItem(unsigned index) const noexcept override {
return true;
}
void OnActivateItem(unsigned index) noexcept override {
dialog.SetModalResult(mrOK);
}
};
int
ListPicker(const TCHAR *caption,
unsigned num_items, unsigned initial_value,
unsigned item_height,
ListItemRenderer &item_renderer, bool update,
const TCHAR *help_text,
ItemHelpCallback_t _itemhelp_callback,
const TCHAR *extra_caption)
{
assert(num_items <= 0x7fffffff);
assert((num_items == 0 && initial_value == 0) || initial_value < num_items);
assert(item_height > 0);
WidgetDialog dialog(WidgetDialog::Full{}, UIGlobals::GetMainWindow(),
UIGlobals::GetDialogLook(), caption);
ListPickerWidget *const list_widget =
new ListPickerWidget(num_items, initial_value, item_height,
item_renderer, dialog, caption, help_text);
std::unique_ptr<Widget> widget(list_widget);
if (_itemhelp_callback != nullptr) {
widget = std::make_unique<TwoWidgets>(std::move(widget),
std::make_unique<TextWidget>());
auto &two_widgets = (TwoWidgets &)*widget;
list_widget->EnableItemHelp(_itemhelp_callback,
(TextWidget &)two_widgets.GetSecond(),
two_widgets);
}
if (help_text != nullptr)
dialog.AddButton(_("Help"), [list_widget](){
list_widget->ShowHelp();
});
if (num_items > 0)
dialog.AddButton(_("Select"), mrOK);
if (extra_caption != nullptr)
dialog.AddButton(extra_caption, -2);
dialog.AddButton(_("Cancel"), mrCancel);
dialog.EnableCursorSelection();
UI::PeriodicTimer update_timer([list_widget](){
list_widget->GetList().Invalidate();
});
if (update)
update_timer.Schedule(std::chrono::seconds(1));
dialog.FinishPreliminary(widget.release());
int result = dialog.ShowModal();
if (result == mrOK)
result = (int)list_widget->GetList().GetCursorIndex();
else if (result != -2)
result = -1;
return result;
}
| gpl-2.0 |
A2152225/ServUO | Scripts/Mobiles/Normal/RatmanMage.cs | 3530 | using System;
using Server.Misc;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a glowing ratman corpse")]
public class RatmanMage : BaseCreature
{
[Constructable]
public RatmanMage()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
this.Name = NameList.RandomName("ratman");
this.Body = 0x8F;
this.BaseSoundID = 437;
this.SetStr(146, 180);
this.SetDex(101, 130);
this.SetInt(186, 210);
this.SetHits(88, 108);
this.SetDamage(7, 14);
this.SetDamageType(ResistanceType.Physical, 100);
this.SetResistance(ResistanceType.Physical, 40, 45);
this.SetResistance(ResistanceType.Fire, 10, 20);
this.SetResistance(ResistanceType.Cold, 10, 20);
this.SetResistance(ResistanceType.Poison, 10, 20);
this.SetResistance(ResistanceType.Energy, 10, 20);
this.SetSkill(SkillName.EvalInt, 70.1, 80.0);
this.SetSkill(SkillName.Magery, 70.1, 80.0);
this.SetSkill(SkillName.MagicResist, 65.1, 90.0);
this.SetSkill(SkillName.Tactics, 50.1, 75.0);
this.SetSkill(SkillName.Wrestling, 50.1, 75.0);
this.Fame = 7500;
this.Karma = -7500;
this.VirtualArmor = 44;
this.PackReg(6);
if (0.02 > Utility.RandomDouble())
this.PackStatue();
switch (Utility.Random(60))
{
case 0: PackItem(new AnimateDeadScroll()); break;
case 1: PackItem(new BloodOathScroll()); break;
case 2: PackItem(new CorpseSkinScroll()); break;
case 3: PackItem(new CurseWeaponScroll()); break;
case 4: PackItem(new EvilOmenScroll()); break;
case 5: PackItem(new HorrificBeastScroll()); break;
case 6: PackItem(new MindRotScroll()); break;
case 7: PackItem(new PainSpikeScroll()); break;
case 8: PackItem(new WraithFormScroll()); break;
case 9: PackItem(new PoisonStrikeScroll()); break;
}
}
public RatmanMage(Serial serial)
: base(serial)
{
}
public override InhumanSpeech SpeechType
{
get
{
return InhumanSpeech.Ratman;
}
}
public override bool CanRummageCorpses
{
get
{
return true;
}
}
public override int TreasureMapLevel
{
get
{
return 2;
}
}
public override int Meat
{
get
{
return 1;
}
}
public override int Hides
{
get
{
return 8;
}
}
public override HideType HideType
{
get
{
return HideType.Spined;
}
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.Rich);
this.AddLoot(LootPack.LowScrolls);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
} | gpl-2.0 |
tfyufy/FirstBase | sdk/PHP/PhalApiClient/PhalApiClient.php | 5846 | <?php
/**
* PhalApi客户端SDK包(PHP版)
*
* - 以接口查询语言(ASQL)的方式来实现接口请求
* - 出于简明客户端,将全部的类都归于同一个文件,避免过多的加载
*
* <br>使用示例:<br>
```
* $rs = PhalApiClient::create()
* ->withHost('http://demo.phalapi.net/')
* ->withService('Default.Index')
* ->withParams('name', 'dogstar')
* ->withTimeout(3000)
* ->request();
*
* var_dump($rs->getRet(), $rs->getData(), $rs->getMsg());
```
*
* @package PhalApi\SDK
* @license http://www.phalapi.net/license GPL 协议
* @link http://www.phalapi.net/
* @author dogstar <chanzonghuang@gmail.com> 2015-10-16
*/
class PhalApiClient {
protected $host;
protected $filter;
protected $parser;
protected $service;
protected $timeoutMs;
protected $params = array();
/**
* 创建一个接口实例,注意:不是单例模式
* @return PhalApiClient
*/
public static function create() {
return new self();
}
protected function __construct() {
$this->host = "";
$this->parser = new PhalApiClientParserJson();
}
/**
* 设置接口域名
* @param string $host
* @return PhalApiClient
*/
public function withHost($host) {
$this->host = $host;
return $this;
}
/**
* 设置过滤器,与服务器的DI()->filter对应
* @param PhalApiClientFilter $filter 过滤器
* @return PhalApiClient
*/
public function withFilter(PhalApiClientFilter $filter) {
$this->filter = $filter;
return $this;
}
/**
* 设置结果解析器,仅当不是JSON返回格式时才需要设置
* @param PhalApiClientParser $parser 结果解析器
* @return PhalApiClient
*/
public function withParser(PhalApiClientParser $parser) {
$this->parser = $parser;
return $this;
}
/**
* 重置,将接口服务名称、接口参数、请求超时进行重置,便于重复请求
* @return PhalApiClient
*/
public function reset() {
$this->service = "";
$this->timeoutMs = 3000;
$this->params = array();
return $this;
}
/**
* 设置将在调用的接口服务名称,如:Default.Index
* @param string $service 接口服务名称
* @return PhalApiClient
*/
public function withService($service) {
$this->service = $service;
return $this;
}
/**
* 设置接口参数,此方法是唯一一个可以多次调用并累加参数的操作
* @param string $name 参数名字
* @param string $value 值
* @return PhalApiClient
*/
public function withParams($name, $value) {
$this->params[$name] = $value;
return $this;
}
/**
* 设置超时时间,单位毫秒
* @param int $timeoutMs 超时时间,单位毫秒
* @return PhalApiClient
*/
public function withTimeout($timeoutMs) {
$this->timeoutMs = $timeoutMs;
return $this;
}
/**
* 发起接口请求
* @return PhalApiClientResponse
*/
public function request() {
$url = $this->host;
if (!empty($this->service)) {
$url .= '?service=' . $this->service;
}
if ($this->filter !== null) {
$this->filter->filter($this->service, $this->params);
}
$rs = $this->doRequest($url, $this->params, $this->timeoutMs);
return $this->parser->parse($rs);
}
protected function doRequest($url, $data, $timeoutMs = 3000)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT_MS, $timeoutMs);
if (!empty($data)) {
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
}
$rs = curl_exec($ch);
curl_close($ch);
return $rs;
}
}
/**
* 接口返回结果
*
* - 与接口返回的格式对应,即有:ret/data/msg
*/
class PhalApiClientResponse {
protected $ret = 200;
protected $data = array();
protected $msg = '';
public function __construct($ret, $data = array(), $msg = '') {
$this->ret = $ret;
$this->data = $data;
$this->msg = $msg;
}
public function getRet() {
return $this->ret;
}
public function getData() {
return $this->data;
}
public function getMsg() {
return $this->msg;
}
}
/**
* 接口过滤器
*
* - 可用于接口签名生成
*/
interface PhalApiClientFilter {
/**
* 过滤操作
* @param string $service 接口服务名称
* @param array $params 接口参数,注意是引用。可以直接修改
* @return null
*/
public function filter($service, array &$params);
}
/**
* 接口结果解析器
*
* - 可用于不同接口返回格式的处理
*/
interface PhalApiClientParser {
/**
* 结果解析
* @param string $apiResult
* @return PhalApiClientResponse
*/
public function parse($apiResult);
}
/**
* JSON解析
*/
class PhalApiClientParserJson implements PhalApiClientParser {
public function parse($apiResult) {
if ($apiResult === false) {
return new PhalApiClientResponse(408, array(), 'Request Timeout');
}
$arr = json_decode($apiResult, true);
if ($arr === false || empty($arr)) {
return new PhalApiClientResponse(500, array(), 'Internal Server Error');
}
return new PhalApiClientResponse($arr['ret'], $arr['data'], $arr['msg']);
}
}
| gpl-2.0 |
zero333/VIKO_ZERO | PEAR/HTML/QuickForm/Rule/Range.php | 2646 | <?php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
// +----------------------------------------------------------------------+
// | PHP version 4.0 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2003 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available at through the world-wide-web at |
// | http://www.php.net/license/2_02.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Authors: Bertrand Mansion <bmansion@mamasam.com> |
// +----------------------------------------------------------------------+
//
// $Id: Range.php,v 1.6 2003/11/03 16:08:24 avb Exp $
require_once('Pear/HTML/QuickForm/Rule.php');
/**
* Validates values using range comparison
* @version 1.0
*/
class HTML_QuickForm_Rule_Range extends HTML_QuickForm_Rule
{
/**
* Validates a value using a range comparison
*
* @param string $value Value to be checked
* @param mixed $options Int for length, array for range
* @access public
* @return boolean true if value is valid
*/
function validate($value, $options = NULL)
{
$length = strlen($value);
switch ($this->name) {
case 'minlength': return ($length >= $options);
case 'maxlength': return ($length <= $options);
default: return ($length >= $options[0] && $length <= $options[1]);
}
} // end func validate
function getValidationScript($options = null)
{
switch ($this->name) {
case 'minlength':
$test = '{jsVar}.length < '.$options;
break;
case 'maxlength':
$test = '{jsVar}.length > '.$options;
break;
default:
$test = '({jsVar}.length < '.$options[0].' || {jsVar}.length > '.$options[1].')';
}
return array('', "{jsVar} != '' && {$test}");
} // end func getValidationScript
} // end class HTML_QuickForm_Rule_Range
?> | gpl-2.0 |
ymback/NGA-CLIENT-VER-OPEN-SOURCE | nga_phone_base_3.0/src/main/java/gov/anzong/androidnga/mvvm/viewmodel/MessageListViewModel.java | 1398 | package gov.anzong.androidnga.mvvm.viewmodel;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModel;
import gov.anzong.androidnga.http.OnHttpCallBack;
import gov.anzong.androidnga.mvvm.model.MessageListModel;
import sp.phone.http.bean.MessageListInfo;
/**
* @author yangyihang
*/
public class MessageListViewModel extends ViewModel {
private final MutableLiveData<MessageListInfo> mMessageListData = new MutableLiveData<>();
private final MutableLiveData<String> mErrorData = new MutableLiveData<>();
private final MessageListModel mMessageModel = new MessageListModel();
public void observeMessageList(LifecycleOwner owner, Observer<MessageListInfo> observer) {
mMessageListData.observe(owner, observer);
}
public void observeErrorInfo(LifecycleOwner owner, Observer<String> observer) {
mErrorData.observe(owner, observer);
}
public void getMessageList(int page) {
mMessageModel.loadPage(page, new OnHttpCallBack<MessageListInfo>() {
@Override
public void onError(String text) {
mErrorData.postValue(text);
}
@Override
public void onSuccess(MessageListInfo data) {
mMessageListData.postValue(data);
}
});
}
}
| gpl-2.0 |
InnovaLangues/innovalangues.fr | wp-content/plugins/zotpress/lib/admin/admin.help.php | 26569 |
<div id="zp-Zotpress" class="wrap">
<?php include('admin.display.tabs.php'); ?>
<h3>What is Zotpress?</h3>
<div class="zp-Message">
<h3>About Zotpress</h3>
<p class="version">
<strong>Version:</strong> You're using Zotpress <?php echo ZOTPRESS_VERSION; ?><br />
<strong>Website:</strong> <a title="Zotpress on WordPress" rel="external" href="http://wordpress.org/plugins/zotpress/">Zotpress on WordPress.org</a><br />
<strong>Support:</strong> <a title="Donations always appreciated! Accepted through PayPal" rel="external" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5HQ8FXAXS9MUQ">Donate through PayPal</a>
</p>
<p class="rate">
If you like Zotpress, let the world know with a
<a class="zp-FiveStar" title="Rate Zotpress" rel="external" href="http://wordpress.org/plugins/zotpress/">rating</a>
on WordPress.org!
</p>
</div>
<p>
<a title="More of my plugins" href="http://katieseaborn.com/plugins/">Zotpress</a> bridges <a title="Zotero" href="https://www.zotero.org/settings/keys">Zotero</a>
and WordPress by allowing you to display items from your Zotero library through shortcodes and widgets.
It also extends the basic meta functionality offered by Zotero by allowing you to add images to and provide downloadable files associated with your citations.
</p>
<p>There's a few ways to use Zotpress:</p>
<ol class="zp-WaysToUseZotpress">
<li>
<p><strong><span class="number">1</span> The Zotpress Shortcode</strong></p>
<p class="indent">Generate a bibliography wherever you can call shortcodes. <a title="Learn more" href="#zotpress">Learn more »</a></p>
</li>
<li>
<p><strong><span class="number">2</span>The Zotpress In-Text Shortcodes</strong></p>
<p class="indent">Create in-text citations and an auto-generated bibliography. <a title="Learn more" href="#intext">Learn more »</a></p>
</li>
<li>
<p><strong><span class="number">3</span>The Zotpress Sidebar Widget</strong></p>
<p class="indent">Use this widget in a sidebar to generate a bibliography. <a title="Learn more" href="#widget">Learn more »</a></p>
</li>
</ol>
<p>
You can build shortcodes and search for item keys using the <a title="Zotpress Reference widget" href="#ref">Zotpresss Reference widget</a>
on the post and page write/edit screens.
</p>
<p>
Have questions? First, check out the <a title="F.A.Q." href="#faq">F.A.Q.</a> Then search the
<a title="Zotpress Forums" href="http://wordpress.org/support/plugin/zotpress">Zotpress Support Forums</a>. If you can't find an answer,
feel free to post your question there.
</p>
<hr />
<a name="zotpress"></a>
<h3>Displaying Citations Using the Zotpress Shortcode</h3>
<p>
To display a complete list of citations for an account in the default bibliography style (APA), simply use this shortcode:
</p>
<code>
[zotpress userid="00000"]
</code>
<p>
An example of how to use shortcode attributes is:
</p>
<code>
[zotpress collection="ZKDTKM3X" limit="5"]
</code>
<p>
This shortcode will display a list of five citations from the collection with the key "ZKDTKM3X". (<strong>Hint:</strong> Collection keys are listed beside each item on the <a title="Browse" href="admin.php?page=Zotpress">Browse page</a>.)
</p>
<h4 class="short">Shortcode Attributes</h4>
<table class="zp-Documentation" border="0" cellpadding="0" cellspacing="0">
<tr class="main">
<th>Category</th>
<th>Type</th>
<th>Attribute</th>
<th>Description</th>
<th>Example</th>
</tr>
<tr>
<td rowspan="13" class="category">Filtering</td>
<td rowspan="2" class="type">Account</td>
<td class="code">userid</td>
<td><p>Display a list of citations from a particular user or group. <strong>REQUIRED if you have multiple accounts and are not using the "nickname" parameter.</strong> If neither is entered, it will default to the first user account listed.</p></td>
<td class="example"><p><code>[zotpress userid="000000"]</code></p></td>
</tr>
<tr>
<td class="code">nickname</td>
<td><p>Display a list of citations by a particular Zotero account nickname. <strong>Hint:</strong> You can give your Zotero account a nickname on the <a title="Accounts" href="admin.php?page=Zotpress&accounts=true">Accounts page</a>.</p></td>
<td class="example"><p><code>[zotpress nickname="Katie"]</code></p></td>
</tr>
<tr class="zebra">
<td rowspan="2" class="type">Data</td>
<td class="code">authors</td>
<td><p>Alternative: <code>author</code>. Display a list of citations from a particular author or authors. <strong>Note:</strong> "Carl Sagan","C. Sagan", "C Sagan", "Carl E. Sagan", "Carl E Sagan" and "Carl Edward Sagan" are not the same as "Sagan".</p></td>
<td class="example"><p><code>[zotpress author="Carl Sagan"]</code></p><p><code>[zotpress authors="Carl Sagan,Stephen Hawking"]</code></p></td>
</tr>
<tr class="zebra">
<td class="code">years</td>
<td><p>Alternative: <code>year</code>. Display a list of citations from a particular year or years. <strong>Note:</strong> You <em>can</em> display by Author and Year together.</p></td>
<td class="example"><p><code>[zotpress year="1990"]</code></p><p><code>[zotpress years="1990,1998,2013"]</code></p></td>
</tr>
<tr>
<td rowspan="4" class="type">Type</td>
<td class="code">datatype</td>
<td><p>Display a list of a particular data type. <strong>Options: items [default], tags, collections.</strong></p></td>
<td class="example"><p><code>[zotpress datatype="tags"]</code></p></td>
</tr>
<tr>
<td class="code">items</td>
<td><p>Alternative: <code>item</code>. Display an item or list of items using particular item keys.</p></td>
<td class="example"><p><code>[zotpress item="GMGCJU34"]</code></p><p><code>[zotpress items="GMGCJU34,U9Z5JTKC"]</code></p></td>
</tr>
<tr>
<td class="code">collections</td>
<td><p>Alternative: <code>collection</code>. Display items from a collection or list of collections using particular collection keys.</p></td>
<td class="example"><p><code>[zotpress collection="GMGCJU34"]</code></p><p><code>[zotpress collections="GMGCJU34,U9Z5JTKC"]</code></p></td>
</tr>
<tr>
<td class="code">tags</td>
<td><p>Alternative: <code>tag</code>. Display items associated with one or more tags. <strong>Warning:</strong> Will break if the tag has a comma.</p></td>
<td class="example"><p><code>[zotpress tag="zotero"]</code></p><p><code>[zotpress tags="zotero,scholarly blogging"]</code></p></td>
</tr>
<tr class="zebra">
<td rowspan="5" class="type">Settings</td>
<td class="code">inclusive</td>
<td><p>When filtering, include all items that match ANY criteria or exclude all items except those that match the criteria exactly. Works with collection/s, tag/s, author, year. <strong>Options: yes [default], no.</strong></p></td>
<td class="example"><p><code>[zotpress author="Carl Sagan" inclusive="yes"]</code></p></td>
</tr>
<tr class="zebra">
<td class="code">sortby</td>
<td><p>Sort multiple citations using meta data as attributes. <strong>Options: title, author, date, default (latest added) [default].</strong></p></td>
<td class="example"><p><code>[zotpress author="Carl Sagan" sortby="date"]</code></p></td>
</tr>
<tr class="zebra">
<td class="code">order</td>
<td><p>Alternative: <code>sort</code>. Order of the sortby attribute. <strong>Options: asc [default], desc.</strong></p></td>
<td class="example"><p><code>[zotpress author="Carl Sagan" sortby="date" order="desc"]</code></p></td>
</tr>
<tr class="zebra">
<td class="code">title</td>
<td><p>Dispay a title by year. <strong>Options: yes, no [default].</strong></p></td>
<td class="example"><p><code>[zotpress author="Carl Sagan" sortby="date" title="yes"]</code></p></td>
</tr>
<tr class="zebra">
<td class="code">limit</td>
<td><p>Limit the item list to by a given number. <strong>Optional.</strong> Options: Any number between 1 and infinity.</p></td>
<td class="example"><p><code>[zotpress limit="5"]</code></p></td>
</tr>
<tr>
<td rowspan="10" class="category last">Display</td>
<td rowspan="10" class="type last">Settings</td>
<td class="code">style</td>
<td><p>Citation style. <strong>Options: apsa, apa [default], asa, chicago-author-date, chicago-fullnote-bibliography, harvard1, modern-language-association, nlm, nature, vancouver.</strong> Note: Support for more styles is coming; see <a title="Zotero Style Repository" href="http://www.zotero.org/styles">Zotero Style Repository</a> for details.</p></td>
<td class="example"><p><code>[zotpress collection="GMGCJU34" style="apa"]</code></p></td>
</tr>
<tr>
<td class="code">showimage</td>
<td><p>Whether or not to display the citation's image, if one exists. <strong>Options: yes, no [default]</strong></p></td>
<td class="example"><p><code>[zotpress collection="GMGCJU34" showimage="yes"]</code></p></td>
</tr>
<tr>
<td class="code">showtags</td>
<td><p>Whether or not to display the citation's tags, if one or more exists. <strong>Options: yes, no [default]</strong></p></td>
<td class="example"><p><code>[zotpress collection="GMGCJU34" showtags="yes"]</code></p></td>
</tr>
<tr>
<td class="code">download</td>
<td><p>Alternative: <code>downloadable</code> Whether or not to display the citation's download URL, if one exists. <strong>Enable this option only if you are legally able to provide your files for download.</strong> Options: yes, no [default].</p></td>
<td class="example"><p><code>[zotpress collection="GMGCJU34" download="yes"]</code></p></td>
</tr>
<tr>
<td class="code">abstract</td>
<td><p>Alternative: <code>abstracts</code> Whether or not to display the citation's abstract, if one exists. Options: yes, no [default].</p></td>
<td class="example"><p><code>[zotpress collection="GMGCJU34" abstracts="yes"]</code></p></td>
</tr>
<tr>
<td class="code">notes</td>
<td><p>Alternative: <code>note</code> Whether or not to display the citation's notes, if one exists. <strong>Must have notes made public via the private key settings on Zotero.</strong> Options: yes, no [default].</p></td>
<td class="example"><p><code>[zotpress collection="GMGCJU34" notes="yes"]</code></p></td>
</tr>
<tr>
<td class="code">cite</td>
<td><p>Alternative: <code>citeable</code> Make the displayed citations citable by generating RIS links. <strong>Options: yes, no [default].</strong></p></td>
<td class="example"><p><code>[zotpress collection="GMGCJU34" cite="yes"]</code></p></td>
</tr>
<tr>
<td class="code">linkedlist</td>
<td><p><strong>Requires:</strong> <code>datatype="collections"</code> or <code>datatype="tags"</code> Alternative: <code>link</code> List all tags or all collections and link each to a page that displays their associated citation items. <strong>Options: yes, no [default].</strong></p></td>
<td class="example"><p><code>[zotpress datatype="tags" linkedlist="yes"]</code></p></td>
</tr>
<tr>
<td class="code">forcenumber</td>
<td><p>Numbers bibliography items, even when the citation style, e.g. APA, doesn't normally.<strong>Options: true, false [default].</strong></p></td>
<td class="example"><p><code>[zotpress collection="GMGCJU34" forcenumber="true"]</code></p></td>
</tr>
<tr class="last">
<td class="code last">target</td>
<td><p>Links open up in a new window or tab. Applies to citation links, e.g. "retrieved from." Compliant with HTML5 but not XHTML Strict. <strong>Options: new, no [default].</strong></p></td>
<td class="example"><p><code>[zotpress collection="GMGCJU34" target="new"]</code></p></td>
</tr>
</table>
<hr />
<a name="intext"></a>
<h3>Displaying Citations Using the Zotpress In-Text Shortcodes</h3>
<div id="zp-Intext-Example">
<span class="title">Zotpress In-Text Example</span>
<p>This is an example of a Zotpress in-text citation as it would appear in your rich text editor [zotpressInText item="{NCXAA92F,36}"]. Let's wrap up this short note with a bibliography.</p>
<span class="title">Bibliography:</span>
<p>[zotpressInTextBib]</p>
</div>
<p>
Use one or more <code>[zotpressInText]</code> shortcodes in your blog entry to create in-text citations.
</p>
<p>
Here's what an in-text citation might look like in your rich text editor:
</p>
<p class="example">
Katie said, "Zotpress is cooler than your shoes" <code>[zotpressInText item="{NCXAA92F,36}"]</code>.
</p>
<p>And this is what it might look like on your blog:</p>
<p class="example">
Katie said, "Zotpress is cooler than your shoes" (Seaborn, 2012, p. 36).
</p>
<p>
To display the auto-generated bibliography, place the <code>[zotpressInTextBib]</code> shortcode somewhere in your entry after the in-text citation shortcodes.
</p>
<p>
<strong>Note:</strong> In-text citations, unlike the bibliography, are not automatically styled. Use the "format" attribute to manually style in-text citations. Support for automatically styled in-text citations is in the works.
</p>
<h4 style="clear:both;">In-Text Shortcode Attributes</h4>
<table class="zp-Documentation" border="0" cellpadding="0" cellspacing="0">
<tr class="main">
<th>Category</th>
<th>Type</th>
<th>Attribute</th>
<th>Description</th>
<th>Example</th>
</tr>
<tr>
<td rowspan="3" class="category">Filtering</td>
<td rowspan="2" class="type">Account</td>
<td class="code">userid</td>
<td><p>Display a list of citations from a particular user or group. <strong>REQUIRED if you have multiple accounts and are not using the "nickname" parameter.</strong> If neither is entered, it will default to the first user account listed.</p></td>
<td class="example"><p><code>[zotpressInText userid="000000"]</code></p></td>
</tr>
<tr>
<td class="code">nickname</td>
<td><p>Display a list of citations by a particular Zotero account nickname. <strong>Hint:</strong> You can give your Zotero account a nickname on the <a title="Accounts" href="admin.php?page=Zotpress&accounts=true">Accounts page</a>.</p></td>
<td class="example"><p><code>[zotpressInText nickname="Katie"]</code></p></td>
</tr>
<tr class="zebra">
<td rowspan="1" class="type">Data</td>
<td class="code">items</td>
<td><p>Alternative: <code>item</code> Item keys and page number pairs formatted like so: <code>ITEMKEY</code> or <code>{ITEMKEY,PAGES}</code> or <code>{ITEMKEY1,PAGES},{ITEMKEY2,PAGES},...</code>.</p></td>
<td class="example"><p><code>[zotpressInText item="NCXAA92F"]</code></p><p><code>[zotpressInText item="{NCXAA92F,10-15}"]</code></p><p><code>[zotpressInText items="{NCXAA92F,10-15},{55MKF89B,1578},{3ITTIXHP}"]</code></p></td>
</tr>
<tr class="last">
<td rowspan="4" class="category last">Display</td>
<td rowspan="4" class="type last">Settings</td>
<td class="code">format</td>
<td>
<p>How the in-text citation should be presented. Use these placeholders: %a% for author, %d% for date, %p% for page, %num% for list number.</p>
<p class="break"><strong>Hint:</strong> In WordPress shortcodes, the bracket characters <strong>[</strong> and <strong>]</strong> are special characters. To use in-text brackets, see the example on the right.</p>
</td>
<td class="example">
<p><code>[zotpressInText item="NCXAA92F" format="%a% (%d%, %p%)"]</code>, which will display as: <span style="padding-left: 0.5em; font-family: monospace;">author (date, pages)</span></p>
<p class="break"><code>[zotpressInText item="NCXAA92F" format="&#91;%num%&#93;"]</code>, which will display as: <span style="padding-left: 0.5em; font-family: monospace;">[1]</span></p>
</td>
</tr>
<tr>
<td class="code">etal</td>
<td><p>How "et al." is applied to multiple instances of a citation if it has three or more authors. Default is full author list for first instance and "et al." for every other instance. <strong>Options:</strong> yes, no, default [default]</p></td>
<td class="example"><p><code>[zotpressInText item="NCXAA92F" etal="yes"]</code></p></td>
</tr>
<tr>
<td class="code">separator</td>
<td><p>How a list of two or more citations is delineated. Default is with a comma. <strong>Options:</strong> comma, semicolon [default]</p></td>
<td class="example"><p><code>[zotpressInText item="NCXAA92F" separator="semicolon"]</code>, which will display as: <span style="padding-left: 0.5em; font-family: monospace;">(Sagan 2013; Hawkings 2014)</span></p></td>
</tr>
<tr>
<td class="code last">and</td>
<td><p>Whether some form of "and" is applied to citations with two or more authors. Default is "and". <strong>Options:</strong> and, comma-and, comma [default]</p></td>
<td class="example"><p><code>[zotpressInText item="NCXAA92F" and="comma-and"]</code>, which will display as: <span style="padding-left: 0.5em; font-family: monospace;">(Sagan, and Hawkings 2014)</span></p></td>
</tr>
</table>
<p>The <code>[zotpressInTextBib]</code> shortcode takes the same attributes as the <code>[zotpress]</code> shortcode, minus the "userid," "nickname," and "limit" attributes.</p>
<hr />
<a name="widget"></a>
<h3>Displaying Citations Using the Zotpress Sidebar Widget</h3>
<p>You can drag-n-drop a Zotpress sidebar widget on your <a title="Widgets" href="widgets.php">Widgets</a> page. Fill out the form, save, and you're done.</p>
<hr />
<a name="ref"></a>
<h3>Zotpress Reference</h3>
<p>
Zotpress Reference is a metabox widget that shows up on your writing pages. It lets you quickly retrieve item keys for collections, tags, and citations.
You can <strong>hide or show</strong> the widget using the "Screen Options" tab found at the upper-right corner of the screen when adding or
editing posts.
</p>
<hr />
<a name="faq"></a>
<h3>F.A.Q.</h3>
<p>
Check out the answered questions below. If you can't find what you're looking for, feel free to post your question at the
<a title="Zotpress Forums" href="http://wordpress.org/support/plugin/zotpress">Zotpress Support Forums</a>.
</p>
<h4>How can I sync or re-import my local library in Zotpress?</h4>
<p>
You can use the buttons found on the <a title="Accounts" href="admin.php?page=Zotpress&accounts=true">Accounts</a>
page next to the account for which you'd like to selectively import or re-import items.
</p>
<h4>Will Zotpress auto-sync my library?</h4>
<p>
Unfortunately, not yet. This feature is in the works. For now, you have to manually sync your library
by selectively importing collections (and their items and subcollections) or re-importing your library.
</p>
<h4>How can I edit a Zotero account listed on the Accounts page?</h4>
<p>You can't, but you <em>can</em> delete the account and re-add it with the new information.</p>
<h4>How do I find a group ID?</h4>
<p>
There are two ways, depending on the age of the group.
Older Zotero groups will have their group ID listed in the URL: a number 1-6+ digits in length after "groups". New Zotero groups may hide their group ID behind a moniker.
If you're the group owner, you can login to <a title="Zotero" href="http://www.zotero.org/">Zotero</a>, click on "Groups", and then hover over or click on "Manage Group" under the group's title.
Everyone else can view the RSS Feed of the group and note the group id in the URL.
</p>
<h4>I've added a group to Zotpress, but it's not displaying citations. How do I display a group's citations?</h4>
<p>
You can list any group on Zotpress as long as you have the correct private key.
If you're not the group owner, you can try sending the owner a request for one.
</p>
<h4>How do I find a collection ID?</h4>
<p>It's displayed next to the collection name on the <a title="Browse" href="admin.php?page=Zotpress">Browse</a> page.</p>
<h4>How do I find an item key (citation ID)?</h4>
<p>It's displayed beneath the citation on the <a title="Browse" href="admin.php?page=Zotpress">Browse</a> page. It's also listed on the dropdown associated with each item you search via the Reference widget (found on post add/edit screens).</p>
<h4>Zotpress won't import my library, or only imports some of my library.</h4>
<p>First, check with your web host or server admin to make sure that one of cURL, fopen with Streams (PHP 5), or fsockopen is enabled. If so, check to see if your server has any restrictions on timeouts (Zotpress sometimes needs more than 30 seconds to process a request to the Zotero servers).</p>
</div> | gpl-2.0 |
Almish/Deviclub | templates/as002055free/html/com_content/category/blog.php | 3998 | <?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers');
JHtml::_('behavior.caption');
?>
<div class="page-blog page-blog__<?php echo $this->pageclass_sfx;?>">
<?php if ($this->params->get('show_page_heading', 1)) : ?>
<div class="page_header">
<h2> <?php echo $this->escape($this->params->get('page_heading')); ?> </h2>
</div>
<?php endif; ?>
<?php if ($this->params->get('show_category_title', 1) or $this->params->get('page_subheading')) : ?>
<div class="category_title">
<h2> <?php echo $this->escape($this->params->get('page_subheading')); ?>
<?php if ($this->params->get('show_category_title')) : ?>
<span class="subheading-category"><?php echo $this->category->title;?></span>
<?php endif; ?>
</h2>
</div>
<?php endif; ?>
<?php if ($this->params->get('show_description', 1) || $this->params->def('show_description_image', 1)) : ?>
<div class="category_desc">
<?php if ($this->params->get('show_description_image') && $this->category->getParams()->get('image')) : ?>
<img src="<?php echo $this->category->getParams()->get('image'); ?>"/>
<?php endif; ?>
<?php if ($this->params->get('show_description') && $this->category->description) : ?>
<?php echo JHtml::_('content.prepare', $this->category->description, '', 'com_content.category'); ?>
<?php endif; ?>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php $leadingcount = 0; ?>
<?php if (!empty($this->lead_items)) : ?>
<div class="items-leading">
<?php foreach ($this->lead_items as &$item) : ?>
<div class="item item__blog leading-<?php echo $leadingcount; ?><?php echo $item->state == 0 ? ' system-unpublished' : null; ?>">
<?php
$this->item = &$item;
echo $this->loadTemplate('item');
?>
</div>
<div class="clearfix"></div>
<?php
$leadingcount++;
?>
<?php endforeach; ?>
</div><!-- end items-leading -->
<div class="clearfix"></div>
<?php endif; ?>
<?php
$introcount = (count($this->intro_items));
$counter = 0;
?>
<?php if (!empty($this->intro_items)) : ?>
<?php foreach ($this->intro_items as $key => &$item) : ?>
<?php
$key = ($key - $leadingcount) + 1;
$rowcount = (((int) $key - 1) % (int) $this->columns) + 1;
$row = $counter / $this->columns;
if ($rowcount == 1) : ?>
<div class="items-row cols-<?php echo (int) $this->columns;?> <?php echo 'row-'.$row; ?> row-fluid">
<?php endif; ?>
<div class="span<?php echo round((12 / $this->columns));?>">
<div class="item item__blog column-<?php echo $rowcount;?><?php echo $item->state == 0 ? ' system-unpublished' : null; ?>">
<?php
$this->item = &$item;
echo $this->loadTemplate('item');
?>
</div><!-- end item -->
<?php $counter++; ?>
</div><!-- end spann -->
<?php if (($rowcount == $this->columns) or ($counter == $introcount)): ?>
</div><!-- end row -->
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>
<?php if (!empty($this->link_items)) : ?>
<div class="items-more">
<?php echo $this->loadTemplate('links'); ?>
</div>
<?php endif; ?>
<?php if (!empty($this->children[$this->category->id])&& $this->maxLevel != 0) : ?>
<div class="category_children">
<h3> <?php echo JTEXT::_('JGLOBAL_SUBCATEGORIES'); ?> </h3>
<?php echo $this->loadTemplate('children'); ?> </div>
<?php endif; ?>
<?php if (($this->params->def('show_pagination', 1) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->get('pages.total') > 1)) : ?>
<div class="pagination">
<?php if ($this->params->def('show_pagination_results', 1)) : ?>
<p class="counter pull-right"> <?php echo $this->pagination->getPagesCounter(); ?> </p>
<?php endif; ?>
<?php echo $this->pagination->getPagesLinks(); ?> </div>
<?php endif; ?>
</div>
| gpl-2.0 |
CFDEMproject/OpenFOAM-1.6-ext | src/OpenFOAM/matrices/blockLduMatrix/BlockLduSolvers/BlockDiagonal/blockDiagonalSolvers.C | 1915 | /*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-6 H. Jasak All rights reserved
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Description
\*---------------------------------------------------------------------------*/
#include "blockLduSolvers.H"
#include "blockDiagonalSolvers.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineNamedTemplateTypeNameAndDebug(blockDiagonalSolverScalar, 0);
defineNamedTemplateTypeNameAndDebug(blockDiagonalSolverVector, 0);
defineNamedTemplateTypeNameAndDebug(blockDiagonalSolverTensor, 0);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //
| gpl-2.0 |
jeremyprice/RU_Python_II | examples/example_print_cmd_line_args.py | 112 | #!/usr/bin/env python3
import sys
for idx, arg in enumerate(sys.argv):
print('arg {}: {}'.format(idx,arg))
| gpl-2.0 |
linguisticteam/lti-wp-sitemap | tests/bootstrap.php | 490 | <?php
$_tests_dir = getenv('WP_TESTS_DIR');
if ( !$_tests_dir ) $_tests_dir = '/tmp/wordpress-tests-lib';
require_once $_tests_dir . '/includes/functions.php';
function _manually_load_plugin() {
require dirname( __FILE__ ) . '/../lti-sitemap.php';
}
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
require $_tests_dir . '/includes/bootstrap.php';
require_once dirname( __FILE__ ) . '/testcase-lti-sitemap.php';
require_once dirname( __FILE__ ) . '/datatypes/xml.php';
| gpl-2.0 |
white05/GreenHour | wp-content/plugins/capital-shortcodes/includes/ajax-related-posts.php | 1692 | <div id="popup_container">
<br>
<a href='../wp-content/plugins/capital-shortcodes/ajax-shortcodes.php?' title="Capital Shortcodes" class='button thickbox'>← Go Back</a>
<h3>Related Posts</h3>
<label class="shortcode-labels" for="related-posts-title">Related Posts Title:</label>
<input class="shortcode-text-inputs" type="text" id="related-posts-title" name="document-url" placeholder="Related Posts Title" />
<label class="shortcode-labels" for="related-posts-limit">Number of related posts to show:</label>
<input class="shortcode-text-inputs" type="text" id="related-posts-limit" name="related-posts-limit" placeholder="Number of related posts to show" />
<br />
<a href="#" class="insert-shortcode button button-primary button-large" >insert shortcode</a>
</div>
<script>
(function ($) {
// saves related posts title input value into a variable
$('#related-posts-title').on("keyup change", function() {
related_posts_title = $("#related-posts-title").val();
});
if (related_posts_title === undefined) {
var related_posts_title = "Related Posts";
}
// saves related posts limit input value into a variable
$('#related-posts-limit').on("keyup change", function() {
related_posts_limit = $("#related-posts-limit").val();
});
if (related_posts_limit === undefined) {
var related_posts_limit = "5";
}
// insert contact form
$('.insert-shortcode').click (function() {
tinymce.activeEditor.execCommand('mceInsertContent',false,'[related_posts related_posts_title="'+related_posts_title+'" limit="'+related_posts_limit+'"]');
tb_remove(); // remove the thickbox after inserting the shortcode
return false;
});
})(jQuery);
</script> | gpl-2.0 |
switzer/revive-adserver | lib/max/Dal/DataObjects/Users.php | 12321 | <?php
/*
+---------------------------------------------------------------------------+
| Revive Adserver |
| http://www.revive-adserver.com |
| |
| Copyright: See the COPYRIGHT.txt file. |
| License: GPLv2 or later, see the LICENSE.txt file. |
+---------------------------------------------------------------------------+
*/
/**
* Table Definition for users
*/
require_once 'DB_DataObjectCommon.php';
require_once MAX_PATH . '/lib/OA/Permission.php';
require_once 'Date.php';
class DataObjects_Users extends DB_DataObjectCommon
{
var $onDeleteCascade = true;
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
public $__table = 'users'; // table name
public $user_id; // MEDIUMINT(9) => openads_mediumint => 129
public $contact_name; // VARCHAR(255) => openads_varchar => 130
public $email_address; // VARCHAR(64) => openads_varchar => 130
public $username; // VARCHAR(64) => openads_varchar => 2
public $password; // VARCHAR(64) => openads_varchar => 2
public $language; // VARCHAR(5) => openads_varchar => 2
public $default_account_id; // MEDIUMINT(9) => openads_mediumint => 1
public $comments; // TEXT() => openads_text => 34
public $active; // TINYINT(1) => openads_tinyint => 145
public $sso_user_id; // INT(11) => openads_int => 1
public $date_created; // DATETIME() => openads_datetime => 14
public $date_last_login; // DATETIME() => openads_datetime => 14
public $email_updated; // DATETIME() => openads_datetime => 14
/* Static get */
function staticGet($k,$v=NULL) { return DB_DataObject::staticGetFromClassName('DataObjects_Users',$k,$v); }
var $defaultValues = array(
'contact_name' => '',
'email_address' => '',
'active' => 1,
'sso_user_id' => OX_DATAOBJECT_NULL,
'date_last_login' => OX_DATAOBJECT_NULL,
'email_updated' => OX_DATAOBJECT_NULL,
);
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
/**
* Handle all necessary operations when a user is inserted
*
* @see DB_DataObject::insert()
*/
function insert()
{
if (isset($this->username)) {
$this->username = strtolower($this->username);
}
if (empty($this->date_created)) {
$this->date_created = $this->formatDate(new Date());
}
if (empty($this->email_updated)) {
$this->email_updated = $this->formatDate(new Date());
}
return parent::insert();
}
/**
* Handle all necessary operations when a user is updated
*
* @see DB_DataObject::update()
*/
function update($dataObject = false)
{
if (isset($this->username)) {
$this->username = strtolower($this->username);
}
return parent::update($dataObject);
}
/**
* Checks is a username already exists in the database
*
* @param string $username
* @return boolean
*/
function userExists($username)
{
$this->username = strtolower($username);
return (bool)$this->count();
}
/**
* Returns array of unique users
*
* @return array
* @access public
*/
function getUniqueUsers()
{
return $this->getUniqueValuesFromColumn('username');
}
/**
* Check whether user is linked only to one account
*
* @return boolean True if linked only to one account, else false
*/
function countLinkedAccounts()
{
$doAccount_user_assoc = OA_Dal::factoryDO('account_user_assoc');
$doAccount_user_assoc->user_id = $this->user_id;
return $doAccount_user_assoc->count();
}
/**
* Returns user ID for specific username
*
* @param string $userName Username
* @return integer User ID or false if user do not exists
*/
function getUserIdByUserName($userName)
{
return $this->getUserIdByProperty('username', $userName);
}
/**
* Returns user ID for specific username
*
* @param string $userName Username
* @return integer User ID or false if user do not exists
*/
function getUserIdByProperty($propertyName, $propertyValue)
{
$this->whereAdd($propertyName.' = '.$this->quote($propertyValue));
if ($this->find()) {
$this->fetch();
return $this->user_id;
}
return false;
}
/**
* Returns array of users linked to entity
*
* @param string $entityName Inventory entity name (affiliates, clients, etc)
* @param integer $entityId Inventory entity ID
* @return array
*/
function getAccountUsersByEntity($entityName, $entityId)
{
$doUsers = OA_Dal::factoryDO('users');
$doAccount_user_assoc = OA_Dal::factoryDO('account_user_assoc');
$doAccount_user_assoc->account_id =
OA_Permission::getAccountIdForEntity($entityName, $entityId);
$doUsers->joinAdd($doAccount_user_assoc);
$doUsers->find();
return $this->_buildUsersTable($doUsers);
}
/**
* Returns array of admin users (@see _buildUsersTable)
*
* @return array
*/
function getAdminUsers()
{
$doUsers = OA_Dal::factoryDO('users');
$doAccounts = OA_Dal::factoryDO('accounts');
$doAccounts->account_id = OA_Dal_ApplicationVariables::get('admin_account_id');
$doAccount_user_assoc = OA_Dal::factoryDO('account_user_assoc');
$doAccount_user_assoc->joinAdd($doAccounts);
$doUsers->joinAdd($doAccount_user_assoc);
$doUsers->find();
return $this->_buildUsersTable($doUsers);
}
/**
* Updates the date_last_log_in time of user.
*
* @return date
*/
function logDateLastLogIn($date = null)
{
if (!$date) {
$date = new Date();
}
$this->date_last_login = $this->formatDate($date);
return $this->update();
}
/**
* Sets on the user account accounts/permissions.
*
* @param integer $userId
* @param array $aAccountPermissions
*/
function addUserPermissions($userId, $aAccountPermissions)
{
foreach ($aAccountPermissions as $accountId => $aPermissions) {
foreach ($aPermissions as $permissionId => $isAllowed) {
$doAccount_user_permission_assoc =
OA_Dal::factoryDO('account_user_permission_assoc');
$doAccount_user_permission_assoc->account_id = $accountId;
$doAccount_user_permission_assoc->user_id = $userId;
$doAccount_user_permission_assoc->permission_id = $permissionId;
$doAccount_user_permission_assoc->is_allowed = 1;
if (!$doAccount_user_permission_assoc->find()) {
if (!$doAccount_user_permission_assoc->insert()) {
return false;
}
}
}
}
return true;
}
/**
* Returns an array of users permissions. Format of array:
* array(
* accountId => array(
* permissions_id => is_allowed
* )
* )
*
* @param integer $userId
* @return array
*/
function getUsersPermissions($userId)
{
$aPermissions = array();
$doAccount_user_permission_assoc =
OA_Dal::factoryDO('account_user_permission_assoc');
$doAccount_user_permission_assoc->user_id = $userId;
$doAccount_user_permission_assoc->find();
while ($doAccount_user_permission_assoc->fetch()) {
$aPermissions[$doAccount_user_permission_assoc->account_id]
[$doAccount_user_permission_assoc->permission_id] =
$doAccount_user_permission_assoc->is_allowed;
}
return $aPermissions;
}
/**
* Returns array of account Ids which user is linked to
*
* @return array
*/
function getLinkedAccountsIds($userId = null)
{
if (empty($userId)) {
$userId = $this->user_id;
}
$doAccount_user_assoc = OA_Dal::factoryDO('account_user_assoc');
$doAccount_user_assoc->user_id = $userId;
return $doAccount_user_assoc->getAll('account_id');
}
/**
* Reads users data from database and returns them as array when
* key is user id and value is array of user values
*
* @param DataObjects_Users $doUsers
* @return array
*/
function _buildUsersTable(&$doUsers)
{
$aUsers = array();
while($doUsers->fetch()) {
$aUsers[$doUsers->user_id] = $doUsers->toArray();
// is user linked to his last account
$aUsers[$doUsers->user_id]['toDelete'] = ($doUsers->countLinkedAccounts() == 1);
}
return $aUsers;
}
function _auditEnabled()
{
return true;
}
function _getContextId()
{
return $this->user_id;
}
function _getContext()
{
return 'User';
}
/**
* A method to return an array of account IDs of the account(s) that
* should "own" any audit trail entries for this entity type; these
* are NOT related to the account ID of the currently active account
* (which is performing some kind of action on the entity), but is
* instead related to the type of entity, and where in the account
* heirrachy the entity is located.
*
* @return array An array containing up to three indexes:
* - "OA_ACCOUNT_ADMIN" or "OA_ACCOUNT_MANAGER":
* Contains the account ID of the manager account
* that needs to be able to see the audit trail
* entry, or, the admin account, if the entity
* is a special case where only the admin account
* should see the entry.
* - "OA_ACCOUNT_ADVERTISER":
* Contains the account ID of the advertiser account
* that needs to be able to see the audit trail
* entry, if such an account exists.
* - "OA_ACCOUNT_TRAFFICKER":
* Contains the account ID of the trafficker account
* that needs to be able to see the audit trail
* entry, if such an account exists.
*/
public function getOwningAccountIds($resetCache = false)
{
// Special case - return the admin account ID only.
// This is because we can only store one account ID for each
// type of account, however, it's possible for a user to be
// linked to (for example) multiple accounts, which are in turn
// owned by multiple manager accounts, so it's simply not possible
// to record all possible manager account IDs; so, we restrict
// auditing of user entities to be only visible to the admin
// account
$aAccountIds = array(
OA_ACCOUNT_ADMIN => OA_Dal_ApplicationVariables::get('admin_account_id')
);
return $aAccountIds;
}
/**
* build an accounts specific audit array
*
* @param integer $actionid
* @param array $aAuditFields
*/
function _buildAuditArray($actionid, &$aAuditFields)
{
$aAuditFields['key_desc'] = $this->username;
// Do not log the password hash in the audit record, just the fact that it was changed
if (isset($aAuditFields['password'])) { $aAuditFields['password'] = '******'; }
}
}
?>
| gpl-2.0 |
jzalden/SER316-Karlsruhe | src/net/sf/memoranda/ui/NotesControlPanel.java | 11298 | package net.sf.memoranda.ui;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.KeyListener;
import java.awt.event.KeyEvent;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JCheckBoxMenuItem;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.JTabbedPane;
import javax.swing.JToolBar;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import net.sf.memoranda.CurrentProject;
import net.sf.memoranda.CurrentNote;
import net.sf.memoranda.Note;
import net.sf.memoranda.date.CurrentDate;
import net.sf.memoranda.util.Local;
import net.sf.memoranda.util.CurrentStorage;
import net.sf.memoranda.util.Configuration;
//import net.sf.memoranda.ui.App;
//import net.sf.memoranda.ui.AppFrame;
/*$Id: NotesControlPanel.java,v 1.16 2005/05/05 16:19:16 ivanrise Exp $*/
public class NotesControlPanel extends JPanel {
/**
*
*/
private static final long serialVersionUID = -6066842134084473465L;
BorderLayout borderLayout1 = new BorderLayout();
SearchPanel searchPanel = new SearchPanel();
NotesListPanel notesListPanel = new NotesListPanel();
BookmarksPanel bookmarksListPanel = new BookmarksPanel();
JTabbedPane tabbedPane = new JTabbedPane();
JToolBar toolBar = new JToolBar();
NotesList notesList = null;
FlowLayout flowLayout1 = new FlowLayout();
JButton ppOpenB = new JButton();
JPanel buttonsPanel = new JPanel();
JMenuItem ppAddBkmrk = new JMenuItem();
JMenuItem ppClearNote = new JMenuItem();
JCheckBoxMenuItem ppInvertSort = new JCheckBoxMenuItem();
JPopupMenu notesPPMenu = new JPopupMenu();
JMenuItem ppOpenNote = new JMenuItem();
JMenuItem ppRemoveBkmrk = new JMenuItem();
public NotesControlPanel() {
try {
jbInit();
}
catch (Exception ex) {
new ExceptionDialog(ex);
}
}
void jbInit() throws Exception {
tabbedPane.setFont(new java.awt.Font("Dialog", 1, 10));
tabbedPane.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(ChangeEvent e) {
tabbedPane_stateChanged(e);
}
});
tabbedPane.setTabPlacement(JTabbedPane.BOTTOM);
this.setLayout(borderLayout1);
toolBar.setRequestFocusEnabled(false);
toolBar.setFloatable(false);
flowLayout1.setAlignment(FlowLayout.RIGHT);
flowLayout1.setVgap(0);
ppOpenB.setMaximumSize(new Dimension(34, 20));
ppOpenB.setMinimumSize(new Dimension(24, 10));
ppOpenB.setOpaque(false);
ppOpenB.setPreferredSize(new Dimension(24, 20));
ppOpenB.setBorderPainted(false);
ppOpenB.setFocusPainted(false);
ppOpenB.setMargin(new Insets(0, 0, 0, 0));
ppOpenB.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
ppOpenB_actionPerformed(e);
}
});
ppOpenB.setIcon(
new ImageIcon(net.sf.memoranda.ui.AppFrame.class.getResource("resources/icons/nopen.png")));
buttonsPanel.setMinimumSize(new Dimension(70, 22));
buttonsPanel.setOpaque(false);
buttonsPanel.setRequestFocusEnabled(false);
buttonsPanel.setLayout(flowLayout1);
ppAddBkmrk.setFont(new java.awt.Font("Dialog", 1, 11));
ppAddBkmrk.setText(Local.getString("Set bookmark"));
ppAddBkmrk.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
ppAddBkmrk_actionPerformed(e);
}
});
ppAddBkmrk.setIcon(
new ImageIcon(net.sf.memoranda.ui.AppFrame.class.getResource("resources/icons/addbookmark.png")));
ppClearNote.setFont(new java.awt.Font("Dialog", 1, 11));
ppClearNote.setText(Local.getString("Clear note"));
ppClearNote.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
ppClearNote_actionPerformed(e);
}
});
ppClearNote.setIcon(
new ImageIcon(net.sf.memoranda.ui.AppFrame.class.getResource("resources/icons/editdelete.png")));
ppClearNote.setEnabled(false);
notesPPMenu.setFont(new java.awt.Font("Dialog", 1, 10));
ppOpenNote.setFont(new java.awt.Font("Dialog", 1, 11));
ppOpenNote.setText(Local.getString("Go to note"));
ppOpenNote.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
ppOpenNote_actionPerformed(e);
}
});
ppOpenNote.setEnabled(false);
ppInvertSort.setFont(new java.awt.Font("Dialog", 1, 11));
ppInvertSort.setText(Local.getString("Invert Sort Order"));
ppInvertSort.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
ppInvertSort_actionPerformed(e);
}
});
ppInvertSort.setEnabled(true);
boolean descSort =
(Configuration.get("NOTES_SORT_ORDER").equals("true"));
ppInvertSort.setSelected(descSort);
ppRemoveBkmrk.setFont(new java.awt.Font("Dialog", 1, 11));
ppRemoveBkmrk.setText(Local.getString("Remove bookmark"));
ppRemoveBkmrk.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
ppRemoveBkmrk_actionPerformed(e);
}
});
ppRemoveBkmrk.setIcon(
new ImageIcon(net.sf.memoranda.ui.AppFrame.class.getResource("resources/icons/removebookmark.png")));
ppRemoveBkmrk.setEnabled(false);
tabbedPane.add(notesListPanel, Local.getString("Notes"));
tabbedPane.add(bookmarksListPanel, Local.getString("Bookmarks"));
tabbedPane.add(searchPanel, Local.getString("Search"));
this.add(toolBar, BorderLayout.NORTH);
buttonsPanel.add(ppOpenB, null);
toolBar.add(buttonsPanel, null);
toolBar.addSeparator();
this.add(tabbedPane, BorderLayout.CENTER);
PopupListener lst = new PopupListener();
notesListPanel.notesList.addMouseListener(lst);
bookmarksListPanel.notesList.addMouseListener(lst);
searchPanel.notesList.addMouseListener(lst);
ListSelectionListener lsl = new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
ppSetEnabled();
}
};
notesListPanel.notesList.getSelectionModel().addListSelectionListener(lsl);
bookmarksListPanel.notesList.getSelectionModel().addListSelectionListener(lsl);
searchPanel.notesList.getSelectionModel().addListSelectionListener(lsl);
notesList = notesListPanel.notesList;
notesPPMenu.add(ppOpenNote);
notesPPMenu.add(ppInvertSort);
notesPPMenu.addSeparator();
notesPPMenu.add(ppAddBkmrk);
notesPPMenu.add(ppRemoveBkmrk);
notesPPMenu.addSeparator();
notesPPMenu.add(ppClearNote);
// remove notes using the DEL key
KeyListener delNotes = new KeyListener() {
public void keyPressed(KeyEvent e){
if(e.getKeyCode()==KeyEvent.VK_DELETE) {
ppClearNote_actionPerformed(null);
}
}
public void keyReleased(KeyEvent e){}
public void keyTyped(KeyEvent e){}
};
notesListPanel.notesList.addKeyListener(delNotes);
bookmarksListPanel.notesList.addKeyListener(delNotes);
searchPanel.notesList.addKeyListener(delNotes);
}
public void refresh() {
notesListPanel.notesList.update();
bookmarksListPanel.notesList.update();
}
void tabbedPane_stateChanged(ChangeEvent e) {
if(notesList!=null) notesList.clearSelection();
switch (tabbedPane.getSelectedIndex()) {
case 0 :
notesList = notesListPanel.notesList;
break;
case 1 :
notesList = bookmarksListPanel.notesList;
break;
case 2 :
notesList = searchPanel.notesList;
break;
}
ppAddBkmrk.setEnabled(false);
ppRemoveBkmrk.setEnabled(false);
}
class PopupListener extends MouseAdapter {
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2)
setActiveNote();
}
public void mousePressed(MouseEvent e) {
maybeShowPopup(e);
}
public void mouseReleased(MouseEvent e) {
maybeShowPopup(e);
}
private void maybeShowPopup(MouseEvent e) {
if (e.isPopupTrigger()) {
notesPPMenu.show(e.getComponent(), e.getX(), e.getY());
}
}
}
void setActiveNote() {
Note note = (Note) notesList.getNote(notesList.getSelectedIndex());
CurrentDate.set(note.getDate());
CurrentNote.set(note,true);
}
void ppOpenB_actionPerformed(ActionEvent e) {
notesPPMenu.show(
toolBar,
(int) ppOpenB.getLocation().getX(),
(int) ppOpenB.getLocation().getY() + 24);
}
void ppAddBkmrk_actionPerformed(ActionEvent e) {
for (int i = 0; i < notesList.getSelectedIndices().length; i++) {
Note note = (Note) notesList.getNote(notesList.getSelectedIndices()[i]);
note.setMark(true);
}
notesList.updateUI();
bookmarksListPanel.notesList.update();
ppSetEnabled();
}
void ppClearNote_actionPerformed(ActionEvent e) {
String msg;
if (notesList.getSelectedIndices().length > 1)
msg =
Local.getString(Local.getString("Clear"))
+ " "
+ notesList.getSelectedIndices().length
+ " "
+ Local.getString("notes")
+ "\n"
+ Local.getString("Are you sure?");
else
msg =
Local.getString("Clear note")
+ "\n'"
+ ((Note) notesList.getNote(notesList.getSelectedIndex())).getDate().getFullDateString()
+ "'\n"
+ Local.getString("Are you sure?");
int n =
JOptionPane.showConfirmDialog(
App.getFrame(),
msg,
Local.getString("Clear note"),
JOptionPane.YES_NO_OPTION);
if (n != JOptionPane.YES_OPTION)
return;
for (int i = 0; i < notesList.getSelectedIndices().length; i++) {
Note note = (Note) notesList.getNote(notesList.getSelectedIndices()[i]);
if(CurrentProject.getNoteList().getActiveNote() != null && note.getDate().equals(CurrentProject.getNoteList().getActiveNote().getDate())){
/*Debug*/ System.out.println("[DEBUG] Current note removed");
CurrentNote.set(null,true);
}
CurrentProject.getNoteList().removeNote(note.getDate(), note.getId());
CurrentStorage.get().removeNote(note);
}
bookmarksListPanel.notesList.update();
searchPanel.notesList.update();
notesListPanel.notesList.update();
notesList.updateUI();
notesList.clearSelection();
}
void ppOpenNote_actionPerformed(ActionEvent e) {
setActiveNote();
}
void ppInvertSort_actionPerformed(ActionEvent e) {
Configuration.put(
"NOTES_SORT_ORDER",
new Boolean(ppInvertSort.isSelected()));
Configuration.saveConfig();
notesList.invertSortOrder();
notesList.update();
}
void ppRemoveBkmrk_actionPerformed(ActionEvent e) {
for (int i = 0; i < notesList.getSelectedIndices().length; i++) {
Note note = (Note) notesList.getNote(notesList.getSelectedIndices()[i]);
note.setMark(false);
}
bookmarksListPanel.notesList.update();
ppSetEnabled();
notesList.updateUI();
notesList.clearSelection();
((AppFrame)App.getFrame()).workPanel.dailyItemsPanel.editorPanel.editor.requestFocus();
}
void ppSetEnabled() {
boolean enbl = (notesList.getModel().getSize() > 0) && (notesList.getSelectedIndex() > -1);
ppRemoveBkmrk.setEnabled(enbl && (((Note) notesList.getNote(notesList.getSelectedIndex())).isMarked())
|| notesList.getSelectedIndices().length > 1);
ppAddBkmrk.setEnabled(enbl && !(((Note) notesList.getNote(notesList.getSelectedIndex())).isMarked())
|| notesList.getSelectedIndices().length > 1);
ppOpenNote.setEnabled(enbl);
ppClearNote.setEnabled(enbl);
}
} | gpl-2.0 |
smarr/Truffle | compiler/src/org.graalvm.graphio/src/org/graalvm/graphio/GraphStructure.java | 9099 | /*
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.graalvm.graphio;
import java.util.Collection;
import java.util.Map;
/**
* Interface that defines structure of a compiler graph. The structure of a graph is composed from
* nodes with properties, the classes of individual nodes, and ports associated with each node that
* may contain edges to other nodes. The structure of a graph is assumed to be immutable for the
* time of {@link GraphOutput operations} on it.
*
* @param <G> the type of the (root node of a) graph
* @param <N> the type of nodes
* @param <C> the type of node classes
* @param <P> the type of node ports
*/
public interface GraphStructure<G, N, C, P> {
/**
* Casts {@code obj} to graph, if possible. If the given object <code>obj</code> can be seen as
* a graph or sub-graph of a graph, then return the properly typed instance. Otherwise return
* <code>null</code>
*
* @param currentGraph the currently processed graph
* @param obj an object to check and view as a graph
* @return appropriate graph object or <code>null</code> if the object doesn't represent a graph
*/
G graph(G currentGraph, Object obj);
/**
* Nodes of a graph. Each graph is composed from a fixed set of nodes. This method returns an
* iterable which provides access to all of them - the number of nodes provided by the iterable
* must match the number returned by {@link #nodesCount(java.lang.Object)} method.
*
* @see #nodesCount(java.lang.Object)
* @param graph the graph to query for nodes
* @return iterable with all the graph's nodes
*/
Iterable<? extends N> nodes(G graph);
/**
* Number of nodes in a graph. The number must match the content returned by
* {@link #nodes(java.lang.Object)} method.
*
* @param graph the graph to query
* @return the number of nodes that will be returned by {@link #nodes(java.lang.Object)}
*/
int nodesCount(G graph);
/**
* Id of {@code node}. Each node in the graph is uniquely identified by an integer value. If two
* nodes have the same id, then they shall be <code>==</code> to each other.
*
* @param node the node to query for an id
* @return the id of the node
*/
int nodeId(N node);
/**
* Checks if there is a predecessor for a node.
*
* @param node the node to check
* @return <code>true</code> if it has a predecessor, <code>false</code> otherwise
*/
boolean nodeHasPredecessor(N node);
/**
* Collects node properties. Each node can be associated with additional properties identified
* by their name. This method shall copy them into the provided map.
*
* @param graph the current graph
* @param node the node to collect properties for
* @param properties the map to put the properties to
*/
void nodeProperties(G graph, N node, Map<String, ? super Object> properties);
/**
* Finds a node for {@code obj}, if possible. If the given object <code>obj</code> can be seen
* as an instance of node return the properly typed instance of the node class. Otherwise return
* <code>null</code>.
*
* @param obj an object to find node for
* @return appropriate graph object or <code>null</code> if the object doesn't represent a node
*/
N node(Object obj);
/**
* Finds a node class for {@code obj}, if possible. If the given object <code>obj</code> can be
* seen as an instance of node class return the properly typed instance of the node class.
* Otherwise return <code>null</code>.
*
* @param obj an object to find node class for
* @return appropriate graph object or <code>null</code> if the object doesn't represent a node
* class
*/
C nodeClass(Object obj);
/**
* Finds a node class for {@code node}.
*
* @param node an instance of node in this graph
* @return the node's node class, never <code>null</code>
*/
C classForNode(N node);
/**
* The template used to build the name of nodes of this class. The template may use references
* to inputs ({i#inputName}) and its properties ({p#propertyName}).
*
* @param nodeClass the node class to find name template for
* @return the string representing the template
*/
String nameTemplate(C nodeClass);
/**
* Java class for a node class.
*
* @param nodeClass the node class
* @return the {@link Class} or other type representation of the node class
*/
Object nodeClassType(C nodeClass);
/**
* Input ports of a node class. Each node class has a fixed set of ports where individual edges
* can attach to.
*
* @param nodeClass the node class
* @return input ports for the node class
*/
P portInputs(C nodeClass);
/**
* Output ports of a node class. Each node class has a fixed set of ports from where individual
* edges can point to other nodes.
*
* @param nodeClass the node class
* @return output ports for the node class
*/
P portOutputs(C nodeClass);
/**
* The number of edges in a port. The protocol will then call methods
* {@link #edgeDirect(java.lang.Object, int)}, {@link #edgeName(java.lang.Object, int)},
* {@link #edgeType(java.lang.Object, int)} and
* {@link #edgeNodes(java.lang.Object, java.lang.Object, java.lang.Object, int)} for indexes
* from <code>0</code> to <code>portSize - 1</code>
*
* @param port the port
* @return number of edges in this port
*/
int portSize(P port);
/**
* Checks whether an edge is direct. Direct edge shall have exactly one
* {@linkplain #edgeNodes(java.lang.Object, java.lang.Object, java.lang.Object, int) node} - it
* is an error to return more than one for such an edge from the
* {@linkplain #edgeNodes(java.lang.Object, java.lang.Object, java.lang.Object, int) method}.
*
* @param port the port
* @param index index from <code>0</code> to {@link #portSize(java.lang.Object)} minus
* <code>1</code>
* @return <code>true</code> if only one node can be returned from
* {@link #edgeNodes(java.lang.Object, java.lang.Object, java.lang.Object, int)} method
*/
boolean edgeDirect(P port, int index);
/**
* The name of an edge.
*
* @param port the port
* @param index index from <code>0</code> to {@link #portSize(java.lang.Object)} minus
* <code>1</code>
* @return the name of the edge
*/
String edgeName(P port, int index);
/**
* Type of an edge. The type must be a graph
* <q>enum</q> - e.g. either real instance of {@link Enum} subclass, or something that the
* {@link GraphOutput.Builder} can recognize as
* <q>enum</q>.
*
* @param port
* @param index index from <code>0</code> to {@link #portSize(java.lang.Object)} minus
* <code>1</code>
* @return any {@link Enum} representing type of the edge
*/
Object edgeType(P port, int index);
/**
* Nodes where the edges for a port lead to/from. This method is called for both
* {@link #edgeDirect(java.lang.Object, int) direct/non-direct edges}. In case of a direct edge
* the returned collection must have exactly one element.
*
* @param graph the graph
* @param node the node in the graph
* @param port port of the node class
* @param index index from <code>0</code> to {@link #portSize(java.lang.Object)} minus
* <code>1</code>
* @return <code>null</code> if there are no edges associated with given port or collection of
* nodes where to/from the edges lead to
*/
Collection<? extends N> edgeNodes(G graph, N node, P port, int index);
}
| gpl-2.0 |
universsky/openjdk | langtools/test/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsForLambdaTest.java | 4750 | /*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 8044411 8079060
* @summary Tests the RuntimeParameterVisibleAnnotations/RuntimeParameterInvisibleAnnotations attribute.
* @library /tools/lib /tools/javac/lib ../lib
* @ignore 8079060 javac does not generate RuntimeParameterAnnotation attributes for lambda expressions
* @build WorkAnnotations TestBase TestResult InMemoryFileManager ToolBox
* @build TestCase ClassType TestAnnotationInfo
* @build RuntimeParameterAnnotationsForLambdaTest AnnotationsTestBase RuntimeParameterAnnotationsTestBase
* @run main RuntimeParameterAnnotationsForLambdaTest
*/
import java.util.List;
import java.util.stream.Collectors;
import com.sun.tools.classfile.ClassFile;
import com.sun.tools.classfile.Method;
/**
* RuntimeParameterAnnotationsForLambdaTest is a test which checks that RuntimeVisibleParameterAnnotationsAttribute
* and RuntimeInvisibleParameterAnnotationsAttribute are generated properly for lambda expressions.
* The test checks both single and repeatable annotations.
* All possible combinations of retention policies are tested.
*
* The test generates source code, compiles it and checks the byte code.
*
* See README.txt for more information.
*/
public class RuntimeParameterAnnotationsForLambdaTest extends RuntimeParameterAnnotationsTestBase {
private static final String CLASS_NAME = "Test";
private static final String SOURCE_TEMPLATE =
"public class " + CLASS_NAME + " {\n" +
" interface I { void method(int a, double b, String c); }\n" +
" %SOURCE%\n" +
"}";
public static void main(String[] args) throws TestFailedException {
new RuntimeParameterAnnotationsForLambdaTest().test();
}
@Override
public void test() throws TestFailedException {
try {
for (TestAnnotationInfos annotations : getAllCombinationsOfAnnotations()) {
try {
TestCase.TestMethodInfo testMethodInfo = new TestCase.TestMethodInfo(0, null, "lambda", false, false);
TestCase.TestParameterInfo p1 = testMethodInfo.addParameter("int", "a");
annotations.annotate(p1);
testMethodInfo.addParameter("double", "b");
TestCase.TestParameterInfo p3 = testMethodInfo.addParameter("String", "c");
annotations.annotate(p3);
String source = SOURCE_TEMPLATE.replace("%SOURCE%", generateLambdaSource(testMethodInfo));
echo("Testing:\n" + source);
addTestCase(source);
ClassFile classFile = readClassFile(compile(source).getClasses().get(CLASS_NAME));
boolean isFoundLambda = false;
for (Method method : classFile.methods) {
if (method.getName(classFile.constant_pool).startsWith("lambda$")) {
isFoundLambda = true;
testAttributes(testMethodInfo, classFile, method);
}
}
checkTrue(isFoundLambda, "The tested lambda method was not found.");
} catch (Exception e) {
addFailure(e);
}
}
} finally {
checkStatus();
}
}
public String generateLambdaSource(TestCase.TestMethodInfo method) {
return method.parameters.stream()
.map(TestCase.TestParameterInfo::generateSource)
.collect(Collectors.joining(", ", "I i = (", ") -> {};"));
}
@Override
public List<TestCase> generateTestCases() {
throw new UnsupportedOperationException();
}
}
| gpl-2.0 |
marcus-at-localhorst/phpwcms | include/inc_lib/classes/class.iptc.php | 19412 | <?php
/**
* Class for some IPTC functions.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* @ingroup Media
*/
/**
* Class for some IPTC functions.
*
* Taken from MediaWiki 1.28.0 and adapted for phpwcms
* @link https://www.mediawiki.org
*
* @ingroup Media
*/
class IPTC {
/**
* This takes the results of iptcparse() and puts it into a
* form that can be handled by mediawiki. Generally called from
* BitmapMetadataHandler::doApp13.
*
* @see http://www.iptc.org/std/IIM/4.1/specification/IIMV4.1.pdf
*
* @param string $rawData The app13 block from jpeg containing iptc/iim data
* @return array IPTC metadata array
*/
static function parse( $rawData ) {
$parsed = iptcparse( $rawData );
$data = array();
if ( !is_array( $parsed ) ) {
return $data;
}
$c = '';
// charset info contained in tag 1:90.
if ( isset( $parsed['1#090'] ) && isset( $parsed['1#090'][0] ) ) {
$c = self::getCharset( $parsed['1#090'][0] );
if ( $c === false ) {
// Unknown charset. refuse to parse.
// note: There is a different between
// unknown and no charset specified.
return array();
}
unset( $parsed['1#090'] );
}
foreach ( $parsed as $tag => $val ) {
if ( isset( $val[0] ) && trim( $val[0] ) === '' ) {
//wfDebugLog( 'iptc', "IPTC tag $tag had only whitespace as its value." );
continue;
}
switch ( $tag ) {
case '2#120': /*IPTC caption. mapped with exif ImageDescription*/
$data['ImageDescription'] = self::convIPTC( $val, $c );
break;
case '2#116': /* copyright. Mapped with exif copyright */
$data['Copyright'] = self::convIPTC( $val, $c );
break;
case '2#080': /* byline. Mapped with exif Artist */
/* merge with byline title (2:85)
* like how exif does it with
* Title, person. Not sure if this is best
* approach since we no longer have the two fields
* separate. each byline title entry corresponds to a
* specific byline. */
$bylines = self::convIPTC( $val, $c );
if ( isset( $parsed['2#085'] ) ) {
$titles = self::convIPTC( $parsed['2#085'], $c );
} else {
$titles = array();
}
$titleCount = count( $titles );
for ( $i = 0; $i < $titleCount; $i++ ) {
if ( isset( $bylines[$i] ) ) {
// theoretically this should always be set
// but doesn't hurt to be careful.
$bylines[$i] = $titles[$i] . ', ' . $bylines[$i];
}
}
$data['Artist'] = $bylines;
break;
case '2#025': /* keywords */
$data['Keywords'] = self::convIPTC( $val, $c );
break;
case '2#101': /* Country (shown)*/
$data['CountryDest'] = self::convIPTC( $val, $c );
break;
case '2#095': /* state/province (shown) */
$data['ProvinceOrStateDest'] = self::convIPTC( $val, $c );
break;
case '2#090': /* city (Shown) */
$data['CityDest'] = self::convIPTC( $val, $c );
break;
case '2#092': /* sublocation (shown) */
$data['SublocationDest'] = self::convIPTC( $val, $c );
break;
case '2#005': /* object name/title */
$data['ObjectName'] = self::convIPTC( $val, $c );
break;
case '2#040': /* special instructions */
$data['SpecialInstructions'] = self::convIPTC( $val, $c );
break;
case '2#105': /* headline*/
$data['Headline'] = self::convIPTC( $val, $c );
break;
case '2#110': /* credit */
/*"Identifies the provider of the objectdata,
* not necessarily the owner/creator". */
$data['Credit'] = self::convIPTC( $val, $c );
break;
case '2#115': /* source */
/* "Identifies the original owner of the intellectual content of the
*objectdata. This could be an agency, a member of an agency or
*an individual." */
$data['Source'] = self::convIPTC( $val, $c );
break;
case '2#007': /* edit status (lead, correction, etc) */
$data['EditStatus'] = self::convIPTC( $val, $c );
break;
case '2#015': /* category. deprecated. max 3 letters in theory, often more */
$data['iimCategory'] = self::convIPTC( $val, $c );
break;
case '2#020': /* category. deprecated. */
$data['iimSupplementalCategory'] = self::convIPTC( $val, $c );
break;
case '2#010': /*urgency (1-8. 1 most, 5 normal, 8 low priority)*/
$data['Urgency'] = self::convIPTC( $val, $c );
break;
case '2#022':
/* "Identifies objectdata that recurs often and predictably...
* Example: Euroweather" */
$data['FixtureIdentifier'] = self::convIPTC( $val, $c );
break;
case '2#026':
/* Content location code (iso 3166 + some custom things)
* ex: TUR (for turkey), XUN (for UN), XSP (outer space)
* See wikipedia article on iso 3166 and appendix D of iim std. */
$data['LocationDestCode'] = self::convIPTC( $val, $c );
break;
case '2#027':
/* Content location name. Full printable name
* of location of photo. */
$data['LocationDest'] = self::convIPTC( $val, $c );
break;
case '2#065':
/* Originating Program.
* Combine with Program version (2:70) if present.
*/
$software = self::convIPTC( $val, $c );
if ( count( $software ) !== 1 ) {
// according to iim standard this cannot have multiple values
// so if there is more than one, something weird is happening,
// and we skip it.
//wfDebugLog( 'iptc', 'IPTC: Wrong count on 2:65 Software field' );
break;
}
if ( isset( $parsed['2#070'] ) ) {
// if a version is set for the software.
$softwareVersion = self::convIPTC( $parsed['2#070'], $c );
$data['SoftwareVersion'] = $softwareVersion;
unset( $parsed['2#070'] );
$data['Software'] = array( array( $software[0], $softwareVersion[0] ) );
} else {
$data['Software'] = $software;
}
break;
case '2#070':
$softwareVersion = self::convIPTC( $parsed['2#070'], $c );
$data['SoftwareVersion'] = $softwareVersion;
if ( isset( $parsed['2#065'] ) ) {
// if a version is set for the software.
$software = self::convIPTC( $parsed['2#065'], $c );
unset( $parsed['2#065'] );
$data['Software'] = array( array( $software[0], $softwareVersion[0] ) );
}
break;
case '2#075':
/* Object cycle.
* a for morning (am), p for evening, b for both */
$data['ObjectCycle'] = self::convIPTC( $val, $c );
break;
case '2#100':
/* Country/Primary location code.
* "Indicates the code of the country/primary location where the
* intellectual property of the objectdata was created"
* unclear how this differs from 2#026
*/
$data['CountryCodeDest'] = self::convIPTC( $val, $c );
break;
case '2#103':
/* original transmission ref.
* "A code representing the location of original transmission ac-
* cording to practises of the provider."
*/
$data['OriginalTransmissionRef'] = self::convIPTC( $val, $c );
break;
case '2#118': /*contact*/
$data['Contact'] = self::convIPTC( $val, $c );
break;
case '2#122':
/* Writer/Editor
* "Identification of the name of the person involved in the writing,
* editing or correcting the objectdata or caption/abstract."
*/
$data['Writer'] = self::convIPTC( $val, $c );
break;
case '2#135': /* lang code */
$data['LanguageCode'] = self::convIPTC( $val, $c );
break;
// Start date stuff.
// It doesn't accept incomplete dates even though they are valid
// according to spec.
// Should potentially store timezone as well.
case '2#055':
// Date created (not date digitized).
// Maps to exif DateTimeOriginal
if ( isset( $parsed['2#060'] ) ) {
$time = $parsed['2#060'];
} else {
$time = array();
}
$timestamp = self::timeHelper( $val, $time, $c );
if ( $timestamp ) {
$data['DateTimeOriginal'] = $timestamp;
}
break;
case '2#062':
// Date converted to digital representation.
// Maps to exif DateTimeDigitized
if ( isset( $parsed['2#063'] ) ) {
$time = $parsed['2#063'];
} else {
$time = array();
}
$timestamp = self::timeHelper( $val, $time, $c );
if ( $timestamp ) {
$data['DateTimeDigitized'] = $timestamp;
}
break;
case '2#030':
// Date released.
if ( isset( $parsed['2#035'] ) ) {
$time = $parsed['2#035'];
} else {
$time = array();
}
$timestamp = self::timeHelper( $val, $time, $c );
if ( $timestamp ) {
$data['DateTimeReleased'] = $timestamp;
}
break;
case '2#037':
// Date expires.
if ( isset( $parsed['2#038'] ) ) {
$time = $parsed['2#038'];
} else {
$time = array();
}
$timestamp = self::timeHelper( $val, $time, $c );
if ( $timestamp ) {
$data['DateTimeExpires'] = $timestamp;
}
break;
case '2#000': /* iim version */
// unlike other tags, this is a 2-byte binary number.
// technically this is required if there is iptc data
// but in practise it isn't always there.
if ( strlen( $val[0] ) == 2 ) {
// if is just to be paranoid.
$versionValue = ord( substr( $val[0], 0, 1 ) ) * 256;
$versionValue += ord( substr( $val[0], 1, 1 ) );
$data['iimVersion'] = $versionValue;
}
break;
case '2#004':
// IntellectualGenere.
// first 4 characters are an id code
// That we're not really interested in.
// This prop is weird, since it's
// allowed to have multiple values
// in iim 4.1, but not in the XMP
// stuff. We're going to just
// extract the first value.
$con = self::convIPTC( $val, $c );
if ( strlen( $con[0] ) < 5 ) {
//wfDebugLog( 'iptc', 'IPTC: 2:04 too short. Ignoring.' );
break;
}
$extracted = substr( $con[0], 4 );
$data['IntellectualGenre'] = $extracted;
break;
case '2#012':
// Subject News code - this is a compound field
// at the moment we only extract the subject news
// code, which is an 8 digit (ascii) number
// describing the subject matter of the content.
$codes = self::convIPTC( $val, $c );
foreach ( $codes as $ic ) {
$fields = explode( ':', $ic, 3 );
if ( count( $fields ) < 2 || $fields[0] !== 'IPTC' ) {
//wfDebugLog( 'IPTC', 'IPTC: Invalid 2:12 - ' . $ic );
break;
}
$data['SubjectNewsCode'] = $fields[1];
}
break;
// purposely does not do 2:125, 2:130, 2:131,
// 2:47, 2:50, 2:45, 2:42, 2:8, 2:3
// 2:200, 2:201, 2:202
// or the audio stuff (2:150 to 2:154)
case '2#070':
case '2#060':
case '2#063':
case '2#085':
case '2#038':
case '2#035':
// ignore. Handled elsewhere.
break;
default:
//wfDebugLog( 'iptc', "Unsupported iptc tag: $tag. Value: " . implode( ',', $val ) );
break;
}
}
return $data;
}
/**
* Convert an iptc date and time tags into the exif format
*
* @todo Potentially this should also capture the timezone offset.
* @param array $date The date tag
* @param array $time The time tag
* @param string $c The charset
* @return string Date in EXIF format.
*/
private static function timeHelper( $date, $time, $c ) {
if ( count( $date ) === 1 ) {
// the standard says this should always be 1
// just double checking.
list( $date ) = self::convIPTC( $date, $c );
} else {
return null;
}
if ( count( $time ) === 1 ) {
list( $time ) = self::convIPTC( $time, $c );
$dateOnly = false;
} else {
$time = '000000+0000'; // placeholder
$dateOnly = true;
}
if ( !( preg_match( '/\d\d\d\d\d\d[-+]\d\d\d\d/', $time )
&& preg_match( '/\d\d\d\d\d\d\d\d/', $date )
&& substr( $date, 0, 4 ) !== '0000'
&& substr( $date, 4, 2 ) !== '00'
&& substr( $date, 6, 2 ) !== '00'
) ) {
// something wrong.
// Note, this rejects some valid dates according to iptc spec
// for example: the date 00000400 means the photo was taken in
// April, but the year and day is unknown. We don't process these
// types of incomplete dates atm.
//wfDebugLog( 'iptc', "IPTC: invalid time ( $time ) or date ( $date )" );
return null;
}
$unixTS = ConvertibleTimestamp::convert( TS_UNIX, $date . substr( $time, 0, 6 ) );
if ( $unixTS === false ) {
//wfDebugLog( 'iptc', "IPTC: can't convert date to TS_UNIX: $date $time." );
return null;
}
$tz = ( intval( substr( $time, 7, 2 ) ) * 60 * 60 )
+ ( intval( substr( $time, 9, 2 ) ) * 60 );
if ( substr( $time, 6, 1 ) === '-' ) {
$tz = -$tz;
}
$finalTimestamp = ConvertibleTimestamp::convert( TS_DB, $unixTS + $tz ); // TS_EXIF
if ( $finalTimestamp === false ) {
//wfDebugLog( 'iptc', "IPTC: can't make final timestamp. Date: " . ( $unixTS + $tz ) );
return null;
}
if ( $dateOnly ) {
// return the date only
return substr( $finalTimestamp, 0, 10 );
} else {
return $finalTimestamp;
}
}
/**
* Helper function to convert charset for iptc values.
* @param string|array $data The iptc string
* @param string $charset The charset
*
* @return string|array
*/
private static function convIPTC( $data, $charset ) {
if ( is_array( $data ) ) {
foreach ( $data as &$val ) {
$val = self::convIPTCHelper( $val, $charset );
}
} else {
$data = self::convIPTCHelper( $data, $charset );
}
return $data;
}
/**
* Helper function of a helper function to convert charset for iptc values.
* @param string|array $data The IPTC string
* @param string $charset The charset
*
* @return string
*/
private static function convIPTCHelper( $data, $charset ) {
if ( $charset ) {
//MediaWiki\suppressWarnings();
$data = @iconv( $charset, PHPWCMS_CHARSET, $data );
//MediaWiki\restoreWarnings();
if ( $data === false ) {
$data = "";
//wfDebugLog( 'iptc', __METHOD__ . " Error converting iptc data charset $charset to utf-8" );
}
} else {
// treat as utf-8 if is valid utf-8. otherwise pretend its windows-1252
// most of the time if there is no 1:90 tag, it is either ascii, latin1, or utf-8
$oldData = $data;
//UtfNormal\Validator::quickIsNFCVerify( $data ); // make $data valid utf-8
$data = phpwcms_seems_utf8($data) ? $data : utf8_encode($data);
if ( $data === $oldData ) {
return $data; // if validation didn't change $data
} else {
return self::convIPTCHelper( $oldData, 'Windows-1252' );
}
}
return trim( $data );
}
/**
* take the value of 1:90 tag and returns a charset
* @param string $tag 1:90 tag.
* @return string Charset name or "?"
* Warning, this function does not (and is not intended to) detect
* all iso 2022 escape codes. In practise, the code for utf-8 is the
* only code that seems to have wide use. It does detect that code.
*/
static function getCharset( $tag ) {
// According to iim standard, charset is defined by the tag 1:90.
// in which there are iso 2022 escape sequences to specify the character set.
// the iim standard seems to encourage that all necessary escape sequences are
// in the 1:90 tag, but says it doesn't have to be.
// This is in need of more testing probably. This is definitely not complete.
// however reading the docs of some other iptc software, it appears that most iptc software
// only recognizes utf-8. If 1:90 tag is not present content is
// usually ascii or iso-8859-1 (and sometimes utf-8), but no guarantee.
// This also won't work if there are more than one escape sequence in the 1:90 tag
// or if something is put in the G2, or G3 charsets, etc. It will only reliably recognize utf-8.
// This is just going through the charsets mentioned in appendix C of the iim standard.
// \x1b = ESC.
switch ( $tag ) {
case "\x1b%G": // utf-8
// Also call things that are compatible with utf-8, utf-8 (e.g. ascii)
case "\x1b(B": // ascii
case "\x1b(@": // iso-646-IRV (ascii in latest version, $ different in older version)
$c = 'UTF-8';
break;
case "\x1b(A": // like ascii, but british.
$c = 'ISO646-GB';
break;
case "\x1b(C": // some obscure sweedish/finland encoding
$c = 'ISO-IR-8-1';
break;
case "\x1b(D":
$c = 'ISO-IR-8-2';
break;
case "\x1b(E": // some obscure danish/norway encoding
$c = 'ISO-IR-9-1';
break;
case "\x1b(F":
$c = 'ISO-IR-9-2';
break;
case "\x1b(G":
$c = 'SEN_850200_B'; // aka iso 646-SE; ascii-like
break;
case "\x1b(I":
$c = "ISO646-IT";
break;
case "\x1b(L":
$c = "ISO646-PT";
break;
case "\x1b(Z":
$c = "ISO646-ES";
break;
case "\x1b([":
$c = "GREEK7-OLD";
break;
case "\x1b(K":
$c = "ISO646-DE";
break;
case "\x1b(N": // crylic
$c = "ISO_5427";
break;
case "\x1b(`": // iso646-NO
$c = "NS_4551-1";
break;
case "\x1b(f": // iso646-FR
$c = "NF_Z_62-010";
break;
case "\x1b(g":
$c = "PT2"; // iso646-PT2
break;
case "\x1b(h":
$c = "ES2";
break;
case "\x1b(i": // iso646-HU
$c = "MSZ_7795.3";
break;
case "\x1b(w":
$c = "CSA_Z243.4-1985-1";
break;
case "\x1b(x":
$c = "CSA_Z243.4-1985-2";
break;
case "\x1b\$(B":
case "\x1b\$B":
case "\x1b&@\x1b\$B":
case "\x1b&@\x1b\$(B":
$c = "JIS_C6226-1983";
break;
case "\x1b-A": // iso-8859-1. at least for the high code characters.
case "\x1b(@\x1b-A":
case "\x1b(B\x1b-A":
$c = 'ISO-8859-1';
break;
case "\x1b-B": // iso-8859-2. at least for the high code characters.
$c = 'ISO-8859-2';
break;
case "\x1b-C": // iso-8859-3. at least for the high code characters.
$c = 'ISO-8859-3';
break;
case "\x1b-D": // iso-8859-4. at least for the high code characters.
$c = 'ISO-8859-4';
break;
case "\x1b-E": // iso-8859-5. at least for the high code characters.
$c = 'ISO-8859-5';
break;
case "\x1b-F": // iso-8859-6. at least for the high code characters.
$c = 'ISO-8859-6';
break;
case "\x1b-G": // iso-8859-7. at least for the high code characters.
$c = 'ISO-8859-7';
break;
case "\x1b-H": // iso-8859-8. at least for the high code characters.
$c = 'ISO-8859-8';
break;
case "\x1b-I": // CSN_369103. at least for the high code characters.
$c = 'CSN_369103';
break;
default:
//wfDebugLog( 'iptc', __METHOD__ . 'Unknown charset in iptc 1:90: ' . bin2hex( $tag ) );
// at this point just give up and refuse to parse iptc?
$c = false;
}
return $c;
}
}
| gpl-2.0 |
TYPO3-Console/TYPO3-Console | Classes/Console/Command/Configuration/ConfigurationShowCommand.php | 2995 | <?php
declare(strict_types=1);
namespace Helhum\Typo3Console\Command\Configuration;
/*
* This file is part of the TYPO3 Console project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read
* LICENSE file that was distributed with this source code.
*
*/
use Helhum\Typo3Console\Command\AbstractConvertedCommand;
use Helhum\Typo3Console\Service\Configuration\ConfigurationService;
use Helhum\Typo3Console\Service\Configuration\ConsoleRenderer\ConsoleRenderer;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class ConfigurationShowCommand extends AbstractConvertedCommand
{
protected function configure()
{
$this->setDescription('Show configuration value');
$this->setHelp(
<<<'EOH'
Shows system configuration value by path.
If the currently active configuration differs from the value in LocalConfiguration.php
the difference between these values is shown.
<b>Example:</b>
<code>%command.full_name% DB</code>
EOH
);
/** @deprecated Will be removed with 6.0 */
$this->setDefinition($this->createCompleteInputDefinition());
}
/**
* @deprecated Will be removed with 6.0
*/
protected function createNativeDefinition(): array
{
return [
new InputArgument(
'path',
InputArgument::REQUIRED,
'Path to system configuration'
),
];
}
/**
* @deprecated will be removed with 6.0
*/
protected function handleDeprecatedArgumentsAndOptions(InputInterface $input, OutputInterface $output)
{
// nothing to do here
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$path = $input->getArgument('path');
$configurationService = new ConfigurationService();
$consoleRenderer = new ConsoleRenderer();
$hasActive = $configurationService->hasActive($path);
$hasLocal = $configurationService->hasLocal($path);
if (!$hasActive && !$hasLocal) {
$output->writeln(sprintf('<error>No configuration found for path "%s"</error>', $path));
return 1;
}
$active = null;
if ($hasActive) {
$active = $configurationService->getActive($path);
}
if ($hasActive && $configurationService->localIsActive($path)) {
$output->writeln($consoleRenderer->render($active));
} else {
$local = null;
if ($hasLocal) {
$local = $configurationService->getLocal($path);
}
$output->writeln($consoleRenderer->renderDiff($local, $active));
}
return 0;
}
}
| gpl-2.0 |
tambetm/xitari | games/supported/Surround.hpp | 2882 | /* *****************************************************************************
* Xitari
*
* Copyright 2014 Google Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* *****************************************************************************
* A.L.E (Arcade Learning Environment)
* Copyright (c) 2009-2013 by Yavar Naddaf, Joel Veness, Marc G. Bellemare and
* the Reinforcement Learning and Artificial Intelligence Laboratory
* Released under the GNU General Public License; see License.txt for details.
*
* Based on: Stella -- "An Atari 2600 VCS Emulator"
* Copyright (c) 1995-2007 by Bradford W. Mott and the Stella team
*
* *****************************************************************************
*/
#ifndef __SURROUND_HPP__
#define __SURROUND_HPP__
#include "../RomSettings.hpp"
namespace ale {
// RL wrapper for SpaceInvaders
class SurroundSettings : public RomSettings {
public:
SurroundSettings();
// reset
void reset();
// is end of game
bool isTerminal() const;
// get the most recently observed reward
reward_t getReward() const;
// the rom-name
const char* rom() const { return "surround"; }
// create a new instance of the rom
RomSettings* clone() const;
// is an action part of the minimal set?
bool isMinimal(const Action& a) const;
// process the latest information from ALE
void step(const System& system);
// saves the state of the rom settings
void saveState(Serializer & ser);
// loads the state of the rom settings
void loadState(Deserializer & ser);
// Minimum possible instantaneous reward.
reward_t minReward() const { return -1; }
// Maximum possible instantaneous reward.
reward_t maxReward() const { return 1; }
// Returns a list of actions required to start the game & set it in 'computer' mode.
virtual ActionVect getStartingActions();
virtual int lives() const { return 0; }
virtual bool swapPorts() const { return true; }
private:
bool m_terminal;
reward_t m_reward;
reward_t m_score;
};
} // namespace ale
#endif // __SURROUND_HPP__
| gpl-2.0 |
ayuzhanin/cornell-spf-scala | src/main/java/edu/cornell/cs/nlp/spf/mr/lambda/exec/naive/ILambdaResult.java | 1085 | /*******************************************************************************
* Copyright (C) 2011 - 2015 Yoav Artzi, All rights reserved.
* <p>
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or any later version.
* <p>
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
* <p>
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*******************************************************************************/
package edu.cornell.cs.nlp.spf.mr.lambda.exec.naive;
public interface ILambdaResult extends Iterable<Tuple> {
boolean isEmpty();
int size();
}
| gpl-2.0 |
Jasonudoo/platform | administrator/components/com_hikashop/helpers/pagination.php | 8478 | <?php
/**
* @package HikaShop for Joomla!
* @version 2.1.2
* @author hikashop.com
* @copyright (C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?><?php
jimport('joomla.html.pagination');
class hikashopBridgePaginationHelper extends JPagination {
var $hikaSuffix='';
var $form = '';
function getPagesLinks(){
$app = JFactory::getApplication();
$lang = JFactory::getLanguage();
$data = $this->_buildDataObject();
$list = array();
$itemOverride = false;
$listOverride = false;
$chromePath = JPATH_THEMES.DS.$app->getTemplate().DS.'html'.DS.'pagination.php';
if (file_exists($chromePath)){
require_once ($chromePath);
if (function_exists('pagination_list_render')) {
$listOverride = true;
if(HIKASHOP_J30 && $app->isAdmin())
$itemOverride = true;
}
}
if ($data->all->base !== null) {
$list['all']['active'] = true;
$list['all']['data'] = ($itemOverride) ? pagination_item_active($data->all) : $this->_item_active($data->all);
} else {
$list['all']['active'] = false;
$list['all']['data'] = ($itemOverride) ? pagination_item_inactive($data->all) : $this->_item_inactive($data->all);
}
if ($data->start->base !== null) {
$list['start']['active'] = true;
$list['start']['data'] = ($itemOverride) ? pagination_item_active($data->start) : $this->_item_active($data->start);
} else {
$list['start']['active'] = false;
$list['start']['data'] = ($itemOverride) ? pagination_item_inactive($data->start) : $this->_item_inactive($data->start);
}
if ($data->previous->base !== null) {
$list['previous']['active'] = true;
$list['previous']['data'] = ($itemOverride) ? pagination_item_active($data->previous) : $this->_item_active($data->previous);
} else {
$list['previous']['active'] = false;
$list['previous']['data'] = ($itemOverride) ? pagination_item_inactive($data->previous) : $this->_item_inactive($data->previous);
}
$list['pages'] = array(); //make sure it exists
foreach ($data->pages as $i => $page)
{
if ($page->base !== null) {
$list['pages'][$i]['active'] = true;
$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_active($page) : $this->_item_active($page);
} else {
$list['pages'][$i]['active'] = false;
$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_inactive($page) : $this->_item_inactive($page);
}
}
if ($data->next->base !== null) {
$list['next']['active'] = true;
$list['next']['data'] = ($itemOverride) ? pagination_item_active($data->next) : $this->_item_active($data->next);
} else {
$list['next']['active'] = false;
$list['next']['data'] = ($itemOverride) ? pagination_item_inactive($data->next) : $this->_item_inactive($data->next);
}
if ($data->end->base !== null) {
$list['end']['active'] = true;
$list['end']['data'] = ($itemOverride) ? pagination_item_active($data->end) : $this->_item_active($data->end);
} else {
$list['end']['active'] = false;
$list['end']['data'] = ($itemOverride) ? pagination_item_inactive($data->end) : $this->_item_inactive($data->end);
}
if($this->total > $this->limit){
return ($listOverride) ? pagination_list_render($list) : $this->_list_render($list);
}
else{
return '';
}
}
function _list_render($list){
$html = null;
$html .= '<span class="pagenav_start_chevron"><< </span>';
$html .= $list['start']['data'];
$html .= '<span class="pagenav_previous_chevron"> < </span>';
$html .= $list['previous']['data'];
foreach( $list['pages'] as $page ) {
$html .= ' '.$page['data'];
}
$html .= ' '. $list['next']['data'];
$html .= '<span class="pagenav_next_chevron"> ></span>';
$html .= ' '. $list['end']['data'];
$html .= '<span class="pagenav_end_chevron"> >></span>';
return $html;
}
function _list_footer($list){
$html = '<div class="list-footer">'."\n";
if(version_compare(JVERSION,'1.6','>=')){
$display = JText::_('JGLOBAL_DISPLAY_NUM');
}else{
$display = JText::_('Display Num');
}
$html .= "\n<div class=\"limit\">".$display.$list['limitfield']."</div>";
$html .= $list['pageslinks'];
$html .= "\n<div class=\"counter\">".$list['pagescounter']."</div>";
$html .= "\n<input type=\"hidden\" name=\"limitstart".$this->hikaSuffix."\" value=\"".$list['limitstart']."\" />";
$html .= "\n</div>";
return $html;
}
function getListFooter($minimum=20){
$list = array();
$list['limit'] = $this->limit;
$list['limitstart'] = $this->limitstart;
$list['total'] = $this->total;
$list['limitfield'] = $this->getLimitBox($minimum);
$list['pagescounter'] = $this->getPagesCounter();
$list['pageslinks'] = $this->getPagesLinks();
if(HIKASHOP_J30) {
$app = JFactory::getApplication();
if(!$app->isAdmin())
return $this->_list_footer($list);
if(empty($this->prefix))
$this->prefix = '';
$list['prefix'] = $this->prefix;
if(function_exists('pagination_list_footer')) {
$ret = pagination_list_footer($list);
if(strpos($ret, $list['limitfield']) === false) {
$display = JText::_('JGLOBAL_DISPLAY_NUM');
$ret = "\n<div class=\"limit\">".$display.$list['limitfield'] ."</div>" . $ret;
}
if(strpos($ret, 'name="limitstart'.$this->hikaSuffix.'"') === false)
$ret .= "<input type=\"hidden\" name=\"limitstart".$this->hikaSuffix."\" value=\"".$list['limitstart']."\" />";
return $ret;
}
}
return $this->_list_footer($list);
}
function getLimitBox($minimum=20){
$limits = array ();
for ($i = $minimum; $i <= $minimum*5; $i += $minimum) {
$limits[] = JHTML::_('select.option', $i);
}
$limits[] = JHTML::_('select.option', '0', JText::_('HIKA_ALL'));
if(version_compare(JVERSION,'3.0','<')){
$viewall = $this->_viewall;
} else {
$viewall = $this->viewall;
}
return JHTML::_('select.genericlist', $limits, 'limit'.$this->hikaSuffix, 'class="chzn-done inputbox" size="1" style="width:70px" onchange="this.form.submit()"', 'value', 'text', $viewall ? 0 : $this->limit);
}
}
if(HIKASHOP_J30){
class hikashopPaginationHelper extends hikashopBridgePaginationHelper{
function _item_active(JPaginationObject $item){
if($item->base>0)
return "<a class=\"pagenav\" title=\"".$item->text."\" onclick=\"javascript: document.adminForm".$this->hikaSuffix.$this->form.".limitstart".$this->hikaSuffix.".value=".$item->base."; document.adminForm".$this->hikaSuffix.$this->form.".submit();return false;\">".$item->text."</a>";
else
return "<a class=\"pagenav\" title=\"".$item->text."\" onclick=\"javascript: document.adminForm".$this->hikaSuffix.$this->form.".limitstart".$this->hikaSuffix.".value=0; document.adminForm".$this->hikaSuffix.$this->form.".submit();return false;\">".$item->text."</a>";
}
function _item_inactive(JPaginationObject $item){
$mainframe = JFactory::getApplication();
if ($mainframe->isAdmin()) {
return "<span>".$item->text."</span>";
} else {
$class = 'pagenav';
if(!is_numeric($item->text)){
$class .= ' pagenav_text';
}
return '<span class="'.$class.'">'.$item->text."</span>";
}
}
}
}else{
class hikashopPaginationHelper extends hikashopBridgePaginationHelper{
function _item_active(&$item){
if($item->base>0)
return "<a class=\"pagenav\" title=\"".$item->text."\" onclick=\"javascript: document.adminForm".$this->hikaSuffix.$this->form.".limitstart".$this->hikaSuffix.".value=".$item->base."; document.adminForm".$this->hikaSuffix.$this->form.".submit();return false;\">".$item->text."</a>";
else
return "<a class=\"pagenav\" title=\"".$item->text."\" onclick=\"javascript: document.adminForm".$this->hikaSuffix.$this->form.".limitstart".$this->hikaSuffix.".value=0; document.adminForm".$this->hikaSuffix.$this->form.".submit();return false;\">".$item->text."</a>";
}
function _item_inactive(&$item){
$mainframe = JFactory::getApplication();
if ($mainframe->isAdmin()) {
return "<span>".$item->text."</span>";
} else {
$class = 'pagenav';
if(!is_numeric($item->text)){
$class .= ' pagenav_text';
}
return '<span class="'.$class.'">'.$item->text."</span>";
}
}
}
}
| gpl-2.0 |
v7fasttrack/virtuoso-opensource | binsrc/jena2/virtuoso_driver/VirtuosoSPARQLExample3.java | 3335 | /*
* $Id$
*
* This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
* project.
*
* Copyright (C) 1998-2014 OpenLink Software
*
* This project is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; only version 2 of the License, dated June 1991.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
//package virtuoso_driver;
import java.util.*;
import com.hp.hpl.jena.query.*;
import com.hp.hpl.jena.rdf.model.RDFNode;
import com.hp.hpl.jena.graph.Node;
import com.hp.hpl.jena.graph.Triple;
import virtuoso.jena.driver.*;
public class VirtuosoSPARQLExample3
{
public static void main(String[] args)
{
String url;
if(args.length == 0)
url = "jdbc:virtuoso://localhost:1111";
else
url = args[0];
Node foo1 = Node.createURI("http://example.org/#foo1");
Node bar1 = Node.createURI("http://example.org/#bar1");
Node baz1 = Node.createURI("http://example.org/#baz1");
Node foo2 = Node.createURI("http://example.org/#foo2");
Node bar2 = Node.createURI("http://example.org/#bar2");
Node baz2 = Node.createURI("http://example.org/#baz2");
Node foo3 = Node.createURI("http://example.org/#foo3");
Node bar3 = Node.createURI("http://example.org/#bar3");
Node baz3 = Node.createURI("http://example.org/#baz3");
List triples = new ArrayList();
VirtGraph graph = new VirtGraph ("Example3", url, "dba", "dba");
graph.clear ();
System.out.println("graph.isEmpty() = " + graph.isEmpty());
System.out.println("Add 3 triples to graph <Example3>.");
graph.add(new Triple(foo1, bar1, baz1));
graph.add(new Triple(foo2, bar2, baz2));
graph.add(new Triple(foo3, bar3, baz3));
System.out.println("graph.isEmpty() = " + graph.isEmpty());
System.out.println("graph.getCount() = " + graph.getCount());
triples.add(new Triple(foo1, bar1, baz1));
triples.add(new Triple(foo2, bar2, baz2));
graph.isEmpty();
System.out.println("Remove 2 triples from graph <Example3>");
graph.remove(triples);
System.out.println("graph.getCount() = " + graph.getCount());
System.out.println("Please check result with isql tool.");
/* EXPECTED RESULT:
SQL> sparql select ?s ?p ?o from <Example3> where {?s ?p ?o};
s p o
VARCHAR VARCHAR VARCHAR
_______________________________________________________________________________
http://example.org/#foo3 http://example.org/#bar3 http://example.org/#baz3
1 Rows. -- 26 msec.
SQL>
*/
}
}
| gpl-2.0 |
cstratton/xc3sprog-code | jedecfile.cpp | 12891 | /* Jedec .jed file parser
Copyright (C) Uwe Bonnes 2009 bon@elektron.ikp.physik.tu-darmstadt.de
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
* Using a slightly corrected version from IPAL libjedec
* Copyright (c) 2000 Stephen Williams (steve@icarus.com)
*/
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <errno.h>
#include <cstdio>
#include "jedecfile.h"
#include "io_exception.h"
static unsigned char*allocate_fusemap(unsigned size)
{
unsigned char*ptr = (unsigned char*) calloc(size/8 + ((size%8)?1:0), 1);
return ptr;
}
int jedec_get_fuse(jedec_data_t jed, unsigned idx)
{
unsigned int bval, bit;
if(idx >= jed->fuse_count)
throw io_exception(std::string("jedec_get_fuse"));
bval = idx / 8;
bit = idx % 8;
return (jed->fuse_list[bval] & (1 << bit))? 1 : 0;
}
void jedec_set_fuse(jedec_data_t jed, unsigned idx, int blow)
{
unsigned int bval, bit;
if(idx >= jed->fuse_count)
throw io_exception(std::string("jedec_set_fuse"));
bval = idx / 8;
bit = idx % 8;
if (blow)
jed->fuse_list[bval] |= (1 << bit);
else
jed->fuse_list[bval] &= ~(1 << bit);
}
struct state_mach {
jedec_data_t jed;
void (*state)(int ch, struct state_mach*m);
unsigned int checksum;
union {
struct {
unsigned cur_fuse;
} l;
} m;
};
static void m_startup(int ch, struct state_mach*m);
static void m_header(int ch, struct state_mach*m);
static void m_base(int ch, struct state_mach*m);
static void m_C(int ch, struct state_mach*m);
static void m_L(int ch, struct state_mach*m);
static void m_Lfuse(int ch, struct state_mach*m);
static void m_Q(int ch, struct state_mach*m);
static void m_QF(int ch, struct state_mach*m);
static void m_QP(int ch, struct state_mach*m);
static void m_skip(int ch, struct state_mach*m);
static void m_N(int ch, struct state_mach*m);
int m_N_item;
int m_N_pos;
int m_H_pos = 0;
char m_H_string[MAX_SIZE];
char m_N_strings[MAX_ITEM][MAX_SIZE];
static void m_startup(int ch, struct state_mach*m)
{
switch (ch)
{
case '\002':
m->state = m_base;
break;
case 'D':
m->state = m_header;
break;
default:
break;
}
}
static void m_header(int ch, struct state_mach*m)
{
switch (ch)
{
case '\n':
case '\r':
if (m_H_pos)
{
char * ptr = strchr( m_H_string, ':');
if (ptr)
strncpy(m->jed->date, ptr, MAX_SIZE);
}
m->state = m_startup;
break;
default:
m_H_string[m_H_pos] = ch;
m_H_pos++;
}
}
static void m_base(int ch, struct state_mach*m)
{
if (isspace(ch))
return;
switch (ch) {
case 'L':
m->state = m_L;
m->m.l.cur_fuse = 0;
break;
case 'Q':
m->state = m_Q;
break;
case 'C':
m->state = m_C;
m->jed->checksum = 0;
break;
case 'N':
m->state = m_N;
m_N_item = -1;
break;
default:
m->state = m_skip;
break;
}
}
static void m_C(int ch, struct state_mach*m)
{
if (isspace(ch))
return;
if (ch == '*') {
m->state = m_base;
return;
}
if(ch >='0' && ch <='9')
{
m->jed->checksum <<=4;
m->jed->checksum += ch - '0';
return;
}
ch &= 0x5f;
if(ch >='A' && ch <= 'F')
{
m->jed->checksum <<=4;
m->jed->checksum += ch - '7';
return;
}
fprintf(stderr, "m_C: Dangling '%c' 0x%02x\n", ch, ch);
fflush(stderr);
throw io_exception(std::string("m_C"));
}
static void m_L(int ch, struct state_mach*m)
{
if (isdigit(ch)) {
m->m.l.cur_fuse *= 10;
m->m.l.cur_fuse += ch - '0';
return;
}
if (isspace(ch)) {
m->state = m_Lfuse;
return;
}
if (ch == '*') {
m->state = m_base;
return;
}
fprintf(stderr, "m_L: Dangling '%c' 0x%02x\n", ch, ch);
fflush(stderr);
m->state = 0;
}
static void m_Lfuse(int ch, struct state_mach*m)
{
switch (ch) {
case '*':
m->state = m_base;
break;
case '0':
jedec_set_fuse(m->jed, m->m.l.cur_fuse, 0);
m->m.l.cur_fuse += 1;
break;
case '1':
jedec_set_fuse(m->jed, m->m.l.cur_fuse, 1);
m->m.l.cur_fuse += 1;
break;
case ' ':
case '\n':
case '\r':
break;
default:
fprintf(stderr, "m_LFuse: Dangling '%c' 0x%02x\n", ch, ch);
fflush(stderr);
m->state = 0;
break;
}
}
#ifdef __unix__
#define stricmp strcasecmp
#define strnicmp strncasecmp
#endif
static void m_N(int ch, struct state_mach*m)
{
switch (ch) {
case '*':
if ((stricmp(m_N_strings[0], "DEVICE")) == 0)
{
m_N_strings[m_N_item][m_N_pos] = 0;
strncpy(m->jed->device, m_N_strings[1], MAX_SIZE);
}
if ((stricmp(m_N_strings[0], "VERSION")) == 0)
{
m_N_strings[m_N_item][m_N_pos] = 0;
strncpy(m->jed->version, m_N_strings[1], MAX_SIZE);
}
m->state = m_base;
m_N_item= -1;
break;
case ' ':
if(m_N_item >=0)
m_N_strings[m_N_item][m_N_pos] = 0;
if (m_N_item < MAX_ITEM)
{
/* Don't stumble on too many items like in ISE XC2C Jedecfiles */
m_N_item++;
}
m_N_pos = 0;
case '\n':
case '\r':
break;
default:
if((m_N_item >=0) && (m_N_item <MAX_ITEM) && (m_N_pos < MAX_SIZE-1))
m_N_strings[m_N_item][m_N_pos] = ch;
m_N_pos++;
break;
}
}
static void m_Q(int ch, struct state_mach*m)
{
switch (ch) {
case 'F':
if (m->jed->fuse_count != 0) {
m->state = 0;
return;
}
m->state = m_QF;
m->jed->fuse_count = 0;
break;
case 'P':
if (m->jed->pin_count != 0) {
m->state = 0;
return;
}
m->state = m_QP;
m->jed->pin_count = 0;
break;
default:
m->state = m_skip;
break;
}
}
static void m_QF(int ch, struct state_mach*m)
{
if (isspace(ch))
return;
if (isdigit(ch)) {
m->jed->fuse_count *= 10;
m->jed->fuse_count += ch - '0';
return;
}
if (ch == '*') {
m->state = m_base;
m->jed->fuse_list = allocate_fusemap(m->jed->fuse_count);
return;
}
throw io_exception(std::string("m_QF"));
}
static void m_QP(int ch, struct state_mach*m)
{
if (isspace(ch))
return;
if (isdigit(ch)) {
m->jed->pin_count *= 10;
m->jed->pin_count += ch - '0';
return;
}
if (ch == '*') {
m->state = m_base;
return;
}
throw io_exception(std::string("m_QP"));
}
static void m_skip(int ch, struct state_mach*m)
{
switch (ch) {
case '*':
m->state = m_base;
break;
default:
break;
}
}
JedecFile::JedecFile(void)
: Error(false), logfile(stderr)
{
jed.checksum = 0;
jed.fuse_count = 0;
jed.pin_count = 0;
jed.fuse_list = 0;
jed.device[0] = 0;
jed.version[0] = 0;
jed.date[0] = 0;
}
JedecFile::~JedecFile(void)
{
if(jed.fuse_list)
free(jed.fuse_list);
}
int JedecFile::readFile(FILE *fp)
{
int ch;
struct state_mach m;
if(!fp)
return 1;
//jed = (jedec_data_t)calloc(1, sizeof(struct jedec_data));
m.jed = &jed;
m.state = m_startup;
while ((ch = fgetc(fp)) != EOF) {
m.state(ch, &m);
if (m.state == 0) {
/* Some sort of error happened. */
return 2;
}
}
if (!jed.fuse_count)
return 3;
return 0;
}
void JedecFile::saveAsJed(const char *device, FILE *fp)
{
unsigned int i, b=0, l=0 ,w=0;
unsigned short chksum=0;
unsigned int DRegLength;
int type=-1;
if (!fp)
return;
if (strnicmp("XC9536",device, sizeof("XC9536X")-1) == 0)
{
type = JED_XC95;
}
else if (strnicmp("XC9572",device, sizeof("XC9572X")-1) == 0)
{
type = JED_XC95;
}
else if (strnicmp("XC95108",device, sizeof("XC95144X")-1) == 0)
{
type = JED_XC95;
}
else if (strnicmp("XC95144",device, sizeof("XC95288X")-1) == 0)
{
type = JED_XC95;
}
else if (strnicmp("XC95216",device, sizeof("XC95288X")-1) == 0)
{
type = JED_XC95;
}
else if (strnicmp("XC95288",device, sizeof("XC95288X")-1) == 0)
{
type = JED_XC95;
}
else if (strnicmp("XC9536X",device, sizeof("XC9536X")-1) == 0)
{
type = JED_XC95X;
DRegLength=2;
}
else if (strnicmp("XC9572X",device, sizeof("XC9572X")-1) == 0)
{
type = JED_XC95X;
DRegLength=4;
}
else if (strnicmp("XC95144X",device, sizeof("XC95144X")-1) == 0)
{
type = JED_XC95X;
DRegLength=8;
}
else if (strnicmp("XC95288X",device, sizeof("XC95288X")-1) == 0)
{
type = JED_XC95X;
DRegLength=16;
}
else if (strnicmp("XC2C",device, sizeof("XC2C")-1) == 0)
{
type = JED_XC2C;
}
if (strlen(jed.date) == 0)
{
time_t t;
struct tm *tmp;
char outstr[200];
t = time(NULL);
tmp = localtime(&t);
if (tmp != NULL)
{
if (strftime(outstr, sizeof(outstr), "%a %b %d %T %Y", tmp))
fprintf(fp, "Date Extracted: %s\n\n", outstr);
}
}
else
fprintf(fp, "Date Extracted%s\n\n",jed.date);
fprintf(fp, "\2QF%d*\nQV0*\nF0*\nX0*\nJ0 0*\n",jed.fuse_count);
if (strlen(jed.version) == 0)
fprintf(fp, "N VERSION XC3SPROG*\n");
else
fprintf(fp, "N VERSION %s*\n",jed.version);
fprintf(fp, "N DEVICE %s*\n", device);
if(type == JED_XC95X)
{
/* Xilinx Impact (10.1) needs following additional items
to recognizes as a valid Jedec File
* the 4 Digits as total Checksum
* N DEVICE
*/
for (i=0; i<jed.fuse_count; i++)
{
if(!w && !b)
fprintf(fp, "L%07d",i);
if (!b)
fprintf(fp, " ");
fprintf(fp, "%d", get_fuse(i));
if (l<9)
{
if(b==7)
b=0;
else
b++;
}
else
{
if (b == 5)
b = 0;
else
b++;
}
if(!b)
{
if (w == (DRegLength-1))
{
fprintf(fp, "*\n");
w = 0;
l++;
}
else
w++;
}
if (l==15)
l =0;
}
}
else if(type == JED_XC95)
{
for (i=0; i<jed.fuse_count; i++)
{
if(!b && w%5 == 0)
fprintf(fp, "L%07d",i);
if (!b)
fprintf(fp, " ");
fprintf(fp, "%d", get_fuse(i));
if( b == (((i%9072)<7776) ? ((w %15 < 9)?7:5):((w%5== 0)?7:6)))
{
b=0;
w++;
}
else
b++;
if(!b && (w %5 == 0 ))
fprintf(fp, "*\n");
}
}
else if (type == JED_XC2C)
{
for (i=0; i<jed.fuse_count; i++)
{
if ((i %64) == 0)
fprintf(fp, "L%07d ",i);
fprintf(fp, "%d", get_fuse(i));
if ((i %64) == 63)
fprintf(fp, "*\n");
}
fprintf(fp, "*\n");
}
for(i=0; i<(jed.fuse_count/8 + ((jed.fuse_count%8)?1:0)); i++)
chksum += jed.fuse_list[i];
fprintf(fp, "C%04X*\n%c0000\n", chksum, 3);
}
void JedecFile::setLength(unsigned int f_count)
{
if(f_count > jed.fuse_count)
{
if (jed.fuse_list)
free(jed.fuse_list);
jed.fuse_list = new byte[f_count/8 + ((f_count%8)?1:0)];
memset(jed.fuse_list, 0xff, f_count/8 + ((f_count%8)?1:0));
}
else
{
for (unsigned int i = f_count; i < jed.fuse_count; i++)
set_fuse(i, 0);
}
jed.fuse_count = f_count;
}
void JedecFile::set_fuse(unsigned int idx, int blow)
{
jedec_set_fuse(&jed, idx,blow);
}
int JedecFile::get_fuse(unsigned int idx)
{
return jedec_get_fuse(&jed, idx);
}
unsigned short JedecFile::calcChecksum()
{
unsigned int i;
unsigned short cc=0;
for(i=0; i<(jed.fuse_count/8 + ((jed.fuse_count%8)?1:0)); i++)
cc += jed.fuse_list[i];
return cc;
}
| gpl-2.0 |
blzr/enigma2 | lib/python/Components/Sources/EventInfo.py | 1278 | from Components.PerServiceDisplay import PerServiceBase
from Components.Element import cached
from enigma import iPlayableService, iServiceInformation, eServiceReference, eEPGCache
from Source import Source
class EventInfo(PerServiceBase, Source, object):
NOW = 0
NEXT = 1
def __init__(self, navcore, now_or_next):
Source.__init__(self)
PerServiceBase.__init__(self, navcore,
{
iPlayableService.evStart: self.gotEvent,
iPlayableService.evUpdatedEventInfo: self.gotEvent,
iPlayableService.evEnd: self.gotEvent
}, with_event=True)
self.now_or_next = now_or_next
self.epgQuery = eEPGCache.getInstance().lookupEventTime
@cached
def getEvent(self):
service = self.navcore.getCurrentService()
info = service and service.info()
ret = info and info.getEvent(self.now_or_next)
if info:
if not ret or ret.getEventName() == "":
refstr = info.getInfoString(iServiceInformation.sServiceref)
ret = self.epgQuery(eServiceReference(refstr), -1, self.now_or_next and 1 or 0)
return ret
event = property(getEvent)
def gotEvent(self, what):
if what == iPlayableService.evEnd:
self.changed((self.CHANGED_CLEAR,))
else:
self.changed((self.CHANGED_ALL,))
def destroy(self):
PerServiceBase.destroy(self)
Source.destroy(self)
| gpl-2.0 |
aikon-com-cn/Infinity-Core | src/server/scripts/Commands/cs_cast.cpp | 10143 | /*
* Copyright (C) 2008-2013 Trinitycore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: cast_commandscript
%Complete: 100
Comment: All cast related commands
Category: commandscripts
EndScriptData */
#include "ScriptMgr.h"
#include "Chat.h"
#include "Creature.h"
#include "Language.h"
#include "Player.h"
class cast_commandscript : public CommandScript
{
public:
cast_commandscript() : CommandScript("cast_commandscript") { }
ChatCommand* GetCommands() const OVERRIDE
{
static ChatCommand castCommandTable[] =
{
{ "back", rbac::RBAC_PERM_COMMAND_CAST_BACK, false, &HandleCastBackCommand, "", NULL },
{ "dist", rbac::RBAC_PERM_COMMAND_CAST_DIST, false, &HandleCastDistCommand, "", NULL },
{ "self", rbac::RBAC_PERM_COMMAND_CAST_SELF, false, &HandleCastSelfCommand, "", NULL },
{ "target", rbac::RBAC_PERM_COMMAND_CAST_TARGET, false, &HandleCastTargetCommad, "", NULL },
{ "dest", rbac::RBAC_PERM_COMMAND_CAST_DEST, false, &HandleCastDestCommand, "", NULL },
{ "", rbac::RBAC_PERM_COMMAND_CAST, false, &HandleCastCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand commandTable[] =
{
{ "cast", rbac::RBAC_PERM_COMMAND_CAST, false, NULL, "", castCommandTable },
{ NULL, 0, false, NULL, "", NULL }
};
return commandTable;
}
static bool HandleCastCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
Unit* target = handler->getSelectedUnit();
if (!target)
{
handler->SendSysMessage(LANG_SELECT_CHAR_OR_CREATURE);
handler->SetSentErrorMessage(true);
return false;
}
// number or [name] Shift-click form |color|Hspell:spell_id|h[name]|h|r or Htalent form
uint32 spellId = handler->extractSpellIdFromLink((char*)args);
if (!spellId)
return false;
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!spellInfo)
{
handler->PSendSysMessage(LANG_COMMAND_NOSPELLFOUND);
handler->SetSentErrorMessage(true);
return false;
}
if (!SpellMgr::IsSpellValid(spellInfo, handler->GetSession()->GetPlayer()))
{
handler->PSendSysMessage(LANG_COMMAND_SPELL_BROKEN, spellId);
handler->SetSentErrorMessage(true);
return false;
}
char* triggeredStr = strtok(NULL, " ");
if (triggeredStr)
{
int l = strlen(triggeredStr);
if (strncmp(triggeredStr, "triggered", l) != 0)
return false;
}
bool triggered = (triggeredStr != NULL);
handler->GetSession()->GetPlayer()->CastSpell(target, spellId, triggered);
return true;
}
static bool HandleCastBackCommand(ChatHandler* handler, char const* args)
{
Creature* caster = handler->getSelectedCreature();
if (!caster)
{
handler->SendSysMessage(LANG_SELECT_CHAR_OR_CREATURE);
handler->SetSentErrorMessage(true);
return false;
}
// number or [name] Shift-click form |color|Hspell:spell_id|h[name]|h|r
// number or [name] Shift-click form |color|Hspell:spell_id|h[name]|h|r or Htalent form
uint32 spellId = handler->extractSpellIdFromLink((char*)args);
if (!spellId || !sSpellMgr->GetSpellInfo(spellId))
{
handler->PSendSysMessage(LANG_COMMAND_NOSPELLFOUND);
handler->SetSentErrorMessage(true);
return false;
}
char* triggeredStr = strtok(NULL, " ");
if (triggeredStr)
{
int l = strlen(triggeredStr);
if (strncmp(triggeredStr, "triggered", l) != 0)
return false;
}
bool triggered = (triggeredStr != NULL);
caster->CastSpell(handler->GetSession()->GetPlayer(), spellId, triggered);
return true;
}
static bool HandleCastDistCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
// number or [name] Shift-click form |color|Hspell:spell_id|h[name]|h|r or Htalent form
uint32 spellId = handler->extractSpellIdFromLink((char*)args);
if (!spellId)
return false;
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!spellInfo)
{
handler->PSendSysMessage(LANG_COMMAND_NOSPELLFOUND);
handler->SetSentErrorMessage(true);
return false;
}
if (!SpellMgr::IsSpellValid(spellInfo, handler->GetSession()->GetPlayer()))
{
handler->PSendSysMessage(LANG_COMMAND_SPELL_BROKEN, spellId);
handler->SetSentErrorMessage(true);
return false;
}
char* distStr = strtok(NULL, " ");
float dist = 0;
if (distStr)
sscanf(distStr, "%f", &dist);
char* triggeredStr = strtok(NULL, " ");
if (triggeredStr)
{
int l = strlen(triggeredStr);
if (strncmp(triggeredStr, "triggered", l) != 0)
return false;
}
bool triggered = (triggeredStr != NULL);
float x, y, z;
handler->GetSession()->GetPlayer()->GetClosePoint(x, y, z, dist);
handler->GetSession()->GetPlayer()->CastSpell(x, y, z, spellId, triggered);
return true;
}
static bool HandleCastSelfCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
Unit* target = handler->getSelectedUnit();
if (!target)
{
handler->SendSysMessage(LANG_SELECT_CHAR_OR_CREATURE);
handler->SetSentErrorMessage(true);
return false;
}
// number or [name] Shift-click form |color|Hspell:spell_id|h[name]|h|r or Htalent form
uint32 spellId = handler->extractSpellIdFromLink((char*)args);
if (!spellId)
return false;
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!spellInfo)
return false;
if (!SpellMgr::IsSpellValid(spellInfo, handler->GetSession()->GetPlayer()))
{
handler->PSendSysMessage(LANG_COMMAND_SPELL_BROKEN, spellId);
handler->SetSentErrorMessage(true);
return false;
}
target->CastSpell(target, spellId, false);
return true;
}
static bool HandleCastTargetCommad(ChatHandler* handler, char const* args)
{
Creature* caster = handler->getSelectedCreature();
if (!caster)
{
handler->SendSysMessage(LANG_SELECT_CHAR_OR_CREATURE);
handler->SetSentErrorMessage(true);
return false;
}
if (!caster->GetVictim())
{
handler->SendSysMessage(LANG_SELECTED_TARGET_NOT_HAVE_VICTIM);
handler->SetSentErrorMessage(true);
return false;
}
// number or [name] Shift-click form |color|Hspell:spell_id|h[name]|h|r or Htalent form
uint32 spellId = handler->extractSpellIdFromLink((char*)args);
if (!spellId || !sSpellMgr->GetSpellInfo(spellId))
{
handler->PSendSysMessage(LANG_COMMAND_NOSPELLFOUND);
handler->SetSentErrorMessage(true);
return false;
}
char* triggeredStr = strtok(NULL, " ");
if (triggeredStr)
{
int l = strlen(triggeredStr);
if (strncmp(triggeredStr, "triggered", l) != 0)
return false;
}
bool triggered = (triggeredStr != NULL);
caster->CastSpell(caster->GetVictim(), spellId, triggered);
return true;
}
static bool HandleCastDestCommand(ChatHandler* handler, char const* args)
{
Unit* caster = handler->getSelectedUnit();
if (!caster)
{
handler->SendSysMessage(LANG_SELECT_CHAR_OR_CREATURE);
handler->SetSentErrorMessage(true);
return false;
}
// number or [name] Shift-click form |color|Hspell:spell_id|h[name]|h|r or Htalent form
uint32 spellId = handler->extractSpellIdFromLink((char*)args);
if (!spellId || !sSpellMgr->GetSpellInfo(spellId))
{
handler->PSendSysMessage(LANG_COMMAND_NOSPELLFOUND);
handler->SetSentErrorMessage(true);
return false;
}
char* posX = strtok(NULL, " ");
char* posY = strtok(NULL, " ");
char* posZ = strtok(NULL, " ");
if (!posX || !posY || !posZ)
return false;
float x = float(atof(posX));
float y = float(atof(posY));
float z = float(atof(posZ));
char* triggeredStr = strtok(NULL, " ");
if (triggeredStr)
{
int l = strlen(triggeredStr);
if (strncmp(triggeredStr, "triggered", l) != 0)
return false;
}
bool triggered = (triggeredStr != NULL);
caster->CastSpell(x, y, z, spellId, triggered);
return true;
}
};
void AddSC_cast_commandscript()
{
new cast_commandscript();
}
| gpl-2.0 |
serghei/kde-kdesdk | kbabel/kbabeldict/modules/dbsearchengine2/chunk.cpp | 4176 | //
// C++ Implementation: chunk
//
// Description:
//
//
// Author: Andrea Rizzi <rizzi@kde.org>, (C) 2003
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "chunk.h"
#include "algorithms.h"
#include <kdebug.h>
AbstractChunk::~AbstractChunk( )
{
}
WordChunk::WordChunk( DataBaseInterface * di, QString _word ) : AbstractChunk(di)
{
word=_word;
}
QValueList<QueryResult> WordChunk::translations( )
{
DataBaseInterface::ResultList r;
SingleWordSearchAlgorithm sa(di,di->getSettings());
r=sa.exec(word);
return r;
}
//QValueList<QueryResult> WordChunk::translationsFromReference( uint reference )
//{
//}
QValueList< uint > WordChunk::locationReferences( )
{
QValueList<uint> res=di->getWordIndex(word);
kdDebug(0) << "Number of locations " << res.count() <<endl ;
return res;
/* DBItemMainKey *k = new DBItemMainKey(word);
DBItemMultiIndex *d = new DBItemMultiIndex();
if(wordsindex->get(k,d)!=DB_NOTFOUND)
return d->getList();
else
return QValueList<uint> tmpList;
*/
}
void WordChunk::setLocationReferences( QValueList< uint > )
{
}
SentenceChunk::SentenceChunk( DataBaseInterface * di, QString _sentence ): AbstractChunk(di)
{
sentence=_sentence;
}
QValueList<QueryResult> SentenceChunk::translations( )
{
GenericSearchAlgorithm g(di,di->getSettings());
ExactSearchAlgorithm e(di,di->getSettings());
AlphaSearchAlgorithm a(di,di->getSettings());
SentenceArchiveSearchAlgorithm s(di,di->getSettings());
g.addAlgorithm(&e);
g.addAlgorithm(&a);
g.addAlgorithm(&s);
return g.exec(sentence);
}
//QValueList<QueryResult> SentenceChunk::translationsFromReference( uint reference )
//{
//
//}
QValueList< uint > SentenceChunk::locationReferences( )
{
}
void SentenceChunk::setLocationReferences( QValueList< uint > )
{
}
QPtrList< AbstractChunk> WordChunkFactory::chunks()
{
QString str=di->simple(string);
QPtrList<AbstractChunk> list;
if(str.isEmpty()) return list;
_separators.clear();
kdDebug(0) << "Word chunks of:" <<str << endl;
int pos;
QString sep;
QRegExp r("(\\s)");
do {
pos=r.search(str);
sep=r.cap(1);
if(!str.left(pos).isEmpty()){
//WordChunk *c=new WordChunk(di,di->simple(str.left(pos)))
list.append(new WordChunk(di,str.left(pos)));
_separators.append(sep);
}
else
{
uint current=_separators.count()-1;
_separators[current]=_separators[current]+sep;
}
str=str.remove(0,pos+1);
} while(!str.isEmpty() && pos != -1);
return list;
}
QPtrList<AbstractChunk> SentenceChunkFactory::chunks()
{
QString str=string;
QPtrList<AbstractChunk> list;
if(str.isEmpty()) return list;
// kdDebug(0) << s << endl;
int pos;
do {
QRegExp re("((\\.|;|\\?|\\!|:)( |$|\\\\n\\n))");
pos=re.search(str);
QString sep=re.cap(1);
if(!str.left(pos).isEmpty())
{
list.append(new SentenceChunk(di,str.left(pos).stripWhiteSpace()));
_separators.append(sep);
}
else
{
uint current=_separators.count()-1;
_separators[current]=_separators[current]+sep;
}
str=str.remove(0,pos+re.cap(1).length());
} while(!str.isEmpty() && pos != -1);
return list;
}
QPtrList< AbstractChunk > CaseBasedWordChunkFactory::chunks( )
{
QString str=string;
QPtrList<AbstractChunk> list;
if(str.isEmpty()) return list;
uint slen=str.length();
kdDebug(0) << "CaseWordChunk string:" << str << endl;
QString tmpWord;
bool upcase;
for(uint i=0;i<=slen;i++)
{
bool tmpCase=(str[i]==str[i].upper());
if(upcase!=tmpCase)
{
if(!tmpWord.isEmpty() && !tmpWord.isNull()){
list.append(new WordChunk(di,tmpWord));
_separators.append("");
}
kdDebug(0) << "CaseWordChunk:" << tmpWord << endl;
tmpWord="";
}
tmpWord+=str[i];
upcase=tmpCase;
}
return list;
}
WordChunkFactory::WordChunkFactory( DataBaseInterface * _di ) : AbstractChunkFactory(_di)
{
}
SentenceChunkFactory::SentenceChunkFactory( DataBaseInterface * _di ): AbstractChunkFactory(_di)
{
}
CaseBasedWordChunkFactory::CaseBasedWordChunkFactory( DataBaseInterface * _di ): AbstractChunkFactory(_di)
{
}
| gpl-2.0 |
WMFO/rivendell | utils/rdclilogedit/operations.cpp | 13348 | // rdclilogedit.cpp
//
// A command-line log editor for Rivendell
//
// (C) Copyright 2016 Fred Gleason <fredg@paravelsystems.com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
// published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
#include <rdconf.h>
#include <rdcreate_log.h>
#include <rdescape_string.h>
#include <rdsvc.h>
#include "rdclilogedit.h"
void MainObject::Addcart(int line,unsigned cartnum)
{
if(line>edit_log_event->size()) {
line=edit_log_event->size();
}
edit_log_event->insert(line,1);
edit_log_event->logLine(line)->
setTransType(edit_airplay_conf->defaultTransType());
edit_log_event->logLine(line)->setFadeupGain(-3000);
edit_log_event->logLine(line)->setFadedownGain(-3000);
edit_log_event->logLine(line)->setCartNumber(cartnum);
edit_log_event->refresh(line);
edit_modified=true;
}
void MainObject::Addchain(int line,const QString &logname)
{
if(line>edit_log_event->size()) {
line=edit_log_event->size();
}
edit_log_event->insert(line,1);
edit_log_event->logLine(line)->setType(RDLogLine::Chain);
edit_log_event->logLine(line)->
setTransType(edit_airplay_conf->defaultTransType());
edit_log_event->logLine(line)->setMarkerLabel(logname);
edit_log_event->refresh(line);
edit_modified=true;
}
void MainObject::Addmarker(int line)
{
if(line>edit_log_event->size()) {
line=edit_log_event->size();
}
edit_log_event->insert(line,1);
edit_log_event->logLine(line)->setType(RDLogLine::Marker);
edit_log_event->logLine(line)->
setTransType(edit_airplay_conf->defaultTransType());
edit_log_event->logLine(line)->setMarkerLabel(tr("Label"));
edit_log_event->logLine(line)->setMarkerComment(tr("Marker Comment"));
edit_log_event->refresh(line);
edit_modified=true;
}
void MainObject::Addtrack(int line)
{
if(line>edit_log_event->size()) {
line=edit_log_event->size();
}
edit_log_event->insert(line,1);
edit_log_event->logLine(line)->setType(RDLogLine::Track);
edit_log_event->logLine(line)->
setTransType(edit_airplay_conf->defaultTransType());
edit_log_event->logLine(line)->setMarkerComment(tr("Voice Track"));
edit_log_event->refresh(line);
edit_modified=true;
}
void MainObject::Deletelog(QString logname)
{
QString sql;
RDSqlQuery *q;
//
// Normalize log name case
//
// FIXME: This should really be handled by use of collations in the
// where clause.
//
sql=QString("select NAME from LOGS where ")+
"NAME=\""+RDEscapeString(logname)+"\"";
q=new RDSqlQuery(sql);
if(q->first()) {
logname=q->value(0).toString();
}
delete q;
if((edit_log==NULL)||(edit_log->name()!=logname)) {
RDLog *log=new RDLog(logname);
if(log->exists()) {
if(!log->remove(edit_station,edit_user,edit_config)) {
fprintf(stderr,"deletelog: audio deletion error, log not deleted\n");
}
}
else {
fprintf(stderr,"deletelog: no such log\n");
}
delete log;
}
else {
fprintf(stderr,"deletelog: log currently loaded (try \"unload\" first)\n");
}
}
void MainObject::Header() const
{
printf(" Description: %s\n",(const char *)edit_description);
printf(" Service: %s\n",(const char *)edit_service);
if(edit_auto_refresh) {
printf("Auto Refresh: Yes\n");
}
else {
printf("Auto Refresh: No\n");
}
if(edit_start_date.isNull()) {
printf(" Start Date: None\n");
}
else {
printf(" Start Date: %s\n",
(const char *)edit_start_date.toString("yyyy-MM-dd"));
}
if(edit_end_date.isNull()) {
printf(" End Date: None\n");
}
else {
printf(" End Date: %s\n",
(const char *)edit_end_date.toString("yyyy-MM-dd"));
}
if(edit_purge_date.isNull()) {
printf(" Purge Date: None\n");
}
else {
printf(" Purge Date: %s\n",
(const char *)edit_purge_date.toString("yyyy-MM-dd"));
}
}
void MainObject::List()
{
for(int i=0;i<edit_log_event->size();i++) {
printf("%4d %s\n",i,(const char *)ListLine(edit_log_event,i));
}
printf("%4d --- end of log ---\n",edit_log_event->size());
}
void MainObject::ListLogs() const
{
QString sql;
RDSqlQuery *q;
sql=QString("select NAME from LOGS order by NAME");
q=new RDSqlQuery(sql);
while(q->next()) {
printf("%s\n",(const char *)q->value(0).toString());
}
delete q;
}
void MainObject::Listservices() const
{
QString sql;
RDSqlQuery *q;
sql=QString("select NAME from SERVICES order by NAME");
q=new RDSqlQuery(sql);
while(q->next()) {
printf("%s\n",(const char *)q->value(0).toString());
}
delete q;
}
void MainObject::Load(QString logname)
{
QString sql;
RDSqlQuery *q;
if(edit_log!=NULL) {
delete edit_log;
edit_log=NULL;
}
if(edit_log_event!=NULL) {
delete edit_log_event;
edit_log_event=NULL;
}
//
// Normalize log name case
//
// FIXME: This should really be handled by use of collations in the
// where clause.
//
sql=QString("select NAME from LOGS where ")+
"NAME=\""+RDEscapeString(logname)+"\"";
q=new RDSqlQuery(sql);
if(q->first()) {
logname=q->value(0).toString();
}
delete q;
edit_log=new RDLog(logname);
if(edit_log->exists()) {
edit_log_event=new RDLogEvent(RDLog::tableName(logname));
edit_log_event->load();
edit_description=edit_log->description();
edit_service=edit_log->service();
edit_start_date=edit_log->startDate();
edit_end_date=edit_log->endDate();
edit_purge_date=edit_log->purgeDate();
edit_auto_refresh=edit_log->autoRefresh();
edit_modified=false;
}
else {
fprintf(stderr,"log \"%s\" does not exist\n",(const char *)logname);
delete edit_log;
edit_log=NULL;
}
}
QString MainObject::ListLine(RDLogEvent *evt,int line) const
{
QString ret="";
RDLogLine *logline=evt->logLine(line);
switch(logline->timeType()) {
case RDLogLine::Hard:
ret+=QString().
sprintf("T%s ",(const char *)logline->startTime(RDLogLine::Logged).
toString("hh:mm:ss"));
break;
case RDLogLine::Relative:
ret+=QString().
sprintf(" %s ",(const char *)evt->blockStartTime(line).
toString("hh:mm:ss"));
break;
case RDLogLine::NoTime:
ret+=" ";
break;
}
ret+=QString().sprintf("%-7s",
(const char *)RDLogLine::transText(logline->transType()));
switch(logline->type()) {
case RDLogLine::Cart:
case RDLogLine::Macro:
ret+=QString().sprintf("%06u ",logline->cartNumber());
ret+=QString().sprintf("%-12s",(const char *)logline->groupName());
ret+=QString().sprintf("%5s",
(const char *)RDGetTimeLength(logline->forcedLength(),false,false))+" ";
ret+=logline->title();
break;
case RDLogLine::Marker:
ret+="MARKER ";
ret+=" ";
ret+=" ";
ret+=logline->markerComment();
break;
case RDLogLine::Track:
ret+="TRACK ";
ret+=" ";
ret+=" ";
ret+=logline->markerComment();
break;
case RDLogLine::Chain:
ret+="LOG CHN ";
ret+=" ";
ret+=" ";
ret+=logline->markerLabel();
break;
case RDLogLine::MusicLink:
ret+="LINK ";
ret+=" ";
ret+=" ";
ret+="[music import]";
break;
case RDLogLine::TrafficLink:
ret+="LINK ";
ret+=" ";
ret+=" ";
ret+="[traffic import]";
break;
case RDLogLine::OpenBracket:
case RDLogLine::CloseBracket:
case RDLogLine::UnknownType:
break;
}
return ret;
}
void MainObject::New(const QString &logname)
{
QString sql;
RDSqlQuery *q;
if(edit_log!=NULL) {
delete edit_log;
}
if(edit_log_event!=NULL) {
delete edit_log_event;
}
edit_log=new RDLog(logname);
if(!edit_log->exists()) {
edit_log_event=new RDLogEvent(RDLog::tableName(logname));
edit_description=logname+" log";
sql=QString("select NAME from SERVICES");
q=new RDSqlQuery(sql);
if(q->first()) {
edit_service=q->value(0).toString();
}
delete q;
edit_start_date=QDate();
edit_end_date=QDate();
edit_purge_date=QDate();
edit_auto_refresh=false;
edit_new_log=true;
edit_modified=false;
}
else {
fprintf(stderr,"new: log already exists\n");
}
}
void MainObject::Remove(int line)
{
edit_log_event->remove(line,1);
edit_modified=true;
}
void MainObject::Save()
{
if(edit_new_log) {
Saveas(edit_log->name());
}
else {
edit_log_event->save();
edit_log->setDescription(edit_description);
edit_log->setStartDate(edit_start_date);
edit_log->setEndDate(edit_end_date);
edit_log->setPurgeDate(edit_purge_date);
edit_log->setAutoRefresh(edit_auto_refresh);
edit_log->setService(edit_service);
edit_log->
setModifiedDatetime(QDateTime(QDate::currentDate(),QTime::currentTime()));
edit_modified=false;
}
}
void MainObject::Saveas(const QString &logname)
{
QString sql;
RDSqlQuery *q;
RDLog *log=new RDLog(logname);
if(!log->exists()) {
sql=QString("insert into LOGS set ")+
"NAME=\""+RDEscapeString(logname)+"\","+
"TYPE=0,"+
"DESCRIPTION=\""+RDEscapeString(edit_description)+"\","+
"ORIGIN_USER=\""+RDEscapeString(edit_user->name())+"\","+
"ORIGIN_DATETIME=now(),"+
"LINK_DATETIME=now(),"+
"MODIFIED_DATETIME=now(),"+
"START_DATE="+RDCheckDateTime(edit_start_date,"yyyy-MM-dd")+","+
"END_DATE="+RDCheckDateTime(edit_end_date,"yyyy-MM-dd")+","+
"PURGE_DATE="+RDCheckDateTime(edit_purge_date,"yyyy-MM-dd")+","+
"AUTO_REFRESH=\""+RDYesNo(edit_auto_refresh)+"\","+
"SERVICE=\""+RDEscapeString(edit_service)+"\"";
q=new RDSqlQuery(sql);
delete q;
RDCreateLogTable(RDLog::tableName(logname));
edit_log_event->setLogName(RDLog::tableName(logname));
edit_log_event->save();
delete edit_log;
edit_log=log;
edit_modified=false;
edit_new_log=false;
}
else {
fprintf(stderr,"saveas: log already exists\n");
delete log;
}
}
void MainObject::Setautorefresh(bool state)
{
edit_auto_refresh=state;
edit_modified=true;
}
void MainObject::Setcart(int line,unsigned cartnum)
{
RDLogLine *logline=edit_log_event->logLine(line);
if(logline!=NULL) {
if((logline->type()==RDLogLine::Cart)||
(logline->type()==RDLogLine::Macro)) {
logline->setCartNumber(cartnum);
edit_log_event->refresh(line);
edit_modified=true;
}
else {
fprintf(stderr,"setcart: incompatible event type\n");
}
}
else {
fprintf(stderr,"setcart: no such line\n");
}
}
void MainObject::Setcomment(int line,const QString &str)
{
RDLogLine *logline=edit_log_event->logLine(line);
if(logline!=NULL) {
if((logline->type()==RDLogLine::Marker)||
(logline->type()==RDLogLine::Track)) {
logline->setMarkerComment(str);
edit_log_event->refresh(line);
edit_modified=true;
}
else {
fprintf(stderr,"setcomment: incompatible event type\n");
}
}
else {
fprintf(stderr,"setcomment: no such line\n");
}
}
void MainObject::Setdesc(const QString &str)
{
edit_description=str;
edit_modified=true;
}
void MainObject::Setenddate(const QDate &date)
{
edit_end_date=date;
edit_modified=true;
}
void MainObject::Setlabel(int line,const QString &str)
{
RDLogLine *logline=edit_log_event->logLine(line);
if(logline!=NULL) {
if((logline->type()==RDLogLine::Chain)||
(logline->type()==RDLogLine::Marker)) {
logline->setMarkerLabel(str);
edit_log_event->refresh(line);
edit_modified=true;
}
else {
fprintf(stderr,"setlabel: incompatible event type\n");
}
}
else {
fprintf(stderr,"setlabel: no such line\n");
}
}
void MainObject::Setpurgedate(const QDate &date)
{
edit_purge_date=date;
edit_modified=true;
}
void MainObject::Setservice(const QString &str)
{
RDSvc *svc=new RDSvc(str);
if(svc->exists()) {
edit_service=str;
edit_modified=true;
}
else {
fprintf(stderr,"setservice: no such service\n");
fprintf(stderr,"(Do \"listservices\" for a list\n");
}
delete svc;
}
void MainObject::Settime(int line,RDLogLine::TimeType type,const QTime &time)
{
edit_log_event->logLine(line)->setTimeType(type);
edit_log_event->logLine(line)->setStartTime(RDLogLine::Logged,time);
edit_modified=true;
}
void MainObject::Settrans(int line,RDLogLine::TransType type)
{
edit_log_event->logLine(line)->setTransType(type);
edit_log_event->refresh(line);
edit_modified=true;
}
void MainObject::Setstartdate(const QDate &date)
{
edit_start_date=date;
edit_modified=true;
}
void MainObject::Unload()
{
if(edit_log!=NULL) {
delete edit_log;
edit_log=NULL;
}
if(edit_log_event!=NULL) {
delete edit_log_event;
edit_log_event=NULL;
}
edit_modified=false;
}
| gpl-2.0 |
NullNoname/dolphin | Externals/wxWidgets3/src/msw/glcanvas.cpp | 28679 | /////////////////////////////////////////////////////////////////////////////
// Name: src/msw/glcanvas.cpp
// Purpose: wxGLCanvas, for using OpenGL with wxWidgets under MS Windows
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// RCS-ID: $Id: glcanvas.cpp 66581 2011-01-04 19:00:10Z DS $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
// declarations
// ============================================================================
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#include "wx/wxprec.h"
#if defined(__BORLANDC__)
#pragma hdrstop
#endif
#if wxUSE_GLCANVAS
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/app.h"
#endif
#include "wx/msw/private.h"
#include "wx/glcanvas.h"
// from src/msw/window.cpp
LRESULT WXDLLEXPORT APIENTRY _EXPORT wxWndProc(HWND hWnd, UINT message,
WPARAM wParam, LPARAM lParam);
#ifdef GL_EXT_vertex_array
#define WXUNUSED_WITHOUT_GL_EXT_vertex_array(name) name
#else
#define WXUNUSED_WITHOUT_GL_EXT_vertex_array(name) WXUNUSED(name)
#endif
// ----------------------------------------------------------------------------
// define possibly missing WGL constants
// ----------------------------------------------------------------------------
#ifndef WGL_ARB_pixel_format
#define WGL_DRAW_TO_WINDOW_ARB 0x2001
#define WGL_ACCELERATION_ARB 0x2003
#define WGL_NUMBER_OVERLAYS_ARB 0x2008
#define WGL_NUMBER_UNDERLAYS_ARB 0x2009
#define WGL_SUPPORT_OPENGL_ARB 0x2010
#define WGL_DOUBLE_BUFFER_ARB 0x2011
#define WGL_STEREO_ARB 0x2012
#define WGL_COLOR_BITS_ARB 0x2014
#define WGL_RED_BITS_ARB 0x2015
#define WGL_GREEN_BITS_ARB 0x2017
#define WGL_BLUE_BITS_ARB 0x2019
#define WGL_ALPHA_BITS_ARB 0x201B
#define WGL_ACCUM_RED_BITS_ARB 0x201E
#define WGL_ACCUM_GREEN_BITS_ARB 0x201F
#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
#define WGL_DEPTH_BITS_ARB 0x2022
#define WGL_STENCIL_BITS_ARB 0x2023
#define WGL_AUX_BUFFERS_ARB 0x2024
#define WGL_FULL_ACCELERATION_ARB 0x2027
#endif
#ifndef WGL_ARB_multisample
#define WGL_SAMPLE_BUFFERS_ARB 0x2041
#define WGL_SAMPLES_ARB 0x2042
#endif
// ----------------------------------------------------------------------------
// libraries
// ----------------------------------------------------------------------------
/*
The following two compiler directives are specific to the Microsoft Visual
C++ family of compilers
Fundementally what they do is instruct the linker to use these two libraries
for the resolution of symbols. In essence, this is the equivalent of adding
these two libraries to either the Makefile or project file.
This is NOT a recommended technique, and certainly is unlikely to be used
anywhere else in wxWidgets given it is so specific to not only wxMSW, but
also the VC compiler. However, in the case of opengl support, it's an
applicable technique as opengl is optional in setup.h This code (wrapped by
wxUSE_GLCANVAS), now allows opengl support to be added purely by modifying
setup.h rather than by having to modify either the project or DSP fle.
See MSDN for further information on the exact usage of these commands.
*/
#ifdef _MSC_VER
# pragma comment( lib, "opengl32" )
# pragma comment( lib, "glu32" )
#endif
// ----------------------------------------------------------------------------
// wxGLContext
// ----------------------------------------------------------------------------
IMPLEMENT_CLASS(wxGLContext, wxObject)
wxGLContext::wxGLContext(wxGLCanvas *win, const wxGLContext* other)
{
m_glContext = wglCreateContext(win->GetHDC());
wxCHECK_RET( m_glContext, wxT("Couldn't create OpenGL context") );
if ( other )
{
if ( !wglShareLists(other->m_glContext, m_glContext) )
{
wxLogLastError(wxT("wglShareLists"));
}
}
}
wxGLContext::~wxGLContext()
{
// note that it's ok to delete the context even if it's the current one
wglDeleteContext(m_glContext);
}
bool wxGLContext::SetCurrent(const wxGLCanvas& win) const
{
if ( !wglMakeCurrent(win.GetHDC(), m_glContext) )
{
wxLogLastError(wxT("wglMakeCurrent"));
return false;
}
return true;
}
// ============================================================================
// wxGLCanvas
// ============================================================================
IMPLEMENT_CLASS(wxGLCanvas, wxWindow)
BEGIN_EVENT_TABLE(wxGLCanvas, wxWindow)
#if wxUSE_PALETTE
EVT_PALETTE_CHANGED(wxGLCanvas::OnPaletteChanged)
EVT_QUERY_NEW_PALETTE(wxGLCanvas::OnQueryNewPalette)
#endif
END_EVENT_TABLE()
// ----------------------------------------------------------------------------
// wxGLCanvas construction
// ----------------------------------------------------------------------------
static int ChoosePixelFormatARB(HDC hdc, const int *attribList);
void wxGLCanvas::Init()
{
#if WXWIN_COMPATIBILITY_2_8
m_glContext = NULL;
#endif
m_hDC = NULL;
}
wxGLCanvas::wxGLCanvas(wxWindow *parent,
wxWindowID id,
const int *attribList,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString& name,
const wxPalette& palette)
{
Init();
(void)Create(parent, id, pos, size, style, name, attribList, palette);
}
wxGLCanvas::~wxGLCanvas()
{
::ReleaseDC(GetHwnd(), m_hDC);
}
// Replaces wxWindow::Create functionality, since we need to use a different
// window class
bool wxGLCanvas::CreateWindow(wxWindow *parent,
wxWindowID id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString& name)
{
wxCHECK_MSG( parent, false, wxT("can't create wxWindow without parent") );
if ( !CreateBase(parent, id, pos, size, style, wxDefaultValidator, name) )
return false;
parent->AddChild(this);
/*
A general rule with OpenGL and Win32 is that any window that will have a
HGLRC built for it must have two flags: WS_CLIPCHILDREN & WS_CLIPSIBLINGS.
You can find references about this within the knowledge base and most OpenGL
books that contain the wgl function descriptions.
*/
WXDWORD exStyle = 0;
DWORD msflags = WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN;
msflags |= MSWGetStyle(style, &exStyle);
if ( !MSWCreate(wxApp::GetRegisteredClassName(wxT("wxGLCanvas"), -1, CS_OWNDC),
NULL, pos, size, msflags, exStyle) )
return false;
m_hDC = ::GetDC(GetHwnd());
if ( !m_hDC )
return false;
return true;
}
bool wxGLCanvas::Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString& name,
const int *attribList,
const wxPalette& palette)
{
// Create the window first: we will either use it as is or use it to query
// for multisampling support and recreate it later with another pixel format
if ( !CreateWindow(parent, id, pos, size, style, name) )
return false;
PIXELFORMATDESCRIPTOR pfd;
const int setupVal = DoSetup(pfd, attribList);
if ( setupVal == 0 ) // PixelFormat error
return false;
if ( setupVal == -1 ) // FSAA requested
{
// now that we have a valid OpenGL window, query it for FSAA support
int pixelFormat;
{
wxGLContext ctx(this);
ctx.SetCurrent(*this);
pixelFormat = ::ChoosePixelFormatARB(m_hDC, attribList);
}
if ( pixelFormat > 0 )
{
// from http://msdn.microsoft.com/en-us/library/ms537559(VS.85).aspx:
//
// Setting the pixel format of a window more than once can
// lead to significant complications for the Window Manager
// and for multithread applications, so it is not allowed. An
// application can only set the pixel format of a window one
// time. Once a window's pixel format is set, it cannot be
// changed.
//
// so we need to delete the old window and create the new one
// destroy Window
::ReleaseDC(GetHwnd(), m_hDC);
m_hDC = 0;
parent->RemoveChild(this);
const HWND hwnd = GetHwnd();
DissociateHandle(); // will do SetHWND(0);
::DestroyWindow(hwnd);
// now recreate with FSAA pixelFormat
if ( !CreateWindow(parent, id, pos, size, style, name) )
return false;
if ( !::SetPixelFormat(m_hDC, pixelFormat, &pfd) )
{
wxLogLastError(wxT("SetPixelFormat"));
return false;
}
}
}
#if wxUSE_PALETTE
if ( !SetupPalette(palette) )
return false;
#else // !wxUSE_PALETTE
wxUnusedVar(palette);
#endif // wxUSE_PALETTE/!wxUSE_PALETTE
return true;
}
// ----------------------------------------------------------------------------
// operations
// ----------------------------------------------------------------------------
bool wxGLCanvas::SwapBuffers()
{
if ( !::SwapBuffers(m_hDC) )
{
wxLogLastError(wxT("SwapBuffers"));
return false;
}
return true;
}
// ----------------------------------------------------------------------------
// multi sample support
// ----------------------------------------------------------------------------
// this macro defines a variable of type "name_t" called "name" and initializes
// it with the pointer to WGL function "name" (which may be NULL)
#define wxDEFINE_WGL_FUNC(name) \
name##_t name = (name##_t)wglGetProcAddress(#name)
/* static */
bool wxGLCanvasBase::IsExtensionSupported(const char *extension)
{
static const char *s_extensionsList = (char *)wxUIntPtr(-1);
if ( s_extensionsList == (char *)wxUIntPtr(-1) )
{
typedef const char * (WINAPI *wglGetExtensionsStringARB_t)(HDC hdc);
wxDEFINE_WGL_FUNC(wglGetExtensionsStringARB);
if ( wglGetExtensionsStringARB )
{
s_extensionsList = wglGetExtensionsStringARB(wglGetCurrentDC());
}
else
{
typedef const char * (WINAPI * wglGetExtensionsStringEXT_t)();
wxDEFINE_WGL_FUNC(wglGetExtensionsStringEXT);
if ( wglGetExtensionsStringEXT )
{
s_extensionsList = wglGetExtensionsStringEXT();
}
else
{
s_extensionsList = NULL;
}
}
}
return s_extensionsList && IsExtensionInList(s_extensionsList, extension);
}
// this is a wrapper around wglChoosePixelFormatARB(): returns the pixel format
// index matching the given attributes on success or 0 on failure
static int ChoosePixelFormatARB(HDC hdc, const int *attribList)
{
if ( !wxGLCanvas::IsExtensionSupported("WGL_ARB_multisample") )
return 0;
typedef BOOL (WINAPI * wglChoosePixelFormatARB_t)
(HDC hdc,
const int *piAttribIList,
const FLOAT *pfAttribFList,
UINT nMaxFormats,
int *piFormats,
UINT *nNumFormats
);
wxDEFINE_WGL_FUNC(wglChoosePixelFormatARB);
if ( !wglChoosePixelFormatARB )
return 0; // should not occur if extension is supported
int iAttributes[128];
int dst = 0; // index in iAttributes array
#define ADD_ATTR(attr, value) \
iAttributes[dst++] = attr; iAttributes[dst++] = value
ADD_ATTR( WGL_DRAW_TO_WINDOW_ARB, GL_TRUE );
ADD_ATTR( WGL_SUPPORT_OPENGL_ARB, GL_TRUE );
ADD_ATTR( WGL_ACCELERATION_ARB, WGL_FULL_ACCELERATION_ARB );
if ( !attribList )
{
ADD_ATTR( WGL_COLOR_BITS_ARB, 24 );
ADD_ATTR( WGL_ALPHA_BITS_ARB, 8 );
ADD_ATTR( WGL_DEPTH_BITS_ARB, 16 );
ADD_ATTR( WGL_STENCIL_BITS_ARB, 0 );
ADD_ATTR( WGL_DOUBLE_BUFFER_ARB, GL_TRUE );
ADD_ATTR( WGL_SAMPLE_BUFFERS_ARB, GL_TRUE );
ADD_ATTR( WGL_SAMPLES_ARB, 4 );
}
else // have custom attributes
{
#define ADD_ATTR_VALUE(attr) ADD_ATTR(attr, attribList[src++])
int src = 0;
while ( attribList[src] )
{
switch ( attribList[src++] )
{
case WX_GL_RGBA:
ADD_ATTR( WGL_COLOR_BITS_ARB, 24 );
ADD_ATTR( WGL_ALPHA_BITS_ARB, 8 );
break;
case WX_GL_BUFFER_SIZE:
ADD_ATTR_VALUE( WGL_COLOR_BITS_ARB);
break;
case WX_GL_LEVEL:
if ( attribList[src] > 0 )
{
ADD_ATTR( WGL_NUMBER_OVERLAYS_ARB, 1 );
}
else if ( attribList[src] <0 )
{
ADD_ATTR( WGL_NUMBER_UNDERLAYS_ARB, 1 );
}
//else: ignore it
src++; // skip the value in any case
break;
case WX_GL_DOUBLEBUFFER:
ADD_ATTR( WGL_DOUBLE_BUFFER_ARB, GL_TRUE );
break;
case WX_GL_STEREO:
ADD_ATTR( WGL_STEREO_ARB, GL_TRUE );
break;
case WX_GL_AUX_BUFFERS:
ADD_ATTR_VALUE( WGL_AUX_BUFFERS_ARB );
break;
case WX_GL_MIN_RED:
ADD_ATTR_VALUE( WGL_RED_BITS_ARB );
break;
case WX_GL_MIN_GREEN:
ADD_ATTR_VALUE( WGL_GREEN_BITS_ARB );
break;
case WX_GL_MIN_BLUE:
ADD_ATTR_VALUE( WGL_BLUE_BITS_ARB );
break;
case WX_GL_MIN_ALPHA:
ADD_ATTR_VALUE( WGL_ALPHA_BITS_ARB );
break;
case WX_GL_DEPTH_SIZE:
ADD_ATTR_VALUE( WGL_DEPTH_BITS_ARB );
break;
case WX_GL_STENCIL_SIZE:
ADD_ATTR_VALUE( WGL_STENCIL_BITS_ARB );
break;
case WX_GL_MIN_ACCUM_RED:
ADD_ATTR_VALUE( WGL_ACCUM_RED_BITS_ARB );
break;
case WX_GL_MIN_ACCUM_GREEN:
ADD_ATTR_VALUE( WGL_ACCUM_GREEN_BITS_ARB );
break;
case WX_GL_MIN_ACCUM_BLUE:
ADD_ATTR_VALUE( WGL_ACCUM_BLUE_BITS_ARB );
break;
case WX_GL_MIN_ACCUM_ALPHA:
ADD_ATTR_VALUE( WGL_ACCUM_ALPHA_BITS_ARB );
break;
case WX_GL_SAMPLE_BUFFERS:
ADD_ATTR_VALUE( WGL_SAMPLE_BUFFERS_ARB );
break;
case WX_GL_SAMPLES:
ADD_ATTR_VALUE( WGL_SAMPLES_ARB );
break;
}
}
#undef ADD_ATTR_VALUE
}
#undef ADD_ATTR
iAttributes[dst++] = 0;
int pf;
UINT numFormats = 0;
if ( !wglChoosePixelFormatARB(hdc, iAttributes, NULL, 1, &pf, &numFormats) )
{
wxLogLastError(wxT("wglChoosePixelFormatARB"));
return 0;
}
// Although TRUE is returned if no matching formats are found (see
// http://www.opengl.org/registry/specs/ARB/wgl_pixel_format.txt), pf is
// not initialized in this case so we need to check for numFormats being
// not 0 explicitly (however this is not an error so don't call
// wxLogLastError() here).
if ( !numFormats )
pf = 0;
return pf;
}
// ----------------------------------------------------------------------------
// pixel format stuff
// ----------------------------------------------------------------------------
// returns true if pfd was adjusted accordingly to attributes provided, false
// if there is an error with attributes or -1 if the attributes indicate
// features not supported by ChoosePixelFormat() at all (currently only multi
// sampling)
static int
AdjustPFDForAttributes(PIXELFORMATDESCRIPTOR& pfd, const int *attribList)
{
if ( !attribList )
return 1;
// remove default attributes
pfd.dwFlags &= ~PFD_DOUBLEBUFFER;
pfd.iPixelType = PFD_TYPE_COLORINDEX;
bool requestFSAA = false;
for ( int arg = 0; attribList[arg]; )
{
switch ( attribList[arg++] )
{
case WX_GL_RGBA:
pfd.iPixelType = PFD_TYPE_RGBA;
break;
case WX_GL_BUFFER_SIZE:
pfd.cColorBits = attribList[arg++];
break;
case WX_GL_LEVEL:
// this member looks like it may be obsolete
if ( attribList[arg] > 0 )
pfd.iLayerType = PFD_OVERLAY_PLANE;
else if ( attribList[arg] < 0 )
pfd.iLayerType = (BYTE)PFD_UNDERLAY_PLANE;
else
pfd.iLayerType = PFD_MAIN_PLANE;
arg++;
break;
case WX_GL_DOUBLEBUFFER:
pfd.dwFlags |= PFD_DOUBLEBUFFER;
break;
case WX_GL_STEREO:
pfd.dwFlags |= PFD_STEREO;
break;
case WX_GL_AUX_BUFFERS:
pfd.cAuxBuffers = attribList[arg++];
break;
case WX_GL_MIN_RED:
pfd.cColorBits += (pfd.cRedBits = attribList[arg++]);
break;
case WX_GL_MIN_GREEN:
pfd.cColorBits += (pfd.cGreenBits = attribList[arg++]);
break;
case WX_GL_MIN_BLUE:
pfd.cColorBits += (pfd.cBlueBits = attribList[arg++]);
break;
case WX_GL_MIN_ALPHA:
// doesn't count in cColorBits
pfd.cAlphaBits = attribList[arg++];
break;
case WX_GL_DEPTH_SIZE:
pfd.cDepthBits = attribList[arg++];
break;
case WX_GL_STENCIL_SIZE:
pfd.cStencilBits = attribList[arg++];
break;
case WX_GL_MIN_ACCUM_RED:
pfd.cAccumBits += (pfd.cAccumRedBits = attribList[arg++]);
break;
case WX_GL_MIN_ACCUM_GREEN:
pfd.cAccumBits += (pfd.cAccumGreenBits = attribList[arg++]);
break;
case WX_GL_MIN_ACCUM_BLUE:
pfd.cAccumBits += (pfd.cAccumBlueBits = attribList[arg++]);
break;
case WX_GL_MIN_ACCUM_ALPHA:
pfd.cAccumBits += (pfd.cAccumAlphaBits = attribList[arg++]);
break;
case WX_GL_SAMPLE_BUFFERS:
case WX_GL_SAMPLES:
// There is no support for multisample when using PIXELFORMATDESCRIPTOR
requestFSAA = true; // Remember that multi sample is requested.
arg++; // will call ChoosePixelFormatARB() later
break;
}
}
return requestFSAA ? -1 : 1;
}
/* static */
int
wxGLCanvas::ChooseMatchingPixelFormat(HDC hdc,
const int *attribList,
PIXELFORMATDESCRIPTOR *ppfd)
{
// default neutral pixel format
PIXELFORMATDESCRIPTOR pfd =
{
sizeof(PIXELFORMATDESCRIPTOR), // size
1, // version
PFD_SUPPORT_OPENGL |
PFD_DRAW_TO_WINDOW |
PFD_DOUBLEBUFFER, // use double-buffering by default
PFD_TYPE_RGBA, // default pixel type
0, // preferred color depth (don't care)
0, 0, 0, 0, 0, 0, // color bits and shift bits (ignored)
0, 0, // alpha bits and shift (ignored)
0, // accumulation total bits
0, 0, 0, 0, // accumulator RGBA bits (not used)
16, // depth buffer
0, // no stencil buffer
0, // no auxiliary buffers
PFD_MAIN_PLANE, // main layer
0, // reserved
0, 0, 0, // no layer, visible, damage masks
};
if ( !ppfd )
ppfd = &pfd;
else
*ppfd = pfd;
// adjust the PFD using the provided attributes and also check if we can
// use PIXELFORMATDESCRIPTOR at all: if multisampling is requested, we
// can't as it's not supported by ChoosePixelFormat()
switch ( AdjustPFDForAttributes(*ppfd, attribList) )
{
case 1:
return ::ChoosePixelFormat(hdc, ppfd);
default:
wxFAIL_MSG( "unexpected AdjustPFDForAttributes() return value" );
// fall through
case 0:
// error in attributes
return 0;
case -1:
// requestFSAA == true, will continue as normal
// in order to query later for a FSAA pixelformat
return -1;
}
}
/* static */
bool wxGLCanvasBase::IsDisplaySupported(const int *attribList)
{
// We need a device context to test the pixel format, so get one
// for the root window.
return wxGLCanvas::ChooseMatchingPixelFormat(ScreenHDC(), attribList) > 0;
}
int wxGLCanvas::DoSetup(PIXELFORMATDESCRIPTOR &pfd, const int *attribList)
{
int pixelFormat = ChooseMatchingPixelFormat(m_hDC, attribList, &pfd);
const bool requestFSAA = pixelFormat == -1;
if ( requestFSAA )
pixelFormat = ::ChoosePixelFormat(m_hDC, &pfd);
if ( !pixelFormat )
{
wxLogLastError(wxT("ChoosePixelFormat"));
return 0;
}
if ( !::SetPixelFormat(m_hDC, pixelFormat, &pfd) )
{
wxLogLastError(wxT("SetPixelFormat"));
return 0;
}
return requestFSAA ? -1 : 1;
}
// ----------------------------------------------------------------------------
// palette stuff
// ----------------------------------------------------------------------------
#if wxUSE_PALETTE
bool wxGLCanvas::SetupPalette(const wxPalette& palette)
{
const int pixelFormat = ::GetPixelFormat(m_hDC);
if ( !pixelFormat )
{
wxLogLastError(wxT("GetPixelFormat"));
return false;
}
PIXELFORMATDESCRIPTOR pfd;
if ( !::DescribePixelFormat(m_hDC, pixelFormat, sizeof(pfd), &pfd) )
{
wxLogLastError(wxT("DescribePixelFormat"));
return false;
}
if ( !(pfd.dwFlags & PFD_NEED_PALETTE) )
return true;
m_palette = palette;
if ( !m_palette.Ok() )
{
m_palette = CreateDefaultPalette();
if ( !m_palette.Ok() )
return false;
}
if ( !::SelectPalette(m_hDC, GetHpaletteOf(m_palette), FALSE) )
{
wxLogLastError(wxT("SelectPalette"));
return false;
}
if ( ::RealizePalette(m_hDC) == GDI_ERROR )
{
wxLogLastError(wxT("RealizePalette"));
return false;
}
return true;
}
wxPalette wxGLCanvas::CreateDefaultPalette()
{
PIXELFORMATDESCRIPTOR pfd;
int paletteSize;
int pixelFormat = GetPixelFormat(m_hDC);
DescribePixelFormat(m_hDC, pixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
paletteSize = 1 << pfd.cColorBits;
LOGPALETTE* pPal =
(LOGPALETTE*) malloc(sizeof(LOGPALETTE) + paletteSize * sizeof(PALETTEENTRY));
pPal->palVersion = 0x300;
pPal->palNumEntries = (WORD)paletteSize;
/* build a simple RGB color palette */
int redMask = (1 << pfd.cRedBits) - 1;
int greenMask = (1 << pfd.cGreenBits) - 1;
int blueMask = (1 << pfd.cBlueBits) - 1;
for (int i=0; i<paletteSize; ++i)
{
pPal->palPalEntry[i].peRed =
(BYTE)((((i >> pfd.cRedShift) & redMask) * 255) / redMask);
pPal->palPalEntry[i].peGreen =
(BYTE)((((i >> pfd.cGreenShift) & greenMask) * 255) / greenMask);
pPal->palPalEntry[i].peBlue =
(BYTE)((((i >> pfd.cBlueShift) & blueMask) * 255) / blueMask);
pPal->palPalEntry[i].peFlags = 0;
}
HPALETTE hPalette = CreatePalette(pPal);
free(pPal);
wxPalette palette;
palette.SetHPALETTE((WXHPALETTE) hPalette);
return palette;
}
void wxGLCanvas::OnQueryNewPalette(wxQueryNewPaletteEvent& event)
{
/* realize palette if this is the current window */
if ( GetPalette()->Ok() ) {
::UnrealizeObject((HPALETTE) GetPalette()->GetHPALETTE());
::SelectPalette(GetHDC(), (HPALETTE) GetPalette()->GetHPALETTE(), FALSE);
::RealizePalette(GetHDC());
Refresh();
event.SetPaletteRealized(true);
}
else
event.SetPaletteRealized(false);
}
void wxGLCanvas::OnPaletteChanged(wxPaletteChangedEvent& event)
{
/* realize palette if this is *not* the current window */
if ( GetPalette() &&
GetPalette()->Ok() && (this != event.GetChangedWindow()) )
{
::UnrealizeObject((HPALETTE) GetPalette()->GetHPALETTE());
::SelectPalette(GetHDC(), (HPALETTE) GetPalette()->GetHPALETTE(), FALSE);
::RealizePalette(GetHDC());
Refresh();
}
}
#endif // wxUSE_PALETTE
// ----------------------------------------------------------------------------
// deprecated wxGLCanvas methods using implicit wxGLContext
// ----------------------------------------------------------------------------
// deprecated constructors creating an implicit m_glContext
#if WXWIN_COMPATIBILITY_2_8
wxGLCanvas::wxGLCanvas(wxWindow *parent,
wxWindowID id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString& name,
const int *attribList,
const wxPalette& palette)
{
Init();
if ( Create(parent, id, pos, size, style, name, attribList, palette) )
m_glContext = new wxGLContext(this);
}
wxGLCanvas::wxGLCanvas(wxWindow *parent,
const wxGLContext *shared,
wxWindowID id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString& name,
const int *attribList,
const wxPalette& palette)
{
Init();
if ( Create(parent, id, pos, size, style, name, attribList, palette) )
m_glContext = new wxGLContext(this, shared);
}
wxGLCanvas::wxGLCanvas(wxWindow *parent,
const wxGLCanvas *shared,
wxWindowID id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString& name,
const int *attribList,
const wxPalette& palette)
{
Init();
if ( Create(parent, id, pos, size, style, name, attribList, palette) )
m_glContext = new wxGLContext(this, shared ? shared->m_glContext : NULL);
}
#endif // WXWIN_COMPATIBILITY_2_8
// ----------------------------------------------------------------------------
// wxGLApp
// ----------------------------------------------------------------------------
bool wxGLApp::InitGLVisual(const int *attribList)
{
if ( !wxGLCanvas::ChooseMatchingPixelFormat(ScreenHDC(), attribList) )
{
wxLogError(_("Failed to initialize OpenGL"));
return false;
}
return true;
}
#endif // wxUSE_GLCANVAS
| gpl-2.0 |
lluis/initr | puppet/modules/webserver1/db/migrate/20091105120129_one_password_for_each_service.rb | 535 | class OnePasswordForEachService < ActiveRecord::Migration
def self.up
rename_column(:initr_webserver1_domains, :password, :password_ftp)
rename_column(:initr_webserver1_domains, :password_clear, :password_db)
add_column(:initr_webserver1_domains, :password_awstats, :string)
end
def self.down
rename_column(:initr_webserver1_domains, :password_ftp, :password)
rename_column(:initr_webserver1_domains, :password_db, :password_clear)
remove_column(:initr_webserver1_domains, :password_awstats)
end
end
| gpl-2.0 |
svkaiser/Doom64EX | src/engine/opengl/glad.cc | 61338 | /*
OpenGL loader generated by glad 0.1.12a0 on Fri Dec 16 20:01:16 2016.
Language/Generator: C/C++
Specification: gl
APIs: gl=1.4
Profile: compatibility
Extensions:
GL_ARB_multitexture,
GL_ARB_texture_env_combine,
GL_ARB_texture_non_power_of_two,
GL_ARB_vertex_buffer_object,
GL_EXT_compiled_vertex_array,
GL_EXT_fog_coord,
GL_EXT_texture_env_combine,
GL_EXT_texture_filter_anisotropic
Loader: False
Local files: False
Omit khrplatform: False
Commandline:
--profile="compatibility" --api="gl=1.4" --generator="c" --spec="gl" --no-loader --extensions="GL_ARB_multitexture,GL_ARB_texture_env_combine,GL_ARB_texture_non_power_of_two,GL_ARB_vertex_buffer_object,GL_EXT_compiled_vertex_array,GL_EXT_fog_coord,GL_EXT_texture_env_combine,GL_EXT_texture_filter_anisotropic"
Online:
http://glad.dav1d.de/#profile=compatibility&language=c&specification=gl&api=gl%3D1.4&extensions=GL_ARB_multitexture&extensions=GL_ARB_texture_env_combine&extensions=GL_ARB_texture_non_power_of_two&extensions=GL_ARB_vertex_buffer_object&extensions=GL_EXT_compiled_vertex_array&extensions=GL_EXT_fog_coord&extensions=GL_EXT_texture_env_combine&extensions=GL_EXT_texture_filter_anisotropic
*/
#ifdef _WIN32
#define APIENTRY __stdcall
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "glad.h"
struct gladGLversionStruct GLVersion;
#if defined(GL_ES_VERSION_3_0) || defined(GL_VERSION_3_0)
#define _GLAD_IS_SOME_NEW_VERSION 1
#endif
static int max_loaded_major;
static int max_loaded_minor;
static const char *exts = NULL;
static const char **exts_i = NULL;
static int get_exts(void) {
#ifdef _GLAD_IS_SOME_NEW_VERSION
if(max_loaded_major < 3) {
#endif
exts = (const char *)glGetString(GL_EXTENSIONS);
#ifdef _GLAD_IS_SOME_NEW_VERSION
} else {
int index;
num_exts_i = 0;
glGetIntegerv(GL_NUM_EXTENSIONS, &num_exts_i);
if (num_exts_i > 0) {
exts_i = (const char **)realloc((void *)exts_i, num_exts_i * sizeof *exts_i);
}
if (exts_i == NULL) {
return 0;
}
for(index = 0; index < num_exts_i; index++) {
exts_i[index] = (const char*)glGetStringi(GL_EXTENSIONS, index);
}
}
#endif
return 1;
}
static void free_exts(void) {
if (exts_i != NULL) {
free((char **)exts_i);
exts_i = NULL;
}
}
static int has_ext(const char *ext) {
#ifdef _GLAD_IS_SOME_NEW_VERSION
if(max_loaded_major < 3) {
#endif
const char *extensions;
const char *loc;
const char *terminator;
extensions = exts;
if(extensions == NULL || ext == NULL) {
return 0;
}
while(1) {
loc = strstr(extensions, ext);
if(loc == NULL) {
return 0;
}
terminator = loc + strlen(ext);
if((loc == extensions || *(loc - 1) == ' ') &&
(*terminator == ' ' || *terminator == '\0')) {
return 1;
}
extensions = terminator;
}
#ifdef _GLAD_IS_SOME_NEW_VERSION
} else {
int index;
for(index = 0; index < num_exts_i; index++) {
const char *e = exts_i[index];
if(strcmp(e, ext) == 0) {
return 1;
}
}
}
#endif
return 0;
}
int GLAD_GL_VERSION_1_0;
int GLAD_GL_VERSION_1_1;
int GLAD_GL_VERSION_1_2;
int GLAD_GL_VERSION_1_3;
int GLAD_GL_VERSION_1_4;
PFNGLCOPYTEXIMAGE1DPROC glad_glCopyTexImage1D;
PFNGLWINDOWPOS2SPROC glad_glWindowPos2s;
PFNGLWINDOWPOS2IPROC glad_glWindowPos2i;
PFNGLWINDOWPOS2FPROC glad_glWindowPos2f;
PFNGLWINDOWPOS2DPROC glad_glWindowPos2d;
PFNGLVERTEX2FVPROC glad_glVertex2fv;
PFNGLINDEXIPROC glad_glIndexi;
PFNGLRECTDVPROC glad_glRectdv;
PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glad_glCompressedTexSubImage3D;
PFNGLEVALCOORD2DPROC glad_glEvalCoord2d;
PFNGLEVALCOORD2FPROC glad_glEvalCoord2f;
PFNGLINDEXDPROC glad_glIndexd;
PFNGLINDEXFPROC glad_glIndexf;
PFNGLLINEWIDTHPROC glad_glLineWidth;
PFNGLGETMAPFVPROC glad_glGetMapfv;
PFNGLINDEXSPROC glad_glIndexs;
PFNGLWINDOWPOS2IVPROC glad_glWindowPos2iv;
PFNGLINDEXFVPROC glad_glIndexfv;
PFNGLFOGIVPROC glad_glFogiv;
PFNGLRASTERPOS2FVPROC glad_glRasterPos2fv;
PFNGLLIGHTMODELIVPROC glad_glLightModeliv;
PFNGLCOLOR4UIPROC glad_glColor4ui;
PFNGLSECONDARYCOLOR3FVPROC glad_glSecondaryColor3fv;
PFNGLFOGFVPROC glad_glFogfv;
PFNGLVERTEX4IVPROC glad_glVertex4iv;
PFNGLEVALCOORD1FVPROC glad_glEvalCoord1fv;
PFNGLWINDOWPOS2SVPROC glad_glWindowPos2sv;
PFNGLCOPYTEXSUBIMAGE2DPROC glad_glCopyTexSubImage2D;
PFNGLCOMPRESSEDTEXIMAGE2DPROC glad_glCompressedTexImage2D;
PFNGLBLENDFUNCSEPARATEPROC glad_glBlendFuncSeparate;
PFNGLVERTEX4FVPROC glad_glVertex4fv;
PFNGLBINDTEXTUREPROC glad_glBindTexture;
PFNGLTEXCOORD2FVPROC glad_glTexCoord2fv;
PFNGLTEXCOORD4FVPROC glad_glTexCoord4fv;
PFNGLPOINTSIZEPROC glad_glPointSize;
PFNGLCOLOR4BVPROC glad_glColor4bv;
PFNGLRASTERPOS2FPROC glad_glRasterPos2f;
PFNGLRASTERPOS2DPROC glad_glRasterPos2d;
PFNGLLOADIDENTITYPROC glad_glLoadIdentity;
PFNGLRASTERPOS2IPROC glad_glRasterPos2i;
PFNGLCOLOR3BPROC glad_glColor3b;
PFNGLEDGEFLAGPROC glad_glEdgeFlag;
PFNGLVERTEX3DPROC glad_glVertex3d;
PFNGLVERTEX3FPROC glad_glVertex3f;
PFNGLVERTEX3IPROC glad_glVertex3i;
PFNGLCOLOR3IPROC glad_glColor3i;
PFNGLCOLOR3SPROC glad_glColor3s;
PFNGLVERTEX3SPROC glad_glVertex3s;
PFNGLTEXCOORD1IVPROC glad_glTexCoord1iv;
PFNGLVERTEX2IVPROC glad_glVertex2iv;
PFNGLCOLOR3SVPROC glad_glColor3sv;
PFNGLNORMALPOINTERPROC glad_glNormalPointer;
PFNGLVERTEX4SVPROC glad_glVertex4sv;
PFNGLPASSTHROUGHPROC glad_glPassThrough;
PFNGLFOGIPROC glad_glFogi;
PFNGLBEGINPROC glad_glBegin;
PFNGLEVALCOORD2DVPROC glad_glEvalCoord2dv;
PFNGLCOLOR3UBVPROC glad_glColor3ubv;
PFNGLVERTEXPOINTERPROC glad_glVertexPointer;
PFNGLSECONDARYCOLOR3UIVPROC glad_glSecondaryColor3uiv;
PFNGLDRAWARRAYSPROC glad_glDrawArrays;
PFNGLMULTITEXCOORD1DPROC glad_glMultiTexCoord1d;
PFNGLMULTITEXCOORD1FPROC glad_glMultiTexCoord1f;
PFNGLLIGHTFVPROC glad_glLightfv;
PFNGLCLEARPROC glad_glClear;
PFNGLMULTITEXCOORD1IPROC glad_glMultiTexCoord1i;
PFNGLMULTITEXCOORD1SPROC glad_glMultiTexCoord1s;
PFNGLISENABLEDPROC glad_glIsEnabled;
PFNGLSTENCILOPPROC glad_glStencilOp;
PFNGLTRANSLATEFPROC glad_glTranslatef;
PFNGLTRANSLATEDPROC glad_glTranslated;
PFNGLTEXCOORD3SVPROC glad_glTexCoord3sv;
PFNGLTEXIMAGE1DPROC glad_glTexImage1D;
PFNGLTEXPARAMETERIVPROC glad_glTexParameteriv;
PFNGLSECONDARYCOLOR3BVPROC glad_glSecondaryColor3bv;
PFNGLGETMATERIALFVPROC glad_glGetMaterialfv;
PFNGLGETTEXIMAGEPROC glad_glGetTexImage;
PFNGLFOGCOORDFVPROC glad_glFogCoordfv;
PFNGLPIXELMAPUIVPROC glad_glPixelMapuiv;
PFNGLINDEXSVPROC glad_glIndexsv;
PFNGLVERTEX3IVPROC glad_glVertex3iv;
PFNGLBITMAPPROC glad_glBitmap;
PFNGLMATERIALIPROC glad_glMateriali;
PFNGLTEXCOORD4FPROC glad_glTexCoord4f;
PFNGLTEXCOORD4DPROC glad_glTexCoord4d;
PFNGLTEXCOORD4IPROC glad_glTexCoord4i;
PFNGLMATERIALFPROC glad_glMaterialf;
PFNGLTEXCOORD4SPROC glad_glTexCoord4s;
PFNGLMULTITEXCOORD2SPROC glad_glMultiTexCoord2s;
PFNGLVERTEX3DVPROC glad_glVertex3dv;
PFNGLPOINTPARAMETERIVPROC glad_glPointParameteriv;
PFNGLENABLEPROC glad_glEnable;
PFNGLCOLOR4FVPROC glad_glColor4fv;
PFNGLTEXCOORD1FVPROC glad_glTexCoord1fv;
PFNGLTEXCOORD2SVPROC glad_glTexCoord2sv;
PFNGLMULTITEXCOORD1DVPROC glad_glMultiTexCoord1dv;
PFNGLMULTITEXCOORD2IPROC glad_glMultiTexCoord2i;
PFNGLTEXCOORD3FVPROC glad_glTexCoord3fv;
PFNGLSECONDARYCOLOR3USVPROC glad_glSecondaryColor3usv;
PFNGLTEXGENFPROC glad_glTexGenf;
PFNGLGETPOINTERVPROC glad_glGetPointerv;
PFNGLPOLYGONOFFSETPROC glad_glPolygonOffset;
PFNGLNORMAL3FVPROC glad_glNormal3fv;
PFNGLSECONDARYCOLOR3SPROC glad_glSecondaryColor3s;
PFNGLDEPTHRANGEPROC glad_glDepthRange;
PFNGLFRUSTUMPROC glad_glFrustum;
PFNGLMULTITEXCOORD4SVPROC glad_glMultiTexCoord4sv;
PFNGLDRAWBUFFERPROC glad_glDrawBuffer;
PFNGLPUSHMATRIXPROC glad_glPushMatrix;
PFNGLRASTERPOS3FVPROC glad_glRasterPos3fv;
PFNGLORTHOPROC glad_glOrtho;
PFNGLWINDOWPOS3SVPROC glad_glWindowPos3sv;
PFNGLCLEARINDEXPROC glad_glClearIndex;
PFNGLMAP1DPROC glad_glMap1d;
PFNGLMAP1FPROC glad_glMap1f;
PFNGLFLUSHPROC glad_glFlush;
PFNGLINDEXIVPROC glad_glIndexiv;
PFNGLRASTERPOS3SVPROC glad_glRasterPos3sv;
PFNGLPIXELZOOMPROC glad_glPixelZoom;
PFNGLGETTEXLEVELPARAMETERIVPROC glad_glGetTexLevelParameteriv;
PFNGLLIGHTIPROC glad_glLighti;
PFNGLLIGHTFPROC glad_glLightf;
PFNGLCLEARSTENCILPROC glad_glClearStencil;
PFNGLMULTITEXCOORD3FVPROC glad_glMultiTexCoord3fv;
PFNGLGETPIXELMAPUIVPROC glad_glGetPixelMapuiv;
PFNGLGENTEXTURESPROC glad_glGenTextures;
PFNGLTEXCOORD4IVPROC glad_glTexCoord4iv;
PFNGLINDEXPOINTERPROC glad_glIndexPointer;
PFNGLVERTEX2FPROC glad_glVertex2f;
PFNGLVERTEX2DPROC glad_glVertex2d;
PFNGLMAPGRID2DPROC glad_glMapGrid2d;
PFNGLMAPGRID2FPROC glad_glMapGrid2f;
PFNGLVERTEX2IPROC glad_glVertex2i;
PFNGLVERTEX2SPROC glad_glVertex2s;
PFNGLNORMAL3BVPROC glad_glNormal3bv;
PFNGLSECONDARYCOLOR3SVPROC glad_glSecondaryColor3sv;
PFNGLVERTEX3SVPROC glad_glVertex3sv;
PFNGLGETPIXELMAPFVPROC glad_glGetPixelMapfv;
PFNGLTEXENVFPROC glad_glTexEnvf;
PFNGLTEXSUBIMAGE3DPROC glad_glTexSubImage3D;
PFNGLFOGCOORDDPROC glad_glFogCoordd;
PFNGLFOGCOORDFPROC glad_glFogCoordf;
PFNGLCOPYTEXIMAGE2DPROC glad_glCopyTexImage2D;
PFNGLTEXENVIPROC glad_glTexEnvi;
PFNGLMULTITEXCOORD1IVPROC glad_glMultiTexCoord1iv;
PFNGLMULTITEXCOORD2DVPROC glad_glMultiTexCoord2dv;
PFNGLMATRIXMODEPROC glad_glMatrixMode;
PFNGLFEEDBACKBUFFERPROC glad_glFeedbackBuffer;
PFNGLGETMAPIVPROC glad_glGetMapiv;
PFNGLMULTITEXCOORD2DPROC glad_glMultiTexCoord2d;
PFNGLMULTITEXCOORD2FPROC glad_glMultiTexCoord2f;
PFNGLPRIORITIZETEXTURESPROC glad_glPrioritizeTextures;
PFNGLCALLLISTPROC glad_glCallList;
PFNGLSECONDARYCOLOR3UBVPROC glad_glSecondaryColor3ubv;
PFNGLGETDOUBLEVPROC glad_glGetDoublev;
PFNGLMULTITEXCOORD3IVPROC glad_glMultiTexCoord3iv;
PFNGLLIGHTMODELFPROC glad_glLightModelf;
PFNGLVERTEX2SVPROC glad_glVertex2sv;
PFNGLLIGHTMODELIPROC glad_glLightModeli;
PFNGLWINDOWPOS3IVPROC glad_glWindowPos3iv;
PFNGLPIXELSTOREIPROC glad_glPixelStorei;
PFNGLCALLLISTSPROC glad_glCallLists;
PFNGLSECONDARYCOLOR3DPROC glad_glSecondaryColor3d;
PFNGLTEXCOORD3IPROC glad_glTexCoord3i;
PFNGLMULTITEXCOORD4FVPROC glad_glMultiTexCoord4fv;
PFNGLRASTERPOS3IPROC glad_glRasterPos3i;
PFNGLSECONDARYCOLOR3BPROC glad_glSecondaryColor3b;
PFNGLRASTERPOS3DPROC glad_glRasterPos3d;
PFNGLRASTERPOS3FPROC glad_glRasterPos3f;
PFNGLCOMPRESSEDTEXIMAGE3DPROC glad_glCompressedTexImage3D;
PFNGLTEXCOORD3FPROC glad_glTexCoord3f;
PFNGLTEXCOORD3DPROC glad_glTexCoord3d;
PFNGLMULTIDRAWELEMENTSPROC glad_glMultiDrawElements;
PFNGLTEXCOORD3SPROC glad_glTexCoord3s;
PFNGLRASTERPOS3SPROC glad_glRasterPos3s;
PFNGLPOLYGONMODEPROC glad_glPolygonMode;
PFNGLARETEXTURESRESIDENTPROC glad_glAreTexturesResident;
PFNGLISLISTPROC glad_glIsList;
PFNGLRASTERPOS2SVPROC glad_glRasterPos2sv;
PFNGLRASTERPOS4SVPROC glad_glRasterPos4sv;
PFNGLCOLOR4SPROC glad_glColor4s;
PFNGLLINESTIPPLEPROC glad_glLineStipple;
PFNGLMULTITEXCOORD1SVPROC glad_glMultiTexCoord1sv;
PFNGLMULTITEXCOORD2IVPROC glad_glMultiTexCoord2iv;
PFNGLCOLOR4BPROC glad_glColor4b;
PFNGLSECONDARYCOLOR3FPROC glad_glSecondaryColor3f;
PFNGLCOLOR4FPROC glad_glColor4f;
PFNGLCOLOR4DPROC glad_glColor4d;
PFNGLCOLOR4IPROC glad_glColor4i;
PFNGLRASTERPOS3IVPROC glad_glRasterPos3iv;
PFNGLVERTEX2DVPROC glad_glVertex2dv;
PFNGLTEXCOORD4SVPROC glad_glTexCoord4sv;
PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glad_glCompressedTexSubImage1D;
PFNGLFINISHPROC glad_glFinish;
PFNGLGETBOOLEANVPROC glad_glGetBooleanv;
PFNGLDRAWELEMENTSPROC glad_glDrawElements;
PFNGLRASTERPOS2SPROC glad_glRasterPos2s;
PFNGLGETMAPDVPROC glad_glGetMapdv;
PFNGLMATERIALFVPROC glad_glMaterialfv;
PFNGLVIEWPORTPROC glad_glViewport;
PFNGLINDEXDVPROC glad_glIndexdv;
PFNGLCOPYTEXSUBIMAGE3DPROC glad_glCopyTexSubImage3D;
PFNGLTEXCOORD3IVPROC glad_glTexCoord3iv;
PFNGLCLEARDEPTHPROC glad_glClearDepth;
PFNGLTEXPARAMETERFPROC glad_glTexParameterf;
PFNGLTEXPARAMETERIPROC glad_glTexParameteri;
PFNGLPOPNAMEPROC glad_glPopName;
PFNGLPIXELSTOREFPROC glad_glPixelStoref;
PFNGLRASTERPOS4FVPROC glad_glRasterPos4fv;
PFNGLEVALCOORD1DVPROC glad_glEvalCoord1dv;
PFNGLRECTIPROC glad_glRecti;
PFNGLCOLOR4UBPROC glad_glColor4ub;
PFNGLMULTTRANSPOSEMATRIXFPROC glad_glMultTransposeMatrixf;
PFNGLRECTFPROC glad_glRectf;
PFNGLRECTDPROC glad_glRectd;
PFNGLNORMAL3SVPROC glad_glNormal3sv;
PFNGLNEWLISTPROC glad_glNewList;
PFNGLCOLOR4USPROC glad_glColor4us;
PFNGLHINTPROC glad_glHint;
PFNGLRECTSPROC glad_glRects;
PFNGLTEXCOORD2DVPROC glad_glTexCoord2dv;
PFNGLRASTERPOS4IVPROC glad_glRasterPos4iv;
PFNGLGETSTRINGPROC glad_glGetString;
PFNGLEDGEFLAGVPROC glad_glEdgeFlagv;
PFNGLSCALEFPROC glad_glScalef;
PFNGLSCALEDPROC glad_glScaled;
PFNGLEDGEFLAGPOINTERPROC glad_glEdgeFlagPointer;
PFNGLCOPYPIXELSPROC glad_glCopyPixels;
PFNGLPOPATTRIBPROC glad_glPopAttrib;
PFNGLDELETETEXTURESPROC glad_glDeleteTextures;
PFNGLINITNAMESPROC glad_glInitNames;
PFNGLCOLOR3DVPROC glad_glColor3dv;
PFNGLGETTEXPARAMETERIVPROC glad_glGetTexParameteriv;
PFNGLCOLORMATERIALPROC glad_glColorMaterial;
PFNGLSAMPLECOVERAGEPROC glad_glSampleCoverage;
PFNGLRENDERMODEPROC glad_glRenderMode;
PFNGLGETCOMPRESSEDTEXIMAGEPROC glad_glGetCompressedTexImage;
PFNGLWINDOWPOS2DVPROC glad_glWindowPos2dv;
PFNGLPIXELTRANSFERIPROC glad_glPixelTransferi;
PFNGLTEXSUBIMAGE2DPROC glad_glTexSubImage2D;
PFNGLDISABLEPROC glad_glDisable;
PFNGLLOGICOPPROC glad_glLogicOp;
PFNGLEVALPOINT2PROC glad_glEvalPoint2;
PFNGLPIXELTRANSFERFPROC glad_glPixelTransferf;
PFNGLSECONDARYCOLOR3IPROC glad_glSecondaryColor3i;
PFNGLCOLOR3FPROC glad_glColor3f;
PFNGLGETTEXENVFVPROC glad_glGetTexEnvfv;
PFNGLRECTFVPROC glad_glRectfv;
PFNGLCULLFACEPROC glad_glCullFace;
PFNGLGETLIGHTFVPROC glad_glGetLightfv;
PFNGLCOLOR3DPROC glad_glColor3d;
PFNGLTEXGENDPROC glad_glTexGend;
PFNGLTEXGENIPROC glad_glTexGeni;
PFNGLMULTITEXCOORD3SPROC glad_glMultiTexCoord3s;
PFNGLMULTITEXCOORD3IPROC glad_glMultiTexCoord3i;
PFNGLMULTITEXCOORD3FPROC glad_glMultiTexCoord3f;
PFNGLMULTITEXCOORD3DPROC glad_glMultiTexCoord3d;
PFNGLFOGCOORDDVPROC glad_glFogCoorddv;
PFNGLGETTEXGENFVPROC glad_glGetTexGenfv;
PFNGLFOGCOORDPOINTERPROC glad_glFogCoordPointer;
PFNGLTEXGENIVPROC glad_glTexGeniv;
PFNGLRASTERPOS2DVPROC glad_glRasterPos2dv;
PFNGLSECONDARYCOLOR3DVPROC glad_glSecondaryColor3dv;
PFNGLCLIENTACTIVETEXTUREPROC glad_glClientActiveTexture;
PFNGLSECONDARYCOLOR3USPROC glad_glSecondaryColor3us;
PFNGLTEXENVFVPROC glad_glTexEnvfv;
PFNGLREADBUFFERPROC glad_glReadBuffer;
PFNGLWINDOWPOS3FVPROC glad_glWindowPos3fv;
PFNGLLIGHTMODELFVPROC glad_glLightModelfv;
PFNGLDELETELISTSPROC glad_glDeleteLists;
PFNGLGETCLIPPLANEPROC glad_glGetClipPlane;
PFNGLVERTEX4DVPROC glad_glVertex4dv;
PFNGLTEXCOORD2DPROC glad_glTexCoord2d;
PFNGLPOPMATRIXPROC glad_glPopMatrix;
PFNGLTEXCOORD2FPROC glad_glTexCoord2f;
PFNGLCOLOR4IVPROC glad_glColor4iv;
PFNGLINDEXUBVPROC glad_glIndexubv;
PFNGLTEXCOORD2IPROC glad_glTexCoord2i;
PFNGLRASTERPOS4DPROC glad_glRasterPos4d;
PFNGLRASTERPOS4FPROC glad_glRasterPos4f;
PFNGLTEXCOORD2SPROC glad_glTexCoord2s;
PFNGLVERTEX3FVPROC glad_glVertex3fv;
PFNGLTEXCOORD4DVPROC glad_glTexCoord4dv;
PFNGLMATERIALIVPROC glad_glMaterialiv;
PFNGLVERTEX4SPROC glad_glVertex4s;
PFNGLNORMAL3DVPROC glad_glNormal3dv;
PFNGLACTIVETEXTUREPROC glad_glActiveTexture;
PFNGLROTATEDPROC glad_glRotated;
PFNGLROTATEFPROC glad_glRotatef;
PFNGLVERTEX4IPROC glad_glVertex4i;
PFNGLREADPIXELSPROC glad_glReadPixels;
PFNGLLOADNAMEPROC glad_glLoadName;
PFNGLSHADEMODELPROC glad_glShadeModel;
PFNGLMAPGRID1DPROC glad_glMapGrid1d;
PFNGLMAPGRID1FPROC glad_glMapGrid1f;
PFNGLDISABLECLIENTSTATEPROC glad_glDisableClientState;
PFNGLMULTITEXCOORD3SVPROC glad_glMultiTexCoord3sv;
PFNGLSECONDARYCOLORPOINTERPROC glad_glSecondaryColorPointer;
PFNGLALPHAFUNCPROC glad_glAlphaFunc;
PFNGLMULTITEXCOORD4IVPROC glad_glMultiTexCoord4iv;
PFNGLSTENCILFUNCPROC glad_glStencilFunc;
PFNGLMULTITEXCOORD1FVPROC glad_glMultiTexCoord1fv;
PFNGLCOLOR4UIVPROC glad_glColor4uiv;
PFNGLRECTIVPROC glad_glRectiv;
PFNGLRASTERPOS3DVPROC glad_glRasterPos3dv;
PFNGLEVALMESH2PROC glad_glEvalMesh2;
PFNGLEVALMESH1PROC glad_glEvalMesh1;
PFNGLTEXCOORDPOINTERPROC glad_glTexCoordPointer;
PFNGLEVALCOORD2FVPROC glad_glEvalCoord2fv;
PFNGLCOLOR4UBVPROC glad_glColor4ubv;
PFNGLLOADTRANSPOSEMATRIXDPROC glad_glLoadTransposeMatrixd;
PFNGLLOADTRANSPOSEMATRIXFPROC glad_glLoadTransposeMatrixf;
PFNGLRASTERPOS2IVPROC glad_glRasterPos2iv;
PFNGLTEXENVIVPROC glad_glTexEnviv;
PFNGLSELECTBUFFERPROC glad_glSelectBuffer;
PFNGLPUSHATTRIBPROC glad_glPushAttrib;
PFNGLBLENDFUNCPROC glad_glBlendFunc;
PFNGLTEXIMAGE3DPROC glad_glTexImage3D;
PFNGLLIGHTIVPROC glad_glLightiv;
PFNGLTEXGENFVPROC glad_glTexGenfv;
PFNGLENDPROC glad_glEnd;
PFNGLSCISSORPROC glad_glScissor;
PFNGLCLIPPLANEPROC glad_glClipPlane;
PFNGLPUSHNAMEPROC glad_glPushName;
PFNGLTEXGENDVPROC glad_glTexGendv;
PFNGLINDEXUBPROC glad_glIndexub;
PFNGLSECONDARYCOLOR3IVPROC glad_glSecondaryColor3iv;
PFNGLRASTERPOS4IPROC glad_glRasterPos4i;
PFNGLMULTTRANSPOSEMATRIXDPROC glad_glMultTransposeMatrixd;
PFNGLCLEARCOLORPROC glad_glClearColor;
PFNGLNORMAL3SPROC glad_glNormal3s;
PFNGLPOINTPARAMETERIPROC glad_glPointParameteri;
PFNGLBLENDCOLORPROC glad_glBlendColor;
PFNGLWINDOWPOS3DPROC glad_glWindowPos3d;
PFNGLCOLOR4DVPROC glad_glColor4dv;
PFNGLPOINTPARAMETERFVPROC glad_glPointParameterfv;
PFNGLSECONDARYCOLOR3UBPROC glad_glSecondaryColor3ub;
PFNGLSECONDARYCOLOR3UIPROC glad_glSecondaryColor3ui;
PFNGLTEXCOORD3DVPROC glad_glTexCoord3dv;
PFNGLNORMAL3IVPROC glad_glNormal3iv;
PFNGLWINDOWPOS3SPROC glad_glWindowPos3s;
PFNGLPOINTPARAMETERFPROC glad_glPointParameterf;
PFNGLWINDOWPOS3IPROC glad_glWindowPos3i;
PFNGLMULTITEXCOORD4SPROC glad_glMultiTexCoord4s;
PFNGLWINDOWPOS3FPROC glad_glWindowPos3f;
PFNGLCOLOR3USPROC glad_glColor3us;
PFNGLCOLOR3UIVPROC glad_glColor3uiv;
PFNGLGETLIGHTIVPROC glad_glGetLightiv;
PFNGLDEPTHFUNCPROC glad_glDepthFunc;
PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glad_glCompressedTexSubImage2D;
PFNGLLISTBASEPROC glad_glListBase;
PFNGLMULTITEXCOORD4FPROC glad_glMultiTexCoord4f;
PFNGLCOLOR3UBPROC glad_glColor3ub;
PFNGLMULTITEXCOORD4DPROC glad_glMultiTexCoord4d;
PFNGLGETTEXPARAMETERFVPROC glad_glGetTexParameterfv;
PFNGLCOLOR3UIPROC glad_glColor3ui;
PFNGLMULTITEXCOORD4IPROC glad_glMultiTexCoord4i;
PFNGLGETPOLYGONSTIPPLEPROC glad_glGetPolygonStipple;
PFNGLMULTITEXCOORD4DVPROC glad_glMultiTexCoord4dv;
PFNGLCOLORMASKPROC glad_glColorMask;
PFNGLBLENDEQUATIONPROC glad_glBlendEquation;
PFNGLRASTERPOS4SPROC glad_glRasterPos4s;
PFNGLMULTITEXCOORD3DVPROC glad_glMultiTexCoord3dv;
PFNGLCOLOR4SVPROC glad_glColor4sv;
PFNGLPOPCLIENTATTRIBPROC glad_glPopClientAttrib;
PFNGLFOGFPROC glad_glFogf;
PFNGLCOLOR3IVPROC glad_glColor3iv;
PFNGLCOMPRESSEDTEXIMAGE1DPROC glad_glCompressedTexImage1D;
PFNGLCOPYTEXSUBIMAGE1DPROC glad_glCopyTexSubImage1D;
PFNGLTEXCOORD1IPROC glad_glTexCoord1i;
PFNGLTEXCOORD1DPROC glad_glTexCoord1d;
PFNGLTEXCOORD1FPROC glad_glTexCoord1f;
PFNGLENABLECLIENTSTATEPROC glad_glEnableClientState;
PFNGLMULTITEXCOORD2SVPROC glad_glMultiTexCoord2sv;
PFNGLDRAWRANGEELEMENTSPROC glad_glDrawRangeElements;
PFNGLTEXCOORD1SPROC glad_glTexCoord1s;
PFNGLGENLISTSPROC glad_glGenLists;
PFNGLCOLOR3BVPROC glad_glColor3bv;
PFNGLGETTEXGENDVPROC glad_glGetTexGendv;
PFNGLMULTIDRAWARRAYSPROC glad_glMultiDrawArrays;
PFNGLENDLISTPROC glad_glEndList;
PFNGLCOLOR3USVPROC glad_glColor3usv;
PFNGLWINDOWPOS2FVPROC glad_glWindowPos2fv;
PFNGLINDEXMASKPROC glad_glIndexMask;
PFNGLPUSHCLIENTATTRIBPROC glad_glPushClientAttrib;
PFNGLCLEARACCUMPROC glad_glClearAccum;
PFNGLMAP2DPROC glad_glMap2d;
PFNGLMAP2FPROC glad_glMap2f;
PFNGLVERTEX4DPROC glad_glVertex4d;
PFNGLTEXCOORD1SVPROC glad_glTexCoord1sv;
PFNGLEVALPOINT1PROC glad_glEvalPoint1;
PFNGLTEXCOORD1DVPROC glad_glTexCoord1dv;
PFNGLGETERRORPROC glad_glGetError;
PFNGLGETTEXENVIVPROC glad_glGetTexEnviv;
PFNGLGETFLOATVPROC glad_glGetFloatv;
PFNGLTEXSUBIMAGE1DPROC glad_glTexSubImage1D;
PFNGLMULTITEXCOORD2FVPROC glad_glMultiTexCoord2fv;
PFNGLEVALCOORD1DPROC glad_glEvalCoord1d;
PFNGLGETTEXLEVELPARAMETERFVPROC glad_glGetTexLevelParameterfv;
PFNGLEVALCOORD1FPROC glad_glEvalCoord1f;
PFNGLPIXELMAPFVPROC glad_glPixelMapfv;
PFNGLGETPIXELMAPUSVPROC glad_glGetPixelMapusv;
PFNGLGETINTEGERVPROC glad_glGetIntegerv;
PFNGLACCUMPROC glad_glAccum;
PFNGLRASTERPOS4DVPROC glad_glRasterPos4dv;
PFNGLTEXCOORD2IVPROC glad_glTexCoord2iv;
PFNGLWINDOWPOS3DVPROC glad_glWindowPos3dv;
PFNGLTEXIMAGE2DPROC glad_glTexImage2D;
PFNGLSTENCILMASKPROC glad_glStencilMask;
PFNGLDRAWPIXELSPROC glad_glDrawPixels;
PFNGLMULTMATRIXDPROC glad_glMultMatrixd;
PFNGLMULTMATRIXFPROC glad_glMultMatrixf;
PFNGLISTEXTUREPROC glad_glIsTexture;
PFNGLGETMATERIALIVPROC glad_glGetMaterialiv;
PFNGLLOADMATRIXFPROC glad_glLoadMatrixf;
PFNGLLOADMATRIXDPROC glad_glLoadMatrixd;
PFNGLTEXPARAMETERFVPROC glad_glTexParameterfv;
PFNGLVERTEX4FPROC glad_glVertex4f;
PFNGLRECTSVPROC glad_glRectsv;
PFNGLCOLOR4USVPROC glad_glColor4usv;
PFNGLPOLYGONSTIPPLEPROC glad_glPolygonStipple;
PFNGLINTERLEAVEDARRAYSPROC glad_glInterleavedArrays;
PFNGLNORMAL3IPROC glad_glNormal3i;
PFNGLNORMAL3FPROC glad_glNormal3f;
PFNGLNORMAL3DPROC glad_glNormal3d;
PFNGLNORMAL3BPROC glad_glNormal3b;
PFNGLPIXELMAPUSVPROC glad_glPixelMapusv;
PFNGLGETTEXGENIVPROC glad_glGetTexGeniv;
PFNGLARRAYELEMENTPROC glad_glArrayElement;
PFNGLDEPTHMASKPROC glad_glDepthMask;
PFNGLCOLOR3FVPROC glad_glColor3fv;
PFNGLCOLORPOINTERPROC glad_glColorPointer;
PFNGLFRONTFACEPROC glad_glFrontFace;
int GLAD_GL_EXT_texture_env_combine;
int GLAD_GL_ARB_multitexture;
int GLAD_GL_EXT_fog_coord;
int GLAD_GL_ARB_texture_env_combine;
int GLAD_GL_ARB_texture_non_power_of_two;
int GLAD_GL_ARB_vertex_buffer_object;
int GLAD_GL_EXT_compiled_vertex_array;
int GLAD_GL_EXT_texture_filter_anisotropic;
PFNGLACTIVETEXTUREARBPROC glad_glActiveTextureARB;
PFNGLCLIENTACTIVETEXTUREARBPROC glad_glClientActiveTextureARB;
PFNGLMULTITEXCOORD1DARBPROC glad_glMultiTexCoord1dARB;
PFNGLMULTITEXCOORD1DVARBPROC glad_glMultiTexCoord1dvARB;
PFNGLMULTITEXCOORD1FARBPROC glad_glMultiTexCoord1fARB;
PFNGLMULTITEXCOORD1FVARBPROC glad_glMultiTexCoord1fvARB;
PFNGLMULTITEXCOORD1IARBPROC glad_glMultiTexCoord1iARB;
PFNGLMULTITEXCOORD1IVARBPROC glad_glMultiTexCoord1ivARB;
PFNGLMULTITEXCOORD1SARBPROC glad_glMultiTexCoord1sARB;
PFNGLMULTITEXCOORD1SVARBPROC glad_glMultiTexCoord1svARB;
PFNGLMULTITEXCOORD2DARBPROC glad_glMultiTexCoord2dARB;
PFNGLMULTITEXCOORD2DVARBPROC glad_glMultiTexCoord2dvARB;
PFNGLMULTITEXCOORD2FARBPROC glad_glMultiTexCoord2fARB;
PFNGLMULTITEXCOORD2FVARBPROC glad_glMultiTexCoord2fvARB;
PFNGLMULTITEXCOORD2IARBPROC glad_glMultiTexCoord2iARB;
PFNGLMULTITEXCOORD2IVARBPROC glad_glMultiTexCoord2ivARB;
PFNGLMULTITEXCOORD2SARBPROC glad_glMultiTexCoord2sARB;
PFNGLMULTITEXCOORD2SVARBPROC glad_glMultiTexCoord2svARB;
PFNGLMULTITEXCOORD3DARBPROC glad_glMultiTexCoord3dARB;
PFNGLMULTITEXCOORD3DVARBPROC glad_glMultiTexCoord3dvARB;
PFNGLMULTITEXCOORD3FARBPROC glad_glMultiTexCoord3fARB;
PFNGLMULTITEXCOORD3FVARBPROC glad_glMultiTexCoord3fvARB;
PFNGLMULTITEXCOORD3IARBPROC glad_glMultiTexCoord3iARB;
PFNGLMULTITEXCOORD3IVARBPROC glad_glMultiTexCoord3ivARB;
PFNGLMULTITEXCOORD3SARBPROC glad_glMultiTexCoord3sARB;
PFNGLMULTITEXCOORD3SVARBPROC glad_glMultiTexCoord3svARB;
PFNGLMULTITEXCOORD4DARBPROC glad_glMultiTexCoord4dARB;
PFNGLMULTITEXCOORD4DVARBPROC glad_glMultiTexCoord4dvARB;
PFNGLMULTITEXCOORD4FARBPROC glad_glMultiTexCoord4fARB;
PFNGLMULTITEXCOORD4FVARBPROC glad_glMultiTexCoord4fvARB;
PFNGLMULTITEXCOORD4IARBPROC glad_glMultiTexCoord4iARB;
PFNGLMULTITEXCOORD4IVARBPROC glad_glMultiTexCoord4ivARB;
PFNGLMULTITEXCOORD4SARBPROC glad_glMultiTexCoord4sARB;
PFNGLMULTITEXCOORD4SVARBPROC glad_glMultiTexCoord4svARB;
PFNGLBINDBUFFERARBPROC glad_glBindBufferARB;
PFNGLDELETEBUFFERSARBPROC glad_glDeleteBuffersARB;
PFNGLGENBUFFERSARBPROC glad_glGenBuffersARB;
PFNGLISBUFFERARBPROC glad_glIsBufferARB;
PFNGLBUFFERDATAARBPROC glad_glBufferDataARB;
PFNGLBUFFERSUBDATAARBPROC glad_glBufferSubDataARB;
PFNGLGETBUFFERSUBDATAARBPROC glad_glGetBufferSubDataARB;
PFNGLMAPBUFFERARBPROC glad_glMapBufferARB;
PFNGLUNMAPBUFFERARBPROC glad_glUnmapBufferARB;
PFNGLGETBUFFERPARAMETERIVARBPROC glad_glGetBufferParameterivARB;
PFNGLGETBUFFERPOINTERVARBPROC glad_glGetBufferPointervARB;
PFNGLLOCKARRAYSEXTPROC glad_glLockArraysEXT;
PFNGLUNLOCKARRAYSEXTPROC glad_glUnlockArraysEXT;
PFNGLFOGCOORDFEXTPROC glad_glFogCoordfEXT;
PFNGLFOGCOORDFVEXTPROC glad_glFogCoordfvEXT;
PFNGLFOGCOORDDEXTPROC glad_glFogCoorddEXT;
PFNGLFOGCOORDDVEXTPROC glad_glFogCoorddvEXT;
PFNGLFOGCOORDPOINTEREXTPROC glad_glFogCoordPointerEXT;
static void load_GL_VERSION_1_0(GLADloadproc load) {
if(!GLAD_GL_VERSION_1_0) return;
glad_glCullFace = (PFNGLCULLFACEPROC)load("glCullFace");
glad_glFrontFace = (PFNGLFRONTFACEPROC)load("glFrontFace");
glad_glHint = (PFNGLHINTPROC)load("glHint");
glad_glLineWidth = (PFNGLLINEWIDTHPROC)load("glLineWidth");
glad_glPointSize = (PFNGLPOINTSIZEPROC)load("glPointSize");
glad_glPolygonMode = (PFNGLPOLYGONMODEPROC)load("glPolygonMode");
glad_glScissor = (PFNGLSCISSORPROC)load("glScissor");
glad_glTexParameterf = (PFNGLTEXPARAMETERFPROC)load("glTexParameterf");
glad_glTexParameterfv = (PFNGLTEXPARAMETERFVPROC)load("glTexParameterfv");
glad_glTexParameteri = (PFNGLTEXPARAMETERIPROC)load("glTexParameteri");
glad_glTexParameteriv = (PFNGLTEXPARAMETERIVPROC)load("glTexParameteriv");
glad_glTexImage1D = (PFNGLTEXIMAGE1DPROC)load("glTexImage1D");
glad_glTexImage2D = (PFNGLTEXIMAGE2DPROC)load("glTexImage2D");
glad_glDrawBuffer = (PFNGLDRAWBUFFERPROC)load("glDrawBuffer");
glad_glClear = (PFNGLCLEARPROC)load("glClear");
glad_glClearColor = (PFNGLCLEARCOLORPROC)load("glClearColor");
glad_glClearStencil = (PFNGLCLEARSTENCILPROC)load("glClearStencil");
glad_glClearDepth = (PFNGLCLEARDEPTHPROC)load("glClearDepth");
glad_glStencilMask = (PFNGLSTENCILMASKPROC)load("glStencilMask");
glad_glColorMask = (PFNGLCOLORMASKPROC)load("glColorMask");
glad_glDepthMask = (PFNGLDEPTHMASKPROC)load("glDepthMask");
glad_glDisable = (PFNGLDISABLEPROC)load("glDisable");
glad_glEnable = (PFNGLENABLEPROC)load("glEnable");
glad_glFinish = (PFNGLFINISHPROC)load("glFinish");
glad_glFlush = (PFNGLFLUSHPROC)load("glFlush");
glad_glBlendFunc = (PFNGLBLENDFUNCPROC)load("glBlendFunc");
glad_glLogicOp = (PFNGLLOGICOPPROC)load("glLogicOp");
glad_glStencilFunc = (PFNGLSTENCILFUNCPROC)load("glStencilFunc");
glad_glStencilOp = (PFNGLSTENCILOPPROC)load("glStencilOp");
glad_glDepthFunc = (PFNGLDEPTHFUNCPROC)load("glDepthFunc");
glad_glPixelStoref = (PFNGLPIXELSTOREFPROC)load("glPixelStoref");
glad_glPixelStorei = (PFNGLPIXELSTOREIPROC)load("glPixelStorei");
glad_glReadBuffer = (PFNGLREADBUFFERPROC)load("glReadBuffer");
glad_glReadPixels = (PFNGLREADPIXELSPROC)load("glReadPixels");
glad_glGetBooleanv = (PFNGLGETBOOLEANVPROC)load("glGetBooleanv");
glad_glGetDoublev = (PFNGLGETDOUBLEVPROC)load("glGetDoublev");
glad_glGetError = (PFNGLGETERRORPROC)load("glGetError");
glad_glGetFloatv = (PFNGLGETFLOATVPROC)load("glGetFloatv");
glad_glGetIntegerv = (PFNGLGETINTEGERVPROC)load("glGetIntegerv");
glad_glGetString = (PFNGLGETSTRINGPROC)load("glGetString");
glad_glGetTexImage = (PFNGLGETTEXIMAGEPROC)load("glGetTexImage");
glad_glGetTexParameterfv = (PFNGLGETTEXPARAMETERFVPROC)load("glGetTexParameterfv");
glad_glGetTexParameteriv = (PFNGLGETTEXPARAMETERIVPROC)load("glGetTexParameteriv");
glad_glGetTexLevelParameterfv = (PFNGLGETTEXLEVELPARAMETERFVPROC)load("glGetTexLevelParameterfv");
glad_glGetTexLevelParameteriv = (PFNGLGETTEXLEVELPARAMETERIVPROC)load("glGetTexLevelParameteriv");
glad_glIsEnabled = (PFNGLISENABLEDPROC)load("glIsEnabled");
glad_glDepthRange = (PFNGLDEPTHRANGEPROC)load("glDepthRange");
glad_glViewport = (PFNGLVIEWPORTPROC)load("glViewport");
glad_glNewList = (PFNGLNEWLISTPROC)load("glNewList");
glad_glEndList = (PFNGLENDLISTPROC)load("glEndList");
glad_glCallList = (PFNGLCALLLISTPROC)load("glCallList");
glad_glCallLists = (PFNGLCALLLISTSPROC)load("glCallLists");
glad_glDeleteLists = (PFNGLDELETELISTSPROC)load("glDeleteLists");
glad_glGenLists = (PFNGLGENLISTSPROC)load("glGenLists");
glad_glListBase = (PFNGLLISTBASEPROC)load("glListBase");
glad_glBegin = (PFNGLBEGINPROC)load("glBegin");
glad_glBitmap = (PFNGLBITMAPPROC)load("glBitmap");
glad_glColor3b = (PFNGLCOLOR3BPROC)load("glColor3b");
glad_glColor3bv = (PFNGLCOLOR3BVPROC)load("glColor3bv");
glad_glColor3d = (PFNGLCOLOR3DPROC)load("glColor3d");
glad_glColor3dv = (PFNGLCOLOR3DVPROC)load("glColor3dv");
glad_glColor3f = (PFNGLCOLOR3FPROC)load("glColor3f");
glad_glColor3fv = (PFNGLCOLOR3FVPROC)load("glColor3fv");
glad_glColor3i = (PFNGLCOLOR3IPROC)load("glColor3i");
glad_glColor3iv = (PFNGLCOLOR3IVPROC)load("glColor3iv");
glad_glColor3s = (PFNGLCOLOR3SPROC)load("glColor3s");
glad_glColor3sv = (PFNGLCOLOR3SVPROC)load("glColor3sv");
glad_glColor3ub = (PFNGLCOLOR3UBPROC)load("glColor3ub");
glad_glColor3ubv = (PFNGLCOLOR3UBVPROC)load("glColor3ubv");
glad_glColor3ui = (PFNGLCOLOR3UIPROC)load("glColor3ui");
glad_glColor3uiv = (PFNGLCOLOR3UIVPROC)load("glColor3uiv");
glad_glColor3us = (PFNGLCOLOR3USPROC)load("glColor3us");
glad_glColor3usv = (PFNGLCOLOR3USVPROC)load("glColor3usv");
glad_glColor4b = (PFNGLCOLOR4BPROC)load("glColor4b");
glad_glColor4bv = (PFNGLCOLOR4BVPROC)load("glColor4bv");
glad_glColor4d = (PFNGLCOLOR4DPROC)load("glColor4d");
glad_glColor4dv = (PFNGLCOLOR4DVPROC)load("glColor4dv");
glad_glColor4f = (PFNGLCOLOR4FPROC)load("glColor4f");
glad_glColor4fv = (PFNGLCOLOR4FVPROC)load("glColor4fv");
glad_glColor4i = (PFNGLCOLOR4IPROC)load("glColor4i");
glad_glColor4iv = (PFNGLCOLOR4IVPROC)load("glColor4iv");
glad_glColor4s = (PFNGLCOLOR4SPROC)load("glColor4s");
glad_glColor4sv = (PFNGLCOLOR4SVPROC)load("glColor4sv");
glad_glColor4ub = (PFNGLCOLOR4UBPROC)load("glColor4ub");
glad_glColor4ubv = (PFNGLCOLOR4UBVPROC)load("glColor4ubv");
glad_glColor4ui = (PFNGLCOLOR4UIPROC)load("glColor4ui");
glad_glColor4uiv = (PFNGLCOLOR4UIVPROC)load("glColor4uiv");
glad_glColor4us = (PFNGLCOLOR4USPROC)load("glColor4us");
glad_glColor4usv = (PFNGLCOLOR4USVPROC)load("glColor4usv");
glad_glEdgeFlag = (PFNGLEDGEFLAGPROC)load("glEdgeFlag");
glad_glEdgeFlagv = (PFNGLEDGEFLAGVPROC)load("glEdgeFlagv");
glad_glEnd = (PFNGLENDPROC)load("glEnd");
glad_glIndexd = (PFNGLINDEXDPROC)load("glIndexd");
glad_glIndexdv = (PFNGLINDEXDVPROC)load("glIndexdv");
glad_glIndexf = (PFNGLINDEXFPROC)load("glIndexf");
glad_glIndexfv = (PFNGLINDEXFVPROC)load("glIndexfv");
glad_glIndexi = (PFNGLINDEXIPROC)load("glIndexi");
glad_glIndexiv = (PFNGLINDEXIVPROC)load("glIndexiv");
glad_glIndexs = (PFNGLINDEXSPROC)load("glIndexs");
glad_glIndexsv = (PFNGLINDEXSVPROC)load("glIndexsv");
glad_glNormal3b = (PFNGLNORMAL3BPROC)load("glNormal3b");
glad_glNormal3bv = (PFNGLNORMAL3BVPROC)load("glNormal3bv");
glad_glNormal3d = (PFNGLNORMAL3DPROC)load("glNormal3d");
glad_glNormal3dv = (PFNGLNORMAL3DVPROC)load("glNormal3dv");
glad_glNormal3f = (PFNGLNORMAL3FPROC)load("glNormal3f");
glad_glNormal3fv = (PFNGLNORMAL3FVPROC)load("glNormal3fv");
glad_glNormal3i = (PFNGLNORMAL3IPROC)load("glNormal3i");
glad_glNormal3iv = (PFNGLNORMAL3IVPROC)load("glNormal3iv");
glad_glNormal3s = (PFNGLNORMAL3SPROC)load("glNormal3s");
glad_glNormal3sv = (PFNGLNORMAL3SVPROC)load("glNormal3sv");
glad_glRasterPos2d = (PFNGLRASTERPOS2DPROC)load("glRasterPos2d");
glad_glRasterPos2dv = (PFNGLRASTERPOS2DVPROC)load("glRasterPos2dv");
glad_glRasterPos2f = (PFNGLRASTERPOS2FPROC)load("glRasterPos2f");
glad_glRasterPos2fv = (PFNGLRASTERPOS2FVPROC)load("glRasterPos2fv");
glad_glRasterPos2i = (PFNGLRASTERPOS2IPROC)load("glRasterPos2i");
glad_glRasterPos2iv = (PFNGLRASTERPOS2IVPROC)load("glRasterPos2iv");
glad_glRasterPos2s = (PFNGLRASTERPOS2SPROC)load("glRasterPos2s");
glad_glRasterPos2sv = (PFNGLRASTERPOS2SVPROC)load("glRasterPos2sv");
glad_glRasterPos3d = (PFNGLRASTERPOS3DPROC)load("glRasterPos3d");
glad_glRasterPos3dv = (PFNGLRASTERPOS3DVPROC)load("glRasterPos3dv");
glad_glRasterPos3f = (PFNGLRASTERPOS3FPROC)load("glRasterPos3f");
glad_glRasterPos3fv = (PFNGLRASTERPOS3FVPROC)load("glRasterPos3fv");
glad_glRasterPos3i = (PFNGLRASTERPOS3IPROC)load("glRasterPos3i");
glad_glRasterPos3iv = (PFNGLRASTERPOS3IVPROC)load("glRasterPos3iv");
glad_glRasterPos3s = (PFNGLRASTERPOS3SPROC)load("glRasterPos3s");
glad_glRasterPos3sv = (PFNGLRASTERPOS3SVPROC)load("glRasterPos3sv");
glad_glRasterPos4d = (PFNGLRASTERPOS4DPROC)load("glRasterPos4d");
glad_glRasterPos4dv = (PFNGLRASTERPOS4DVPROC)load("glRasterPos4dv");
glad_glRasterPos4f = (PFNGLRASTERPOS4FPROC)load("glRasterPos4f");
glad_glRasterPos4fv = (PFNGLRASTERPOS4FVPROC)load("glRasterPos4fv");
glad_glRasterPos4i = (PFNGLRASTERPOS4IPROC)load("glRasterPos4i");
glad_glRasterPos4iv = (PFNGLRASTERPOS4IVPROC)load("glRasterPos4iv");
glad_glRasterPos4s = (PFNGLRASTERPOS4SPROC)load("glRasterPos4s");
glad_glRasterPos4sv = (PFNGLRASTERPOS4SVPROC)load("glRasterPos4sv");
glad_glRectd = (PFNGLRECTDPROC)load("glRectd");
glad_glRectdv = (PFNGLRECTDVPROC)load("glRectdv");
glad_glRectf = (PFNGLRECTFPROC)load("glRectf");
glad_glRectfv = (PFNGLRECTFVPROC)load("glRectfv");
glad_glRecti = (PFNGLRECTIPROC)load("glRecti");
glad_glRectiv = (PFNGLRECTIVPROC)load("glRectiv");
glad_glRects = (PFNGLRECTSPROC)load("glRects");
glad_glRectsv = (PFNGLRECTSVPROC)load("glRectsv");
glad_glTexCoord1d = (PFNGLTEXCOORD1DPROC)load("glTexCoord1d");
glad_glTexCoord1dv = (PFNGLTEXCOORD1DVPROC)load("glTexCoord1dv");
glad_glTexCoord1f = (PFNGLTEXCOORD1FPROC)load("glTexCoord1f");
glad_glTexCoord1fv = (PFNGLTEXCOORD1FVPROC)load("glTexCoord1fv");
glad_glTexCoord1i = (PFNGLTEXCOORD1IPROC)load("glTexCoord1i");
glad_glTexCoord1iv = (PFNGLTEXCOORD1IVPROC)load("glTexCoord1iv");
glad_glTexCoord1s = (PFNGLTEXCOORD1SPROC)load("glTexCoord1s");
glad_glTexCoord1sv = (PFNGLTEXCOORD1SVPROC)load("glTexCoord1sv");
glad_glTexCoord2d = (PFNGLTEXCOORD2DPROC)load("glTexCoord2d");
glad_glTexCoord2dv = (PFNGLTEXCOORD2DVPROC)load("glTexCoord2dv");
glad_glTexCoord2f = (PFNGLTEXCOORD2FPROC)load("glTexCoord2f");
glad_glTexCoord2fv = (PFNGLTEXCOORD2FVPROC)load("glTexCoord2fv");
glad_glTexCoord2i = (PFNGLTEXCOORD2IPROC)load("glTexCoord2i");
glad_glTexCoord2iv = (PFNGLTEXCOORD2IVPROC)load("glTexCoord2iv");
glad_glTexCoord2s = (PFNGLTEXCOORD2SPROC)load("glTexCoord2s");
glad_glTexCoord2sv = (PFNGLTEXCOORD2SVPROC)load("glTexCoord2sv");
glad_glTexCoord3d = (PFNGLTEXCOORD3DPROC)load("glTexCoord3d");
glad_glTexCoord3dv = (PFNGLTEXCOORD3DVPROC)load("glTexCoord3dv");
glad_glTexCoord3f = (PFNGLTEXCOORD3FPROC)load("glTexCoord3f");
glad_glTexCoord3fv = (PFNGLTEXCOORD3FVPROC)load("glTexCoord3fv");
glad_glTexCoord3i = (PFNGLTEXCOORD3IPROC)load("glTexCoord3i");
glad_glTexCoord3iv = (PFNGLTEXCOORD3IVPROC)load("glTexCoord3iv");
glad_glTexCoord3s = (PFNGLTEXCOORD3SPROC)load("glTexCoord3s");
glad_glTexCoord3sv = (PFNGLTEXCOORD3SVPROC)load("glTexCoord3sv");
glad_glTexCoord4d = (PFNGLTEXCOORD4DPROC)load("glTexCoord4d");
glad_glTexCoord4dv = (PFNGLTEXCOORD4DVPROC)load("glTexCoord4dv");
glad_glTexCoord4f = (PFNGLTEXCOORD4FPROC)load("glTexCoord4f");
glad_glTexCoord4fv = (PFNGLTEXCOORD4FVPROC)load("glTexCoord4fv");
glad_glTexCoord4i = (PFNGLTEXCOORD4IPROC)load("glTexCoord4i");
glad_glTexCoord4iv = (PFNGLTEXCOORD4IVPROC)load("glTexCoord4iv");
glad_glTexCoord4s = (PFNGLTEXCOORD4SPROC)load("glTexCoord4s");
glad_glTexCoord4sv = (PFNGLTEXCOORD4SVPROC)load("glTexCoord4sv");
glad_glVertex2d = (PFNGLVERTEX2DPROC)load("glVertex2d");
glad_glVertex2dv = (PFNGLVERTEX2DVPROC)load("glVertex2dv");
glad_glVertex2f = (PFNGLVERTEX2FPROC)load("glVertex2f");
glad_glVertex2fv = (PFNGLVERTEX2FVPROC)load("glVertex2fv");
glad_glVertex2i = (PFNGLVERTEX2IPROC)load("glVertex2i");
glad_glVertex2iv = (PFNGLVERTEX2IVPROC)load("glVertex2iv");
glad_glVertex2s = (PFNGLVERTEX2SPROC)load("glVertex2s");
glad_glVertex2sv = (PFNGLVERTEX2SVPROC)load("glVertex2sv");
glad_glVertex3d = (PFNGLVERTEX3DPROC)load("glVertex3d");
glad_glVertex3dv = (PFNGLVERTEX3DVPROC)load("glVertex3dv");
glad_glVertex3f = (PFNGLVERTEX3FPROC)load("glVertex3f");
glad_glVertex3fv = (PFNGLVERTEX3FVPROC)load("glVertex3fv");
glad_glVertex3i = (PFNGLVERTEX3IPROC)load("glVertex3i");
glad_glVertex3iv = (PFNGLVERTEX3IVPROC)load("glVertex3iv");
glad_glVertex3s = (PFNGLVERTEX3SPROC)load("glVertex3s");
glad_glVertex3sv = (PFNGLVERTEX3SVPROC)load("glVertex3sv");
glad_glVertex4d = (PFNGLVERTEX4DPROC)load("glVertex4d");
glad_glVertex4dv = (PFNGLVERTEX4DVPROC)load("glVertex4dv");
glad_glVertex4f = (PFNGLVERTEX4FPROC)load("glVertex4f");
glad_glVertex4fv = (PFNGLVERTEX4FVPROC)load("glVertex4fv");
glad_glVertex4i = (PFNGLVERTEX4IPROC)load("glVertex4i");
glad_glVertex4iv = (PFNGLVERTEX4IVPROC)load("glVertex4iv");
glad_glVertex4s = (PFNGLVERTEX4SPROC)load("glVertex4s");
glad_glVertex4sv = (PFNGLVERTEX4SVPROC)load("glVertex4sv");
glad_glClipPlane = (PFNGLCLIPPLANEPROC)load("glClipPlane");
glad_glColorMaterial = (PFNGLCOLORMATERIALPROC)load("glColorMaterial");
glad_glFogf = (PFNGLFOGFPROC)load("glFogf");
glad_glFogfv = (PFNGLFOGFVPROC)load("glFogfv");
glad_glFogi = (PFNGLFOGIPROC)load("glFogi");
glad_glFogiv = (PFNGLFOGIVPROC)load("glFogiv");
glad_glLightf = (PFNGLLIGHTFPROC)load("glLightf");
glad_glLightfv = (PFNGLLIGHTFVPROC)load("glLightfv");
glad_glLighti = (PFNGLLIGHTIPROC)load("glLighti");
glad_glLightiv = (PFNGLLIGHTIVPROC)load("glLightiv");
glad_glLightModelf = (PFNGLLIGHTMODELFPROC)load("glLightModelf");
glad_glLightModelfv = (PFNGLLIGHTMODELFVPROC)load("glLightModelfv");
glad_glLightModeli = (PFNGLLIGHTMODELIPROC)load("glLightModeli");
glad_glLightModeliv = (PFNGLLIGHTMODELIVPROC)load("glLightModeliv");
glad_glLineStipple = (PFNGLLINESTIPPLEPROC)load("glLineStipple");
glad_glMaterialf = (PFNGLMATERIALFPROC)load("glMaterialf");
glad_glMaterialfv = (PFNGLMATERIALFVPROC)load("glMaterialfv");
glad_glMateriali = (PFNGLMATERIALIPROC)load("glMateriali");
glad_glMaterialiv = (PFNGLMATERIALIVPROC)load("glMaterialiv");
glad_glPolygonStipple = (PFNGLPOLYGONSTIPPLEPROC)load("glPolygonStipple");
glad_glShadeModel = (PFNGLSHADEMODELPROC)load("glShadeModel");
glad_glTexEnvf = (PFNGLTEXENVFPROC)load("glTexEnvf");
glad_glTexEnvfv = (PFNGLTEXENVFVPROC)load("glTexEnvfv");
glad_glTexEnvi = (PFNGLTEXENVIPROC)load("glTexEnvi");
glad_glTexEnviv = (PFNGLTEXENVIVPROC)load("glTexEnviv");
glad_glTexGend = (PFNGLTEXGENDPROC)load("glTexGend");
glad_glTexGendv = (PFNGLTEXGENDVPROC)load("glTexGendv");
glad_glTexGenf = (PFNGLTEXGENFPROC)load("glTexGenf");
glad_glTexGenfv = (PFNGLTEXGENFVPROC)load("glTexGenfv");
glad_glTexGeni = (PFNGLTEXGENIPROC)load("glTexGeni");
glad_glTexGeniv = (PFNGLTEXGENIVPROC)load("glTexGeniv");
glad_glFeedbackBuffer = (PFNGLFEEDBACKBUFFERPROC)load("glFeedbackBuffer");
glad_glSelectBuffer = (PFNGLSELECTBUFFERPROC)load("glSelectBuffer");
glad_glRenderMode = (PFNGLRENDERMODEPROC)load("glRenderMode");
glad_glInitNames = (PFNGLINITNAMESPROC)load("glInitNames");
glad_glLoadName = (PFNGLLOADNAMEPROC)load("glLoadName");
glad_glPassThrough = (PFNGLPASSTHROUGHPROC)load("glPassThrough");
glad_glPopName = (PFNGLPOPNAMEPROC)load("glPopName");
glad_glPushName = (PFNGLPUSHNAMEPROC)load("glPushName");
glad_glClearAccum = (PFNGLCLEARACCUMPROC)load("glClearAccum");
glad_glClearIndex = (PFNGLCLEARINDEXPROC)load("glClearIndex");
glad_glIndexMask = (PFNGLINDEXMASKPROC)load("glIndexMask");
glad_glAccum = (PFNGLACCUMPROC)load("glAccum");
glad_glPopAttrib = (PFNGLPOPATTRIBPROC)load("glPopAttrib");
glad_glPushAttrib = (PFNGLPUSHATTRIBPROC)load("glPushAttrib");
glad_glMap1d = (PFNGLMAP1DPROC)load("glMap1d");
glad_glMap1f = (PFNGLMAP1FPROC)load("glMap1f");
glad_glMap2d = (PFNGLMAP2DPROC)load("glMap2d");
glad_glMap2f = (PFNGLMAP2FPROC)load("glMap2f");
glad_glMapGrid1d = (PFNGLMAPGRID1DPROC)load("glMapGrid1d");
glad_glMapGrid1f = (PFNGLMAPGRID1FPROC)load("glMapGrid1f");
glad_glMapGrid2d = (PFNGLMAPGRID2DPROC)load("glMapGrid2d");
glad_glMapGrid2f = (PFNGLMAPGRID2FPROC)load("glMapGrid2f");
glad_glEvalCoord1d = (PFNGLEVALCOORD1DPROC)load("glEvalCoord1d");
glad_glEvalCoord1dv = (PFNGLEVALCOORD1DVPROC)load("glEvalCoord1dv");
glad_glEvalCoord1f = (PFNGLEVALCOORD1FPROC)load("glEvalCoord1f");
glad_glEvalCoord1fv = (PFNGLEVALCOORD1FVPROC)load("glEvalCoord1fv");
glad_glEvalCoord2d = (PFNGLEVALCOORD2DPROC)load("glEvalCoord2d");
glad_glEvalCoord2dv = (PFNGLEVALCOORD2DVPROC)load("glEvalCoord2dv");
glad_glEvalCoord2f = (PFNGLEVALCOORD2FPROC)load("glEvalCoord2f");
glad_glEvalCoord2fv = (PFNGLEVALCOORD2FVPROC)load("glEvalCoord2fv");
glad_glEvalMesh1 = (PFNGLEVALMESH1PROC)load("glEvalMesh1");
glad_glEvalPoint1 = (PFNGLEVALPOINT1PROC)load("glEvalPoint1");
glad_glEvalMesh2 = (PFNGLEVALMESH2PROC)load("glEvalMesh2");
glad_glEvalPoint2 = (PFNGLEVALPOINT2PROC)load("glEvalPoint2");
glad_glAlphaFunc = (PFNGLALPHAFUNCPROC)load("glAlphaFunc");
glad_glPixelZoom = (PFNGLPIXELZOOMPROC)load("glPixelZoom");
glad_glPixelTransferf = (PFNGLPIXELTRANSFERFPROC)load("glPixelTransferf");
glad_glPixelTransferi = (PFNGLPIXELTRANSFERIPROC)load("glPixelTransferi");
glad_glPixelMapfv = (PFNGLPIXELMAPFVPROC)load("glPixelMapfv");
glad_glPixelMapuiv = (PFNGLPIXELMAPUIVPROC)load("glPixelMapuiv");
glad_glPixelMapusv = (PFNGLPIXELMAPUSVPROC)load("glPixelMapusv");
glad_glCopyPixels = (PFNGLCOPYPIXELSPROC)load("glCopyPixels");
glad_glDrawPixels = (PFNGLDRAWPIXELSPROC)load("glDrawPixels");
glad_glGetClipPlane = (PFNGLGETCLIPPLANEPROC)load("glGetClipPlane");
glad_glGetLightfv = (PFNGLGETLIGHTFVPROC)load("glGetLightfv");
glad_glGetLightiv = (PFNGLGETLIGHTIVPROC)load("glGetLightiv");
glad_glGetMapdv = (PFNGLGETMAPDVPROC)load("glGetMapdv");
glad_glGetMapfv = (PFNGLGETMAPFVPROC)load("glGetMapfv");
glad_glGetMapiv = (PFNGLGETMAPIVPROC)load("glGetMapiv");
glad_glGetMaterialfv = (PFNGLGETMATERIALFVPROC)load("glGetMaterialfv");
glad_glGetMaterialiv = (PFNGLGETMATERIALIVPROC)load("glGetMaterialiv");
glad_glGetPixelMapfv = (PFNGLGETPIXELMAPFVPROC)load("glGetPixelMapfv");
glad_glGetPixelMapuiv = (PFNGLGETPIXELMAPUIVPROC)load("glGetPixelMapuiv");
glad_glGetPixelMapusv = (PFNGLGETPIXELMAPUSVPROC)load("glGetPixelMapusv");
glad_glGetPolygonStipple = (PFNGLGETPOLYGONSTIPPLEPROC)load("glGetPolygonStipple");
glad_glGetTexEnvfv = (PFNGLGETTEXENVFVPROC)load("glGetTexEnvfv");
glad_glGetTexEnviv = (PFNGLGETTEXENVIVPROC)load("glGetTexEnviv");
glad_glGetTexGendv = (PFNGLGETTEXGENDVPROC)load("glGetTexGendv");
glad_glGetTexGenfv = (PFNGLGETTEXGENFVPROC)load("glGetTexGenfv");
glad_glGetTexGeniv = (PFNGLGETTEXGENIVPROC)load("glGetTexGeniv");
glad_glIsList = (PFNGLISLISTPROC)load("glIsList");
glad_glFrustum = (PFNGLFRUSTUMPROC)load("glFrustum");
glad_glLoadIdentity = (PFNGLLOADIDENTITYPROC)load("glLoadIdentity");
glad_glLoadMatrixf = (PFNGLLOADMATRIXFPROC)load("glLoadMatrixf");
glad_glLoadMatrixd = (PFNGLLOADMATRIXDPROC)load("glLoadMatrixd");
glad_glMatrixMode = (PFNGLMATRIXMODEPROC)load("glMatrixMode");
glad_glMultMatrixf = (PFNGLMULTMATRIXFPROC)load("glMultMatrixf");
glad_glMultMatrixd = (PFNGLMULTMATRIXDPROC)load("glMultMatrixd");
glad_glOrtho = (PFNGLORTHOPROC)load("glOrtho");
glad_glPopMatrix = (PFNGLPOPMATRIXPROC)load("glPopMatrix");
glad_glPushMatrix = (PFNGLPUSHMATRIXPROC)load("glPushMatrix");
glad_glRotated = (PFNGLROTATEDPROC)load("glRotated");
glad_glRotatef = (PFNGLROTATEFPROC)load("glRotatef");
glad_glScaled = (PFNGLSCALEDPROC)load("glScaled");
glad_glScalef = (PFNGLSCALEFPROC)load("glScalef");
glad_glTranslated = (PFNGLTRANSLATEDPROC)load("glTranslated");
glad_glTranslatef = (PFNGLTRANSLATEFPROC)load("glTranslatef");
}
static void load_GL_VERSION_1_1(GLADloadproc load) {
if(!GLAD_GL_VERSION_1_1) return;
glad_glDrawArrays = (PFNGLDRAWARRAYSPROC)load("glDrawArrays");
glad_glDrawElements = (PFNGLDRAWELEMENTSPROC)load("glDrawElements");
glad_glGetPointerv = (PFNGLGETPOINTERVPROC)load("glGetPointerv");
glad_glPolygonOffset = (PFNGLPOLYGONOFFSETPROC)load("glPolygonOffset");
glad_glCopyTexImage1D = (PFNGLCOPYTEXIMAGE1DPROC)load("glCopyTexImage1D");
glad_glCopyTexImage2D = (PFNGLCOPYTEXIMAGE2DPROC)load("glCopyTexImage2D");
glad_glCopyTexSubImage1D = (PFNGLCOPYTEXSUBIMAGE1DPROC)load("glCopyTexSubImage1D");
glad_glCopyTexSubImage2D = (PFNGLCOPYTEXSUBIMAGE2DPROC)load("glCopyTexSubImage2D");
glad_glTexSubImage1D = (PFNGLTEXSUBIMAGE1DPROC)load("glTexSubImage1D");
glad_glTexSubImage2D = (PFNGLTEXSUBIMAGE2DPROC)load("glTexSubImage2D");
glad_glBindTexture = (PFNGLBINDTEXTUREPROC)load("glBindTexture");
glad_glDeleteTextures = (PFNGLDELETETEXTURESPROC)load("glDeleteTextures");
glad_glGenTextures = (PFNGLGENTEXTURESPROC)load("glGenTextures");
glad_glIsTexture = (PFNGLISTEXTUREPROC)load("glIsTexture");
glad_glArrayElement = (PFNGLARRAYELEMENTPROC)load("glArrayElement");
glad_glColorPointer = (PFNGLCOLORPOINTERPROC)load("glColorPointer");
glad_glDisableClientState = (PFNGLDISABLECLIENTSTATEPROC)load("glDisableClientState");
glad_glEdgeFlagPointer = (PFNGLEDGEFLAGPOINTERPROC)load("glEdgeFlagPointer");
glad_glEnableClientState = (PFNGLENABLECLIENTSTATEPROC)load("glEnableClientState");
glad_glIndexPointer = (PFNGLINDEXPOINTERPROC)load("glIndexPointer");
glad_glInterleavedArrays = (PFNGLINTERLEAVEDARRAYSPROC)load("glInterleavedArrays");
glad_glNormalPointer = (PFNGLNORMALPOINTERPROC)load("glNormalPointer");
glad_glTexCoordPointer = (PFNGLTEXCOORDPOINTERPROC)load("glTexCoordPointer");
glad_glVertexPointer = (PFNGLVERTEXPOINTERPROC)load("glVertexPointer");
glad_glAreTexturesResident = (PFNGLARETEXTURESRESIDENTPROC)load("glAreTexturesResident");
glad_glPrioritizeTextures = (PFNGLPRIORITIZETEXTURESPROC)load("glPrioritizeTextures");
glad_glIndexub = (PFNGLINDEXUBPROC)load("glIndexub");
glad_glIndexubv = (PFNGLINDEXUBVPROC)load("glIndexubv");
glad_glPopClientAttrib = (PFNGLPOPCLIENTATTRIBPROC)load("glPopClientAttrib");
glad_glPushClientAttrib = (PFNGLPUSHCLIENTATTRIBPROC)load("glPushClientAttrib");
}
static void load_GL_VERSION_1_2(GLADloadproc load) {
if(!GLAD_GL_VERSION_1_2) return;
glad_glDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC)load("glDrawRangeElements");
glad_glTexImage3D = (PFNGLTEXIMAGE3DPROC)load("glTexImage3D");
glad_glTexSubImage3D = (PFNGLTEXSUBIMAGE3DPROC)load("glTexSubImage3D");
glad_glCopyTexSubImage3D = (PFNGLCOPYTEXSUBIMAGE3DPROC)load("glCopyTexSubImage3D");
}
static void load_GL_VERSION_1_3(GLADloadproc load) {
if(!GLAD_GL_VERSION_1_3) return;
glad_glActiveTexture = (PFNGLACTIVETEXTUREPROC)load("glActiveTexture");
glad_glSampleCoverage = (PFNGLSAMPLECOVERAGEPROC)load("glSampleCoverage");
glad_glCompressedTexImage3D = (PFNGLCOMPRESSEDTEXIMAGE3DPROC)load("glCompressedTexImage3D");
glad_glCompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC)load("glCompressedTexImage2D");
glad_glCompressedTexImage1D = (PFNGLCOMPRESSEDTEXIMAGE1DPROC)load("glCompressedTexImage1D");
glad_glCompressedTexSubImage3D = (PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC)load("glCompressedTexSubImage3D");
glad_glCompressedTexSubImage2D = (PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)load("glCompressedTexSubImage2D");
glad_glCompressedTexSubImage1D = (PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC)load("glCompressedTexSubImage1D");
glad_glGetCompressedTexImage = (PFNGLGETCOMPRESSEDTEXIMAGEPROC)load("glGetCompressedTexImage");
glad_glClientActiveTexture = (PFNGLCLIENTACTIVETEXTUREPROC)load("glClientActiveTexture");
glad_glMultiTexCoord1d = (PFNGLMULTITEXCOORD1DPROC)load("glMultiTexCoord1d");
glad_glMultiTexCoord1dv = (PFNGLMULTITEXCOORD1DVPROC)load("glMultiTexCoord1dv");
glad_glMultiTexCoord1f = (PFNGLMULTITEXCOORD1FPROC)load("glMultiTexCoord1f");
glad_glMultiTexCoord1fv = (PFNGLMULTITEXCOORD1FVPROC)load("glMultiTexCoord1fv");
glad_glMultiTexCoord1i = (PFNGLMULTITEXCOORD1IPROC)load("glMultiTexCoord1i");
glad_glMultiTexCoord1iv = (PFNGLMULTITEXCOORD1IVPROC)load("glMultiTexCoord1iv");
glad_glMultiTexCoord1s = (PFNGLMULTITEXCOORD1SPROC)load("glMultiTexCoord1s");
glad_glMultiTexCoord1sv = (PFNGLMULTITEXCOORD1SVPROC)load("glMultiTexCoord1sv");
glad_glMultiTexCoord2d = (PFNGLMULTITEXCOORD2DPROC)load("glMultiTexCoord2d");
glad_glMultiTexCoord2dv = (PFNGLMULTITEXCOORD2DVPROC)load("glMultiTexCoord2dv");
glad_glMultiTexCoord2f = (PFNGLMULTITEXCOORD2FPROC)load("glMultiTexCoord2f");
glad_glMultiTexCoord2fv = (PFNGLMULTITEXCOORD2FVPROC)load("glMultiTexCoord2fv");
glad_glMultiTexCoord2i = (PFNGLMULTITEXCOORD2IPROC)load("glMultiTexCoord2i");
glad_glMultiTexCoord2iv = (PFNGLMULTITEXCOORD2IVPROC)load("glMultiTexCoord2iv");
glad_glMultiTexCoord2s = (PFNGLMULTITEXCOORD2SPROC)load("glMultiTexCoord2s");
glad_glMultiTexCoord2sv = (PFNGLMULTITEXCOORD2SVPROC)load("glMultiTexCoord2sv");
glad_glMultiTexCoord3d = (PFNGLMULTITEXCOORD3DPROC)load("glMultiTexCoord3d");
glad_glMultiTexCoord3dv = (PFNGLMULTITEXCOORD3DVPROC)load("glMultiTexCoord3dv");
glad_glMultiTexCoord3f = (PFNGLMULTITEXCOORD3FPROC)load("glMultiTexCoord3f");
glad_glMultiTexCoord3fv = (PFNGLMULTITEXCOORD3FVPROC)load("glMultiTexCoord3fv");
glad_glMultiTexCoord3i = (PFNGLMULTITEXCOORD3IPROC)load("glMultiTexCoord3i");
glad_glMultiTexCoord3iv = (PFNGLMULTITEXCOORD3IVPROC)load("glMultiTexCoord3iv");
glad_glMultiTexCoord3s = (PFNGLMULTITEXCOORD3SPROC)load("glMultiTexCoord3s");
glad_glMultiTexCoord3sv = (PFNGLMULTITEXCOORD3SVPROC)load("glMultiTexCoord3sv");
glad_glMultiTexCoord4d = (PFNGLMULTITEXCOORD4DPROC)load("glMultiTexCoord4d");
glad_glMultiTexCoord4dv = (PFNGLMULTITEXCOORD4DVPROC)load("glMultiTexCoord4dv");
glad_glMultiTexCoord4f = (PFNGLMULTITEXCOORD4FPROC)load("glMultiTexCoord4f");
glad_glMultiTexCoord4fv = (PFNGLMULTITEXCOORD4FVPROC)load("glMultiTexCoord4fv");
glad_glMultiTexCoord4i = (PFNGLMULTITEXCOORD4IPROC)load("glMultiTexCoord4i");
glad_glMultiTexCoord4iv = (PFNGLMULTITEXCOORD4IVPROC)load("glMultiTexCoord4iv");
glad_glMultiTexCoord4s = (PFNGLMULTITEXCOORD4SPROC)load("glMultiTexCoord4s");
glad_glMultiTexCoord4sv = (PFNGLMULTITEXCOORD4SVPROC)load("glMultiTexCoord4sv");
glad_glLoadTransposeMatrixf = (PFNGLLOADTRANSPOSEMATRIXFPROC)load("glLoadTransposeMatrixf");
glad_glLoadTransposeMatrixd = (PFNGLLOADTRANSPOSEMATRIXDPROC)load("glLoadTransposeMatrixd");
glad_glMultTransposeMatrixf = (PFNGLMULTTRANSPOSEMATRIXFPROC)load("glMultTransposeMatrixf");
glad_glMultTransposeMatrixd = (PFNGLMULTTRANSPOSEMATRIXDPROC)load("glMultTransposeMatrixd");
}
static void load_GL_VERSION_1_4(GLADloadproc load) {
if(!GLAD_GL_VERSION_1_4) return;
glad_glBlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC)load("glBlendFuncSeparate");
glad_glMultiDrawArrays = (PFNGLMULTIDRAWARRAYSPROC)load("glMultiDrawArrays");
glad_glMultiDrawElements = (PFNGLMULTIDRAWELEMENTSPROC)load("glMultiDrawElements");
glad_glPointParameterf = (PFNGLPOINTPARAMETERFPROC)load("glPointParameterf");
glad_glPointParameterfv = (PFNGLPOINTPARAMETERFVPROC)load("glPointParameterfv");
glad_glPointParameteri = (PFNGLPOINTPARAMETERIPROC)load("glPointParameteri");
glad_glPointParameteriv = (PFNGLPOINTPARAMETERIVPROC)load("glPointParameteriv");
glad_glFogCoordf = (PFNGLFOGCOORDFPROC)load("glFogCoordf");
glad_glFogCoordfv = (PFNGLFOGCOORDFVPROC)load("glFogCoordfv");
glad_glFogCoordd = (PFNGLFOGCOORDDPROC)load("glFogCoordd");
glad_glFogCoorddv = (PFNGLFOGCOORDDVPROC)load("glFogCoorddv");
glad_glFogCoordPointer = (PFNGLFOGCOORDPOINTERPROC)load("glFogCoordPointer");
glad_glSecondaryColor3b = (PFNGLSECONDARYCOLOR3BPROC)load("glSecondaryColor3b");
glad_glSecondaryColor3bv = (PFNGLSECONDARYCOLOR3BVPROC)load("glSecondaryColor3bv");
glad_glSecondaryColor3d = (PFNGLSECONDARYCOLOR3DPROC)load("glSecondaryColor3d");
glad_glSecondaryColor3dv = (PFNGLSECONDARYCOLOR3DVPROC)load("glSecondaryColor3dv");
glad_glSecondaryColor3f = (PFNGLSECONDARYCOLOR3FPROC)load("glSecondaryColor3f");
glad_glSecondaryColor3fv = (PFNGLSECONDARYCOLOR3FVPROC)load("glSecondaryColor3fv");
glad_glSecondaryColor3i = (PFNGLSECONDARYCOLOR3IPROC)load("glSecondaryColor3i");
glad_glSecondaryColor3iv = (PFNGLSECONDARYCOLOR3IVPROC)load("glSecondaryColor3iv");
glad_glSecondaryColor3s = (PFNGLSECONDARYCOLOR3SPROC)load("glSecondaryColor3s");
glad_glSecondaryColor3sv = (PFNGLSECONDARYCOLOR3SVPROC)load("glSecondaryColor3sv");
glad_glSecondaryColor3ub = (PFNGLSECONDARYCOLOR3UBPROC)load("glSecondaryColor3ub");
glad_glSecondaryColor3ubv = (PFNGLSECONDARYCOLOR3UBVPROC)load("glSecondaryColor3ubv");
glad_glSecondaryColor3ui = (PFNGLSECONDARYCOLOR3UIPROC)load("glSecondaryColor3ui");
glad_glSecondaryColor3uiv = (PFNGLSECONDARYCOLOR3UIVPROC)load("glSecondaryColor3uiv");
glad_glSecondaryColor3us = (PFNGLSECONDARYCOLOR3USPROC)load("glSecondaryColor3us");
glad_glSecondaryColor3usv = (PFNGLSECONDARYCOLOR3USVPROC)load("glSecondaryColor3usv");
glad_glSecondaryColorPointer = (PFNGLSECONDARYCOLORPOINTERPROC)load("glSecondaryColorPointer");
glad_glWindowPos2d = (PFNGLWINDOWPOS2DPROC)load("glWindowPos2d");
glad_glWindowPos2dv = (PFNGLWINDOWPOS2DVPROC)load("glWindowPos2dv");
glad_glWindowPos2f = (PFNGLWINDOWPOS2FPROC)load("glWindowPos2f");
glad_glWindowPos2fv = (PFNGLWINDOWPOS2FVPROC)load("glWindowPos2fv");
glad_glWindowPos2i = (PFNGLWINDOWPOS2IPROC)load("glWindowPos2i");
glad_glWindowPos2iv = (PFNGLWINDOWPOS2IVPROC)load("glWindowPos2iv");
glad_glWindowPos2s = (PFNGLWINDOWPOS2SPROC)load("glWindowPos2s");
glad_glWindowPos2sv = (PFNGLWINDOWPOS2SVPROC)load("glWindowPos2sv");
glad_glWindowPos3d = (PFNGLWINDOWPOS3DPROC)load("glWindowPos3d");
glad_glWindowPos3dv = (PFNGLWINDOWPOS3DVPROC)load("glWindowPos3dv");
glad_glWindowPos3f = (PFNGLWINDOWPOS3FPROC)load("glWindowPos3f");
glad_glWindowPos3fv = (PFNGLWINDOWPOS3FVPROC)load("glWindowPos3fv");
glad_glWindowPos3i = (PFNGLWINDOWPOS3IPROC)load("glWindowPos3i");
glad_glWindowPos3iv = (PFNGLWINDOWPOS3IVPROC)load("glWindowPos3iv");
glad_glWindowPos3s = (PFNGLWINDOWPOS3SPROC)load("glWindowPos3s");
glad_glWindowPos3sv = (PFNGLWINDOWPOS3SVPROC)load("glWindowPos3sv");
glad_glBlendColor = (PFNGLBLENDCOLORPROC)load("glBlendColor");
glad_glBlendEquation = (PFNGLBLENDEQUATIONPROC)load("glBlendEquation");
}
static void load_GL_ARB_multitexture(GLADloadproc load) {
if(!GLAD_GL_ARB_multitexture) return;
glad_glActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC)load("glActiveTextureARB");
glad_glClientActiveTextureARB = (PFNGLCLIENTACTIVETEXTUREARBPROC)load("glClientActiveTextureARB");
glad_glMultiTexCoord1dARB = (PFNGLMULTITEXCOORD1DARBPROC)load("glMultiTexCoord1dARB");
glad_glMultiTexCoord1dvARB = (PFNGLMULTITEXCOORD1DVARBPROC)load("glMultiTexCoord1dvARB");
glad_glMultiTexCoord1fARB = (PFNGLMULTITEXCOORD1FARBPROC)load("glMultiTexCoord1fARB");
glad_glMultiTexCoord1fvARB = (PFNGLMULTITEXCOORD1FVARBPROC)load("glMultiTexCoord1fvARB");
glad_glMultiTexCoord1iARB = (PFNGLMULTITEXCOORD1IARBPROC)load("glMultiTexCoord1iARB");
glad_glMultiTexCoord1ivARB = (PFNGLMULTITEXCOORD1IVARBPROC)load("glMultiTexCoord1ivARB");
glad_glMultiTexCoord1sARB = (PFNGLMULTITEXCOORD1SARBPROC)load("glMultiTexCoord1sARB");
glad_glMultiTexCoord1svARB = (PFNGLMULTITEXCOORD1SVARBPROC)load("glMultiTexCoord1svARB");
glad_glMultiTexCoord2dARB = (PFNGLMULTITEXCOORD2DARBPROC)load("glMultiTexCoord2dARB");
glad_glMultiTexCoord2dvARB = (PFNGLMULTITEXCOORD2DVARBPROC)load("glMultiTexCoord2dvARB");
glad_glMultiTexCoord2fARB = (PFNGLMULTITEXCOORD2FARBPROC)load("glMultiTexCoord2fARB");
glad_glMultiTexCoord2fvARB = (PFNGLMULTITEXCOORD2FVARBPROC)load("glMultiTexCoord2fvARB");
glad_glMultiTexCoord2iARB = (PFNGLMULTITEXCOORD2IARBPROC)load("glMultiTexCoord2iARB");
glad_glMultiTexCoord2ivARB = (PFNGLMULTITEXCOORD2IVARBPROC)load("glMultiTexCoord2ivARB");
glad_glMultiTexCoord2sARB = (PFNGLMULTITEXCOORD2SARBPROC)load("glMultiTexCoord2sARB");
glad_glMultiTexCoord2svARB = (PFNGLMULTITEXCOORD2SVARBPROC)load("glMultiTexCoord2svARB");
glad_glMultiTexCoord3dARB = (PFNGLMULTITEXCOORD3DARBPROC)load("glMultiTexCoord3dARB");
glad_glMultiTexCoord3dvARB = (PFNGLMULTITEXCOORD3DVARBPROC)load("glMultiTexCoord3dvARB");
glad_glMultiTexCoord3fARB = (PFNGLMULTITEXCOORD3FARBPROC)load("glMultiTexCoord3fARB");
glad_glMultiTexCoord3fvARB = (PFNGLMULTITEXCOORD3FVARBPROC)load("glMultiTexCoord3fvARB");
glad_glMultiTexCoord3iARB = (PFNGLMULTITEXCOORD3IARBPROC)load("glMultiTexCoord3iARB");
glad_glMultiTexCoord3ivARB = (PFNGLMULTITEXCOORD3IVARBPROC)load("glMultiTexCoord3ivARB");
glad_glMultiTexCoord3sARB = (PFNGLMULTITEXCOORD3SARBPROC)load("glMultiTexCoord3sARB");
glad_glMultiTexCoord3svARB = (PFNGLMULTITEXCOORD3SVARBPROC)load("glMultiTexCoord3svARB");
glad_glMultiTexCoord4dARB = (PFNGLMULTITEXCOORD4DARBPROC)load("glMultiTexCoord4dARB");
glad_glMultiTexCoord4dvARB = (PFNGLMULTITEXCOORD4DVARBPROC)load("glMultiTexCoord4dvARB");
glad_glMultiTexCoord4fARB = (PFNGLMULTITEXCOORD4FARBPROC)load("glMultiTexCoord4fARB");
glad_glMultiTexCoord4fvARB = (PFNGLMULTITEXCOORD4FVARBPROC)load("glMultiTexCoord4fvARB");
glad_glMultiTexCoord4iARB = (PFNGLMULTITEXCOORD4IARBPROC)load("glMultiTexCoord4iARB");
glad_glMultiTexCoord4ivARB = (PFNGLMULTITEXCOORD4IVARBPROC)load("glMultiTexCoord4ivARB");
glad_glMultiTexCoord4sARB = (PFNGLMULTITEXCOORD4SARBPROC)load("glMultiTexCoord4sARB");
glad_glMultiTexCoord4svARB = (PFNGLMULTITEXCOORD4SVARBPROC)load("glMultiTexCoord4svARB");
}
static void load_GL_ARB_vertex_buffer_object(GLADloadproc load) {
if(!GLAD_GL_ARB_vertex_buffer_object) return;
glad_glBindBufferARB = (PFNGLBINDBUFFERARBPROC)load("glBindBufferARB");
glad_glDeleteBuffersARB = (PFNGLDELETEBUFFERSARBPROC)load("glDeleteBuffersARB");
glad_glGenBuffersARB = (PFNGLGENBUFFERSARBPROC)load("glGenBuffersARB");
glad_glIsBufferARB = (PFNGLISBUFFERARBPROC)load("glIsBufferARB");
glad_glBufferDataARB = (PFNGLBUFFERDATAARBPROC)load("glBufferDataARB");
glad_glBufferSubDataARB = (PFNGLBUFFERSUBDATAARBPROC)load("glBufferSubDataARB");
glad_glGetBufferSubDataARB = (PFNGLGETBUFFERSUBDATAARBPROC)load("glGetBufferSubDataARB");
glad_glMapBufferARB = (PFNGLMAPBUFFERARBPROC)load("glMapBufferARB");
glad_glUnmapBufferARB = (PFNGLUNMAPBUFFERARBPROC)load("glUnmapBufferARB");
glad_glGetBufferParameterivARB = (PFNGLGETBUFFERPARAMETERIVARBPROC)load("glGetBufferParameterivARB");
glad_glGetBufferPointervARB = (PFNGLGETBUFFERPOINTERVARBPROC)load("glGetBufferPointervARB");
}
static void load_GL_EXT_compiled_vertex_array(GLADloadproc load) {
if(!GLAD_GL_EXT_compiled_vertex_array) return;
glad_glLockArraysEXT = (PFNGLLOCKARRAYSEXTPROC)load("glLockArraysEXT");
glad_glUnlockArraysEXT = (PFNGLUNLOCKARRAYSEXTPROC)load("glUnlockArraysEXT");
}
static void load_GL_EXT_fog_coord(GLADloadproc load) {
if(!GLAD_GL_EXT_fog_coord) return;
glad_glFogCoordfEXT = (PFNGLFOGCOORDFEXTPROC)load("glFogCoordfEXT");
glad_glFogCoordfvEXT = (PFNGLFOGCOORDFVEXTPROC)load("glFogCoordfvEXT");
glad_glFogCoorddEXT = (PFNGLFOGCOORDDEXTPROC)load("glFogCoorddEXT");
glad_glFogCoorddvEXT = (PFNGLFOGCOORDDVEXTPROC)load("glFogCoorddvEXT");
glad_glFogCoordPointerEXT = (PFNGLFOGCOORDPOINTEREXTPROC)load("glFogCoordPointerEXT");
}
static int find_extensionsGL(void) {
if (!get_exts()) return 0;
GLAD_GL_ARB_multitexture = has_ext("GL_ARB_multitexture");
GLAD_GL_ARB_texture_env_combine = has_ext("GL_ARB_texture_env_combine");
GLAD_GL_ARB_texture_non_power_of_two = has_ext("GL_ARB_texture_non_power_of_two");
GLAD_GL_ARB_vertex_buffer_object = has_ext("GL_ARB_vertex_buffer_object");
GLAD_GL_EXT_compiled_vertex_array = has_ext("GL_EXT_compiled_vertex_array");
GLAD_GL_EXT_fog_coord = has_ext("GL_EXT_fog_coord");
GLAD_GL_EXT_texture_env_combine = has_ext("GL_EXT_texture_env_combine");
GLAD_GL_EXT_texture_filter_anisotropic = has_ext("GL_EXT_texture_filter_anisotropic");
free_exts();
return 1;
}
static void find_coreGL(void) {
/* Thank you @elmindreda
* https://github.com/elmindreda/greg/blob/master/templates/greg.c.in#L176
* https://github.com/glfw/glfw/blob/master/src/context.c#L36
*/
int i, major, minor;
const char* version;
const char* prefixes[] = {
"OpenGL ES-CM ",
"OpenGL ES-CL ",
"OpenGL ES ",
NULL
};
version = (const char*) glGetString(GL_VERSION);
if (!version) return;
for (i = 0; prefixes[i]; i++) {
const size_t length = strlen(prefixes[i]);
if (strncmp(version, prefixes[i], length) == 0) {
version += length;
break;
}
}
/* PR #18 */
#ifdef _MSC_VER
sscanf_s(version, "%d.%d", &major, &minor);
#else
sscanf(version, "%d.%d", &major, &minor);
#endif
GLVersion.major = major; GLVersion.minor = minor;
max_loaded_major = major; max_loaded_minor = minor;
GLAD_GL_VERSION_1_0 = (major == 1 && minor >= 0) || major > 1;
GLAD_GL_VERSION_1_1 = (major == 1 && minor >= 1) || major > 1;
GLAD_GL_VERSION_1_2 = (major == 1 && minor >= 2) || major > 1;
GLAD_GL_VERSION_1_3 = (major == 1 && minor >= 3) || major > 1;
GLAD_GL_VERSION_1_4 = (major == 1 && minor >= 4) || major > 1;
if (GLVersion.major > 1 || (GLVersion.major >= 1 && GLVersion.minor >= 4)) {
max_loaded_major = 1;
max_loaded_minor = 4;
}
}
int gladLoadGLLoader(GLADloadproc load) {
GLVersion.major = 0; GLVersion.minor = 0;
glGetString = (PFNGLGETSTRINGPROC)load("glGetString");
if(glGetString == NULL) return 0;
if(glGetString(GL_VERSION) == NULL) return 0;
find_coreGL();
load_GL_VERSION_1_0(load);
load_GL_VERSION_1_1(load);
load_GL_VERSION_1_2(load);
load_GL_VERSION_1_3(load);
load_GL_VERSION_1_4(load);
if (!find_extensionsGL()) return 0;
load_GL_ARB_multitexture(load);
load_GL_ARB_vertex_buffer_object(load);
load_GL_EXT_compiled_vertex_array(load);
load_GL_EXT_fog_coord(load);
return GLVersion.major != 0 || GLVersion.minor != 0;
}
| gpl-2.0 |
lytranuit/wordpress | wp-content/themes/hamza-lite/sidebar-right.php | 820 | <?php
/**
* The Sidebar containing the main widget areas.
*
* @package Hamza Lite
*/
?>
<?php
global $post;
$hamza_lite_post_class = "";
if(!empty($post)){
if(is_front_page()){
$hamza_lite_post_id = get_option('page_on_front');
}else{
$hamza_lite_post_id = $post->ID;
}
$hamza_lite_post_class = get_post_meta( $hamza_lite_post_id, 'hamza_lite_sidebar_layout', true );
}elseif (is_home()) {
$hamza_lite_post_class='right-sidebar';
}
if($hamza_lite_post_class=='right-sidebar' || $hamza_lite_post_class=='both-sidebar' || empty($hamza_lite_post_class) || is_archive()){ ?>
<div id="secondary-right" class="widget-area right-sidebar sidebar">
<?php if ( is_active_sidebar( 'right-sidebar' ) ) : ?>
<?php dynamic_sidebar( 'right-sidebar' ); ?>
<?php endif; ?>
</div><!-- #secondary -->
<?php } ?>
| gpl-2.0 |
mangosthree/server | dep/acelite/ace/Log_Category.cpp | 3309 | #include "ace/Log_Msg.h"
#include "ace/Log_Category.h"
#include "ace/Atomic_Op.h"
#include "ace/OS_NS_Thread.h"
#if !defined (__ACE_INLINE__)
#include "ace/Log_Category.inl"
#endif /* __ACE_INLINE__ */
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
#if defined (ACE_HAS_THREADS)
extern "C" void
ACE_Log_Category_tss_destroy(void * p)
{
delete static_cast<ACE_Log_Category_TSS*>(p);
}
#endif // defined (ACE_HAS_THREADS)
ACE_Log_Category::ACE_Log_Category(const char* name)
: name_(name)
, id_(0)
/// Default per-process priority mask
/// By default, all priorities are enabled.
, priority_mask_(LM_SHUTDOWN
| LM_TRACE
| LM_DEBUG
| LM_INFO
| LM_NOTICE
| LM_WARNING
| LM_STARTUP
| LM_ERROR
| LM_CRITICAL
| LM_ALERT
| LM_EMERGENCY)
#if defined (ACE_HAS_THREADS)
, key_(ACE_OS::NULL_key)
#else
, per_thr_obj_(this, 0)
#endif
{
}
ACE_Log_Category::~ACE_Log_Category()
{
#if defined (ACE_HAS_THREADS)
ACE_GUARD (ACE_Thread_Mutex, ace_mon, this->keylock_);
if (this->id_ > 0)
{
void *temp = 0;
if (ACE_OS::thr_getspecific (this->key_, &temp) == -1)
{
return; // This should not happen!
}
if (temp != 0) {
delete static_cast <ACE_Log_Category_TSS *> (temp);
ACE_OS::thr_setspecific (this->key_, 0);
}
ACE_OS::thr_keyfree (this->key_);
}
#endif
}
ACE_Log_Category_TSS::ACE_Log_Category_TSS(ACE_Log_Category* category, ACE_Log_Msg* logger)
: category_(category)
, logger_(logger)
, priority_mask_(0)
{
}
ACE_ALLOC_HOOK_DEFINE(ACE_Log_Category_TSS)
ACE_Log_Category_TSS*
ACE_Log_Category::per_thr_obj()
{
#if defined (ACE_HAS_THREADS)
{
// Ensure that we are serialized!
ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->keylock_, 0);
// make sure we only create the key once!
if (this->id_ == 0)
{
static ACE_Atomic_Op<ACE_Thread_Mutex, unsigned int> log_category_id_assigner(1);
id_ = log_category_id_assigner++; // for atomic integers, post increment is more efficient
if (ACE_OS::thr_keycreate (&this->key_,
&ACE_Log_Category_tss_destroy) != 0)
return 0; // Major problems, this should *never* happen!
}
}
void *temp = 0;
if (ACE_OS::thr_getspecific (this->key_, &temp) == -1)
{
return 0; // This should not happen!
}
if (temp != 0)
return static_cast <ACE_Log_Category_TSS *> (temp);
ACE_Log_Category_TSS * result;
ACE_NEW_RETURN(result,
ACE_Log_Category_TSS(this, ACE_Log_Msg::instance()),
0);
if (ACE_OS::thr_setspecific (this->key_,
result) != 0)
{
return 0;
}
return result;
#else // defined (ACE_HAS_THREADS)
if (this->id_ == 0) {
static unsigned int log_category_id_assigner = 0;
id_ = log_category_id_assigner++;
per_thr_obj_.logger_ = ACE_Log_Msg::instance();
}
return &per_thr_obj_;
#endif // defined (ACE_HAS_THREADS)
}
ACE_Log_Category&
ACE_Log_Category::ace_lib()
{
static ACE_Log_Category ace_lib_category("ACE");
return ace_lib_category;
}
ACE_END_VERSIONED_NAMESPACE_DECL
| gpl-2.0 |
heimowitz/binghamtonfilminitiative | administrator/components/com_uddeim/language.utf8/czech.php | 101131 | <?php
// *******************************************************************
// Title udde Instant Messages (uddeIM)
// Description Instant Messages System for Mambo 4.5 / Joomla 1.0 / Joomla 1.5
// Author © 2007-2010 Stephan Slabihoud, © 2006 Benjamin Zweifel
// License This is free software and you may redistribute it under the GPL.
// uddeIM comes with absolutely no warranty.
// Use at your own risk. For details, see the license at
// http://www.gnu.org/licenses/gpl.txt
// Other licenses can be found in LICENSES folder.
// *******************************************************************
// Language file: Czech - UTF8, translation - JardaKo - jarda(dot)ko(at)volny(dot)cz
// comments for translation are welcome
// 27012013 - last update
// *******************************************************************
DEFINE ('_UDDEADM_TRANSLATORS_CREDITS', 'Překlad: JardaKo, jarda(tečka)ko(zavináč)volny(tečka)cz, připomínky k překladu jsou vítány!'); // Enter your credits line here, e.g. 'Translation by <a href="http://domain.com" target="_new">John Doe</a>'
// New: 3.1
DEFINE ('_UDDEIM_BADWORD', 'Bad word detected');
DEFINE ('_UDDEADM_BADWORDS_HEAD', 'Badwords filter');
DEFINE ('_UDDEADM_BADWORDS_EXP', 'New messages will be filtered for badwords. All badwords have to be seperated by a semicolon (;).');
DEFINE ('_UDDEADM_CFGFILE_CONVERTING_14', '...set default for badwords filter');
DEFINE ('_UDDEADM_OOD_PB', 'Postbox Plugin out of date!');
// New: 3.0
DEFINE ('_UDDEADM_UDDEIM', 'uddeIM');
DEFINE ('_UDDEADM_REPLYTEXT_HEAD', 'Auto reply');
DEFINE ('_UDDEADM_REPLYTEXT_EXP', 'The original message will be included automatically when you reply to a message.');
DEFINE ('_UDDEADM_CFGFILE_CONVERTING_13', '...set default for replys (options)');
// New: 2.9
DEFINE ('_UDDEADM_KUNENA20', 'Kunena 2.0+');
DEFINE ('_UDDEADM_POSTBOXFULL_HEAD', 'Celý text zprávy');
DEFINE ('_UDDEADM_POSTBOXFULL_EXP', 'Zobrazit celý text zprávy - U žádné, U první nebo U všech.');
DEFINE ('_UDDEADM_POSTBOXFULL_0', 'U žádné');
DEFINE ('_UDDEADM_POSTBOXFULL_1', 'U první');
DEFINE ('_UDDEADM_POSTBOXFULL_2', 'U všech');
DEFINE ('_UDDEADM_POSTBOXAVATARS_HEAD', 'Zobrazit Avatary');
DEFINE ('_UDDEADM_POSTBOXAVATARS_EXP', 'Zobrazit Avatary při prohlížení zprávy.');
DEFINE ('_UDDEADM_CFGFILE_CONVERTING_12', '...nastavit jako defaultní poštovní schránku (volitelně)');
// New: 2.8
DEFINE ('_UDDEADM_CFGFILE_CONVERTING_11', '...nastavit jako defaultní pro poštovní schránku');
DEFINE ('_UDDEADM_POSTBOX_HEAD', 'Povolit Poštovní schránky');
DEFINE ('_UDDEADM_POSTBOX_EXP', 'Povolit systém Poštovních schránek.');
DEFINE ('_UDDEIM_FILTER_TITLE_POSTBOX', 'Zobrazit pouze od/pro tohoto uživatele');
DEFINE ('_UDDEIM_MESSAGES', 'Zpráv');
DEFINE ('_UDDEIM_POSTBOX', 'Poštovní schránky');
DEFINE ('_UDDEIM_FILTEREDUSER', 'uživatel vyfiltrován');
DEFINE ('_UDDEIM_FILTEREDUSERS', 'uživatelé vyfiltrováni');
DEFINE ('_UDDEIM_NOMESSAGES_FILTERED_POSTBOX', ' poštovní schránka');
DEFINE ('_UDDEIM_NOMESSAGES_POSTBOX', 'Ve tvé poštovní schránce nemáš žádné zprávy.');
DEFINE ('_UDDEIM_DISPLAY', 'Zobrazit');
DEFINE ('_UDDEIM_HELP_POSTBOX', 'V <b>Poštovní schránce</b> máš uloženy přijaté a odeslané zprávy.');
DEFINE ('_UDDEIM_HELP_PREAD', 'Zpráva byla přečtena (inbox=stav můžeš přepnout).');
DEFINE ('_UDDEIM_HELP_PUNREAD', 'Zpráva ještě nebyla přečtena (inbox=stav můžeš přepnout).');
// New: 2.7
DEFINE ('_UDDEADM_MOOTOOLS_NONEMEIO', 'nenahrát MooTools (použít MEIO)');
DEFINE ('_UDDEADM_MOOTOOLS_13MEIO', 'vynucené nahrání MooTools 1.3 (použít MEIO)');
// New: 2.6
DEFINE ('_UDDEADM_DONTSEFMSGLINK_HEAD', 'Nepoužít SEF pro %msglink%');
DEFINE ('_UDDEADM_DONTSEFMSGLINK_EXP', 'Nepoužít SEF pro %msglink% v emailových upozorněních.');
DEFINE ('_UDDEADM_STIME_HEAD', 'Použít speciální kalendář');
DEFINE ('_UDDEADM_STIME_EXP', 'Je-li povoleno, na stránkách používajících jazyk farsi bude použit perský kalendář.');
DEFINE ('_UDDEADM_RESTRICTREM_HEAD', 'Odstranit zbytky po spojení');
DEFINE ('_UDDEADM_RESTRICTREM_EXP', 'Automaticky odstranit zbytky po spojení je-li ukládán existující seznam kontaktů.');
DEFINE ('_UDDEADM_RESTRICTCON_HEAD', 'Zobrazit pouze spojení');
DEFINE ('_UDDEADM_RESTRICTCON_EXP', 'Uživatelé v zobrazeném seznamu budou omezeni na spojení k CB/CBE/JS (skrýt uživatele z tohoto seznamu nemá význam, je-li povolen).');
DEFINE ('_UDDEADM_RESTRICTCON0', 'nepovoleno');
DEFINE ('_UDDEADM_RESTRICTCON1', 'registrovaní uživatelé');
DEFINE ('_UDDEADM_RESTRICTCON2', 'registrovaní, speciální uživatelé');
DEFINE ('_UDDEADM_RESTRICTCON3', 'všichni uživatelé (vč. adminů)');
DEFINE ('_UDDEADM_CFGFILE_CONVERTING_10', '...nastavit jako defaultní pro zobrazení spojení');
// New: 2.4
DEFINE ('_UDDEIM_SECURITYCODE', 'Bezpečnostní kód:');
// New: 2.3
DEFINE ('_UDDEADM_CC_HEAD', 'Tlačítko "Zobrazit CC: řádek"');
DEFINE ('_UDDEADM_CC_EXP', 'Je-li povoleno, uživatelé mohou zvolit, jestli uddeIM má nebo nemá přidat do zprávy CC: řádek obsahující všechny adresáty.');
DEFINE ('_UDDEADM_CFGFILE_CONVERTING_9', '...nastavit defaultně pro CC: řádek, a moderování');
DEFINE ('_UDDEIM_TOOLBAR_MCP', 'Centrum zpráv');
DEFINE ('_UDDEIM_TOOLBAR_REMOVEMESSAGE', 'Smazat zprávu');
DEFINE ('_UDDEIM_TOOLBAR_DELIVERMESSAGE', 'Doručit zprávu');
DEFINE ('_UDDEADM_OOD_MCP', 'Message Center Plugin je zastaraký!');
DEFINE ('_UDDEADM_MCP_STAT', 'Zpráv pro moderátora:');
DEFINE ('_UDDEADM_MCP_TRASHED', 'Smazat');
DEFINE ('_UDDEADM_MCP_NOTEDEL', 'Smazat tuto zprávu z databáze?');
DEFINE ('_UDDEADM_MCP_NOTEDELIVER', 'Doručit tuto zprávu adresátovi?');
DEFINE ('_UDDEADM_MCP_SHOWHIDE', 'Zobrazit/Skrýt');
DEFINE ('_UDDEADM_MCP_EDIT', 'Centrum zpráv');
DEFINE ('_UDDEADM_MCP_FROM', 'Od');
DEFINE ('_UDDEADM_MCP_TO', 'Pro');
DEFINE ('_UDDEADM_MCP_TEXT', 'Zpráva');
DEFINE ('_UDDEADM_MCP_DELETE', 'Smazat');
DEFINE ('_UDDEADM_MCP_DATE', 'Datum');
DEFINE ('_UDDEADM_MCP_DELIVER', 'Deliver');
DEFINE ('_UDDEADM_USERSET_MODERATE', 'Mod');
DEFINE ('_UDDEADM_USERSET_SELMODERATE', '- Mod -');
DEFINE ('_UDDEIM_MCP_MODERATED', 'Tvoje zpráva bude zkontrolována. Moderátor ji zkontroluje před jejím předáním adresátovi.');
DEFINE ('_UDDEIM_STATUS_DELAYED', 'Čeká na kontrolu');
DEFINE ('_UDDEADM_MODNEWUSERS_HEAD', 'Kontrola nových uživatelů');
DEFINE ('_UDDEADM_MODNEWUSERS_EXP', 'Je-li povoleno, zprávy nově registrovaných uživatelů jsou defautně kotrolovány.');
DEFINE ('_UDDEADM_MODPUBUSERS_HEAD', 'Kontrola návštěvníků');
DEFINE ('_UDDEADM_MODPUBUSERS_EXP', 'Je-li povoleno, zprávy návštěvníků jsou defautně kotrolovány.');
DEFINE ('_UDDEIM_MENUICONS_P3', 'Žádná nabídka');
// New: 2.2
DEFINE ('_UDDEADM_OOD_PF', 'Public Frontend Plugin je zastaralý!');
DEFINE ('_UDDEADM_OOD_A', 'File Attachment Plugin je zastaralý!');
DEFINE ('_UDDEADM_OOD_RSS', 'RSS Plugin je zastaralý!');
DEFINE ('_UDDEADM_OOD_ASC', 'Message Report Center Plugin je zastaralý!');
DEFINE ('_UDDEIM_NOMESSAGES3_FILTERED', '<b>Nemáš filtrované zprávy ve tvé %s.</b>');
DEFINE ('_UDDEIM_FILTER_UNREAD', 'nepřečteny');
DEFINE ('_UDDEIM_FILTER_FLAGGED', 'označeny');
DEFINE ('_UDDEADM_GRAVATAR_HEAD', 'gravatar povolen');
DEFINE ('_UDDEADM_GRAVATAR_EXP', 'Povolit podporu gravataru.');
DEFINE ('_UDDEADM_GRAVATARD_HEAD', 'gravatar imageset');
DEFINE ('_UDDEADM_GRAVATARD_EXP', 'Vyber imageset pro defaultní obrázky.');
DEFINE ('_UDDEADM_GRAVATARR_HEAD', 'gravatar hodnocení');
DEFINE ('_UDDEADM_GRAVATARR_EXP', 'Defaultně - jsou zobrazeny pouze obrázky s "G" ohodnocením dokud nevybereš vyšší hodnocení. "X" zobrazí všechny gravatar obrázky.');
DEFINE ('_UDDEADM_GR404', '404');
DEFINE ('_UDDEADM_GRMM', 'mm');
DEFINE ('_UDDEADM_GRIDENTICON', 'identicon');
DEFINE ('_UDDEADM_GRMONSTERID', 'monsterid');
DEFINE ('_UDDEADM_GRWAVATAR', 'wavatar');
DEFINE ('_UDDEADM_GRRETRO', 'retro');
DEFINE ('_UDDEADM_GRDEFAULT', 'defaultní');
DEFINE ('_UDDEADM_GRG', 'G = Základní');
DEFINE ('_UDDEADM_GRPG', 'PG = Dohled rodičů');
DEFINE ('_UDDEADM_GRR', 'R = Omezeno');
DEFINE ('_UDDEADM_GRX', 'X = Pouze dospělí');
DEFINE ('_UDDEADM_NINJABOARD', 'Ninjaboard');
DEFINE ('_UDDEADM_KUNENA16', 'Kunena 1.6+');
DEFINE ('_UDDEIM_PROCESSING', 'Zpracovávání...');
DEFINE ('_UDDEIM_SEND_NONOTIFY', 'Nezasílat upozorňovací emaily');
DEFINE ('_UDDEIM_SYSGM_NONOTIFY', 'Emailové upozorňování nebude zasíláno');
DEFINE ('_UDDEIM_SYSGM_FORCEEMBEDDED', 'Text bude vložen do upozorňovacího emailu');
DEFINE ('_UDDEADM_CFGFILE_CONVERTING_8', '...nastavit defaultní pro náhledy');
DEFINE ('_UDDEADM_AVATARWH_HEAD', 'Zobrazovaná velikost náhledů');
DEFINE ('_UDDEADM_AVATARWH_EXP', 'Šířka a výška (v pixelech) náhledů (0 = velikost nebude změněna).');
DEFINE ('_UDDEIM_SAVE', 'Uložit');
// New: 2.1
DEFINE ('_UDDEIM_BODY_SPAMREPORT',
"Ahoj %you%,\n\n%touser% ti zaslal oznámení o podezřelé zprávě od %fromuser%. Přihlas se, abys to mohl ověřit!\n\n%livesite%");
DEFINE ('_UDDEIM_SUBJECT_SPAMREPORT', 'Zpráva byla zaslána na %site%');
DEFINE ('_UDDEADM_KBYTES', 'KByte');
DEFINE ('_UDDEADM_MBYTES', 'MByte');
DEFINE ('_UDDEIM_ATT_FILEDELETED', 'Soubor byl smazán');
DEFINE ('_UDDEIM_ATT_FILENOTEXISTS', 'Chyba: Soubor neexistuje');
DEFINE ('_UDDEIM_ATTACHMENTS2', 'Přílohy (max. %s na soubor):');
DEFINE ('_UDDEADM_JOOCM', 'Joo!CM');
DEFINE ('_UDDEADM_UNPROTECTATTACHMENT_HEAD', 'Stahovat soubory nechráněně');
DEFINE ('_UDDEADM_UNPROTECTATTACHMENT_EXP', 'uddeIM obvykle nepřidává cestu na server k souborům v příloze, takže nikdo - ikdyž zná název souboru - nemůže si tyto soubory stáhnout. Povolením této volby přinutíš uddeIM aby přidával celou cestu na server. Z bezpečnostních důvodů, uddeIM přidává MD5 hash k původnímu názvu souboru. Uživatelé tak mohou stahovat soubor přímo když je celá cesta známa. Používej tuto volbu obezřetně! PŘEČTI SI FAQ PŘEDTÍM NEŽ POVOLÍŠ TUTO MOŽNOST!');
DEFINE ('_UDDEADM_CFGFILE_CONVERTING_7', '...nastav defaultní pro soubory v přílohách, public frontend');
DEFINE ('_UDDEIM_FILETYPE_NOTALLOWED', 'Typ souboru není povolen');
DEFINE ('_UDDEADM_ALLOWEDEXTENSIONS_HEAD', 'Výjimky povoleny');
DEFINE ('_UDDEADM_ALLOWEDEXTENSIONS_EXP', 'Zadej všechny povolené výjimky (odděl je ";"). Ponech prázdné, nebudou-li žádná omezení.');
DEFINE ('_UDDEADM_PUBEMAIL_HEAD', 'Email je vyžadován');
DEFINE ('_UDDEADM_PUBEMAIL_EXP', 'Je-li zatrženo, návštěvník (public user) musí zadat emailovou adresu.');
DEFINE ('_UDDEADM_WAITDAYS_HEAD', 'Počet dnů prodlevy');
DEFINE ('_UDDEADM_WAITDAYS_EXP', 'Zadej kolik dnů musí uživatel počkat, než je mu dovoleno posílat zprávy (pro 3 hodiny zadej 0.125).');
DEFINE ('_UDDEIM_WAITDAYS1', 'Musíš počkat ');
DEFINE ('_UDDEIM_WAITDAYS2', ' dnů, poté můžeš posílat zprávy.');
DEFINE ('_UDDEIM_WAITDAYS2H', ' hodin, poté můžeš posílat zprávy.');
// New: 2.0
DEFINE ('_UDDEADM_RECAPTCHAPRV_HEAD', 'reCaptcha soukromý klíč');
DEFINE ('_UDDEADM_RECAPTCHAPRV_EXP', 'Pokud chceš používat reCaptcha, zadej sem svůj soukromý klíč.');
DEFINE ('_UDDEADM_RECAPTCHAPUB_HEAD', 'reCaptcha veřejný klíč');
DEFINE ('_UDDEADM_RECAPTCHAPUB_EXP', 'Pokud chceš používat reCaptcha, zadej sem svůj veřejný klíč.');
DEFINE ('_UDDEADM_CAPTCHA_INTERNAL', 'Interní');
DEFINE ('_UDDEADM_CAPTCHA_RECAPTCHA', 'reCaptcha');
DEFINE ('_UDDEADM_CAPTCHATYPE_HEAD', 'služba Captcha');
DEFINE ('_UDDEADM_CAPTCHATYPE_EXP', 'Kterou službu captcha chceš použít: interní nebo reCaptcha (viz <a href="http://recaptcha.net" target="_new">reCaptcha</a> pro více informací)?');
DEFINE ('_UDDEADM_CFGFILE_CONVERTING_6', '...nastavit jako defaultní službu captcha');
DEFINE ('_UDDEADM_AUP', 'AlphaUserPoints');
DEFINE ('_UDDEADM_CHECKFILESFOLDER', 'Přesuň prosím <i>\uddeimfiles</i> do <i>\images\uddeimfiles</i>. Více viz dokumentace!');
DEFINE ('_UDDEADM_CRYPT4', 'Silné kódování');
DEFINE ('_UDDEADM_ALLOWTOALL2_HEAD', 'Povolit zasílání systémových zpráv');
DEFINE ('_UDDEADM_ALLOWTOALL2_EXP', 'uddeIM podporuje systémové zprávy, které jsou zasílány všem uživatelům na tvých stránkách. Používej tuto volbu uvážlivě.');
DEFINE ('_UDDEADM_ALLOWTOALL2_0', 'nepovoleno');
DEFINE ('_UDDEADM_ALLOWTOALL2_1', 'pouze administrátorům');
DEFINE ('_UDDEADM_ALLOWTOALL2_2', 'pouze administrátorům a manažerům');
// New: 1.9
DEFINE ('_UDDEIM_FILEUPLOAD_FAILED', 'Nahrávání souboru se nepodařilo');
DEFINE ('_UDDEADM_CFGFILE_CONVERTING_5', '...nastavit jako defaultní pro přílohy');
DEFINE ('_UDDEADM_ENABLEATTACHMENT_HEAD', 'Povolit přílohy');
DEFINE ('_UDDEADM_ENABLEATTACHMENT_EXP', 'Povolí zasílat soubory jako přílohu - pouze pro všechny registrované uživatele nebo administrátora.');
DEFINE ('_UDDEADM_MAXSIZEATTACHMENT_HEAD', 'Max. velikost souboru');
DEFINE ('_UDDEADM_MAXSIZEATTACHMENT_EXP', 'Maximální velikost přílohy - v Bytech.');
DEFINE ('_UDDEIM_FILESIZE_EXCEEDED', 'Překročena maximální velikost souboru');
DEFINE ('_UDDEADM_BYTES', 'Bytů');
DEFINE ('_UDDEADM_MAXATTACHMENTS_HEAD', 'Max. počet příloh');
DEFINE ('_UDDEADM_MAXATTACHMENTS_EXP', 'Maximální počet příloh v jedné zprávě.');
DEFINE ('_UDDEIM_DOWNLOAD', 'Download');
DEFINE ('_UDDEADM_FILEADMINIGNITIONONLY_HEAD', 'File deletions invoked');
DEFINE ('_UDDEADM_FILEADMINIGNITIONONLY_YES', 'pouze admin');
DEFINE ('_UDDEADM_FILEADMINIGNITIONONLY_NO', 'pouze uživatel');
DEFINE ('_UDDEADM_FILEADMINIGNITIONONLY_MANUALLY', 'manuálně');
DEFINE ('_UDDEADM_FILEADMINIGNITIONONLY_EXP', 'Automatické mazání velmi zatěžuje server. Pokud vybereš <b>pouze admin</b> automatické smazání je vyvoláno pokud admin zatrhne tento inbox. Vyber tuto volbu, pokud admin zatrhuje tento box pravidelně. Pro malé, nebo zřídka administrované weby lze zvolit <b>pouze uživatel</b>.');
DEFINE ('_UDDEADM_FILEMAINTENANCE_PRUNE', 'Vyčistit soubory nyní');
DEFINE ('_UDDEADM_FILEMAINTENANCEDEL_HEAD', 'Zahrnout mazání souborů');
DEFINE ('_UDDEADM_FILEMAINTENANCEDEL_EXP', 'Odstranit smazané soubory z databáze. Stejná volba jako \'Smazat soubory nyní\' na záložce Systém.');
DEFINE ('_UDDEADM_FILEMAINTENANCEDEL_ERASE', 'SMAZAT');
DEFINE ('_UDDEIM_ATTACHMENTS', 'Přílohy (max. %u bytů na soubor):');
DEFINE ('_UDDEADM_MAINTENANCE_F1', 'Zbytky příloh uloženy v systému souborů: ');
DEFINE ('_UDDEADM_MAINTENANCE_F2', 'Smazání zbytků příloh (souborů)');
DEFINE ('_UDDEADM_BACKUP_DONE', 'Záloha konfigurace provedena.');
DEFINE ('_UDDEADM_RESTORE_DONE', 'Obnova konfigurace provedena.');
DEFINE ('_UDDEADM_PRUNE_DONE', 'Vyčištění zpráv provedeno.');
DEFINE ('_UDDEADM_FILEPRUNE_DONE', 'Vyčištění příloh z databáze provedeno.');
DEFINE ('_UDDEADM_FOLDERCREATE_ERROR', 'Chyba při vytváření adresáře: ');
DEFINE ('_UDDEADM_ATTINSTALL_WRITEFAILED', 'Chyba při vytváření souboru: ');
DEFINE ('_UDDEADM_ATTINSTALL_IGNORE', 'Tuto zprávu můžeš ignorovat, pokud nevlastníš Premium plugin (viz FAQ).');
DEFINE ('_UDDEADM_ATTACHMENTGROUPS_HEAD', 'Povolené skupiny');
DEFINE ('_UDDEADM_ATTACHMENTGROUPS_EXP', 'Skupiny, které mohou ke zprávám přikládat přílohy.');
DEFINE ('_UDDEIM_SELECT', 'Vybrat');
DEFINE ('_UDDEIM_ATTACHMENT', 'Přílohy');
DEFINE ('_UDDEADM_SHOWLISTATTACHMENT_HEAD', 'Zobrazit ikonu přílohy');
DEFINE ('_UDDEADM_SHOWLISTATTACHMENT_EXP', 'Zobrazit ikonu přílohy v seznamu zpráv (přijatých, odeslaných, archivu).');
DEFINE ('_UDDEIM_HELP_ATTACHMENT', 'Zpráva obsahuje soubor jako přílohu.');
DEFINE ('_UDDEADM_MAINTENANCE_COUNTFILES', 'File references in database:');
DEFINE ('_UDDEADM_MAINTENANCE_COUNTFILESDISTINCT', 'Souborů jako příloh uloženo:');
DEFINE ('_UDDEADM_SHOWMENUCOUNT_HEAD', 'Zobrazit počítadlo');
DEFINE ('_UDDEADM_SHOWMENUCOUNT_EXP', 'Je-li zvoleno <b>ano</b>, řádek menu obsahuje počítadlo zpráv. Pozn: Tato volba zatěžuje server, nepoužívat na málo výkonných systémech.');
DEFINE ('_UDDEADM_CONFIG_FTPLAYER', 'Konfigurace (přístup přes FTP vrstvu):');
DEFINE ('_UDDEADM_ENCODEHEADER_HEAD', 'Kódovat hlavičky mailů');
DEFINE ('_UDDEADM_ENCODEHEADER_EXP', 'Nastav na <b>ano</b>, pokud by hlavičky mailů (jako např. subjekt) měly být kódovány (rfc 2047). Je to užitečné, pokud máš problém se speciálními znaky.');
DEFINE ('_UDDEIM_UP', 'seřadit vzestupně');
DEFINE ('_UDDEIM_DOWN', 'seřadit sestupně');
DEFINE ('_UDDEIM_UPDOWN', 'seřadit');
DEFINE ('_UDDEADM_ENABLESORT_HEAD', 'Povolit seřazování');
DEFINE ('_UDDEADM_ENABLESORT_EXP', 'Nastav na <b>ano</b>, pokud má mít uživatel povoleno seřazování v přijatých, odeslaných a archivu (vytváří větší zatížení databáze na serveru).');
// New: 1.8
// %s will be replaced by _UDDEIM_NOMESSAGES_FILTERED_INBOX, _UDDEIM_NOMESSAGES_FILTERED_OUTBOX, _UDDEIM_NOMESSAGES_FILTERED_ARCHIVE
// Translators help: When having problems with the grammar, you can also move some text (e.g. "in your") to _UDDEIM_NOMESSAGES_FILTERED_* variables, e.g.
// instead of "_UDDEIM_NOMESSAGES_FILTERED_INBOX=inbox" you can also use "_UDDEIM_NOMESSAGES_FILTERED_INBOX=in your inbox"
DEFINE ('_UDDEIM_NOMESSAGES2_FR_FILTERED', '<b>Nemáš žádné zprávy od tohoto uživatele v %s.</b>');
DEFINE ('_UDDEIM_NOMESSAGES2_TO_FILTERED', '<b>Nemáš žádné odeslané zprávy pro tohoto uživatele v %s.</b>');
DEFINE ('_UDDEIM_NOMESSAGES2_UNFR_FILTERED', '<b>Nemáš žádné nepřečtené zprávy od tohoto uživatele v %s.</b>');
DEFINE ('_UDDEIM_NOMESSAGES2_UNTO_FILTERED', '<b>Nemáš žádné nepřečtené zprávy pro tohoto uživatele v %s.</b>');
// New: 1.7
DEFINE ('_UDDEADM_EMAILSTOPPED', '\'Volba Zastavit e-mail na záložce E-mail\' je nastavena na Ano.');
DEFINE ('_UDDEIM_ACCOUNTLOCKED', 'Přístup do tvé mailové schránky byl uzamčen. Kontakuj prosím administrátora webstránek.');
DEFINE ('_UDDEADM_USERSET_LOCKED', 'Uzamčeno');
DEFINE ('_UDDEADM_USERSET_SELLOCKED', '- Zamčeno -');
DEFINE ('_UDDEADM_CBBANNED_HEAD', 'Ověřit uživatele s banem v CB');
DEFINE ('_UDDEADM_CBBANNED_EXP', 'Je-li povoleno, uddeIM ověří, jestli nemá uživatel v CB ban a nepovolí poté přístup do uddeIM. Další uživatelé nemohou posílat zprávy uživateli s banem.');
DEFINE ('_UDDEIM_YOUAREBANNED', 'Dostal jsi ban. Kontaktuj prosím administrátora nebo moderátora.');
DEFINE ('_UDDEIM_USERBANNED', 'Uživatel má udělen ban');
DEFINE ('_UDDEADM_JOOBB', 'Joo!BB');
DEFINE ('_UDDEPLUGIN_SEARCHSECTION', 'Soukromé zprávy');
DEFINE ('_UDDEPLUGIN_MESSAGES', 'Soukromé zprávy');
DEFINE ('_UDDEADM_MAINTENANCEDEL_HEAD', 'Zahrnout mazání zpráv');
// note "This is the same as _UDDEADM_MAINTENANCE_PRUNE on the system tab."
DEFINE ('_UDDEADM_MAINTENANCEDEL_EXP', 'Odstranit smazané zprávy z databáze. Stejná volba jako \'Smazat zprávy nyní\' na záložce Systém.');
DEFINE ('_UDDEADM_MAINTENANCEDEL_ERASE', 'SMAZAT');
DEFINE ('_UDDEADM_REPORTSPAM_HEAD', 'Odkaz Nahlášení zprávy');
DEFINE ('_UDDEADM_REPORTSPAM_EXP', 'Je-li aktivováno zobrazení odkazu \'Nahlášení zprávy\' povolí se uživatelům nahlásit SPAM administrátorovi.');
DEFINE ('_UDDEIM_TOOLBAR_REMOVESPAM', 'Smazat zprávu');
DEFINE ('_UDDEIM_TOOLBAR_REMOVEREPORT', 'Odstranit nahlášení');
DEFINE ('_UDDEIM_TOOLBAR_SPAMCONTROL', 'Nastavení nahlášení');
DEFINE ('_UDDEADM_INFORMATION', 'Informace');
DEFINE ('_UDDEADM_SPAMCONTROL_STAT', 'Nahlášeno zpráv:');
DEFINE ('_UDDEADM_SPAMCONTROL_TRASHED', 'Smazáno');
DEFINE ('_UDDEADM_SPAMCONTROL_NOTEDEL', 'Smazat tuto zprávu z databáze?');
DEFINE ('_UDDEADM_SPAMCONTROL_NOTEREMOVE', 'Odstranit toto nahlášení?');
DEFINE ('_UDDEADM_SPAMCONTROL_SHOWHIDE', 'Zobrazit/Skrýt');
DEFINE ('_UDDEADM_SPAMCONTROL_EDIT', 'Centrum Nastavení nahlášení');
DEFINE ('_UDDEADM_SPAMCONTROL_FROM', 'Od');
DEFINE ('_UDDEADM_SPAMCONTROL_TO', 'Pro');
DEFINE ('_UDDEADM_SPAMCONTROL_TEXT', 'Zpráva');
DEFINE ('_UDDEADM_SPAMCONTROL_DELETE', 'Smazat');
DEFINE ('_UDDEADM_SPAMCONTROL_REMOVE', 'Odstranit');
DEFINE ('_UDDEADM_SPAMCONTROL_DATE', 'Datum');
DEFINE ('_UDDEADM_SPAMCONTROL_REPORTED', 'Nahlášeno');
DEFINE ('_UDDEIM_SPAMCONTROL_REPORT', 'Nahlásit zprávu');
DEFINE ('_UDDEIM_SPAMCONTROL_MARKED', 'Zpráva byla nahlášena');
DEFINE ('_UDDEIM_SPAMCONTROL_UNREPORT', 'Obnovit toto nahlášení');
DEFINE ('_UDDEADM_ADMIN_FILTER', 'Filtr');
DEFINE ('_UDDEADM_ADMIN_DISPLAY', 'Zobrazit #');
DEFINE ('_UDDEADM_JOMSOCIAL', 'Jomsocial');
DEFINE ('_UDDEADM_KUNENA', 'Kunena');
DEFINE ('_UDDEADM_TRASHORIGINALSENT_HEAD', 'Smazat poslané zprávy');
DEFINE ('_UDDEADM_TRASHORIGINALSENT_EXP', 'Je-li tato volba aktivní, vloží se vedle tlačítka \'Odeslat\' checkbox nazvaný \'smaž zprávu\', který není defaultně zatržen. Uživatelé mohou tento checkbox zaškrtnout, pokud chtějí zprávu smazat okamžitě po jejím odeslání.');
DEFINE ('_UDDEIM_TRASHORIGINALSENT', 'smazat zprávu');
DEFINE ('_UDDEADM_CFGFILE_CONVERTING_4', '...nastavit jako defaultní pro smazání poslaných zpráv');
DEFINE ('_UDDEADM_VERSIONCHECK_IMPORTANT', 'Důležité odkazy:');
DEFINE ('_UDDEADM_VERSIONCHECK_HOTFIX', 'Hotfix');
DEFINE ('_UDDEADM_VERSIONCHECK_NONE', 'Žádné');
DEFINE ('_UDDEADM_MAINTENANCEFIX_HEAD', "Údržba kompatibility");
DEFINE ('_UDDEADM_MAINTENANCEFIX_EXP', "uddeIM používá dva XML soubory, aby se ujistil že balíčky mohou být instalovány do Joomly 1.0 a 1.5. V Joomle 1.5 však jeden XML soubor není potřeba a to způsobuje, že manažer rozšíření zobrazuje varování o nekompatibiltě (které je špatné). Tato volba odstraňuje nepotřebné soubory, takže toto varování již poté není zobrazováno");
DEFINE ('_UDDEADM_MAINTENANCE_FIX', "OPRAVA");
DEFINE ('_UDDEADM_MAINTENANCE_XML1', "XML instalátoři balíčků uddeIM pro Joomlu 1.0 a Joomlu 1.5 existují.<br />");
DEFINE ('_UDDEADM_MAINTENANCE_XML2', "Toto je vyžadováno kvůli instalaci balíčků do Joomly 1.0 a Joomly 1.5.<br />");
DEFINE ('_UDDEADM_MAINTENANCE_XML3', "Po skončení instalace již není potřeba, takže Joomla 1.0 instalátor může být odstraněn ze systému Joomly 1.5.<br />");
DEFINE ('_UDDEADM_MAINTENANCE_XML4', "Pro následující balíčky musí být provedeno:<br />");
DEFINE ('_UDDEADM_MAINTENANCE_FXML1', "Nepotřebné XML instalátory balíčků uddeIM budou odstraněny:<br />");
DEFINE ('_UDDEADM_MAINTENANCE_FXML2', "Žádné nepotřebné XML instalátory balíčků uddeIM nebyly nalezeny!<br />");
DEFINE ('_UDDEADM_SHOWMENUICONS1_HEAD', 'Zobrazování lišty menu');
DEFINE ('_UDDEADM_SHOWMENUICONS1_EXP', 'Zde můžeš nastavit, jestli lišta menu bude zobrazována s ikonami, ikonami a textem, nebo jen s textem.');
DEFINE ('_UDDEIM_MENUICONS_P1', 'Ikony a text');
DEFINE ('_UDDEIM_MENUICONS_P2', 'Pouze Ikony');
DEFINE ('_UDDEIM_MENUICONS_P0', 'Pouze Text');
DEFINE ('_UDDEIM_LISTSLIMIT_2', 'Maximální počet příjemců v seznamu:');
DEFINE ('_UDDEADM_ADDEMAIL_ADMIN', 'Admin může vybrat');
DEFINE ('_UDDEAIM_ADDEMAIL_SELECT', 'Upozornění se zprávou');
DEFINE ('_UDDEAIM_ADDEMAIL_TITLE', 'Přiložit celou zprávu v e-mailovém upozornění.');
// New: 1.6
DEFINE ('_UDDEIM_NOLISTSELECTED', 'Není vybrán žádný uživatelský seznam!');
DEFINE ('_UDDEADM_NOPREMIUM', 'Premium plugin není nainstalován');
DEFINE ('_UDDEIM_LISTGLOBAL_CREATOR', 'Tvůrce:');
DEFINE ('_UDDEIM_LISTGLOBAL_ENTRIES', 'Počet kontaktů');
DEFINE ('_UDDEIM_LISTGLOBAL_TYPE', 'Typ');
DEFINE ('_UDDEIM_LISTGLOBAL_NORMAL', 'Normalní');
DEFINE ('_UDDEIM_LISTGLOBAL_GLOBAL', 'Globální');
DEFINE ('_UDDEIM_LISTGLOBAL_RESTRICTED', 'Omezený');
DEFINE ('_UDDEIM_LISTGLOBAL_P0', 'Normální seznam kontaktů');
DEFINE ('_UDDEIM_LISTGLOBAL_P1', 'Globální seznam kontaktů');
DEFINE ('_UDDEIM_LISTGLOBAL_P2', 'Omezený seznam kontaktů (pouze členové mají přístup k tomuto seznamu)');
DEFINE ('_UDDEIM_TOOLBAR_USERSETTINGS', 'Nastavení uživatele');
DEFINE ('_UDDEIM_TOOLBAR_REMOVESETTINGS', 'Odstranit nastavení');
DEFINE ('_UDDEIM_TOOLBAR_CREATESETTINGS', 'Vytvořit nastavení');
DEFINE ('_UDDEIM_TOOLBAR_SAVE', 'Uložit');
DEFINE ('_UDDEIM_TOOLBAR_BACK', 'Zpět');
DEFINE ('_UDDEIM_TOOLBAR_TRASHMSGS', 'Smazat zprávy');
DEFINE ('_UDDEIM_CBPLUG_CONT', '[pokračovat]');
DEFINE ('_UDDEIM_CBPLUG_UNBLOCKNOW', '[odblokovat]');
DEFINE ('_UDDEIM_CBPLUG_DOBLOCK', 'Blokovat uživatele');
DEFINE ('_UDDEIM_CBPLUG_DOUNBLOCK', 'Odblokovat uživatele');
DEFINE ('_UDDEIM_CBPLUG_BLOCKINGCFG', 'Blokování');
DEFINE ('_UDDEIM_CBPLUG_BLOCKED', 'Tento uživatel je již blokován.');
DEFINE ('_UDDEIM_CBPLUG_UNBLOCKED', 'Tento uživatel tě může kontaktovat.');
DEFINE ('_UDDEIM_CBPLUG_NOWBLOCKED', 'Uživatel je nyní blokován.');
DEFINE ('_UDDEIM_CBPLUG_NOWUNBLOCKED', 'Uživatel je odblokován.');
DEFINE ('_UDDEADM_PARTIALIMPORTDONE', 'Částečný import zpráv ze staršího PMS proveden. Neprováděj import této části znovu, protože pak budou zprávy znovu naimportovány a zobrazeny tak dvakrát.');
DEFINE ('_UDDEADM_IMPORT_HELP', 'Pozn: Zprávy mohou být importovány buď všechny, nebo po částech. Importování po částech může být potřebné, pokud celý import neproběhne pro velký počet zpráv.');
DEFINE ('_UDDEADM_IMPORT_PARTIAL', 'Částečný import:');
DEFINE ('_UDDEADM_UPDATEYOURDB', 'Důležité: Neprovedl jsi update databáze! Prosím, přečti si README pro nápovědu, jak správně provést update uddeIM!');
DEFINE ('_UDDEADM_RESTRALLUSERS_HEAD', 'Omezit přístup do seznamu "Všichni uživatelé"');
DEFINE ('_UDDEADM_RESTRALLUSERS_EXP', 'Můžeš omezit přístup do seznamu "Všichni uživatelé". Obvykle je seznam "Všichni uživatelé" dostupný pro všechny (<i>bez omezení</i>).');
DEFINE ('_UDDEADM_RESTRALLUSERS_0', 'bez omezení');
DEFINE ('_UDDEADM_RESTRALLUSERS_1', 'specialní uživatel');
DEFINE ('_UDDEADM_RESTRALLUSERS_2', 'pouze admin');
DEFINE ('_UDDEIM_MESSAGE_UNARCHIVED', 'Zpráva vyjmuta z archivu.');
DEFINE ('_UDDEADM_AUTOFORWARD_SPECIAL', 'speciální uživatelé');
DEFINE ('_UDDEIM_HELP', 'Nápověda');
DEFINE ('_UDDEIM_HELP_HEADLINE1', 'Nápověda uddeIM');
DEFINE ('_UDDEIM_HELP_HEADLINE2', 'Přehled všech funkcí');
DEFINE ('_UDDEIM_HELP_INBOX', '<b>Přijaté</b> - zde jsou uloženy došlé zprávy, případně i e-maily.');
DEFINE ('_UDDEIM_HELP_OUTBOX', '<b>Odeslané</b> - zde jsou uloženy kopie všech odeslaných zpráv, můžeš se sem kdykoli vrátit, aby sis prohlédl, co jsi odeslal.');
DEFINE ('_UDDEIM_HELP_TRASHCAN', '<b>Koš</b> - zde jsou smazané zprávy. Zprávy nejsou okamžitě smazány, jsou zde po určitý čas. Pokud jsou zde, můžeš je kdykoli obnovit.');
DEFINE ('_UDDEIM_HELP_ARCHIVE', '<b>Archiv</b> - zde jsou archivovány všechny zprávy z Přijatých. Archivovat lze zprávy pouze z Přijatých. Pokud chceš archivovat zprávy co jsi napsal, musíš zatrhnou volbu <i>kopii i mně</i> před jejím odesláním.');
DEFINE ('_UDDEIM_HELP_USERLISTS', '<b>Seznamy kontaktů</b> - lze si vytvořit seznamy kontaktů (také známy jako distribuované seznamy). Tyto seznamy dovolují zaslat Soukr.zprávu více příjemcům. Místo přidávání více příjemců můžeš prostě zadat <i>#názevseznamukontaktů</i>.');
DEFINE ('_UDDEIM_HELP_SETTINGS', '<b>Nastavení</b> - zobrazí možnosti nastavení pro jednotlivého uživatele.');
DEFINE ('_UDDEIM_HELP_COMPOSE', '<b>Napsat</b> - umožní napsat novou soukromou zprávu.');
DEFINE ('_UDDEIM_HELP_IREAD', 'Zpráva byla přečtena (můžeš změnit její status).');
DEFINE ('_UDDEIM_HELP_IUNREAD', 'Zpráva je stále nepřečtena (můžeš změnit její status).');
DEFINE ('_UDDEIM_HELP_OREAD', 'Zpráva byla přečtena.');
DEFINE ('_UDDEIM_HELP_OUNREAD', 'Zpráva ještě nebyla nepřečtena. Nepřečtené zprávy mohou být ještě opraveny či upraveny.');
DEFINE ('_UDDEIM_HELP_TREAD', 'Zpráva byla přečtena.');
DEFINE ('_UDDEIM_HELP_TUNREAD', 'Zpráva ještě nebyla nepřečtena.');
DEFINE ('_UDDEIM_HELP_FLAGGED', 'Zpráva byla označena, např. jde-li o důležitou zprávu (můžeš změnit její status).');
DEFINE ('_UDDEIM_HELP_UNFLAGGED', '<i>Normální</i> zpráva (můžeš změnit její status).');
DEFINE ('_UDDEIM_HELP_ONLINE', 'Uživatel je právě online.');
DEFINE ('_UDDEIM_HELP_OFFLINE', 'Uživatel je offline.');
DEFINE ('_UDDEIM_HELP_DELETE', 'Smazat zprávu (přesunout zprávu do koše).');
DEFINE ('_UDDEIM_HELP_FORWARD', 'Přeposlat zprávu dalšímu příjemci.');
DEFINE ('_UDDEIM_HELP_ARCHIVEMSG', 'Archivovat zprávu. Archivované zprávy nebudou automaticky smazány, pokud admin nakonfiguruje časový limit pro zprávy uložené v Přijatých.');
DEFINE ('_UDDEIM_HELP_UNARCHIVEMSG', 'Odarchivovat zprávu. Zpráva bude přesunuta zpět do Přijatých.');
DEFINE ('_UDDEIM_HELP_RECALL', 'Upravit zprávu. Odeslané zprávy mohou být opraveny nebo upraveny pokud ještě nebyly přečteny příjemcem.');
DEFINE ('_UDDEIM_HELP_RECYCLE', 'Obnovit zprávu (přesunout zprávu z koše zpět do Přijatých nebo Odeslaných).');
DEFINE ('_UDDEIM_HELP_NOTIFY', 'Nastavit e-mailové upozornění, pokud přijde nová zpráva.');
DEFINE ('_UDDEIM_HELP_AUTORESPONDER', 'Pokud je zapnuta volba automatické odpovědi, každá přijatá zpráva bude ihned odpovězena.');
DEFINE ('_UDDEIM_HELP_AUTOFORWARD', 'Nové zprávy mohou být automaticky přeposlány jinému uživateli.');
DEFINE ('_UDDEIM_HELP_BLOCKING', 'Můžeš blokovat uživatele. Takoví uživatelé ti nemohou zasílat soukromé zprávy.');
DEFINE ('_UDDEIM_HELP_MISC', 'Zde jsou další možnosti nastavení');
DEFINE ('_UDDEIM_HELP_FEED', 'Můžeš přistupovat do Přijatých používáním RSS.');
DEFINE ('_UDDEADM_SEPARATOR_HEAD', 'Oddělovač');
DEFINE ('_UDDEADM_SEPARATOR_EXP', 'Vyberte typ oddělovače používaný pro více příjemců (defaultně je ",").');
DEFINE ('_UDDEADM_SEPARATOR_P0', 'čárka (defaultně)');
DEFINE ('_UDDEADM_SEPARATOR_P1', 'středník');
DEFINE ('_UDDEADM_RSSLIMIT_HEAD', 'RSS items');
DEFINE ('_UDDEADM_RSSLIMIT_EXP', 'Počet navrácených RSS items (0 znamená žádné omezení).');
DEFINE ('_UDDEADM_SHOWHELP_HEAD', 'Zobrazit odkaz s Nápovědou');
DEFINE ('_UDDEADM_SHOWHELP_EXP', 'Je-li povoleno, odkaz s Nápovědou je zobrazen.');
DEFINE ('_UDDEADM_SHOWIGOOGLE_HEAD', 'Zobrazit tlačítko iGoogle gadget');
DEFINE ('_UDDEADM_SHOWIGOOGLE_EXP', 'Je-li povoleno tlačítko <i>Přidat do iGoogle</i> uddeIM iGoogle gadget je zobrazen v uživatelových preferencích.');
DEFINE ('_UDDEADM_MOOTOOLS_NONE11', 'nenahrávat MooTools (1.1 je používán)');
DEFINE ('_UDDEADM_MOOTOOLS_NONE12', 'nenahrávat MooTools (1.2 je používán)');
DEFINE ('_UDDEIM_RSS_INTRO1', 'Můžeš se připojit do tvých Přijatých pomocí RSS (0.91).');
DEFINE ('_UDDEIM_RSS_INTRO1B', 'Přístupová URL je:');
DEFINE ('_UDDEIM_RSS_INTRO2', 'Nedávej tuto URL jiným uživatelům, protože slouží pro přístup do tvých Přijatých.');
DEFINE ('_UDDEIM_RSS_FEED', 'RSS Message Feed');
DEFINE ('_UDDEIM_RSS_NOOBJECT', 'No object error...');
DEFINE ('_UDDEIM_RSS_USERBLOCKED', 'Uživatel blokován...');
DEFINE ('_UDDEIM_RSS_NOTALLOWED', 'Přístup není povolen...');
DEFINE ('_UDDEIM_RSS_WRONGPASSWORD', 'Špatné uživ.jméno nebo heslo...');
DEFINE ('_UDDEIM_RSS_NOMESSAGES', 'Žádné zprávy');
DEFINE ('_UDDEIM_RSS_NONEWMESSAGES', 'Žádné nové zprávy');
DEFINE ('_UDDEADM_ENABLERSS_HEAD', 'Povolit RSS');
DEFINE ('_UDDEADM_ENABLERSS_EXP', 'Je-li tato funkce povolena, zprávy mohou být přijímávy pomocí RSS. Uživatelé najdou požadovanou URL ve svém profilu.');
DEFINE ('_UDDEADM_CFGFILE_CONVERTING_3', '...nastavit defaultní pro RSS, iGoogle, help, separator');
DEFINE ('_UDDEADM_DELETEM_DELETING', 'Mazání zpráv:');
DEFINE ('_UDDEADM_DELETEM_FROMUSER', 'Mazání zpráv od uživatele ');
DEFINE ('_UDDEADM_DELETEM_MSGSSENT', '- zpráv odesláno: ');
DEFINE ('_UDDEADM_DELETEM_MSGSRECV', '- zpráv přijato: ');
DEFINE ('_UDDEIM_PMNAV_THISISARESPONSE', 'Toto je reakce na:');
DEFINE ('_UDDEIM_PMNAV_THEREARERESPONSES', 'Reakce na :');
DEFINE ('_UDDEIM_PMNAV_DELETED', 'Zpráva není dostupná');
DEFINE ('_UDDEIM_PMNAV_EXISTS', 'přejít na zprávu');
DEFINE ('_UDDEIM_PMNAV_COPY2ME', '(Kopírovat)');
DEFINE ('_UDDEADM_PMNAV_HEAD', 'Povolit navigaci');
DEFINE ('_UDDEADM_PMNAV_EXP', 'Zobrazí navigační lištu, která povolí navigaci skrze vlákno.');
DEFINE ('_UDDEADM_MAINTENANCE_ALLDAYS', 'Celkový počet zpráv:');
DEFINE ('_UDDEADM_MAINTENANCE_7DAYS', 'Počet zpráv za 7 dní:');
DEFINE ('_UDDEADM_MAINTENANCE_30DAYS', 'Počet zpráv za 30 dní:');
DEFINE ('_UDDEADM_MAINTENANCE_365DAYS', 'Počet zpráv za 365 dní:');
DEFINE ('_UDDEADM_MAINTENANCE_HEAD1', 'Zasláno upomínek (Doba zasílání upomínek je: %s dní):');
DEFINE ('_UDDEADM_MAINTENANCE_HEAD2', 'V %s dnech zasláno upomínek:');
DEFINE ('_UDDEADM_MAINTENANCE_NO', 'Číslo:');
DEFINE ('_UDDEADM_MAINTENANCE_USERID', 'Uživatelské ID:');
DEFINE ('_UDDEADM_MAINTENANCE_TONAME', 'Jméno:');
DEFINE ('_UDDEADM_MAINTENANCE_MID', 'Zpráva s ID:');
DEFINE ('_UDDEADM_MAINTENANCE_WRITTEN', 'Napsáno:');
DEFINE ('_UDDEADM_MAINTENANCE_TIMER', 'Časovač:');
// New: 1.5
DEFINE ('_UDDEMODULE_ALLDAYS', ' zprávy');
DEFINE ('_UDDEMODULE_7DAYS', ' zprávy posledních 7 dnů');
DEFINE ('_UDDEMODULE_30DAYS', ' zprávy posledních 30 dnů');
DEFINE ('_UDDEMODULE_365DAYS', ' zprávy posledních 365 dnů');
DEFINE ('_UDDEADM_EMN_SENDERMAIL_WARNING', '<br /><b>Upozornění:<br />Když používáš mosMail, musíš nakonfigurovat správnou e-mailovou adresu!</b>');
DEFINE ('_UDDEIM_FILTEREDMESSAGE', 'zpráva filtrována');
DEFINE ('_UDDEIM_FILTEREDMESSAGES', 'zprávy filtrovány');
DEFINE ('_UDDEIM_FILTER', 'Filtr:');
DEFINE ('_UDDEIM_FILTER_TITLE_INBOX', 'Ukázat pouze od uživatele');
DEFINE ('_UDDEIM_FILTER_TITLE_OUTBOX', 'Ukázat pouze kterému uživateli');
DEFINE ('_UDDEIM_FILTER_UNREAD_ONLY', 'pouze nepřečtené');
DEFINE ('_UDDEIM_FILTER_SUBMIT', 'Filtr');
DEFINE ('_UDDEIM_FILTER_ALL', '- všichni -');
DEFINE ('_UDDEIM_FILTER_PUBLIC', '- návštěvníci -');
DEFINE ('_UDDEADM_FILTER_HEAD', 'Povolit filtr');
DEFINE ('_UDDEADM_FILTER_EXP', 'Je-li povolen, uživatelé mohou filtrovat v přijatých/odeslaných a zobrazit si pouze jednoho příjemce nebo odesílatele.');
DEFINE ('_UDDEADM_FILTER_P0', 'zakázat');
DEFINE ('_UDDEADM_FILTER_P1', 'nad seznamem zpráv');
DEFINE ('_UDDEADM_FILTER_P2', 'pod seznamem zpráv');
DEFINE ('_UDDEADM_FILTER_P3', 'nad a pod seznamem zpráv');
DEFINE ('_UDDEIM_NOMESSAGES_FILTERED', '<b>Nemáš %s zprávy%s (kde)%s.</b>'); // see next also six lines
DEFINE ('_UDDEIM_NOMESSAGES_FILTERED_UNREAD', ' nepřečteny');
DEFINE ('_UDDEIM_NOMESSAGES_FILTERED_FROM', ' od (koho) uživatele');
DEFINE ('_UDDEIM_NOMESSAGES_FILTERED_TO', ' (komu) kterému uživateli');
DEFINE ('_UDDEIM_NOMESSAGES_FILTERED_INBOX', ' přijatých');
DEFINE ('_UDDEIM_NOMESSAGES_FILTERED_OUBOX', ' odeslaných');
DEFINE ('_UDDEIM_NOMESSAGES_FILTERED_ARCHIVE', ' archivu');
DEFINE ('_UDDEIM_TODP_TITLE', 'Příjemce');
DEFINE ('_UDDEIM_TODP_TITLE_CC', 'Jeden nebo více příjemců (odděleni čárkou');
DEFINE ('_UDDEIM_ADDCCINFO_TITLE', 'Když zatrhneš tento box, řádek obsahující všechny příjemce bude přídán ke zprávě.');
DEFINE ('_UDDEADM_CFGFILE_CONVERTING_2', '...nastavit default pro autoodesílání, autopřeposílání, inputbox, filtr');
DEFINE ('_UDDEADM_AUTORESPONDER_HEAD', 'Povolit Automatickou odpověď');
DEFINE ('_UDDEADM_AUTORESPONDER_EXP', 'Je-li automatické odpověď povolena, uživatel si může upozornění automatické odpovědi povolit v osobním nastavení.');
DEFINE ('_UDDEIM_EMN_AUTORESPONDER', 'Povolit Automatickou odpověď');
DEFINE ('_UDDEIM_AUTORESPONDER', 'Automatická odpověď');
DEFINE ('_UDDEIM_AUTORESPONDER_EXP', 'Je-li povolena automatické odpověď, bude na každou přijatou zprávu okamžitě odpovězeno.');
DEFINE ('_UDDEIM_AUTORESPONDER_DEFAULT', "Promiňte, nejsem momentálně dostupný.\nVyberu si mailovou schránku jakmile to bude možné.");
DEFINE ('_UDDEADM_USERSET_AUTOR', 'AutoR');
DEFINE ('_UDDEADM_USERSET_SELAUTOR', '- AutoR -');
DEFINE ('_UDDEIM_USERBLOCKED', 'Uživatel je blokován.');
DEFINE ('_UDDEADM_AUTOFORWARD_HEAD', 'Povolit automatické přeposílání');
DEFINE ('_UDDEADM_AUTOFORWARD_EXP', 'Když je automatické přeposílání povoleno, uživatel může automaticky nové zprávy přeposílat jinému uživateli.');
DEFINE ('_UDDEIM_EMN_AUTOFORWARD', 'Povolit automatické přeposílání');
DEFINE ('_UDDEADM_USERSET_AUTOF', 'AutoF');
DEFINE ('_UDDEADM_USERSET_SELAUTOF', '- AutoF -');
DEFINE ('_UDDEIM_AUTOFORWARD', 'Automatické přeposílání');
DEFINE ('_UDDEIM_AUTOFORWARD_EXP', 'Nové zprávy mohou být přeposílány jiným uživatelům automaticky.');
DEFINE ('_UDDEIM_THISISAFORWARD', 'Automatické přeposlání původní zprávy zasláno ');
DEFINE ('_UDDEADM_COLSROWS_HEAD', 'Okno pro zprávu (sloupců/řádek)');
DEFINE ('_UDDEADM_COLSROWS_EXP', 'Specifikuje počet sloupců a řádek okna pro zprávu (defaultní hodnota je 60/10).');
DEFINE ('_UDDEADM_WIDTH_HEAD', 'Okno pro zprávu (šířka)');
DEFINE ('_UDDEADM_WIDTH_EXP', 'Specifikuje šířku okna pro zprávu v px (default je 0). Je-li nastaveno 0, šířka je specifikována v CSS stylu, který je užíván.');
DEFINE ('_UDDEADM_CBE', 'CB Enhanced');
// New: 1.4
DEFINE ('_UDDEADM_IMPORT_CAPS', 'IMPORT');
// New: 1.3
DEFINE ('_UDDEADM_MOOTOOLS_HEAD', 'Nahrát MooTools');
DEFINE ('_UDDEADM_MOOTOOLS_EXP', 'Určuje, jak uddeIM nahrává MooTools (MooTools je vyžadován pro Automatické doplňování): <i>Nenahrávat</i> je vhodné, když tvoje šablona nahrává MooTools, <i>Auto</i> je doporučené jako defaultní (stejně jako v uddeIM 1.2), když používáš J1.0 můžeš nahrání MooTools 1.1 nebo 1.2. vynutit');
DEFINE ('_UDDEADM_MOOTOOLS_NONE', 'nenahrávat MooTools');
DEFINE ('_UDDEADM_MOOTOOLS_AUTO', 'auto');
DEFINE ('_UDDEADM_MOOTOOLS_1', 'vynuceně nahrát MooTools 1.1');
DEFINE ('_UDDEADM_MOOTOOLS_2', 'vynuceně nahrát MooTools 1.2');
DEFINE ('_UDDEADM_CFGFILE_CONVERTING_1', '...nastavit základní pro MooTools');
DEFINE ('_UDDEADM_AGORA', 'Agora');
// New: 1.2
DEFINE ('_UDDEADM_CRYPT3', 'Base64 enkódování');
DEFINE ('_UDDEADM_TIMEZONE_HEAD', 'Korekce časové zóny');
DEFINE ('_UDDEADM_TIMEZONE_EXP', 'Zde lze provést korekci časové zóny v případě, že uddeIM zobrazuje špatný čas. Je-li vše nastaveno správně, je obvyká hodnota 0 (nula) . Mohou ovšem nastat případy, kdy budete potřebovat změnit tuto hodnotu.');
DEFINE ('_UDDEADM_HOURS', 'hodin');
DEFINE ('_UDDEADM_VERSIONCHECK', 'Informace o verzi:');
DEFINE ('_UDDEADM_STATISTICS', 'Statistiky:');
DEFINE ('_UDDEADM_STATISTICS_HEAD', 'Ukázat statistiky');
DEFINE ('_UDDEADM_STATISTICS_EXP', 'Zobrazí některé statistiky jako např.: počet uložených zpráv apod..');
DEFINE ('_UDDEADM_STATISTICS_CHECK', 'UKÁZAT STATISTIKY');
DEFINE ('_UDDEADM_MAINTENANCE_COUNT', 'Počet zpráv uložených v databázi: ');
DEFINE ('_UDDEADM_MAINTENANCE_COUNT_RECIPIENT', 'Počet zpráv smazaných příjemcem: ');
DEFINE ('_UDDEADM_MAINTENANCE_COUNT_SENDER', 'Počet zpráv smazaných odesílatelem: ');
DEFINE ('_UDDEADM_MAINTENANCE_COUNT_TRASH', 'Počet zpráv určených pro smazání: ');
DEFINE ('_UDDEADM_OVERWRITEITEMID_HEAD', 'Přepisovat ItemID');
DEFINE ('_UDDEADM_OVERWRITEITEMID_EXP', 'Zpravidla uddeIM detekuje ItemID korektně, pokud toto není předem nastaveno. V některých případech může být nezbytné tuto hodnotu přepsat, např. pokud použiješ několik odkazů v menu na uddeIM.');
DEFINE ('_UDDEADM_OVERWRITEITEMID_CURRENT', 'Detekováno ItemID je: ');
DEFINE ('_UDDEADM_USEITEMID_HEAD', 'Použít ItemID');
DEFINE ('_UDDEADM_USEITEMID_EXP', 'Použít toto ItemID místo detekovaného.');
DEFINE ('_UDDEADM_SHOWLINK_HEAD', 'Použít odkazy na profil');
DEFINE ('_UDDEADM_SHOWLINK_EXP', 'Je-li nastaveno <i>ano</i>, všechna uživ.jména zobrazena v uddeIM jsou ukázána jako odkazy na uživ.profil.');
DEFINE ('_UDDEADM_SHOWPIC_HEAD', 'Ukázat náhledy');
DEFINE ('_UDDEADM_SHOWPIC_EXP', 'Když nastavíš <i>ano</i>, náhledy od respective uživatelů budou zobrazeny během čtení zprávy.');
DEFINE ('_UDDEADM_THUMBLISTS_HEAD', 'Ukázat náhledy v seznamech');
DEFINE ('_UDDEADM_THUMBLISTS_EXP', 'Nastav <i>ano</i> když chceš zobrazit náhledy uživatelů v přehledu seznamu zpráv (přijatých, odeslaných, atd.)');
DEFINE ('_UDDEADM_FIREBOARD', 'Fireboard');
DEFINE ('_UDDEADM_CB', 'Community Builder');
DEFINE ('_UDDEADM_DISABLED', 'Nepovoleno');
DEFINE ('_UDDEADM_ENABLED', 'Povoleno');
DEFINE ('_UDDEIM_STATUS_FLAGGED', 'Důležité');
DEFINE ('_UDDEIM_STATUS_UNFLAGGED', '');
DEFINE ('_UDDEADM_ALLOWFLAGGED_HEAD', 'Povolit message tagging');
DEFINE ('_UDDEADM_ALLOWFLAGGED_EXP', 'Povolit message tagging (uddeIM zobrazuje hvězdy v seznamu, které jsou použity pro zvýraznění důležitosti zprávy).');
DEFINE ('_UDDEADM_REVIEWUPDATE', 'Důležité: Pokud jsi upgradoval uddeIM z předchozích verzí pročti si README. Možná budeš muset přidat nebo změnit tabulky nebo pole v databázi!');
DEFINE ('_UDDEIM_ADDCCINFO', 'Přidat CC: řádek');
DEFINE ('_UDDEIM_CC', 'CC:');
DEFINE ('_UDDEADM_TRUNCATE_HEAD', 'Zkrátit text');
DEFINE ('_UDDEADM_TRUNCATE_EXP', 'Zkrátit text na 2/3 maximální délky, pokud přesáhne limit.');
DEFINE ('_UDDEIM_PLUG_INBOXENTRIES', 'Inbox entries ');
DEFINE ('_UDDEIM_PLUG_LAST', 'Poslední ');
DEFINE ('_UDDEIM_PLUG_ENTRIES', ' entries');
DEFINE ('_UDDEIM_PLUG_STATUS', 'Stav');
DEFINE ('_UDDEIM_PLUG_SENDER', 'Odesílatel');
DEFINE ('_UDDEIM_PLUG_MESSAGE', 'Zpráva');
DEFINE ('_UDDEIM_PLUG_EMPTYINBOX', 'Složka Přijaté je prázdná');
// New: 1.1
DEFINE ('_UDDEADM_NOTRASHACCESS_NOT', 'Přístup do koše není povolen.');
DEFINE ('_UDDEADM_NOTRASHACCESS_HEAD', 'Omezení přístupu ke koši');
DEFINE ('_UDDEADM_NOTRASHACCESS_EXP', 'Nastaví omezení přístupu ke koši zpráv. Zpravidla je koš přístupný pro všechny (<i>bez omezení</i>). Můžeš omezit přístup pouze pro speciální uživatele nebo adminy, takže skupina uživatelů s nižším oprávněním nebude moci obnovit smazané zprávy.');
DEFINE ('_UDDEADM_NOTRASHACCESS_0', 'bez omezení');
DEFINE ('_UDDEADM_NOTRASHACCESS_1', 'speciální uživatelé');
DEFINE ('_UDDEADM_NOTRASHACCESS_2', 'pouze admin');
DEFINE ('_UDDEADM_PUBHIDEUSERS_HEAD', 'Skrýt uživatele ze seznamu uživatelů');
DEFINE ('_UDDEADM_PUBHIDEUSERS_EXP', 'Zadej uživatelské ID, které má být skryto ve veřejném seznamem uživatelů (např. 65,66,67).');
DEFINE ('_UDDEADM_HIDEUSERS_HEAD', 'Skryj uživatele ze seznamu uživatelů');
DEFINE ('_UDDEADM_HIDEUSERS_EXP', 'Zadej uživatelské ID, které by mělo být skryto v seznamu uživatelů (např. 65,66,67). Admin vždy uvidí celý seznam.');
DEFINE ('_UDDEIM_ERRORCSRF', 'Rozpoznán CSRF útok');
DEFINE ('_UDDEADM_CSRFPROTECTION_HEAD', 'CSRF ochrana');
DEFINE ('_UDDEADM_CSRFPROTECTION_EXP', 'Chrání proti všem formám Cross-Site Request Forgery útokům. Obvykle by měla být zapnuta. Vypni ji pouze v případě vážných problémů.');
DEFINE ('_UDDEIM_CANTREPLYARCHIVE', 'Nemůžeš odpovídat na archivované zprávy.');
DEFINE ('_UDDEIM_COULDNOTRECALLPUBLIC', 'Odpovědi neregistrovaným uživatelům nemohou být obnoveny.');
DEFINE ('_UDDEADM_PUBREPLYS_HEAD', 'Povolit odpovědi');
DEFINE ('_UDDEADM_PUBREPLYS_EXP', 'Povolit přímé odpovědi na zprávy od návštěvníků.');
DEFINE ('_UDDEIM_EMN_BODY_PUBLICWITHMESSAGE',
"Ahoj %you%,\n\n%user% ti poslal následující soukromou zprávu z %site%.\n__________________\n%pmessage%");
DEFINE ('_UDDEADM_PUBNAMESTEXT', 'Ukázat reálná jména');
DEFINE ('_UDDEADM_PUBNAMESDESC', 'Ukázat reálná jména nebo uživatelská jména ve zveřejněném frontendu?');
DEFINE ('_UDDEIM_USERLIST', 'Seznam uživatelů');
DEFINE ('_UDDEIM_YOUHAVETOWAIT', 'Promiň, ale musíš počkat před odesláním nové zprávy');
DEFINE ('_UDDEADM_USERSET_LASTSENT', 'Posledně odeslané');
DEFINE ('_UDDEADM_TIMEDELAY_HEAD', 'Prodlení');
DEFINE ('_UDDEADM_TIMEDELAY_EXP', 'Čas v sekundách, které uživatel musí vyčkat než pošle další zprávu (0 znamená bez prodlení).');
DEFINE ('_UDDEADM_SECONDS', 'sekund');
DEFINE ('_UDDEIM_PUBLICSENT', 'Zpráva odeslána.');
DEFINE ('_UDDEIM_ERRORINFROMNAME', 'Chyba v jménu odesílatele');
DEFINE ('_UDDEIM_ERRORINEMAIL', 'Chyba v emailové adrese');
DEFINE ('_UDDEIM_YOURNAME', 'Tvoje jméno:');
DEFINE ('_UDDEIM_YOUREMAIL', 'Tvůj email:');
DEFINE ('_UDDEADM_VERSIONCHECK_USING', 'Používáš uddeIM ');
DEFINE ('_UDDEADM_VERSIONCHECK_LATEST', 'Tvoje verze uddeIM je aktuální.');
DEFINE ('_UDDEADM_VERSIONCHECK_CURRENT', 'Současná verze ');
DEFINE ('_UDDEADM_VERSIONCHECK_INFO', 'Informace o updatu:');
DEFINE ('_UDDEADM_VERSIONCHECK_HEAD', 'Dostupnost nové verze');
DEFINE ('_UDDEADM_VERSIONCHECK_EXP', 'Tato volba ověří, jaká je právě aktuální verze uddeIM na stránkách jeho tvůrce.');
DEFINE ('_UDDEADM_VERSIONCHECK_CHECK', 'OVĚŘIT NYNÍ');
DEFINE ('_UDDEADM_VERSIONCHECK_ERROR', 'Nemohu zjistit informaci o verzi.');
DEFINE ('_UDDEIM_NOSUCHLIST', 'Seznam kontaktů nenalezen!');
DEFINE ('_UDDEIM_LISTSLIMIT_1', 'Maximální počet příjemců přesahuje (max. ');
DEFINE ('_UDDEADM_MAXONLISTS_HEAD', 'Max. počet kontaktů v seznamu');
DEFINE ('_UDDEADM_MAXONLISTS_EXP', 'Max. počet kontaktů v seznamu kontaktů.');
DEFINE ('_UDDEIM_LISTSNOTENABLED', 'Seznamy kontaktů nejsou povoleny');
DEFINE ('_UDDEADM_ENABLELISTS_HEAD', 'Povolit seznamy kontaktů');
DEFINE ('_UDDEADM_ENABLELISTS_EXP', 'uddeIM povolí uživatelům vytvořit vlastní seznamy kontaktů. Tyto seznamy mohou být používány pro zasílání zpráv více uživatelům. Nezapomeň povolit volbu více příjemců, když chceš používat seznamy kontaktů.');
DEFINE ('_UDDEADM_ENABLELISTS_0', 'nepovoleno');
DEFINE ('_UDDEADM_ENABLELISTS_1', 'registrovaný uživatel');
DEFINE ('_UDDEADM_ENABLELISTS_2', 'speciální uživatel');
DEFINE ('_UDDEADM_ENABLELISTS_3', 'pouze admin');
DEFINE ('_UDDEIM_LISTSNEW', 'Vytvořit nový seznam kontaktů');
DEFINE ('_UDDEIM_LISTSSAVED', 'Seznam kontaktů uložen');
DEFINE ('_UDDEIM_LISTSUPDATED', 'Seznam kontaktů aktualizován');
DEFINE ('_UDDEIM_LISTSDESC', 'Popis');
DEFINE ('_UDDEIM_LISTSNAME', 'Jméno');
DEFINE ('_UDDEIM_LISTSNAMEWO', 'Jméno seznamu (bez mezer)');
DEFINE ('_UDDEIM_EDITLINK', 'upravit');
DEFINE ('_UDDEIM_LISTS', 'Seznamy kontaktů');
DEFINE ('_UDDEIM_STATUS_READ', 'přečtena');
DEFINE ('_UDDEIM_STATUS_UNREAD', 'nepřečtena');
DEFINE ('_UDDEIM_STATUS_ONLINE', 'online');
DEFINE ('_UDDEIM_STATUS_OFFLINE', 'offline');
DEFINE ('_UDDEADM_CBGALLERY_HEAD', 'Zobrazit CB galerii obrázků');
DEFINE ('_UDDEADM_CBGALLERY_EXP', 'Defaultně uddeIM pouze zobrazuje avatary nahrané uživateli. Po aktivaci tohoto nastavení, uddeIM zobrazí také obrázky avatarů z CB galerie.');
DEFINE ('_UDDEADM_UNBLOCKCB_HEAD', 'Odblokovat CB spojení');
DEFINE ('_UDDEADM_UNBLOCKCB_EXP', 'Můžeš povolit zprávy příjemcům pokud registrovaný uživatel je v seznamu příjemců v CB kontaktech (dokonce i pokud je příjemce ve skupině, která je blokována). Toto nastavení je nezávislé na individuálním blokování, každý uživatel si to může změnit, pokud to má povoleno (viz nastavení výše).');
DEFINE ('_UDDEIM_GROUPBLOCKED', 'Nemáš povoleno posíláni do této skupiny.');
DEFINE ('_UDDEIM_ONEUSERBLOCKS', 'Příjemce tě blokuje.');
DEFINE ('_UDDEADM_BLOCKGROUPS_HEAD', 'Blokované skupiny (registrovaní uživatelé)');
DEFINE ('_UDDEADM_BLOCKGROUPS_EXP', 'Skupiny, do kterých registrovaní uživatelé nemohou zasílat zprávy. Pouze pro registrované uživatele. Speciální uživatelé a admin nejsou omezeni tímto nastavením. Toto nastavení je nezávislé na individuálním blokování, každý uživatel si to může změnit, pokud to má povoleno (viz nastavení výše).');
DEFINE ('_UDDEADM_PUBBLOCKGROUPS_HEAD', 'Blokované skupiny (návštěvníci)');
DEFINE ('_UDDEADM_PUBBLOCKGROUPS_EXP', 'Skupiny, do kterých návštěvníci nemohou zasílat zprávy. Toto nastavení je nezávislé na individuálním blokování, každý uživatel si to může změnit, pokud to má povoleno (viz nastavení výše). Pokud zablokuješ skupiny, uživatelé v této skupině neuvidí volbu Povolit zveřejnit ve frontendu v nastavení jejich profilu.');
DEFINE ('_UDDEADM_BLOCKGROUPS_1', 'Návštěvníci');
DEFINE ('_UDDEADM_BLOCKGROUPS_2', 'CB spojenín');
DEFINE ('_UDDEADM_BLOCKGROUPS_18', 'Registrovaní uživatelé');
DEFINE ('_UDDEADM_BLOCKGROUPS_19', 'Autoři');
DEFINE ('_UDDEADM_BLOCKGROUPS_20', 'Editoři');
DEFINE ('_UDDEADM_BLOCKGROUPS_21', 'Publisher');
DEFINE ('_UDDEADM_BLOCKGROUPS_23', 'Manažer');
DEFINE ('_UDDEADM_BLOCKGROUPS_24', 'Admin');
DEFINE ('_UDDEADM_BLOCKGROUPS_25', 'SuperAdmin');
DEFINE ('_UDDEIM_NOPUBLICMSG', 'Uživatelé akceptují zprávy pouze od registrovaných uživatelů.');
DEFINE ('_UDDEADM_PUBHIDEALLUSERS_HEAD', 'Skrýt před zveřejněním v seznamu "Všichni uživatelé"');
DEFINE ('_UDDEADM_PUBHIDEALLUSERS_EXP', 'Můžeš skrýt určité skupiny před zveřejněním v seznamem "Všichni uživatelé". Pozn: skryje pouze jména, uživatelé mohou dále dostávat zprávy. Uživatelé, kteří nejsou přístupni v Public Frontendu nebudou zahrnuti v tomto seznamu.');
DEFINE ('_UDDEADM_HIDEALLUSERS_HEAD', 'Skrýt před seznamem "Všichni uživatelé"');
DEFINE ('_UDDEADM_HIDEALLUSERS_EXP', 'Můžeš skrýt určité skupiny před seznamem "Všichni uživatelé". Pozn: skryje pouze jména, uživatelé mohou dále dostávat zprávy');
DEFINE ('_UDDEADM_HIDEALLUSERS_0', 'nikoho');
DEFINE ('_UDDEADM_HIDEALLUSERS_1', 'pouze superadmin');
DEFINE ('_UDDEADM_HIDEALLUSERS_2', 'pouze admin');
DEFINE ('_UDDEADM_HIDEALLUSERS_3', 'speciální uživatelé');
DEFINE ('_UDDEADM_PUBLIC', 'Veřejné');
DEFINE ('_UDDEADM_PUBMODESHOWALLUSERS_HEAD', 'Možnost řádku "Všichni uživatelé"');
DEFINE ('_UDDEADM_PUBMODESHOWALLUSERS_EXP', 'Zvol, jestli by řádek "Všichni uživatelé" měl být v Public Frontendu potlačen, zobrazen nebo jestli vždy všichni uživatelé mají být <br />zobrazeni.');
DEFINE ('_UDDEADM_USERSET_PUBLIC', 'PublicF');
DEFINE ('_UDDEADM_USERSET_SELPUBLIC', '- PublicF -');
DEFINE ('_UDDEIM_OPTIONS_F', 'Povolit návštěvníkům posílat zprávy');
DEFINE ('_UDDEIM_MSGLIMITREACHED', 'Limit počtu zpráv dosažen!');
DEFINE ('_UDDEIM_PUBLICUSER', 'Návštěvník');
DEFINE ('_UDDEIM_DELETEDUSER', 'Uživatel smazán');
DEFINE ('_UDDEADM_CAPTCHALEN_HEAD', 'Délka Captcha');
DEFINE ('_UDDEADM_CAPTCHALEN_EXP', 'Určuje počet znaků, které musí uživatel zadat.');
DEFINE ('_UDDEADM_USECAPTCHA_HEAD', 'Captcha spam ochrana');
DEFINE ('_UDDEADM_USECAPTCHA_EXP', 'Specifikuj, kdo má používat Captcha když odesílá zprávu');
DEFINE ('_UDDEADM_CAPTCHAF0', 'nepovoleno');
DEFINE ('_UDDEADM_CAPTCHAF1', 'pouze návštěvníci');
DEFINE ('_UDDEADM_CAPTCHAF2', 'návštěvníci a registrovaní uživatelé');
DEFINE ('_UDDEADM_CAPTCHAF3', 'návštěvníci, registrovaní, speciální uživatelé');
DEFINE ('_UDDEADM_CAPTCHAF4', 'všichni uživatelé (včetně admina)');
DEFINE ('_UDDEADM_PUBFRONTEND_HEAD', 'Povolit zveřejnění ve frontendu');
DEFINE ('_UDDEADM_PUBFRONTEND_EXP', 'Když povolíš zveřejnění, návštěvníci mohou posílat zprávy registrovaným uživatelům (ti si však mohou specifikovat v osobním nastavení, jestli si tuto funkci povolí).');
DEFINE ('_UDDEADM_PUBFRONTENDDEF_HEAD', 'Zveřejnit ve frontendu jako základ');
DEFINE ('_UDDEADM_PUBFRONTENDDEF_EXP', 'Toto je základní nastavení, jestli mohou návštěvníci posílat zprávy registovaným uživatelům.');
DEFINE ('_UDDEADM_PUBDEF0', 'nepovoleno');
DEFINE ('_UDDEADM_PUBDEF1', 'povoleno');
DEFINE ('_UDDEIM_WRONGCAPTCHA', 'Špatný bezpečnostní kód');
// New: 1.0
DEFINE ('_UDDEADM_NONEORUNKNOWN', 'nikdo nebo neznámý');
DEFINE ('_UDDEADM_DONATE', 'Pokud se ti uddeIM líbí a chceš jej podpořit, věnuj prosím tvůrcům malý obnos (dar).');
// New: 1.0rc2
DEFINE ('_UDDEADM_BACKUPRESTORE_DATE', 'Nastavení nalezená v databázi: ');
DEFINE ('_UDDEADM_BACKUPRESTORE_HEAD', 'Záloha a obnova nastavení');
DEFINE ('_UDDEADM_BACKUPRESTORE_EXP', 'Zazálohuje nastavení do databáze a provede obnovu, pokud bude potřeba. Je to užitečné, když provádíš update uddeIM, nebo když chceš uložit určitá nastavení kvůli testování.');
DEFINE ('_UDDEADM_BACKUPRESTORE_BACKUP', 'ZÁLOHA');
DEFINE ('_UDDEADM_BACKUPRESTORE_RESTORE', 'OBNOVA');
DEFINE ('_UDDEADM_CANCEL', 'Storno');
// New: 1.0rc1
DEFINE ('_UDDEADM_LANGUAGECHARSET_HEAD', 'Nastavená znaková sada');
DEFINE ('_UDDEADM_LANGUAGECHARSET_EXP', 'Obvykle <b>základní</b> (ISO-8859-1) je správná pro Joomlu 1.0 a <b>UTF-8</b> pro Joomlu 1.5.');
DEFINE ('_UDDEADM_LANGUAGECHARSET_UTF8', 'UTF-8');
DEFINE ('_UDDEADM_LANGUAGECHARSET_DEFAULT', 'defaultní');
DEFINE ('_UDDEIM_READ_INFO_1', 'Přečtené zprávy zůstanou v Přijatých max. ');
DEFINE ('_UDDEIM_READ_INFO_2', ' dnů před automatickým smazáním.');
DEFINE ('_UDDEIM_UNREAD_INFO_1', 'Nepřečetné zprávy zůstanou v Přijatých max. ');
DEFINE ('_UDDEIM_UNREAD_INFO_2', ' dnů před automatickým smazáním.');
DEFINE ('_UDDEIM_SENT_INFO_1', 'Odeslané zprávy zůstanou v Odeslaných max. ');
DEFINE ('_UDDEIM_SENT_INFO_2', ' dnů před automatickým smazáním.');
DEFINE ('_UDDEADM_DELETEREADAFTERNOTE_HEAD', 'Zobrazit upozornění pro přečtené zprávy');
DEFINE ('_UDDEADM_DELETEREADAFTERNOTE_EXP', 'Zobrazí upozornění pro přečtené zprávy <i>"Přečtené zprávy budou smazány po n dnech"</i>');
DEFINE ('_UDDEADM_DELETEUNREADAFTERNOTE_HEAD', 'Zobrazit upozornění pro nepřečtené zprávy');
DEFINE ('_UDDEADM_DELETEUNREADAFTERNOTE_EXP', 'Zobrazí upozornění pro nepřečtené zprávy <i>"Nepřečtené zprávy budou smazány po n dnech"</i>');
DEFINE ('_UDDEADM_DELETESENTAFTERNOTE_HEAD', 'Zobrazit upozornění pro odeslané zprávy v Odeslaných');
DEFINE ('_UDDEADM_DELETESENTAFTERNOTE_EXP', 'Zobrazí upozornění <i>"Odeslané zprávy budou smazány po n dnech"</i>');
DEFINE ('_UDDEADM_DELETETRASHAFTERNOTE_HEAD', 'Zobrazit upozornění pro smazané zprávy');
DEFINE ('_UDDEADM_DELETETRASHAFTERNOTE_EXP', 'Zobrazí upozornění <i>"Smazané zprávy budou odstraněny po n dnech"</i>');
DEFINE ('_UDDEADM_DELETESENTAFTER_HEAD', 'Nesmazat odeslané zprávy (dnů)');
DEFINE ('_UDDEADM_DELETESENTAFTER_EXP', 'Zadej počet dnů, za které budou <b>odeslané</b> zprávy automaticky smazány z Odeslaných.');
DEFINE ('_UDDEIM_SEND_TOALLSPECIAL', 'zaslat všem speciálním uživatelům');
DEFINE ('_UDDEIM_SYSGM_WILLSENDTOALLSPECIAL', 'Zpráva pro <b>všechny speciální uživatele</b>');
DEFINE ('_UDDEADM_USERSET_SELUSERNAME', '- Uživ.jméno -');
DEFINE ('_UDDEADM_USERSET_SELNAME', '- Jméno -');
DEFINE ('_UDDEADM_USERSET_EDITSETTINGS', 'Upravit uživatelské nastavení');
DEFINE ('_UDDEADM_USERSET_EXISTING', 'existuje');
DEFINE ('_UDDEADM_USERSET_NONEXISTING', 'neexistuje');
DEFINE ('_UDDEADM_USERSET_SELENTRY', '- Entry -');
DEFINE ('_UDDEADM_USERSET_SELNOTIFICATION', '- Oznámení -');
DEFINE ('_UDDEADM_USERSET_SELPOPUP', '- Upozornění -');
DEFINE ('_UDDEADM_USERSET_USERNAME', 'Uživ.jméno');
DEFINE ('_UDDEADM_USERSET_NAME', 'Jméno');
DEFINE ('_UDDEADM_USERSET_NOTIFICATION', 'Oznámení');
DEFINE ('_UDDEADM_USERSET_POPUP', 'Upozornění');
DEFINE ('_UDDEADM_USERSET_LASTACCESS', 'Poslední přístup');
DEFINE ('_UDDEADM_USERSET_NO', 'Ne');
DEFINE ('_UDDEADM_USERSET_YES', 'Ano');
DEFINE ('_UDDEADM_USERSET_UNKNOWN', 'neznámo');
DEFINE ('_UDDEADM_USERSET_WHENOFFLINEEXCEPT', 'Když je offline (kromě odpovědí)');
DEFINE ('_UDDEADM_USERSET_ALWAYSEXCEPT', 'Vždy (kromě odpovědí)');
DEFINE ('_UDDEADM_USERSET_WHENOFFLINE', 'Když je offline');
DEFINE ('_UDDEADM_USERSET_ALWAYS', 'Vždy');
DEFINE ('_UDDEADM_USERSET_NONOTIFICATION', 'Bez oznámení');
DEFINE ('_UDDEADM_WELCOMEMSG', "Vítej ve uddeIM!\n\nInstalace uddeIM skončila úspěšně.\n\nVyzkoušej si prohlédnout tuto zprávu s rozlišnými šablonami. Nastavovat program lze v administračním backendu uddeIM.\n\nuddeIM je projekt ve vývoji. Pokud najdeš chyby nebo slabiny, napiš mi je, abychom program uddeIM společně vylepšili.\n\nHodně štěstí a zábavy!");
DEFINE ('_UDDEADM_UDDEINSTCOMPLETE', 'uddeIM instalace kompletní.');
DEFINE ('_UDDEADM_REVIEWSETTINGS', 'Pokračuj do administračního backendu a znovunačti nastavení.');
DEFINE ('_UDDEADM_REVIEWLANG', 'Jestli provozuješ CMS se znakovou sadou jinou než ISO 8859-1 ujisti se, že nastavení je správné.');
DEFINE ('_UDDEADM_REVIEWEMAILSTOP', 'Po instalaci jsou všechny uddeIM e-maily (e-mailové upozorňování, připomínací e-maily) zakázány, takže žádné e-maily nebudou zasílány po dobu testování. Nezapomeň zakázat "Zastavit e-mail" v backendu až skončíš s testováním.');
DEFINE ('_UDDEADM_MAXRECIPIENTS_HEAD', 'Max. počet příjemců');
DEFINE ('_UDDEADM_MAXRECIPIENTS_EXP', 'Max. počet příjemců, kterým je možno poslat jednu společnou zprávu (0=bez omezení)');
DEFINE ('_UDDEIM_TOOMANYRECIPIENTS', 'příliš mnoho příjemců');
DEFINE ('_UDDEIM_STOPPEDEMAIL', 'Posílání e-mailů nepovoleno.');
DEFINE ('_UDDEADM_SEARCHINSTRING_HEAD', 'Prohledávání uvnitř textu');
DEFINE ('_UDDEADM_SEARCHINSTRING_EXP', 'Automatické doplňování prohledává uvnitř textu (jinak prohledává pouze začátek)');
DEFINE ('_UDDEADM_MODESHOWALLUSERS_HEAD', 'Možnost řádku "Všichni uživatelé"');
DEFINE ('_UDDEADM_MODESHOWALLUSERS_EXP', 'Urči, jestli řádek "Všichni uživatelé" by měl být potlačen, zobrazen, nebo jestli všichni uživatelé mají být zobrazeni.');
DEFINE ('_UDDEADM_MODESHOWALLUSERS_0', 'Potlačit řádek "Všichni uživatelé"');
DEFINE ('_UDDEADM_MODESHOWALLUSERS_1', 'Zobraz řádek "Všichni uživatelé"');
DEFINE ('_UDDEADM_MODESHOWALLUSERS_2', 'Vždy ukázat všechny uživatele');
DEFINE ('_UDDEADM_CONFIGNOTWRITEABLE', 'Konfigurace není přepisovatelná:');
DEFINE ('_UDDEADM_CONFIGWRITEABLE', 'Konfigurace je přepisovatelná:');
DEFINE ('_UDDEIM_FORWARDLINK', 'Přeposlat');
DEFINE ('_UDDEIM_RECIPIENTFOUND', 'Ppříjemce nalezen');
DEFINE ('_UDDEIM_RECIPIENTSFOUND', 'Příjemce nenalezen');
DEFINE ('_UDDEADM_MAILSYSTEM_MOSMAIL', 'mosMail');
DEFINE ('_UDDEADM_MAILSYSTEM_PHPMAIL', 'php mail (default)');
DEFINE ('_UDDEADM_MAILSYSTEM_HEAD', 'Mailsystém');
DEFINE ('_UDDEADM_MAILSYSTEM_EXP', 'Vyber mailsystém, který bude uddeIM používat pro zasílání upozornění.');
DEFINE ('_UDDEADM_SHOWGROUPS_HEAD', 'Ukázat skupiny Joomla');
DEFINE ('_UDDEADM_SHOWGROUPS_EXP', 'Zobrazit Joomla skupiny v general seznamu zpráv.');
DEFINE ('_UDDEADM_ALLOWFORWARDS_HEAD', 'Přeposílání zpráv');
DEFINE ('_UDDEADM_ALLOWFORWARDS_EXP', 'Povolit přeposílání zpráv.');
DEFINE ('_UDDEIM_FWDFROM', 'Původní zpráva od');
DEFINE ('_UDDEIM_FWDTO', 'k');
// New: 0.9+
DEFINE ('_UDDEIM_UNARCHIVE', 'Vyjmout zprávu z archivu');
DEFINE ('_UDDEIM_CANTUNARCHIVE', 'Nelze vyjmout zprávu z archivu');
DEFINE ('_UDDEADM_ALLOWMULTIPLERECIPIENTS_HEAD', 'Povolit více příjemců');
DEFINE ('_UDDEADM_ALLOWMULTIPLERECIPIENTS_EXP', 'Povolit více příjemců jedné zprávy (odděleni čárkou).');
DEFINE ('_UDDEIM_CHARSLEFT', 'znaků zbývá');
DEFINE ('_UDDEADM_SHOWTEXTCOUNTER_HEAD', 'Ukázat počítadlo znaků');
DEFINE ('_UDDEADM_SHOWTEXTCOUNTER_EXP', 'Zobraz počítadlo textu, které zobrazí, kolik znaků ještě zbývá.');
DEFINE ('_UDDEIM_CLEAR', 'Clear');
DEFINE ('_UDDEADM_ALLOWMULTIPLEUSER_HEAD', 'Přidat vybrané uživatele mezi příjemce');
DEFINE ('_UDDEADM_ALLOWMULTIPLEUSER_EXP', 'Povolí více příjemců ze seznamu "Všichni uživatelé.');
DEFINE ('_UDDEADM_CBALLOWMULTIPLEUSER_HEAD', 'Přidat vybraná spojení mezi příjemce');
DEFINE ('_UDDEADM_CBALLOWMULTIPLEUSER_EXP', 'Povolí výběr z více příjemců ze seznamu "CB spojení".');
DEFINE ('_UDDEADM_PMSFOUND', 'PMS nalezen: ');
DEFINE ('_UDDEIM_ENTERNAME', 'Zadej jméno');
DEFINE ('_UDDEADM_USEAUTOCOMPLETE_HEAD', 'Použít automatické doplňování');
DEFINE ('_UDDEADM_USEAUTOCOMPLETE_EXP', 'Použít automatické doplňování jmen příjemců.');
DEFINE ('_UDDEADM_OBFUSCATING_HEAD', 'Klíč pro šifrování - obfuscate message');
DEFINE ('_UDDEADM_OBFUSCATING_EXP', 'Zadej klíč, který je použit pro šifrování zprávy. Neměň tuto hodnotu, pokud již byla volba <b>obfuscate message</b> povolena!');
DEFINE ('_UDDEADM_CFGFILE_NOTFOUND', 'Nalezen vadný konfigurační soubor!');
DEFINE ('_UDDEADM_CFGFILE_FOUND', 'Nalezená verze:');
DEFINE ('_UDDEADM_CFGFILE_EXPECTED', 'Očekávaná verze:');
DEFINE ('_UDDEADM_CFGFILE_CONVERTING', 'Konvertuji konfiguraci...');
DEFINE ('_UDDEADM_CFGFILE_DONE', 'Hotovo!');
DEFINE ('_UDDEADM_CFGFILE_WRITEFAILED', 'Kritické chyba: Selhal zápis do konfiguračního souboru:');
// New: 0.8+
DEFINE ('_UDDEIM_ENCRYPTDOWN', 'Kódovaná zpráva! - Download není možný!');
DEFINE ('_UDDEIM_WRONGPASSDOWN', 'Špatné heslo! - Download není možný!');
DEFINE ('_UDDEIM_WRONGPW', 'Špatné heslo! - Prosím, kontaktuj správce databáze!');
DEFINE ('_UDDEIM_WRONGPASS', 'Špatné heslo!');
DEFINE ('_UDDEADM_MAINTENANCE_D1', 'Špatné datum smazání (přijaté/smazané): ');
DEFINE ('_UDDEADM_MAINTENANCE_D2', 'Opravování špatného data smazání');
DEFINE ('_UDDEIM_TODP', 'Komu: ');
DEFINE ('_UDDEADM_MAINTENANCE_PRUNE', 'Smazat zprávy nyní');
DEFINE ('_UDDEADM_SHOWACTIONICONS_HEAD', 'Zobrazit ikony možností');
DEFINE ('_UDDEADM_SHOWACTIONICONS_EXP', 'Když nastavíš <b>ano</b>, řádky možností budou zobrazeny s ikonami.');
DEFINE ('_UDDEIM_UNCHECKALL', 'Odebrat vše');
DEFINE ('_UDDEIM_CHECKALL', 'Vybrat vše');
DEFINE ('_UDDEADM_SHOWBOTTOMICONS_HEAD', 'Zobrazit ikony vespodu');
DEFINE ('_UDDEADM_SHOWBOTTOMICONS_EXP', 'Když nastavíš <b>ano</b>, spodní řádky budou zobrazeny s ikonami.');
DEFINE ('_UDDEADM_ANIMATED_HEAD', 'Používat animované smajlíky');
DEFINE ('_UDDEADM_ANIMATED_EXP', 'Používat animované smajlíky místo statických.');
DEFINE ('_UDDEADM_ANIMATEDEX_HEAD', 'Více animovaných smajlíků');
DEFINE ('_UDDEADM_ANIMATEDEX_EXP', 'Ukázat více animovaných smajlíků.');
DEFINE ('_UDDEIM_PASSWORDREQ', 'Kódovaná zpráva - Vyžadováno heslo');
DEFINE ('_UDDEIM_PASSWORD', '<b>Vyžadováno heslo</b>');
DEFINE ('_UDDEIM_PASSWORDBOX', 'Heslo');
DEFINE ('_UDDEIM_ENCRYPTIONTEXT', ' (encryption text)');
DEFINE ('_UDDEIM_DECRYPTIONTEXT', ' (decryption text)');
DEFINE ('_UDDEIM_MORE', 'MORE');
// uddeIM Module
DEFINE ('_UDDEMODULE_PRIVATEMESSAGES', 'Soukromé zprávy');
DEFINE ('_UDDEMODULE_NONEW', 'žádné nové zprávy');
DEFINE ('_UDDEMODULE_NEWMESSAGES', 'Nové zprávy: ');
DEFINE ('_UDDEMODULE_MESSAGE', 'zpráva');
DEFINE ('_UDDEMODULE_MESSAGES', 'nových zpráv');
DEFINE ('_UDDEMODULE_YOUHAVE', 'Máš');
DEFINE ('_UDDEMODULE_HELLO', 'Ahoj');
DEFINE ('_UDDEMODULE_EXPRESSMESSAGE', 'Expresní zpráva');
// New: 0.7+
DEFINE ('_UDDEADM_USEENCRYPTION', 'Použít kódování');
DEFINE ('_UDDEADM_USEENCRYPTIONDESC', 'Kódovat uložené zprávy');
DEFINE ('_UDDEADM_CRYPT0', 'Žádné');
DEFINE ('_UDDEADM_CRYPT1', 'Obfuscate message');
DEFINE ('_UDDEADM_CRYPT2', 'Kódovat zprávy');
DEFINE ('_UDDEADM_NOTIFYDEFAULT_HEAD', 'Defaultní e-mailové oznamování');
DEFINE ('_UDDEADM_NOTIFYDEFAULT_EXP', 'Defaultní hodnota pro e-mailové oznamování (pro uživatele, kteří ještě nezměnili svoje preference).');
DEFINE ('_UDDEADM_NOTIFYDEF_0', 'Žádné upozorňování');
DEFINE ('_UDDEADM_NOTIFYDEF_1', 'Vždy');
DEFINE ('_UDDEADM_NOTIFYDEF_2', 'Upozornění když je offline');
DEFINE ('_UDDEADM_SUPPRESSALLUSERS_HEAD', 'Potlačit řádek "Všichni uživatelé"');
DEFINE ('_UDDEADM_SUPPRESSALLUSERS_EXP', 'Potlačí řádek "Všichni uživatelé" v okně nové zprávy (užitečné v případě velkého množství registrovaných uživatelů).');
DEFINE ('_UDDEADM_POPUP_HEAD','Oznámení upozornění - PopUp');
DEFINE ('_UDDEADM_POPUP_EXP','Zobrazí upozornění na nově příchozí zprávu (mod_uddeim nebo patched mod_cblogin je vyžadován)');
DEFINE ('_UDDEIM_OPTIONS', 'Další nastavení');
DEFINE ('_UDDEIM_OPTIONS_EXP', 'Zde si můžeš nakonfigurovat další nastavení (dovolil-li to administrátor).');
DEFINE ('_UDDEIM_OPTIONS_P', 'Ukázat upozornění, když přijde nová zpráva');
DEFINE ('_UDDEADM_POPUPDEFAULT_HEAD', 'Oznámení upozornění jako defaultní - PopUp');
DEFINE ('_UDDEADM_POPUPDEFAULT_EXP', 'Povolí oznámení upozornění na nově příchozí zprávu jako defaultní (pro uživatele, kteří si ještě nezměnili svoje nastavení).');
DEFINE ('_UDDEADM_MAINTENANCE', 'Údržba');
DEFINE ('_UDDEADM_MAINTENANCE_HEAD', 'Údržba databáze');
DEFINE ('_UDDEADM_MAINTENANCE_CHECK', 'TEST');
DEFINE ('_UDDEADM_MAINTENANCE_TRASH', 'OPRAVA');
DEFINE ('_UDDEADM_MAINTENANCE_EXP', "Pokud je uživatel smazán z databáze, jeho zprávy jsou obvykle uloženy v databázi. Tato funkce ověří, jestli je potřebné smazat zbytky zpráv a ty je můžeš vymazat, jestli to bude potřeba.Rovněž ověří databázi na chyby, které byly opraveny.");
DEFINE ('_UDDEADM_MAINTENANCE_MC1', "Testování...<br />");
DEFINE ('_UDDEADM_MAINTENANCE_MC2', "<i>#nnn (Uživatelské jméno): [Přijaté|Přijaté smazány|Odeslané|Odeslané smazány]</i><br />");
DEFINE ('_UDDEADM_MAINTENANCE_MC3', "<i>Přijaté: zprávy uloženy v uživatelských Přijatých</i><br />");
DEFINE ('_UDDEADM_MAINTENANCE_MC4', "<i>Přijaté smazány: zprávy smazány z uživatelských Přijatých, ale stále jsou v některých Odeslaných</i><br />");
DEFINE ('_UDDEADM_MAINTENANCE_MC5', "<i>Odeslané: zprávy uloženy v uživatelských Odeslaných</i><br />");
DEFINE ('_UDDEADM_MAINTENANCE_MC6', "<i>Odeslané smazány: zprávy smazány z uživatelských Odeslaných, ale stále jsou v některých Přijatých</i><br />");
DEFINE ('_UDDEADM_MAINTENANCE_MT1', "Mazání...<br />");
DEFINE ('_UDDEADM_MAINTENANCE_NOTFOUND', "nenalezeno (od/komu/nastavení/zablokoval/blokováno):");
DEFINE ('_UDDEADM_MAINTENANCE_MT2', "smazání všech preferencí uživatelů");
DEFINE ('_UDDEADM_MAINTENANCE_MT3', "smazání blokování uživatelů");
DEFINE ('_UDDEADM_MAINTENANCE_MT4', "vymazat všechny zprávy odeslané smazaným uživatelům v Odeslaných odesílatele a v Přijatých smazaných uživatelů");
DEFINE ('_UDDEADM_MAINTENANCE_MT5', "vymazat všechny zprávy odeslané smazaným uživatelům v jejich Odeslaných a v Přijatých příjemců");
DEFINE ('_UDDEADM_MAINTENANCE_NOTHINGTODO', '<b>Vše v pořádku</b><br />');
DEFINE ('_UDDEADM_MAINTENANCE_JOBTODO', '<b>Provedení OPRAVY v Údržbě kompatibility na kartě Údržba je nezbytná!</b><br />');
// New: 0.6+
DEFINE ('_UDDEADM_NAMESTEXT', 'Ukázat reálná jména');
DEFINE ('_UDDEADM_NAMESDESC', 'Ukázat reálná jména nebo uživatelská jména?');
DEFINE ('_UDDEADM_REALNAMES', 'Reálná jména');
DEFINE ('_UDDEADM_USERNAMES', 'Uživatelská jména');
DEFINE ('_UDDEADM_CONLISTBOX', 'CB Kontakty listbox');
DEFINE ('_UDDEADM_CONLISTBOXDESC', 'Zobrazit moje kontakty jako listbox nebo tabulku?');
DEFINE ('_UDDEADM_LISTBOX', 'Listbox');
DEFINE ('_UDDEADM_TABLE', 'Tabulka');
DEFINE ('_UDDEIM_TRASHCAN_INFO', 'Zpráva bude v koši ještě 24 hodin, potom bude vymazána. Zde vidíš pouze pár prvních slov ze zprávy. Pokud si chceš přečíst celou zprávu, musíš ji nedříve obnovit.');
DEFINE ('_UDDEIM_TRASHCAN_INFO_1', 'Zpráva bude v koši ještě ');
DEFINE ('_UDDEIM_TRASHCAN_INFO_2', ' hodin, potom bude vymazána. Zde vidíš pouze pár prvních slov ze zprávy. Pokud si chceš přečíst celou zprávu, musíš ji nedříve obnovit.');
DEFINE ('_UDDEIM_RECALLEDMESSAGE_INFO', 'Zpráva byla obnovena. Může být znovu upravena a poslána.');
DEFINE ('_UDDEIM_COULDNOTRECALL', 'Zpráva nemohla být obnovena (pravděpodobně už byla přečtena, nebo smazána.)');
DEFINE ('_UDDEIM_CANTRESTORE', 'Obnovení zprávy selhalo. (Mohla být v koši příliš dlouho a mezitím byla smazána.)');
DEFINE ('_UDDEIM_COULDNOTRESTORE', 'Obnovení zprávy selhalo.');
DEFINE ('_UDDEIM_DONTSEND', 'Neodesílat');
DEFINE ('_UDDEIM_SENDAGAIN', 'Znovu odeslat');
DEFINE ('_UDDEIM_NOTLOGGEDIN', 'Nejsi přihlášen.');
DEFINE ('_UDDEIM_NOMESSAGES_INBOX', '<b>Nejsou zde žádné zprávy.</b>');
DEFINE ('_UDDEIM_NOMESSAGES_OUTBOX', '<b>Nejsou zde žádné zprávy.</b>');
DEFINE ('_UDDEIM_NOMESSAGES_TRASHCAN', '<b>Nejsou zde žádné zprávy.</b>');
DEFINE ('_UDDEIM_INBOX', 'Přijaté');
DEFINE ('_UDDEIM_OUTBOX', 'Odeslané');
DEFINE ('_UDDEIM_TRASHCAN', 'Koš');
DEFINE ('_UDDEIM_CREATE', 'Nová zpráva');
DEFINE ('_UDDEIM_UDDEIM', 'Soukromé zprávy');
DEFINE ('_UDDEIM_READSTATUS', 'Read');
DEFINE ('_UDDEIM_FROM', 'Od');
DEFINE ('_UDDEIM_FROM_SMALL', 'od');
DEFINE ('_UDDEIM_TO', 'Komu');
DEFINE ('_UDDEIM_TO_SMALL', 'komu');
DEFINE ('_UDDEIM_OUTBOX_WARNING', 'V Odeslaných jsou stále zprávy, které jsi odeslal. Lze je obnovit, pokud ještě nebyly přečteny. Pokud to provedeš, nebudou už moci být přečteny příjemcem. ');
// changed in 0.4
DEFINE ('_UDDEIM_RECALL', 'Obnovit');
DEFINE ('_UDDEIM_RECALLTHISMESSAGE', 'Obnovit zprávu');
DEFINE ('_UDDEIM_RESTORE', 'Obnovit');
DEFINE ('_UDDEIM_MESSAGE', 'Zpráva');
DEFINE ('_UDDEIM_DATE', 'Datum');
DEFINE ('_UDDEIM_DELETED', 'Smazáno');
DEFINE ('_UDDEIM_DELETE', 'Smazat');
DEFINE ('_UDDEIM_ONLINEPIC', 'images/icon_online.gif');
DEFINE ('_UDDEIM_OFFLINEPIC', 'images/icon_offline.gif');
DEFINE ('_UDDEIM_DELETELINK', 'Smazat');
DEFINE ('_UDDEIM_MESSAGENOACCESS', 'Zpráva nemůže být zobrazena. <br />Pravděpodobné důvody:<ul><li>Nemáš oprávnění ji číst.</li><li>Zpráva byla smazána.</li></ul>');
DEFINE ('_UDDEIM_YOUMOVEDTOTRASH', '<b>Přesunul jsi zprávu do koše.</b>');
DEFINE ('_UDDEIM_MESSAGEFROM', 'Zpráva od ');
DEFINE ('_UDDEIM_MESSAGETO', 'Zpráva ode mně - pro ');
DEFINE ('_UDDEIM_REPLY', 'Odpovědět');
DEFINE ('_UDDEIM_SUBMIT', 'Odeslat');
DEFINE ('_UDDEIM_DELETEREPLIED', 'Přesunout originální zprávu do koše po odpovědi');
DEFINE ('_UDDEIM_NOID', 'Chyba: Příjemce nenalezen. Zpráva nebyla odeslána.');
DEFINE ('_UDDEIM_NOMESSAGE', 'Chyba: Zpráva neobsahuje text! Zpráva nebyl odeslána.');
DEFINE ('_UDDEIM_MESSAGE_REPLIEDTO', 'Odpověď odeslána');
DEFINE ('_UDDEIM_MESSAGE_SENT', 'Zpráva odeslána');
DEFINE ('_UDDEIM_MOVEDTOTRASH', ' a originál zprávy přesunut do koše');
DEFINE ('_UDDEIM_NOSUCHUSER', 'Neexistuje uživatel s tímto uživatelským jménem!');
DEFINE ('_UDDEIM_NOTTOYOURSELF', 'Není možné posílat zprávy sám sobě!');
DEFINE ('_UDDEIM_VIOLATION', '<b>Přístup odmítnut!</b> Nemáš oprávnění pro tuto volbu!');
DEFINE ('_UDDEIM_PRUNELINK', 'Pouze Admin: Vyčistit');
// Admin
DEFINE ('_UDDEADM_SETTINGS', 'uddeIM Administrace');
DEFINE ('_UDDEADM_GENERAL', 'Základní');
DEFINE ('_UDDEADM_ABOUT', 'O programu uddeIM');
DEFINE ('_UDDEADM_DATESETTINGS', 'Datum/čas');
DEFINE ('_UDDEADM_PICSETTINGS', 'Ikony');
DEFINE ('_UDDEADM_DELETEREADAFTER_HEAD', 'Přečtené zprávy uložit (dnů)');
DEFINE ('_UDDEADM_DELETEUNREADAFTER_HEAD', 'Nepřečtené zprávy uložit (dnů)');
DEFINE ('_UDDEADM_DELETETRASHAFTER_HEAD', 'Zprávy uložit v koši (dnů)');
DEFINE ('_UDDEADM_DAYS', 'dny(ů)');
DEFINE ('_UDDEADM_DELETEREADAFTER_EXP', 'Zadej počet dnů po kterých budou <b>přečtené</b> zprávy automaticky smazány z Přijatých. Pokud nechceš mazat zprávy automaticky, zadej velmi vysoké číslo (např. 36524 dnů je ekvivalent pro století). Uvědom si ale, že se databáze může brzo naplnit, pokud budeš ukládat všechny zprávy.');
DEFINE ('_UDDEADM_DELETEUNREADAFTER_EXP', 'Zadej počet dnů po kterých budou zprávy které <b>ještě nebyly přečteny</b> příjemcem, smazány.');
DEFINE ('_UDDEADM_DELETETRASHAFTER_EXP', 'Zadej počet dnů po kterých budou zprávy smazány z koše. Nutná je desítková hodnota, to znamená, že např. pro smazání zpráv z koše po 3 hodinách, zadej jako hodnotu 0.125.');
DEFINE ('_UDDEADM_DATEFORMAT_HEAD', 'Formát zobrazovaného data');
DEFINE ('_UDDEADM_DATEFORMAT_EXP', 'Zvol formát data/času, který bude zobrazován. Měsíc bude zvolen podle místního nastavení jazyka Joomly (pokud správný jazykový soubor v uddeIM existuje).');
DEFINE ('_UDDEADM_LDATEFORMAT_HEAD', 'Rozšířený formát data');
DEFINE ('_UDDEADM_LDATEFORMAT_EXP', 'Pro zobrazování zpráv je více místa pro zobrazení data/času. Vybraný formát bude zobrazen při otevření zprávy. Pro jména dnů a měsíců bude zvolen název dle místního nastavení jazyka Joomly (pokud správný jazykový soubor v uddeIM existuje).');
DEFINE ('_UDDEADM_ADMINIGNITIONONLY_HEAD', 'Deletions invoked');
DEFINE ('_UDDEADM_ADMINIGNITIONONLY_YES', 'pouze admin');
DEFINE ('_UDDEADM_ADMINIGNITIONONLY_NO', 'pouze uživatel');
DEFINE ('_UDDEADM_ADMINIGNITIONONLY_MANUALLY', 'manuálně');
DEFINE ('_UDDEADM_ADMINIGNITIONONLY_EXP', 'Automatické mazání velmi zatěžuje server. Pokud vybereš <b>pouze admin</b> automatické smazání je vyvoláno pokud admin zatrhne tento inbox. Vyber tuto volbu, pokud admin zatrhuje tento box pravidelně. Pro malé, nebo zřídka administrované weby lze zvolit <b>pouze uživatel</b>.');
// above string changed in 0.4
DEFINE ('_UDDEADM_SAVESETTINGS', 'Uložit nastavení');
DEFINE ('_UDDEADM_THISHASBEENSAVED', 'Následující nastavení bylo uloženo do konfiguračního souboru:');
DEFINE ('_UDDEADM_SETTINGSSAVED', 'Nastavení uloženo.');
DEFINE ('_UDDEADM_ICONONLINEPIC_HEAD', 'Ikona: Uživatel je online');
DEFINE ('_UDDEADM_ICONONLINEPIC_EXP', 'Zadej umístění, ikony umístěné vedle uživatelského jména, pokud je uživatel online.');
DEFINE ('_UDDEADM_ICONOFFLINEPIC_HEAD', 'Ikona: Uživatel je offline');
DEFINE ('_UDDEADM_ICONOFFLINEPIC_EXP', 'Zadej umístění, ikony umístěné vedle uživatelského jména, pokud je uživatel offline.');
DEFINE ('_UDDEADM_ICONREADPIC_HEAD', 'Ikona: Číst zprávu');
DEFINE ('_UDDEADM_ICONREADPIC_EXP', 'Zadej umístění ikony zobrazené pro přečtené zprávy.');
DEFINE ('_UDDEADM_ICONUNREADPIC_HEAD', 'Ikona: Nepřečtená zpráva');
DEFINE ('_UDDEADM_ICONUNREADPIC_EXP', 'Zadej umístění ikony zobrazené pro nepřečtené zprávy.');
DEFINE ('_UDDEADM_MODULENEWMESS_HEAD', 'Modul: Ikona nových zpráv');
DEFINE ('_UDDEADM_MODULENEWMESS_EXP', 'Tato volba je určena pro mod_uddeim modul. Zadej umístění ikony, kterou modul zobrazí v prípadě nových zpráv.');
// admin import tab
DEFINE ('_UDDEADM_UDDEINSTALL', 'uddeIM Instalace');
DEFINE ('_UDDEADM_FINISHED', 'Instalace je ukončena. Vítej v programu uddeIM. ');
DEFINE ('_UDDEADM_NOCB', '<span style="color: red;">Nemáš nainstalován Mambo Community Builder. Nebudeš moci používat uddeIM.</span><br /><br />Možná budeš chtít stáhnout <a href="http://www.mambojoe.com">Mambo Community Builder</a>.');
DEFINE ('_UDDEADM_CONTINUE', 'pokračuj');
DEFINE ('_UDDEADM_PMSFOUND_1', 'Jsou ');
DEFINE ('_UDDEADM_PMSFOUND_2', ' zprávy ve starší PMS instalaci. Chceš naimportovat tyto zprávy do uddeIM?');
DEFINE ('_UDDEADM_IMPORT_EXP', 'Nelze zvolit mezi starším PMS a tvojí instalací. Zprávy budou uloženy úplné a můžeš je bezpečně naimportovat do uddeIM a to i v případě, že se rozhodneš dále používat původní PMS. Všechny změny které jsi provedl bys měl před spuštěním importu uložit! Všechny zprávy, které již jsou v databázi uddeIM zůstanou úplné.');
// _UDDEADM_IMPORT_EXP above changed in 0.4
DEFINE ('_UDDEADM_IMPORT_YES', 'Provést import zpráv ze starších PMS do uddeIM?');
DEFINE ('_UDDEADM_IMPORT_NO', 'Ne, neimportovat žádné zprávy');
DEFINE ('_UDDEADM_IMPORTING', 'Vyčkej prosím, dokud se import zpráv neprovede.');
DEFINE ('_UDDEADM_IMPORTDONE', 'Import zpráv ze starších PMS je hotov. Nespouštěj tento instalační script znovu, protože zprávy budou znovu naimportovány a zobrazeny tak dvakrát.');
DEFINE ('_UDDEADM_IMPORT', 'Import');
DEFINE ('_UDDEADM_IMPORT_HEADER', 'Import zpráv ze starších PMS');
DEFINE ('_UDDEADM_PMSNOTFOUND', 'Nenalezen jiný PMS. Import není možný.');
DEFINE ('_UDDEADM_ALREADYIMPORTED', '<span style="color: red;">Už jsi provedl import zpráv ze starších PMS do uddeIM.</span>');
// new in 0.3 Frontend
DEFINE ('_UDDEIM_BLOCKS', 'Blokován');
DEFINE ('_UDDEIM_YOUAREBLOCKED', 'Neodesláno (uživatel si tě zablokoval)');
DEFINE ('_UDDEIM_BLOCKNOW', 'blokovat uživatele');
DEFINE ('_UDDEIM_BLOCKS_EXP', 'Toto je seznam uživatelů co jsi zablokoval. Tito uživatelů ti nemohou poslat soukromou zprávu.');
DEFINE ('_UDDEIM_NOBODYBLOCKED', 'Nejsi blokován žádným uživatelem.');
DEFINE ('_UDDEIM_YOUBLOCKED_PRE', 'Jsi právě blokován ');
DEFINE ('_UDDEIM_YOUBLOCKED_POST', ' uživatelem(y).');
DEFINE ('_UDDEIM_UNBLOCKNOW', '[odblokovat]');
DEFINE ('_UDDEIM_BLOCKALERT_EXP_ON', 'Pokud se ti blokovaní uživatelé pokusí odeslat zprávu, budou informováni, že jsou blokováni a zpráva nebude odeslána.');
DEFINE ('_UDDEIM_BLOCKALERT_EXP_OFF', 'Blokovaný uživatel nebude moci vidět, že jsi ho zablokoval.');
DEFINE ('_UDDEIM_CANTBLOCKADMINS', 'Nemůžeš zablokovat administrátora.');
// new in 0.3 Admin
DEFINE ('_UDDEADM_BLOCKSYSTEM_HEAD', 'Povolit systém blokování');
DEFINE ('_UDDEADM_BLOCKSYSTEM_EXP', 'Je-li povoleno, uživatelé mohou blokovat jiné uživatele. Blokovaný uživatel nemůže odesílat zprávy uživatelům co jej blokují. Admin nemůže být blokován.');
DEFINE ('_UDDEADM_BLOCKSYSTEM_YES', 'ano');
DEFINE ('_UDDEADM_BLOCKSYSTEM_NO', 'ne');
DEFINE ('_UDDEADM_BLOCKALERT_HEAD', 'Informování blokovaných uživatelů');
DEFINE ('_UDDEADM_BLOCKALERT_EXP', 'Zvolíš-li <b>ano</b>, blokovaný uživatel bude informován, že zpráva nemůže být odeslána, protože je příjemcem blokován. Zvolíš-li <b>ne</b>, blokovaný uživatel nedostane žádnou informaci o tom, že zpráva nebyla odeslána.');
DEFINE ('_UDDEADM_BLOCKALERT_YES', 'ano');
DEFINE ('_UDDEADM_BLOCKALERT_NO', 'ne');
DEFINE ('_UDDEIM_BLOCKSDISABLED', 'Systém blokování není povolen');
// DEFINE ('_UDDEADM_DELETIONS', 'Messages');
// translators info: comment out or delete line above to avoid double definition.
// new definition right below.
DEFINE ('_UDDEADM_DELETIONS', 'Mazání'); // changed in 0.4
DEFINE ('_UDDEADM_BLOCK', 'Blokování');
// new in 0.4, admin
DEFINE ('_UDDEADM_INTEGRATION', 'Integrace');
DEFINE ('_UDDEADM_EMAIL', 'E-mail');
DEFINE ('_UDDEADM_SHOWONLINE_HEAD', 'Zobrazit stav online');
DEFINE ('_UDDEADM_SHOWONLINE_EXP', 'Při volbě <b>ano</b>, uddeIM zobrazí u každého uživatele ikonu, která informuje, je-li uživatel online nebo offline.');
DEFINE ('_UDDEADM_ALLOWEMAILNOTIFY_HEAD', 'Povolit e-mailové upozornění');
DEFINE ('_UDDEADM_ALLOWEMAILNOTIFY_EXP', 'Je-li zvoleno <b>ano</b>, uživatelé si mohou zvolit, jestli budou dostávat e-mail pokaždé, když jim přijde nová zpráva.');
DEFINE ('_UDDEADM_EMAILWITHMESSAGE_HEAD', 'E-mail obsahuje zprávu');
DEFINE ('_UDDEADM_EMAILWITHMESSAGE_EXP', 'Je-li zvoleno <b>ne</b>, e-mail bude pouze obsahovat informaci o tom, kdy a kým byla zpráva zaslána, ale ne vlastní zprávu.');
DEFINE ('_UDDEADM_LONGWAITINGEMAIL_HEAD', 'Upomínací e-mail');
DEFINE ('_UDDEADM_LONGWAITINGEMAIL_EXP', 'Tato volba posílá e-mail uživatelům, kteří mají nepřečtené zprávy v jejich Přijatých velmi dlouhou dobu (nastavení níže). Tato volba je nezávislá na volbě \'povolit e-mailové upozorňování\'. Pokud nechceš odesílat žádné e-mailové zprávy musíš obě volby vypnout.');
DEFINE ('_UDDEADM_LONGWAITINGDAYS_HEAD', 'Upomínací e-mail zaslán po dni(ech)');
DEFINE ('_UDDEADM_LONGWAITINGDAYS_EXP', 'Pokud je volba Upomínací e-mail (výše) nastavena na <b>ano</b>, nastavte zde po kolika dnech bude e-mailová upomínka na nepřečtené zprávy odeslána.');
DEFINE ('_UDDEADM_FIRSTWORDSINBOX_HEAD', 'Počet znaků ze zprávy');
DEFINE ('_UDDEADM_FIRSTWORDSINBOX_EXP', 'Zde můžeš nastavit, kolik znaků ze zprávy bude zobrazeno v Přijatých, Odeslaných a Koši.');
DEFINE ('_UDDEADM_MAXLENGTH_HEAD', 'Maximální délka zprávy');
DEFINE ('_UDDEADM_MAXLENGTH_EXP', 'Nastaví maximální délku zprávy (zpráva bude automaticky krácena, jestli její délka bude větší než nastavená). Hodnota \'0\' - délka zprávy bez omezení (nedoporučuje se).');
DEFINE ('_UDDEADM_YES', 'ano');
DEFINE ('_UDDEADM_NO', 'ne');
DEFINE ('_UDDEADM_ADMINSONLY', 'pouze admin');
DEFINE ('_UDDEADM_SYSTEM', 'Systém');
DEFINE ('_UDDEADM_SYSM_USERNAME_HEAD', 'Jméno pro systémové zprávy');
DEFINE ('_UDDEADM_SYSM_USERNAME_EXP', 'uddeIM podporuje systémové zprávy. Tyto zprávy nemají odesílatele a uživatelé na ně nemohou odpovídat. Zadej defaultní uživatelský alias pro systémové zprávy (např. <b>Podpora</b> nebo <b>Help desk</b> nebo <b>Community Master</b>).');
DEFINE ('_UDDEADM_ALLOWTOALL_HEAD', 'Povolit adminům posílat general zprávy');
DEFINE ('_UDDEADM_ALLOWTOALL_EXP', 'uddeIM podporuje general zprávy. Jsou zasílány každému uživateli na tvém systému. Používat obezřetně.');
DEFINE ('_UDDEADM_EMN_SENDERNAME_HEAD', 'E-mail jméno odesílatele');
DEFINE ('_UDDEADM_EMN_SENDERNAME_EXP', 'Zadej jméno, odkud e-mailové upozornění přijde (např. <b>Moje stránky</b> nebo <b>Zprávová služba</b>)');
DEFINE ('_UDDEADM_EMN_SENDERMAIL_HEAD', 'E-mail adresa odesílatel');
DEFINE ('_UDDEADM_EMN_SENDERMAIL_EXP', 'Zadej e-mailovou adresu od které je e-mailové upozornění odesláno (měl by to být hlavní kontaktní e-mail tvých stránek).');
DEFINE ('_UDDEADM_VERSION', 'uddeIM verze');
DEFINE ('_UDDEADM_ARCHIVE', 'Archiv'); // translators info: headline for Archive system
DEFINE ('_UDDEADM_ALLOWARCHIVE_HEAD', 'Povolit archiv');
DEFINE ('_UDDEADM_ALLOWARCHIVE_EXP', 'Zvol, jestli uživatelé budou moci ukládat zprávy do archivu. Zprávy v archivu nebudou mazány automaticky.');
DEFINE ('_UDDEADM_MAXARCHIVE_HEAD', 'Maximální počet zpráv v archivu');
DEFINE ('_UDDEADM_MAXARCHIVE_EXP', 'Nastav kolik zpráv si mohou uživatelé uložit v archivu (bez limitu pro adminy).');
DEFINE ('_UDDEADM_COPYTOME_HEAD', 'Povolit kopie sám sobě');
DEFINE ('_UDDEADM_COPYTOME_EXP', 'Povolit uživatelům příjem kopií zpráv, které odesílají. Tyto kopie se objeví v Přijatých zprávách.');
DEFINE ('_UDDEADM_MESSAGES', 'Zprávy');
DEFINE ('_UDDEADM_TRASHORIGINAL_HEAD', 'Navrhnout smazat originál');
DEFINE ('_UDDEADM_TRASHORIGINAL_EXP', 'Je-li zvoleno ano, vloží se vedle tlačítka \'Odeslat\' (při odesílání odpověďi) checkbox nazvaný \'smaž originál\', který je defaultně zatržen. V tomto případě pak zpráva bude z Přijatých ihned po odeslání odpovědi přesunuta do koše. Tato funkce snižuje počet zpráv umístěných v databázi. Uživatelé mohou tento checkbox odškrtnout, pokud chtějí zprávu ponechat v Přijatých.');
// translators info: 'Send' is the same as _UDDEIM_SUBMIT,
// and 'trash original' the same as _UDDEIM_TRASHORIGINAL
DEFINE ('_UDDEADM_PERPAGE_HEAD', 'Zpráv na stránku');
DEFINE ('_UDDEADM_PERPAGE_EXP', 'Zadej počet zpráv na stránku v Přijatých, Odeslaných, Koši a Archivu.');
DEFINE ('_UDDEADM_CHARSET_HEAD', 'Použitá znaková sada');
DEFINE ('_UDDEADM_CHARSET_EXP', 'Máš-li zkušenosti s problémy při zobrazováním ne-latinkových znakových sad, můžeš určit znakovou sadu, kterou uddeIM používá ke konverzi databázových výstupů do HTML kódu. Defaultní nastavení je správné pro většinu Evropských jazyků.');
DEFINE ('_UDDEADM_MAILCHARSET_HEAD', 'Použitá znak.sada v e-mailech');
DEFINE ('_UDDEADM_MAILCHARSET_EXP', 'Máš-li zkušenosti s problémy při zobrazováním ne-latinkových znakových sad, můžeš určit znakovou sadu, kterou uddeIM použije s odesíláním odchozích e-mailů. Defaultní nastavení je správné pro většinu Evropských jazyků.');
// translators info: if you're translating into a language that uses a latin charset
// (like English, Dutch, German, Swedish, Spanish, ... ) you might want to add a line
// saying 'For usage in [mylanguage] the default value is correct.'
DEFINE ('_UDDEADM_EMN_BODY_NOMESSAGE_EXP', 'Toto je obsah e-mailu, který uživatel obdrží, jestli je výše uvedená volba nastavena. Obsah zprávy nebude obsažen v e-mailu. Ponech proměnné %you%, %user% and %site% úplné. ');
DEFINE ('_UDDEADM_EMN_BODY_WITHMESSAGE_EXP', 'Toto je obsah e-mailu, který uživatel obdrží, jestli je výše uvedená volba nastavena. V e-mailu bude obsažen obsah zprávy. Ponech proměnné %you%, %user%, %pmessage% and %site% úplné. ');
DEFINE ('_UDDEADM_EMN_FORGETMENOT_EXP', 'Toto je obsah upomínacího e-mailu, který uživatel obdrží, jestli je výše uvedená volba nastavena. Ponech proměnné %you% and %site% úplné. ');
DEFINE ('_UDDEADM_ENABLEDOWNLOAD_EXP', 'Dovolí uživatelům stáhnout si zprávy z jejich archivu tím, že si je pošlou jako e-mail.');
DEFINE ('_UDDEADM_ENABLEDOWNLOAD_HEAD', 'Povolit download');
DEFINE ('_UDDEADM_EXPORT_FORMAT_EXP', 'Toto je formát e-mailu, který uživatelé obdrží po stažení jejich zpráv z archivu. Ponech proměnné %user%, %msgdate% a %msgbody% úplné. ');
// translators info: Don't translate %you%, %user%, etc. in the strings above.
DEFINE ('_UDDEADM_INBOXLIMIT_HEAD', 'Nastavit limit Přijatých');
DEFINE ('_UDDEADM_INBOXLIMIT_EXP', 'Můžeš zahrnout počet zpráv v Přijatých do maxima archivovaných zpráv. V tomto případě celkový počet zpráv v Přijatých a v archivu nesmí přesáhnout počet nastavený výše. Alternativně můžeš nastavit limit v Přijatých bez zahrnutí zpráv v archivu. V tomto případě uživatelé nemají limit zpráv v Přijatých vyšší než je nastaven výše. Jakmile je počet dosažen, nebudou moci odpovídat na zprávy, nebo psát nové dokud nesmažou staré zprávy v Přijatých nebo archivu (budou ale moci zprávy přijímat a číst).');
DEFINE ('_UDDEADM_SHOWINBOXLIMIT_HEAD', 'Ukázat využitý limit v Přijatých');
DEFINE ('_UDDEADM_SHOWINBOXLIMIT_EXP', 'Zobrazit kolik mají uživatelé zpráv uložených (a kolik jich mohou ještě uložit) na řádku pod Přijatými.');
DEFINE ('_UDDEADM_ARCHIVETOTRASH_INTRO', 'Vypnul jsi archiv. Jak chceš naložit se zprávami, které jsou uloženy v archivu?');
DEFINE ('_UDDEADM_ARCHIVETOTRASH_LEAVE_LINK', 'Ponechat je');
DEFINE ('_UDDEADM_ARCHIVETOTRASH_LEAVE_EXP', 'Ponechat je v archivu (uživatelé nebudou mít přístup ke zprávám a stále budou načítány do zprávovému limitu).');
DEFINE ('_UDDEADM_ARCHIVETOTRASH_INBOX_LINK', 'Přesunout do Přijatých');
DEFINE ('_UDDEADM_ARCHIVETOTRASH_INBOX_DONE', 'Archivované zprávy přesunout do Přijatých');
DEFINE ('_UDDEADM_ARCHIVETOTRASH_INBOX_EXP', 'Zprávy budou přesunuty do Přijatých of the respective uživatele (nebo do koše, pokud jsou starší než je dovoleno v Přijatých).');
// 0.4 frontend, admins only (no translation necessary)
DEFINE ('_UDDEIM_VALIDFOR_1', 'platné do ');
DEFINE ('_UDDEIM_VALIDFOR_2', ' hodin. 0=navždy (aplikovat automatické mazání)');
DEFINE ('_UDDEIM_WRITE_SYSM_GM', '[Vytvořit systémovou nebo základní (general) zprávu]');
DEFINE ('_UDDEIM_WRITE_NORMAL', '[Vytvořit obyčejnou (standartní) zprávu]');
DEFINE ('_UDDEIM_NOTALLOWED_SYSM_GM', 'Systémové a základní (general) zprávy nejsou povoleny.');
DEFINE ('_UDDEIM_SYSGM_TYPE', 'Typ zprávy');
DEFINE ('_UDDEIM_HELPON_SYSGM', 'Nápověda nebo systémové zprávy');
DEFINE ('_UDDEIM_HELPON_SYSGM_2', '(se otevřou se v novém okně)');
DEFINE ('_UDDEIM_SYSGM_PLEASECONFIRM', 'Zamýšlíš poslat zprávu zobrazenou níže. Prosím znovu se ujisti a potvrď ji, nebo ji zruš!');
DEFINE ('_UDDEIM_SYSGM_WILLSENDTOALL', 'Zpráva <b>všem uživatelům</b>');
DEFINE ('_UDDEIM_SYSGM_WILLSENDTOALLADMINS', 'Zpráva <b>všem adminům</b>');
DEFINE ('_UDDEIM_SYSGM_WILLSENDTOALLLOGGED', 'Zpráva <b>všem práve přihlášeným uživatelům</b>');
DEFINE ('_UDDEIM_SYSGM_WILLDISABLEREPLY', 'Příjemci nebudou schopni odpovědět na zprávu.');
DEFINE ('_UDDEIM_SYSGM_WILLSENDAS_1', 'Zpráva byla zaslána <b>');
DEFINE ('_UDDEIM_SYSGM_WILLSENDAS_2', '</b> jako uživatelské jméno');
DEFINE ('_UDDEIM_SYSGM_WILLEXPIRE', 'Zpráva vyprší');
DEFINE ('_UDDEIM_SYSGM_WILLNOTEXPIRE', 'Zpráva nevyprší');
DEFINE ('_UDDEIM_SYSGM_CHECKLINK', '<b>Otestuj tento link (kliknutím na něj) před pokračováním!</b>');
DEFINE ('_UDDEIM_SYSGM_SHORTHELP', 'Použití <b>pouze v systémových zprávách</b>:<br /> [b]<b>tučně</b>[/b] [i]<em>podtrženě</em>[/i]<br />
[url=http://www.someurl.com]some url[/url] nebo [url]http://www.someurl.com[/url] are links');
DEFINE ('_UDDEIM_SYSGM_ERRORNORECIPS', 'Chyba: Nenalezen příjemce. Zpráva nebyla odeslána.');
DEFINE ('_UDDEIM_CANTREPLY', 'Nemůžeš odpovědět na tuto zprávu.');
DEFINE ('_UDDEIM_EMNOFF', 'Upozorňování E-mailem je vypnuto.');
DEFINE ('_UDDEIM_EMNON', 'Upozorňování E-mailem je zapnuto.');
DEFINE ('_UDDEIM_SETEMNON', '[zapnout]');
DEFINE ('_UDDEIM_SETEMNOFF', '[vypnout]');
DEFINE ('_UDDEIM_EMN_BODY_NOMESSAGE',
"Ahoj %you%,\n\n%user% ti poslal soukromou zprávu ze %site%. Prosím přihlaš se tam, aby sis ji mohl přečíst!");
DEFINE ('_UDDEIM_EMN_BODY_WITHMESSAGE',
"Ahoj %you%,\n\n%user% ti zaslal následující soukromou zprávu ze %site%. Prosím přihlaš se tam, abys mohl odpovědět!\n__________________\n%pmessage%");
DEFINE ('_UDDEIM_EMN_FORGETMENOT',
"Ahoj %you%,\n\nmáš nepřečtenou zprávu na %site%. Prosím přihlaš se tam, aby sis ji mohl přečíst!");
DEFINE ('_UDDEIM_EXPORT_FORMAT', '
================================================================================
%user% (%msgdate%)
----------------------------------------
%msgbody%
================================================================================');
DEFINE ('_UDDEIM_EMN_SUBJECT', 'Máš zprávy na %site%');
DEFINE ('_UDDEIM_SEND_ASSYSM', 'poslat jako systémovou zprávu (příjemci nemohou odpovídat)');
DEFINE ('_UDDEIM_SEND_TOALL', 'poslat všem uživatelům');
DEFINE ('_UDDEIM_SEND_TOALLADMINS', 'poslat všem adminům');
DEFINE ('_UDDEIM_SEND_TOALLLOGGED', 'poslat všem online uživatelům');
DEFINE ('_UDDEIM_UNEXPECTEDERROR_QUIT', 'Neočekávaná chyba: ');
DEFINE ('_UDDEIM_ARCHIVENOTENABLED', 'Archivování není dovoleno.');
DEFINE ('_UDDEIM_ARCHIVE_ERROR', 'Ukládání zpráv do archivu se nepodařilo.');
DEFINE ('_UDDEIM_ARC_SAVED_1', 'Uložil jsi ');
DEFINE ('_UDDEIM_ARC_SAVED_NONE', '<b>Ještě nemáš v archivu uloženy žádné zprávy.</b>');
DEFINE ('_UDDEIM_ARC_SAVED_NONE_2', '<b>V archivu nemáš žádné zprávy.</b>');
DEFINE ('_UDDEIM_ARC_SAVED_2', ' zpráv');
DEFINE ('_UDDEIM_ARC_SAVED_ONE', 'Máš uloženu jednu zprávu');
DEFINE ('_UDDEIM_ARC_SAVED_3', 'Před uložením nové zprávy musíš nejdříve nějaké smazat.');
DEFINE ('_UDDEIM_ARC_CANSAVEMAX_1', 'Uložil jsi již maximum ');
DEFINE ('_UDDEIM_ARC_CANSAVEMAX_2', ' zpráv.');
DEFINE ('_UDDEIM_INBOX_LIMIT_1', 'Máš ');
DEFINE ('_UDDEIM_INBOX_LIMIT_2', ' zpráv v ');
DEFINE ('_UDDEIM_INBOX_LIMIT_2_SINGULAR', ' zpráva v '); // same as _UDDEIM_INBOX_LIMIT_2, but singular (as in one "message in your")
DEFINE ('_UDDEIM_ARC_UNIVERSE_ARC', 'Archivu');
DEFINE ('_UDDEIM_ARC_UNIVERSE_INBOX', 'Přijatých');
DEFINE ('_UDDEIM_ARC_UNIVERSE_BOTH', 'Přijatých a Archivu');
DEFINE ('_UDDEIM_INBOX_LIMIT_3', 'Dovolené maximum je ');
DEFINE ('_UDDEIM_INBOX_LIMIT_4', 'Můžeš stále přijímat a číst zprávy, ale nemůžeš odpovídat ani psát nové, pokud nějaké nesmažeš.');
DEFINE ('_UDDEIM_SHOWINBOXLIMIT_1', 'Zpráv uloženo: ');
DEFINE ('_UDDEIM_SHOWINBOXLIMIT_2', '(z max. ');
DEFINE ('_UDDEIM_MESSAGE_ARCHIVED', 'Zpráva uložena do archivu.');
DEFINE ('_UDDEIM_STORE', 'archiv'); // translators info: as in: 'store this message in archive now'
DEFINE ('_UDDEIM_BACK', 'zpět');
DEFINE ('_UDDEIM_TRASHCHECKED', 'smazat vybrané'); // translators info: plural!
DEFINE ('_UDDEIM_SHOWALL', 'ukázat všechny'); // translators example "SHOW ALL messages"
DEFINE ('_UDDEIM_ARCHIVE', 'Archiv'); // should be same as _UDDEADM_ARCHIVE
DEFINE ('_UDDEIM_ARCHIVEFULL', 'Archiv je plný. Neuloženo.');
DEFINE ('_UDDEIM_NOMSGSELECTED', 'Nebyly vybrány žádné zprávy.');
DEFINE ('_UDDEIM_THISISACOPY', 'Kopie zprávy jsi poslal ');
DEFINE ('_UDDEIM_SENDCOPYTOME', 'kopii i mně');
DEFINE ('_UDDEIM_SENDCOPYTOARCHIVE', 'kopii do archivu');
DEFINE ('_UDDEIM_TRASHORIGINAL', 'smazat originál');
DEFINE ('_UDDEIM_MESSAGEDOWNLOAD', 'Zpráva stažena');
DEFINE ('_UDDEIM_EXPORT_MAILED', 'E-mail s exportovanými zprávami odeslán');
DEFINE ('_UDDEIM_EXPORT_NOW', 'e-mail checked to me');
DEFINE ('_UDDEIM_EXPORT_MAIL_INTRO', 'E-mail obsahuje tvoje soukromé zprávy.');
DEFINE ('_UDDEIM_EXPORT_COULDNOTSEND', 'Nelze odeslat e-mail obsahující zprávy.');
DEFINE ('_UDDEIM_LIMITREACHED', 'Limit zpráv dosažen! Zpráva neobnovena.');
DEFINE ('_UDDEIM_WRITEMSGTO', 'Napsat zprávu');
$udde_smon[1]="Led";
$udde_smon[2]="Úno";
$udde_smon[3]="Bře";
$udde_smon[4]="Dub";
$udde_smon[5]="Kvě";
$udde_smon[6]="Čer";
$udde_smon[7]="Čvn";
$udde_smon[8]="Srp";
$udde_smon[9]="Zář";
$udde_smon[10]="Říj";
$udde_smon[11]="Lis";
$udde_smon[12]="Pro";
$udde_lmon[1]="Leden";
$udde_lmon[2]="Únor";
$udde_lmon[3]="Březen";
$udde_lmon[4]="Duben";
$udde_lmon[5]="Květen";
$udde_lmon[6]="Červen";
$udde_lmon[7]="Červenec";
$udde_lmon[8]="Srpen";
$udde_lmon[9]="Září";
$udde_lmon[10]="Říjen";
$udde_lmon[11]="Listopad";
$udde_lmon[12]="Prosinec";
$udde_lweekday[0]="Neděle";
$udde_lweekday[1]="Pondělí";
$udde_lweekday[2]="Úterý";
$udde_lweekday[3]="Středa";
$udde_lweekday[4]="Čtvrtek";
$udde_lweekday[5]="Pátek";
$udde_lweekday[6]="Sobota";
$udde_sweekday[0]="Ne";
$udde_sweekday[1]="Po";
$udde_sweekday[2]="Út";
$udde_sweekday[3]="St";
$udde_sweekday[4]="Čt";
$udde_sweekday[5]="Pá";
$udde_sweekday[6]="So";
// new in 0.5 ADMIN
DEFINE ('_UDDEADM_TEMPLATEDIR_HEAD', 'Šablona uddeIM');
DEFINE ('_UDDEADM_TEMPLATEDIR_EXP', 'Vyber šablonu, kterou chceš aby uddeIM používal');
DEFINE ('_UDDEADM_SHOWCONNEX_HEAD', 'Zobrazit CB spojení');
DEFINE ('_UDDEADM_SHOWCONNEX_EXP', 'Nastav <b>ano</b> pokud je Community Builder nainstalován a chceš zobrazit uživatelská spojení při psaní nové zprávy.');
DEFINE ('_UDDEADM_SHOWSETTINGSLINK_HEAD', 'Zobrazit uživatelské nastavení');
DEFINE ('_UDDEADM_SHOWSETTINGSLINK_EXP', 'Zobrazí mmožnost uživatelského nastavení e-mailového upozorňování nebo systému blokování - je-li toto povoleno. Můžeš určit jeho pozici nebo jej úplně vypnout.');
DEFINE ('_UDDEADM_SHOWSETTINGS_ATBOTTOM', 'ano, dole na stránce');
DEFINE ('_UDDEADM_ALLOWBB_HEAD', 'Povolit BB kódy tagů');
DEFINE ('_UDDEADM_FONTFORMATONLY', 'pouze formátování fontu');
DEFINE ('_UDDEADM_ALLOWBB_EXP', 'Při volbě <b>pouze formátování fontu</b> je povoleno uživatelům použít pouze kódy BB tagů pro tučné, italiku, podtržené písmo, barvu a velikost fontu. Pokud je nastaveno na <b>ano</b>, uživatelům jsou povoleny použít <b>všechny</b> podporované kódy BB tagů (např. odkazy a obrázky).');
DEFINE ('_UDDEADM_ALLOWSMILE_HEAD', 'Povolit Smajlíky');
DEFINE ('_UDDEADM_ALLOWSMILE_EXP', 'Pokud nastavíš <b>ano</b>, kódy smajlíků jako :-) jsou nahrazeny ve zprávě ikonami.');
DEFINE ('_UDDEADM_DISPLAY', 'Zobrazení');
DEFINE ('_UDDEADM_SHOWMENUICONS_HEAD', 'Zobrazit ikony menu');
DEFINE ('_UDDEADM_SHOWMENUICONS_EXP', 'Když nastavíš <b>ano</b>, řádky menu budou zobrazeny s ikonami.');
DEFINE ('_UDDEADM_SHOWTITLE_HEAD', 'Název komponenty');
DEFINE ('_UDDEADM_SHOWTITLE_EXP', 'Zadej nadpis (název této komponenty) např. \'Soukromé zprávy\'. Nech prázdné, pokud nechceš zobrazovat nadpis.');
DEFINE ('_UDDEADM_SHOWABOUT_HEAD', 'Zobrazit řádkek O programu uddeIM');
DEFINE ('_UDDEADM_SHOWABOUT_EXP', 'Nastav <b>ano</b> pro zobrazení uddeIM software credits a licence. Řádek bude přidán na spodek výstupu uddeIM.');
DEFINE ('_UDDEADM_STOPALLEMAIL_HEAD', 'Zastavit e-mail');
DEFINE ('_UDDEADM_STOPALLEMAIL_EXP', 'Zvol má-li uddeIM zastavit odesílání e-mailů (e-mailové upozornění a upomínací e-maily) nerespektující uživatelská nastavení, např. pokud testuješ stránky.');
DEFINE ('_UDDEADM_GETPICLINK_HEAD', 'CB náhledy v seznamech');
DEFINE ('_UDDEADM_GETPICLINK_EXP', 'Nastav <b>ano</b> pokud chceš zobrazit náhledy Community Builder v přehledu seznamu zpráv (Přijaté, Odeslané, apod.)');
// new in 0.5 FRONTEND
DEFINE ('_UDDEIM_SHOWUSERS', 'Ukázat uživatele');
DEFINE ('_UDDEIM_CONNECTIONS', 'Spojení');
DEFINE ('_UDDEIM_SETTINGS', 'Nastavení');
DEFINE ('_UDDEIM_NOSETTINGS', 'Není žádné nastavení ke změně.');
DEFINE ('_UDDEIM_ABOUT', 'O...'); // as in "About uddeIM"
DEFINE ('_UDDEIM_COMPOSE', 'Napsat'); // as in "write new message", but only one word
DEFINE ('_UDDEIM_EMN', 'E-mailové upozorňování');
DEFINE ('_UDDEIM_EMN_EXP', 'Zasílání e-mailu s upozorněním na nové zprávy.');
DEFINE ('_UDDEIM_EMN_ALWAYS', 'Zasílat e-mail s upozorněním na nové zprávy');
DEFINE ('_UDDEIM_EMN_NONE', 'Nezasílat e-mail s upozorněním na nové zprávy');
DEFINE ('_UDDEIM_EMN_WHENOFFLINE', 'Zasílat e-mail s upozorněním na offline');
DEFINE ('_UDDEIM_EMN_NOTONREPLY', 'Nezasílat upozorňování na odpovědi');
DEFINE ('_UDDEIM_BLOCKSYSTEM', 'Blokování uživatelů'); // Headline for blocking system in settings
DEFINE ('_UDDEIM_BLOCKSYSTEM_EXP', 'Můžeš zabránit uživatelům aby ti zasílali zprávy, tím, že je budeš blokovat. Zvol <b>blokovat uživatele</b> když chceš vidět zprávu od respective uživatele.'); // block user is the same as _UDDEIM_BLOCKNOW
DEFINE ('_UDDEIM_SAVECHANGE', 'Uložit změny');
DEFINE ('_UDDEIM_TOOLTIP_BOLD', 'Kódy BB tagů pro tučný text. Užití: [b]tučný[/b]');
DEFINE ('_UDDEIM_TOOLTIP_ITALIC', 'Kódy BB tagů pro italic text. Užití: [i]italic[/i]');
DEFINE ('_UDDEIM_TOOLTIP_UNDERLINE', 'Kódy BB tagů pro podtržený text. Užití: [u]podtržený[/u]');
DEFINE ('_UDDEIM_TOOLTIP_COLORRED', 'Kódy BB tagů pro barevné písmena. Užití: [color=#XXXXXX]obarveno[/color] kde XXXXXX je hexa kód od barvy kterou požadujete, např. FF0000 pro červenou.');
DEFINE ('_UDDEIM_TOOLTIP_COLORGREEN', 'Kódy BB tagů pro barevné písmena. Užití: [color=#XXXXXX]obarveno[/color] kde XXXXXX je hexa kód od barvy kterou požadujete, např. 00FF00 pro zelenou.');
DEFINE ('_UDDEIM_TOOLTIP_COLORBLUE', 'Kódy BB tagů pro barevné písmena. Užití: [color=#XXXXXX]obarveno[/color] kde XXXXXX je hexa kód od barvy kterou požadujete, např. 0000FF pro modrou.');
DEFINE ('_UDDEIM_TOOLTIP_FONTSIZE1', 'Kódy BB tagů pro velmi malá písmena. Užití:: [size=1]velmi malý text[/size]');
DEFINE ('_UDDEIM_TOOLTIP_FONTSIZE2', 'Kódy BB tagů pro malá písmena. Užití: [size=2] malý text[/size]');
DEFINE ('_UDDEIM_TOOLTIP_FONTSIZE4', 'Kódy BB tagů pro velké písmena. Užití: [size=4]velký text[/size]');
DEFINE ('_UDDEIM_TOOLTIP_FONTSIZE5', 'Kódy BB tagů pro velmi velké písmena. Užití: [size=5]velmi velký text[/size]');
DEFINE ('_UDDEIM_TOOLTIP_IMAGE', 'Kódy BB tagů pro vložení odkazu na obrázek. Užití: [img]obrázek-URL[/img]');
DEFINE ('_UDDEIM_TOOLTIP_URL', 'Kódy BB tagů pro vložení odkazu. Užití: [url]web adresa[/url]. Nezapomeň http:// na začátek web adresy.');
DEFINE ('_UDDEIM_TOOLTIP_CLOSEALLTAGS', 'Zavřít všechny otevřené kódy BB tagů.');
| gpl-2.0 |
Nazg-Gul/e-marsa | data.php | 690 | <?php
/**
* Gate - Wiki engine and web-interface for WebTester Server
*
* Page generation script
*
* Copyright (c) 2008-2009 Sergey I. Sharybin <g.ulairi@gmail.com>
*
* This program can be distributed under the terms of the GNU GPL.
* See the file COPYING.
*/
if ($PHP_SELF != '') {
print 'HACKERS?';
die;
}
/* Redirect to needed page if needed */
$start_root = opt_get ('start_root');
if ($start_root != '' && $start_root != '/') {
redirect (config_get ('document-root').$start_root);
}
/* Draw page content */
$tpl = manage_template_by_name ('Статьи / Заглавная страница');
print ($tpl->GetText ());
?>
| gpl-2.0 |
groundhogxc/XCSoar | src/IO/ConfiguredFile.hpp | 2518 | /*
Copyright_License {
XCSoar Glide Computer - http://www.xcsoar.org/
Copyright (C) 2000-2016 The XCSoar Project
A detailed list of copyright holders can be found in the file "AUTHORS".
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
}
*/
#ifndef XCSOAR_IO_CONFIGURED_FILE_HPP
#define XCSOAR_IO_CONFIGURED_FILE_HPP
#include "Charset.hpp"
class NLineReader;
class TLineReader;
/**
* Opens a file whose name is configured in the profile.
*
* @param profile_key the profile key which is used to read the
* file name
* @return a NLineReader which must be deleted by the caller; nullptr
* if there is no such setting, or if an error occurred opening the
* file
*/
NLineReader *
OpenConfiguredTextFileA(const char *profile_key);
/**
* Opens a file whose name is configured in the profile.
*
* @param profile_key the profile key which is used to read the
* file name
* @param cs the character set of the input file
* @return a TLineReader which must be deleted by the caller; nullptr if
* there is no such setting, or if an error occurred opening the file
*/
TLineReader *
OpenConfiguredTextFile(const char *profile_key,
Charset cs=Charset::UTF8);
/**
* Opens a file whose name is configured in the profile. If there is
* no such setting, attempt to open a file from inside the map file.
*
* @param profile_key the profile key which is used to read the
* file name
* @param in_map_file if no profile setting is found, attempt to open
* this file from inside the map file
* @param cs the character set of the input file
* @return a TLineReader which must be deleted by the caller; nullptr if
* there is no such setting, or if an error occurred opening the file
*/
TLineReader *
OpenConfiguredTextFile(const char *profile_key, const char *in_map_file,
Charset cs=Charset::UTF8);
#endif
| gpl-2.0 |
Esleelkartea/kz-adeada-talleres-electricos- | kzadeadatallereselectricos_v1.0.0_win32_installer/windows/xampp/php/PEAR/Math/Numerical/RootFinding.php | 5382 | <?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
// {{{ Header
/**
* File contains Math_Numerical_RootFinding base class.
*
* PHP versions 4 and 5
*
* LICENSE:
*
* BSD License
*
* Copyright (c) 2004-2006 Firman Wandayandi
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* 3. Neither the name of Firman Wandayandi nor the names of
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* @category Math
* @package Math_Numerical_RootFinding
* @author Firman Wandayandi <firman@php.net>
* @copyright Copyright (c) 2004-2006 Firman Wandayandi
* @license http://www.opensource.org/licenses/bsd-license.php
* BSD License
* @version CVS: $Id: RootFinding.php,v 1.4 2006/01/30 18:22:02 firman Exp $
*/
// }}}
// {{{ Dependencies
/**
* Require PEAR for handling errors.
*/
require_once 'PEAR.php';
// }}}
// {{{ Global variables
/**
* Method driver aliases in order to create the prety file names,
* also for insensitive-case of method name calls.
*
* @global array $GLOBALS['_Math_Numerical_RootFinding_drivers']
* @_Math_Numerical_RootFinding_drivers
*/
$GLOBALS['_Math_Numerical_RootFinding_drivers'] = array(
'bisection' => 'Bisection',
'falseposition' => 'FalsePosition',
'fixedpoint' => 'FixedPoint',
'newtonraphson' => 'NewtonRaphson',
'newtonraphson2' => 'NewtonRaphson2',
'ralstonrabinowitz' => 'RalstonRabinowitz',
'secant' => 'Secant'
);
// }}}
// {{{ Class: Math_Numerical_RootFinding
/**
* Math_Numerical_RootFinding base class.
*
* This class intended for build API structure and abstract class members.
*
* @category Math
* @package Math_Numerical_RootFinding
* @author Firman Wandayandi <firman@php.net>
* @copyright Copyright (c) 2004-2006 Firman Wandayandi
* @license http://www.opensource.org/licenses/bsd-license.php
* BSD License
* @version Release: 1.0.0
*/
class Math_Numerical_RootFinding
{
// {{{ factory()
/**
* Create new instance of RootFinding method class.
*
* @param string $method Method name.
* @param array $options (optional) Options (options is available in
* specified method class).
*
* @return object New method's class on success or PEAR_Error on failure.
* @access public
* @static
*/
function &factory($method, $options = null)
{
$method = strtolower(trim($method));
if (!isset($GLOBALS['_Math_Numerical_RootFinding_drivers'][$method])) {
return PEAR::raiseError('Driver file not found for ' .
'\'' . $method . '\' method');
}
$method = $GLOBALS['_Math_Numerical_RootFinding_drivers'][$method];
$filename = dirname(__FILE__) . '/RootFinding/' . $method . '.php';
if (!file_exists($filename)) {
return PEAR::raiseError('Driver file not found for ' .
'\'' . $method . '\' method');
}
include_once $filename;
$classname = 'Math_Numerical_RootFinding_' . $method;
if (!class_exists($classname)) {
return PEAR::raiseError('Undefined class \'' . $classname . '\'');
}
$obj =& new $classname;
if (!is_object($obj) || !is_a($obj, $classname)) {
return PEAR::raiseError('Failed creating object from class '.
'\'' . $classname . '\'');
}
if ($options !== null) {
$err = $obj->set($options);
if (PEAR::isError($err)) {
return $err;
}
}
return $obj;
}
// }}}
}
// }}}
/*
* Local variables:
* mode: php
* tab-width: 4
* c-basic-offset: 4
* c-hanging-comment-ender-p: nil
* End:
*/
?>
| gpl-2.0 |
kenyonjohnston/hott_theater | plugins/cck_field/upload_file/includes/afterstore.php | 5103 | <?php
/**
* @version SEBLOD 3.x Core
* @package SEBLOD (App Builder & CCK) // SEBLOD nano (Form Builder)
* @url http://www.seblod.com
* @editor Octopoos - www.octopoos.com
* @copyright Copyright (C) 2013 SEBLOD. All Rights Reserved.
* @license GNU General Public License version 2 or later; see _LICENSE.php
**/
defined( '_JEXEC' ) or die;
$name = $process['field_name'];
$parent_name = $process['parent_name'];
$file_path = $process['file_path'];
$file_name = $process['file_name'];
$file_title = $process['file_title'];
$tmp_name = $process['tmp_name'];
$content_folder = $process['content_folder'];
$x2k = $process['xi'];
$array_x = $process['array_x'];
$true_name = $process['true_name'];
$options = $process['options2'];
$permissions = ( isset( $options['folder_permissions'] ) && $options['folder_permissions'] ) ? octdec( $options['folder_permissions'] ) : 0755;
if ( !(bool) ini_get( 'file_uploads' ) ) {
JError::raiseWarning( 'SOME_ERROR_CODE', JText::_( 'WARNINSTALLFILE' ) );
}
$doSave = 0;
$old_path = $file_path;
if ( $content_folder && $config['isNew'] ) {
$file_path .= $config['pk'].'/';
$file_location = $file_path.$file_name;
$location = JPATH_SITE.'/'.$file_path.$file_name;
if ( $file_title == '' ) {
if ( $x2k > -1 ) {
if ( $array_x ) { //GroupX (custom!)
$search = '::'.$name.'|'.$x2k.'|'.$parent_name.'::'.$old_path.$file_name.'::/'.$name.'|'.$x2k.'|'.$parent_name.'::';
$replace = '::'.$name.'|'.$x2k.'|'.$parent_name.'::'.$file_location.'::/'.$name.'|'.$x2k.'|'.$parent_name.'::';
} else { //FieldX (custom!)
$search = '::'.$true_name.'|'.$x2k.'|'.$parent_name.'::'.$old_path.$file_name.'::/'.$true_name.'|'.$x2k.'|'.$parent_name.'::';
$replace = '::'.$true_name.'|'.$x2k.'|'.$parent_name.'::'.$file_location.'::/'.$true_name.'|'.$x2k.'|'.$parent_name.'::';
}
} else {
$search_v = $old_path.$file_name;
$replace_v = $file_location;
}
} else {
if ( $x2k > -1 ) {
if ( $array_x ) { //GroupX (custom!)
$search = '::'.$name.'|'.$x2k.'|'.$parent_name.'::'.'{"file_location":"'.$old_path.$file_name.'","file_title":"'.$file_title.'"}'.'::/'.$name.'|'.$x2k.'|'.$parent_name.'::';
$replace = '::'.$name.'|'.$x2k.'|'.$parent_name.'::'.'{"file_location":"'.$file_location.'","file_title":"'.$file_title.'"}'.'::/'.$name.'|'.$x2k.'|'.$parent_name.'::';
} else { //FieldX (custom!)
$search = '::'.$true_name.'|'.$x2k.'|'.$parent_name.'::'.'{"file_location":"'.$old_path.$file_name.'","file_title":"'.$file_title.'"}'.'::/'.$true_name.'|'.$x2k.'|'.$parent_name.'::';
$replace = '::'.$true_name.'|'.$x2k.'|'.$parent_name.'::'.'{"file_location":"'.$file_location.'","file_title":"'.$file_title.'"}'.'::/'.$true_name.'|'.$x2k.'|'.$parent_name.'::';
}
} else {
$search_v = '{"file_location":"'.$old_path.$file_name.'","file_title":"'.$file_title.'"}';
$replace_v = '{"file_location":"'.$file_location.'","file_title":"'.$file_title.'"}';
}
}
$doSave = 1;
} else {
$file_location = $file_path.$file_name;
$location = JPATH_SITE.'/'.$file_path.$file_name;
}
if ( ! JFolder::exists( JPATH_SITE.'/'.$file_path ) ) {
JFolder::create( JPATH_SITE.'/'.$file_path, $permissions );
$file_body = '<!DOCTYPE html><title></title>';
JFile::write( JPATH_SITE.'/'.$file_path.'/index.html', $file_body );
}
if ( JFile::upload( $tmp_name, $location ) ) {
$value = $file_location;
$fields[$name]->value = $value;
} else {
$value = '';
if ( $x2k > -1 ) {
if ( $array_x ) { //GroupX
$search = '::'.$name.'|'.$x2k.'|'.$parent_name.'::'.'{"file_location":"'.$old_path.$file_name.'","file_title":"'.$file_title.'"}'.'::/'.$name.'|'.$x2k.'|'.$parent_name.'::';
$replace = '::'.$name.'|'.$x2k.'|'.$parent_name.'::'.'{"file_location":"'.$file_location.'","file_title":"'.$file_title.'"}'.'::/'.$name.'|'.$x2k.'|'.$parent_name.'::';
} else { //FieldX
$search = '::'.$true_name.'|'.$x2k.'|'.$parent_name.'::'.'{"file_location":"'.$old_path.$file_name.'","file_title":"'.$file_title.'"}'.'::/'.$true_name.'|'.$x2k.'|'.$parent_name.'::';
$replace = '::'.$true_name.'|'.$x2k.'|'.$parent_name.'::'.'{"file_location":"'.$file_location.'","file_title":"'.$file_title.'"}'.'::/'.$true_name.'|'.$x2k.'|'.$parent_name.'::';
}
} else {
$search = '||'.$name.'||'.'{"file_location":"'.$old_path.$file_name.'","file_title":"'.$file_title.'"}'.'||/'.$name.'||';
$replace = '||'.$name.'||||/'.$name.'::';
}
$doSave = 1;
}
if ( $doSave ) {
// Update
$storage = $process['storage'];
$table = $process['storage_table'];
$field = $process['storage_field'];
if ( !( isset( $search ) && isset( $replace ) ) ) {
$field2 = $process['storage_field2'];
$search = JCck::callFunc_Array( 'plgCCK_Storage'.$storage, '_format', array( $field2, $search_v ) );
$replace = JCck::callFunc_Array( 'plgCCK_Storage'.$storage, '_format', array( $field2, $replace_v ) );
}
JCckPluginLocation::g_onCCK_Storage_LocationUpdate( $config['pk'], $table, $field, $search, $replace );
}
?> | gpl-2.0 |
carleton/reasoncms | reason_4.0/lib/core/html_editors/loki_2.php | 5990 | <?php
/**
* @package reason
* @subpackage html_editors
* @author Matt Ryan
*/
reason_include('html_editors/base.php');
// Identify the class that should be used
$GLOBALS[ '_reason_editor_integration_classes' ][ basename( __FILE__) ] = 'reasonLoki2Integration';
/**
* An editor integration class for Loki 2
* @package reason
* @subpackage html_editors
*/
class reasonLoki2Integration extends reasonEditorIntegrationBase
{
/**
* Get the name of the plasmature element that should be used for this editor
* @return string name of the plasmature element
*/
function get_plasmature_type()
{
return 'loki2';
}
/**
* Get the appropriate parameters to pass to the plasmature element
* @param integer $site_id The Reason id of the site in which this editor is being invoked
* @param integer $user_id The Reason id of the current user (0 if user is anonymous or not in the Reason user store)
* @return array plasmature parameters
*/
function get_plasmature_element_parameters($site_id, $user_id = 0)
{
$params = array();
// site id
$params['site_id'] = $site_id;
// paths
$params['paths'] = $this->_get_paths($site_id);
// default widgets
$site = new entity($site_id);
if($site->get_value( 'loki_default' ))
{
$map = $this->_get_options_map();
if(array_key_exists($site->get_value( 'loki_default' ),$map))
{
$params['widgets'] = $map[$site->get_value( 'loki_default' )]['maps_to'];
}
else
{
$params['widgets'] = $site->get_value( 'loki_default' );
}
}
else
{
$params['widgets'] = 'default';
}
// user is admin
if( !empty($user_id) && (reason_user_has_privs($user_id, 'edit_html') ) )
{
$params['widgets'] .= ' +source -debug';
}
else
{
$params['widgets'] .= ' -source -debug';
}
if(defined('REASON_DEFAULT_ALLOWED_TAGS'))
{
$params['allowable_tags'] = explode(',',str_replace(array('><','<','>'),array(',','',''),REASON_DEFAULT_ALLOWED_TAGS));
}
if(defined('REASON_LOKI_CRASH_REPORT_URI') && REASON_LOKI_CRASH_REPORT_URI != '' )
{
$params['crash_report_uri'] = REASON_LOKI_CRASH_REPORT_URI;
}
return $params;
}
/**
* Get the available configuration options for the editor
*
* These options are presented to administrators when setting up a Reason site
* Each option must be represented as a string <= 256 bytes, since it is stored in a tinytext field in the database
*
* @return array keys are values to be stored in the db and can then be used by @get_plasmature_element_parameters() when setting up the plasmature element, values are labels that are presented to the administrator
*/
function get_configuration_options()
{
$map = $this->_get_options_map();
$ret = array();
foreach($map as $key=>$option)
{
$ret[$key] = $option['label'];
}
return $ret;
}
/**
* Gets the paths/URLs that loki needs in a format that plasmature can use
*
* returns an array with the following keys:
* -- site_feed (the URL of the feed that lists sites available, and contains the URLs of the feeds for their types)
* -- finder_feed (the URL of the feed that will provide the URLs of the site and type feeds that point to a given URL passed in the query string)
* -- image_feed (the URL of the feed that lists images in the site, and their URLs)
* -- default_site_regexp (a js-style regex that will find the current site's type feed URL in the site feed)
* -- default_type_regexp (a js-style regex thatr will find the page type in a type feed)
*
* @param int $site_id The id of the current site
* @return array $paths
* @access private
*
* @author Matt Ryan
* @date 2006-09-21
*/
function _get_paths($site_id)
{
include_once('paths.php');
if (file_exists(LOKI_2_INC.'loki.php'))
{
include_once(LOKI_2_INC.'loki.php');
}
else
{
trigger_error('Loki 2 file structure has changed slightly. Please update LOKI_2_INC in package_settings.php to reference the ' . LOKI_2_INC . '/helpers/php/ directory.');
include_once( LOKI_2_INC.'/helpers/php/loki.php' );
}
$paths = array();
$id_of_site_type = id_of('site');
$paths['site_feed'] = FEED_GENERATOR_STUB_PATH.'?type_id='.$id_of_site_type.'&site_id='.id_of('master_admin').'&feed=editor_sites&site_context='.$site_id;
$paths['finder_feed'] = FEED_GENERATOR_STUB_PATH.'?type_id='.$id_of_site_type.'&feed=editor_feed_finder&site_context='.$site_id;
$loki_obj = new Loki2('temp');
if(!empty($site_id))
{
$paths['image_feed'] = FEED_GENERATOR_STUB_PATH.'?type_id='.id_of('image').'&feed=images&site_id='.$site_id;
$paths['default_site_regexp'] = $loki_obj->js_regexp_quote('//'.REASON_HOST.FEED_GENERATOR_STUB_PATH.'?type_id='.id_of('type').'&site_id='.$site_id).'[$&]';
}
else
{
$paths['image_feed'] = '';
$paths['default_site_regexp'] = '';
trigger_error('No site id passed to get_loki_paths');
}
$paths['default_type_regexp'] = $loki_obj->js_regexp_quote('//'.REASON_HOST.FEED_GENERATOR_STUB_PATH.'?type_id='.id_of('minisite_page').'&site_id=').'[^&]*'.$loki_obj->js_regexp_quote('&feed=editor_links_for_minisite_page');
$css = array();
if(defined('UNIVERSAL_CSS_PATH') && UNIVERSAL_CSS_PATH)
{
$css[] = UNIVERSAL_CSS_PATH;
}
if(defined('REASON_LOKI_CSS_FILE') && REASON_LOKI_CSS_FILE)
{
$css[] = REASON_LOKI_CSS_FILE;
}
if(!empty($css))
{
$paths['css'] = $css;
}
return $paths;
}
/**
* @access private
*/
function _get_options_map()
{
$options = array(
'notables' => array('label'=>'Standard (All minus Tables & Pre)','maps_to'=>'all -pre -underline -table'),
'default' => array('label'=>'Loki 2 Default Set','maps_to'=>'default'),
'all' => array('label'=>'Most (no underline)','maps_to'=>'all -underline'),
'all_minus_pre' => array('label'=>'Most minus Pre','maps_to'=>'all -pre -underline'),
'notables_plus_pre' => array('label'=>'Most minus Tables','maps_to'=>'all -underline -table'),
);
return $options;
}
}
?>
| gpl-2.0 |
ACP3/cms | ACP3/Modules/ACP3/Search/src/ModuleRegistration.php | 548 | <?php
/**
* Copyright (c) by the ACP3 Developers.
* See the LICENSE file at the top-level module directory for licensing details.
*/
namespace ACP3\Modules\ACP3\Search;
use ACP3\Modules\ACP3\Search\DependencyInjection\SearchAvailabilityCompilerPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
class ModuleRegistration extends \ACP3\Core\Modules\ModuleRegistration
{
public function build(ContainerBuilder $containerBuilder)
{
$containerBuilder->addCompilerPass(new SearchAvailabilityCompilerPass());
}
}
| gpl-2.0 |
tidusjar/Ombi | src/Ombi.Api.SickRage/SickRageApi.cs | 4616 | using System;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Ombi.Api.SickRage.Models;
namespace Ombi.Api.SickRage
{
public class SickRageApi : ISickRageApi
{
public SickRageApi(IApi api, ILogger<SickRageApi> log)
{
_api = api;
_log = log;
}
private readonly IApi _api;
private readonly ILogger<SickRageApi> _log;
public async Task<SickRageSeasonList> VerifyShowHasLoaded(int tvdbId, string apiKey, string baseUrl)
{
var request = new Request($"/api/{apiKey}/?cmd=show.seasonlist", baseUrl, HttpMethod.Get);
request.AddQueryString("tvdbid", tvdbId.ToString());
return await _api.Request<SickRageSeasonList>(request);
}
public async Task<SickRageTvAdd> AddSeries(int tvdbId, string quality, string status, string apiKey, string baseUrl)
{
var request = new Request($"/api/{apiKey}/?cmd=show.addnew", baseUrl, HttpMethod.Get);
request.AddQueryString("tvdbid", tvdbId.ToString());
request.AddQueryString("status", status);
if (string.IsNullOrEmpty(quality))
{
quality = "default";
}
if (!quality.Equals("default", StringComparison.CurrentCultureIgnoreCase))
{
request.AddQueryString("initial", quality);
}
var obj = await _api.Request<SickRageTvAdd>(request);
return obj;
}
public async Task<SickRageTvAdd> AddSeason(int tvdbId, int season, string apiKey, string baseUrl)
{
var request = new Request($"/api/{apiKey}/?cmd=episode.setstatus", baseUrl, HttpMethod.Get);
request.AddQueryString("tvdbid", tvdbId.ToString());
request.AddQueryString("season", season.ToString());
request.AddQueryString("status", SickRageStatus.Wanted);
return await _api.Request<SickRageTvAdd>(request);
}
public async Task<SickRageShows> GetShows(string apiKey, string baseUrl)
{
var request = new Request($"/api/{apiKey}/?cmd=shows", baseUrl, HttpMethod.Get);
return await _api.Request<SickRageShows>(request);
}
public async Task<SickRageShowInformation> GetShow(int tvdbid, string apikey, string baseUrl)
{
var request = new Request($"/api/{apikey}/?cmd=show", baseUrl, HttpMethod.Get);
request.AddQueryString("tvdbid", tvdbid.ToString());
return await _api.Request<SickRageShowInformation>(request);
}
public async Task<SickRageEpisodes> GetEpisodesForSeason(int tvdbid, int season, string apikey, string baseUrl)
{
var request = new Request($"/api/{apikey}/?cmd=show.seasons", baseUrl, HttpMethod.Get);
request.AddQueryString("tvdbid", tvdbid.ToString());
request.AddQueryString("season", season.ToString());
return await _api.Request<SickRageEpisodes>(request);
}
public async Task<SickRagePing> Ping(string apiKey, string baseUrl)
{
var request = new Request($"/api/{apiKey}/?cmd=sb.ping", baseUrl, HttpMethod.Get);
return await _api.Request<SickRagePing>(request);
}
/// <summary>
/// Sets the epsiode status e.g. wanted
/// The episode number is optional, if not supplied it will set the whole season as the status passed in
/// </summary>
/// <returns></returns>
public async Task<SickRageEpisodeSetStatus> SetEpisodeStatus(string apiKey, string baseUrl, int tvdbid, string status, int season, int episode = -1)
{
var request = new Request($"/api/{apiKey}/?cmd=episode.setstatus", baseUrl, HttpMethod.Get);
request.AddQueryString("tvdbid", tvdbid.ToString());
request.AddQueryString("status", status);
request.AddQueryString("season", season.ToString());
if (episode != -1)
{
request.AddQueryString("episode", episode.ToString());
}
return await _api.Request<SickRageEpisodeSetStatus>(request);
}
public async Task<SeasonList> GetSeasonList(int tvdbId, string apikey, string baseurl)
{
var request = new Request($"/api/{apikey}/?cmd=show.seasonlist", baseurl, HttpMethod.Get);
request.AddQueryString("tvdbid", tvdbId.ToString());
return await _api.Request<SeasonList>(request);
}
}
}
| gpl-2.0 |
NunoLopes96/gsoc17_expand_extension_manager | components/com_config/Model/Templates.php | 3125 | <?php
/**
* @package Joomla.Site
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Config\Site\Model;
defined('_JEXEC') or die;
/**
* Template style model.
*
* @since 3.2
*/
class Templates extends Form
{
/**
* Method to auto-populate the model state.
*
* Note. Calling getState in this method will result in recursion.
*
* @return null
*
* @since 3.2
*/
protected function populateState()
{
parent::populateState();
$this->setState('params', \JComponentHelper::getParams('com_templates'));
}
/**
* Method to get the record form.
*
* @param array $data An optional array of data for the form to interogate.
* @param boolean $loadData True if the form is to load its own data (default case), false if not.
*
* @return \JForm A JForm object on success, false on failure
*
* @since 3.2
*/
public function getForm($data = array(), $loadData = true)
{
// Get the form.
$form = $this->loadForm('com_config.templates', 'templates', array('control' => 'jform', 'load_data' => $loadData));
try
{
$form = new \JForm('com_config.templates');
$data = array();
$this->preprocessForm($form, $data);
// Load the data into the form
$form->bind($data);
}
catch (\Exception $e)
{
\JFactory::getApplication()->enqueueMessage($e->getMessage());
return false;
}
if (empty($form))
{
return false;
}
return $form;
}
/**
* Method to preprocess the form
*
* @param \JForm $form A form object.
* @param mixed $data The data expected for the form.
* @param string $group Plugin group to load
*
* @return void
*
* @since 3.2
* @throws \Exception if there is an error in the form event.
*/
protected function preprocessForm(\JForm $form, $data, $group = 'content')
{
$lang = \JFactory::getLanguage();
$template = \JFactory::getApplication()->getTemplate();
jimport('joomla.filesystem.path');
// Load the core and/or local language file(s).
$lang->load('tpl_' . $template, JPATH_BASE, null, false, true)
|| $lang->load('tpl_' . $template, JPATH_BASE . '/templates/' . $template, null, false, true);
// Look for com_config.xml, which contains fileds to display
$formFile = \JPath::clean(JPATH_BASE . '/templates/' . $template . '/com_config.xml');
if (!file_exists($formFile))
{
// If com_config.xml not found, fall back to templateDetails.xml
$formFile = \JPath::clean(JPATH_BASE . '/templates/' . $template . '/templateDetails.xml');
}
// Get the template form.
if (file_exists($formFile) && !$form->loadFile($formFile, false, '//config'))
{
throw new \Exception(\JText::_('JERROR_LOADFILE_FAILED'));
}
// Attempt to load the xml file.
if (!$xml = simplexml_load_file($formFile))
{
throw new \Exception(\JText::_('JERROR_LOADFILE_FAILED'));
}
// Trigger the default form events.
parent::preprocessForm($form, $data, $group);
}
}
| gpl-2.0 |
Kirishanthy/LabUtil | LabUtil Version 1.0.0/administer/classes/shutdown.php | 2021 | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
require_once 'classes/config.php';
/**
* Description of shutdown
*
* @author Test
*/
class shutdown {
//put your code here
private $con,$date;
function __construct() {
$conn = new config();
$this->con = $conn->connection;
$this->date = date("Y-m-d");
}
public function setGroupShutdown($group){
$result_name = mysqli_query($this->con, "SELECT * FROM `profile` where `group` = '$group'");
while ($row_name = mysqli_fetch_array($result_name)) {
$mac = $row_name['mac'];
$date = $this->date;
$result = mysqli_query($this->con, "SELECT `mac` FROM `shutdown` WHERE `mac` = '$mac'");
$rows = mysqli_num_rows($result);
if($rows>0){
mysqli_query($this->con, "UPDATE `shutdown` SET `shutdown` = 'Activate',`date`='$date' WHERE `mac` = '$mac'");
}
else{
mysqli_query($this->con, "INSERT INTO `shutdown` (`mac` ,`shutdown` ,`date`) VALUES ('$mac', 'Activate', ' $date')");
}
}
}
public function setGroupShutdownOFF($group){
$date = $this->date;
$result_name = mysqli_query($this->con, "SELECT * FROM `profile` where `group` = '$group'");
while ($row_name = mysqli_fetch_array($result_name)) {
$mac = $row_name['mac'];
mysqli_query($this->con, "UPDATE `shutdown` SET `shutdown` = 'Deactivate',`date`='$date' WHERE `mac` = '$mac'");
}
}
public function getShutdownPC($mac){
$result = mysqli_query($this->con, "SELECT `shutdown` FROM `shutdown` WHERE `mac` = '$mac'");
while ($row1 = mysqli_fetch_array($result)) {
$state = $row1['shutdown'];
}
return $state;
}
}
?>
| gpl-2.0 |
joseclavijo/gsclube | wp-content/plugins/gantry5/src/classes/Gantry/Component/Controller/HtmlController.php | 1073 | <?php
/**
* @package Gantry5
* @author RocketTheme http://www.rockettheme.com
* @copyright Copyright (C) 2007 - 2015 RocketTheme, LLC
* @license Dual License: MIT or GNU/GPLv2 and later
*
* http://opensource.org/licenses/MIT
* http://www.gnu.org/licenses/gpl-2.0.html
*
* Gantry Framework code that extends GPL code is considered GNU/GPLv2 and later
*/
namespace Gantry\Component\Controller;
use Gantry\Component\Response\HtmlResponse;
use Gantry\Component\Response\Response;
abstract class HtmlController extends BaseController
{
/**
* Execute controller and returns Response object, defaulting to HtmlResponse.
*
* @param string $method
* @param array $path
* @param array $params
* @return mixed
* @throws \RuntimeException
*/
public function execute($method, array $path, array $params)
{
$response = parent::execute($method, $path, $params);
if (!$response instanceof Response) {
$response = new HtmlResponse($response);
}
return $response;
}
}
| gpl-2.0 |
unofficial-opensource-apple/gcc_40 | libjava/gnu/xml/xpath/Steps.java | 7027 | /* Steps.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package gnu.xml.xpath;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.Set;
import org.w3c.dom.Attr;
import org.w3c.dom.Node;
/**
* A list of transitions between components in a location path.
*
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
*/
public final class Steps
extends Path
{
final LinkedList path;
public Steps()
{
this(new LinkedList());
}
Steps(LinkedList path)
{
this.path = path;
}
public boolean matches(Node context)
{
// Right to left
return matches(context, path.size() - 1);
}
boolean matches(Node context, int pos)
{
Pattern right = (Pattern) path.get(pos);
if (!right.matches(context))
{
return false;
}
if (pos > 0)
{
Pattern left = (Pattern) path.get(pos - 1);
Iterator j = possibleContexts(right, context).iterator();
while (j.hasNext())
{
Node candidate = (Node) j.next();
if (left.matches(candidate) &&
matches(candidate, pos - 1))
{
return true;
}
// keep going, there may be another candidate
}
return false;
}
return true;
}
/**
* Essentially the reverse of Selector.addCandidates.
* The idea is to determine possible context nodes for a match.
*/
Collection possibleContexts(Pattern pattern, Node context)
{
if (pattern instanceof Selector)
{
Selector s = (Selector) pattern;
Collection candidates = new LinkedHashSet();
switch (s.axis)
{
case Selector.PARENT:
s.addChildNodes(context, candidates, false);
break;
case Selector.ANCESTOR:
s.addChildNodes(context, candidates, true);
break;
case Selector.ANCESTOR_OR_SELF:
candidates.add (context);
s.addChildNodes(context, candidates, true);
break;
case Selector.CHILD:
s.addParentNode(context, candidates, false);
break;
case Selector.DESCENDANT:
s.addParentNode(context, candidates, true);
break;
case Selector.DESCENDANT_OR_SELF:
candidates.add(context);
s.addParentNode(context, candidates, true);
break;
case Selector.PRECEDING_SIBLING:
s.addFollowingNodes(context, candidates, false);
break;
case Selector.FOLLOWING_SIBLING:
s.addPrecedingNodes(context, candidates, false);
break;
case Selector.PRECEDING:
s.addFollowingNodes(context, candidates, true);
break;
case Selector.FOLLOWING:
s.addPrecedingNodes(context, candidates, true);
break;
case Selector.ATTRIBUTE:
case Selector.NAMESPACE:
if (context.getNodeType() == Node.ATTRIBUTE_NODE)
{
candidates.add(((Attr) context).getOwnerElement());
}
break;
case Selector.SELF:
candidates.add(context);
break;
}
return candidates;
}
return Collections.EMPTY_SET;
}
public Object evaluate(Node context, int pos, int len)
{
//System.err.println(toString()+" evaluate");
// Left to right
Iterator i = path.iterator();
Expr lhs = (Expr) i.next();
Object val = lhs.evaluate(context, pos, len);
//System.err.println("\tevaluate "+lhs+" = "+val);
while (val instanceof Collection && i.hasNext())
{
Path rhs = (Path) i.next();
val = rhs.evaluate(context, (Collection) val);
//System.err.println("\tevaluate "+rhs+" = "+val);
}
return val;
}
Collection evaluate(Node context, Collection ns)
{
// Left to right
Iterator i = path.iterator();
Expr lhs = (Expr) i.next();
if (lhs instanceof Path)
{
ns = ((Path) lhs).evaluate(context, ns);
}
else
{
Set acc = new LinkedHashSet();
int pos = 1, len = ns.size();
for (Iterator j = ns.iterator(); j.hasNext(); )
{
Node node = (Node) j.next();
Object ret = lhs.evaluate(node, pos++, len);
if (ret instanceof Collection)
{
acc.addAll((Collection) ret);
}
}
ns = acc;
}
while (i.hasNext())
{
Path rhs = (Path) i.next();
ns = rhs.evaluate(context, ns);
}
return ns;
}
public Expr clone(Object context)
{
int len = path.size();
LinkedList path2 = new LinkedList();
for (int i = 0; i < len; i++)
{
path2.add(((Expr) path.get(i)).clone(context));
}
return new Steps(path2);
}
public String toString()
{
StringBuffer buf = new StringBuffer();
Iterator i = path.iterator();
Expr expr = (Expr) i.next();
if (!(expr instanceof Root))
{
buf.append(expr);
}
while (i.hasNext())
{
expr = (Expr) i.next();
buf.append('/');
buf.append(expr);
}
return buf.toString();
}
}
| gpl-2.0 |
SalvationDevelopment/Salvation-Scripts-TCG | c3536537.lua | 1356 | --ヴェルズ・ザッハーク
function c3536537.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(3536537,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c3536537.descon)
e1:SetTarget(c3536537.destg)
e1:SetOperation(c3536537.desop)
c:RegisterEffect(e1)
end
function c3536537.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp~=tp and c:GetPreviousControler()==tp and bit.band(r,REASON_DESTROY)~=0
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP)
end
function c3536537.filter(c)
return c:IsFaceup() and c:IsLevelAbove(5) and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)~=0
end
function c3536537.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c3536537.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c3536537.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c3536537.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
| gpl-2.0 |
myran2/MassChaosCore | src/server/game/Handlers/CharacterHandler.cpp | 71798 | /*
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Common.h"
#include "ObjectAccessor.h"
#include "ObjectMgr.h"
#include "ArenaTeamMgr.h"
#include "GuildMgr.h"
#include "SystemConfig.h"
#include "World.h"
#include "WorldPacket.h"
#include "WorldSession.h"
#include "DatabaseEnv.h"
#include "ArenaTeam.h"
#include "Chat.h"
#include "Group.h"
#include "Guild.h"
#include "Language.h"
#include "Log.h"
#include "Opcodes.h"
#include "Player.h"
#include "PlayerDump.h"
#include "SharedDefines.h"
#include "SocialMgr.h"
#include "UpdateMask.h"
#include "Util.h"
#include "ScriptMgr.h"
#include "Battleground.h"
#include "AccountMgr.h"
#include "LFGMgr.h"
class LoginQueryHolder : public SQLQueryHolder
{
private:
uint32 m_accountId;
uint64 m_guid;
public:
LoginQueryHolder(uint32 accountId, uint64 guid)
: m_accountId(accountId), m_guid(guid) { }
uint64 GetGuid() const { return m_guid; }
uint32 GetAccountId() const { return m_accountId; }
bool Initialize();
};
bool LoginQueryHolder::Initialize()
{
SetSize(MAX_PLAYER_LOGIN_QUERY);
bool res = true;
uint32 lowGuid = GUID_LOPART(m_guid);
PreparedStatement* stmt = NULL;
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADFROM, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GROUP_MEMBER);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADGROUP, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_INSTANCE);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADBOUNDINSTANCES, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_AURAS);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADAURAS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_SPELL);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADSPELLS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_QUESTSTATUS);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADQUESTSTATUS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_DAILYQUESTSTATUS);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADDAILYQUESTSTATUS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_WEEKLYQUESTSTATUS);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADWEEKLYQUESTSTATUS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_SEASONALQUESTSTATUS);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADSEASONALQUESTSTATUS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_REPUTATION);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADREPUTATION, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_INVENTORY);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADINVENTORY, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_ACTIONS);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADACTIONS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_MAILCOUNT);
stmt->setUInt32(0, lowGuid);
stmt->setUInt64(1, uint64(time(NULL)));
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADMAILCOUNT, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_MAILDATE);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADMAILDATE, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_SOCIALLIST);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADSOCIALLIST, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_HOMEBIND);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADHOMEBIND, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_SPELLCOOLDOWNS);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADSPELLCOOLDOWNS, stmt);
if (sWorld->getBoolConfig(CONFIG_DECLINED_NAMES_USED))
{
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_DECLINEDNAMES);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADDECLINEDNAMES, stmt);
}
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUILD_MEMBER);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADGUILD, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_ARENAINFO);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADARENAINFO, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_ACHIEVEMENTS);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADACHIEVEMENTS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_CRITERIAPROGRESS);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADCRITERIAPROGRESS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_EQUIPMENTSETS);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADEQUIPMENTSETS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_BGDATA);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADBGDATA, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_GLYPHS);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADGLYPHS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_TALENTS);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADTALENTS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PLAYER_ACCOUNT_DATA);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADACCOUNTDATA, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_SKILLS);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADSKILLS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_RANDOMBG);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADRANDOMBG, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_BANNED);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADBANNED, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_QUESTSTATUSREW);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADQUESTSTATUSREW, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ACCOUNT_INSTANCELOCKTIMES);
stmt->setUInt32(0, m_accountId);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADINSTANCELOCKTIMES, stmt);
return res;
}
void WorldSession::HandleCharEnum(PreparedQueryResult result)
{
WorldPacket data(SMSG_CHAR_ENUM, 100); // we guess size
uint8 num = 0;
data << num;
_allowedCharsToLogin.clear();
if (result)
{
do
{
uint32 guidlow = (*result)[0].GetUInt32();
sLog->outDetail("Loading char guid %u from account %u.", guidlow, GetAccountId());
if (Player::BuildEnumData(result, &data))
{
_allowedCharsToLogin.insert(guidlow);
++num;
}
}
while (result->NextRow());
}
data.put<uint8>(0, num);
SendPacket(&data);
}
void WorldSession::HandleCharEnumOpcode(WorldPacket & /*recv_data*/)
{
// remove expired bans
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_EXPIRED_BANS);
CharacterDatabase.Execute(stmt);
/// get all the data necessary for loading all characters (along with their pets) on the account
if (sWorld->getBoolConfig(CONFIG_DECLINED_NAMES_USED))
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ENUM_DECLINED_NAME);
else
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ENUM);
stmt->setUInt8(0, PET_SAVE_AS_CURRENT);
stmt->setUInt32(1, GetAccountId());
_charEnumCallback = CharacterDatabase.AsyncQuery(stmt);
}
void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
{
std::string name;
uint8 race_, class_;
recv_data >> name;
recv_data >> race_;
recv_data >> class_;
// extract other data required for player creating
uint8 gender, skin, face, hairStyle, hairColor, facialHair, outfitId;
recv_data >> gender >> skin >> face;
recv_data >> hairStyle >> hairColor >> facialHair >> outfitId;
WorldPacket data(SMSG_CHAR_CREATE, 1); // returned with diff.values in all cases
if (AccountMgr::IsPlayerAccount(GetSecurity()))
{
if (uint32 mask = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_DISABLED))
{
bool disabled = false;
uint32 team = Player::TeamForRace(race_);
switch (team)
{
case ALLIANCE: disabled = mask & (1 << 0); break;
case HORDE: disabled = mask & (1 << 1); break;
}
if (disabled)
{
data << (uint8)CHAR_CREATE_DISABLED;
SendPacket(&data);
return;
}
}
}
ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(class_);
if (!classEntry)
{
data << (uint8)CHAR_CREATE_FAILED;
SendPacket(&data);
sLog->outError("Class (%u) not found in DBC while creating new char for account (ID: %u): wrong DBC files or cheater?", class_, GetAccountId());
return;
}
ChrRacesEntry const* raceEntry = sChrRacesStore.LookupEntry(race_);
if (!raceEntry)
{
data << (uint8)CHAR_CREATE_FAILED;
SendPacket(&data);
sLog->outError("Race (%u) not found in DBC while creating new char for account (ID: %u): wrong DBC files or cheater?", race_, GetAccountId());
return;
}
// prevent character creating Expansion race without Expansion account
if (raceEntry->expansion > Expansion())
{
data << (uint8)CHAR_CREATE_EXPANSION;
sLog->outError("Expansion %u account:[%d] tried to Create character with expansion %u race (%u)", Expansion(), GetAccountId(), raceEntry->expansion, race_);
SendPacket(&data);
return;
}
// prevent character creating Expansion class without Expansion account
if (classEntry->expansion > Expansion())
{
data << (uint8)CHAR_CREATE_EXPANSION_CLASS;
sLog->outError("Expansion %u account:[%d] tried to Create character with expansion %u class (%u)", Expansion(), GetAccountId(), classEntry->expansion, class_);
SendPacket(&data);
return;
}
if (AccountMgr::IsPlayerAccount(GetSecurity()))
{
uint32 raceMaskDisabled = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_DISABLED_RACEMASK);
if ((1 << (race_ - 1)) & raceMaskDisabled)
{
data << uint8(CHAR_CREATE_DISABLED);
SendPacket(&data);
return;
}
uint32 classMaskDisabled = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_DISABLED_CLASSMASK);
if ((1 << (class_ - 1)) & classMaskDisabled)
{
data << uint8(CHAR_CREATE_DISABLED);
SendPacket(&data);
return;
}
}
// prevent character creating with invalid name
if (!normalizePlayerName(name))
{
data << (uint8)CHAR_NAME_NO_NAME;
SendPacket(&data);
sLog->outError("Account:[%d] but tried to Create character with empty [name] ", GetAccountId());
return;
}
// check name limitations
uint8 res = ObjectMgr::CheckPlayerName(name, true);
if (res != CHAR_NAME_SUCCESS)
{
data << uint8(res);
SendPacket(&data);
return;
}
if (AccountMgr::IsPlayerAccount(GetSecurity()) && sObjectMgr->IsReservedName(name))
{
data << (uint8)CHAR_NAME_RESERVED;
SendPacket(&data);
return;
}
// speedup check for heroic class disabled case
uint32 heroic_free_slots = sWorld->getIntConfig(CONFIG_HEROIC_CHARACTERS_PER_REALM);
if (heroic_free_slots == 0 && AccountMgr::IsPlayerAccount(GetSecurity()) && class_ == CLASS_DEATH_KNIGHT)
{
data << (uint8)CHAR_CREATE_UNIQUE_CLASS_LIMIT;
SendPacket(&data);
return;
}
// speedup check for heroic class disabled case
uint32 req_level_for_heroic = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_HEROIC_CHARACTER);
if (AccountMgr::IsPlayerAccount(GetSecurity()) && class_ == CLASS_DEATH_KNIGHT && req_level_for_heroic > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
{
data << (uint8)CHAR_CREATE_LEVEL_REQUIREMENT;
SendPacket(&data);
return;
}
delete _charCreateCallback.GetParam(); // Delete existing if any, to make the callback chain reset to stage 0
_charCreateCallback.SetParam(new CharacterCreateInfo(name, race_, class_, gender, skin, face, hairStyle, hairColor, facialHair, outfitId, recv_data));
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHECK_NAME);
stmt->setString(0, name);
_charCreateCallback.SetFutureResult(CharacterDatabase.AsyncQuery(stmt));
}
void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, CharacterCreateInfo* createInfo)
{
/** This is a series of callbacks executed consecutively as a result from the database becomes available.
This is much more efficient than synchronous requests on packet handler, and much less DoS prone.
It also prevents data syncrhonisation errors.
*/
switch (_charCreateCallback.GetStage())
{
case 0:
{
if (result)
{
WorldPacket data(SMSG_CHAR_CREATE, 1);
data << uint8(CHAR_CREATE_NAME_IN_USE);
SendPacket(&data);
delete createInfo;
_charCreateCallback.Reset();
return;
}
ASSERT(_charCreateCallback.GetParam() == createInfo);
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_SUM_REALM_CHARACTERS);
stmt->setUInt32(0, GetAccountId());
_charCreateCallback.FreeResult();
_charCreateCallback.SetFutureResult(LoginDatabase.AsyncQuery(stmt));
_charCreateCallback.NextStage();
}
break;
case 1:
{
uint16 acctCharCount = 0;
if (result)
{
Field* fields = result->Fetch();
// SELECT SUM(x) is MYSQL_TYPE_NEWDECIMAL - needs to be read as string
const char* ch = fields[0].GetCString();
if (ch)
acctCharCount = atoi(ch);
}
if (acctCharCount >= sWorld->getIntConfig(CONFIG_CHARACTERS_PER_ACCOUNT))
{
WorldPacket data(SMSG_CHAR_CREATE, 1);
data << uint8(CHAR_CREATE_ACCOUNT_LIMIT);
SendPacket(&data);
delete createInfo;
_charCreateCallback.Reset();
return;
}
ASSERT(_charCreateCallback.GetParam() == createInfo);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_SUM_CHARS);
stmt->setUInt32(0, GetAccountId());
_charCreateCallback.FreeResult();
_charCreateCallback.SetFutureResult(CharacterDatabase.AsyncQuery(stmt));
_charCreateCallback.NextStage();
}
break;
case 2:
{
if (result)
{
Field* fields = result->Fetch();
createInfo->CharCount = uint8(fields[0].GetUInt64()); // SQL's COUNT() returns uint64 but it will always be less than uint8.Max
if (createInfo->CharCount >= sWorld->getIntConfig(CONFIG_CHARACTERS_PER_REALM))
{
WorldPacket data(SMSG_CHAR_CREATE, 1);
data << uint8(CHAR_CREATE_SERVER_LIMIT);
SendPacket(&data);
delete createInfo;
_charCreateCallback.Reset();
return;
}
}
bool allowTwoSideAccounts = !sWorld->IsPvPRealm() || sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_ACCOUNTS) || !AccountMgr::IsPlayerAccount(GetSecurity());
uint32 skipCinematics = sWorld->getIntConfig(CONFIG_SKIP_CINEMATICS);
_charCreateCallback.FreeResult();
if (!allowTwoSideAccounts || skipCinematics == 1 || createInfo->Class == CLASS_DEATH_KNIGHT)
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_CREATE_INFO);
stmt->setUInt32(0, GetAccountId());
stmt->setUInt32(1, (skipCinematics == 1 || createInfo->Class == CLASS_DEATH_KNIGHT) ? 10 : 1);
_charCreateCallback.SetFutureResult(CharacterDatabase.AsyncQuery(stmt));
_charCreateCallback.NextStage();
return;
}
_charCreateCallback.NextStage();
HandleCharCreateCallback(PreparedQueryResult(NULL), createInfo); // Will jump to case 3
}
break;
case 3:
{
bool haveSameRace = false;
uint32 heroicReqLevel = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_HEROIC_CHARACTER);
bool hasHeroicReqLevel = (heroicReqLevel == 0);
bool allowTwoSideAccounts = !sWorld->IsPvPRealm() || sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_ACCOUNTS) || !AccountMgr::IsPlayerAccount(GetSecurity());
uint32 skipCinematics = sWorld->getIntConfig(CONFIG_SKIP_CINEMATICS);
if (result)
{
uint32 team = Player::TeamForRace(createInfo->Race);
uint32 freeHeroicSlots = sWorld->getIntConfig(CONFIG_HEROIC_CHARACTERS_PER_REALM);
Field* field = result->Fetch();
uint8 accRace = field[1].GetUInt8();
if (AccountMgr::IsPlayerAccount(GetSecurity()) && createInfo->Class == CLASS_DEATH_KNIGHT)
{
uint8 accClass = field[2].GetUInt8();
if (accClass == CLASS_DEATH_KNIGHT)
{
if (freeHeroicSlots > 0)
--freeHeroicSlots;
if (freeHeroicSlots == 0)
{
WorldPacket data(SMSG_CHAR_CREATE, 1);
data << uint8(CHAR_CREATE_UNIQUE_CLASS_LIMIT);
SendPacket(&data);
delete createInfo;
_charCreateCallback.Reset();
return;
}
}
if (!hasHeroicReqLevel)
{
uint8 accLevel = field[0].GetUInt8();
if (accLevel >= heroicReqLevel)
hasHeroicReqLevel = true;
}
}
// need to check team only for first character
// TODO: what to if account already has characters of both races?
if (!allowTwoSideAccounts)
{
uint32 accTeam = 0;
if (accRace > 0)
accTeam = Player::TeamForRace(accRace);
if (accTeam != team)
{
WorldPacket data(SMSG_CHAR_CREATE, 1);
data << uint8(CHAR_CREATE_PVP_TEAMS_VIOLATION);
SendPacket(&data);
delete createInfo;
_charCreateCallback.Reset();
return;
}
}
// search same race for cinematic or same class if need
// TODO: check if cinematic already shown? (already logged in?; cinematic field)
while ((skipCinematics == 1 && !haveSameRace) || createInfo->Class == CLASS_DEATH_KNIGHT)
{
if (!result->NextRow())
break;
field = result->Fetch();
accRace = field[1].GetUInt8();
if (!haveSameRace)
haveSameRace = createInfo->Race == accRace;
if (AccountMgr::IsPlayerAccount(GetSecurity()) && createInfo->Class == CLASS_DEATH_KNIGHT)
{
uint8 acc_class = field[2].GetUInt8();
if (acc_class == CLASS_DEATH_KNIGHT)
{
if (freeHeroicSlots > 0)
--freeHeroicSlots;
if (freeHeroicSlots == 0)
{
WorldPacket data(SMSG_CHAR_CREATE, 1);
data << uint8(CHAR_CREATE_UNIQUE_CLASS_LIMIT);
SendPacket(&data);
delete createInfo;
_charCreateCallback.Reset();
return;
}
}
if (!hasHeroicReqLevel)
{
uint8 acc_level = field[0].GetUInt8();
if (acc_level >= heroicReqLevel)
hasHeroicReqLevel = true;
}
}
}
}
if (AccountMgr::IsPlayerAccount(GetSecurity()) && createInfo->Class == CLASS_DEATH_KNIGHT && !hasHeroicReqLevel)
{
WorldPacket data(SMSG_CHAR_CREATE, 1);
data << uint8(CHAR_CREATE_LEVEL_REQUIREMENT);
SendPacket(&data);
delete createInfo;
_charCreateCallback.Reset();
return;
}
if (createInfo->Data.rpos() < createInfo->Data.wpos())
{
uint8 unk;
createInfo->Data >> unk;
sLog->outDebug(LOG_FILTER_NETWORKIO, "Character creation %s (account %u) has unhandled tail data: [%u]", createInfo->Name.c_str(), GetAccountId(), unk);
}
Player newChar(this);
newChar.GetMotionMaster()->Initialize();
if (!newChar.Create(sObjectMgr->GenerateLowGuid(HIGHGUID_PLAYER), createInfo))
{
// Player not create (race/class/etc problem?)
newChar.CleanupsBeforeDelete();
WorldPacket data(SMSG_CHAR_CREATE, 1);
data << uint8(CHAR_CREATE_ERROR);
SendPacket(&data);
delete createInfo;
_charCreateCallback.Reset();
return;
}
if ((haveSameRace && skipCinematics == 1) || skipCinematics == 2)
newChar.setCinematic(1); // not show intro
newChar.SetAtLoginFlag(AT_LOGIN_FIRST); // First login
// Player created, save it now
newChar.SaveToDB(true);
createInfo->CharCount += 1;
SQLTransaction trans = LoginDatabase.BeginTransaction();
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_DEL_REALM_CHARACTERS_BY_REALM);
stmt->setUInt32(0, GetAccountId());
stmt->setUInt32(1, realmID);
trans->Append(stmt);
stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_REALM_CHARACTERS);
stmt->setUInt32(0, createInfo->CharCount);
stmt->setUInt32(1, GetAccountId());
stmt->setUInt32(2, realmID);
trans->Append(stmt);
LoginDatabase.CommitTransaction(trans);
WorldPacket data(SMSG_CHAR_CREATE, 1);
data << uint8(CHAR_CREATE_SUCCESS);
SendPacket(&data);
std::string IP_str = GetRemoteAddress();
sLog->outDetail("Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), createInfo->Name.c_str(), newChar.GetGUIDLow());
sLog->outChar("Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), createInfo->Name.c_str(), newChar.GetGUIDLow());
sScriptMgr->OnPlayerCreate(&newChar);
sWorld->AddCharacterNameData(newChar.GetGUIDLow(), std::string(newChar.GetName()), newChar.getGender(), newChar.getRace(), newChar.getClass());
newChar.CleanupsBeforeDelete();
delete createInfo;
_charCreateCallback.Reset();
}
break;
}
}
void WorldSession::HandleCharDeleteOpcode(WorldPacket & recv_data)
{
uint64 guid;
recv_data >> guid;
// can't delete loaded character
if (ObjectAccessor::FindPlayer(guid))
return;
uint32 accountId = 0;
std::string name;
// is guild leader
if (sGuildMgr->GetGuildByLeader(guid))
{
WorldPacket data(SMSG_CHAR_DELETE, 1);
data << (uint8)CHAR_DELETE_FAILED_GUILD_LEADER;
SendPacket(&data);
return;
}
// is arena team captain
if (sArenaTeamMgr->GetArenaTeamByCaptain(guid))
{
WorldPacket data(SMSG_CHAR_DELETE, 1);
data << (uint8)CHAR_DELETE_FAILED_ARENA_CAPTAIN;
SendPacket(&data);
return;
}
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ACCOUNT_NAME_BY_GUID);
stmt->setUInt32(0, GUID_LOPART(guid));
PreparedQueryResult result = CharacterDatabase.Query(stmt);
if (result)
{
Field* fields = result->Fetch();
accountId = fields[0].GetUInt32();
name = fields[1].GetString();
}
// prevent deleting other players' characters using cheating tools
if (accountId != GetAccountId())
return;
std::string IP_str = GetRemoteAddress();
sLog->outDetail("Account: %d (IP: %s) Delete Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), GUID_LOPART(guid));
sLog->outChar("Account: %d (IP: %s) Delete Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), GUID_LOPART(guid));
sScriptMgr->OnPlayerDelete(guid);
sWorld->DeleteCharaceterNameData(GUID_LOPART(guid));
if (sLog->IsOutCharDump()) // optimize GetPlayerDump call
{
std::string dump;
if (PlayerDumpWriter().GetDump(GUID_LOPART(guid), dump))
sLog->outCharDump(dump.c_str(), GetAccountId(), GUID_LOPART(guid), name.c_str());
}
Player::DeleteFromDB(guid, GetAccountId());
WorldPacket data(SMSG_CHAR_DELETE, 1);
data << (uint8)CHAR_DELETE_SUCCESS;
SendPacket(&data);
}
void WorldSession::HandlePlayerLoginOpcode(WorldPacket & recv_data)
{
if (PlayerLoading() || GetPlayer() != NULL)
{
sLog->outError("Player tryes to login again, AccountId = %d", GetAccountId());
return;
}
m_playerLoading = true;
uint64 playerGuid = 0;
sLog->outStaticDebug("WORLD: Recvd Player Logon Message");
recv_data >> playerGuid;
if (!CharCanLogin(GUID_LOPART(playerGuid)))
{
sLog->outError("Account (%u) can't login with that character (%u).", GetAccountId(), GUID_LOPART(playerGuid));
KickPlayer();
return;
}
LoginQueryHolder *holder = new LoginQueryHolder(GetAccountId(), playerGuid);
if (!holder->Initialize())
{
delete holder; // delete all unprocessed queries
m_playerLoading = false;
return;
}
_charLoginCallback = CharacterDatabase.DelayQueryHolder((SQLQueryHolder*)holder);
}
void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
{
uint64 playerGuid = holder->GetGuid();
Player* pCurrChar = new Player(this);
// for send server info and strings (config)
ChatHandler chH = ChatHandler(pCurrChar);
// "GetAccountId() == db stored account id" checked in LoadFromDB (prevent login not own character using cheating tools)
if (!pCurrChar->LoadFromDB(GUID_LOPART(playerGuid), holder))
{
SetPlayer(NULL);
KickPlayer(); // disconnect client, player no set to session and it will not deleted or saved at kick
delete pCurrChar; // delete it manually
delete holder; // delete all unprocessed queries
m_playerLoading = false;
return;
}
pCurrChar->GetMotionMaster()->Initialize();
pCurrChar->SendDungeonDifficulty(false);
WorldPacket data(SMSG_LOGIN_VERIFY_WORLD, 20);
data << pCurrChar->GetMapId();
data << pCurrChar->GetPositionX();
data << pCurrChar->GetPositionY();
data << pCurrChar->GetPositionZ();
data << pCurrChar->GetOrientation();
SendPacket(&data);
// load player specific part before send times
LoadAccountData(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADACCOUNTDATA), PER_CHARACTER_CACHE_MASK);
SendAccountDataTimes(PER_CHARACTER_CACHE_MASK);
data.Initialize(SMSG_FEATURE_SYSTEM_STATUS, 2); // added in 2.2.0
data << uint8(2); // unknown value
data << uint8(0); // enable(1)/disable(0) voice chat interface in client
SendPacket(&data);
// Send MOTD
{
data.Initialize(SMSG_MOTD, 50); // new in 2.0.1
data << (uint32)0;
uint32 linecount=0;
std::string str_motd = sWorld->GetMotd();
std::string::size_type pos, nextpos;
pos = 0;
while ((nextpos= str_motd.find('@', pos)) != std::string::npos)
{
if (nextpos != pos)
{
data << str_motd.substr(pos, nextpos-pos);
++linecount;
}
pos = nextpos+1;
}
if (pos<str_motd.length())
{
data << str_motd.substr(pos);
++linecount;
}
data.put(0, linecount);
SendPacket(&data);
sLog->outStaticDebug("WORLD: Sent motd (SMSG_MOTD)");
// send server info
if (sWorld->getIntConfig(CONFIG_ENABLE_SINFO_LOGIN) == 1)
chH.PSendSysMessage(_FULLVERSION);
sLog->outStaticDebug("WORLD: Sent server info");
}
//QueryResult* result = CharacterDatabase.PQuery("SELECT guildid, rank FROM guild_member WHERE guid = '%u'", pCurrChar->GetGUIDLow());
if (PreparedQueryResult resultGuild = holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADGUILD))
{
Field* fields = resultGuild->Fetch();
pCurrChar->SetInGuild(fields[0].GetUInt32());
pCurrChar->SetRank(fields[1].GetUInt8());
}
else if (pCurrChar->GetGuildId()) // clear guild related fields in case wrong data about non existed membership
{
pCurrChar->SetInGuild(0);
pCurrChar->SetRank(0);
}
if (pCurrChar->GetGuildId() != 0)
{
if (Guild* guild = sGuildMgr->GetGuildById(pCurrChar->GetGuildId()))
guild->SendLoginInfo(this);
else
{
// remove wrong guild data
sLog->outError("Player %s (GUID: %u) marked as member of not existing guild (id: %u), removing guild membership for player.", pCurrChar->GetName(), pCurrChar->GetGUIDLow(), pCurrChar->GetGuildId());
pCurrChar->SetInGuild(0);
}
}
data.Initialize(SMSG_LEARNED_DANCE_MOVES, 4+4);
data << uint32(0);
data << uint32(0);
SendPacket(&data);
pCurrChar->SendInitialPacketsBeforeAddToMap();
//Show cinematic at the first time that player login
if (!pCurrChar->getCinematic())
{
pCurrChar->setCinematic(1);
if (ChrClassesEntry const* cEntry = sChrClassesStore.LookupEntry(pCurrChar->getClass()))
{
if (cEntry->CinematicSequence)
pCurrChar->SendCinematicStart(cEntry->CinematicSequence);
else if (ChrRacesEntry const* rEntry = sChrRacesStore.LookupEntry(pCurrChar->getRace()))
pCurrChar->SendCinematicStart(rEntry->CinematicSequence);
// send new char string if not empty
if (!sWorld->GetNewCharString().empty())
chH.PSendSysMessage("%s", sWorld->GetNewCharString().c_str());
}
}
if (Group* group = pCurrChar->GetGroup())
{
if (group->isLFGGroup())
{
LfgDungeonSet Dungeons;
Dungeons.insert(sLFGMgr->GetDungeon(group->GetGUID()));
sLFGMgr->SetSelectedDungeons(pCurrChar->GetGUID(), Dungeons);
sLFGMgr->SetState(pCurrChar->GetGUID(), sLFGMgr->GetState(group->GetGUID()));
}
}
if (!pCurrChar->GetMap()->AddPlayerToMap(pCurrChar) || !pCurrChar->CheckInstanceLoginValid())
{
AreaTrigger const* at = sObjectMgr->GetGoBackTrigger(pCurrChar->GetMapId());
if (at)
pCurrChar->TeleportTo(at->target_mapId, at->target_X, at->target_Y, at->target_Z, pCurrChar->GetOrientation());
else
pCurrChar->TeleportTo(pCurrChar->m_homebindMapId, pCurrChar->m_homebindX, pCurrChar->m_homebindY, pCurrChar->m_homebindZ, pCurrChar->GetOrientation());
}
sObjectAccessor->AddObject(pCurrChar);
//sLog->outDebug("Player %s added to Map.", pCurrChar->GetName());
pCurrChar->SendInitialPacketsAfterAddToMap();
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_ONLINE);
stmt->setUInt32(0, pCurrChar->GetGUIDLow());
CharacterDatabase.Execute(stmt);
stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_ACCOUNT_ONLINE);
stmt->setUInt32(0, GetAccountId());
LoginDatabase.Execute(stmt);
pCurrChar->SetInGameTime(getMSTime());
// announce group about member online (must be after add to player list to receive announce to self)
if (Group* group = pCurrChar->GetGroup())
{
//pCurrChar->groupInfo.group->SendInit(this); // useless
group->SendUpdate();
group->ResetMaxEnchantingLevel();
}
// friend status
sSocialMgr->SendFriendStatus(pCurrChar, FRIEND_ONLINE, pCurrChar->GetGUIDLow(), true);
// Place character in world (and load zone) before some object loading
pCurrChar->LoadCorpse();
// setting Ghost+speed if dead
if (pCurrChar->m_deathState != ALIVE)
{
// not blizz like, we must correctly save and load player instead...
if (pCurrChar->getRace() == RACE_NIGHTELF)
pCurrChar->CastSpell(pCurrChar, 20584, true, 0);// auras SPELL_AURA_INCREASE_SPEED(+speed in wisp form), SPELL_AURA_INCREASE_SWIM_SPEED(+swim speed in wisp form), SPELL_AURA_TRANSFORM (to wisp form)
pCurrChar->CastSpell(pCurrChar, 8326, true, 0); // auras SPELL_AURA_GHOST, SPELL_AURA_INCREASE_SPEED(why?), SPELL_AURA_INCREASE_SWIM_SPEED(why?)
pCurrChar->SetMovement(MOVE_WATER_WALK);
}
pCurrChar->ContinueTaxiFlight();
// reset for all pets before pet loading
if (pCurrChar->HasAtLoginFlag(AT_LOGIN_RESET_PET_TALENTS))
Pet::resetTalentsForAllPetsOf(pCurrChar);
// Load pet if any (if player not alive and in taxi flight or another then pet will remember as temporary unsummoned)
pCurrChar->LoadPet();
// Set FFA PvP for non GM in non-rest mode
if (sWorld->IsFFAPvPRealm() && !pCurrChar->isGameMaster() && !pCurrChar->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING))
pCurrChar->SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
if (pCurrChar->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_CONTESTED_PVP))
pCurrChar->SetContestedPvP();
// Apply at_login requests
if (pCurrChar->HasAtLoginFlag(AT_LOGIN_RESET_SPELLS))
{
pCurrChar->resetSpells();
SendNotification(LANG_RESET_SPELLS);
}
if (pCurrChar->HasAtLoginFlag(AT_LOGIN_RESET_TALENTS))
{
pCurrChar->resetTalents(true);
pCurrChar->SendTalentsInfoData(false); // original talents send already in to SendInitialPacketsBeforeAddToMap, resend reset state
SendNotification(LANG_RESET_TALENTS);
}
if (pCurrChar->HasAtLoginFlag(AT_LOGIN_FIRST))
pCurrChar->RemoveAtLoginFlag(AT_LOGIN_FIRST);
// show time before shutdown if shutdown planned.
if (sWorld->IsShuttingDown())
sWorld->ShutdownMsg(true, pCurrChar);
if (sWorld->getBoolConfig(CONFIG_ALL_TAXI_PATHS))
pCurrChar->SetTaxiCheater(true);
if (pCurrChar->isGameMaster())
SendNotification(LANG_GM_ON);
std::string IP_str = GetRemoteAddress();
sLog->outChar("Account: %d (IP: %s) Login Character:[%s] (GUID: %u) Level: %d",
GetAccountId(), IP_str.c_str(), pCurrChar->GetName(), pCurrChar->GetGUIDLow(), pCurrChar->getLevel());
if (!pCurrChar->IsStandState() && !pCurrChar->HasUnitState(UNIT_STATE_STUNNED))
pCurrChar->SetStandState(UNIT_STAND_STATE_STAND);
m_playerLoading = false;
sScriptMgr->OnPlayerLogin(pCurrChar);
delete holder;
}
void WorldSession::HandleSetFactionAtWar(WorldPacket & recv_data)
{
sLog->outStaticDebug("WORLD: Received CMSG_SET_FACTION_ATWAR");
uint32 repListID;
uint8 flag;
recv_data >> repListID;
recv_data >> flag;
GetPlayer()->GetReputationMgr().SetAtWar(repListID, flag);
}
//I think this function is never used :/ I dunno, but i guess this opcode not exists
void WorldSession::HandleSetFactionCheat(WorldPacket & /*recv_data*/)
{
sLog->outError("WORLD SESSION: HandleSetFactionCheat, not expected call, please report.");
GetPlayer()->GetReputationMgr().SendStates();
}
void WorldSession::HandleTutorialFlag(WorldPacket & recv_data)
{
uint32 data;
recv_data >> data;
uint8 index = uint8(data / 32);
if (index >= MAX_ACCOUNT_TUTORIAL_VALUES)
return;
uint32 value = (data % 32);
uint32 flag = GetTutorialInt(index);
flag |= (1 << value);
SetTutorialInt(index, flag);
}
void WorldSession::HandleTutorialClear(WorldPacket & /*recv_data*/)
{
for (uint8 i = 0; i < MAX_ACCOUNT_TUTORIAL_VALUES; ++i)
SetTutorialInt(i, 0xFFFFFFFF);
}
void WorldSession::HandleTutorialReset(WorldPacket & /*recv_data*/)
{
for (uint8 i = 0; i < MAX_ACCOUNT_TUTORIAL_VALUES; ++i)
SetTutorialInt(i, 0x00000000);
}
void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket & recv_data)
{
sLog->outStaticDebug("WORLD: Received CMSG_SET_WATCHED_FACTION");
uint32 fact;
recv_data >> fact;
GetPlayer()->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, fact);
}
void WorldSession::HandleSetFactionInactiveOpcode(WorldPacket & recv_data)
{
sLog->outStaticDebug("WORLD: Received CMSG_SET_FACTION_INACTIVE");
uint32 replistid;
uint8 inactive;
recv_data >> replistid >> inactive;
_player->GetReputationMgr().SetInactive(replistid, inactive);
}
void WorldSession::HandleShowingHelmOpcode(WorldPacket& recv_data)
{
sLog->outStaticDebug("CMSG_SHOWING_HELM for %s", _player->GetName());
recv_data.read_skip<uint8>(); // unknown, bool?
_player->ToggleFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_HELM);
}
void WorldSession::HandleShowingCloakOpcode(WorldPacket& recv_data)
{
sLog->outStaticDebug("CMSG_SHOWING_CLOAK for %s", _player->GetName());
recv_data.read_skip<uint8>(); // unknown, bool?
_player->ToggleFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_CLOAK);
}
void WorldSession::HandleCharRenameOpcode(WorldPacket& recv_data)
{
uint64 guid;
std::string newName;
recv_data >> guid;
recv_data >> newName;
// prevent character rename to invalid name
if (!normalizePlayerName(newName))
{
WorldPacket data(SMSG_CHAR_RENAME, 1);
data << uint8(CHAR_NAME_NO_NAME);
SendPacket(&data);
return;
}
uint8 res = ObjectMgr::CheckPlayerName(newName, true);
if (res != CHAR_NAME_SUCCESS)
{
WorldPacket data(SMSG_CHAR_RENAME, 1+8+(newName.size()+1));
data << uint8(res);
data << uint64(guid);
data << newName;
SendPacket(&data);
return;
}
// check name limitations
if (AccountMgr::IsPlayerAccount(GetSecurity()) && sObjectMgr->IsReservedName(newName))
{
WorldPacket data(SMSG_CHAR_RENAME, 1);
data << uint8(CHAR_NAME_RESERVED);
SendPacket(&data);
return;
}
// Ensure that the character belongs to the current account, that rename at login is enabled
// and that there is no character with the desired new name
_charRenameCallback.SetParam(newName);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_FREE_NAME);
stmt->setUInt32(0, GUID_LOPART(guid));
stmt->setUInt32(1, GetAccountId());
stmt->setUInt16(2, AT_LOGIN_RENAME);
stmt->setUInt16(3, AT_LOGIN_RENAME);
stmt->setString(4, newName);
_charRenameCallback.SetFutureResult(CharacterDatabase.AsyncQuery(stmt));
}
void WorldSession::HandleChangePlayerNameOpcodeCallBack(PreparedQueryResult result, std::string newName)
{
if (!result)
{
WorldPacket data(SMSG_CHAR_RENAME, 1);
data << uint8(CHAR_CREATE_ERROR);
SendPacket(&data);
return;
}
Field* fields = result->Fetch();
uint32 guidLow = fields[0].GetUInt32();
std::string oldName = fields[1].GetString();
uint64 guid = MAKE_NEW_GUID(guidLow, 0, HIGHGUID_PLAYER);
// Update name and at_login flag in the db
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_NAME);
stmt->setString(0, newName);
stmt->setUInt16(1, AT_LOGIN_RENAME);
stmt->setUInt32(2, guidLow);
CharacterDatabase.Execute(stmt);
// Removed declined name from db
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_DECLINED_NAME);
stmt->setUInt32(0, guidLow);
CharacterDatabase.Execute(stmt);
sLog->outChar("Account: %d (IP: %s) Character:[%s] (guid:%u) Changed name to: %s", GetAccountId(), GetRemoteAddress().c_str(), oldName.c_str(), guidLow, newName.c_str());
WorldPacket data(SMSG_CHAR_RENAME, 1+8+(newName.size()+1));
data << uint8(RESPONSE_SUCCESS);
data << uint64(guid);
data << newName;
SendPacket(&data);
sWorld->UpdateCharacterNameData(guidLow, newName);
}
void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recv_data)
{
uint64 guid;
recv_data >> guid;
// not accept declined names for unsupported languages
std::string name;
if (!sObjectMgr->GetPlayerNameByGUID(guid, name))
{
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
data << uint32(1);
data << uint64(guid);
SendPacket(&data);
return;
}
std::wstring wname;
if (!Utf8toWStr(name, wname))
{
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
data << uint32(1);
data << uint64(guid);
SendPacket(&data);
return;
}
if (!isCyrillicCharacter(wname[0])) // name already stored as only single alphabet using
{
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
data << uint32(1);
data << uint64(guid);
SendPacket(&data);
return;
}
std::string name2;
DeclinedName declinedname;
recv_data >> name2;
if (name2 != name) // character have different name
{
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
data << uint32(1);
data << uint64(guid);
SendPacket(&data);
return;
}
for (int i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
{
recv_data >> declinedname.name[i];
if (!normalizePlayerName(declinedname.name[i]))
{
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
data << uint32(1);
data << uint64(guid);
SendPacket(&data);
return;
}
}
if (!ObjectMgr::CheckDeclinedNames(wname, declinedname))
{
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
data << uint32(1);
data << uint64(guid);
SendPacket(&data);
return;
}
for (int i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
CharacterDatabase.EscapeString(declinedname.name[i]);
SQLTransaction trans = CharacterDatabase.BeginTransaction();
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_DECLINED_NAME);
stmt->setUInt32(0, GUID_LOPART(guid));
trans->Append(stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHAR_DECLINED_NAME);
stmt->setUInt32(0, GUID_LOPART(guid));
for (uint8 i = 0; i < 5; i++)
stmt->setString(i+1, declinedname.name[i]);
trans->Append(stmt);
CharacterDatabase.CommitTransaction(trans);
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
data << uint32(0); // OK
data << uint64(guid);
SendPacket(&data);
}
void WorldSession::HandleAlterAppearance(WorldPacket & recv_data)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ALTER_APPEARANCE");
uint32 Hair, Color, FacialHair, SkinColor;
recv_data >> Hair >> Color >> FacialHair >> SkinColor;
BarberShopStyleEntry const* bs_hair = sBarberShopStyleStore.LookupEntry(Hair);
if (!bs_hair || bs_hair->type != 0 || bs_hair->race != _player->getRace() || bs_hair->gender != _player->getGender())
return;
BarberShopStyleEntry const* bs_facialHair = sBarberShopStyleStore.LookupEntry(FacialHair);
if (!bs_facialHair || bs_facialHair->type != 2 || bs_facialHair->race != _player->getRace() || bs_facialHair->gender != _player->getGender())
return;
BarberShopStyleEntry const* bs_skinColor = sBarberShopStyleStore.LookupEntry(SkinColor);
if (bs_skinColor && (bs_skinColor->type != 3 || bs_skinColor->race != _player->getRace() || bs_skinColor->gender != _player->getGender()))
return;
uint32 Cost = _player->GetBarberShopCost(bs_hair->hair_id, Color, bs_facialHair->hair_id, bs_skinColor);
// 0 - ok
// 1, 3 - not enough money
// 2 - you have to seat on barber chair
if (!_player->HasEnoughMoney(Cost))
{
WorldPacket data(SMSG_BARBER_SHOP_RESULT, 4);
data << uint32(1); // no money
SendPacket(&data);
return;
}
else
{
WorldPacket data(SMSG_BARBER_SHOP_RESULT, 4);
data << uint32(0); // ok
SendPacket(&data);
}
_player->ModifyMoney(-int32(Cost)); // it isn't free
_player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_AT_BARBER, Cost);
_player->SetByteValue(PLAYER_BYTES, 2, uint8(bs_hair->hair_id));
_player->SetByteValue(PLAYER_BYTES, 3, uint8(Color));
_player->SetByteValue(PLAYER_BYTES_2, 0, uint8(bs_facialHair->hair_id));
if (bs_skinColor)
_player->SetByteValue(PLAYER_BYTES, 0, uint8(bs_skinColor->hair_id));
_player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_VISIT_BARBER_SHOP, 1);
_player->SetStandState(0); // stand up
}
void WorldSession::HandleRemoveGlyph(WorldPacket & recv_data)
{
uint32 slot;
recv_data >> slot;
if (slot >= MAX_GLYPH_SLOT_INDEX)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Client sent wrong glyph slot number in opcode CMSG_REMOVE_GLYPH %u", slot);
return;
}
if (uint32 glyph = _player->GetGlyph(slot))
{
if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyph))
{
_player->RemoveAurasDueToSpell(gp->SpellId);
_player->SetGlyph(slot, 0);
_player->SendTalentsInfoData(false);
}
}
}
void WorldSession::HandleCharCustomize(WorldPacket& recv_data)
{
uint64 guid;
std::string newName;
recv_data >> guid;
recv_data >> newName;
uint8 gender, skin, face, hairStyle, hairColor, facialHair;
recv_data >> gender >> skin >> hairColor >> hairStyle >> facialHair >> face;
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_AT_LOGIN);
stmt->setUInt32(0, GUID_LOPART(guid));
PreparedQueryResult result = CharacterDatabase.Query(stmt);
if (!result)
{
WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1);
data << uint8(CHAR_CREATE_ERROR);
SendPacket(&data);
return;
}
Field* fields = result->Fetch();
uint32 at_loginFlags = fields[0].GetUInt16();
if (!(at_loginFlags & AT_LOGIN_CUSTOMIZE))
{
WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1);
data << uint8(CHAR_CREATE_ERROR);
SendPacket(&data);
return;
}
// prevent character rename to invalid name
if (!normalizePlayerName(newName))
{
WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1);
data << uint8(CHAR_NAME_NO_NAME);
SendPacket(&data);
return;
}
uint8 res = ObjectMgr::CheckPlayerName(newName, true);
if (res != CHAR_NAME_SUCCESS)
{
WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1);
data << uint8(res);
SendPacket(&data);
return;
}
// check name limitations
if (AccountMgr::IsPlayerAccount(GetSecurity()) && sObjectMgr->IsReservedName(newName))
{
WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1);
data << uint8(CHAR_NAME_RESERVED);
SendPacket(&data);
return;
}
// character with this name already exist
if (uint64 newguid = sObjectMgr->GetPlayerGUIDByName(newName))
{
if (newguid != guid)
{
WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1);
data << uint8(CHAR_CREATE_NAME_IN_USE);
SendPacket(&data);
return;
}
}
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_NAME);
stmt->setUInt32(0, GUID_LOPART(guid));
result = CharacterDatabase.Query(stmt);
if (result)
{
std::string oldname = result->Fetch()[0].GetString();
sLog->outChar("Account: %d (IP: %s), Character[%s] (guid:%u) Customized to: %s", GetAccountId(), GetRemoteAddress().c_str(), oldname.c_str(), GUID_LOPART(guid), newName.c_str());
}
Player::Customize(guid, gender, skin, face, hairStyle, hairColor, facialHair);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_NAME_AT_LOGIN);
stmt->setString(0, newName);
stmt->setUInt16(1, uint16(AT_LOGIN_CUSTOMIZE));
stmt->setUInt32(2, GUID_LOPART(guid));
CharacterDatabase.Execute(stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_DECLINED_NAME);
stmt->setUInt32(0, GUID_LOPART(guid));
CharacterDatabase.Execute(stmt);
sWorld->UpdateCharacterNameData(GUID_LOPART(guid), newName, gender);
WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1+8+(newName.size()+1)+6);
data << uint8(RESPONSE_SUCCESS);
data << uint64(guid);
data << newName;
data << uint8(gender);
data << uint8(skin);
data << uint8(face);
data << uint8(hairStyle);
data << uint8(hairColor);
data << uint8(facialHair);
SendPacket(&data);
}
void WorldSession::HandleEquipmentSetSave(WorldPacket &recv_data)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_EQUIPMENT_SET_SAVE");
uint64 setGuid;
recv_data.readPackGUID(setGuid);
uint32 index;
recv_data >> index;
if (index >= MAX_EQUIPMENT_SET_INDEX) // client set slots amount
return;
std::string name;
recv_data >> name;
std::string iconName;
recv_data >> iconName;
EquipmentSet eqSet;
eqSet.Guid = setGuid;
eqSet.Name = name;
eqSet.IconName = iconName;
eqSet.state = EQUIPMENT_SET_NEW;
for (uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i)
{
uint64 itemGuid;
recv_data.readPackGUID(itemGuid);
// equipment manager sends "1" (as raw GUID) for slots set to "ignore" (don't touch slot at equip set)
if (itemGuid == 1)
{
// ignored slots saved as bit mask because we have no free special values for Items[i]
eqSet.IgnoreMask |= 1 << i;
continue;
}
Item* item = _player->GetItemByPos(INVENTORY_SLOT_BAG_0, i);
if (!item && itemGuid) // cheating check 1
return;
if (item && item->GetGUID() != itemGuid) // cheating check 2
return;
eqSet.Items[i] = GUID_LOPART(itemGuid);
}
_player->SetEquipmentSet(index, eqSet);
}
void WorldSession::HandleEquipmentSetDelete(WorldPacket &recv_data)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_EQUIPMENT_SET_DELETE");
uint64 setGuid;
recv_data.readPackGUID(setGuid);
_player->DeleteEquipmentSet(setGuid);
}
void WorldSession::HandleEquipmentSetUse(WorldPacket &recv_data)
{
if (_player->isInCombat())
return;
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_EQUIPMENT_SET_USE");
for (uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i)
{
uint64 itemGuid;
recv_data.readPackGUID(itemGuid);
uint8 srcbag, srcslot;
recv_data >> srcbag >> srcslot;
sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Item " UI64FMTD ": srcbag %u, srcslot %u", itemGuid, srcbag, srcslot);
// check if item slot is set to "ignored" (raw value == 1), must not be unequipped then
if (itemGuid == 1)
continue;
Item* item = _player->GetItemByGuid(itemGuid);
uint16 dstpos = i | (INVENTORY_SLOT_BAG_0 << 8);
if (!item)
{
Item* uItem = _player->GetItemByPos(INVENTORY_SLOT_BAG_0, i);
if (!uItem)
continue;
ItemPosCountVec sDest;
InventoryResult msg = _player->CanStoreItem(NULL_BAG, NULL_SLOT, sDest, uItem, false);
if (msg == EQUIP_ERR_OK)
{
_player->RemoveItem(INVENTORY_SLOT_BAG_0, i, true);
_player->StoreItem(sDest, uItem, true);
}
else
_player->SendEquipError(msg, uItem, NULL);
continue;
}
if (item->GetPos() == dstpos)
continue;
_player->SwapItem(item->GetPos(), dstpos);
}
WorldPacket data(SMSG_EQUIPMENT_SET_USE_RESULT, 1);
data << uint8(0); // 4 - equipment swap failed - inventory is full
SendPacket(&data);
}
void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
{
// TODO: Move queries to prepared statements
uint64 guid;
std::string newname;
uint8 gender, skin, face, hairStyle, hairColor, facialHair, race;
recv_data >> guid;
recv_data >> newname;
recv_data >> gender >> skin >> hairColor >> hairStyle >> facialHair >> face >> race;
uint32 lowGuid = GUID_LOPART(guid);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_CLASS_LVL_AT_LOGIN);
stmt->setUInt32(0, lowGuid);
PreparedQueryResult result = CharacterDatabase.Query(stmt);
if (!result)
{
WorldPacket data(SMSG_CHAR_FACTION_CHANGE, 1);
data << uint8(CHAR_CREATE_ERROR);
SendPacket(&data);
return;
}
Field* fields = result->Fetch();
uint32 playerClass = uint32(fields[0].GetUInt8());
uint32 level = uint32(fields[1].GetUInt8());
uint32 at_loginFlags = fields[2].GetUInt16();
uint32 used_loginFlag = ((recv_data.GetOpcode() == CMSG_CHAR_RACE_CHANGE) ? AT_LOGIN_CHANGE_RACE : AT_LOGIN_CHANGE_FACTION);
if (!sObjectMgr->GetPlayerInfo(race, playerClass))
{
WorldPacket data(SMSG_CHAR_FACTION_CHANGE, 1);
data << uint8(CHAR_CREATE_ERROR);
SendPacket(&data);
return;
}
if (!(at_loginFlags & used_loginFlag))
{
WorldPacket data(SMSG_CHAR_FACTION_CHANGE, 1);
data << uint8(CHAR_CREATE_ERROR);
SendPacket(&data);
return;
}
if (AccountMgr::IsPlayerAccount(GetSecurity()))
{
uint32 raceMaskDisabled = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_DISABLED_RACEMASK);
if ((1 << (race - 1)) & raceMaskDisabled)
{
WorldPacket data(SMSG_CHAR_FACTION_CHANGE, 1);
data << uint8(CHAR_CREATE_ERROR);
SendPacket(&data);
return;
}
}
// prevent character rename to invalid name
if (!normalizePlayerName(newname))
{
WorldPacket data(SMSG_CHAR_FACTION_CHANGE, 1);
data << uint8(CHAR_NAME_NO_NAME);
SendPacket(&data);
return;
}
uint8 res = ObjectMgr::CheckPlayerName(newname, true);
if (res != CHAR_NAME_SUCCESS)
{
WorldPacket data(SMSG_CHAR_FACTION_CHANGE, 1);
data << uint8(res);
SendPacket(&data);
return;
}
// check name limitations
if (AccountMgr::IsPlayerAccount(GetSecurity()) && sObjectMgr->IsReservedName(newname))
{
WorldPacket data(SMSG_CHAR_FACTION_CHANGE, 1);
data << uint8(CHAR_NAME_RESERVED);
SendPacket(&data);
return;
}
// character with this name already exist
if (uint64 newguid = sObjectMgr->GetPlayerGUIDByName(newname))
{
if (newguid != guid)
{
WorldPacket data(SMSG_CHAR_FACTION_CHANGE, 1);
data << uint8(CHAR_CREATE_NAME_IN_USE);
SendPacket(&data);
return;
}
}
CharacterDatabase.EscapeString(newname);
Player::Customize(guid, gender, skin, face, hairStyle, hairColor, facialHair);
SQLTransaction trans = CharacterDatabase.BeginTransaction();
stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_FACTION_OR_RACE);
stmt->setString(0, newname);
stmt->setUInt8(1, race);
stmt->setUInt16(2, used_loginFlag);
stmt->setUInt32(3, lowGuid);
trans->Append(stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_DECLINED_NAME);
stmt->setUInt32(0, lowGuid);
trans->Append(stmt);
sWorld->UpdateCharacterNameData(GUID_LOPART(guid), newname, gender, race);
BattlegroundTeamId team = BG_TEAM_ALLIANCE;
// Search each faction is targeted
switch (race)
{
case RACE_ORC:
case RACE_TAUREN:
case RACE_UNDEAD_PLAYER:
case RACE_TROLL:
case RACE_BLOODELF:
team = BG_TEAM_HORDE;
break;
default:
break;
}
// Switch Languages
// delete all languages first
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_SKILL_LANGUAGES);
stmt->setUInt32(0, lowGuid);
trans->Append(stmt);
// Now add them back
stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHAR_SKILL_LANGUAGE);
stmt->setUInt32(0, lowGuid);
// Faction specific languages
if (team == BG_TEAM_HORDE)
stmt->setUInt16(1, 109);
else
stmt->setUInt16(1, 98);
trans->Append(stmt);
// Race specific languages
if (race != RACE_ORC && race != RACE_HUMAN)
{
stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHAR_SKILL_LANGUAGE);
stmt->setUInt32(0, lowGuid);
switch (race)
{
case RACE_DWARF:
stmt->setUInt16(1, 111);
break;
case RACE_DRAENEI:
stmt->setUInt16(1, 759);
break;
case RACE_GNOME:
stmt->setUInt16(1, 313);
break;
case RACE_NIGHTELF:
stmt->setUInt16(1, 113);
break;
case RACE_UNDEAD_PLAYER:
stmt->setUInt16(1, 673);
break;
case RACE_TAUREN:
stmt->setUInt16(1, 115);
break;
case RACE_TROLL:
stmt->setUInt16(1, 315);
break;
case RACE_BLOODELF:
stmt->setUInt16(1, 137);
break;
}
trans->Append(stmt);
}
if (recv_data.GetOpcode() == CMSG_CHAR_FACTION_CHANGE)
{
// Delete all Flypaths
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_TAXI_PATH);
stmt->setUInt32(0, lowGuid);
trans->Append(stmt);
if (level > 7)
{
// Update Taxi path
// this doesn't seem to be 100% blizzlike... but it can't really be helped.
std::ostringstream taximaskstream;
uint32 numFullTaximasks = level / 7;
if (numFullTaximasks > 11)
numFullTaximasks = 11;
if (team == BG_TEAM_ALLIANCE)
{
if (playerClass != CLASS_DEATH_KNIGHT)
{
for (uint8 i = 0; i < numFullTaximasks; ++i)
taximaskstream << uint32(sAllianceTaxiNodesMask[i]) << ' ';
}
else
{
for (uint8 i = 0; i < numFullTaximasks; ++i)
taximaskstream << uint32(sAllianceTaxiNodesMask[i] | sDeathKnightTaxiNodesMask[i]) << ' ';
}
}
else
{
if (playerClass != CLASS_DEATH_KNIGHT)
{
for (uint8 i = 0; i < numFullTaximasks; ++i)
taximaskstream << uint32(sHordeTaxiNodesMask[i]) << ' ';
}
else
{
for (uint8 i = 0; i < numFullTaximasks; ++i)
taximaskstream << uint32(sHordeTaxiNodesMask[i] | sDeathKnightTaxiNodesMask[i]) << ' ';
}
}
uint32 numEmptyTaximasks = 11 - numFullTaximasks;
for (uint8 i = 0; i < numEmptyTaximasks; ++i)
taximaskstream << "0 ";
taximaskstream << '0';
std::string taximask = taximaskstream.str();
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_TAXIMASK);
stmt->setString(0, taximask);
stmt->setUInt32(1, lowGuid);
trans->Append(stmt);
}
// Delete all current quests
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_QUESTSTATUS);
stmt->setUInt32(0, GUID_LOPART(guid));
trans->Append(stmt);
// Delete record of the faction old completed quests
{
std::ostringstream quests;
ObjectMgr::QuestMap const& qTemplates = sObjectMgr->GetQuestTemplates();
for (ObjectMgr::QuestMap::const_iterator iter = qTemplates.begin(); iter != qTemplates.end(); ++iter)
{
Quest *qinfo = iter->second;
uint32 requiredRaces = qinfo->GetRequiredRaces();
if (team == BG_TEAM_ALLIANCE)
{
if (requiredRaces & RACEMASK_ALLIANCE)
{
quests << uint32(qinfo->GetQuestId());
quests << ',';
}
}
else // if (team == BG_TEAM_HORDE)
{
if (requiredRaces & RACEMASK_HORDE)
{
quests << uint32(qinfo->GetQuestId());
quests << ',';
}
}
}
std::string questsStr = quests.str();
questsStr = questsStr.substr(0, questsStr.length() - 1);
if (!questsStr.empty())
trans->PAppend("DELETE FROM `character_queststatus_rewarded` WHERE guid='%u' AND quest IN (%s)", lowGuid, questsStr.c_str());
}
if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD))
{
// Reset guild
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUILD_MEMBER);
stmt->setUInt32(0, lowGuid);
PreparedQueryResult result = CharacterDatabase.Query(stmt);
if (result)
if (Guild* guild = sGuildMgr->GetGuildById((result->Fetch()[0]).GetUInt32()))
guild->DeleteMember(MAKE_NEW_GUID(lowGuid, 0, HIGHGUID_PLAYER));
}
if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_ADD_FRIEND))
{
// Delete Friend List
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_SOCIAL_BY_GUID);
stmt->setUInt32(0, lowGuid);
trans->Append(stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_SOCIAL_BY_FRIEND);
stmt->setUInt32(0, lowGuid);
trans->Append(stmt);
}
// Leave Arena Teams
Player::LeaveAllArenaTeams(guid);
// Reset homebind and position
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_PLAYER_HOMEBIND);
stmt->setUInt32(0, lowGuid);
trans->Append(stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_PLAYER_HOMEBIND);
stmt->setUInt32(0, lowGuid);
if (team == BG_TEAM_ALLIANCE)
{
stmt->setUInt16(1, 0);
stmt->setUInt16(2, 1519);
stmt->setFloat (3, -8867.68f);
stmt->setFloat (4, 673.373f);
stmt->setFloat (5, 97.9034f);
Player::SavePositionInDB(0, -8867.68f, 673.373f, 97.9034f, 0.0f, 1519, lowGuid);
}
else
{
stmt->setUInt16(1, 1);
stmt->setUInt16(2, 1637);
stmt->setFloat (3, 1633.33f);
stmt->setFloat (4, -4439.11f);
stmt->setFloat (5, 15.7588f);
Player::SavePositionInDB(1, 1633.33f, -4439.11f, 15.7588f, 0.0f, 1637, lowGuid);
}
trans->Append(stmt);
// Achievement conversion
for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->FactionChange_Achievements.begin(); it != sObjectMgr->FactionChange_Achievements.end(); ++it)
{
uint32 achiev_alliance = it->first;
uint32 achiev_horde = it->second;
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_ACHIEVEMENT_BY_ACHIEVEMENT);
stmt->setUInt16(0, uint16(team == BG_TEAM_ALLIANCE ? achiev_alliance : achiev_horde));
stmt->setUInt32(1, lowGuid);
trans->Append(stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_ACHIEVEMENT);
stmt->setUInt16(0, uint16(team == BG_TEAM_ALLIANCE ? achiev_alliance : achiev_horde));
stmt->setUInt16(1, uint16(team == BG_TEAM_ALLIANCE ? achiev_horde : achiev_alliance));
stmt->setUInt32(2, lowGuid);
trans->Append(stmt);
}
// Item conversion
for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->FactionChange_Items.begin(); it != sObjectMgr->FactionChange_Items.end(); ++it)
{
uint32 item_alliance = it->first;
uint32 item_horde = it->second;
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_INVENTORY_FACTION_CHANGE);
stmt->setUInt32(0, (team == BG_TEAM_ALLIANCE ? item_alliance : item_horde));
stmt->setUInt32(1, (team == BG_TEAM_ALLIANCE ? item_horde : item_alliance));
stmt->setUInt32(2, guid);
trans->Append(stmt);
}
// Spell conversion
for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->FactionChange_Spells.begin(); it != sObjectMgr->FactionChange_Spells.end(); ++it)
{
uint32 spell_alliance = it->first;
uint32 spell_horde = it->second;
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_SPELL_BY_SPELL);
stmt->setUInt32(0, (team == BG_TEAM_ALLIANCE ? spell_alliance : spell_horde));
stmt->setUInt32(1, lowGuid);
trans->Append(stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_SPELL_FACTION_CHANGE);
stmt->setUInt32(0, (team == BG_TEAM_ALLIANCE ? spell_alliance : spell_horde));
stmt->setUInt32(1, (team == BG_TEAM_ALLIANCE ? spell_horde : spell_alliance));
stmt->setUInt32(2, lowGuid);
trans->Append(stmt);
}
// Reputation conversion
for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->FactionChange_Reputation.begin(); it != sObjectMgr->FactionChange_Reputation.end(); ++it)
{
uint32 reputation_alliance = it->first;
uint32 reputation_horde = it->second;
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_REP_BY_FACTION);
stmt->setUInt32(0, uint16(team == BG_TEAM_ALLIANCE ? reputation_alliance : reputation_horde));
stmt->setUInt32(1, lowGuid);
trans->Append(stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_REP_FACTION_CHANGE);
stmt->setUInt16(0, uint16(team == BG_TEAM_ALLIANCE ? reputation_alliance : reputation_horde));
stmt->setUInt16(1, uint16(team == BG_TEAM_ALLIANCE ? reputation_horde : reputation_alliance));
stmt->setUInt32(2, lowGuid);
trans->Append(stmt);
}
}
CharacterDatabase.CommitTransaction(trans);
std::string IP_str = GetRemoteAddress();
sLog->outDebug(LOG_FILTER_UNITS, "Account: %d (IP: %s), Character guid: %u Change Race/Faction to: %s", GetAccountId(), IP_str.c_str(), lowGuid, newname.c_str());
WorldPacket data(SMSG_CHAR_FACTION_CHANGE, 1 + 8 + (newname.size() + 1) + 1 + 1 + 1 + 1 + 1 + 1 + 1);
data << uint8(RESPONSE_SUCCESS);
data << uint64(guid);
data << newname;
data << uint8(gender);
data << uint8(skin);
data << uint8(face);
data << uint8(hairStyle);
data << uint8(hairColor);
data << uint8(facialHair);
data << uint8(race);
SendPacket(&data);
}
| gpl-2.0 |
TheOrchardSolutions/WordPress | wp-content/plugins/event-disabled/event-espresso.3.1.21.P/includes/form-builder/groups/index.php | 16653 | <?php
function event_espresso_question_groups_config_mnu() {
global $wpdb;
//Update the questions when re-ordering
if (!empty($_REQUEST['update_sequence'])) {
$rows = explode(",", $_POST['row_ids']);
for ($i = 0; $i < count($rows); $i++) {
$wpdb->query("UPDATE " . EVENTS_QST_GROUP_TABLE . " SET group_order=" . $i . " WHERE id='" . $rows[$i] . "'");
}
die();
}
// get counts
$sql = "SELECT id FROM " . EVENTS_QST_GROUP_TABLE;
$wpdb->get_results($sql);
$total_question_groups = $wpdb->num_rows;
if (function_exists('espresso_is_admin') && espresso_is_admin() == true) {
$sql .= " WHERE ";
if (espresso_member_data('id') == 0 || espresso_member_data('id') == 1) {
$sql .= " (wp_user = '0' OR wp_user = '1') ";
} else {
$sql .= " wp_user = '" . espresso_member_data('id') . "' ";
}
}
$wpdb->get_results($sql);
$total_self_question_groups = $wpdb->num_rows;
?>
<div class="wrap">
<div id="icon-options-event" class="icon32"> </div>
<h2><?php echo _e('Manage Question Groups', 'event_espresso') ?>
<?php
if (!isset($_REQUEST['action']) || ($_REQUEST['action'] != 'edit_group' && $_REQUEST['action'] != 'new_group')) {
echo '<a href="admin.php?page=form_groups&action=new_group" class="button add-new-h2" style="margin-left: 20px;">' . __('Add New Group', 'event_espresso') . '</a>';
}
?>
</h2>
<div id="poststuff" class="metabox-holder has-right-sidebar">
<?php event_espresso_display_right_column(); ?>
<div id="post-body">
<div class="meta-box-sortables ui-sortables">
<?php if (function_exists('espresso_is_admin') && espresso_is_admin() == true) { ?>
<div style="margin-bottom: 10px;">
<ul class="subsubsub" style="margin-bottom: 0;clear:both;">
<li><strong><?php _e('Question Groups', 'event_espresso'); ?>: </strong> </li>
<li><a <?php echo ( (!isset($_REQUEST['self']) && !isset($_REQUEST['all']) ) || ( isset($_REQUEST['self']) && $_REQUEST['self'] == 'true') ) ? ' class="current" ' : '' ?> href="admin.php?page=form_groups&self=true"><?php _e('My Groups', 'event_espresso'); ?> <span class="count">(<?php echo $total_self_question_groups; ?>)</span> </a> | </li>
<li><a <?php echo (isset($_REQUEST['all']) && $_REQUEST['all'] == 'true') ? ' class="current" ' : '' ?> href="admin.php?page=form_groups&all=true"><?php _e('All Groups', 'event_espresso'); ?> <span class="count">(<?php echo $total_question_groups; ?>)</span> </a></li>
</ul>
<div class="clear"></div>
</div>
<?php } ?>
<div id="post-body-content">
<?php
if (isset($_REQUEST['action'])) {
switch ($_REQUEST['action']) {
case 'new_group':
if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/form-builder/groups/new_group.php')) {
require_once(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/form-builder/groups/new_group.php');
event_espresso_form_group_new();
} else {
require_once(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/pricing_table.php');
}
break;
case 'edit_group':
require_once("edit_group.php");
event_espresso_form_group_edit();
break;
case 'insert_group':
if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/form-builder/groups/insert_group.php')) {
require_once(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/form-builder/groups/insert_group.php');
event_espresso_insert_group();
}
break;
case 'update_group':
require_once("update_group.php");
event_espresso_form_group_update($_REQUEST['group_id']);
break;
case 'delete_group':
if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/form-builder/groups/delete_group.php')) {
require_once(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/form-builder/groups/delete_group.php');
event_espresso_form_group_delete();
} else {
?>
<div id="message" class="updated fade">
<p><strong>
<?php _e('This function is not available in the free version of Event Espresso.', 'event_espresso'); ?>
</strong></p>
</div>
<?php
}
break;
}
}
if (!empty($_REQUEST['delete_group'])) {//This is for the delete checkboxes
if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/form-builder/groups/delete_group.php')) {
require_once(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/form-builder/groups/delete_group.php');
event_espresso_form_group_delete();
} else {
?>
<div id="message" class="updated fade">
<p><strong>
<?php _e('This function is not available in the free version of Event Espresso.', 'event_espresso'); ?>
</strong></p>
</div>
<?php
}
}
?>
<form id="form1" name="form1" method="post" action="<?php echo $_SERVER["REQUEST_URI"] ?>">
<table id="table" class="widefat manage-question-group">
<thead>
<tr>
<th class="manage-column" id="cb" scope="col" ><input type="checkbox" /></th>
<th class="manage-column column-title" id="values" scope="col" title="Click to Sort" style="width:40%;">
<?php _e('Group Name', 'event_espresso'); ?>
</th>
<th class="manage-column column-title" id="type" scope="col" title="Click to Sort" style="width:30%;">
<?php _e('Indentifier', 'event_espresso'); ?>
</th>
<?php if (function_exists('espresso_is_admin') && espresso_is_admin() == true) { ?>
<th class="manage-column column-creator" id="creator" scope="col" title="Click to Sort" style="width:20%;"><?php _e('Creator', 'event_espresso'); ?></th>
<?php } ?>
<th class="manage-column column-title" id="required" scope="col" title="Click to Sort" style="width:30%;">
<?php _e('Description', 'event_espresso'); ?>
</th>
</tr>
</thead>
<tbody>
<?php
$sql = "SELECT * FROM " . EVENTS_QST_GROUP_TABLE;
$sql .= " WHERE ";
if (function_exists('espresso_member_data') && !isset($_REQUEST['all'])) {
if (espresso_member_data('id') == 0 || espresso_member_data('id') == 1) {
$sql .= " (wp_user = '0' OR wp_user = '1') ";
} else {
$sql .= " wp_user = '" . espresso_member_data('id') . "' ";
}
}else{
$sql .= " (wp_user = '0' OR wp_user = '1') ";
}
$sql .= " ORDER BY group_order ";
$groups = $wpdb->get_results($sql);
if ($wpdb->num_rows > 0) {
foreach ($groups as $group) {
$group_id = $group->id;
$group_name = stripslashes($group->group_name);
$group_identifier = stripslashes($group->group_identifier);
$group_description = stripslashes($group->group_description);
$question = stripslashes(isset($group->question) ? $group->question : '');
$group_order = $group->group_order;
$system_group = $group->system_group;
$wp_user = $group->wp_user == 0 ? 1 : $group->wp_user;
?>
<tr>
<td class="checkboxcol">
<input name="row_id" type="hidden" value="<?php echo $group_id ?>" />
<?php if ($system_group == 0) : ?>
<input style="margin:7px 0 22px 8px; vertical-align:top;" name="checkbox[<?php echo $group_id ?>]" type="checkbox" title="Delete <?php echo empty($question_name) ? '' : $question_name ?>">
<?php else: ?>
<span><?php echo '<img style="margin:7px 0 22px 8px; vertical-align:top;" src="' . EVENT_ESPRESSO_PLUGINFULLURL . 'images/icons/lock.png" alt="System Group" title="System Group" />'; ?></span>
<?php endif; ?>
</td>
<td class="post-title page-title column-title"><strong><a href="admin.php?page=form_groups&action=edit_group&group_id=<?php echo $group_id ?>"><?php echo $group_name ?></a></strong>
<div class="row-actions">
<span class="edit"><a href="admin.php?page=form_groups&action=edit_group&group_id=<?php echo $group_id ?>"><?php _e('Edit', 'event_espresso'); ?></a> | </span>
<?php if ($system_group == 0) : ?><span class="delete"><a onclick="return confirmDelete();" class="submitdelete" href="admin.php?page=form_groups&action=delete_group&group_id=<?php echo $group_id ?>"><?php _e('Delete', 'event_espresso'); ?></a></span><?php endif; ?>
</div>
</td>
<td class="author column-author"><?php echo $group_identifier ?></td>
<?php if (function_exists('espresso_is_admin') && espresso_is_admin() == true) { ?>
<td><?php echo espresso_user_meta($wp_user, 'user_firstname') != '' ? espresso_user_meta($wp_user, 'user_firstname') . ' ' . espresso_user_meta($wp_user, 'user_lastname') : espresso_user_meta($wp_user, 'display_name'); ?></td>
<?php } ?>
<td class="author column-author"><?php echo $group_description ?></td>
</tr>
<?php }
} ?>
</tbody>
</table>
<div style="clear:both">
<p><input type="checkbox" name="sAll" onclick="selectAll(this)" />
<strong>
<?php _e('Check All', 'event_espresso'); ?>
</strong>
<input name="delete_group" type="submit" class="button-secondary" id="delete_group" value="<?php _e('Delete Question Group', 'event_espresso'); ?>" style="margin:10 0 0 10px;" onclick="return confirmDelete();">
<a style="margin-left:5px"class="button-primary" href="admin.php?page=form_groups&action=new_group"><?php _e('Add New Group', 'event_espresso'); ?></a>
<a style="margin-left:5px"class="button-primary" href="admin.php?page=form_builder"><?php _e('Questions', 'event_espresso'); ?></a>
<a style="color:#FFF; text-decoration:none; margin-left:5px"class="button-primary thickbox" href="#TB_inline?height=400&width=500&inlineId=group_info"><?php _e('Help', 'event_espresso'); ?></a></p>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<div id="group_info" class="pop-help" style="display:none">
<div class="TB-ee-frame">
<h2><?php _e('Question Groups Overview', 'event_espresso'); ?></h2>
<p><?php _e('Question Groups are pre-populated groups of ', 'event_espresso'); ?> <a href="admin.php?page=form_builder"><?php _e('questions', 'event_espresso'); ?></a> <?php _e('that can be added your events. These groups of questions are what make up your customized regsistration forms. The personal information group is required for all events and is shown by default on all registration forms.', 'event_espresso'); ?></p>
<p><?php _e('Question Groups can be organized or re-ordered by dragging and dropping individual table rows into the desired positions.', 'event_espresso'); ?></p>
</div>
</div>
<script type="text/javascript">
jQuery(document).ready(function($) {
/* show the table data */
var mytable = $('#table').dataTable( {
"bStateSave": true,
"sPaginationType": "full_numbers",
"oLanguage": { "sSearch": "<strong><?php _e('Live Search Filter', 'event_espresso'); ?>:</strong>",
"sZeroRecords": "<?php _e('No Records Found!', 'event_espresso'); ?>" },
"aoColumns": [
{ "bSortable": true },
null,
<?php echo function_exists('espresso_is_admin') && espresso_is_admin() == true ? 'null,' : ''; ?>
null,
null
]
} );
var startPosition;
var endPosition;
$("#table tbody").sortable({
cursor: "move",
start:function(event, ui){
startPosition = ui.item.prevAll().length + 1;
},
update: function(event, ui) {
endPosition = ui.item.prevAll().length + 1;
//alert('Start Position: ' + startPosition + ' End Position: ' + endPosition);
var row_ids="";
$('#table tbody input[name="row_id"]').each(function(i){
row_ids= row_ids + ',' + $(this).val();
});
$.post(EEGlobals.ajaxurl, { action: "update_qgr_sequence", row_ids: row_ids, update_sequence: "true"} );
}
});
postboxes.add_postbox_toggles('form_groups');
} );
jQuery(function(){
jQuery('#add-new-group').validate({
rules: {
group_name: "required"
},
messages: {
group_name: "Please add a name for your group"
}
});
});
</script>
<?php
}
| gpl-2.0 |
adrian2020my/vichi | administrator/components/com_jaamazons3/views/help/tmpl/default.php | 5706 | <?php
/*
* ------------------------------------------------------------------------
* JA Amazon S3 for joomla 2.5 & 3.1
* ------------------------------------------------------------------------
* Copyright (C) 2004-2011 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
* @license - GNU/GPL, http://www.gnu.org/licenses/gpl.html
* Author: J.O.O.M Solutions Co., Ltd
* Websites: http://www.joomlart.com - http://www.joomlancers.com
* ------------------------------------------------------------------------
*/
// no direct access
defined ( '_JEXEC' ) or die ( 'Restricted access' );
?>
<fieldset>
<legend class="heading"><?php echo JText::_("HELP_AND_SUPPORT");?></legend>
<div>
<p><strong>Overview</strong></p>
<p>This component enables your <a href="http://www.joomla.org">Joomla!</a> powered website to use cloud computing and syncronize the data from your site with <strong>Amazon Cloud Servers</strong>.</p>
<p>To be able to use this component you need an <a href="http://aws.amazon.com/s3/" title="Amazon S3" target="_blank">Account</a> for <strong>Amazon S3 Service</strong> and the <a target="_blank" href="http://php.net/manual/en/book.curl.php">cURL</a> library enabled on your server.</p>
<p>Syncronization of your site with <strong>Amazon Cloud Servers</strong> is managed by the <strong>JA Amazon S3 Plugin</strong>. This plugin is installed and enabled when you install the component, but you have to make sure it is ordered just above the core <strong>Cache Plugin</strong>. <br /><a href="index.php?option=com_plugins">Click here</a> to check now.</p>
</div>
<div>
<p> </p>
<p><strong>Main Features</strong></p>
<ul>
<li>Amazon S3 (Simple Storage Service) - Amazon S3 provides a simple web services interface that can be used to store and retrieve any amount of data, at any time, from anywhere on the web.</li>
<li>CloudFront & CDN Support - Amazon CloudFront delivers your static and streaming content using a global network (CDN) of more than 16 locations. Requests for your objects are automatically routed to the nearest edge location, so content is delivered with the best possible performance.</li>
<li>Multiple Buckets Support - Create unlimited buckets for each and / or all media content types, link them all to clouds!</li>
<li>Cron Job Support - Depending on the file types and change frequency, set cron job every day, hour or minute!</li>
<li>Multiple Sync Profiles - Create unlimited profiles to combine settings for various file types & cron job settings, set folders to upload from, explore true power with simple administration interface.</li>
<li>Include / Exclude File Types or Extensions - Select only the file types or extensions you need to be uploaded to Amazon S3.</li>
<li>Enable / Disable Sync for specific files or folders - Select only the most important / accessed files to be uploaded to Amazon S3.</li>
<li>Multiple Amazon S3 Accounts - Each administrator of your website can use his own Amazon S3 Account.</li>
<li>Upload new & update modified files capability - The component is quite capable to detect changes made on the files so it can skip overwriting existing ones.</li>
<li>File & Folder ACL System - Set an access level for each of your file or folder.</li>
</ul>
</div>
<div>
<p> </p>
<p><strong>Getting Started</strong></p>
<p>Read the absolute begginers guide on <strong><em>"Getting Started with Amazon S3"</em></strong> in the <a href="http://www.joomlart.com/forums/showthread.php?46333-Getting-started-with-JA-Amazon-S3-component" title="Amazon S3" target="_blank">JA Amazon S3 Forum</a>.</p>
<p>The guide on <a href="http://www.joomlart.com/forums/forumdisplay.php?242-JA-Amazon-S3-Component" title="JA Amazon S3 Forum" target="_blank">JA Amazon S3 forum</a> provide Installation and Upgrade instructions, tips for creating new buckets, setting parent folder, updating or replacing the files on S3.</p>
<p>Paid members (JAEC / Developer) have access to support and can ask for support in the <a href="http://www.joomlart.com/forums/forumdisplay.php?242-JA-Amazon-S3-Component" title="JA Amazon S3 Forum" target="_blank">JA Amazon S3 Forum</a>.</p>
<p> </p>
</div>
<div>
<p> </p>
<p><strong>Video Tutorial</strong></p>
<object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/dtknH2ljq5Q?fs=1&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/dtknH2ljq5Q?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>
</div>
<div>
<p> </p>
<p><strong>Upgrade Guide</strong></p>
<p>We recommend uninstalling the old version and installing the new version. Please check the <a href="http://www.joomlart.com/forums/forumdisplay.php?242-JA-Amazon-S3-Component" title="JA Amazon S3 Forum" target="_blank">JA Amazon S3 Forum</a> for more information.</p>
</div>
<div>
<p> </p>
<p><a href="http://www.joomlart.com/joomla/extensions/ja-amazon-s3" title="JA Amazon S3 Home" target="_blank">Home</a> | <a href="http://update.joomlart.com" title="JA Updates" target="_blank">Version info & Updates</a> | <a href="http://www.joomlart.com/forums/downloads.php?do=cat&id=367" title="JA Amazon S3 Downloads" target="_blank">Downloads</a> | <a href="http://pm.joomlart.com/browse/JAECCOMAMAZONJIVI" title="JA Amazon S3 JIRA" target="_blank">Changelog</a> | <a href="http://www.joomlart.com/forums/forumdisplay.php?242-JA-Amazon-S3-Component" title="JA Amazon S3 Forums" target="_blank">Forums</a></p>
</div>
</fieldset> | gpl-2.0 |
smarr/Truffle | compiler/src/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch2.java | 2224 | /*
* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.graalvm.compiler.jtt.bytecode;
import org.junit.Test;
import org.graalvm.compiler.jtt.JTTTest;
/*
*/
public class BC_tableswitch2 extends JTTTest {
public static int test(int a) {
switch (a) {
case 5:
return 55;
case 6:
return 66;
case 7:
return 77;
}
return 11;
}
@Test
public void run0() throws Throwable {
runTest("test", -1);
}
@Test
public void run1() throws Throwable {
runTest("test", 0);
}
@Test
public void run2() throws Throwable {
runTest("test", 1);
}
@Test
public void run3() throws Throwable {
runTest("test", 5);
}
@Test
public void run4() throws Throwable {
runTest("test", 6);
}
@Test
public void run5() throws Throwable {
runTest("test", 7);
}
@Test
public void run6() throws Throwable {
runTest("test", 8);
}
}
| gpl-2.0 |
ashishswd/mymagpiesnest | wp-content/themes/mymagpie/admin/js/of-medialibrary-uploader.js | 2950 | jQuery(document).ready(function($){
var optionsframework_upload;
var optionsframework_selector;
function optionsframework_add_file(event, selector) {
var upload = $(".uploaded-file"), frame;
var $el = $(this);
optionsframework_selector = selector;
event.preventDefault();
// If the media frame already exists, reopen it.
if ( optionsframework_upload ) {
optionsframework_upload.open();
} else {
// Create the media frame.
optionsframework_upload = wp.media.frames.optionsframework_upload = wp.media({
// Set the title of the modal.
title: $el.data('choose'),
// Customize the submit button.
button: {
// Set the text of the button.
text: $el.data('update'),
// Tell the button not to close the modal, since we're
// going to refresh the page when the image is selected.
close: false
}
});
// When an image is selected, run a callback.
optionsframework_upload.on( 'select', function() {
// Grab the selected attachment.
var attachment = optionsframework_upload.state().get('selection').first();
optionsframework_upload.close();
optionsframework_selector.find('.upload').val(attachment.attributes.url);
if ( attachment.attributes.type == 'image' ) {
optionsframework_selector.find('.screenshot').empty().hide().append('<img src="' + attachment.attributes.url + '">').slideDown('fast');
}
optionsframework_selector.find('.upload-button').unbind().addClass('remove-file').removeClass('upload-button').val(optionsframework_l10n.remove);
optionsframework_selector.find('.of-background-properties').slideDown();
optionsframework_selector.find('.remove-image, .remove-file').on('click', function() {
optionsframework_remove_file( $(this).parents('.section') );
});
});
}
// Finally, open the modal.
optionsframework_upload.open();
}
function optionsframework_remove_file(selector) {
selector.find('.remove-image').hide();
selector.find('.upload').val('');
selector.find('.of-background-properties').hide();
selector.find('.screenshot').slideUp();
selector.find('.remove-file').unbind().addClass('upload-button').removeClass('remove-file').val(optionsframework_l10n.upload);
// We don't display the upload button if .upload-notice is present
// This means the user doesn't have the WordPress 3.5 Media Library Support
if ( $('.section-upload .upload-notice').length > 0 ) {
$('.upload-button').remove();
}
selector.find('.upload-button').on('click', function(event) {
optionsframework_add_file(event, $(this).parents('.section'));
});
}
$('.remove-image, .remove-file').on('click', function() {
optionsframework_remove_file( $(this).parents('.section') );
});
$('.upload-button').click( function( event ) {
optionsframework_add_file(event, $(this).parents('.section'));
});
}); | gpl-2.0 |
hardvain/mono-compiler | class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/WebControl/WebControl_TableStyle_BackImageUrl.aspx.cs | 6104 | //
// Authors:
// Rafael Mizrahi <rafim@mainsoft.com>
// Erez Lotan <erezl@mainsoft.com>
// Vladimir Krasnov <vladimirk@mainsoft.com>
//
//
// Copyright (c) 2002-2005 Mainsoft Corporation.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Collections;
namespace GHTTests.System_Web_dll.System_Web_UI_WebControls
{
public class WebControl_TableStyle_BackImageUrl
: GHTWebControlBase
{
#region Web Form Designer generated code
override protected void OnInit(EventArgs e) {
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
//Overrides GHTWebControlBase.InitTypes
//This method initializes the types that will be contained in the TypesToTest array.
//This only controls that TableStyle is relevant for, will be tested.
protected override void InitTypes()
{
base.m_derivedTypes = new ArrayList();
base.m_derivedTypes.Add(typeof(RadioButtonList));
base.m_derivedTypes.Add(typeof(CheckBoxList));
base.m_derivedTypes.Add(typeof(DataGrid));
base.m_derivedTypes.Add(typeof(DataList));
base.m_derivedTypes.Add(typeof(Table));
}
private void Page_Load(object sender, System.EventArgs e)
{
HtmlForm frm = (HtmlForm)FindControl("Form1");
GHTTestBegin(frm);
foreach (Type currentType in TypesToTest)
{
GHTHeader(currentType.ToString());
Test(currentType);
}
GHTTestEnd();
}
private void Test(Type ctrlType)
{
try
{
this.GHTSubTestBegin(ctrlType, "Relative path");
TableStyle style1 = (TableStyle) this.TestedControl.ControlStyle;
style1.BackImageUrl = "cat.jpg";
}
catch (Exception exception8)
{
// ProjectData.SetProjectError(exception8);
Exception exception1 = exception8;
this.GHTSubTestUnexpectedExceptionCaught(exception1);
// ProjectData.ClearProjectError();
}
this.GHTSubTestEnd();
try
{
this.GHTSubTestBegin(ctrlType, "absolute path");
TableStyle style2 = (TableStyle) this.TestedControl.ControlStyle;
style2.BackImageUrl = "http://localhost:/System_Web_dll/System_Web_UI_WebControls/WebControl/cat.jpg";
}
catch (Exception exception9)
{
// ProjectData.SetProjectError(exception9);
Exception exception2 = exception9;
this.GHTSubTestUnexpectedExceptionCaught(exception2);
// ProjectData.ClearProjectError();
}
this.GHTSubTestEnd();
try
{
this.GHTSubTestBegin(ctrlType, "Defied only in CssClass");
TableStyle style3 = (TableStyle) this.TestedControl.ControlStyle;
style3.CssClass = "CssClass1";
}
catch (Exception exception10)
{
// ProjectData.SetProjectError(exception10);
Exception exception3 = exception10;
this.GHTSubTestUnexpectedExceptionCaught(exception3);
// ProjectData.ClearProjectError();
}
this.GHTSubTestEnd();
try
{
this.GHTSubTestBegin(ctrlType, "Defied only in CssClass");
TableStyle style4 = (TableStyle) this.TestedControl.ControlStyle;
style4.CssClass = "CssClass1";
style4.BackImageUrl = "http://localhost:/System_Web_dll/System_Web_UI_WebControls/WebControl/dog.jpg";
}
catch (Exception exception11)
{
// ProjectData.SetProjectError(exception11);
Exception exception4 = exception11;
this.GHTSubTestUnexpectedExceptionCaught(exception4);
// ProjectData.ClearProjectError();
}
this.GHTSubTestEnd();
try
{
this.GHTSubTestBegin(ctrlType, "Default value");
TableStyle style5 = (TableStyle) this.TestedControl.ControlStyle;
this.GHTSubTestAddResult(style5.BackImageUrl);
}
catch (Exception exception12)
{
// ProjectData.SetProjectError(exception12);
Exception exception5 = exception12;
this.GHTSubTestUnexpectedExceptionCaught(exception5);
// ProjectData.ClearProjectError();
}
this.GHTSubTestEnd();
try
{
this.GHTSubTestBegin(ctrlType, "Throws exception on null value");
TableStyle style6 = (TableStyle) this.TestedControl.ControlStyle;
style6.BackImageUrl = null;
this.GHTSubTestExpectedExceptionNotCaught("ArgumentNullException");
}
catch (ArgumentNullException exception13)
{
// ProjectData.SetProjectError(exception13);
ArgumentNullException exception6 = exception13;
this.GHTSubTestExpectedExceptionCaught(exception6);
// ProjectData.ClearProjectError();
}
catch (Exception exception14)
{
// ProjectData.SetProjectError(exception14);
Exception exception7 = exception14;
this.GHTSubTestUnexpectedExceptionCaught(exception7);
// ProjectData.ClearProjectError();
}
this.GHTSubTestEnd();
}
}
}
| gpl-2.0 |
ojengwa/enyo | controllers/user.js | 1568 | 'use strict';
// Load required packages
var userModel = require('../models/user'),
services = require('../services/crud');
// Create endpoint /api/v1/users for POST
exports.postUsers = function (req, res) {
services.doPost(userModel, req.body, function (err, obj){
res.json({ response: err || obj });
});
};
// Create endpoint /api/v1/users for GET
exports.getUsers = function (req, res) {
services.getAll(userModel, function (err, obj) {
res.json({response: err || obj});
});
};
// Create endpoint /api/v1/users/:userId for GET
exports.getUser = function (req, res) {
var userId = req.params.userId;
services.getOne(userModel, userId, function (err, obj) {
res.json({response: err || obj });
});
};
// Create endpoint /api/v1/users/:userId for UPDATE
exports.putUser = function (req, res) {
var userId = req.params.userId,
payload = req.body;
services.getOne(userModel, userId, function (err, obj) {
res.json({response: err || obj });
});
};
//Create endpoint for /api/v1/users/:userId/delete DELETE
exports.deleteUser = function (req, res) {
var userId = req.params.userId;
User.findOne(userId, function (err, user) {
if (err) {
res.send(err);
} else if (!user.isActive) {
res.send({code: 404, message: 'The requested resource was not found!'});
} else{
User.update({userId: userId}, {$set: {isActive: false}}, function (err) {
if (err) {
res.send(err);
}
res.json({code: 200, message: "User deleted successfully"});
});
}
});
}; | gpl-2.0 |
imunro/bioformats | components/ome-jxr/src/ome/jxr/image/FrequencyBand.java | 2134 | /*
* #%L
* OME library for reading the JPEG XR file format.
* %%
* Copyright (C) 2014 - 2016 Open Microscopy Environment:
* - Board of Regents of the University of Wisconsin-Madison
* - Glencoe Software, Inc.
* - University of Dundee
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/gpl-2.0.html>.
* #L%
*/
package ome.jxr.image;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* Enumeration of available frequency band counts. Naming of entries follows
* Rec.ITU-T T.832 (01/2012) - table 29.
*
* <dl>
*
* @author Blazej Pindelski bpindelski at dundee.ac.uk
* @deprecated See <a href="http://blog.openmicroscopy.org/file-formats/community/2016/01/06/format-support">blog post</a>
*/
@Deprecated
public enum FrequencyBand {
ALL(4, 0),
NOFLEXBITS(3, 1),
NOHIGHPASS(2, 2),
DCONLY(1, 3),
RESERVED(0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
private List<Integer> ids = new ArrayList<Integer>();
private int numberOfBands;
private FrequencyBand(int numberOfBands, Integer... ids) {
this.numberOfBands = numberOfBands;
this.ids.addAll(Arrays.asList(ids));
}
public List<Integer> getId() {
return ids;
}
public int getNumberOfBands() {
return numberOfBands;
}
public static FrequencyBand findById(int id) {
for (FrequencyBand band : FrequencyBand.values()) {
if (band.getId().contains(id)) {
return band;
}
}
throw new IllegalArgumentException("Unspecified frequency band id: " + id);
}
}
| gpl-2.0 |
lcrees/freeplane | freeplane/src/main/java/org/freeplane/main/application/FreeplaneMain.java | 2138 | /*
* Freeplane - mind map editor
* Copyright (C) 2008 Joerg Mueller, Daniel Polansky, Christian Foltin, Dimitry Polivaev
*
* This file is modified by Dimitry Polivaev in 2008.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.freeplane.main.application;
import javax.swing.JOptionPane;
public class FreeplaneMain {
public static void checkJavaVersion() {
final String JAVA_VERSION = System.getProperty("java.version");
final String VERSION_1_5_0 = "1.5.0";
if (JAVA_VERSION.compareTo(VERSION_1_5_0) < 0) {
final String message = "Warning: Freeplane requires version Java 1.5.0 or higher. The running version: "
+ JAVA_VERSION + " is installed in " + System.getProperty("java.home") + ".";
System.err.println(message);
JOptionPane.showMessageDialog(null, message, "error", JOptionPane.ERROR_MESSAGE);
System.exit(1);
}
final String osProperty = System.getProperty("os.name");
if (osProperty.startsWith("Mac OS")) {
System.setProperty("apple.laf.useScreenMenuBar", "true");
}
}
static public void main(final String[] args) {
FreeplaneMain.checkJavaVersion();
final String oldHandler = System.getProperty("java.protocol.handler.pkgs");
String newHandler = "org.freeplane.main.application.protocols";
if(oldHandler != null)
newHandler = oldHandler + '|' + newHandler;
System.setProperty("java.protocol.handler.pkgs", newHandler);
final FreeplaneStarter starter = new FreeplaneGUIStarter();
starter.run(args);
}
}
| gpl-2.0 |
acsid/stendhal | src/games/stendhal/client/events/ProgressStatusEvent.java | 2018 | /* $Id$ */
/***************************************************************************
* (C) Copyright 2003-2010 - Stendhal *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package games.stendhal.client.events;
import games.stendhal.client.entity.RPEntity;
import games.stendhal.client.gui.progress.ProgressLogController;
import org.apache.log4j.Logger;
/**
* adjust the quest progress view
*
* @author hendrik
*/
class ProgressStatusEvent extends Event<RPEntity> {
private static Logger logger = Logger.getLogger(ProgressStatusEvent.class);
/**
* executes the event
*/
@Override
public void execute() {
try {
if (!event.has("progress_type")) {
ProgressLogController.get().showCategories(event.getList("data"));
} else if (!event.has("item")) {
if (event.get("progress_type").equals("repeatable")) {
ProgressLogController.get().setRepeatable(event.getList("data"));
} else {
ProgressLogController.get().showCategorySummary(event.get("progress_type"), event.getList("data"));
}
} else {
ProgressLogController.get().showDescription(event.get("progress_type"), event.get("item"), event.get("description"), event.get("information"), event.getList("data"));
}
} catch (RuntimeException e) {
logger.error("Failed to process progress status. Event: " + event, e);
}
}
}
| gpl-2.0 |
joshumax/CoLinux64 | src/colinux/os/linux/user/coserial-daemon/build.comake.py | 76 | targets['build.o'] = Target(
inputs=[
Input('main.o'),
],
)
| gpl-2.0 |
123xlex/TrinityCore | src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp | 4497 | /*
* Copyright (C) 2008-2019 TrinityCore <https://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ScriptMgr.h"
#include "Creature.h"
#include "GameObject.h"
#include "halls_of_lightning.h"
#include "InstanceScript.h"
#include "Map.h"
DoorData const doorData[] =
{
{ GO_VOLKHAN_DOOR, DATA_VOLKHAN, DOOR_TYPE_PASSAGE },
{ GO_IONAR_DOOR, DATA_IONAR, DOOR_TYPE_PASSAGE },
{ GO_LOKEN_DOOR, DATA_LOKEN, DOOR_TYPE_PASSAGE },
{ 0, 0, DOOR_TYPE_ROOM } // END
};
class instance_halls_of_lightning : public InstanceMapScript
{
public:
instance_halls_of_lightning() : InstanceMapScript(HoLScriptName, 602) { }
struct instance_halls_of_lightning_InstanceMapScript : public InstanceScript
{
instance_halls_of_lightning_InstanceMapScript(Map* map) : InstanceScript(map)
{
SetHeaders(DataHeader);
SetBossNumber(EncounterCount);
LoadDoorData(doorData);
}
void OnCreatureCreate(Creature* creature) override
{
switch (creature->GetEntry())
{
case NPC_BJARNGRIM:
GeneralBjarngrimGUID = creature->GetGUID();
break;
case NPC_VOLKHAN:
VolkhanGUID = creature->GetGUID();
break;
case NPC_IONAR:
IonarGUID = creature->GetGUID();
break;
case NPC_LOKEN:
LokenGUID = creature->GetGUID();
break;
default:
break;
}
}
void OnGameObjectCreate(GameObject* go) override
{
InstanceScript::OnGameObjectCreate(go);
switch (go->GetEntry())
{
case GO_LOKEN_THRONE:
LokenGlobeGUID = go->GetGUID();
break;
default:
break;
}
}
bool SetBossState(uint32 type, EncounterState state) override
{
if (!InstanceScript::SetBossState(type, state))
return false;
switch (type)
{
case DATA_LOKEN:
if (state == DONE)
if (GameObject* globe = instance->GetGameObject(LokenGlobeGUID))
globe->SendCustomAnim(0);
break;
default:
break;
}
return true;
}
ObjectGuid GetGuidData(uint32 type) const override
{
switch (type)
{
case DATA_BJARNGRIM:
return GeneralBjarngrimGUID;
case DATA_VOLKHAN:
return VolkhanGUID;
case DATA_IONAR:
return IonarGUID;
case DATA_LOKEN:
return LokenGUID;
default:
break;
}
return ObjectGuid::Empty;
}
protected:
ObjectGuid GeneralBjarngrimGUID;
ObjectGuid VolkhanGUID;
ObjectGuid IonarGUID;
ObjectGuid LokenGUID;
ObjectGuid LokenGlobeGUID;
};
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
return new instance_halls_of_lightning_InstanceMapScript(map);
}
};
void AddSC_instance_halls_of_lightning()
{
new instance_halls_of_lightning();
}
| gpl-2.0 |
balyoleg/lavanda-tex | wp-content/plugins/cforms2/lib_functions.php | 11151 | <?php
/*
* Copyright (c) 2006-2012 Oliver Seidel (email : oliver.seidel @ deliciousdays.com)
* Copyright (c) 2014 Bastian Germann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function cforms2_delete_db_and_deactivate () {
if( !isset($_POST['cfdeleteall']))
return;
if( is_user_logged_in() && current_user_can( 'manage_options' ) ) {
define( 'WP_UNINSTALL_PLUGIN', true );
require_once(plugin_dir_path(__FILE__) . 'uninstall.php');
### deactivate cforms plugin
$curPlugs = get_option('active_plugins');
array_splice($curPlugs, array_search( 'cforms2', $curPlugs), 1 ); // Array-function!
update_option('active_plugins', $curPlugs);
header('Location: plugins.php?deactivate=true');
die();
}
}
### backup/download cforms settings
$buffer='';
function cforms2_download(){
global $buffer, $cformsSettings;
if( isset($_REQUEST['savecformsdata']) || isset($_REQUEST['saveallcformsdata']) ) {
if( isset($_REQUEST['savecformsdata']) ){
$noDISP = '1'; $no='';
if( $_REQUEST['noSub']<>'1' )
$noDISP = $no = $_REQUEST['noSub'];
$buffer .= cforms2_save_array($cformsSettings['form'.$no]);
$filename = 'form-settings.txt';
}else{
$buffer .= cforms2_save_array($cformsSettings);
$filename = 'all-cforms-settings.txt';
}
ob_end_clean();
header('Pragma: public;');
header('Expires: 0;');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0;');
header('Content-Type: application/force-download;');
header('Content-Type: application/octet-stream;');
header('Content-Type: application/download;');
header('Content-Disposition: attachment; filename="'.$filename.'";');
header('Content-Transfer-Encoding: binary;');
flush();
print $buffer;
exit(0);
}
}
### backup/download cforms settings :: save the array
function cforms2_save_array($vArray){
global $buffer;
// Every array starts with chr(1)+"{"
$buffer .= "\0{";
// Go through the given array
reset($vArray);
while (true)
{
$Current = current($vArray);
$MyKey = addslashes(strval( key($vArray) ));
if (is_array($Current)) {
$buffer .= $MyKey."\0";
cforms2_save_array($Current);
$buffer .= "\0";
} else {
$Current = addslashes($Current);
$buffer .= "$MyKey\0$Current\0";
}
++$i;
while ( next($vArray)===false ) {
if (++$i > count($vArray)) break;
}
if ($i > count($vArray)) break;
}
$buffer .= "\0}";
}
### check user access
function cforms2_check_access_priv($r='manage_cforms'){
if( !current_user_can($r) ){
$err = '<div class="wrap"><div id="icon-cforms-error" class="icon32"><br/></div><h2>'.__('cforms error','cforms').'</h2><div class="updated fade" id="message"><p>'.__('You do not have the proper privileges to access this page.','cforms').'</p></div></div>';
die( $err );
}
}
### add cforms menu
function cforms2_menu() {
global $wpdb;
$p = plugin_dir_path(plugin_basename(__FILE__));
$tablesup = $wpdb->get_var("show tables like '$wpdb->cformssubmissions'") == $wpdb->cformssubmissions;
$o = $p.'cforms-options.php';
add_menu_page(__('cformsII', 'cforms'), __('cformsII', 'cforms'), 'manage_cforms', $o, '', plugin_dir_url(__FILE__).'images/cformsicon.png');
add_submenu_page($o, __('Form Settings', 'cforms'), __('Form Settings', 'cforms'), 'manage_cforms', $o);
add_submenu_page($o, __('Global Settings', 'cforms'), __('Global Settings', 'cforms'), 'manage_cforms', $p.'cforms-global-settings.php');
if ( ($tablesup || isset($_REQUEST['cforms_database'])) && !isset($_REQUEST['deletetables']) )
add_submenu_page($o, __('Tracking', 'cforms'), __('Tracking', 'cforms'), 'track_cforms', $p.'cforms-database.php');
add_submenu_page($o, __('Styling', 'cforms'), __('Styling', 'cforms'), 'manage_cforms', $p.'cforms-css.php');
add_submenu_page($o, __('Help!', 'cforms'), __('Help!', 'cforms'), 'manage_cforms', $p.'cforms-help.php');
}
### get current page
function cforms2_get_request_uri() {
$request_uri = $_SERVER['REQUEST_URI'];
if ( !isset($_SERVER['REQUEST_URI']) || (strpos($_SERVER['SERVER_SOFTWARE'],'IIS')!==false && strpos($_SERVER['REQUEST_URI'],'wp-admin')===false) ){
if(isset($_SERVER['SCRIPT_NAME']))
$request_uri = $_SERVER['SCRIPT_NAME'];
else
$request_uri = $_SERVER['PHP_SELF'];
}
return $request_uri;
}
function cforms2_enqueue_script_datepicker($localversion) {
$cformsSettings = get_option('cforms_settings');
$nav = $cformsSettings['global']['cforms_dp_nav'];
wp_register_script('cforms-calendar', plugin_dir_url(__FILE__) . 'js/cforms.calendar.js', array('jquery', 'jquery-ui-datepicker'), $localversion);
$day_names = explode( ',', stripslashes($cformsSettings['global']['cforms_dp_days']) );
wp_localize_script('cforms-calendar', 'cforms2_cal', array(
'buttonImageOnly' => true,
'showOn' => 'both',
'dateFormat' => stripslashes($cformsSettings['global']['cforms_dp_date']),
'dayNamesMin' => $day_names,
'dayNamesShort' => $day_names,
'monthNames' => explode( ',', stripslashes($cformsSettings['global']['cforms_dp_months']) ),
'firstDay' => stripslashes($cformsSettings['global']['cforms_dp_start']),
'prevText' => stripslashes($nav[1]),
'nextText' => stripslashes($nav[3]),
'closeText' => stripslashes($nav[4]),
'buttonText' => stripslashes($nav[5]),
'changeYear' => $nav[6]==1,
'buttonImage' => plugin_dir_url( __FILE__ ) . 'images/calendar.gif',
) );
wp_enqueue_script('cforms-calendar');
wp_register_style('jquery-ui-datepicker', plugin_dir_url(__FILE__) . 'styling/calendar.css', false, $localversion );
wp_enqueue_style('jquery-ui-datepicker');
}
function cforms2_enqueue_style_admin() {
global $localversion;
wp_register_style('cforms-admin', plugin_dir_url(__FILE__) . 'cforms-admin.css', false, $localversion );
wp_enqueue_style('cforms-admin');
}
function cforms2_admin_enqueue_scripts() {
global $localversion;
$suffix = SCRIPT_DEBUG ? '' : '.min';
$r=plugin_dir_url(__FILE__);
wp_enqueue_style('wp-color-picker');
wp_register_style('jquery-clockpick', $r . 'js/css/jquery.clockpick.css', false, '1.2.9' );
wp_enqueue_style('jquery-clockpick');
wp_register_style('jquery-flexigrid', $r . 'js/css/flexigrid.css', false, '1.1' );
wp_enqueue_style('jquery-flexigrid');
wp_register_script('jquery-flexigrid',$r."js/jquery.flexigrid$suffix.js",array('jquery'),'1.1');
wp_enqueue_script('jquery-flexigrid');
wp_register_script('jquery-jqdnr',$r.'js/jquery.jqdnr.js',array('jquery'),'r2');
wp_register_script('jquery-jqmodal',$r.'js/jquery.jqmodal.js',array('jquery', 'jquery-jqdnr'),'1.1.0');
wp_register_script('jquery-clockpick',$r."js/jquery.clockpick$suffix.js",array('jquery'),'1.2.9');
wp_register_script('jquery-in-place-editor',$r.'js/jquery.in-place-editor.js',array('jquery'),'2.3.0');
wp_register_script('jquery-textarearesizer',$r.'js/jquery.textarearesizer.js',array('jquery'),'1.0.4');
wp_register_script('cforms-admin',$r.'js/cforms.admin.js', array(
'jquery', 'jquery-jqmodal', 'jquery-clockpick', 'jquery-in-place-editor', 'jquery-textarearesizer', 'jquery-ui-sortable', 'wp-color-picker'
), $localversion);
wp_localize_script('cforms-admin', 'cforms2_nonces', array(
'installpreset' => wp_create_nonce('cforms2_installpreset'),
'reset_captcha' => wp_create_nonce('cforms2_reset_captcha'),
'checkbox' => wp_create_nonce('cforms2_field_checkbox'),
'checkboxgroup' => wp_create_nonce('cforms2_field_checkboxgroup'),
'fieldsetstart' => wp_create_nonce('cforms2_field_fieldsetstart'),
'html5field' => wp_create_nonce('cforms2_field_html5field'),
'selectbox' => wp_create_nonce('cforms2_field_selectbox'),
'textfield' => wp_create_nonce('cforms2_field_textfield'),
'textonly' => wp_create_nonce('cforms2_field_textonly'),
'deleteentries' => wp_create_nonce('database_deleteentries'),
'deleteentry' => wp_create_nonce('database_deleteentry'),
'dlentries' => wp_create_nonce('database_dlentries'),
'getentries' => wp_create_nonce('database_getentries'),
'savedata' => wp_create_nonce('database_savedata')
) );
wp_enqueue_script('cforms-admin');
cforms2_enqueue_style_admin();
cforms2_enqueue_script_datepicker($localversion);
}
### footer
function cforms2_footer() {
global $localversion;
?> <p style="padding-top:50px; font-size:11px; text-align:center;">
<em>
<?php echo sprintf(__('For more information and support, visit the <strong>cforms</strong> %s support forum %s. ', 'cforms'),'<a href="http://wordpress.org/support/plugin/cforms2" title="cforms support forum">','</a>') ?>
<?php _e('Translation provided by Oliver Seidel.', 'cforms') ?>
</em>
</p>
<p align="center">Version v<?php echo $localversion; ?></p>
<?php
}
### plugin uninstalled?
function cforms2_check_erased() {
global $cformsSettings;
if ( $cformsSettings['global']['cforms_formcount'] == '' ){
?>
<div class="wrap">
<div id="icon-cforms-global" class="icon32"><br/></div><h2><?php _e('All cforms data has been erased!', 'cforms') ?></h2>
<p class="ex" style="padding:5px 35px 10px 41px;"><?php _e('Please go to your <strong>Plugins</strong> tab and either disable the plugin, or toggle its status (disable/enable) to revive cforms!', 'cforms') ?></p>
<p class="ex" style="padding:5px 35px 10px 41px;"><?php _e('In case disabling/enabling doesn\'t seem to properly set the plugin defaults, try login out and back in and <strong>don\'t select the checkbox for activation</strong> on the plugin page.', 'cforms') ?></p>
</div>
<?php
return true;
}
return false;
}
### add menu items to admin bar
function cforms2_add_admin_bar_root($admin_bar, $id, $ti){
$arr = array( 'id' => $id,
'title' => $ti,
'href' => false
);
$admin_bar->add_node( $arr );
}
function cforms2_add_admin_bar_item($admin_bar, $id,$ti,$hi,$ev,$p = 'cforms-bar'){
$arr = array( 'parent' => $p,
'id' => $id,
'title' => $ti,
'href' => '#',
'meta' => array( 'title' => $hi,
'onclick' => $ev )
);
$admin_bar->add_node( $arr );
}
| gpl-2.0 |