PHP GD extension is not installed. Please install it or application won\'t be able to create image thumbnail and barcode.'); } else { // check GD Freetype if (!function_exists('imagettftext')) { $warnings[] = __('Freetype support is not enabled in PHP GD extension. Rebuild PHP GD extension with Freetype support or application won\'t be able to create barcode.'); } } // check for overdue $overdue_q = $dbs->query('SELECT COUNT(loan_id) FROM loan AS l WHERE (l.is_lent=1 AND l.is_return=0 AND TO_DAYS(due_date) < TO_DAYS(\''.date('Y-m-d').'\')) GROUP BY member_id'); $num_overdue = $overdue_q->num_rows; if ($num_overdue > 0) { $warnings[] = str_replace('{num_overdue}', $num_overdue, __('There is currently {num_overdue} library members having overdue. Please check at Circulation module at Overdues section for more detail')); //mfc $overdue_q->free_result(); } // check if images dir is writable or not if (!is_writable(IMGBS) OR !is_writable(IMGBS.'barcodes') OR !is_writable(IMGBS.'persons') OR !is_writable(IMGBS.'docs')) { $warnings[] = __('Images directory and directories under it is not writable. Make sure it is writable by changing its permission or you won\'t be able to upload any images and create barcodes'); } // check if file repository dir is writable or not if (!is_writable(REPOBS)) { $warnings[] = __('Repository directory is not writable. Make sure it is writable (and all directories under it) by changing its permission or you won\'t be able to upload any bibliographic attachments.'); } // check if file upload dir is writable or not if (!is_writable(UPLOAD)) { $warnings[] = __('File upload directory is not writable. Make sure it is writable (and all directories under it) by changing its permission or you won\'t be able to upload any file, create report files and create database backups.'); } // check mysqldump if (!file_exists($sysconf['mysqldump'])) { $warnings[] = __('The PATH for mysqldump program is not right! Please check configuration file or you won\'t be able to do any database backups.'); } // check need to be repaired mysql database $query_of_tables = $dbs->query('SHOW TABLES'); $num_of_tables = $query_of_tables->num_rows; $prevtable = ''; $is_repaired = false; if (isset ($_POST['do_repair'])) { if ($_POST['do_repair'] == 1) { while ($row = $query_of_tables->fetch_row()) { $sql_of_repair = 'REPAIR TABLE '.$row[0]; $query_of_repair = $dbs->query ($sql_of_repair); } } } while ($row = $query_of_tables->fetch_row()) { $query_of_check = $dbs->query('CHECK TABLE '.$row[0]); 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.
  • '; } $prevtable = $row[0]; $is_repaired = true; } } } if (($is_repaired) && !isset($_POST['do_repair'])) { echo '
  • '; } // if there any warnings if ($warnings) { echo '
    '; echo ''; echo '
    '; } // admin page content require LIB.'content.inc.php'; $content = new content(); //~ $content_data = $content->get($dbs, 'adminhome'); $content_data = $content->get($dbs, 'etd_welcome'); if ($content_data) { //~ echo '
    '.$content_data['Content'].'
    '; echo '
    '.$content_data['Content'].'
    '; //~ echo '
    Selamat Datang '.$_SESSION['realname'].'
    '; echo '

    '.$_SESSION['realname'].'

    '; unset($content_data); }