예제 #1
0
파일: shop.php 프로젝트: nero08/CraftedWeb
			 __                           __ _   							   
		  /\ \ \___  _ __ ___  ___  ___  / _| |_ 							   
		 /  \/ / _ \| '_ ` _ \/ __|/ _ \| |_| __|							   
		/ /\  / (_) | | | | | \__ \ (_) |  _| |_ 							   
		\_\ \/ \___/|_| |_| |_|___/\___/|_|  \__|	- www.Nomsoftware.com -	   
                  The policy of Nomsoftware states: Releasing our software   
                  or any other files are protected. You cannot re-release    
                  anywhere unless you were given permission.                 
                  © Nomsoftware 'Nomsoft' 2011-2012. All rights reserved.  */
define('INIT_SITE', TRUE);
include '../../includes/misc/headers.php';
include '../../includes/configuration.php';
include '../functions.php';
$server = new server();
$account = new account();
$server->selectDB('webdb');
###############################
if ($_POST['action'] == 'addsingle') {
    $entry = (int) $_POST['entry'];
    $price = (int) $_POST['price'];
    $shop = mysql_real_escape_string($_POST['shop']);
    if (empty($entry) || empty($price) || empty($shop)) {
        die("Please enter all fields.");
    }
    $server->selectDB('worlddb');
    $get = mysql_query("SELECT name,displayid,ItemLevel,quality,AllowableRace,AllowableClass,class,subclass,Flags\r\n\tFROM item_template WHERE entry='" . $entry . "'") or die('Error whilst getting item data from the database. Error message: ' . mysql_error());
    $row = mysql_fetch_assoc($get);
    $server->selectDB('webdb');
    if ($row['AllowableRace'] == "-1") {
        $faction = 0;
    } elseif ($row['AllowableRace'] == 690) {
예제 #2
0
?>
<div class="box_right_title">Account Access</div>
All GM accounts are listed below.
<br/>&nbsp;
<table>
	<tr>
    	<th>ID</th>
        <th>Username</th>
        <th>Rank</th>
        <th>Realms</th>
        <th>Status</th>
        <th>Last Login</th>
        <th>Actions</th>
    </tr>
    <?php 
$server->selectDB('logondb');
$result = mysql_query("SELECT * FROM account_access");
if (mysql_num_rows($result) == 0) {
    echo "<b>No GM accounts found!</b>";
} else {
    while ($row = mysql_fetch_assoc($result)) {
        ?>
            <tr style="text-align:center;">
            	<td><?php 
        echo $row['id'];
        ?>
</td>
                <td><?php 
        echo $account->getAccName($row['id']);
        ?>
</td>
예제 #3
0
        echo $file . ' (Module)<br/>';
    }
}
//Pages
$folder = scandir('../plugins/' . $filename . '/pages/');
foreach ($folder as $file) {
    if (!in_array($file, $bad)) {
        echo $file . ' (Page)<br/>';
    }
}
//Styles
$folder = scandir('../plugins/' . $filename . '/styles/');
foreach ($folder as $file) {
    if (!in_array($file, $bad)) {
        echo $file . ' (Stylesheet)<br/>';
    }
}
//Javascript
$folder = scandir('../plugins/' . $filename . '/javascript/');
foreach ($folder as $file) {
    if (!in_array($file, $bad)) {
        echo $file . ' (Javascript)<br/>';
    }
}
$server->selectDB('webdb');
$chk = mysql_query("SELECT COUNT(*) FROM disabled_plugins WHERE foldername='" . mysql_real_escape_string($filename) . "'");
if (mysql_result($chk, 0) > 0) {
    echo '<input type="submit" value="Enable Plugin" onclick="enablePlugin(\'' . $filename . '\')">';
} else {
    echo '<input type="submit" value="Disable Plugin" onclick="disablePlugin(\'' . $filename . '\')">';
}
예제 #4
0
 &raquo; Manage Users</div>

<?php 
if (isset($_GET['char'])) {
    echo 'Search results for <b>' . $_GET['char'] . '</b><pre>';
    $result = mysql_query("SELECT name, id FROM realms");
    while ($row = mysql_fetch_assoc($result)) {
        $server->connectToRealmDB($row['id']);
        $get = mysql_query("SELECT account,name FROM characters WHERE name='" . mysql_real_escape_string($_GET['char']) . "' OR guid='" . (int) $_GET['char'] . "'");
        $rows = mysql_fetch_assoc($get);
        echo '<a href="?p=users&s=manage&user='******'account'] . '">' . $rows['name'] . ' - ' . $row['name'] . '</a><br/>';
    }
    echo '</pre><hr/>';
}
if (isset($_GET['user'])) {
    $server->selectDB('logondb');
    $value = mysql_real_escape_string($_GET['user']);
    $result = mysql_query("SELECT * FROM account WHERE username='******' OR id='" . $value . "'");
    if (mysql_num_rows($result) == 0) {
        echo "<span class='red_text'>No results found!</span>";
    } else {
        $row = mysql_fetch_assoc($result);
        ?>
		<table width="100%">
			<tr>
			<td><span class='blue_text'>Account name</span></td><td> <?php 
        echo ucfirst(strtolower($row['username']));
        ?>
 (<?php 
        echo $row['last_ip'];
        ?>
예제 #5
0
 public function addSlideImage($upload, $path, $url)
 {
     $path = mysql_real_escape_string($path);
     $url = mysql_real_escape_string($url);
     if (empty($path)) {
         //No path set, upload image.
         if ($upload['error'] > 0) {
             echo "<span class='red_text'><b>Error:</b> File uploading was not successfull!</span>";
             $abort = true;
         } else {
             if ($upload["type"] == "image/gif" || $upload["type"] == "image/jpeg" || $upload["type"] == "image/pjpeg" || $upload["type"] == "image/png") {
                 if (file_exists("../styles/global/slideshow/images/" . $upload["name"])) {
                     unlink("../styles/global/slideshow/images/" . $upload["name"]);
                     move_uploaded_file($upload["tmp_name"], "../styles/global/slideshow/images/" . $upload["name"]);
                     $path = "styles/global/slideshow/images/" . $upload["name"];
                 } else {
                     move_uploaded_file($upload["tmp_name"], "../styles/global/slideshow/images/" . $upload["name"]);
                     $path = "styles/global/slideshow/images/" . $upload["name"];
                 }
             } else {
                 $abort = true;
             }
         }
     } else {
         $path = $path;
     }
     if (!isset($abort)) {
         $server = new server();
         $server->selectDB('webdb');
         mysql_query("INSERT INTO slider_images VALUES('','" . $path . "','" . $url . "')");
     }
 }
예제 #6
0
			 __                           __ _   							   
		  /\ \ \___  _ __ ___  ___  ___  / _| |_ 							   
		 /  \/ / _ \| '_ ` _ \/ __|/ _ \| |_| __|							   
		/ /\  / (_) | | | | | \__ \ (_) |  _| |_ 							   
		\_\ \/ \___/|_| |_| |_|___/\___/|_|  \__|	- www.Nomsoftware.com -	   
                  The policy of Nomsoftware states: Releasing our software   
                  or any other files are protected. You cannot re-release    
                  anywhere unless you were given permission.                 
                  © Nomsoftware 'Nomsoft' 2011-2012. All rights reserved.  */
define('INIT_SITE', TRUE);
include '../../includes/misc/headers.php';
include '../../includes/configuration.php';
include '../functions.php';
$server = new server();
$account = new account();
$server->selectDB('webdb');
##############################
if ($GLOBALS['core_expansion'] == 3) {
    $guidString = 'playerGuid';
} else {
    $guidString = 'guid';
}
if ($GLOBALS['core_expansion'] == 3) {
    $closedString = 'closed';
} else {
    $closedString = 'closedBy';
}
if ($GLOBALS['core_expansion'] == 3) {
    $ticketString = 'guid';
} else {
    $ticketString = 'ticketId';