Changeset 370
- Timestamp:
- Jan 19, 2012, 12:30:58 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 7 added
- 1 deleted
- 6 edited
- 12 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Forms.php
r360 r370 1 1 <?php 2 3 include_once('form_classes.php');4 include_once('Common/Database.php');5 2 6 3 class Form -
trunk/Common/Model.php
r364 r370 22 22 define('PropertyDouble', 'Double'); 23 23 define('PropertyOneToMany', 'OneToMany'); 24 define('PropertyManyToOne', 'ManyToOne');25 24 define('PropertyManyToMany', 'ManyToMany'); 26 25 … … 138 137 $this->Properties[] = array('Name' => $Name, 'Type' => PropertyBoolean); 139 138 } 140 141 function AddPropertyManyToOne($Name, $TargetModel, $TargetColumn) 142 { 143 $this->Properties[] = array('Name' => $Name, 'Type' => PropertyManyToOne, 144 'TargetModel' => $TargetModel, 'TargetColumn' => $TargetColumn); 145 } 146 139 147 140 function AddPropertyManyToMany($TargetModel, $Relation, $ColumOwn, $ColumnTarget) 148 141 { … … 177 170 $Query .= '`'.$Property['Name'].'` INT(255) NOT NULL,'. 178 171 'KEY `'.$Property['Name'].'` (`'.$Property['Name'].'`),'; 179 else if($Property['Type'] == PropertyManyToOne)180 $Query .= '';181 172 else if($Property['Type'] == PropertyManyToMany) ; 182 173 // Create many-to-many table -
trunk/Modules/Finance/Finance.php
r367 r370 2 2 3 3 include_once('FinanceOverview.php'); 4 include_once(' tarify.php');5 include_once(' zarizeni.php');6 include_once(' spotreba.php');7 include_once(' inventory.php');8 include_once(' clenove.php');9 include_once(' monthly_overall.php');10 include_once(' manage.php');11 include_once(' user_state.php');12 include_once(' import.php');13 include_once(' zivnost.php');4 include_once('Tarify.php'); 5 include_once('Zarizeni.php'); 6 include_once('Spotreba.php'); 7 include_once('Inventory.php'); 8 include_once('Clenove.php'); 9 include_once('MonthlyOverall.php'); 10 include_once('Manage.php'); 11 include_once('UserState.php'); 12 include_once('Import.php'); 13 include_once('Zivnost.php'); 14 14 15 15 class FinancePage extends Page … … 163 163 $this->AddPropertyFloat('Price'); 164 164 $this->AddPropertyFloat('Quantity'); 165 } 166 } 167 168 class FinanceOperationView extends View 169 { 170 function __construct() 171 { 172 $this->Name = 'FinanceOperation'; 173 $this->Title = 'Platba'; 174 $this->AddItemOneToMany('DocumentLine', 'Dokladová řada', 'DocumentLine', 3); 175 $this->AddItemTime('Time', 'Čas', 'Now'); 176 $this->AddItemOneToMany('Subject', 'Subjekt', 'Subject', 0); 177 $this->AddItemFloat('Value', 'Částka [Kč]', 0); 178 $this->AddItemString('Text', 'Popis', 'Vklad'); 179 $this->AddItemBoolean('Cash', 'Hotovost', 0); 180 $this->AddItemBoolean('Taxable', 'Ovlivňující daňový základ', 1); 181 $this->AddManyToOne('FinanceOperation', 'Položky'); 182 } 183 } 184 185 class FinanceClaimsLiabilitiesView extends View 186 { 187 function __construct() 188 { 189 $this->Name = 'FinanceClaimsLiabilities'; 190 $this->Title = 'Faktura'; 191 $this->AddItemOneToMany('DocumentLine', 'Dokladová řada', 'DocumentLine', 3); 192 $this->AddItemTime('TimeCreation', 'Čas vytvoření', 'Now'); 193 $this->AddItemTime('TimeDue', 'Čas splatnosti', 'Now'); 194 $this->AddItemOneToMany('Subject', 'Subjekt', 'Subject', 0); 195 $this->AddItemString('Text', 'Popis', 'Nákup zařízení'); 196 $this->AddItemFloat('Value', 'Částka [Kč]', 0); 197 $this->AddManyToOne('FinanceClaimsLiabilitiesItems', 'Položky'); 165 198 } 166 199 } … … 206 239 'FinanceTariff', 'FinanceOperation', 'FinanceClaimsLiabilities', 207 240 'FinanceBills', 'FinanceBillsItems'); 241 $this->Views = array('FinanceOperation', 'FinanceClaimsLiabilities'); 208 242 } 209 243 -
trunk/Modules/Network/Network.php
r366 r370 153 153 } 154 154 155 class EmailView extends View 156 { 157 function __construct() 158 { 159 $this->Name = 'NewEmail'; 160 $this->Title = 'Nový email'; 161 $this->SubmitText = 'Odeslat'; 162 AddItemString('Address', 'Adresa', ''); 163 AddItemString('Subject', 'Předmět', ''); 164 AddItemText('Content', 'Obsah', ''); 165 } 166 } 167 168 /*class NetworkDeviceView extends View 169 { 170 function __construct() 171 { 172 $this->Name = 'NetworkDevice'; 173 $ 174 'NewNetworkDevice' => array( 175 'Title' => 'Vložit nové zařízení', 176 'Table' => 'network_devices', 177 'Items' => array( 178 'name' => array('Type' => 'String', 'Caption' => 'Název', 'Default' => ''), 179 'price' => array('Type' => 'Float', 'Caption' => 'Cena', 'Default' => 0), 180 'count' => array('Type' => 'Integer', 'Caption' => 'Počet', 'Default' => 1), 181 'date' => array('Type' => 'Time', 'Caption' => 'Datum zakoupení', 'Default' => 'Now'), 182 'segment' => array('Type' => 'TNetworkSegment', 'Caption' => 'Segment sítě', 'Default' => 0), 183 'date' => array('Type' => 'Time', 'Caption' => 'Datum zakoupení', 'Default' => 'Now'), 184 'used' => array('Type' => 'TNetworkDeviceState', 'Caption' => 'Stav', 'Default' => 0), 185 'consumption' => array('Type' => 'Integer', 'Caption' => 'Spotřeba', 'Default' => 0), 186 'user' => array('Type' => 'TFinanceSubject', 'Caption' => 'Subjekt', 'Default' => 0), 187 'info' => array('Type' => 'String', 'Caption' => 'Poznámky', 'Default' => ''), 188 'shop' => array('Type' => 'String', 'Caption' => 'Obchod', 'Default' => ''), 189 'device_id' => array('Type' => 'String', 'Caption' => 'Sériové číslo', 'Default' => ''), 190 } 191 } 192 193 $FormClasses = array( 194 'NewNetworkDeviceHistory' => array( 195 'Title' => 'Vložit záznam historie zařízení', 196 'Table' => 'NetworkDeviceHistory', 197 'Items' => array( 198 'Device' => array('Type' => 'TNetworkDevice', 'Caption' => 'Zařízení', 'Default' => 0), 199 'Time' => array('Type' => 'Time', 'Caption' => 'Čas', 'Default' => 'Now'), 200 'Action' => array('Type' => 'TNetworkDeviceAction', 'Caption' => 'Akce', 'Default' => 0), 201 'Notice' => array('Type' => 'String', 'Caption' => 'Poznámka', 'Default' => ''), 202 ), 203 ), 204 ); 205 206 207 */ 208 209 155 210 class ModuleNetwork extends Module 156 211 { -
trunk/Modules/News/News.php
r358 r370 70 70 } 71 71 72 class NewsView extends View 73 { 74 function __construct() 75 { 76 $this->Name = 'News'; 77 $this->Title = 'Nová aktualita'; 78 $this->SubmitText = 'Vložit'; 79 AddItemOneToMany('Category', 'Kategorie', 'NewsGroup', '0'); 80 AddItemString('Title', 'Nadpis', ''); 81 AddItemText('Content', 'Obsah', ''); 82 AddItemFileName('Enclosure1', 'Přílohy (Max. velikost souboru 1 MB)', ''); 83 AddItemFileName('Enclosure2', '', ''); 84 AddItemFileName('Enclosure3', '', ''); 85 } 86 } 87 72 88 class ModuleNews extends Module 73 89 { … … 85 101 $this->Dependencies = array('User', 'Log'); 86 102 $this->Models = array('News', 'NewsCategory'); 103 $this->Views = array('News'); 87 104 } 88 105 -
trunk/Modules/User/User.php
r367 r370 321 321 } 322 322 323 class UserOptionsView extends View 324 { 325 function __construct() 326 { 327 $this->Name = 'UserOptions'; 328 $this->Title = 'Nastavení uživatele'; 329 AddItemString('Login', 'Přihlašovací jméno', ''); 330 AddItemPassword('Password', 'Heslo', ''); 331 AddItemString('Name', 'Zobrazované jméno', ''); 332 AddItemString('Email', 'E-mail', ''); 333 AddItemString('PhoneNumber', 'Telefon', ''); 334 AddItemString('ICQ', 'ICQ', ''); 335 } 336 } 337 338 class UserRegisterView extends View 339 { 340 function __construct() 341 { 342 $this->Name = 'UserRegister'; 343 $this->Title = 'Registrace uživatele'; 344 $this->SubmitText = 'Registrovat'; 345 $this->ModelName = 'User'; 346 AddItemString('Login', 'Přihlašovací jméno', ''); 347 AddItemPassword('Password', 'Heslo', ''); 348 AddItemPassword('Password2', 'Potvrzení hesla', ''); 349 AddItemString('Name', 'Zobrazované jméno', ''); 350 AddItemString('Email', 'E-mail', ''); 351 AddItemString('PhoneNumber', 'Telefon', ''); 352 AddItemString('ICQ', 'ICQ', ''); 353 } 354 } 355 356 class PasswordRecoveryView extends View 357 { 358 function __construct() 359 { 360 $this->Name = 'PasswordRecovery'; 361 $this->Title = 'Obnova hesla'; 362 $this->SubmitText = 'Obnovit'; 363 AddItemString('Name', 'Přihlašovací jméno', ''); 364 AddItemString('Email', 'E-mail', ''); 365 } 366 } 367 368 class UserLoginView extends View 369 { 370 function __construct() 371 { 372 $this->Name = 'UserLogin'; 373 $this->Title = 'Přihlášení uživatele'; 374 $this->SubmitText = 'Přihlásit'; 375 AddItemString('Username', 'Přihlašovací jméno', ''); 376 AddItemPassword('Password', 'Heslo', ''); 377 } 378 } 379 323 380 class ModuleUser extends Module 324 381 { … … 333 390 $this->Dependencies = array(); 334 391 $this->Models = array('User', 'UserOnline'); 392 $this->Views = array('UserLogin', 'PasswordRecove', 'UserRegister', 'UserOptions'); 335 393 } 336 394
Note:
See TracChangeset
for help on using the changeset viewer.