From a5f10b0d2229549c0fd2ef25d14c99f5fd4ac85d Mon Sep 17 00:00:00 2001 From: Eddy Subratha Date: Sun, 20 Sep 2015 11:48:41 +0700 Subject: [PATCH] Modified: Chat engine with Log Modified: Default template Modified: Less file --- .../default/assets/css/style.css | 13 +- .../default/index_template.inc.php | 72 +- admin/chat.php | 76 + admin/default/home.php | 66 +- admin/modules/bibliography/dl_print.php | 22 +- lib/contents/chat.php | 144 + template/default/index_template.inc.php | 70 +- template/default/js/custom.js | 12 +- template/default/less/chat.less | 46 +- template/default/less/menu.less | 32 +- template/default/less/misc.less | 4 +- template/default/less/variables.less | 5 + template/default/partials/footer.php | 4 +- template/default/partials/header.php | 16 +- template/default/partials/meta.php | 18 +- template/default/partials/nav.php | 1 + template/default/style.css | 2381 +++++++++++++++++ template/default/style.less | 3 + template/default/style.min.css | 4 + 19 files changed, 2760 insertions(+), 229 deletions(-) create mode 100644 admin/chat.php create mode 100644 lib/contents/chat.php create mode 100644 template/default/less/variables.less create mode 100644 template/default/style.css create mode 100644 template/default/style.min.css diff --git a/admin/admin_template/default/assets/css/style.css b/admin/admin_template/default/assets/css/style.css index 92b8d01d..c0fd4869 100644 --- a/admin/admin_template/default/assets/css/style.css +++ b/admin/admin_template/default/assets/css/style.css @@ -1,4 +1,4 @@ -@import "bootstrap.min.css"; +@import "bootstrap.min.css"; @import "font-awesome.min.css"; @import "animate.css"; @font-face { @@ -234,7 +234,9 @@ a:hover { font-size: 10px; } /*----------------*/ + /* User Account */ + /*----------------*/ .s-header { @@ -358,7 +360,9 @@ a:hover { } } /*-----------*/ + /* Content */ + /*-----------*/ .s-content.active, @@ -1365,6 +1369,7 @@ tr.dataListHeader > td > a { padding: 15px; margin: 15px 10px; } + .errorBox:before, .message:before { font-family: 'FontAwesome'; @@ -1379,6 +1384,7 @@ tr.dataListHeader > td > a { overflow: hidden; color: rgba(255, 255, 255, 0.25); } + .message ul { list-style: none; padding: 0; @@ -2205,7 +2211,6 @@ table { /* Chat ================================ */ - #pchat-toggle { background-color: #fff; border-radius: 50px; @@ -2325,7 +2330,7 @@ table { } .s-minimize { - bottom: -355px; + bottom: -379px; -webkit-transition: all 150ms ease; transition: all 150ms ease; } @@ -2334,4 +2339,4 @@ table { bottom: 0px; -webkit-transition: all 150ms ease; transition: all 150ms ease; -} +} \ No newline at end of file diff --git a/admin/admin_template/default/index_template.inc.php b/admin/admin_template/default/index_template.inc.php index 984ec5cd..51f3dc4c 100755 --- a/admin/admin_template/default/index_template.inc.php +++ b/admin/admin_template/default/index_template.inc.php @@ -2,8 +2,7 @@ /** * Template for Backend * - * Copyright (C) 2015 Arie Nugraha (dicarve@gmail.com) - * Create by Eddy Subratha (eddy.subratha@slims.web.id) + * Copyright (C) 2015 Arie Nugraha (dicarve@gmail.com), Eddy Subratha (eddy.subratha@slims.web.id) * * Slims 8 (Akasia) * @@ -121,73 +120,6 @@ - - - - - - @@ -260,6 +192,6 @@ function send( text ) { ); }); - + diff --git a/admin/chat.php b/admin/chat.php new file mode 100644 index 00000000..47ad088f --- /dev/null +++ b/admin/chat.php @@ -0,0 +1,76 @@ + + + + + \ No newline at end of file diff --git a/admin/default/home.php b/admin/default/home.php index 10fb154d..c516f26a 100755 --- a/admin/default/home.php +++ b/admin/default/home.php @@ -31,9 +31,9 @@ ?> query('SHOW TABLES'); -$num_of_tables = $query_of_tables->num_rows; -$prevtable = ''; -$is_repaired = false; +$query_of_tables = $dbs->query('SHOW TABLES'); +$num_of_tables = $query_of_tables->num_rows; +$prevtable = ''; +$repair = ''; +$is_repaired = false; if (isset ($_POST['do_repair'])) { if ($_POST['do_repair'] == 1) { @@ -98,7 +99,7 @@ while ($rowcheck = $query_of_check->fetch_assoc()) { if (!(($rowcheck['Msg_type'] == "status") && ($rowcheck['Msg_text'] == "OK"))) { if ($row[0] != $prevtable) { - echo '
  • Table '.$row[0].' might need to be repaired.
  • '; + $repair .= '
  • Table '.$row[0].' might need to be repaired.
  • '; } $prevtable = $row[0]; $is_repaired = true; @@ -106,19 +107,27 @@ } } if (($is_repaired) && !isset($_POST['do_repair'])) { - echo '
  • '; + echo '
    '; + echo ''; + echo '
    '; + echo '
    + + +
    '; } +echo '
    '; +echo ''; +echo '
    '; // admin page content if($sysconf['admin_home']['mode'] == 'default') { @@ -171,9 +180,13 @@ GROUP BY loan_date"; - $set_loan = $dbs->query($sql_loan); - $transc_loan = $set_loan->fetch_object(); - $get_loan .= $transc_loan->countloan.','; + $set_loan = $dbs->query($sql_loan); + if($set_loan->num_rows > 0) { + $transc_loan = $set_loan->fetch_object(); + $get_loan .= $transc_loan->countloan.','; + } else { + $get_loan = 0; + } // get latest return $sql_return = @@ -190,8 +203,12 @@ loan_date"; $set_return = $dbs->query($sql_return); - $transc_return = $set_return->fetch_object(); - $get_return .= $transc_return->countloan.','; + if($set_return->num_rows > 0) { + $transc_return = $set_return->fetch_object(); + $get_return .= $transc_return->countloan.','; + } else { + $get_return = 0; + } // get latest extends $sql_extends = @@ -205,10 +222,13 @@ AND renewed = 1 GROUP BY loan_date"; - - $set_extends = $dbs->query($sql_extends); - $transc_extends = $set_extends->fetch_object(); - $get_extends .= $transc_extends->countloan.','; + $set_extends = $dbs->query($sql_extends); + if($set_extends->num_rows > 0) { + $transc_extends = $set_extends->fetch_object(); + $get_extends .= $transc_extends->countloan.','; + } else { + $get_extends = 0; + } } // return transaction date $get_date = substr($get_date,0,-1); diff --git a/admin/modules/bibliography/dl_print.php b/admin/modules/bibliography/dl_print.php index 11824ed7..a8b1276e 100755 --- a/admin/modules/bibliography/dl_print.php +++ b/admin/modules/bibliography/dl_print.php @@ -186,26 +186,10 @@ $html_str .= '
    '; if ($sysconf['print']['label']['include_header_text']) { $html_str .= '
    '.($sysconf['print']['label']['header_text']?$sysconf['print']['label']['header_text']:$sysconf['library_name']).'
    '; } // explode label data by space - $sliced_label = explode(' ', $label); - //Modified By Eddy Subratha - //Need to check of the classification is has another space between each number - //Ex. 123 123 12 SIL m - if(count($sliced_label) > 4) { - $html_str .= $sliced_label[0].' '.$sliced_label[1].' '.$sliced_label[2].'
    '; - $html_str .= $sliced_label[3].'
    '; - $html_str .= $sliced_label[4].'
    '; - $html_str .= $sliced_label[5]; - } elseif(count($sliced_label) > 3) { - $html_str .= $sliced_label[0].' '.$sliced_label[1].'
    '; - $html_str .= $sliced_label[2].'
    '; - $html_str .= $sliced_label[3].'
    '; - $html_str .= $sliced_label[4]; - } else { - foreach ($sliced_label as $slice_label_item) { - $html_str .= $slice_label_item.'
    '; - } + $sliced_label = explode(' ', $label, 5); + foreach ($sliced_label as $slice_label_item) { + $html_str .= $slice_label_item.'
    '; } - //End modified $html_str .= '
    '; $html_str .= ''; } diff --git a/lib/contents/chat.php b/lib/contents/chat.php new file mode 100644 index 00000000..8a0bd95d --- /dev/null +++ b/lib/contents/chat.php @@ -0,0 +1,144 @@ + + + + + \ No newline at end of file diff --git a/template/default/index_template.inc.php b/template/default/index_template.inc.php index 25a0b9f0..b20b6561 100644 --- a/template/default/index_template.inc.php +++ b/template/default/index_template.inc.php @@ -71,7 +71,7 @@ // Content ?> -
    +
    @@ -169,7 +169,7 @@ -
    + @@ -205,72 +205,10 @@ - - - +// Chat Engine +include LIB."contents/chat.php"; - - - - diff --git a/template/default/js/custom.js b/template/default/js/custom.js index 5990a90a..d8061885 100644 --- a/template/default/js/custom.js +++ b/template/default/js/custom.js @@ -27,11 +27,11 @@ $(document).ready(function(){ // Show or hide chat // ============================================ - $('#pchat-toggle').on('click', function(){ + $('#show-pchat').on('click', function(){ $('.s-chat').toggle().addClass('animated-fast fadeInUp'); }); - $('#pchat-hide').on('click', function(){ + $('#hide-pchat').on('click', function(){ $('.s-chat').toggleClass('s-minimize s-maximize '); }); @@ -49,14 +49,8 @@ $(document).ready(function(){ } })() - - $(document).ready(function(){ $(window).load(function () { $('#keyword').focus(); }); - - $('.errorBox').parent().removeClass('animated fadeInUp delay2'); - $('.errorBox').parents().attr('style','position: static;'); - -}); \ No newline at end of file +}); diff --git a/template/default/less/chat.less b/template/default/less/chat.less index 76fc34a9..69d98ac7 100644 --- a/template/default/less/chat.less +++ b/template/default/less/chat.less @@ -1,24 +1,35 @@ /* Chat ================================ */ +.s-pchat { + position: relative; + left: -25px; + z-index: 1999; +} + +@media only screen and (min-width: 768px) { + .s-pchat { + position: absolute; + left:auto; + right:55px; + margin:0; + top:-10px; + } +} -#pchat-toggle { +.s-pchat a { + display: block; + color: #000; background-color: #fff; + width: 30px; border-radius: 50px; - position: absolute; - top: 25px; - color: #282828; - width:30px; - height:30px; - padding-top: 3px; - text-align: center; - vertical-align: middle; - right: 15px; - z-index:4001; + padding: 3px 0 0 8px; + height: 30px; + margin: 20px auto 0 auto; } @media only screen and (min-width : 768px) { - #pchat-toggle { - right: 100px; + #show-pchat { + right: 0px; } } @@ -121,7 +132,7 @@ } .s-minimize { - bottom: -215px; + bottom: -414px; -webkit-transition: all 150ms ease; transition: all 150ms ease; } @@ -130,4 +141,9 @@ bottom: 0px; -webkit-transition: all 150ms ease; transition: all 150ms ease; -} \ No newline at end of file +} + +.s-chat .btn { + border-radius: 0; + margin-top: 5px; +} \ No newline at end of file diff --git a/template/default/less/menu.less b/template/default/less/menu.less index e0e1342c..24960e42 100644 --- a/template/default/less/menu.less +++ b/template/default/less/menu.less @@ -1,16 +1,21 @@ /* Menu ================================ */ -.s-menu { - position: fixed; +.s-pmenu { + position: relative; + margin:0 auto; } -@media only screen and (max-width :600px) { - .s-menu { - position: relative; - display: block; - width: 100%; - left: 0px; - } +@media (min-width: 768px) and (max-width: 1200px) { + .s-pmenu { + top:-50px; + } +} + +.s-menu { + position: relative; + left: 25px; + top:-50px; + margin:0 auto; } .s-menu a { @@ -27,8 +32,11 @@ @media only screen and (min-width : 768px) { .s-menu { z-index: 2099; - top:25px; - right: 60px; + position: absolute; + left:auto; + right:15px; + top:10px; + margin:0; } .s-menu a { @@ -136,6 +144,8 @@ position: absolute; top: 45px; right: 45px; + width: 30px; + height: 30px; } .s-menu-content .s-menu-toggle span, .s-menu-content .s-menu-toggle span:before, .s-menu-content .s-menu-toggle span:after { background-color: #ccc; diff --git a/template/default/less/misc.less b/template/default/less/misc.less index 7334d604..b64b703b 100644 --- a/template/default/less/misc.less +++ b/template/default/less/misc.less @@ -21,9 +21,7 @@ background-color: #900; padding:10px; color: #fff; - position: absolute; - z-index:9999; - top: 217px; + position: relative; left:0; width: 100%; text-align: center; diff --git a/template/default/less/variables.less b/template/default/less/variables.less new file mode 100644 index 00000000..dd5e5dd3 --- /dev/null +++ b/template/default/less/variables.less @@ -0,0 +1,5 @@ +// +// Variables +// -------------------------------------------------- + +//** Gradient diff --git a/template/default/partials/footer.php b/template/default/partials/footer.php index 2a550371..4775af6b 100644 --- a/template/default/partials/footer.php +++ b/template/default/partials/footer.php @@ -17,13 +17,13 @@ $title = explode(" ", $book['title']); if (!empty($book['image'])) : ?>
  • - + <?php echo $book['title'] ?>
  • - +
    '.$title[1] ?>
    ...
    <?php echo $book['title'] ?>
    diff --git a/template/default/partials/header.php b/template/default/partials/header.php index 727eeafd..68480f00 100644 --- a/template/default/partials/header.php +++ b/template/default/partials/header.php @@ -7,9 +7,19 @@
    -
    -
    - +
    +
    + +
    + +
    + +
    + +
    diff --git a/template/default/partials/meta.php b/template/default/partials/meta.php index 583d558a..912243d6 100644 --- a/template/default/partials/meta.php +++ b/template/default/partials/meta.php @@ -13,7 +13,7 @@ - + @@ -28,7 +28,7 @@ - + @@ -74,8 +74,18 @@ + + + + + + - + \ No newline at end of file diff --git a/template/default/partials/nav.php b/template/default/partials/nav.php index f9b07c7d..7b06f6a5 100644 --- a/template/default/partials/nav.php +++ b/template/default/partials/nav.php @@ -8,6 +8,7 @@
  • +