Ignore:
Timestamp:
May 9, 2008, 10:39:00 AM (17 years ago)
Author:
george
Message:

Přidáno: Oprávnění pro čtení a zápis k rolím a operacím.
Přidáno: Zobrazení matice oprávnění.
Přidáno: Uživatelské menu s proměnným obsahem podle role uživatele.
Upraveno: Rozdělení importu na import z mangosu a import ze staré databáze.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2/translation.php

    r6 r8  
    66  {
    77    $Result = array();
    8     $DbResult = $this->Database->select('TranslationGroup', '*');
     8    $DbResult = $this->Database->query('SELECT `TranslationGroup`.*, (SELECT COUNT(*) FROM `TextGroup` WHERE `TextGroup`.`Group` = `TranslationGroup`.`Id`) AS `TextCount` FROM `TranslationGroup`');
    99    while($DbRow = $DbResult->fetch_array())
    1010    {
     
    4444  {
    4545    $Result = array();
    46     $DbResult = $this->Database->query('SELECT `TextGroup`.*, (SELECT `Text` FROM `Text` WHERE `Text`.`TranslationGroup` = `TextGroup`.`Id` LIMIT 1) as `Text` FROM `TextGroup` WHERE `TextGroup`.`Group`='.$GroupId.' AND `TextGroup`.`User`='.$UserId.' AND `TextGroup`.`Language`='.$Language.' LIMIT '.($Page * $ItemPerPage).','.$ItemPerPage);
     46    $DbResult = $this->Database->query('SELECT `TextGroup`.*, (SELECT `Text` FROM `Text` WHERE `Text`.`TranslationGroup` = `TextGroup`.`Id` LIMIT 1) as `Text`, (SELECT COUNT(`TextGroup2`.`User`) FROM `TextGroup` AS `TextGroup2` WHERE `TextGroup2`.`Id` = `TextGroup`.`Id`) as `TextCount` FROM `TextGroup` WHERE `TextGroup`.`Group`='.$GroupId.' AND `TextGroup`.`User`='.$UserId.' AND `TextGroup`.`Language`='.$Language.' LIMIT '.($Page * $ItemPerPage).','.$ItemPerPage);
    4747    //echo($this->Database->LastQuery);
    4848    if($DbResult->num_rows > 0)
     
    6262    return($DbRow[0]);
    6363  }
     64
     65  function GetMultipleText($GroupId, $Index)
     66  {
     67    $Result = array();
     68    $DbResult = $this->Database->query('SELECT `TextGroup`.*, (SELECT `Text` FROM `Text` WHERE `Text`.`TranslationGroup` = `TextGroup`.`Id` LIMIT 1) as `Text` FROM `TextGroup` WHERE `TextGroup`.`Group`='.$GroupId.' AND `TextGroup`.`Index` = '.$Index.' AND `TextGroup`.`Language` != 1');
     69    //echo($this->Database->LastQuery);
     70    if($DbResult->num_rows > 0)
     71    while($DbRow = $DbResult->fetch_array())
     72    {
     73      $Result[] = $DbRow;
     74    }
     75    return($Result);
     76  }
    6477}
    6578
Note: See TracChangeset for help on using the changeset viewer.