Changeset 208 for quests


Ignore:
Timestamp:
Jan 11, 2008, 10:12:28 PM (17 years ago)
Author:
maron
Message:

Vyhledávání, oprava Q pro moderátory

Location:
quests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • quests/action.php

    r204 r208  
    3737    } else echo 'Ji¾ jste hlasoval!';
    3838  }
    39          
     39
     40  if (array_key_exists('search', $_GET)) {
     41    $Search = $_GET['search'];
     42 
     43 
     44  $sql = "SELECT *
     45FROM `quests`.`quests`
     46WHERE `ID` LIKE '%$Search%'
     47OR `entry` LIKE '%$Search%'
     48OR `Title` LIKE CONVERT( _utf8 '%$Search%'
     49USING latin2 )
     50COLLATE latin2_czech_cs
     51OR `Details` LIKE CONVERT( _utf8 '%$Search%'
     52USING latin2 )
     53COLLATE latin2_czech_cs
     54OR `Objectives` LIKE CONVERT( _utf8 '%$Search%'
     55USING latin2 )
     56COLLATE latin2_czech_cs
     57OR `OfferRewardText` LIKE CONVERT( _utf8 '%$Search%'
     58USING latin2 )
     59COLLATE latin2_czech_cs
     60OR `RequestItemsText` LIKE CONVERT( _utf8 '%$Search%'
     61USING latin2 )
     62COLLATE latin2_czech_cs
     63OR `EndText` LIKE CONVERT( _utf8 '%$Search%'
     64USING latin2 )
     65COLLATE latin2_czech_cs
     66OR `ObjectiveText1` LIKE CONVERT( _utf8 '%$Search%'
     67USING latin2 )
     68COLLATE latin2_czech_cs
     69OR `ObjectiveText2` LIKE CONVERT( _utf8 '%$Search%'
     70USING latin2 )
     71COLLATE latin2_czech_cs
     72OR `ObjectiveText3` LIKE CONVERT( _utf8 '%$Search%'
     73USING latin2 )
     74COLLATE latin2_czech_cs
     75OR `ObjectiveText4` LIKE CONVERT( _utf8 '%$Search%'
     76USING latin2 )
     77COLLATE latin2_czech_cs
     78OR `Language` LIKE '%$Search%'
     79OR `Vote` LIKE '%$Search%'
     80OR `User` LIKE '%$Search%'
     81OR `complete` LIKE '%$Search%'";
     82
     83 
     84        echo '<table border="1" cellpadding="2" cellspacing="0">
     85              <tr><th>Poøadové èíslo</th><th>ID questu</th><th>Název Questu</th><th>Poèet hlasù</th></tr>';
     86        $ID = $Database->SQLCommand($sql);
     87          while ($Line = mysql_fetch_array($ID)) {
     88            echo '<tr><td><a href="form.php?ID='.$Line['ID'].'">'.$Line['ID'].'</a></td>
     89            <td>'.$Line['entry'].'</td>
     90            <td>'.$Line['Title'].'</td>
     91            <td>'.$Line['Vote'].'</td></tr>';
     92          }
     93        echo '</table>'; 
     94 
     95 
     96 
     97  }       
    4098  ShowFooter();     
    4199?>
  • quests/form.php

    r204 r208  
    3939        <input type="text" name="vote" value="4" size="2">
    4040        <input type="hidden" name="ID" value="'.$QuestID.'">
    41         <input type="submit" value="Hlasovat">
     41        <input type="submit" value="Hlasovat" Title="Hlasovat libovalný poèet hlasù (jenom pro GM)">
    4242        '; 
    4343       
    4444        echo '<input type="hidden" name="UserRepair" value="'.$Line['User'].'">';
    45         echo '<a style="color: Red" title="smazat" href="action.php?delete=1&amp;ID='.$QuestID.'">x</a> 
    46         <a style="color: Red" title="Není hotovo" href="action.php?NotComplete=1&amp;ID='.$QuestID.'"><-</a>
     45        echo '<a style="color: Red" title="smazat (jenom pro GM)" href="action.php?delete=1&amp;ID='.$QuestID.'">x</a> 
     46        <a style="color: Red" title="Není hotovo (jenom pro GM)" href="action.php?NotComplete=1&amp;ID='.$QuestID.'"><-</a>
    4747       
    4848        '; 
     
    5454    <input type="submit" value="Ulo¾it do rozepsaných" name="save" Title="Kliknìte na ulo¾it pro pozdìj¹í dokonèení Q">
    5555    <input type="submit" value="Dokonèeno" name="End" Title="Kliknìte na Dokonèeno jesli jsou v¹echny texty hotové a chcete ji¾ publikovat">
     56<?php
     57  if (Licence(1)) {
     58    echo '<input type="submit" value="Opravit" name="Repair" Title="Opravit po u¾ivateli chyby (jenom pro GM)">'; 
     59  }
     60?>
    5661    $B - Odøádkování, $N - Jméno, $C - povolání
    5762    <input type="hidden" name="entry" value="<?php echo $LineAJ['entry']?>">
  • quests/includes/global.php

    r207 r208  
    101101      <a href="http://wow.zdechov.net/forum/viewforum.php?f=22">Forum projektu</a><br />
    102102      <a href="http://wow.zdechov.net/">Web serveru</a><br /><br />
     103     
     104<form action="action.php" method="get">
     105<input type="text" name="search" size="13"><br>
     106<input type="submit" value="Hledat">
     107</form>
    103108      ';
    104109     
     
    111116  <table>
    112117    <tr>
    113       <td><input type="text" name="LoginUser"></td>
     118      <td><input type="text" name="LoginUser" size="13"></td>
    114119    </tr>
    115120    <tr>
    116       <td><input type="password" name="LoginPass"></td>
     121      <td><input type="password" name="LoginPass" size="13"></td>
    117122    </tr>
    118123    <tr>
     
    146151
    147152?>
    148 
  • quests/save.php

    r204 r208  
    2424    else
    2525      $complete = 0;
     26   
     27    $Line = mysql_fetch_array($Database->SQLCommand("SELECT user FROM quests Where ID = '$QuestID'"));
     28    if (array_key_exists('Repair', $_POST))
     29      $UserID = $Line['user'];
    2630     
    2731     
Note: See TracChangeset for help on using the changeset viewer.