Вход

Правовая система современного российского общества.

Рекомендуемая категория для самостоятельной подготовки:
Дипломная работа*
Код 72005
Дата создания 2014
Страниц 74
Источников 68
Покупка готовых работ временно недоступна.
6 660руб.

Содержание

ОГЛАВЛЕНИЕ
ВВЕДЕНИЕ 3
1ᅠ ᅠ ПОНЯТИЕᅠ Иᅠ ЭЛЕМЕНТЫᅠ ПРАВОВОЙᅠ СИСТЕМЫᅠ РОССИИ 6
1.1. Понятиеᅠ правовойᅠ системыᅠ России 6
1.2ᅠ Элементыᅠ системыᅠ права 13
2.ᅠ ГЕНЕЗИСᅠ ПРАВОВОЙᅠ СИСТЕМЫᅠ РОССИИ 16
2.1ᅠ Проблемаᅠ генезисаᅠ правовойᅠ системыᅠ России. 16
3.2ᅠ Рецепцияᅠ правовойᅠ системыᅠ России. 18
3ᅠ ТЕНДЕНЦИИᅠ РАЗВИТИЯᅠ ПРАВОВОЙᅠ СИСТЕМЫᅠ РОССИИ 37
3.1ᅠ Правоваяᅠ системаᅠ России:ᅠ вызовыᅠ времени 37
3.2ᅠ Принципыᅠ формированияᅠ правовыхᅠ системᅠ субъектов 56
ЗАКЛЮЧЕНИЕ 70
СПИСОКᅠ ИСПОЛЬЗОВАННОЙᅠ ЛИТЕРАТУРЫ 74

Фрагмент работы для ознакомления

We use this information in the _protect_identifiers to know whether to add a table prefix this_track_aliases(val);
thisar_from this_protect_identifiers(val, TRUE, NULL, FALSE);
if (thisar_caching TRUE) thisar_cache_from this_protect_identifiers(val, TRUE, NULL, FALSE);
thisar_cache_exists 'from';
return this; Join Generates the JOIN portion of the query access public param string param string the join condition param string the type of join return object function join(table, cond, type '') { if (type ! '')
type strtoupper(trim(type));
if ( ! in_array(type, array('LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER'))) type '';
else type. ' ';
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);
Strip apart the condition and protect the identifiers if (preg_match('(+)(+)(.+)', cond, match)) match this_protect_identifiers(match);
match this_protect_identifiers(match);
cond match.match.match;
Assemble the JOIN statement join type.'JOIN '.this_protect_identifiers(table, TRUE, NULL, FALSE).' ON '.cond;
thisar_join join;
if (thisar_caching TRUE) thisar_cache_join join;
thisar_cache_exists 'join';
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);
OR Where Generates the WHERE portion of the query. Separates multiple calls with OR access public param mixed param mixed return object function or_where(key, value NULL, escape TRUE) return this_where(key, value, 'OR ', escape); orwhere() is an alias of or_where() this function is here for backwards compatibility, as orwhere() has been deprecated function orwhere(key, value NULL, escape TRUE) return thisor_where(key, value, escape); Where Called by where() or orwhere() access private param mixed param mixed param string return object function _where(key, value NULL, type 'AND ', escape NULL) if ( ! is_array(key)) key array(key value);
If the escape value was not set will will base it on the global setting if ( ! is_bool(escape)) escape this_protect_identifiers;
foreach (key as k v) prefix (count(thisar_where) 0 AND count(thisar_cache_where) 0) ? '': type;
if (is_null(v) ! this_has_operator(k)) value appears not to have been set, assign the test to IS NULL k. ' IS NULL';
if ( ! is_null(v)) if (escape TRUE) k this_protect_identifiers(k, FALSE, escape);
v ' '.thisescape(v);
if ( ! this_has_operator(k)) k. ' ';
else k this_protect_identifiers(k, FALSE, escape);
thisar_where prefix.k.v; if (thisar_caching TRUE) thisar_cache_where prefix.k.v; thisar_cache_exists 'where';
return this; Where_in Generates a WHERE field IN ('item', 'item') SQL query joined with AND if appropriate access public param string The field to search param array The values searched on return object function where_in(key NULL, values NULL) return this_where_in(key, values);
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 ');
Where_not_in Generates a WHERE field NOT IN ('item', 'item') SQL query joined with AND if appropriate access public param string The field to search param array The values searched on return object function where_not_in(key NULL, values NULL) return this_where_in(key, values, TRUE);
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 ');
Where_in Called by where_in, where_in_or, where_not_in, where_not_in_or access public param string The field to search param array The values searched on param boolean If the statement would be IN or NOT IN param string return object function _where_in(key NULL, values NULL, not FALSE, type 'AND ') if (key NULL OR values NULL) return;
if ( ! is_array(values)) values array(values);
not (not) ? ' NOT': '';
foreach (values as value) thisar_wherein thisescape(value);
prefix (count(thisar_where) 0) ? '': type;
where_in prefix. this_protect_identifiers(key). not.. implode(, thisar_wherein).;
thisar_where where_in;
if (thisar_caching TRUE) thisar_cache_where where_in;
thisar_cache_exists 'where';
reset the array for multiple calls thisar_wherein array();
return this;
Like Generates a LIKE portion of the query. Separates multiple calls with AND access public param mixed param mixed return object function like(field, match '', side 'both') return this_like(field, match, 'AND ', side);
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');
OR Like Generates a LIKE portion of the query. Separates multiple calls with OR access public param mixed param mixed return object function or_like(field, match '', side 'both') return this_like(field, match, 'OR ', side);
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');
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);
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);
foreach (field as k v) k this_protect_identifiers(k);
prefix (count(thisar_like) 0) ? '': type;
v thisescape_str(v);
if (side 'before') like_statement prefix." k not LIKE ''";
elseif (side 'after') like_statement prefix." k not LIKE ''";
else like_statement prefix." k not LIKE ''";
thisar_like like_statement;
if (thisar_caching TRUE) thisar_cache_like like_statement;
thisar_cache_exists 'like';
return this;
GROUP BY access public param string return object function group_by(by) if (is_string(by)) by explode(',', by);
foreach (by as val) val trim(val);
if (val ! '')
thisar_groupby this_protect_identifiers(val);
if (thisar_caching TRUE) thisar_cache_groupby this_protect_identifiers(val);
thisar_cache_exists 'groupby';
return this;
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);
} Sets the HAVING value Separates multiple calls with AND access public param string param string return object function having(key, value '', escape TRUE) return this_having(key, value, 'AND ', escape);
orhaving() is an alias of or_having() this function is here for backwards compatibility, as orhaving() has been deprecated function orhaving(key, value '', escape TRUE) return thisor_having(key, value, escape);
} 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);
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);
foreach (key as k v) prefix (count(thisar_having) 0) ? '': type;
if (escape TRUE) k this_protect_identifiers(k);
if ( ! this_has_operator(k)) k. ' ';
if (v ! '')
v ' '.thisescape_str(v);
thisar_having prefix.k.v;
if (thisar_caching TRUE) thisar_cache_having prefix.k.v;
thisar_cache_exists 'having';
return this;
Sets the ORDER BY value access public param string param string direction: asc or desc return object function order_by(orderby, direction '') if (strtolower(direction) 'random') orderby ''; Random results want or don't need a field name direction this_random_keyword;
elseif (trim(direction) ! '')
direction (in_array(strtoupper(trim(direction)), array('ASC', 'DESC'), TRUE)) ? ' '.direction: ' ASC';
if (strpos(orderby, ',') ! FALSE) temp array();
foreach (explode(',', orderby) as part) part trim(part);
if ( ! in_array(part, thisar_aliased_tables)) part this_protect_identifiers(trim(part));
temp part;
orderby implode(', ', temp);
else if (direction ! this_random_keyword) orderby this_protect_identifiers(orderby);
orderby_statement orderby.direction;
thisar_orderby orderby_statement;
if (thisar_caching TRUE) thisar_cache_orderby orderby_statement;
thisar_cache_exists 'orderby';
return this;
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);
Sets the LIMIT value access public param integer the limit value param integer the offset value return object function limit(value, offset '') thisar_limit value;
if (offset ! '')
thisar_offset offset;
return this;
Sets the OFFSET value access public param integer the offset value return object function offset(offset) thisar_offset offset;
return this;
The function. Allows keyvalue pairs to be set for inserting or updating access public param mixed param string param boolean return object function set(key, value '', escape TRUE) key this_object_to_array(key);
if ( ! is_array(key)) key array(key value);
} foreach (key as k v) if (escape FALSE) thisar_set[this_protect_identifiers(k)] v;
else thisar_set[this_protect_identifiers(k)] thisescape(v);
return this;
Get Compiles the select statement based on the other functions called and runs the query access public param string the table param string the limit clause param string the offset clause return object function get(table '', limit null, offset null) if (table ! '')
this_track_aliases(table);
thisfrom(table);
if ( ! is_null(limit)) thislimit(limit, offset);
sql this_compile_select();
result thisquery(sql);
this_reset_select();
return result;
"Count All Results" query Generates a platformspecific query string that counts all records returned by an Active Record query.
access public param string return string function count_all_results(table '') if (table ! '')
this_track_aliases(table);
thisfrom(table);
sql this_compile_select(this_count_string. this_protect_identifiers('numrows'));
query thisquery(sql);
this_reset_select();
if (querynum_rows() 0) return '0';
row queryrow();
return rownumrows;
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 ! '')
thisfrom(table);
if ( ! is_null(where)) thiswhere(where);
if ( ! is_null(limit)) thislimit(limit, offset); sql this_compile_select(); result thisquery(sql); this_reset_select();
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);
Insert Compiles an insert string and runs the query access public param string the table to retrieve the results from param array an associative array of insert values return object function insert(table '', set NULL) { if ( ! is_null(set)) thisset(set);
if (count(thisar_set) 0) if (thisdb_debug) return thisdisplay_error('db_must_use_set');
return FALSE; if (table '') if ( ! isset(thisar_from)) if (thisdb_debug) return thisdisplay_error('db_must_set_table');
return FALSE; table thisar_from;
sql this_insert(this_protect_identifiers(table, TRUE, NULL, FALSE), array_keys(thisar_set), array_values(thisar_set));
this_reset_write();
return thisquery(sql);
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();
if ( ! is_null(set)) thisset(set);
if (count(thisar_set) 0) if (thisdb_debug) return thisdisplay_error('db_must_use_set');
return FALSE;
if (table '') if ( ! isset(thisar_from)) if (thisdb_debug) return thisdisplay_error('db_must_set_table');
return FALSE;
table thisar_from;
if (where ! NULL) thiswhere(where);
if (limit ! NULL) thislimit(limit);
sql this_update(this_protect_identifiers(table, TRUE, NULL, FALSE), thisar_set, thisar_where, thisar_orderby, thisar_limit);
this_reset_write();
return thisquery(sql);
Empty Table Compiles a delete string and runs "DELETE FROM table" access public param string the table to empty return object function empty_table(table '') if (table '') if ( ! isset(thisar_from)) if (thisdb_debug) return thisdisplay_error('db_must_set_table');
return FALSE;
table thisar_from;
else table this_protect_identifiers(table, TRUE, NULL, FALSE);
sql this_delete(table);
this_reset_write();
return thisquery(sql);
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');
return FALSE;
table thisar_from;
else table this_protect_identifiers(table, TRUE, NULL, FALSE);
sql this_truncate(table);
this_reset_write();
return thisquery(sql);
Delete Compiles a delete string and runs the query access public param mixed the table(s) to delete from. String or array param mixed the where clause param mixed the limit clause param boolean return object function delete(table '', where '', limit NULL, reset_data TRUE) Combine any cached components with the current statements this_merge_cache();
if (table '') if ( ! isset(thisar_from)) if (thisdb_debug) return thisdisplay_error('db_must_set_table');
return FALSE;
table thisar_from;
elseif (is_array(table)) foreach(table as single_table) thisdelete(single_table, where, limit, FALSE);
this_reset_write();
return; else table this_protect_identifiers(table, TRUE, NULL, FALSE); if (where ! '') thiswhere(where);
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');
return FALSE;
} sql this_delete(table, thisar_where, thisar_like, thisar_limit);
if (reset_data) this_reset_write();
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');
return thisdbprefix.table;
Track Aliases Used to track SQL statements written with aliased tables.
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));
if a table alias is used we can recognize it by a space if (strpos(table, ) ! FALSE) if the alias is written with the AS keyword, remove it table preg_replace(' AS i', ' ', table);
Grab the alias table trim(strrchr(table, ));
Store the alias, if it doesn't already exist if ( ! in_array(table, thisar_aliased_tables)) thisar_aliased_tables table;
Compile the SELECT statement Generates a query string based on which functions were used.
Should not be called directly. The get() function calls it.
access private return string function _compile_select(select_override FALSE) Combine any cached components with the current statements this_merge_cache();
Write the portion of the query if (select_override ! FALSE) sql select_override;
else sql ( ! thisar_distinct) ? 'SELECT ': 'SELECT DISTINCT ';
if (count(thisar_select) 0) sql. '';
else { Cycle through the portion of the query and prep each column name.
The reason we protect identifiers here rather then in the select() function is because until the user calls the from() function we don't know if there are aliases foreach (thisar_select as key val) thisar_select this_protect_identifiers(val);
sql. implode(', ', thisar_select);
Write the portion of the query if (count(thisar_from) 0) sql.;
sql. this_from_tables(thisar_from);
Write the portion of the query if (count(thisar_join) 0) sql.;
sql. implode(, thisar_join);
Write the portion of the query if (count(thisar_where) 0 OR count(thisar_like) 0) sql.; sql.; sql. implode(, thisar_where);
Write the portion of the query if (count(thisar_like) 0) if (count(thisar_where) 0) sql.; sql. implode(, thisar_like);
Write the portion of the query if (count(thisar_groupby) 0) sql.; sql. implode(', ', thisar_groupby);
Write the portion of the query if (count(thisar_having) 0) sql.; sql. implode(, thisar_having);
Write the portion of the query if (count(thisar_orderby) 0) sql.; sql. implode(', ', thisar_orderby);
if (thisar_order ! FALSE) sql. (thisar_order 'desc') ? ' DESC': ' ASC'; } Write the portion of the query if (is_numeric(thisar_limit)) sql.; sql this_limit(sql, thisar_limit, thisar_offset);
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;
return array; Start Cache Starts AR caching access public return void function start_cache() thisar_caching TRUE;
Stop Cache Stops AR caching access public return void function stop_cache() thisar_caching FALSE;
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() );
Merge Cache When called, this function merges any cached AR arrays with locally called ones.
access private return void function _merge_cache() if (count(thisar_cache_exists) 0) return;
foreach (thisar_cache_exists as val) ar_variable 'ar_'.val;
ar_cache_var 'ar_cache_'.val;
if (count(thisar_cache_var) 0) continue;
thisar_variable array_unique(array_merge(thisar_cache_var, thisar_variable));
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);
Resets the active record values. Called by the get() function access private param array An array of fields to reset return void function _reset_run(ar_reset_items) foreach (ar_reset_items as item default_value) if ( ! in_array(item, thisar_store_array)) thisitem default_value;
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, );
this_reset_run(ar_reset_items); Resets the active record values.
Called by the insert() update() and delete() functions access private return void function _reset_write() { ar_reset_items array( 'ar_set' array(), 'ar_from' array(), 'ar_where' array(), 'ar_like' array(), 'ar_orderby' array(), 'ar_limit' FALSE, 'ar_order' FALSE );
this_reset_run(ar_reset_items);
class CI_DB_odbc_driver extends CI_DB { var dbdriver 'odbc';
the character used to excape not necessary for ODBC var _escape_char '';
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.
var _count_string "SELECT COUNT() AS ";
var _random_keyword;
function CI_DB_odbc_driver(params) parent:CI_DB(params);
this_random_keyword ' RND('.time().')'; database specific random keyword Nonpersistent database connection access private called by the base class return resource function db_connect() return odbc_connect(thishostname, thisusername, thispassword);
Persistent database connection access private called by the base class return resource function db_pconnect() return odbc_pconnect(thishostname, thisusername, thispassword);
Select the database access private called by the base class return resource function db_select() Not needed for ODBC return TRUE;
Set client character set access public param string param string return resource function db_set_charset(charset, collation) todo add support if needed return TRUE;
Version number query string access public return string function _version() return "SELECT version() AS ver";
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);
return odbc_exec(thisconn_id, sql);
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;
Begin Transaction access public return bool function trans_begin(test_mode FALSE) if ( ! thistrans_enabled) return TRUE;
When transactions are nested we only begincommitrollback the outermost ones if (this_trans_depth 0) return TRUE;
Reset the transaction failure flag.
If the test_mode flag is set to TRUE transactions will be rolled back even if the queries produce a successful result.
this_trans_failure (test_mode TRUE) ? TRUE: FALSE;
return odbc_autocommit(thisconn_id, FALSE);
Commit Transaction access public return bool function trans_commit() if ( ! thistrans_enabled) return TRUE;
When transactions are nested we only begincommitrollback the outermost ones if (this_trans_depth 0) return TRUE;
ret odbc_commit(thisconn_id);
odbc_autocommit(thisconn_id, TRUE);
return ret;
Rollback Transaction access public return bool function trans_rollback() if ( ! thistrans_enabled) return TRUE;
When transactions are nested we only begincommitrollback the outermost ones if (this_trans_depth 0) return TRUE;
ret odbc_rollback(thisconn_id);
odbc_autocommit(thisconn_id, TRUE);
return ret;
Escape String access public param string return string function escape_str(str) Access the CI object CI get_instance();
ODBC doesn't require escaping return CI_remove_invisible_characters(str);
Affected Rows access public return integer function affected_rows() return odbc_num_rows(thisconn_id);
Insert ID access public return integer function insert_id() return odbc_insert_id(thisconn_id);
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;
query thisquery(this_count_string. this_protect_identifiers('numrows').. this_protect_identifiers(table, TRUE, NULL, FALSE));
if (querynum_rows() 0) return 0;
row queryrow();
return (int) rownumrows;
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.;
if (prefix_limit ! FALSE AND thisdbprefix ! '')
sql..thisdbprefix.;
return FALSE; not currently supported return sql;
Show column query Generates a platformspecific query string so that the column names can be fetched access public param string the table name return string function _list_columns(table '') return "SHOW COLUMNS FROM ".table;
Field data query Generates a platformspecific query so that the column data can be retrieved access public param string the table name return object function _field_data(table) return "SELECT TOP 1 FROM ".table;
The error message string access private return string function _error_message() return odbc_errormsg(thisconn_id);
The error message number access private return integer function _error_number() return odbc_error(thisconn_id);
Escape the SQL Identifiers This function escapes column and table names access private param string return string function _escape_identifiers(item) if (this_escape_char '') return item;
foreach (this_reserved_identifiers as id) if (strpos(item, '.'.id) ! FALSE) str this_escape_char. str_replace('.', this_escape_char.'.', item);
remove duplicates if the user already included the escape return preg_replace('['.this_escape_char.']+', this_escape_char, str);
} if (strpos(item, '.') ! FALSE) str this_escape_char.str_replace('.', this_escape_char.'.'.this_escape_char, item).this_escape_char;
else str this_escape_char.item.this_escape_char;
remove duplicates if the user already included the escape return preg_replace('['.this_escape_char.']+', this_escape_char, str);
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);
return '('.implode(', ', tables).')';
Insert statement Generates a platformspecific insert string from the supplied data access public param string the table name param array the insert keys param array the insert values return string function _insert(table, keys, values) { return.table..implode(', ', keys)..implode(', ', values).;
Update statement Generates a platformspecific update string from the supplied data access public param string the table name param array the update data param array the where clause param array the orderby clause param array the limit clause return string function _update(table, values, where, orderby array(), limit FALSE) foreach(values as key val) valstr key..val;
limit ( ! limit) ? '': ' LIMIT '.limit;
orderby (count(orderby) 1)?' ORDER BY '.implode(, orderby):'';
sql.table..implode(', ', valstr);
sql. (where ! '' AND count(where) 1) ?.implode(, where): '';
sql. orderby.limit;
return sql;
Truncate statement Generates a platformspecific truncate string from the supplied data If the database does not support the truncate() command This function maps to "DELETE FROM table" access public param string the table name return string function _truncate(table) return this_delete(table);
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 '';
if (count(where) 0 OR count(like) 0) conditions;
conditions. implode(, thisar_where);
if (count(where) 0 count(like) 0) conditions.;
conditions. implode(, like);
limit ( ! limit) ? '': ' LIMIT '.limit;
return.table.conditions.limit;
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?
return sql;
Close DB Connection access public param resource return void function _close(conn_id) require_once('Parser.php');
require_once('BIFFwriter.php');
Class for generating Excel Spreadsheets author Xavier Noguer xnoguerrezebra.com package Spreadsheet_WriteExcel class Worksheet extends BIFFwriter { Constructor param string name The name of the new worksheet param integer index The index of the new worksheet param mixed activesheet The current activesheet of the workbook we belong to param mixed firstsheet The first worksheet in the workbook we belong to param mixed url_format The default format for hyperlinks param mixed parser The formula parser created for the Workbook function Worksheet(name,index,activesheet,firstsheet,url_format,parser) thisBIFFwriter(); It needs to call its parent's constructor explicitly rowmax 65536; 16384 in Excel 5 colmax 256;
strmax 255;thisname name;thisindex index;thisactivesheet activesheet;
thisfirstsheet firstsheet;this_url_format url_format;this_parser parser;thisext_sheets array();this_using_tmpfile 1;
this_filehandle;thisfileclosed 0;
thisoffset 0;thisxls_rowmax rowmax;
thisxls_colmax colmax;thisxls_strmax strmax;
thisdim_rowmin rowmax +1;thisdim_rowmax 0;
thisdim_colmin colmax +1;thisdim_colmax 0;
thiscolinfo array();this_selection array(0,0,0,0);
this_panes array();this_active_pane 3;this_frozen 0;thisselected 0;this_paper_size 0x0;this_orientation 0x1;this_header '';
this_footer '';this_hcenter 0;this_vcenter 0;
this_margin_head 0.50;this_margin_foot 0.50;this_margin_left 0.5;
this_margin_right 0.75;this_margin_top 1.00;this_margin_bottom 1.00;this_title_rowmin NULL;this_title_rowmax NULL;
this_title_colmin NULL;this_title_colmax NULL;this_print_rowmin NULL;
this_print_rowmax NULL;this_print_colmin NULL;this_print_colmax NULL;
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();
thisrow_sizes array();this_zoom 100;
this_print_scale 100;this_initialize();
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.
function _initialize() Open tmp file for storing Worksheet data fh tmpfile();
if ( fh) { Store filehandle this_filehandle fh;
else { If tmpfile() fails store data in memory this_using_tmpfile 0;
Add data to the beginning of the workbook (note the reverse order) and to the end of the workbook.
access public see Workbook:store_workbook() param array sheetnames The array of sheetnames from the Workbook this worksheet belongs to function close(sheetnames) num_sheets count(sheetnames);
Prepend in reverse order!
Prepend the sheet dimensions this_store_dimensions();
Prepend the sheet password this_store_password();
Prepend the sheet protection this_store_protect();
Prepend the page setup this_store_setup();
Prepend the bottom margin this_store_margin_bottom();
Prepend the top margin this_store_margin_top();
Prepend the right margin this_store_margin_right();
Prepend the left margin this_store_margin_left();
Prepend the page vertical centering thisstore_vcenter();
Prepend the page horizontal centering thisstore_hcenter();
Prepend the page footer thisstore_footer();
Prepend the page header thisstore_header();
Prepend the vertical page breaks this_store_vbreak();
Prepend the horizontal page breaks this_store_hbreak();
Prepend WSBOOL this_store_wsbool(); Prepend GRIDSET this_store_gridset();
Prepend PRINTGRIDLINES this_store_print_gridlines(); Prepend PRINTHEADERS this_store_print_headers(); Prepend EXTERNSHEET references for (i num_sheets; i 0; i) { sheetname sheetnames;
this_store_externsheet(sheetname); Prepend the EXTERNCOUNT of external references.this_store_externcount(num_sheets);
Prepend the COLINFO records if they exist if (!empty(thiscolinfo)){ for(i0; i count(thiscolinfo); i++) this_store_colinfo(thiscolinfo);
this_store_defcol(); Prepend the BOF record this_store_bof(0x010);
End of prepend. Read upwards from here.
Append this_store_window2();
this_store_zoom();
if(!empty(this_panes)) this_store_panes(this_panes);
this_store_selection(this_selection);
this_store_eof();
Retrieve the worksheet name. This is usefull when creating worksheets without a name.
access public return string The worksheet's name function get_name() return(thisname);
Retrieves data from memory in one chunk, or from disk in buffer sized chunks.
return string The data function get_data() buffer 4096;
Return data stored in memory if (isset(this_data)) { tmp this_data;
unset(this_data);
fh this_filehandle;
if (this_using_tmpfile) { fseek(fh, 0);
return(tmp);
Return data stored on disk if (this_using_tmpfile) { if (tmp fread(this_filehandle, buffer)) { return(tmp);
No data to return return('');
Set this worksheet as a selected worksheet, i.e. the worksheet has its tab highlighted.
access public function select() thisselected 1;
Set this worksheet as the active worksheet, i.e. the worksheet that is displayed when the workbook is opened. Also set it as selected.
access public function activate() thisselected 1;
thisactivesheet thisindex;
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.
access public function set_first_sheet() thisfirstsheet thisindex;
Set the worksheet protection flag to prevent accidental modification and to hide formulas if the locked and hidden format properties have been set.
access public param string password The password to use for protecting the sheet.
function protect(password) this_protect 1;
this_password this_encode_password(password);
Set the width of a single column or a range of columns.
access public see _store_colinfo() param integer firstcol first column on the range param integer lastcol last column on the range param integer width width to set param mixed format The optional XF format to apply to the columns param integer hidden The optional hidden atribute function set_column(firstcol, lastcol, width, format 0, hidden 0) thiscolinfo array(firstcol, lastcol, width, format, hidden);
Set width to zero if column is hidden width (hidden) ? 0: width;
for(col firstcol; col lastcol; col++) { thiscol_sizes width;
Set which cell or cells are selected in a worksheet access public param integer first_row first row in the selected quadrant param integer first_column first column in the selected quadrant param integer last_row last row in the selected quadrant param integer last_column last column in the selected quadrant see _store_selection() function set_selection(first_row,first_column,last_row,last_column) this_selection array(first_row,first_column,last_row,last_column);
Set panes and mark them as frozen.
access public param array panes This is the only parameter received and is composed of the following:
0 Vertical split position, 1 Horizontal split position 2 Top row visible 3 Leftmost column visible 4 Active pane function freeze_panes(panes) this_frozen 1;
this_panes panes;
Set panes and mark them as unfrozen.
access public param array panes This is the only parameter received and is composed of the following:
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;
this_panes panes;
Set the page orientation as portrait.
access public function set_portrait() this_orientation 1;
Set the page orientation as landscape.
access public function set_landscape() this_orientation 0;
Set the paper type. Ex. 1 US Letter, 9 A4 access public param integer size The type of paper size to use function set_paper(size 0) this_paper_size size;
Set the page header caption and optional margin.
access public param string string The header text param float margin optional head margin in inches.
function set_header(string,margin 0.50)
if (strlen(string) 255) { carp 'Header string must be less than 255 characters';
return;
this_header string;
this_margin_head margin;
Set the page footer caption and optional margin.
access public param string string The footer text param float margin optional foot margin in inches.
function set_footer(string,margin 0.50)
if (strlen(string) 255) { carp 'Footer string must be less than 255 characters';
return;
this_footer string;
this_margin_foot margin;
Center the page horinzontally.
access public param integer center the optional value for centering. Defaults to 1 (center).
function center_horizontally(center 1) this_hcenter center;
Center the page horinzontally.
access public param integer center the optional value for centering. Defaults to 1 (center).
function center_vertically(center 1) this_vcenter center;
Set all the page margins to the same value in inches.
access public param float margin The margin to set in inches function set_margins(margin) thisset_margin_left(margin);
thisset_margin_right(margin);
thisset_margin_top(margin);
thisset_margin_bottom(margin);
Set the left and right margins to the same value in inches.
access public param float margin The margin to set in inches function set_margins_LR(margin) thisset_margin_left(margin);
thisset_margin_right(margin);
Set the top and bottom margins to the same value in inches.
access public param float margin The margin to set in inches function set_margins_TB(margin) thisset_margin_top(margin);
thisset_margin_bottom(margin);
Set the left margin in inches.
access public param float margin The margin to set in inches function set_margin_left(margin 0.75)
this_margin_left margin;
Set the right margin in inches.
access public param float margin The margin to set in inches function set_margin_right(margin 0.75)
this_margin_right margin;
Set the top margin in inches.
access public param float margin The margin to set in inches function set_margin_top(margin 1.00)
this_margin_top margin;
Set the bottom margin in inches.
access public param float margin The margin to set in inches function set_margin_bottom(margin 1.00)
this_margin_bottom margin;
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.
function repeat_rows(first_row, last_row NULL) this_title_rowmin first_row;
if(isset(last_row)) { Second row is optional this_title_rowmax last_row;
else { this_title_rowmax first_row;
Set the columns to repeat at the left hand side of each printed page.
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.
function repeat_columns(first_col, last_col NULL) this_title_colmin first_col;
if(isset(last_col)) { Second col is optional this_title_colmax last_col;
else { this_title_colmax first_col;
Set the area of each worksheet that will be printed.
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;
this_print_colmin first_col;
this_print_rowmax last_row;
this_print_colmax last_col;
Set the option to hide gridlines on the printed page.
access public see _store_print_gridlines(), _store_gridset() function hide_gridlines() this_print_gridlines 0;
Set the option to print the row and column headers on the printed page.
See also the _store_print_headers() method below.
access public see _store_print_headers() param integer print Whether to print the headers or not. Defaults to 1 (print).
function print_row_col_headers(print 1) this_print_headers print;
Store the vertical and horizontal number of pages that will define the maximum area printed. It doesn't seem to work with OpenOffice.
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;
this_fit_width width;
this_fit_height height;
Store the horizontal page breaks on a worksheet (for printing).
The breaks represent the row after which the break is inserted.
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);
Store the vertical page breaks on a worksheet (for printing).
The breaks represent the column after which the break is inserted.
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);
Set the worksheet zoom factor.
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";
scale 100;
this_zoom floor(scale);
Set the scale factor for the printed page.
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");
scale 100;
Turn off option this_fit_page 0;
this_print_scale floor(scale);
Map to the appropriate write method acording to the token recieved.
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(_);
} Match an array ref.
if (ref token eq ) { return thiswrite_row(_);
} Match number if (preg_match("^(?)(?\d|\.\d)\d(\.\d)?((?\d+))?",token)) { return thiswrite_number(row,col,token,format);
Match http or ftp URL elseif (preg_match(,token)) { return thiswrite_url(row, col, token, format);
Match mailto:
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 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 blank elseif (token '') { return thiswrite_blank(row,col,format);
Default: match string else { return thiswrite_string(row,col,token,format);
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)
return(formatget_xf_index());
else return(0x0F);
Internal methods Store Worksheet data in memory using the parent's class append() or to a temporary file, the default.
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);
fwrite(this_filehandle,data);
this_datasize + strlen(data);
else { parent:_append(data);
Substitute an Excel cell reference in A1 notation for zero based row and column values in an argument list.
Ex: (, ) is converted to (3, 0, ).
param string cell The cell reference. Or range of cells.
return array function _substitute_cellref(cell) cell strtoupper(cell);
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 a cell range: 'A1:B7' if (preg_match("\?(?\?\d+):\?(?\?\d+)",cell,match)) { list(row1, col1) this_cell_to_rowcol(match);
list(row2, col2) this_cell_to_rowcol(match);
return(array(row1, col1, row2, col2));
Convert a cell reference: 'A1' or 'AD2000' if (preg_match("\?(?\?\d+)",cell)) { list(row1, col1) this_cell_to_rowcol(match);
return(array(row1, col1));
die("Unknown cell reference cell ");
Convert an Excel cell reference in A1 notation to a zero based row and column reference; converts C1 to (0, 2).
param string cell The cell reference.
return array containing (row, column) function _cell_to_rowcol(cell) preg_match("\?(?)\?(\d+)",cell,match);
col match;
row match;
Convert base26 column string to number chars split('', col);
expn 0;
col 0;
while (chars) { char array_pop(chars); LS char first col + (ord(char) ord('A') +1) pow(26,expn);
expn++;
Convert 1index to zeroindex row;
col;
return(array(row, col));
Based on the algorithm provided by Daniel Rentz of OpenOffice.
param string plaintext The password to be encoded in plaintext.
return string The encoded password function _encode_password(plaintext) password 0x0000;
i 1; char position split the plain text password in its component characters chars preg_split('', plaintext, 1, PREG_SPLIT_NO_EMPTY);
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;
bit_17 15;
value 0x7fff; first 15 bits password ^ (value | bit_16);
password ^ (value | bit_16 | bit_17);
i++;
password ^ strlen(plaintext);
password ^ 0xCE4B;
return(password);
BIFF RECORDS Write a double to the specified row and column (zero indexed).
An integer can be written as a double. Excel will display an integer. format is optional.
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);
if (col thisxls_colmax) return(2);
if (row thisdim_rowmin) thisdim_rowmin row;
if (row thisdim_rowmax) thisdim_rowmax row;
if (col thisdim_colmin) thisdim_colmin col;
if (col thisdim_colmax) thisdim_colmax col;
header pack(, record, length);
data pack(, row, col, xf);
xl_double pack(, num);
if (this_byte_order) if it's Big Endian xl_double strrev(xl_double);
this_append(header.data.xl_double);
return(0);
Write a string to the specified row and column (zero indexed).
NOTE: there is an Excel 5 defined limit of 255 characters.
format is optional.
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);
record 0x0204; Record identifier length 0x0008 + strlen; Bytes to follow xf this_XF(format); The cell format str_error 0;
Check that row and col are valid and store max and min values if (row thisxls_rowmax) return(2);
if (col thisxls_colmax) return(2);
if (row thisdim_rowmin) thisdim_rowmin row;
if (row thisdim_rowmax) thisdim_rowmax row;
if (col thisdim_colmin) thisdim_colmin col;
if (col thisdim_colmax) thisdim_colmax col;
if (strlen thisxls_strmax) LABEL must be 255 chars str substr(str, 0, thisxls_strmax);
length 0x0008 + thisxls_strmax;
strlen thisxls_strmax;
str_error 3;
header pack(, record, length);
data pack(, row, col, xf, strlen);
this_append(header.data.str);
return(str_error);
Writes a note associated with the cell given by the row and column.
NOTE records don't have a length limit.
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);
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);
if (col thisxls_colmax) return(2);
if (row thisdim_rowmin) thisdim_rowmin row;
if (row thisdim_rowmax) thisdim_rowmax row;
if (col thisdim_colmin) thisdim_colmin col;
if (col thisdim_colmax) thisdim_colmax col;
Length for this record is no more than 2048 + 6 length 0x0006 + min(note_length, 2048);
header pack(, record, length);
data pack(, row, col, note_length);
this_append(header.data.substr(note, 0, 2048));
for(i max_length; i note_length; i + max_length) chunk substr(note, i, max_length);
length 0x0006 + strlen(chunk);
header pack(, record, length);
data pack(, 1, 0, strlen(chunk));
this_append(header.data.chunk);
return(0);
Write a blank cell to the specified row and column (zero indexed).
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.
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);
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);
if (col thisxls_colmax) return(2);
if (row thisdim_rowmin) thisdim_rowmin row;
if (row thisdim_rowmax) thisdim_rowmax row;
if (col thisdim_colmin) thisdim_colmin col;
if (col thisdim_colmax) thisdim_colmax col;
header pack(, record, length);
data pack(, row, col, xf);
this_append(header.data);
return 0;
Write a formula to the specified row and column (zero indexed).
The textual representation of the formula is passed to the parser in Parser.php which returns a packed binary string.
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.
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.
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);
if (col thisxls_colmax) return(2);
if (row thisdim_rowmin) thisdim_rowmin row;
if (row thisdim_rowmax) thisdim_rowmax row;
if (col thisdim_colmin) thisdim_colmin col;
if (col thisdim_colmax) thisdim_colmax col;
Strip the '' or '' sign at the beginning of the formula string if (ereg(,formula)) { formula preg_replace(,,formula);
elseif(ereg(,formula)) { formula preg_replace(,,formula);
else { die("Unrecognised character for formula");
Parse the formula using the parser in Parser.php tree new Parser(this_byte_order);
this_parserparse(formula);
treeparse(formula);
formula this_parserto_reverse_polish();
formlen strlen(formula); Length of the binary string length 0x16 + formlen; Length of the record data header pack(, record, length);
data pack(, row, col, xf, num, grbit, chn, formlen);
this_append(header.data.formula);
return 0;
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.
string and format are optional and their order is interchangeable.
The hyperlink can be to a http, ftp, mail, internal sheet, or external directory url.
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));
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').
See also write_url() above for a general description and return values.
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));
if (preg_match('', url)) { return(this_write_url_external(row1, col1, row2, col2, url, string, format));
return(this_write_url_web(row1, col1, row2, col2, url, string, format));
Used to write http, ftp and mailto hyperlinks.
The link type (options) is 0x03 is the same as absolute dir ref without sheet. However it is differentiated by the unknown2 data stream.
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;
Write the visible label using the write_string() method.
if(str '') { str url;
str_error thiswrite_string(row1, col1, str, format);
if (str_error 2) { return(str_error);
Pack the undocumented parts of the hyperlink stream unknown1 pack(, "D0C9EA79F9BACE118C8200AA004BA90B02000000");
unknown2 pack(, "E0C9EA79F9BACE118C8200AA004BA90B");
Pack the option flags options pack(, 0x03);
Convert URL to a null terminated wchar string url join(, preg_split(, url, 1, PREG_SPLIT_NO_EMPTY));
url url.;
Pack the length of the URL url_len pack(, strlen(url));
Calculate the data length length 0x34 + strlen(url);
Pack the header data header pack(, record, length);
data pack(, row1, row2, col1, col2);
Write the packed data this_append( header. data.
unknown1. options.
unknown2. url_len. url);
return(str_error);
Used to write internal reference hyperlinks such as.
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;
Strip URL type url preg_replace('s', '', url);
Write the visible label if(str '') { str url;
str_error thiswrite_string(row1, col1, str, format);
if (str_error 2) { return(str_error);
Pack the undocumented parts of the hyperlink stream unknown1 pack(, "D0C9EA79F9BACE118C8200AA004BA90B02000000");
Pack the option flags options pack(, 0x08);
Convert the URL type and to a null terminated wchar string url join(, preg_split(, url, 1, PREG_SPLIT_NO_EMPTY));
url url.;
Pack the length of the URL as chars (not wchars) url_len pack(, floor(strlen(url)2));
Calculate the data length length 0x2

Список литературы [ всего 68]

СПИСОКᅠ ИСПОЛЬЗОВАННОЙᅠ ЛИТЕРАТУРЫ
2. Обᅠ общихᅠ принципахᅠ организацииᅠ местногоᅠ самоуправления:ᅠ Федеральныйᅠ законᅠ отᅠ 6ᅠ октябряᅠ 2003ᅠ г.ᅠ //ᅠ Российскаяᅠ газета.ᅠ 2003.8ᅠ окт.
3. Уголовныйᅠ кодексᅠ РФᅠ (отᅠ 13ᅠ июняᅠ 1996ᅠ г.)ᅠ //ᅠ Собраниеᅠ законодательстваᅠ РФ.ᅠ 1996.ᅠ №25.
4. Гражданскийᅠ кодексᅠ РФ.ᅠ Ч.ᅠ 2ᅠ (отᅠ 26ᅠ январяᅠ 1996ᅠ г.)ᅠ //ᅠ Собраниеᅠ законодательстваᅠ РФ.ᅠ 1996.ᅠ №5.
5. Семейныйᅠ кодексᅠ РФᅠ (отᅠ 25ᅠ декабряᅠ 1995ᅠ г.)ᅠ //ᅠ Собраниеᅠ законодательстваᅠ РФ.ᅠ 1996.ᅠ №1.
6. Собраниеᅠ законодательстваᅠ РФ.ᅠ 2001.ᅠ №52.ᅠ Ст.ᅠ 49-51.
7. Собраниеᅠ законодательстваᅠ РФ.ᅠ 1999.ᅠ №6.ᅠ Ст.ᅠ 867,
8. Оᅠ толкованииᅠ содержащегосяᅠ вᅠ ч.ᅠ 4ᅠ ст.ᅠ 66ᅠ Конституцииᅠ РФᅠ положенияᅠ оᅠ вхожденииᅠ автономногоᅠ округаᅠ вᅠ составᅠ края,ᅠ области:ᅠ Постановлениеᅠ Конституционногоᅠ Судаᅠ РФᅠ отᅠ 10ᅠ июляᅠ 1997ᅠ г.ᅠ №12-Пᅠ поᅠ делуᅠ //ᅠ Собраниеᅠ законодательстваᅠ РФ.ᅠ 1997.ᅠ №29.ᅠ Ст.ᅠ 3581;ᅠ
9. Оᅠ некоторыхᅠ вопросахᅠ примененияᅠ судамиᅠ Конституцииᅠ Российскойᅠ Федерации:ᅠ Постановлениеᅠ Пленумаᅠ Верховногоᅠ судаᅠ РФᅠ отᅠ 31ᅠ октябряᅠ 1995ᅠ г.ᅠ №8ᅠ //ᅠ Бюллетеньᅠ Верховногоᅠ Судаᅠ РФ.ᅠ 1996.ᅠ №1;ᅠ
10. Оᅠ некоторыхᅠ вопросахᅠ примененияᅠ частиᅠ первойᅠ Налоговогоᅠ кодексаᅠ РФ:ᅠ Постановлениеᅠ Пленумаᅠ Высшегоᅠ арбитражногоᅠ судаᅠ РФᅠ отᅠ 28ᅠ февраляᅠ 2001ᅠ г.ᅠ №5ᅠ //ᅠ Вестникᅠ Высшегоᅠ арбитражногоᅠ судаᅠ РФ.ᅠ 2001.ᅠ №7.
11. Алексеевᅠ С.С.ᅠ Правоᅠ иᅠ правоваяᅠ системаᅠ //ᅠ Правоведение.ᅠ 1980.ᅠ №1;ᅠ
12. Алексеевᅠ С.С.ᅠ Право:ᅠ азбукаᅠ -ᅠ теорияᅠ -ᅠ философия:ᅠ Опытᅠ комплексногоᅠ исследованияᅠ M.,ᅠ 2009.ᅠ С.ᅠ 592.
13. Алексеевᅠ С.С.ᅠ Общиеᅠ теоретическиеᅠ проблемыᅠ системыᅠ советскогоᅠ права...ᅠ С.ᅠ 7.
14. Байтинᅠ М.И.ᅠ Правоᅠ -ᅠ связующееᅠ звеноᅠ междуᅠ политическойᅠ властью,ᅠ государствомᅠ иᅠ правовойᅠ системойᅠ обществаᅠ //Вопросыᅠ теорииᅠ государстваᅠ иᅠ права.ᅠ Вып.ᅠ 8.ᅠ Саратов,ᅠ 1988.
15. Барановᅠ В.М.ᅠ Системаᅠ советскогоᅠ праваᅠ иᅠ перспективыᅠ ееᅠ развитияᅠ //ᅠ Советскоеᅠ государствоᅠ иᅠ право.ᅠ 1982.ᅠ №7.ᅠ С.ᅠ 117.
16. Васильевᅠ A.M.ᅠ Правовыеᅠ категории.ᅠ Методологическиеᅠ аспектыᅠ разработкиᅠ системыᅠ категорийᅠ теорииᅠ права.ᅠ М.,ᅠ 1976.ᅠ С.ᅠ 156.
17. Воронихинᅠ А.С.ᅠ Идеяᅠ системностиᅠ вᅠ светеᅠ ленинскойᅠ концепцииᅠ развития:ᅠ Автореф.ᅠ дис.ᅠ ...ᅠ канд.ᅠ филос.ᅠ наук.ᅠ М.,ᅠ 1974.ᅠ С.ᅠ 9.
18. Горбуноваᅠ O.H.ᅠ Финансовоеᅠ право:ᅠ Учебник.,ᅠ 2006.ᅠ С.ᅠ 32.
19. Давидᅠ Р.,ᅠ Жоффре-Спинозиᅠ К.ᅠ Основныеᅠ правовыеᅠ системыᅠ современности.ᅠ М.,ᅠ 2007.ᅠ С.ᅠ 20-21.
20. Дембоᅠ Л.И.ᅠ Оᅠ принципахᅠ построенияᅠ системыᅠ праваᅠ //ᅠ Советскоеᅠ государствоᅠ иᅠ право.ᅠ 1956.ᅠ №8.ᅠ С.ᅠ 87.
21. Дробышевскийᅠ С.А.ᅠ Историяᅠ политическихᅠ иᅠ правовыхᅠ учений.ᅠ Разработкаᅠ проблемᅠ общейᅠ теорииᅠ государстваᅠ иᅠ праваᅠ вᅠ трудахᅠ Р.ᅠ Паунда.ᅠ Москва.ᅠ 2013.ᅠ С.382.
22. Захаровᅠ Ю.Р.ᅠ Содержаниеᅠ иᅠ формаᅠ вᅠ системе:ᅠ Автореф.ᅠ дис....ᅠ канд.ᅠ филос.ᅠ наук.ᅠ М.,ᅠ 1978.ᅠ С.ᅠ 15.
23. Ивановᅠ А.А.ᅠ Качествоᅠ законовᅠ иᅠ деятельностьᅠ арбитражныхᅠ судовᅠ //ᅠ Журналᅠ российскогоᅠ права.ᅠ 2005.ᅠ №4.ᅠ С.ᅠ 27.
24. Кантᅠ И.ᅠ Метафизическиеᅠ началаᅠ ученияᅠ оᅠ праве.ᅠ М.,ᅠ 2000.ᅠ С.ᅠ 523.
25. Керимовᅠ Д.А.ᅠ Кодификацияᅠ иᅠ законодательнаяᅠ техника.ᅠ M.,ᅠ 2002.ᅠ С.ᅠ 93.
26. Керимовᅠ Д.А.ᅠ Методологияᅠ права.ᅠ 2ᅠ изд.ᅠ М.,ᅠ 2011.ᅠ С.ᅠ 267.
27. Козлихинᅠ И.Ю.ᅠ Идеяᅠ правовогоᅠ государства.ᅠ Историяᅠ иᅠ современность.ᅠ СПб.,ᅠ 2003.ᅠ С.ᅠ 90.
28. Компьютерныеᅠ технологииᅠ вᅠ юридическойᅠ деятельностиᅠ /ᅠ Подᅠ ред.ᅠ Н.ᅠ Полевого,ᅠ В.ᅠ Крылова.ᅠ М.,ᅠ 2004.ᅠ С.ᅠ 15.
29. Кривошееваᅠ T.A.ᅠ Интеграцияᅠ российскогоᅠ праваᅠ вᅠ обеспеченииᅠ мировогоᅠ правопорядкаᅠ наᅠ примереᅠ обеспечительныхᅠ мерᅠ вᅠ частномᅠ праве.ᅠ Практическийᅠ взглядᅠ //ᅠ Интеграцияᅠ иᅠ опытᅠ правовыхᅠ преобразованийᅠ вᅠ условияхᅠ вызоваᅠ мировомуᅠ правопорядку:ᅠ Сборникᅠ материаловᅠ международнойᅠ научно-практическойᅠ конференцииᅠ (Москва,ᅠ 17-18ᅠ октябряᅠ 2003ᅠ г.).ᅠ М.,ᅠ 2003.ᅠ С.ᅠ 207.
30. Лазаревᅠ В.В.ᅠ Теорияᅠ праваᅠ иᅠ государства:ᅠ Учебник.ᅠ М,ᅠ 2006.ᅠ С,ᅠ 145.
31. Лазаревᅠ В.В.ᅠ Общаяᅠ теорияᅠ праваᅠ иᅠ государства:ᅠ Учебник.ᅠ М.,ᅠ 1994.ᅠ С.ᅠ 136.
32. Лангеᅠ О.ᅠ Целоеᅠ иᅠ развитиеᅠ вᅠ светеᅠ кибернетикиᅠ //ᅠ Исследованияᅠ поᅠ общейᅠ теорииᅠ систем.ᅠ М.,ᅠ 1969.ᅠ С.ᅠ 181.
33. Летяевᅠ В.А.ᅠ Рецепцияᅠ римскогоᅠ праваᅠ вᅠ Россииᅠ XIXᅠ -ᅠ началаᅠ XXᅠ в.ᅠ (историко-правовойᅠ аспект):ᅠ Автореф.ᅠ дис....ᅠ д-раᅠ юрвд.ᅠ наук.ᅠ Саратов,ᅠ 2001.ᅠ С.ᅠ 15.
34. Лукьяноваᅠ Е.Г.ᅠ Кᅠ вопросуᅠ оᅠ структуреᅠ праваᅠ иᅠ местеᅠ вᅠ нейᅠ правовогоᅠ блокаᅠ //Актуальныеᅠ вопросыᅠ становленияᅠ государственностиᅠ иᅠ правовойᅠ системыᅠ вᅠ России:ᅠ Материалыᅠ научно-теоретическойᅠ конференции.ᅠ Оренбург,ᅠ 2011.ᅠ С.ᅠ 23.
35. Львоваᅠ О.А.ᅠ Трансформацияᅠ правовойᅠ системыᅠ Россииᅠ вᅠ периодᅠ глобализацииᅠ (вопросыᅠ теорииᅠ иᅠ практики).ᅠ Дис....ᅠ канд.ᅠ юрид.ᅠ наук.ᅠ Ульяновск,ᅠ 2013.206ᅠ с.
36. Лушинаᅠ Л.А.ᅠ Нравственно-правовойᅠ нигилизм:ᅠ генезис,ᅠ сущность,ᅠ формы:ᅠ Автореф.ᅠ дис.ᅠ ...ᅠ канд.ᅠ юрид.ᅠ наук.ᅠ Н.Новгород,ᅠ 2013.ᅠ С.ᅠ 15.
37. Мавринᅠ С.П.ᅠ Оᅠ ролиᅠ методаᅠ правовогоᅠ регулированияᅠ вᅠ структурированииᅠ иᅠ развитииᅠ позитивногоᅠ праваᅠ //ᅠ Правоведение.ᅠ 2013.ᅠ №1.ᅠ С.ᅠ 211.
38. Матузовᅠ Н.И.,ᅠ Малькоᅠ А.В.ᅠ Теорияᅠ государстваᅠ иᅠ права:ᅠ Учебник.ᅠ M.,ᅠ 2014.ᅠ С.ᅠ 311.
39. Мельникᅠ B.B.ᅠ Содержаниеᅠ конституционногоᅠ праваᅠ обвиняемогоᅠ наᅠ рассмотрениеᅠ егоᅠ делаᅠ судомᅠ сᅠ участиемᅠ присяжныхᅠ заседателейᅠ //ᅠ Журналᅠ российскогоᅠ права.ᅠ 2011.ᅠ №5.ᅠ С.ᅠ 28.
40. Мешковаᅠ О.Е.ᅠ Трудовоеᅠ правоᅠ вᅠ системеᅠ отраслейᅠ российскогоᅠ права.ᅠ Дис.ᅠ ...ᅠ канд.ᅠ юрид.ᅠ наук.ᅠ Омск,ᅠ 2009.ᅠ С.ᅠ 15.
41. Милушинᅠ М.И.ᅠ Проблемыᅠ формированияᅠ комплексныхᅠ образованийᅠ вᅠ законодательствеᅠ России.ᅠ М.,ᅠ 2003.
42. Монтескьеᅠ Ш.ᅠ Избранныеᅠ произведения.ᅠ M.,ᅠ 1995.ᅠ С.ᅠ 416-417.
43. Морозоваᅠ Л.А.ᅠ Теорияᅠ государстваᅠ иᅠ праваᅠ М.,ᅠ 2012.ᅠ С.ᅠ 232.
44. Нерсесянцᅠ B.C.ᅠ Философияᅠ права.ᅠ М.,ᅠ 2007.ᅠ С.ᅠ 177.
45. Ожеговᅠ С.И.ᅠ Словарьᅠ русскогоᅠ языка.ᅠ М.,ᅠ 1989.ᅠ С.ᅠ 717.
46. Ожеговᅠ С.И.,ᅠ Шведоваᅠ Н.Ю.ᅠ Толковыйᅠ словарьᅠ русскогоᅠ языкаᅠ М,ᅠ 2002.ᅠ С.ᅠ 168.
47. Парсонсᅠ Т.ᅠ Оᅠ структуреᅠ социальногоᅠ действия.ᅠ М.,ᅠ 2010.ᅠ С.ᅠ 546-547.
48. Переваловᅠ В.Д.ᅠ Теорияᅠ государстваᅠ иᅠ права.ᅠ М.,ᅠ 2014.ᅠ С.ᅠ 175.
49. Переваловᅠ В.Д.ᅠ Теорияᅠ государстваᅠ иᅠ права:ᅠ Учебникᅠ дляᅠ вузов.ᅠ М.,ᅠ 2004.ᅠ С.ᅠ 175.
50. Поленинаᅠ С.В.ᅠ Законотворчествоᅠ вᅠ Российскойᅠ Федерации.ᅠ М.,ᅠ 1996.ᅠ С.ᅠ 77.
51. Поляковᅠ А.В.ᅠ Общаяᅠ теорияᅠ права:ᅠ Курсᅠ лекций.ᅠ СПб.,ᅠ 2001.ᅠ С.ᅠ 494.
52. Правоваяᅠ системаᅠ социализма:ᅠ Вᅠ 2ᅠ кн.ᅠ Кн.ᅠ 1:ᅠ Понятие,ᅠ структура,ᅠ социальныеᅠ связиᅠ /ᅠ Отв.ᅠ ред.ᅠ A.M.ᅠ Васильев.ᅠ М.ᅠ 1986.ᅠ С.ᅠ 31-32.
53. Самощенкоᅠ И.С.ᅠ Системаᅠ советскогоᅠ законодательства.ᅠ M.,ᅠ 2010.ᅠ С.ᅠ 16.
54. Сорокинᅠ В.В.ᅠ Правоваяᅠ системаᅠ иᅠ переходноеᅠ времяᅠ //ᅠ Правоведение.ᅠ 2012.ᅠ №1.ᅠ С.ᅠ 183.
55. Сорокинᅠ В.В.ᅠ Концепцияᅠ эволюционногоᅠ преобразованияᅠ правовыхᅠ системᅠ вᅠ переходныйᅠ период.ᅠ Барнаул,ᅠ 2012.ᅠ С.ᅠ 25.
56. Сорокинᅠ П.А.ᅠ Человек.ᅠ Цивилизация.ᅠ Общество.ᅠ М.,ᅠ 1992.ᅠ С.ᅠ 474-478.
57. Сырыхᅠ В.М.ᅠ Комплексныеᅠ институтыᅠ какᅠ компонентыᅠ системыᅠ российскогоᅠ праваᅠ //ᅠ Журналᅠ российскогоᅠ права.ᅠ 2012.ᅠ №10.ᅠ С.ᅠ 23-24.
58. Сырыхᅠ В.М.ᅠ Образовательноеᅠ правоᅠ какᅠ отрасльᅠ российскогоᅠ права.ᅠ М.,ᅠ 2010.ᅠ С.ᅠ 32-34.
59. Теорияᅠ государстваᅠ иᅠ праваᅠ /ᅠ Подᅠ ред.ᅠ В.Д.ᅠ Перевалова.ᅠ M.,ᅠ 2014.ᅠ С.ᅠ 120.
60. Теорияᅠ государстваᅠ иᅠ праваᅠ /ᅠ Подᅠ ред.ᅠ М.М.ᅠ Рассолова,ᅠ В.О.ᅠ Лучина,ᅠ Б.С.ᅠ Эбзеева.ᅠ М.,ᅠ 2010.ᅠ С.ᅠ 251.
61. Тихомировᅠ Ю.А.ᅠ Коллизионноеᅠ право:ᅠ Учебноеᅠ пособие.ᅠ М.,ᅠ 2010.ᅠ С.ᅠ 238.
62. Тихомировᅠ Ю.А.ᅠ Правоваяᅠ системаᅠ развитогоᅠ социалистическогоᅠ обществаᅠ //ᅠ Советскоеᅠ государствоᅠ иᅠ право.ᅠ 1997.ᅠ №7;
63. Тихомировᅠ Ю.А.ᅠ Оᅠ необходимостиᅠ обновленияᅠ общеправовогоᅠ классификатораᅠ //ᅠ Правоᅠ иᅠ экономика.ᅠ 2006.ᅠ №18-19.ᅠ С.ᅠ 10.
64. Хакенᅠ Г.ᅠ Информацияᅠ иᅠ самоорганизация.ᅠ М.,ᅠ 2001.ᅠ С.ᅠ 250.
65. Черданцевᅠ А.Ф.ᅠ Системностьᅠ нормᅠ права.ᅠ M.,ᅠ С.ᅠ 51.
66. Черноковᅠ А.Э.ᅠ Романо-германскаяᅠ иᅠ российскаяᅠ правовыеᅠ системыᅠ (Сравнительныйᅠ анализ)ᅠ //ᅠ Местоᅠ российскойᅠ правовойᅠ системыᅠ средиᅠ правовыхᅠ системᅠ современностиᅠ //ᅠ Трудыᅠ теоретическогоᅠ семинараᅠ юридическогоᅠ факультетаᅠ СПбИВЭСЭП.ᅠ Вып.ᅠ 6.ᅠ Спб.,ᅠ 2003.ᅠ С.ᅠ 24.
67. Шептулинᅠ А.П.ᅠ Оᅠ содержанииᅠ категорииᅠ «развитие»ᅠ //ᅠ Вопросыᅠ диалектическойᅠ логики:ᅠ принципыᅠ иᅠ формыᅠ мышления.ᅠ М,ᅠ 2005.ᅠ С.ᅠ 9.
68. Шершеневичᅠ Г.Ф.ᅠ Курсᅠ гражданскогоᅠ права.ᅠ Тула,ᅠ 2001.ᅠ С.ᅠ 14.
Пожалуйста, внимательно изучайте содержание и фрагменты работы. Деньги за приобретённые готовые работы по причине несоответствия данной работы вашим требованиям или её уникальности не возвращаются.
* Категория работы носит оценочный характер в соответствии с качественными и количественными параметрами предоставляемого материала. Данный материал ни целиком, ни любая из его частей не является готовым научным трудом, выпускной квалификационной работой, научным докладом или иной работой, предусмотренной государственной системой научной аттестации или необходимой для прохождения промежуточной или итоговой аттестации. Данный материал представляет собой субъективный результат обработки, структурирования и форматирования собранной его автором информации и предназначен, прежде всего, для использования в качестве источника для самостоятельной подготовки работы указанной тематики.
© Рефератбанк, 2002 - 2022