code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
<?php /** * Smarty Internal Plugin Compile Break * * Compiles the {break} tag * * @package Smarty * @subpackage Compiler * @author Uwe Tews */ /** * Smarty Internal Plugin Compile Break Class */ class Smarty_Internal_Compile_Break extends Smarty_Internal_CompileBase { // attribute definitions public $optional_attributes = array('levels'); public $shorttag_order = array('levels'); /** * Compiles code for the {break} tag * * @param array $args array with attributes from parser * @param object $compiler compiler object * @param array $parameter array with compilation parameter * @return string compiled code */ public function compile($args, $compiler, $parameter) { $this->compiler = $compiler; $this->smarty = $compiler->smarty; // check and get attributes $_attr = $this->_get_attributes($args); if ($_attr['nocache'] === true) { $this->compiler->trigger_template_error('nocache option not allowed', $this->compiler->lex->taglineno); } if (isset($_attr['levels'])) { if (!is_numeric($_attr['levels'])) { $this->compiler->trigger_template_error('level attribute must be a numeric constant', $this->compiler->lex->taglineno); } $_levels = $_attr['levels']; } else { $_levels = 1; } $level_count = $_levels; $stack_count = count($compiler->_tag_stack) - 1; while ($level_count > 0 && $stack_count >= 0) { if (in_array($compiler->_tag_stack[$stack_count][0], array('for', 'foreach', 'while', 'section'))) { $level_count--; } $stack_count--; } if ($level_count != 0) { $this->compiler->trigger_template_error("cannot break {$_levels} level(s)", $this->compiler->lex->taglineno); } // this tag does not return compiled code $this->compiler->has_code = true; return "<?php break {$_levels}?>"; } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/smarty/sysplugins/smarty_internal_compile_break.php
PHP
asf20
2,137
<?php /** * Smarty Internal Plugin Compile Object Block Function * * Compiles code for registered objects as block function * * @package Smarty * @subpackage Compiler * @author Uwe Tews */ /** * Smarty Internal Plugin Compile Object Block Function Class */ class Smarty_Internal_Compile_Private_Object_Block_Function extends Smarty_Internal_CompileBase { // attribute definitions public $required_attributes = array(); public $optional_attributes = array('_any'); /** * Compiles code for the execution of block plugin * * @param array $args array with attributes from parser * @param object $compiler compiler object * @param array $parameter array with compilation parameter * @param string $tag name of block object * @param string $methode name of methode to call * @return string compiled code */ public function compile($args, $compiler, $parameter, $tag, $methode) { $this->compiler = $compiler; if (strlen($tag) < 5 || substr($tag, -5) != 'close') { // opening tag of block plugin // check and get attributes $_attr = $this->_get_attributes($args); if ($_attr['nocache'] === true) { $this->compiler->tag_nocache = true; } unset($_attr['nocache']); // convert attributes into parameter array string $_paramsArray = array(); foreach ($_attr as $_key => $_value) { if (is_int($_key)) { $_paramsArray[] = "$_key=>$_value"; } else { $_paramsArray[] = "'$_key'=>$_value"; } } $_params = 'array(' . implode(",", $_paramsArray) . ')'; $this->_open_tag($tag . '->' . $methode, array($_params, $this->compiler->nocache)); // maybe nocache because of nocache variables or nocache plugin $this->compiler->nocache = $this->compiler->nocache | $this->compiler->tag_nocache; // compile code $output = "<?php \$_smarty_tpl->smarty->_tag_stack[] = array('{$tag}->{$methode}', {$_params}); \$_block_repeat=true; \$_smarty_tpl->smarty->registered_objects['{$tag}'][0]->{$methode}({$_params}, null, \$_smarty_tpl, \$_block_repeat);while (\$_block_repeat) { ob_start();?>"; } else { $base_tag = substr($tag, 0, -5); // must endblock be nocache? if ($this->compiler->nocache) { $this->compiler->tag_nocache = true; } // closing tag of block plugin, restore nocache list($_params, $this->compiler->nocache) = $this->_close_tag($base_tag . '->' . $methode); // This tag does create output $this->compiler->has_output = true; // compile code if (!isset($parameter['modifier_list'])) { $mod_pre = $mod_post =''; } else { $mod_pre = ' ob_start(); '; $mod_post = 'echo '.$this->compiler->compileTag('private_modifier',array(),array('modifierlist'=>$parameter['modifier_list'],'value'=>'ob_get_clean()')).';'; } $output = "<?php \$_block_content = ob_get_contents(); ob_end_clean(); \$_block_repeat=false;".$mod_pre." echo \$_smarty_tpl->smarty->registered_objects['{$base_tag}'][0]->{$methode}({$_params}, \$_block_content, \$_smarty_tpl, \$_block_repeat); ".$mod_post." } array_pop(\$_smarty_tpl->smarty->_tag_stack);?>"; } return $output."\n"; } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/smarty/sysplugins/smarty_internal_compile_private_object_block_function.php
PHP
asf20
3,562
<?php /** * Smarty Internal Plugin Register * * External Smarty methods register/unregister * * @package Smarty * @author Uwe Tews */ /** * Class for register/unregister methods */ class Smarty_Internal_Register { function __construct($smarty) { $this->smarty = $smarty; } /** * Registers plugin to be used in templates * * @param string $type plugin type * @param string $tag name of template tag * @param callback $callback PHP callback to register * @param boolean $cacheable if true (default) this fuction is cachable * @param array $cache_attr caching attributes if any */ public function registerPlugin($type, $tag, $callback, $cacheable = true, $cache_attr = null) { if (isset($this->smarty->registered_plugins[$type][$tag])) { throw new Exception("Plugin tag \"{$tag}\" already registered"); } elseif (!is_callable($callback)) { throw new Exception("Plugin \"{$tag}\" not callable"); } else { $this->smarty->registered_plugins[$type][$tag] = array($callback, (bool) $cacheable); if (isset($cache_attr)&&in_array($type, array(Smarty::PLUGIN_BLOCK, Smarty::PLUGIN_FUNCTION))) { $this->smarty->registered_plugins[$type][$tag][] = (array) $cache_attr; } } } /** * Unregister Plugin * * @param string $type of plugin * @param string $tag name of plugin */ function unregisterPlugin($type, $tag) { if (isset($this->smarty->registered_plugins[$type][$tag])) { unset($this->smarty->registered_plugins[$type][$tag]); } } /** * Registers a resource to fetch a template * * @param string $type name of resource type * @param array $callback array of callbacks to handle resource */ public function registerResource($type, $callback) { $this->smarty->registered_resources[$type] = array($callback, false); } /** * Unregisters a resource * * @param string $type name of resource type */ function unregisterResource($type) { if (isset($this->smarty->registered_resources[$type])) { unset($this->smarty->registered_resources[$type]); } } /** * Registers object to be used in templates * * @param string $object name of template object * @param object $ &$object_impl the referenced PHP object to register * @param mixed $ null | array $allowed list of allowed methods (empty = all) * @param boolean $smarty_args smarty argument format, else traditional * @param mixed $ null | array $block_functs list of methods that are block format */ function registerObject($object_name, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array()) { // test if allowed methodes callable if (!empty($allowed)) { foreach ((array)$allowed as $method) { if (!is_callable(array($object_impl, $method))) { throw new SmartyException("Undefined method '$method' in registered object"); } } } // test if block methodes callable if (!empty($block_methods)) { foreach ((array)$block_methods as $method) { if (!is_callable(array($object_impl, $method))) { throw new SmartyException("Undefined method '$method' in registered object"); } } } // register the object $this->smarty->registered_objects[$object_name] = array($object_impl, (array)$allowed, (boolean)$smarty_args, (array)$block_methods); } /** * Registers static classes to be used in templates * * @param string $class name of template class * @param string $class_impl the referenced PHP class to register */ function registerClass($class_name, $class_impl) { // test if exists if (!class_exists($class_impl)) { throw new SmartyException("Undefined class '$class_impl' in register template class"); } // register the class $this->smarty->registered_classes[$class_name] = $class_impl; } /** * Registers a default plugin handler * * @param $callback mixed string | array $plugin class/methode name */ function registerDefaultPluginHandler($callback) { if (is_callable($callback)) { $this->smarty->default_plugin_handler_func = $callback; } else { throw new SmartyException("Default plugin handler '$callback' not callable"); } } /** * Registers a default template handler * * @param $callback mixed string | array class/method name */ function registerDefaultTemplateHandler($callback) { if (is_callable($callback)) { $this->smarty->default_template_handler_func = $callback; } else { throw new SmartyException("Default template handler '$callback' not callable"); } } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/smarty/sysplugins/smarty_internal_register.php
PHP
asf20
5,140
<?php /** * Smarty Internal Plugin Compile Function_Call * * Compiles the calls of user defined tags defined by {function} * * @package Smarty * @subpackage Compiler * @author Uwe Tews */ /** * Smarty Internal Plugin Compile Function_Call Class */ class Smarty_Internal_Compile_Call extends Smarty_Internal_CompileBase { // attribute definitions public $required_attributes = array('name'); public $shorttag_order = array('name'); public $optional_attributes = array('_any'); /** * Compiles the calls of user defined tags defined by {function} * * @param array $args array with attributes from parser * @param object $compiler compiler object * @param array $parameter array with compilation parameter * @return string compiled code */ public function compile($args, $compiler) { $this->compiler = $compiler; $this->smarty = $compiler->smarty; // check and get attributes $_attr = $this->_get_attributes($args); // save possible attributes if (isset($_attr['assign'])) { // output will be stored in a smarty variable instead of beind displayed $_assign = $_attr['assign']; } $_name = $_attr['name']; unset($_attr['name'], $_attr['assign'], $_attr['nocache']); // set flag (compiled code of {function} must be included in cache file if ($compiler->nocache || $compiler->tag_nocache) { $_nocache = 'true'; } else { $_nocache = 'false'; } $_paramsArray = array(); foreach ($_attr as $_key => $_value) { if (is_int($_key)) { $_paramsArray[] = "$_key=>$_value"; } else { $_paramsArray[] = "'$_key'=>$_value"; } } if (isset($compiler->template->properties['function'][$_name]['parameter'])) { foreach ($compiler->template->properties['function'][$_name]['parameter'] as $_key => $_value) { if (!isset($_attr[$_key])) { if (is_int($_key)) { $_paramsArray[] = "$_key=>$_value"; } else { $_paramsArray[] = "'$_key'=>$_value"; } } } } elseif (isset($this->smarty->template_functions[$_name]['parameter'])) { foreach ($this->smarty->template_functions[$_name]['parameter'] as $_key => $_value) { if (!isset($_attr[$_key])) { if (is_int($_key)) { $_paramsArray[] = "$_key=>$_value"; } else { $_paramsArray[] = "'$_key'=>$_value"; } } } } //varibale name? if (!(strpos($_name,'$')===false)) { $call_cache = $_name; $call_function = '$tmp = "smarty_template_function_".'.$_name.'; $tmp'; } else { $_name = trim($_name, "'\""); $call_cache = "'{$_name}'"; $call_function = 'smarty_template_function_'.$_name; } $_params = 'array(' . implode(",", $_paramsArray) . ')'; $_hash = str_replace('-','_',$compiler->template->properties['nocache_hash']); // was there an assign attribute if (isset($_assign)) { if ($compiler->template->caching) { $_output = "<?php ob_start(); Smarty_Internal_Function_Call_Handler::call ({$call_cache},\$_smarty_tpl,{$_params},'{$_hash}',{$_nocache}); \$_smarty_tpl->assign({$_assign}, ob_get_clean());?>\n"; } else { $_output = "<?php ob_start(); {$call_function}(\$_smarty_tpl,{$_params}); \$_smarty_tpl->assign({$_assign}, ob_get_clean());?>\n"; } } else { if ($compiler->template->caching) { $_output = "<?php Smarty_Internal_Function_Call_Handler::call ({$call_cache},\$_smarty_tpl,{$_params},'{$_hash}',{$_nocache});?>\n"; } else { $_output = "<?php {$call_function}(\$_smarty_tpl,{$_params});?>\n"; } } return $_output; } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/smarty/sysplugins/smarty_internal_compile_call.php
PHP
asf20
4,213
<?php /** * Smarty Internal Plugin Compile Assign * * Compiles the {assign} tag * * @package Smarty * @subpackage Compiler * @author Uwe Tews */ /** * Smarty Internal Plugin Compile Assign Class */ class Smarty_Internal_Compile_Assign extends Smarty_Internal_CompileBase { /** * Compiles code for the {assign} tag * * @param array $args array with attributes from parser * @param object $compiler compiler object * @param array $parameter array with compilation parameter * @return string compiled code */ public function compile($args, $compiler, $parameter) { $this->compiler = $compiler; $this->required_attributes = array('var', 'value'); $this->shorttag_order = array('var', 'value'); $this->optional_attributes = array('scope'); $_nocache = 'null'; $_scope = 'null'; // check and get attributes $_attr = $this->_get_attributes($args); // nocache ? if ($this->compiler->tag_nocache || $this->compiler->nocache) { $_nocache = 'true'; // create nocache var to make it know for further compiling $compiler->template->tpl_vars[trim($_attr['var'], "'")] = new Smarty_variable(null, true); } // scope setup if (isset($_attr['scope'])) { $_attr['scope'] = trim($_attr['scope'], "'\""); if ($_attr['scope'] == 'parent') { $_scope = Smarty::SCOPE_PARENT; } elseif ($_attr['scope'] == 'root') { $_scope = Smarty::SCOPE_ROOT; } elseif ($_attr['scope'] == 'global') { $_scope = Smarty::SCOPE_GLOBAL; } else { $this->compiler->trigger_template_error('illegal value for "scope" attribute', $this->compiler->lex->taglineno); } } // compiled output if (isset($parameter['smarty_internal_index'])) { return "<?php if (!isset(\$_smarty_tpl->tpl_vars[$_attr[var]]) || !is_array(\$_smarty_tpl->tpl_vars[$_attr[var]]->value)) \$_smarty_tpl->createLocalArrayVariable($_attr[var], $_nocache, $_scope);\n\$_smarty_tpl->tpl_vars[$_attr[var]]->value$parameter[smarty_internal_index] = $_attr[value];?>"; } else { return "<?php \$_smarty_tpl->tpl_vars[$_attr[var]] = new Smarty_variable($_attr[value], $_nocache, $_scope);?>"; } } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/smarty/sysplugins/smarty_internal_compile_assign.php
PHP
asf20
2,424
<?php /** * Smarty Internal Plugin Compile While * * Compiles the {while} tag * * @package Smarty * @subpackage Compiler * @author Uwe Tews */ /** * Smarty Internal Plugin Compile While Class */ class Smarty_Internal_Compile_While extends Smarty_Internal_CompileBase { /** * Compiles code for the {while} tag * * @param array $args array with attributes from parser * @param object $compiler compiler object * @param array $parameter array with compilation parameter * @return string compiled code */ public function compile($args, $compiler, $parameter) { $this->compiler = $compiler; // check and get attributes $_attr = $this->_get_attributes($args); $this->_open_tag('while', $this->compiler->nocache); // maybe nocache because of nocache variables $this->compiler->nocache = $this->compiler->nocache | $this->compiler->tag_nocache; if (is_array($parameter['if condition'])) { if ($this->compiler->nocache) { $_nocache = ',true'; // create nocache var to make it know for further compiling if (is_array($parameter['if condition']['var'])) { $this->compiler->template->tpl_vars[trim($parameter['if condition']['var']['var'], "'")] = new Smarty_variable(null, true); } else { $this->compiler->template->tpl_vars[trim($parameter['if condition']['var'], "'")] = new Smarty_variable(null, true); } } else { $_nocache = ''; $_nocache2 = ''; } if (is_array($parameter['if condition']['var'])) { $_output = "<?php if (!isset(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]) || !is_array(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value)) \$_smarty_tpl->createLocalArrayVariable(".$parameter['if condition']['var']['var']."$_nocache2);\n"; $_output .= "while (\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value".$parameter['if condition']['var']['smarty_internal_index']." = ".$parameter['if condition']['value']."){?>"; } else { $_output = "<?php \$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."] = new Smarty_Variable(\$_smarty_tpl->getVariable(".$parameter['if condition']['var'].")->value{$_nocache},null,true,false);"; $_output .= "while (\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."]->value = ".$parameter['if condition']['value']."){?>"; } return $_output; } else { return "<?php while ({$parameter['if condition']}){?>"; } } } /** * Smarty Internal Plugin Compile Whileclose Class */ class Smarty_Internal_Compile_Whileclose extends Smarty_Internal_CompileBase { /** * Compiles code for the {/while} tag * * @param array $args array with attributes from parser * @param object $compiler compiler object * @return string compiled code */ public function compile($args, $compiler) { $this->compiler = $compiler; // must endblock be nocache? if ($this->compiler->nocache) { $this->compiler->tag_nocache = true; } $this->compiler->nocache = $this->_close_tag(array('while')); return "<?php }?>"; } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/smarty/sysplugins/smarty_internal_compile_while.php
PHP
asf20
3,402
<?php /** * Smarty Internal Plugin Compile extend * * Compiles the {extends} tag * * @package Smarty * @subpackage Compiler * @author Uwe Tews */ /** * Smarty Internal Plugin Compile extend Class */ class Smarty_Internal_Compile_Extends extends Smarty_Internal_CompileBase { // attribute definitions public $required_attributes = array('file'); public $shorttag_order = array('file'); /** * Compiles code for the {extends} tag * * @param array $args array with attributes from parser * @param object $compiler compiler object * @return string compiled code */ public function compile($args, $compiler) { $this->compiler = $compiler; $this->smarty = $compiler->smarty; $this->_rdl = preg_quote($this->smarty->right_delimiter); $this->_ldl = preg_quote($this->smarty->left_delimiter); $filepath = $compiler->template->getTemplateFilepath(); // check and get attributes $_attr = $this->_get_attributes($args); if ($_attr['nocache'] === true) { $this->compiler->trigger_template_error('nocache option not allowed', $this->compiler->lex->taglineno); } $_smarty_tpl = $compiler->template; $include_file = null; if (strpos($_attr['file'],'$_tmp') !== false) { $this->compiler->trigger_template_error('illegal value for file attribute', $this->compiler->lex->taglineno); } eval('$include_file = ' . $_attr['file'] . ';'); // create template object $_template = new $compiler->smarty->template_class($include_file, $this->smarty, $compiler->template); // save file dependency if (in_array($_template->resource_type,array('eval','string'))) { $template_sha1 = sha1($include_file); } else { $template_sha1 = sha1($_template->getTemplateFilepath()); } if (isset($compiler->template->properties['file_dependency'][$template_sha1])) { $this->compiler->trigger_template_error("illegal recursive call of \"{$include_file}\"",$compiler->lex->line-1); } $compiler->template->properties['file_dependency'][$template_sha1] = array($_template->getTemplateFilepath(), $_template->getTemplateTimestamp(),$_template->resource_type); $_content = substr($compiler->template->template_source,$compiler->lex->counter-1); if (preg_match_all("!({$this->_ldl}block\s(.+?){$this->_rdl})!", $_content, $s) != preg_match_all("!({$this->_ldl}/block{$this->_rdl})!", $_content, $c)) { $this->compiler->trigger_template_error('unmatched {block} {/block} pairs'); } preg_match_all("!{$this->_ldl}block\s(.+?){$this->_rdl}|{$this->_ldl}/block{$this->_rdl}!", $_content, $_result, PREG_OFFSET_CAPTURE); $_result_count = count($_result[0]); $_start = 0; while ($_start < $_result_count) { $_end = 0; $_level = 1; while ($_level != 0) { $_end++; if (!strpos($_result[0][$_start + $_end][0], '/')) { $_level++; } else { $_level--; } } $_block_content = str_replace($this->smarty->left_delimiter . '$smarty.block.parent' . $this->smarty->right_delimiter, '%%%%SMARTY_PARENT%%%%', substr($_content, $_result[0][$_start][1] + strlen($_result[0][$_start][0]), $_result[0][$_start + $_end][1] - $_result[0][$_start][1] - + strlen($_result[0][$_start][0]))); Smarty_Internal_Compile_Block::saveBlockData($_block_content, $_result[0][$_start][0], $compiler->template, $filepath); $_start = $_start + $_end + 1; } $compiler->template->template_source = $_template->getTemplateSource(); $compiler->template->template_filepath = $_template->getTemplateFilepath(); $compiler->abort_and_recompile = true; return ''; } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/smarty/sysplugins/smarty_internal_compile_extends.php
PHP
asf20
4,005
<?php /** * Smarty Internal Plugin Templatelexer * * This is the lexer to break the template source into tokens * @package Smarty * @subpackage Compiler * @author Uwe Tews */ /** * Smarty Internal Plugin Templatelexer */ class Smarty_Internal_Templatelexer { public $data; public $counter; public $token; public $value; public $node; public $line; public $taglineno; public $state = 1; public $strip = false; private $heredoc_id_stack = Array(); public $smarty_token_names = array ( // Text for parser error messages 'IDENTITY' => '===', 'NONEIDENTITY' => '!==', 'EQUALS' => '==', 'NOTEQUALS' => '!=', 'GREATEREQUAL' => '(>=,ge)', 'LESSEQUAL' => '(<=,le)', 'GREATERTHAN' => '(>,gt)', 'LESSTHAN' => '(<,lt)', 'MOD' => '(%,mod)', 'NOT' => '(!,not)', 'LAND' => '(&&,and)', 'LOR' => '(||,or)', 'LXOR' => 'xor', 'OPENP' => '(', 'CLOSEP' => ')', 'OPENB' => '[', 'CLOSEB' => ']', 'PTR' => '->', 'APTR' => '=>', 'EQUAL' => '=', 'NUMBER' => 'number', 'UNIMATH' => '+" , "-', 'MATH' => '*" , "/" , "%', 'INCDEC' => '++" , "--', 'SPACE' => ' ', 'DOLLAR' => '$', 'SEMICOLON' => ';', 'COLON' => ':', 'DOUBLECOLON' => '::', 'AT' => '@', 'HATCH' => '#', 'QUOTE' => '"', 'BACKTICK' => '`', 'VERT' => '|', 'DOT' => '.', 'COMMA' => '","', 'ANDSYM' => '"&"', 'QMARK' => '"?"', 'ID' => 'identifier', 'OTHER' => 'text', 'LINEBREAK' => 'newline', 'FAKEPHPSTARTTAG' => 'Fake PHP start tag', 'PHPSTARTTAG' => 'PHP start tag', 'PHPENDTAG' => 'PHP end tag', 'LITERALSTART' => 'Literal start', 'LITERALEND' => 'Literal end', 'LDELSLASH' => 'closing tag', 'COMMENT' => 'comment', 'LITERALEND' => 'literal close', 'AS' => 'as', 'TO' => 'to', ); function __construct($data,$compiler) { // set instance object self::instance($this); // $this->data = preg_replace("/(\r\n|\r|\n)/", "\n", $data); $this->data = $data; $this->counter = 0; $this->line = 1; $this->smarty = $compiler->smarty; $this->compiler = $compiler; $this->ldel = preg_quote($this->smarty->left_delimiter,'/'); $this->ldel_length = strlen($this->smarty->left_delimiter); $this->rdel = preg_quote($this->smarty->right_delimiter,'/'); $this->smarty_token_names['LDEL'] = $this->smarty->left_delimiter; $this->smarty_token_names['RDEL'] = $this->smarty->right_delimiter; } public static function &instance($new_instance = null) { static $instance = null; if (isset($new_instance) && is_object($new_instance)) $instance = $new_instance; return $instance; } private $_yy_state = 1; private $_yy_stack = array(); function yylex() { return $this->{'yylex' . $this->_yy_state}(); } function yypushstate($state) { array_push($this->_yy_stack, $this->_yy_state); $this->_yy_state = $state; } function yypopstate() { $this->_yy_state = array_pop($this->_yy_stack); } function yybegin($state) { $this->_yy_state = $state; } function yylex1() { $tokenMap = array ( 1 => 0, 2 => 0, 3 => 1, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 0, 10 => 0, 11 => 0, 12 => 1, 14 => 0, 15 => 0, 16 => 0, 17 => 0, 18 => 0, 19 => 0, 20 => 0, 21 => 0, 22 => 0, 23 => 2, 26 => 0, ); if ($this->counter >= strlen($this->data)) { return false; // end of input } $yy_global_pattern = "/^(".$this->ldel."[$]smarty\\.block\\.child".$this->rdel.")|^(\\{\\})|^(".$this->ldel."\\*([\S\s]*?)\\*".$this->rdel.")|^([\t ]*[\r\n]+[\t ]*)|^(".$this->ldel."strip".$this->rdel.")|^(".$this->ldel."\\s{1,}strip\\s{1,}".$this->rdel.")|^(".$this->ldel."\/strip".$this->rdel.")|^(".$this->ldel."\\s{1,}\/strip\\s{1,}".$this->rdel.")|^(".$this->ldel."\\s*literal\\s*".$this->rdel.")|^(".$this->ldel."\\s{1,}\/)|^(".$this->ldel."\\s*(if|elseif|else if|while)(?![^\s]))|^(".$this->ldel."\\s*for(?![^\s]))|^(".$this->ldel."\\s*foreach(?![^\s]))|^(".$this->ldel."\\s{1,})|^(".$this->ldel."\/)|^(".$this->ldel.")|^(<\\?(?:php\\w+|=|[a-zA-Z]+)?)|^(\\?>)|^(<%)|^(%>)|^(([\S\s]*?)(?=([\t ]*[\r\n]+[\t ]*|".$this->ldel."|<\\?|\\?>|<%|%>)))|^([\S\s]+)/"; do { if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns if (!count($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . 'an empty string. Input "' . substr($this->data, $this->counter, 5) . '... state TEXT'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number if ($tokenMap[$this->token]) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, $this->token + 1, $tokenMap[$this->token]); } else { $yysubmatches = array(); } $this->value = current($yymatches); // token value $r = $this->{'yy_r1_' . $this->token}($yysubmatches); if ($r === null) { $this->counter += strlen($this->value); $this->line += substr_count($this->value, "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { $this->counter += strlen($this->value); $this->line += substr_count($this->value, "\n"); if ($this->counter >= strlen($this->data)) { return false; // end of input } // skip this token continue; } } else { throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]); } break; } while (true); } // end function const TEXT = 1; function yy_r1_1($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_SMARTYBLOCKCHILD; } function yy_r1_2($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } function yy_r1_3($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_COMMENT; } function yy_r1_5($yy_subpatterns) { if ($this->strip) { return false; } else { $this->token = Smarty_Internal_Templateparser::TP_LINEBREAK; } } function yy_r1_6($yy_subpatterns) { $this->strip = true; return false; } function yy_r1_7($yy_subpatterns) { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } else { $this->strip = true; return false; } } function yy_r1_8($yy_subpatterns) { $this->strip = false; return false; } function yy_r1_9($yy_subpatterns) { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } else { $this->strip = false; return false; } } function yy_r1_10($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LITERALSTART; $this->yypushstate(self::LITERAL); } function yy_r1_11($yy_subpatterns) { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r1_12($yy_subpatterns) { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELIF; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r1_14($yy_subpatterns) { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELFOR; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r1_15($yy_subpatterns) { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELFOREACH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r1_16($yy_subpatterns) { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } else { $this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r1_17($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } function yy_r1_18($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } function yy_r1_19($yy_subpatterns) { if (in_array($this->value, Array('<?', '<?=', '<?php'))) { $this->token = Smarty_Internal_Templateparser::TP_PHPSTARTTAG; } elseif ($this->value == '<?xml') { $this->token = Smarty_Internal_Templateparser::TP_XMLTAG; } else { $this->token = Smarty_Internal_Templateparser::TP_FAKEPHPSTARTTAG; $this->value = substr($this->value, 0, 2); } } function yy_r1_20($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_PHPENDTAG; } function yy_r1_21($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG; } function yy_r1_22($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG; } function yy_r1_23($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } function yy_r1_26($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } function yylex2() { $tokenMap = array ( 1 => 0, 2 => 0, 3 => 1, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 0, 10 => 0, 11 => 0, 12 => 0, 13 => 1, 15 => 1, 17 => 1, 19 => 0, 20 => 0, 21 => 0, 22 => 1, 24 => 1, 26 => 1, 28 => 1, 30 => 1, 32 => 1, 34 => 1, 36 => 1, 38 => 1, 40 => 1, 42 => 1, 44 => 0, 45 => 0, 46 => 0, 47 => 0, 48 => 0, 49 => 0, 50 => 0, 51 => 0, 52 => 0, 53 => 0, 54 => 3, 58 => 0, 59 => 0, 60 => 0, 61 => 0, 62 => 0, 63 => 0, 64 => 0, 65 => 0, 66 => 1, 68 => 1, 70 => 0, 71 => 0, 72 => 0, 73 => 0, 74 => 0, 75 => 0, 76 => 0, 77 => 0, 78 => 0, 79 => 0, 80 => 0, 81 => 0, 82 => 0, 83 => 0, 84 => 0, 85 => 0, 86 => 0, 87 => 0, ); if ($this->counter >= strlen($this->data)) { return false; // end of input } $yy_global_pattern = "/^('[^'\\\\]*(?:\\\\.[^'\\\\]*)*')|^(".$this->ldel."\\s{1,}\/)|^(".$this->ldel."\\s*(if|elseif|else if|while)(?![^\s]))|^(".$this->ldel."\\s*for(?![^\s]))|^(".$this->ldel."\\s*foreach(?![^\s]))|^(".$this->ldel."\\s{1,})|^(\\s{1,}".$this->rdel.")|^(".$this->ldel."\/)|^(".$this->ldel.")|^(".$this->rdel.")|^(\\s+is\\s+in\\s+)|^(\\s+(AS|as)\\s+)|^(\\s+(to)\\s+)|^(\\s+(step)\\s+)|^(\\s+instanceof\\s+)|^(\\s*===\\s*)|^(\\s*!==\\s*)|^(\\s*==\\s*|\\s+(EQ|eq)\\s+)|^(\\s*!=\\s*|\\s*<>\\s*|\\s+(NE|NEQ|ne|neq)\\s+)|^(\\s*>=\\s*|\\s+(GE|GTE|ge|gte)\\s+)|^(\\s*<=\\s*|\\s+(LE|LTE|le|lte)\\s+)|^(\\s*>\\s*|\\s+(GT|gt)\\s+)|^(\\s*<\\s*|\\s+(LT|lt)\\s+)|^(\\s+(MOD|mod)\\s+)|^(!\\s*|(NOT|not)\\s+)|^(\\s*&&\\s*|\\s*(AND|and)\\s+)|^(\\s*\\|\\|\\s*|\\s*(OR|or)\\s+)|^(\\s*(XOR|xor)\\s+)|^(\\s+is\\s+odd\\s+by\\s+)|^(\\s+is\\s+not\\s+odd\\s+by\\s+)|^(\\s+is\\s+odd)|^(\\s+is\\s+not\\s+odd)|^(\\s+is\\s+even\\s+by\\s+)|^(\\s+is\\s+not\\s+even\\s+by\\s+)|^(\\s+is\\s+even)|^(\\s+is\\s+not\\s+even)|^(\\s+is\\s+div\\s+by\\s+)|^(\\s+is\\s+not\\s+div\\s+by\\s+)|^(\\((int(eger)?|bool(ean)?|float|double|real|string|binary|array|object)\\)\\s*)|^(\\(\\s*)|^(\\s*\\))|^(\\[\\s*)|^(\\s*\\])|^(\\s*->\\s*)|^(\\s*=>\\s*)|^(\\s*=\\s*)|^(\\+\\+|--)|^(\\s*(\\+|-)\\s*)|^(\\s*(\\*|\/|%)\\s*)|^(\\$)|^(\\s*;)|^(::)|^(\\s*:\\s*)|^(@)|^(#)|^(\")|^(`)|^(\\|)|^(\\.)|^(\\s*,\\s*)|^(\\s*&\\s*)|^(\\s*\\?\\s*)|^(0[xX][0-9a-fA-F]+)|^([0-9]*[a-zA-Z_]\\w*)|^(\\d+)|^(\\s+)|^(.)/"; do { if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns if (!count($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . 'an empty string. Input "' . substr($this->data, $this->counter, 5) . '... state SMARTY'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number if ($tokenMap[$this->token]) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, $this->token + 1, $tokenMap[$this->token]); } else { $yysubmatches = array(); } $this->value = current($yymatches); // token value $r = $this->{'yy_r2_' . $this->token}($yysubmatches); if ($r === null) { $this->counter += strlen($this->value); $this->line += substr_count($this->value, "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { $this->counter += strlen($this->value); $this->line += substr_count($this->value, "\n"); if ($this->counter >= strlen($this->data)) { return false; // end of input } // skip this token continue; } } else { throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]); } break; } while (true); } // end function const SMARTY = 2; function yy_r2_1($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_SINGLEQUOTESTRING; } function yy_r2_2($yy_subpatterns) { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r2_3($yy_subpatterns) { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELIF; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r2_5($yy_subpatterns) { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELFOR; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r2_6($yy_subpatterns) { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELFOREACH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r2_7($yy_subpatterns) { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } else { $this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r2_8($yy_subpatterns) { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } else { $this->token = Smarty_Internal_Templateparser::TP_RDEL; $this->yypopstate(); } } function yy_r2_9($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } function yy_r2_10($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } function yy_r2_11($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_RDEL; $this->yypopstate(); } function yy_r2_12($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ISIN; } function yy_r2_13($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_AS; } function yy_r2_15($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_TO; } function yy_r2_17($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_STEP; } function yy_r2_19($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_INSTANCEOF; } function yy_r2_20($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_IDENTITY; } function yy_r2_21($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_NONEIDENTITY; } function yy_r2_22($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_EQUALS; } function yy_r2_24($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_NOTEQUALS; } function yy_r2_26($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_GREATEREQUAL; } function yy_r2_28($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LESSEQUAL; } function yy_r2_30($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_GREATERTHAN; } function yy_r2_32($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LESSTHAN; } function yy_r2_34($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_MOD; } function yy_r2_36($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_NOT; } function yy_r2_38($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LAND; } function yy_r2_40($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LOR; } function yy_r2_42($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LXOR; } function yy_r2_44($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ISODDBY; } function yy_r2_45($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ISNOTODDBY; } function yy_r2_46($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ISODD; } function yy_r2_47($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ISNOTODD; } function yy_r2_48($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ISEVENBY; } function yy_r2_49($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ISNOTEVENBY; } function yy_r2_50($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ISEVEN; } function yy_r2_51($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ISNOTEVEN; } function yy_r2_52($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ISDIVBY; } function yy_r2_53($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ISNOTDIVBY; } function yy_r2_54($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_TYPECAST; } function yy_r2_58($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_OPENP; } function yy_r2_59($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_CLOSEP; } function yy_r2_60($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_OPENB; } function yy_r2_61($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_CLOSEB; } function yy_r2_62($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_PTR; } function yy_r2_63($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_APTR; } function yy_r2_64($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_EQUAL; } function yy_r2_65($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_INCDEC; } function yy_r2_66($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_UNIMATH; } function yy_r2_68($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_MATH; } function yy_r2_70($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_DOLLAR; } function yy_r2_71($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_SEMICOLON; } function yy_r2_72($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_DOUBLECOLON; } function yy_r2_73($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_COLON; } function yy_r2_74($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_AT; } function yy_r2_75($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_HATCH; } function yy_r2_76($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_QUOTE; $this->yypushstate(self::DOUBLEQUOTEDSTRING); } function yy_r2_77($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_BACKTICK; $this->yypopstate(); } function yy_r2_78($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_VERT; } function yy_r2_79($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_DOT; } function yy_r2_80($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_COMMA; } function yy_r2_81($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ANDSYM; } function yy_r2_82($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_QMARK; } function yy_r2_83($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_HEX; } function yy_r2_84($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ID; } function yy_r2_85($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_INTEGER; } function yy_r2_86($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_SPACE; } function yy_r2_87($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } function yylex3() { $tokenMap = array ( 1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0, 8 => 2, 11 => 0, ); if ($this->counter >= strlen($this->data)) { return false; // end of input } $yy_global_pattern = "/^(".$this->ldel."\\s*literal\\s*".$this->rdel.")|^(".$this->ldel."\\s*\/literal\\s*".$this->rdel.")|^([\t ]*[\r\n]+[\t ]*)|^(<\\?(?:php\\w+|=|[a-zA-Z]+)?)|^(\\?>)|^(<%)|^(%>)|^(([\S\s]*?)(?=([\t ]*[\r\n]+[\t ]*|".$this->ldel."\/?literal".$this->rdel."|<\\?|<%)))|^([\S\s]+)/"; do { if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns if (!count($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . 'an empty string. Input "' . substr($this->data, $this->counter, 5) . '... state LITERAL'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number if ($tokenMap[$this->token]) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, $this->token + 1, $tokenMap[$this->token]); } else { $yysubmatches = array(); } $this->value = current($yymatches); // token value $r = $this->{'yy_r3_' . $this->token}($yysubmatches); if ($r === null) { $this->counter += strlen($this->value); $this->line += substr_count($this->value, "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { $this->counter += strlen($this->value); $this->line += substr_count($this->value, "\n"); if ($this->counter >= strlen($this->data)) { return false; // end of input } // skip this token continue; } } else { throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]); } break; } while (true); } // end function const LITERAL = 3; function yy_r3_1($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LITERALSTART; $this->yypushstate(self::LITERAL); } function yy_r3_2($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LITERALEND; $this->yypopstate(); } function yy_r3_3($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LITERAL; } function yy_r3_4($yy_subpatterns) { if (in_array($this->value, Array('<?', '<?=', '<?php'))) { $this->token = Smarty_Internal_Templateparser::TP_PHPSTARTTAG; } else { $this->token = Smarty_Internal_Templateparser::TP_FAKEPHPSTARTTAG; $this->value = substr($this->value, 0, 2); } } function yy_r3_5($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_PHPENDTAG; } function yy_r3_6($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG; } function yy_r3_7($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG; } function yy_r3_8($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LITERAL; } function yy_r3_11($yy_subpatterns) { $this->compiler->trigger_template_error ("missing or misspelled literal closing tag"); } function yylex4() { $tokenMap = array ( 1 => 0, 2 => 1, 4 => 0, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 0, 10 => 0, 11 => 0, 12 => 0, 13 => 3, 17 => 0, ); if ($this->counter >= strlen($this->data)) { return false; // end of input } $yy_global_pattern = "/^(".$this->ldel."\\s{1,}\/)|^(".$this->ldel."\\s*(if|elseif|else if|while)(?![^\s]))|^(".$this->ldel."\\s*for(?![^\s]))|^(".$this->ldel."\\s*foreach(?![^\s]))|^(".$this->ldel."\\s{1,})|^(".$this->ldel."\/)|^(".$this->ldel.")|^(\")|^(`\\$)|^(\\$[0-9]*[a-zA-Z_]\\w*)|^(\\$)|^(([^\"\\\\]*?)((?:\\\\.[^\"\\\\]*?)*?)(?=(".$this->ldel."|\\$|`\\$|\")))|^([\S\s]+)/"; do { if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns if (!count($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . 'an empty string. Input "' . substr($this->data, $this->counter, 5) . '... state DOUBLEQUOTEDSTRING'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number if ($tokenMap[$this->token]) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, $this->token + 1, $tokenMap[$this->token]); } else { $yysubmatches = array(); } $this->value = current($yymatches); // token value $r = $this->{'yy_r4_' . $this->token}($yysubmatches); if ($r === null) { $this->counter += strlen($this->value); $this->line += substr_count($this->value, "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { $this->counter += strlen($this->value); $this->line += substr_count($this->value, "\n"); if ($this->counter >= strlen($this->data)) { return false; // end of input } // skip this token continue; } } else { throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]); } break; } while (true); } // end function const DOUBLEQUOTEDSTRING = 4; function yy_r4_1($yy_subpatterns) { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r4_2($yy_subpatterns) { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELIF; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r4_4($yy_subpatterns) { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELFOR; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r4_5($yy_subpatterns) { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELFOREACH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r4_6($yy_subpatterns) { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } else { $this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r4_7($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } function yy_r4_8($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } function yy_r4_9($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_QUOTE; $this->yypopstate(); } function yy_r4_10($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_BACKTICK; $this->value = substr($this->value,0,-1); $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } function yy_r4_11($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_DOLLARID; } function yy_r4_12($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } function yy_r4_13($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } function yy_r4_17($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/smarty/sysplugins/smarty_internal_templatelexer.php
PHP
asf20
36,196
<?php /** * Project: Smarty: the PHP compiling template engine * File: smarty_internal_wrapper.php * SVN: $Id: $ * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * For questions, help, comments, discussion, etc., please join the * Smarty mailing list. Send a blank e-mail to * smarty-discussion-subscribe@googlegroups.com * * @link http://www.smarty.net/ * @copyright 2008 New Digital Group, Inc. * @author Monte Ohrt <monte at ohrt dot com> * @author Uwe Tews * @package Smarty * @subpackage PluginsInternal * @version 3-SVN$Rev: 3286 $ */ /* * Smarty Backward Compatability Wrapper */ class Smarty_Internal_Wrapper { protected $smarty; function __construct($smarty) { $this->smarty = $smarty; } /** * Converts smarty2-style function call to smarty 3-style function call * This is expensive, be sure to port your code to Smarty 3! * * @param string $name Smarty 2 function name * @param array $args Smarty 2 function args */ function convert($name, $args) { // throw notice about deprecated function if($this->smarty->deprecation_notices) trigger_error("function call '$name' is unknown or deprecated.",E_USER_NOTICE); // get first and last part of function name $name_parts = explode('_',$name,2); switch($name_parts[0]) { case 'register': case 'unregister': switch($name_parts[1]) { case 'object': return call_user_func_array(array($this->smarty,"{$name_parts[0]}Object"),$args); case 'compiler_function': return call_user_func_array(array($this->smarty,"{$name_parts[0]}Plugin"),array_merge(array('compiler'),$args)); case 'prefilter': return call_user_func_array(array($this->smarty,"{$name_parts[0]}Filter"),array_merge(array('pre'),$args)); case 'postfilter': return call_user_func_array(array($this->smarty,"{$name_parts[0]}Filter"),array_merge(array('post'),$args)); case 'outputfilter': return call_user_func_array(array($this->smarty,"{$name_parts[0]}Filter"),array_merge(array('output'),$args)); case 'resource': return call_user_func_array(array($this->smarty,"{$name_parts[0]}Resource"),$args); default: return call_user_func_array(array($this->smarty,"{$name_parts[0]}Plugin"),array_merge(array($name_parts[1]),$args)); } case 'get': switch($name_parts[1]) { case 'template_vars': return call_user_func_array(array($this->smarty,'getTemplateVars'),$args); case 'config_vars': return call_user_func_array(array($this->smarty,'getConfigVars'),$args); default: return call_user_func_array(array($myobj,$name_parts[1]),$args); } case 'clear': switch($name_parts[1]) { case 'all_assign': return call_user_func_array(array($this->smarty,'clearAllAssign'),$args); case 'assign': return call_user_func_array(array($this->smarty,'clearAssign'),$args); case 'all_cache': return call_user_func_array(array($this->smarty,'clearAllCache'),$args); case 'cache': return call_user_func_array(array($this->smarty,'clearCache'),$args); case 'compiled_template': return call_user_func_array(array($this->smarty,'clearCompiledTemplate'),$args); } case 'config': switch($name_parts[1]) { case 'load': return call_user_func_array(array($this->smarty,'configLoad'),$args); } case 'trigger': switch($name_parts[1]) { case 'error': return call_user_func_array('trigger_error',$args); } case 'load': switch($name_parts[1]) { case 'filter': return call_user_func_array(array($this->smarty,'loadFilter'),$args); } } throw new SmartyException("unknown method '$name'"); } /** * trigger Smarty error * * @param string $error_msg * @param integer $error_type */ function trigger_error($error_msg, $error_type = E_USER_WARNING) { trigger_error("Smarty error: $error_msg", $error_type); } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/smarty/sysplugins/smarty_internal_wrapper.php
PHP
asf20
5,254
<?php /** * Smarty Internal Plugin Config * * Main class for config variables * * @ignore * @package Smarty * @subpackage Config * @author Uwe Tews */ class Smarty_Internal_Config { static $config_objects = array(); public function __construct($config_resource, $smarty, $data = null) { $this->data = $data; $this->smarty = $smarty; $this->config_resource = $config_resource; $this->config_resource_type = null; $this->config_resource_name = null; $this->config_filepath = null; $this->config_timestamp = null; $this->config_source = null; $this->compiled_config = null; $this->compiled_filepath = null; $this->compiled_timestamp = null; $this->mustCompile = null; $this->compiler_object = null; // parse config resource name if (!$this->parseConfigResourceName ($config_resource)) { throw new SmartyException ("Unable to parse config resource '{$config_resource}'"); } } public function getConfigFilepath () { return $this->config_filepath === null ? $this->config_filepath = $this->buildConfigFilepath() : $this->config_filepath; } public function getTimestamp () { return $this->config_timestamp === null ? $this->config_timestamp = filemtime($this->getConfigFilepath()) : $this->config_timestamp; } private function parseConfigResourceName($config_resource) { if (empty($config_resource)) return false; if (strpos($config_resource, ':') === false) { // no resource given, use default $this->config_resource_type = $this->smarty->default_config_type; $this->config_resource_name = $config_resource; } else { // get type and name from path list($this->config_resource_type, $this->config_resource_name) = explode(':', $config_resource, 2); if (strlen($this->config_resource_type) == 1) { // 1 char is not resource type, but part of filepath $this->config_resource_type = $this->smarty->default_config_type; $this->config_resource_name = $config_resource; } else { $this->config_resource_type = strtolower($this->config_resource_type); } } return true; } /* * get system filepath to config */ public function buildConfigFilepath () { foreach((array)$this->smarty->config_dir as $_config_dir) { if (strpos('/\\', substr($_config_dir, -1)) === false) { $_config_dir .= DS; } $_filepath = $_config_dir . $this->config_resource_name; if (file_exists($_filepath)) return $_filepath; } // check for absolute path if (file_exists($this->config_resource_name)) return $this->config_resource_name; // no tpl file found throw new SmartyException("Unable to load config file \"{$this->config_resource_name}\""); return false; } /** * Read config file source * * @return string content of source file */ /** * Returns the template source code * * The template source is being read by the actual resource handler * * @return string the template source */ public function getConfigSource () { if ($this->config_source === null) { if ($this->readConfigSource($this) === false) { throw new SmartyException("Unable to load config file \"{$this->config_resource_name}\""); } } return $this->config_source; } public function readConfigSource() { // read source file if (file_exists($this->getConfigFilepath())) { $this->config_source = file_get_contents($this->getConfigFilepath()); return true; } else { return false; } } /** * Returns the compiled filepath * * @return string the compiled filepath */ public function getCompiledFilepath () { return $this->compiled_filepath === null ? ($this->compiled_filepath = $this->buildCompiledFilepath()) : $this->compiled_filepath; } public function buildCompiledFilepath() { $_compile_id = isset($this->smarty->compile_id) ? preg_replace('![^\w\|]+!', '_', $this->smarty->compile_id) : null; $_flag = (int)$this->smarty->config_read_hidden + (int)$this->smarty->config_booleanize * 2 + (int)$this->smarty->config_overwrite * 4; $_filepath = sha1($this->config_resource_name . $_flag); // if use_sub_dirs, break file into directories if ($this->smarty->use_sub_dirs) { $_filepath = substr($_filepath, 0, 2) . DS . substr($_filepath, 2, 2) . DS . substr($_filepath, 4, 2) . DS . $_filepath; } $_compile_dir_sep = $this->smarty->use_sub_dirs ? DS : '^'; if (isset($_compile_id)) { $_filepath = $_compile_id . $_compile_dir_sep . $_filepath; } $_compile_dir = $this->smarty->compile_dir; if (substr($_compile_dir, -1) != DS) { $_compile_dir .= DS; } return $_compile_dir . $_filepath . '.' . basename($this->config_resource_name) . '.config' . '.php'; } /** * Returns the timpestamp of the compiled file * * @return integer the file timestamp */ public function getCompiledTimestamp () { return $this->compiled_timestamp === null ? ($this->compiled_timestamp = (file_exists($this->getCompiledFilepath())) ? filemtime($this->getCompiledFilepath()) : false) : $this->compiled_timestamp; } /** * Returns if the current config file must be compiled * * It does compare the timestamps of config source and the compiled config and checks the force compile configuration * * @return boolean true if the file must be compiled */ public function mustCompile () { return $this->mustCompile === null ? $this->mustCompile = ($this->smarty->force_compile || $this->getCompiledTimestamp () === false || $this->smarty->compile_check && $this->getCompiledTimestamp () < $this->getTimestamp ()): $this->mustCompile; } /** * Returns the compiled config file * * It checks if the config file must be compiled or just read the compiled version * * @return string the compiled config file */ public function getCompiledConfig () { if ($this->compiled_config === null) { // see if template needs compiling. if ($this->mustCompile()) { $this->compileConfigSource(); } else { $this->compiled_config = file_get_contents($this->getCompiledFilepath()); } } return $this->compiled_config; } /** * Compiles the config files */ public function compileConfigSource () { // compile template if (!is_object($this->compiler_object)) { // load compiler $this->compiler_object = new Smarty_Internal_Config_File_Compiler($this->smarty); } // compile locking if ($this->smarty->compile_locking) { if ($saved_timestamp = $this->getCompiledTimestamp()) { touch($this->getCompiledFilepath()); } } // call compiler try { $this->compiler_object->compileSource($this); } catch (Exception $e) { // restore old timestamp in case of error if ($this->smarty->compile_locking && $saved_timestamp) { touch($this->getCompiledFilepath(), $saved_timestamp); } throw $e; } // compiling succeded // write compiled template Smarty_Internal_Write_File::writeFile($this->getCompiledFilepath(), $this->getCompiledConfig(), $this->smarty); } /* * load config variables * * @param mixed $sections array of section names, single section or null * @param object $scope global,parent or local */ public function loadConfigVars ($sections = null, $scope = 'local') { if ($this->data instanceof Smarty_Internal_Template) { $this->data->properties['file_dependency'][sha1($this->getConfigFilepath())] = array($this->getConfigFilepath(), $this->getTimestamp(),'file'); } if ($this->mustCompile()) { $this->compileConfigSource(); } // pointer to scope if ($scope == 'local') { $scope_ptr = $this->data; } elseif ($scope == 'parent') { if (isset($this->data->parent)) { $scope_ptr = $this->data->parent; } else { $scope_ptr = $this->data; } } elseif ($scope == 'root' || $scope == 'global') { $scope_ptr = $this->data; while (isset($scope_ptr->parent)) { $scope_ptr = $scope_ptr->parent; } } $_config_vars = array(); include($this->getCompiledFilepath ()); // copy global config vars foreach ($_config_vars['vars'] as $variable => $value) { if ($this->smarty->config_overwrite || !isset($scope_ptr->config_vars[$variable])) { $scope_ptr->config_vars[$variable] = $value; } else { $scope_ptr->config_vars[$variable] = array_merge((array)$scope_ptr->config_vars[$variable], (array)$value); } } // scan sections foreach ($_config_vars['sections'] as $this_section => $dummy) { if ($sections == null || in_array($this_section, (array)$sections)) { foreach ($_config_vars['sections'][$this_section]['vars'] as $variable => $value) { if ($this->smarty->config_overwrite || !isset($scope_ptr->config_vars[$variable])) { $scope_ptr->config_vars[$variable] = $value; } else { $scope_ptr->config_vars[$variable] = array_merge((array)$scope_ptr->config_vars[$variable], (array)$value); } } } } } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/smarty/sysplugins/smarty_internal_config.php
PHP
asf20
10,510
<?php /** * Smarty Internal Plugin Compile Append * * Compiles the {append} tag * * @package Smarty * @subpackage Compiler * @author Uwe Tews */ /** * Smarty Internal Plugin Compile Append Class */ class Smarty_Internal_Compile_Append extends Smarty_Internal_Compile_Assign { // attribute definitions public $required_attributes = array('var', 'value'); public $shorttag_order = array('var', 'value'); public $optional_attributes = array('scope', 'index'); /** * Compiles code for the {append} tag * * @param array $args array with attributes from parser * @param object $compiler compiler object * @param array $parameter array with compilation parameter * @return string compiled code */ public function compile($args, $compiler, $parameter) { $this->compiler = $compiler; // check and get attributes $_attr = $this->_get_attributes($args); // map to compile assign attributes if (isset($_attr['index'])) { $_params['smarty_internal_index'] = '[' . $_attr['index'] . ']'; unset($_attr['index']); } else { $_params['smarty_internal_index'] = '[]'; } $_new_attr = array(); foreach ($_attr as $key => $value) { $_new_attr[] = array($key => $value); } // call compile assign return parent::compile($_new_attr, $compiler, $_params); } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/smarty/sysplugins/smarty_internal_compile_append.php
PHP
asf20
1,466
<?php /** * Smarty Internal Plugin Nocache Insert * * Compiles the {insert} tag into the cache file * * @package Smarty * @subpackage Compiler * @author Uwe Tews */ /** * Smarty Internal Plugin Compile Insert Class */ class Smarty_Internal_Nocache_Insert { /** * Compiles code for the {insert} tag into cache file * * @param string $_function insert function name * @param array $_attr array with paramter * @param object $template template object * @param string $_script script name to load or 'null' * @param string $_assign soptinal variable name * @return string compiled code */ static function compile($_function, $_attr, $_template, $_script, $_assign = null) { $_output = '<?php '; if ($_script != 'null') { // script which must be included // code for script file loading $_output .= "require_once '{$_script}';"; } // call insert if (isset($_assign)) { $_output .= "\$_smarty_tpl->assign('{$_assign}' , {$_function} (" . var_export($_attr, true) . ",\$_smarty_tpl), true);?>"; } else { $_output .= "echo {$_function}(" . var_export($_attr, true) . ",\$_smarty_tpl);?>"; } $_tpl = $_template; while ($_tpl->parent instanceof Smarty_Internal_Template) { $_tpl = $_tpl->parent; } return "/*%%SmartyNocache:{$_tpl->properties['nocache_hash']}%%*/" . $_output . "/*/%%SmartyNocache:{$_tpl->properties['nocache_hash']}%%*/"; } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/smarty/sysplugins/smarty_internal_nocache_insert.php
PHP
asf20
1,627
<?php class Conexao { private static $conexao = null; public static function getConexao() { if (Conexao::$conexao == null) Conexao::$conexao = new PDO(Constantes::$DRIVER_DB, Constantes::$USER_DB, Constantes::$PASS_DB); return Conexao::$conexao; } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/Conexao.class.php
PHP
asf20
309
<?php /** EasyPhpThumbnail class version 2.0.1 - PHP4 On-the-fly image manipulation and thumbnail generation Copyright (c) 2008-2009 JF Nutbroek <jfnutbroek@gmail.com> Visit http://www.mywebmymail.com for more information Permission to use, copy, modify, and/or distribute this software for any purpose without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ class easyphpthumbnail { /** * The size of the thumbnail in px * Autoscale landscape or portrait * * @var int */ var $Thumbsize; /** * The height of the thumbnail in px * Forces all thumbnails to the same height * * @var int */ var $Thumbheight; /** * The width of the thumbnail in px * Forces all thumbnails to the same width * * @var int */ var $Thumbwidth; /** * Set dimensions to percentage instead of px * * @var boolean */ var $Percentage; /** * Allow image enlargement * * @var boolean */ var $Inflate; /** * Quality of JPEG images 0 - 100 * * @var int */ var $Quality; /** * The frame width in px around the image * * @var int */ var $Framewidth; /** * Frame color in web format: '#00FF00' * * @var string */ var $Framecolor; /** * Background color in web format: '#00FF00' * * @var string */ var $Backgroundcolor; /** * Add shadow * * @var boolean */ var $Shadow; /** * Show binder rings * * @var boolean */ var $Binder; /** * Binder ring spacing in px * * @var int */ var $Binderspacing; /** * Path to PNG watermark image * * @var string */ var $Watermarkpng; /** * Position of watermark image, bottom right corner: '100% 100%' * * @var string */ var $Watermarkposition; /** * Transparency level of watermark image 0 - 100 * * @var int */ var $Watermarktransparency; /** * CHMOD level of saved thumbnails: '0755' * * @var string */ var $Chmodlevel; /** * Path to location for thumbnails * * @var string */ var $Thumblocation; /** * Filetype conversion for saving thumbnail * * @var string */ var $Thumbsaveas; /** * Prefix for saving thumbnails * * @var string */ var $Thumbprefix; /** * Clip corners; array with 7 values * [0]: 0=disable 1=straight 2=rounded * [1]: Percentage of clipping * [2]: Clip randomly 0=disable 1=enable * [3]: Clip top left 0=disable 1=enable * [4]: Clip bottom left 0=disable 1=enable * [5]: Clip top right 0=disable 1=enable * [6]: Clip bottom right 0=disable 1=enable * * @var array */ var $Clipcorner; /** * Age image; array with 3 values * [0]: Boolean 0=disable 1=enable * [1]: Add noise 0-100, 0=disable * [2]: Sephia depth 0-100, 0=disable (greyscale) * * @var array */ var $Ageimage; /** * Crop image; array with 6 values * [0]: 0=disable 1=enable free crop 2=enable center crop 3=enable square crop * [1]: 0=percentage 1=pixels * [2]: Crop left * [3]: Crop right * [4]: Crop top * [5]: Crop bottom * * @var array */ var $Cropimage; /** * Path to PNG border image * * @var string */ var $Borderpng; /** * Copyright text * * @var string */ var $Copyrighttext; /** * Position for Copyrighttext text, bottom right corner: '100% 100%' * * @var string */ var $Copyrightposition; /** * Path to TTF Fonttype * If no TTF font is specified, system font will be used * * @var string */ var $Copyrightfonttype; /** * Fontsize for Copyrighttext text * * @var string */ var $Copyrightfontsize; /** * Copyrighttext text color in web format: '#000000' * No color specified will auto-determine black or white * * @var string */ var $Copyrighttextcolor; /** * Rotate image in degrees * * @var int */ var $Rotate; /** * Flip the image horizontally * * @var boolean */ var $Fliphorizontal; /** * Flip the image vertically * * @var boolean */ var $Flipvertical; /** * Create square canvas thumbs * * @var boolean */ var $Square; /** * Apply a filter to the image * * @var boolean */ var $Applyfilter; /** * Apply a 3x3 filter matrix to the image; array with 9 values * [0]: a1,1 * [1]: a1,2 * [2]: a1,3 * [3]: a2,1 * [4]: a2,2 * [5]: a2,3 * [6]: a3,1 * [7]: a3,2 * [8]: a3,3 * * @var array */ var $Filter; /** * Divisor for filter * * @var int */ var $Divisor; /** * Offset for filter * * @var int */ var $Offset; /** * Blur filter * * @var boolean */ var $Blur; /** * Sharpen filter * * @var boolean */ var $Sharpen; /** * Edge filter * * @var boolean */ var $Edge; /** * Emboss filter * * @var boolean */ var $Emboss; /** * Mean filter * * @var boolean */ var $Mean; /** * Rotate and crop the image * * @var boolean */ var $Croprotate; /** * Apply perspective to the image; array with 3 values * [0]: 0=disable 1=enable * [1]: Direction 0=left 1=right 2=top 3=bottom * [2]: Perspective strength 0 - 100 * * @var array */ var $Perspective; /** * Apply perspective to the thumbnail; array with 3 values * [0]: 0=disable 1=enable * [1]: Direction 0=left 1=right 2=top 3=bottom * [2]: Perspective strength 0 - 100 * * @var array */ var $Perspectivethumb; /** * Apply shading gradient to the image; array with 4 values * [0]: 0=disable 1=enable * [1]: Shading strength 0 - 100 * [2]: Shading area 0 - 100 * [3]: Shading direction 0=right 1=left 2=top 3=bottom * * @var array */ var $Shading; /** * Shading gradient color in web format: '#00FF00' * * @var string */ var $Shadingcolor; /** * Apply a mirror effect to the thumbnail; array with 4 values * [0]: 0=disable 1=enable * [1]: Mirror transparency gradient starting strength 0 - 100 * [2]: Mirror transparency gradient ending strength 0 - 100 * [3]: Mirror area 0 - 100 * [4]: Mirror 'gap' between original image and reflection in px * * @var array */ var $Mirror; /** * Mirror gradient color in web format: '#00FF00' * * @var string */ var $Mirrorcolor; /** * Create image negative * * @var boolean */ var $Negative; /** * Replace a color in the image; array with 4 values * [0]: 0=disable 1=enable * [1]: Color to replace in web format: '#00FF00' * [2]: Replacement color in web format: '#FF0000' * [3]: RGB tolerance 0 - 100 * * @var array */ var $Colorreplace; /** * Scramble pixels; array with 3 values * [0]: 0=disable 1=enable * [1]: Pixel range * [2]: Repeats (use with care!) * * @var array */ var $Pixelscramble; /** * Convert image to greyscale * * @var boolean */ var $Greyscale; /** * Change brightness of the image; array with 2 values * [0]: 0=disable 1=enable * [1]: Brightness -100 to 100 * * @var array */ var $Brightness; /** * Change contrast of the image; array with 2 values * [0]: 0=disable 1=enable * [1]: Contrast -100 to 100 * * @var array */ var $Contrast; /** * Change gamma of the image; array with 2 values * [0]: 0=disable 1=enable * [1]: Gamma correction factor * * @var array */ var $Gamma; /** * Reduce palette of the image; array with 2 values * [0]: 0=disable 1=enable * [1]: Amount of colors for palette * * @var array */ var $Palette; /** * Merge a color in the image; array with 5 values * [0]: 0=disable 1=enable * [1]: Red component 0 - 255 * [2]: Green component 0 - 255 * [3]: Blue component 0 - 255 * [4]: Opacity level 0 - 127 * * @var array */ var $Colorize; /** * Pixelate the image; array with 2 values * [0]: 0=disable 1=enable * [1]: Block size in pixels * * @var array */ var $Pixelate; /** * Apply a median filter to remove noise * * @var boolean */ var $Medianfilter; /** * Deform the image with twirl effect; array with 3 values * [0]: 0=disable 1=enable * [1]: Effect strength 0 to 100 * [2]: Direction of twirl 0=clockwise 1=anti-clockwise * * @var array */ var $Twirlfx; /** * Deform the image with ripple effect; array with 2 values * [0]: 0=disable 1=enable * [1]: Amount of horizontal waves * [2]: Amplitude of horizontal waves in px * [3]: Amount of vertical waves * [4]: Amplitude of vertical waves in px * * @var array */ var $Ripplefx; /** * Deform the image with perspective ripple or 'lake' effect; array with 3 values * [0]: 0=disable 1=enable * [1]: Density of the waves * [2]: Lake area measured from bottom 0 - 100 * * @var array */ var $Lakefx; /** * Deform the image with a circular waterdrop effect; array with 4 values * [0]: 0=disable 1=enable * [1]: Amplitude in px * [2]: Radius in px * [3]: Wavelength in px * * @var array */ var $Waterdropfx; /** * Create transparent image; array with 4 values * [0]: 0=disable 1=enable * [1]: 0=PNG 1=GIF * [2]: Replacement color in web format: '#FF0000' * [3]: RGB tolerance 0 - 100 * * @var array */ var $Maketransparent; /** * The image filename or array with filenames * * @var string / array */ var $image; /** * Original image * * @var image */ var $im; /** * Thumbnail image * * @var image */ var $thumb; /** * Temporary image * * @var image */ var $newimage; /** * Dimensions of original image; array with 3 values * [0]: Width * [1]: Height * [2]: Filetype * * @var array */ var $size; /** * Offset in px for binder * * @var int */ var $bind_offset; /** * Offset in px for shadow * * @var int */ var $shadow_offset; /** * Offset in px for frame * * @var int */ var $frame_offset; /** * Thumb width in px * * @var int */ var $thumbx; /** * Thumb height in px * * @var int */ var $thumby; /** * Class constructor * */ function easyphpthumbnail() { $this->Thumbsize = 160; $this->Thumbheight = 0; $this->Thumbwidth = 0; $this->Percentage = false; $this->Framewidth = 0; $this->Inflate = false; $this->Shadow = false; $this->Binder = false; $this->Binderspacing = 8; $this->Backgroundcolor = '#FFFFFF'; $this->Framecolor = '#FFFFFF'; $this->Watermarkpng = ''; $this->Watermarkposition = '100% 100%'; $this->Watermarktransparency = '70'; $this->Quality = '90'; $this->Chmodlevel = ''; $this->Thumblocation = ''; $this->Thumbsaveas = ''; $this->Thumbprefix = 'thumbnail_'; $this->Clipcorner = array(0,15,0,1,1,1,0); $this->Ageimage = array(0,10,80); $this->Cropimage = array(0,0,20,20,20,20); $this->Borderpng = ''; $this->Copyrighttext = ''; $this->Copyrightposition = '0% 95%'; $this->Copyrightfonttype = ''; $this->Copyrightfontsize = 2; $this->Copyrighttextcolor = ''; $this->Rotate = 0; $this->Fliphorizontal = false; $this->Flipvertical = false; $this->Square = false; $this->Applyfilter = false; $this->Filter = array(0,0,0,0,1,0,0,0,0); $this->Divisor = 1; $this->Offset = 0; $this->Blur = false; $this->Sharpen = false; $this->Edge = false; $this->Emboss = false; $this->Mean = false; $this->Croprotate = false; $this->Perspective = array(0,0,30); $this->Perspectivethumb = array(0,1,20); $this->Shading = array(0,70,65,0); $this->Shadingcolor = '#000000'; $this->Mirror = array(0,20,100,40,2); $this->Mirrorcolor = '#FFFFFF'; $this->Negative = false; $this->Colorreplace = array(0,'#000000','#FFFFFF',30); $this->Pixelscramble = array(0,3,1); $this->Greyscale = false; $this->Brightness = array(0,30); $this->Contrast = array(0,30); $this->Gamma = array(0,1.5); $this->Palette = array(0,6); $this->Colorize = array(0,100,0,0,0); $this->Pixelate = array(0,3); $this->Medianfilter = false; $this->Twirlfx = array(0,20,0); $this->Ripplefx = array(0,5,15,5,5); $this->Lakefx = array(0,15,80); $this->Waterdropfx = array(0,1.2,400,40); $this->Maketransparent = array(0,0,'#FFFFFF',30); register_shutdown_function(array(&$this,'destruct')); } /** * Class destructor * */ function destruct() { if (is_resource($this->im)) imagedestroy($this->im); if (is_resource($this->thumb)) imagedestroy($this->thumb); if (is_resource($this->newimage)) imagedestroy($this->newimage); } /** * Creates and outputs thumbnail * * @param string/array $filename * @param string $output */ function Createthumb($filename="unknown",$output="screen") { if (is_array($filename) && $output=="file") { foreach ($filename as $name) { $this->image=$name; $this->thumbmaker(); $this->savethumb(); } } else { $this->image=$filename; $this->thumbmaker(); if ($output=="file") {$this->savethumb();} else {$this->displaythumb();} } } /** * Apply all modifications to the image * */ function thumbmaker() { if ($this->loadimage()) { // Modifications to the original sized image if ($this->Cropimage[0]>0) {$this->cropimage();} if ($this->Medianfilter) {$this->medianfilter();} if ($this->Greyscale) {$this->greyscale();} if ($this->Brightness[0]==1) {$this->brightness();} if ($this->Contrast[0]==1) {$this->contrast();} if ($this->Gamma[0]==1) {$this->gamma();} if ($this->Palette[0]==1) {$this->palette();} if ($this->Colorize[0]==1) {$this->colorize();} if ($this->Colorreplace[0]==1) {$this->colorreplace();} if ($this->Pixelscramble[0]==1) {$this->pixelscramble();} if ($this->Pixelate[0]==1) {$this->pixelate();} if ($this->Ageimage[0]==1) {$this->ageimage();} if ($this->Fliphorizontal) {$this->rotateorflip(0,1);} if ($this->Flipvertical) {$this->rotateorflip(0,-1);} if ($this->Watermarkpng!='') {$this->addpngwatermark();} if ($this->Clipcorner[0]==1) {$this->clipcornersstraight();} if ($this->Clipcorner[0]==2) {$this->clipcornersround();} if (intval($this->Rotate)<>0 && !$this->Croprotate) { switch(intval($this->Rotate)) { case -90: case 270: $this->rotateorflip(1,0); break; case -270: case 90: $this->rotateorflip(1,0); break; case -180: case 180: $this->rotateorflip(1,0); $this->rotateorflip(1,0); break; default: $this->freerotate(); } } if ($this->Croprotate) {$this->croprotate();} if ($this->Sharpen) {$this->sharpen();} if ($this->Blur) {$this->blur();} if ($this->Edge) {$this->edge();} if ($this->Emboss) {$this->emboss();} if ($this->Mean) {$this->mean();} if ($this->Applyfilter) {$this->filter();} if ($this->Twirlfx[0]==1) {$this->twirlfx();} if ($this->Ripplefx[0]==1) {$this->ripplefx();} if ($this->Lakefx[0]==1) {$this->lakefx();} if ($this->Waterdropfx[0]==1) {$this->waterdropfx();} if ($this->Negative) {$this->negative();} if ($this->Shading[0]==1) {$this->shading();} if ($this->Perspective[0]==1) {$this->perspective();} // Prepare the thumbnail (new canvas) and add modifications to the resized image (thumbnail) $this->createemptythumbnail(); if ($this->Binder) {$this->addbinder();} if ($this->Shadow) {$this->addshadow();} imagecopyresampled($this->thumb,$this->im,$this->Framewidth*($this->frame_offset-1),$this->Framewidth,0,0,$this->thumbx-($this->frame_offset*$this->Framewidth)-$this->shadow_offset,$this->thumby-2*$this->Framewidth-$this->shadow_offset,imagesx($this->im),imagesy($this->im)); if ($this->Borderpng!='') {$this->addpngborder();} if ($this->Copyrighttext!='') {$this->addcopyright();} if ($this->Square) {$this->square();} if ($this->Mirror[0]==1) {$this->mirror();} if ($this->Perspectivethumb[0]==1) {$this->perspectivethumb();} if ($this->Maketransparent[0]==1) {$this->maketransparent();} } } /** * Load image in memory * */ function loadimage() { if (file_exists($this->image)) { $this->size=GetImageSize($this->image); switch($this->size[2]) { case 1: if (imagetypes() & IMG_GIF) {$this->im=imagecreatefromgif($this->image);return true;} else {$this->invalidimage('No GIF support');return false;} break; case 2: if (imagetypes() & IMG_JPG) {$this->im=imagecreatefromjpeg($this->image);return true;} else {$this->invalidimage('No JPG support');return false;} break; case 3: if (imagetypes() & IMG_PNG) {$this->im=imagecreatefrompng($this->image);return true;} else {$this->invalidimage('No PNG support');return false;} break; default: $this->invalidimage('Filetype ?????'); return false; } } else { $this->invalidimage('File not found'); return false; } } /** * Creates error image * * @param string $message */ function invalidimage($message) { $this->thumb=imagecreate(80,75); $black=imagecolorallocate($this->thumb,0,0,0);$yellow=imagecolorallocate($this->thumb,255,255,0); imagefilledrectangle($this->thumb,0,0,80,75,imagecolorallocate($this->thumb,255,0,0)); imagerectangle($this->thumb,0,0,79,74,$black);imageline($this->thumb,0,20,80,20,$black); imagefilledrectangle($this->thumb,1,1,78,19,$yellow);imagefilledrectangle($this->thumb,27,35,52,60,$yellow); imagerectangle($this->thumb,26,34,53,61,$black); imageline($this->thumb,27,35,52,60,$black);imageline($this->thumb,52,35,27,60,$black); imagestring($this->thumb,1,5,5,$message,$black); } /** * Add watermark to image * */ function addpngwatermark() { if (file_exists($this->Watermarkpng)) { $this->newimage=imagecreatefrompng($this->Watermarkpng); $wpos=explode(' ',str_replace('%','',$this->Watermarkposition)); imagecopymerge($this->im,$this->newimage,min(max(imagesx($this->im)*($wpos[0]/100)-0.5*imagesx($this->newimage),0),imagesx($this->im)-imagesx($this->newimage)),min(max(imagesy($this->im)*($wpos[1]/100)-0.5*imagesy($this->newimage),0),imagesy($this->im)-imagesy($this->newimage)),0,0,imagesx($this->newimage),imagesy($this->newimage),intval($this->Watermarktransparency)); imagedestroy($this->newimage); } } /** * Create empty thumbnail * */ function createemptythumbnail() { $thumbsize=$this->Thumbsize;$thumbwidth=$this->Thumbwidth;$thumbheight=$this->Thumbheight; if ($thumbsize==0) {$thumbsize=9999;$thumbwidth=0;$thumbheight=0;} if ($this->Percentage) { if ($thumbwidth>0) {$thumbwidth=floor($thumbwidth*($this->Percentage/100)*$this->size[0]);} if ($thumbheight>0) {$thumbheight=floor($thumbheight*($this->Percentage/100)*$this->size[0]);} if ($this->size[0]>$this->size[1]) $thumbsize=floor($thumbsize*($this->Percentage/100)*$this->size[0]); else $thumbsize=floor($thumbsize*($this->Percentage/100)*$this->size[1]); } if (!$this->Inflate) { if ($thumbsize>$this->size[0] && $thumbsize>$this->size[1]) {$thumbsize=max($this->size[0],$this->size[1]);} } if ($this->Binder) {$this->frame_offset=3;$this->bind_offset=4;} else {$this->frame_offset=2;$this->bind_offset=0;} if ($this->Shadow) {$this->shadow_offset=3;} else {$this->shadow_offset=0;} if ($thumbheight>0) { $this->thumb=imagecreatetruecolor($this->Framewidth*$this->frame_offset+ceil($this->size[0]/($this->size[1]/$thumbheight))+$this->shadow_offset,$this->Framewidth*2+$thumbheight+$this->shadow_offset); } else if ($thumbwidth>0) { $this->thumb=imagecreatetruecolor($this->Framewidth*$this->frame_offset+$thumbwidth+$this->shadow_offset,$this->Framewidth*2+ceil($this->size[1]/($this->size[0]/$thumbwidth))+$this->shadow_offset); } else { $x1=$this->Framewidth*$this->frame_offset+$thumbsize+$this->shadow_offset; $x2=$this->Framewidth*$this->frame_offset+ceil($this->size[0]/($this->size[1]/$thumbsize))+$this->shadow_offset; $y1=$this->Framewidth*2+ceil($this->size[1]/($this->size[0]/$thumbsize))+$this->shadow_offset; $y2=$this->Framewidth*2+$thumbsize+$this->shadow_offset; if ($this->size[0]>$this->size[1]) {$this->thumb=imagecreatetruecolor($x1,$y1);} else {$this->thumb=imagecreatetruecolor($x2,$y2);} } $this->thumbx=imagesx($this->thumb);$this->thumby=imagesy($this->thumb); imagefilledrectangle($this->thumb,0,0,$this->thumbx,$this->thumby,imagecolorallocate($this->thumb,hexdec(substr($this->Backgroundcolor,1,2)),hexdec(substr($this->Backgroundcolor,3,2)),hexdec(substr($this->Backgroundcolor,5,2)))); if ($this->Polaroid) imagefilledrectangle($this->thumb,$this->bind_offset,0,$this->thumbx-$this->shadow_offset,$this->thumby-$this->shadow_offset,imagecolorallocate($this->thumb,hexdec(substr($this->Polaroidframecolor,1,2)),hexdec(substr($this->Polaroidframecolor,3,2)),hexdec(substr($this->Polaroidframecolor,5,2)))); else imagefilledrectangle($this->thumb,$this->bind_offset,0,$this->thumbx-$this->shadow_offset,$this->thumby-$this->shadow_offset,imagecolorallocate($this->thumb,hexdec(substr($this->Framecolor,1,2)),hexdec(substr($this->Framecolor,3,2)),hexdec(substr($this->Framecolor,5,2)))); } /** * Drop shadow on thumbnail * */ function addshadow() { $gray=imagecolorallocate($this->thumb,192,192,192); $middlegray=imagecolorallocate($this->thumb,158,158,158); $darkgray=imagecolorallocate($this->thumb,128,128,128); imagerectangle($this->thumb,$this->bind_offset,0,$this->thumbx-4,$this->thumby-4,$gray); imageline($this->thumb,$this->bind_offset,$this->thumby-3,$this->thumbx,$this->thumby-3,$darkgray); imageline($this->thumb,$this->thumbx-3,0,$this->thumbx-3,$this->thumby,$darkgray); imageline($this->thumb,$this->bind_offset+2,$this->thumby-2,$this->thumbx,$this->thumby-2,$middlegray); imageline($this->thumb,$this->thumbx-2,2,$this->thumbx-2,$this->thumby,$middlegray); imageline($this->thumb,$this->bind_offset+2,$this->thumby-1,$this->thumbx,$this->thumby-1,$gray); imageline($this->thumb,$this->thumbx-1,2,$this->thumbx-1,$this->thumby,$gray); } /** * Clip corners original image * */ function clipcornersstraight() { $clipsize=$this->Clipcorner[1]; if ($this->size[0]>$this->size[1]) $clipsize=floor($this->size[0]*(intval($clipsize)/100)); else $clipsize=floor($this->size[1]*(intval($clipsize)/100)); if (intval($clipsize)>0) { $bgcolor=imagecolorallocate($this->im,hexdec(substr($this->Backgroundcolor,1,2)),hexdec(substr($this->Backgroundcolor,3,2)),hexdec(substr($this->Backgroundcolor,5,2))); if ($this->Clipcorner[2]) {$random1=rand(0,1);$random2=rand(0,1);$random3=rand(0,1);$random4=rand(0,1);} else {$random1=1;$random2=1;$random3=1;$random4=1;} for ($i=0;$i<$clipsize;$i++) { if ($this->Clipcorner[3] && $random1) {imageline($this->im,0,$i,$clipsize-$i,$i,$bgcolor);} if ($this->Clipcorner[4] && $random2) {imageline($this->im,0,$this->size[1]-$i-1,$clipsize-$i,$this->size[1]-$i-1,$bgcolor);} if ($this->Clipcorner[5] && $random3) {imageline($this->im,$this->size[0]-$clipsize+$i,$i,$this->size[0]+$clipsize-$i,$i,$bgcolor);} if ($this->Clipcorner[6] && $random4) {imageline($this->im,$this->size[0]-$clipsize+$i,$this->size[1]-$i-1,$this->size[0]+$clipsize-$i,$this->size[1]-$i-1,$bgcolor);} } } } /** * Clip round corners original image * */ function clipcornersround() { $clipsize=floor($this->size[0]*($this->Clipcorner[1]/100)); $clip_degrees=90/max($clipsize,1); $points_tl=array(0,0); $points_br=array($this->size[0],$this->size[1]); $points_tr=array($this->size[0],0); $points_bl=array(0,$this->size[1]); $bgcolor=imagecolorallocate($this->im,hexdec(substr($this->Backgroundcolor,1,2)),hexdec(substr($this->Backgroundcolor,3,2)),hexdec(substr($this->Backgroundcolor,5,2))); for ($i=0;$i<$clipsize;$i++) { $x=$clipsize*cos(deg2rad($i*$clip_degrees)); $y=$clipsize*sin(deg2rad($i*$clip_degrees)); array_push($points_tl,$clipsize-$x); array_push($points_tl,$clipsize-$y); array_push($points_tr,$this->size[0]-$clipsize+$x); array_push($points_tr,$clipsize-$y); array_push($points_br,$this->size[0]-$clipsize+$x); array_push($points_br,$this->size[1]-$clipsize+$y); array_push($points_bl,$clipsize-$x); array_push($points_bl,$this->size[1]-$clipsize+$y); } array_push($points_tl,$clipsize,0); array_push($points_br,$this->size[0]-$clipsize,$this->size[1]); array_push($points_tr,$this->size[0]-$clipsize,0); array_push($points_bl,$clipsize,$this->size[1]); if ($this->Clipcorner[2]) {$random1=rand(0,1);$random2=rand(0,1);$random3=rand(0,1);$random4=rand(0,1);} else {$random1=1;$random2=1;$random3=1;$random4=1;} if ($this->Clipcorner[3] && $random1) {imagefilledpolygon($this->im,$points_tl,count($points_tl)/2,$bgcolor);} if ($this->Clipcorner[4] && $random2) {imagefilledpolygon($this->im,$points_bl,count($points_bl)/2,$bgcolor);} if ($this->Clipcorner[5] && $random3) {imagefilledpolygon($this->im,$points_tr,count($points_tr)/2,$bgcolor);} if ($this->Clipcorner[6] && $random4) {imagefilledpolygon($this->im,$points_br,count($points_br)/2,$bgcolor);} imagerectangle($this->im,0,0,$this->size[0]-1,$this->size[1]-1,$bgcolor); } /** * Convert original image to greyscale and/or apply noise and sephia effect * */ function ageimage() { imagetruecolortopalette($this->im,1,256); for ($c=0;$c<256;$c++) { $col=imagecolorsforindex($this->im,$c); $new_col=floor($col['red']*0.2125+$col['green']*0.7154+$col['blue']*0.0721); $noise=rand(-$this->Ageimage[1],$this->Ageimage[1]); if ($this->Ageimage[2]>0) { $r=$new_col+$this->Ageimage[2]+$noise; $g=floor($new_col+$this->Ageimage[2]/1.86+$noise); $b=floor($new_col+$this->Ageimage[2]/-3.48+$noise); } else { $r=$new_col+$noise; $g=$new_col+$noise; $b=$new_col+$noise; } imagecolorset($this->im,$c,max(0,min(255,$r)),max(0,min(255,$g)),max(0,min(255,$b))); } } /** * Add border to thumbnail * */ function addpngborder() { if (file_exists($this->Borderpng)) { $borderim=imagecreatefrompng($this->Borderpng); imagecopyresampled($this->thumb,$borderim,$this->bind_offset,0,0,0,$this->thumbx-$this->shadow_offset-$this->bind_offset,$this->thumby-$this->shadow_offset,imagesx($borderim),imagesy($borderim)); imagedestroy($borderim); } } /** * Add binder effect to thumbnail * */ function addbinder() { if (intval($this->Binderspacing)<4) {$this->Binderspacing=4;} $spacing=floor($this->thumby/$this->Binderspacing)-2; $offset=floor(($this->thumby-($spacing*$this->Binderspacing))/2); $gray=imagecolorallocate($this->thumb,192,192,192); $middlegray=imagecolorallocate($this->thumb,158,158,158); $darkgray=imagecolorallocate($this->thumb,128,128,128); $black=imagecolorallocate($this->thumb,0,0,0); $white=imagecolorallocate($this->thumb,255,255,255); for ($i=$offset;$i<=$offset+$spacing*$this->Binderspacing;$i+=$this->Binderspacing) { imagefilledrectangle($this->thumb,8,$i-2,10,$i+2,$black); imageline($this->thumb,11,$i-1,11,$i+1,$darkgray); imageline($this->thumb,8,$i-2,10,$i-2,$darkgray); imageline($this->thumb,8,$i+2,10,$i+2,$darkgray); imagefilledrectangle($this->thumb,0,$i-1,8,$i+1,$gray); imageline($this->thumb,0,$i,8,$i,$white); imageline($this->thumb,0,$i-1,0,$i+1,$gray); imagesetpixel($this->thumb,0,$i,$darkgray); } } /** * Add Copyright text to thumbnail * */ function addcopyright() { if ($this->Copyrightfonttype=='') { $widthx=imagefontwidth($this->Copyrightfontsize)*strlen($this->Copyrighttext); $heighty=imagefontheight($this->Copyrightfontsize); $fontwidth=imagefontwidth($this->Copyrightfontsize); } else { $dimensions=imagettfbbox($this->Copyrightfontsize,0,$this->Copyrightfonttype,$this->Copyrighttext); $widthx=$dimensions[2];$heighty=$dimensions[5]; $dimensions=imagettfbbox($this->Copyrightfontsize,0,$this->Copyrightfonttype,'W'); $fontwidth=$dimensions[2]; } $cpos=explode(' ',str_replace('%','',$this->Copyrightposition)); if (count($cpos)>1) { $cposx=floor(min(max($this->thumbx*($cpos[0]/100)-0.5*$widthx,$fontwidth),$this->thumbx-$widthx-0.5*$fontwidth)); $cposy=floor(min(max($this->thumby*($cpos[1]/100)-0.5*$heighty,$heighty),$this->thumby-$heighty*1.5)); } else { $cposx=$fontwidth; $cposy=$this->thumby-10; } if ($this->Copyrighttextcolor=='') { $colors=array(); for ($i=$cposx;$i<($cposx+$widthx);$i++) { $indexis=ImageColorAt($this->thumb,$i,$cposy+0.5*$heighty); $rgbarray=ImageColorsForIndex($this->thumb,$indexis); array_push($colors,$rgbarray['red'],$rgbarray['green'],$rgbarray['blue']); } if (array_sum($colors)/count($colors)>180) { if ($this->Copyrightfonttype=='') imagestring($this->thumb,$this->Copyrightfontsize,$cposx,$cposy,$this->Copyrighttext,imagecolorallocate($this->thumb,0,0,0)); else imagettftext($this->thumb,$this->Copyrightfontsize,0,$cposx,$cposy,imagecolorallocate($this->thumb,0,0,0),$this->Copyrightfonttype,$this->Copyrighttext); } else { if ($this->Copyrightfonttype=='') imagestring($this->thumb,$this->Copyrightfontsize,$cposx,$cposy,$this->Copyrighttext,imagecolorallocate($this->thumb,255,255,255)); else imagettftext($this->thumb,$this->Copyrightfontsize,0,$cposx,$cposy,imagecolorallocate($this->thumb,255,255,255),$this->Copyrightfonttype,$this->Copyrighttext); } } else { if ($this->Copyrightfonttype=='') imagestring($this->thumb,$this->Copyrightfontsize,$cposx,$cposy,$this->Copyrighttext,imagecolorallocate($this->thumb,hexdec(substr($this->Copyrighttextcolor,1,2)),hexdec(substr($this->Copyrighttextcolor,3,2)),hexdec(substr($this->Copyrighttextcolor,5,2)))); else imagettftext($this->thumb,$this->Copyrightfontsize,0,$cposx,$cposy,imagecolorallocate($this->thumb,hexdec(substr($this->Copyrighttextcolor,1,2)),hexdec(substr($this->Copyrighttextcolor,3,2)),hexdec(substr($this->Copyrighttextcolor,5,2))),$this->Copyrightfonttype,$this->Copyrighttext); } } /** * Rotate the image at any angle * Image is not scaled down * */ function freerotate() { $angle=$this->Rotate; if ($angle<>0) { $centerx=floor($this->size[0]/2); $centery=floor($this->size[1]/2); $maxsizex=ceil(abs(cos(deg2rad($angle))*$this->size[0])+abs(sin(deg2rad($angle))*$this->size[1])); $maxsizey=ceil(abs(sin(deg2rad($angle))*$this->size[0])+abs(cos(deg2rad($angle))*$this->size[1])); if ($maxsizex & 1) {$maxsizex+=3;} else {$maxsizex+=2;} if ($maxsizey & 1) {$maxsizey+=3;} else {$maxsizey+=2;} $this->newimage=imagecreatetruecolor($maxsizex,$maxsizey); imagefilledrectangle($this->newimage,0,0,$maxsizex,$maxsizey,imagecolorallocate($this->newimage,hexdec(substr($this->Backgroundcolor,1,2)),hexdec(substr($this->Backgroundcolor,3,2)),hexdec(substr($this->Backgroundcolor,5,2)))); $newcenterx=imagesx($this->newimage)/2; $newcentery=imagesy($this->newimage)/2; $angle+=180; for ($px=0;$px<imagesx($this->newimage);$px++) { for ($py=0;$py<imagesy($this->newimage);$py++) { $vectorx=floor(($newcenterx-$px)*cos(deg2rad($angle))+($newcentery-$py)*sin(deg2rad($angle))); $vectory=floor(($newcentery-$py)*cos(deg2rad($angle))-($newcenterx-$px)*sin(deg2rad($angle))); if (($centerx+$vectorx)>-1 && ($centerx+$vectorx)<($centerx*2) && ($centery+$vectory)>-1 && ($centery+$vectory)<($centery*2)) imagecopy($this->newimage,$this->im,$px,$py,$centerx+$vectorx,$centery+$vectory,1,1); } } imagedestroy($this->im); $this->im=imagecreatetruecolor(imagesx($this->newimage),imagesy($this->newimage)); imagecopy($this->im,$this->newimage,0,0,0,0,imagesx($this->newimage),imagesy($this->newimage)); imagedestroy($this->newimage); $this->size[0]=imagesx($this->im); $this->size[1]=imagesy($this->im); } } /** * Rotate the image at any angle * Image is scaled down * */ function croprotate() { $this->im=imagerotate($this->im,-$this->Rotate,imagecolorallocate($this->im,hexdec(substr($this->Backgroundcolor,1,2)),hexdec(substr($this->Backgroundcolor,3,2)),hexdec(substr($this->Backgroundcolor,5,2)))); } /** * Rotate the image +90, -90 or 180 degrees * Flip the image over horizontal or vertical axis * * @param $rotate * @param $flip */ function rotateorflip($rotate,$flip) { if ($rotate) { $this->newimage=imagecreatetruecolor($this->size[1],$this->size[0]); } else { $this->newimage=imagecreatetruecolor($this->size[0],$this->size[1]); } if (intval($this->Rotate)>0 || $flip>0) { for ($px=0;$px<$this->size[0];$px++) { if ($rotate) { for ($py=0;$py<$this->size[1];$py++) {imagecopy($this->newimage,$this->im,$this->size[1]-$py-1,$px,$px,$py,1,1);} } else { for ($py=0;$py<$this->size[1];$py++) {imagecopy($this->newimage,$this->im,$this->size[0]-$px-1,$py,$px,$py,1,1);} } } } else { for ($px=0;$px<$this->size[0];$px++) { if ($rotate) { for ($py=0;$py<$this->size[1];$py++) {imagecopy($this->newimage,$this->im,$py,$this->size[0]-$px-1,$px,$py,1,1);} } else { for ($py=0;$py<$this->size[1];$py++) {imagecopy($this->newimage,$this->im,$px,$this->size[1]-$py-1,$px,$py,1,1);} } } } imagedestroy($this->im); $this->im=imagecreatetruecolor(imagesx($this->newimage),imagesy($this->newimage)); imagecopy($this->im,$this->newimage,0,0,0,0,imagesx($this->newimage),imagesy($this->newimage)); imagedestroy($this->newimage); $this->size[0]=imagesx($this->im); $this->size[1]=imagesy($this->im); } /** * Crop image in percentage, pixels or a square * Crop from sides or from center * Negative value for bottom crop will enlarge the canvas * */ function cropimage() { if ($this->Cropimage[1]==0) { $crop2=floor($this->size[0]*($this->Cropimage[2]/100)); $crop3=floor($this->size[0]*($this->Cropimage[3]/100)); $crop4=floor($this->size[1]*($this->Cropimage[4]/100)); $crop5=floor($this->size[1]*($this->Cropimage[5]/100)); } if ($this->Cropimage[1]==1) { $crop2=$this->Cropimage[2]; $crop3=$this->Cropimage[3]; $crop4=$this->Cropimage[4]; $crop5=$this->Cropimage[5]; } if ($this->Cropimage[0]==2) { $crop2=floor($this->size[0]/2)-$crop2; $crop3=floor($this->size[0]/2)-$crop3; $crop4=floor($this->size[1]/2)-$crop4; $crop5=floor($this->size[1]/2)-$crop5; } if ($this->Cropimage[0]==3) { if ($this->size[0]>$this->size[1]) { $crop2=$crop3=floor(($this->size[0]-$this->size[1])/2); $crop4=$crop5=0; } else { $crop4=$crop5=floor(($this->size[1]-$this->size[0])/2); $crop2=$crop3=0; } } $this->newimage=imagecreatetruecolor($this->size[0]-$crop2-$crop3,$this->size[1]-$crop4-$crop5); if ($crop5<0) {$crop5=0;imagefilledrectangle($this->newimage,0,0,imagesx($this->newimage),imagesy($this->newimage),imagecolorallocate($this->newimage,hexdec(substr($this->Polaroidframecolor,1,2)),hexdec(substr($this->Polaroidframecolor,3,2)),hexdec(substr($this->Polaroidframecolor,5,2))));} imagecopy($this->newimage,$this->im,0,0,$crop2,$crop4,$this->size[0]-$crop2-$crop3,$this->size[1]-$crop4-$crop5); imagedestroy($this->im); $this->im=imagecreatetruecolor(imagesx($this->newimage),imagesy($this->newimage)); imagecopy($this->im,$this->newimage,0,0,0,0,imagesx($this->newimage),imagesy($this->newimage)); imagedestroy($this->newimage); $this->size[0]=imagesx($this->im); $this->size[1]=imagesy($this->im); } /** * Enlarge the canvas to be same width and height * */ function square() { $squaresize=max($this->thumbx,$this->thumby); $this->newimage=imagecreatetruecolor($squaresize,$squaresize); imagefilledrectangle($this->newimage,0,0,$squaresize,$squaresize,imagecolorallocate($this->newimage,hexdec(substr($this->Backgroundcolor,1,2)),hexdec(substr($this->Backgroundcolor,3,2)),hexdec(substr($this->Backgroundcolor,5,2)))); $centerx=floor(($squaresize-$this->thumbx)/2); $centery=floor(($squaresize-$this->thumby)/2); imagecopy($this->newimage,$this->thumb,$centerx,$centery,0,0,$this->thumbx,$this->thumby); imagedestroy($this->thumb); $this->thumb=imagecreatetruecolor($squaresize,$squaresize); imagecopy($this->thumb,$this->newimage,0,0,0,0,$squaresize,$squaresize); imagedestroy($this->newimage); } /** * Apply a 3x3 filter matrix to the image * */ function filter() { $newpixel=array(); $this->newimage=imagecreatetruecolor($this->size[0],$this->size[1]); for ($y=0;$y<$this->size[1];$y++) { for ($x=0;$x<$this->size[0];$x++) { $newpixel[0]=0;$newpixel[1]=0;$newpixel[2]=0; $a11=$this->rgbpixel($x-1,$y-1);$a12=$this->rgbpixel($x,$y-1);$a13=$this->rgbpixel($x+1,$y-1); $a21=$this->rgbpixel($x-1,$y);$a22=$this->rgbpixel($x,$y);$a23=$this->rgbpixel($x+1,$y); $a31=$this->rgbpixel($x-1,$y+1);$a32=$this->rgbpixel($x,$y+1);$a33=$this->rgbpixel($x+1,$y+1); $newpixel[0]+=$a11['red']*$this->Filter[0]+$a12['red']*$this->Filter[1]+$a13['red']*$this->Filter[2]; $newpixel[1]+=$a11['green']*$this->Filter[0]+$a12['green']*$this->Filter[1]+$a13['green']*$this->Filter[2]; $newpixel[2]+=$a11['blue']*$this->Filter[0]+$a12['blue']*$this->Filter[1]+$a13['blue']*$this->Filter[2]; $newpixel[0]+=$a21['red']*$this->Filter[3]+$a22['red']*$this->Filter[4]+$a23['red']*$this->Filter[5]; $newpixel[1]+=$a21['green']*$this->Filter[3]+$a22['green']*$this->Filter[4]+$a23['green']*$this->Filter[5]; $newpixel[2]+=$a21['blue']*$this->Filter[3]+$a22['blue']*$this->Filter[4]+$a23['blue']*$this->Filter[5]; $newpixel[0]+=$a31['red']*$this->Filter[6]+$a32['red']*$this->Filter[7]+$a33['red']*$this->Filter[8]; $newpixel[1]+=$a31['green']*$this->Filter[6]+$a32['green']*$this->Filter[7]+$a33['green']*$this->Filter[8]; $newpixel[2]+=$a31['blue']*$this->Filter[6]+$a32['blue']*$this->Filter[7]+$a33['blue']*$this->Filter[8]; $newpixel[0]=max(0,min(255,intval($newpixel[0]/$this->Divisor)+$this->Offset)); $newpixel[1]=max(0,min(255,intval($newpixel[1]/$this->Divisor)+$this->Offset)); $newpixel[2]=max(0,min(255,intval($newpixel[2]/$this->Divisor)+$this->Offset)); imagesetpixel($this->newimage,$x,$y,imagecolorallocatealpha($this->newimage,$newpixel[0],$newpixel[1],$newpixel[2],$a11['alpha'])); } } imagecopy($this->im,$this->newimage,0,0,0,0,$this->size[0],$this->size[1]); imagedestroy($this->newimage); } /** * Apply a median filter matrix to the image to remove noise * */ function medianfilter() { $this->newimage=imagecreatetruecolor($this->size[0],$this->size[1]); for ($y=0;$y<$this->size[1];$y++) { for ($x=0;$x<$this->size[0];$x++) { $newred=array();$newgreen=array();$newblue=array(); $a11=$this->rgbpixel($x-1,$y-1);$a12=$this->rgbpixel($x,$y-1);$a13=$this->rgbpixel($x+1,$y-1); $a21=$this->rgbpixel($x-1,$y);$a22=$this->rgbpixel($x,$y);$a23=$this->rgbpixel($x+1,$y); $a31=$this->rgbpixel($x-1,$y+1);$a32=$this->rgbpixel($x,$y+1);$a33=$this->rgbpixel($x+1,$y+1); $newred[]=$a11['red'];$newgreen[]=$a11['green'];$newblue[]=$a11['blue']; $newred[]=$a12['red'];$newgreen[]=$a12['green'];$newblue[]=$a12['blue']; $newred[]=$a13['red'];$newgreen[]=$a13['green'];$newblue[]=$a13['blue']; $newred[]=$a21['red'];$newgreen[]=$a21['green'];$newblue[]=$a21['blue']; $newred[]=$a22['red'];$newgreen[]=$a22['green'];$newblue[]=$a22['blue']; $newred[]=$a23['red'];$newgreen[]=$a23['green'];$newblue[]=$a23['blue']; $newred[]=$a31['red'];$newgreen[]=$a31['green'];$newblue[]=$a31['blue']; $newred[]=$a32['red'];$newgreen[]=$a32['green'];$newblue[]=$a32['blue']; $newred[]=$a33['red'];$newgreen[]=$a33['green'];$newblue[]=$a33['blue']; sort($newred,SORT_NUMERIC);sort($newgreen,SORT_NUMERIC);sort($newblue,SORT_NUMERIC); imagesetpixel($this->newimage,$x,$y,imagecolorallocatealpha($this->newimage,$newred[4],$newgreen[4],$newblue[4],$a22['alpha'])); } } imagecopy($this->im,$this->newimage,0,0,0,0,$this->size[0],$this->size[1]); imagedestroy($this->newimage); } /** * Return RGB values from pixel * */ function rgbpixel($x,$y) { if ($x<0) {$x=0;} if ($x>=$this->size[0]) {$x=$this->size[0]-1;} if ($y<0) {$y=0;} if ($y>=$this->size[1]) {$y=$this->size[1]-1;} $pixel=ImageColorAt($this->im,$x,$y); return array('red' => ($pixel >> 16 & 0xFF),'green' => ($pixel >> 8 & 0xFF),'blue' => ($pixel & 0xFF),'alpha' => ($pixel >>24 & 0xFF)); } /** * Gaussian Blur Filter * */ function blur() { $oldfilter=$this->Filter;$olddivisor=$this->Divisor;$oldoffset=$this->Offset; $this->Filter = array(1,2,1,2,4,2,1,2,1); $this->Divisor = 16; $this->Offset = 0; $this->filter(); $this->Filter = $oldfilter; $this->Divisor = $olddivisor; $this->Offset = $oldoffset; } /** * Sharpen Filter * */ function sharpen() { $oldfilter=$this->Filter;$olddivisor=$this->Divisor;$oldoffset=$this->Offset; $this->Filter = array(-1,-1,-1,-1,16,-1,-1,-1,-1); $this->Divisor = 8; $this->Offset = 0; $this->filter(); $this->Filter = $oldfilter; $this->Divisor = $olddivisor; $this->Offset = $oldoffset; } /** * Edge Filter * */ function edge() { $oldfilter=$this->Filter;$olddivisor=$this->Divisor;$oldoffset=$this->Offset; $this->Filter = array(-1,-1,-1,-1,8,-1,-1,-1,-1); $this->Divisor = 1; $this->Offset = 127; $this->filter(); $this->Filter = $oldfilter; $this->Divisor = $olddivisor; $this->Offset = $oldoffset; } /** * Emboss Filter * */ function emboss() { $oldfilter=$this->Filter;$olddivisor=$this->Divisor;$oldoffset=$this->Offset; $this->Filter = array(2,0,0,0,-1,0,0,0,-1); $this->Divisor = 1; $this->Offset = 127; $this->filter(); $this->Filter = $oldfilter; $this->Divisor = $olddivisor; $this->Offset = $oldoffset; } /** * Mean Filter * */ function mean() { $oldfilter=$this->Filter;$olddivisor=$this->Divisor;$oldoffset=$this->Offset; $this->Filter = array(1,1,1,1,1,1,1,1,1); $this->Divisor = 9; $this->Offset = 0; $this->filter(); $this->Filter = $oldfilter; $this->Divisor = $olddivisor; $this->Offset = $oldoffset; } /** * Apply perspective to the image * */ function perspective() { $this->newimage=imagecreatetruecolor($this->size[0],$this->size[1]); imagefilledrectangle($this->newimage,0,0,$this->size[0],$this->size[1],imagecolorallocate($this->newimage,hexdec(substr($this->Backgroundcolor,1,2)),hexdec(substr($this->Backgroundcolor,3,2)),hexdec(substr($this->Backgroundcolor,5,2)))); if ($this->Perspective[1]==0 || $this->Perspective[1]==1) { $gradient=($this->size[1]-($this->size[1]*(max(100-$this->Perspective[2],1)/100)))/$this->size[0]; for ($c=0;$c<$this->size[0];$c++) { if ($this->Perspective[1]==0) { $length=$this->size[1]-(floor($gradient*$c)); } else { $length=$this->size[1]-(floor($gradient*($this->size[0]-$c))); } imagecopyresampled($this->newimage,$this->im,$c,floor(($this->size[1]-$length)/2),$c,0,1,$length,1,$this->size[1]); } } else { $gradient=($this->size[0]-($this->size[0]*(max(100-$this->Perspective[2],1)/100)))/$this->size[1]; for ($c=0;$c<$this->size[1];$c++) { if ($this->Perspective[1]==2) { $length=$this->size[0]-(floor($gradient*$c)); } else { $length=$this->size[0]-(floor($gradient*($this->size[1]-$c))); } imagecopyresampled($this->newimage,$this->im,floor(($this->size[0]-$length)/2),$c,0,$c,$length,1,$this->size[0],1); } } imagecopy($this->im,$this->newimage,0,0,0,0,$this->size[0],$this->size[1]); imagedestroy($this->newimage); } /** * Apply perspective to the thumbnail * */ function perspectivethumb() { $this->newimage=imagecreatetruecolor($this->thumbx,$this->thumby); imagefilledrectangle($this->newimage,0,0,$this->thumbx,$this->thumby,imagecolorallocate($this->newimage,hexdec(substr($this->Backgroundcolor,1,2)),hexdec(substr($this->Backgroundcolor,3,2)),hexdec(substr($this->Backgroundcolor,5,2)))); if ($this->Perspectivethumb[1]==0 || $this->Perspectivethumb[1]==1) { $gradient=($this->thumby-($this->thumby*(max(100-$this->Perspectivethumb[2],1)/100)))/$this->thumbx; for ($c=0;$c<$this->thumbx;$c++) { if ($this->Perspectivethumb[1]==0) { $length=$this->thumby-(floor($gradient*$c)); } else { $length=$this->thumby-(floor($gradient*($this->thumbx-$c))); } imagecopyresampled($this->newimage,$this->thumb,$c,floor(($this->thumby-$length)/2),$c,0,1,$length,1,$this->thumby); } } else { $gradient=($this->thumbx-($this->thumbx*(max(100-$this->Perspectivethumb[2],1)/100)))/$this->thumby; for ($c=0;$c<$this->thumby;$c++) { if ($this->Perspectivethumb[1]==2) { $length=$this->thumbx-(floor($gradient*$c)); } else { $length=$this->thumbx-(floor($gradient*($this->thumby-$c))); } imagecopyresampled($this->newimage,$this->thumb,floor(($this->thumbx-$length)/2),$c,0,$c,$length,1,$this->thumbx,1); } } imagecopy($this->thumb,$this->newimage,0,0,0,0,$this->thumbx,$this->thumby); imagedestroy($this->newimage); } /** * Apply gradient shading to image * */ function shading() { if ($this->Shading[3]==0 || $this->Shading[3]==1) { $this->newimage=imagecreatetruecolor(1,$this->size[1]); imagefilledrectangle($this->newimage,0,0,1,$this->size[1],imagecolorallocate($this->newimage,hexdec(substr($this->Shadingcolor,1,2)),hexdec(substr($this->Shadingcolor,3,2)),hexdec(substr($this->Shadingcolor,5,2)))); } else { $this->newimage=imagecreatetruecolor($this->size[0],1); imagefilledrectangle($this->newimage,0,0,$this->size[0],1,imagecolorallocate($this->newimage,hexdec(substr($this->Shadingcolor,1,2)),hexdec(substr($this->Shadingcolor,3,2)),hexdec(substr($this->Shadingcolor,5,2)))); } if ($this->Shading[3]==0) { $shadingstrength=$this->Shading[1]/($this->size[0]*($this->Shading[2]/100)); for ($c=$this->size[0]-floor(($this->size[0]*($this->Shading[2]/100)));$c<$this->size[0];$c++) { $opacity=floor($shadingstrength*($c-($this->size[0]-floor(($this->size[0]*($this->Shading[2]/100)))))); imagecopymerge($this->im,$this->newimage,$c,0,0,0,1,$this->size[1],max(min($opacity,100),0)); } } else if ($this->Shading[3]==1) { $shadingstrength=$this->Shading[1]/($this->size[0]*($this->Shading[2]/100)); for ($c=0;$c<floor($this->size[0]*($this->Shading[2]/100));$c++) { $opacity=floor($this->Shading[1]-($c*$shadingstrength)); imagecopymerge($this->im,$this->newimage,$c,0,0,0,1,$this->size[1],max(min($opacity,100),0)); } } else if ($this->Shading[3]==2) { $shadingstrength=$this->Shading[1]/($this->size[1]*($this->Shading[2]/100)); for ($c=0;$c<floor($this->size[1]*($this->Shading[2]/100));$c++) { $opacity=floor($this->Shading[1]-($c*$shadingstrength)); imagecopymerge($this->im,$this->newimage,0,$c,0,0,$this->size[0],1,max(min($opacity,100),0)); } } else { $shadingstrength=$this->Shading[1]/($this->size[1]*($this->Shading[2]/100)); for ($c=$this->size[1]-floor(($this->size[1]*($this->Shading[2]/100)));$c<$this->size[1];$c++) { $opacity=floor($shadingstrength*($c-($this->size[1]-floor(($this->size[1]*($this->Shading[2]/100)))))); imagecopymerge($this->im,$this->newimage,0,$c,0,0,$this->size[0],1,max(min($opacity,100),0)); } } imagedestroy($this->newimage); } /** * Apply mirror effect to the thumbnail with gradient * */ function mirror() { $bottom=floor(($this->Mirror[3]/100)*$this->thumby)+$this->Mirror[4]; $this->newimage=imagecreatetruecolor($this->thumbx,$this->thumby+$bottom); imagefilledrectangle($this->newimage,0,0,$this->thumbx,$this->thumby+$bottom,imagecolorallocate($this->newimage,hexdec(substr($this->Backgroundcolor,1,2)),hexdec(substr($this->Backgroundcolor,3,2)),hexdec(substr($this->Backgroundcolor,5,2)))); imagecopy($this->newimage,$this->thumb,0,0,0,0,$this->thumbx,$this->thumby); imagedestroy($this->thumb);$this->thumb=imagecreatetruecolor($this->thumbx,$this->thumby+$bottom); imagecopy($this->thumb,$this->newimage,0,0,0,0,$this->thumbx,$this->thumby+$bottom); imagedestroy($this->newimage);$this->thumbx=imagesx($this->thumb);$this->thumby=imagesy($this->thumb); for ($px=0;$px<$this->thumbx;$px++) { for ($py=$this->thumby-($bottom*2)+$this->Mirror[4];$py<($this->thumby-$bottom);$py++) {imagecopy($this->thumb,$this->thumb,$px,$this->thumby-($py-($this->thumby-($bottom*2)))-1+$this->Mirror[4],$px,$py,1,1);} } $this->newimage=imagecreatetruecolor($this->thumbx,1); imagefilledrectangle($this->newimage,0,0,$this->thumbx,1,imagecolorallocate($this->newimage,hexdec(substr($this->Mirrorcolor,1,2)),hexdec(substr($this->Mirrorcolor,3,2)),hexdec(substr($this->Mirrorcolor,5,2)))); $shadingstrength=($this->Mirror[2]-$this->Mirror[1])/$bottom; for ($c=$this->thumby-$bottom;$c<$this->thumby;$c++) { $opacity=$this->Mirror[1]+floor(($bottom-($this->thumby-$c))*$shadingstrength); imagecopymerge($this->thumb,$this->newimage,0,$c,0,0,$this->thumbx,1,max(min($opacity,100),0)); } imagedestroy($this->newimage); } /** * Create a negative * */ function negative() { for ($y=0;$y<$this->size[1];$y++) { for ($x=0;$x<$this->size[0];$x++) { $pixel=ImageColorAt($this->im,$x,$y); imagesetpixel($this->im,$x,$y,imagecolorallocatealpha($this->im,255-($pixel >> 16 & 0xFF),255-($pixel >> 8 & 0xFF),255-($pixel & 0xFF),$pixel >> 24 & 0xFF)); } } } /** * Replace a color * Eucledian color vector distance * */ function colorreplace() { $red=hexdec(substr($this->Colorreplace[1],1,2));$green=hexdec(substr($this->Colorreplace[1],3,2));$blue=hexdec(substr($this->Colorreplace[1],5,2)); $rednew=hexdec(substr($this->Colorreplace[2],1,2));$greennew=hexdec(substr($this->Colorreplace[2],3,2));$bluenew=hexdec(substr($this->Colorreplace[2],5,2)); $tolerance=sqrt(pow($this->Colorreplace[3],2)+pow($this->Colorreplace[3],2)+pow($this->Colorreplace[3],2)); for ($y=0;$y<$this->size[1];$y++) { for ($x=0;$x<$this->size[0];$x++) { $pixel=ImageColorAt($this->im,$x,$y); $redpix=($pixel >> 16 & 0xFF);$greenpix=($pixel >> 8 & 0xFF);$bluepix=($pixel & 0xFF); if (sqrt(pow($redpix-$red,2)+pow($greenpix-$green,2)+pow($bluepix-$blue,2))<$tolerance) imagesetpixel($this->im,$x,$y,imagecolorallocatealpha($this->im,$rednew,$greennew,$bluenew,$pixel >> 24 & 0xFF)); } } } /** * Randomly reposition pixels * */ function pixelscramble() { for ($i=0;$i<$this->Pixelscramble[2];$i++) { $this->newimage=imagecreatetruecolor($this->size[0],$this->size[1]); for ($y=0;$y<$this->size[1];$y++) { for ($x=0;$x<$this->size[0];$x++) { $newx=$x+rand(-$this->Pixelscramble[1],$this->Pixelscramble[1]); $newy=$y+rand(-$this->Pixelscramble[1],$this->Pixelscramble[1]); if ($newx<0 && $newx>=$this->size[0]) {$newx=$x;} if ($newy<0 && $newy>=$this->size[1]) {$newy=$y;} imagecopy($this->newimage,$this->im,$newx,$newy,$x,$y,1,1); imagecopy($this->newimage,$this->im,$x,$y,$newx,$newy,1,1); } } imagecopy($this->im,$this->newimage,0,0,0,0,$this->size[0],$this->size[1]); imagedestroy($this->newimage); } } /** * Convert to greyscale * */ function greyscale() { for ($y=0;$y<$this->size[1];$y++) { for ($x=0;$x<$this->size[0];$x++) { $pixel=ImageColorAt($this->im,$x,$y); $grey=floor(($pixel >> 16 & 0xFF)*0.299 + ($pixel >> 8 & 0xFF)*0.587 + ($pixel & 0xFF)*0.114); imagesetpixel($this->im,$x,$y,imagecolorallocatealpha($this->im,$grey,$grey,$grey,$pixel >> 24 & 0xFF)); } } } /** * Change brightness * */ function brightness() { for ($y=0;$y<$this->size[1];$y++) { for ($x=0;$x<$this->size[0];$x++) { $pixel=ImageColorAt($this->im,$x,$y); $redpix=max(0,min(255,($pixel >> 16 & 0xFF)+($this->Brightness[1]/100)*255)); $greenpix=max(0,min(255,($pixel >> 8 & 0xFF)+($this->Brightness[1]/100)*255)); $bluepix=max(0,min(255,($pixel & 0xFF)+($this->Brightness[1]/100)*255)); imagesetpixel($this->im,$x,$y,imagecolorallocatealpha($this->im,$redpix,$greenpix,$bluepix,$pixel >> 24 & 0xFF)); } } } /** * Change contrast * */ function contrast() { for ($y=0;$y<$this->size[1];$y++) { for ($x=0;$x<$this->size[0];$x++) { $pixel=ImageColorAt($this->im,$x,$y); $redpix=max(0,min(255,(((($pixel >> 16 & 0xFF)/255)-0.5)*($this->Contrast[1]/100+1)+0.5)*255)); $greenpix=max(0,min(255,(((($pixel >> 8 & 0xFF)/255)-0.5)*($this->Contrast[1]/100+1)+0.5)*255)); $bluepix=max(0,min(255,(((($pixel & 0xFF)/255)-0.5)*($this->Contrast[1]/100+1)+0.5)*255)); imagesetpixel($this->im,$x,$y,imagecolorallocatealpha($this->im,$redpix,$greenpix,$bluepix,$pixel >> 24 & 0xFF)); } } } /** * Change gamma * */ function gamma() { imagegammacorrect($this->im,1,$this->Gamma[1]); } /** * Reduce palette * */ function palette() { imagetruecolortopalette($this->im,false,$this->Palette[1]); } /** * Merge a color in the image * */ function colorize() { for ($y=0;$y<$this->size[1];$y++) { for ($x=0;$x<$this->size[0];$x++) { $pixel=ImageColorAt($this->im,$x,$y); $redpix=max(0,min(255,($pixel >> 16 & 0xFF)+$this->Colorize[1])); $greenpix=max(0,min(255,($pixel >> 8 & 0xFF)+$this->Colorize[2])); $bluepix=max(0,min(255,($pixel & 0xFF)+$this->Colorize[3])); $alpha =max(0,min(127,($pixel >> 24 & 0xFF)+$this->Colorize[4])); imagesetpixel($this->im,$x,$y,imagecolorallocatealpha($this->im,$redpix,$greenpix,$bluepix,$alpha)); } } } /** * Pixelate the image * */ function pixelate() { for ($y=0;$y<$this->size[1];$y+=$this->Pixelate[1]) { for ($x=0;$x<$this->size[0];$x+=$this->Pixelate[1]) { $pixel=ImageColorAt($this->im,$x,$y); imagefilledrectangle($this->im,$x,$y,$x+$this->Pixelate[1]-1,$y+$this->Pixelate[1]-1,$pixel); } } } /** * Bilinear interpolation * */ function bilinear($xnew,$ynew) { $xf=floor($xnew);$xc=$xf+1;$fracx=$xnew-$xf;$fracx1=1-$fracx; $yf=floor($ynew);$yc=$yf+1;$fracy=$ynew-$yf;$fracy1=1-$fracy; $ff=$this->rgbpixel($xf,$yf);$cf=$this->rgbpixel($xc,$yf); $fc=$this->rgbpixel($xf,$yc);$cc=$this->rgbpixel($xc,$yc); $red=floor($fracy1*($fracx1*$ff['red']+$fracx*$cf['red'])+$fracy*($fracx1*$fc['red']+$fracx*$cc['red'])); $green=floor($fracy1*($fracx1*$ff['green']+$fracx*$cf['green'])+$fracy*($fracx1*$fc['green']+$fracx*$cc['green'])); $blue=floor($fracy1*($fracx1*$ff['blue']+$fracx*$cf['blue'])+$fracy*($fracx1*$fc['blue']+$fracx*$cc['blue'])); return array('red' => $red,'green' => $green,'blue' => $blue,'alpha' => $cc['alpha']); } /** * Apply twirl FX to image * */ function twirlfx() { $rotationamount=$this->Twirlfx[1]/1000; $centerx=floor($this->size[0]/2);$centery=floor($this->size[1]/2); $this->newimage=imagecreatetruecolor($this->size[0],$this->size[1]); for ($y=0;$y<$this->size[1];$y++) { for ($x=0;$x<$this->size[0];$x++) { $truex=$x-$centerx;$truey=$y-$centery; $theta=atan2(($truey),($truex)); $radius=sqrt($truex*$truex+$truey*$truey); if ($this->Twirlfx[2]==0) { $newx=$centerx+($radius*cos($theta+$rotationamount*$radius)); $newy=$centery+($radius*sin($theta+$rotationamount*$radius)); } else { $newx=$centerx-($radius*cos($theta+$rotationamount*$radius)); $newy=$centery-($radius*sin($theta+$rotationamount*$radius)); } $newpix=$this->bilinear($newx,$newy); imagesetpixel($this->newimage,$x,$y,imagecolorallocatealpha($this->newimage,$newpix['red'],$newpix['green'],$newpix['blue'],$newpix['alpha'])); } } imagecopy($this->im,$this->newimage,0,0,0,0,$this->size[0],$this->size[1]); imagedestroy($this->newimage); } /** * Apply ripple FX to image * */ function ripplefx() { $wavex=((2*pi())/$this->size[0])*$this->Ripplefx[1]; $wavey=((2*pi())/$this->size[1])*$this->Ripplefx[3]; $this->newimage=imagecreatetruecolor($this->size[0],$this->size[1]); for ($y=0;$y<$this->size[1];$y++) { for ($x=0;$x<$this->size[0];$x++) { $newx=$x+$this->Ripplefx[4]*sin($y*$wavey); $newy=$y+$this->Ripplefx[2]*sin($x*$wavex); $newpix=$this->bilinear($newx,$newy); imagesetpixel($this->newimage,$x,$y,imagecolorallocatealpha($this->newimage,$newpix['red'],$newpix['green'],$newpix['blue'],$newpix['alpha'])); } } imagecopy($this->im,$this->newimage,0,0,0,0,$this->size[0],$this->size[1]); imagedestroy($this->newimage); } /** * Apply lake FX to image * */ function lakefx() { $this->newimage=imagecreatetruecolor($this->size[0],$this->size[1]); $ystart=max($this->size[1]-floor($this->size[1]*($this->Lakefx[2]/100)),0); if ($ystart>0) { imagecopy($this->newimage,$this->im,0,0,0,0,$this->size[0],$this->size[1]); } for ($y=$ystart;$y<$this->size[1];$y++) { for ($x=0;$x<$this->size[0];$x++) { $newy=$y+3*pi()*(1/$this->size[1])*$y*sin(($this->size[1]*($this->Lakefx[1]/100)*($this->size[1]-$y))/$y); $newpix=$this->bilinear($x,$newy); imagesetpixel($this->newimage,$x,$y,imagecolorallocatealpha($this->newimage,$newpix['red'],$newpix['green'],$newpix['blue'],$newpix['alpha'])); } } imagecopy($this->im,$this->newimage,0,0,0,0,$this->size[0],$this->size[1]); imagedestroy($this->newimage); } /** * Apply waterdrop FX to image * */ function waterdropfx() { $centerx=floor($this->size[0]/2);$centery=floor($this->size[1]/2); $this->newimage=imagecreatetruecolor($this->size[0],$this->size[1]); for ($y=0;$y<$this->size[1];$y++) { for ($x=0;$x<$this->size[0];$x++) { $truex=$x-$centerx;$truey=$y-$centery; $distance=sqrt($truex*$truex+$truey*$truey); $amount=$this->Waterdropfx[1]*sin($distance/$this->Waterdropfx[3]*2*pi()); $amount=$amount*($this->Waterdropfx[2]-$distance)/$this->Waterdropfx[2]; if ($distance!=0) {$amount=$amount*$this->Waterdropfx[3]/$distance;} $newx=$x+$truex*$amount; $newy=$y+$truey*$amount; $newpix=$this->bilinear($newx,$newy); imagesetpixel($this->newimage,$x,$y,imagecolorallocatealpha($this->newimage,$newpix['red'],$newpix['green'],$newpix['blue'],$newpix['alpha'])); } } imagecopy($this->im,$this->newimage,0,0,0,0,$this->size[0],$this->size[1]); imagedestroy($this->newimage); } /** * Create a transparent image * */ function maketransparent() { imagetruecolortopalette($this->thumb,false,254); $red=hexdec(substr($this->Maketransparent[2],1,2));$green=hexdec(substr($this->Maketransparent[2],3,2));$blue=hexdec(substr($this->Maketransparent[2],5,2)); $transparentcolor=imagecolorallocate($this->thumb,$red,$green,$blue); $tolerance=sqrt(pow($this->Maketransparent[3],2)+pow($this->Maketransparent[3],2)+pow($this->Maketransparent[3],2)); for ($y=0;$y<$this->thumby;$y++) { for ($x=0;$x<$this->thumbx;$x++) { $pixel=ImageColorAt($this->thumb,$x,$y); $redpix=($pixel >> 16 & 0xFF);$greenpix=($pixel >> 8 & 0xFF);$bluepix=($pixel & 0xFF); if (sqrt(pow($redpix-$red,2)+pow($greenpix-$green,2)+pow($bluepix-$blue,2))<$tolerance) imagesetpixel($this->thumb,$x,$y,$transparentcolor); } } imagecolortransparent($this->thumb,$transparentcolor); if ($this->Maketransparent[1]==0) {$this->size[2]=3;} else {$this->size[2]=1;} } /** * Save thumbnail to file * */ function savethumb() { if ($this->Thumbsaveas!='') { switch (strtolower($this->Thumbsaveas)) { case "gif": $this->image=substr($this->image,0,strrpos($this->image,'.')).".gif"; $this->size[2]=1; break; case "jpg": $this->image=substr($this->image,0,strrpos($this->image,'.')).".jpg"; $this->size[2]=2; break; case "jpeg": $this->image=substr($this->image,0,strrpos($this->image,'.')).".jpeg"; $this->size[2]=2; break; case "png": $this->image=substr($this->image,0,strrpos($this->image,'.')).".png"; $this->size[2]=3; break; } } switch($this->size[2]) { case 1: imagegif($this->thumb,$this->Thumblocation.$this->Thumbprefix.basename($this->image)); break; case 2: imagejpeg($this->thumb,$this->Thumblocation.$this->Thumbprefix.basename($this->image),$this->Quality); break; case 3: imagepng($this->thumb,$this->Thumblocation.$this->Thumbprefix.basename($this->image)); break; } if ($this->Chmodlevel!='') {chmod($this->Thumblocation.$this->Thumbprefix.$this->image,octdec($this->Chmodlevel));} imagedestroy($this->im); imagedestroy($this->thumb); } /** * Display thumbnail on screen * */ function displaythumb() { switch($this->size[2]) { case 1: header("Content-type: image/gif");imagegif($this->thumb); break; case 2: header("Content-type: image/jpeg");imagejpeg($this->thumb,'',$this->Quality); break; case 3: header("Content-type: image/png");imagepng($this->thumb); break; } imagedestroy($this->im); imagedestroy($this->thumb); exit; } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/easyphpthumbnail.class.php
PHP
asf20
64,606
<?php class Util { /** * FUNCAO PARA AJUSTAR VALOR DE 10.000,00 PARA 10000.00 **/ static function stringToFloat($valor) { if(!strpos($valor,",") && !strpos($valor,".")) return $valor; $valor = str_replace(".", "", $valor); $valor = str_replace(",", ".", $valor); return $valor; } /** * FUNCAO PARA AJUSTAR VALOR DE 10000.00 PARA 10.000,00 **/ static function floatToString($valor) { if(!isset($valor) || strlen($valor) <= 0) return "0,00"; $valor = str_replace(",", "", $valor); $valor = number_format($valor, 2, ',', '.'); return $valor; } /** * FUNCAO PARA AJUSTAR VALOR DE 100.0 PARA 100.00 **/ static function ajustaDecimais($valor) { if(!isset($valor) || strlen($valor) <= 0) return "0.00"; $valor = number_format($valor, 2); return $valor; } /** * FUNCAO PARA MOSTRAR A DATA NA TELA DE 2010-10-10 PARA 10/10/2010 **/ static function dateToString ($data) { if ($data!='') { return (substr($data,8,2).'/'.substr($data,5,2).'/'.substr($data,0,4)); } else { return ''; } } /** * FUNCAO PARA GRAVAR A DATA NO BANCO DE 22:00 10/10/2010 PARA 2010-10-10 22:00 **/ static function stringToDateTime ($data) { if (strlen($data) > 0) { $data = explode(" ", $data); return Util::stringToDate($data[1])." ".$data[0]; } else { return null; } } /** * FUNCAO PARA GRAVAR A DATA NO BANCO DE 2010-10-10 22:00 PARA 22:00 10/10/2010 **/ static function dateTimeToString ($data) { if ($data != '') { $data = explode(" ", $data); return $data[1]." ".Util::dateToString($data[0]); } else { return ''; } } /** * FUNCAO PARA GRAVAR A DATA NO BANCO DE 10/10/2010 PARA 2010-10-10 **/ static function stringToDate ($data) { if ($data != '') { return (substr($data,6,4).'-'.substr($data,3,2).'-'.substr($data,0,2)); } else { return ''; } } /** * FUNCAO PARA TRANSFORMAR A DATA DE 2010-04-10 PARA 04/10/2010 **/ static function dateToTimeStamp($data) { if ($data!='') { return (substr($data,5,2).'/'.substr($data,8,2).'/'.substr($data,0,4)); } else { return ''; } } /** * FUNCAO PARA CALCULAR A DIFEREN�A DE DIAS ENTRE DATAS * valor positivo: $final > $inicial * valor negativo: $final < $inicial * valor igual a zero: $final == $inicial * obs: para calcular o strtotime � preciso informar a data no seguinte formato: * mm/dd/aaaa, caso contr�rio ocorrer� erro. **/ static function diferencaDiasData($inicial,$final) { $inicial = strtotime($inicial); $final = strtotime($final); return ($final-$inicial)/86400; } /** * FUNCAO QUE DEIXA SOH NUMEROS NO CPF **/ static function cpfToString ($data) { if ($data!='') { $data = str_replace(".", "", $data); $data = str_replace("-", "", $data); return $valor; } else { return $data; } } /** * FUNCAO QUE FORMATA STRING PARA CPF (DE: 12312312345 PARA: 123.123.123-45) **/ static function stringToCpf ($data) { if ($data!='') { if(!strpos($data,".") && !strpos($data,"-")) { $data = substr($data,0,3).".".substr($data,3,3).".".substr($data,6,3)."-".substr($data,9,2); } return $data; } else { return $data; } } /** * FUNCAO QUE DEIXA SOH NUMEROS NO CNPJ **/ static function cnpjToString ($data) { if ($data != '') { $data = str_replace(".", "", $data); $data = str_replace("-", "", $data); $data = str_replace("/", "", $data); return $data; } else { return $data; } } /** * FUNCAO QUE FORMATA STRING PARA CNPJ (DE: 01177318000105 PARA: 01.177.318/0001-05) **/ static function stringToCnpj ($data) { if ($data!='') { if(!strpos($data,".") && !strpos($data,"/") && !strpos($data,"-")) { $data = substr($data,0,2).".".substr($data,2,3).".".substr($data,5,3)."/".substr($data,8,4)."-".substr($data,12,2); } return $data; } else { return $data; } } /** * FUNCAO QUE DEIXA SOH NUMEROS NO CEP **/ static function cepToString ($data) { if ($data != '') { $data = str_replace("-", "", $data); return $data; } else { return $data; } } /** * FUNCAO QUE FORMATA STRING PARA CEP (DE: 64300000 PARA: 64300-000) **/ static function stringToCep ($data) { if ($data!='') { if(!strpos($data,"-")) { $data = substr($data,0,5)."-".substr($data,5,3); } return $data; } else { return $data; } } /** * FUNCAO QUE DEIXA SOH NUMEROS NO TELEFONE **/ static function telefoneToString ($data) { if ($data != '') { $data = str_replace("-", "", $data); $data = str_replace("(", "", $data); $data = str_replace(")", "", $data); return $data; } else { return $data; } } /** * FUNCAO QUE FORMATA STRING PARA TELEFONE (DE: 8632223456 PARA: (86)3222-3456) **/ static function stringToTelefone ($data) { $data = str_replace(" ","",$data); if (strlen($data) >= 10 && strlen($data) <= 13) { if(!strpos($data,"(") && !strpos($data,")") && !strpos($data,"-")) { $data = "(".substr($data,0,2).")".substr($data,2,4)."-".substr($data,6,4); } else if(strpos($data,"(")>=0 && strpos($data,")")>=0 && !strpos($data,"-")) { $data = substr($data,0,8)."-".substr($data,8,4); } else if(!strpos($data,"(") && !strpos($data,")") && strpos($data,"-")>=0) { $data = "(".substr($data,0,2).")".substr($data,2,9); } } else if (strlen($data) == 8) { if(!strpos($data,"-")) { $data = substr($data,0,4)."-".substr($data,4,8); } } return $data; } /** * FUN��O QUE RETORNA UM ARRAY COM TODOS OS ARQUIVOS DO DIRETORIO * (USA RECURSIVIDADE!!!), PODE-SE TB BUSCAR PELO NOME DO ARQ * */ static function leDiretorio($arquivos, $dir, $filtro = "", $busca = "", $criptografado = true) { $d = dir($dir); while($name = $d->read()) { if(strpos($name,".") === FALSE && is_dir($dir.$name)) { $arquivos = Util::leDiretorio($arquivos, $dir.$name."/", $filtro,$busca); } if(strlen($filtro) > 0 && !preg_match($filtro, $name)) continue; if(strlen($busca) > 0 && strpos($name,strtoupper($busca)) === FALSE) continue; $size = filesize($dir.$name); $lastmod = filemtime($dir.$name); $urlCript = $dir.$name; if($criptografado) $urlCript = Seguranca::criptografaLink($dir.$name); $arquivos[] = array('name'=>$name, 'size'=>$size, 'lastmod'=>$lastmod, 'url'=>$urlCript); } $d->close(); return $arquivos; } /** * FUN��O PARA VALIDAR CPF **/ static function validaCPF($number) { // Os str_replace servem para "corrigir" os poss�veis "erros", tendo em vista que o c�digo foi preparado apenas para trabalhar com n�meros if(strstr($number,".")) $number=str_replace(".","",$number); if(strstr($number,"-")) $number=str_replace("-","",$number); if(strstr($number,"/")) $number=str_replace("/","",$number); if(strlen($number)!=11) return false; $d1 = 0; $d2 = 0; for($i=0;$i<9;$i++) $d1=$d1+($number[$i]*(10-$i)); $d1=11-($d1%11); if($d1>=10) $d1=0; for($i=0;$i<9;$i++) $d2=$d2+($number[$i]*(11-$i)); $d2=11-(($d2+($d1*2))%11); if($d2>=10) $d2=0; if($number[9]==$d1&&$number[10]==$d2) return true; return false; } /** * FUN��O PARA VALIDAR CNPJ **/ static function validaCNPJ($number) { // Os str_replace servem para "corrigir" os poss�veis "erros", tendo em vista que o c�digo foi preparado apenas para trabalhar com n�meros if(strstr($number,".")) $number=str_replace(".","",$number); if(strstr($number,"-")) $number=str_replace("-","",$number); if(strstr($number,"/")) $number=str_replace("/","",$number); if(strlen($number) != 14) return false; $d1 = $number[11]*2+$number[10]*3+$number[9]*4+$number[8]*5+ $number[7]*6+$number[6]*7+$number[5]*8+$number[4]*9+ $number[3]*2+$number[2]*3+$number[1]*4+$number[0]*5; $d1 = 11-($d1%11); if($d1 >= 10) $d1 = 0; $d2 = $d1*2+$number[11]*3+$number[10]*4+$number[9]*5+ $number[8]*6+$number[7]*7+$number[6]*8+$number[5]*9+ $number[4]*2+$number[3]*3+$number[2]*4+$number[1]*5+$number[0]*6; $d2 = 11-($d2%11); if($d2>=10) $d2=0; if($number[12]==$d1&&$number[13]==$d2) return true; return false; } static function getPaginacao($pagina, $tamanho = 0) { $complemento = ""; if(isset($pagina) && $pagina > 0) { if($tamanho == 0) $tamanho = Constantes::$TAM_PAGINA; $inicio = ($pagina*$tamanho)-$tamanho; $complemento = " LIMIT " . $inicio . "," . $tamanho; } return $complemento; } static function calculaNumPaginas($total, $tamanho = 0){ if($tamanho == 0) $tamanho = Constantes::$TAM_PAGINA; $numPaginas = $total/$tamanho; if($numPaginas > intval($numPaginas)) $numPaginas = intval($numPaginas) + 1; return $numPaginas; } static function geraNomeArquivo($nomeTemp) { $ext = explode(".", $nomeTemp); if(count($ext) > 1) $extensao = ".".$ext[count($ext)-1]; else $extensao = ''; return md5(uniqid(time())) . $extensao; } static function arrayCombo($lista, $chave, $valor, $primeiraOpcao = " -- Selecione -- ") { $combo = array(); $combo[''] = $primeiraOpcao; foreach ($lista as $obj) { $getChave = "get".strtoupper($chave[0]).substr($chave, 1); $getValor = "get".strtoupper($valor[0]).substr($valor, 1); $combo[$obj->$getChave()] = $obj->$getValor(); } return $combo; } static function getCodificacao($string) { return mb_detect_encoding($string.'x', 'UTF-8, ISO-8859-1'); } static function geraThumb($img, $tam = 100) { require 'include/php/easyphpthumbnail.class.php'; $thumb = new easyphpthumbnail; if(isset($img) && strlen($img) > 0) { $pasta = dirname($img); $thumb->Thumblocation = $pasta."/"; $thumb->Thumbprefix = 'mini_'; $thumb->Thumbsize = $tam; $thumb->Polaroid = false; $thumb->Createthumb($img,'file'); } } static function dateTimeFusoHorario($fuso){ #$hora = date("H")+$fuso; $hora = date("H")-3; $hora = $hora.date(":i:s"); return date("Y-m-d ").$hora; } static function getMediaMini($media) { $med = $media; $ext = explode("/", $med); if(count($ext) > 1) $nome = $ext[count($ext)-1]; else $nome = $med; return dirname($med)."/mini_".$nome; } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/Util.class.php
PHP
asf20
12,497
<?php header('Content-type: text/html; charset=utf-8'); include_once '../../autoload.php'; include_once 'Conexao.class.php'; include_once 'Constantes.class.php'; include_once 'Util.class.php'; $conexao = Conexao::getConexao(); try { $conexao->beginTransaction(); /** Salvando tipos de leilao **/ echo "Salvando tipos de leilao... <br/>"; $tpLeiloes = array(); $tpLeiloes[] = new TipoLeilaoBean(0, "Simples"); $tpLeiloes[] = new TipoLeilaoBean(0, "Frete Grátis"); $tpLeiloes[] = new TipoLeilaoBean(0, "Grátis"); $tpLeiloes[] = new TipoLeilaoBean(0, "Frete Grátis e Grátis"); $tpLeiloes[] = new TipoLeilaoBean(0, "Do Usuário"); $tpLeiloes[] = new TipoLeilaoBean(0, "Vale Compra"); $tpLeiloes[] = new TipoLeilaoBean(0, "Iniciante"); $tpLeiloes[] = new TipoLeilaoBean(0, "Multiplos Produtos"); $statusService = new TipoLeilaoService(); foreach ($tpLeiloes as $tpLeilao) { echo "Salvando Tipo ".$tpLeilao->getTipoLeilaoID().": ".$tpLeilao->getDescricao(). "<br/>"; $statusService->salvar($tpLeilao); } echo "Tipos de Leilao Salvo!!!<br/><br/><br/>"; /** Salvando tipos de status do usuario **/ echo "Salvando tipos de status do usuario... <br/>"; $stUsuario = array(); $stUsuario[] = new StatusBean(0, "Usuário Cadastrado", Constantes::$STATUS_USUARIO); $stUsuario[] = new StatusBean(0, "Usuário Excluido", Constantes::$STATUS_USUARIO); $stUsuario[] = new StatusBean(0, "Usuário Banido", Constantes::$STATUS_USUARIO); $statusService = new StatusService(); foreach ($stUsuario as $stUsuario) { echo $stUsuario->getDescricao(). " :: "; $statusService->salvar($stUsuario); } echo "<br/>Tipos de Status do Usuario Salvo!!!<br/><br/>"; /** Salvando tipos de status de informacao **/ echo "Salvando tipos de status de informacao... <br/>"; $stInformacao = array(); $stInformacao[] = new StatusBean(0, "Informação Lida", Constantes::$STATUS_INFORMACAO); $stInformacao[] = new StatusBean(0, "Informação Não Lida", Constantes::$STATUS_INFORMACAO); $stInformacao[] = new StatusBean(0, "Informação Excluída", Constantes::$STATUS_INFORMACAO); foreach ($stInformacao as $stInformacao) { echo $stInformacao->getDescricao(). " :: "; $statusService->salvar($stInformacao); } echo "<br/>Tipos de Status de Informacao Salvo!!!<br/><br/>"; /** Salvando tipos de status de depoimento **/ echo "Salvando tipos de status de depoimento... <br/>"; $stDepoimento = array(); $stDepoimento[] = new StatusBean(0, "Depoimento Lido", Constantes::$STATUS_DEPOIMENTO); $stDepoimento[] = new StatusBean(0, "Depoimento Não Lido", Constantes::$STATUS_DEPOIMENTO); $stDepoimento[] = new StatusBean(0, "Depoimento Excluído", Constantes::$STATUS_DEPOIMENTO); foreach ($stDepoimento as $stDepoimento) { echo $stDepoimento->getDescricao(). " :: "; $statusService->salvar($stDepoimento); } echo "<br/>Tipos de Status de Depoimento Salvo!!!<br/><br/>"; /** Salvando tipos de status de convite **/ echo "Salvando tipos de status de convite... <br/>"; $stConvite = array(); $stConvite[] = new StatusBean(0, "Convite Aceito", Constantes::$STATUS_CONVITE); $stConvite[] = new StatusBean(0, "Convite Não Aceito", Constantes::$STATUS_CONVITE); $stConvite[] = new StatusBean(0, "Convite Excluído", Constantes::$STATUS_CONVITE); foreach ($stConvite as $stConvite) { echo $stConvite->getDescricao(). " :: "; $statusService->salvar($stConvite); } echo "<br/>Tipos de Status de Convite Salvo!!!<br/><br/>"; /** Salvando tipos de status de compra **/ echo "Salvando tipos de status de compra... <br/>"; $stCompra = array(); $stCompra[] = new StatusBean(0, "Compra Iniciada", Constantes::$STATUS_COMPRA); $stCompra[] = new StatusBean(0, "Aguardando Pagamento", Constantes::$STATUS_COMPRA); $stCompra[] = new StatusBean(0, "Compra Confirmada", Constantes::$STATUS_COMPRA); $stCompra[] = new StatusBean(0, "Compra Cancelada", Constantes::$STATUS_COMPRA); $stCompra[] = new StatusBean(0, "Compra Excluída", Constantes::$STATUS_COMPRA); foreach ($stCompra as $stCompra) { echo $stCompra->getDescricao(). " :: "; $statusService->salvar($stCompra); } echo "<br/>Tipos de Status de Compra Salvo!!!<br/><br/>"; /** Salvando tipos de status de enquete **/ echo "Salvando tipos de status de enquete... <br/>"; $stEnquete = array(); $stEnquete[] = new StatusBean(0, "Enquete Ativa", Constantes::$STATUS_ENQUETE); $stEnquete[] = new StatusBean(0, "Enquete Inativa", Constantes::$STATUS_ENQUETE); foreach ($stEnquete as $stEnquete) { echo $stEnquete->getDescricao(). " :: "; $statusService->salvar($stEnquete); } echo "<br/>Tipos de Status de Enquete Salvo!!!<br/><br/>"; /** Salvando tipos de status de produto **/ echo "Salvando tipos de status de produto... <br/>"; $stProduto = array(); $stProduto[] = new StatusBean(0, "Produto Escolhido", Constantes::$STATUS_PRODUTO); $stProduto[] = new StatusBean(0, "Produto Não Escolhido", Constantes::$STATUS_PRODUTO); $stProduto[] = new StatusBean(0, "Produto Excluído", Constantes::$STATUS_PRODUTO); foreach ($stProduto as $stProduto) { echo $stProduto->getDescricao(). " :: "; $statusService->salvar($stProduto); } echo "<br/>Tipos de Status de Produto Salvo!!!<br/><br/>"; /** Salvando tipos de status de leilao **/ echo "Salvando tipos de status de leilao... <br/>"; $stLeilao = array(); $stLeilao[] = new StatusBean(0, "Leilão Aguardando", Constantes::$STATUS_LEILAO); $stLeilao[] = new StatusBean(0, "Leilão Iniciado", Constantes::$STATUS_LEILAO); $stLeilao[] = new StatusBean(0, "Leilão Finalizado", Constantes::$STATUS_LEILAO); foreach ($stLeilao as $stLeilao) { echo $stLeilao->getDescricao(). " :: "; $statusService->salvar($stLeilao); } echo "<br/>Tipos de Status de Leilao Salvo!!!<br/><br/>"; /** Salvando tipos de status de leilao **/ echo "Salvando tipos de cronometro do leilao... <br/>"; $cronometros = array(); $cronometros[] = new CronometroBean(0,30); $cronometros[] = new CronometroBean(0,20); $cronometros[] = new CronometroBean(0,15); $cronometros[] = new CronometroBean(0,10); $cronometroService = new CronometroService(); foreach ($cronometros as $cro) { echo $cro->getValor(). " :: "; $cronometroService->salvar($cro); } echo "<br/>Tipos de Cronometro do Leilao Salvo!!!<br/><br/>"; $conexao->commit(); } catch (Exception $exc) { $conexao->rollBack(); echo $exc->getTraceAsString(); } ?>
0a1b2c3d4e5
trunk/leilao/include/php/monta_cenario.php
PHP
asf20
7,379
<?php class Constantes{ static $DRIVER_DB = 'mysql:host=mysql08.cgsus.saude.ws;port=3306;dbname=cgsus7'; static $USER_DB = 'cgsus7'; static $PASS_DB = 'bloum11*'; static $TAM_PAGINA = 1; static $ASCENDENTE = "ASC"; static $DESCENDENTE = "DESC"; /** CONSTANTES DE CONFIGURAÇÃO DA SUPERCLASSE ACTION **/ static $URL_CRIPTOGRAFADA = false; /** CONSTANTES DE TIPOS DE MENSAGENS **/ static $MSG_SUCCESS = "success"; static $MSG_ERROR = "error"; static $MSG_WARN = "warning"; static $MSG_INFO = ""; static $MSG_LOADING = "loading"; /** CONSTANTES DE STRINGS DE MENSAGENS **/ static $STR_MSG_SUCCESS = "Operação Realizada Com Sucesso!!!"; static $STR_MSG_LOADING = "Carregando..."; static $TAM_THUMB_IMG = 100; static $IMG_DEFAULT = "default.png"; static $IMG_ADM_DEFAULT = "adminDefault.png"; static $IMG_CLI_DEFAULT = "clienteDefault.png"; static $DIR_UPLOAD = "upload/"; static $DIR_IMAGENS = "imagens/"; /** CONSTANTES DE FUSO HORARIO **/ static $FUSO_BRASILIA = -3; /** CONSTANTES DE TIPOS DE INFORMAÇÕES **/ static $INFO_SUGESTAO = 1; static $INFO_RECLAMACAO = 2; static $INFO_IND_PRODUTO = 3; /** CONSTANTES DE TIPOS DE LEILÃO **/ static $LEILAO_SIMPLES = 1; static $LEILAO_FRETE_GRATIS = 2; static $LEILAO_GRATIS = 3; static $LEILAO_FRETE_E_GRATIS = 4; static $LEILAO_DO_USUARIO = 5; static $LEILAO_VALE_COMPRA = 6; static $LEILAO_DO_INICIANTE = 7; static $LEILAO_MULTI_PRODUTOS = 8; /** CONSTANTES DE TIPOS DE STATUS **/ static $STATUS_USUARIO = 1; static $STATUS_INFORMACAO = 2; static $STATUS_DEPOIMENTO = 3; static $STATUS_CONVITE = 4; static $STATUS_COMPRA = 5; static $STATUS_ENQUETE = 6; static $STATUS_PRODUTO = 7; static $STATUS_LEILAO = 8; /** CONSTANTES DE TIPOS DE STATUS DE USUARIO **/ static $ST_USU_CADASTRADO = 1; static $ST_USU_EXCLUIDO = 2; static $ST_USU_BANIDO = 3; /** CONSTANTES DE TIPOS DE STATUS DE INFORMAÇÃO **/ static $ST_INFO_LIDA = 4; static $ST_INFO_NAO_LIDA = 5; static $ST_INFO_EXCLUIDA = 6; /** CONSTANTES DE TIPOS DE STATUS DE DEPOIMENTO **/ static $ST_DEPO_ACEITO = 7; static $ST_DEPO_NAO_ACEITO = 8; static $ST_DEPO_EXCLUIDO = 9; /** CONSTANTES DE TIPOS DE STATUS DE CONVITE **/ static $ST_CONV_ACEITO = 10; static $ST_CONV_NAO_ACEITO = 11; static $ST_CONV_EXCLUIDO = 12; /** CONSTANTES DE TIPOS DE STATUS DE COMPRA **/ static $ST_COMPRA_INICIADA = 13; static $ST_COMPRA_AG_PAGAMENTO = 14; static $ST_COMPRA_CONFIRMADA = 15; static $ST_COMPRA_CANCELADA = 16; static $ST_COMPRA_EXCLUIDA = 17; /** CONSTANTES DE TIPOS DE STATUS DE ENQUETE **/ static $ST_ENQ_ATIVA = 18; static $ST_ENQ_INATIVA = 19; /** CONSTANTES DE TIPOS DE STATUS DE PRODUTO **/ static $ST_PROD_ESCOLHIDO = 20; static $ST_PROD_NAO_ESCOLHIDO = 21; static $ST_PROD_EXCLUIDO = 22; /** CONSTANTES DE TIPOS DE STATUS DE LEILAO **/ static $ST_LEILAO_AGUARDANDO = 23; static $ST_LEILAO_INICIADO = 24; static $ST_LEILAO_FINALIZADO = 25; /** CONSTANTE PARA DIZER QUE É EDIÇÃO **/ static $EDIT = 1; /** CONSTANTE PARA ESTADOS CIVIL **/ static $EST_CV_SOLTEIRO = 1; static $EST_CV_CASADO = 2; static $EST_CV_DIVORCIADO = 3; /** CONSTANTE PARA DIZER QUE É EDIÇÃO **/ static $NUM_LANCES_INICIAL = 15; /** CONSTANTE PARA DIZER SE É SIM OU NÃO **/ static $SIM = 1; static $NAO = 2; /** CONSTANTE PARA DIZER SE É SIM OU NÃO **/ static $SEXO_MASCULINO = 1; static $SEXO_FEMININO = 2; } ?>
0a1b2c3d4e5
trunk/leilao/include/php/Constantes.class.php
PHP
asf20
4,411
<?php class Seguranca{ static function senhaRandomica($qtd_char){ //lista de caracteres, (coloque aqui os caracteres a sua escolha) $caracteres = "A,B,C,d,e,f,G,H,I,j,l,m,n,X,Z,w,Y,o,p,Q,r,S,t,Y,1,2,3,4,5,6,7,8,9,0"; //gera um array com a lista de caractreres $array_caracteres = explode(",", $caracteres); //mistura o array shuffle($array_caracteres); //transforma em uma string $senha = implode($array_caracteres, ""); //retorna a senha com a quantidade de caracteres desejado return substr($senha, 0, $qtd_char); } static function criptografaSenha($senha){ $chars_aleatorios = Seguranca::senhaRandomica(8); return md5($senha.$chars_aleatorios).":".$chars_aleatorios; } static function testaSenha($senha, $chaveComparacao){ $senha_criptografada = explode(":",$chaveComparacao); if(strcmp(md5($senha . $senha_criptografada[1]),$senha_criptografada[0]) === 0) return TRUE; return FALSE; } static function criptografaLink($link){ $chars_aleatorios1 = Seguranca::senhaRandomica(8); $chars_aleatorios2 = Seguranca::senhaRandomica(8); return $chars_aleatorios1.":".base64_encode($link).":".$chars_aleatorios2; } static function descriptografaLink($link){ $link_criptografado = explode(":",$link); return base64_decode($link_criptografado[1]); } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/Seguranca.class.php
PHP
asf20
2,219
<?php /** * Description of MaxValueValidator: * * Valida o valor maximo para o valor passado, ex: * * \@MaxValueValidator (max = 10)<br/> * private $atributo; * * @author Magno */ class MaxValueValidator extends BaseValidator{ public $max; public function validate($value) { $value = trim($value); if($this->max == null || strlen($this->max) <= 0) throw new ValidatorException ("Error, Maximum Value Not Found in Annotation!!!"); if($value == null || $value > $this->max) throw new ValidatorException ("Error, Value is Greater than the Maximum Allowed!!!"); } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/validator/MaxValueValidator.class.php
PHP
asf20
690
<?php /** * Description of MinLengthValidator: * * Valida um valor minimo para a String passada, ex: * * \@MinLengthValidator (min = 10)<br/> * private $atributo; * * @author Magno */ class MinLengthValidator extends BaseValidator{ public $min; public function validate($value) { $value = trim($value); if($this->min == null || strlen($this->min) <= 0) throw new ValidatorException ("Error, Minimum Length Not Found in Annotation!!!"); if($value == null || strlen($value) < $this->min) throw new ValidatorException ("Error, Minimum Length Invalid!!!"); } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/validator/MinLengthValidator.class.php
PHP
asf20
685
<?php /** * Description of LengthValidator: * * Valida um valor de tamanho para uma String ou Array passado, * pode ser tanto um valor minimo, maximo, quanto um * valor exato, ex: * * \@LengthValidator (min = 10, max = 20, assert = 15)<br/> * private $atributo; * * @author Magno */ class LengthValidator extends BaseValidator{ public $max; public $min; public $assert; public function validate($value) { $op = ""; if(is_array($value)) $op = "count"; else if(is_string($value)){ $op = "strlen"; $value = trim($value); }else throw new ValidatorException ("Error, Type Value Invalid!!!"); if(isset ($this->assert) && intval($this->assert) > 0 && $op($value) != $this->assert){ throw new ValidatorException ("Error, Value Length Incorrect!!!"); } if(isset ($this->assert) && intval($this->assert) > 0 && $op($value) == $this->assert){ return; } if(isset ($this->min) && intval($this->min) > 0 && ($this->max == null || intval($this->max) <= 0) && $op($value) < $this->min){ throw new ValidatorException ("Error, Minimum Length Invalid!!!"); } if(isset ($this->max) && intval($this->max) > 0 && ($this->min == null || intval($this->min) <= 0) && $op($value) > $this->max){ throw new ValidatorException ("Error, Maximum Length Invalid!!!"); } if(isset ($this->min) && isset ($this->max)&& $this->min >= $this->max) throw new ValidatorException ("Error, Range Incorrect!!!"); if(isset ($this->max) && intval($this->max) > 0 && isset ($this->min) && intval($this->min) > 0 && ($op($value) > $this->max || $op($value) < $this->min)){ throw new ValidatorException ("Error, Value is not in the Correct Range!!!"); } } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/validator/LengthValidator.class.php
PHP
asf20
2,097
<?php /** * Description of ValidatorException * * Classe que representa a exceção lançada pelos validadores * * @author Magno */ class ValidatorException extends Exception{ public function __construct($message) { parent::__construct($message); } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/validator/ValidatorException.class.php
PHP
asf20
284
<?php /** * Description of MinValueValidator: * * Valida o valor minimo para o valor passado, ex: * * \@MinValueValidator (min = 10)<br/> * private $atributo; * * @author Magno */ class MinValueValidator extends BaseValidator{ public $min; public function validate($value) { if($this->min == null || strlen($this->min) <= 0) throw new ValidatorException ("Error, Minimum Value Not Found in Annotation!!!"); if($value == null || $value < $this->min) throw new ValidatorException ("Error, Value is Less than the Minimum Allowed!!!"); } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/validator/MinValueValidator.class.php
PHP
asf20
647
<?php require_once(dirname(__FILE__).'/ValidatorException.class.php'); /** * Description of Validator * * Classe que Mãe dos Validadores que obriga as descendentes a implementarem * o metodo validate para a validação correspondente * * @author Magno */ abstract class BaseValidator extends Annotation{ public abstract function validate($value); } ?>
0a1b2c3d4e5
trunk/leilao/include/php/validator/BaseValidator.class.php
PHP
asf20
368
<?php /** * Description of AssertLengthValidator: * * Valida um intervalo de tamanho de valores de uma String, ex: * * \@AssertLengthValidator (min = 2, max = 10)<br/> * private $atributo; * * OBS: caso o vaor minimo não for estabelecido, irá receber 0 (zero) * * @author Magno */ class AssertLengthValidator extends BaseValidator{ public $min; public $max; public function validate($value) { $value = trim($value); if($this->min == null || strlen($this->min) <= 0) $this->min = 0; if($this->max == null || strlen($this->max) <= 0) throw new ValidatorException ("Error, Maximum Length Not Found in Annotation!!!"); if($this->min >= $this->max) throw new ValidatorException ("Error, Range Incorrect!!!"); if($value == null || strlen($value) < $this->min || strlen($value) > $this->max) throw new ValidatorException ("Error, Value is not in the Correct Range!!!"); } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/validator/AssertLengthValidator.class.php
PHP
asf20
1,071
<?php /** * Description of PatternValidator: * * Valida um padrão com formato correto (expressão de linguagem), ex: * * \@PatternValidator<br/> * private $atributo; * * @author Magno */ class PatternValidator extends BaseValidator{ public $pattern; public function validate($value) { if($this->pattern == null || strlen($this->pattern) <= 0) throw new ValidatorException ("Error, Pattern Not Found in Annotation!!!"); $value = trim($value); if($value == null || preg_match($this->pattern, $value)) throw new ValidatorException ("Error, Format Invalid!!!"); } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/validator/PatternValidator.class.php
PHP
asf20
682
<?php /** * Description of EmailValidator: * * Valida um email com formato correto (mail@mail.com), ex: * * \@EmailValidator<br/> * private $atributo; * * @author Magno */ class EmailValidator extends BaseValidator{ public function validate($value) { $value = trim($value); $pattern = '/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/'; if($value == null || !preg_match($pattern, $value)) throw new ValidatorException ("Error, Email Invalid!!!"); } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/validator/EmailValidator.class.php
PHP
asf20
594
<?php /** * Description of MaskValidator: * * Valida um valor correto de acordo com a mascara, ex: * * \@MaskValidator (mask = "99/99/9999")<br/> * private $atributo; * * 9 - Numeros de 0 a 9;<br/> * a - Letras Minusculas de "a" a "z";<br/> * A - Letras Maiusculas de "A" a "Z";<br/> * # - Letra ou Número;<br/> * * - Qualquer valor;<br/> * * @author Magno */ class MaskValidator extends BaseValidator{ private $COD_NUMERO = "9"; private $COD_LETRA_MIN = "a"; private $COD_LETRA_MAI = "A"; private $COD_ALFA_NUM = "#"; private $COD_QUALQUER = "*"; private $reservados = array("[","/","^","$",".","|","?","*","+","(",")"); public $mask; public function validate($value) { $value = trim($value); if($this->mask == null || strlen($this->mask) <= 0) throw new ValidatorException ("Error, Mask Not Found in Annotation!!!"); $pattern = $this->geraER($this->mask); if($value == null || !preg_match($pattern, $value)) throw new ValidatorException ("Error, Format Invalid!!!"); } private function geraER($mask){ $expRegular = "/^"; for ($i = 0; $i < strlen($mask); $i++) { $charPos = $mask[$i]; $more = "+"; if($i == strlen($mask) -1) $more = ""; if(strcmp($charPos, $this->COD_NUMERO) == 0){ $expRegular .= "[0-9]".$more; }else if(strcmp($charPos, $this->COD_LETRA_MAI) == 0){ $expRegular .= "[A-Z]".$more; }else if(strcmp($charPos, $this->COD_LETRA_MIN) == 0){ $expRegular .= "[a-z]".$more; }else if(strcmp($charPos, $this->COD_ALFA_NUM) == 0){ $expRegular .= "[a-zA-Z]|[0-9]".$more; }else if(strcmp($charPos, $this->COD_QUALQUER) == 0){ $expRegular .= ".".$more; }else{ $escape = ""; if(array_search($charPos, $this->reservados)) $escape = "\\"; $expRegular .= $escape.$charPos; } } $expRegular .= "$/"; return $expRegular; } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/validator/MaskValidator.class.php
PHP
asf20
2,376
<?php /** * Description of NotEmptyValidator: * * Valida uma String que não pode ser em branco, ex: * * \@NotEmptyValidator<br/> * private $atributo; * * @author Magno */ class NotEmptyValidator extends BaseValidator{ public function validate($value) { $op = ""; if(is_string($value)) $op = "strlen"; else if(is_array($value)) $op = "count"; else throw new ValidatorException ("Error, Type Value Invalid!!!"); $value = trim($value); if($value == null || $op($value) <= 0) throw new ValidatorException ("Error, Value Can't Be Empty !!!"); } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/validator/NotEmptyValidator.class.php
PHP
asf20
710
<?php /** * Description of ValueValidator: * * Valida um valor para o Numero passado, * pode ser tanto um valor minimo, maximo, quanto um * valor exato, ex: * * \@ValueValidator (min = 10, max = 20, assert = 15)<br/> * private $atributo; * * @author Magno */ class ValueValidator extends BaseValidator{ public $max; public $min; public $assert; public function validate($value) { if(!is_numeric($value)) throw new ValidatorException ("Error, Value is not a Number Correct!!!"); if(isset ($this->assert) && $this->assert > 0 && $value != $this->assert){ throw new ValidatorException ("Error, Value Incorrect!!!"); } if(isset ($this->assert) && $this->assert > 0 && $value == $this->assert){ return; } if(isset ($this->min) && $this->min > 0 && ($this->max == null || $this->max <= 0) && $value < $this->min){ throw new ValidatorException ("Error, Minimum Value Invalid!!!"); } if(isset ($this->max) && $this->max > 0 && ($this->min == null || $this->min <= 0) && $value > $this->max){ throw new ValidatorException ("Error, Maximum Value Invalid!!!"); } if(isset ($this->min) && isset ($this->max)&& $this->min >= $this->max) throw new ValidatorException ("Error, Range Incorrect!!!"); if(isset ($this->max) && $this->max > 0 && isset ($this->min) && $this->min > 0 && ($value > $this->max || $value < $this->min)){ throw new ValidatorException ("Error, Value is not in the Correct Range!!!"); } } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/validator/ValueValidator.class.php
PHP
asf20
1,826
<?php /** * Description of MaxLengthValidator: * * Valida um valor maximo para a String passada, ex: * * \@MaxLengthValidator (max = 10)<br/> * private $atributo; * * @author Magno */ class MaxLengthValidator extends BaseValidator{ public $max; public function validate($value) { $value = trim($value); if($this->max == null || strlen($this->max) <= 0) throw new ValidatorException ("Error, Maximum Length Not Found in Annotation!!!"); if($value == null || strlen($value) > $this->max) throw new ValidatorException ("Error, Maximum Length Invalid!!!"); } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/validator/MaxLengthValidator.class.php
PHP
asf20
685
<?php /** * Description of NotNullValidator: * * Valida um valor que não pode ser nulo, ex: * * \@NotNullValidator<br/> * private $atributo; * * @author Magno */ class NotNullValidator extends BaseValidator{ public function validate($value) { if($value == null) throw new ValidatorException ("Error, Value Can't Be NULL !!!"); } } ?>
0a1b2c3d4e5
trunk/leilao/include/php/validator/NotNullValidator.class.php
PHP
asf20
387
/* Variable Grid System (Fluid Version). Learn more ~ http://www.spry-soft.com/grids/ Based on 960 Grid System - http://960.gs/ & 960 Fluid - http://www.designinfluences.com/ Licensed under GPL and MIT. */ /* Containers ----------------------------------------------------------------------------------------------------*/ .container_12 { width: 98%; margin-left: 1%; margin-right: 1%; } /* Grid >> Global ----------------------------------------------------------------------------------------------------*/ .grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6, .grid_7, .grid_8, .grid_9, .grid_10, .grid_11, .grid_12 { display:inline; float: left; margin-left: 0.99%; margin-right: 0.99%; } /* Grid >> Children (Alpha ~ First, Omega ~ Last) ----------------------------------------------------------------------------------------------------*/ .alpha { margin-left: 0; } .omega { margin-right: 0; } /* Grid >> 12 Columns ----------------------------------------------------------------------------------------------------*/ .container_12 .grid_1 { width:6.333%; } .container_12 .grid_2 { width:14.667%; } .container_12 .grid_3 { width:23.0%; } .container_12 .grid_4 { width:31.333%; } .container_12 .grid_5 { width:39.667%; } .container_12 .grid_6 { width:48.0%; } .container_12 .grid_7 { width:56.333%; } .container_12 .grid_8 { width:64.667%; } .container_12 .grid_9 { width:73.0%; } .container_12 .grid_10 { width:81.333%; } .container_12 .grid_11 { width:89.667%; } .container_12 .grid_12 { width:98.0%; } /* Prefix Extra Space >> 12 Columns ----------------------------------------------------------------------------------------------------*/ .container_12 .prefix_1 { padding-left:8.333%; } .container_12 .prefix_2 { padding-left:16.667%; } .container_12 .prefix_3 { padding-left:25.0%; } .container_12 .prefix_4 { padding-left:33.333%; } .container_12 .prefix_5 { padding-left:41.667%; } .container_12 .prefix_6 { padding-left:50.0%; } .container_12 .prefix_7 { padding-left:58.333%; } .container_12 .prefix_8 { padding-left:66.667%; } .container_12 .prefix_9 { padding-left:75.0%; } .container_12 .prefix_10 { padding-left:83.333%; } .container_12 .prefix_11 { padding-left:91.667%; } /* Suffix Extra Space >> 12 Columns ----------------------------------------------------------------------------------------------------*/ .container_12 .suffix_1 { padding-right:8.333%; } .container_12 .suffix_2 { padding-right:16.667%; } .container_12 .suffix_3 { padding-right:25.0%; } .container_12 .suffix_4 { padding-right:33.333%; } .container_12 .suffix_5 { padding-right:41.667%; } .container_12 .suffix_6 { padding-right:50.0%; } .container_12 .suffix_7 { padding-right:58.333%; } .container_12 .suffix_8 { padding-right:66.667%; } .container_12 .suffix_9 { padding-right:75.0%; } .container_12 .suffix_10 { padding-right:83.333%; } .container_12 .suffix_11 { padding-right:91.667%; } /* Push Space >> 12 Columns ----------------------------------------------------------------------------------------------------*/ .container_12 .push_1 { left:8.333%; } .container_12 .push_2 { left:16.667%; } .container_12 .push_3 { left:25.0%; } .container_12 .push_4 { left:33.333%; } .container_12 .push_5 { left:41.667%; } .container_12 .push_6 { left:50.0%; } .container_12 .push_7 { left:58.333%; } .container_12 .push_8 { left:66.667%; } .container_12 .push_9 { left:75.0%; } .container_12 .push_10 { left:83.333%; } .container_12 .push_11 { left:91.667%; } /* Pull Space >> 12 Columns ----------------------------------------------------------------------------------------------------*/ .container_12 .pull_1 { left:-8.333%; } .container_12 .pull_2 { left:-16.667%; } .container_12 .pull_3 { left:-25.0%; } .container_12 .pull_4 { left:-33.333%; } .container_12 .pull_5 { left:-41.667%; } .container_12 .pull_6 { left:-50.0%; } .container_12 .pull_7 { left:-58.333%; } .container_12 .pull_8 { left:-66.667%; } .container_12 .pull_9 { left:-75.0%; } .container_12 .pull_10 { left:-83.333%; } .container_12 .pull_11 { left:-91.667%; }
0a1b2c3d4e5
trunk/leilao/include/css/960.gs.fluid.css
CSS
asf20
4,483
/** * Styles for tables and grid view */ .table, .with-head { margin-bottom: 1.667em; border: 1px solid #999999; } .table { border-collapse: separate; } .table:last-child, .with-head:last-child { margin-bottom: 0; } /* IE class */ .table.last-child, .with-head.last-child { margin-bottom: 0; } .no-margin .table, .content-columns .table, .with-head.no-margin, .content-columns .with-head { border: none; } .no-margin .table + .no-margin, .with-head.no-margin + .no-margin { margin-top: -1.667em; } .no-margin .table.last-child + .no-margin, .with-head.no-margin.last-child + .no-margin { margin-top: 0; } .content-columns .table:first-child, .content-columns .with-head:first-child { border: none; } /* IE class */ .content-columns .table.first-child, .content-columns .with-head.first-child { border: none; } .content-columns .table, .content-columns .with-head { margin-bottom: 0; } .table thead th, .table thead td, .head { background: #a4a4a4 url(../images/old-browsers-bg/planning-header-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #cccccc, #a4a4a4 ); background: -webkit-gradient( linear, left top, left bottom, from(#cccccc), to(#a4a4a4) ); color: white; -moz-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); -webkit-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); border-top: 1px solid white; border-left: 1px solid #dddddd; border-right: 1px solid #999999; border-bottom: 1px solid #828282; } .table thead th, .table thead td { vertical-align: middle; text-align: left; padding: 0.5em 0.75em; } .table thead th.sorting, .table thead th.sorting_asc, .table thead th.sorting_desc, .table thead td.sorting, .table thead td.sorting_asc, .table thead td.sorting_desc { cursor: pointer; } .head { font-weight: bold; line-height: 1.5em; } .head > div { float: left; padding: 0.5em 2em 0.5em 0.75em; border-left: 1px solid #dddddd; border-right: 1px solid #999999; color: white; margin: -1px 0 0 0; -moz-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); -webkit-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); } .head > div:first-child { margin-left: -1px; } /* IE class */ .head > div.first-child { margin-left: -1px; } .head > div:last-of-type { border-right: none; } /* IE class */ .head > div.last-of-type { border-right: none; } .head .button { float: right; margin: 0.25em 0.5em 0 0; } .head > div .button { float: left; margin: -0.167em 0.5em -0.333em 0; } .head > div .button:last-child { margin-right: 0; } /* IE class */ .head > div .button.last-child { margin-right: 0; } .table tbody th, .table tbody td, .table tfoot th, .table tfoot td { vertical-align: top; text-align: left; padding: 0.75em; border-left: 1px dotted #333333; } .table tbody th, .table tbody .th { /* Compatibility with DataTables */ background: #e6e6e6; } .table tbody td { background: #f2f2f2; } .table tfoot th, .table tfoot td { border-top: 1px solid #FF9900; background: #999999 url(../images/old-browsers-bg/tfoot-bg.png) repeat-x top; -o-background-size: 100% 100%; -moz-background-size: 100% 100%; -webkit-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #333333, #999999 ); background: -webkit-gradient( linear, left top, left bottom, from(#333333), to(#999999) ); color: white; } .table tbody th:first-child, .table tbody .th:first-child, .table tbody td:first-child, .table tfoot th:first-child, .table tfoot td:first-child { border-left: none; } /* IE class */ .table tbody th.first-child, .table tbody .th.first-child, .table tbody td.first-child, .table tfoot th.first-child, .table tfoot td.first-child { border-left: none; } .table tbody tr:nth-child(even) th, .table tbody tr:nth-child(even) .th { background: #d9d9d9; } /* IE class */ .table tbody tr.even th .table tbody tr.even .th { background: #d9d9d9; } .table tbody tr:nth-child(even) td { background: #e6e6e6; } /* IE class */ .table tbody tr.even td { background: #e6e6e6; } .table tbody tr:hover th, .table tbody tr:hover .th, .table tbody tr:hover td { background: #d1e5ef; } .table .black-cell, .head .black-cell { background: #242424 url(../images/old-browsers-bg/black-cell-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #4c4c4c, #242424 ); background: -webkit-gradient( linear, left top, left bottom, from(#4c4c4c), to(#242424) ); border-top-color: #7f7f7f; border-left: none; border-right-color: #191919; min-width: 1.333em; padding: 0.5em 0.583em; } /* IE class */ .ie7 .head .black-cell { height: 1.5em; position: relative; z-index: 89; } .head .black-cell.with-gap { border-right-color: white; margin-right: 0.25em } .head .black-cell.with-gap + .black-cell { border-left: 1px solid #999999; } .table .black-cell span, .head .black-cell span { display: block; height: 2.5em; background-repeat: no-repeat; background-position: center; margin: -0.5em -0.75em; } /* IE class */ .ie7 .head .black-cell span { position: absolute; top: 0; right: 0; bottom: 0; left: 0; height: auto; padding: 0; } .table .black-cell span.loading, .with-head .black-cell span.loading { background-image: url(../images/table-loader.gif); } .table .black-cell span.error, .with-head .black-cell span.error { background-image: url(../images/icons/fugue/cross-circle.png); } .table .black-cell span.success, .with-head .black-cell span.success { background-image: url(../images/icons/fugue/tick-circle-blue.png); } .table-actions a img { margin: -2px 0; } /************ Sort arrows ************/ .column-sort { display: block; float: left; width: 14px; margin: -0.583em 0.5em -0.583em -0.75em; border-right: 1px solid #dddddd; } .head .column-sort { margin: -0.5em 0.5em -0.5em -0.75em; } .sorting_disabled .column-sort { display: none; } .column-sort .sort-up, .column-sort .sort-down { display: block; width: 13px; height: 14px; background: url(../images/table-sort-arrows.png) no-repeat; border-right: 1px solid #999999; } .column-sort .sort-up { background-position: 0 1px; border-bottom: 1px solid #828282; } .column-sort .sort-down { background-position: 0 bottom; border-top: 1px solid white; } .column-sort .sort-up:hover { background-position: -15px 1px; } .column-sort .sort-down:hover { background-position: -15px bottom; } .column-sort .sort-up:active, .column-sort .sort-up.active, .sorting_asc .column-sort .sort-up { background-position: -30px 1px; } .column-sort .sort-down:active, .column-sort .sort-down.active, .sorting_desc .column-sort .sort-down { background-position: -30px bottom; } /************ Cell styles ************/ .table-check-cell { width: 1em; } /* http://perishablepress.com/press/2008/02/05/lessons-learned-concerning-the-clearfix-css-hack */ .head:after, ul.grid:after { clear: both; content: ' '; display: block; font-size: 0; line-height: 0; visibility: hidden; width: 0; height: 0; } .head, ul.grid { display: inline-block; } * html .head, * html ul.grid { height: 1%; } .head, ul.grid { display: block; }
0a1b2c3d4e5
trunk/leilao/include/css/table.css
CSS
asf20
8,175
/** * Styles for the mobile template */ body { font-family: HelveticaNeue, Verdana, Arial, Helvetica, sans-serif; background: url(../images/bg-mobile.png) no-repeat center top; -webkit-text-size-adjust: none; } textarea, input { font-family: HelveticaNeue, Verdana, Arial, Helvetica, sans-serif; } /***************** Mobile styles ****************/ button.big { font-size: 1.75em; } /* Apple's generic lists patterns customization */ /* http: //developer.apple.com/safari/library/samplecode/iPhoneListPatterns/ */ ul.edgeToEdge { font-weight: bold; background-color: white; color: black; } ul.edgeToEdge li { font-size: 1.333em; border-top: 1px solid rgb(217,217,217); padding: 0.75em 0.563em 0.75em 1em; height: 1.188em; line-height: 1.188em; } ul.edgeToEdge li:first-child { border-top: 0; } ul.edgeToEdge a { display: block; margin: -0.75em -0.563em -0.75em -1em; padding: 0.75em 0.563em 0.75em 1em; color: black; } ul.edgeToEdge .secondary { font-weight: normal; float: right; margin-right: 0.5em; } ul.edgeToEdge a .secondary { color: #3399cc; } ul.edgeToEdge .number { float: right; min-width: 0; padding: 0.063em 0.375em 0.125em; line-height: 1em; -webkit-border-radius: 0.5em; -webkit-background-clip: padding-box; -moz-border-radius: 0.5em; border-radius: 0.5em; } ul.roundRectangle { font-weight: bold; color: black; background-color: white; border: 1px solid rgb(217,217,217); -webkit-border-radius: 0.5em; -webkit-background-clip: padding-box; -moz-border-radius: 0.5em; border-radius: 0.5em; } ul.roundRectangle.box { padding: 0; } ul.roundRectangle li { font-size: 1.333em; border-top: 1px solid rgb(217,217,217); padding: 0.75em 0.625em; } ul.roundRectangle li:first-child { border-top: 0; } ul.roundRectangle a { display: block; margin: -0.75em -0.625em; padding: 0.75em 0.625em; color: black; } ul.roundRectangle .showArrow { float: right; padding-right: 1em; background: url(../images/chevron.png) no-repeat right; } ul.roundRectangle .secondary { font-weight: normal; float: right; margin-right: 0.625em; } ul.roundRectangle .showArrow.secondary { color: #324F85; margin-right: 0; } ul.roundRectangle a .secondary { color: #324F85; } /****************** Top bars ********************/ header { font-size: 1.333em; border-top: 0.063em solid #ff6500; height: 2.5em; line-height: 2.438em; background: black url(../images/old-browsers-bg/subnav-bg.png) repeat-x; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient(top, #303135, #3c3d42 6%, #404447 18%, #34383b 50%, #25292c 50%, #1a1b1f 63%, black); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#303135), to(black), color-stop(.06, #3c3d42), color-stop(.18, #404447), color-stop(.5, #34383b), color-stop(.5, #25292c), color-stop(.63, #1a1b1f)); text-align: center; color: white; padding: 0 4.5em; } header h1 { font-weight: bold; -webkit-text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5); -moz-text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5); text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5); height: 2.5em; text-overflow: ellipsis; } #back { display: block; font-size: 1.167em; width: 76px; height: 40px; line-height: 40px; background: url(../images/back-button.png) no-repeat center center; color: white; text-align: center; text-indent: 0.286em; text-decoration: none; text-transform: uppercase; margin: -2.857em 0 0 0; } #menu { float: right; font-size: 1.333em; height: 1.75em; line-height: 1.75em; margin: -2.188em 0.25em 0 0; background: #465a6e url(../images/old-browsers-bg/subnav-bt-border-bg.png) repeat-x; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient(top, #9faab6, #465a6e); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#9faab6), to(#465a6e)); -moz-border-radius: 0.313em; -webkit-border-radius: 0.313em; -webkit-background-clip: padding-box; border-radius: 0.313em; color: white; padding: 0.063em; -moz-box-shadow: 0 0 2px #000000; -webkit-box-shadow: 0 0 2px #000000; box-shadow: 0 0 2px #000000; } #menu > a { display: block; font-size: 0.875em; height: 2em; line-height: 2em; padding: 0 0.857em; color: white; text-decoration: none; text-transform: uppercase; -moz-border-radius: 0.286em; -webkit-border-radius: 0.286em; -webkit-background-clip: padding-box; border-radius: 0.286em; background: #1d2a36 url(../images/old-browsers-bg/subnav-bt-bg.png) repeat-x; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient(top, #858d95, #46505b 50%, #38424d 50%, #1c2733); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#858d95), to(#1c2733), color-stop(.5, #46505b), color-stop(.5, #38424d)); } #menu.active { background: #6dc0e5 url(../images/old-browsers-bg/subnav-bt-hover-border-bg.png) repeat-x; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient(top, #cbe9f7, #6dc0e5); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#cbe9f7), to(#6dc0e5)); -moz-transition: all 100ms; -webkit-transition: all 100ms; -o-transition: all 100ms; transition: all 100ms; } #menu.active > a { background: #305d79 url(../images/old-browsers-bg/subnav-bt-hover-bg.png) repeat-x; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient(left, rgba(109, 192, 229, 0), rgba(109, 192, 229, 0.2) 25%, rgba(109, 192, 229, 0.4) 50%, rgba(109, 192, 229, 0.3) 75%, rgba(109, 192, 229, 0)), -moz-linear-gradient(top, #afc2cf, #537288 50%, #45667c 50%, #2c526b); background: -webkit-gradient(linear, 0% 0%, 100% 0%, from(rgba(109, 192, 229, 0)), to(rgba(109, 192, 229, 0)), color-stop(.25, rgba(109, 192, 229, 0.3)), color-stop(.5, rgba(109, 192, 229, 0.4)), color-stop(.75, rgba(109, 192, 229, 0.3))), -webkit-gradient(linear, 0% 0%, 0% 100%, from(#afc2cf), to(#2c526b), color-stop(.5, #537288), color-stop(.5, #45667c)); -moz-box-shadow: 0 0 7px #cbe9f7; -webkit-box-shadow: 0 0 7px #cbe9f7; box-shadow: 0 0 7px #cbe9f7; -moz-transition: all 100ms; -webkit-transition: all 100ms; -o-transition: all 100ms; transition: all 100ms; } #menu ul { position: absolute; z-index: 999910; left: 0; right: 0; top: 2.563em; text-align: left; border-top: 1px dotted white; display: none; background: rgba(13, 24, 30, 0.85); } #menu > ul { overflow: hidden; } #menu.active ul li ul { top: -1px; left: 100%; width: 100%; background: none; } #menu.active > ul, #menu.active li.active ul { display: block; } #menu ul li { border-bottom: 1px dotted white; padding: 0.75em 1.25em 0.75em 0.5em; text-overflow: ellipsis; } #menu ul li.red { background-color: #772f32; } #menu ul li a { display: block; margin: -0.75em -1.25em -0.75em -0.5em; padding: 0.75em 1.25em 0.75em 0.5em; color: white; text-overflow: ellipsis; } #menu ul li.with-subs > a { background: url(../images/chevron2.png) no-repeat 95% center; } /* Back button */ #menu ul li.back { text-align: right; } #menu ul li.back a { background: rgba(255, 255, 255, 0.2) url(../images/chevron-left2.png) no-repeat 2% center; } #status-bar { font-size: 1.333em; height: 3em; line-height: 2.938em; background: white url(../images/old-browsers-bg/status-bar-bg.png) repeat-x; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient(top, white, #dadada 6%, white 92%, #cfcfcf); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(white), to(#cfcfcf), color-stop(.06, #dadada), color-stop(.92, white)); border-bottom: 1px solid #969696; color: #7b7b7b; padding: 0 0.5em; } #status-infos { float: right; } #status-infos > li { float: left; margin-left: 0.5em; } #status-infos > li.spaced { padding-right: 0.5em; } #status-infos > li > .button { padding-bottom: 0.167em; } #header-shadow { background: url(../images/old-browsers-bg/status-bar-shadow.png) repeat-x; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; height: 0.5em; margin-bottom: -0.5em; background: -moz-linear-gradient(top, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1) 30%, rgba(0, 0, 0, 0)); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(0, 0, 0, 0.3)), to(rgba(0, 0, 0, 0)), color-stop(.3, rgba(0, 0, 0, 0.1))); } /******************* Content ********************/ article { padding: 0.833em; font-weight: normal; } article > .no-margin { margin-left: -0.833em; margin-right: -0.833em; } article > .no-margin:first-child { margin-top: -0.833em; } .block-content h1, .block-content .h1 { margin: 0 -1.111em 1.111em; text-align: center; padding: 0.389em 0.444em 0.5em; border-width: 1px 0; } .block-content h1:first-child, .block-content .h1:first-child { margin-top: -1.111em; border-top: 0; -moz-border-radius: 0.111em 0.111em 0 0; -webkit-border-top-left-radius: 0.111em; -webkit-border-top-right-radius: 0.111em; border-radius: 0.111em 0.111em 0 0; } .block-content.no-padding h1, .block-content.no-padding .h1 { margin-left: 0; margin-right: 0; } .block-content.no-padding h1:first-child, .block-content.no-padding .h1:first-child { margin-top: 0; } /***************** Block header *****************/ .block-content .block-header:first-child, .block-content h1 + .block-header, .block-content .h1 + .block-header, .block-content.no-padding h1 + .block-header, .block-content.no-padding .h1 + .block-header { margin-top: -0.833em !important; } .block-content .block-header:first-child { -moz-border-radius: 0.083em 0.083em 0 0; -webkit-border-top-left-radius: 0.083em; -webkit-border-top-right-radius: 0.083em; border-radius: 0.083em 0.083em 0 0; } .block-content.no-padding .block-header:first-child { margin-top: 0 !important; } /***************** Wizard tweak *****************/ .block-content .wizard-steps:first-child, .block-content h1 + .wizard-steps, .block-content .h1 + .wizard-steps, .block-content.no-padding h1 + .wizard-steps, .block-content.no-padding .h1 + .wizard-steps { margin-top: -1.667em !important; } .block-content .wizard-steps:first-child { -moz-border-radius: 0.167em 0.167em 0 0; -webkit-border-top-left-radius: 0.167em; -webkit-border-top-right-radius: 0.167em; border-radius: 0.167em 0.167em 0 0; } .block-content.no-padding .wizard-steps:first-child { margin-top: 0 !important; } /**************** Block controls ****************/ .block-content .block-controls:first-child, .block-content h1 + .block-controls, .block-content .h1 + .block-controls, .block-content.no-padding h1 + .block-controls, .block-content.no-padding .h1 + .block-controls { margin-top: -1.667em !important; } .block-content .block-controls:first-child { -moz-border-radius-topleft: 0.2em; -moz-border-radius-topright: 0.2em; -webkit-border-top-left-radius: 0.2em; -webkit-border-top-right-radius: 0.2em; border-top-left-radius: 0.2em; border-top-right-radius: 0.2em; } .block-content.no-padding .block-controls:first-child { margin-top: 0 !important; } .block-content .block-controls:first-child ul.controls-tabs li:last-child a { -moz-border-radius-topright: 0.2em; -webkit-border-top-right-radius: 0.2em; border-top-right-radius: 0.2em; } .block-content.no-padding .block-controls:last-child { -moz-border-radius-bottomleft: 0.2em; -moz-border-radius-bottomright: 0.2em; -webkit-border-bottom-left-radius: 0.2em; -webkit-border-bottom-right-radius: 0.2em; border-bottom-left-radius: 0.2em; border-bottom-right-radius: 0.2em; } /****************** Messages ********************/ .message { font-size: 1.167em; line-height: 1.214em; -moz-border-radius: 0.286em; -webkit-border-radius: 0.286em; -webkit-background-clip: padding-box; border-radius: 0.286em; } ul.message { padding: 0.5em 0 0.071m 0; } ul.message li { font-size: 0.857em; line-height: 1.083m; padding: 0.167em 0.833em 0.667em 2.5em; background-position: 0.667em 0.083em; } p.message { padding: 0.643em 0.714em 0.643em 2.143em; background-position: 0.571em 0.571em; } section .message { margin-bottom: 1.429em; } .block-content .message.no-margin { margin: 0 -1.429em 1.429em -1.429em; } .block-content.no-title .message.no-margin:first-child { margin-top: -1.429em; } .block-content .message.no-margin:last-child { margin-bottom: -1.429em; } section .block-controls + .message.no-margin, section .block-header + .message.no-margin, section .message.no-margin + .message.no-margin { margin-top: -1.429em; }
0a1b2c3d4e5
trunk/leilao/include/css/mobile.css
CSS
asf20
13,749
/** * Gallery styles */ .gallery.with-padding { padding: 2em 1em; } .gallery li { width: 9em; height: 6em; line-height: 6em; float: left; text-align: center; vertical-align: middle; color: #999999; } .gallery li img { border: 1px solid white; background: #efefef; background: rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); vertical-align: middle; margin-top: -4px; -moz-transition: all 250ms; -webkit-transition: all 250ms; -o-transition: all 250ms; transition: all 250ms; } .gallery li a:hover img { padding: 4px; -moz-border-radius: 5px; -webkit-border-radius: 5px; -webkit-background-clip: padding-box; border-radius: 5px; margin: -8px -5px -4px; -moz-transition: all 100ms; -webkit-transition: all 100ms; -o-transition: all 100ms; transition: all 100ms; } .gallery-preview { position: relative; z-index: 89; min-height: 92px; padding: 2em; text-align: center; } .gallery-preview img { border: 1px solid white; background: #efefef; background: rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); vertical-align: middle; margin-top: -4px; -moz-transition: all 250ms; -webkit-transition: all 250ms; -o-transition: all 250ms; transition: all 250ms; } .gallery-preview a:hover img { padding: 4px; -moz-border-radius: 5px; -webkit-border-radius: 5px; -webkit-background-clip: padding-box; border-radius: 5px; margin: -8px -5px -4px; -moz-transition: all 100ms; -webkit-transition: all 100ms; -o-transition: all 100ms; transition: all 100ms; } .gallery-preview .prev, .gallery-preview .next { display: block; position: absolute; z-index: 89; width: 35px; height: 92px; line-height: 92px; top: 50%; margin-top: -46px; } .gallery-preview .prev img, .gallery-preview .next img { border: 0; margin: 0; background: none; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } /* IE class */ .ie7 .gallery-preview .prev img, .ie7 .gallery-preview .next img { margin-top: 40px; } .gallery-preview .prev:hover img, .gallery-preview .next:hover img { border: 0; margin: 0; padding: 0; } /* IE class */ .ie7 .gallery-preview .prev:hover img, .ie7 .gallery-preview .next:hover img { margin-top: 40px; } .gallery-preview .prev { left: 0; background: url(../images/gallery-bt-prev.png) no-repeat 100px 0; } .gallery-preview .prev:hover { background-position: 0 0; } .gallery-preview .next { right: 0; background: url(../images/gallery-bt-next.png) no-repeat 100px 0; } .gallery-preview .next:hover { background-position: 0 0; } /* http://perishablepress.com/press/2008/02/05/lessons-learned-concerning-the-clearfix-css-hack */ .gallery:after { clear: both; content: ' '; display: block; font-size: 0; line-height: 0; visibility: hidden; width: 0; height: 0; } .gallery { display: inline-block; } * html .gallery { height: 1%; } .gallery { display: block; }
0a1b2c3d4e5
trunk/leilao/include/css/gallery.css
CSS
asf20
3,425
/** * Styles for the calendars */ .mini-calendar, .medium-calendar { padding-top: 1em; position: relative; z-index: 89; text-align: center; } .mini-calendar { float: left; } .next-to-mini-calendar { margin-left: 14em; } .mini-calendar.float-right { float: right; } .mini-calendar.float-right + .next-to-mini-calendar { margin-left: 0; margin-right: 14em; } .calendar-controls { position: absolute; z-index: 89; top: 0; left: 50%; width: 9em; margin-left: -5.083em; text-align: center; line-height: 1.333em; padding: 0.25em 0.5em; border: 1px solid white; -moz-border-radius: 0.417em; -webkit-border-radius: 0.417em; -webkit-background-clip: padding-box; border-radius: 0.417em; -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); color: #3399cc; background: #dfdfdf url(../images/old-browsers-bg/button-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #f6f6f6, #dfdfdf ); background: -webkit-gradient( linear, left top, left bottom, from(#f6f6f6), to(#dfdfdf) ); } /* IE class */ .ie .calendar-controls { border-color: #cccccc; } .calendar-controls .calendar-prev, .calendar-controls .calendar-next { display: block; height: 1.333em; line-height: 1.333em; width: 1.333em; padding: 0.25em; text-align: center; background-size: 2px 100%; -moz-background-size: 2px 100%; -webkit-background-size: 2px 100%; margin: -0.25em 0 -0.333em; } .calendar-controls .calendar-prev { float: left; background: url(../images/menu-border.png) no-repeat right center; margin-left: -0.5em; } .calendar-controls .calendar-next { float: right; background: url(../images/menu-border.png) no-repeat left center; margin-right: -0.5em; } .calendar-controls .calendar-prev img, .calendar-controls .calendar-next img { vertical-align: -15%; } .calendar-controls .calendar-prev img { margin-left: -2px; } .calendar-controls .calendar-next img { margin-right: -2px; } .mini-calendar table, .medium-calendar table { border: 1px solid #cccccc; border-collapse: separate; } .medium-calendar table { width: 100%; } .mini-calendar thead th, .mini-calendar thead td, .medium-calendar thead th, .medium-calendar thead td { height: 3em; padding-bottom: 0.25em; text-align: center; vertical-align: bottom; font-weight: normal; color: #808080; background: #cccccc url(../images/old-browsers-bg/mini-calendar-head-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, white, #e7e7e7 80%, #cccccc ); background: -webkit-gradient( linear, left top, left bottom, from(white), to(#cccccc), color-stop(0.8, #e7e7e7) ); -moz-text-shadow: 1px 1px 0 white; -webkit-text-shadow: 1px 1px 0 white; text-shadow: 1px 1px 0 white; border-bottom: 1px solid #cccccc; } .medium-calendar thead th, .medium-calendar thead td { padding-bottom: 0.333em; border-right: 1px solid #cccccc; } .medium-calendar thead th.week-end, .medium-calendar thead td.week-end { color: #b0b0b0; } .mini-calendar thead th:last-child, .mini-calendar thead td:last-child, .medium-calendar thead th:last-child, .medium-calendar thead td:last-child { border-right: 0; } /* IE class */ .mini-calendar thead th.last-child, .mini-calendar thead td.last-child, .medium-calendar thead th.last-child, .medium-calendar thead td.last-child { border-right: 0; } .mini-calendar tbody th, .mini-calendar tbody td, .medium-calendar tbody th, .medium-calendar tbody td { background: white; text-align: center; vertical-align: middle; color: #333333; } .mini-calendar tbody th, .mini-calendar tbody td { font-size: 0.833em; font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Sans", Arial, Helvetica, sans-serif; width: 2.1em; height: 2.2em; } .medium-calendar tbody th, .medium-calendar tbody td { width: 14.3%; height: 3.25em; font-weight: bold; border-right: 1px solid #cccccc; border-bottom: 1px solid #cccccc; border-top: 1px solid white; border-left: 1px solid white; } .medium-calendar tbody tr:nth-child(odd) th, .medium-calendar tbody tr:nth-child(odd) td { background: #f2f2f2; } /* IE class */ .medium-calendar tbody tr.odd th, .medium-calendar tbody tr.odd td { background: #f2f2f2; } .medium-calendar tbody tr:nth-child(even) th, .medium-calendar tbody tr:nth-child(even) td { background: #e6e6e6; } /* IE class */ .medium-calendar tbody tr.even th, .medium-calendar tbody tr.even td { background: #e6e6e6; } .mini-calendar tbody th:last-child, .mini-calendar tbody td:last-child, .medium-calendar tbody th:last-child, .medium-calendar tbody td:last-child { border-right: 0; } /* IE class */ .mini-calendar tbody th.last-child, .mini-calendar tbody td.last-child, .medium-calendar tbody th.last-child, .medium-calendar tbody td.last-child { border-right: 0; } .mini-calendar tbody tr:last-child th, .mini-calendar tbody tr:last-child td, .medium-calendar tbody tr:last-child th, .medium-calendar tbody tr:last-child td { border-bottom: 0; } /* IE class */ .mini-calendar tbody tr.last-child th, .mini-calendar tbody tr.last-child td, .medium-calendar tbody tr.last-child th, .medium-calendar tbody tr.last-child td { border-bottom: 0; } .mini-calendar tbody a, .mini-calendar tbody div, .medium-calendar tbody a, .medium-calendar tbody div { display: block; position: relative; z-index: 89; height: 100%; } .mini-calendar tbody a, .medium-calendar tbody a { color: #333333; } .mini-calendar tbody a, .mini-calendar tbody div { line-height: 2.22em; } .medium-calendar tbody a, .medium-calendar tbody div { line-height: 3.25em; } .mini-calendar tbody .week-end, .mini-calendar tbody .week-end a, .medium-calendar tbody .week-end, .medium-calendar tbody .week-end a { color: #808080; } .mini-calendar tbody .other-month, .mini-calendar tbody .other-month a, .medium-calendar tbody .other-month, .medium-calendar tbody .other-month a { color: #CCCCCC; font-weight: normal; } .mini-calendar tbody .today, .mini-calendar tbody .today a, .medium-calendar tbody .today, .medium-calendar tbody .today a { color: #3399cc; font-weight: bold; } .mini-calendar tbody span.today, .medium-calendar tbody span.today { background: #3399cc; color: white; padding: 0.25em 0.5em; -moz-border-radius: 0.417em; -webkit-border-radius: 0.417em; -webkit-background-clip: padding-box; border-radius: 0.417em; } .mini-calendar tbody a:hover span.today, .medium-calendar tbody a:hover span.today { background: white; color: #3399cc; -moz-text-shadow: none; -webkit-text-shadow: none; text-shadow: none; -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); } /* Date picker integration - Thanks to sbkyle! */ .mini-calendar tbody a:hover, .mini-calendar tbody a.selected { background: #72c6e4 url(../images/old-browsers-bg/mini-cal-bg.png) repeat-x top; background: -moz-linear-gradient( top, #0c5fa5, #72c6e4 ); background: -webkit-gradient( linear, left top, left bottom, from(#0c5fa5), to(#72c6e4) ); -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5); -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5); } .mini-calendar tbody a.selected { color:#FFF; font-weight:bold; } .datepick-month-year { font-size:.8em !important; padding:0 !important; } .datepick { width:auto !important } .datepick-popup { z-index:100; } .mini-calendar tbody th.unavailable, .mini-calendar tbody td.unavailable, .medium-calendar tbody th.unavailable, .medium-calendar tbody td.unavailable { background: white url(../images/lite-grey-stripes.png); color: #b0b0b0; -moz-text-shadow: 1px 1px 0 white; -webkit-text-shadow: 1px 1px 0 white; text-shadow: 1px 1px 0 white; } .medium-calendar tbody tr:nth-child(odd) th.unavailable, .medium-calendar tbody tr:nth-child(odd) td.unavailable { background: #f2f2f2 url(../images/medium-grey-stripes.png); } /* IE class */ .medium-calendar tbody tr.odd th.unavailable, .medium-calendar tbody tr.odd td.unavailable { background: #f2f2f2 url(../images/medium-grey-stripes.png); } .medium-calendar tbody tr:nth-child(even) th.unavailable, .medium-calendar tbody tr:nth-child(even) td.unavailable { background: #e6e6e6 url(../images/grey-stripes.png); color: #a0a0a0; } /* IE class */ .medium-calendar tbody tr.even th.unavailable, .medium-calendar tbody tr.even td.unavailable { background: #e6e6e6 url(../images/grey-stripes.png); color: #a0a0a0; } .blue-corner { display: block; background: url(../images/blue-corner.png) no-repeat left bottom; height: 100%; } .other-month .blue-corner { background-image: url(../images/grey-corner-left.png); } .red-corner { display: block; background: url(../images/red-corner.png) no-repeat right bottom; height: 100%; } .other-month .red-corner { background-image: url(../images/grey-corner-right.png); } .nb-events { position: absolute; right: -3px; top: -3px; height: 1.333em; text-align: center; font-size: 0.75em; line-height: 1.111em; padding: 0 0.333em; font-weight: normal; border: 1px solid white; background: #0c5fa5 url(../images/old-browsers-bg/nb-events-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #72c6e4, #0c5fa5 ); background: -webkit-gradient( linear, left top, left bottom, from(72c6e4), to(#0c5fa5) ); -moz-border-radius: 0.667em; -webkit-border-radius: 0.667em; -webkit-background-clip: padding-box; border-radius: 0.667em; color: white; -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); } .mini-calendar tbody td:hover .nb-events, .medium-calendar tbody td:hover .nb-events { right: -2px; top: -2px; } .other-month .nb-events { background: #dfdfdf url(../images/old-browsers-bg/nb-events-other-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #f6f6f6, #dfdfdf ); background: -webkit-gradient( linear, left top, left bottom, from(#f6f6f6), to(#dfdfdf) ); color: #999999; } .calendar, .list-calendar { margin-bottom: 1.667em; border: 1px solid #999999; width: 100%; border-collapse: separate; } .calendar:last-child, .list-calendar:last-child { margin-bottom: 0; } /* IE class */ .calendar.last-child, .list-calendar.last-child { margin-bottom: 0; } .content-columns .calendar, .content-columns .list-calendar { margin-bottom: 0; border: none; border-top: 1px solid #999999; } .no-margin .calendar, .no-margin .list-calendar { border: none; } .calendar thead th, .calendar thead td, .list-calendar thead th, .list-calendar thead td { background: #a4a4a4 url(../images/old-browsers-bg/planning-header-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #cccccc, #a4a4a4 ); background: -webkit-gradient( linear, left top, left bottom, from(#cccccc), to(#a4a4a4) ); color: white; -moz-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); -webkit-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); border-top: 1px solid white; border-left: 1px solid #dddddd; border-right: 1px solid #999999; border-bottom: 1px solid #828282; vertical-align: middle; text-align: center; padding: 0.75em; } .calendar .black-cell, .list-calendar .black-cell { background: #242424 url(../images/old-browsers-bg/black-cell-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #4c4c4c, #242424 ); background: -webkit-gradient( linear, left top, left bottom, from(#4c4c4c), to(#242424) ); border-top-color: #7f7f7f; border-left: none; border-right-color: #191919; min-width: 16px; } .calendar .black-cell span, .list-calendar .black-cell span { display: block; height: 2.5em; background-repeat: no-repeat; background-position: center; margin: -0.75em; } .calendar .black-cell span.loading, .list-calendar .black-cell span.loading { background-image: url(../images/table-loader.gif); } .calendar .black-cell span.error, .list-calendar .black-cell span.error { background-image: url(../images/icons/fugue/cross-circle.png); } .calendar .black-cell span.success, .list-calendar .black-cell span.success { background-image: url(../images/icons/fugue/tick-circle-blue.png); } .calendar tbody th, .calendar tbody td, .list-calendar tbody th, .list-calendar tbody td { background: white; text-align: center; border-right: 1px solid #cccccc; border-bottom: 1px solid #cccccc; border-top: 1px solid white; border-left: 1px solid white; color: #333333; text-align: left; vertical-align: top; padding: 0.5em; } .calendar tbody th, .calendar tbody td { width: 14%; height: 8.25em; } .calendar tbody tr.empty th, .calendar tbody tr.empty td, .list-calendar tbody tr.empty th, .list-calendar tbody tr.empty td { color: #999999; } .calendar tbody th:first-child { width: 2em; vertical-align: middle; text-align: center; padding: 0; } .list-calendar tbody th:first-child { font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Sans", Arial, Helvetica, sans-serif; font-size: 2.5em; line-height: 1.2em; width: 1.5em; text-align: center; padding: 0.2em; color: #3399cc; } .list-calendar tbody tr.empty th:first-child { color: #999999; font-style: normal; } .calendar tbody tr:nth-child(odd) th, .calendar tbody tr:nth-child(odd) td, .list-calendar tbody tr:nth-child(odd) th, .list-calendar tbody tr:nth-child(odd) td { background: #f2f2f2; } /* IE class */ .calendar tbody tr.odd th, .calendar tbody tr.odd td, .list-calendar tbody tr.odd th, .list-calendar tbody tr.odd td { background: #f2f2f2; } .calendar tbody tr:nth-child(odd) th:first-child, .list-calendar tbody tr:nth-child(odd) th:first-child { background: #d9d9d9; border-bottom-color: #c2c2c2; } /* IE class */ .calendar tbody tr.odd th:first-child, .list-calendar tbody tr.odd th:first-child { background: #d9d9d9; border-bottom-color: #c2c2c2; } .calendar tbody tr:nth-child(odd) th:first-child { color: #b4b4b4; } /* IE class */ .calendar tbody tr.odd th:first-child { color: #b4b4b4; } .calendar tbody tr:nth-child(even) th, .calendar tbody tr:nth-child(even) td, .list-calendar tbody tr:nth-child(even) th, .list-calendar tbody tr:nth-child(even) td { background: #e6e6e6; } /* IE class */ .calendar tbody tr.even th, .calendar tbody tr.even td, .list-calendar tbody tr.even th, .list-calendar tbody tr.even td { background: #e6e6e6; } .calendar tbody tr:nth-child(even) th:first-child { background: #cccccc; color: #808080; border-bottom-color: #bbbbbb; } /* IE class */ .calendar tbody tr.even th:first-child { background: #cccccc; color: #808080; border-bottom-color: #bbbbbb; } .list-calendar tbody tr th:hover, .list-calendar tbody tr td:hover { background-color: #dbe8f0; } .list-calendar tbody tr th.other-month:hover, .list-calendar tbody tr td.other-month:hover { background-color: #e9e9e9; } .calendar tbody th:last-child, .calendar tbody td:last-child, .list-calendar tbody th:last-child, .list-calendar tbody td:last-child { border-right: 0; } /* IE class */ .calendar tbody th.last-child, .calendar tbody td.last-child, .list-calendar tbody th.last-child, .list-calendar tbody td.last-child { border-right: 0; } .calendar tbody tr:last-child th, .calendar tbody tr:last-child td, .list-calendar tbody tr:last-child th, .list-calendar tbody tr:last-child td { border-bottom: 0; } /* IE class */ .calendar tbody tr.last-child th, .calendar tbody tr.last-child td, .list-calendar tbody tr.last-child th, .list-calendar tbody tr.last-child td { border-bottom: 0; } .calendar tbody .week-end, .calendar tbody .week-end a, .list-calendar tbody .week-end, .list-calendar tbody .week-end a { color: #808080; } .calendar tbody .other-month, .calendar tbody .other-month a, .list-calendar tbody .other-month, .list-calendar tbody .other-month a { color: #CCCCCC; } .calendar .day { display: block; float: left; font-size: 1.5em; line-height: 1.222em; font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Sans", Arial, Helvetica, sans-serif; font-weight: bold; color: #333333; } .calendar .other-month .day { color: #CCCCCC; } .calendar .add-event { display: block; opacity: 0; filter: alpha(opacity=0); float: left; font-size: 0.75em; line-height: 1em; height: 1em; margin: 0.556em -1.444em 0 0.556em; text-transform: uppercase; padding: 0 0.333em 0.222em; border: 1px solid white; -moz-border-radius: 0.333em; -webkit-border-radius: 0.333em; -webkit-background-clip: padding-box; border-radius: 0.333em; -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); color: #666666; background: #dfdfdf url(../images/old-browsers-bg/button-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #f6f6f6, #dfdfdf ); background: -webkit-gradient( linear, left top, left bottom, from(#f6f6f6), to(#dfdfdf) ); overflow: hidden; width: 0.778em; white-space: nowrap; -moz-transition: all 250ms; -webkit-transition: all 250ms; -o-transition: all 250ms; transition: all 250ms; } /* IE class */ .ie .calendar .add-event { margin-top: 0.444em; } /* IE class */ .ie7 .calendar .add-event { margin-top: 0.333em; } .calendar .add-event:before { content: url(../images/icons/add-mini.png); padding-right: 0.333em; } /* IE class */ .calendar .add-event .before { background: url(../images/icons/add-mini.png) no-repeat; width: 7px; height: 7px; padding: 0; vertical-align: middle; margin: 0 0.333em -1px 0; display: inline-block; } .calendar th:hover .add-event, .calendar td:hover .add-event { opacity: 1; filter: none; } .calendar .add-event:hover { width: 3.667em; margin-right: -4.333em; } .calendar tbody .today, .calendar tbody .today a, .calendar tbody .today span { color: #3399cc; font-weight: bold; } .calendar tbody span.today { background: #3399cc; color: white; padding: 0.25em 0.5em; -moz-border-radius: 0.417em; -webkit-border-radius: 0.417em; -webkit-background-clip: padding-box; border-radius: 0.417em; } .calendar tbody a:hover span.today { background: white; color: #3399cc; } .calendar tbody td .mini-menu, .list-calendar tbody td .mini-menu { margin: -1.583em 0.5em -0.583em 0; } .calendar tbody .unavailable { background: white url(../images/lite-grey-stripes.png); color: #b0b0b0; -moz-text-shadow: 1px 1px 0 white; -webkit-text-shadow: 1px 1px 0 white; text-shadow: 1px 1px 0 white; } .calendar tbody .unavailable .day { color: #b0b0b0; } .calendar tbody tr:nth-child(odd) .unavailable { background: #f2f2f2 url(../images/medium-grey-stripes.png); } /* IE class */ .calendar tbody tr.odd .unavailable { background: #f2f2f2 url(../images/medium-grey-stripes.png); } .calendar tbody tr:nth-child(even) .unavailable { background: #e6e6e6 url(../images/grey-stripes.png); color: #a0a0a0; } /* IE class */ .calendar tbody tr.even .unavailable { background: #e6e6e6 url(../images/grey-stripes.png); color: #a0a0a0; } /* Hover effect */ .medium-calendar tbody td:hover, .calendar tbody td:hover { border: 0; } .medium-calendar tbody td:hover a, .medium-calendar tbody td:hover div { padding: 1px; } .medium-calendar tbody td:last-child:hover a, .medium-calendar tbody td:last-child:hover div { padding-right: 0; } /* IE class */ .medium-calendar tbody td.last-child:hover a, .medium-calendar tbody td.last-child:hover div { padding-right: 0; } .medium-calendar tbody tr:last-child td:hover a, .medium-calendar tbody tr:last-child td:hover div { padding-bottom: 0; } /* IE class */ .medium-calendar tbody tr.last-child td:hover a, .medium-calendar tbody tr.last-child td:hover div { padding-bottom: 0; } .calendar tbody td:hover { padding: 0.583em; } .calendar tbody td:last-child:hover { padding-right: 0.5em; } /* IE class */ .calendar tbody td.last-child:hover { padding-right: 0.5em; } .calendar tbody tr:last-child td:hover { padding-bottom: 0.5em; } /* IE class */ .calendar tbody tr.last-child td:hover { padding-bottom: 0.5em; } .mini-calendar tbody a:hover, .medium-calendar tbody a:hover, .calendar tbody tr td:hover { -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; color: white; } .calendar tbody tr td.unavailable:hover { background-size: auto; -moz-background-size: auto; -webkit-background-size: auto; } .mini-calendar tbody a:hover { background: #72c6e4 url(../images/old-browsers-bg/mini-cal-bg.png) repeat-x top; background: -moz-linear-gradient( top, #0c5fa5, #72c6e4 ); background: -webkit-gradient( linear, left top, left bottom, from(#0c5fa5), to(#72c6e4) ); -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5); -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5); } .medium-calendar tbody a:hover { background: #72c6e4 url(../images/old-browsers-bg/medium-cal-bg.png) repeat-x top; background: -moz-linear-gradient( top, #0c5fa5, #72c6e4 ); background: -webkit-gradient( linear, left top, left bottom, from(#0c5fa5), to(#72c6e4) ); -moz-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.5); -webkit-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.5); box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.5); } .calendar tbody tr td:hover { background: #72c6e4 url(../images/old-browsers-bg/calendar-bg.png) repeat-x top; background: -moz-linear-gradient( top, #0c5fa5, #72c6e4 ); background: -webkit-gradient( linear, left top, left bottom, from(#0c5fa5), to(#72c6e4) ); -moz-box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.5); -webkit-box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.5); box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.5); } .mini-calendar tbody a:hover, .medium-calendar tbody a:hover { -moz-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); -webkit-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); } .calendar tbody td:hover .day { color: white; -moz-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); -webkit-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); } /* Custom styles */ .dot-events { float: right; margin: -0.25em 0.25em 0 0; text-align: right; } .calendar .dot-events { max-width: 40%; } /* IE class */ .ie7 .dot-events { padding-top: 0.083em; } .dot-events li { display: inline-block; width: 0; height: 0; line-height: 0; border: 0.333em solid #3399cc; -moz-border-radius: 0.333em; -webkit-border-radius: 0.333em; -webkit-background-clip: padding-box; border-radius: 0.333em; overflow: hidden; } /* IE class */ .ie7 .dot-events li { float: left; margin: 0.25em 0 0 0.25em; } .calendar tbody td:hover .dot-events li { -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); } .dot-events li.red { border-color: #c73333; } .other-month .dot-events li, .other-month .dot-events li.red { border-color: #b1b1b1; } .dot-events li a { display: block; width: 0; height: 0; line-height: 0; padding: 0.333em; margin: -0.333em; overflow: hidden; text-indent: 2em; } .events { clear: both; line-height: 1.25em; } .calendar .events { margin: 0 -0.333em; font-size: 0.75em; line-height: 1.222em; padding-top: 0.222em; } .calendar .events:last-child { margin-bottom: -0.333em; } /* IE class */ .calendar .events.last-child { margin-bottom: -0.333em; } .events li { padding: 0.167em 0.667em 0.333em 4.25em; color: #333333; } .calendar .events li { padding: 0.111em 0.333em 0.333em 4.222em; } .calendar tbody td:hover .events li { color: white; -moz-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); -webkit-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); } .events li a { display: block; color: #333333; margin: -0.167em -0.667em -0.333em -4.25em; padding: 0.167em 0.667em 0.333em 4.25em; } .calendar .events li a { margin: -0.111em -0.333em -0.333em -4.222em; padding: 0.111em 0.333em 0.333em 4.222em; } .calendar tbody td:hover .events li a { color: white; } .list-calendar .events li a:hover { background: white; -moz-border-radius: 0.333em; -webkit-border-radius: 0.333em; -webkit-background-clip: padding-box; border-radius: 0.333em; } .calendar .events li a:hover { color: #999999; } .calendar tbody td:hover .events li a:hover { color: #bfd8e4; } .events li b { display: block; font-weight: normal; color: #3399cc; float: left; margin-left: -3.833em; width: 3.667em; } .calendar .events li b { margin-left: -4em; } .calendar tbody td:hover .events li b { color: #9cd0ea; } .events li.red b { color: #c73333; } .more-events { position: relative; z-index: 88; background: #7f7f7f; line-height: 1em; padding: 0.333em 0.583em 0.417em; -moz-border-radius: 0.75em; -webkit-border-radius: 0.75em; -webkit-background-clip: padding-box; border-radius: 0.75em; color: white; text-align: center; } .list-calendar .more-events { float: left; } .calendar .more-events { font-size: 0.75em; padding: 0.222em 0.556em 0.444em; -moz-border-radius: 0.666em; -webkit-border-radius: 0.666em; -webkit-background-clip: padding-box; border-radius: 0.666em; } /* IE class */ .ie7 .calendar .more-events { padding-top: 0.333em; } .list-calendar .more-events { margin: 0.25em 0 0.25em 0.333em; } .list-calendar .events + .more-events { margin-top: -1.333em; } .calendar .events + .more-events { margin-top: 0.333em; } .list-calendar .more-events:after { content: ''; padding: 0 8px; background: url(../images/menu-open-arrow.png) no-repeat 3px center; } .calendar tbody td:hover .more-events { background: #404040; -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); } .more-events:hover { background-color: #333333; -moz-border-radius-bottomleft: 0; -moz-border-radius-bottomright: 0; -webkit-border-bottom-left-radius: 0; -webkit-border-bottom-right-radius: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; } .more-events ul { display: none; position: absolute; z-index: 89; top: 100%; left: 0; line-height: 1.25em; min-width: 100%; background: #e6e6e6; border: 1px solid #333333; -moz-border-radius: 0 0.333em 0.333em 0.333em; -webkit-border-radius: 0.333em; -webkit-background-clip: padding-box; -webkit-border-top-left-radius: 0; border-radius: 0 0.333em 0.333em 0.333em; -moz-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5); text-align: left; } .calendar .more-events ul { line-height: 1.667em; } /* IE class */ .ie7 .calendar .more-events ul { margin-top: -1px; } .more-events:hover ul { display: block; } .more-events ul li { padding: 0.25em 0.667em 0.333em 4.25em; color: #333333; white-space: nowrap; } .calendar .more-events ul li { padding: 0.111em 0.667em 0.333em 4.667em; } .more-events ul li a { display: block; color: #333333; margin: -0.25em -0.667em -0.333em -4.25em; padding: 0.25em 0.667em 0.333em 4.25em; white-space: nowrap; } .calendar .more-events ul li a { margin: -0.111em -0.667em -0.333em -4.667em; padding: 0.111em 0.667em 0.333em 4.667em; } .more-events ul li a:hover { background: white; } .more-events ul li:first-child a:hover { -moz-border-radius-topright: 0.333em; -webkit-border-top-right-radius: 0.333em; border-top-right-radius: 0.333em; } .more-events ul li:last-child a:hover { -moz-border-radius: 0 0 0.333em 0.333em; -webkit-border-bottom-left-radius: 0.333em; -webkit-border-bottom-right-radius: 0.333em; border-radius: 0 0 0.333em 0.333em; } .more-events ul li b { display: block; font-weight: normal; color: #3399cc; float: left; margin-left: -3.833em; width: 3.667em; } .calendar .more-events ul li b { margin-left: -4.222em; width: 3.667em; } .more-events ul.red li b { color: #c73333; } .events-dots-list { line-height: 1.25em; } .events-dots-list li { padding: 0.083em 0.5em 0.25em; color: #333333; } .events-dots-list li a { display: block; color: #333333; margin: -0.083em -0.5em -0.25em; padding: 0.083em 0.5em 0.25em; } .events-dots-list li a:hover { background: white; } .events-dots-list li span { display: inline-block; background-color: #3399cc; width: 0; height: 0; padding: 0.333em; margin-right: 0.333em; -moz-border-radius: 0.333em; -webkit-border-radius: 0.333em; -webkit-background-clip: padding-box; border-radius: 0.333em; } /* IE class */ .ie7 .events-dots-list li span { float: left; margin-top: 0.5em; } .events-dots-list li.red span { background-color: #c73333; } .week-calendar { margin-bottom: 1.667em; border: 1px solid #999999; background: #a4a4a4 url(../images/old-browsers-bg/planning-header-bg.png) repeat-x top; -webkit-background-size: 100% 2.5em; -o-background-size: 100% 2.5em; background-size: 100% 2.5em; background: -moz-linear-gradient( top, #cccccc, #a4a4a4 2.5em ), #a4a4a4; background: -webkit-gradient( linear, left top, left bottom, from(#cccccc), to(#a4a4a4) ), #a4a4a4; position: relative; z-index: 89; } .week-calendar:last-child { margin-bottom: 0; } /* IE class */ .week-calendar.last-child { margin-bottom: 0; } .week-calendar.no-margin { border: 0; } .with-head.week-calendar, .content-columns .week-calendar { border: none; } .with-head.week-calendar + .no-margin { margin-top: -1.667em; } .content-columns .week-calendar:first-child { border: none; } /* IE class */ .content-columns .week-calendar.first-child { border: none; } .content-columns .week-calendar { margin-bottom: 0; } .week-calendar > li { position: absolute; z-index: 89; top: 0; height: 100%; width: 13%; } .week-calendar > li.day1 { left: 9%; } .week-calendar > li.day2 { left: 22%; } .week-calendar > li.day3 { left: 35%; } .week-calendar > li.day4 { left: 48%; } .week-calendar > li.day5 { left: 61%; } .week-calendar > li.day6 { left: 74%; } .week-calendar > li.day7 { left: 87%; } .week-calendar > li > ul { border-left: 1px solid #ccc; position: absolute; z-index: 89; top: 2.5em; left: 0; right: 0; bottom: 0; margin-top: 2px; } .week-calendar > li.weekend > ul { background: url(../images/old-browsers-bg/black10.png); background: rgba(0, 0, 0, 0.1); } .week-calendar > li > ul > li { position: absolute; left: 1em; right: 1em; border: 1px solid #ccc; -webkit-border-radius: 0.5em; -webkit-background-clip: padding-box; -moz-border-radius: 0.5em; border-radius: 0.5em; -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); padding: 0.5em; background: #dfdfdf url(../images/old-browsers-bg/event-bg.png) repeat-x top; background: -moz-linear-gradient( top, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 1.5em ), #dfdfdf; background: -webkit-gradient( linear, left top, left bottom, from(rgba(255, 255, 255, 0.75)), to(rgba(255, 255, 255, 0)), color-stop(1.5em, rgba(255, 255, 255, 0)) ), #dfdfdf; } .week-calendar > li > ul > li.blue { background-color: #d9eef7; background: -moz-linear-gradient( top, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 1.5em ), #d9eef7; background: -webkit-gradient( linear, left top, left bottom, from(rgba(255, 255, 255, 0.75)), to(rgba(255, 255, 255, 0)), color-stop(1.5em, rgba(255, 255, 255, 0)) ), #d9eef7; } .week-calendar > li > ul > li.orange { background-color: #f7e7d9; background: -moz-linear-gradient( top, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 1.5em ), #f7e7d9; background: -webkit-gradient( linear, left top, left bottom, from(rgba(255, 255, 255, 0.75)), to(rgba(255, 255, 255, 0)), color-stop(1.5em, rgba(255, 255, 255, 0)) ), #f7e7d9; } .week-calendar > li > ul > li.green { background-color: #e6f7d9; background: -moz-linear-gradient( top, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 1.5em ), #e6f7d9; background: -webkit-gradient( linear, left top, left bottom, from(rgba(255, 255, 255, 0.75)), to(rgba(255, 255, 255, 0)), color-stop(1.5em, rgba(255, 255, 255, 0)) ), #e6f7d9; } .week-calendar > li > ul > li.purple { background-color: #d9d9f7; background: -moz-linear-gradient( top, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 1.5em ), #d9d9f7; background: -webkit-gradient( linear, left top, left bottom, from(rgba(255, 255, 255, 0.75)), to(rgba(255, 255, 255, 0)), color-stop(1.5em, rgba(255, 255, 255, 0)) ), #d9d9f7; } .week-calendar > li > ul > li.half-left { right: 50%; margin-right: 0.5em; } .week-calendar > li > ul > li.half-right { left: 50%; margin-left: 0.5em; } .week-calendar .lunch, .week-calendar .unavailable { left: 0; right: 0; top: 0; bottom: 0; border: 0; -webkit-border-radius: 0; -webkit-background-clip: padding-box; -moz-border-radius: 0; border-radius: 0; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } .week-calendar .lunch { background: url(../images/old-browsers-bg/black05.png); background: rgba(0, 0, 0, 0.05); } .week-calendar .unavailable { background: url(../images/lite-grey-stripes.png); } .week-calendar > li > ul > li .mini-menu { right: 0.75em; } .week-calendar .event-time { display: block; font-size: 0.667em; margin: -0.375em 0 0.25em -0.375em; color: #666; -moz-text-shadow: 1px 1px 0 white; -webkit-text-shadow: 1px 1px 0 white; text-shadow: 1px 1px 0 white; } .week-calendar .day { display: block; font-weight: bold; color: white; -moz-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); -webkit-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); border-top: 1px solid white; border-left: 1px solid #dddddd; border-right: 1px solid #999999; border-bottom: 1px solid #828282; text-align: center; height: 2.5em; line-height: 2.5em; } .week-calendar .dot-events { position: absolute; z-index: 89; top: 0.25em; right: 0.417em; margin: 0; line-height: 1em; } .week-calendar > li.week-cal-hours { position: static; width: auto; } .week-calendar > li.week-cal-hours div { width: 9%; } .week-calendar > li.week-cal-hours > ul { border-left: 0; position: static; margin: 0; } .week-calendar > li.week-cal-hours > ul > li { position: static; background: white url(../images/dots.gif) repeat-x left center; -webkit-background-size: auto; -moz-background-size: auto; -o-background-size: auto; background-size: auto; height: 2.5em; line-height: 2.5em; border: 0; -webkit-border-radius: 0; -webkit-background-clip: padding-box; -moz-border-radius: 0; border-radius: 0; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; padding: 0; } .week-calendar > li.week-cal-hours li > span { width: 9%; background: #F2F2F2; color: #666; text-align: center; display: block; height: 2.5em; line-height: 2.5em; -moz-text-shadow: 1px 1px 0 white; -webkit-text-shadow: 1px 1px 0 white; text-shadow: 1px 1px 0 white; } .week-calendar .from-7-30, .week-calendar .at-7-30 { top: 0; } .week-calendar .from-7-45, .week-calendar .at-7-45 { top: 1.92%; } .week-calendar .from-8, .week-calendar .at-8, .week-calendar .from-8-00, .week-calendar .at-8-00 { top: 3.85%; } .week-calendar .from-8-15, .week-calendar .at-8-15 { top: 5.77%; } .week-calendar .from-8-30, .week-calendar .at-8-30 { top: 7.69%; } .week-calendar .from-8-45, .week-calendar .at-8-45 { top: 9.62%; } .week-calendar .from-9, .week-calendar .at-9, .week-calendar .from-9-00, .week-calendar .at-9-00 { top: 11.54%; } .week-calendar .from-9-15, .week-calendar .at-9-15 { top: 13.46%; } .week-calendar .from-9-30, .week-calendar .at-9-30 { top: 15.38%; } .week-calendar .from-9-45, .week-calendar .at-9-45 { top: 17.31%; } .week-calendar .from-10, .week-calendar .at-10, .week-calendar .from-10-00, .week-calendar .at-10-00 { top: 19.23%; } .week-calendar .from-10-15, .week-calendar .at-10-15 { top: 21.15%; } .week-calendar .from-10-30, .week-calendar .at-10-30 { top: 23.08%; } .week-calendar .from-10-45, .week-calendar .at-10-45 { top: 25%; } .week-calendar .from-11, .week-calendar .at-11, .week-calendar .from-11-00, .week-calendar .at-11-00 { top: 26.92%; } .week-calendar .from-11-15, .week-calendar .at-11-15 { top: 28.85%; } .week-calendar .from-11-30, .week-calendar .at-11-30 { top: 30.77%; } .week-calendar .from-11-45, .week-calendar .at-11-45 { top: 32.69%; } .week-calendar .from-12, .week-calendar .at-12, .week-calendar .from-12-00, .week-calendar .at-12-00 { top: 34.62%; } .week-calendar .from-12-15, .week-calendar .at-12-15 { top: 36.54%; } .week-calendar .from-12-30, .week-calendar .at-12-30 { top: 38.46%; } .week-calendar .from-12-45, .week-calendar .at-12-45 { top: 40.38%; } .week-calendar .from-13, .week-calendar .at-13, .week-calendar .from-13-00, .week-calendar .at-13-00 { top: 42.31%; } .week-calendar .from-13-15, .week-calendar .at-13-15 { top: 44.23%; } .week-calendar .from-13-30, .week-calendar .at-13-30 { top: 46.15%; } .week-calendar .from-13-45, .week-calendar .at-13-45 { top: 48.08%; } .week-calendar .from-14, .week-calendar .at-14, .week-calendar .from-14-00, .week-calendar .at-14-00 { top: 50%; } .week-calendar .from-14-15, .week-calendar .at-14-15 { top: 51.92%; } .week-calendar .from-14-30, .week-calendar .at-14-30 { top: 53.85%; } .week-calendar .from-14-45, .week-calendar .at-14-45 { top: 55.77%; } .week-calendar .from-15, .week-calendar .at-15, .week-calendar .from-15-00, .week-calendar .at-15-00 { top: 57.69%; } .week-calendar .from-15-15, .week-calendar .at-15-15 { top: 59.62%; } .week-calendar .from-15-30, .week-calendar .at-15-30 { top: 61.54%; } .week-calendar .from-15-45, .week-calendar .at-15-45 { top: 63.46%; } .week-calendar .from-16, .week-calendar .at-16, .week-calendar .from-16-00, .week-calendar .at-16-00 { top: 65.38%; } .week-calendar .from-16-15, .week-calendar .at-16-15 { top: 67.31%; } .week-calendar .from-16-30, .week-calendar .at-16-30 { top: 69.23%; } .week-calendar .from-16-45, .week-calendar .at-16-45 { top: 71.15%; } .week-calendar .from-17, .week-calendar .at-17, .week-calendar .from-17-00, .week-calendar .at-17-00 { top: 73.08%; } .week-calendar .from-17-15, .week-calendar .at-17-15 { top: 75%; } .week-calendar .from-17-30, .week-calendar .at-17-30 { top: 76.92%; } .week-calendar .from-17-45, .week-calendar .at-17-45 { top: 78.85%; } .week-calendar .from-18, .week-calendar .at-18, .week-calendar .from-18-00, .week-calendar .at-18-00 { top: 80.77%; } .week-calendar .from-18-15, .week-calendar .at-18-15 { top: 82.69%; } .week-calendar .from-18-30, .week-calendar .at-18-30 { top: 84.62%; } .week-calendar .from-18-45, .week-calendar .at-18-45 { top: 86.54%; } .week-calendar .from-19, .week-calendar .at-19, .week-calendar .from-19-00, .week-calendar .at-19-00 { top: 88.46%; } .week-calendar .from-19-15, .week-calendar .at-19-15 { top: 90.38%; } .week-calendar .from-19-30, .week-calendar .at-19-30 { top: 92.31%; } .week-calendar .from-19-45, .week-calendar .at-19-45 { top: 94.23%; } .week-calendar .from-20, .week-calendar .at-20, .week-calendar .from-20-00, .week-calendar .at-20-00 { top: 96.15%; } .week-calendar .from-20-15, .week-calendar .at-20-15 { top: 98.08%; } .week-calendar .to-7-30 { bottom: 100%; } .week-calendar .to-7-45 { bottom: 98.08%; } .week-calendar .to-8, .week-calendar .to-8-00 { bottom: 96.15%; } .week-calendar .to-8-15 { bottom: 94.23%; } .week-calendar .to-8-30 { bottom: 92.31%; } .week-calendar .to-8-45 { bottom: 90.38%; } .week-calendar .to-9, .week-calendar .to-9-00 { bottom: 88.46%; } .week-calendar .to-9-15 { bottom: 86.54%; } .week-calendar .to-9-30 { bottom: 84.62%; } .week-calendar .to-9-45 { bottom: 82.69%; } .week-calendar .to-10, .week-calendar .to-10-00 { bottom: 80.77%; } .week-calendar .to-10-15 { bottom: 78.85%; } .week-calendar .to-10-30 { bottom: 76.92%; } .week-calendar .to-10-45 { bottom: 75%; } .week-calendar .to-11, .week-calendar .to-11-00 { bottom: 73.08%; } .week-calendar .to-11-15 { bottom: 71.15%; } .week-calendar .to-11-30 { bottom: 69.23%; } .week-calendar .to-11-45 { bottom: 67.31%; } .week-calendar .to-12, .week-calendar .to-12-00 { bottom: 65.38%; } .week-calendar .to-12-15 { bottom: 63.46%; } .week-calendar .to-12-30 { bottom: 61.54%; } .week-calendar .to-12-45 { bottom: 59.62%; } .week-calendar .to-13, .week-calendar .to-13-00 { bottom: 57.69%; } .week-calendar .to-13-15 { bottom: 55.77%; } .week-calendar .to-13-30 { bottom: 53.85%; } .week-calendar .to-13-45 { bottom: 51.92%; } .week-calendar .to-14, .week-calendar .to-14-00 { bottom: 50%; } .week-calendar .to-14-15 { bottom: 48.08%; } .week-calendar .to-14-30 { bottom: 46.15%; } .week-calendar .to-14-45 { bottom: 44.23%; } .week-calendar .to-15, .week-calendar .to-15-00 { bottom: 42.31%; } .week-calendar .to-15-15 { bottom: 40.38%; } .week-calendar .to-15-30 { bottom: 38.46%; } .week-calendar .to-15-45 { bottom: 36.54%; } .week-calendar .to-16, .week-calendar .to-16-00 { bottom: 34.62%; } .week-calendar .to-16-15 { bottom: 32.69%; } .week-calendar .to-16-30 { bottom: 30.77%; } .week-calendar .to-16-45 { bottom: 28.85%; } .week-calendar .to-17, .week-calendar .to-17-00 { bottom: 26.92%; } .week-calendar .to-17-15 { bottom: 25%; } .week-calendar .to-17-30 { bottom: 23.08%; } .week-calendar .to-17-45 { bottom: 21.15%; } .week-calendar .to-18, .week-calendar .to-18-00 { bottom: 19.23%; } .week-calendar .to-18-15 { bottom: 17.31%; } .week-calendar .to-18-30 { bottom: 15.38%; } .week-calendar .to-18-45 { bottom: 13.46%; } .week-calendar .to-19, .week-calendar .to-19-00 { bottom: 11.54%; } .week-calendar .to-19-15 { bottom: 9.62%; } .week-calendar .to-19-30 { bottom: 7.69%; } .week-calendar .to-19-45 { bottom: 5.77%; } .week-calendar .to-20, .week-calendar .to-20-00 { bottom: 3.85%; } .week-calendar .to-20-15 { bottom: 1.92%; }
0a1b2c3d4e5
trunk/leilao/include/css/calendars.css
CSS
asf20
47,836
/* Variable Grid System. Learn more ~ http://www.spry-soft.com/grids/ Based on 960 Grid System - http://960.gs/ Licensed under GPL and MIT. */ /* Containers ----------------------------------------------------------------------------------------------------*/ .container_12 { margin-left: auto; margin-right: auto; width: 960px; } /* Grid >> Global ----------------------------------------------------------------------------------------------------*/ .grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6, .grid_7, .grid_8, .grid_9, .grid_10, .grid_11, .grid_12 { display:inline; float: left; margin-left: 10px; margin-right: 10px; } /* Grid >> Children (Alpha ~ First, Omega ~ Last) ----------------------------------------------------------------------------------------------------*/ .alpha { margin-left: 0; } .omega { margin-right: 0; } /* Grid >> 12 Columns ----------------------------------------------------------------------------------------------------*/ .container_12 .grid_1 { width:60px; } .container_12 .grid_2 { width:140px; } .container_12 .grid_3 { width:220px; } .container_12 .grid_4 { width:300px; } .container_12 .grid_5 { width:380px; } .container_12 .grid_6 { width:460px; } .container_12 .grid_7 { width:540px; } .container_12 .grid_8 { width:620px; } .container_12 .grid_9 { width:700px; } .container_12 .grid_10 { width:780px; } .container_12 .grid_11 { width:860px; } .container_12 .grid_12 { width:940px; } /* Prefix Extra Space >> 12 Columns ----------------------------------------------------------------------------------------------------*/ .container_12 .prefix_1 { padding-left:80px; } .container_12 .prefix_2 { padding-left:160px; } .container_12 .prefix_3 { padding-left:240px; } .container_12 .prefix_4 { padding-left:320px; } .container_12 .prefix_5 { padding-left:400px; } .container_12 .prefix_6 { padding-left:480px; } .container_12 .prefix_7 { padding-left:560px; } .container_12 .prefix_8 { padding-left:640px; } .container_12 .prefix_9 { padding-left:720px; } .container_12 .prefix_10 { padding-left:800px; } .container_12 .prefix_11 { padding-left:880px; } /* Suffix Extra Space >> 12 Columns ----------------------------------------------------------------------------------------------------*/ .container_12 .suffix_1 { padding-right:80px; } .container_12 .suffix_2 { padding-right:160px; } .container_12 .suffix_3 { padding-right:240px; } .container_12 .suffix_4 { padding-right:320px; } .container_12 .suffix_5 { padding-right:400px; } .container_12 .suffix_6 { padding-right:480px; } .container_12 .suffix_7 { padding-right:560px; } .container_12 .suffix_8 { padding-right:640px; } .container_12 .suffix_9 { padding-right:720px; } .container_12 .suffix_10 { padding-right:800px; } .container_12 .suffix_11 { padding-right:880px; } /* Push Space >> 12 Columns ----------------------------------------------------------------------------------------------------*/ .container_12 .push_1 { left:80px; } .container_12 .push_2 { left:160px; } .container_12 .push_3 { left:240px; } .container_12 .push_4 { left:320px; } .container_12 .push_5 { left:400px; } .container_12 .push_6 { left:480px; } .container_12 .push_7 { left:560px; } .container_12 .push_8 { left:640px; } .container_12 .push_9 { left:720px; } .container_12 .push_10 { left:800px; } .container_12 .push_11 { left:880px; } /* Pull Space >> 12 Columns ----------------------------------------------------------------------------------------------------*/ .container_12 .pull_1 { left:-80px; } .container_12 .pull_2 { left:-160px; } .container_12 .pull_3 { left:-240px; } .container_12 .pull_4 { left:-320px; } .container_12 .pull_5 { left:-400px; } .container_12 .pull_6 { left:-480px; } .container_12 .pull_7 { left:-560px; } .container_12 .pull_8 { left:-640px; } .container_12 .pull_9 { left:-720px; } .container_12 .pull_10 { left:-800px; } .container_12 .pull_11 { left:-880px; }
0a1b2c3d4e5
trunk/leilao/include/css/960.gs.css
CSS
asf20
4,334
/** * Simple lists styles */ /****************** Basic list ******************/ .bullet-list li { padding-top: 0.083em; margin-bottom: 0.75em; background: url(../images/icons/fugue/control-000-small.png) no-repeat 0 0.167em; padding-left: 1.5em; line-height: 1.25em; } /**************** Keywords list *****************/ .keywords { font-size: 0.833em; line-height: 2.2em; } .keywords li { display: inline-block; background: #3399cc; -moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; -webkit-background-clip: padding-box; line-height: 1.6em; border-radius: 0.4em; padding: 0.2em 0.5em; font-weight: bold; color: white; text-transform: uppercase; white-space: nowrap; } /* IE class */ .ie7 .keywords li { display: inline; margin-right: 0.3em; } .keywords li.orange-keyword { background-color: #cc9900; } .keywords li.purple-keyword { background-color: #cc0066; } .keywords li.green-keyword { background-color: #009900; } .keywords li a { margin: -0.4em -0.5em; padding: 0.4em 0.5em; color: white; } .keywords li img { margin-bottom: -4px; } /* IE class */ .ie7 .keywords li img { margin-bottom: 0; vertical-align: middle; } .table tbody th .keywords, .table tbody td .keywords { margin: -0.3em -0.2em; } /****************** Tags list *******************/ ul.floating-tags { float: right; width: 10em; margin-bottom: 0; } ul.tags { line-height: 2em; } ul.tags li, ul.floating-tags li { background: #808080; font-size: 0.833em; -moz-border-radius: 0.4em; -webkit-border-radius: 0.4em; -webkit-background-clip: padding-box; border-radius: 0.4em; color: white; text-transform: uppercase; white-space: nowrap; line-height: 1.3em; background-repeat: no-repeat; background-position: 0.2em center; padding: 0.4em 0.5em; } ul.tags li { display: inline-block; } /* IE class */ .ie7 ul.tags li { float: left; margin-right: 0.25em; } /* IE class */ .ie7 ul.tags li.last-child { margin-right: 0; } ul.floating-tags li { margin-bottom: 0.3em; } ul.floating-tags li:last-child { margin-bottom: 0; } /* IE class */ ul.floating-tags li.last-child { margin-bottom: 0; } ul.tags li a, ul.floating-tags li a { color: white; } ul.tags .tag-time, ul.tags .tag-tags, ul.tags .tag-user, ul.floating-tags .tag-time, ul.floating-tags .tag-tags, ul.floating-tags .tag-user { padding-left: 2em; } ul.tags .tag-time, ul.floating-tags .tag-time { background-image: url(../images/icons/fugue/clock.png); } ul.tags .tag-tags, ul.floating-tags .tag-tags { background-image: url(../images/icons/fugue/tags-label.png); } ul.tags .tag-user, ul.floating-tags .tag-user { background-image: url(../images/icons/fugue/user.png); } /*************** Small pagination ***************/ .small-pagination { text-align: center; } ul + .small-pagination { margin-top: -0.667em; } .small-pagination li { font-family: Arial, Helvetica, sans-serif; font-weight: bold; display: inline-block; font-size: 0.75em; height: 1.555em; line-height: 1.555em; padding: 0 0.333em 0 0.222em; min-width: 1em; text-align: center; background: #d0d0d0; color: #666666; -moz-border-radius: 0.778em; -webkit-border-radius: 0.778em; -webkit-background-clip: padding-box; border-radius: 0.778em; } /* IE class */ .ie7 .small-pagination li { display: inline; margin-right: 0.333em; } /* IE class */ .ie7 .small-pagination li.last-child { display: inline; margin-right: 0; } .small-pagination li a { display: block; margin: 0 -0.333em 0 -0.222em; padding: 0 0.333em 0 0.222em; height: 1.555em; min-width: 1em; color: white; background-color: #3399cc; -moz-border-radius: 0.778em; -webkit-border-radius: 0.778em; -webkit-background-clip: padding-box; border-radius: 0.778em; } .small-pagination li.current a, .small-pagination li a:hover { background-color: #7cc5e9; } .small-pagination li.prev, .small-pagination li.next { background: none; vertical-align: middle; } /* IE class */ .ie7 .small-pagination li.prev, .ie7 .small-pagination li.next { vertical-align: auto; } .small-pagination li.prev a, .small-pagination li.next a { margin: -0.111em -0.444em -0.111em -0.333em; padding: 0.111em 0.444em 0.111em 0.333em; width: 1em; overflow: hidden; text-indent: 100em; } .small-pagination li.prev a { background: url(../images/icons/fugue/navigation-180.png) no-repeat center center; } .small-pagination li.prev a:hover { background-image: url(../images/icons/fugue/navigation-180-white.png); } .small-pagination li.next a { background: url(../images/icons/fugue/navigation.png) no-repeat center center; } .small-pagination li.next a:hover { background-image: url(../images/icons/fugue/navigation-000-white.png); } /* IE class */ .ie7 .small-pagination li.prev a, .ie7 .small-pagination li.next a { background-position: 0 0; } /********************* Arbo *********************/ ul.arbo { margin-top: 0.5em; } ul.arbo li { background: url(../images/arbo-points-v.gif) repeat-y 8px 0.667em; padding-left: 20px; line-height: 1.333em; padding-bottom: 0.333em; } ul.arbo li:last-child { background: url(../images/arbo-points-v-end.gif) no-repeat 8px -7px; } /* IE class */ ul.arbo li.last-child, ul.arbo li.first-child.last-child { background: url(../images/arbo-points-v-end.gif) no-repeat 8px -7px; } ul.arbo > li:only-child { background: url(../images/arbo-points-h.gif) no-repeat 8px 0.75em; } /* IE class */ ul.arbo > li.first-child.last-child { background: url(../images/arbo-points-h.gif) no-repeat 8px 0.75em; } ul.arbo li > a, ul.arbo li > span { color: #333; display: block; padding-left: 12px; } /* IE class */ .ie7 ul.arbo li > a, .ie7 ul.arbo li > span { float: left; } .dark-grey-gradient ul.arbo li > a, .dark-grey-gradient ul.arbo li > span { color: white; } ul.arbo li > a:hover span, ul.arbo li > a.current span { background: #999999; color: white; padding: 0.083em 0.25em 0.167em; margin: -0.083em -0.25em -0.167em; -moz-border-radius: 0.25em; -webkit-border-radius: 0.25em; -webkit-background-clip: padding-box; border-radius: 0.25em; } ul.arbo li.closed ul { display: none; } ul.arbo li ul li:first-child { padding-top: 0.5em; background-position: 8px 1.167em; } /* IE class */ ul.arbo li ul li.first-child { padding-top: 0.5em; background-position: 8px 1.167em; } ul.arbo li ul li:only-child { background-position: 8px -1px; } /* IE class */ ul.arbo li ul li.first-child.last-child { background-position: 8px -1px; } ul.arbo li span.toggle { padding: 0; float: left; width: 16px; height: 1.333em; margin: 1px 0 -1px -19px; background: url(../images/icons/toggle-small-sprite.png) no-repeat 0 center; cursor: pointer; } ul.arbo li span.toggle:hover { background-position: -16px center; } ul.arbo li.closed span.toggle { background-position: -32px center; } ul.arbo li.closed span.toggle:hover { background-position: -48px center; } ul.arbo li .loading { padding-left: 32px; color: #999999; background: url(../images/arbo-loader.gif) no-repeat 10px center; } .dark-grey-gradient ul.arbo li .loading, ul.arbo.dark-grey-gradient li .loading { background-image: url(../images/arbo-loader-grey.gif); } ul.arbo li .empty { color: #999999; font-style: italic; } ul.arbo li .document, ul.arbo li .document-access, ul.arbo li .document-binary, ul.arbo li .document-bookmark, ul.arbo li .document-code, ul.arbo li .document-excel, ul.arbo li .document-film, ul.arbo li .document-flash, ul.arbo li .document-illustrator, ul.arbo li .document-image, ul.arbo li .document-music, ul.arbo li .document-office, ul.arbo li .document-pdf, ul.arbo li .document-photoshop, ul.arbo li .document-powerpoint, ul.arbo li .document-text, ul.arbo li .document-web, ul.arbo li .document-word, ul.arbo li .document-zip, ul.arbo li .folder, ul.arbo li .folder-bookmark, ul.arbo li .folder-document, ul.arbo li .folder-music, ul.arbo li .folder-text, ul.arbo li .folder-film, ul.arbo li .folder-image, ul.arbo li .folder-table, ul.arbo li .folder-zipper { padding-left: 20px; background-repeat: no-repeat; } ul.arbo li .document { background-image: url(../images/icons/fugue/document.png); } ul.arbo li .document-access { background-image: url(../images/icons/fugue/document-access.png); } ul.arbo li .document-binary { background-image: url(../images/icons/fugue/document-binary.png); } ul.arbo li .document-bookmark { background-image: url(../images/icons/fugue/document-bookmark.png); } ul.arbo li .document-code { background-image: url(../images/icons/fugue/document-code.png); } ul.arbo li .document-excel { background-image: url(../images/icons/fugue/document-excel.png); } ul.arbo li .document-film { background-image: url(../images/icons/fugue/document-film.png); } ul.arbo li .document-flash { background-image: url(../images/icons/fugue/document-flash-movie.png); } ul.arbo li .document-illustrator { background-image: url(../images/icons/fugue/document-illustrator.png); } ul.arbo li .document-image { background-image: url(../images/icons/fugue/document-image.png); } ul.arbo li .document-music { background-image: url(../images/icons/fugue/document-music.png); } ul.arbo li .document-office { background-image: url(../images/icons/fugue/document-office.png); } ul.arbo li .document-pdf { background-image: url(../images/icons/fugue/document-pdf.png); } ul.arbo li .document-photoshop { background-image: url(../images/icons/fugue/document-photoshop.png); } ul.arbo li .document-powerpoint { background-image: url(../images/icons/fugue/document-powerpoint.png); } ul.arbo li .document-text { background-image: url(../images/icons/fugue/document-text.png); } ul.arbo li .document-web { background-image: url(../images/icons/fugue/document-globe.png); } ul.arbo li .document-word { background-image: url(../images/icons/fugue/document-word.png); } ul.arbo li .document-zip { background-image: url(../images/icons/fugue/document-zipper.png); } ul.arbo li .folder { background-image: url(../images/icons/fugue/folder-open.png); } ul.arbo li.closed .folder { background-image: url(../images/icons/fugue/folder.png); } ul.arbo li .folder-bookmark { background-image: url(../images/icons/fugue/folder-bookmark.png); } ul.arbo li .folder-document { background-image: url(../images/icons/fugue/folder-open-document.png); } ul.arbo li .folder-music { background-image: url(../images/icons/fugue/folder-open-document-music.png); } ul.arbo li .folder-text { background-image: url(../images/icons/fugue/folder-open-document-text.png); } ul.arbo li .folder-film { background-image: url(../images/icons/fugue/folder-open-film.png); } ul.arbo li .folder-image { background-image: url(../images/icons/fugue/folder-open-image.png); } ul.arbo li .folder-table { background-image: url(../images/icons/fugue/folder-open-table.png); } ul.arbo li .folder-zipper { background-image: url(../images/icons/fugue/folder-zipper.png); } ul.arbo.with-title > li { background: none; padding-left: 0; padding-bottom: 1em; font-size: 1.25em; line-height: 1.71em; font-weight: bold; } ul.arbo.with-title > li > a, ul.arbo.with-title > li > span { padding-left: 7px; } /* IE class */ .ie7 ul.arbo.with-title > li > a, .ie7 ul.arbo.with-title > li > span { float: none; } ul.arbo.with-title > li > ul { margin-left: 5px; font-size: 0.8em; font-weight: normal; } ul.arbo.with-title > li > .title-computer, ul.arbo.with-title > li > .title-picture, ul.arbo.with-title > li > .title-print, ul.arbo.with-title > li > .title-user, ul.arbo.with-title > li > .title-search { padding-left: 30px; padding-bottom: 3px; background-repeat: no-repeat; background-position: 0 center; } ul.arbo.with-title > li > .title-computer { background-image: url(../images/icons/web-app/24/Loading.png); } ul.arbo.with-title > li > .title-picture { background-image: url(../images/icons/web-app/24/Picture.png); } ul.arbo.with-title > li > .title-print { background-image: url(../images/icons/web-app/24/Print.png); } ul.arbo.with-title > li > .title-user { background-image: url(../images/icons/web-app/24/Profile.png); } ul.arbo.with-title > li > .title-search { background-image: url(../images/icons/web-app/24/Search.png); } /****************** Icons lists *****************/ .picto-list li { line-height: 1.25em; padding: 0.083em; padding-left: 1.667em; margin-bottom: 0.333em; background: url(../images/icons/fugue/control-000-small.png) no-repeat 0 1px; } .picto-list.with-line-spacing li { margin-bottom: 1em; } .picto-list li:last-child { margin-bottom: 0; } .picto-list.icon-info li, .picto-list li.icon-info { background-image: url(../images/icons/fugue/information-blue.png); } .picto-list.icon-image li, .picto-list li.icon-image { background-image: url(../images/icons/fugue/image.png); } .picto-list.icon-user li, .picto-list li.icon-user { background-image: url(../images/icons/fugue/user.png); } .picto-list.icon-top li, .picto-list li.icon-top { background-image: url(../images/icons/fugue/arrow-curve-090.png); } .red .picto-list.icon-top li, .red .picto-list li.icon-top { background-image: url(../images/icons/fugue/arrow-curve-090-red.png); } .picto-list.icon-tag-small li, .picto-list li.icon-tag-small { background-image: url(../images/icons/fugue/tag-small.png); } .picto-list.icon-doc-small li, .picto-list li.icon-doc-small { background-image: url(../images/icons/fugue/document-small.png); } .picto-list.icon-pin-small li, .picto-list li.icon-pin-small { background-image: url(../images/icons/fugue/pin-small.png); } /****************** Simple list *****************/ .simple-list li { background: #f2f2f2; -moz-border-radius: 0.417em; -webkit-border-radius: 0.417em; -webkit-background-clip: padding-box; border-radius: 0.417em; padding: 0.75em; color: #333333; margin-bottom: 0.25em; } .simple-list li:last-child { margin-bottom: 0; } /* IE class */ .simple-list li.last-child { margin-bottom: 0; } .simple-list li a, .simple-list li span { display: block; margin: -0.75em; padding: 0.75em; color: #333333; background-repeat: no-repeat; background-position: 0.667em center; -moz-border-radius: 0.417em; -webkit-border-radius: 0.417em; -webkit-background-clip: padding-box; border-radius: 0.417em; } .simple-list li a:hover, .simple-list li span:hover { background-color: #e0e0e0; } .simple-list.with-icon li a, .simple-list.with-icon li span, .simple-list .with-icon li a, .simple-list .with-icon li span, .simple-list li.with-icon a, .simple-list li.with-icon span { background-image: url(../images/icons/fugue/control-000-small.png); padding-left: 2.5em; } /*************** Collapsible list ***************/ .collapsible-list > li { padding: 0.75em; color: #333333; -moz-border-radius: 0.417em; -webkit-border-radius: 0.417em; -webkit-background-clip: padding-box; border-radius: 0.417em; margin-bottom: 0.25em; } .collapsible-list.with-bg > li { background: #f2f2f2; } .collapsible-list > li:last-child { margin-bottom: 0; } /* IE class */ .collapsible-list > li.last-child { margin-bottom: 0; } .collapsible-list li a, .collapsible-list li span { display: block; margin: -0.5em; padding: 0.5em; color: #333333; background-repeat: no-repeat; background-position: 0.417em center; } .collapsible-list > li > a, .collapsible-list > li > span { margin: -0.75em; padding: 0.75em; background-position: 0.667em center; } .collapsible-list.with-bg > li > a, .collapsible-list.with-bg > li > span { -moz-border-radius: 0.417em 0.417em 0 0.417em; -webkit-border-radius: 0.417em; -webkit-background-clip: padding-box; -webkit-border-bottom-right-radius: 0; border-radius: 0.417em 0.417em 0 0.417em; } .collapsible-list.with-bg > li.closed > a, .collapsible-list.with-bg > li.closed > span { -moz-border-radius-bottomright: 0.417em; -webkit-border-bottom-right-radius: 0.417em; border-bottom-right-radius: 0.417em; } .collapsible-list li a:hover, .collapsible-list li span:hover { background-color: #e0e0e0; } .collapsible-list li ul { margin: 0.5em -0.5em 0 1em; } .collapsible-list li.closed ul { display: none; } .collapsible-list > li > ul { margin: 0.75em 0 0 0.25em; } .collapsible-list li ul li { padding: 0.5em; color: #333333; } .collapsible-list.with-icon a, .collapsible-list.with-icon span, .collapsible-list .with-icon a, .collapsible-list .with-icon span { background-image: url(../images/icons/fugue/control-000-small.png); padding-left: 2.25em; } .collapsible-list.with-icon > li > a, .collapsible-list.with-icon > li > span, .collapsible-list > li.with-icon > a, .collapsible-list > li.with-icon > span { padding-left: 2.5em; } .collapsible-list li .toggle { float: left; width: 16px; height: 2em; background: url(../images/icons/toggle-sprite.png) no-repeat 0 center; margin: -0.5em 2px -0.5em 0; padding: 0; cursor: pointer; } .collapsible-list li.closed > .toggle { background-position: -32px center; } .collapsible-list li .toggle:hover { background-color: transparent; background-position: -16px center; } .collapsible-list li.closed > .toggle:hover { background-position: -48px center; } .collapsible-list > li > .toggle { height: 2.5em; margin: -0.75em 2px -0.75em 0; } .collapsible-list li .toggle + a, .collapsible-list li .toggle + span { margin-left: 18px; padding-left: 0.25em; -moz-border-radius-topleft: 0 !important; -moz-border-radius-bottomleft: 0 !important; -webkit-border-top-left-radius: 0 !important; -webkit-border-bottom-left-radius: 0 !important; border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; cursor: pointer; } .collapsible-list.with-icon .toggle + a, .collapsible-list.with-icon .toggle + span, .collapsible-list .with-icon .toggle + a, .collapsible-list .with-icon .toggle + span { padding-left: 2em; background-position: 0.25em center; } .with-icon.no-toggle-icon .toggle + a, .with-icon.no-toggle-icon .toggle + span, .with-icon .no-toggle-icon .toggle + a, .with-icon .no-toggle-icon .toggle + span { background-image: none !important; padding-left: 0.25em; } .with-icon.icon-info a, .with-icon.icon-info span, .with-icon .icon-info a, .with-icon .icon-info span { background-image: url(../images/icons/fugue/information-blue.png) !important; } .with-icon.icon-group a, .with-icon.icon-group span, .with-icon .icon-group a, .with-icon .icon-group span { background-image: url(../images/icons/fugue/users.png) !important; } .with-icon.icon-user a, .with-icon.icon-user span, .with-icon .icon-user a, .with-icon .icon-user span { background-image: url(../images/icons/fugue/user.png) !important; } .with-icon.icon-file a, .with-icon.icon-file span, .with-icon .icon-file a, .with-icon .icon-file span { background-image: url(../images/icons/fugue/document.png) !important; } .with-icon.icon-tags a, .with-icon.icon-tags span, .with-icon .icon-tags a, .with-icon .icon-tags span { background-image: url(../images/icons/fugue/tags-label.png) !important; } .with-icon.icon-date a, .with-icon.icon-date span, .with-icon .icon-date a, .with-icon .icon-date span { background-image: url(../images/icons/fugue/calendar-day.png) !important; } /*************** Definitions list ***************/ dl.definition dt { background: url(../images/icons/fugue/control-000-small.png) no-repeat; font-weight: bold; padding-left: 20px; line-height: 1.25em; margin-bottom: 0.167em; } dl.definition dd { padding-left: 20px; color: #666; margin-bottom: 1em; line-height: 1.25em; } dl.definition dd:last-child { margin-bottom: 0; } /* IE class */ dl.definition dd.last-child { margin-bottom: 0; } /**************** Accordion list ****************/ dl.accordion { -moz-border-radius: 0.5em; -webkit-border-radius: 0.5em; -webkit-background-clip: padding-box; border-radius: 0.5em; -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); padding: 1px; } .ie dl.accordion { border: 1px solid #cccccc; } dl.accordion dt { background: #e7e7e7 url(../images/old-browsers-bg/accordion-tab-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #f8f8f8, #e7e7e7 ); background: -webkit-gradient( linear, left top, left bottom, from(#f8f8f8), to(#e7e7e7) ); padding: 0.75em; border: 1px solid #cccccc; color: #3399cc; cursor: pointer; } dl.accordion dt:first-child { -moz-border-radius-topleft: 0.417em; -moz-border-radius-topright: 0.417em; -webkit-border-top-left-radius: 0.417em; -webkit-border-top-right-radius: 0.417em; border-top-left-radius: 0.417em; border-top-right-radius: 0.417em; } dl.accordion dt:last-of-type { -moz-border-radius-bottomleft: 0.417em; -moz-border-radius-bottomright: 0.417em; -webkit-border-bottom-left-radius: 0.417em; -webkit-border-bottom-right-radius: 0.417em; border-bottom-left-radius: 0.417em; border-bottom-right-radius: 0.417em; } dl.accordion dt.opened { -moz-border-radius-bottomleft: 0; -moz-border-radius-bottomright: 0; -webkit-border-bottom-left-radius: 0; -webkit-border-bottom-right-radius: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; } dl.accordion dt .number { display: block; float: left; margin: -0.333em 0.5em -0.333em -0.333em; font-weight: normal; background: #0c5fa5 url(../images/old-browsers-bg/title-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #72c6e4, #0c5fa5 ); background: -webkit-gradient( linear, left top, left bottom, from(#72c6e4), to(#0c5fa5) ); border: 0.083em solid white; -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); } dl.accordion dt:hover { border-color: #3399cc; } dl.accordion dd { background: url(../images/old-browsers-bg/accordion-content-bg.png) repeat-x top; background: -moz-linear-gradient( top, rgba(0,0,0,0.1), rgba(0,0,0,0) ) no-repeat; -moz-background-size: 100% 2.5em; background: -webkit-gradient( linear, 0 0, 0 2.5em, from(rgba(0,0,0,0.1)), to(rgba(0,0,0,0)) ); padding: 1em; color: #666666; }
0a1b2c3d4e5
trunk/leilao/include/css/simple-lists.css
CSS
asf20
24,150
/* Custom styles for the special pages */ html { height: 100%; } .login-bg, .wizard-bg { background: url(../images/bg.png) no-repeat center -200px; min-height: 100%; } .error-bg, .code-page { background: url(../images/old-browsers-bg/login-radial-bg.png) no-repeat center center; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-radial-gradient(center, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0)), #70828f; background: -webkit-gradient(radial, 50% 50%, 10, 50% 50%, 500, from(rgba(255, 255, 255, 0.8)), to(rgba(255, 255, 255, 0))), #70828f; min-height: 100%; } .login-bg section, .wizard-bg section, .error-bg section, .code-page section { position: absolute; z-index: 89; left: 50%; top: 50%; } .login-bg section, .error-bg section { width: 34em; margin-left: -17em; margin-top: -15em; } .login-bg section#message { margin-top: -23.5em; } .error-bg section { -moz-transition: all 200ms; -webkit-transition: all 200ms; -o-transition: all 200ms; transition: all 200ms; } .error-bg section#error-log { z-index: 88; opacity: 0; filter: alpha(opacity=0); } .error-bg.with-log section { margin-top: -19em; } .error-bg.with-log section#error-desc { margin-left: -36em; } .error-bg.with-log section#error-log { margin-left: 2em; opacity: 100; filter: none; } .wizard-bg section { width: 64em; margin-left: -32em; margin-top: -23em; } .login-bg .block-content, .wizard-bg .block-content, .error-bg .block-content { -moz-box-shadow: 0 0 8px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.5); box-shadow: 0 0 8px rgba(0, 0, 0, 0.5); } .login-bg .block-border, .wizard-bg .block-border, .error-bg .block-border { -moz-box-shadow: 0 0 8px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.5); box-shadow: 0 0 8px rgba(0, 0, 0, 0.5); } .login-bg .block-border .block-content, .wizard-bg .block-border .block-content, .error-bg .block-border .block-content { -moz-box-shadow: 0 0 0.8em rgba(255, 255, 255, 0.5); -webkit-box-shadow: 0 0 0.8em rgba(255, 255, 255, 0.5); box-shadow: 0 0 0.8em rgba(255, 255, 255, 0.5); } .error-bg #send-report p { padding-left: 10em; } .error-bg #send-report p .float-left { margin-left: -10em; width: 8em; } /******** Page for code errors : 404... *********/ .code-page { text-align: center; } .code-page h1 { position: absolute; left: 0; right: 0; top: 50%; margin-top: -1em; text-align: center; font-size: 16em; color: #A1A8AB; -moz-text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.35), 1px 1px 1px rgba(255, 255, 255, 0.75); -webkit-text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.35), 1px 1px 1px rgba(255, 255, 255, 0.75); text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.35), 1px 1px 1px rgba(255, 255, 255, 0.75); } .code-page p { position: absolute; left: 0; right: 0; top: 50%; text-align: center; font-size: 3em; font-weight: bold; text-transform: uppercase; -moz-text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.35), 1px 1px 1px rgba(255, 255, 255, 0.75); -webkit-text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.35), 1px 1px 1px rgba(255, 255, 255, 0.75); text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.35), 1px 1px 1px rgba(255, 255, 255, 0.75); } .code-page section { margin-top: 5em; width: 28em; margin-left: -14em; } .code-page section .action-tabs { padding-top: 1em; } .code-page section .action-tabs.on-form { padding-top: 1.75em; } .code-page section form.block-content { padding-left: 0; padding-right: 0; } .code-page section form.block-content #s { width: 15em; } /************* Mobile customization *************/ @media only screen and (max-device-width: 480px) { .login-bg, .wizard-bg { background: #70828f url(../images/bg-mobile.png) no-repeat center -200px; } .login-bg, .error-bg { padding: 1em; } .login-bg section, .wizard-bg section, .error-bg section { position: static; width: auto; margin-top: 0; margin-left: 0; left: auto; top: auto; } .error-bg section#error-log { opacity: 100; filter: none; } .error-bg, .code-page { background: #70828f url(../images/old-browsers-bg/login-radial-bg-mobile.png) no-repeat center center; background: -moz-radial-gradient(center, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0)), #70828f; background: -webkit-gradient(radial, 50% 50%, 10, 50% 50%, 240, from(rgba(255, 255, 255, 0.8)), to(rgba(255, 255, 255, 0))), #70828f; } .error-bg #send-report p { padding: 0; } .error-bg #send-report p .float-left { margin-left: 0; width: auto; } .error-bg #send-report p span.float-left { float: right; width: 40%; } .error-bg #send-report p #sender { width: 50%; } /******** Page for code errors : 404... *********/ .code-page h1 { font-size: 10em; } .code-page p { font-size: 1.75em; } .code-page section { width: auto; top: auto; left: 0; right: 0; bottom: 0; margin: 0; } .code-page section .action-tabs { display: none; } }
0a1b2c3d4e5
trunk/leilao/include/css/special-pages.css
CSS
asf20
5,471
<?php /** * Simple script to combine and compress CSS files, to reduce the number of file request the server has to handle. * For more options/flexibility, see Minify : http://code.google.com/p/minify/ */ // If no file requested if (!isset($_GET['files']) or strlen($_GET['files']) == 0) { header('Status: 404 Not Found'); exit(); } // Cache folder $cachePath = 'cache/'; if (!file_exists($cachePath)) { mkdir($cachePath); } // Tell the browser what kind of data to expect header('Content-type: text/css'); // Enable compression /*if (extension_loaded('zlib')) { ini_set('zlib.output_compression', 'On'); }*/ /** * Add file extension if needed * @var string $file the file name */ function addExtension($file) { if (substr($file, -3) !== '.css') { $file .= '.css'; } return $file; } // Calculate an unique ID of requested files & their change time $files = array_map('addExtension', explode(',', $_GET['files'])); $md5 = ''; foreach ($files as $file) { $filemtime = @filemtime($file); $md5 .= date('YmdHis', $filemtime ? $filemtime : NULL).$file; } $md5 = md5($md5); // If cache exists of this files/time ID if (file_exists($cachePath.$md5)) { readfile($cachePath.$md5); } else { // Load files error_reporting(0); $content = ''; foreach ($files as $file) { $content .= file_get_contents($file); } // Remove comments $content = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $content); // Remove tabs, spaces, newlines, etc... $content = str_replace(array("\r", "\n", "\t", ' ', ' '), '', $content); // Delete cache files older than an hour $oldDate = time()-3600; $cachedFiles = scandir($cachePath); foreach ($cachedFiles as $file) { $filemtime = @filemtime($cachePath.$file); if (strlen($file) == 32 and ($filemtime === false or $filemtime < $oldDate)) { unlink($cachePath.$file); } } // Write cache file file_put_contents($cachePath.$md5, $content); // Output echo $content; }
0a1b2c3d4e5
trunk/leilao/include/css/mini.php
PHP
asf20
2,043
/** * Block lists styles */ /****************** Favorites *******************/ .favorites > li { border-top: 1px dotted #999999; padding: 0 0 0 75px; position: relative; } body.dark .favorites > li { border-top-color: #bbb; } body.dark .white-bg .favorites > li, body.dark .block-content .favorites > li { border-top-color: #999999; } .favorites > li:first-child { border-top: 0; } /* IE class */ .favorites > li.first-child { border-top: 0; } .favorites > li:hover { background: url(../images/old-browsers-bg/favorites-bg.png) repeat-x; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, rgba(0,0,0,0.1), rgba(0,0,0,0) ); background: -webkit-gradient( linear, left top, left bottom, from(rgba(0,0,0,0.1)), to(rgba(0,0,0,0)) ); } .favorites > li > img { position: absolute; margin-top: 1.5em; margin-left: -60px; } .favorites > li > a { display: block; padding: 1.278em 1em; font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Sans", Arial, Helvetica, sans-serif; font-size: 1.5em; min-height: 1.833em; font-weight: bold; line-height: 0.833em; background: url(../images/favorites-border.png) no-repeat left center; color: #39c; } /* IE class */ .ie7 .favorites > li > a { margin-top: -0.667em; } body.dark .favorites > li > a { color: white; } .white-bg .favorites > li > a, .favorites.white-bg > li > a, body.dark .block-content .favorites > li > a, body.dark .white-bg .favorites > li > a, body.dark .favorites.white-bg > li > a { color: #39c; } .favorites > li > a small { font-size: 0.667em; color: #999; font-weight: normal; text-transform: none; } body.dark .favorites > li > a small { color: #344147; } .white-bg .favorites > li > a small, .favorites.white-bg > li > a small, body.dark .block-content .favorites > li > a small, body.dark .white-bg .favorites > li > a small, body.dark .favorites.white-bg > li > a small { color: #999; } /****************** Shortcuts *******************/ .shortcuts-list { padding-top: 0.5em; } .shortcuts-list li { float: left; } .shortcuts-list li a { display: block; width: 7em; padding-top: 63px; color: #808080; text-align: center; position: relative; padding-bottom: 9px; -moz-border-radius: 0.417em; -webkit-border-radius: 0.417em; -webkit-background-clip: padding-box; border-radius: 0.417em; } body.dark .shortcuts-list li a { color: white; } body.dark .block-content .shortcuts-list li a { color: #808080; } .dark-grey-gradient .shortcuts-list li a, .shortcuts-list.dark-grey-gradient li a { color: white; } .shortcuts-list li a:hover { background: #E0E0E0; } body.dark .shortcuts-list li a:hover { background: #404040; } body.dark .block-content .shortcuts-list li a:hover { background: #E0E0E0; } .dark-grey-gradient .shortcuts-list li a:hover, .shortcuts-list.dark-grey-gradient li a:hover { color: white; background: #404040; } .shortcuts-list li a img { position: absolute; top: 9px; left: 50%; margin-left: -24px; } /************* Mobile customization *************/ @media only screen and (max-device-width: 480px) { .shortcuts-list { padding-top: 0; } article > .shortcuts-list { margin-left: -0.5em; margin-right: -0.5em; } article > .shortcuts-list li a { width: 6.5em; } } /****************** Files list ******************/ .files { padding: 1em 0 0 1em; } .files > li { float: left; width: 100px; margin: 0 1em 1em 0; color: #666; padding-top: 74px; text-align: center; } .files > li > a { display: block; padding: 4px 5px 7px; line-height: 1.2em; height: 2.4em; color: #666; word-wrap: break-word; text-overflow: ellipsis; } body.dark .files > li > a { color: white; -moz-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); -webkit-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); } body.dark .block-content .files > li > a { color: #666; -moz-text-shadow: none; -webkit-text-shadow: none; text-shadow: none; } .dark-grey-gradient .files > li > a, .files.dark-grey-gradient > li > a { color: white; -moz-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); -webkit-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); } .files > li > a:hover { color: #333; background: #e0e0e0; -moz-border-radius: 0.333em; -webkit-border-radius: 0.333em; -webkit-background-clip: padding-box; border-radius: 0.333em; } body.dark .files > li > a:hover { color: white; background: #404040; } body.dark .block-content .files > li > a:hover { color: #333; background: #e0e0e0; } .dark-grey-gradient .files > li > a:hover, .files.dark-grey-gradient > li > a:hover { color: white; background: #404040; } .files > li > a > span { display: block; margin: -78px -5px 8px; height: 70px; line-height: 70px; } .files > li > a > span > img { vertical-align: middle; } .files > li > a > span > img.thumb { border: 1px solid white; -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); } .files > li .mini-menu { margin-top: -0.5em; margin-right: -1em; } /***************** Blocks grid ******************/ ul.grid { padding: 0.75em 0 0 0.75em; } /* IE class */ .ie7 ul.grid { padding-bottom: 0.75em; } ul.grid > li { background: #cccccc url(../images/old-browsers-bg/grid-block-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #f5f5f5, #cccccc ); background: -webkit-gradient( linear, left top, left bottom, from(#f5f5f5), to(#cccccc) ); border: 1px solid white; -moz-border-radius: 0.417em; -webkit-border-radius: 0.417em; -webkit-background-clip: padding-box; border-radius: 0.417em; padding: 0.75em; -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); color: #333333; float: left; width: 17em; position: relative; margin: 0 0.75em 0.75em 0; } ul.grid > li .grid-picto { margin: -0.75em 1em -0.75em -0.75em; padding: 0.75em 0.75em 0.75em 3.9em; background-repeat: no-repeat; background-position: 0.75em 0.75em; border-right: 1px solid #b3b3b3; } ul.grid > li .grid-picto.user { background-image: url(../images/icons/web-app/32/Profile.png); } ul.grid > li .grid-picto.computer { background-image: url(../images/icons/web-app/32/Loading.png); } ul.grid > li .grid-picto.chart { background-image: url(../images/icons/web-app/32/Pie-Chart.png); } ul.grid > li .grid-picto.print { background-image: url(../images/icons/web-app/32/Print.png); } ul.grid > li .grid-picto.warning { background-image: url(../images/icons/web-app/32/Warning.png); } ul.grid > li .grid-name { color: #373737; font-weight: bold; font-size: 1.5em; margin-bottom: 0.25em; } ul.grid > li .grid-details { color: #808080; } ul.grid > li .grid-details b { color: #333333; font-weight: normal; } ul.grid > li .grid-actions { position: absolute; top: 0; right: 0; bottom: 0; width: 1.7em; border-left: 1px solid white; background: #b3b3b3 url(../images/old-browsers-bg/grid-block-controls-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #f0f0f0, #b3b3b3 ); background: -webkit-gradient( linear, left top, left bottom, from(#f0f0f0), to(#b3b3b3) ); -moz-border-radius: 0 0.333em 0.333em 0; -webkit-border-top-right-radius: 0.333em; -webkit-border-bottom-right-radius: 0.333em; border-radius: 0 0.333em 0.333em 0; } ul.grid > li .grid-actions li { border-top: 1px solid white; border-bottom: 1px solid #b3b3b3; text-align: center; height: 1.75em; line-height: 1.75em; } ul.grid > li .grid-actions li:first-child { border-top: none; } ul.grid > li .grid-actions li:last-child { border-bottom: none; } /* IE class */ ul.grid > li .grid-actions li.last-child { border-bottom: none; } ul.grid > li .grid-actions li img { margin: 0 -1px -3px 0; } /***************** Blocks lists *****************/ .task, .blocks-list > li, .mini-blocks-list > li { background: #e6e6e6 url(../images/old-browsers-bg/lite-grey-grad-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #f7f7f7, #e6e6e6 ); background: -webkit-gradient( linear, left top, left bottom, from(#f7f7f7), to(#e6e6e6) ); border: 1px solid white; -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); position: relative; z-index: 89; -moz-border-radius: 0.25em; -webkit-border-radius: 0.25em; -webkit-background-clip: padding-box; border-radius: 0.25em; color: #666666; line-height: 1.25em; } .ie .task, .ie .blocks-list > li, .ie .mini-blocks-list > li { border-color: #cccccc; } .task { padding: 1.667em 1.667em 0; margin-bottom: 1.667em; } .task + .task.with-legend { margin-top: 2.5em; } .task .task-description { padding-bottom: 1.667em; } .task .floating-tags { margin: -0.667em -0.667em -0.667em 1.5em; } .task:hover { background: #dbe8f0; } .task-dialog { margin: 0 -1.667em; } .task-dialog > li { border-top: 1px solid #c5c39c; background: #ffffcd url(../images/icons/fugue/balloon-reverse.png) no-repeat 0.667em 0.75em; padding: 0.75em 0.75em 0.75em 2.5em; margin: 0 -1px; color: #565340; position: relative; z-index: 89; } .ie .task-dialog > li { margin: 0; } .task-dialog > li:nth-child(even) { background-color: #f7f7df; } /* IE class */ .task-dialog > li.even { background-color: #f7f7df; } .task-dialog > li:last-child { -moz-border-radius: 0 0 0.167em 0.167em; -webkit-border-bottom-left-radius: 0.167em; -webkit-border-bottom-right-radius: 0.167em; border-radius: 0 0 0.167em 0.167em; } .task-dialog > li.auto-hide { display: none; } :hover > .task-dialog > li.auto-hide { display: block; } .task-dialog > li > strong { color: #353334; } .task-dialog > li > em { color: #b1b197; } .task-dialog .mini-menu { margin-right: -0.5em; } /************* Mobile customization *************/ @media only screen and (max-device-width: 480px) { .task-dialog > li.auto-hide { display: block; } } .blocks-list > li { padding: 1em 0.5em; margin-bottom: 0.5em; } .mini-blocks-list > li { padding: 0.25em 0.5em 0.417em; margin-bottom: 0.5em; } .blocks-list > li a, .mini-blocks-list > li a { color: #666666; } .blocks-list > li img, .mini-blocks-list > li img { margin-bottom: -4px; } .blocks-list > li .tags.float-right, .mini-blocks-list > li .tags.float-right { margin-top: -0.417em; margin-bottom: -0.333em; } .mini-blocks-list > li .tags.float-right { margin-right: -0.417em; } /* IE class */ .ie7 .blocks-list > li .tags.float-right { margin-top: -0.25em; } /* IE class */ .ie7 .mini-blocks-list > li .tags.float-right { margin-top: -0.167em; } /****************** Icon list *******************/ .icon-list { margin: 0 -19px 0.833em -7px; } .icon-list li { float: left; background: url(../images/corner.png) no-repeat right bottom; padding: 7px 26px 21px 61px; width: 5em; height: 2.5em; margin-top: 0.75em; font-size: 1.5em; font-weight: bold; font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Sans", Arial, Helvetica, sans-serif; } .icon-list li a { display: block; margin: -7px -26px -21px -61px; padding: 7px 26px 21px 61px; width: 5em; height: 2.5em; } body.dark .icon-list li a { color: white; } body.dark .block-content .icon-list li a { color: #39c; } .icon-list li a:hover, body.dark .icon-list li a:hover, body.dark .block-content .icon-list li a:hover { color: #33CCFF; } .icon-list li small { font-size: 0.667em; font-weight: normal; text-transform: none; font-family: Verdana, Arial, Helvetica, sans-serif; vertical-align: 20%; } body.dark .icon-list li small { color: #b0b0b0; } body.dark .block-content .icon-list li small { color: #808080; } .icon-list li .icon { display: block; float: left; width: 48px; height: 48px; margin: -3px 0 0 -54px; background-position: center center; background-repeat: no-repeat; } /************* Small files icon list ************/ .small-files-list li { padding: 0.25em 0 0 42px; background: url(../images/icons/finefiles/32/default.png) no-repeat; color: black; min-height: 32px; margin-bottom: 0.25em; line-height: 1.083em; } .small-files-list li:last-child { margin-bottom: 0; } /* IE class */ .small-files-list li.last-child { margin-bottom: 0; } .small-files-list li a { display: block; margin: -0.25em 0 0 -42px; padding: 0.25em 0 0 42px; color: black; } .small-files-list li a:hover { color: #3399cc; } .small-files-list li small { color: #999999; } .small-files-list.icon-html li, .small-files-list li.icon-html { background-image: url(../images/icons/finefiles/32/html.png); } .small-files-list.icon-xml li, .small-files-list li.icon-xml { background-image: url(../images/icons/finefiles/32/xml.png); } .small-files-list.icon-img li, .small-files-list li.icon-img { background-image: url(../images/icons/finefiles/32/other_image.png); } .small-files-list.icon-music li, .small-files-list li.icon-music { background-image: url(../images/icons/finefiles/32/other_music2.png); } .small-files-list.icon-movie li, .small-files-list li.icon-movie { background-image: url(../images/icons/finefiles/32/mpg.png); } .small-files-list.icon-folder li, .small-files-list li.icon-folder { background-image: url(../images/icons/finefiles/32/_Close.png); } .small-files-list.icon-mail li, .small-files-list li.icon-mail { background-image: url(../images/icons/email.png); } .small-files-list.icon-comment li, .small-files-list li.icon-comment { background-image: url(../images/icons/web-app/32/Comment.png); } /*************** Extended infos list ************/ .extended-list > li { border-top: 1px dotted #afafaf; padding: 1.667em; position: relative; z-index: 89; } .extended-list > li:hover { background: url(../images/old-browsers-bg/favorites-bg.png) repeat-y; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, rgba(0,0,0,0.1), rgba(0,0,0,0) ); background: -webkit-gradient( linear, left top, left bottom, from(rgba(0,0,0,0.1)), to(rgba(0,0,0,0)) ); } .extended-list > li:first-child { border-top: 0; } /* IE class */ .extended-list > li.first-child { border-top: 0; } .extended-list > li > a, .extended-list > li > span { font-size: 1.5em; font-weight: bold; font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Sans", Arial, Helvetica, sans-serif; display: block; float: left; padding-left: 54px; white-space: nowrap; min-height: 48px; position: relative; } body.dark .extended-list > li > a, body.dark .extended-list > li > span { color: white; } body.dark .block-content .extended-list > li > a, body.dark .block-content .extended-list > li > span { color: #39c; } .extended-list > li > a:hover, body.dark .extended-list > li > a:hover, body.dark .extended-list > li > span:hover, body.dark .block-content .extended-list > li > a:hover, body.dark .block-content .extended-list > li > span:hover { color: #33CCFF; } .extended-list > li > a small { font-size: 0.667em; font-weight: normal; text-transform: none; font-family: Verdana, Arial, Helvetica, sans-serif; vertical-align: 20%; } body.dark .extended-list > li > a small { color: #b0b0b0; } body.dark .block-content .extended-list > li > a small { color: #808080; } .extended-list > li > a .icon { display: block; top: 0; left: 0; position: absolute; width: 48px; height: 48px; background-position: center center; background-repeat: no-repeat; } .extended-list .extended-options { float: right; } .extended-list .extended-options li { float: left; margin-left: 1.5em; line-height: 1.75em; } body.dark .extended-list .extended-options li { color: white; } body.dark .block-content .extended-list .extended-options li { color: #333; } .extended-list .extended-options li:first-child { margin-left: 0; } /* IE class */ .extended-list .extended-options li.first-child { margin-left: 0; } .icon-user .icon, .icon.icon-user { background-image: url(../images/icons/web-app/48/Profile.png); } .icon-image .icon, .icon.icon-image { background-image: url(../images/icons/web-app/48/Picture.png); } .icon-chart .icon, .icon.icon-chart { background-image: url(../images/icons/web-app/48/Pie-Chart.png); } .icon-printer .icon, .icon.icon-printer { background-image: url(../images/icons/web-app/48/Print.png); } .icon-computer .icon, .icon.icon-computer { background-image: url(../images/icons/web-app/48/Loading.png); } .icon-article .icon, .icon.icon-article { background-image: url(../images/icons/web-app/48/Modify.png); } .icon-comment .icon, .icon.icon-comment { background-image: url(../images/icons/web-app/48/Comment.png); } .icon-warning .icon, .icon.icon-warning { background-image: url(../images/icons/web-app/48/Warning.png); } /* http://perishablepress.com/press/2008/02/05/lessons-learned-concerning-the-clearfix-css-hack */ .shortcuts-list:after, .files:after, .task .task-description:after, .blocks-list > li:after, .mini-blocks-list > li:after, .icon-list:after, .extended-list li:after { clear: both; content: ' '; display: block; font-size: 0; line-height: 0; visibility: hidden; width: 0; height: 0; } .shortcuts-list, .files, .task .task-description, .blocks-list > li, .mini-blocks-list > li, .icon-list, .extended-list li { display: inline-block; } * html .shortcuts-list, * html .files, * html .task .task-description, * html .blocks-list > li, * html .mini-blocks-list > li, * html .icon-list, * html .extended-list li { height: 1%; } .shortcuts-list, .files, .task .task-description, .blocks-list > li, .mini-blocks-list > li, .icon-list, .extended-list li { display: block; }
0a1b2c3d4e5
trunk/leilao/include/css/block-lists.css
CSS
asf20
20,092
/** * Styles for the planning block */ .planning { margin-bottom: 1.667em; border: 1px solid #999999; } .planning:last-child { margin-bottom: 0; } /* IE class */ .planning.last-child { margin-bottom: 0; } .planning.no-margin, .content-columns .planning { border: none; } .content-columns .planning { margin-bottom: 0; } .planning > li { height: 2.5em; line-height: 2.5em; padding-left: 15em; background: #f2f2f2; vertical-align: bottom; /* IE7 list gap fix */ } .planning > li:nth-child(odd) { background: #e6e6e6; } /* IE class */ .planning > li.odd { background: #e6e6e6; } .planning > li.planning-header { background: #a4a4a4 url(../images/old-browsers-bg/planning-header-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #cccccc, #a4a4a4 ); background: -webkit-gradient( linear, left top, left bottom, from(#cccccc), to(#a4a4a4) ); border-top: 1px solid white; border-bottom: 1px solid #828282; color: white; } .planning > li > span, .planning > li > a { display: block; height: 2.5em; line-height: 2.5em; float: left; margin-left: -15em; width: 14em; padding: 0 0.5em; color: #333333; } .planning > li > span { color: #999999; } .planning > li > a:hover { background: #CCCCCC; } .planning > li > span img, .planning > li > a img { margin-bottom: -3px; } .planning > li.planning-header > span { width: 13.5em; padding: 0 0.75em; -moz-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); -webkit-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); color: white; } .planning > li.planning-header > span b { display: block; height: 2.5em; margin: 0 -0.75em; padding: 0 0.75em; border-left: 1px solid #dddddd; border-right: 1px solid #999999; } .planning > li > ul { position: relative; height: 2.5em; border-left: 1px dotted #808080; background: white; } .planning > li:nth-child(odd) > ul { background: #f2f2f2; } /* IE class */ .planning > li.odd > ul { background: #f2f2f2; } .planning > li.planning-header > ul { border-left: 1px solid white; background: none; } .planning > li > ul > li { position: absolute; top: 0.5em; height: 1.5em; -moz-border-radius: 0.167em; -webkit-border-radius: 0.167em; -webkit-background-clip: padding-box; border-radius: 0.167em; background: #e5e5e5 url(../images/old-browsers-bg/planning-bar-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #ffffff, #eeeeee 15%, #c2c2c2 73%, #e5e5e5 ); background: -webkit-gradient( linear, left top, left bottom, from(#ffffff), to(#e5e5e5), color-stop(0.15, #eeeeee), color-stop(0.73, #c2c2c2) ); } .planning > li.planning-header > ul > li { width: 2em; top: auto; height: auto; text-align: center; margin-left: -1em; -moz-text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.25); -webkit-text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.25); text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.25); background: none; } .planning > li.planning-header > ul > li:nth-child(even) { font-size: 0.75em; } /* IE class */ .planning > li.planning-header > ul > li.even { font-size: 0.75em; } .planning > li > ul > li.lunch, .planning > li > ul > li.zebras { -webkit-background-size: auto; -moz-background-size: auto; -o-background-size: auto; background-size: auto; background: #f2f2f2; top: 0; height: 2.5em; -moz-border-radius: 0; -webkit-border-radius: 0; -webkit-background-clip: padding-box; border-radius: 0; } .planning > li:nth-child(odd) > ul > li.lunch { background: #e6e6e6; } /* IE class */ .planning > li.odd > ul > li.lunch { background: #e6e6e6; } .planning > li > ul > li.zebras { border-left: 1px solid #ccc; border-right: 1px solid #ccc; } .planning > li > ul.zebras, .planning > li > ul > li.zebras { background: white url(../images/zebras.png); } .planning > li > ul > li.current-time { background: none; top: 0; height: 2.5em; -moz-border-radius: 0; -webkit-border-radius: 0; -webkit-background-clip: padding-box; border-radius: 0; width: 0; border-left: 1px solid red; } .planning > li > ul > li > a, .planning > li > ul > li > span { display: block; position: absolute; left: 0; right: 0; top: 0; bottom: 0; color: #666666; text-indent: 0.333em; font-family: Arial, Helvetica, sans-serif; font-size: 0.92em; line-height: 1.45em; border: 1px solid #666666; -moz-border-radius: 0.25em; -webkit-border-radius: 0.25em; -webkit-background-clip: padding-box; border-radius: 0.25em; -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); white-space: nowrap; overflow: hidden; } .planning > li > ul > li > a span, .planning > li > ul > li > span span { display: block; position: absolute; left: 0; top: 0; bottom: 0; width: 100%; white-space: nowrap; overflow: hidden; } .planning > li > ul > li.milestone { background: #333; top: 0.75em; height: 0.833em; width: 0.833em; margin-left: -0.5em; border: 0.083em solid; border-color: #999 #000 #000 #999; -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -o-transform: rotate(45deg); transform: rotate(45deg); } .planning > li > ul > li.milestone > a, .planning > li > ul > li.milestone > span { border: 0; } .planning > li > ul .event-blue, .planning > li > ul .event-green, .planning > li > ul .event-orange, .planning > li > ul .event-purple, .planning > li > ul > li.event-blue a, .planning > li > ul > li.event-green a, .planning > li > ul > li.event-orange a, .planning > li > ul > li.event-purple a, .planning > li > ul > li.event-blue span, .planning > li > ul > li.event-green span, .planning > li > ul > li.event-orange span, .planning > li > ul > li.event-purple span { color: white; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; -moz-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); -webkit-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); } .planning > li > ul .event-blue { background: #4398c9 url(../images/old-browsers-bg/planning-bar-blue-bg.png) repeat-x top; background: -moz-linear-gradient( top, #b0cde5, #6ec3e3 15%, #0e62a8 73%, #4398c9 ); background: -webkit-gradient( linear, left top, left bottom, from(#b0cde5), to(#4398c9), color-stop(0.15, #6ec3e3), color-stop(0.73, #0e62a8) ); } .planning > li > ul .event-green { background: #56c943 url(../images/old-browsers-bg/planning-bar-green-bg.png) repeat-x top; background: -moz-linear-gradient( top, #b3e6b1, #8ae46f 15%, #15a80e 73%, #56c943 ); background: -webkit-gradient( linear, left top, left bottom, from(#b3e6b1), to(#56c943), color-stop(0.15, #8ae46f), color-stop(0.73, #15a80e) ); } .planning > li > ul .event-orange { background: #c99c43 url(../images/old-browsers-bg/planning-bar-orange-bg.png) repeat-x top; background: -moz-linear-gradient( top, #e6d4b1, #e4bd6f 15%, #a8750e 73%, #c99c43 ); background: -webkit-gradient( linear, left top, left bottom, from(#e6d4b1), to(#c99c43), color-stop(0.15, #e4bd6f), color-stop(0.73, #a8750e) ); } .planning > li > ul .event-purple { background: #b543c9 url(../images/old-browsers-bg/planning-bar-purple-bg.png) repeat-x top; background: -moz-linear-gradient( top, #e3b1e6, #c86fe4 15%, #a10ea8 73%, #b543c9 ); background: -webkit-gradient( linear, left top, left bottom, from(#e3b1e6), to(#b543c9), color-stop(0.15, #c86fe4), color-stop(0.73, #a10ea8) ); } .planning .from-7-30, .planning .at-7-30 { left: 0; } .planning .from-7-45, .planning .at-7-45 { left: 1.92%; } .planning .from-8, .planning .at-8, .planning .from-8-00, .planning .at-8-00 { left: 3.85%; } .planning .from-8-15, .planning .at-8-15 { left: 5.77%; } .planning .from-8-30, .planning .at-8-30 { left: 7.69%; } .planning .from-8-45, .planning .at-8-45 { left: 9.62%; } .planning .from-9, .planning .at-9, .planning .from-9-00, .planning .at-9-00 { left: 11.54%; } .planning .from-9-15, .planning .at-9-15 { left: 13.46%; } .planning .from-9-30, .planning .at-9-30 { left: 15.38%; } .planning .from-9-45, .planning .at-9-45 { left: 17.31%; } .planning .from-10, .planning .at-10, .planning .from-10-00, .planning .at-10-00 { left: 19.23%; } .planning .from-10-15, .planning .at-10-15 { left: 21.15%; } .planning .from-10-30, .planning .at-10-30 { left: 23.08%; } .planning .from-10-45, .planning .at-10-45 { left: 25%; } .planning .from-11, .planning .at-11, .planning .from-11-00, .planning .at-11-00 { left: 26.92%; } .planning .from-11-15, .planning .at-11-15 { left: 28.85%; } .planning .from-11-30, .planning .at-11-30 { left: 30.77%; } .planning .from-11-45, .planning .at-11-45 { left: 32.69%; } .planning .from-12, .planning .at-12, .planning .from-12-00, .planning .at-12-00 { left: 34.62%; } .planning .from-12-15, .planning .at-12-15 { left: 36.54%; } .planning .from-12-30, .planning .at-12-30 { left: 38.46%; } .planning .from-12-45, .planning .at-12-45 { left: 40.38%; } .planning .from-13, .planning .at-13, .planning .from-13-00, .planning .at-13-00 { left: 42.31%; } .planning .from-13-15, .planning .at-13-15 { left: 44.23%; } .planning .from-13-30, .planning .at-13-30 { left: 46.15%; } .planning .from-13-45, .planning .at-13-45 { left: 48.08%; } .planning .from-14, .planning .at-14, .planning .from-14-00, .planning .at-14-00 { left: 50%; } .planning .from-14-15, .planning .at-14-15 { left: 51.92%; } .planning .from-14-30, .planning .at-14-30 { left: 53.85%; } .planning .from-14-45, .planning .at-14-45 { left: 55.77%; } .planning .from-15, .planning .at-15, .planning .from-15-00, .planning .at-15-00 { left: 57.69%; } .planning .from-15-15, .planning .at-15-15 { left: 59.62%; } .planning .from-15-30, .planning .at-15-30 { left: 61.54%; } .planning .from-15-45, .planning .at-15-45 { left: 63.46%; } .planning .from-16, .planning .at-16, .planning .from-16-00, .planning .at-16-00 { left: 65.38%; } .planning .from-16-15, .planning .at-16-15 { left: 67.31%; } .planning .from-16-30, .planning .at-16-30 { left: 69.23%; } .planning .from-16-45, .planning .at-16-45 { left: 71.15%; } .planning .from-17, .planning .at-17, .planning .from-17-00, .planning .at-17-00 { left: 73.08%; } .planning .from-17-15, .planning .at-17-15 { left: 75%; } .planning .from-17-30, .planning .at-17-30 { left: 76.92%; } .planning .from-17-45, .planning .at-17-45 { left: 78.85%; } .planning .from-18, .planning .at-18, .planning .from-18-00, .planning .at-18-00 { left: 80.77%; } .planning .from-18-15, .planning .at-18-15 { left: 82.69%; } .planning .from-18-30, .planning .at-18-30 { left: 84.62%; } .planning .from-18-45, .planning .at-18-45 { left: 86.54%; } .planning .from-19, .planning .at-19, .planning .from-19-00, .planning .at-19-00 { left: 88.46%; } .planning .from-19-15, .planning .at-19-15 { left: 90.38%; } .planning .from-19-30, .planning .at-19-30 { left: 92.31%; } .planning .from-19-45, .planning .at-19-45 { left: 94.23%; } .planning .from-20, .planning .at-20, .planning .from-20-00, .planning .at-20-00 { left: 96.15%; } .planning .from-20-15, .planning .at-20-15 { left: 98.08%; } .planning .to-7-30 { right: 100%; } .planning .to-7-45 { right: 98.08%; } .planning .to-8, .planning .to-8-00 { right: 96.15%; } .planning .to-8-15 { right: 94.23%; } .planning .to-8-30 { right: 92.31%; } .planning .to-8-45 { right: 90.38%; } .planning .to-9, .planning .to-9-00 { right: 88.46%; } .planning .to-9-15 { right: 86.54%; } .planning .to-9-30 { right: 84.62%; } .planning .to-9-45 { right: 82.69%; } .planning .to-10, .planning .to-10-00 { right: 80.77%; } .planning .to-10-15 { right: 78.85%; } .planning .to-10-30 { right: 76.92%; } .planning .to-10-45 { right: 75%; } .planning .to-11, .planning .to-11-00 { right: 73.08%; } .planning .to-11-15 { right: 71.15%; } .planning .to-11-30 { right: 69.23%; } .planning .to-11-45 { right: 67.31%; } .planning .to-12, .planning .to-12-00 { right: 65.38%; } .planning .to-12-15 { right: 63.46%; } .planning .to-12-30 { right: 61.54%; } .planning .to-12-45 { right: 59.62%; } .planning .to-13, .planning .to-13-00 { right: 57.69%; } .planning .to-13-15 { right: 55.77%; } .planning .to-13-30 { right: 53.85%; } .planning .to-13-45 { right: 51.92%; } .planning .to-14, .planning .to-14-00 { right: 50%; } .planning .to-14-15 { right: 48.08%; } .planning .to-14-30 { right: 46.15%; } .planning .to-14-45 { right: 44.23%; } .planning .to-15, .planning .to-15-00 { right: 42.31%; } .planning .to-15-15 { right: 40.38%; } .planning .to-15-30 { right: 38.46%; } .planning .to-15-45 { right: 36.54%; } .planning .to-16, .planning .to-16-00 { right: 34.62%; } .planning .to-16-15 { right: 32.69%; } .planning .to-16-30 { right: 30.77%; } .planning .to-16-45 { right: 28.85%; } .planning .to-17, .planning .to-17-00 { right: 26.92%; } .planning .to-17-15 { right: 25%; } .planning .to-17-30 { right: 23.08%; } .planning .to-17-45 { right: 21.15%; } .planning .to-18, .planning .to-18-00 { right: 19.23%; } .planning .to-18-15 { right: 17.31%; } .planning .to-18-30 { right: 15.38%; } .planning .to-18-45 { right: 13.46%; } .planning .to-19, .planning .to-19-00 { right: 11.54%; } .planning .to-19-15 { right: 9.62%; } .planning .to-19-30 { right: 7.69%; } .planning .to-19-45 { right: 5.77%; } .planning .to-20, .planning .to-20-00 { right: 3.85%; } .planning .to-20-15 { right: 1.92%; }
0a1b2c3d4e5
trunk/leilao/include/css/planning.css
CSS
asf20
14,678
/** * Styles for the standard template */ html { min-height: 100%; overflow-x: hidden; } body { font-family: Verdana, Arial, Helvetica, sans-serif; background: url(../images/bg.png) no-repeat center top; min-height: 100%; } textarea, input { font-family: Verdana, Arial, Helvetica, sans-serif; } /**************** Generic classes ***************/ h2.bigger, h3.bigger, h2.big, h3.big { font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Sans", Arial, Helvetica, sans-serif; } /******************* Columns ********************/ .columns { margin-bottom: 1.667em; position: relative; } .columns:last-child { margin-bottom: 0; } /** IE class **/ .columns.last-child { margin-bottom: 0; } /* 2 columns */ .colx2-left { width: 48%; float: left; margin-bottom: 0; } .colx2-right { width: 48%; float: right; margin-bottom: 0; } /* 3 columns */ .colx3-left { width: 31%; float: left; margin-bottom: 0; } .colx3-left-double { width: 65.5%; float: left; margin-bottom: 0; } .colx3-center { width: 31%; float: left; margin-left: 3.5%; margin-bottom: 0; } .colx3-right { width: 31%; float: right; margin-bottom: 0; } .colx3-right-double { width: 65.5%; float: right; margin-bottom: 0; } /* 200px fixed-width left column */ .col200pxL-left { width: 200px; float: left; } .col200pxL-bottom { position: absolute; bottom: 0; left: 0; width: 180px; } .col200pxL-right { margin-left: 200px; } /* 200px fixed-width right column */ .col200pxR-left { margin-right: 200px; } .col200pxR-bottom { position: absolute; bottom: 0; right: 0; width: 180px; } .col200pxR-right { width: 200px; float: right; } /************* Button-style images **************/ .button img, .form legend img, .legend img, .mini-menu img { margin-bottom: -4px; } /******************** Header ********************/ header { color: #666666; text-transform: uppercase; position: absolute; z-index: 88; top: 0; left: 0; width: 100%; white-space: nowrap; text-align: right; } header .server-info { display: inline-block; border-top: 0; padding: 0 1em; color: white; background: url(../images/old-browsers-bg/server-status-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, rgba(64,64,64,0.3), rgba(255,255,255,0.2) ); background: -webkit-gradient( linear, left top, left bottom, from(rgba(64,64,64,0.3)), to(rgba(255,255,255,0.2)) ); margin-left: 0.5em; height: 2.6em; line-height: 2.6em; vertical-align: top; font-size: 0.833em; -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.65); -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.65); box-shadow: 0 0 5px rgba(0, 0, 0, 0.65); -moz-border-radius: 0 0 0.4em 0.4em; -webkit-border-radius: 0.4em; -webkit-background-clip: padding-box; -webkit-border-top-left-radius: 0; -webkit-border-top-right-radius: 0; border-radius: 0 0 0.4em 0.4em; } .ie7 header .server-info { display: inline; zoom: 1; } #skin-name { display: inline-block; margin: 0 0.7em 0 0; color: #B0B0B0; color: rgba(255, 255, 255, 0.75); } .ie7 #skin-name { display: inline; zoom: 1; } #skin-name small { float: left; font-size: 0.75em; line-height: 1.111em; text-transform: uppercase; color: #B0B0B0; color: rgba(255, 255, 255, 0.75); padding-top: 0.555em; text-align: right; } #skin-name strong { font-size: 2em; line-height: 1.333em; margin-left: 0.167em; font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Sans", Arial, Helvetica, sans-serif; letter-spacing: -0.09em; } .ie #skin-name strong { padding-right: 0.083em; } nav { height: 69px; padding-top: 1.25em; background: #3399cc url(../images/old-browsers-bg/main-nav-bg.png) repeat-x bottom; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient(top, #014a7d, #3399cc); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#014a7d), to(#3399cc)); -moz-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5); -webkit-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5); box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5); } nav > ul { padding-top: 4px; position: relative; z-index: 100; } nav > ul > li { width: 64px; height: 69px; float: left; background-position: center -54px; background-repeat: no-repeat; } nav > ul > li > a { display: block; height: 69px; background-repeat: no-repeat; background-position: 8px 14px; overflow: hidden; text-indent: 200px; white-space: nowrap; opacity: 0; filter: alpha(opacity=0); -moz-transition: opacity 2s; -webkit-transition: opacity 2s; -o-transition: opacity 2s; transition: opacity 2s; } nav > ul > li.home, nav > ul > li.home > a { background-image: url(../images/icons/home_2states.png); } nav > ul > li.write, nav > ul > li.write > a { background-image: url(../images/icons/write_2states.png); } nav > ul > li.comments, nav > ul > li.comments > a { background-image: url(../images/icons/comments_2states.png); } nav > ul > li.medias, nav > ul > li.medias > a { background-image: url(../images/icons/medias_2states.png); } nav > ul > li.users, nav > ul > li.users > a { background-image: url(../images/icons/users_2states.png); } nav > ul > li.stats, nav > ul > li.stats > a { background-image: url(../images/icons/stats_2states.png); } nav > ul > li.settings, nav > ul > li.settings > a { background-image: url(../images/icons/settings_2states.png); } nav > ul > li.backup, nav > ul > li.backup > a { background-image: url(../images/icons/backup_2states.png); } nav > ul > li.current { padding: 0 8px 13px 8px; margin: 0 -8px -13px -8px; background: url(../images/tab-bg.png) no-repeat; } nav > ul > li.current > a, nav > ul > li > a:hover { opacity: 1; filter: none; -moz-transition: all 100ms; -webkit-transition: all 100ms; -o-transition: all 100ms; transition: all 100ms; } nav > ul > li > ul { position: absolute; left: 0; top: 70px; display: none; padding-top: 0.333em; background: none; } nav > ul > li.current > ul { display: block; } nav > ul > li > ul > li, #sub-nav a.nav-button { display: block; float: left; height: 2.2em; font-size: 0.833em; line-height: 2.2em; padding: 0.1em; width: auto; background: #465a6e url(../images/old-browsers-bg/subnav-bt-border-bg.png) repeat-x; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient(top, #9faab6, #465a6e); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#9faab6), to(#465a6e)); margin-right: 0.5em; -moz-border-radius: 0.417em; -webkit-border-radius: 0.417em; -webkit-background-clip: padding-box; border-radius: 0.417em; color: white; text-transform: uppercase; -moz-box-shadow: 0 0 7px #000000; -webkit-box-shadow: 0 0 7px #000000; box-shadow: 0 0 7px #000000; text-decoration: none; -moz-transition: all 1s; -webkit-transition: all 1s; -o-transition: all 1s; transition: all 1s; } nav > ul > li > ul > li.current { height: 3.1em; line-height: 3.1em; color: #333; padding: 0; -moz-border-radius-bottomleft: 0; -moz-border-radius-bottomright: 0; -webkit-border-bottom-left-radius: 0; -webkit-border-bottom-right-radius: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; background: #dadada url(../images/old-browsers-bg/subnav-current-bt-border-bg.png) repeat-x; background: -moz-linear-gradient( top, white, #dadada 7%, #dadada ); background: -webkit-gradient( linear, left top, left bottom, from(white), to(#dadada), color-stop(0.07, #dadada) ); } nav > ul > li > ul > li > a, #sub-nav a.nav-button > b { display: block; height: 2.2em; line-height: 2.2em; width: auto; padding: 0 1em; color: white; text-indent: 0; text-decoration: none; -moz-border-radius: 0.3em; -webkit-border-radius: 0.3em; -webkit-background-clip: padding-box; border-radius: 0.3em; font-weight: normal; -moz-transition: all 1s; -webkit-transition: all 1s; -o-transition: all 1s; transition: all 1s; } nav > ul > li > ul > li > a, #sub-nav a.nav-button > b, nav > ul > li > ul > li.with-menu .menu, nav > ul > li > ul > li.menu-opener .menu-arrow { background: #1d2a36 url(../images/old-browsers-bg/subnav-bt-bg.png) repeat-x !important; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient(top, #858d95, #46505b 50%, #38424d 50%, #1c2733) !important; background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#858d95), to(#1c2733), color-stop(.5, #46505b), color-stop(.5, #38424d)) !important; } nav > ul > li > ul > li.current > a { background: none !important; height: 2.8em; line-height: 2.8em; color: #333; } nav > ul > li > ul > li:hover, #sub-nav a.nav-button:hover { background: #6dc0e5 url(../images/old-browsers-bg/subnav-bt-hover-border-bg.png) repeat-x; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient(top, #cbe9f7, #6dc0e5); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#cbe9f7), to(#6dc0e5)); -moz-transition: all 100ms; -webkit-transition: all 100ms; -o-transition: all 100ms; transition: all 100ms; } nav > ul > li > ul > li.current:hover { background: #dadada url(../images/old-browsers-bg/subnav-current-bt-border-bg.png) repeat-x; background: -moz-linear-gradient( top, white, #dadada 7%, #dadada ); background: -webkit-gradient( linear, left top, left bottom, from(white), to(#dadada), color-stop(0.07, #dadada) ); } nav > ul > li > ul > li > a:hover, #sub-nav a.nav-button:hover > b, nav > ul > li > ul > li.with-menu .menu:hover, nav > ul > li > ul > li.menu-opener:hover .menu-arrow { background: #305d79 url(../images/old-browsers-bg/subnav-bt-hover-bg.png) repeat-x !important; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient(left, rgba(109, 192, 229, 0), rgba(109, 192, 229, 0.2) 25%, rgba(109, 192, 229, 0.4) 50%, rgba(109, 192, 229, 0.3) 75%, rgba(109, 192, 229, 0)), -moz-linear-gradient(top, #afc2cf, #537288 50%, #45667c 50%, #2c526b) !important; background: -webkit-gradient(linear, 0% 0%, 100% 0%, from(rgba(109, 192, 229, 0)), to(rgba(109, 192, 229, 0)), color-stop(.25, rgba(109, 192, 229, 0.3)), color-stop(.5, rgba(109, 192, 229, 0.4)), color-stop(.75, rgba(109, 192, 229, 0.3))), -webkit-gradient(linear, 0% 0%, 0% 100%, from(#afc2cf), to(#2c526b), color-stop(.5, #537288), color-stop(.5, #45667c)) !important; -moz-box-shadow: 0 0 7px #cbe9f7; -webkit-box-shadow: 0 0 7px #cbe9f7; box-shadow: 0 0 7px #cbe9f7; -moz-transition: all 100ms; -webkit-transition: all 100ms; -o-transition: all 100ms; transition: all 100ms; } nav > ul > li > ul > li.current > a:hover { background: none !important; color: #666; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } #sub-nav { border-top: 1px solid #ff6500; height: 2.667em; line-height: 2.667em; background: black url(../images/old-browsers-bg/subnav-bg.png) repeat-x; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient(top, #303135, #3c3d42 6%, #404447 18%, #34383b 50%, #25292c 50%, #1a1b1f 63%, black); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#303135), to(black), color-stop(.06, #3c3d42), color-stop(.18, #404447), color-stop(.5, #34383b), color-stop(.5, #25292c), color-stop(.63, #1a1b1f)); text-align: right; color: white; } #sub-nav a.nav-button { float: right; margin: 0.417em 0 0 1em; } /* IE class */ .ie7 #sub-nav a.nav-button { margin-top: 0.333em; } #status-bar { height: 3.25em; line-height: 3.167em; background: white url(../images/old-browsers-bg/status-bar-bg.png) repeat-x; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient(top, white, #dadada 6%, white 92%, #cfcfcf); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(white), to(#cfcfcf), color-stop(.05, #dadada), color-stop(.92, white)); border-bottom: 1px solid #969696; text-align: right; color: #7b7b7b; } #status-infos { float: right; margin-bottom: 0; } #status-infos > li { float: left; margin-left: 0.5em; position: relative; z-index: 90; } #status-infos > li.spaced { padding-right: 0.5em; } #breadcrumb { float: left; border: 1px solid; border-color: #0099cc #006699 #003366; -moz-border-radius: 0.417em; -webkit-border-radius: 0.417em; -webkit-background-clip: padding-box; border-radius: 0.417em; -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); height: 1.75em; line-height: 1.5em; margin: 0.667em 1em 0 0; background: #0c5fa5 url(../images/old-browsers-bg/breadcrumb-bg.png) repeat-x; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, white, #72c6e4 5%, #0c5fa5 ); background: -webkit-gradient( linear, left top, left bottom, from(white), to(#0c5fa5), color-stop(0.05, #72c6e4) ); } #breadcrumb li { float: left; color: white; height: 1.75em; padding: 0.083em 1em 0 0; background: url(../images/breadcrumb-sep.png) no-repeat right center; } #breadcrumb li:last-child { padding-right: 0; background: none; } /* IE class */ #breadcrumb li.last-child { padding-right: 0; background: none; } #breadcrumb li a, #breadcrumb li span { display: block; height: 1.667em; color: white; text-decoration: none; padding: 0 0.75em 0 0.667em; -moz-transition-duration: 1s; -webkit-transition-duration: 1s; transition-duration: 1s; } #breadcrumb li a:hover { background: -moz-linear-gradient(left, rgba(109, 192, 229, 0), rgba(109, 192, 229, 0.8) 25%, rgba(109, 192, 229, 1) 50%, rgba(109, 192, 229, 0.8) 75%, rgba(109, 192, 229, 0)); background: -webkit-gradient(linear, 0% 0%, 100% 0%, from(rgba(109, 192, 229, 0)), to(rgba(109, 192, 229, 0)), color-stop(.25, rgba(109, 192, 229, 0.8)), color-stop(.5, rgba(109, 192, 229, 1)), color-stop(.75, rgba(109, 192, 229, 0.8))); -moz-transition-duration: 100ms; -webkit-transition-duration: 100ms; transition-duration: 100ms; } #breadcrumb li img { margin-bottom: -4px; } #header-shadow { background: url(../images/old-browsers-bg/status-bar-shadow.png) repeat-x; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; height: 0.75em; position: absolute; z-index: 87; left: 0; width: 100%; background: -moz-linear-gradient(top, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1) 30%, rgba(0, 0, 0, 0)); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(0, 0, 0, 0.3)), to(rgba(0, 0, 0, 0)), color-stop(.3, rgba(0, 0, 0, 0.1))); } /***************** Result block *****************/ .result-block { position: absolute; z-index: 90; top: 1.667em; right: -0.25em; min-width: 20em; background: white; -moz-border-radius: 0.5em; -webkit-border-radius: 0.5em; -webkit-background-clip: padding-box; border-radius: 0.5em; -moz-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5); box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5); padding: 1em; line-height: 1em; text-align: left; color: #333333; } /* IE class */ .ie .result-block { border: 1px solid #ccc; } #status-infos .result-block { top: 2.667em; display: none; } #status-infos > li:hover .result-block { display: block; } .result-block h2 { float: left; color: black; } .result-block div { margin-bottom: 1.667em; } .result-block div:last-child { margin-bottom: 0; } /* IE class */ .result-block div.last-child { margin-bottom: 0; } .result-block .arrow { font-size: 0; line-height: 0; width: 0; position: absolute; z-index: 89; right: 20px; top: -5px; border-bottom: 5px solid #666666; border-left: 3px solid transparent; border-right: 3px solid transparent; } .result-block .arrow span { width: 0; position: absolute; z-index: 89; left: -2px; bottom: -5px; border-bottom: 4px solid white; border-left: 2px solid transparent; border-right: 2px solid transparent; } .result-block .results-count { float: right; text-transform: uppercase; color: #b0b0b0; font-size: 0.75em; white-space: nowrap; margin-left: 1em; } .result-block .results-count strong { color: #999999; } .result-block ul { clear: both; } .result-block ul li { white-space: nowrap; } .search-more, .search-less { display: block; color: #999999; font-size: 0.75em; text-transform: uppercase; padding: 0.333em 0; text-align: center; background: url(../images/old-browsers-bg/search-more-shadow.png) no-repeat center bottom; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0) ), -moz-linear-gradient( left, #ffffff, #ebebeb 50%, #ffffff ); background: -webkit-gradient( linear, left top, left bottom, from(rgba(255, 255, 255, 1)), to(rgba(255, 255, 255, 0)) ), -webkit-gradient( linear, left top, right top, from(#ffffff), to(#ffffff), color-stop(0.5, #ebebeb) ); } .search-more:hover, .search-less:hover { color: #3399cc; } ul + .search-more, ul + .search-less { margin-top: -1.333em; } ul.small-pagination + .search-more, ul.small-pagination + .search-less { margin-top: -0.667em; } .search-more:before { content: url(../images/search-more-arrow.png); padding-right: 0.556em; } .search-more:hover:before { content: url(../images/search-more-arrow-hover.png); } .search-more:after { content: url(../images/search-more-arrow.png); padding-left: 0.556em; } .search-more:hover:after { content: url(../images/search-more-arrow-hover.png); } .search-less:before { content: url(../images/search-less-arrow.png); padding-right: 0.556em; } .search-less:hover:before { content: url(../images/search-less-arrow-hover.png); } .search-less:after { content: url(../images/search-less-arrow.png); padding-left: 0.556em; } .search-less:hover:after { content: url(../images/search-less-arrow-hover.png); } .result-block hr { height: 1px; line-height: 1px; border: 0; margin-top: 0; clear: both; background: #ffffff url(../images/old-browsers-bg/search-sep-bg.png) repeat-y left; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( left, #ffffff, #cccccc 50%, #ffffff ); background: -webkit-gradient( linear, left top, right top, from(#ffffff), to(#ffffff), color-stop(0.5, #cccccc) ); } .result-block .result-info { background: #333333; color: white; padding: 0.417em 0.75em 0.583em; margin: 0 -1em -1em -1em; -moz-border-radius: 0 0 0.5em 0.5em; -webkit-border-bottom-right-radius: 0.5em; -webkit-border-bottom-left-radius: 0.5em; border-radius: 0 0 0.5em 0.5em; white-space: nowrap; } .result-block .result-info a { color: #77ccff; } .result-block .arrow:first-child + .result-info:last-child { margin-top: -1em; border-top: 1px solid #999999; -moz-border-radius: 0.5em; -webkit-border-radius: 0.5em; -webkit-background-clip: padding-box; border-radius: 0.5em; } /* IE class */ .result-block .result-info.first-last-child { margin-top: -1em; border-top: 1px solid #999999; } .result-block div + .result-info, .result-block p + .result-info, .result-block ul + .result-info { margin-top: -0.5em; } .result-block .result-info.loading { padding-left: 2.667em; background: #333333 url(../images/table-loader.gif) no-repeat 0.75em center; } /***************** Search block *****************/ #search-form { display: inline; position: relative; z-index: 91; } /********** Always visible control bar **********/ #control-bar { padding: 1em 0; text-align: center; } #control-bar.grey-bg { border-bottom: 1px solid #efefef; border-bottom: 1px solid rgba(255, 255, 255, 0.65); background: url(../images/old-browsers-bg/control-bar-bg.png) repeat-x; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1) ); background: -webkit-gradient( linear, left top, left bottom, from(rgba(0, 0, 0, 0.2)), to(rgba(0, 0, 0, 0.1)) ); -moz-box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.35); -webkit-box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.35); box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.35); } #cb-place-holder { display: none; } #control-bar.fixed { position: fixed; top: 0; left: 0; right: 0; margin: 0; z-index: 999950; background: url(../images/old-browsers-bg/black50.png); background: rgba(0, 0, 0, 0.5); } #control-bar.fixed.grey-bg { border: 0; -moz-border-radius: 0; -webkit-border-radius: 0; -webkit-background-clip: padding-box; border-radius: 0; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } /**************** Standard block ****************/ article { margin-top: 3em; } #control-bar + article, #cb-place-holder + article { margin-top: 2em; } .block-content h1, .block-content .h1 { position: absolute; left: 0.5em; top: -0.444em; margin: 0; z-index: 100; -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); -moz-border-radius: 0.278em; -webkit-border-radius: 0.278em; -webkit-background-clip: padding-box; border-radius: 0.278em; } /* IE class */ .ie .block-content h1, .ie .block-content .h1 { padding: 0.333em 0.444em; } .block-content .h1 h1 { position: relative; left: 0; top: 0; z-index: 1; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; -moz-border-radius: 0; -webkit-border-radius: 0; -webkit-background-clip: padding-box; border-radius: 0; padding: 0; } .block-content h1 > a, .block-content .h1 > a { display: block; position: absolute; top: -1px; left: 100%; margin-left: 0.5em; font-size: 0.778em; text-transform: uppercase; color: #cccccc; border: 1px solid; border-color: #7e9098 #61727b #2b373d; background: #40535c url(../images/old-browsers-bg/title-link-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, white, #9eb1ba 4%, #40535c ); background: -webkit-gradient( linear, left top, left bottom, from(white), to(#40535c), color-stop(0.03, #9eb1ba) ); -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); -moz-border-radius: 0.286em; -webkit-border-radius: 0.286em; -webkit-background-clip: padding-box; border-radius: 0.286em; line-height: 1.143em; padding: 0.5em 0.571em; white-space: nowrap; } /* IE class */ .ie7 .block-content h1 > a, .ie7 .block-content .h1 > a { padding: 0.429em 0.571em; } .block-content h1 > a:hover, .block-content .h1 > a:hover { color: white; border-color: #1eafdc #1193d5 #035592; background: #057fdb url(../images/old-browsers-bg/title-link-hover-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, white, #2bcef3 4%, #057fdb ); background: -webkit-gradient( linear, left top, left bottom, from(white), to(#057fdb), color-stop(0.03, #2bcef3) ); } .block-content h1 > a img, .block-content .h1 > a img { margin-bottom: -3px; } .red .block-content h1 > a:hover, .red .block-content .h1 > a:hover, .block-content.red h1 > a:hover, .block-content.red .h1 > a:hover, .block-content .red h1 > a:hover, .block-content .red .h1 > a:hover, .block-content h1.red > a:hover, .block-content .h1.red > a:hover { border-color: #c24949 #9d3d3d #590909; background: #9d0404 url(../images/old-browsers-bg/button-element-red-hover-bg.png) repeat-x top; background: -moz-linear-gradient( top, white, #fe6565 4%, #9d0404 ); background: -webkit-gradient( linear, left top, left bottom, from(white), to(#9d0404), color-stop(0.03, #fe6565) ); } .block-content { padding-top: 2.833em; } .block-content.no-title { padding-top: 1.667em; } .block-content.no-padding.no-title { padding-top: 0; } /***************** Block header *****************/ .block-header { font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Sans", Arial, Helvetica, sans-serif; } .block-content .block-header:first-child, .block-content h1:first-child + .block-header, .block-content .h1:first-child + .block-header { margin-top: -1.417em; -moz-border-radius: 0.083em 0.083em 0 0; -webkit-border-top-left-radius: 0.083em; -webkit-border-top-right-radius: 0.083em; border-radius: 0.083em 0.083em 0 0; } /* IE class */ .block-content .block-header.first-child, .block-content .block-header.after-h1 { margin-top: -1.417em; } .block-content.no-title .block-header:first-child { margin-top: -0.833em; } /* IE class */ .block-content.no-title .block-header.first-child { margin-top: -0.833em; } .block-content.no-padding .block-header:first-child { margin-top: 0; } /* IE class */ .block-content.no-padding .block-header.first-child { margin-top: 0; } /***************** Wizard tweak *****************/ .block-content .wizard-steps:first-child, .block-content h1:first-child + .wizard-steps, .block-content .h1:first-child + .wizard-steps { margin-top: -2.833em; -moz-border-radius: 0.167em 0.167em 0 0; -webkit-border-top-left-radius: 0.167em; -webkit-border-top-right-radius: 0.167em; border-radius: 0.167em 0.167em 0 0; } /* IE class */ .block-content .wizard-steps.first-child, .block-content .wizard-steps.after-h1 { margin-top: -2.833em; } .block-content.no-title .wizard-steps:first-child { margin-top: -1.667em; } /* IE class */ .block-content.no-title .wizard-steps.first-child { margin-top: -1.667em; } .block-content.no-padding .wizard-steps:first-child { margin-top: 0; } /* IE class */ .block-content.no-padding .wizard-steps.first-child { margin-top: 0; } /**************** Block controls ****************/ .block-content .block-controls:first-child, .block-content h1:first-child + .block-controls, .block-content .h1:first-child + .block-controls { margin-top: -2.833em; -moz-border-radius-topleft: 0.2em; -moz-border-radius-topright: 0.2em; -webkit-border-top-left-radius: 0.2em; -webkit-border-top-right-radius: 0.2em; border-top-left-radius: 0.2em; border-top-right-radius: 0.2em; } /* IE class */ .block-content .block-controls.first-child, .block-content .block-controls.after-h1 { margin-top: -2.833em; } .block-content.no-title .block-controls:first-child { margin-top: -1.667em; } /* IE class */ .block-content.no-title .block-controls.first-child { margin-top: -1.667em; } .block-content.no-padding .block-controls:first-child { margin-top: 0; } /* IE class */ .block-content.no-padding .block-controls.first-child { margin-top: 0; } .block-content .block-controls:first-child ul.controls-tabs li:last-child a, .block-content h1:first-child + .block-controls ul.controls-tabs li:last-child a, .block-content .h1:first-child + .block-controls ul.controls-tabs li:last-child a { -moz-border-radius-topright: 0.2em; -webkit-border-top-right-radius: 0.2em; border-top-right-radius: 0.2em; } /* IE class */ .block-content .block-controls.first-child ul.controls-tabs li.last-child a, .block-content .block-controls.after-h1 ul.controls-tabs li.last-child a { -moz-border-radius-topright: 0.2em; -webkit-border-top-right-radius: 0.2em; border-top-right-radius: 0.2em; } .block-content.no-padding .block-controls:last-child { -moz-border-radius-bottomleft: 0.2em; -moz-border-radius-bottomright: 0.2em; -webkit-border-bottom-left-radius: 0.2em; -webkit-border-bottom-right-radius: 0.2em; border-bottom-left-radius: 0.2em; border-bottom-right-radius: 0.2em; } /****************** Action tabs *****************/ .action-tabs { position: absolute; z-index: 89; right: 100%; width: 3em; overflow: hidden; padding-top: 2em; } .block-border > .action-tabs, .block-content > .action-tabs { margin-right: 1px; } .action-tabs.right { right: auto; left: 100%; } .block-border > .action-tabs.right, .block-content > .action-tabs.right { margin-right: 0; margin-left: 1px; } .action-tabs li { float: right; width: 1.5em; padding: 0.667em 0.417em 0.667em 0.667em; -moz-border-radius: 0.5em 0 0 0.5em; -webkit-border-top-left-radius: 0.5em; -webkit-border-bottom-left-radius: 0.5em; border-radius: 0.5em 0 0 0.5em; background: url(../images/old-browsers-bg/white20.png); background: rgba(255, 255, 255, 0.2); -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); margin: 0 -0.167em 0.5em 0; -moz-transition: all 300ms; -webkit-transition: all 300ms; -o-transition: all 300ms; transition: all 300ms; } .action-tabs.right li { float: left; padding: 0.667em 0.667em 0.667em 0.417em; margin: 0 0 0.5em -0.167em; -moz-border-radius: 0 0.5em 0.5em 0; -webkit-border-top-left-radius: 0; -webkit-border-bottom-left-radius: 0; -webkit-border-top-right-radius: 0.5em; -webkit-border-bottom-right-radius: 0.5em; border-radius: 0 0.5em 0.5em 0; text-align: right; } .action-tabs li:hover { margin-right: 0; -moz-transition: all 100ms; -webkit-transition: all 100ms; -o-transition: all 100ms; transition: all 100ms; } .action-tabs.right li:hover { margin-left: 0; } .action-tabs li a { display: block; margin: -0.667em -0.5em -0.667em -0.667em; padding: 0.583em 0.5em 0.583em 0.583em; border: 0.083em solid; border-color: #c8cacc white #777a7d #aeb0b4; border-right: 0; -moz-border-radius: 0.5em 0 0 0.5em; -webkit-border-top-left-radius: 0.5em; -webkit-border-bottom-left-radius: 0.5em; border-radius: 0.5em 0 0 0.5em; background: #9a9ea3 url(../images/old-browsers-bg/action-tab-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #82858b, #9a9ea3 ); background: -webkit-gradient( linear, left top, left bottom, from(#82858b), to(#9a9ea3) ); } .action-tabs.right li a { margin: -0.667em -0.667em -0.667em -0.5em; padding: 0.583em 0.583em 0.583em 0.5em; border-left: 0; border-right: 0.083em solid; border-color: #c8cacc #77797e #777a7d white; -moz-border-radius: 0 0.5em 0.5em 0; -webkit-border-top-left-radius: 0; -webkit-border-bottom-left-radius: 0; -webkit-border-top-right-radius: 0.5em; -webkit-border-bottom-right-radius: 0.5em; border-radius: 0 0.5em 0.5em 0; text-align: right; } .action-tabs li:hover a { border-color: #dcddde white #999a9d #cfd0d3; background: #c7c9cd url(../images/old-browsers-bg/action-tab-hover-bg.png) repeat-x top; background: -moz-linear-gradient( top, #afb0b4, #c7c9cd ); background: -webkit-gradient( linear, left top, left bottom, from(#afb0b4), to(#c7c9cd) ); } .action-tabs.right li:hover a { border-color: #dcddde #9b9da0 #999a9d white; } /****************** Messages ********************/ .message { margin-bottom: 2.5em; } section .message { margin-bottom: 1.667em; } /**************** Content columns ***************/ .content-columns { position: relative; z-index: 89; margin: 0 -1.417em; } .content-columns:last-child { margin-bottom: -1.667em; } /* IE class */ .content-columns.last-child { margin-bottom: -1.667em; } .block-controls + .content-columns { margin-top: -1.667em; } .block-content.no-title .content-columns:first-child { margin-top: -1.667em; } /* IE class */ .block-content.no-title .content-columns.first-child { margin-top: -1.667em; } .block-content.no-padding .content-columns:first-child { margin-top: 0; } /* IE class */ .block-content.no-padding .content-columns.first-child { margin-top: 0; } .content-left { float: left; width: 50%; margin-left: -0.25em; } .content-right { float: right; width: 50%; margin-right: -0.25em; } .content-columns .content-columns-sep { position: absolute; z-index: 88; top: 0; bottom: 0; width: 0.417em; left: 50%; margin-left: -0.25em; background: #c4c4c4 url(../images/old-browsers-bg/content-columns-sep-bg.png) repeat-y left; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( left, #e6e6e6, #c4c4c4 ); background: -webkit-gradient( linear, left top, right top, from(#e6e6e6), to(#c4c4c4) ); border-left: 0.1em solid #999999; border-right: 0.1em solid #999999; } /* Left column of 30% */ .content-columns.left30 .content-left { width: 30%; } .content-columns.left30 .content-right { width: 70%; } .content-columns.left30 .content-columns-sep { left: 30%; } /* right column of 30% */ .content-columns.right30 .content-left { width: 70%; } .content-columns.right30 .content-right { width: 30%; } .content-columns.right30 .content-columns-sep { left: 70%; } .content-columns .message { margin: 0 !important; border-width: 1px 0; } .content-columns .message:last-child { -moz-border-radius: 0; -webkit-border-radius: 0; -webkit-background-clip: padding-box; border-radius: 0; border-bottom: 0; } /* IE class */ .content-columns .message.last-child { margin-bottom: 0; border-bottom: 0; } .content-columns:last-child .content-left > :last-child { -moz-border-radius-bottomleft: 0.167em; -webkit-border-bottom-left-radius: 0.167em; border-bottom-left-radius: 0.167em; } .content-columns:last-child .content-right > :last-child { -moz-border-radius-bottomright: 0.167em; -webkit-border-bottom-right-radius: 0.167em; border-bottom-right-radius: 0.167em; } .block-content.no-title .content-columns:first-child .content-left > :first-child { -moz-border-radius-topleft: 0.167em; -webkit-border-top-left-radius: 0.167em; border-top-left-radius: 0.167em; } .block-content.no-title .content-columns:first-child .content-right > :last-child { -moz-border-radius-topright: 0.167em; -webkit-border-top-right-radius: 0.167em; border-top-right-radius: 0.167em; } /**************** Drop-down menu ****************/ .with-menu, .menu-opener { padding-right: 1.75em; position: relative; z-index: 98; } /* IE class */ .ie .block-content .with-menu, .ie .block-content .menu-opener { padding-right: 1.75em; } .with-menu:hover, .menu-opener:hover { z-index: 99; } .button.with-menu, .button.menu-opener, .form legend.with-menu, .form legend.menu-opener, .mini-menu.with-menu, .mini-menu.menu-opener { padding-right: 2.25em; } /* IE class */ .ie .block-content .button.with-menu, .ie .block-content .button.menu-opener, .ie .block-content .mini-menu.with-menu, .ie .block-content .mini-menu.menu-opener { padding-right: 2.25em; } .menu, .menu-opener .menu-arrow { position: absolute; z-index: 99; top: 0; right: 0; bottom: 0; font-weight: normal; line-height: 1.25em; font-family: Verdana, Arial, Helvetica, sans-serif; } .with-menu .menu, .menu-opener .menu-arrow { width: 1.75em; background: url(../images/menu-border.png) no-repeat left center; background-size: 2px 100%; -moz-background-size: 2px 100%; -webkit-background-size: 2px 100%; } .menu-opener .menu { left: 0; background: url(../images/trans.png); } .with-menu .menu > img, .menu-opener .menu-arrow > img { position: absolute; left: 50%; top: 50%; margin: -8px 0 0 -7px; } .menu ul { position: absolute; z-index: 999910; top: 100%; left: 1px; background: #cccccc url(../images/menu-bg.png) repeat-y; border: 1px solid white; padding: 0.25em 0; margin: 0; width: 15em; display: none; -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); -moz-border-radius: 0 0.25em 0.25em 0.25em; -webkit-border-radius: 0.25em; -webkit-background-clip: padding-box; -webkit-border-top-left-radius: 0; border-radius: 0 0.25em 0.25em 0.25em; } .menu-opener .menu > ul { left: -1px; } .menu ul.reverted { -moz-border-radius: 0.25em 0 0.25em 0.25em; -webkit-border-radius: 0.25em; -webkit-background-clip: padding-box; -webkit-border-top-right-radius: 0; border-radius: 0.25em 0 0.25em 0.25em; } .menu > ul.reverted { left: auto; right: 1px; } .menu-opener .menu > ul.reverted { right: -1px; } .menu:hover > ul, .menu :hover > ul { display: block; } .menu ul li ul { display: block; top: 0.6em; left: 94%; width: 4px; height: 6px; border: none; background: url(../images/menu-arrow.png) no-repeat; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; -moz-border-radius: 0; -webkit-border-radius: 0; -webkit-background-clip: padding-box; border-radius: 0; } .menu ul li ul li { display: none; } .menu ul li:hover > ul { top: -0.167em; left: 98%; width: 15em; height: auto; border: 1px solid white; background: #cccccc url(../images/menu-bg.png) repeat-y; -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); } .menu ul li:hover > ul.reverted { left: auto; right: 98%; } .menu ul li:hover > ul > li { display: block; } .menu ul li { position: relative; z-index: 999911; padding: 0.333em 0.833em 0.417em 35px; margin: 0; color: #999999; -moz-text-shadow: 1px 1px 0 white; -webkit-text-shadow: 1px 1px 0 white; text-shadow: 1px 1px 0 white; background-repeat: no-repeat; background-position: 5px 3px; } /* IE class */ .ie7 .menu > ul > li, .ie7 .menu ul li:hover > ul > li { display: inline-block; padding-left: 0; padding-right: 0; text-indent: 35px; } .menu ul li.sep { height: 0; font-size: 0; line-height: 0; padding: 0; margin: 2px 0; border-top: 1px solid #adadad; border-bottom: 1px solid white; } /* IE class */ .ie7 .menu ul li.sep { z-index: 999910; } .menu ul li a { display: block; margin: -0.333em -0.833em -0.417em -9px; padding: 0.333em 0.833em 0.417em 9px; color: #1e343f; -moz-text-shadow: none; -webkit-text-shadow: none; text-shadow: none; } /* IE class */ .ie7 .menu ul li a { margin-right: 0; margin-left: 26px; text-indent: 0; } .menu ul li:hover { z-index: 999912; background-color: #c0c0c0; } .menu ul li.sep:hover { z-index: 999911; } .menu ul li:hover > a { background: #4d4d4d; color: white; } .menu .icon_address { background-image: url(../images/icons/fugue/address-book.png); } .menu .icon_alarm { background-image: url(../images/icons/fugue/alarm-clock-blue.png); } .menu .icon_blog { background-image: url(../images/icons/fugue/application-blog.png); } .menu .icon_terminal { background-image: url(../images/icons/fugue/application-terminal.png); } .menu .icon_battery { background-image: url(../images/icons/fugue/battery-full.png); } .menu .icon_building { background-image: url(../images/icons/fugue/building.png); } .menu .icon_calendar { background-image: url(../images/icons/fugue/calendar-day.png); } .menu .icon_cards { background-image: url(../images/icons/fugue/cards-address.png); } .menu .icon_chart { background-image: url(../images/icons/fugue/chart.png); } .menu .icon_computer { background-image: url(../images/icons/fugue/computer.png); } .menu .icon_database { background-image: url(../images/icons/fugue/database.png); } .menu .icon_delete { background-image: url(../images/icons/fugue/cross-circle.png); } .menu .icon_doc_excel { background-image: url(../images/icons/fugue/document-excel.png); } .menu .icon_doc_pdf { background-image: url(../images/icons/fugue/document-pdf.png); } .menu .icon_doc_csv { background-image: url(../images/icons/fugue/document-excel-csv.png); } .menu .icon_doc_image { background-image: url(../images/icons/fugue/document-image.png); } .menu .icon_doc_web { background-image: url(../images/icons/fugue/document-globe.png); } .menu .icon_down { background-image: url(../images/icons/fugue/arrow-270.png); } .menu .icon_edit { background-image: url(../images/icons/fugue/pencil.png); } .menu .icon_film { background-image: url(../images/icons/fugue/film.png); } .menu .icon_security { background-image: url(../images/icons/fugue/hard-hat.png); } .menu .icon_images { background-image: url(../images/icons/fugue/images.png); } .menu .icon_mail { background-image: url(../images/icons/fugue/mail.png); } .menu .icon_monitor { background-image: url(../images/icons/fugue/monitor.png); } .menu .icon_newspaper { background-image: url(../images/icons/fugue/newspaper.png); } .menu .icon_search { background-image: url(../images/icons/fugue/magnifier.png); } .menu .icon_network { background-image: url(../images/icons/fugue/globe-network.png); } .menu .icon_server { background-image: url(../images/icons/fugue/server.png); } .menu .icon_export { background-image: url(../images/icons/fugue/application-export.png); } .menu .icon_refresh { background-image: url(../images/icons/fugue/arrow-circle.png); } .menu .icon_reset { background-image: url(../images/icons/fugue/counter-reset.png); } .menu .icon_up { background-image: url(../images/icons/fugue/arrow-090.png); } nav > ul > li > ul > li.with-menu, nav > ul > li > ul > li.menu-opener { padding-right: 2.3em; } nav > ul > li > ul > li.with-menu > a, nav > ul > li > ul > li.menu-opener > a { -moz-border-radius-topright: 0; -moz-border-radius-bottomright: 0; -webkit-border-top-right-radius: 0; -webkit-border-bottom-right-radius: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; padding-right: 0.8em; } nav > ul > li > ul > li.with-menu .menu, nav > ul > li > ul > li.menu-opener .menu-arrow { width: 1.75em; font-size: 1.2em; height: 1.834em; /* Chrome 5 is one pixel short with 0.833, dunno why... */ line-height: 1.833em; text-transform: none; top: 1px; right: 1px; -moz-border-radius-topright: 0.3em; -moz-border-radius-bottomright: 0.3em; -webkit-border-top-right-radius: 0.3em; -webkit-border-bottom-right-radius: 0.3em; border-top-right-radius: 0.3em; border-bottom-right-radius: 0.3em; } nav > ul > li > ul > li.menu-opener .menu { font-size: 1.2em; line-height: 1.25em; text-transform: none; } nav > ul > li > ul > li.with-menu.current .menu, nav > ul > li > ul > li.menu-opener.current .menu-arrow { -moz-border-radius-bottomright: 0; -webkit-border-bottom-right-radius: 0; border-bottom-right-radius: 0; background: none !important; height: 2.333em; line-height: 2.333em; border-left: 1px solid #ccc; } nav > ul > li > ul > li.with-menu.current .menu:hover, nav > ul > li > ul > li.menu-opener.current .menu-arrow:hover { -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } nav > ul > li > ul > li.with-menu .menu > img, nav > ul > li > ul > li.menu-opener .menu-arrow > img { margin-top: -9px; margin-left: -8px; } nav > ul > li > ul > li.with-menu .menu > ul { line-height: 1.2em; left: -1px; } nav > ul > li > ul > li .menu > ul, nav > ul > li > ul > li .menu ul li:hover > ul { background-image: url(../images/main-menu-bg.png); background-color: #1c1e20; border-color: #b3b3b3; } nav > ul > li > ul > li .menu ul li { color: #666666; -moz-text-shadow: none; -webkit-text-shadow: none; text-shadow: none; } nav > ul > li > ul > li .menu ul li a { color: white; } nav > ul > li > ul > li .menu ul li.sep { border-top-color: black; border-bottom-color: #666666; } section h1.with-menu, section .h1.with-menu, section h1.menu-opener, section .h1.menu-opener { padding-right: 1.667em; } section h1 .menu, section .h1 .menu { font-size: 0.667em; -moz-border-radius: 0 0.278em 0.278em 0; -webkit-border-top-right-radius: 0.278em; -webkit-border-bottom-right-radius: 0.278em; border-radius: 0 0.278em 0.278em 0; } .ie section h1 .menu, .ie section .h1 .menu { background: url(../images/trans.png); } section h1 .menu:hover, section .h1 .menu:hover { background: url(../images/menu-border.png) no-repeat left center, -moz-linear-gradient( top, white, #2bcef3 5%, #057fdb ); background: url(../images/menu-border.png) no-repeat left center, -webkit-gradient( linear, left top, left bottom, from(white), to(#057fdb), color-stop(0.05, #2bcef3) ); } section h1.menu-opener .menu:hover, section .h1.menu-opener .menu:hover { background: none; } section h1 .menu-arrow, section .h1 .menu-arrow { font-size: 0.667em; } section h1 .menu > ul, section h1 .menu ul li:hover > ul, section .h1 .menu > ul, section .h1 .menu ul li:hover > ul { background-image: url(../images/h1-menu-bg.png); background-color: #006699; border-color: #99ccff; } section h1 .menu ul li, section .h1 .menu ul li { color: #3399cc; -moz-text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.3); -webkit-text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.3); text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.3); } section h1 .menu ul li a, section .h1 .menu ul li a { color: white; } section h1 .menu ul li:hover, section .h1 .menu ul li:hover { background-color: #70b7db; -moz-text-shadow: none; -webkit-text-shadow: none; text-shadow: none; } section h1 .menu ul li:hover > a, section .h1 .menu ul li:hover > a { background-color: #004a6f; } section h1 .menu ul li.sep, section .h1 .menu ul li.sep { border-top-color: #004a6f; border-bottom-color: #84c8e1; } section h1 .menu ul li ul, section .h1 .menu ul li ul { background-image: url(../images/menu-arrow-white.png); } .button.with-menu .menu:hover, .button.menu-opener:hover .menu-arrow { background: url(../images/menu-border.png) no-repeat left center, -moz-linear-gradient( top, #dff3fc, #98d2f3 ); background: url(../images/menu-border.png) no-repeat left center, -webkit-gradient( linear, left top, left bottom, from(#dff3fc), to(#98d2f3) ); } #contextMenu.menu { top: 0; left: 0; bottom: auto; width: 0; display: none; padding: 1em; margin: -1em 0 0 -1em; -moz-border-radius: 1em; -webkit-border-radius: 1em; -webkit-background-clip: padding-box; border-radius: 1em; background: rgba(255, 255, 255, 0.5); } #contextMenu.menu > ul { display: block; top: 50%; left: 50%; } /***************** Notifications ****************/ #notifications { position: fixed; z-index: 999990; top: 1em; right: 1em; width: 20em; } #notifications li { position: relative; background: url(../images/old-browsers-bg/black80.png); background: rgba(0, 0, 0, 0.8); padding: 1.25em; color: white; margin-bottom: 1em; -moz-border-radius: 0.417em; -webkit-border-radius: 0.417em; -webkit-background-clip: padding-box; border-radius: 0.417em; -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); } /********************* Footer *******************/ footer { text-align: center; position: fixed; z-index: 100; left: 0; right: 0; bottom: 0; } footer .float-left, footer .float-right { position: absolute; bottom: 0; } footer .float-left { left: 0; } footer .float-right { right: 0; } footer .float-left .button, footer .float-right .button { -moz-border-radius: 0; -webkit-border-radius: 0; -webkit-background-clip: padding-box; border-radius: 0; margin: 0; display: block; float: left; border-bottom: 0; } footer .float-left .button:first-child { border-left: 0; } /* IE class */ footer .float-left .button.first-child { border-left: 0; } footer .float-left .button:last-child { -moz-border-radius-topright: 0.417em; -webkit-border-top-right-radius: 0.417em; border-top-right-radius: 0.417em; } footer .float-right .button:last-child { border-right: 0; } /* IE class */ footer .float-right .button.last-child { border-right: 0; } footer .float-right .button:first-child { -moz-border-radius-topleft: 0.417em; -webkit-border-top-left-radius: 0.417em; border-top-left-radius: 0.417em; } /****************** Modal window ****************/ #modal { background: url(../images/old-browsers-bg/black50.png); background: rgba(0, 0, 0, 0.5); position: fixed; z-index: 999980; top: 0; left: 0; width: 100%; height: 100%; } div.modal-window { position: absolute; left: 0; top: 0; -moz-box-shadow: 0 1px 7px rgba(0, 0, 0, 0.75); -webkit-box-shadow: 0 1px 7px rgba(0, 0, 0, 0.75); box-shadow: 0 1px 7px rgba(0, 0, 0, 0.75); } .modal-content { overflow: hidden; margin: -2.833em -1.667em -1.667em; padding: 2.833em 1.667em 1.667em; } .no-title .modal-content { margin-top: -1.667em; padding-top: 1.667em; } .modal-content + .block-footer { margin-top: 1.667em; } .modal-content.modal-scroll { overflow: auto; } #modal > .block-border > .block-content { z-index: 90; } #modal h1 { cursor: move; -webkit-user-select:none; -moz-user-select:none; } .modal-loading { background: url(../images/arbo-loader.gif) no-repeat center 3em; height: 4em; padding-top: 4.5em; color: #999999; text-align: center; } #modal .block-border > .action-tabs.right { padding-top: 1em; } #modal .block-content > .action-tabs.right { padding-top: 0; margin-top: -2em; } /* Resizing zones */ .modal-resize-tl, .modal-resize-t, .modal-resize-tr, .modal-resize-r, .modal-resize-br, .modal-resize-b, .modal-resize-bl, .modal-resize-l { background: url(../images/trans.png); position: absolute; z-index: 89; } .modal-resize-tl { top: 0; left: 0; width: 2em; height: 1em; cursor: nw-resize; } .modal-resize-t { top: 0; left: 2em; right: 2em; height: 1em; cursor: n-resize; } .modal-resize-tr { top: 0; right: 0; width: 2em; height: 1em; cursor: ne-resize; } .modal-resize-r { top: 1em; right: 0; width: 1em; bottom: 1em; cursor: e-resize; } .modal-resize-br { bottom: 0; right: 0; width: 2em; height: 1em; cursor: se-resize; } .modal-resize-b { bottom: 0; left: 2em; right: 2em; height: 1em; cursor: s-resize; } .modal-resize-bl { bottom: 0; left: 0; width: 2em; height: 1em; cursor: sw-resize; } .modal-resize-l { top: 1em; left: 0; width: 1em; bottom: 1em; cursor: w-resize; } /* http://perishablepress.com/press/2008/02/05/lessons-learned-concerning-the-clearfix-css-hack */ #control-bar:after, .columns:after, .content-columns:after, article:after { clear: both; content: ' '; display: block; font-size: 0; line-height: 0; visibility: hidden; width: 0; height: 0; } #control-bar, .columns, .content-columns, article { display: inline-block; } * html #control-bar, * html .columns, * html .content-columns, * html article { height: 1%; } #control-bar, .columns, .content-columns, article { display: block; }
0a1b2c3d4e5
trunk/leilao/include/css/standard.css
CSS
asf20
56,622
/* * Global reset * Based on Eric Meyer's : http://meyerweb.com/eric/thoughts/2008/01/15/resetting-again/ */ a, abbr, acronym, address, applet, article, aside, audio, b, big, blockquote, body, canvas, caption, center, cite, code, command, datalist, dd, del, details, dfn, div, dl, dt, em, embed, fieldset, figcaption, figure, font, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, html, i, iframe, img, ins, kbd, keygen, label, legend, li, meter, nav, object, ol, output, p, pre, progress, q, s, samp, section, small, source, span, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, var, video { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; z-index: 1; } /* * Default HTML5 behaviour for older browsers */ article, aside, audio, canvas, command, datalist, details, embed, figcaption, figure, footer, header, hgroup, keygen, meter, nav, output, progress, section, source, video { display: block; } mark, rp, rt, ruby, summary, time{ display: inline } body { line-height: 1; } ol, ul { list-style: none; } blockquote, q { quotes: none; } :focus { outline: 0; } ins { text-decoration: none; } del { text-decoration: line-through; } a { text-decoration: none; } /* tables still need 'cellspacing="0"' in the markup */ table { border-collapse: collapse; border-spacing: 0; }
0a1b2c3d4e5
trunk/leilao/include/css/reset.css
CSS
asf20
1,467
/** * Common styles for all variants (standard or mobile) * z-index hierachy : * 88, 89 or 90 : Positioned elements at normal level * 98 or 99 : Positioned for menu * 100 : footer * 999900 : tooltip * 999910 : menu * 999950 : fixed control bar * 999980 : modal windows * 999990 : notifications */ html { background: #d5d8db; } body { color: #333333; font-size: 75%; } body.dark { background-color: #70828f; } .white-text { color: white; } p, th, td { line-height: 1.25em; } p, ul, ol, dl, .with-margin { margin-bottom: 1.667em; } .small-margin { margin-bottom: 0.5em; } .medium-margin { margin-bottom: 1em; } .large-margin { margin-bottom: 2.417em; } a { color: #3399cc; text-decoration: none; } strong { color: #3399cc; } small { color: #808080; font-size: 0.833em; text-transform: uppercase; font-weight: normal; } small strong { color: #808080; } h2 { color: #3399cc; font-size: 1.25em; line-height: 1.267em; margin-bottom: 1.267em; } h3 { color: #3399cc; font-size: 1.25em; line-height: 1.267em; } h5 { font-weigth: bold; color: #333; } hr { height: 0; line-height: 0; border: 0; border-top: 1px dotted #cccccc; margin-bottom: 1.667em; } a.red, .red a h2.red, .red h2, h3.red, .red h3 { color: #cc3333; } h2:last-child, p:last-child, ul:last-child, ol:last-child, dl:last-child, hr:last-child { margin-bottom: 0; } /* IE class */ h2.last-child, p.last-child, ul.last-child, ol.last-child, dl.last-child, hr.last-child { margin-bottom: 0; } /**************** Generic classes ***************/ .align-left { text-align: left; } .align-center { text-align: center; } .align-right { text-align: right; } .margin-left { margin-left: 1em; } .margin-right { margin-right: 1em; } .gutter-left { margin-left: 2em; } .gutter-right { margin-right: 2em; } .float-left { float: left; } .float-right { float: right; } .relative { position: relative; z-index: 89; } .absolute { position: absolute; z-index: 89; } .upper-index { z-index: 90 !important; } .with-padding { padding: 1em; } .no-bottom-margin { margin-bottom: 0 !important; } .box { -moz-border-radius: 0.25em; -webkit-border-radius: 0.25em; -webkit-background-clip: padding-box; border-radius: 0.25em; -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); padding: 0.75em; margin-bottom: 1.667em; background: white; } /* IE class */ .ie .box { border: 1px solid #cccccc; } .infos { background-image: url(../images/icons/web-app/48/Info.png); background-repeat: no-repeat; padding-left: 5em; margin-bottom: 1em; min-height: 4em; } .mini-infos { background-image: url(../images/icons/web-app/24/Info.png); background-repeat: no-repeat; padding: 0.167em 0 0.167em 2.5em; margin-bottom: 1em; min-height: 1.5em; } .info:last-child, .mini-infos:last-child { margin-bottom: 0; } /* IE class */ .info.last-child, .mini-infos.last-child { margin-bottom: 0; } .infos p, .mini-infos p { color: #808080; } .picto { margin-bottom: -4px; } .empty { color: #999999 !important; font-style: italic; } .number { display: block; float: left; min-width: 1em; padding: 0.25em; font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Sans", Arial, Helvetica, sans-serif; font-weight: bold; color: white; text-align: center; -moz-border-radius: 0.25em; -webkit-border-radius: 0.25em; -webkit-background-clip: padding-box; border-radius: 0.25em; margin-right: 0.5em; background: #3399cc; } .number.red, .red .number { background-color: #cc3333; } .bigger { font-size: 2.5em; } h2.bigger { margin-bottom: 0.8em; } .big { font-size: 1.5em; } .small { font-size: 0.833em; } .smaller { font-size: 0.75em; } /**************** Generic styles ***************/ .grey { color: #666666; } .white-bg { background-color: white; } .grey-bg { background-color: #c1c8cb; } .block-content .grey-bg { background-color: #e6e6e6; } p.grey-bg { padding: 0.417em 0.5em; -moz-border-radius: 0.333em; -webkit-border-radius: 0.333em; -webkit-background-clip: padding-box; border-radius: 0.333em; } .dark-grey-gradient { background: #666666 url(../images/old-browsers-bg/dark-grey-gradient-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #3d3d3d, #484848 2%, #585858 8%, #666666 ); background: -webkit-gradient( linear, left top, left bottom, from(#3d3d3d), to(#666666), color-stop(0.02, #484848), color-stop(0.08, #585858) ); color: white; } .lite-grey-gradient { background: white url(../images/old-browsers-bg/lite-grey-gradient-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #d5d5d5, white ); background: -webkit-gradient( linear, left top, left bottom, from(#d5d5d5), to(white) ); } /****************** Main title ******************/ article h1 { color: #3f525f; font-size: 1.5em; -moz-text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3); -webkit-text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3); text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3); margin-bottom: 1em; } .block-content h1, .block-content .h1 { color: white; font-size: 1.5em; font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Sans", Arial, Helvetica, sans-serif; border: 1px solid; border-color: #50a3c8 #297cb4 #083f6f; background: #0c5fa5 url(../images/old-browsers-bg/title-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, white, #72c6e4 4%, #0c5fa5 ); background: -webkit-gradient( linear, left top, left bottom, from(white), to(#0c5fa5), color-stop(0.03, #72c6e4) ); -moz-text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.2); -webkit-text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.2); text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.2); padding: 0.278em 0.444em 0.389em; } .block-content .h1 h1 { font-size: 1em; border: 0; background: none; -moz-text-shadow: none; -webkit-text-shadow: none; text-shadow: none; padding: 0; } .block-content h1.red, .block-content .h1.red, .block-content .red h1, .block-content .red .h1, .block-content.red h1, .block-content.red .h1, .red .block-content h1, .red .block-content .h1 { border-color: #bf3636 #5d0000 #0a0000; background: #790000 url(../images/old-browsers-bg/title-red-bg.png) repeat-x top; background: -moz-linear-gradient( top, white, #ca3535 4%, #790000 ); background: -webkit-gradient( linear, left top, left bottom, from(white), to(#790000), color-stop(0.03, #ca3535) ); } /************** Button-style links **************/ .button, .form legend, .legend, .mini-menu { line-height: 1.333em; padding: 0.167em 0.5em 0.25em; border: 1px solid white; -moz-border-radius: 0.417em; -webkit-border-radius: 0.417em; -webkit-background-clip: padding-box; border-radius: 0.417em; -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); text-decoration: none; font-weight: normal; -moz-text-shadow: none; -webkit-text-shadow: none; text-shadow: none; outline: 0; } .button { display: inline-block; } /* IE class */ .ie .button, .ie .form legend, .ie .legend, .ie .mini-menu { border-color: #cccccc; } .button { color: #666666; background: #dfdfdf url(../images/old-browsers-bg/button-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #f6f6f6, #dfdfdf ); background: -webkit-gradient( linear, left top, left bottom, from(#f6f6f6), to(#dfdfdf) ); } .button.red, .red .button { color: white; background: #790000 url(../images/old-browsers-bg/button-red-bg.png) repeat-x top; background: -moz-linear-gradient( top, #ca3535, #790000 ); background: -webkit-gradient( linear, left top, left bottom, from(#ca3535), to(#790000) ); } .button.red a, .red .button a { color: white; } a.button:hover, .mini-menu > li > a:hover { color: #115577; background: #98d2f3 url(../images/old-browsers-bg/button-hover-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #dff3fc, #98d2f3 ); background: -webkit-gradient( linear, left top, left bottom, from(#dff3fc), to(#98d2f3) ); } a.button.red:hover, .red a.button:hover { color: white; background: #9d0404 url(../images/old-browsers-bg/button-red-hover-bg.png) repeat-x top; background: -moz-linear-gradient( top, #fe6565, #9d0404 ); background: -webkit-gradient( linear, left top, left bottom, from(fe6565), to(#9d0404) ); } .form legend, .legend, .mini-menu { color: #666666; background: #e7e7e7 url(../images/old-browsers-bg/legend-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #f8f8f8, #e7e7e7 ); background: -webkit-gradient( linear, left top, left bottom, from(#f8f8f8), to(#e7e7e7) ); } .button img, .form legend img, .legend img, .mini-menu img { margin-bottom: -2px; } /******************** Button ********************/ button, .big-button { display: inline-block; border: 1px solid; border-color: #50a3c8 #297cb4 #083f6f; background: #0c5fa5 url(../images/old-browsers-bg/button-element-bg.png) repeat-x left top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, white, #72c6e4 4%, #0c5fa5 ); background: -webkit-gradient( linear, left top, left bottom, from(white), to(#0c5fa5), color-stop(0.03, #72c6e4) ); -moz-border-radius: 0.333em; -webkit-border-radius: 0.333em; -webkit-background-clip: padding-box; border-radius: 0.333em; color: white; -moz-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); -webkit-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); font-size: 1.167em; padding: 0.286em 1em 0.357em; line-height: 1.429em; cursor: pointer; font-weight: bold; } /* IE class */ .ie button { overflow: visible; } /* IE class */ .ie7 button { padding-top: 0.357em; padding-bottom: 0.214em; line-height: 1.143em; } button img, .big-button img { margin-bottom: -3px; } button:hover, .big-button:hover { border-color: #1eafdc #1193d5 #035592; background: #057fdb url(../images/old-browsers-bg/button-element-hover-bg.png) repeat-x left top; background: -moz-linear-gradient( top, white, #2bcef3 4%, #057fdb ); background: -webkit-gradient( linear, left top, left bottom, from(white), to(#057fdb), color-stop(0.03, #2bcef3) ); } button:active, .big-button:active { border-color: #5b848b #b2def1 #b2def1 #68a6ba; background: #3dbfed url(../images/old-browsers-bg/button-element-active-bg.png) repeat-x top; background: -moz-linear-gradient( top, #89e7f9, #3dbfed ); background: -webkit-gradient( linear, left top, left bottom, from(#89e7f9), to(#3dbfed) ); -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } button.red, .red button, .big-button.red, .red .big-button { color: white; border-color: #bf3636 #5d0000 #0a0000; background: #790000 url(../images/old-browsers-bg/button-element-red-bg.png) repeat-x top; background: -moz-linear-gradient( top, white, #ca3535 4%, #790000 ); background: -webkit-gradient( linear, left top, left bottom, from(white), to(#790000), color-stop(0.03, #ca3535) ); } button.red:hover, .red button:hover, .big-button.red:hover, .red .big-button:hover { border-color: #c24949 #9d3d3d #590909; background: #9d0404 url(../images/old-browsers-bg/button-element-red-hover-bg.png) repeat-x top; background: -moz-linear-gradient( top, white, #fe6565 4%, #9d0404 ); background: -webkit-gradient( linear, left top, left bottom, from(white), to(#9d0404), color-stop(0.03, #fe6565) ); } button.red:active, .red button:active, .big-button.red:active, .red .big-button:active { border-color: #7c5656 #f7cbcb #f7cbcb #a15151; background: #ff5252 url(../images/old-browsers-bg/button-element-red-active-bg.png) repeat-x top; background: -moz-linear-gradient( top, #ff9d9d, #ff5252 ); background: -webkit-gradient( linear, left top, left bottom, from(#ff9d9d), to(#ff5252) ); } button:disabled, button:disabled:hover, .big-button.disabled, .big-button.disabled:hover { color: #bfbfbf; border-color: #e9f2f6 #c4c3c3 #a2a2a2 #e3e2e2; background: #c8c8c8 url(../images/old-browsers-bg/button-element-disabled-bg.png) repeat-x top; background: -moz-linear-gradient( top, #f0f2f2, #c8c8c8 ); background: -webkit-gradient( linear, left top, left bottom, from(#f0f2f2), to(#c8c8c8) ); -moz-text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.75); -webkit-text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.75); text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.75); -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; cursor: auto; } /* IE class */ button.disabled, button.disabled:hover { color: #bfbfbf; border-color: #e9f2f6 #c4c3c3 #a2a2a2 #e3e2e2; background: #c8c8c8 url(../images/old-browsers-bg/button-element-disabled-bg.png) repeat-x top; cursor: auto; } button.grey, .big-button.grey { color: white; border-color: #a1a7ae #909498 #6b7076; background: #9fa7b0 url(../images/old-browsers-bg/button-element-grey-bg.png) repeat-x top; background: -moz-linear-gradient( top, white, #c5cbce 5%, #9fa7b0 ); background: -webkit-gradient( linear, left top, left bottom, from(white), to(#9fa7b0), color-stop(0.05, #c5cbce) ); -moz-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); -webkit-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); } button.grey:hover, .big-button.grey:hover { border-color: #a1a7b0 #939798 #6e7275; background: #b1b5ba url(../images/old-browsers-bg/button-element-grey-hover-bg.png) repeat-x top; background: -moz-linear-gradient( top, white, #d6dadc 4%, #b1b5ba ); background: -webkit-gradient( linear, left top, left bottom, from(white), to(#b1b5ba), color-stop(0.03, #d6dadc) ); } button.grey:active .big-button.grey:active { border-color: #666666 #ffffff #ffffff #979898; background: #dddddd url(../images/old-browsers-bg/button-element-grey-active-bg.png) repeat-x top; background: -moz-linear-gradient( top, #f1f1f1, #dddddd ); background: -webkit-gradient( linear, left top, left bottom, from(#f1f1f1), to(#dddddd) ); } button.small, .big-button.small { font-size: 0.833em; padding: 0.2em 0.3em 0.3em 0.2em; vertical-align: 0.2em; } /* IE class */ .ie button.small { padding: 0.5em 0.3em; vertical-align: 0.1em; } .ie7 button + button { margin-left: 0.25em; } /**************** Standard block ****************/ section { margin-bottom: 3em; } .block-content { border: 1px solid #999999; -moz-border-radius: 0.25em; -webkit-border-radius: 0.25em; -webkit-background-clip: padding-box; border-radius: 0.25em; padding: 1.667em; background: white; -moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.5); box-shadow: 0 0 4px rgba(0, 0, 0, 0.5); position: relative; } .block-content.dark-bg { border-color: #aaa #333 #000 #666; background: #555 url(../images/old-browsers-bg/content-dark-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #555, #222 ); background: -webkit-gradient( linear, left top, left bottom, from(#222), to(#555) ); color: white; } .block-border { padding: 0.833em; border: 1px solid white; border-color: rgba(255, 255, 255, 0.75); background: url(../images/old-browsers-bg/white20.png); background: rgba(255, 255, 255, 0.2); -moz-border-radius: 0.8em; -webkit-border-radius: 0.8em; -webkit-background-clip: padding-box; border-radius: 0.8em; -moz-box-shadow: 0 0 4px rgba(50, 50, 50, 0.5); -webkit-box-shadow: 0 0 4px rgba(50, 50, 50, 0.5); box-shadow: 0 0 4px rgba(50, 50, 50, 0.5); } .block-border .block-content { -moz-box-shadow: 0 0 0.8em rgba(255, 255, 255, 0.5); -webkit-box-shadow: 0 0 0.8em rgba(255, 255, 255, 0.5); box-shadow: 0 0 0.8em rgba(255, 255, 255, 0.5); } .block-border .block-content + .block-content { margin-top: 0.833em; } .block-content .no-margin { margin-left: -1.667em; margin-right: -1.667em; } .block-content p.no-margin + .no-margin, .block-content ul.no-margin + .no-margin, .block-content ol.no-margin + .no-margin, .block-content dl.no-margin + .no-margin { margin-top: -1.667em; } /* Recursion prevention */ .block-content .no-margin > .no-margin { margin-left: 0; margin-right: 0; } .block-content .no-margin:last-child { margin-bottom: -1.667em; -moz-border-radius-bottomleft: 0.167em; -moz-border-radius-bottomright: 0.167em; -webkit-border-bottom-left-radius: 0.167em; -webkit-border-bottom-right-radius: 0.167em; border-bottom-left-radius: 0.167em; border-bottom-right-radius: 0.167em; } /* Recursion prevention */ .block-content .no-margin > .no-margin:last-child { margin-bottom: 0; -moz-border-radius-bottomleft: 0; -moz-border-radius-bottomright: 0; -webkit-border-bottom-left-radius: 0; -webkit-border-bottom-right-radius: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; } /* IE class */ .block-content .no-margin.last-child { margin-bottom: -1.667em; } /* Recursion prevention */ .block-content .no-margin > .no-margin.last-child { margin-bottom: 0; } .block-content hr.no-margin { margin-bottom: 1.667em; } .block-content.no-padding { padding: 0; } .block-content.no-padding .no-margin { margin-left: 0; margin-right: 0; } .block-content p.no-margin + .no-margin, .block-content ul.no-margin + .no-margin, .block-content ol.no-margin + .no-margin, .block-content dl.no-margin + .no-margin { margin-top: -1.667em; } .block-content.no-padding .no-margin:last-child { margin-bottom: 0; } /* IE class */ .block-content.no-padding .no-margin.last-child { margin-bottom: 0; } /***************** Block header *****************/ .block-header { font-size: 2em; font-weight: bold; height: 3em; line-height: 3em; border-top: 1px solid #9bd2ee; border-bottom: 1px solid #b5b3b4; background: #0c5fa3 url(../images/old-browsers-bg/block-header-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #6dc3e6, #0c5fa3 ); background: -webkit-gradient( linear, left top, left bottom, from(#6dc3e6), to(#0c5fa3) ); text-align: center; color: white; -moz-text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75); -webkit-text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75); margin: 0 -0.833em 0.833em -0.833em; } .block-header:first-child { margin-top: -0.833em; } /* IE class */ .block-header.first-child { margin-top: -0.833em; } .block-header + .no-margin { margin-top: -1.667em; } .block-header.red, .red .block-header { border-top-color: #e46f6f; background: #790000 url(../images/old-browsers-bg/block-header-red-bg.png) repeat-x top; background: -moz-linear-gradient( top, #ca3535, #790000 ); background: -webkit-gradient( linear, left top, left bottom, from(#790000), to(#ca3535) ); } /**************** Block controls ****************/ .block-controls { text-align: right; border-bottom: 1px solid #999999; background: white url(../images/old-browsers-bg/block-controls-bg.png) repeat-x bottom; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, white, #e5e5e5 88%, #d8d8d8 ); background: -webkit-gradient( linear, left top, left bottom, from(white), to(#d8d8d8), color-stop(0.88, #e5e5e5) ); margin: 0 -1.667em 1.667em -1.667em; padding: 1em; } .no-margin .block-controls:first-child { margin-left: 0; margin-right: 0; } .block-controls:first-child { margin-top: -1.667em; } /* IE class */ .block-controls.first-child { margin-top: -1.667em; } .block-controls + .no-margin { margin-top: -1.667em; } .block-content.no-padding .block-controls { margin: 0 !important; border-bottom: 0; } ul.controls-buttons, div.controls-buttons { float: right; } ul.controls-buttons li, div.controls-buttons > div, div.controls-buttons > span, div.controls-buttons > a { display: block; float: left; margin: -1px 0 -1px 0.5em; line-height: 1.333em; padding: 0.333em 0.25em; } ul.controls-buttons li.sep, div.controls-buttons > div.sep, div.controls-buttons > span.sep { padding: 0; width: 2px; min-width: 2px; height: 4em; margin: -1em 0.25em -1em 0.75em; border: none; background: url(../images/controls-bt-sep.png) no-repeat bottom; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; -moz-border-radius: 0; -webkit-border-radius: 0; -webkit-background-clip: padding-box; border-radius: 0; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } ul.controls-buttons li.controls-block, ul.controls-buttons li a, div.controls-buttons > div, div.controls-buttons > span, div.controls-buttons > a { display: block; color: #333333; min-width: 1.083em; padding: 0.333em 0.5em; text-align: center; border: 1px solid white; -moz-border-radius: 0.5em; -webkit-border-radius: 0.5em; -webkit-background-clip: padding-box; border-radius: 0.5em; background: #e7e7e7 url(../images/old-browsers-bg/controls-bt-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #f8f8f8, #e7e7e7 ); background: -webkit-gradient( linear, left top, left bottom, from(#f8f8f8), to(#e7e7e7) ); -moz-box-shadow: 0 0 0.25em rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 0 0.25em rgba(0, 0, 0, 0.5); box-shadow: 0 0 0.25em rgba(0, 0, 0, 0.5); text-transform: uppercase; } ul.controls-buttons li a { margin: -0.333em -0.25em; line-height: 1.333em; } div.controls-buttons > div div, div.controls-buttons > div span, div.controls-buttons > div a { color: #333333; display: block; height: 1.333em; line-height: 1.333em; float: left; min-width: 1.083em; padding: 0.333em 0.5em; margin: -0.333em 0; text-align: center; text-transform: uppercase; } div.controls-buttons > div:hover div, div.controls-buttons > div:hover span, div.controls-buttons > div:hover a { color: white; } div.controls-buttons > div div:first-child, div.controls-buttons > div span:first-child, div.controls-buttons > div a:first-child { margin-left: -0.5em; } /* IE class */ div.controls-buttons > div div.first-child, div.controls-buttons > div span.first-child, div.controls-buttons > div a.first-child { margin-left: -0.5em; } div.controls-buttons > div > div:first-child, div.controls-buttons > div > span:first-child, div.controls-buttons > div > a:first-child { -moz-border-radius-topleft: 0.417em; -moz-border-radius-bottomleft: 0.417em; -webkit-border-top-left-radius: 0.417em; -webkit-border-bottom-left-radius: 0.417em; -webkit-background-clip: padding-box; border-top-left-radius: 0.417em; border-bottom-left-radius: 0.417em; } div.controls-buttons > div div:last-child, div.controls-buttons > div span:last-child, div.controls-buttons > div a:last-child { margin-right: -0.5em; } /* IE class */ div.controls-buttons > div div.last-child, div.controls-buttons > div span.last-child, div.controls-buttons > div a.last-child { margin-right: -0.5em; } div.controls-buttons > div > div:last-child, div.controls-buttons > div > span:last-child, div.controls-buttons > div > a:last-child { -moz-border-radius-topright: 0.417em; -moz-border-radius-bottomright: 0.417em; -webkit-border-top-right-radius: 0.417em; -webkit-border-bottom-right-radius: 0.417em; -webkit-background-clip: padding-box; border-top-right-radius: 0.417em; border-bottom-right-radius: 0.417em; } div.controls-buttons > div .control-first, div.controls-buttons > div .control-prev, div.controls-buttons > div .control-next, div.controls-buttons > div .control-last { min-width: auto; width: 16px; overflow: hidden; text-indent: 100px; background-repeat: no-repeat; background-position: center; } div.controls-buttons > div .control-first { background-image: url(../images/icons/fugue/control-double-180.png); } div.controls-buttons > div .control-prev { background-image: url(../images/icons/fugue/control-180.png); } div.controls-buttons > div .control-next { background-image: url(../images/icons/fugue/control.png); } div.controls-buttons > div .control-last { background-image: url(../images/icons/fugue/control-double.png); } /* IE class */ .ie ul.controls-buttons li.controls-block, .ie ul.controls-buttons li a, .ie div.controls-buttons > div, .ie div.controls-buttons > span, .ie div.controls-buttons > a { border-color: #cccccc; } ul.controls-buttons li a:hover, ul.controls-buttons li a.current, div.controls-buttons > div:hover, div.controls-buttons > span:hover, div.controls-buttons > a:hover, div.controls-buttons > .current { border-color: #1eafdc #1193d5 #035592; background: #057fdb url(../images/old-browsers-bg/block-control-hover-bg.png) repeat-x; background: -moz-linear-gradient( top, white, #2bcef3 5%, #057fdb ); background: -webkit-gradient( linear, left top, left bottom, from(white), to(#057fdb), color-stop(0.05, #2bcef3) ); color: white; } div.controls-buttons > div:hover a, div.controls-buttons > span:hover a { color: white; } div.controls-buttons > span.sep:hover { background: url(../images/controls-bt-sep.png) no-repeat bottom; } ul.controls-buttons li a:hover strong, ul.controls-buttons li a.current strong, div.controls-buttons > div:hover strong, div.controls-buttons > span:hover strong, div.controls-buttons > a:hover strong, div.controls-buttons > .current strong { color: white; } div.controls-buttons > div.sub-hover:hover { border: 1px solid white; background: #e7e7e7 url(../images/old-browsers-bg/controls-bt-bg.png) repeat-x top; background: -moz-linear-gradient( top, #f8f8f8, #e7e7e7 ); background: -webkit-gradient( linear, left top, left bottom, from(#f8f8f8), to(#e7e7e7) ); color: #333333; } div.controls-buttons > div.sub-hover:hover strong { color: #333333; } div.controls-buttons > div.sub-hover:hover div, div.controls-buttons > div.sub-hover:hover span, div.controls-buttons > div.sub-hover:hover a { color: #333333; } div.controls-buttons > div div:hover, div.controls-buttons > div span:hover, div.controls-buttons > div a:hover { background-color: #e0e0e0; background-color: rgba(0, 0, 0, 0.1); color: white; } div.controls-buttons > div.sub-hover div:hover, div.controls-buttons > div.sub-hover span:hover, div.controls-buttons > div.sub-hover a:hover { color: #333333; } /* DataTables specific style */ div.controls-buttons > div.sub-hover.paging_full_numbers span:hover { background-color: none; color: #333333; } div.controls-buttons > div.sub-hover.paging_full_numbers span.paginate_button:hover, div.controls-buttons > div.sub-hover.paging_full_numbers span.paginate_active:hover { background-color: #e0e0e0; background-color: rgba(0, 0, 0, 0.1); color: white; } div.controls-buttons > div .disabled { opacity: 0.5; filter: alpha(opacity=50); } div.controls-buttons > div .disabled:hover { background-color: transparent; } .controls-buttons img { margin: -0.25em 0; } /* IE class */ .ie7 .controls-buttons img { margin: 0; vertical-align: middle; } .controls-buttons img:first-child { margin-left: -0.085em; } /* IE class */ .controls-buttons img.first-child { margin-left: -0.085em; } .controls-buttons img:last-child { margin-right: -0.085em; } /* IE class */ .controls-buttons img.last-child { margin-right: -0.085em; } .controls-buttons .progress-bar { margin: -0.25em 0; } .controls-buttons input[type=text], .controls-buttons input[type=password], .controls-buttons .input-type-text, .controls-buttons select { margin-top: -0.5em; margin-bottom: -0.5em; } ul.controls-tabs { height: 47px; float: right; margin: -1em; padding-left: 1px; background: url(../images/controls-tabs-bg.png) no-repeat -48px 0; } ul.controls-tabs li { height: 48px; width: 49px; float: left; } ul.controls-tabs li:last-child { width: 48px; } /* IE class */ ul.controls-tabs li.last-child { width: 48px; } ul.controls-tabs li a { display: block; height: 100%; background: url(../images/controls-tabs-bg.png) no-repeat; line-height: 48px; text-align: center; text-decoration: none; color: #666666; position: relative; } ul.controls-tabs li a:hover { background-position: 0 -48px; } ul.controls-tabs li.current a, ul.controls-tabs li.current a:hover { background-position: 0 -96px; } ul.controls-tabs li a img { position: absolute; left: 50%; top: 50%; margin: -11px 0 0 -12px; } /***************** Block footer *****************/ .block-footer { background: #bfbfbf url(../images/old-browsers-bg/block-footer-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #8b8b8b, #a9a9a9 10%, #bdbdbd 30%, #bfbfbf ); background: -webkit-gradient( linear, left top, left bottom, from(#8b8b8b), to(#bfbfbf), color-stop(0.1, #a9a9a9), color-stop(0.3, #bdbdbd) ); margin: 0 -1.667em -1.667em -1.667em; -moz-border-radius: 0 0 0.167em 0.167em; -webkit-border-bottom-left-radius: 0.167em; -webkit-border-bottom-right-radius: 0.167em; border-radius: 0 0 0.167em 0.167em; padding: 0.5em 0.75em; line-height: 2em; color: #4d4d4d; } section .no-margin > .block-footer { margin-right: 0; margin-left: 0; margin-bottom: 0; -moz-border-radius: 0; -webkit-border-radius: ; border-radius: 0; } section .no-margin:last-child > .block-footer:last-child { -moz-border-radius: 0 0 0.167em 0.167em; -webkit-border-bottom-left-radius: 0.167em; -webkit-border-bottom-right-radius: 0.167em; border-radius: 0 0 0.167em 0.167em; } section .block-header + .block-footer, section .message.no-margin + .block-footer, section .with-head.no-margin + .block-footer { margin-top: -1.667em; } .block-footer .sep { display: inline-block; width: 2px; height: 3em; vertical-align: -0.667em; margin: -0.5em 0.25em; background: url(../images/controls-bt-sep.png) no-repeat bottom; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; } /****************** Switches ********************/ .switch-replace { display: inline-block; width: 70px; height: 30px; background: url(../images/switch-bg.png) no-repeat 0 -34px; vertical-align: middle; cursor: pointer; } .switch:checked + .switch-replace { background-position: 0 0; } .switch:disabled + .switch-replace { background-position: 0 -68px; } /** IE class **/ .switch-replace-checked { background-position: 0 0; } .switch-replace-disabled { background-position: 0 -68px; } .mini-switch-replace { display: inline-block; width: 40px; height: 20px; background: url(../images/mini-switch-bg.png) no-repeat 0 -24px; vertical-align: middle; cursor: pointer; } .mini-switch:checked + .mini-switch-replace { background-position: 0 0; } .mini-switch:disabled + .mini-switch-replace { background-position: 0 -48px; } /** IE class **/ .mini-switch-replace-checked { background-position: 0 0; } .mini-switch-replace-disabled { background-position: 0 -48px; } /****************** Messages ********************/ .message { line-height: 1.25em; margin-bottom: 2.5em; border: 1px solid #999999; background: #F0F0F0; -moz-border-radius: 0.333em; -webkit-border-radius: 0.333em; -webkit-background-clip: padding-box; border-radius: 0.333em; -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); position: relative; z-index: 89; } ul.message { padding: 0.583em 0 0.083em 0; } ul.message li { text-transform: uppercase; font-size: 0.833em; line-height: 1.3em; padding: 0.2em 1em 0.8em 3em; background-repeat: no-repeat; background-position: 0.8em 0.1em; } div.message, p.message { padding: 0.583em 0.833em 0.75em 2.5em; background-repeat: no-repeat; background-position: 0.667em 0.583em; } section .message { margin-bottom: 1.667em; } .message:last-child { margin-bottom: 0; } /* IE class */ .message.last-child { margin-bottom: 0; } .block-content .message { -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } .block-content .message.no-margin { margin: 0 -1.667em 1.667em -1.667em; } .block-content.no-padding .message.no-margin, .block-content .no-margin > .message.no-margin { margin-left: 0; margin-right: 0; } .block-content .message.no-margin, .block-content.no-padding .message { -moz-border-radius: 0; -webkit-border-radius: 0; -webkit-background-clip: padding-box; border-radius: 0; border-width: 1px 0; } .block-content.no-title > .message.no-margin:first-child { margin-top: -1.667em; } /* IE class */ .block-content.no-title > .message.no-margin.first-child { margin-top: -1.667em; } .block-content.no-title > .message.no-margin:first-child, .block-content.no-padding > .message:first-child { border-top: none; -moz-border-radius-topleft: 0.167em; -moz-border-radius-topright: 0.167em; -webkit-border-top-left-radius: 0.167em; -webkit-border-top-right-radius: 0.167em; border-top-left-radius: 0.167em; border-top-right-radius: 0.167em; } /* IE class */ .block-content.no-title > .message.no-margin.first-child, .block-content.no-padding > .message.first-child { border-top: none; } .block-content > .message.no-margin:last-child { margin-bottom: -1.667em; } /* IE class */ .block-content > .message.no-margin.last-child { margin-bottom: -1.667em; } .block-content > .message.no-margin:last-child, .block-content.no-padding > .message:last-child { border-bottom: none; -moz-border-radius-bottomleft: 0.167em; -moz-border-radius-bottomright: 0.167em; -webkit-border-bottom-left-radius: 0.167em; -webkit-border-bottom-right-radius: 0.167em; border-bottom-left-radius: 0.167em; border-bottom-right-radius: 0.167em; } /* IE class */ .block-content > .message.no-margin.last-child, .block-content.no-padding > .message.last-child { border-bottom: none; } section .block-controls + .message.no-margin, section .block-header + .message.no-margin, section .message.no-margin + .message.no-margin { margin-top: -1.667em; border-top: none; } .message { background-color: #e4e4dc; border-color: #999999; } .message.warning { background-color: #ffffcc; border-color: #c3c39e; } .message.error { background-color: #fff3f2; border-color: #c00000; } .message.success { background-color: #ddebdf; border-color: #339933; } .message.loading { background-color: #dcebf2; border-color: #3399cc; } .message li, div.message, p.message { background-image: url(../images/icons/fugue/information-ocre.png); color: #576a73; } .message li strong, div.message strong, p.message strong { color: #576a73; } .message.warning li, div.message.warning, p.message.warning { background-image: url(../images/icons/fugue/balloon.png); color: #56563e; } .message.warning li strong, div.message.warning strong, p.message.warning strong { color: #56563e; } .message.error li, div.message.error, p.message.error { background-image: url(../images/icons/fugue/cross-circle.png); color: #563f3e; } .message.error li strong, div.message.error strong, p.message.error strong { color: #563f3e; } .message.success li, div.message.success, p.message.success { background-image: url(../images/icons/fugue/tick-circle.png); color: #194a19; } .message.success li strong, p.message.success strong { color: #194a19; } .message.loading li, div.message.loading, p.message.loading { background-image: url(../images/info-loader.gif); color: #1e5774; } .message.loading li { background-position: 0.8em 0.4em; } div.message.loading, p.message.loading { background-position: 0.667em 0.917em; } .message.loading li strong, div.message.loading strong, p.message.loading strong { color: #1e5774; } /**************** Close button ******************/ .close-bt, ul li.close-bt, ul.message li.close-bt { display: block; position: absolute; top: 0.083em; right: 0.083em; font-size: 1em; line-height: 1em; width: 1em; height: 1em; padding: 0; margin: 0; background: url(../images/icons/fugue/cross-small.png) no-repeat center center; cursor: pointer; -moz-border-radius: 0.333em; -webkit-border-radius: 0.333em; -webkit-background-clip: padding-box; border-radius: 0.333em; opacity: 0.5; filter: alpha(opacity=0.5); } .close-bt:hover, ul li.close-bt:hover { opacity: 1; filter: none; } /****************** Mini-menu *******************/ .mini-menu { position: absolute; z-index: 89; right: 2em; top: 0; padding: 0; height: 1.833em; display: none; margin: -1.083em 0 -1.083em; white-space: nowrap; } td > .mini-menu { position: relative; right: 0; top: 0; float: right; margin-right: 1em; } :hover > .mini-menu { display: block; } .mini-menu > li { float: left; color: #999999; font-style: normal; height: 1.833em; } .mini-menu > li > a { display: block; line-height: 1.333em; height: 1.333em; padding: 0.25em 0.417em; border-left: 1px solid white; border-right: 1px solid #CCCCCC; color: #999; } /* IE class */ .ie7 .mini-menu > li > a { display: table-cell; vertical-align: middle; } .mini-menu > li:first-child > a { border-left: none; -moz-border-radius-topleft: 0.25em; -moz-border-radius-bottomleft: 0.25em; -webkit-border-top-left-radius: 0.25em; -webkit-border-bottom-left-radius: 0.25em; border-top-left-radius: 0.25em; border-bottom-left-radius: 0.25em; } /* IE class */ .mini-menu > li.first-child > a { border-left: none; } .mini-menu > li:last-child > a { border-right: none; -moz-border-radius-topright: 0.25em; -moz-border-radius-bottomright: 0.25em; -webkit-border-top-right-radius: 0.25em; -webkit-border-bottom-right-radius: 0.25em; border-top-right-radius: 0.25em; border-bottom-right-radius: 0.25em; } /* IE class */ .mini-menu > li.last-child > a { border-right: none; } .mini-menu > li > a img { margin: 0 0 -3px; } /* IE class */ .ie7 .mini-menu > li > a img { margin: 0; vertical-align: middle; } /********************* Tabs *********************/ ul.tabs li > a, ul.side-tabs li > a, ul.tabs li > span, ul.side-tabs li > span { display: block; background: #eeeeee url(../images/old-browsers-bg/tabs-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #ffffff, #eeeeee ); background: -webkit-gradient( linear, left top, left bottom, from(#ffffff), to(#eeeeee) ); padding: 0.583em; color: #808080; font-weight: bold; border: 1px solid #b3b3b3; text-decoration: none; } ul.tabs li > span, ul.side-tabs li > span { color: #bfbfbf; } ul.tabs li.current > a, ul.side-tabs li.current > a, ul.tabs li.current > span, ul.side-tabs li.current > span { background: white; } ul.tabs li > a:hover, ul.side-tabs li > a:hover { color: #3399cc; border-color: #3399cc; } ul.tabs li > a img, ul.side-tabs li > a img, ul.tabs li > span img, ul.side-tabs li > span img { margin: -2px 0 -3px 0; } /* IE class */ .ie7 ul.tabs li > a img, .ie7 ul.side-tabs > li a img, .ie7 ul.tabs li > span img, .ie7 ul.side-tabs > li span img { margin-bottom: -2px; } ul.tabs { margin-bottom: 1px; height: 2.167em; clear: none; } ul.tabs li { float: left; margin-right: 0.417em; } ul.tabs li > a, ul.tabs li > span { border-bottom: none; -moz-border-radius: 0.25em 0.25em 0 0; -webkit-border-top-left-radius: 0.25em; -webkit-border-top-right-radius: 0.25em; border-radius: 0.25em 0.25em 0 0; margin-right: 0.083em; } ul.tabs li.current > a, ul.tabs li.current > span { padding-bottom: 0.667em; } ul.tabs li.with-margin { margin-bottom: 0; margin-left: 1em; } ul.side-tabs { padding-top: 0.417em; } ul.side-tabs li > a, ul.side-tabs li > span { border-right: none; -moz-border-radius: 0.25em 0 0 0.25em; -webkit-border-top-left-radius: 0.25em; -webkit-border-bottom-left-radius: 0.25em; border-radius: 0.25em 0 0 0.25em; margin-bottom: 0.417em; } ul.side-tabs li.current > a, ul.side-tabs li.current > span { margin-right: -1px; } ul.side-tabs li.icon-tab { float: right; } ul.side-tabs li.icon-tab > a, ul.side-tabs li.icon-tab > span { padding-right: 0.5em; } ul.side-tabs li.with-margin { margin-bottom: 0; margin-top: 1em; } .tabs-content { background-color: white; border: 1px solid #b3b3b3; -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.2); -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.2); box-shadow: 0 0 3px rgba(0, 0, 0, 0.2); -moz-border-radius: 0.25em; -webkit-border-radius: 0.25em; -webkit-background-clip: padding-box; border-radius: 0.25em; padding: 1.667em; } ul.tabs + .tabs-content { -moz-border-radius-topleft: 0; -webkit-border-top-left-radius: 0; border-top-left-radius: 0; } .mini-tabs { border: 1px solid #b3b3b3; border-width: 1px 0; margin-bottom: 1.667em; padding: 0.583em 0 0 0.5em; height: 1.833em; background: #dbdbdb url(../images/old-browsers-bg/mini-tabs-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #fafafa, #dbdbdb ); background: -webkit-gradient( linear, left top, left bottom, from(#fafafa), to(#dbdbdb) ); } .mini-tabs.no-margin { margin: 0 -1.667em 1.667em -1.667em; } .mini-tabs.no-margin:first-child { margin-top: -1.667em; border-top: 0; -moz-border-radius: 0.167em 0.167em 0 0; -webkit-border-top-left-radius: 0.167em; -webkit-border-top-right-radius: 0.167em; border-radius: 0.167em 0.167em 0 0; } .mini-tabs li { float: left; height: 1.833em; line-height: 1.833em; margin-right: 0.5em; } .mini-tabs li > a { display: block; height: 1.333em; line-height: 1.333em; margin-top: -1px; padding: 0.25em 0.583em; border: 1px solid #b3b3b3; border-bottom: 0; -moz-border-radius: 0.25em 0.25em 0 0; -webkit-border-top-left-radius: 0.25em; -webkit-border-top-right-radius: 0.25em; border-radius: 0.25em 0.25em 0 0; background: #dddddd url(../images/old-browsers-bg/mini-tabs-tab-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #ffffff, #dddddd ); background: -webkit-gradient( linear, left top, left bottom, from(#ffffff), to(#dddddd) ); color: #666666; text-decoration: none; } .mini-tabs li > a img { margin-bottom: -1px; } /* IE class */ .ie7 .mini-tabs li > a img { vertical-align: middle; } .mini-tabs li.current > a { background: white; padding-bottom: 0.333em; } .mini-tabs li > a:hover { color: #3399cc; border-color: #3399cc; } /********************* Tips *********************/ #tips { z-index: 999900; position: absolute; top: 0; left: 0; pointer-events: none; } #tips div { position: absolute; background: #ffffcc; border: 1px solid #a6a6a6; -moz-border-radius: 0.333em; -webkit-border-radius: 0.333em; -webkit-background-clip: padding-box; border-radius: 0.333em; font-family: Arial, Helvetica, sans-serif; font-size: 0.75em; line-height: 1.222em; text-transform: uppercase; color: #333333; padding: 0.222em 0.444em; min-width: 5em; text-align: center; white-space: nowrap; } #tips div .arrow { font-size: 0; line-height: 0; width: 0; position: absolute; z-index: 89; left: 50%; margin-left: -6px; bottom: -7px; border-top: 7px solid #a6a6a6; border-left: 6px solid transparent; border-right: 6px solid transparent; } #tips div.tip-right .arrow { bottom: auto; left: -7px; top: 50%; margin-left: 0; margin-top: -6px; border-right: 7px solid #a6a6a6; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 0; } #tips div.tip-bottom .arrow { bottom: auto; top: -7px; border-top: 0; border-bottom: 7px solid #a6a6a6; } #tips div.tip-left .arrow { bottom: auto; left: auto; top: 50%; right: -7px; margin-left: 0; margin-top: -6px; border-left: 7px solid #a6a6a6; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-right: 0; } #tips div .arrow span { width: 0; position: absolute; z-index: 89; margin-left: -5px; top: -7px; border-top: 6px solid #ffffcc; border-left: 5px solid transparent; border-right: 5px solid transparent; } #tips div.tip-right .arrow span { border-right: 6px solid #ffffcc; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 0; margin-left: 0; left: 1px; top: auto; margin-top: -5px; } #tips div.tip-bottom .arrow span { top: 1px; border-top: 0; border-bottom: 6px solid #ffffcc; } #tips div.tip-left .arrow span { border-left: 6px solid #ffffcc; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-right: 0; margin-left: 0; right: 1px; top: auto; margin-top: -5px; } /***************** Loading tab ******************/ .loading-tab { background: #8e8e8e url(../images/old-browsers-bg/loading-tab-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #636363, #898989 25%, #8e8e8e ); background: -webkit-gradient( linear, left top, left bottom, from(#636363), to(#8e8e8e), color-stop(0.25, #898989) ); border: 1px solid #b6b6b6; -moz-border-radius: 0.25em; -webkit-border-radius: 0.25em; -webkit-background-clip: padding-box; border-radius: 0.25em; color: white; padding: 0.5em 0.75em; line-height: 2em; margin-bottom: 1.667em; -moz-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5); } .loading-tab.no-margin { border-width: 1px 0; -moz-border-radius: 0; -webkit-border-radius: 0; -webkit-background-clip: padding-box; border-radius: 0; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } .block-controls + .loading-tab.no-margin { border-top: 0; } .with-padding .loading-tab.stick-to-top { border-top: 0; -moz-border-radius: 0 0 0.25em 0.25em; -webkit-border-bottom-left-radius: 0.25em; -webkit-border-bottom-right-radius: 0.25em; border-radius: 0 0 0.25em 0.25em; margin-top: -1em; margin-bottom: 0; } /**************** Loading mask ******************/ .loading-mask { position: absolute; z-index: 89; top: 0; left: 0; padding: 0; margin: 0; width: 100%; height: 100%; background: url(../images/old-browsers-bg/black50.png); background: rgba(0, 0, 0, 0.5); overflow: hidden; } .loading-mask span { position: absolute; z-index: 89; left: 50%; top: 50%; margin-top: -3.5em; margin-left: -4.5em; padding: 60px 1em 1em; min-width: 7em; line-height: 1.25em; text-align: center; color: white; background: black url(../images/mask-loader.gif) no-repeat center 17px; -moz-border-radius: 0.5em; -webkit-border-radius: 0.5em; -webkit-background-clip: padding-box; border-radius: 0.5em; -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); } .loading-mask span.error { background-image: url(../images/icons/web-app/32/Delete.png); color: red; cursor: pointer; } .loading-mask span a { color: white; font-weight: bold; } /**************** Progress bar ******************/ .progress-bar { display: inline-block; position: relative; z-index: 89; height: 1.167em; margin: 0 0.25em; width: 6em; padding: 0; -moz-border-radius: 0.167em; -webkit-border-radius: 0.167em; -webkit-background-clip: padding-box; border-radius: 0.167em; color: #333333; border: 1px solid #808080; min-width: auto; text-transform: none; background: #a5a5a5 url(../images/old-browsers-bg/progress-bar-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( left, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0) 3%, rgba(0, 0, 0, 0) 97%, rgba(0, 0, 0, 0.2) ), -moz-linear-gradient( top, #808080, #9b9b9b 15%, #c3c3c3 85%, #a5a5a5 ); background: -webkit-gradient( linear, left top, left bottom, from(rgba(0, 0, 0, 0.2)), to(rgba(0, 0, 0, 0.2)), color-stop(0.03, rgba(0, 0, 0, 0)), color-stop(0.97, rgba(0, 0, 0, 0)) ), -webkit-gradient( linear, left top, left bottom, from(#808080), to(#a5a5a5), color-stop(0.15, #9b9b9b), color-stop(0.85, #c3c3c3) ); text-align: center; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; vertical-align: -0.083em; } /* IE class */ .ie7 .progress-bar { vertical-align: middle; margin-bottom: -0.083em; } .button .progress-bar { vertical-align: -0.333em; } .progress-bar:first-child { margin-left: 0; } /* IE class */ .progress-bar.first-child { margin-left: 0; } .progress-bar:last-child { margin-right: 0; } /* IE class */ .progress-bar.last-child { margin-right: 0; } .progress-bar > span, .progress-bar > span.blue { display: block; position: absolute; top: 0; left: 0; bottom: 0; width: 100%; font-size: 0.75em; line-height: 1.333em; color: white; padding: 0; margin: 0; -moz-border-radius: 0.11em; -webkit-border-radius: 0.11em; -webkit-background-clip: padding-box; -moz-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); -webkit-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); -moz-box-shadow: 0 0 1px black; -webkit-box-shadow: 0 0 1px black; box-shadow: 0 0 1px black; background: #4398c9 url(../images/old-browsers-bg/planning-bar-blue-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #b0cde5, #6ec3e3 15%, #0e62a8 73%, #4398c9 ); background: -webkit-gradient( linear, left top, left bottom, from(#b0cde5), to(#4398c9), color-stop(0.15, #6ec3e3), color-stop(0.73, #0e62a8) ); } .progress-bar > span.with-stripes, .progress-bar > span.blue.with-stripes { background: #3399cc url(../images/loading-stripes.gif); background-size: auto; -moz-background-size: auto; -webkit-background-size: auto; background: url(../images/loading-stripes.png), -moz-linear-gradient( top, #b0cde5, #6ec3e3 15%, #0e62a8 73%, #4398c9 ); background: url(../images/loading-stripes.gif), -webkit-gradient( linear, left top, left bottom, from(#b0cde5), to(#4398c9), color-stop(0.15, #6ec3e3), color-stop(0.73, #0e62a8) ); } .progress-bar > span.green { border-color: #15a80e; background: #56c943 url(../images/old-browsers-bg/planning-bar-green-bg.png) repeat-x top; background: -moz-linear-gradient( top, #b3e6b1, #8ae46f 15%, #15a80e 73%, #56c943 ); background: -webkit-gradient( linear, left top, left bottom, from(#b3e6b1), to(#56c943), color-stop(0.15, #8ae46f), color-stop(0.73, #15a80e) ); } .progress-bar > span.green.with-stripes { background: #33cc33 url(../images/loading-stripes.gif); background-size: auto; -moz-background-size: auto; -webkit-background-size: auto; background: url(../images/loading-stripes.png), -moz-linear-gradient( top, #b3e6b1, #8ae46f 15%, #15a80e 73%, #56c943 ); background: url(../images/loading-stripes.gif), -webkit-gradient( linear, left top, left bottom, from(#b3e6b1), to(#56c943), color-stop(0.15, #8ae46f), color-stop(0.73, #15a80e) ); } .progress-bar > span.orange { border-color: #a8750e; background: #c99c43 url(../images/old-browsers-bg/planning-bar-orange-bg.png) repeat-x top; background: -moz-linear-gradient( top, #e6d4b1, #e4bd6f 15%, #a8750e 73%, #c99c43 ); background: -webkit-gradient( linear, left top, left bottom, from(#e6d4b1), to(#c99c43), color-stop(0.15, #e4bd6f), color-stop(0.73, #a8750e) ); } .progress-bar > span.orange.with-stripes { background: #ff9900 url(../images/loading-stripes.gif); background-size: auto; -moz-background-size: auto; -webkit-background-size: auto; background: url(../images/loading-stripes.png), -moz-linear-gradient( top, #e6d4b1, #e4bd6f 15%, #a8750e 73%, #c99c43 ); background: url(../images/loading-stripes.gif), -webkit-gradient( linear, left top, left bottom, from(#e6d4b1), to(#c99c43), color-stop(0.15, #e4bd6f), color-stop(0.73, #a8750e) ); } .progress-bar > span.purple { border-color: #a10ea8; background: #b543c9 url(../images/old-browsers-bg/planning-bar-purple-bg.png) repeat-x top; background: -moz-linear-gradient( top, #e3b1e6, #c86fe4 15%, #a10ea8 73%, #b543c9 ); background: -webkit-gradient( linear, left top, left bottom, from(#e3b1e6), to(#b543c9), color-stop(0.15, #c86fe4), color-stop(0.73, #a10ea8) ); } .progress-bar > span.purple.with-stripes { background: #9933cc url(../images/loading-stripes.gif); background-size: auto; -moz-background-size: auto; -webkit-background-size: auto; background: url(../images/loading-stripes.png), -moz-linear-gradient( top, #e3b1e6, #c86fe4 15%, #a10ea8 73%, #b543c9 ); background: url(../images/loading-stripes.gif), -webkit-gradient( linear, left top, left bottom, from(#e3b1e6), to(#b543c9), color-stop(0.15, #c86fe4), color-stop(0.73, #a10ea8) ); } /* Clear Floated Elements ----------------------------------------------------------------------------------------------------*/ /* http://sonspring.com/journal/clearing-floats */ .clear { clear: both; display: block; overflow: hidden; visibility: hidden; width: 0; height: 0; } /* http://perishablepress.com/press/2008/02/05/lessons-learned-concerning-the-clearfix-css-hack */ .clearfix:after, .block-controls:after, .side-tabs:after { clear: both; content: ' '; display: block; font-size: 0; line-height: 0; visibility: hidden; width: 0; height: 0; } .clearfix, .block-controls, .side-tabs { display: inline-block; } * html .clearfix, * html .block-controls, * html .side-tabs { height: 1%; } .clearfix, .block-controls, .side-tabs { display: block; }
0a1b2c3d4e5
trunk/leilao/include/css/common.css
CSS
asf20
61,487
/** * Wizard styles */ .wizard-steps { height: 6em; line-height: 5.5em; border: 1px solid #b5b3b4; border-width: 1px 0; border-top: 1px solid #9bd2ee; background: #0c5fa3 url(../images/old-browsers-bg/block-header-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #6dc3e6, #0c5fa3 ); background: -webkit-gradient( linear, left top, left bottom, from(#6dc3e6), to(#0c5fa3) ); text-align: center; margin-left: -1.667em; margin-right: -1.667em; } .block-controls + .wizard-steps, .no-margin + .wizard-steps { margin-top: -1.667em; } .wizard-steps li { display: inline-block; height: 100%; color: white; font-size: 2em; font-weight: bold; font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Sans", Arial, Helvetica, sans-serif; -moz-text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75); -webkit-text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75); background: url(../images/wizard-head-effect.png) no-repeat right center; padding: 0 1.25em 0 0.75em; position: relative; z-index: 89; } /* IE class */ .ie7 .wizard-steps li { display: inline; } .wizard-steps li:last-child { background: none; padding-right: 0.75em; } /* IE class */ .wizard-steps li.last-child { background: none; padding-right: 0.75em; } .wizard-steps li.disabled { -moz-text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.25); -webkit-text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.25); text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.25); color: rgba(255, 255, 255, 0.5); } .wizard-steps li a { color: white; } .wizard-steps li.disabled a { color: rgba(255, 255, 255, 0.5); } .wizard-steps li .number { font-size: 0.583em; line-height: 1em; width: 1.571em; text-indent: 0; padding: 0.286em 0; position: absolute; float: none; z-index: 89; left: 50%; margin: 0 0 0 -1.143em; bottom: -0.786em; background: #0c5fa5 url(../images/old-browsers-bg/number-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #72c6e4, #0c5fa5 ); background: -webkit-gradient( linear, left top, left bottom, from(#72c6e4), to(#0c5fa5) ); border: 1px solid white; -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); -moz-text-shadow: none; -webkit-text-shadow: none; text-shadow: none; -moz-transition: all 100ms; -webkit-transition: all 100ms; -o-transition: all 100ms; transition: all 100ms; } .wizard-steps li:last-child .number { margin-left: -0.786em; } /* IE class */ .wizard-steps li.last-child .number { margin-left: -0.786em; } .wizard-steps li a:hover .number { margin-bottom: 0.286em; } .wizard-steps li.disabled .number { background: #dfdfdf url(../images/old-browsers-bg/button-bg.png) repeat-x top; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background: -moz-linear-gradient( top, #f6f6f6, #dfdfdf ); background: -webkit-gradient( linear, left top, left bottom, from(#f6f6f6), to(#dfdfdf) ); color: #333333; } .wizard-steps li .number .status-ok, .wizard-steps li .number .status-error, .wizard-steps li .number .status-warning { position: absolute; z-index: 89; width: 16px; height: 16px; background-repeat: no-repeat; right: -8px; top: -8px; } .wizard-steps li .number .status-ok { background-image: url(../images/icons/fugue/tick-circle.png); } .wizard-steps li .number .status-error { background-image: url(../images/icons/fugue/cross-circle.png); } .wizard-steps li .number .status-warning { background-image: url(../images/icons/fugue/exclamation-diamond.png); } .block-content .wizard-steps + .no-margin { margin-top: -1.667em; } .block-content .wizard-steps + .message.no-margin { margin-top: -1.667em; border-top: none; }
0a1b2c3d4e5
trunk/leilao/include/css/wizard.css
CSS
asf20
4,539
/************** Forms & pseudo-form **************/ .form fieldset, .fieldset { border: 1px solid #d9d9d9; padding: 1em 1.667em 1.667em 1.667em; -moz-border-radius: 0.25em; -webkit-border-radius: 0.25em; -webkit-background-clip: padding-box; border-radius: 0.25em; margin-bottom: 1.667em; } /* IE class */ .ie7 .block-content .form fieldset.no-margin, .ie7 .form.block-content fieldset.no-margin, .ie7 .form .block-content fieldset.no-margin { display: block; width: 100%; } .fieldset { position: relative; z-index: 89; padding-top: 1.667em; } .with-legend { margin-top: 1em; } /* IE class */ .ie .form fieldset { padding-top: 0; } .ie .form fieldset.no-legend { padding-top: 1.667em; } .form legend, .legend { margin-left: -0.833em; } .legend { position: absolute; left: 1.667em; top: -1.083em; } /* IE class */ .ie .form legend { margin-bottom: 1em; margin-top: -1em; } .ie .form .fieldset-with-legend { margin-top: 2em; } .ie .form .fieldset-with-legend-first-child { margin-top: 1em; } .form legend a, .legend a { display: block; margin: -0.25em -0.333em -0.333em -0.5em; padding: 0.25em 20px 0.333em 0.5em; color: #666; background: url(../images/icons/fugue/chevron-off.png) no-repeat right 60%; } .form legend a:hover, .legend a:hover { color: #3399cc; background-image: url(../images/icons/fugue/chevron.png); } .form fieldset.collapsed, .fieldset.collapsed { border: none; padding: 0; background: none; } .form fieldset.no-margin.collapsed, .fieldset.no-margin.collapsed { padding-left: 1.667em; } .form fieldset.no-margin.collapsed:last-child, .fieldset.no-margin.collapsed:last-child { padding-bottom: 1.667em; } /* IE class */ .form fieldset.no-margin.collapsed.last-child, .fieldset.no-margin.collapsed.last-child { padding-bottom: 0.667em; } .form fieldset.collapsed > *, .fieldset.collapsed > * { display: none; } .form fieldset.collapsed legend, .fieldset.collapsed .legend { display: block; margin-left: 0; } .ie7 .form fieldset.collapsed legend, .ie7 .fieldset.collapsed .legend { display: inline-block; } .form fieldset.collapsed legend a, .fieldset.collapsed .legend a { background-image: url(../images/icons/fugue/chevron-expand-off.png); } .form fieldset.collapsed legend a:hover, .fieldset.collapsed .legend a:hover { background-image: url(../images/icons/fugue/chevron-expand.png); } fieldset legend .show-expanded, .fieldset .legend .show-expanded { display: inline; } fieldset legend .show-collapsed, .fieldset .legend .show-collapsed { display: none; } fieldset.collapsed legend .show-expanded, .fieldset.collapsed .legend .show-expanded { display: none; } fieldset.collapsed legend .show-collapsed, .fieldset.collapsed .legend .show-collapsed { display: inline; } .block-content .form fieldset.no-margin, .block-content.form fieldset.no-margin, .form .block-content fieldset.no-margin, .block-content .fieldset.no-margin { border-color: #999999; border-width: 1px 0 1px 0; -moz-border-radius: 0; -webkit-border-radius: 0; -webkit-background-clip: padding-box; border-radius: 0; } .form fieldset.no-margin legend, .fieldset.no-margin .legend { margin-left: 0; } /* IE class */ .ie7 .form fieldset.no-margin legend { margin-left: -0.667em; } .form fieldset:last-child, .fieldset:last-child { margin-bottom: 0; } /* IE class */ .form fieldset.last-child, .fieldset.last-child { margin-bottom: 0; } .block-content .form fieldset.no-margin:last-child, .block-content.form fieldset.no-margin:last-child, .form .block-content fieldset.no-margin:last-child, section .fieldset.no-margin:last-child { border-bottom: 0; -moz-border-radius: 0 0 0.167em 0.167em; -webkit-border-bottom-left-radius: 0.167em; -webkit-border-bottom-right-radius: 0.167em; border-radius: 0 0 0.167em 0.167em; } /* IE class */ .block-content .form fieldset.no-margin.last-child, .block-content.form fieldset.no-margin.last-child, .form .block-content fieldset.no-margin.last-child, .fieldset.no-margin.last-child { border-bottom: 0; } .form label, .form .label { color: #808080; font-weight: bold; display: block; margin-bottom: 0.5em; } .form label.light, .form .label.light { font-weight: normal; color: #777; } .form label.inline, .form .label.inline { display: inline; float: none; margin: 0; font-weight: normal; } .form .required label, .form .required .label, .form label.required, .form .label.required, .form label.inline.required, .form .label.inline.required { color: black; } .form .required label:before, .form .required .label:before, .form label.required:before, .form .label.required:before { color: red; content: "* "; } /** IE class **/ .form .required-label-before { color: red; } p.inline-label, .inline-label p { padding-left: 20em; } p.inline-mini-label, .inline-mini-label p { padding-left: 5em; } p.inline-small-label, .inline-small-label p { padding-left: 11em; } p.inline-medium-label, .inline-medium-label p { padding-left: 15em; } .inline-label label, .inline-label .label, .inline-mini-label label, .inline-mini-label .label, .inline-small-label label, .inline-small-label .label, .inline-medium-label label, .inline-medium-label .label { display: block; float: left; color: #333333; padding: 0.667em 0 0.583em; } .inline-label label, .inline-label .label { width: 19em; margin-left: -20em; } .inline-mini-label label, .inline-mini-label .label { width: 4em; margin-left: -5em; } .inline-small-label label, .inline-small-label .label { width: 10em; margin-left: -11em; } .inline-medium-label label, .inline-medium-label .label { width: 14em; margin-left: -15em; } /** IE class **/ .form input[type=text], .form input[type=password], .form .input-type-text { font-size: 1em; line-height: 1em; color: #333333; padding: 0.5em; border: 1px solid #89bad3; background: white url(../images/old-browsers-bg/input-bg.png) repeat-x top; background: -moz-linear-gradient( top, #d4d4d4, #ebebeb 3px, white 27px ), white; background: -webkit-gradient( linear, left 0px, left 27px, from(#d4d4d4), to(white), color-stop(0.12, #ebebeb) ), white; -moz-border-radius: 0.417em; -webkit-border-radius: 0.417em; -webkit-background-clip: padding-box; border-radius: 0.417em; } .form input[type=text], .form input[type=password] { padding-bottom: 0.583em; } .form input[type=text]:focus, .form input[type=password]:focus, .form .input-type-text:focus, .form select:focus, .form textarea:focus { border-color: #3399cc; } /** IE selector **/ .form .input-focus { border-color: #3399cc; } .form span.input-type-text { display: inline-block; } /** IE class **/ .ie7 .form p.input-type-text { display: inline-block; } .form .input-type-text input[type=text], .form .input-type-text input[type=password] { padding: 0; border: none; background: none; -moz-border-radius: 0; -webkit-border-radius: 0; -webkit-background-clip: padding-box; border-radius: 0; margin: 0 0 1px 0; } /** IE class **/ .ie7 .form .input-type-text input[type=text] { float: left; } .form .input-type-text img { margin: 0 0 -3px 0.2em; } .form select, .form textarea { color: #333333; font-size: 1em; padding: 0.417em; border: 1px solid #89bad3; -moz-border-radius: 0.417em; -webkit-border-radius: 0.417em; -webkit-background-clip: padding-box; border-radius: 0.417em; } .form textarea { background: white url(../images/old-browsers-bg/input-bg.png) repeat-x top; background: -moz-linear-gradient( top, #d4d4d4, #ebebeb 3px, white 27px ), white; background: -webkit-gradient( linear, left 0px, left 27px, from(#d4d4d4), to(white), color-stop(0.12, #ebebeb) ), white; } .form select { font-size: 1.083em; padding: 0.385em; } .form input[type=text].small, .form input[type=password].small, .form select.small, .form textarea.small { font-size: 1em; padding: 0.167em; -moz-border-radius: 0.25em; -webkit-border-radius: 0.25em; -webkit-background-clip: padding-box; border-radius: 0.25em; } .form input[type=text].small, .form input[type=password].small { padding: 0.25em; } .form input[type=text].smaller, .form input[type=password].smaller, .form select.smaller, .form textarea.smaller { font-size: 1em; padding: 0; -moz-border-radius: 0; -webkit-border-radius: 0; -webkit-background-clip: padding-box; border-radius: 0; } .form input[type=text].big, .form input[type=password].big, .form select.big, .form textarea.big { font-size: 1.5em; } .form input[type=text].bigger, .form input[type=password].bigger, .form select.bigger, .form textarea.bigger { font-size: 2.5em; } .form input[type=radio], .form input[type=checkbox] { vertical-align: -9%; margin: 0; padding: 0; } /** IE class **/ .form .input-type-check { vertical-align: -7%; } .form input[type=radio] + label, .form input[type=checkbox] + label { color: #333333; font-weight: normal; display: inline; margin-bottom: 0; padding-right: 0.5em; } /** IE class **/ .form .input-type-check-label { color: #333333; font-weight: normal; display: inline; margin-bottom: 0; padding-right: 0.5em; } .form input[type=radio] + label:last-child, .form input[type=checkbox] + label:last-child { padding-right: 0; } /** IE class **/ .form .input-type-check-label-last-child { padding-right: 0; } .checkable-list { padding-top: 0.333em; line-height: 1.25em; } .checkable-list li { padding: 0 0 0.75em 1.25em; } .checkable-list li:last-child { padding-bottom: 0; } /** IE class **/ .checkable-list li.last-child { padding-bottom: 0; } .checkable-list li input[type=radio], .checkable-list li input[type=checkbox] { float: left; vertical-align: baseline; margin: 1px 0 0 -1.167em; } /** IE class **/ .ie .checkable-list li input[type=radio], .ie .checkable-list li input[type=checkbox] { margin: -3px 0 0 -1.25em; } .checkable-list li .input-type-radio, .checkable-list li .input-type-checkbox { float: left; margin: -3px 0 0 -1.25em; } .full-width { -moz-box-sizing: border-box; -ms-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; width: 100%; } .ie7 .full-width { width: 93%; } .ie7 select.full-width { width: 100%; } .input-with-button input[type=text] { width: 65%; margin-right: 3%; } /** IE class **/ .input-with-button .input-type-text { width: 65%; margin-right: 3%; } .input-with-button select { width: 70%; margin-right: 3%; } .input-with-button button { width: 25%; } .input-height { display: block; line-height: 1em; padding: 0.583em 0 0.75em; border: 1px solid transparent; } .input-height.grey-bg { background: #cccccc; border: 1px solid #cccccc; -moz-border-radius: 0.25em; -webkit-border-radius: 0.25em; -webkit-background-clip: padding-box; border-radius: 0.25em; padding-left: 0.75em; padding-right: 0.75em; } p.input-height, p.input-height.grey-bg { line-height: 1.25em; padding-top: 0.5em; padding-bottom: 0.583em; } .one-line-input { text-align: right; } .one-line-input label { float: left; margin: 0.2em 0 0 0; } .form input[type=text].error, .form input[type=password].error, .form .input-type-text.error { border-color: #CC0000; } .check-ok, .check-error, .check-warning { display: block; position: absolute; z-index: 89; width: 16px; height: 16px; right: -8px; top: -8px; } .check-ok { background: url(../images/icons/fugue/tick-circle-blue.png) no-repeat; } .check-error { background: url(../images/icons/fugue/cross-circle.png) no-repeat; } .check-warning { background: url(../images/icons/fugue/exclamation-diamond.png) no-repeat; } span.relative > input + .check-ok, span.relative > select + .check-ok, span.relative > input + .check-error, span.relative > select + .check-error, span.relative > input + .check-warning, span.relative > select + .check-warning { margin-top: -0.667em; right: -4px; } p span.relative > input + .check-ok, p span.relative > select + .check-ok, p span.relative > input + .check-error, p span.relative > select + .check-error, p span.relative > input + .check-warning, p span.relative > select + .check-warning { margin-top: -0.583em; } .btAction{ float: right; }
0a1b2c3d4e5
trunk/leilao/include/css/form.css
CSS
asf20
13,582
<?php include_once 'include/php/addendum/annotations.php'; /** * Description of ValidatorAction * * Classe que faz a validação de acordo com as annotations nos beans * * @author Magno */ class ValidatorAction { private $class; private $erros; function __construct($class) { $this->class = $class; $this->erros = array(); } /** * Valida alguma propriedade especifica da classe (instancia) passada * @return Array com os erros (objeto metadado) */ public function validate($property){ $ref = new ReflectionAnnotatedProperty($this->class, $property); $annotations = $ref->getAllAnnotations(); $errosTemp = array(); foreach ($annotations as $anot) { try { $get = "get".ucfirst($property); $anot->validate($this->class->$get()); } catch (ValidatorException $ve) { $erroMeta = new ErroMeta($ref->class, $property, $ve->getMessage()); $errosTemp[] = $erroMeta; $this->erros[] = $erroMeta; } } return $errosTemp; } /** * Valida todas as propriedades da classe (instancia) passada * @return Array com os erros (objeto metadado) */ public function validateAll(){ $this->erros = array(); $reflec = new ReflectionClass($this->class); foreach($reflec->getProperties() as $att){ $this->validate($att->getName()); } return $this->erros; } } ?>
0a1b2c3d4e5
trunk/leilao/action/ValidatorAction.class.php
PHP
asf20
1,856
<?php /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * Description of bonus * * @author Eucassio Gonçalves - eucassiojr@gmail.com */ class BonusAction extends ActionDefault { private $bonusService; public static $VIEW_BONUS = "view/bonus/"; function BonusAction() { parent::__construct(); $this->setValueOutput("bonusMenu", "current"); $this->bonusService = new BonusService(); } public function getView(){ return BonusAction::$VIEW_BONUS; } public function cadastro() { $this->setValueOutput("bonusSubmenu", "current"); $this->show(BonusAction::$VIEW_BONUS . "cadastro.tpl"); } public function salvar($bonusBean) { $this->bonusService->salvar($bonusBean); parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_SUCCESS, "Operação Realizada Com Sucesso!!!")); parent::chain('BonusAction.listar'); } public function editar($bonusID) { } public function listar() { return $this->bonusService->listar(0,"",-1); } public function buscar() { } public function excluir($bonusID) { } public function detalhes($bonusID) { } } ?>
0a1b2c3d4e5
trunk/leilao/action/BonusAction.class.php
PHP
asf20
1,330
<?php /** * Description of ConviteAction * * @author Magno */ class ConviteAction extends ActionDefault { private $conviteService; private $statusService; public static $VIEW_CONVITE = "view/convite/"; function ConviteAction() { parent::__construct(); $this->conviteService = new ConviteService(); $this->statusService = new StatusService(); } public function buscar() { } public function cadastro() {} public function detalhes($conviteID) { } public function editar($conviteID) { } public function excluir($conviteID) { try{ if($conviteID <= 0){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, "Código do Convite Não Encontrado!!!")); parent::voltar(); return; } $clienteBean = $this->conviteService->buscarPorID($conviteID,true); if($clienteBean == null){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, "Convite Não Encontrado!!!")); parent::voltar(); return; } $clienteBean->setStatus($this->statusService->buscarPorID(Constantes::$ST_CONV_EXCLUIDO)); $this->conviteService->salvar($clienteBean); parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_SUCCESS, Constantes::$STR_MSG_SUCCESS)); parent::chain('ConviteAction.listar'); }catch(Exception $ex){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, $ex->getMessage())); parent::voltar(); } } public function listar() { parent::setValueOutput('status', Util::arrayCombo($this->statusService->listar(0, Constantes::$STATUS_CONVITE), 'statusID', 'descricao',' -- TODOS --')); $this->buscaListaPaginada(); } public function tabela($pagina = 1, $email = "", $statusID = -1) { $this->buscaListaPaginada($pagina, $email, $statusID); parent::show($this->getView().'tabela.tpl'); } private function buscaListaPaginada($pagina = 1, $email = "", $statusID = -1){ $convites = $this->conviteService->listar($pagina, $email, -1, $statusID, true); $total = $this->conviteService->total($email, -1, $statusID); parent::setValueOutput('convites', $convites); parent::setValueOutput('pagina', $pagina); parent::setValueOutput('numPaginas', Util::calculaNumPaginas($total)); } public function salvar($mensagem) { include_once 'include/php/addendum/annotations.php'; try { $emails = explode("\n", parent::getValueInput('emails')); $emailValidator = new EmailValidator(); $errosValidacao = array(); $convites = array(); $emailsAux = array(); #$clienteBean = parent::getUserSession(); $clienteBean = new ClienteBean(12); //soh p testess $statusBean = $this->statusService->buscarPorID(Constantes::$ST_CONV_NAO_ACEITO); for ($i = 0; $i < count($emails); $i++) { try { $emails[$i] = trim($emails[$i]); if(EmailService::existeEmailArray($emails[$i], $emailsAux)){ parent::setValueOutput("msg",new MensagemMeta(Constantes::$MSG_ERROR, "Erro, Você não pode fornecer o mesmo email mais de uma vez!!!")); parent::voltar(); return; } $emailValidator->validate($emails[$i]); $emailsAux[] = $emails[$i]; $convites[] = new ConviteBean(0, $emails[$i], $mensagem, $clienteBean, null, $statusBean); } catch (ValidatorException $ve) { $errosValidacao[] = new ErroMeta('', '', $emails[$i].' - '.$ve->getMessage()); } } if(count($errosValidacao) > 0){ parent::setValueOutput(BaseAction::$ERROS_VALIDACAO, $errosValidacao); parent::voltar(); return; } $convites = $this->conviteService->salvarConvites($convites); $this->conviteService->enviarConvites($convites); die('ok'); } catch (Exception $ex) { parent::setValueOutput(Constantes::$MSG_ERROR, $ex->getMessage()); parent::voltar(); } } public function getView() { return ConviteAction::$VIEW_CONVITE; } } ?>
0a1b2c3d4e5
trunk/leilao/action/ConviteAction.class.php
PHP
asf20
4,892
<?php /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * Description of resposta * * @author Daniel Medeiros - ichigo_dan@hotmail.com */ class RespostaAction extends ActionDefault { private $respostaService; private $enqueteService; public static $VIEW_RESPOSTA = "view/resposta/"; function RespostaAction() { parent::__construct(); $this->setValueOutput("respostaMenu", "current"); $this->respostaService = new RespostaService(); $this->enqueteService = new EnqueteService(); } public function getView(){ return RespostaAction::$VIEW_RESPOSTA; } public function cadastro() { $enqueteID = parent::getValueInput('enqueteID'); parent::setValueOutput("enqueteID", $enqueteID); $this->setValueOutput("respostaSubmenu", "current"); parent::setValueOutput("respostas", $this->respostaService->listar(0, "", $enqueteID, false)); $this->show(RespostaAction::$VIEW_RESPOSTA . "cadastro.tpl"); } public function salvar($respostaBean) { $enqueteID = parent::getValueInput('enqueteID'); if($respostaBean->getRespostaID() != 0){//editando $respostaBean->setEnquete($this->respostaService->buscarPorID($respostaBean->getRespostaID(), true)->getEnquete()); }else{//criando $respostaBean->setEnquete($this->enqueteService->buscarPorID($enqueteID)); } $this->respostaService->salvar($respostaBean); parent::setValueOutput("msg2", new MensagemMeta(Constantes::$MSG_SUCCESS, Constantes::$STR_MSG_SUCCESS)); parent::setValueOutput("respostas", $this->respostaService->listar(0, "", $enqueteID, false)); parent::show($this->getView().'tabelaSimples.tpl'); } public function editar($respostaID) { try{ if($respostaID <= 0){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, "Código da Resposta Não Encontrado!!!")); parent::voltar(); return; } $respostaBean = $this->respostaService->buscarPorID($respostaID); if($respostaBean == null){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, "Resposta Não Encontrada!!!")); parent::voltar(); return; } parent::setObjectOutput($respostaBean); parent::setValueOutput("enqueteID", parent::getValueInput('enqueteID')); parent::setValueOutput("respostas", $this->respostaService->listar(0, "", parent::getValueInput('enqueteID'), false)); $this->show(RespostaAction::$VIEW_RESPOSTA . "cadastro.tpl"); }catch(Exception $ex){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, $ex->getMessage())); parent::voltar(); } } public function listar() { //parent::setValueOutput('status', Util::arrayCombo($this->statusService->listar(0, Constantes::$STATUS_ENQUETE), 'statusID', 'descricao',' -- TODOS --')); $enqueteID = parent::getValueInput('enqueteID'); $this->buscaListaPaginada(1,"",$enqueteID); } public function tabela($pagina = 1, $descricao = "", $enqueteID = 0) { $this->buscaListaPaginada($pagina, $descricao, $enqueteID); parent::show('view/resposta/tabela.tpl'); } public function buscar() { } public function excluir($respostaID) { try{ $this->excluirNormal($respostaID); parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_SUCCESS, Constantes::$STR_MSG_SUCCESS)); parent::chain('RespostaAction.listar'); }catch(Exception $ex){ parent::voltar(); } } public function excluirAjax($respostaID) { $this->excluirNormal($respostaID); parent::setValueOutput("msg2", new MensagemMeta(Constantes::$MSG_SUCCESS, Constantes::$STR_MSG_SUCCESS)); parent::show($this->getView().'tabelaSimples.tpl'); } public function excluirNormal($respostaID) { try{ if($respostaID <= 0){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, "Código da Resposta Não Encontrado!!!")); parent::voltar(); return; } $respostaBean = $this->respostaService->buscarPorID($respostaID, true); if($respostaBean == null){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, "Resposta Não Encontrada!!!")); parent::voltar(); return; } $this->respostaService->excluir($respostaID); parent::setValueOutput("respostas", $this->respostaService->listar(0, "", parent::getValueInput('enqueteID'), false)); }catch(Exception $ex){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, $ex->getMessage())); parent::voltar(); } } public function detalhes($respostaID) { } private function buscaListaPaginada($pagina = 1, $descricao = "", $enqueteID = 0){ $respostas = $this->respostaService->listar($pagina, $descricao, $enqueteID, true); $total = $this->respostaService->total($descricao, $enqueteID); parent::setValueOutput('respostas', $respostas); parent::setValueOutput('pagina', $pagina); parent::setValueOutput('numPaginas', Util::calculaNumPaginas($total)); } } ?>
0a1b2c3d4e5
trunk/leilao/action/RespostaAction.class.php
PHP
asf20
5,616
<?php /** * Description of ClienteAction * * @author Magno */ class ClienteAction extends ActionDefault{ private $clienteService; private $estadoService; private $cidadeService; private $statusService; private $mediaService; public static $VIEW_CLIENTE = "view/cliente/"; function __construct() { parent::__construct(); $this->clienteService = new ClienteService(); $this->estadoService = new EstadoService(); $this->cidadeService = new CidadeService(); $this->statusService = new StatusService(); $this->mediaService = new MediaService(); } public function buscar() { } public function cadastro() { parent::setValueOutput('estadosCivil', TiposGenericosService::listarEstadoCivil(true)); } public function detalhes($clienteID) { } public function editar($clienteID) { try{ if($clienteID <= 0){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, "Código do Cliente Não Encontrado!!!")); parent::voltar(); return; } $clienteBean = $this->clienteService->buscarPorID($clienteID, false); if($clienteBean == null){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, "Cliente Não Encontrado!!!")); parent::voltar(); return; } parent::setObjectOutput($clienteBean->getUsuario()); /** Dados do Usuario **/ parent::setObjectOutput($clienteBean->getPessoa()); /** Dados da Pessoa **/ parent::setObjectOutput($clienteBean->getPessoa()->getEndereco(), '', 'End'); /** Dados do Endereço **/ parent::setValueOutput('avisosPorEmail', $clienteBean->getAvisosPorEmail()); parent::setValueOutput('cidadeEnd', $clienteBean->getPessoa()->getEndereco()->getCidade()->getNome()); parent::setValueOutput('estadoEnd', $clienteBean->getPessoa()->getEndereco()->getCidade()->getEstado()->getSigla()); $this->cadastro(); parent::show(ClienteAction::$VIEW_CLIENTE."cadastro.tpl"); }catch(Exception $ex){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, $ex->getMessage())); parent::voltar(); } } public function excluir($clienteID) { try{ if($clienteID <= 0){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, "Código do Cliente Não Encontrado!!!")); parent::voltar(); return; } $clienteBean = $this->clienteService->buscarPorID($clienteID); if($clienteBean == null){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, "Cliente Não Encontrado!!!")); parent::voltar(); return; } $clienteBean->setStatus($this->statusService->buscarPorID(Constantes::$ST_USU_EXCLUIDO)); $this->clienteService->salvar($clienteBean); parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_SUCCESS, Constantes::$STR_MSG_SUCCESS)); parent::chain('ClienteAction.listar'); }catch(Exception $ex){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, $ex->getMessage())); parent::voltar(); } } public function listar() { parent::setValueOutput('status', Util::arrayCombo($this->statusService->listar(0, Constantes::$STATUS_USUARIO), 'statusID', 'descricao',' -- TODOS --')); $this->buscaListaPaginada(); } public function tabela($pagina = 1, $email = "", $login = "", $statusID = -1) { $this->buscaListaPaginada($pagina, $email, $login, $statusID); parent::show(ClienteAction::$VIEW_CLIENTE.'tabela.tpl'); } private function buscaListaPaginada($pagina = 1, $email = "", $login = "", $statusID = -1){ $clientes = $this->clienteService->listar($pagina, $email, $login, $statusID, false); $total = $this->clienteService->total($email, $login, $statusID); parent::setValueOutput('clientes', $clientes); parent::setValueOutput('pagina', $pagina); parent::setValueOutput('numPaginas', Util::calculaNumPaginas($total)); } public function salvar($usuarioBean) { try{ $uploadService = new UploadService(); $enderecoBean = parent::getObjectInput('EnderecoBean', '', 'End'); $pessoaBean = parent::getObjectInput('PessoaBean'); $usuarioID = intval(parent::getValueInput('usuarioID')); $statusBean = $this->statusService->buscarPorID(Constantes::$ST_USU_CADASTRADO); $cidadeBean = $this->cidadeService->buscarPorSiglaEstadoENome(parent::getValueInput('estadoEnd'), parent::getValueInput('cidadeEnd')); if($cidadeBean == null){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, 'Cidade Não Encontrada!!!')); parent::voltar(); return; } $enderecoBean->setCidade($cidadeBean); $pessoaBean->setEndereco($enderecoBean); $mediaBean = new MediaBean(); if($usuarioID > 0){ $usuarioService = new UsuarioService(); $mediaBean = $usuarioService->buscarPorID($usuarioID, true)->getMedia(); } $caminhoMedia = UploadService::salvarArquivoSimples('media',Constantes::$DIR_IMAGENS); if(strlen($caminhoMedia) <= 0){ $caminhoMedia = Constantes::$DIR_UPLOAD.Constantes::$DIR_IMAGENS.Constantes::$IMG_ADM_DEFAULT; } $mediaBean->setCaminho($caminhoMedia); $usuarioBean->setStatus($statusBean); $usuarioBean->setMedia($mediaBean); $clienteBean = new ClienteBean(); $aviEmail = intval(parent::getValueInput('avisosPorEmail')); if($aviEmail == 0) $aviEmail = Constantes::$NAO; $clienteBean->setAvisosPorEmail($aviEmail); /********************* INPORTANTE ************************/ $clienteBean->setNumLances(Constantes::$NUM_LANCES_INICIAL); /********************* INPORTANTE ************************/ $clienteBean->setUsuario($usuarioBean); $clienteBean->setPessoa($pessoaBean); $this->clienteService->salvar($clienteBean); parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_SUCCESS, Constantes::$STR_MSG_SUCCESS)); parent::chain('ClienteAction.listar'); }catch(ValidatorException $vex){ throw new ValidatorException($vex->getMessage()); }catch(Exception $ex){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, $ex->getMessage())); parent::voltar(); } } public function getView() { return ClienteAction::$VIEW_CLIENTE; } } ?>
0a1b2c3d4e5
trunk/leilao/action/ClienteAction.class.php
PHP
asf20
7,437
<?php /** * Description of UsuarioAction * * @author Magno */ class UsuarioAction extends BaseAction{ private $usuarioService; function __construct() { parent::__construct(); $this->usuarioService = new UsuarioService(); } public function validaLogin(){ $usuarioID = parent::getValueInput('usuarioID'); $login = parent::getValueInput('login'); $existe = ''; if($usuarioID > 0){ $usuarioBean = $this->usuarioService->buscarPorID($usuarioID); if(strcmp($usuarioBean->getLogin(), $login) == 0){ $existe = 'true'; }else{ if($this->usuarioService->exitePorLogin($login)) $existe = 'false'; else $existe = 'true'; } }else{ if($this->usuarioService->exitePorLogin($login)) $existe = 'false'; else $existe = 'true'; } echo $existe; } public function validaEmail(){ $usuarioID = parent::getValueInput('usuarioID'); $email = parent::getValueInput('email'); $existe = ''; if($usuarioID > 0){ $usuarioBean = $this->usuarioService->buscarPorID($usuarioID); if(strcmp($usuarioBean->getEmail(), $email) == 0){ $existe = 'true'; }else{ if($this->usuarioService->exitePorEmail($email)) $existe = 'false'; else $existe = 'true'; } }else{ if($this->usuarioService->exitePorEmail($email)) $existe = 'false'; else $existe = 'true'; } echo $existe; } } ?>
0a1b2c3d4e5
trunk/leilao/action/UsuarioAction.class.php
PHP
asf20
1,819
<?php /** * Classe abstrata para padronizar as Actions com CRUD * @author Magno */ abstract class ActionDefault extends BaseAction{ public abstract function cadastro(); public abstract function salvar($bean); public abstract function editar($beanID); public abstract function listar(); public abstract function buscar(); public abstract function excluir($beanID); public abstract function detalhes($beanID); public abstract function getView(); } ?>
0a1b2c3d4e5
trunk/leilao/action/ActionDefault.class.php
PHP
asf20
485
<?php /** * Classe Base para A Autorização nas Actions * * @author Magno */ class AuthorizationBaseAction { private $autorizacao; private static $LIVRE = "L"; function __construct() { $this->autorizacao = array(); } /** * Retorna o array montado com as autorizações * @return array */ public function getAutorizacao() { return $this->autorizacao; } /** * Adicionar todos os metodos de uma action para * um determinado grupo de usuarios * @param String $action Nome da Action * @param int $tipoUsuario Grupo de Usuario */ public function addActionLivre($action, $tipoUsuario = "L"){ $reflec = new ReflectionClass($action); $metodos = $reflec->getMethods(ReflectionMethod::IS_PUBLIC); $mets = array(); foreach ($metodos as $met){ //evitando pegar os metodos das superclasses if(strcmp($action, $met->class) == 0) $mets[] = $met->getName(); } $this->autorizacao[$tipoUsuario][$action] = $mets; } /** * Adicionar um metodo especifico de uma action para * um determinado grupo de usuarios * @param String $action Nome da Action * @param String $metodo Nome do Metodo * @param int $tipoUsuario Grupo de Usuario */ public function addMetodoLivre($action,$metodo,$tipoUsuario = "L"){ $this->autorizacao[$tipoUsuario][$action][] = $metodo; } /** * Verifica se o usuario pode acessar o metodo da action * @param int $tipoUsuario Grupo de Usuario * @param String $action Nome da Action * @param String $metodo Nome do Metodo * @return true|false */ public function isAutorizado($user,$action,$metodo){ if(isset ($this->autorizacao[AuthorizationBaseAction::$LIVRE])){ $actionsLivres = $this->autorizacao[AuthorizationBaseAction::$LIVRE]; if(isset ($actionsLivres[$action])){ $metodosLivres = $actionsLivres[$action]; $ind = array_search($metodo, $metodosLivres); if($ind !== false) return true; } } if($user == null) return false; if(isset ($this->autorizacao[$user->getTipo()])){ $actionsLivres = $this->autorizacao[$user->getTipo()]; if(isset ($actionsLivres[$action])) $metodosLivres = $actionsLivres[$action]; else return false; $ind = array_search($metodo, $metodosLivres); if($ind !== false) return true; return false; } } } ?>
0a1b2c3d4e5
trunk/leilao/action/AuthorizationBaseAction.class.php
PHP
asf20
2,713
<?php /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * Description of IndexAction * * @author Magno */ class IndexAction extends BaseAction { private static $VIEW = "view/"; function __construct() { parent::__construct(); } public function index(){ parent::show( IndexAction::$VIEW."index.tpl" ); } } ?>
0a1b2c3d4e5
trunk/leilao/action/IndexAction.class.php
PHP
asf20
449
<?php /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * Description of enquete * * @author Daniel Medeiros - ichigo_dan@hotmail.com */ class EnqueteAction extends ActionDefault { private $enqueteService; private $statusService; public static $VIEW_ENQUETE = "view/enquete/"; function EnqueteAction() { parent::__construct(); $this->setValueOutput("enqueteMenu", "current"); $this->enqueteService = new EnqueteService(); $this->statusService = new StatusService(); } public function getView(){ return EnqueteAction::$VIEW_ENQUETE; } public function cadastro() { $this->setValueOutput("enqueteSubmenu", "current"); $this->show(EnqueteAction::$VIEW_ENQUETE . "cadastro.tpl"); } public function salvar($enqueteBean) { if($enqueteBean->getEnqueteID() != 0){//editando $enquete = $this->enqueteService->buscarPorID($enqueteBean->getEnqueteID()); $enqueteBean->setFim(date("d/m/y", strtotime('+'.$enqueteBean->getFim().' day', strtotime(Util::stringToDateTime($enquete->getInicio()))))); }else{ $enqueteBean->setFim(date("d/m/y", strtotime('+'.$enqueteBean->getFim().' day'))); } $statusBean = $this->statusService->buscarPorID(Constantes::$ST_ENQ_ATIVA); $enqueteBean->setStatus($statusBean); $enqueteBean = $this->enqueteService->salvar($enqueteBean); parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_SUCCESS, "Operação Realizada Com Sucesso!!!")); parent::chain('RespostaAction.cadastro!enqueteID-'.$enqueteBean->getEnqueteID()); } public function editar($enqueteID) { try{ if($enqueteID <= 0){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, "Código da Enquete Não Encontrado!!!")); parent::voltar(); return; } $enqueteBean = $this->enqueteService->buscarPorID($enqueteID); if($enqueteBean == null){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, "Enquete Não Encontrada!!!")); parent::voltar(); return; } parent::setObjectOutput($enqueteBean); parent::show(EnqueteAction::$VIEW_ENQUETE."cadastro.tpl"); }catch(Exception $ex){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, $ex->getMessage())); parent::voltar(); } } public function listar() { parent::setValueOutput('status', Util::arrayCombo($this->statusService->listar(0, Constantes::$STATUS_ENQUETE), 'statusID', 'descricao',' -- TODOS --')); $this->buscaListaPaginada(); } public function tabela($pagina = 1, $inicio = "", $descricao = "", $statusID = -1) { $this->buscaListaPaginada($pagina, $inicio, $descricao, $statusID); parent::show('view/enquete/tabela.tpl'); } public function buscar() { } public function excluir($enqueteID) { try{ if($enqueteID <= 0){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, "Código da Enquete Não Encontrado!!!")); parent::voltar(); return; } $enqueteBean = $this->enqueteService->buscarPorID($enqueteID); if($enqueteBean == null){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, "Enquete Não Encontrada!!!")); parent::voltar(); return; } $enqueteBean->setStatus($this->statusService->buscarPorID(Constantes::$ST_ENQ_INATIVA)); $this->enqueteService->salvar($enqueteBean); parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_SUCCESS, Constantes::$STR_MSG_SUCCESS)); parent::chain('EnqueteAction.listar'); }catch(Exception $ex){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, $ex->getMessage())); parent::voltar(); } } public function detalhes($enqueteID) { } private function buscaListaPaginada($pagina = 1, $inicio = "", $descricao = "", $statusID = -1){ $enquetes = $this->enqueteService->listar($pagina, $inicio, $descricao, $statusID); $total = $this->enqueteService->total($inicio, $descricao, $statusID); parent::setValueOutput('enquetes', $enquetes); parent::setValueOutput('pagina', $pagina); parent::setValueOutput('numPaginas', Util::calculaNumPaginas($total)); } } ?>
0a1b2c3d4e5
trunk/leilao/action/EnqueteAction.class.php
PHP
asf20
4,796
<?php /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * Description of LoginAction * * @author Magno */ class LoginAction extends BaseAction{ function __construct() { parent::__construct(); } public function login(){ $ok = false; $usuarioService = new UsuarioService(); $login = parent::getValueInput('login'); $senha = parent::getValueInput('senha'); $usuarios = $usuarioService->listar(0, "", $login); $usuarioBean = null; foreach ($usuarios as $usuario) { if(Seguranca::testaSenha($senha,$usuario->getSenha()) === TRUE){ $ok = true; $usuarioBean = $usuario; parent::setUserSession($usuarioBean); break; } } if($ok){ $url = ""; if($usuarioBean->getTipo() == Constantes::$USUARIO_ADMIN_GERAL || $usuarioBean->getTipo() == Constantes::$USUARIO_ADMIN_SIMPLES) $url = "index2.php?url=AdministracaoAction.principal"; else if($usuarioBean->getTipo() == Constantes::$USUARIO_CONCURSO) $url = "index2.php?url=AdministracaoAction.concurso"; else $url = "index2.php?url=IndexAction.index"; parent::redirect ($url); }else{ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, ('Usuário ou Senha Inválidos!!!!'))); parent::show(AdministracaoAction::$VIEW_ADMIN."index.tpl"); } } public function logout(){ parent::setUserSession(null); parent::redirect('index2.php?url=AdministracaoAction.index'); } } ?>
0a1b2c3d4e5
trunk/leilao/action/LoginAction.class.php
PHP
asf20
1,811
<?php /** * Description of CidadeAction * * @author Magno */ class CidadeAction extends BaseAction{ private $cidadeService; public static $VIEW_CIDADE = "view/cidade/"; function __construct() { parent::__construct(); $this->cidadeService = new CidadeService(); } public function listarComboAjax($estadoID){ if($estadoID > 0) $cidades = $this->cidadeService->listar(0,"",$estadoID); else $cidades = array(); parent::setValueOutput('cidades', Util::arrayCombo($cidades, "cidadeID", "nome")); parent::show(CidadeAction::$VIEW_CIDADE."combo.tpl"); } public function buscarCidade($siglaEstato, $nomeCidade){ $estadoService = new EstadoService(); $estadoBean = $estadoService->buscarPorSigla($siglaEstato); $cidades = $this->cidadeService->listar(0,$nomeCidade,$estadoBean->getEstadoID()); parent::show(CidadeAction::$VIEW_CIDADE."combo.tpl"); } } ?>
0a1b2c3d4e5
trunk/leilao/action/CidadeAction.class.php
PHP
asf20
1,066
<?php /** * Description of SystemAction * * Classe Principal das Actions : * * Quebra a url, montando a classe action passada e seu metodo * e depois o executa * Tambem separa a string com os parametros * * @author Magno */ class SystemAction { private $url; private $actionClass; private $actionMetodo; private $params; private $subAction; function __construct() { $this->setUrl(); $this->explodeUrl(); } public function getUrl() { return $this->url; } /** * Seta a url q vem pelo GET */ private function setUrl() { $_GET['url'] = isset($_GET['url']) ? $_GET['url'] : 'IndexAction.index'; $this->url = $_GET['url']; } /** * Explode a Url - Dividindo em Action (Classe e Metodo) * e Parametros */ private function explodeUrl() { $this->explodeAction(); $this->explodeParams(); } /** * Explode a String da Action em Classe e Metodo */ private function explodeAction() { if (strpos($this->url, ".") === FALSE) $this->url .= ".index"; $arrayUrl = explode(".", $this->url); if (strpos($arrayUrl[1], "!")) $arrayUrl[1] = substr($arrayUrl[1], 0, strpos($arrayUrl[1], "!")); $this->setActionClass($arrayUrl[0]); $this->setActionMetodo($arrayUrl[1]); } /** * Monta a String com os Parametros */ private function explodeParams() { $arrayUrl = explode("!", $this->url); if (count($arrayUrl) > 1) $explodeParams = $arrayUrl[1]; else $explodeParams = ""; $this->setParams($explodeParams); } public function getActionClass() { return $this->actionClass; } private function setActionClass($actionClass) { $this->actionClass = $actionClass; } public function getActionMetodo() { return $this->actionMetodo; } private function setActionMetodo($actionMetodo) { $this->actionMetodo = $actionMetodo; } public function getParams() { return $this->params; } /** * Explode os parametros, montando um ARRAY * @param String $explodeParams - parametros */ public function setParams($explodeParams) { $this->params = array(); if (strlen($explodeParams) > 0) { $parametros = explode(",", $explodeParams); for ($i = 0; $i < count($parametros); $i++) { $param = explode("-", $parametros[$i]); if (Constantes::$URL_CRIPTOGRAFADA) { $param[0] = Seguranca::descriptografaLink($param[0]); $param[1] = Seguranca::descriptografaLink($param[1]); } $this->params[addslashes(trim($param[0]))] = addslashes(trim($param[1])); } } else if (count($_POST) > 0) { $this->params = $_POST; $keys = array_keys($_POST); for ($i = 0; $i < count($keys); $i++) { $this->params[addslashes(trim($keys[$i]))] = addslashes(trim($_POST[$keys[$i]])); } } } public function isAjax() { return (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strcmp(strtolower($_SERVER['HTTP_X_REQUESTED_WITH']),'xmlhttprequest') == 0); } public function getSubAction() { return $this->subAction; } public function setSubAction($subAction) { $this->subAction = $subAction; } /** * Instancia a Action passada e executa o metodo */ public function run() { $isAjax = false; $this->subAction = new $this->actionClass(); $metodo = $this->actionMetodo; if (!method_exists($this->subAction, $metodo)){ $this->showErro("Funcionalidade Não Encontrada!!!"); return; } $this->subAction->setInput($this->params); if (!$this->isAjax()) $this->subAction->setUrlAtual($this->url); else $isAjax = true; try { //Verificando Autorizaçao /* $autorizacao = new AuthorizationAction(); if(!$autorizacao->isAutorizado($this->subAction->getUserSession(), $this->actionClass, $metodo)){ $this->subAction->redirect('index2.php?url=AdministracaoAction.acessoNegado'); return; } */ $refMetodo = new ReflectionMethod($this->actionClass, $metodo); $metParametros = $refMetodo->getParameters(); $paramValues = array(); foreach ($metParametros as $metPar) { $name = $metPar->getName(); if (stripos($name, "Bean")) $paramValues[$name] = $this->subAction->getObjectInput(ucfirst($name)); else $paramValues[$name] = $this->subAction->getValueInput($name); } $rs = $refMetodo->invokeArgs($this->subAction, $paramValues); //coloca o retorno da action chamada no output if(isset ($rs)) $this->subAction->setValueOutput("rs".$metodo,$rs); //se não chamou o método show redireciona para o tpl com o mesmo nome do método chamado if (!$this->subAction->isCallShow() && !$isAjax) { $uri = $this->subAction->getView() . $metodo . ".tpl"; $this->subAction->show($uri); } } catch (ValidatorException $ex) { //QUANDO OCORRE ERRO DE VALIDAÇÃO VOLTA PRO PRA PAGINA ANTERIOR $this->subAction->voltar(); }catch (Exception $ex) { //QUANDO OCORRE ALGUM ERRO INESPERADO VAI PARA PAGINA DE ERROS $this->showErro($ex->getMessage(), $ex->getTraceAsString(), $ex->getFile()); } } public function showErro($mensagem, $pilha = "", $arquivo = ""){ $this->subAction->setValueOutput('classe', $this->url); $this->subAction->setValueOutput('mensagem', $mensagem); $this->subAction->setValueOutput('pilha', $pilha); $this->subAction->setValueOutput('arquivo', $arquivo); $this->subAction->show("view/erros/error.tpl"); } } ?>
0a1b2c3d4e5
trunk/leilao/action/SystemAction.class.php
PHP
asf20
6,370
<?php /** * Description of AdminAction * * @author Magno */ class AdminAction extends ActionDefault{ private $adminService; private $statusService; private $mediaService; public static $VIEW_ADMIN = "view/admin/"; function __construct() { parent::__construct(); $this->setValueOutput("adminMenu", "current"); $this->adminService = new AdminService(); $this->statusService = new StatusService(); $this->mediaService = new MediaService(); } public function getView() { return AdminAction::$VIEW_ADMIN; } public function buscar() { } public function cadastro() { } public function detalhes($adminID) { } public function editar($adminID) { try{ if($adminID <= 0){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, "Código do Administrador Não Encontrado!!!")); parent::voltar(); return; } $adminBean = $this->adminService->buscarPorID($adminID); if($adminBean == null){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, "Administrador Não Encontrado!!!")); parent::voltar(); return; } parent::setObjectOutput($adminBean->getUsuario()); parent::show(AdminAction::$VIEW_ADMIN."cadastro.tpl"); }catch(Exception $ex){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, $ex->getMessage())); parent::voltar(); } } public function excluir($adminID) { try{ if($adminID <= 0){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, "Código do Administrador Não Encontrado!!!")); parent::voltar(); return; } $adminBean = $this->adminService->buscarPorID($adminID, true); if($adminBean == null){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, "Administrador Não Encontrado!!!")); parent::voltar(); return; } $adminBean->setStatus($this->statusService->buscarPorID(Constantes::$ST_USU_EXCLUIDO)); $this->adminService->salvar($adminBean); parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_SUCCESS, Constantes::$STR_MSG_SUCCESS)); parent::chain('AdminAction.listar'); }catch(Exception $ex){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, $ex->getMessage())); parent::voltar(); } } public function listar() { parent::setValueOutput('status', Util::arrayCombo($this->statusService->listar(0, Constantes::$STATUS_USUARIO), 'statusID', 'descricao',' -- TODOS --')); $this->buscaListaPaginada(); } public function tabela($pagina = 1, $email = "", $login = "", $statusID = -1) { $this->buscaListaPaginada($pagina, $email, $login, $statusID); parent::show('view/usuario/tabela.tpl'); } public function salvar($usuarioBean) { try{ $uploadService = new UploadService(); $statusBean = $this->statusService->buscarPorID(Constantes::$ST_USU_CADASTRADO); $mediaBean = new MediaBean(); $caminhoMedia = UploadService::salvarArquivoSimples('media',Constantes::$DIR_IMAGENS); if(strlen($caminhoMedia) <= 0){ $caminhoMedia = Constantes::$DIR_UPLOAD.Constantes::$DIR_IMAGENS.Constantes::$IMG_ADM_DEFAULT; } $mediaBean->setCaminho($caminhoMedia); $usuarioBean->setStatus($statusBean); $usuarioBean->setMedia($mediaBean); $adminBean = new AdminBean(); $adminBean->setUsuario($usuarioBean); $this->adminService->salvar($adminBean); parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_SUCCESS, Constantes::$STR_MSG_SUCCESS)); parent::chain('AdminAction.listar'); }catch(Exception $ex){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, $ex->getMessage())); parent::voltar(); } } private function buscaListaPaginada($pagina = 1, $email = "", $login = "", $statusID = -1){ $admins = $this->adminService->listar($pagina, $email, $login, $statusID, true); $total = $this->adminService->total($email, $login, $statusID); parent::setValueOutput('admins', $admins); parent::setValueOutput('pagina', $pagina); parent::setValueOutput('numPaginas', Util::calculaNumPaginas($total)); } } ?>
0a1b2c3d4e5
trunk/leilao/action/AdminAction.class.php
PHP
asf20
4,881
<?php /** * Classe que implementa a autorização nas actions * * @author Magno */ class AuthorizationAction extends AuthorizationBaseAction { function __construct() { parent::__construct(); $this->config(); } /** * Aki deve ficar as configurações de autorização */ public function config(){ /** CONFIGURANDO ACTION LIVRE DE AUTORIZAÇÃO **/ parent::addActionLivre('LoginAction'); parent::addActionLivre('IndexAction'); /** CONFIGURANDO METODOS LIVRE DE AUTORIZAÇÃO **/ parent::addMetodoLivre('AdministracaoAction', 'index'); parent::addMetodoLivre('AdministracaoAction', 'acessoNegado'); /** CONFIGURANDO METODOS LIVRES PARA ADMIN SIMPLES **/ parent::addMetodoLivre('AdministracaoAction', 'principal',Constantes::$USUARIO_ADMIN_SIMPLES); parent::addMetodoLivre('UsuarioAction', 'buscaListaPaginada',Constantes::$USUARIO_ADMIN_SIMPLES); parent::addMetodoLivre('UsuarioAction', 'listar',Constantes::$USUARIO_ADMIN_SIMPLES); parent::addMetodoLivre('UsuarioAction', 'tabela',Constantes::$USUARIO_ADMIN_SIMPLES); } /** * Verifica se o usuário está autorizado a * usar o metodo daquela action * @param UsuarioBean $user Usuario * @param String $action Nome da Action * @param String $metodo Nome do Metodo * @return true|false */ public function isAutorizado($user,$action,$metodo){ //pode tudo if($user != null && $user->getTipo() == Constantes::$USUARIO_ADMIN_GERAL) return true; return parent::isAutorizado($user, $action, $metodo); } } ?>
0a1b2c3d4e5
trunk/leilao/action/AuthorizationAction.class.php
PHP
asf20
1,694
<?php #define('SMARTY_SPL_AUTOLOAD',1); require dirname(__FILE__).'/../include/php/smarty/Smarty.class.php'; /** * Description of BaseAction * * Classe Base para as outras Actions que fore existir * * @author Magno */ class BaseAction { private $input; private $output; private $callShow = false;//indica se o metodo show foi chamado ou não private static $USER = "user"; private static $SESSION_PARAMS = "session_params"; private static $SESSION_URL_ANTERIOR = "urlAnterior"; private static $SESSION_URL_ATUAL = "urlAtual"; public static $ERROS_VALIDACAO = "errosValidacao"; function __construct() { $this->init(); } /** * Inicializa a sessão, * Seta os parametros do output (SMARTY), * e procura parametros na sessao (Para o caso de Actions-Chain) */ private function init(){ session_start(); $this->setOutput(); $this->setOutputFromSession(); } public function isCallShow() { return $this->callShow; } public function getSession() { return $_SESSION; } /** * Seta um Valor (objeto ou nao) na Sessão * @param String $chave - identificação do valor * @param Mixed $valor - valor */ public function setValueSession($chave, $valor){ $_SESSION[$chave] = $valor; } /** * Pega um Valor (objeto ou nao) ga Sessão * @param String $chave - identificação do valor */ public function getValueSession($chave){ return isset ($_SESSION[$chave]) ? $_SESSION[$chave] : null; } /** * Seta um Usuario na Sessão * @param UsuarioBean $user - objeto Usuario */ public function setUserSession($user){ $_SESSION[BaseAction::$USER] = $user; } public function getUserSession(){ if(isset ($_SESSION[BaseAction::$USER])) return $_SESSION[BaseAction::$USER]; return null; } public function isLogged(){ if( isset ($_SESSION[BaseAction::$USER]) && $_SESSION[BaseAction::$USER] instanceof UsuarioBean && $_SESSION[BaseAction::$USER]->getUsuarioID() > 0 ) return true; return false; } public function setUrlAtual($url){ if(isset ($_SESSION[BaseAction::$SESSION_URL_ATUAL]) && strlen($_SESSION[BaseAction::$SESSION_URL_ATUAL]) > 0){ //Evitando de perder a anterior se ocorrer um Refresh if(strcmp($_SESSION[BaseAction::$SESSION_URL_ATUAL], $url) != 0) $_SESSION[BaseAction::$SESSION_URL_ANTERIOR] = $_SESSION[BaseAction::$SESSION_URL_ATUAL]; } $_SESSION[BaseAction::$SESSION_URL_ATUAL] = $url; } public function getInput() { return $this->input; } public function setInput($input) { $this->input = $input; } /** * Seta no Output os parametros existentes na sessão, * metodo utilizado quando ocorrer um Encadeamento de Actions, * ou seja o valor de output de uma action e passado para outra */ private function setOutputFromSession(){ $sessionParams = @$_SESSION[BaseAction::$SESSION_PARAMS]; if(isset ($sessionParams) && count($sessionParams) > 0){ $keys = array_keys($sessionParams); for($i = 0; $i < count($keys); $i++){ $this->setValueOutput($keys[$i], $sessionParams[$keys[$i]]); } $_SESSION[BaseAction::$SESSION_PARAMS] = null; unset ($_SESSION[BaseAction::$SESSION_PARAMS]); } } /** * Pega um valor do input (passados como parametro na url ou post) * @param String $nome - chave do atributo * @return Mixed Retorna o valor para a chave do atributo */ public function getValueInput($nome = ""){ if(strlen($nome) > 0 && isset ($this->input[$nome])){ return $this->input[$nome]; }else return null; } /** * Pega um objeto do input: * Popula o objeto de acordo com suas propriedades e os nomes encontrados no INPUT * @param String $className - Nome da Classe do Objeto que deseja Popular * @param String $prefix - Caso exista algum prefixo nos formulario (Ex.: usuarioEmail, usuarioLogin) * @param String $sufix - Caso exista algum sufixo nos formulario (Ex.: emailUsuario, loginUsuario) * @return Retorna o objeto populado */ public function getObjectInput($className = "", $prefix = "", $sufix = ""){ $reflec = new ReflectionClass($className); $objeto = $reflec->newInstance(); foreach($reflec->getProperties() as $att){ $atributo = $att->getName(); $set = "set".strtoupper($atributo[0]).substr($atributo, 1); if(method_exists($objeto, $set)){ $chave = $atributo; if(strlen($prefix) > 0) $chave = $prefix.$chave; if(strlen($sufix) > 0) $chave = $chave.$sufix; $objeto->$set(@$this->input[$chave]); } } /** VALIDANDO O OBJETO POPULADO **/ $validador = new ValidatorAction($objeto); $errosValidacao = $validador->validateAll(); if(count($errosValidacao) > 0){ $this->setValueOutput(BaseAction::$ERROS_VALIDACAO, $errosValidacao); throw new ValidatorException("Erros de Validação"); } return $objeto; } public function getOutput() { return $this->output; } /** * Seta as configurações do SMARTY */ private function setOutput(){ $this->output = new Smarty(); $this->output->cache_dir = dirname(__FILE__)."/../include/php/smarty/cache"; $this->output->config_dir = dirname(__FILE__)."/../include/php/smarty/configs"; $this->output->compile_dir = dirname(__FILE__)."/../include/php/smarty/templates_c"; $this->output->plugins_dir = dirname(__FILE__)."/../include/php/smarty/plugins"; $this->output->template_dir = "view/"; #$this->output->debugging = true; } /** * Seta um objeto no output: * Percorre as propriedades do objeto e joga no OUTPUT * @param Object $objeto - Objeto a ser injetado * @param String $prefix - Caso queria identificar as propriedades com algum prefixo (Ex.: usuarioEmail, usuarioLogin) * @param String $sufix - Caso queria identificar as propriedades com algum sufixo (Ex.: emailUsuario, loginUsuario) */ public function setObjectOutput($objeto = null, $prefix = "", $sufix = ""){ $reflec = new ReflectionClass( $objeto ); foreach($reflec->getProperties() as $att){ $atributo = $att->getName(); $get = "get".strtoupper($atributo[0]).substr($atributo, 1); if(method_exists($objeto, $get)){ $chave = $atributo; if(strlen($prefix) > 0) $chave = $prefix.$chave; if(strlen($sufix) > 0) $chave = $chave.$sufix; $this->output->assign($chave,$objeto->$get()); } } } /** * Joga um valor no output * @param String $chave - nome de idenficação do valor * @param Mixed $valor - valor a ser injetado (pode ser qualquer tipo de dado: String, int, array, etc) */ public function setValueOutput($chave,$valor){ $this->output->assign($chave,$valor); } /** * Abre uma pagina (template) * Usa-se no final da execução dos metodos nas actions * @param String $tpl - Pagina (template) a ser aberta */ public function show($tpl){ $this->callShow = true; $this->output->display($tpl); } /** * Retorna o conteudo de uma pagina (template) * @param String $tpl - Pagina (template) a ser retornada */ public function getHtml($tpl){ return $this->output->fetch($tpl); } /** * Redireciona para uma página * Detalhe: Caso, ocorra um ecadeamento de ações (ex.: de salvar, chama listar) * os parametros da primeira serão pertido ,caso não seja desejado use * a function chain * @param String $url - url de redirecionamento (Ex.: UsuarioActioin.listar) */ public function redirect($url){ header("Location: $url"); } /** * Redirecona para uma página sem perder os parametros, * deve ser usada quando ocorre encadeamento de ações (ex.: de salvar, chama listar) * os parametros da primeira não serão pertidos, caso não seja desejado use * a function redirect * @param String $url - url de redirecionamento (Ex.: UsuarioActioin.listar) */ public function chain($url){ $_SESSION[BaseAction::$SESSION_PARAMS] = $this->output->getTemplateVars(); header("Location: $url"); } /** * Redirecona para a úlima página visitada sem perder os parametros, * pode ser usada quando ocorre algum erro esperado ou não na Action * os parametros da primeira não serão pertidos, caso não seja desejado use * a function redirect * @param String $url - url de redirecionamento (Ex.: UsuarioActioin.listar) */ public function voltar(){ $valores = array_merge($this->input, $this->output->getTemplateVars()); $_SESSION[BaseAction::$SESSION_PARAMS] = $valores; header("Location: ".$_SESSION[BaseAction::$SESSION_URL_ANTERIOR]); } } ?>
0a1b2c3d4e5
trunk/leilao/action/BaseAction.class.php
PHP
asf20
10,190
<?php /** * Description of PacoteLanceAction * * @author Ricardo Krieg */ class PacoteLanceAction extends ActionDefault{ private $pacoteLanceService; public static $VIEW_PACOTE_LANCE = "view/pacoteLance/"; function __construct() { parent::__construct(); $this->setValueOutput("pacoteLanceMenu", "current"); $this->pacoteLanceService = new PacoteLanceService(); } public function getView() { return PacoteLanceAction::$VIEW_PACOTE_LANCE; } public function buscar() { } public function cadastro() { } public function detalhes($pacoteLanceID) { } public function editar($pacoteLanceID) { try{ if($pacoteLanceID <= 0){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, "Código do Pacote de Lances Não Encontrado!!!")); parent::voltar(); return; } $pacoteLanceBean = $this->pacoteLanceService->buscarPorID($pacoteLanceID); if($pacoteLanceBean == null){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, "Pacote de Lances Não Encontrado!!!")); parent::voltar(); return; } parent::show(PacoteLanceAction::$VIEW_PACOTE_LANCE."cadastro.tpl"); }catch(Exception $ex){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, $ex->getMessage())); parent::voltar(); } } public function excluir($pacoteLanceID) { try{ if($pacoteLanceID <= 0){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, "Código do Pacote de Lances Não Encontrado!!!")); parent::voltar(); return; } $pacoteLanceBean = $this->pacoteLanceService->buscarPorID($pacoteLanceID); if($pacoteLanceBean == null){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, "Pacote de Lances Não Encontrado!!!")); parent::voltar(); return; } $this->pacoteLanceService->salvar($pacoteLanceBean); parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_SUCCESS, Constantes::$STR_MSG_SUCCESS)); parent::chain('PacoteLanceAction.listar'); }catch(Exception $ex){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, $ex->getMessage())); parent::voltar(); } } public function listar() { $this->buscaListaPaginada(); } public function tabela($pagina = 1, $quantidade = "", $valor = "") { $this->buscaListaPaginada($pagina, $quantidade, $valor); parent::show('view/pacoteLance/tabela.tpl'); } public function salvar($quantidade, ) { try{ $pacoteLanceBean = new PacoteLanceBean(); $this->pacoteLanceService->salvar($pacoteLanceBean); parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_SUCCESS, Constantes::$STR_MSG_SUCCESS)); parent::chain('PacoteLanceAction.listar'); }catch(Exception $ex){ parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_ERROR, $ex->getMessage())); parent::voltar(); } } private function buscaListaPaginada($pagina = 1, $quantidade = "", $valor = ""){ $pacoteLances = $this->pacoteLanceService->listar($pagina, $quantidade, $valor); $total = $this->pacoteLanceService->total($quantidade, $valor); parent::setValueOutput('pacoteLances', $pacoteLances); parent::setValueOutput('pagina', $pagina); parent::setValueOutput('numPaginas', Util::calculaNumPaginas($total)); } } ?>
0a1b2c3d4e5
trunk/leilao/action/PacoteLanceAction.class.php
PHP
asf20
3,932
<?php /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * Description of MensagemMeta * * @author Magno */ class MensagemMeta { private $tipo; private $conteudo; function __construct($tipo = "", $conteudo = "") { $this->tipo = $tipo; $this->conteudo = $conteudo; } public function getTipo() { return $this->tipo; } public function setTipo($tipo) { $this->tipo = $tipo; } public function getConteudo() { return $this->conteudo; } public function setConteudo($conteudo) { $this->conteudo = $conteudo; } } ?>
0a1b2c3d4e5
trunk/leilao/meta/MensagemMeta.class.php
PHP
asf20
674
<?php /** * Description of ErroMeta * * @author Magno */ class ErroMeta { private $classe; private $atributo; private $mensagem; function __construct($classe = "", $atributo = "", $mensagem = "") { $this->classe = $classe; $this->atributo = $atributo; $this->mensagem = $mensagem; } public function getClasse() { return $this->classe; } public function setClasse($classe) { $this->classe = $classe; } public function getAtributo() { return $this->atributo; } public function setAtributo($atributo) { $this->atributo = $atributo; } public function getMensagem() { return $this->mensagem; } public function setMensagem($mensagem) { $this->mensagem = $mensagem; } public function __toString() { $classe = ""; $atributo = ""; $mensagem = ""; if(strlen(trim($this->classe)) > 0) $classe = " <b>Classe - </b>".$this->classe; if(strlen(trim($this->atributo)) > 0) $atributo = " <b>Atributo - </b>".$this->atributo; if(strlen(trim($this->mensagem)) > 0) $mensagem = " <i>".$this->mensagem. "</i>"; return "<b><u>Erro:</u></b>".$classe.$atributo.$mensagem; } } ?>
0a1b2c3d4e5
trunk/leilao/meta/ErroMeta.class.php
PHP
asf20
1,322
<?php header('Content-type: text/html; charset=utf-8'); include_once 'autoload.php'; include_once 'include/php/Conexao.class.php'; include_once 'include/php/Constantes.class.php'; include_once 'include/php/Util.class.php'; include_once 'include/php/Seguranca.class.php'; $action = new SystemAction(); $action->run(); ?>
0a1b2c3d4e5
trunk/leilao/index.php
PHP
asf20
348
<?php /** * Description of MenuViewGenerator * * @author Magno */ class MenuViewGenerator { private $tablesMeta; private $templateMenu; private $params; function __construct($tablesMeta, $params) { $this->tablesMeta = $tablesMeta; $this->params = $params; if(!file_exists(Constantes::$TEMPLATES_VIEW_DIR."menu.bloum")) throw new Exception ("Template Not Found!!!"); $this->templateMenu = file_get_contents(Constantes::$TEMPLATES_VIEW_DIR."menu.bloum"); } public function generate(){ $menuActionDefault = '<li class="write" title=":Name"><a title="" href="#">:Name</a> <ul> <li><a title="Cadastrar" href=":NameAction.cadastro">Cadastrar</a></li> <li><a title="Listar" href=":NameAction.listar">Listar</a></li> </ul> </li>'; $menuAction = ""; foreach ($this->tablesMeta as $tb) { if($tb->isCrud()){ $menuActionTemp = $menuActionDefault; $menuActionTemp = str_replace(":Name", ucfirst($tb->getName()), $menuActionTemp)."\n\t\t"; $menuAction .= $menuActionTemp; } } $this->templateMenu = str_replace(Constantes::$TPL_VIEW_MENU_ACTION, $menuAction, $this->templateMenu); } public function generateFile($generate = true){ if($generate) $this->generate(); $dirMenu = "temp_gen/".$this->params[Constantes::$PARAM_PROJECT_NAME]."/view/layout/"; if(!file_exists($dirMenu)) mkdir ($dirMenu, 0755,true); $fp = fopen($dirMenu."menu.tpl", "w+"); fwrite($fp, $this->templateMenu); fclose($fp); } } ?>
0a1b2c3d4e5
trunk/BloumGenerator/generator/MenuViewGenerator.class.php
PHP
asf20
1,840
<?php /** * Description of ActionGenerator * * @author BloumGenerator */ class ActionGenerator { private $tableMeta; private $parentTbMeta; private $templateAction; private $attPK; private $params; function __construct($tableMeta, $params) { $this->tableMeta = $tableMeta; $this->params = $params; $this->parentTbMeta = null; if(!file_exists(Constantes::$TEMPLATES_ACTION_DIR."Action.bloum")) throw new Exception ("Template Action Not Found!!!"); $this->templateAction = file_get_contents(Constantes::$TEMPLATES_ACTION_DIR."Action.bloum"); $this->searchPK(); $this->searchParent(); } public function searchPK(){ $numExt = 0; foreach ($this->tableMeta->getFKReferences() as $fk) { if($fk->isExtends()){ $numExt++; $this->parentTbMeta = $fk->getTableReference(); } } if($numExt > 1){ throw new Exception("Erro, Herança Multipla Não Suportado!!!"); } } public function searchParent(){ foreach ($this->tableMeta->getAttributes() as $att) { if($att->isPrimaryKey()){ $this->attPK[$att->getName()] = $att; } } } public function generate(){ $this->templateAction = str_replace(Constantes::$TPL_BEAN_NAME_UPPER, ucfirst($this->tableMeta->getName()), $this->templateAction); $this->templateAction = str_replace(Constantes::$TPL_BEAN_NAME_LOWER, lcfirst($this->tableMeta->getName()), $this->templateAction); $this->templateAction = str_replace(Constantes::$TPL_BEAN_NAME_TO_UPPER, strtoupper($this->tableMeta->getName()), $this->templateAction); $this->generatePkValues(); $this->generateListParam(); $this->generateFkValues(); return $this->templateAction; } public function generatePkValues(){ $tableName = $this->tableMeta->getName(); $pkIfTest = ""; $pkList = ""; $pkUrlParam = ""; $attrsKeys = array_keys($this->attPK); for ($i = 0; $i < count($attrsKeys); $i++) { $att = $this->attPK[$attrsKeys[$i]]; $name = $att->getName(); $pkList .= "$".$name; $pkIfTest .= " !isset($".$name.") || $".$name." <= 0 "; $pkUrlParam .= $name."='.$".$tableName."Bean->get".ucfirst($name)."()"; if($i < ( count($this->attPK)-1 )){ $pkList .= ", "; $pkIfTest .= "\n\t\t\t && "; $pkUrlParam .= ".'&"; } } $this->templateAction = str_replace(Constantes::$TPL_ACTION_PK_IF_TEST, $pkIfTest, $this->templateAction); $this->templateAction = str_replace(Constantes::$TPL_ACTION_PK_LIST, $pkList, $this->templateAction); $this->templateAction = str_replace(Constantes::$TPL_ACTION_PK_URL_PARAM, $pkUrlParam, $this->templateAction); } public function generateListParam(){ $attrs = $this->tableMeta->getAttributes(); if($this->parentTbMeta != null && count($this->parentTbMeta->getAttributes()) > 0) $attrs = array_merge ($attrs,$this->parentTbMeta->getAttributes()); $attrsKeys = array_keys($attrs); $tableName = $this->tableMeta->getName(); $listParam = ""; $listParamInit = ""; for ($i = 0; $i < count($attrsKeys); $i++) { $name = $attrsKeys[$i]; if(!$attrs[$name]->isPrimaryKey() && $attrs[$name]->isImportant()){ if(strlen($listParam) > 0) $listParam .= ","; $listParam .= "$$name"; $type = $attrs[$name]->getType(); $default = $attrs[$name]->getDefault(); $value = '""'; if(Util::isTypeNumeric($type)){ $value = "-1"; if(strlen($default)) $value = $default; }else{ $value = "\"\""; } $listParamInit .= ",$".$name." = ".$value; } } $this->templateAction = str_replace(Constantes::$TPL_LIST_PARAM_INIT, $listParamInit, $this->templateAction); $this->templateAction = str_replace(Constantes::$TPL_LIST_PARAM, $listParam, $this->templateAction); $this->templateAction = str_replace(",,", ",", $this->templateAction); #gambiarra } public function generateFkValues(){ $tableName = $this->tableMeta->getName(); $fksCombo = ""; $fksBuscarSalvar = ""; $fksSetSalvar = ""; $fksService = ""; $fksInitService = ""; $fksOutput = ""; $fksMeta = $this->tableMeta->getFKReferences(); if($this->parentTbMeta != null && count($this->parentTbMeta->getFKReferences()) > 0) $fksMeta = array_merge($fksMeta,$this->parentTbMeta->getFKReferences()); $fksKeys = array_keys($fksMeta); for ($i = 0; $i < count($fksKeys); $i++) { $fk = $fksMeta[$fksKeys[$i]]; $name = $fk->getTableReference()->getName(); $fksService .= "private $".$name."Service;\n\t"; $fksInitService .= "\$this->".$name."Service = new ".ucfirst($name)."Service();\n\t\t"; $fksSetSalvar .= "$".$tableName."Bean->set".ucfirst($name)."($".$name."Bean);\n\t\t\t"; $comboDisplay = ""; if(strcmp($fk->getTypeForm(), Constantes::$TYPE_FORM_COMBO) == 0){ $fksBuscarSalvar .= "$".$name."Bean = \$this->".$name."Service->buscarPorID(parent::getValueInput('".$name."ID'));\n\t\t\t"; $fksCombo .= "parent::setValueOutput('".$name."s', Util::arrayCombo(\$this->".$name."Service->listar(), '".$name."ID', ':comboDisplay'));\n\t\t"; foreach ($fk->getTableReference()->getAttributes() as $attFk) { if($attFk->isComboDisplay()){ $comboDisplay = $attFk->getName(); break; } } }else if(strcmp($fk->getTypeForm(), Constantes::$TYPE_FORM_HIDDEN_ID) == 0){ $fksBuscarSalvar .= "$".$name."Bean = \$this->".$name."Service->buscarPorID(parent::getValueInput('".$name."ID'));\n\t\t\t"; }else if(strcmp($fk->getTypeForm(), Constantes::$TYPE_FORM_INCLUDE) == 0){ $fksBuscarSalvar .= "$".$name."Bean = parent::getObjectInput('".ucfirst($name)."Bean', '".$name."_');\n\t\t\t"; $fksOutput .= "parent::setObjectOutput($".$tableName."Bean->get".ucfirst($name)."(), '".$name."_');\n\t\t\t"; }else{ $fksBuscarSalvar .= "#recuperar objeto: ".$name."Bean\n\t\t\t"; } $fksCombo = str_replace(":comboDisplay", $comboDisplay, $fksCombo); } $this->templateAction = str_replace(Constantes::$TPL_ACTION_FKS_SERVICE, $fksService, $this->templateAction); $this->templateAction = str_replace(Constantes::$TPL_ACTION_FKS_INIT_SERVICE, $fksInitService, $this->templateAction); $this->templateAction = str_replace(Constantes::$TPL_ACTION_FKS_COMBO, $fksCombo, $this->templateAction); $this->templateAction = str_replace(Constantes::$TPL_ACTION_FKS_BUSCAR_SALVAR, $fksBuscarSalvar, $this->templateAction); $this->templateAction = str_replace(Constantes::$TPL_ACTION_FKS_SET_SALVAR, $fksSetSalvar, $this->templateAction); $this->templateAction = str_replace(Constantes::$TPL_ACTION_FKS_OUTPUT, $fksOutput, $this->templateAction); } public function generateFile($generate = true){ if($generate) $this->generate(); $dirModel = "temp_gen/".$this->params[Constantes::$PARAM_PROJECT_NAME]."/action/"; if(!file_exists($dirModel)) mkdir ($dirModel, 0755,true); $fp = fopen($dirModel.ucfirst($this->tableMeta->getName())."Action.class.php", "w+"); fwrite($fp, $this->templateAction); fclose($fp); } } ?>
0a1b2c3d4e5
trunk/BloumGenerator/generator/ActionGenerator.class.php
PHP
asf20
8,347
<?php /** * Description of ViewGenerator * * @author BloumGenerator */ abstract class ViewGenerator { protected $tableMeta; protected $viewParams; protected $parentTbMeta; protected $templateView; protected $attPK; function __construct($tableMeta, $viewParams, $templateView) { $this->tableMeta = $tableMeta; $this->viewParams = $viewParams; $this->templateView = $templateView; $this->parentTbMeta = null; if(!file_exists($templateView)) throw new Exception ("Template Not Found!!!"); $this->templateView = file_get_contents($templateView); $this->searchPK(); $this->searchParent(); } private function searchPK(){ $numExt = 0; foreach ($this->tableMeta->getFKReferences() as $fk) { if($fk->isExtends()){ $numExt++; $this->parentTbMeta = $fk->getTableReference(); } } if($numExt > 1){ throw new Exception("Erro, Herança Multipla Não Suportado!!!"); } } private function searchParent(){ foreach ($this->tableMeta->getAttributes() as $att) { if($att->isPrimaryKey()){ $this->attPK[$att->getName()] = $att; } } } public function generateNames(){ $this->templateView = str_replace(Constantes::$TPL_BEAN_NAME_UPPER, ucfirst($this->tableMeta->getName()), $this->templateView); $this->templateView = str_replace(Constantes::$TPL_BEAN_NAME_LOWER, lcfirst($this->tableMeta->getName()), $this->templateView); $this->templateView = str_replace(Constantes::$TPL_BEAN_NAME_TO_UPPER, strtoupper($this->tableMeta->getName()), $this->templateView); } public function generatePkUrlParam(){ $tableName = $this->tableMeta->getName(); $pkUrlParam = ""; $attrsKeys = array_keys($this->attPK); for ($i = 0; $i < count($attrsKeys); $i++) { $att = $this->attPK[$attrsKeys[$i]]; $name = $att->getName(); $pkUrlParam .= $name."=$".$name; if($i < ( count($this->attPK)-1 )){ $pkUrlParam .= "&"; } } $this->templateView = str_replace(Constantes::$TPL_VIEW_PK_URL_PARAM, $pkUrlParam, $this->templateView); } public function deleteCode($begin, $end){ $beginCode = stripos($this->templateView, $begin); $endCode = stripos($this->templateView, $end)+strlen($end); $part1 = substr($this->templateView, 0, $beginCode); $part2 = substr($this->templateView, $endCode); $this->templateView = $part1.$part2; } public function generateFile($name){ $dirView = "temp_gen/".$this->viewParams[Constantes::$PARAM_PROJECT_NAME]."/view/".$this->tableMeta->getName()."/"; if(!file_exists($dirView)) mkdir ($dirView, 0755,true); $fp = fopen($dirView.$name.".tpl", "w+"); fwrite($fp, $this->templateView); fclose($fp); } public abstract function generate(); } ?>
0a1b2c3d4e5
trunk/BloumGenerator/generator/ViewGenerator.class.php
PHP
asf20
3,109
<?php /** * Description of CadastroViewGenerator * * @author Magno */ class CadastroViewGenerator extends ViewGenerator{ public function __construct($tableMeta, $viewParams) { parent::__construct($tableMeta, $viewParams, Constantes::$TEMPLATES_VIEW_DIR."cadastro.bloum"); } public function generate() { parent::generateNames(); $this->generatePkValues(); $this->generateAttValues(); return $this->templateView; } public function generatePkValues(){ $tableName = $this->tableMeta->getName(); $pkInputHiden = ""; $inputString = '<input type="hidden" name=":pk" id=":pk" value="{$:pk|default:0}" />'."\n\t\t\t"; $attrsKeys = array_keys($this->attPK); for ($i = 0; $i < count($attrsKeys); $i++) { $att = $this->attPK[$attrsKeys[$i]]; $name = $att->getName(); $pkInputHiden .= str_replace(":pk", $name, $inputString); } $this->templateView = str_replace(Constantes::$TPL_VIEW_CADASTRO_PK_INPUT_HIDDEN, $pkInputHiden, $this->templateView); } public function generateAttValues(){ $tableName = $this->tableMeta->getName(); $attributes = $this->tableMeta->getAttributes(); $attrsKeys = array_keys($attributes); $attJsValidate = ""; $attInputs = ""; $fkInputs = ""; for ($i = 0; $i < count($attrsKeys); $i++) { $att = $attributes[$attrsKeys[$i]]; $name = $att->getName(); if($att->isPrimaryKey() && !$att->isForeignKey()) continue; if(!$att->isForeignKey()){ $required = ""; if($att->isNotNull()){ $required = "required=true"; if(strlen($attJsValidate) > 0) $attJsValidate .= ","; $attJsValidate .= $name.": {required: true}\n\t\t\t"; } $attInputs .= '{form_input name="'.$name.'" label="'.ucfirst($name).'" '.$required.' value="{$'.$name.'|default:\'\'}"}'; $attInputs .= "\n\t\t\t\t\t\t"; } else{ $tbFkName = str_replace("ID", "", $name); $fks = $this->tableMeta->getFKReferences(); $fkMeta = null; foreach ($fks as $fk) { foreach ($fk->getAttributes() as $fkAtt) { if(strcmp(strtolower($fkAtt->getName()), strtolower($tbFkName."ID")) == 0){ $fkMeta = $fk; break; } } if($fkMeta != null) break; } if($fkMeta == null) throw new Exception ("Tabela (".$tbFkName.") Referenciada Na Herança com (".$this->tableMeta->getName().") Não Encontrada!!!"); $tbReference = $fkMeta->getTableReference()->getName(); $tab = "\n\t\t\t\t\t"; if(strcmp($fkMeta->getTypeForm(), Constantes::$TYPE_FORM_COMBO) == 0){ $attInputs .= '{include file="view/'.$tbReference.'/formCombo.tpl"}'.$tab."\t"; if(strlen($attJsValidate) > 0) $attJsValidate .= ","; $attJsValidate .= $name.": {required: true}\n\t\t\t"; }else if(strcmp($fkMeta->getTypeForm(), Constantes::$TYPE_FORM_INCLUDE) == 0){ $fkInputs .= $tab.'{include file="view/'.$tbReference.'/formInclude.tpl"}'.$tab; foreach ($fkMeta->getTableReference()->getAttributes() as $fksAtt) { if($fksAtt->isNotNull()){ $nameAt = $fksAtt->getName(); if(strlen($attJsValidate) > 0) $attJsValidate .= ","; $attJsValidate .= $tbReference.'_'.$nameAt.": {required: true}\n\t\t\t"; } } }else if(strcmp($fkMeta->getTypeForm(), Constantes::$TYPE_FORM_HIDDEN_ID) == 0){ $attInputs .= '<input type="hidden" name="'.$tbReference.'" id="'.$tbReference.'" value="{$'.$tbReference.'ID|default:0}" />'; } $fkInputs .= $tab; } } if(strlen($attJsValidate) > 0 && isset ($this->viewParams[Constantes::$PARAM_INCLUDE_VALIDADE]) && $this->viewParams[Constantes::$PARAM_INCLUDE_VALIDADE]){ $this->templateView = str_replace(Constantes::$TPL_VIEW_CADASTRO_IF_INC_VALIDADE, "", $this->templateView); $this->templateView = str_replace(Constantes::$TPL_VIEW_CADASTRO_END_IF_INC_VALIDADE, "", $this->templateView); $this->templateView = str_replace(Constantes::$TPL_VIEW_CADASTRO_ATT_JS_VALIDADE, $attJsValidate, $this->templateView); }else{ parent::deleteCode(Constantes::$TPL_VIEW_CADASTRO_IF_INC_VALIDADE, Constantes::$TPL_VIEW_CADASTRO_END_IF_INC_VALIDADE); } $this->templateView = str_replace(Constantes::$TPL_VIEW_CADASTRO_ATT_INPUTS, $attInputs, $this->templateView); $this->templateView = str_replace(Constantes::$TPL_VIEW_CADASTRO_FK_INPUTS, $fkInputs, $this->templateView); } public function generateFile($generate = true){ if($generate) $this->generate(); parent::generateFile("cadastro"); } } ?>
0a1b2c3d4e5
trunk/BloumGenerator/generator/CadastroViewGenerator.class.php
PHP
asf20
5,643
<?php /** * Description of DetalhesViewGenerator * * @author Magno */ class DetalhesViewGenerator extends ViewGenerator{ public function __construct($tableMeta, $viewParams) { parent::__construct($tableMeta, $viewParams, Constantes::$TEMPLATES_VIEW_DIR."detalhes.bloum"); } public function generate() { parent::generateNames(); parent::generatePkUrlParam(); $this->generateAttValues(); return $this->templateView; } public function generateAttValues(){ $tableName = $this->tableMeta->getName(); $attributes = $this->tableMeta->getAttributes(); $attrsKeys = array_keys($attributes); $attDetalhe = ""; $fkDetalhe = ""; $fechouTagTr = false; for ($i = 0; $i < count($attrsKeys); $i++) { $att = $attributes[$attrsKeys[$i]]; $name = $att->getName(); if($att->isPrimaryKey() && !$att->isForeignKey()) continue; if(!$att->isForeignKey()){ if(strlen($attDetalhe) <= 0) $attDetalhe .= "<tr>\n\t\t\t"; $attDetalhe .= '<td class="tituloDetalhe">'.ucfirst($name).':</td>'."\n\t\t".'<td class="valorDetalhe">{$'.$name.'|default:\'\'}</td>'."\n\t\t"; $fechouTagTr = false; if($i % 2 == 0){ $attDetalhe .= "</tr>\n\t<tr>\n\t\t"; $fechouTagTr = true; } } else{ $tbFkName = str_replace("ID", "", $name); $fks = $this->tableMeta->getFKReferences(); $fkMeta = null; foreach ($fks as $fk) { foreach ($fk->getAttributes() as $fkAtt) { if(strcmp(strtolower($fkAtt->getName()), strtolower($tbFkName."ID")) == 0){ $fkMeta = $fk; break; } } if($fkMeta != null) break; } if($fkMeta == null) throw new Exception ("Tabela (".$tbFkName.") Referenciada Na Herança com (".$this->tableMeta->getName().") Não Encontrada!!!"); $tbReference = $fkMeta->getTableReference()->getName(); $tab = "\n"; if(strcmp($fkMeta->getTypeForm(), Constantes::$TYPE_FORM_COMBO) == 0){ $comboDisplay = ""; foreach ($fk->getTableReference()->getAttributes() as $attFk) { if($attFk->isComboDisplay()){ $comboDisplay = ucfirst($attFk->getName()); break; } } if(strlen($attDetalhe) <= 0) $attDetalhe .= "<tr>\n\t\t\t"; $attDetalhe .= '<td class="tituloDetalhe">'.ucfirst($tbReference).':</td>'."\n\t\t".'<td class="valorDetalhe">{$'.$tableName.'_'.$tbReference.'->get'.$comboDisplay.'()|default:\'\'}</td>'."\n\t\t"; $fechouTagTr = false; if($i % 2 == 0){ $attDetalhe .= "</tr>\n\t<tr>\n\t\t"; $fechouTagTr = true; } }else if(strcmp($fkMeta->getTypeForm(), Constantes::$TYPE_FORM_INCLUDE) == 0){ $fkDetalhe .= '{include file="view/'.$tbReference.'/detalhesInclude.tpl"}'."\n\t\t"; } } } if(!$fechouTagTr) $attDetalhe .= "</tr>"; $this->templateView = str_replace(Constantes::$TPL_VIEW_DETALHES_ATT_DETALHE, $attDetalhe, $this->templateView); $this->templateView = str_replace(Constantes::$TPL_VIEW_DETALHES_FK_DETALHE, $fkDetalhe, $this->templateView); } public function generateFile($generate = true){ if($generate) $this->generate(); parent::generateFile("detalhes"); } } ?>
0a1b2c3d4e5
trunk/BloumGenerator/generator/DetalhesViewGenerator.class.php
PHP
asf20
3,987
<?php /** * Description of DetalhesIncludeViewGenerator * * @author Magno */ class DetalhesIncludeViewGenerator extends ViewGenerator{ public function __construct($tableMeta, $viewParams) { parent::__construct($tableMeta, $viewParams, Constantes::$TEMPLATES_VIEW_DIR."detalhesInclude.bloum"); } public function generate() { parent::generateNames(); $this->generateAttValues(); return $this->templateView; } public function generateAttValues(){ $tableName = $this->tableMeta->getName(); $attributes = $this->tableMeta->getAttributes(); $attrsKeys = array_keys($attributes); $attDetalhe = ""; $fkDetalhe = ""; $fechouTagTr = false; for ($i = 0; $i < count($attrsKeys); $i++) { $att = $attributes[$attrsKeys[$i]]; $name = $att->getName(); if($att->isPrimaryKey() && !$att->isForeignKey()) continue; if(!$att->isForeignKey()){ if(strlen($attDetalhe) <= 0) $attDetalhe .= "<tr>\n\t\t\t"; $attDetalhe .= '<td class="tituloDetalhe">'.ucfirst($name).':</td>'."\n\t\t".'<td class="valorDetalhe">{$'.$tableName.'_'.$name.'|default:\'\'}</td>'."\n\t\t"; $fechouTagTr = false; if($i % 2 == 0){ $attDetalhe .= "</tr>\n\t<tr>\n\t\t"; $fechouTagTr = true; } } else{ $tbFkName = str_replace("ID", "", $name); $fks = $this->tableMeta->getFKReferences(); $fkMeta = null; foreach ($fks as $fk) { foreach ($fk->getAttributes() as $fkAtt) { if(strcmp(strtolower($fkAtt->getName()), strtolower($tbFkName."ID")) == 0){ $fkMeta = $fk; break; } } if($fkMeta != null) break; } if($fkMeta == null) throw new Exception ("Tabela (".$tbFkName.") Referenciada Na Herança com (".$this->tableMeta->getName().") Não Encontrada!!!"); $tbReference = $fkMeta->getTableReference()->getName(); $tab = "\n"; if(strcmp($fkMeta->getTypeForm(), Constantes::$TYPE_FORM_COMBO) == 0){ $comboDisplay = ""; foreach ($fk->getTableReference()->getAttributes() as $attFk) { if($attFk->isComboDisplay()){ $comboDisplay = ucfirst($attFk->getName()); break; } } if(strlen($attDetalhe) <= 0) $attDetalhe .= "<tr>\n\t\t\t"; $attDetalhe .= '<td class="tituloDetalhe">'.ucfirst($tbReference).':</td>'."\n\t\t".'<td class="valorDetalhe">{$'.$tableName.'_'.$tbReference.'->get'.$comboDisplay.'()|default:\'\'}</td>'."\n\t\t"; $fechouTagTr = false; if($i % 2 == 0){ $attDetalhe .= "</tr>\n\t<tr>\n\t\t"; $fechouTagTr = true; } }else if(strcmp($fkMeta->getTypeForm(), Constantes::$TYPE_FORM_INCLUDE) == 0){ $fkDetalhe .= '{include file="view/'.$tbReference.'/detalhesInclude.tpl"}'."\n\t\t"; } } } if(!$fechouTagTr) $attDetalhe .= "</tr>"; $this->templateView = str_replace(Constantes::$TPL_VIEW_DETALHES_ATT_DETALHE, $attDetalhe, $this->templateView); $this->templateView = str_replace(Constantes::$TPL_VIEW_DETALHES_FK_DETALHE, $fkDetalhe, $this->templateView); } public function generateFile($generate = true){ if($generate) $this->generate(); parent::generateFile("detalhesInclude"); } } ?>
0a1b2c3d4e5
trunk/BloumGenerator/generator/DetalhesIncludeViewGenerator.class.php
PHP
asf20
4,001
<?php /** * Description of DAOGenerator * * @author BloumGenerator */ class DAOGenerator { private $tableMeta; private $parentTbMeta; private $templateDAO; private $attPK; private $params; function __construct($tableMeta, $params) { $this->tableMeta = $tableMeta; $this->params = $params; $this->parentTbMeta = null; if(!file_exists(Constantes::$TEMPLATES_DAO_DIR."DAO.bloum")) throw new Exception ("Template DAO Not Found!!!"); $this->templateDAO = file_get_contents(Constantes::$TEMPLATES_DAO_DIR."DAO.bloum"); $this->searchPK(); //$this->generate(); } public function searchPK(){ foreach ($this->tableMeta->getAttributes() as $att) { if($att->isPrimaryKey()){ $this->attPK[$att->getName()] = $att; } } } public function generate(){ $this->templateDAO = str_replace(Constantes::$TPL_BEAN_NAME_UPPER, ucfirst($this->tableMeta->getName()), $this->templateDAO); $this->templateDAO = str_replace(Constantes::$TPL_BEAN_NAME_LOWER, lcfirst($this->tableMeta->getName()), $this->templateDAO); $this->generateExtends(); $this->generatePkValues(); $this->generateUpdate(); $this->generateInsert(); $this->generateDelete(); $this->generateListParam(); $this->generateSetValues(); $this->generateRelExternal(); return $this->templateDAO; } public function generateExtends(){ $numExt = 0; $extends = ""; $saveParent = ""; $joinParent = ""; $setParent = ""; $constructParent = ""; foreach ($this->tableMeta->getFKReferences() as $fk) { if($fk->isExtends()){ $numExt++; $constructParent = "parent::__construct();"; $this->parentTbMeta = $fk->getTableReference(); $nameParent = ucfirst($this->parentTbMeta->getName()); $tbName = $this->tableMeta->getName(); $extends = "extends ".$nameParent."DAO"; $joinParent = "INNER JOIN ".$this->parentTbMeta->getName()." pr ON "; $attsFk = $fk->getAttributes(); $attsRef = $fk->getReferences(); for ($id = 0; $id < count($attsFk); $id++) { $atFk = $attsFk[$id]->getName(); $atRef = $attsRef[$id]->getName(); $joinParent .= "pr.$atRef = tb.$atFk"; if($id < ( count($attsFk)-1 )) $joinParent .= " AND "; } $setParent = "$".$tbName."->set".$nameParent."( new ".$nameParent."Bean(:rowsParent) );"; $rowsParent = ""; $setParentExternal = ""; $attsTbReference = $this->parentTbMeta->getAttributes(); $attstbRefKeys = array_keys($attsTbReference); for ($i = 0; $i < count($attstbRefKeys); $i++) { $name = $attstbRefKeys[$i]; if(!$attsTbReference[$name]->isForeignKey()){ if(strlen(trim($rowsParent)) > 0) $rowsParent .= ', '; $rowsParent .= '$row[\''.$name.'\']'; }else{ $nameClass = str_replace("ID", "", $name); $setParentExternal .= "\n\t\t\t\t$".$tbName.'->set'.ucfirst($nameClass).'($this->'.$nameClass.'DAO->buscarPorID($row[\''.$name.'\']));'; } } $setParent = str_replace(":rowsParent", $rowsParent, $setParent).$setParentExternal; $saveParent = "$".$tbName."->set".$nameParent."(parent::salvar($".$tbName."->get".$nameParent."()));"; } if($numExt > 1){ throw new Exception("Erro, Herança Multipla Não Suportado!!!"); } } $saveParent .= "\n"; $this->templateDAO = str_replace(Constantes::$TPL_BEAN_CONSTRUCT_PARENT, $constructParent, $this->templateDAO); $this->templateDAO = str_replace(Constantes::$TPL_BEAN_EXTENDS, $extends, $this->templateDAO); $this->templateDAO = str_replace(Constantes::$TPL_DAO_JOIN_PARENT, $joinParent, $this->templateDAO); $this->templateDAO = str_replace(Constantes::$TPL_DAO_SAVE_PARENT, $saveParent, $this->templateDAO); $this->templateDAO = str_replace(Constantes::$TPL_DAO_SET_PARENT, $setParent, $this->templateDAO); } public function generateInsert(){ $attrs = $this->tableMeta->getAttributes(); $attrsKeys = array_keys($attrs); $columns = ""; $values = ""; for ($i = 0; $i < count($attrsKeys); $i++) { $columns .= $attrsKeys[$i]; $values .= ":".$attrsKeys[$i]; if($i < ( count($attrsKeys)-1)){ $columns .= ","; $values .= ","; } } $this->templateDAO = str_replace(Constantes::$TPL_DAO_INSERT_COLUMNS, $columns, $this->templateDAO); $this->templateDAO = str_replace(Constantes::$TPL_DAO_INSERT_VALUES, $values, $this->templateDAO); } public function generateUpdate(){ $attrs = $this->tableMeta->getAttributes(); $attrsKeys = array_keys($attrs); $update = ""; for ($i = 0; $i < count($attrsKeys); $i++) { $attMeta = $attrs[$attrsKeys[$i]]; if($attMeta->isPrimaryKey()) continue; $name = $attMeta->getName(); $update .= $name . " = :" . $name; if($i < ( count($attrsKeys)-1)){ $update .= ",\n\t\t\t\t\t\t"; } } $this->templateDAO = str_replace(Constantes::$TPL_DAO_UPDATE_COLUMNS, $update, $this->templateDAO); $returnUpdate = ""; if(strlen(trim($update)) <= 0){ $returnUpdate = "return $".$this->tableMeta->getName().";\n"; $beginUpdate = stripos($this->templateDAO, Constantes::$TPL_DAO_BEGIN_UPDATE); $endUpdate = stripos($this->templateDAO, Constantes::$TPL_DAO_END_UPDATE)+strlen(Constantes::$TPL_DAO_END_UPDATE); $part1 = substr($this->templateDAO, 0, $beginUpdate); $part2 = substr($this->templateDAO, $endUpdate); $this->templateDAO = $part1.$part2; }else{ $this->templateDAO = str_replace(Constantes::$TPL_DAO_BEGIN_UPDATE, "", $this->templateDAO); $this->templateDAO = str_replace(Constantes::$TPL_DAO_END_UPDATE, "", $this->templateDAO); } $this->templateDAO = str_replace(Constantes::$TPL_DAO_RETURN_UPDATE, $returnUpdate, $this->templateDAO); } public function generateDelete() { $parentDelete = ""; if($this->parentTbMeta != null){ $parentDelete = "parent::excluir(:pks);"; $pks = ""; $attrsKeys = array_keys($this->attPK); for ($i = 0; $i < count($attrsKeys); $i++) { $att = $this->attPK[$attrsKeys[$i]]; $name = "$".$att->getName(); $pks .= $name; if($i < ( count($attrsKeys)-1 )){ $pks .= ", "; } } $parentDelete = str_replace(":pks", $pks, $parentDelete); $beginDelete = stripos($this->templateDAO, Constantes::$TPL_DAO_BEGIN_DELETE); $endDelete = stripos($this->templateDAO, Constantes::$TPL_DAO_END_DELETE)+strlen(Constantes::$TPL_DAO_END_DELETE); $part1 = substr($this->templateDAO, 0, $beginDelete); $part2 = substr($this->templateDAO, $endDelete); $this->templateDAO = $part1.$part2; }else{ $this->templateDAO = str_replace(Constantes::$TPL_DAO_BEGIN_DELETE, "", $this->templateDAO); $this->templateDAO = str_replace(Constantes::$TPL_DAO_END_DELETE, "", $this->templateDAO); } $this->templateDAO = str_replace(Constantes::$TPL_DAO_PARENT_DELETE, $parentDelete, $this->templateDAO); } public function generatePkValues(){ $tableName = $this->tableMeta->getName(); $pkWhere = ""; $pkBuscar = ""; $pkInitParam = ""; $pkBind = ""; $pkIfUpdate = ""; $pkTotal = ""; $pkIfNotExist = ""; $pkSetLastInserted = ""; $beginIfLastInserted = ""; $endIfLastInserted = ""; if($this->parentTbMeta != null) $pkIfExist = '$this->buscarPorID(:pk) != null'; $attrsKeys = array_keys($this->attPK); for ($i = 0; $i < count($attrsKeys); $i++) { $att = $this->attPK[$attrsKeys[$i]]; $name = $att->getName(); $pkWhere .= $name." = :".$name; $pkBuscar .= "tb.".$name." = $".$name; $pkInitParam .= "$".$name." = -1"; $pkBind .= '$statment->bindParam(\':'.$name.'\', $'.$name.');'; if($this->parentTbMeta == null){ $pkIfUpdate .= "$".$tableName."->get".ucfirst($name)."() != null && $".$tableName."->get".ucfirst($name)."() > 0 "; $pkIfNotExist .= " $".$tableName."->get".ucfirst($name)."() == null || $".$tableName."->get".ucfirst($name)."() <= 0 "; $pkSetLastInserted .= " $".$tableName."->set".ucfirst($name).'($this->conexao->lastInsertId());'; }else{ if(strlen($pkIfUpdate) > 0) $pkIfUpdate .= ", "; $pkIfUpdate .= "$".$tableName."->get".ucfirst($name)."()"; } $pkTotal = $name; if($i < ( count($this->attPK)-1 )){ $pkWhere .= " AND "; $pkBuscar .= " AND "; $pkIfUpdate .= "\n\t\t\t && "; $pkIfNotExist .= "\n\t\t\t || "; $pkSetLastInserted .= "\n\t\t\t\t"; $pkInitParam .= ", "; $pkBind .= "\n\t\t\t"; } } if($this->parentTbMeta != null){ $pkIfExist = '$this->buscarPorID(:pk) != null'; $pkIfUpdate = str_replace(":pk", $pkIfUpdate, $pkIfExist); $beginIf = stripos($this->templateDAO, Constantes::$TPL_DAO_BEGIN_IF_LAST_INSERTED); $endIf = stripos($this->templateDAO, Constantes::$TPL_DAO_END_IF_LAST_INSERTED)+strlen(Constantes::$TPL_DAO_END_IF_LAST_INSERTED); $part1 = substr($this->templateDAO, 0, $beginIf); $part2 = substr($this->templateDAO, $endIf); $this->templateDAO = $part1.$part2; }else{ $this->templateDAO = str_replace(Constantes::$TPL_DAO_BEGIN_IF_LAST_INSERTED, $beginIfLastInserted, $this->templateDAO); $this->templateDAO = str_replace(Constantes::$TPL_DAO_END_IF_LAST_INSERTED, $endIfLastInserted, $this->templateDAO); } $this->templateDAO = str_replace(Constantes::$TPL_DAO_PK_IF_UPDATE, $pkIfUpdate, $this->templateDAO); $this->templateDAO = str_replace(Constantes::$TPL_DAO_PK_IF_NOT_EXIST, $pkIfNotExist, $this->templateDAO); $this->templateDAO = str_replace(Constantes::$TPL_DAO_PK_SET_LAST_INSERTED, $pkSetLastInserted, $this->templateDAO); $this->templateDAO = str_replace(Constantes::$TPL_DAO_PK_WHERE, $pkWhere, $this->templateDAO); $this->templateDAO = str_replace(Constantes::$TPL_DAO_PK_BUSCAR, $pkBuscar, $this->templateDAO); $this->templateDAO = str_replace(Constantes::$TPL_DAO_PK_INIT_PARAM, $pkInitParam, $this->templateDAO); $this->templateDAO = str_replace(Constantes::$TPL_DAO_PK_BIND, $pkBind, $this->templateDAO); $this->templateDAO = str_replace(Constantes::$TPL_DAO_PK_TOTAL, $pkTotal, $this->templateDAO); } public function generateListParam(){ $listParam = ""; $listParamInit = ""; $whereTest = ""; $this->generateListParamByList($this->tableMeta->getAttributes(), "tb", $listParam, $listParamInit, $whereTest); if($this->parentTbMeta != null && count($this->parentTbMeta->getAttributes()) > 0) $this->generateListParamByList ($this->parentTbMeta->getAttributes(), "pr", $listParam, $listParamInit, $whereTest); $this->templateDAO = str_replace(Constantes::$TPL_LIST_PARAM_INIT, $listParamInit, $this->templateDAO); $this->templateDAO = str_replace(Constantes::$TPL_LIST_PARAM, $listParam, $this->templateDAO); $this->templateDAO = str_replace(Constantes::$TPL_DAO_WHERE_TEST, $whereTest, $this->templateDAO); $this->templateDAO = str_replace(",,", ",", $this->templateDAO); #gambiarra! } public function generateListParamByList($attrs, $prefixTable = "tb", &$listParam = "", &$listParamInit = "", &$whereTest = ""){ $attrsKeys = array_keys($attrs); for ($i = 0; $i < count($attrsKeys); $i++) { $name = $attrsKeys[$i]; if(!$attrs[$name]->isPrimaryKey() && $attrs[$name]->isImportant()){ if(strlen(trim($listParam)) > 0){ $listParam .= ", "; } if(strlen(trim($listParamInit)) > 0){ $listParamInit .= ", "; } $listParam .= "$$name"; $type = $attrs[$name]->getType(); $default = $attrs[$name]->getDefault(); $value = '""'; if(Util::isTypeNumeric($type)){ $value = "-1"; if(strlen($default)) $value = $default; $whereTest .= "if (isset($$name) && $$name > 0) {\n\t\t\t\$where = \$where . \" AND $prefixTable.$name = $$name\";\n\t\t}\n\t\t"; }else{ $value = "\"\""; $whereTest .= "if (isset($$name) && strlen($$name) > 0) {\n\t\t\t\$where = \$where . \" AND $prefixTable.$name = '$$name'\";\n\t\t}\n\t\t"; } $listParamInit .= "$".$name." = ".$value; } } } public function generateSetValues(){ $attrs = $this->tableMeta->getAttributes(); $tableName = $this->tableMeta->getName(); $attrsKeys = array_keys($attrs); $set = ""; for ($i = 0; $i < count($attrsKeys); $i++) { $name = $attrsKeys[$i]; if(!$attrs[$name]->isForeignKey()) $set .= "$".$tableName."->set".ucfirst($name).'($row[\''.$name.'\']);'."\n\t\t\t\t"; } $this->templateDAO = str_replace(Constantes::$TPL_DAO_SET_VALUES, $set, $this->templateDAO); } public function generateRelExternal(){ $tableName = $this->tableMeta->getName(); $set = ""; $dao = ""; $initDao = ""; foreach ($this->tableMeta->getAttributes() as $attMeta) { $name = $attMeta->getName(); if(!$attMeta->isPrimaryKey() && $attMeta->isForeignKey()){ if(stripos($name, "ID")) $name = str_replace ("ID", "", $name); $dao .= "protected $".$name."DAO;\n\t"; $initDao .= '$this->'.$name.'DAO = new '.ucfirst($name)."DAO();\n\t\t"; $set .= "$".$tableName."->set".ucfirst($name).'($this->'.$name.'DAO->buscarPorID($row[\''.$name.'ID\'],true));'."\n\t\t\t\t\t"; } } $this->templateDAO = str_replace(Constantes::$TPL_DAO_DAOS_EXTERNAL, $dao, $this->templateDAO); $this->templateDAO = str_replace(Constantes::$TPL_DAO_INIT_DAOS_EXTERNAL, $initDao, $this->templateDAO); $this->templateDAO = str_replace(Constantes::$TPL_DAO_REL_EXTERNAL, $set, $this->templateDAO); } public function generateFile($generate = true){ if($generate) $this->generate(); $dirDAO = "temp_gen/".$this->params[Constantes::$PARAM_PROJECT_NAME]."/dao/"; if(!file_exists($dirDAO)) mkdir ($dirDAO, 0755,true); $fp = fopen($dirDAO.ucfirst($this->tableMeta->getName())."DAO.class.php", "w+"); fwrite($fp, $this->templateDAO); fclose($fp); } } ?>
0a1b2c3d4e5
trunk/BloumGenerator/generator/DAOGenerator.class.php
PHP
asf20
16,828
<?php /** * Description of FormBuscaViewGenerator * * @author Magno */ class FormBuscaViewGenerator extends ViewGenerator{ private $attBuscaForm; public function __construct($tableMeta, $viewParams) { $this->attBuscaForm = ""; parent::__construct($tableMeta, $viewParams, Constantes::$TEMPLATES_VIEW_DIR."formBusca.bloum"); } public function generate() { parent::generateNames(); $this->generateAttValues(); return $this->templateView; } public function generateAttValues(){ $this->generateAttValuesParam($this->tableMeta); } public function generateAttValuesParam($table){ $tableName = $table->getName(); $attributes = $table->getAttributes(); $attrsKeys = array_keys($attributes); for ($i = 0; $i < count($attrsKeys); $i++) { $att = $attributes[$attrsKeys[$i]]; $name = $att->getName(); if(!$att->isImportant() || ($att->isPrimaryKey() && !$att->isForeignKey())) continue; if(!$att->isForeignKey()){ $this->attBuscaForm .= '<div class="float-left gutter-right">{form_input name="'.$name.'" label="'.ucfirst($name).'"}</div>'; $this->attBuscaForm .= "\n\t"; } else{ $tbFkName = str_replace("ID", "", $name); $fks = $table->getFKReferences(); $fkMeta = null; foreach ($fks as $fk) { foreach ($fk->getAttributes() as $fkAtt) { if(strcmp(strtolower($fkAtt->getName()), strtolower($tbFkName."ID")) == 0){ $fkMeta = $fk; break; } } if($fkMeta != null) break; } if($fkMeta == null) throw new Exception ("Tabela (".$tbFkName.") Referenciada Na Herança com (".$this->tableMeta->getName().") Não Encontrada!!!"); if($fkMeta->isExtends()) $this->generateAttValuesParam ($fkMeta->getTableReference()); $tbReference = $fkMeta->getTableReference()->getName(); $tab = "\n\t\t\t\t"; if(strcmp($fkMeta->getTypeForm(), Constantes::$TYPE_FORM_COMBO) == 0){ $this->attBuscaForm .= '<div class="float-left gutter-right">'.$tab."\t".'<label for="'.$tbReference.'ID">'.ucfirst($tbReference).'</label>{html_options name='.$tbReference.'ID id='.$tbReference.'ID options=$'.$tbReference.'s}'.$tab.'</div>'; } } } $this->templateView = str_replace(Constantes::$TPL_VIEW_FORM_ATT_BUSCA_FORM, $this->attBuscaForm, $this->templateView); } public function generateFile($generate = true){ if($generate) $this->generate(); parent::generateFile("formBusca"); } } ?>
0a1b2c3d4e5
trunk/BloumGenerator/generator/FormBuscaViewGenerator.class.php
PHP
asf20
2,956
<?php /** * Description of FormComboViewGenerator * * @author Magno */ class FormComboViewGenerator extends ViewGenerator{ public function __construct($tableMeta, $viewParams) { parent::__construct($tableMeta, $viewParams, Constantes::$TEMPLATES_VIEW_DIR."formCombo.bloum"); } public function generate() { parent::generateNames(); return $this->templateView; } public function generateFile($generate = true){ if($generate) $this->generate(); parent::generateFile("formCombo"); } } ?>
0a1b2c3d4e5
trunk/BloumGenerator/generator/FormComboViewGenerator.class.php
PHP
asf20
567
<?php /** * Description of BeanGenerator * * @author BloumGenerator */ class BeanGenerator { private $tableMeta; private $attributes; private $templateBean; private $params; function __construct($tableMeta, $params) { $this->tableMeta = $tableMeta; $this->params = $params; if(!file_exists(Constantes::$TEMPLATES_BEAN_DIR."Bean.bloum")) throw new Exception ("Template Bean Not Found!!!"); $this->templateBean = file_get_contents(Constantes::$TEMPLATES_BEAN_DIR."Bean.bloum"); $this->organizarAtributos(); //$this->generate(); } public function organizarAtributos(){ $this->attributes = $this->tableMeta->getAttributes(); if(count($this->tableMeta->getFKReferences()) > 0) { $attrsKeys = array_keys($this->attributes); for ($i = 0; $i < count($attrsKeys); $i++) { $attributeMeta = $this->attributes[$attrsKeys[$i]]; $name = $attributeMeta->getName(); if($attributeMeta->isForeignKey()){ $this->attributes[$name] = null; unset ($this->attributes[$name]); $name = str_replace("ID", "", $attributeMeta->getName()); $this->attributes[$name] = new AttributeMeta($name, $attributeMeta->getType(), $attributeMeta->isNotNull(), $attributeMeta->isPrimaryKey(), $attributeMeta->isForeignKey(), $attributeMeta->getDefault(), $attributeMeta->isImportant(), $attributeMeta->isComboDisplay()); } } foreach ($this->tableMeta->getFKReferenciadas() as $fkMeta) { if($fkMeta->getSideObject() == Constantes::$SIDE_OBJ_REF){ if(strcmp($fkMeta->getCardinality(), Constantes::$CARDINALITY_M) == 0){ $name = $fkMeta->getTableFK()->getName()."s"; $type = Constantes::$TYPE_ARRAY; }else{ $name = $fkMeta->getTableFK()->getName(); $type = Constantes::$TYPE_ARRAY; } $this->attributes[$name] = new AttributeMeta($name,$type, false, false, false, "NULL", false, false); } } } } public function generate(){ $this->templateBean = str_replace(Constantes::$TPL_BEAN_NAME_UPPER, ucfirst($this->tableMeta->getName()), $this->templateBean); $this->templateBean = str_replace(Constantes::$TPL_BEAN_NAME_LOWER, lcfirst($this->tableMeta->getName()), $this->templateBean); $this->generateExtends(); $this->generateAllVar(); $this->generateInitVar(); $this->generateArrayVar(); $this->generateConstructVar(); $this->generateGetters(); $this->generateSetters(); return $this->templateBean; } public function generateExtends(){ $numExt = 0; $extends = ""; foreach ($this->tableMeta->getFKReferences() as $fk) { if($fk->isExtends()){ $numExt++; $extends = "extends ".ucfirst($fk->getTableReference()->getName())."Bean"; } if($numExt > 1){ throw new Exception("Erro, Herança Multipla Não Suportado!!!"); } } $this->templateBean = str_replace(Constantes::$TPL_BEAN_EXTENDS, $extends, $this->templateBean); } public function generateAllVar(){ $attrs = $this->attributes; $attrsKeys = array_keys($attrs); $var = ""; for ($i = 0; $i < count($attrsKeys); $i++) { if($attrs[$attrsKeys[$i]]->isPrimaryKey() && $attrs[$attrsKeys[$i]]->isForeignKey()) continue; $var .= $this->generateVar($attrs[$attrsKeys[$i]]); } $this->templateBean = str_replace(Constantes::$TPL_BEAN_VAR, $var, $this->templateBean); } public function generateVar($attributeMeta){ $var = "private $"; $annotation = ""; if($attributeMeta->isForeignKey()) $annotation = "/**\n\t*@NotNullValidator \n\t*/\n\t"; else if($attributeMeta->isNotNull()) $annotation = "/**\n\t*@NotEmptyValidator \n\t*/\n\t"; $var = $annotation.$var.$attributeMeta->getName(); $var .= ";\n\t"; return $var; } public function generateInitVar(){ $attrs = $this->attributes; $attrsKeys = array_keys($attrs); $initVar = ""; for ($i = 0; $i < count($attrsKeys); $i++){ if($attrs[$attrsKeys[$i]]->isPrimaryKey() && $attrs[$attrsKeys[$i]]->isForeignKey()) continue; $initVar .= '$this->'.$attrsKeys[$i].' = $'.$attrsKeys[$i].";\n\t\t"; } $this->templateBean = str_replace(Constantes::$TPL_BEAN_INIT_VAR, $initVar, $this->templateBean); } public function generateArrayVar(){ $attrs = $this->tableMeta->getAttributes(); $attrsKeys = array_keys($attrs); $arrayVar = ""; for ($i = 0; $i < count($attrsKeys); $i++){ $attMeta = $attrs[$attrsKeys[$i]]; $name = $attMeta->getName(); if($attMeta->isForeignKey() && !$attMeta->isPrimaryKey()){ $aux = str_replace("ID", "", $attrsKeys[$i]); $name = $aux."->get". ucfirst($attrsKeys[$i])."()"; } $arrayVar .= '$arrayBean[\''.$attrsKeys[$i].'\'] = $this->'.$name.";\n\t\t"; } $this->templateBean = str_replace(Constantes::$TPL_BEAN_ARRAY_VAR, $arrayVar, $this->templateBean); } public function generateConstructVar(){ $attrs = $this->attributes; $attrsKeys = array_keys($attrs); $cntVar = ""; for ($i = 0; $i < count($attrsKeys); $i++){ $attMeta = $attrs[$attrsKeys[$i]]; if($attrs[$attrsKeys[$i]]->isPrimaryKey() && $attrs[$attrsKeys[$i]]->isForeignKey()) continue; if(strlen(trim($cntVar)) > 0) $cntVar .= ', '; $name = $attMeta->getName(); $type = $attMeta->getType(); $default = $attMeta->getDefault(); $value = Util::getInitValue($type,$default,$attMeta->isForeignKey()); $cntVar .= "$".$name." = ".$value; } $this->templateBean = str_replace(Constantes::$TPL_BEAN_CONSTRUCT_VAR, $cntVar, $this->templateBean); } public function generateGetters(){ $attrs = $this->attributes; $attrsKeys = array_keys($attrs); $getters = ""; for ($i = 0; $i < count($attrsKeys); $i++){ if($attrs[$attrsKeys[$i]]->isPrimaryKey() && $attrs[$attrsKeys[$i]]->isForeignKey()){ $fks = $this->tableMeta->getFKReferences(); $tbRef = null; foreach ($fks as $fk) { foreach ($fk->getAttributes() as $fkAtt) { if(strcmp(strtolower($fkAtt->getName()), strtolower($attrsKeys[$i]."ID")) == 0){ $tbRef = $fk->getTableReference(); break; } } if($tbRef != null) break; } if($tbRef == null) throw new Exception ("Tabela (".$attrsKeys[$i].") Referenciada Na Herança com (".$this->tableMeta->getName().") Não Encontrada!!!"); $getParent = "new ".ucfirst($attrsKeys[$i])."Bean(:varsParent);"; $varsParent = ""; $attParent = $tbRef->getAttributes(); $attParentKeys = array_keys($attParent); for ($j = 0; $j < count($attParentKeys); $j++) { $nameVar = $attParentKeys[$j]; if($attParent[$nameVar]->isForeignKey()) $nameVar = str_replace ("ID", "", $nameVar); $varsParent .= "parent::get".ucfirst($nameVar)."()"; if($j < ( count($attParentKeys)-1 )) $varsParent .= ', '; } $getParent = str_replace(":varsParent", $varsParent, $getParent); $getters .= 'public function get'.ucfirst($attrsKeys[$i])."(){ \n\t\treturn $getParent\n\t}\n\n\t"; } else{ $getters .= 'public function get'.ucfirst($attrsKeys[$i])."(){ \n\t\treturn \$this->".$attrsKeys[$i].";\n\t}\n\n\t"; } } $this->templateBean = str_replace(Constantes::$TPL_BEAN_GETTERS, $getters, $this->templateBean); } public function generateSetters(){ $attrs = $this->attributes; $attrsKeys = array_keys($attrs); $setters = ""; for ($i = 0; $i < count($attrsKeys); $i++){ $nameAtt = $attrsKeys[$i]; if($attrs[$nameAtt]->isPrimaryKey() && $attrs[$nameAtt]->isForeignKey()){ $fks = $this->tableMeta->getFKReferences(); $tbRef = null; foreach ($fks as $fk) { foreach ($fk->getAttributes() as $fkAtt) { if(strcmp(strtolower($fkAtt->getName()), strtolower($attrsKeys[$i]."ID")) == 0){ $tbRef = $fk->getTableReference(); break; } } if($tbRef != null) break; } if($tbRef == null) throw new Exception ("Tabela (".$attrsKeys[$i].") Referenciada Na Herança com (".$this->tableMeta->getName().") Não Encontrada!!!"); $setParent = "parent::__construct(:varsParent);"; $varsParent = ""; $attParent = $tbRef->getAttributes(); $attParentKeys = array_keys($attParent); for ($j = 0; $j < count($attParentKeys); $j++) { $nameVar = $attParentKeys[$j]; if($attParent[$nameVar]->isForeignKey()) $nameVar = str_replace ("ID", "", $nameVar); $varsParent .= "$".$nameAtt."->get".ucfirst($nameVar)."()"; if($j < ( count($attParentKeys)-1 )) $varsParent .= ', '; } $setParent = str_replace(":varsParent", $varsParent, $setParent); $setters .= 'public function set'.ucfirst($attrsKeys[$i])."($".$attrsKeys[$i]."){ \n\t\t$setParent\n\t}\n\n\t"; } else{ $setters .= 'public function set'.ucfirst($attrsKeys[$i])."($".$attrsKeys[$i]."){ \n\t\t\$this->".$attrsKeys[$i]." = $".$attrsKeys[$i].";\n\t}\n\n\t"; } } $this->templateBean = str_replace(Constantes::$TPL_BEAN_SETTERS, $setters, $this->templateBean); } public function generateFile($generate = true){ if($generate) $this->generate(); $dirModel = "temp_gen/".$this->params[Constantes::$PARAM_PROJECT_NAME]."/model/"; if(!file_exists($dirModel)) mkdir ($dirModel, 0755,true); $fp = fopen($dirModel.ucfirst($this->tableMeta->getName())."Bean.class.php", "w+"); fwrite($fp, $this->templateBean); fclose($fp); } } ?>
0a1b2c3d4e5
trunk/BloumGenerator/generator/BeanGenerator.class.php
PHP
asf20
12,030
<?php /** * Description of ListarViewGenerator * * @author Magno */ class ListarViewGenerator extends ViewGenerator{ public function __construct($tableMeta, $viewParams) { parent::__construct($tableMeta, $viewParams, Constantes::$TEMPLATES_VIEW_DIR."listar.bloum"); } public function generate() { parent::generateNames(); $this->generateAttValues(); return $this->templateView; } public function generateAttValues(){ $this->generateAttValuesParam($this->tableMeta); } public function generateAttValuesParam($table){ $tableName = $table->getName(); $attributes = $table->getAttributes(); $attrsKeys = array_keys($attributes); $attBuscaJs = ""; $attBuscaJsParam = ""; for ($i = 0; $i < count($attrsKeys); $i++) { $att = $attributes[$attrsKeys[$i]]; $name = $att->getName(); if(!$att->isImportant() || ($att->isPrimaryKey() && !$att->isForeignKey())) continue; if(!$att->isForeignKey()){ $attBuscaJs .= 'var '.$name.' = $("#'.$name.'").val();'."\n\t\t"; $attBuscaJsParam .= $name.' : '.$name.','."\n\t\t\t\t"; } else{ $tbFkName = str_replace("ID", "", $name); $fks = $table->getFKReferences(); $fkMeta = null; foreach ($fks as $fk) { foreach ($fk->getAttributes() as $fkAtt) { if(strcmp(strtolower($fkAtt->getName()), strtolower($tbFkName."ID")) == 0){ $fkMeta = $fk; break; } } if($fkMeta != null) break; } if($fkMeta == null) throw new Exception ("Tabela (".$tbFkName.") Referenciada Na Herança com (".$this->tableMeta->getName().") Não Encontrada!!!"); if($fkMeta->isExtends()) $this->generateAttValuesParam ($fkMeta->getTableReference()); $tbReference = $fkMeta->getTableReference()->getName(); if(strcmp($fkMeta->getTypeForm(), Constantes::$TYPE_FORM_COMBO) == 0){ $attBuscaJs .= 'var '.$name.' = $("#'.$name.'").val();'."\n\t\t"; $attBuscaJsParam .= $name.' : '.$name.','."\n\t\t\t\t"; } } } $this->templateView = str_replace(Constantes::$TPL_VIEW_LISTAR_ATT_BUSCA_JS_PARAM, $attBuscaJsParam, $this->templateView); $this->templateView = str_replace(Constantes::$TPL_VIEW_LISTAR_ATT_BUSCA_JS, $attBuscaJs, $this->templateView); } public function generateFile($generate = true){ if($generate) $this->generate(); parent::generateFile("listar"); } } ?>
0a1b2c3d4e5
trunk/BloumGenerator/generator/ListarViewGenerator.class.php
PHP
asf20
2,902
<?php /** * Description of FormIncludeViewGenerator * * @author Magno */ class FormIncludeViewGenerator extends ViewGenerator{ public function __construct($tableMeta, $viewParams) { parent::__construct($tableMeta, $viewParams, Constantes::$TEMPLATES_VIEW_DIR."formInclude.bloum"); } public function generate() { parent::generateNames(); $this->generatePkValues(); $this->generateAttValues(); return $this->templateView; } public function generatePkValues(){ $tableName = $this->tableMeta->getName(); $pkInputHiden = ""; $inputString = '<input type="hidden" name="'.$tableName.'_:pk" id="'.$tableName.'_:pk" value="{$'.$tableName.'_:pk|default:0}" />'."\n\t\t\t"; $attrsKeys = array_keys($this->attPK); for ($i = 0; $i < count($attrsKeys); $i++) { $att = $this->attPK[$attrsKeys[$i]]; $name = $att->getName(); $pkInputHiden .= str_replace(":pk", $name, $inputString); } $this->templateView = str_replace(Constantes::$TPL_VIEW_CADASTRO_PK_INPUT_HIDDEN, $pkInputHiden, $this->templateView); } public function generateAttValues(){ $tableName = $this->tableMeta->getName(); $attributes = $this->tableMeta->getAttributes(); $attrsKeys = array_keys($attributes); $attInputs = ""; $fkInputs = ""; for ($i = 0; $i < count($attrsKeys); $i++) { $att = $attributes[$attrsKeys[$i]]; $name = $att->getName(); if($att->isPrimaryKey() && !$att->isForeignKey()) continue; if(!$att->isForeignKey()){ $required = ""; if($att->isNotNull()){ $required = "required=true"; } $attInputs .= '{form_input name="'.$tableName.'_'.$name.'" label="'.ucfirst($name).'" '.$required.' value="{$'.$tableName.'_'.$name.'|default:\'\'}"}'; $attInputs .= "\n\t"; } else{ $tbFkName = str_replace("ID", "", $name); $fks = $this->tableMeta->getFKReferences(); $fkMeta = null; foreach ($fks as $fk) { foreach ($fk->getAttributes() as $fkAtt) { if(strcmp(strtolower($fkAtt->getName()), strtolower($tbFkName."ID")) == 0){ $fkMeta = $fk; break; } } if($fkMeta != null) break; } if($fkMeta == null) throw new Exception ("Tabela (".$tbFkName.") Referenciada Na Herança com (".$this->tableMeta->getName().") Não Encontrada!!!"); $tbReference = $fkMeta->getTableReference()->getName(); $tab = "\n"; if(strcmp($fkMeta->getTypeForm(), Constantes::$TYPE_FORM_COMBO) == 0){ $fkInputs .= '<fieldset>'.$tab."\t".'<legend>Dados '.ucfirst($tbReference).'</legend>'.$tab."\t".'{include file="view/'.$tbReference.'/formCombo.tpl"}'.$tab.'</fieldset>'; }/*else if(strcmp($fkMeta->getTypeForm(), Constantes::$TYPE_FORM_HIDDEN_ID) == 0){ $fkInputs .= '<input type="hidden" name="'.$tbReference.'" id="'.$tbReference.'" value="{$'.$tbReference.'ID|default:0}" />'; }*/else if(strcmp($fkMeta->getTypeForm(), Constantes::$TYPE_FORM_INCLUDE) == 0){ $fkInputs .= '{include file="view/'.$tbReference.'/formInclude.tpl"}'.$tab; } } } $this->templateView = str_replace(Constantes::$TPL_VIEW_CADASTRO_ATT_INPUTS, $attInputs, $this->templateView); $this->templateView = str_replace(Constantes::$TPL_VIEW_CADASTRO_FK_INPUTS, $fkInputs, $this->templateView); } public function generateFile($generate = true){ if($generate) $this->generate(); parent::generateFile("formInclude"); } } ?>
0a1b2c3d4e5
trunk/BloumGenerator/generator/FormIncludeViewGenerator.class.php
PHP
asf20
4,042
<?php /** * Description of TabelaViewGenerator * * @author Magno */ class TabelaViewGenerator extends ViewGenerator{ public function __construct($tableMeta, $viewParams) { parent::__construct($tableMeta, $viewParams, Constantes::$TEMPLATES_VIEW_DIR."tabela.bloum"); } public function generate() { parent::generateNames(); $this->generatePkUrlParam(); $this->generateAttValues(); return $this->templateView; } public function generatePkUrlParam(){ $tableName = $this->tableMeta->getName(); $pkUrlParam = ""; $attrsKeys = array_keys($this->attPK); for ($i = 0; $i < count($attrsKeys); $i++) { $att = $this->attPK[$attrsKeys[$i]]; $name = $att->getName(); $pkUrlParam .= $name.'={$'.$tableName."->get".ucfirst($name).'()}'; if($i < ( count($this->attPK)-1 )){ $pkUrlParam .= "&"; } } $this->templateView = str_replace(Constantes::$TPL_VIEW_PK_URL_PARAM, $pkUrlParam, $this->templateView); } public function generateAttValues(){ $this->generateAttValuesParam($this->tableMeta, $this->tableMeta->getName()); } public function generateAttValuesParam($table, $tableName){ $attributes = $table->getAttributes(); $attrsKeys = array_keys($attributes); $attHeadTable = ""; $attRowTable = ""; for ($i = 0; $i < count($attrsKeys); $i++) { $att = $attributes[$attrsKeys[$i]]; $name = $att->getName(); if($att->isPrimaryKey() && !$att->isForeignKey()) continue; if(!$att->isForeignKey()){ $attHeadTable .= '<th scope="col">'.ucfirst($name).'</th>'; $attRowTable .= '<td>{$'.$tableName.'->get'.ucfirst($name).'()}</td>'; } else{ $tbFkName = str_replace("ID", "", $name); $fks = $table->getFKReferences(); $fkMeta = null; foreach ($fks as $fk) { foreach ($fk->getAttributes() as $fkAtt) { if(strcmp(strtolower($fkAtt->getName()), strtolower($tbFkName."ID")) == 0){ $fkMeta = $fk; break; } } if($fkMeta != null) break; } if($fkMeta == null) throw new Exception ("Tabela (".$tbFkName.") Referenciada Na Herança com (".$this->tableMeta->getName().") Não Encontrada!!!"); if($fkMeta->isExtends()) $this->generateAttValuesParam ($fkMeta->getTableReference(), $tableName); $tbReference = $fkMeta->getTableReference()->getName(); $tab = "\n"; if(strcmp($fkMeta->getTypeForm(), Constantes::$TYPE_FORM_COMBO) == 0){ $comboDisplay = ""; foreach ($fk->getTableReference()->getAttributes() as $attFk) { if($attFk->isComboDisplay()){ $comboDisplay = ucfirst($attFk->getName()); break; } } $attHeadTable .= '<th scope="col">'.ucfirst($tbReference).'</th>'; $attRowTable .= '<td>{$'.$tableName.'->get'.ucfirst($tbReference).'()->get'.$comboDisplay.'()}</td>'; } } $attHeadTable .= "\n\t"; $attRowTable .= "\n\t\t"; } $this->templateView = str_replace(Constantes::$TPL_VIEW_LISTAR_ATT_HEAD_TABLE, $attHeadTable, $this->templateView); $this->templateView = str_replace(Constantes::$TPL_VIEW_LISTAR_ATT_ROW_TABLE, $attRowTable, $this->templateView); } public function generateFile($generate = true){ if($generate) $this->generate(); parent::generateFile("tabela"); } } ?>
0a1b2c3d4e5
trunk/BloumGenerator/generator/TabelaViewGenerator.class.php
PHP
asf20
4,011
<?php /** * Description of ServiceGenerator * * @author BloumGenerator */ class ServiceGenerator { private $tableMeta; private $parentTbMeta; private $templateService; private $attPK; private $params; function __construct($tableMeta, $params) { $this->tableMeta = $tableMeta; $this->params = $params; $this->parentTbMeta = null; if(!file_exists(Constantes::$TEMPLATES_SERVICE_DIR."Service.bloum")) throw new Exception ("Template Service Not Found!!!"); $this->templateService = file_get_contents(Constantes::$TEMPLATES_SERVICE_DIR."Service.bloum"); $this->searchPK(); $this->searchParent(); } public function searchPK(){ $numExt = 0; foreach ($this->tableMeta->getFKReferences() as $fk) { if($fk->isExtends()){ $numExt++; $this->parentTbMeta = $fk->getTableReference(); } } if($numExt > 1){ throw new Exception("Erro, Herança Multipla Não Suportado!!!"); } } public function searchParent(){ foreach ($this->tableMeta->getAttributes() as $att) { if($att->isPrimaryKey()){ $this->attPK[$att->getName()] = $att; } } } public function generate(){ $this->templateService = str_replace(Constantes::$TPL_BEAN_NAME_UPPER, ucfirst($this->tableMeta->getName()), $this->templateService); $this->templateService = str_replace(Constantes::$TPL_BEAN_NAME_LOWER, lcfirst($this->tableMeta->getName()), $this->templateService); $this->generatePkValues(); $this->generateListParam(); return $this->templateService; } public function generatePkValues(){ $tableName = $this->tableMeta->getName(); $pkInitParam = ""; $pkIfTest = ""; $pkList = ""; $pkTotal = ""; $attrsKeys = array_keys($this->attPK); for ($i = 0; $i < count($attrsKeys); $i++) { $att = $this->attPK[$attrsKeys[$i]]; $name = $att->getName(); $pkList .= "$".$name; $pkInitParam .= "$".$name." = -1"; $pkIfTest .= " $".$name." == null || $".$name." <= 0 "; $pkTotal = $name; if($i < ( count($this->attPK)-1 )){ $pkList .= ", "; $pkIfTest .= "\n\t\t\t || "; $pkInitParam .= ", "; } } $this->templateService = str_replace(Constantes::$TPL_SERVICE_PK_IF_TEST, $pkIfTest, $this->templateService); $this->templateService = str_replace(Constantes::$TPL_SERVICE_PK_INIT_PARAM, $pkInitParam, $this->templateService); $this->templateService = str_replace(Constantes::$TPL_SERVICE_PK_LIST, $pkList, $this->templateService); $this->templateService = str_replace(Constantes::$TPL_SERVICE_PK_TOTAL, $pkTotal, $this->templateService); } public function generateListParam(){ $attrs = $this->tableMeta->getAttributes(); if($this->parentTbMeta != null && count($this->parentTbMeta->getAttributes()) > 0) $attrs = array_merge ($attrs,$this->parentTbMeta->getAttributes()); $attrsKeys = array_keys($attrs); $tableName = $this->tableMeta->getName(); $listParam = ""; $listParamInit = ""; for ($i = 0; $i < count($attrsKeys); $i++) { $name = $attrsKeys[$i]; if(!$attrs[$name]->isPrimaryKey() && $attrs[$name]->isImportant()){ if(strlen($listParam) > 0){ $listParam .= ", "; } if(strlen($listParamInit) > 0){ $listParamInit .= ", "; } $listParam .= "$$name"; $type = $attrs[$name]->getType(); $default = $attrs[$name]->getDefault(); $value = '""'; if(Util::isTypeNumeric($type)){ $value = "-1"; if(strlen($default)) $value = $default; }else{ $value = "\"\""; } $listParamInit .= "$".$name." = ".$value; } } $this->templateService = str_replace(Constantes::$TPL_LIST_PARAM_INIT, $listParamInit, $this->templateService); $this->templateService = str_replace(Constantes::$TPL_LIST_PARAM, $listParam, $this->templateService); $this->templateService = str_replace(",,", ",", $this->templateService); #gambiarra } public function generateFile($generate = true){ if($generate) $this->generate(); $dirService = "temp_gen/".$this->params[Constantes::$PARAM_PROJECT_NAME]."/service/"; if(!file_exists($dirService)) mkdir ($dirService, 0755,true); $fp = fopen($dirService.ucfirst($this->tableMeta->getName())."Service.class.php", "w+"); fwrite($fp, $this->templateService); fclose($fp); } } ?>
0a1b2c3d4e5
trunk/BloumGenerator/generator/ServiceGenerator.class.php
PHP
asf20
5,301
<!DOCTYPE html> <html lang="en"> <head> <title>System error</title> <meta charset="utf-8"> <meta name="robots" content="none"> {literal} <!-- Mobile metas --> <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"> <!-- Global stylesheets --> <link href="include/css/reset.css" rel="stylesheet" type="text/css"> <link href="include/css/common.css" rel="stylesheet" type="text/css"> <link href="include/css/form.css" rel="stylesheet" type="text/css"> <link href="include/css/standard.css" rel="stylesheet" type="text/css"> <link href="include/css/special-pages.css" rel="stylesheet" type="text/css"> <!-- Custom styles --> <link href="include/css/simple-lists.css" rel="stylesheet" type="text/css"> <!-- Favicon --> <link rel="shortcut icon" type="image/x-icon" href="include/favicon.ico"> <link rel="icon" type="image/png" href="include/favicon-large.png"> <!-- Generic libs --> <script type="text/javascript" src="include/js/html5.js"></script><!-- this has to be loaded before anything else --> <script type="text/javascript" src="include/js/jquery.js"></script> <!-- Template core functions --> <script type="text/javascript" src="include/js/common.js"></script> <script type="text/javascript" src="include/js/standard.js"></script> <!--[if lte IE 8]><script type="text/javascript" src="include/js/standard.ie.js"></script><![endif]--> <script type="text/javascript" src="include/js/jquery.tip.js"></script> <!-- Template custom styles libs --> <script type="text/javascript" src="include/js/list.js"></script> <!-- Ajax error report --> <script type="text/javascript"> $(document).ready(function() { $('#send-report').submit(function(event) { // Stop full page load event.preventDefault(); var submitBt = $(this).find('button[type=submit]'); submitBt.disableBt(); // Target url var target = $(this).attr('action'); if (!target || target == '') { // Page url without hash target = document.location.href.match(/^([^#]+)/)[1]; } // Request var data = { a: $('#a').val(), report: $('#report').val(), description: $('#description').val(), sender: $('#sender').val() }; // Send $.ajax({ url: target, dataType: 'json', type: 'POST', data: data, success: function(data, textStatus, XMLHttpRequest) { if (data.valid) { $('#send-report').removeBlockMessages().blockMessage('Report sent, thank you for your help!', {type: 'success'}); } else { // Message $('#send-report').removeBlockMessages().blockMessage('An unexpected error occured, please try again', {type: 'error'}); submitBt.enableBt(); } }, error: function(XMLHttpRequest, textStatus, errorThrown) { // Message $('#send-report').removeBlockMessages().blockMessage('Error while contacting server, please try again', {type: 'error'}); submitBt.enableBt(); } }); // Message $('#send-report').removeBlockMessages().blockMessage('Please wait, sending report...', {type: 'loading'}); }); }); </script> {/literal} </head> <!-- the 'special-page' class is only an identifier for scripts --> <body class="special-page error-bg red dark"> <!-- The template uses conditional comments to add wrappers div for ie8 and ie7 - just add .ie or .ie7 prefix to your css selectors when needed --> <!--[if lt IE 9]><div class="ie"><![endif]--> <!--[if lt IE 8]><div class="ie7"><![endif]--> <section id="error-desc"> <ul class="action-tabs with-children-tip children-tip-left"> <li><a href="javascript:history.back()" title="Go back"><img src="include/images/icons/fugue/navigation-180.png" width="16" height="16"></a></li> <li><a href="javascript:window.location.reload()" title="Reload page"><img src="include/images/icons/fugue/arrow-circle.png" width="16" height="16"></a></li> </ul> <ul class="action-tabs right with-children-tip children-tip-right"> <li><a href="#" title="Show/hide<br>error details" onClick="$(document.body).toggleClass('with-log'); return false;"> <img src="include/images/icons/fugue/application-monitor.png" width="16" height="16"> </a></li> </ul> <div class="block-border"><div class="block-content"> <h1>Admin</h1> <div class="block-header">System error</div> <h2>Error description</h2> <h5>Message</h5> <p>{$mensagem}</p> <p><b>Event type:</b> error<br> <b>Page:</b> {$arquivo}</p> <form class="form" id="send-report" method="post" action="sendReport.html"> <fieldset class="grey-bg no-margin collapse"> <legend><a href="#">Report error</a></legend> <p> <label for="description" class="light float-left">To report this error, please explain how it happened and click below:</label> <textarea name="description" id="description" class="full-width" rows="4"></textarea> </p> <p> <label for="report-sender" class="grey">Your e-mail address (optional)</label> <span class="float-left"><button type="submit" class="full-width">Report</button></span> <input type="text" name="sender" id="sender" value="" class="full-width"> </p> </fieldset> </form> </div></div> </section> <section id="error-log"> <div class="block-border"><div class="block-content"> <h1>Error in {$classe}</h1> <div class="fieldset grey-bg with-margin"> <p><b>Message</b><br> Undefined variable: test</p> </div> <ul class="picto-list"> <li class="icon-tag-small"><b>Php error level:</b> 256</li> <li class="icon-doc-small"><b>File:</b> {$arquivo}</li> <li class="icon-pin-small"><b>Line:</b> 51</li> </ul> <ul class="collapsible-list with-bg"> <li class="close"> <b class="toggle"></b> <span><b>Context:</b></span> <ul class="with-icon no-toggle-icon"> <li class="close"> <b class="toggle"></b> <span><b>$options:</b> array(5)</span> <ul> <li><span><b>'id_user':</b> 42</span></li> <li><span><b>'logged':</b> false</span></li> <li class="close"> <b class="toggle"></b> <span><b>'groups':</b> array(3)</span> <ul> <li><span><b>0:</b> 4</span></li> <li><span><b>1:</b> 5</span></li> <li><span><b>2:</b> 12</span></li> </ul> </li> <li><span><b>'resetPassword':</b> false</span></li> <li><span><b>'mail':</b> 'name@domaine.com'</span></li> </ul> </li> <li><span><b>$i:</b> 12</span></li> <li><span><b>$id_user:</b> 42</span></li> </ul> </li> </ul> <h2>Stack backtrace</h2> <ul class="picto-list icon-top with-line-spacing"> <li>{$pilha}</li> </ul> </div></div> </section> <!--[if lt IE 8]></div><![endif]--> <!--[if lt IE 9]></div><![endif]--> </body> </html>
0a1b2c3d4e5
trunk/BloumGenerator/view/erros/error.tpl
Smarty
asf20
7,243
{include file="steps/headStep.tpl"} <h2 class="bigger">Pré Visualização das Actions e Views</h2> <table class="table" cellspacing="0" width="100%"> <thead> <tr> <th scope="col">Tabela</th> <th scope="col" class="table-actions">Visualizar</th> </tr> </thead> {foreach $tablesMeta as $tb} {$tbName = $tb->getName()} <tr> <td>{$tbName|capitalize}</td> {if $tb->isCrud()} <td> <a href="javascript:void(0);" title="Visualizar Action" class="with-tip" onclick="loadClass('action','{$tbName}')">Action</a> <br/> Views(<a href="javascript:void(0);" title="Visualizar view/{$tbName}/cadastro.tpl" class="with-tip" onclick="loadClass('view','{$tbName}','cadastro')">cadastro</a> | <a href="javascript:void(0);" title="Visualizar view/{$tbName}/formInclude.tpl" class="with-tip" onclick="loadClass('view','{$tbName}','formInclude')">formInclude</a> | <a href="javascript:void(0);" title="Visualizar view/{$tbName}/formCombo.tpl" class="with-tip" onclick="loadClass('view','{$tbName}','formCombo')">formCombo</a> | <a href="javascript:void(0);" title="Visualizar view/{$tbName}/listar.tpl" class="with-tip" onclick="loadClass('view','{$tbName}','listar')">listar</a> | <a href="javascript:void(0);" title="Visualizar view/{$tbName}/tabela.tpl" class="with-tip" onclick="loadClass('view','{$tbName}','tabela')">tabela</a> | <a href="javascript:void(0);" title="Visualizar view/{$tbName}/formBusca.tpl" class="with-tip" onclick="loadClass('view','{$tbName}','formBusca')">formBusca</a> | <a href="javascript:void(0);" title="Visualizar view/{$tbName}/detalhes.tpl" class="with-tip" onclick="loadClass('view','{$tbName}','detalhes')">detalhe</a> | <a href="javascript:void(0);" title="Visualizar view/{$tbName}/detalhesInclude.tpl" class="with-tip" onclick="loadClass('view','{$tbName}','detalhesInclude')">detalhesInclude</a>) </td> {else} <td> Views(<a href="javascript:void(0);" title="Visualizar view/{$tbName}/formInclude.tpl" class="with-tip" onclick="loadClass('view','{$tbName}','formInclude')">formInclude</a> | <a href="javascript:void(0);" title="Visualizar view/{$tbName}/formCombo.tpl" class="with-tip" onclick="loadClass('view','{$tbName}','formCombo')">formCombo</a> | <a href="javascript:void(0);" title="Visualizar view/{$tbName}/detalhesInclude.tpl" class="with-tip" onclick="loadClass('view','{$tbName}','detalhesInclude')">detalhesInclude</a>) </td> {/if} </tr> {/foreach} </table>
0a1b2c3d4e5
trunk/BloumGenerator/view/steps/step8.tpl
Smarty
asf20
2,941
{include file="steps/headStep.tpl"} <h2 class="bigger">Escolha o Atributo de Exibição dos ComboBox</h2> <table class="table" cellspacing="0" width="100%"> <thead> <tr> <th scope="col">Tabela</th> <th scope="col" class="table-actions">Atributos</th> </tr> </thead> {foreach $tablesMeta as $tb} {$tbName = $tb->getName()} <tr> <td>{$tbName|capitalize}</td> <td> <select name="{$tbName}"> {foreach $tb->getAttributes() as $att} <option value="{$tbName}:{$att->getName()}" {if $att->isComboDisplay()} selected="true" {/if}>{$att->getName()}</option> {/foreach} </select> </td> </tr> {/foreach} </table>
0a1b2c3d4e5
trunk/BloumGenerator/view/steps/step6.tpl
Smarty
asf20
822
{include file="steps/headStep.tpl"} <h2 class="bigger">Escolha As Definições das Páginas</h2> <p> <input type="checkbox" name="incValidate" id="incValidate" value="true" {if isset($params['incValidate']) && $params['incValidate']} checked="true"{/if} /> <label for="incValidate" class="inline">Incluir Validação JQueryValidate</label> </p> <p> <input type="checkbox" name="incMenu" id="incMenu" value="true" {if isset($params['incMenu']) && $params['incMenu']} checked="true"{/if} /> <label for="incMenu" class="inline">Incluir Menu</label> </p> <p> <input type="checkbox" name="incCss" id="incCss" value="true" {if isset($params['incCss']) && $params['incCss']} checked="true"{/if} /> <label for="incCss" class="inline">Incluir Css Default</label> </p>
0a1b2c3d4e5
trunk/BloumGenerator/view/steps/step7.tpl
Smarty
asf20
803
{include file="steps/headStep.tpl"} <h2 class="bigger">Forneça as Tabelas que Irão Ter Cadastro</h2> <table class="table" cellspacing="0" width="100%"> <thead> <tr> <th scope="col">Tabela</th> <th scope="col">Selecionar</th> </tr> </thead> {foreach $tablesMeta as $table} <tr> <td>{$table->getName()|capitalize}</td> <td> <input type="checkbox" name="{$table->getName()}" value="true" {if $table->isCrud()} checked="true" {/if}/> </td> </tr> {/foreach} </table>
0a1b2c3d4e5
trunk/BloumGenerator/view/steps/step4.tpl
Smarty
asf20
596
{include file="steps/headStep.tpl"} <h2 class="bigger">Escolha os Atributos Mais Importantes</h2> {foreach $tablesMeta as $table} <div class="block-content"> {$tbName = $table->getName()|capitalize} <h1>{$tbName}</h1> <table class="table" cellspacing="0" width="100%"> <thead> <tr> <th scope="col">Atributo</th> <th scope="col">Selecionar</th> </tr> </thead> {foreach $table->getAttributes() as $att} <tr> <td>{$att->getName()}</td> <td> <input type="checkbox" name="{$table->getName()}:{$att->getName()}" {if $att->isImportant() || count($table->getAttributes()) < 4}checked="true"{/if} {if $att->isPrimaryKey()}disabled="true"{/if} value="true"/> </td> </tr> {/foreach} </table> </div> {/foreach}
0a1b2c3d4e5
trunk/BloumGenerator/view/steps/step2.tpl
Smarty
asf20
1,136
<input type="hidden" id="step" name="step" value="{$step}"/> <span class="number bigger">{$step}</span> <small>Generator Wizard</small>
0a1b2c3d4e5
trunk/BloumGenerator/view/steps/headStep.tpl
Smarty
asf20
141
{include file="layout/head.tpl"} {literal} <script type="text/javascript" src="include/js/funcoes.js"></script> <script type="text/javascript"> $().ready(function() { $('#stepForm').submit(function() { var step = $("#step").val(); var janelaModal = abrirModalCarregando('Salvando Passo '+step); $(this).ajaxSubmit({ success : function(responseText, statusText, xhr, $form){ $('#stepDiv').html(responseText); if(step == 8) $("button[type=submit]").hide(1500); janelaModal.closeModal(); } }); return false; }); $(".prevStep").click(function(){ var step = $("#step").val()-1; if(step > 0){ var janelaModal = abrirModalCarregando('Carregando Passo '+step+'...'); $('#stepDiv').load('GeneratorAction.loadStep', {step:step}, function(){ $("button[type=submit]").show(1500); janelaModal.closeModal(); } ); } }); }); </script> {/literal} <!-- the 'special-page' class is only an identifier for scripts --> <body class="special-page wizard-bg"> <!-- The template uses conditional comments to add wrappers div for ie8 and ie7 - just add .ie, .ie7 or .ie6 prefix to your css selectors when needed --> <!--[if lt IE 9]><div class="ie"><![endif]--> <!--[if lt IE 8]><div class="ie7"><![endif]--> <div class="block-border" style="margin: 15px"> <form class="block-content form inline-medium-label" name="stepForm" id="stepForm" method="post" action="GeneratorAction.nextStep"> <h1>BloumGenerator -> {$projectName|default:''}</h1> <p style="text-align:right;"> <button type="button" class="grey prevStep">Voltar</button> <button type="submit">Avançar</button> </p> <div id="stepDiv"> {include file="steps/step1.tpl"} </div> <br /> <p style="text-align:right;"> <button type="button" class="grey prevStep">Voltar</button> <button type="submit">Avançar</button> </p> </form> </div> <!--[if lt IE 8]></div><![endif]--> <!--[if lt IE 9]></div><![endif]--> </body> {include file="layout/footer.tpl"}
0a1b2c3d4e5
trunk/BloumGenerator/view/steps/index.tpl
Smarty
asf20
2,677
{include file="steps/headStep.tpl"} {literal} <script type="text/javascript" src="include/js/funcoes.js"></script> <script type="text/javascript"> $().ready(function() { $("#download").click(function(){ $('#linkDownload').loadWithEffect('GeneratorAction.prepareProjectDownload', function(){$("#download").hide(1500);}); }); }); </script> {/literal} <h2 class="bigger">Faça o download do seu projeto</h2> <p class="align-center" style="padding: 0"> <button type="button" class="big-button red" style="padding: 30px; font-size: x-large" id="download"> Preparar o Projeto Para Download </button> </p> <div id="linkDownload" style="min-height: 150px; min-width: 50px;"></div>
0a1b2c3d4e5
trunk/BloumGenerator/view/steps/lastStep.tpl
Smarty
asf20
754
{include file="steps/headStep.tpl"} <h2 class="bigger">Escolha o Tipo de Formulário dos Relacionamentos</h2> {foreach $tablesMeta as $table} {if count($table->getFKReferences()) > 0} <div class="block-content"> {$tbName = $table->getName()|capitalize} <h1>{$tbName}</h1> <table class="table" cellspacing="0" width="100%"> <thead> <tr> <th scope="col">Tabela Referenciada</th> <th scope="col">Tipo de Formulário</th> </tr> </thead> {foreach $table->getFKReferences() as $fk} <tr> <td>{$fk->getTableReference()->getName()|capitalize}</td> <td> <select name="{$table->getName()}:{$fk->getName()}"> <option value="combo" {if strcmp($fk->getTypeForm(),"combo") == 0} selected="true" {/if}>ComboBox</option> <option value="hidID" {if strcmp($fk->getTypeForm(),"hidID") == 0} selected="true" {/if}>Input Hidden ID</option> <option value="form" {if strcmp($fk->getTypeForm(),"form") == 0} selected="true" {/if}>Incluir Formulário</option> <option value="no" {if strcmp($fk->getTypeForm(),"no") == 0} selected="true" {/if} title="Lembre de Recuperar o Objeto ({$fk->getTableReference()->getName()|capitalize}) em {$tbName}Action.salvar">Nenhum</option> </select> </td> </tr> {/foreach} </table> </div> {/if} {/foreach}
0a1b2c3d4e5
trunk/BloumGenerator/view/steps/step5.tpl
Smarty
asf20
1,917
{include file="steps/headStep.tpl"} <h2 class="bigger">Pré Visualização das Classes</h2> <table class="table" cellspacing="0" width="100%"> <thead> <tr> <th scope="col">Tabela</th> <th scope="col" class="table-actions">Visualizar</th> </tr> </thead> {foreach $tablesMeta as $tb} {$tbName = $tb->getName()} <tr> <td>{$tbName|capitalize}</td> <td> <a href="javascript:void(0);" title="Visualizar Bean" class="with-tip" onclick="loadClass('bean','{$tbName}')">Bean</a> <a href="javascript:void(0);" title="Visualizar Dao" class="with-tip" onclick="loadClass('dao','{$tbName}')">Dao</a> <a href="javascript:void(0);" title="Visualizar Service" class="with-tip" onclick="loadClass('service','{$tbName}')">Service</a> </td> </tr> {/foreach} </table>
0a1b2c3d4e5
trunk/BloumGenerator/view/steps/step3.tpl
Smarty
asf20
922
{include file="steps/headStep.tpl"} <h2 class="bigger">Froneça as Heranças, Caso Exista</h2> <table class="table" cellspacing="0" width="100%"> <thead> <tr> <th scope="col">Tabela</th> <th scope="col">Relacionamento</th> <th scope="col">Referencia</th> <th scope="col">Selecionar</th> </tr> </thead> {foreach $fksHeranca as $fk} <tr> <td>{$fk->getTableFK()->getName()|capitalize}</td> <td>{$fk->getName()}</td> <td>{$fk->getTableReference()->getName()|capitalize}</td> <td> <input type="checkbox" name="{$fk->getTableFK()->getName()}:{$fk->getName()}" value="true" {if $fk->isExtends()} checked="true" {/if}/> </td> </tr> {/foreach} </table>
0a1b2c3d4e5
trunk/BloumGenerator/view/steps/step1.tpl
Smarty
asf20
808
{include file="layout/head.tpl"} {literal} <script type="text/javascript" src="include/js/jquery.validate.min.js"></script> <script type="text/javascript"> $().ready(function() { $("#stepForm").validate({ rules: { file: { required:true, accept: "sql" } ,projectName : { required : true } } }); }); </script> {/literal} <!-- the 'special-page' class is only an identifier for scripts --> <body class="special-page wizard-bg"> <!-- The template uses conditional comments to add wrappers div for ie8 and ie7 - just add .ie, .ie7 or .ie6 prefix to your css selectors when needed --> <!--[if lt IE 9]><div class="ie"><![endif]--> <!--[if lt IE 8]><div class="ie7"><![endif]--> <div class="block-border" style="margin: 15px"> <form class="block-content form inline-medium-label" name="stepForm" id="stepForm" method="post" action="GeneratorAction.saveFile" enctype="multipart/form-data"> <h1>BloumGenerator</h1> <div id="step"> <small>Generator Wizard</small> <h2 class="bigger">Informe o Nome e Envie o Banco de Dados (.sql)</h2> {form_input name="projectName" label="Nome do Projeto" required=true} <p class="required"> <label for="file">Banco de Dados:</label> <input type="file" name="file" id="file" class="full-width"> </p> </div> <p style="text-align:right;"> <button type="submit">Avançar</button> <!--<button type="button" class="grey">Need help?</button>--> </p> </form> </div> <!--[if lt IE 8]></div><![endif]--> <!--[if lt IE 9]></div><![endif]--> </body> {include file="layout/footer.tpl"}
0a1b2c3d4e5
trunk/BloumGenerator/view/index.tpl
Smarty
asf20
1,961
{if isset($numPaginas) && $numPaginas > 1} <ul class="controls-buttons" style="text-align: center"> {$anterior = $pagina-1} {if $anterior <= 0} {$anterior = 1} {/if} <li> <a class="with-tip" title="Anterior" href="javascript:void(0);" onclick="loadTable({$anterior})"> <img alt="" width="16" height="16" src="include/images/icons/fugue/navigation-180.png">&nbsp; </a> </li> {for $pg=1 to $numPaginas} {$click = "loadTable({$pg});"} {$style = ""} {if $pg eq $pagina} {$click=""} {$style = "current"} {/if} <li><a class="with-tip {$style}" title="Página {$pg}" href="javascript:void(0);" onclick="{$click}">{$pg}</a></li> {/for} {$proxima = $pagina+1} {if $proxima >= $numPaginas} {$proxima = $numPaginas} {/if} <li> <a class="with-tip" title="Próxima" href="javascript:void(0);" onclick="loadTable({$proxima})"> &nbsp;<img alt="" width="16" height="16" src="include/images/icons/fugue/navigation.png"> </a> </li> <li class="sep"></li> <li> <a class="with-tip" title="Recarregar" href="javascript:void(0);" onclick="reload()"> &nbsp;<img alt="" width="16" height="16" src="include/images/icons/fugue/arrow-circle.png"> </a> </li> </ul> {/if}
0a1b2c3d4e5
trunk/BloumGenerator/view/include/paginacao.tpl
Smarty
asf20
1,641
<?php /** * Description of FKReferenceStringManager * * @author Magno */ class FKReferenceStringManager { private $tableString; private $tableMeta; private $tablesMeta; function __construct($tableString, $tableMeta, $tablesMeta) { $this->tableString = $tableString; $this->tableMeta = $tableMeta; $this->tablesMeta = $tablesMeta; } public function generateAllFKMeta() { $stringTemp = $this->tableString; $stringAux = str_replace(" ", "", $stringTemp); $stringAux = str_replace("\n", "", $stringAux); $stringAux = str_replace("\r", "", $stringAux); $fksReference = array(); while(stripos($stringAux, Constantes::$CONSTRAINT)){ $indIni = stripos($stringAux, Constantes::$CONSTRAINT); $stringAux = substr($stringAux, $indIni); $indIni = 0; $indFinal = 0; for ($i = 0; $i < strlen($stringAux); $i++) { if(strcmp($stringAux[$i], "(") == 0){ do{ $i++; }while(strcmp($stringAux[$i], ")") != 0); $i++; } if(strcmp($stringAux[$i], ",") == 0 || $i == (strlen($stringAux)-1)){ $indFinal = $i; break; } } $constraintString = trim(substr($stringAux, $indIni, $indFinal+1)); $fk = $this->generateFKMeta($constraintString); $fk->getTableReference()->addFKReferenciada($fk); $fksReference[$fk->getName()] = $fk; $stringAux = trim(substr($stringAux, $indFinal)); } return $fksReference; } public function generateFKMeta($constraintString) { $tableFK = $this->tableMeta; $name = $this->getFKName($constraintString); $attributes = ($this->getFKAttributes($constraintString)); $tableReference = $this->getFKTableReference($constraintString); if($tableReference == null) throw new Exception ("Erro na composição da FK, tabela referenciada não encontrada!!!"); $references = $this->getFKAttributesReference($constraintString, $tableReference); return new FKReferenceMeta($name, $attributes, $tableFK, $tableReference, $references, Constantes::$CARDINALITY_1, Constantes::$SIDE_OBJ_FK, false, Constantes::$TYPE_FORM_NO); } public function getFKName(&$constraintString) { $indIni = stripos($constraintString, Constantes::$CONSTRAINT)+strlen(Constantes::$CONSTRAINT); $constraintString = substr($constraintString, $indIni); $indFim = stripos($constraintString, Constantes::$FOREIGNKEY); return substr($constraintString, 0,$indFim); } public function getFKTableReference(&$constraintString) { $indIni = stripos($constraintString, Constantes::$REFERENCES)+strlen(Constantes::$REFERENCES); if(stripos($constraintString, ".")){ $indIni = stripos($constraintString, ".")+1; } $constraintString = substr($constraintString, $indIni); $indFim = stripos($constraintString, "("); $name = substr($constraintString, 0,$indFim); return $this->tablesMeta[$name]; } public function getFKAttributes(&$constraintString) { $indIni = stripos($constraintString, Constantes::$FOREIGNKEY."(")+strlen(Constantes::$FOREIGNKEY."("); $constraintString = substr($constraintString, $indIni); $indFim = stripos($constraintString, ")"); $attrs = explode(",",substr($constraintString, 0,$indFim)); $attrsMeta = array(); for ($m = 0; $m < count($attrs); $m++) { $atM = $this->tableMeta->getAttributes(); $attrsMeta[] = $atM[$attrs[$m]]; } return $attrsMeta; } public function getFKAttributesReference(&$constraintString, $tableReference) { $indIni = stripos($constraintString, "(")+1; $constraintString = substr($constraintString, $indIni); $indFim = stripos($constraintString, ")"); $attrs = explode(",",substr($constraintString, 0,$indFim)); $attrsMeta = array(); for ($m = 0; $m < count($attrs); $m++) { $atM = $tableReference->getAttributes(); $attrsMeta[] = $atM[$attrs[$m]]; } return $attrsMeta; } } ?>
0a1b2c3d4e5
trunk/BloumGenerator/manager/FKReferenceStringManager.class.php
PHP
asf20
4,497
<?php /** * Description of UploadManager * * @author Magno */ class UploadManager { function __construct() { } public static function salvarArquivoSimples($nome, $destino = ""){ //NOME TEMPORÁRIO NO SERVIDOR $arquivo_temp = @$_FILES[$nome]["tmp_name"]; //NOME DO ARQUIVO NA MÁQUINA DO USUÁRIO $arquivo_name = @$_FILES[$nome]["name"]; //TAMANHO DO ARQUIVO $arquivo_size = @$_FILES[$nome]["size"]; //TIPO MIME DO ARQUIVO $arquivo_type = @$_FILES[$nome]["type"]; $destino = Constantes::$DIR_UPLOAD.$destino; if(strlen($arquivo_name) <= 0) //Caso nao tenha arquivo return ""; //CRIANDO DIRETORIO if(!file_exists($destino)) mkdir ($destino, 0755,true); $ext = explode(".",$arquivo_name); $nomeArquivo = md5(uniqid(time())); if(count($ext) > 0) $nomeArquivo = $nomeArquivo . "." . $ext[count($ext)-1]; //ENVIA O ARQUIVO PARA A PASTA if(!copy($arquivo_temp, $destino.$nomeArquivo)){ throw new Exception ("Erro ao Salvar Arquivo no Servidor!!!"); } return $destino.$nomeArquivo; } public static function salvarArquivoCompactado($nome, $destino){ } } ?>
0a1b2c3d4e5
trunk/BloumGenerator/manager/UploadManager.class.php
PHP
asf20
1,337
<?php /** * Description of AttributeStringManager * * @author Magno */ class AttributeStringManager { private $attributeString; private $attributes; function __construct($attributeString) { $this->attributeString = $attributeString; } public function generateAttributesString(){ $stringTemp = $this->attributeString; $indFinal = -1; $indTemp = -1; $resCol = Constantes::$RES_WORDS_COLUMNS; for ($i = 0; $i < count($resCol); $i++) { $indTemp = stripos($stringTemp, $resCol[$i]); if($indTemp === FALSE) continue; if($i == 0){ $stringAux = str_replace(" ", "", $stringTemp); $stringAux = str_replace("\n", "", $stringAux); $stringAux = str_replace("\r", "", $stringAux); $indAux = stripos($stringAux, "PRIMARYKEY"); if(strcmp($stringAux[$indAux-1], ",") == 0){ $indFinal = $indTemp; } } else if($indTemp < $indFinal){ $indFinal = $indTemp; } } if($indFinal > 0) $stringTemp = trim(substr($stringTemp, 0,$indFinal)); else $stringTemp = trim(substr($stringTemp, 0)); if(strcmp($stringTemp[strlen($stringTemp)-1], ",") == 0){ $stringTemp = trim(substr($stringTemp, 0, strlen($stringTemp)-2)); } $atrs = explode(",", $stringTemp); for ($j = 0; $j < count($atrs); $j++) { $atrs[$j] = trim($atrs[$j]); } return $atrs; } public function getAttributesPK(){ $attrTemp = trim(str_replace(" ", "", $this->attributeString)); $attrsPK = array(); if(stripos($attrTemp, "PRIMARYKEY(")){ $ind = stripos($attrTemp, "PRIMARYKEY(")+strlen("PRIMARYKEY("); $attrTemp = substr($attrTemp, $ind); $indFinal = stripos($attrTemp,")"); $attrTemp = substr($attrTemp, 0, $indFinal); if(stripos($attrTemp, ",")){ $attrsPK = explode(",", $attrTemp); }else{ $attrsPK [] = $attrTemp; } } return $attrsPK; } public function getAttributesFK(){ $attrTemp = trim(str_replace(" ", "", $this->attributeString)); $attrsFK = array(); while(stripos($attrTemp, "FOREIGNKEY(")){ $ind = stripos($attrTemp, "FOREIGNKEY(")+strlen("FOREIGNKEY("); $attrTemp = substr($attrTemp, $ind); $indFinal = stripos($attrTemp,")"); $attrName = substr($attrTemp, 0, $indFinal); if(stripos($attrName, ",")){ $arrayTemp = explode(",", $attrName); for ($x = 0; $x < count($arrayTemp); $x++){ $attrsFK[] = $arrayTemp[$x]; } }else{ $attrsFK [] = $attrName; } } return $attrsFK; } public function generateAllAttributeMeta(){ $atrrsPK = $this->getAttributesPK(); $atrrsFK = $this->getAttributesFK(); $attributesString = $this->generateAttributesString(); $attrMeta = array(); for ($i = 0; $i < count($attributesString); $i++) { $atMeta = $this->generateAttributeMeta($attributesString[$i]); if($this->existAttributeInArray($atMeta->getName(), $atrrsPK)){ $atMeta->setPrimaryKey(true); $atMeta->setImportant(true); } if($this->existAttributeInArray($atMeta->getName(), $atrrsFK)){ $atMeta->setForeignKey(true); $atMeta->setImportant(true); } $attrMeta[$atMeta->getName()] = $atMeta; } return $attrMeta; } public function generateAttributeMeta($attrString){ $attrTemp = trim($attrString); $ind = stripos($attrTemp, " "); $name = $this->getAttributeName($attrTemp); $type = $this->getAttributeType($attrTemp); $default = $this->getAttributeValueDefault($attrTemp); $primaryKey = $this->isAttributePK($attrTemp); $notNull = $this->isAttributeNotNull($attrTemp); $important = $primaryKey; return new AttributeMeta($name, $type, $notNull, $primaryKey, false, $default, $important, false); } public function getAttributeName(&$attrString){ $ind = stripos($attrString, " "); $name = substr($attrString, 0, $ind); $attrString = trim(substr($attrString, $ind)); return $name; } public function getAttributeType(&$attrString){ $type = ""; for ($i = 0; $i < strlen($attrString); $i++) { if(strcmp($attrString[$i], ",") == 0 || strcmp($attrString[$i], " ") == 0) return $type; $type .= $attrString[$i]; } $attrString = trim(substr($attrString, strlen($type)-1)); return $type; } public function getAttributeValueDefault(&$attrString){ $attrTemp = $attrString; $default = ""; if(stripos($attrTemp, Constantes::$DEFAULT)){ $indDef = stripos($attrTemp, Constantes::$DEFAULT); $attrTemp = trim(substr($attrTemp, $indDef+strlen(Constantes::$DEFAULT))); for ($i = 0; $i < strlen($attrTemp); $i++) { if(strcmp($attrTemp[$i], ",") == 0 || strcmp($attrTemp[$i], " ") == 0) return $default; $default .= $attrTemp[$i]; } } return $default; } public function isAttributeNotNull(&$attrString){ $isNotNull = false; if(stripos($attrString, Constantes::$NOT_NULL)){ $isNotNull = true; $attrString = str_replace(Constantes::$NOT_NULL, "", $attrString); } return $isNotNull; } public function isAttributePK(&$attrString){ $isPK = false; if(stripos($attrString, Constantes::$PRIMARY_KEY)){ $isPK = true; $attrString = str_replace(Constantes::$PRIMARY_KEY, "", $attrString); } return $isPK; } public function isAttributeFK(&$attrString){ } public function existAttributeInArray($attrName, $array, $caseSensitive = false){ for ($i = 0; $i < count($array); $i++) { $arrayName = $array[$i]; if(!$caseSensitive){ $attrName = trim( strtolower ($attrName) ); $arrayName = trim( strtolower ($arrayName) ); } if(strcmp($attrName, $arrayName) == 0) return true; } return false; } public static function findByName($attributes, $name){ for ($i = 0; $i < count($attributes); $i++) { $attName = strtolower(trim($attributes[$i]->getName())); $name = strtolower(trim($name)); if(strcmp($attName, $name) == 0) return $attributes[$i]; } return null; } } ?>
0a1b2c3d4e5
trunk/BloumGenerator/manager/AttributeStringManager.class.php
PHP
asf20
7,277
<?php /** * Description of FileManager * * @author Magno */ class FileStringManager { //put your code here private $file; private $fileString; function __construct($file) { $this->file = $file; if(!file_exists($file)) throw new Exception ("File Not Found!!!"); $this->fileString = file_get_contents($file); $this->fileString = str_replace("`", "", $this->fileString); } public function getFile() { return $this->file; } public function setFile($file) { $this->file = $file; } public function getFileString() { return $this->fileString; } public function setFileString($fileString) { $this->fileString = $fileString; } } ?>
0a1b2c3d4e5
trunk/BloumGenerator/manager/FileStringManager.class.php
PHP
asf20
807