Changeset 220 for quests/save.php


Ignore:
Timestamp:
Jan 13, 2008, 11:25:19 AM (17 years ago)
Author:
maron
Message:

Různé opravy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quests/save.php

    r218 r220  
    2525      $complete = 0;
    2626   
    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'];
    30      
     27    if ($complete = 1) $Database->SQLCommand("DELETE FROM `quests`.`quests_status` WHERE QuestEntry = '$entry'");
     28
     29    if (array_key_exists('Repair', $_POST) and Licence(1)) {
     30      $Line = mysql_fetch_array($Database->SQLCommand("SELECT user FROM quests Where ID = '$QuestID'"));
     31      $UserID = $Line['user'];   
     32    }
    3133     
    3234  /*  if (array_key_exists('Repair', $_POST)) {
     
    3840      die('Musite zadat název Q');
    3941   
    40     $Line = mysql_fetch_array($Database->SQLCommand("SELECT * FROM quests Where user='$UserID' AND entry = '$entry'"));
     42    $Line = mysql_fetch_array($Database->SQLCommand("SELECT * FROM quests WHERE user='$UserID' AND entry = '$entry'"));
    4143    if (!$Line) {
    4244   
     
    5153       OfferRewardText = '$OfferRewardText', RequestItemsText = '$RequestItemsText',
    5254       EndText = '$EndText', ObjectiveText1 = '$ObjectiveText1', ObjectiveText2 = '$ObjectiveText2',
    53        ObjectiveText3 = '$ObjectiveText3', ObjectiveText4 = '$ObjectiveText4', Language = '$Language'
    54         WHERE  user='$UserID' AND entry = '$entry' AND Language <> 0";
     55       ObjectiveText3 = '$ObjectiveText3', ObjectiveText4 = '$ObjectiveText4', Language = '$Language',
     56       Vote = '3', CountVote = '1'
     57        WHERE ID = ".$QuestID." AND Language <> 0";
    5558      $Database->SQLCommand($sql);
    5659    //  echo $sql.'<br />';     
    5760      echo 'Zmìny v Questu: '.$entry.' ulo¾eny!<br />';
     61      $Database->SQLCommand("DELETE FROM `quests_vote` WHERE `quests_vote`.`IDquest` = ".$QuestID);
    5862    }
    5963   
    6064
    61     ++$QuestID;
    62     echo 'Pøekládat: <a href="Form.php?ID='.$QuestID.'">Následující</a> ';
     65   // ++$QuestID;
     66    echo 'Pøekládat: <a href="ListQuests.php?selection">Nepøelo¾ené</a> ';
    6367     
    6468  }
Note: See TracChangeset for help on using the changeset viewer.