Changeset 476 for trunk/export/index.php
- Timestamp:
- Apr 25, 2010, 1:12:04 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/export/index.php
r466 r476 109 109 $System->Database->query('DELETE FROM `Export` WHERE `Id`='.$_GET['ExportId']); 110 110 DeleteDirectory('../tmp/Export/'.$_GET['ExportId'].'/'); 111 ShowMessage('Export smazán.' , MESSAGE_CRITICAL);111 ShowMessage('Export smazán.'); 112 112 $_GET['Filter'] = 'my'; 113 113 WriteLog('Smazán export '.$_GET['ExportId'], LOG_TYPE_EXPORT); … … 126 126 else $Editable = false; 127 127 128 if(array_key_exists('Operation', $_ GET))129 { 130 if($_ GET['Operation'] == 'Save')128 if(array_key_exists('Operation', $_POST)) 129 { 130 if($_POST['Operation'] == 'Save') 131 131 { 132 132 //print_r($_POST); … … 155 155 $System->Database->query('SET @I = 0'); 156 156 $System->Database->query('UPDATE `ExportUser` SET `Sequence` = (@I := @I + 1) WHERE `Export`='.$_GET['ExportId'].' ORDER BY `Sequence`;'); 157 ShowMessage('Výběr uložen.'); 157 158 } 158 159 } … … 178 179 $PageList = GetPageList($DbRow[0]); 179 180 180 echo('<form name="Translators" action="?Action=View&ExportId='.$_GET['ExportId'].' &Operation=Save" method="post">');181 echo('<form name="Translators" action="?Action=View&ExportId='.$_GET['ExportId'].'" method="post">'); 181 182 echo('<h3>Překladatelé</h3>'); 182 183 if($Editable) 183 184 { 184 185 echo('<input type="submit" value="Uložit" '.$DisabledInput[$Editable].'/>'. 186 '<input type="hidden" name="Operation" value="Save"/>'. 185 187 ' <span onclick="CheckAllCheckbox();">'.CheckBox('CheckAll', False, 'CheckAll').' Zatrhnout vše</span> '. 186 188 '<br />'. … … 225 227 if($User->Licence(LICENCE_USER) and ($User->Id == $Export['User'])) $Editable = true; 226 228 else $Editable = false; 227 if($Editable and array_key_exists('Title', $_POST) and array_key_exists('Description', $_POST)) 229 230 if(array_key_exists('Operation', $_POST)) 231 if($_POST['Operation'] == 'Save') if($Editable and array_key_exists('Title', $_POST) and array_key_exists('Description', $_POST)) 228 232 { 229 233 if(array_key_exists('WithDiacritic', $_POST)) $WithDiacritic = 1; … … 233 237 $Export['Description'] = $_POST['Description']; 234 238 $Export['WithDiacritic'] = $WithDiacritic; 239 ShowMessage('Nastavení uloženo.'); 235 240 } 236 241 … … 240 245 if($Editable) 241 246 { 247 echo('<input type="hidden" name="Operation" value="Save"/>'); 242 248 echo('<tr><td colspan="2"><input type="submit" value="Uložit" '.$DisabledInput[$Editable].'/></td></tr>'); 243 249 } … … 258 264 else $Editable = false; 259 265 260 if(array_key_exists('Operation', $_ GET))261 { 262 if($_ GET['Operation'] == 'Save')266 if(array_key_exists('Operation', $_POST)) 267 { 268 if($_POST['Operation'] == 'Save') 263 269 { 264 270 //print_r($_POST); … … 287 293 $System->Database->query('SET @I = 0'); 288 294 $System->Database->query('UPDATE `ExportLanguage` SET `Sequence` = (@I := @I + 1) WHERE `Export`='.$_GET['ExportId'].' ORDER BY `Sequence`;'); 295 ShowMessage('Výběr uložen.'); 289 296 } 290 297 } … … 304 311 ); 305 312 $Order = GetOrderTableHeader($TableColumns, 'Sequence2'); 306 echo('<form action="?Action=View&ExportId='.$_GET['ExportId'].' &Operation=Save" method="post">');313 echo('<form action="?Action=View&ExportId='.$_GET['ExportId'].'" method="post">'); 307 314 echo('<h3>Jazyky</h3>'); 308 315 if($Editable) 309 316 { 310 317 echo('<input type="submit" value="Uložit" '.$DisabledInput[$Editable].'/>'. 318 '<input type="hidden" name="Operation" value="Save"/>'. 311 319 '<br />'. 312 320 'Zvolte ze seznamu dostupných jazyků, ze kterých chcete sestavit překlady a upravte jejich pořadí.<br />'. … … 345 353 else $Editable = false; 346 354 347 if(array_key_exists('Operation', $_ GET))348 { 349 if($_ GET['Operation'] == 'Save')355 if(array_key_exists('Operation', $_POST)) 356 { 357 if($_POST['Operation'] == 'Save') 350 358 { 351 359 //print_r($_POST); … … 369 377 } 370 378 } 379 ShowMessage('Výběr uložen.'); 371 380 } 372 381 } … … 386 395 ); 387 396 $Order = GetOrderTableHeader($TableColumns, 'Name'); 388 echo('<form action="?Action=View&ExportId='.$_GET['ExportId'].' &Operation=Save" method="post">');397 echo('<form action="?Action=View&ExportId='.$_GET['ExportId'].'" method="post">'); 389 398 echo('<h3>Překladové skupiny</h3>'); 390 399 if($Editable) 391 400 { 392 401 echo('<input type="submit" value="Uložit" '.$DisabledInput[$Editable].'/>'. 402 '<input type="hidden" name="Operation" value="Save"/>'. 393 403 ' <span onclick="CheckAllCheckbox();">'.CheckBox('CheckAll', False, 'CheckAll').' Zatrhnout vše</span> '. 394 404 '<br />'. … … 432 442 else $Editable = false; 433 443 434 if(array_key_exists('OutputType', $_POST)) 444 if(array_key_exists('Operation', $_POST)) 445 if($_POST['Operation'] == 'Save') 435 446 { 436 447 $System->Database->query('UPDATE Export SET OutputType='.$_POST['OutputType'].' WHERE Id='.$_GET['ExportId']); 448 ShowMessage('Výběr uložen.'); 437 449 } 438 450 … … 441 453 442 454 echo('<h3>Formát generovaného výstupu</h3>'); 443 echo('<form action="?Action=View&ExportId='.$_GET['ExportId'].' &Operation=Save" method="post">');455 echo('<form action="?Action=View&ExportId='.$_GET['ExportId'].'" method="post">'); 444 456 if($Editable) 445 457 { 446 458 echo('<input type="submit" value="Uložit" '.$DisabledInput[$Editable].'/>'. 459 '<input type="hidden" name="Operation" value="Save"/>'. 447 460 '<br />'); 448 461 } … … 467 480 else $Editable = false; 468 481 469 if(array_key_exists('ClientVersion', $_POST)) 482 if(array_key_exists('Operation', $_POST)) 483 if($_POST['Operation'] == 'Save') 470 484 { 471 485 $System->Database->query('UPDATE `Export` SET `ClientVersion`='.$_POST['ClientVersion'].' WHERE `Id`='.$_GET['ExportId']); 486 ShowMessage('Výběr uložen.'); 472 487 } 473 488 … … 495 510 { 496 511 echo('<input type="submit" value="Uložit" '.$DisabledInput[$Editable].'/>'. 512 '<input type="hidden" name="Operation" value="Save"/>'. 497 513 '<br />'. 498 514 'Vyberte pro jakou verzi herního klienta se budou texty exportovat.<br />');
Note:
See TracChangeset
for help on using the changeset viewer.