DIR : /home/kozerus/public_html/ko_center/js/tablesorter1/tablesorter.pl
/home/kozerus/public_html/ko_center/js/tablesorter1
sub csv2html( $options ) {
$csvfil = $options[1];
if( ! -f $csvfil ) {
print( "$progid $dttm ERR: NOTFOUND csvfil=[$csvfil]\n";
return;
}
$htmfil = $csvfil;
$htmfil =~ s/\.csv/\.html/;
print( "BUGS csvfil=[$csvfil] htmfil=[$htmfil]\n" );
return;
my $output = "";
$output .= &csv2html_head( $options );
$output .= "<body>\n";
$j=0;
open( CSVFIL, "<$csvfil" );
while( <CSVFIL> ) {
$csvtext=$_;
chomp($csvtext);
# @csvtext_args = split( / +/, $csvtext );
@csvtext_args = split( /|/, $csvtext );
if( $j == 0 ) {
my($name,$title,$phone,$dsn,$fax,$email,$homepage ) = @csvtext_args;
$phone ~= s/Phone://;
$dsn ~= s/DSN://;
$fax ~= s/Fax://;
$email: ~= s/Email:/<a href=mailto:/;
$email: = "<a href=mailto:".$email.">$email</a>";
$homepage ~= s/Home Pages://;
$homepage = "<a href=".$homepage.">$homepage</a>";
$output .= "<
printf( "$progid main $dttm THEAD: j=[$j] csvtext=[$csvtext]\n" );
printf( "$progid main $dttm THEAD: j=[$j] name=[$name]\n" );
printf( "$progid main $dttm THEAD: j=[$j] title=[$title]\n" );
printf( "$progid main $dttm THEAD: j=[$j] phone=[$phone]\n" );
printf( "$progid main $dttm THEAD: j=[$j] dsn=[$dsn]\n" );
printf( "$progid main $dttm THEAD: j=[$j] fax=[$fax]\n" );
printf( "$progid main $dttm THEAD: j=[$j] email=[$email]\n" );
printf( "$progid main $dttm THEAD: j=[$j] homepage=[$homepage]\n" );
$output .= "<table id=\"ko_afcea_list\" class=\"tablesorter\"> \n";
$output .= "<thead> \n";
$output .= "<tr> \n";
$output .= " <th>$name</th> \n";
$output .= " <th>$title</th> \n";
$output .= " <th>$phone</th> \n";
$output .= " <th>dsn</th> \n";
$output .= " <th>fax</th> \n";
$output .= " <th>email</th> \n";
$output .= " <th>homepage</th> \n";
$output .= "</tr> \n";
$output .= "</thead> \n";
}
else {
printf( "$progid main $dttm TBODY: j=[$j] csvtext=[$csvtext]\n" );
$output .= "<tbody> \n";
$output .= "<tr> \n";
$output .= " <td>$name</td> \n";
$output .= " <td>$title</td> \n";
$output .= " <td>$phone</td> \n";
$output .= " <td>dsn</td> \n";
$output .= " <td>fax</td> \n";
$output .= " <td>email</td> \n";
$output .= " <td>homepage</td> \n";
$output .= "</tr> \n";
$output .= "</tbody> \n";
$output .= "</table> \n";
}
$j++;
}
close( CSVFIL );
$output .= &csv2html_div( $options );
$output .= "</body>\n";
$output .= "</html>\n";
open( HTMFIL, ">$htmfil" );
print( HTMFIL "$output" );
close( HTMFIL );
}
sub csv2html_head( $options ) {
my $output = "";
$output = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n";
$output .= " \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
$output .= "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en-us\">\n";
$output .= "<head>\n";
$output .= " <title>jQuery plugin: Tablesorter 2.0</title>\n";
$output .= " <link rel=\"stylesheet\" href=\"./css/style.css\" type=\"text/css\" />\n";
$output .= " <script type=\"text/javascript\" src=\"./js/jquery-1.3.1.min.js\"></script>\n";
$output .= " <script type=\"text/javascript\" src=\"./js/jquery.tablesorter.js\"></script>\n";
$output .= " <script type=\"text/javascript\" src=\"./js/jquery.tablesorter.pager.js\"></script>\n";
$output .= "</head>\n";
return( $output );
}
sub csv2html_body( $options );
$output .= "<table id=\"ko_afcea_list\" class=\"tablesorter\"> \n";
$output .= "<thead> \n";
$output .= "<tr> \n";
$output .= " <th>Last Name</th> \n";
$output .= " <th>First Name</th> \n";
$output .= " <th>Email</th> \n";
$output .= " <th>Age</th> \n";
$output .= " <th>Premium Amount</th> \n";
$output .= "</tr> \n";
$output .= "</thead> \n";
$output .= "<tbody> \n";
$output .= "<tr> \n";
$output .= " <td>Mendes</td> \n";
$output .= " <td>Domnic</td> \n";
$output .= " <td>domnic@gmail.com</td> \n";
$output .= " <td>29</td> \n";
$output .= " <td>5500</td> \n";
$output .= "</tr> \n";
$output .= "</tbody> \n";
$output .= "</table> \n";
return( $output );
}
sub csv2html_div( $options ) {
my $output = "";
$output .= "<div id=\"pager\" class=\"pager\">\n";
$output .= " <form>\n";
$output .= " <img src=\"images/first.png\" class=\"first\"/>\n";
$output .= " <img src=\"images/prev.png\" class=\"prev\"/>\n";
$output .= " <input type=\"text\" class=\"pagedisplay\"/>\n";
$output .= " <img src=\"images/next.png\" class=\"next\"/>\n";
$output .= " <img src=\"images/last.png\" class=\"last\"/>\n";
$output .= " <select class=\"pagesize\">\n";
$output .= " <option value=\"\">LIMIT</option>\n";
$output .= " <option value=\"2\">2 per page</option>\n";
$output .= " <option value=\"5\">5 per page</option>\n";
$output .= " <option value=\"10\">10 per page</option>\n";
$output .= " \n";
$output .= " </select>\n";
$output .= " </form>\n";
$output .= "</div>\n";
$output .= "<script defer=\"defer\">\n";
$output .= " $(document).ready(function() \n";
$output .= " { \n";
$output .= " $(\"#ko_afcea_list\")\n";
$output .= " .tablesorter({widthFixed: true, widgets: ['zebra']})\n";
$output .= " .tablesorterPager({container: $(\"#pager\")}); \n";
$output .= " } \n";
$output .= " ); \n";
$output .= "</script>\n";
return( $output );
}
//
koh5_pano
Drag mouse to navigate.
Navigation
- Left/Right Mouse drag: Changes camera heading.
- Up/Sown Mouse drag: Changes camera pitch.
- Scroll wheel: Changes camera field of view.
- I-Key: Displays Info panel with canvas size, image size and FPS.
17.Aug.2010, Martin Wengenmayer