]][ahhhhhhhasdasdassasdkksdadddsddfgh
במ12[aspddfsdfsdfdfnsd g ggk ffghaskjjsaddddkdasdasd asdadghdgh;';';'
/
home
/
swordshipmanagem
/
public_html
/
admin
/
Upload FileeE
HOME
<?php require('function.php'); //require('database.php'); head(); ?> <body> <!-- topbar starts --> <?php navigation(); ?> <!-- topbar ends --> <div class="container-fluid"> <div class="row-fluid"> <!-- left menu starts --> <?php menu(); ?> <!-- left menu ends --> <div id="content" class="span10"> <!-- content starts --> <div> <ul class="breadcrumb"> <li> <a href="#">Home</a> <span class="divider">/</span> </li> <li> <a href="#">Forms</a> </li> </ul> </div> <div class="row-fluid sortable"> <div class="box span12"> <div class="box-header well" data-original-title> <h2><i class="icon-edit"></i> Form Elements</h2> <div class="box-icon"> <a href="#" class="btn btn-setting btn-round"><i class="icon-cog"></i></a> <a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a> <a href="#" class="btn btn-close btn-round"><i class="icon-remove"></i></a> </div> </div> <?php add_product(); ?> <div class="box-content"> <form method="post" action="<?php $_SERVER['PHP_SELF'] ?>" enctype="multipart/form-data" class="form-horizontal" onsubmit="return vl();"> <fieldset> <div class="control-group"> <label class="control-label" for="focusedInput">Code</label> <div class="controls"> <input class="title input-xlarge focused" name="code" id="code" type="text"> </div> </div> <div class="control-group"> <label class="control-label" for="focusedInput">Name</label> <div class="controls"> <input class="title input-xlarge focused" name="title" id="title" type="text"> </div> </div> <div class="control-group"> <label class="control-label" for="focusedInput"></label> <div style="float:left;width:600px;background:#fff;border:solid 1px #000;padding:10px 5px;"> <ul> <span>Please Select any Category to Insert product</span> <strong><li>Category</li></strong> <ul> <?php $ob = new database(); $ob->query("SELECT * FROM category"); if($ob->numRows() >= 1) { foreach($ob->rows() as $data) { $ob->query("SELECT * FROM sub_category WHERE cat_id='$data[id]'"); if($ob->numRows() >=1) { ?> <li><input type="radio" name="abc" id="optionsCheckbox2" value="category.<?php echo $data['id'] ?>" disabled><span style="opacity:0.5;"><?php echo $data['title'] ?><span></li> <?php } else { ?> <li><input type="radio" name="abc" id="optionsCheckbox2" value="category.<?php echo $data['id'] ?>"><?php echo $data['title'] ?></li> <?php } ?> <ul> <?php $ob->query("SELECT * FROM sub_category WHERE cat_id='$data[id]'"); foreach($ob->rows() as $sub) { $ob->query("SELECT * FROM sub_sub_category WHERE sub_id='$sub[id]'"); if($ob->numRows() >= 1) { ?> <li><input type="radio" name="abc" id="optionsCheckbox2" value="sub_category.<?php echo $sub['id'] ?>" disabled><span style="opacity:0.5;"><?php echo $sub['title'] ?></span></li> <?php } else { ?> <li><input type="radio" name="abc" id="optionsCheckbox2" value="sub_category.<?php echo $sub['id'] ?>"><?php echo $sub['title'] ?></li> <?php } ?> <ul> <?php $ob->query("SELECT * FROM sub_sub_category WHERE sub_id='$sub[id]'"); foreach($ob->rows() as $sbb) { ?> <li><input type="radio" name="abc" id="optionsCheckbox2" value="sub_sub_category.<?php echo $sbb['id'] ?>"><?php echo $sbb['title'] ?></li> <?php } ?> </ul> <?php } ?> </ul> <?php } } else { echo 'No Category Added.'; } ?> </ul> </div> </div> <div class="control-group"> <label class="control-label" for="textarea2">Short Description</label> <div class="controls"> <textarea class="cleditor" name="s_desc" id="sdesc" rows="3"></textarea> </div> </div> <div class="control-group"> <label class="control-label" for="textarea2">Long Description</label> <div class="controls"> <textarea class="cleditor" name="l_desc" id="ldesc" rows="3"></textarea> </div> </div> <div class="control-group"> <label class="control-label" for="fileInput">Featured Image</label> <div class="controls"> <input class="input-file uniform_on" name="image[]" id="img" type="file" multiple> </div> </div> <div class="control-group"> <label class="control-label" for="focusedInput">Colors and Size</label> <div class="controls"> <input type="button" id="AddMoreFileBox" value="Add Attributes" class="btn btn-info custom"> </div> </div> <div id="InputsWrapper"> <div> <div class="control-group-custom" style="display:none;"> <label class="control-label" for="name">Color</label> <div class="controls yy"> <input class="input-xlarge focused" name="name[]" id="field_1" type="text" name="cust_name" placeholder="Add-on Name" /><a href="#" class="removeclass"></a> </div><br /> <label class="control-label" for="name">Size</label> <div class="controls yy"> <input class="input-xlarge focused" name="name[]" id="field_2" type="text" name="cust_price" placeholder="Add-on Price" /><a href="#" class="removeclass"></a><br /> </div><br /> <label class="control-label" for="name">Type</label> <div class="controls yy"> <input class="input-xlarge focused" name="name[]" id="field_2" type="text" name="cust_price" placeholder="Add-on Price" /><a href="#" class="removeclass"></a><br /> </div><br /> </div> </div> </div> <!--<span style="float:left;margin-left:160px;margin-bottom:20px;"> <input type="button" id="AddMoreFileBox" value="Add More" class="btn btn-info custom"> </span>--> <div class="form-actions"> <button type="submit" name="add_product" class="add_cat btn btn-primary">Add</button> <button class="btn">Cancel</button> </div> </fieldset> </form> </div> </div><!--/span--> </div><!--/row--> <!-- content ends --> </div><!--/#content.span10--> </div><!--/fluid-row--> <hr> <div class="modal hide fade" id="myModal"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h3>Settings</h3> </div> <div class="modal-body"> <p>Here settings can be configured...</p> </div> <div class="modal-footer"> <a href="#" class="btn" data-dismiss="modal">Close</a> <a href="#" class="btn btn-primary">Save changes</a> </div> </div> <?php footer(); ?> </div><!--/.fluid-container--> </body> <script type="text/javascript"> $(document).ready(function() { var InputsWrapper = $("#InputsWrapper"); //Input boxes wrapper ID var AddButton = $("#AddMoreFileBox"); //Add button ID var x = InputsWrapper.length; //initlal text box count var FieldCount= document.getElementById("field_1").value; //to keep track of text box added var FieldCountd= document.getElementById("field_2").value; //to keep track of text box added $(AddButton).click(function (e) //on add input button click { //add input box $(InputsWrapper).append('<div style="margin:40px 0 20px 40px;"><label style="float: left;padding: 10px 74px 0 10px;">Color</label><input type="text" name="color[]" id="field_'+ FieldCount +'" value="'+ FieldCount +'" style="margin: 10px 0;"/><br /><label style="float: left;padding: 0 74px 0 10px;">Size</label><input type="text" name="size[]" id="field_'+ FieldCountd +'" value="'+ FieldCountd +'" style="margin: 0 5px 10px 4px;"/><br /><label style="float: left;padding: 0 10px;">Type</label><input type="text" name="type[]" id="field_'+ FieldCountd +'" value="'+ FieldCountd +'" style="float: left;margin: 0 5px 0 4px;"/><a href="#" class="removeclass">×</a></div>'); x++; //text box increment return false; }); $("body").on("click",".removeclass", function(e){ //user click on remove text if( x > 1 ) { $(this).parent('div').remove(); //remove text box x--; //decrement textbox } return false; }) }); </script> <script type="text/javascript"> $(document).ready(function() { $(".custom").click(function() { $(".control-group-check").hide(); $("#InputsWrapper").show(); $(".cb").show(); }); }); </script> <script type="text/javascript"> function vl() { var error = ""; var code = document.getElementById("code").value; var name = document.getElementById("title").value; var cat = document.getElementById("optionsCheckbox2").value; var sdesc = document.getElementById("sdesc").value; var ldesc = document.getElementById("ldesc").value; var img = document.getElementById("img").value; if (code == "" || code == " " ) { error += "Code Must be Filled.\n"; } if (name == "" || name == " " ) { error += "Title Must be Filled.\n"; } if (cat == "" || cat == " " ) { error += "Please Select any Category.\n"; } if (sdesc == "" || sdesc == " " ) { error += "Short Description Must be Filled.\n"; } if (ldesc == "" || ldesc == " " ) { error += "Long Description Must be Filled.\n"; } if (img == "" || img == " " ) { error += "Please Select an Image.\n"; } if (error != "") { alert(error); return false; } else { return true; } } </script> </html>