Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:harshals/CRM

  • Loading branch information...
commit ccbfd07cf61862b047a0a710c1b5b3d7e43cc086 2 parents e2093c8 + eea5619
@roshandarekar roshandarekar authored
View
2  app.psgi
@@ -36,7 +36,7 @@ set 'log' => 'debug';
set 'traces' => 1;
-set "template" => "simple";
+set "template" => "template_toolkit";
my $app = sub {
my $env = shift;
View
2  config.yml
@@ -11,3 +11,5 @@ plugins:
app_id: 1
register_message_subject: Welcome to Adhril.com
+
+pdf_dir: views/pdf
View
34 lib/App.pm
@@ -16,6 +16,13 @@
#===============================================================================
package App;
+
+use File::chdir;
+use File::Spec::Functions qw/catfile rel2abs/;
+use File::Temp qw/tmpnam/;
+use PDF::Reuse;
+
+
use strict;
use warnings;
@@ -30,7 +37,7 @@ before sub {
};
get '/' => sub {
-
+
template 'index';
};
@@ -39,6 +46,31 @@ get '/debug' => sub {
return { data => vars->{serialize_options} };
};
+get '/pdf/:path' => sub {
+
+ my $filename = params->{'path'};
+
+ send_error({error => 'No PDF dir defined ' }) unless -d config->{'pdf_dir'};
+
+ my $pdf = config->{'pdf_dir'} . "/" . $filename . ".tt";
+
+ send_error({error => 'No PDF template defined' }) unless -f $pdf;
+
+ content_type 'application/pdf';
+
+ eval {
+ template $pdf, { pdf_template => "$filename.pdf" };
+ };
+
+ if ($@) {
+
+ debug $@;
+ }
+
+ debug "coming here roo";
+
+};
+
1;
View
324 logs/development.log
@@ -1,259 +1,65 @@
-[294] debug @1.066142> [hit #1]me too in (eval 108) l. 1
-[294] debug @0.001592> [hit #3]me too in (eval 108) l. 1
-[375] debug @0.001098> [hit #1]P : in (eval 108) l. 1
-[399] debug @0.001159> [hit #1]P : $VAR1 = {}; in (eval 108) l. 1
-[399] debug @0.001654> [hit #3]P : $VAR1 = {
- 'crap' => '1'
- }; in (eval 108) l. 1
-[439] debug @0.001406> [hit #1]P : $VAR1 = {
- 'crap' => '1'
- }; in (eval 108) l. 1
-[439] debug @0.001281> [hit #3]P : $VAR1 = {
- 'password' => 'crap',
- 'username' => 'admin'
- }; in (eval 108) l. 1
-[471] debug @0.001360> [hit #1]P : $VAR1 = {
- 'password' => 'crap',
- 'username' => 'admin'
- }; in (eval 108) l. 1
-[477] debug @0.001381> [hit #1]P : $VAR1 = {
- 'password' => 'crap',
- 'username' => 'admin'
- }; in (eval 108) l. 1
-[477] debug @0.001404> [hit #2]P : $VAR1 = {
- 'failed' => '1'
- }; in (eval 108) l. 1
-[477] debug @0.001581> [hit #4]P : $VAR1 = {
- 'password' => 'foobar',
- 'username' => 'admin'
- }; in (eval 108) l. 1
-[477] debug @0.001482> [hit #5]P : $VAR1 = {
- 'failed' => '1'
- }; in (eval 108) l. 1
-[477] debug @0.001426> [hit #6]P : $VAR1 = {}; in (eval 108) l. 1
-[477] debug @0.001358> [hit #7]P : $VAR1 = {
- 'password' => 'foobar',
- 'username' => 'admin'
- }; in (eval 108) l. 1
-[477] debug @0.001517> [hit #8]P : $VAR1 = {
- 'failed' => '1'
- }; in (eval 108) l. 1
-[571] debug @0.001450> [hit #1]P : $VAR1 = {
- 'password' => 'foobar',
- 'username' => 'admin'
- }; in (eval 108) l. 1
-[571] debug @0.001552> [hit #2]P : $VAR1 = {
- 'failed' => '1'
- }; in (eval 108) l. 1
-[571] debug @0.001374> [hit #3]P : $VAR1 = {
- 'password' => '12345',
- 'username' => 'Adam@csindustries.com'
- }; in (eval 108) l. 1
-[571] debug @0.007457> [hit #3]my user data in (eval 108) l. 1
-[611] debug @0.001443> [hit #1]P : $VAR1 = {
- 'password' => '12345',
- 'username' => 'Adam@csindustries.com'
- }; in (eval 108) l. 1
-[611] debug @0.287113> [hit #1]my user data Master::Result::User in (eval 108) l. 1
-[620] debug @0.001389> [hit #1]P : $VAR1 = {
- 'password' => '12345',
- 'username' => 'Adam@csindustries.com'
- }; in (eval 108) l. 1
-[620] debug @0.001331> [hit #3]P : $VAR1 = {}; in (eval 108) l. 1
-[1228] debug @0.001528> [hit #1]P : $VAR1 = {
- 'failed' => '1'
- }; in (eval 112) l. 1
-[1228] debug @0.001745> [hit #2]P : $VAR1 = {
- 'password' => '12345',
- 'username' => 'Adam@csindustries.com'
- }; in (eval 112) l. 1
-[1228] debug @0.131981> [hit #3]me too in (eval 112) l. 1
-[1228] debug @0.002428> [hit #4]me too in (eval 112) l. 1
-[1228] debug @0.001958> [hit #5]me too in (eval 112) l. 1
-[1228] debug @0.002224> [hit #6]me too in (eval 112) l. 1
-[1228] debug @0.001743> [hit #8]P : $VAR1 = {}; in (eval 112) l. 1
-[1424] debug @0.353170> [hit #1]me too in (eval 112) l. 1
-[1434] debug @0.354834> [hit #1]me too in (eval 112) l. 1
-[1434] debug @0.355556> [hit #1]P : $VAR1 = {}; in (eval 112) l. 1
-[1434] debug @0.002037> [hit #3]P : $VAR1 = {
- 'password' => '12345',
- 'username' => 'Adam@csindustries.com'
- }; in (eval 112) l. 1
-[1434] debug @0.002298> [hit #4]me too in (eval 112) l. 1
-[1434] debug @0.002967> [hit #5]me too in (eval 112) l. 1
-[1434] debug @0.002926> [hit #6]me too in (eval 112) l. 1
-[1434] debug @0.003092> [hit #8]me too in (eval 112) l. 1
-[1434] debug @0.003429> [hit #11]me too in (eval 112) l. 1
-[1434] debug @0.003047> [hit #13]me too in (eval 112) l. 1
-[1434] debug @0.001910> [hit #14]P : $VAR1 = {}; in (eval 112) l. 1
-[2096] debug @0.001657> [hit #1]cming here in (eval 87) l. 1
-[2109] debug @0.001754> [hit #1]cming here in (eval 87) l. 1
-[2115] debug @0.051479> [hit #1]cming here too in (eval 87) l. 1
-[3459] debug @0.012990> [hit #38]crap me in (eval 86) l. 1
-[3459] debug @0.072438> [hit #38]$VAR1 = bless( {
- 'settings' => {
- 'driver' => 'sendmail'
- }
- }, 'Emailesque' ); in (eval 86) l. 1
-[3459] debug @0.009881> [hit #55]crap me in (eval 86) l. 1
-[3459] debug @0.024357> [hit #55]$VAR1 = bless( {
- 'settings' => {
- 'driver' => 'sendmail'
- }
- }, 'Emailesque' ); in (eval 86) l. 1
-[4359] debug @0.009082> [hit #4]crap me in (eval 86) l. 1
-[4359] debug @0.080570> [hit #4]$VAR1 = bless( {
- 'settings' => {
- 'driver' => 'sendmail'
- }
- }, 'Emailesque' ); in (eval 86) l. 1
-[4380] debug @0.410515> [hit #1]crap me in (eval 86) l. 1
-[4380] debug @0.460542> [hit #1]$VAR1 = bless( {
- 'settings' => {
- 'driver' => 'sendmail'
- }
- }, 'Emailesque' ); in (eval 86) l. 1
-[4390] debug @0.412118> [hit #1]crap me in (eval 86) l. 1
-[4429] debug @0.010210> [hit #4]crap me in (eval 86) l. 1
-[4737] debug @0.003302> [hit #4]$VAR1 = bless( {
- 'settings' => {
- 'pass' => 'FooBar1979',
- 'ssl' => '1',
- 'user' => 'harshal.shah@gmail.com',
- 'port' => '465',
- 'host' => 'smtp.gmail.com',
- 'driver' => 'smtp'
- }
- }, 'Emailesque' ); in (eval 113) l. 1
-[4748] debug @0.002278> [hit #1]$VAR1 = bless( {
- 'settings' => {
- 'pass' => 'FooBar1979',
- 'ssl' => '1',
- 'user' => 'harshal.shah@gmail.com',
- 'port' => '465',
- 'host' => 'smtp.gmail.com',
- 'driver' => 'smtp'
- }
- }, 'Emailesque' ); in (eval 113) l. 1
-[4748] debug @0.002586> [hit #2]$VAR1 = bless( {
- 'settings' => {
- 'pass' => 'FooBar1979',
- 'ssl' => '1',
- 'user' => 'harshal.shah@gmail.com',
- 'port' => '465',
- 'host' => 'smtp.gmail.com',
- 'driver' => 'smtp'
- }
- }, 'Emailesque' ); in (eval 113) l. 1
-[4748] debug @0.002572> [hit #3]$VAR1 = bless( {
- 'settings' => {
- 'pass' => 'FooBar1979',
- 'ssl' => '1',
- 'user' => 'harshal.shah@gmail.com',
- 'port' => '465',
- 'host' => 'smtp.gmail.com',
- 'driver' => 'smtp'
- }
- }, 'Emailesque' ); in (eval 113) l. 1
-[4765] debug @0.002265> [hit #1]$VAR1 = bless( {
- 'settings' => {
- 'pass' => 'Add1234',
- 'ssl' => '1',
- 'user' => 'info@adhril.com',
- 'port' => '465',
- 'host' => 'smtp.gmail.com',
- 'driver' => 'smtp'
- }
- }, 'Emailesque' ); in (eval 113) l. 1
-[4869] debug @0.115675> [hit #7]crap me in (eval 113) l. 1
-[4891] debug @0.012202> [hit #3]crap me in (eval 113) l. 1
-[4947] debug @0.414007> [hit #1]crap me in (eval 113) l. 1
-[4951] debug @0.011482> [hit #3]crap me in (eval 113) l. 1
-[4951] debug @0.080212> [hit #3]$VAR1 = bless( {
- 'settings' => {
- 'pass' => 'Add1234',
- 'ssl' => '1',
- 'user' => 'info@adhril.com',
- 'port' => '465',
- 'host' => 'smtp.gmail.com',
- 'driver' => 'smtp'
- }
- }, 'Emailesque' ); in (eval 113) l. 1
-[4978] debug @0.480040> [hit #1]crap me in (eval 113) l. 1
-[4978] debug @0.530014> [hit #1]$VAR1 = bless( {
- 'settings' => {
- 'pass' => 'Add1234',
- 'ssl' => '1',
- 'user' => 'info@adhril.com',
- 'port' => '465',
- 'host' => 'smtp.gmail.com',
- 'driver' => 'smtp'
- }
- }, 'Emailesque' ); in (eval 113) l. 1
-[5002] debug @0.423066> [hit #1]crap me in (eval 113) l. 1
-[5002] debug @0.478378> [hit #1]$VAR1 = bless( {
- 'settings' => {
- 'pass' => 'Add1234',
- 'ssl' => '1',
- 'user' => 'info@adhril.com',
- 'port' => '465',
- 'host' => 'smtp.gmail.com',
- 'driver' => 'smtp'
- }
- }, 'Emailesque' ); in (eval 113) l. 1
-[5015] debug @0.413412> [hit #1]crap me in (eval 113) l. 1
-[5015] debug @0.470715> [hit #1]$VAR1 = bless( {
- 'settings' => {
- 'pass' => 'Add1234',
- 'ssl' => '1',
- 'user' => 'info@adhril.com',
- 'port' => '465',
- 'host' => 'smtp.gmail.com',
- 'driver' => 'smtp'
- }
- }, 'Emailesque' ); in (eval 113) l. 1
-[5049] debug @0.414234> [hit #1]crap me in (eval 113) l. 1
-[5049] debug @0.485433> [hit #1]$VAR1 = bless( {
- 'settings' => {
- 'pass' => 'Add1234',
- 'ssl' => '1',
- 'user' => 'info@adhril.com',
- 'port' => '465',
- 'host' => 'smtp.gmail.com',
- 'driver' => 'smtp'
- }
- }, 'Emailesque' ); in (eval 113) l. 1
-[5076] debug @0.497841> [hit #1]crap me in (eval 113) l. 1
-[5080] debug @0.419279> [hit #1]crap me in (eval 113) l. 1
-[5080] debug @0.470061> [hit #1]$VAR1 = bless( {
- 'settings' => {
- 'pass' => 'Add1234',
- 'ssl' => '1',
- 'user' => 'info@adhril.com',
- 'port' => '465',
- 'host' => 'smtp.gmail.com',
- 'driver' => 'smtp'
- }
- }, 'Emailesque' ); in (eval 113) l. 1
-[5120] debug @0.419804> [hit #1]crap me in (eval 113) l. 1
-[5120] debug @0.484096> [hit #1]$VAR1 = bless( {
- 'settings' => {
- 'pass' => 'Add1234',
- 'ssl' => '1',
- 'user' => 'info@adhril.com',
- 'port' => '465',
- 'host' => 'smtp.gmail.com',
- 'driver' => 'smtp'
- }
- }, 'Emailesque' ); in (eval 113) l. 1
-[5155] debug @0.421420> [hit #1]crap me in (eval 113) l. 1
-[5155] debug @0.495448> [hit #1]$VAR1 = bless( {
- 'settings' => {
- 'pass' => 'Add1234',
- 'ssl' => '1',
- 'user' => 'info@adhril.com',
- 'port' => '465',
- 'host' => 'smtp.gmail.com',
- 'driver' => 'smtp'
- }
- }, 'Emailesque' ); in (eval 113) l. 1
+[5235] debug @0.013162> [hit #3]'/Users/harshal/Developments/Projects/CRM/views/views/pdf/temp.tt.tt' doesn't exist or not a regular file at /usr/local/lib/perl5/site_perl/5.12.1/Dancer/Template/TemplateToolkit.pm line 50
+ Dancer::Template::TemplateToolkit::render('Dancer::Template::TemplateToolkit=HASH(0x2134b50)', '/Users/harshal/Developments/Projects/CRM/views/views/pdf/temp...', 'HASH(0x2135100)') called at /usr/local/lib/perl5/site_perl/5.12.1/Dancer/Template/Abstract.pm line 55
+ Dancer::Template::Abstract::apply_renderer('Dancer::Template::TemplateToolkit=HASH(0x2134b50)', 'views/pdf/temp.tt.tt', 'HASH(0x2135100)') called at /usr/local/lib/perl5/site_perl/5.12.1/Dancer/Template/Abstract.pm line 133
+ Dancer::Template::Abstract::template('Dancer::Template::Abstract', 'views/pdf/temp.tt.tt', 'HASH(0x2135100)') called at /usr/local/lib/perl5/site_perl/5.12.1/Dancer.pm line 150
+ Dancer::template('views/pdf/temp.tt.tt', 'HASH(0x2135100)') called at /Users/harshal/Developments/Projects/CRM/lib/App.pm line 55
+ eval {...} called at /Users/harshal/Developments/Projects/CRM/lib/App.pm line 54
+ App::__ANON__() called at /usr/local/lib/perl5/site_perl/5.12.1/Dancer/Route.pm line 234
+ Dancer::Route::execute('Dancer::Route=HASH(0xb988a0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Dancer/Route.pm line 155
+ Dancer::Route::run('Dancer::Route=HASH(0xb988a0)', 'Dancer::Request=HASH(0x21a08d0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Dancer/Renderer.pm line 120
+ Dancer::Renderer::get_action_response() called at /usr/local/lib/perl5/site_perl/5.12.1/Dancer/Renderer.pm line 23
+ Dancer::Renderer::render_action('Dancer::Renderer') called at /usr/local/lib/perl5/site_perl/5.12.1/Dancer/Handler.pm line 72
+ eval {...} called at /usr/local/lib/perl5/site_perl/5.12.1/Dancer/Handler.pm line 71
+ Dancer::Handler::handle_request('Dancer::Handler', 'Dancer::Request=HASH(0x21a08d0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Dancer.pm line 310
+ Dancer::_start('Dancer', 'Dancer::Request=HASH(0x21a08d0)') called at app.psgi line 45
+ Plack::Sandbox::app_2epsgi::__ANON__('HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Middleware/Static.pm line 18
+ Plack::Middleware::Static::call('Plack::Middleware::Static=HASH(0xc5a5c0)', 'HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Component.pm line 39
+ Plack::Component::__ANON__('HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Middleware/SimpleLogger.pm line 28
+ Plack::Middleware::SimpleLogger::call('Plack::Middleware::SimpleLogger=HASH(0xc5a670)', 'HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Component.pm line 39
+ Plack::Component::__ANON__('HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Middleware/Debug/Base.pm line 23
+ Plack::Middleware::Debug::Base::call('Plack::Middleware::Debug::DBIC::QueryLog=HASH(0xc633b0)', 'HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Component.pm line 39
+ Plack::Component::__ANON__('HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Middleware/Debug/Base.pm line 23
+ Plack::Middleware::Debug::Base::call('Plack::Middleware::Debug::Session=HASH(0xc638c0)', 'HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Component.pm line 39
+ Plack::Component::__ANON__('HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Middleware/Debug/Base.pm line 23
+ Plack::Middleware::Debug::Base::call('Plack::Middleware::Debug::Dancer::Version=HASH(0xc79fd0)', 'HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Component.pm line 39
+ Plack::Component::__ANON__('HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Middleware/Debug/Base.pm line 23
+ Plack::Middleware::Debug::Base::call('Plack::Middleware::Debug::Parameters=HASH(0xc79950)', 'HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Component.pm line 39
+ Plack::Component::__ANON__('HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Middleware/Debug/Base.pm line 23
+ Plack::Middleware::Debug::Base::call('Plack::Middleware::Debug::Dancer::Logger=HASH(0xc79ac0)', 'HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Component.pm line 39
+ Plack::Component::__ANON__('HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Middleware/Debug/Base.pm line 23
+ Plack::Middleware::Debug::Base::call('Plack::Middleware::Debug::Dancer::Settings=HASH(0xc79bd0)', 'HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Component.pm line 39
+ Plack::Component::__ANON__('HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Middleware/Debug/Base.pm line 23
+ Plack::Middleware::Debug::Base::call('Plack::Middleware::Debug::Environment=HASH(0xc79ce0)', 'HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Component.pm line 39
+ Plack::Component::__ANON__('HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Middleware/Debug/Base.pm line 23
+ Plack::Middleware::Debug::Base::call('Plack::Middleware::Debug::Timer=HASH(0xb6f010)', 'HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Component.pm line 39
+ Plack::Component::__ANON__('HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Middleware/Debug/Base.pm line 23
+ Plack::Middleware::Debug::Base::call('Plack::Middleware::Debug::Response=HASH(0xb6f120)', 'HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Component.pm line 39
+ Plack::Component::__ANON__('HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Middleware/Debug/Base.pm line 23
+ Plack::Middleware::Debug::Base::call('Plack::Middleware::Debug::Memory=HASH(0xb6f230)', 'HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Component.pm line 39
+ Plack::Component::__ANON__('HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Middleware/Debug.pm line 136
+ Plack::Middleware::Debug::call('Plack::Middleware::Debug=HASH(0xc5a7c0)', 'HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Component.pm line 39
+ Plack::Component::__ANON__('HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Middleware/Session.pm line 52
+ Plack::Middleware::Session::call('Plack::Middleware::Session=HASH(0xc5afd0)', 'HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Component.pm line 39
+ Plack::Component::__ANON__('HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/App/URLMap.pm line 71
+ Plack::App::URLMap::call('Plack::App::URLMap=HASH(0xc15510)', 'HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Component.pm line 39
+ Plack::Component::__ANON__('HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Middleware/Lint.pm line 24
+ Plack::Middleware::Lint::call('Plack::Middleware::Lint=HASH(0xa70be0)', 'HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Component.pm line 39
+ Plack::Component::__ANON__('HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Middleware/StackTrace.pm line 31
+ Plack::Middleware::StackTrace::__ANON__() called at /usr/local/lib/perl5/site_perl/5.12.1/Try/Tiny.pm line 71
+ eval {...} called at /usr/local/lib/perl5/site_perl/5.12.1/Try/Tiny.pm line 67
+ Try::Tiny::try('CODE(0x9bb390)', 'Try::Tiny::Catch=REF(0xc9d080)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Middleware/StackTrace.pm line 35
+ Plack::Middleware::StackTrace::call('Plack::Middleware::StackTrace=HASH(0xa4f700)', 'HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Component.pm line 39
+ Plack::Component::__ANON__('HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Middleware/AccessLog.pm line 21
+ Plack::Middleware::AccessLog::call('Plack::Middleware::AccessLog=HASH(0xc201f0)', 'HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Component.pm line 39
+ Plack::Component::__ANON__('HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Middleware/ContentLength.pm line 10
+ Plack::Middleware::ContentLength::call('Plack::Middleware::ContentLength=HASH(0xc4c770)', 'HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Component.pm line 39
+ Plack::Component::__ANON__('HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Util.pm line 159
+ eval {...} called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Util.pm line 159
+ Plack::Util::run_app('CODE(0xca5690)', 'HASH(0x213f2e0)') called at /usr/local/lib/perl5/site_perl/5.12.1/HTTP/Server/PSGI.pm line 145
+ HTTP::Server::PSGI::handle_connection('HTTP::Server::PSGI=HASH(0xc40260)', 'HASH(0x213f2e0)', 'IO::Socket::INET=GLOB(0x213f210)', 'CODE(0xca5690)') called at /usr/local/lib/perl5/site_perl/5.12.1/HTTP/Server/PSGI.pm line 105
+ HTTP::Server::PSGI::accept_loop('HTTP::Server::PSGI=HASH(0xc40260)', 'CODE(0xc05220)') called at /usr/local/lib/perl5/site_perl/5.12.1/HTTP/Server/PSGI.pm line 59
+ HTTP::Server::PSGI::run('HTTP::Server::PSGI=HASH(0xc40260)', 'CODE(0xc05220)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Handler/HTTP/Server/PSGI.pm line 14
+ Plack::Handler::HTTP::Server::PSGI::run('Plack::Handler::Standalone=HASH(0xc40470)', 'CODE(0xc05220)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Loader.pm line 85
+ Plack::Loader::run('Plack::Loader=HASH(0x85acc0)', 'Plack::Handler::Standalone=HASH(0xc40470)') called at /usr/local/lib/perl5/site_perl/5.12.1/Plack/Runner.pm line 256
+ Plack::Runner::run('Plack::Runner=HASH(0x803ea0)') called at /usr/local/bin/plackup line 10 in (eval 114) l. 1
+[5235] debug @0.013560> [hit #3]coming here roo in (eval 114) l. 1
View
1  public/views/index.html
@@ -1 +0,0 @@
-Hello world
View
BIN  var/master.db
Binary file not shown
View
5 views/index.tt
@@ -151,8 +151,7 @@
<!-- menu -->
<div class="grid_24" id="main-menu">
<ul >
- <li class="" ><a href="#/home" name=
- "current">Home</a></li>
+ <li class="" ><a href="#/home" name= "current">Home</a></li>
<li><a href="#/task">Tasks</a></li>
@@ -161,7 +160,7 @@
<li class="right"> <a href="/logout" id="logout">Logout</a></li>
- <li class="right"> <a href="#/profile" id="profile">John Simth</a></li>
+ <li class="right"> <a href="#/profile" id="profile"><% name %></a></li>
</ul>
View
2  views/login.tt
@@ -32,7 +32,7 @@
attempt = (typeof(attempt) != 'undefined' ) ? parseInt(attempt) : 0 ;
console.log(attempt);
- if (attempt > 3 ) {
+ if (attempt > 2) {
$("#reCaptcha").show();
$("#submit").click(function(){
return jcap();
View
BIN  views/pdf/empty.pdf
Binary file not shown
View
8 views/pdf/temp.tt
@@ -0,0 +1,8 @@
+ [% USE pdf = Catalyst::View::PDF::Reuse %]
+
+ [% pdf.prFile('empty.pdf' ) %]
+
+ [% pdf.prText(100, 500, 'Hello World !') %]
+
+ [% pdf.prEnd() %]
+
View
252 views/register.tt
@@ -11,11 +11,6 @@
"text/html; charset=iso-8859-1" />
<meta name="description" content="App Name app" />
<meta name="keywords" content="App Name" />
- <!-- <link rel="stylesheet" href="css/reset.css" type="text/css" /> -->
- <!-- <link rel="stylesheet" href="css/text.css" type="text/css" />-->
-
- <!-- <link rel="stylesheet" href="css/960_24_col.css" type="text/css" /> -->
-
<link rel="stylesheet" href="css/style.css" type="text/css" />
<link rel="stylesheet" href="css/facebox.css" type="text/css" />
<link rel="stylesheet" href="css/jquery-ui.css" type="text/css" />
@@ -28,136 +23,113 @@
<script type="text/javascript" src="javascript/jquery.validate.js"></script>
<script type="text/javascript">
$(document).ready(function() {
- //--------------------------------registar form --------------------------
- $("#regi_form").validate({
- rules : {
- first_name: {
- required: true
- },
- last_name: {
- required: true
+//--------------------------------registar form validation------------------------------
+ $("#regi_form").validate({
+ rules : {
+ first_name: {
+ required: true
+ },
+ last_name: {
+ required: true
+ },
+ email: {
+ required: true,
+ email: true
+ },
+ password: {
+ required: true,
+ minlength: 4,
+ maxlength: 15
+ },
+ re_password: {
+ equalTo: '#password'
+ },
+ answer: {
+ required: true
+ },
+ question_id:{
+ required:true
+ }
},
- email: {
- required: true,
- email: true
+ messages : {
+ first_name:"Enter Name",
+ last_name: "Enter SurName",
+ email: "Enter email id",
+ password: "Enter password with atleast 4 charactor",
+ answer: "Enter answer of the question",
+ question_id:"Select your question"
},
- password: {
- required: true,
- minlength: 4,
- maxlength: 15
- },
- re_password {
- equalTo: '#password'
+ errorClass:"small"
+ })
+//------------------------------Form submittion--------------------------------
+ $("#regi_form").submit(function() {
+ var verify = $("#regi_form").find("input[name=verify]").attr("checked");
+ if(!verify) {
+ alert("Please accept our terms and conditions");
+ return false;
}
- answer: {
- required: true
- },
- question_id:{
- required:true
- }
- },
- messages : {
- first_name:"Enter Name",
- last_name: "Enter SurName",
- email: "Enter email id",
- password: "Enter password with atleast 4 charactor",
- answer: "Enter answer of the question",
- question_id:"Select your question"
- },
- errorClass:"small"
- })
-
- $("#regi_form").submit(function() {
-
- var verify = $("#regi_form").find("input[name=verify]").attr("checked");
-
- if(!verify) {
-
- alert("Please accept our terms and conditions");
- return false;
- }
-
-
- var password =$("#regi_form").find("input[name=password]").val();
- var re_pass=$("#regi_form").find("input[name=re_password]").val();
- if(pass=='' & re_pass=='')
- {
- alert("please Enter Your Password")
- }
- else{
- if(pass==re_pass){
- return true
- }
- else{
- alert("please check your password");
- return false;
- }
- }
-
- return jcap();
-
- })
-
+ return jcap();
+ })
})
- </script>
- </head>
- <body>
+ </script>
+ </head>
+ <body>
<div class="container_24" id="content">
- <div class="grid_18 main push_4" id="main-content">
+ <div class="grid_18 main push_4" id="main-content">
<h2>Registration Form</h2>
- <div id="message_box" class="box negative notice grid_15">
- <ul><li><% message %></li></ul>
- </div>
-
-
- <form action="/register" method="POST" class="" id="regi_form" onsubmit="return jcap();">
- <fieldset class="grid_15 blue box ">
- <ul class="form tar">
- <li class="required fat">
- <label>First Name</label>
- <input type="text" name="first_name" value=""/>
- </li>
- <li class="required fat">
- <label >Last Name</label>
- <input type="text" name="last_name" value=""/>
- </li>
- <li class="required fat">
- <label >Email id</label>
- <input type="text" name="email" value=""/>
- </li>
- <li class="required fat">
- <label >Password</label>
- <input type="password" name="password" value="" id="password"/>
- </li>
- <li class="required fat">
- <label >Retype Password</label>
- <input type="password" name="re_password" value="" id="re_password"/>
- </li>
- <li class="required fat">
- <label >Security Question</label>
- <select name="question_id" class="required">
- <option value="">Choose Question</option>
- <option value="q1" >What is the name of your best friend</option>
- <option value="q2" >What is your phone No.</option>
- <option value="q3" >What is your vehicle Registration No.</option>
- <option value="q4">What is your favorite Food</option>
- <option value="q5">What is your lucky number</option>
- </select>
- </li>
- <li class="required fat">
- <label >Answer</label>
- <input type="text" name="answer" value=""/>
- </li>
- <li class="fat">
- <label>Company name</label>
- <input type="text" name="company" value=""/>
- </li>
- <li>
- <script type="text/javascript">sjcap();</script>
- </li>
- <li class="required">
- <label >Terms & Condition</label>
- <textarea rows="2" cols="40" style="font-size:1.3em">
+ <div id="message_box" class="box negative notice grid_15">
+ <ul>
+ <li><% message %></li>
+ </ul>
+ </div>
+ <form action="/register" method="POST" class="" id="regi_form" >
+ <fieldset class="grid_15 blue box ">
+ <ul class="form tar">
+ <li class="required fat">
+ <label>First Name</label>
+ <input type="text" name="first_name" value=""/>
+ </li>
+ <li class="required fat">
+ <label >Last Name</label>
+ <input type="text" name="last_name" value=""/>
+ </li>
+ <li class="required fat">
+ <label >Email id</label>
+ <input type="text" name="email" value=""/>
+ </li>
+ <li class="required fat">
+ <label >Password</label>
+ <input type="password" name="password" value="" id="password"/>
+ </li>
+ <li class="required fat">
+ <label >Retype Password</label>
+ <input type="password" name="re_password" value="" id="re_password"/>
+ </li>
+ <li class="required fat">
+ <label >Security Question</label>
+ <select name="question_id" >
+ <option value="">Choose Question</option>
+ <option value="q1" >What is the name of your best friend</option>
+ <option value="q2" >What is your phone No.</option>
+ <option value="q3" >What is your vehicle Registration No.</option>
+ <option value="q4">What is your favorite Food</option>
+ <option value="q5">What is your lucky number</option>
+ </select>
+ </li>
+ <li class="required fat">
+ <label >Answer</label>
+ <input type="text" name="answer" value=""/>
+ </li>
+ <li class="fat">
+ <label>Company name</label>
+ <input type="text" name="company" value=""/>
+ </li>
+ <li>
+ <script type="text/javascript">sjcap();</script>
+ </li>
+ <li class="required">
+ <label >Terms & Condition</label>
+ <textarea rows="2" cols="40" style="font-size:1.3em">
One of the conditions for all uses is that you cannot mess around with our marks.
Only we get to do that. Do not remove, distort or alter any element Brand Feature.
That includes modifying trademark, for example, through hyphenation, combination or abbreviation
@@ -179,18 +151,18 @@ Do not use our company trademarks in a way that suggests a common, descriptive,
Trademark rights vary from country to country.
Some countries have severe criminal and civil penalties for improper use of the registration symbol.
Therefore, do not use the registration symbol (�) in countries where the mark has not been registered.
- </textarea>
- </li>
- <li class="required" style="margin-left:160px">
- <input type="checkbox" name="verify" value=yes />
- I accept all Terms & Condition
- </li><br>
- <input type="submit" value="I accept,Create my account" id="account" class="button" style="float:none;margin-left:180px" />
- </ul>
- </fieldset>
- </form>
+ </textarea>
+ </li>
+ <li class="required" style="margin-left:160px">
+ <input type="checkbox" name="verify" value=yes />
+ I accept all Terms & Condition
+ </li><br>
+ <input type="submit" value="I accept,Create my account" id="account" class="button" style="float:none;margin-left:180px" />
+ </ul>
+ </fieldset>
+ </form>
</div>
<!-- main content -->
-</div>
+ </div>
</body>
</html>
Please sign in to comment.
Something went wrong with that request. Please try again.