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

View File

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

View File

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

View File

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