Viewing file: index.php (3.7 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<!DOCTYPE> <html lang="html">
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>เพิ่ม-ลบ-รูปภาพกิจกรรม</title> <link href='https://fonts.googleapis.com/css?family=Prompt:400,300&subset=thai,latin' rel='stylesheet' type='text/css'> <!--Stylesheets--> <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css"> <link href="css/jquery.filer.css" type="text/css" rel="stylesheet" /> <link href="css/themes/jquery.filer-dragdropbox-theme.css" type="text/css" rel="stylesheet" /> <!--jQuery--> <script type="text/javascript" src="js/jquery-min.js"></script> <script type="text/javascript" src="js/jquery.filer.min.js?v=1.0.5"></script> <script type="text/javascript" src="js/custom.js?v=1.0.5"></script> <!--[if IE]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <style> body { font-family: 'Prompt', sans-serif; font-size: 14px; line-height: 1.42857143; color: #333; background-color: #fff; margin: 0; padding: 20px; } hr { margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid #eee; } #content { width: 77%; } </style> <style type="text/css"> .require{ font-family: 'Prompt', sans-serif; color:#FF0000; font-size:12px; text-align:left;
} </style> </head>
<body> <div id="header"> <h1>เพิ่มรูปภาพกิจกรรม</h1> </div> <hr /> <div id="content"> <form action="upload.php" method="post" enctype="multipart/form-data" class="form-horizontal" onSubmit="return chk_form()"> <div class="form-group"> <label for="title" class="col-sm-2 control-label">ชื่อเรื่อง :</label> <div class="col-sm-5"> <input type="text" autocomplete="off" name="title" class="form-control" id="tilte"> </div> </div> <div class="form-group"> <label for="files" class="col-sm-2 control-label">ภาพหน้าปก :</label> <div class="col-sm-8"> <input id="filer_input" name="files_thumb" type="file" class="form-control"> </div> </div> <div class="form-group"> <label for="detail" class="col-sm-2 control-label">รายละเอียด :</label> <div class="col-sm-5"> <textarea name="detail" cols="" rows="4" class="form-control" id="detail"></textarea> </div> </div> <div class="form-group"> <label for="files" class="col-sm-2 control-label">อัพโหลด :</label> <div class="col-sm-8"> <input id="filer_input7" name="files[]" type="file" multiple="true" class="form-control" > <input type="submit" value="เพิ่มข้อมูล" class="btn btn-success"> </div> </div> </form>
</div> <script type="text/javascript"> function chk_form(){ $(":input + span.require").remove(); $(":input").each(function(){ $(this).each(function(){ if($(this).val()==""){ $(this).after("<span class=require>« จำเป็นต้องกรอก</span>"); } }); }); if($(":input").next().is(".require")==false){ return true; }else{ return false; } } </script> </body> </html>
|