<pre> block ui

This commit is contained in:
Difrex(Denis Zheleztsov) 2014-06-16 14:21:35 +04:00
parent 2e701986f8
commit 8635fd03a1
4 changed files with 20 additions and 11 deletions

View File

@ -65,7 +65,7 @@ sub get_echo {
my @msg_list = split /\n/, $msgs; my @msg_list = split /\n/, $msgs;
# Begin transaction # Begin transaction
print "Writing messages\n"; print localtime().": writing messages\n";
$db->begin(); $db->begin();
while (<@msg_list>) { while (<@msg_list>) {
my $mes_hash = $_; my $mes_hash = $_;
@ -111,7 +111,7 @@ sub get_echo {
} }
# Commit transaction # Commit transaction
$db->commit(); $db->commit();
print "Messages writed to DB!\n"; print localtime().": messages writed to DB!\n";
} }
return $msgs; return $msgs;
} }

View File

@ -30,7 +30,6 @@ sub send {
$host .= "u/point"; $host .= "u/point";
my $ua = LWP::UserAgent->new(); my $ua = LWP::UserAgent->new();
my $response = $ua->post( $host, { 'pauth' => $auth, 'tmsg' => $base64 } ); my $response = $ua->post( $host, { 'pauth' => $auth, 'tmsg' => $base64 } );
print Dumper($response);
my $db = II::DB->new(); my $db = II::DB->new();
if ($response->{_rc} == 200) { if ($response->{_rc} == 200) {

View File

@ -164,12 +164,12 @@ sub pre {
while (<$fh>) { while (<$fh>) {
my $line = $_; my $line = $_;
if ( ( $line =~ /^====/ ) and ( $pre == 0 ) ) { if ( ( $line =~ /^====/ ) and ( $pre == 0 ) ) {
$txt .= $_; # $txt .= $_;
$line =~ s/====/<pre>/g; $line =~ s/====/<pre class="pre">/g;
$pre = 1; $pre = 1;
} }
elsif ( ( $line =~ /^====/ ) and ( $pre == 1 ) ) { elsif ( ( $line =~ /^====/ ) and ( $pre == 1 ) ) {
$line =~ s/====/<\/pre>\n====/g; $line =~ s/====/<\/pre>\n/g;
$pre = 0; $pre = 0;
} }
$txt .= $line; $txt .= $line;

View File

@ -22,7 +22,8 @@
border-color: #999; border-color: #999;
color: #222; color: #222;
border-radius: 5px; border-radius: 5px;
padding-left: 10px; padding-left: 0.5em;
padding-bottom: 0.15em;
margin-right: 10px; margin-right: 10px;
margin-top: 0.5em; margin-top: 0.5em;
margin-bottom: 0px; margin-bottom: 0px;
@ -73,6 +74,7 @@
.headall p { .headall p {
margin-top: -1.5em; margin-top: -1.5em;
text-align: center; text-align: center;
padding-bottom: 0.2em;
} }
.headall a { .headall a {
color: #222; color: #222;
@ -120,16 +122,24 @@
} }
.new_mes { .new_mes {
position: relative; position: relative;
}
.pre {
display: block;
border-style: dotted;
border-width: 1px;
border-color: #666;
background-color: #C9C9C9;
margin-right: 5%;
} }
</STYLE> </STYLE>
<body> <body>
<div class='headall'> <div class='headall'>
<h1><TMPL_VAR NAME=TITLE></h1> <h1><TMPL_VAR NAME=TITLE></h1>
<p> <p>
[<a href="/">лента</a>]&nbsp <b>[</b> <a href="/">лента</a> <b>]</b>&nbsp
[<a href="/get">получить сообщения</a>]&nbsp <b>[</b> <a href="/get">получить сообщения</a> <b>]</b>&nbsp
[<a href="/me">моя переписка</a>]&nbsp <b>[</b> <a href="/me">моя переписка</a> ]</b>&nbsp
[<a href="/out">неотправленные сообщения</a>]&nbsp <b>[</b> <a href="/out">неотправленные сообщения</a> <b>]</b>&nbsp
</p> </p>
</div> </div>
<!-- <hr> --> <!-- <hr> -->