- Timestamp:
- Feb 17, 2021, 9:27:32 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/DefaultConfig.php
r897 r901 53 53 array('Name' => 'MainRouter/ConnectTimeout', 'Type' => 'Integer', 'Default' => '5', 'Title' => 'Vypršení času'), 54 54 array('Name' => 'MainRouter/MangleRuleSubgroupMinPrefix', 'Type' => 'Integer', 'Default' => '28', 'Title' => 'Nejmenší prefix podsítě pro mangle pravidla'), 55 array('Name' => 'Contract/DirectoryId', 'Type' => 'Integer', 'Default' => '19', 'Title' => 'Id adresáře souborů smluv'), 55 56 ); 56 57 } -
trunk/Application/UpdateTrace.php
r890 r901 2134 2134 $Manager->Execute('ALTER TABLE `FinanceOperation` CHANGE `Value` `Value` FLOAT NOT NULL DEFAULT "0";'); 2135 2135 $Manager->Execute('ALTER TABLE `NetworkInterface` CHANGE `OnlineNotify` `OnlineNotify` INT(11) NOT NULL DEFAULT "0";'); 2136 } 2137 2138 function UpdateTo901(UpdateManager $Manager): void 2139 { 2140 $Manager->Execute('ALTER TABLE `Member` ADD `Contract` INT NULL DEFAULT NULL AFTER `ChangeReplaceId`;'); 2141 $Manager->Execute('ALTER TABLE `Member` ADD FOREIGN KEY (`Contract`) REFERENCES `Contract`(`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT;'); 2142 $Manager->Execute("INSERT INTO `Module` (`Id`, `Name`, `Title`, `Version`, `Creator`, `License`, `Installed`, `HomePage`, `Description`) VALUES (NULL, 'Contract', '', '', '', '', '0', '', '');"); 2143 $Manager->Execute("INSERT INTO `Module` (`Id`, `Name`, `Title`, `Version`, `Creator`, `License`, `Installed`, `HomePage`, `Description`) VALUES (NULL, 'Document', '', '', '', '', '0', '', '');"); 2144 $Manager->Execute("INSERT INTO `PermissionOperation` (`Id`, `Module`, `Operation`, `Item`, `ItemId`) VALUES (NULL, '1', 'DisplayCustomerDocuments', '', '0');"); 2145 $Manager->Execute("INSERT INTO `PermissionGroupAssignment` (`Id`, `Group`, `AssignedGroup`, `AssignedOperation`) VALUES (NULL, '3', NULL, '52');"); 2146 $Manager->Execute('ALTER TABLE `File` ADD `Hash` VARCHAR(255) NOT NULL AFTER `Time`;'); 2147 $Manager->Execute("UPDATE `File` SET `Hash` = SHA1(CONCAT(Id,Name,Size,Time))"); 2148 $Manager->Execute("ALTER TABLE `Contract` ADD `Generate` INT NOT NULL DEFAULT '0' AFTER `File`;"); 2149 $Manager->Execute("ALTER TABLE `Contract` DROP `BillCodeText`;"); 2150 $Manager->Execute("INSERT INTO `FileDirectory` (`Id`, `Name`, `Parent`) VALUES (NULL, 'smlouvy', NULL);"); 2151 $Manager->Execute("ALTER TABLE `Log` CHANGE `Value` `Value` MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;"); 2152 $Manager->Execute("INSERT INTO `PermissionOperation` (`Id`, `Module`, `Operation`, `Item`, `ItemId`) VALUES (NULL, '4', 'DownloadById', '', '0');"); 2153 $Manager->Execute("INSERT INTO `PermissionGroupAssignment` (`Id`, `Group`, `AssignedGroup`, `AssignedOperation`) VALUES (NULL, '4', NULL, '53');"); 2136 2154 } 2137 2155 … … 2240 2258 880 => array('Revision' => 882, 'Function' => 'UpdateTo882'), 2241 2259 882 => array('Revision' => 885, 'Function' => 'UpdateTo885'), 2260 885 => array('Revision' => 901, 'Function' => 'UpdateTo901'), 2242 2261 ); 2243 2262 } -
trunk/Application/Version.php
r899 r901 1 1 <?php 2 2 3 $Revision = 899; // Subversion revision4 $DatabaseRevision = 885; // SQL structure revision3 $Revision = 901; // Subversion revision 4 $DatabaseRevision = 901; // SQL structure revision 5 5 $ReleaseTime = strtotime('2021-02-17'); -
trunk/Modules/Customer/Customer.php
r899 r901 37 37 'SupportActivity' => array('Type' => 'TSupportActivityListCustomer', 'Caption' => 'Zákaznická podpora', 'Default' => ''), 38 38 'Consumption' => array('Type' => 'TCustomerStockSerialNumber', 'Caption' => 'Spotřeba zařízení', 'Default' => ''), 39 'Contract' => array('Type' => 'TContract', 'Caption' => 'Smlouva', 'Default' => '', 'Null' => true), 39 40 'ChangeAction' => array('Type' => 'TActionEnum', 'Caption' => 'Změna - akce', 'Default' => '', 'Null' => true), 40 41 'ChangeTime' => array('Type' => 'DateTime', 'Caption' => 'Změna - čas', 'Default' => '', 'Null' => true, 'NotInList' => true), … … 196 197 ), 197 198 )); 199 $this->System->FormManager->RegisterFormType('TCustomerListContract', array( 200 'Type' => 'ManyToOne', 201 'Table' => 'Member', 202 'Id' => 'Id', 203 'Ref' => 'Contract', 204 'Filter' => '1', 205 )); 206 207 $this->System->RegisterPage(['user', 'dokumenty'], 'PageCustomerDocuments'); 198 208 199 209 ModuleIS::Cast(Core::Cast($this->System)->GetModule('IS'))->RegisterDashboardItem('Customer', … … 211 221 $Output .= ' platících:'.$DbRow['0'].'<br/>'; 212 222 223 return $Output; 224 } 225 } 226 227 class PageCustomerDocuments extends Page 228 { 229 function __construct(System $System) 230 { 231 parent::__construct($System); 232 $this->FullTitle = 'Dokumenty klienta'; 233 $this->ShortTitle = 'Dokumenty'; 234 $this->ParentClass = 'PageUser'; 235 } 236 237 function Show(): string 238 { 239 $Output = '<br/><div><strong>Dostupné dokumenty:</strong></div><br/>'; 240 241 $User = &ModuleUser::Cast($this->System->GetModule('User'))->User; 242 243 // Determine which customer should be displayed 244 if (array_key_exists('i', $_GET)) 245 { 246 if (!$User->CheckPermission('Finance', 'Manage')) return 'Nemáte oprávnění'; 247 $CustomerId = $_GET['i']; 248 } else 249 { 250 if (!$User->CheckPermission('Customer', 'DisplayCustomerDocuments')) return 'Nemáte oprávnění'; 251 $UserId = ModuleUser::Cast($this->System->GetModule('User'))->User->User['Id']; 252 $DbResult = $this->Database->query('SELECT `Customer` FROM `UserCustomerRel` WHERE `User`='.$UserId.' LIMIT 1'); 253 if ($DbResult->num_rows > 0) 254 { 255 $CustomerUserRel = $DbResult->fetch_assoc(); 256 $CustomerId = $CustomerUserRel['Customer']; 257 } else return $this->SystemMessage('Chyba', 'Nejste zákazníkem'); 258 } 259 260 // Load customer info 261 $DbResult = $this->Database->query('SELECT * FROM `Member` WHERE `Id`='.$CustomerId); 262 if ($DbResult->num_rows == 1) 263 { 264 $Customer = $DbResult->fetch_assoc(); 265 } else return $this->SystemMessage('Položka nenalezena', 'Zákazník nenalezen'); 266 267 if ($Customer['Contract'] != '') 268 { 269 $DbResult = $this->Database->query('SELECT Contract.*, File.Hash AS FileHash, DocumentLineCode.Name AS BillCodeText FROM Contract '. 270 'LEFT JOIN File ON File.Id=Contract.File '. 271 'LEFT JOIN DocumentLineCode ON DocumentLineCode.Id=Contract.BillCode '. 272 'WHERE (Contract.Id='.$Customer['Contract'].')'); 273 if ($DbResult->num_rows > 0) 274 { 275 $Contract = $DbResult->fetch_assoc(); 276 if ($Contract['File'] > 0) $Output .= 'Smlouva: <a href="'.$this->System->Link('/file?h='.$Contract['FileHash']).'">'.$Contract['BillCodeText'].'</a><br/>'; 277 else $Output .= 'Smlouva: '.$Contract['BillCodeText'].'<br/>'; 278 $Output .= 'Všeobecné smluvní podmínky: <a href="http://www.zdechov.net/docs/V%C5%A1eobecn%C3%A9%20smluvn%C3%AD%20podm%C3%ADnky.pdf">PDF</a><br/>'; 279 } 280 } 213 281 return $Output; 214 282 } -
trunk/Modules/Document/Document.php
r899 r901 80 80 )); 81 81 } 82 83 static function Cast(Module $Module): ModuleDocument 84 { 85 if ($Module instanceof ModuleDocument) 86 { 87 return $Module; 88 } 89 throw new Exception('Expected ModuleDocument type but '.gettype($Module)); 90 } 91 92 function GetFinanceYear(int $Year): array 93 { 94 if ($Year == 0) 95 { 96 // Get latest year 97 $DbResult = $this->Database->select('FinanceYear', '*', '1 ORDER BY `Year` DESC LIMIT 1'); 98 } else $DbResult = $this->Database->select('FinanceYear', '*', '`Year`='.$Year); 99 if ($DbResult->num_rows == 0) 100 { 101 if ($Year == date('Y')) 102 { 103 $this->CreateFinanceYear($Year); 104 $DbResult = $this->Database->select('FinanceYear', '*', '`Year`='.$Year); 105 } else throw new Exception('Rok '.$Year.' nenalezen'); 106 } 107 $FinanceYear = $DbResult->fetch_assoc(); 108 if ($FinanceYear['Closed'] == 1) 109 throw new Exception('Rok '.$FinanceYear['Year'].' je již uzavřen. Nelze do něj přidávat položky.'); 110 return $FinanceYear; 111 } 112 113 function GetNextDocumentLineNumber(string $Id, int $FinanceYear = 0): string 114 { 115 $FinanceYear = $this->GetFinanceYear($FinanceYear); 116 117 $DbResult = $this->Database->query('SELECT `Shortcut`, `Id` FROM `DocumentLine` WHERE `Id`='.$Id); 118 $DocumentLine = $DbResult->fetch_assoc(); 119 120 $DbResult = $this->Database->query('SELECT * FROM `DocumentLineSequence` WHERE '. 121 '`DocumentLine`='.$Id.' AND `FinanceYear`='.$FinanceYear['Id']); 122 $Sequence = $DbResult->fetch_assoc(); 123 124 if ($Sequence['YearPrefix'] == 1) 125 { 126 $Result = $DocumentLine['Shortcut'].$Sequence['NextNumber'].'/'.$FinanceYear['Year']; 127 } else $Result = $DocumentLine['Shortcut'].$Sequence['NextNumber']; 128 129 $this->Database->query('UPDATE `DocumentLineSequence` SET `NextNumber` = `NextNumber` + 1 '. 130 'WHERE (`DocumentLine`='.$Id.') AND (`FinanceYear`='.$FinanceYear['Id'].')'); 131 return $Result; 132 } 133 134 function GetNextDocumentLineNumberId(string $Id, int $FinanceYear = 0): int 135 { 136 $Code = $this->GetNextDocumentLineNumber($Id, $FinanceYear); 137 $this->Database->insert('DocumentLineCode', array('DocumentLine' => $Id, 'Name' => $Code)); 138 return $this->Database->insert_id; 139 } 140 141 function CreateFinanceYear(int $Year) 142 { 143 $StartTime = mktime(0, 0, 0, 1, 1, $Year); 144 $EndTime = mktime(0, 0, 0, 12, 31, $Year); 145 $this->Database->insert('FinanceYear', array('Year' => $Year, 146 'DateStart' => TimeToMysqlDate($StartTime), 'DateEnd' => TimeToMysqlDate($EndTime), 'Closed' => 0)); 147 $YearId = $this->Database->insert_id; 148 149 // Create DocumentLineSequence from previous 150 $DbResult = $this->Database->select('DocumentLine', 'Id', '`Yearly` = 1'); 151 while ($DbRow = $DbResult->fetch_assoc()) 152 { 153 $this->Database->insert('DocumentLineSequence', array('FinanceYear' => $YearId, 154 'NextNumber' => 1, 'YearPrefix' => 1, 'DocumentLine' => $DbRow['Id'])); 155 } 156 } 82 157 } 83 158 -
trunk/Modules/Employee/Employee.php
r899 r901 83 83 'Filter' => '1', 84 84 )); 85 $this->System->FormManager->RegisterFormType('TEmployeeSalaryListContract', array( 86 'Type' => 'ManyToOne', 87 'Table' => 'EmployeeSalary', 88 'Id' => 'Id', 89 'Ref' => 'Contract', 90 'Filter' => '1', 91 )); 85 92 } 86 93 } -
trunk/Modules/File/File.php
r899 r901 20 20 $Desc->AddReference('Directory', FileDirectory::GetClassName(), true); 21 21 $Desc->AddDateTime('Time'); 22 $Desc->AddString('Hash'); 23 $Desc->AddBoolean('Generate'); 22 24 return $Desc; 23 25 } … … 59 61 } 60 62 61 function Download(string $Id): void 62 { 63 $DbResult = $this->Database->select('File', '*', 'Id='.addslashes($Id)); 63 function DownloadHash(string $Hash): void 64 { 65 $this->Download('Hash="'.addslashes($Hash).'"'); 66 } 67 68 function DownloadId(string $Id): void 69 { 70 if (!ModuleUser::Cast($this->System->GetModule('User'))->User->CheckPermission('File', 'DownloadById')) 71 echo('Nemáte oprávnění'); 72 $this->Download('Id='.addslashes($Id)); 73 } 74 75 function Download(string $Where): void 76 { 77 $DbResult = $this->Database->select('File', '*', $Where); 64 78 if ($DbResult->num_rows > 0) 65 79 { … … 105 119 function Show(): string 106 120 { 107 if (array_key_exists('id', $_GET)) $Id = $_GET['id']; 108 else if (array_key_exists('i', $_GET)) $Id = $_GET['i']; 121 if (array_key_exists('h', $_GET)) 122 { 123 $Hash = $_GET['h']; 124 $this->ClearPage = true; 125 ModuleFile::Cast($this->System->GetModule('File'))->File->DownloadHash($Hash); 126 return ''; 127 } 128 else if (array_key_exists('i', $_GET)) 129 { 130 $Id = $_GET['i'] * 1; 131 $this->ClearPage = true; 132 ModuleFile::Cast($this->System->GetModule('File'))->File->DownloadId($Id); 133 } 109 134 else return $this->SystemMessage('Chyba', 'Nezadáno id souboru'); 110 $this->ClearPage = true; 111 $Output = ModuleFile::Cast($this->System->GetModule('File'))->File->Download($Id); 112 return $Output; 135 return ''; 113 136 } 114 137 } … … 208 231 'Size' => array('Type' => 'Integer', 'Caption' => 'Velikost', 'Default' => ''), 209 232 'Time' => array('Type' => 'DateTime', 'Caption' => 'Čas vytvoření', 'Default' => ''), 233 'Hash' => array('Type' => 'String', 'Caption' => 'Haš', 'Default' => ''), 210 234 'Invoices' => array('Type' => 'TFinanceInvoiceListFile', 'Caption' => 'Faktury', 'Default' => ''), 211 235 'Operations' => array('Type' => 'TFinanceOperationListFile', 'Caption' => 'Operace', 'Default' => ''), -
trunk/Modules/Finance/Bill.php
r888 r901 1 1 <?php 2 2 3 class Bill extends Model3 class Bill extends Pdf 4 4 { 5 5 public int $SpecificSymbol = 1; // computer network number 6 public bool $Checked = false;7 8 function GenerateHTML(): string9 {10 return '';11 }12 13 function SaveToFile(string $FileName): void14 {15 $PdfData = $this->HtmlToPdf($this->GenerateHTML());16 file_put_contents($FileName, $PdfData);17 }18 19 function HtmlToPdf(string $HtmlCode): string20 {21 $Encoding = new Encoding();22 if ($this->Checked == false) {23 if (CommandExist('htmldoc')) {24 $this->Checked = true;25 } else throw new Exception('htmldoc is not installed.');26 }27 $Output = shell_exec('echo "'.addslashes($Encoding->FromUTF8($HtmlCode)).28 '"|htmldoc --no-numbered --webpage --no-embedfonts --charset 8859-2 -t pdf -');29 return $Output;30 }31 6 } 32 7 -
trunk/Modules/Finance/Finance.php
r900 r901 21 21 $this->License = 'GNU/GPLv3'; 22 22 $this->Description = 'Base module for finance management'; 23 $this->Dependencies = array(ModuleFile::GetName(), ModuleEmailQueue::GetName(), ModuleSubject::GetName(), ModuleDocument::GetName()); 23 $this->Dependencies = array(ModuleFile::GetName(), ModuleEmailQueue::GetName(), ModuleSubject::GetName(), 24 ModuleDocument::GetName()); 24 25 $this->Models = array(FinanceBillingPeriod::GetClassName(), FinanceVatType::GetClassName(), FinanceVat::GetClassName(), 25 26 FinanceGroup::GetClassName(), FinanceOperationGroup::GetClassName(), FinanceOperation::GetClassName(), … … 27 28 Company::GetClassName(), FinanceTreasury::GetClassName(), FinanceTreasuryCheck::GetClassName(), 28 29 Currency::GetClassName(), FinanceBank::GetClassName(), FinanceBankAccount::GetClassName(), FinanceCharge::GetClassName(), 29 Contract::GetClassName(),FinanceInvoiceOperationRel::GetClassName());30 FinanceInvoiceOperationRel::GetClassName()); 30 31 31 32 $this->Bill = new Bill($this->System); … … 423 424 'Name' => array('Type' => 'String', 'Caption' => 'Název', 'Default' => ''), 424 425 ), 425 ));426 $this->System->FormManager->RegisterClass('Contract', array(427 'Title' => 'Smlouvy',428 'Table' => 'Contract',429 'Items' => array(430 'DocumentLine' => array('Type' => 'TDocumentLine', 'Caption' => 'Dokladová řada', 'Default' => ''),431 'BillCode' => array('Type' => 'TDocumentLineCode', 'Caption' => 'Kód', 'Default' => '', 'Null' => true),432 'Subject' => array('Type' => 'TSubject', 'Caption' => 'Subjekt', 'Default' => ''),433 'ValidFrom' => array('Type' => 'Date', 'Caption' => 'Platnost od', 'Default' => ''),434 'ValidTo' => array('Type' => 'Date', 'Caption' => 'Platnost do', 'Default' => '', 'Null' => true),435 'File' => array('Type' => 'TFile', 'Caption' => 'Soubor', 'Default' => '', 'Null' => true),436 ),437 'BeforeInsert' => array($this, 'BeforeInsertContract'),438 ));439 $this->System->FormManager->RegisterFormType('TContract', array(440 'Type' => 'Reference',441 'Table' => 'Contract',442 'Id' => 'Id',443 'Name' => 'BillCode',444 'Filter' => '1',445 426 )); 446 427 $this->System->FormManager->RegisterFormType('TFinanceVAT', array( … … 541 522 } 542 523 543 function DoStop(): void544 {545 }546 547 524 function BeforeInsertFinanceOperation(Form $Form): array 548 525 { … … 550 527 else $Year = date("Y", $Form->Values['ValidFrom']); 551 528 $FinanceGroup = $this->Finance->GetFinanceGroupById($Form->Values['Group'], 'FinanceOperationGroup'); 552 $Form->Values['BillCode'] = $this->Finance->GetNextDocumentLineNumberId($FinanceGroup['DocumentLine'], $Year);529 $Form->Values['BillCode'] = ModuleDocument::Cast($this->System->GetModule('Document'))->GetNextDocumentLineNumberId($FinanceGroup['DocumentLine'], $Year); 553 530 return $Form->Values; 554 531 } … … 576 553 else $Year = date("Y", $Form->Values['ValidFrom']); 577 554 $Group = $this->Finance->GetFinanceGroupById($Form->Values['Group'], 'FinanceInvoiceGroup'); 578 $Form->Values['BillCode'] = $this->Finance->GetNextDocumentLineNumberId($Group['DocumentLine'], $Year);555 $Form->Values['BillCode'] = ModuleDocument::Cast($this->System->GetModule('Document'))->GetNextDocumentLineNumberId($Group['DocumentLine'], $Year); 579 556 return $Form->Values; 580 557 } … … 621 598 } 622 599 623 function BeforeInsertContract(Form $Form): array624 {625 if (array_key_exists('Time', $Form->Values)) $Year = date("Y", $Form->Values['Time']);626 else $Year = date("Y", $Form->Values['ValidFrom']);627 $Form->Values['BillCode'] = $this->Finance->GetNextDocumentLineNumberId($Form->Values['DocumentLine'], $Year);628 return $Form->Values;629 }630 631 600 static function Cast(Module $Module): ModuleFinance 632 601 { -
trunk/Modules/Finance/FinanceModels.php
r899 r901 77 77 } 78 78 79 function CreateFinanceYear(int $Year) 80 { 81 $StartTime = mktime(0, 0, 0, 1, 1, $Year); 82 $EndTime = mktime(0, 0, 0, 12, 31, $Year); 83 $this->Database->insert('FinanceYear', array('Year' => $Year, 84 'DateStart' => TimeToMysqlDate($StartTime), 'DateEnd' => TimeToMysqlDate($EndTime), 'Closed' => 0)); 85 $YearId = $this->Database->insert_id; 86 87 // Create DocumentLineSequence from previous 88 $DbResult = $this->Database->select('DocumentLine', 'Id', '`Yearly` = 1'); 89 while ($DbRow = $DbResult->fetch_assoc()) 79 function GetFinanceGroupById(string $Id, string $Table): ?array 80 { 81 $DbResult = $this->Database->query('SELECT * FROM `'.$Table.'` WHERE `Id`= '.$Id); 82 if ($DbResult->num_rows == 1) 90 83 { 91 $this->Database->insert('DocumentLineSequence', array('FinanceYear' => $YearId,92 'NextNumber' => 1, 'YearPrefix' => 1, 'DocumentLine' => $DbRow['Id']));93 }94 }95 96 function GetFinanceYear(int $Year): array97 {98 if ($Year == 0)99 {100 // Get latest year101 $DbResult = $this->Database->select('FinanceYear', '*', '1 ORDER BY `Year` DESC LIMIT 1');102 } else $DbResult = $this->Database->select('FinanceYear', '*', '`Year`='.$Year);103 if ($DbResult->num_rows == 0)104 {105 if ($Year == date('Y'))106 {107 $this->CreateFinanceYear($Year);108 $DbResult = $this->Database->select('FinanceYear', '*', '`Year`='.$Year);109 } else throw new Exception('Rok '.$Year.' nenalezen');110 }111 $FinanceYear = $DbResult->fetch_assoc();112 if ($FinanceYear['Closed'] == 1)113 throw new Exception('Rok '.$FinanceYear['Year'].' je již uzavřen. Nelze do něj přidávat položky.');114 return $FinanceYear;115 }116 117 function GetNextDocumentLineNumber(string $Id, int $FinanceYear = 0): string118 {119 $FinanceYear = $this->GetFinanceYear($FinanceYear);120 121 $DbResult = $this->Database->query('SELECT `Shortcut`, `Id` FROM `DocumentLine` WHERE `Id`='.$Id);122 $DocumentLine = $DbResult->fetch_assoc();123 124 $DbResult = $this->Database->query('SELECT * FROM `DocumentLineSequence` WHERE '.125 '`DocumentLine`='.$Id.' AND `FinanceYear`='.$FinanceYear['Id']);126 $Sequence = $DbResult->fetch_assoc();127 128 if ($Sequence['YearPrefix'] == 1)129 {130 $Result = $DocumentLine['Shortcut'].$Sequence['NextNumber'].'/'.$FinanceYear['Year'];131 } else $Result = $DocumentLine['Shortcut'].$Sequence['NextNumber'];132 133 $this->Database->query('UPDATE `DocumentLineSequence` SET `NextNumber` = `NextNumber` + 1 '.134 'WHERE (`DocumentLine`='.$Id.') AND (`FinanceYear`='.$FinanceYear['Id'].')');135 return $Result;136 }137 138 function GetNextDocumentLineNumberId(string $Id, int $FinanceYear = 0): int139 {140 $Code = $this->GetNextDocumentLineNumber($Id, $FinanceYear);141 $this->Database->insert('DocumentLineCode', array('DocumentLine' => $Id, 'Name' => $Code));142 return $this->Database->insert_id;143 }144 145 function GetFinanceGroupById(string $Id, string $Table): ?array146 {147 $DbResult = $this->Database->query('SELECT * FROM `'.$Table.'` WHERE `Id`= '.$Id);148 if ($DbResult->num_rows == 1) {149 84 $Group = $DbResult->fetch_assoc(); 150 85 return $Group; … … 443 378 } 444 379 445 class Contract extends Model446 {447 static function GetModelDesc(): ModelDesc448 {449 $Desc = new ModelDesc(self::GetClassName());450 $Desc->AddReference('DocumentLine', DocumentLine::GetClassName());451 $Desc->AddReference('BillCode', DocumentLineCode::GetClassName());452 $Desc->AddReference('Subject', Subject::GetClassName());453 $Desc->AddDate('ValidFrom');454 $Desc->AddDate('ValidTo');455 $Desc->AddReference('File', File::GetClassName());456 return $Desc;457 }458 }459 460 380 class FinanceBillingPeriod extends Model 461 381 { -
trunk/Modules/Finance/Import.php
r888 r901 131 131 { 132 132 $Year = date('Y', $Time); 133 $BillCode = Module Finance::Cast($this->System->GetModule('Finance'))->Finance->GetNextDocumentLineNumberId($Group['DocumentLine'], $Year);133 $BillCode = ModuleDocument::Cast($this->System->GetModule('Document'))->GetNextDocumentLineNumberId($Group['DocumentLine'], $Year); 134 134 // TODO: Fixed BankAccount=1, allow to select bank account for import 135 135 $this->Database->insert('FinanceOperation', array('Text' => $Text, -
trunk/Modules/Finance/Manage.php
r887 r901 135 135 136 136 $Year = date('Y', $TimeCreation); 137 $BillCode = $Finance->GetNextDocumentLineNumberId($Group['DocumentLine'], $Year);137 $BillCode = ModuleDocument::Cast($this->System->GetModule('Document'))->GetNextDocumentLineNumberId($Group['DocumentLine'], $Year); 138 138 $SumValue = 0; 139 139 foreach ($Items as $Item) { … … 377 377 $Title = 'Pravidelné vyúčtování služeb'; 378 378 $Content = 'Vyúčtovaní zákazníka <strong>'.$Subject['Name'].'</strong> zastoupeného uživatelem <strong>'. 379 $User['Name'].'</strong> ke dni <strong>'. $this->System->HumanDate(time()).'</strong>.<br/><br/>'."\n".379 $User['Name'].'</strong> ke dni <strong>'.Core::Cast($this->System)->HumanDate(time()).'</strong>.<br/><br/>'."\n". 380 380 'Vaše aktuální služby: '; 381 381 $DbResult = $this->Database->query('SELECT GROUP_CONCAT(`Service`.`Name`) AS `Name` FROM `ServiceCustomerRel` LEFT JOIN `Service` '. … … 441 441 if (file_exists($FullFileName)) 442 442 { 443 $this->Database->update('File', 'Id='.$FileId, array('Name' => $FileName, 'Size' => filesize($FullFileName) ));443 $this->Database->update('File', 'Id='.$FileId, array('Name' => $FileName, 'Size' => filesize($FullFileName), 'Hash' => 'SHA1(CONCAT(Id,Name,Size,Time))')); 444 444 $this->Database->update('FinanceInvoice', 'Id='.$Row['Id'], array('File' => $FileId)); 445 445 $Output .= 'Faktura '.$Row['Id'].' vygenerována do souboru '.$FileName.'<br/>'."\n"; … … 472 472 if (file_exists($FullFileName)) 473 473 { 474 $this->Database->update('File', 'Id='.$FileId, array('Name' => $FileName, 'Size' => filesize($FullFileName) ));474 $this->Database->update('File', 'Id='.$FileId, array('Name' => $FileName, 'Size' => filesize($FullFileName), 'Hash' => 'SHA1(CONCAT(Id,Name,Size,Time))')); 475 475 $this->Database->update('FinanceOperation', 'Id='.$Row['Id'], array('File' => $FileId)); 476 476 $Output .= 'Doklad pro platbu '.$Row['Id'].' vygenerován do souboru '.$FileName.'<br/>'."\n"; -
trunk/Modules/Finance/UserState.php
r888 r901 11 11 } 12 12 13 function ShowFinanceOperation(int $Subject ): string13 function ShowFinanceOperation(int $SubjectId): string 14 14 { 15 $UserOperationTableQuery = '((SELECT `Text`, ` Time`, `Value`, `File`, `BillCode`, NULL AS `PeriodFrom`, NULL AS `PeriodTo`, `DocumentLineCode`.`Name` AS `BillName` '.15 $UserOperationTableQuery = '((SELECT `Text`, `FinanceOperation`.`Time`, `Value`, `File`.`Hash` AS `FileHash`, `BillCode`, NULL AS `PeriodFrom`, NULL AS `PeriodTo`, `DocumentLineCode`.`Name` AS `BillName` '. 16 16 'FROM `FinanceOperation` '. 17 17 'LEFT JOIN `DocumentLineCode` ON `DocumentLineCode`.`Id`=`FinanceOperation`.`BillCode` '. 18 'WHERE (`Subject`='.$Subject['Id'].') '. 18 'LEFT JOIN `File` ON `File`.`Id`=`FinanceOperation`.`File` '. 19 'WHERE (`Subject`='.$SubjectId.') '. 19 20 ') UNION ALL '. 20 21 '(SELECT (SELECT GROUP_CONCAT(`Description` SEPARATOR ",") FROM `FinanceInvoiceItem` WHERE `FinanceInvoice`=`FinanceInvoice`.`Id`) AS `Text`, '. 21 '`Time`, -`Value`, `File`, `BillCode`, `PeriodFrom`, `PeriodTo`, `DocumentLineCode`.`Name` AS `BillName` FROM `FinanceInvoice` '. 22 '`FinanceInvoice`.`Time`, -`Value`, `File`.`Hash` AS `FileHash`, `BillCode`, `PeriodFrom`, `PeriodTo`, `DocumentLineCode`.`Name` AS `BillName` '. 23 'FROM `FinanceInvoice` '. 22 24 'LEFT JOIN `DocumentLineCode` ON `DocumentLineCode`.`Id`=`FinanceInvoice`.`BillCode` '. 23 'WHERE (`Subject`='.$Subject['Id'].') AND (`VisibleToUser` = 1)))'; 25 'LEFT JOIN `File` ON `File`.`Id`=`FinanceInvoice`.`File` '. 26 'WHERE (`Subject`='.$SubjectId.') AND (`VisibleToUser` = 1)))'; 24 27 25 28 $Output = '<div style="text-align:center">Výpis finančních operací</div>'; … … 56 59 if ($Row['Value'] > 0) $Row['Value'] = '+'.$Row['Value']; 57 60 if ($Row['BillName'] == '') $Row['BillName'] = 'PDF'; 58 if ($Row['File '] > 0) $Invoice = '<a href="'.$this->System->Link('/file?id='.$Row['File']).'">'.$Row['BillName'].'</a>';61 if ($Row['FileHash'] != '') $Invoice = '<a href="'.$this->System->Link('/file?h='.$Row['FileHash']).'">'.$Row['BillName'].'</a>'; 59 62 else $Invoice = NotBlank($Row['BillName']); 60 63 if ($Row['PeriodFrom'] != '') $Period = HumanDate($Row['PeriodFrom']).' - '.HumanDate($Row['PeriodTo']); … … 102 105 } else return $this->SystemMessage('Položka nenalezena', 'Zákazník nenalezen'); 103 106 104 105 107 // Load subject info 106 108 $DbResult = $this->Database->query('SELECT * FROM `Subject` WHERE `Id`='.$Customer['Subject']); … … 109 111 $Subject = $DbResult->fetch_assoc(); 110 112 } else return $this->SystemMessage('Položka nenalezena', 'Subjekt nenalezen'); 111 112 113 113 114 $Output = '<table width="100%" border="0" cellspacing="0" cellpadding="3"><tr><td valign="top">'; … … 124 125 125 126 // Tabulka operaci 126 $Output .= $this->ShowFinanceOperation($Subject );127 $Output .= $this->ShowFinanceOperation($Subject['Id']); 127 128 128 129 $Output .= '</td><td valign="top">'; -
trunk/Modules/FinanceBankAPI/FileImport.php
r899 r901 44 44 } 45 45 $Year = date('Y', MysqlDateToTime($DbRow['Time'])); 46 $BillCode = $Finance->GetNextDocumentLineNumberId($FinanceGroup['DocumentLine'], $Year);46 $BillCode = ModuleDocument::Cast($this->System->GetModule('Document'))->GetNextDocumentLineNumberId($FinanceGroup['DocumentLine'], $Year); 47 47 $this->Database->insert('FinanceOperation', array('Subject' => $DbRow2['Id'], 'Cash' => 0, 48 48 'ValueUser' => Abs($DbRow['Value']), 'Value' => 0, 'Taxable' => 1, 'BankAccount' => $DbRow['BankAccount'], 'Network' => 1, … … 171 171 { 172 172 $Year = date('Y', $Time); 173 $BillCode = Module Finance::Cast($this->System->GetModule('Finance'))->Finance->GetNextDocumentLineNumberId(173 $BillCode = ModuleDocument::Cast($this->System->GetModule('Document'))->GetNextDocumentLineNumberId( 174 174 $Group['DocumentLine'], $Year); 175 175 $this->Database->insert('FinanceOperation', array('Text' => $Text, -
trunk/Modules/FinanceBankAPI/FinanceBankAPI.php
r899 r901 37 37 $this->License = 'GNU/GPLv3'; 38 38 $this->Description = 'Communication through API to various banks, manual file import'; 39 $this->Dependencies = array(ModuleFinance::GetName(), ModuleScheduler::GetName(), ModuleIS::GetName()); 39 $this->Dependencies = array(ModuleFinance::GetName(), ModuleScheduler::GetName(), ModuleIS::GetName(), 40 ModuleDocument::GetName()); 40 41 $this->Models = array(FinanceBankImport::GetClassName()); 41 42 } -
trunk/Modules/OpeningHours/OpeningHours.php
r899 r901 43 43 if (ModuleUser::Cast($this->System->GetModule('User'))->User->CheckPermission('OpeningHours', 'Edit')) 44 44 { 45 $Output = '<div class="Cent red">';45 $Output = '<div class="Centered">'; 46 46 $DbResult = $this->Database->select('Subject', 'Name', 'Id='.$Id); 47 47 $DbRow = $DbResult->fetch_assoc(); … … 119 119 function ShowAll(): string 120 120 { 121 $Output = '<div class="Centred">'; 122 $DbResult = $this->Database->query('SELECT SubjectOpenTime.*, DATE_FORMAT(SubjectOpenTime.UpdateTime, "%e.%c.%Y") as UpdateTime, Subject.Id, Subject.Name as Name FROM SubjectOpenTime JOIN Subject ON Subject.Id = SubjectOpenTime.Subject ORDER BY Name'); 121 $Output = '<div class="Centered">'; 122 $DbResult = $this->Database->query('SELECT SubjectOpenTime.*, DATE_FORMAT(SubjectOpenTime.UpdateTime, "%e.%c.%Y") as UpdateTime, '. 123 'Subject.Id, Subject.Name as Name FROM SubjectOpenTime '. 124 'JOIN Subject ON Subject.Id = SubjectOpenTime.Subject ORDER BY Name'); 123 125 while ($Subject = $DbResult->fetch_assoc()) 124 126 { … … 190 192 if ($Subject['Notice'] != '') $Output .= 'Poznámka: '.$Subject['Notice'].'<br />'; 191 193 192 if ($Subject['Photo'] != 0) $Output .= '<a href="file?i d='.$Subject['Photo'].'">Fotka</a> ';194 if ($Subject['Photo'] != 0) $Output .= '<a href="file?i='.$Subject['Photo'].'">Fotka</a> '; 193 195 194 196 if (ModuleUser::Cast($this->System->GetModule('User'))->User->CheckPermission('SubjectOpenTime', 'Edit')) -
trunk/Modules/Portal/Portal.php
r900 r901 165 165 if ($User->CheckPermission('Finance', 'DisplaySubjectState')) 166 166 $Output .= '<a href="'.$this->System->Link('/finance/platby/').'">Finance</a><br />'; 167 if ($User->CheckPermission('Customer', 'DisplayCustomerDocuments')) 168 $Output .= '<a href="'.$this->System->Link('/user/dokumenty/').'">Dokumenty</a><br />'; 167 169 if ($User->CheckPermission('Network', 'RegistredHostList')) 168 170 $Output .= '<a href="'.$this->System->Link('/network/user-hosts/').'">Počítače</a><br />'; -
trunk/Modules/Stock/Stock.php
r899 r901 11 11 $this->License = 'GNU/GPLv3'; 12 12 $this->Description = 'Stock and products'; 13 $this->Dependencies = array(ModuleUser::GetName(), ModuleCustomer::GetName(), ModuleNetwork::GetName()); 13 $this->Dependencies = array(ModuleUser::GetName(), ModuleCustomer::GetName(), ModuleNetwork::GetName(), 14 ModuleDocument::GetName()); 14 15 $this->Models = array(Product::GetClassName(), StockSerialNumber::GetClassName(), Stock::GetClassName(), 15 16 StockMoveGroup::GetClassName(), StockMove::GetClassName(), StockMoveItem::GetClassName(), … … 255 256 else $Year = date("Y", $Form->Values['ValidFrom']); 256 257 $Group = $Finance->GetFinanceGroupById($Form->Values['Group'], 'StockMoveGroup'); 257 $Form->Values['BillCode'] = $Finance->GetNextDocumentLineNumberId($Group['DocumentLine'], $Year);258 $Form->Values['BillCode'] = ModuleDocument::Cast($this->System->GetModule('Document'))->GetNextDocumentLineNumberId($Group['DocumentLine'], $Year); 258 259 return $Form->Values; 259 260 } -
trunk/Modules/Subject/Subject.php
r899 r901 43 43 'WHERE `FinanceInvoice`.`Subject`=#Id), 0))'), 44 44 'BankAccounts' => array('Type' => 'TFinanceBankAccountListSubject', 'Caption' => 'Bankovní účty', 'Default' => ''), 45 'Contracts' => array('Type' => 'TContractListSubject', 'Caption' => 'Smlouvy', 'Default' => ''), 45 46 ), 46 47 )); … … 48 49 'Type' => 'ManyToOne', 49 50 'Table' => 'FinanceBankAccount', 51 'Id' => 'Id', 52 'Ref' => 'Subject', 53 'Filter' => '1', 54 )); 55 $this->System->FormManager->RegisterFormType('TContractListSubject', array( 56 'Type' => 'ManyToOne', 57 'Table' => 'Contract', 50 58 'Id' => 'Id', 51 59 'Ref' => 'Subject', -
trunk/Modules/User/UserPage.php
r895 r901 73 73 } else $Actions .= call_user_func($Action).'<br/>'; 74 74 } 75 $Output .= '<div class="Cent red"><table id="MainTable"><tr><td style="vertical-align:top;">';75 $Output .= '<div class="Centered"><table id="MainTable"><tr><td style="vertical-align:top;">'; 76 76 $Output .= $this->Panel('Nabídka uživatele', $Actions); 77 77 $Output .= '</td><td style="vertical-align:top;">'; … … 106 106 $Form->OnSubmit = '?Action=Login'; 107 107 $Output .= $Form->ShowEditForm(); 108 $Output .= '<div class="Cent red"><a href="?Action=UserRegister">Registrovat se</a> '.108 $Output .= '<div class="Centered"><a href="?Action=UserRegister">Registrovat se</a> '. 109 109 '<a href="?Action=PasswordRecovery">Obnova zapomenutého hesla</a></div>'; 110 110 } else … … 125 125 $Form->Values['Password'] = ''; 126 126 $Output .= $Form->ShowEditForm(); 127 $Output .= '<div class="Cent red"><a href="?Action=UserRegister">Registrovat se</a> '.127 $Output .= '<div class="Centered"><a href="?Action=UserRegister">Registrovat se</a> '. 128 128 '<a href="?Action=PasswordRecovery">Obnova zapomenutého hesla</a></div>'; 129 129 } else { 130 //$Output .= '<div class="Cent red">Za 5 sekund budete přesměrováni na <a href="?Action=UserMenu">nabídku uživatele</a></div>';130 //$Output .= '<div class="Centered">Za 5 sekund budete přesměrováni na <a href="?Action=UserMenu">nabídku uživatele</a></div>'; 131 131 //Header('refresh:5;url=?Action=UserMenu'); 132 132 Header('Location: ?Action=UserMenu'); -
trunk/Packages/Common/Common.php
r899 r901 27 27 include_once(dirname(__FILE__).'/BigInt.php'); 28 28 include_once(dirname(__FILE__).'/Int128.php'); 29 include_once(dirname(__FILE__).'/Pdf.php'); 29 30 include_once(dirname(__FILE__).'/Modules/Setup.php'); 30 31 include_once(dirname(__FILE__).'/Modules/ModuleManager.php'); -
trunk/Packages/Common/Database.php
r900 r901 49 49 { 50 50 $this->Prefix = ''; 51 $this->Functions = array('NOW( )', 'CURDATE()', 'CURTIME()', 'UUID()');51 $this->Functions = array('NOW(', 'CURDATE(', 'CURTIME(', 'UUID(', 'SHA1('); 52 52 $this->Type = 'mysql'; // mysql, pgsql 53 53 $this->Error = ''; … … 141 141 } 142 142 143 function IsFunction(string $Text): bool 144 { 145 $Pos = strpos($Text, '('); 146 return ($Pos !== false) && in_array(substr($Text, 0, $Pos + 1), $this->Functions); 147 } 148 143 149 function GetInsert(string $Table, array $Data): string 144 150 { … … 148 154 { 149 155 $Name .= ',`'.$Key.'`'; 150 if (!in_array($Value, $this->Functions)) 156 if (is_null($Value)) $Value = 'NULL'; 157 else if (!$this->IsFunction($Value)) 151 158 { 152 if (is_null($Value)) $Value = 'NULL'; 153 else $Value = $this->PDO->quote($Value); 159 $Value = $this->PDO->quote($Value); 154 160 } 155 161 $Values .= ','.$Value; … … 170 176 foreach ($Data as $Key => $Value) 171 177 { 172 if (!in_array($Value, $this->Functions)) 178 if (is_null($Value)) $Value = 'NULL'; 179 else if (!$this->IsFunction($Value)) 173 180 { 174 if (is_null($Value)) $Value = 'NULL'; 175 else $Value = $this->PDO->quote($Value); 181 $Value = $this->PDO->quote($Value); 176 182 } 177 183 $Values .= ', `'.$Key.'`='.$Value; … … 187 193 foreach ($Data as $Key => $Value) 188 194 { 189 if (!in_array($Value, $this->Functions)) 195 if (is_null($Value)) $Value = 'NULL'; 196 else if (!$this->IsFunction($Value)) 190 197 { 191 if (is_null($Value)) $Value = 'NULL'; 192 else $Value = $this->PDO->quote($Value); 198 $Value = $this->PDO->quote($Value); 193 199 } 194 200 $Name .= ',`'.$Key.'`'; -
trunk/Packages/Common/Modules/Setup.php
r900 r901 194 194 { 195 195 $Output .= '<h3>Odinstalace vše</h3>'; 196 $this->System->ModuleManager->UninstallAll(array(ModuleCondition:: System));196 $this->System->ModuleManager->UninstallAll(array(ModuleCondition::All)); 197 197 $this->Database->query('DROP TABLE IF EXISTS `'.$this->UpdateManager->VersionTable.'`'); 198 198 $Output .= $this->ControlPanel(); -
trunk/style/new/style.css
r843 r901 7 7 .ActionMenu 8 8 { 9 text-align: center; 10 list-style: none; 9 text-align: center; 10 list-style: none; 11 11 margin: 0px 0px 0px 0px; 12 12 padding: 0px 0px 0px 0px; … … 14 14 15 15 .ActionMenu li 16 { 17 display: inline; 16 { 17 display: inline; 18 18 padding-left: 4px; 19 19 padding-right: 4px; … … 57 57 #Footer 58 58 { 59 border-style: solid; 60 border-top-color: gray; 61 border-width: 1px 0 0 0; 62 margin-top: 7px; 59 border-style: solid; 60 border-top-color: gray; 61 border-width: 1px 0 0 0; 62 margin-top: 7px; 63 63 padding-top: 2px; 64 64 font-size: 10px; … … 68 68 .Navigation 69 69 { 70 border-style: solid; 71 border-bottom-color: gray; 72 border-width: 0 0 1px 0; 73 margin-bottom: 3px; 70 border-style: solid; 71 border-bottom-color: gray; 72 border-width: 0 0 1px 0; 73 margin-bottom: 3px; 74 74 padding-bottom: 2px; 75 75 } … … 85 85 .MainTitle 86 86 { 87 padding: 3px; 88 font-size: 20px; 89 border-style: solid; 90 border-color: blue; 91 border-width: 1px; 92 background-color: #F0F0FF; 87 padding: 3px; 88 font-size: 20px; 89 border-style: solid; 90 border-color: blue; 91 border-width: 1px; 92 background-color: #F0F0FF; 93 93 margin-bottom: 4px; 94 94 } … … 97 97 { 98 98 margin: 2px 0px 2px 0px; 99 padding: 2px 2px 2px 2px; 100 font-size: small; 101 border-style: solid; 102 border-color: red; 99 padding: 2px 2px 2px 2px; 100 font-size: small; 101 border-style: solid; 102 border-color: red; 103 103 border-width: 0px; 104 104 background-color: #FFF0F0; 105 105 width: 100%; 106 border-collapse: collapse; 106 border-collapse: collapse; 107 107 } 108 108 … … 122 122 { 123 123 margin: 2px 2px 2px 2px; 124 display: none; 125 border-width: 1px; 126 border-style: solid; 127 border-color: silver; 124 display: none; 125 border-width: 1px; 126 border-style: solid; 127 border-color: silver; 128 128 background-color: white; 129 padding: 3px; 129 padding: 3px; 130 130 font-size: 9pt; 131 131 } … … 135 135 width: 100%; 136 136 border-width: 0px; 137 font-size: small; 137 font-size: small; 138 138 padding-bottom: 5px; 139 139 margin-bottom: 5px; … … 147 147 } 148 148 149 .NewsItemFrame 149 .NewsItemFrame 150 150 { 151 151 border-collapse: collapse; 152 padding: 0px; 153 margin: 2px 2px 2px 2px; 154 font-size: small; 152 padding: 0px; 153 margin: 2px 2px 2px 2px; 154 font-size: small; 155 155 color: red; 156 156 width: 100%; … … 159 159 .RSSIcon 160 160 { 161 margin: 0px 0px 0px 0px; 161 margin: 0px 0px 0px 0px; 162 162 border-width: 0px; 163 163 } … … 188 188 border-left: 0; 189 189 border-right: 0; 190 color: white; 190 color: white; 191 191 font-size: small; 192 font-weight: bold; 192 font-weight: bold; 193 193 margin: 0; 194 194 padding: 5px; 195 195 } 196 196 197 .SystemMessage div 197 .SystemMessage div 198 198 { 199 199 background: transparent; … … 204 204 } 205 205 206 .Cent red206 .Centered 207 207 { 208 208 text-align: center; … … 241 241 .ChatHistory .Year 242 242 { 243 border-style: solid; 244 border-bottom-color: gray; 245 border-width: 0px 0px 1px 0px; 246 margin-bottom: 3px; 243 border-style: solid; 244 border-bottom-color: gray; 245 border-width: 0px 0px 1px 0px; 246 margin-bottom: 3px; 247 247 padding-bottom: 2px; 248 248 } … … 250 250 .ChatHistory .Year .YearContent 251 251 { 252 margin-left: 15px; 252 margin-left: 15px; 253 253 margin-right: 15px; 254 254 } … … 256 256 .ChatHistory .Year .YearContent .Months 257 257 { 258 border-style: solid; 259 border-bottom-color: gray; 260 border-width: 0px 0px 1px 0px; 261 margin-bottom: 3px; 258 border-style: solid; 259 border-bottom-color: gray; 260 border-width: 0px 0px 1px 0px; 261 margin-bottom: 3px; 262 262 padding-bottom: 2px; 263 263 } … … 265 265 .ChatHistory .Year .YearContent .Months span 266 266 { 267 position: absolute; 267 position: absolute; 268 268 left: 100px; 269 269 } … … 271 271 .ChatHistory .YearContent .Months span strong 272 272 { 273 border-style: solid; 274 border-width: 1px; 275 border-color: black; 273 border-style: solid; 274 border-width: 1px; 275 border-color: black; 276 276 padding-left: 3px; 277 277 } … … 291 291 text-align: center; 292 292 margin-left: auto; 293 margin-right: auto; 293 margin-right: auto; 294 294 } 295 295 … … 322 322 background-color: #fff; 323 323 } 324 324 325 325 .Panel .Title 326 326 { … … 331 331 color: #666; 332 332 text-align: left; 333 text-transform: uppercase; 333 text-transform: uppercase; 334 334 border-bottom: 1px solid #CCC; 335 335 } 336 336 337 337 .Panel .Content 338 338 { … … 343 343 padding: 7px; 344 344 } 345 345 346 346 .Panel .Title .Action 347 347 { … … 366 366 background-color: #FFF; 367 367 } 368 368 369 369 .NewsPanel .Title 370 370 { … … 375 375 color: #a44; 376 376 text-align: left; 377 text-transform: uppercase; 377 text-transform: uppercase; 378 378 border-bottom: 1px solid #d99; 379 379 } 380 380 381 381 .NewsPanel .Content 382 382 { … … 387 387 padding: 0px; 388 388 } 389 389 390 390 .NewsPanel .Title .Action 391 391 { … … 403 403 .NewsPanel .Title .Action A:link 404 404 { 405 color: #c00; 405 color: #c00; 406 406 } 407 407 408 408 .NewsPanel .Title .Action A:visited 409 409 { 410 color: #600; 410 color: #600; 411 411 } 412 412 … … 473 473 } 474 474 475 .Tab ul 475 .Tab ul 476 476 { 477 477 list-style: none; … … 479 479 margin: 0; 480 480 } 481 482 .Tab li 481 482 .Tab li 483 483 { 484 484 float: left; … … 487 487 margin: 0; 488 488 } 489 490 .Tab a 489 490 .Tab a 491 491 { 492 492 text-decoration: none; … … 496 496 text-align: center; 497 497 } 498 499 .Tab a:hover 498 499 .Tab a:hover 500 500 { 501 501 background: #fdd; 502 502 } 503 504 .Tab #selected 503 504 .Tab #selected 505 505 { 506 506 border-color: black; 507 507 } 508 509 .Tab #selected a 508 509 .Tab #selected a 510 510 { 511 511 position: relative; -
trunk/style/simple/style.css
r251 r901 71 71 #Footer 72 72 { 73 border-style: solid; 74 border-top-color: gray; 75 border-width: 1px 0 0 0; 76 margin-top: 7px; 73 border-style: solid; 74 border-top-color: gray; 75 border-width: 1px 0 0 0; 76 margin-top: 7px; 77 77 padding-top: 2px; 78 78 font-size: 10px; … … 82 82 .Navigation 83 83 { 84 border-style: solid; 85 border-bottom-color: gray; 86 border-width: 0 0 1px 0; 87 margin-bottom: 3px; 84 border-style: solid; 85 border-bottom-color: gray; 86 border-width: 0 0 1px 0; 87 margin-bottom: 3px; 88 88 padding-bottom: 2px; 89 89 } … … 99 99 #Title 100 100 { 101 padding: 3px; 102 font-size: 20px; 103 border-style: solid; 104 border-color: blue; 105 border-width: 1px; 106 background-color: #F0F0FF; 101 padding: 3px; 102 font-size: 20px; 103 border-style: solid; 104 border-color: blue; 105 border-width: 1px; 106 background-color: #F0F0FF; 107 107 margin-bottom: 4px; 108 108 } … … 111 111 { 112 112 margin: 2px 0px 2px 0px; 113 padding: 2px 2px 2px 2px; 114 font-size: small; 115 border-style: solid; 116 border-color: red; 113 padding: 2px 2px 2px 2px; 114 font-size: small; 115 border-style: solid; 116 border-color: red; 117 117 border-width: 1px; 118 118 background-color: #FFF0F0; 119 119 width: 100%; 120 border-collapse: collapse; 120 border-collapse: collapse; 121 121 } 122 122 … … 136 136 { 137 137 margin: 2px 2px 2px 2px; 138 display: none; 139 border-width: 1px; 140 border-style: solid; 141 border-color: blue; 142 padding: 3px; 138 display: none; 139 border-width: 1px; 140 border-style: solid; 141 border-color: blue; 142 padding: 3px; 143 143 font-size: 9pt; 144 144 } … … 153 153 width: 100%; 154 154 border-width: 0px; 155 font-size: small; 155 font-size: small; 156 156 padding-bottom: 5px; 157 157 margin-bottom: 5px; … … 165 165 } 166 166 167 .NewsItemFrame 167 .NewsItemFrame 168 168 { 169 169 border-collapse: collapse; 170 padding: 0px; 171 margin: 2px 2px 2px 2px; 172 font-size: small; 170 padding: 0px; 171 margin: 2px 2px 2px 2px; 172 font-size: small; 173 173 color: red; 174 174 width: 100%; … … 177 177 .RSSIcon 178 178 { 179 margin: 0px 0px 0px 0px; 179 margin: 0px 0px 0px 0px; 180 180 border-width: 0px; 181 181 } … … 206 206 border-left: 0; 207 207 border-right: 0; 208 color: white; 209 font-size: small; 210 font-weight: bold; 208 color: white; 209 font-size: small; 210 font-weight: bold; 211 211 margin: 0; 212 212 padding: 5px; 213 213 } 214 214 215 .SystemMessage div 215 .SystemMessage div 216 216 { 217 217 background: transparent; … … 222 222 } 223 223 224 .Cent red224 .Centered 225 225 { 226 226 text-align: center; … … 259 259 .ChatHistory .Year 260 260 { 261 border-style: solid; 262 border-bottom-color: gray; 263 border-width: 0px 0px 1px 0px; 264 margin-bottom: 3px; 261 border-style: solid; 262 border-bottom-color: gray; 263 border-width: 0px 0px 1px 0px; 264 margin-bottom: 3px; 265 265 padding-bottom: 2px; 266 266 } … … 268 268 .ChatHistory .Year .YearContent 269 269 { 270 margin-left: 15px; 270 margin-left: 15px; 271 271 margin-right: 15px; 272 272 } … … 274 274 .ChatHistory .Year .YearContent .Months 275 275 { 276 border-style: solid; 277 border-bottom-color: gray; 278 border-width: 0px 0px 1px 0px; 279 margin-bottom: 3px; 276 border-style: solid; 277 border-bottom-color: gray; 278 border-width: 0px 0px 1px 0px; 279 margin-bottom: 3px; 280 280 padding-bottom: 2px; 281 281 } … … 283 283 .ChatHistory .Year .YearContent .Months span 284 284 { 285 position: absolute; 285 position: absolute; 286 286 left: 100px; 287 287 } … … 289 289 .ChatHistory .YearContent .Months span strong 290 290 { 291 border-style: solid; 292 border-width: 1px; 293 border-color: black; 291 border-style: solid; 292 border-width: 1px; 293 border-color: black; 294 294 padding-left: 3px; 295 295 } … … 309 309 text-align: center; 310 310 margin-left: auto; 311 margin-right: auto; 311 margin-right: auto; 312 312 } 313 313
Note:
See TracChangeset
for help on using the changeset viewer.