Changeset 182 for trunk/export/index.php
- Timestamp:
- Apr 21, 2009, 6:54:35 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/export/index.php
r180 r182 37 37 } 38 38 39 if(array_key_exists('UserID', $_SESSION) and ($_SESSION['UserID'] != '')) 40 { 41 $DbResult = $Database->SQLCommand('SELECT ExportSetting FROM user WHERE ID='.$_SESSION['UserID']); 42 $DbRow = mysql_fetch_assoc($DbResult); 43 $ExportSetting = unserialize($DbRow['ExportSetting']); 39 function WriteSetting($ExportSetting) { 40 echo '<br /><br /><strong>Nastavení exportu:</strong><br />'. 41 '<textarea rows="10" cols="100">'.serialize($ExportSetting).'</textarea><br />'. 42 'Odkaz ke stažení s vlastním nastavením: '. 43 '<a href="?action=result&ExportSetting='.htmlspecialchars(serialize($ExportSetting)).'">Odkaz vlastního exportu</a><br />'. 44 'I když se nastavení ukládá, pro jistotu si jej můžete uložit nebo poslat příteli.'; 45 } 46 47 if (array_key_exists('ExportSetting',$_GET)) { 48 $ExportSetting = unserialize(stripcslashes(stripcslashes($_GET['ExportSetting']))); 49 } else { 50 if(array_key_exists('UserID', $_SESSION) and ($_SESSION['UserID'] != '')) 51 { 52 $DbResult = $Database->SQLCommand('SELECT ExportSetting FROM user WHERE ID='.$_SESSION['UserID']); 53 $DbRow = mysql_fetch_assoc($DbResult); 54 $ExportSetting = unserialize($DbRow['ExportSetting']); 44 55 45 56 //print_r($_POST); 46 } else 47 { 48 $ExportSetting = unserialize($_SESSION['ExportSetting']); 57 } else 58 { 59 $ExportSetting = unserialize($_SESSION['ExportSetting']); 60 } 49 61 } 50 62 if(!isset($ExportSetting['users-selection'])) $ExportSetting['users-selection'] = array(); … … 76 88 { 77 89 case 'result': 78 $ExportSetting['Export'] = @$_POST['Export'];90 if (array_key_exists('Export',$_POST)) $ExportSetting['Export'] = $_POST['Export']; 79 91 switch($ExportSetting['Export']) 80 92 { … … 349 361 } 350 362 WriteLog('Generování SQL výstupu: Typ exportu: <strong>'.$ExportSetting['Export'].'</strong>, Diakritika: <strong>'.$ExportSetting['Diacritics'].'</strong>', 2); 363 WriteSetting($ExportSetting); 364 365 351 366 break; 352 367 case 'output':
Note:
See TracChangeset
for help on using the changeset viewer.