<?php
/**
* AkoComment - A User Comments Component
* @version 2.0
* @package AkoComment
* @copyright (C) 2004 by Arthur Konze - All rights reserved!
* @license http://www.konze.de/content/view/8/26/ Copyrighted Commercial Software
**/

function com_install() {
  global $database, $mosConfig_absolute_path;

  # Show installation result to user
  ?>
  <center>
  <table width="100%" border="0">
    <tr>
      <td><img src="components/com_akocomment/images/logo.png"></td>
      <td>
        <strong>AkoComment - Komponent do komentarzy</strong><br/>
        <font class="small">&copy; Copyright 2004 by Arthur Konze<br/>
        This component is copyrighted software. Distribution is prohibited.<br/>
	    Polska adaptacja - APW Zwiastun - Polska Grupa Robocza Mambo</font><br/>
      </td>
    </tr>
    <tr>
      <td background="F0F0F0" colspan="2">
        <code>Proces instalacji:<br />
        <?php

          # Set up new icons for admin menu
          echo "Dodaję ikony w menu administratora.....<br />";
          $database->setQuery("UPDATE #__components SET admin_menu_img='js/ThemeOffice/edit.png' WHERE admin_menu_link='option=com_akocomment&task=comments'");
          $iconresult[0] = $database->query();
          $database->setQuery("UPDATE #__components SET admin_menu_img='js/ThemeOffice/config.png' WHERE admin_menu_link='option=com_akocomment&task=settings'");
          $iconresult[1] = $database->query();
          $database->setQuery("UPDATE #__components SET admin_menu_img='js/ThemeOffice/user.png' WHERE admin_menu_link='option=com_akocomment&task=language'");
          $iconresult[2] = $database->query();
          $database->setQuery("UPDATE #__components SET admin_menu_img='js/ThemeOffice/credits.png' WHERE admin_menu_link='option=com_akocomment&task=about'");
          $iconresult[3] = $database->query();
          foreach ($iconresult as $i=>$icresult) {
            if ($icresult) {
              echo "<font color='green'>ZAKOŃCZONO:</font>Ikona pozycji została dodana do menu $i.<br />";
            } else {
              echo "<font color='red'>BŁĄD:</font>Nie dodano ikona pozycji do menu $i.<br />";
            }
          }

        ?>
        <font color="green"><b>Instalacja zakończona.</b></font></code>
      </td>
    </tr>
  </table>
  </center>
  <?php
}
?>
