Accessで連続PDF化&連続メール送信その1

茜丸@昼勤務 | 2009年10月3日

自分の場合、Google Earth関連のネタがなくなると、Microsoft Access関連のネタに逃げる習性があります。というのも、今仕事やらなにやらでメインで使っているのは、自作のこれらのツールなんですが、それら [...]

Start uga_insert_html_once: head, Footer hooked: HTML inserted: Location is HEAD Start uga_get_option: footer_hooked uga_options: array ( 'version_sent' => '1.6.0', 'advanced_config' => true, 'account_id' => 'UA-159521-2', 'internal_domains' => 'virtual.haru.gs', 'max_user_level' => '8', 'prefix_ext_links' => '/outgoing/', 'prefix_mail_links' => '/mailto/', 'prefix_file_links' => '/ge/wp-content/uploads', 'track_extensions' => 'kmz,kml', 'enable_tracker' => true, 'filter_content' => true, 'filter_comments' => true, 'filter_comment_authors' => true, 'track_adm_pages' => true, 'track_ext_links' => true, 'track_mail_links' => true, 'track_files' => true, 'ignore_users' => true, 'debug' => true, 'check_updates' => true, 'footer_hooked' => true, ) Ending uga_get_option: footer_hooked (1) End uga_insert_html Ending uga_wp_head_track: Start uga_filter:

accessmail自分の場合、Google Earth関連のネタがなくなると、Microsoft Access関連のネタに逃げる習性があります。というのも、今仕事やらなにやらでメインで使っているのは、自作のこれらのツールなんですが、それらは3年分の蓄積があり、今も尚、新機能をどんどん搭載していて、これだけでも1冊本が作れるほどマニアックなことになっているからなんです。

これも、今の職場でまともなツールがなく、エクセルでしこしこ非効率な仕事に追われて、もっと面白いことが出来るのにやれないという状況の中(世ではこれを修羅場と言います)に、自分が投入されたからなのですが、その中には、Google Mapsを使ったローカルアプリケーションもあります。近々こちらは、公開していこうと思っています。Wordpressのサイトを別にしたほうがいいかどうか・・・

さて、そんな中、とある業者さんが、うちの会社にある商材を売り込みに来ました。「いろんなデータをレポート化して、個別にPDF化してメールで送れます」という、ちょっと使い方間違えるとスパムメーラーになるものなんですが、それを見て、自分でも作れるかなと思ってつくったのがこれ。今回まだスタンドアローン版を作っておらず、画面のものは、MySQLと接続して使うC/S版です。特に勤怠データを各人に送るわけなのですが、それぞれ違うデータですし、当然送り先も違う。それらを個別PDF化して、さらには添付して、登録メールアドレスに対して投げることができます。実験では、およそ1ページのPDFで70KBほど、100件で3分くらい、送信は1分くらいで可能です。

Start uga_in_feed Ending uga_in_feed: Start uga_track_user Start uga_get_option: ignore_users uga_options: array ( 'version_sent' => '1.6.0', 'advanced_config' => true, 'account_id' => 'UA-159521-2', 'internal_domains' => 'virtual.haru.gs', 'max_user_level' => '8', 'prefix_ext_links' => '/outgoing/', 'prefix_mail_links' => '/mailto/', 'prefix_file_links' => '/ge/wp-content/uploads', 'track_extensions' => 'kmz,kml', 'enable_tracker' => true, 'filter_content' => true, 'filter_comments' => true, 'filter_comment_authors' => true, 'track_adm_pages' => true, 'track_ext_links' => true, 'track_mail_links' => true, 'track_files' => true, 'ignore_users' => true, 'debug' => true, 'check_updates' => true, 'footer_hooked' => true, ) Ending uga_get_option: ignore_users (1) Start uga_get_option: max_user_level uga_options: array ( 'version_sent' => '1.6.0', 'advanced_config' => true, 'account_id' => 'UA-159521-2', 'internal_domains' => 'virtual.haru.gs', 'max_user_level' => '8', 'prefix_ext_links' => '/outgoing/', 'prefix_mail_links' => '/mailto/', 'prefix_file_links' => '/ge/wp-content/uploads', 'track_extensions' => 'kmz,kml', 'enable_tracker' => true, 'filter_content' => true, 'filter_comments' => true, 'filter_comment_authors' => true, 'track_adm_pages' => true, 'track_ext_links' => true, 'track_mail_links' => true, 'track_files' => true, 'ignore_users' => true, 'debug' => true, 'check_updates' => true, 'footer_hooked' => true, ) Ending uga_get_option: max_user_level (8) Tracking user with level Ending uga_track_user: 1 Calling preg_replace_callback: ]*?)href\s*=\s*['"](.*?)['"]([^>]*)>(.*?) Start uga_preg_callback: Array Get tracker for full url Start uga_track_full_url: virtual.haru.gs/ge/wp-content/uploads/accessmail.jpg Start uga_is_url_internal: virtual.haru.gs/ge/wp-content/uploads/accessmail.jpg Start uga_get_option: internal_domains uga_options: array ( 'version_sent' => '1.6.0', 'advanced_config' => true, 'account_id' => 'UA-159521-2', 'internal_domains' => 'virtual.haru.gs', 'max_user_level' => '8', 'prefix_ext_links' => '/outgoing/', 'prefix_mail_links' => '/mailto/', 'prefix_file_links' => '/ge/wp-content/uploads', 'track_extensions' => 'kmz,kml', 'enable_tracker' => true, 'filter_content' => true, 'filter_comments' => true, 'filter_comment_authors' => true, 'track_adm_pages' => true, 'track_ext_links' => true, 'track_mail_links' => true, 'track_files' => true, 'ignore_users' => true, 'debug' => true, 'check_updates' => true, 'footer_hooked' => true, ) Ending uga_get_option: internal_domains (virtual.haru.gs) Checking hostname virtual.haru.gs Match found, url is internal Ending uga_is_url_internal: 1 Get tracker for internal URL Start uga_track_internal_url: virtual.haru.gs/ge/wp-content/uploads/accessmail.jpg, Start uga_get_option: track_files uga_options: array ( 'version_sent' => '1.6.0', 'advanced_config' => true, 'account_id' => 'UA-159521-2', 'internal_domains' => 'virtual.haru.gs', 'max_user_level' => '8', 'prefix_ext_links' => '/outgoing/', 'prefix_mail_links' => '/mailto/', 'prefix_file_links' => '/ge/wp-content/uploads', 'track_extensions' => 'kmz,kml', 'enable_tracker' => true, 'filter_content' => true, 'filter_comments' => true, 'filter_comment_authors' => true, 'track_adm_pages' => true, 'track_ext_links' => true, 'track_mail_links' => true, 'track_files' => true, 'ignore_users' => true, 'debug' => true, 'check_updates' => true, 'footer_hooked' => true, ) Ending uga_get_option: track_files (1) Tracking files enabled Start uga_get_option: track_extensions uga_options: array ( 'version_sent' => '1.6.0', 'advanced_config' => true, 'account_id' => 'UA-159521-2', 'internal_domains' => 'virtual.haru.gs', 'max_user_level' => '8', 'prefix_ext_links' => '/outgoing/', 'prefix_mail_links' => '/mailto/', 'prefix_file_links' => '/ge/wp-content/uploads', 'track_extensions' => 'kmz,kml', 'enable_tracker' => true, 'filter_content' => true, 'filter_comments' => true, 'filter_comment_authors' => true, 'track_adm_pages' => true, 'track_ext_links' => true, 'track_mail_links' => true, 'track_files' => true, 'ignore_users' => true, 'debug' => true, 'check_updates' => true, 'footer_hooked' => true, ) Ending uga_get_option: track_extensions (kmz,kml) Checking file extension kmz Checking file extension kml Ending uga_track_internal_url: Ending uga_track_full_url: Ending uga_preg_callback: accessmail Ending uga_filter:

accessmail自分の場合、Google Earth関連のネタがなくなると、Microsoft Access関連のネタに逃げる習性があります。というのも、今仕事やらなにやらでメインで使っているのは、自作のこれらのツールなんですが、それらは3年分の蓄積があり、今も尚、新機能をどんどん搭載していて、これだけでも1冊本が作れるほどマニアックなことになっているからなんです。

これも、今の職場でまともなツールがなく、エクセルでしこしこ非効率な仕事に追われて、もっと面白いことが出来るのにやれないという状況の中(世ではこれを修羅場と言います)に、自分が投入されたからなのですが、その中には、Google Mapsを使ったローカルアプリケーションもあります。近々こちらは、公開していこうと思っています。Wordpressのサイトを別にしたほうがいいかどうか・・・

さて、そんな中、とある業者さんが、うちの会社にある商材を売り込みに来ました。「いろんなデータをレポート化して、個別にPDF化してメールで送れます」という、ちょっと使い方間違えるとスパムメーラーになるものなんですが、それを見て、自分でも作れるかなと思ってつくったのがこれ。今回まだスタンドアローン版を作っておらず、画面のものは、MySQLと接続して使うC/S版です。特に勤怠データを各人に送るわけなのですが、それぞれ違うデータですし、当然送り先も違う。それらを個別PDF化して、さらには添付して、登録メールアドレスに対して投げることができます。実験では、およそ1ページのPDFで70KBほど、100件で3分くらい、送信は1分くらいで可能です。

Start uga_filter:

自分の場合、Google Earth関連のネタがなくなると、Microsoft Access関連のネタに逃げる習性があります。というのも、今仕事やらなにやらでメインで使っているのは、自作のこれらのツールなんですが、それら [...]

Start uga_in_feed Ending uga_in_feed: Start uga_track_user Start uga_get_option: ignore_users uga_options: array ( 'version_sent' => '1.6.0', 'advanced_config' => true, 'account_id' => 'UA-159521-2', 'internal_domains' => 'virtual.haru.gs', 'max_user_level' => '8', 'prefix_ext_links' => '/outgoing/', 'prefix_mail_links' => '/mailto/', 'prefix_file_links' => '/ge/wp-content/uploads', 'track_extensions' => 'kmz,kml', 'enable_tracker' => true, 'filter_content' => true, 'filter_comments' => true, 'filter_comment_authors' => true, 'track_adm_pages' => true, 'track_ext_links' => true, 'track_mail_links' => true, 'track_files' => true, 'ignore_users' => true, 'debug' => true, 'check_updates' => true, 'footer_hooked' => true, ) Ending uga_get_option: ignore_users (1) Start uga_get_option: max_user_level uga_options: array ( 'version_sent' => '1.6.0', 'advanced_config' => true, 'account_id' => 'UA-159521-2', 'internal_domains' => 'virtual.haru.gs', 'max_user_level' => '8', 'prefix_ext_links' => '/outgoing/', 'prefix_mail_links' => '/mailto/', 'prefix_file_links' => '/ge/wp-content/uploads', 'track_extensions' => 'kmz,kml', 'enable_tracker' => true, 'filter_content' => true, 'filter_comments' => true, 'filter_comment_authors' => true, 'track_adm_pages' => true, 'track_ext_links' => true, 'track_mail_links' => true, 'track_files' => true, 'ignore_users' => true, 'debug' => true, 'check_updates' => true, 'footer_hooked' => true, ) Ending uga_get_option: max_user_level (8) Tracking user with level Ending uga_track_user: 1 Calling preg_replace_callback: ]*?)href\s*=\s*['"](.*?)['"]([^>]*)>(.*?) Ending uga_filter:

自分の場合、Google Earth関連のネタがなくなると、Microsoft Access関連のネタに逃げる習性があります。というのも、今仕事やらなにやらでメインで使っているのは、自作のこれらのツールなんですが、それら [...]

Start uga_wp_footer_track: Start uga_get_tracker Start uga_in_feed Ending uga_in_feed: Start uga_track_user Start uga_get_option: ignore_users uga_options: array ( 'version_sent' => '1.6.0', 'advanced_config' => true, 'account_id' => 'UA-159521-2', 'internal_domains' => 'virtual.haru.gs', 'max_user_level' => '8', 'prefix_ext_links' => '/outgoing/', 'prefix_mail_links' => '/mailto/', 'prefix_file_links' => '/ge/wp-content/uploads', 'track_extensions' => 'kmz,kml', 'enable_tracker' => true, 'filter_content' => true, 'filter_comments' => true, 'filter_comment_authors' => true, 'track_adm_pages' => true, 'track_ext_links' => true, 'track_mail_links' => true, 'track_files' => true, 'ignore_users' => true, 'debug' => true, 'check_updates' => true, 'footer_hooked' => true, ) Ending uga_get_option: ignore_users (1) Start uga_get_option: max_user_level uga_options: array ( 'version_sent' => '1.6.0', 'advanced_config' => true, 'account_id' => 'UA-159521-2', 'internal_domains' => 'virtual.haru.gs', 'max_user_level' => '8', 'prefix_ext_links' => '/outgoing/', 'prefix_mail_links' => '/mailto/', 'prefix_file_links' => '/ge/wp-content/uploads', 'track_extensions' => 'kmz,kml', 'enable_tracker' => true, 'filter_content' => true, 'filter_comments' => true, 'filter_comment_authors' => true, 'track_adm_pages' => true, 'track_ext_links' => true, 'track_mail_links' => true, 'track_files' => true, 'ignore_users' => true, 'debug' => true, 'check_updates' => true, 'footer_hooked' => true, ) Ending uga_get_option: max_user_level (8) Tracking user with level Ending uga_track_user: 1 Start uga_get_option: account_id uga_options: array ( 'version_sent' => '1.6.0', 'advanced_config' => true, 'account_id' => 'UA-159521-2', 'internal_domains' => 'virtual.haru.gs', 'max_user_level' => '8', 'prefix_ext_links' => '/outgoing/', 'prefix_mail_links' => '/mailto/', 'prefix_file_links' => '/ge/wp-content/uploads', 'track_extensions' => 'kmz,kml', 'enable_tracker' => true, 'filter_content' => true, 'filter_comments' => true, 'filter_comment_authors' => true, 'track_adm_pages' => true, 'track_ext_links' => true, 'track_mail_links' => true, 'track_files' => true, 'ignore_users' => true, 'debug' => true, 'check_updates' => true, 'footer_hooked' => true, ) Ending uga_get_option: account_id (UA-159521-2) Ending uga_get_tracker: Start uga_insert_html_once: footer, Footer hooked: HTML inserted: Location is FOOTER Inserting HTML End uga_insert_html Ending uga_wp_footer_track: Start uga_shutdown Start uga_in_feed Ending uga_in_feed: Start uga_track_user Start uga_get_option: ignore_users uga_options: array ( 'version_sent' => '1.6.0', 'advanced_config' => true, 'account_id' => 'UA-159521-2', 'internal_domains' => 'virtual.haru.gs', 'max_user_level' => '8', 'prefix_ext_links' => '/outgoing/', 'prefix_mail_links' => '/mailto/', 'prefix_file_links' => '/ge/wp-content/uploads', 'track_extensions' => 'kmz,kml', 'enable_tracker' => true, 'filter_content' => true, 'filter_comments' => true, 'filter_comment_authors' => true, 'track_adm_pages' => true, 'track_ext_links' => true, 'track_mail_links' => true, 'track_files' => true, 'ignore_users' => true, 'debug' => true, 'check_updates' => true, 'footer_hooked' => true, ) Ending uga_get_option: ignore_users (1) Start uga_get_option: max_user_level uga_options: array ( 'version_sent' => '1.6.0', 'advanced_config' => true, 'account_id' => 'UA-159521-2', 'internal_domains' => 'virtual.haru.gs', 'max_user_level' => '8', 'prefix_ext_links' => '/outgoing/', 'prefix_mail_links' => '/mailto/', 'prefix_file_links' => '/ge/wp-content/uploads', 'track_extensions' => 'kmz,kml', 'enable_tracker' => true, 'filter_content' => true, 'filter_comments' => true, 'filter_comment_authors' => true, 'track_adm_pages' => true, 'track_ext_links' => true, 'track_mail_links' => true, 'track_files' => true, 'ignore_users' => true, 'debug' => true, 'check_updates' => true, 'footer_hooked' => true, ) Ending uga_get_option: max_user_level (8) Tracking user with level Ending uga_track_user: 1 Footer hook was executed Start uga_get_option: footer_hooked uga_options: array ( 'version_sent' => '1.6.0', 'advanced_config' => true, 'account_id' => 'UA-159521-2', 'internal_domains' => 'virtual.haru.gs', 'max_user_level' => '8', 'prefix_ext_links' => '/outgoing/', 'prefix_mail_links' => '/mailto/', 'prefix_file_links' => '/ge/wp-content/uploads', 'track_extensions' => 'kmz,kml', 'enable_tracker' => true, 'filter_content' => true, 'filter_comments' => true, 'filter_comment_authors' => true, 'track_adm_pages' => true, 'track_ext_links' => true, 'track_mail_links' => true, 'track_files' => true, 'ignore_users' => true, 'debug' => true, 'check_updates' => true, 'footer_hooked' => true, ) Ending uga_get_option: footer_hooked (1) Start uga_get_option: debug uga_options: array ( 'version_sent' => '1.6.0', 'advanced_config' => true, 'account_id' => 'UA-159521-2', 'internal_domains' => 'virtual.haru.gs', 'max_user_level' => '8', 'prefix_ext_links' => '/outgoing/', 'prefix_mail_links' => '/mailto/', 'prefix_file_links' => '/ge/wp-content/uploads', 'track_extensions' => 'kmz,kml', 'enable_tracker' => true, 'filter_content' => true, 'filter_comments' => true, 'filter_comment_authors' => true, 'track_adm_pages' => true, 'track_ext_links' => true, 'track_mail_links' => true, 'track_files' => true, 'ignore_users' => true, 'debug' => true, 'check_updates' => true, 'footer_hooked' => true, ) Ending uga_get_option: debug (1) -->