<?php require_once('php/connect.php'); ?>
<?php include ('php/access.php');?>
<?php include ('php/nav.php');?>
<?php
if((isset($_POST['Add'])) && ($_POST['Add'] == "Yes")) {
$image = ""; $image = $image . basename($_FILES['image']['name']);
$id = $_POST['id'];
$style = $row_Styles['id'];
$new = $id."-".$image;
// Connects to your Database
//Writes the information to the database
mysqli_query($LogoMasters, "UPDATE products SET image='$new' WHERE id='$id'") ;
//Writes the photo to the server
if(move_uploaded_file($_FILES['image']['tmp_name'], "../largeimages/" .$new));
$updateGoTo = "add-product-sizes.php?id=$id";
header("Location: $updateGoTo");
}
if (isset($_GET['style'])) {
$colname_Products = $_GET['style'];
}
$query_Products = "SELECT * FROM products WHERE unitNumber = '$colname_Products'";
$Products = mysqli_query($LogoMasters, $query_Products, $logomasters) or die(mysqli_error());
$row_Products = mysqli_fetch_assoc($Products);
$totalRows_Products = mysqli_num_rows($Products);
?>
<!doctype html>
<html><head>
<meta charset="utf-8">
<title>Add Product Image - Logo Masters Intl</title>
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0" class="shadow">
<tr>
<td height="100" colspan="2" align="center" valign="middle" bgcolor="#000066"><table width="850" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="324" rowspan="2"><span class="cpanel_hdr">cPanel</span></td>
<td width="526" align="right" valign="top" class="whitefont_1"><a style="color: #FFF" href="<?php echo $logoutAction; ?>"><strong>LOGOUT</strong></a></td>
</tr>
<tr>
<td align="center" class="whitefont_2">Logo Masters International, Inc.</td>
</tr>
</table></td>
</tr>
<tr>
<td width="249" height="500" align="center" valign="top" bgcolor="#ebe6e6"><?php echo $Nav_Output; ?></td>
<td width="651" align="center" valign="top" bgcolor="#FFFFFF"><table width="625" border="0" cellspacing="2" cellpadding="2">
<tr>
<td align="left" valign="middle" bgcolor="#FFFFFF" class="font_1"><table width="625" border="0" cellspacing="2" cellpadding="2">
<tr>
<td align="left" valign="middle" bgcolor="#FFFFFF" class="font_1"><table width="600" border="0" cellspacing="2" cellpadding="2">
<tr>
<td width="221" align="center" valign="middle"><table width="200" border="0" cellspacing="2" cellpadding="2">
<tr>
<td height="150" align="center" valign="middle" bgcolor="#CCCCCC">UPLOAD
IMAGE <br>
BELOW</td>
</tr>
</table></td>
<td width="365" align="center" valign="top"><table width="350" border="0" cellpadding="0" cellspacing="0" class="thinbdr">
<tr bgcolor="#CCCCCC">
<td height="45" align="center" valign="middle"><table width="330" border="0" cellspacing="2" cellpadding="2">
<tr>
<td align="left" valign="middle"><span class="font_2"><strong><?php echo $row_Products['manufacture']; ?></strong></span></td>
<td align="right" valign="middle"><span class="font_2"><strong>Style# <?php echo $row_Products['unitNumber']; ?></strong></span></td>
</tr>
<tr>
<td colspan="2" align="left" valign="middle" class="font_1"><span class="font_2"><?php echo $row_Products['name']; ?></span></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" valign="top"><table width="330" border="0" cellspacing="2" cellpadding="2">
<tr>
<td align="left" valign="middle" class="font_1"><span class="font_2"><?php echo nl2br($row_Products['description']); ?></span></td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<br></td>
</tr>
</table></td>
</tr>
<tr>
<td align="left" valign="middle" bgcolor="#FFFFFF" class="font_1"> </td>
</tr>
<tr bgcolor="#FF0000">
<td align="left" valign="middle" bgcolor="#FF0000" class="whitefont_2"><strong>Add Product Image</strong></td>
</tr>
<tr>
<td align="left" valign="middle" class="font_1"><form action="add-product-image.php" method="post" enctype="multipart/form-data" name="form1" id="form2">
<table width="600" border="0" cellspacing="2" cellpadding="2">
<tr>
<td width="147" align="left" valign="middle"><strong>Primary Image:</strong></td>
<td width="439" align="left" valign="top" class="style11"><input name="image" type="file" class="style11" id="image"></td>
</tr>
<tr>
<td><input name="id" type="hidden" id="id" value="<?php echo $row_Products['id']; ?>">
<input name="Add" type="hidden" id="Add" value="Yes"></td>
<td height="50" align="right" valign="middle"><input name="submit2" type="submit" class="font_1" id="submit2" value="Next >>"></td>
</tr>
</table>
</form></td>
</tr>
<tr>
<td align="left" valign="middle" class="font_1"> </td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
</table>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.3/jquery-ui.js"></script>
<script>
$(document).ready(function(){
$('ul.tabs li').click(function(){
var tab_id = $(this).attr('data-tab');
$('ul.tabs li').removeClass('current');
$('.tab-content').removeClass('current');
$(this).addClass('current');
$("#"+tab_id).addClass('current');
})
})
</script>
</body>
</html> |