Exemplo n.º 1
0
    $breadcrumbs .= " >> " . "<a href='index.php?editor=" . $editor . "&z=" . $z . "&zoneid=" . getZoneIDByName($z) . "'>" . getZoneLongName($z) . "</a>";
}
if ($npcid != '' && $npcid != 'ID' && $editor != 'altcur' && $editor != 'qglobal') {
    $breadcrumbs .= " >> " . getNPCName($npcid) . " ({$npcid})";
}
if ($fid != '') {
    $breadcrumbs .= " >> " . getFactionName($fid);
}
if ($tskid != '') {
    $breadcrumbs .= " >> " . getTaskTitle($tskid);
}
if ($ts != '') {
    $breadcrumbs .= " >> " . "<a href='index.php?editor=" . $editor . "&ts=" . $ts . "'>" . $tradeskills[$ts] . "</a>";
}
if ($rec != '0') {
    $breadcrumbs .= " >> " . getRecipeName($rec);
}
if ($spellset != '') {
    $breadcrumbs .= " >> " . getSpellsetName($spellset);
}
if ($playerid != '' && $playerid != 'Player ID') {
    $breadcrumbs .= " >> <a href='index.php?editor=" . $editor . "&playerid=" . $playerid . "'>" . getPlayerName($playerid) . " ({$playerid})</a>";
}
if ($acctid != '') {
    $breadcrumbs .= " >> " . getAccountName($acctid) . " ({$acctid})";
}
if ($guildid != '') {
    $breadcrumbs .= " >> " . getGuildName($guildid) . " ({$guildid})";
}
if ($aaid != '') {
    $breadcrumbs .= " >> " . getAAName($aaid) . " ({$aaid})";
Exemplo n.º 2
0
    $x = 0;
    foreach ($recipes as $recipe => $v) {
        ?>
        <tr bgcolor="#<?php 
        echo $x % 2 == 0 ? "BBBBBB" : "AAAAAA";
        ?>
">
          <td align="center" width="25%"><a href="index.php?editor=player&playerid=<?php 
        echo $v['char_id'];
        ?>
"><?php 
        echo getPlayerName($v['char_id']);
        ?>
</a></td>
          <td align="center" width="50%"><?php 
        echo getRecipeName($v['recipe_id']);
        ?>
</td>
          <td align="center" width="20%"><?php 
        echo $v['madecount'];
        ?>
</td>
        </tr>
<?php 
        $x++;
    }
}
if (!isset($recipes)) {
    ?>
        <tr>
          <td align="left" width="100" style="padding: 10px;">No entries</td>
Exemplo n.º 3
0
        echo $recipe['char_id'];
        ?>
)</td>
              <td align="center"><?php 
        echo "<a href='index.php?editor=tradeskill&rec=" . $recipe['recipe_id'] . "'>" . getRecipeName($recipe['recipe_id']);
        ?>
</a> (<?php 
        echo $recipe['recipe_id'];
        ?>
)</td>
              <td align="center"><?php 
        echo $recipe['madecount'];
        ?>
</td>
              <td align="right"><a onClick="return confirm('Really delete <?php 
        echo getRecipeName($recipe['recipe_id']);
        ?>
 from <?php 
        echo getPlayerName($recipe['char_id']);
        ?>
?');" href="index.php?editor=tradeskill&recipe_id=<?php 
        echo $recipe['recipe_id'];
        ?>
&char_id=<?php 
        echo $recipe['char_id'];
        ?>
&action=14"><img src="images/remove3.gif" border="0" title="Delete Learned Recipe"></a></td>
            </tr>
<?php 
        $x++;
    }
Exemplo n.º 4
0
<html>
    
    <?php 
session_start();
include 'create-recipe-form.php';
include 'db-credentials.php';
//if form submitted
if ($_SERVER['REQUEST_METHOD'] == "POST") {
    //connect to db
    $conn = connectToDb($servername, $username, $password, $dbname);
    $userId = getAuthorId($conn, $_SESSION["username"]);
    //if friend does not have account
    if (!checkPrivacy($conn)) {
        exit("Sorry, your friend(s) is not a registered user.");
    }
    $recipeName = getRecipeName($conn);
    $allSteps = getAllSteps($conn);
    $privacy = getPrivacy();
    $recipeId = insertRecipeIntoDB($recipeName, $userId, $allSteps, $privacy, $conn);
    //if error in inserting recipe into db
    if ($recipeId < 0) {
        exit("Sorry, could not access database when adding recipe. Please try again.");
    }
    $photoPath = NULL;
    //check if image uploaded
    if (checkImageUploaded()) {
        $photo = getImageTmpName();
        $photoPath = getImagePath($recipeId);
        if (!mkdir("images/" . $recipeId, 0777, true)) {
            exit('Could not upload image to server.');
        }