diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..e98f03d --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,32 @@ +The Yii framework is free software. It is released under the terms of +the following BSD License. + +Copyright © 2008 by Yii Software LLC (http://www.yiisoft.com) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + * Neither the name of Yii Software LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/MP_verify_AHdn4Rhtts2iuS68.txt b/MP_verify_AHdn4Rhtts2iuS68.txt new file mode 100644 index 0000000..15c44ef --- /dev/null +++ b/MP_verify_AHdn4Rhtts2iuS68.txt @@ -0,0 +1 @@ +AHdn4Rhtts2iuS68 \ No newline at end of file diff --git a/MP_verify_VD3pWrda5YjvBMkl.txt b/MP_verify_VD3pWrda5YjvBMkl.txt new file mode 100644 index 0000000..dcceba9 --- /dev/null +++ b/MP_verify_VD3pWrda5YjvBMkl.txt @@ -0,0 +1 @@ +VD3pWrda5YjvBMkl \ No newline at end of file diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..4181f83 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,72 @@ +require 'yaml' +require 'fileutils' + +domains = { + frontend: 'y2aa-frontend.dev', + backend: 'y2aa-backend.dev' +} + +config = { + local: './vagrant/config/vagrant-local.yml', + example: './vagrant/config/vagrant-local.example.yml' +} + +# copy config from example if local config not exists +FileUtils.cp config[:example], config[:local] unless File.exist?(config[:local]) +# read config +options = YAML.load_file config[:local] + +# check github token +if options['github_token'].nil? || options['github_token'].to_s.length != 40 + puts "You must place REAL GitHub token into configuration:\n/yii2-app-advanced/vagrant/config/vagrant-local.yml" + exit +end + +# vagrant configurate +Vagrant.configure(2) do |config| + # select the box + config.vm.box = 'ubuntu/trusty64' + + # should we ask about box updates? + config.vm.box_check_update = options['box_check_update'] + + config.vm.provider 'virtualbox' do |vb| + # machine cpus count + vb.cpus = options['cpus'] + # machine memory size + vb.memory = options['memory'] + # machine name (for VirtualBox UI) + vb.name = options['machine_name'] + end + + # machine name (for vagrant console) + config.vm.define options['machine_name'] + + # machine name (for guest machine console) + config.vm.hostname = options['machine_name'] + + # network settings + config.vm.network 'private_network', ip: options['ip'] + + # sync: folder 'yii2-app-advanced' (host machine) -> folder '/app' (guest machine) + config.vm.synced_folder './', '/app', owner: 'vagrant', group: 'vagrant' + + # disable folder '/vagrant' (guest machine) + config.vm.synced_folder '.', '/vagrant', disabled: true + + # hosts settings (host machine) + config.vm.provision :hostmanager + config.hostmanager.enabled = true + config.hostmanager.manage_host = true + config.hostmanager.ignore_private_ip = false + config.hostmanager.include_offline = true + config.hostmanager.aliases = domains.values + + # provisioners + config.vm.provision 'shell', path: './vagrant/provision/once-as-root.sh', args: [options['timezone']] + config.vm.provision 'shell', path: './vagrant/provision/once-as-vagrant.sh', args: [options['github_token']], privileged: false + config.vm.provision 'shell', path: './vagrant/provision/always-as-root.sh', run: 'always' + + # post-install message (vagrant console) + config.vm.post_up_message = "Frontend URL: http://#{domains[:frontend]}\nBackend URL: http://#{domains[:backend]}" +end diff --git a/_.zhizhuchuxing.cn.key b/_.zhizhuchuxing.cn.key new file mode 100644 index 0000000..b1488f8 --- /dev/null +++ b/_.zhizhuchuxing.cn.key @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEogIBAAKCAQEArwuahgHV/vnx5tMyIo+qNZul/DiWtXouicY6fcfuF9y6SIcu +A5hYfAnyAU3dACK44SGWrScv4OaB5fGQOtkomb8cK5Ibc7p9312Tag04+RMqHrl0 +GroLn7qqRodrPulrkmTDrO9xymEhS2RMYSENoDMaBSiXlfnYQQOU9//UTlDAgB/O +1ZqB7VyuYh3pUUtYN2M/E+7d4VDTpFevD9gEDLPRiWpIOoudw/cAFXX+l5f5R8tQ +lFmy8QY+M0+NqbkZ03FsiNCNXhN5ldUGKCmxA89lGhV9m5/ABTbPjuAjOOv934sP +pV73pNUPIG15r5e5tyPzITNeA/SYQHkaP+++bwIDAQABAoIBAFE741Q5WeRgfkCO +1n9viKAkQZ2RbW9+6kYJ9m8U74unZdPu2A3XD4lQ3Dx6tAsyEfZ4rgJhYzjOAI6D +0lldGhhvtlUKEy9b5rpYJOdch4ofuLZVfmpA2NAhwo/EnKKvlLp1hNGmtXokJV1l +iISy4C3uSS8HrYFuV0ukq+eDlDVbQ6m580aGbkz3h2lHWQ9hAI7Zo6FfD+0aR0Gw +yyS/XCXiEZ4ghqgpPdNsi9W40ETXybFDxzhbdhmbxDye5IHtaPJ/yLEUhpndwHOz +euHD42ocr77WTBotqyLGiPiWeJdXHtaNgFVvf0zRUxWtb+P0Aiz6i8zXdoz03v24 +6jBl4SECgYEA3bq+Oj6Hj/NNCnUWhAgY41s+mmDftPn+mLDylfkYmntZ9YQNnEZs ++Gw9QNljXHzFeWg8E07v1njM+xhHcf5EaRJ7BWnVvJ/rC9wSzHIBngxb5KkjS0ZQ +v7rGwgz2+EfGasiM7KoJicCLaJMu6jobp85BuWj18QqMbL/zsLS5CGkCgYEAyhmw +3J7NrobQhnEwYmr//NUN4Re0u0bjWzBVuKHC9PZsMj6uh9I/9g7LyGg5TUM1GANn +gZV0g3UX9w/Cjk4Gnr3keyWI7wZF+GDBjBJRcWhGL1IJsICxUcyJTnHn8hxc7Ka9 +B97eRP+axrJpBS/KkUUljmsgwwt1TRkxU0+4dRcCgYBn9TFRT5XxmQoq+ADJgJ5i +opo0eW0JhhincHccd8DgVSs1YGedOKvIwb7qU8IxT9KqfIOGLgFnFhZNN/HvcV6T +wPVq8Vcj6/qhAdrSfjVh67t99ws0NNCRRDoCK1/zwns1/7eLEqIMMvlp23Aoo3vp +7luEWcDN9bsnFcxksib62QKBgBs4aJzeer+GAvIIrsaiuMXaAFuP8NTEkHzIvtL2 +XqbVxe7iiGlcxSakCYh9mTIx2iXY14kZky7dh5PMOJ0oHzYkR3Datl3TT3tLtOXj +1bpbnBBlkU6Hltp4nQnGx8HRVia9snor524Nq1AV2ZVMQZFdadiLz0bV9T+kJAOf +mi2TAoGAETyFca7A2uzouyxQTLjJ5umZwAd03j8MWwT3u6vau0SU+Dfe3WL+T3KE +rC/E2dUaII4a50LKMaVLYkrXCygKR2U9EWuDspzFd6fJGGPgeJhSNF4bxZhTUDpU +ugy3+m5b2+6Fe59lbuq7tUIiVVmRPmwBZ/QnfvSmsQlkr55xvh8= +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/_.zhizhuchuxing.cn_bundle.crt b/_.zhizhuchuxing.cn_bundle.crt new file mode 100644 index 0000000..972aa3a --- /dev/null +++ b/_.zhizhuchuxing.cn_bundle.crt @@ -0,0 +1,90 @@ +-----BEGIN CERTIFICATE----- +MIIFhzCCBG+gAwIBAgIQLIW51UR3rinQBHTR5BuY3DANBgkqhkiG9w0BAQsFADBE +MQswCQYDVQQGEwJDTjEaMBgGA1UECgwRV29TaWduIENBIExpbWl0ZWQxGTAXBgNV +BAMMEFdvU2lnbiBEViBTU0wgQ0EwHhcNMTcxMjExMDkzMTQ5WhcNMTgxMjExMDkz +MTQ5WjAqMQswCQYDVQQGEwJDTjEbMBkGA1UEAwwSKi56aGl6aHVjaHV4aW5nLmNu +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArwuahgHV/vnx5tMyIo+q +NZul/DiWtXouicY6fcfuF9y6SIcuA5hYfAnyAU3dACK44SGWrScv4OaB5fGQOtko +mb8cK5Ibc7p9312Tag04+RMqHrl0GroLn7qqRodrPulrkmTDrO9xymEhS2RMYSEN +oDMaBSiXlfnYQQOU9//UTlDAgB/O1ZqB7VyuYh3pUUtYN2M/E+7d4VDTpFevD9gE +DLPRiWpIOoudw/cAFXX+l5f5R8tQlFmy8QY+M0+NqbkZ03FsiNCNXhN5ldUGKCmx +A89lGhV9m5/ABTbPjuAjOOv934sPpV73pNUPIG15r5e5tyPzITNeA/SYQHkaP+++ +bwIDAQABo4ICjTCCAokwDAYDVR0TAQH/BAIwADA8BgNVHR8ENTAzMDGgL6Athito +dHRwOi8vd29zaWduLmNybC5jZXJ0dW0ucGwvd29zaWduLWR2Y2EuY3JsMHcGCCsG +AQUFBwEBBGswaTAuBggrBgEFBQcwAYYiaHR0cDovL3dvc2lnbi1kdmNhLm9jc3At +Y2VydHVtLmNvbTA3BggrBgEFBQcwAoYraHR0cDovL3JlcG9zaXRvcnkuY2VydHVt +LnBsL3dvc2lnbi1kdmNhLmNlcjAfBgNVHSMEGDAWgBTKm40uRFBCitkCZTIanoDz +iAQqtTAdBgNVHQ4EFgQUoPY4TlW2/R9W/EH9n+reZFhVfj8wDgYDVR0PAQH/BAQD +AgWgMIIBIAYDVR0gBIIBFzCCARMwCAYGZ4EMAQIBMIIBBQYMKoRoAYb2dwIFAQ8D +MIH0MIHxBggrBgEFBQcCAjCB5DAfFhhBc3NlY28gRGF0YSBTeXN0ZW1zIFMuQS4w +AwIBARqBwFVzYWdlIG9mIHRoaXMgY2VydGlmaWNhdGUgaXMgc3RyaWN0bHkgc3Vi +amVjdGVkIHRvIHRoZSBDRVJUVU0gQ2VydGlmaWNhdGlvbiBQcmFjdGljZSBTdGF0 +ZW1lbnQgKENQUykgaW5jb3Jwb3JhdGVkIGJ5IHJlZmVyZW5jZSBoZXJlaW4gYW5k +IGluIHRoZSByZXBvc2l0b3J5IGF0IGh0dHBzOi8vd3d3LmNlcnR1bS5wbC9yZXBv +c2l0b3J5LjAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwLwYDVR0RBCgw +JoISKi56aGl6aHVjaHV4aW5nLmNughB6aGl6aHVjaHV4aW5nLmNuMA0GCSqGSIb3 +DQEBCwUAA4IBAQCsWK6G1oakXw0SoYYnzA89VIlDNqiQckVMEfl89zWqi7h9tgN5 ++yOUAMj2xLog6dSFzblyscn0qSfkllkWG+ySyLMoKg9lU+NM/w3SH8HIdG6ogjoN +VyOyZnDEynM0+Rf8/H8RV9iWTC7/iiFdL2sNBj5XQnvt3yRDqFD+Il3bvECPXGoj +BW0tkx1PsPmnZgmG1E15QkXFlsMmN6sptB1IlRa1JKrvAVgm/KD4L/alcpe0pYu0 +UIuQgIojMtpYPJDU9Y1yu/DNzvAi1Y91Pw5asUlgs4FS8xt0O9cgM9RQnX0BH5Dw +jZlD0cWLOiipT7IDvvGsxRZspQwR7kLpWHD6 +-----END CERTIFICATE----- + +-----BEGIN CERTIFICATE----- +MIIEtTCCA52gAwIBAgIRAOIaIRqokeLTVFn/020nxCYwDQYJKoZIhvcNAQELBQAw +fjELMAkGA1UEBhMCUEwxIjAgBgNVBAoTGVVuaXpldG8gVGVjaG5vbG9naWVzIFMu +QS4xJzAlBgNVBAsTHkNlcnR1bSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEiMCAG +A1UEAxMZQ2VydHVtIFRydXN0ZWQgTmV0d29yayBDQTAeFw0xNzA1MTgwNzQ2MTRa +Fw0yNzA1MTgwNzQ2MTRaMEQxCzAJBgNVBAYTAkNOMRowGAYDVQQKDBFXb1NpZ24g +Q0EgTGltaXRlZDEZMBcGA1UEAwwQV29TaWduIERWIFNTTCBDQTCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAMhQeIUezKdIBlpnoWm0+HG5nu8859lksQEG +OIeNiayAqhlxG5b4+wVEJ8DmCP77qDOoKVjW5owTIvZHc4F2MEqTOt6/XL3+P6an +bKdPN5/nhKghN+45ywgFYn1AcI5kYdPFQmNfNYGC3jaHISHttC2xz8NQHyHRI3sy +g3hkPdyNeLC+4rTOLs5SYZT+vHr3biOipBO5n68A0Ho86RQ6d0RmBRArAJskD+U/ +Qco3F2pl7T0CDOuCXZ/ld3Ga7Bvb1G/lAbM/cEr6endnaLaHmI+6gYWRZVqOELVi +T9dkYnpspHxtcgsVUl1lFf3GSfWAX/Jvnd3IstCa9E3dmAWm8IUCAwEAAaOCAWYw +ggFiMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFMqbjS5EUEKK2QJlMhqe +gPOIBCq1MB8GA1UdIwQYMBaAFAh2zcsH/yT2xc3tu5C84oQ3RnX3MA4GA1UdDwEB +/wQEAwIBBjAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwNQYDVR0fBC4w +LDAqoCigJoYkaHR0cDovL3N1YmNhLmNybC5jZXJ0dW0ucGwvY3RuY2EuY3JsMGsG +CCsGAQUFBwEBBF8wXTAoBggrBgEFBQcwAYYcaHR0cDovL3N1YmNhLm9jc3AtY2Vy +dHVtLmNvbTAxBggrBgEFBQcwAoYlaHR0cDovL3JlcG9zaXRvcnkuY2VydHVtLnBs +L2N0bmNhLmNlcjA5BgNVHSAEMjAwMC4GBFUdIAAwJjAkBggrBgEFBQcCARYYaHR0 +cDovL3d3dy5jZXJ0dW0ucGwvQ1BTMA0GCSqGSIb3DQEBCwUAA4IBAQAAn17fM+SE +dRJdtuP6BtLY4kfJu/xPVpFlTpl1Wq2GlzSOBWEIvqsrvSz141D5mmPZ1hqMIdbn +4uq0sC48tAD3Mi18RLbfitm3o0tjYxsbI27tltVMbvyld/k3JOyj0wVljju9fDHc +yIK6akmE/C6UDLtqvRAx0m7xc5z+YIJRabXi33x4AmV7HTyVs6Lm6AGb+KqaJzDd +X9Qqj24EuP/noicvKYP9g9Uf6aGPB5TWliIoEpJWz6qD/PophMB4nuj3ccO0LMJ+ +k5QFRWs2hZmev1M8hpqBoMwpoG/jy5AOwntqRqRsSkbR+6tZ3aCWKU1hNnkZcfHJ +11ozB0OSfC7K +-----END CERTIFICATE----- + +-----BEGIN CERTIFICATE----- +MIIEtDCCA5ygAwIBAgIRAJOShUABZXFflH8oj+/JmygwDQYJKoZIhvcNAQELBQAw +PjELMAkGA1UEBhMCUEwxGzAZBgNVBAoTElVuaXpldG8gU3AuIHogby5vLjESMBAG +A1UEAxMJQ2VydHVtIENBMB4XDTA4MTAyMjEyMDczN1oXDTI3MDYxMDEwNDYzOVow +fjELMAkGA1UEBhMCUEwxIjAgBgNVBAoTGVVuaXpldG8gVGVjaG5vbG9naWVzIFMu +QS4xJzAlBgNVBAsTHkNlcnR1bSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEiMCAG +A1UEAxMZQ2VydHVtIFRydXN0ZWQgTmV0d29yayBDQTCCASIwDQYJKoZIhvcNAQEB +BQADggEPADCCAQoCggEBAOP7faNyusLwyRSH9WsBTuFuQAe6bSddf/dbLbNax1Ff +q6QypmGHtm4PhtIwApf412lXoRg5XWpkecYBWaw8MUo4fNIE0kso6CBfOweizE1z +2/OuT8dW1Vqnlon686to1COGWSfPCSe8rG5ygxwwct/gounS4XR1Gb0qnnsVVAQb +10M5rVUoxeIau/TA5K44STPMdoWfOUXSpJ7yEoxR+HzkLX/1rF/rFp+xLdG6zJFC +d0wlyZA4b9vwzPuOHpdZPtVgTuYFKO1JeRNLukjbL/ly0znK/h/YNHL1tEDPMQHD +7N4RLRddH7hQ0V4Zp2neBzMoylCV+adUy1SGUEWp+UkCAwEAAaOCAWswggFnMA8G +A1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFAh2zcsH/yT2xc3tu5C84oQ3RnX3MFIG +A1UdIwRLMEmhQqRAMD4xCzAJBgNVBAYTAlBMMRswGQYDVQQKExJVbml6ZXRvIFNw +LiB6IG8uby4xEjAQBgNVBAMTCUNlcnR1bSBDQYIDAQAgMA4GA1UdDwEB/wQEAwIB +BjAsBgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vY3JsLmNlcnR1bS5wbC9jYS5jcmww +aAYIKwYBBQUHAQEEXDBaMCgGCCsGAQUFBzABhhxodHRwOi8vc3ViY2Eub2NzcC1j +ZXJ0dW0uY29tMC4GCCsGAQUFBzAChiJodHRwOi8vcmVwb3NpdG9yeS5jZXJ0dW0u +cGwvY2EuY2VyMDkGA1UdIAQyMDAwLgYEVR0gADAmMCQGCCsGAQUFBwIBFhhodHRw +Oi8vd3d3LmNlcnR1bS5wbC9DUFMwDQYJKoZIhvcNAQELBQADggEBAI3m/UBmo0yc +p6uh2oTdHDAH5tvHLeyDoVbkHTwmoaUJK+h9Yr6ydZTdCPJ/KEHkgGcCToqPwzXQ +1aknKOrS9KsGhkOujOP5iH3g271CgYACEnWy6BdxqyGVMUZCDYgQOdNv7C9C6kBT +Yr/rynieq6LVLgXqM6vp1peUQl4E7Sztapx6lX0FKgV/CF1mrWHUdqx1lpdzY70a +QVkppV4ig8OLWfqaova9ML9yHRyZhpzyhTwd9yaWLy75ArG1qVDoOPqbCl60BMDO +TjksygtbYvBNWFA0meaaLNKQ1wmB1sCqXs7+0vehukvZ1oaOGR+mBkdCcuBWCgAc +eLmNzJkEN0k= +-----END CERTIFICATE----- diff --git a/codeception.yml b/codeception.yml new file mode 100644 index 0000000..af20104 --- /dev/null +++ b/codeception.yml @@ -0,0 +1,9 @@ +# global codeception file to run tests from all apps +include: + - common + - frontend + - backend +paths: + log: console/runtime/logs +settings: + colors: true \ No newline at end of file diff --git a/common/Controller/AdminController.php b/common/Controller/AdminController.php new file mode 100644 index 0000000..2cff568 --- /dev/null +++ b/common/Controller/AdminController.php @@ -0,0 +1,99 @@ +request->get($key, $val); + } + + /** + * Des:获取post传值的参数 + * Name: _get + * @param $key + * @param $val + * @return array|mixed + * @author 倪宗锋 + */ + public function _post($key, $val = '') + { + return trim(Yii::$app->request->post($key, $val)); + } + + /** + * Des:获取所有传参的参数值 + * Name: _request + * @param $key + * @param $val + * @return mixed + * @author 倪宗锋 + */ + public function _request($key, $val = '') + { + return trim(Yii::$app->request->getQueryParam($key, $val)); + } + + /** + * Des:访问方法前的参数 + * Name: beforeaction + * @param \yii\base\Action $action + * @return bool + * @author 倪宗锋 + */ + public function beforeaction($action) + { + /**获取路由地址**/ + $actionName = $action->controller->id . '/' . $action->id; + $unLoginConfig = AdminUtil::getUnLoginConfig(); + + if (in_array($actionName, $unLoginConfig) == false) { + //校验用户登录信息 + $checkLogin = AdminUtil::checkLogin(); + if ($checkLogin['flag'] == false) { + Yii::$app->response->format = Response::FORMAT_JSON; + Yii::$app->response->data = $checkLogin; + return false; + } + + //校验用户权限 + $authAction = AdminUtil::checkAuthAction($actionName); + if($authAction['flag'] == false) { + Yii::$app->response->format = Response::FORMAT_JSON; + Yii::$app->response->data = $authAction; + return false; + } + } + return true; + } +} \ No newline at end of file diff --git a/common/Controller/FxWebController.php b/common/Controller/FxWebController.php new file mode 100644 index 0000000..739a274 --- /dev/null +++ b/common/Controller/FxWebController.php @@ -0,0 +1,95 @@ +request->get($key, $val); + } + + /** + * Des:获取post传值的参数 + * Name: _get + * @param $key + * @param $val + * @return array|mixed + * @author 倪宗锋 + */ + public function _post($key, $val = '') + { + return Yii::$app->request->post($key, $val); + } + + /** + * Des:获取所有传参的参数值 + * Name: _request + * @param $key + * @param $val + * @return mixed + * @author 倪宗锋 + */ + public function _request($key, $val = '') + { + return Yii::$app->request->getQueryParam($key, $val); + } + + /** + * Des:访问方法前的参数 + * Name: beforeaction + * @param \yii\base\Action $action + * @return bool + * @author 倪宗锋 + */ + public function beforeaction($action) + { + /**获取路由地址**/ + $actionName = $action->controller->id . '/' . $action->id; + $unLoginConfig = FxUtil::getUnLoginConfig(); + $unCheckPhone = require APP_PATH.'/config/unCheckPhone.php'; + //获取非强制登录接口配置信息 + $checkPhone = true; + if(in_array($actionName, $unCheckPhone)) { + $checkPhone = false; + } + if (in_array($actionName, $unLoginConfig) == false) { + $checkLogin = FxUtil::checkLogin($checkPhone); + if ($checkLogin['flag'] == false) { + Yii::$app->response->format = 'json'; + Yii::$app->response->data = $checkLogin; + return false; + } + } + return true; + } +} \ No newline at end of file diff --git a/common/Controller/ShopWebController.php b/common/Controller/ShopWebController.php new file mode 100644 index 0000000..91f3c0c --- /dev/null +++ b/common/Controller/ShopWebController.php @@ -0,0 +1,66 @@ +request->get($key, $val); + } + + /** + * Des:获取post传值的参数 + * Name: _get + * @param $key + * @param $val + * @return array|mixed + * @author 倪宗锋 + */ + public function _post($key, $val = '') + { + return Yii::$app->request->post($key, $val); + } + + /** + * Des:获取所有传参的参数值 + * Name: _request + * @param $key + * @param $val + * @return mixed + * @author 倪宗锋 + */ + public function _request($key, $val = '') + { + return Yii::$app->request->getQueryParam($key, $val); + } +} \ No newline at end of file diff --git a/common/config/.gitignore b/common/config/.gitignore new file mode 100644 index 0000000..42799dd --- /dev/null +++ b/common/config/.gitignore @@ -0,0 +1,3 @@ +main-local.php +params-local.php +test-local.php diff --git a/common/config/aliConfig/payConfig.php b/common/config/aliConfig/payConfig.php new file mode 100644 index 0000000..4892507 --- /dev/null +++ b/common/config/aliConfig/payConfig.php @@ -0,0 +1,52 @@ + [ + 'app_id' => "2016102100728544",//应用ID,您的APPID。 + //商户私钥,您的原始格式RSA私钥 + 'merchant_private_key' => "MIICXQIBAAKBgQC3Vh2FJi4Yfm7/MrohS3lPyL/jVEMlobvhmekohNid4cQPxzQg4PGFoOqitEcVDjJkDgd3Hs1K12g6cUnNBM0A5FLY46t3UJ5pnV1FxCMTst1vGGElzgnw7jNO/68AL/PUKpqE7kVYHOpBTwX2Ml0hauX/pRUOjTIPGS0VNvSIqwIDAQABAoGAfeNS59+8nTML8o4Zgs05YpB9OpLcfJWe1h2CHUGDIH4qy47Ee6MaFODW3JwfhxS1g0Ci3ae33aElv6OUwoN+Y+nJ0Gi83iV+wA6VOkF2lw9mj6YzAYgSrSSQj2MFm0zXd2IFMhm8cHIQs/IaA5ajUaHz+oPvsedaCEpMlayhHeECQQDdyfXjPTnY0nIKokvswpJj4P9sZpZh1ANOjpZ/pXrIhQm1IV9m9YjIvr1lcLcdSX/oFc9DWUu9nKbJqsmgc4UxAkEA0528I3uzTBcvuxFZbm0F6eSrFLX47RDNWB1YcqD6FWzGl+vMFxkMf0dQ8qsNntp1EZ7WGI1QKjwCtozcBMgkmwJACXcuHFWnm15X6aZFkUQ4lTSsEgdK0cAHqBmjyKzaUaaD5IwZEz7VaKPjV2n5FrHlWJVdtCUie2QtJhw44LUtcQJBAIt2PcKIyI5SDZPUiELdOPN/TzyT/NyHoTz8Aglxi79I88y1isiCKplLL87t6kkRoeud6W0+3GEpMYSLaokAOhcCQQCaMtuM7IMmlOtC6EIRniQzZjGsLhMTRqYtFD3mA3GiIcuShv5+i/qbrFRApJu70TQqPEnIjsqVxwCKVNmROU/8", + 'return_url' => "http://alipay/return_url.php", //同步跳转 + 'charset' => "UTF-8",//编码格式 + 'timeout' => '2m',//未支付超时时间 + 'gatewayUrl' => "http://openapi.alipay.com/gateway.do",//支付宝网关 + //支付宝公钥 + 'alipay_public_key' => "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDIgHnOn7LLILlKETd6BFRJ0GqgS2Y3mn1wMQmyh9zEyWlz5p1zrahRahbXAfCfSqshSNfqOmAQzSHRVjCqjsAw1jyqrXaPdKBmr90DIpIxmIyKXv4GGAkPyJ/6FTFY99uhpiq0qadD/uSzQsefWo0aTvP/65zi3eof7TcZ32oWpwIDAQAB" + ], + //蜘蛛分销支付宝 + '2017030306030595' => [ + 'app_id' => "2017030306030595",//应用ID,您的APPID。 + //商户私钥,您的原始格式RSA私钥 + 'merchant_private_key' => "MIICXgIBAAKBgQDvgdcxY04CAINcdWsDcs5HE0qhaj7PtfOvtlDktihVuguXstQaz29c7nuMPrpabS24q7s0EPCIql3qE/JWHQ3wAy0+rmvrJyS1SygYeiVhWX0QfJEmsVcg5HBXd+cmHanYAjfQrOAg3hw43JWgtogC6EwJPdiBRq1G4hUF9iXQJQIDAQABAoGBAIUXP7+gET8njdeZIAhgiaQRYk1kPtcpouqngzg0ySEqKzr3Esp7LsUTePAsA14wgVG3jGWYbDFlip6Cyw1zQ8RirMv8VpzmH1Y8crqAJhxXcapJxW4ZawI+WVvLfQtsAs+BYKZ3gUejqkFVFDsD8t0TdJ69atYk5LolQfizxKcBAkEA99Ag9MJwKVk6noVSJI1Abyq0c0nsAXDMMW210VdusKhfij9wYwTqEtHE2G0HLRab6AdLUVPDW6FvyG6Kx1rVxQJBAPdrdzd8V6fvWu5BonMdIxyVIKQZBK47pKSlEWKtwRAWmskIgLxMVq/yZQ/qO8MguYZoS7HE3jMQdVWKbw09FuECQQDD4Y0bS1JTLMfMI8ARSmHDPXNTqfvWC64r5/eO2NiS5RRX99tDOdA4Pf2lwVCp0DQ+TP249Ef4dvwf51jlSaStAkAm/qf+dbl2/VFuhaetzuTOx24qjsrfDwVm8aEo1Uu9VmK01oM7qihreJ+W/4rFuS2kUmHDtcxzbd+gSL4x7vPhAkEA8/YHEIto1jBJiOUzBObPrPkzypgaOJAUS8fM1GmulRLxAdfujsdZdKmAmq+d421ONeL/D4HMKGzxTVwYXi2H+Q==", + 'return_url' => "http://alipay/return_url.php", //同步跳转 + 'charset' => "UTF-8",//编码格式 + 'timeout' => '2m',//未支付超时时间 + 'gatewayUrl' => "http://openapi.alipay.com/gateway.do",//支付宝网关 + //支付宝公钥 + 'alipay_public_key' => 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDvgdcxY04CAINcdWsDcs5HE0qhaj7PtfOvtlDktihVuguXstQaz29c7nuMPrpabS24q7s0EPCIql3qE/JWHQ3wAy0+rmvrJyS1SygYeiVhWX0QfJEmsVcg5HBXd+cmHanYAjfQrOAg3hw43JWgtogC6EwJPdiBRq1G4hUF9iXQJQIDAQAB' + ], + //千岛湖支付宝 + '2017032106317613' => [ + 'app_id' => "2017032106317613",//应用ID,您的APPID。 + //商户私钥,您的原始格式RSA私钥 + 'merchant_private_key' => "MIICXAIBAAKBgQDfCHWdhKOcaTWM9WDanO/3Txy00r6yzkrl9qcE9Z1NhC5HpfEvvT5leUv+7ekpNJfFIj4/N8Z3wjVeE/ydxmmeVYJZOG25rLyLrRZJH1SI6nAISkD05cMa/hiXGgojJkkKhNGt+yH2XfjZl/m5k/Xs5yk123EkVJ0nbzODwJ8o2wIDAQABAoGBAL0CG0JxLIIZuvMI45qAUvAfkDFBQ7CeGGUIAQS37SXK9blsTJfrZVxzTc7t6aEs282JNn02lC/bWoSupW9DvS6G4S48bKzcIFGnIkI48Yj2nmguWUy70cM73QjmLnCHTh9+5CJtsT5kmU3+wKhIypQ2A2jHBEWXr2ltjpnSmjIpAkEA+ZDeVCsqGgB8OzMWYroc7yzwzOx3T4OCjj4tdTmSf6KWtx9UVMZTdDauSaxkanhLsF3wlAQG7xGq8Zwyn4MpvwJBAOTIeXp3UFVfsbFXLXegA25UKnHG2BnCwnGhk1kyRXITyaFF8zicO1PP9Sn1chC9MWgGHWa/J33LdZJyyAEPb+UCQGwKf3XIyg0/sIigcUyEbgpNVmIg7PYLZPXXjS52oimHZeAZPBUHVxG0qndSnpZJRdswj/pEVAwjhfHbQT81NVkCQGfH7Rs5vo5Lz45zzmNCievlcC+WlPbym0PymKXQoSIDieaHlbJrZJo7bqou9iRTvnLCu1mdguuUfOwG92VLvGUCQCFyXsmKMswsxkB8LEuE452UpaLxtQJWki3axgG7FvssF7V7aYr+GwgPXRH6lcHSJqPeAlxdwC2bG1FxTTeJFds=", + 'return_url' => "http://alipay/return_url.php", //同步跳转 + 'charset' => "UTF-8",//编码格式 + 'timeout' => '2m',//未支付超时时间 + 'gatewayUrl' => "http://openapi.alipay.com/gateway.do",//支付宝网关 + //支付宝公钥 + 'alipay_public_key' => 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDDI6d306Q8fIfCOaTXyiUeJHkrIvYISRcc73s3vF1ZT7XN8RNPwJxo8pWaJMmvyTn9N4HQ632qJBVHf8sxHi/fEsraprwCtzvzQETrNRwVxLO5jVmRGi60j8Ue1efIlzPXV9je9mkjzOmdssymZkh2QhUrCmZYI/FCEa3/cNMW0QIDAQAB' + ] +]; \ No newline at end of file diff --git a/common/config/bootstrap.php b/common/config/bootstrap.php new file mode 100644 index 0000000..bf0be97 --- /dev/null +++ b/common/config/bootstrap.php @@ -0,0 +1,3 @@ + "/^[a-zA-Z0-9_+\\.\\-]{2,}\@(([0-9a-zA-Z\\-]+)[.])+[a-zA-Z]{2,4}$/",//邮箱 + 'mobile' => "/^[1][0-9]{10}$/",//手机号码 + 'codeMsg' => "/^[a-zA-z0-9]{4}$/",//图形验证码和邮箱验证码 + 'memo' => "/^[A-Za-z0-9_\x{4e00}-\x{9fa5}]{1,20}$/u",//备注 + 'intVal' => "/^[1-9][0-9]{0,10}$/",//数据库验证id + 'id_card'=>"/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{4}$/", //身份证验证 + 'date'=> "/^[0-9]{4}-(((0[13578]|(10|12))-(0[1-9]|[1-2][0-9]|3[0-1]))|(02-(0[1-9]|[1-2][0-9]))|((0[469]|11)-(0[1-9]|[1-2][0-9]|30)))$/", //验证年-月-日 + 'fx_user_name' => "/^[A-Za-z0-9_\x{4e00}-\x{9fa5}]{1,100}$/u",//备注 + 'money' => '/^\+?(?!0+(\.00?)?$)\d+(\.\d\d?)?$/',//金额正则 +); \ No newline at end of file diff --git a/common/config/main.php b/common/config/main.php new file mode 100644 index 0000000..7b5ddc2 --- /dev/null +++ b/common/config/main.php @@ -0,0 +1,7 @@ + 'utf-8', + 'language' => 'zh-CN', + 'timeZone' => 'Asia/Shanghai', + 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor', +]; diff --git a/common/config/params.php b/common/config/params.php new file mode 100644 index 0000000..f8ce702 --- /dev/null +++ b/common/config/params.php @@ -0,0 +1,7 @@ + 'admin@example.com', + 'supportEmail' => 'support@example.com', + 'user.passwordResetTokenExpire' => 3600, + 'system' => 1 +]; diff --git a/common/config/siteConfig.php b/common/config/siteConfig.php new file mode 100644 index 0000000..aa1c777 --- /dev/null +++ b/common/config/siteConfig.php @@ -0,0 +1,25 @@ + '/fx/?r=weChat/we-chat/set-login',//FX 本站点的第三方授权接收地址 + 'fx_authLoginRedirectUrl' => '/fx/?r=weChat/we-chat/auth-login',//fx 本站点的第三方授权中间跳转地址 + 'shop_authLoginUrl' => '/shop/?r=weChat/we-chat/set-login',//shop 本站点的第三方授权接收地址 + 'shop_authLoginRedirectUrl' => '/shop/?r=weChat/we-chat/auth-login',//shop 本站点的第三方授权中间跳转地址 + 'authorizeUrl' => 'https://open.weixin.qq.com/connect/oauth2/authorize?',//微信提供的授权登录路径 + 'authTokenUrl' => 'https://api.weixin.qq.com/sns/oauth2/access_token?',//微信token获取地址 + 'bind_fx_user' => [34, 264, 1, 258, 263, 267, 460, 736, 671, 658, 486, 596], + "wx_home"=>'/web/zzcx/index.html#/main/home'//微信首页地址 +]; diff --git a/common/config/siteConfig/dev/siteConfig.php b/common/config/siteConfig/dev/siteConfig.php new file mode 100644 index 0000000..b818ded --- /dev/null +++ b/common/config/siteConfig/dev/siteConfig.php @@ -0,0 +1,37 @@ +'小黑鱼出行',//网站头 + 'entryAuthWeChat' => 'wx34e2f2b38cfb15a1',//授权登录微信APPID + 'aliPay' => '2017030306030595',//阿里支付 + 'weChatAuthLoginUrl' => 'http://fx.zhizhuchuxing.com/fx/?r=weChat/we-chat/login-redirect',//第三方提供的微信授权登录路径 + 'host_name'=> 'http://fx.zhizhuchuxing.cn',//网站域名 + 'notify_url' => 'http://nwx.zhizhuchuxing.cn/zzcx/order/order/notify',//支付回调地址 + 'adm_host' => 'http://sandbox.zhizhuchuxing.cn',//管理后台地址 + 'adm_host1' => 'http://sandbox1.zhizhuchuxing.cn',//管理后台1地址 + 'adm_user' => 'newfx',//cs接口使用 用户名 + 'adm_user_key' => 'newfx_key',//cs接口使用 用户秘钥 + 'adm_user_id' => 581,//cs接口使用 用户ID + 'adm_source_id' => '1285',//渠道来源编号 + 'show_recom' => [25],//LBS定位的菜单栏ID + 'kefu_tel' => '021-33280519',//客服电话 + 'YunYinPhone' => '13795379620',//运营通知电话 + 'recharge_amount' => 1,//分销商户充值最低金额 + 'pc_uid' => '',//分销PC端展示用户ID + 'zzcx_host' => 'http://nwx.zhizhuchuxing.cn',//下单 + 'wxWeChat' => 'wxbe6da4af3e529e0c',//微信公众号的APPID + 'wx_get_token'=> 'http://wx.zhizhuchuxing.com', + "apply_commission_min"=>50,//最低可提取佣金 +]; \ No newline at end of file diff --git a/common/config/siteConfig/hzdev/siteConfig.php b/common/config/siteConfig/hzdev/siteConfig.php new file mode 100644 index 0000000..11fa606 --- /dev/null +++ b/common/config/siteConfig/hzdev/siteConfig.php @@ -0,0 +1,37 @@ + '昆山集散中心',//网站头 + 'entryAuthWeChat' => 'wx81ac156a5c166881',//授权登录微信APPID + 'aliPay' => '',//阿里支付 + 'weChatAuthLoginUrl' => 'http://hz.zhizhuchuxing.com/zzcx/user/login/auth-login?_a='. microtime(true),//第三方提供的微信授权登录路径 + 'host_name' => 'http://hz.zhizhuchuxing.cn',//网站域名 + 'notify_url' => 'http://hz.zhizhuchuxing.cn/zzcx/order/order/notify',//支付回调地址 + 'adm_host' => 'http://sandbox.zhizhuchuxing.cn',//管理后台地址 + 'adm_host1' => 'http://sandbox1.zhizhuchuxing.cn',//管理后台1地址 + 'adm_user' => 'admin_034',//cs接口使用 用户名 + 'adm_user_key' => 'admin_034',//cs接口使用 用户秘钥 + 'adm_user_id' => 772,//cs接口使用 用户ID + 'adm_source_id' => '1660',//渠道来源编号 + 'show_recom' => [25],//LBS定位的菜单栏ID + 'kefu_tel' => '021-33280519',//客服电话 + 'YunYinPhone' => '18874559393',//运营通知电话 + 'recharge_amount' => 1,//分销商户充值最低金额 + 'pc_uid' => '',//分销PC端展示用户ID + 'zzcx_host' => 'http://hz.zhizhuchuxing.cn',//下单 + 'wxWeChat' => 'wx81ac156a5c166881',//微信公众号的APPID + 'wx_get_token'=> 'http://wx.zhizhuchuxing.com', + "apply_commission_min"=>50,//最低可提取佣金 +]; \ No newline at end of file diff --git a/common/config/siteConfig/hzpro/siteConfig.php b/common/config/siteConfig/hzpro/siteConfig.php new file mode 100644 index 0000000..bb4b8ea --- /dev/null +++ b/common/config/siteConfig/hzpro/siteConfig.php @@ -0,0 +1,37 @@ + '昆山集散中心',//网站头 + 'entryAuthWeChat' => 'wx0376620fe134cef0',//授权登录微信APPID + 'aliPay' => '',//阿里支付 + 'weChatAuthLoginUrl' => 'http://hz.zhizhuchuxing.com/zzcx/user/login/auth-login?_a='. microtime(true),//第三方提供的微信授权登录路径 + 'host_name' => 'http://hzfx.zhizhuchuxing.com',//网站域名 + 'notify_url' => 'http://hz.zhizhuchuxing.com/zzcx/order/order/notify',//支付回调地址 + 'adm_host' => 'http://cs.zhizhuchuxing.com',//管理后台地址 + 'adm_host1' => 'http://cs1.zhizhuchuxing.com',//管理后台1地址 + 'adm_user' => 'admin_036',//cs接口使用 用户名 + 'adm_user_key' => 'admin_036',//cs接口使用 用户秘钥 + 'adm_user_id' => 798,//cs接口使用 用户ID + 'adm_source_id' => '1734',//渠道来源编号 + 'show_recom' => [25],//LBS定位的菜单栏ID + 'kefu_tel' => '021-33280519',//客服电话 + 'YunYinPhone' => '18874559393',//运营通知电话 + 'recharge_amount' => 1,//分销商户充值最低金额 + 'pc_uid' => '',//分销PC端展示用户ID + 'zzcx_host' => 'http://hz.zhizhuchuxing.com',//下单 + 'wxWeChat' => 'wx0376620fe134cef0',//微信公众号的APPID + 'wx_get_token'=> 'http://wx.zhizhuchuxing.com', + "apply_commission_min"=>50,//最低可提取佣金 +]; \ No newline at end of file diff --git a/common/config/siteConfig/ksdev/siteConfig.php b/common/config/siteConfig/ksdev/siteConfig.php new file mode 100644 index 0000000..1001caa --- /dev/null +++ b/common/config/siteConfig/ksdev/siteConfig.php @@ -0,0 +1,37 @@ + '昆山集散中心',//网站头 + 'entryAuthWeChat' => 'wx81ac156a5c166881',//授权登录微信APPID + 'aliPay' => '',//阿里支付 + 'weChatAuthLoginUrl' => 'http://ks.zhizhuchuxing.com/zzcx/user/login/auth-login?_a='. microtime(true),//第三方提供的微信授权登录路径 + 'host_name' => 'http://ks.zhizhuchuxing.cn',//网站域名 + 'notify_url' => 'http://ks.zhizhuchuxing.cn/zzcx/order/order/notify',//支付回调地址 + 'adm_host' => 'http://sandbox.zhizhuchuxing.cn',//管理后台地址 + 'adm_host1' => 'http://sandbox1.zhizhuchuxing.cn',//管理后台1地址 + 'adm_user' => 'admin_034',//cs接口使用 用户名 + 'adm_user_key' => 'admin_034',//cs接口使用 用户秘钥 + 'adm_user_id' => 772,//cs接口使用 用户ID + 'adm_source_id' => '1660',//渠道来源编号 + 'show_recom' => [25],//LBS定位的菜单栏ID + 'kefu_tel' => '021-33280519',//客服电话 + 'YunYinPhone' => '18874559393',//运营通知电话 + 'recharge_amount' => 1,//分销商户充值最低金额 + 'pc_uid' => '',//分销PC端展示用户ID + 'zzcx_host' => 'http://ks.zhizhuchuxing.cn',//下单 + 'wxWeChat' => 'wx81ac156a5c166881',//微信公众号的APPID + 'wx_get_token'=> 'http://ks.zhizhuchuxing.com', + "apply_commission_min"=>50,//最低可提取佣金 +]; \ No newline at end of file diff --git a/common/config/siteConfig/kspro/siteConfig.php b/common/config/siteConfig/kspro/siteConfig.php new file mode 100644 index 0000000..b742667 --- /dev/null +++ b/common/config/siteConfig/kspro/siteConfig.php @@ -0,0 +1,37 @@ + '昆山集散中心',//网站头 + 'entryAuthWeChat' => 'wx81ac156a5c166881',//授权登录微信APPID + 'aliPay' => '',//阿里支付 + 'weChatAuthLoginUrl' => 'http://ks.zhizhuchuxing.com/zzcx/user/login/auth-login?_a='. microtime(true),//第三方提供的微信授权登录路径 + 'host_name' => 'http://ksfx.zhizhuchuxing.com',//网站域名 + 'notify_url' => 'http://ks.zhizhuchuxing.com/zzcx/order/order/notify',//支付回调地址 + 'adm_host' => 'http://cs.zhizhuchuxing.com',//管理后台地址 + 'adm_host1' => 'http://cs1.zhizhuchuxing.com',//管理后台1地址 + 'adm_user' => 'admin_034',//cs接口使用 用户名 + 'adm_user_key' => 'admin_034',//cs接口使用 用户秘钥 + 'adm_user_id' => 772,//cs接口使用 用户ID + 'adm_source_id' => '1660',//渠道来源编号 + 'show_recom' => [25],//LBS定位的菜单栏ID + 'kefu_tel' => '021-33280519',//客服电话 + 'YunYinPhone' => '18874559393',//运营通知电话 + 'recharge_amount' => 1,//分销商户充值最低金额 + 'pc_uid' => '',//分销PC端展示用户ID + 'zzcx_host' => 'http://ks.zhizhuchuxing.com',//下单 + 'wxWeChat' => 'wx81ac156a5c166881',//微信公众号的APPID + 'wx_get_token'=> 'http://wx.zhizhuchuxing.com', + "apply_commission_min"=>50,//最低可提取佣金 +]; \ No newline at end of file diff --git a/common/config/siteConfig/kxpro/siteConfig.php b/common/config/siteConfig/kxpro/siteConfig.php new file mode 100644 index 0000000..c759aec --- /dev/null +++ b/common/config/siteConfig/kxpro/siteConfig.php @@ -0,0 +1,37 @@ + '快行漫游',//网站头 + 'entryAuthWeChat' => 'wxf5d1e7e3317bb073',//授权登录微信APPID + 'aliPay' => '',//阿里支付 + 'weChatAuthLoginUrl' => 'http://kx.zhizhuchuxing.com/zzcx/user/login/auth-login?_a=' . microtime(true),//第三方提供的微信授权登录路径 + 'host_name' => 'http://kxfx.zhizhuchuxing.com',//网站域名 + 'notify_url' => 'http://kx.zhizhuchuxing.com/zzcx/order/order/notify',//支付回调地址 + 'adm_host' => 'http://cs.zhizhuchuxing.com',//管理后台地址 + 'adm_host1' => 'http://cs1.zhizhuchuxing.com',//管理后台1地址 + 'adm_user' => 'admin_037',//cs接口使用 用户名 + 'adm_user_key' => 'admin_037',//cs接口使用 用户秘钥 + 'adm_user_id' => 813,//cs接口使用 用户ID + 'adm_source_id' => '1769',//渠道来源编号 + 'show_recom' => [25],//LBS定位的菜单栏ID + 'kefu_tel' => '021-33280519',//客服电话 + 'YunYinPhone' => '18874559393',//运营通知电话 + 'recharge_amount' => 1,//分销商户充值最低金额 + 'pc_uid' => '',//分销PC端展示用户ID + 'zzcx_host' => 'http://kx.zhizhuchuxing.com',//下单 + 'wxWeChat' => 'wxf5d1e7e3317bb073',//微信公众号的APPID + 'wx_get_token' => 'http://wx.zhizhuchuxing.com', + "apply_commission_min" => 10,//最低可提取佣金 +]; \ No newline at end of file diff --git a/common/config/siteConfig/pro/siteConfig.php b/common/config/siteConfig/pro/siteConfig.php new file mode 100644 index 0000000..6fd48c2 --- /dev/null +++ b/common/config/siteConfig/pro/siteConfig.php @@ -0,0 +1,37 @@ + '小黑鱼出行',//网站头 + 'entryAuthWeChat' => 'wx34e2f2b38cfb15a1',//授权登录微信APPID + 'aliPay' => '2017030306030595',//阿里支付 + 'weChatAuthLoginUrl' => 'http://fx.zhizhuchuxing.com/fx/?r=weChat/we-chat/login-redirect',//第三方提供的微信授权登录路径 + 'host_name' => 'http://fx.zhizhuchuxing.com',//网站域名 + 'notify_url' => 'http://wx.zhizhuchuxing.com/zzcx/order/order/notify',//支付回调地址 + 'adm_host' => 'http://cs.zhizhuchuxing.com',//管理后台地址 + 'adm_host1' => 'http://cs1.zhizhuchuxing.com',//管理后台1地址 + 'adm_user' => 'newfx', + 'adm_user_key' => 'newfx_key', + 'adm_user_id' => 581, + 'adm_source_id' => '1285', + 'show_recom' => [25],//LBS定位的菜单栏ID + 'kefu_tel' => '021-33280519',//客服电话 + 'YunYinPhone' => '18874559393',//运营通知电话 + 'recharge_amount' => 1,//分销商户充值最低金额 + 'pc_uid' => '',//分销PC端展示用户ID + 'zzcx_host' => 'http://wx.zhizhuchuxing.com',//下单 + 'wxWeChat' => 'wxbe6da4af3e529e0c',//微信公众号的APPID + 'wx_get_token'=> 'http://wx.zhizhuchuxing.com', + "apply_commission_min"=>50,//最低可提取佣金 +]; \ No newline at end of file diff --git a/common/config/siteConfig/qdh/siteConfig.php b/common/config/siteConfig/qdh/siteConfig.php new file mode 100644 index 0000000..0b2f428 --- /dev/null +++ b/common/config/siteConfig/qdh/siteConfig.php @@ -0,0 +1,36 @@ +'蜘蛛出行',//网站头 + 'entryAuthWeChat' => 'wxf945d8fb99f6250d',//授权登录微信APPID + 'aliPay' => '2017032106317613',//阿里支付 + 'weChatAuthLoginUrl' => 'http://qdhfx.zhizhuchuxing.com/fx/?r=weChat/we-chat/login-redirect',//第三方提供的微信授权登录路径 + 'host_name'=> 'http://qdhfx.zhizhuchuxing.cn',//网站域名 + 'notify_url' => '/fx/wechat/notify/',//支付回调地址 + 'adm_host' => 'http://sandbox.zhizhuchuxing.cn',//管理后台地址 + 'adm_host1' => 'http://sandbox1.zhizhuchuxing.cn',//管理后台1地址 + 'adm_user' => 'hzqdh', + 'adm_user_key' => 'hzqdh_key', + 'adm_user_id' => 450, + 'adm_source_id' => '1311', + 'show_recom' => [],//LBS定位的菜单栏ID + 'kefu_tel' => '400-105-1078',//客服电话 + 'YunYinPhone' => '',//运营通知电话 + 'recharge_amount' => 1,//分销商户充值最低金额 + 'pc_uid' => 4,//分销PC端展示用户ID + 'zzcx_host' => 'http://nwx.zhizhuchuxing.cn',//下单 + 'wxWeChat' => '',//微信公众号的APPID, + "apply_commission_min"=>50,//最低可提取佣金 +]; \ No newline at end of file diff --git a/common/config/siteConfig/qdhpro/siteConfig.php b/common/config/siteConfig/qdhpro/siteConfig.php new file mode 100644 index 0000000..376ce52 --- /dev/null +++ b/common/config/siteConfig/qdhpro/siteConfig.php @@ -0,0 +1,36 @@ +'蜘蛛出行',//网站头 + 'entryAuthWeChat' => 'wxf945d8fb99f6250d',//授权登录微信APPID + 'aliPay' => '2017032106317613',//阿里支付 + 'weChatAuthLoginUrl' => 'http://qdhfx.zhizhuchuxing.com/fx/?r=weChat/we-chat/login-redirect',//第三方提供的微信授权登录路径 + 'host_name'=> 'http://qdhfx.zhizhuchuxing.com',//网站域名 + 'notify_url' => '/fx/wechat/notify/',//支付回调地址 + 'adm_host' => 'http://cs.zhizhuchuxing.com',//管理后台地址 + 'adm_host1' => 'http://cs1.zhizhuchuxing.com',//管理后台1地址 + 'adm_user' => 'hzqdh', + 'adm_user_key' => 'hzqdh_key', + 'adm_user_id' => 450, + 'adm_source_id' => '1311', + 'show_recom' => [],//LBS定位的菜单栏ID + 'kefu_tel' => '400-105-1078',//客服电话 + 'YunYinPhone' => '13625816476',//运营通知电话 + 'recharge_amount' => 1,//分销商户充值最低金额 + 'pc_uid' => 4,//分销PC端展示用户ID + 'zzcx_host' => 'http://fx.zhizhuchuxing.com',//下单 + 'wxWeChat' => '',//微信公众号的APPID, + "apply_commission_min"=>50,//最低可提取佣金 +]; \ No newline at end of file diff --git a/common/config/siteConfig/yyt/siteConfig.php b/common/config/siteConfig/yyt/siteConfig.php new file mode 100644 index 0000000..fd2e0c8 --- /dev/null +++ b/common/config/siteConfig/yyt/siteConfig.php @@ -0,0 +1,34 @@ +'运游通',//网站头 + 'entryAuthWeChat' => 'wxae738c8d5654e01d',//授权登录微信APPID + 'aliPay' => '2016102100728544',//阿里支付 + 'weChatAuthLoginUrl' => 'http://yybs.njyunyoutong.com/module/wxInterface/authLogin?ma='.rand(1000,9000),//第三方提供的微信授权登录路径 + 'host_name'=> 'http://fxtest.njyunyoutong.com/',//网站域名 + 'notify_url' => '/fx/wechat/notify/',//支付回调地址 + 'adm_host' => 'http://cs.zhizhuchuxing.com',//管理后台地址 + 'adm_host1' => 'http://cs1.zhizhuchuxing.com',//管理后台1地址 + 'adm_user' => 'newfx', + 'adm_user_key' => 'newfx_key', + 'adm_user_id' => 581, + 'adm_source_id' => '1285', + 'show_recom' => [25],//LBS定位的菜单栏ID + 'kefu_tel' => '021-33280519',//客服电话 + 'YunYinPhone' => '',//运营通知电话 + 'recharge_amount' => 1,//分销商户充值最低金额 + 'pc_uid' => 4,//分销PC端展示用户ID, + "apply_commission_min"=>50,//最低可提取佣金 +]; \ No newline at end of file diff --git a/common/config/wechatConfig/cert/1329733601/apiclient_cert.pem b/common/config/wechatConfig/cert/1329733601/apiclient_cert.pem new file mode 100644 index 0000000..72c2ac8 --- /dev/null +++ b/common/config/wechatConfig/cert/1329733601/apiclient_cert.pem @@ -0,0 +1,26 @@ +-----BEGIN CERTIFICATE----- +MIIEZTCCA86gAwIBAgIDHYb3MA0GCSqGSIb3DQEBBQUAMIGKMQswCQYDVQQGEwJD +TjESMBAGA1UECBMJR3Vhbmdkb25nMREwDwYDVQQHEwhTaGVuemhlbjEQMA4GA1UE +ChMHVGVuY2VudDEMMAoGA1UECxMDV1hHMRMwEQYDVQQDEwpNbXBheW1jaENBMR8w +HQYJKoZIhvcNAQkBFhBtbXBheW1jaEB0ZW5jZW50MB4XDTE2MDQwNjEyNTAyNVoX +DTI2MDQwNDEyNTAyNVowgZUxCzAJBgNVBAYTAkNOMRIwEAYDVQQIEwlHdWFuZ2Rv +bmcxETAPBgNVBAcTCFNoZW56aGVuMRAwDgYDVQQKEwdUZW5jZW50MQ4wDAYDVQQL +EwVNTVBheTEqMCgGA1UEAxQh6JyY6Jub6KGM572R57uc56eR5oqA5pyJ6ZmQ5YWs +5Y+4MREwDwYDVQQEEwgxMTc3NDYwNDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBAMJqPHEeUQvWZQWl5W/QvI/MR97jCY6iArnfPPkLBgWY6lEh7cGFn5Fq +C2DsTHxuUC/7si9Sq5QHA2K8VaLk8qYDj2CurT0yRFVAVss/NYfPerZ6nHLbEB4p +dYg6jUvQVWe7n5hJScq+89MNGUOpgF4uCCD/HyUDpRT8MFRQ+yGDTpuCjqZwexgM +e0jNTKwvCXVwLcgR9LFknSiJCxDHAqauqd4r+ZAjDU4CZ/JWdeyLuRUqwxz4kECE +S9iC79mhyo/KwoUupsZKp8RKacrhHybqMjgyZNFsVueLHjcDpYkMgrpUQU6QBJv6 +pLqOPejSQg99ddJNBTJJwwffU2mrDG0CAwEAAaOCAUYwggFCMAkGA1UdEwQCMAAw +LAYJYIZIAYb4QgENBB8WHSJDRVMtQ0EgR2VuZXJhdGUgQ2VydGlmaWNhdGUiMB0G +A1UdDgQWBBTIibbUnV9kTejncwyzXb81/xqj9TCBvwYDVR0jBIG3MIG0gBQ+BSb2 +ImK0FVuIzWR+sNRip+WGdKGBkKSBjTCBijELMAkGA1UEBhMCQ04xEjAQBgNVBAgT +CUd1YW5nZG9uZzERMA8GA1UEBxMIU2hlbnpoZW4xEDAOBgNVBAoTB1RlbmNlbnQx +DDAKBgNVBAsTA1dYRzETMBEGA1UEAxMKTW1wYXltY2hDQTEfMB0GCSqGSIb3DQEJ +ARYQbW1wYXltY2hAdGVuY2VudIIJALtUlyu8AOhXMA4GA1UdDwEB/wQEAwIGwDAW +BgNVHSUBAf8EDDAKBggrBgEFBQcDAjANBgkqhkiG9w0BAQUFAAOBgQAHelavW3WB +2qBtcG0uEVPLYlWKMvYpO79QUaWPYWh9bywA9d2zqoM8LfWgkOJtmetNdiqh3RVf +/DrKWsLalluaLIMEHuX2chnvtT7vIO4ILijgP/4MZ9k8Jpmi3tKUfFpJVA7E4MXa +7vM5gl21FRuqB96m24tynWHjmgshc4Kk2g== +-----END CERTIFICATE----- diff --git a/common/config/wechatConfig/cert/1329733601/apiclient_key.pem b/common/config/wechatConfig/cert/1329733601/apiclient_key.pem new file mode 100644 index 0000000..fdb2e29 --- /dev/null +++ b/common/config/wechatConfig/cert/1329733601/apiclient_key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDCajxxHlEL1mUF +peVv0LyPzEfe4wmOogK53zz5CwYFmOpRIe3BhZ+Ragtg7Ex8blAv+7IvUquUBwNi +vFWi5PKmA49grq09MkRVQFbLPzWHz3q2epxy2xAeKXWIOo1L0FVnu5+YSUnKvvPT +DRlDqYBeLggg/x8lA6UU/DBUUPshg06bgo6mcHsYDHtIzUysLwl1cC3IEfSxZJ0o +iQsQxwKmrqneK/mQIw1OAmfyVnXsi7kVKsMc+JBAhEvYgu/ZocqPysKFLqbGSqfE +SmnK4R8m6jI4MmTRbFbnix43A6WJDIK6VEFOkASb+qS6jj3o0kIPfXXSTQUyScMH +31NpqwxtAgMBAAECggEALemSzo//SdFe2B+eeHKOJVNz4aIyXpnKFQUwTAwbZvT+ +2RwvHtWkol2txDzprzUKANrq8JwQYwvo88dQXgC9gRE0Kfv2c45Mbumb1bHevWz1 +KOT5z3IGc2kNFZfmSHIxySaZAQjFwXio8j2UqtL7usIaL1iwjTg4IyWPcEoTlI0Y +reRXlZY5z+VpaDFQubFytF+5zlb7ck/lPa8B6IJXZTBBQC6zBhuxXPky8uAjiza1 +1C0EHcIIwA+jkVxRbV4e8e6VV4OPnjgok8rN0GPEPlJNo/Gs73vSCRNOYgz5QwTB +7JgRc4eFEXLaX7ntZxhkrOjK1kJQ8hLxYQLvygA0zQKBgQD8+PmHg59Y4c6MkYYk +Gxn8SK6QCtNns72uFi3DJAN9j7x3ZSb4PcjDao0e9BeOt2wKuX+kOyXtSbKA33o/ +izeevp9UF2eNhGWgGaU7kMAgylS/V/iIN4A4UuzOyPEYSa9LYLMeHwh+OtH6skqZ +ZjRPaLyJYrhP8Ecqp1B7rmu4rwKBgQDEvdwvvpmiEbui91g2l9P1E/ik3f+VfOTR +5qKtYHYtYdkZAmg+7B6V5f8BCjx7NScS9di8J5KEOuDAc/MXD+o9jDxlxsSmAXB4 +n6fqko/wHmG+Q6FXmFamO3mdj+ziKt6ykoNQWS3lzZ4KLHNC1lDwMsd6VmMMr3Ys +iGH4nYYbowKBgDc7kRfCaDc6ziMo3tXhSPIpWFvA0VmSB/cLhqBVq6FtkaOr5S9M +JhpsmDVK7B3P9Hn++Fx+QZCmh5/Vq1ZWaiVxz03H8mcWoi2ri8UOnLRMGObSKURs +gcVKbcPUYbeA1xIpIdKQygTtiM0owlrt0rwHzSpd8Ioblx47+7mVYpWnAoGBAKgu +QMZToZNoo0S5OiBZA6iyLNAKsgxA2n4QMSoSlpNO3L3DUAfR4odzN9zUukT8d+1+ +WYrmLRp6FlyOAdTKFwwMEClUlA/wlQuYN3uPVBoIbretqoNtx0yM9PZa7T2dNgfi +tPv/b/vNHHdH7jPJbyEV123d4QgcCeIhp9ZWGikPAoGBAMUbx9snnBwswUae+Dv2 +NkH02dv7oPQnPWKbk8b1s/LQEuisYO+34Aofx1ik5MmAZBN/3x8Cn7/i0eOKEUnd +TRsJuiiSFLYdNISDUBQ4R263uSewow9kagrk/lwQgZ/6pJSXQH9G1ycNeZxmR3dq +XevCR+GjHIwTFaYo4XOBYoNw +-----END PRIVATE KEY----- diff --git a/common/config/wechatConfig/cert/1424400302/apiclient_cert.pem b/common/config/wechatConfig/cert/1424400302/apiclient_cert.pem new file mode 100644 index 0000000..65958be --- /dev/null +++ b/common/config/wechatConfig/cert/1424400302/apiclient_cert.pem @@ -0,0 +1,26 @@ +-----BEGIN CERTIFICATE----- +MIIEcTCCA9qgAwIBAgIDbv1AMA0GCSqGSIb3DQEBBQUAMIGKMQswCQYDVQQGEwJD +TjESMBAGA1UECBMJR3Vhbmdkb25nMREwDwYDVQQHEwhTaGVuemhlbjEQMA4GA1UE +ChMHVGVuY2VudDEMMAoGA1UECxMDV1hHMRMwEQYDVQQDEwpNbXBheW1jaENBMR8w +HQYJKoZIhvcNAQkBFhBtbXBheW1jaEB0ZW5jZW50MB4XDTE2MTIxNTAyNTEzMVoX +DTI2MTIxMzAyNTEzMVowgaExCzAJBgNVBAYTAkNOMRIwEAYDVQQIEwlHdWFuZ2Rv +bmcxETAPBgNVBAcTCFNoZW56aGVuMRAwDgYDVQQKEwdUZW5jZW50MQ4wDAYDVQQL +EwVNTVBheTE2MDQGA1UEAxQt5p2t5bee5Y2D5bKb5rmW5peF5ri46ZuG5pWj5Lit +5b+D5pyJ6ZmQ5YWs5Y+4MREwDwYDVQQEEwgxNzMzNjA0ODCCASIwDQYJKoZIhvcN +AQEBBQADggEPADCCAQoCggEBAODZhsyu7SJwyB4dTG8VFMGcGQHhUxQVB+yu2QOj +MLJp53IujiIhAjTRqG9Equek/R+h6oCnmeTjD6xXC9notguntPYeXSPHMjETFy/F +HJlqIm30+jRXIA0ReI/Wieql5P9sDrTswt+Y0pNDmAonGLdKU4FshZWBjlDdmOiJ +Ggs1a6UEP7QDW/IYEwUD2eorQbY9DlRf1OFqhHsHbbQbdm3S08wDaklf3prnnqVv +TbvbW5t5YK44IBzJPyhguFMHclTbRy+E6MZZb28cwYXlp6aWe50IDgFW042IatW3 +joKuWsVOZRZlOvXmjl60ouXuDXA65WRYbrXRKeL/mZ78410CAwEAAaOCAUYwggFC +MAkGA1UdEwQCMAAwLAYJYIZIAYb4QgENBB8WHSJDRVMtQ0EgR2VuZXJhdGUgQ2Vy +dGlmaWNhdGUiMB0GA1UdDgQWBBSuCl5BeaCKOfkvmFS++3+56NZN3DCBvwYDVR0j +BIG3MIG0gBQ+BSb2ImK0FVuIzWR+sNRip+WGdKGBkKSBjTCBijELMAkGA1UEBhMC +Q04xEjAQBgNVBAgTCUd1YW5nZG9uZzERMA8GA1UEBxMIU2hlbnpoZW4xEDAOBgNV +BAoTB1RlbmNlbnQxDDAKBgNVBAsTA1dYRzETMBEGA1UEAxMKTW1wYXltY2hDQTEf +MB0GCSqGSIb3DQEJARYQbW1wYXltY2hAdGVuY2VudIIJALtUlyu8AOhXMA4GA1Ud +DwEB/wQEAwIGwDAWBgNVHSUBAf8EDDAKBggrBgEFBQcDAjANBgkqhkiG9w0BAQUF +AAOBgQDBdRAOavYhQEaMyVtISWfTNxW5HIH5gguTSwH9w7nGTlZf5C6OGUL3OZEG +3fQ+ve2FxiNAUAqTiG8BsiY7higf5fD2kTaupwPZ9b5jKIHkBVq+Q/TkO57JnlWA +Xuya8V0laO7T/FBL7hZqHPUH/ffJYq4GtluwrJ7I/5k0GOLDxw== +-----END CERTIFICATE----- diff --git a/common/config/wechatConfig/cert/1424400302/apiclient_key.pem b/common/config/wechatConfig/cert/1424400302/apiclient_key.pem new file mode 100644 index 0000000..56528cf --- /dev/null +++ b/common/config/wechatConfig/cert/1424400302/apiclient_key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDg2YbMru0icMge +HUxvFRTBnBkB4VMUFQfsrtkDozCyaedyLo4iIQI00ahvRKrnpP0foeqAp5nk4w+s +VwvZ6LYLp7T2Hl0jxzIxExcvxRyZaiJt9Po0VyANEXiP1onqpeT/bA607MLfmNKT +Q5gKJxi3SlOBbIWVgY5Q3ZjoiRoLNWulBD+0A1vyGBMFA9nqK0G2PQ5UX9ThaoR7 +B220G3Zt0tPMA2pJX96a556lb02721ubeWCuOCAcyT8oYLhTB3JU20cvhOjGWW9v +HMGF5aemlnudCA4BVtONiGrVt46CrlrFTmUWZTr15o5etKLl7g1wOuVkWG610Sni +/5me/ONdAgMBAAECggEBAMFD1+zZMnSW8juIPWmBejzMOmZ2UZ2CUjRrOZc5zqKc +CtcHEx5ctvPFffxdznSbSQLGfrUk2k91p8Qfcc1UjB1Kgm3GPZKCJi8uVJC34VQw +ePWASwtwE9mHudQQuKza+RFexOlYVEwypFT2FZosbr8lAM/PAqc2G6iAQG0nYx5b +qD9JG0dWM8weEHdWVUrqPjKxBbmAAw9s/eBK/EdNiBV/bbaV5R5D0vCmZNIEwHuM +9NuYTpX6gyNFK7bWfhOUaAHq8DVT8RW3+0U8Rs852wgA80IsV4TR/z0qUzYQA90Q +7IRBugOqO7rTPnWdgIfU7Vhy2grfnJgaQy/zi+r58IECgYEA/uCWSGdWJ43bjDMQ +0QvdyjLtz+fVt5NrVfqXwGujyiMGD+cL6Kv26NG8t2p42dPxAbSeTMlhdOPN5nay +8XAYDpn210kqLYjtVIep2QsX3hc55ODnBmUhXAs3gEubCZmdjGEnHNNyupKZhgN9 ++SnaQ2BIvvKJQHOhYNKPyQE+UD0CgYEA4dcUL37g02Zi+ujEvtBDEqosdl6pXpSy +RvDrYJ1rgDuDn74H32VVuNYi4m3sQcvQe01FeWsRAcUy0B7lv4h0g/Q/4wkD4NkH +KBwQOP+Aj3MDQ5+PJDVal1RRZWw+VMKmwY+jqUpwrNHiTDK/tn6KsnTC/S017BF3 +CvtwAst/8aECgYEA94DuTwcSMbzeuymHpgjI6qZEK0WtUuQ0Mjzziia82fji1SR/ +ewUq8vFhOheJnbXjbs2Pf297VQA2nRsdL7mzktJOUsc4zxkNpq1K8XqFReT2El2X +2qzwFSrLTamdt1fWF1Dso2BuI+FidjID7aaHzi+81Lg/MjhXOOegOwgbE90CgYAi +DMR9WLrbBK/dtqSbRFkogkHL4v/UQ8URTxed7H4dyltRBVy4gNXI1XhS/VHGpc0c +Gg1kfhEFXE8J8+6dzxwKHRRYza4pA2/By2FixpsChcuzMWZqhiTPdiYDjatkKijs +PBTn3FJarBZbeLdQ84lD2LjhZSShIAz7uecsdLQooQKBgQCE0NibkVvSsZ4LoZEi +jWV78S6qXU1g0ANsKNF3dOoaXo3p8DknpS/oJ1/OA78IlKB/WQPOWsPpXQsOXkZx +qcdNgJnV8j3DvOr+Tm8rzl3HKCucQef7IfSbW1aJD+TX6rFVMeHydY6lSB8oeJLY +nRpxVJWSOOjXAIIu9t9nExQQgw== +-----END PRIVATE KEY----- diff --git a/common/config/wechatConfig/cert/1439003102/apiclient_cert.pem b/common/config/wechatConfig/cert/1439003102/apiclient_cert.pem new file mode 100644 index 0000000..f513766 --- /dev/null +++ b/common/config/wechatConfig/cert/1439003102/apiclient_cert.pem @@ -0,0 +1,26 @@ +-----BEGIN CERTIFICATE----- +MIIEbDCCA9WgAwIBAgIEAJaVazANBgkqhkiG9w0BAQUFADCBijELMAkGA1UEBhMC +Q04xEjAQBgNVBAgTCUd1YW5nZG9uZzERMA8GA1UEBxMIU2hlbnpoZW4xEDAOBgNV +BAoTB1RlbmNlbnQxDDAKBgNVBAsTA1dYRzETMBEGA1UEAxMKTW1wYXltY2hDQTEf +MB0GCSqGSIb3DQEJARYQbW1wYXltY2hAdGVuY2VudDAeFw0xNzAyMDgxMTIwMDZa +Fw0yNzAyMDYxMTIwMDZaMIGbMQswCQYDVQQGEwJDTjESMBAGA1UECBMJR3Vhbmdk +b25nMREwDwYDVQQHEwhTaGVuemhlbjEQMA4GA1UEChMHVGVuY2VudDEOMAwGA1UE +CxMFTU1QYXkxMDAuBgNVBAMUJ+WNl+S6rOi/kOa4uOmAmue9kee7nOenkeaKgOac +iemZkOWFrOWPuDERMA8GA1UEBBMIMTk5NTIwNjUwggEiMA0GCSqGSIb3DQEBAQUA +A4IBDwAwggEKAoIBAQDPwnYEO8Qy9b74W9bgwuYFphegYsL1Hyb7K7c4nSW7bhwQ +8yThF2V2XAzVNFlV3n30K1zr3x7Bh5HDsIHVNO1/HiNX53P+5hX7hndqxY0KzzZx +N/onn7Ttm8T9IIhiFqmEj72VNoi90xcsmVLrrSLstjkFTlnt++r/hG0gOz4dVi+y +8uHO5qMV3moxQr+Xbd/B9EJTk74ec9ix3oO5usBAxd8FIFfCJXnQm9DQDQ0j4/pE +7zsk1X9hq0RO3YMLzmM2yFV3iFEje5hcXd08raLS5m/elviW7wyEFfEE4njCztbb +zgLR8FTWSieOmZ7fMiPNnp+V8aMRNIPxaEU/f6JdAgMBAAGjggFGMIIBQjAJBgNV +HRMEAjAAMCwGCWCGSAGG+EIBDQQfFh0iQ0VTLUNBIEdlbmVyYXRlIENlcnRpZmlj +YXRlIjAdBgNVHQ4EFgQUs+N0We1skjwMxRjMPPMy8EaLqycwgb8GA1UdIwSBtzCB +tIAUPgUm9iJitBVbiM1kfrDUYqflhnShgZCkgY0wgYoxCzAJBgNVBAYTAkNOMRIw +EAYDVQQIEwlHdWFuZ2RvbmcxETAPBgNVBAcTCFNoZW56aGVuMRAwDgYDVQQKEwdU +ZW5jZW50MQwwCgYDVQQLEwNXWEcxEzARBgNVBAMTCk1tcGF5bWNoQ0ExHzAdBgkq +hkiG9w0BCQEWEG1tcGF5bWNoQHRlbmNlbnSCCQC7VJcrvADoVzAOBgNVHQ8BAf8E +BAMCBsAwFgYDVR0lAQH/BAwwCgYIKwYBBQUHAwIwDQYJKoZIhvcNAQEFBQADgYEA +wQ3mmhwF6GU6uzy5aTZwQATYDl06xCeXLy2DlGONii+xJ3Yj3ZVFS5voKAKhapXp +qt+b+Gm8zIZq/lFofVxTbeyDxg2yyZsBQ9ibbAWK61qAY0rYPMYTSc5YbAs5SLsH +fPDpuIv1Fu2vXGTmc9Q7SoT4gXLqj7kUBVN84KnVsSc= +-----END CERTIFICATE----- diff --git a/common/config/wechatConfig/cert/1439003102/apiclient_key.pem b/common/config/wechatConfig/cert/1439003102/apiclient_key.pem new file mode 100644 index 0000000..1f421c6 --- /dev/null +++ b/common/config/wechatConfig/cert/1439003102/apiclient_key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDPwnYEO8Qy9b74 +W9bgwuYFphegYsL1Hyb7K7c4nSW7bhwQ8yThF2V2XAzVNFlV3n30K1zr3x7Bh5HD +sIHVNO1/HiNX53P+5hX7hndqxY0KzzZxN/onn7Ttm8T9IIhiFqmEj72VNoi90xcs +mVLrrSLstjkFTlnt++r/hG0gOz4dVi+y8uHO5qMV3moxQr+Xbd/B9EJTk74ec9ix +3oO5usBAxd8FIFfCJXnQm9DQDQ0j4/pE7zsk1X9hq0RO3YMLzmM2yFV3iFEje5hc +Xd08raLS5m/elviW7wyEFfEE4njCztbbzgLR8FTWSieOmZ7fMiPNnp+V8aMRNIPx +aEU/f6JdAgMBAAECggEAF3CXJA8iKaW0MA0chys2DHkavUunN0SWf0wFVevU7/qS +TA9Cn+ql1d64y+0mDxwVFdE2oJ4BuE/1UCC/5TAdg3QBBM/mNGH9JO2c130GVqve +NpPcM1A/d3dVmEFtYbOw2HXnK8iFUPVZ7fw2cMSN5isA7+pRFxqO/tkP/szwSxrU +KMlPP0SPr/sKUEAX0n7LZEd/6SYNfYmMgrcsgUKywXWpk3A7RUvFr+JJXBfwO9ku +m93itjpVGUp9qFi+igM2kEpTIpnmCPRmQGMrrbLNWVUVpOrd83FVBhD87yS8X/Pt +OBUchLXIs+oGTXYpbDdYBcl6YbSglzg7pp1eYByTuQKBgQDnPrCMWTI6DhOdtpvo +V32xbND8bH7bnEHlW41yOlS0zbFFo70roqnPtgvJdPMbl8KczpT+6wLdEZHFw8KD +oOVajqixjSr2iZH8ST8m15vYjljUe5/ylnamC10G3ZgvnBuuQRLCR4r1bFla4cDs +7JeOtRZHLCzG+V/OaSzv9+kC1wKBgQDmACcwQUrqo5GpQf617CFHo6GR6V4xiB0+ +mQLHY93Wrdrzf+5mcaQjkm1c7hByEviiDFIdD8E1IEPoquAKDiFPcVHc8QuxDyE9 +vDyxhH1/5MWXt20x9j8v/w7QQEyWZ7X1BC4/cFlp4V0Xelm84Ba7JECZ8pAVpCmk +m2CfQGxR6wKBgQDgCUZ20zvsLxMmK3MlSQ6HxQs8Y8kL73mQQoDpeEX03YuwEpEG +I5QtnwwQY/Pcec2cqjCEQSAHGiyG08AyUsGiWLBrRH+pV2NOb5B1i1J8Hn1Fb3hp +SQkumbfJHQuCpNXUn0sTWsjwOcbgW/PUFuxG4H7y+YNwSs5dZlyZKTBhBQKBgB/8 +QXbqfZqn6KfbL6rpDa/Cx8Nc6uaEgVylNse30a/7OYnHbsX8Y9E2mdLkoJDcposS +n5C/EiVrOUZwDPwY/vTnU3UgaHnVGtBVDzO4syNIE1qH/b2G+z6Xf93iM0RvY9SR +IkVcQHMDDkknkLc9iqu33OwL2ZHI5KmpmgRLl0TFAoGBAKM0ItpOQzZXZbIJ5qVv +SRCs6DoaOMnnNFzazJiygS04jD0hvENgO4yXc0DBbNLaLncK7CIo8W2hJk7Mvedi ++e1Kuho/0RcdL+h7gIvgFbGcsDFxe4we+BAyMv8D9JpZ8YQRKVsyvVlYWGGG3K3m +4zHqOVp/wQL8G+UghjUmc2+N +-----END PRIVATE KEY----- diff --git a/common/config/wechatConfig/cert/1443331502/apiclient_cert.p12 b/common/config/wechatConfig/cert/1443331502/apiclient_cert.p12 new file mode 100644 index 0000000..b040fa5 Binary files /dev/null and b/common/config/wechatConfig/cert/1443331502/apiclient_cert.p12 differ diff --git a/common/config/wechatConfig/cert/1443331502/apiclient_cert.pem b/common/config/wechatConfig/cert/1443331502/apiclient_cert.pem new file mode 100644 index 0000000..83e4e76 --- /dev/null +++ b/common/config/wechatConfig/cert/1443331502/apiclient_cert.pem @@ -0,0 +1,26 @@ +-----BEGIN CERTIFICATE----- +MIIEbzCCA9igAwIBAgIEAKwMkTANBgkqhkiG9w0BAQUFADCBijELMAkGA1UEBhMC +Q04xEjAQBgNVBAgTCUd1YW5nZG9uZzERMA8GA1UEBxMIU2hlbnpoZW4xEDAOBgNV +BAoTB1RlbmNlbnQxDDAKBgNVBAsTA1dYRzETMBEGA1UEAxMKTW1wYXltY2hDQTEf +MB0GCSqGSIb3DQEJARYQbW1wYXltY2hAdGVuY2VudDAeFw0xNzAyMjQwMzEwMDla +Fw0yNzAyMjIwMzEwMDlaMIGeMQswCQYDVQQGEwJDTjESMBAGA1UECBMJR3Vhbmdk +b25nMREwDwYDVQQHEwhTaGVuemhlbjEQMA4GA1UEChMHVGVuY2VudDEOMAwGA1UE +CxMFTU1QYXkxMzAxBgNVBAMUKuS4iua1t+icmOibm+ihjOWbvemZheaXheihjOek +vuaciemZkOWFrOWPuDERMA8GA1UEBBMIMjEwMjM1MjEwggEiMA0GCSqGSIb3DQEB +AQUAA4IBDwAwggEKAoIBAQCv6lbfzD1Mt7z28mMVd99MUjzOgSQicVJAoAw75oob +k64LZseAV8FooGg8d8zbeq0luLQ72KekrdZgACAPkJFDrsz3OPFjCPl0KY9jhTt8 +61NDSlPtlxXRgX/greDqPhXWSbEFGcMo2kBHvftQl3QG8xeDHDNCVS2cTj+w57AN +OU6R2xAXIbC3FIn6jxQTKuxSZ4E98j0cYtf3nVzMgB229lVeYQJ1CUr+Hs+33cPg +NBsKgBUR6XuzF7lslBX0mHmS5RsnXvSA6sIMBi2cDbLL/j3q8AZ9LGF/aZfrJIOl +TI/yjlL2aXrqtWBNd9eIRKOm64ATJL2/WrgJkf4vHlwnAgMBAAGjggFGMIIBQjAJ +BgNVHRMEAjAAMCwGCWCGSAGG+EIBDQQfFh0iQ0VTLUNBIEdlbmVyYXRlIENlcnRp +ZmljYXRlIjAdBgNVHQ4EFgQUqMOz6uToZyHqv4ZGILzXWGvG7F0wgb8GA1UdIwSB +tzCBtIAUPgUm9iJitBVbiM1kfrDUYqflhnShgZCkgY0wgYoxCzAJBgNVBAYTAkNO +MRIwEAYDVQQIEwlHdWFuZ2RvbmcxETAPBgNVBAcTCFNoZW56aGVuMRAwDgYDVQQK +EwdUZW5jZW50MQwwCgYDVQQLEwNXWEcxEzARBgNVBAMTCk1tcGF5bWNoQ0ExHzAd +BgkqhkiG9w0BCQEWEG1tcGF5bWNoQHRlbmNlbnSCCQC7VJcrvADoVzAOBgNVHQ8B +Af8EBAMCBsAwFgYDVR0lAQH/BAwwCgYIKwYBBQUHAwIwDQYJKoZIhvcNAQEFBQAD +gYEAVxAPmLGLprv8XtFr2T/1Ib3gTpFjcvYyIsHWp3NTWfOih/HPFEaxd4KCfwR8 +nY9btBuMxjyMcEMDfgDXWczMtC0GyfAHfv2HbfpJ0SJ8kFa6Mq41BCusYwWaUv9Q +hetuxhC1oIlyVzayA87aYXouuQjZO6bFOeAICJeVZAopu1o= +-----END CERTIFICATE----- diff --git a/common/config/wechatConfig/cert/1443331502/apiclient_key.pem b/common/config/wechatConfig/cert/1443331502/apiclient_key.pem new file mode 100644 index 0000000..18db426 --- /dev/null +++ b/common/config/wechatConfig/cert/1443331502/apiclient_key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCv6lbfzD1Mt7z2 +8mMVd99MUjzOgSQicVJAoAw75oobk64LZseAV8FooGg8d8zbeq0luLQ72KekrdZg +ACAPkJFDrsz3OPFjCPl0KY9jhTt861NDSlPtlxXRgX/greDqPhXWSbEFGcMo2kBH +vftQl3QG8xeDHDNCVS2cTj+w57ANOU6R2xAXIbC3FIn6jxQTKuxSZ4E98j0cYtf3 +nVzMgB229lVeYQJ1CUr+Hs+33cPgNBsKgBUR6XuzF7lslBX0mHmS5RsnXvSA6sIM +Bi2cDbLL/j3q8AZ9LGF/aZfrJIOlTI/yjlL2aXrqtWBNd9eIRKOm64ATJL2/WrgJ +kf4vHlwnAgMBAAECggEASLUTaPZSU7YRXQO7njDoUvQee792fuHVfC5qQAu+Az3b +jozRYiNjJeo+itd9DS28CL45iA6442CSHSWQGr7Gu3Gw93FKm4MnDzLqN9jmSHA+ +/q3m2Gk8tFXQ070qG8bDYckdaB1Iw0bJkJ1eFOY0J3crvZ3XNdBcxKC2xFhONHhO +o6i6VloubOCNk1ZNUieGgp1xt6nfXn4qt3tcD51gPwWYVoPGceKZUiNOhTlRTORc +4X/lyMccXQei8M2C0XEUzMvsULdLB73lPGK6WMEnzWFNsAcBMGaBPiJrJV2m+iHV +LWGazPR+kjmy4J9OuofdOZUzonxS4Cozmj2MXEOVKQKBgQDYYIavuf1zzIyYaPXw +i4baef0wkalsDYtvFD9llAQcRs/PgGIj2U9zlPzedqhfKa8HK7yEYFqnLWfSWsYS +zPhW/u/dusaOLKmQuTVtmPNKAf+HkNJ62/PQVs6FnP/53Oy+AzvCxsKdrh1XVmma +5gL73qzouKGJMqDi/O2TLAS37QKBgQDQIQXp/SvA7XOcNUWy6qHmLifLr8HAbh8k +G10ZvG0TBc8bYaNMhueoeEupl44AVOTWa7875H/9n5emzGRhu07pIFYybTacwdvj +JsFM1lt0m3KZpWe75HCHqer8m5OwQofXnObzvOxJVxeOiI1s669zRwt/NYpdoPNL +8tbrK3m54wKBgQCReMv0hunUmbgIm8CFuXivmAZWSggKwkx1ILrCszHURPNgAWN5 +0JcvEQK1Gjd2y1KGUqxKn3EzJj6/2RGEAFQSQRHJE9J8MaDK0QoPph4jKpa+cOph +eVFBR6tPf09FkHeGBCyAdhrP4giN+GXFo1BsP7gmOkM4N1adZQjgwl5lvQKBgQCV +h7RFCVSfFrph91AtHC/XPT/wMkUEqNmMynAYJm1DJoBGzt5RA/d57XuGy9EE4flL +KDxLnn5qTHfbKavRH46xJT9omViMRSdiypxERRmN7IToaJLfxl8myOiANpJkJ1iL +iznO0eP9SSouiGL7Z1U1gEx9R40yeYly/nR0n1akOwKBgA1boMebTv47D/9tky6R +R4kdfrNzkzHuV6mVxp7adgXqkRVY2uTEF5zU4JnZixXdjAX3f/9IjapOt/LxpK7z +2oCHdgdeJXCQJbwsnl59HclEoVqq7gBEzpqIqo/l5Rv1ta0/ZjRHI9J5L8mmUAYy +mXaOWBrrcTPyww4qvCv8m7rI +-----END PRIVATE KEY----- diff --git a/common/config/wechatConfig/cert/1443331502/rootca.pem b/common/config/wechatConfig/cert/1443331502/rootca.pem new file mode 100644 index 0000000..7a36225 --- /dev/null +++ b/common/config/wechatConfig/cert/1443331502/rootca.pem @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV +UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy +dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1 +MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx +dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B +AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f +BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A +cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC +AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ +MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm +aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw +ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj +IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF +MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA +A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y +7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh +1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4 +-----END CERTIFICATE----- \ No newline at end of file diff --git a/common/config/wechatConfig/cert/1443331502/证书使用说明.txt b/common/config/wechatConfig/cert/1443331502/证书使用说明.txt new file mode 100644 index 0000000..e8a73dd --- /dev/null +++ b/common/config/wechatConfig/cert/1443331502/证书使用说明.txt @@ -0,0 +1,20 @@ +欢迎使用微信支付! +微信支付API共四份(证书pkcs12格式、证书pem格式、证书密钥pem格式、CA证书),为接口中强制要求时需携带的证书文件。 +证书属于敏感信息,请妥善保管不要泄露和被他人复制。 +不同开发语言下的证书格式不同,以下为说明指引: + 证书pkcs12格式(apiclient_cert.p12) + 包含了私钥信息的证书文件,为p12(pfx)格式,由微信支付签发给您用来标识和界定您的身份 + 部分安全性要求较高的API需要使用该证书来确认您的调用身份 + windows上可以直接双击导入系统,导入过程中会提示输入证书密码,证书密码默认为您的商户ID(如:10010000) + 证书pem格式(apiclient_cert.pem) + 从apiclient_cert.p12中导出证书部分的文件,为pem格式,请妥善保管不要泄漏和被他人复制 + 部分开发语言和环境,不能直接使用p12文件,而需要使用pem,所以为了方便您使用,已为您直接提供 + 您也可以使用openssl命令来自己导出:openssl pkcs12 -clcerts -nokeys -in apiclient_cert.p12 -out apiclient_cert.pem + 证书密钥pem格式(apiclient_key.pem) + 从apiclient_cert.p12中导出密钥部分的文件,为pem格式 + 部分开发语言和环境,不能直接使用p12文件,而需要使用pem,所以为了方便您使用,已为您直接提供 + 您也可以使用openssl命令来自己导出:openssl pkcs12 -nocerts -in apiclient_cert.p12 -out apiclient_key.pem + CA证书(rootca.pem) + 微信支付api服务器上也部署了证明微信支付身份的服务器证书,您在使用api进行调用时也需要验证所调用服务器及域名的真实性 + 该文件为签署微信支付证书的权威机构的根证书,可以用来验证微信支付服务器证书的真实性 + 某些环境和工具已经内置了若干权威机构的根证书,无需引用该证书也可以正常进行验证,这里提供给您在未内置所必须根证书的环境中载入使用 \ No newline at end of file diff --git a/common/config/wechatConfig/cert/1503844711/apiclient_cert.p12 b/common/config/wechatConfig/cert/1503844711/apiclient_cert.p12 new file mode 100644 index 0000000..4549742 Binary files /dev/null and b/common/config/wechatConfig/cert/1503844711/apiclient_cert.p12 differ diff --git a/common/config/wechatConfig/cert/1503844711/apiclient_cert.pem b/common/config/wechatConfig/cert/1503844711/apiclient_cert.pem new file mode 100644 index 0000000..e6dfc11 --- /dev/null +++ b/common/config/wechatConfig/cert/1503844711/apiclient_cert.pem @@ -0,0 +1,26 @@ +-----BEGIN CERTIFICATE----- +MIIEczCCA9ygAwIBAgIEAfU6HjANBgkqhkiG9w0BAQUFADCBijELMAkGA1UEBhMC +Q04xEjAQBgNVBAgTCUd1YW5nZG9uZzERMA8GA1UEBxMIU2hlbnpoZW4xEDAOBgNV +BAoTB1RlbmNlbnQxDDAKBgNVBAsTA1dYRzETMBEGA1UEAxMKTW1wYXltY2hDQTEf +MB0GCSqGSIb3DQEJARYQbW1wYXltY2hAdGVuY2VudDAeFw0xODA1MjEwMjM3MTZa +Fw0yODA1MTgwMjM3MTZaMIGiMQswCQYDVQQGEwJDTjESMBAGA1UECBMJR3Vhbmdk +b25nMREwDwYDVQQHEwhTaGVuemhlbjEQMA4GA1UEChMHVGVuY2VudDEOMAwGA1UE +CxMFTU1QYXkxNjA0BgNVBAMULeaYhuWxseaWh+WVhuaXheaXhea4uOmbhuaVo+S4 +reW/g+aciemZkOWFrOWPuDESMBAGA1UEBBMJMTAwMzUzMDA0MIIBIjANBgkqhkiG +9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5yLNsqgq8Au4TgvP1U227rbMmarO84SRYr83 +INGUx1+5m06Goc/Vhhe98j7Jh5SCqZ4c5yLNAqxk22lgO9bdaaYFU12LacNla8hg +a/eIUFh1UGXvLBBwfIzSpR0Nj5CzJPCCon21I7km2gqtqGAbIz0qELfmgSwQEuu+ +f6XKp1Dqs5axQ8Cq8YuRZ1Q7nobCckeMHpk22PPS/D92VBuHrFxpDcELr58vRxAu +iLflKP+6sJvaQD5+xXeBY/Vz4SpFnFkVuejYTAaIjFX5KyWDIVUf3/cMyMdrS+4e +khePRE4FP3AvoShUiUAb8Ym2/1202+RzsIYseZBXdPEshWNG6wIDAQABo4IBRjCC +AUIwCQYDVR0TBAIwADAsBglghkgBhvhCAQ0EHxYdIkNFUy1DQSBHZW5lcmF0ZSBD +ZXJ0aWZpY2F0ZSIwHQYDVR0OBBYEFERVFmAA70bqm52Yw05ySW5n6YijMIG/BgNV +HSMEgbcwgbSAFD4FJvYiYrQVW4jNZH6w1GKn5YZ0oYGQpIGNMIGKMQswCQYDVQQG +EwJDTjESMBAGA1UECBMJR3Vhbmdkb25nMREwDwYDVQQHEwhTaGVuemhlbjEQMA4G +A1UEChMHVGVuY2VudDEMMAoGA1UECxMDV1hHMRMwEQYDVQQDEwpNbXBheW1jaENB +MR8wHQYJKoZIhvcNAQkBFhBtbXBheW1jaEB0ZW5jZW50ggkAu1SXK7wA6FcwDgYD +VR0PAQH/BAQDAgbAMBYGA1UdJQEB/wQMMAoGCCsGAQUFBwMCMA0GCSqGSIb3DQEB +BQUAA4GBAEWMBa8sGubX8dkM5nMO5ONcnU39R0wamvcKx+SG8PcRTBpIGOyJUtQK +uWDpleqRsdoXKUsO6nerlPTYKHZii+NONRzEmGrOgIxJwk/POtbFkxthW1hui62Z +uZqtDXV5nZw6T91MTo8C6+KRp74SjNAaTqvazNVW9TdPukDoh9Db +-----END CERTIFICATE----- diff --git a/common/config/wechatConfig/cert/1503844711/apiclient_key.pem b/common/config/wechatConfig/cert/1503844711/apiclient_key.pem new file mode 100644 index 0000000..29ec23c --- /dev/null +++ b/common/config/wechatConfig/cert/1503844711/apiclient_key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDnIs2yqCrwC7hO +C8/VTbbutsyZqs7zhJFivzcg0ZTHX7mbToahz9WGF73yPsmHlIKpnhznIs0CrGTb +aWA71t1ppgVTXYtpw2VryGBr94hQWHVQZe8sEHB8jNKlHQ2PkLMk8IKifbUjuSba +Cq2oYBsjPSoQt+aBLBAS675/pcqnUOqzlrFDwKrxi5FnVDuehsJyR4wemTbY89L8 +P3ZUG4esXGkNwQuvny9HEC6It+Uo/7qwm9pAPn7Fd4Fj9XPhKkWcWRW56NhMBoiM +VfkrJYMhVR/f9wzIx2tL7h6SF49ETgU/cC+hKFSJQBvxibb/XbTb5HOwhix5kFd0 +8SyFY0brAgMBAAECggEACKiGGhYwnZNi0RGiNHRX0PNqEKuUWwzxQUi2cPVI5HsS +gd3cLz2Q2xgSlnuBoyGOD3qLzKDCG0KH+Kwm3bb7zlRYyLmtWkXmi7YS3piEM7ZM +lrlqzzTCcff4gBTpiCI8g7q6ugmJepAaA3r47GDFQ3msFLo+2UHkTEEmfrOgNso/ +9oG9f8CUFMrTE+2lez3pUf60cMJaNqKsOzh3hc0JlQCBnvQ+7S7kI1C8gcPumfGV +oVhLAW/261q1qH+Ff4rPF+k2P2MC9Om3Pb2Rx4gIH8c+vnVFoBrkBPpfnBmfInCv +zJaKiMvwx75QR1EhdnXREiCC69c8u5zgMA/+91zE2QKBgQD27gmpBXU8Kfp6M1vT +J/wmJgpSN/MyOh2b1dWFHEC0k1CuxP2YTXpEPfgm8y5dYiY4LwFFufhuYLNWrAKA +KTjiskgCVkdDhupOsOCF5/TD2A0njvTkFJSFX5sbCB4eohrajCBMxxyJHWPTC3JD +WDCAMgUssvh8ceS4VFsfUhI4fQKBgQDvoEAt8LRaTXfegInU7Dqs/eytzv/NqvHc +23hb+EqsguCzWpvWgYzz+1eoOP9t7dRx1E2xBS6QhEvvJ5xnCs+jfbDqcz7mN9le +Tn79UI68mEjaoOIIcWhhFoP2dHgcryYbcoVDYIOMeJKPAu8D6SefqFoBnAm3qGbs +gdt/PfsBhwKBgGzXGUz2Cem9+xjYAHZ/XmYWSGBbJwgRk7F3vIjSnja55EtUqw7x +v53KztGkSOCCfaQwG9h3E2jbmNDwOp3xDZDm0lStYPYDxs1uq1h6mGmmlo3ENm8+ +HwT20jBFELmh7EI+l5IgBZTubmy8092ZRq+K3LsKG/sGXLFfBVc13rAlAoGBANHH +eyg818dOlqgl44SSInQcAL3QwEUvaHovcNkjL0yDb2/U3SUXWWynF4BgFc4JLblR +YYqdvLwr9cYy6UuUPV8lxGIb7m7hadyT37yob61PrEgqHHfDwNtuOKzkHdsOws+4 +nE32CnRJghTNPq4vyc6ONe2+ywsL1L8smBp3Cm21AoGBAJ5kjtvGnvolh+75Np06 +50sMkY4qQ5IqA5w7qL0tv6EbAHUau+novsmMtWPGO+H/VqslN52IjBszMsa+MSV3 +hW6EQ+oO7PPhLc7b1GfZks8MnXsjKpONxO29A8ipLpHs8P1HoC5sb0SSLPnEUk4f +IvOhWwmLdg4rVF3nKYqembj/ +-----END PRIVATE KEY----- diff --git a/common/config/wechatConfig/cert/1515696111/apiclient_cert.p12 b/common/config/wechatConfig/cert/1515696111/apiclient_cert.p12 new file mode 100644 index 0000000..f86e29f Binary files /dev/null and b/common/config/wechatConfig/cert/1515696111/apiclient_cert.p12 differ diff --git a/common/config/wechatConfig/cert/1515696111/apiclient_cert.pem b/common/config/wechatConfig/cert/1515696111/apiclient_cert.pem new file mode 100644 index 0000000..30e59e2 --- /dev/null +++ b/common/config/wechatConfig/cert/1515696111/apiclient_cert.pem @@ -0,0 +1,26 @@ +-----BEGIN CERTIFICATE----- +MIIEcDCCA9mgAwIBAgIEAkLd8TANBgkqhkiG9w0BAQUFADCBijELMAkGA1UEBhMC +Q04xEjAQBgNVBAgTCUd1YW5nZG9uZzERMA8GA1UEBxMIU2hlbnpoZW4xEDAOBgNV +BAoTB1RlbmNlbnQxDDAKBgNVBAsTA1dYRzETMBEGA1UEAxMKTW1wYXltY2hDQTEf +MB0GCSqGSIb3DQEJARYQbW1wYXltY2hAdGVuY2VudDAeFw0xODEwMDgwOTM1MjZa +Fw0yODEwMDUwOTM1MjZaMIGfMQswCQYDVQQGEwJDTjESMBAGA1UECBMJR3Vhbmdk +b25nMREwDwYDVQQHEwhTaGVuemhlbjEQMA4GA1UEChMHVGVuY2VudDEOMAwGA1UE +CxMFTU1QYXkxMzAxBgNVBAMUKuiIn+Wxsee+pOWym+aWsOWMuuaXhea4uOacjeWK +oeaciemZkOWFrOWPuDESMBAGA1UEBBMJMTAyNDgwMjg0MIIBIjANBgkqhkiG9w0B +AQEFAAOCAQ8AMIIBCgKCAQEAujYnlGjsULKiRw47NmInm/D+0ojY+XI7GfUtIVAS +ruiOZgVVO/fmZw5M91jkKLxlfpkS5JOlu0SqGldWRUm6YC49k60hUesAxbUayuTZ +Som5qYQx0PH4TU7OOoYBZVXfYJ5rnl9Sx7V3xusoCDbZZNE8rkI59j5/Jz7ukaMA +m3m4seyyGi+np2RonMfV2El0YO4kUF5kLe/fgUF4aXAe9rCTk/CMb+toUQ2OqA3S +qiqItLUJ+VWBNe1Z63iwj1XptX/6Jk7sGkwxVWi4d5Nq1GtbF3s8Z74laZERbxRn +IsXg4cjF7GIEu8i3469dH3YWULPNfskV8jSIskhMt280UQIDAQABo4IBRjCCAUIw +CQYDVR0TBAIwADAsBglghkgBhvhCAQ0EHxYdIkNFUy1DQSBHZW5lcmF0ZSBDZXJ0 +aWZpY2F0ZSIwHQYDVR0OBBYEFO3xZCH7fZoUxMpgB5luX5oY1OEHMIG/BgNVHSME +gbcwgbSAFD4FJvYiYrQVW4jNZH6w1GKn5YZ0oYGQpIGNMIGKMQswCQYDVQQGEwJD +TjESMBAGA1UECBMJR3Vhbmdkb25nMREwDwYDVQQHEwhTaGVuemhlbjEQMA4GA1UE +ChMHVGVuY2VudDEMMAoGA1UECxMDV1hHMRMwEQYDVQQDEwpNbXBheW1jaENBMR8w +HQYJKoZIhvcNAQkBFhBtbXBheW1jaEB0ZW5jZW50ggkAu1SXK7wA6FcwDgYDVR0P +AQH/BAQDAgbAMBYGA1UdJQEB/wQMMAoGCCsGAQUFBwMCMA0GCSqGSIb3DQEBBQUA +A4GBAMBj/bTCUnZvNGuTi+5WyAQ6Vs880Y4/aFSWMQjp80bFBdg3y6GZoS/KBaXi +/0Y71PeN8QzWBFHETifWFcOmBEJdfQa/joRILDwL1uaM/YCQo9OKvtgFEbeG3prP +8zOLaSPkaSalWVB97t12/oF73RkZLfnvcNbg/tw6OoQM4yo5 +-----END CERTIFICATE----- diff --git a/common/config/wechatConfig/cert/1515696111/apiclient_key.pem b/common/config/wechatConfig/cert/1515696111/apiclient_key.pem new file mode 100644 index 0000000..c8e26ea --- /dev/null +++ b/common/config/wechatConfig/cert/1515696111/apiclient_key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC6NieUaOxQsqJH +Djs2Yieb8P7SiNj5cjsZ9S0hUBKu6I5mBVU79+ZnDkz3WOQovGV+mRLkk6W7RKoa +V1ZFSbpgLj2TrSFR6wDFtRrK5NlKibmphDHQ8fhNTs46hgFlVd9gnmueX1LHtXfG +6ygINtlk0TyuQjn2Pn8nPu6RowCbebix7LIaL6enZGicx9XYSXRg7iRQXmQt79+B +QXhpcB72sJOT8Ixv62hRDY6oDdKqKoi0tQn5VYE17VnreLCPVem1f/omTuwaTDFV +aLh3k2rUa1sXezxnviVpkRFvFGcixeDhyMXsYgS7yLfjr10fdhZQs81+yRXyNIiy +SEy3bzRRAgMBAAECggEBAKBDA4WDV/+L/oZRBT0k9RoNLANeq/7kBWGt1Y2aMLpA +hG3hoR3fmXiQokUvSA6XNnLio5P+TuEBk7Tf/evcLH+izHRQySCLtTpzR//fPfQc +3KG8mHNQDXfbnzpXItRoN7wcHFtNhx1CXTfiI64OJsPSIPuJHAGGgEDytLi7JUao +37Uq42/TmA1dNhlvgE6TIEO6cmAKBR2nw2IBSUM7CZW7s3cUCOJWug6K1JyEl9Nl +NCcdJdfcRQrhkYHnIxbDh7OdlQCVJ0Zk/AsmYhmibw3jo2MlHj4/Mfa6FMil7GSF +yd5VZ2f5eZjRzEWbGyIty7NG1cHCo9tKEIxemRbf/sECgYEA5Y28jCpsWmLZSKVe +VLpjn75mHgopzxc6dQChi/1BdJppC4NttNi/iuK+wmxIRWl7FkxwAZ2ADKHR6XLg +dTRFysEKXaB6YHuoYljxuwRGnfiw/pPfMTe8/vRhExMAe1sKsfWlljHdU/s/MkeJ +qJqyg9dpST0hlvbRIcPnQGg6Pi0CgYEAz6ofOaiQfLzwoWXSbkyO20Q90QiDiDft +hxHp/4mE3EhST1rIz4mFT8OBBIQhik/JELcXdbyI1pmPVmKWk0U/Szz7ViCEW0aR +7ubQNwTcvvyTaeZQiCZEW63B58ySCYr5u9IgAF/wuOAAihjM8Xn1KZIiJ2kRAQim +k0pRjjMryTUCgYEAmZsEhg6FPt5SY2g0/SFUNLqlfohyfZ8fgNeRQimPuUTx8cBa +kt9PHNKpr1Ph8ICq2rr/YDVSUCGgY0R5qjP2V7xhAVG3UgStIlI+P1SXJHIbjd7J +RRf1Ie3JX4ghlGnReE/WI/DuF5pSKYTxOp95wPtN+rIrXed+/ccnYVPdVWkCgYBf +7MSpvKypghlhZIh0vNaMgJRRd65SgQsuhl7h1GNT4fBriZMTEwJKmxOAw4w+uKY3 +G2wxzZokDyEAFWBavPUEyzGKUlDxXMLSaTorAAr8Ce4KUAJJMewHsVbNvViEIfdE +BEcWBTtMGuUE5Xnd3akav88ZB1Z8dMOFbCIKHqcONQKBgGUJ7vWiPIRDtAIyqFX2 +D+kWi2zuvObU4xb1wRTCkJWgOIC02FVwAQ1OyDx/qFQydCu+NsQPnCFGTGyITN/w +R2VFLda9y0QIRxR8ms2VaJNrONJUq5OwM3TmNy2TxFdHs0rCa88/mS79IDymRYCx +1YKTz5HxOhNxRT1tXqntPwrt +-----END PRIVATE KEY----- diff --git a/common/config/wechatConfig/payConfig.php b/common/config/wechatConfig/payConfig.php new file mode 100644 index 0000000..a85684c --- /dev/null +++ b/common/config/wechatConfig/payConfig.php @@ -0,0 +1,105 @@ + [ + 'appid' => 'wxae738c8d5654e01d',//微信开放平台审核通过的应用APPID + 'appsecret' => '5751c2e6f4cfbd07140bb09d3c16171c',//secret + 'appName' => '运游通',//名称 + 'mch_id' => '1439003102',//微信支付分配的商户号 + 'device_info' => 'WEB',//终端设备号(门店号或收银设备ID),默认请传"WEB" + 'key' => 'oufcisdo3kld50dofdk545645dfloir3',//秘钥 + 'token' => 'yunyoutong_wx_20170213', + 'SSLCERT_PATH' => __DIR__ . '/cert/1439003102/apiclient_cert.pem',//证书pem格式 + 'SSLKEY_PATH' => __DIR__ . '/cert/1439003102/apiclient_key.pem',//证书密钥pem格式 + ], + //蜘蛛分销微信配置 + 'wx34e2f2b38cfb15a1' => [ + 'appid' => 'wx34e2f2b38cfb15a1',//微信开放平台审核通过的应用APPID + 'appsecret' => 'eb60e17d2c86fd1c075abf1979edaedc',//secret + 'appName' => '蜘蛛分销',//名称 + 'mch_id' => '1443331502',//微信支付分配的商户号 + 'device_info' => 'WEB',//终端设备号(门店号或收银设备ID),默认请传"WEB" + 'key' => 'oufcisdo3kld50dofdk545645dfloir8',//秘钥 + 'token' => 'zhizhufenxiao20170306', + 'SSLCERT_PATH' => __DIR__ . '/cert/1443331502/apiclient_cert.pem',//证书pem格式 + 'SSLKEY_PATH' => __DIR__ . '/cert/1443331502/apiclient_key.pem',//证书密钥pem格式 + ], + //千岛湖分销微信配置 + 'wxf945d8fb99f6250d' => [ + //web版微信支付 + 'appid' => 'wxf945d8fb99f6250d',//微信开放平台审核通过的应用APPID + 'appsecret' => '9b18ba811a15eb336314a58cf4c3f650',//secret + 'appName' => '千岛湖',//名称 + 'mch_id' => '1424400302',//微信支付分配的商户号 + 'device_info' => 'WEB',//终端设备号(门店号或收银设备ID),默认请传"WEB" + 'key' => 'oufcisdo3kld50dofdk545645dfloire',//秘钥 + 'token' => 'qdh_wx_20170103', + 'SSLCERT_PATH' => __DIR__ . '/cert/1424400302/apiclient_cert.pem',//证书pem格式 + 'SSLKEY_PATH' => __DIR__ . '/cert/1424400302/apiclient_key.pem'//证书密钥pem格式 + ], + //蜘蛛出行微信配置 + 'wxbe6da4af3e529e0c' => [ + //web版微信支付 + 'appid' => 'wxbe6da4af3e529e0c',//微信开放平台审核通过的应用APPID + 'appName' => '蜘蛛出行',//名称 + 'mch_id' => '1329733601',//微信支付分配的商户号 + 'device_info' => 'WEB',//终端设备号(门店号或收银设备ID),默认请传"WEB" + 'key' => 'a6654d342eedd8e293692a3e211a5e53',//秘钥 + 'token' => 'zzcx_wx_20160425', + 'appsecret' => '7c1b14020e87e9e213696e870da0e549',//secret + 'SSLCERT_PATH' => __DIR__ . '/cert/1329733601/apiclient_cert.pem',//证书pem格式 + 'SSLKEY_PATH' => __DIR__ . '/cert/1329733601/apiclient_key.pem'//证书密钥pem格式 + ], + //昆山微信配置 + 'wx81ac156a5c166881' => [ + //web版微信支付 + 'appid' => 'wx81ac156a5c166881',//微信开放平台审核通过的应用APPID + 'appName' => '昆旅集散中心',//名称 + 'mch_id' => '1503844711',//微信支付分配的商户号 + 'device_info' => 'WEB',//终端设备号(门店号或收银设备ID),默认请传"WEB" + 'key' => 'sEr2ymgpy6VHijrj3bCAmhKiFXiXny4P',//秘钥 + 'token'=> 'zzcx_wx_20160425', + 'appsecret' => 'f0c874a1f9cfed8c5a4a2ac024f4acf8',//secret + 'SSLCERT_PATH' => __DIR__ . '/cert/1503844711/apiclient_cert.pem',//证书pem格式 + 'SSLKEY_PATH' => __DIR__ . '/cert/1503844711/apiclient_key.pem'//证书密钥pem格式 + ], + //舟山微信配置 + 'wx0376620fe134cef0' => [ + //web版微信支付 + 'appid' => 'wx0376620fe134cef0',//微信开放平台审核通过的应用APPID + 'appName' => '舟山群岛旅游服务中心',//名称 + 'mch_id' => '1515696111',//微信支付分配的商户号 + 'device_info' => 'WEB',//终端设备号(门店号或收银设备ID),默认请传"WEB" + 'key' => 'k3HVaO77fIBajgjdf69pRhXnkPCHxsHb',//秘钥 + 'token'=> 'kslv_wx_2018058', + 'appsecret' => 'df92d376e296d85e676be45035aba285',//secret + 'SSLCERT_PATH' => __DIR__ . '/cert/1515696111/apiclient_cert.pem',//证书pem格式 + 'SSLKEY_PATH' => __DIR__ . '/cert/1515696111/apiclient_key.pem'//证书密钥pem格式 + ], + //快行微信配置 + 'wxf5d1e7e3317bb073' => [ + //web版微信支付 + 'appid' => 'wxf5d1e7e3317bb073',//微信开放平台审核通过的应用APPID + 'appName' => '快行漫游',//名称 + 'mch_id' => '1229862102',//微信支付分配的商户号 + 'device_info' => 'WEB',//终端设备号(门店号或收银设备ID),默认请传"WEB" + 'key' => 'qaH3kBO22G32DBD5B12Dgg4GNg4N1Jxk',//秘钥 + 'token'=> 'KXMYDYJ', + 'appsecret' => 'cec585fe804ede285f07a2f0093f2109',//secret + 'SSLCERT_PATH' => __DIR__ . '/cert/1229862102/apiclient_cert.pem',//证书pem格式 + 'SSLKEY_PATH' => __DIR__ . '/cert/1229862102/apiclient_key.pem'//证书密钥pem格式 + ] +]; \ No newline at end of file diff --git a/common/config/wechatConfig/wxInterface/1329733601/Wx.event.config.php b/common/config/wechatConfig/wxInterface/1329733601/Wx.event.config.php new file mode 100644 index 0000000..4eefa0b --- /dev/null +++ b/common/config/wechatConfig/wxInterface/1329733601/Wx.event.config.php @@ -0,0 +1,30 @@ + array(//用户关注 + 'type' => 'news',//类型 图文 + 'id' => 'AuXDjP791-NMcyJajUxBL0jmNmYMjTJ6fTQTEQV8Gh8', + 'function' => 'subscribe'//该推送消息出发时 会调用 addUser方法 方法存在于 WxDoFunction.php文件中 + ), + 'unsubscribe' => array(//用户取消关注 + 'function' => 'unsubscribe'//该推送消息出发时 会调用 addUser方法 方法存在于 WxDoFunction.php文件中 + ), +); diff --git a/common/config/wechatConfig/wxInterface/1329733601/Wx.text.config.php b/common/config/wechatConfig/wxInterface/1329733601/Wx.text.config.php new file mode 100644 index 0000000..41c4092 --- /dev/null +++ b/common/config/wechatConfig/wxInterface/1329733601/Wx.text.config.php @@ -0,0 +1,40 @@ + '您的问题已经光速飞向客服小通,请耐心等待我们的回复,谢谢~', + '视频' => array(//小视频 + 'type' => 'video',//类型 视频 + 'id' => 'FGV6tMS6FSixJwrxoMgyABc3P_bfmnEt8qUV3-J_M1s',//media_id + 'title' => '小视频',//标题 + 'des' => '笑笑小视频'//简介 + ), + '音乐' => array( + 'type' => 'voice', + 'id' => 'FGV6tMS6FSixJwrxoMgyAAitkX-PSTZ5LWDyPdlJuGg' + ), + '图片' => array( + 'type' => 'img', + 'id' => 'W1Po9FbHCDVcAZS-XYBWuJxBKRG2FbvqetpfRVw9E98' + ), + '客服' => '客服热线:025-85477639', + + +); \ No newline at end of file diff --git a/common/config/wechatConfig/wxInterface/1329733601/wxMenu.config.php b/common/config/wechatConfig/wxInterface/1329733601/wxMenu.config.php new file mode 100644 index 0000000..42fa273 --- /dev/null +++ b/common/config/wechatConfig/wxInterface/1329733601/wxMenu.config.php @@ -0,0 +1,51 @@ + array(//用户关注 + 'text' => '亲,感谢您对千岛湖旅游集散中心的支持,点击预订即可订购产品,如有问题请第一时间联系我们!官方电话400-105-1078', +// 'function' => 'subscribe'//该推送消息出发时 会调用 addUser方法 方法存在于 WxDoFunction.php文件中 + ), +// 'unsubscribe' => array(//用户取消关注 +// 'function' => 'unsubscribe'//该推送消息出发时 +// ), +// 'contact_customer' => '亲,我们的电话是025-85477639,随时等候您的来电,非工作时间如客服电话无人接听,欢迎您在公众号留言,我们将在上班后第一时间与您联系。', +); diff --git a/common/config/wechatConfig/wxInterface/1424400302/Wx.text.config.php b/common/config/wechatConfig/wxInterface/1424400302/Wx.text.config.php new file mode 100644 index 0000000..8546530 --- /dev/null +++ b/common/config/wechatConfig/wxInterface/1424400302/Wx.text.config.php @@ -0,0 +1,60 @@ + '亲,感谢您对千岛湖旅游集散中心的支持,点击预订即可订购产品,如有问题请第一时间联系我们!官方电话400-105-1078', + '视频' => array(//小视频 + 'type' => 'video',//类型 视频 + 'id' => 'FGV6tMS6FSixJwrxoMgyABc3P_bfmnEt8qUV3-J_M1s',//media_id + 'title' => '小视频',//标题 + 'des' => '笑笑小视频'//简介 + ), + '音乐' => array( + 'type' => 'voice', + 'id' => 'FGV6tMS6FSixJwrxoMgyAAitkX-PSTZ5LWDyPdlJuGg' + ), + '图片' => array( + 'type' => 'img', + 'id' => 'W1Po9FbHCDVcAZS-XYBWuJxBKRG2FbvqetpfRVw9E98' + ), + '客服' => '客服热线:021-52218088', + 'test' => array( + 'text' => '蜘蛛分销测试fx.zhizhuchuxing.cn + +出行预订 + + 二维码 + + 我的佣金 + + C端出行预订 + +千岛湖分销分销测试qdhfx.zhizhuchuxing.cn + +出行预订 + + 二维码 + + 我的佣金 + + C端出行预订 +', + ) +); diff --git a/common/config/wechatConfig/wxInterface/1424400302/wxMenu.config.php b/common/config/wechatConfig/wxInterface/1424400302/wxMenu.config.php new file mode 100644 index 0000000..8ff6707 --- /dev/null +++ b/common/config/wechatConfig/wxInterface/1424400302/wxMenu.config.php @@ -0,0 +1,32 @@ + array(//用户关注 + 'text' => '亲,感谢您对蜘蛛分销的支持,点击预订即可帮助客户订购产品,有问题请第一时间联系我们!', +// 'function' => 'subscribe'//该推送消息出发时 会调用 addUser方法 方法存在于 WxDoFunction.php文件中 + ), +// 'unsubscribe' => array(//用户取消关注 +// 'function' => 'unsubscribe'//该推送消息出发时 +// ), +// 'contact_customer' => '亲,我们的电话是025-85477639,随时等候您的来电,非工作时间如客服电话无人接听,欢迎您在公众号留言,我们将在上班后第一时间与您联系。', +); diff --git a/common/config/wechatConfig/wxInterface/1439003102/Wx.text.config.php b/common/config/wechatConfig/wxInterface/1439003102/Wx.text.config.php new file mode 100644 index 0000000..9ff2cd6 --- /dev/null +++ b/common/config/wechatConfig/wxInterface/1439003102/Wx.text.config.php @@ -0,0 +1,60 @@ + '您的问题已经光速飞向客服,请耐心等待我们的回复,谢谢~', + '视频' => array(//小视频 + 'type' => 'video',//类型 视频 + 'id' => 'FGV6tMS6FSixJwrxoMgyABc3P_bfmnEt8qUV3-J_M1s',//media_id + 'title' => '小视频',//标题 + 'des' => '笑笑小视频'//简介 + ), + '音乐' => array( + 'type' => 'voice', + 'id' => 'FGV6tMS6FSixJwrxoMgyAAitkX-PSTZ5LWDyPdlJuGg' + ), + '图片' => array( + 'type' => 'img', + 'id' => 'W1Po9FbHCDVcAZS-XYBWuJxBKRG2FbvqetpfRVw9E98' + ), + '客服' => '客服热线:021-52218088', + 'test' => array( + 'text' => '蜘蛛分销测试fx.zhizhuchuxing.cn + +出行预订 + + 二维码 + + 我的佣金 + + C端出行预订 + +千岛湖分销分销测试qdhfx.zhizhuchuxing.cn + +出行预订 + + 二维码 + + 我的佣金 + + C端出行预订 +', + ) +); diff --git a/common/config/wechatConfig/wxInterface/1439003102/wxMenu.config.php b/common/config/wechatConfig/wxInterface/1439003102/wxMenu.config.php new file mode 100644 index 0000000..4e411b8 --- /dev/null +++ b/common/config/wechatConfig/wxInterface/1439003102/wxMenu.config.php @@ -0,0 +1,32 @@ + array(//用户关注 + 'text' => '亲,感谢您对蜘蛛分销的支持,点击预订即可帮助客户订购产品,有问题请第一时间联系我们!', +// 'function' => 'subscribe'//该推送消息出发时 会调用 addUser方法 方法存在于 WxDoFunction.php文件中 + ), +// 'unsubscribe' => array(//用户取消关注 +// 'function' => 'unsubscribe'//该推送消息出发时 +// ), +// 'contact_customer' => '亲,我们的电话是025-85477639,随时等候您的来电,非工作时间如客服电话无人接听,欢迎您在公众号留言,我们将在上班后第一时间与您联系。', +); diff --git a/common/config/wechatConfig/wxInterface/1443331502/Wx.text.config.php b/common/config/wechatConfig/wxInterface/1443331502/Wx.text.config.php new file mode 100644 index 0000000..9ff2cd6 --- /dev/null +++ b/common/config/wechatConfig/wxInterface/1443331502/Wx.text.config.php @@ -0,0 +1,60 @@ + '您的问题已经光速飞向客服,请耐心等待我们的回复,谢谢~', + '视频' => array(//小视频 + 'type' => 'video',//类型 视频 + 'id' => 'FGV6tMS6FSixJwrxoMgyABc3P_bfmnEt8qUV3-J_M1s',//media_id + 'title' => '小视频',//标题 + 'des' => '笑笑小视频'//简介 + ), + '音乐' => array( + 'type' => 'voice', + 'id' => 'FGV6tMS6FSixJwrxoMgyAAitkX-PSTZ5LWDyPdlJuGg' + ), + '图片' => array( + 'type' => 'img', + 'id' => 'W1Po9FbHCDVcAZS-XYBWuJxBKRG2FbvqetpfRVw9E98' + ), + '客服' => '客服热线:021-52218088', + 'test' => array( + 'text' => '蜘蛛分销测试fx.zhizhuchuxing.cn + +出行预订 + + 二维码 + + 我的佣金 + + C端出行预订 + +千岛湖分销分销测试qdhfx.zhizhuchuxing.cn + +出行预订 + + 二维码 + + 我的佣金 + + C端出行预订 +', + ) +); diff --git a/common/config/wechatConfig/wxInterface/1443331502/wxMenu.config.php b/common/config/wechatConfig/wxInterface/1443331502/wxMenu.config.php new file mode 100644 index 0000000..2272323 --- /dev/null +++ b/common/config/wechatConfig/wxInterface/1443331502/wxMenu.config.php @@ -0,0 +1,32 @@ + array(//用户关注 + 'text' => '亲,感谢您对蜘蛛分销的支持,点击预订即可帮助客户订购产品,有问题请第一时间联系我们!', +// 'function' => 'subscribe'//该推送消息出发时 会调用 addUser方法 方法存在于 WxDoFunction.php文件中 + ), +// 'unsubscribe' => array(//用户取消关注 +// 'function' => 'unsubscribe'//该推送消息出发时 +// ), +// 'contact_customer' => '亲,我们的电话是025-85477639,随时等候您的来电,非工作时间如客服电话无人接听,欢迎您在公众号留言,我们将在上班后第一时间与您联系。', +); diff --git a/common/config/wechatConfig/wxInterface/1503844711/Wx.text.config.php b/common/config/wechatConfig/wxInterface/1503844711/Wx.text.config.php new file mode 100644 index 0000000..9ff2cd6 --- /dev/null +++ b/common/config/wechatConfig/wxInterface/1503844711/Wx.text.config.php @@ -0,0 +1,60 @@ + '您的问题已经光速飞向客服,请耐心等待我们的回复,谢谢~', + '视频' => array(//小视频 + 'type' => 'video',//类型 视频 + 'id' => 'FGV6tMS6FSixJwrxoMgyABc3P_bfmnEt8qUV3-J_M1s',//media_id + 'title' => '小视频',//标题 + 'des' => '笑笑小视频'//简介 + ), + '音乐' => array( + 'type' => 'voice', + 'id' => 'FGV6tMS6FSixJwrxoMgyAAitkX-PSTZ5LWDyPdlJuGg' + ), + '图片' => array( + 'type' => 'img', + 'id' => 'W1Po9FbHCDVcAZS-XYBWuJxBKRG2FbvqetpfRVw9E98' + ), + '客服' => '客服热线:021-52218088', + 'test' => array( + 'text' => '蜘蛛分销测试fx.zhizhuchuxing.cn + +出行预订 + + 二维码 + + 我的佣金 + + C端出行预订 + +千岛湖分销分销测试qdhfx.zhizhuchuxing.cn + +出行预订 + + 二维码 + + 我的佣金 + + C端出行预订 +', + ) +); diff --git a/common/config/wechatConfig/wxInterface/1503844711/wxMenu.config.php b/common/config/wechatConfig/wxInterface/1503844711/wxMenu.config.php new file mode 100644 index 0000000..2272323 --- /dev/null +++ b/common/config/wechatConfig/wxInterface/1503844711/wxMenu.config.php @@ -0,0 +1,32 @@ + array(//用户关注 + 'text' => '亲,感谢您对蜘蛛分销的支持,点击预订即可帮助客户订购产品,有问题请第一时间联系我们!', +// 'function' => 'subscribe'//该推送消息出发时 会调用 addUser方法 方法存在于 WxDoFunction.php文件中 + ), +// 'unsubscribe' => array(//用户取消关注 +// 'function' => 'unsubscribe'//该推送消息出发时 +// ), +// 'contact_customer' => '亲,我们的电话是025-85477639,随时等候您的来电,非工作时间如客服电话无人接听,欢迎您在公众号留言,我们将在上班后第一时间与您联系。', +); diff --git a/common/config/wechatConfig/wxInterface/1515696111/Wx.text.config.php b/common/config/wechatConfig/wxInterface/1515696111/Wx.text.config.php new file mode 100644 index 0000000..9ff2cd6 --- /dev/null +++ b/common/config/wechatConfig/wxInterface/1515696111/Wx.text.config.php @@ -0,0 +1,60 @@ + '您的问题已经光速飞向客服,请耐心等待我们的回复,谢谢~', + '视频' => array(//小视频 + 'type' => 'video',//类型 视频 + 'id' => 'FGV6tMS6FSixJwrxoMgyABc3P_bfmnEt8qUV3-J_M1s',//media_id + 'title' => '小视频',//标题 + 'des' => '笑笑小视频'//简介 + ), + '音乐' => array( + 'type' => 'voice', + 'id' => 'FGV6tMS6FSixJwrxoMgyAAitkX-PSTZ5LWDyPdlJuGg' + ), + '图片' => array( + 'type' => 'img', + 'id' => 'W1Po9FbHCDVcAZS-XYBWuJxBKRG2FbvqetpfRVw9E98' + ), + '客服' => '客服热线:021-52218088', + 'test' => array( + 'text' => '蜘蛛分销测试fx.zhizhuchuxing.cn + +出行预订 + + 二维码 + + 我的佣金 + + C端出行预订 + +千岛湖分销分销测试qdhfx.zhizhuchuxing.cn + +出行预订 + + 二维码 + + 我的佣金 + + C端出行预订 +', + ) +); diff --git a/common/config/wechatConfig/wxInterface/1515696111/wxMenu.config.php b/common/config/wechatConfig/wxInterface/1515696111/wxMenu.config.php new file mode 100644 index 0000000..2272323 --- /dev/null +++ b/common/config/wechatConfig/wxInterface/1515696111/wxMenu.config.php @@ -0,0 +1,32 @@ + 255], + [['update_user'], 'string', 'max' => 50], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'category_id' => 'Category ID', + 'category_name' => 'Category Name', + 'parent_id' => 'Parent ID', + 'delete_flag' => 'Delete Flag', + 'create_time' => 'Create Time', + 'update_time' => 'Update Time', + 'update_user' => 'Update User', + ]; + } + + /** + * Function Description:获取基础数组信息 + * Function Name: getTypeArr + * + * @return array|\yii\db\ActiveRecord[] + * + * @author 娄梦宁 + */ + public function getTypeArr(){ + $result=$this::find()->select(['category_id','category_name']) + ->from(self::tableName()) + ->where(['=','delete_flag',0]) + ->asArray() + ->all(); + return $result; + } + + /** + * Des:获取 + * Name: getAllList + * @return array|\yii\db\ActiveRecord[] + * @author 倪宗锋 + */ + public function getAllList() + { + $result = self::find() + ->from(self::tableName()) + ->asArray() + ->all(); + return $result; + } + + /** + * Des:获取页面展示的订单类型 + * Name: getShowList + * @return array + * @author 倪宗锋 + */ + public function getShowList() + { + $result = self::find()->select(['category_id as order_type_id','category_name as order_type_des']) + ->from(self::tableName()) + ->asArray() + ->all(); + return $result; + } +} diff --git a/common/models/BusTicket.php b/common/models/BusTicket.php new file mode 100644 index 0000000..db33617 --- /dev/null +++ b/common/models/BusTicket.php @@ -0,0 +1,305 @@ + 50], + [['line_name'], 'string', 'max' => 255], + [['ticket_id'], 'unique'], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'ticket_id' => 'Ticket ID', + 'start_area_id' => 'Start Area ID', + 'start_area_name' => 'Start Area Name', + 'end_area_id' => 'End Area ID', + 'end_area_name' => 'End Area Name', + 'start_res_id' => 'Start Res ID', + 'start_res_name' => 'Start Res Name', + 'end_res_id' => 'End Res ID', + 'end_res_name' => 'End Res Name', + 'line_id' => 'Line ID', + 'line_type' => 'Line Type', + 'prod_price' => 'Prod Price', + 'line_name' => 'Line Name', + 'start_LONGITUDE' => 'start_LONGITUDE', + 'start_LATITUDE' => 'start_LATITUDE', + 'end_LONGITUDE' => 'end_LONGITUDE', + 'end_LATITUDE' => 'end_LATITUDE' + ]; + } + + public function insertBus($ticket_arr) + { + foreach ($ticket_arr as $val) { + $this->isNewRecord = true; + $this->setAttributes($val); + $this->save(); + } + } + + /** + * Function Description:新增可售票种的操作 + * Function Name: istBusTicket + * @param $ticket_arr + * + * @return bool + * + * @author 娄梦宁 + */ + public function istBusTicket($ticket_arr) + { + $prod_category_1 = new ProdCategory(); + $prod_main_1 = new ProdMain(); + + foreach ($ticket_arr as $val) { + $transaction = Yii::$app->db->beginTransaction(); + try { + //***************************************插入bus_ticket表************************************************** + $this->isNewRecord = true; + $this->setAttributes($val); + $res = $this->save(); + if ($res === false) { + $transaction->rollBack(); + continue; + } + //***************************************插入prod_category表************************************************** + $tmp_pro_name = $val['line_name'] . "({$val['start_res_name']}-{$val['end_res_name']})"; + $value = [ + 'category_id' => '1', + 'pro_cate_name' => $tmp_pro_name, + 'bus_ticket_id' => $val['ticket_id'], + 'bus_line_type' => $val['line_type'], + 'create_time' => date('Y-m-d H:i:s'), + 'show_price' => $val['prod_price'], + 'commission' => 5, + ]; + $prod_category = clone $prod_category_1; + $prod_category->attributes = $value; + $prod_res = $prod_category->insert(); + if ($prod_res === false) { + $transaction->rollBack(); + continue; + } + //***************************************插入prod_main表************************************************** + $value_adult = [ + 'prod_cate_id' => $prod_category->pro_cate_id, + 'prod_price' => $val['prod_price'], + 'bus_id' => $val['ticket_id'], + 'prod_name' => '成人票', + 'create_time' => date('Y-m-d H:i:s') + ]; + $prod_main = clone $prod_main_1; + $prod_main->attributes = $value_adult; + $prod_main_res = $prod_main->insert(); + if ($prod_main_res === false) { + $transaction->rollBack(); + continue; + } + $value_child = [ + 'prod_cate_id' => $prod_category->pro_cate_id, + 'prod_price' => $val['prod_price'], + 'bus_id' => $val['ticket_id'], + 'prod_name' => '儿童票', + 'create_time' => date('Y-m-d H:i:s') + ]; + $prod_main_2 = clone $prod_main_1; + $prod_main_2->attributes = $value_child; + $prod_main_res_2 = $prod_main_2->insert(); + if ($prod_main_res_2 === false) { + $transaction->rollBack(); + continue; + } + $transaction->commit(); + } catch (Exception $e) { + $transaction->rollBack(); + } + } + + return true; + } + + /** + * Function Description:cs系统取消的票种处理 + * Function Name: delBusTicket + * @param $ticket_arr + * + * @return bool + * + * @author 娄梦宁 + */ + public function delBusTicket($ticket_arr) + { + + $prod_category = new ProdCategory(); + $prod_main = new ProdMain(); + foreach ($ticket_arr as $val) { + $transaction = Yii::$app->db->beginTransaction(); + //物理删除bus_ticket表 + $this->deleteAll(['ticket_id' => $val['ticket_id']]); + //***************************************改变prod_category表状态位************************************************** + $count = $prod_category::updateAll(['delete_flag' => 1], ['=', 'bus_ticket_id', $val['ticket_id']]); + if (!$count) { + $transaction->rollBack(); + continue; + } + //***************************************改变prod_main表状态位************************************************** + $count = $prod_main::updateAll(['delete_flag' => 1], ['=', 'bus_id', $val['ticket_id']]); + if (!$count) { + $transaction->rollBack(); + continue; + } + $transaction->commit(); + } + + return true; + } + + + /** + * Des:激活已售卖的产品 + * Name: assocBusTicket + * @param $ticket_arr + * @return bool + * @throws \yii\db\Exception + * @author 倪宗锋 + */ + public function assocBusTicket($ticket_arr) + { + $transaction = Yii::$app->db->beginTransaction(); + $prod_category = new ProdCategory(); + foreach ($ticket_arr as $val) { + //***************************************修改bus_ticket表现有记录************************************************** + self::updateAll($val, ['=', 'ticket_id', $val['ticket_id']]); + //***************************************改变prod_category表状态位************************************************** + $prod_category::updateAll(['delete_flag' => 0], ['=', 'bus_ticket_id', $val['ticket_id']]);//不论是否成功 + } + $transaction->commit(); + return true; + + } + + /** + * Function Description:查返程票种id对应的产品id + * Function Name: getBackTicketId + * @param $ticket_id + * + * @return mixed + * + * @author 娄梦宁 + */ + public function getBackTicketId($ticket_id) + { + $result = self::find()->select(['c.pro_cate_id']) + ->from(self::tableName() . ' as a') + ->innerJoin('bus_ticket b', 'a.end_res_name=b.start_res_name and a.start_res_name=b.end_res_name') + ->innerJoin('prod_category c', 'a.ticket_id=c.bus_ticket_id') + ->where(['b.ticket_id' => $ticket_id]) + ->orderBy('a.ticket_id desc,c.pro_cate_id desc') + ->asArray() + ->one(); + return $result['pro_cate_id']; + } + + + /* + * 获取当前数据库所存票种信息 + */ + public function getBusArr() + { + $result = self::find() + ->from(self::tableName()) + ->indexBy('ticket_id') + ->asArray() + ->all(); + return $result; + } + + /** + * Des: + * Name: getTicketAndLineByIDs + * @param $ticketIds array + * @return array + * @author 倪宗锋 + */ + public function getTicketAndLineByIDs($ticketIds) + { + $where = [ + 'and', + ['in', 'ticket_id', $ticketIds], + ['=', 'b.delete_flag', 0] + ]; + $result = self::find()->select(['a.start_res_name', 'a.start_res_id', new Expression("GROUP_CONCAT(CONCAT(ticket_id,'|',a.end_res_id,'|',a.end_res_name,'|',b.pro_cate_id) separator '||') FxTicket")]) + ->from(self::tableName() . ' as a') + ->innerJoin(ProdCategory::tableName() . ' b', 'a.ticket_id = b.bus_ticket_id') + ->where($where) + ->groupBy('a.start_res_id') + ->indexBy('start_res_id') + ->asArray() + ->all(); + if (empty($result)) { + return []; + } + foreach ($result as $key => $val) {//拼接成以起始站为中心的数组 + $result[$key]['end_station_list'] = []; + $ticketArr = explode('||', $val['FxTicket']); + foreach ($ticketArr as $val1) { + $theArr = explode('|', $val1); + if (count($theArr) == 4) { + $theArr1['ticket_id'] = $theArr[0]; + $theArr1['end_res_id'] = $theArr[1]; + $theArr1['end_res_name'] = $theArr[2]; + $theArr1['pro_cate_id'] = $theArr[3]; + $result[$key]['end_station_list'][$theArr[0]] = $theArr1; + } + } + unset($result[$key]['FxTicket']); + } + return $result; + } +} diff --git a/common/models/CmsCategory.php b/common/models/CmsCategory.php new file mode 100644 index 0000000..2f800be --- /dev/null +++ b/common/models/CmsCategory.php @@ -0,0 +1,121 @@ + 50], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'cms_category_id' => 'Cms Category ID', + 'category_name' => 'Category Name', + 'show_sort' => 'Show Sort', + 'delete_flag' => 'Delete Flag', + 'create_time' => 'Create Time', + 'update_time' => 'Update Time', + 'update_user' => 'Update User', + ]; + } + /** + * Function Description:cms添加产品信息 + * Function Name: addCmsProd + * @param $param + * + * @return bool + * + * @author 娄梦宁 + */ + public function addCmsProd($param){ + $transaction=Yii::$app->db->beginTransaction(); + if($param['cms_category_id']==0){ + //新增栏目 + $connection=Yii::$app->db; + $istCount=$connection->createCommand()->insert('cms_category', [ + 'update_user' => AdminUtil::$uid, + 'show_sort' => 6, + 'category_name'=>$param['cms_category_name'], + 'create_time'=>date('Y-m-d H:i:s') + ])->execute(); + if($istCount!=1){ + $transaction->rollBack(); + return false; + } + }; + $values=[ + 'cms_cate_id'=>$param['cms_category_id']==0 ? $connection->getLastInsertID() : $param['cms_category_id'], + 'prod_cate_id'=>$param['prod_cate_id'], + 'create_time'=>date('Y-m-d H:i:s'), + 'show_sort'=>1 + ]; + $cms_category_prod=new CmsCategoryProd(); + $cms_category_prod->attributes=$values; + $res=$cms_category_prod->insert(); + if(!$res){ + $transaction->rollBack(); + return false; + } + $transaction->commit(); + return true; + } + /** + * Function Description:大类型查询 + * Function Name: getCategoryArr + * + * @return array|\yii\db\ActiveRecord[] + * + * @author 娄梦宁 + */ + public function getCategoryArr(){ + $system = Yii::$app->params['system']; + $where = [ + 'and', + ['=', 'system', $system], + ['=', 'delete_flag', 0] + ]; + $result=self::find()->select(['cms_category_id','category_name']) + ->from(self::tableName()) + ->where($where) + ->orderBy('show_sort desc') + ->asArray() + ->all(); + return $result; + } +} diff --git a/common/models/CmsCategoryProd.php b/common/models/CmsCategoryProd.php new file mode 100644 index 0000000..e6ba38e --- /dev/null +++ b/common/models/CmsCategoryProd.php @@ -0,0 +1,157 @@ + 50], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'id' => 'ID', + 'prod_cate_id' => 'Prod Cate ID', + 'cms_cate_id' => 'Cms Cate ID', + 'show_sort' => 'Show Sort', + 'delete_flag' => 'Delete Flag', + 'create_time' => 'Create Time', + 'update_time' => 'Update Time', + 'update_user' => 'Update User', + ]; + } + + /** + * Function Description:修改产品与左侧菜单绑定关系 + * Function Name: uptCmsAdmin + * @param $param + * + * @return bool|int + * + * @author 娄梦宁 + */ + public function uptCmsAdmin($param){ + $transaction = Yii::$app->db->beginTransaction(); + if($param['cms_category_id']==-1){ + //产品下架 + $res=$this->deleteAll(['=','prod_cate_id',$param['pro_cate_id']]); + if($res===false){ + $transaction->rollBack(); + return false; + } + }elseif($param['cms_category_id']==0){ + //新增左侧菜单 + $connection=Yii::$app->db; + $istCount=$connection->createCommand()->insert('cms_category', [ + 'category_name'=>$param['cms_category_name'], + 'create_time'=>date('Y-m-s H:i:s'), + 'show_sort'=>6, + 'update_user'=>1 + ])->execute(); + if($istCount!=1){ + $transaction->rollBack(); + return false; + }; + $id=Yii::$app->db->getLastInsertID(); + $istCount=$connection->createCommand()->insert('cms_category_prod', [ + 'update_user' => AdminUtil::$uid, + 'show_sort' => 1000, + 'cms_cate_id'=>$id, + 'create_time'=>date('Y-m-d H:i:s'), + 'prod_cate_id'=>(int)$param['pro_cate_id'], + ])->execute(); + if($istCount!=1){ + $transaction->rollBack(); + return false; + } +// $cms_category=new CmsCategory(); +// $value=[ +// 'category_name'=>$param['cms_category_name'], +// 'create_time'=>date('Y-m-s H:i:s'), +// 'show_sort'=>6, +// 'update_user'=>1 +// ]; +// $cms_category->attributes=$value; +// $res=$cms_category->insert(); +// if(!$res){ +// $transaction->rollBack(); +// return false; +// } + }else{ + //修改产品所属菜单 + $prod_cate_id=self::find()->select(['count(1) as cnt'])->from(self::tableName())->where(['prod_cate_id'=>$param['pro_cate_id']])->asArray()->one(); + if($prod_cate_id['cnt']!=0){//有则修改 + $count = self::updateAll(['cms_cate_id'=>$param['cms_category_id'],'update_user'=>AdminUtil::$uid], ['and',['=','prod_cate_id',$param['pro_cate_id']],['=','delete_flag',0]]); + if($count===false){ + return false; + }; + }else{//没有则新增 + $connection=Yii::$app->db; + $istCount=$connection->createCommand()->insert('cms_category_prod', [ + 'update_user' => AdminUtil::$uid, + 'show_sort' => 1000, + 'cms_cate_id'=>(int)$param['cms_category_id'], + 'create_time'=>date('Y-m-d H:i:s'), + 'prod_cate_id'=>(int)$param['pro_cate_id'], + ])->execute(); + if($istCount!=1){ + $transaction->rollBack(); + return false; + } +// $values=[ +// 'prod_cate_id'=>(int)$param['pro_cate_id'], +// 'cms_cate_id'=>(int)$param['cms_category_id'], +// 'show_sort'=>1000, +// 'create_time'=>date('Y-m-d H:i:s'), +// 'update_user'=>AdminUtil::$uid +// ]; +// $this->attributes=$values; +// $res=$this->insert(); +// if(!$res){ +// throw new Exception('添加出错'); +// return false; +// } + } + } + $transaction->commit(); + return true; + } + +} diff --git a/common/models/FxCommissionApply.php b/common/models/FxCommissionApply.php new file mode 100644 index 0000000..1012705 --- /dev/null +++ b/common/models/FxCommissionApply.php @@ -0,0 +1,190 @@ + 50], + [['auth_memo'], 'string', 'max' => 255], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'id' => 'ID', + 'fx_uid' => 'Fx Uid', + 'apply_money' => 'Apply Money', + 'status' => 'Status', + 'remit_time' => 'Remit Time', + 'auth_time' => 'Auth Time', + 'auth_memo' => 'Auth Memo', + 'auth_uid' => 'Auth Uid', + 'remit_uid' => 'Remit Uid', + 'delete_flag' => 'Delete Flag', + 'create_time' => 'Create Time', + 'update_time' => 'Update Time', + 'update_user' => 'Update User', + ]; + } + + /** + * Function Description:提现明细 + * Function Name: getCommissionApplyList + * + * @return array|\yii\db\ActiveRecord[] + * + * @author 娄梦宁 + */ + public function getCommissionApplyList(){ + $fx_uid=FxUtil::$uid; + $result=self::find()->select(['apply_money','status','date_format(create_time,"%m-%d %H:%i:%s") as create_date',"if(`status`=1,'未审核','已审核') as status_desc"]) + ->from(self::tableName()) + ->where(['and',['=','fx_uid',$fx_uid],['=','delete_flag',0]]) + ->asArray() + ->all(); + return $result; + } + + /** + * Function Description:提交提现申请,申请表记录 + * Function Name: InsertApplyCommission + * @param $apply_commission + * + * @return bool + * + * @author 娄梦宁 + */ + public function InsertApplyCommission($apply_commission){ + $values=[ + 'status'=>1, + 'apply_money'=>$apply_commission, + 'fx_uid'=>FxUtil::$uid, + 'create_time'=>date('Y-m-d H:i:s'), + ]; + $transaction=Yii::$app->db->beginTransaction(); + try{ + $this->attributes=$values; + $res=$this->insert(); + if(!$res){ + throw new Exception('添加出错'); + } + $transaction->commit(); + return true; + }catch (Exception $e){ + $transaction->rollBack(); + return false; + } + } + + /** + * Function Description:后台提现列表 + * Function Name: ApplyList + * @param $param + * + * @return array + * + * @author 娄梦宁 + */ + public function ApplyList($param){ + $where=['and',['=','a.delete_flag',0]]; + if ($param['apply_user_name'] != '') { + $where[] = ['like', 'b.nickname', $param['apply_user_name']]; + } + if ($param['apply_user_phone'] != '') { + $where[] = ['like', 'b.phone', $param['apply_user_phone']]; + } + if ($param['start_time'] != '') { + $where[] = ['>=', 'a.create_time', $param['start_time']]; + } + if ($param['end_time'] != '') { + $where[] = ['<', 'a.create_time', date('Y-m-d',strtotime("{$param['end_time']} +1 day"))]; + } + if ($param['apply_status'] != '') { + $where[] = ['=', 'a.status', $param['apply_status']]; + } + $select=[ + 'b.nickname as apply_user_name', + 'b.phone as apply_user_phone', + 'a.apply_money', + 'b.openid open_id', + 'b.wx_openid', + '(select "微信") as apply_style_des', + 'a.status as apply_status_id', + new Expression("CASE a.status + WHEN 1 THEN '待处理' + WHEN 2 THEN '已审核' + ELSE '' + END + as apply_status_des + "), + 'a.create_time apply_create_time', + 'a.id as apply_id' + ]; + $offset = ($param['current_page'] - 1) * $param['page_size']; + $result=self::find()->select($select) + ->from(self::tableName().' as a') + ->leftJoin('fx_user as b','a.fx_uid=b.uid') + ->where($where) + ->orderBy('a.create_time desc') + ->offset($offset) + ->limit($param['page_size']) + ->asArray() + ->all(); + $count=self::find()->select('count(1) as count')->from(self::tableName().' as a')->leftJoin('fx_user as b','a.fx_uid=b.uid')->where($where)->asArray()->one(); + $count=$count['count'] ; + return ['list'=>$result,'count'=>$count]; + } + + /* + * 提现通过,状态变更 + */ + public function applyChange($apply_id){ + $count = self::updateAll(['status'=>2,'update_user'=>AdminUtil::$uid,'auth_time'=>date('Y-m-d H:i:s')], ['and', ['=', 'status', 1], ['=', 'id', $apply_id]]); + return $count; + } +} diff --git a/common/models/FxCommissionInfo.php b/common/models/FxCommissionInfo.php new file mode 100644 index 0000000..386cc75 --- /dev/null +++ b/common/models/FxCommissionInfo.php @@ -0,0 +1,159 @@ + 50], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'id' => 'ID', + 'fx_uid' => 'Fx Uid', + 'total_money' => 'Total Money', + 'order_id' => 'Order ID', + 'status' => 'Status', + 'delete_flag' => 'Delete Flag', + 'create_time' => 'Create Time', + 'update_time' => 'Update Time', + 'update_user' => 'Update User', + ]; + } + + public function finishCommission() + { + $cnt = 0; + $count = 0; + //1.找出今天-完成日期大于3天的订单号,且佣金待结算 + $LogOrder = self::find()->select(['GROUP_CONCAT(a.order_id) as order_arr']) + ->from('order_main as a') + ->leftJoin('fx_commission_info as b', 'a.order_id=b.order_id') + ->where(['and', ['=', 'order_status', 3], ['>', 'DATEDIFF(current_date,end_date)', 2], ['=', 'a.delete_flag', 0], ['=', 'b.`status`', 1]]) + ->asArray() + ->all(); + $uptOrder = explode(',', $LogOrder[0]['order_arr']); + if (empty($uptOrder['0']) == false) { + //2.佣金表待结算变已结算 + $count = self::updateAll(['status' => 2], ['and', ['=', 'status', 1], ['in', 'order_id', $uptOrder]]); + //3.不同用户的账户表分别更新 + //查出需要更新的分销账户及佣金金额 + $fx_user = self::find()->select(['fx_uid', 'SUM(total_money) as money']) + ->from(self::tableName()) + ->where(['and', ['in', 'order_id', $uptOrder], ['=', 'delete_flag', 0]]) + ->groupBy('fx_uid') + ->asArray() + ->all(); + if (count($fx_user) != 0) { + $fx_user_account = new FxUserAccount(); + foreach ($fx_user as $val) { + $available_commission = $val['money']; + $fx_uid = $val['fx_uid']; + $array = ['available_commission' => new Expression("available_commission +$available_commission"), 'total_commission' => new Expression("total_commission +$available_commission")]; + $cnt += $fx_user_account::updateAll($array, ['and', ['=', 'fx_uid', $fx_uid]]); + } + } + foreach ($uptOrder as $val) { + Util::interfaceZzcx(['type' => 3, 'order_id' => $val], '/zzcx/interfaces/order/send-wx-msg', 1); + } + Util::addOrderLog(0, 0, implode('-', $uptOrder), '佣金结算', 7); + + } + return ['order_list' => $LogOrder[0]['order_arr'], 'count' => $count, 'cnt' => $cnt]; + } + + /** + * Function Description:佣金明细 + * Function Name: getInfoAdmin + * @param $order_id + * + * @return array|\yii\db\ActiveRecord[] + * + * @author 娄梦宁 + */ + public function getInfoAdmin($order_id) + { + $result = self::find() + ->from('order_info a') + ->innerJoin('order_main c', 'a.order_id = c.order_id') + ->leftJoin('prod_main b', 'a.prod_id=b.prod_id') + ->select(['b.prod_name', 'a.unit_price prod_single_price', 'a.count prod_count', 'a.commission' // update fuhc add b.commission on 2017-05-26 +// '(select TRUNCATE(total_money/c.prod_cnt,0)*a.count from fx_commission_info where order_id =a.order_id ) as commission' + ]) + ->where(['and', ['=', 'a.order_id', $order_id], ['!=', 'a.count', 0]]) + ->asArray() + ->all(); + return $result; + } + + /** + * Des:根据订单ID获取佣金详细 + * Name: getInfoByOrderId + * @param $oder_id + * @return array + * @author 倪宗锋 + */ + public function getInfoByOrderId($oder_id) + { + $orderInfo = self::find() + ->from(static::tableName()) + ->where(['=', 'order_id', $oder_id]) + ->asArray() + ->one(); + return $orderInfo; + } + + /** + * Des:修改单状态 + * Name: editStatus + * @param $oder_id + * @param $status + * @return int + * @author 倪宗锋 + */ + public function editStatus($oder_id, $status) + { + $flag = self::updateAll(['status' => $status], ['=', 'order_id', $oder_id]); + return $flag; + } +} diff --git a/common/models/FxUser.php b/common/models/FxUser.php new file mode 100644 index 0000000..203c252 --- /dev/null +++ b/common/models/FxUser.php @@ -0,0 +1,428 @@ + 100], + [['openid', 'wx_openid'], 'string', 'max' => 120], + [['phone'], 'string', 'max' => 11], + [['nickname'], 'string', 'max' => 100], + [['headimgurl', 'country', 'province', 'city', 'user_area'], 'string', 'max' => 255], + [['openid'], 'unique'], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'uid' => 'Uid', + 'user_name' => 'User Name', + 'openid' => 'Openid', + 'phone' => 'Phone', + 'nickname' => 'Nickname', + 'headimgurl' => 'Headimgurl', + 'sex' => 'Sex', + 'country' => 'Country', + 'province' => 'Province', + 'city' => 'City', + 'status' => 'Status', + 'reg_time' => 'Reg Time', + 'delete_flag' => 'Delete Flag', + 'wx_openid' => 'Wx Openid', + 'main_user_id' => 'Main User ID', + 'change_price_power' => 'change_price_power', + 'user_area' => 'user_area' + ]; + } + + /** + * Function Description:验证是否已注册手机号 + * Function Name: checkPhone + * + * @return array + * + * @author 娄梦宁 + */ + public function checkPhone() + { + $cookies = Yii::$app->request->cookies; + $user_id = $cookies->getValue('user_id'); + $phone = self::find()->select('phone') + ->where(['uid' => $user_id]) + ->one(); + return $phone; + } + + /** + * Function Description:注册手机号 + * Function Name: registerPhone + * @param $phone + * + * @return bool + * + * @author 娄梦宁 + */ + public function registerPhone($phone) + { + $values = [ + 'phone' => $phone + ]; + $base_one = self::findOne(['uid' => FxUtil::$uid, 'delete_flag' => 0]); + $req = "/^.*[0-9a-zA-Z_\x{4e00}-\x{9fa5}].*$/u"; + if (Util::checkPattern('', $base_one->nickname, $req) == false) {//如果用户名是空则用户名设置为手机号 + $values['nickname'] = $phone; + } + $base_one->attributes = $values; + $res = $base_one->update(); + if ($res === false) { + return false; + } + return true; + } + + /** + * Des:根据openid获取用户ID + * Name: getUidByOpenid + * @param $openid + * @return mixed|string + * @author 倪宗锋 + */ + public function getInfoByOpenid($openid) + { + $getUserInfo = self::find()->select(['uid', 'phone', 'status']) + ->where(array('openid' => $openid)) + ->asArray(true) + ->one(); + if ($getUserInfo == null) { + return ''; + } + return $getUserInfo; + } + + /** + * Des:添加用户信息 + * Name: addUserFromWeChat + * @param $params + * @return bool + * @throws \Exception + * @throws bool + * @author 倪宗锋 + */ + public function addUserFromWeChat($params) + { + $this->setAttributes($params); + $return = $this->insert(true); + return $return; + } + + + /** + * Des:获取用户信息 + * Name: getUserInfoByUid + * @param $uid + * @return array|null|string|ActiveRecord + * @author 倪宗锋 + */ + public function getUserInfoByUid($uid) + { + $userInfo = self::find() + ->where(array('uid' => $uid)) + ->asArray(true) + ->one(); + if ($userInfo == null) { + return ''; + } + return $userInfo; + } + + /** + * Function Description:获取分销商列表 + * Function Name: getUserList + * @param $param + * + * @return array|\yii\db\ActiveRecord[] + * + * @author 娄梦宁 + */ + public function getUserList($param) + { + $where = ['and', ['!=', 'phone', '']]; + if (empty($param['wechat_name']) == false) { + $where[] = ['like', 'nickname', $param['wechat_name']]; + } + if (empty($param['fx_phone']) == false) { + $where[] = ['like', 'phone', $param['fx_phone']]; + } + if (empty($param['start_reg_time']) == false) { + $where[] = ['>=', 'reg_time', $param['start_reg_time']]; + } + if (empty($param['end_reg_time']) == false) { + $where[] = ['<', 'reg_time', date('Y-m-d', strtotime("{$param['end_reg_time']} +1 day"))]; + } + if (empty($param['main_user_id']) == false) { + $where[] = ['=', 'a.main_user_id', $param['main_user_id']]; + } + if (empty($param['user_area']) == false) { + $where[] = ['=', 'a.user_area', $param['user_area']]; + } + //果运营主体非1或空,则读取自身对应的订单数据,如果运营主体为空,或者运营主体是1则读取订单运营主体是0或1的订单 + $cookies = $_COOKIE; + if (empty($cookies['user_main_corp']) == false && $cookies['user_main_corp'] != 1 && in_array(YII_ENV,['pro','dev'])) { + $where[] = ['=', 'e.main_corp_id', $cookies['user_main_corp']]; + } + $offset = ($param['current_page'] - 1) * $param['page_size']; + $select = [ + 'a.uid as fx_uid', + new Expression('FORMAT(b.remaining_sum,0) as remaining_sum'), + 'a.nickname as wechat_name', + "ifnull(a.user_name,'') user_name", + 'a.phone as fx_phone', + 'a.reg_time', + 'b.status as fx_status_id', + "if(b.status=1,'已启用','未启用') as fx_status", + 'ifnull(b.total_commission,0) as total_commission', + 'ifnull(b.closed_commission,0) as closed_commission', + 'ifnull(b.available_commission,0) available_commission', + 'change_price_power' => new Expression("SUBSTR(change_price_power FROM 1 FOR 1)"),//巴士自由行的改价权限 + 'change_price_power_hotel' => new Expression("SUBSTR(change_price_power FROM 2 FOR 1)"),//酒店的改价权限 + 'main_user_name' => new Expression("ifnull((SELECT user_name from main_corp_user WHERE id= a.main_user_id),'')"), + 'main_corp_name' => new Expression("ifnull((SELECT main_corp_name from main_corp_user WHERE id= a.main_user_id),'')"), + 'user_area' => new Expression("ifnull((SELECT GROUP_CONCAT(area_name SEPARATOR '
') from fx_user_area WHERE FIND_IN_SET(area_id,a.user_area)),'')") + ]; + $result = self::find()->select($select) + ->from(self::tableName() . ' as a') + ->innerJoin('fx_user_account as b', ' b.fx_uid=a.uid') + ->leftJoin(MainCorpUser::tableName() . ' e', 'a.main_user_id = e.id') + ->where($where) + ->orderBy('a.reg_time desc') + ->offset($offset) + ->limit($param['page_size']) + ->asArray() + ->all(); + $result1 = self::find()->select('count(1) as count') + ->from(self::tableName() . ' as a') + ->innerJoin('fx_user_account as b', ' b.fx_uid=a.uid') + ->leftJoin(MainCorpUser::tableName() . ' e', 'a.main_user_id = e.id') + ->asArray() + ->where($where) + ->one(); + $result1 = $result1['count']; + return ['list' => $result, + 'count' => $result1 + ]; + } + + /* + * 分销商审核列表 + */ + public function CheckFxUser($param) + { + $where = ['and', ['=', 'a.delete_flag', '0']]; + if ($param['wechat_name'] != '') { + $where[] = ['like', 'a.nickname', $param['wechat_name']]; + } + if ($param['fx_phone'] != '') { + $where[] = ['like', 'a.phone', $param['fx_phone']]; + } + if ($param['start_reg_time'] != '') { + $where[] = ['>=', 'a.reg_time', $param['start_reg_time']]; + } + if ($param['end_reg_time'] != '') { + $where[] = ['<', 'a.reg_time', date('Y-m-d', strtotime("{$param['end_reg_time']} +1 day"))]; + } + if ($param['status'] != '') { + $where[] = ['=', 'a.status', $param['status']]; + } + if (empty($param['main_user_id']) == false) { + $where[] = ['=', 'a.main_user_id', $param['main_user_id']]; + } + if (empty($param['user_area']) == false) { + $where[] = ['=', 'a.user_area', $param['user_area']]; + } + //果运营主体非1或空,则读取自身对应的订单数据,如果运营主体为空,或者运营主体是1则读取订单运营主体是0或1的订单 + $cookies = $_COOKIE; + if (empty($cookies['user_main_corp']) == false && !in_array($cookies['user_main_corp'], [1, 34])) { + $where[] = ['=', 'e.main_corp_id', $cookies['user_main_corp']]; + } + $offset = ($param['current_page'] - 1) * $param['page_size']; + $select = [ + 'a.nickname', + "ifnull(a.user_name,'') user_name", + 'a.phone', + 'a.reg_time', + "if(a.status = 1,'审核未通过',if(a.status=2,'审核通过','待审核')) as status_type", + 'a.uid as fx_uid', + 'a.status', + 'main_user_name' => new Expression("ifnull((SELECT user_name from main_corp_user WHERE id= a.main_user_id),'')"), + 'main_corp_name' => new Expression("ifnull((SELECT main_corp_name from main_corp_user WHERE id= a.main_user_id),'')") + ]; + $result = self::find()->select($select) + ->from(self::tableName() . ' a') + ->leftJoin(MainCorpUser::tableName() . ' e', 'a.main_user_id = e.id') + ->where($where) + ->orderBy('a.reg_time desc') + ->offset($offset) + ->limit($param['page_size']) + ->asArray() + ->all(); + $result1 = self::find()->select('count(1) as count') + ->from(self::tableName() . ' a') + ->leftJoin(MainCorpUser::tableName() . ' e', 'a.main_user_id = e.id') + ->asArray() + ->where($where) + ->one(); + $result1 = $result1['count']; + return ['list' => $result, + 'count' => $result1 + ]; + } + + /* + * 分销商审核通过 + */ + public function ThroughFxUser($fx_uid, $status) + { + $count = self::updateAll(['status' => $status], ['=', 'uid', $fx_uid]); + return $count; + } + + /** + * Des:修改用户名 + * Name: updateUserName + * @param $fx_uid + * @param $user_name + * @return int + * @author 倪宗锋 + */ + public function updateUserName($fx_uid, $user_name) + { + $count = self::updateAll(['user_name' => $user_name], ['=', 'uid', $fx_uid]); + return $count; + } + + /** + * Des:绑定运维负责人 + * Name: updateUserName + * @param $fx_uid + * @param $main_user_id + * @return int + * @author 倪宗锋 + */ + public function bindMainCorp($fx_uid, $main_user_id) + { + $count = self::updateAll(['main_user_id' => $main_user_id], ['=', 'uid', $fx_uid]); + return $count; + } + + /** + * Des:获取用户详细 + * Name: getUserInfo + * @param $fx_uid + * @return array|null|ActiveRecord + * @author 倪宗锋 + */ + public function getUserInfo($fx_uid) + { + $select = [ + 'a.uid', + 'a.nickname', + 'a.phone', + 'a.main_user_id', + 'b.id', + 'b.user_name', + 'b.main_corp_id', + 'b.main_corp_name', + 'a.user_area' + ]; + $info = self::find()->select($select) + ->from(static::tableName() . ' a') + ->leftJoin(MainCorpUser::tableName() . ' b', 'a.main_user_id = b.id') + ->where(['=', 'a.uid', $fx_uid]) + ->asArray() + ->one(); + return $info; + } + + /** + * Function Description:修改用户改价权限 + * Function Name: uptChangePricePower + * @param $fx_uid + * @param $change_price_power + * @param $type + * + * @return bool + * + * @author 娄梦宁 + */ + public function uptChangePricePower($fx_uid, $change_price_power, $type) + { +// print_r([$type,$change_price_power,$change_price_power]);die; + try { + self::updateAll(['change_price_power' => new Expression("INSERT(change_price_power,$type,1,$change_price_power)")], ['=', 'uid', $fx_uid]); + return true; + } catch (Exception $e) { + return false; + } + } + + /** + * Des:修改用户名 + * Name: updateUserName + * @param $fx_uid + * @param $userArea + * @return int + * @author 倪宗锋 + */ + public function updateUserArea($fx_uid, $userArea) + { + $count = self::updateAll(['user_area' => $userArea], ['=', 'uid', $fx_uid]); + return $count; + } +} diff --git a/common/models/FxUserAccount.php b/common/models/FxUserAccount.php new file mode 100644 index 0000000..bd1e19e --- /dev/null +++ b/common/models/FxUserAccount.php @@ -0,0 +1,226 @@ + 'ID', + 'fx_uid' => 'Fx Uid', + 'available_commission' => 'Available Commission', + 'closed_commission' => 'Closed Commission', + 'total_commission' => 'Total Commission', + 'apply_commission' => 'Apply Commission', + 'create_time' => 'Create Time', + 'update_time' => 'Update Time', + 'status' => 'Status', + 'delete_flag' => 'Delete Flag', + ]; + } + + /** + * Function Description:获取账户信息 + * Function Name: getMyCommission + * @return array|null|\yii\db\ActiveRecord + * + * @author 娄梦宁 + */ + public function getMyCommission($fx_uid = '') + { + if (empty($fx_uid)) { + $fx_uid = FxUtil::$uid; + } + $select = [ + 'a.headimgurl', + 'a.phone', + 'a.nickname', + 'b.status as accountStatus', + 'ifnull(b.available_commission,0) available_commission', + 'ifnull(b.total_commission,0) total_commission', + 'ifnull(b.apply_commission,0) apply_commission', + 'FORMAT(ifnull(b.remaining_sum,0),0) remaining_sum_s', + 'b.remaining_sum', + 'wx_openid' + ]; + $result = self::find()->select($select) + ->from('fx_user as a') + ->leftJoin(self::tableName() . ' as b', 'a.uid=b.fx_uid') + ->where(['=', 'a.uid', $fx_uid]) + ->asArray() + ->one(); + return $result; + } + + public function ApplyCommission($available_commission, $new_apply_commission) + { + $values = [ + 'available_commission' => $available_commission, + 'apply_commission' => $new_apply_commission + ]; + $transaction = Yii::$app->db->beginTransaction(); + try { + $base_one = self::findOne(['fx_uid' => FxUtil::$uid, 'delete_flag' => 0, 'status' => 1]); + $base_one->attributes = $values; + $res = $base_one->update(); + if (!$res) { + throw new Exception('修改出错'); + } + $transaction->commit(); + return true; + } catch (Exception $e) { + # 回滚事务 + $transaction->rollBack(); + return false; + } + } + + /** + * Function Description:分销商注册手机号后开账户 + * Function Name: InsertNewUser + * + * @return bool + * + * @author 娄梦宁 + */ + public function InsertNewUser() + { + $values = [ + 'fx_uid' => FxUtil::$uid, + 'create_time' => date('Y-m-d H:i:s') + ]; + $this->attributes = $values; + $res = $this->insert(); + if (!$res) { + return false; + } + return true; + } + + /* + * 提现后用户账户变化 + */ + public function changeAccount($apply_id) + { + $fx_info = FxCommissionApply::find()->select(['fx_uid', 'apply_money']) + ->from('fx_commission_apply') + ->where(['id' => $apply_id]) + ->asArray() + ->one(); + $money = (int)$fx_info['apply_money']; + $fx_uid = $fx_info['fx_uid']; + $sql = "UPDATE fx_user_account + set apply_commission=apply_commission -$money, + closed_commission=closed_commission+$money + where fx_uid=$fx_uid + "; + $res = $this->getDb()->createCommand($sql)->execute(); + if (!$res) { + return false; + } + return true; + } + + /** + * Des:修改分销账户状态 + * Name: changeStatus + * @param $param + * @return int + * @author 倪宗锋 + */ + public function changeStatus($param) + { + if ($param['fx_status_id'] == 2) { + $status = 1; + } else { + $status = 2; + } + $count = self::updateAll(['status' => $status], ['=', 'fx_uid', $param['fx_uid']]); + return $count; + } + + /** + * Des:扣除用户余额 + * Name: changeStatus + * @param $fx_uid + * @param $money + * @return bool + * @author 倪宗锋 + */ + public function deductAmount($fx_uid, $money) + { + $sql = "UPDATE fx_user_account + set remaining_sum=remaining_sum - $money + where fx_uid=$fx_uid + "; + $res = $this->getDb()->createCommand($sql)->execute(); + if (!$res) { + return false; + } + return true; + } + + /** + * Des:用户余额充值 + * Name: changeStatus + * @param $fx_uid + * @param $money + * @return bool + * @author 倪宗锋 + */ + public function rechargeAmount($fx_uid, $money) + { + $sql = "UPDATE fx_user_account + set remaining_sum=remaining_sum + $money + where fx_uid=$fx_uid + "; + $res = $this->getDb()->createCommand($sql)->execute(); + if (!$res) { + return false; + } + return true; + } +} diff --git a/common/models/FxUserAmountLog.php b/common/models/FxUserAmountLog.php new file mode 100644 index 0000000..7e2a2a8 --- /dev/null +++ b/common/models/FxUserAmountLog.php @@ -0,0 +1,107 @@ + 255], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'log_id' => 'log_id', + 'fx_uid' => 'fx_uid', + 'amount' => 'amount', + 'remaining_sum' => 'remaining_sum', + 'trade_type' => 'trade_type', + 'create_time' => 'create_time', + 'update_time' => 'Update Time', + 'msg' => 'msg', + ]; + } + + /** + * 添加记录 + * @param $fx_uid + * @param $trade_type + * @param $amount + * @param $msg + * @return array + */ + public function addLog($fx_uid, $trade_type, $amount, $remaining_sum, $msg) + { + $param = [ + 'fx_uid' => $fx_uid, + 'amount' => $amount, + 'trade_type' => $trade_type, + 'remaining_sum' => $remaining_sum, + 'create_time' => date('Y-m-d H:i:s'), + 'msg' => $msg + ]; + $this->attributes = $param; + $insertFlag = $this->insert(); + if (!$insertFlag) { + return Util::returnArrEr('add amount_log fail!'); + } + return Util::returnArrSu(); + } + + /** + * 获取账户变更记录 + * @param $params + * @return array + */ + public function getList($params) + { + $offset = ($params['current_page'] - 1) * $params['page_size']; + $select = [ + new Expression('FORMAT(amount,0) as amount'), + 'trade_type', + new Expression('FORMAT(remaining_sum,0) as remaining_sum'), + 'create_time', + new Expression("if(trade_type=1,'充值',if(trade_type=2,'支出','退款')) as type_name") + ]; + $where = ['=', 'fx_uid', $params['fx_uid']]; + $result = self::find()->select($select) + ->from(self::tableName()) + ->where($where) + ->orderBy('create_time DESC') + ->offset($offset) + ->limit($params['page_size']) + ->asArray() + ->all(); + return $result; + } + + +} \ No newline at end of file diff --git a/common/models/FxUserAmountOrder.php b/common/models/FxUserAmountOrder.php new file mode 100644 index 0000000..8aadeac --- /dev/null +++ b/common/models/FxUserAmountOrder.php @@ -0,0 +1,180 @@ + 100], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'id' => 'ID', + 'fx_uid' => 'fx_uid', + 'amount' => 'amount', + 'status' => 'status', + 'create_time' => 'create_time', + 'update_time' => 'Update Time', + 'recharge_order' => 'recharge_order', + 'pay_type' => 'pay_type' + ]; + } + + /** + * 添加新记录 + * @param $fx_uid + * @param $amount + * @param $payType + * @return array + */ + public function addAmountOrder($fx_uid, $amount, $payType = 1) + { + $params = [ + 'recharge_order' => 'FXA' . round(microtime(true) * 1000, 0), + 'fx_uid' => $fx_uid, + 'amount' => $amount, + 'pay_type' => $payType, + 'create_time' => date('Y-m-d H:i:s') + ]; + $this->attributes = $params; + $insertFlag = $this->insert(); + if (!$insertFlag) { + return Util::returnArrEr('add amount_order fail!'); + } + return Util::returnArrSu('', ['recharge_order' => $params['recharge_order']]); + } + + /** + * 获取列表 + * @param $params + * @param $type + * @return array + */ + public function getList($params, $type = 0) + { + $where = [ + 'and', + ['=', 'fx_uid', $params['fx_uid']], + ['=', 'status', 2] + ]; + if ($type == 1) { + $select = ["count(1) cnt"]; + $getResult = self::find()->select($select) + ->where($where) + ->orderBy('create_time DESC') + ->asArray() + ->one(); + $result = $getResult['cnt']; + } else { + $select = [ + 'id', + new Expression('FORMAT(amount,0) as amount'), + 'create_time', + 'recharge_order', + "if(pay_type=1,'微信','支付宝') as pay_type", + 'fx_uid', + 'status' + ]; + $offset = ($params['current_page'] - 1) * $params['page_size']; + $result = self::find()->select($select) + ->where($where) + ->orderBy('create_time DESC') + ->offset($offset) + ->limit($params['page_size']) + ->asArray() + ->all(); + } + return $result; + } + + /** + * 获取充值记录单的详情 + * @param $recharge_order + * @return array + */ + public function getAmountOrderInfo($recharge_order) + { + $select = [ + 'id', + 'amount', + 'create_time', + 'recharge_order', + "if(pay_type=1,'微信','支付宝') as pay_type", + 'fx_uid', + 'status' + ]; + $result = self::find()->select($select) + ->where(['=', 'recharge_order', $recharge_order]) + ->asArray() + ->one(); + return $result; + } + + /** + * 修改充值单状态 + * @param $recharge_order + * @param $status + * @return int + */ + public function updateStatus($recharge_order, $status) + { + $values = [ + 'status' => $status + ]; + $count = self::updateAll($values, ['and', ['=', 'recharge_order', $recharge_order]]); + return $count; + } + + /** + * 获取未支付订单 + * @return array + */ + public function getUnPayOrder() + { + $select = [ + 'id', + 'amount', + 'create_time', + 'recharge_order', + "pay_type", + 'fx_uid', + 'status' + ]; + $result = self::find()->select($select) + ->where(['=', 'status', 1]) + ->asArray() + ->one(); + return $result; + } +} \ No newline at end of file diff --git a/common/models/FxUserArea.php b/common/models/FxUserArea.php new file mode 100644 index 0000000..27e00f4 --- /dev/null +++ b/common/models/FxUserArea.php @@ -0,0 +1,65 @@ + 100], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'area_id' => 'Area ID', + 'area_name' => 'Area Name', + ]; + } + + /** + * Des:获取用户所属区域列表 + * Name: getUserAreaList + * @param string $user_area + * @return array + * @author 倪宗锋 + */ + public function getUserAreaList($user_area = '') + { + $select = [ + 'is_bind' => empty($user_area) ? new Expression("0") : new Expression("if(area_id in ($user_area),1,0)"), + 'area_id', + 'area_name' + ]; + $getList = self::find()->select($select) + ->asArray() + ->all(); + return $getList; + } +} diff --git a/common/models/FxUserQrcode.php b/common/models/FxUserQrcode.php new file mode 100644 index 0000000..3b014a5 --- /dev/null +++ b/common/models/FxUserQrcode.php @@ -0,0 +1,106 @@ + 'ID', + 'fx_uid' => 'Fx Uid', + 'qr_id' => 'Qr ID', + ]; + } + + /** + * Des:根据qrId获取详细 + * Name: getInfoByQrId + * @param $qrCodeId + * @return array|null|\yii\db\ActiveRecord + * @author 倪宗锋 + */ + public function getInfoByQrId($qrCodeId) + { + $where = ['=', 'qr_id', $qrCodeId]; + $select = ['fx_uid', 'qr_id']; + $getInfo = self::find()->select($select) + ->where($where) + ->asArray() + ->one(); + return $getInfo; + } + + /** + * Des:添加新记录 + * Name: addNew + * @param $qrCodeId + * @return bool + * @author 倪宗锋 + */ + public function addNew($qrCodeId) + { + $params = [ + 'qr_id' => $qrCodeId, + 'fx_uid' => 0 + ]; + $this->setAttributes($params); + $return = $this->insert(false); + return $return; + } + + /** + * Des:获取所有列表数据 + * Name: getList + * @return array|\yii\db\ActiveRecord[] + * @author 倪宗锋 + */ + public function getList() + { + $select = [ + 'a.fx_uid', + 'a.qr_id', + 'img_url' => new Expression("concat('/web/fx/images/FxQrCode/',a.qr_id,'.jpg')"), + 'nickname' => new Expression("if(b.nickname is null,'未设置',concat(b.nickname,' - ',b.phone))") + ]; + $getList = self::find()->select($select) + ->from(static::tableName().' a') + ->leftJoin(FxUser::tableName().' b','a.fx_uid = b.uid') + ->asArray() + ->all(); + return $getList; + } + +} diff --git a/common/models/LogOrder.php b/common/models/LogOrder.php new file mode 100644 index 0000000..88b5ea7 --- /dev/null +++ b/common/models/LogOrder.php @@ -0,0 +1,80 @@ + 20], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'id' => 'ID', + 'name' => 'Name', + 'order_id' => 'Order ID', + 'time' => 'Time', + 'uid' => 'Uid', + 'u_type' => 'U Type', + 'log_type' => 'Log Type', + ]; + } + + /** + * Des:获取订单日志列表 + * Name: getOrderLog + * @param $order_id + * @return array + * @author 倪宗锋 + */ + public function getOrderLog($order_id) + { + $where = ['=', 'order_id',$order_id]; + $select = [ + 'name', + 'time', + 'log_type' + ]; + $getList = self::find()->select($select) + ->where($where) + ->asArray(true) + ->all(); + if (empty($getList)) { + return []; + } + return $getList; + } +} diff --git a/common/models/LogUserOperation.php b/common/models/LogUserOperation.php new file mode 100644 index 0000000..79a14bf --- /dev/null +++ b/common/models/LogUserOperation.php @@ -0,0 +1,141 @@ + 120], + [['user_name', 'resources_name', 'phpsessid', 'user_agent','last_login'], 'string', 'max' => 255], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'id' => 'ID', + 'title' => 'Title', + 'memo' => 'Memo', + 'uid' => 'Uid', + 'user_type' => 'User Type', + 'user_name' => 'User Name', + 'resources_id' => 'Resources ID', + 'resources_type' => 'Resources Type', + 'resources_name' => 'Resources Name', + 'phpsessid' => 'Phpsessid', + 'user_agent' => 'User Agent', + 'create_time' => 'Crate Time', + 'last_login' => 'last_login' + ]; + } + + public function getList($param, $type) + { + //where条件 + $where = ['and']; + if ($param['user_name'] != '') { + $where[] = ['=', 'user_name', $param['user_name']]; + } + if ($param['title'] != '') { + $where[] = ['like', 'title', $param['title']]; + } + if ($param['resource_id'] != '') { + $where[] = ['=', 'resources_id', $param['resource_id']]; + } + if ($param['create_time_start'] != '') { + $where[] = ['>=', 'create_time', $param['create_time_start']]; + } + if ($param['create_time_end'] != '') { + $where[] = ['<', 'create_time', date('Y-m-d', strtotime("{$param['create_time_end']} +1 day"))]; + } + if ($type == 1) {//获取count + $select = ["count(1) cnt"]; + $result = self::find()->select($select) + ->where($where) + ->asArray() + ->one(); + return $result['cnt']; + } else {//获取列表 + //查询字段 + $select = [ + 'id', + 'title', + 'memo' , + 'uid' , + 'user_type', + 'user_name', + 'resources_id'=>new Expression("if(resources_id=0,' - ',resources_id)"), + 'resources_type', + 'resources_name', + 'phpsessid', + 'user_agent', + 'create_time', + 'last_login', + new Expression("CASE user_type + WHEN 1 THEN '管理员' + WHEN 2 THEN '分销商' + WHEN 3 THEN '客户' + WHEN 4 THEN 'CS管理员' + ELSE '-' + END + as user_type_name + "), + new Expression("CASE resources_type + WHEN 1 THEN '产品' + WHEN 2 THEN '订单' + ELSE '-' + END + as resources_type_name + ") + ]; + $offset = ($param['current_page'] - 1) * $param['page_size']; + $result = self::find()->select($select) + ->where($where) + ->orderBy('create_time DESC') + ->offset($offset) + ->limit($param['page_size']) + ->asArray() + ->all(); + return $result; + } + } +} diff --git a/common/models/MainCorpUser.php b/common/models/MainCorpUser.php new file mode 100644 index 0000000..216b0ac --- /dev/null +++ b/common/models/MainCorpUser.php @@ -0,0 +1,64 @@ + 255], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'id' => 'ID', + 'user_name' => 'User Name', + 'main_corp_id' => 'Main Corp ID', + 'main_corp_name' => 'Main Corp Name', + ]; + } + + /** + * Des:根据主体获取运营负责人列表 + * Name: getListForUserMianCorp + * @author 倪宗锋 + */ + public function getListForUserMainCorp() + { + $where = []; + $cookies = $_COOKIE; + if (empty($cookies['user_main_corp'])== false && $cookies['user_main_corp'] != 1) { + $where = ['=', 'main_corp_id', $cookies['user_main_corp']]; + } + $list = self::find()->where($where)->asArray()->all(); + return $list; + } +} diff --git a/common/models/OrderContacts.php b/common/models/OrderContacts.php new file mode 100644 index 0000000..d187207 --- /dev/null +++ b/common/models/OrderContacts.php @@ -0,0 +1,131 @@ + 120], + [['contacts_phone', 'contacts_ID'], 'string', 'max' => 20], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'id' => 'ID', + 'order_id' => 'Order ID', + 'contacts_name' => 'Contacts Name', + 'contacts_phone' => 'Contacts Phone', + 'contacts_ID' => 'Contacts ID', + 'contacts_type' => 'Contacts Type', + 'update_time' => 'Update Time', + 'create_time' => 'Create Time', + 'delete_flag' => 'Delete Flag', + 'bus_run_id' => 'Bus Run ID', + ]; + } + + /** + * Function Description:插入联系人表 + * Function Name: insertContacts + * @param $param_arr + * @param $orderId + * + * @return bool + * + * @author 娄梦宁 + */ + public function insertContacts($param_arr, $orderId) + { + $values = [ + 'order_id' => $orderId, + 'contacts_name' => $param_arr['contacts_name'], + 'contacts_phone' => $param_arr['contacts_phone'], + 'contacts_ID' => empty($param_arr['contacts_ID']) ? '' : $param_arr['contacts_ID'], + 'bus_run_id' => empty($param_arr['run_id']) ? 0 : $param_arr['run_id'], + 'create_time' => date('Y-m-d H:i:s'), + ]; + $this->attributes = $values; + $res = $this->insert(); + if (!$res) { + return false; + } + return true; + } + + /** + * Des:获取订单拓展信息 + * Name: getRowByOrderId + * @param $orderId + * @return array + * @author 倪宗锋 + */ + public function getRowByOrderId($orderId) + { + $where = ['and']; + $where[] = ['=', 'order_id', $orderId]; + $where[] = ['=', 'contacts_type', 1]; + $return = $this->find()->select(['contacts_name', 'contacts_phone', 'contacts_ID', 'contacts_type', 'bus_run_id', 'order_id']) + ->from(static::tableName()) + ->where($where) + ->asArray(true) + ->one(); + return $return; + } + + /** + * Des:获取保险数量 + * Name: getInsurance + * @param $orderId + * @return int + * @author 倪宗锋 + */ + public function getInsuranceCnt($orderId) + { + $where = ['and']; + $where[] = ['=', 'order_id', $orderId]; + $where[] = ['=', 'contacts_type', 2]; + $return = $this->find()->select(['contacts_name', 'contacts_phone', 'contacts_ID', 'contacts_type', 'bus_run_id', 'order_id']) + ->from(static::tableName()) + ->where($where) + ->asArray(true) + ->count(); + return $return; + } +} diff --git a/common/models/OrderInfo.php b/common/models/OrderInfo.php new file mode 100644 index 0000000..6ca331d --- /dev/null +++ b/common/models/OrderInfo.php @@ -0,0 +1,129 @@ + 'ID', + 'order_id' => 'Order ID', + 'prod_id' => 'Prod ID', + 'count' => 'Count', + 'unit_price' => 'Unit Price', + 'total_price' => 'Total Price', + 'delete_flag' => 'Delete Flag', + ]; + } + + /** + * Function Description:插入子订单 + * Function Name: insertInfo + * @param $prod_arr + * @param $oderId + * + * @return bool + * + * @author 娄梦宁 + */ + public function insertInfo($prod_arr, $oderId) + { + $sql = "INSERT into order_info(order_id, total_price, count, unit_price, prod_id,commission) + SELECT {$oderId}, prod_price*{$prod_arr['prod_count']} price, + {$prod_arr['prod_count']},prod_price,prod_id,commission + from prod_main + where prod_id ={$prod_arr['prod_id']}"; + $res = $this->getDb()->createCommand($sql)->execute(); + if (!$res) { + return false; + } + return true; + } + + /** + * Function Description:获取订单佣金 + * Function Name: insertInfo + * @param $orderId int + * @return int + * @author 娄梦宁 + */ + public function getOrderCommission($orderId) + { + $select = [ + new Expression("IFNULL(SUM(b.commission*a.count),0) 'commission'"), + 'order_id' + ]; + try{ + $result =self::find()->select($select) + ->from(self::tableName().' as a') + ->innerJoin(ProdMain::tableName().' as b','a.prod_id = b.prod_id') + ->where(['=','a.order_id',$orderId]) + ->asArray() + ->one(); + }catch (Exception $e) { + $result['commission'] = 0; + } + return $result['commission']; + } + + /** + * Des:获取产品数组 + * Name: getFreeWalkProdArr + * @param $order_id + * @return array + * @author 倪宗锋 + */ + public function geProdArr($order_id){ + $select = [ + 'prod_id'=> 'b.bus_id', + 'prod_name'=> 'b.prod_name', + 'prod_num' => 'a.count' + ]; + $where = ['=','a.order_id', $order_id]; + $getProdArr = self::find()->select($select) + ->from(self::tableName().' a') + ->innerJoin(ProdMain::tableName().' b','a.prod_id = b.prod_id') + ->where($where) + ->asArray(true) + ->all(); + return $getProdArr; + } +} diff --git a/common/models/OrderMain.php b/common/models/OrderMain.php new file mode 100644 index 0000000..b675b1f --- /dev/null +++ b/common/models/OrderMain.php @@ -0,0 +1,633 @@ + 255], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'order_id' => 'Order ID', + 'order_name' => 'Order Name', + 'spider_order_id' => 'Spider Order ID', + 'total_money' => 'Total Money', + 'category_id' => 'Category ID', + 'prod_cate_id' => 'Prod Cate ID', + 'prod_source' => 'Prod Source', + 'prod_cnt' => 'Prod Cnt', + 'sh_uid' => 'Sh Uid', + 'fx_uid' => 'Fx Uid', + 'start_time' => 'Start Time', + 'end_time' => 'End Time', + 'start_date' => 'Start Date', + 'end_date' => 'End Date', + 'order_status' => 'Order Status', + 'update_time' => 'Update Time', + 'create_time' => 'Create Time', + 'delete_flag' => 'Delete Flag', + 'system' => 'System', + 'start_area' => 'Start Area', + 'end_area' => 'End Area', + 'main_user_id' => 'Main User ID', + 'original_price' => 'original_price' + ]; + } + + /** + * Function Description:插入主订单 + * Function Name: insertOrder + * @param $param_arr + * + * @return bool + * + * @author 娄梦宁 + */ + public function insertOrder($param_arr) + { + $values = [ + 'total_money' => $param_arr['total_money'], + 'prod_cate_id' => (int)$param_arr['pro_cate_id'], + 'prod_cnt' => $param_arr['prod_cnt'], + 'fx_uid' => $param_arr['fx_uid'], + 'start_date' => $param_arr['start_date'], + 'start_time' => $param_arr['start_time'], + 'sh_uid' => $param_arr['sh_uid'], + 'order_status' => 1, + 'create_time' => date('Y-m-d H:i:s'), + 'end_date' => date('Y-m-d', $param_arr['end_date']), + 'category_id' => $param_arr['category_id'] + ]; + $this->attributes = $values; + $res = $this->insert(); + if (!$res) { + return false; + } else { + return true; + } + } + + /** + * Function Description:查询订单是否支付 + * Function Name: getOrderStatus + * @param $order_id + * + * @return array|null|\yii\db\ActiveRecord + * + * @author 娄梦宁 + */ + public function getOrderStatus($order_id) + { + $result = self::find()->select(['order_status']) + ->from(self::tableName()) + ->where(['and', ['=', 'order_id', $order_id], ['=', 'delete_flag', 0]]) + ->asArray() + ->one(); + return $result; + } + + /** + * Des:获取订单详情 + * Name: getOrderInfo + * @param $order_id + * @return array|null|\yii\db\ActiveRecord + * @author 倪宗锋 + */ + public function getOrderInfo($order_id) + { + $result = self::find() + ->from(self::tableName()) + ->where(['and', ['=', 'order_id', $order_id], ['=', 'delete_flag', 0]]) + ->asArray() + ->one(); + return $result; + } + + /** + * Function Description:分销订单列表 + * Function Name: FxOrderList + * @param $params array + * @param $fx_uid + * @return array|\yii\db\ActiveRecord[] + * + * @author 娄梦宁 + */ + public function FxOrderList($fx_uid, $params) + { + $where = ['and', ['=', 'a.fx_uid', $fx_uid], ['=', 'a.delete_flag', 0]]; + if (!empty($params['is_refund'])) { + $where[] = ['in', 'b.status', explode(',', $params['is_refund'])]; + } + if (!empty($params['status'])) { + $where[] = ['in', 'a.order_status', explode(',', $params['status'])]; + } + $offset = ($params['current_page'] - 1) * $params['page_size']; + $select = [ + 'a.order_id',//订单ID + 'a.order_status',//订单状态 + 'a.create_time',//创建时间 + 'a.total_money as order_total_money',//订单金额 + 'a.category_id',//订单类型ID + 'a.order_name as pro_cate_name',//产品名称 + 'a.start_date',//出游时间 + 'prod_str' => new Expression("(SELECT GROUP_CONCAT(CONCAT(y.prod_name,',,',x.count) SEPARATOR '||') from order_info x LEFT JOIN prod_main y on x.prod_id = y.prod_id WHERE x.order_id = a.order_id and x.count != 0)"), + 'b.status',//佣金状态 + 'commission_total_money' => new Expression("ifnull(b.total_money,0)"),//佣金金额 + "if(b.`status`=1,'待结算',if(b.`status`=2,'已结算','已取消')) as status_desc",//佣金结算状态 + 'c.room_name',//房型名称 + 'a.prod_cnt',//产品数量 + 'a.end_date',//结束日期 + 'c.total_details',//房型名称 + ]; + $result = self::find()->select($select) + ->from(self::tableName() . ' as a') + ->leftJoin('fx_commission_info b', 'a.order_id=b.order_id') + ->leftJoin('order_hotel_extra c', 'c.main_order_id = a.order_id') + ->where($where) + ->orderBy('a.create_time DESC') + ->limit($params['page_size']) + ->offset($offset) + ->asArray() + ->all(); + return $result; + } + + /** + * Function Description:获取已完成订单 + * Function Name: getFinishOrder + * @param $date + * + * @return array|null|\yii\db\ActiveRecord + * + * @author 娄梦宁 + */ + public function getFinishOrder($date) + { + $result = self::find()->select(['GROUP_CONCAT(order_id) as order_arr']) + ->from(self::tableName()) + ->where(['and', ['=', 'order_status', 2], ['<', 'end_date', $date], ['=', 'delete_flag', 0]]) + ->asArray() + ->one(); + return $result; + } + + /** + * Function Description:已完成订单状态变更 + * Function Name: uptFinishOrder + * @param $order_arr + * + * @return int + * + * @author 娄梦宁 + */ + public function uptFinishOrder($order_arr) + { + $values = [ + 'order_status' => 3 + ]; + $count = self::updateAll($values, ['in', 'order_id', $order_arr]); + return $count; + } + + /** + * Des:修改订单信息 + * Name: upOrder + * @param $value + * @param $orderIds + * @return int + * @author 倪宗锋 + */ + public function upOrder($value, $orderIds) + { + $count = self::updateAll($value, ['in', 'order_id', $orderIds]); + return $count; + } + + /** + * Function Description:取消超时订单 + * Function Name: cancelOuttimeOrder + * + * @return bool + * + * @author 娄梦宁 + */ + public function cancelOuttimeOrder() + { + $values = [ + 'order_status' => 5 + ]; + $time = date('Y-m-d H:i:s', strtotime('-15 minute')); + $count = self::updateAll($values, ['and', ['=', 'order_status', 1], ['<', 'create_time', $time]]); + return $count; + } + + /** + * Des:管理后台 订单列表 获取订单列表信息 + * Name: getOrderListAdm + * @param $param + * @param int $type + * @return array|mixed + * @author 倪宗锋 + */ + public function getOrderListAdm($param, $type = 1) + { + //where条件 + $where = ['and', ['!=', 'a.order_status', 1], ['!=', 'a.order_status', 5], ['=', 'a.delete_flag', 0]]; + if ($param['order_id'] != '') { + $where[] = ['like', 'a.order_id', $param['order_id']]; + } + if ($param['category_id'] != '') { + $where[] = ['=', 'a.category_id', $param['category_id']]; + } + if ($param['create_time_start'] != '') { + $where[] = ['>=', 'a.create_time', $param['create_time_start']]; + } + if ($param['create_time_end'] != '') { + $where[] = ['<', 'a.create_time', date('Y-m-d', strtotime("{$param['create_time_end']} +1 day"))]; + } + + if ($param['start_date_start'] != '') { + $where[] = ['>=', 'a.start_date', $param['start_date_start']]; + } + if ($param['start_date_end'] != '') { + $where[] = ['<', 'a.start_date', date('Y-m-d', strtotime("{$param['start_date_end']} +1 day"))]; + } + if ($param['order_status'] != '') { + $where[] = ['=', 'a.order_status', $param['order_status']]; + } + if ($param['fx_uid'] != '') { + $where[] = ['=', 'a.fx_uid', $param['fx_uid']]; + } + if ($param['pay_type'] != '') { + $where[] = ['=', 'd.pay_type', $param['pay_type']]; + } + if (empty($param['user_area']) == false) { + $where[] = ['=', 'g.user_area', $param['user_area']]; + } + //果运营主体非1或空,则读取自身对应的订单数据,如果运营主体为空,或者运营主体是1则读取订单运营主体是0或1的订单 + $cookies = $_COOKIE; + if (empty($cookies['user_main_corp']) == false && $cookies['user_main_corp'] != 1 && in_array(YII_ENV,['pro','dev'])) { + $where[] = ['=', 'e.main_corp_id', $cookies['user_main_corp']]; + } + //运营负责人 + if (empty($param['main_search']) == false) { + $where[] = ['=', 'a.main_user_id', $param['main_search']]; + } + //联系人 和手机号 + if (empty($param['contacts_name']) == false) { + $where[] = ['like', 'f.contacts_name', $param['contacts_name']]; + } + if (empty($param['contacts_phone']) == false) { + $where[] = ['like', 'f.contacts_phone', $param['contacts_phone']]; + } + if ($type == 1) {//获取count + $select = ["count(1) cnt"]; + $result = self::find()->select($select) + ->from(self::tableName() . ' a') + ->innerJoin('base_category c', ' a.category_id = c.category_id') + ->innerJoin('pay_main d', ' a.order_id = d.order_id') + ->leftJoin(MainCorpUser::tableName() . ' e', 'a.main_user_id=e.id') + ->leftJoin(OrderContacts::tableName() . ' f', 'a.order_id=f.order_id and f.contacts_type=1') + ->leftJoin(FxUser::tableName() . ' g', 'a.fx_uid=g.uid') + ->where($where) + ->asArray() + ->one(); + return $result['cnt']; + } else if ($type == 3) { + $select = ["count(1) cnt", "sum(total_money) total_money"]; + $where[] = ['in', 'a.order_status', [2, 3]]; + $result = self::find()->select($select) + ->from(self::tableName() . ' a') + ->innerJoin('base_category c', ' a.category_id = c.category_id') + ->innerJoin('pay_main d', ' a.order_id = d.order_id') + ->leftJoin(MainCorpUser::tableName() . ' e', 'a.main_user_id=e.id') + ->leftJoin(OrderContacts::tableName() . ' f', 'a.order_id=f.order_id and f.contacts_type=1') + ->leftJoin(FxUser::tableName() . ' g', 'a.fx_uid=g.uid') + ->where($where) + ->asArray() + ->one(); + return $result; + } else {//获取列表 + //查询字段 + $select = [ + 'a.order_id',//订单ID + "a.create_time as create_order_time",//下单时间 + "c.category_name as order_type_des",//订单类型 + "a.order_name as book_product",//产品品类名称 + "( + SELECT GROUP_CONCAT(CONCAT(x.prod_name,'X',x.count) SEPARATOR ' ') + from order_info x + WHERE x.order_id = a.order_id + GROUP BY x.order_id + ) as prod_des + ",//具体产品及数量 + "CONCAT(a.start_date,' ',IFNULL(a.start_time,'')) as start_time",//出发时间 + "(SELECT contacts_name from order_contacts where a.order_id = order_id and contacts_type=1 ) as contacts_name", + "(SELECT contacts_phone from order_contacts where a.order_id = order_id and contacts_type=1) as contacts_phone", + "(SELECT contacts_ID from order_contacts where a.order_id = order_id and contacts_type=1) as contacts_ID", + new Expression("CASE a.order_status + WHEN 1 THEN '待支付' + WHEN 2 THEN '已支付' + WHEN 3 THEN '已完成' + WHEN 4 THEN '已退款' + WHEN 5 THEN '已取消' + ELSE '' + END + as order_status_des + ") + ,//订单状态名称 + "a.order_status as order_status_id",//订单状态标识ID + "if(d.pay_type=1,'微信',if(d.pay_type=2,'支付宝','预付款')) as pay_type_des",//支付类型名称 + 'order_come' => new Expression("(SELECT CONCAT(nickname,'
',phone) from fx_user where a.fx_uid = uid)"),//订单来源(分销商) + "if(a.order_status in (1,2), + if(a.start_date >= '" . date('Y-m-d') . "',0,1), 1) + as if_can_cancel",//是否可以取消订单 + 'a.total_money', + 'a.start_area', + 'a.end_area', + 'a.prod_cnt', + 'a.category_id', + 'a.end_time', + 'system' => new Expression("if(a.system=1,'分销',if(a.system=2,'微信','官网'))"), + 'user_area_name' => new Expression("(select area_name from fx_user_area where area_id = g.user_area)"), + 'a.remark', + "commission_amount" => new Expression("(SELECT SUM(total_money) from fx_commission_info WHERE order_id = a.order_id)") + ]; + $offset = ($param['current_page'] - 1) * $param['page_size']; + $result = self::find()->select($select) + ->from(self::tableName() . ' a') + ->innerJoin('base_category c', ' a.category_id = c.category_id') + ->innerJoin('pay_main d', ' a.order_id = d.order_id') + ->leftJoin(MainCorpUser::tableName() . ' e', 'a.main_user_id=e.id') + ->leftJoin(OrderContacts::tableName() . ' f', 'a.order_id=f.order_id and f.contacts_type=1') + ->leftJoin(FxUser::tableName() . ' g', 'a.fx_uid=g.uid') + ->where($where) + ->orderBy('a.create_time DESC') + ->offset($offset) + ->limit($param['page_size']) + ->asArray() + ->all(); + return $result; + } + } + + /* + * 订单列表 + */ + public function AdminCommissionList($param) + { + //where条件 + $where = ['and', ['!=', 'a.order_status', 1], ['!=', 'a.order_status', 5], ['=', 'a.delete_flag', 0], ['=', 'a.fx_uid', $param['fx_uid']]]; + if ($param['order_id'] != '') { + $where[] = ['like', 'a.order_id', $param['order_id']]; + } + if ($param['order_type_id'] != '') { + $where[] = ['=', 'a.category_id', $param['order_type_id']]; + } + if ($param['create_order_start_date'] != '') { + $where[] = ['>=', 'a.create_time', $param['create_order_start_date']]; + } + if ($param['create_order_end_date'] != '') { + $where[] = ['<', 'a.create_time', date('y-m-d', strtotime("{$param['create_order_end_date']} +1 day"))]; + } + if ($param['order_status_id'] != '') { + $where[] = ['=', 'a.order_status', $param['order_status_id']]; + } + if ($param['settlement_start_date'] != '') { + $where[] = ['>=', 'a.end_date', date('Y-m-d', strtotime("{$param['settlement_start_date']} -3 day"))]; + } + if ($param['settlement_end_date'] != '') { + $where[] = ['<', 'a.end_date', date('Y-m-d', strtotime("{$param['settlement_end_date']} -2 day"))]; + } + $select = [ + 'a.order_id', + 'a.category_id as order_type_id', + new Expression("CASE a.category_id + WHEN 1 THEN '车票' + WHEN 2 THEN '门票' + WHEN 3 THEN '酒店' + ELSE '' + END + as order_type_des + ") + , + 'a.create_time as create_order_date', + 'a.total_money as order_price', + 'a.order_status as order_status_id', + new Expression("CASE a.order_status + WHEN 2 THEN '已支付' + WHEN 3 THEN '已完成' + WHEN 4 THEN '已退款' + ELSE '' + END + as order_status_des + ") + , + 'date_add(a.end_date,INTERVAL 3 DAY) as settlement_order_date', + 'b.total_money as all_commission_money' + ]; + $offset = ($param['current_page'] - 1) * $param['page_size']; + $result = self::find()->select($select) + ->from(self::tableName() . ' as a') + ->leftJoin('fx_commission_info as b', 'a.order_id=b.order_id') + ->where($where) + ->orderBy('a.create_time DESC') + ->offset($offset) + ->limit($param['page_size']) + ->asArray() + ->all(); + $count = self::find()->select('count(1) as count')->from(self::tableName() . ' as a')->where($where)->asArray()->one(); + $count = $count['count']; + return ['list' => $result, 'count' => $count]; + } + + /** + * Des:获取订单退款信息 + * Name: getOrderRefund + * @param $order_id + * @return array + * @author 倪宗锋 + */ + public function getOrderRefund($order_id) + { + $select = [ + 'IFNULL(a.spider_order_id,a.order_id) as order_id', + 'b.pro_cate_name', + 'a.spider_order_id', + 'a.start_date', + 'a.start_time', + 'a.category_id' + ]; + $result = self::find() + ->select($select) + ->from(OrderMain::tableName() . ' a') + ->innerJoin(ProdCategory::tableName() . ' b', 'a.prod_cate_id = b.pro_cate_id') + ->where(['=', 'a.order_id', $order_id]) + ->asArray() + ->one(); + return $result; + } + + /** + * Des:判断某个产品是否存在订单 + * Name: existOrder + * @param $param + * @return bool + * @author 付泓程 + */ + public function existOrder($param) + { + $prod_cate_id = $param['prod_cate_id']; + $start_date = $param['start_date']; + $run_time = $param['start_time']; + $small24 = $param['small24']; //是否小于0 -即提前X天。 + $select = ['count(order_id) as count']; +// $sql = "select count(order_id) as count from order_main where prod_cate_id = {$prod_cate_id} and start_date={$start_date} and order_status = 3 and delete_flag=0"; + $where = ['and', ['=', 'a.prod_cate_id', $prod_cate_id], ['=', 'a.start_date', $start_date], ['=', 'a.order_status', 2], ['=', 'a.delete_flag', 0]]; + if (!$small24) { + $where[] = ['>=', 'a.start_time', $run_time]; + } + $result = self::find() + ->select($select) + ->from(OrderMain::tableName() . ' a') + ->where($where) + ->asArray() + ->one(); + $count = $result['count']; + if ($count > 0) { + return true; + } + return false; + } + + /** + * des 获取订单支付详细信息 + * @param $orderId + * @return array + */ + public function getOrderPayInfo($orderId) + { + $select = [ + 'a.order_id', + 'b.pro_cate_name', + new Expression("concat(a.start_date,' ',a.start_time) as 'run_time'"), + 'a.category_id', + new Expression("(select category_name from base_category WHERE category_id = a.category_id) as category_name"), + 'a.prod_cnt', + 'a.create_time', + 'a.order_status', + 'a.total_money', + 'c.contacts_name', + 'c.contacts_phone' + ]; + $result = self::find() + ->select($select) + ->from(OrderMain::tableName() . ' a') + ->innerJoin(ProdCategory::tableName() . ' b', 'a.prod_cate_id = b.pro_cate_id') + ->innerJoin(OrderContacts::tableName() . ' c', 'a.order_id = c.order_id and c.contacts_type=1 ') + ->where(['=', 'a.order_id', $orderId]) + ->asArray() + ->one(); + return $result; + } + + /** + * Des:订单初始化运营负责人 + * Name: bindMainCorp + * @param $fx_uid + * @param $main_user_id + * @return int + * @author 倪宗锋 + */ + public function bindMainCorp($fx_uid, $main_user_id) + { + $count = self::updateAll(['main_user_id' => $main_user_id], ['=', 'fx_uid', $fx_uid]); + return $count; + } + + /** + * Des:获取酒店订单数据 + * Name: getHotelOrderInfo + * @param $order_id + * @return array + * @author 倪宗锋 + */ + public function getHotelOrderInfo($order_id) + { + $select = [ + 'a.order_id', + 'c.hotel_id', + 'c.room_id', + 'a.prod_cnt', + 'a.start_date', + 'a.end_date', + 'a.total_money', + 'b.contacts_name', + 'b.contacts_phone', + 'c.total_details', + 'a.system' + ]; + $where = ['=','a.order_id', $order_id]; + $getInfo = self::find()->select($select) + ->from(self::tableName().' a') + ->innerJoin(OrderContacts::tableName().' b','a.order_id = b.order_id and b.contacts_type=1') + ->innerJoin('order_hotel_extra c','a.order_id = c.main_order_id') + ->where($where) + ->asArray() + ->one(); + return $getInfo; + } +} diff --git a/common/models/PayMain.php b/common/models/PayMain.php new file mode 100644 index 0000000..ef44034 --- /dev/null +++ b/common/models/PayMain.php @@ -0,0 +1,77 @@ + 'ID', + 'pay_type' => 'Pay Type', + 'amount_money' => 'Amount Money', + 'pay_time' => 'Pay Time', + 'pay_user' => 'Pay User', + 'order_id' => 'Order ID', + 'delete_flag' => 'Delete Flag', + 'pay_order_id' => 'pay_roder_id', + 'order_money' => 'order_money' + ]; + } + + /** + * Des:获取支付信息 + * Name: getPayInfo + * @param $oder_id + * @return array + * @author 倪宗锋 + */ + public function getPayInfo($oder_id) + { + $return = $this->find() + ->from(static::tableName()) + ->where(['=','order_id', $oder_id]) + ->asArray(true) + ->one(); + return $return; + } +} diff --git a/common/models/PayRefush.php b/common/models/PayRefush.php new file mode 100644 index 0000000..0dab727 --- /dev/null +++ b/common/models/PayRefush.php @@ -0,0 +1,129 @@ + 'ID', + 'order_id' => 'Order ID', + 'pay_order_id' => 'pay_order_id', + 'pay_type' => 'Pay Type', + 'amount_money' => 'Amount Money', + 'refush_money' => 'refush_money', + 'fx_uid' => 'Fx Uid', + 'sh_uid' => 'Sh Uid', + 'status' => 'Status', + 'create_time' => 'Create Time', + 'refund_time' => 'Refund Time', + 'delete_flag' => 'Delete Flag', + ]; + } + + /** + * Des:根据订单ID获取退款信息 + * Name: getInfoByOrderId + * @param $orderId + * @return array + * @author 倪宗锋 + */ + public function getInfoByOrderId($orderId) + { + $return = $this->find() + ->from(static::tableName()) + ->where(['=', 'order_id', $orderId]) + ->asArray(true) + ->one(); + return $return; + } + + /** + * Des:根据ID获取退款信息 + * Name: getInfoByOrderId + * @param $id + * @return array + * @author 倪宗锋 + */ + public function getInfoById($id) + { + $return = $this->find() + ->from(static::tableName()) + ->where(['=', 'id', $id]) + ->asArray(true) + ->one(); + return $return; + } + + /** + * Des:获取所有未退款的退款申请记录 + * Name: getAllUnPay + * @author 倪宗锋 + */ + public function getUnPayIds() + { + $return = $this->find()->select(['id']) + ->from(static::tableName()) + ->where(['=', 'status', 1]) + ->asArray(true) + ->all(); + return $return; + } + + /** + * Des:修改退款状态 + * Name: updateStatus + * @param $id + * @param $status + * @return int + * @author 倪宗锋 + */ + public function updateStatus($id, $status) + { + $flag = self::updateAll(['status' => $status, 'refund_time' => date('Y-m-d H:i:s')], ['=', 'id', $id]); + return $flag; + } +} diff --git a/common/models/ProdCategory.php b/common/models/ProdCategory.php new file mode 100644 index 0000000..e64d5f1 --- /dev/null +++ b/common/models/ProdCategory.php @@ -0,0 +1,802 @@ + 100], + [['show_img', 'sign', 'prod_des'], 'string', 'max' => 255], + [['memo',], 'string', 'max' => 65536], + [['update_user', 'close_sale_time'], 'string', 'max' => 50], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'pro_cate_id' => 'Pro Cate ID', + 'pro_cate_name' => 'Pro Cate Name', + 'category_id' => 'Category ID', + 'show_price' => 'Show Price', + 'show_img' => 'Show Img', + 'sign' => 'sign', + 'prod_des' => 'prod_des', + 'sales_count' => 'Sales Count', + 'memo' => 'Memo', + 'commission' => 'Commission', + 'create_user_id' => 'Create User ID', + 'is_recom' => 'Is Recom', + 'create_time' => 'Create Time', + 'update_time' => 'Update Time', + 'delete_flag' => 'Delete Flag', + 'update_user' => 'Update User', + 'address' => 'Address', + 'bus_ticket_id' => 'Bus Ticket ID', + 'bus_line_type' => 'Bus Line Type', + ]; + } + + /** + * Function Description:热销商品推荐10个 + * Function Name: GetHotProd + * @param string $searchStr + * + * @return array|\yii\db\ActiveRecord[] + * + * @author 娄梦宁 + */ + public function GetHotProd($searchStr = '') + { + $where = [ + 'and', + ['<>', 'show_img', ''], + ['=', 'a.delete_flag', 0], + ['=', 'b.delete_flag', 0], + ['=', 'b.system', 1] + ]; + if ($searchStr != '') { + $where[] = ['like', 'pro_cate_name', $searchStr]; + } + $result = self::find()->select(['pro_cate_id', 'sales_count', "IFNULL(prod_des, '') prod_des", 'pro_cate_name', 'if(category_id=1,(if(sign is null,category_id,1000)),category_id) as category_id', 'show_price', "concat(show_img,'.','min.jpg') as show_img"]) + ->from(self::tableName() . ' a') + ->innerJoin('cms_category_prod b', 'a.pro_cate_id=b.prod_cate_id') + ->where($where) + ->orderBy(['sales_count' => SORT_DESC, 'pro_cate_id' => SORT_DESC]) + ->limit(10) + ->asArray() + ->all(); + foreach($result as &$v){ + $v['show_price'] = $this->dealFloat($v['show_price']); + } + return $result; + } + + /** + * Function Description:推荐产品列表 + * Function Name: GetRecommendProd + * @param string $where + * + * @return array|\yii\db\ActiveRecord[] + * + * @author 娄梦宁 + */ + public function GetRecommendProd($where = '') + { + if ($where == '') { + $result = self::find()->select(['pro_cate_id', 'sales_count', 'pro_cate_name', "IFNULL(prod_des, '') prod_des", 'if(category_id=1,(if(sign is null,category_id,1000)),category_id) as category_id', 'show_price', "concat(show_img,'.','min.jpg') as show_img"]) + ->from(self::tableName() . ' a') + ->leftJoin('cms_category_prod b', 'a.pro_cate_id=b.prod_cate_id and b.delete_flag=0') + ->where(['and', ['=', 'is_recom', 1], ['!=', 'show_img', ''], ['=', 'a.delete_flag', 0], ['=', 'b.system', 1]]) + ->orderBy(['pro_cate_id' => SORT_DESC]) + ->asArray() + ->all(); + } else { + $result = self::find()->select(['pro_cate_id', 'sales_count', 'pro_cate_name', "IFNULL(prod_des, '') prod_des", 'if(category_id=1,(if(sign is null,category_id,1000)),category_id) as category_id', 'show_price', "concat(show_img,'.','min.jpg') as show_img"]) + ->from(self::tableName() . ' a') + ->leftJoin('cms_category_prod b', 'a.pro_cate_id=b.prod_cate_id and b.delete_flag=0') + ->where(['and', ['=', 'is_recom', 1], ['!=', 'show_img', ''], ['=', 'a.delete_flag', 0], ['=', 'b.system', 1]]) + ->andWhere(['like', 'pro_cate_name', $where]) + ->orderBy(['pro_cate_id' => SORT_DESC]) + ->asArray() + ->all(); + } + foreach($result as &$v){ + $v['show_price'] = $this->dealFloat($v['show_price']); + } + return $result; + } + + /** + * Function Description:首页列表查询产品 + * Function Name: GetListProd + * @param $prod_id + * @param string $where + * + * @return array|\yii\db\ActiveRecord[] + * + * @author 娄梦宁 + */ + public function GetListProd($prod_id, $where = '') + { + if ($where == '') { + $result = self::find()->select(['pro_cate_id', 'sales_count', 'pro_cate_name', "IFNULL(prod_des, '') prod_des", 'if(category_id=1,(if(sign is null,category_id,1000)),category_id) as category_id', 'show_price', "concat(show_img,'.','min.jpg') as show_img"]) + ->from(self::tableName() . ' a') + ->leftJoin('cms_category_prod b', 'a.pro_cate_id=b.prod_cate_id and b.delete_flag=0') + ->where(['and', ['=', 'b.cms_cate_id', $prod_id], ['<>', 'a.show_img', ''], ['=', 'a.delete_flag', 0]]) + ->orderBy(['show_sort' => SORT_ASC, 'a.pro_cate_id' => SORT_DESC]) + ->asArray() + ->all(); + } else { + $result = self::find()->select(['pro_cate_id', 'sales_count', 'pro_cate_name', "IFNULL(prod_des, '') prod_des", 'if(category_id=1,(if(sign is null,category_id,1000)),category_id) as category_id', 'show_price', "concat(show_img,'.','min.jpg') as show_img"]) + ->from(self::tableName() . ' a') + ->leftJoin('cms_category_prod b', 'a.pro_cate_id=b.prod_cate_id and b.delete_flag=0') + ->where(['and', ['=', 'b.cms_cate_id', $prod_id], ['<>', 'a.show_img', ''], ['=', 'a.delete_flag', 0]]) + ->andWhere(['like', 'pro_cate_name', $where]) + ->orderBy(['show_sort' => SORT_ASC, 'a.pro_cate_id' => SORT_DESC]) + ->asArray() + ->all(); + } + foreach($result as &$v){ + $v['show_price'] = $this->dealFloat($v['show_price']); + } + return $result; + } + + /** + * Function Description:非巴士产品获取详情 + * Function Name: getProdDetail + * @param $pro_cate_id + * + * @return array|null|\yii\db\ActiveRecord + * + * @author 娄梦宁 + */ + public function getProdDetail($pro_cate_id) + { + $result = self::find()->select(['pro_cate_id', 'pro_cate_name', "IFNULL(prod_des, '') prod_des", 'category_id', 'show_img', 'memo booking_notice', 'sign', 'show_price', 'close_sale_time', + "(select category_name from cms_category where cms_category_id =(select cms_cate_id from cms_category_prod where prod_cate_id=$pro_cate_id limit 1)) as category_name"]) + ->from(self::tableName()) + ->where(['and', ['=', 'pro_cate_id', $pro_cate_id], ['=', 'delete_flag', 0]]) + ->asArray() + ->one(); + $result['show_price'] = $this->dealFloat($result['show_price']); + return $result; + } + + /** + * Des:获取产品详细信息 + * Name: getProdInfo + * @param $pro_cate_id + * @return array|null|\yii\db\ActiveRecord + * @author 倪宗锋 + */ + public function getProdCateInfo($pro_cate_id) + { + $result = self::find() + ->from(self::tableName()) + ->where(['=', 'pro_cate_id', $pro_cate_id]) + ->asArray() + ->one(); + return $result; + } + + /** + * Function Description:巴士产品获取详情 + * Function Name: getBusProdDetail + * @param $pro_cate_id + * + * @return array|null|\yii\db\ActiveRecord + * + * @author 娄梦宁 + */ + public function getBusProdDetail($pro_cate_id) + { + $result = self::find()->select(['pro_cate_id', 'pro_cate_name', "IFNULL(prod_des, '') prod_des", 'category_id', 'sign', 'show_img', 'IFNULL(close_sale_time,24) as close_sale_time', "(select category_name from cms_category where cms_category_id =(select cms_cate_id from cms_category_prod where prod_cate_id=$pro_cate_id limit 1)) as category_name" + , 'b.start_area_name', 'b.start_area_id', 'b.start_res_name', 'b.end_res_name', 'b.end_area_name', 'b.end_area_id', 'memo booking_notice']) + ->from(self::tableName() . ' as a') + ->leftJoin('bus_ticket b', 'a.bus_ticket_id=b.ticket_id') + ->where(['and', ['=', 'pro_cate_id', $pro_cate_id]]) + ->asArray() + ->one(); + return $result; + } + + /* + * 后台产品列表 + */ + public function AdminGetList($param) + { + $where = ['and', ['=', 'a.delete_flag', 0]]; + if ($param['category_id'] != '') { + $where[] = ['=', 'b.cms_cate_id', $param['category_id']]; + } + if ($param['pro_cate_name'] != '') { + $where[] = ['like', 'pro_cate_name', $param['pro_cate_name']]; + } + if ($param['is_recom'] != '') { + $where[] = ['=', 'is_recom', $param['is_recom']]; + } + $offset = ($param['current_page'] - 1) * $param['page_size']; + $select = [ + 'pro_cate_id', + 'a.category_id', + "if(a.category_id=1,if(a.sign is not null,concat(c.category_name,'(主线路)'),concat(c.category_name,'(子线路)')),c.category_name) as base_category", + 'pro_cate_name', 'close_sale_time', + 'memo', "IFNULL(prod_des, '') prod_des", + 'commission', 'show_img', + 'is_recom as is_recom_id', + 'if(is_recom=1,"已推荐","未推荐") as is_recom' + , "(select 1) as commission_way_id", "(select '按金额') as commission_way", + "ifnull((select category_name from cms_category where cms_category_id =(select cms_cate_id from cms_category_prod where prod_cate_id=a.pro_cate_id limit 1)),'') as category_name" + , "ifnull(b.cms_cate_id,-1) as cms_category_id" + ]; + $result = self::find()->select($select) + ->from(self::tableName() . ' a') + ->leftJoin('cms_category_prod as b', 'b.prod_cate_id = a.pro_cate_id') + ->innerJoin(BaseCategory::tableName() . ' c', 'c.category_id = a.category_id') + ->where($where) + ->groupBy('a.pro_cate_id') + ->orderBy('a.pro_cate_id DESC') + ->offset($offset) + ->limit((int)$param['page_size']) + ->asArray() + ->all(); + + + $result1 = self::find()->select('count(1) as count') + ->from(self::tableName() . ' a') + ->leftJoin('cms_category_prod as b', 'b.prod_cate_id=a.pro_cate_id') + ->asArray() + ->where($where) + ->one(); + $result1 = $result1['count']; + return ['list' => $result, 'count' => $result1]; + } + + /* + * 产品推荐 + */ + public function Recommend($pro_cate_id) + { + $is_recom = self::find()->select(["is_recom"])->from(self::tableName())->where(['=', 'pro_cate_id', $pro_cate_id])->asArray()->one(); + if ($is_recom['is_recom'] == 1) { + $count = self::updateAll(['is_recom' => 0], ['=', 'pro_cate_id', $pro_cate_id]); + } else { + $count = self::updateAll(['is_recom' => 1], ['=', 'pro_cate_id', $pro_cate_id]); + } + return $count; + } + + /* + * 添加产品 + */ + public function addProd($param) + { + $values = [ + 'category_id' => $param['category_id'], + 'pro_cate_name' => $param['pro_cate_name'], + 'memo' => $param['memo'], + 'sales_count' => rand(1, 10), + 'show_img' => $param['show_img'], + 'create_time' => date('Y-m-d H:i:s'), + 'prod_des' => $param['prod_des'], + 'close_sale_time' => $param['close_sale_time'] //截止售卖时间 2017-05-18 fuhc + ]; + $transaction = Yii::$app->db->beginTransaction(); + try { + $this->attributes = $values; + $res = $this->insert(); + if (!$res) { + throw new Exception('添加出错'); + } + $transaction->commit(); + return true; + } catch (Exception $e) { + $transaction->rollBack(); + return false; + } + } + + /* + * 修改show price + */ + public function changeShowPrice($pro_cate_id) + { + //查当前产品的子产品最低价 + $show_price = ProdMain::find()->select(['min(prod_price) as price'])->from('prod_main')->where(['and', ['=', 'delete_flag', '0'], ['=', 'prod_cate_id', $pro_cate_id]])->asArray()->one(); + $show_price = $show_price['price']; + $count = self::updateAll(['show_price' => $show_price], ['and', ['=', 'pro_cate_id', $pro_cate_id]]); + return $count; + } + + /* + * 自定义佣金 + */ + public function DefineCommission($pro_cate_id, $commission) + { + $count = self::updateAll(['commission' => $commission], ['and', ['=', 'pro_cate_id', $pro_cate_id]]); + return $count; + } + + /* + * 后台修改产品信息 + */ + public function uptAdminProd($param) + { + $values = [ + 'category_id' => $param['category_id'], + 'pro_cate_name' => $param['pro_cate_name'], + 'memo' => $param['memo'], + 'show_img' => $param['show_img'], + 'prod_des' => $param['prod_des'], + 'update_time' => date('Y-m-d H:i:s'), + 'close_sale_time' => $param['close_sale_time'] //截止售卖时间 2017-05-18 fuhc + ]; + $transaction = Yii::$app->db->beginTransaction(); + try { + $uptOne = self::findOne(['pro_cate_id' => $param['pro_cate_id']]); + $uptOne->attributes = $values; + $res = $uptOne->update(); + if ($res === false) { + throw new Exception('添加出错'); + } + $transaction->commit(); + return true; + } catch (Exception $e) { + $transaction->rollBack(); + return false; + } + } + + /* + * 产品增量 + */ + public function addCount($pro_cate_id, $cnt) + { + $sql = '' . "UPDATE prod_category + set sales_count=sales_count+$cnt + where pro_cate_id = $pro_cate_id + "; + $res = $this->getDb()->createCommand($sql)->execute(); + if (!$res) { + return false; + } + return true; + } + + /** + * Des: + * Name: getEntranceTicket + * @return array + * @author 倪宗锋 + */ + public function getEntranceTicket() + { + $result = self::find() + ->from(self::tableName()) + ->where(['and', ['<>', 'sign', ''], ['=', 'category_id', 2], ['=', 'delete_flag', 0]]) + ->indexBy('sign') + ->asArray() + ->all(); + return $result; + } + + /** + * Des:同步门票数据 + * Name: addEntranceTicketFormCs + * @param $prodArr + * @return int + * @throws \yii\db\Exception + * @author 倪宗锋 + */ + public function addEntranceTicketFormCs($prodArr) + { + $transaction = Yii::$app->db->beginTransaction(); + try { + /**添加产品主表数据***************/ + $prodValues = []; + $prodKeys = [ + 'pro_cate_name', + 'category_id', + 'create_time', + 'sign', + ]; + foreach ($prodArr as $key => $val) { + $prodVal = []; + $prodVal[] = $val['name']; + $prodVal[] = 2; + $prodVal[] = date('Y-m-d H:i:s'); + $prodVal[] = $key; + $prodValues[] = $prodVal; + } + $count = Yii::$app->db->createCommand()->batchInsert('prod_category', $prodKeys, $prodValues)->execute(); + if ($count == 0) { + $transaction->rollBack(); + return false; + } + /**获取新添加的产品主表数据及其ID**/ + $signArr = array_keys($prodArr); + $result = self::find() + ->from(self::tableName()) + ->where(['and', ['in', 'sign', $signArr], ['=', 'category_id', 2]]) + ->indexBy('sign') + ->asArray() + ->all(); + /**将数据产褥prod_main表中*/ + $prodMainValues = []; + $prodMainKeys = ['prod_cate_id', 'prod_name', 'create_time', 'bus_id']; + foreach ($result as $key => $val) { + if (!empty($prodArr[$val['sign']]['sub_ticket']) && count($prodArr[$val['sign']]['sub_ticket']) > 0) { + $subTicket = $prodArr[$val['sign']]['sub_ticket']; + foreach ($subTicket as $subVal) { + $prodMainVal = []; + $prodMainVal[] = $val['pro_cate_id']; + $prodMainVal[] = $subVal['prod_name']; + $prodMainVal[] = date('Y-m-d H:i:s'); + $prodMainVal[] = $subVal['prod_id']; + $prodMainValues[] = $prodMainVal; + } + + } + } + $count = Yii::$app->db->createCommand()->batchInsert('prod_main', $prodMainKeys, $prodMainValues)->execute(); + + if ($count == 0) { + $transaction->rollBack(); + return false; + } + $transaction->commit(); + return true; + } catch (Exception $e) { + $transaction->rollBack(); + return false; + } + } + + /** + * Des: 删除门票数据 + * Name: delEntranceTicketFormCs + * @author 倪宗锋 + */ + public function delEntranceTicketFormCs($prodArr) + { + $transaction = Yii::$app->db->beginTransaction(); + try { + $values = [ + 'delete_flag' => 1 + ]; + $signArr = array_keys($prodArr); + $res = self::updateAll($values, ['in', 'sign', $signArr]); + if ($res === false) { + throw new Exception('添加出错'); + } + $transaction->commit(); + return true; + } catch (Exception $e) { + $transaction->rollBack(); + return false; + } + } + + /** + * Des:修改订单状态为激活 + * Name: interEntranceTicketFormCs + * @param $new_bus_arr_inter + * @return bool + * @throws \yii\db\Exception + * @author 倪宗锋 + */ + public function interEntranceTicketFormCs($new_bus_arr_inter) + { + $transaction = Yii::$app->db->beginTransaction(); + try { + $values = [ + 'delete_flag' => 0 + ]; + $signArr = array_keys($new_bus_arr_inter); + $res = self::updateAll($values, ['in', 'sign', $signArr]); + if ($res === false) { + throw new Exception('编辑出错'); + } + $transaction->commit(); + return true; + } catch (Exception $e) { + $transaction->rollBack(); + return false; + } + } + + /** + * Des:每日增加产品的销售量 每月1号重置产品的销售量 + * Name: setSaleCnt + * @param $day + * @return bool + * @throws \yii\db\Exception + * @author 倪宗锋 + */ + public function setSaleCnt($day) + { + if ($day == 1) { + $values = [ + 'sales_count' => new Expression("1+ROUND(RAND()*10,0)") + ]; + } else { + $values = [ + 'sales_count' => new Expression("sales_count+sales_count*0.05+1+ROUND(RAND()*5,0)") + ]; + } + $transaction = Yii::$app->db->beginTransaction(); + try { + + $res = self::updateAll($values); + if ($res === false) { + throw new Exception('添加出错'); + } + $transaction->commit(); + return true; + } catch (Exception $e) { + $transaction->rollBack(); + return false; + } + } + + /** + * Des:LBS获取产品列表 + * Name: getLBSListByCmsCate + * @param $point + * @param $cms_cate_id + * @return array + * @author 倪宗锋 + */ + public function getLBSListByCmsCate($point, $cms_cate_id) + { + $pointArr = explode(',', $point);//经纬度坐标 + if (empty($pointArr['0']) || empty($pointArr['1'])) { + return []; + } + $longitude = $pointArr['0']; + $latitude = $pointArr['1']; + $sql = '' . "SELECT round(if(a.start_lbs>a.end_lbs,a.end_lbs,a.start_lbs),3) 'lbs', b.pro_cate_id,b.sales_count, + b.pro_cate_name,IFNULL(prod_des, '') prod_des,if(category_id=1,(if(sign is null,category_id,1000)),category_id) as category_id + ,show_price,concat(show_img,'.','min.jpg') as show_img + from ( + select ticket_id,line_type,sqrt( + ((({$longitude}-start_res_longitude)*PI()*12656*cos((($latitude+start_res_latitude)/2)*PI()/180)/180) + * (({$longitude}-start_res_longitude)*PI()*12656*cos ((($latitude+start_res_latitude)/2)*PI()/180)/180)) + + ((($latitude-start_res_latitude)*PI()*12656/180) + * (($latitude-start_res_latitude)*PI()*12656/180)) + )/2 as start_lbs, + sqrt( + ((({$longitude}-end_res_longitude)*PI()*12656*cos((($latitude+end_res_latitude)/2)*PI()/180)/180) + *(({$longitude}-end_res_longitude)*PI()*12656*cos ((($latitude+end_res_latitude)/2)*PI()/180)/180) + )+((($latitude-end_res_latitude)*PI()*12656/180) + *(($latitude-end_res_latitude)*PI()*12656/180)) + )/2 as end_lbs, + start_res_longitude, start_res_latitude,end_res_longitude,end_res_latitude + from bus_ticket where + start_res_longitude is not null and end_res_longitude is not NULL + and start_res_latitude is not null and end_res_latitude is not NULL + ) a + JOIN prod_category b on a.ticket_id=b.bus_ticket_id + JOIN cms_category_prod c on b.pro_cate_id = c.prod_cate_id + WHERE b.sign is NULL and c.cms_cate_id={$cms_cate_id} and b.show_img <> '' and b.delete_flag=0 + ORDER BY lbs + LIMIT 10 "; + $result = Yii::$app->getDb()->createCommand($sql)->queryAll(); + foreach($result as &$v){ + $v['show_price'] = $this->dealFloat($v['show_price']); + } + return $result; + } + + + /** + * Des: + * Name: getEntranceHotel + * @return array + * @author 付泓程 + */ + public function getEntranceHotel() + { + $result = self::find() + ->from(self::tableName()) + ->where(['and', ['<>', 'sign', ''], ['=', 'category_id', 3]]) + ->indexBy('sign') + ->asArray() + ->all(); + return $result; + } + + + /** + * Des:同步酒店数据 + * Name: addEntranceHotelFormCs + * @param $prodArr + * @return bool + * @throws \yii\db\Exception + * @author 付泓程 + */ + public function addEntranceHotelFormCs($prodArr) + { + $transaction = Yii::$app->db->beginTransaction(); + try { + /**添加产品主表数据***************/ + $prodValues = []; + $prodKeys = [ + 'pro_cate_name', + 'category_id', + 'create_time', + 'sign', + ]; + foreach ($prodArr as $key => $val) { + $prodVal = []; + $prodVal[] = $val['name']; + $prodVal[] = 3; + $prodVal[] = date('Y-m-d H:i:s'); + $prodVal[] = $key; + $prodValues[] = $prodVal; + } + $count = Yii::$app->db->createCommand()->batchInsert('prod_category', $prodKeys, $prodValues)->execute(); + if ($count == 0) { + $transaction->rollBack(); + return false; + } + /**获取新添加的产品主表数据及其ID**/ + $signArr = array_keys($prodArr); + $result = self::find() + ->from(self::tableName()) + ->where(['and', ['in', 'sign', $signArr], ['=', 'category_id', 3]]) + ->indexBy('sign') + ->asArray() + ->all(); + /**将数据插入prod_main表中*/ + $prodMainValues = []; + $prodMainKeys = ['prod_cate_id', 'prod_name', 'create_time', 'bus_id']; + foreach ($result as $key => $val) { + if (!empty($prodArr[$val['sign']]['sub_ticket']) && count($prodArr[$val['sign']]['sub_ticket']) > 0) { + $subTicket = $prodArr[$val['sign']]['sub_ticket']; + foreach ($subTicket as $subVal) { + $prodMainVal = []; + $prodMainVal[] = $val['pro_cate_id']; + $prodMainVal[] = $subVal['prod_name']; + $prodMainVal[] = date('Y-m-d H:i:s'); + $prodMainVal[] = $subVal['prod_id']; + $prodMainValues[] = $prodMainVal; + } + + } + } + $count = Yii::$app->db->createCommand()->batchInsert('prod_main', $prodMainKeys, $prodMainValues)->execute(); + + if ($count == 0) { + $transaction->rollBack(); + return false; + } + $transaction->commit(); + return true; + } catch (Exception $e) { + $transaction->rollBack(); + return false; + } + } + + + /** + * Des: 删除酒店数据 + * Name: delEntranceTicketFormCs + * @author 付泓程 + */ + public function delEntranceHotelFormCs($prodArr) + { + $transaction = Yii::$app->db->beginTransaction(); + try { + $values = [ + 'delete_flag' => 1 + ]; + $signArr = array_keys($prodArr); + $res = self::updateAll($values, ['in', 'sign', $signArr]); + if ($res === false) { + throw new Exception('删除出错'); + } + $transaction->commit(); + return true; + } catch (Exception $e) { + $transaction->rollBack(); + return false; + } + } + + + /** + * Des:修改订单状态为激活 + * Name: interEntranceHotelFormCs + * @param $new_bus_arr_inter + * @return bool + * @throws \yii\db\Exception + * @author 付泓程 + */ + public function interEntranceHotelFormCs($new_bus_arr_inter) + { + $transaction = Yii::$app->db->beginTransaction(); + try { + $values = [ + 'delete_flag' => 0 + ]; + $signArr = array_keys($new_bus_arr_inter); + $res = self::updateAll($values, ['in', 'sign', $signArr]); + if ($res === false) { + throw new Exception('编辑出错'); + } + $transaction->commit(); + return true; + } catch (Exception $e) { + $transaction->rollBack(); + return false; + } + } + + /** + * Function Description:处理价格 + * Function Name: dealFloat + * @param $float + * + * @return float + * + * @author LUOCJ + */ + public function dealFloat($float) + { + $int = floor($float); + if ($float - $int == 0) { + $float = $int; + } + return $float; + } +} diff --git a/common/models/ProdMain.php b/common/models/ProdMain.php new file mode 100644 index 0000000..526d6cd --- /dev/null +++ b/common/models/ProdMain.php @@ -0,0 +1,286 @@ + 100], + [['create_user', 'update_user'], 'string', 'max' => 50], + [['bus_id'], 'string', 'max' => 255], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'prod_id' => 'Prod ID', + 'prod_cate_id' => 'Prod Cate ID', + 'prod_name' => 'Prod Name', + 'prod_price' => 'Prod Price', + 'create_user' => 'Create User', + 'create_time' => 'Create Time', + 'update_time' => 'Update Time', + 'delete_flag' => 'Delete Flag', + 'update_user' => 'Update User', + 'bus_id' => 'Bus ID', + ]; + } + + /** + * Function Description:产品详情获取子产品数组 + * Function Name: getProdArr + * @param $pro_cate_id + * + * @return array|null|\yii\db\ActiveRecord + * + * @author 娄梦宁 + */ + public function getProdArr($pro_cate_id) + { + $result = self::find()->select(['prod_name', 'prod_price', 'prod_id', 'bus_id', '(select 100) as prod_count', 'commission']) + ->from(self::tableName()) + ->where(['and', ['=', 'prod_cate_id', $pro_cate_id], ['=', 'delete_flag', 0]]) + ->asArray() + ->all(); + if (empty($result['0'])) { + return []; + } else { + foreach ($result as &$v) { + $v['prod_price'] = $this->dealFloat($v['prod_price']); + } + } + return $result; + } + + /** + * Des:获取订单总价格 + * Name: getTotalMoney + * @param $params array 多为数组 产品ID和数量 + * @return array + * @author 倪宗锋 + */ + public function getTotalMoney($params) + { + $prod_id = []; + $sqlCase = ''; + foreach ($params as $val) { + $sqlCase .= " WHEN {$val['prod_id']} THEN prod_price*{$val['prod_count']} "; + $prod_id[] = $val['prod_id']; + } + $prodId = implode(',', $prod_id); + + $sql = '' . "SELECT + SUM(CASE prod_id + {$sqlCase} + ELSE 0 + END) + from prod_main + where prod_id in ({$prodId}) + "; + $result = Yii::$app->db->createCommand($sql)->queryScalar(); + return $result; + } + + /** + * Function Description:获取票种id + * Function Name: getTicketId + * @param $pro_cate_id + * + * @return array|null|\yii\db\ActiveRecord + * + * @author 娄梦宁 + */ + public function getTicketId($pro_cate_id) + { + $where = ['and']; + $where[] = ['=', 'prod_cate_id', $pro_cate_id]; + $where[] = ['=', 'delete_flag', 0]; + $result = self::find()->select(['bus_id', 'prod_price', 'prod_id', 'prod_name']) + ->from(self::tableName()) + ->where($where) + ->orderBy('prod_id') + ->asArray() + ->all(); + return $result; + } + + /** + * Function Description:查询起始站点 + * Function Name: getStation + * @param $prod_id + * + * @return mixed + * + * @author 娄梦宁 + */ + public function getStation($prod_id) + { + $result = self::find()->select(["concat(start_res_name,' - ',end_res_name) as station_str"]) + ->from(self::tableName() . ' as a') + ->leftJoin('bus_ticket as b', 'a.bus_id=b.ticket_id') + ->where(['a.prod_id' => $prod_id]) + ->asArray() + ->one(); + return $result['station_str']; + } + + /** + * Function Description:子产品表添加(只能添加非巴士产品) + * Function Name: addProdMain + * @param $param + * + * @return bool + * + * @author 娄梦宁 + */ + public function addProdMain($param) + { + $transaction = Yii::$app->db->beginTransaction(); + if ($param['category_id'] != 1) { + foreach ($param['price_type'] as $val) { + $values = [ + 'prod_cate_id' => $param['prod_cate_id'], + 'prod_name' => $val['price_type_name'], + 'prod_price' => $val['price_type_price'], + 'create_time' => date('Y-m-d H:i:s'), + ]; + $prod_main = clone $this; + $prod_main->attributes = $values; + $res = $prod_main->insert(); + if (!$res) { + $transaction->rollBack(); + return false; + } + } + } + $transaction->commit(); + return true; + } + + /* + * 修改子产品表 + */ + public function uptCmsProd($prod_arr, $pro_cate_id) + { + if ($prod_arr['prod_id'] == 0) { + $value = [ + 'prod_name' => $prod_arr['price_type_name'], + 'prod_price' => $prod_arr['price_type_price'], + 'prod_cate_id' => $pro_cate_id, + 'create_time' => date('Y-m-d H:i:s') + ]; + $this->attributes = $value; + $res = $this->insert(); + if (!$res) { + return false; + } + } else { + $count = self::updateAll(['prod_name' => $prod_arr['price_type_name'], 'prod_price' => $prod_arr['price_type_price']], ['=', 'prod_id', $prod_arr['prod_id']]); + if ($count === false) { + return false; + } + } + return true; + } + + /* + * 获取产品的子产品数组 + */ + public function getIdArr($pro_cate_id) + { + $arr = self::find()->select('prod_id')->from(self::tableName())->where(['prod_cate_id' => $pro_cate_id])->indexBy('prod_id')->asArray()->all(); + return $arr; + } + + public function delCount($prod_id) + { + $count = self::updateAll(['delete_flag' => 1], ['=', 'prod_id', $prod_id]); + return $count; + } + + + /* + * Des:设置产品佣金 (根据prod_cate_id) + * Name: setProdCommissionByCateId + * @param $param + * @return int + * @author 付泓程 + */ + public function setProdCommissionByCateId($param) + { + $commission = $param['commission']; + $prod_cate_id = $param['prod_cate_id']; + $count = $this->updateAll(['commission' => $commission], ['and', ['=', 'prod_cate_id', $prod_cate_id], ['=', 'delete_flag', '0']]); + return $count; + } + + /* + * Des:设置产品佣金 (根据prod_id) + * Name: setProdCommissionByProdId + * @param $param + * @return int + * @author 付泓程 + */ + public function setProdCommissionByProdId($param) + { + $commission = $param['commission']; + $prod_id = $param['prod_id']; + $count = $this->updateAll(['commission' => $commission], ['and', ['=', 'prod_id', $prod_id], ['=', 'delete_flag', '0']]); + return $count; + } + + /** + * Function Description:处理价格 + * Function Name: dealFloat + * @param $float + * + * @return float + * + * @author LUOCJ + */ + public function dealFloat($float) + { + $int = floor($float); + if ($float - $int == 0) { + $float = $int; + } + return $float; + } +} diff --git a/common/models/ShUser.php b/common/models/ShUser.php new file mode 100644 index 0000000..077af5d --- /dev/null +++ b/common/models/ShUser.php @@ -0,0 +1,115 @@ + 20], + [['phone'], 'unique'], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'uid' => 'Uid', + 'phone' => 'Phone', + 'status' => 'Status', + 'reg_time' => 'Reg Time', + 'last_login' => 'Last Login', + ]; + } + + /** + * Des:根据手机号获取用户ID 没有则注册一个 + * Name: getUidByPhone + * @param $phone + * @return int|mixed + * @author 倪宗锋 + */ + public function getUidByPhone($phone) + { + $info = $this->getUserInfoByPhone($phone); + if (empty($info['uid'])) { + $this->addUser(['phone' => $phone]); + $info = $this->getUserInfoByPhone($phone); + } + if (empty($info['uid'])) { + return 0; + } + return $info['uid']; + } + + /** + * Des:根据手机号获取用户的信息 + * Name: getUserInfoByPhone + * @param $phone + * @return array + * @author 倪宗锋 + */ + public function getUserInfoByPhone($phone) + { + $info = self::find() + ->where(['=', 'phone', $phone]) + ->asArray() + ->one(); + if (empty($info['uid'])) { + return []; + } + return $info; + } + + /** + * Des: 添加用户 + * Name: addUser + * @param $param + * @return bool + * @author 倪宗锋 + */ + public function addUser($param) + { + $this->setAttributes($param); + $return = $this->insert(true); + return $return; + + } + + +} diff --git a/common/models/Test.php b/common/models/Test.php new file mode 100644 index 0000000..d7e21d8 --- /dev/null +++ b/common/models/Test.php @@ -0,0 +1,85 @@ +select($select) + ->limit(100) + ->asArray(true) + ->all(); + return $list; + } + /** + * @inheritdoc + */ + public function rules() + { + return [ + [['id'], 'number'], + [['name'], 'string', 'max' => 255], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'id' => 'Order ID', + 'name' => 'Spider Order ID', + ]; + } + + /** + * Function Description:插入主订单 + * Function Name: insertOrder + * + * @return bool + * + * @author 娄梦宁 + */ + public function insertOrder(){ + $values=[ + 'name'=>'3333', + ]; + $transaction=Yii::$app->db->beginTransaction(); + try{ + $this->attributes=$values; + $res=$this->insert(true); + if(!$res){ + throw new Exception('添加出错'); + } + $transaction->commit(); + return true; + }catch (Exception $e){ + $transaction->rollBack(); + return false; + } + } +} + diff --git a/common/util/AliPay.php b/common/util/AliPay.php new file mode 100644 index 0000000..00f3b86 --- /dev/null +++ b/common/util/AliPay.php @@ -0,0 +1,318 @@ +getAliPayUrl($params); + $url = $siteConfig['host_name'] . '/fx/?r=weChat/we-chat/q-code&qCode=' . urlencode($getUrl['data']['codUrl']) . '&_math=' . rand(100, 999); + return Util::returnArrSu('', array('codUrl' => $url, 'price' => $par['total_fee'])); + } + + /** + * Function Description:支付宝web支付 + * Function Name: webPay + * @param $param array + * @return array + * + * @author nzf + */ + public function webPay($param) + { + //交易参数 + $params['body'] = $param['name']; + $params['subject'] = $param['name']; + $params['order_id'] = $param['order_id']; + $params['price'] = $param['total_fee']; + $params['timeout_express'] = '1m'; + $params['goType'] = 2; + $params['method'] = 'alipay.trade.wap.pay'; + $return = static::getAliPayUrl($params); + return $return; + } + + /********************通用方法**************************/ + /** + * Function Description:获取阿里支付pay + * Function Name: getAliPayUrl + * @param $params array + * + * @return array + * + * @author 倪宗�? + */ + private static function getAliPayUrl($params) + { + $config = self::getAliPayConfig(); + $sysParams = self::getSysParams(); + $sysParams["method"] = $params['method']; + //交易参数 + $body['productCode'] = 'QUICK_WAP_PAY'; + $body['body'] = $params['body']; + $body['subject'] = $params['subject']; + $body['out_trade_no'] = $params['order_id']; + $body['total_amount'] = $params['price']; + $body['timeout_express'] = $config['timeout']; + + $sysParams['biz_content'] = json_encode($body); + if ($params['goType'] == 1) {//如果是页面跳�? + $sysParams['sign'] = urlencode(static::getSign($sysParams)); + $paramString = static::getSignContent($sysParams); + $requestUrl = $config['gatewayUrl'] . "?" . $paramString; + return Util::returnArrSu('', ['payData' => $requestUrl]); + } elseif ($params['goType'] == 2) {//如果是参数返�? + $sysParams['sign'] = static::getSign($sysParams); + $result = self::buildRequestForm($sysParams); + return Util::returnArrSu('', ['payData' => $result]); + } else { + $sysParams['sign'] = urlencode(static::getSign($sysParams)); + $paramString = static::getSignContent($sysParams); + $requestUrl = $config['gatewayUrl'] . "?" . $paramString; + $curl = new CurlInterface('', 5); + $result = $curl->execute($requestUrl, 'GET'); + $result = json_decode($result, true); + $return['codUrl'] = ''; + if ($result['alipay_trade_precreate_response']['code'] == '10000') { + $return['codUrl'] = $result['alipay_trade_precreate_response']['qr_code']; + } + return Util::returnArrSu('', $return); + } + } + + /** + * Function Description:取消订单 + * Function Name: cancelOrder + * @param $params + * + * @return array + * + * @author 倪宗�? + */ + public static function cancelOrder($params) + { + $config = self::getAliPayConfig(); + $sysParams = self::getSysParams(); + $sysParams["method"] = 'alipay.trade.refund'; + $body = array( + 'out_trade_no' => $params['order_id'],//订单�? + 'refund_amount' => $params['refund_fee'],//退款金额 + 'refund_reason' => $params['memo'], + 'out_request_no' => $params['order_id'] . '-' . date('YmdHis') . rand(100, 999)//�?款原�? + ); + $sysParams['biz_content'] = json_encode($body); + $sysParams['sign'] = static::getSign($sysParams); + $sysParams['sign'] = urlencode(static::getSign($sysParams)); + $paramString = static::getSignContent($sysParams); + $requestUrl = $config['gatewayUrl'] . "?" . $paramString; + //调用�?款接�? + $curlInterface = new CurlInterface($sysParams, 5); + $result = $curlInterface->execute($requestUrl, 'GET'); + $result = json_decode(mb_convert_encoding($result, 'utf-8'), true); + if (isset($result['alipay_trade_refund_response']) && $result['alipay_trade_refund_response']['code'] == '10000') { + return Util::returnArrSu(); + } + return Util::returnArrEr('退款失败!'); + } + + /** + * Function Description:获取系统通用参数 + * Function Name: getSysParams + * + * @return mixed + * + * @author 倪宗�? + */ + private static function getSysParams() + { + $config = self::getAliPayConfig(); + $siteConfig = Util::getSiteConfig(); + //组装系统参数 + $sysParams["app_id"] = $config['app_id']; + $sysParams["version"] = '1.0'; + $sysParams["format"] = 'json'; + $sysParams["sign_type"] = 'RSA'; + + $sysParams["timestamp"] = date("Y-m-d H:i:s"); + $sysParams["alipay_sdk"] = 'alipay-sdk-php-20160411'; + $sysParams["prod_code"] = ''; + $sysParams["notify_url"] = $siteConfig['host_name'] . $siteConfig['notify_url']; +// $sysParams["return_url"] = $config['return_url']; + $sysParams["charset"] = $config['charset']; + return $sysParams; + } + + /** + * Function Description:建立请求,以表单HTML形式构�?�(默认�? + * Function Name: buildRequestForm + * @param $para_temp + * + * @return string 提交表单HTML文本 + * + * @author 倪宗�? + */ + protected static function buildRequestForm($para_temp) + { + $config = self::getAliPayConfig(); + $sHtml = "
"; + while (list ($key, $val) = each($para_temp)) { + if (false === static::checkEmpty($val)) { + $val = str_replace("'", "'", $val); + $sHtml .= ""; + } + } + return $sHtml; + } + + /** + * Function Description:获取签名 + * Function Name: getSign + * @param $params + * + * @return string + * + * @author 倪宗�? + */ + public static function getSign($params) + { + if (isset($params['sign'])) { + unset($params['sign']); + } + $content = self::getSignContent($params); + $config = self::getAliPayConfig(); + $priKey = $config['merchant_private_key']; + $res = "-----BEGIN RSA PRIVATE KEY-----\n" . + wordwrap($priKey, 64, "\n", true) . + "\n-----END RSA PRIVATE KEY-----"; + openssl_sign($content, $sign, $res); + $sign = base64_encode($sign); + return $sign; + } + + /** + * Function Description:获取参数配置 + * Function Name: getAliPayConfig + * + * @return array + * + * @author 倪宗�? + */ + public static function getAliPayConfig() + { + if (self::$aliPayConfig == null) { + $payConfig = require ROOT_PATH . '/common/config/aliConfig/payConfig.php'; + $siteConfig = Util::getSiteConfig(); + self::$aliPayConfig = $payConfig[$siteConfig['aliPay']]; + } + return self::$aliPayConfig; + } + + /** + * Function Description:将数组转换为符合阿里支付的路由参�? + * Function Name: getSignContent + * @param $params + * + * @return string + * + * @author 倪宗�? + */ + public static function getSignContent($params) + { + ksort($params); + $stringToBeSigned = ""; + $i = 0; + foreach ($params as $k => $v) { + if (false === self::checkEmpty($v) && "@" != substr($v, 0, 1)) { + // 转换成目标字符集 + $v = self::characet($v, 'utf-8'); + + if ($i == 0) { + $stringToBeSigned .= "$k" . "=" . "$v"; + } else { + $stringToBeSigned .= "&" . "$k" . "=" . "$v"; + } + $i++; + } + } + unset ($k, $v); + return $stringToBeSigned; + } + + /** + * Function Description:校验$value是否非空 + * Function Name: checkEmpty + * @param $value + * + * @return bool + * + * @author 倪宗�? + */ + private static function checkEmpty($value) + { + if (!isset($value)) { + return true; + } + if ($value === null) { + return true; + } + if (trim($value) === "") { + return true; + } + return false; + } + + /** + * Function Description:转换字符集编�? + * Function Name: characet + * @param $data + * @param $targetCharset + * + * @return string + * + * @author 倪宗�? + */ + private static function characet($data, $targetCharset) + { + if (!empty($data)) { + $fileType = 'utf-8'; + if (strcasecmp($fileType, $targetCharset) != 0) { + $data = mb_convert_encoding($data, $targetCharset); + } + } + return $data; + } +} \ No newline at end of file diff --git a/common/util/AlipayHtml.php b/common/util/AlipayHtml.php new file mode 100644 index 0000000..304faf0 --- /dev/null +++ b/common/util/AlipayHtml.php @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + 支付金额 + + + +
+
+ +
购买数量:
+
联系人:
+
手机号:
+
出游时间:
+ +

消费总额

+
+ ¥ +
+
+ + + +
+ + + diff --git a/common/util/AllPayHtml.php b/common/util/AllPayHtml.php new file mode 100644 index 0000000..aab2545 --- /dev/null +++ b/common/util/AllPayHtml.php @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + 支付金额 + + + +
+
+ +
购买数量:
+
联系人:
+
手机号:
+
出游时间:
+
+

消费总额

+
+ ¥ +
+
+
+ + + +
+ + + + diff --git a/common/util/CurlInterface.php b/common/util/CurlInterface.php new file mode 100644 index 0000000..77107d7 --- /dev/null +++ b/common/util/CurlInterface.php @@ -0,0 +1,451 @@ +setBody($body, $type); + $this->setBaseUrl(); + } + + /*****************==========参数设置函数开始=========******************/ + /** + * Function Description:设置是否返回头部信息 + * Function Name: setCurlOptHeader + * @param $curlOptHeader + * + * + * @author 倪宗锋 + */ + public function setCurlOptHeader($curlOptHeader) + { + $this->curlOptHeader = $curlOptHeader; + } + + /** + * Function Description:获取交易概要 + * Function Name: getCurlGetInfo + * + * @return null + * + * @author 倪宗锋 + */ + public function getCurlGetInfo() + { + return $this->curlGetInfo; + } + + /** + * Function Description:获取返回值报文 + * Function Name: getResponseBody + * + * @return null + * + * @author 倪宗锋 + */ + public function getResponseBody() + { + return $this->responseBody; + } + + /** + * Function Description:获取全路径地址 + * Function Name: getUrl + * + * @return null + * + * @author 倪宗锋 + */ + public function getUrl() + { + return $this->url; + } + + /** + * Function Description:设置路径 在baseUrl基础上 + * Function Name: setUrl + * @param $url + * + * + * @author 倪宗锋 + */ + public function setUrl($url) + { + $this->url = $this->baseUrl . $url; + } + + /** + * Function Description:设置过期时间 + * Function Name: setTimeOut + * @param $timeOut + * + * + * @author 倪宗锋 + */ + public function setTimeOut($timeOut) + { + $this->timeOut = $timeOut; + } + + /** + * Function Description:设置传值方式 + * Function Name: setVerb + * @param $verb + * + * + * @author 倪宗锋 + */ + public function setVerb($verb) + { + $this->verb = $verb; + } + + /** + * Function Description:设置baseUrl + * Function Name: setBaseUrl + * @param $baseUrl string + * + * @author 倪宗锋 + */ + public function setBaseUrl($baseUrl = '') + { + $this->baseUrl = $baseUrl; + } + + /** + * Function Description:获取BaseUrl + * Function Name: getBaseUrl + * + * @return null + * + * @author 倪宗锋 + */ + public function getBaseUrl() + { + return $this->baseUrl; + } + + /** + * Function Description:设置是否有返回值 + * Function Name: setNotReturn + * @param $str + * + * + * @author 倪宗锋 + */ + public function setNotReturn($str) + { + $this->notReturn = $str; + } + + /** + * Function Description:设置请求报文 $body 必须是个数组 + * Function Name: setBody + * @param $body + * @param $type int 1:json 2:xml 3 发送原数据接收xml 4 发送原数据 接收json 5:都是原数据 + * + * @author 倪宗锋 + */ + public function setBody($body, $type = 1) + { + $this->body = ''; + if (is_array($body)) { + if ($type == 1) { + $this->body = json_encode($body); + $this->requestLength = strlen($this->body); + } elseif ($type == 2) { + $this->body = Util::arrayToXml($body); + $this->requestLength = strlen($this->body); + } elseif (in_array($type, array(3, 4, 5))) { + $this->body = $body; + } + } else { + $this->body = $body; + } + $this->bodyType = $type; + } + + /** + * Function Description:设置ssl类型 + * Function Name: setCert + * @param $certArr array + * + * + * @author 倪宗锋 + */ + public function setCert($certArr) + { + $this->cert = true; + $this->certPem = $certArr['SSLCERT_PATH']; + $this->keyPem = $certArr['SSLKEY_PATH']; + } + + /*****************==========参数设置函数结束=========******************/ + /*****************==========调用接口并返回结果===开始======******************/ + + /** + * Function Description:执行交易 + * Function Name: execute + * + * @param $url string sap地址 + * @param $verb string 请求方式 post|get + * + * @return array + * + * @author nizongfeng + * Modify Date:2016.11.10 + */ + public function execute($url, $verb = 'GET') + { + $this->verb = $verb; + $this->url = $this->baseUrl . $url; + + $this->logMessage .= date('Y-m-d H:i:s') . " Url : {$this->url}"; + $this->logMessage .= ' Method:' . $this->verb; + if (is_array($this->body)) { + $this->logMessage .= "sendContent: " . print_r($this->body, 1) . PHP_EOL; + } else { + $this->logMessage .= "sendContent: {$this->body}" . PHP_EOL; + } + + $ch = curl_init($this->url); + try { + switch (strtoupper($this->verb)) { + case 'GET': + $this->executeGet($ch); + break; + case 'POST': + $this->executePost($ch); + break; + case 'PUT': + $this->executePut($ch); + break; + case 'DELETE': + $this->executeDelete($ch); + break; + default: + $this->logMessage .= "current verb: {$this->verb}, is an invalid REST verb." . PHP_EOL; + break; + } + } catch (\Exception $e) { + $this->logMessage .= $e->getMessage() . PHP_EOL; + } + curl_close($ch); + $ch = null; + return $this->getResult(); + } + + /** + * Function Description:获取返回数据 + * Function Name: getResult + * + * @return array|mixed + * + * @author nizongfeng + * Modify Date:2016.11.10 + */ + public function getResult() + { + if (in_array($this->bodyType, array(1, 4))) { + $return = json_decode($this->responseBody, true); + } elseif (in_array($this->bodyType, array(2, 3))) { + $return = Util::xmlToArray($this->responseBody); + } elseif ($this->bodyType == 5) { + $return = $this->responseBody; + } else { + $return = ''; + } + file_put_contents(APP_PATH . '/log/curl/' . date('Y-m-d') . '.log', $this->logMessage . PHP_EOL, FILE_APPEND); + return $return; + } + + /*******************=====GET传值=====********************/ + /** + * Function Description:GET传值 + * Function Name: executeGet + * @param $ch + * + * @return void + * + * @author nizongfeng 2016.11.10 + */ + protected function executeGet($ch) + { + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); + $this->doExecute($ch); + } + + /*******************=====POST传值=====********************/ + /** + * Function Description:POST传值 + * Function Name: executePost + * @param $ch + * + * @return void + * + * @author nizongfeng 2016.11.10 + */ + protected function executePost($ch) + { +// curl_setopt($ch, CURLOPT_VERBOSE, true); + curl_setopt($ch, CURLOPT_POST, true); + if (is_array($this->body)) { + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($this->body)); + } else { + curl_setopt($ch, CURLOPT_POSTFIELDS, $this->body); + } + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); + $this->doExecute($ch); + } + + /*******************=====PUT传值=====********************/ + /** + * Function Description:PUT传值 + * Function Name: executePut + * @param $ch + * + * + * @author 倪宗锋 + */ + protected function executePut($ch) + { + curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); + curl_setopt($ch, CURLOPT_POSTFIELDS, $this->body); + $this->doExecute($ch); + } + + /*******************=====DELETE传值=====********************/ + /** + * Function Description:DELETE传值 + * Function Name: executeDelete + * @param $ch + * + * + * @author 倪宗锋 + */ + protected function executeDelete($ch) + { + curl_setopt($ch, CURLOPT_POSTFIELDS, $this->body); + curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE'); + $this->doExecute($ch); + } + + /*******************=====传值及接收=====********************/ + /** + * Function Description: 传值及接受数据 + * Function Name: doExecute + * @param $curlHandle + * + * @return void + * + * @author nizongfeng 2015.12.08 + */ + protected function doExecute(&$curlHandle) + { + + if ($this->verb != 'get') { + $this->setCurlOpts($curlHandle); + } + curl_setopt($curlHandle, CURLOPT_HEADER, $this->curlOptHeader); + curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, true); + curl_setopt($curlHandle, CURLOPT_TIMEOUT, $this->timeOut); + + //记录报文发送时间 + $sendTime = microtime(true); + $this->responseBody = curl_exec($curlHandle); + //记录报文返回时间 + $responseTime = microtime(true); + $timeIncrement = round(floatval($responseTime - $sendTime), 3); + //记录返回的报文信息 + $this->logMessage .= "response: {$this->responseBody}" . PHP_EOL; + $curlInfo = curl_getinfo($curlHandle); + $this->curlGetInfo = $curlInfo; + if (empty($curlInfo['primary_port'])) { + $curlInfo['primary_port'] = ''; + } + $curlInfoStr = ''; + if (isset($_SERVER['SERVER_ADDR']) && $_SERVER['SERVER_PORT']) { + $curlInfoStr = " toIP {$curlInfo['primary_ip']}:{$curlInfo['primary_port']}"; + $curlInfoStr .= " selfIP {$_SERVER['SERVER_ADDR']} {$_SERVER['SERVER_PORT']}"; + } + //记录通信信息及性能指标 + $this->logMessage .= "Info: " . json_encode($curlInfoStr) . PHP_EOL; + $this->logMessage .= "sendTime: " . date('H:i:s', $sendTime) . " , responseTime: "; + $this->logMessage .= date('H:i:s', $responseTime) . " , timeIncrement:" . $timeIncrement . 's' + . PHP_EOL; + $curlError = curl_error($curlHandle); + if ($curlError) { + $this->logMessage .= "Error: " . $curlError . PHP_EOL; + } + } + + /*******************=====头部设置=====********************/ + /** + * Function Description:头部设置 + * Function Name: setCurlOpts + * @param $curlHandle + * + * + * @author 倪宗锋 + */ + protected function setCurlOpts(&$curlHandle) + { + if ($this->cert == 1) { + //设置证书 + //使用证书:cert 与 key 分别属于两个.pem文件 + curl_setopt($curlHandle, CURLOPT_SSLCERTTYPE, 'PEM'); + curl_setopt($curlHandle, CURLOPT_SSLCERT, $this->certPem); + curl_setopt($curlHandle, CURLOPT_SSLKEYTYPE, 'PEM'); + curl_setopt($curlHandle, CURLOPT_SSLKEY, $this->keyPem); + } + + } + /*****************==========调用接口并返回结果===结束======******************/ + +} + +?> \ No newline at end of file diff --git a/common/util/EntranceHotelService.php b/common/util/EntranceHotelService.php new file mode 100644 index 0000000..d7a0fd1 --- /dev/null +++ b/common/util/EntranceHotelService.php @@ -0,0 +1,224 @@ +getProdDetail($prod_cate_id); +// return Util::returnArrSu('fda',$prodInfo); + if (!isset($prodInfo['category_id']) || $prodInfo['category_id'] != 3) { + return Util::returnArrEr('该产品不是酒店产品!'); + } + /**获取产品的价格日历*/ + $getDatePriceList = $this->getDatePriceList($prodInfo); + if ($getDatePriceList['flag'] == false) { + return $getDatePriceList; + } + $datePriceList = $getDatePriceList['data']; + $prodInfo['date_list'] = $datePriceList; + $keys = array_keys($datePriceList);//将数组的健组成一个数组 + $date = $keys[0];//取健的第一个值为默认日期 + $prodInfo['date'] = $date; + /**获取产品的价格列表*/ + $getProdArr = $this->getProdArr($prodInfo, $date); + if ($getProdArr['flag'] == false) { + return $getProdArr; + } + $prodInfo['prod_arr'] = $getProdArr['data']; + return Util::returnArrSu('', $prodInfo); + } + + /** + * Des:获取价格日历 + * Name: getDatePriceList + * @param $prodInfo + * @return array + * @author 付泓程 + */ + public function getDatePriceList($prodInfo) + { + if (empty($prodInfo['sign']) == false) {//如果不是cs的巴士 + $siteConfig = Util::getSiteConfig(); + $time = time(); + $data = [ + 'auth_code' => Util::authCodeForCs($time), + 'user_key' => $siteConfig['adm_user_key'], + 'user' => $siteConfig['adm_user'], + 'user_id' => $siteConfig['adm_user_id'], + 'request_time' => $time, + 'action' => 'gate_ticket_mini_value', + 'sign' => $prodInfo['sign'], + ]; + + $curl = new CurlInterface($data, 4); +// $result = $curl->execute($siteConfig['adm_host1'] . '/api/nfx', 'POST'); +// if (!isset($result['code']) || $result['code'] != '0' || count($result['list']) == 0) { +// return Util::returnArrEr('产品已售完!'); +// } + $result = ["code"=>"0","info"=>"","list"=>[ + ["ticket_date"=>"2017-05-09","ticket_time"=>"","mini_price"=>"509.00"], + ["ticket_date"=>"2017-05-12","ticket_time"=>"","mini_price"=>"512.00"], + ["ticket_date"=>"2017-05-15","ticket_time"=>"","mini_price"=>"515.00"] + ] + ]; + $datePriceList = []; + foreach ($result['list'] as $val) { + $datePriceList[$val['ticket_date']] = $val['mini_price']; + } + } else { + $endDate = strtotime(date('Y-m-01') . " +4 month -1 day");//获取第三个月的最后一天 + $_time = range(strtotime(date('Y-m-d')), $endDate, 24 * 60 * 60); + $_time = array_map(create_function('$v', 'return date("Y-m-d", $v);'), $_time); + $datePriceList = array_fill_keys($_time, $this->dealFloat($prodInfo['show_price'])); + } + return Util::returnArrSu('', $datePriceList); + + } + + /** + * Des:获取品类的产品列表 + * Name: getProdArr + * @param $prodInfo + * @param $date + * @return array + * @author 付泓程 + */ + public function getProdArr($prodInfo, $date) + { + $prodMain = new ProdMain(); +// $prodArray = $prodMain->getProdArr($prodInfo['pro_cate_id']);//获取本地存储的酒店品类下的酒店房型产品 + if (empty($prodInfo['sign']) == false) { + $result = $this->getCsPro($prodInfo, $date); + if (!isset($result['code']) || $result['code'] != '0' || count($result['product_list']) == 0) { + return Util::returnArrEr('系统繁忙,请稍后再试!'); + } + //对数据进行整合 +// $csProdArr = $result['product_list']; +// foreach ($prodArray as $key => $val) { +// $prod = false; +// foreach ($csProdArr as $csVal) { +// if ($csVal['prod_id'] == $val['bus_id']) { +// $prod = true; +// $prodArray[$key]['prod_count'] = $csVal['ticket_num']; +// $prodArray[$key]['prod_price'] = intval(ceil($csVal['ticket_price'])) ; +// break; +// } +// } +// if ($prod == false) {//当这个产品在cs那边不存在的话 则删除该产品 +// unset($prodArray[$key]); +// } +// } + $prodArray = array_values($result['product_list']); + } + return Util::returnArrSu('', $prodArray); + } + + /** + * Des:获取品类某天的产品列表 + * Name: getProdArrForDate + * @param $params + * @return array + * @author 付泓程 + */ + public function getProdArrForDate($params) + { + if (Util::checkPattern('intVal', $params['prod_cate_id']) == false) { + return Util::returnArrEr('params error'); + } + /**获取产品品类信息*/ + $prodCate = new ProdCategory(); + $prodInfo = $prodCate->getProdDetail($params['prod_cate_id']); + if (!isset($prodInfo['category_id']) || $prodInfo['category_id'] != 3) { + return Util::returnArrEr('该产品不是酒店产品!'); + } + /**获取的品类的产品列表*/ + $getProdArr = $this->getProdArr($prodInfo, $params['date']); + if ($getProdArr['flag'] == false) { + return $getProdArr; + } + $return['prod_arr'] = $getProdArr['data']; + return Util::returnArrSu('', $return); + } + + /** + * Des:获取cs酒店产品 + * Name: getCsPro + * @param $prodInfo + * @param $date + * @return array + * @author 付泓程 + */ + public function getCsPro($prodInfo, $date) + { + $siteConfig = Util::getSiteConfig(); + $time = time(); + $data = [ + 'auth_code' => Util::authCodeForCs($time), + 'user_key' => $siteConfig['adm_user_key'], + 'user' => $siteConfig['adm_user'], + 'user_id' => $siteConfig['adm_user_id'], + 'request_time' => $time, + 'action' => 'gate_ticket_date_run', + 'sign' => $prodInfo['sign'], + 'date' => $date + ]; +// $curl = new CurlInterface($data, 4); +// $result = $curl->execute($siteConfig['adm_host1'] . '/api/nfx', 'POST');//获取cs的门票产品 + $curl = new CurlInterface($data,4); + $result = $curl->execute('http://cs.zhizhuchuxing.com/zz-jd/st-ht/HTcontrol.php?type=order_ChooseProduct&key_word=&room_name=¤t_page=1&page_size=25','GET'); +// $result = []; + return $result; + } + + + /** + * Function Description:处理价格 + * Function Name: dealFloat + * @param $float + * + * @return float + * + * @author LUOCJ + */ + public function dealFloat($float) + { + $int = floor($float); + if ($float - $int == 0) { + $float = $int; + } + return $float; + } +} \ No newline at end of file diff --git a/common/util/EntranceTicketService.php b/common/util/EntranceTicketService.php new file mode 100644 index 0000000..7eb82c6 --- /dev/null +++ b/common/util/EntranceTicketService.php @@ -0,0 +1,292 @@ +getProdDetail($prod_cate_id); + if (!isset($prodInfo['category_id']) || $prodInfo['category_id'] != 2) { + return Util::returnArrEr('该产品不是门票产品!'); + } + /**获取产品的价格日历*/ + $getDatePriceList = $this->getDatePriceList($prodInfo); + if ($getDatePriceList['flag'] == false) { + return $getDatePriceList; + } + $datePriceList = $getDatePriceList['data']; + $prodInfo['date_list'] = $datePriceList; + $keys = array_keys($datePriceList);//将数组的健组成一个数组 + $date = $keys[0];//取健的第一个值为默认日期 + $prodInfo['date'] = $date; + /**获取产品的价格列表*/ + $getProdArr = $this->getProdArr($prodInfo, $date); + if ($getProdArr['flag'] == false) { + return $getProdArr; + } + $prodInfo['prod_arr'] = $getProdArr['data']; + return Util::returnArrSu('', $prodInfo); + } + + /** + * Des:获取价格日历 + * Name: getDatePriceList + * @param $prodInfo + * @return array + * @author 倪宗锋 + */ + public function getDatePriceList($prodInfo) + { + if (empty($prodInfo['sign']) == false) {//如果是cs的门票 + $siteConfig = Util::getSiteConfig(); + $time = time(); + $data = [ + 'auth_code' => Util::authCodeForCs($time), + 'user_key' => $siteConfig['adm_user_key'], + 'user' => $siteConfig['adm_user'], + 'user_id' => $siteConfig['adm_user_id'], + 'request_time' => $time, + 'action' => 'gate_ticket_mini_value', + 'sign' => $prodInfo['sign'], + ]; + + $curl = new CurlInterface($data, 4); + $result = $curl->execute($siteConfig['adm_host1'] . '/api/nfx', 'POST'); + if (!isset($result['code']) || $result['code'] != '0' || count($result['list']) == 0) { + return Util::returnArrEr('产品已售完!'); + } + $datePriceList = []; + foreach ($result['list'] as $val) { + $datePriceList[$val['ticket_date']] = $val['mini_price']; + } + + //判断售卖截止时间差 + $s_time_h = $prodInfo['close_sale_time']; + $_time_new = array(); + foreach ($datePriceList as $k => $v) { + //得到能卖的时间 +// $v.=" 00:00:00"; + $s_time = strtotime($k) + $s_time_h * 60 * 60; + //能卖的时间和当前时间比较 + $currdate = time(); + if ($s_time > $currdate) { + $_time_new[$k] = $v; + } + } + $datePriceList = $_time_new; + + + } else { + $endDate = strtotime(date('Y-m-01') . " +4 month -1 day");//获取第三个月的最后一天 + $_time = range(strtotime(date('Y-m-d')), $endDate, 24 * 60 * 60); + $_time = array_map(create_function('$v', 'return date("Y-m-d", $v);'), $_time); + //判断售卖截止时间差 + $s_time_h = $prodInfo['close_sale_time']; + $_time_new = array(); + foreach ($_time as $k => $v) { + //得到能卖的时间 +// $v.=" 00:00:00"; + $s_time = strtotime($v) + $s_time_h * 60 * 60; + //能卖的时间和当前时间比较 + $currdate = time(); + if ($s_time > $currdate) { + $_time_new[] = $v; + } + } + $datePriceList = array_fill_keys($_time_new, $this->dealFloat($prodInfo['show_price'])); + } + return Util::returnArrSu('', $datePriceList); + + } + + /** + * Des:获取品类的产品列表 + * Name: getProdArr + * @param $prodInfo + * @param $date + * @return array + * @author 倪宗锋 + */ + public function getProdArr($prodInfo, $date) + { + $prodMain = new ProdMain(); + $prodArray = $prodMain->getProdArr($prodInfo['pro_cate_id']);//获取本地存储的门票品类下的门票产品 + if (empty($prodInfo['sign']) == false) { + $result = $this->getCsPro($prodInfo, $date); + if (!isset($result['code']) || $result['code'] != '0' || count($result['list']) == 0) { + return Util::returnArrEr('系统繁忙,请稍后再试!'); + } + //对数据进行整合 + $csProdArr = $result['list']; + foreach ($prodArray as $key => $val) { + $prod = false; + foreach ($csProdArr as $csVal) { + if ($csVal['prod_id'] == $val['bus_id']) { + if (Util::checkPattern('intVal', $csVal['ticket_num'])) { + $prod = true; + $prodArray[$key]['prod_count'] = $csVal['ticket_num']; + $prodArray[$key]['prod_price'] = $csVal['ticket_price']; + break; + } + } + } + if ($prod == false) {//当这个产品在cs那边不存在的话 则删除该产品 + unset($prodArray[$key]); + } + } + $prodArray = array_values($prodArray); + } + foreach($prodArray as &$v){ + $v['prod_price'] = $this->dealFloat($v['prod_price']); + } + return Util::returnArrSu('', $prodArray); + } + + /** + * Des:获取品类某天的产品列表 + * Name: getProdArrForDate + * @param $params + * @return array + * @author 倪宗锋 + */ + public function getProdArrForDate($params) + { + if (Util::checkPattern('intVal', $params['prod_cate_id']) == false) { + return Util::returnArrEr('params error'); + } + /**获取产品品类信息*/ + $prodCate = new ProdCategory(); + $prodInfo = $prodCate->getProdDetail($params['prod_cate_id']); + if (!isset($prodInfo['category_id']) || $prodInfo['category_id'] != 2) { + return Util::returnArrEr('该产品不是门票产品!'); + } + /**获取的品类的产品列表*/ + $getProdArr = $this->getProdArr($prodInfo, $params['date']); + if ($getProdArr['flag'] == false) { + return $getProdArr; + } + $return['prod_arr'] = $getProdArr['data']; + return Util::returnArrSu('', $return); + } + + /** + * Des:获取cs门票产品 + * Name: getCsPro + * @param $prodInfo + * @param $date + * @return array + * @author 倪宗锋 + */ + public function getCsPro($prodInfo, $date) + { + $siteConfig = Util::getSiteConfig(); + $time = time(); + $data = [ + 'auth_code' => Util::authCodeForCs($time), + 'user_key' => $siteConfig['adm_user_key'], + 'user' => $siteConfig['adm_user'], + 'user_id' => $siteConfig['adm_user_id'], + 'request_time' => $time, + 'action' => 'gate_ticket_date_run', + 'sign' => $prodInfo['sign'], + 'date' => $date + ]; + $curl = new CurlInterface($data, 4); + $result = $curl->execute($siteConfig['adm_host1'] . '/api/nfx', 'POST');//获取cs的门票产品 + return $result; + } + + /** + * Des:获取cs系统门票订单产品价格 + * Name: getOrderPriceFromCs + * @param $prodInfo + * @param $date + * @param $order_prod_arr + * @return array + * @author 倪宗锋 + */ + public function getOrderPriceFromCs($prodInfo, $date, $order_prod_arr) + { + $prodMain = new ProdMain(); + $prodArray = $prodMain->getProdArr($prodInfo['pro_cate_id']);//获取本地存储的门票品类下的门票产品 + $result = $this->getCsPro($prodInfo, $date); + if (!isset($result['code']) || $result['code'] != '0' || count($result['list']) == 0) { + return Util::returnArrEr('系统繁忙,请稍后再试!'); + } + //对数据进行整合 + $csProdArr = $result['list']; + $csOrderProdParams = []; + /**将数据拼接成cs产品ID对应产品数量的格式**/ + foreach ($order_prod_arr as $orderProd) { + foreach ($prodArray as $val) { + if ($orderProd['prod_id'] == $val['prod_id']) { + $csOrderProdParams[$val['bus_id']] = [ + 'prod_id' => $val['bus_id'], + 'prod_cnt' => $orderProd['prod_count'] + ]; + break; + } + } + } + /**根据cs产品格式计算价格**/ + $price = 0; + foreach ($csProdArr as $csPro) { + if (isset($csOrderProdParams[$csPro['prod_id']])) { + $theProd = $csOrderProdParams[$csPro['prod_id']]; + $price += $theProd['prod_cnt'] * ceil($csPro['ticket_price']); + } + } + return Util::returnArrSu('', $price); + } + +} \ No newline at end of file diff --git a/common/util/FxAmount.php b/common/util/FxAmount.php new file mode 100644 index 0000000..ffba184 --- /dev/null +++ b/common/util/FxAmount.php @@ -0,0 +1,108 @@ +getMyCommission($fx_uid); + if ($info['remaining_sum'] < $amount) { + return Util::returnArrEr('账户余额不足!'); + } + /**扣除余额**/ + $flag = $fxUserAccount->deductAmount($fx_uid, $amount); + if ($flag) { + static::addLog($fx_uid, 2, $amount, ''); + return Util::returnArrSu(); + } else { + return Util::returnArrEr('余额支付失败!'); + } + } + + /** + * 退款 + * @param $fx_uid + * @param $amount + * @return array + */ + public static function refund($fx_uid, $amount) + { + $fxUserAccount = new FxUserAccount(); + $flag = $fxUserAccount->rechargeAmount($fx_uid, $amount); + if ($flag) { + static::addLog($fx_uid, 3, $amount, ''); + return Util::returnArrSu(); + } else { + return Util::returnArrEr('退款失败![amount_1001]'); + } + } + + /** + * 充值 + * @param $fx_uid + * @param $amount + * @return array + */ + public static function recharge($fx_uid, $amount) + { + $fxUserAccount = new FxUserAccount(); + $flag = $fxUserAccount->rechargeAmount($fx_uid, $amount); + if ($flag) { + static::addLog($fx_uid, 1, $amount, ''); + return Util::returnArrSu(); + } else { + return Util::returnArrEr('充值失败![amount_1002]'); + } + } + + /** + * 添加日志 + * @param $fx_uid + * @param $trade_type int 交易类型 1、充值 2、支出 3、退款 + * @param $amount + * @param $msg + * @return array + */ + public static function addLog($fx_uid, $trade_type, $amount, $msg) + { + $fxUserAccount = new FxUserAccount(); + $info = $fxUserAccount->getMyCommission($fx_uid); + $remaining_sum = $info['remaining_sum']; + $fxUserAmountLog = new FxUserAmountLog(); + return $fxUserAmountLog->addLog($fx_uid, $trade_type, $amount, $remaining_sum, $msg); + } + + /** + * 取消订单加扣款 + * @param $params + * @return array + */ + public function cancelOrder($params) + { + $order = new OrderMain(); + $orderInfo = $order->getOrderInfo($params['order_id']); + $fx_uid = $orderInfo['fx_uid']; + return self::refund($fx_uid, $params['refund_fee']); + } +} \ No newline at end of file diff --git a/common/util/OrderUtil.php b/common/util/OrderUtil.php new file mode 100644 index 0000000..6c8da8a --- /dev/null +++ b/common/util/OrderUtil.php @@ -0,0 +1,362 @@ + $order_id, 'is_check' => $is_check], '/zzcx/interfaces/order/cancel-order'); + if ($return['flag']) { + return Util::returnArrSu(); + } + return Util::returnArrEr($return['msg']); + + } + + /** + * Des:获取子线路产品的库存日历 + * Name: getBusSaleDate + * @param $pro_cate_id + * @param $if_back + * @param $date + * @return array + * @author 倪宗锋 + */ + public static function getBusSaleDate($pro_cate_id, $if_back, $date = '') + { + $prod_main = new ProdMain(); + $bus_ticket = new BusTicket(); + if ($if_back == 1) { + $ticket_info = $prod_main->getTicketId($pro_cate_id); + $pro_cate_id = $bus_ticket->getBackTicketId($ticket_info[0]['bus_id']); + } + //读取产品对应的巴士票种id + $ticket_info = $prod_main->getTicketId($pro_cate_id); + $return = CsCurl::getBusSaleDate($ticket_info[0]['bus_id']);//获取库存日历 + //将比今天或者指定日期小的日期剔除 + if (empty($return['data']['list']['0']) == false) { + if (empty($date)) { + $date = date('Y-m-d'); + } + foreach ($return['data']['list'] as $key => $val) { + if (strtotime($val) < strtotime($date)) { + unset($return['data']['list'][$key]); + } else { + break; + } + } + } + $return['data']['list'] = array_values($return['data']['list']); + return $return; + } + + /** + * Function Description:切换日期实时获取库存 + * Function Name: getBusStock + * @param $date + * @param $pro_cate_id + * @param $if_back + * @return array + * + * @author 娄梦宁 + */ + public static function getBusStock($date, $pro_cate_id, $if_back) + { + + $prod_main = new ProdMain(); + $bus_ticket = new BusTicket(); + if ($if_back == 1) { + $ticket_info = $prod_main->getTicketId($pro_cate_id); + $pro_cate_id = $bus_ticket->getBackTicketId($ticket_info[0]['bus_id']); + } + //读取产品对应的巴士票种id + $ticket_info = $prod_main->getTicketId($pro_cate_id); + //去cs系统查实时库存信息 + $time = time(); + $siteConfig = Util::getSiteConfig(); + $send_data = [ + 'auth_code' => Util::authCodeForCs($time), + 'user_key' => $siteConfig['adm_user_key'], + 'user' => $siteConfig['adm_user'], + 'user_id' => $siteConfig['adm_user_id'], + 'request_time' => $time, + 'action' => 'get_run_array', + 'run_date' => $date, + 'ticket_id' => $ticket_info[0]['bus_id'] + ]; + $curlInterface = new CurlInterface($send_data, 4); + $curlInterface->setBaseUrl(''); + + $ticket_arr_cs = $curlInterface->execute($siteConfig['adm_host1'] . '/api/nfx', 'POST'); + if ($ticket_arr_cs['code'] == 0 && $ticket_arr_cs['data']) { + $result = []; + foreach ($ticket_arr_cs['data'] as $val) { + if (intval($val['count']) <= 0) { + $val['count'] = 0; + } + /** 将null字段的过滤掉 update on 2017-06-06 14:54**/ + if (empty($val['start_time'])) { + continue; + } + $stat_time = strtotime($date . ' ' . $val['start_time']); + if ($stat_time <= time()) { + continue; + } + /**白哥说将已停运的过滤掉 update on 2017-06-01 10:23**/ + if ($val['run_status'] == 142) { + continue; + } + foreach ($ticket_info as $k => $v) { + $val['prod_name'] = $v['prod_name']; + $val['prod_id'] = $v['prod_id']; + $val['prod_price'] = $v['prod_price']; + $val['station_str'] = $prod_main->getStation($v['prod_id']); + if ($val['run_status'] != 137) { + $result[$val['start_time']][$k] = $val; + }; + } + } + if (count($result) == 0) { + return Util::returnArrEr('该日的班次已截止售卖,请选择其它日期'); + } + /******************************增加售卖截止时间判断*****************************/ + $prod_category = new ProdCategory(); + $prodInfo = $prod_category->getBusProdDetail($pro_cate_id); + $close_sale_time = $prodInfo['close_sale_time']; + if ($close_sale_time == '') $close_sale_time = 24; + $s_time = strtotime($date) + $close_sale_time * 60 * 60; + $curr_h_i = date('H:i:00', $s_time); + if ($curr_h_i == '00:00:00') $curr_h_i = '24:00:00'; + //1.判断是否存在订单了 + $orderMain = new OrderMain(); + $param = ["prod_cate_id" => $pro_cate_id, "start_date" => $date, "start_time" => $curr_h_i, "small24" => $close_sale_time < 0]; + $boolExist = $orderMain->existOrder($param); + if (!$boolExist) { + if ($s_time <= time()) { + return Util::returnArrEr('该日的班次已截止售卖,请选择其它日期'); + } + } + /******************************华丽的分割线*****************************/ + $result1 = ['prod_info' => $result, 'pro_cate_id' => $pro_cate_id]; + return Util::returnArrSu('', $result1); + } + return Util::returnArrEr('没有库存,请重选日期'); + } + + /** + * Function Description:订单状态查询 + * Function Name: getOrderStatus + * @param $order_id + * + * @return array + * + * @author 娄梦宁 + */ + public static function getOrderStatus($order_id) + { + $order_main = new OrderMain(); + $str_arr = explode('-', $order_id); + $order_id = $str_arr[0]; + $result = $order_main->getOrderStatus($order_id); + if ($result['order_status'] == 1) { + return Util::returnArrSu('尚未支付', array('order_status' => 1)); + } elseif ($result['order_status'] == 2) { + return Util::returnArrSu('支付已完成', array('order_status' => 2)); + } else { + return Util::returnArrSu('订单已失效', array('order_status' => 0)); + } + } + + /** + * Function Description:车详情 + * Function Name: getDetail + * @param $pro_cate_id + * + * @return array + * + * @author 娄梦宁 + */ + public static function getDetail($pro_cate_id) + { + //参数校验 + if (Util::checkPattern('intVal', $pro_cate_id) == false) { + return Util::returnArrEr('参数错误'); + } + $prod_category = new ProdCategory(); + $prod_main = new ProdMain(); + $prod_detail = $prod_category->getBusProdDetail($pro_cate_id); + if ($prod_detail['sign'] != '') { + $getRunDate = LineProdService::getLineSaleDate($pro_cate_id, 0); + } else { + $getRunDate = OrderUtil::getBusSaleDate($pro_cate_id, 0); + } + //子产品列表 + $prod_arr = $prod_main->getProdArr($pro_cate_id); + $prod_detail['prod_arr'] = $prod_arr; + $prod_detail['run_date'] = $getRunDate['data']['list']; + return Util::returnArrSu('', $prod_detail); + } + + /** + * Function Description:首页列表数据获取 + * Function Name: getAllProd + * @param $where + * @param $point + * @return array + * + * @author 娄梦宁 + */ + public static function getAllProd($where, $point) + { + $cms_category = new CmsCategory(); + $prod_category = new ProdCategory(); + $result = []; + $getHotProdArr = $prod_category->GetHotProd($where); + //热销产品 + if (count($getHotProdArr)) { + $result[0] = [ + 'prod_arr' => $getHotProdArr, + 'cms_category_id' => 1, + 'category_name' => '购买过', + 'recom_arr' => [] + ]; + } + //推荐产品 + $getRecommendArr = $prod_category->GetRecommendProd($where); + if (count($getRecommendArr)) { + $result[1] = [ + 'prod_arr' => $getRecommendArr, + 'cms_category_id' => 2, + 'category_name' => '热销', + 'recom_arr' => [] + ]; + } + //自定义产品类型 + $category_arr = $cms_category->getCategoryArr(); + foreach ($category_arr as $key => $val) { + $category_id = $val['cms_category_id']; + $prodArr = $prod_category->GetListProd($category_id, $where); + if (count($prodArr)) { + $category_arr[$key]['prod_arr'] = $prodArr; + $siteConfig = Util::getSiteConfig(); + if (in_array($category_id, $siteConfig['show_recom'])) {//获取LBS定位推荐产品 + $category_arr[$key]['recom_arr'] = $prod_category->getLBSListByCmsCate($point, $category_id); + } else { + $category_arr[$key]['recom_arr'] = []; + } + } else { + unset($category_arr[$key]); + } + } + $arr = array_merge($result, $category_arr); + $data = ['prod_list' => $arr]; + return Util::returnArrSu('', $data); + } + + + /** + * Des:前往蜘蛛出行确认支付 + * Name: payOrder + * @param $orderId + * @param $param_arr + * @return array + * @author 倪宗锋 + */ + public static function payOrderNotify($orderId, $param_arr) + { + $siteConfig = Util::getSiteConfig(); + $pay = FxAmount::pay($param_arr['fx_uid'], $param_arr['total_money']); + if ($pay['flag'] == false) { + return $pay; + } + //将数据进行加密 + $time = time(); + $data = [ + 'out_trade_no' => $orderId, + 'time' => $time, + 'buyer_pay_amount' => $param_arr['total_money'], + ]; + $code = Util::authCode(http_build_query($data), "ENCODE"); + $pay_params = [ + 'system' => 1, + 'code' => $code, + 'time' => $time, + ]; + //调用支付确认接口 + $curl = new CurlInterface($pay_params, 3); + $payResult = $curl->execute($siteConfig['notify_url'], 'POST'); + if ($payResult['return_code'] != 'SUCCESS') { + return Util::returnArrEr('预下单失败!' . $payResult['return_msg']); + } + return Util::returnArrSu(); + } + + + /** + * Des:下单 + * Name: makeOrder + * @param $params + * @return array + * @author 倪宗锋 + */ + public static function makeOrder($params) + { + /***前往蜘蛛出行下单***/ + $siteConfig = Util::getSiteConfig(); + $curl = new CurlInterface($params, 4); + $makeOrder = $curl->execute($siteConfig['zzcx_host'] . '/zzcx/order/order/make-order', 'POST'); + if ($makeOrder['flag'] != true) {//下单成功 + return Util::returnArrEr($makeOrder['msg']); + } + $return = $makeOrder['data'];//返回值 + //如果是余额支付 需扣除当前分销账户的余额 并调用支付完成通知接口告知支付已完成 + if ($params['pay_type'] == 3) {//余额支付 + $orderId = $return['order_id']; + $payOrder = [ + 'fx_uid' => $params['fx_uid'], + 'total_money' => $return['total_money'], + ]; + $payFlag = static::payOrderNotify($orderId, $payOrder); + if ($payFlag['flag'] == false) { + return Util::returnArrEr($payFlag['msg']); + } + } + /****设置返回值****/ + $return['qr_code'] = $siteConfig['host_name'] . '/fx/?r=weChat/we-chat/q-code&qCode=' . urlencode($return['pay_url']) . '&_math=441'; + $return['pay_type'] = $params['pay_type']; + return Util::returnArrSu('', $return); + + } +} \ No newline at end of file diff --git a/common/util/PayService.php b/common/util/PayService.php new file mode 100644 index 0000000..ef1ba79 --- /dev/null +++ b/common/util/PayService.php @@ -0,0 +1,105 @@ +unifiedOrderByOrderIdForSao($params); + return $return; + } + + /** + * Des:取消订单 + * Name: cancel + * @param $params array order_id:订单ID name:订单名称 total_fee:总金额-元 refund_fee退款金额 + * @param int $type + * @return array + * @author 倪宗锋 + */ + public static function cancel($params, $type = 1) + { + /****微信支付****/ + if ($type == 1) { + $pay = new WeChatPay(); + } elseif ($type == 2) { + /****阿里支付****/ + $pay = new AliPay(); + } else { + $pay = new FxAmount(); + } + $return = $pay->cancelOrder($params); + return $return; + } + + /** + * Des: 直接付款 + * Name: pay + * @param $params array + * $order_id string 订单表 订单ID + * $name string 产品名称 + * $total_fee int 总金额 单位元 + * $openid string 用户opendid + * $type 1微信 2支付宝 + * + * @return array + * @author 倪宗锋 + */ + public static function pay($params,$type = 1) + { + if($type == 1) { + $pay = new WeChatPay(); + $return = $pay->unifiedOrderByOrderIdForWeChat($params); + }else { + $pay = new AliPay(); + $return = $pay->webPay($params); + } + // include ROOT_PATH.'/common/util/WeChatHtml.php'; + return $return['data']['payData']; + } + + /** + * Des: 支付 目前只支持微信直接支付 + * Name: pay + * @param $orderId string 订单ID + * + * @return array + * @author 倪宗锋 + */ + public static function checkIsPay($orderId) + { + $pay = new WeChatPay(); + $return = $pay->checkIsPay($orderId); + return $return; + } +} \ No newline at end of file diff --git a/common/util/UploadPic.php b/common/util/UploadPic.php new file mode 100644 index 0000000..35f49fc --- /dev/null +++ b/common/util/UploadPic.php @@ -0,0 +1,264 @@ + $maxsize) { + $pin = round($maxsize / $size, 2) * 100; + } + try{ + list($width, $height) = getimagesize($upfile['tmp_name']); + move_uploaded_file($upfile['tmp_name'], $updir); + $new_image = imagecreatetruecolor($width, $height); + $old_image = imagecreatefromjpeg($updir); + imagecopyresampled($new_image, $old_image, 0, 0, 0, 0, $width, $height, $width, $height); + imagejpeg($new_image, $updir, $pin); + return Util::returnArrSu('', ['url' => $updir]); + }catch (Exception $e){ + return Util::returnArrEr('上传图片失败! '); + } + } + + /** + * Des:获取比例压缩后的图片大小 + * Name: show_pic_scal + * @param $width + * @param $height + * @param $picpath + * @return mixed + * @author 倪宗锋 + */ + public static function show_pic_scal($width, $height, $picpath) + { + $imginfo = GetImageSize($picpath); + $imgw = $imginfo [0]; + $imgh = $imginfo [1]; + + $ra = number_format(($imgw / $imgh), 1); //宽高比 + $ra2 = number_format(($imgh / $imgw), 1); //高宽比 + + + if ($imgw > $width or $imgh > $height) { + if ($imgw > $imgh) { + $newWidth = $width; + $newHeight = round($newWidth / $ra); + + } elseif ($imgw < $imgh) { + $newHeight = $height; + $newWidth = round($newHeight / $ra2); + } else { + $newWidth = $width; + $newHeight = round($newWidth / $ra); + } + } else { + $newHeight = $imgh; + $newWidth = $imgw; + } + $newsize [0] = $newWidth; + $newsize [1] = $newHeight; + + return $newsize; + } + + + public static function getImageInfo($src) + { + return getimagesize($src); + } + + /** + * 创建图片,返回资源类型 + * @param string $src 图片路径 + * @return resource $im 返回资源类型 + * **/ + public static function create($src) + { + $info = static::getImageInfo($src); + switch ($info[2]) { + case 1: + $im = imagecreatefromgif($src); + break; + case 2: + $im = imagecreatefromjpeg($src); + break; + default: + $im = imagecreatefrompng($src); + break; + } + return $im; + } + + /** + * 缩略图主函数 + * @param string $src 图片路径 + * @param int $w 缩略图宽度 + * @param int $h 缩略图高度 + * @return mixed 返回缩略图路径 + * **/ + + public static function resize($src, $w, $h, $savepath) + { + //获取图片的基本信息 + $info = static::getImageInfo($src); + $width = $info[0];//获取图片宽度 + $height = $info[1];//获取图片高度 + $per1 = round($width / $height, 2);//计算原图长宽比 + $per2 = round($w / $h, 2);//计算缩略图长宽比 + + //计算缩放比例 + if ($per1 > $per2 || $per1 == $per2) { + //原图长宽比大于或者等于缩略图长宽比,则按照宽度优先 + $per = $w / $width; + } else { + //原图长宽比小于缩略图长宽比,则按照高度优先 + $per = $h / $height; + } + $temp_w = intval($width * $per);//计算原图缩放后的宽度 + $temp_h = intval($height * $per);//计算原图缩放后的高度 + $temp_img = imagecreatetruecolor($temp_w, $temp_h);//创建画布 + $im = static::create($src); + imagecopyresampled($temp_img, $im, 0, 0, 0, 0, $temp_w, $temp_h, $width, $height); + if ($per1 > $per2) { + imagejpeg($temp_img, $savepath, 100); + imagedestroy($im); + return static::addBg($savepath, $w, $h, "w"); + //宽度优先,在缩放之后高度不足的情况下补上背景 + } + if ($per1 == $per2) { + imagejpeg($temp_img, $savepath, 100); + imagedestroy($im); + return $savepath; + //等比缩放 + } + if ($per1 < $per2) { + imagejpeg($temp_img, $savepath, 100); + imagedestroy($im); + return static::addBg($savepath, $w, $h, "h"); + //高度优先,在缩放之后宽度不足的情况下补上背景 + } + return ''; + } + + /** + * Des:添加背景 返回加上背景的图片 + * Name: addBg + * @param string $src 图片路径 + * @param int $w 背景图像宽度 + * @param int $h 背景图像高度 + * @param String $first 决定图像最终位置的,w 宽度优先 h 高度优先 wh:等比 + * @return mixed + * @author 倪宗锋 + */ + public static function addBg($src, $w, $h, $first = "w") + { + $bg = imagecreatetruecolor($w, $h); + $white = imagecolorallocate($bg, 255, 255, 255); + imagefill($bg, 0, 0, $white);//填充背景 + + //获取目标图片信息 + $info = static::getImageInfo($src); + $width = $info[0];//目标图片宽度 + $height = $info[1];//目标图片高度 + $img = static::create($src); + if ($first == "wh") { + //等比缩放 + return $src; + } else { + if ($first == "w") { + $x = 0; + $y = ($h - $height) / 2;//垂直居中 + } else { + $x = ($w - $width) / 2;//水平居中 + $y = 0; + } + imagecopymerge($bg, $img, $x, $y, 0, 0, $width, $height, 100); + imagejpeg($bg, $src, 100); + imagedestroy($bg); + imagedestroy($img); + return $src; + } + + } + + /** + * Des:剪切图片 + * Name: cutPic + * @param $image + * @param $upFile + * @param int $xx + * @param int $yy + * @return array + * @author 倪宗锋 + */ + public static function cutPic($image, $upFile, $xx = 300, $yy = 300) + { + $imgstream = file_get_contents($image); + $im = imagecreatefromstring($imgstream); + $x = imagesx($im);//获取图片的宽 + $y = imagesy($im);//获取图片的高 + + + if ($x > $y) { + //图片宽大于高 + $sx = abs(($y - $x) / 2); + $sy = 0; + $thumbw = $y; + $thumbh = $y; + } else { + //图片高大于等于宽 + $sy = abs(($x - $y) / 2.5); + $sx = 0; + $thumbw = $x; + $thumbh = $x; + } + if (function_exists("imagecreatetruecolor")) { + $dim = imagecreatetruecolor($yy, $xx); // 创建目标图gd2 + } else { + $dim = imagecreate($yy, $xx); // 创建目标图gd1 + } + imageCopyreSampled($dim, $im, 0, 0, $sx, $sy, $yy, $xx, $thumbw, $thumbh); + imagejpeg($dim, $upFile); + return Util::returnArrSu('', array('url' => $upFile)); + } +} diff --git a/common/util/Util.php b/common/util/Util.php new file mode 100644 index 0000000..39babfc --- /dev/null +++ b/common/util/Util.php @@ -0,0 +1,545 @@ +'; + foreach ($array as $k => $v) { + $string .= '<' . $k . '>'; + if (is_array($v) || is_object($v)) {//判断是否是数组,或者,对像 + $string .= self::arrayToXml($v);//是数组或者对像就的递归调用 + } elseif (is_numeric($v)) { + $string .= $v; + } else { + $string .= ''; + } + $string .= ''; + } + $string .= ''; + return $string; + } + + /** + * Function Description:xml转换为json + * Function Name: xml_to_json + * @param $source + * + * @return string + * + * @author 倪宗锋 + */ + public static function xmlToJson($source) + { + if (is_file($source)) { //传的是文件,还是xml的string的判断 + $xml_array = simplexml_load_file($source); + } else { + $xml_array = simplexml_load_string(trim($source)); + } + $json = json_encode($xml_array, true); + return $json; + } + + /** + * Function Description:xml转换成数组 + * Function Name: xmlToArray + * @param $source + * + * @return mixed + * + * @author 倪宗锋 + */ + public static function xmlToArray($source) + { + libxml_disable_entity_loader(true); + $getResult = json_decode(json_encode(simplexml_load_string(trim($source), 'SimpleXMLElement', LIBXML_NOCDATA)), true); + return $getResult; + } + + /** Function Description:加密解密函数 + * Function Name: authCode + * @param $string + * @param string $operation + * @param int $expiry + * @return string + * @author 倪宗锋 + */ + static function authCode($string, $operation = 'DECODE', $expiry = 0) + { + $key = 'udM5A8S50eg8veH15dd0m601de7073N8Bcn7d1I8Res7C7o7z274D6y342I4C7t7'; + $ckey_length = 4; // 随机密钥长度 取值 0-32; + // 加入随机密钥,可以令密文无任何规律,即便是原文和密钥完全相同,加密结果也会每次不同,增大破解难度。 + // 取值越大,密文变动规律越大,密文变化 = 16 的 $ckey_length 次方 + // 当此值为 0 时,则不产生随机密钥 + + $key = md5($key); + $keya = md5(substr($key, 0, 16)); + $keyb = md5(substr($key, 16, 16)); + $keyc = $ckey_length ? ($operation == 'DECODE' ? substr($string, 0, $ckey_length) : substr(md5(microtime()), -$ckey_length)) : ''; + + $cryptkey = $keya . md5($keya . $keyc); + $key_length = strlen($cryptkey); + + $string = $operation == 'DECODE' ? base64_decode(substr($string, $ckey_length)) : sprintf('%010d', $expiry ? $expiry + time() : 0) . substr(md5($string . $keyb), 0, 16) . $string; + $string_length = strlen($string); + + $result = ''; + $box = range(0, 255); + + $rndkey = array(); + for ($i = 0; $i <= 255; $i++) { + $rndkey[$i] = ord($cryptkey[$i % $key_length]); + } + + for ($j = $i = 0; $i < 256; $i++) { + $j = ($j + $box[$i] + $rndkey[$i]) % 256; + $tmp = $box[$i]; + $box[$i] = $box[$j]; + $box[$j] = $tmp; + } + + for ($a = $j = $i = 0; $i < $string_length; $i++) { + $a = ($a + 1) % 256; + $j = ($j + $box[$a]) % 256; + $tmp = $box[$a]; + $box[$a] = $box[$j]; + $box[$j] = $tmp; + $result .= chr(ord($string[$i]) ^ ($box[($box[$a] + $box[$j]) % 256])); + } + + if ($operation == 'DECODE') { + if ((substr($result, 0, 10) == 0 || substr($result, 0, 10) - time() > 0) && substr($result, 10, 16) == substr(md5(substr($result, 26) . $keyb), 0, 16)) { + return substr($result, 26); + } else { + return ''; + } + } else { + return $keyc . str_replace('=', '', base64_encode($result)); + } + + } + + /** + * Des: 生成二维码 + * Name: addQRCode + * @param $qCode string 生成的内容 + * @param $QRFile string 二维码图片路径 + * @param int $reType 1:返回成功或失败 2 返回图片数据流 + * @param bool|false $isCreate 生成的图片是否保留 当$reType=2才会有效 + * @param bool $logo 是否添加logo图 + * @param string $logoUrl logo图地址 + * @return array + * @author 倪宗锋 + */ + public static function addQRCode($qCode, $QRFile, $reType = 1, $isCreate = false, $logo = false, $logoUrl = '') + { + include ROOT_PATH . '/common/util/phpqrcode/phpqrcode.php'; + $value = $qCode;//二维码内容 + $errorCorrectionLevel = 'H';//容错级别 + $matrixPointSize = 6;//生成图片大小 + //生成二维码图片 + \QRcode::png($value, $QRFile, $errorCorrectionLevel, $matrixPointSize, 2); + $QR = imagecreatefromstring(file_get_contents($QRFile)); + if ($logo !== FALSE && $logoUrl != '') { + $logoUrl = imagecreatefromstring(file_get_contents($logoUrl)); + $QR_width = imagesx($QR);//二维码图片宽度 + $logo_width = imagesx($logoUrl);//logo图片宽度 + $logo_height = imagesy($logoUrl);//logo图片高度 + $logo_qr_width = $QR_width / 5; + $scale = $logo_width / $logo_qr_width; + $logo_qr_height = $logo_height / $scale; + $from_width = ($QR_width - $logo_qr_width) / 2; + //重新组合图片并调整大小 + imagecopyresampled($QR, $logoUrl, $from_width, $from_width, 0, 0, $logo_qr_width, + $logo_qr_height, $logo_width, $logo_height); + } + //只返回成功失败的话 则图片必须保存 + if ($reType == 1) { + @ImagePng($QR, $QRFile); + if (file_exists($QRFile)) { + return Util::returnArrSu(); + } + return Util::returnArrEr('图片生成失败!'); + } else { + //输出图片 + Header("Content-type: image/png"); + ImagePng($QR); + if ($isCreate == false) {//不保存图片则删除 + @unlink($QRFile); + } else {//保存则需图片再生成一次 + @ImagePng($QR, $QRFile); + } + die; + } + } + + /** + * Function Description:调用CS接口时的加密规则 + * Function Name: authCodeForCs + * + * @return string + * + * @author 娄梦宁 + */ + public static function authCodeForCs($request_time) + { + $siteConfig = static::getSiteConfig(); + $user = $siteConfig['adm_user']; + $user_key = $siteConfig['adm_user_key']; + //加密规则为 request_time(linux时间戳)前三位作为种子,调用srand生成随机数 + user + user_key,进行MD5加密后,换成大写字母 + $auth_code = strtoupper(md5(substr($request_time, 0, 3) . "|" . $user . "|" . $user_key . "|" . substr($request_time, strlen($request_time) - 3, 3))); + return $auth_code; + } + + /** + * Des:发送验证码 + * Name: sendMessage + * @param $msg + * @param $phone + * @return array + * @author 倪宗锋 + */ + public static function sendMessage($msg, $phone) + { + $siteConfig = static::getSiteConfig(); + $send_data = array(); + $send_data["account"] = "dh78301"; + $send_data["password"] = strtolower(md5("jGRk34B7")); + $send_data["sign"] = "【{$siteConfig['web_name']}】"; + $send_data["phones"] = $phone; + $send_data["content"] = $msg; + $url = 'http://www.dh3t.com/json/sms/Submit'; + $curlInterface = new CurlInterface($send_data, 1); + $result = $curlInterface->execute($url, 'POST'); + if (isset($result['result']) && $result['result'] == '0') { + return Util::returnArrSu('验证码发送成功'); + } + return Util::returnArrEr('验证码发送失败'); + } + + /** + * 检测是微信还是支付宝 1、微信 2、支付宝 + * @return string + */ + public static function checkWeChatOrAliPay() + { + $header = \Yii::$app->request->getHeaders(); + $user_agent = $header['user-agent']; + //判断是不是微信 + if (preg_match('/MicroMessenger/i', $user_agent)) { + return 1; + } + if (preg_match('/AlipayClient/i', $user_agent)) { + return 2; + } + return 3; + } + + /** + * Des:发送信息到RTX + * Name: sendMsgRTX + * @param string $receiverList + * @param $title + * @param $msg + * @author 倪宗锋 + */ + public static function sendMsgRTX($receiverList = 'nizf', $title, $msg) + { + $arr = array( + 'title' => $title . '【' . date('Y-m-d H:i:s', time()) . '】', + 'receiver' => $receiverList, + 'msg' => substr($msg, 0, 1024), + ); + $curl = new CurlInterface($arr, 5); + $curl->execute('http://180.168.4.58:8012/SendNotify.cgi', 'POST'); + } + + /** + * Des:调用蜘蛛出行接口 + * Name: interfaceZzcx + * @param $data array 传递参数 + * @param $url string 接口地址 + * @param $timeout int 超时秒数 + * @return array + * @author 倪宗锋 + */ + public static function interfaceZzcx($data, $url, $timeout = 0) + { + $time = time(); + $data['time'] = $time; + $param = [ + 'code' => Util::authCode(http_build_query($data), 'ENCODE'), + 'time' => $time + ]; + $curl = new CurlInterface($param, 4); + if ($timeout != 0) { + $curl->setTimeOut($timeout); + } + $siteConfig = Util::getSiteConfig(); + $return = $curl->execute($siteConfig['zzcx_host'] . $url, 'POST'); + return $return; + } + + /** + * Des:添加订单日志 + * Name: addOrderLog + * @param $uid + * @param $u_type + * @param $order_id + * @param $name + * @param $log_type + * @author 倪宗锋 + */ + public static function addOrderLog($uid, $u_type, $order_id, $name, $log_type) + { + $data = []; + $data['uid'] = $uid; + $data['u_type'] = $u_type; + $data['order_id'] = $order_id; + $data['name'] = $name; + $data['log_type'] = $log_type; + $url = '/zzcx/interfaces/fx/add-order-log'; + static::interfaceZzcx($data, $url); + } + + /** + * Des:添加用户操作日志 + * Name: addUserOrderLog + * @param $title string 标题 + * @param $memo string 内容 + * @param $uid int 用户ID + * @param $u_type int 1管理员,2分销商,3微信用户,4cs系统', + * @param $order_id string 订单ID + * @param $source_type 资源类型 1、产品,2、订单 + * @author 倪宗锋 + */ + public static function addUserOrderLog($title, $memo, $uid, $u_type, $order_id,$source_type) + { + $data = []; + $data['title'] = $title; + $data['memo'] = $memo; + $data['uid'] = $uid; + $data['u_type'] = $u_type; + $data['source_id'] = $order_id; + $data['source_type'] = $source_type; + $url = '/zzcx/interfaces/fx/add-user-log'; + static::interfaceZzcx($data, $url); + } +} \ No newline at end of file diff --git a/common/util/WeChatHtml.php b/common/util/WeChatHtml.php new file mode 100644 index 0000000..21eb59f --- /dev/null +++ b/common/util/WeChatHtml.php @@ -0,0 +1,234 @@ + + + + + + + + + + + + + + + 支付金额 + + + +
+
+ +
购买数量:
+
联系人:
+
手机号:
+
出游时间:
+
+

消费总额

+
+ ¥ +
+
+
+ +
+ + + + diff --git a/common/util/WeChatPay.php b/common/util/WeChatPay.php new file mode 100644 index 0000000..2705221 --- /dev/null +++ b/common/util/WeChatPay.php @@ -0,0 +1,307 @@ + $params['name'],//名称 + 'order_id' => (string)$params['order_id'],//支付ID + 'total_fee' => (string)$params['total_fee'] * 100,//总金 + 'notify_url' => $siteConfig['host_name'] . $params['notify_url'],//支付回调接口 + 'openid' => empty($params['openid']) ? '' : $params['openid'],//用户的OPENID + ); + $getPrepayId = $this->unifiedOrderForWeChat($data);//统一下单API + if ($getPrepayId['flag'] == false) { + return $getPrepayId; + } + //设置成功返回的结果数 + $wxPayConfig = static::getAuthWeChatConfig(); + $return = array( + 'appId' => $wxPayConfig['appid'],//微信�?放平台审核�?�过的应用APPID + 'package' => 'prepay_id=' . $getPrepayId['data']['prepay_id'],//微信返回的支付交易会话ID + 'nonceStr' => self::getNonceStr(),//随机字符�? + 'signType' => 'MD5', + 'timeStamp' => strval(time()),//当前时间�? + ); + $return['paySign'] = self::getSign($return); + return Util::returnArrSu('', array('payData' => $return, 'price' => $params['total_fee'])); + } + + /** + * Function Description:统一下单API + * Function Name: unifiedOrder + * @param $params array + * attach 附加数据,在查询API和支付知中原样返回,该字段主要用于商户携带订单的自定义数 + * line_name 线路名称 + * order_id 订单ID + * total_fee 总金 + * notify_url 回调地址 + * + * @return array + * + * @author nzf + */ + public function unifiedOrderForWeChat($params) + { + $wxPayConfig = static::getAuthWeChatConfig(); + $data = array( + 'appid' => $wxPayConfig['appid'],//微信开放平台审核过的应用APPID + 'attach' => empty($params['attach']) ? '' : $params['attach'], + 'body' => $params['name'],//产品名称 + 'mch_id' => $wxPayConfig['mch_id'],//商户微信支付分配的商户号 + 'nonce_str' => $this->getNonceStr(),//随机字符 + 'notify_url' => $params['notify_url'],//通知地址 + 'out_trade_no' => $params['order_id'],//商户订单ID加上当前时间 + 'spbill_create_ip' => $_SERVER['REMOTE_ADDR'],//用户端实际ip + 'total_fee' => $params['total_fee'],//订单总金额,单位为分 + 'trade_type' => empty($params['openid']) ? 'WAP' : 'JSAPI',//交易类型 + 'openid' => empty($params['openid']) ? '' : $params['openid'] + ); + $data['sign'] = $this->getSign($data);//交易签名 + $curl = new CurlInterface($data, 2);//函数 + $curl->setBaseUrl($this->unifiedOrderUrl); + $result = $curl->execute('', 'POST'); + if (empty($result['prepay_id'])) { + return Util::returnArrEr('预支付交易会话异常!'); + } + return Util::returnArrSu('', array('prepay_id' => $result['prepay_id'])); + } + /************************扫描支付**************************************/ + + /** + * Function Description:去微信下单并获取返回 + * Function Name: unifiedOrderByOrderId + * @param $par + * @return array + * + * @author nzf + */ + public function unifiedOrderByOrderIdForSao($par) + { + $siteConfig = Util::getSiteConfig(); + $notify_url = $siteConfig['host_name'] . $siteConfig['notify_url']; + $data = array( + 'name' => $par['name'],//线路名称 + 'order_id' => (string)$par['order_id'] . '_' . rand(100, 999),//订单ID + 'total_fee' => $par['total_fee'] * 100,//总金 + 'notify_url' => $notify_url + ); + $codUrl = $this->unifiedOrderForSao($data);//统一下单API + if ($codUrl['flag'] == false) { + return $codUrl; + } + //设置成功返回的结果数�? + $url = $siteConfig['host_name'] . '/fx/?r=weChat/we-chat/q-code&qCode=' . urlencode($codUrl['data']['code_url']) . '&_math=' . rand(100, 999); + return Util::returnArrSu('', array('codUrl' => $url, 'price' => $par['total_fee'])); + } + + /** + * Function Description:统一下单API + * Function Name: unifiedOrder + * @param $params array + * attach 附加数据,在查询API和支付知中原样返回,该字段主要用于商户携带订单的自定义数 + * line_name 线路名称 + * order_id 订单ID + * total_fee 总金 + * notify_url 回调地址 + * + * @return array + * + * @author 倪宗�? + */ + public function unifiedOrderForSao($params) + { + $wxPayConfig = static::getAuthWeChatConfig(); + $data = array( + 'appid' => $wxPayConfig['appid'],//微信�?放平台审核�?�过的应用APPID + 'mch_id' => $wxPayConfig['mch_id'],//商户�? 微信支付分配的商户号 + 'nonce_str' => $this->getNonceStr(),//随机字符�? + 'body' => $params['name'],//线路名称 �? 上订单ID + 'out_trade_no' => $params['order_id'],//商户订单ID加上当前时间 + 'total_fee' => $params['total_fee'],//订单总金额,单位为分 + 'spbill_create_ip' => $_SERVER['REMOTE_ADDR'],//用户端实际ip + 'notify_url' => $params['notify_url'],//通知地址 + 'trade_type' => 'NATIVE',//交易类型 + ); + $data['sign'] = $this->getSign($data);//交易签名 + $curl = new CurlInterface($data, 2);//函数�? + $curl->setBaseUrl($this->unifiedOrderUrl); + $result = $curl->execute('', 'POST'); + if (empty($result['prepay_id'])) { + return Util::returnArrEr('预支付交易会话异常!'); + } + return Util::returnArrSu('', array('prepay_id' => $result['prepay_id'], 'code_url' => $result['code_url'])); + } + + /***************************************退款****************************************/ + + /** + * Des:微信退款接口 + * Name: cancelOrder + * @param $params + * @return array + * @author 倪宗锋 + */ + public static function cancelOrder($params) + { + $config = static::getAuthWeChatConfig(); + $arr = array( + 'appid' => $config['appid'], + 'mch_id' => $config['mch_id'], + 'nonce_str' => static::getNonceStr(), + 'out_trade_no' => (string)$params['order_id'],//订单ID + 'out_refund_no' => (string)date('YmdHis') . rand(100, 999),//退款ID + 'total_fee' => (string)$params['total_fee'] * 100,//订单总金额 元 + 'refund_fee' => (string)$params['refund_fee'] * 100,//退款金额 元 + 'op_user_id' => $config['mch_id'] + ); + $arr['sign'] = static::getSign($arr); + $curl = new CurlInterface($arr, 2);//函数类 + $curl->setCert($config); + $curl->setBaseUrl('https://api.mch.weixin.qq.com/secapi/pay/refund'); + $result = $curl->execute('', 'POST'); + if ($result['return_code'] == 'SUCCESS' && $result['result_code'] == 'SUCCESS') { + return Util::returnArrSu(); + } + $msg = $result['return_msg']; + if ($msg == 'OK') { + $msg = $result['err_code_des']; + } + return Util::returnArrEr('退款失败!' . $msg); + + } + + + /*************************************通用方法**************************************/ + public static function checkIsPay($orderId) + { + $config = static::getAuthWeChatConfig(); + $arr = array( + 'appid' => $config['appid'], + 'mch_id' => $config['mch_id'], + 'out_trade_no' => (string)$orderId,//订单ID + 'nonce_str' => static::getNonceStr(), + ); + $arr['sign'] = static::getSign($arr); + $curl = new CurlInterface($arr, 2);//函数类 + $curl->setCert($config); + $curl->setBaseUrl('https://api.mch.weixin.qq.com/pay/orderquery'); + $result = $curl->execute('', 'POST'); + if ($result['return_code'] == 'SUCCESS' && $result['result_code'] == 'SUCCESS') { + return Util::returnArrSu('', $result); + } + $msg = $result['return_msg']; + if ($msg == 'OK') { + $msg = $result['err_code_des']; + } + return Util::returnArrEr('退款失败!' . $msg); + } + + /** + * Function Description:获取签名 + * Function Name: getSign + * @param $params + * @return string + * + * @author nzf + */ + public static function getSign($params) + { + if (isset($params['sign'])) { + unset($params['sign']); + } + $config = static::getAuthWeChatConfig(); + //签名步骤按字典序排序参 + ksort($params); + $string = self::ToUrlParams($params); + //签名步骤二:在string后加入KEY + $string = $string . "&key=" . $config['key']; + //签名步骤三:MD5加密 + $string = md5($string); + //签名步骤四:有字符转为大 + $result = strtoupper($string); + return $result; + + } + + /** + * Function Description:格式化参�? 格式化成url参数 + * Function Name: ToUrlParams + * @param $params + * + * @return string + * + * @author 倪宗�? + */ + public static function ToUrlParams($params) + { + $buff = ""; + foreach ($params as $k => $v) { + if ($k != "sign" && $v != "" && !is_array($v)) { + $buff .= $k . "=" . $v . "&"; + } + } + $buff = trim($buff, "&"); + return $buff; + } + + /** + * Function Description:产生的随机字符串 不长 + * Function Name: getNonceStr + * @param int $length + * + * @return string + * + * @author 倪宗�? + */ + public static function getNonceStr($length = 32) + { + $chars = "abcdefghijklmnopqrstuvwxyz0123456789"; + $str = ""; + for ($i = 0; $i < $length; $i++) { + $str .= substr($chars, mt_rand(0, strlen($chars) - 1), 1); + } + return $str; + } + + /** + * Des:获取登录授权微信配置 + * Name: getEntryAuthWeChatConfig + * @author 倪宗锋 + */ + public static function getAuthWeChatConfig() + { + $weChatConfig = Util::getWeChatConfig(); + $siteConfig = Util::getSiteConfig(); + return $weChatConfig[$siteConfig['entryAuthWeChat']]; + } + +} \ No newline at end of file diff --git a/common/util/WeChatService.php b/common/util/WeChatService.php new file mode 100644 index 0000000..544d312 --- /dev/null +++ b/common/util/WeChatService.php @@ -0,0 +1,721 @@ +token = $wxConfig['token']; + $this->appid = $wxConfig['appid']; + $this->appsecret = $wxConfig['appsecret']; + $this->setLog(date('Y-m-d H:i:s')); + } + + /** + * Des:接收参数并处理返回值 + * Name: exec + * @return string + * @author 倪宗锋 + */ + public function exec() + { + $content = $this->getContent();//获取参数并解析 + + if ($content['MsgType'] == 'text') { + $this->response = $this->textMsg($content); + } elseif ($content['MsgType'] == 'event') { + $this->response = $this->eventMsg($content); + } + return $this->response; + } + + /** + * Des:用户输入内容处理 + * Name: textMsg + * @param $content + * @return bool|string + * @author 倪宗锋 + */ + public function textMsg($content) + { + $textTpl = '' . " + + + +%s + +"; + $resultStr = sprintf($textTpl, $content['FromUserName'], $content['ToUserName'], time()); + return $resultStr; + $word = $content['Content']; + return $this->send($word, $content, 'text'); + } + + /** + * Des:推送事件处理 + * Name: eventMsg + * @param $content + * @return string + * @author 倪宗锋 + */ + public function eventMsg($content) + { + if ($content['Event'] == 'subscribe') {//微信关注事件 发送欢迎语 + $word = 'subscribe'; + } elseif ($content['Event'] == 'unsubscribe') {//微信关注事件 发送欢迎语 + $word = 'unsubscribe'; + } else if (empty($content['EventKey'])) { + return false; + } else { + $word = $content['EventKey']; + } + return $this->send($word, $content, 'event'); + + } + + /** + * Des: 发送处理 + * Name: send + * @param $word + * @param $content + * @param string $type 触发类型:text用户输入 event推送事件 + * @return string + * @author 倪宗锋 + */ + public function send($word, $content, $type = 'text') + { + $weChatPayConfig = WeChatPay::getAuthWeChatConfig(); + $textConfig = require ROOT_PATH . '/common/config/wechatConfig/wxInterface/' . $weChatPayConfig['mch_id'] . '/Wx.' . $type . '.config.php'; + if (empty($textConfig[$word]) == false) { + $msgSend = $textConfig[$word]; + } else if ($type == 'text') { + $msgSend = $textConfig['default']; + } else { + return false; + } + $this->setLog('sendMsg:' . print_r($msgSend, 1)); +// if (is_array($msgSend) && empty($msgSend['function']) == false) {//当推送事件有方法指定时,则调用该方法 +// $wxDoFunction = new WxDoFunction(); +// $function = $msgSend['function']; +// $wxDoFunction->$function($content); +// } + if (isset($msgSend['type']) && $msgSend['type'] == 'news') {//如果是图文类型 + return $this->sendNews($content, $msgSend['id']); + } elseif (isset($msgSend['type']) && $msgSend['type'] == 'img') {//如果是图片类型 + return $this->sendImage($content, $msgSend['id']); + } elseif (isset($msgSend['type']) && $msgSend['type'] == 'voice') {//如果是语音类型 + return $this->sendVoice($content, $msgSend['id']); + } elseif (isset($msgSend['type']) && $msgSend['type'] == 'video') {//如果是视频类型 + return $this->sendVideo($content, $msgSend); + } else {//否则是文字信息 + return $this->sendText($content, $msgSend); + } + } + + /** + * Des:发送文字 + * Name: sendText + * @param $content + * @param $msgSend + * @return string + * @author 倪宗锋 + */ + private function sendText($content, $msgSend) + { + $textTpl = '' . " + + + +%s + + +"; + $msgType = "text"; + if (is_array($msgSend)) { + $msgSend = $msgSend['text']; + } + $resultStr = sprintf($textTpl, $content['FromUserName'], $content['ToUserName'], time(), $msgType, $msgSend); + return $resultStr; + } + + /** + * Des:发送图文 + * Name: sendNews + * @param $content array + * @param $mediaId string 素材图文 ID + * @return string + * @author 倪宗锋 + */ + private function sendNews($content, $mediaId) + { + $news = $this->getNewsByMediaId($mediaId); + return $this->transmitNews($content, $news); + } + + /** + * Des:发送图片 + * Name: sendImage + * @param $content + * @param $mediaId + * @return string + * @author 倪宗锋 + */ + private function sendImage($content, $mediaId) + { + $xmlTpl = '' . " + + +%s + + + + + "; + $result = sprintf($xmlTpl, $content['FromUserName'], $content['ToUserName'], time(), $mediaId); + return $result; + } + + /** + * Des:发送语音 + * Name: sendVoice + * @param $content + * @param $mediaId + * @return string + * @author 倪宗锋 + */ + private function sendVoice($content, $mediaId) + { + $xmlTpl = '' . " + + +%s + + + + +"; + $result = sprintf($xmlTpl, $content['FromUserName'], $content['ToUserName'], time(), $mediaId); + return $result; + } + + /** + * Des:发送视频 + * Name: sendVideo + * @param $content + * @param $sendMsg + * @return string + * @author 倪宗锋 + */ + private function sendVideo($content, $sendMsg) + { + $xmlTpl = '' . " + + +%s + + +"; + $result = sprintf($xmlTpl, $content['FromUserName'], $content['ToUserName'], time(), $sendMsg['id'], $sendMsg["title"], $sendMsg["des"]); + return $result; + } + + /** + * Des:根据ID获取图文信息 + * Name: getNewsByMediaId + * @param $data_media_id + * @return array + * @author 倪宗锋 + */ + public function getNewsByMediaId($data_media_id) + { + $data_media_id = '{"media_id":"' . $data_media_id . '"}'; + $url = "https://api.weixin.qq.com/cgi-bin/material/get_material?access_token=" . $this->getAccessToken(); + $response = $this->_requestPost($url, $data_media_id); + $media = json_decode($response, true); + $mediaArray = $media['news_item']; + $content = array(); + foreach ($mediaArray as $k => $v) { + if ($k == 0 || $k == 1) + $content[] = array("Title" => $v['title'], "Description" => $v['digest'], "PicUrl" => $v['thumb_url'], "Url" => $v['url']); + elseif ($k == 2) { + $content[] = array("Title" => $v['title'], "Description" => $v['digest'], "PicUrl" => $v['thumb_url'], "Url" => $v['content_source_url']); + } else + $content[] = array("Title" => $v['title'], "Description" => $v['digest'], "PicUrl" => $v['thumb_url'], "Url" => $v['content_source_url']); + } + return $content; + } + + /** + * Des:图文推送数据处理 + * Name: transmitNews + * @param $content + * @param $newsArray + * @return string + * @author 倪宗锋 + */ + private function transmitNews($content, $newsArray) + { + if (!is_array($newsArray)) { + return ''; + } + $itemTpl = '' . "<![CDATA[%s]]> + + +"; + $item_str = ""; + foreach ($newsArray as $item) { + $item_str .= sprintf($itemTpl, $item['Title'], $item['Description'], $item['PicUrl'], $item['Url']); + } + $xmlTpl = '' . " + + +" . time() . " + +" . count($newsArray) . " +$item_str +"; +// $result = sprintf($xmlTpl, $content['FromUserName'], $content['ToUserName'], time(), count($newsArray)); + return $xmlTpl; + } + + /*************************=========第一次请求校验==========***********************************/ + /** + * Des:第一次校验 + * Name: valid + * @return bool + * @author 倪宗锋 + */ + public function valid() + { + $echoStr = $_GET["echostr"]; + if ($this->checkSignature()) { + $this->response = $echoStr; + } + return $this->response; + } + + /***********************************通用函数*******************************************************/ + /** + * Des:根据openid获取用户信息 + * Name: getUserInfoByOpenid + * @param $openid + * @return array + * @author 倪宗锋 + */ + public static function getUserInfoByOpenid($openid) + { + $token = static::getAccessToken(); + $userInfo = static::getWeChatInfo($openid, $token); + return $userInfo; + } + + /** + * Des:获取微信用户信息 + * Name: getWeChatInfo + * @param $openid + * @param $accessToken string 基础公共access_token + * @return array + * @author 倪宗锋 + */ + public static function getWeChatInfo($openid, $accessToken) + { + $query = array( + 'access_token' => $accessToken, + 'openid' => $openid, + 'lang' => 'zh_CN' + ); + $url = "https://api.weixin.qq.com/cgi-bin/user/info?"; + $url .= http_build_query($query); + $curl = new CurlInterface('', 4); + $arr = $curl->execute($url); + $return = [ + 'nickname' => $arr['nickname'], + 'headimgurl' => $arr['headimgurl'], + 'sex' => $arr['sex'], + 'country' => $arr['country'], + 'city' => $arr['city'], + 'province' => $arr['province'] + ]; + return $return; + } + + /** + * Des: + * Name: getAuthWeChatInfo + * @param $openid + * @param $accessToken string 授权获取的accessToken + * @return array + * @author 倪宗锋 + */ + public static function getAuthWeChatInfo($openid, $accessToken) + { + $query = array( + 'access_token' => $accessToken, + 'openid' => $openid, + 'lang' => 'zh_CN' + ); + $url = "https://api.weixin.qq.com/sns/userinfo?"; + $url .= http_build_query($query); + $curl = new CurlInterface('', 4); + $arr = $curl->execute($url); + $return = [ + 'nickname' => $arr['nickname'], + 'headimgurl' => $arr['headimgurl'], + 'sex' => $arr['sex'], + 'country' => $arr['country'], + 'city' => $arr['city'], + 'province' => $arr['province'] + ]; + return $return; + } + + /** + * Des:数据校验 + * Name: checkSignature + * @return bool + * @author 倪宗锋 + */ + private function checkSignature() + { + $token = $this->token; + $signature = isset($_GET["signature"]) ? $_GET["signature"] : ""; + $timestamp = isset($_GET["timestamp"]) ? $_GET["timestamp"] : ""; + $nonce = isset($_GET["nonce"]) ? $_GET["nonce"] : ""; + $tmpArr = array($token, $timestamp, $nonce); + $this->setLog('param:' . print_r($tmpArr, 1)); + sort($tmpArr, SORT_STRING); + $tmpStr = implode($tmpArr); + $tmpStr = sha1($tmpStr); + if ($tmpStr == $signature) { + return true; + } else { + return false; + } + } + + + /** + * Des:参数解析 + * Name: getContent + * @author 倪宗锋 + */ + private function getContent() + { + $content = file_get_contents("php://input"); + $this->setLog('content: ' . print_r($content, 1)); + libxml_disable_entity_loader(true); + $this->request = (array)simplexml_load_string($content, 'SimpleXMLElement', LIBXML_NOCDATA); + return $this->request; + } + + /** + * Des:获取token + * Name: getAccessToken + * @return string + * @author 倪宗锋 + */ + public static function getAccessToken() + { + $wxConfig = WeChatPay::getAuthWeChatConfig(); + $appid = $wxConfig['appid']; + $appsecret = $wxConfig['appsecret']; + $time = time(); + $data['appid'] = $appid; + $data['appsecret'] = $appsecret; + $data['time'] = $time; + $param = [ + 'code' => Util::authCode(http_build_query($data), 'ENCODE'), + 'time' => $time + ]; + $curl = new CurlInterface($param, 4); + $siteConfig = Util::getSiteConfig(); + $return = $curl->execute($siteConfig['wx_get_token'] . '/zzcx/interfaces/fx/get-wx-token', 'POST'); + return $return; + + } + + /** + * Function Description:根据code获取token + * Function Name: getToken + * @param $code + * + * @return array + * + * @author 倪宗锋 + */ + public static function getToken($code) + { + $WxPayConfig = WeChatPay::getAuthWeChatConfig(); + $siteConfig = Util::getSiteConfig(); + $urlObj["appid"] = $WxPayConfig['appid']; + $urlObj["secret"] = $WxPayConfig['appsecret']; + $urlObj["code"] = $code; + $urlObj["grant_type"] = "authorization_code"; + $bizString = http_build_query($urlObj); + $url = $siteConfig['authTokenUrl'] . $bizString; + $curlInterface = new CurlInterface('', 4); + $curlInterface->setBaseUrl($url); + $getToken = $curlInterface->execute('', 'GET'); + if (empty($getToken['openid'])) { + return Util::returnArrEr('参数无效!'); + } + return Util::returnArrSu('', $getToken); + } + + /** + * Des:发起get请求 + * Name: _requestGet + * @param $url string + * @param bool|true $ssl + * @return bool|mixed + * @author 倪宗锋 + */ + public static function _requestGet($url, $ssl = true) + { + $curl = curl_init(); + curl_setopt($curl, CURLOPT_URL, $url); + curl_setopt($curl, CURLOPT_AUTOREFERER, true); + if ($ssl) { + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2); + } + curl_setopt($curl, CURLOPT_HEADER, false); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); + $response = curl_exec($curl); + if ($response === false) { + return false; + } + return $response; + } + + /** + * Des:发起post请求 + * Name: _requestPost + * @param $url + * @param $data + * @param bool|true $ssl + * @return bool|mixed + * @author 倪宗锋 + */ + public static function _requestPost($url, $data, $ssl = true) + { + $curl = curl_init(); + curl_setopt($curl, CURLOPT_URL, $url); + $user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''; + curl_setopt($curl, CURLOPT_USERAGENT, $user_agent); + curl_setopt($curl, CURLOPT_AUTOREFERER, true); + if ($ssl) { + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1); + } + curl_setopt($curl, CURLOPT_POST, true); + curl_setopt($curl, CURLOPT_POSTFIELDS, $data); + curl_setopt($curl, CURLOPT_HEADER, false); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); + $response = curl_exec($curl); + if ($response === false) { + return false; + } + return $response; + } + + /** + * Des:获取 + * Name: httpRequest + * @param $url + * @param null $data + * @return mixed + * @author 倪宗锋 + */ + static function httpRequest($url, $data = null) + { + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); + if (!empty($data)) { + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, $data); + } + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + $output = curl_exec($ch); + curl_close($ch); + return $output; + } + + + public function setLog($logMsg) + { + $logMsg = str_replace(PHP_EOL, '', $logMsg); + $logMsg = preg_replace("/\s(?=\s)/", "\\1", $logMsg); + $this->logMsg .= $logMsg . PHP_EOL; + } + + /** + * 项目关闭 写入日志 + */ + public function __destruct() + { + $this->setLog(print_r($this->response, 1));//写入返回值 + $fileName = APP_PATH . '/log/WXLog/wxinterface' . date('Y-m-d') . '.log'; + file_put_contents($fileName, $this->logMsg . PHP_EOL, FILE_APPEND); + } + + /** + * Des:获取 扫一扫二维码地址 + * Name: getSaoCode + * @param $fxUid + * @return string + * @author 倪宗锋 + */ + public static function getSaoCode($fxUid) + { + $siteConfig = Util::getSiteConfig(); + Util::setSiteConfig(['entryAuthWeChat' => $siteConfig['wxWeChat']]); + if (empty($fxUid)) { + return 'id不能为空!'; + } + $token = static::getAccessToken(); + $url = "https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=" . $token; + $data = array( + 'action_name' => 'QR_LIMIT_SCENE', + 'action_info' => array( + 'scene' => array( + 'scene_id' => $fxUid + ) + ) + ); + $inface = new CurlInterface($data); + $inface->setBaseUrl($url); + $return = $inface->execute('', 'POST'); + if (empty($return['ticket']) == false) { + $url = 'https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=' . $return['ticket']; + } else { + $url = ''; + } + return $url; + } + + /** + * Des:获取分销二维码 + * Name: getFxQrCode + * @param $fx_uid + * @return array + * @author 倪宗锋 + */ + public static function getFxQrCode($fx_uid) + { + try { + $config = Util::getSiteConfig(); + $imgUrl = ROOT_PATH . '/web/fx/images/FxQrCode/' . $fx_uid . '.jpg'; + $showUrl = $config['host_name'] . '/web/fx/images/FxQrCode/' . $fx_uid . '.jpg'; + if (file_exists($imgUrl)) { + return Util::returnArrSu('', array('url' => $showUrl)); + } + $codeId = intval($fx_uid) + 50000; + $wxCodeUrl = static::getSaoCode($codeId); + $getCodeInfo = static::getWxImgInfo($wxCodeUrl); + $local = fopen($imgUrl, 'w'); + if (false !== $local) { + if (false !== fwrite($local, $getCodeInfo['body'])) { + fclose($local); + } + } + if (file_exists($imgUrl)) { + return Util::returnArrSu('', array('url' => $showUrl)); + } + } catch (Exception $e) { + } + return Util::returnArrEr('生成二维码失败!'); + } + + public static function getFxNewQrCode($fx_uid) + { + try { + $config = Util::getSiteConfig(); + include ROOT_PATH . '/common/util/phpqrcode/phpqrcode.php'; + $QRFile = ROOT_PATH . '/web/fx/images/FxQrCode/' . $fx_uid . 'new.png'; + $showUrl = $config['host_name'] . '/web/fx/images/FxQrCode/' . $fx_uid . 'new.png'; + if (file_exists($QRFile)) { + return Util::returnArrSu('', array('url' => $showUrl)); + } + $value = $config['zzcx_host'].$config['wx_home']."&fx_uid=".$fx_uid;//二维码内容 + $errorCorrectionLevel = 'H';//容错级别 + $matrixPointSize = 6;//生成图片大小 + //生成二维码图片 + $logo = false; + \QRcode::png($value, $QRFile, $errorCorrectionLevel, $matrixPointSize, 2); + $QR = imagecreatefromstring(file_get_contents($QRFile)); + if ($logo !== FALSE) { + $logo = imagecreatefromstring(file_get_contents($logo)); + $QR_width = imagesx($QR);//二维码图片宽度 + $logo_width = imagesx($logo);//logo图片宽度 + $logo_height = imagesy($logo);//logo图片高度 + $logo_qr_width = $QR_width / 5; + $scale = $logo_width / $logo_qr_width; + $logo_qr_height = $logo_height / $scale; + $from_width = ($QR_width - $logo_qr_width) / 2; + //重新组合图片并调整大小 + imagecopyresampled($QR, $logo, $from_width, $from_width, 0, 0, $logo_qr_width, + $logo_qr_height, $logo_width, $logo_height); + } + if (file_exists($QRFile)) { + return Util::returnArrSu('', array('url' => $showUrl)); + } + } catch (Exception $e) { + print_r($e->getMessage());die; + } + return Util::returnArrEr('生成二维码失败!'); + } + /** + * Des:获取微信二维码数据流 + * Name: getWxImgInfo + * @param $wxCodeUrl + * @return array + * @author 倪宗锋 + */ + public static function getWxImgInfo($wxCodeUrl) + { + $ch = curl_init($wxCodeUrl); + curl_setopt($ch, CURLOPT_HEADER, 0); + curl_setopt($ch, CURLOPT_NOBODY, 0); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + $package = curl_exec($ch); + $httpInfo = curl_getinfo($ch); + curl_close($ch); + return array_merge(['body' => $package], ['header' => $httpInfo]); + } + +} \ No newline at end of file diff --git a/common/util/curl/CsCurl.php b/common/util/curl/CsCurl.php new file mode 100644 index 0000000..1c1aed9 --- /dev/null +++ b/common/util/curl/CsCurl.php @@ -0,0 +1,232 @@ + Util::authCodeForCs($time), + 'user_key' => $siteConfig['adm_user_key'], + 'user' => $siteConfig['adm_user'], + 'user_id' => $siteConfig['adm_user_id'], + 'request_time' => $time, + 'action' => 'get_run_ticket_array_by_date_line', + 'line_id' => $line_id, + 'run_date' => $date, + ]; + $curlInterface = new CurlInterface($send_data, 4); + $curlInterface->setBaseUrl(''); + $ticket_arr_cs = $curlInterface->execute($siteConfig['adm_host1'] . '/api/nfx', 'POST'); + if ($ticket_arr_cs['code'] == 0) { + return Util::returnArrSu('', $ticket_arr_cs['data']); + } + return Util::returnArrEr('当前日期所有票已售完!'); + } + + /** + * Des:获取新路某天的各班次及票库存数据 + * Name: getGoBusStockForLine + * @param $start_area_id + * @param $end_area_id + * @param $date + * @return array + * @author 倪宗锋 + */ + public static function getGoBusStockForArea($start_area_id, $end_area_id, $date) + { + $time = time(); + $siteConfig = Util::getSiteConfig(); + $send_data = [ + 'auth_code' => Util::authCodeForCs($time), + 'user_key' => $siteConfig['adm_user_key'], + 'user' => $siteConfig['adm_user'], + 'user_id' => $siteConfig['adm_user_id'], + 'request_time' => $time, + 'action' => 'get_run_ticket_array_by_date_area', + 'start_area_id' => $start_area_id, + 'end_area_id' => $end_area_id, + 'run_date' => $date, + ]; + $curlInterface = new CurlInterface($send_data, 4); + $curlInterface->setBaseUrl(''); + $ticket_arr_cs = $curlInterface->execute($siteConfig['adm_host1'] . '/api/nfx', 'POST'); + if ($ticket_arr_cs['code'] == 0) { + return Util::returnArrSu('', $ticket_arr_cs['data']); + } + return Util::returnArrEr('当前日期所有票已售完!'); + } + + /** + * Des:获取主线路库存 + * Name: getLineSaleDate + * @param string $line_id + * @param string $start_area_id + * @param string $end_area_id + * @return array + * @author 倪宗锋 + */ + public static function getLineSaleDate($line_id = '', $start_area_id = '', $end_area_id = '') + { + $time = time(); + $siteConfig = Util::getSiteConfig(); + $send_data = [ + 'auth_code' => Util::authCodeForCs($time), + 'user_key' => $siteConfig['adm_user_key'], + 'user' => $siteConfig['adm_user'], + 'user_id' => $siteConfig['adm_user_id'], + 'request_time' => $time, + 'action' => 'get_area_available_date_array', + 'start_area_id' => $start_area_id, + 'end_area_id' => $end_area_id, + 'line_id' => $line_id + ]; + $curlInterface = new CurlInterface($send_data, 4); + $curlInterface->setBaseUrl(''); + $ticket_arr_cs = $curlInterface->execute($siteConfig['adm_host1'] . '/api/nfx', 'POST'); + if (isset($ticket_arr_cs['code']) && $ticket_arr_cs['code'] == 0) { + return Util::returnArrSu('', ['list' => $ticket_arr_cs['data']]); + } + return Util::returnArrSu('', ['list' => []]); + } + + + /** + * Des:根据票种获取库存日历 + * Name: getBusSaleDate + * @param $ticket_id + * @return array + * @author 倪宗锋 + */ + public static function getBusSaleDate($ticket_id) + { + $time = time(); + $siteConfig = Util::getSiteConfig(); + $send_data = [ + 'auth_code' => Util::authCodeForCs($time), + 'user_key' => $siteConfig['adm_user_key'], + 'user' => $siteConfig['adm_user'], + 'user_id' => $siteConfig['adm_user_id'], + 'request_time' => $time, + 'action' => 'get_ticket_available_date_array', + 'ticket_id' => $ticket_id, + ]; + $curlInterface = new CurlInterface($send_data, 4); + $curlInterface->setBaseUrl(''); + $ticket_arr_cs = $curlInterface->execute($siteConfig['adm_host1'] . '/api/nfx', 'POST'); + if ($ticket_arr_cs['code'] == 0) { + return Util::returnArrSu('', ['list' => $ticket_arr_cs['data']]); + } + return Util::returnArrSu('', ['list' => []]); + } + + /** + * Des:获取巴士自由行底价 + * Name: getProdPrice + * @param $params + * @return array + * @author 倪宗锋 + */ + public static function getFreeWalkPrice($params) + { + $time = time(); + $siteConfig = Util::getSiteConfig(); + $send_data = [ + 'auth_code' => Util::authCodeForCs($time), + 'user_key' => $siteConfig['adm_user_key'], + 'user' => $siteConfig['adm_user'], + 'user_id' => $siteConfig['adm_user_id'], + 'request_time' => $time, + 'sign' => $params['sign'], + 'org_id' => 164, + 'action' => 'get_tourist_pay_total', + 'prod_arr' => json_encode($params['prod_arr']), + 'date' => $params['start_date'] + ]; + $curlInterface = new CurlInterface($send_data, 4); + $curlInterface->setBaseUrl(''); + $getPrice = $curlInterface->execute($siteConfig['adm_host1'] . '/api/wx', 'POST'); + if ($getPrice['code'] == 0) { + $total_cost = ceil($getPrice['list']['extra_info']['total_cost']);//低价 + $total_money = ceil($getPrice['list']['total_money']);//零售价 + return Util::returnArrSu('', ['total_cost' => $total_cost, 'total_money' => $total_money]); + } + return Util::returnArrEr('获取底价失败!'); + } + + + /** + * Des:获取酒店底价 + * Name: getHotelLowPrice + * @param $order_id + * @return array + * @author 倪宗锋 + */ + public static function getHotelLowPrice($order_id) + { + $orderMain = new OrderMain(); + $params = $orderMain->getHotelOrderInfo($order_id); + $roomPrices = json_decode($params['total_details'], true); + foreach ($roomPrices as &$val) { + $val['RunDate'] = $val['date']; unset($val['date']); + $val['Price'] = $params['prod_cnt'] * $val['price'];unset($val['price']); + } + $time = time(); + $siteConfig = Util::getSiteConfig(); + $data = [ + 'auth_code' => Util::authCodeForCs($time), + 'user_key' => $siteConfig['adm_user_key'], + 'user' => $siteConfig['adm_user'], + 'user_id' => $siteConfig['adm_user_id'], + 'CreateUserID' => $siteConfig['adm_user_id'], + 'DistribID' => 164, + 'request_time' => $time, + 'HotelID' => $params['hotel_id'], + 'RoomID' => $params['room_id'], + 'RoomNum' => $params['prod_cnt'], + 'CheckIn' => $params['start_date'], + 'CheckOut' => $params['end_date'], + 'RoomPrices' => $roomPrices, + 'IfCheckPrice' => 0, + 'org_id' => 164, + ]; + $curlInterface = new CurlInterface($data, 4); + $curlInterface->setBaseUrl(''); + $getPrice = $curlInterface->execute($siteConfig['adm_host1'] . '/hotel/api/get-low-price', 'POST'); + if ($getPrice['code'] == 0) { + $total_cost = floatval($getPrice['data']['low_price']);//低价 + return Util::returnArrSu('', ['total_cost' => $total_cost]); + } + return Util::returnArrEr('获取底价失败!'); + } +} \ No newline at end of file diff --git a/common/util/phpqrcode/CHANGELOG b/common/util/phpqrcode/CHANGELOG new file mode 100644 index 0000000..a6c53d2 --- /dev/null +++ b/common/util/phpqrcode/CHANGELOG @@ -0,0 +1,38 @@ +* 1.0.0 build 2010031920 + + - first public release + - help in readme, install + - cleanup ans separation of QRtools and QRspec + - now TCPDF binding requires minimal changes in TCPDF, having most of job + done in QRtools tcpdfBarcodeArray + - nicer QRtools::timeBenchmark output + - license and copyright notices in files + - indent cleanup - from tab to 4spc, keep it that way please :) + - sf project, repository, wiki + - simple code generator in index.php + +* 1.1.0 build 2010032113 + + - added merge tool wich generate merged version of code + located in phpqrcode.php + - splited qrconst.php from qrlib.php + +* 1.1.1 build 2010032405 + + - patch by Rick Seymour allowing saving PNG and displaying it at the same time + - added version info in VERSION file + - modified merge tool to include version info into generated file + - fixed e-mail in almost all head comments + +* 1.1.2 build 2010032722 + + - full integration with TCPDF thanks to Nicola Asuni, it's author + - fixed bug with alphanumeric encoding detection + +* 1.1.3 build 2010081807 + + - short opening tags replaced with standard ones + +* 1.1.4 build 2010100721 + + - added missing static keyword QRinput::check (found by Luke Brookhart, Onjax LLC) diff --git a/common/util/phpqrcode/INSTALL b/common/util/phpqrcode/INSTALL new file mode 100644 index 0000000..945c95a --- /dev/null +++ b/common/util/phpqrcode/INSTALL @@ -0,0 +1,67 @@ +== REQUIREMENTS == + + * PHP5 + * PHP GD2 extension with JPEG and PNG support + +== INSTALLATION == + +If you want to recreate cache by yourself make sure cache directory is +writable and you have permisions to write into it. Also make sure you are +able to read files in it if you have cache option enabled + +== CONFIGURATION == + +Feel free to modify config constants in qrconfig.php file. Read about it in +provided comments and project wiki page (links in README file) + +== QUICK START == + +Notice: probably you should'nt use all of this in same script :) + +encode('PHP QR Code :)'); +QRspec::debug($tab, true); + +== TCPDF INTEGRATION == + +Inside bindings/tcpdf you will find slightly modified 2dbarcodes.php. +Instal phpqrcode liblaty inside tcpdf folder, then overwrite (or merge) +2dbarcodes.php + +Then use similar as example #50 from TCPDF examples: + + true, + 'padding' => 4, + 'fgcolor' => array(0,0,0), + 'bgcolor' => false, //array(255,255,255) +); + +//code name: QR, specify error correction level after semicolon (L,M,Q,H) +$pdf->write2DBarcode('PHP QR Code :)', 'QR,L', '', '', 30, 30, $style, 'N'); diff --git a/common/util/phpqrcode/LICENSE b/common/util/phpqrcode/LICENSE new file mode 100644 index 0000000..31afd6d --- /dev/null +++ b/common/util/phpqrcode/LICENSE @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/common/util/phpqrcode/QrCode.php b/common/util/phpqrcode/QrCode.php new file mode 100644 index 0000000..e029693 --- /dev/null +++ b/common/util/phpqrcode/QrCode.php @@ -0,0 +1,15 @@ + +// http://phpqrcode.sourceforge.net/ +// https://sourceforge.net/projects/phpqrcode/ +// +// The "PHP QR Code encoder" is based on +// "C libqrencode library" (ver. 3.1.1) +// License: GNU-LGPL 2.1 +// Copyright (C) 2006-2010 by Kentaro Fukuchi +// http://megaui.net/fukuchi/works/qrencode/index.en.html +// +// Reed-Solomon code encoder is written by Phil Karn, KA9Q. +// Copyright (C) 2002-2006 Phil Karn, KA9Q +// +// QR Code is registered trademark of DENSO WAVE INCORPORATED +// http://www.denso-wave.com/qrcode/index-e.html +// --------------------------------------------------------- +// +// Author: Nicola Asuni +// +// (c) Copyright 2010: +// Nicola Asuni +// Tecnick.com S.r.l. +// Via della Pace, 11 +// 09044 Quartucciu (CA) +// ITALY +// www.tecnick.com +// info@tecnick.com +//============================================================+ + +/** + * Class to create QR-code arrays for TCPDF class. + * QR Code symbol is a 2D barcode that can be scanned by handy terminals such as a mobile phone with CCD. + * The capacity of QR Code is up to 7000 digits or 4000 characters, and has high robustness. + * This class supports QR Code model 2, described in JIS (Japanese Industrial Standards) X0510:2004 or ISO/IEC 18004. + * Currently the following features are not supported: ECI and FNC1 mode, Micro QR Code, QR Code model 1, Structured mode. + * + * This class is derived from "PHP QR Code encoder" by Dominik Dzienia (http://phpqrcode.sourceforge.net/) based on "libqrencode C library 3.1.1." by Kentaro Fukuchi (http://megaui.net/fukuchi/works/qrencode/index.en.html), contains Reed-Solomon code written by Phil Karn, KA9Q. QR Code is registered trademark of DENSO WAVE INCORPORATED (http://www.denso-wave.com/qrcode/index-e.html). + * Please read comments on this class source file for full copyright and license information. + * + * @package com.tecnick.tcpdf + * @abstract Class for generating QR-code array for TCPDF. + * @author Nicola Asuni + * @copyright 2010 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com + * @link http://www.tcpdf.org + * @license http://www.gnu.org/copyleft/lesser.html LGPL + * @version 1.0.002 + */ + +// definitions +if (!defined('QRCODEDEFS')) { + + /** + * Indicate that definitions for this class are set + */ + define('QRCODEDEFS', true); + + // ----------------------------------------------------- + + // Encoding modes (characters which can be encoded in QRcode) + + /** + * Encoding mode + */ + define('QR_MODE_NL', -1); + + /** + * Encoding mode numeric (0-9). 3 characters are encoded to 10bit length. In theory, 7089 characters or less can be stored in a QRcode. + */ + define('QR_MODE_NM', 0); + + /** + * Encoding mode alphanumeric (0-9A-Z $%*+-./:) 45characters. 2 characters are encoded to 11bit length. In theory, 4296 characters or less can be stored in a QRcode. + */ + define('QR_MODE_AN', 1); + + /** + * Encoding mode 8bit byte data. In theory, 2953 characters or less can be stored in a QRcode. + */ + define('QR_MODE_8B', 2); + + /** + * Encoding mode KANJI. A KANJI character (multibyte character) is encoded to 13bit length. In theory, 1817 characters or less can be stored in a QRcode. + */ + define('QR_MODE_KJ', 3); + + /** + * Encoding mode STRUCTURED (currently unsupported) + */ + define('QR_MODE_ST', 4); + + // ----------------------------------------------------- + + // Levels of error correction. + // QRcode has a function of an error correcting for miss reading that white is black. + // Error correcting is defined in 4 level as below. + + /** + * Error correction level L : About 7% or less errors can be corrected. + */ + define('QR_ECLEVEL_L', 0); + + /** + * Error correction level M : About 15% or less errors can be corrected. + */ + define('QR_ECLEVEL_M', 1); + + /** + * Error correction level Q : About 25% or less errors can be corrected. + */ + define('QR_ECLEVEL_Q', 2); + + /** + * Error correction level H : About 30% or less errors can be corrected. + */ + define('QR_ECLEVEL_H', 3); + + // ----------------------------------------------------- + + // Version. Size of QRcode is defined as version. + // Version is from 1 to 40. + // Version 1 is 21*21 matrix. And 4 modules increases whenever 1 version increases. + // So version 40 is 177*177 matrix. + + /** + * Maximum QR Code version. + */ + define('QRSPEC_VERSION_MAX', 40); + + /** + * Maximum matrix size for maximum version (version 40 is 177*177 matrix). + */ + define('QRSPEC_WIDTH_MAX', 177); + + // ----------------------------------------------------- + + /** + * Matrix index to get width from $capacity array. + */ + define('QRCAP_WIDTH', 0); + + /** + * Matrix index to get number of words from $capacity array. + */ + define('QRCAP_WORDS', 1); + + /** + * Matrix index to get remainder from $capacity array. + */ + define('QRCAP_REMINDER', 2); + + /** + * Matrix index to get error correction level from $capacity array. + */ + define('QRCAP_EC', 3); + + // ----------------------------------------------------- + + // Structure (currently usupported) + + /** + * Number of header bits for structured mode + */ + define('STRUCTURE_HEADER_BITS', 20); + + /** + * Max number of symbols for structured mode + */ + define('MAX_STRUCTURED_SYMBOLS', 16); + + // ----------------------------------------------------- + + // Masks + + /** + * Down point base value for case 1 mask pattern (concatenation of same color in a line or a column) + */ + define('N1', 3); + + /** + * Down point base value for case 2 mask pattern (module block of same color) + */ + define('N2', 3); + + /** + * Down point base value for case 3 mask pattern (1:1:3:1:1(dark:bright:dark:bright:dark)pattern in a line or a column) + */ + define('N3', 40); + + /** + * Down point base value for case 4 mask pattern (ration of dark modules in whole) + */ + define('N4', 10); + + // ----------------------------------------------------- + + // Optimization settings + + /** + * if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code + */ + define('QR_FIND_BEST_MASK', true); + + /** + * if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly + */ + define('QR_FIND_FROM_RANDOM', 2); + + /** + * when QR_FIND_BEST_MASK === false + */ + define('QR_DEFAULT_MASK', 2); + + // ----------------------------------------------------- + +} // end of definitions + +// #*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*# + +if (!class_exists('QRcode', false)) { + + // for compaibility with PHP4 + if (!function_exists('str_split')) { + /** + * Convert a string to an array (needed for PHP4 compatibility) + * @param string $string The input string. + * @param int $split_length Maximum length of the chunk. + * @return If the optional split_length parameter is specified, the returned array will be broken down into chunks with each being split_length in length, otherwise each chunk will be one character in length. FALSE is returned if split_length is less than 1. If the split_length length exceeds the length of string , the entire string is returned as the first (and only) array element. + */ + function str_split($string, $split_length=1) { + if ((strlen($string) > $split_length) OR (!$split_length)) { + do { + $c = strlen($string); + $parts[] = substr($string, 0, $split_length); + $string = substr($string, $split_length); + } while ($string !== false); + } else { + $parts = array($string); + } + return $parts; + } + } + + // ##################################################### + + /** + * Class to create QR-code arrays for TCPDF class. + * QR Code symbol is a 2D barcode that can be scanned by handy terminals such as a mobile phone with CCD. + * The capacity of QR Code is up to 7000 digits or 4000 characters, and has high robustness. + * This class supports QR Code model 2, described in JIS (Japanese Industrial Standards) X0510:2004 or ISO/IEC 18004. + * Currently the following features are not supported: ECI and FNC1 mode, Micro QR Code, QR Code model 1, Structured mode. + * + * This class is derived from "PHP QR Code encoder" by Dominik Dzienia (http://phpqrcode.sourceforge.net/) based on "libqrencode C library 3.1.1." by Kentaro Fukuchi (http://megaui.net/fukuchi/works/qrencode/index.en.html), contains Reed-Solomon code written by Phil Karn, KA9Q. QR Code is registered trademark of DENSO WAVE INCORPORATED (http://www.denso-wave.com/qrcode/index-e.html). + * Please read comments on this class source file for full copyright and license information. + * + * @name QRcode + * @package com.tecnick.tcpdf + * @abstract Class for generating QR-code array for TCPDF. + * @author Nicola Asuni + * @copyright 2010 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com + * @link http://www.tcpdf.org + * @license http://www.gnu.org/copyleft/lesser.html LGPL + * @version 1.0.002 + */ + class QRcode { + + /** + * @var barcode array to be returned which is readable by TCPDF + * @access protected + */ + protected $barcode_array = array(); + + /** + * @var QR code version. Size of QRcode is defined as version. Version is from 1 to 40. Version 1 is 21*21 matrix. And 4 modules increases whenever 1 version increases. So version 40 is 177*177 matrix. + * @access protected + */ + protected $version = 0; + + /** + * @var Levels of error correction. See definitions for possible values. + * @access protected + */ + protected $level = QR_ECLEVEL_L; + + /** + * @var Encoding mode + * @access protected + */ + protected $hint = QR_MODE_8B; + + /** + * @var if true the input string will be converted to uppercase + * @access protected + */ + protected $casesensitive = true; + + /** + * @var structured QR code (not supported yet) + * @access protected + */ + protected $structured = 0; + + /** + * @var mask data + * @access protected + */ + protected $data; + + // FrameFiller + + /** + * @var width + * @access protected + */ + protected $width; + + /** + * @var frame + * @access protected + */ + protected $frame; + + /** + * @var X position of bit + * @access protected + */ + protected $x; + + /** + * @var Y position of bit + * @access protected + */ + protected $y; + + /** + * @var direction + * @access protected + */ + protected $dir; + + /** + * @var single bit + * @access protected + */ + protected $bit; + + // ---- QRrawcode ---- + + /** + * @var data code + * @access protected + */ + protected $datacode = array(); + + /** + * @var error correction code + * @access protected + */ + protected $ecccode = array(); + + /** + * @var blocks + * @access protected + */ + protected $blocks; + + /** + * @var Reed-Solomon blocks + * @access protected + */ + protected $rsblocks = array(); //of RSblock + + /** + * @var counter + * @access protected + */ + protected $count; + + /** + * @var data length + * @access protected + */ + protected $dataLength; + + /** + * @var error correction length + * @access protected + */ + protected $eccLength; + + /** + * @var b1 + * @access protected + */ + protected $b1; + + // ---- QRmask ---- + + /** + * @var run length + * @access protected + */ + protected $runLength = array(); + + // ---- QRsplit ---- + + /** + * @var input data string + * @access protected + */ + protected $dataStr = ''; + + /** + * @var input items + * @access protected + */ + protected $items; + + // Reed-Solomon items + + /** + * @var Reed-Solomon items + * @access protected + */ + protected $rsitems = array(); + + /** + * @var array of frames + * @access protected + */ + protected $frames = array(); + + /** + * @var alphabet-numeric convesion table + * @access protected + */ + protected $anTable = array( + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // + 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, // + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, // + -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, // + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, // + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 // + ); + + /** + * @var array Table of the capacity of symbols + * See Table 1 (pp.13) and Table 12-16 (pp.30-36), JIS X0510:2004. + * @access protected + */ + protected $capacity = array( + array( 0, 0, 0, array( 0, 0, 0, 0)), // + array( 21, 26, 0, array( 7, 10, 13, 17)), // 1 + array( 25, 44, 7, array( 10, 16, 22, 28)), // + array( 29, 70, 7, array( 15, 26, 36, 44)), // + array( 33, 100, 7, array( 20, 36, 52, 64)), // + array( 37, 134, 7, array( 26, 48, 72, 88)), // 5 + array( 41, 172, 7, array( 36, 64, 96, 112)), // + array( 45, 196, 0, array( 40, 72, 108, 130)), // + array( 49, 242, 0, array( 48, 88, 132, 156)), // + array( 53, 292, 0, array( 60, 110, 160, 192)), // + array( 57, 346, 0, array( 72, 130, 192, 224)), // 10 + array( 61, 404, 0, array( 80, 150, 224, 264)), // + array( 65, 466, 0, array( 96, 176, 260, 308)), // + array( 69, 532, 0, array( 104, 198, 288, 352)), // + array( 73, 581, 3, array( 120, 216, 320, 384)), // + array( 77, 655, 3, array( 132, 240, 360, 432)), // 15 + array( 81, 733, 3, array( 144, 280, 408, 480)), // + array( 85, 815, 3, array( 168, 308, 448, 532)), // + array( 89, 901, 3, array( 180, 338, 504, 588)), // + array( 93, 991, 3, array( 196, 364, 546, 650)), // + array( 97, 1085, 3, array( 224, 416, 600, 700)), // 20 + array(101, 1156, 4, array( 224, 442, 644, 750)), // + array(105, 1258, 4, array( 252, 476, 690, 816)), // + array(109, 1364, 4, array( 270, 504, 750, 900)), // + array(113, 1474, 4, array( 300, 560, 810, 960)), // + array(117, 1588, 4, array( 312, 588, 870, 1050)), // 25 + array(121, 1706, 4, array( 336, 644, 952, 1110)), // + array(125, 1828, 4, array( 360, 700, 1020, 1200)), // + array(129, 1921, 3, array( 390, 728, 1050, 1260)), // + array(133, 2051, 3, array( 420, 784, 1140, 1350)), // + array(137, 2185, 3, array( 450, 812, 1200, 1440)), // 30 + array(141, 2323, 3, array( 480, 868, 1290, 1530)), // + array(145, 2465, 3, array( 510, 924, 1350, 1620)), // + array(149, 2611, 3, array( 540, 980, 1440, 1710)), // + array(153, 2761, 3, array( 570, 1036, 1530, 1800)), // + array(157, 2876, 0, array( 570, 1064, 1590, 1890)), // 35 + array(161, 3034, 0, array( 600, 1120, 1680, 1980)), // + array(165, 3196, 0, array( 630, 1204, 1770, 2100)), // + array(169, 3362, 0, array( 660, 1260, 1860, 2220)), // + array(173, 3532, 0, array( 720, 1316, 1950, 2310)), // + array(177, 3706, 0, array( 750, 1372, 2040, 2430)) // 40 + ); + + /** + * @var array Length indicator + * @access protected + */ + protected $lengthTableBits = array( + array(10, 12, 14), + array( 9, 11, 13), + array( 8, 16, 16), + array( 8, 10, 12) + ); + + /** + * @var array Table of the error correction code (Reed-Solomon block) + * See Table 12-16 (pp.30-36), JIS X0510:2004. + * @access protected + */ + protected $eccTable = array( + array(array( 0, 0), array( 0, 0), array( 0, 0), array( 0, 0)), // + array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), // 1 + array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), // + array(array( 1, 0), array( 1, 0), array( 2, 0), array( 2, 0)), // + array(array( 1, 0), array( 2, 0), array( 2, 0), array( 4, 0)), // + array(array( 1, 0), array( 2, 0), array( 2, 2), array( 2, 2)), // 5 + array(array( 2, 0), array( 4, 0), array( 4, 0), array( 4, 0)), // + array(array( 2, 0), array( 4, 0), array( 2, 4), array( 4, 1)), // + array(array( 2, 0), array( 2, 2), array( 4, 2), array( 4, 2)), // + array(array( 2, 0), array( 3, 2), array( 4, 4), array( 4, 4)), // + array(array( 2, 2), array( 4, 1), array( 6, 2), array( 6, 2)), // 10 + array(array( 4, 0), array( 1, 4), array( 4, 4), array( 3, 8)), // + array(array( 2, 2), array( 6, 2), array( 4, 6), array( 7, 4)), // + array(array( 4, 0), array( 8, 1), array( 8, 4), array(12, 4)), // + array(array( 3, 1), array( 4, 5), array(11, 5), array(11, 5)), // + array(array( 5, 1), array( 5, 5), array( 5, 7), array(11, 7)), // 15 + array(array( 5, 1), array( 7, 3), array(15, 2), array( 3, 13)), // + array(array( 1, 5), array(10, 1), array( 1, 15), array( 2, 17)), // + array(array( 5, 1), array( 9, 4), array(17, 1), array( 2, 19)), // + array(array( 3, 4), array( 3, 11), array(17, 4), array( 9, 16)), // + array(array( 3, 5), array( 3, 13), array(15, 5), array(15, 10)), // 20 + array(array( 4, 4), array(17, 0), array(17, 6), array(19, 6)), // + array(array( 2, 7), array(17, 0), array( 7, 16), array(34, 0)), // + array(array( 4, 5), array( 4, 14), array(11, 14), array(16, 14)), // + array(array( 6, 4), array( 6, 14), array(11, 16), array(30, 2)), // + array(array( 8, 4), array( 8, 13), array( 7, 22), array(22, 13)), // 25 + array(array(10, 2), array(19, 4), array(28, 6), array(33, 4)), // + array(array( 8, 4), array(22, 3), array( 8, 26), array(12, 28)), // + array(array( 3, 10), array( 3, 23), array( 4, 31), array(11, 31)), // + array(array( 7, 7), array(21, 7), array( 1, 37), array(19, 26)), // + array(array( 5, 10), array(19, 10), array(15, 25), array(23, 25)), // 30 + array(array(13, 3), array( 2, 29), array(42, 1), array(23, 28)), // + array(array(17, 0), array(10, 23), array(10, 35), array(19, 35)), // + array(array(17, 1), array(14, 21), array(29, 19), array(11, 46)), // + array(array(13, 6), array(14, 23), array(44, 7), array(59, 1)), // + array(array(12, 7), array(12, 26), array(39, 14), array(22, 41)), // 35 + array(array( 6, 14), array( 6, 34), array(46, 10), array( 2, 64)), // + array(array(17, 4), array(29, 14), array(49, 10), array(24, 46)), // + array(array( 4, 18), array(13, 32), array(48, 14), array(42, 32)), // + array(array(20, 4), array(40, 7), array(43, 22), array(10, 67)), // + array(array(19, 6), array(18, 31), array(34, 34), array(20, 61)) // 40 + ); + + /** + * @var array Positions of alignment patterns. + * This array includes only the second and the third position of the alignment patterns. Rest of them can be calculated from the distance between them. + * See Table 1 in Appendix E (pp.71) of JIS X0510:2004. + * @access protected + */ + protected $alignmentPattern = array( + array( 0, 0), + array( 0, 0), array(18, 0), array(22, 0), array(26, 0), array(30, 0), // 1- 5 + array(34, 0), array(22, 38), array(24, 42), array(26, 46), array(28, 50), // 6-10 + array(30, 54), array(32, 58), array(34, 62), array(26, 46), array(26, 48), // 11-15 + array(26, 50), array(30, 54), array(30, 56), array(30, 58), array(34, 62), // 16-20 + array(28, 50), array(26, 50), array(30, 54), array(28, 54), array(32, 58), // 21-25 + array(30, 58), array(34, 62), array(26, 50), array(30, 54), array(26, 52), // 26-30 + array(30, 56), array(34, 60), array(30, 58), array(34, 62), array(30, 54), // 31-35 + array(24, 50), array(28, 54), array(32, 58), array(26, 54), array(30, 58) // 35-40 + ); + + /** + * @var array Version information pattern (BCH coded). + * See Table 1 in Appendix D (pp.68) of JIS X0510:2004. + * size: [QRSPEC_VERSION_MAX - 6] + * @access protected + */ + protected $versionPattern = array( + 0x07c94, 0x085bc, 0x09a99, 0x0a4d3, 0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, // + 0x0f928, 0x10b78, 0x1145d, 0x12a17, 0x13532, 0x149a6, 0x15683, 0x168c9, // + 0x177ec, 0x18ec4, 0x191e1, 0x1afab, 0x1b08e, 0x1cc1a, 0x1d33f, 0x1ed75, // + 0x1f250, 0x209d5, 0x216f0, 0x228ba, 0x2379f, 0x24b0b, 0x2542e, 0x26a64, // + 0x27541, 0x28c69 + ); + + /** + * @var array Format information + * @access protected + */ + protected $formatInfo = array( + array(0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976), // + array(0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0), // + array(0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed), // + array(0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b) // + ); + + + // ------------------------------------------------- + // ------------------------------------------------- + + + /** + * This is the class constructor. + * Creates a QRcode object + * @param string $code code to represent using QRcode + * @param string $eclevel error level: + * @access public + * @since 1.0.000 + */ + public function __construct($code, $eclevel = 'L') { + $barcode_array = array(); + if ((is_null($code)) OR ($code == '\0') OR ($code == '')) { + return false; + } + // set error correction level + $this->level = array_search($eclevel, array('L', 'M', 'Q', 'H')); + if ($this->level === false) { + $this->level = QR_ECLEVEL_L; + } + if (($this->hint != QR_MODE_8B) AND ($this->hint != QR_MODE_KJ)) { + return false; + } + if (($this->version < 0) OR ($this->version > QRSPEC_VERSION_MAX)) { + return false; + } + $this->items = array(); + $this->encodeString($code); + $qrTab = $this->binarize($this->data); + $size = count($qrTab); + $barcode_array['num_rows'] = $size; + $barcode_array['num_cols'] = $size; + $barcode_array['bcode'] = array(); + foreach ($qrTab as $line) { + $arrAdd = array(); + foreach (str_split($line) as $char) { + $arrAdd[] = ($char=='1')?1:0; + } + $barcode_array['bcode'][] = $arrAdd; + } + $this->barcode_array = $barcode_array; + } + + /** + * Returns a barcode array which is readable by TCPDF + * @return array barcode array readable by TCPDF; + * @access public + */ + public function getBarcodeArray() { + return $this->barcode_array; + } + + /** + * Convert the frame in binary form + * @param array $frame array to binarize + * @return array frame in binary form + */ + protected function binarize($frame) { + $len = count($frame); + // the frame is square (width = height) + foreach ($frame as &$frameLine) { + for ($i=0; $i<$len; $i++) { + $frameLine[$i] = (ord($frameLine[$i])&1)?'1':'0'; + } + } + return $frame; + } + + /** + * Encode the input string to QR code + * @param string $string input string to encode + */ + protected function encodeString($string) { + $this->dataStr = $string; + if (!$this->casesensitive) { + $this->toUpper(); + } + $ret = $this->splitString(); + if ($ret < 0) { + return NULL; + } + $this->encodeMask(-1); + } + + /** + * Encode mask + * @param int $mask masking mode + */ + protected function encodeMask($mask) { + $spec = array(0, 0, 0, 0, 0); + $this->datacode = $this->getByteStream($this->items); + if (is_null($this->datacode)) { + return NULL; + } + $spec = $this->getEccSpec($this->version, $this->level, $spec); + $this->b1 = $this->rsBlockNum1($spec); + $this->dataLength = $this->rsDataLength($spec); + $this->eccLength = $this->rsEccLength($spec); + $this->ecccode = array_fill(0, $this->eccLength, 0); + $this->blocks = $this->rsBlockNum($spec); + $ret = $this->init($spec); + if ($ret < 0) { + return NULL; + } + $this->count = 0; + $this->width = $this->getWidth($this->version); + $this->frame = $this->newFrame($this->version); + $this->x = $this->width - 1; + $this->y = $this->width - 1; + $this->dir = -1; + $this->bit = -1; + // inteleaved data and ecc codes + for ($i=0; $i < ($this->dataLength + $this->eccLength); $i++) { + $code = $this->getCode(); + $bit = 0x80; + for ($j=0; $j<8; $j++) { + $addr = $this->getNextPosition(); + $this->setFrameAt($addr, 0x02 | (($bit & $code) != 0)); + $bit = $bit >> 1; + } + } + // remainder bits + $j = $this->getRemainder($this->version); + for ($i=0; $i<$j; $i++) { + $addr = $this->getNextPosition(); + $this->setFrameAt($addr, 0x02); + } + // masking + $this->runLength = array_fill(0, QRSPEC_WIDTH_MAX + 1, 0); + if ($mask < 0) { + if (QR_FIND_BEST_MASK) { + $masked = $this->mask($this->width, $this->frame, $this->level); + } else { + $masked = $this->makeMask($this->width, $this->frame, (intval(QR_DEFAULT_MASK) % 8), $this->level); + } + } else { + $masked = $this->makeMask($this->width, $this->frame, $mask, $this->level); + } + if ($masked == NULL) { + return NULL; + } + $this->data = $masked; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - + + // FrameFiller + + /** + * Set frame value at specified position + * @param array $at x,y position + * @param int $val value of the character to set + */ + protected function setFrameAt($at, $val) { + $this->frame[$at['y']][$at['x']] = chr($val); + } + + /** + * Get frame value at specified position + * @param array $at x,y position + * @return value at specified position + */ + protected function getFrameAt($at) { + return ord($this->frame[$at['y']][$at['x']]); + } + + /** + * Return the next frame position + * @return array of x,y coordinates + */ + protected function getNextPosition() { + do { + if ($this->bit == -1) { + $this->bit = 0; + return array('x'=>$this->x, 'y'=>$this->y); + } + $x = $this->x; + $y = $this->y; + $w = $this->width; + if ($this->bit == 0) { + $x--; + $this->bit++; + } else { + $x++; + $y += $this->dir; + $this->bit--; + } + if ($this->dir < 0) { + if ($y < 0) { + $y = 0; + $x -= 2; + $this->dir = 1; + if ($x == 6) { + $x--; + $y = 9; + } + } + } else { + if ($y == $w) { + $y = $w - 1; + $x -= 2; + $this->dir = -1; + if ($x == 6) { + $x--; + $y -= 8; + } + } + } + if (($x < 0) OR ($y < 0)) { + return NULL; + } + $this->x = $x; + $this->y = $y; + } while(ord($this->frame[$y][$x]) & 0x80); + return array('x'=>$x, 'y'=>$y); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - + + // QRrawcode + + /** + * Initialize code. + * @param array $spec array of ECC specification + * @return 0 in case of success, -1 in case of error + */ + protected function init($spec) { + $dl = $this->rsDataCodes1($spec); + $el = $this->rsEccCodes1($spec); + $rs = $this->init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); + $blockNo = 0; + $dataPos = 0; + $eccPos = 0; + $endfor = $this->rsBlockNum1($spec); + for ($i=0; $i < $endfor; ++$i) { + $ecc = array_slice($this->ecccode, $eccPos); + $this->rsblocks[$blockNo] = array(); + $this->rsblocks[$blockNo]['dataLength'] = $dl; + $this->rsblocks[$blockNo]['data'] = array_slice($this->datacode, $dataPos); + $this->rsblocks[$blockNo]['eccLength'] = $el; + $ecc = $this->encode_rs_char($rs, $this->rsblocks[$blockNo]['data'], $ecc); + $this->rsblocks[$blockNo]['ecc'] = $ecc; + $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); + $dataPos += $dl; + $eccPos += $el; + $blockNo++; + } + if ($this->rsBlockNum2($spec) == 0) { + return 0; + } + $dl = $this->rsDataCodes2($spec); + $el = $this->rsEccCodes2($spec); + $rs = $this->init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); + if ($rs == NULL) { + return -1; + } + $endfor = $this->rsBlockNum2($spec); + for ($i=0; $i < $endfor; ++$i) { + $ecc = array_slice($this->ecccode, $eccPos); + $this->rsblocks[$blockNo] = array(); + $this->rsblocks[$blockNo]['dataLength'] = $dl; + $this->rsblocks[$blockNo]['data'] = array_slice($this->datacode, $dataPos); + $this->rsblocks[$blockNo]['eccLength'] = $el; + $ecc = $this->encode_rs_char($rs, $this->rsblocks[$blockNo]['data'], $ecc); + $this->rsblocks[$blockNo]['ecc'] = $ecc; + $this->ecccode = array_merge(array_slice($this->ecccode, 0, $eccPos), $ecc); + $dataPos += $dl; + $eccPos += $el; + $blockNo++; + } + return 0; + } + + /** + * Return Reed-Solomon block code. + * @return array rsblocks + */ + protected function getCode() { + if ($this->count < $this->dataLength) { + $row = $this->count % $this->blocks; + $col = $this->count / $this->blocks; + if ($col >= $this->rsblocks[0]['dataLength']) { + $row += $this->b1; + } + $ret = $this->rsblocks[$row]['data'][$col]; + } elseif ($this->count < $this->dataLength + $this->eccLength) { + $row = ($this->count - $this->dataLength) % $this->blocks; + $col = ($this->count - $this->dataLength) / $this->blocks; + $ret = $this->rsblocks[$row]['ecc'][$col]; + } else { + return 0; + } + $this->count++; + return $ret; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - + + // QRmask + + /** + * Write Format Information on frame and returns the number of black bits + * @param int $width frame width + * @param array $frame frame + * @param array $mask masking mode + * @param int $level error correction level + * @return int blacks + */ + protected function writeFormatInformation($width, &$frame, $mask, $level) { + $blacks = 0; + $format = $this->getFormatInfo($mask, $level); + for ($i=0; $i<8; ++$i) { + if ($format & 1) { + $blacks += 2; + $v = 0x85; + } else { + $v = 0x84; + } + $frame[8][$width - 1 - $i] = chr($v); + if ($i < 6) { + $frame[$i][8] = chr($v); + } else { + $frame[$i + 1][8] = chr($v); + } + $format = $format >> 1; + } + for ($i=0; $i<7; ++$i) { + if ($format & 1) { + $blacks += 2; + $v = 0x85; + } else { + $v = 0x84; + } + $frame[$width - 7 + $i][8] = chr($v); + if ($i == 0) { + $frame[8][7] = chr($v); + } else { + $frame[8][6 - $i] = chr($v); + } + $format = $format >> 1; + } + return $blacks; + } + + /** + * mask0 + * @param int $x X position + * @param int $y Y position + * @return int mask + */ + protected function mask0($x, $y) { + return ($x + $y) & 1; + } + + /** + * mask1 + * @param int $x X position + * @param int $y Y position + * @return int mask + */ + protected function mask1($x, $y) { + return ($y & 1); + } + + /** + * mask2 + * @param int $x X position + * @param int $y Y position + * @return int mask + */ + protected function mask2($x, $y) { + return ($x % 3); + } + + /** + * mask3 + * @param int $x X position + * @param int $y Y position + * @return int mask + */ + protected function mask3($x, $y) { + return ($x + $y) % 3; + } + + /** + * mask4 + * @param int $x X position + * @param int $y Y position + * @return int mask + */ + protected function mask4($x, $y) { + return (((int)($y / 2)) + ((int)($x / 3))) & 1; + } + + /** + * mask5 + * @param int $x X position + * @param int $y Y position + * @return int mask + */ + protected function mask5($x, $y) { + return (($x * $y) & 1) + ($x * $y) % 3; + } + + /** + * mask6 + * @param int $x X position + * @param int $y Y position + * @return int mask + */ + protected function mask6($x, $y) { + return ((($x * $y) & 1) + ($x * $y) % 3) & 1; + } + + /** + * mask7 + * @param int $x X position + * @param int $y Y position + * @return int mask + */ + protected function mask7($x, $y) { + return ((($x * $y) % 3) + (($x + $y) & 1)) & 1; + } + + /** + * Return bitmask + * @param int $maskNo mask number + * @param int $width width + * @param array $frame frame + * @return array bitmask + */ + protected function generateMaskNo($maskNo, $width, $frame) { + $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); + for ($y=0; $y<$width; ++$y) { + for ($x=0; $x<$width; ++$x) { + if (ord($frame[$y][$x]) & 0x80) { + $bitMask[$y][$x] = 0; + } else { + $maskFunc = call_user_func(array($this, 'mask'.$maskNo), $x, $y); + $bitMask[$y][$x] = ($maskFunc == 0)?1:0; + } + } + } + return $bitMask; + } + + /** + * makeMaskNo + * @param int $maskNo + * @param int $width + * @param int $s + * @param int $d + * @param boolean $maskGenOnly + * @return int b + */ + protected function makeMaskNo($maskNo, $width, $s, &$d, $maskGenOnly=false) { + $b = 0; + $bitMask = array(); + $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d); + if ($maskGenOnly) { + return; + } + $d = $s; + for ($y=0; $y<$width; ++$y) { + for ($x=0; $x<$width; ++$x) { + if ($bitMask[$y][$x] == 1) { + $d[$y][$x] = chr(ord($s[$y][$x]) ^ (int)$bitMask[$y][$x]); + } + $b += (int)(ord($d[$y][$x]) & 1); + } + } + return $b; + } + + /** + * makeMask + * @param int $width + * @param array $frame + * @param int $maskNo + * @param int $level + * @return array mask + */ + protected function makeMask($width, $frame, $maskNo, $level) { + $masked = array_fill(0, $width, str_repeat("\0", $width)); + $this->makeMaskNo($maskNo, $width, $frame, $masked); + $this->writeFormatInformation($width, $masked, $maskNo, $level); + return $masked; + } + + /** + * calcN1N3 + * @param int $length + * @return int demerit + */ + protected function calcN1N3($length) { + $demerit = 0; + for ($i=0; $i<$length; ++$i) { + if ($this->runLength[$i] >= 5) { + $demerit += (N1 + ($this->runLength[$i] - 5)); + } + if ($i & 1) { + if (($i >= 3) AND ($i < ($length-2)) AND ($this->runLength[$i] % 3 == 0)) { + $fact = (int)($this->runLength[$i] / 3); + if (($this->runLength[$i-2] == $fact) + AND ($this->runLength[$i-1] == $fact) + AND ($this->runLength[$i+1] == $fact) + AND ($this->runLength[$i+2] == $fact)) { + if (($this->runLength[$i-3] < 0) OR ($this->runLength[$i-3] >= (4 * $fact))) { + $demerit += N3; + } elseif ((($i+3) >= $length) OR ($this->runLength[$i+3] >= (4 * $fact))) { + $demerit += N3; + } + } + } + } + } + return $demerit; + } + + /** + * evaluateSymbol + * @param int $width + * @param array $frame + * @return int demerit + */ + protected function evaluateSymbol($width, $frame) { + $head = 0; + $demerit = 0; + for ($y=0; $y<$width; ++$y) { + $head = 0; + $this->runLength[0] = 1; + $frameY = $frame[$y]; + if ($y > 0) { + $frameYM = $frame[$y-1]; + } + for ($x=0; $x<$width; ++$x) { + if (($x > 0) AND ($y > 0)) { + $b22 = ord($frameY[$x]) & ord($frameY[$x-1]) & ord($frameYM[$x]) & ord($frameYM[$x-1]); + $w22 = ord($frameY[$x]) | ord($frameY[$x-1]) | ord($frameYM[$x]) | ord($frameYM[$x-1]); + if (($b22 | ($w22 ^ 1)) & 1) { + $demerit += N2; + } + } + if (($x == 0) AND (ord($frameY[$x]) & 1)) { + $this->runLength[0] = -1; + $head = 1; + $this->runLength[$head] = 1; + } elseif ($x > 0) { + if ((ord($frameY[$x]) ^ ord($frameY[$x-1])) & 1) { + $head++; + $this->runLength[$head] = 1; + } else { + $this->runLength[$head]++; + } + } + } + $demerit += $this->calcN1N3($head+1); + } + for ($x=0; $x<$width; ++$x) { + $head = 0; + $this->runLength[0] = 1; + for ($y=0; $y<$width; ++$y) { + if (($y == 0) AND (ord($frame[$y][$x]) & 1)) { + $this->runLength[0] = -1; + $head = 1; + $this->runLength[$head] = 1; + } elseif ($y > 0) { + if ((ord($frame[$y][$x]) ^ ord($frame[$y-1][$x])) & 1) { + $head++; + $this->runLength[$head] = 1; + } else { + $this->runLength[$head]++; + } + } + } + $demerit += $this->calcN1N3($head+1); + } + return $demerit; + } + + /** + * mask + * @param int $width + * @param array $frame + * @param int $level + * @return array best mask + */ + protected function mask($width, $frame, $level) { + $minDemerit = PHP_INT_MAX; + $bestMaskNum = 0; + $bestMask = array(); + $checked_masks = array(0, 1, 2, 3, 4, 5, 6, 7); + if (QR_FIND_FROM_RANDOM !== false) { + $howManuOut = 8 - (QR_FIND_FROM_RANDOM % 9); + for ($i = 0; $i < $howManuOut; ++$i) { + $remPos = rand (0, count($checked_masks)-1); + unset($checked_masks[$remPos]); + $checked_masks = array_values($checked_masks); + } + } + $bestMask = $frame; + foreach ($checked_masks as $i) { + $mask = array_fill(0, $width, str_repeat("\0", $width)); + $demerit = 0; + $blacks = 0; + $blacks = $this->makeMaskNo($i, $width, $frame, $mask); + $blacks += $this->writeFormatInformation($width, $mask, $i, $level); + $blacks = (int)(100 * $blacks / ($width * $width)); + $demerit = (int)((int)(abs($blacks - 50) / 5) * N4); + $demerit += $this->evaluateSymbol($width, $mask); + if ($demerit < $minDemerit) { + $minDemerit = $demerit; + $bestMask = $mask; + $bestMaskNum = $i; + } + } + return $bestMask; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - + + // QRsplit + + /** + * Return true if the character at specified position is a number + * @param string $str string + * @param int $pos characted position + * @return boolean true of false + */ + protected function isdigitat($str, $pos) { + if ($pos >= strlen($str)) { + return false; + } + return ((ord($str[$pos]) >= ord('0'))&&(ord($str[$pos]) <= ord('9'))); + } + + /** + * Return true if the character at specified position is an alphanumeric character + * @param string $str string + * @param int $pos characted position + * @return boolean true of false + */ + protected function isalnumat($str, $pos) { + if ($pos >= strlen($str)) { + return false; + } + return ($this->lookAnTable(ord($str[$pos])) >= 0); + } + + /** + * identifyMode + * @param int $pos + * @return int mode + */ + protected function identifyMode($pos) { + if ($pos >= strlen($this->dataStr)) { + return QR_MODE_NL; + } + $c = $this->dataStr[$pos]; + if ($this->isdigitat($this->dataStr, $pos)) { + return QR_MODE_NM; + } elseif ($this->isalnumat($this->dataStr, $pos)) { + return QR_MODE_AN; + } elseif ($this->hint == QR_MODE_KJ) { + if ($pos+1 < strlen($this->dataStr)) { + $d = $this->dataStr[$pos+1]; + $word = (ord($c) << 8) | ord($d); + if (($word >= 0x8140 && $word <= 0x9ffc) OR ($word >= 0xe040 && $word <= 0xebbf)) { + return QR_MODE_KJ; + } + } + } + return QR_MODE_8B; + } + + /** + * eatNum + * @return int run + */ + protected function eatNum() { + $ln = $this->lengthIndicator(QR_MODE_NM, $this->version); + $p = 0; + while($this->isdigitat($this->dataStr, $p)) { + $p++; + } + $run = $p; + $mode = $this->identifyMode($p); + if ($mode == QR_MODE_8B) { + $dif = $this->estimateBitsModeNum($run) + 4 + $ln + + $this->estimateBitsMode8(1) // + 4 + l8 + - $this->estimateBitsMode8($run + 1); // - 4 - l8 + if ($dif > 0) { + return $this->eat8(); + } + } + if ($mode == QR_MODE_AN) { + $dif = $this->estimateBitsModeNum($run) + 4 + $ln + + $this->estimateBitsModeAn(1) // + 4 + la + - $this->estimateBitsModeAn($run + 1);// - 4 - la + if ($dif > 0) { + return $this->eatAn(); + } + } + $this->items = $this->appendNewInputItem($this->items, QR_MODE_NM, $run, str_split($this->dataStr)); + return $run; + } + + /** + * eatAn + * @return int run + */ + protected function eatAn() { + $la = $this->lengthIndicator(QR_MODE_AN, $this->version); + $ln = $this->lengthIndicator(QR_MODE_NM, $this->version); + $p = 0; + while($this->isalnumat($this->dataStr, $p)) { + if ($this->isdigitat($this->dataStr, $p)) { + $q = $p; + while($this->isdigitat($this->dataStr, $q)) { + $q++; + } + $dif = $this->estimateBitsModeAn($p) // + 4 + la + + $this->estimateBitsModeNum($q - $p) + 4 + $ln + - $this->estimateBitsModeAn($q); // - 4 - la + if ($dif < 0) { + break; + } else { + $p = $q; + } + } else { + $p++; + } + } + $run = $p; + if (!$this->isalnumat($this->dataStr, $p)) { + $dif = $this->estimateBitsModeAn($run) + 4 + $la + + $this->estimateBitsMode8(1) // + 4 + l8 + - $this->estimateBitsMode8($run + 1); // - 4 - l8 + if ($dif > 0) { + return $this->eat8(); + } + } + $this->items = $this->appendNewInputItem($this->items, QR_MODE_AN, $run, str_split($this->dataStr)); + return $run; + } + + /** + * eatKanji + * @return int run + */ + protected function eatKanji() { + $p = 0; + while($this->identifyMode($p) == QR_MODE_KJ) { + $p += 2; + } + $this->items = $this->appendNewInputItem($this->items, QR_MODE_KJ, $p, str_split($this->dataStr)); + return $run; + } + + /** + * eat8 + * @return int run + */ + protected function eat8() { + $la = $this->lengthIndicator(QR_MODE_AN, $this->version); + $ln = $this->lengthIndicator(QR_MODE_NM, $this->version); + $p = 1; + $dataStrLen = strlen($this->dataStr); + while($p < $dataStrLen) { + $mode = $this->identifyMode($p); + if ($mode == QR_MODE_KJ) { + break; + } + if ($mode == QR_MODE_NM) { + $q = $p; + while($this->isdigitat($this->dataStr, $q)) { + $q++; + } + $dif = $this->estimateBitsMode8($p) // + 4 + l8 + + $this->estimateBitsModeNum($q - $p) + 4 + $ln + - $this->estimateBitsMode8($q); // - 4 - l8 + if ($dif < 0) { + break; + } else { + $p = $q; + } + } elseif ($mode == QR_MODE_AN) { + $q = $p; + while($this->isalnumat($this->dataStr, $q)) { + $q++; + } + $dif = $this->estimateBitsMode8($p) // + 4 + l8 + + $this->estimateBitsModeAn($q - $p) + 4 + $la + - $this->estimateBitsMode8($q); // - 4 - l8 + if ($dif < 0) { + break; + } else { + $p = $q; + } + } else { + $p++; + } + } + $run = $p; + $this->items = $this->appendNewInputItem($this->items, QR_MODE_8B, $run, str_split($this->dataStr)); + return $run; + } + + /** + * splitString + */ + protected function splitString() { + while (strlen($this->dataStr) > 0) { + if ($this->dataStr == '') { + return 0; + } + $mode = $this->identifyMode(0); + switch ($mode) { + case QR_MODE_NM: { + $length = $this->eatNum(); + break; + } + case QR_MODE_AN: { + $length = $this->eatAn(); + break; + } + case QR_MODE_KJ: { + if ($hint == QR_MODE_KJ) { + $length = $this->eatKanji(); + } else { + $length = $this->eat8(); + } + break; + } + default: { + $length = $this->eat8(); + break; + } + } + if ($length == 0) { + return 0; + } + if ($length < 0) { + return -1; + } + $this->dataStr = substr($this->dataStr, $length); + } + } + + /** + * toUpper + */ + protected function toUpper() { + $stringLen = strlen($this->dataStr); + $p = 0; + while ($p < $stringLen) { + $mode = $this->identifyMode(substr($this->dataStr, $p), $this->hint); + if ($mode == QR_MODE_KJ) { + $p += 2; + } else { + if ((ord($this->dataStr[$p]) >= ord('a')) AND (ord($this->dataStr[$p]) <= ord('z'))) { + $this->dataStr[$p] = chr(ord($this->dataStr[$p]) - 32); + } + $p++; + } + } + return $this->dataStr; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - + + // QRinputItem + + /** + * newInputItem + * @param int $mode + * @param int $size + * @param array $data + * @param array $bstream + * @return array input item + */ + protected function newInputItem($mode, $size, $data, $bstream=null) { + $setData = array_slice($data, 0, $size); + if (count($setData) < $size) { + $setData = array_merge($setData, array_fill(0, ($size - count($setData)), 0)); + } + if (!$this->check($mode, $size, $setData)) { + return NULL; + } + $inputitem = array(); + $inputitem['mode'] = $mode; + $inputitem['size'] = $size; + $inputitem['data'] = $setData; + $inputitem['bstream'] = $bstream; + return $inputitem; + } + + /** + * encodeModeNum + * @param array $inputitem + * @param int $version + * @return array input item + */ + protected function encodeModeNum($inputitem, $version) { + $words = (int)($inputitem['size'] / 3); + $inputitem['bstream'] = array(); + $val = 0x1; + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, $val); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_NM, $version), $inputitem['size']); + for ($i=0; $i < $words; ++$i) { + $val = (ord($inputitem['data'][$i*3 ]) - ord('0')) * 100; + $val += (ord($inputitem['data'][$i*3+1]) - ord('0')) * 10; + $val += (ord($inputitem['data'][$i*3+2]) - ord('0')); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 10, $val); + } + if ($inputitem['size'] - $words * 3 == 1) { + $val = ord($inputitem['data'][$words*3]) - ord('0'); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, $val); + } elseif (($inputitem['size'] - ($words * 3)) == 2) { + $val = (ord($inputitem['data'][$words*3 ]) - ord('0')) * 10; + $val += (ord($inputitem['data'][$words*3+1]) - ord('0')); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 7, $val); + } + return $inputitem; + } + + /** + * encodeModeAn + * @param array $inputitem + * @param int $version + * @return array input item + */ + protected function encodeModeAn($inputitem, $version) { + $words = (int)($inputitem['size'] / 2); + $inputitem['bstream'] = array(); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x02); + $inputitem['bstream'] = $this->appendNum(v, $this->lengthIndicator(QR_MODE_AN, $version), $inputitem['size']); + for ($i=0; $i < $words; ++$i) { + $val = (int)$this->lookAnTable(ord($inputitem['data'][$i*2 ])) * 45; + $val += (int)$this->lookAnTable(ord($inputitem['data'][$i*2+1])); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 11, $val); + } + if ($inputitem['size'] & 1) { + $val = $this->lookAnTable(ord($inputitem['data'][($words * 2)])); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 6, $val); + } + return $inputitem; + } + + /** + * encodeMode8 + * @param array $inputitem + * @param int $version + * @return array input item + */ + protected function encodeMode8($inputitem, $version) { + $inputitem['bstream'] = array(); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x4); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_8B, $version), $inputitem['size']); + for ($i=0; $i < $inputitem['size']; ++$i) { + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 8, ord($inputitem['data'][$i])); + } + return $inputitem; + } + + /** + * encodeModeKanji + * @param array $inputitem + * @param int $version + * @return array input item + */ + protected function encodeModeKanji($inputitem, $version) { + $inputitem['bstream'] = array(); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x8); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_KJ, $version), (int)($inputitem['size'] / 2)); + for ($i=0; $i<$inputitem['size']; $i+=2) { + $val = (ord($inputitem['data'][$i]) << 8) | ord($inputitem['data'][$i+1]); + if ($val <= 0x9ffc) { + $val -= 0x8140; + } else { + $val -= 0xc140; + } + $h = ($val >> 8) * 0xc0; + $val = ($val & 0xff) + $h; + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 13, $val); + } + return $inputitem; + } + + /** + * encodeModeStructure + * @param array $inputitem + * @return array input item + */ + protected function encodeModeStructure($inputitem) { + $inputitem['bstream'] = array(); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x03); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, ord($inputitem['data'][1]) - 1); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, ord($inputitem['data'][0]) - 1); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 8, ord($inputitem['data'][2])); + return $inputitem; + } + + /** + * encodeBitStream + * @param array $inputitem + * @param int $version + * @return array input item + */ + protected function encodeBitStream($inputitem, $version) { + $inputitem['bstream'] = array(); + $words = $this->maximumWords($inputitem['mode'], $version); + if ($inputitem['size'] > $words) { + $st1 = $this->newInputItem($inputitem['mode'], $words, $inputitem['data']); + $st2 = $this->newInputItem($inputitem['mode'], $inputitem['size'] - $words, array_slice($inputitem['data'], $words)); + $st1 = $this->encodeBitStream($st1, $version); + $st2 = $this->encodeBitStream($st2, $version); + $inputitem['bstream'] = array(); + $inputitem['bstream'] = $this->appendBitstream($inputitem['bstream'], $st1['bstream']); + $inputitem['bstream'] = $this->appendBitstream($inputitem['bstream'], $st2['bstream']); + } else { + switch($inputitem['mode']) { + case QR_MODE_NM: { + $inputitem = $this->encodeModeNum($inputitem, $version); + break; + } + case QR_MODE_AN: { + $inputitem = $this->encodeModeAn($inputitem, $version); + break; + } + case QR_MODE_8B: { + $inputitem = $this->encodeMode8($inputitem, $version); + break; + } + case QR_MODE_KJ: { + $inputitem = $this->encodeModeKanji($inputitem, $version); + break; + } + case QR_MODE_ST: { + $inputitem = $this->encodeModeStructure($inputitem); + break; + } + default: { + break; + } + } + } + return $inputitem; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - + + // QRinput + + /** + * Append data to an input object. + * The data is copied and appended to the input object. + * @param array items input items + * @param int $mode encoding mode. + * @param int $size size of data (byte). + * @param array $data array of input data. + * @return items + * + */ + protected function appendNewInputItem($items, $mode, $size, $data) { + $items[] = $this->newInputItem($mode, $size, $data); + return $items; + } + + /** + * insertStructuredAppendHeader + * @param array $items + * @param int $size + * @param int $index + * @param int $parity + * @return array items + */ + protected function insertStructuredAppendHeader($items, $size, $index, $parity) { + if ($size > MAX_STRUCTURED_SYMBOLS) { + return -1; + } + if (($index <= 0) OR ($index > MAX_STRUCTURED_SYMBOLS)) { + return -1; + } + $buf = array($size, $index, $parity); + $entry = $this->newInputItem(QR_MODE_ST, 3, buf); + array_unshift($items, $entry); + return $items; + } + + /** + * calcParity + * @param array $items + * @return int parity + */ + protected function calcParity($items) { + $parity = 0; + foreach ($items as $item) { + if ($item['mode'] != QR_MODE_ST) { + for ($i=$item['size']-1; $i>=0; --$i) { + $parity ^= $item['data'][$i]; + } + } + } + return $parity; + } + + /** + * checkModeNum + * @param int $size + * @param array $data + * @return boolean true or false + */ + protected function checkModeNum($size, $data) { + for ($i=0; $i<$size; ++$i) { + if ((ord($data[$i]) < ord('0')) OR (ord($data[$i]) > ord('9'))){ + return false; + } + } + return true; + } + + /** + * estimateBitsModeNum + * @param int $size + * @return int number of bits + */ + protected function estimateBitsModeNum($size) { + $w = (int)$size / 3; + $bits = $w * 10; + switch($size - $w * 3) { + case 1: { + $bits += 4; + break; + } + case 2: { + $bits += 7; + break; + } + default: { + break; + } + } + return $bits; + } + + /** + * Look up the alphabet-numeric convesion table (see JIS X0510:2004, pp.19). + * @param int $c character value + * @return value + */ + protected function lookAnTable($c) { + return (($c > 127)?-1:$this->anTable[$c]); + } + + /** + * checkModeAn + * @param int $size + * @param array $data + * @return boolean true or false + */ + protected function checkModeAn($size, $data) { + for ($i=0; $i<$size; ++$i) { + if ($this->lookAnTable(ord($data[$i])) == -1) { + return false; + } + } + return true; + } + + /** + * estimateBitsModeAn + * @param int $size + * @return int number of bits + */ + protected function estimateBitsModeAn($size) { + $w = (int)($size / 2); + $bits = $w * 11; + if ($size & 1) { + $bits += 6; + } + return $bits; + } + + /** + * estimateBitsMode8 + * @param int $size + * @return int number of bits + */ + protected function estimateBitsMode8($size) { + return $size * 8; + } + + /** + * estimateBitsModeKanji + * @param int $size + * @return int number of bits + */ + protected function estimateBitsModeKanji($size) { + return (int)(($size / 2) * 13); + } + + /** + * checkModeKanji + * @param int $size + * @param array $data + * @return boolean true or false + */ + protected function checkModeKanji($size, $data) { + if ($size & 1) { + return false; + } + for ($i=0; $i<$size; $i+=2) { + $val = (ord($data[$i]) << 8) | ord($data[$i+1]); + if (($val < 0x8140) OR (($val > 0x9ffc) AND ($val < 0xe040)) OR ($val > 0xebbf)) { + return false; + } + } + return true; + } + + /** + * Validate the input data. + * @param int $mode encoding mode. + * @param int $size size of data (byte). + * @param array data data to validate + * @return boolean true in case of valid data, false otherwise + */ + protected function check($mode, $size, $data) { + if ($size <= 0) { + return false; + } + switch($mode) { + case QR_MODE_NM: { + return $this->checkModeNum($size, $data); + } + case QR_MODE_AN: { + return $this->checkModeAn($size, $data); + } + case QR_MODE_KJ: { + return $this->checkModeKanji($size, $data); + } + case QR_MODE_8B: { + return true; + } + case QR_MODE_ST: { + return true; + } + default: { + break; + } + } + return false; + } + + /** + * estimateBitStreamSize + * @param array $items + * @param int $version + * @return int bits + */ + protected function estimateBitStreamSize($items, $version) { + $bits = 0; + if ($version == 0) { + $version = 1; + } + foreach ($items as $item) { + switch($item['mode']) { + case QR_MODE_NM: { + $bits = $this->estimateBitsModeNum($item['size']); + break; + } + case QR_MODE_AN: { + $bits = $this->estimateBitsModeAn($item['size']); + break; + } + case QR_MODE_8B: { + $bits = $this->estimateBitsMode8($item['size']); + break; + } + case QR_MODE_KJ: { + $bits = $this->estimateBitsModeKanji($item['size']); + break; + } + case QR_MODE_ST: { + return STRUCTURE_HEADER_BITS; + } + default: { + return 0; + } + } + $l = $this->lengthIndicator($item['mode'], $version); + $m = 1 << $l; + $num = (int)(($item['size'] + $m - 1) / $m); + $bits += $num * (4 + $l); + } + return $bits; + } + + /** + * estimateVersion + * @param array $items + * @return int version + */ + protected function estimateVersion($items) { + $version = 0; + $prev = 0; + do { + $prev = $version; + $bits = $this->estimateBitStreamSize($items, $prev); + $version = $this->getMinimumVersion((int)(($bits + 7) / 8), $this->level); + if ($version < 0) { + return -1; + } + } while ($version > $prev); + return $version; + } + + /** + * lengthOfCode + * @param int $mode + * @param int $version + * @param int $bits + * @return int size + */ + protected function lengthOfCode($mode, $version, $bits) { + $payload = $bits - 4 - $this->lengthIndicator($mode, $version); + switch($mode) { + case QR_MODE_NM: { + $chunks = (int)($payload / 10); + $remain = $payload - $chunks * 10; + $size = $chunks * 3; + if ($remain >= 7) { + $size += 2; + } elseif ($remain >= 4) { + $size += 1; + } + break; + } + case QR_MODE_AN: { + $chunks = (int)($payload / 11); + $remain = $payload - $chunks * 11; + $size = $chunks * 2; + if ($remain >= 6) { + ++$size; + } + break; + } + case QR_MODE_8B: { + $size = (int)($payload / 8); + break; + } + case QR_MODE_KJ: { + $size = (int)(($payload / 13) * 2); + break; + } + case QR_MODE_ST: { + $size = (int)($payload / 8); + break; + } + default: { + $size = 0; + break; + } + } + $maxsize = $this->maximumWords($mode, $version); + if ($size < 0) { + $size = 0; + } + if ($size > $maxsize) { + $size = $maxsize; + } + return $size; + } + + /** + * createBitStream + * @param array $items + * @return array of items and total bits + */ + protected function createBitStream($items) { + $total = 0; + foreach ($items as $key => $item) { + $items[$key] = $this->encodeBitStream($item, $this->version); + $bits = count($items[$key]['bstream']); + $total += $bits; + } + return array($items, $total); + } + + /** + * convertData + * @param array $items + * @return array items + */ + protected function convertData($items) { + $ver = $this->estimateVersion($items); + if ($ver > $this->version) { + $this->version = $ver; + } + for (;;) { + $cbs = $this->createBitStream($items); + $items = $cbs[0]; + $bits = $cbs[1]; + if ($bits < 0) { + return -1; + } + $ver = $this->getMinimumVersion((int)(($bits + 7) / 8), $this->level); + if ($ver < 0) { + return -1; + } elseif ($ver > $this->version) { + $this->version = $ver; + } else { + break; + } + } + return $items; + } + + /** + * Append Padding Bit to bitstream + * @param array $bstream + * @return array bitstream + */ + protected function appendPaddingBit($bstream) { + $bits = count($bstream); + $maxwords = $this->getDataLength($this->version, $this->level); + $maxbits = $maxwords * 8; + if ($maxbits == $bits) { + return 0; + } + if ($maxbits - $bits < 5) { + return $this->appendNum($bstream, $maxbits - $bits, 0); + } + $bits += 4; + $words = (int)(($bits + 7) / 8); + $padding = array(); + $padding = $this->appendNum($padding, $words * 8 - $bits + 4, 0); + $padlen = $maxwords - $words; + if ($padlen > 0) { + $padbuf = array(); + for ($i=0; $i<$padlen; ++$i) { + $padbuf[$i] = ($i&1)?0x11:0xec; + } + $padding = $this->appendBytes($padding, $padlen, $padbuf); + } + return $this->appendBitstream($bstream, $padding); + } + + /** + * mergeBitStream + * @param array $bstream + * @return array bitstream + */ + protected function mergeBitStream($items) { + $items = $this->convertData($items); + $bstream = array(); + foreach ($items as $item) { + $bstream = $this->appendBitstream($bstream, $item['bstream']); + } + return $bstream; + } + + /** + * Returns a stream of bits. + * @param int $items + * @return array padded merged byte stream + */ + protected function getBitStream($items) { + $bstream = $this->mergeBitStream($items); + return $this->appendPaddingBit($bstream); + } + + /** + * Pack all bit streams padding bits into a byte array. + * @param int $items + * @return array padded merged byte stream + */ + protected function getByteStream($items) { + $bstream = $this->getBitStream($items); + return $this->bitstreamToByte($bstream); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - + + // QRbitstream + + /** + * Return an array with zeros + * @param int $setLength array size + * @return array + */ + protected function allocate($setLength) { + return array_fill(0, $setLength, 0); + } + + /** + * Return new bitstream from number + * @param int $bits number of bits + * @param int $num number + * @return array bitstream + */ + protected function newFromNum($bits, $num) { + $bstream = $this->allocate($bits); + $mask = 1 << ($bits - 1); + for ($i=0; $i<$bits; ++$i) { + if ($num & $mask) { + $bstream[$i] = 1; + } else { + $bstream[$i] = 0; + } + $mask = $mask >> 1; + } + return $bstream; + } + + /** + * Return new bitstream from bytes + * @param int $size size + * @param array $data bytes + * @return array bitstream + */ + protected function newFromBytes($size, $data) { + $bstream = $this->allocate($size * 8); + $p=0; + for ($i=0; $i<$size; ++$i) { + $mask = 0x80; + for ($j=0; $j<8; ++$j) { + if ($data[$i] & $mask) { + $bstream[$p] = 1; + } else { + $bstream[$p] = 0; + } + $p++; + $mask = $mask >> 1; + } + } + return $bstream; + } + + /** + * Append one bitstream to another + * @param array $bitstream original bitstream + * @param array $append bitstream to append + * @return array bitstream + */ + protected function appendBitstream($bitstream, $append) { + if ((!is_array($append)) OR (count($append) == 0)) { + return $bitstream; + } + if (count($bitstream) == 0) { + return $append; + } + return array_values(array_merge($bitstream, $append)); + } + + /** + * Append one bitstream created from number to another + * @param array $bitstream original bitstream + * @param int $bits number of bits + * @param int $num number + * @return array bitstream + */ + protected function appendNum($bitstream, $bits, $num) { + if ($bits == 0) { + return 0; + } + $b = $this->newFromNum($bits, $num); + return $this->appendBitstream($bitstream, $b); + } + + /** + * Append one bitstream created from bytes to another + * @param array $bitstream original bitstream + * @param int $size size + * @param array $data bytes + * @return array bitstream + */ + protected function appendBytes($bitstream, $size, $data) { + if ($size == 0) { + return 0; + } + $b = $this->newFromBytes($size, $data); + return $this->appendBitstream($bitstream, $b); + } + + /** + * Convert bitstream to bytes + * @param array $bitstream original bitstream + * @return array of bytes + */ + protected function bitstreamToByte($bstream) { + $size = count($bstream); + if ($size == 0) { + return array(); + } + $data = array_fill(0, (int)(($size + 7) / 8), 0); + $bytes = (int)($size / 8); + $p = 0; + for ($i=0; $i<$bytes; $i++) { + $v = 0; + for ($j=0; $j<8; $j++) { + $v = $v << 1; + $v |= $bstream[$p]; + $p++; + } + $data[$i] = $v; + } + if ($size & 7) { + $v = 0; + for ($j=0; $j<($size & 7); $j++) { + $v = $v << 1; + $v |= $bstream[$p]; + $p++; + } + $data[$bytes] = $v; + } + return $data; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - + + // QRspec + + /** + * Replace a value on the array at the specified position + * @param array $srctab + * @param int $x X position + * @param int $y Y position + * @param string $repl value to replace + * @param int $replLen length of the repl string + * @return array srctab + */ + protected function qrstrset($srctab, $x, $y, $repl, $replLen=false) { + $srctab[$y] = substr_replace($srctab[$y], ($replLen !== false)?substr($repl,0,$replLen):$repl, $x, ($replLen !== false)?$replLen:strlen($repl)); + return $srctab; + } + + /** + * Return maximum data code length (bytes) for the version. + * @param int $version version + * @param int $level error correction level + * @return int maximum size (bytes) + */ + protected function getDataLength($version, $level) { + return $this->capacity[$version][QRCAP_WORDS] - $this->capacity[$version][QRCAP_EC][$level]; + } + + /** + * Return maximum error correction code length (bytes) for the version. + * @param int $version version + * @param int $level error correction level + * @return int ECC size (bytes) + */ + protected function getECCLength($version, $level){ + return $this->capacity[$version][QRCAP_EC][$level]; + } + + /** + * Return the width of the symbol for the version. + * @param int $version version + * @return int width + */ + protected function getWidth($version) { + return $this->capacity[$version][QRCAP_WIDTH]; + } + + /** + * Return the numer of remainder bits. + * @param int $version version + * @return int number of remainder bits + */ + protected function getRemainder($version) { + return $this->capacity[$version][QRCAP_REMINDER]; + } + + /** + * Return a version number that satisfies the input code length. + * @param int $size input code length (byte) + * @param int $level error correction level + * @return int version number + */ + protected function getMinimumVersion($size, $level) { + for ($i=1; $i <= QRSPEC_VERSION_MAX; ++$i) { + $words = $this->capacity[$i][QRCAP_WORDS] - $this->capacity[$i][QRCAP_EC][$level]; + if ($words >= $size) { + return $i; + } + } + return -1; + } + + /** + * Return the size of length indicator for the mode and version. + * @param int $mode encoding mode + * @param int $version version + * @return int the size of the appropriate length indicator (bits). + */ + protected function lengthIndicator($mode, $version) { + if ($mode == QR_MODE_ST) { + return 0; + } + if ($version <= 9) { + $l = 0; + } elseif ($version <= 26) { + $l = 1; + } else { + $l = 2; + } + return $this->lengthTableBits[$mode][$l]; + } + + /** + * Return the maximum length for the mode and version. + * @param int $mode encoding mode + * @param int $version version + * @return int the maximum length (bytes) + */ + protected function maximumWords($mode, $version) { + if ($mode == QR_MODE_ST) { + return 3; + } + if ($version <= 9) { + $l = 0; + } else if ($version <= 26) { + $l = 1; + } else { + $l = 2; + } + $bits = $this->lengthTableBits[$mode][$l]; + $words = (1 << $bits) - 1; + if ($mode == QR_MODE_KJ) { + $words *= 2; // the number of bytes is required + } + return $words; + } + + /** + * Return an array of ECC specification. + * @param int $version version + * @param int $level error correction level + * @param array $spec an array of ECC specification contains as following: {# of type1 blocks, # of data code, # of ecc code, # of type2 blocks, # of data code} + * @return array spec + */ + protected function getEccSpec($version, $level, $spec) { + if (count($spec) < 5) { + $spec = array(0, 0, 0, 0, 0); + } + $b1 = $this->eccTable[$version][$level][0]; + $b2 = $this->eccTable[$version][$level][1]; + $data = $this->getDataLength($version, $level); + $ecc = $this->getECCLength($version, $level); + if ($b2 == 0) { + $spec[0] = $b1; + $spec[1] = (int)($data / $b1); + $spec[2] = (int)($ecc / $b1); + $spec[3] = 0; + $spec[4] = 0; + } else { + $spec[0] = $b1; + $spec[1] = (int)($data / ($b1 + $b2)); + $spec[2] = (int)($ecc / ($b1 + $b2)); + $spec[3] = $b2; + $spec[4] = $spec[1] + 1; + } + return $spec; + } + + /** + * Put an alignment marker. + * @param array $frame frame + * @param int $width width + * @param int $ox X center coordinate of the pattern + * @param int $oy Y center coordinate of the pattern + * @return array frame + */ + protected function putAlignmentMarker($frame, $ox, $oy) { + $finder = array( + "\xa1\xa1\xa1\xa1\xa1", + "\xa1\xa0\xa0\xa0\xa1", + "\xa1\xa0\xa1\xa0\xa1", + "\xa1\xa0\xa0\xa0\xa1", + "\xa1\xa1\xa1\xa1\xa1" + ); + $yStart = $oy - 2; + $xStart = $ox - 2; + for ($y=0; $y < 5; $y++) { + $frame = $this->qrstrset($frame, $xStart, $yStart+$y, $finder[$y]); + } + return $frame; + } + + /** + * Put an alignment pattern. + * @param int $version version + * @param array $fram frame + * @param int $width width + * @return array frame + */ + protected function putAlignmentPattern($version, $frame, $width) { + if ($version < 2) { + return $frame; + } + $d = $this->alignmentPattern[$version][1] - $this->alignmentPattern[$version][0]; + if ($d < 0) { + $w = 2; + } else { + $w = (int)(($width - $this->alignmentPattern[$version][0]) / $d + 2); + } + if ($w * $w - 3 == 1) { + $x = $this->alignmentPattern[$version][0]; + $y = $this->alignmentPattern[$version][0]; + $frame = $this->putAlignmentMarker($frame, $x, $y); + return $frame; + } + $cx = $this->alignmentPattern[$version][0]; + $wo = $w - 1; + for ($x=1; $x < $wo; ++$x) { + $frame = $this->putAlignmentMarker($frame, 6, $cx); + $frame = $this->putAlignmentMarker($frame, $cx, 6); + $cx += $d; + } + $cy = $this->alignmentPattern[$version][0]; + for ($y=0; $y < $wo; ++$y) { + $cx = $this->alignmentPattern[$version][0]; + for ($x=0; $x < $wo; ++$x) { + $frame = $this->putAlignmentMarker($frame, $cx, $cy); + $cx += $d; + } + $cy += $d; + } + return $frame; + } + + /** + * Return BCH encoded version information pattern that is used for the symbol of version 7 or greater. Use lower 18 bits. + * @param int $version version + * @return BCH encoded version information pattern + */ + protected function getVersionPattern($version) { + if (($version < 7) OR ($version > QRSPEC_VERSION_MAX)) { + return 0; + } + return $this->versionPattern[($version - 7)]; + } + + /** + * Return BCH encoded format information pattern. + * @param array $mask + * @param int $level error correction level + * @return BCH encoded format information pattern + */ + protected function getFormatInfo($mask, $level) { + if (($mask < 0) OR ($mask > 7)) { + return 0; + } + if (($level < 0) OR ($level > 3)) { + return 0; + } + return $this->formatInfo[$level][$mask]; + } + + /** + * Put a finder pattern. + * @param array $frame frame + * @param int $width width + * @param int $ox X center coordinate of the pattern + * @param int $oy Y center coordinate of the pattern + * @return array frame + */ + protected function putFinderPattern($frame, $ox, $oy) { + $finder = array( + "\xc1\xc1\xc1\xc1\xc1\xc1\xc1", + "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", + "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", + "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", + "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", + "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", + "\xc1\xc1\xc1\xc1\xc1\xc1\xc1" + ); + for ($y=0; $y < 7; $y++) { + $frame = $this->qrstrset($frame, $ox, ($oy + $y), $finder[$y]); + } + return $frame; + } + + /** + * Return a copy of initialized frame. + * @param int $version version + * @return Array of unsigned char. + */ + protected function createFrame($version) { + $width = $this->capacity[$version][QRCAP_WIDTH]; + $frameLine = str_repeat ("\0", $width); + $frame = array_fill(0, $width, $frameLine); + // Finder pattern + $frame = $this->putFinderPattern($frame, 0, 0); + $frame = $this->putFinderPattern($frame, $width - 7, 0); + $frame = $this->putFinderPattern($frame, 0, $width - 7); + // Separator + $yOffset = $width - 7; + for ($y=0; $y < 7; ++$y) { + $frame[$y][7] = "\xc0"; + $frame[$y][$width - 8] = "\xc0"; + $frame[$yOffset][7] = "\xc0"; + ++$yOffset; + } + $setPattern = str_repeat("\xc0", 8); + $frame = $this->qrstrset($frame, 0, 7, $setPattern); + $frame = $this->qrstrset($frame, $width-8, 7, $setPattern); + $frame = $this->qrstrset($frame, 0, $width - 8, $setPattern); + // Format info + $setPattern = str_repeat("\x84", 9); + $frame = $this->qrstrset($frame, 0, 8, $setPattern); + $frame = $this->qrstrset($frame, $width - 8, 8, $setPattern, 8); + $yOffset = $width - 8; + for ($y=0; $y < 8; ++$y,++$yOffset) { + $frame[$y][8] = "\x84"; + $frame[$yOffset][8] = "\x84"; + } + // Timing pattern + $wo = $width - 15; + for ($i=1; $i < $wo; ++$i) { + $frame[6][7+$i] = chr(0x90 | ($i & 1)); + $frame[7+$i][6] = chr(0x90 | ($i & 1)); + } + // Alignment pattern + $frame = $this->putAlignmentPattern($version, $frame, $width); + // Version information + if ($version >= 7) { + $vinf = $this->getVersionPattern($version); + $v = $vinf; + for ($x=0; $x<6; ++$x) { + for ($y=0; $y<3; ++$y) { + $frame[($width - 11)+$y][$x] = chr(0x88 | ($v & 1)); + $v = $v >> 1; + } + } + $v = $vinf; + for ($y=0; $y<6; ++$y) { + for ($x=0; $x<3; ++$x) { + $frame[$y][$x+($width - 11)] = chr(0x88 | ($v & 1)); + $v = $v >> 1; + } + } + } + // and a little bit... + $frame[$width - 8][8] = "\x81"; + return $frame; + } + + /** + * Set new frame for the specified version. + * @param int $version version + * @return Array of unsigned char. + */ + protected function newFrame($version) { + if (($version < 1) OR ($version > QRSPEC_VERSION_MAX)) { + return NULL; + } + if (!isset($this->frames[$version])) { + $this->frames[$version] = $this->createFrame($version); + } + if (is_null($this->frames[$version])) { + return NULL; + } + return $this->frames[$version]; + } + + /** + * Return block number 0 + * @param array $spec + * @return int value + */ + protected function rsBlockNum($spec) { + return ($spec[0] + $spec[3]); + } + + /** + * Return block number 1 + * @param array $spec + * @return int value + */ + protected function rsBlockNum1($spec) { + return $spec[0]; + } + + /** + * Return data codes 1 + * @param array $spec + * @return int value + */ + protected function rsDataCodes1($spec) { + return $spec[1]; + } + + /** + * Return ecc codes 1 + * @param array $spec + * @return int value + */ + protected function rsEccCodes1($spec) { + return $spec[2]; + } + + /** + * Return block number 2 + * @param array $spec + * @return int value + */ + protected function rsBlockNum2($spec) { + return $spec[3]; + } + + /** + * Return data codes 2 + * @param array $spec + * @return int value + */ + protected function rsDataCodes2($spec) { + return $spec[4]; + } + + /** + * Return ecc codes 2 + * @param array $spec + * @return int value + */ + protected function rsEccCodes2($spec) { + return $spec[2]; + } + + /** + * Return data length + * @param array $spec + * @return int value + */ + protected function rsDataLength($spec) { + return ($spec[0] * $spec[1]) + ($spec[3] * $spec[4]); + } + + /** + * Return ecc length + * @param array $spec + * @return int value + */ + protected function rsEccLength($spec) { + return ($spec[0] + $spec[3]) * $spec[2]; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - + + // QRrs + + /** + * Initialize a Reed-Solomon codec and add it to existing rsitems + * @param int $symsize symbol size, bits + * @param int $gfpoly Field generator polynomial coefficients + * @param int $fcr first root of RS code generator polynomial, index form + * @param int $prim primitive element to generate polynomial roots + * @param int $nroots RS code generator polynomial degree (number of roots) + * @param int $pad padding bytes at front of shortened block + * @return array Array of RS values:. + */ + protected function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) { + foreach ($this->rsitems as $rs) { + if (($rs['pad'] != $pad) OR ($rs['nroots'] != $nroots) OR ($rs['mm'] != $symsize) + OR ($rs['gfpoly'] != $gfpoly) OR ($rs['fcr'] != $fcr) OR ($rs['prim'] != $prim)) { + continue; + } + return $rs; + } + $rs = $this->init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad); + array_unshift($this->rsitems, $rs); + return $rs; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - + + // QRrsItem + + /** + * modnn + * @param array RS values + * @param int $x X position + * @return int X osition + */ + protected function modnn($rs, $x) { + while ($x >= $rs['nn']) { + $x -= $rs['nn']; + $x = ($x >> $rs['mm']) + ($x & $rs['nn']); + } + return $x; + } + + /** + * Initialize a Reed-Solomon codec and returns an array of values. + * @param int $symsize symbol size, bits + * @param int $gfpoly Field generator polynomial coefficients + * @param int $fcr first root of RS code generator polynomial, index form + * @param int $prim primitive element to generate polynomial roots + * @param int $nroots RS code generator polynomial degree (number of roots) + * @param int $pad padding bytes at front of shortened block + * @return array Array of RS values:. + */ + protected function init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) { + // Based on Reed solomon encoder by Phil Karn, KA9Q (GNU-LGPLv2) + $rs = null; + // Check parameter ranges + if (($symsize < 0) OR ($symsize > 8)) { + return $rs; + } + if (($fcr < 0) OR ($fcr >= (1<<$symsize))) { + return $rs; + } + if (($prim <= 0) OR ($prim >= (1<<$symsize))) { + return $rs; + } + if (($nroots < 0) OR ($nroots >= (1<<$symsize))) { + return $rs; + } + if (($pad < 0) OR ($pad >= ((1<<$symsize) -1 - $nroots))) { + return $rs; + } + $rs = array(); + $rs['mm'] = $symsize; + $rs['nn'] = (1 << $symsize) - 1; + $rs['pad'] = $pad; + $rs['alpha_to'] = array_fill(0, ($rs['nn'] + 1), 0); + $rs['index_of'] = array_fill(0, ($rs['nn'] + 1), 0); + // PHP style macro replacement ;) + $NN =& $rs['nn']; + $A0 =& $NN; + // Generate Galois field lookup tables + $rs['index_of'][0] = $A0; // log(zero) = -inf + $rs['alpha_to'][$A0] = 0; // alpha**-inf = 0 + $sr = 1; + for ($i=0; $i<$rs['nn']; ++$i) { + $rs['index_of'][$sr] = $i; + $rs['alpha_to'][$i] = $sr; + $sr <<= 1; + if ($sr & (1 << $symsize)) { + $sr ^= $gfpoly; + } + $sr &= $rs['nn']; + } + if ($sr != 1) { + // field generator polynomial is not primitive! + return NULL; + } + // Form RS code generator polynomial from its roots + $rs['genpoly'] = array_fill(0, ($nroots + 1), 0); + $rs['fcr'] = $fcr; + $rs['prim'] = $prim; + $rs['nroots'] = $nroots; + $rs['gfpoly'] = $gfpoly; + // Find prim-th root of 1, used in decoding + for ($iprim=1; ($iprim % $prim) != 0; $iprim += $rs['nn']) { + ; // intentional empty-body loop! + } + $rs['iprim'] = (int)($iprim / $prim); + $rs['genpoly'][0] = 1; + + + for ($i = 0,$root=$fcr*$prim; $i < $nroots; $i++, $root += $prim) { + $rs['genpoly'][$i+1] = 1; + // Multiply rs->genpoly[] by @**(root + x) + for ($j = $i; $j > 0; --$j) { + if ($rs['genpoly'][$j] != 0) { + $rs['genpoly'][$j] = $rs['genpoly'][$j-1] ^ $rs['alpha_to'][$this->modnn($rs, $rs['index_of'][$rs['genpoly'][$j]] + $root)]; + } else { + $rs['genpoly'][$j] = $rs['genpoly'][$j-1]; + } + } + // rs->genpoly[0] can never be zero + $rs['genpoly'][0] = $rs['alpha_to'][$this->modnn($rs, $rs['index_of'][$rs['genpoly'][0]] + $root)]; + } + // convert rs->genpoly[] to index form for quicker encoding + for ($i = 0; $i <= $nroots; ++$i) { + $rs['genpoly'][$i] = $rs['index_of'][$rs['genpoly'][$i]]; + } + return $rs; + } + + /** + * Encode a Reed-Solomon codec and returns the parity array + * @param array $rs RS values + * @param array $data data + * @param array $parity parity + * @return parity array + */ + protected function encode_rs_char($rs, $data, $parity) { + $MM =& $rs['mm']; // bits per symbol + $NN =& $rs['nn']; // the total number of symbols in a RS block + $ALPHA_TO =& $rs['alpha_to']; // the address of an array of NN elements to convert Galois field elements in index (log) form to polynomial form + $INDEX_OF =& $rs['index_of']; // the address of an array of NN elements to convert Galois field elements in polynomial form to index (log) form + $GENPOLY =& $rs['genpoly']; // an array of NROOTS+1 elements containing the generator polynomial in index form + $NROOTS =& $rs['nroots']; // the number of roots in the RS code generator polynomial, which is the same as the number of parity symbols in a block + $FCR =& $rs['fcr']; // first consecutive root, index form + $PRIM =& $rs['prim']; // primitive element, index form + $IPRIM =& $rs['iprim']; // prim-th root of 1, index form + $PAD =& $rs['pad']; // the number of pad symbols in a block + $A0 =& $NN; + $parity = array_fill(0, $NROOTS, 0); + for ($i=0; $i < ($NN - $NROOTS - $PAD); $i++) { + $feedback = $INDEX_OF[$data[$i] ^ $parity[0]]; + if ($feedback != $A0) { + // feedback term is non-zero + // This line is unnecessary when GENPOLY[NROOTS] is unity, as it must + // always be for the polynomials constructed by init_rs() + $feedback = $this->modnn($rs, $NN - $GENPOLY[$NROOTS] + $feedback); + for ($j=1; $j < $NROOTS; ++$j) { + $parity[$j] ^= $ALPHA_TO[$this->modnn($rs, $feedback + $GENPOLY[($NROOTS - $j)])]; + } + } + // Shift + array_shift($parity); + if ($feedback != $A0) { + array_push($parity, $ALPHA_TO[$this->modnn($rs, $feedback + $GENPOLY[0])]); + } else { + array_push($parity, 0); + } + } + return $parity; + } + + } // end QRcode class + +} // END OF "class_exists QRcode" +?> diff --git a/common/util/phpqrcode/cache/frame_1.dat b/common/util/phpqrcode/cache/frame_1.dat new file mode 100644 index 0000000..be28fea --- /dev/null +++ b/common/util/phpqrcode/cache/frame_1.dat @@ -0,0 +1,2 @@ +xڝ E9u`"PńC牗T!0$ +EɲQmh۾9{kI" 9Ln)Ap־>^zmnŖ;mn \ No newline at end of file diff --git a/common/util/phpqrcode/cache/frame_1.png b/common/util/phpqrcode/cache/frame_1.png new file mode 100644 index 0000000..86ce6e9 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_1.png differ diff --git a/common/util/phpqrcode/cache/frame_10.dat b/common/util/phpqrcode/cache/frame_10.dat new file mode 100644 index 0000000..aff163f Binary files /dev/null and b/common/util/phpqrcode/cache/frame_10.dat differ diff --git a/common/util/phpqrcode/cache/frame_10.png b/common/util/phpqrcode/cache/frame_10.png new file mode 100644 index 0000000..dbfcd70 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_10.png differ diff --git a/common/util/phpqrcode/cache/frame_11.dat b/common/util/phpqrcode/cache/frame_11.dat new file mode 100644 index 0000000..95af68a Binary files /dev/null and b/common/util/phpqrcode/cache/frame_11.dat differ diff --git a/common/util/phpqrcode/cache/frame_11.png b/common/util/phpqrcode/cache/frame_11.png new file mode 100644 index 0000000..c07c761 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_11.png differ diff --git a/common/util/phpqrcode/cache/frame_12.dat b/common/util/phpqrcode/cache/frame_12.dat new file mode 100644 index 0000000..73228b3 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_12.dat differ diff --git a/common/util/phpqrcode/cache/frame_12.png b/common/util/phpqrcode/cache/frame_12.png new file mode 100644 index 0000000..8ba6782 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_12.png differ diff --git a/common/util/phpqrcode/cache/frame_13.dat b/common/util/phpqrcode/cache/frame_13.dat new file mode 100644 index 0000000..2256f0e Binary files /dev/null and b/common/util/phpqrcode/cache/frame_13.dat differ diff --git a/common/util/phpqrcode/cache/frame_13.png b/common/util/phpqrcode/cache/frame_13.png new file mode 100644 index 0000000..6e49d35 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_13.png differ diff --git a/common/util/phpqrcode/cache/frame_14.dat b/common/util/phpqrcode/cache/frame_14.dat new file mode 100644 index 0000000..e9ae093 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_14.dat differ diff --git a/common/util/phpqrcode/cache/frame_14.png b/common/util/phpqrcode/cache/frame_14.png new file mode 100644 index 0000000..efc36c0 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_14.png differ diff --git a/common/util/phpqrcode/cache/frame_15.dat b/common/util/phpqrcode/cache/frame_15.dat new file mode 100644 index 0000000..1872781 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_15.dat differ diff --git a/common/util/phpqrcode/cache/frame_15.png b/common/util/phpqrcode/cache/frame_15.png new file mode 100644 index 0000000..a9f416c Binary files /dev/null and b/common/util/phpqrcode/cache/frame_15.png differ diff --git a/common/util/phpqrcode/cache/frame_16.dat b/common/util/phpqrcode/cache/frame_16.dat new file mode 100644 index 0000000..60af678 --- /dev/null +++ b/common/util/phpqrcode/cache/frame_16.dat @@ -0,0 +1 @@ +xA E]sIX;n6`qW6`%A/3!!g̡1N) E|;>6⸏97$c]kkw1[mC͜cR>E,hʼnp#xFyWVWG3+˓S}Ğ#G8b^c^cpc&3YQ"vk9܇} ĿQL/ \ No newline at end of file diff --git a/common/util/phpqrcode/cache/frame_16.png b/common/util/phpqrcode/cache/frame_16.png new file mode 100644 index 0000000..6ac8fe8 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_16.png differ diff --git a/common/util/phpqrcode/cache/frame_17.dat b/common/util/phpqrcode/cache/frame_17.dat new file mode 100644 index 0000000..87f0cf5 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_17.dat differ diff --git a/common/util/phpqrcode/cache/frame_17.png b/common/util/phpqrcode/cache/frame_17.png new file mode 100644 index 0000000..5b929ac Binary files /dev/null and b/common/util/phpqrcode/cache/frame_17.png differ diff --git a/common/util/phpqrcode/cache/frame_18.dat b/common/util/phpqrcode/cache/frame_18.dat new file mode 100644 index 0000000..bb7138c --- /dev/null +++ b/common/util/phpqrcode/cache/frame_18.dat @@ -0,0 +1,2 @@ +xA +0E]օ,2;s&͚hO1&09OIv@DD &ىKXFv<dq9<%h Ys !(ds;~||b(Yůg#`KSĶsidߍLg:әt/gmkM3{4rTQes><әt3;H#љt3Y+oghٽlnF>i^#awm;g~pgNs{6zp' \ No newline at end of file diff --git a/common/util/phpqrcode/cache/frame_18.png b/common/util/phpqrcode/cache/frame_18.png new file mode 100644 index 0000000..ee0d6a3 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_18.png differ diff --git a/common/util/phpqrcode/cache/frame_19.dat b/common/util/phpqrcode/cache/frame_19.dat new file mode 100644 index 0000000..95e26ad --- /dev/null +++ b/common/util/phpqrcode/cache/frame_19.dat @@ -0,0 +1,3 @@ +xA + E.No7ћiiRN2W%x@ڜ' +u6.*S;}àT zrt%,};)ZLP$qgLdJ;w.]z#[͝Og" B}};w#1Gb;w_C+w@Dfu2N9R7|pWkk \ No newline at end of file diff --git a/common/util/phpqrcode/cache/frame_19.png b/common/util/phpqrcode/cache/frame_19.png new file mode 100644 index 0000000..20fddd8 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_19.png differ diff --git a/common/util/phpqrcode/cache/frame_2.dat b/common/util/phpqrcode/cache/frame_2.dat new file mode 100644 index 0000000..7e42f31 --- /dev/null +++ b/common/util/phpqrcode/cache/frame_2.dat @@ -0,0 +1 @@ +x͒ F{v& &Y+?Z1S'y!a815&۴HٞclF1#6 f6O7C֏8gIfB\DԻ( \ No newline at end of file diff --git a/common/util/phpqrcode/cache/frame_2.png b/common/util/phpqrcode/cache/frame_2.png new file mode 100644 index 0000000..9c150eb Binary files /dev/null and b/common/util/phpqrcode/cache/frame_2.png differ diff --git a/common/util/phpqrcode/cache/frame_20.dat b/common/util/phpqrcode/cache/frame_20.dat new file mode 100644 index 0000000..d5ecc1d Binary files /dev/null and b/common/util/phpqrcode/cache/frame_20.dat differ diff --git a/common/util/phpqrcode/cache/frame_20.png b/common/util/phpqrcode/cache/frame_20.png new file mode 100644 index 0000000..23a061d Binary files /dev/null and b/common/util/phpqrcode/cache/frame_20.png differ diff --git a/common/util/phpqrcode/cache/frame_21.dat b/common/util/phpqrcode/cache/frame_21.dat new file mode 100644 index 0000000..1974dd9 --- /dev/null +++ b/common/util/phpqrcode/cache/frame_21.dat @@ -0,0 +1 @@ +xA E]sIX;n6Upв]٘< i-eW)ŕ…H\jvqHL\6ЅrILܹ%@Vv(P4|Xngɝ~]Du1Us S\,2N?DKF-:eJ]p_,a0` X` w,` X]5 Y4{2vJs9)u۹,]^_7$_ \ No newline at end of file diff --git a/common/util/phpqrcode/cache/frame_21.png b/common/util/phpqrcode/cache/frame_21.png new file mode 100644 index 0000000..291598c Binary files /dev/null and b/common/util/phpqrcode/cache/frame_21.png differ diff --git a/common/util/phpqrcode/cache/frame_22.dat b/common/util/phpqrcode/cache/frame_22.dat new file mode 100644 index 0000000..0f01802 --- /dev/null +++ b/common/util/phpqrcode/cache/frame_22.dat @@ -0,0 +1,3 @@ +xA +0 E]{.]{{{ZBepwe@VERZ3"*2o4y)i#dbdF҅I"4WIu45x.ZS{8k={o.q[:帒qy +)t#N8dCj-OOG}:/:sz!)^IO- 7p 7$}>ɷ7p tssrs Vmҹ}R~7&?7ԦIbh{<Mi- \ No newline at end of file diff --git a/common/util/phpqrcode/cache/frame_23.png b/common/util/phpqrcode/cache/frame_23.png new file mode 100644 index 0000000..b8f16ae Binary files /dev/null and b/common/util/phpqrcode/cache/frame_23.png differ diff --git a/common/util/phpqrcode/cache/frame_24.dat b/common/util/phpqrcode/cache/frame_24.dat new file mode 100644 index 0000000..7b92e29 --- /dev/null +++ b/common/util/phpqrcode/cache/frame_24.dat @@ -0,0 +1 @@ +xA EMX0;nVP4HSSxU3/O LiJ4V JC%6VR&DBHjDJ??BlcDZ'UXUޏ0ywįj똳3ścj{:GqGNv;笓J <]#8#8H'GqGtr:9#8#8ؓhNt_>teS^\gQe?vuo;>*wlm \ No newline at end of file diff --git a/common/util/phpqrcode/cache/frame_24.png b/common/util/phpqrcode/cache/frame_24.png new file mode 100644 index 0000000..397c64f Binary files /dev/null and b/common/util/phpqrcode/cache/frame_24.png differ diff --git a/common/util/phpqrcode/cache/frame_25.dat b/common/util/phpqrcode/cache/frame_25.dat new file mode 100644 index 0000000..ba12518 --- /dev/null +++ b/common/util/phpqrcode/cache/frame_25.dat @@ -0,0 +1,3 @@ +xA + s낋]rxY51mMBG +*Sx|Ua5ƵZ-,1HPRjX5iG>WR/+uT廯 ӯ嗴u[Sa[kv5+5nJ%+VXbŊ߬u'SRtzZ++VXbŊٟٟٟ+VXb}Ŋ+VXVI+kq[toVZvoNVw}{r<ýR"R] Wr} \ No newline at end of file diff --git a/common/util/phpqrcode/cache/frame_25.png b/common/util/phpqrcode/cache/frame_25.png new file mode 100644 index 0000000..25bc445 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_25.png differ diff --git a/common/util/phpqrcode/cache/frame_26.dat b/common/util/phpqrcode/cache/frame_26.dat new file mode 100644 index 0000000..d34a73f --- /dev/null +++ b/common/util/phpqrcode/cache/frame_26.dat @@ -0,0 +1,2 @@ +xA + Eօ,t77ћU E)i7*~cXEBFC6:&L,Mv.KgոYM>>mۚ?vmg?ұηdCUIkE\Msfafa>[sӈ9쬩ެ8b]LgEo w1 \ No newline at end of file diff --git a/common/util/phpqrcode/cache/frame_26.png b/common/util/phpqrcode/cache/frame_26.png new file mode 100644 index 0000000..f4a6b39 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_26.png differ diff --git a/common/util/phpqrcode/cache/frame_27.dat b/common/util/phpqrcode/cache/frame_27.dat new file mode 100644 index 0000000..b4d9ffd Binary files /dev/null and b/common/util/phpqrcode/cache/frame_27.dat differ diff --git a/common/util/phpqrcode/cache/frame_27.png b/common/util/phpqrcode/cache/frame_27.png new file mode 100644 index 0000000..8419ec2 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_27.png differ diff --git a/common/util/phpqrcode/cache/frame_28.dat b/common/util/phpqrcode/cache/frame_28.dat new file mode 100644 index 0000000..8cbaa19 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_28.dat differ diff --git a/common/util/phpqrcode/cache/frame_28.png b/common/util/phpqrcode/cache/frame_28.png new file mode 100644 index 0000000..7609d8e Binary files /dev/null and b/common/util/phpqrcode/cache/frame_28.png differ diff --git a/common/util/phpqrcode/cache/frame_29.dat b/common/util/phpqrcode/cache/frame_29.dat new file mode 100644 index 0000000..5e4a711 --- /dev/null +++ b/common/util/phpqrcode/cache/frame_29.dat @@ -0,0 +1,2 @@ +xA a޺ @n7+*4!?J 抮]STf)sI"Ȕb0|"Luٸ,E1\6*uQ?>aυR-rn.ꯋ\T:*)|) , ,x_}:^RUoɢu~މX`XЏЏЏЏ_`X`XЏЏЏ_`X`XЏЏЏЏwbX`PU)D"c{z3<}^?bm잃a.] +{Q6uT,9 \ No newline at end of file diff --git a/common/util/phpqrcode/cache/frame_29.png b/common/util/phpqrcode/cache/frame_29.png new file mode 100644 index 0000000..ffe072c Binary files /dev/null and b/common/util/phpqrcode/cache/frame_29.png differ diff --git a/common/util/phpqrcode/cache/frame_3.dat b/common/util/phpqrcode/cache/frame_3.dat new file mode 100644 index 0000000..188d531 --- /dev/null +++ b/common/util/phpqrcode/cache/frame_3.dat @@ -0,0 +1 @@ +x E{v& &Y+bk'ya:TXl޶$W+ӏv9}gR@H0YPBEm?s"bt2cn:ﺭ;YzQ7 \ No newline at end of file diff --git a/common/util/phpqrcode/cache/frame_3.png b/common/util/phpqrcode/cache/frame_3.png new file mode 100644 index 0000000..945ee7c Binary files /dev/null and b/common/util/phpqrcode/cache/frame_3.png differ diff --git a/common/util/phpqrcode/cache/frame_30.dat b/common/util/phpqrcode/cache/frame_30.dat new file mode 100644 index 0000000..44cf3d3 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_30.dat differ diff --git a/common/util/phpqrcode/cache/frame_30.png b/common/util/phpqrcode/cache/frame_30.png new file mode 100644 index 0000000..75dbddd Binary files /dev/null and b/common/util/phpqrcode/cache/frame_30.png differ diff --git a/common/util/phpqrcode/cache/frame_31.dat b/common/util/phpqrcode/cache/frame_31.dat new file mode 100644 index 0000000..ce429d0 --- /dev/null +++ b/common/util/phpqrcode/cache/frame_31.dat @@ -0,0 +1 @@ +xA a޺ &r4yķ!mV3Iv!Ҝ2i\NSS4EF2+65e/Ws]!?p=S~Đ?+x6r6y}ǴeR1-WllҌXz/>V櫷:ñA8-+mTbllltM&]ll&]Ill&]y 6` 6`iuyXWi\tz>.zk t77wJϔ4w҈85 \ No newline at end of file diff --git a/common/util/phpqrcode/cache/frame_31.png b/common/util/phpqrcode/cache/frame_31.png new file mode 100644 index 0000000..b14d1fa Binary files /dev/null and b/common/util/phpqrcode/cache/frame_31.png differ diff --git a/common/util/phpqrcode/cache/frame_32.dat b/common/util/phpqrcode/cache/frame_32.dat new file mode 100644 index 0000000..aaa0808 --- /dev/null +++ b/common/util/phpqrcode/cache/frame_32.dat @@ -0,0 +1,2 @@ +x + ־. Dl, Mz6Ç gcJD;'.AIqމI,IrYFk%DOy|EDD(L_Y>*ߚ?aOkL_<[c>c˘uLI%#0#0#otѢ}4fv_)Eph5R881#0#0itZ#0#0#0itZ#0#0#0itZl0#09q"HܜHQ"L5}-Y׾k`>z鸳4&p!!`:5 \ No newline at end of file diff --git a/common/util/phpqrcode/cache/frame_32.png b/common/util/phpqrcode/cache/frame_32.png new file mode 100644 index 0000000..58d42db Binary files /dev/null and b/common/util/phpqrcode/cache/frame_32.png differ diff --git a/common/util/phpqrcode/cache/frame_33.dat b/common/util/phpqrcode/cache/frame_33.dat new file mode 100644 index 0000000..a261375 --- /dev/null +++ b/common/util/phpqrcode/cache/frame_33.dat @@ -0,0 +1,14 @@ +xA a޺@n7+*L++柮bb*LCc kHrjJ5Yi~0_TT}e>5b_w͟?\Rai+7W\wLUNL ++ ++jOkc\˩|%o} 8 ++ ++ ++ 3g ++ ++ ++3g@ ++ ++ ++:RXB9I=ko/Swؘٯ`gr_ٙYVSYzIefnmQoz > \ No newline at end of file diff --git a/common/util/phpqrcode/cache/frame_33.png b/common/util/phpqrcode/cache/frame_33.png new file mode 100644 index 0000000..924c728 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_33.png differ diff --git a/common/util/phpqrcode/cache/frame_34.dat b/common/util/phpqrcode/cache/frame_34.dat new file mode 100644 index 0000000..7ceb025 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_34.dat differ diff --git a/common/util/phpqrcode/cache/frame_34.png b/common/util/phpqrcode/cache/frame_34.png new file mode 100644 index 0000000..a477042 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_34.png differ diff --git a/common/util/phpqrcode/cache/frame_35.dat b/common/util/phpqrcode/cache/frame_35.dat new file mode 100644 index 0000000..56bc3e2 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_35.dat differ diff --git a/common/util/phpqrcode/cache/frame_35.png b/common/util/phpqrcode/cache/frame_35.png new file mode 100644 index 0000000..d29806c Binary files /dev/null and b/common/util/phpqrcode/cache/frame_35.png differ diff --git a/common/util/phpqrcode/cache/frame_36.dat b/common/util/phpqrcode/cache/frame_36.dat new file mode 100644 index 0000000..282c60d Binary files /dev/null and b/common/util/phpqrcode/cache/frame_36.dat differ diff --git a/common/util/phpqrcode/cache/frame_36.png b/common/util/phpqrcode/cache/frame_36.png new file mode 100644 index 0000000..96ecb42 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_36.png differ diff --git a/common/util/phpqrcode/cache/frame_37.dat b/common/util/phpqrcode/cache/frame_37.dat new file mode 100644 index 0000000..015c0f2 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_37.dat differ diff --git a/common/util/phpqrcode/cache/frame_37.png b/common/util/phpqrcode/cache/frame_37.png new file mode 100644 index 0000000..fcc5162 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_37.png differ diff --git a/common/util/phpqrcode/cache/frame_38.dat b/common/util/phpqrcode/cache/frame_38.dat new file mode 100644 index 0000000..71cf53e --- /dev/null +++ b/common/util/phpqrcode/cache/frame_38.dat @@ -0,0 +1 @@ +xA0ЎuA2;Нk(gytp9$D\e^'t-aIFMSkIŤ:7|LkN8N7i}i,[WgӴ?31iN}}=OM:4)SL2eʔ)SL#$ JJM:}]L٧SQL2eʔ)SL2աPt(:)SL2eʔ)S:ECq2eʔ)SL2eʔECѡ8O2eʔ)SL2eTCѡPL2eʔ)SL2ݓsJCIKԂi93n_ +Ri4\g;% }an \ No newline at end of file diff --git a/common/util/phpqrcode/cache/frame_38.png b/common/util/phpqrcode/cache/frame_38.png new file mode 100644 index 0000000..89238f3 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_38.png differ diff --git a/common/util/phpqrcode/cache/frame_39.dat b/common/util/phpqrcode/cache/frame_39.dat new file mode 100644 index 0000000..53511f7 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_39.dat differ diff --git a/common/util/phpqrcode/cache/frame_39.png b/common/util/phpqrcode/cache/frame_39.png new file mode 100644 index 0000000..1dc9cd1 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_39.png differ diff --git a/common/util/phpqrcode/cache/frame_4.dat b/common/util/phpqrcode/cache/frame_4.dat new file mode 100644 index 0000000..67b30e8 --- /dev/null +++ b/common/util/phpqrcode/cache/frame_4.dat @@ -0,0 +1 @@ +x E=u pجQCOM'ˏ$ @3eF\FNXRyؾC{a8R Ńa2@qkH1(`cj~0ܨعnXGĀ \ No newline at end of file diff --git a/common/util/phpqrcode/cache/frame_4.png b/common/util/phpqrcode/cache/frame_4.png new file mode 100644 index 0000000..b72f9e7 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_4.png differ diff --git a/common/util/phpqrcode/cache/frame_40.dat b/common/util/phpqrcode/cache/frame_40.dat new file mode 100644 index 0000000..90d36dd --- /dev/null +++ b/common/util/phpqrcode/cache/frame_40.dat @@ -0,0 +1,2 @@ +xA@Ь@o7`Qfe䕫PA><]߳bZn^AQ}[9^]ynajM܇K̘1cƌ3f̘1{W5}{7lMޚxI<Kαyl3f̘1cƌ3f̘1ۻٻ={αyl3f̘1cƌ3f̘1ۻٻ={αyl3f̘1cƌ3f̘1ۻٻ={αyl3f̘1cƌ3f̘1ۻٻ={αyl3f̘1cƌ3f̘SʑӒ7HK޼g\u_r'4[-]qL8ƝY1q!/(% \ No newline at end of file diff --git a/common/util/phpqrcode/cache/frame_40.png b/common/util/phpqrcode/cache/frame_40.png new file mode 100644 index 0000000..8034d86 Binary files /dev/null and b/common/util/phpqrcode/cache/frame_40.png differ diff --git a/common/util/phpqrcode/cache/frame_5.dat b/common/util/phpqrcode/cache/frame_5.dat new file mode 100644 index 0000000..d5dafe1 --- /dev/null +++ b/common/util/phpqrcode/cache/frame_5.dat @@ -0,0 +1 @@ +x1 Eu7ЛZ|ND B0@R$l,->VKZ[I9+Es=ϤL1̄[FZU4?i<;7;P#W-[ݯ6ddddddc",;"sk摑Q&erw######L.摑Иy1^˲\3 v \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_0/mask_117_0.dat b/common/util/phpqrcode/cache/mask_0/mask_117_0.dat new file mode 100644 index 0000000..781c7f8 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_0/mask_117_0.dat @@ -0,0 +1,2 @@ +xA +0 }OrR,#3,o5Cq:;;wvNJZG=m} ѱ2iRkj_YYYYYYYYe_/WVVVVVVkd-Ϻ,#OZc]|{ž$ \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_0/mask_121_0.dat b/common/util/phpqrcode/cache/mask_0/mask_121_0.dat new file mode 100644 index 0000000..68810c3 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_0/mask_121_0.dat @@ -0,0 +1 @@ +x1 О/w YMS8>2SFOEcW\ۼ{cpKGBКmxhfffffff/s22W|*d1*5̬RWas\xm~8߮r0wjsdm&y \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_0/mask_125_0.dat b/common/util/phpqrcode/cache/mask_0/mask_125_0.dat new file mode 100644 index 0000000..2c73ef1 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_0/mask_125_0.dat @@ -0,0 +1,2 @@ +xA + н_TH`3AOL4 k(ewGW. #2} \Ygggggggggg_d>j^s;;;;;;;;;;'q;;;;;;;;;'˰qu_PYw{e=dG/ \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_0/mask_129_0.dat b/common/util/phpqrcode/cache/mask_0/mask_129_0.dat new file mode 100644 index 0000000..812ee8a --- /dev/null +++ b/common/util/phpqrcode/cache/mask_0/mask_129_0.dat @@ -0,0 +1,2 @@ +x1 + /*DE'hgt-}_pV \"b=s[J=8Dho۞' 0X ۴e0`  j" 0`Wf`^P0`2Ȁ  d07(Y/XLGby"pT \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_0/mask_137_0.dat b/common/util/phpqrcode/cache/mask_0/mask_137_0.dat new file mode 100644 index 0000000..f6d993b --- /dev/null +++ b/common/util/phpqrcode/cache/mask_0/mask_137_0.dat @@ -0,0 +1 @@ +x1 О/+FZ?J L7Ժ*Ba%L~˻ʓCJYIWJ .K]R0a„ $INTwlLaL0a„ &Ld@PO0a„ &L0e@P?a„ &L0aDe@ &L0aMIlL&)dlgacR<$v,ɺ?U2] \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_0/mask_141_0.dat b/common/util/phpqrcode/cache/mask_0/mask_141_0.dat new file mode 100644 index 0000000..8c685c8 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_0/mask_141_0.dat @@ -0,0 +1,2 @@ +x= +0 нi9'EDx͘%I9+E{$m^&uS"D6ڟ]98UMbҾY[2拉Ĉ#F1bĈ%iRN潝ѳ#;#F1bĈN1i#F1bĈ#FtZ}Nk1bĈ#F1bktZ;#F1bFV-u"IoD-*7uj>bMV+ \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_0/mask_149_0.dat b/common/util/phpqrcode/cache/mask_0/mask_149_0.dat new file mode 100644 index 0000000..d258350 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_0/mask_149_0.dat @@ -0,0 +1,3 @@ +xA + н_MEQXP৞.|94e{JLv#^n[ ?; +ZIV-*w˒1*+VXbŊXgwqX}JRYbŊ+VXbeΠwfeΠ^bŊ+VXbʜAʜAbŊ+VXbŊ9ٜAbŊ+VXbŊl0*0Tj`?Ϊ;X=zZr* \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_0/mask_153_0.dat b/common/util/phpqrcode/cache/mask_0/mask_153_0.dat new file mode 100644 index 0000000..fc79e9e --- /dev/null +++ b/common/util/phpqrcode/cache/mask_0/mask_153_0.dat @@ -0,0 +1 @@ +x1 Н/礑h&F`Ҽ@I;PZ^X͌mf.=5 [if-R+!wr˜g\j̘1cƌ3f̘1cfo.2?1z `ƌ3f̘1cƌzƌ3f̘1cƌ3fztf3f̘1cƌ3f̘kk030cƌ3f̘1c9;Ď`vf͚̆ZϘW9 \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_0/mask_157_0.dat b/common/util/phpqrcode/cache/mask_0/mask_157_0.dat new file mode 100644 index 0000000..ad749f3 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_0/mask_157_0.dat @@ -0,0 +1,2 @@ +xA + н_QRY k*q͵=j7~nN.p%ڵsi.رcǎ;vر{.-W2={mgy+رcǎ;vɳ2;yּcǎ;vرcNɳ;vرcǎ;v2I9+DyI4ˠ5:Wvdqߜܴ<d2x%[U%2]&K,Ydɒ%ˡ,S՗r2yd=,k_{Xdɒ%K,Yd)0m,Ydɒ%K,Yd)0m,Ydɒ%K,Yme,e%K,Ydɒ%K,eq Ò%K,Ydɒe:I9EQ=Ls I{ZtR}Sn:|R[?_*SL2eʔ)SL&ϦI O2O2eʔ)SL2e*C1PPSL2eʔ)SLP22)SL2eʔ)SLe(}2)SL2eʔ)SLe(}2)SL2eʔ)Sic7;"ޙFͦސٙvL ^2}oO'r \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_0/mask_173_0.dat b/common/util/phpqrcode/cache/mask_0/mask_173_0.dat new file mode 100644 index 0000000..5ef85e7 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_0/mask_173_0.dat @@ -0,0 +1 @@ +x10ޯT [4v2ƽok݇;Ӳ]f֞dljlG0n+߻mG˖-[lٲe"Y}oV[lٲe˖-[lٲeհՃ[2lٲe˖-[lٲeհՃ[2lٲe˖-[lٲeհՃ[lٲe˖-[lٲeValٲe˖-[lٲef[BmаE;N-ۜT/rl?* \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_0/mask_177_0.dat b/common/util/phpqrcode/cache/mask_0/mask_177_0.dat new file mode 100644 index 0000000..78a26a7 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_0/mask_177_0.dat @@ -0,0 +1,2 @@ +x1 +0>I9+?߁iև d̹xֈxN/է|{ظ8d0h=cFf̘1cƌ3f̘qq=w6;l4cƕ<nj3f̘1cƌ3fXһ1ֻcƌ3f̘1cƌ3fXbwnj3f̘1cƌ3f̘M'X&1cƌ3f̘1cƌ3ֻnn1cƌ3f̘1cƌÍ3U< \7+(<OƌΊnj4@ \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_0/mask_21_0.dat b/common/util/phpqrcode/cache/mask_0/mask_21_0.dat new file mode 100644 index 0000000..368c994 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_0/mask_21_0.dat differ diff --git a/common/util/phpqrcode/cache/mask_0/mask_25_0.dat b/common/util/phpqrcode/cache/mask_0/mask_25_0.dat new file mode 100644 index 0000000..e4a5b6d Binary files /dev/null and b/common/util/phpqrcode/cache/mask_0/mask_25_0.dat differ diff --git a/common/util/phpqrcode/cache/mask_0/mask_29_0.dat b/common/util/phpqrcode/cache/mask_0/mask_29_0.dat new file mode 100644 index 0000000..74a216b Binary files /dev/null and b/common/util/phpqrcode/cache/mask_0/mask_29_0.dat differ diff --git a/common/util/phpqrcode/cache/mask_0/mask_33_0.dat b/common/util/phpqrcode/cache/mask_0/mask_33_0.dat new file mode 100644 index 0000000..2ec712a Binary files /dev/null and b/common/util/phpqrcode/cache/mask_0/mask_33_0.dat differ diff --git a/common/util/phpqrcode/cache/mask_0/mask_37_0.dat b/common/util/phpqrcode/cache/mask_0/mask_37_0.dat new file mode 100644 index 0000000..1588cfc Binary files /dev/null and b/common/util/phpqrcode/cache/mask_0/mask_37_0.dat differ diff --git a/common/util/phpqrcode/cache/mask_0/mask_41_0.dat b/common/util/phpqrcode/cache/mask_0/mask_41_0.dat new file mode 100644 index 0000000..e369027 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_0/mask_41_0.dat differ diff --git a/common/util/phpqrcode/cache/mask_0/mask_45_0.dat b/common/util/phpqrcode/cache/mask_0/mask_45_0.dat new file mode 100644 index 0000000..452f126 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_0/mask_45_0.dat differ diff --git a/common/util/phpqrcode/cache/mask_0/mask_49_0.dat b/common/util/phpqrcode/cache/mask_0/mask_49_0.dat new file mode 100644 index 0000000..fdd2aac --- /dev/null +++ b/common/util/phpqrcode/cache/mask_0/mask_49_0.dat @@ -0,0 +1,2 @@ +xK E9o#?H/6g$-,X] +xݘ; X԰9<Ѻq2AfH7/5We{#fި?4=N > \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_0/mask_53_0.dat b/common/util/phpqrcode/cache/mask_0/mask_53_0.dat new file mode 100644 index 0000000..572d279 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_0/mask_53_0.dat @@ -0,0 +1,2 @@ +xK +@!йoQϺ:(m&s-6Z{m4YX.F٭XZij=:έ֋b忑VH 8 #[Y^Xe \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_0/mask_57_0.dat b/common/util/phpqrcode/cache/mask_0/mask_57_0.dat new file mode 100644 index 0000000..ea81e6d --- /dev/null +++ b/common/util/phpqrcode/cache/mask_0/mask_57_0.dat @@ -0,0 +1,4 @@ +xA + {^s=YL՚ ( +ouj)  +Z7yv,ԴwVQ iGiҤDfەwo4ѤoLLȼ}4 h \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_0/mask_61_0.dat b/common/util/phpqrcode/cache/mask_0/mask_61_0.dat new file mode 100644 index 0000000..93d2444 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_0/mask_61_0.dat differ diff --git a/common/util/phpqrcode/cache/mask_0/mask_65_0.dat b/common/util/phpqrcode/cache/mask_0/mask_65_0.dat new file mode 100644 index 0000000..df29d7b Binary files /dev/null and b/common/util/phpqrcode/cache/mask_0/mask_65_0.dat differ diff --git a/common/util/phpqrcode/cache/mask_0/mask_69_0.dat b/common/util/phpqrcode/cache/mask_0/mask_69_0.dat new file mode 100644 index 0000000..8a2cfbd --- /dev/null +++ b/common/util/phpqrcode/cache/mask_0/mask_69_0.dat @@ -0,0 +1 @@ +xK =_+mBd|Q"s+1"),=Ea T"ŐnE-3 ,KYw=ZZT .,K1#֞!Ŋ+V嬪.2XbŊ+VX.kBzwձ̀gkYZ \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_0/mask_89_0.dat b/common/util/phpqrcode/cache/mask_0/mask_89_0.dat new file mode 100644 index 0000000..aaa4c52 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_0/mask_89_0.dat @@ -0,0 +1 @@ +x1 ὧi9'Hl?L^"&M?bq?˸,9!z]VScƌ3_c!`n3f̘1č 3f̘1/f>.Uc˻; 2;Y+7 \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_0/mask_93_0.dat b/common/util/phpqrcode/cache/mask_0/mask_93_0.dat new file mode 100644 index 0000000..e218fa0 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_0/mask_93_0.dat @@ -0,0 +1,3 @@ +xK + EyV,OmޠrPH0{2bc{tQ] +{Q{{弬֒ǎ;v_ڳ}L}l߱cǎ;v̑̑̑رcǎ.Legw3qeѾ@i \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_0/mask_97_0.dat b/common/util/phpqrcode/cache/mask_0/mask_97_0.dat new file mode 100644 index 0000000..74ac719 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_0/mask_97_0.dat differ diff --git a/common/util/phpqrcode/cache/mask_1/mask_101_1.dat b/common/util/phpqrcode/cache/mask_1/mask_101_1.dat new file mode 100644 index 0000000..ec939b5 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_1/mask_101_1.dat @@ -0,0 +1,2 @@ +x1 + н\QEd  1N<#Ֆ-7u.lԦeiXXXXXRZVVeIo1,,,,,v%?gaaaaY K&K=/+ۍ˱ގ \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_1/mask_105_1.dat b/common/util/phpqrcode/cache/mask_1/mask_105_1.dat new file mode 100644 index 0000000..e1f5c99 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_1/mask_105_1.dat @@ -0,0 +1 @@ +x1 Ӕ_Υb KB?"*#WʘtgӎJqUM9TLLvǤLLLLLLzgG01111yiߘ4m=՛n+2 \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_1/mask_109_1.dat b/common/util/phpqrcode/cache/mask_1/mask_109_1.dat new file mode 100644 index 0000000..7e0d6d1 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_1/mask_109_1.dat @@ -0,0 +1 @@ +xֱ >ӘK}:!iY'*3]fsmb[JƶŖK9}cccccc'u.6Ʀs6666R[^g{/lٷ 7͂ \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_1/mask_113_1.dat b/common/util/phpqrcode/cache/mask_1/mask_113_1.dat new file mode 100644 index 0000000..1dd666d --- /dev/null +++ b/common/util/phpqrcode/cache/mask_1/mask_113_1.dat @@ -0,0 +1 @@ +x1  -8fL(pBlDM9";-;?1p{\%-3:@ad4*Nadddddd########c]751xYu \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_1/mask_117_1.dat b/common/util/phpqrcode/cache/mask_1/mask_117_1.dat new file mode 100644 index 0000000..8921f64 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_1/mask_117_1.dat @@ -0,0 +1,2 @@ +xֻ >ӘK$^ 8YQSV'z8jzʇ^]סekXYYYYYYYjݵ# ++yeeeeeeee#WVVVVVVVV;"+yeeeeeeel'e;b&^9{/J$p \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_1/mask_121_1.dat b/common/util/phpqrcode/cache/mask_1/mask_121_1.dat new file mode 100644 index 0000000..64bd8ba --- /dev/null +++ b/common/util/phpqrcode/cache/mask_1/mask_121_1.dat @@ -0,0 +1,2 @@ +x1 + н\CPbїE$DdƩYtڅλ0$ήꝝga7yٯ痽Y??{{D \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_1/mask_129_1.dat b/common/util/phpqrcode/cache/mask_1/mask_129_1.dat new file mode 100644 index 0000000..62cd1c9 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_1/mask_129_1.dat differ diff --git a/common/util/phpqrcode/cache/mask_1/mask_133_1.dat b/common/util/phpqrcode/cache/mask_1/mask_133_1.dat new file mode 100644 index 0000000..18d68dc --- /dev/null +++ b/common/util/phpqrcode/cache/mask_1/mask_133_1.dat @@ -0,0 +1 @@ +x1 Ӕ_΅hh|"zۉ-*dNHQĢR ,X`c9Y(na_` ,X,X,X` #:8  ,X`Bd¾` ,X|ϢY\X; 7-; ` \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_1/mask_137_1.dat b/common/util/phpqrcode/cache/mask_1/mask_137_1.dat new file mode 100644 index 0000000..284d7be --- /dev/null +++ b/common/util/phpqrcode/cache/mask_1/mask_137_1.dat @@ -0,0 +1,3 @@ +x1 +0 ӤKh]D,-t #ڌQ[T Ks7_?9|B&X^L0a„&3„M&L0a„ &2D4c0a„ &LȀЌe„ &L0abwȀf,&L0a„7&y2anoL<01O + \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_1/mask_141_1.dat b/common/util/phpqrcode/cache/mask_1/mask_141_1.dat new file mode 100644 index 0000000..83220dd --- /dev/null +++ b/common/util/phpqrcode/cache/mask_1/mask_141_1.dat @@ -0,0 +1,2 @@ +x1 + >946)3$`s uʮ>Wd )g'M{3\d6ubذaÆ 6lؼn]Nذ9FްaÆ 6lذa3a#oذaÆ 6lذذ5e16lذaÆ ]Sbk6lذaÆ mͤ;CcfIdsG \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_1/mask_145_1.dat b/common/util/phpqrcode/cache/mask_1/mask_145_1.dat new file mode 100644 index 0000000..6a9950f --- /dev/null +++ b/common/util/phpqrcode/cache/mask_1/mask_145_1.dat @@ -0,0 +1 @@ +x!0@k 4a)q2i.YCUO{35UZFn]fN>bdwtzJF}F1bĈ#F(F6r1bĈ#F1E1ilF1bĈ#FtF#F1bĈ#FtZ}##F1bĈleHGܣ@ٝ \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_1/mask_149_1.dat b/common/util/phpqrcode/cache/mask_1/mask_149_1.dat new file mode 100644 index 0000000..02a3cdc --- /dev/null +++ b/common/util/phpqrcode/cache/mask_1/mask_149_1.dat @@ -0,0 +1 @@ +x1 Ӕ_΅qH_Xci#Gd̘Ք՛gLU^ݮVR>dKVXbŊ+VXeoXJ_bŊ+VXb;ݙ+}Ŋ+VXbŊ+VAVngŊ+VXbŊ}+ +VXbŊVj>hewf*`uTq \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_1/mask_153_1.dat b/common/util/phpqrcode/cache/mask_1/mask_153_1.dat new file mode 100644 index 0000000..2abfca2 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_1/mask_153_1.dat @@ -0,0 +1,2 @@ +x1 +0\9btEc'HH9efߞmffM#.̘1cƌ3f̘1cf73f̘g̘1cƌ3f̘1co2c]?3f̘1cƌ3f5Mf3f̘1cƌ3f̘17utf3f̘1cƌ3f̘=lj3>V \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_1/mask_157_1.dat b/common/util/phpqrcode/cache/mask_1/mask_157_1.dat new file mode 100644 index 0000000..17344b8 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_1/mask_157_1.dat @@ -0,0 +1,2 @@ +x1 + >94Sd/51V)SkJv7eGcǎ;vرc]Zٱc'رcǎ;vر+رg;vرcǎ;}V`N+رcǎ;v:;v;vرcǎ;;}Vޱcǎ;vص'vz#;]klwoA` \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_1/mask_161_1.dat b/common/util/phpqrcode/cache/mask_1/mask_161_1.dat new file mode 100644 index 0000000..669ade1 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_1/mask_161_1.dat @@ -0,0 +1 @@ +x10_΅Xš yi~Qbkvp7'M u=]([ 2dȐ +\' 2 2dȐ!C 2s0/3d() 2dȐ!C 241dh 2dȐ!C 2dhcȐSL2eʔ)SL2M SLSL2eʔ)SL2M}LSSL2eʔ)SLeSy)SŔ)SL2eʔ)S;ٔ)S;)SL2eʔ)Sv()Sv()SL2eʔ)SLdT6}a*3mljmzC' \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_1/mask_173_1.dat b/common/util/phpqrcode/cache/mask_1/mask_173_1.dat new file mode 100644 index 0000000..436918c --- /dev/null +++ b/common/util/phpqrcode/cache/mask_1/mask_173_1.dat @@ -0,0 +1 @@ +x1 Ӕ_Υ''@y]X1?"g:1犝fn˶˻mm.?lٲe˖-F>glٲ2lٲe˖-[lٲeO`˖e˖-[lٲe˖-[l lٲlٲe˖-[lٲeVO`˖e˖-[lٲe˖-[z0}[z0y˖-[lٲe˖-[Ee[hOVWö=t*| \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_1/mask_177_1.dat b/common/util/phpqrcode/cache/mask_1/mask_177_1.dat new file mode 100644 index 0000000..12e2e52 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_1/mask_177_1.dat @@ -0,0 +1 @@ +x1 Ep0X,a#r}6}nj~\8ƌ3f̘1cƌ7{3f,y3f̘1cƌ3fX_`X&3f̘1cƌ3f̘M_1cy̘1cƌ3f̘1cƌ+3f,y3f̘1cƌ3fX_bX&3f̘1cƌ3fx2dX'x[cy| 3 \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_1/mask_21_1.dat b/common/util/phpqrcode/cache/mask_1/mask_21_1.dat new file mode 100644 index 0000000..f87e0a1 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_1/mask_21_1.dat differ diff --git a/common/util/phpqrcode/cache/mask_1/mask_25_1.dat b/common/util/phpqrcode/cache/mask_1/mask_25_1.dat new file mode 100644 index 0000000..3a225e3 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_1/mask_25_1.dat differ diff --git a/common/util/phpqrcode/cache/mask_1/mask_29_1.dat b/common/util/phpqrcode/cache/mask_1/mask_29_1.dat new file mode 100644 index 0000000..0a1cb3b Binary files /dev/null and b/common/util/phpqrcode/cache/mask_1/mask_29_1.dat differ diff --git a/common/util/phpqrcode/cache/mask_1/mask_33_1.dat b/common/util/phpqrcode/cache/mask_1/mask_33_1.dat new file mode 100644 index 0000000..318949d Binary files /dev/null and b/common/util/phpqrcode/cache/mask_1/mask_33_1.dat differ diff --git a/common/util/phpqrcode/cache/mask_1/mask_37_1.dat b/common/util/phpqrcode/cache/mask_1/mask_37_1.dat new file mode 100644 index 0000000..5bd9e3a Binary files /dev/null and b/common/util/phpqrcode/cache/mask_1/mask_37_1.dat differ diff --git a/common/util/phpqrcode/cache/mask_1/mask_41_1.dat b/common/util/phpqrcode/cache/mask_1/mask_41_1.dat new file mode 100644 index 0000000..52e9e58 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_1/mask_41_1.dat differ diff --git a/common/util/phpqrcode/cache/mask_1/mask_45_1.dat b/common/util/phpqrcode/cache/mask_1/mask_45_1.dat new file mode 100644 index 0000000..b35c567 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_1/mask_45_1.dat differ diff --git a/common/util/phpqrcode/cache/mask_1/mask_49_1.dat b/common/util/phpqrcode/cache/mask_1/mask_49_1.dat new file mode 100644 index 0000000..d20d717 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_1/mask_49_1.dat differ diff --git a/common/util/phpqrcode/cache/mask_1/mask_53_1.dat b/common/util/phpqrcode/cache/mask_1/mask_53_1.dat new file mode 100644 index 0000000..a676d7d Binary files /dev/null and b/common/util/phpqrcode/cache/mask_1/mask_53_1.dat differ diff --git a/common/util/phpqrcode/cache/mask_1/mask_57_1.dat b/common/util/phpqrcode/cache/mask_1/mask_57_1.dat new file mode 100644 index 0000000..896ed43 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_1/mask_57_1.dat differ diff --git a/common/util/phpqrcode/cache/mask_1/mask_61_1.dat b/common/util/phpqrcode/cache/mask_1/mask_61_1.dat new file mode 100644 index 0000000..4165a4b --- /dev/null +++ b/common/util/phpqrcode/cache/mask_1/mask_61_1.dat @@ -0,0 +1 @@ +x30CbpPi`@&H^nadQG{n_.4Iy킎`)-5*(of[sm}6YM ;;;;;G{zطz1vw}=wuL%?"=~ei \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_1/mask_97_1.dat b/common/util/phpqrcode/cache/mask_1/mask_97_1.dat new file mode 100644 index 0000000..24fa60f --- /dev/null +++ b/common/util/phpqrcode/cache/mask_1/mask_97_1.dat @@ -0,0 +1,2 @@ +x1 +0н1\tncKD"H$DH$D"Q&WerH$D"*x[(?/'nd \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_2/mask_117_2.dat b/common/util/phpqrcode/cache/mask_2/mask_117_2.dat new file mode 100644 index 0000000..b4dcce4 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_2/mask_117_2.dat @@ -0,0 +1,2 @@ +x1 + >94!m dOs\0X,la5#E>Z[ַRT*JR?Q-*T*JR?UW*JRTݟ+JRԤ~m5;S&+ \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_2/mask_121_2.dat b/common/util/phpqrcode/cache/mask_2/mask_121_2.dat new file mode 100644 index 0000000..a2a0097 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_2/mask_121_2.dat differ diff --git a/common/util/phpqrcode/cache/mask_2/mask_125_2.dat b/common/util/phpqrcode/cache/mask_2/mask_125_2.dat new file mode 100644 index 0000000..0ea40fd --- /dev/null +++ b/common/util/phpqrcode/cache/mask_2/mask_125_2.dat @@ -0,0 +1 @@ +x! PӔ_@ U(kp@^Mڮ5-:VF_\t:NtyNqt:NtG;Nt:.8:NtzA}yNq;+n& \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_2/mask_129_2.dat b/common/util/phpqrcode/cache/mask_2/mask_129_2.dat new file mode 100644 index 0000000..bf04839 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_2/mask_129_2.dat @@ -0,0 +1,2 @@ +x1 +0н_KVڡ'.!w]A0X~  !࣠fK# xFy4 vey@^+  ~  L#veI \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_2/mask_133_2.dat b/common/util/phpqrcode/cache/mask_2/mask_133_2.dat new file mode 100644 index 0000000..9e78b6d --- /dev/null +++ b/common/util/phpqrcode/cache/mask_2/mask_133_2.dat @@ -0,0 +1,10 @@ +x1 + н&`LQ-g=Aqbʪl fƄȚ44& )OȚYF4444444444c4~9S:3ЌטpǮ> \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_2/mask_145_2.dat b/common/util/phpqrcode/cache/mask_2/mask_145_2.dat new file mode 100644 index 0000000..9ff2bbf --- /dev/null +++ b/common/util/phpqrcode/cache/mask_2/mask_145_2.dat @@ -0,0 +1,4 @@ +x1 + нr] +,tQ^&C~ +щj~mɾ.FgMDDDDDDDDDDDST׈DHdZL+ɴDDDDDDDDDDD2-'"""""""":BתEYDd \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_2/mask_149_2.dat b/common/util/phpqrcode/cache/mask_2/mask_149_2.dat new file mode 100644 index 0000000..d52e048 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_2/mask_149_2.dat @@ -0,0 +1 @@ +x;@/gcaGBXB'-ˆouէUQdRVOmT*ǫ;;j廝Ee2PQQQQQQQQQQQ TTTTTTTTTTTTr33R &Tskz_e2P=d \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_2/mask_153_2.dat b/common/util/phpqrcode/cache/mask_2/mask_153_2.dat new file mode 100644 index 0000000..3b06041 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_2/mask_153_2.dat @@ -0,0 +1,2 @@ +x1 +0 Ӥ8ZP!BZu賶"bu*)]MFFFFFFFFFFFF%= #ddddddddddddr ot2yFFFFFFFFFFFF& #k5L 2222222222(Y7"d@H \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_2/mask_157_2.dat b/common/util/phpqrcode/cache/mask_2/mask_157_2.dat new file mode 100644 index 0000000..2baf535 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_2/mask_157_2.dat @@ -0,0 +1,3 @@ +x1 +0>s6MqUH1X&U̘f/u-'.[KGGGGGGGGGGH|NG(ttttttttttNF;::::::::::}Nz$ +>n A#^AG(t =3{ \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_2/mask_161_2.dat b/common/util/phpqrcode/cache/mask_2/mask_161_2.dat new file mode 100644 index 0000000..d2df759 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_2/mask_161_2.dat differ diff --git a/common/util/phpqrcode/cache/mask_2/mask_165_2.dat b/common/util/phpqrcode/cache/mask_2/mask_165_2.dat new file mode 100644 index 0000000..2e6cd7c --- /dev/null +++ b/common/util/phpqrcode/cache/mask_2/mask_165_2.dat @@ -0,0 +1,2 @@ +x1 +0 Ӥ?BVUG%*+_fs MIIIIIIIII2d;l4()))))))))))eqJنIDIIIIIIIIIII)۠mPRRRRRRRRRRR6l JJJJJJJJJJJJن}RaQRRRRRRRRRRNeK?R퐔͔&W3U \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_2/mask_169_2.dat b/common/util/phpqrcode/cache/mask_2/mask_169_2.dat new file mode 100644 index 0000000..4052062 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_2/mask_169_2.dat differ diff --git a/common/util/phpqrcode/cache/mask_2/mask_173_2.dat b/common/util/phpqrcode/cache/mask_2/mask_173_2.dat new file mode 100644 index 0000000..0a30ba5 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_2/mask_173_2.dat @@ -0,0 +1 @@ +x+@ Pift:>y &d U߬S[]5Z;a5V۞A[Z˴VՃI0ZZZZZZZZZZZZZZ=-Lhi`VFK?ݧhioJ0}o \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_2/mask_177_2.dat b/common/util/phpqrcode/cache/mask_2/mask_177_2.dat new file mode 100644 index 0000000..d2c52f9 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_2/mask_177_2.dat @@ -0,0 +1,2 @@ +x1 + E>Y4V$~ ,C&U;Ook5bϙGx9%&&&&&&&&&&&n$OL|v#&&&&&&&&&&&&&bbݍXw#&l7bbbbbbbbbbbbbbM"l7bbbbbbbbbbbbbbMa!&݈3)U*F> \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_2/mask_45_2.dat b/common/util/phpqrcode/cache/mask_2/mask_45_2.dat new file mode 100644 index 0000000..ad44ff1 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_2/mask_45_2.dat differ diff --git a/common/util/phpqrcode/cache/mask_2/mask_49_2.dat b/common/util/phpqrcode/cache/mask_2/mask_49_2.dat new file mode 100644 index 0000000..6e8edff Binary files /dev/null and b/common/util/phpqrcode/cache/mask_2/mask_49_2.dat differ diff --git a/common/util/phpqrcode/cache/mask_2/mask_53_2.dat b/common/util/phpqrcode/cache/mask_2/mask_53_2.dat new file mode 100644 index 0000000..682cae2 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_2/mask_53_2.dat differ diff --git a/common/util/phpqrcode/cache/mask_2/mask_57_2.dat b/common/util/phpqrcode/cache/mask_2/mask_57_2.dat new file mode 100644 index 0000000..66a5c05 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_2/mask_57_2.dat differ diff --git a/common/util/phpqrcode/cache/mask_2/mask_61_2.dat b/common/util/phpqrcode/cache/mask_2/mask_61_2.dat new file mode 100644 index 0000000..77d3815 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_2/mask_61_2.dat differ diff --git a/common/util/phpqrcode/cache/mask_2/mask_65_2.dat b/common/util/phpqrcode/cache/mask_2/mask_65_2.dat new file mode 100644 index 0000000..caf184a Binary files /dev/null and b/common/util/phpqrcode/cache/mask_2/mask_65_2.dat differ diff --git a/common/util/phpqrcode/cache/mask_2/mask_69_2.dat b/common/util/phpqrcode/cache/mask_2/mask_69_2.dat new file mode 100644 index 0000000..6a3801b Binary files /dev/null and b/common/util/phpqrcode/cache/mask_2/mask_69_2.dat differ diff --git a/common/util/phpqrcode/cache/mask_2/mask_73_2.dat b/common/util/phpqrcode/cache/mask_2/mask_73_2.dat new file mode 100644 index 0000000..74945b7 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_2/mask_73_2.dat differ diff --git a/common/util/phpqrcode/cache/mask_2/mask_77_2.dat b/common/util/phpqrcode/cache/mask_2/mask_77_2.dat new file mode 100644 index 0000000..903cba4 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_2/mask_77_2.dat @@ -0,0 +1 @@ +x1 н_CM>Gt ѫe+FWZEm&gއFѶhF+t/FYvFj[*7a \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_2/mask_81_2.dat b/common/util/phpqrcode/cache/mask_2/mask_81_2.dat new file mode 100644 index 0000000..17a9ac2 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_2/mask_81_2.dat @@ -0,0 +1,2 @@ +x1 +0н_KҩVi!O\"A]:xbW1uȦ&_T ΋6H$U^D~bׯb=gX \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_2/mask_85_2.dat b/common/util/phpqrcode/cache/mask_2/mask_85_2.dat new file mode 100644 index 0000000..72c74ff --- /dev/null +++ b/common/util/phpqrcode/cache/mask_2/mask_85_2.dat @@ -0,0 +1,2 @@ +x1 +0=1\B7O$A0$8Wwjguu槊RT*uS֧JRTJRRޢN浘V \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_2/mask_89_2.dat b/common/util/phpqrcode/cache/mask_2/mask_89_2.dat new file mode 100644 index 0000000..06c9a4f --- /dev/null +++ b/common/util/phpqrcode/cache/mask_2/mask_89_2.dat @@ -0,0 +1 @@ +xٱ 0 >/&E*cQqŃ zf$rM)_%s_d3KO1^aL,$H"$KzRPt[I&X9$H"$I$ysI$DI$ɓI$I$Dɍ%es!=LAZ5'̓IVrn/2oƅ \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_3/mask_113_3.dat b/common/util/phpqrcode/cache/mask_3/mask_113_3.dat new file mode 100644 index 0000000..023b273 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_3/mask_113_3.dat @@ -0,0 +1,2 @@ +xA +0 D}NrnDFj2KCt?WݲZi.qoP %Smj7ަ:*N:@:***fW9d2*j*}S@`*j৪6Jlѿ}}էTUa24hnt \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_3/mask_117_3.dat b/common/util/phpqrcode/cache/mask_3/mask_117_3.dat new file mode 100644 index 0000000..79cc04d --- /dev/null +++ b/common/util/phpqrcode/cache/mask_3/mask_117_3.dat @@ -0,0 +1,4 @@ +x1 +0 ]Q.xIB$?~!z#E)RHZ@bl-)ݿ<ߧ*OUR"5&5*ie J]+ \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_3/mask_145_3.dat b/common/util/phpqrcode/cache/mask_3/mask_145_3.dat new file mode 100644 index 0000000..338b7e7 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_3/mask_145_3.dat @@ -0,0 +1,3 @@ +x +@|:^ Jy̡yMj-' +9VS֦K9e)PyUwe-m jԨQF5jԨRi٫F4_wk}0+jRBRF5jԨQeOMBJHjԨQF5jwP״˪IH I5jԨQFͳc w5jԨQF:zS*2UZ_C*e_OZ%dIȯb \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_3/mask_149_3.dat b/common/util/phpqrcode/cache/mask_3/mask_149_3.dat new file mode 100644 index 0000000..30bc5fa --- /dev/null +++ b/common/util/phpqrcode/cache/mask_3/mask_149_3.dat @@ -0,0 +1 @@ +xA0}Oܠ⦐H頯'Z2{oV|Ι%>yR{!8ÂI+JpI|#f5κ[P A $H Q})&X{ט+Wb`I)5%d \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_3/mask_153_3.dat b/common/util/phpqrcode/cache/mask_3/mask_153_3.dat new file mode 100644 index 0000000..89cdec0 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_3/mask_153_3.dat @@ -0,0 +1,2 @@ +xA +0}Ns˹)7mJ,}8X=cW^GeN}o%uJV/{%O>}ӧO}K~O>}ӧO>Q=/ї>}ӧO>}u{ח>}ӧO>}u{蟪/%?}ӧO>}ׯ.N4჏VMmRt(1| \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_3/mask_177_3.dat b/common/util/phpqrcode/cache/mask_3/mask_177_3.dat new file mode 100644 index 0000000..9586979 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_3/mask_177_3.dat differ diff --git a/common/util/phpqrcode/cache/mask_3/mask_21_3.dat b/common/util/phpqrcode/cache/mask_3/mask_21_3.dat new file mode 100644 index 0000000..bcb4eec Binary files /dev/null and b/common/util/phpqrcode/cache/mask_3/mask_21_3.dat differ diff --git a/common/util/phpqrcode/cache/mask_3/mask_25_3.dat b/common/util/phpqrcode/cache/mask_3/mask_25_3.dat new file mode 100644 index 0000000..0ffc375 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_3/mask_25_3.dat differ diff --git a/common/util/phpqrcode/cache/mask_3/mask_29_3.dat b/common/util/phpqrcode/cache/mask_3/mask_29_3.dat new file mode 100644 index 0000000..6150ac1 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_3/mask_29_3.dat differ diff --git a/common/util/phpqrcode/cache/mask_3/mask_33_3.dat b/common/util/phpqrcode/cache/mask_3/mask_33_3.dat new file mode 100644 index 0000000..6053b5e Binary files /dev/null and b/common/util/phpqrcode/cache/mask_3/mask_33_3.dat differ diff --git a/common/util/phpqrcode/cache/mask_3/mask_37_3.dat b/common/util/phpqrcode/cache/mask_3/mask_37_3.dat new file mode 100644 index 0000000..5dea5b9 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_3/mask_37_3.dat differ diff --git a/common/util/phpqrcode/cache/mask_3/mask_41_3.dat b/common/util/phpqrcode/cache/mask_3/mask_41_3.dat new file mode 100644 index 0000000..ca9ddc2 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_3/mask_41_3.dat differ diff --git a/common/util/phpqrcode/cache/mask_3/mask_45_3.dat b/common/util/phpqrcode/cache/mask_3/mask_45_3.dat new file mode 100644 index 0000000..3daad97 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_3/mask_45_3.dat @@ -0,0 +1,2 @@ +xK + DsFJ(&)0dЇFg![8=&iaD)d8&Aլa 1'II׳79 ex߾ I&֝CuJy \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_3/mask_49_3.dat b/common/util/phpqrcode/cache/mask_3/mask_49_3.dat new file mode 100644 index 0000000..7f6508d Binary files /dev/null and b/common/util/phpqrcode/cache/mask_3/mask_49_3.dat differ diff --git a/common/util/phpqrcode/cache/mask_3/mask_53_3.dat b/common/util/phpqrcode/cache/mask_3/mask_53_3.dat new file mode 100644 index 0000000..8800bea --- /dev/null +++ b/common/util/phpqrcode/cache/mask_3/mask_53_3.dat @@ -0,0 +1,2 @@ +xK +0Ds ! -(.Bp&|"-t&`qQ-"9_+)Be/H8D%a~}spKFN=,;;a^t4\FSN \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_3/mask_57_3.dat b/common/util/phpqrcode/cache/mask_3/mask_57_3.dat new file mode 100644 index 0000000..4e1e5da Binary files /dev/null and b/common/util/phpqrcode/cache/mask_3/mask_57_3.dat differ diff --git a/common/util/phpqrcode/cache/mask_3/mask_61_3.dat b/common/util/phpqrcode/cache/mask_3/mask_61_3.dat new file mode 100644 index 0000000..bf1a3cc --- /dev/null +++ b/common/util/phpqrcode/cache/mask_3/mask_61_3.dat @@ -0,0 +1,2 @@ +xA +0fz4-%*dp!yZܫu(~=&ۓ)R2"/"<9FΊ=rb"/rw"2B#3-0-KW \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_3/mask_65_3.dat b/common/util/phpqrcode/cache/mask_3/mask_65_3.dat new file mode 100644 index 0000000..8589208 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_3/mask_65_3.dat @@ -0,0 +1,2 @@ +xQ + D4\?R ,!O-Nv1:cZu "UMÕF ~jK-la[^q^Q\=o-laZpUB @IKJzɢ|1Í  \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_3/mask_69_3.dat b/common/util/phpqrcode/cache/mask_3/mask_69_3.dat new file mode 100644 index 0000000..55318a8 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_3/mask_69_3.dat @@ -0,0 +1,2 @@ +x +0 {&2'd l=,Fy;$쇤WE-R:%T,O2g"",Ȣ/DyĈɧ{O䮳",:NvEWN#(&,,]x؅ \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_3/mask_73_3.dat b/common/util/phpqrcode/cache/mask_3/mask_73_3.dat new file mode 100644 index 0000000..15be77f --- /dev/null +++ b/common/util/phpqrcode/cache/mask_3/mask_73_3.dat @@ -0,0 +1,2 @@ +xQ +0 C{g;JJ?dԬK=RasJhTJ6exka\$nIE,-/XB*х=wee4t̒tLщtt߫b gFf qoddn-? \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_3/mask_77_3.dat b/common/util/phpqrcode/cache/mask_3/mask_77_3.dat new file mode 100644 index 0000000..ec78280 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_3/mask_77_3.dat @@ -0,0 +1,2 @@ +xA +0 &BiRaK"t`I@|fXyilE:Sza18GifK*?:YC1쌞졘(ቷJ*jl*TRIKR^ؙks)c)c)JZa \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_3/mask_81_3.dat b/common/util/phpqrcode/cache/mask_3/mask_81_3.dat new file mode 100644 index 0000000..47bc0f7 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_3/mask_81_3.dat @@ -0,0 +1,2 @@ +x1 + F=\,JGAġhj>#3X:kԹ\FM Jhu3>TZ{PSgP'kVjժU_ۯUV=P oO:Wҝj[Wxm 5 \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_3/mask_85_3.dat b/common/util/phpqrcode/cache/mask_3/mask_85_3.dat new file mode 100644 index 0000000..02c4f8c Binary files /dev/null and b/common/util/phpqrcode/cache/mask_3/mask_85_3.dat differ diff --git a/common/util/phpqrcode/cache/mask_3/mask_89_3.dat b/common/util/phpqrcode/cache/mask_3/mask_89_3.dat new file mode 100644 index 0000000..2b4cb59 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_3/mask_89_3.dat @@ -0,0 +1,2 @@ +x1 ὧ) *.@U |eŵ6ۢw5*) oiK4nk>1}d>@ 4XYCo ۡ1<AhFt + 4@51Wr>7G}}x7|NgN \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_3/mask_93_3.dat b/common/util/phpqrcode/cache/mask_3/mask_93_3.dat new file mode 100644 index 0000000..b4cc8a9 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_3/mask_93_3.dat @@ -0,0 +1,2 @@ +xA +0 D}NrnJɪQ~B06na<<ׇe6MRCP L̓i9M 2 LkŮdDv*"aXjBdAddZTdAdqY0exqeN&WVQvc \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_3/mask_97_3.dat b/common/util/phpqrcode/cache/mask_3/mask_97_3.dat new file mode 100644 index 0000000..7adc9eb Binary files /dev/null and b/common/util/phpqrcode/cache/mask_3/mask_97_3.dat differ diff --git a/common/util/phpqrcode/cache/mask_4/mask_101_4.dat b/common/util/phpqrcode/cache/mask_4/mask_101_4.dat new file mode 100644 index 0000000..1c97dc0 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_4/mask_101_4.dat @@ -0,0 +1,2 @@ +xA Fs^1bИ]4m+8+Ve^HR]\c +oWN#X+l HEcp \^.9qW9":.BB \0aPǨcp \ONqjpG}}$.˅ \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_4/mask_105_4.dat b/common/util/phpqrcode/cache/mask_4/mask_105_4.dat new file mode 100644 index 0000000..0211cdb --- /dev/null +++ b/common/util/phpqrcode/cache/mask_4/mask_105_4.dat @@ -0,0 +1,2 @@ +xK +0 D=Mr˹A TeEFL2 #鹢_I!딤Ѻ-իkmO]sS T6*'8 N$'NZ^}rU*G9r|c[cN[_=׫5^J 1*qv \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_4/mask_117_4.dat b/common/util/phpqrcode/cache/mask_4/mask_117_4.dat new file mode 100644 index 0000000..3867259 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_4/mask_117_4.dat @@ -0,0 +1,2 @@ +x + н_s]4Dgn2Jj}ҾRsSWGRɧ)5Em#ܯk_"z3\rʕ+r Lk|/{;'/#\p\p># \p\p#>qp\p.$Iq dGR_4  \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_4/mask_137_4.dat b/common/util/phpqrcode/cache/mask_4/mask_137_4.dat new file mode 100644 index 0000000..0c09c48 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_4/mask_137_4.dat differ diff --git a/common/util/phpqrcode/cache/mask_4/mask_141_4.dat b/common/util/phpqrcode/cache/mask_4/mask_141_4.dat new file mode 100644 index 0000000..62b03f2 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_4/mask_141_4.dat differ diff --git a/common/util/phpqrcode/cache/mask_4/mask_145_4.dat b/common/util/phpqrcode/cache/mask_4/mask_145_4.dat new file mode 100644 index 0000000..33fb211 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_4/mask_145_4.dat differ diff --git a/common/util/phpqrcode/cache/mask_4/mask_149_4.dat b/common/util/phpqrcode/cache/mask_4/mask_149_4.dat new file mode 100644 index 0000000..de99310 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_4/mask_149_4.dat @@ -0,0 +1,2 @@ +x +!н_sm +XӋ9=.=Zka]ޒ> Kjo |SSWKZm׌j\Ъ2 W\qW\q"~ jvtv_\qW\qW\q%g3 }+++ r9ArW\qW\qŕA g3WA W\qW\qW]V~v{D3Ȝ!\W^Tڍ[S7vۜgq? +{peo383838{YXz,_OYfe3s38383\C!Ms38383r \C?37938383\C!07M8383q,mMrskWv3~W WB \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_4/mask_157_4.dat b/common/util/phpqrcode/cache/mask_4/mask_157_4.dat new file mode 100644 index 0000000..ad5fcf6 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_4/mask_157_4.dat @@ -0,0 +1 @@ +x10ޯs4"FP=iRX¢X0멪u 4ftl}m➭S|юS P5<]rwqwq^QN6ÏZsߙ,wqwqǝ>Μ5g;;Y}Vgw,wqwqw>9wqwq>3gY;[ww?P3Ƙggt퐮;].3w4A \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_4/mask_161_4.dat b/common/util/phpqrcode/cache/mask_4/mask_161_4.dat new file mode 100644 index 0000000..7604c45 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_4/mask_161_4.dat @@ -0,0 +1 @@ +xA@ fs!AL_|,4l)iml׉0' +E ]N\x#2/_{7g9쏼ٷ}2r!?}-#Te9C9C9~6Sʇ겺!r!r!ۘse9C9C94_Ɯ|.r!r!s/s0 2r!r8}DwrDXΡ|x|!2 \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_4/mask_165_4.dat b/common/util/phpqrcode/cache/mask_4/mask_165_4.dat new file mode 100644 index 0000000..d83d631 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_4/mask_165_4.dat @@ -0,0 +1,3 @@ +xA +1 }Or."*?fPLHIkΫZQ8 +Gyqk-n5+?|֎kKnEŹK.K.?2.|EJ{2<:.Ku\K.K.ǝmu)_8\r%\r%\Џ;'2!_8\r%\r%\Џ;'2!_\r%\r%\rinC?nn9 RK.K.;.HqY'ݽNF?K㕢,R| My*3 \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_4/mask_169_4.dat b/common/util/phpqrcode/cache/mask_4/mask_169_4.dat new file mode 100644 index 0000000..4aac95c Binary files /dev/null and b/common/util/phpqrcode/cache/mask_4/mask_169_4.dat differ diff --git a/common/util/phpqrcode/cache/mask_4/mask_173_4.dat b/common/util/phpqrcode/cache/mask_4/mask_173_4.dat new file mode 100644 index 0000000..9df4d86 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_4/mask_173_4.dat @@ -0,0 +1,2 @@ +xK +1}Nrna ~ZY!Jt^5(/jkz[pj_?~v:|jwՖ_mXzo6?naCe \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_4/mask_81_4.dat b/common/util/phpqrcode/cache/mask_4/mask_81_4.dat new file mode 100644 index 0000000..dd65216 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_4/mask_81_4.dat @@ -0,0 +1,3 @@ +xA +0 yMyXE m7"892ѸQ1ݳ+xx;t35DIY1x\:u}e/ #Th< +UBz<5G<5{G<5<饫>]Urxu \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_4/mask_85_4.dat b/common/util/phpqrcode/cache/mask_4/mask_85_4.dat new file mode 100644 index 0000000..c8d5123 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_4/mask_85_4.dat differ diff --git a/common/util/phpqrcode/cache/mask_4/mask_89_4.dat b/common/util/phpqrcode/cache/mask_4/mask_89_4.dat new file mode 100644 index 0000000..5b9bd7e --- /dev/null +++ b/common/util/phpqrcode/cache/mask_4/mask_89_4.dat @@ -0,0 +1,2 @@ +x1 +0 ὧI9%  Vڀfr0}z=#9ҕ:~s1BՁg&4pgq.p.&gT05rgsgqrg捯u38k.Egmb*&7? : \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_4/mask_93_4.dat b/common/util/phpqrcode/cache/mask_4/mask_93_4.dat new file mode 100644 index 0000000..be7f5e5 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_4/mask_93_4.dat @@ -0,0 +1,2 @@ +xK + ὧIn$}PŌB]N@%sfkҫ}CzoA}aʽ2|~D&l=Ywq}q\EYjK_ywqwz$==;_݋>+pH9Di \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_4/mask_97_4.dat b/common/util/phpqrcode/cache/mask_4/mask_97_4.dat new file mode 100644 index 0000000..5d848ca Binary files /dev/null and b/common/util/phpqrcode/cache/mask_4/mask_97_4.dat differ diff --git a/common/util/phpqrcode/cache/mask_5/mask_101_5.dat b/common/util/phpqrcode/cache/mask_5/mask_101_5.dat new file mode 100644 index 0000000..c21869e --- /dev/null +++ b/common/util/phpqrcode/cache/mask_5/mask_101_5.dat @@ -0,0 +1,2 @@ +x + E+%=M3Cbv ѬNkûgqkqq{%Oo,iKee3[|iVh]` ` 0ʕz˴T0Gu/q8F13:W>#ȕ0c0Q8E=F#+a X͞+cV%9W>Q]TkY-gLqD艋 \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_5/mask_105_5.dat b/common/util/phpqrcode/cache/mask_5/mask_105_5.dat new file mode 100644 index 0000000..bc8798c Binary files /dev/null and b/common/util/phpqrcode/cache/mask_5/mask_105_5.dat differ diff --git a/common/util/phpqrcode/cache/mask_5/mask_109_5.dat b/common/util/phpqrcode/cache/mask_5/mask_109_5.dat new file mode 100644 index 0000000..25a3944 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_5/mask_109_5.dat differ diff --git a/common/util/phpqrcode/cache/mask_5/mask_113_5.dat b/common/util/phpqrcode/cache/mask_5/mask_113_5.dat new file mode 100644 index 0000000..25f42b8 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_5/mask_113_5.dat @@ -0,0 +1,9 @@ +x +0D^6I63[[EDqc+jy81\c +7c?u}DK4},kkg--3[UƂyUXUXSV:ϫ՝,|кS⫰ + + +Vɫ*X[* + + +zU*NV*JUXUXSXijTi4fZkU^_~Ux }ծZ/r \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_5/mask_117_5.dat b/common/util/phpqrcode/cache/mask_5/mask_117_5.dat new file mode 100644 index 0000000..f236940 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_5/mask_117_5.dat @@ -0,0 +1 @@ +x D|Mn/*{M+pI_&m-ѾC32u?o-kgB7wc=U%yoRhӯșDo:ֶyRJkQ^aaaqOgiJ ;qOg)ӊ0 0 0 [vö>=>0 0 0 Ofz3=>0 0 0.3Z$׷8\pw4:Zp:qX 7 \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_5/mask_121_5.dat b/common/util/phpqrcode/cache/mask_5/mask_121_5.dat new file mode 100644 index 0000000..9bb5c41 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_5/mask_121_5.dat differ diff --git a/common/util/phpqrcode/cache/mask_5/mask_125_5.dat b/common/util/phpqrcode/cache/mask_5/mask_125_5.dat new file mode 100644 index 0000000..2161c50 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_5/mask_125_5.dat @@ -0,0 +1,2 @@ +xA + E&fc;S$?؏Q4YahûyJ}9g==li.;nh_wz.qCWȧy uPk;<<<|*q, mkWqNl% yyyy^2䰅sX|aaaa3ϙ9lH<<<<̿웁[n`Tq8^vy \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_5/mask_129_5.dat b/common/util/phpqrcode/cache/mask_5/mask_129_5.dat new file mode 100644 index 0000000..f0c1d65 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_5/mask_129_5.dat differ diff --git a/common/util/phpqrcode/cache/mask_5/mask_133_5.dat b/common/util/phpqrcode/cache/mask_5/mask_133_5.dat new file mode 100644 index 0000000..46be8b0 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_5/mask_133_5.dat @@ -0,0 +1,2 @@ +xA +0 DѽOcr]4%1mCTxΜ[Dv={FEϏq?ݿ9keѭ}'2^c4G:3=JK-F0`#Hw'#<{~Z4 :BG舻F0`G~:`#?#tw-`#?##t#F0r}Q}eR;M/k1mX=hsH"k M:3qOW}9ԖIH1G;- sڶ?[%M + v#;zg^3d}69Ψޙ@7҄#gv`;׳ީ\$wlv`v;ލ}7wߑa;vkA#gv`=N2wxgWӤ@n?c}SQ:Zd?+9vz)P \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_5/mask_141_5.dat b/common/util/phpqrcode/cache/mask_5/mask_141_5.dat new file mode 100644 index 0000000..60c1a8e Binary files /dev/null and b/common/util/phpqrcode/cache/mask_5/mask_141_5.dat differ diff --git a/common/util/phpqrcode/cache/mask_5/mask_145_5.dat b/common/util/phpqrcode/cache/mask_5/mask_145_5.dat new file mode 100644 index 0000000..9303c07 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_5/mask_145_5.dat differ diff --git a/common/util/phpqrcode/cache/mask_5/mask_149_5.dat b/common/util/phpqrcode/cache/mask_5/mask_149_5.dat new file mode 100644 index 0000000..4256cef --- /dev/null +++ b/common/util/phpqrcode/cache/mask_5/mask_149_5.dat @@ -0,0 +1,3 @@ +x[ +0&c}-s+'^;Ax=Q_gUݏﵪxGTȺV¹UUE_IǴ;T1̠ +]W 2 2 |o5uꆬuI:(WKU躒rPAdAdA; vo_zNO{2rPA9 2 29}^O挞rwQdAdAnMA9(dAdA^W Z.+G^K`׵}`_Fk \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_5/mask_153_5.dat b/common/util/phpqrcode/cache/mask_5/mask_153_5.dat new file mode 100644 index 0000000..deea09d --- /dev/null +++ b/common/util/phpqrcode/cache/mask_5/mask_153_5.dat @@ -0,0 +1,2 @@ +x +@wfЬ`D"Ie<:au,7Of۳uP6~szs,jլcVZvߨm s^uHYu&l&l&_9 ;]^jsO;ܔrSn&l&l9yכzA rSnM6dM6dM6ރ@/$7ܔl&l&lzŽzACrSnM6dM6dOl7ᰚUuN֛FcPPS,l;HO \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_5/mask_157_5.dat b/common/util/phpqrcode/cache/mask_5/mask_157_5.dat new file mode 100644 index 0000000..176e2a6 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_5/mask_157_5.dat @@ -0,0 +1 @@ +x10Dާri( r* \~>C*vs]Ŝ_{W!zﶬ/)˙v V6V޻,f1Yb n^o>\O],,b,f1YyVgYYYb,f1+ʳ<˳<˳1YbŬ<+ʳ,,b,f1YyVgYYYb,fukys77}vmb=wsw)tW: \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_5/mask_161_5.dat b/common/util/phpqrcode/cache/mask_5/mask_161_5.dat new file mode 100644 index 0000000..70d5fb0 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_5/mask_161_5.dat @@ -0,0 +1,2 @@ +xI +@нDp@ o|m rHk㨤~co^Jzװ#5l¦S_92 [}ZÊ=T2ƀP2[cV衆CYf'-X9>v~usK5`e,2,2,2-///o_q}K\reYfeYf峖o+/,\feYfeYfٳexB.e2,2,̲g+l\r16,2,>ϰ=te&_4=tU}/>>>Or5/u>/g}g}gOsvO}/g}g}ٷGo-w{r_{g}g}g_n=n]4Nkβ_M8m?SF< \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_5/mask_173_5.dat b/common/util/phpqrcode/cache/mask_5/mask_173_5.dat new file mode 100644 index 0000000..f9a6741 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_5/mask_173_5.dat @@ -0,0 +1,4 @@ +x[ +0&G1gD)[CzeDѷц=RN6FJm JqP}x s_}GFy; +[;]ek[QbTmy&0 L`̄Y?رw؛ fcVN9&0 L`ׄZ}0=F=F9ANL`&0 L`BzYfI=F9AN&0 L`&0 fIsr ' L`&0 L`<i͒"9AN&0 L`VaBX",Um> +=wZgBΜP !8 \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_5/mask_177_5.dat b/common/util/phpqrcode/cache/mask_5/mask_177_5.dat new file mode 100644 index 0000000..b07c636 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_5/mask_177_5.dat @@ -0,0 +1,11 @@ +xъ0~ܾح uO,"% :$Xui=ѶՃgƸ?Ώq.So~z׉W:=h1cq]Ƕi!r8Ɓ`+X +V jj;8ƁX+ +oV`+X +V?[1^h-ֳ5Z;rmS+ +oV`+X +V;Z,YMB+ +V`+X +VZeڦ}r\!W`+X +V`+3Km>SB+ +V`+X +Vc㊛{g;^Qq5ZUݮQL0+*&YDq*6 \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_5/mask_21_5.dat b/common/util/phpqrcode/cache/mask_5/mask_21_5.dat new file mode 100644 index 0000000..04f97ea Binary files /dev/null and b/common/util/phpqrcode/cache/mask_5/mask_21_5.dat differ diff --git a/common/util/phpqrcode/cache/mask_5/mask_25_5.dat b/common/util/phpqrcode/cache/mask_5/mask_25_5.dat new file mode 100644 index 0000000..c20b59b --- /dev/null +++ b/common/util/phpqrcode/cache/mask_5/mask_25_5.dat @@ -0,0 +1,2 @@ +xڝa +@!4 ޳ʢ ?,""j?n=GZy:DR \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_5/mask_33_5.dat b/common/util/phpqrcode/cache/mask_5/mask_33_5.dat new file mode 100644 index 0000000..726d7fd Binary files /dev/null and b/common/util/phpqrcode/cache/mask_5/mask_33_5.dat differ diff --git a/common/util/phpqrcode/cache/mask_5/mask_37_5.dat b/common/util/phpqrcode/cache/mask_5/mask_37_5.dat new file mode 100644 index 0000000..6d32ca6 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_5/mask_37_5.dat differ diff --git a/common/util/phpqrcode/cache/mask_5/mask_41_5.dat b/common/util/phpqrcode/cache/mask_5/mask_41_5.dat new file mode 100644 index 0000000..e07c617 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_5/mask_41_5.dat @@ -0,0 +1,2 @@ +xTA + 5?7XMtxҴx ?@7@~"N$Sɰ{+CA'r\Pp<ޏ- ͺ:S3sԉۻީz#qw > \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_5/mask_45_5.dat b/common/util/phpqrcode/cache/mask_5/mask_45_5.dat new file mode 100644 index 0000000..5168a17 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_5/mask_45_5.dat @@ -0,0 +1 @@ +xUA 5?U:N&Z":;4P1=bNvSGM1˛n'(κ J{Eѵs] ,sq \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_5/mask_49_5.dat b/common/util/phpqrcode/cache/mask_5/mask_49_5.dat new file mode 100644 index 0000000..9f3f3cd Binary files /dev/null and b/common/util/phpqrcode/cache/mask_5/mask_49_5.dat differ diff --git a/common/util/phpqrcode/cache/mask_5/mask_53_5.dat b/common/util/phpqrcode/cache/mask_5/mask_53_5.dat new file mode 100644 index 0000000..449807b --- /dev/null +++ b/common/util/phpqrcode/cache/mask_5/mask_53_5.dat @@ -0,0 +1 @@ +xVA " zYf5ƐJC A;l\,dR. \(e_ еaNi5\żaLP(;2שjN6O u+l{y6od^ C[%  \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_5/mask_57_5.dat b/common/util/phpqrcode/cache/mask_5/mask_57_5.dat new file mode 100644 index 0000000..c7dd81f --- /dev/null +++ b/common/util/phpqrcode/cache/mask_5/mask_57_5.dat @@ -0,0 +1,2 @@ +xVA + 5?NlZHAbBZ0a Md`1z'"<Ր19nvͨ. )bݻ~;9Z#tB~ \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_5/mask_65_5.dat b/common/util/phpqrcode/cache/mask_5/mask_65_5.dat new file mode 100644 index 0000000..ecd9380 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_5/mask_65_5.dat differ diff --git a/common/util/phpqrcode/cache/mask_5/mask_69_5.dat b/common/util/phpqrcode/cache/mask_5/mask_69_5.dat new file mode 100644 index 0000000..ead4edc Binary files /dev/null and b/common/util/phpqrcode/cache/mask_5/mask_69_5.dat differ diff --git a/common/util/phpqrcode/cache/mask_5/mask_73_5.dat b/common/util/phpqrcode/cache/mask_5/mask_73_5.dat new file mode 100644 index 0000000..0000117 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_5/mask_73_5.dat differ diff --git a/common/util/phpqrcode/cache/mask_5/mask_77_5.dat b/common/util/phpqrcode/cache/mask_5/mask_77_5.dat new file mode 100644 index 0000000..1652cdc --- /dev/null +++ b/common/util/phpqrcode/cache/mask_5/mask_77_5.dat @@ -0,0 +1 @@ +xQ Cw#&C`T6ƹB(9 'ֆڢzk"hv.` cXB5[(F>71/34Ϊz^'[FyglgM>OTL4ϔ{&3Wy*ʧb*`<3;Vo0/s6n0ya[mcE \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_5/mask_81_5.dat b/common/util/phpqrcode/cache/mask_5/mask_81_5.dat new file mode 100644 index 0000000..71215e9 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_5/mask_81_5.dat @@ -0,0 +1,3 @@ +x + C~M?tzU4" }tMX2|.ɋ˙F\~m4Xu +ٔ, w:EƄ>X̯=_]g>>zמ/)5ךkkkZsXXY{ܮ}~mt:S#&;U#) \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_5/mask_85_5.dat b/common/util/phpqrcode/cache/mask_5/mask_85_5.dat new file mode 100644 index 0000000..09cf0e2 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_5/mask_85_5.dat differ diff --git a/common/util/phpqrcode/cache/mask_5/mask_89_5.dat b/common/util/phpqrcode/cache/mask_5/mask_89_5.dat new file mode 100644 index 0000000..5fff530 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_5/mask_89_5.dat @@ -0,0 +1,2 @@ +x + 45enpQ Gcfl^^;;b5;`kU͹߮j`NsO=\[a6~nLD? !6uF%w*Ȭkf77SĆbÆXodw_—mbClNۙ ck&YVoܡ׷BעبAl6 Jjx \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_5/mask_93_5.dat b/common/util/phpqrcode/cache/mask_5/mask_93_5.dat new file mode 100644 index 0000000..ec4240b --- /dev/null +++ b/common/util/phpqrcode/cache/mask_5/mask_93_5.dat @@ -0,0 +1,2 @@ +xK +0 D>&&  fP^8BY5s(imҮ=f3/wۧEyYQwf[} [90303ef̙3'3=,ͼwxDַ.,;s%g,,,=Rὓ7uKKTD<(n lYhV۹sޕyPEtyY]ns ;ss,!LkԅcbL12cX91Z#XEn#;svT~L~LR11vs.1111J1&؍Ń111J1&ƞg KLƪjlk{gڞ5K1/ǐ~,ac$ \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_6/mask_105_6.dat b/common/util/phpqrcode/cache/mask_6/mask_105_6.dat new file mode 100644 index 0000000..a58fec7 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_6/mask_105_6.dat @@ -0,0 +1,3 @@ +xQ +@ DskBZ#o)Sd}Gܷl쯯^)G]S4S?#BZ:+{sHKNiI!me1 +RWe9!``Uyˀu:檞U=w-oԺwB}cMK蹰{{=y蹰{{=y蹰{wScaoi'fyO=CyO=Cy[{S޻=;|v4}ϯ20 \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_6/mask_109_6.dat b/common/util/phpqrcode/cache/mask_6/mask_109_6.dat new file mode 100644 index 0000000..be7b474 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_6/mask_109_6.dat @@ -0,0 +1 @@ +xA0 ~ρDBHCHV20nuol쯯˻=ۢs9[l'?7R" &2:7QqX_n ]$՚EIY*Lq0 0 0{LJз(s\ɳwX-7^ItIII$~?N0 0 0O'Itg7L$L-Iuzrfr M^'}(O~R]1YLĞu9Qӕ \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_6/mask_113_6.dat b/common/util/phpqrcode/cache/mask_6/mask_113_6.dat new file mode 100644 index 0000000..397f527 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_6/mask_113_6.dat @@ -0,0 +1,3 @@ +x E5NՉbF6on,m>gS9RWcǕ9&%1_cx= GR^w-z?dzv=,}ԥ?ǹژ:9m==@U䲉UXUXVe~by4Wi:e=ɼÆ$<>Ov'Cytaaaa~|'9liΣ<<<<Iæ<:<<<ٕWDzy:.z= ݓʯ sVöE=ll_k0_#vίmj \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_6/mask_129_6.dat b/common/util/phpqrcode/cache/mask_6/mask_129_6.dat new file mode 100644 index 0000000..b4695c3 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_6/mask_129_6.dat differ diff --git a/common/util/phpqrcode/cache/mask_6/mask_133_6.dat b/common/util/phpqrcode/cache/mask_6/mask_133_6.dat new file mode 100644 index 0000000..40911dc Binary files /dev/null and b/common/util/phpqrcode/cache/mask_6/mask_133_6.dat differ diff --git a/common/util/phpqrcode/cache/mask_6/mask_137_6.dat b/common/util/phpqrcode/cache/mask_6/mask_137_6.dat new file mode 100644 index 0000000..43ccb68 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_6/mask_137_6.dat @@ -0,0 +1,2 @@ +x E5?e^4fHp[1-e)UQV]UWN5o*8|۩W6bk?{f|>s֪r666rҟ=vڲWy -' +Ο;q tQE>U϶f곭xN]Tc(s❮7tAw`v`v`v`kvwfwt;];;;;;!ޙ;ao];l;;;÷| ʷ(3}l.?"މr};\}S-Aw<9;EV'ם \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_6/mask_141_6.dat b/common/util/phpqrcode/cache/mask_6/mask_141_6.dat new file mode 100644 index 0000000..0340409 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_6/mask_141_6.dat @@ -0,0 +1,10 @@ +xa F4/c]زȐ[=[E럓sm,fn/|kj\j?g[q(NOZc5SGGP[oMVָfvL<WóCaz6U~һ{`nݻdvVy~rZ"qk{>g$XKU}m\bjaGx,f1Yb]z̞^.5[?嬜r,f1YY>grVb,f1Y>g,rVmYb,f,|VY9Yb,f,|VY9+g1Ybً ̦M7>2{9z϶hm3l|9xټ#f#x6 -v%N' \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_6/mask_161_6.dat b/common/util/phpqrcode/cache/mask_6/mask_161_6.dat new file mode 100644 index 0000000..ecec68b Binary files /dev/null and b/common/util/phpqrcode/cache/mask_6/mask_161_6.dat differ diff --git a/common/util/phpqrcode/cache/mask_6/mask_165_6.dat b/common/util/phpqrcode/cache/mask_6/mask_165_6.dat new file mode 100644 index 0000000..d641dfa Binary files /dev/null and b/common/util/phpqrcode/cache/mask_6/mask_165_6.dat differ diff --git a/common/util/phpqrcode/cache/mask_6/mask_169_6.dat b/common/util/phpqrcode/cache/mask_6/mask_169_6.dat new file mode 100644 index 0000000..ae68972 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_6/mask_169_6.dat @@ -0,0 +1 @@ +xJ0i9[Jɘk{1b!gnhHkS뉭-V?KIׁ1큏1ƣݎ/`/z)*=3ڏg6^k65CY>㵾+'{է_Vˊx-J<ӛܗr_>>i;rO}/g}g}ٿ}}xO}/g}g}ٷGo/{{r_>>o/z^#}g}ٿd'ʳ|QRNS3YڳZ'msEǷj5 \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_6/mask_173_6.dat b/common/util/phpqrcode/cache/mask_6/mask_173_6.dat new file mode 100644 index 0000000..95fa97c --- /dev/null +++ b/common/util/phpqrcode/cache/mask_6/mask_173_6.dat @@ -0,0 +1 @@ +xa09MrM S*:a_-5hh_)uZ֭[loےsmKN{H?x`l#f9>ڟ[eЄώߓ ?^m*/Kmhy%v-nKlkKL`&& g5(gwxYܞa¬pVcZ[#O=SN9&0 L`DŽ 'tjj]QN9&0 L`sYRc@QN9 L`&0 L`"YRc\ ' r&0 L`EH9AN&0 L`& 7p6`|hms R5Ƙȉ k\X/ )g9 \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_6/mask_177_6.dat b/common/util/phpqrcode/cache/mask_6/mask_177_6.dat new file mode 100644 index 0000000..e9f0476 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_6/mask_177_6.dat @@ -0,0 +1,14 @@ +xn {ڤ*4v۴u1{f{_,,K9o 4ǵ7lniJiggir<-MG + + + +xuV+zRCr9+Gq6QWb"Qe"WL+ + XXXXX/|~j,nmuMۤ+ + XXXXXYa,X;M+ + XXXXXe)oӘf|5H늚7/D \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_6/mask_21_6.dat b/common/util/phpqrcode/cache/mask_6/mask_21_6.dat new file mode 100644 index 0000000..6bd505b --- /dev/null +++ b/common/util/phpqrcode/cache/mask_6/mask_21_6.dat @@ -0,0 +1 @@ +xڝQ C9M{i]X1- C!D7 W ٜ&rD)~]<M 3(>{A aS \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_6/mask_25_6.dat b/common/util/phpqrcode/cache/mask_6/mask_25_6.dat new file mode 100644 index 0000000..d45083a --- /dev/null +++ b/common/util/phpqrcode/cache/mask_6/mask_25_6.dat @@ -0,0 +1 @@ +xڝQA 52)e+(XmZt*(ڹ;tJ<峂_ڤ3oڴ"̢azh}&qvSG֙,-J4}oS[}w \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_6/mask_29_6.dat b/common/util/phpqrcode/cache/mask_6/mask_29_6.dat new file mode 100644 index 0000000..0408e22 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_6/mask_29_6.dat @@ -0,0 +1,3 @@ +xRA +0 XcL(4EԈB +8Cܾ޳nM+lǝՆO1]&ڍ4UD-6-$:6dZ?ylf? 8?߲_ݏ`8G1`B`;+}&s]<iK'l'9%.7 \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_6/mask_65_6.dat b/common/util/phpqrcode/cache/mask_6/mask_65_6.dat new file mode 100644 index 0000000..550fc8f --- /dev/null +++ b/common/util/phpqrcode/cache/mask_6/mask_65_6.dat @@ -0,0 +1 @@ +xWQ i{KNLk?e$Qik41{`+!ڮM ? 1b8 .^wsnFj5EaQX|=w@2v<ŋŞ|4w\UXBQz+TTcBz/48,5`ȱ OV$ \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_6/mask_69_6.dat b/common/util/phpqrcode/cache/mask_6/mask_69_6.dat new file mode 100644 index 0000000..a3e4fa0 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_6/mask_69_6.dat @@ -0,0 +1 @@ +xK @dTh hLSSEq eY@<+*|窮 %>z*7e6QS`.>sE '%@[6@P0h aFxtpl2 Q-g1Nfeo^0FdT>N_OwG3ug {3<[Ժ b?'6^ \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_6/mask_73_6.dat b/common/util/phpqrcode/cache/mask_6/mask_73_6.dat new file mode 100644 index 0000000..ab71b70 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_6/mask_73_6.dat differ diff --git a/common/util/phpqrcode/cache/mask_6/mask_77_6.dat b/common/util/phpqrcode/cache/mask_6/mask_77_6.dat new file mode 100644 index 0000000..ad5a660 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_6/mask_77_6.dat @@ -0,0 +1 @@ +x E۲iVa.FpSTY4q~z=:͒ 6m8:#0PضiDy:2Š'Zs&}滜\r0\ŚXw;iPȔL)Seԕ{hDu9LbJSS))gZ{e)qJdLw+#3-V0շljڠS-S 9=ݯ5PPq1M?g \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_6/mask_81_6.dat b/common/util/phpqrcode/cache/mask_6/mask_81_6.dat new file mode 100644 index 0000000..28a6d07 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_6/mask_81_6.dat @@ -0,0 +1,3 @@ +xQ0D9 rRLvk`0 ;i6\|_cc1huio#2}x*.Yt& +ְq/K;3ve̢ȊAH?`]5Kw!}{Zû߲W +yⷾ^_ykk^Kתb-bYSڸ'֜Nu#MfHSQ?|]IAiMyyuW \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_6/mask_85_6.dat b/common/util/phpqrcode/cache/mask_6/mask_85_6.dat new file mode 100644 index 0000000..d5403e4 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_6/mask_85_6.dat differ diff --git a/common/util/phpqrcode/cache/mask_6/mask_89_6.dat b/common/util/phpqrcode/cache/mask_6/mask_89_6.dat new file mode 100644 index 0000000..eeeb5d1 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_6/mask_89_6.dat differ diff --git a/common/util/phpqrcode/cache/mask_6/mask_93_6.dat b/common/util/phpqrcode/cache/mask_6/mask_93_6.dat new file mode 100644 index 0000000..6ff38db Binary files /dev/null and b/common/util/phpqrcode/cache/mask_6/mask_93_6.dat differ diff --git a/common/util/phpqrcode/cache/mask_6/mask_97_6.dat b/common/util/phpqrcode/cache/mask_6/mask_97_6.dat new file mode 100644 index 0000000..3a2072e --- /dev/null +++ b/common/util/phpqrcode/cache/mask_6/mask_97_6.dat @@ -0,0 +1,2 @@ +xa0sdFx[=4Hoj34&s}* a Vc&35arW^aLClzq,1x SQN]/Giu`&w%,%DY"Kt+HE'|R2(v1vqiqd,%D~%ػJj}ͺĺgY"Kd,+K +]Wt+sF/)].zN'`>1='#`+bl]Z \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_7/mask_101_7.dat b/common/util/phpqrcode/cache/mask_7/mask_101_7.dat new file mode 100644 index 0000000..1f6bc51 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_7/mask_101_7.dat @@ -0,0 +1 @@ +xQ C}rm`fjT#54'tfaЇo$cmOJ23c<6Xn0F ) \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_7/mask_105_7.dat b/common/util/phpqrcode/cache/mask_7/mask_105_7.dat new file mode 100644 index 0000000..6b0cacf --- /dev/null +++ b/common/util/phpqrcode/cache/mask_7/mask_105_7.dat @@ -0,0 +1,2 @@ +xA +0EFaMҙNPx)pQ_~|ñ(bF$.aoWGNPUǖM%{oHQUlִL^>+m#{{eo&Y2soM)gncO9sZ3wo+{=f.zޣ{{=zGcskCQϞp^&{^NʷU e5}EwGn+o \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_7/mask_109_7.dat b/common/util/phpqrcode/cache/mask_7/mask_109_7.dat new file mode 100644 index 0000000..9875cbe --- /dev/null +++ b/common/util/phpqrcode/cache/mask_7/mask_109_7.dat @@ -0,0 +1,2 @@ +xA +0 D9Mr}* _x-d:"NJ-k"⨚d{ջגɬ|'rQ5+ s)c7-1nn햺qɔJtg^ʉw̘Ň-?*&Mm@ee5^ +c + +,b\13j4TZfŢo* + + +:Ut* + + +Xů0"%6ed 8rS NsUnk5XejުuVXg,l`u!hXZ\VlM|[ͬ0 0 0 #hF'c]i>Hataaa~<ÆzyqkO0 0 0 㪞Faaa)2˰fÒ%z8tO=3=3:cw +V$ \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_7/mask_121_7.dat b/common/util/phpqrcode/cache/mask_7/mask_121_7.dat new file mode 100644 index 0000000..d5d577f --- /dev/null +++ b/common/util/phpqrcode/cache/mask_7/mask_121_7.dat @@ -0,0 +1,2 @@ +x[ + Edi;^az,#6ƞ^rh&^amY9_غ5Cr6t^^WlEز~ɿ|MmmS}( ۰ ۰ ۰}mQ]ZVq]vѲ"M1fG, qBmtaaazeF3cxIDmtaaamný$n۰ ۰ ۰ ۏa[}`[yޖ޻)n<4K/Oslnlm/G \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_7/mask_125_7.dat b/common/util/phpqrcode/cache/mask_7/mask_125_7.dat new file mode 100644 index 0000000..f9ec088 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_7/mask_125_7.dat differ diff --git a/common/util/phpqrcode/cache/mask_7/mask_129_7.dat b/common/util/phpqrcode/cache/mask_7/mask_129_7.dat new file mode 100644 index 0000000..9bf51d5 Binary files /dev/null and b/common/util/phpqrcode/cache/mask_7/mask_129_7.dat differ diff --git a/common/util/phpqrcode/cache/mask_7/mask_133_7.dat b/common/util/phpqrcode/cache/mask_7/mask_133_7.dat new file mode 100644 index 0000000..b643ffe Binary files /dev/null and b/common/util/phpqrcode/cache/mask_7/mask_133_7.dat differ diff --git a/common/util/phpqrcode/cache/mask_7/mask_137_7.dat b/common/util/phpqrcode/cache/mask_7/mask_137_7.dat new file mode 100644 index 0000000..11d212b --- /dev/null +++ b/common/util/phpqrcode/cache/mask_7/mask_137_7.dat @@ -0,0 +1,5 @@ +x + F4/ c_ǂ+{SK<o[l +Ο +07։Vl;b7fMS;1LCvR|KMH +#Н(Sqd \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_7/mask_141_7.dat b/common/util/phpqrcode/cache/mask_7/mask_141_7.dat new file mode 100644 index 0000000..98dffab --- /dev/null +++ b/common/util/phpqrcode/cache/mask_7/mask_141_7.dat @@ -0,0 +1 @@ +xA E= rITY@Ä0!|1tbG0ԗѤs2Z/oa\qzOnҋMntX"KmeM}CpPL^S0S0S0SL )ǔژY߾%b,Sl?zC)tLLLLI2zRXh@)tLLLLI1zbϷB)~0S0S0S07)|B)))3ՖL% tfwM*:~hZsnc$1UTtJg8OYE \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_7/mask_145_7.dat b/common/util/phpqrcode/cache/mask_7/mask_145_7.dat new file mode 100644 index 0000000..4aa2bac --- /dev/null +++ b/common/util/phpqrcode/cache/mask_7/mask_145_7.dat @@ -0,0 +1,2 @@ +x + E5?W6Z-^2qbGX6(Ɖu"LbbGuμGk:HwA[jmHݞ3OkQ{l|TEm JfL?2"&)kRfc̉F,z=5X5X5X7F\pUs#5X5X5XFdYk!a ` ` `o8ct ]CC gM5[N%khZp?Iܣϲ^n$Y7AZP[ fȓ0 \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_7/mask_149_7.dat b/common/util/phpqrcode/cache/mask_7/mask_149_7.dat new file mode 100644 index 0000000..809f005 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_7/mask_149_7.dat @@ -0,0 +1 @@ +xn {? uچ2G$ncFKb3֪tPc ̥7[?9:['9'*Ӗ Gah_/z+6XB>2qYJ0黏Bfa 1 9c7G Ol,^꽓3A:H  1A b0X4%٫#d>&C  1A b+g嬜,f1Yb|Y>+g嬜,f1Ylio.\Ɲo=gϙ-yk_TA \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_7/mask_161_7.dat b/common/util/phpqrcode/cache/mask_7/mask_161_7.dat new file mode 100644 index 0000000..35ba8ff --- /dev/null +++ b/common/util/phpqrcode/cache/mask_7/mask_161_7.dat @@ -0,0 +1 @@ +xю y/皨E)Ʈ1~493,˵+ZT=ZeC.~iߏ&>,6e~,lW] 2\;׵2j"e,rXݵV(c쵵ZӖ18ީ/,'t.ee,cX2߱,_|yt|]t.cX2e,cy/ɗys.eLe,cX2lo|Z{+2]bl,cX2e{+֊[A2]X2e,c9CX;QIQH8R҈G"z,&;'o97%P8%6oǽ;]NWn[f7v \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_7/mask_29_7.dat b/common/util/phpqrcode/cache/mask_7/mask_29_7.dat new file mode 100644 index 0000000..e3d7391 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_7/mask_29_7.dat @@ -0,0 +1,2 @@ +xR9 QpX$lŲf!I2pgSMZj"te0#ԛ`_1-cha~/Eh4"~ \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_7/mask_37_7.dat b/common/util/phpqrcode/cache/mask_7/mask_37_7.dat new file mode 100644 index 0000000..87d9a1a Binary files /dev/null and b/common/util/phpqrcode/cache/mask_7/mask_37_7.dat differ diff --git a/common/util/phpqrcode/cache/mask_7/mask_41_7.dat b/common/util/phpqrcode/cache/mask_7/mask_41_7.dat new file mode 100644 index 0000000..8acec04 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_7/mask_41_7.dat @@ -0,0 +1 @@ +xTA 5[fDY(O^bR3/~t/L"7SQQ5j\Sib#Նȏ+ǣw#zx?㽧A-wu曑Y7$b.%A;wRoxG}? \ No newline at end of file diff --git a/common/util/phpqrcode/cache/mask_7/mask_45_7.dat b/common/util/phpqrcode/cache/mask_7/mask_45_7.dat new file mode 100644 index 0000000..dbba31d Binary files /dev/null and b/common/util/phpqrcode/cache/mask_7/mask_45_7.dat differ diff --git a/common/util/phpqrcode/cache/mask_7/mask_49_7.dat b/common/util/phpqrcode/cache/mask_7/mask_49_7.dat new file mode 100644 index 0000000..be5dce8 --- /dev/null +++ b/common/util/phpqrcode/cache/mask_7/mask_49_7.dat @@ -0,0 +1 @@ +xV0khC-X.ukv o40T%96U5*sI{`_>S?}(:yTl{G&E\6}"AX XϬback'); + + // user data + $filename = $PNG_TEMP_DIR.'test'.md5($_REQUEST['data'].'|'.$errorCorrectionLevel.'|'.$matrixPointSize).'.png'; + QRcode::png($_REQUEST['data'], $filename, $errorCorrectionLevel, $matrixPointSize, 2); + + } else { + + //default data + echo 'You can provide data in GET parameter: like that
'; + QRcode::png('PHP QR Code :)', $filename, $errorCorrectionLevel, $matrixPointSize, 2); + + } + + //display generated file + echo '
'; + + //config form + echo '
+ Data:   + ECC:   + Size:   +

'; + + // benchmark + QRtools::timeBenchmark(); + + \ No newline at end of file diff --git a/common/util/phpqrcode/phpqrcode.php b/common/util/phpqrcode/phpqrcode.php new file mode 100644 index 0000000..ea8c08f --- /dev/null +++ b/common/util/phpqrcode/phpqrcode.php @@ -0,0 +1,3312 @@ + + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + + +/* + * Version: 1.1.4 + * Build: 2010100721 + */ + + + +//---- qrconst.php ----------------------------- + + + + + +/* + * PHP QR Code encoder + * + * Common constants + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + // Encoding modes + + define('QR_MODE_NUL', -1); + define('QR_MODE_NUM', 0); + define('QR_MODE_AN', 1); + define('QR_MODE_8', 2); + define('QR_MODE_KANJI', 3); + define('QR_MODE_STRUCTURE', 4); + + // Levels of error correction. + + define('QR_ECLEVEL_L', 0); + define('QR_ECLEVEL_M', 1); + define('QR_ECLEVEL_Q', 2); + define('QR_ECLEVEL_H', 3); + + // Supported output formats + + define('QR_FORMAT_TEXT', 0); + define('QR_FORMAT_PNG', 1); + + class qrstr { + public static function set(&$srctab, $x, $y, $repl, $replLen = false) { + $srctab[$y] = substr_replace($srctab[$y], ($replLen !== false)?substr($repl,0,$replLen):$repl, $x, ($replLen !== false)?$replLen:strlen($repl)); + } + } + + + +//---- merged_config.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Config file, tuned-up for merged verion + */ + + define('QR_CACHEABLE', false); // use cache - more disk reads but less CPU power, masks and format templates are stored there + define('QR_CACHE_DIR', false); // used when QR_CACHEABLE === true + define('QR_LOG_DIR', false); // default error logs dir + + define('QR_FIND_BEST_MASK', true); // if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code + define('QR_FIND_FROM_RANDOM', 2); // if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly + define('QR_DEFAULT_MASK', 2); // when QR_FIND_BEST_MASK === false + + define('QR_PNG_MAXIMUM_SIZE', 1024); // maximum allowed png image width (in pixels), tune to make sure GD and PHP can handle such big images + + + + +//---- qrtools.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Toolset, handy and debug utilites. + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + class QRtools { + + //---------------------------------------------------------------------- + public static function binarize($frame) + { + $len = count($frame); + foreach ($frame as &$frameLine) { + + for($i=0; $i<$len; $i++) { + $frameLine[$i] = (ord($frameLine[$i])&1)?'1':'0'; + } + } + + return $frame; + } + + //---------------------------------------------------------------------- + public static function tcpdfBarcodeArray($code, $mode = 'QR,L', $tcPdfVersion = '4.5.037') + { + $barcode_array = array(); + + if (!is_array($mode)) + $mode = explode(',', $mode); + + $eccLevel = 'L'; + + if (count($mode) > 1) { + $eccLevel = $mode[1]; + } + + $qrTab = QRcode::text($code, false, $eccLevel); + $size = count($qrTab); + + $barcode_array['num_rows'] = $size; + $barcode_array['num_cols'] = $size; + $barcode_array['bcode'] = array(); + + foreach ($qrTab as $line) { + $arrAdd = array(); + foreach(str_split($line) as $char) + $arrAdd[] = ($char=='1')?1:0; + $barcode_array['bcode'][] = $arrAdd; + } + + return $barcode_array; + } + + //---------------------------------------------------------------------- + public static function clearCache() + { + self::$frames = array(); + } + + //---------------------------------------------------------------------- + public static function buildCache() + { + QRtools::markTime('before_build_cache'); + + $mask = new QRmask(); + for ($a=1; $a <= QRSPEC_VERSION_MAX; $a++) { + $frame = QRspec::newFrame($a); + if (QR_IMAGE) { + $fileName = QR_CACHE_DIR.'frame_'.$a.'.png'; + QRimage::png(self::binarize($frame), $fileName, 1, 0); + } + + $width = count($frame); + $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); + for ($maskNo=0; $maskNo<8; $maskNo++) + $mask->makeMaskNo($maskNo, $width, $frame, $bitMask, true); + } + + QRtools::markTime('after_build_cache'); + } + + //---------------------------------------------------------------------- + public static function log($outfile, $err) + { + if (QR_LOG_DIR !== false) { + if ($err != '') { + if ($outfile !== false) { + file_put_contents(QR_LOG_DIR.basename($outfile).'-errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND); + } else { + file_put_contents(QR_LOG_DIR.'errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND); + } + } + } + } + + //---------------------------------------------------------------------- + public static function dumpMask($frame) + { + $width = count($frame); + for($y=0;$y<$width;$y++) { + for($x=0;$x<$width;$x++) { + echo ord($frame[$y][$x]).','; + } + } + } + + //---------------------------------------------------------------------- + public static function markTime($markerId) + { + list($usec, $sec) = explode(" ", microtime()); + $time = ((float)$usec + (float)$sec); + + if (!isset($GLOBALS['qr_time_bench'])) + $GLOBALS['qr_time_bench'] = array(); + + $GLOBALS['qr_time_bench'][$markerId] = $time; + } + + //---------------------------------------------------------------------- + public static function timeBenchmark() + { + self::markTime('finish'); + + $lastTime = 0; + $startTime = 0; + $p = 0; + + echo ' + + '; + + foreach($GLOBALS['qr_time_bench'] as $markerId=>$thisTime) { + if ($p > 0) { + echo ''; + } else { + $startTime = $thisTime; + } + + $p++; + $lastTime = $thisTime; + } + + echo ' + + +
BENCHMARK
till '.$markerId.': '.number_format($thisTime-$lastTime, 6).'s
TOTAL: '.number_format($lastTime-$startTime, 6).'s
'; + } + + } + + //########################################################################## + + QRtools::markTime('start'); + + + + +//---- qrspec.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * QR Code specifications + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * The following data / specifications are taken from + * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004) + * or + * "Automatic identification and data capture techniques -- + * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('QRSPEC_VERSION_MAX', 40); + define('QRSPEC_WIDTH_MAX', 177); + + define('QRCAP_WIDTH', 0); + define('QRCAP_WORDS', 1); + define('QRCAP_REMINDER', 2); + define('QRCAP_EC', 3); + + class QRspec { + + public static $capacity = array( + array( 0, 0, 0, array( 0, 0, 0, 0)), + array( 21, 26, 0, array( 7, 10, 13, 17)), // 1 + array( 25, 44, 7, array( 10, 16, 22, 28)), + array( 29, 70, 7, array( 15, 26, 36, 44)), + array( 33, 100, 7, array( 20, 36, 52, 64)), + array( 37, 134, 7, array( 26, 48, 72, 88)), // 5 + array( 41, 172, 7, array( 36, 64, 96, 112)), + array( 45, 196, 0, array( 40, 72, 108, 130)), + array( 49, 242, 0, array( 48, 88, 132, 156)), + array( 53, 292, 0, array( 60, 110, 160, 192)), + array( 57, 346, 0, array( 72, 130, 192, 224)), //10 + array( 61, 404, 0, array( 80, 150, 224, 264)), + array( 65, 466, 0, array( 96, 176, 260, 308)), + array( 69, 532, 0, array( 104, 198, 288, 352)), + array( 73, 581, 3, array( 120, 216, 320, 384)), + array( 77, 655, 3, array( 132, 240, 360, 432)), //15 + array( 81, 733, 3, array( 144, 280, 408, 480)), + array( 85, 815, 3, array( 168, 308, 448, 532)), + array( 89, 901, 3, array( 180, 338, 504, 588)), + array( 93, 991, 3, array( 196, 364, 546, 650)), + array( 97, 1085, 3, array( 224, 416, 600, 700)), //20 + array(101, 1156, 4, array( 224, 442, 644, 750)), + array(105, 1258, 4, array( 252, 476, 690, 816)), + array(109, 1364, 4, array( 270, 504, 750, 900)), + array(113, 1474, 4, array( 300, 560, 810, 960)), + array(117, 1588, 4, array( 312, 588, 870, 1050)), //25 + array(121, 1706, 4, array( 336, 644, 952, 1110)), + array(125, 1828, 4, array( 360, 700, 1020, 1200)), + array(129, 1921, 3, array( 390, 728, 1050, 1260)), + array(133, 2051, 3, array( 420, 784, 1140, 1350)), + array(137, 2185, 3, array( 450, 812, 1200, 1440)), //30 + array(141, 2323, 3, array( 480, 868, 1290, 1530)), + array(145, 2465, 3, array( 510, 924, 1350, 1620)), + array(149, 2611, 3, array( 540, 980, 1440, 1710)), + array(153, 2761, 3, array( 570, 1036, 1530, 1800)), + array(157, 2876, 0, array( 570, 1064, 1590, 1890)), //35 + array(161, 3034, 0, array( 600, 1120, 1680, 1980)), + array(165, 3196, 0, array( 630, 1204, 1770, 2100)), + array(169, 3362, 0, array( 660, 1260, 1860, 2220)), + array(173, 3532, 0, array( 720, 1316, 1950, 2310)), + array(177, 3706, 0, array( 750, 1372, 2040, 2430)) //40 + ); + + //---------------------------------------------------------------------- + public static function getDataLength($version, $level) + { + return self::$capacity[$version][QRCAP_WORDS] - self::$capacity[$version][QRCAP_EC][$level]; + } + + //---------------------------------------------------------------------- + public static function getECCLength($version, $level) + { + return self::$capacity[$version][QRCAP_EC][$level]; + } + + //---------------------------------------------------------------------- + public static function getWidth($version) + { + return self::$capacity[$version][QRCAP_WIDTH]; + } + + //---------------------------------------------------------------------- + public static function getRemainder($version) + { + return self::$capacity[$version][QRCAP_REMINDER]; + } + + //---------------------------------------------------------------------- + public static function getMinimumVersion($size, $level) + { + + for($i=1; $i<= QRSPEC_VERSION_MAX; $i++) { + $words = self::$capacity[$i][QRCAP_WORDS] - self::$capacity[$i][QRCAP_EC][$level]; + if($words >= $size) + return $i; + } + + return -1; + } + + //###################################################################### + + public static $lengthTableBits = array( + array(10, 12, 14), + array( 9, 11, 13), + array( 8, 16, 16), + array( 8, 10, 12) + ); + + //---------------------------------------------------------------------- + public static function lengthIndicator($mode, $version) + { + if ($mode == QR_MODE_STRUCTURE) + return 0; + + if ($version <= 9) { + $l = 0; + } else if ($version <= 26) { + $l = 1; + } else { + $l = 2; + } + + return self::$lengthTableBits[$mode][$l]; + } + + //---------------------------------------------------------------------- + public static function maximumWords($mode, $version) + { + if($mode == QR_MODE_STRUCTURE) + return 3; + + if($version <= 9) { + $l = 0; + } else if($version <= 26) { + $l = 1; + } else { + $l = 2; + } + + $bits = self::$lengthTableBits[$mode][$l]; + $words = (1 << $bits) - 1; + + if($mode == QR_MODE_KANJI) { + $words *= 2; // the number of bytes is required + } + + return $words; + } + + // Error correction code ----------------------------------------------- + // Table of the error correction code (Reed-Solomon block) + // See Table 12-16 (pp.30-36), JIS X0510:2004. + + public static $eccTable = array( + array(array( 0, 0), array( 0, 0), array( 0, 0), array( 0, 0)), + array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), // 1 + array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), + array(array( 1, 0), array( 1, 0), array( 2, 0), array( 2, 0)), + array(array( 1, 0), array( 2, 0), array( 2, 0), array( 4, 0)), + array(array( 1, 0), array( 2, 0), array( 2, 2), array( 2, 2)), // 5 + array(array( 2, 0), array( 4, 0), array( 4, 0), array( 4, 0)), + array(array( 2, 0), array( 4, 0), array( 2, 4), array( 4, 1)), + array(array( 2, 0), array( 2, 2), array( 4, 2), array( 4, 2)), + array(array( 2, 0), array( 3, 2), array( 4, 4), array( 4, 4)), + array(array( 2, 2), array( 4, 1), array( 6, 2), array( 6, 2)), //10 + array(array( 4, 0), array( 1, 4), array( 4, 4), array( 3, 8)), + array(array( 2, 2), array( 6, 2), array( 4, 6), array( 7, 4)), + array(array( 4, 0), array( 8, 1), array( 8, 4), array(12, 4)), + array(array( 3, 1), array( 4, 5), array(11, 5), array(11, 5)), + array(array( 5, 1), array( 5, 5), array( 5, 7), array(11, 7)), //15 + array(array( 5, 1), array( 7, 3), array(15, 2), array( 3, 13)), + array(array( 1, 5), array(10, 1), array( 1, 15), array( 2, 17)), + array(array( 5, 1), array( 9, 4), array(17, 1), array( 2, 19)), + array(array( 3, 4), array( 3, 11), array(17, 4), array( 9, 16)), + array(array( 3, 5), array( 3, 13), array(15, 5), array(15, 10)), //20 + array(array( 4, 4), array(17, 0), array(17, 6), array(19, 6)), + array(array( 2, 7), array(17, 0), array( 7, 16), array(34, 0)), + array(array( 4, 5), array( 4, 14), array(11, 14), array(16, 14)), + array(array( 6, 4), array( 6, 14), array(11, 16), array(30, 2)), + array(array( 8, 4), array( 8, 13), array( 7, 22), array(22, 13)), //25 + array(array(10, 2), array(19, 4), array(28, 6), array(33, 4)), + array(array( 8, 4), array(22, 3), array( 8, 26), array(12, 28)), + array(array( 3, 10), array( 3, 23), array( 4, 31), array(11, 31)), + array(array( 7, 7), array(21, 7), array( 1, 37), array(19, 26)), + array(array( 5, 10), array(19, 10), array(15, 25), array(23, 25)), //30 + array(array(13, 3), array( 2, 29), array(42, 1), array(23, 28)), + array(array(17, 0), array(10, 23), array(10, 35), array(19, 35)), + array(array(17, 1), array(14, 21), array(29, 19), array(11, 46)), + array(array(13, 6), array(14, 23), array(44, 7), array(59, 1)), + array(array(12, 7), array(12, 26), array(39, 14), array(22, 41)), //35 + array(array( 6, 14), array( 6, 34), array(46, 10), array( 2, 64)), + array(array(17, 4), array(29, 14), array(49, 10), array(24, 46)), + array(array( 4, 18), array(13, 32), array(48, 14), array(42, 32)), + array(array(20, 4), array(40, 7), array(43, 22), array(10, 67)), + array(array(19, 6), array(18, 31), array(34, 34), array(20, 61)),//40 + ); + + //---------------------------------------------------------------------- + // CACHEABLE!!! + + public static function getEccSpec($version, $level, array &$spec) + { + if (count($spec) < 5) { + $spec = array(0,0,0,0,0); + } + + $b1 = self::$eccTable[$version][$level][0]; + $b2 = self::$eccTable[$version][$level][1]; + $data = self::getDataLength($version, $level); + $ecc = self::getECCLength($version, $level); + + if($b2 == 0) { + $spec[0] = $b1; + $spec[1] = (int)($data / $b1); + $spec[2] = (int)($ecc / $b1); + $spec[3] = 0; + $spec[4] = 0; + } else { + $spec[0] = $b1; + $spec[1] = (int)($data / ($b1 + $b2)); + $spec[2] = (int)($ecc / ($b1 + $b2)); + $spec[3] = $b2; + $spec[4] = $spec[1] + 1; + } + } + + // Alignment pattern --------------------------------------------------- + + // Positions of alignment patterns. + // This array includes only the second and the third position of the + // alignment patterns. Rest of them can be calculated from the distance + // between them. + + // See Table 1 in Appendix E (pp.71) of JIS X0510:2004. + + public static $alignmentPattern = array( + array( 0, 0), + array( 0, 0), array(18, 0), array(22, 0), array(26, 0), array(30, 0), // 1- 5 + array(34, 0), array(22, 38), array(24, 42), array(26, 46), array(28, 50), // 6-10 + array(30, 54), array(32, 58), array(34, 62), array(26, 46), array(26, 48), //11-15 + array(26, 50), array(30, 54), array(30, 56), array(30, 58), array(34, 62), //16-20 + array(28, 50), array(26, 50), array(30, 54), array(28, 54), array(32, 58), //21-25 + array(30, 58), array(34, 62), array(26, 50), array(30, 54), array(26, 52), //26-30 + array(30, 56), array(34, 60), array(30, 58), array(34, 62), array(30, 54), //31-35 + array(24, 50), array(28, 54), array(32, 58), array(26, 54), array(30, 58), //35-40 + ); + + + /** -------------------------------------------------------------------- + * Put an alignment marker. + * @param frame + * @param width + * @param ox,oy center coordinate of the pattern + */ + public static function putAlignmentMarker(array &$frame, $ox, $oy) + { + $finder = array( + "\xa1\xa1\xa1\xa1\xa1", + "\xa1\xa0\xa0\xa0\xa1", + "\xa1\xa0\xa1\xa0\xa1", + "\xa1\xa0\xa0\xa0\xa1", + "\xa1\xa1\xa1\xa1\xa1" + ); + + $yStart = $oy-2; + $xStart = $ox-2; + + for($y=0; $y<5; $y++) { + QRstr::set($frame, $xStart, $yStart+$y, $finder[$y]); + } + } + + //---------------------------------------------------------------------- + public static function putAlignmentPattern($version, &$frame, $width) + { + if($version < 2) + return; + + $d = self::$alignmentPattern[$version][1] - self::$alignmentPattern[$version][0]; + if($d < 0) { + $w = 2; + } else { + $w = (int)(($width - self::$alignmentPattern[$version][0]) / $d + 2); + } + + if($w * $w - 3 == 1) { + $x = self::$alignmentPattern[$version][0]; + $y = self::$alignmentPattern[$version][0]; + self::putAlignmentMarker($frame, $x, $y); + return; + } + + $cx = self::$alignmentPattern[$version][0]; + for($x=1; $x<$w - 1; $x++) { + self::putAlignmentMarker($frame, 6, $cx); + self::putAlignmentMarker($frame, $cx, 6); + $cx += $d; + } + + $cy = self::$alignmentPattern[$version][0]; + for($y=0; $y<$w-1; $y++) { + $cx = self::$alignmentPattern[$version][0]; + for($x=0; $x<$w-1; $x++) { + self::putAlignmentMarker($frame, $cx, $cy); + $cx += $d; + } + $cy += $d; + } + } + + // Version information pattern ----------------------------------------- + + // Version information pattern (BCH coded). + // See Table 1 in Appendix D (pp.68) of JIS X0510:2004. + + // size: [QRSPEC_VERSION_MAX - 6] + + public static $versionPattern = array( + 0x07c94, 0x085bc, 0x09a99, 0x0a4d3, 0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, + 0x0f928, 0x10b78, 0x1145d, 0x12a17, 0x13532, 0x149a6, 0x15683, 0x168c9, + 0x177ec, 0x18ec4, 0x191e1, 0x1afab, 0x1b08e, 0x1cc1a, 0x1d33f, 0x1ed75, + 0x1f250, 0x209d5, 0x216f0, 0x228ba, 0x2379f, 0x24b0b, 0x2542e, 0x26a64, + 0x27541, 0x28c69 + ); + + //---------------------------------------------------------------------- + public static function getVersionPattern($version) + { + if($version < 7 || $version > QRSPEC_VERSION_MAX) + return 0; + + return self::$versionPattern[$version -7]; + } + + // Format information -------------------------------------------------- + // See calcFormatInfo in tests/test_qrspec.c (orginal qrencode c lib) + + public static $formatInfo = array( + array(0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976), + array(0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0), + array(0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed), + array(0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b) + ); + + public static function getFormatInfo($mask, $level) + { + if($mask < 0 || $mask > 7) + return 0; + + if($level < 0 || $level > 3) + return 0; + + return self::$formatInfo[$level][$mask]; + } + + // Frame --------------------------------------------------------------- + // Cache of initial frames. + + public static $frames = array(); + + /** -------------------------------------------------------------------- + * Put a finder pattern. + * @param frame + * @param width + * @param ox,oy upper-left coordinate of the pattern + */ + public static function putFinderPattern(&$frame, $ox, $oy) + { + $finder = array( + "\xc1\xc1\xc1\xc1\xc1\xc1\xc1", + "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", + "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", + "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", + "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", + "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", + "\xc1\xc1\xc1\xc1\xc1\xc1\xc1" + ); + + for($y=0; $y<7; $y++) { + QRstr::set($frame, $ox, $oy+$y, $finder[$y]); + } + } + + //---------------------------------------------------------------------- + public static function createFrame($version) + { + $width = self::$capacity[$version][QRCAP_WIDTH]; + $frameLine = str_repeat ("\0", $width); + $frame = array_fill(0, $width, $frameLine); + + // Finder pattern + self::putFinderPattern($frame, 0, 0); + self::putFinderPattern($frame, $width - 7, 0); + self::putFinderPattern($frame, 0, $width - 7); + + // Separator + $yOffset = $width - 7; + + for($y=0; $y<7; $y++) { + $frame[$y][7] = "\xc0"; + $frame[$y][$width - 8] = "\xc0"; + $frame[$yOffset][7] = "\xc0"; + $yOffset++; + } + + $setPattern = str_repeat("\xc0", 8); + + QRstr::set($frame, 0, 7, $setPattern); + QRstr::set($frame, $width-8, 7, $setPattern); + QRstr::set($frame, 0, $width - 8, $setPattern); + + // Format info + $setPattern = str_repeat("\x84", 9); + QRstr::set($frame, 0, 8, $setPattern); + QRstr::set($frame, $width - 8, 8, $setPattern, 8); + + $yOffset = $width - 8; + + for($y=0; $y<8; $y++,$yOffset++) { + $frame[$y][8] = "\x84"; + $frame[$yOffset][8] = "\x84"; + } + + // Timing pattern + + for($i=1; $i<$width-15; $i++) { + $frame[6][7+$i] = chr(0x90 | ($i & 1)); + $frame[7+$i][6] = chr(0x90 | ($i & 1)); + } + + // Alignment pattern + self::putAlignmentPattern($version, $frame, $width); + + // Version information + if($version >= 7) { + $vinf = self::getVersionPattern($version); + + $v = $vinf; + + for($x=0; $x<6; $x++) { + for($y=0; $y<3; $y++) { + $frame[($width - 11)+$y][$x] = chr(0x88 | ($v & 1)); + $v = $v >> 1; + } + } + + $v = $vinf; + for($y=0; $y<6; $y++) { + for($x=0; $x<3; $x++) { + $frame[$y][$x+($width - 11)] = chr(0x88 | ($v & 1)); + $v = $v >> 1; + } + } + } + + // and a little bit... + $frame[$width - 8][8] = "\x81"; + + return $frame; + } + + //---------------------------------------------------------------------- + public static function debug($frame, $binary_mode = false) + { + if ($binary_mode) { + + foreach ($frame as &$frameLine) { + $frameLine = join('  ', explode('0', $frameLine)); + $frameLine = join('██', explode('1', $frameLine)); + } + + ?> + +


        '; + echo join("
        ", $frame); + echo '






'; + + } else { + + foreach ($frame as &$frameLine) { + $frameLine = join(' ', explode("\xc0", $frameLine)); + $frameLine = join('', explode("\xc1", $frameLine)); + $frameLine = join(' ', explode("\xa0", $frameLine)); + $frameLine = join('', explode("\xa1", $frameLine)); + $frameLine = join('', explode("\x84", $frameLine)); //format 0 + $frameLine = join('', explode("\x85", $frameLine)); //format 1 + $frameLine = join('', explode("\x81", $frameLine)); //special bit + $frameLine = join(' ', explode("\x90", $frameLine)); //clock 0 + $frameLine = join('', explode("\x91", $frameLine)); //clock 1 + $frameLine = join(' ', explode("\x88", $frameLine)); //version + $frameLine = join('', explode("\x89", $frameLine)); //version + $frameLine = join('♦', explode("\x01", $frameLine)); + $frameLine = join('⋅', explode("\0", $frameLine)); + } + + ?> + + "; + echo join("
", $frame); + echo "
"; + + } + } + + //---------------------------------------------------------------------- + public static function serial($frame) + { + return gzcompress(join("\n", $frame), 9); + } + + //---------------------------------------------------------------------- + public static function unserial($code) + { + return explode("\n", gzuncompress($code)); + } + + //---------------------------------------------------------------------- + public static function newFrame($version) + { + if($version < 1 || $version > QRSPEC_VERSION_MAX) + return null; + + if(!isset(self::$frames[$version])) { + + $fileName = QR_CACHE_DIR.'frame_'.$version.'.dat'; + + if (QR_CACHEABLE) { + if (file_exists($fileName)) { + self::$frames[$version] = self::unserial(file_get_contents($fileName)); + } else { + self::$frames[$version] = self::createFrame($version); + file_put_contents($fileName, self::serial(self::$frames[$version])); + } + } else { + self::$frames[$version] = self::createFrame($version); + } + } + + if(is_null(self::$frames[$version])) + return null; + + return self::$frames[$version]; + } + + //---------------------------------------------------------------------- + public static function rsBlockNum($spec) { return $spec[0] + $spec[3]; } + public static function rsBlockNum1($spec) { return $spec[0]; } + public static function rsDataCodes1($spec) { return $spec[1]; } + public static function rsEccCodes1($spec) { return $spec[2]; } + public static function rsBlockNum2($spec) { return $spec[3]; } + public static function rsDataCodes2($spec) { return $spec[4]; } + public static function rsEccCodes2($spec) { return $spec[2]; } + public static function rsDataLength($spec) { return ($spec[0] * $spec[1]) + ($spec[3] * $spec[4]); } + public static function rsEccLength($spec) { return ($spec[0] + $spec[3]) * $spec[2]; } + + } + + + +//---- qrimage.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Image output of code using GD2 + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('QR_IMAGE', true); + + class QRimage { + + //---------------------------------------------------------------------- + public static function png($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE) + { + $image = self::image($frame, $pixelPerPoint, $outerFrame); + + if ($filename === false) { + Header("Content-type: image/png"); + ImagePng($image); + } else { + if($saveandprint===TRUE){ + ImagePng($image, $filename); + header("Content-type: image/png"); + ImagePng($image); + }else{ + ImagePng($image, $filename); + } + } + + ImageDestroy($image); + } + + //---------------------------------------------------------------------- + public static function jpg($frame, $filename = false, $pixelPerPoint = 8, $outerFrame = 4, $q = 85) + { + $image = self::image($frame, $pixelPerPoint, $outerFrame); + + if ($filename === false) { + Header("Content-type: image/jpeg"); + ImageJpeg($image, null, $q); + } else { + ImageJpeg($image, $filename, $q); + } + + ImageDestroy($image); + } + + //---------------------------------------------------------------------- + private static function image($frame, $pixelPerPoint = 4, $outerFrame = 4) + { + $h = count($frame); + $w = strlen($frame[0]); + + $imgW = $w + 2*$outerFrame; + $imgH = $h + 2*$outerFrame; + + $base_image =ImageCreate($imgW, $imgH); + + $col[0] = ImageColorAllocate($base_image,255,255,255); + $col[1] = ImageColorAllocate($base_image,0,0,0); + + imagefill($base_image, 0, 0, $col[0]); + + for($y=0; $y<$h; $y++) { + for($x=0; $x<$w; $x++) { + if ($frame[$y][$x] == '1') { + ImageSetPixel($base_image,$x+$outerFrame,$y+$outerFrame,$col[1]); + } + } + } + + $target_image =ImageCreate($imgW * $pixelPerPoint, $imgH * $pixelPerPoint); + ImageCopyResized($target_image, $base_image, 0, 0, 0, 0, $imgW * $pixelPerPoint, $imgH * $pixelPerPoint, $imgW, $imgH); + ImageDestroy($base_image); + + return $target_image; + } + } + + + +//---- qrinput.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Input encoding class + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('STRUCTURE_HEADER_BITS', 20); + define('MAX_STRUCTURED_SYMBOLS', 16); + + class QRinputItem { + + public $mode; + public $size; + public $data; + public $bstream; + + public function __construct($mode, $size, $data, $bstream = null) + { + $setData = array_slice($data, 0, $size); + + if (count($setData) < $size) { + $setData = array_merge($setData, array_fill(0,$size-count($setData),0)); + } + + if(!QRinput::check($mode, $size, $setData)) { + throw new Exception('Error m:'.$mode.',s:'.$size.',d:'.join(',',$setData)); + return null; + } + + $this->mode = $mode; + $this->size = $size; + $this->data = $setData; + $this->bstream = $bstream; + } + + //---------------------------------------------------------------------- + public function encodeModeNum($version) + { + try { + + $words = (int)($this->size / 3); + $bs = new QRbitstream(); + + $val = 0x1; + $bs->appendNum(4, $val); + $bs->appendNum(QRspec::lengthIndicator(QR_MODE_NUM, $version), $this->size); + + for($i=0; $i<$words; $i++) { + $val = (ord($this->data[$i*3 ]) - ord('0')) * 100; + $val += (ord($this->data[$i*3+1]) - ord('0')) * 10; + $val += (ord($this->data[$i*3+2]) - ord('0')); + $bs->appendNum(10, $val); + } + + if($this->size - $words * 3 == 1) { + $val = ord($this->data[$words*3]) - ord('0'); + $bs->appendNum(4, $val); + } else if($this->size - $words * 3 == 2) { + $val = (ord($this->data[$words*3 ]) - ord('0')) * 10; + $val += (ord($this->data[$words*3+1]) - ord('0')); + $bs->appendNum(7, $val); + } + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function encodeModeAn($version) + { + try { + $words = (int)($this->size / 2); + $bs = new QRbitstream(); + + $bs->appendNum(4, 0x02); + $bs->appendNum(QRspec::lengthIndicator(QR_MODE_AN, $version), $this->size); + + for($i=0; $i<$words; $i++) { + $val = (int)QRinput::lookAnTable(ord($this->data[$i*2 ])) * 45; + $val += (int)QRinput::lookAnTable(ord($this->data[$i*2+1])); + + $bs->appendNum(11, $val); + } + + if($this->size & 1) { + $val = QRinput::lookAnTable(ord($this->data[$words * 2])); + $bs->appendNum(6, $val); + } + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function encodeMode8($version) + { + try { + $bs = new QRbitstream(); + + $bs->appendNum(4, 0x4); + $bs->appendNum(QRspec::lengthIndicator(QR_MODE_8, $version), $this->size); + + for($i=0; $i<$this->size; $i++) { + $bs->appendNum(8, ord($this->data[$i])); + } + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function encodeModeKanji($version) + { + try { + + $bs = new QRbitrtream(); + + $bs->appendNum(4, 0x8); + $bs->appendNum(QRspec::lengthIndicator(QR_MODE_KANJI, $version), (int)($this->size / 2)); + + for($i=0; $i<$this->size; $i+=2) { + $val = (ord($this->data[$i]) << 8) | ord($this->data[$i+1]); + if($val <= 0x9ffc) { + $val -= 0x8140; + } else { + $val -= 0xc140; + } + + $h = ($val >> 8) * 0xc0; + $val = ($val & 0xff) + $h; + + $bs->appendNum(13, $val); + } + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function encodeModeStructure() + { + try { + $bs = new QRbitstream(); + + $bs->appendNum(4, 0x03); + $bs->appendNum(4, ord($this->data[1]) - 1); + $bs->appendNum(4, ord($this->data[0]) - 1); + $bs->appendNum(8, ord($this->data[2])); + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function estimateBitStreamSizeOfEntry($version) + { + $bits = 0; + + if($version == 0) + $version = 1; + + switch($this->mode) { + case QR_MODE_NUM: $bits = QRinput::estimateBitsModeNum($this->size); break; + case QR_MODE_AN: $bits = QRinput::estimateBitsModeAn($this->size); break; + case QR_MODE_8: $bits = QRinput::estimateBitsMode8($this->size); break; + case QR_MODE_KANJI: $bits = QRinput::estimateBitsModeKanji($this->size);break; + case QR_MODE_STRUCTURE: return STRUCTURE_HEADER_BITS; + default: + return 0; + } + + $l = QRspec::lengthIndicator($this->mode, $version); + $m = 1 << $l; + $num = (int)(($this->size + $m - 1) / $m); + + $bits += $num * (4 + $l); + + return $bits; + } + + //---------------------------------------------------------------------- + public function encodeBitStream($version) + { + try { + + unset($this->bstream); + $words = QRspec::maximumWords($this->mode, $version); + + if($this->size > $words) { + + $st1 = new QRinputItem($this->mode, $words, $this->data); + $st2 = new QRinputItem($this->mode, $this->size - $words, array_slice($this->data, $words)); + + $st1->encodeBitStream($version); + $st2->encodeBitStream($version); + + $this->bstream = new QRbitstream(); + $this->bstream->append($st1->bstream); + $this->bstream->append($st2->bstream); + + unset($st1); + unset($st2); + + } else { + + $ret = 0; + + switch($this->mode) { + case QR_MODE_NUM: $ret = $this->encodeModeNum($version); break; + case QR_MODE_AN: $ret = $this->encodeModeAn($version); break; + case QR_MODE_8: $ret = $this->encodeMode8($version); break; + case QR_MODE_KANJI: $ret = $this->encodeModeKanji($version);break; + case QR_MODE_STRUCTURE: $ret = $this->encodeModeStructure(); break; + + default: + break; + } + + if($ret < 0) + return -1; + } + + return $this->bstream->size(); + + } catch (Exception $e) { + return -1; + } + } + }; + + //########################################################################## + + class QRinput { + + public $items; + + private $version; + private $level; + + //---------------------------------------------------------------------- + public function __construct($version = 0, $level = QR_ECLEVEL_L) + { + if ($version < 0 || $version > QRSPEC_VERSION_MAX || $level > QR_ECLEVEL_H) { + throw new Exception('Invalid version no'); + return NULL; + } + + $this->version = $version; + $this->level = $level; + } + + //---------------------------------------------------------------------- + public function getVersion() + { + return $this->version; + } + + //---------------------------------------------------------------------- + public function setVersion($version) + { + if($version < 0 || $version > QRSPEC_VERSION_MAX) { + throw new Exception('Invalid version no'); + return -1; + } + + $this->version = $version; + + return 0; + } + + //---------------------------------------------------------------------- + public function getErrorCorrectionLevel() + { + return $this->level; + } + + //---------------------------------------------------------------------- + public function setErrorCorrectionLevel($level) + { + if($level > QR_ECLEVEL_H) { + throw new Exception('Invalid ECLEVEL'); + return -1; + } + + $this->level = $level; + + return 0; + } + + //---------------------------------------------------------------------- + public function appendEntry(QRinputItem $entry) + { + $this->items[] = $entry; + } + + //---------------------------------------------------------------------- + public function append($mode, $size, $data) + { + try { + $entry = new QRinputItem($mode, $size, $data); + $this->items[] = $entry; + return 0; + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + + public function insertStructuredAppendHeader($size, $index, $parity) + { + if( $size > MAX_STRUCTURED_SYMBOLS ) { + throw new Exception('insertStructuredAppendHeader wrong size'); + } + + if( $index <= 0 || $index > MAX_STRUCTURED_SYMBOLS ) { + throw new Exception('insertStructuredAppendHeader wrong index'); + } + + $buf = array($size, $index, $parity); + + try { + $entry = new QRinputItem(QR_MODE_STRUCTURE, 3, buf); + array_unshift($this->items, $entry); + return 0; + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function calcParity() + { + $parity = 0; + + foreach($this->items as $item) { + if($item->mode != QR_MODE_STRUCTURE) { + for($i=$item->size-1; $i>=0; $i--) { + $parity ^= $item->data[$i]; + } + } + } + + return $parity; + } + + //---------------------------------------------------------------------- + public static function checkModeNum($size, $data) + { + for($i=0; $i<$size; $i++) { + if((ord($data[$i]) < ord('0')) || (ord($data[$i]) > ord('9'))){ + return false; + } + } + + return true; + } + + //---------------------------------------------------------------------- + public static function estimateBitsModeNum($size) + { + $w = (int)$size / 3; + $bits = $w * 10; + + switch($size - $w * 3) { + case 1: + $bits += 4; + break; + case 2: + $bits += 7; + break; + default: + break; + } + + return $bits; + } + + //---------------------------------------------------------------------- + public static $anTable = array( + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, + -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + ); + + //---------------------------------------------------------------------- + public static function lookAnTable($c) + { + return (($c > 127)?-1:self::$anTable[$c]); + } + + //---------------------------------------------------------------------- + public static function checkModeAn($size, $data) + { + for($i=0; $i<$size; $i++) { + if (self::lookAnTable(ord($data[$i])) == -1) { + return false; + } + } + + return true; + } + + //---------------------------------------------------------------------- + public static function estimateBitsModeAn($size) + { + $w = (int)($size / 2); + $bits = $w * 11; + + if($size & 1) { + $bits += 6; + } + + return $bits; + } + + //---------------------------------------------------------------------- + public static function estimateBitsMode8($size) + { + return $size * 8; + } + + //---------------------------------------------------------------------- + public function estimateBitsModeKanji($size) + { + return (int)(($size / 2) * 13); + } + + //---------------------------------------------------------------------- + public static function checkModeKanji($size, $data) + { + if($size & 1) + return false; + + for($i=0; $i<$size; $i+=2) { + $val = (ord($data[$i]) << 8) | ord($data[$i+1]); + if( $val < 0x8140 + || ($val > 0x9ffc && $val < 0xe040) + || $val > 0xebbf) { + return false; + } + } + + return true; + } + + /*********************************************************************** + * Validation + **********************************************************************/ + + public static function check($mode, $size, $data) + { + if($size <= 0) + return false; + + switch($mode) { + case QR_MODE_NUM: return self::checkModeNum($size, $data); break; + case QR_MODE_AN: return self::checkModeAn($size, $data); break; + case QR_MODE_KANJI: return self::checkModeKanji($size, $data); break; + case QR_MODE_8: return true; break; + case QR_MODE_STRUCTURE: return true; break; + + default: + break; + } + + return false; + } + + + //---------------------------------------------------------------------- + public function estimateBitStreamSize($version) + { + $bits = 0; + + foreach($this->items as $item) { + $bits += $item->estimateBitStreamSizeOfEntry($version); + } + + return $bits; + } + + //---------------------------------------------------------------------- + public function estimateVersion() + { + $version = 0; + $prev = 0; + do { + $prev = $version; + $bits = $this->estimateBitStreamSize($prev); + $version = QRspec::getMinimumVersion((int)(($bits + 7) / 8), $this->level); + if ($version < 0) { + return -1; + } + } while ($version > $prev); + + return $version; + } + + //---------------------------------------------------------------------- + public static function lengthOfCode($mode, $version, $bits) + { + $payload = $bits - 4 - QRspec::lengthIndicator($mode, $version); + switch($mode) { + case QR_MODE_NUM: + $chunks = (int)($payload / 10); + $remain = $payload - $chunks * 10; + $size = $chunks * 3; + if($remain >= 7) { + $size += 2; + } else if($remain >= 4) { + $size += 1; + } + break; + case QR_MODE_AN: + $chunks = (int)($payload / 11); + $remain = $payload - $chunks * 11; + $size = $chunks * 2; + if($remain >= 6) + $size++; + break; + case QR_MODE_8: + $size = (int)($payload / 8); + break; + case QR_MODE_KANJI: + $size = (int)(($payload / 13) * 2); + break; + case QR_MODE_STRUCTURE: + $size = (int)($payload / 8); + break; + default: + $size = 0; + break; + } + + $maxsize = QRspec::maximumWords($mode, $version); + if($size < 0) $size = 0; + if($size > $maxsize) $size = $maxsize; + + return $size; + } + + //---------------------------------------------------------------------- + public function createBitStream() + { + $total = 0; + + foreach($this->items as $item) { + $bits = $item->encodeBitStream($this->version); + + if($bits < 0) + return -1; + + $total += $bits; + } + + return $total; + } + + //---------------------------------------------------------------------- + public function convertData() + { + $ver = $this->estimateVersion(); + if($ver > $this->getVersion()) { + $this->setVersion($ver); + } + + for(;;) { + $bits = $this->createBitStream(); + + if($bits < 0) + return -1; + + $ver = QRspec::getMinimumVersion((int)(($bits + 7) / 8), $this->level); + if($ver < 0) { + throw new Exception('WRONG VERSION'); + return -1; + } else if($ver > $this->getVersion()) { + $this->setVersion($ver); + } else { + break; + } + } + + return 0; + } + + //---------------------------------------------------------------------- + public function appendPaddingBit(&$bstream) + { + $bits = $bstream->size(); + $maxwords = QRspec::getDataLength($this->version, $this->level); + $maxbits = $maxwords * 8; + + if ($maxbits == $bits) { + return 0; + } + + if ($maxbits - $bits < 5) { + return $bstream->appendNum($maxbits - $bits, 0); + } + + $bits += 4; + $words = (int)(($bits + 7) / 8); + + $padding = new QRbitstream(); + $ret = $padding->appendNum($words * 8 - $bits + 4, 0); + + if($ret < 0) + return $ret; + + $padlen = $maxwords - $words; + + if($padlen > 0) { + + $padbuf = array(); + for($i=0; $i<$padlen; $i++) { + $padbuf[$i] = ($i&1)?0x11:0xec; + } + + $ret = $padding->appendBytes($padlen, $padbuf); + + if($ret < 0) + return $ret; + + } + + $ret = $bstream->append($padding); + + return $ret; + } + + //---------------------------------------------------------------------- + public function mergeBitStream() + { + if($this->convertData() < 0) { + return null; + } + + $bstream = new QRbitstream(); + + foreach($this->items as $item) { + $ret = $bstream->append($item->bstream); + if($ret < 0) { + return null; + } + } + + return $bstream; + } + + //---------------------------------------------------------------------- + public function getBitStream() + { + + $bstream = $this->mergeBitStream(); + + if($bstream == null) { + return null; + } + + $ret = $this->appendPaddingBit($bstream); + if($ret < 0) { + return null; + } + + return $bstream; + } + + //---------------------------------------------------------------------- + public function getByteStream() + { + $bstream = $this->getBitStream(); + if($bstream == null) { + return null; + } + + return $bstream->toByte(); + } + } + + + + + + +//---- qrbitstream.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Bitstream class + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + class QRbitstream { + + public $data = array(); + + //---------------------------------------------------------------------- + public function size() + { + return count($this->data); + } + + //---------------------------------------------------------------------- + public function allocate($setLength) + { + $this->data = array_fill(0, $setLength, 0); + return 0; + } + + //---------------------------------------------------------------------- + public static function newFromNum($bits, $num) + { + $bstream = new QRbitstream(); + $bstream->allocate($bits); + + $mask = 1 << ($bits - 1); + for($i=0; $i<$bits; $i++) { + if($num & $mask) { + $bstream->data[$i] = 1; + } else { + $bstream->data[$i] = 0; + } + $mask = $mask >> 1; + } + + return $bstream; + } + + //---------------------------------------------------------------------- + public static function newFromBytes($size, $data) + { + $bstream = new QRbitstream(); + $bstream->allocate($size * 8); + $p=0; + + for($i=0; $i<$size; $i++) { + $mask = 0x80; + for($j=0; $j<8; $j++) { + if($data[$i] & $mask) { + $bstream->data[$p] = 1; + } else { + $bstream->data[$p] = 0; + } + $p++; + $mask = $mask >> 1; + } + } + + return $bstream; + } + + //---------------------------------------------------------------------- + public function append(QRbitstream $arg) + { + if (is_null($arg)) { + return -1; + } + + if($arg->size() == 0) { + return 0; + } + + if($this->size() == 0) { + $this->data = $arg->data; + return 0; + } + + $this->data = array_values(array_merge($this->data, $arg->data)); + + return 0; + } + + //---------------------------------------------------------------------- + public function appendNum($bits, $num) + { + if ($bits == 0) + return 0; + + $b = QRbitstream::newFromNum($bits, $num); + + if(is_null($b)) + return -1; + + $ret = $this->append($b); + unset($b); + + return $ret; + } + + //---------------------------------------------------------------------- + public function appendBytes($size, $data) + { + if ($size == 0) + return 0; + + $b = QRbitstream::newFromBytes($size, $data); + + if(is_null($b)) + return -1; + + $ret = $this->append($b); + unset($b); + + return $ret; + } + + //---------------------------------------------------------------------- + public function toByte() + { + + $size = $this->size(); + + if($size == 0) { + return array(); + } + + $data = array_fill(0, (int)(($size + 7) / 8), 0); + $bytes = (int)($size / 8); + + $p = 0; + + for($i=0; $i<$bytes; $i++) { + $v = 0; + for($j=0; $j<8; $j++) { + $v = $v << 1; + $v |= $this->data[$p]; + $p++; + } + $data[$i] = $v; + } + + if($size & 7) { + $v = 0; + for($j=0; $j<($size & 7); $j++) { + $v = $v << 1; + $v |= $this->data[$p]; + $p++; + } + $data[$bytes] = $v; + } + + return $data; + } + + } + + + + +//---- qrsplit.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Input splitting classes + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * The following data / specifications are taken from + * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004) + * or + * "Automatic identification and data capture techniques -- + * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + class QRsplit { + + public $dataStr = ''; + public $input; + public $modeHint; + + //---------------------------------------------------------------------- + public function __construct($dataStr, $input, $modeHint) + { + $this->dataStr = $dataStr; + $this->input = $input; + $this->modeHint = $modeHint; + } + + //---------------------------------------------------------------------- + public static function isdigitat($str, $pos) + { + if ($pos >= strlen($str)) + return false; + + return ((ord($str[$pos]) >= ord('0'))&&(ord($str[$pos]) <= ord('9'))); + } + + //---------------------------------------------------------------------- + public static function isalnumat($str, $pos) + { + if ($pos >= strlen($str)) + return false; + + return (QRinput::lookAnTable(ord($str[$pos])) >= 0); + } + + //---------------------------------------------------------------------- + public function identifyMode($pos) + { + if ($pos >= strlen($this->dataStr)) + return QR_MODE_NUL; + + $c = $this->dataStr[$pos]; + + if(self::isdigitat($this->dataStr, $pos)) { + return QR_MODE_NUM; + } else if(self::isalnumat($this->dataStr, $pos)) { + return QR_MODE_AN; + } else if($this->modeHint == QR_MODE_KANJI) { + + if ($pos+1 < strlen($this->dataStr)) + { + $d = $this->dataStr[$pos+1]; + $word = (ord($c) << 8) | ord($d); + if(($word >= 0x8140 && $word <= 0x9ffc) || ($word >= 0xe040 && $word <= 0xebbf)) { + return QR_MODE_KANJI; + } + } + } + + return QR_MODE_8; + } + + //---------------------------------------------------------------------- + public function eatNum() + { + $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); + + $p = 0; + while(self::isdigitat($this->dataStr, $p)) { + $p++; + } + + $run = $p; + $mode = $this->identifyMode($p); + + if($mode == QR_MODE_8) { + $dif = QRinput::estimateBitsModeNum($run) + 4 + $ln + + QRinput::estimateBitsMode8(1) // + 4 + l8 + - QRinput::estimateBitsMode8($run + 1); // - 4 - l8 + if($dif > 0) { + return $this->eat8(); + } + } + if($mode == QR_MODE_AN) { + $dif = QRinput::estimateBitsModeNum($run) + 4 + $ln + + QRinput::estimateBitsModeAn(1) // + 4 + la + - QRinput::estimateBitsModeAn($run + 1);// - 4 - la + if($dif > 0) { + return $this->eatAn(); + } + } + + $ret = $this->input->append(QR_MODE_NUM, $run, str_split($this->dataStr)); + if($ret < 0) + return -1; + + return $run; + } + + //---------------------------------------------------------------------- + public function eatAn() + { + $la = QRspec::lengthIndicator(QR_MODE_AN, $this->input->getVersion()); + $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); + + $p = 0; + + while(self::isalnumat($this->dataStr, $p)) { + if(self::isdigitat($this->dataStr, $p)) { + $q = $p; + while(self::isdigitat($this->dataStr, $q)) { + $q++; + } + + $dif = QRinput::estimateBitsModeAn($p) // + 4 + la + + QRinput::estimateBitsModeNum($q - $p) + 4 + $ln + - QRinput::estimateBitsModeAn($q); // - 4 - la + + if($dif < 0) { + break; + } else { + $p = $q; + } + } else { + $p++; + } + } + + $run = $p; + + if(!self::isalnumat($this->dataStr, $p)) { + $dif = QRinput::estimateBitsModeAn($run) + 4 + $la + + QRinput::estimateBitsMode8(1) // + 4 + l8 + - QRinput::estimateBitsMode8($run + 1); // - 4 - l8 + if($dif > 0) { + return $this->eat8(); + } + } + + $ret = $this->input->append(QR_MODE_AN, $run, str_split($this->dataStr)); + if($ret < 0) + return -1; + + return $run; + } + + //---------------------------------------------------------------------- + public function eatKanji() + { + $p = 0; + + while($this->identifyMode($p) == QR_MODE_KANJI) { + $p += 2; + } + + $ret = $this->input->append(QR_MODE_KANJI, $p, str_split($this->dataStr)); + if($ret < 0) + return -1; + + return $run; + } + + //---------------------------------------------------------------------- + public function eat8() + { + $la = QRspec::lengthIndicator(QR_MODE_AN, $this->input->getVersion()); + $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); + + $p = 1; + $dataStrLen = strlen($this->dataStr); + + while($p < $dataStrLen) { + + $mode = $this->identifyMode($p); + if($mode == QR_MODE_KANJI) { + break; + } + if($mode == QR_MODE_NUM) { + $q = $p; + while(self::isdigitat($this->dataStr, $q)) { + $q++; + } + $dif = QRinput::estimateBitsMode8($p) // + 4 + l8 + + QRinput::estimateBitsModeNum($q - $p) + 4 + $ln + - QRinput::estimateBitsMode8($q); // - 4 - l8 + if($dif < 0) { + break; + } else { + $p = $q; + } + } else if($mode == QR_MODE_AN) { + $q = $p; + while(self::isalnumat($this->dataStr, $q)) { + $q++; + } + $dif = QRinput::estimateBitsMode8($p) // + 4 + l8 + + QRinput::estimateBitsModeAn($q - $p) + 4 + $la + - QRinput::estimateBitsMode8($q); // - 4 - l8 + if($dif < 0) { + break; + } else { + $p = $q; + } + } else { + $p++; + } + } + + $run = $p; + $ret = $this->input->append(QR_MODE_8, $run, str_split($this->dataStr)); + + if($ret < 0) + return -1; + + return $run; + } + + //---------------------------------------------------------------------- + public function splitString() + { + while (strlen($this->dataStr) > 0) + { + if($this->dataStr == '') + return 0; + + $mode = $this->identifyMode(0); + + switch ($mode) { + case QR_MODE_NUM: $length = $this->eatNum(); break; + case QR_MODE_AN: $length = $this->eatAn(); break; + case QR_MODE_KANJI: + if ($hint == QR_MODE_KANJI) + $length = $this->eatKanji(); + else $length = $this->eat8(); + break; + default: $length = $this->eat8(); break; + + } + + if($length == 0) return 0; + if($length < 0) return -1; + + $this->dataStr = substr($this->dataStr, $length); + } + } + + //---------------------------------------------------------------------- + public function toUpper() + { + $stringLen = strlen($this->dataStr); + $p = 0; + + while ($p<$stringLen) { + $mode = self::identifyMode(substr($this->dataStr, $p), $this->modeHint); + if($mode == QR_MODE_KANJI) { + $p += 2; + } else { + if (ord($this->dataStr[$p]) >= ord('a') && ord($this->dataStr[$p]) <= ord('z')) { + $this->dataStr[$p] = chr(ord($this->dataStr[$p]) - 32); + } + $p++; + } + } + + return $this->dataStr; + } + + //---------------------------------------------------------------------- + public static function splitStringToQRinput($string, QRinput $input, $modeHint, $casesensitive = true) + { + if(is_null($string) || $string == '\0' || $string == '') { + throw new Exception('empty string!!!'); + } + + $split = new QRsplit($string, $input, $modeHint); + + if(!$casesensitive) + $split->toUpper(); + + return $split->splitString(); + } + } + + + +//---- qrrscode.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Reed-Solomon error correction support + * + * Copyright (C) 2002, 2003, 2004, 2006 Phil Karn, KA9Q + * (libfec is released under the GNU Lesser General Public License.) + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + class QRrsItem { + + public $mm; // Bits per symbol + public $nn; // Symbols per block (= (1<= $this->nn) { + $x -= $this->nn; + $x = ($x >> $this->mm) + ($x & $this->nn); + } + + return $x; + } + + //---------------------------------------------------------------------- + public static function init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) + { + // Common code for intializing a Reed-Solomon control block (char or int symbols) + // Copyright 2004 Phil Karn, KA9Q + // May be used under the terms of the GNU Lesser General Public License (LGPL) + + $rs = null; + + // Check parameter ranges + if($symsize < 0 || $symsize > 8) return $rs; + if($fcr < 0 || $fcr >= (1<<$symsize)) return $rs; + if($prim <= 0 || $prim >= (1<<$symsize)) return $rs; + if($nroots < 0 || $nroots >= (1<<$symsize)) return $rs; // Can't have more roots than symbol values! + if($pad < 0 || $pad >= ((1<<$symsize) -1 - $nroots)) return $rs; // Too much padding + + $rs = new QRrsItem(); + $rs->mm = $symsize; + $rs->nn = (1<<$symsize)-1; + $rs->pad = $pad; + + $rs->alpha_to = array_fill(0, $rs->nn+1, 0); + $rs->index_of = array_fill(0, $rs->nn+1, 0); + + // PHP style macro replacement ;) + $NN =& $rs->nn; + $A0 =& $NN; + + // Generate Galois field lookup tables + $rs->index_of[0] = $A0; // log(zero) = -inf + $rs->alpha_to[$A0] = 0; // alpha**-inf = 0 + $sr = 1; + + for($i=0; $i<$rs->nn; $i++) { + $rs->index_of[$sr] = $i; + $rs->alpha_to[$i] = $sr; + $sr <<= 1; + if($sr & (1<<$symsize)) { + $sr ^= $gfpoly; + } + $sr &= $rs->nn; + } + + if($sr != 1){ + // field generator polynomial is not primitive! + $rs = NULL; + return $rs; + } + + /* Form RS code generator polynomial from its roots */ + $rs->genpoly = array_fill(0, $nroots+1, 0); + + $rs->fcr = $fcr; + $rs->prim = $prim; + $rs->nroots = $nroots; + $rs->gfpoly = $gfpoly; + + /* Find prim-th root of 1, used in decoding */ + for($iprim=1;($iprim % $prim) != 0;$iprim += $rs->nn) + ; // intentional empty-body loop! + + $rs->iprim = (int)($iprim / $prim); + $rs->genpoly[0] = 1; + + for ($i = 0,$root=$fcr*$prim; $i < $nroots; $i++, $root += $prim) { + $rs->genpoly[$i+1] = 1; + + // Multiply rs->genpoly[] by @**(root + x) + for ($j = $i; $j > 0; $j--) { + if ($rs->genpoly[$j] != 0) { + $rs->genpoly[$j] = $rs->genpoly[$j-1] ^ $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[$j]] + $root)]; + } else { + $rs->genpoly[$j] = $rs->genpoly[$j-1]; + } + } + // rs->genpoly[0] can never be zero + $rs->genpoly[0] = $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[0]] + $root)]; + } + + // convert rs->genpoly[] to index form for quicker encoding + for ($i = 0; $i <= $nroots; $i++) + $rs->genpoly[$i] = $rs->index_of[$rs->genpoly[$i]]; + + return $rs; + } + + //---------------------------------------------------------------------- + public function encode_rs_char($data, &$parity) + { + $MM =& $this->mm; + $NN =& $this->nn; + $ALPHA_TO =& $this->alpha_to; + $INDEX_OF =& $this->index_of; + $GENPOLY =& $this->genpoly; + $NROOTS =& $this->nroots; + $FCR =& $this->fcr; + $PRIM =& $this->prim; + $IPRIM =& $this->iprim; + $PAD =& $this->pad; + $A0 =& $NN; + + $parity = array_fill(0, $NROOTS, 0); + + for($i=0; $i< ($NN-$NROOTS-$PAD); $i++) { + + $feedback = $INDEX_OF[$data[$i] ^ $parity[0]]; + if($feedback != $A0) { + // feedback term is non-zero + + // This line is unnecessary when GENPOLY[NROOTS] is unity, as it must + // always be for the polynomials constructed by init_rs() + $feedback = $this->modnn($NN - $GENPOLY[$NROOTS] + $feedback); + + for($j=1;$j<$NROOTS;$j++) { + $parity[$j] ^= $ALPHA_TO[$this->modnn($feedback + $GENPOLY[$NROOTS-$j])]; + } + } + + // Shift + array_shift($parity); + if($feedback != $A0) { + array_push($parity, $ALPHA_TO[$this->modnn($feedback + $GENPOLY[0])]); + } else { + array_push($parity, 0); + } + } + } + } + + //########################################################################## + + class QRrs { + + public static $items = array(); + + //---------------------------------------------------------------------- + public static function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) + { + foreach(self::$items as $rs) { + if($rs->pad != $pad) continue; + if($rs->nroots != $nroots) continue; + if($rs->mm != $symsize) continue; + if($rs->gfpoly != $gfpoly) continue; + if($rs->fcr != $fcr) continue; + if($rs->prim != $prim) continue; + + return $rs; + } + + $rs = QRrsItem::init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad); + array_unshift(self::$items, $rs); + + return $rs; + } + } + + + +//---- qrmask.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Masking + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('N1', 3); + define('N2', 3); + define('N3', 40); + define('N4', 10); + + class QRmask { + + public $runLength = array(); + + //---------------------------------------------------------------------- + public function __construct() + { + $this->runLength = array_fill(0, QRSPEC_WIDTH_MAX + 1, 0); + } + + //---------------------------------------------------------------------- + public function writeFormatInformation($width, &$frame, $mask, $level) + { + $blacks = 0; + $format = QRspec::getFormatInfo($mask, $level); + + for($i=0; $i<8; $i++) { + if($format & 1) { + $blacks += 2; + $v = 0x85; + } else { + $v = 0x84; + } + + $frame[8][$width - 1 - $i] = chr($v); + if($i < 6) { + $frame[$i][8] = chr($v); + } else { + $frame[$i + 1][8] = chr($v); + } + $format = $format >> 1; + } + + for($i=0; $i<7; $i++) { + if($format & 1) { + $blacks += 2; + $v = 0x85; + } else { + $v = 0x84; + } + + $frame[$width - 7 + $i][8] = chr($v); + if($i == 0) { + $frame[8][7] = chr($v); + } else { + $frame[8][6 - $i] = chr($v); + } + + $format = $format >> 1; + } + + return $blacks; + } + + //---------------------------------------------------------------------- + public function mask0($x, $y) { return ($x+$y)&1; } + public function mask1($x, $y) { return ($y&1); } + public function mask2($x, $y) { return ($x%3); } + public function mask3($x, $y) { return ($x+$y)%3; } + public function mask4($x, $y) { return (((int)($y/2))+((int)($x/3)))&1; } + public function mask5($x, $y) { return (($x*$y)&1)+($x*$y)%3; } + public function mask6($x, $y) { return ((($x*$y)&1)+($x*$y)%3)&1; } + public function mask7($x, $y) { return ((($x*$y)%3)+(($x+$y)&1))&1; } + + //---------------------------------------------------------------------- + private function generateMaskNo($maskNo, $width, $frame) + { + $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); + + for($y=0; $y<$width; $y++) { + for($x=0; $x<$width; $x++) { + if(ord($frame[$y][$x]) & 0x80) { + $bitMask[$y][$x] = 0; + } else { + $maskFunc = call_user_func(array($this, 'mask'.$maskNo), $x, $y); + $bitMask[$y][$x] = ($maskFunc == 0)?1:0; + } + + } + } + + return $bitMask; + } + + //---------------------------------------------------------------------- + public static function serial($bitFrame) + { + $codeArr = array(); + + foreach ($bitFrame as $line) + $codeArr[] = join('', $line); + + return gzcompress(join("\n", $codeArr), 9); + } + + //---------------------------------------------------------------------- + public static function unserial($code) + { + $codeArr = array(); + + $codeLines = explode("\n", gzuncompress($code)); + foreach ($codeLines as $line) + $codeArr[] = str_split($line); + + return $codeArr; + } + + //---------------------------------------------------------------------- + public function makeMaskNo($maskNo, $width, $s, &$d, $maskGenOnly = false) + { + $b = 0; + $bitMask = array(); + + $fileName = QR_CACHE_DIR.'mask_'.$maskNo.DIRECTORY_SEPARATOR.'mask_'.$width.'_'.$maskNo.'.dat'; + + if (QR_CACHEABLE) { + if (file_exists($fileName)) { + $bitMask = self::unserial(file_get_contents($fileName)); + } else { + $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d); + if (!file_exists(QR_CACHE_DIR.'mask_'.$maskNo)) + mkdir(QR_CACHE_DIR.'mask_'.$maskNo); + file_put_contents($fileName, self::serial($bitMask)); + } + } else { + $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d); + } + + if ($maskGenOnly) + return; + + $d = $s; + + for($y=0; $y<$width; $y++) { + for($x=0; $x<$width; $x++) { + if($bitMask[$y][$x] == 1) { + $d[$y][$x] = chr(ord($s[$y][$x]) ^ (int)$bitMask[$y][$x]); + } + $b += (int)(ord($d[$y][$x]) & 1); + } + } + + return $b; + } + + //---------------------------------------------------------------------- + public function makeMask($width, $frame, $maskNo, $level) + { + $masked = array_fill(0, $width, str_repeat("\0", $width)); + $this->makeMaskNo($maskNo, $width, $frame, $masked); + $this->writeFormatInformation($width, $masked, $maskNo, $level); + + return $masked; + } + + //---------------------------------------------------------------------- + public function calcN1N3($length) + { + $demerit = 0; + + for($i=0; $i<$length; $i++) { + + if($this->runLength[$i] >= 5) { + $demerit += (N1 + ($this->runLength[$i] - 5)); + } + if($i & 1) { + if(($i >= 3) && ($i < ($length-2)) && ($this->runLength[$i] % 3 == 0)) { + $fact = (int)($this->runLength[$i] / 3); + if(($this->runLength[$i-2] == $fact) && + ($this->runLength[$i-1] == $fact) && + ($this->runLength[$i+1] == $fact) && + ($this->runLength[$i+2] == $fact)) { + if(($this->runLength[$i-3] < 0) || ($this->runLength[$i-3] >= (4 * $fact))) { + $demerit += N3; + } else if((($i+3) >= $length) || ($this->runLength[$i+3] >= (4 * $fact))) { + $demerit += N3; + } + } + } + } + } + return $demerit; + } + + //---------------------------------------------------------------------- + public function evaluateSymbol($width, $frame) + { + $head = 0; + $demerit = 0; + + for($y=0; $y<$width; $y++) { + $head = 0; + $this->runLength[0] = 1; + + $frameY = $frame[$y]; + + if ($y>0) + $frameYM = $frame[$y-1]; + + for($x=0; $x<$width; $x++) { + if(($x > 0) && ($y > 0)) { + $b22 = ord($frameY[$x]) & ord($frameY[$x-1]) & ord($frameYM[$x]) & ord($frameYM[$x-1]); + $w22 = ord($frameY[$x]) | ord($frameY[$x-1]) | ord($frameYM[$x]) | ord($frameYM[$x-1]); + + if(($b22 | ($w22 ^ 1))&1) { + $demerit += N2; + } + } + if(($x == 0) && (ord($frameY[$x]) & 1)) { + $this->runLength[0] = -1; + $head = 1; + $this->runLength[$head] = 1; + } else if($x > 0) { + if((ord($frameY[$x]) ^ ord($frameY[$x-1])) & 1) { + $head++; + $this->runLength[$head] = 1; + } else { + $this->runLength[$head]++; + } + } + } + + $demerit += $this->calcN1N3($head+1); + } + + for($x=0; $x<$width; $x++) { + $head = 0; + $this->runLength[0] = 1; + + for($y=0; $y<$width; $y++) { + if($y == 0 && (ord($frame[$y][$x]) & 1)) { + $this->runLength[0] = -1; + $head = 1; + $this->runLength[$head] = 1; + } else if($y > 0) { + if((ord($frame[$y][$x]) ^ ord($frame[$y-1][$x])) & 1) { + $head++; + $this->runLength[$head] = 1; + } else { + $this->runLength[$head]++; + } + } + } + + $demerit += $this->calcN1N3($head+1); + } + + return $demerit; + } + + + //---------------------------------------------------------------------- + public function mask($width, $frame, $level) + { + $minDemerit = PHP_INT_MAX; + $bestMaskNum = 0; + $bestMask = array(); + + $checked_masks = array(0,1,2,3,4,5,6,7); + + if (QR_FIND_FROM_RANDOM !== false) { + + $howManuOut = 8-(QR_FIND_FROM_RANDOM % 9); + for ($i = 0; $i < $howManuOut; $i++) { + $remPos = rand (0, count($checked_masks)-1); + unset($checked_masks[$remPos]); + $checked_masks = array_values($checked_masks); + } + + } + + $bestMask = $frame; + + foreach($checked_masks as $i) { + $mask = array_fill(0, $width, str_repeat("\0", $width)); + + $demerit = 0; + $blacks = 0; + $blacks = $this->makeMaskNo($i, $width, $frame, $mask); + $blacks += $this->writeFormatInformation($width, $mask, $i, $level); + $blacks = (int)(100 * $blacks / ($width * $width)); + $demerit = (int)((int)(abs($blacks - 50) / 5) * N4); + $demerit += $this->evaluateSymbol($width, $mask); + + if($demerit < $minDemerit) { + $minDemerit = $demerit; + $bestMask = $mask; + $bestMaskNum = $i; + } + } + + return $bestMask; + } + + //---------------------------------------------------------------------- + } + + + + +//---- qrencode.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Main encoder classes. + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + class QRrsblock { + public $dataLength; + public $data = array(); + public $eccLength; + public $ecc = array(); + + public function __construct($dl, $data, $el, &$ecc, QRrsItem $rs) + { + $rs->encode_rs_char($data, $ecc); + + $this->dataLength = $dl; + $this->data = $data; + $this->eccLength = $el; + $this->ecc = $ecc; + } + }; + + //########################################################################## + + class QRrawcode { + public $version; + public $datacode = array(); + public $ecccode = array(); + public $blocks; + public $rsblocks = array(); //of RSblock + public $count; + public $dataLength; + public $eccLength; + public $b1; + + //---------------------------------------------------------------------- + public function __construct(QRinput $input) + { + $spec = array(0,0,0,0,0); + + $this->datacode = $input->getByteStream(); + if(is_null($this->datacode)) { + throw new Exception('null imput string'); + } + + QRspec::getEccSpec($input->getVersion(), $input->getErrorCorrectionLevel(), $spec); + + $this->version = $input->getVersion(); + $this->b1 = QRspec::rsBlockNum1($spec); + $this->dataLength = QRspec::rsDataLength($spec); + $this->eccLength = QRspec::rsEccLength($spec); + $this->ecccode = array_fill(0, $this->eccLength, 0); + $this->blocks = QRspec::rsBlockNum($spec); + + $ret = $this->init($spec); + if($ret < 0) { + throw new Exception('block alloc error'); + return null; + } + + $this->count = 0; + } + + //---------------------------------------------------------------------- + public function init(array $spec) + { + $dl = QRspec::rsDataCodes1($spec); + $el = QRspec::rsEccCodes1($spec); + $rs = QRrs::init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); + + + $blockNo = 0; + $dataPos = 0; + $eccPos = 0; + for($i=0; $iecccode,$eccPos); + $this->rsblocks[$blockNo] = new QRrsblock($dl, array_slice($this->datacode, $dataPos), $el, $ecc, $rs); + $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); + + $dataPos += $dl; + $eccPos += $el; + $blockNo++; + } + + if(QRspec::rsBlockNum2($spec) == 0) + return 0; + + $dl = QRspec::rsDataCodes2($spec); + $el = QRspec::rsEccCodes2($spec); + $rs = QRrs::init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); + + if($rs == NULL) return -1; + + for($i=0; $iecccode,$eccPos); + $this->rsblocks[$blockNo] = new QRrsblock($dl, array_slice($this->datacode, $dataPos), $el, $ecc, $rs); + $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); + + $dataPos += $dl; + $eccPos += $el; + $blockNo++; + } + + return 0; + } + + //---------------------------------------------------------------------- + public function getCode() + { + $ret; + + if($this->count < $this->dataLength) { + $row = $this->count % $this->blocks; + $col = $this->count / $this->blocks; + if($col >= $this->rsblocks[0]->dataLength) { + $row += $this->b1; + } + $ret = $this->rsblocks[$row]->data[$col]; + } else if($this->count < $this->dataLength + $this->eccLength) { + $row = ($this->count - $this->dataLength) % $this->blocks; + $col = ($this->count - $this->dataLength) / $this->blocks; + $ret = $this->rsblocks[$row]->ecc[$col]; + } else { + return 0; + } + $this->count++; + + return $ret; + } + } + + //########################################################################## + + class QRcode { + + public $version; + public $width; + public $data; + + //---------------------------------------------------------------------- + public function encodeMask(QRinput $input, $mask) + { + if($input->getVersion() < 0 || $input->getVersion() > QRSPEC_VERSION_MAX) { + throw new Exception('wrong version'); + } + if($input->getErrorCorrectionLevel() > QR_ECLEVEL_H) { + throw new Exception('wrong level'); + } + + $raw = new QRrawcode($input); + + QRtools::markTime('after_raw'); + + $version = $raw->version; + $width = QRspec::getWidth($version); + $frame = QRspec::newFrame($version); + + $filler = new FrameFiller($width, $frame); + if(is_null($filler)) { + return NULL; + } + + // inteleaved data and ecc codes + for($i=0; $i<$raw->dataLength + $raw->eccLength; $i++) { + $code = $raw->getCode(); + $bit = 0x80; + for($j=0; $j<8; $j++) { + $addr = $filler->next(); + $filler->setFrameAt($addr, 0x02 | (($bit & $code) != 0)); + $bit = $bit >> 1; + } + } + + QRtools::markTime('after_filler'); + + unset($raw); + + // remainder bits + $j = QRspec::getRemainder($version); + for($i=0; $i<$j; $i++) { + $addr = $filler->next(); + $filler->setFrameAt($addr, 0x02); + } + + $frame = $filler->frame; + unset($filler); + + + // masking + $maskObj = new QRmask(); + if($mask < 0) { + + if (QR_FIND_BEST_MASK) { + $masked = $maskObj->mask($width, $frame, $input->getErrorCorrectionLevel()); + } else { + $masked = $maskObj->makeMask($width, $frame, (intval(QR_DEFAULT_MASK) % 8), $input->getErrorCorrectionLevel()); + } + } else { + $masked = $maskObj->makeMask($width, $frame, $mask, $input->getErrorCorrectionLevel()); + } + + if($masked == NULL) { + return NULL; + } + + QRtools::markTime('after_mask'); + + $this->version = $version; + $this->width = $width; + $this->data = $masked; + + return $this; + } + + //---------------------------------------------------------------------- + public function encodeInput(QRinput $input) + { + return $this->encodeMask($input, -1); + } + + //---------------------------------------------------------------------- + public function encodeString8bit($string, $version, $level) + { + if(string == NULL) { + throw new Exception('empty string!'); + return NULL; + } + + $input = new QRinput($version, $level); + if($input == NULL) return NULL; + + $ret = $input->append($input, QR_MODE_8, strlen($string), str_split($string)); + if($ret < 0) { + unset($input); + return NULL; + } + return $this->encodeInput($input); + } + + //---------------------------------------------------------------------- + public function encodeString($string, $version, $level, $hint, $casesensitive) + { + + if($hint != QR_MODE_8 && $hint != QR_MODE_KANJI) { + throw new Exception('bad hint'); + return NULL; + } + + $input = new QRinput($version, $level); + if($input == NULL) return NULL; + + $ret = QRsplit::splitStringToQRinput($string, $input, $hint, $casesensitive); + if($ret < 0) { + return NULL; + } + + return $this->encodeInput($input); + } + + //---------------------------------------------------------------------- + public static function png($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false) + { + $enc = QRencode::factory($level, $size, $margin); + return $enc->encodePNG($text, $outfile, $saveandprint=false); + } + + //---------------------------------------------------------------------- + public static function text($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4) + { + $enc = QRencode::factory($level, $size, $margin); + return $enc->encode($text, $outfile); + } + + //---------------------------------------------------------------------- + public static function raw($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4) + { + $enc = QRencode::factory($level, $size, $margin); + return $enc->encodeRAW($text, $outfile); + } + } + + //########################################################################## + + class FrameFiller { + + public $width; + public $frame; + public $x; + public $y; + public $dir; + public $bit; + + //---------------------------------------------------------------------- + public function __construct($width, &$frame) + { + $this->width = $width; + $this->frame = $frame; + $this->x = $width - 1; + $this->y = $width - 1; + $this->dir = -1; + $this->bit = -1; + } + + //---------------------------------------------------------------------- + public function setFrameAt($at, $val) + { + $this->frame[$at['y']][$at['x']] = chr($val); + } + + //---------------------------------------------------------------------- + public function getFrameAt($at) + { + return ord($this->frame[$at['y']][$at['x']]); + } + + //---------------------------------------------------------------------- + public function next() + { + do { + + if($this->bit == -1) { + $this->bit = 0; + return array('x'=>$this->x, 'y'=>$this->y); + } + + $x = $this->x; + $y = $this->y; + $w = $this->width; + + if($this->bit == 0) { + $x--; + $this->bit++; + } else { + $x++; + $y += $this->dir; + $this->bit--; + } + + if($this->dir < 0) { + if($y < 0) { + $y = 0; + $x -= 2; + $this->dir = 1; + if($x == 6) { + $x--; + $y = 9; + } + } + } else { + if($y == $w) { + $y = $w - 1; + $x -= 2; + $this->dir = -1; + if($x == 6) { + $x--; + $y -= 8; + } + } + } + if($x < 0 || $y < 0) return null; + + $this->x = $x; + $this->y = $y; + + } while(ord($this->frame[$y][$x]) & 0x80); + + return array('x'=>$x, 'y'=>$y); + } + + } ; + + //########################################################################## + + class QRencode { + + public $casesensitive = true; + public $eightbit = false; + + public $version = 0; + public $size = 3; + public $margin = 4; + + public $structured = 0; // not supported yet + + public $level = QR_ECLEVEL_L; + public $hint = QR_MODE_8; + + //---------------------------------------------------------------------- + public static function factory($level = QR_ECLEVEL_L, $size = 3, $margin = 4) + { + $enc = new QRencode(); + $enc->size = $size; + $enc->margin = $margin; + + switch ($level.'') { + case '0': + case '1': + case '2': + case '3': + $enc->level = $level; + break; + case 'l': + case 'L': + $enc->level = QR_ECLEVEL_L; + break; + case 'm': + case 'M': + $enc->level = QR_ECLEVEL_M; + break; + case 'q': + case 'Q': + $enc->level = QR_ECLEVEL_Q; + break; + case 'h': + case 'H': + $enc->level = QR_ECLEVEL_H; + break; + } + + return $enc; + } + + //---------------------------------------------------------------------- + public function encodeRAW($intext, $outfile = false) + { + $code = new QRcode(); + + if($this->eightbit) { + $code->encodeString8bit($intext, $this->version, $this->level); + } else { + $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive); + } + + return $code->data; + } + + //---------------------------------------------------------------------- + public function encode($intext, $outfile = false) + { + $code = new QRcode(); + + if($this->eightbit) { + $code->encodeString8bit($intext, $this->version, $this->level); + } else { + $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive); + } + + QRtools::markTime('after_encode'); + + if ($outfile!== false) { + file_put_contents($outfile, join("\n", QRtools::binarize($code->data))); + } else { + return QRtools::binarize($code->data); + } + } + + //---------------------------------------------------------------------- + public function encodePNG($intext, $outfile = false,$saveandprint=false) + { + try { + + ob_start(); + $tab = $this->encode($intext); + $err = ob_get_contents(); + ob_end_clean(); + + if ($err != '') + QRtools::log($outfile, $err); + + $maxSize = (int)(QR_PNG_MAXIMUM_SIZE / (count($tab)+2*$this->margin)); + + QRimage::png($tab, $outfile, min(max(1, $this->size), $maxSize), $this->margin,$saveandprint); + + } catch (Exception $e) { + + QRtools::log($outfile, $e->getMessage()); + + } + } + } + + diff --git a/common/util/phpqrcode/qrbitstream.php b/common/util/phpqrcode/qrbitstream.php new file mode 100644 index 0000000..c8d1166 --- /dev/null +++ b/common/util/phpqrcode/qrbitstream.php @@ -0,0 +1,180 @@ + + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + class QRbitstream { + + public $data = array(); + + //---------------------------------------------------------------------- + public function size() + { + return count($this->data); + } + + //---------------------------------------------------------------------- + public function allocate($setLength) + { + $this->data = array_fill(0, $setLength, 0); + return 0; + } + + //---------------------------------------------------------------------- + public static function newFromNum($bits, $num) + { + $bstream = new QRbitstream(); + $bstream->allocate($bits); + + $mask = 1 << ($bits - 1); + for($i=0; $i<$bits; $i++) { + if($num & $mask) { + $bstream->data[$i] = 1; + } else { + $bstream->data[$i] = 0; + } + $mask = $mask >> 1; + } + + return $bstream; + } + + //---------------------------------------------------------------------- + public static function newFromBytes($size, $data) + { + $bstream = new QRbitstream(); + $bstream->allocate($size * 8); + $p=0; + + for($i=0; $i<$size; $i++) { + $mask = 0x80; + for($j=0; $j<8; $j++) { + if($data[$i] & $mask) { + $bstream->data[$p] = 1; + } else { + $bstream->data[$p] = 0; + } + $p++; + $mask = $mask >> 1; + } + } + + return $bstream; + } + + //---------------------------------------------------------------------- + public function append(QRbitstream $arg) + { + if (is_null($arg)) { + return -1; + } + + if($arg->size() == 0) { + return 0; + } + + if($this->size() == 0) { + $this->data = $arg->data; + return 0; + } + + $this->data = array_values(array_merge($this->data, $arg->data)); + + return 0; + } + + //---------------------------------------------------------------------- + public function appendNum($bits, $num) + { + if ($bits == 0) + return 0; + + $b = QRbitstream::newFromNum($bits, $num); + + if(is_null($b)) + return -1; + + $ret = $this->append($b); + unset($b); + + return $ret; + } + + //---------------------------------------------------------------------- + public function appendBytes($size, $data) + { + if ($size == 0) + return 0; + + $b = QRbitstream::newFromBytes($size, $data); + + if(is_null($b)) + return -1; + + $ret = $this->append($b); + unset($b); + + return $ret; + } + + //---------------------------------------------------------------------- + public function toByte() + { + + $size = $this->size(); + + if($size == 0) { + return array(); + } + + $data = array_fill(0, (int)(($size + 7) / 8), 0); + $bytes = (int)($size / 8); + + $p = 0; + + for($i=0; $i<$bytes; $i++) { + $v = 0; + for($j=0; $j<8; $j++) { + $v = $v << 1; + $v |= $this->data[$p]; + $p++; + } + $data[$i] = $v; + } + + if($size & 7) { + $v = 0; + for($j=0; $j<($size & 7); $j++) { + $v = $v << 1; + $v |= $this->data[$p]; + $p++; + } + $data[$bytes] = $v; + } + + return $data; + } + + } diff --git a/common/util/phpqrcode/qrconfig.php b/common/util/phpqrcode/qrconfig.php new file mode 100644 index 0000000..62e7f97 --- /dev/null +++ b/common/util/phpqrcode/qrconfig.php @@ -0,0 +1,17 @@ + + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + // Encoding modes + + define('QR_MODE_NUL', -1); + define('QR_MODE_NUM', 0); + define('QR_MODE_AN', 1); + define('QR_MODE_8', 2); + define('QR_MODE_KANJI', 3); + define('QR_MODE_STRUCTURE', 4); + + // Levels of error correction. + + define('QR_ECLEVEL_L', 0); + define('QR_ECLEVEL_M', 1); + define('QR_ECLEVEL_Q', 2); + define('QR_ECLEVEL_H', 3); + + // Supported output formats + + define('QR_FORMAT_TEXT', 0); + define('QR_FORMAT_PNG', 1); + + class qrstr { + public static function set(&$srctab, $x, $y, $repl, $replLen = false) { + $srctab[$y] = substr_replace($srctab[$y], ($replLen !== false)?substr($repl,0,$replLen):$repl, $x, ($replLen !== false)?$replLen:strlen($repl)); + } + } \ No newline at end of file diff --git a/common/util/phpqrcode/qrencode.php b/common/util/phpqrcode/qrencode.php new file mode 100644 index 0000000..fc909fa --- /dev/null +++ b/common/util/phpqrcode/qrencode.php @@ -0,0 +1,502 @@ + + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + class QRrsblock { + public $dataLength; + public $data = array(); + public $eccLength; + public $ecc = array(); + + public function __construct($dl, $data, $el, &$ecc, QRrsItem $rs) + { + $rs->encode_rs_char($data, $ecc); + + $this->dataLength = $dl; + $this->data = $data; + $this->eccLength = $el; + $this->ecc = $ecc; + } + }; + + //########################################################################## + + class QRrawcode { + public $version; + public $datacode = array(); + public $ecccode = array(); + public $blocks; + public $rsblocks = array(); //of RSblock + public $count; + public $dataLength; + public $eccLength; + public $b1; + + //---------------------------------------------------------------------- + public function __construct(QRinput $input) + { + $spec = array(0,0,0,0,0); + + $this->datacode = $input->getByteStream(); + if(is_null($this->datacode)) { + throw new Exception('null imput string'); + } + + QRspec::getEccSpec($input->getVersion(), $input->getErrorCorrectionLevel(), $spec); + + $this->version = $input->getVersion(); + $this->b1 = QRspec::rsBlockNum1($spec); + $this->dataLength = QRspec::rsDataLength($spec); + $this->eccLength = QRspec::rsEccLength($spec); + $this->ecccode = array_fill(0, $this->eccLength, 0); + $this->blocks = QRspec::rsBlockNum($spec); + + $ret = $this->init($spec); + if($ret < 0) { + throw new Exception('block alloc error'); + return null; + } + + $this->count = 0; + } + + //---------------------------------------------------------------------- + public function init(array $spec) + { + $dl = QRspec::rsDataCodes1($spec); + $el = QRspec::rsEccCodes1($spec); + $rs = QRrs::init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); + + + $blockNo = 0; + $dataPos = 0; + $eccPos = 0; + for($i=0; $iecccode,$eccPos); + $this->rsblocks[$blockNo] = new QRrsblock($dl, array_slice($this->datacode, $dataPos), $el, $ecc, $rs); + $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); + + $dataPos += $dl; + $eccPos += $el; + $blockNo++; + } + + if(QRspec::rsBlockNum2($spec) == 0) + return 0; + + $dl = QRspec::rsDataCodes2($spec); + $el = QRspec::rsEccCodes2($spec); + $rs = QRrs::init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); + + if($rs == NULL) return -1; + + for($i=0; $iecccode,$eccPos); + $this->rsblocks[$blockNo] = new QRrsblock($dl, array_slice($this->datacode, $dataPos), $el, $ecc, $rs); + $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); + + $dataPos += $dl; + $eccPos += $el; + $blockNo++; + } + + return 0; + } + + //---------------------------------------------------------------------- + public function getCode() + { + $ret; + + if($this->count < $this->dataLength) { + $row = $this->count % $this->blocks; + $col = $this->count / $this->blocks; + if($col >= $this->rsblocks[0]->dataLength) { + $row += $this->b1; + } + $ret = $this->rsblocks[$row]->data[$col]; + } else if($this->count < $this->dataLength + $this->eccLength) { + $row = ($this->count - $this->dataLength) % $this->blocks; + $col = ($this->count - $this->dataLength) / $this->blocks; + $ret = $this->rsblocks[$row]->ecc[$col]; + } else { + return 0; + } + $this->count++; + + return $ret; + } + } + + //########################################################################## + + class QRcode { + + public $version; + public $width; + public $data; + + //---------------------------------------------------------------------- + public function encodeMask(QRinput $input, $mask) + { + if($input->getVersion() < 0 || $input->getVersion() > QRSPEC_VERSION_MAX) { + throw new Exception('wrong version'); + } + if($input->getErrorCorrectionLevel() > QR_ECLEVEL_H) { + throw new Exception('wrong level'); + } + + $raw = new QRrawcode($input); + + QRtools::markTime('after_raw'); + + $version = $raw->version; + $width = QRspec::getWidth($version); + $frame = QRspec::newFrame($version); + + $filler = new FrameFiller($width, $frame); + if(is_null($filler)) { + return NULL; + } + + // inteleaved data and ecc codes + for($i=0; $i<$raw->dataLength + $raw->eccLength; $i++) { + $code = $raw->getCode(); + $bit = 0x80; + for($j=0; $j<8; $j++) { + $addr = $filler->next(); + $filler->setFrameAt($addr, 0x02 | (($bit & $code) != 0)); + $bit = $bit >> 1; + } + } + + QRtools::markTime('after_filler'); + + unset($raw); + + // remainder bits + $j = QRspec::getRemainder($version); + for($i=0; $i<$j; $i++) { + $addr = $filler->next(); + $filler->setFrameAt($addr, 0x02); + } + + $frame = $filler->frame; + unset($filler); + + + // masking + $maskObj = new QRmask(); + if($mask < 0) { + + if (QR_FIND_BEST_MASK) { + $masked = $maskObj->mask($width, $frame, $input->getErrorCorrectionLevel()); + } else { + $masked = $maskObj->makeMask($width, $frame, (intval(QR_DEFAULT_MASK) % 8), $input->getErrorCorrectionLevel()); + } + } else { + $masked = $maskObj->makeMask($width, $frame, $mask, $input->getErrorCorrectionLevel()); + } + + if($masked == NULL) { + return NULL; + } + + QRtools::markTime('after_mask'); + + $this->version = $version; + $this->width = $width; + $this->data = $masked; + + return $this; + } + + //---------------------------------------------------------------------- + public function encodeInput(QRinput $input) + { + return $this->encodeMask($input, -1); + } + + //---------------------------------------------------------------------- + public function encodeString8bit($string, $version, $level) + { + if(string == NULL) { + throw new Exception('empty string!'); + return NULL; + } + + $input = new QRinput($version, $level); + if($input == NULL) return NULL; + + $ret = $input->append($input, QR_MODE_8, strlen($string), str_split($string)); + if($ret < 0) { + unset($input); + return NULL; + } + return $this->encodeInput($input); + } + + //---------------------------------------------------------------------- + public function encodeString($string, $version, $level, $hint, $casesensitive) + { + + if($hint != QR_MODE_8 && $hint != QR_MODE_KANJI) { + throw new Exception('bad hint'); + return NULL; + } + + $input = new QRinput($version, $level); + if($input == NULL) return NULL; + + $ret = QRsplit::splitStringToQRinput($string, $input, $hint, $casesensitive); + if($ret < 0) { + return NULL; + } + + return $this->encodeInput($input); + } + + //---------------------------------------------------------------------- + public static function png($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false) + { + $enc = QRencode::factory($level, $size, $margin); + return $enc->encodePNG($text, $outfile, $saveandprint=false); + } + + //---------------------------------------------------------------------- + public static function text($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4) + { + $enc = QRencode::factory($level, $size, $margin); + return $enc->encode($text, $outfile); + } + + //---------------------------------------------------------------------- + public static function raw($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4) + { + $enc = QRencode::factory($level, $size, $margin); + return $enc->encodeRAW($text, $outfile); + } + } + + //########################################################################## + + class FrameFiller { + + public $width; + public $frame; + public $x; + public $y; + public $dir; + public $bit; + + //---------------------------------------------------------------------- + public function __construct($width, &$frame) + { + $this->width = $width; + $this->frame = $frame; + $this->x = $width - 1; + $this->y = $width - 1; + $this->dir = -1; + $this->bit = -1; + } + + //---------------------------------------------------------------------- + public function setFrameAt($at, $val) + { + $this->frame[$at['y']][$at['x']] = chr($val); + } + + //---------------------------------------------------------------------- + public function getFrameAt($at) + { + return ord($this->frame[$at['y']][$at['x']]); + } + + //---------------------------------------------------------------------- + public function next() + { + do { + + if($this->bit == -1) { + $this->bit = 0; + return array('x'=>$this->x, 'y'=>$this->y); + } + + $x = $this->x; + $y = $this->y; + $w = $this->width; + + if($this->bit == 0) { + $x--; + $this->bit++; + } else { + $x++; + $y += $this->dir; + $this->bit--; + } + + if($this->dir < 0) { + if($y < 0) { + $y = 0; + $x -= 2; + $this->dir = 1; + if($x == 6) { + $x--; + $y = 9; + } + } + } else { + if($y == $w) { + $y = $w - 1; + $x -= 2; + $this->dir = -1; + if($x == 6) { + $x--; + $y -= 8; + } + } + } + if($x < 0 || $y < 0) return null; + + $this->x = $x; + $this->y = $y; + + } while(ord($this->frame[$y][$x]) & 0x80); + + return array('x'=>$x, 'y'=>$y); + } + + } ; + + //########################################################################## + + class QRencode { + + public $casesensitive = true; + public $eightbit = false; + + public $version = 0; + public $size = 3; + public $margin = 4; + + public $structured = 0; // not supported yet + + public $level = QR_ECLEVEL_L; + public $hint = QR_MODE_8; + + //---------------------------------------------------------------------- + public static function factory($level = QR_ECLEVEL_L, $size = 3, $margin = 4) + { + $enc = new QRencode(); + $enc->size = $size; + $enc->margin = $margin; + + switch ($level.'') { + case '0': + case '1': + case '2': + case '3': + $enc->level = $level; + break; + case 'l': + case 'L': + $enc->level = QR_ECLEVEL_L; + break; + case 'm': + case 'M': + $enc->level = QR_ECLEVEL_M; + break; + case 'q': + case 'Q': + $enc->level = QR_ECLEVEL_Q; + break; + case 'h': + case 'H': + $enc->level = QR_ECLEVEL_H; + break; + } + + return $enc; + } + + //---------------------------------------------------------------------- + public function encodeRAW($intext, $outfile = false) + { + $code = new QRcode(); + + if($this->eightbit) { + $code->encodeString8bit($intext, $this->version, $this->level); + } else { + $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive); + } + + return $code->data; + } + + //---------------------------------------------------------------------- + public function encode($intext, $outfile = false) + { + $code = new QRcode(); + + if($this->eightbit) { + $code->encodeString8bit($intext, $this->version, $this->level); + } else { + $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive); + } + + QRtools::markTime('after_encode'); + + if ($outfile!== false) { + file_put_contents($outfile, join("\n", QRtools::binarize($code->data))); + } else { + return QRtools::binarize($code->data); + } + } + + //---------------------------------------------------------------------- + public function encodePNG($intext, $outfile = false,$saveandprint=false) + { + try { + + ob_start(); + $tab = $this->encode($intext); + $err = ob_get_contents(); + ob_end_clean(); + + if ($err != '') + QRtools::log($outfile, $err); + + $maxSize = (int)(QR_PNG_MAXIMUM_SIZE / (count($tab)+2*$this->margin)); + + QRimage::png($tab, $outfile, min(max(1, $this->size), $maxSize), $this->margin,$saveandprint); + + } catch (Exception $e) { + + QRtools::log($outfile, $e->getMessage()); + + } + } + } diff --git a/common/util/phpqrcode/qrimage.php b/common/util/phpqrcode/qrimage.php new file mode 100644 index 0000000..2175c5e --- /dev/null +++ b/common/util/phpqrcode/qrimage.php @@ -0,0 +1,95 @@ + + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('QR_IMAGE', true); + + class QRimage { + + //---------------------------------------------------------------------- + public static function png($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE) + { + $image = self::image($frame, $pixelPerPoint, $outerFrame); + + if ($filename === false) { + Header("Content-type: image/png"); + ImagePng($image); + } else { + if($saveandprint===TRUE){ + ImagePng($image, $filename); + header("Content-type: image/png"); + ImagePng($image); + }else{ + ImagePng($image, $filename); + } + } + + ImageDestroy($image); + } + + //---------------------------------------------------------------------- + public static function jpg($frame, $filename = false, $pixelPerPoint = 8, $outerFrame = 4, $q = 85) + { + $image = self::image($frame, $pixelPerPoint, $outerFrame); + + if ($filename === false) { + Header("Content-type: image/jpeg"); + ImageJpeg($image, null, $q); + } else { + ImageJpeg($image, $filename, $q); + } + + ImageDestroy($image); + } + + //---------------------------------------------------------------------- + private static function image($frame, $pixelPerPoint = 4, $outerFrame = 4) + { + $h = count($frame); + $w = strlen($frame[0]); + + $imgW = $w + 2*$outerFrame; + $imgH = $h + 2*$outerFrame; + + $base_image =ImageCreate($imgW, $imgH); + + $col[0] = ImageColorAllocate($base_image,255,255,255); + $col[1] = ImageColorAllocate($base_image,0,0,0); + + imagefill($base_image, 0, 0, $col[0]); + + for($y=0; $y<$h; $y++) { + for($x=0; $x<$w; $x++) { + if ($frame[$y][$x] == '1') { + ImageSetPixel($base_image,$x+$outerFrame,$y+$outerFrame,$col[1]); + } + } + } + + $target_image =ImageCreate($imgW * $pixelPerPoint, $imgH * $pixelPerPoint); + ImageCopyResized($target_image, $base_image, 0, 0, 0, 0, $imgW * $pixelPerPoint, $imgH * $pixelPerPoint, $imgW, $imgH); + ImageDestroy($base_image); + + return $target_image; + } + } \ No newline at end of file diff --git a/common/util/phpqrcode/qrinput.php b/common/util/phpqrcode/qrinput.php new file mode 100644 index 0000000..c65f91a --- /dev/null +++ b/common/util/phpqrcode/qrinput.php @@ -0,0 +1,729 @@ + + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('STRUCTURE_HEADER_BITS', 20); + define('MAX_STRUCTURED_SYMBOLS', 16); + + class QRinputItem { + + public $mode; + public $size; + public $data; + public $bstream; + + public function __construct($mode, $size, $data, $bstream = null) + { + $setData = array_slice($data, 0, $size); + + if (count($setData) < $size) { + $setData = array_merge($setData, array_fill(0,$size-count($setData),0)); + } + + if(!QRinput::check($mode, $size, $setData)) { + throw new Exception('Error m:'.$mode.',s:'.$size.',d:'.join(',',$setData)); + return null; + } + + $this->mode = $mode; + $this->size = $size; + $this->data = $setData; + $this->bstream = $bstream; + } + + //---------------------------------------------------------------------- + public function encodeModeNum($version) + { + try { + + $words = (int)($this->size / 3); + $bs = new QRbitstream(); + + $val = 0x1; + $bs->appendNum(4, $val); + $bs->appendNum(QRspec::lengthIndicator(QR_MODE_NUM, $version), $this->size); + + for($i=0; $i<$words; $i++) { + $val = (ord($this->data[$i*3 ]) - ord('0')) * 100; + $val += (ord($this->data[$i*3+1]) - ord('0')) * 10; + $val += (ord($this->data[$i*3+2]) - ord('0')); + $bs->appendNum(10, $val); + } + + if($this->size - $words * 3 == 1) { + $val = ord($this->data[$words*3]) - ord('0'); + $bs->appendNum(4, $val); + } else if($this->size - $words * 3 == 2) { + $val = (ord($this->data[$words*3 ]) - ord('0')) * 10; + $val += (ord($this->data[$words*3+1]) - ord('0')); + $bs->appendNum(7, $val); + } + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function encodeModeAn($version) + { + try { + $words = (int)($this->size / 2); + $bs = new QRbitstream(); + + $bs->appendNum(4, 0x02); + $bs->appendNum(QRspec::lengthIndicator(QR_MODE_AN, $version), $this->size); + + for($i=0; $i<$words; $i++) { + $val = (int)QRinput::lookAnTable(ord($this->data[$i*2 ])) * 45; + $val += (int)QRinput::lookAnTable(ord($this->data[$i*2+1])); + + $bs->appendNum(11, $val); + } + + if($this->size & 1) { + $val = QRinput::lookAnTable(ord($this->data[$words * 2])); + $bs->appendNum(6, $val); + } + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function encodeMode8($version) + { + try { + $bs = new QRbitstream(); + + $bs->appendNum(4, 0x4); + $bs->appendNum(QRspec::lengthIndicator(QR_MODE_8, $version), $this->size); + + for($i=0; $i<$this->size; $i++) { + $bs->appendNum(8, ord($this->data[$i])); + } + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function encodeModeKanji($version) + { + try { + + $bs = new QRbitrtream(); + + $bs->appendNum(4, 0x8); + $bs->appendNum(QRspec::lengthIndicator(QR_MODE_KANJI, $version), (int)($this->size / 2)); + + for($i=0; $i<$this->size; $i+=2) { + $val = (ord($this->data[$i]) << 8) | ord($this->data[$i+1]); + if($val <= 0x9ffc) { + $val -= 0x8140; + } else { + $val -= 0xc140; + } + + $h = ($val >> 8) * 0xc0; + $val = ($val & 0xff) + $h; + + $bs->appendNum(13, $val); + } + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function encodeModeStructure() + { + try { + $bs = new QRbitstream(); + + $bs->appendNum(4, 0x03); + $bs->appendNum(4, ord($this->data[1]) - 1); + $bs->appendNum(4, ord($this->data[0]) - 1); + $bs->appendNum(8, ord($this->data[2])); + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function estimateBitStreamSizeOfEntry($version) + { + $bits = 0; + + if($version == 0) + $version = 1; + + switch($this->mode) { + case QR_MODE_NUM: $bits = QRinput::estimateBitsModeNum($this->size); break; + case QR_MODE_AN: $bits = QRinput::estimateBitsModeAn($this->size); break; + case QR_MODE_8: $bits = QRinput::estimateBitsMode8($this->size); break; + case QR_MODE_KANJI: $bits = QRinput::estimateBitsModeKanji($this->size);break; + case QR_MODE_STRUCTURE: return STRUCTURE_HEADER_BITS; + default: + return 0; + } + + $l = QRspec::lengthIndicator($this->mode, $version); + $m = 1 << $l; + $num = (int)(($this->size + $m - 1) / $m); + + $bits += $num * (4 + $l); + + return $bits; + } + + //---------------------------------------------------------------------- + public function encodeBitStream($version) + { + try { + + unset($this->bstream); + $words = QRspec::maximumWords($this->mode, $version); + + if($this->size > $words) { + + $st1 = new QRinputItem($this->mode, $words, $this->data); + $st2 = new QRinputItem($this->mode, $this->size - $words, array_slice($this->data, $words)); + + $st1->encodeBitStream($version); + $st2->encodeBitStream($version); + + $this->bstream = new QRbitstream(); + $this->bstream->append($st1->bstream); + $this->bstream->append($st2->bstream); + + unset($st1); + unset($st2); + + } else { + + $ret = 0; + + switch($this->mode) { + case QR_MODE_NUM: $ret = $this->encodeModeNum($version); break; + case QR_MODE_AN: $ret = $this->encodeModeAn($version); break; + case QR_MODE_8: $ret = $this->encodeMode8($version); break; + case QR_MODE_KANJI: $ret = $this->encodeModeKanji($version);break; + case QR_MODE_STRUCTURE: $ret = $this->encodeModeStructure(); break; + + default: + break; + } + + if($ret < 0) + return -1; + } + + return $this->bstream->size(); + + } catch (Exception $e) { + return -1; + } + } + }; + + //########################################################################## + + class QRinput { + + public $items; + + private $version; + private $level; + + //---------------------------------------------------------------------- + public function __construct($version = 0, $level = QR_ECLEVEL_L) + { + if ($version < 0 || $version > QRSPEC_VERSION_MAX || $level > QR_ECLEVEL_H) { + throw new Exception('Invalid version no'); + return NULL; + } + + $this->version = $version; + $this->level = $level; + } + + //---------------------------------------------------------------------- + public function getVersion() + { + return $this->version; + } + + //---------------------------------------------------------------------- + public function setVersion($version) + { + if($version < 0 || $version > QRSPEC_VERSION_MAX) { + throw new Exception('Invalid version no'); + return -1; + } + + $this->version = $version; + + return 0; + } + + //---------------------------------------------------------------------- + public function getErrorCorrectionLevel() + { + return $this->level; + } + + //---------------------------------------------------------------------- + public function setErrorCorrectionLevel($level) + { + if($level > QR_ECLEVEL_H) { + throw new Exception('Invalid ECLEVEL'); + return -1; + } + + $this->level = $level; + + return 0; + } + + //---------------------------------------------------------------------- + public function appendEntry(QRinputItem $entry) + { + $this->items[] = $entry; + } + + //---------------------------------------------------------------------- + public function append($mode, $size, $data) + { + try { + $entry = new QRinputItem($mode, $size, $data); + $this->items[] = $entry; + return 0; + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + + public function insertStructuredAppendHeader($size, $index, $parity) + { + if( $size > MAX_STRUCTURED_SYMBOLS ) { + throw new Exception('insertStructuredAppendHeader wrong size'); + } + + if( $index <= 0 || $index > MAX_STRUCTURED_SYMBOLS ) { + throw new Exception('insertStructuredAppendHeader wrong index'); + } + + $buf = array($size, $index, $parity); + + try { + $entry = new QRinputItem(QR_MODE_STRUCTURE, 3, buf); + array_unshift($this->items, $entry); + return 0; + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function calcParity() + { + $parity = 0; + + foreach($this->items as $item) { + if($item->mode != QR_MODE_STRUCTURE) { + for($i=$item->size-1; $i>=0; $i--) { + $parity ^= $item->data[$i]; + } + } + } + + return $parity; + } + + //---------------------------------------------------------------------- + public static function checkModeNum($size, $data) + { + for($i=0; $i<$size; $i++) { + if((ord($data[$i]) < ord('0')) || (ord($data[$i]) > ord('9'))){ + return false; + } + } + + return true; + } + + //---------------------------------------------------------------------- + public static function estimateBitsModeNum($size) + { + $w = (int)$size / 3; + $bits = $w * 10; + + switch($size - $w * 3) { + case 1: + $bits += 4; + break; + case 2: + $bits += 7; + break; + default: + break; + } + + return $bits; + } + + //---------------------------------------------------------------------- + public static $anTable = array( + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, + -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + ); + + //---------------------------------------------------------------------- + public static function lookAnTable($c) + { + return (($c > 127)?-1:self::$anTable[$c]); + } + + //---------------------------------------------------------------------- + public static function checkModeAn($size, $data) + { + for($i=0; $i<$size; $i++) { + if (self::lookAnTable(ord($data[$i])) == -1) { + return false; + } + } + + return true; + } + + //---------------------------------------------------------------------- + public static function estimateBitsModeAn($size) + { + $w = (int)($size / 2); + $bits = $w * 11; + + if($size & 1) { + $bits += 6; + } + + return $bits; + } + + //---------------------------------------------------------------------- + public static function estimateBitsMode8($size) + { + return $size * 8; + } + + //---------------------------------------------------------------------- + public function estimateBitsModeKanji($size) + { + return (int)(($size / 2) * 13); + } + + //---------------------------------------------------------------------- + public static function checkModeKanji($size, $data) + { + if($size & 1) + return false; + + for($i=0; $i<$size; $i+=2) { + $val = (ord($data[$i]) << 8) | ord($data[$i+1]); + if( $val < 0x8140 + || ($val > 0x9ffc && $val < 0xe040) + || $val > 0xebbf) { + return false; + } + } + + return true; + } + + /*********************************************************************** + * Validation + **********************************************************************/ + + public static function check($mode, $size, $data) + { + if($size <= 0) + return false; + + switch($mode) { + case QR_MODE_NUM: return self::checkModeNum($size, $data); break; + case QR_MODE_AN: return self::checkModeAn($size, $data); break; + case QR_MODE_KANJI: return self::checkModeKanji($size, $data); break; + case QR_MODE_8: return true; break; + case QR_MODE_STRUCTURE: return true; break; + + default: + break; + } + + return false; + } + + + //---------------------------------------------------------------------- + public function estimateBitStreamSize($version) + { + $bits = 0; + + foreach($this->items as $item) { + $bits += $item->estimateBitStreamSizeOfEntry($version); + } + + return $bits; + } + + //---------------------------------------------------------------------- + public function estimateVersion() + { + $version = 0; + $prev = 0; + do { + $prev = $version; + $bits = $this->estimateBitStreamSize($prev); + $version = QRspec::getMinimumVersion((int)(($bits + 7) / 8), $this->level); + if ($version < 0) { + return -1; + } + } while ($version > $prev); + + return $version; + } + + //---------------------------------------------------------------------- + public static function lengthOfCode($mode, $version, $bits) + { + $payload = $bits - 4 - QRspec::lengthIndicator($mode, $version); + switch($mode) { + case QR_MODE_NUM: + $chunks = (int)($payload / 10); + $remain = $payload - $chunks * 10; + $size = $chunks * 3; + if($remain >= 7) { + $size += 2; + } else if($remain >= 4) { + $size += 1; + } + break; + case QR_MODE_AN: + $chunks = (int)($payload / 11); + $remain = $payload - $chunks * 11; + $size = $chunks * 2; + if($remain >= 6) + $size++; + break; + case QR_MODE_8: + $size = (int)($payload / 8); + break; + case QR_MODE_KANJI: + $size = (int)(($payload / 13) * 2); + break; + case QR_MODE_STRUCTURE: + $size = (int)($payload / 8); + break; + default: + $size = 0; + break; + } + + $maxsize = QRspec::maximumWords($mode, $version); + if($size < 0) $size = 0; + if($size > $maxsize) $size = $maxsize; + + return $size; + } + + //---------------------------------------------------------------------- + public function createBitStream() + { + $total = 0; + + foreach($this->items as $item) { + $bits = $item->encodeBitStream($this->version); + + if($bits < 0) + return -1; + + $total += $bits; + } + + return $total; + } + + //---------------------------------------------------------------------- + public function convertData() + { + $ver = $this->estimateVersion(); + if($ver > $this->getVersion()) { + $this->setVersion($ver); + } + + for(;;) { + $bits = $this->createBitStream(); + + if($bits < 0) + return -1; + + $ver = QRspec::getMinimumVersion((int)(($bits + 7) / 8), $this->level); + if($ver < 0) { + throw new Exception('WRONG VERSION'); + return -1; + } else if($ver > $this->getVersion()) { + $this->setVersion($ver); + } else { + break; + } + } + + return 0; + } + + //---------------------------------------------------------------------- + public function appendPaddingBit(&$bstream) + { + $bits = $bstream->size(); + $maxwords = QRspec::getDataLength($this->version, $this->level); + $maxbits = $maxwords * 8; + + if ($maxbits == $bits) { + return 0; + } + + if ($maxbits - $bits < 5) { + return $bstream->appendNum($maxbits - $bits, 0); + } + + $bits += 4; + $words = (int)(($bits + 7) / 8); + + $padding = new QRbitstream(); + $ret = $padding->appendNum($words * 8 - $bits + 4, 0); + + if($ret < 0) + return $ret; + + $padlen = $maxwords - $words; + + if($padlen > 0) { + + $padbuf = array(); + for($i=0; $i<$padlen; $i++) { + $padbuf[$i] = ($i&1)?0x11:0xec; + } + + $ret = $padding->appendBytes($padlen, $padbuf); + + if($ret < 0) + return $ret; + + } + + $ret = $bstream->append($padding); + + return $ret; + } + + //---------------------------------------------------------------------- + public function mergeBitStream() + { + if($this->convertData() < 0) { + return null; + } + + $bstream = new QRbitstream(); + + foreach($this->items as $item) { + $ret = $bstream->append($item->bstream); + if($ret < 0) { + return null; + } + } + + return $bstream; + } + + //---------------------------------------------------------------------- + public function getBitStream() + { + + $bstream = $this->mergeBitStream(); + + if($bstream == null) { + return null; + } + + $ret = $this->appendPaddingBit($bstream); + if($ret < 0) { + return null; + } + + return $bstream; + } + + //---------------------------------------------------------------------- + public function getByteStream() + { + $bstream = $this->getBitStream(); + if($bstream == null) { + return null; + } + + return $bstream->toByte(); + } + } + + + \ No newline at end of file diff --git a/common/util/phpqrcode/qrlib.php b/common/util/phpqrcode/qrlib.php new file mode 100644 index 0000000..43059b9 --- /dev/null +++ b/common/util/phpqrcode/qrlib.php @@ -0,0 +1,43 @@ + + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + $QR_BASEDIR = dirname(__FILE__).DIRECTORY_SEPARATOR; + + // Required libs + + include $QR_BASEDIR."qrconst.php"; + include $QR_BASEDIR."qrconfig.php"; + include $QR_BASEDIR."qrtools.php"; + include $QR_BASEDIR."qrspec.php"; + include $QR_BASEDIR."qrimage.php"; + include $QR_BASEDIR."qrinput.php"; + include $QR_BASEDIR."qrbitstream.php"; + include $QR_BASEDIR."qrsplit.php"; + include $QR_BASEDIR."qrrscode.php"; + include $QR_BASEDIR."qrmask.php"; + include $QR_BASEDIR."qrencode.php"; + diff --git a/common/util/phpqrcode/qrmask.php b/common/util/phpqrcode/qrmask.php new file mode 100644 index 0000000..2d388e0 --- /dev/null +++ b/common/util/phpqrcode/qrmask.php @@ -0,0 +1,328 @@ + + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('N1', 3); + define('N2', 3); + define('N3', 40); + define('N4', 10); + + class QRmask { + + public $runLength = array(); + + //---------------------------------------------------------------------- + public function __construct() + { + $this->runLength = array_fill(0, QRSPEC_WIDTH_MAX + 1, 0); + } + + //---------------------------------------------------------------------- + public function writeFormatInformation($width, &$frame, $mask, $level) + { + $blacks = 0; + $format = QRspec::getFormatInfo($mask, $level); + + for($i=0; $i<8; $i++) { + if($format & 1) { + $blacks += 2; + $v = 0x85; + } else { + $v = 0x84; + } + + $frame[8][$width - 1 - $i] = chr($v); + if($i < 6) { + $frame[$i][8] = chr($v); + } else { + $frame[$i + 1][8] = chr($v); + } + $format = $format >> 1; + } + + for($i=0; $i<7; $i++) { + if($format & 1) { + $blacks += 2; + $v = 0x85; + } else { + $v = 0x84; + } + + $frame[$width - 7 + $i][8] = chr($v); + if($i == 0) { + $frame[8][7] = chr($v); + } else { + $frame[8][6 - $i] = chr($v); + } + + $format = $format >> 1; + } + + return $blacks; + } + + //---------------------------------------------------------------------- + public function mask0($x, $y) { return ($x+$y)&1; } + public function mask1($x, $y) { return ($y&1); } + public function mask2($x, $y) { return ($x%3); } + public function mask3($x, $y) { return ($x+$y)%3; } + public function mask4($x, $y) { return (((int)($y/2))+((int)($x/3)))&1; } + public function mask5($x, $y) { return (($x*$y)&1)+($x*$y)%3; } + public function mask6($x, $y) { return ((($x*$y)&1)+($x*$y)%3)&1; } + public function mask7($x, $y) { return ((($x*$y)%3)+(($x+$y)&1))&1; } + + //---------------------------------------------------------------------- + private function generateMaskNo($maskNo, $width, $frame) + { + $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); + + for($y=0; $y<$width; $y++) { + for($x=0; $x<$width; $x++) { + if(ord($frame[$y][$x]) & 0x80) { + $bitMask[$y][$x] = 0; + } else { + $maskFunc = call_user_func(array($this, 'mask'.$maskNo), $x, $y); + $bitMask[$y][$x] = ($maskFunc == 0)?1:0; + } + + } + } + + return $bitMask; + } + + //---------------------------------------------------------------------- + public static function serial($bitFrame) + { + $codeArr = array(); + + foreach ($bitFrame as $line) + $codeArr[] = join('', $line); + + return gzcompress(join("\n", $codeArr), 9); + } + + //---------------------------------------------------------------------- + public static function unserial($code) + { + $codeArr = array(); + + $codeLines = explode("\n", gzuncompress($code)); + foreach ($codeLines as $line) + $codeArr[] = str_split($line); + + return $codeArr; + } + + //---------------------------------------------------------------------- + public function makeMaskNo($maskNo, $width, $s, &$d, $maskGenOnly = false) + { + $b = 0; + $bitMask = array(); + + $fileName = QR_CACHE_DIR.'mask_'.$maskNo.DIRECTORY_SEPARATOR.'mask_'.$width.'_'.$maskNo.'.dat'; + + if (QR_CACHEABLE) { + if (file_exists($fileName)) { + $bitMask = self::unserial(file_get_contents($fileName)); + } else { + $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d); + if (!file_exists(QR_CACHE_DIR.'mask_'.$maskNo)) + mkdir(QR_CACHE_DIR.'mask_'.$maskNo); + file_put_contents($fileName, self::serial($bitMask)); + } + } else { + $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d); + } + + if ($maskGenOnly) + return; + + $d = $s; + + for($y=0; $y<$width; $y++) { + for($x=0; $x<$width; $x++) { + if($bitMask[$y][$x] == 1) { + $d[$y][$x] = chr(ord($s[$y][$x]) ^ (int)$bitMask[$y][$x]); + } + $b += (int)(ord($d[$y][$x]) & 1); + } + } + + return $b; + } + + //---------------------------------------------------------------------- + public function makeMask($width, $frame, $maskNo, $level) + { + $masked = array_fill(0, $width, str_repeat("\0", $width)); + $this->makeMaskNo($maskNo, $width, $frame, $masked); + $this->writeFormatInformation($width, $masked, $maskNo, $level); + + return $masked; + } + + //---------------------------------------------------------------------- + public function calcN1N3($length) + { + $demerit = 0; + + for($i=0; $i<$length; $i++) { + + if($this->runLength[$i] >= 5) { + $demerit += (N1 + ($this->runLength[$i] - 5)); + } + if($i & 1) { + if(($i >= 3) && ($i < ($length-2)) && ($this->runLength[$i] % 3 == 0)) { + $fact = (int)($this->runLength[$i] / 3); + if(($this->runLength[$i-2] == $fact) && + ($this->runLength[$i-1] == $fact) && + ($this->runLength[$i+1] == $fact) && + ($this->runLength[$i+2] == $fact)) { + if(($this->runLength[$i-3] < 0) || ($this->runLength[$i-3] >= (4 * $fact))) { + $demerit += N3; + } else if((($i+3) >= $length) || ($this->runLength[$i+3] >= (4 * $fact))) { + $demerit += N3; + } + } + } + } + } + return $demerit; + } + + //---------------------------------------------------------------------- + public function evaluateSymbol($width, $frame) + { + $head = 0; + $demerit = 0; + + for($y=0; $y<$width; $y++) { + $head = 0; + $this->runLength[0] = 1; + + $frameY = $frame[$y]; + + if ($y>0) + $frameYM = $frame[$y-1]; + + for($x=0; $x<$width; $x++) { + if(($x > 0) && ($y > 0)) { + $b22 = ord($frameY[$x]) & ord($frameY[$x-1]) & ord($frameYM[$x]) & ord($frameYM[$x-1]); + $w22 = ord($frameY[$x]) | ord($frameY[$x-1]) | ord($frameYM[$x]) | ord($frameYM[$x-1]); + + if(($b22 | ($w22 ^ 1))&1) { + $demerit += N2; + } + } + if(($x == 0) && (ord($frameY[$x]) & 1)) { + $this->runLength[0] = -1; + $head = 1; + $this->runLength[$head] = 1; + } else if($x > 0) { + if((ord($frameY[$x]) ^ ord($frameY[$x-1])) & 1) { + $head++; + $this->runLength[$head] = 1; + } else { + $this->runLength[$head]++; + } + } + } + + $demerit += $this->calcN1N3($head+1); + } + + for($x=0; $x<$width; $x++) { + $head = 0; + $this->runLength[0] = 1; + + for($y=0; $y<$width; $y++) { + if($y == 0 && (ord($frame[$y][$x]) & 1)) { + $this->runLength[0] = -1; + $head = 1; + $this->runLength[$head] = 1; + } else if($y > 0) { + if((ord($frame[$y][$x]) ^ ord($frame[$y-1][$x])) & 1) { + $head++; + $this->runLength[$head] = 1; + } else { + $this->runLength[$head]++; + } + } + } + + $demerit += $this->calcN1N3($head+1); + } + + return $demerit; + } + + + //---------------------------------------------------------------------- + public function mask($width, $frame, $level) + { + $minDemerit = PHP_INT_MAX; + $bestMaskNum = 0; + $bestMask = array(); + + $checked_masks = array(0,1,2,3,4,5,6,7); + + if (QR_FIND_FROM_RANDOM !== false) { + + $howManuOut = 8-(QR_FIND_FROM_RANDOM % 9); + for ($i = 0; $i < $howManuOut; $i++) { + $remPos = rand (0, count($checked_masks)-1); + unset($checked_masks[$remPos]); + $checked_masks = array_values($checked_masks); + } + + } + + $bestMask = $frame; + + foreach($checked_masks as $i) { + $mask = array_fill(0, $width, str_repeat("\0", $width)); + + $demerit = 0; + $blacks = 0; + $blacks = $this->makeMaskNo($i, $width, $frame, $mask); + $blacks += $this->writeFormatInformation($width, $mask, $i, $level); + $blacks = (int)(100 * $blacks / ($width * $width)); + $demerit = (int)((int)(abs($blacks - 50) / 5) * N4); + $demerit += $this->evaluateSymbol($width, $mask); + + if($demerit < $minDemerit) { + $minDemerit = $demerit; + $bestMask = $mask; + $bestMaskNum = $i; + } + } + + return $bestMask; + } + + //---------------------------------------------------------------------- + } diff --git a/common/util/phpqrcode/qrrscode.php b/common/util/phpqrcode/qrrscode.php new file mode 100644 index 0000000..d7a97d9 --- /dev/null +++ b/common/util/phpqrcode/qrrscode.php @@ -0,0 +1,210 @@ + + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + class QRrsItem { + + public $mm; // Bits per symbol + public $nn; // Symbols per block (= (1<= $this->nn) { + $x -= $this->nn; + $x = ($x >> $this->mm) + ($x & $this->nn); + } + + return $x; + } + + //---------------------------------------------------------------------- + public static function init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) + { + // Common code for intializing a Reed-Solomon control block (char or int symbols) + // Copyright 2004 Phil Karn, KA9Q + // May be used under the terms of the GNU Lesser General Public License (LGPL) + + $rs = null; + + // Check parameter ranges + if($symsize < 0 || $symsize > 8) return $rs; + if($fcr < 0 || $fcr >= (1<<$symsize)) return $rs; + if($prim <= 0 || $prim >= (1<<$symsize)) return $rs; + if($nroots < 0 || $nroots >= (1<<$symsize)) return $rs; // Can't have more roots than symbol values! + if($pad < 0 || $pad >= ((1<<$symsize) -1 - $nroots)) return $rs; // Too much padding + + $rs = new QRrsItem(); + $rs->mm = $symsize; + $rs->nn = (1<<$symsize)-1; + $rs->pad = $pad; + + $rs->alpha_to = array_fill(0, $rs->nn+1, 0); + $rs->index_of = array_fill(0, $rs->nn+1, 0); + + // PHP style macro replacement ;) + $NN =& $rs->nn; + $A0 =& $NN; + + // Generate Galois field lookup tables + $rs->index_of[0] = $A0; // log(zero) = -inf + $rs->alpha_to[$A0] = 0; // alpha**-inf = 0 + $sr = 1; + + for($i=0; $i<$rs->nn; $i++) { + $rs->index_of[$sr] = $i; + $rs->alpha_to[$i] = $sr; + $sr <<= 1; + if($sr & (1<<$symsize)) { + $sr ^= $gfpoly; + } + $sr &= $rs->nn; + } + + if($sr != 1){ + // field generator polynomial is not primitive! + $rs = NULL; + return $rs; + } + + /* Form RS code generator polynomial from its roots */ + $rs->genpoly = array_fill(0, $nroots+1, 0); + + $rs->fcr = $fcr; + $rs->prim = $prim; + $rs->nroots = $nroots; + $rs->gfpoly = $gfpoly; + + /* Find prim-th root of 1, used in decoding */ + for($iprim=1;($iprim % $prim) != 0;$iprim += $rs->nn) + ; // intentional empty-body loop! + + $rs->iprim = (int)($iprim / $prim); + $rs->genpoly[0] = 1; + + for ($i = 0,$root=$fcr*$prim; $i < $nroots; $i++, $root += $prim) { + $rs->genpoly[$i+1] = 1; + + // Multiply rs->genpoly[] by @**(root + x) + for ($j = $i; $j > 0; $j--) { + if ($rs->genpoly[$j] != 0) { + $rs->genpoly[$j] = $rs->genpoly[$j-1] ^ $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[$j]] + $root)]; + } else { + $rs->genpoly[$j] = $rs->genpoly[$j-1]; + } + } + // rs->genpoly[0] can never be zero + $rs->genpoly[0] = $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[0]] + $root)]; + } + + // convert rs->genpoly[] to index form for quicker encoding + for ($i = 0; $i <= $nroots; $i++) + $rs->genpoly[$i] = $rs->index_of[$rs->genpoly[$i]]; + + return $rs; + } + + //---------------------------------------------------------------------- + public function encode_rs_char($data, &$parity) + { + $MM =& $this->mm; + $NN =& $this->nn; + $ALPHA_TO =& $this->alpha_to; + $INDEX_OF =& $this->index_of; + $GENPOLY =& $this->genpoly; + $NROOTS =& $this->nroots; + $FCR =& $this->fcr; + $PRIM =& $this->prim; + $IPRIM =& $this->iprim; + $PAD =& $this->pad; + $A0 =& $NN; + + $parity = array_fill(0, $NROOTS, 0); + + for($i=0; $i< ($NN-$NROOTS-$PAD); $i++) { + + $feedback = $INDEX_OF[$data[$i] ^ $parity[0]]; + if($feedback != $A0) { + // feedback term is non-zero + + // This line is unnecessary when GENPOLY[NROOTS] is unity, as it must + // always be for the polynomials constructed by init_rs() + $feedback = $this->modnn($NN - $GENPOLY[$NROOTS] + $feedback); + + for($j=1;$j<$NROOTS;$j++) { + $parity[$j] ^= $ALPHA_TO[$this->modnn($feedback + $GENPOLY[$NROOTS-$j])]; + } + } + + // Shift + array_shift($parity); + if($feedback != $A0) { + array_push($parity, $ALPHA_TO[$this->modnn($feedback + $GENPOLY[0])]); + } else { + array_push($parity, 0); + } + } + } + } + + //########################################################################## + + class QRrs { + + public static $items = array(); + + //---------------------------------------------------------------------- + public static function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) + { + foreach(self::$items as $rs) { + if($rs->pad != $pad) continue; + if($rs->nroots != $nroots) continue; + if($rs->mm != $symsize) continue; + if($rs->gfpoly != $gfpoly) continue; + if($rs->fcr != $fcr) continue; + if($rs->prim != $prim) continue; + + return $rs; + } + + $rs = QRrsItem::init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad); + array_unshift(self::$items, $rs); + + return $rs; + } + } \ No newline at end of file diff --git a/common/util/phpqrcode/qrspec.php b/common/util/phpqrcode/qrspec.php new file mode 100644 index 0000000..5a0c4b3 --- /dev/null +++ b/common/util/phpqrcode/qrspec.php @@ -0,0 +1,592 @@ + + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * The following data / specifications are taken from + * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004) + * or + * "Automatic identification and data capture techniques -- + * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('QRSPEC_VERSION_MAX', 40); + define('QRSPEC_WIDTH_MAX', 177); + + define('QRCAP_WIDTH', 0); + define('QRCAP_WORDS', 1); + define('QRCAP_REMINDER', 2); + define('QRCAP_EC', 3); + + class QRspec { + + public static $capacity = array( + array( 0, 0, 0, array( 0, 0, 0, 0)), + array( 21, 26, 0, array( 7, 10, 13, 17)), // 1 + array( 25, 44, 7, array( 10, 16, 22, 28)), + array( 29, 70, 7, array( 15, 26, 36, 44)), + array( 33, 100, 7, array( 20, 36, 52, 64)), + array( 37, 134, 7, array( 26, 48, 72, 88)), // 5 + array( 41, 172, 7, array( 36, 64, 96, 112)), + array( 45, 196, 0, array( 40, 72, 108, 130)), + array( 49, 242, 0, array( 48, 88, 132, 156)), + array( 53, 292, 0, array( 60, 110, 160, 192)), + array( 57, 346, 0, array( 72, 130, 192, 224)), //10 + array( 61, 404, 0, array( 80, 150, 224, 264)), + array( 65, 466, 0, array( 96, 176, 260, 308)), + array( 69, 532, 0, array( 104, 198, 288, 352)), + array( 73, 581, 3, array( 120, 216, 320, 384)), + array( 77, 655, 3, array( 132, 240, 360, 432)), //15 + array( 81, 733, 3, array( 144, 280, 408, 480)), + array( 85, 815, 3, array( 168, 308, 448, 532)), + array( 89, 901, 3, array( 180, 338, 504, 588)), + array( 93, 991, 3, array( 196, 364, 546, 650)), + array( 97, 1085, 3, array( 224, 416, 600, 700)), //20 + array(101, 1156, 4, array( 224, 442, 644, 750)), + array(105, 1258, 4, array( 252, 476, 690, 816)), + array(109, 1364, 4, array( 270, 504, 750, 900)), + array(113, 1474, 4, array( 300, 560, 810, 960)), + array(117, 1588, 4, array( 312, 588, 870, 1050)), //25 + array(121, 1706, 4, array( 336, 644, 952, 1110)), + array(125, 1828, 4, array( 360, 700, 1020, 1200)), + array(129, 1921, 3, array( 390, 728, 1050, 1260)), + array(133, 2051, 3, array( 420, 784, 1140, 1350)), + array(137, 2185, 3, array( 450, 812, 1200, 1440)), //30 + array(141, 2323, 3, array( 480, 868, 1290, 1530)), + array(145, 2465, 3, array( 510, 924, 1350, 1620)), + array(149, 2611, 3, array( 540, 980, 1440, 1710)), + array(153, 2761, 3, array( 570, 1036, 1530, 1800)), + array(157, 2876, 0, array( 570, 1064, 1590, 1890)), //35 + array(161, 3034, 0, array( 600, 1120, 1680, 1980)), + array(165, 3196, 0, array( 630, 1204, 1770, 2100)), + array(169, 3362, 0, array( 660, 1260, 1860, 2220)), + array(173, 3532, 0, array( 720, 1316, 1950, 2310)), + array(177, 3706, 0, array( 750, 1372, 2040, 2430)) //40 + ); + + //---------------------------------------------------------------------- + public static function getDataLength($version, $level) + { + return self::$capacity[$version][QRCAP_WORDS] - self::$capacity[$version][QRCAP_EC][$level]; + } + + //---------------------------------------------------------------------- + public static function getECCLength($version, $level) + { + return self::$capacity[$version][QRCAP_EC][$level]; + } + + //---------------------------------------------------------------------- + public static function getWidth($version) + { + return self::$capacity[$version][QRCAP_WIDTH]; + } + + //---------------------------------------------------------------------- + public static function getRemainder($version) + { + return self::$capacity[$version][QRCAP_REMINDER]; + } + + //---------------------------------------------------------------------- + public static function getMinimumVersion($size, $level) + { + + for($i=1; $i<= QRSPEC_VERSION_MAX; $i++) { + $words = self::$capacity[$i][QRCAP_WORDS] - self::$capacity[$i][QRCAP_EC][$level]; + if($words >= $size) + return $i; + } + + return -1; + } + + //###################################################################### + + public static $lengthTableBits = array( + array(10, 12, 14), + array( 9, 11, 13), + array( 8, 16, 16), + array( 8, 10, 12) + ); + + //---------------------------------------------------------------------- + public static function lengthIndicator($mode, $version) + { + if ($mode == QR_MODE_STRUCTURE) + return 0; + + if ($version <= 9) { + $l = 0; + } else if ($version <= 26) { + $l = 1; + } else { + $l = 2; + } + + return self::$lengthTableBits[$mode][$l]; + } + + //---------------------------------------------------------------------- + public static function maximumWords($mode, $version) + { + if($mode == QR_MODE_STRUCTURE) + return 3; + + if($version <= 9) { + $l = 0; + } else if($version <= 26) { + $l = 1; + } else { + $l = 2; + } + + $bits = self::$lengthTableBits[$mode][$l]; + $words = (1 << $bits) - 1; + + if($mode == QR_MODE_KANJI) { + $words *= 2; // the number of bytes is required + } + + return $words; + } + + // Error correction code ----------------------------------------------- + // Table of the error correction code (Reed-Solomon block) + // See Table 12-16 (pp.30-36), JIS X0510:2004. + + public static $eccTable = array( + array(array( 0, 0), array( 0, 0), array( 0, 0), array( 0, 0)), + array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), // 1 + array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), + array(array( 1, 0), array( 1, 0), array( 2, 0), array( 2, 0)), + array(array( 1, 0), array( 2, 0), array( 2, 0), array( 4, 0)), + array(array( 1, 0), array( 2, 0), array( 2, 2), array( 2, 2)), // 5 + array(array( 2, 0), array( 4, 0), array( 4, 0), array( 4, 0)), + array(array( 2, 0), array( 4, 0), array( 2, 4), array( 4, 1)), + array(array( 2, 0), array( 2, 2), array( 4, 2), array( 4, 2)), + array(array( 2, 0), array( 3, 2), array( 4, 4), array( 4, 4)), + array(array( 2, 2), array( 4, 1), array( 6, 2), array( 6, 2)), //10 + array(array( 4, 0), array( 1, 4), array( 4, 4), array( 3, 8)), + array(array( 2, 2), array( 6, 2), array( 4, 6), array( 7, 4)), + array(array( 4, 0), array( 8, 1), array( 8, 4), array(12, 4)), + array(array( 3, 1), array( 4, 5), array(11, 5), array(11, 5)), + array(array( 5, 1), array( 5, 5), array( 5, 7), array(11, 7)), //15 + array(array( 5, 1), array( 7, 3), array(15, 2), array( 3, 13)), + array(array( 1, 5), array(10, 1), array( 1, 15), array( 2, 17)), + array(array( 5, 1), array( 9, 4), array(17, 1), array( 2, 19)), + array(array( 3, 4), array( 3, 11), array(17, 4), array( 9, 16)), + array(array( 3, 5), array( 3, 13), array(15, 5), array(15, 10)), //20 + array(array( 4, 4), array(17, 0), array(17, 6), array(19, 6)), + array(array( 2, 7), array(17, 0), array( 7, 16), array(34, 0)), + array(array( 4, 5), array( 4, 14), array(11, 14), array(16, 14)), + array(array( 6, 4), array( 6, 14), array(11, 16), array(30, 2)), + array(array( 8, 4), array( 8, 13), array( 7, 22), array(22, 13)), //25 + array(array(10, 2), array(19, 4), array(28, 6), array(33, 4)), + array(array( 8, 4), array(22, 3), array( 8, 26), array(12, 28)), + array(array( 3, 10), array( 3, 23), array( 4, 31), array(11, 31)), + array(array( 7, 7), array(21, 7), array( 1, 37), array(19, 26)), + array(array( 5, 10), array(19, 10), array(15, 25), array(23, 25)), //30 + array(array(13, 3), array( 2, 29), array(42, 1), array(23, 28)), + array(array(17, 0), array(10, 23), array(10, 35), array(19, 35)), + array(array(17, 1), array(14, 21), array(29, 19), array(11, 46)), + array(array(13, 6), array(14, 23), array(44, 7), array(59, 1)), + array(array(12, 7), array(12, 26), array(39, 14), array(22, 41)), //35 + array(array( 6, 14), array( 6, 34), array(46, 10), array( 2, 64)), + array(array(17, 4), array(29, 14), array(49, 10), array(24, 46)), + array(array( 4, 18), array(13, 32), array(48, 14), array(42, 32)), + array(array(20, 4), array(40, 7), array(43, 22), array(10, 67)), + array(array(19, 6), array(18, 31), array(34, 34), array(20, 61)),//40 + ); + + //---------------------------------------------------------------------- + // CACHEABLE!!! + + public static function getEccSpec($version, $level, array &$spec) + { + if (count($spec) < 5) { + $spec = array(0,0,0,0,0); + } + + $b1 = self::$eccTable[$version][$level][0]; + $b2 = self::$eccTable[$version][$level][1]; + $data = self::getDataLength($version, $level); + $ecc = self::getECCLength($version, $level); + + if($b2 == 0) { + $spec[0] = $b1; + $spec[1] = (int)($data / $b1); + $spec[2] = (int)($ecc / $b1); + $spec[3] = 0; + $spec[4] = 0; + } else { + $spec[0] = $b1; + $spec[1] = (int)($data / ($b1 + $b2)); + $spec[2] = (int)($ecc / ($b1 + $b2)); + $spec[3] = $b2; + $spec[4] = $spec[1] + 1; + } + } + + // Alignment pattern --------------------------------------------------- + + // Positions of alignment patterns. + // This array includes only the second and the third position of the + // alignment patterns. Rest of them can be calculated from the distance + // between them. + + // See Table 1 in Appendix E (pp.71) of JIS X0510:2004. + + public static $alignmentPattern = array( + array( 0, 0), + array( 0, 0), array(18, 0), array(22, 0), array(26, 0), array(30, 0), // 1- 5 + array(34, 0), array(22, 38), array(24, 42), array(26, 46), array(28, 50), // 6-10 + array(30, 54), array(32, 58), array(34, 62), array(26, 46), array(26, 48), //11-15 + array(26, 50), array(30, 54), array(30, 56), array(30, 58), array(34, 62), //16-20 + array(28, 50), array(26, 50), array(30, 54), array(28, 54), array(32, 58), //21-25 + array(30, 58), array(34, 62), array(26, 50), array(30, 54), array(26, 52), //26-30 + array(30, 56), array(34, 60), array(30, 58), array(34, 62), array(30, 54), //31-35 + array(24, 50), array(28, 54), array(32, 58), array(26, 54), array(30, 58), //35-40 + ); + + + /** -------------------------------------------------------------------- + * Put an alignment marker. + * @param frame + * @param width + * @param ox,oy center coordinate of the pattern + */ + public static function putAlignmentMarker(array &$frame, $ox, $oy) + { + $finder = array( + "\xa1\xa1\xa1\xa1\xa1", + "\xa1\xa0\xa0\xa0\xa1", + "\xa1\xa0\xa1\xa0\xa1", + "\xa1\xa0\xa0\xa0\xa1", + "\xa1\xa1\xa1\xa1\xa1" + ); + + $yStart = $oy-2; + $xStart = $ox-2; + + for($y=0; $y<5; $y++) { + QRstr::set($frame, $xStart, $yStart+$y, $finder[$y]); + } + } + + //---------------------------------------------------------------------- + public static function putAlignmentPattern($version, &$frame, $width) + { + if($version < 2) + return; + + $d = self::$alignmentPattern[$version][1] - self::$alignmentPattern[$version][0]; + if($d < 0) { + $w = 2; + } else { + $w = (int)(($width - self::$alignmentPattern[$version][0]) / $d + 2); + } + + if($w * $w - 3 == 1) { + $x = self::$alignmentPattern[$version][0]; + $y = self::$alignmentPattern[$version][0]; + self::putAlignmentMarker($frame, $x, $y); + return; + } + + $cx = self::$alignmentPattern[$version][0]; + for($x=1; $x<$w - 1; $x++) { + self::putAlignmentMarker($frame, 6, $cx); + self::putAlignmentMarker($frame, $cx, 6); + $cx += $d; + } + + $cy = self::$alignmentPattern[$version][0]; + for($y=0; $y<$w-1; $y++) { + $cx = self::$alignmentPattern[$version][0]; + for($x=0; $x<$w-1; $x++) { + self::putAlignmentMarker($frame, $cx, $cy); + $cx += $d; + } + $cy += $d; + } + } + + // Version information pattern ----------------------------------------- + + // Version information pattern (BCH coded). + // See Table 1 in Appendix D (pp.68) of JIS X0510:2004. + + // size: [QRSPEC_VERSION_MAX - 6] + + public static $versionPattern = array( + 0x07c94, 0x085bc, 0x09a99, 0x0a4d3, 0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, + 0x0f928, 0x10b78, 0x1145d, 0x12a17, 0x13532, 0x149a6, 0x15683, 0x168c9, + 0x177ec, 0x18ec4, 0x191e1, 0x1afab, 0x1b08e, 0x1cc1a, 0x1d33f, 0x1ed75, + 0x1f250, 0x209d5, 0x216f0, 0x228ba, 0x2379f, 0x24b0b, 0x2542e, 0x26a64, + 0x27541, 0x28c69 + ); + + //---------------------------------------------------------------------- + public static function getVersionPattern($version) + { + if($version < 7 || $version > QRSPEC_VERSION_MAX) + return 0; + + return self::$versionPattern[$version -7]; + } + + // Format information -------------------------------------------------- + // See calcFormatInfo in tests/test_qrspec.c (orginal qrencode c lib) + + public static $formatInfo = array( + array(0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976), + array(0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0), + array(0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed), + array(0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b) + ); + + public static function getFormatInfo($mask, $level) + { + if($mask < 0 || $mask > 7) + return 0; + + if($level < 0 || $level > 3) + return 0; + + return self::$formatInfo[$level][$mask]; + } + + // Frame --------------------------------------------------------------- + // Cache of initial frames. + + public static $frames = array(); + + /** -------------------------------------------------------------------- + * Put a finder pattern. + * @param frame + * @param width + * @param ox,oy upper-left coordinate of the pattern + */ + public static function putFinderPattern(&$frame, $ox, $oy) + { + $finder = array( + "\xc1\xc1\xc1\xc1\xc1\xc1\xc1", + "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", + "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", + "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", + "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", + "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", + "\xc1\xc1\xc1\xc1\xc1\xc1\xc1" + ); + + for($y=0; $y<7; $y++) { + QRstr::set($frame, $ox, $oy+$y, $finder[$y]); + } + } + + //---------------------------------------------------------------------- + public static function createFrame($version) + { + $width = self::$capacity[$version][QRCAP_WIDTH]; + $frameLine = str_repeat ("\0", $width); + $frame = array_fill(0, $width, $frameLine); + + // Finder pattern + self::putFinderPattern($frame, 0, 0); + self::putFinderPattern($frame, $width - 7, 0); + self::putFinderPattern($frame, 0, $width - 7); + + // Separator + $yOffset = $width - 7; + + for($y=0; $y<7; $y++) { + $frame[$y][7] = "\xc0"; + $frame[$y][$width - 8] = "\xc0"; + $frame[$yOffset][7] = "\xc0"; + $yOffset++; + } + + $setPattern = str_repeat("\xc0", 8); + + QRstr::set($frame, 0, 7, $setPattern); + QRstr::set($frame, $width-8, 7, $setPattern); + QRstr::set($frame, 0, $width - 8, $setPattern); + + // Format info + $setPattern = str_repeat("\x84", 9); + QRstr::set($frame, 0, 8, $setPattern); + QRstr::set($frame, $width - 8, 8, $setPattern, 8); + + $yOffset = $width - 8; + + for($y=0; $y<8; $y++,$yOffset++) { + $frame[$y][8] = "\x84"; + $frame[$yOffset][8] = "\x84"; + } + + // Timing pattern + + for($i=1; $i<$width-15; $i++) { + $frame[6][7+$i] = chr(0x90 | ($i & 1)); + $frame[7+$i][6] = chr(0x90 | ($i & 1)); + } + + // Alignment pattern + self::putAlignmentPattern($version, $frame, $width); + + // Version information + if($version >= 7) { + $vinf = self::getVersionPattern($version); + + $v = $vinf; + + for($x=0; $x<6; $x++) { + for($y=0; $y<3; $y++) { + $frame[($width - 11)+$y][$x] = chr(0x88 | ($v & 1)); + $v = $v >> 1; + } + } + + $v = $vinf; + for($y=0; $y<6; $y++) { + for($x=0; $x<3; $x++) { + $frame[$y][$x+($width - 11)] = chr(0x88 | ($v & 1)); + $v = $v >> 1; + } + } + } + + // and a little bit... + $frame[$width - 8][8] = "\x81"; + + return $frame; + } + + //---------------------------------------------------------------------- + public static function debug($frame, $binary_mode = false) + { + if ($binary_mode) { + + foreach ($frame as &$frameLine) { + $frameLine = join('  ', explode('0', $frameLine)); + $frameLine = join('██', explode('1', $frameLine)); + } + + ?> + +


        '; + echo join("
        ", $frame); + echo '






'; + + } else { + + foreach ($frame as &$frameLine) { + $frameLine = join(' ', explode("\xc0", $frameLine)); + $frameLine = join('', explode("\xc1", $frameLine)); + $frameLine = join(' ', explode("\xa0", $frameLine)); + $frameLine = join('', explode("\xa1", $frameLine)); + $frameLine = join('', explode("\x84", $frameLine)); //format 0 + $frameLine = join('', explode("\x85", $frameLine)); //format 1 + $frameLine = join('', explode("\x81", $frameLine)); //special bit + $frameLine = join(' ', explode("\x90", $frameLine)); //clock 0 + $frameLine = join('', explode("\x91", $frameLine)); //clock 1 + $frameLine = join(' ', explode("\x88", $frameLine)); //version + $frameLine = join('', explode("\x89", $frameLine)); //version + $frameLine = join('♦', explode("\x01", $frameLine)); + $frameLine = join('⋅', explode("\0", $frameLine)); + } + + ?> + + "; + echo join("
", $frame); + echo "
"; + + } + } + + //---------------------------------------------------------------------- + public static function serial($frame) + { + return gzcompress(join("\n", $frame), 9); + } + + //---------------------------------------------------------------------- + public static function unserial($code) + { + return explode("\n", gzuncompress($code)); + } + + //---------------------------------------------------------------------- + public static function newFrame($version) + { + if($version < 1 || $version > QRSPEC_VERSION_MAX) + return null; + + if(!isset(self::$frames[$version])) { + + $fileName = QR_CACHE_DIR.'frame_'.$version.'.dat'; + + if (QR_CACHEABLE) { + if (file_exists($fileName)) { + self::$frames[$version] = self::unserial(file_get_contents($fileName)); + } else { + self::$frames[$version] = self::createFrame($version); + file_put_contents($fileName, self::serial(self::$frames[$version])); + } + } else { + self::$frames[$version] = self::createFrame($version); + } + } + + if(is_null(self::$frames[$version])) + return null; + + return self::$frames[$version]; + } + + //---------------------------------------------------------------------- + public static function rsBlockNum($spec) { return $spec[0] + $spec[3]; } + public static function rsBlockNum1($spec) { return $spec[0]; } + public static function rsDataCodes1($spec) { return $spec[1]; } + public static function rsEccCodes1($spec) { return $spec[2]; } + public static function rsBlockNum2($spec) { return $spec[3]; } + public static function rsDataCodes2($spec) { return $spec[4]; } + public static function rsEccCodes2($spec) { return $spec[2]; } + public static function rsDataLength($spec) { return ($spec[0] * $spec[1]) + ($spec[3] * $spec[4]); } + public static function rsEccLength($spec) { return ($spec[0] + $spec[3]) * $spec[2]; } + + } \ No newline at end of file diff --git a/common/util/phpqrcode/qrsplit.php b/common/util/phpqrcode/qrsplit.php new file mode 100644 index 0000000..8099c41 --- /dev/null +++ b/common/util/phpqrcode/qrsplit.php @@ -0,0 +1,311 @@ + + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * The following data / specifications are taken from + * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004) + * or + * "Automatic identification and data capture techniques -- + * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + class QRsplit { + + public $dataStr = ''; + public $input; + public $modeHint; + + //---------------------------------------------------------------------- + public function __construct($dataStr, $input, $modeHint) + { + $this->dataStr = $dataStr; + $this->input = $input; + $this->modeHint = $modeHint; + } + + //---------------------------------------------------------------------- + public static function isdigitat($str, $pos) + { + if ($pos >= strlen($str)) + return false; + + return ((ord($str[$pos]) >= ord('0'))&&(ord($str[$pos]) <= ord('9'))); + } + + //---------------------------------------------------------------------- + public static function isalnumat($str, $pos) + { + if ($pos >= strlen($str)) + return false; + + return (QRinput::lookAnTable(ord($str[$pos])) >= 0); + } + + //---------------------------------------------------------------------- + public function identifyMode($pos) + { + if ($pos >= strlen($this->dataStr)) + return QR_MODE_NUL; + + $c = $this->dataStr[$pos]; + + if(self::isdigitat($this->dataStr, $pos)) { + return QR_MODE_NUM; + } else if(self::isalnumat($this->dataStr, $pos)) { + return QR_MODE_AN; + } else if($this->modeHint == QR_MODE_KANJI) { + + if ($pos+1 < strlen($this->dataStr)) + { + $d = $this->dataStr[$pos+1]; + $word = (ord($c) << 8) | ord($d); + if(($word >= 0x8140 && $word <= 0x9ffc) || ($word >= 0xe040 && $word <= 0xebbf)) { + return QR_MODE_KANJI; + } + } + } + + return QR_MODE_8; + } + + //---------------------------------------------------------------------- + public function eatNum() + { + $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); + + $p = 0; + while(self::isdigitat($this->dataStr, $p)) { + $p++; + } + + $run = $p; + $mode = $this->identifyMode($p); + + if($mode == QR_MODE_8) { + $dif = QRinput::estimateBitsModeNum($run) + 4 + $ln + + QRinput::estimateBitsMode8(1) // + 4 + l8 + - QRinput::estimateBitsMode8($run + 1); // - 4 - l8 + if($dif > 0) { + return $this->eat8(); + } + } + if($mode == QR_MODE_AN) { + $dif = QRinput::estimateBitsModeNum($run) + 4 + $ln + + QRinput::estimateBitsModeAn(1) // + 4 + la + - QRinput::estimateBitsModeAn($run + 1);// - 4 - la + if($dif > 0) { + return $this->eatAn(); + } + } + + $ret = $this->input->append(QR_MODE_NUM, $run, str_split($this->dataStr)); + if($ret < 0) + return -1; + + return $run; + } + + //---------------------------------------------------------------------- + public function eatAn() + { + $la = QRspec::lengthIndicator(QR_MODE_AN, $this->input->getVersion()); + $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); + + $p = 0; + + while(self::isalnumat($this->dataStr, $p)) { + if(self::isdigitat($this->dataStr, $p)) { + $q = $p; + while(self::isdigitat($this->dataStr, $q)) { + $q++; + } + + $dif = QRinput::estimateBitsModeAn($p) // + 4 + la + + QRinput::estimateBitsModeNum($q - $p) + 4 + $ln + - QRinput::estimateBitsModeAn($q); // - 4 - la + + if($dif < 0) { + break; + } else { + $p = $q; + } + } else { + $p++; + } + } + + $run = $p; + + if(!self::isalnumat($this->dataStr, $p)) { + $dif = QRinput::estimateBitsModeAn($run) + 4 + $la + + QRinput::estimateBitsMode8(1) // + 4 + l8 + - QRinput::estimateBitsMode8($run + 1); // - 4 - l8 + if($dif > 0) { + return $this->eat8(); + } + } + + $ret = $this->input->append(QR_MODE_AN, $run, str_split($this->dataStr)); + if($ret < 0) + return -1; + + return $run; + } + + //---------------------------------------------------------------------- + public function eatKanji() + { + $p = 0; + + while($this->identifyMode($p) == QR_MODE_KANJI) { + $p += 2; + } + + $ret = $this->input->append(QR_MODE_KANJI, $p, str_split($this->dataStr)); + if($ret < 0) + return -1; + + return $run; + } + + //---------------------------------------------------------------------- + public function eat8() + { + $la = QRspec::lengthIndicator(QR_MODE_AN, $this->input->getVersion()); + $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); + + $p = 1; + $dataStrLen = strlen($this->dataStr); + + while($p < $dataStrLen) { + + $mode = $this->identifyMode($p); + if($mode == QR_MODE_KANJI) { + break; + } + if($mode == QR_MODE_NUM) { + $q = $p; + while(self::isdigitat($this->dataStr, $q)) { + $q++; + } + $dif = QRinput::estimateBitsMode8($p) // + 4 + l8 + + QRinput::estimateBitsModeNum($q - $p) + 4 + $ln + - QRinput::estimateBitsMode8($q); // - 4 - l8 + if($dif < 0) { + break; + } else { + $p = $q; + } + } else if($mode == QR_MODE_AN) { + $q = $p; + while(self::isalnumat($this->dataStr, $q)) { + $q++; + } + $dif = QRinput::estimateBitsMode8($p) // + 4 + l8 + + QRinput::estimateBitsModeAn($q - $p) + 4 + $la + - QRinput::estimateBitsMode8($q); // - 4 - l8 + if($dif < 0) { + break; + } else { + $p = $q; + } + } else { + $p++; + } + } + + $run = $p; + $ret = $this->input->append(QR_MODE_8, $run, str_split($this->dataStr)); + + if($ret < 0) + return -1; + + return $run; + } + + //---------------------------------------------------------------------- + public function splitString() + { + while (strlen($this->dataStr) > 0) + { + if($this->dataStr == '') + return 0; + + $mode = $this->identifyMode(0); + + switch ($mode) { + case QR_MODE_NUM: $length = $this->eatNum(); break; + case QR_MODE_AN: $length = $this->eatAn(); break; + case QR_MODE_KANJI: + if ($hint == QR_MODE_KANJI) + $length = $this->eatKanji(); + else $length = $this->eat8(); + break; + default: $length = $this->eat8(); break; + + } + + if($length == 0) return 0; + if($length < 0) return -1; + + $this->dataStr = substr($this->dataStr, $length); + } + } + + //---------------------------------------------------------------------- + public function toUpper() + { + $stringLen = strlen($this->dataStr); + $p = 0; + + while ($p<$stringLen) { + $mode = self::identifyMode(substr($this->dataStr, $p), $this->modeHint); + if($mode == QR_MODE_KANJI) { + $p += 2; + } else { + if (ord($this->dataStr[$p]) >= ord('a') && ord($this->dataStr[$p]) <= ord('z')) { + $this->dataStr[$p] = chr(ord($this->dataStr[$p]) - 32); + } + $p++; + } + } + + return $this->dataStr; + } + + //---------------------------------------------------------------------- + public static function splitStringToQRinput($string, QRinput $input, $modeHint, $casesensitive = true) + { + if(is_null($string) || $string == '\0' || $string == '') { + throw new Exception('empty string!!!'); + } + + $split = new QRsplit($string, $input, $modeHint); + + if(!$casesensitive) + $split->toUpper(); + + return $split->splitString(); + } + } \ No newline at end of file diff --git a/common/util/phpqrcode/qrtools.php b/common/util/phpqrcode/qrtools.php new file mode 100644 index 0000000..e0412c4 --- /dev/null +++ b/common/util/phpqrcode/qrtools.php @@ -0,0 +1,172 @@ + + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + class QRtools { + + //---------------------------------------------------------------------- + public static function binarize($frame) + { + $len = count($frame); + foreach ($frame as &$frameLine) { + + for($i=0; $i<$len; $i++) { + $frameLine[$i] = (ord($frameLine[$i])&1)?'1':'0'; + } + } + + return $frame; + } + + //---------------------------------------------------------------------- + public static function tcpdfBarcodeArray($code, $mode = 'QR,L', $tcPdfVersion = '4.5.037') + { + $barcode_array = array(); + + if (!is_array($mode)) + $mode = explode(',', $mode); + + $eccLevel = 'L'; + + if (count($mode) > 1) { + $eccLevel = $mode[1]; + } + + $qrTab = QRcode::text($code, false, $eccLevel); + $size = count($qrTab); + + $barcode_array['num_rows'] = $size; + $barcode_array['num_cols'] = $size; + $barcode_array['bcode'] = array(); + + foreach ($qrTab as $line) { + $arrAdd = array(); + foreach(str_split($line) as $char) + $arrAdd[] = ($char=='1')?1:0; + $barcode_array['bcode'][] = $arrAdd; + } + + return $barcode_array; + } + + //---------------------------------------------------------------------- + public static function clearCache() + { + self::$frames = array(); + } + + //---------------------------------------------------------------------- + public static function buildCache() + { + QRtools::markTime('before_build_cache'); + + $mask = new QRmask(); + for ($a=1; $a <= QRSPEC_VERSION_MAX; $a++) { + $frame = QRspec::newFrame($a); + if (QR_IMAGE) { + $fileName = QR_CACHE_DIR.'frame_'.$a.'.png'; + QRimage::png(self::binarize($frame), $fileName, 1, 0); + } + + $width = count($frame); + $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); + for ($maskNo=0; $maskNo<8; $maskNo++) + $mask->makeMaskNo($maskNo, $width, $frame, $bitMask, true); + } + + QRtools::markTime('after_build_cache'); + } + + //---------------------------------------------------------------------- + public static function log($outfile, $err) + { + if (QR_LOG_DIR !== false) { + if ($err != '') { + if ($outfile !== false) { + file_put_contents(QR_LOG_DIR.basename($outfile).'-errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND); + } else { + file_put_contents(QR_LOG_DIR.'errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND); + } + } + } + } + + //---------------------------------------------------------------------- + public static function dumpMask($frame) + { + $width = count($frame); + for($y=0;$y<$width;$y++) { + for($x=0;$x<$width;$x++) { + echo ord($frame[$y][$x]).','; + } + } + } + + //---------------------------------------------------------------------- + public static function markTime($markerId) + { + list($usec, $sec) = explode(" ", microtime()); + $time = ((float)$usec + (float)$sec); + + if (!isset($GLOBALS['qr_time_bench'])) + $GLOBALS['qr_time_bench'] = array(); + + $GLOBALS['qr_time_bench'][$markerId] = $time; + } + + //---------------------------------------------------------------------- + public static function timeBenchmark() + { + self::markTime('finish'); + + $lastTime = 0; + $startTime = 0; + $p = 0; + + echo ' + + '; + + foreach($GLOBALS['qr_time_bench'] as $markerId=>$thisTime) { + if ($p > 0) { + echo ''; + } else { + $startTime = $thisTime; + } + + $p++; + $lastTime = $thisTime; + } + + echo ' + + +
BENCHMARK
till '.$markerId.': '.number_format($thisTime-$lastTime, 6).'s
TOTAL: '.number_format($lastTime-$startTime, 6).'s
'; + } + + } + + //########################################################################## + + QRtools::markTime('start'); + \ No newline at end of file diff --git a/common/util/phpqrcode/tools/merge.bat b/common/util/phpqrcode/tools/merge.bat new file mode 100644 index 0000000..2b5eebb --- /dev/null +++ b/common/util/phpqrcode/tools/merge.bat @@ -0,0 +1,2 @@ +php ./merge.php +pause \ No newline at end of file diff --git a/common/util/phpqrcode/tools/merge.php b/common/util/phpqrcode/tools/merge.php new file mode 100644 index 0000000..9e809c8 --- /dev/null +++ b/common/util/phpqrcode/tools/merge.php @@ -0,0 +1,70 @@ + + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + $QR_BASEDIR = dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR; + $QR_TOOLSDIR = dirname(__FILE__).DIRECTORY_SEPARATOR; + + $outputFile = $QR_BASEDIR.'phpqrcode.php'; + + // Required libs + + $fileList = array( + $QR_BASEDIR.'qrconst.php', + $QR_TOOLSDIR.'merged_config.php', + $QR_BASEDIR.'qrtools.php', + $QR_BASEDIR.'qrspec.php', + $QR_BASEDIR.'qrimage.php', + $QR_BASEDIR.'qrinput.php', + $QR_BASEDIR.'qrbitstream.php', + $QR_BASEDIR.'qrsplit.php', + $QR_BASEDIR.'qrrscode.php', + $QR_BASEDIR.'qrmask.php', + $QR_BASEDIR.'qrencode.php' + ); + + $headerFile = $QR_TOOLSDIR.'merged_header.php'; + $versionFile = $QR_BASEDIR.'VERSION'; + + $outputCode = ''; + + foreach($fileList as $fileName) { + $outputCode .= "\n\n".'//---- '.basename($fileName).' -----------------------------'."\n\n"; + $anotherCode = file_get_contents($fileName); + $anotherCode = preg_replace ('/^<\?php/', '', $anotherCode); + $anotherCode = preg_replace ('/\?>\*$/', '', $anotherCode); + $outputCode .= "\n\n".$anotherCode."\n\n"; + } + + $versionDataEx = explode("\n", file_get_contents($versionFile)); + + $outputContents = file_get_contents($headerFile); + $outputContents .= "\n\n/*\n * Version: ".trim($versionDataEx[0])."\n * Build: ".trim($versionDataEx[1])."\n */\n\n"; + $outputContents .= $outputCode; + + file_put_contents($outputFile, $outputContents); + + \ No newline at end of file diff --git a/common/util/phpqrcode/tools/merge.sh b/common/util/phpqrcode/tools/merge.sh new file mode 100644 index 0000000..1a2515b --- /dev/null +++ b/common/util/phpqrcode/tools/merge.sh @@ -0,0 +1,2 @@ +#!/bin/sh +php ./merge.php \ No newline at end of file diff --git a/common/util/phpqrcode/tools/merged_config.php b/common/util/phpqrcode/tools/merged_config.php new file mode 100644 index 0000000..8cd917d --- /dev/null +++ b/common/util/phpqrcode/tools/merged_config.php @@ -0,0 +1,17 @@ + + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + \ No newline at end of file diff --git a/common/util/prod/LineProdService.php b/common/util/prod/LineProdService.php new file mode 100644 index 0000000..b81cd73 --- /dev/null +++ b/common/util/prod/LineProdService.php @@ -0,0 +1,250 @@ +getBusProdDetail($pro_cate_id); + if ($if_back) { + $end_area_id = $prodInfo['start_area_id'];//站点 起始站POI作为终点站POI + $start_area_id = $prodInfo['end_area_id'];//站点 终点站POI作为起始站POI + $return = CsCurl::getLineSaleDate('', $start_area_id, $end_area_id);//获取两个POI之间的班次库存 + + } else { + if (empty($prodInfo['sign'])) { + return Util::returnArrEr('该产品已下架!'); + } + $line_id = $prodInfo['sign'];//线路ID + $return = CsCurl::getLineSaleDate($line_id);//获取线路的班次库存 + } + //将比今天或者指定日期小的日期剔除 + if (empty($return['data']['list']['0']) == false) { + if (empty($date)) { + $date = date('Y-m-d'); + } + foreach ($return['data']['list'] as $key => $val) { + if (strtotime($val) < strtotime($date)) { + unset($return['data']['list'][$key]); + } else { + break; + } + } + } + $return['data']['list'] = array_values($return['data']['list']); + return $return; + } + + /** + * Des:获取主线路的按日期查询班次及库存 + * Name: getLineBusStock + * @param $date + * @param $pro_cate_id + * @param $if_back + * @return array + * @author 倪宗锋 + */ + public static function getLineBusStock($date, $pro_cate_id, $if_back) + { + if (Util::checkPattern('intVal', $pro_cate_id) == false) { + return Util::returnArrEr('params error!'); + } + /**从cs获取主线路班次库存*/ + $getBusStock = static::getBusStockForLineFromCs($pro_cate_id, $date, $if_back); + if ($getBusStock['flag'] == false) { + return $getBusStock; + } + /**设置前端使用的价格库存*/ + $setReturn = static::setTicketReturn($getBusStock['data'], $date); + return $setReturn; + + } + + /** + * Des:从cs获取主线路班次库存 + * Name: getBusStockForLineFromCs + * @param $pro_cate_id + * @param $date + * @param $if_back + * @return array + * @author 倪宗锋 + */ + public static function getBusStockForLineFromCs($pro_cate_id, $date, $if_back) + { + $prodCate = new ProdCategory(); + $prodInfo = $prodCate->getBusProdDetail($pro_cate_id); + + if ($if_back) { + $end_area_id = $prodInfo['start_area_id'];//站点 起始站POI作为终点站POI + $start_area_id = $prodInfo['end_area_id'];//站点 终点站POI作为起始站POI + $return = CsCurl::getGoBusStockForArea($start_area_id, $end_area_id, $date);//获取两个POI之间的班次库存 + + } else { + if (empty($prodInfo['sign'])) { + return Util::returnArrEr('该产品已下架!'); + } + $line_id = $prodInfo['sign'];//线路ID + $return = CsCurl::getGoBusStockForLine($line_id, $date);//获取线路的班次库存 + } + /******************************增加售卖截止时间判断*****************************/ + $close_sale_time = $prodInfo['close_sale_time']; + if ($close_sale_time == '') $close_sale_time = 24; + $s_time = strtotime($date) + $close_sale_time * 60 * 60; + $curr_h_i = date('H:i:s', $s_time); + if ($curr_h_i == '00:00:00') $curr_h_i = '24:00:00'; + //1.判断是否存在订单了 + $orderMain = new OrderMain(); + $param = ["prod_cate_id" => $pro_cate_id, "start_date" => $date, "start_time" => $curr_h_i, "small24" => $close_sale_time < 0]; + $boolExist = $orderMain->existOrder($param); + if (!$boolExist) { + if ($s_time <= time()) { + return Util::returnArrEr('该日的班次已截止售卖,请选择其它日期'); + } + } + /******************************华丽的分割线*****************************/ + return $return; + } + + /** + * Des:设置获取班次返回值 + * Name: setTicketReturn + * @param $data + * @return array + * @author 倪宗锋 + */ + public static function setTicketReturn($data, $date) + { + /**获取所有去重后的票种ID*/ + $ticketIds = static::getTicketByCSTicket($data); + if (empty($ticketIds['ticket'])) { + return Util::returnArrEr('当前日期票已售完,请选择其他日期!'); + } + /**获取票种对应的站点数组*/ + $bus_ticket = new BusTicket(); + $ticketArr = $bus_ticket->getTicketAndLineByIDs($ticketIds['ticket']); + foreach ($ticketIds['runBusArr'] as $key => $val) { + $ticketIds['runBusArr'][$key]['start_station_list'] = static::getBusArrBYTicketList($val['ticket_list'], $ticketArr, $date); + unset($ticketIds['runBusArr'][$key]['ticket_list']); + if (count($ticketIds['runBusArr'][$key]['start_station_list']) <= 0) {//如果没有可选站点则 删除该班次 + unset($ticketIds['runBusArr'][$key]); + continue; + } + } + ksort($ticketIds['runBusArr']); + if (empty($ticketIds['runBusArr'])) { + return Util::returnArrEr('没有库存,请重选日期'); + } + return Util::returnArrSu('', ['station_list' => array_values($ticketIds['runBusArr'])]); + } + + /** + * Des:凭借前端班次数组 + * Name: getBusArrBYTicketList + * @param $ticketList + * @param $ticketArr + * @return array + * @author 倪宗锋 + */ + public static function getBusArrBYTicketList($ticketList, $ticketArr, $date) + { + $theArr = []; + foreach ($ticketList as $key => $val) { + /**判断时间*/ + $stat_time = strtotime($date . ' ' . $val['start_time'] . ':00'); + if ($stat_time <= time()) { + continue; + } + foreach ($ticketArr as $tkey => $tVal) { + if (isset($tVal['end_station_list'][$key])) { + $sArr = []; + if (empty($theArr[$tkey])) { + $theArr[$tkey]['start_res_id'] = $tVal['start_res_id']; + $theArr[$tkey]['start_res_name'] = $tVal['start_res_name']; + if (isset($val['prod_num'])) { + $theArr[$tkey]['start_res_time'] = $val['start_time']; + } else {//兼容之前的版本 + $theArr[$tkey]['start_res_time'] = '00:00:00'; + } + $theArr[$tkey]['end_station_list'] = []; + } + $sArr['station_id'] = $tVal['end_station_list'][$key]['end_res_id']; + $sArr['station_name'] = $tVal['end_station_list'][$key]['end_res_name']; + $sArr['pro_cate_id'] = $tVal['end_station_list'][$key]['pro_cate_id']; + if (isset($val['prod_num'])) { + $sArr['count'] = $val['prod_num']; + $sArr['end_res_time'] = $val['end_time']; + } else {//兼容之前的版本 + $sArr['count'] = $val; + $sArr['end_res_time'] = '00:00'; + } + $theArr[$tkey]['end_station_list'][] = $sArr; + } + } + } + return array_values($theArr); + } + + /** + * Des:获取TICKET字符串 + * Name: getTicketByCSTicket + * @param $busArr + * @return array + * @author 倪宗锋 + */ + public static function getTicketByCSTicket($busArr) + { + $ticketArr = []; + $runBusArr = []; + foreach ($busArr as $val) { + if (count($val['ticket_list']) == 0) { + continue; + } + $cnt = 0; + foreach ($val['ticket_list'] as $key => $tiVal) { + if ($tiVal > 0) { + $cnt++; + $ticketArr[$key] = $key;//去重保存 + } + } + if ($cnt) {//没有库存的不保存 + $runBusArr[$val['run_time']] = $val; + } + } + return ['ticket' => array_values($ticketArr), 'runBusArr' => $runBusArr]; + } +} \ No newline at end of file diff --git a/common/util/prod/ProdService.php b/common/util/prod/ProdService.php new file mode 100644 index 0000000..6fdf608 --- /dev/null +++ b/common/util/prod/ProdService.php @@ -0,0 +1,23 @@ +=5.4.0", + "yiisoft/yii2": "~2.0.6", + "yiisoft/yii2-bootstrap": "~2.0.0", + "yiisoft/yii2-swiftmailer": "~2.0.0", + "linslin/yii2-curl": "*", + "2amigos/yii2-qrcode-helper": "*" + }, + "require-dev": { + "yiisoft/yii2-debug": "~2.0.0", + "yiisoft/yii2-gii": "~2.0.0", + "yiisoft/yii2-faker": "~2.0.0", + + "codeception/base": "^2.2.3", + "codeception/verify": "~0.3.1" + }, + "config": { + "process-timeout": 1800 + }, + "extra": { + "asset-installer-paths": { + "npm-asset-library": "vendor/npm", + "bower-asset-library": "vendor/bower" + } + }, + "scripts": { + "post-install-cmd": "php init --env=Development --overwrite=n" + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..e8e41a6 --- /dev/null +++ b/composer.lock @@ -0,0 +1,3085 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "content-hash": "b467b23ab52c1abb9e508d74315cc7e0", + "packages": [ + { + "name": "2amigos/yii2-qrcode-helper", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/2amigos/yii2-qrcode-helper.git", + "reference": "827a79d0e498026119c8cdcf724d81be2e0daa5f" + }, + "dist": { + "type": "zip", + "url": "https://packagist.phpcomposer.com/files/2amigos/yii2-qrcode-helper/827a79d0e498026119c8cdcf724d81be2e0daa5f.zip", + "reference": "827a79d0e498026119c8cdcf724d81be2e0daa5f", + "shasum": "" + }, + "require": { + "yiisoft/yii2": "*" + }, + "require-dev": { + "phpunit/phpunit": "4.*", + "scrutinizer/ocular": "~1.1" + }, + "type": "yii2-extension", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "dosamigos\\qrcode\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "2amigOS! Consulting Group", + "email": "hola@2amigos.us", + "homepage": "http://2amigos.us", + "role": "Developer" + } + ], + "description": "Create QrCodes based on libqrencode C library.", + "keywords": [ + "2amigos", + "extension", + "helper", + "qrcode", + "yii", + "yii 2", + "yii2" + ], + "time": "2015-03-16T21:26:14+00:00" + }, + { + "name": "bower-asset/bootstrap", + "version": "v3.3.7", + "source": { + "type": "git", + "url": "https://github.com/twbs/bootstrap.git", + "reference": "0b9c4a4007c44201dce9a6cc1a38407005c26c86" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twbs/bootstrap/zipball/0b9c4a4007c44201dce9a6cc1a38407005c26c86", + "reference": "0b9c4a4007c44201dce9a6cc1a38407005c26c86", + "shasum": "" + }, + "require": { + "bower-asset/jquery": ">=1.9.1,<4.0" + }, + "type": "bower-asset-library", + "extra": { + "bower-asset-main": [ + "less/bootstrap.less", + "dist/js/bootstrap.js" + ], + "bower-asset-ignore": [ + "/.*", + "_config.yml", + "CNAME", + "composer.json", + "CONTRIBUTING.md", + "docs", + "js/tests", + "test-infra" + ] + }, + "license": [ + "MIT" + ], + "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", + "keywords": [ + "css", + "framework", + "front-end", + "js", + "less", + "mobile-first", + "responsive", + "web" + ] + }, + { + "name": "bower-asset/jquery", + "version": "2.2.4", + "source": { + "type": "git", + "url": "https://github.com/jquery/jquery-dist.git", + "reference": "c0185ab7c75aab88762c5aae780b9d83b80eda72" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jquery/jquery-dist/zipball/c0185ab7c75aab88762c5aae780b9d83b80eda72", + "reference": "c0185ab7c75aab88762c5aae780b9d83b80eda72", + "shasum": "" + }, + "type": "bower-asset-library", + "extra": { + "bower-asset-main": "dist/jquery.js", + "bower-asset-ignore": [ + "package.json" + ] + }, + "license": [ + "MIT" + ], + "keywords": [ + "browser", + "javascript", + "jquery", + "library" + ] + }, + { + "name": "bower-asset/jquery.inputmask", + "version": "3.3.4", + "source": { + "type": "git", + "url": "https://github.com/RobinHerbots/Inputmask.git", + "reference": "8a882bc471ba4077c4f8ecbe3d9d61c7558f3ef2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/RobinHerbots/Inputmask/zipball/8a882bc471ba4077c4f8ecbe3d9d61c7558f3ef2", + "reference": "8a882bc471ba4077c4f8ecbe3d9d61c7558f3ef2", + "shasum": "" + }, + "require": { + "bower-asset/jquery": ">=1.7" + }, + "type": "bower-asset-library", + "extra": { + "bower-asset-main": [ + "./dist/inputmask/inputmask.dependencyLib", + "./dist/inputmask/inputmask", + "./dist/inputmask/inputmask.extensions", + "./dist/inputmask/inputmask.date.extensions", + "./dist/inputmask/inputmask.numeric.extensions", + "./dist/inputmask/inputmask.phone.extensions", + "./dist/inputmask/inputmask.regex.extensions", + "./dist/inputmask/jquery.inputmask" + ], + "bower-asset-ignore": [ + "**/*", + "!dist/*", + "!dist/inputmask/*", + "!dist/min/*", + "!dist/min/inputmask/*", + "!extra/bindings/*", + "!extra/dependencyLibs/*", + "!extra/phone-codes/*" + ] + }, + "license": [ + "http://opensource.org/licenses/mit-license.php" + ], + "description": "jquery.inputmask is a jquery plugin which create an input mask.", + "keywords": [ + "form", + "input", + "inputmask", + "jquery", + "mask", + "plugins" + ] + }, + { + "name": "bower-asset/punycode", + "version": "v1.3.2", + "source": { + "type": "git", + "url": "https://github.com/bestiejs/punycode.js.git", + "reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bestiejs/punycode.js/zipball/38c8d3131a82567bfef18da09f7f4db68c84f8a3", + "reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3", + "shasum": "" + }, + "type": "bower-asset-library", + "extra": { + "bower-asset-main": "punycode.js", + "bower-asset-ignore": [ + "coverage", + "tests", + ".*", + "component.json", + "Gruntfile.js", + "node_modules", + "package.json" + ] + } + }, + { + "name": "bower-asset/yii2-pjax", + "version": "v2.0.6", + "source": { + "type": "git", + "url": "https://github.com/yiisoft/jquery-pjax.git", + "reference": "60728da6ade5879e807a49ce59ef9a72039b8978" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yiisoft/jquery-pjax/zipball/60728da6ade5879e807a49ce59ef9a72039b8978", + "reference": "60728da6ade5879e807a49ce59ef9a72039b8978", + "shasum": "" + }, + "require": { + "bower-asset/jquery": ">=1.8" + }, + "type": "bower-asset-library", + "extra": { + "bower-asset-main": "./jquery.pjax.js", + "bower-asset-ignore": [ + ".travis.yml", + "Gemfile", + "Gemfile.lock", + "CONTRIBUTING.md", + "vendor/", + "script/", + "test/" + ] + }, + "license": [ + "MIT" + ] + }, + { + "name": "cebe/markdown", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/cebe/markdown.git", + "reference": "c30eb5e01fe021cc5bba2f9ee0eeef96d4931166" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cebe/markdown/zipball/c30eb5e01fe021cc5bba2f9ee0eeef96d4931166", + "reference": "c30eb5e01fe021cc5bba2f9ee0eeef96d4931166", + "shasum": "" + }, + "require": { + "lib-pcre": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "cebe/indent": "*", + "facebook/xhprof": "*@dev", + "phpunit/phpunit": "4.1.*" + }, + "bin": [ + "bin/markdown" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "cebe\\markdown\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Carsten Brandt", + "email": "mail@cebe.cc", + "homepage": "http://cebe.cc/", + "role": "Creator" + } + ], + "description": "A super fast, highly extensible markdown parser for PHP", + "homepage": "https://github.com/cebe/markdown#readme", + "keywords": [ + "extensible", + "fast", + "gfm", + "markdown", + "markdown-extra" + ], + "time": "2016-09-14T20:40:20+00:00" + }, + { + "name": "ezyang/htmlpurifier", + "version": "v4.8.0", + "source": { + "type": "git", + "url": "https://github.com/ezyang/htmlpurifier.git", + "reference": "d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2", + "reference": "d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2", + "shasum": "" + }, + "require": { + "php": ">=5.2" + }, + "type": "library", + "autoload": { + "psr-0": { + "HTMLPurifier": "library/" + }, + "files": [ + "library/HTMLPurifier.composer.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL" + ], + "authors": [ + { + "name": "Edward Z. Yang", + "email": "admin@htmlpurifier.org", + "homepage": "http://ezyang.com" + } + ], + "description": "Standards compliant HTML filter written in PHP", + "homepage": "http://htmlpurifier.org/", + "keywords": [ + "html" + ], + "time": "2016-07-16T12:58:58+00:00" + }, + { + "name": "linslin/yii2-curl", + "version": "1.0.11", + "source": { + "type": "git", + "url": "https://github.com/linslin/Yii2-Curl.git", + "reference": "0384d175c594a6b76c4eeb91eb3804e24eb867b3" + }, + "dist": { + "type": "zip", + "url": "https://packagist.phpcomposer.com/files/linslin/Yii2-Curl/0384d175c594a6b76c4eeb91eb3804e24eb867b3.zip", + "reference": "0384d175c594a6b76c4eeb91eb3804e24eb867b3", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "yiisoft/yii2": "*" + }, + "type": "yii2-extension", + "autoload": { + "psr-4": { + "linslin\\yii2\\curl\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Gajsek", + "email": "info@linslin.org" + } + ], + "description": "Easy and nice cURL extension with RESTful support for Yii2", + "keywords": [ + " curl", + "extension", + "restful", + "yii2" + ], + "time": "2017-01-17T11:11:37+00:00" + }, + { + "name": "swiftmailer/swiftmailer", + "version": "v5.4.5", + "source": { + "type": "git", + "url": "https://github.com/swiftmailer/swiftmailer.git", + "reference": "cd142238a339459b10da3d8234220963f392540c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/cd142238a339459b10da3d8234220963f392540c", + "reference": "cd142238a339459b10da3d8234220963f392540c", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "mockery/mockery": "~0.9.1", + "symfony/phpunit-bridge": "~3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "autoload": { + "files": [ + "lib/swift_required.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Corbyn" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Swiftmailer, free feature-rich PHP mailer", + "homepage": "http://swiftmailer.org", + "keywords": [ + "email", + "mail", + "mailer" + ], + "time": "2016-12-29T10:02:40+00:00" + }, + { + "name": "yiisoft/yii2", + "version": "2.0.11", + "source": { + "type": "git", + "url": "https://github.com/yiisoft/yii2-framework.git", + "reference": "4144506d84b5c895e026be4d79ebbef7067ebcd3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/4144506d84b5c895e026be4d79ebbef7067ebcd3", + "reference": "4144506d84b5c895e026be4d79ebbef7067ebcd3", + "shasum": "" + }, + "require": { + "bower-asset/jquery": "2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable", + "bower-asset/jquery.inputmask": "~3.2.2 | ~3.3.3", + "bower-asset/punycode": "1.3.*", + "bower-asset/yii2-pjax": "~2.0.1", + "cebe/markdown": "~1.0.0 | ~1.1.0", + "ext-ctype": "*", + "ext-mbstring": "*", + "ezyang/htmlpurifier": "~4.6", + "lib-pcre": "*", + "php": ">=5.4.0", + "yiisoft/yii2-composer": "~2.0.4" + }, + "bin": [ + "yii" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "yii\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Qiang Xue", + "email": "qiang.xue@gmail.com", + "homepage": "http://www.yiiframework.com/", + "role": "Founder and project lead" + }, + { + "name": "Alexander Makarov", + "email": "sam@rmcreative.ru", + "homepage": "http://rmcreative.ru/", + "role": "Core framework development" + }, + { + "name": "Maurizio Domba", + "homepage": "http://mdomba.info/", + "role": "Core framework development" + }, + { + "name": "Carsten Brandt", + "email": "mail@cebe.cc", + "homepage": "http://cebe.cc/", + "role": "Core framework development" + }, + { + "name": "Timur Ruziev", + "email": "resurtm@gmail.com", + "homepage": "http://resurtm.com/", + "role": "Core framework development" + }, + { + "name": "Paul Klimov", + "email": "klimov.paul@gmail.com", + "role": "Core framework development" + }, + { + "name": "Dmitry Naumenko", + "email": "d.naumenko.a@gmail.com", + "role": "Core framework development" + }, + { + "name": "Boudewijn Vahrmeijer", + "email": "info@dynasource.eu", + "homepage": "http://dynasource.eu", + "role": "Core framework development" + } + ], + "description": "Yii PHP Framework Version 2", + "homepage": "http://www.yiiframework.com/", + "keywords": [ + "framework", + "yii2" + ], + "time": "2017-02-01T16:46:29+00:00" + }, + { + "name": "yiisoft/yii2-bootstrap", + "version": "2.0.6", + "source": { + "type": "git", + "url": "https://github.com/yiisoft/yii2-bootstrap.git", + "reference": "3fd2b8c950cce79d60e9702d6bcb24eb3c80f6c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yiisoft/yii2-bootstrap/zipball/3fd2b8c950cce79d60e9702d6bcb24eb3c80f6c5", + "reference": "3fd2b8c950cce79d60e9702d6bcb24eb3c80f6c5", + "shasum": "" + }, + "require": { + "bower-asset/bootstrap": "3.3.* | 3.2.* | 3.1.*", + "yiisoft/yii2": ">=2.0.6" + }, + "type": "yii2-extension", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + }, + "asset-installer-paths": { + "npm-asset-library": "vendor/npm", + "bower-asset-library": "vendor/bower" + } + }, + "autoload": { + "psr-4": { + "yii\\bootstrap\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Qiang Xue", + "email": "qiang.xue@gmail.com" + } + ], + "description": "The Twitter Bootstrap extension for the Yii framework", + "keywords": [ + "bootstrap", + "yii2" + ], + "time": "2016-03-17T03:29:28+00:00" + }, + { + "name": "yiisoft/yii2-composer", + "version": "2.0.5", + "source": { + "type": "git", + "url": "https://github.com/yiisoft/yii2-composer.git", + "reference": "3f4923c2bde6caf3f5b88cc22fdd5770f52f8df2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yiisoft/yii2-composer/zipball/3f4923c2bde6caf3f5b88cc22fdd5770f52f8df2", + "reference": "3f4923c2bde6caf3f5b88cc22fdd5770f52f8df2", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0" + }, + "require-dev": { + "composer/composer": "^1.0" + }, + "type": "composer-plugin", + "extra": { + "class": "yii\\composer\\Plugin", + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "yii\\composer\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Qiang Xue", + "email": "qiang.xue@gmail.com" + } + ], + "description": "The composer plugin for Yii extension installer", + "keywords": [ + "composer", + "extension installer", + "yii2" + ], + "time": "2016-12-20T13:26:02+00:00" + }, + { + "name": "yiisoft/yii2-swiftmailer", + "version": "2.0.6", + "source": { + "type": "git", + "url": "https://github.com/yiisoft/yii2-swiftmailer.git", + "reference": "26b900767f1031ff3a4668dfa36c10595875f0a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yiisoft/yii2-swiftmailer/zipball/26b900767f1031ff3a4668dfa36c10595875f0a5", + "reference": "26b900767f1031ff3a4668dfa36c10595875f0a5", + "shasum": "" + }, + "require": { + "swiftmailer/swiftmailer": "~5.0", + "yiisoft/yii2": "~2.0.4" + }, + "type": "yii2-extension", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "yii\\swiftmailer\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Paul Klimov", + "email": "klimov.paul@gmail.com" + } + ], + "description": "The SwiftMailer integration for the Yii framework", + "keywords": [ + "email", + "mail", + "mailer", + "swift", + "swiftmailer", + "yii2" + ], + "time": "2016-09-09T11:48:11+00:00" + } + ], + "packages-dev": [ + { + "name": "behat/gherkin", + "version": "v4.4.5", + "source": { + "type": "git", + "url": "https://github.com/Behat/Gherkin.git", + "reference": "5c14cff4f955b17d20d088dec1bde61c0539ec74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Behat/Gherkin/zipball/5c14cff4f955b17d20d088dec1bde61c0539ec74", + "reference": "5c14cff4f955b17d20d088dec1bde61c0539ec74", + "shasum": "" + }, + "require": { + "php": ">=5.3.1" + }, + "require-dev": { + "phpunit/phpunit": "~4.5|~5", + "symfony/phpunit-bridge": "~2.7|~3", + "symfony/yaml": "~2.3|~3" + }, + "suggest": { + "symfony/yaml": "If you want to parse features, represented in YAML files" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.4-dev" + } + }, + "autoload": { + "psr-0": { + "Behat\\Gherkin": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + } + ], + "description": "Gherkin DSL parser for PHP 5.3", + "homepage": "http://behat.org/", + "keywords": [ + "BDD", + "Behat", + "Cucumber", + "DSL", + "gherkin", + "parser" + ], + "time": "2016-10-30T11:50:56+00:00" + }, + { + "name": "bower-asset/typeahead.js", + "version": "v0.11.1", + "source": { + "type": "git", + "url": "https://github.com/twitter/typeahead.js.git", + "reference": "588440f66559714280628a4f9799f0c4eb880a4a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twitter/typeahead.js/zipball/588440f66559714280628a4f9799f0c4eb880a4a", + "reference": "588440f66559714280628a4f9799f0c4eb880a4a", + "shasum": "" + }, + "require": { + "bower-asset/jquery": ">=1.7" + }, + "require-dev": { + "bower-asset/jasmine-ajax": "~1.3.1", + "bower-asset/jasmine-jquery": "~1.5.2", + "bower-asset/jquery": "~1.7" + }, + "type": "bower-asset-library", + "extra": { + "bower-asset-main": "dist/typeahead.bundle.js" + } + }, + { + "name": "codeception/base", + "version": "2.2.8", + "source": { + "type": "git", + "url": "https://github.com/Codeception/base.git", + "reference": "cd71c312909aa2998e931d04c9057995bcf49185" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Codeception/base/zipball/cd71c312909aa2998e931d04c9057995bcf49185", + "reference": "cd71c312909aa2998e931d04c9057995bcf49185", + "shasum": "" + }, + "require": { + "behat/gherkin": "~4.4.0", + "ext-json": "*", + "ext-mbstring": "*", + "guzzlehttp/psr7": "~1.0", + "php": ">=5.4.0 <8.0", + "phpunit/php-code-coverage": ">=2.1.3 <5.0", + "phpunit/phpunit": ">4.8.20 <6.0", + "sebastian/comparator": "~1.1", + "sebastian/diff": "^1.4", + "symfony/browser-kit": ">=2.7 <4.0", + "symfony/console": ">=2.7 <4.0", + "symfony/css-selector": ">=2.7 <4.0", + "symfony/dom-crawler": ">=2.7.5 <4.0", + "symfony/event-dispatcher": ">=2.7 <4.0", + "symfony/finder": ">=2.7 <4.0", + "symfony/yaml": ">=2.7 <4.0" + }, + "require-dev": { + "codeception/specify": "~0.3", + "facebook/graph-sdk": "~5.3", + "flow/jsonpath": "~0.2", + "league/factory-muffin": "^3.0", + "league/factory-muffin-faker": "^1.0", + "mongodb/mongodb": "^1.0", + "monolog/monolog": "~1.8", + "pda/pheanstalk": "~3.0", + "php-amqplib/php-amqplib": "~2.4", + "predis/predis": "^1.0", + "squizlabs/php_codesniffer": "~2.0", + "vlucas/phpdotenv": "^2.4.0" + }, + "suggest": { + "codeception/specify": "BDD-style code blocks", + "codeception/verify": "BDD-style assertions", + "flow/jsonpath": "For using JSONPath in REST module", + "league/factory-muffin": "For DataFactory module", + "league/factory-muffin-faker": "For Faker support in DataFactory module", + "phpseclib/phpseclib": "for SFTP option in FTP Module", + "symfony/phpunit-bridge": "For phpunit-bridge support" + }, + "bin": [ + "codecept" + ], + "type": "library", + "extra": { + "branch-alias": [] + }, + "autoload": { + "psr-4": { + "Codeception\\": "src\\Codeception", + "Codeception\\Extension\\": "ext" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Bodnarchuk", + "email": "davert@mail.ua", + "homepage": "http://codegyre.com" + } + ], + "description": "BDD-style testing framework", + "homepage": "http://codeception.com/", + "keywords": [ + "BDD", + "TDD", + "acceptance testing", + "functional testing", + "unit testing" + ], + "time": "2017-01-20T01:01:44+00:00" + }, + { + "name": "codeception/verify", + "version": "0.3.2", + "source": { + "type": "git", + "url": "https://github.com/Codeception/Verify.git", + "reference": "b06d706261d1fee0cc312bacc5c1b7c506e5213a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Codeception/Verify/zipball/b06d706261d1fee0cc312bacc5c1b7c506e5213a", + "reference": "b06d706261d1fee0cc312bacc5c1b7c506e5213a", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/Codeception/function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Bodnarchuk", + "email": "davert.php@mailican.com" + } + ], + "description": "BDD assertion library for PHPUnit", + "time": "2016-08-29T22:49:25+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2015-06-14T21:17:01+00:00" + }, + { + "name": "fzaninotto/faker", + "version": "v1.6.0", + "source": { + "type": "git", + "url": "https://github.com/fzaninotto/Faker.git", + "reference": "44f9a286a04b80c76a4e5fb7aad8bb539b920123" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/44f9a286a04b80c76a4e5fb7aad8bb539b920123", + "reference": "44f9a286a04b80c76a4e5fb7aad8bb539b920123", + "shasum": "" + }, + "require": { + "php": "^5.3.3|^7.0" + }, + "require-dev": { + "ext-intl": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "type": "library", + "extra": { + "branch-alias": [] + }, + "autoload": { + "psr-4": { + "Faker\\": "src/Faker/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "François Zaninotto" + } + ], + "description": "Faker is a PHP library that generates fake data for you.", + "keywords": [ + "data", + "faker", + "fixtures" + ], + "time": "2016-04-29T12:21:54+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", + "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "PSR-7 message implementation", + "keywords": [ + "http", + "message", + "stream", + "uri" + ], + "time": "2016-06-24T23:00:38+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "5a5a9fc8025a08d8919be87d6884d5a92520cefe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/5a5a9fc8025a08d8919be87d6884d5a92520cefe", + "reference": "5a5a9fc8025a08d8919be87d6884d5a92520cefe", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "doctrine/collections": "1.*", + "phpunit/phpunit": "~4.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "homepage": "https://github.com/myclabs/DeepCopy", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2017-01-26T22:05:40+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2015-12-27T11:43:31+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0@dev", + "phpdocumentor/type-resolver": "^0.2.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^4.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2016-09-30T07:12:33+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.2.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", + "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "time": "2016-11-25T06:54:22+00:00" + }, + { + "name": "phpspec/php-diff", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/php-diff.git", + "reference": "0464787bfa7cd13576c5a1e318709768798bec6a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/php-diff/zipball/0464787bfa7cd13576c5a1e318709768798bec6a", + "reference": "0464787bfa7cd13576c5a1e318709768798bec6a", + "shasum": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Diff": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Chris Boulton", + "homepage": "http://github.com/chrisboulton" + } + ], + "description": "A comprehensive library for generating differences between two hashable objects (strings or arrays).", + "time": "2016-04-07T12:29:16+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "v1.6.2", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "6c52c2722f8460122f96f86346600e1077ce22cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/6c52c2722f8460122f96f86346600e1077ce22cb", + "reference": "6c52c2722f8460122f96f86346600e1077ce22cb", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", + "sebastian/comparator": "^1.1", + "sebastian/recursion-context": "^1.0|^2.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.0", + "phpunit/phpunit": "^4.8 || ^5.6.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2016-11-21T14:58:47+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "c19cfc7cbb0e9338d8c469c7eedecc2a428b0971" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c19cfc7cbb0e9338d8c469c7eedecc2a428b0971", + "reference": "c19cfc7cbb0e9338d8c469c7eedecc2a428b0971", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "^1.4.2", + "sebastian/code-unit-reverse-lookup": "~1.0", + "sebastian/environment": "^1.3.2 || ^2.0", + "sebastian/version": "~1.0|~2.0" + }, + "require-dev": { + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "^5.4" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.4.0", + "ext-xmlwriter": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2017-01-20T15:06:43+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2016-10-03T07:40:28+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4|~5" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2016-05-12T18:03:57+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.4.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3b402f65a4cc90abf6e1104e388b896ce209631b", + "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2016-11-15T14:06:22+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "5.7.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "69f832b87c731d5cacad7f91948778fe98335fdd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/69f832b87c731d5cacad7f91948778fe98335fdd", + "reference": "69f832b87c731d5cacad7f91948778fe98335fdd", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "~1.3", + "php": "^5.6 || ^7.0", + "phpspec/prophecy": "^1.6.2", + "phpunit/php-code-coverage": "^4.0.4", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "^3.2", + "sebastian/comparator": "~1.2.2", + "sebastian/diff": "~1.2", + "sebastian/environment": "^1.3.4 || ^2.0", + "sebastian/exporter": "~2.0", + "sebastian/global-state": "^1.0 || ^2.0", + "sebastian/object-enumerator": "~2.0", + "sebastian/resource-operations": "~1.0", + "sebastian/version": "~1.0|~2.0", + "symfony/yaml": "~2.1|~3.0" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "3.0.2" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-xdebug": "*", + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.7.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2017-01-28T06:14:33+00:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "3.4.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/3ab72b65b39b491e0c011e2e09bb2206c2aa8e24", + "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.6 || ^7.0", + "phpunit/php-text-template": "^1.2", + "sebastian/exporter": "^1.2 || ^2.0" + }, + "conflict": { + "phpunit/phpunit": "<5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2016-12-08T20:27:08+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "psr/log", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2016-10-10T12:19:37+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c36f5e7cfce482fde5bf8d10d41a53591e0198fe", + "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2016-02-13T06:45:14+00:00" + }, + { + "name": "sebastian/comparator", + "version": "1.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2 || ~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2017-01-29T09:50:25+00:00" + }, + { + "name": "sebastian/diff", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2015-12-08T07:14:41+00:00" + }, + { + "name": "sebastian/environment", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2016-11-26T07:53:53+00:00" + }, + { + "name": "sebastian/exporter", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~2.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2016-11-19T08:54:04+00:00" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2015-10-12T03:26:01+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "96f8a3f257b69e8128ad74d3a7fd464bcbaa3b35" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/96f8a3f257b69e8128ad74d3a7fd464bcbaa3b35", + "reference": "96f8a3f257b69e8128ad74d3a7fd464bcbaa3b35", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "sebastian/recursion-context": "~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2016-11-19T07:35:10+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2016-11-19T07:33:16+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2015-07-28T20:34:47+00:00" + }, + { + "name": "sebastian/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2016-10-03T07:35:21+00:00" + }, + { + "name": "symfony/browser-kit", + "version": "v3.2.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/browser-kit.git", + "reference": "548f8230bad9f77463b20b15993a008f03e96db5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/548f8230bad9f77463b20b15993a008f03e96db5", + "reference": "548f8230bad9f77463b20b15993a008f03e96db5", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/dom-crawler": "~2.8|~3.0" + }, + "require-dev": { + "symfony/css-selector": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0" + }, + "suggest": { + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\BrowserKit\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony BrowserKit Component", + "homepage": "https://symfony.com", + "time": "2017-01-02T20:32:22+00:00" + }, + { + "name": "symfony/console", + "version": "v3.2.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "4f9e449e76996adf310498a8ca955c6deebe29dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/4f9e449e76996adf310498a8ca955c6deebe29dd", + "reference": "4f9e449e76996adf310498a8ca955c6deebe29dd", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/debug": "~2.8|~3.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/filesystem": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/filesystem": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2017-01-08T20:47:33+00:00" + }, + { + "name": "symfony/css-selector", + "version": "v3.2.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/css-selector.git", + "reference": "f0e628f04fc055c934b3211cfabdb1c59eefbfaa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/f0e628f04fc055c934b3211cfabdb1c59eefbfaa", + "reference": "f0e628f04fc055c934b3211cfabdb1c59eefbfaa", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\CssSelector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony CssSelector Component", + "homepage": "https://symfony.com", + "time": "2017-01-02T20:32:22+00:00" + }, + { + "name": "symfony/debug", + "version": "v3.2.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "810ba5c1c5352a4ddb15d4719e8936751dff0b05" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/810ba5c1c5352a4ddb15d4719e8936751dff0b05", + "reference": "810ba5c1c5352a4ddb15d4719e8936751dff0b05", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/class-loader": "~2.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Debug Component", + "homepage": "https://symfony.com", + "time": "2017-01-02T20:32:22+00:00" + }, + { + "name": "symfony/dom-crawler", + "version": "v3.2.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/dom-crawler.git", + "reference": "27d9790840a4efd3b7bb8f5f4f9efc27b36b7024" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/27d9790840a4efd3b7bb8f5f4f9efc27b36b7024", + "reference": "27d9790840a4efd3b7bb8f5f4f9efc27b36b7024", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "symfony/css-selector": "~2.8|~3.0" + }, + "suggest": { + "symfony/css-selector": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\DomCrawler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony DomCrawler Component", + "homepage": "https://symfony.com", + "time": "2017-01-02T20:32:22+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v3.2.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "9137eb3a3328e413212826d63eeeb0217836e2b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9137eb3a3328e413212826d63eeeb0217836e2b6", + "reference": "9137eb3a3328e413212826d63eeeb0217836e2b6", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/dependency-injection": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2017-01-02T20:32:22+00:00" + }, + { + "name": "symfony/finder", + "version": "v3.2.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "8c71141cae8e2957946b403cc71a67213c0380d6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/8c71141cae8e2957946b403cc71a67213c0380d6", + "reference": "8c71141cae8e2957946b403cc71a67213c0380d6", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2017-01-02T20:32:22+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2016-11-14T01:06:16+00:00" + }, + { + "name": "symfony/yaml", + "version": "v3.2.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "50eadbd7926e31842893c957eca362b21592a97d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/50eadbd7926e31842893c957eca362b21592a97d", + "reference": "50eadbd7926e31842893c957eca362b21592a97d", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "symfony/console": "~2.8|~3.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2017-01-03T13:51:32+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f", + "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2016-11-23T20:04:58+00:00" + }, + { + "name": "yiisoft/yii2-debug", + "version": "2.0.7", + "source": { + "type": "git", + "url": "https://github.com/yiisoft/yii2-debug.git", + "reference": "a74a2433ad1dfda30a253a92f6db52c131807432" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yiisoft/yii2-debug/zipball/a74a2433ad1dfda30a253a92f6db52c131807432", + "reference": "a74a2433ad1dfda30a253a92f6db52c131807432", + "shasum": "" + }, + "require": { + "yiisoft/yii2": "~2.0.4", + "yiisoft/yii2-bootstrap": "~2.0.0" + }, + "type": "yii2-extension", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "yii\\debug\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Qiang Xue", + "email": "qiang.xue@gmail.com" + } + ], + "description": "The debugger extension for the Yii framework", + "keywords": [ + "debug", + "debugger", + "yii2" + ], + "time": "2016-11-24T09:42:29+00:00" + }, + { + "name": "yiisoft/yii2-faker", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/yiisoft/yii2-faker.git", + "reference": "b88ca69ee226a3610b2c26c026c3203d7ac50f6c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yiisoft/yii2-faker/zipball/b88ca69ee226a3610b2c26c026c3203d7ac50f6c", + "reference": "b88ca69ee226a3610b2c26c026c3203d7ac50f6c", + "shasum": "" + }, + "require": { + "fzaninotto/faker": "*", + "yiisoft/yii2": "*" + }, + "type": "yii2-extension", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "yii\\faker\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Mark Jebri", + "email": "mark.github@yandex.ru" + } + ], + "description": "Fixture generator. The Faker integration for the Yii framework.", + "keywords": [ + "Fixture", + "faker", + "yii2" + ], + "time": "2015-03-01T06:22:44+00:00" + }, + { + "name": "yiisoft/yii2-gii", + "version": "2.0.5", + "source": { + "type": "git", + "url": "https://github.com/yiisoft/yii2-gii.git", + "reference": "1bd6df6804ca077ec022587905a0d43eb286f507" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yiisoft/yii2-gii/zipball/1bd6df6804ca077ec022587905a0d43eb286f507", + "reference": "1bd6df6804ca077ec022587905a0d43eb286f507", + "shasum": "" + }, + "require": { + "bower-asset/typeahead.js": "0.10.* | ~0.11.0", + "phpspec/php-diff": ">=1.0.2", + "yiisoft/yii2": ">=2.0.4", + "yiisoft/yii2-bootstrap": "~2.0" + }, + "type": "yii2-extension", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + }, + "asset-installer-paths": { + "npm-asset-library": "vendor/npm", + "bower-asset-library": "vendor/bower" + } + }, + "autoload": { + "psr-4": { + "yii\\gii\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Qiang Xue", + "email": "qiang.xue@gmail.com" + } + ], + "description": "The Gii extension for the Yii framework", + "keywords": [ + "code generator", + "gii", + "yii2" + ], + "time": "2016-03-18T14:09:46+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.4.0" + }, + "platform-dev": [] +} diff --git a/console/config/.gitignore b/console/config/.gitignore new file mode 100644 index 0000000..20da318 --- /dev/null +++ b/console/config/.gitignore @@ -0,0 +1,2 @@ +main-local.php +params-local.php \ No newline at end of file diff --git a/console/config/bootstrap.php b/console/config/bootstrap.php new file mode 100644 index 0000000..b3d9bbc --- /dev/null +++ b/console/config/bootstrap.php @@ -0,0 +1 @@ + 'utf-8', + 'language' => 'zh-CN', + 'timeZone' => 'Asia/Shanghai', + 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor', + 'id' => 'app-console', + 'basePath' => dirname(__DIR__), + 'bootstrap' => ['log'], + 'controllerNamespace' => 'console\controllers', + 'controllerMap' => [ + 'fixture' => [ + 'class' => 'yii\console\controllers\FixtureController', + 'namespace' => 'common\fixtures', + ], + ], + 'components' => [ + 'log' => [ + 'targets' => [ + [ + 'class' => 'yii\log\FileTarget', + 'levels' => ['error', 'warning'], + ], + ], + ], + 'db' => [ + 'class' => 'yii\db\Connection', + 'dsn' => 'mysql:host=106.14.56.77;dbname=fx_test', + 'username' => 'spider', + 'password' => 'PjGPWNUgOYe6i1Ef', + 'charset' => 'utf8', + ], + ], + 'params' => $params, +]; diff --git a/console/config/ksdev/main.php b/console/config/ksdev/main.php new file mode 100644 index 0000000..f582d8e --- /dev/null +++ b/console/config/ksdev/main.php @@ -0,0 +1,40 @@ + 'utf-8', + 'language' => 'zh-CN', + 'timeZone' => 'Asia/Shanghai', + 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor', + 'id' => 'app-console', + 'basePath' => dirname(__DIR__), + 'bootstrap' => ['log'], + 'controllerNamespace' => 'console\controllers', + 'controllerMap' => [ + 'fixture' => [ + 'class' => 'yii\console\controllers\FixtureController', + 'namespace' => 'common\fixtures', + ], + ], + 'components' => [ + 'log' => [ + 'targets' => [ + [ + 'class' => 'yii\log\FileTarget', + 'levels' => ['error', 'warning'], + ], + ], + ], + 'db' => [ + 'class' => 'yii\db\Connection', + 'dsn' => 'mysql:host=106.14.56.77;dbname=fx_test', + 'username' => 'spider', + 'password' => 'PjGPWNUgOYe6i1Ef', + 'charset' => 'utf8', + ], + ], + 'params' => $params, +]; diff --git a/console/config/kspro/main.php b/console/config/kspro/main.php new file mode 100644 index 0000000..f85186e --- /dev/null +++ b/console/config/kspro/main.php @@ -0,0 +1,40 @@ + 'utf-8', + 'language' => 'zh-CN', + 'timeZone' => 'Asia/Shanghai', + 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor', + 'id' => 'app-console', + 'basePath' => dirname(__DIR__), + 'bootstrap' => ['log'], + 'controllerNamespace' => 'console\controllers', + 'controllerMap' => [ + 'fixture' => [ + 'class' => 'yii\console\controllers\FixtureController', + 'namespace' => 'common\fixtures', + ], + ], + 'components' => [ + 'log' => [ + 'targets' => [ + [ + 'class' => 'yii\log\FileTarget', + 'levels' => ['error', 'warning'], + ], + ], + ], + 'db' => [ + 'class' => 'yii\db\Connection', + 'dsn' => 'mysql:host=106.14.56.77;dbname=ks', + 'username' => 'spider', + 'password' => 'PjGPWNUgOYe6i1Ef', + 'charset' => 'utf8', + ], + ], + 'params' => $params, +]; diff --git a/console/config/main.php b/console/config/main.php new file mode 100644 index 0000000..189f9e6 --- /dev/null +++ b/console/config/main.php @@ -0,0 +1,33 @@ + 'utf-8', + 'language' => 'zh-CN', + 'timeZone' => 'Asia/Shanghai', + 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor', + 'id' => 'app-console', + 'basePath' => dirname(__DIR__), + 'bootstrap' => ['log'], + 'controllerNamespace' => 'console\controllers', + 'controllerMap' => [ + 'fixture' => [ + 'class' => 'yii\console\controllers\FixtureController', + 'namespace' => 'common\fixtures', + ], + ], + 'components' => [ + 'log' => [ + 'targets' => [ + [ + 'class' => 'yii\log\FileTarget', + 'levels' => ['error', 'warning'], + ], + ], + ], + ], + 'params' => $params, +]; diff --git a/console/config/params.php b/console/config/params.php new file mode 100644 index 0000000..7f754b9 --- /dev/null +++ b/console/config/params.php @@ -0,0 +1,4 @@ + 'admin@example.com', +]; diff --git a/console/config/pro/main.php b/console/config/pro/main.php new file mode 100644 index 0000000..53c9166 --- /dev/null +++ b/console/config/pro/main.php @@ -0,0 +1,40 @@ + 'utf-8', + 'language' => 'zh-CN', + 'timeZone' => 'Asia/Shanghai', + 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor', + 'id' => 'app-console', + 'basePath' => dirname(__DIR__), + 'bootstrap' => ['log'], + 'controllerNamespace' => 'console\controllers', + 'controllerMap' => [ + 'fixture' => [ + 'class' => 'yii\console\controllers\FixtureController', + 'namespace' => 'common\fixtures', + ], + ], + 'components' => [ + 'log' => [ + 'targets' => [ + [ + 'class' => 'yii\log\FileTarget', + 'levels' => ['error', 'warning'], + ], + ], + ], + 'db' => [ + 'class' => 'yii\db\Connection', + 'dsn' => 'mysql:host=106.14.56.77;dbname=fx', + 'username' => 'spider', + 'password' => 'PjGPWNUgOYe6i1Ef', + 'charset' => 'utf8', + ], + ], + 'params' => $params, +]; diff --git a/console/config/qdh/main.php b/console/config/qdh/main.php new file mode 100644 index 0000000..4550a6f --- /dev/null +++ b/console/config/qdh/main.php @@ -0,0 +1,40 @@ + 'utf-8', + 'language' => 'zh-CN', + 'timeZone' => 'Asia/Shanghai', + 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor', + 'id' => 'app-console', + 'basePath' => dirname(__DIR__), + 'bootstrap' => ['log'], + 'controllerNamespace' => 'console\controllers', + 'controllerMap' => [ + 'fixture' => [ + 'class' => 'yii\console\controllers\FixtureController', + 'namespace' => 'common\fixtures', + ], + ], + 'components' => [ + 'log' => [ + 'targets' => [ + [ + 'class' => 'yii\log\FileTarget', + 'levels' => ['error', 'warning'], + ], + ], + ], + 'db' => [ + 'class' => 'yii\db\Connection', + 'dsn' => 'mysql:host=106.14.56.77;dbname=qdhfx_test', + 'username' => 'spider', + 'password' => 'PjGPWNUgOYe6i1Ef', + 'charset' => 'utf8', + ], + ], + 'params' => $params, +]; diff --git a/console/config/qdhpro/main.php b/console/config/qdhpro/main.php new file mode 100644 index 0000000..4df0b54 --- /dev/null +++ b/console/config/qdhpro/main.php @@ -0,0 +1,40 @@ + 'utf-8', + 'language' => 'zh-CN', + 'timeZone' => 'Asia/Shanghai', + 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor', + 'id' => 'app-console', + 'basePath' => dirname(__DIR__), + 'bootstrap' => ['log'], + 'controllerNamespace' => 'console\controllers', + 'controllerMap' => [ + 'fixture' => [ + 'class' => 'yii\console\controllers\FixtureController', + 'namespace' => 'common\fixtures', + ], + ], + 'components' => [ + 'log' => [ + 'targets' => [ + [ + 'class' => 'yii\log\FileTarget', + 'levels' => ['error', 'warning'], + ], + ], + ], + 'db' => [ + 'class' => 'yii\db\Connection', + 'dsn' => 'mysql:host=106.14.56.77;dbname=qdhfx', + 'username' => 'spider', + 'password' => 'PjGPWNUgOYe6i1Ef', + 'charset' => 'utf8', + ], + ], + 'params' => $params, +]; diff --git a/console/config/runtime/logs/app.log b/console/config/runtime/logs/app.log new file mode 100644 index 0000000..640ac5f --- /dev/null +++ b/console/config/runtime/logs/app.log @@ -0,0 +1,70 @@ +2017-05-16 10:41:08 [-][-][-][error][yii\base\ErrorException:8] yii\base\ErrorException: Undefined index: ticket_id in D:\www\FX\common\models\BusTicket.php:177 +Stack trace: +#0 D:\www\FX\common\models\BusTicket.php(177): yii\base\ErrorHandler->handleError(8, 'Undefined index...', 'D:\\www\\FX\\commo...', 177, Array) +#1 D:\www\FX\console\controllers\CountController.php(174): common\models\BusTicket->delBusTicket(Array) +#2 [internal function]: console\controllers\CountController->actionUptBus('pro') +#3 D:\www\FX\vendor\yiisoft\yii2\base\InlineAction.php(57): call_user_func_array(Array, Array) +#4 D:\www\FX\vendor\yiisoft\yii2\base\Controller.php(156): yii\base\InlineAction->runWithParams(Array) +#5 D:\www\FX\vendor\yiisoft\yii2\console\Controller.php(128): yii\base\Controller->runAction('upt-bus', Array) +#6 D:\www\FX\vendor\yiisoft\yii2\base\Module.php(523): yii\console\Controller->runAction('upt-bus', Array) +#7 D:\www\FX\vendor\yiisoft\yii2\console\Application.php(180): yii\base\Module->runAction('count/upt-bus', Array) +#8 D:\www\FX\vendor\yiisoft\yii2\console\Application.php(147): yii\console\Application->runAction('count/upt-bus', Array) +#9 D:\www\FX\vendor\yiisoft\yii2\base\Application.php(380): yii\console\Application->handleRequest(Object(yii\console\Request)) +#10 D:\www\FX\yii(31): yii\base\Application->run() +#11 {main} +2017-05-16 10:41:05 [-][-][-][info][application] $_SERVER = [ + 'ALLUSERSPROFILE' => 'C:\\ProgramData' + 'APPDATA' => 'C:\\Users\\admin\\AppData\\Roaming' + 'CommonProgramFiles' => 'C:\\Program Files (x86)\\Common Files' + 'CommonProgramFiles(x86)' => 'C:\\Program Files (x86)\\Common Files' + 'CommonProgramW6432' => 'C:\\Program Files\\Common Files' + 'COMPUTERNAME' => 'DESKTOP-SQCEPC5' + 'ComSpec' => 'C:\\WINDOWS\\system32\\cmd.exe' + 'FPS_BROWSER_APP_PROFILE_STRING' => 'Internet Explorer' + 'FPS_BROWSER_USER_PROFILE_STRING' => 'Default' + 'HOMEDRIVE' => 'C:' + 'HOMEPATH' => '\\Users\\admin' + 'LOCALAPPDATA' => 'C:\\Users\\admin\\AppData\\Local' + 'LOGONSERVER' => '\\\\DESKTOP-SQCEPC5' + 'NUMBER_OF_PROCESSORS' => '4' + 'OS' => 'Windows_NT' + 'Path' => 'C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\Program Files\\Intel\\iCLS Client\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\ATI Technologies\\ATI.ACE\\Core-Static;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\TortoiseSVN\\bin;C:\\ProgramData\\ComposerSetup\\bin;D:\\xampp7\\php;C:\\HashiCorp\\Vagrant\\bin;C:\\Program Files\\Git\\cmd;C:\\Users\\admin\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\admin\\AppData\\Roaming\\Composer\\vendor\\bin;D:\\ruanjian\\jmeter\\apache-jmeter-2.13\\bin' + 'PATHEXT' => '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC' + 'PHPRC' => 'D:\\xampp7\\php' + 'PROCESSOR_ARCHITECTURE' => 'x86' + 'PROCESSOR_ARCHITEW6432' => 'AMD64' + 'PROCESSOR_IDENTIFIER' => 'Intel64 Family 6 Model 60 Stepping 3, GenuineIntel' + 'PROCESSOR_LEVEL' => '6' + 'PROCESSOR_REVISION' => '3c03' + 'ProgramData' => 'C:\\ProgramData' + 'ProgramFiles' => 'C:\\Program Files (x86)' + 'ProgramFiles(x86)' => 'C:\\Program Files (x86)' + 'ProgramW6432' => 'C:\\Program Files' + 'PROMPT' => '$P$G' + 'PSModulePath' => 'C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules\\' + 'PUBLIC' => 'C:\\Users\\Public' + 'SESSIONNAME' => 'Console' + 'SystemDrive' => 'C:' + 'SystemRoot' => 'C:\\WINDOWS' + 'TEMP' => 'C:\\Users\\admin\\AppData\\Local\\Temp' + 'TMP' => 'C:\\Users\\admin\\AppData\\Local\\Temp' + 'USERDOMAIN' => 'DESKTOP-SQCEPC5' + 'USERDOMAIN_ROAMINGPROFILE' => 'DESKTOP-SQCEPC5' + 'USERNAME' => 'admin' + 'USERPROFILE' => 'C:\\Users\\admin' + 'VBOX_MSI_INSTALL_PATH' => 'C:\\Program Files\\Oracle\\VirtualBox\\' + 'windir' => 'C:\\WINDOWS' + 'PHP_SELF' => 'D:\\www\\FX\\yii' + 'SCRIPT_NAME' => 'D:\\www\\FX\\yii' + 'SCRIPT_FILENAME' => 'D:\\www\\FX\\yii' + 'PATH_TRANSLATED' => 'D:\\www\\FX\\yii' + 'DOCUMENT_ROOT' => '' + 'REQUEST_TIME_FLOAT' => 1494902465.335 + 'REQUEST_TIME' => 1494902465 + 'argv' => [ + 0 => 'D:\\www\\FX\\yii' + 1 => 'count/upt-bus' + 2 => 'pro' + ] + 'argc' => 3 +] diff --git a/console/controllers/.gitkeep b/console/controllers/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/console/controllers/CountController.php b/console/controllers/CountController.php new file mode 100644 index 0000000..7dd7e1a --- /dev/null +++ b/console/controllers/CountController.php @@ -0,0 +1,264 @@ +getFinishOrder($date); + if ($finish_order) { + $order_arr = explode(',', $finish_order['order_arr']); + //修改状态,1.order_main 订单状态变为3 2.订单完成日期记录 + $upt_finish_order = $order_main->uptFinishOrder($order_arr); + Util::addOrderLog(0,0,implode('-',$order_arr),'订单完成',6); + file_put_contents(ROOT_PATH . '/console/log/finishorder/finishorder.log', date("Y-m-d H:i:s") . " " . $finish_order['order_arr'] . ' 状态变已完成-----今日完成订单数 ' . count($order_arr) . ' 操作成功 ' . $upt_finish_order . PHP_EOL, FILE_APPEND); + } else { + file_put_contents(ROOT_PATH . '/console/log/finishorder/finishorder.log', date("Y-m-d H:i:s") . " 今日无完成订单" . PHP_EOL, FILE_APPEND); + } + } + + public function actionOutTime() + { + //待支付15分钟未支付,状态变为已取消 + $order_main = new OrderMain(); + $cancel_count = $order_main->cancelOuttimeOrder(); + if ($cancel_count > 0) { + file_put_contents(ROOT_PATH . '/console/log/outtimeorder/' . date('Y-m-d') . '.log', date("Y-m-d H:i:s") . '订单取消' . $cancel_count . PHP_EOL, FILE_APPEND); + } + } + + + //已完成三天的订单佣金从待结算变成已结算 + public function actionCommission() + { + $fx_commission_info = new FxCommissionInfo(); + $result = $fx_commission_info->finishCommission(); + file_put_contents(ROOT_PATH . '/console/log/commission/commission.log', date("Y-m-d H:i:s") . '可结算订单编号 ' . $result['order_list'] . ' 佣金结算数 ' . $result['count'] . ' 操作用户数' . $result['cnt'] . PHP_EOL, FILE_APPEND); + } + + /** + * Des:更新门票数据 + * Name: actionUptTicket + * @author 倪宗锋 + */ + public function actionUptEntranceTicket() + { + $siteConfig = Util::getSiteConfig(); + $add_order_str = ''; + $del_order_str = ''; + $prod_category = new ProdCategory(); + //0.查当前数据库的巴士信息 + $ticket_arr = $prod_category->getEntranceTicket(); + //1.cs查票种信息,存缓存 + $time = time(); + $send_data = [ + 'auth_code' => Util::authCodeForCs($time), + 'user_key' => $siteConfig['adm_user_key'], + 'user' => $siteConfig['adm_user'], + 'user_id' => $siteConfig['adm_user_id'], + 'request_time' => $time, + 'action' => 'gate_ticket_all', + 'ticket_type' => 'bus' + ]; + $curlInterface = new CurlInterface($send_data, 4); + $curlInterface->setBaseUrl(''); + $ticket_arr_cs = $curlInterface->execute($siteConfig['adm_host1'] . '/api/nfx', 'POST'); + if ($ticket_arr_cs['code'] == 0) { + //新产品则添加 + $new_bus_arr_add = array_diff_key($ticket_arr_cs['list'], $ticket_arr);//新增的票 + foreach ($new_bus_arr_add as $key => $val) { + $add_order_str .= ',' . $key; + } + if ($new_bus_arr_add) { + $istBusTicket = $prod_category->addEntranceTicketFormCs($new_bus_arr_add); + if (!$istBusTicket) { + file_put_contents(ROOT_PATH . '/console/log/busticket/entranceTicket.log', date("Y-m-d H:i:s") . '新增票种失败' . PHP_EOL, FILE_APPEND); + } + }; + //不再使用的产品则删除 + $new_bus_arr_del = array_diff_key($ticket_arr, $ticket_arr_cs['list']);//取消售卖的票 + foreach ($new_bus_arr_del as $key => $val) { + $del_order_str .= ',' . $key; + } + if ($new_bus_arr_del) { + $delBusTicket = $prod_category->delEntranceTicketFormCs($new_bus_arr_del); + if (!$delBusTicket) { + file_put_contents(ROOT_PATH . '/console/log/busticket/entranceTicket.log', date("Y-m-d H:i:s") . '删除票种失败' . PHP_EOL, FILE_APPEND); + } + } else { + file_put_contents(ROOT_PATH . '/console/log/busticket/entranceTicket.log', date("Y-m-d H:i:s") . '无取消票种' . PHP_EOL, FILE_APPEND); + } +// //重新激活产品 +// $new_bus_arr_inter = array_intersect_key($ticket_arr, $ticket_arr_cs['list']);//取消售卖的票 +// if (count($new_bus_arr_inter) >= 1) { +// $prod_category->interEntranceTicketFormCs($new_bus_arr_inter); +// } + } else { + file_put_contents(ROOT_PATH . '/console/log/busticket/entranceTicket.log', date("Y-m-d H:i:s") . '接口错误' . PHP_EOL, FILE_APPEND); + } + file_put_contents(ROOT_PATH . '/console/log/busticket/entranceTicket.log', date("Y-m-d H:i:s") . '更新完成,今日新增票种' . $add_order_str . ' 今日删除票种' . $del_order_str . PHP_EOL, FILE_APPEND); + + } + + + /** + * Function Description:定时同步巴士数据 + * Function Name: actionUptBus + * + * + * @author 娄梦宁 + */ + public function actionUptBus() + { + $siteConfig = Util::getSiteConfig(); + $add_order_str = ''; + $del_order_str = ''; + $bus_ticket = new BusTicket(); + //0.查当前数据库的巴士信息 + $ticket_arr = $bus_ticket->getBusArr(); + //1.cs查票种信息,存缓存 + $time = time(); + $send_data = [ + 'auth_code' => Util::authCodeForCs($time), + 'user_key' => $siteConfig['adm_user_key'], + 'user' => $siteConfig['adm_user'], + 'user_id' => $siteConfig['adm_user_id'], + 'request_time' => $time, + 'action' => 'get_ticket_array', + 'ticket_type' => 'bus' + ]; + $curlInterface = new CurlInterface($send_data, 4); + $curlInterface->setBaseUrl(''); + $ticket_arr_cs = $curlInterface->execute($siteConfig['adm_host1'] . '/api/nfx', 'POST'); + //2.比较新数据和缓存的差集 + if ($ticket_arr_cs['code'] == 0) { + //新增售卖票种 + $new_bus_arr_add = array_diff_key($ticket_arr_cs['data'], $ticket_arr);//新增的票 + foreach ($new_bus_arr_add as $key => $val) { + $add_order_str .= ',' . $key; + } + if ($new_bus_arr_add) { + $istBusTicket = $bus_ticket->istBusTicket($new_bus_arr_add); + if (!$istBusTicket) { + file_put_contents(ROOT_PATH . '/console/log/busticket/busticket.log', date("Y-m-d H:i:s") . '新增票种失败' . PHP_EOL, FILE_APPEND); + } + }; + //取消售卖票种 + $new_bus_arr_del = array_diff_key($ticket_arr, $ticket_arr_cs['data']);//取消售卖的票 + foreach ($new_bus_arr_del as $key => $val) { + $del_order_str .= ',' . $key; + } + if ($new_bus_arr_del) { + $delBusTicket = $bus_ticket->delBusTicket($new_bus_arr_del); + if (!$delBusTicket) { + file_put_contents(ROOT_PATH . '/console/log/busticket/busticket.log', date("Y-m-d H:i:s") . '删除票种失败' . PHP_EOL, FILE_APPEND); + } + } else { + file_put_contents(ROOT_PATH . '/console/log/busticket/busticket.log', date("Y-m-d H:i:s") . '无取消票种' . PHP_EOL, FILE_APPEND); + } +// //重新激活产品 +// if (count($ticket_arr_cs['data']) >= 1) { +// $bus_ticket->updateBus($ticket_arr_cs['data']); +// } + } else { + file_put_contents(ROOT_PATH . '/console/log/busticket/busticket.log', date("Y-m-d H:i:s") . '接口错误' . PHP_EOL, FILE_APPEND); + } + file_put_contents(ROOT_PATH . '/console/log/busticket/busticket.log', date("Y-m-d H:i:s") . '更新完成,今日新增票种' . $add_order_str . ' 今日删除票种' . $del_order_str . PHP_EOL, FILE_APPEND); + } + + /** + * Des:每日设置产品销售量 + * Name: actionSetSaleCnt + * @return string + * @author 倪宗锋 + */ + public function actionSetSaleCnt() + { + $day = date('d'); + $prodCate = new ProdCategory(); + $flag = $prodCate->setSaleCnt($day); + if ($flag) { + $msg = '更新产品销售量成功'; + } else { + $msg = '更新产品销售量失败'; + } + file_put_contents(ROOT_PATH . '/console/log/busticket/setSalCnt.log', date("Y-m-d H:i:s") . $msg . PHP_EOL, FILE_APPEND); + return $msg; + } + + public function actionUpLineProd() + { + $transaction = \Yii::$app->db->beginTransaction(); + try { + /**将品类表不存在的线路插入产品品类表*/ + $sql = '' . "INSERT INTO `prod_category` (`pro_cate_name`, `category_id`, `commission`,`create_time`, `sign`, show_price, bus_ticket_id,bus_line_type) + SELECT a.line_name,1,5,NOW(),a.line_id,a.price,a.ticket_id,a.line_type + from ( + SELECT line_id,line_name,MAX(prod_price) price,ticket_id,line_type + from bus_ticket + WHERE line_type in (255,256) + GROUP BY line_id + ) a + LEFT JOIN prod_category b on a.line_id = b.sign and b.category_id=1 + where b.pro_cate_id is NULL;"; + \Yii::$app->getDb()->createCommand($sql)->execute(); + /**将产品品类表存在,产品表没有产品的添加产品*/ + $sql1 = '' . "INSERT INTO `prod_main` ( `prod_cate_id`, `prod_name`, `prod_price`, `create_time`) + SELECT a.pro_cate_id,'成人票',a.show_price,NOW() + from prod_category a + left JOIN prod_main b on a.pro_cate_id = b.prod_cate_id + WHERE a.sign != '' and a.category_id = 1 and b.prod_id is NULL + UNION ALL + SELECT a.pro_cate_id,'儿童票',a.show_price,NOW() + from prod_category a + left JOIN prod_main b on a.pro_cate_id = b.prod_cate_id + WHERE a.sign != '' and a.category_id = 1 and b.prod_id is NULL;"; + \Yii::$app->getDb()->createCommand($sql1)->execute(); + /**更新所有线路的产品状态*/ + $sql2 = '' . "UPDATE + prod_category a + LEFT JOIN + ( + SELECT line_id,line_name,MAX(prod_price) price + from bus_ticket + WHERE line_type in (255,256) + GROUP BY line_id + ) b on b.line_id = a.sign + set a.delete_flag = if(b.line_id is null,1,0) + where a.sign != '' and a.category_id = 1 ; + "; + \Yii::$app->getDb()->createCommand($sql2)->execute(); + $transaction->commit(); + file_put_contents(ROOT_PATH . '/console/log/busticket/busticketLine.log', date("Y-m-d H:i:s") . '同步成功!' . PHP_EOL, FILE_APPEND); + return 'success'; + } catch (Exception $e) { + $transaction->rollBack(); + file_put_contents(ROOT_PATH . '/console/log/busticket/busticketLine.log', date("Y-m-d H:i:s") . '同步失败!' . PHP_EOL, FILE_APPEND); + return 'fail'; + } + } +} diff --git a/console/controllers/RefundOrderController.php b/console/controllers/RefundOrderController.php new file mode 100644 index 0000000..b6be83a --- /dev/null +++ b/console/controllers/RefundOrderController.php @@ -0,0 +1,113 @@ +payFund == '') { + $this->payFund = new PayRefush(); + } + return $this->payFund; + } + + /** + * Des:退款操作 + * Name: actionIndex + * @author 倪宗锋 + */ + public function actionIndex() + { + $refundList = $this->getRefund()->getUnPayIds(); + foreach ($refundList as $val) { + $id = $val['id']; + $refund = $this->refund($id); + $logUrl = ROOT_PATH . '/console/log/refund/error' . date("Y-m-d") . '.log'; + $msg = date("Y-m-d H:i:s") . ':'; + $msg .= $refund['msg']; + file_put_contents($logUrl, $msg . PHP_EOL, FILE_APPEND); + } + } + + /** + * Des:执行退款 + * Name: refund + * @param $id + * @return array + * @throws Exception + * @author 倪宗锋 + */ + public function refund($id) + { + //获取退款信息 + $refundInfo = $this->getRefund()->getInfoById($id); + if ($refundInfo['status'] == 2) { + return Util::returnArrSu($refundInfo['order_id'] . '退款成功!已经是退款状态!'); + } + $transaction = \Yii::$app->db->beginTransaction(); + try { + //1.修改订单状态为退款成功 + $upFlag = $this->getRefund()->updateStatus($id, 2); + if ($upFlag == false) { + return Util::returnArrEr($refundInfo['order_id'] . '退款失败!修改订单状态失败!'); + } + //2.获取订单联系人信息 + $orderContacts = new OrderContacts(); + $getOrderCon = $orderContacts->getRowByOrderId($refundInfo['order_id']); + if (empty($getOrderCon['contacts_phone'])) { + $this->getRefund()->updateStatus($id, 3); + return Util::returnArrEr($refundInfo['order_id'] . '退款失败!获取订单联系人失败!'); + } + //3.调用接口微信或支付宝 进行退款操作 + $params = [ + 'order_id' => $refundInfo['pay_order_id'], + 'name' => '订单退款', + 'total_fee' => $refundInfo['amount_money'], + 'refund_fee' => $refundInfo['refush_money'] + ]; + $refundFlag = PayService::cancel($params, $refundInfo['pay_type']);//退款退钱 + if ($refundFlag['flag'] == false) { + $transaction->rollBack(); + $this->getRefund()->updateStatus($id, 3); + return Util::returnArrEr($refundInfo['order_id'] . '退款失败!退款接口返回失败!'); + } + //4.发送短信通知 + + $reMsg = ''; + $siteConfig = Util::getSiteConfig(); + $msg = "您申请的¥{$params['refund_fee']}退款已经通过审核,预计一个工作日内会退还到您的付款账户,请留意查收。如有问题,可拨打客服热线:" . $siteConfig['kefu_tel']; + $sendMsg = Util::sendMessage($msg, $getOrderCon['contacts_phone']); + if ($sendMsg['flag'] == false) { + $reMsg = '发送短信通知失败!'; + } + $transaction->commit(); + return Util::returnArrSu($refundInfo['order_id'] . '退款成功!' . $reMsg); + } catch (Exception $e) { + $transaction->rollBack();//回滚 + return Util::returnArrEr($refundInfo['order_id'] . '退款失败!程序异常!'); + } + } +} \ No newline at end of file diff --git a/console/controllers/SyncHotelController.php b/console/controllers/SyncHotelController.php new file mode 100644 index 0000000..4dacc49 --- /dev/null +++ b/console/controllers/SyncHotelController.php @@ -0,0 +1,104 @@ +getEntranceHotel(); + //1.cs查票种信息,存缓存 +// $time = time(); +// $send_data = [ +// 'auth_code' => Util::authCodeForCs($time), +// 'user_key' => $siteConfig['adm_user_key'], +// 'user' => $siteConfig['adm_user'], +// 'user_id' => $siteConfig['adm_user_id'], +// 'request_time' => $time, +// 'action' => 'gate_ticket_all', +// 'ticket_type' => 'bus' +// ]; +// $curlInterface = new CurlInterface($send_data, 4); +// $curlInterface->setBaseUrl(''); +// $ticket_arr_cs = $curlInterface->execute($siteConfig['adm_host1'] . '/api/nfx', 'POST'); + $ticket_arr_cs = ["code"=>0,"info"=>"","list"=>["1111"=>[ + "sign"=>"1111", + "prod_id"=>"111100", + "name"=>"测试酒店名称1", + "sub_ticket"=>[ + ["prod_id"=>"111100","prod_name"=>"1111大床房[无早]"], + ["prod_id"=>"111101","prod_name"=>"1111大床房[单早]"], + ["prod_id"=>"111103","prod_name"=>"1111大床房[双早]"] + ] + ], + "2222"=>[ + "sign"=>"2222", + "prod_id"=>"222200", + "name"=>"测试酒店名称2", + "sub_ticket"=>[ + ["prod_id"=>"222200","prod_name"=>"2222大床房[无早]"], + ["prod_id"=>"222201","prod_name"=>"2222大床房[单早]"], + ["prod_id"=>"222203","prod_name"=>"2222大床房[双早]"] + ] + ] + ] + ]; + if ($ticket_arr_cs['code'] == 0) { + //新产品则添加 + $new_bus_arr_add = array_diff_key($ticket_arr_cs['list'], $ticket_arr);//新增的酒店-房型 + foreach ($new_bus_arr_add as $key => $val) { + $add_order_str .= ',' . $key; + } + if ($new_bus_arr_add) { + $istBusTicket = $prod_category->addEntranceHotelFormCs($new_bus_arr_add); + if (!$istBusTicket) { + file_put_contents(ROOT_PATH . '/console/log/hotelroom/entrancehotelroom.log', date("Y-m-d H:i:s") . '新增酒店房型失败' . PHP_EOL, FILE_APPEND); + } + }; + //不再使用的产品则删除 + $new_bus_arr_del = array_diff_key($ticket_arr, $ticket_arr_cs['list']);//取消售卖的票 + foreach ($new_bus_arr_del as $key => $val) { + $del_order_str .= ',' . $key; + } + if ($new_bus_arr_del) { + $delBusTicket = $prod_category->delEntranceHotelFormCs($new_bus_arr_del); + if (!$delBusTicket) { + file_put_contents(ROOT_PATH . '/console/log/hotelroom/entrancehotelroom.log', date("Y-m-d H:i:s") . '删除酒店房型失败' . PHP_EOL, FILE_APPEND); + } + } else { + file_put_contents(ROOT_PATH . '/console/log/hotelroom/entrancehotelroom.log', date("Y-m-d H:i:s") . '无取消酒店房型' . PHP_EOL, FILE_APPEND); + } + //重新激活产品 + $new_bus_arr_inter = array_intersect_key($ticket_arr, $ticket_arr_cs['list']);//取消售卖的票 + if(count($new_bus_arr_inter) >= 1) { + $prod_category->interEntranceHotelFormCs($new_bus_arr_inter); + } + } else { + file_put_contents(ROOT_PATH . '/console/log/hotelroom/entrancehotelroom.log', date("Y-m-d H:i:s") . '接口错误' . PHP_EOL, FILE_APPEND); + } + file_put_contents(ROOT_PATH . '/console/log/hotelroom/entrancehotelroom.log', date("Y-m-d H:i:s") . '更新完成,今日新增酒店房型' . $add_order_str . ' 今日删除酒店房型' . $del_order_str . PHP_EOL, FILE_APPEND); + + } + + +} diff --git a/console/controllers/TestController.php b/console/controllers/TestController.php new file mode 100644 index 0000000..8988953 --- /dev/null +++ b/console/controllers/TestController.php @@ -0,0 +1,12 @@ +db->driverName === 'mysql') { + // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci + $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + } + + $this->createTable('{{%user}}', [ + 'id' => $this->primaryKey(), + 'username' => $this->string()->notNull()->unique(), + 'auth_key' => $this->string(32)->notNull(), + 'password_hash' => $this->string()->notNull(), + 'password_reset_token' => $this->string()->unique(), + 'email' => $this->string()->notNull()->unique(), + + 'status' => $this->smallInteger()->notNull()->defaultValue(10), + 'created_at' => $this->integer()->notNull(), + 'updated_at' => $this->integer()->notNull(), + ], $tableOptions); + } + + public function down() + { + $this->dropTable('{{%user}}'); + } +} diff --git a/console/models/.gitkeep b/console/models/.gitkeep new file mode 100644 index 0000000..72e8ffc --- /dev/null +++ b/console/models/.gitkeep @@ -0,0 +1 @@ +* diff --git a/console/runtime/.gitignore b/console/runtime/.gitignore new file mode 100644 index 0000000..c96a04f --- /dev/null +++ b/console/runtime/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file diff --git a/init b/init new file mode 100644 index 0000000..7aaf086 --- /dev/null +++ b/init @@ -0,0 +1,299 @@ +#!/usr/bin/env php + + * + * @link http://www.yiiframework.com/ + * @copyright Copyright (c) 2008 Yii Software LLC + * @license http://www.yiiframework.com/license/ + */ + +if (!extension_loaded('openssl')) { + die('The OpenSSL PHP extension is required by Yii2.'); +} + +$params = getParams(); +$root = str_replace('\\', '/', __DIR__); +$envs = require("$root/environments/index.php"); +$envNames = array_keys($envs); + +echo "Yii Application Initialization Tool v1.0\n\n"; + +$envName = null; +if (empty($params['env']) || $params['env'] === '1') { + echo "Which environment do you want the application to be initialized in?\n\n"; + foreach ($envNames as $i => $name) { + echo " [$i] $name\n"; + } + echo "\n Your choice [0-" . (count($envs) - 1) . ', or "q" to quit] '; + $answer = trim(fgets(STDIN)); + + if (!ctype_digit($answer) || !in_array($answer, range(0, count($envs) - 1))) { + echo "\n Quit initialization.\n"; + exit(0); + } + + if (isset($envNames[$answer])) { + $envName = $envNames[$answer]; + } +} else { + $envName = $params['env']; +} + +if (!in_array($envName, $envNames)) { + $envsList = implode(', ', $envNames); + echo "\n $envName is not a valid environment. Try one of the following: $envsList. \n"; + exit(2); +} + +$env = $envs[$envName]; + +if (empty($params['env'])) { + echo "\n Initialize the application under '{$envNames[$answer]}' environment? [yes|no] "; + $answer = trim(fgets(STDIN)); + if (strncasecmp($answer, 'y', 1)) { + echo "\n Quit initialization.\n"; + exit(0); + } +} + +echo "\n Start initialization ...\n\n"; +$files = getFileList("$root/environments/{$env['path']}"); +if (isset($env['skipFiles'])) { + $skipFiles = $env['skipFiles']; + array_walk($skipFiles, function(&$value) use($env, $root) { $value = "$root/$value"; }); + $files = array_diff($files, array_intersect_key($env['skipFiles'], array_filter($skipFiles, 'file_exists'))); +} +$all = false; +foreach ($files as $file) { + if (!copyFile($root, "environments/{$env['path']}/$file", $file, $all, $params)) { + break; + } +} + +$callbacks = ['setCookieValidationKey', 'setWritable', 'setExecutable', 'createSymlink']; +foreach ($callbacks as $callback) { + if (!empty($env[$callback])) { + $callback($root, $env[$callback]); + } +} + +echo "\n ... initialization completed.\n\n"; + +function getFileList($root, $basePath = '') +{ + $files = []; + $handle = opendir($root); + while (($path = readdir($handle)) !== false) { + if ($path === '.git' || $path === '.svn' || $path === '.' || $path === '..') { + continue; + } + $fullPath = "$root/$path"; + $relativePath = $basePath === '' ? $path : "$basePath/$path"; + if (is_dir($fullPath)) { + $files = array_merge($files, getFileList($fullPath, $relativePath)); + } else { + $files[] = $relativePath; + } + } + closedir($handle); + return $files; +} + +function copyFile($root, $source, $target, &$all, $params) +{ + if (!is_file($root . '/' . $source)) { + echo " skip $target ($source not exist)\n"; + return true; + } + if (is_file($root . '/' . $target)) { + if (file_get_contents($root . '/' . $source) === file_get_contents($root . '/' . $target)) { + echo " unchanged $target\n"; + return true; + } + if ($all) { + echo " overwrite $target\n"; + } else { + echo " exist $target\n"; + echo " ...overwrite? [Yes|No|All|Quit] "; + + + $answer = !empty($params['overwrite']) ? $params['overwrite'] : trim(fgets(STDIN)); + if (!strncasecmp($answer, 'q', 1)) { + return false; + } else { + if (!strncasecmp($answer, 'y', 1)) { + echo " overwrite $target\n"; + } else { + if (!strncasecmp($answer, 'a', 1)) { + echo " overwrite $target\n"; + $all = true; + } else { + echo " skip $target\n"; + return true; + } + } + } + } + file_put_contents($root . '/' . $target, file_get_contents($root . '/' . $source)); + return true; + } + echo " generate $target\n"; + @mkdir(dirname($root . '/' . $target), 0777, true); + file_put_contents($root . '/' . $target, file_get_contents($root . '/' . $source)); + return true; +} + +function getParams() +{ + $rawParams = []; + if (isset($_SERVER['argv'])) { + $rawParams = $_SERVER['argv']; + array_shift($rawParams); + } + + $params = []; + foreach ($rawParams as $param) { + if (preg_match('/^--(\w+)(=(.*))?$/', $param, $matches)) { + $name = $matches[1]; + $params[$name] = isset($matches[3]) ? $matches[3] : true; + } else { + $params[] = $param; + } + } + return $params; +} + +function setWritable($root, $paths) +{ + foreach ($paths as $writable) { + if (is_dir("$root/$writable")) { + if (@chmod("$root/$writable", 0777)) { + echo " chmod 0777 $writable\n"; + } else { + printError("Operation chmod not permitted for directory $writable."); + } + } else { + printError("Directory $writable does not exist."); + } + } +} + +function setExecutable($root, $paths) +{ + foreach ($paths as $executable) { + if (file_exists("$root/$executable")) { + if (@chmod("$root/$executable", 0755)) { + echo " chmod 0755 $executable\n"; + } else { + printError("Operation chmod not permitted for $executable."); + } + } else { + printError("$executable does not exist."); + } + } +} + +function setCookieValidationKey($root, $paths) +{ + foreach ($paths as $file) { + echo " generate cookie validation key in $file\n"; + $file = $root . '/' . $file; + $length = 32; + $bytes = openssl_random_pseudo_bytes($length); + $key = strtr(substr(base64_encode($bytes), 0, $length), '+/=', '_-.'); + $content = preg_replace('/(("|\')cookieValidationKey("|\')\s*=>\s*)(""|\'\')/', "\\1'$key'", file_get_contents($file)); + file_put_contents($file, $content); + } +} + +function createSymlink($root, $links) +{ + foreach ($links as $link => $target) { + //first removing folders to avoid errors if the folder already exists + @rmdir($root . "/" . $link); + //next removing existing symlink in order to update the target + if (is_link($root . "/" . $link)) { + @unlink($root . "/" . $link); + } + if (@symlink($root . "/" . $target, $root . "/" . $link)) { + echo " symlink $root/$target $root/$link\n"; + } else { + printError("Cannot create symlink $root/$target $root/$link."); + } + } +} + +/** + * Prints error message. + * @param string $message message + */ +function printError($message) +{ + echo "\n " . formatMessage("Error. $message", ['fg-red']) . " \n"; +} + +/** + * Returns true if the stream supports colorization. ANSI colors are disabled if not supported by the stream. + * + * - windows without ansicon + * - not tty consoles + * + * @return boolean true if the stream supports ANSI colors, otherwise false. + */ +function ansiColorsSupported() +{ + return DIRECTORY_SEPARATOR === '\\' + ? getenv('ANSICON') !== false || getenv('ConEmuANSI') === 'ON' + : function_exists('posix_isatty') && @posix_isatty(STDOUT); +} + +/** + * Get ANSI code of style. + * @param string $name style name + * @return integer ANSI code of style. + */ +function getStyleCode($name) +{ + $styles = [ + 'bold' => 1, + 'fg-black' => 30, + 'fg-red' => 31, + 'fg-green' => 32, + 'fg-yellow' => 33, + 'fg-blue' => 34, + 'fg-magenta' => 35, + 'fg-cyan' => 36, + 'fg-white' => 37, + 'bg-black' => 40, + 'bg-red' => 41, + 'bg-green' => 42, + 'bg-yellow' => 43, + 'bg-blue' => 44, + 'bg-magenta' => 45, + 'bg-cyan' => 46, + 'bg-white' => 47, + ]; + return $styles[$name]; +} + +/** + * Formats message using styles if STDOUT supports it. + * @param string $message message + * @param string[] $styles styles + * @return string formatted message. + */ +function formatMessage($message, $styles) +{ + if (empty($styles) || !ansiColorsSupported()) { + return $message; + } + + return sprintf("\x1b[%sm", implode(';', array_map('getStyleCode', $styles))) . $message . "\x1b[0m"; +} diff --git a/init.bat b/init.bat new file mode 100644 index 0000000..e50c242 --- /dev/null +++ b/init.bat @@ -0,0 +1,20 @@ +@echo off + +rem ------------------------------------------------------------- +rem Yii command line init script for Windows. +rem +rem @author Qiang Xue +rem @link http://www.yiiframework.com/ +rem @copyright Copyright (c) 2008 Yii Software LLC +rem @license http://www.yiiframework.com/license/ +rem ------------------------------------------------------------- + +@setlocal + +set YII_PATH=%~dp0 + +if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe + +"%PHP_COMMAND%" "%YII_PATH%init" %* + +@endlocal diff --git a/requirements.php b/requirements.php new file mode 100644 index 0000000..62c731b --- /dev/null +++ b/requirements.php @@ -0,0 +1,132 @@ +Error'; + echo '

The path to yii framework seems to be incorrect.

'; + echo '

You need to install Yii framework via composer or adjust the framework path in file ' . basename(__FILE__) . '.

'; + echo '

Please refer to the README on how to install Yii.

'; +} + +require_once($frameworkPath . '/requirements/YiiRequirementChecker.php'); +$requirementsChecker = new YiiRequirementChecker(); + +$gdMemo = $imagickMemo = 'Either GD PHP extension with FreeType support or ImageMagick PHP extension with PNG support is required for image CAPTCHA.'; +$gdOK = $imagickOK = false; + +if (extension_loaded('imagick')) { + $imagick = new Imagick(); + $imagickFormats = $imagick->queryFormats('PNG'); + if (in_array('PNG', $imagickFormats)) { + $imagickOK = true; + } else { + $imagickMemo = 'Imagick extension should be installed with PNG support in order to be used for image CAPTCHA.'; + } +} + +if (extension_loaded('gd')) { + $gdInfo = gd_info(); + if (!empty($gdInfo['FreeType Support'])) { + $gdOK = true; + } else { + $gdMemo = 'GD extension should be installed with FreeType support in order to be used for image CAPTCHA.'; + } +} + +/** + * Adjust requirements according to your application specifics. + */ +$requirements = array( + // Database : + array( + 'name' => 'PDO extension', + 'mandatory' => true, + 'condition' => extension_loaded('pdo'), + 'by' => 'All DB-related classes', + ), + array( + 'name' => 'PDO SQLite extension', + 'mandatory' => false, + 'condition' => extension_loaded('pdo_sqlite'), + 'by' => 'All DB-related classes', + 'memo' => 'Required for SQLite database.', + ), + array( + 'name' => 'PDO MySQL extension', + 'mandatory' => false, + 'condition' => extension_loaded('pdo_mysql'), + 'by' => 'All DB-related classes', + 'memo' => 'Required for MySQL database.', + ), + array( + 'name' => 'PDO PostgreSQL extension', + 'mandatory' => false, + 'condition' => extension_loaded('pdo_pgsql'), + 'by' => 'All DB-related classes', + 'memo' => 'Required for PostgreSQL database.', + ), + // Cache : + array( + 'name' => 'Memcache extension', + 'mandatory' => false, + 'condition' => extension_loaded('memcache') || extension_loaded('memcached'), + 'by' => 'MemCache', + 'memo' => extension_loaded('memcached') ? 'To use memcached set MemCache::useMemcached to true.' : '' + ), + array( + 'name' => 'APC extension', + 'mandatory' => false, + 'condition' => extension_loaded('apc'), + 'by' => 'ApcCache', + ), + // CAPTCHA: + array( + 'name' => 'GD PHP extension with FreeType support', + 'mandatory' => false, + 'condition' => $gdOK, + 'by' => 'Captcha', + 'memo' => $gdMemo, + ), + array( + 'name' => 'ImageMagick PHP extension with PNG support', + 'mandatory' => false, + 'condition' => $imagickOK, + 'by' => 'Captcha', + 'memo' => $imagickMemo, + ), + // PHP ini : + 'phpExposePhp' => array( + 'name' => 'Expose PHP', + 'mandatory' => false, + 'condition' => $requirementsChecker->checkPhpIniOff("expose_php"), + 'by' => 'Security reasons', + 'memo' => '"expose_php" should be disabled at php.ini', + ), + 'phpAllowUrlInclude' => array( + 'name' => 'PHP allow url include', + 'mandatory' => false, + 'condition' => $requirementsChecker->checkPhpIniOff("allow_url_include"), + 'by' => 'Security reasons', + 'memo' => '"allow_url_include" should be disabled at php.ini', + ), + 'phpSmtp' => array( + 'name' => 'PHP mail SMTP', + 'mandatory' => false, + 'condition' => strlen(ini_get('SMTP')) > 0, + 'by' => 'Email sending', + 'memo' => 'PHP mail SMTP server required', + ), +); +$requirementsChecker->checkYii()->check($requirements)->render(); diff --git a/setimg.php b/setimg.php new file mode 100644 index 0000000..2322c02 --- /dev/null +++ b/setimg.php @@ -0,0 +1,19 @@ + +# Read more: https://github.com/blog/1509-personal-api-tokens +# You can generate it here: https://github.com/settings/tokens + +# Guest OS timezone +timezone: Europe/London + +# Are we need check box updates for every 'vagrant up'? +box_check_update: false + +# Virtual machine name +machine_name: y2aa + +# Virtual machine IP +ip: 192.168.83.137 + +# Virtual machine CPU cores number +cpus: 1 + +# Virtual machine RAM +memory: 512 diff --git a/vagrant/nginx/app.conf b/vagrant/nginx/app.conf new file mode 100644 index 0000000..fc8fe40 --- /dev/null +++ b/vagrant/nginx/app.conf @@ -0,0 +1,77 @@ +server { + charset utf-8; + client_max_body_size 128M; + sendfile off; + + listen 80; ## listen for ipv4 + #listen [::]:80 default_server ipv6only=on; ## listen for ipv6 + + server_name y2aa-frontend.dev; + root /app/frontend/web/; + index index.php; + + access_log /app/vagrant/nginx/log/frontend-access.log; + error_log /app/vagrant/nginx/log/frontend-error.log; + + location / { + # Redirect everything that isn't a real file to index.php + try_files $uri $uri/ /index.php$is_args$args; + } + + # uncomment to avoid processing of calls to non-existing static files by Yii + #location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ { + # try_files $uri =404; + #} + #error_page 404 /404.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + #fastcgi_pass 127.0.0.1:9000; + fastcgi_pass unix:/var/run/php5-fpm.sock; + try_files $uri =404; + } + + location ~ /\.(ht|svn|git) { + deny all; + } +} + +server { + charset utf-8; + client_max_body_size 128M; + sendfile off; + + listen 80; ## listen for ipv4 + #listen [::]:80 default_server ipv6only=on; ## listen for ipv6 + + server_name y2aa-backend.dev; + root /app/backend/web/; + index index.php; + + access_log /app/vagrant/nginx/log/backend-access.log; + error_log /app/vagrant/nginx/log/backend-error.log; + + location / { + # Redirect everything that isn't a real file to index.php + try_files $uri $uri/ /index.php$is_args$args; + } + + # uncomment to avoid processing of calls to non-existing static files by Yii + #location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ { + # try_files $uri =404; + #} + #error_page 404 /404.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + #fastcgi_pass 127.0.0.1:9000; + fastcgi_pass unix:/var/run/php5-fpm.sock; + try_files $uri =404; + } + + location ~ /\.(ht|svn|git) { + deny all; + } +} diff --git a/vagrant/nginx/log/.gitignore b/vagrant/nginx/log/.gitignore new file mode 100644 index 0000000..c15cedd --- /dev/null +++ b/vagrant/nginx/log/.gitignore @@ -0,0 +1,5 @@ +# nginx logs +backend-access.log +backend-error.log +frontend-access.log +frontend-error.log \ No newline at end of file diff --git a/vagrant/provision/always-as-root.sh b/vagrant/provision/always-as-root.sh new file mode 100644 index 0000000..f2465e7 --- /dev/null +++ b/vagrant/provision/always-as-root.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +#== Bash helpers == + +function info { + echo " " + echo "--> $1" + echo " " +} + +#== Provision script == + +info "Provision-script user: `whoami`" + +info "Restart web-stack" +service php5-fpm restart +service nginx restart +service mysql restart \ No newline at end of file diff --git a/vagrant/provision/once-as-root.sh b/vagrant/provision/once-as-root.sh new file mode 100644 index 0000000..1dd108c --- /dev/null +++ b/vagrant/provision/once-as-root.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash + +#== Import script args == + +timezone=$(echo "$1") + +#== Bash helpers == + +function info { + echo " " + echo "--> $1" + echo " " +} + +#== Provision script == + +info "Provision-script user: `whoami`" + +info "Allocate swap for MySQL 5.6" +fallocate -l 2048M /swapfile +chmod 600 /swapfile +mkswap /swapfile +swapon /swapfile +echo '/swapfile none swap defaults 0 0' >> /etc/fstab + +info "Configure locales" +update-locale LC_ALL="C" +dpkg-reconfigure locales + +info "Configure timezone" +echo ${timezone} | tee /etc/timezone +dpkg-reconfigure --frontend noninteractive tzdata + +info "Prepare root password for MySQL" +debconf-set-selections <<< "mysql-server-5.6 mysql-server/root_password password \"''\"" +debconf-set-selections <<< "mysql-server-5.6 mysql-server/root_password_again password \"''\"" +echo "Done!" + +info "Update OS software" +apt-get update +apt-get upgrade -y + +info "Install additional software" +apt-get install -y git php5-curl php5-cli php5-intl php5-mysqlnd php5-gd php5-fpm nginx mysql-server-5.6 + +info "Configure MySQL" +sed -i "s/.*bind-address.*/bind-address = 0.0.0.0/" /etc/mysql/my.cnf +echo "Done!" + +info "Configure PHP-FPM" +sed -i 's/user = www-data/user = vagrant/g' /etc/php5/fpm/pool.d/www.conf +sed -i 's/group = www-data/group = vagrant/g' /etc/php5/fpm/pool.d/www.conf +sed -i 's/owner = www-data/owner = vagrant/g' /etc/php5/fpm/pool.d/www.conf +echo "Done!" + +info "Configure NGINX" +sed -i 's/user www-data/user vagrant/g' /etc/nginx/nginx.conf +echo "Done!" + +info "Enabling site configuration" +ln -s /app/vagrant/nginx/app.conf /etc/nginx/sites-enabled/app.conf +echo "Done!" + +info "Initailize databases for MySQL" +mysql -uroot <<< "CREATE DATABASE yii2advanced" +mysql -uroot <<< "CREATE DATABASE yii2advanced_test" +echo "Done!" + +info "Install composer" +curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ No newline at end of file diff --git a/vagrant/provision/once-as-vagrant.sh b/vagrant/provision/once-as-vagrant.sh new file mode 100644 index 0000000..a9a5e33 --- /dev/null +++ b/vagrant/provision/once-as-vagrant.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash + +#== Import script args == + +github_token=$(echo "$1") + +#== Bash helpers == + +function info { + echo " " + echo "--> $1" + echo " " +} + +#== Provision script == + +info "Provision-script user: `whoami`" + +info "Configure composer" +composer config --global github-oauth.github.com ${github_token} +echo "Done!" + +info "Install plugins for composer" +composer global require "fxp/composer-asset-plugin:^1.2.0" --no-progress + +info "Install codeception" +composer global require "codeception/codeception=2.0.*" "codeception/specify=*" "codeception/verify=*" --no-progress +echo 'export PATH=/home/vagrant/.config/composer/vendor/bin:$PATH' | tee -a /home/vagrant/.profile + +info "Install project dependencies" +cd /app +composer --no-progress --prefer-dist install + +info "Init project" +./init --env=Development --overwrite=y + +info "Apply migrations" +./yii migrate <<< "yes" + +info "Create bash-alias 'app' for vagrant user" +echo 'alias app="cd /app"' | tee /home/vagrant/.bash_aliases + +info "Enabling colorized prompt for guest console" +sed -i "s/#force_color_prompt=yes/force_color_prompt=yes/" /home/vagrant/.bashrc diff --git a/web/admin/balance_list.html b/web/admin/balance_list.html new file mode 100644 index 0000000..1fdd917 --- /dev/null +++ b/web/admin/balance_list.html @@ -0,0 +1,194 @@ + + + + + + 预付款列表 + + + + + + + + + +
+
+ +
+
+ +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
订单编号预订时间订单类型预订产品支付金额出发时间联系人状态支付方式操作
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + +
充值单号充值时间充值金额支付类型
+
+
+
+
+
+
+ + +
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/web/admin/commission_details.html b/web/admin/commission_details.html new file mode 100644 index 0000000..ab5e319 --- /dev/null +++ b/web/admin/commission_details.html @@ -0,0 +1,175 @@ + + + + + + + 佣金明细 + + + + + + + + + +
+
+ +
+
+ + +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ +
+
+ + +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/web/admin/css/balance_list.css b/web/admin/css/balance_list.css new file mode 100644 index 0000000..659264d --- /dev/null +++ b/web/admin/css/balance_list.css @@ -0,0 +1,55 @@ +.table_box{ + border: 1px solid #ccc; + border-top: 0; +} + +.search_list_1{ + margin-bottom: 10px; +} + +.dis_search{ + margin: 30px; + padding: 10px; + background-color: #f7f7fc; +} + +.dis_middle{ + margin: 20px 50px 10px 30px; +} + +.float_r{ + float: right; +} + +.dis_table{ + margin: 0px 30px 10px 30px; + clear: both; +} + +.order_list{ + padding: 1px; +} + +.dis_middle { + margin: 20px 30px 10px 30px; + text-align: right; +} + +.search_name{ + display: inline-block; + width: 84px; + text-align: right; +} + +.input_width{ + width: 151px !important; +} + +.mar_r{ + margin-right: 10px; +} + +.pageDiv{ + text-align: right; + margin-right: 30px; +} diff --git a/web/admin/css/commission_details.css b/web/admin/css/commission_details.css new file mode 100644 index 0000000..8d5cf5d --- /dev/null +++ b/web/admin/css/commission_details.css @@ -0,0 +1,71 @@ +/*佣金明细css*/ +.table_box{ + border: 1px solid #ccc; + border-top: 0; +} +#commission_detail{ + padding: 1px; +} +.dis_search{ + margin: 30px 30px 10px 30px; + padding: 10px; + background-color: #f7f7fc; +} +.search_list_1{ + margin-bottom: 10px; +} +.search_name{ + display: inline-block; + width: 90px; + text-align: right; +} +.float_r{ + float: right; +} +.mar_r{ + margin-right: 10px; +} +.dis_table{ + margin: 10px 40px 30px 30px; +} + +.form_date_start,.form_date_end{ + width: 151px; +} + +.dis_middle { + margin: 10px 30px 10px 30px; + text-align: right; +} +.pageDiv{ + text-align: right; + margin-right: 30px; +} + + +/*overrid*/ +.combo-select { + position: relative; + max-width: 400px; + width: 151px; + height: 28px; + display: inline-block; + font: 100% Helvetica, Arial, Sans-serif; + border: 1px #ccc solid; + border-radius: 3px; +} +.combo-input { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + margin: 0; + text-overflow: ellipsis; + white-space: nowrap; + border: none; + width: 100%; + box-sizing: border-box; + padding: 6px; + padding-right: 60px; + border-radius: 3px; +} + diff --git a/web/admin/css/common/bootstrap-datetimepicker.min.css b/web/admin/css/common/bootstrap-datetimepicker.min.css new file mode 100644 index 0000000..78485fe --- /dev/null +++ b/web/admin/css/common/bootstrap-datetimepicker.min.css @@ -0,0 +1,9 @@ +/*! + * Datetimepicker for Bootstrap + * + * Copyright 2012 Stefan Petre + * Improvements by Andrew Rowls + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + */.datetimepicker{padding:4px;margin-top:1px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;direction:ltr}.datetimepicker-inline{width:220px}.datetimepicker.datetimepicker-rtl{direction:rtl}.datetimepicker.datetimepicker-rtl table tr td span{float:right}.datetimepicker-dropdown,.datetimepicker-dropdown-left{top:0;left:0}[class*=" datetimepicker-dropdown"]:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,0.2);position:absolute}[class*=" datetimepicker-dropdown"]:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute}[class*=" datetimepicker-dropdown-top"]:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;border-top-color:rgba(0,0,0,0.2);border-bottom:0}[class*=" datetimepicker-dropdown-top"]:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #fff;border-bottom:0}.datetimepicker-dropdown-bottom-left:before{top:-7px;right:6px}.datetimepicker-dropdown-bottom-left:after{top:-6px;right:7px}.datetimepicker-dropdown-bottom-right:before{top:-7px;left:6px}.datetimepicker-dropdown-bottom-right:after{top:-6px;left:7px}.datetimepicker-dropdown-top-left:before{bottom:-7px;right:6px}.datetimepicker-dropdown-top-left:after{bottom:-6px;right:7px}.datetimepicker-dropdown-top-right:before{bottom:-7px;left:6px}.datetimepicker-dropdown-top-right:after{bottom:-6px;left:7px}.datetimepicker>div{display:none}.datetimepicker.minutes div.datetimepicker-minutes{display:block}.datetimepicker.hours div.datetimepicker-hours{display:block}.datetimepicker.days div.datetimepicker-days{display:block}.datetimepicker.months div.datetimepicker-months{display:block}.datetimepicker.years div.datetimepicker-years{display:block}.datetimepicker table{margin:0}.datetimepicker td,.datetimepicker th{text-align:center;width:20px;height:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;border:0}.table-striped .datetimepicker table tr td,.table-striped .datetimepicker table tr th{background-color:transparent}.datetimepicker table tr td.minute:hover{background:#eee;cursor:pointer}.datetimepicker table tr td.hour:hover{background:#eee;cursor:pointer}.datetimepicker table tr td.day:hover{background:#eee;cursor:pointer}.datetimepicker table tr td.old,.datetimepicker table tr td.new{color:#999}.datetimepicker table tr td.disabled,.datetimepicker table tr td.disabled:hover{background:0;color:#999;cursor:default}.datetimepicker table tr td.today,.datetimepicker table tr td.today:hover,.datetimepicker table tr td.today.disabled,.datetimepicker table tr td.today.disabled:hover{background-color:#fde19a;background-image:-moz-linear-gradient(top,#fdd49a,#fdf59a);background-image:-ms-linear-gradient(top,#fdd49a,#fdf59a);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fdd49a),to(#fdf59a));background-image:-webkit-linear-gradient(top,#fdd49a,#fdf59a);background-image:-o-linear-gradient(top,#fdd49a,#fdf59a);background-image:linear-gradient(to bottom,#fdd49a,#fdf59a);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a',endColorstr='#fdf59a',GradientType=0);border-color:#fdf59a #fdf59a #fbed50;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.datetimepicker table tr td.today:hover,.datetimepicker table tr td.today:hover:hover,.datetimepicker table tr td.today.disabled:hover,.datetimepicker table tr td.today.disabled:hover:hover,.datetimepicker table tr td.today:active,.datetimepicker table tr td.today:hover:active,.datetimepicker table tr td.today.disabled:active,.datetimepicker table tr td.today.disabled:hover:active,.datetimepicker table tr td.today.active,.datetimepicker table tr td.today:hover.active,.datetimepicker table tr td.today.disabled.active,.datetimepicker table tr td.today.disabled:hover.active,.datetimepicker table tr td.today.disabled,.datetimepicker table tr td.today:hover.disabled,.datetimepicker table tr td.today.disabled.disabled,.datetimepicker table tr td.today.disabled:hover.disabled,.datetimepicker table tr td.today[disabled],.datetimepicker table tr td.today:hover[disabled],.datetimepicker table tr td.today.disabled[disabled],.datetimepicker table tr td.today.disabled:hover[disabled]{background-color:#fdf59a}.datetimepicker table tr td.today:active,.datetimepicker table tr td.today:hover:active,.datetimepicker table tr td.today.disabled:active,.datetimepicker table tr td.today.disabled:hover:active,.datetimepicker table tr td.today.active,.datetimepicker table tr td.today:hover.active,.datetimepicker table tr td.today.disabled.active,.datetimepicker table tr td.today.disabled:hover.active{background-color:#fbf069}.datetimepicker table tr td.active,.datetimepicker table tr td.active:hover,.datetimepicker table tr td.active.disabled,.datetimepicker table tr td.active.disabled:hover{background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-ms-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc',endColorstr='#0044cc',GradientType=0);border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.datetimepicker table tr td.active:hover,.datetimepicker table tr td.active:hover:hover,.datetimepicker table tr td.active.disabled:hover,.datetimepicker table tr td.active.disabled:hover:hover,.datetimepicker table tr td.active:active,.datetimepicker table tr td.active:hover:active,.datetimepicker table tr td.active.disabled:active,.datetimepicker table tr td.active.disabled:hover:active,.datetimepicker table tr td.active.active,.datetimepicker table tr td.active:hover.active,.datetimepicker table tr td.active.disabled.active,.datetimepicker table tr td.active.disabled:hover.active,.datetimepicker table tr td.active.disabled,.datetimepicker table tr td.active:hover.disabled,.datetimepicker table tr td.active.disabled.disabled,.datetimepicker table tr td.active.disabled:hover.disabled,.datetimepicker table tr td.active[disabled],.datetimepicker table tr td.active:hover[disabled],.datetimepicker table tr td.active.disabled[disabled],.datetimepicker table tr td.active.disabled:hover[disabled]{background-color:#04c}.datetimepicker table tr td.active:active,.datetimepicker table tr td.active:hover:active,.datetimepicker table tr td.active.disabled:active,.datetimepicker table tr td.active.disabled:hover:active,.datetimepicker table tr td.active.active,.datetimepicker table tr td.active:hover.active,.datetimepicker table tr td.active.disabled.active,.datetimepicker table tr td.active.disabled:hover.active{background-color:#039}.datetimepicker table tr td span{display:block;width:23%;height:54px;line-height:54px;float:left;margin:1%;cursor:pointer;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.datetimepicker .datetimepicker-hours span{height:26px;line-height:26px}.datetimepicker .datetimepicker-hours table tr td span.hour_am,.datetimepicker .datetimepicker-hours table tr td span.hour_pm{width:14.6%}.datetimepicker .datetimepicker-hours fieldset legend,.datetimepicker .datetimepicker-minutes fieldset legend{margin-bottom:inherit;line-height:30px}.datetimepicker .datetimepicker-minutes span{height:26px;line-height:26px}.datetimepicker table tr td span:hover{background:#eee}.datetimepicker table tr td span.disabled,.datetimepicker table tr td span.disabled:hover{background:0;color:#999;cursor:default}.datetimepicker table tr td span.active,.datetimepicker table tr td span.active:hover,.datetimepicker table tr td span.active.disabled,.datetimepicker table tr td span.active.disabled:hover{background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-ms-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc',endColorstr='#0044cc',GradientType=0);border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.datetimepicker table tr td span.active:hover,.datetimepicker table tr td span.active:hover:hover,.datetimepicker table tr td span.active.disabled:hover,.datetimepicker table tr td span.active.disabled:hover:hover,.datetimepicker table tr td span.active:active,.datetimepicker table tr td span.active:hover:active,.datetimepicker table tr td span.active.disabled:active,.datetimepicker table tr td span.active.disabled:hover:active,.datetimepicker table tr td span.active.active,.datetimepicker table tr td span.active:hover.active,.datetimepicker table tr td span.active.disabled.active,.datetimepicker table tr td span.active.disabled:hover.active,.datetimepicker table tr td span.active.disabled,.datetimepicker table tr td span.active:hover.disabled,.datetimepicker table tr td span.active.disabled.disabled,.datetimepicker table tr td span.active.disabled:hover.disabled,.datetimepicker table tr td span.active[disabled],.datetimepicker table tr td span.active:hover[disabled],.datetimepicker table tr td span.active.disabled[disabled],.datetimepicker table tr td span.active.disabled:hover[disabled]{background-color:#04c}.datetimepicker table tr td span.active:active,.datetimepicker table tr td span.active:hover:active,.datetimepicker table tr td span.active.disabled:active,.datetimepicker table tr td span.active.disabled:hover:active,.datetimepicker table tr td span.active.active,.datetimepicker table tr td span.active:hover.active,.datetimepicker table tr td span.active.disabled.active,.datetimepicker table tr td span.active.disabled:hover.active{background-color:#039}.datetimepicker table tr td span.old{color:#999}.datetimepicker th.switch{width:145px}.datetimepicker th span.glyphicon{pointer-events:none}.datetimepicker thead tr:first-child th,.datetimepicker tfoot th{cursor:pointer}.datetimepicker thead tr:first-child th:hover,.datetimepicker tfoot th:hover{background:#eee}.input-append.date .add-on i,.input-prepend.date .add-on i,.input-group.date .input-group-addon span{cursor:pointer;width:14px;height:14px} \ No newline at end of file diff --git a/web/admin/css/common/bootstrap.css b/web/admin/css/common/bootstrap.css new file mode 100644 index 0000000..da5201a --- /dev/null +++ b/web/admin/css/common/bootstrap.css @@ -0,0 +1,6328 @@ +/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ +html { + font-family: sans-serif; + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; +} +body { + margin: 0; +} +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} +audio, +canvas, +progress, +video { + display: inline-block; + vertical-align: baseline; +} +audio:not([controls]) { + display: none; + height: 0; +} +[hidden], +template { + display: none; +} +a { + background-color: transparent; +} +a:active, +a:hover { + outline: 0; +} +abbr[title] { + border-bottom: 1px dotted; +} +b, +strong { + font-weight: bold; +} +dfn { + font-style: italic; +} +h1 { + font-size: 2em; + margin: 0.67em 0; +} +mark { + background: #ff0; + color: #000; +} +small { + font-size: 80%; +} +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} +sup { + top: -0.5em; +} +sub { + bottom: -0.25em; +} +img { + border: 0; +} +svg:not(:root) { + overflow: hidden; +} +figure { + margin: 1em 40px; +} +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} +pre { + overflow: auto; +} +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} +button, +input, +optgroup, +select, +textarea { + color: inherit; + font: inherit; + margin: 0; +} +button { + overflow: visible; +} +button, +select { + text-transform: none; +} +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + cursor: pointer; +} +button[disabled], +html input[disabled] { + cursor: default; +} +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} +input { + line-height: normal; +} +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; + padding: 0; +} +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} +input[type="search"] { + -webkit-appearance: textfield; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + box-sizing: content-box; +} +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} +legend { + border: 0; + padding: 0; +} +textarea { + overflow: auto; +} +optgroup { + font-weight: bold; +} +table { + border-collapse: collapse; + border-spacing: 0; +} +td, +th { + padding: 0; +} +/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */ +@media print { + *, + *:before, + *:after { + background: transparent !important; + color: #000 !important; + box-shadow: none !important; + text-shadow: none !important; + } + a, + a:visited { + text-decoration: underline; + } + a[href]:after { + content: " (" attr(href) ")"; + } + abbr[title]:after { + content: " (" attr(title) ")"; + } + a[href^="#"]:after, + a[href^="javascript:"]:after { + content: ""; + } + pre, + blockquote { + border: 1px solid #999; + page-break-inside: avoid; + } + thead { + display: table-header-group; + } + tr, + img { + page-break-inside: avoid; + } + img { + max-width: 100% !important; + } + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + h2, + h3 { + page-break-after: avoid; + } + select { + background: #fff !important; + } + .navbar { + display: none; + } + .btn > .caret, + .dropup > .btn > .caret { + border-top-color: #000 !important; + } + .label { + border: 1px solid #000; + } + .table { + border-collapse: collapse !important; + } + .table td, + .table th { + background-color: #fff !important; + } + .table-bordered th, + .table-bordered td { + border: 1px solid #ddd !important; + } +} +@font-face { + font-family: 'Glyphicons Halflings'; + src: url('../fonts/glyphicons-halflings-regular.eot'); + src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); +} +.glyphicon { + position: relative; + top: 1px; + display: inline-block; + font-family: 'Glyphicons Halflings'; + font-style: normal; + font-weight: normal; + line-height: 1; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.glyphicon-asterisk:before { + content: "\2a"; +} +.glyphicon-plus:before { + content: "\2b"; +} +.glyphicon-euro:before, +.glyphicon-eur:before { + content: "\20ac"; +} +.glyphicon-minus:before { + content: "\2212"; +} +.glyphicon-cloud:before { + content: "\2601"; +} +.glyphicon-envelope:before { + content: "\2709"; +} +.glyphicon-pencil:before { + content: "\270f"; +} +.glyphicon-glass:before { + content: "\e001"; +} +.glyphicon-music:before { + content: "\e002"; +} +.glyphicon-search:before { + content: "\e003"; +} +.glyphicon-heart:before { + content: "\e005"; +} +.glyphicon-star:before { + content: "\e006"; +} +.glyphicon-star-empty:before { + content: "\e007"; +} +.glyphicon-user:before { + content: "\e008"; +} +.glyphicon-film:before { + content: "\e009"; +} +.glyphicon-th-large:before { + content: "\e010"; +} +.glyphicon-th:before { + content: "\e011"; +} +.glyphicon-th-list:before { + content: "\e012"; +} +.glyphicon-ok:before { + content: "\e013"; +} +.glyphicon-remove:before { + content: "\e014"; +} +.glyphicon-zoom-in:before { + content: "\e015"; +} +.glyphicon-zoom-out:before { + content: "\e016"; +} +.glyphicon-off:before { + content: "\e017"; +} +.glyphicon-signal:before { + content: "\e018"; +} +.glyphicon-cog:before { + content: "\e019"; +} +.glyphicon-trash:before { + content: "\e020"; +} +.glyphicon-home:before { + content: "\e021"; +} +.glyphicon-file:before { + content: "\e022"; +} +.glyphicon-time:before { + content: "\e023"; +} +.glyphicon-road:before { + content: "\e024"; +} +.glyphicon-download-alt:before { + content: "\e025"; +} +.glyphicon-download:before { + content: "\e026"; +} +.glyphicon-upload:before { + content: "\e027"; +} +.glyphicon-inbox:before { + content: "\e028"; +} +.glyphicon-play-circle:before { + content: "\e029"; +} +.glyphicon-repeat:before { + content: "\e030"; +} +.glyphicon-refresh:before { + content: "\e031"; +} +.glyphicon-list-alt:before { + content: "\e032"; +} +.glyphicon-lock:before { + content: "\e033"; +} +.glyphicon-flag:before { + content: "\e034"; +} +.glyphicon-headphones:before { + content: "\e035"; +} +.glyphicon-volume-off:before { + content: "\e036"; +} +.glyphicon-volume-down:before { + content: "\e037"; +} +.glyphicon-volume-up:before { + content: "\e038"; +} +.glyphicon-qrcode:before { + content: "\e039"; +} +.glyphicon-barcode:before { + content: "\e040"; +} +.glyphicon-tag:before { + content: "\e041"; +} +.glyphicon-tags:before { + content: "\e042"; +} +.glyphicon-book:before { + content: "\e043"; +} +.glyphicon-bookmark:before { + content: "\e044"; +} +.glyphicon-print:before { + content: "\e045"; +} +.glyphicon-camera:before { + content: "\e046"; +} +.glyphicon-font:before { + content: "\e047"; +} +.glyphicon-bold:before { + content: "\e048"; +} +.glyphicon-italic:before { + content: "\e049"; +} +.glyphicon-text-height:before { + content: "\e050"; +} +.glyphicon-text-width:before { + content: "\e051"; +} +.glyphicon-align-left:before { + content: "\e052"; +} +.glyphicon-align-center:before { + content: "\e053"; +} +.glyphicon-align-right:before { + content: "\e054"; +} +.glyphicon-align-justify:before { + content: "\e055"; +} +.glyphicon-list:before { + content: "\e056"; +} +.glyphicon-indent-left:before { + content: "\e057"; +} +.glyphicon-indent-right:before { + content: "\e058"; +} +.glyphicon-facetime-video:before { + content: "\e059"; +} +.glyphicon-picture:before { + content: "\e060"; +} +.glyphicon-map-marker:before { + content: "\e062"; +} +.glyphicon-adjust:before { + content: "\e063"; +} +.glyphicon-tint:before { + content: "\e064"; +} +.glyphicon-edit:before { + content: "\e065"; +} +.glyphicon-share:before { + content: "\e066"; +} +.glyphicon-check:before { + content: "\e067"; +} +.glyphicon-move:before { + content: "\e068"; +} +.glyphicon-step-backward:before { + content: "\e069"; +} +.glyphicon-fast-backward:before { + content: "\e070"; +} +.glyphicon-backward:before { + content: "\e071"; +} +.glyphicon-play:before { + content: "\e072"; +} +.glyphicon-pause:before { + content: "\e073"; +} +.glyphicon-stop:before { + content: "\e074"; +} +.glyphicon-forward:before { + content: "\e075"; +} +.glyphicon-fast-forward:before { + content: "\e076"; +} +.glyphicon-step-forward:before { + content: "\e077"; +} +.glyphicon-eject:before { + content: "\e078"; +} +.glyphicon-chevron-left:before { + content: "\e079"; +} +.glyphicon-chevron-right:before { + content: "\e080"; +} +.glyphicon-plus-sign:before { + content: "\e081"; +} +.glyphicon-minus-sign:before { + content: "\e082"; +} +.glyphicon-remove-sign:before { + content: "\e083"; +} +.glyphicon-ok-sign:before { + content: "\e084"; +} +.glyphicon-question-sign:before { + content: "\e085"; +} +.glyphicon-info-sign:before { + content: "\e086"; +} +.glyphicon-screenshot:before { + content: "\e087"; +} +.glyphicon-remove-circle:before { + content: "\e088"; +} +.glyphicon-ok-circle:before { + content: "\e089"; +} +.glyphicon-ban-circle:before { + content: "\e090"; +} +.glyphicon-arrow-left:before { + content: "\e091"; +} +.glyphicon-arrow-right:before { + content: "\e092"; +} +.glyphicon-arrow-up:before { + content: "\e093"; +} +.glyphicon-arrow-down:before { + content: "\e094"; +} +.glyphicon-share-alt:before { + content: "\e095"; +} +.glyphicon-resize-full:before { + content: "\e096"; +} +.glyphicon-resize-small:before { + content: "\e097"; +} +.glyphicon-exclamation-sign:before { + content: "\e101"; +} +.glyphicon-gift:before { + content: "\e102"; +} +.glyphicon-leaf:before { + content: "\e103"; +} +.glyphicon-fire:before { + content: "\e104"; +} +.glyphicon-eye-open:before { + content: "\e105"; +} +.glyphicon-eye-close:before { + content: "\e106"; +} +.glyphicon-warning-sign:before { + content: "\e107"; +} +.glyphicon-plane:before { + content: "\e108"; +} +.glyphicon-calendar:before { + content: "\e109"; +} +.glyphicon-random:before { + content: "\e110"; +} +.glyphicon-comment:before { + content: "\e111"; +} +.glyphicon-magnet:before { + content: "\e112"; +} +.glyphicon-chevron-up:before { + content: "\e113"; +} +.glyphicon-chevron-down:before { + content: "\e114"; +} +.glyphicon-retweet:before { + content: "\e115"; +} +.glyphicon-shopping-cart:before { + content: "\e116"; +} +.glyphicon-folder-close:before { + content: "\e117"; +} +.glyphicon-folder-open:before { + content: "\e118"; +} +.glyphicon-resize-vertical:before { + content: "\e119"; +} +.glyphicon-resize-horizontal:before { + content: "\e120"; +} +.glyphicon-hdd:before { + content: "\e121"; +} +.glyphicon-bullhorn:before { + content: "\e122"; +} +.glyphicon-bell:before { + content: "\e123"; +} +.glyphicon-certificate:before { + content: "\e124"; +} +.glyphicon-thumbs-up:before { + content: "\e125"; +} +.glyphicon-thumbs-down:before { + content: "\e126"; +} +.glyphicon-hand-right:before { + content: "\e127"; +} +.glyphicon-hand-left:before { + content: "\e128"; +} +.glyphicon-hand-up:before { + content: "\e129"; +} +.glyphicon-hand-down:before { + content: "\e130"; +} +.glyphicon-circle-arrow-right:before { + content: "\e131"; +} +.glyphicon-circle-arrow-left:before { + content: "\e132"; +} +.glyphicon-circle-arrow-up:before { + content: "\e133"; +} +.glyphicon-circle-arrow-down:before { + content: "\e134"; +} +.glyphicon-globe:before { + content: "\e135"; +} +.glyphicon-wrench:before { + content: "\e136"; +} +.glyphicon-tasks:before { + content: "\e137"; +} +.glyphicon-filter:before { + content: "\e138"; +} +.glyphicon-briefcase:before { + content: "\e139"; +} +.glyphicon-fullscreen:before { + content: "\e140"; +} +.glyphicon-dashboard:before { + content: "\e141"; +} +.glyphicon-paperclip:before { + content: "\e142"; +} +.glyphicon-heart-empty:before { + content: "\e143"; +} +.glyphicon-link:before { + content: "\e144"; +} +.glyphicon-phone:before { + content: "\e145"; +} +.glyphicon-pushpin:before { + content: "\e146"; +} +.glyphicon-usd:before { + content: "\e148"; +} +.glyphicon-gbp:before { + content: "\e149"; +} +.glyphicon-sort:before { + content: "\e150"; +} +.glyphicon-sort-by-alphabet:before { + content: "\e151"; +} +.glyphicon-sort-by-alphabet-alt:before { + content: "\e152"; +} +.glyphicon-sort-by-order:before { + content: "\e153"; +} +.glyphicon-sort-by-order-alt:before { + content: "\e154"; +} +.glyphicon-sort-by-attributes:before { + content: "\e155"; +} +.glyphicon-sort-by-attributes-alt:before { + content: "\e156"; +} +.glyphicon-unchecked:before { + content: "\e157"; +} +.glyphicon-expand:before { + content: "\e158"; +} +.glyphicon-collapse-down:before { + content: "\e159"; +} +.glyphicon-collapse-up:before { + content: "\e160"; +} +.glyphicon-log-in:before { + content: "\e161"; +} +.glyphicon-flash:before { + content: "\e162"; +} +.glyphicon-log-out:before { + content: "\e163"; +} +.glyphicon-new-window:before { + content: "\e164"; +} +.glyphicon-record:before { + content: "\e165"; +} +.glyphicon-save:before { + content: "\e166"; +} +.glyphicon-open:before { + content: "\e167"; +} +.glyphicon-saved:before { + content: "\e168"; +} +.glyphicon-import:before { + content: "\e169"; +} +.glyphicon-export:before { + content: "\e170"; +} +.glyphicon-send:before { + content: "\e171"; +} +.glyphicon-floppy-disk:before { + content: "\e172"; +} +.glyphicon-floppy-saved:before { + content: "\e173"; +} +.glyphicon-floppy-remove:before { + content: "\e174"; +} +.glyphicon-floppy-save:before { + content: "\e175"; +} +.glyphicon-floppy-open:before { + content: "\e176"; +} +.glyphicon-credit-card:before { + content: "\e177"; +} +.glyphicon-transfer:before { + content: "\e178"; +} +.glyphicon-cutlery:before { + content: "\e179"; +} +.glyphicon-header:before { + content: "\e180"; +} +.glyphicon-compressed:before { + content: "\e181"; +} +.glyphicon-earphone:before { + content: "\e182"; +} +.glyphicon-phone-alt:before { + content: "\e183"; +} +.glyphicon-tower:before { + content: "\e184"; +} +.glyphicon-stats:before { + content: "\e185"; +} +.glyphicon-sd-video:before { + content: "\e186"; +} +.glyphicon-hd-video:before { + content: "\e187"; +} +.glyphicon-subtitles:before { + content: "\e188"; +} +.glyphicon-sound-stereo:before { + content: "\e189"; +} +.glyphicon-sound-dolby:before { + content: "\e190"; +} +.glyphicon-sound-5-1:before { + content: "\e191"; +} +.glyphicon-sound-6-1:before { + content: "\e192"; +} +.glyphicon-sound-7-1:before { + content: "\e193"; +} +.glyphicon-copyright-mark:before { + content: "\e194"; +} +.glyphicon-registration-mark:before { + content: "\e195"; +} +.glyphicon-cloud-download:before { + content: "\e197"; +} +.glyphicon-cloud-upload:before { + content: "\e198"; +} +.glyphicon-tree-conifer:before { + content: "\e199"; +} +.glyphicon-tree-deciduous:before { + content: "\e200"; +} +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +*:before, +*:after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +html { + font-size: 10px; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} +body { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 12px; + line-height: 1.18; + color: #333333; + background-color: #ffffff; +} +input, +button, +select, +textarea { + font-family: inherit; + font-size: inherit; + line-height: inherit; +} +a { + color: #0088cc; + text-decoration: none; + cursor: pointer; +} +a:hover, +a:focus { + color: #005580; + text-decoration: underline; +} +a:focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +figure { + margin: 0; +} +img { + vertical-align: middle; +} +.img-responsive, +.thumbnail > img, +.thumbnail a > img, +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + display: block; + max-width: 100%; + height: auto; +} +.img-rounded { + border-radius: 6px; +} +.img-thumbnail { + padding: 4px; + line-height: 1.18; + background-color: #ffffff; + border: 1px solid #dddddd; + border-radius: 4px; + -webkit-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; + display: inline-block; + max-width: 100%; + height: auto; +} +.img-circle { + border-radius: 50%; +} +hr { + margin-top: 14px; + margin-bottom: 14px; + border: 0; + border-top: 1px solid #eeeeee; +} +.sr-only { + position: absolute; + width: 1px; + height: 1px; + margin: -1px; + padding: 0; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; +} +.sr-only-focusable:active, +.sr-only-focusable:focus { + position: static; + width: auto; + height: auto; + margin: 0; + overflow: visible; + clip: auto; +} +h1, +h2, +h3, +h4, +h5, +h6, +.h1, +.h2, +.h3, +.h4, +.h5, +.h6 { + font-family: inherit; + font-weight: 500; + line-height: 1.1; + color: inherit; +} +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small, +.h1 small, +.h2 small, +.h3 small, +.h4 small, +.h5 small, +.h6 small, +h1 .small, +h2 .small, +h3 .small, +h4 .small, +h5 .small, +h6 .small, +.h1 .small, +.h2 .small, +.h3 .small, +.h4 .small, +.h5 .small, +.h6 .small { + font-weight: normal; + line-height: 1; + color: #777777; +} +h1, +.h1, +h2, +.h2, +h3, +.h3 { + margin-top: 14px; + margin-bottom: 7px; +} +h1 small, +.h1 small, +h2 small, +.h2 small, +h3 small, +.h3 small, +h1 .small, +.h1 .small, +h2 .small, +.h2 .small, +h3 .small, +.h3 .small { + font-size: 65%; +} +h4, +.h4, +h5, +.h5, +h6, +.h6 { + margin-top: 7px; + margin-bottom: 7px; +} +h4 small, +.h4 small, +h5 small, +.h5 small, +h6 small, +.h6 small, +h4 .small, +.h4 .small, +h5 .small, +.h5 .small, +h6 .small, +.h6 .small { + font-size: 75%; +} +h1, +.h1 { + font-size: 31px; +} +h2, +.h2 { + font-size: 25px; +} +h3, +.h3 { + font-size: 21px; +} +h4, +.h4 { + font-size: 15px; +} +h5, +.h5 { + font-size: 12px; +} +h6, +.h6 { + font-size: 11px; +} +p { + margin: 0 0 7px; +} +.lead { + margin-bottom: 14px; + font-size: 13px; + font-weight: 300; + line-height: 1.4; +} +@media (min-width: 768px) { + .lead { + font-size: 18px; + } +} +small, +.small { + font-size: 91%; +} +mark, +.mark { + background-color: #fcf8e3; + padding: .2em; +} +.text-left { + text-align: left; +} +.text-right { + text-align: right; +} +.text-center { + text-align: center; +} +.text-justify { + text-align: justify; +} +.text-nowrap { + white-space: nowrap; +} +.text-lowercase { + text-transform: lowercase; +} +.text-uppercase { + text-transform: uppercase; +} +.text-capitalize { + text-transform: capitalize; +} +.text-muted { + color: #777777; +} +.text-primary { + color: #afe0dc; +} +a.text-primary:hover { + color: #8ad2cc; +} +.text-success { + color: #3c763d; +} +a.text-success:hover { + color: #2b542c; +} +.text-info { + color: #31708f; +} +a.text-info:hover { + color: #245269; +} +.text-warning { + color: #8a6d3b; +} +a.text-warning:hover { + color: #66512c; +} +.text-danger { + color: #a94442; +} +a.text-danger:hover { + color: #843534; +} +.bg-primary { + color: #fff; + background-color: #afe0dc; +} +a.bg-primary:hover { + background-color: #8ad2cc; +} +.bg-success { + background-color: #dff0d8; +} +a.bg-success:hover { + background-color: #c1e2b3; +} +.bg-info { + background-color: #d9edf7; +} +a.bg-info:hover { + background-color: #afd9ee; +} +.bg-warning { + background-color: #fcf8e3; +} +a.bg-warning:hover { + background-color: #f7ecb5; +} +.bg-danger { + background-color: #f2dede; +} +a.bg-danger:hover { + background-color: #e4b9b9; +} +.page-header { + padding-bottom: 6px; + margin: 28px 0 14px; + border-bottom: 1px solid #eeeeee; +} +ul, +ol { + margin-top: 0; + margin-bottom: 7px; +} +ul ul, +ol ul, +ul ol, +ol ol { + margin-bottom: 0; +} +.list-unstyled { + padding-left: 0; + list-style: none; +} +.list-inline { + padding-left: 0; + list-style: none; + margin-left: -5px; +} +.list-inline > li { + display: inline-block; + padding-left: 5px; + padding-right: 5px; +} +dl { + margin-top: 0; + margin-bottom: 14px; +} +dt, +dd { + line-height: 1.18; +} +dt { + font-weight: bold; +} +dd { + margin-left: 0; +} +@media (min-width: 768px) { + .dl-horizontal dt { + float: left; + width: 160px; + clear: left; + text-align: right; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + .dl-horizontal dd { + margin-left: 180px; + } +} +abbr[title], +abbr[data-original-title] { + cursor: help; + border-bottom: 1px dotted #777777; +} +.initialism { + font-size: 90%; + text-transform: uppercase; +} +blockquote { + padding: 7px 14px; + margin: 0 0 14px; + font-size: 15px; + border-left: 5px solid #eeeeee; +} +blockquote p:last-child, +blockquote ul:last-child, +blockquote ol:last-child { + margin-bottom: 0; +} +blockquote footer, +blockquote small, +blockquote .small { + display: block; + font-size: 80%; + line-height: 1.18; + color: #777777; +} +blockquote footer:before, +blockquote small:before, +blockquote .small:before { + content: '\2014 \00A0'; +} +.blockquote-reverse, +blockquote.pull-right { + padding-right: 15px; + padding-left: 0; + border-right: 5px solid #eeeeee; + border-left: 0; + text-align: right; +} +.blockquote-reverse footer:before, +blockquote.pull-right footer:before, +.blockquote-reverse small:before, +blockquote.pull-right small:before, +.blockquote-reverse .small:before, +blockquote.pull-right .small:before { + content: ''; +} +.blockquote-reverse footer:after, +blockquote.pull-right footer:after, +.blockquote-reverse small:after, +blockquote.pull-right small:after, +.blockquote-reverse .small:after, +blockquote.pull-right .small:after { + content: '\00A0 \2014'; +} +address { + margin-bottom: 14px; + font-style: normal; + line-height: 1.18; +} +code, +kbd, +pre, +samp { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; +} +code { + padding: 2px 4px; + font-size: 90%; + color: #c7254e; + background-color: #f9f2f4; + border-radius: 4px; +} +kbd { + padding: 2px 4px; + font-size: 90%; + color: #ffffff; + background-color: #333333; + border-radius: 3px; + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25); +} +kbd kbd { + padding: 0; + font-size: 100%; + font-weight: bold; + box-shadow: none; +} +pre { + display: block; + padding: 6.5px; + margin: 0 0 7px; + font-size: 11px; + line-height: 1.18; + word-break: break-all; + word-wrap: break-word; + color: #333333; + background-color: #f5f5f5; + border: 1px solid #cccccc; + border-radius: 4px; +} +pre code { + padding: 0; + font-size: inherit; + color: inherit; + white-space: pre-wrap; + background-color: transparent; + border-radius: 0; +} +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} +.container { + margin-right: auto; + margin-left: auto; + padding-left: 15px; + padding-right: 15px; +} +@media (min-width: 768px) { + .container { + width: 750px; + } +} +@media (min-width: 992px) { + .container { + width: 970px; + } +} +@media (min-width: 1200px) { + .container { + width: 1170px; + } +} +.container-fluid { + margin-right: auto; + margin-left: auto; + padding-left: 15px; + padding-right: 15px; +} +.row { + margin-left: -15px; + margin-right: -15px; +} +.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { + position: relative; + min-height: 1px; + padding-left: 15px; + padding-right: 15px; +} +.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { + float: left; +} +.col-xs-12 { + width: 100%; +} +.col-xs-11 { + width: 91.66666667%; +} +.col-xs-10 { + width: 83.33333333%; +} +.col-xs-9 { + width: 75%; +} +.col-xs-8 { + width: 66.66666667%; +} +.col-xs-7 { + width: 58.33333333%; +} +.col-xs-6 { + width: 50%; +} +.col-xs-5 { + width: 41.66666667%; +} +.col-xs-4 { + width: 33.33333333%; +} +.col-xs-3 { + width: 25%; +} +.col-xs-2 { + width: 16.66666667%; +} +.col-xs-1 { + width: 8.33333333%; +} +.col-xs-pull-12 { + right: 100%; +} +.col-xs-pull-11 { + right: 91.66666667%; +} +.col-xs-pull-10 { + right: 83.33333333%; +} +.col-xs-pull-9 { + right: 75%; +} +.col-xs-pull-8 { + right: 66.66666667%; +} +.col-xs-pull-7 { + right: 58.33333333%; +} +.col-xs-pull-6 { + right: 50%; +} +.col-xs-pull-5 { + right: 41.66666667%; +} +.col-xs-pull-4 { + right: 33.33333333%; +} +.col-xs-pull-3 { + right: 25%; +} +.col-xs-pull-2 { + right: 16.66666667%; +} +.col-xs-pull-1 { + right: 8.33333333%; +} +.col-xs-pull-0 { + right: auto; +} +.col-xs-push-12 { + left: 100%; +} +.col-xs-push-11 { + left: 91.66666667%; +} +.col-xs-push-10 { + left: 83.33333333%; +} +.col-xs-push-9 { + left: 75%; +} +.col-xs-push-8 { + left: 66.66666667%; +} +.col-xs-push-7 { + left: 58.33333333%; +} +.col-xs-push-6 { + left: 50%; +} +.col-xs-push-5 { + left: 41.66666667%; +} +.col-xs-push-4 { + left: 33.33333333%; +} +.col-xs-push-3 { + left: 25%; +} +.col-xs-push-2 { + left: 16.66666667%; +} +.col-xs-push-1 { + left: 8.33333333%; +} +.col-xs-push-0 { + left: auto; +} +.col-xs-offset-12 { + margin-left: 100%; +} +.col-xs-offset-11 { + margin-left: 91.66666667%; +} +.col-xs-offset-10 { + margin-left: 83.33333333%; +} +.col-xs-offset-9 { + margin-left: 75%; +} +.col-xs-offset-8 { + margin-left: 66.66666667%; +} +.col-xs-offset-7 { + margin-left: 58.33333333%; +} +.col-xs-offset-6 { + margin-left: 50%; +} +.col-xs-offset-5 { + margin-left: 41.66666667%; +} +.col-xs-offset-4 { + margin-left: 33.33333333%; +} +.col-xs-offset-3 { + margin-left: 25%; +} +.col-xs-offset-2 { + margin-left: 16.66666667%; +} +.col-xs-offset-1 { + margin-left: 8.33333333%; +} +.col-xs-offset-0 { + margin-left: 0%; +} +@media (min-width: 768px) { + .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { + float: left; + } + .col-sm-12 { + width: 100%; + } + .col-sm-11 { + width: 91.66666667%; + } + .col-sm-10 { + width: 83.33333333%; + } + .col-sm-9 { + width: 75%; + } + .col-sm-8 { + width: 66.66666667%; + } + .col-sm-7 { + width: 58.33333333%; + } + .col-sm-6 { + width: 50%; + } + .col-sm-5 { + width: 41.66666667%; + } + .col-sm-4 { + width: 33.33333333%; + } + .col-sm-3 { + width: 25%; + } + .col-sm-2 { + width: 16.66666667%; + } + .col-sm-1 { + width: 8.33333333%; + } + .col-sm-pull-12 { + right: 100%; + } + .col-sm-pull-11 { + right: 91.66666667%; + } + .col-sm-pull-10 { + right: 83.33333333%; + } + .col-sm-pull-9 { + right: 75%; + } + .col-sm-pull-8 { + right: 66.66666667%; + } + .col-sm-pull-7 { + right: 58.33333333%; + } + .col-sm-pull-6 { + right: 50%; + } + .col-sm-pull-5 { + right: 41.66666667%; + } + .col-sm-pull-4 { + right: 33.33333333%; + } + .col-sm-pull-3 { + right: 25%; + } + .col-sm-pull-2 { + right: 16.66666667%; + } + .col-sm-pull-1 { + right: 8.33333333%; + } + .col-sm-pull-0 { + right: auto; + } + .col-sm-push-12 { + left: 100%; + } + .col-sm-push-11 { + left: 91.66666667%; + } + .col-sm-push-10 { + left: 83.33333333%; + } + .col-sm-push-9 { + left: 75%; + } + .col-sm-push-8 { + left: 66.66666667%; + } + .col-sm-push-7 { + left: 58.33333333%; + } + .col-sm-push-6 { + left: 50%; + } + .col-sm-push-5 { + left: 41.66666667%; + } + .col-sm-push-4 { + left: 33.33333333%; + } + .col-sm-push-3 { + left: 25%; + } + .col-sm-push-2 { + left: 16.66666667%; + } + .col-sm-push-1 { + left: 8.33333333%; + } + .col-sm-push-0 { + left: auto; + } + .col-sm-offset-12 { + margin-left: 100%; + } + .col-sm-offset-11 { + margin-left: 91.66666667%; + } + .col-sm-offset-10 { + margin-left: 83.33333333%; + } + .col-sm-offset-9 { + margin-left: 75%; + } + .col-sm-offset-8 { + margin-left: 66.66666667%; + } + .col-sm-offset-7 { + margin-left: 58.33333333%; + } + .col-sm-offset-6 { + margin-left: 50%; + } + .col-sm-offset-5 { + margin-left: 41.66666667%; + } + .col-sm-offset-4 { + margin-left: 33.33333333%; + } + .col-sm-offset-3 { + margin-left: 25%; + } + .col-sm-offset-2 { + margin-left: 16.66666667%; + } + .col-sm-offset-1 { + margin-left: 8.33333333%; + } + .col-sm-offset-0 { + margin-left: 0%; + } +} +@media (min-width: 992px) { + .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { + float: left; + } + .col-md-12 { + width: 100%; + } + .col-md-11 { + width: 91.66666667%; + } + .col-md-10 { + width: 83.33333333%; + } + .col-md-9 { + width: 75%; + } + .col-md-8 { + width: 66.66666667%; + } + .col-md-7 { + width: 58.33333333%; + } + .col-md-6 { + width: 50%; + } + .col-md-5 { + width: 41.66666667%; + } + .col-md-4 { + width: 33.33333333%; + } + .col-md-3 { + width: 25%; + } + .col-md-2 { + width: 16.66666667%; + } + .col-md-1 { + width: 8.33333333%; + } + .col-md-pull-12 { + right: 100%; + } + .col-md-pull-11 { + right: 91.66666667%; + } + .col-md-pull-10 { + right: 83.33333333%; + } + .col-md-pull-9 { + right: 75%; + } + .col-md-pull-8 { + right: 66.66666667%; + } + .col-md-pull-7 { + right: 58.33333333%; + } + .col-md-pull-6 { + right: 50%; + } + .col-md-pull-5 { + right: 41.66666667%; + } + .col-md-pull-4 { + right: 33.33333333%; + } + .col-md-pull-3 { + right: 25%; + } + .col-md-pull-2 { + right: 16.66666667%; + } + .col-md-pull-1 { + right: 8.33333333%; + } + .col-md-pull-0 { + right: auto; + } + .col-md-push-12 { + left: 100%; + } + .col-md-push-11 { + left: 91.66666667%; + } + .col-md-push-10 { + left: 83.33333333%; + } + .col-md-push-9 { + left: 75%; + } + .col-md-push-8 { + left: 66.66666667%; + } + .col-md-push-7 { + left: 58.33333333%; + } + .col-md-push-6 { + left: 50%; + } + .col-md-push-5 { + left: 41.66666667%; + } + .col-md-push-4 { + left: 33.33333333%; + } + .col-md-push-3 { + left: 25%; + } + .col-md-push-2 { + left: 16.66666667%; + } + .col-md-push-1 { + left: 8.33333333%; + } + .col-md-push-0 { + left: auto; + } + .col-md-offset-12 { + margin-left: 100%; + } + .col-md-offset-11 { + margin-left: 91.66666667%; + } + .col-md-offset-10 { + margin-left: 83.33333333%; + } + .col-md-offset-9 { + margin-left: 75%; + } + .col-md-offset-8 { + margin-left: 66.66666667%; + } + .col-md-offset-7 { + margin-left: 58.33333333%; + } + .col-md-offset-6 { + margin-left: 50%; + } + .col-md-offset-5 { + margin-left: 41.66666667%; + } + .col-md-offset-4 { + margin-left: 33.33333333%; + } + .col-md-offset-3 { + margin-left: 25%; + } + .col-md-offset-2 { + margin-left: 16.66666667%; + } + .col-md-offset-1 { + margin-left: 8.33333333%; + } + .col-md-offset-0 { + margin-left: 0%; + } +} +@media (min-width: 1200px) { + .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { + float: left; + } + .col-lg-12 { + width: 100%; + } + .col-lg-11 { + width: 91.66666667%; + } + .col-lg-10 { + width: 83.33333333%; + } + .col-lg-9 { + width: 75%; + } + .col-lg-8 { + width: 66.66666667%; + } + .col-lg-7 { + width: 58.33333333%; + } + .col-lg-6 { + width: 50%; + } + .col-lg-5 { + width: 41.66666667%; + } + .col-lg-4 { + width: 33.33333333%; + } + .col-lg-3 { + width: 25%; + } + .col-lg-2 { + width: 16.66666667%; + } + .col-lg-1 { + width: 8.33333333%; + } + .col-lg-pull-12 { + right: 100%; + } + .col-lg-pull-11 { + right: 91.66666667%; + } + .col-lg-pull-10 { + right: 83.33333333%; + } + .col-lg-pull-9 { + right: 75%; + } + .col-lg-pull-8 { + right: 66.66666667%; + } + .col-lg-pull-7 { + right: 58.33333333%; + } + .col-lg-pull-6 { + right: 50%; + } + .col-lg-pull-5 { + right: 41.66666667%; + } + .col-lg-pull-4 { + right: 33.33333333%; + } + .col-lg-pull-3 { + right: 25%; + } + .col-lg-pull-2 { + right: 16.66666667%; + } + .col-lg-pull-1 { + right: 8.33333333%; + } + .col-lg-pull-0 { + right: auto; + } + .col-lg-push-12 { + left: 100%; + } + .col-lg-push-11 { + left: 91.66666667%; + } + .col-lg-push-10 { + left: 83.33333333%; + } + .col-lg-push-9 { + left: 75%; + } + .col-lg-push-8 { + left: 66.66666667%; + } + .col-lg-push-7 { + left: 58.33333333%; + } + .col-lg-push-6 { + left: 50%; + } + .col-lg-push-5 { + left: 41.66666667%; + } + .col-lg-push-4 { + left: 33.33333333%; + } + .col-lg-push-3 { + left: 25%; + } + .col-lg-push-2 { + left: 16.66666667%; + } + .col-lg-push-1 { + left: 8.33333333%; + } + .col-lg-push-0 { + left: auto; + } + .col-lg-offset-12 { + margin-left: 100%; + } + .col-lg-offset-11 { + margin-left: 91.66666667%; + } + .col-lg-offset-10 { + margin-left: 83.33333333%; + } + .col-lg-offset-9 { + margin-left: 75%; + } + .col-lg-offset-8 { + margin-left: 66.66666667%; + } + .col-lg-offset-7 { + margin-left: 58.33333333%; + } + .col-lg-offset-6 { + margin-left: 50%; + } + .col-lg-offset-5 { + margin-left: 41.66666667%; + } + .col-lg-offset-4 { + margin-left: 33.33333333%; + } + .col-lg-offset-3 { + margin-left: 25%; + } + .col-lg-offset-2 { + margin-left: 16.66666667%; + } + .col-lg-offset-1 { + margin-left: 8.33333333%; + } + .col-lg-offset-0 { + margin-left: 0%; + } +} +table { + background-color: transparent; +} +caption { + padding-top: 8px; + padding-bottom: 8px; + color: #777777; + text-align: left; +} +th { + text-align: left; +} +.table { + width: 100%; + max-width: 100%; + min-width: 880px; +} +.table > thead > tr > th, +.table > tbody > tr > th, +.table > tfoot > tr > th, +.table > thead > tr > td, +.table > tbody > tr > td, +.table > tfoot > tr > td { + padding: 8px; + line-height: 1.18; + vertical-align: middle; + border-top: 1px solid #e7ecf1; +} +.table > thead > tr > th:last-child, +.table > tbody > tr > th:last-child, +.table > tfoot > tr > th:last-child, +.table > thead > tr > td:last-child, +.table > tbody > tr > td:last-child, +.table > tfoot > tr > td:last-child { + border-right: 0; +} +.table > thead > tr > th { + vertical-align: middle; + border-bottom: 1px solid #e7ecf1; +} +.table > caption + thead > tr:first-child > th, +.table > colgroup + thead > tr:first-child > th, +.table > thead:first-child > tr:first-child > th, +.table > caption + thead > tr:first-child > td, +.table > colgroup + thead > tr:first-child > td, +.table > thead:first-child > tr:first-child > td { + border-top: 0; +} +.table > tbody + tbody { + border-top: 2px solid #e7ecf1; +} +.table .table { + background-color: #ffffff; +} +.table-condensed > thead > tr > th, +.table-condensed > tbody > tr > th, +.table-condensed > tfoot > tr > th, +.table-condensed > thead > tr > td, +.table-condensed > tbody > tr > td, +.table-condensed > tfoot > tr > td { + padding: 5px; +} +.table-bordered > thead > tr > th, +.table-bordered > tbody > tr > th, +.table-bordered > tfoot > tr > th, +.table-bordered > thead > tr > td, +.table-bordered > tbody > tr > td, +.table-bordered > tfoot > tr > td { + border-right: 1px solid #e7ecf1; +} +.table-striped > tbody > tr:nth-child(odd) { + background-color: #fbfcfd; +} +.table-hover > tbody > tr:hover { + background-color: #f3f4f6; +} +table col[class*="col-"] { + position: static; + float: none; + display: table-column; +} +table td[class*="col-"], +table th[class*="col-"] { + position: static; + float: none; + display: table-cell; +} +.table > thead > tr > td.active, +.table > tbody > tr > td.active, +.table > tfoot > tr > td.active, +.table > thead > tr > th.active, +.table > tbody > tr > th.active, +.table > tfoot > tr > th.active, +.table > thead > tr.active > td, +.table > tbody > tr.active > td, +.table > tfoot > tr.active > td, +.table > thead > tr.active > th, +.table > tbody > tr.active > th, +.table > tfoot > tr.active > th { + background-color: #f3f4f6; +} +.table-hover > tbody > tr > td.active:hover, +.table-hover > tbody > tr > th.active:hover, +.table-hover > tbody > tr.active:hover > td, +.table-hover > tbody > tr:hover > .active, +.table-hover > tbody > tr.active:hover > th { + background-color: #e4e7eb; +} +.table > thead > tr > td.success, +.table > tbody > tr > td.success, +.table > tfoot > tr > td.success, +.table > thead > tr > th.success, +.table > tbody > tr > th.success, +.table > tfoot > tr > th.success, +.table > thead > tr.success > td, +.table > tbody > tr.success > td, +.table > tfoot > tr.success > td, +.table > thead > tr.success > th, +.table > tbody > tr.success > th, +.table > tfoot > tr.success > th { + background-color: #dff0d8; +} +.table-hover > tbody > tr > td.success:hover, +.table-hover > tbody > tr > th.success:hover, +.table-hover > tbody > tr.success:hover > td, +.table-hover > tbody > tr:hover > .success, +.table-hover > tbody > tr.success:hover > th { + background-color: #d0e9c6; +} +.table > thead > tr > td.info, +.table > tbody > tr > td.info, +.table > tfoot > tr > td.info, +.table > thead > tr > th.info, +.table > tbody > tr > th.info, +.table > tfoot > tr > th.info, +.table > thead > tr.info > td, +.table > tbody > tr.info > td, +.table > tfoot > tr.info > td, +.table > thead > tr.info > th, +.table > tbody > tr.info > th, +.table > tfoot > tr.info > th { + background-color: #d9edf7; +} +.table-hover > tbody > tr > td.info:hover, +.table-hover > tbody > tr > th.info:hover, +.table-hover > tbody > tr.info:hover > td, +.table-hover > tbody > tr:hover > .info, +.table-hover > tbody > tr.info:hover > th { + background-color: #c4e3f3; +} +.table > thead > tr > td.warning, +.table > tbody > tr > td.warning, +.table > tfoot > tr > td.warning, +.table > thead > tr > th.warning, +.table > tbody > tr > th.warning, +.table > tfoot > tr > th.warning, +.table > thead > tr.warning > td, +.table > tbody > tr.warning > td, +.table > tfoot > tr.warning > td, +.table > thead > tr.warning > th, +.table > tbody > tr.warning > th, +.table > tfoot > tr.warning > th { + background-color: #fcf8e3; +} +.table-hover > tbody > tr > td.warning:hover, +.table-hover > tbody > tr > th.warning:hover, +.table-hover > tbody > tr.warning:hover > td, +.table-hover > tbody > tr:hover > .warning, +.table-hover > tbody > tr.warning:hover > th { + background-color: #faf2cc; +} +.table > thead > tr > td.danger, +.table > tbody > tr > td.danger, +.table > tfoot > tr > td.danger, +.table > thead > tr > th.danger, +.table > tbody > tr > th.danger, +.table > tfoot > tr > th.danger, +.table > thead > tr.danger > td, +.table > tbody > tr.danger > td, +.table > tfoot > tr.danger > td, +.table > thead > tr.danger > th, +.table > tbody > tr.danger > th, +.table > tfoot > tr.danger > th { + background-color: #f2dede; +} +.table-hover > tbody > tr > td.danger:hover, +.table-hover > tbody > tr > th.danger:hover, +.table-hover > tbody > tr.danger:hover > td, +.table-hover > tbody > tr:hover > .danger, +.table-hover > tbody > tr.danger:hover > th { + background-color: #ebcccc; +} +.table-responsive { + overflow-x: auto; + min-height: 0.01%; + border: 1px solid #e7ecf1; +} +@media screen and (max-width: 767px) { + .table-responsive { + width: 100%; + margin-bottom: 10.5px; + overflow-y: hidden; + -ms-overflow-style: -ms-autohiding-scrollbar; + border: 1px solid #e7ecf1; + } + .table-responsive > .table { + margin-bottom: 0; + } + .table-responsive > .table > thead > tr > th, + .table-responsive > .table > tbody > tr > th, + .table-responsive > .table > tfoot > tr > th, + .table-responsive > .table > thead > tr > td, + .table-responsive > .table > tbody > tr > td, + .table-responsive > .table > tfoot > tr > td { + white-space: nowrap; + } + .table-responsive > .table-bordered { + border: 0; + } + .table-responsive > .table-bordered > thead > tr > th:first-child, + .table-responsive > .table-bordered > tbody > tr > th:first-child, + .table-responsive > .table-bordered > tfoot > tr > th:first-child, + .table-responsive > .table-bordered > thead > tr > td:first-child, + .table-responsive > .table-bordered > tbody > tr > td:first-child, + .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; + } + .table-responsive > .table-bordered > thead > tr > th:last-child, + .table-responsive > .table-bordered > tbody > tr > th:last-child, + .table-responsive > .table-bordered > tfoot > tr > th:last-child, + .table-responsive > .table-bordered > thead > tr > td:last-child, + .table-responsive > .table-bordered > tbody > tr > td:last-child, + .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; + } + .table-responsive > .table-bordered > tbody > tr:last-child > th, + .table-responsive > .table-bordered > tfoot > tr:last-child > th, + .table-responsive > .table-bordered > tbody > tr:last-child > td, + .table-responsive > .table-bordered > tfoot > tr:last-child > td { + border-bottom: 0; + } +} +fieldset { + padding: 0; + margin: 0; + border: 0; + min-width: 0; +} +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 14px; + font-size: 18px; + line-height: inherit; + color: #333333; + border: 0; + border-bottom: 1px solid #e5e5e5; +} +label { + display: inline-block; + max-width: 100%; + margin-bottom: 5px; + font-weight: bold; +} +input[type="search"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + margin-top: 1px \9; + line-height: normal; +} +input[type="file"] { + display: block; +} +input[type="range"] { + display: block; + width: 100%; +} +select[multiple], +select[size] { + height: auto; +} +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +output { + display: block; + padding-top: 7px; + font-size: 12px; + line-height: 1.18; + color: #555555; +} +.form-control { + display: block; + width: 100%; + height: 28px; + padding: 4px 12px; + font-size: 12px; + line-height: 1.18; + color: #555555; + background-color: #ffffff; + background-image: none; + border: 1px solid #cccccc; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; + -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; + transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; +} +.form-control:focus { + border-color: #afe0dc; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(175, 224, 220, 0.6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(175, 224, 220, 0.6); +} +.form-control::-moz-placeholder { + color: #999999; + opacity: 1; +} +.form-control:-ms-input-placeholder { + color: #999999; +} +.form-control::-webkit-input-placeholder { + color: #999999; +} +.form-control[disabled], +fieldset[disabled] .form-control { + cursor: not-allowed; + background-color: #eee; + opacity: 1; +} +.form-control[readonly] { + cursor: pointer; + background-color: #fff; + opacity: 1; +} +textarea.form-control { + height: auto; +} +input[type="search"] { + -webkit-appearance: none; +} +input[type="date"], +input[type="time"], +input[type="datetime-local"], +input[type="month"] { + line-height: 28px; + line-height: 1.18 \0; +} +input[type="date"].input-sm, +input[type="time"].input-sm, +input[type="datetime-local"].input-sm, +input[type="month"].input-sm { + line-height: 28px; + line-height: 1.5 \0; +} +input[type="date"].input-lg, +input[type="time"].input-lg, +input[type="datetime-local"].input-lg, +input[type="month"].input-lg { + line-height: 42px; + line-height: 1.33 \0; +} +_:-ms-fullscreen, +:root input[type="date"], +_:-ms-fullscreen, +:root input[type="time"], +_:-ms-fullscreen, +:root input[type="datetime-local"], +_:-ms-fullscreen, +:root input[type="month"] { + line-height: 1.18; +} +_:-ms-fullscreen.input-sm, +:root input[type="date"].input-sm, +_:-ms-fullscreen.input-sm, +:root input[type="time"].input-sm, +_:-ms-fullscreen.input-sm, +:root input[type="datetime-local"].input-sm, +_:-ms-fullscreen.input-sm, +:root input[type="month"].input-sm { + line-height: 1.5; +} +_:-ms-fullscreen.input-lg, +:root input[type="date"].input-lg, +_:-ms-fullscreen.input-lg, +:root input[type="time"].input-lg, +_:-ms-fullscreen.input-lg, +:root input[type="datetime-local"].input-lg, +_:-ms-fullscreen.input-lg, +:root input[type="month"].input-lg { + line-height: 1.33; +} +.form-group { + margin-bottom: 15px; +} +.radio, +.checkbox { + position: relative; + display: block; + margin-top: 7px; + margin-bottom: 7px; + min-height: 20px; + line-height: 20px; +} +.radio label, +.checkbox label { + min-height: 14px; + padding-left: 20px; + margin-bottom: 0; + font-weight: normal; + cursor: pointer; +} +.radio input[type="radio"], +.radio-inline input[type="radio"], +.checkbox input[type="checkbox"], +.checkbox-inline input[type="checkbox"] { + position: absolute; + margin-left: -20px; + margin-top: 4px \9; +} +.radio + .radio, +.checkbox + .checkbox { + margin-top: -5px; +} +.radio-inline, +.checkbox-inline { + display: inline-block; + padding-left: 20px; + margin-bottom: 0; + vertical-align: middle; + font-weight: normal; + cursor: pointer; + min-height: 20px; + line-height: 20px; +} +.radio-inline + .radio-inline, +.checkbox-inline + .checkbox-inline { + margin-top: 0; + margin-left: 10px; +} +input[type="radio"][disabled], +input[type="checkbox"][disabled], +input[type="radio"].disabled, +input[type="checkbox"].disabled, +fieldset[disabled] input[type="radio"], +fieldset[disabled] input[type="checkbox"] { + cursor: not-allowed; +} +.radio-inline.disabled, +.checkbox-inline.disabled, +fieldset[disabled] .radio-inline, +fieldset[disabled] .checkbox-inline { + cursor: not-allowed; +} +.radio.disabled label, +.checkbox.disabled label, +fieldset[disabled] .radio label, +fieldset[disabled] .checkbox label { + cursor: not-allowed; +} +.form-control-static { + padding-top: 7px; + padding-bottom: 7px; + margin-bottom: 0; +} +.form-control-static.input-lg, +.form-control-static.input-sm { + padding-left: 0; + padding-right: 0; +} +.input-sm, +.form-group-sm .form-control { + height: 28px; + padding: 5px 10px; + font-size: 11px; + line-height: 1.5; + border-radius: 3px; +} +select.input-sm, +select.form-group-sm .form-control { + height: 28px; + line-height: 28px; +} +textarea.input-sm, +textarea.form-group-sm .form-control, +select[multiple].input-sm, +select[multiple].form-group-sm .form-control { + height: auto; +} +.input-lg, +.form-group-lg .form-control { + height: 42px; + padding: 10px 16px; + font-size: 15px; + line-height: 1.33; + border-radius: 6px; +} +select.input-lg, +select.form-group-lg .form-control { + height: 42px; + line-height: 42px; +} +textarea.input-lg, +textarea.form-group-lg .form-control, +select[multiple].input-lg, +select[multiple].form-group-lg .form-control { + height: auto; +} +.has-feedback { + position: relative; +} +.has-feedback .form-control { + padding-right: 35px; +} +.form-control-feedback { + position: absolute; + top: 0; + right: 0; + z-index: 2; + display: block; + width: 28px; + height: 28px; + line-height: 28px; + text-align: center; + pointer-events: none; +} +.input-lg + .form-control-feedback { + width: 42px; + height: 42px; + line-height: 42px; +} +.input-sm + .form-control-feedback { + width: 28px; + height: 28px; + line-height: 28px; +} +.has-success .help-block, +.has-success .control-label, +.has-success .radio, +.has-success .checkbox, +.has-success .radio-inline, +.has-success .checkbox-inline, +.has-success.radio label, +.has-success.checkbox label, +.has-success.radio-inline label, +.has-success.checkbox-inline label { + color: #3c763d; +} +.has-success .form-control { + border-color: #3c763d; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.has-success .form-control:focus { + border-color: #2b542c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168; +} +.has-success .input-group-addon { + color: #3c763d; + border-color: #3c763d; + background-color: #dff0d8; +} +.has-success .form-control-feedback { + color: #3c763d; +} +.has-warning .help-block, +.has-warning .control-label, +.has-warning .radio, +.has-warning .checkbox, +.has-warning .radio-inline, +.has-warning .checkbox-inline, +.has-warning.radio label, +.has-warning.checkbox label, +.has-warning.radio-inline label, +.has-warning.checkbox-inline label { + color: #8a6d3b; +} +.has-warning .form-control { + border-color: #8a6d3b; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.has-warning .form-control:focus { + border-color: #66512c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b; +} +.has-warning .input-group-addon { + color: #8a6d3b; + border-color: #8a6d3b; + background-color: #fcf8e3; +} +.has-warning .form-control-feedback { + color: #8a6d3b; +} +.has-error .help-block, +.has-error .control-label, +.has-error .radio, +.has-error .checkbox, +.has-error .radio-inline, +.has-error .checkbox-inline, +.has-error.radio label, +.has-error.checkbox label, +.has-error.radio-inline label, +.has-error.checkbox-inline label { + color: #a94442; +} +.has-error .form-control { + border-color: #a94442; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.has-error .form-control:focus { + border-color: #843534; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483; +} +.has-error .input-group-addon { + color: #a94442; + border-color: #a94442; + background-color: #f2dede; +} +.has-error .form-control-feedback { + color: #a94442; +} +.has-feedback label ~ .form-control-feedback { + top: 19px; +} +.has-feedback label.sr-only ~ .form-control-feedback { + top: 0; +} +.help-block { + display: block; + margin-top: 5px; + margin-bottom: 10px; + color: #737373; +} +@media (min-width: 0) { + .form-inline .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .form-control { + display: inline-block; + width: auto; + vertical-align: middle; + } + .form-inline .form-control-static { + display: inline-block; + } + .form-inline .input-group { + display: inline-table; + vertical-align: middle; + } + .form-inline .input-group .input-group-addon, + .form-inline .input-group .input-group-btn, + .form-inline .input-group .form-control { + width: auto; + } + .form-inline .input-group > .form-control { + width: 100%; + } + .form-inline .control-label { + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .radio, + .form-inline .checkbox { + display: inline-block; + margin-top: 0; + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .radio label, + .form-inline .checkbox label { + padding-left: 0; + } + .form-inline .radio input[type="radio"], + .form-inline .checkbox input[type="checkbox"] { + position: relative; + margin-left: 0; + } + .form-inline .has-feedback .form-control-feedback { + top: 0; + } +} +.form-horizontal .radio, +.form-horizontal .checkbox, +.form-horizontal .radio-inline, +.form-horizontal .checkbox-inline { + margin-top: 0; + margin-bottom: 0; + padding-top: 7px; +} +.form-horizontal .radio, +.form-horizontal .checkbox { + min-height: 21px; +} +.form-horizontal .form-group { + margin-left: -15px; + margin-right: -15px; +} +@media (min-width: 768px) { + .form-horizontal .control-label { + text-align: right; + margin-bottom: 0; + padding-top: 7px; + } +} +.form-horizontal .has-feedback .form-control-feedback { + right: 15px; +} +@media (min-width: 768px) { + .form-horizontal .form-group-lg .control-label { + padding-top: 14.3px; + } +} +@media (min-width: 768px) { + .form-horizontal .form-group-sm .control-label { + padding-top: 6px; + } +} +.btn { + display: inline-block; + margin-bottom: 0; + font-weight: normal; + text-align: center; + vertical-align: middle; + touch-action: manipulation; + cursor: pointer; + background-image: none; + border: 1px solid transparent; + white-space: nowrap; + padding: 6px 12px; + font-size: 12px; + line-height: 1.18; + border-radius: 4px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.btn:focus, +.btn:active:focus, +.btn.active:focus, +.btn.focus, +.btn:active.focus, +.btn.active.focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.btn:hover, +.btn:focus, +.btn.focus { + color: #9dd9d4; + text-decoration: none; +} +.btn:active, +.btn.active { + outline: 0; + background-image: none; + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); +} +.btn.disabled, +.btn[disabled], +fieldset[disabled] .btn { + cursor: not-allowed; + pointer-events: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + box-shadow: none; +} +.btn-default { + color: #9dd9d4; + background-color: #ffffff; + border-color: #9dd9d4; +} +.btn-default:hover, +.btn-default:focus, +.btn-default.focus, +.btn-default:active, +.btn-default.active, +.open > .dropdown-toggle.btn-default { + color: #71c8c1; + background-color: #ffffff; + border-color: #71c8c1; +} +.btn-default:active, +.btn-default.active, +.open > .dropdown-toggle.btn-default { + background-image: none; +} +.btn-default.disabled, +.btn-default[disabled], +fieldset[disabled] .btn-default, +.btn-default.disabled:hover, +.btn-default[disabled]:hover, +fieldset[disabled] .btn-default:hover, +.btn-default.disabled:focus, +.btn-default[disabled]:focus, +fieldset[disabled] .btn-default:focus, +.btn-default.disabled.focus, +.btn-default[disabled].focus, +fieldset[disabled] .btn-default.focus, +.btn-default.disabled:active, +.btn-default[disabled]:active, +fieldset[disabled] .btn-default:active, +.btn-default.disabled.active, +.btn-default[disabled].active, +fieldset[disabled] .btn-default.active { + background-color: #ffffff; + border-color: #9dd9d4; +} +.btn-default .badge { + color: #ffffff; + background-color: #9dd9d4; +} +.btn-primary { + color: #ffffff; + background-color: #afe0dc; + border-color: #9dd9d4; +} +.btn-primary:hover, +.btn-primary:focus, +.btn-primary.focus, +.btn-primary:active, +.btn-primary.active, +.open > .dropdown-toggle.btn-primary { + color: #ffffff; + background-color: #8ad2cc; + border-color: #71c8c1; +} +.btn-primary:active, +.btn-primary.active, +.open > .dropdown-toggle.btn-primary { + background-image: none; +} +.btn-primary.disabled, +.btn-primary[disabled], +fieldset[disabled] .btn-primary, +.btn-primary.disabled:hover, +.btn-primary[disabled]:hover, +fieldset[disabled] .btn-primary:hover, +.btn-primary.disabled:focus, +.btn-primary[disabled]:focus, +fieldset[disabled] .btn-primary:focus, +.btn-primary.disabled.focus, +.btn-primary[disabled].focus, +fieldset[disabled] .btn-primary.focus, +.btn-primary.disabled:active, +.btn-primary[disabled]:active, +fieldset[disabled] .btn-primary:active, +.btn-primary.disabled.active, +.btn-primary[disabled].active, +fieldset[disabled] .btn-primary.active { + background-color: #afe0dc; + border-color: #9dd9d4; +} +.btn-primary .badge { + color: #afe0dc; + background-color: #ffffff; +} +.btn-success { + color: #ffffff; + background-color: #5cb85c; + border-color: #4cae4c; +} +.btn-success:hover, +.btn-success:focus, +.btn-success.focus, +.btn-success:active, +.btn-success.active, +.open > .dropdown-toggle.btn-success { + color: #ffffff; + background-color: #449d44; + border-color: #398439; +} +.btn-success:active, +.btn-success.active, +.open > .dropdown-toggle.btn-success { + background-image: none; +} +.btn-success.disabled, +.btn-success[disabled], +fieldset[disabled] .btn-success, +.btn-success.disabled:hover, +.btn-success[disabled]:hover, +fieldset[disabled] .btn-success:hover, +.btn-success.disabled:focus, +.btn-success[disabled]:focus, +fieldset[disabled] .btn-success:focus, +.btn-success.disabled.focus, +.btn-success[disabled].focus, +fieldset[disabled] .btn-success.focus, +.btn-success.disabled:active, +.btn-success[disabled]:active, +fieldset[disabled] .btn-success:active, +.btn-success.disabled.active, +.btn-success[disabled].active, +fieldset[disabled] .btn-success.active { + background-color: #5cb85c; + border-color: #4cae4c; +} +.btn-success .badge { + color: #5cb85c; + background-color: #ffffff; +} +.btn-info { + color: #ffffff; + background-color: #5bc0de; + border-color: #46b8da; +} +.btn-info:hover, +.btn-info:focus, +.btn-info.focus, +.btn-info:active, +.btn-info.active, +.open > .dropdown-toggle.btn-info { + color: #ffffff; + background-color: #31b0d5; + border-color: #269abc; +} +.btn-info:active, +.btn-info.active, +.open > .dropdown-toggle.btn-info { + background-image: none; +} +.btn-info.disabled, +.btn-info[disabled], +fieldset[disabled] .btn-info, +.btn-info.disabled:hover, +.btn-info[disabled]:hover, +fieldset[disabled] .btn-info:hover, +.btn-info.disabled:focus, +.btn-info[disabled]:focus, +fieldset[disabled] .btn-info:focus, +.btn-info.disabled.focus, +.btn-info[disabled].focus, +fieldset[disabled] .btn-info.focus, +.btn-info.disabled:active, +.btn-info[disabled]:active, +fieldset[disabled] .btn-info:active, +.btn-info.disabled.active, +.btn-info[disabled].active, +fieldset[disabled] .btn-info.active { + background-color: #5bc0de; + border-color: #46b8da; +} +.btn-info .badge { + color: #5bc0de; + background-color: #ffffff; +} +.btn-warning { + color: #ffffff; + background-color: #f0ad4e; + border-color: #eea236; +} +.btn-warning:hover, +.btn-warning:focus, +.btn-warning.focus, +.btn-warning:active, +.btn-warning.active, +.open > .dropdown-toggle.btn-warning { + color: #ffffff; + background-color: #ec971f; + border-color: #d58512; +} +.btn-warning:active, +.btn-warning.active, +.open > .dropdown-toggle.btn-warning { + background-image: none; +} +.btn-warning.disabled, +.btn-warning[disabled], +fieldset[disabled] .btn-warning, +.btn-warning.disabled:hover, +.btn-warning[disabled]:hover, +fieldset[disabled] .btn-warning:hover, +.btn-warning.disabled:focus, +.btn-warning[disabled]:focus, +fieldset[disabled] .btn-warning:focus, +.btn-warning.disabled.focus, +.btn-warning[disabled].focus, +fieldset[disabled] .btn-warning.focus, +.btn-warning.disabled:active, +.btn-warning[disabled]:active, +fieldset[disabled] .btn-warning:active, +.btn-warning.disabled.active, +.btn-warning[disabled].active, +fieldset[disabled] .btn-warning.active { + background-color: #f0ad4e; + border-color: #eea236; +} +.btn-warning .badge { + color: #f0ad4e; + background-color: #ffffff; +} +.btn-danger { + color: #ffffff; + background-color: #d9534f; + border-color: #d43f3a; +} +.btn-danger:hover, +.btn-danger:focus, +.btn-danger.focus, +.btn-danger:active, +.btn-danger.active, +.open > .dropdown-toggle.btn-danger { + color: #ffffff; + background-color: #c9302c; + border-color: #ac2925; +} +.btn-danger:active, +.btn-danger.active, +.open > .dropdown-toggle.btn-danger { + background-image: none; +} +.btn-danger.disabled, +.btn-danger[disabled], +fieldset[disabled] .btn-danger, +.btn-danger.disabled:hover, +.btn-danger[disabled]:hover, +fieldset[disabled] .btn-danger:hover, +.btn-danger.disabled:focus, +.btn-danger[disabled]:focus, +fieldset[disabled] .btn-danger:focus, +.btn-danger.disabled.focus, +.btn-danger[disabled].focus, +fieldset[disabled] .btn-danger.focus, +.btn-danger.disabled:active, +.btn-danger[disabled]:active, +fieldset[disabled] .btn-danger:active, +.btn-danger.disabled.active, +.btn-danger[disabled].active, +fieldset[disabled] .btn-danger.active { + background-color: #d9534f; + border-color: #d43f3a; +} +.btn-danger .badge { + color: #d9534f; + background-color: #ffffff; +} +.btn-link { + color: #afe0dc; + font-weight: normal; + border-radius: 0; +} +.btn-link, +.btn-link:active, +.btn-link.active, +.btn-link[disabled], +fieldset[disabled] .btn-link { + background-color: transparent; + -webkit-box-shadow: none; + box-shadow: none; +} +.btn-link, +.btn-link:hover, +.btn-link:focus, +.btn-link:active { + border-color: transparent; +} +.btn-link:hover, +.btn-link:focus { + color: #78cbc4; + text-decoration: underline; + background-color: transparent; +} +.btn-link[disabled]:hover, +fieldset[disabled] .btn-link:hover, +.btn-link[disabled]:focus, +fieldset[disabled] .btn-link:focus { + color: #777777; + text-decoration: none; +} +.btn-lg, +.btn-group-lg > .btn { + padding: 10px 16px; + font-size: 15px; + line-height: 1.33; + border-radius: 6px; +} +.btn-sm, +.btn-group-sm > .btn { + padding: 5px 10px; + font-size: 11px; + line-height: 1.5; + border-radius: 3px; +} +.btn-xs, +.btn-group-xs > .btn { + padding: 1px 5px; + font-size: 11px; + line-height: 1.5; + border-radius: 3px; +} +.btn-block { + display: block; + width: 100%; +} +.btn-block + .btn-block { + margin-top: 5px; +} +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} +.fade { + opacity: 0; + -webkit-transition: opacity 0.15s linear; + -o-transition: opacity 0.15s linear; + transition: opacity 0.15s linear; +} +.fade.in { + opacity: 1; +} +.collapse { + display: none; + visibility: hidden; +} +.collapse.in { + display: block; + visibility: visible; +} +tr.collapse.in { + display: table-row; +} +tbody.collapse.in { + display: table-row-group; +} +.collapsing { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition-property: height, visibility; + transition-property: height, visibility; + -webkit-transition-duration: 0.35s; + transition-duration: 0.35s; + -webkit-transition-timing-function: ease; + transition-timing-function: ease; +} +.caret { + display: inline-block; + width: 0; + height: 0; + margin-left: 2px; + vertical-align: middle; + border-top: 4px solid; + border-right: 4px solid transparent; + border-left: 4px solid transparent; +} +.dropdown { + position: relative; +} +.dropdown-toggle:focus { + outline: 0; +} +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + list-style: none; + font-size: 12px; + text-align: left; + background-color: #ffffff; + border: 1px solid #cccccc; + border: 1px solid rgba(0, 0, 0, 0.15); + border-radius: 4px; + -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); + background-clip: padding-box; +} +.dropdown-menu.pull-right { + right: 0; + left: auto; +} +.dropdown-menu .divider { + height: 1px; + margin: 6px 0; + overflow: hidden; + background-color: #e5e5e5; +} +.dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 1.18; + color: #333333; + white-space: nowrap; +} +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus { + text-decoration: none; + color: #262626; + background-color: #f5f5f5; +} +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + color: #ffffff; + text-decoration: none; + outline: 0; + background-color: #afe0dc; +} +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + color: #777777; +} +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + text-decoration: none; + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + cursor: not-allowed; +} +.open > .dropdown-menu { + display: block; +} +.open > a { + outline: 0; +} +.dropdown-menu-right { + left: auto; + right: 0; +} +.dropdown-menu-left { + left: 0; + right: auto; +} +.dropdown-header { + display: block; + padding: 3px 20px; + font-size: 11px; + line-height: 1.18; + color: #777777; + white-space: nowrap; +} +.dropdown-backdrop { + position: fixed; + left: 0; + right: 0; + bottom: 0; + top: 0; + z-index: 990; +} +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} +.dropup .caret, +.navbar-fixed-bottom .dropdown .caret { + border-top: 0; + border-bottom: 4px solid; + content: ""; +} +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 1px; +} +@media (min-width: 768px) { + .navbar-right .dropdown-menu { + left: auto; + right: 0; + } + .navbar-right .dropdown-menu-left { + left: 0; + right: auto; + } +} +.btn-group, +.btn-group-vertical { + position: relative; + display: inline-block; + vertical-align: middle; +} +.btn-group > .btn, +.btn-group-vertical > .btn { + position: relative; + float: left; +} +.btn-group > .btn:hover, +.btn-group-vertical > .btn:hover, +.btn-group > .btn:focus, +.btn-group-vertical > .btn:focus, +.btn-group > .btn:active, +.btn-group-vertical > .btn:active, +.btn-group > .btn.active, +.btn-group-vertical > .btn.active { + z-index: 2; +} +.btn-group > .btn:focus, +.btn-group-vertical > .btn:focus { + outline: 0; +} +.btn-group .btn + .btn, +.btn-group .btn + .btn-group, +.btn-group .btn-group + .btn, +.btn-group .btn-group + .btn-group { + margin-left: -1px; +} +.btn-toolbar { + margin-left: -5px; +} +.btn-toolbar .btn-group, +.btn-toolbar .input-group { + float: left; +} +.btn-toolbar > .btn, +.btn-toolbar > .btn-group, +.btn-toolbar > .input-group { + margin-left: 5px; +} +.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { + border-radius: 0; +} +.btn-group > .btn:first-child { + margin-left: 0; +} +.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { + border-bottom-right-radius: 0; + border-top-right-radius: 0; +} +.btn-group > .btn:last-child:not(:first-child), +.btn-group > .dropdown-toggle:not(:first-child) { + border-bottom-left-radius: 0; + border-top-left-radius: 0; +} +.btn-group > .btn-group { + float: left; +} +.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} +.btn-group > .btn-group:first-child > .btn:last-child, +.btn-group > .btn-group:first-child > .dropdown-toggle { + border-bottom-right-radius: 0; + border-top-right-radius: 0; +} +.btn-group > .btn-group:last-child > .btn:first-child { + border-bottom-left-radius: 0; + border-top-left-radius: 0; +} +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} +.btn-group > .btn + .dropdown-toggle { + padding-left: 8px; + padding-right: 8px; +} +.btn-group > .btn-lg + .dropdown-toggle { + padding-left: 12px; + padding-right: 12px; +} +.btn-group.open .dropdown-toggle { + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); +} +.btn-group.open .dropdown-toggle.btn-link { + -webkit-box-shadow: none; + box-shadow: none; +} +.btn .caret { + margin-left: 0; +} +.btn-lg .caret { + border-width: 5px 5px 0; + border-bottom-width: 0; +} +.dropup .btn-lg .caret { + border-width: 0 5px 5px; +} +.btn-group-vertical > .btn, +.btn-group-vertical > .btn-group, +.btn-group-vertical > .btn-group > .btn { + display: block; + float: none; + width: 100%; + max-width: 100%; +} +.btn-group-vertical > .btn-group > .btn { + float: none; +} +.btn-group-vertical > .btn + .btn, +.btn-group-vertical > .btn + .btn-group, +.btn-group-vertical > .btn-group + .btn, +.btn-group-vertical > .btn-group + .btn-group { + margin-top: -1px; + margin-left: 0; +} +.btn-group-vertical > .btn:not(:first-child):not(:last-child) { + border-radius: 0; +} +.btn-group-vertical > .btn:first-child:not(:last-child) { + border-top-right-radius: 4px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group-vertical > .btn:last-child:not(:first-child) { + border-bottom-left-radius: 4px; + border-top-right-radius: 0; + border-top-left-radius: 0; +} +.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} +.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, +.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { + border-top-right-radius: 0; + border-top-left-radius: 0; +} +.btn-group-justified { + display: table; + width: 100%; + table-layout: fixed; + border-collapse: separate; +} +.btn-group-justified > .btn, +.btn-group-justified > .btn-group { + float: none; + display: table-cell; + width: 1%; +} +.btn-group-justified > .btn-group .btn { + width: 100%; +} +.btn-group-justified > .btn-group .dropdown-menu { + left: auto; +} +[data-toggle="buttons"] > .btn input[type="radio"], +[data-toggle="buttons"] > .btn-group > .btn input[type="radio"], +[data-toggle="buttons"] > .btn input[type="checkbox"], +[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] { + position: absolute; + clip: rect(0, 0, 0, 0); + pointer-events: none; +} +.input-group { + position: relative; + display: table; + border-collapse: separate; +} +.input-group[class*="col-"] { + float: none; + padding-left: 0; + padding-right: 0; +} +.input-group .form-control { + position: relative; + z-index: 2; + float: left; + width: 100%; + margin-bottom: 0; +} +.input-group-lg > .form-control, +.input-group-lg > .input-group-addon, +.input-group-lg > .input-group-btn > .btn { + height: 42px; + padding: 10px 16px; + font-size: 15px; + line-height: 1.33; + border-radius: 6px; +} +select.input-group-lg > .form-control, +select.input-group-lg > .input-group-addon, +select.input-group-lg > .input-group-btn > .btn { + height: 42px; + line-height: 42px; +} +textarea.input-group-lg > .form-control, +textarea.input-group-lg > .input-group-addon, +textarea.input-group-lg > .input-group-btn > .btn, +select[multiple].input-group-lg > .form-control, +select[multiple].input-group-lg > .input-group-addon, +select[multiple].input-group-lg > .input-group-btn > .btn { + height: auto; +} +.input-group-sm > .form-control, +.input-group-sm > .input-group-addon, +.input-group-sm > .input-group-btn > .btn { + height: 28px; + padding: 5px 10px; + font-size: 11px; + line-height: 1.5; + border-radius: 3px; +} +select.input-group-sm > .form-control, +select.input-group-sm > .input-group-addon, +select.input-group-sm > .input-group-btn > .btn { + height: 28px; + line-height: 28px; +} +textarea.input-group-sm > .form-control, +textarea.input-group-sm > .input-group-addon, +textarea.input-group-sm > .input-group-btn > .btn, +select[multiple].input-group-sm > .form-control, +select[multiple].input-group-sm > .input-group-addon, +select[multiple].input-group-sm > .input-group-btn > .btn { + height: auto; +} +.input-group-addon, +.input-group-btn, +.input-group .form-control { + display: table-cell; +} +.input-group-addon:not(:first-child):not(:last-child), +.input-group-btn:not(:first-child):not(:last-child), +.input-group .form-control:not(:first-child):not(:last-child) { + border-radius: 0; +} +.input-group-addon, +.input-group-btn { + width: 1%; + white-space: nowrap; + vertical-align: middle; +} +.input-group-addon { + padding: 6px 12px; + font-size: 12px; + font-weight: normal; + line-height: 1; + color: #555555; + text-align: center; + background-color: #eeeeee; + border: 1px solid #cccccc; + border-radius: 4px; +} +.input-group-addon.input-sm { + padding: 5px 10px; + font-size: 11px; + border-radius: 3px; +} +.input-group-addon.input-lg { + padding: 10px 16px; + font-size: 15px; + border-radius: 6px; +} +.input-group-addon input[type="radio"], +.input-group-addon input[type="checkbox"] { + margin-top: 0; +} +.input-group .form-control:first-child, +.input-group-addon:first-child, +.input-group-btn:first-child > .btn, +.input-group-btn:first-child > .btn-group > .btn, +.input-group-btn:first-child > .dropdown-toggle, +.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), +.input-group-btn:last-child > .btn-group:not(:last-child) > .btn { + border-bottom-right-radius: 0; + border-top-right-radius: 0; +} +.input-group-addon:first-child { + border-right: 0; +} +.input-group .form-control:last-child, +.input-group-addon:last-child, +.input-group-btn:last-child > .btn, +.input-group-btn:last-child > .btn-group > .btn, +.input-group-btn:last-child > .dropdown-toggle, +.input-group-btn:first-child > .btn:not(:first-child), +.input-group-btn:first-child > .btn-group:not(:first-child) > .btn { + border-bottom-left-radius: 0; + border-top-left-radius: 0; +} +.input-group-addon:last-child { + border-left: 0; +} +.input-group-btn { + position: relative; + font-size: 0; + white-space: nowrap; +} +.input-group-btn > .btn { + position: relative; +} +.input-group-btn > .btn + .btn { + margin-left: -1px; +} +.input-group-btn > .btn:hover, +.input-group-btn > .btn:focus, +.input-group-btn > .btn:active { + z-index: 2; +} +.input-group-btn:first-child > .btn, +.input-group-btn:first-child > .btn-group { + margin-right: -1px; +} +.input-group-btn:last-child > .btn, +.input-group-btn:last-child > .btn-group { + margin-left: -1px; +} +.nav { + margin-bottom: 0; + padding-left: 0; + list-style: none; +} +.nav > li { + position: relative; + display: block; +} +.nav > li > a { + position: relative; + display: block; + padding: 10px 15px; +} +.nav > li > a:hover, +.nav > li > a:focus { + text-decoration: none; + background-color: #eeeeee; +} +.nav > li.disabled > a { + color: #777777; +} +.nav > li.disabled > a:hover, +.nav > li.disabled > a:focus { + color: #777777; + text-decoration: none; + background-color: transparent; + cursor: not-allowed; +} +.nav .open > a, +.nav .open > a:hover, +.nav .open > a:focus { + background-color: #eeeeee; + border-color: #afe0dc; +} +.nav .nav-divider { + height: 1px; + margin: 6px 0; + overflow: hidden; + background-color: #e5e5e5; +} +.nav > li > a > img { + max-width: none; +} +.nav-tabs { + border-bottom: 1px solid #dddddd; +} +.nav-tabs > li { + float: left; + margin-bottom: -1px; +} +.nav-tabs > li > a { + margin-right: 2px; + line-height: 1.18; + border: 1px solid transparent; + border-radius: 4px 4px 0 0; +} +.nav-tabs > li > a:hover { + border-color: #eeeeee #eeeeee #dddddd; +} +.nav-tabs > li.active > a, +.nav-tabs > li.active > a:hover, +.nav-tabs > li.active > a:focus { + color: #555555; + background-color: #ffffff; + border: 1px solid #dddddd; + border-bottom-color: transparent; + cursor: default; +} +.nav-tabs.nav-justified { + width: 100%; + border-bottom: 0; +} +.nav-tabs.nav-justified > li { + float: none; +} +.nav-tabs.nav-justified > li > a { + text-align: center; + margin-bottom: 5px; +} +.nav-tabs.nav-justified > .dropdown .dropdown-menu { + top: auto; + left: auto; +} +@media (min-width: 768px) { + .nav-tabs.nav-justified > li { + display: table-cell; + width: 1%; + } + .nav-tabs.nav-justified > li > a { + margin-bottom: 0; + } +} +.nav-tabs.nav-justified > li > a { + margin-right: 0; + border-radius: 4px; +} +.nav-tabs.nav-justified > .active > a, +.nav-tabs.nav-justified > .active > a:hover, +.nav-tabs.nav-justified > .active > a:focus { + border: 1px solid #dddddd; +} +@media (min-width: 768px) { + .nav-tabs.nav-justified > li > a { + border-bottom: 1px solid #dddddd; + border-radius: 4px 4px 0 0; + } + .nav-tabs.nav-justified > .active > a, + .nav-tabs.nav-justified > .active > a:hover, + .nav-tabs.nav-justified > .active > a:focus { + border-bottom-color: #ffffff; + } +} +.nav-pills > li { + float: left; +} +.nav-pills > li > a { + border-radius: 4px; +} +.nav-pills > li + li { + margin-left: 2px; +} +.nav-pills > li.active > a, +.nav-pills > li.active > a:hover, +.nav-pills > li.active > a:focus { + color: #ffffff; + background-color: #afe0dc; +} +.nav-stacked > li { + float: none; +} +.nav-stacked > li + li { + margin-top: 2px; + margin-left: 0; +} +.nav-justified { + width: 100%; +} +.nav-justified > li { + float: none; +} +.nav-justified > li > a { + text-align: center; + margin-bottom: 5px; +} +.nav-justified > .dropdown .dropdown-menu { + top: auto; + left: auto; +} +@media (min-width: 768px) { + .nav-justified > li { + display: table-cell; + width: 1%; + } + .nav-justified > li > a { + margin-bottom: 0; + } +} +.nav-tabs-justified { + border-bottom: 0; +} +.nav-tabs-justified > li > a { + margin-right: 0; + border-radius: 4px; +} +.nav-tabs-justified > .active > a, +.nav-tabs-justified > .active > a:hover, +.nav-tabs-justified > .active > a:focus { + border: 1px solid #dddddd; +} +@media (min-width: 768px) { + .nav-tabs-justified > li > a { + border-bottom: 1px solid #dddddd; + border-radius: 4px 4px 0 0; + } + .nav-tabs-justified > .active > a, + .nav-tabs-justified > .active > a:hover, + .nav-tabs-justified > .active > a:focus { + border-bottom-color: #ffffff; + } +} +.tab-content > .tab-pane { + display: none; + visibility: hidden; +} +.tab-content > .active { + display: block; + visibility: visible; +} +.nav-tabs .dropdown-menu { + margin-top: -1px; + border-top-right-radius: 0; + border-top-left-radius: 0; +} +.navbar { + position: relative; + min-height: 50px; + margin-bottom: 14px; + border: 1px solid transparent; +} +@media (min-width: 768px) { + .navbar { + border-radius: 4px; + } +} +@media (min-width: 768px) { + .navbar-header { + float: left; + } +} +.navbar-collapse { + overflow-x: visible; + padding-right: 15px; + padding-left: 15px; + border-top: 1px solid transparent; + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); + -webkit-overflow-scrolling: touch; +} +.navbar-collapse.in { + overflow-y: auto; +} +@media (min-width: 768px) { + .navbar-collapse { + width: auto; + border-top: 0; + box-shadow: none; + } + .navbar-collapse.collapse { + display: block !important; + visibility: visible !important; + height: auto !important; + padding-bottom: 0; + overflow: visible !important; + } + .navbar-collapse.in { + overflow-y: visible; + } + .navbar-fixed-top .navbar-collapse, + .navbar-static-top .navbar-collapse, + .navbar-fixed-bottom .navbar-collapse { + padding-left: 0; + padding-right: 0; + } +} +.navbar-fixed-top .navbar-collapse, +.navbar-fixed-bottom .navbar-collapse { + max-height: 340px; +} +@media (max-device-width: 480px) and (orientation: landscape) { + .navbar-fixed-top .navbar-collapse, + .navbar-fixed-bottom .navbar-collapse { + max-height: 200px; + } +} +.container > .navbar-header, +.container-fluid > .navbar-header, +.container > .navbar-collapse, +.container-fluid > .navbar-collapse { + margin-right: -15px; + margin-left: -15px; +} +@media (min-width: 768px) { + .container > .navbar-header, + .container-fluid > .navbar-header, + .container > .navbar-collapse, + .container-fluid > .navbar-collapse { + margin-right: 0; + margin-left: 0; + } +} +.navbar-static-top { + z-index: 1000; + border-width: 0 0 1px; +} +@media (min-width: 768px) { + .navbar-static-top { + border-radius: 0; + } +} +.navbar-fixed-top, +.navbar-fixed-bottom { + position: fixed; + right: 0; + left: 0; + z-index: 1030; +} +@media (min-width: 768px) { + .navbar-fixed-top, + .navbar-fixed-bottom { + border-radius: 0; + } +} +.navbar-fixed-top { + top: 0; + border-width: 0 0 1px; +} +.navbar-fixed-bottom { + bottom: 0; + margin-bottom: 0; + border-width: 1px 0 0; +} +.navbar-brand { + float: left; + padding: 18px 15px; + font-size: 15px; + line-height: 14px; + height: 50px; +} +.navbar-brand:hover, +.navbar-brand:focus { + text-decoration: none; +} +.navbar-brand > img { + display: block; +} +@media (min-width: 768px) { + .navbar > .container .navbar-brand, + .navbar > .container-fluid .navbar-brand { + margin-left: -15px; + } +} +.navbar-toggle { + position: relative; + float: right; + margin-right: 15px; + padding: 9px 10px; + margin-top: 8px; + margin-bottom: 8px; + background-color: transparent; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; +} +.navbar-toggle:focus { + outline: 0; +} +.navbar-toggle .icon-bar { + display: block; + width: 22px; + height: 2px; + border-radius: 1px; +} +.navbar-toggle .icon-bar + .icon-bar { + margin-top: 4px; +} +@media (min-width: 768px) { + .navbar-toggle { + display: none; + } +} +.navbar-nav { + margin: 9px -15px; +} +.navbar-nav > li > a { + padding-top: 10px; + padding-bottom: 10px; + line-height: 14px; +} +@media (max-width: 767px) { + .navbar-nav .open .dropdown-menu { + position: static; + float: none; + width: auto; + margin-top: 0; + background-color: transparent; + border: 0; + box-shadow: none; + } + .navbar-nav .open .dropdown-menu > li > a, + .navbar-nav .open .dropdown-menu .dropdown-header { + padding: 5px 15px 5px 25px; + } + .navbar-nav .open .dropdown-menu > li > a { + line-height: 14px; + } + .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-nav .open .dropdown-menu > li > a:focus { + background-image: none; + } +} +@media (min-width: 768px) { + .navbar-nav { + float: left; + margin: 0; + } + .navbar-nav > li { + float: left; + } + .navbar-nav > li > a { + padding-top: 18px; + padding-bottom: 18px; + } +} +.navbar-form { + margin-left: -15px; + margin-right: -15px; + padding: 10px 15px; + border-top: 1px solid transparent; + border-bottom: 1px solid transparent; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); + margin-top: 11px; + margin-bottom: 11px; +} +@media (min-width: 0) { + .navbar-form .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .form-control { + display: inline-block; + width: auto; + vertical-align: middle; + } + .navbar-form .form-control-static { + display: inline-block; + } + .navbar-form .input-group { + display: inline-table; + vertical-align: middle; + } + .navbar-form .input-group .input-group-addon, + .navbar-form .input-group .input-group-btn, + .navbar-form .input-group .form-control { + width: auto; + } + .navbar-form .input-group > .form-control { + width: 100%; + } + .navbar-form .control-label { + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .radio, + .navbar-form .checkbox { + display: inline-block; + margin-top: 0; + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .radio label, + .navbar-form .checkbox label { + padding-left: 0; + } + .navbar-form .radio input[type="radio"], + .navbar-form .checkbox input[type="checkbox"] { + position: relative; + margin-left: 0; + } + .navbar-form .has-feedback .form-control-feedback { + top: 0; + } +} +@media (max-width: 767px) { + .navbar-form .form-group { + margin-bottom: 5px; + } + .navbar-form .form-group:last-child { + margin-bottom: 0; + } +} +@media (min-width: 768px) { + .navbar-form { + width: auto; + border: 0; + margin-left: 0; + margin-right: 0; + padding-top: 0; + padding-bottom: 0; + -webkit-box-shadow: none; + box-shadow: none; + } +} +.navbar-nav > li > .dropdown-menu { + margin-top: 0; + border-top-right-radius: 0; + border-top-left-radius: 0; +} +.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.navbar-btn { + margin-top: 11px; + margin-bottom: 11px; +} +.navbar-btn.btn-sm { + margin-top: 11px; + margin-bottom: 11px; +} +.navbar-btn.btn-xs { + margin-top: 14px; + margin-bottom: 14px; +} +.navbar-text { + margin-top: 18px; + margin-bottom: 18px; +} +@media (min-width: 768px) { + .navbar-text { + float: left; + margin-left: 15px; + margin-right: 15px; + } +} +@media (min-width: 768px) { + .navbar-left { + float: left !important; + } + .navbar-right { + float: right !important; + margin-right: -15px; + } + .navbar-right ~ .navbar-right { + margin-right: 0; + } +} +.navbar-default { + background-color: #f8f8f8; + border-color: #e7e7e7; +} +.navbar-default .navbar-brand { + color: #777777; +} +.navbar-default .navbar-brand:hover, +.navbar-default .navbar-brand:focus { + color: #5e5e5e; + background-color: transparent; +} +.navbar-default .navbar-text { + color: #777777; +} +.navbar-default .navbar-nav > li > a { + color: #777777; +} +.navbar-default .navbar-nav > li > a:hover, +.navbar-default .navbar-nav > li > a:focus { + color: #333333; + background-color: transparent; +} +.navbar-default .navbar-nav > .active > a, +.navbar-default .navbar-nav > .active > a:hover, +.navbar-default .navbar-nav > .active > a:focus { + color: #555555; + background-color: #e7e7e7; +} +.navbar-default .navbar-nav > .disabled > a, +.navbar-default .navbar-nav > .disabled > a:hover, +.navbar-default .navbar-nav > .disabled > a:focus { + color: #cccccc; + background-color: transparent; +} +.navbar-default .navbar-toggle { + border-color: #dddddd; +} +.navbar-default .navbar-toggle:hover, +.navbar-default .navbar-toggle:focus { + background-color: #dddddd; +} +.navbar-default .navbar-toggle .icon-bar { + background-color: #888888; +} +.navbar-default .navbar-collapse, +.navbar-default .navbar-form { + border-color: #e7e7e7; +} +.navbar-default .navbar-nav > .open > a, +.navbar-default .navbar-nav > .open > a:hover, +.navbar-default .navbar-nav > .open > a:focus { + background-color: #e7e7e7; + color: #555555; +} +@media (max-width: 767px) { + .navbar-default .navbar-nav .open .dropdown-menu > li > a { + color: #777777; + } + .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { + color: #333333; + background-color: transparent; + } + .navbar-default .navbar-nav .open .dropdown-menu > .active > a, + .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { + color: #555555; + background-color: #e7e7e7; + } + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus { + color: #cccccc; + background-color: transparent; + } +} +.navbar-default .navbar-link { + color: #777777; +} +.navbar-default .navbar-link:hover { + color: #333333; +} +.navbar-default .btn-link { + color: #777777; +} +.navbar-default .btn-link:hover, +.navbar-default .btn-link:focus { + color: #333333; +} +.navbar-default .btn-link[disabled]:hover, +fieldset[disabled] .navbar-default .btn-link:hover, +.navbar-default .btn-link[disabled]:focus, +fieldset[disabled] .navbar-default .btn-link:focus { + color: #cccccc; +} +.navbar-inverse { + background-color: #222222; + border-color: #080808; +} +.navbar-inverse .navbar-brand { + color: #9d9d9d; +} +.navbar-inverse .navbar-brand:hover, +.navbar-inverse .navbar-brand:focus { + color: #ffffff; + background-color: transparent; +} +.navbar-inverse .navbar-text { + color: #9d9d9d; +} +.navbar-inverse .navbar-nav > li > a { + color: #9d9d9d; +} +.navbar-inverse .navbar-nav > li > a:hover, +.navbar-inverse .navbar-nav > li > a:focus { + color: #ffffff; + background-color: transparent; +} +.navbar-inverse .navbar-nav > .active > a, +.navbar-inverse .navbar-nav > .active > a:hover, +.navbar-inverse .navbar-nav > .active > a:focus { + color: #ffffff; + background-color: #080808; +} +.navbar-inverse .navbar-nav > .disabled > a, +.navbar-inverse .navbar-nav > .disabled > a:hover, +.navbar-inverse .navbar-nav > .disabled > a:focus { + color: #444444; + background-color: transparent; +} +.navbar-inverse .navbar-toggle { + border-color: #333333; +} +.navbar-inverse .navbar-toggle:hover, +.navbar-inverse .navbar-toggle:focus { + background-color: #333333; +} +.navbar-inverse .navbar-toggle .icon-bar { + background-color: #ffffff; +} +.navbar-inverse .navbar-collapse, +.navbar-inverse .navbar-form { + border-color: #101010; +} +.navbar-inverse .navbar-nav > .open > a, +.navbar-inverse .navbar-nav > .open > a:hover, +.navbar-inverse .navbar-nav > .open > a:focus { + background-color: #080808; + color: #ffffff; +} +@media (max-width: 767px) { + .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { + border-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu .divider { + background-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { + color: #9d9d9d; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { + color: #ffffff; + background-color: transparent; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus { + color: #ffffff; + background-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus { + color: #444444; + background-color: transparent; + } +} +.navbar-inverse .navbar-link { + color: #9d9d9d; +} +.navbar-inverse .navbar-link:hover { + color: #ffffff; +} +.navbar-inverse .btn-link { + color: #9d9d9d; +} +.navbar-inverse .btn-link:hover, +.navbar-inverse .btn-link:focus { + color: #ffffff; +} +.navbar-inverse .btn-link[disabled]:hover, +fieldset[disabled] .navbar-inverse .btn-link:hover, +.navbar-inverse .btn-link[disabled]:focus, +fieldset[disabled] .navbar-inverse .btn-link:focus { + color: #444444; +} +.breadcrumb { + padding: 8px 15px; + margin-bottom: 14px; + list-style: none; + background-color: #f5f5f5; + border-radius: 4px; +} +.breadcrumb > li { + display: inline-block; +} +.breadcrumb > li + li:before { + content: "/\00a0"; + padding: 0 5px; + color: #cccccc; +} +.breadcrumb > .active { + color: #777777; +} +.pagination { + display: inline-block; + padding-left: 0; + margin: 14px 0; + border-radius: 4px; +} +.pagination > li { + display: inline; +} +.pagination > li > a, +.pagination > li > span { + position: relative; + float: left; + padding: 6px 12px; + line-height: 1.18; + text-decoration: none; + color: #afe0dc; + background-color: #ffffff; + border: 1px solid #dddddd; + margin-left: -1px; +} +.pagination > li:first-child > a, +.pagination > li:first-child > span { + margin-left: 0; + border-bottom-left-radius: 4px; + border-top-left-radius: 4px; +} +.pagination > li:last-child > a, +.pagination > li:last-child > span { + border-bottom-right-radius: 4px; + border-top-right-radius: 4px; +} +.pagination > li > a:hover, +.pagination > li > span:hover, +.pagination > li > a:focus, +.pagination > li > span:focus { + color: #78cbc4; + background-color: #eeeeee; + border-color: #dddddd; +} +.pagination > .active > a, +.pagination > .active > span, +.pagination > .active > a:hover, +.pagination > .active > span:hover, +.pagination > .active > a:focus, +.pagination > .active > span:focus { + z-index: 2; + color: #ffffff; + background-color: #afe0dc; + border-color: #afe0dc; + cursor: default; +} +.pagination > .disabled > span, +.pagination > .disabled > span:hover, +.pagination > .disabled > span:focus, +.pagination > .disabled > a, +.pagination > .disabled > a:hover, +.pagination > .disabled > a:focus { + color: #777777; + background-color: #ffffff; + border-color: #dddddd; + cursor: not-allowed; +} +.pagination-lg > li > a, +.pagination-lg > li > span { + padding: 10px 16px; + font-size: 15px; +} +.pagination-lg > li:first-child > a, +.pagination-lg > li:first-child > span { + border-bottom-left-radius: 6px; + border-top-left-radius: 6px; +} +.pagination-lg > li:last-child > a, +.pagination-lg > li:last-child > span { + border-bottom-right-radius: 6px; + border-top-right-radius: 6px; +} +.pagination-sm > li > a, +.pagination-sm > li > span { + padding: 5px 10px; + font-size: 11px; +} +.pagination-sm > li:first-child > a, +.pagination-sm > li:first-child > span { + border-bottom-left-radius: 3px; + border-top-left-radius: 3px; +} +.pagination-sm > li:last-child > a, +.pagination-sm > li:last-child > span { + border-bottom-right-radius: 3px; + border-top-right-radius: 3px; +} +.pager { + padding-left: 0; + margin: 14px 0; + list-style: none; + text-align: center; +} +.pager li { + display: inline; +} +.pager li > a, +.pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #ffffff; + border: 1px solid #dddddd; + border-radius: 15px; +} +.pager li > a:hover, +.pager li > a:focus { + text-decoration: none; + background-color: #eeeeee; +} +.pager .next > a, +.pager .next > span { + float: right; +} +.pager .previous > a, +.pager .previous > span { + float: left; +} +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > a:focus, +.pager .disabled > span { + color: #777777; + background-color: #ffffff; + cursor: not-allowed; +} +.label { + display: inline; + padding: .2em .6em .3em; + font-size: 75%; + font-weight: bold; + line-height: 1; + color: #ffffff; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: .25em; +} +a.label:hover, +a.label:focus { + color: #ffffff; + text-decoration: none; + cursor: pointer; +} +.label:empty { + display: none; +} +.btn .label { + position: relative; + top: -1px; +} +.label-default { + background-color: #777777; +} +.label-default[href]:hover, +.label-default[href]:focus { + background-color: #5e5e5e; +} +.label-primary { + background-color: #afe0dc; +} +.label-primary[href]:hover, +.label-primary[href]:focus { + background-color: #8ad2cc; +} +.label-success { + background-color: #5cb85c; +} +.label-success[href]:hover, +.label-success[href]:focus { + background-color: #449d44; +} +.label-info { + background-color: #5bc0de; +} +.label-info[href]:hover, +.label-info[href]:focus { + background-color: #31b0d5; +} +.label-warning { + background-color: #f0ad4e; +} +.label-warning[href]:hover, +.label-warning[href]:focus { + background-color: #ec971f; +} +.label-danger { + background-color: #d9534f; +} +.label-danger[href]:hover, +.label-danger[href]:focus { + background-color: #c9302c; +} +.badge { + display: inline-block; + min-width: 10px; + padding: 2px 5px; + font-size: 11px; + font-weight: bold; + color: #ffffff; + line-height: 1; + vertical-align: baseline; + white-space: nowrap; + text-align: center; + background-color: #777777; + border-radius: 10px; +} +.badge:empty { + display: none; +} +.btn .badge { + position: relative; + top: -1px; +} +.btn-xs .badge { + top: 0; + padding: 1px 5px; +} +a.badge:hover, +a.badge:focus { + color: #ffffff; + text-decoration: none; + cursor: pointer; +} +a.list-group-item.active > .badge, +.nav-pills > .active > a > .badge { + color: #afe0dc; + background-color: #ffffff; +} +.nav-pills > li > a > .badge { + margin-left: 3px; +} +.jumbotron { + padding: 30px 15px; + margin-bottom: 30px; + color: inherit; + background-color: #eeeeee; +} +.jumbotron h1, +.jumbotron .h1 { + color: inherit; +} +.jumbotron p { + margin-bottom: 15px; + font-size: 18px; + font-weight: 200; +} +.jumbotron > hr { + border-top-color: #d5d5d5; +} +.container .jumbotron, +.container-fluid .jumbotron { + border-radius: 6px; +} +.jumbotron .container { + max-width: 100%; +} +@media screen and (min-width: 768px) { + .jumbotron { + padding: 48px 0; + } + .container .jumbotron { + padding-left: 60px; + padding-right: 60px; + } + .jumbotron h1, + .jumbotron .h1 { + font-size: 54px; + } +} +.thumbnail { + display: block; + padding: 4px; + margin-bottom: 14px; + line-height: 1.18; + background-color: #ffffff; + border: 1px solid #dddddd; + border-radius: 4px; + -webkit-transition: border 0.2s ease-in-out; + -o-transition: border 0.2s ease-in-out; + transition: border 0.2s ease-in-out; +} +.thumbnail > img, +.thumbnail a > img { + margin-left: auto; + margin-right: auto; +} +a.thumbnail:hover, +a.thumbnail:focus, +a.thumbnail.active { + border-color: #afe0dc; +} +.thumbnail .caption { + padding: 9px; + color: #333333; +} +.alert { + padding: 15px; + margin-bottom: 14px; + border: 1px solid transparent; + border-radius: 4px; +} +.alert h4 { + margin-top: 0; + color: inherit; +} +.alert .alert-link { + font-weight: bold; +} +.alert > p, +.alert > ul { + margin-bottom: 0; +} +.alert > p + p { + margin-top: 5px; +} +.alert-dismissable, +.alert-dismissible { + padding-right: 35px; +} +.alert-dismissable .close, +.alert-dismissible .close { + position: relative; + top: -2px; + right: -21px; + color: inherit; +} +.alert-success { + background-color: #dff0d8; + border-color: #d6e9c6; + color: #3c763d; +} +.alert-success hr { + border-top-color: #c9e2b3; +} +.alert-success .alert-link { + color: #2b542c; +} +.alert-info { + background-color: #d9edf7; + border-color: #bce8f1; + color: #31708f; +} +.alert-info hr { + border-top-color: #a6e1ec; +} +.alert-info .alert-link { + color: #245269; +} +.alert-warning { + background-color: #fcf8e3; + border-color: #faebcc; + color: #8a6d3b; +} +.alert-warning hr { + border-top-color: #f7e1b5; +} +.alert-warning .alert-link { + color: #66512c; +} +.alert-danger { + background-color: #f2dede; + border-color: #ebccd1; + color: #a94442; +} +.alert-danger hr { + border-top-color: #e4b9c0; +} +.alert-danger .alert-link { + color: #843534; +} +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +.progress { + overflow: hidden; + height: 14px; + margin-bottom: 14px; + background-color: #f5f5f5; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); +} +.progress-bar { + float: left; + width: 0%; + height: 100%; + font-size: 11px; + line-height: 14px; + color: #ffffff; + text-align: center; + background-color: #afe0dc; + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -webkit-transition: width 0.6s ease; + -o-transition: width 0.6s ease; + transition: width 0.6s ease; +} +.progress-striped .progress-bar, +.progress-bar-striped { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-size: 40px 40px; +} +.progress.active .progress-bar, +.progress-bar.active { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -o-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; +} +.progress-bar-success { + background-color: #5cb85c; +} +.progress-striped .progress-bar-success { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.progress-bar-info { + background-color: #5bc0de; +} +.progress-striped .progress-bar-info { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.progress-bar-warning { + background-color: #f0ad4e; +} +.progress-striped .progress-bar-warning { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.progress-bar-danger { + background-color: #d9534f; +} +.progress-striped .progress-bar-danger { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.media { + margin-top: 15px; +} +.media:first-child { + margin-top: 0; +} +.media-right, +.media > .pull-right { + padding-left: 10px; +} +.media-left, +.media > .pull-left { + padding-right: 10px; +} +.media-left, +.media-right, +.media-body { + display: table-cell; + vertical-align: top; +} +.media-middle { + vertical-align: middle; +} +.media-bottom { + vertical-align: bottom; +} +.media-heading { + margin-top: 0; + margin-bottom: 5px; +} +.media-list { + padding-left: 0; + list-style: none; +} +.list-group { + margin-bottom: 20px; + padding-left: 0; +} +.list-group-item { + position: relative; + display: block; + padding: 10px 15px; + margin-bottom: -1px; + background-color: #ffffff; + border: 1px solid #dddddd; +} +.list-group-item:first-child { + border-top-right-radius: 4px; + border-top-left-radius: 4px; +} +.list-group-item:last-child { + margin-bottom: 0; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; +} +.list-group-item > .badge { + float: right; +} +.list-group-item > .badge + .badge { + margin-right: 5px; +} +a.list-group-item { + color: #555555; +} +a.list-group-item .list-group-item-heading { + color: #333333; +} +a.list-group-item:hover, +a.list-group-item:focus { + text-decoration: none; + color: #555555; + background-color: #f5f5f5; +} +.list-group-item.disabled, +.list-group-item.disabled:hover, +.list-group-item.disabled:focus { + background-color: #eeeeee; + color: #777777; + cursor: not-allowed; +} +.list-group-item.disabled .list-group-item-heading, +.list-group-item.disabled:hover .list-group-item-heading, +.list-group-item.disabled:focus .list-group-item-heading { + color: inherit; +} +.list-group-item.disabled .list-group-item-text, +.list-group-item.disabled:hover .list-group-item-text, +.list-group-item.disabled:focus .list-group-item-text { + color: #777777; +} +.list-group-item.active, +.list-group-item.active:hover, +.list-group-item.active:focus { + z-index: 2; + color: #ffffff; + background-color: #afe0dc; + border-color: #afe0dc; +} +.list-group-item.active .list-group-item-heading, +.list-group-item.active:hover .list-group-item-heading, +.list-group-item.active:focus .list-group-item-heading, +.list-group-item.active .list-group-item-heading > small, +.list-group-item.active:hover .list-group-item-heading > small, +.list-group-item.active:focus .list-group-item-heading > small, +.list-group-item.active .list-group-item-heading > .small, +.list-group-item.active:hover .list-group-item-heading > .small, +.list-group-item.active:focus .list-group-item-heading > .small { + color: inherit; +} +.list-group-item.active .list-group-item-text, +.list-group-item.active:hover .list-group-item-text, +.list-group-item.active:focus .list-group-item-text { + color: #ffffff; +} +.list-group-item-success { + color: #3c763d; + background-color: #dff0d8; +} +a.list-group-item-success { + color: #3c763d; +} +a.list-group-item-success .list-group-item-heading { + color: inherit; +} +a.list-group-item-success:hover, +a.list-group-item-success:focus { + color: #3c763d; + background-color: #d0e9c6; +} +a.list-group-item-success.active, +a.list-group-item-success.active:hover, +a.list-group-item-success.active:focus { + color: #fff; + background-color: #3c763d; + border-color: #3c763d; +} +.list-group-item-info { + color: #31708f; + background-color: #d9edf7; +} +a.list-group-item-info { + color: #31708f; +} +a.list-group-item-info .list-group-item-heading { + color: inherit; +} +a.list-group-item-info:hover, +a.list-group-item-info:focus { + color: #31708f; + background-color: #c4e3f3; +} +a.list-group-item-info.active, +a.list-group-item-info.active:hover, +a.list-group-item-info.active:focus { + color: #fff; + background-color: #31708f; + border-color: #31708f; +} +.list-group-item-warning { + color: #8a6d3b; + background-color: #fcf8e3; +} +a.list-group-item-warning { + color: #8a6d3b; +} +a.list-group-item-warning .list-group-item-heading { + color: inherit; +} +a.list-group-item-warning:hover, +a.list-group-item-warning:focus { + color: #8a6d3b; + background-color: #faf2cc; +} +a.list-group-item-warning.active, +a.list-group-item-warning.active:hover, +a.list-group-item-warning.active:focus { + color: #fff; + background-color: #8a6d3b; + border-color: #8a6d3b; +} +.list-group-item-danger { + color: #a94442; + background-color: #f2dede; +} +a.list-group-item-danger { + color: #a94442; +} +a.list-group-item-danger .list-group-item-heading { + color: inherit; +} +a.list-group-item-danger:hover, +a.list-group-item-danger:focus { + color: #a94442; + background-color: #ebcccc; +} +a.list-group-item-danger.active, +a.list-group-item-danger.active:hover, +a.list-group-item-danger.active:focus { + color: #fff; + background-color: #a94442; + border-color: #a94442; +} +.list-group-item-heading { + margin-top: 0; + margin-bottom: 5px; +} +.list-group-item-text { + margin-bottom: 0; + line-height: 1.3; +} +.panel { + margin-bottom: 14px; + background-color: #ffffff; + border: 1px solid transparent; + border-radius: 4px; + -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); +} +.panel-body { + padding: 15px; +} +.panel-heading { + padding: 10px 15px; + border-bottom: 1px solid transparent; + border-top-right-radius: 3px; + border-top-left-radius: 3px; +} +.panel-heading > .dropdown .dropdown-toggle { + color: inherit; +} +.panel-title { + margin-top: 0; + margin-bottom: 0; + font-size: 14px; + color: inherit; +} +.panel-title > a { + color: inherit; +} +.panel-footer { + padding: 10px 15px; + background-color: #f5f5f5; + border-top: 1px solid #dddddd; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .list-group, +.panel > .panel-collapse > .list-group { + margin-bottom: 0; +} +.panel > .list-group .list-group-item, +.panel > .panel-collapse > .list-group .list-group-item { + border-width: 1px 0; + border-radius: 0; +} +.panel > .list-group:first-child .list-group-item:first-child, +.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child { + border-top: 0; + border-top-right-radius: 3px; + border-top-left-radius: 3px; +} +.panel > .list-group:last-child .list-group-item:last-child, +.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child { + border-bottom: 0; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel-heading + .list-group .list-group-item:first-child { + border-top-width: 0; +} +.list-group + .panel-footer { + border-top-width: 0; +} +.panel > .table, +.panel > .table-responsive > .table, +.panel > .panel-collapse > .table { + margin-bottom: 0; +} +.panel > .table caption, +.panel > .table-responsive > .table caption, +.panel > .panel-collapse > .table caption { + padding-left: 15px; + padding-right: 15px; +} +.panel > .table:first-child, +.panel > .table-responsive:first-child > .table:first-child { + border-top-right-radius: 3px; + border-top-left-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child { + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { + border-top-left-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { + border-top-right-radius: 3px; +} +.panel > .table:last-child, +.panel > .table-responsive:last-child > .table:last-child { + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child { + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { + border-bottom-right-radius: 3px; +} +.panel > .panel-body + .table, +.panel > .panel-body + .table-responsive, +.panel > .table + .panel-body, +.panel > .table-responsive + .panel-body { + border-top: 1px solid #e7ecf1; +} +.panel > .table > tbody:first-child > tr:first-child th, +.panel > .table > tbody:first-child > tr:first-child td { + border-top: 0; +} +.panel > .table-bordered, +.panel > .table-responsive > .table-bordered { + border: 0; +} +.panel > .table-bordered > thead > tr > th:first-child, +.panel > .table-responsive > .table-bordered > thead > tr > th:first-child, +.panel > .table-bordered > tbody > tr > th:first-child, +.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, +.panel > .table-bordered > tfoot > tr > th:first-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, +.panel > .table-bordered > thead > tr > td:first-child, +.panel > .table-responsive > .table-bordered > thead > tr > td:first-child, +.panel > .table-bordered > tbody > tr > td:first-child, +.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, +.panel > .table-bordered > tfoot > tr > td:first-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; +} +.panel > .table-bordered > thead > tr > th:last-child, +.panel > .table-responsive > .table-bordered > thead > tr > th:last-child, +.panel > .table-bordered > tbody > tr > th:last-child, +.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, +.panel > .table-bordered > tfoot > tr > th:last-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, +.panel > .table-bordered > thead > tr > td:last-child, +.panel > .table-responsive > .table-bordered > thead > tr > td:last-child, +.panel > .table-bordered > tbody > tr > td:last-child, +.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, +.panel > .table-bordered > tfoot > tr > td:last-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; +} +.panel > .table-bordered > thead > tr:first-child > td, +.panel > .table-responsive > .table-bordered > thead > tr:first-child > td, +.panel > .table-bordered > tbody > tr:first-child > td, +.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, +.panel > .table-bordered > thead > tr:first-child > th, +.panel > .table-responsive > .table-bordered > thead > tr:first-child > th, +.panel > .table-bordered > tbody > tr:first-child > th, +.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { + border-bottom: 0; +} +.panel > .table-bordered > tbody > tr:last-child > td, +.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, +.panel > .table-bordered > tfoot > tr:last-child > td, +.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, +.panel > .table-bordered > tbody > tr:last-child > th, +.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, +.panel > .table-bordered > tfoot > tr:last-child > th, +.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { + border-bottom: 0; +} +.panel > .table-responsive { + border: 0; + margin-bottom: 0; +} +.panel-group { + margin-bottom: 14px; +} +.panel-group .panel { + margin-bottom: 0; + border-radius: 4px; +} +.panel-group .panel + .panel { + margin-top: 5px; +} +.panel-group .panel-heading { + border-bottom: 0; +} +.panel-group .panel-heading + .panel-collapse > .panel-body, +.panel-group .panel-heading + .panel-collapse > .list-group { + border-top: 1px solid #dddddd; +} +.panel-group .panel-footer { + border-top: 0; +} +.panel-group .panel-footer + .panel-collapse .panel-body { + border-bottom: 1px solid #dddddd; +} +.panel-default { + border-color: #dddddd; +} +.panel-default > .panel-heading { + color: #333333; + background-color: #f5f5f5; + border-color: #dddddd; +} +.panel-default > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #dddddd; +} +.panel-default > .panel-heading .badge { + color: #f5f5f5; + background-color: #333333; +} +.panel-default > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #dddddd; +} +.panel-primary { + border-color: #afe0dc; +} +.panel-primary > .panel-heading { + color: #ffffff; + background-color: #afe0dc; + border-color: #afe0dc; +} +.panel-primary > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #afe0dc; +} +.panel-primary > .panel-heading .badge { + color: #afe0dc; + background-color: #ffffff; +} +.panel-primary > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #afe0dc; +} +.panel-success { + border-color: #d6e9c6; +} +.panel-success > .panel-heading { + color: #3c763d; + background-color: #dff0d8; + border-color: #d6e9c6; +} +.panel-success > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #d6e9c6; +} +.panel-success > .panel-heading .badge { + color: #dff0d8; + background-color: #3c763d; +} +.panel-success > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #d6e9c6; +} +.panel-info { + border-color: #bce8f1; +} +.panel-info > .panel-heading { + color: #31708f; + background-color: #d9edf7; + border-color: #bce8f1; +} +.panel-info > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #bce8f1; +} +.panel-info > .panel-heading .badge { + color: #d9edf7; + background-color: #31708f; +} +.panel-info > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #bce8f1; +} +.panel-warning { + border-color: #faebcc; +} +.panel-warning > .panel-heading { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #faebcc; +} +.panel-warning > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #faebcc; +} +.panel-warning > .panel-heading .badge { + color: #fcf8e3; + background-color: #8a6d3b; +} +.panel-warning > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #faebcc; +} +.panel-danger { + border-color: #ebccd1; +} +.panel-danger > .panel-heading { + color: #a94442; + background-color: #f2dede; + border-color: #ebccd1; +} +.panel-danger > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #ebccd1; +} +.panel-danger > .panel-heading .badge { + color: #f2dede; + background-color: #a94442; +} +.panel-danger > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #ebccd1; +} +.embed-responsive { + position: relative; + display: block; + height: 0; + padding: 0; + overflow: hidden; +} +.embed-responsive .embed-responsive-item, +.embed-responsive iframe, +.embed-responsive embed, +.embed-responsive object, +.embed-responsive video { + position: absolute; + top: 0; + left: 0; + bottom: 0; + height: 100%; + width: 100%; + border: 0; +} +.embed-responsive.embed-responsive-16by9 { + padding-bottom: 56.25%; +} +.embed-responsive.embed-responsive-4by3 { + padding-bottom: 75%; +} +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); +} +.well blockquote { + border-color: #ddd; + border-color: rgba(0, 0, 0, 0.15); +} +.well-lg { + padding: 24px; + border-radius: 6px; +} +.well-sm { + padding: 9px; + border-radius: 3px; +} +.close { + float: right; + font-size: 18px; + font-weight: bold; + line-height: 1; + color: #000000; + text-shadow: 0 1px 0 #ffffff; + opacity: 0.2; + filter: alpha(opacity=20); +} +.close:hover, +.close:focus { + color: #000000; + text-decoration: none; + cursor: pointer; + opacity: 0.5; + filter: alpha(opacity=50); +} +button.close { + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; +} +.modal-open { + overflow: hidden; +} +.modal { + display: none; + overflow: hidden; + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + -webkit-overflow-scrolling: touch; + outline: 0; +} +.modal.fade .modal-dialog { + -webkit-transform: translate(0, -25%); + -ms-transform: translate(0, -25%); + -o-transform: translate(0, -25%); + transform: translate(0, -25%); + -webkit-transition: -webkit-transform 0.3s ease-out; + -moz-transition: -moz-transform 0.3s ease-out; + -o-transition: -o-transform 0.3s ease-out; + transition: transform 0.3s ease-out; +} +.modal.in .modal-dialog { + -webkit-transform: translate(0, 0); + -ms-transform: translate(0, 0); + -o-transform: translate(0, 0); + transform: translate(0, 0); +} +.modal-open .modal { + overflow-x: hidden; + overflow-y: auto; +} +.modal-dialog { + position: relative; + width: 900px; + margin: 150px auto; +} +.modal-content { + position: relative; + background-color: #ffffff; + border: 1px solid #999999; + border: 1px solid rgba(0, 0, 0, 0.2); + border-radius: 6px; + -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); + box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); + background-clip: padding-box; + outline: 0; +} +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + background-color: #000000; +} +.modal-backdrop.fade { + opacity: 0; + filter: alpha(opacity=0); +} +.modal-backdrop.in { + opacity: 0.2; + filter: alpha(opacity=20); +} +.modal-header { + padding: 15px; + border-bottom: 1px solid #e5e5e5; + min-height: 16.18px; +} +.modal-header .close { + margin-top: -2px; +} +.modal-title { + margin: 0; + line-height: 1.18; +} +.modal-body { + position: relative; + padding: 15px; +} +.modal-footer { + padding: 15px; + text-align: right; + border-top: 1px solid #e5e5e5; +} +.modal-footer .btn + .btn { + margin-left: 5px; + margin-bottom: 0; +} +.modal-footer .btn-group .btn + .btn { + margin-left: -1px; +} +.modal-footer .btn-block + .btn-block { + margin-left: 0; +} +.modal-scrollbar-measure { + position: absolute; + top: -9999px; + width: 50px; + height: 50px; + overflow: scroll; +} +@media (min-width: 0) { + .modal-dialog { + width: 900px; + margin: 150px auto 0; + } + .modal-content { + box-shadow: 0 0px 15px rgba(147, 220, 211, 0.5); + border: solid 1px rgba(147, 220, 211, 0.5); + min-height: 150px; + /*max-height: 450px;*/ + overflow: scroll; + } + .modal-sm { + width: 300px; + } +} +@media (min-width: 992px) { + .modal-lg { + width: 900px; + } +} +.tooltip { + position: absolute; + z-index: 1070; + display: block; + visibility: visible; + font-size: 11px; + line-height: 1.4; + opacity: 0; + filter: alpha(opacity=0); +} +.tooltip.in { + opacity: 0.9; + filter: alpha(opacity=90); +} +.tooltip.top { + margin-top: -3px; + padding: 5px 0; +} +.tooltip.right { + margin-left: 3px; + padding: 0 5px; +} +.tooltip.bottom { + margin-top: 3px; + padding: 5px 0; +} +.tooltip.left { + margin-left: -3px; + padding: 0 5px; +} +.tooltip-inner { + max-width: 200px; + padding: 3px 8px; + color: #ffffff; + text-align: center; + text-decoration: none; + background-color: #000000; + border-radius: 4px; +} +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-width: 5px 5px 0; + border-top-color: #000000; +} +.tooltip.top-left .tooltip-arrow { + bottom: 0; + left: 5px; + border-width: 5px 5px 0; + border-top-color: #000000; +} +.tooltip.top-right .tooltip-arrow { + bottom: 0; + right: 5px; + border-width: 5px 5px 0; + border-top-color: #000000; +} +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-width: 5px 5px 5px 0; + border-right-color: #000000; +} +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-width: 5px 0 5px 5px; + border-left-color: #000000; +} +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000000; +} +.tooltip.bottom-left .tooltip-arrow { + top: 0; + left: 5px; + border-width: 0 5px 5px; + border-bottom-color: #000000; +} +.tooltip.bottom-right .tooltip-arrow { + top: 0; + right: 5px; + border-width: 0 5px 5px; + border-bottom-color: #000000; +} +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1060; + display: none; + max-width: 276px; + padding: 1px; + font-size: 12px; + font-weight: normal; + line-height: 1.18; + text-align: left; + background-color: #ffffff; + background-clip: padding-box; + border: 1px solid #cccccc; + border: 1px solid rgba(0, 0, 0, 0.2); + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + white-space: normal; +} +.popover.top { + margin-top: -10px; +} +.popover.right { + margin-left: 10px; +} +.popover.bottom { + margin-top: 10px; +} +.popover.left { + margin-left: -10px; +} +.popover-title { + margin: 0; + padding: 8px 14px; + font-size: 12px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + border-radius: 5px 5px 0 0; +} +.popover-content { + padding: 9px 14px; +} +.popover > .arrow, +.popover > .arrow:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.popover > .arrow { + border-width: 11px; +} +.popover > .arrow:after { + border-width: 10px; + content: ""; +} +.popover.top > .arrow { + left: 50%; + margin-left: -11px; + border-bottom-width: 0; + border-top-color: #999999; + border-top-color: rgba(0, 0, 0, 0.25); + bottom: -11px; +} +.popover.top > .arrow:after { + content: " "; + bottom: 1px; + margin-left: -10px; + border-bottom-width: 0; + border-top-color: #ffffff; +} +.popover.right > .arrow { + top: 50%; + left: -11px; + margin-top: -11px; + border-left-width: 0; + border-right-color: #999999; + border-right-color: rgba(0, 0, 0, 0.25); +} +.popover.right > .arrow:after { + content: " "; + left: 1px; + bottom: -10px; + border-left-width: 0; + border-right-color: #ffffff; +} +.popover.bottom > .arrow { + left: 50%; + margin-left: -11px; + border-top-width: 0; + border-bottom-color: #999999; + border-bottom-color: rgba(0, 0, 0, 0.25); + top: -11px; +} +.popover.bottom > .arrow:after { + content: " "; + top: 1px; + margin-left: -10px; + border-top-width: 0; + border-bottom-color: #ffffff; +} +.popover.left > .arrow { + top: 50%; + right: -11px; + margin-top: -11px; + border-right-width: 0; + border-left-color: #999999; + border-left-color: rgba(0, 0, 0, 0.25); +} +.popover.left > .arrow:after { + content: " "; + right: 1px; + border-right-width: 0; + border-left-color: #ffffff; + bottom: -10px; +} +.carousel { + position: relative; +} +.carousel-inner { + position: relative; + overflow: hidden; + width: 100%; +} +.carousel-inner > .item { + display: none; + position: relative; + -webkit-transition: 0.6s ease-in-out left; + -o-transition: 0.6s ease-in-out left; + transition: 0.6s ease-in-out left; +} +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + line-height: 1; +} +@media all and (transform-3d), (-webkit-transform-3d) { + .carousel-inner > .item { + transition: transform 0.6s ease-in-out; + backface-visibility: hidden; + perspective: 1000; + } + .carousel-inner > .item.next, + .carousel-inner > .item.active.right { + transform: translate3d(100%, 0, 0); + left: 0; + } + .carousel-inner > .item.prev, + .carousel-inner > .item.active.left { + transform: translate3d(-100%, 0, 0); + left: 0; + } + .carousel-inner > .item.next.left, + .carousel-inner > .item.prev.right, + .carousel-inner > .item.active { + transform: translate3d(0, 0, 0); + left: 0; + } +} +.carousel-inner > .active, +.carousel-inner > .next, +.carousel-inner > .prev { + display: block; +} +.carousel-inner > .active { + left: 0; +} +.carousel-inner > .next, +.carousel-inner > .prev { + position: absolute; + top: 0; + width: 100%; +} +.carousel-inner > .next { + left: 100%; +} +.carousel-inner > .prev { + left: -100%; +} +.carousel-inner > .next.left, +.carousel-inner > .prev.right { + left: 0; +} +.carousel-inner > .active.left { + left: -100%; +} +.carousel-inner > .active.right { + left: 100%; +} +.carousel-control { + position: absolute; + top: 0; + left: 0; + bottom: 0; + width: 15%; + opacity: 0.5; + filter: alpha(opacity=50); + font-size: 20px; + color: #ffffff; + text-align: center; + text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); +} +.carousel-control.left { + background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%); + background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%); + background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); +} +.carousel-control.right { + left: auto; + right: 0; + background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%); + background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%); + background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); +} +.carousel-control:hover, +.carousel-control:focus { + outline: 0; + color: #ffffff; + text-decoration: none; + opacity: 0.9; + filter: alpha(opacity=90); +} +.carousel-control .icon-prev, +.carousel-control .icon-next, +.carousel-control .glyphicon-chevron-left, +.carousel-control .glyphicon-chevron-right { + position: absolute; + top: 50%; + z-index: 5; + display: inline-block; +} +.carousel-control .icon-prev, +.carousel-control .glyphicon-chevron-left { + left: 50%; + margin-left: -10px; +} +.carousel-control .icon-next, +.carousel-control .glyphicon-chevron-right { + right: 50%; + margin-right: -10px; +} +.carousel-control .icon-prev, +.carousel-control .icon-next { + width: 20px; + height: 20px; + margin-top: -10px; + font-family: serif; +} +.carousel-control .icon-prev:before { + content: '\2039'; +} +.carousel-control .icon-next:before { + content: '\203a'; +} +.carousel-indicators { + position: absolute; + bottom: 10px; + left: 50%; + z-index: 15; + width: 60%; + margin-left: -30%; + padding-left: 0; + list-style: none; + text-align: center; +} +.carousel-indicators li { + display: inline-block; + width: 10px; + height: 10px; + margin: 1px; + text-indent: -999px; + border: 1px solid #ffffff; + border-radius: 10px; + cursor: pointer; + background-color: #000 \9; + background-color: rgba(0, 0, 0, 0); +} +.carousel-indicators .active { + margin: 0; + width: 12px; + height: 12px; + background-color: #ffffff; +} +.carousel-caption { + position: absolute; + left: 15%; + right: 15%; + bottom: 20px; + z-index: 10; + padding-top: 20px; + padding-bottom: 20px; + color: #ffffff; + text-align: center; + text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); +} +.carousel-caption .btn { + text-shadow: none; +} +@media screen and (min-width: 768px) { + .carousel-control .glyphicon-chevron-left, + .carousel-control .glyphicon-chevron-right, + .carousel-control .icon-prev, + .carousel-control .icon-next { + width: 30px; + height: 30px; + margin-top: -15px; + font-size: 30px; + } + .carousel-control .glyphicon-chevron-left, + .carousel-control .icon-prev { + margin-left: -15px; + } + .carousel-control .glyphicon-chevron-right, + .carousel-control .icon-next { + margin-right: -15px; + } + .carousel-caption { + left: 20%; + right: 20%; + padding-bottom: 30px; + } + .carousel-indicators { + bottom: 20px; + } +} +.clearfix:before, +.clearfix:after, +.dl-horizontal dd:before, +.dl-horizontal dd:after, +.container:before, +.container:after, +.container-fluid:before, +.container-fluid:after, +.row:before, +.row:after, +.form-horizontal .form-group:before, +.form-horizontal .form-group:after, +.btn-toolbar:before, +.btn-toolbar:after, +.btn-group-vertical > .btn-group:before, +.btn-group-vertical > .btn-group:after, +.nav:before, +.nav:after, +.navbar:before, +.navbar:after, +.navbar-header:before, +.navbar-header:after, +.navbar-collapse:before, +.navbar-collapse:after, +.pager:before, +.pager:after, +.panel-body:before, +.panel-body:after, +.modal-footer:before, +.modal-footer:after { + content: " "; + display: table; +} +.clearfix:after, +.dl-horizontal dd:after, +.container:after, +.container-fluid:after, +.row:after, +.form-horizontal .form-group:after, +.btn-toolbar:after, +.btn-group-vertical > .btn-group:after, +.nav:after, +.navbar:after, +.navbar-header:after, +.navbar-collapse:after, +.pager:after, +.panel-body:after, +.modal-footer:after { + clear: both; +} +.center-block { + display: block; + margin-left: auto; + margin-right: auto; +} +.pull-right { + float: right !important; +} +.pull-left { + float: left !important; +} +.hide { + display: none !important; +} +.show { + display: block !important; +} +.invisible { + visibility: hidden; +} +.text-hide { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} +.hidden { + display: none !important; + visibility: hidden !important; +} +.affix { + position: fixed; +} +@-ms-viewport { + width: device-width; +} +.visible-xs, +.visible-sm, +.visible-md, +.visible-lg { + display: none !important; +} +.visible-xs-block, +.visible-xs-inline, +.visible-xs-inline-block, +.visible-sm-block, +.visible-sm-inline, +.visible-sm-inline-block, +.visible-md-block, +.visible-md-inline, +.visible-md-inline-block, +.visible-lg-block, +.visible-lg-inline, +.visible-lg-inline-block { + display: none !important; +} +@media (max-width: 767px) { + .visible-xs { + display: block !important; + } + table.visible-xs { + display: table; + } + tr.visible-xs { + display: table-row !important; + } + th.visible-xs, + td.visible-xs { + display: table-cell !important; + } +} +@media (max-width: 767px) { + .visible-xs-block { + display: block !important; + } +} +@media (max-width: 767px) { + .visible-xs-inline { + display: inline !important; + } +} +@media (max-width: 767px) { + .visible-xs-inline-block { + display: inline-block !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm { + display: block !important; + } + table.visible-sm { + display: table; + } + tr.visible-sm { + display: table-row !important; + } + th.visible-sm, + td.visible-sm { + display: table-cell !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-block { + display: block !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-inline { + display: inline !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-inline-block { + display: inline-block !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md { + display: block !important; + } + table.visible-md { + display: table; + } + tr.visible-md { + display: table-row !important; + } + th.visible-md, + td.visible-md { + display: table-cell !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-block { + display: block !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-inline { + display: inline !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-inline-block { + display: inline-block !important; + } +} +@media (min-width: 1200px) { + .visible-lg { + display: block !important; + } + table.visible-lg { + display: table; + } + tr.visible-lg { + display: table-row !important; + } + th.visible-lg, + td.visible-lg { + display: table-cell !important; + } +} +@media (min-width: 1200px) { + .visible-lg-block { + display: block !important; + } +} +@media (min-width: 1200px) { + .visible-lg-inline { + display: inline !important; + } +} +@media (min-width: 1200px) { + .visible-lg-inline-block { + display: inline-block !important; + } +} +@media (max-width: 767px) { + .hidden-xs { + display: none !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .hidden-sm { + display: none !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .hidden-md { + display: none !important; + } +} +@media (min-width: 1200px) { + .hidden-lg { + display: none !important; + } +} +.visible-print { + display: none !important; +} +@media print { + .visible-print { + display: block !important; + } + table.visible-print { + display: table; + } + tr.visible-print { + display: table-row !important; + } + th.visible-print, + td.visible-print { + display: table-cell !important; + } +} +.visible-print-block { + display: none !important; +} +@media print { + .visible-print-block { + display: block !important; + } +} +.visible-print-inline { + display: none !important; +} +@media print { + .visible-print-inline { + display: inline !important; + } +} +.visible-print-inline-block { + display: none !important; +} +@media print { + .visible-print-inline-block { + display: inline-block !important; + } +} +@media print { + .hidden-print { + display: none !important; + } +} +/*# sourceMappingURL=bootstrap.css.map */ \ No newline at end of file diff --git a/web/admin/css/common/bootstrap.min.css b/web/admin/css/common/bootstrap.min.css new file mode 100644 index 0000000..bca1a56 --- /dev/null +++ b/web/admin/css/common/bootstrap.min.css @@ -0,0 +1,5 @@ +/*! + * Bootstrap v3.3.0 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:before,:after{color:#000!important;text-shadow:none!important;background:transparent!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before,.glyphicon-eur:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#777}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}mark,.mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:34px;line-height:1.42857143 \0}input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px;line-height:1.5 \0}input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px;line-height:1.33 \0}_:-ms-fullscreen,:root input[type=date],_:-ms-fullscreen,:root input[type=time],_:-ms-fullscreen,:root input[type=datetime-local],_:-ms-fullscreen,:root input[type=month]{line-height:1.42857143}_:-ms-fullscreen.input-sm,:root input[type=date].input-sm,_:-ms-fullscreen.input-sm,:root input[type=time].input-sm,_:-ms-fullscreen.input-sm,:root input[type=datetime-local].input-sm,_:-ms-fullscreen.input-sm,:root input[type=month].input-sm{line-height:1.5}_:-ms-fullscreen.input-lg,:root input[type=date].input-lg,_:-ms-fullscreen.input-lg,:root input[type=time].input-lg,_:-ms-fullscreen.input-lg,:root input[type=datetime-local].input-lg,_:-ms-fullscreen.input-lg,:root input[type=month].input-lg{line-height:1.33}.form-group{margin-bottom:15px}.radio,.checkbox{position:relative;display:block;margin-top:10px;margin-bottom:10px}.radio label,.checkbox label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.radio input[type=radio],.radio-inline input[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{position:absolute;margin-top:4px \9;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type=radio][disabled],input[type=checkbox][disabled],input[type=radio].disabled,input[type=checkbox].disabled,fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox]{cursor:not-allowed}.radio-inline.disabled,.checkbox-inline.disabled,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.radio.disabled label,.checkbox.disabled label,fieldset[disabled] .radio label,fieldset[disabled] .checkbox label{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm,.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm,select.form-group-sm .form-control{height:30px;line-height:30px}textarea.input-sm,textarea.form-group-sm .form-control,select[multiple].input-sm,select[multiple].form-group-sm .form-control{height:auto}.input-lg,.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg,select.form-group-lg .form-control{height:46px;line-height:46px}textarea.input-lg,textarea.form-group-lg .form-control,select[multiple].input-lg,select[multiple].form-group-lg .form-control{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline,.has-success.radio label,.has-success.checkbox label,.has-success.radio-inline label,.has-success.checkbox-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline,.has-warning.radio label,.has-warning.checkbox label,.has-warning.radio-inline label,.has-warning.checkbox-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline,.has-error.radio label,.has-error.checkbox label,.has-error.radio-inline label,.has-error.checkbox-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:14.3px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn:focus,.btn:active:focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn.active.focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus,.btn.focus{color:#333;text-decoration:none}.btn:active,.btn.active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default.focus,.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled.focus,.btn-default[disabled].focus,fieldset[disabled] .btn-default.focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary.focus,.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#3071a9;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled.focus,.btn-primary[disabled].focus,fieldset[disabled] .btn-primary.focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success.focus,.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled.focus,.btn-success[disabled].focus,fieldset[disabled] .btn-success.focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info.focus,.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled.focus,.btn-info[disabled].focus,fieldset[disabled] .btn-info.focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning.focus,.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled.focus,.btn-warning[disabled].focus,fieldset[disabled] .btn-warning.focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger.focus,.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled.focus,.btn-danger[disabled].focus,fieldset[disabled] .btn-danger.focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#428bca;border-radius:0}.btn-link,.btn-link:active,.btn-link.active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#777;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none;visibility:hidden}.collapse.in{display:block;visibility:visible}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#428bca;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#777}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px solid}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=radio],[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=radio],.input-group-addon input[type=checkbox]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none;visibility:hidden}.tab-content>.active{display:block;visibility:visible}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important;visibility:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:200px}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn,.navbar-form .input-group .form-control{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .radio label,.navbar-form .checkbox label{padding-left:0}.navbar-form .radio input[type=radio],.navbar-form .checkbox input[type=checkbox]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:hover,.navbar-default .btn-link:focus{color:#333}.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:hover,.navbar-default .btn-link[disabled]:focus,fieldset[disabled] .navbar-default .btn-link:focus{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:hover,.navbar-inverse .btn-link:focus{color:#fff}.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:hover,.navbar-inverse .btn-link[disabled]:focus,fieldset[disabled] .navbar-inverse .btn-link:focus{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#428bca;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;cursor:default;background-color:#428bca;border-color:#428bca}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:hover,a.label:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:hover,.label-default[href]:focus{background-color:#5e5e5e}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px 15px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding:48px 0}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar,.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress.active .progress-bar,.progress-bar.active{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-left,.media-right,.media-body{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{color:#555;text-decoration:none;background-color:#f5f5f5}.list-group-item.disabled,.list-group-item.disabled:hover,.list-group-item.disabled:focus{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}.list-group-item.active .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>.small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:hover .list-group-item-text,.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:focus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.table,.panel>.table-responsive>.table,.panel>.panel-collapse>.table{margin-bottom:0}.panel>.table caption,.panel>.table-responsive>.table caption,.panel>.panel-collapse>.table caption{padding-right:15px;padding-left:15px}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.panel-body,.panel-group .panel-heading+.panel-collapse>.list-group{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#428bca}.panel-primary>.panel-heading .badge{color:#428bca;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{min-height:16.43px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-size:12px;line-height:1.4;visibility:visible;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{right:5px;bottom:0;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-size:14px;font-weight:400;line-height:1.42857143;text-align:left;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000;perspective:1000}.carousel-inner>.item.next,.carousel-inner>.item.active.right{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.prev,.carousel-inner>.item.active.left{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right,.carousel-inner>.item.active{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%;margin-left:-10px}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%;margin-right:-10px}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.dl-horizontal dd:before,.dl-horizontal dd:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-footer:before,.modal-footer:after{display:table;content:" "}.clearfix:after,.dl-horizontal dd:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-footer:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none!important}.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} \ No newline at end of file diff --git a/web/admin/css/common/common.css b/web/admin/css/common/common.css new file mode 100644 index 0000000..80f4aa3 --- /dev/null +++ b/web/admin/css/common/common.css @@ -0,0 +1,4 @@ +/*color*/ +.bg_col_f{ + color: #fff; +} diff --git a/web/admin/css/common/home.css b/web/admin/css/common/home.css new file mode 100644 index 0000000..2f88481 --- /dev/null +++ b/web/admin/css/common/home.css @@ -0,0 +1,87 @@ +.bg_color{ + background-color: #fbfbfc; +} +.zzhead{ + position: fixed; + top: 0; + background-color: #fff; + width: 100%; + font-family: PingFangSC-Regular; + color: #1b1a20; + z-index: 100; +} +.zzhead h1{ + display: inline-block; +} +.zzhead img{ + vertical-align: top; + width: 32px; + margin-top: 14px; + margin-left: 70px; +} +@media (max-height: 600px) { + .zzbody{ + margin: 106px 50px 50px; + max-height: 450px; + min-width: 400px; + border: 1px solid #efeff4; + background-color: #fff; + min-width: 1000px; + + } +} +@media (min-height: 601px) and (max-height: 799px) { + .zzbody{ + margin: 106px 50px 50px; + max-height: 600px; + min-width: 400px; + border: 1px solid #efeff4; + background-color: #fff; + min-width: 1000px; + + } +} +@media (min-height: 800px) { + .zzbody{ + margin: 106px 50px 50px; + max-height: 800px; + min-width: 400px; + border: 1px solid #efeff4; + background-color: #fff; + min-width: 1000px; + + } +} + +.zzmenu{ + width: 200px; + background-color: #FFF; + min-height: 650px; + border-right: 1px solid #efeff4; + vertical-align: top; +} +.zzcontent{ + overflow: scroll; + max-height: 800px; + padding: 50px; + overflow-x: hidden; + /*min-width: 700px;*/ +} +.ub +{ + display: -webkit-box; + display: -moz-box; + display: box; + position:relative; +} +.ub-f1 +{ + position:relative; + -webkit-box-flex: 1; + -moz-box-flex: 1; + box-flex: 1; +} +.timepicker_width{ + width: 150px; +} + diff --git a/web/admin/css/common/module.css b/web/admin/css/common/module.css new file mode 100644 index 0000000..ce4f82a --- /dev/null +++ b/web/admin/css/common/module.css @@ -0,0 +1,488 @@ +.iframe_box{ + min-width: 1110px; + padding: 20px; +} +/*时间选择器*/ +.timepicker{ + position: relative; + display: inline-block; + outline: none; + font-size: 12px; + -webkit-transition: opacity 0.3s ease; + transition: opacity 0.3s ease; + width: 101px; +} +.timepicker input{ + width: 101px!important; +} +.timepicker span{ + color: #ccc; + top: 8px; + left: 80px; + position: absolute!important; +} +.timepicker_select{ + width: 101px; + height: 127px; + box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.08); + border: 1px solid #efeff4; + border-radius: 3px; + position: absolute; + display: none; + background-color: #fff; +} +.timepicker_box{ + width: 100px; + display: inline-block; +} +.select_hour_box{ + overflow-x: hidden; + width: 49px; + border-right:1px solid #efeff4; + height: 125px; + float: left; + overflow: hidden; + padding-bottom: 100px; +} +.select_minute_box{ + width: 49px; + height: 125px; + float: left; + overflow: hidden; + padding-bottom: 100px; + overflow-x: hidden; +} +.select_hour{ + width: 48px; + height: 25px; + text-align: left; + line-height: 25px; + padding-left: 8px; + color: #999; + cursor: pointer; + -webkit-transition: background 0.3s ease; + transition: background 0.3s ease; + -webkit-user-select:none; + -moz-user-select:none; + -ms-user-select:none; + user-select:none; +} +.select_hour_box div:hover { + background: #eef9f8; +} +.select_minute_box div:hover { + background: #eef9f8; +} +.timepicker_select div:hover { + overflow-y: scroll; +} +.select_minute{ + width: 49px; + height: 25px; + text-align: left; + line-height: 25px; + padding-left: 8px; + color: #999; + cursor: pointer; + -webkit-transition: background 0.3s ease; + transition: background 0.3s ease; + -webkit-user-select:none; + -moz-user-select:none; + -ms-user-select:none; + user-select:none; +} +.select_option{ + background: #f7f7f7; + font-weight: bold; +} + +/*分页*/ +.pageDiv { + padding: 15px 20px; + color: #ccc; + clear: both; +} + +.pageDiv a { + color: #4c4c4c; + background: #F7F7FC; + display: inline-block; + padding: 3px 10px; + border: 1px solid #ddd; + margin: 0 2px; + vertical-align: middle; + font-size: 12px; + border-radius: 4px; +} + +.pageDiv a:hover { + text-decoration: none; + border: 1px solid #428bca; +} + +.pageDiv span.current { + display: inline-block; + padding: 3px 10px; + margin: 0 2px; + color: #ed601b; + border-radius: 4px; + vertical-align: middle; + border: 1px solid #ccc; +} + +.pageDiv span.disabled { + display: inline-block; + padding: 3px 10px; + margin: 0 2px; + color: #bfbfbf; + background: #f2f2f2; + border: 1px solid #bfbfbf; + vertical-align: middle; + border-radius: 4px; +} + +.pageDiv span.pagecount { + padding: 0 10px; + font-size: 14px; + color: #999999; + margin-right: -20px; +} + +.pageDiv span.countYe { + color: #4C4C4C; + font-size: 14px; + margin-left: 30px; +} + +.pageDiv span.countYe input { + outline: none; + border: 1px solid #ddd; + height: 25px; + padding: 0px; + width: 25px; + margin: 0 5px; + border-radius: 5px; +} + +.pageDiv a.turndown { + padding: 4px 15px; + margin-right: 0; + margin-left: 15px; +} + +.pageDiv { + padding-right: 0 +} + +/*NO.3 下拉筛选*/ + +.combo-select { + position: relative; + max-width: 400px; + width: 151px; + display: inline-block; + /*margin-bottom: 15px;*/ + font: 100% Helvetica, Arial, Sans-serif; + border: 1px #ccc solid; + border-radius: 3px; } + .combo-select .combo-input { + margin-bottom: 0; } + +/** + * Input field + */ +.combo-input { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + margin: 0; + text-overflow: ellipsis; + white-space: nowrap; + border: none; + width: 100%; + box-sizing: border-box; + padding: 8px; + padding-right: 60px; + border-radius: 3px; } + .combo-input:focus { + outline: none; } + +/** + * Arrow + */ +.combo-arrow { + position: absolute; + right: 0; + top: 0; + height: 100%; + cursor: pointer; + text-align: center; + font-size: 14px; + width: 40px; + font-size: 12px; + color: #999999; } + .combo-arrow:before { + content: " "; + border-left: 5px solid transparent; + border-right: 5px solid transparent; + border-top: 5px solid #cccccc; + display: block; + width: 0; + height: 0; + top: 0; + right: 15px; + bottom: 0; + position: absolute; + margin: auto 0; } + +/** + * When opened + */ +.combo-open .combo-arrow { + border-color: #51A7E8; } + .combo-open .combo-arrow:before { + border-top: none; + border-bottom: 5px solid #cccccc; } + +/** + * When focused + */ +.combo-focus { + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26); + border-color: #51A7E8; } + .combo-focus input { + border-color: #51A7E8; } + +/** + * Hide native select + */ +.combo-select select { + position: absolute; + z-index: 1; + left: 0; + top: 0; + width: 100%; + height: 0; + border: 0; + -webkit-appearance: none; + opacity: 0; } + +@media only screen and (min-width: 960px) { + .combo-select select { + left: -1px; + top: -1px; + width: 0; + height: 0; + margin: 0; } } +/** + * Selected option + */ +.option-selected { + background-color: #eee; } + +/** + * Hovered option + */ +.option-hover { + background-color: #afe0dc; + color: #fff; } + +/** + * Option item + */ +.option-item { + cursor: pointer; + border-bottom: 1px #e3e3e3 solid; } + .option-item:hover { + background-color: #afe0dc; + color: #fff; } + .option-item:last-child { + border-bottom: none; } + +/** + * Disabled and optgroups + */ +.option-group { + cursor: text; + font-weight: 600; + background: #e1e1e1; + border: 1px #ccc solid; + border-width: 1px 0; } + +/** + * Disabled + */ +.option-disabled { + opacity: 0.5; } + +/** + * Dropdown + */ +.combo-dropdown { + position: absolute; + z-index: 100; + top: 100%; + left: 0; + min-width: 100%; + max-width: 300px; + max-height: 300px; + margin: 0; + padding: 0; + display: none; + overflow-y: auto; + background: #fff; + border: 1px solid #ccc; + border-radius: 0; + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26); + box-sizing: border-box; } + .combo-dropdown li { + list-style: none; + padding: 8px 1em; + margin: 0; } + +/** + * On Active + */ +.combo-open .combo-dropdown { + display: block; + } + +/** + * Search marker + */ +.combo-marker { + text-decoration: underline; +} +.form_date{ + width: 205px; +} + +/*alert 弹框*/ +/*垂直居中­*/ + +.verticalAlign { + vertical-align: middle; + display: inline-block; + height: 100%; + margin-left: -1px; +} + +.xcConfirm .xc_layer { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0; + background-color: #666666; + z-index: 2147000000; +} + +.xcConfirm .popBox { + position: fixed; + left: 50%; + top: 25%; + background-color: #ffffff; + z-index: 2147000001; + width: 570px; + height: 300px; + margin-left: -285px; + margin-top: -150px; + border-radius: 5px; + font-weight: bold; + color: #535e66; + opacity: 0; +} + +.xcConfirm .popBox .ttBox { + height: 60px; + padding: 14px 30px; + border-bottom: solid 1px #eef0f1; +} + +.xcConfirm .popBox .ttBox .tt { + font-size: 18px; + display: block; + float: left; + height: 30px; + position: relative; +} + +.xcConfirm .popBox .ttBox .clsBtn { + display: block; + cursor: pointer; + width: 12px; + height: 12px; + position: absolute; + top: 22px; + right: 30px; + background: url(../images/icons.png) -48px -96px no-repeat; +} + +.xcConfirm .popBox .txtBox { + margin: 40px 100px; + height: 100px; + overflow: hidden; +} + +.xcConfirm .popBox .txtBox .bigIcon { + float: left; + margin-right: 20px; + width: 48px; + height: 48px; + background-image: url(../images/icons.png); + background-repeat: no-repeat; + background-position: 48px 0; +} + +.xcConfirm .popBox .txtBox p { + height: 84px; + margin-top: 16px; + line-height: 26px; + overflow-x: hidden; + overflow-y: auto; + font-size: 17px; +} + +.xcConfirm .popBox .txtBox p input { + width: 364px; + height: 30px; + border: solid 1px #eef0f1; + font-size: 18px; + margin-top: 6px; +} + +.xcConfirm .popBox .btnArea { + border-top: solid 1px #eef0f1; +} + +.xcConfirm .popBox .btnGroup { + float: right; +} + +.xcConfirm .popBox .btnGroup .sgBtn { + margin-top: 14px; + margin-right: 10px; +} + +.xcConfirm .popBox .sgBtn { + display: block; + cursor: pointer; + float: left; + width: 95px; + height: 35px; + line-height: 35px; + text-align: center; + color: #FFFFFF; + border-radius: 5px; +} + +.xcConfirm .popBox .sgBtn.ok { + background-color: #0095d9; + color: #FFFFFF; +} + +.xcConfirm .popBox .sgBtn.cancel { + background-color: #546a79; + color: #FFFFFF; +} \ No newline at end of file diff --git a/web/admin/css/common/upload.css b/web/admin/css/common/upload.css new file mode 100644 index 0000000..ebb18f1 --- /dev/null +++ b/web/admin/css/common/upload.css @@ -0,0 +1,196 @@ +.uploader{ +position:relative; +display:inline-block; +overflow:hidden; +cursor:default; +padding:0; +-moz-box-shadow:0px 0px 5px #ddd; +-webkit-box-shadow:0px 0px 5px #ddd; +box-shadow:0px 0px 5px #ddd; + +-moz-border-radius:5px; +-webkit-border-radius:5px; +border-radius:5px; +} + +.filename{ +float:left; +display:inline-block; +outline:0 none; +height:32px; +width:180px; +margin:0; +padding:8px 10px; +overflow:hidden; +cursor:default; +border:1px solid; +border-right:0; +font:9pt/100% Arial, Helvetica, sans-serif; color:#777; +text-shadow:1px 1px 0px #fff; +text-overflow:ellipsis; +white-space:nowrap; + +-moz-border-radius:5px 0px 0px 5px; +-webkit-border-radius:5px 0px 0px 5px; +border-radius:5px 0px 0px 5px; + +background:#f5f5f5; +background:-moz-linear-gradient(top, #fafafa 0%, #eee 100%); +background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,#fafafa), color-stop(100%,#f5f5f5)); +filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fafafa', endColorstr='#f5f5f5',GradientType=0); +border-color:#ccc; + +-moz-box-shadow:0px 0px 1px #fff inset; +-webkit-box-shadow:0px 0px 1px #fff inset; +box-shadow:0px 0px 1px #fff inset; + +-moz-box-sizing:border-box; +-webkit-box-sizing:border-box; +box-sizing:border-box; +} + +.button{ +float:left; +height:32px; +display:inline-block; +outline:0 none; +padding:8px 12px; +margin:0; +cursor:pointer; +border:1px solid; +font:bold 9pt/100% Arial, Helvetica, sans-serif; + +-moz-border-radius:0px 5px 5px 0px; +-webkit-border-radius:0px 5px 5px 0px; +border-radius:0px 5px 5px 0px; + +-moz-box-shadow:0px 0px 1px #fff inset; +-webkit-box-shadow:0px 0px 1px #fff inset; +box-shadow:0px 0px 1px #fff inset; +} + + +.uploader input[type=file]{ +position:absolute; +top:0; right:0; bottom:0; +border:0; +padding:0; margin:0; +height:30px; +cursor:pointer; +filter:alpha(opacity=0); +-moz-opacity:0; +-khtml-opacity: 0; +opacity:0; +} + +input[type=button]::-moz-focus-inner{padding:0; border:0 none; -moz-box-sizing:content-box;} +input[type=button]::-webkit-focus-inner{padding:0; border:0 none; -webkit-box-sizing:content-box;} +input[type=text]::-moz-focus-inner{padding:0; border:0 none; -moz-box-sizing:content-box;} +input[type=text]::-webkit-focus-inner{padding:0; border:0 none; -webkit-box-sizing:content-box;} + +/* White Color Scheme ------------------------ */ + +.white .button{ +color:#555; +text-shadow:1px 1px 0px #fff; +background:#ddd; +background:-moz-linear-gradient(top, #eeeeee 0%, #dddddd 100%); +background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,#eeeeee), color-stop(100%,#dddddd)); +filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#dddddd',GradientType=0); +border-color:#ccc; +} + +.white:hover .button{ +background:#eee; +background:-moz-linear-gradient(top, #dddddd 0%, #eeeeee 100%); +background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,#dddddd), color-stop(100%,#eeeeee)); +filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dddddd', endColorstr='#eeeeee',GradientType=0); +} + +/* Blue Color Scheme ------------------------ */ + +.blue .button{ +color:#fff; +background:#5bc0de; +border-color:#46b8da; +} + +.blue:hover .button{ +background:#31b0d5; +} + +/* Green Color Scheme ------------------------ */ + +.green .button{ +color:#fff; +text-shadow:1px 1px 0px #6b7735; +background:#7d8f33; +background:-moz-linear-gradient(top, #93aa4c 0%, #7d8f33 100%); +background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,#93aa4c), color-stop(100%,#7d8f33)); +filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#93aa4c', endColorstr='#7d8f33',GradientType=0); +border-color:#6b7735; +} + +.green:hover .button{ +background:#93aa4c; +background:-moz-linear-gradient(top, #7d8f33 0%, #93aa4c 100%); +background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,#7d8f33), color-stop(100%,#93aa4c)); +filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#7d8f33', endColorstr='#93aa4c',GradientType=0); +} + +/* Red Color Scheme ------------------------ */ + +.red .button{ +color:#fff; +text-shadow:1px 1px 0px #7e0238; +background:#90013f; +background:-moz-linear-gradient(top, #b42364 0%, #90013f 100%); +background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,#b42364), color-stop(100%,#90013f)); +filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b42364', endColorstr='#90013f',GradientType=0); +border-color:#7e0238; +} + +.red:hover .button{ +background:#b42364; +background:-moz-linear-gradient(top, #90013f 0%, #b42364 100%); +background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,#90013f), color-stop(100%,#b42364)); +filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#90013f', endColorstr='#b42364',GradientType=0); +} + +/* Orange Color Scheme ------------------------ */ + +.orange .button{ +color:#fff; +text-shadow:1px 1px 0px #c04501; +background:#d54d01; +background:-moz-linear-gradient(top, #f86c1f 0%, #d54d01 100%); +background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,#f86c1f), color-stop(100%,#d54d01)); +filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f86c1f', endColorstr='#d54d01',GradientType=0); +border-color:#c04501; +} + +.orange:hover .button{ +background:#f86c1f; +background:-moz-linear-gradient(top, #d54d01 0%, #f86c1f 100%); +background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,#d54d01), color-stop(100%,#f86c1f)); +filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#d54d01', endColorstr='#f86c1f',GradientType=0); +} + +/* Black Color Scheme ------------------------ */ + +.black .button{ +color:#fff; +text-shadow:1px 1px 0px #111111; +background:#222222; +background:-moz-linear-gradient(top, #444444 0%, #222222 100%); +background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,#444444), color-stop(100%,#222222)); +filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#444444', endColorstr='#222222',GradientType=0); +border-color:#111111; +} + +.black:hover .button{ +background:#444444; +background:-moz-linear-gradient(top, #222222 0%, #444444 100%); +background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,#222222), color-stop(100%,#444444)); +filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#222222', endColorstr='#444444',GradientType=0); +} \ No newline at end of file diff --git a/web/admin/css/distributor_list.css b/web/admin/css/distributor_list.css new file mode 100644 index 0000000..980a235 --- /dev/null +++ b/web/admin/css/distributor_list.css @@ -0,0 +1,33 @@ +.table_box{ + border: 1px solid #ccc; + border-top: 0; +} +#distributor_list{ + padding: 1px; +} +#distributor_check{ + padding: 1px; +} +.dis_search{ + margin: 30px; + padding: 10px; + background-color: #f7f7fc; +} +.search_list_1{ + margin-bottom: 10px; + margin-top: 10px; +} +.search_name{ + display: inline-block; + /*width: 74px;*/ + text-align: right; +} +.float_r{ + float: right; +} +.mar_r{ + margin-right: 10px; +} +.dis_table{ + margin: 30px; +} diff --git a/web/admin/css/fonts/fontawesome-webfont.woff b/web/admin/css/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..b9bd17e Binary files /dev/null and b/web/admin/css/fonts/fontawesome-webfont.woff differ diff --git a/web/admin/css/fonts/glyphicons-halflings-regular.eot b/web/admin/css/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 0000000..4a4ca86 Binary files /dev/null and b/web/admin/css/fonts/glyphicons-halflings-regular.eot differ diff --git a/web/admin/css/fonts/glyphicons-halflings-regular.svg b/web/admin/css/fonts/glyphicons-halflings-regular.svg new file mode 100644 index 0000000..25691af --- /dev/null +++ b/web/admin/css/fonts/glyphicons-halflings-regular.svg @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/web/admin/css/fonts/glyphicons-halflings-regular.ttf b/web/admin/css/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 0000000..67fa00b Binary files /dev/null and b/web/admin/css/fonts/glyphicons-halflings-regular.ttf differ diff --git a/web/admin/css/fonts/glyphicons-halflings-regular.woff b/web/admin/css/fonts/glyphicons-halflings-regular.woff new file mode 100644 index 0000000..8c54182 Binary files /dev/null and b/web/admin/css/fonts/glyphicons-halflings-regular.woff differ diff --git a/web/admin/css/images/icons.png b/web/admin/css/images/icons.png new file mode 100644 index 0000000..10b4938 Binary files /dev/null and b/web/admin/css/images/icons.png differ diff --git a/web/admin/css/order_list.css b/web/admin/css/order_list.css new file mode 100644 index 0000000..06fa758 --- /dev/null +++ b/web/admin/css/order_list.css @@ -0,0 +1,56 @@ +.table_box{ + border: 1px solid #ccc; + border-top: 0; +} + +.search_list_1{ + margin-bottom: 10px; +} + +.dis_search{ + margin: 30px 30px 20px 30px; + padding: 10px; + background-color: #f7f7fc; +} + + +.float_r{ + float: right; +} +.float_l{ + float: left; +} + +.dis_table{ + margin: 0px 30px 10px 30px; + clear: both; +} + +.order_list{ + padding: 1px; +} + +.dis_middle { + margin: 20px 30px 10px 30px; + text-align: right; + padding-right: 20px; +} + +.search_name{ + display: inline-block; + width: 84px; + text-align: right; +} + +.input_width{ + width: 149px !important; +} + +.mar_r{ + margin-right: 10px; +} + +.pageDiv{ + text-align: right; + margin-right: 30px; +} diff --git a/web/admin/css/product_list.css b/web/admin/css/product_list.css new file mode 100644 index 0000000..a56f273 --- /dev/null +++ b/web/admin/css/product_list.css @@ -0,0 +1,61 @@ +.table_box{ + border: 1px solid #ccc; + border-top: 0; +} +#product_list{ + padding: 1px; +} +.dis_search{ + margin: 30px; + padding: 10px; + background-color: #f7f7fc; +} +.search_list_1{ + margin-bottom: 10px; +} +.search_name{ + display: inline-block; + width: 90px; + text-align: right; +} +.float_r{ + float: right; +} +.mar_r{ + margin-right: 10px; +} +.mar_b{ + margin-bottom: 10px; +} +.mar_t{ + margin-top: 10px; +} +.mar_b20{ + margin-bottom: 20px; +} +.mar_r30{ + margin-right: 30px; +} +.dis_table{ + margin: 30px; +} +.sel_width{ + width: 150px!important; +} +.modal_box{ + width: 600px; +} +.newpro_top{ + padding: 10px 20px; + font-size: 20px; +} +.newpro_center{ + padding: 10px 40px; +} +.money_center{ + padding: 15px 40px; +} +.text_c{ + text-align: center; +} + diff --git a/web/admin/css/show_log.css b/web/admin/css/show_log.css new file mode 100644 index 0000000..b6f0e1b --- /dev/null +++ b/web/admin/css/show_log.css @@ -0,0 +1,56 @@ +.table_box{ + border: 1px solid #ccc; + border-top: 0; +} + +.search_list_1{ + margin-bottom: 10px; +} + +.dis_search{ + margin: 30px 30px 20px 30px; + padding: 10px; + background-color: #f7f7fc; +} + +.dis_middle{ + margin: 20px 50px 10px 30px; +} + +.float_r{ + float: right; +} + +.dis_table{ + margin: 0px 30px 10px 30px; + clear: both; +} + +.order_list{ + padding: 1px; +} + +.dis_middle { + margin: 20px 30px 10px 30px; + text-align: right; + padding-right: 20px; +} + +.search_name{ + display: inline-block; + max-width: 120px; + text-align: right; +} + +.input_width{ + width: 151px !important; +} + +.mar_r{ + margin-right: 10px; +} + +.pageDiv{ + text-align: right; + margin-right: 30px; +} diff --git a/web/admin/css/withdrawal_list.css b/web/admin/css/withdrawal_list.css new file mode 100644 index 0000000..2012cbe --- /dev/null +++ b/web/admin/css/withdrawal_list.css @@ -0,0 +1,86 @@ +.table_box{ + border: 1px solid #ccc; + border-top: 0; +} +#money_list{ + padding: 1px; +} +.dis_search{ + margin: 30px; + padding: 10px; + background-color: #f7f7fc; +} +.search_list_1{ + margin-bottom: 10px; +} +.search_name{ + display: inline-block; + width: 50px; + text-align: right; +} +.float_r{ + float: right; +} +.mar_r{ + margin-right: 10px; +} +.dis_table{ + margin: 0px 30px 10px 30px; + clear: both; +} +.sel_width{ + width: 150px!important; +} + +.text_c{ + text-align: center; +} +.div_class{ + width: 650px; + margin-left: 125px; +} +.div_class_apply{ + text-align: center; + font-size: 20px; +} + +.search_name{ + display: inline-block; + width: 50px; + text-align: right; +} + +.div_name{ + display: inline-block; + width: 150px; + text-align: left; +} +.div_content{ + display: inline-block; + width: 150px; + text-align: left; +} +.div_center{ + text-align: left; + font-size: 14px; + margin-left: 40px; +} +.div_class_title{ + padding: 15px 0; + border-bottom: 1px solid #e5e5e5; +} +.div_class_info{ + padding: 10px 0; +} +.mar_b{ + margin-bottom: 15px; +} +.search_name{ + display: inline-block; + width: 65px; + text-align: right; +} +.pageDiv{ + text-align: right; + margin-right: 30px; +} \ No newline at end of file diff --git a/web/admin/distributor_list.html b/web/admin/distributor_list.html new file mode 100644 index 0000000..944dd8c --- /dev/null +++ b/web/admin/distributor_list.html @@ -0,0 +1,253 @@ + + + + + + 分销商列表 + + + + + + + + + +
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
ID名称用户名手机号加入时间预付款账户余额累计佣金已经提现状态改价权限所属区域运营负责人操作
+
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + +
微信名称用户名手机号申请时间状态运营负责人操作
+
+
+
+
+
+ + +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/web/admin/images/guan.png b/web/admin/images/guan.png new file mode 100644 index 0000000..c018cbd Binary files /dev/null and b/web/admin/images/guan.png differ diff --git a/web/admin/images/kai.png b/web/admin/images/kai.png new file mode 100644 index 0000000..cdf78a1 Binary files /dev/null and b/web/admin/images/kai.png differ diff --git a/web/admin/index.html b/web/admin/index.html new file mode 100644 index 0000000..8e4f126 --- /dev/null +++ b/web/admin/index.html @@ -0,0 +1,10 @@ + + + + + + + +管理后台 + + \ No newline at end of file diff --git a/web/admin/js/balance_list.js b/web/admin/js/balance_list.js new file mode 100644 index 0000000..3bd5b7a --- /dev/null +++ b/web/admin/js/balance_list.js @@ -0,0 +1,294 @@ +const vm = new Vue({ + el: "#app", + data: { + current_page: '1', + page_size: '10', + order_status_list: [], + order_type_list: [], + start_time: '', + end_time: '', + settlement_startday: '', + settlement_endday: '', + order_listinfo: [], + no_info: "无查询结果", + select_order_type: '', + select_order_status: '', + order_id: '', + fx_uid : getPar('fx_uid'), + pay_type : '3', + recharge_listinfo:[], + recharge_currentpage:'1' + }, + //过滤器 + filters: { + filterReplace: function(total_money){ + return `¥${total_money}`; + } + }, + //钩子函数 + mounted: function() { + this.$nextTick(function() { + this.httpBaseInfo(); + this.rechargeFirstHttpData(); + }) + }, + //方法 + methods: { + //解决jquery日历插件的问题 + loadJqueryDate() { + $(".form_date").datetimepicker({ + format: 'yyyy-mm-dd', + autoclose: true, + minView: 2, + pickerPosition: "bottom-left" + }); + }, + //配置页面参数基本信息 + httpBaseInfo() { + let _this = this; + this.$http.post( + base_api + "order/order/get-initialize", {}, { emulateJSON: true } + ).then(res => { + let res_data = res.body; + let data = res_data.data; + ZZLog('参数返回',data); + this.order_status_list = data.order_status_list; + this.order_type_list = data.order_type_list; + }, + error => { + ZZAlertInfo(infoApiError); + }) + this.loadJqueryDate(); + this.httpFirstData(); + }, + //搜索按钮的点击事件 + searchDidClick() { + this.httpFirstData(); + }, + //第一次查询数据 (搜索按钮的点击查询) + httpFirstData() { + this.start_time = $('#start_time').val(); + this.end_time = $('#end_time').val(); + this.settlement_startday = $('#settlement_startday').val(); + this.settlement_endday = $('#settlement_endday').val(); + this.current_page = '1'; + let order_id = this.order_id; + let order_type_id = this.select_order_type; + let start_time = this.start_time; + let end_time = this.end_time; + let order_status_id = this.select_order_status; + let settlement_startday = this.settlement_startday; + let settlement_endday = this.settlement_endday; + let fx_uid = this.fx_uid; + let pay_type = this.pay_type + let data = { + current_page: this.current_page, + page_size: this.page_size, + order_id, + order_type_id, + start_time, + end_time, + order_status_id, + settlement_startday, + settlement_endday, + fx_uid, + pay_type + } + ZZLog('第一次请求数据参数', data); + let urlstr = base_api + 'order/order/get-order-list'; + this.$http.post(urlstr, data, { emulateJSON: true }).then(res => { + let res_data = res.body; + ZZLog('ttt',res_data); + if(res_data.flag == false) { + ZZAlertInfo(res_data.msg, () => { + ifLogin(res_data); + }); + } else { + let data = res_data.data; + let page = data.page; + this.order_listinfo = data.order_list; + let totalpage = page.total_pages; + $('#body_list').show(); + this.createPage(this.current_page, totalpage); + if(page.total_pages > 0) { + $('#order_page').show(); + } else { + $('#order_page').hide(); + } + } + }, error => { + ZZAlertInfo(infoApiError); + }) + }, + //创建分页控件 + createPage(currpage, totalpage) { + $("#order_page").createPage({ + pageCount: totalpage, //总页数 + current: currpage, //当前页 + turndown: 'true', //是否显示跳转框,显示为true,不现实为false,一定记得加上引号... + backFn: (p)=> { + this.current_page = p; + this.httpData(); + } + }) + }, + //分页查询数据 + httpData() { + this.start_time = $('#start_time').val(); + this.end_time = $('#end_time').val(); + this.settlement_startday = $('#settlement_startday').val(); + this.settlement_endday = $('#settlement_endday').val(); + let _current_page = this.current_page; + let order_id = this.order_id; + let order_type_id = this.select_order_type; + let start_time = this.start_time; + let end_time = this.end_time; +// this.start_time = $('#start_time').val(); +// this.end_time = $('#end_time').val(); + let order_status_id = this.select_order_status; + let settlement_startday = this.settlement_startday; + let settlement_endday = this.settlement_endday; + let fx_uid = this.fx_uid; + let pay_type = this.pay_type; + let data = { + current_page: this.current_page, + page_size: this.page_size, + order_id, + order_type_id, + start_time, + end_time, + order_status_id, + settlement_startday, + settlement_endday, + fx_uid, + pay_type + } + let urlstr = base_api + 'order/order/get-order-list'; + ZZLog('分页数据参数', data); + this.$http.post(urlstr, data, { emulateJSON: true }).then(res => { + let res_data = res.body; + if(res_data.flag == false) { + ZZAlertInfo(res_data.msg, () => { + ifLogin(res_data); + }); + } else { + let data = res_data.data; + let page = data.page; + this.order_listinfo = data.order_list; + $('#body_list').show(); + } + }, error => { + ZZAlertInfo(infoApiError); + }) + }, + //重置按钮 + resetDidClick() { + this.order_id = ''; + this.select_order_type = ''; + this.select_order_status = ''; + this.settlement_startday = ''; + this.settlement_endday = ''; + this.start_time = ''; + this.end_time = ''; + $('#start_time').val(''); + $('#end_time').val(''); + $('#settlement_endday').val(''); + $('#settlement_startday').val(''); + this.httpFirstData(); + }, + //取消订单 + cancelDidClick(dict) { + let urlstr = base_api + 'order/order/cancel'; + let data = { order_id: dict.order_id }; + ZZConfirm('确定取消当前订单?', () => { + this.$http.post(urlstr, data, { emulateJSON: true }).then(res => { + let res_data = res.body; + if(res_data.flag == false) { + ZZAlertInfo(res_data.msg, () => { + ifLogin(res_data); + }); + } else { + this.httpData(); + } + }, error => { + ZZAlertInfo(infoApiError); + }) + }) + }, + orderStatusChange() { + this.start_time = $('#start_time').val(); + this.end_time = $('#end_time').val(); + }, + orderTypeChange() { + this.start_time = $('#start_time').val(); + this.end_time = $('#end_time').val(); + }, + //充值列表第一次加载 + rechargeFirstHttpData() { + let fx_uid = this.fx_uid; + let data = { + fx_uid + }; + let urlstr = base_api + 'user/fx-user/get-amount-order'; + this.$http.post(urlstr, data, { emulateJSON: true }).then(res => { + let res_data = res.body; + if(res_data.flag == false) { + ZZAlertInfo(res_data.msg, () => { + ifLogin(res_data); + }); + } else { + let data = res_data.data; + this.recharge_listinfo = data.order_list; + $('#recharge_listinfo').show(); + let page = data.page; + let totalpage = page.total_pages; + this.rechargeCreatePage(this.recharge_currentpage, totalpage); + if(page.total_pages > 0) { + $('#recharge_div').show(); + } else { + $('#recharge_div').hide(); + } + } + }, error => { + ZZAlertInfo(infoApiError); + }) + }, + //充值列表分页查询 + rechargeHttpData() { + let fx_uid = this.fx_uid; + let data = {fx_uid}; + let urlstr = base_api + 'user/fx-user/get-amount-order'; + ZZLog('分页数据参数', data); + this.$http.post(urlstr, data, { emulateJSON: true }).then(res => { + let res_data = res.body; + if(res_data.flag == false) { + ZZAlertInfo(res_data.msg, () => { + ifLogin(res_data); + }); + } else { + let data = res_data.data; + let page = data.page; + this.recharge_listinfo = data.order_list; + $('#recharge_listinfo').show(); + } + }, error => { + ZZAlertInfo(infoApiError); + }) + }, + //充值列表创建分页 + rechargeCreatePage(currpage,totalpage) { + $("#recharge_div").createPage({ + pageCount: totalpage, //总页数 + current: currpage, //当前页 + turndown: 'true', //是否显示跳转框,显示为true,不现实为false,一定记得加上引号... + backFn: (p)=> { + this.recharge_currentpage = p; + this.rechargeHttpData(); + } + }) + } + + + + } +}) \ No newline at end of file diff --git a/web/admin/js/commission_details.js b/web/admin/js/commission_details.js new file mode 100644 index 0000000..c038f38 --- /dev/null +++ b/web/admin/js/commission_details.js @@ -0,0 +1,231 @@ +const vm = new Vue({ + el: "#app", + data: { + current_page: '1', + page_size: '10', + order_type_list: [], + order_status_list: [], + select_order_type: "", + select_status: "", + prod_list: [], + order_id: "", + date1Val: "", + date2Val: "", + date3Val: "", + date4Val: "", + detail_list: [], + no_info: "无查询结果" + }, + //过滤器 + filters: { + + }, + //钩子函数 + mounted: function() { + this.$nextTick(function() { + this.httpLoadInfo(); + }) + }, + methods: { + loadJqueryDate() { + $(".form_date_start").datetimepicker({ + format: 'yyyy-mm-dd', + autoclose: true, + minView: 2, + pickerPosition: "bottom-left" + }); + $(".form_date_end").datetimepicker({ + format: 'yyyy-mm-dd', + autoclose: true, + minView: 2, + pickerPosition: "bottom-left" + }); + }, + httpLoadInfo() { + let _this = this; + let fx_uid = getPar('fx_uid'); + if(fx_uid==""){ + ZZAlertInfo('缺少参数,请返回上一个页面重试'); + return; + } + this.$http.post( + base_api + "order/order/get-initialize", {}, { emulateJSON: true } + ).then(function(res) { + let res_data = res['body']; + let data = res_data['data']; + ZZLog(res_data); + this.order_type_list = data['order_type_list']; + this.order_status_list = data['order_status_list']; + this.btn_search(); + }, function() { + ZZAlertInfo(infoApiError); + }); + this.loadJqueryDate(); + this.httpFirstInfo(); + }, + order_type_change() { + this.date1Val = $('#date1').val(); + this.date2Val = $('#date2').val(); + this.date3Val = $('#date3').val(); + this.date4Val = $('#date4').val(); + }, + order_status_change() { + this.date1Val = $('#date1').val(); + this.date2Val = $('#date2').val(); + this.date3Val = $('#date3').val(); + this.date4Val = $('#date4').val(); + }, + httpFirstInfo() { + this.current_page = 1; + let fx_uid = getPar('fx_uid'); + let order_id = this.order_id; + let order_type_id = this.select_order_type; + let order_status_id = this.select_status; + let create_order_start_date = $('#date1').val(); + this.date1Val = $('#date1').val(); + let create_order_end_date = $('#date2').val(); + this.date2Val = $('#date2').val(); + let settlement_start_date = $('#date3').val(); + this.date3Val = $('#date3').val(); + let settlement_end_date = $('#date4').val(); + this.date4Val = $('#date4').val(); + let data = { + current_page: this.current_page, + page_size: this.page_size, + fx_uid, + order_id, + order_type_id, + order_status_id, + create_order_start_date, + create_order_end_date, + settlement_start_date, + settlement_end_date + }; + + ZZLog(base_api + "order/order/get-commission-list", JSON.stringify(data)); + this.$http.post( + base_api + "order/order/get-commission-list", data, { emulateJSON: true } + ).then(function(res) { + let res_data = res['body']; + ZZLog(res_data); + $('#commission_table').show(); + if(res_data['flag'] == false) { + ZZAlertInfo(res_data['msg'], function() { + ifLogin(res_data); + }); + } else { + let data = res_data['data']; + let page = data['page']; + let prod_list = data['prod_list']; + this.prod_list = prod_list; + //分页控件 + $(".pageDiv").createPage({ + pageCount: page['total_pages'], //总页数 + current: this.current_page, //当前页 + turndown: 'true', //是否显示跳转框,显示为true,不现实为false,一定记得加上引号... + backFn: (p) => { + this.current_page = p; + this.httpData(); + } + }); + if(page['total_pages'] > 0) { + $('.pageDiv').show(); + } else { + $('.pageDiv').hide(); + } + } + + }, function() { + ZZAlertInfo(infoApiError); + }); + }, + httpData() { + let fx_uid = getPar('fx_uid'); + let order_id = this.order_id; + let order_type_id = this.select_order_type; + let order_status_id = this.select_status; + let create_order_start_date = $('#date1').val(); + this.date1Val = $('#date1').val(); + let create_order_end_date = $('#date2').val(); + this.date2Val = $('#date2').val(); + let settlement_start_date = $('#date3').val(); + this.date3Val = $('#date3').val(); + let settlement_end_date = $('#date4').val(); + this.date4Val = $('#date4').val(); + let data = { + current_page: this.current_page, + page_size: this.page_size, + fx_uid, + order_id, + order_type_id, + order_status_id, + create_order_start_date, + create_order_end_date, + settlement_start_date, + settlement_end_date + }; + + ZZLog(base_api + "order/order/get-commission-list", JSON.stringify(data)); + this.$http.post( + base_api + "order/order/get-commission-list", data, { emulateJSON: true } + ).then(function(res) { + let res_data = res['body']; + ZZLog(res_data); + $('#commission_table').show(); + if(res_data['flag'] == false) { + ZZAlertInfo(res_data['msg'], function() { + ifLogin(res_data); + }); + } else { + let data = res_data['data']; + let page = data['page']; + let prod_list = data['prod_list']; + this.prod_list = prod_list; + } + + }, function() { + ZZAlertInfo(infoApiError); + }); + }, + btn_search() { + this.httpFirstInfo(); +// this.loadJqueryDate(); + }, + btn_reset() { + this.date1Val = ""; + this.date2Val = ""; + this.date3Val = ""; + this.date4Val = ""; + this.order_id = ""; + this.select_order_type = ""; + this.select_status = ""; + $('#date1').val(''); + $('#date2').val(''); + $('#date3').val(''); + $('#date4').val(''); + this.httpFirstInfo(); + + }, + clickDetail(item) { + let order_id = item['order_id']; + let data = { order_id }; + ZZLog(base_api + 'order/order/get-commission-detail', JSON.stringify(data)); + this.$http.post( + base_api + 'order/order/get-commission-detail', data, { emulateJSON: true } + ).then(res=> { + let res_data = res.body; + ZZLog(res_data); + if(false == res_data['flag']) { + ZZAlertInfo(res_data['msg']); + } else { + let data = res_data['data']; + this.detail_list = data['detail']; + } + }, error=> { + ZZAlertInfo(infoApiError); + }); + + } + + } +}) \ No newline at end of file diff --git a/web/admin/js/common/base_path.js b/web/admin/js/common/base_path.js new file mode 100644 index 0000000..95b5d0b --- /dev/null +++ b/web/admin/js/common/base_path.js @@ -0,0 +1,28 @@ +var system_path = "http://cs1.zhizhuchuxing.com/menu/menu"; +var cookie_path = "http://cs.zhizhuchuxing.com/"; +$(document).ready(function(){ + if(self!=top){ + document.domain = "zhizhuchuxing.com"; + refreshPage(); + }else{ + return; + } + +}); +function open_new_path(index){ + var go_path = $(index).attr("go_path"); + $.cookie('user_path',"2",{path:"/",domain:"zhizhuchuxing.com"}); + $.cookie("path_url",cookie_path+go_path,{domain:"zhizhuchuxing.com",path:"/"}); + window.open(system_path); +} +function open_order_detail_path(index){ + var go_path = $(index).attr("go_path"); + $.cookie('user_path',"2",{path:"/",domain:"zhizhuchuxing.com"}); + $.cookie("path_url","http://cs1.zhizhuchuxing.com/"+go_path,{domain:"zhizhuchuxing.com",path:"/"}); + window.open(system_path); +} +function refreshPage(){ + var index=location.href; + $.cookie("path_url",index,{domain:"zhizhuchuxing.com",path:"/"}); + $('body').attr("path",index); +} \ No newline at end of file diff --git a/web/admin/js/common/bootstrap-datetimepicker.min.js b/web/admin/js/common/bootstrap-datetimepicker.min.js new file mode 100644 index 0000000..2192571 --- /dev/null +++ b/web/admin/js/common/bootstrap-datetimepicker.min.js @@ -0,0 +1,954 @@ +(function(a) { if(typeof define === "function" && define.amd) { define(["jquery"], a) } else { if(typeof exports === "object") { a(require("jquery")) } else { a(jQuery) } } }(function(d, f) { + if(!("indexOf" in Array.prototype)) { Array.prototype.indexOf = function(k, j) { if(j === f) { j = 0 } if(j < 0) { j += this.length } if(j < 0) { j = 0 } for(var l = this.length; j < l; j++) { if(j in this && this[j] === k) { return j } } return -1 } } + + function a() { + var q, k, p, l, j, n, m, o; + k = (new Date()).toString(); + p = ((m = k.split("(")[1]) !== null ? m.slice(0, -1) : 0) || k.split(" "); + if(p instanceof Array) { n = []; for(var l = 0, j = p.length; l < j; l++) { o = p[l]; if((q = (m = o.match(/\b[A-Z]+\b/)) !== null) ? m[0] : 0) { n.push(q) } } p = n.pop() } + return p + } + + function h() { return new Date(Date.UTC.apply(Date, arguments)) } + var g = function(k, j) { + var m = this; + this.element = d(k); + this.container = j.container || "body"; + //zh-cn en +// update by fuhc date:201703101337 增加中文语言 + this.language = j.language || this.element.data("date-language") || "zh-cn"; + this.language = this.language in e ? this.language : this.language.split("-")[0]; + this.language = this.language in e ? this.language : "zh-cn"; + this.isRTL = e[this.language].rtl || false; + this.formatType = j.formatType || this.element.data("format-type") || "standard"; + this.format = c.parseFormat(j.format || this.element.data("date-format") || e[this.language].format || c.getDefaultFormat(this.formatType, "input"), this.formatType); + this.isInline = false; + this.isVisible = false; + this.isInput = this.element.is("input"); + this.fontAwesome = j.fontAwesome || this.element.data("font-awesome") || false; + this.bootcssVer = j.bootcssVer || (this.isInput ? (this.element.is(".form-control") ? 3 : 2) : (this.bootcssVer = this.element.is(".input-group") ? 3 : 2)); + this.component = this.element.is(".date") ? (this.bootcssVer === 3 ? this.element.find(".input-group-addon .glyphicon-th, .input-group-addon .glyphicon-time, .input-group-addon .glyphicon-remove, .input-group-addon .glyphicon-calendar, .input-group-addon .fa-calendar, .input-group-addon .fa-clock-o").parent() : this.element.find(".add-on .icon-th, .add-on .icon-time, .add-on .icon-calendar, .add-on .fa-calendar, .add-on .fa-clock-o").parent()) : false; + this.componentReset = this.element.is(".date") ? (this.bootcssVer === 3 ? this.element.find(".input-group-addon .glyphicon-remove, .input-group-addon .fa-times").parent() : this.element.find(".add-on .icon-remove, .add-on .fa-times").parent()) : false; + this.hasInput = this.component && this.element.find("input").length; + if(this.component && this.component.length === 0) { this.component = false } this.linkField = j.linkField || this.element.data("link-field") || false; + this.linkFormat = c.parseFormat(j.linkFormat || this.element.data("link-format") || c.getDefaultFormat(this.formatType, "link"), this.formatType); + this.minuteStep = j.minuteStep || this.element.data("minute-step") || 5; + this.pickerPosition = j.pickerPosition || this.element.data("picker-position") || "bottom-right"; + this.showMeridian = j.showMeridian || this.element.data("show-meridian") || false; + this.initialDate = j.initialDate || new Date(); + this.zIndex = j.zIndex || this.element.data("z-index") || f; + this.title = typeof j.title === "undefined" ? false : j.title; + this.timezone = j.timezone || a(); + this.icons = { leftArrow: this.fontAwesome ? "fa-arrow-left" : (this.bootcssVer === 3 ? "glyphicon-arrow-left" : "glyphicon-arrow-left"), rightArrow: this.fontAwesome ? "fa-arrow-right" : (this.bootcssVer === 3 ? "glyphicon-arrow-right" : "glyphicon-arrow-right") }; + this.icontype = this.fontAwesome ? "fa" : "glyphicon"; + this._attachEvents(); + this.clickedOutside = function(n) { if(d(n.target).closest(".datetimepicker").length === 0) { m.hide() } }; + this.formatViewType = "datetime"; + if("formatViewType" in j) { this.formatViewType = j.formatViewType } else { if("formatViewType" in this.element.data()) { this.formatViewType = this.element.data("formatViewType") } } this.minView = 0; + if("minView" in j) { this.minView = j.minView } else { if("minView" in this.element.data()) { this.minView = this.element.data("min-view") } } this.minView = c.convertViewMode(this.minView); + this.maxView = c.modes.length - 1; + if("maxView" in j) { this.maxView = j.maxView } else { if("maxView" in this.element.data()) { this.maxView = this.element.data("max-view") } } this.maxView = c.convertViewMode(this.maxView); + this.wheelViewModeNavigation = false; + if("wheelViewModeNavigation" in j) { this.wheelViewModeNavigation = j.wheelViewModeNavigation } else { if("wheelViewModeNavigation" in this.element.data()) { this.wheelViewModeNavigation = this.element.data("view-mode-wheel-navigation") } } this.wheelViewModeNavigationInverseDirection = false; + if("wheelViewModeNavigationInverseDirection" in j) { this.wheelViewModeNavigationInverseDirection = j.wheelViewModeNavigationInverseDirection } else { if("wheelViewModeNavigationInverseDirection" in this.element.data()) { this.wheelViewModeNavigationInverseDirection = this.element.data("view-mode-wheel-navigation-inverse-dir") } } this.wheelViewModeNavigationDelay = 100; + if("wheelViewModeNavigationDelay" in j) { this.wheelViewModeNavigationDelay = j.wheelViewModeNavigationDelay } else { if("wheelViewModeNavigationDelay" in this.element.data()) { this.wheelViewModeNavigationDelay = this.element.data("view-mode-wheel-navigation-delay") } } this.startViewMode = 2; + if("startView" in j) { this.startViewMode = j.startView } else { if("startView" in this.element.data()) { this.startViewMode = this.element.data("start-view") } } this.startViewMode = c.convertViewMode(this.startViewMode); + this.viewMode = this.startViewMode; + this.viewSelect = this.minView; + if("viewSelect" in j) { this.viewSelect = j.viewSelect } else { if("viewSelect" in this.element.data()) { this.viewSelect = this.element.data("view-select") } } this.viewSelect = c.convertViewMode(this.viewSelect); + this.forceParse = true; + if("forceParse" in j) { this.forceParse = j.forceParse } else { if("dateForceParse" in this.element.data()) { this.forceParse = this.element.data("date-force-parse") } } + var l = this.bootcssVer === 3 ? c.templateV3 : c.template; + while(l.indexOf("{iconType}") !== -1) { l = l.replace("{iconType}", this.icontype) } + while(l.indexOf("{leftArrow}") !== -1) { l = l.replace("{leftArrow}", this.icons.leftArrow) } + while(l.indexOf("{rightArrow}") !== -1) { l = l.replace("{rightArrow}", this.icons.rightArrow) } this.picker = d(l).appendTo(this.isInline ? this.element : this.container).on({ click: d.proxy(this.click, this), mousedown: d.proxy(this.mousedown, this) }); + if(this.wheelViewModeNavigation) { if(d.fn.mousewheel) { this.picker.on({ mousewheel: d.proxy(this.mousewheel, this) }) } else { console.log("Mouse Wheel event is not supported. Please include the jQuery Mouse Wheel plugin before enabling this option") } } + if(this.isInline) { this.picker.addClass("datetimepicker-inline") } else { this.picker.addClass("datetimepicker-dropdown-" + this.pickerPosition + " dropdown-menu") } + if(this.isRTL) { + this.picker.addClass("datetimepicker-rtl"); + var i = this.bootcssVer === 3 ? ".prev span, .next span" : ".prev i, .next i"; + this.picker.find(i).toggleClass(this.icons.leftArrow + " " + this.icons.rightArrow) + } + d(document).on("mousedown touchend", this.clickedOutside); + this.autoclose = false; + if("autoclose" in j) { this.autoclose = j.autoclose } else { if("dateAutoclose" in this.element.data()) { this.autoclose = this.element.data("date-autoclose") } } this.keyboardNavigation = true; + if("keyboardNavigation" in j) { this.keyboardNavigation = j.keyboardNavigation } else { if("dateKeyboardNavigation" in this.element.data()) { this.keyboardNavigation = this.element.data("date-keyboard-navigation") } } this.todayBtn = (j.todayBtn || this.element.data("date-today-btn") || false); + this.clearBtn = (j.clearBtn || this.element.data("date-clear-btn") || false); + this.todayHighlight = (j.todayHighlight || this.element.data("date-today-highlight") || false); + this.weekStart = 0; + if(typeof j.weekStart !== "undefined") { this.weekStart = j.weekStart } else { if(typeof this.element.data("date-weekstart") !== "undefined") { this.weekStart = this.element.data("date-weekstart") } else { if(typeof e[this.language].weekStart !== "undefined") { this.weekStart = e[this.language].weekStart } } } this.weekStart = this.weekStart % 7; + this.weekEnd = ((this.weekStart + 6) % 7); + this.onRenderDay = function(n) { var p = (j.onRenderDay || function() { return [] })(n); if(typeof p === "string") { p = [p] } var o = ["day"]; return o.concat((p ? p : [])) }; + this.onRenderHour = function(n) { var p = (j.onRenderHour || function() { return [] })(n); var o = ["hour"]; if(typeof p === "string") { p = [p] } return o.concat((p ? p : [])) }; + this.onRenderMinute = function(n) { var p = (j.onRenderMinute || function() { return [] })(n); var o = ["minute"]; if(typeof p === "string") { p = [p] } if(n < this.startDate || n > this.endDate) { o.push("disabled") } else { if(Math.floor(this.date.getUTCMinutes() / this.minuteStep) === Math.floor(n.getUTCMinutes() / this.minuteStep)) { o.push("active") } } return o.concat((p ? p : [])) }; + this.onRenderYear = function(n) { var p = (j.onRenderYear || function() { return [] })(n); var o = ["year"]; if(typeof p === "string") { p = [p] } if(this.date.getUTCFullYear() === n.getUTCFullYear()) { o.push("active") } if(n < this.startDate || n > this.endDate) { o.push("disabled") } return o.concat((p ? p : [])) }; + this.onRenderMonth = function(n) { var p = (j.onRenderMonth || function() { return [] })(n); var o = ["month"]; if(typeof p === "string") { p = [p] } return o.concat((p ? p : [])) }; + this.startDate = new Date(-8639968443048000); + this.endDate = new Date(8639968443048000); + this.datesDisabled = []; + this.daysOfWeekDisabled = []; + this.setStartDate(j.startDate || this.element.data("date-startdate")); + this.setEndDate(j.endDate || this.element.data("date-enddate")); + this.setDatesDisabled(j.datesDisabled || this.element.data("date-dates-disabled")); + this.setDaysOfWeekDisabled(j.daysOfWeekDisabled || this.element.data("date-days-of-week-disabled")); + this.setMinutesDisabled(j.minutesDisabled || this.element.data("date-minute-disabled")); + this.setHoursDisabled(j.hoursDisabled || this.element.data("date-hour-disabled")); + this.fillDow(); + this.fillMonths(); + this.update(); + this.showMode(); + if(this.isInline) { this.show() } + }; + g.prototype = { + constructor: g, + _events: [], + _attachEvents: function() { + this._detachEvents(); + if(this.isInput) { + this._events = [ + [this.element, { focus: d.proxy(this.show, this), keyup: d.proxy(this.update, this), keydown: d.proxy(this.keydown, this) }] + ] + } else { + if(this.component && this.hasInput) { + this._events = [ + [this.element.find("input"), { focus: d.proxy(this.show, this), keyup: d.proxy(this.update, this), keydown: d.proxy(this.keydown, this) }], + [this.component, { click: d.proxy(this.show, this) }] + ]; + if(this.componentReset) { this._events.push([this.componentReset, { click: d.proxy(this.reset, this) }]) } + } else { + if(this.element.is("div")) { this.isInline = true } else { + this._events = [ + [this.element, { click: d.proxy(this.show, this) }] + ] + } + } + } + for(var j = 0, k, l; j < this._events.length; j++) { + k = this._events[j][0]; + l = this._events[j][1]; + k.on(l) + } + }, + _detachEvents: function() { + for(var j = 0, k, l; j < this._events.length; j++) { + k = this._events[j][0]; + l = this._events[j][1]; + k.off(l) + } + this._events = [] + }, + show: function(i) { + this.picker.show(); + this.height = this.component ? this.component.outerHeight() : this.element.outerHeight(); + if(this.forceParse) { this.update() } this.place(); + d(window).on("resize", d.proxy(this.place, this)); + if(i) { + i.stopPropagation(); + i.preventDefault() + } + this.isVisible = true; + this.element.trigger({ type: "show", date: this.date }) + }, + hide: function() { + if(!this.isVisible) { return } + if(this.isInline) { return } this.picker.hide(); + d(window).off("resize", this.place); + this.viewMode = this.startViewMode; + this.showMode(); + if(!this.isInput) { d(document).off("mousedown", this.hide) } + if(this.forceParse && (this.isInput && this.element.val() || this.hasInput && this.element.find("input").val())) { this.setValue() } this.isVisible = false; + this.element.trigger({ type: "hide", date: this.date }) + }, + remove: function() { + this._detachEvents(); + d(document).off("mousedown", this.clickedOutside); + this.picker.remove(); + delete this.picker; + delete this.element.data().datetimepicker + }, + getDate: function() { var i = this.getUTCDate(); if(i === null) { return null } return new Date(i.getTime() + (i.getTimezoneOffset() * 60000)) }, + getUTCDate: function() { return this.date }, + getInitialDate: function() { return this.initialDate }, + setInitialDate: function(i) { this.initialDate = i }, + setDate: function(i) { this.setUTCDate(new Date(i.getTime() - (i.getTimezoneOffset() * 60000))) }, + setUTCDate: function(i) { + if(i >= this.startDate && i <= this.endDate) { + this.date = i; + this.setValue(); + this.viewDate = this.date; + this.fill() + } else { this.element.trigger({ type: "outOfRange", date: i, startDate: this.startDate, endDate: this.endDate }) } + }, + setFormat: function(j) { this.format = c.parseFormat(j, this.formatType); var i; if(this.isInput) { i = this.element } else { if(this.component) { i = this.element.find("input") } } if(i && i.val()) { this.setValue() } }, + setValue: function() { var i = this.getFormattedDate(); if(!this.isInput) { if(this.component) { this.element.find("input").val(i) } this.element.data("date", i) } else { this.element.val(i) } if(this.linkField) { d("#" + this.linkField).val(this.getFormattedDate(this.linkFormat)) } }, + getFormattedDate: function(i) { i = i || this.format; return c.formatDate(this.date, i, this.language, this.formatType, this.timezone) }, + setStartDate: function(i) { + this.startDate = i || this.startDate; + if(this.startDate.valueOf() !== 8639968443048000) { this.startDate = c.parseDate(this.startDate, this.format, this.language, this.formatType, this.timezone) } this.update(); + this.updateNavArrows() + }, + setEndDate: function(i) { + this.endDate = i || this.endDate; + if(this.endDate.valueOf() !== 8639968443048000) { this.endDate = c.parseDate(this.endDate, this.format, this.language, this.formatType, this.timezone) } this.update(); + this.updateNavArrows() + }, + setDatesDisabled: function(j) { + this.datesDisabled = j || []; + if(!d.isArray(this.datesDisabled)) { this.datesDisabled = this.datesDisabled.split(/,\s*/) } + var i = this; + this.datesDisabled = d.map(this.datesDisabled, function(k) { return c.parseDate(k, i.format, i.language, i.formatType, i.timezone).toDateString() }); + this.update(); + this.updateNavArrows() + }, + setTitle: function(i, j) { return this.picker.find(i).find("th:eq(1)").text(this.title === false ? j : this.title) }, + setDaysOfWeekDisabled: function(i) { + this.daysOfWeekDisabled = i || []; + if(!d.isArray(this.daysOfWeekDisabled)) { this.daysOfWeekDisabled = this.daysOfWeekDisabled.split(/,\s*/) } this.daysOfWeekDisabled = d.map(this.daysOfWeekDisabled, function(j) { return parseInt(j, 10) }); + this.update(); + this.updateNavArrows() + }, + setMinutesDisabled: function(i) { + this.minutesDisabled = i || []; + if(!d.isArray(this.minutesDisabled)) { this.minutesDisabled = this.minutesDisabled.split(/,\s*/) } this.minutesDisabled = d.map(this.minutesDisabled, function(j) { return parseInt(j, 10) }); + this.update(); + this.updateNavArrows() + }, + setHoursDisabled: function(i) { + this.hoursDisabled = i || []; + if(!d.isArray(this.hoursDisabled)) { this.hoursDisabled = this.hoursDisabled.split(/,\s*/) } this.hoursDisabled = d.map(this.hoursDisabled, function(j) { return parseInt(j, 10) }); + this.update(); + this.updateNavArrows() + }, + place: function() { + if(this.isInline) { return } + if(!this.zIndex) { + var j = 0; + d("div").each(function() { var o = parseInt(d(this).css("zIndex"), 10); if(o > j) { j = o } }); + this.zIndex = j + 10 + } + var n, m, l, k; + if(this.container instanceof d) { k = this.container.offset() } else { k = d(this.container).offset() } + if(this.component) { + n = this.component.offset(); + l = n.left; + if(this.pickerPosition === "bottom-left" || this.pickerPosition === "top-left") { l += this.component.outerWidth() - this.picker.outerWidth() } + } else { + n = this.element.offset(); + l = n.left; + if(this.pickerPosition === "bottom-left" || this.pickerPosition === "top-left") { l += this.element.outerWidth() - this.picker.outerWidth() } + } + var i = document.body.clientWidth || window.innerWidth; + if(l + 220 > i) { l = i - 220 } + if(this.pickerPosition === "top-left" || this.pickerPosition === "top-right") { m = n.top - this.picker.outerHeight() } else { m = n.top + this.height } m = m - k.top; + l = l - k.left; + this.picker.css({ top: m, left: l, zIndex: this.zIndex }) + }, + update: function() { + var i, j = false; + if(arguments && arguments.length && (typeof arguments[0] === "string" || arguments[0] instanceof Date)) { + i = arguments[0]; + j = true + } else { i = (this.isInput ? this.element.val() : this.element.find("input").val()) || this.element.data("date") || this.initialDate; if(typeof i === "string") { i = i.replace(/^\s+|\s+$/g, "") } } + if(!i) { + i = new Date(); + j = false + } + this.date = c.parseDate(i, this.format, this.language, this.formatType, this.timezone); + if(j) { this.setValue() } + if(this.date < this.startDate) { this.viewDate = new Date(this.startDate) } else { if(this.date > this.endDate) { this.viewDate = new Date(this.endDate) } else { this.viewDate = new Date(this.date) } } this.fill() + }, + fillDow: function() { + var i = this.weekStart, + j = ""; + while(i < this.weekStart + 7) { j += '' + e[this.language].daysMin[(i++) % 7] + "" } j += ""; + this.picker.find(".datetimepicker-days thead").append(j) + }, + fillMonths: function() { + var l = ""; + var m = new Date(this.viewDate); + for(var k = 0; k < 12; k++) { + m.setUTCMonth(k); + var j = this.onRenderMonth(m); + l += '' + e[this.language].monthsShort[k] + "" + } + this.picker.find(".datetimepicker-months td").html(l) + }, + fill: function() { + if(!this.date || !this.viewDate) { return } + var E = new Date(this.viewDate), + t = E.getUTCFullYear(), + G = E.getUTCMonth(), + n = E.getUTCDate(), + A = E.getUTCHours(), + w = this.startDate.getUTCFullYear(), + B = this.startDate.getUTCMonth(), + p = this.endDate.getUTCFullYear(), + x = this.endDate.getUTCMonth() + 1, + q = (new h(this.date.getUTCFullYear(), this.date.getUTCMonth(), this.date.getUTCDate())).valueOf(), + D = new Date(); + this.setTitle(".datetimepicker-days", e[this.language].months[G] + " " + t); + if(this.formatViewType === "time") { + var k = this.getFormattedDate(); + this.setTitle(".datetimepicker-hours", k); + this.setTitle(".datetimepicker-minutes", k) + } else { + this.setTitle(".datetimepicker-hours", n + " " + e[this.language].months[G] + " " + t); + this.setTitle(".datetimepicker-minutes", n + " " + e[this.language].months[G] + " " + t) + } + this.picker.find("tfoot th.today").text(e[this.language].today || e.en.today).toggle(this.todayBtn !== false); + this.picker.find("tfoot th.clear").text(e[this.language].clear || e.en.clear).toggle(this.clearBtn !== false); + this.updateNavArrows(); + this.fillMonths(); + var I = h(t, G - 1, 28, 0, 0, 0, 0), + z = c.getDaysInMonth(I.getUTCFullYear(), I.getUTCMonth()); + I.setUTCDate(z); + I.setUTCDate(z - (I.getUTCDay() - this.weekStart + 7) % 7); + var j = new Date(I); + j.setUTCDate(j.getUTCDate() + 42); + j = j.valueOf(); + var r = []; + var F; + while(I.valueOf() < j) { if(I.getUTCDay() === this.weekStart) { r.push("") } F = this.onRenderDay(I); if(I.getUTCFullYear() < t || (I.getUTCFullYear() === t && I.getUTCMonth() < G)) { F.push("old") } else { if(I.getUTCFullYear() > t || (I.getUTCFullYear() === t && I.getUTCMonth() > G)) { F.push("new") } } if(this.todayHighlight && I.getUTCFullYear() === D.getFullYear() && I.getUTCMonth() === D.getMonth() && I.getUTCDate() === D.getDate()) { F.push("today") } if(I.valueOf() === q) { F.push("active") } if((I.valueOf() + 86400000) <= this.startDate || I.valueOf() > this.endDate || d.inArray(I.getUTCDay(), this.daysOfWeekDisabled) !== -1 || d.inArray(I.toDateString(), this.datesDisabled) !== -1) { F.push("disabled") } r.push('' + I.getUTCDate() + ""); if(I.getUTCDay() === this.weekEnd) { r.push("") } I.setUTCDate(I.getUTCDate() + 1) } this.picker.find(".datetimepicker-days tbody").empty().append(r.join("")); + r = []; + var u = "", + C = "", + s = ""; + var l = this.hoursDisabled || []; + E = new Date(this.viewDate); + for(var y = 0; y < 24; y++) { + E.setUTCHours(y); + F = this.onRenderHour(E); + if(l.indexOf(y) !== -1) { F.push("disabled") } + var v = h(t, G, n, y); + if((v.valueOf() + 3600000) <= this.startDate || v.valueOf() > this.endDate) { F.push("disabled") } else { if(A === y) { F.push("active") } } + if(this.showMeridian && e[this.language].meridiem.length === 2) { + C = (y < 12 ? e[this.language].meridiem[0] : e[this.language].meridiem[1]); + if(C !== s) { if(s !== "") { r.push("") } r.push('
' + C.toUpperCase() + "") } s = C; + u = (y % 12 ? y % 12 : 12); + if(y < 12) { F.push("hour_am") } else { F.push("hour_pm") } r.push('' + u + ""); + if(y === 23) { r.push("
") } + } else { + u = y + ":00"; + r.push('' + u + "") + } + } + this.picker.find(".datetimepicker-hours td").html(r.join("")); + r = []; + u = ""; + C = ""; + s = ""; + var m = this.minutesDisabled || []; + E = new Date(this.viewDate); + for(var y = 0; y < 60; y += this.minuteStep) { + if(m.indexOf(y) !== -1) { continue } E.setUTCMinutes(y); + E.setUTCSeconds(0); + F = this.onRenderMinute(E); + if(this.showMeridian && e[this.language].meridiem.length === 2) { + C = (A < 12 ? e[this.language].meridiem[0] : e[this.language].meridiem[1]); + if(C !== s) { if(s !== "") { r.push("") } r.push('
' + C.toUpperCase() + "") } s = C; + u = (A % 12 ? A % 12 : 12); + r.push('' + u + ":" + (y < 10 ? "0" + y : y) + ""); + if(y === 59) { r.push("
") } + } else { + u = y + ":00"; + r.push('' + A + ":" + (y < 10 ? "0" + y : y) + "") + } + } + this.picker.find(".datetimepicker-minutes td").html(r.join("")); + var J = this.date.getUTCFullYear(); + var o = this.setTitle(".datetimepicker-months", t).end().find(".month").removeClass("active"); + if(J === t) { o.eq(this.date.getUTCMonth()).addClass("active") } + if(t < w || t > p) { o.addClass("disabled") } + if(t === w) { o.slice(0, B).addClass("disabled") } + if(t === p) { o.slice(x).addClass("disabled") } r = ""; + t = parseInt(t / 10, 10) * 10; + var H = this.setTitle(".datetimepicker-years", t + "-" + (t + 9)).end().find("td"); + t -= 1; + E = new Date(this.viewDate); + for(var y = -1; y < 11; y++) { + E.setUTCFullYear(t); + F = this.onRenderYear(E); + if(y === -1 || y === 10) { F.push(b) } r += '' + t + ""; + t += 1 + } + H.html(r); + this.place() + }, + updateNavArrows: function() { + var m = new Date(this.viewDate), + k = m.getUTCFullYear(), + l = m.getUTCMonth(), + j = m.getUTCDate(), + i = m.getUTCHours(); + switch(this.viewMode) { + case 0: + if(k <= this.startDate.getUTCFullYear() && l <= this.startDate.getUTCMonth() && j <= this.startDate.getUTCDate() && i <= this.startDate.getUTCHours()) { this.picker.find(".prev").css({ visibility: "hidden" }) } else { this.picker.find(".prev").css({ visibility: "visible" }) } + if(k >= this.endDate.getUTCFullYear() && l >= this.endDate.getUTCMonth() && j >= this.endDate.getUTCDate() && i >= this.endDate.getUTCHours()) { this.picker.find(".next").css({ visibility: "hidden" }) } else { this.picker.find(".next").css({ visibility: "visible" }) } + break; + case 1: + if(k <= this.startDate.getUTCFullYear() && l <= this.startDate.getUTCMonth() && j <= this.startDate.getUTCDate()) { this.picker.find(".prev").css({ visibility: "hidden" }) } else { this.picker.find(".prev").css({ visibility: "visible" }) } + if(k >= this.endDate.getUTCFullYear() && l >= this.endDate.getUTCMonth() && j >= this.endDate.getUTCDate()) { this.picker.find(".next").css({ visibility: "hidden" }) } else { this.picker.find(".next").css({ visibility: "visible" }) } + break; + case 2: + if(k <= this.startDate.getUTCFullYear() && l <= this.startDate.getUTCMonth()) { this.picker.find(".prev").css({ visibility: "hidden" }) } else { this.picker.find(".prev").css({ visibility: "visible" }) } + if(k >= this.endDate.getUTCFullYear() && l >= this.endDate.getUTCMonth()) { this.picker.find(".next").css({ visibility: "hidden" }) } else { this.picker.find(".next").css({ visibility: "visible" }) } + break; + case 3: + case 4: + if(k <= this.startDate.getUTCFullYear()) { this.picker.find(".prev").css({ visibility: "hidden" }) } else { this.picker.find(".prev").css({ visibility: "visible" }) } + if(k >= this.endDate.getUTCFullYear()) { this.picker.find(".next").css({ visibility: "hidden" }) } else { this.picker.find(".next").css({ visibility: "visible" }) } + break + } + }, + mousewheel: function(j) { + j.preventDefault(); + j.stopPropagation(); + if(this.wheelPause) { return } this.wheelPause = true; + var i = j.originalEvent; + var l = i.wheelDelta; + var k = l > 0 ? 1 : (l === 0) ? 0 : -1; + if(this.wheelViewModeNavigationInverseDirection) { k = -k } this.showMode(k); + setTimeout(d.proxy(function() { this.wheelPause = false }, this), this.wheelViewModeNavigationDelay) + }, + click: function(m) { + m.stopPropagation(); + m.preventDefault(); + var n = d(m.target).closest("span, td, th, legend"); + if(n.is("." + this.icontype)) { n = d(n).parent().closest("span, td, th, legend") } + if(n.length === 1) { + if(n.is(".disabled")) { this.element.trigger({ type: "outOfRange", date: this.viewDate, startDate: this.startDate, endDate: this.endDate }); return } + switch(n[0].nodeName.toLowerCase()) { + case "th": + switch(n[0].className) { + case "switch": + this.showMode(1); + break; + case "prev": + case "next": + var i = c.modes[this.viewMode].navStep * (n[0].className === "prev" ? -1 : 1); + switch(this.viewMode) { + case 0: + this.viewDate = this.moveHour(this.viewDate, i); + break; + case 1: + this.viewDate = this.moveDate(this.viewDate, i); + break; + case 2: + this.viewDate = this.moveMonth(this.viewDate, i); + break; + case 3: + case 4: + this.viewDate = this.moveYear(this.viewDate, i); + break + } + this.fill(); + this.element.trigger({ type: n[0].className + ":" + this.convertViewModeText(this.viewMode), date: this.viewDate, startDate: this.startDate, endDate: this.endDate }); + break; + case "clear": + this.reset(); + if(this.autoclose) { this.hide() } + break; + case "today": + var j = new Date(); + j = h(j.getFullYear(), j.getMonth(), j.getDate(), j.getHours(), j.getMinutes(), j.getSeconds(), 0); + if(j < this.startDate) { j = this.startDate } else { if(j > this.endDate) { j = this.endDate } } this.viewMode = this.startViewMode; + this.showMode(0); + this._setDate(j); + this.fill(); + if(this.autoclose) { this.hide() } + break + } + break; + case "span": + if(!n.is(".disabled")) { + var p = this.viewDate.getUTCFullYear(), + o = this.viewDate.getUTCMonth(), + q = this.viewDate.getUTCDate(), + r = this.viewDate.getUTCHours(), + k = this.viewDate.getUTCMinutes(), + s = this.viewDate.getUTCSeconds(); + if(n.is(".month")) { + this.viewDate.setUTCDate(1); + o = n.parent().find("span").index(n); + q = this.viewDate.getUTCDate(); + this.viewDate.setUTCMonth(o); + this.element.trigger({ type: "changeMonth", date: this.viewDate }); + if(this.viewSelect >= 3) { this._setDate(h(p, o, q, r, k, s, 0)) } + } else { + if(n.is(".year")) { + this.viewDate.setUTCDate(1); + p = parseInt(n.text(), 10) || 0; + this.viewDate.setUTCFullYear(p); + this.element.trigger({ type: "changeYear", date: this.viewDate }); + if(this.viewSelect >= 4) { this._setDate(h(p, o, q, r, k, s, 0)) } + } else { + if(n.is(".hour")) { + r = parseInt(n.text(), 10) || 0; + if(n.hasClass("hour_am") || n.hasClass("hour_pm")) { if(r === 12 && n.hasClass("hour_am")) { r = 0 } else { if(r !== 12 && n.hasClass("hour_pm")) { r += 12 } } } this.viewDate.setUTCHours(r); + this.element.trigger({ type: "changeHour", date: this.viewDate }); + if(this.viewSelect >= 1) { this._setDate(h(p, o, q, r, k, s, 0)) } + } else { + if(n.is(".minute")) { + k = parseInt(n.text().substr(n.text().indexOf(":") + 1), 10) || 0; + this.viewDate.setUTCMinutes(k); + this.element.trigger({ type: "changeMinute", date: this.viewDate }); + if(this.viewSelect >= 0) { this._setDate(h(p, o, q, r, k, s, 0)) } + } + } + } + } + if(this.viewMode !== 0) { + var l = this.viewMode; + this.showMode(-1); + this.fill(); + if(l === this.viewMode && this.autoclose) { this.hide() } + } else { this.fill(); if(this.autoclose) { this.hide() } } + } + break; + case "td": + if(n.is(".day") && !n.is(".disabled")) { + var q = parseInt(n.text(), 10) || 1; + var p = this.viewDate.getUTCFullYear(), + o = this.viewDate.getUTCMonth(), + r = this.viewDate.getUTCHours(), + k = this.viewDate.getUTCMinutes(), + s = this.viewDate.getUTCSeconds(); + if(n.is(".old")) { + if(o === 0) { + o = 11; + p -= 1 + } else { o -= 1 } + } else { + if(n.is(".new")) { + if(o === 11) { + o = 0; + p += 1 + } else { o += 1 } + } + } + this.viewDate.setUTCFullYear(p); + this.viewDate.setUTCMonth(o, q); + this.element.trigger({ type: "changeDay", date: this.viewDate }); + if(this.viewSelect >= 2) { this._setDate(h(p, o, q, r, k, s, 0)) } + } + var l = this.viewMode; + this.showMode(-1); + this.fill(); + if(l === this.viewMode && this.autoclose) { this.hide() } + break + } + } + }, + _setDate: function(i, k) { + if(!k || k === "date") { this.date = i } + if(!k || k === "view") { this.viewDate = i } this.fill(); + this.setValue(); + var j; + if(this.isInput) { j = this.element } else { if(this.component) { j = this.element.find("input") } } + if(j) { j.change() } this.element.trigger({ type: "changeDate", date: this.getDate() }); + if(i === null) { this.date = this.viewDate } + }, + moveMinute: function(j, i) { + if(!i) { return j } + var k = new Date(j.valueOf()); + k.setUTCMinutes(k.getUTCMinutes() + (i * this.minuteStep)); + return k + }, + moveHour: function(j, i) { + if(!i) { return j } + var k = new Date(j.valueOf()); + k.setUTCHours(k.getUTCHours() + i); + return k + }, + moveDate: function(j, i) { + if(!i) { return j } + var k = new Date(j.valueOf()); + k.setUTCDate(k.getUTCDate() + i); + return k + }, + moveMonth: function(j, k) { + if(!k) { return j } + var n = new Date(j.valueOf()), + r = n.getUTCDate(), + o = n.getUTCMonth(), + m = Math.abs(k), + q, p; + k = k > 0 ? 1 : -1; + if(m === 1) { + p = k === -1 ? function() { return n.getUTCMonth() === o } : function() { return n.getUTCMonth() !== q }; + q = o + k; + n.setUTCMonth(q); + if(q < 0 || q > 11) { q = (q + 12) % 12 } + } else { + for(var l = 0; l < m; l++) { n = this.moveMonth(n, k) } q = n.getUTCMonth(); + n.setUTCDate(r); + p = function() { return q !== n.getUTCMonth() } + } + while(p()) { + n.setUTCDate(--r); + n.setUTCMonth(q) + } + return n + }, + moveYear: function(j, i) { return this.moveMonth(j, i * 12) }, + dateWithinRange: function(i) { return i >= this.startDate && i <= this.endDate }, + keydown: function(o) { + if(this.picker.is(":not(:visible)")) { if(o.keyCode === 27) { this.show() } return } + var k = false, + j, i, n; + switch(o.keyCode) { + case 27: + this.hide(); + o.preventDefault(); + break; + case 37: + case 39: + if(!this.keyboardNavigation) { break } j = o.keyCode === 37 ? -1 : 1; + var m = this.viewMode; + if(o.ctrlKey) { m += 2 } else { if(o.shiftKey) { m += 1 } } + if(m === 4) { + i = this.moveYear(this.date, j); + n = this.moveYear(this.viewDate, j) + } else { + if(m === 3) { + i = this.moveMonth(this.date, j); + n = this.moveMonth(this.viewDate, j) + } else { + if(m === 2) { + i = this.moveDate(this.date, j); + n = this.moveDate(this.viewDate, j) + } else { + if(m === 1) { + i = this.moveHour(this.date, j); + n = this.moveHour(this.viewDate, j) + } else { + if(m === 0) { + i = this.moveMinute(this.date, j); + n = this.moveMinute(this.viewDate, j) + } + } + } + } + } + if(this.dateWithinRange(i)) { + this.date = i; + this.viewDate = n; + this.setValue(); + this.update(); + o.preventDefault(); + k = true + } + break; + case 38: + case 40: + if(!this.keyboardNavigation) { break } j = o.keyCode === 38 ? -1 : 1; + m = this.viewMode; + if(o.ctrlKey) { m += 2 } else { if(o.shiftKey) { m += 1 } } + if(m === 4) { + i = this.moveYear(this.date, j); + n = this.moveYear(this.viewDate, j) + } else { + if(m === 3) { + i = this.moveMonth(this.date, j); + n = this.moveMonth(this.viewDate, j) + } else { + if(m === 2) { + i = this.moveDate(this.date, j * 7); + n = this.moveDate(this.viewDate, j * 7) + } else { + if(m === 1) { + if(this.showMeridian) { + i = this.moveHour(this.date, j * 6); + n = this.moveHour(this.viewDate, j * 6) + } else { + i = this.moveHour(this.date, j * 4); + n = this.moveHour(this.viewDate, j * 4) + } + } else { + if(m === 0) { + i = this.moveMinute(this.date, j * 4); + n = this.moveMinute(this.viewDate, j * 4) + } + } + } + } + } + if(this.dateWithinRange(i)) { + this.date = i; + this.viewDate = n; + this.setValue(); + this.update(); + o.preventDefault(); + k = true + } + break; + case 13: + if(this.viewMode !== 0) { + var p = this.viewMode; + this.showMode(-1); + this.fill(); + if(p === this.viewMode && this.autoclose) { this.hide() } + } else { this.fill(); if(this.autoclose) { this.hide() } } o.preventDefault(); + break; + case 9: + this.hide(); + break + } + if(k) { var l; if(this.isInput) { l = this.element } else { if(this.component) { l = this.element.find("input") } } if(l) { l.change() } this.element.trigger({ type: "changeDate", date: this.getDate() }) } + }, + showMode: function(i) { + if(i) { + var j = Math.max(0, Math.min(c.modes.length - 1, this.viewMode + i)); + if(j >= this.minView && j <= this.maxView) { + this.element.trigger({ type: "changeMode", date: this.viewDate, oldViewMode: this.viewMode, newViewMode: j }); + this.viewMode = j + } + } + this.picker.find(">div").hide().filter(".datetimepicker-" + c.modes[this.viewMode].clsName).css("display", "block"); + this.updateNavArrows() + }, + reset: function() { this._setDate(null, "date") }, + convertViewModeText: function(i) { + switch(i) { + case 4: + return "decade"; + case 3: + return "year"; + case 2: + return "month"; + case 1: + return "day"; + case 0: + return "hour" + } + } + }; + var b = d.fn.datetimepicker; + d.fn.datetimepicker = function(k) { + var i = Array.apply(null, arguments); + i.shift(); + var j; + this.each(function() { + var n = d(this), + m = n.data("datetimepicker"), + l = typeof k === "object" && k; + if(!m) { n.data("datetimepicker", (m = new g(this, d.extend({}, d.fn.datetimepicker.defaults, l)))) } + if(typeof k === "string" && typeof m[k] === "function") { j = m[k].apply(m, i); if(j !== f) { return false } } + }); + if(j !== f) { return j } else { return this } + }; + d.fn.datetimepicker.defaults = {}; + d.fn.datetimepicker.Constructor = g; +// var e = d.fn.datetimepicker.dates = { en: { days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"], months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], meridiem: ["am", "pm"], suffix: ["st", "nd", "rd", "th"], today: "Today", clear: "Clear" } }; + var e = d.fn.datetimepicker.dates = { + zh:{ + days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"], + daysShort: ["日", "一", "二", "三", "四", "五", "六", "日"], + daysMin: ["日", "一", "二", "三", "四", "五", "六", "日"], + months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], + monthsShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], + meridiem: ["上午", "下午"], + suffix: ["st", "nd", "rd", "th"], + today: "今天", + clear: "清空" + }, + en: { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + meridiem: ["am", "pm"], + suffix: ["st", "nd", "rd", "th"], + today: "Today", + clear: "Clear" } + }; + var c = { + modes: [{ clsName: "minutes", navFnc: "Hours", navStep: 1 }, { clsName: "hours", navFnc: "Date", navStep: 1 }, { clsName: "days", navFnc: "Month", navStep: 1 }, { clsName: "months", navFnc: "FullYear", navStep: 1 }, { clsName: "years", navFnc: "FullYear", navStep: 10 }], + isLeapYear: function(i) { return(((i % 4 === 0) && (i % 100 !== 0)) || (i % 400 === 0)) }, + getDaysInMonth: function(i, j) { return [31, (c.isLeapYear(i) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][j] }, + getDefaultFormat: function(i, j) { if(i === "standard") { if(j === "input") { return "yyyy-mm-dd hh:ii" } else { return "yyyy-mm-dd hh:ii:ss" } } else { if(i === "php") { if(j === "input") { return "Y-m-d H:i" } else { return "Y-m-d H:i:s" } } else { throw new Error("Invalid format type.") } } }, + validParts: function(i) { if(i === "standard") { return /t|hh?|HH?|p|P|z|Z|ii?|ss?|dd?|DD?|mm?|MM?|yy(?:yy)?/g } else { if(i === "php") { return /[dDjlNwzFmMnStyYaABgGhHis]/g } else { throw new Error("Invalid format type.") } } }, + nonpunctuation: /[^ -\/:-@\[-`{-~\t\n\rTZ]+/g, + parseFormat: function(l, j) { + var i = l.replace(this.validParts(j), "\0").split("\0"), + k = l.match(this.validParts(j)); + if(!i || !i.length || !k || k.length === 0) { throw new Error("Invalid date format.") } + return { separators: i, parts: k } + }, + parseDate: function(A, y, v, j, r) { + if(A instanceof Date) { + var u = new Date(A.valueOf() - A.getTimezoneOffset() * 60000); + u.setMilliseconds(0); + return u + } + if(/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(A)) { y = this.parseFormat("yyyy-mm-dd", j) } + if(/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}$/.test(A)) { y = this.parseFormat("yyyy-mm-dd hh:ii", j) } + if(/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}\:\d{1,2}[Z]{0,1}$/.test(A)) { y = this.parseFormat("yyyy-mm-dd hh:ii:ss", j) } + if(/^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(A)) { + var l = /([-+]\d+)([dmwy])/, + q = A.match(/([-+]\d+)([dmwy])/g), + t, p; + A = new Date(); + for(var x = 0; x < q.length; x++) { + t = l.exec(q[x]); + p = parseInt(t[1]); + switch(t[2]) { + case "d": + A.setUTCDate(A.getUTCDate() + p); + break; + case "m": + A = g.prototype.moveMonth.call(g.prototype, A, p); + break; + case "w": + A.setUTCDate(A.getUTCDate() + p * 7); + break; + case "y": + A = g.prototype.moveYear.call(g.prototype, A, p); + break + } + } + return h(A.getUTCFullYear(), A.getUTCMonth(), A.getUTCDate(), A.getUTCHours(), A.getUTCMinutes(), A.getUTCSeconds(), 0) + } + var q = A && A.toString().match(this.nonpunctuation) || [], + A = new Date(0, 0, 0, 0, 0, 0, 0), + m = {}, + z = ["hh", "h", "ii", "i", "ss", "s", "yyyy", "yy", "M", "MM", "m", "mm", "D", "DD", "d", "dd", "H", "HH", "p", "P", "z", "Z"], + o = { + hh: function(s, i) { return s.setUTCHours(i) }, + h: function(s, i) { return s.setUTCHours(i) }, + HH: function(s, i) { return s.setUTCHours(i === 12 ? 0 : i) }, + H: function(s, i) { return s.setUTCHours(i === 12 ? 0 : i) }, + ii: function(s, i) { return s.setUTCMinutes(i) }, + i: function(s, i) { return s.setUTCMinutes(i) }, + ss: function(s, i) { return s.setUTCSeconds(i) }, + s: function(s, i) { return s.setUTCSeconds(i) }, + yyyy: function(s, i) { return s.setUTCFullYear(i) }, + yy: function(s, i) { return s.setUTCFullYear(2000 + i) }, + m: function(s, i) { + i -= 1; + while(i < 0) { i += 12 } i %= 12; + s.setUTCMonth(i); + while(s.getUTCMonth() !== i) { if(isNaN(s.getUTCMonth())) { return s } else { s.setUTCDate(s.getUTCDate() - 1) } } + return s + }, + d: function(s, i) { return s.setUTCDate(i) }, + p: function(s, i) { return s.setUTCHours(i === 1 ? s.getUTCHours() + 12 : s.getUTCHours()) }, + z: function() { return r } + }, + B, k, t; + o.M = o.MM = o.mm = o.m; + o.dd = o.d; + o.P = o.p; + o.Z = o.z; + A = h(A.getFullYear(), A.getMonth(), A.getDate(), A.getHours(), A.getMinutes(), A.getSeconds()); + if(q.length === y.parts.length) { + for(var x = 0, w = y.parts.length; x < w; x++) { + B = parseInt(q[x], 10); + t = y.parts[x]; + if(isNaN(B)) { + switch(t) { + case "MM": + k = d(e[v].months).filter(function() { + var i = this.slice(0, q[x].length), + s = q[x].slice(0, i.length); + return i === s + }); + B = d.inArray(k[0], e[v].months) + 1; + break; + case "M": + k = d(e[v].monthsShort).filter(function() { + var i = this.slice(0, q[x].length), + s = q[x].slice(0, i.length); + return i.toLowerCase() === s.toLowerCase() + }); + B = d.inArray(k[0], e[v].monthsShort) + 1; + break; + case "p": + case "P": + B = d.inArray(q[x].toLowerCase(), e[v].meridiem); + break; + case "z": + case "Z": + r; + break + } + } + m[t] = B + } + for(var x = 0, n; x < z.length; x++) { n = z[x]; if(n in m && !isNaN(m[n])) { o[n](A, m[n]) } } + } + return A + }, + formatDate: function(l, q, m, p, o) { + if(l === null) { return "" } + var k; + if(p === "standard") { + k = { t: l.getTime(), yy: l.getUTCFullYear().toString().substring(2), yyyy: l.getUTCFullYear(), m: l.getUTCMonth() + 1, M: e[m].monthsShort[l.getUTCMonth()], MM: e[m].months[l.getUTCMonth()], d: l.getUTCDate(), D: e[m].daysShort[l.getUTCDay()], DD: e[m].days[l.getUTCDay()], p: (e[m].meridiem.length === 2 ? e[m].meridiem[l.getUTCHours() < 12 ? 0 : 1] : ""), h: l.getUTCHours(), i: l.getUTCMinutes(), s: l.getUTCSeconds(), z: o }; + if(e[m].meridiem.length === 2) { k.H = (k.h % 12 === 0 ? 12 : k.h % 12) } else { k.H = k.h } k.HH = (k.H < 10 ? "0" : "") + k.H; + k.P = k.p.toUpperCase(); + k.Z = k.z; + k.hh = (k.h < 10 ? "0" : "") + k.h; + k.ii = (k.i < 10 ? "0" : "") + k.i; + k.ss = (k.s < 10 ? "0" : "") + k.s; + k.dd = (k.d < 10 ? "0" : "") + k.d; + k.mm = (k.m < 10 ? "0" : "") + k.m + } else { + if(p === "php") { + k = { y: l.getUTCFullYear().toString().substring(2), Y: l.getUTCFullYear(), F: e[m].months[l.getUTCMonth()], M: e[m].monthsShort[l.getUTCMonth()], n: l.getUTCMonth() + 1, t: c.getDaysInMonth(l.getUTCFullYear(), l.getUTCMonth()), j: l.getUTCDate(), l: e[m].days[l.getUTCDay()], D: e[m].daysShort[l.getUTCDay()], w: l.getUTCDay(), N: (l.getUTCDay() === 0 ? 7 : l.getUTCDay()), S: (l.getUTCDate() % 10 <= e[m].suffix.length ? e[m].suffix[l.getUTCDate() % 10 - 1] : ""), a: (e[m].meridiem.length === 2 ? e[m].meridiem[l.getUTCHours() < 12 ? 0 : 1] : ""), g: (l.getUTCHours() % 12 === 0 ? 12 : l.getUTCHours() % 12), G: l.getUTCHours(), i: l.getUTCMinutes(), s: l.getUTCSeconds() }; + k.m = (k.n < 10 ? "0" : "") + k.n; + k.d = (k.j < 10 ? "0" : "") + k.j; + k.A = k.a.toString().toUpperCase(); + k.h = (k.g < 10 ? "0" : "") + k.g; + k.H = (k.G < 10 ? "0" : "") + k.G; + k.i = (k.i < 10 ? "0" : "") + k.i; + k.s = (k.s < 10 ? "0" : "") + k.s + } else { throw new Error("Invalid format type.") } + } + var l = [], + r = d.extend([], q.separators); + for(var n = 0, j = q.parts.length; n < j; n++) { if(r.length) { l.push(r.shift()) } l.push(k[q.parts[n]]) } + if(r.length) { l.push(r.shift()) } + return l.join("") + }, + convertViewMode: function(i) { + switch(i) { + case 4: + case "decade": + i = 4; + break; + case 3: + case "year": + i = 3; + break; + case 2: + case "month": + i = 2; + break; + case 1: + case "day": + i = 1; + break; + case 0: + case "hour": + i = 0; + break + } + return i + }, + headTemplate: '', + headTemplateV3: ' ', + contTemplate: '', + footTemplate: '' + }; + c.template = '
' + c.headTemplate + c.contTemplate + c.footTemplate + '
' + c.headTemplate + c.contTemplate + c.footTemplate + '
' + c.headTemplate + "" + c.footTemplate + '
' + c.headTemplate + c.contTemplate + c.footTemplate + '
' + c.headTemplate + c.contTemplate + c.footTemplate + "
"; + c.templateV3 = '
' + c.headTemplateV3 + c.contTemplate + c.footTemplate + '
' + c.headTemplateV3 + c.contTemplate + c.footTemplate + '
' + c.headTemplateV3 + "" + c.footTemplate + '
' + c.headTemplateV3 + c.contTemplate + c.footTemplate + '
' + c.headTemplateV3 + c.contTemplate + c.footTemplate + "
"; + d.fn.datetimepicker.DPGlobal = c; + d.fn.datetimepicker.noConflict = function() { d.fn.datetimepicker = b; return this }; + d(document).on("focus.datetimepicker.data-api click.datetimepicker.data-api", '[data-provide="datetimepicker"]', function(j) { + var i = d(this); + if(i.data("datetimepicker")) { return } j.preventDefault(); + i.datetimepicker("show") + }); + d(function() { d('[data-provide="datetimepicker-inline"]').datetimepicker() }) +})); \ No newline at end of file diff --git a/web/admin/js/common/bootstrap.js b/web/admin/js/common/bootstrap.js new file mode 100644 index 0000000..59a8dca --- /dev/null +++ b/web/admin/js/common/bootstrap.js @@ -0,0 +1,2276 @@ +/*! + * Bootstrap v3.3.0 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +if (typeof jQuery === 'undefined') { + throw new Error('Bootstrap\'s JavaScript requires jQuery') +} + ++function ($) { + var version = $.fn.jquery.split(' ')[0].split('.') + if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) { + throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher') + } +}(jQuery); + +/* ======================================================================== + * Bootstrap: transition.js v3.3.0 + * http://getbootstrap.com/javascript/#transitions + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) + // ============================================================ + + function transitionEnd() { + var el = document.createElement('bootstrap') + + var transEndEventNames = { + WebkitTransition : 'webkitTransitionEnd', + MozTransition : 'transitionend', + OTransition : 'oTransitionEnd otransitionend', + transition : 'transitionend' + } + + for (var name in transEndEventNames) { + if (el.style[name] !== undefined) { + return { end: transEndEventNames[name] } + } + } + + return false // explicit for ie8 ( ._.) + } + + // http://blog.alexmaccaw.com/css-transitions + $.fn.emulateTransitionEnd = function (duration) { + var called = false + var $el = this + $(this).one('bsTransitionEnd', function () { called = true }) + var callback = function () { if (!called) $($el).trigger($.support.transition.end) } + setTimeout(callback, duration) + return this + } + + $(function () { + $.support.transition = transitionEnd() + + if (!$.support.transition) return + + $.event.special.bsTransitionEnd = { + bindType: $.support.transition.end, + delegateType: $.support.transition.end, + handle: function (e) { + if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) + } + } + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: alert.js v3.3.0 + * http://getbootstrap.com/javascript/#alerts + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // ALERT CLASS DEFINITION + // ====================== + + var dismiss = '[data-dismiss="alert"]' + var Alert = function (el) { + $(el).on('click', dismiss, this.close) + } + + Alert.VERSION = '3.3.0' + + Alert.TRANSITION_DURATION = 150 + + Alert.prototype.close = function (e) { + var $this = $(this) + var selector = $this.attr('data-target') + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 + } + + var $parent = $(selector) + + if (e) e.preventDefault() + + if (!$parent.length) { + $parent = $this.closest('.alert') + } + + $parent.trigger(e = $.Event('close.bs.alert')) + + if (e.isDefaultPrevented()) return + + $parent.removeClass('in') + + function removeElement() { + // detach from parent, fire event then clean up data + $parent.detach().trigger('closed.bs.alert').remove() + } + + $.support.transition && $parent.hasClass('fade') ? + $parent + .one('bsTransitionEnd', removeElement) + .emulateTransitionEnd(Alert.TRANSITION_DURATION) : + removeElement() + } + + + // ALERT PLUGIN DEFINITION + // ======================= + + function Plugin(option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.alert') + + if (!data) $this.data('bs.alert', (data = new Alert(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + var old = $.fn.alert + + $.fn.alert = Plugin + $.fn.alert.Constructor = Alert + + + // ALERT NO CONFLICT + // ================= + + $.fn.alert.noConflict = function () { + $.fn.alert = old + return this + } + + + // ALERT DATA-API + // ============== + + $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: button.js v3.3.0 + * http://getbootstrap.com/javascript/#buttons + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // BUTTON PUBLIC CLASS DEFINITION + // ============================== + + var Button = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, Button.DEFAULTS, options) + this.isLoading = false + } + + Button.VERSION = '3.3.0' + + Button.DEFAULTS = { + loadingText: 'loading...' + } + + Button.prototype.setState = function (state) { + var d = 'disabled' + var $el = this.$element + var val = $el.is('input') ? 'val' : 'html' + var data = $el.data() + + state = state + 'Text' + + if (data.resetText == null) $el.data('resetText', $el[val]()) + + // push to event loop to allow forms to submit + setTimeout($.proxy(function () { + $el[val](data[state] == null ? this.options[state] : data[state]) + + if (state == 'loadingText') { + this.isLoading = true + $el.addClass(d).attr(d, d) + } else if (this.isLoading) { + this.isLoading = false + $el.removeClass(d).removeAttr(d) + } + }, this), 0) + } + + Button.prototype.toggle = function () { + var changed = true + var $parent = this.$element.closest('[data-toggle="buttons"]') + + if ($parent.length) { + var $input = this.$element.find('input') + if ($input.prop('type') == 'radio') { + if ($input.prop('checked') && this.$element.hasClass('active')) changed = false + else $parent.find('.active').removeClass('active') + } + if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change') + } else { + this.$element.attr('aria-pressed', !this.$element.hasClass('active')) + } + + if (changed) this.$element.toggleClass('active') + } + + + // BUTTON PLUGIN DEFINITION + // ======================== + + function Plugin(option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.button') + var options = typeof option == 'object' && option + + if (!data) $this.data('bs.button', (data = new Button(this, options))) + + if (option == 'toggle') data.toggle() + else if (option) data.setState(option) + }) + } + + var old = $.fn.button + + $.fn.button = Plugin + $.fn.button.Constructor = Button + + + // BUTTON NO CONFLICT + // ================== + + $.fn.button.noConflict = function () { + $.fn.button = old + return this + } + + + // BUTTON DATA-API + // =============== + + $(document) + .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { + var $btn = $(e.target) + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') + Plugin.call($btn, 'toggle') + e.preventDefault() + }) + .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { + $(e.target).closest('.btn').toggleClass('focus', e.type == 'focus') + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: carousel.js v3.3.0 + * http://getbootstrap.com/javascript/#carousel + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // CAROUSEL CLASS DEFINITION + // ========================= + + var Carousel = function (element, options) { + this.$element = $(element) + this.$indicators = this.$element.find('.carousel-indicators') + this.options = options + this.paused = + this.sliding = + this.interval = + this.$active = + this.$items = null + + this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this)) + + this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element + .on('mouseenter.bs.carousel', $.proxy(this.pause, this)) + .on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) + } + + Carousel.VERSION = '3.3.0' + + Carousel.TRANSITION_DURATION = 600 + + Carousel.DEFAULTS = { + interval: 5000, + pause: 'hover', + wrap: true, + keyboard: true + } + + Carousel.prototype.keydown = function (e) { + switch (e.which) { + case 37: this.prev(); break + case 39: this.next(); break + default: return + } + + e.preventDefault() + } + + Carousel.prototype.cycle = function (e) { + e || (this.paused = false) + + this.interval && clearInterval(this.interval) + + this.options.interval + && !this.paused + && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) + + return this + } + + Carousel.prototype.getItemIndex = function (item) { + this.$items = item.parent().children('.item') + return this.$items.index(item || this.$active) + } + + Carousel.prototype.getItemForDirection = function (direction, active) { + var delta = direction == 'prev' ? -1 : 1 + var activeIndex = this.getItemIndex(active) + var itemIndex = (activeIndex + delta) % this.$items.length + return this.$items.eq(itemIndex) + } + + Carousel.prototype.to = function (pos) { + var that = this + var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active')) + + if (pos > (this.$items.length - 1) || pos < 0) return + + if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid" + if (activeIndex == pos) return this.pause().cycle() + + return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos)) + } + + Carousel.prototype.pause = function (e) { + e || (this.paused = true) + + if (this.$element.find('.next, .prev').length && $.support.transition) { + this.$element.trigger($.support.transition.end) + this.cycle(true) + } + + this.interval = clearInterval(this.interval) + + return this + } + + Carousel.prototype.next = function () { + if (this.sliding) return + return this.slide('next') + } + + Carousel.prototype.prev = function () { + if (this.sliding) return + return this.slide('prev') + } + + Carousel.prototype.slide = function (type, next) { + var $active = this.$element.find('.item.active') + var $next = next || this.getItemForDirection(type, $active) + var isCycling = this.interval + var direction = type == 'next' ? 'left' : 'right' + var fallback = type == 'next' ? 'first' : 'last' + var that = this + + if (!$next.length) { + if (!this.options.wrap) return + $next = this.$element.find('.item')[fallback]() + } + + if ($next.hasClass('active')) return (this.sliding = false) + + var relatedTarget = $next[0] + var slideEvent = $.Event('slide.bs.carousel', { + relatedTarget: relatedTarget, + direction: direction + }) + this.$element.trigger(slideEvent) + if (slideEvent.isDefaultPrevented()) return + + this.sliding = true + + isCycling && this.pause() + + if (this.$indicators.length) { + this.$indicators.find('.active').removeClass('active') + var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)]) + $nextIndicator && $nextIndicator.addClass('active') + } + + var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid" + if ($.support.transition && this.$element.hasClass('slide')) { + $next.addClass(type) + $next[0].offsetWidth // force reflow + $active.addClass(direction) + $next.addClass(direction) + $active + .one('bsTransitionEnd', function () { + $next.removeClass([type, direction].join(' ')).addClass('active') + $active.removeClass(['active', direction].join(' ')) + that.sliding = false + setTimeout(function () { + that.$element.trigger(slidEvent) + }, 0) + }) + .emulateTransitionEnd(Carousel.TRANSITION_DURATION) + } else { + $active.removeClass('active') + $next.addClass('active') + this.sliding = false + this.$element.trigger(slidEvent) + } + + isCycling && this.cycle() + + return this + } + + + // CAROUSEL PLUGIN DEFINITION + // ========================== + + function Plugin(option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.carousel') + var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) + var action = typeof option == 'string' ? option : options.slide + + if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) + if (typeof option == 'number') data.to(option) + else if (action) data[action]() + else if (options.interval) data.pause().cycle() + }) + } + + var old = $.fn.carousel + + $.fn.carousel = Plugin + $.fn.carousel.Constructor = Carousel + + + // CAROUSEL NO CONFLICT + // ==================== + + $.fn.carousel.noConflict = function () { + $.fn.carousel = old + return this + } + + + // CAROUSEL DATA-API + // ================= + + var clickHandler = function (e) { + var href + var $this = $(this) + var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7 + if (!$target.hasClass('carousel')) return + var options = $.extend({}, $target.data(), $this.data()) + var slideIndex = $this.attr('data-slide-to') + if (slideIndex) options.interval = false + + Plugin.call($target, options) + + if (slideIndex) { + $target.data('bs.carousel').to(slideIndex) + } + + e.preventDefault() + } + + $(document) + .on('click.bs.carousel.data-api', '[data-slide]', clickHandler) + .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler) + + $(window).on('load', function () { + $('[data-ride="carousel"]').each(function () { + var $carousel = $(this) + Plugin.call($carousel, $carousel.data()) + }) + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: collapse.js v3.3.0 + * http://getbootstrap.com/javascript/#collapse + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // COLLAPSE PUBLIC CLASS DEFINITION + // ================================ + + var Collapse = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, Collapse.DEFAULTS, options) + this.$trigger = $(this.options.trigger).filter('[href="#' + element.id + '"], [data-target="#' + element.id + '"]') + this.transitioning = null + + if (this.options.parent) { + this.$parent = this.getParent() + } else { + this.addAriaAndCollapsedClass(this.$element, this.$trigger) + } + + if (this.options.toggle) this.toggle() + } + + Collapse.VERSION = '3.3.0' + + Collapse.TRANSITION_DURATION = 350 + + Collapse.DEFAULTS = { + toggle: true, + trigger: '[data-toggle="collapse"]' + } + + Collapse.prototype.dimension = function () { + var hasWidth = this.$element.hasClass('width') + return hasWidth ? 'width' : 'height' + } + + Collapse.prototype.show = function () { + if (this.transitioning || this.$element.hasClass('in')) return + + var activesData + var actives = this.$parent && this.$parent.find('> .panel').children('.in, .collapsing') + + if (actives && actives.length) { + activesData = actives.data('bs.collapse') + if (activesData && activesData.transitioning) return + } + + var startEvent = $.Event('show.bs.collapse') + this.$element.trigger(startEvent) + if (startEvent.isDefaultPrevented()) return + + if (actives && actives.length) { + Plugin.call(actives, 'hide') + activesData || actives.data('bs.collapse', null) + } + + var dimension = this.dimension() + + this.$element + .removeClass('collapse') + .addClass('collapsing')[dimension](0) + .attr('aria-expanded', true) + + this.$trigger + .removeClass('collapsed') + .attr('aria-expanded', true) + + this.transitioning = 1 + + var complete = function () { + this.$element + .removeClass('collapsing') + .addClass('collapse in')[dimension]('') + this.transitioning = 0 + this.$element + .trigger('shown.bs.collapse') + } + + if (!$.support.transition) return complete.call(this) + + var scrollSize = $.camelCase(['scroll', dimension].join('-')) + + this.$element + .one('bsTransitionEnd', $.proxy(complete, this)) + .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize]) + } + + Collapse.prototype.hide = function () { + if (this.transitioning || !this.$element.hasClass('in')) return + + var startEvent = $.Event('hide.bs.collapse') + this.$element.trigger(startEvent) + if (startEvent.isDefaultPrevented()) return + + var dimension = this.dimension() + + this.$element[dimension](this.$element[dimension]())[0].offsetHeight + + this.$element + .addClass('collapsing') + .removeClass('collapse in') + .attr('aria-expanded', false) + + this.$trigger + .addClass('collapsed') + .attr('aria-expanded', false) + + this.transitioning = 1 + + var complete = function () { + this.transitioning = 0 + this.$element + .removeClass('collapsing') + .addClass('collapse') + .trigger('hidden.bs.collapse') + } + + if (!$.support.transition) return complete.call(this) + + this.$element + [dimension](0) + .one('bsTransitionEnd', $.proxy(complete, this)) + .emulateTransitionEnd(Collapse.TRANSITION_DURATION) + } + + Collapse.prototype.toggle = function () { + this[this.$element.hasClass('in') ? 'hide' : 'show']() + } + + Collapse.prototype.getParent = function () { + return $(this.options.parent) + .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]') + .each($.proxy(function (i, element) { + var $element = $(element) + this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element) + }, this)) + .end() + } + + Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) { + var isOpen = $element.hasClass('in') + + $element.attr('aria-expanded', isOpen) + $trigger + .toggleClass('collapsed', !isOpen) + .attr('aria-expanded', isOpen) + } + + function getTargetFromTrigger($trigger) { + var href + var target = $trigger.attr('data-target') + || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 + + return $(target) + } + + + // COLLAPSE PLUGIN DEFINITION + // ========================== + + function Plugin(option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.collapse') + var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) + + if (!data && options.toggle && option == 'show') options.toggle = false + if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + var old = $.fn.collapse + + $.fn.collapse = Plugin + $.fn.collapse.Constructor = Collapse + + + // COLLAPSE NO CONFLICT + // ==================== + + $.fn.collapse.noConflict = function () { + $.fn.collapse = old + return this + } + + + // COLLAPSE DATA-API + // ================= + + $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { + var $this = $(this) + + if (!$this.attr('data-target')) e.preventDefault() + + var $target = getTargetFromTrigger($this) + var data = $target.data('bs.collapse') + var option = data ? 'toggle' : $.extend({}, $this.data(), { trigger: this }) + + Plugin.call($target, option) + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: dropdown.js v3.3.0 + * http://getbootstrap.com/javascript/#dropdowns + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // DROPDOWN CLASS DEFINITION + // ========================= + + var backdrop = '.dropdown-backdrop' + var toggle = '[data-toggle="dropdown"]' + var Dropdown = function (element) { + $(element).on('click.bs.dropdown', this.toggle) + } + + Dropdown.VERSION = '3.3.0' + + Dropdown.prototype.toggle = function (e) { + var $this = $(this) + + if ($this.is('.disabled, :disabled')) return + + var $parent = getParent($this) + var isActive = $parent.hasClass('open') + + clearMenus() + + if (!isActive) { + if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { + // if mobile we use a backdrop because click events don't delegate + $('