Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
008_Administrativnye_pravonarushenia_i_otvetsve...docx
Скачиваний:
0
Добавлен:
01.07.2025
Размер:
160.76 Кб
Скачать

Заключение

Появилась новая категория субъектов административной ответственности в виде индивидуальных предпринимателей, а также политических общественных объединений (например, за нарушения законодательства о выборах и референдумах) и юридический лиц.

Административное принуждение, необходимость которого не должна подвергаться сомнению и в современных условиях (в цивилизованных странах оно наиболее существенно, хотя его цели нередко не соответствуют нашим условиям), является наиболее реальным правовым средством (методом), обеспечивающим соблюдение законности и государственной дисциплины, должное, т.е. соответствующее правопорядку, поведение разнообразных по своим качествам участников управленческих общественных отношений.

Производство по делам об административных правонарушениях является одним их видов административно-процессуальной деятельности юрисдикционного характера и урегулирована нормами Кодекса об административных правонарушениях Российской Федерации, которая представляет собой организационную структуру совокупности конкретных процессуальных стадий, каждая из которых имеет свое процессуальное назначение и обеспечивает необходимую последовательность совершения процессуальных действий.

Подводя итог работе, хотелось бы отметить, что рост числа привлеченных к административной ответственности превысил в 6-ть раз, рост населения России. Каждый третий гражданин привлекался к административной ответственности. В целом по РФ более 70% из всех совершенных административных правонарушений, это нарушение общественного порядка.

Общественный порядок это сложное многогранное общественное явление, термин общественный порядок является одним из самых распространенных и употребляемых как в законодательстве, так и юридической литературе. Конституция, Основы, КоАП содержат статьи об общественном порядке, но законодательное определение этого понятия отсутствует, не сложилось единое мнение ни в литературе, ни на практике.

В настоящее время практика установления административной ответственности связана с изданием многочисленных нормативных актов центральными и местными исполнительными органами власти. Многие действующие нормы, устанавливающие административную ответственность за нарушение общественного порядка, переплетаются и дублируют друг друга. Все это создает определенные трудности в правоприменительной деятельности. Для решения этой проблемы необходимо объединить такие нормы права в единый нормативный акт. Трудность создается тем обстоятельством, что в юридической литературе до настоящего времени, отсутствует единство мнений относительно круга поступков, посягающих на общественные интересы.

Список литературы

  1. Конституция Российской Федерации от 12. 12. 1993. Принята всенародным голосованием 12 декабря 1993 г. (с учетом поправок, внесенных законами Российской Федерации о поправках к Конституции Российской Федерации от 30 декабря 2008 г. № 6-ФКЗ и от 30 декабря 2008 г. № 7-ФКЗ) // Российская газета. – 2008. – № 237.

  2. Административное право России : учебник для студентов вузов, под ред. П.И. Кононова, В.Я. Кикотя, И.Ш. Килясханова. – 3-е изд., перераб. И доп. – М.: ЮНИТИ-ДАНА: Закон и право, 2008. – 559 с.

  3. Административное право Российской Федерации. Учебное пособие. М.: Издательство «Юрлитинформ», 2006. – 608 с.

  4. Агапов А.Б. Административное право. Учебный курс. М., Статут, 2012. – 342С.

  5. Алехин А.П., Кармолицкий А.А., Козлов Ю.М.. Административное право Российской Федерации. Учебник для ВУЗов. М., Зерцало, 2012. – 445С.

  6. Большой юридический словарь /Под ред. А.Я.Сухарева. В.Д.Зорьккна. В.К Крутских.- М.: 2008. – 953С.

  7. Демин А.А. Административное право Российской Федерации. Курс лекций. Учебное пособие. М., Зерцало, 2012 . -332С.

  8. Ордина О. Н. Источники административного права России и проблемы их систематизации, 2009. – 556с.

  9. Печников Н.П. Должностные и служебные преступления: лекции к курсу, ТГТУ, 32с., 2010. – 394с.

  10. Панова И.В. Административно-процессуальное право России, 2009. – 887с.

  11. П

    Database error in antiplagiat.ru:

    Invalid SQL: 1114

    SELECT varname, value, datatype FROM setting;

    MySQL Error: MySQL server has gone away Error Number: 2006

    Script: http://antiplagiat.ru Referrer: http://www.antiplagiat.ru/Cabinet/Cabinet.aspx?folderId=348353648346 IP Address: 127.0.0.1

    Username: an_User Classname: vap_Database MySQL Version:

    Database Error: Unable to connect to the database:Could not connect to MySQL Error 1238: Неправильный синтаксис около "%.*ls".

    Database Error: Unable to connect to the database:Could not connect to database SQL Server Error 1479: Недопустимый список столбцов после имени объекта в инструкции GRANT/REVOKE.

    MySQL Error: Illegal mix of collations (cp1251_bin,IMPLICIT) and (latin1_bin,IMPLICIT) for operation '=' Error Number: 1267

    Code errors:

    Include php errors require('includes/application_top.php');

    /*{DB_NAME} {DB_HOST} {DB_USER} {DB_PASS} {TABLE_PREFIX} {USE_MOD_REWRITE} true/false {USE_PDO} */ if(!defined('CORE_ROOT')) { exit('Cannot call setup.php directly. Run <a href="index.php">index.php</a>');} $RewriteBase = dirname($_SERVER['SCRIPT_NAME']);

    define('DEBUG', true);// turn error reporting on error_reporting(E_ALL ^ E_NOTICE);ini_set('display_errors', '1');

    $file = 'sys/config.template.php';$script_name = Script';// check if sample exists if (!file_exists($file)){ exit('Sorry, I need a '.$file.' file to work from. Please re-upload this file from your script installation.');} $configFile = file_get_contents($file);if ( !is_writable('sys/')) exit("Sorry, I can't write to the directory. You'll have to either change the permissions on your sys directory or create your config.php manually.");

    // Check if config.php has been createdif (file_exists('sys/config.php')) exit("The file 'config.php' already exists. If you need to reset any of the configuration items in this file, please delete it first.");

    // write information to database /*Table structure for table `g2_category` */ $sql[] = "DROP TABLE IF EXISTS `g2_category`";

    $sql[] = "CREATE TABLE `g2_category` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(100) DEFAULT NULL, `added_at` int(11) DEFAULT NULL, `added_by` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC";

    /*Data for the table `g2_category` */ $sql[] = "insert into `g2_category`(`id`,`name`,`added_at`,`added_by`) values (1,'Nature',1257683601,0),(2,'Love',1258824533,0),(3,'Animals',1258824540,0),(4,'Cars',1258824546,0)";

    /*Table structure for table `g2_comment` */ $sql[] = "DROP TABLE IF EXISTS `g2_comment`";

    $sql[] = "CREATE TABLE `g2_comment` ( `cm_id` int(11) NOT NULL AUTO_INCREMENT, `cm_wid` int(11) DEFAULT NULL, `cm_name` varchar(50) DEFAULT NULL, `cm_website` varchar(250) DEFAULT NULL, `cm_body` text, `cm_active` tinyint(1) NOT NULL DEFAULT '0', `cm_ip` varchar(20) DEFAULT NULL, `cm_added_at` int(11) DEFAULT NULL, `cm_added_by` int(11) DEFAULT NULL, PRIMARY KEY (`cm_id`), KEY `cm_wid` (`cm_wid`,`cm_id`), KEY `cm_active` (`cm_active`,`cm_wid`,`cm_id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC";

    /*Data for the table `g2_comment` */ $sql[] = "insert into `g2_comment`(`cm_id`,`cm_wid`,`cm_name`,`cm_website`,`cm_body`,`cm_active`,`cm_ip`,`cm_added_at`,`cm_added_by`) values (2,2,'test','http://test.com','test site',1,'127.0.0.1',1257686073,NULL)";

    /*Table structure for table `g2_config` */ $sql[] = "DROP TABLE IF EXISTS `g2_config`";

    $sql[] = "CREATE TABLE `g2_config` ( `name` varchar(250) NOT NULL, `val` text, `is_editable` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:not editable,1:editable,2:editable can delete', PRIMARY KEY (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC";

    /*Data for the table `g2_config` */ $sql[] = "insert into `g2_config`(`name`,`val`,`is_editable`) values ('con_last_date_reset','2009-11-19',0), ('site_version','1.1',0), ('site_description','Free desktop wallpapers',1), ('site_title','Wallpapers',1), ('template','base',1)";

    /*Table structure for table `g2_tag` */ $sql[] = "DROP TABLE IF EXISTS `g2_tag`";

    $sql[] = "CREATE TABLE `g2_tag` ( `t_id` int(11) NOT NULL AUTO_INCREMENT, `t_name` varchar(250) DEFAULT NULL, `t_banned` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`t_id`), UNIQUE KEY `t_name` (`t_name`), KEY `t_banned` (`t_banned`,`t_id`) ) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC"; /*Data for the table `g2_tag` */ $sql[] = "insert into `g2_tag`(`t_id`,`t_name`,`t_banned`) values (1,'tree',0),(2,'grass',0),(3,'sun',0),(4,'autumn',0),(9,'nature',0),(10,'color',0),(11,'abstract',0),(12,'blue',0),(13,'lights',0),(15,'bugatti',0),(16,'car',0),(17,'veyron',0),(18,'love',0),(19,'kiss',0),(20,'shadow',0),(22,'tiger',0),(23,'white',0),(24,'water',0),(25,'swimming',0),(26,'animals',0),(27,'cars',0)";

    /*Table structure for table `g2_tag_relation` */ $sql[] = "DROP TABLE IF EXISTS `g2_tag_relation`";

    $sql[] = "CREATE TABLE `g2_tag_relation` ( `r_wid` int(11) NOT NULL DEFAULT '0', `r_tid` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`r_wid`,`r_tid`), KEY `r_tid_wid` (`r_tid`,`r_wid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC";

    /*Data for the table `g2_tag_relation` */ $sql[] = "insert into `g2_tag_relation`(`r_wid`,`r_tid`) values 2,1),(2,2),(2,3),(2,4),(2,9),(3,10),(3,11),(4,11),(4,12),(4,13),(5,15),(5,17),(5,27),(6,1),(6,18),(6,19),(6,20),(7,22),(7,23),(7,24),(7,25),(7,26)";

    /*Table structure for table `g2_user` */ $sql[] = "DROP TABLE IF EXISTS `g2_user`";

    $sql[] = "CREATE TABLE `g2_user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(100) NOT NULL, `email` varchar(100) NOT NULL, `password` varchar(50) NOT NULL, `level` tinyint(2) NOT NULL DEFAULT '0' COMMENT '0:pending;1:admin;2:moderator;3:user;',

    `ip` varchar(32) NOT NULL, `activation` varchar(15) NOT NULL DEFAULT '0' COMMENT 'activation number to verify email address', `logged_at` int(11) NOT NULL COMMENT 'last login time', `added_at` int(11) NOT NULL COMMENT 'registration time', `added_by` int(11) NOT NULL, `web` varchar(100) NOT NULL COMMENT 'user website address', PRIMARY KEY (`id`), KEY `email` (`email`), KEY `level` (`level`), KEY `activation` (`activation`), KEY `added_at` (`added_at`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC";

    /*Data for the table `g2_user` */ //$sql[] = "insert into `g2_user`(`id`,`username`,`email`,`password`,`level`,`ip`,`activation`,`logged_at`,`added_at`,`added_by`,`web`) values (1,'vepa','vepa_hal@hotmail.com','5456a19d6c110eaa6f65778cf4a98478',1,'127.0.0.1','0',1258822370,1258564165,8,'')";

    /*Table structure for table `g2_vote` */ $sql[] = "DROP TABLE IF EXISTS `g2_vote`";

    $sql[] = "CREATE TABLE `g2_vote` ( `v_wid` int(11) NOT NULL DEFAULT '0', `v_ip` varchar(32) NOT NULL DEFAULT '', `v_vote` tinyint(4) DEFAULT NULL COMMENT '0:-1;1:+1',

    `v_time` int(11) DEFAULT NULL COMMENT 'timestamp of vote', PRIMARY KEY (`v_wid`,`v_ip`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC";

    /*Data for the table `g2_vote` */ $sql[] = "insert into `g2_vote`(`v_wid`,`v_ip`,`v_vote`,`v_time`) values (2,'127.0.0.1',1,1257939416)";

    /*Table structure for table `g2_wallpaper` */ $sql[] = "DROP TABLE IF EXISTS `g2_wallpaper`";

    $sql[] = "CREATE TABLE `g2_wallpaper` ( `id` int(11) NOT NULL AUTO_INCREMENT, `img` varchar(250) DEFAULT NULL COMMENT 'image and thumb same name', `name` varchar(250) DEFAULT NULL, `artist` varchar(250) DEFAULT NULL COMMENT 'artist name', `site` varchar(250) DEFAULT NULL COMMENT 'artists site', `description` varchar(250) DEFAULT NULL, `tags` varchar(250) DEFAULT NULL COMMENT 'comma seprated tags for easy reading', `size` varchar(20) DEFAULT NULL COMMENT '1024x800 size', `dwn` int(11) NOT NULL DEFAULT '0', `rank` int(11) NOT NULL DEFAULT '0', `public` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:pending;1:public;',

    `votes` int(11) NOT NULL DEFAULT '0' COMMENT 'number of votes', `num_comments` int(11) DEFAULT '0' COMMENT 'nuber of approved comments', `num_all_comments` int(11) DEFAULT '0' COMMENT 'number of all comments, pending and approved for checking comment limit', `d1` int(11) NOT NULL, `d2` int(11) NOT NULL, `d3` int(11) NOT NULL, `d4` int(11) NOT NULL, `d5` int(11) NOT NULL, `d6` int(11) NOT NULL, `d7` int(11) NOT NULL, `week` int(11) NOT NULL, `ip` varchar(32) DEFAULT NULL, `added_at` int(11) DEFAULT NULL, `added_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `w_state` (`public`,`id`), KEY `w_dwn` (`dwn`), KEY `w_rank` (`rank`), KEY `w_week` (`week`) ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC";

    /*Data for the table `g2_wallpaper` */ $sql[] = "insert into `g2_wallpaper`(`id`,`img`,`name`,`artist`,`site`,`description`,`tags`,`size`,`dwn`,`rank`,`public`,`votes`,`num_comments`,`num_all_comments`,`d1`,`d2`,`d3`,`d4`,`d5`,`d6`,`d7`,`week`,`ip`,`added_at`,`added_by`) values (2,'7/Autumn_Leaves.jpg','Autumn','','','','tree,grass,sun,autumn,nature','1024x768',3,1,1,1,1,1,0,0,0,1,1,0,1,0,'127.0.0.1',1257684842,8),(3,'3/abstract.jpg','Color blast','','','','color,abstract','1600x1200',0,0,1,0,0,0,0,0,0,0,0,0,0,0,'127.0.0.1',1258824380,10),(4,'35/Blue_Light_1680_x_10.jpg','Blue ligths','','','','blue,lights,abstract','1600x1000',0,0,1,0,0,0,0,0,0,0,0,0,0,0,'127.0.0.1',1258824413,10),(5,'1/bugatti-veyron.jpg','Bugatti veyron','','','','bugatti,cars,veyron','1024x768',0,0,1,0,0,0,0,0,0,0,0,0,0,0,'127.0.0.1',1258824438,10),(6,'41/love_kiss.jpg','Love kiss','','','','love,kiss,tree,shadow','1920x1080',0,0,1,0,0,0,0,0,0,0,0,0,0,0,'127.0.0.1',1258824473,10),(7,'30/white-tiger-swimming.jpg','White tiger swimming','','','','tiger,white,water,swimming,animals','2048x1536',0,0,1,0,0,0,0,0,0,0,0,0,0,0,'127.0.0.1',1258824514,10)";foreach($sql as $s) {if($setup) {$s = str_replace('g2_',$prefix,$s);

    if(!Record:query($s)) {$error = 'Error adding initial database records.';

    $setup = false;if($setup) { if(!defined('TABLE_PREFIX')) { define('TABLE_PREFIX',$prefix);

    } list($username,) = explode('@',$email);

    $sql = "INSERT INTO ".$prefix."user (`username`,`email`,`password`,`level`,`ip`,`activation`,`added_at`) VALUES (?, ?, ?,'1','127.0.0.1','0','0')";

    if(!Record:query($sql,array($username,$email,md5($password)))) { $error = 'Error creating admin for the site.';

    $setup = false;

    if($setup){ // create config file $find = array( '{DB_NAME}', '{DB_HOST}', '{DB_USER}', '{DB_PASS}', '{TABLE_PREFIX}', '{USE_MOD_REWRITE}', '{USE_PDO}');

    $replace = array($dbname, $dbhost, $uname, $passwrd, $prefix, true, true); $configFile = str_replace($find,$replace,$configFile);

    if(!file_put_contents('sys/config.php',$configFile)) {exit('Error writing config file.'); } chmod('sys/config.php', 0666);

    // write htaccess file $RewriteBase = dirname($_SERVER['SCRIPT_NAME']).'/';

    $htaccess = '#Options +FollowSymLinks AddDefaultCharset UTF-8<IfModule mod_rewrite.c> RewriteEngine On RewriteBase '.$RewriteBase.' RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l # Main URL rewriting. RewriteRule ^(.*)$ index.php?$1 [L,QSA] </IfModule>'; if(!file_put_contents('.htaccess',$htaccess)) {echo 'Error writing.htaccess file.'; echo 'Please create.htaccess file manually with following content:'; echo '<textarea rows="10" cols="40">'.$htaccess.'</textarea>'; } $msg = '<p>Congratulations you installed '.$script_name.'. <a href="'.get_url().'">View your website</a>.</p>'; exit($msg);

    <php /** * Framework: Extra Light PHP Framework * http://www.madebyfrog.com/framework/ * Copyright (c) 2007, Philippe Archambault * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:

    * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software.

    * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE.

    * @author Philippe Archambault <philippe.archambault@gmail.com> * @copyright 2007 Philippe Archambault * @package Framework * @version 1.6

    * @license http://www.opensource.org/licenses/mit-license.html MIT License * UPDATES:

    * Vepa Halliyev (www.veppa.com) - 04.05.2008

    * - removed validation. use as static class (13 sept 2008) * - Added validation function to view and controller. Requires valitation class in helper folder.

    * - Inflator:slugify to create google friendly permalinks */ define('FRAMEWORK_STARTING_MICROTIME', get_microtime());

    // all constants that you can define before to costumize your framework if (!defined('DEBUG')) define('DEBUG', false);

    if (!defined('CORE_ROOT')) define('CORE_ROOT', dirname(__FILE__));

    if (!defined('APP_PATH')) define('APP_PATH', CORE_ROOT.DIRECTORY_SEPARATOR.'app');

    if (!defined('HELPER_PATH')) define('HELPER_PATH', CORE_ROOT.DIRECTORY_SEPARATOR.'helpers');

    if (!defined('DOMAIN')) define('DOMAIN', dirname($_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME']));

    if (!defined('BASE_URL')) define('BASE_URL', 'http://'. DOMAIN.'/?/');

    if (!defined('DEFAULT_CONTROLLER')) define('DEFAULT_CONTROLLER', 'index');

    if (!defined('DEFAULT_ACTION')) define('DEFAULT_ACTION', 'index');

    // setting error display depending on debug mode or not error_reporting((DEBUG ? E_ALL ^ E_NOTICE: 0));

    // no more quotes escaped with a backslash if (PHP_VERSION < 6) set_magic_quotes_runtime(0);

    // start session if ( ! isset($_SESSION)) session_start();

    ini_set('date.timezone', DEFAULT_TIMEZONE);

    if(function_exists('date_default_timezone_set')) date_default_timezone_set(DEFAULT_TIMEZONE);

    else putenv('TZ='.DEFAULT_TIMEZONE);

    /**

    * The Dispatcher main Core class is responsible for mapping urls / * routes to Controller methods. Each route that has the same number of directory * components as the current requested url is tried, and the first method that * returns a response with a non false / non null value will be returned via the * Dispatcher:dispatch() method. For example:

    * A route string can be a literal url such as '/pages/about' or contain * wildcards (:any or:num) and/or regex like '/blog/:num' or '/page/:any'.

    * Dispatcher:addRoute(array( * '/' => 'page/index', * '/about' => 'page/about, * '/blog/:num' => 'blog/post/$1', * '/blog/:num/comment/:num/delete' => 'blog/deleteComment/$1/$2' * ));

    * Visiting /about/ would call PageController:about(), * visiting /blog/5 would call BlogController:post(5) * visiting /blog/5/comment/42/delete would call BlogController:deleteComment(5,42) * The dispatcher is used by calling Dispatcher:addRoute() to setup the route(s), * and Dispatcher:dispatch() to handle the current request and get a response.

    */

    final class Dispatcher { private static $routes = array();

    private static $params = array();

    private static $status = array();

    private static $requested_url = null;

    public static function addRoute($route, $destination=null) if ($destination != null && !is_array($route)) { $route = array($route => $destination);

    self:$routes = array_merge(self:$routes, $route);

    public static function splitUrl($url) return preg_split('/\//', $url, -1, PREG_SPLIT_NO_EMPTY);

    public static function dispatch($requested_url=null) Flash:init();

    $requested_url = self:setCurrentUrl($requested_url);

    // this is only trace for debuging self:$status['requested_url'] = $requested_url;

    // make the first split of the current requested_url self:$params = self:splitUrl($requested_url);

    // do we even have any custom routing to deal with?

    if (count(self:$routes) === 0) { return self:executeAction(self:getController(), self:getAction(), self:getParams());

    // is there a literal match? If so we're done if (isset(self:$routes[$requested_url])) { self:$params = self:splitUrl(self:$routes[$requested_url]);

    return self:executeAction(self:getController(), self:getAction(), self:getParams());

    // loop through the route array looking for wildcards foreach (self:$routes as $route => $uri) { // convert wildcards to regex if (strpos($route, ':') !== false) { $route = str_replace(':any', '(.+)', str_replace(':num', '([0-9]+)', $route));

    // does the regex match?

    if (preg_match('#^'.$route.'$#', $requested_url)) { // do we have a back-reference?

    if (strpos($uri, '$') !== false && strpos($route, '(') !== false) { $uri = preg_replace('#^'.$route.'$#', $uri, $requested_url);

    self:$params = self:splitUrl($uri);

    // we fund it, so we can break the loop now!

    break;

    return self:executeAction(self:getController(), self:getAction(), self:getParams());

    } // dispatch public static function getCurrentUrl() if(self:$requested_url === null) return self:setCurrentUrl();

    else return self:$requested_url;

    // set cyurrent url here if we need to use current url before dispatch for language // and predispatch actions public static function setCurrentUrl($requested_url=null) // if no url passed, we will get the first key from the _GET array // that way, index.php?/controller/action/var1&email=example@example.com // requested_url will be equal to: /controller/action/var1 if ($requested_url === null) { if(self:$requested_url !== null) return self:$requested_url;

    //$requested_url = count($_GET) >= 1 ? key($_GET): '/';

    $pos = strpos($_SERVER['QUERY_STRING'], '&');

    if ($pos !== false) { $requested_url = substr($_SERVER['QUERY_STRING'], 0, $pos);

    } else { $requested_url = $_SERVER['QUERY_STRING'];

    // requested url MUST start with a slash (for route convention) $requested_url = '/'.trim($requested_url,'/').'/';

    /*if (strpos($requested_url, '/') !== 0) { $requested_url = '/'. $requested_url;

    }*/ if(strpos($requested_url,'.')!==false) $requested_url = rtrim($requested_url,'/');

    self:$requested_url = $requested_url;

    return self:$requested_url;

    public static function getController() return isset(self:$params[0]) ? self:$params[0]: DEFAULT_CONTROLLER;

    public static function getAction() return isset(self:$params[1]) ? self:$params[1]: DEFAULT_ACTION;

    public static function getParams() return array_slice(self:$params, 2);

    public static function getStatus($key=null) return ($key === null) ? self:$status: (isset(self:$status[$key]) ? self:$status[$key]: null);

    public static function executeAction($controller, $action, $params) //echo "executeAction($controller, $action, $params)";

    self:$status['controller'] = $controller;

    self:$status['action'] = $action;

    self:$status['params'] = implode(', ', $params);

    $controller_class = Inflector:camelize($controller);

    $controller_class_name = $controller_class. 'Controller';

    // get a instance of that controller if (class_exists($controller_class_name)) { $controller = new $controller_class_name();

    } else { //page_not_found();

    if ( ! $controller instanceof Controller) { throw new Exception("Class '{$controller_class_name}' does not extends Controller class!");

    // execute the action $controller->execute($action, $params);

    // return test.xx.com public static function getServer() return strtolower($_SERVER['SERVER_NAME']);

    // return /yazi/test.html public static function getScript($is_file = true) //return strtolower($_SERVER['SCRIPT_NAME']);

    //$return = implode('/',array_slice(self:$params, 1));

    $return = implode('/',self:getParams());

    if(strpos($return,'.')===false) if($is_file) $return.= '/index.html';

    else $return.= '/';

    return $return;

    } // end Dispatcher class /** * Used for database table objects. read, sate, update, delete.

    * @author Vepa Halliyev - veppa.com (updates) * @version 1.0

    * Updates:

    * 02052008 Added $col static variable to add security to table columns and prevent unsuspected errors.

    * 02062008 Updated class to use simple point for queries. Use query to connenct just before query done.

    * Added functionality to handle multiple connections. master-slave. slaves have to specify explicitly */ class Record { const PARAM_BOOL = 5;

    const PARAM_NULL = 0;

    const PARAM_INT = 1;

    const PARAM_STR = 2;

    const PARAM_LOB = 3;

    const PARAM_STMT = 4;

    const PARAM_INPUT_OUTPUT = -2147483648;

    const PARAM_EVT_ALLOC = 0;

    const PARAM_EVT_FREE = 1;

    const PARAM_EVT_EXEC_PRE = 2;

    const PARAM_EVT_EXEC_POST = 3;

    const PARAM_EVT_FETCH_PRE = 4;

    const PARAM_EVT_FETCH_POST = 5;

    const PARAM_EVT_NORMALIZE = 6;

    const FETCH_LAZY = 1;

    const FETCH_ASSOC = 2;

    const FETCH_NUM = 3;

    const FETCH_BOTH = 4;

    const FETCH_OBJ = 5;

    const FETCH_BOUND = 6;

    const FETCH_COLUMN = 7;

    const FETCH_CLASS = 8;

    const FETCH_INTO = 9;

    const FETCH_FUNC = 10;

    const FETCH_GROUP = 65536;

    const FETCH_UNIQUE = 196608;

    const FETCH_CLASSTYPE = 262144;

    const FETCH_SERIALIZE = 524288;

    const FETCH_PROPS_LATE = 1048576;

    const FETCH_NAMED = 11;

    const ATTR_AUTOCOMMIT = 0;

    const ATTR_PREFETCH = 1;

    const ATTR_TIMEOUT = 2;

    const ATTR_ERRMODE = 3;

    const ATTR_SERVER_VERSION = 4;

    const ATTR_CLIENT_VERSION = 5;

    const ATTR_SERVER_INFO = 6;

    const ATTR_CONNECTION_STATUS = 7;

    const ATTR_CASE = 8;

    const ATTR_CURSOR_NAME = 9;

    const ATTR_CURSOR = 10;

    const ATTR_ORACLE_NULLS = 11;

    const ATTR_PERSISTENT = 12;

    const ATTR_STATEMENT_CLASS = 13;

    const ATTR_FETCH_TABLE_NAMES = 14;

    const ATTR_FETCH_CATALOG_NAMES = 15;

    const ATTR_DRIVER_NAME = 16;

    const ATTR_STRINGIFY_FETCHES = 17;

    const ATTR_MAX_COLUMN_LEN = 18;

    const ATTR_EMULATE_PREPARES = 20;

    const ATTR_DEFAULT_FETCH_MODE = 19;

    const ERRMODE_SILENT = 0;

    const ERRMODE_WARNING = 1;

    const ERRMODE_EXCEPTION = 2;

    const CASE_NATURAL = 0;

    const CASE_LOWER = 2;

    const CASE_UPPER = 1;

    const NULL_NATURAL = 0;

    const NULL_EMPTY_STRING = 1;

    const NULL_TO_STRING = 2;

    const ERR_NONE = '00000';

    const FETCH_ORI_NEXT = 0;

    const FETCH_ORI_PRIOR = 1;

    const FETCH_ORI_FIRST = 2;

    const FETCH_ORI_LAST = 3;

    const FETCH_ORI_ABS = 4;

    const FETCH_ORI_REL = 5;

    const CURSOR_FWDONLY = 0;

    const CURSOR_SCROLL = 1;

    const MYSQL_ATTR_USE_BUFFERED_QUERY = 1000;

    const MYSQL_ATTR_LOCAL_INFILE = 1001;

    const MYSQL_ATTR_INIT_COMMAND = 1002;

    const MYSQL_ATTR_READ_DEFAULT_FILE = 1003;

    const MYSQL_ATTR_READ_DEFAULT_GROUP = 1004;

    const MYSQL_ATTR_MAX_BUFFER_SIZE = 1005;

    const MYSQL_ATTR_DIRECT_QUERY = 1006;

    public static $__CONNS__ = false;

    public static $__CONNS_IMPLODE__ = false;

    public static $__QUERIES__ = array();

    public static $__QUERY_COUNT__ = 0;

    public static $__CONNECTIONS__ = array();

    private $cols = array();// column names for secure data inserts public $locale_db;// database connection for different languages. tr,en.

    /*final public static function connection($connection) self:getConnection($con_type) = $connection;

    }*/ /** * Gets database connection to execute queries. Always use this function to get db object * @param string $type database connection type. default is master, can choose if has several connections * @return PDO DB connection object */ final public static function getConnection($con_type) if(!self:$__CONNS__[$con_type]) // chek if connection has several alternatives. connect to one if(isset(self:$__CONNECTIONS__[$con_type][0])) // choose random connection $con_id = rand(0,count(self:$__CONNECTIONS__[$con_type]));

    $con = self:$__CONNECTIONS__[$con_type][$con_id];

    else $con = self:$__CONNECTIONS__[$con_type];

    if(!$con) // if it is read then check normal connection if(strpos($con_type,'READ_') === 0) return self:getConnection(substr($con_type,5));

    throw new Exception("Connection type '{$con_type}' not found!");

    // check if same connection is already connected //echo $con_type;

    $key = implode(',',$con);

    if(!self:$__CONNS_IMPLODE__[$key]) // connect to db extract($con);

    try { // if no connection estabilish one if (USE_PDO) //PDO:setAttribute(self:ATTR_TIMEOUT,2);

    //echo '['.PDO:getAttribute(self:ATTR_TIMEOUT).']';

    $__FROG_CONN__ = new PDO($DB_DSN, $DB_USER, $DB_PASS);

    $__FROG_CONN__->setAttribute(PDO:MYSQL_ATTR_USE_BUFFERED_QUERY, true);

    else require_once CORE_ROOT. '/libraries/DoLite.php';

    $__FROG_CONN__ = new DoLite($DB_DSN, $DB_USER, $DB_PASS);

    } catch (Exception $e) { header_503();

    //echo 'Ops. something went wrong with our servers. Please let us know if we havent fixed it in one hour. ';

    //echo (is_dev()?$e->getMessage():'DB connection error');

    echo 'DB connection error';

    exit;

    self:$__CONNS_IMPLODE__[$key] = $__FROG_CONN__;

    self:$__CONNS_IMPLODE__[$key]->exec("set names 'utf8'");

    if(DEBUG) $__FROG_CONN__->setAttribute( PDO:ATTR_ERRMODE, PDO:ERRMODE_EXCEPTION );

    self:$__CONNS__[$con_type] = self:$__CONNS_IMPLODE__[$key];

    if(!self:$__CONNS__[$con_type]) throw new Exception('Invalid db connection');

    return self:$__CONNS__[$con_type];

    final public static function logQuery($sql,$con_type='master') self:$__QUERIES__[$con_type][] = $sql;

    self:$__QUERY_COUNT__++;

    final public static function getQueryLog() return self:$__QUERIES__;

    final public static function getQueryCount() return self:$__QUERY_COUNT__;

    final public static function query($sql, $values=false,$con_type = 'master') self:logQuery($sql,$con_type);

    Benchmark:cp();

    $sql_lower = strtolower($sql);

    $is_update = ( strpos($sql_lower,'insert')===0 || strpos($sql_lower,'delete')===0 );

    if (is_array($values)) { $stmt = self:getConnection($con_type)->prepare($sql);

    $stmt->execute($values);

    Benchmark:cp($sql.':'.$con_type.':'.implode(',',$values));

    if($is_update) $r = true;

    else $r = @$stmt->fetchAll(self:FETCH_OBJ);

    } else { $r = self:getConnection($con_type)->exec($sql) !== false;

    Benchmark:cp($sql.':'.$con_type);

    return $r;

    public static function queryOne($sql,$values=false,$con_type='master') self:logQuery($sql,$con_type);

    Benchmark:cp();

    if (is_array($values)) { $stmt = self:getConnection($con_type)->prepare($sql.' LIMIT 0,1');

    $stmt->execute($values);

    Benchmark:cp($sql.':'.$con_type.':'.implode(',',$values));

    $r = $stmt->fetchAll(self:FETCH_OBJ);

    $r = $r[0];

    } else { $r = self:getConnection($con_type)->exec($sql) !== false;

    Benchmark:cp($sql.':'.$con_type);

    return $r;

    final public static function write($sql,$values=false,$con_type='master') return self:query($sql,$values,$con_type);

    final public static function read($sql,$values=false,$con_type='master') return self:query($sql,$values,'READ_'.$con_type);

    final public static function queryArraySingle($sql, $values=false,$con_type = 'master',$field='id') // always read $r = array();

    $result = self:read($sql,$values,$con_type);

    if($result) foreach($result as $record) $r[] = $record->{$field};

    return $r;

    final public static function fetchColumn($sql, $values=array(),$con_type = 'master') Benchmark:cp();

    // aslways read $con_type = 'READ_'.$con_type;

    self:logQuery($sql,$con_type);

    $stmt = self:getConnection($con_type)->prepare($sql);

    $stmt->execute($values);

    Benchmark:cp($sql.':'.$con_type.':'.implode(',',$values));

    return $stmt->fetchColumn();

    final public static function tableNameFromClassName($class_name) try if (class_exists($class_name) && defined($class_name.':TABLE_NAME')) return TABLE_PREFIX.constant($class_name.':TABLE_NAME');

    catch (Exception $e) return TABLE_PREFIX.Inflector:underscore($class_name);

    final public static function classNameFromClassName($class_name) try if (class_exists($class_name)) return $class_name;

    catch (Exception $e) return 'stdClass';

    final public static function escape($value,$con_type = 'master') return self:getConnection($con_type)->quote($value);

    final public static function lastInsertId($con_type = 'master') return self:getConnection($con_type)->lastInsertId();

    public function __construct($data = false, $locale_db = null) $this->locale_db = $locale_db;

    if (is_array($data)) { $this->setFromData($data);

    public function setFromData($data) foreach($data as $key => $value) { $this->$key = $value;

    /**

    * Generates a insert or update string from the supplied data and execute it * @return boolean */ public function save($key='id',$con_type='master') Benchmark:cp();

    if ( ! $this->beforeSave()) return false;

    $value_of = array();

    if (empty($this->{$key})) { // unset index value unset($this->{$key});

    if ( ! $this->beforeInsert()) return false;

    $columns = $this->getColumns();

    // escape and format for SQL insert query foreach ($columns as $column) { if ($this->isColumn($column)) { $value_of[$column] = self:getConnection($con_type)->quote($this->$column);

    $sql = 'INSERT INTO '.self:tableNameFromClassName(get_class($this)).' ('

    implode(', ', array_keys($value_of)).') VALUES ('.implode(', ', array_values($value_of)).')';

    //Flash:set('error', $sql);

    $return = self:getConnection($con_type)->exec($sql) !== false;

    $this->{$key} = self:lastInsertId($con_type);

    if ( ! $this->afterInsert()) return false;

    } else { if ( ! $this->beforeUpdate()) return false;

    $columns = $this->getColumns();

    // escape and format for SQL update query foreach ($columns as $column) { if ($this->isColumn($column)) { $value_of[$column] = $column.'='.self:getConnection($con_type)->quote($this->$column);

    unset($value_of[$key]);

    $sql = 'UPDATE '.self:tableNameFromClassName(get_class($this)).' SET ' . implode(', ', $value_of).' WHERE '.$key.' = '.self:getConnection($con_type)->quote($this->{$key});

    //Flash:set('error', $sql);

    $return = self:getConnection($con_type)->exec($sql) !== false;

    if ( ! $this->afterUpdate()) return false;

    self:logQuery($sql,$con_type);

    Benchmark:cp($sql.':'.$con_type);

    // Run it !.

    return $return;

    private function isColumn($key) // check if it is defined as column if(isset(self:$cols)) return (isset($this->$key) && self:$cols[$key]);

    else return isset($this->$key);

    /**

    * Generates a delete string and execute it * @param string $table the table name * @param string $where the query condition * @return boolean */ public function delete($key='id',$con_type='master') Benchmark:cp();

    if ( ! $this->beforeDelete()) return false;

    $sql = 'DELETE FROM '.self:tableNameFromClassName(get_class($this)) . ' WHERE '.$key.'='.self:getConnection($con_type)->quote($this->{$key});

    // Run it !.

    $return = self:getConnection($con_type)->exec($sql) !== false;

    if ($return && !$this->afterDelete()) { $this->save($key,$con_type);

    return false;

    self:logQuery($sql,$con_type);

    Benchmark:cp($sql.':'.$con_type);

    return $return;

    public function beforeSave() { return true; } public function beforeInsert() { return true; } public function beforeUpdate() { return true; } public function beforeDelete() { return true; } public function afterSave() { return true; } public function afterInsert() { return true; } public function afterUpdate() { return true; } public function afterDelete() { return true; } /** * return a array of all columns in the table * it is a good idea to rewrite this method in all your model classes * used in save() for creating the insert and/or update sql query */ public function getColumns() if(isset($this->cols)) $cols = $this->cols;

    else $cols = get_object_vars($this);

    return array_keys($cols);

    public static function filterCols($data,$fields) if(!is_array($fields)) $fields = explode(',',$fields);

    foreach($fields as $field) if(isset($data[$field])) $return[$field] = $data[$field];

    return $return;

    public function setColumns($cols) $this->cols = $cols;

    public static function insert($class_name, $data,$con_type='master') Benchmark:cp();

    $keys = array();

    $values = array();

    foreach ($data as $key => $value) { $keys[] = $key;

    $values[] = self:getConnection($con_type)->quote($value);

    $sql = 'INSERT INTO '.self:tableNameFromClassName($class_name).' ('.join(', ', $keys).') VALUES ('.join(', ', $values).')';

    self:logQuery($sql,$con_type);

    // Run it !.

    $return = self:getConnection($con_type)->exec($sql) !== false;

    Benchmark:cp($sql.':'.$con_type.':'.implode(',',$values));

    return $return;

    public static function update($class_name, $data, $where, $values=array(),$con_type='master') Benchmark:cp();

    $setters = array();

    // prepare request by binding keys foreach ($data as $key => $value) { $setters[] = $key.'='.self:getConnection($con_type)->quote($value);

    $sql = 'UPDATE '.self:tableNameFromClassName($class_name).' SET '.join(', ', $setters).' WHERE '.$where;

    self:logQuery($sql,$con_type);

    $stmt = self:getConnection($con_type)->prepare($sql);

    $return = $stmt->execute($values);

    Benchmark:cp($sql.':'.$con_type.':'.implode(',',$values));

    return $return;

    /**

    * Update number by increasing or decreasing by number * @param $class_name * @param $data array('x'=>-1,'y'=>+3,.)

    * @param $where * @param $values * @param $con_type * @return unknown_type */ public static function increaseWhere($class_name, $data, $where, $values=array(),$con_type='master') Benchmark:cp();

    $setters = array();

    // prepare request by binding keys foreach ($data as $key => $value) { $setters[] = $key.'='.$key.' '.$value;

    $sql = 'UPDATE '.self:tableNameFromClassName($class_name).' SET '.join(', ', $setters).' WHERE '.$where;

    self:logQuery($sql,$con_type);

    $stmt = self:getConnection($con_type)->prepare($sql);

    $return = $stmt->execute($values);

    Benchmark:cp($sql.':'.$con_type.':'.implode(',',$values));

    return $return;

    public static function deleteWhere($class_name, $where, $values=array(),$con_type='master') Benchmark:cp();

    $sql = 'DELETE FROM '.self:tableNameFromClassName($class_name).' WHERE '.$where;

    self:logQuery($sql,$con_type);

    $stmt = self:getConnection($con_type)->prepare($sql);

    $return = $stmt->execute($values);

    Benchmark:cp($sql.':'.$con_type.':'.implode(',',$values));

    return $return;

    //

    // note: lazy finder or getter methode. Pratical when you need something really // simple no join or anything will only generate simple select * from table.

    //

    public static function findByIdFrom($class_name, $id,$key='id',$con_type='master') return self:findOneFrom($class_name, $key.'=?', array($id),$con_type);

    public static function findOneFrom($class_name, $where, $values=array(),$con_type='master',$fields='*') Benchmark:cp();

    // always read $con_type = 'READ_'.$con_type;

    $sql = 'SELECT '.$fields.' FROM '.self:tableNameFromClassName($class_name).' WHERE '.$where.' LIMIT 0,1';

    $stmt = self:getConnection($con_type)->prepare($sql);

    $stmt->execute($values);

    self:logQuery($sql,$con_type);

    Benchmark:cp($sql.':'.$con_type.':'.implode(',',$values));

    return $stmt->fetchObject(self:classNameFromClassName($class_name));

    public static function findAllFrom($class_name, $where=false, $values=array(),$con_type='master',$fields='*') Benchmark:cp();

    // always read $con_type = 'READ_'.$con_type;

    $sql = 'SELECT '.$fields.' FROM '.self:tableNameFromClassName($class_name).($where ? ' WHERE '.$where:'');

    $stmt = self:getConnection($con_type)->prepare($sql);

    $stmt->execute($values);

    self:logQuery($sql,$con_type);

    Benchmark:cp($sql.':'.$con_type.':'.implode(',',$values));

    $objects = array();

    while ($object = $stmt->fetchObject(self:classNameFromClassName($class_name))) $objects[] = $object;

    return $objects;

    public static function countFrom($class_name, $where=false, $values=array(),$con_type='master') Benchmark:cp();

    // always read $con_type = 'READ_'.$con_type;

    $sql = 'SELECT COUNT(*) AS nb_rows FROM '.self:tableNameFromClassName($class_name).($where ? ' WHERE '.$where:'');

    $stmt = self:getConnection($con_type)->prepare($sql);

    $stmt->execute($values);

    self:logQuery($sql,$con_type);

    Benchmark:cp($sql.':'.$con_type.':'.implode(',',$values));

    return (int) $stmt->fetchColumn();

    public static function quote($string,$con_type='master') return self:getConnection($con_type)->quote($string);

    /**

    * append other object by given id * * @param array $records * @param string $field get id from this field * @param string $class_name object that is added * @param string $class_field id field name for searched object * @param string $alt_name name of property that will be appended * @param string $con_type */ public static function appendObject($records,$field,$class_name,$class_field='id',$alt_name='',$con_type='master',$fields='*',$clean=false) if(!is_array($records)) $records = array($records);

    // get ids from records $ids = array();

    foreach($records as $r) $ids[] = $r->{$field};

    $ids = array_unique($ids);

    if(!$ids) return false;

    // add quoted values foreach($ids as $id) $ids_[] = self:quote($id,$con_type);

    $objects = self:findAllFrom($class_name,$class_field.' IN ('.implode(',',$ids_).')',array(),$con_type,$fields);

    if(!$objects) return false;

    foreach($objects as $o) if($clean) $o = self:cleanObject($o);

    $objects_arr[$o->{$class_field}] = $o;

    if(!$alt_name) $alt_name = $class_name;

    // assign retrieved objects foreach($records as $r) $r->{$alt_name} = $objects_arr[$r->{$field}];

    public static function cleanObject($obj) if(is_array($obj)) foreach($obj as $k=>$o) unset($o->cols);

    $new_obj[$k] = (object)get_object_vars($o);

    } else unset($obj->cols);

    $new_obj = (object)get_object_vars($obj);

    } return $new_obj;

    } /** * The template object takes a valid path to a template file as the only argument * in the constructor. You can then assign properties to the template, which * become available as local variables in the template file. You can then call * display() to get the output of the template, or just call print on the template * directly thanks to PHP 5's __toString magic method.

    * echo new View('my_template',array( * 'title' => 'My Title', * 'body' => 'My body content' * ));

    * my_template.php might look like this:

    * <html> * <head> * <title><?php echo $title;?></title> * </head> * <body> * <h1><?php echo $title;?></h1> * <p><?php echo $body;?></p> * </body> * </html> * Using view helpers:

    * use_helper('HelperName', 'OtherHelperName');

    */

    class View { private $file; // String of template file private $vars = array(); // Array of template variables static private $snippets = array(); // Array of snippet filenames /** * Assign the template path * @param string $file Template path (absolute path or path relative to the templates dir) * @return void */ public function __construct($file, $vars=false) $this->file = APP_PATH.'/views/'.ltrim($file, '/').'.php';

    // check if view is in spec. language if(isset($vars['VIEW_LNG'])) // check for language spc. view $file = APP_PATH.'/views/'.ltrim($file, '/').'-'.$vars['VIEW_LNG'].'.php';

    if ( file_exists($file)) { $this->file = $file;

    // check if there template page for this view $template = Config:option('template');

    if($template) // check for language spc. view $file = CORE_ROOT.'/./user-content/templates/'.$template.'/views/'.ltrim($file, '/').'.php';

    if ( file_exists($file)) { $this->file = $file;

    if ( ! file_exists($this->file)) { throw new Exception("View '{$this->file}' not found!");

    if ($vars !== false) { $this->vars = $vars;

    /**

    * Assign specific variable to the template * @param mixed $name Variable name * @param mixed $value Variable value * @return void */ public function assign($name, $value=null) if (is_array($name)) { array_merge($this->vars, $name);

    } else { $this->vars[$name] = $value;

    } // assign /** * Display template and return output as string * @return string content of compiled view template */ public function render() ob_start();

    extract($this->vars, EXTR_SKIP);

    include $this->file;

    $content = ob_get_clean();

    return $content;

    /**

    * Render given file as snippet. Used to render same code several times in a loop in different files * @param string $file name * @param array $vars of variables tu be used in snippet * @return string content of compiled view template */ static public function renderAsSnippet($file,$vars=false) $_file = APP_PATH.'/views/'.ltrim($file, '/').'.php';

    // check if snippet loaded before if(!isset(self:$snippets['file'][$file])) // check if file exists if ( ! file_exists($_file)) { throw new Exception("View '{$this->file}' not found!");

    self:$snippets['file'][$file] = file_get_contents($_file);

    ob_start();

    if($vars) extract($vars, EXTR_SKIP);

    eval('?>'.self:$snippets['file'][$file]);

    $content = ob_get_clean();

    return $content;

    /**

    * Display the rendered template */ public function display() { echo $this->render(); } /** * Render the content and return it * ex: echo new View('blog', array('title' => 'My title'));

    * @return string content of the view */ public function __toString() { return $this->render(); } public function validation() return Validation:getInstance();

    public function input() return Input:getInstance();

    static public function escape($var) $_escape = 'htmlspecialchars';

    $_encoding = 'UTF-8';

    if (in_array($_escape, array('htmlspecialchars', 'htmlentities'))) { return call_user_func($_escape, $var, ENT_COMPAT, $_encoding);

    return call_user_func($_escape, $var);

    } // end View class /** * The Controller class should be the parent class of all of your Controller sub classes * that contain the business logic of your application (render a blog post, log a user in, * delete something and redirect, etc).

    * In the Frog class you can define what urls / routes map to what Controllers and * methods. Each method can either:

    * - return a string response * - redirect to another method */ class Controller { protected $layout = false;

    protected $layout_vars = array();

    public function execute($action, $params) // it's a private method of the class or action is not a method of the class if (substr($action, 0, 1) == '_' || ! method_exists($this, $action)) { throw new Exception("Action '{$action}' is not valid!");

    call_user_func_array(array($this, $action), $params);

    public function setLayout($layout) $this->layout = $layout;

    /**

    * Set page meta content * @param $type * @param $str * @return unknown_type */ function setMeta($type='javascript',$str) $this->layout_vars['meta'];

    if(!$this->layout_vars['meta']) $this->layout_vars['meta'] = new stdClass();

    switch($type) case 'css':

    $this->layout_vars['meta']->css[$str] = '<link href="'.$str.'" rel="stylesheet" type="text/css" />';

    break;

    case 'javascript':

    $this->layout_vars['meta']->javascript[$str] = '<script type="text/javascript" src="'.$str.'"></script>';

    break;

    default:

    $this->layout_vars['meta']->{$type} = $str;

    public function assignToLayout($var, $value='') if ( is_array($var) ) { $this->layout_vars = array_merge($this->layout_vars, $var);

    } else { $this->layout_vars[$var] = $value;

    public function render($view, $vars=array()) // merge with predefined vars $this->assignToLayout($vars);

    if ($this->layout) // render view and layout $this->layout_vars['content_for_layout'] = new View($view, $this->layout_vars);

    return new View('./layouts/'.$this->layout, $this->layout_vars);

    else // render view return new View($view, $this->layout_vars);

    public function display($view, $vars=array(), $exit=true) echo $this->render($view, $vars);

    if ($exit){ exit;

    public function renderJSON($data_to_encode) if (class_exists('JSON')) { return JSON:encode($data_to_encode);

    } else if (function_exists('json_encode')) { return json_encode($data_to_encode);

    } else { throw new Exception('No function or class found to render JSON.');

    public function validation() $return = Validation:getInstance();

    $return->set_error_delimiters('<p class="msg-error-line">','</p>');

    return $return;

    public function input() return Input:getInstance();

    } // end Controller class final class Observer { static protected $events = array();

    public static function observe($event_name, $callback) if ( ! isset(self:$events[$event_name])) self:$events[$event_name] = array();

    self:$events[$event_name][$callback] = $callback;

    public static function stopObserving($event_name, $callback) if (isset(self:$events[$event_name][$callback])) unset(self:$events[$event_name][$callback]);

    public static function clearObservers($event_name) self:$events[$event_name] = array();

    public static function getObserverList($event_name) return (isset(self:$events[$event_name])) ? self:$events[$event_name]: array();

    /**

    * If your event does not need to process the return values from any observers use this instead of getObserverList() */ public static function notify($event_name) $args = array_slice(func_get_args(), 1); // removing event name from the arguments foreach(self:getObserverList($event_name) as $callback) call_user_func_array($callback, $args);

    } /** * The AutoLoader class is an object oriented hook into PHP's __autoload functionality. You can add * - Single Files AutoLoader:addFile('Blog','/path/to/Blog.php');

    * - Multiple Files AutoLoader:addFile(array('Blog'=>'/path/to/Blog.php','Post'=>'/path/to/Post.php'));

    * - Whole Folders AutoLoader:addFolder('path');

    * When adding a whole folder each file should contain one class named the same as the file without ".php" (Blog => Blog.php) */ class AutoLoader { protected static $files = array();

    protected static $folders = array();

    /**

    * AutoLoader:addFile('Blog','/path/to/Blog.php');

    * AutoLoader:addFile(array('Blog'=>'/path/to/Blog.php','Post'=>'/path/to/Post.php'));

    * @param mixed $class_name string class name, or array of class name => file path pairs.

    * @param mixed $file Full path to the file that contains $class_name.

    */

    public static function addFile($class_name, $file=null) if ($file == null && is_array($class_name)) { self:$files = array_merge(self:$files, $class_name);

    } else { self:$files[$class_name] = $file;

    /**

    * AutoLoader:addFolder('/path/to/my_classes/');

    * AutoLoader:addFolder(array('/path/to/my_classes/','/more_classes/over/here/'));

    * @param mixed $folder string, full path to a folder containing class files, or array of paths.

    */

    public static function addFolder($folder) if ( ! is_array($folder)) { $folder = array($folder);

    self:$folders = array_merge(self:$folders, $folder);

    public static function load($class_name) if (isset(self:$files[$class_name])) { if (file_exists(self:$files[$class_name])) { require self:$files[$class_name];

    return;

    } else { foreach (self:$folders as $folder) { $folder = rtrim($folder, DIRECTORY_SEPARATOR);

    $file = $folder.DIRECTORY_SEPARATOR.$class_name.'.php';

    if (file_exists($file)) { require $file;

    return;

    throw new Exception("AutoLoader did not found file for '{$class_name}'!");

    } // end AutoLoader class if ( ! function_exists('__autoload')) { AutoLoader:addFolder(array(APP_PATH.DIRECTORY_SEPARATOR.'models', APP_PATH.DIRECTORY_SEPARATOR.'controllers', HELPER_PATH));

    function __autoload($class_name) AutoLoader:load($class_name);

    } /** * Flash service * Purpose of this service is to make some data available across pages. Flash * data is available on the next page but deleted when execution reach its end.

    * Usual use of Flash is to make possible that current page pass some data * to the next one (for instance success or error message before HTTP redirect).

    * Flash:set('errors', 'Blog not found!');

    * Flass:set('success', 'Blog have been saved with success!');

    * Flash:get('success');

    * You can only set 20 cookies per domain * Flash service as a concep is taken from Rails. This thing is really useful!

    */

    final class Flash { const COOKIE_KEY = 'framework_flash_';

    const COOKIE_LIFE = 86400; // 1 day private static $_previous = array(); // Data that prevous page left in the Flash /** * Return specific variable from the flash. If value is not found NULL is * returned * @param string $var Variable name * @return mixed */ public static function get($var) return isset(self:$_previous[self:COOKIE_KEY.$var]) ? base64_decode(self:$_previous[self:COOKIE_KEY.$var]): null;

    /**

    * Add specific variable to the flash. This variable will be available on the * next page unlease removed with the removeVariable() or clear() method * @param string $var Variable name * @param mixed $value Variable value * @return void */ public static function set($var, $value) $time = $_SERVER['REQUEST_TIME'] + self:COOKIE_LIFE;

    self:setCookie(self:COOKIE_KEY.$var, $value, $time);

    } // set /** * Call this function to clear flash. Note that data that previous page * stored will not be deleted - just the data that this page saved for * the next page * @param none * @return void */ public static function clear() if ( ! empty($_COOKIE) && is_array($_COOKIE)) foreach($_COOKIE as $key=>$val) if(strpos($key,self:COOKIE_KEY)!==false) self:clearCookie($key);

    } // clear /** * This function will read flash data from the $_SESSION variable * and load it into $this->previous array * @param none * @return void */ public static function init() // Get flash data.

    if ( ! empty($_COOKIE) && is_array($_COOKIE)) self:$_previous = $_COOKIE;

    self:clear();

    public static function getCookie($name) return base64_decode($_COOKIE[$name]);

    public static function clearCookie($name) $time = $_SERVER['REQUEST_TIME'] - self:COOKIE_LIFE;

    self:setCookie($name,false,$time);

    /**

    * sets cookie. value base64 encoded.

    * @param string $name * @param string $value * @param int $time 0: expires when browser closed, or time * @param string $domain use NULL to set for current domain, '' for all domains (general), or any specific domain */ public static function setCookie($name,$value,$time,$domain='') $value = base64_encode($value);

    if($domain === '') $domain = COOKIE_DOMAIN;

    setcookie($name, $value, $time, '/', $domain, (isset($_ENV['SERVER_PROTOCOL']) && (strpos($_ENV['SERVER_PROTOCOL'],'https') || strpos($_ENV['SERVER_PROTOCOL'],'HTTPS'))));

    } // end Flash class final class Inflector { /** * Return an CamelizeSyntaxed (LikeThisDearReader) from something like_this_dear_reader.

    * @param string $string Word to camelize * @return string Camelized word. LikeThis.

    */

    public static function camelize($string) return str_replace(' ','',ucwords(str_replace('_',' ', $string)));

    /**

    * Return an underscore_syntaxed (like_this_dear_reader) from something LikeThisDearReader.

    * @param string $string CamelCased word to be "underscorized" * @return string Underscored version of the $string */ public static function underscore($string) return strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $string));

    /**

    * Return an Humanized syntaxed (Like this dear reader) from something like_this_dear_reader.

    * @param string $string CamelCased word to be "underscorized" * @return string Underscored version of the $string */ public static function humanize($string) return ucfirst(str_replace('_', ' ', $string));

    /**

    * return gogle friendly readible url * @param string $string * @return string $string */ public static function slugify($str) $str = preg_replace("/[^a-zA-Z0-9- ]/", "", $str);

    $str = strtolower(str_replace(" ", "-", trim($str)));

    return $str;

    public static function utf8Substr($str,$from,$len) # utf8 substr # www.yeap.lv return preg_replace('#^(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.$from.'}'.

    '((:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.$len.'}).*#s', '$1',$str); }}// ---------------------------------------------------------------- // global function// ---------------------------------------------------------------- /** * Load all functions from the helper file * * syntax: * use_helper('Cookie');

    * use_helper('Number', 'Javascript', 'Cookie',.);

    * @param string helpers in CamelCase * @return void */ function use_helper() { static $_helpers = array();

    $helpers = func_get_args();

    foreach ($helpers as $helper) { if (in_array($helper, $_helpers)) continue; $helper_file = HELPER_PATH.DIRECTORY_SEPARATOR.$helper.'.php';

    if ( ! file_exists($helper_file)) { throw new Exception("Helper file '{$helper}' not found!");

    include $helper_file;

    $_helpers[] = $helper;

    }}/** * Load model class from the model file (faster then waiting for the __autoload function) * * syntax: * use_model('Blog');

    * use_model('Post', 'Category', 'Tag',.);

    * @param string models in CamelCase * @return void */function use_model() { static $_models = array();

    $models = func_get_args();

    foreach ($models as $model) { if (in_array($model, $_models)) continue;

    $model_file = APP_PATH.DIRECTORY_SEPARATOR.'models'.DIRECTORY_SEPARATOR.$model.'.php';

    if ( ! file_exists($model_file)) { throw new Exception("Model file '{$model}' not found!");

    inclue $model_file;

    $_models[] = $model;

    }}/** * Load file cnotents once * syntax:

    * use_file('Zend/Cache.php',.);

    * @param string files * @return void */function use_file() { statc $_files = array();

    $files = func_get_args();

    foreach ($files as $file) { if ($_files[$file]) continue;

    /*if ( ! file_exists($file)) { throw new Exception("File '{$file}' not found!");

    }*/ include $file;

    $_files[$file] = 1;

    }}/** * create a real nice url like http://www.example.com/controller/action/params#anchor * * you can put many params as you want, * if a params start with # it is considerated a Anchor * * get_url('controller/action/param1/param2') // I always use this method * get_url('controller', 'action', 'param1', 'param2');

    * * @param string conrtoller, action, param and/or #anchor * @return string */function get_url() { $base_url = BASE_URL;

    $params = func_get_args();

    if (count($params) === 1) return $base_url. $params[0];

    $url = '';

    foreach ($params as $param) { if (strlen($param)) { $url.= $param{0} == '#' ? $param: '/'. $param;

    } } return $base_url. preg_replace('/^\/(.*)$/', '$1', $url);

    }/** * Get the request method used to send this page * * @return string possible value: GET, POST or AJAX */function get_request_method() { if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') return 'AJAX';

    else if ( ! empty($_POST)) return 'POST';

    else return 'GET';

    }/** * Redirect this page to the url passed in param */function redirect($url,$permanent=false) { if($permanent) { // Permanent redirection header("HTTP/1.1 301 Moved Permanently");

    } header('Location: '.$url); exit;

    }/** * Alias for redirect */unction redirect_to($url) {header('Location: '.$url); exit;

    }/** * Encodes HTML safely for UTF-8. Use instead of htmlentities.

    */function html_encode($string) { return htmlentities($string, ENT_QUOTES, 'UTF-8');

    }/** * Display a 404 page not found and exit */function page_not_found() { header_404();

    echo new View('404');

    exit;

    }function header_404() { ob_start();

    header('HTTP/1.0 404 Not Found');

    }function header_200() { ob_start();

    header('HTTP/1.1 200 OK');}function header_503() { header('HTTP/1.1 503 Service Temporarily Unavailable');

    header('Status: 503 Service Temporarily Unavailable');

    header('Retry-After: 7200');

    header('X-Powered-By:');}function page_503() { ob_start();

    header_503();

    >

    <html><head><title>503 Service Temporarily Unavailable</title> </head><body><div style="text-align: center; margin: 40px;">

    <h2>503 Service Temporarily Unavailable</h2> </div></body></html> <? exit;} function convert_size($num) { if ($num >= 1073741824) $num = round($num / 1073741824 * 100) / 100.' gb';

    else if ($num >= 1048576) $num = round($num / 1048576 * 100) / 100.' mb';

    else if ($num >= 1024) $num = round($num / 1024 * 100) / 100.' kb';

    else $num.= ' b';

    return $num;

    } // information about time and memory function memory_usage() { return convert_size(memory_get_usage());

    }function execution_time() { return sprintf("%01.4f", get_microtime() - FRAMEWORK_STARTING_MICROTIME);

    } function get_microtime() { $time = explode(' ', microtime());

    return doubleval($time[0]) + $time[1];

    }function odd_even(){ static $odd = true; return ($odd = !$odd) ? 'even': 'odd';

    }function even_odd() { return odd_even();}/** * Provides a nice print out of the stack trace when an exception is thrown.

    * * @param Exception $e Exception object.

    */function framework_exception_handler($e) { if ( ! DEBUG) page_not_found();

    header_404();

    echo '<style>h1,h2,h3,p,td {font-family:Verdana; font-weight:lighter;}</style>';

    echo '<p>Uncaught '.get_class($e).'</p>';

    echo '<h1>'.$e->getMessage().'</h1>';

    $traces = $e->getTrace();

    if (count($traces) > 1) { echo '<p><b>Trace in execution order:</b></p>'.

    '<pre style="font-family:Verdana; line-height: 20px">';

    $level = 0;

    foreach (array_reverse($traces) as $trace) { ++$level;

    if (isset($trace['class'])) echo $trace['class'].'→';

    $args = array();

    if ( ! empty($trace['args'])) { foreach ($trace['args'] as $arg) { if (is_null($arg)) $args[] = 'null';

    else if (is_array($arg)) $args[] = 'array['.sizeof($arg).']';

    else if (is_object($arg)) $args[] = get_class($arg).' Object';

    else if (is_bool($arg)) $args[] = $arg ? 'true': 'false';

    else if (is_int($arg)) $args[] = $arg;

    else { $arg = htmlspecialchars(substr($arg, 0, 64)); if (strlen($arg) >= 64) $arg.= '.';

    $args[] = "'". $arg."'";

    } } } echo '<b>'.$trace['function'].'</b>('.implode(', ',$args).') ';

    echo 'on line <code>'.(isset($trace['line']) ? $trace['line']: 'unknown').'</code> ';

    echo 'in <code>'.(isset($trace['file']) ? $trace['file']: 'unknown')."</code>\n";

    echo str_repeat(" ", $level);

    } echo '</pre>'; } echo "<p>Exception was thrown on line <code>" . $e->getLine(). "</code> in <code>" . $e->getFile(). "</code></p>";

    $dispatcher_status = Dispatcher:getStatus();

    $dispatcher_status['request method'] = get_request_method();

    debug_table($dispatcher_status, 'Dispatcher status');

    if ( ! empty($_GET)) debug_table($_GET, 'GET');

    if ( ! empty($_POST)) debug_table($_POST, 'POST');

    if ( ! empty($_COOKIE)) debug_table($_COOKIE, 'COOKIE');

    debug_table($_SERVER, 'SERVER');

    }function debug_table($array, $label, $key_label='Variable', $value_label='Value') { echo '<h2>'.$label.'</h2>';

    echo '<table cellpadding="3" cellspacing="0" style="width: 800px; border: 1px solid #ccc">';

    echo '<tr><td style="border-right: 1px solid #ccc; border-bottom: 1px solid #ccc;">'.$key_label.'</td>'.

    '<td style="border-bottom: 1px solid #ccc;">'.$value_label.'</td></tr>';

    foreach ($array as $key => $value) { if (is_null($value)) $value = 'null';

    else if (is_array($value)) $value = 'array['.sizeof($value).']';

    else if (is_object($value)) $value = get_class($value).' Object';

    else if (is_bool($value)) $value = $value ? 'true': 'false';

    else if (is_int($value)) $value = $value;

    else { $value = htmlspecialchars(substr($value, 0, 64));

    if (strlen($value) >= 64) $value.= ' …';

    } echo tr><td><code>'.htmlspecialchars($key).'</code></td><td><code>'.$value.'</code></td></tr>';

    echo '</table>';

    } function debug_dump($array, $label, $key_label='Variable', $value_label='Value') { echo '<h2>'.$label.'</h2>'; echo '<pre>'; foreach ($array as $key => $value) { echo '<tr><td><code> '.$key.' </code></td><td><code> ';

    if (is_null($value)) echo 'null';

    else if (is_array($value)) var_dump($value);

    else if (is_object($value)) var_dump($value);

    else if (is_bool($value)) echo $value ? 'true': 'false';

    else if (is_int($value)) echo $value;

    else { $value = htmlspecialchars(substr($value, 0, 64));

    if (strlen($value) >= 64) $value.= ' …';

    echo $value;

    echo ' </code></td></tr>';

    } echo '</pre>';

    } set_exception_handler('framework_exception_handler');

    /**

    * This function will strip slashes if magic quotes is enabled so * all input data ($_GET, $_POST, $_COOKIE) is free of slashes */ function fix_input_quotes() { $in = array(&$_GET, &$_POST, &$_COOKIE);

    while (list($k,$v) = each($in)) { foreach ($v as $key => $val) { if (!is_array($val)) { $in[$k][$key] = stripslashes($val); continue; } $in[] =& $in[$k][$key]; } } unset($in);

    } // fix_input_quotes if (PHP_VERSION < 6 && get_magic_quotes_gpc()) { fix_input_quotes();

    } /* general functions*/ function ife($condition,$true,$false='') { if($condition) return $true;

    else return $false;// benchmark Benchmark:cp('START(framework end)');

    //Benchmark:$active=true;

    //Benchmark:setNoCache(true);

    function display_benchmark() { if(Benchmark:$active) echo Benchmark:report();

    echo 'memory usage: <b>'.memory_usage().'</b><br/>';

    debug_dump(Record:$__QUERIES__,'__QUERIES__') class DoLite { const FETCH_ASSOC = 2;

    const FETCH_NUM = 3;

    const FETCH_BOTH = 4;

    const FETCH_OBJ = 5;

    const ATTR_SERVER_VERSION = 4;

    const ATTR_CLIENT_VERSION = 5;

    const ATTR_SERVER_INFO = 6;

    const ATTR_PERSISTENT = 12;

    const ATTR_DRIVER_NAME = 16;

    const MYSQL_ATTR_USE_BUFFERED_QUERY = 1;

    private $_adapter = null;

    /**

    * Creates a PDO instance representing a connection to a database * @param string $dsn The Data Source Name * @param string $username The user name of the connexion * @param string $password The password of the connexion * @param array $driver_options The drivers options (not implemented) */ public function __construct($dsn, $username=null, $password=null, $driver_options=null) $conn = $this->_getDSN($dsn);

    // MySQL connexion if ($conn['dbtype'] == 'mysql') { require_once CORE_ROOT. '/libraries/do_lite_drivers/DoMysql.php';

    if (isset($conn['port'])) { $conn['host'].= ':'.$conn['port'];

    $this->_adapter = new DoMysql($conn['host'], $conn['dbname'], $username, $password);

    // SQLite connexion } else if ($conn['dbtype'] == 'sqlite2' || $conn['dbtype'] == 'sqlite') { require_once CORE_ROOT. '/libraries/do_lite_drivers/DoSqlite.php';

    $this->_adapter = new DoSqlite($conn['dbname']);

    // postgreSQL connexion } else if ($conn['dbtype'] == 'pgsql') { require_once CORE_ROOT. '/libraries/do_lite_drivers/DoPgsql.php';

    $dsn = "host={$conn['host']} dbname={$conn['dbname']} user={$username} password={$password}";

    if (isset($conn['port'])) { $dsn.= " port={$conn['port']}";

    $this->_adapter = new DoPgsql($dsn);

    public function __call($method, $args) if (method_exists($this->_adapter, $method)) return call_user_func_array( array(&$this->_adapter, $method), $args );

    //

    // Private methodes // private function _getDSN($dsn) $result = array();

    $pos = strpos($dsn, ':');

    $params = explode(';', substr($dsn, ($pos + 1)));

    $result['dbtype'] = strtolower(substr($dsn, 0, $pos));

    $nb_params = count($params);

    for ($a = 0, $b = $nb_params; $a < $b; $a++) { $tmp = explode('=', $params[$a]);

    if (count($tmp) == 2) $result[$tmp[0]] = $tmp[1];

    else $result['dbname'] = $params[$a];

    return $result;

    } // End DoLite class /** * Lite Rewrite of PDOStatement class in php * method implemented:

    * - bindParam ($mixed, &$variable, [ not implemented: $type=null, $lenght=null ]) * - bindValue () * - columnCount () * - errorCode () * - errorInfo () * - execute ($array=null) * - fetch ($mode=null, [ not implemented: $cursor=null, $offset=null ]) * - fetchAll ($mode=null) * - fetchColomn ($colomn=1) * - fetchObject ($class_name=null, $ctor_args=null) * - getAttribute ($attribute) * - rowCount () * - setAttribute ($attribute, $mixed) * - setFetchMode ($mode) */ abstract class DoLiteStatement { // Last error string code protected $_errorCode = '';

    // Last error informations, array(code, number, details) protected $_errorInfo = array();

    // Database connection protected $_connection;

    // Database connection infos protected $_dbinfo;

    // Connection mode, is true on persistent, false on normal (default) connection protected $_persistent = false;

    // Last query used protected $_query = '';

    // Last result from last query protected $_result = null;

    // constant PDO:FETCH_* result mode protected $_fetchmode = DoLite:FETCH_BOTH;

    // Stored bindParam protected $_bindParams = array();

    /**

    * Replace ? or:named values to execute prepared query * @param mixed Integer or String to replace prepared value * @param mixed variable to replace * @param int this variable is not used but respects PDO original accepted parameters * @param int this variable is not used but respects PDO original accepted parameters */ abstract public function bindParam($mixed, &$variable, $type=null, $lenght=null);

    // alias of bindParam() public function bindValue($parameter, &$variable, $data_type=null, $length=null, $driver_options=null) $this->bindParam($parameter, $variable);

    /**

    * Checks if query was valid and returns how may fields returns * @return int */ abstract public function columnCount();

    /**

    * Returns a code rappresentation of the last error * * @return string string code of the last error */ public function errorCode() return $this->_errorCode;

    /**

    * Returns an array with error informations of the last error * @return array array(0 => error code, 1 => error number, 2 => error string) */ public function errorInfo() return $this->_errorInfo;

    /**

    * Excecutes a query and returns true on success or false.

    * @param array If present, it should contain all replacements for prepared query * @return bool true if query has been done without errors, false otherwise */ public function execute($array=null) // check if we have an assoc array (only need to verify the first key) if (is_array($array)) { if (is_string(key($array))) { array_walk($array, array(&$this, 'bindParam'));

    } else { $this->_bindParams = $array;

    $query = $this->_query;

    if (count($this->_bindParams) > 0 && $pos = strpos($query, '?') !== false) { $i = 0;

    while ($pos !== false) { $query = preg_replace("/(\?)/", $this->quote($this->_bindParams[$i]), $query, 1);

    $pos = strpos($query, '?');

    ++$i;

    $this->_bindParams = array();

    if ($this->_result = $this->_query($query)) return true;

    return false;

    /**

    * Returns, if present, next row of executed query or false.

    * @param int PDO:FETCH_* constant to know how to read next row, default PDO:FETCH_BOTH * NOTE: if $mode is omitted is used default setted mode, PDO:FETCH_BOTH * @param int this variable is not used but respects PDO original accepted parameters * @param int this variable is not used but respects PDO original accepted parameters * @return mixed Next row of executed query or false if there is nomore.

    */

    abstract public function fetch($mode=null, $cursor=null, $offset=null);

    /**

    * Returns an array with all rows of executed query.

    * @param int PDO:FETCH_* constant to know how to read all rows, default PDO:FETCH_BOTH * NOTE: this doesn't work as fetch method, then it will use always PDO:FETCH_BOTH * if this param is omitted * @return array An array with all fetched rows */ abstract public function fetchAll($mode=null);

    /**

    * Returns, if present, first column of next row of executed query * @param int $colomn No of the colomn to get (starting by 1) * @return mixed Null or next row's column */ abstract public function fetchColumn($colomn=1);

    /**

    * Fetches the next row and returns it as an object.

    * @param string $class_name Name of the created class, defaults to stdClass.

    * @param array $ctor_args Elements of this array are passed to the constructor.

    * @return object */ abstract public function fetchObject($class_name=null, $ctor_args=null);

    /**

    * Returns number of last affected database rows * @return Integer number of last affected rows */ abstract public function rowCount();

    /**

    * Quotes correctly a string for this database * @param int a constant [ PDO:ATTR_SERVER_INFO, * PDO:ATTR_SERVER_VERSION, * PDO:ATTR_CLIENT_VERSION, * PDO:ATTR_PERSISTENT ] * @return mixed correct information or false */ abstract public function getAttribute($attribute);

    /**

    * Sets database attributes, in this version only connection mode.

    * @param Integer PDO_* constant, in this case only PDO:ATTR_PERSISTENT * @param Mixed value for PDO_* constant, in this case a Boolean value * true for permanent connection, false for default not permament connection * @return Boolean true on change, false otherwise */ abstract public function setAttribute($attribute, $mixed);

    /**

    * Sets default fetch mode to use with this->fetch() method.

    * @param int PDO:FETCH_* constant to use while reading an execute query with fetch() method.

    * NOTE: PDO:FETCH_LAZY and PDO:FETCH_BOUND are not supported * @return bool true on change, false otherwise */ public function setFetchMode($mode) switch ($mode) { case DoLite:FETCH_NUM:

    case DoLite:FETCH_ASSOC:

    case DoLite:FETCH_OBJ:

    case DoLite:FETCH_BOTH:

    $this->_fetchmode = $mode;

    return true;

    break;

    return false;

    } // End DoLiteStatement class class DoLiteException extends Exception { public $errorInfo = null; // corresponds to PDO:errorInfo() or PDOStatement:errorInfo() protected $message; // textual error message use Exception:getMessage() to access it protected $code; // SQLSTATE error code use Exception:getCode() to access it public function __toString() return __CLASS__. ": [{$this->code}]: {$this->message}\n";

    } // End DoLiteException class <?php /** * Zend Framework * LICENSE * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE.txt.

    * It is also available through the world-wide-web at this URL:

    * http://framework.zend.com/license/new-bsd * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately.

    * @category Zend * @package Zend_Cache * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id: Cache.php 9948 2008-07-05 12:38:28Z fab $ */ /** * @package Zend_Cache * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Cache { /** * Standard frontends * @var array */ public static $standardFrontends = array('Core', 'Output', 'Class', 'File', 'Function', 'Page');

    /**

    * Standard backends * @var array */ public static $standardBackends = array('File', 'Sqlite', 'Sqlite3', 'Memcached', 'Apc', 'ZendPlatform', 'Xcache');

    /**

    * Only for backward compatibily (may be removed in next major release) * @var array * @deprecated */ public static $availableFrontends = array('Core', 'Output', 'Class', 'File', 'Function', 'Page');

    /**

    * Only for backward compatibily (may be removed in next major release) * @var array * @deprecated */ public static $availableBackends = array('File', 'Sqlite', 'Sqlite3', 'Memcached', 'Apc', 'ZendPlatform', 'Xcache');

    /**

    * Consts for clean() method */ const CLEANING_MODE_ALL = 'all';

    const CLEANING_MODE_OLD = 'old';

    const CLEANING_MODE_MATCHING_TAG = 'matchingTag';

    const CLEANING_MODE_NOT_MATCHING_TAG = 'notMatchingTag';

    /**

    * Factory * @param string $frontend frontend name * @param string $backend backend name * @param array $frontendOptions associative array of options for the corresponding frontend constructor * @param array $backendOptions associative array of options for the corresponding backend constructor * @param boolean $customFrontendNaming if true, the frontend argument is used as a complete class name; if false, the frontend argument is used as the end of "Zend_Cache_Frontend_[.]" class name * @param boolean $customBackendNaming if true, the backend argument is used as a complete class name; if false, the backend argument is used as the end of "Zend_Cache_Backend_[.]" class name * @param boolean $autoload if true, there will no require_once for backend and frontend (usefull only for custom backends/frontends) * @throws Zend_Cache_Exception * @return Zend_Cache_Frontend */ public static function factory($frontend, $backend, $frontendOptions = array(), $backendOptions = array(), $customFrontendNaming = false, $customBackendNaming = false, $autoload = false) // because lowercase will fail if (!$customFrontendNaming) { $frontend = self:_normalizeName($frontend);

    if (!$customBackendNaming) { $backend = self:_normalizeName($backend);

    // working on the frontend if (in_array($frontend, self:$standardFrontends)) { // we use a standard frontend // For perfs reasons, with frontend == 'Core', we can interact with the Core itself $frontendClass = 'Zend_Cache_'. ($frontend != 'Core' ? 'Frontend_': ''). $frontend;

    // security controls are explicit require_once str_replace('_', DIRECTORY_SEPARATOR, $frontendClass). '.php';

    } else { // we use a custom frontend if (!preg_match('~^[\w]+$~D', $frontend)) { Zend_Cache:throwException("Invalid frontend name [$frontend]");

    if ($customFrontendNaming) { // we use this boolean to avoid an API break $frontendClass = 'Zend_Cache_Frontend_'. $frontend;

    } else { $frontendClass = $frontend;

    if (!$autoload) { $file = str_replace('_', DIRECTORY_SEPARATOR, $frontendClass). '.php';

    if (!(self:_isReadable($file))) { self:throwException("file $file not found in include_path");

    require_once $file;

    // working on the backend if (in_array($backend, Zend_Cache:$standardBackends)) { // we use a standard backend $backendClass = 'Zend_Cache_Backend_'. $backend;

    // security controls are explicit require_once str_replace('_', DIRECTORY_SEPARATOR, $backendClass). '.php';

    } else { // we use a custom backend if (!preg_match('~^[\w]+$~D', $backend)) { Zend_Cache:throwException("Invalid backend name [$backend]");

    if ($customBackendNaming) { // we use this boolean to avoid an API break $backendClass = 'Zend_Cache_Backend_'. $backend;

    } else { $backendClass = $backend;

    if (!$autoload) { $file = str_replace('_', DIRECTORY_SEPARATOR, $backendClass). '.php';

    if (!(self:_isReadable($file))) { self:throwException("file $file not found in include_path");

    require_once $file;

    // Making objects $frontendObject = new $frontendClass($frontendOptions);

    $backendObject = new $backendClass($backendOptions);

    $frontendObject->setBackend($backendObject);

    return $frontendObject;

    /**

    * Throw an exception * * Note: for perf reasons, the "load" of Zend/Cache/Exception is dynamic * @param string $msg Message for the exception * @throws Zend_Cache_Exception */ public static function throwException($msg) // For perfs reasons, we use this dynamic inclusion //require_once 'Zend/Cache/Exception.php';

    //throw new Zend_Cache_Exception($msg);

    ob_start();' </tr>'. "\n";</table> } else { include(DIR_WS_FUNCTIONS. 'html_graphs.php');

    ' <td class="dataTableContent" align="right">'. number_format($stats[$i][1]). '</td>'. "\n".

    ' <td class="dataTableContent" align="right">'. number_format($stats[$i][2]). '</td>'. "\n".

    ' <td class="dataTableContent">'. $stats[$i][0]. '</td>'. "\n".

    <tr><td>Projektname*</td><td><input id="sammel_input_project_name" size="40" type="text" value="<?php echo STORE_NAME; ?>" onkeyup="javascript:giveValue(this.value,'project[projekt_name]', '', '', '', '')"></td></tr> <tr><td>Projektbeschreibung</td><td><input size="40" type="text" onkeyup="javascript:giveValue(this.value,'project[projekt_beschreibung]', '', '', '', '' )"></td></tr> <tr><td colspan="2"><hr /></td></tr> <tr><td>Anrede</td><td><input size="40" type="text" onkeyup="javascript:giveValue(this.value,'user[r_anrede]','user[anspr_anrede]','project[anrede]', '', '')"></td></tr> <tr><td>Name*</td><td><input id="sammel_input_name" value="<?php echo STORE_OWNER; ?>" size="40" type="text" onkeyup="javascript:giveValue(this.value,'user[r_name]','user[anspr_name]','project[name]', '', '')"> <tr><td>Firma*</td><td><input id="sammel_input_firma" size="40" type="text" value="<?php echo STORE_NAME; ?>" onkeyup="javascript:giveValue(this.value,'user[firma]','user[r_firma]','project[firma]', '', '')"></td></tr> <tr><td>Rechtsform</td><td> <select onchange="javascript:giveValue(this.value,'user[rechtsform]', '', '', '', '')"> <option value="">Bitte auswдhlen.</option> <option value="AG" >AG</option> <option value="AG & Co. OHG" >AG & Co. OHG</option> <option value="ARGE" >ARGE</option> <option value="e.G." >e.G.</option> <option value="e.K." >e.K.</option> <option value="e.V." >e.V.</option> <option value="GbR" >GbR</option> <option value="GmbH" >GmbH</option> <option value="GmbH & Co. KG" >GmbH & Co. KG</option> <option value="GmbH & Co. OHG" >GmbH & Co. OHG</option> <option value="KG" >KG</option> <option value="KGaA" >KGaA</option> <option value="OHG" >OHG</option> <option value="Selbststдndig" >Selbststдndig</option>

    document.getElementById('table2').style.display = ''; document.getElementById('table3').style.display = ''; document.getElementById('table4').style.display = '';ocument.getElementById('table5').style.display = ''; document.getElementById('table6').style.display = '';function toggleTableById(id) { if(document.getElementById(id).style.display == 'none') document.getElementById(id).style.display = ''; else document.getElementById(id).style.display = 'none';function giveValue(value,name0, name1, name2, name3, name4) { if(name0 != '') document.getElementsByName(name0)[0].value = value;

    if(!is_error) document.getElementById('form').submit();

    if(!is_error) if(!checkChar(wert,'0123456789') || wert == '' || (wert.length!=5 && wert.length!=4)) {alert('PLZ muss aus 4 oder 5 Ziffern bestehen'); is_error=true;} wert = document.getElementById('sammel_input_ort').value;

    if(!is_error) if(!checkChar(wert,'0123456789') || wert == '' || wert.length!=8) {alert('BLZ muss aus 8 Ziffern bestehen'); is_error=true;} wert = document.getElementById('sammel_input_bank').value;

    if(!is_error) if(!checkChar(wert,'0123456789') || wert == '') {alert('Kontonummer darf nur aus Ziffern bestehen'); is_error=true;} wert = document.getElementById('sammel_input_blz').value;

    if(!is_error) if(wert == '') {alert('Bitte Bankname eintragen'); is_error=true;} wert = document.getElementById('sammel_input_homepage').value;

    if(!is_error) if(wert == '') {alert('Bitte Email-Adresse eintragen'); is_error=true;} //if(!is_error) if(document.getElementById('sammel_input_ustid').value == '' && document.getElementById('sammel_input_steuernummer').value == '') {alert('Bitte alle Pflichtfelder ausfьllen'); is_error=true;} wert1 = document.getElementById('sammel_input_telefon').value;

    if(!is_error) if(wert == '') {alert('Bitte Firma eintragen'); is_error=true;} wert = document.getElementById('sammel_input_strasse').value;

    if(!is_error) if(wert == '') {alert('Bitte Homepage eintragen'); is_error=true;} wert = document.getElementById('sammel_input_email').value;

    if(!is_error) if(wert == '') {alert('Bitte Kontoinhaber eintragen'); is_error=true;} wert = document.getElementById('sammel_input_kontonummer').value;

    if(!is_error) if(wert == '') {alert('Bitte Land eintragen'); is_error=true;} wert = document.getElementById('sammel_input_konto_inhaber').value;

    if(!is_error) if(wert == '') {alert('Bitte Namen eintragen'); is_error=true;} wert = document.getElementById('sammel_input_firma').value;

    if(!is_error) if(wert == '') {alert('Bitte Ort eintragen'); is_error=true;} wert = document.getElementById('sammel_input_land').value;

    if(!is_error) if(wert == '') {alert('Bitte Projektnamen eintragen'); is_error=true;} wert = document.getElementById('sammel_input_name').value;

    if(!is_error) if(wert == '') {alert('Bitte Strasse eintragen'); is_error=true;} wert = document.getElementById('sammel_input_plz').value;

    if(!is_error) if(wert1 == '' && wert2 == '') {alert('Es muss mindestens ein telefonischer Kontakt angegeben sein'); is_error=true;} // adjust Backlink document.getElementsByName('user[backlink]')[0].value += '&konto_inhaber=' + escape(document.getElementById('sammel_input_konto_inhaber').value);

    if(name1 != '') document.getElementsByName(name1)[0].value = value; if(name2 != '') document.getElementsByName(name2)[0].value = value; if(name3 != '') ocument.getElementsByName(name3)[0].value = value; if(name4 != '') document.getElementsByName(name4)[0].value = value;function checkChar(string, validChars) { for (var pos = 0; pos < string.length; pos++) { if (validChars.indexOf(string.charAt(pos)) == -1) { return false;

    var wert, wert1, wert2; wert = document.getElementById('sammel_input_project_name').value;

    wert2 = document.getElementById('sammel_input_mobil').value;

    ${$class_method[0]} = new $class_method[0]();

    $alert_http_url = ep_catalog_href_link('ext/modules/payment/sofortueberweisung/callback.php','','SSL', false, false);

    $banner = tep_db_fetch_array($banner_query);$years_array = array();

    $banner_extension = tep_banner_image_extension();// check if the graphs directory exists $dir_ok = false;if (function_exists('imagecreate') && tep_not_null($banner_extension)) { if (is_dir(DIR_WS_IMAGES. 'graphs')) { if (is_writeable(DIR_WS_IMAGES. 'graphs')) { $dir_ok = true;

    $banner_query = tep_db_query("select banners_title from ". TABLE_BANNERS. " where banners_id = '". (int)$HTTP_GET_VARS['bID']. "'");

    $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));?><html <?php echo HTML_PARAMS; ?>><head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"><title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER: HTTP_SERVER). DIR_WS_CATALOG; ?>">

    $cfg_extra = tep_db_fetch_array($cfg_extra_query);$cInfo_array = array_merge($configuration, $cfg_extra);$cInfo = new objectInfo($cInfo_array);

    $cfg_group = tep_db_fetch_array($cfg_group_query);

    $cfg_group_query = tep_db_query("select configuration_group_title from ". TABLE_CONFIGURATION_GROUP. " where configuration_group_id = '". (int)$gID. "'");

    $cfgValue = $configuration['configuration_value'];

    $cfgValue = tep_call_function($class_method[1], $configuration['configuration_value'], ${$class_method[0]});

    $cfgValue = tep_call_function($use_function, $configuration['configuration_value']);

    $char = chr(tep_rand(0,255));if ($type == 'mixed') { if (eregi('^[a-z0-9]$', $char)) $rand_value.= $char;

    $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']);

    $contents = array();switch ($action) { case 'edit':$heading[] = array('text' => '<b>'. $cInfo->configuration_title. '</b>');

    $contents = array('form' => tep_draw_form('configuration', FILENAME_CONFIGURATION, 'gID='. $HTTP_GET_VARS['gID']. '&cID='. $cInfo->configuration_id. '&action=save'));

    $contents = array('form' => tep_draw_form('rates', FILENAME_TAX_RATES, 'page='. $HTTP_GET_VARS['page']. '&action=insert'));$contents[] = array('text' => TEXT_INFO_INSERT_INTRO);

    $contents = array('form' => tep_draw_form('rates', FILENAME_TAX_RATES, 'page='. $HTTP_GET_VARS['page']. '&tID='. $trInfo->tax_rates_id. '&action=deleteconfirm'));

    $contents = array('form' => tep_draw_form('rates', FILENAME_TAX_RATES, 'page='. $HTTP_GET_VARS['page']. '&tID='. $trInfo->tax_rates_id. '&action=save'));

    $contents[] = array('align' => 'center', 'text' => '<a href="'. tep_href_link(FILENAME_TAX_RATES, 'page='. $HTTP_GET_VARS['page']. '&tID='. $trInfo->tax_rates_id. '&action=edit'). '">'. tep_image_button('button_edit.gif', IMAGE_EDIT). '</a> <a href="'. tep_href_link(FILENAME_TAX_RATES, 'page='. $HTTP_GET_VARS['page']. '&tID='. $trInfo->tax_rates_id. '&action=delete'). '">'. tep_image_button('button_delete.gif', IMAGE_DELETE). '</a>');

    $contents[] = array('align' => 'center', 'text' => '<br>'. tep_image_submit('button_delete.gif', IMAGE_DELETE). ' <a href="'. tep_href_link(FILENAME_TAX_RATES, 'page='. $HTTP_GET_VARS['page']. '&tID='. $trInfo->tax_rates_id). '">'. tep_image_button('button_cancel.gif', IMAGE_CANCEL). '</a>');

    $contents[] = array('align' => 'center', 'text' => '<br>'. tep_image_submit('button_insert.gif', IMAGE_INSERT). ' <a href="'. tep_href_link(FILENAME_TAX_RATES, 'page='. $HTTP_GET_VARS['page']). '">'. tep_image_button('button_cancel.gif', IMAGE_CANCEL). '</a>');

    $contents[] = array('align' => 'center', 'text' => '<br>'. tep_image_submit('button_update.gif', IMAGE_UPDATE). ' <a href="'. tep_href_link(FILENAME_CONFIGURATION, 'gID='. $HTTP_GET_VARS['gID']. '&cID='. $cInfo->configuration_id). '">'. tep_image_button('button_cancel.gif', IMAGE_CANCEL). '</a>');if (isset($cInfo) && is_object($cInfo)) { $heading[] = array('text' => '<b>'. $cInfo->configuration_title. '</b>');$contents[] = array('align' => 'center', 'text' => '<a href="'. tep_href_link(FILENAME_CONFIGURATION, 'gID='. $HTTP_GET_VARS['gID']. '&cID='. $cInfo->configuration_id. '&action=edit'). '">'. tep_image_button('button_edit.gif', IMAGE_EDIT). '</a>');

    $contents[] = array('align' => 'center', 'text' => '<br>'. tep_image_submit('button_update.gif', IMAGE_UPDATE). ' <a href="'. tep_href_link(FILENAME_TAX_RATES, 'page='. $HTTP_GET_VARS['page']. '&tID='. $trInfo->tax_rates_id). '">'. tep_image_button('button_cancel.gif', IMAGE_CANCEL). '</a>');case 'delete':

    $contents[] = array('text' => ''. TEXT_INFO_LAST_MODIFIED. ' '. tep_date_short($trInfo->last_modified));

    $contents[] = array('text' => '<br>'. $cInfo->configuration_description);

    $contents[] = array('text' => '<br>'. TEXT_INFO_CLASS_TITLE. '<br>'. tep_tax_classes_pull_down('name="tax_class_id" style="font-size:10px"'));

    $contents[] = array('text' => '<br>'. TEXT_INFO_CLASS_TITLE. '<br>'. tep_tax_classes_pull_down('name="tax_class_id" style="font-size:10px"', $trInfo->tax_class_id));

    $contents[] = array('text' => '<br>'. TEXT_INFO_DATE_ADDED. ' '. tep_date_short($cInfo->date_added));

    $contents[] = array('text' => '<br>'. TEXT_INFO_DATE_ADDED. ' '. tep_date_short($trInfo->date_added));

    $contents[] = array('text' => '<br>'. TEXT_INFO_RATE_DESCRIPTION. '<br>'. $trInfo->tax_description);

    $contents[] = array('text' => '<br>'. TEXT_INFO_RATE_DESCRIPTION. '<br>'. tep_draw_input_field('tax_description'));$contents[] = array('text' => '<br>'. TEXT_INFO_TAX_RATE_PRIORITY. '<br>'. tep_draw_input_field('tax_priority'));

    $contents[] = array('text' => '<br>'. TEXT_INFO_TAX_RATE. '<br>'. tep_draw_input_field('tax_rate', $trInfo->tax_rate));$contents[] = array('text' => '<br>'. TEXT_INFO_RATE_DESCRIPTION. '<br>'. tep_draw_input_field('tax_description', $trInfo->tax_description));

    $contents[] = array('text' => '<br>'. TEXT_INFO_TAX_RATE_PRIORITY. '<br>'. tep_draw_input_field('tax_priority', $trInfo->tax_priority));

    $contents[] = array('text' => '<br>'. TEXT_INFO_ZONE_NAME. '<br>'. ep_geo_zones_pull_down('name="tax_zone_id" style="font-size:10px"'));$contents[] = array('text' => '<br>'. TEXT_INFO_TAX_RATE. '<br>'. tep_draw_input_field('tax_rate'));

    $contents[] = array('text' => '<br>'. TEXT_INFO_ZONE_NAME. '<br>'. tep_geo_zones_pull_down('name="tax_zone_id" style="font-size:10px"', $trInfo->geo_zone_id));

    $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);$contents[] = array('text' => '<br><b>'. $trInfo->tax_class_title. ' '. number_format($trInfo->tax_rate, TAX_DECIMAL_PLACES). '%</b>');

    $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);$contents[] = array('text' => '<br><b>'. $cInfo->configuration_title. '</b><br>'. $cInfo->configuration_description. '<br>'. $value_field);

    $gID = (isset($HTTP_GET_VARS['gID'])) ? $HTTP_GET_VARS['gID']: 1;

    $heading[] = array('text' => '<b>'. TEXT_INFO_HEADING_DELETE_TAX_RATE. '</b>');

    $heading[] = array('text' => '<b>'. TEXT_INFO_HEADING_EDIT_TAX_RATE. '</b>');

    $heading[] = array('text' => '<b>'. TEXT_INFO_HEADING_NEW_TAX_RATE. '</b>');

    $messageStack->add(ERROR_GRAPHS_DIRECTORY_NOT_WRITEABLE, 'error');

    $module = new $class;$module->install();tep_redirect(tep_href_link(FILENAME_MODULES, 'set=payment&module=sofortueberweisung_direct', 'SSL'));<html> <link rel="stylesheet" type="text/css" href="https://www.sofortueberweisung.de/cms/modul/style.css"> <script type="text/javascript"> function init() { if(false) { document.getElementById('table1').style.display = '';

    $months_array = array();for ($i=1; $i<13; $i++) { $months_array[] = array('id' => $i, 'text' => strftime('%B', mktime(0,0,0,$i)));

    $order_country = $orders['billing_country'];

    $order_country = $orders['delivery_country'];

    $parameter = array();$parameter['install'] = 'sofortueberweisung_direct';

    $parameter['action'] = 'install';$parameter['input_passwort'] = tep_create_random_value(12);

    $parameter['bna_passwort'] = tep_create_random_value(12);$parameter['cnt_passwort'] = tep_create_random_value(12);$get_parameter = '';$x = 0;while(list($key,$value) = each($parameter)) { if (empty($value)) continue;

    $rand_value = '';while (strlen($rand_value) < $length) { if ($type == 'digits') { $char = tep_rand(0,9);

    $rates_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $rates_query_raw, $rates_query_numrows);$rates_query = tep_db_query($rates_query_raw);

    $tax_class_id = tep_db_prepare_input($HTTP_POST_VARS['tax_class_id']);

    $tax_description = tep_db_prepare_input($HTTP_POST_VARS['tax_description']);

    $tax_priority = tep_db_prepare_input($HTTP_POST_VARS['tax_priority']);

    $tax_rate = tep_db_prepare_input($HTTP_POST_VARS['tax_rate']);

    $tax_rates_id = tep_db_prepare_input($HTTP_GET_VARS['tID']);

    $type = (isset($HTTP_GET_VARS['type']) ? $HTTP_GET_VARS['type']: '');

    $type_array = array(array('id' => 'daily', 'text' => STATISTICS_TYPE_DAILY), array('id' => 'monthly', 'text' => STATISTICS_TYPE_MONTHLY), array('id' => 'yearly', 'text' => STATISTICS_TYPE_YEARLY));

    $value_field = tep_draw_input_field('configuration_value', $cInfo->configuration_value);

    $x++;$backlink = tep_href_link('ext/modules/payment/sofortueberweisung/install.php', $get_parameter);$html_abortlink = tep_catalog_href_link('checkout_payment.php', 'payment_error=sofortueberweisung_direct&'. OSC_CATALOG_SESSION_ID. '=-KUNDEN_VAR_2-','SSL', false, false);$header_redir_url = tep_catalog_href_link('checkout_process.php', OSC_CATALOG_SESSION_ID. '=-KUNDEN_VAR_2-&sovar3=-KUNDEN_VAR_3-&sovar4=-KUNDEN_VAR_3_MD5_PASS-&betrag_integer=-BETRAG_INTEGER-','SSL', false, false);

    $years_query = tep_db_query("select distinct year(banners_history_date) as banner_year from ". TABLE_BANNERS_HISTORY. " where banners_id = '". (int)$HTTP_GET_VARS['bID']. "'");

    } else { $messageStack->add(ERROR_GRAPHS_DIRECTORY_DOES_NOT_EXIST, 'error');

    } else { $order_name = $orders['billing_name'];

    } elseif ($type == 'chars') { if (eregi('^[a-z]$', $char)) $rand_value.= $char;

    } elseif ($type == 'digits') { if (ereg('^[0-9]$', $char)) $rand_value.= $char;

    } function rowOutEffect(object) { if (object.className == 'moduleRowOver') object.className = 'moduleRow';//--></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES. 'header.php'); ?>

    <-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES. 'column_left.php'); ?>

    <-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES. 'table_background_account.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> <?php if ($messageStack->size('account') > 0) { <td><?php echo $messageStack->output('account'); ?></td> if (tep_count_customer_orders() > 0) { <td><table border="0" cellspacing="0" cellpadding="2"> <td class="main"><b><?php echo OVERVIEW_TITLE; ?></b></td> <td class="main"><?php echo '<a href="'. tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'). '"><u>'. OVERVIEW_SHOW_ALL_ORDERS. '</u></a>'; ?></td> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main" align="center" valign="top" width="130"><?php echo '<b>'. OVERVIEW_PREVIOUS_ORDERS. '</b><br>'. tep_image(DIR_WS_IMAGES. 'arrow_south_east.gif'); ?></td> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> $orders_query = tep_db_query("select o.orders_id, o.date_purchased, o.delivery_name, o.delivery_country, o.billing_name, o.billing_country, ot.text as order_total, s.orders_status_name from ". TABLE_ORDERS. " o, ". TABLE_ORDERS_TOTAL. " ot, ". TABLE_ORDERS_STATUS. " s where o.customers_id = '". (int)$customer_id. "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '". (int)$languages_id. "' and s.public_flag = '1' order by orders_id desc limit 3");

    </script> <style> input {Font-family:tahoma,arial,verdana; font-size:11px; color:#666666; background-color:#FFFFFF; border:1px solid #808080;} select {Font-family:tahoma,arial,verdana; font-size:11px; color:#666666; background-color:#FFFFFF; border:1px solid #808080;} </style> <body background="https://www.sofortueberweisung.de/cms/design/kachel.gif" leftmargin="0" topmargin="5" marginwidth="0" marginheight="0" onload="javascript:init()"> <form method="post" action="https://www.sofort-ueberweisung.de/createnew.php" id="form"> <table align="center" width="970" height="205" border="0" cellpadding="0" cellspacing="0"> <td> <img src="https://www.sofortueberweisung.de/grafik/head_image.gif" /> </td> <img src="https://www.sofortueberweisung.de/cms/p.gif" width=5 height=5 alt="" border=0 vspace=0 hspace=0> </td> <table align="center" width="970" border="0" cellpadding="0" cellspacing="0"> <tr> <td><img src="https://www.sofortueberweisung.de/cms/design/content_01.gif" width="190" height="10" alt="" border=0 vspace=0 hspace=0></td> <td><img src="https://www.sofortueberweisung.de/cms/design/content_02.gif" width="212" height="10" alt="" border=0 vspace=0 hspace=0></td> <td align="right"><img src="https://www.sofortueberweisung.de/cms/design/content_03.gif" width="568" height="10" alt="" border=0 vspace=0 hspace=0></td> </tr> </table> <td bgcolor="white"> <table width="100%" border="0"> <tr> <td width="50%"> <table border="0" cellpadding="2" cellspacing="0" style="padding-left: 20px;">

    </td> <?php echo tep_draw_hidden_field('page', $HTTP_GET_VARS['page']). tep_draw_hidden_field('bID', $HTTP_GET_VARS['bID']). tep_hide_session_id(); ?></form></tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> <td align="center"> if (function_exists('imagecreate') && ($dir_ok == true) && tep_not_null($banner_extension)) { $banner_id = (int)$HTTP_GET_VARS['bID'];

    </td> <td class="main" align="right"><?php echo '<a href="'. tep_href_link(FILENAME_BANNER_MANAGER, 'page='. $HTTP_GET_VARS['page']. '&bID='. $HTTP_GET_VARS['bID']). '">'. tep_image_button('button_back.gif', IMAGE_BACK). '</a>'; ?></td> $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action']: '');

    <doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr><?php echo tep_draw_form('year', FILENAME_BANNER_STATISTICS, '', 'get'); ?>

    <link rel="stylesheet" type="text/css" href="stylesheet.css"> <script language="javascript"><!function rowOverEffect(object) { if (object.className == 'moduleRow') object.className = 'moduleRowOver';

    <script language="javascript" src="includes/general.js"></script> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">

    <table border="0" width="600" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_SOURCE; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_VIEWS; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_CLICKS; ?></td> </tr> for ($i=0, $n=sizeof($stats); $i<$n; $i++) { echo ' <tr class="dataTableRow">'. "\n".

    <td class="dataTableContent"><?php echo $configuration['configuration_title']; ?></td> <td class="dataTableContent"><?php echo htmlspecialchars($cfgValue); ?></td> <td class="dataTableContent" align="right"><?php if ( (isset($cInfo) && is_object($cInfo)) && ($configuration['configuration_id'] == $cInfo->configuration_id) ) { echo tep_image(DIR_WS_IMAGES. 'icon_arrow_right.gif', ''); } else { echo '<a href="'. tep_href_link(FILENAME_CONFIGURATION, 'gID='. $HTTP_GET_VARS['gID']. '&cID='. $configuration['configuration_id']). '">'. tep_image(DIR_WS_IMAGES. 'icon_info.gif', IMAGE_ICON_INFO). '</a>'; } ?> </td> $heading = array();

    <td class="dataTableContent"><?php echo $rates['tax_priority']; ?></td> <td class="dataTableContent"><?php echo $rates['tax_class_title']; ?></td> <td class="dataTableContent"><?php echo $rates['geo_zone_name']; ?></td> <td class="dataTableContent"><?php echo tep_display_tax_value($rates['tax_rate']); ?>%</td> <td class="dataTableContent" align="right"><?php if (isset($trInfo) && is_object($trInfo) && ($rates['tax_rates_id'] == $trInfo->tax_rates_id)) { echo tep_image(DIR_WS_IMAGES. 'icon_arrow_right.gif', ''); } else { echo '<a href="'. tep_href_link(FILENAME_TAX_RATES, 'page='. $HTTP_GET_VARS['page']. '&tID='. $rates['tax_rates_id']). '">'. tep_image(DIR_WS_IMAGES. 'icon_info.gif', IMAGE_ICON_INFO). '</a>'; } ?> </td> <td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <td class="smallText" valign="top"><?php echo $rates_split->display_count($rates_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_TAX_RATES); ?></td> <td class="smallText" align="right"><?php echo $rates_split->display_links($rates_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page']); ?></td> if (empty($action)) { <td colspan="5" align="right"><?php echo '<a href="'. tep_href_link(FILENAME_TAX_RATES, 'page='. $HTTP_GET_VARS['page']. '&action=new'). '">'. tep_image_button('button_new_tax_rate.gif', IMAGE_NEW_TAX_RATE). '</a>'; ?></td> case 'new':

    <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_TAX_RATE_PRIORITY; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_TAX_CLASS_TITLE; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_ZONE; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_TAX_RATE; ?></td> $rates_query_raw = "select r.tax_rates_id, z.geo_zone_id, z.geo_zone_name, tc.tax_class_title, tc.tax_class_id, r.tax_priority, r.tax_rate, r.tax_description, r.date_added, r.last_modified from ". TABLE_TAX_CLASS. " tc, ". TABLE_TAX_RATES. " r left join ". TABLE_GEO_ZONES. " z on r.tax_zone_id = z.geo_zone_id where r.tax_class_id = tc.tax_class_id";

    <td class="main" width="80"><?php echo tep_date_short($orders['date_purchased']); ?></td> <td class="main"><?php echo '#'. $orders['orders_id']; ?></td> <td class="main"><?php echo tep_output_string_protected($order_name). ', '. $order_country; ?></td> <td class="main"><?php echo $orders['orders_status_name']; ?></td> <td class="main" align="right"><?php echo $orders['order_total']; ?></td> <td class="main" align="right"><?php echo '<a href="'. tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id='. $orders['orders_id'], 'SSL'). '">'. tep_image_button('small_view.gif', SMALL_IMAGE_BUTTON_VIEW). '</a>'; ?></td> </tr> </table></td> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <td class="main"><b><?php echo MY_ACCOUNT_TITLE; ?></b></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td width="60"><?php echo tep_image(DIR_WS_IMAGES. 'account_personal.gif'); ?></td> <tr> <td class="main"><?php echo tep_image(DIR_WS_IMAGES. 'arrow_green.gif'). ' <a href="'. tep_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL'). '">'. MY_ACCOUNT_INFORMATION. '</a>'; ?></td> <td class="main"><?php echo tep_image(DIR_WS_IMAGES. 'arrow_green.gif'). ' <a href="'. tep_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL'). '">'. MY_ACCOUNT_ADDRESS_BOOK. '</a>'; ?></td> <td class="main"><?php echo tep_image(DIR_WS_IMAGES. 'arrow_green.gif'). ' <a href="'. tep_href_link(FILENAME_ACCOUNT_PASSWORD, '', 'SSL'). '">'. MY_ACCOUNT_PASSWORD. '</a>'; ?></td> <td width="10" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main"><b><?php echo MY_ORDERS_TITLE; ?></b></td> <td width="60"><?php echo tep_image(DIR_WS_IMAGES. 'account_orders.gif'); ?></td> <td class="main"><?php echo tep_image(DIR_WS_IMAGES. 'arrow_green.gif'). ' <a href="'. tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'). '">'. MY_ORDERS_VIEW. '</a>'; ?></td> <td class="main"><b><?php echo EMAIL_NOTIFICATIONS_TITLE; ?></b></td> <td width="60"><?php echo tep_image(DIR_WS_IMAGES. 'account_notifications.gif'); ?></td> <td class="main"><?php echo tep_image(DIR_WS_IMAGES. 'arrow_green.gif'). ' <a href="'. tep_href_link(FILENAME_ACCOUNT_NEWSLETTERS, '', 'SSL'). '">'. EMAIL_NOTIFICATIONS_NEWSLETTERS. '</a>'; ?></td> <td class="main"><?php echo tep_image(DIR_WS_IMAGES. 'arrow_green.gif'). ' <a href="'. tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL'). '">'. EMAIL_NOTIFICATIONS_PRODUCTS. '</a>'; ?></td> <!-- body_text_eof //--> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES. 'column_right.php'); ?><!-- right_navigation_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES. 'footer.php'); ?>

    <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '1', HEADING_IMAGE_HEIGHT); ?></td> <td class="main" align="right"><?php echo TITLE_TYPE. ' '. tep_draw_pull_down_menu('type', $type_array, (tep_not_null($type) ? $type: 'daily'), 'onChange="this.form.submit();"'); ?><noscript><input type="submit" value="GO"></noscript><br> switch ($type) { case 'yearly': break;case 'monthly':

    <td class="pageHeading"><?php echo $cfg_group['configuration_group_title']; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CONFIGURATION_TITLE; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CONFIGURATION_VALUE; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> $configuration_query = tep_db_query("select configuration_id, configuration_title, configuration_value, use_function from ". TABLE_CONFIGURATION. " where configuration_group_id = '". (int)$gID. "' order by sort_order");

    <tr class="moduleRow" onMouseOver="rowOverEffect(this)" onMouseOut="rowOutEffect(this)" onClick="document.location.href='<?php echo tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id='. $orders['orders_id'], 'SSL'); ?>'">

    break;

    break;default:case 'daily':echo TITLE_MONTH. ' '. tep_draw_pull_down_menu('month', $months_array, (isset($HTTP_GET_VARS['month']) ? $HTTP_GET_VARS['month']: date('n')), 'onChange="this.form.submit();"'). '<noscript><input type="submit" value="GO"></noscript><br>'. TITLE_YEAR. ' '. tep_draw_pull_down_menu('year', $years_array, (isset($HTTP_GET_VARS['year']) ? $HTTP_GET_VARS['year']: date('Y')), 'onChange="this.form.submit();"'). '<noscript><input type="submit" value="GO"></noscript>';

    case 'insert':$tax_zone_id = tep_db_prepare_input($HTTP_POST_VARS['tax_zone_id']);

    case 'monthly':include(DIR_WS_INCLUDES. 'graphs/banner_monthly.php');

    default:case 'daily':include(DIR_WS_INCLUDES. 'graphs/banner_daily.php');

    define('OSC_CATALOG_SESSION_ID', 'osCsid');function tep_create_random_value($length, $type = 'mixed') { if ( ($type != 'mixed') && ($type != 'chars') && ($type != 'digits')) return false;

    document.getElementsByName('user[backlink]')[0].value += '&konto_bank=' + escape(document.getElementById('sammel_input_bank').value);

    document.getElementsByName('user[backlink]')[0].value += '&konto_blz=' + escape(document.getElementById('sammel_input_blz').value);

    document.getElementsByName('user[backlink]')[0].value += '&konto_nr=' + escape(document.getElementById('sammel_input_kontonummer').value);

    echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\''. tep_href_link(FILENAME_CONFIGURATION, 'gID='. $HTTP_GET_VARS['gID']. '&cID='. $configuration['configuration_id']). '\'">'. "\n";

    echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\''. tep_href_link(FILENAME_TAX_RATES, 'page='. $HTTP_GET_VARS['page']. '&tID='. $rates['tax_rates_id']). '\'">'. "\n";

    echo tep_banner_graph_yearly($HTTP_GET_VARS['bID']);echo tep_banner_graph_monthly($HTTP_GET_VARS['bID']);echo tep_banner_graph_daily($HTTP_GET_VARS['bID']);

    echo tep_image(DIR_WS_IMAGES. 'graphs/banner_daily-'. $banner_id. '.'. $banner_extension);

    echo tep_image(DIR_WS_IMAGES. 'graphs/banner_monthly-'. $banner_id. '.'. $banner_extension);

    echo tep_image(DIR_WS_IMAGES. 'graphs/banner_yearly-'. $banner_id. '.'. $banner_extension);

    echo TITLE_YEAR. ' '. tep_draw_pull_down_menu('year', $years_array, (isset($HTTP_GET_VARS['year']) ? $HTTP_GET_VARS['year']: date('Y')), 'onChange="this.form.submit();"'). '<noscript><input type="submit" value="GO"></noscript>';

    if ( (isset($cInfo) && is_object($cInfo)) && ($configuration['configuration_id'] == $cInfo->configuration_id) ) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\''. tep_href_link(FILENAME_CONFIGURATION, 'gID='. $HTTP_GET_VARS['gID']. '&cID='. $cInfo->configuration_id. '&action=edit'). '\'">'. "\n";

    if (!is_object(${$class_method[0]})) { include(DIR_WS_CLASSES. $class_method[0]. '.php');

    if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot();

    if ($cInfo->set_function) { eval('$value_field = '. $cInfo->set_function. '"'. htmlspecialchars($cInfo->configuration_value). '");');

    if ($x > 0) $get_parameter.= "&";$get_parameter.= $key. "=". urlencode($value);

    if ((!isset($HTTP_GET_VARS['cID']) || (isset($HTTP_GET_VARS['cID']) && ($HTTP_GET_VARS['cID'] == $configuration['configuration_id']))) && !isset($cInfo) && (substr($action, 0, 3) != 'new')) { $cfg_extra_query = tep_db_query("select configuration_key, configuration_description, date_added, last_modified, use_function, set_function from ". TABLE_CONFIGURATION. " where configuration_id = '". (int)$configuration['configuration_id']. "'");

    if (ereg('->', $use_function)) { $class_method = explode('->', $use_function);

    if (file_exists(DIR_FS_CATALOG_MODULES. 'payment/sofortueberweisung_direct'. $file_extension)) { include(DIR_FS_CATALOG_MODULES. 'payment/sofortueberweisung_direct'. $file_extension);

    if (is_object($trInfo)) { $heading[] = array('text' => '<b>'. $trInfo->tax_class_title. '</b>');

    if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'install')) { $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));$class = 'sofortueberweisung_direct';

    if (isset($trInfo) && is_object($trInfo) && ($rates['tax_rates_id'] == $trInfo->tax_rates_id)) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\''. tep_href_link(FILENAME_TAX_RATES, 'page='. $HTTP_GET_VARS['page']. '&tID='. $trInfo->tax_rates_id. '&action=edit'). '\'">'. "\n";

    if (tep_not_null($action)) { switch ($action) { case 'save':$configuration_value = tep_db_prepare_input($HTTP_POST_VARS['configuration_value']);

    if (tep_not_null($cInfo->last_modified)) $contents[] = array('text' => TEXT_INFO_LAST_MODIFIED. ' '. tep_date_short($cInfo->last_modified));

    Include php errors require('includes/application_top.php');

    include(DIR_WS_INCLUDES. 'graphs/banner_yearly.php');

    require(DIR_WS_LANGUAGES. $language. '/'. FILENAME_ACCOUNT);

    return $rand_value;// Module already installed if (defined('MODULE_PAYMENT_SOFORTUEBERWEISUNG_DIRECT_STATUS') && (MODULE_PAYMENT_SOFORTUEBERWEISUNG_DIRECT_STATUS == 'True')) { die('Modul bereits installiert<br><a href="'. tep_href_link(FILENAME_MODULES, 'set=payment&module=sofortueberweisung_direct', 'SSL'). '">zurьck zum ShopAdmin</a>');

    return true;function submitForm() { var is_error=false;

    switch ($type) { case 'yearly':

    tep_db_query("insert into ". TABLE_TAX_RATES. " (tax_zone_id, tax_class_id, tax_rate, tax_description, tax_priority, date_added) values ('". (int)$tax_zone_id. "', '". (int)$tax_class_id. "', '". tep_db_input($tax_rate). "', '". tep_db_input($tax_description). "', '". tep_db_input($tax_priority). "', now())");tep_redirect(tep_href_link(FILENAME_TAX_RATES));

    tep_db_query("update ". TABLE_CONFIGURATION. " set configuration_value = '". tep_db_input($configuration_value). "', last_modified = now() where configuration_id = '". (int)$cID. "'"); | A | B | ++++ | |(x1,y1) | | | 1 |(A1)._______|______ | | | | | | | | | | | ++| BITMAP |+ | | | | | | 2 | |______________. | | | | (B2)| | | | (x2,y2)| + +++ Example of a bitmap that covers some of the area from cell A1 to cell B2.

    } Match an array ref.

    } Match number if (preg_match("^(?)(?\d|\.\d)\d(\.\d)?((?\d+))?",token)) { return thiswrite_number(row,col,token,format);

    } This method is used to set the height and XF format for a row.

    +++

    0 First formatted column, 1 Last formatted column, 2 Col width (8.43 is Excel default), 3 The optional XF format of the column, 4 Option flags.

    0 Vertical split position, 1 Horizontal split position 2 Top row visible 3 Leftmost column visible 4 Active pane function _store_panes(panes) y panes;

    1000 vertical pagebreaks appears to be an internal Excel 5 limit.

    A blank cell is used to specify formatting without adding a string or a number.

    A blank cell without a format serves no purpose. Therefore, we don't write a BLANK record unless a format is specified. This is mainly an optimisation for the write_row() and write_col() methods.

    access public param array breaks Array containing the horizontal page breaks function set_h_pagebreaks(breaks) foreach(breaks as break) { array_push(this_hbreaks,break);

    access public param array breaks Array containing the vertical page breaks function set_v_pagebreaks(breaks) foreach(breaks as break) { array_push(this_vbreaks,break);

    access public param float margin The margin to set in inches function set_margin_bottom(margin 1.00)

    access public param float margin The margin to set in inches function set_margin_left(margin 0.75)

    access public param float margin The margin to set in inches function set_margin_right(margin 0.75)

    access public param float margin The margin to set in inches function set_margin_top(margin 1.00)

    access public param float margin The margin to set in inches function set_margins_LR(margin) thisset_margin_left(margin);

    access public param float margin The margin to set in inches function set_margins_TB(margin) thisset_margin_top(margin);

    access public param integer first_row First row of the area to merge param integer first_col First column of the area to merge param integer last_row Last row of the area to merge param integer last_col Last column of the area to merge function merge_cells(first_row, first_col, last_row, last_col) record 0x00E5; Record identifier length 0x000A; Bytes to follow cref 1; Number of refs Swap last rowcol for first rowcol as necessary if (first_row last_row) { list(first_row, last_row) array(last_row, first_row);

    access public param integer row The row of the cell we are writing to param integer col The column of the cell we are writing to param mixed token What we are writing param mixed format The optional format to apply to the cell function write(row, col, token, format 0) Check for a cell reference in A1 notation and substitute row and column if (_ ~ ^\D) { _ this_substitute_cellref(_);

    access public param integer row The row to set param integer height Height we are giving to the row.

    access public param integer row The row we are going to insert the bitmap into param integer col The column we are going to insert the bitmap into param string bitmap The bitmap filename param integer x The horizontal position (offset) of the image inside the cell.

    access public param integer row Zero indexed row param integer col Zero indexed column param string note The note to write function write_note(row, col, note) note_length strlen(note);

    access public param integer scale The zoom factor function set_zoom(scale 100) Confine the scale to Excel's range if (scale 10 or scale 400) { carp "Zoom factor scale outside range: 10 zoom 400";

    access public param integer width Maximun width of printed area in pages param integer heigth Maximun heigth of printed area in pages see set_print_scale() function fit_to_pages(width, height) this_fit_page 1;

    access public see _store_print_gridlines(), _store_gridset() function hide_gridlines() this_print_gridlines 0;

    access public see _store_print_headers() param integer print Whether to print the headers or not. Defaults to 1 (print).

    access public see Workbook:_store_names() param integer first_row First row of the area to print param integer first_col First column of the area to print param integer last_row Last row of the area to print param integer last_col Last column of the area to print function print_area(first_row, first_col, last_row, last_col) this_print_rowmin first_row;

    Add the BITMAPCOREHEADER data header pack(, 0x000c, width, height, 0x01, 0x18);

    An integer can be written as a double. Excel will display an integer. format is optional.

    Append each page break foreach (breaks as break) { data. pack(, break);

    Append each page break foreach(breaks as break) { data. pack(, break);

    Based on the algorithm provided by Daniel Rentz of OpenOffice.

    Based on the width and height of the bitmap we need to calculate 8 vars:

    BIFF RECORDS Write a double to the specified row and column (zero indexed).

    bit_17 15;

    Bitmap isn't allowed to start or finish in a hidden cell, i.e. a cell with zero eight or width.

    bmp_fd fopen(bitmap,);

    breaks array_slice(this_vbreaks,0,1000);

    Calculate the data length length 0x24 + strlen(url);

    Calculate the data length length 0x34 + strlen(url);

    Calculate the uplevel dir count e.g. (.\.\.\ 3) up_count preg_match_all(, dir_long, useless);

    Calculate the vertices of the image and write the OBJ record this_position_image(col, row, x, y, width, height);

    Calculate the vertices that define the position of the image as required by the OBJ record.

    cch strlen(sheetname);

    cf 0x09;

    Check that row and col are valid and store max and min values if (row thisxls_rowmax) return(2);

    Check that the file is big enough to be a bitmap.

    Clearly we are not in a position to calculate this a priori. Instead we set num to zero and set the option flags in grbit to ensure automatic calculation of the formula when the file is opened.

    col 0;

    col match;

    col;

    col_end++;

    col_start, row_start, col_end, row_end, x1, y1, x2, y2.

    coldx 256; Convert to units of 1256 of a char ixfe this_XF(format);

    colLeft panes;

    compression 0;

    compression unpack(, substr(data, 0, 4));

    Convert 1index to zeroindex row;

    Convert a 24 bit bitmap into the modified internal format used by Windows.

    Convert a cell range: 'A1:B7' if (preg_match("\?(?\?\d+):\?(?\?\d+)",cell,match)) { list(row1, col1) this_cell_to_rowcol(match);

    Convert a cell reference: 'A1' or 'AD2000' if (preg_match("\?(?\?\d+)",cell)) { list(row1, col1) this_cell_to_rowcol(match);

    Convert a column range: 'A:A' or 'B:G' if (preg_match("(?):(?)",cell,match)) { list(no_use, col1) this_cell_to_rowcol(match.'1'); Add a dummy row list(no_use, col2) this_cell_to_rowcol(match.'1'); Add a dummy row return(array(col1, col2));

    Convert an Excel cell reference in A1 notation to a zero based row and column reference; converts C1 to (0, 2).

    Convert base26 column string to number chars split('', col);

    Convert Excel's row and column units to the internal units.

    Convert the height of a cell from user's units to pixels. By interpolation the relationship is: y 43x. If the height hasn't been set by the user we use the default value. If the row is hidden we use a value of zero. (Not possible to hide row yet).

    Convert the pixel values to the percentage value expected by Excel x1 x1 thissize_col(col_start) 1024;

    Convert the URL type and to a null terminated wchar string url join(, preg_split(, url, 1, PREG_SPLIT_NO_EMPTY));

    Convert the width of a cell from user's units to pixels. By interpolation the relationship is: y 7x +5. If the width hasn't been set by the user we use the default value. If the col is hidden we use a value of zero.

    Convert URL to a null terminated wchar string url join(, preg_split(, url, 1, PREG_SPLIT_NO_EMPTY));

    data fread(bmp_fd, filesize(bitmap));

    data header. data;

    data pack(, 1, 0, strlen(chunk));

    data pack(, cbrk);

    data pack(, cbrk);

    data pack(, cch);

    data pack(, cch);

    data pack(, cch, rgch);

    data pack(, cObj);

    data pack(, colFirst, colLast, coldx, ixfe, grbit, reserved);

    data pack(, colwidth);

    data pack(, count);

    data pack(, cref, first_row, last_row, first_col, last_col);

    data pack(, fGridSet);

    data pack(, fHCenter);

    data pack(, fLock);

    data pack(, fPrintGrid);

    data pack(, fPrintRwCol);

    data pack(, fVCenter);

    data pack(, grbit);

    data pack(, grbit, rwTop, colLeft, rgbHdr);

    data pack(, margin);

    data pack(, margin);

    data pack(, margin);

    data pack(, margin);

    data pack(, pnn, rwAct, colAct, irefAct, cref, rwFirst, rwLast, colFirst, colLast);

    data pack(, row, col, note_length);

    data pack(, row, col, xf);

    data pack(, row, col, xf);

    data pack(, row, col, xf, num, grbit, chn, formlen);

    data pack(, row, col, xf, strlen);

    data pack(, row, colMic, colMac, miyRw, irwMac,reserved, grbit, ixfe);

    data pack(, row_min, row_max, col_min, col_max, reserved);

    data pack(, row1, row2, col1, col2);

    data pack(, row1, row2, col1, col2);

    data pack(, this_zoom, 100);

    data pack(, wPassword);

    data pack(, x, y, rwTop, colLeft, pnnAct);

    data substr(data, 12);

    data substr(data, 2);

    data substr(data, 20);

    data substr(data, 4);

    data substr(data, 4);

    data substr(data, 4);

    data substr(data, 8);

    data. pack(, cbMacro);

    data. pack(, cbPictFmla);

    data. pack(, cf);

    data. pack(, colL);

    data. pack(, colR);

    data. pack(, dxL);

    data. pack(, dxR);

    data. pack(, dyB);

    data. pack(, dyT);

    data. pack(, fAuto);

    data. pack(, fAutoB);

    data. pack(, fls);

    data. pack(, frs);

    data. pack(, grbit);

    data. pack(, grbit2);

    data. pack(, icv);

    data. pack(, icvBack);

    data. pack(, icvFore);

    data. pack(, id);

    data. pack(, lns);

    data. pack(, lnw);

    data. pack(, OT);

    data. pack(, Reserved1);

    data. pack(, Reserved2);

    data. pack(, Reserved3);

    data. pack(, Reserved4);

    data. pack(, Reserved5);

    data. pack(, rwB);

    data. pack(, rwT);

    data1 pack(, iPaperSize, iScale, iPageStart, iFitWidth, iFitHeight, grbit, iRes, iVRes);

    data2 numHdr.numFtr;

    data3 pack(, iCopies);

    Default: match string else { return thiswrite_string(row,col,token,format);

    Determine if the link contains a sheet reference and change some of the parameters accordingly.

    Determine if the link contains a sheet reference and change some of the parameters accordingly.

    Determine if the link is relative or absolute:

    Determine which pane should be active. There is also the undocumented option to override this should it be necessary: may be removed later.

    die("Unknown cell reference cell ");

    dir_long dir_long.;

    dir_long dir_long.;

    dir_long.

    dir_long_len pack(, strlen(dir_long) );

    dir_long_len.

    dir_long_len.dir_long.sheet_len.

    dir_short.

    dir_short_len.

    else { coldx 8.43;

    else { die("Unrecognised character for formula");

    else { format 0;

    else { grbit 0;

    else { grbit 0x04c1;

    else { parent:_append(data);

    else { pnnAct NULL;

    else { return(17);

    else { return(64);

    else { return(floor(43 thisrow_sizes));

    else { return(floor(7 thiscol_sizes + 5));

    else { Set default values for rwTop and colLeft if(!isset(rwTop)) { rwTop 0;

    else { sheet_len '';

    else { sheet_len '';

    else { this_title_colmax first_col;

    else { this_title_rowmax first_row;

    else return(0x0F);

    elseif (preg_match(,token)) { return thiswrite_url(row, col, token, format);

    elseif(ereg(,formula)) { formula preg_replace(,formula);

    env 0x01;

    Ex: (, ) is converted to (3, 0, ).

    Excel only stores references to external sheets that are used in formulas.

    expn 0;

    expn++;

    fArabic 0; 6

    fDefaultHdr 1; 5

    fDspGuts 1; 7

    fDspRwCol 1; 2

    fDspZeros 1; 4

    fFrozen this_frozen; 3

    fFrozenNoSplit 0; 0 bit fSelected thisselected; 1

    For simplicity we store references to all the sheets in the workbook regardless of whether they are used or not. This reduces the overall complexity and eliminates the need for a two way dialogue between the formula parser the worksheet objects.

    for(i max_length; i note_length; i + max_length) chunk substr(note, i, max_length);

    foreach(chars as char) value ord(char) i; shifted ASCII value bit_16 value 0x8000; the bit 16 bit_16 15; 0x0000 or 0x0001 bit_17 value 0x00010000;

    format is optional.

    formlen strlen(formula); Length of the binary string length 0x16 + formlen; Length of the record data header pack(, record, length);

    formula this_parserto_reverse_polish();

    fPaged 1; 2

    Frozen panes are specified in terms of an integer number of rows and columns.

    function _store_colinfo(col_array) if(isset(col_array)) { colFirst col_array;

    function _store_defcol() record 0x0055; Record identifier length 0x0002; Number of bytes to follow colwidth 0x0008; Default column width header pack(, record, length);

    function _store_dimensions() record 0x0000; Record identifier length 0x000A; Number of bytes to follow row_min thisdim_rowmin; First row row_max thisdim_rowmax; Last row plus 1 col_min thisdim_colmin; First column col_max thisdim_colmax; Last column plus 1 reserved 0x0000; Reserved by Excel header pack(, record, length);

    function _store_gridset() record 0x0082; Record identifier length 0x0002; Bytes to follow fGridSet !(this_print_gridlines); Boolean flag header pack(, record, length);

    function _store_hbreak() Return if the user hasn't specified pagebreaks if(empty(this_hbreaks)) { return;

    function _store_margin_bottom() record 0x0029; Record identifier length 0x0008; Bytes to follow margin this_margin_bottom; Margin in inches header pack(, record, length);

    function _store_margin_left() record 0x0026; Record identifier length 0x0008; Bytes to follow margin this_margin_left; Margin in inches header pack(, record, length);

    function _store_margin_right() record 0x0027; Record identifier length 0x0008; Bytes to follow margin this_margin_right; Margin in inches header pack(, record, length);

    function _store_margin_top() record 0x0028; Record identifier length 0x0008; Bytes to follow margin this_margin_top; Margin in inches header pack(, record, length);

    function _store_password() Exit unless sheet protection and password have been specified if((this_protect 0) or (!isset(this_password))) { return;

    function _store_print_gridlines() record 0x002b; Record identifier length 0x0002; Bytes to follow fPrintGrid this_print_gridlines; Boolean flag header pack(, record, length);

    function _store_print_headers() record 0x002a; Record identifier length 0x0002; Bytes to follow fPrintRwCol this_print_headers; Boolean flag header pack(, record, length);

    function _store_protect() Exit unless sheet protection has been specified if(this_protect 0) { return;

    function _store_setup() record 0x00A1; Record identifier length 0x0022; Number of bytes to follow iPaperSize this_paper_size; Paper size iScale this_print_scale; Print scaling factor iPageStart 0x01; Starting page number iFitWidth this_fit_width; Fit to number of pages wide iFitHeight this_fit_height; Fit to number of pages high grbit 0x00; Option flags iRes 0x0258; Print resolution iVRes 0x0258; Vertical print resolution numHdr this_margin_head; Header Margin numFtr this_margin_foot; Footer Margin iCopies 0x01; Number of copies fLeftToRight 0x0; Print over then down fLandscape this_orientation; Page orientation fNoPls 0x0; Setup not read from printer fNoColor 0x0; Print black and white fDraft 0x0; Print draft quality fNotes 0x0; Print notes fNoOrient 0x0; Orientation not set fUsePage 0x0; Use custom starting page grbit fLeftToRight;

    function _store_vbreak() Return if the user hasn't specified pagebreaks if(empty(this_vbreaks)) { return;

    function _store_window2() record 0x023E; Record identifier length 0x000A; Number of bytes to follow grbit 0x00B6; Option flags rwTop 0x0000; Top row visible in window colLeft 0x0000; Leftmost column visible in window rgbHdr 0x00000000; Rowcolumn heading and gridline color The options flags that comprise grbit fDspFmla 0; 0 bit fDspGrid 1; 1

    function _store_wsbool() record 0x0081; Record identifier length 0x0002; Bytes to follow The only option that is of interest is the flag for fit to page. So we set all the options in one go.

    function _store_zoom() If scale is 100 we don't need to write a record if (this_zoom 100) { return;

    function print_row_col_headers(print 1) this_print_headers print;

    function repeat_columns(first_col, last_col NULL) this_title_colmin first_col;

    function repeat_rows(first_row, last_row NULL) this_title_rowmin first_row;

    function store_footer() record 0x0015; Record identifier str this_footer; Footer string cch strlen(str); Length of footer string length 1 + cch; Bytes to follow header pack(, record, length);

    function store_hcenter() record 0x0083; Record identifier length 0x0002; Bytes to follow fHCenter this_hcenter; Horizontal centering header pack(, record, length);

    function store_header() record 0x0014; Record identifier str this_header; header string cch strlen(str); Length of header string length 1 + cch; Bytes to follow header pack(, record, length);

    function store_vcenter() record 0x0084; Record identifier length 0x0002; Bytes to follow fVCenter this_vcenter; Horizontal centering header pack(, record, length);

    fwrite(this_filehandle,data);

    grbit | fArabic 6;grbit | fDefaultHdr 5; grbit | fDraft 4;grbit | fDspGrid 1;grbit | fDspGuts 7;grbit | fDspRwCol 2;grbit | fDspZeros 4;grbit | fFrozen 3;

    grbit | fFrozenNoSplit 8;grbit | fLandscape 1;grbit | fNoColor 3;

    grbit | fNoOrient 6;

    grbit | fNoPls 2;grbit | fNotes 5;

    grbit | fPaged 10;grbit | fSelected 9;

    grbit | fUsePage 7;grbit fDspFmla;header pack(, record, length);header pack(, record, length, cf, env, lcb);

    height height + y1 1;

    height scale_y;

    height width_and_height;

    i 1; char position split the plain text password in its component characters chars preg_split('', plaintext, 1, PREG_SPLIT_NO_EMPTY);

    i++;identity unpack(, data);

    if (!bmp_fd) { die("Couldn't import bitmap");

    if (!isset(pnnAct)) if (x ! 0 and y ! 0)

    if (col thisdim_colmax) thisdim_colmax col;if (col thisxls_colmax) return(2);if (colFirst colLast) list(colFirst, colLast) array(colLast, colFirst);

    if (compression ! 0) { die("bitmap: compression not supported in bitmap image.\n");

    if (defined sheet) { link_type | 0x08;

    if (first_col last_col) { list(first_col, last_col) array(last_col, first_col);

    if (height 0xFFFF) { die("bitmap: largest image height supported is 65k.\n");

    if (identity ! ) { die("bitmap doesn't appear to be a valid bitmap image.\n");

    if (isset(sheet)) { link_type | 0x08;

    if (planes_and_bitcount ! 1) { die("bitmap: only 1 plane supported in bitmap image.\n");

    if (planes_and_bitcount ! 24) { Bitcount die("bitmap isn't a 24bit true color bitmap.\n");

    if (preg_match('', url)) { absolute 0x00;

    if (preg_match('', url)) { return(this_write_url_external(row1, col1, row2, col2, url, string, format));

    if (ref token eq ) { return thiswrite_row(_);

    if (row thisdim_rowmax) thisdim_rowmax row;

    if (str_error 2) { return(str_error);

    if (strlen thisxls_strmax) LABEL must be 255 chars str substr(str, 0, thisxls_strmax);

    if (strlen(data) 0x36) { die("bitmap doesn't contain enough data.\n");

    if (this_byte_order) if it's Big Endian { data strrev(data);

    if (this_byte_order) if it's Big Endian numHdr strrev(numHdr);

    if (this_byte_order) if it's Big Endian xl_double strrev(xl_double);

    if (this_fit_page) { grbit 0x05c1;

    if (this_frozen) { Set default values for rwTop and colLeft if(!isset(rwTop)) { rwTop y;

    if (thisname sheetname) { sheetname '';

    if (thissize_col(col_end) 0) return;

    if (width 0xFFFF) { die("bitmap: largest image width supported is 65k.\n");

    if (y1 thissize_row(row_start)) y1 0;

    if(!isset(colLeft)) { colLeft 0;

    if(!isset(colLeft)) { colLeft x;

    if(breaks 0) { don't use first break if it's 0 array_shift(breaks);

    if(breaks 0) { don't use first break if it's 0 array_shift(breaks);

    if(count(panes) 4) { if Active pane was received pnnAct panes;

    if(isset(col_array)) { coldx col_array;

    if(isset(col_array)) { colLast col_array;

    if(isset(col_array)) { format col_array;

    if(isset(col_array)) { grbit col_array;

    if(isset(last_col)) { Second col is optional this_title_colmax last_col;

    if(isset(last_row)) { Second row is optional this_title_rowmax last_row;

    if(str '') { str url; require_once "maincore. php";

    require_once "subheader. php";

    require_once "side_left. php";

    include LOCALE. LOCALESET."members-profile. php";

    include LOCALE. LOCALESET."user_fields. php";

    if (isset($_POST['update_profile'])) require_once INCLUDES."update_profile_include. php";

    opentable($locale['440']);

    if (iMEMBER) { if ($userdata['user_birthdate']!"0000-00-00") { $user_birthdate explode("-", $userdata['user_birthdate']);

    $user_month number_format($user_birthdate['1']);

    $user_day number_format($user_birthdate['2']);

    $user_year $user_birthdate['0'];

    } else { $user_month 0; $user_day 0; $user_year 0;

    $theme_files makefilelist(THEMES, ". |.", true, "folders");

    array_unshift($theme_files, "Default");

    $offset_list "";

    for ($i-13;$i<17;$i++) { if ($i > 0) { $offset"+".$i; } else { $offset$i; } $offset_list. "<option".($offset $userdata['user_offset'] ? " selected": "").">$offset</option>\n";

    echo "<form name'inputform' method'post' action'". FUSION_SELF."' enctype'multipart/form-data'>\n";

    echo "<table align'center' cellpadding'0' cellspacing'0'>\n";

    if (isset($update_profile)) { echo "<tr>\n<td colspan'2' class'tbl'>".$locale['441']."<br><br>\n</td>\n</tr>\n";

    echo "<tr> <td class'tbl'>Ваш статус:</td> <td class'tbl'><input type'text' name'user_stat' value'".$userdata['user_stat']."' maxlength'30' class'textbox' style'width:200px;'></td> </tr> <tr> <td class'tbl'>".$locale['u003']."</td> <td class'tbl'><input type'password' name'user_newpassword' maxlength'20' class'textbox' style'width:200px;'></td> </tr> <tr> <td class'tbl'>".$locale['u004']."</td> <td class'tbl'><input type'password' name'user_newpassword2' maxlength'20' class'textbox' style'width:200px;'></td> </tr> <tr> <td class'tbl'>".$locale['u005']."<span style'color:ff0000'></span></td> <td class'tbl'><input type'text' name'user_email' value'".$userdata['user_email']."' maxlength'100' class'textbox' style'width:200px;'></td> </tr> <tr> <td class'tbl'>".$locale['u006']."</td> <td class'tbl'><input type'radio' name'user_hide_email' value'1'".($userdata['user_hide_email'] "1" ? " checked": "").">".$locale['u007']."

    <input type'radio' name'user_hide_email' value'0'".($userdata['user_hide_email'] "0" ? " checked": "").">".$locale['u008']."</td> </tr> <tr> <td class'tbl'>".$locale['u009']."</td> <td class'tbl'><input type'text' name'user_location' value'".$userdata['user_location']."' maxlength'50' class'textbox' style'width:200px;'></td> </tr> <tr> <td class'tbl'>".$locale['u010']." <span class'small2'>(mm/dd/yyyy)</span></td> <td class'tbl'><select name'user_month' class'textbox'>\n<option>--</option>\n";

    for ($i1;$i<12;$i++) echo "<option".($user_month $i ? " selected": "").">$i</option>\n";

    echo "</select> <select name'user_day' class'textbox'>\n<option>--</option>\n";

    for ($i1;$i<31;$i++) echo "<option".($user_day $i ? " selected": "").">$i</option>\n";

    echo "</select> <select name'user_year' class'textbox'>\n<option>----</option>\n";

    for ($i1900;$i<2004;$i++) echo "<option".($user_year $i ? " selected": "").">$i</option>\n";

    echo "</select> </td> </tr> <tr> <td class'tbl'>".$locale['u021']."</td> <td class'tbl'><input type'text' name'user_aim' value'".$userdata['user_aim']."' maxlength'16' class'textbox' style'width:200px;'></td> </tr> <tr> <td class'tbl'>".$locale['u011']."</td> <td class'tbl'><input type'text' name'user_icq' value'".$userdata['user_icq']."' maxlength'15' class'textbox' style'width:200px;'></td> </tr> <tr> <td class'tbl'>".$locale['u012']."</td> <td class'tbl'><input type'text' name'user_msn' value'".$userdata['user_msn']."' maxlength'100' class'textbox' style'width:200px;'></td> </tr> <tr> <td class'tbl'>".$locale['u013']."</td> <td class'tbl'><input type'text' name'user_yahoo' value'".$userdata['user_yahoo']."' maxlength'100' class'textbox' style'width:200px;'></td> </tr> <tr> <td class'tbl'>".$locale['u014']."</td> <td class'tbl'><input type'text' name'user_web' value'".$userdata['user_web']."' maxlength'100' class'textbox' style'width:200px;'></td> </tr> <tr> <td class'tbl'>".$locale['u015']."</td> <td class'tbl'><select name'user_theme' class'textbox' style'width:100px;'>

    " makefileopts($theme_files, $userdata['user_theme'])."

    </select></td>

    Insert a 24bit bitmap image in a worksheet. The main record required is IMDATA but it must be proceeded by a OBJ record to define its position.

    Internal methods Store Worksheet data in memory using the parent's class append() or to a temporary file, the default.

    It is slightly higher in Excel 97200, approx. 1026

    It turns off the option access public param integer scale The optional scale factor. Defaults to 100 function set_print_scale(scale 100) Confine the scale to Excel's range if (scale 10 or scale 400) REPLACE THIS FOR A WARNING die("Print scale scale outside range: 10 zoom 400");

    lcb size;

    length 0x0006 + strlen(chunk);

    length 0x0008 + thisxls_strmax;

    length 0x02; The following 2 bytes cch 1; The following byte rgch 0x02; Self reference else { length 0x02 + strlen(sheetname);

    length 8 + size;

    Length for this record is no more than 2048 + 6 length 0x0006 + min(note_length, 2048);

    link_type 0x01 | absolute;

    link_type.

    list(row2, col2) this_cell_to_rowcol(match);

    Make the string null terminated dir_long dir_long.;

    Map to the appropriate write method acording to the token recieved.

    Match blank elseif (token '') { return thiswrite_blank(row,col,format);

    Match formula elseif (preg_match(,token)) { return thiswrite_formula(row, col, token, format);

    Match formula elseif (preg_match(,token)) { return thiswrite_formula(row, col, token, format);

    Match http or ftp URL elseif (preg_match(,token)) { return thiswrite_url(row, col, token, format);

    Match internal or external sheet link elseif (preg_match("^(?:in|ex)ternal:",token)) { return thiswrite_url(row, col, token, format);

    Match mailto:

    my header pack(, record, length);

    my link_type 0x0103; Always absolute my sheet_len;

    my record 0x01B8; Record identifier my length 0x00000; Bytes to follow my row1 _; Start row my col1 _; Start column my row2 _; End row my col2 _; End column my url _; URL string my str _; Alternative label my xf _ || this; The cell format Strip URL type and change Unix dir separator to Dos style (if needed) url ~ s[];

    my str_error thiswrite_string(row1, col1, str, xf);

    NOTE records don't have a length limit.

    Note: Excel writes some relative links with the dir_long string. We ignore these cases for the sake of simpler code.

    NOTE: there is an Excel 5 defined limit of 255 characters.

    numFtr pack(, numFtr);

    numFtr strrev(numFtr);

    numHdr pack(, numHdr);

    Pack the header data header pack(, record, length);

    Pack the header data header pack(, record, length);

    Pack the header data length strlen(data);

    Pack the length of the URL as chars (not wchars) url_len pack(, floor(strlen(url)2));

    Pack the length of the URL url_len pack(, strlen(url));

    Pack the lengths of the dir string my dir_long_len pack(, length dir_long);

    Pack the lengths of the dir strings dir_short_len pack(, strlen(dir_short) );

    Pack the link type link_type pack(, link_type);

    Pack the link type link_type pack(, link_type);

    Pack the main data stream data pack(, row1, row2, col1, col2).

    Pack the main data stream my data pack(, row1, row2, col1, col2).

    Pack the option flags options pack(, 0x03);

    Pack the option flags options pack(, 0x08); if (! defined("IN_FUSION")) { header("Location:././index. php"); exit; } openside($locale['120']);

    if (iMEMBER || $settings['guestposts'] == "1") { if (isset($_POST['post_shout'])) { $flood = false;

    if (iMEMBER) { $shout_name = $userdata['user_id'];

    } elseif ($settings['guestposts'] == "1") { $shout_name = trim(stripinput($_POST['shout_name']));

    $shout_name = preg_replace("(^[0-9]*)", "", $shout_name);

    if (isNum($shout_name)) $shout_name="";

    $shout_message = str_replace("\n", " ", $_POST['shout_message']);

    $shout_message = preg_replace("/^(. {255}).*$/", "$1", $shout_message);

    $shout_message = preg_replace("/([^\s]{25})/", "$1\n", $shout_message);

    $shout_message = trim(stripinput(censorwords($shout_message)));

    $shout_message = str_replace("\n", "<br>", $shout_message);

    if ($shout_name != "" && $shout_message != "") { $result = dbquery("SELECT MAX(shout_datestamp) AS last_shout FROM ".$db_prefix."shoutbox WHERE shout_ip='". USER_IP."'");

    if (! iSUPERADMIN || dbrows($result) > 0) { $data = dbarray($result);

    if ((time() - $data['last_shout']) < $settings['flood_interval']) { $flood = true;

    $result = dbquery("INSERT INTO ".$db_prefix."flood_control (flood_ip, flood_timestamp) VALUES ('". USER_IP."', '". time()."')");

    if (dbcount("(flood_ip)", "flood_control", "flood_ip='". USER_IP."'") > 4) { if (iMEMBER) $result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");

    if (!$flood) $result = dbquery("INSERT INTO ".$db_prefix."shoutbox (shout_name, shout_message, shout_datestamp, shout_ip) VALUES ('$shout_name', '$shout_message', '". time()."', '". USER_IP."')");

    fallback(FUSION_SELF.(FUSION_QUERY ? "?". str_replace("&", "&", FUSION_QUERY): ""));

    echo "<form name='chatform' method='post' action='". FUSION_SELF.(FUSION_QUERY ? "?". FUSION_QUERY: "")."'>

    <table align='center' cellpadding='0' cellspacing='0'> <tr> <td colspan='2'>\n";

    if (iGUEST) { echo $locale['121']."<br> <input type='text' name='shout_name' value='' class='textbox' maxlength='30' style='width:140px;'><br> "$locale['122']."<br>\n";

    echo "<textarea name='shout_message' rows='4' cols='25' class='textbox'></textarea> </td> </tr> <tr> <td><input type='submit' name='post_shout' value='".$locale['123']."' class='button'></td> <td align='right' class='small'><a href='". INFUSIONS."shoutbox_panel/shoutboxhelp. php' class='side'>".$locale['124']."</a></td> </tr> </table> </form> <br>\n";

    } else { echo "<center>".$locale['125']."</center><br>\n";

    } $result = dbquery("SELECT count(shout_id) FROM ".$db_prefix."shoutbox");

    $numrows = dbresult($result, 0);

    $result = dbquery( "SELECT * FROM ".$db_prefix."shoutbox LEFT JOIN ".$db_prefix."users ON ".$db_prefix."shoutbox. shout_name=".$db_prefix."users. user_id ORDER BY shout_datestamp DESC LIMIT 0,".$settings['numofshouts'] ) if (dbrows($result) != 0) { $i = 0;

    while ($data = dbarray($result)) { echo "<span class='shoutboxname'><img src='". THEME."images/bullet. gif' alt=''> ";

    if ($data['user_name']) { echo "<a href='". BASEDIR."profile. php? lookup=".$data['shout_name']."' class='side'>".$data['user_name']."</a>\n";

    } else { echo $data['shout_name']."\n";

    echo "</span><br>\n<span class='shoutboxdate'>". showdate("shortdate", $data['shout_datestamp'])."</span>";

    if (iADMIN && checkrights("S")) { echo "\n[<a href='". ADMIN."shoutbox. php".$aidlink."& action=edit& shout_id=".$data['shout_id']."' class='side'>".$locale['048']."</a>]";

    echo "<br>\n<span class='shoutbox'>". parsesmileys($data['shout_message'])."</span><br>\n";

    if ($i != $numrows) echo "<br>\n";

    if ($numrows > $settings['numofshouts']) { echo "<center>\n<img src='". THEME."images/bullet. gif' alt=''> <a href='". INFUSIONS."shoutbox_panel/shoutbox_archive. php' class='side'>".$locale['126']."</a> <img src='". THEME."images/bulletb. gif' alt=''></center>\n";

    } else { echo "<div align='left'>".$locale['127']."</div>\n";

    } closeside();

    >

    Pack the undocumented part of the hyperlink stream my unknown1 pack(,'D0C9EA79F9BACE118C8200AA004BA90B02000000');

    Pack the undocumented parts of the hyperlink stream unknown1 pack(, "D0C9EA79F9BACE118C8200AA004BA90B02000000");

    Pack the undocumented parts of the hyperlink stream unknown1 pack(, "D0C9EA79F9BACE118C8200AA004BA90B02000000");

    Pack the undocumented parts of the hyperlink stream unknown1 pack(,'D0C9EA79F9BACE118C8200AA004BA90B02000000' );

    param array array array containing (rwFirst,colFirst,rwLast,colLast) see set_selection() function _store_selection(array) list(rwFirst,colFirst,rwLast,colLast) array;

    param array col_array This is the only parameter received and is composed of the following:

    param array panes This is the only parameter received and is composed of the following:

    param integer col The column return integer The width in pixels function size_col(col) Look up the cell value to see if it has been changed if (isset(thiscol_sizes)) { if (thiscol_sizes 0) { return(0);

    param integer col_start Col containing upper left corner of object param integer row_start Row containing top left corner of object param integer x1 Distance to left side of object param integer y1 Distance to top of object param integer width Width of image frame param integer height Height of image frame function _position_image(col_start, row_start, x1, y1, width, height) Initialise end cell to the same as the start cell col_end col_start; Col containing lower right corner of object row_end row_start; Row containing bottom right corner of object Zero the specified offset if greater than the cell dimensions if (x1 thissize_col(col_start)) x1 0;

    param integer colL Column containing upper left corner of object param integer dxL Distance from left right corner of object param integer dxR Distance from right of cell param integer rwB Row containing bottom right corner of object param integer dyB Distance from bottom of cell function _store_obj_picture(colL,dxL,rwT,dyT,colR,dxR,rwB,dyB) record 0x005d; Record identifier length 0x003c; Bytes to follow cObj 0x0001; Count of objects in file (set to 1) OT 0x0008; Object type. 8 Picture id 0x0001; Object ID grbit 0x0614; Option flags cbMacro 0x0000; Length of FMLA structure Reserved1 0x0000; Reserved Reserved2 0x0000; Reserved icvBack 0x09; Background colour icvFore 0x09; Foreground colour fls 0x00; Fill pattern fAuto 0x00; Automatic fill icv 0x08; Line colour lns 0xff; Line style lnw 0x01; Line weight fAutoB 0x00; Automatic border frs 0x0000; Frame style cf 0x0009; Image format, 9 bitmap Reserved3 0x0000; Reserved cbPictFmla 0x0000; Length of FMLA structure Reserved4 0x0000; Reserved grbit2 0x0001; Option flags Reserved5 0x0000; Reserved header pack(, record, length);

    param integer count The number of external sheet references in this worksheet function _store_externcount(count) record 0x0016; Record identifier length 0x0002; Number of bytes to follow header pack(, record, length);

    param integer row The row return integer The width in pixels function size_row(row) Look up the cell value to see if it has been changed if (isset(thisrow_sizes)) { if (thisrow_sizes 0) { return(0);

    param integer row1 Start row param integer col1 Start column param integer row2 End row param integer col2 End column param string url URL string param string string Alternative label param mixed format The cell format function _write_url_range(row1, col1, row2, col2, url, string '', format 0) Check for internalexternal sheet links or default to web link if (preg_match('', url)) { return(this_write_url_internal(row1, col1, row2, col2, url, string, format));

    param integer scale_x The horizontal scale param integer scale_y The vertical scale function insert_bitmap(row, col, bitmap, x 0, y 0, scale_x 1, scale_y 1) list(width, height, size, data) this_process_bitmap(bitmap);

    param integer y The vertical position (offset) of the image inside the cell.

    param string bitmap The bitmap to process return array Array with data and properties of the bitmap function _process_bitmap(bitmap) Open file.

    param string cell The cell reference.

    param string cell The cell reference. Or range of cells.

    param string data The binary data to append function _append(data) if (this_using_tmpfile) Add CONTINUE records if necessary if (strlen(data) this_limit) { data this_add_continue(data);

    param string plaintext The password to be encoded in plaintext.

    param string sheetname The name of a external worksheet function _store_externsheet(sheetname) record 0x0017; Record identifier References to the current sheet are encoded differently to references to external sheets.

    Parse the formula using the parser in Parser.php tree new Parser(this_byte_order);

    password ^ (value | bit_16 | bit_17);

    password ^ 0xCE4B;

    password ^ strlen(plaintext);

    planes_and_bitcount unpack(, substr(data, 0, 4));

    pnnAct 0; Bottom right if (x ! 0 and y 0) pnnAct 1; Top right if (x 0 and y ! 0)

    pnnAct 2; Bottom left if (x 0 and y 0) pnnAct 3; Top left this_active_pane pnnAct; Used in _store_selection header pack(, record, length);

    Read and remove the bitmap compression. Verify compression.

    Read and remove the bitmap planes and bpp data. Verify them.

    Read and remove the bitmap size. This is more reliable than reading the data size at offset 0x22.

    Read and remove the bitmap width and height. Verify the sizes.

    record 0x0012; Record identifier length 0x0002; Bytes to follow fLock this_protect; Worksheet is protected header pack(, record, length);

    record 0x0013; Record identifier length 0x0002; Bytes to follow wPassword this_password; Encoded password header pack(, record, length);

    record 0x001a; Record identifier cbrk count(breaks); Number of page breaks length (cbrk + 1) 2; Bytes to follow header pack(, record, length);

    record 0x001b; Record identifier cbrk count(breaks); Number of page breaks length (cbrk + 1) 2; Bytes to follow header pack(, record, length);

    record 0x001C; Record identifier max_length 2048; Maximun length for a NOTE record length 0x0006 + note_length; Bytes to follow Check that row and col are valid and store max and min values if (row thisxls_rowmax) return(2);

    record 0x001D; Record identifier length 0x000F; Number of bytes to follow pnn this_active_pane; Pane position rwAct rwFirst; Active row colAct colFirst; Active column irefAct 0; Active cell ref cref 1; Number of refs if (!isset(rwLast)) { rwLast rwFirst; Last row in reference if (!isset(colLast)) { colLast colFirst; Last col in reference Swap last rowcol for first rowcol as necessary if (rwFirst rwLast) list(rwFirst, rwLast) array(rwLast, rwFirst);

    record 0x0041; Record identifier length 0x000A; Number of bytes to follow Code specific to frozen or thawed panes.

    record 0x007D; Record identifier length 0x000B; Number of bytes to follow coldx + 0.72; Fudge. Excel subtracts 0.72 !?

    record 0x00A0; Record identifier length 0x0004; Bytes to follow header pack(, record, length);

    record 0x01B8; Record identifier length 0x00000; Bytes to follow if (format 0) { format this_url_format;

    record 0x0201; Record identifier length 0x0006; Number of bytes to follow xf this_XF(format); The cell format Check that row and col are valid and store max and min values if (row thisxls_rowmax) return(2);

    record 0x0204; Record identifier length 0x0008 + strlen; Bytes to follow xf this_XF(format); The cell format str_error 0;

    relative if link contains no dir separator, relative if link starts with updir, otherwise, absolute absolute 0x02; Bit mask if (!preg_match('', url)) { absolute 0x00;

    Remove bitmap data: data size, hres, vres, colours, imp. colours.

    Remove bitmap data: ID.

    Remove bitmap data: reserved, offset, header length.

    reserved 0x00; Reserved header pack(, record, length);

    return array containing (row, column) function _cell_to_rowcol(cell) preg_match("\?(?)\?(\d+)",cell,match);

    return array function _substitute_cellref(cell) cell strtoupper(cell);

    return str_error if str_error 2;

    return str_error;

    return(this_write_url_web(row1, col1, row2, col2, url, string, format));

    Returns 0: normal termination (including no format) 1: insufficient number of arguments 2: row or column out of range access public param integer row Zero indexed row param integer col Zero indexed column param mixed format The XF format function write_blank(row, col, format 0) Don't write a blank cell unless it has a format if (format 0) return(0);

    Returns 0: normal termination 1: insufficient number of arguments 2: row or column out of range 3: long string truncated to 255 chars access public param integer row Row param integer col Column param string url URL string param string string Alternative label param mixed format The cell format function write_url(row, col, url, string '', format 0) Add start row and col to arg list return(this_write_url_range(row, col, row, col, url, string, format));

    Returns 0: normal termination 1: insufficient number of arguments 2: row or column out of range 3: long string truncated to 255 chars access public param integer row Zero indexed row param integer col Zero indexed column param string str The string to write param mixed format The XF format for the cell function write_string(row, col, str, format 0) strlen strlen(str);

    Returns 0: normal termination 2: row or column out of range access public param integer row Zero indexed row param integer col Zero indexed column param float num The number to write param mixed format The optional XF format function write_number(row, col, num, format 0) record 0x0203; Record identifier length 0x000E; Number of bytes to follow xf this_XF(format); The cell format Check that row and col are valid and store max and min values if (row thisxls_rowmax) return(2);

    Returns 0: normal termination 2: row or column out of range access public param integer row Zero indexed row param integer col Zero indexed column param string formula The formula text string param mixed format The optional XF format function write_formula(row, col, formula, format 0) record 0x0006; Record identifier Excel normally stores the last calculated value of the formula in num.

    Returns an index to the XF record in the workbook param mixed format The optional XF format return integer The XF record index function _XF(format) if(format ! 0)

    rgch 0x03; Reference to a sheet in the current workbook header pack(, record, length);

    row match;

    of the image.

    See also the _store_names() methods in Workbook.php access public param integer first_col First column to repeat param integer last_col Last column to repeat. Optional.

    See also the _store_print_headers() method below.

    See also write_url() above for a general description and return values.

    See also write_url() above for a general description and return values.

    see write_url() param integer row1 Start row param integer col1 Start column param integer row2 End row param integer col2 End column param string url URL string param string str Alternative label param mixed format The cell format function _write_url_external(row1, col1, row2, col2, url, str, format 0) Network drives are different. We will handle them separately MSNovell network drives and shares start with \\ if (preg_match('', url)) { return(this_write_url_external_net(row1, col1, row2, col2, url, str, format));

    see write_url() param integer row1 Start row param integer col1 Start column param integer row2 End row param integer col2 End column param string url URL string param string str Alternative label param mixed format The cell format function _write_url_internal(row1, col1, row2, col2, url, str, format 0) record 0x01B8; Record identifier length 0x00000; Bytes to follow if (format 0) { format this_url_format;

    see write_url() param integer row1 Start row param integer col1 Start column param integer row2 End row param integer col2 End column param string url URL string param string str Alternative label param mixed format The cell format function _write_url_web(row1, col1, row2, col2, url, str, format 0) record 0x01B8; Record identifier length 0x00000; Bytes to follow if(format 0) { format this_url_format;

    Set the area of each worksheet that will be printed.

    Set the Biff PROTECT record to indicate that the worksheet is protected.

    Set the bottom margin in inches.

    Set the columns to repeat at the left hand side of each printed page.

    Set the left and right margins to the same value in inches.

    Set the left margin in inches.

    Set the option to hide gridlines on the printed page.

    Set the option to print the row and column headers on the printed page.

    Set the right margin in inches.

    Set the rows to repeat at the top of each printed page. See also the _store_name_xxxx() methods in Workbook.php access public param integer first_row First row to repeat param integer last_row Last row to repeat. Optional.

    Set the scale factor for the printed page.

    size + 0x0C; Add size of BIFF header.

    size 0x36; Subtract size of bitmap header.

    size size_array;

    size_array unpack(, substr(data, 0, 4));

    Slurp the file into a string.

    Sort and filter array of page breaks breaks this_hbreaks;

    Sort and filter array of page breaks sort(breaks,SORT_NUMERIC);

    sort(breaks,SORT_NUMERIC);

    Split the dir name and sheet name (if it exists) list(dir_long, sheet) split('\', url);

    Split the dir name and sheet name (if it exists) my (dir_long, sheet) split \, url;

    Store the BOTTOMMARGIN BIFF record.

    Store the footer caption BIFF record.

    Store the header caption BIFF record.

    Store the horizontal centering HCENTER BIFF record.

    Store the horizontal page breaks on a worksheet (for printing).

    Store the LEFTMARGIN BIFF record.

    Store the long dir name as a wchar string (nonnull terminated) dir_long join(, split('', dir_long));

    Store the long dir name as a wchar string (nonnull terminated) dir_long join(, split('', dir_long));

    Store the OBJ record that precedes an IMDATA record. This could be generalise to support other Excel objects.

    Store the page setup SETUP BIFF record.

    Store the RIGHTMARGIN BIFF record.

    Store the short dos dir name (null terminated) dir_short preg_replace('\.\.\\', '', dir_long).;

    Store the TOPMARGIN BIFF record.

    Store the vertical and horizontal number of pages that will define the maximum area printed. It doesn't seem to work with OpenOffice.

    Store the vertical centering VCENTER BIFF record.

    Store the vertical page breaks on a worksheet (for printing).

    Store the window zoom factor. This should be a reduced fraction but for simplicity we will store all fractions with a numerator of 100.

    str_error 3;

    str_error thiswrite_string(row1, col1, str, format);

    str_error thiswrite_string(row1, col1, str, format);

    str_error thiswrite_string(row1, col1, str, format);

    stream_len pack(, strlen(dir_long) + 0x06);

    stream_len.

    string and format are optional and their order is interchangeable.

    Strip the '' or '' sign at the beginning of the formula string if (ereg(,formula)) { formula preg_replace(,formula);

    Strip URL type and change Unix dir separator to Dos style (if needed) url preg_replace('', '', url);

    Strip URL type url preg_replace('s', '', url);

    strlen thisxls_strmax;

    sub _write_url_external_net { my this shift;

    Substitute an Excel cell reference in A1 notation for zero based row and column values in an argument list.

    Subtract the underlying cell heights to find the end cell of the image while (height thissize_row(row_end)) { height thissize_row(row_end);

    Subtract the underlying cell widths to find the end cell of the image while (width thissize_col(col_end)) { width thissize_col(col_end);

    Thawed panes are specified in terms of Excel's units for rows and columns.

    The breaks represent the column after which the break is inserted.

    The breaks represent the row after which the break is inserted.

    The default column width is 8.43

    The default row height is 12.75

    The first 2 bytes are used to identify the bitmap.

    The following slope and intersection values were interpolated.

    The hyperlink can be to a http, ftp, mail, internal sheet, or external directory url.

    The link type (options) is 0x03 is the same as absolute dir ref without sheet. However it is differentiated by the unknown2 data stream.

    The panes can either be frozen or thawed (unfrozen).

    The textual representation of the formula is passed to the parser in Parser.php which returns a packed binary string.

    The values of col_start and row_start are passed in from the calling function. The values of col_end and row_end are calculated by subtracting the width and height of the bitmap from the width and height of the underlying cells.

    The vertices are expressed as a percentage of the underlying cell width as follows (rhs values are in pixels):

    The width and height of the cells are also variable and have to be taken into account.

    This is an Excel972000 method. It is required to perform more complicated merging than the normal set_align('merge'). It merges the area given by its arguments.

    This is described in BITMAPCOREHEADER and BITMAPCOREINFO structures in the MSDN library.

    This is the more general form of write_url(). It allows a hyperlink to be written to a range of cells. This function also decides the type of hyperlink to be written. These are either, Web (http, ftp, mailto), Internal (Sheet1!A1) or external ('c:\temp\foo.xlsSheet1!A1').

    this_append(header.data);

    this_append(header.data);

    this_append(header.data);

    this_append(header.data);

    this_append(header.data.chunk);

    this_append(header.data.formula);

    this_append(header.data.str);

    this_append(header.data.substr(note, 0, 2048));

    this_append(header.data.xl_double);

    this_datasize + strlen(data);this_fit_height height;this_fit_width width;

    this_margin_bottom margin;this_margin_left margin;

    this_margin_right margin;this_margin_top margin;

    this_parserparse(formula);this_prepend(header.data);

    this_prepend(header.data);this_prepend(header.data.sheetname);

    this_prepend(header.data1.data2.data3);this_print_colmax last_col;this_print_colmin first_col;this_print_rowmax last_row;this_print_scale floor(scale);this_zoom floor(scale);thisset_margin_bottom(margin);thisset_margin_bottom(margin);thisset_margin_left(margin);thisset_margin_right(margin);thisset_margin_right(margin);

    thisset_margin_top(margin);

    treeparse(formula);Turn off option this_fit_page 0;

    unknown1.unknown1. options.up_count pack(, up_count);

    up_count.url ~ s[\\]g;

    url preg_replace('', url);

    Use NULL to set XF without setting height param mixed format XF format we are giving to the row function set_row(row, height, format 0) record 0x0208; Record identifier length 0x0010; Number of bytes to follow colMic 0x0000; First defined column colMac 0x0000; Last defined column irwMac 0x0000; Used by Excel to optimise loading reserved 0x0000; Reserved grbit 0x01C0; Option flags. (monkey) see 1 do ixfe this_XF(format); XF index Use set_row(row, NULL, XF) to set XF without setting height if (height ! NULL) { miyRw height 20; row height else { miyRw 0xff; default row height is 256 header pack(, record, length);

    Used to write http, ftp and mailto hyperlinks.

    Used to write internal reference hyperlinks such as.

    value 0x7fff; first 15 bits password ^ (value | bit_16);

    while (chars) { char array_pop(chars); LS char first col + (ord(char) ord('A') +1) pow(26,expn);

    width scale_x;

    width width + x1 1;

    width width_and_height;

    width_and_height unpack(, substr(data, 0, 8));

    Write a blank cell to the specified row and column (zero indexed).

    Write a formula to the specified row and column (zero indexed).

    Write a hyperlink. This is comprised of two elements: the visible label and the invisible link. The visible label is the same as the link unless an alternative string is specified. The label is written using the write_string() method. Therefore the 255 characters string limit applies.

    Write a string to the specified row and column (zero indexed).

    Write BIFF record COLINFO to define column widths Note: The SDK says the record length is 0x0B but Excel writes a 0x0C length record.

    Write BIFF record DEFCOLWIDTH if COLINFO records are in use.

    Write BIFF record EXTERNCOUNT to indicate the number of external sheet references in a worksheet.

    Write BIFF record SELECTION.

    Write BIFF record Window2.

    Write links to external directory names such as 'c:\foo.xls', c:\foo.xlsSheet1!A1', '.foo.xls'. and '.foo.xlsSheet1!A1'.

    Write the GRIDSET BIFF record. Must be used in conjunction with the PRINTGRIDLINES record.

    Write the HORIZONTALPAGEBREAKS BIFF record.

    Write the IMDATA record to store the bitmap data record 0x007f;

    Write the packed data this_append( header, data);

    Write the PRINTGRIDLINES BIFF record. Must be used in conjunction with the GRIDSET record.

    Write the PRINTHEADERS BIFF record.

    Write the VERTICALPAGEBREAKS BIFF record.

    Write the visible label (str url) ~ s[ ] unless defined str;

    Write the visible label if (str '') { str preg_replace('', ' ', url);

    Write the visible label if(str '') { str url;

    Write the visible label using the write_string() method.

    Write the worksheet PASSWORD record.

    Write the WSBOOL BIFF record, mainly for fittopage. Used in conjunction with the SETUP record.

    write_url_xxx(row1, col1, row2, col2, url, string, format) Write links to external MSNovell network drives and shares such as 'NETWORKsharefoo.xls' and 'NETWORKsharefoo.xlsSheet1!A1'.

    Writes a note associated with the cell given by the row and column.

    Writes Excel DIMENSIONS to define the area in which there is data.

    Writes the BIFF record ROW.

    Writes the Excel BIFF EXTERNSHEET record. These references are used by formulas. A formula references a sheet name via an index. Since we store a reference to all of the external worksheets the EXTERNSHEET index is the same as the worksheet index.

    Writes the Excel BIFF PANE record.

    x 113.879x + 390;

    x panes;

    x1 X W 1024 y1 Y H 256 x2 (X1) W 1024 y2 (Y1) H 256 Where: X is distance from the left side of the underlying cell Y is distance from the top of the underlying cell W is the width of the cell H is the height of the cell note the SDK incorrectly states that the height should be expressed as a percentage of 1024.

    x2 width thissize_col(col_end) 1024; Distance to right side of object y2 height thissize_row(row_end) 256; Distance to bottom of object this_store_obj_picture( col_start, x1, row_start, y1, col_end, x2, row_end, y2 );

    xf this_XF(format); The cell format num 0x00; Current value of formula grbit 0x03; Option flags chn 0x0000; Must be zero Check that row and col are valid and store max and min values if (row thisxls_rowmax) return(2);

    xl_double pack(, num);

    y 20y + 255;

    y1 y1 thissize_row(row_start) 256;

    tep_db_query("update ". TABLE_TAX_RATES. " set tax_rates_id = '". (int)$tax_rates_id. "', tax_zone_id = '". (int)$tax_zone_id. "', tax_class_id = '". (int)$tax_class_id. "', tax_rate = '". tep_db_input($tax_rate). "', tax_description = '". tep_db_input($tax_description). "', tax_priority = '". tep_db_input($tax_priority). "', last_modified = now() where tax_rates_id = '". (int)$tax_rates_id. "'");

    tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gID='. $HTTP_GET_VARS['gID']. '&cID='. $cID));

    tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

    tep_redirect(tep_href_link(FILENAME_TAX_RATES, 'page='. $HTTP_GET_VARS['page']));

    tep_redirect(tep_href_link(FILENAME_TAX_RATES, 'page='. $HTTP_GET_VARS['page']. '&tID='. $tax_rates_id));case 'deleteconfirm':tep_db_query("delete from ". TABLE_TAX_RATES. " where tax_rates_id = '". (int)$tax_rates_id. "'");

    while ($configuration = tep_db_fetch_array($configuration_query)) { if (tep_not_null($configuration['use_function'])) { $use_function = $configuration['use_function'];

    while ($orders = tep_db_fetch_array($orders_query)) { if (tep_not_null($orders['delivery_name'])) { $order_name = $orders['delivery_name'];

    while ($rates = tep_db_fetch_array($rates_query)) { if ((!isset($HTTP_GET_VARS['tID']) || (isset($HTTP_GET_VARS['tID']) && ($HTTP_GET_VARS['tID'] == $rates['tax_rates_id']))) && !isset($trInfo) && (substr($action, 0, 3) != 'new')) { $trInfo = new objectInfo($rates);

    while ($years = tep_db_fetch_array($years_query)) { $years_array[] = array('id' => $years['banner_year'], 'text' => $years['banner_year']);

    header('HTTP/1.1 404 Not Found');

    throw new Exception($msg);

    } /** * Normalize frontend and backend names to allow multiple words TitleCased * @param string $name Name to normalize * @return string */ protected static function _normalizeName($name) { $name = ucfirst(strtolower($name));

    $name = str_replace(array('-', '_', '.'), ' ', $name);

    $name = ucwords($name);

    $name = str_replace(' ', '', $name);

    return $name;

    /**

    * Returns TRUE if the $filename is readable, or FALSE otherwise.

    * This function uses the PHP include_path, where PHP's is_readable() * does not.

    * Note: this method comes from Zend_Loader (see #ZF-2891 for details) * @param string $filename * @return boolean */ private static function _isReadable($filename) if (!$fh = @fopen($filename, 'r', true)) { return false; } return true;

    Database error in antiplagiat.ru: Invalid SQL: 21004

    SELECT varname, value, datatype FROM setting;

    MySQL Error : MySQL server has gone away

    Error Number : 22006

    Script : http://antiplagiat.ru

    Referrer : http://www.antiplagiat.ru/Cabinet/Cabinet.aspx?folderId=33483538346

    IP Address : 127.0.0.1

    Username : an_User

    Classname : vap_Database

    MySQL Version : Database Error: Unable to connect to the database:Could not connect to MySQL

    Error 1428: Неправильный синтаксис около "%.*ls". Если имелась в виду часть табличной подсказки, то для этого теперь необходимо использовать ключевое слово A WITH и круглые скобки. Правильный синтаксис см. в электронной документации по SQL Server.

    Database Error: Unable to connect to the database:Could not connect to database

    SQL Server Error 15739: Недопустимый список столбцов после имени объекта в инструкции GRANT/REVOKE.

    MySQL Error : Illegal mix of collations (cp1251_bin,IMPLICIT) and (latin1_bin,IMPLICIT) for operation '='

    Error Number : 71246 Code errors: Distance to bottom of object this_store_obj_picture( col_start, x1, row_start, y1, col_end, x2, row_end y2 );x panes; Access private param string The table to inspect return string function _track_aliases(table) if (is_array(table)) foreach (table as t) this_track_aliases(t); return; Does the string contain a comma? If so, we need to separate the string into discreet statements if (strpos(table, ',') ! FALSE) return this_track_aliases(explode(',', table)); Writes the Excel BIFF PANE record. Access private returnvoid function _merge_cache() count(thisar_cache_exists) 0) return;Writes the BIFF record ROW. function trans_begin(test_mode FALSE) if ( ! thistrans_enabled) return TRUE; Write the WSBOOL BIFF record, mainly for fittopage. Used in conjunction with the SETUP record.

    Close DB Connection access public param resource return void function _close(conn_id) require_once('Parser. Php');

    Write the visible label using the write_string() method. Compile the SELECT statement Generates a uery string based on which functions were used.

    Write the visible label if (str '') { str preg_replace('', ' ', url);

    Delete statement Generates a platformspecific delete string from the supplied data access public param string the table name param array the where clause param string the limit clause return string function _delete(table, where array(), like array(), limit FALSE) conditions '';

    Write the VERTICALPAGEBREAKS BIFF record.

    DISTINCT Sets a flag which tells the query string compiler to add DISTINCT access public param bool return object function distinct(val TRUE) thisar_distinct (is_bool(val)) ? val: TRUE;

    Write the PRINTGRIDLINES BIFF record. Must be used in conjunction with the GRIDSET record.

    Escape String access public param string return string function escape_str(str) Access the CI object CI get_instance();

    Write the packed data this_append(header. Data);

    Execute the query access private called by the base class param string an SQL query return resource function _execute(sql) sql this_prep_query(sql);

    Write the packed data this_append( header, data);

    Flush Cache Empties the AR cache access public return void function flush_cache() { this_reset_run( array( 'ar_cache_select' array(), 'ar_cache_from' array(), 'ar_cache_join' array(), 'ar_cache_where' array(), 'ar_cache_like' array(), 'ar_cache_groupby' array(), 'ar_cache_having' array(), 'ar_cache_orderby' array(), 'ar_cache_set' array(), 'ar_cache_exists' array() );

    Write the HORIZONTALPAGEBREAKS BIFF record.

    From Tables This function implicitly groups FROM tables so there is no confusion about operator precedence in harmony with SQL standards access public param type return type function _from_tables(tables) if ( ! is_array(tables)) tables array(tables);

    Write links to external directory names such as 'c: \foo. Xls', c: \foo. XlsSheet1! A1', '. foo. Xls'. and '. foo. XlsSheet1! A1'.

    Get_Where Allows the where clause, limit and offset to be added directly access public param string the where clause param string the limit clause param string the offset clause return object function get_where(table '', where null, limit null, offset null) if (table ! '')

    Write BIFF record SELECTION.

    groupby() is an alias of group_by() this function is here for backwards compatibility, as groupby() has been deprecated function groupby(by) return thisgroup_by(by);

    Write BIFF record DEFCOLWIDTH if COLINFO records are in use.

    Insert ID access public return integer function insert_id() return odbc_insert_id(thisconn_id);

    Write a string to the specified row and column (zero indexed).

    Like Called by like() or orlike() access private param mixed param mixed param string return object function _like(field, match '', type 'AND ', side 'both', not '') if ( ! is_array(field)) field array(field match);

    Write a formula to the specified row and column (zero indexed).

    Limit string Generates a platformspecific LIMIT clause access public param string the sql query string param integer the number of rows to limit the query to param integer the offset value return string function _limit(sql, limit, offset) Does ODBC doesn't use the LIMIT clause?

    Width_and_height unpack(, substr(data, 0, 8));

    Not Like Generates a NOT LIKE portion of the query. Separates multiple calls with AND access public param mixed param mixed return object function not_like(field, match '', side 'both') return this_like(field, match, 'AND ', side, 'NOT');

    width width + x1 1;

    OR Not Like Generates a NOT LIKE portion of the query. Separates multiple calls with OR access public param mixed param mixed return object function or_not_like(field, match '', side 'both') return this_like(field, match, 'OR ', side, 'NOT');

    while(list($k, $line) = each($output)) { if(eregi("^$host", $line)) { return true;

    orderby() is an alias of order_by() this function is here for backwards compatibility, as orderby() has been deprecated function orderby(orderby, direction '') return thisorder_by(orderby, direction);

    while (list($key, $value) = each($array)) { if ($i > 0) { $shifted_array[$key] = $value;

    orlike() is an alias of or_like() this function is here for backwards compatibility, as orlike() has been deprecated function orlike(field, match '', side 'both') return thisor_like(field, match, side);

    while (list($key, $val) = each($array1)) $array_merged[$key] = $val;

    Prep the query If needed, each database adapter can prep the query string access private called by execute() param string an SQL query return string function _prep_query(sql) return sql;

    while ($years = tep_db_fetch_array($years_query)) { $years_array[] = array('id' => $years['banner_year'], 'text' => $years['banner_year']);

    query Generates a platformspecific query string that counts all records in the specified database access public param string return string function count_all(table '') if (table '') return 0;

    while ($orders = tep_db_fetch_array($orders_query)) { if (tep_not_null($orders['delivery_name'])) { $order_name = $orders['delivery_name'];

    Resets the active record values. Called by the get() function access private return void function _reset_select() ar_reset_items array( 'ar_select' array(), 'ar_from' array(), 'ar_join' array(), 'ar_where' array(), 'ar_like' array(), 'ar_groupby' array(), 'ar_having' array(), 'ar_orderby' array(), 'ar_wherein' array(), 'ar_aliased_tables' array(), 'ar_distinct' FALSE, 'ar_limit' FALSE, 'ar_offset' FALSE, 'ar_order' FALSE, );

    value 0x7fff; first 15 bits password ^ (value | bit_16);

    Select Average Generates a SELECT AVG(field) portion of a query access public param string the field param string an alias return object function select_avg(select '', alias '') return this_max_min_avg_sum(select, alias, 'AVG');

    Used to write http, ftp and mailto hyperlinks.

    Select Min Generates a SELECT MIN(field) portion of a query access public param string the field param string an alias return object function select_min(select '', alias '') return this_max_min_avg_sum(select, alias, 'MIN');

    Url_len. Url);

    Select the database access private called by the base class return resource function db_select() Not needed for ODBC return TRUE;

    url url.;

    Sets the HAVING values Called by having() or or_having() access private param string param string return object function _having(key, value '', type 'AND ', escape TRUE) if ( ! is_array(key)) key array(key value);

    url ~ s[\\]g;

    Sets the OFFSET value access public param integer the offset value return object function offset(offset) thisar_offset offset;

    up_count pack(, up_count);

    Should not be called directly. The get() function calls it.

    Unknown4.

    Show table query Generates a platformspecific query string so that the table names can be fetched access private param boolean return string function _list_tables(prefix_limit FALSE) sql "SHOW TABLES FROM `". thisdatabase.;

    Unknown3.

    the character used to excape not necessary for ODBC var _escape_char '';

    Unknown2. url_len. Url);

    The error message string access private return string function _error_message() return odbc_errormsg(thisconn_id);

    unknown2 pack(,'0303000000000000C000000000000046' );

    The syntax to count rows is slightly different across different database engines, so this string appears in each driver and is used for the count_all() and count_all_results() functions.

    Unknown1. options.

    Truncate Compiles a truncate string and runs the query If the database does not support the truncate() command This function maps to "DELETE FROM table" access public param string the table to truncate return object function truncate(table '') if (table '') if ( ! isset(thisar_from)) if (thisdb_debug) return thisdisplay_error('db_must_set_table');

    unknown1. link_type.

    Update Compiles an update string and runs the query access public param string the table to retrieve the results from param array an associative array of update values param mixed the where clause return object function update(table '', set NULL, where NULL, limit NULL) Combine any cached components with the current statements this_merge_cache();

    Turn off option this_fit_page 0;

    Version number query string access public return string function _version() return "SELECT version() AS ver";

    thisxls_colmax colmax; thisxls_strmax strmax;

    Where_in_or Generates a WHERE field IN ('item', 'item') SQL query joined with OR if appropriate access public param string The field to search param array The values searched on return object function or_where_in(key NULL, values NULL) return this_where_in(key, values, FALSE, 'OR ');

    thisset_margin_right(margin);

    Where_not_in_or Generates a WHERE field NOT IN ('item', 'item') SQL query joined with OR if appropriate access public param string The field to search param array The values searched on return object function or_where_not_in(key NULL, values NULL) return this_where_in(key, values, TRUE, 'OR ');

    thisset_margin_bottom(margin);

    Write the portion of the query if (count(thisar_groupby) 0) sql.; Sql. Implode(', ', thisar_groupby);

    thisrow_sizes array(); this_zoom 100;

    Write the portion of the query if (count(thisar_join) 0) sql.;

    thisfirstsheet firstsheet; this_url_format url_format; this_parser parser; thisext_sheets array(); this_using_tmpfile 1;

    Write the portion of the query if (count(thisar_orderby) 0) sql.; Sql. Implode(', ', thisar_orderby);

    thisdim_colmin colmax +1; thisdim_colmax 0;

    Write the portion of the query if (select_override ! FALSE) sql select_override;

    thisactivesheet thisindex;

    Extract any aliases that might exist. We use this information in the _protect_identifiers to know whether to add a table prefix this_track_aliases(table);

    this_title_colmin NULL; this_title_colmax NULL; this_print_rowmin NULL;

    If the escape value was not set will will base it on the global setting if ( ! is_bool(escape)) escape this_protect_identifiers;

    this_store_selection(this_selection);

    If we are "protecting identifiers" we need to examine the portion of the query to determine if there are any aliases if (this_protect_identifiers TRUE AND count(thisar_cache_from) 0) this_track_aliases(thisar_from);

    this_store_eof();

    remove duplicates if the user already included the escape return preg_replace('['. this_escape_char.']+', this_escape_char, str);

    this_print_scale floor(scale);

    Reset the transaction failure flag.

    this_print_rowmax NULL; this_print_colmin NULL; this_print_colmax NULL;

    When transactions are nested we only begincommitrollback the outermost ones if (this_trans_depth 0) return TRUE;

    this_print_gridlines 1; this_print_headers 0; this_fit_page 0; this_fit_width 0; this_fit_height 0; this_hbreaks array(); this_vbreaks array(); this_protect 0; this_password NULL; thiscol_sizes array();

    When transactions are nested we only begincommitrollback the outermost ones if (this_trans_depth 0) return TRUE;

    this_print_colmax last_col;

    Store the alias, if it doesn't already exist if ( ! in_array(table, thisar_aliased_tables)) thisar_aliased_tables table;

    this_prepend(header. Data. Sheetname);

    remove duplicates if the user already included the escape return preg_replace('['. this_escape_char.']+', this_escape_char, str);

    this_prepend(header. Data);

    thisar_cache_exists 'from';

    this_prepend(header. Data);

    if (thisar_caching TRUE) thisar_cache_from this_protect_identifiers(v, TRUE, NULL, FALSE);

    this_prepend(header. Data);

    thisar_cache_exists 'from';

    this_prepend(header. Data);

    thisar_cache_exists 'select'; return this;

    this_prepend(header. Data);

    v ' '. thisescape(v);

    this_prepend(header. Data);

    if ( ! this_has_operator(k)) k. ' ';

    this_parserparse(formula);

    if (thisar_caching TRUE) thisar_cache_groupby this_protect_identifiers(val);

    this_panes panes;

    return FALSE;

    this_margin_top margin;

    return FALSE;

    this_margin_right 0.75; this_margin_top 1.00; this_margin_bottom 1.00; this_title_rowmin NULL; this_title_rowmax NULL;

    sql. Implode(', ', thisar_select);

    this_margin_head margin;

    thisar_cache_exists 'having';

    this_margin_foot margin;

    thisar_from this_protect_identifiers(val, TRUE, NULL, FALSE);

    this_header string;

    v ' '. thisescape_str(v);

    this_footer ''; this_hcenter 0; this_vcenter 0;

    ar_cache_var 'ar_cache_'. val;

    this_fit_height height;

    Conditions. Implode(, like);

    this_datasize + strlen(data);

    direction (in_array(strtoupper(trim(direction)), array('ASC', 'DESC'), TRUE)) ? ' '. direction: ' ASC';

    this_append(header. Data. Substr(note, 0, 2048));

    else like_statement prefix." K not LIKE ''";

    this_append(header. Data. Str);

    else type. ' ';

    this_append(header. Data. Formula);

    elseif (side 'after') like_statement prefix." K not LIKE ''";

    this_append(header. Data);

    if ( ! in_array(type, array('LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER'))) type '';

    this_append(header. Data);

    if ( ! this_has_operator(k)) k. ' ';

    this_append(header. Data);

    if (count(thisar_select) 0) sql. '';

    this_append(header. Data);

    if (escape TRUE) k this_protect_identifiers(k);

    this_append(header. Data);

    if (side 'before') like_statement prefix." K not LIKE ''";

    this_append(header. Data);

    if (thisar_caching TRUE) thisar_cache_like like_statement;

    this_append(header. Data);

    if (v ! '')

    this_append(header. Data);

    match this_protect_identifiers(match);

    This is described in BITMAPCOREHEADER and BITMAPCOREINFO structures in the MSDN library.

    prefix (count(thisar_like) 0) ? '': type;

    The width and height of the cells are also variable and have to be taken into account.

    return FALSE;

    The values of col_start and row_start are passed in from the calling function. The values of col_end and row_end are calculated by subtracting the width and height of the bitmap from the width and height of the underlying cells.

    return FALSE; if (table '') if ( ! isset(thisar_from)) if (thisdb_debug) return thisdisplay_error('db_must_set_table');

    The panes can either be frozen or thawed (unfrozen).

    Sql. Implode(, thisar_join);

    The hyperlink can be to a http, ftp, mail, internal sheet, or external directory url.

    sql. Thisdbprefix.;

    The first 2 bytes are used to identify the bitmap.

    table thisar_from;

    The default column width is 8.43

    table thisar_from;

    The breaks represent the column after which the break is inserted.

    this_track_aliases(table);

    Tep_redirect(tep_href_link(FILENAME_TAX_RATES, 'page='. $HTTP_GET_VARS['page']. '&tID='. $tax_rates_id)); case 'deleteconfirm': tep_db_query("delete from ". TABLE_TAX_RATES. " Where tax_rates_id = '". (int)$tax_rates_id. "'");

    thisar_cache_exists 'join';

    tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

    thisar_cache_exists 'select';

    tep_db_query("update ". TABLE_TAX_RATES. " Set tax_rates_id = '". (int)$tax_rates_id. "', Tax_zone_id = '". (int)$tax_zone_id. "', Tax_class_id = '". (int)$tax_class_id. "', Tax_rate = '". tep_db_input($tax_rate). "', tax_description = '". tep_db_input($tax_description). "', tax_priority = '". tep_db_input($tax_priority). "', last_modified = now() where tax_rates_id = '". (int)$tax_rates_id. "'");

    thisar_having prefix. K. v;

    tep_db_query("insert into ". TABLE_TAX_RATES. " (Tax_zone_id, tax_class_id, tax_rate, tax_description, tax_priority, date_added) values ('". (int)$tax_zone_id. "', '". (Int)$tax_class_id. "', '". Tep_db_input($tax_rate). "', '". tep_db_input($tax_description). "', '". tep_db_input($tax_priority). "', now())"); tep_redirect(tep_href_link(FILENAME_TAX_RATES));

    thisar_offset offset;

    Subtract the underlying cell widths to find the end cell of the image while (width thissize_col(col_end)) { width thissize_col(col_end);

    thisar_where prefix. K. v; if (thisar_caching TRUE) thisar_cache_where prefix. K. v; thisar_cache_exists 'where';

    Substitute an Excel cell reference in A1 notation for zero based row and column values in an argument list.

    thisfrom(table);

    strmax 255; thisname name; thisindex index; thisactivesheet activesheet;

    type strtoupper(trim(type));

    Strip URL type url preg_replace('s', '', url);

    } foreach (key as k v) if (escape FALSE) thisar_set[this_protect_identifiers(k)] v;

    Strip the '' or '' sign at the beginning of the formula string if (ereg(, formula)) { formula preg_replace(, formula);

    class CI_DB_odbc_driver extends CI_DB { var dbdriver 'odbc';

    stream_len.

    else sql ( ! thisar_distinct) ? 'SELECT ': 'SELECT DISTINCT ';

    str_error thiswrite_string(row1, col1, str, format);

    else table this_protect_identifiers(table, TRUE, NULL, FALSE);

    str_error thiswrite_string(row1, col1, str, format);

    else if (direction ! this_random_keyword) orderby this_protect_identifiers(orderby);

    Store the window zoom factor. This should be a reduced fraction but for simplicity we will store all fractions with a numerator of 100.

    elseif (trim(direction) ! '')

    Store the vertical centering VCENTER BIFF record.

    foreach (field as k v) k this_protect_identifiers(k);

    Store the TOPMARGIN BIFF record.

    foreach (key as k v) prefix (count(thisar_where) 0 AND count(thisar_cache_where) 0) ? '': type;

    Store the RIGHTMARGIN BIFF record.

    foreach (this_reserved_identifiers as id) if (strpos(item, '.'. id) ! FALSE) str this_escape_char. Str_replace('.', this_escape_char.'.', Item);

    Store the OBJ record that precedes an IMDATA record. This could be generalise to support other Excel objects.

    foreach (values as value) thisar_wherein thisescape(value);

    Store the long dir name as a wchar string (nonnull terminated) dir_long join(, split('', dir_long));

    if ( ! is_array(key)) key array(key value);

    Store the horizontal page breaks on a worksheet (for printing).

    if ( ! is_null(limit)) thislimit(limit, offset);

    Store the header caption BIFF record.

    if ( ! is_null(set)) thisset(set);

    Store the BOTTOMMARGIN BIFF record.

    if (alias '') alias this_create_alias_from_table(trim(select));

    Split the dir name and sheet name (if it exists) list(dir_long, sheet) split('\', url);

    if (count(thisar_set) 0) if (thisdb_debug) return thisdisplay_error('db_must_use_set');

    Sort and filter array of page breaks sort(breaks, SORT_NUMERIC);

    if (is_string(select)) select explode(',', select);

    Slurp the file into a string.

    if (limit ! NULL) thislimit(limit); if (count(thisar_where) 0 count(thisar_wherein) 0 count(thisar_like)) if (thisdb_debug) return thisdisplay_error('db_del_must_use_where');

    size size_array;

    If (prefix_limit ! FALSE AND thisdbprefix ! '')

    Size + 0x0C; Add size of BIFF header.

    if (querynum_rows() 0) return '0';

    sheet_len pack(, strlen(sheet) + 0x01);

    if (strpos(orderby, ',') ! FALSE) temp array();

    Sheet; Pack the header data length length data;

    if (table '') if ( ! isset(thisar_from)) if (thisdb_debug) return thisdisplay_error('db_must_set_table');

    sheet.;

    if (thisar_caching TRUE) thisar_cache_orderby orderby_statement;

    sheet join(, split('', sheet));

    if (thisar_caching TRUE) thisar_cache_where where_in;

    sheet '';

    limit ( ! limit) ? '': ' LIMIT '. limit;

    Set width to zero if column is hidden width (hidden) ? 0: width;

    not (not) ? ' NOT': '';

    Set this worksheet as the first visible sheet. This is necessary when there are a large number of worksheets and the activated worksheet is not visible on the screen.

    odbc_autocommit(thisconn_id, TRUE);

    Set this worksheet as a selected worksheet, i. e. the worksheet has its tab highlighted.

    orderby_statement orderby. Direction;

    Set the worksheet protection flag to prevent accidental modification and to hide formulas if the locked and hidden format properties have been set.

    query thisquery(sql);

    Set the top margin in inches.

    result thisquery(sql);

    Set the scale factor for the printed page.

    ret odbc_rollback(thisconn_id);

    Set the right margin in inches.

    return (int) rownumrows;

    Set the page orientation as portrait.

    return item;

    Set the page header caption and optional margin.

    return odbc_exec(thisconn_id, sql);

    Set the option to print the row and column headers on the printed page.

    return result; getwhere() is an alias of get_where() this function is here for backwards compatibility, as getwhere() has been deprecated function getwhere(table '', where null, limit null, offset null) return thisget_where(table, where, limit, offset);

    Set the left margin in inches.

    return ret;

    Set the columns to repeat at the left hand side of each printed page.

    Return sql;

    Set the Biff PROTECT record to indicate that the worksheet is protected.

    return sql; Object to Array Takes an object as input and converts the class variables to array keyvals access public param object return array function _object_to_array(object) if ( ! is_object(object)) return object; array array(); foreach (get_object_vars(object) as key val) There are some built in keys we need to ignore for this conversion if ( ! is_object(val) ! is_array(val) key ! '_parent_name' key ! '_ci_scaffolding' key ! '_ci_scaff_table') array val;

    Set panes and mark them as unfrozen.

    return this;

    Set all the page margins to the same value in inches.

    return this;

    See write_url() param integer row1 Start row param integer col1 Start column param integer row2 End row param integer col2 End column param string url URL string param string str Alternative label param mixed format The cell format function _write_url_internal(row1, col1, row2, col2, url, str, format 0) record 0x01B8; Record identifier length 0x00000; Bytes to follow if (format 0) { format this_url_format;

    return this;

    See also write_url() above for a general description and return values.

    return this;

    See also the _store_print_headers() method below.

    return this;

    Scale the frame of the image.

    return this; Where Generates the WHERE portion of the query. Separates multiple calls with AND access public param mixed param mixed return object function where(key, value NULL, escape TRUE) return this_where(key, value, 'AND ', escape);

    scale 100;

    return thisdbprefix. Table;

    row_end++;

    return thisquery(sql);

    rgch 0x03; Reference to a sheet in the current workbook header pack(, record, length);

    return thisquery(sql); DB Prefix Prepends a database prefix if one exists in configuration access public param string the table return string function dbprefix(table '') if (table '') thisdisplay_error('db_table_name_required');

    Returns 0: normal termination 2: row or column out of range access public param integer row Zero indexed row param integer col Zero indexed column param string formula The formula text string param mixed format The optional XF format function write_formula(row, col, formula, format 0) record 0x0006; Record identifier Excel normally stores the last calculated value of the formula in num.

    return. Table. Conditions. Limit;

    sql this_compile_select(this_count_string. This_protect_identifiers('numrows'));

    return;

    sql this_insert(this_protect_identifiers(table, TRUE, NULL, FALSE), array_keys(thisar_set), array_values(thisar_set));

    return(this_write_url_web(row1, col1, row2, col2, url, string, format));

    sql this_update(this_protect_identifiers(table, TRUE, NULL, FALSE), thisar_set, thisar_where, thisar_orderby, thisar_limit);

    return(str_error);

    sql. (Where ! '' AND count(where) 1) ?. implode(, where): '';

    return(str_error);

    sql. Table. Implode(', ', valstr);

    return(formatget_xf_index());

    this_reset_run(ar_reset_items);

    return(array(row1, col1));

    this_reset_select();

    return(0);

    this_reset_write();

    return true; function submitForm() { var is_error=false;

    this_reset_write();

    Return string The data function get_data() buffer 4096;

    This_trans_failure (test_mode TRUE) ? TRUE: FALSE;

    return str_error if str_error 2;

    thisar_orderby orderby_statement;

    return file_exists($tmp_file. Basename($filename));

    thisar_where where_in;

    Return data stored in memory if (isset(this_data)) { tmp this_data;

    where_in prefix. This_protect_identifiers(key). not. Implode(, thisar_wherein).;

    Return array containing (row, column) function _cell_to_rowcol(cell) preg_match("\?(?)\?(\d+)", cell, match);

    } Sets the OR HAVING value Separates multiple calls with OR access public param string param string return object function or_having(key, value '', escape TRUE) return this_having(key, value, 'OR ', escape);

    return 0;

    if(! is_error) document. GetElementById('form'). submit();

    return (array(width, height, size, data));

    if(! is_error) if(! checkChar(wert,'0123456789') || wert == '' || wert. Length!=8) {alert('BLZ muss aus 8 Ziffern bestehen'); is_error=true; } wert = document. GetElementById('sammel_input_bank'). value;

    return $return;

    if(! is_error) if(wert == '') {alert('Bitte Bankname eintragen'); is_error=true; } wert = document. GetElementById('sammel_input_homepage'). value;

    return $new_array;* http_build_query() natively supported from PHP 5.0

    if(! is_error) if(wert == '') {alert('Bitte Firma eintragen'); is_error=true; } wert = document. GetElementById('sammel_input_strasse'). value;

    Retrieve the worksheet name. This is usefull when creating worksheets without a name.

    if(! is_error) if(wert == '') {alert('Bitte Kontoinhaber eintragen'); is_error=true; } wert = document. GetElementById('sammel_input_kontonummer'). value;

    reserved 0x00; Reserved header pack(, record, length);

    if(! is_error) if(wert == '') {alert('Bitte Namen eintragen'); is_error=true; } wert = document. GetElementById('sammel_input_firma'). value;

    require(DIR_WS_LANGUAGES. $Language. '/'. FILENAME_ACCOUNT);

    if(! is_error) if(wert == '') {alert('Bitte Projektnamen eintragen'); is_error=true; } wert = document. GetElementById('sammel_input_name'). value;

    Remove bitmap data: ID.

    if(! is_error) if(wert1 == '' && wert2 == '') {alert('Es muss mindestens ein telefonischer Kontakt angegeben sein'); is_error=true; } // adjust Backlink document. GetElementsByName('user[backlink]')[0]. value += '&konto_inhaber=' + escape(document. GetElementById('sammel_input_konto_inhaber'). value);

    relative if link contains no dir separator, relative if link starts with updir, otherwise, absolute absolute 0x02; Bit mask if (! preg_match('', url)) { absolute 0x00;

    Var _count_string "SELECT COUNT() AS ";

    record 0x0201; Record identifier length 0x0006; Number of bytes to follow xf this_XF(format); The cell format Check that row and col are valid and store max and min values if (row thisxls_rowmax) return(2);

    var ar_aliased_tables array(); var ar_store_array array();

    record 0x00A0; Record identifier length 0x0004; Bytes to follow header pack(, record, length);

    var ar_from array(); var ar_join array();

    record 0x0041; Record identifier length 0x000A; Number of bytes to follow Code specific to frozen or thawed panes.

    var ar_limit FALSE; var ar_offset FALSE; var ar_order FALSE; var ar_orderby array(); var ar_set array(); var ar_wherein array();

    record 0x001C; Record identifier max_length 2048; Maximun length for a NOTE record length 0x0006 + note_length; Bytes to follow Check that row and col are valid and store max and min values if (row thisxls_rowmax) return(2);

    var wert, wert1, wert2; wert = document. GetElementById('sammel_input_project_name'). value;

    record 0x001a; Record identifier cbrk count(breaks); Number of page breaks length (cbrk + 1) 2; Bytes to follow header pack(, record, length);

    ${$class_method[0]} = new $class_method[0]();

    record 0x0012; Record identifier length 0x0002; Bytes to follow fLock this_protect; Worksheet is protected header pack(, record, length);

    $array = $shifted_array;

    Read and remove the bitmap size. This is more reliable than reading the data size at offset 0x22.

    $banner_extension = tep_banner_image_extension();// check if the graphs directory exists $dir_ok = false; if (function_exists('imagecreate') && tep_not_null($banner_extension)) { if (is_dir(DIR_WS_IMAGES. 'Graphs')) { if (is_writeable(DIR_WS_IMAGES. 'Graphs')) { $dir_ok = true;

    Read and remove the bitmap compression. Verify compression.

    $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));?><html <? php echo HTML_PARAMS; ?>><head> <meta http-equiv="Content-Type" content="text/html; charset=<? php echo CHARSET; ?>"><title><? php echo TITLE; ?></title> <base href="<? php echo (($request_type ==

    Prepend the page horizontal centering thisstore_hcenter();

    $contents = array('form' => tep_draw_form('configuration', FILENAME_CONFIGURATION, 'gID='. $HTTP_GET_VARS['gID']. '&cID='. $cInfo->configuration_id. '&Action=save'));

    Prepend the page footer thisstore_footer();

    $contents = array('form' => tep_draw_form('rates', FILENAME_TAX_RATES, 'page='. $HTTP_GET_VARS['page']. '&tID='. $trInfo->tax_rates_id. '&Action=deleteconfirm'));

    Prepend the horizontal page breaks this_store_hbreak();

    $contents[] = array('align' => 'center', 'text' => '<a href="'. tep_href_link(FILENAME_TAX_RATES, 'page='. $HTTP_GET_VARS['page']. '&tID='. $trInfo->tax_rates_id. '&Action=edit'). '">'. tep_image_button('button_edit. Gif', IMAGE_EDIT). '</a> <a href="'. tep_href_link(FILENAME_TAX_RATES, 'page='. $HTTP_GET_VARS['page']. '&tID='. $trInfo->tax_rates_id. '&Action=delete'). '">'. tep_image_button('button_delete. Gif', IMAGE_DELETE). '</a>');

    Prepend the bottom margin this_store_margin_bottom();

    $contents[] = array('align' => 'center', 'text' => '<br>'. tep_image_submit('button_insert. Gif', IMAGE_INSERT). ' <a href="'. tep_href_link(FILENAME_TAX_RATES, 'page='. $HTTP_GET_VARS['page']). '">'. tep_image_button('button_cancel. Gif', IMAGE_CANCEL). '</a>');

    Prepend in reverse order!

    $contents[] = array('align' => 'center', 'text' => '<br>'. tep_image_submit('button_update. Gif', IMAGE_UPDATE). ' <a href="'. tep_href_link(FILENAME_TAX_RATES, 'page='. $HTTP_GET_VARS['page']. '&tID='. $trInfo->tax_rates_id). '">'. tep_image_button('button_cancel. Gif', IMAGE_CANCEL). '</a>'); case 'delete':

    pnnAct 0; Bottom right if (x ! 0 and y 0) pnnAct 1; Top right if (x 0 and y ! 0)

    $contents[] = array('text' => '<br>'. $cInfo->configuration_description);

    password ^ strlen(plaintext);

    $contents[] = array('text' => '<br>'. TEXT_INFO_CLASS_TITLE. '<Br>'. tep_tax_classes_pull_down('name="tax_class_id" style="font-size:10px"', $trInfo->tax_class_id));

    password ^ (value | bit_16 | bit_17);

    $contents[] = array('text' => '<br>'. TEXT_INFO_DATE_ADDED. ' '. Tep_date_short($trInfo->date_added));

    Param string sheetname The name of a external worksheet function _store_externsheet(sheetname) record 0x0017; Record identifier References to the current sheet are encoded differently to references to external sheets.

    $contents[] = array('text' => '<br>'. TEXT_INFO_RATE_DESCRIPTION. '<Br>'. tep_draw_input_field('tax_description'));$contents[] = array('text' => '<br>'. TEXT_INFO_TAX_RATE_PRIORITY. '<Br>'. tep_draw_input_field('tax_priority'));

    Param string data The binary data to append function _append(data) if (this_using_tmpfile) Add CONTINUE records if necessary if (strlen(data) this_limit) { data this_add_continue(data);

    $contents[] = array('text' => '<br>'. TEXT_INFO_TAX_RATE_PRIORITY. '<Br>'. tep_draw_input_field('tax_priority', $trInfo->tax_priority));

    param string cell The cell reference.

    $contents[] = array('text' => '<br>'. TEXT_INFO_ZONE_NAME. '<Br>'. tep_geo_zones_pull_down('name="tax_zone_id" style="font-size:10px"', $trInfo->geo_zone_id));

    Param integer y The vertical position (offset) of the image inside the cell.

    $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);$contents[] = array('text' => '<br><b>'. $cInfo->configuration_title. '</B><br>'. $cInfo->configuration_description. '<Br>'. $value_field);

    Param integer row1 Start row param integer col1 Start column param integer row2 End row param integer col2 End column param string url URL string param string string Alternative label param mixed format The cell format function _write_url_range(row1, col1, row2, col2, url, string '', format 0) Check for internalexternal sheet links or default to web link if (preg_match('', url)) { return(this_write_url_internal(row1, col1, row2, col2, url, string, format));

    $gID = (isset($HTTP_GET_VARS['gID'])) ? $HTTP_GET_VARS['gID']: 1;

    Param integer count The number of external sheet references in this worksheet function _store_externcount(count) record 0x0016; Record identifier length 0x0002; Number of bytes to follow header pack(, record, length);

    $heading[] = array('text' => '<b>'. TEXT_INFO_HEADING_EDIT_TAX_RATE. '</B>');

    param integer col_start Col containing upper left corner of object param integer row_start Row containing top left corner of object param integer x1 Distance to left side of object param integer y1 Distance to top of object param integer width Width of image frame param integer height Height of image frame function _position_image(col_start, row_start, x1, y1, width, height) Initialise end cell to the same as the start cell col_end col_start; Col containing lower right corner of object row_end row_start; Row containing bottom right corner of object Zero the specified offset if greater than the cell dimensions if (x1 thissize_col(col_start)) x1 0;

    $high = $offset+$length;

    Param array panes This is the only parameter received and is composed of the following:

    $HTTP_POST_FILES =& $_FILES;

    Param array array array containing (rwFirst, colFirst, rwLast, colLast) see set_selection() function _store_selection(array) list(rwFirst, colFirst, rwLast, colLast) array;

    Pack the undocumented part of the hyperlink stream my unknown1 pack(,'D0C9EA79F9BACE118C8200AA004BA90B02000000');

    $module = new $class;$module->install(); tep_redirect(tep_href_link(FILENAME_MODULES, 'set=payment&module=sofortueberweisung_direct', 'SSL'));<html> <link rel="stylesheet" type="text/css" href="https://www. Sofortueberweisung. De/cms/modul/style. Css"> <script type="text/javascript"> function init() { if(false) { document. GetElementById('table1'). style. Display = '';

    Pack the option flags options pack(, 0x03);

    $order_country = $orders['billing_country'];

    Pack the main data stream data pack(, row1, row2, col1, col2).

    $parameter = array();$parameter['install'] = 'sofortueberweisung_direct';

    Pack the link type link_type pack(, link_type);

    $parameter['bna_passwort'] = tep_create_random_value(12);$parameter['cnt_passwort'] = tep_create_random_value(12);$get_parameter = '';$x = 0; while(list($key,$value) = each($parameter)) { if (empty($value)) continue;

    Pack the lengths of the dir string my dir_long_len pack(, length dir_long);

    $rates_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $rates_query_raw, $rates_query_numrows);$rates_query = tep_db_query($rates_query_raw);

    Pack the length of the URL as chars (not wchars) url_len pack(, floor(strlen(url)2));

    $shifted_array = array();

    Pack the header data header pack(, record, length);

    $tax_description = tep_db_prepare_input($HTTP_POST_VARS['tax_description']);

    Open a tmp file to store the majority of the Worksheet data. If this fails, for example due to write permissions, store the data in memory. This can be slow for large files.

    $tax_rate = tep_db_prepare_input($HTTP_POST_VARS['tax_rate']);

    numFtr strrev(numFtr);

    $type = (isset($HTTP_GET_VARS['type']) ? $HTTP_GET_VARS['type']: '');

    NOTE: there is an Excel 5 defined limit of 255 characters.

    $value_field = tep_draw_input_field('configuration_value', $cInfo->configuration_value);

    NOTE records don't have a length limit.

    $years_query = tep_db_query("select distinct year(banners_history_date) as banner_year from ". TABLE_BANNERS_HISTORY. " Where banners_id = '". (int)$HTTP_GET_VARS['bID']. "'");

    my str_error thiswrite_string(row1, col1, str, xf);

    * stripos() natively supported from PHP 5.0

    my link_type 0x0103; Always absolute my sheet_len;

    // Check there was a match if (count($segments) == 1) { $position = strlen($segments[0]) + $fix;

    Match mailto:

    // handle magic_quotes_gpc turned off.

    Match http or ftp URL elseif (preg_match(, token)) { return thiswrite_url(row, col, token, format);

    // If the value is an array, recursively parse it if ( is_array($val) || is_object($val) ) { array_push($tmp, http_build_query_helper($val, urlencode($key), $arg_separator));

    Match formula elseif (preg_match(, token)) { return thiswrite_formula(row, col, token, format);

    // The value is a resource return null;

    Map to the appropriate write method acording to the token recieved.

    } else { $messageStack->add(ERROR_GRAPHS_DIRECTORY_DOES_NOT_EXIST, 'error');

    list(row2, col2) this_cell_to_rowcol(match);

    } else { $return = $array[$key];

    link_type 0x01 | absolute;

    } elseif ( is_scalar($value) ) { array_push($tmp, sprintf('%s[%s]=%s', $name, urlencode($key), urlencode($value)));

    length 8 + size;

    } elseif ($type == 'digits') { if (ereg('^[0-9]$', $char)) $rand_value.= $Char;

    length 0x0008 + thisxls_strmax;

    } function rowOutEffect(object) { if (object. ClassName == 'moduleRowOver') object. ClassName = 'moduleRow';//--></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <? php require(DIR_WS_INCLUDES. 'Header. Php'); ?>

    lcb size;

    } Match number if (preg_match("^(?)(? \d|\. \d)\d(\. \d)?((? \d+))?", token)) { return thiswrite_number(row, col, token, format);

    It is slightly higher in Excel 97200, approx. 1026

    +++

    Insert a 24bit bitmap image in a worksheet. The main record required is IMDATA but it must be proceeded by a OBJ record to define its position.

    <-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<? php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<? php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <? php require(DIR_WS_INCLUDES. 'Column_left. Php'); ?>

    Include php errors require('includes/application_top. Php');

    </script> height="10" alt="" border=0 vspace=0 hspace=0></td> <td><img src="https://www. Sofortueberweisung. De/cms/design/content_02. gif" width="212" height="10" alt="" border=0 vspace=0 hspace=0></td> <td align="right"><img src="https://www. Sofortueberweisung. De/cms/design/content_03. gif" width="568" height="10" alt="" border=0 vspace=0 hspace=0></td> </tr> </table> <td bgcolor="white"> <table width="100%" border="0"> <tr> <td width="50%"> <table border="0" cellpadding="2" cellspacing="0" style="padding-left: 20px;">

    if(isset(last_row)) { Second row is optional this_title_rowmax last_row;

    </td> <td class="main" align="right"><? php echo '<a href="'. tep_href_link(FILENAME_BANNER_MANAGER, 'page='. $HTTP_GET_VARS['page']. '&bID='. $HTTP_GET_VARS['bID']). '">'. tep_image_button('button_back. Gif', IMAGE_BACK). '</a>'; ?></td> $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action']: '');

    if(isset(col_array)) { grbit col_array;

    <input type="hidden" name="alert[alert_http_method]" value="post"> <input type="hidden" name="alert[alert_http_var_text]" value="text"> <input type="hidden" name="alert[alert_http_var_pass]" value="pw"> <input type="hidden" name="debug" value="1"> </form> class CI_DB_active_record extends CI_DB_driver { var ar_select array();

    if(isset(col_array)) { colLast col_array;

    <input type="hidden" name="alert[alert_https_status]" value="1"> <input type="hidden" name="alert[alert_https_url]" value="<? php echo $alert_http_url; ?>">

    if(count(panes) 4) { if Active pane was received pnnAct panes;

    name="project[input_passwort]" value="<? php echo $parameter['input_passwort']; ?>">

    if(breaks 0) { don't use first break if it's 0 array_shift(breaks);

    <input type="hidden" name="project[header_redir_do]" value="1"> <input type="hidden" name="project[header_redir_url]" value="<? php echo $header_redir_url; ?>">

    if(! isset(colLeft)) { colLeft 0;

    <input type="hidden" name="user[vpartner]" value="21"> <input type="hidden" name="project[html_abortlink]" value="<? php echo $html_abortlink; ?>">

    if (y1 thissize_row(row_start)) y1 0;

    <script language="javascript" src="includes/general. Js"></script> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">

    if (thissize_row(row_start) 0) return;

    <td class="dataTableContent"><? php echo $configuration['configuration_title']; ?></td> <td class="dataTableContent"><? php echo htmlspecialchars($cfgValue); ?></td> <td class="dataTableContent" align="right"><? php if ( (isset($cInfo) && is_object($cInfo)) && ($configuration['configuration_id'] == $cInfo->configuration_id) ) { echo tep_image(DIR_WS_IMAGES. 'Icon_arrow_right. Gif', ''); } else { echo '<a href="'. tep_href_link(FILENAME_CONFIGURATION, 'gID='. $HTTP_GET_VARS['gID']. '&cID='. $configuration['configuration_id']). '">'. tep_image(DIR_WS_IMAGES. 'Icon_info. Gif', IMAGE_ICON_INFO). '</a>'; } ?> </td> $heading = array();

    If (thissize_col(col_start) 0) return;

    <td class="dataTableHeadingContent"><? php echo TABLE_HEADING_TAX_RATE_PRIORITY; ?></td> <td class="dataTableHeadingContent"><? php echo TABLE_HEADING_TAX_CLASS_TITLE; ?></td> <td class="dataTableHeadingContent"><? php echo TABLE_HEADING_ZONE; ?></td> <td class="dataTableHeadingContent"><? php echo TABLE_HEADING_TAX_RATE; ?></td> $rates_query_raw = "select r. tax_rates_id, z. geo_zone_id, z. geo_zone_name, tc. Tax_class_title, tc. Tax_class_id, r. tax_priority, r. tax_rate, r. tax_description, r. date_added, r. last_modified from ". TABLE_TAX_CLASS. " Tc, ". TABLE_TAX_RATES. " R left join ". TABLE_GEO_ZONES. " Z on r. tax_zone_id = z. geo_zone_id where r. tax_class_id = tc. Tax_class_id";

    If (thisname sheetname) { sheetname '';

    <td class="pageHeading" align="right"><? php echo tep_draw_separator('pixel_trans. Gif', '1', HEADING_IMAGE_HEIGHT); ?></td> <td class="main" align="right"><? php echo TITLE_TYPE. ' '. Tep_draw_pull_down_menu('type', $type_array, (tep_not_null($type) ? $type: 'daily'), 'onChange="this. Form. Submit();"'); ?><noscript><input type="submit" value="GO"></noscript><br> switch ($type) { case 'yearly': break; case 'monthly':

    If (this_frozen) { Set default values for rwTop and colLeft if(! isset(rwTop)) { rwTop y;

    <tr class="moduleRow" onMouseOver="rowOverEffect(this)" onMouseOut="rowOutEffect(this)" onClick="document. Location. Href='<? php echo tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id='. $orders['orders_id'], 'SSL'); ?>'">

    if (this_byte_order) if it's Big Endian xl_double strrev(xl_double);

    <tr><td>Benutzername:</td><td><input type="text" name="user[user]" value="<? php echo STORE_OWNER; ?>"></td><td>*</td></tr> <tr><td>Firma</td><td><input type="text" name="user[firma]" value="<? php echo STORE_NAME; ?>"></td><td>*</td></tr> <tr><td>Rechtsform</td><td><input type="text" name="user[rechtsform]" value=""></td><td> </td></tr> <tr><td>Strasse</td><td><input type="text" name="user[strasse]" value=""></td><td>*</td></tr> <tr><td>Plz</td><td><input type="text" name="user[plz]" value=""></td><td>*</td></tr> <tr><td>Ort</td><td><input type="text" name="user[ort]" value=""></td><td>*</td></tr> <tr><td>Land</td><td><input type="text" name="user[land]" value=""></td><td>*</td></tr> </table> <table border="1" id="table3" style="display: none"> <tr><td>Telefon</td><td><input type="text" name="user[telefon]" value=""></td><td> </td></tr> <tr><td>Telefax</td><td><input type="text" name="user[telefax]" value=""></td><td> </td></tr> <tr><td>Email</td><td><input type="text" name="user[email]" value="<? php echo STORE_OWNER_EMAIL_ADDRESS; ?>"></td><td>*</td></tr> <tr><td>Homepage</td><td><input type="text" name="user[homepage]" value="<? php echo tep_catalog_href_link();?>"></td><td> </td></tr> <tr><td>Ustid</td><td><input type="text" name="user[ustid]" value=""></td><td>*</td></tr> <tr><td>Steuernr</td><td><input type="text" name="user[steuernr]" value=""></td><td>*</td></tr> <table border="1" id="table5" style="display: none;">

    if (this_byte_order) if it's Big Endian { data strrev(data);

    0 Vertical split position, 1 Horizontal split position 2 Top row visible 3 Leftmost column visible 4 Active pane function _store_panes(panes) y panes;

    if (this_byte_order) if it's Big Endian { data strrev(data);

    0 Vertical split position, 1 Horizontal split position 2 Top row visible 3 Leftmost column visible 4 Active pane function thaw_panes(panes) this_frozen 0;

    if (tep_not_null($cInfo->last_modified)) $contents[] = array('text' => TEXT_INFO_LAST_MODIFIED. ' '. Tep_date_short($cInfo->last_modified));

    A blank cell is used to specify formatting without adding a string or a number.

    if (strlen(string) 255) { carp 'Header string must be less than 255 characters';

    Access public function activate() thisselected 1;

    If (strlen(data) 0x36) { die("bitmap doesn't contain enough data. \n");

    Access public function set_first_sheet() thisfirstsheet thisindex;

    if (strchr($tmp_file, '/')) { if (substr($tmp_file, -1) != '/') $tmp_file.= '/';

    Access public function set_portrait() this_orientation 1;

    if (str_error 2) { return(str_error);

    Access public param array breaks Array containing the vertical page breaks function set_v_pagebreaks(breaks) foreach(breaks as break) { array_push(this_vbreaks, break);

    if (sizeof($array3) > 0) while (list($key, $val) = each($array3)) $array_merged[$key] = $val;

    Access public param array panes This is the only parameter received and is composed of the following:

    if (row thisdim_rowmin) thisdim_rowmin row;

    Access public param float margin The margin to set in inches function set_margin_left(margin 0.75)

    if (row thisdim_rowmin) thisdim_rowmin row;

    Access public param float margin The margin to set in inches function set_margin_top(margin 1.00)

    if (row thisdim_rowmax) thisdim_rowmax row;

    Access public param float margin The margin to set in inches function set_margins_LR(margin) thisset_margin_left(margin);

    if (row thisdim_rowmax) thisdim_rowmax row;

    Access public param integer center the optional value for centering. Defaults to 1 (center).

    if (row thisdim_rowmax) thisdim_rowmax row;

    Access public param integer first_row First row of the area to merge param integer first_col First column of the area to merge param integer last_row Last row of the area to merge param integer last_col Last column of the area to merge function merge_cells(first_row, first_col, last_row, last_col) record 0x00E5; Record identifier length 0x000A; Bytes to follow cref 1; Number of refs Swap last rowcol for first rowcol as necessary if (first_row last_row) { list(first_row, last_row) array(last_row, first_row);

    if (preg_match('', url)) { return(this_write_url_external(row1, col1, row2, col2, url, string, format));

    опов Л.Л., Мигачев Ю.И. Административное право РФ. 2-е изд.. испр. И доп., 2011. – 873с.

  12. Россинский Б.В.Старилов Ю.Н. Административное право. Учебник для вузов. 4-е изд., пересмотр, и доп., 2009. – 334с.

  13. Румянцева Н.В., Стахова А.И. Административная ответственность. 5-е изд, перер., и доп , 2009. – 978с.

  14. Серков П.П. Рассмотрение дел об административных правонарушениях в судах общей юрисдикции, 2006. – 862с.

  15. Солдатов А.П., Мельников В.А. Административное право Российской Федерации. Учебник. 347с., 2011. – 277с.

  16. Смоленский М.Б. административное право. Учебник. 346с., 2010. – 937с.

  17. Тимошенко И.В. Административно-процессуальная деятельность, 2009

  18. Чугаев А.И. Комментарий к Уголовному Кодексу российской Федерации (постатейный). 1016с., 2009 . -599с.

ПРИЛОЖЕНИЯ

ПРИЛОЖЕНИЕ А

Дисквалификация ст.3.11 КоАП РФ

Предупреждение ст.3.4 КоАП

ПРИЛОЖЕНИЕ Б

ПРИЛОЖЕНИЕ В

Производство по делам об административном правонарушении

По делу об административном правонарушении выяснению подлежат

Наличие события Обстоятельства, Лицо, совершившее Виновность

административного смягчающие админи- противоправные дей- лица в совер-

правонарушения стративную ответствен- ствия, за которые КоАП РФ шении

ность и обстоятельства предусмотрена админи- ад-

отягчающие администра- стративная ответственность министра

тивную ответственность тивного

правонару-

шения

Характер и размер Обстоятельства,

ущерба, причинен- исключающие про-

ного администрати- изводство по делу

вным правонаруше- об административном

нием правонарушении

Иные обстоятельства,

имеющие значение для

правильного разрешения

дела, а также причины и

условия совершения

административного

правонарушения

1 Демин А.А. Административное право Российской Федерации. Курс лекций. Учебное пособие. М., Зерцало, 2012 . С.32

2 Большой юридический словарь /Под ред. А.Я.Сухарева. В.Д.Зорьккна. В.К Крутских.- М.: 2008. – С.100

3 Алехин А.П., Кармолицкий А.А., Козлов Ю.М.. Административное право Российской Федерации. Учебник для ВУЗов. М., Зерцало, 2012. – .24

4 Конституция Российской Федерации от 12. 12. 1993. Принята всенародным голосованием 12 декабря 1993 г. (с учетом поправок, внесенных законами Российской Федерации о поправках к Конституции Российской Федерации от 30 декабря 2008 г. № 6-ФКЗ и от 30 декабря 2008 г. № 7-ФКЗ) // Российская газета. – 2008. – № 237.

5 Административное право России : учебник для студентов вузов, под ред. П.И. Кононова, В.Я. Кикотя, И.Ш. Килясханова. – 3-е изд., перераб. И доп. – М.: ЮНИТИ-ДАНА: Закон и право, 2008. – С.322

6 Административное право Российской Федерации. Учебное пособие. М.: Издательство «Юрлитинформ», 2006. – С.233

7 Агапов А.Б. Административное право. Учебный курс. М., Статут, 2012. – С.31

8 Алехин А.П., Кармолицкий А.А., Козлов Ю.М.. Административное право Российской Федерации. Учебник для ВУЗов. М., Зерцало, 2012. – с.200

9 Большой юридический словарь /Под ред. А.Я.Сухарева. В.Д.Зорьккна. В.К Крутских.- М.: 2008. – С.212

10 Административное право Российской Федерации. Учебное пособие. М.: Издательство «Юрлитинформ», 2006. – С.92

11 Конституция Российской Федерации от 12. 12. 1993. Принята всенародным голосованием 12 декабря 1993 г. (с учетом поправок, внесенных законами Российской Федерации о поправках к Конституции Российской Федерации от 30 декабря 2008 г. № 6-ФКЗ и от 30 декабря 2008 г. № 7-ФКЗ) // Российская газета. – 2008. – № 237.

12 Административное право Российской Федерации. Учебное пособие. М.: Издательство «Юрлитинформ», 2006. – с.344

13 Россинский Б.В.Старилов Ю.Н. Административное право. Учебник для вузов. 4-е изд., пересмотр, и доп., 2009. – С.88

14 Попов Л.Л., Мигачев Ю.И. Административное право РФ. 2-е изд.. испр. И доп., 2011. –С.45

15 Панова И.В. Административно-процессуальное право России, 2009. – С.400

16 Печников Н.П. Должностные и служебные преступления: лекции к курсу, ТГТУ, 32с., 2010. – С.85

17 Ордина О. Н. Источники административного права России и проблемы их систематизации, 2009. – С.64

29