<div class="right-title">
			<a>Promotion Add</a>
			<div class="right-title-gradient"></div>
		</div>
		
		<div class="content">
		<?php echo form_open_multipart("index.php/addnewpromotion"); ?>
			<div class="junk"></div>
			<div class="admin-input">
				<a class="admin-input-a">Name</a>
				<label>:</label>
				<input name="name" id="id" value="<?php echo set_value('name')?>">
			</div>
			
			<div class="admin-error">
				<?php echo form_error('name')?>
			</div>
			
			<div class="admin-input">
				<a class="admin-input-a">Link</a>
				<label>:</label>
				<input name="link" id="link" value="<?php echo set_value('link')?>">
			</div>
			
			<div class="admin-error">
				<a></a>
			</div>
			
			<div class="admin-input">
				<a class="admin-input-a">Browse Image</a>
				<label>:</label>
				<div id="input-file-wrapper">
					<a>Browse</a>
					<input type='file' id="input-file" name="image"  src="" onchange="showImg(this);"/>
				</div>
			</div>
			
			<div class="admin-error" style="height:10px;"><a></a></div>
			
			<div class="admin-input">
				<a class="admin-input-a">Preview</a>
				<label></label>
				<div class="file-preview2">
					<img id="preview" src="">
				</div>
			</div>
			
			<div class="admin-error"><?php echo form_error('image')?></div>
			
			<div class="admin-input">
				<a class="admin-input-a">Status</a>
				<label>:</label>
				<select name="status">
					<option value="1" <?php echo set_Select('status', 1)?>>Active</option>
					<option value="0" <?php echo set_Select('status', 0)?>>Inactive</option>
				</select>
			</div>
			
			<div class="admin-error">
				<a></a>
			</div>
			
			<div class="admin-input">
				<div class="admin-submit">
					<input id="input-submit" value="Submit" name="submit" type="submit"/>
				</div>
			</div>
			
			<div class="admin-error"><a></a></div>
			<?php echo form_close()?>
		</div>
<script type="text/javascript">
	function showImg(input) {
	
		if (input.files && input.files[0]) {
			var reader = new FileReader();

			reader.onload = function (e) {
				$('#preview').attr('src', e.target.result);
			}
			reader.readAsDataURL(input.files[0]);

		}
		
	}
</script>