Кнопка "Печать документа"

Иногда пользователям интернета требуется что то распечатать: копию договора, квитанции, просто полезную статью или чего ещё. Пользователь может простым набором клавиш Ctrl + P распечатать любую страницу в интернете - очень удобно, но к сожалению не все знают про эту комбинацию клавиш... Для удобства своих пользователей, которых мы очень любим делаем кнопку Печать документа.

Наверно самая простая/ссылка кнопка:
<a href="#" onClick="window.print(); return false;">Печать документа</a>

Простая кнопка
<input type="button" value="Печать документа" onClick="window.print();" />
phpFox Developers Debug Toggle JavaScript Console

Total Time:
0.1058230
PHP General Time:
0.1004116

Driver Version:
MySQL 5.7.39-0ubuntu0.18.04.2
SQL Time:
0.0054114
SQL Queries:
16
SQL Memory Usage:
270.22 Kb
SQL Slave Enabled:
No
SQL Total Slaves:
N/A
SQL Slave Server:
N/A

Total Memory Usage:
739.52 Kb
Total Memory Usage (Including Debug):
797.23 Kb
Memory Limit:
64 Mb (128M)

Load Balancing Enabled:
No
Requests From:
77.222.55.249


Server Time Stamp:
September 27, 2022, 1:46 pm
PHP Version:
8.1.6
PHP Sapi:
fpm-fcgi
PHP safe_mode:
false
PHP open_basedir:
false
Operating System:
Linux

Cache:
file
SQL Queries
0.0003209 | Memory Before: 468.52 Kb | Memory After: 485.38 Kb | Memory Used: 16.86 Kb | Rows: 0 | Slave: No
SELECT p.call_name, p.php_code
FROM phpfox_plugin AS p
     JOIN phpfox_product AS product
            ON(p.product_id = product.product_id AND product.is_active = 1)
     JOIN phpfox_plugin_hook AS ph
            ON(ph.call_name = p.call_name AND ph.is_active = 1)
     JOIN phpfox_module AS m
            ON(m.module_id = p.module_id AND m.is_active = 1)

WHERE p.is_active = 1
ORDER BY p.ordering ASC
/* OO Query */
IdSelect TypeTablePartitionsTypePossible KeysKeyKey LenRefRowsFilteredExtra
1SIMPLE   MISSING KEY      no matching row in const table
0.0004680 | Memory Before: 545.34 Kb | Memory After: 562.22 Kb | Memory Used: 16.88 Kb | Rows: 1 | Slave: Yes
SELECT ftr.thread_id AS is_seen, ftr.time_stamp AS last_seen_time, ft.thread_id, ft.time_stamp, ft.time_update, ft.group_id, ft.view_id, ft.forum_id, ft.is_closed, ft.user_id, ft.order_id, ft.time_update AS last_time_stamp, ft.title, ft.keywords, fs.subscribe_id AS is_subscribed, ft.poll_id
FROM phpfox_forum_thread AS ft
     LEFT JOIN phpfox_forum_thread_track AS ftr
            ON(ftr.thread_id = ft.thread_id AND ftr.user_id = 0)
     LEFT JOIN phpfox_forum_subscribe AS fs
            ON(fs.thread_id = ft.thread_id AND fs.user_id = 0)

WHERE ft.thread_id = 552
/* OO Query */
IdSelect TypeTablePartitionsTypePossible KeysKeyKey LenRefRowsFilteredExtra
1SIMPLEft constPRIMARY,thread_idPRIMARY4const1100.00 
1SIMPLEftr refitem_id,thread_iditem_id8const,const1100.00 
1SIMPLEfs refthread_id,thread_id_2thread_id8const,const1100.00 
0.0001099 | Memory Before: 549.01 Kb | Memory After: 565.87 Kb | Memory Used: 16.86 Kb | Rows: 0 | Slave: No
SELECT forum_id
FROM phpfox_forum
/* OO Query */
IdSelect TypeTablePartitionsTypePossible KeysKeyKey LenRefRowsFilteredExtra
1SIMPLE   MISSING KEY      no matching row in const table
0.0002270 | Memory Before: 549.98 Kb | Memory After: 566.86 Kb | Memory Used: 16.88 Kb | Rows: 1 | Slave: Yes
SELECT COUNT(*)
FROM phpfox_forum_post AS fp
WHERE fp.thread_id = 552 AND fp.view_id = 0
LIMIT 1
/* OO Query */
IdSelect TypeTablePartitionsTypePossible KeysKeyKey LenRefRowsFilteredExtra
1SIMPLEfp refthread_id,thread_id_2,view_idthread_id4const199.96Using where
0.0004921 | Memory Before: 555.53 Kb | Memory After: 572.41 Kb | Memory Used: 16.88 Kb | Rows: 1 | Slave: Yes
SELECT fp.*, u.user_id, u.profile_page_id, u.server_id AS user_server_id, u.user_name, u.full_name, u.gender, u.user_image, u.is_invisible, u.user_group_id, u.language_id, u.originality, u.last_activity, u.joined, u.country_iso, uf.total_post, l.like_id AS is_liked
FROM phpfox_forum_post AS fp
     JOIN phpfox_user AS u
            ON(u.user_id = fp.user_id)
     JOIN phpfox_user_field AS uf
            ON(uf.user_id = fp.user_id)
     LEFT JOIN phpfox_like AS l
            ON(l.type_id = 'forum_post' AND l.item_id = fp.post_id AND l.user_id = 0)

WHERE fp.thread_id = 552 AND fp.view_id = 0
ORDER BY fp.time_stamp ASC
LIMIT 20
/* OO Query */
IdSelect TypeTablePartitionsTypePossible KeysKeyKey LenRefRowsFilteredExtra
1SIMPLEfp refthread_id,user_id,thread_id_2,view_idthread_id4const199.96Using index condition; Using where; Using filesort
1SIMPLEl refuser_id,item_id,type_iduser_id4const1100.00Using where
1SIMPLEu eq_refPRIMARY,user_idPRIMARY4danfa.fp.user_id1100.00 
1SIMPLEuf eq_refuser_iduser_id4danfa.fp.user_id1100.00 
0.0005019 | Memory Before: 577.45 Kb | Memory After: 594.33 Kb | Memory Used: 16.88 Kb | Rows: 1 | Slave: Yes
SELECT p.*, pu.vanity_url, pg.name AS category_name, pg.page_type, l.like_id AS is_liked
FROM phpfox_pages AS p
     LEFT JOIN phpfox_pages_url AS pu
            ON(pu.page_id = p.page_id)
     LEFT JOIN phpfox_pages_category AS pg
            ON(pg.category_id = p.category_id)
     LEFT JOIN phpfox_like AS l
            ON(l.type_id = 'pages' AND l.item_id = p.page_id AND l.user_id = 0)

WHERE p.page_id = 71
/* OO Query */
IdSelect TypeTablePartitionsTypePossible KeysKeyKey LenRefRowsFilteredExtra
1SIMPLEp constPRIMARY,page_idPRIMARY4const1100.00 
1SIMPLEpu refpage_idpage_id4const1100.00 
1SIMPLEpg constPRIMARY,category_idPRIMARY3const1100.00 
1SIMPLEl refuser_id,item_id,type_iduser_id4const1100.00Using where
0.0002680 | Memory Before: 580.94 Kb | Memory After: 598.05 Kb | Memory Used: 17.11 Kb | Rows: 16 | Slave: Yes
SELECT *
FROM phpfox_pages_perm
WHERE page_id = 71
/* OO Query */
IdSelect TypeTablePartitionsTypePossible KeysKeyKey LenRefRowsFilteredExtra
1SIMPLEphpfox_pages_perm refpage_idpage_id4const16100.00 
0.0001481 | Memory Before: 587.61 Kb | Memory After: 604.47 Kb | Memory Used: 16.86 Kb | Rows: 0 | Slave: No
SELECT f.forum_id, f.parent_id, f.view_id, f.is_category, f.name, f.name_url, f.description, f.is_closed
FROM phpfox_forum AS f
WHERE f.view_id = 0
ORDER BY f.ordering ASC
/* OO Query */
IdSelect TypeTablePartitionsTypePossible KeysKeyKey LenRefRowsFilteredExtra
1SIMPLE   MISSING KEY      no matching row in const table
0.0004039 | Memory Before: 589.03 Kb | Memory After: 605.91 Kb | Memory Used: 16.88 Kb | Rows: 1 | Slave: Yes
SELECT p.*, pu.vanity_url, pg.name AS category_name, pg.page_type, l.like_id AS is_liked
FROM phpfox_pages AS p
     LEFT JOIN phpfox_pages_url AS pu
            ON(pu.page_id = p.page_id)
     LEFT JOIN phpfox_pages_category AS pg
            ON(pg.category_id = p.category_id)
     LEFT JOIN phpfox_like AS l
            ON(l.type_id = 'pages' AND l.item_id = p.page_id AND l.user_id = 0)

WHERE p.page_id = 71
/* OO Query */
IdSelect TypeTablePartitionsTypePossible KeysKeyKey LenRefRowsFilteredExtra
1SIMPLEp constPRIMARY,page_idPRIMARY4const1100.00 
1SIMPLEpu refpage_idpage_id4const1100.00 
1SIMPLEpg constPRIMARY,category_idPRIMARY3const1100.00 
1SIMPLEl refuser_id,item_id,type_iduser_id4const1100.00Using where
0.0001559 | Memory Before: 590.81 Kb | Memory After: 607.69 Kb | Memory Used: 16.88 Kb | Rows: 1 | Slave: Yes
SELECT text
FROM phpfox_forum_post
WHERE thread_id = 552
/* OO Query */
IdSelect TypeTablePartitionsTypePossible KeysKeyKey LenRefRowsFilteredExtra
1SIMPLEphpfox_forum_post refthread_id,thread_id_2thread_id4const1100.00 
0.0003510 | Memory Before: 611.69 Kb | Memory After: 628.55 Kb | Memory Used: 16.86 Kb | Rows: 0 | Slave: No
SELECT m.menu_id, m.parent_id, m.m_connection, m.var_name, m.disallow_access, mo.module_id AS module, m.url_value AS url, mo.is_active AS module_is_active, m.mobile_icon
FROM phpfox_menu AS m
     JOIN phpfox_module AS mo
            ON(mo.module_id = m.module_id AND mo.is_active = 1)
     JOIN phpfox_product AS p
            ON(m.product_id = p.product_id AND p.is_active = 1)

WHERE m.parent_id = 0 AND m.m_connection = 'forum.thread' AND m.is_active = 1
GROUP BY m.menu_id, mo.module_id
ORDER BY m.ordering ASC
/* OO Query */
IdSelect TypeTablePartitionsTypePossible KeysKeyKey LenRefRowsFilteredExtra
1SIMPLEm refm_connection,parent_idm_connection229const,const188.24Using index condition; Using where; Using temporary; Using filesort
1SIMPLEp refis_active,product_active,product_idis_active1const150.00Using where
1SIMPLEmo refis_active,module_id,module_is_activemodule_is_active303func,const3100.00Using where; Using index
0.0002849 | Memory Before: 612.99 Kb | Memory After: 629.85 Kb | Memory Used: 16.86 Kb | Rows: 0 | Slave: No
SELECT m.menu_id, m.parent_id, m.m_connection, m.var_name, m.disallow_access, mo.module_id AS module, m.url_value AS url, mo.is_active AS module_is_active, m.mobile_icon
FROM phpfox_menu AS m
     JOIN phpfox_module AS mo
            ON(mo.module_id = m.module_id AND mo.is_active = 1)
     JOIN phpfox_product AS p
            ON(m.product_id = p.product_id AND p.is_active = 1)

WHERE m.parent_id = 0 AND m.m_connection = 'forum' AND m.is_active = 1
GROUP BY m.menu_id, mo.module_id
ORDER BY m.ordering ASC
/* OO Query */
IdSelect TypeTablePartitionsTypePossible KeysKeyKey LenRefRowsFilteredExtra
1SIMPLEm refm_connection,parent_idm_connection229const,const188.24Using index condition; Using where; Using temporary; Using filesort
1SIMPLEp refis_active,product_active,product_idis_active1const150.00Using where
1SIMPLEmo refis_active,module_id,module_is_activemodule_is_active303func,const3100.00Using where; Using index
0.0004668 | Memory Before: 614.11 Kb | Memory After: 631.09 Kb | Memory Used: 16.98 Kb | Rows: 7 | Slave: No
SELECT m.menu_id, m.parent_id, m.m_connection, m.var_name, m.disallow_access, mo.module_id AS module, m.url_value AS url, mo.is_active AS module_is_active
FROM phpfox_menu AS m
     JOIN phpfox_module AS mo
            ON(mo.module_id = m.module_id AND mo.is_active = 1)
     JOIN phpfox_product AS p
            ON(m.product_id = p.product_id AND p.is_active = 1)

WHERE m.parent_id > 0 AND m.is_active = 1
ORDER BY m.ordering ASC
/* OO Query */
IdSelect TypeTablePartitionsTypePossible KeysKeyKey LenRefRowsFilteredExtra
1SIMPLEm rangeparent_idparent_id3 810.00Using index condition; Using where; Using filesort
1SIMPLEp refis_active,product_active,product_idis_active1const150.00Using where
1SIMPLEmo refis_active,module_id,module_is_activemodule_is_active303func,const3100.00Using where; Using index
0.0005481 | Memory Before: 668.35 Kb | Memory After: 685.21 Kb | Memory Used: 16.86 Kb | Rows: 0 | Slave: No
SELECT p.var_name, p.text
FROM phpfox_language_phrase AS p
     JOIN phpfox_product AS product
            ON(product.product_id = p.product_id AND product.is_active = 1)
     JOIN phpfox_module AS m
            ON(m.module_id = 'theme' AND p.module_id = m.module_id AND m.is_active = 1)

WHERE p.language_id = 'ru'
/* OO Query */
IdSelect TypeTablePartitionsTypePossible KeysKeyKey LenRefRowsFilteredExtra
1SIMPLEm refis_active,module_id,module_is_activemodule_id302const191.43Using where
1SIMPLEproduct refis_active,product_active,product_idis_active1const1100.00 
1SIMPLEp reflanguage_id,module_id,setting_listmodule_id303const4205.46Using index condition; Using where
0.0003700 | Memory Before: 670.13 Kb | Memory After: 686.98 Kb | Memory Used: 16.86 Kb | Rows: 0 | Slave: No
SELECT p.var_name, p.text
FROM phpfox_language_phrase AS p
     JOIN phpfox_product AS product
            ON(product.product_id = p.product_id AND product.is_active = 1)
     JOIN phpfox_module AS m
            ON(m.module_id = 'theme' AND p.module_id = m.module_id AND m.is_active = 1)

WHERE p.language_id = 'ru'
/* OO Query */
IdSelect TypeTablePartitionsTypePossible KeysKeyKey LenRefRowsFilteredExtra
1SIMPLEm refis_active,module_id,module_is_activemodule_id302const191.43Using where
1SIMPLEproduct refis_active,product_active,product_idis_active1const1100.00 
1SIMPLEp reflanguage_id,module_id,setting_listmodule_id303const4205.46Using index condition; Using where
0.0002949 | Memory Before: 673.24 Kb | Memory After: 690.1 Kb | Memory Used: 16.86 Kb | Rows: 0 | Slave: No
SELECT p.var_name, p.text
FROM phpfox_language_phrase AS p
     JOIN phpfox_product AS product
            ON(product.product_id = p.product_id AND product.is_active = 1)
     JOIN phpfox_module AS m
            ON(m.module_id = 'theme' AND p.module_id = m.module_id AND m.is_active = 1)

WHERE p.language_id = 'ru'
/* OO Query */
IdSelect TypeTablePartitionsTypePossible KeysKeyKey LenRefRowsFilteredExtra
1SIMPLEm refis_active,module_id,module_is_activemodule_id302const191.43Using where
1SIMPLEproduct refis_active,product_active,product_idis_active1const1100.00 
1SIMPLEp reflanguage_id,module_id,setting_listmodule_id303const4205.46Using index condition; Using where
Array
(
    [redirect] => /forum/thread/552/
)