- Timestamp:
- Mar 14, 2009, 2:46:47 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gh_system/admin.php
r450 r490 143 143 if($pocet2!=0): 144 144 echo"<p align=center><br><br> 145 <font size=5 color=red><B>Guildy, které by mìly zaplatit dalí splátku:</B></font><BR> 146 <table align=center valign=middle>"; 145 <font size=5 color=red><B>Guildy, které by mìly zaplatit dalí splátku:</B></font><BR>"; 146 if($pocet2>=2): ?> 147 <br><button OnClick="window.location.href='admin.php?heslo=<? echo"$admin"; ?>&q=5';">Odebrat splátku u vech</button><br><br> 148 149 <? 150 endif; 151 152 echo"<table align=center valign=middle>"; 147 153 148 154 … … 355 361 endif; 356 362 363 } elseif($q==5) { 364 365 mysql_connect($SQL_Server, $SQL_Uzivatel, $SQL_Heslo); 366 mysql_select_db($Databaze); 367 mysql_query("SET NAMES 'utf8'"); 368 369 $info_platicu = mysql_query("SELECT * FROM guildy where dalsi_platba='".date("Y-m-d")."' OR dalsi_platba<'".date("Y-m-d")."'"); 370 371 372 while ($radek = mysql_fetch_array($info_platicu) ){ 373 $id2 = $radek['id']; 374 $jmeno = $radek['jmeno']; 375 $gum = $radek['GuM']; 376 $typgh = $radek['typgh']; 377 if($typgh==1): 378 $prachy_mesic = 40*10000; 379 elseif($typgh==2): 380 $prachy_mesic = 50*10000; 381 elseif($typgh==3): 382 $prachy_mesic = 70*10000; 383 elseif($typgh==4): 384 $prachy_mesic = 60*10000; 385 elseif($typgh==5): 386 $prachy_mesic = 80*10000; 387 elseif($typgh==6): 388 $prachy_mesic = 90*10000; 389 endif; 390 $dalsi_platba = $radek['dalsi_platba']; 391 392 mysql_select_db($Databaze_characters); 393 $guild_info = mysql_query("select * from guild where guildid=$id2"); 394 while ($zaznam = mysql_fetch_array($guild_info) ){ 395 $prachy_celkem = $zaznam['BankMoney']; 396 } 397 398 399 if($prachy_celkem-$prachy_mesic>=0): 400 401 $kolik_zbyde = $prachy_celkem-$prachy_mesic; 402 403 $odebrat_prachy = mysql_query("update guild set BankMoney=$kolik_zbyde where guildid=$id2"); 404 mysql_select_db($Databaze); 405 $upravit_datum_dalsi_platby = mysql_query("update guildy set dalsi_platba=date_add('$dalsi_platba', INTERVAL 7 day) where id=$id2"); 406 407 if($odebrat_prachy and $upravit_datum_dalsi_platby): 408 echo"<p align=center><font color=green><strong>Odebírání èastky u Guildy '$jmeno' probìhlo úspìnì</strong></font>"; 409 else: 410 echo"<p align=center><font color=red><strong>Pøi úpravì dat Guildy '$jmeno' v databázi dolo k chybì!</strong></font></font>"; 411 endif; 412 else: 413 echo"<p align=center><font color=red><strong>Guilda '$jmeno' nemá dostateèné finance pro zaplacení èástky!</strong></font></font>"; 414 endif; 415 357 416 } 358 359 360 361 endif; 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 417 ?> 418 <br><br><button OnClick="window.location.href='admin.php?heslo=<? echo"$admin"; ?>';"><-- Zpìt do administrace</button> 419 <? 420 } 421 422 423 424 endif; 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444
Note:
See TracChangeset
for help on using the changeset viewer.