Changeset 149


Ignore:
Timestamp:
Mar 10, 2009, 11:33:23 AM (15 years ago)
Author:
maron
Message:

Uložení překladu po automatickém odhlášení

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/save.php

    r148 r149  
    66
    77// Ochrana proti neoprávněnému přístupu
    8 if(Licence(LICENCE_USER) == false) die('Nemáte přístup do této sekce! Je nutné se přihásit.');
     8//if(Licence(LICENCE_USER) == false) die('Nemáte přístup do této sekce! Je nutné se přihásit.');
    99
    1010if(array_key_exists('group', $_GET)) $GroupId = $_GET['group']; else $GroupId = 1;
    1111$Table = $TranslationTree[$GroupId]['TablePrefix'];
    1212
    13 if(array_key_exists('entry', $_POST))
     13if(array_key_exists('entry', $_POST) and Licence(LICENCE_USER))
    1414{
    1515  $entry = $_POST['entry']; 
     
    1919  if(array_key_exists('End', $_POST)) $complete = 1;
    2020    else $complete = 0;
    21          
    22   //if(( == '') AND ($complete == 1)) die('Musite zadat název textu');
    23    
     21             
    2422  $LineAJ = mysql_fetch_array($Database->SQLCommand('SELECT * FROM '.$Table.' WHERE Language = 0 AND entry = '.$entry));
    2523  $Line = mysql_fetch_array($Database->SQLCommand('SELECT * FROM '.$Table.' WHERE user='.$UserID.' AND entry = '.$entry));
     
    9088    FollowingTran($TextID,$Table,$GroupId, True); FollowingTran($TextID,$Table,$GroupId);
    9189  $Database->SQLCommand('UPDATE `user` SET `NeedUpdate` = 1 WHERE ID = '.$UserID); //informace o nutnosti načíst XP
     90} else {
     91        if(array_key_exists('entry', $_POST)) {
     92                echo ('Byli jste automaticky odhlášeni. Pro <strong>Uložení překladu</strong> se musíte přihlásit zde:<br /><br />');
     93                echo('<form action="save.php?group='.$GroupId.'" method="post"><div>');
     94                echo('<input type="hidden" name="entry" value="'.$_POST['entry'].'" />'.
     95                     '<input type="hidden" name="user" value="'.$_POST['user'].'" />'.
     96                 '<input type="hidden" name="ID" value="'.$_POST['ID'].'" />'.
     97                     '<input type="hidden" name="Language" value="'.$_POST['Language'].'" />');
     98
     99                foreach($TranslationTree[$GroupId]['Items'] as $Index => $TextItem)
     100                        echo('<input id="'.$TextItem['Column'].'" name="'.$TextItem['Column'].'" type="hidden" value="'.htmlspecialchars($_POST[$TextItem['Column']]).'" />');
     101                       
     102                echo ('  <table>
     103    <tr>
     104      <td>Jméno: <input type="text" name="LoginUser" size="13" /></td>
     105    </tr>
     106    <tr>
     107      <td>Heslo: <input type="password" name="LoginPass" size="13" /></td>
     108    </tr>
     109    <tr>
     110      <th><input type="submit" value="Přihlásit a uložit překlad" /></th>
     111    </tr>
     112  </table>');   
     113        }
    92114}
    93115         
  • trunk/userlist.php

    r131 r149  
    1313else if(!array_key_exists('Order', $_SESSION)) $_SESSION['Order'] = 'NumberTranslate';
    1414if(array_key_exists('Desc', $_GET)) $_SESSION['Desc'] = $_GET['Desc'];
    15 else if(!array_key_exists('Desc', $_SESSION)) $_SESSION['Desc'] = '';
     15else if(!array_key_exists('Desc', $_SESSION)) $_SESSION['Desc'] = 'DESC';
    1616
    1717if(array_key_exists('Where', $_GET)) {
Note: See TracChangeset for help on using the changeset viewer.