Changeset 35


Ignore:
Timestamp:
Oct 15, 2008, 9:40:03 PM (16 years ago)
Author:
maron
Message:

Zobrazení překladů

Location:
branches/3
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • branches/3/class/database.php

    r34 r35  
    1515  {
    1616    $this->LastQuery = $Query;
     17    if ($this->error <> '' and $this->Debug) $this->error.': '.$this->LastQuery;
    1718    return(parent::query($Query)); 
    1819  }
     
    2223    $this->LastQuery = "SELECT ".$What." FROM `".$this->Prefix.$Table."` WHERE ".$Condition;
    2324    $resul = $this->query($this->LastQuery);
    24     if ($this->error <> '' and $Debug) $this->error.': '.$this->LastQuery;
     25    if ($this->error <> '' and $this->Debug) echo $this->error.': '.$this->LastQuery;
    2526   
    2627    $this->LastNumRows = $resul->num_rows;
     
    3738    $this->LastQuery = "DELETE FROM `".$this->Prefix.$Table."` WHERE ".$Condition;
    3839    $this->query($this->LastQuery); 
    39     if ($this->error <> '' and $Debug) $this->error.': '.$this->LastQuery;
     40    if ($this->error <> '' and $Debug) echo $this->error.': '.$this->LastQuery;
    4041  }
    4142 
     
    5556    $this->LastQuery = 'INSERT INTO `'.$this->Prefix.$Table.'` ('.$Name.') VALUES('.$Values.')';
    5657    $this->query($this->LastQuery);
    57     if ($this->error <> '' and $Debug) $this->error.': '.$this->LastQuery;
     58    if ($this->error <> '' and $Debug) echo $this->error.': '.$this->LastQuery;
    5859  }
    5960 
     
    7071    $this->LastQuery = 'UPDATE `'.$this->Prefix.$Table.'` SET '.$Values.' WHERE ('.$Condition.')';
    7172    $this->query($this->LastQuery);
    72     if ($this->error <> '' and $Debug) $this->error.': '.$this->LastQuery;
     73    if ($this->error <> '' and $this->Debug) echo $this->error.': '.$this->LastQuery;
    7374  }
    7475 
  • branches/3/events.php

    r29 r35  
    1010    $Result = $user->Logout();
    1111  }
     12 
     13  /********************translation events***********/
     14 
     15  if (array_key_exists('translation', $_GET)) {
     16    $translations = $_GET['translation'];
     17  }
     18  //users[]=206&
    1219
    1320
  • branches/3/frontend.php

    r33 r35  
    7575      while($DbRow = $Query->fetch_array())
    7676      {
    77         echo ''.$DbRow['Name'].'';
     77        echo ''.$DbRow['Name'].'<br />';
    7878      }
    7979      echo '</p>';
     
    119119    </form>';
    120120  } // END function WriteLogin
     121 
     122  function WriteTranslation($id, $show_en = true, $show_title = true)
     123  { // BEGIN function WriteTranslation
     124    global $database;
     125      if ($show_en) $lead_translate = count($id); else $lead_translate = 0;
     126      for ($i=0;$i<count($id) ;++$i ) { //seeking translated texts
     127        $translation[$i] = new translation($id[$i], $database);
     128      }
     129      //seeking en text
     130      if ($show_en) {
     131        $translation[count($id)] = new translation($translation[0]->data['en_Id'], $database);
     132        if ($translation[0]->data['en_Id'] == $translation[count($id)]->data['en_Id']) {
     133          unset($translation[count($id)]);
     134          $lead_translate = 0;
     135        }
     136      }
     137        echo '<table>';
     138       
     139      foreach ($translation[$lead_translate]->text as $key=>$value) {
     140        echo '<tr>';
     141        //writening colum name
     142        if ($show_title) echo '<td>'.$key.'</td>';
     143      //writening texts
     144        for ($i=count($translation)-1;$i>-1 ;--$i ) {
     145          if (isset($translation[$i]->text[$key]))
     146                  echo '<td width="200">'.htmlspecialchars($translation[$i]->text[$key]).'</td>';
     147                else
     148                  echo '<td width="200"> </td>';
     149        }
     150        echo '</tr>';
     151      }
     152        echo '</table>';
     153  } // END function WriteTranslation
    121154
    122155?>
  • branches/3/index.php

    r29 r35  
    77 
    88  if (isset($Result) == false) {
     9   
    910    switch ($Action) {
    1011      default: echo HOME_PAGE;
     
    1415      break;
    1516      case 'Rule': echo '<p>'.RULE.'</p>';
    16       break;
     17      break;     
     18      case 'Translation': WriteTranslation($translations);
     19      break;     
    1720       
    1821    }
  • branches/3/language_cz.php

    r29 r35  
    2626define('BAD_PASSWORD', 'Špatné heslo.');
    2727define('RULE_UNCHECK', 'Musíte souhlasit s pravidly');
     28define('TRANSLATION_MISSING', 'Překlad nenalezen');
    2829define('USER_TIMEOUT', 300);  // in seconds
    2930
  • branches/3/style.css

    r29 r35  
    147147   border-spacing: 0;
    148148   border: 1px #c43300 solid;
    149         padding: 0;
     149        padding: 2px;
    150150 }
    151151 
Note: See TracChangeset for help on using the changeset viewer.