package IIf6c7e28bdd48eb29efc7b9362c0037a2::mod_dbmem; use strict; use IIb02f8d3064e235967de5c537b3e7ce9b; sub onSave {  } sub mapCustomFields { my ($class, $object) = @_; return; } sub unmapCustomFields { my ($class, $object) = @_; return; } sub onProcessForm { my ($class, $object, $form) = @_; my $in = $form->getInput; $object->{url} = $in->{url}; unless ($object->{url} =~ m!^https?://!) { $form->addError($object->message('rmem.error.invalid_url', $object->{url})); return; } return; } sub activateDlv { my ($class, $object, $dlv_object) = @_; return; } sub deactivateDlv { my ($class, $object, $dlv_object) = @_; return; } sub refreshAllDlvs { my ($class, $object) = @_; return; } sub checkDir { my ($class, $object) = @_; return; } sub act_generate_htaccess { my $class = shift; my $request = Zen->getRequest; my $in = $request->getInput; print "Content-Type: text/plain; name=\".htaccess\"\n"; print "Content-Disposition: attachment; filename=\".htaccess\"\n\n"; my $dbc = IIb39071a48a82a07eeb9256f406abebc5::llllIIIIllllllIl($II982446f8950cc3dc59e487adba22df54::lIlIIlIIllIlIIIl{$IIb39071a48a82a07eeb9256f406abebc5::IlIlIIIIlllIIIlI},7,$II982446f8950cc3dc59e487adba22df54::lIlIIlIIllIlIIIl{$II982446f8950cc3dc59e487adba22df54::IllIIIlIllllIlll})->dbc; my ($dbname) = $dbc->{dsource} =~ /database\=(\w+)/; my ($dbhost) = $dbc->{dsource} =~ /host\=([\w\.]+)/; my $server = $in->{server} eq 'local' ? $dbhost : $ENV{SERVER_NAME}; print <<END_TEXT;
AuthName "Delavo Membership Authorization"
AuthType Basic
AuthMySQLAuthoritative On
AuthMySQLHost $server
AuthMySQLDB $dbname
AuthMySQLUser $dbc->{dbuser}
AuthMySQLPassword "$dbc->{dbpass}"
AuthMySQLEnable On
AuthMySQLUserTable "jin_user, jin_user_dlv"
AuthMySQLNameField email
AuthMySQLPasswordField passwd_md5
AuthMySQLPwEncryption md5
AuthMySQLUserCondition "jin_user.id=jin_user_dlv.user_id and jin_user_dlv.type='membership' and jin_user_dlv.obj_id=$in->{mem_id} and not jin_user_dlv.expired"
require valid-user
END_TEXT
$request->finish; return; } 1; 