| Server IP : 172.67.216.113 / Your IP : 172.71.28.145 [ Web Server : Apache System : Linux cpanel01wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.59.el6.x86_64 #1 SMP Thu Dec 6 05:11:00 EST 2018 x86_64 User : cp648411 ( 1354) PHP Version : 7.2.34 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home2/cp648411/public_html/simded.com/mybackend/seamsi/ |
Upload File : |
<?php require_once("../include/class.php");?>
<?php require_once("../include/header.php");?>
<?php require_once("../include/nav_top.php");?>
<?php require_once("../include/sidebar.php");?>
<?php include("table_name.php");?>
<?php include('../include/sql_injection_get.php');?>
<?php
if(!is_numeric($_GET["id"]))
{
?>
<meta http-equiv="refresh" content="0;URL=../index.php">
<?php
}
?>
<div id="main-content">
<div class="container-fluid">
<ul class="breadcrumb">
<li><a href="../<?php echo $name_folder ?>/list.php"><?php echo ucfirst($name_table) ?></a><span class="divider">»</span></li>
<li class="active">Edit</li>
</ul>
<div class="row-fluid">
<div class="span12">
<div class="nonboxy-widget">
<div class="widget-head">
<h5><i class="black-icons blocks_images"></i> From </h5>
</div>
<?php
$sql = array('table'=>$name_table,'where'=>"id = '". $_GET["id"]."'");
$view_sql = $view_db->view($sql);
$row = $view_db->q($view_sql);
?>
<div class="widget-content">
<div class="widget-box">
<form class="form-horizontal well" id="signupform_product" action="edit_save.php" method="post" enctype="multipart/form-data">
<fieldset>
<div class="control-group">
<label class="control-label">name</label>
<div class="controls">
<input id="name" name="name" type="text" class="span8" value="<?php echo $row['name']?>">
</div>
</div>
<div class="control-group">
<label class="control-label">name EN</label>
<div class="controls">
<input id="name_en" name="name_en" type="text" class="span8" value="<?php echo $row['name_en']?>">
</div>
</div>
<div class="control-group">
<label class="control-label">ประเภท</label>
<div class="controls">
<select class="form-control" name="type">
<option value="1" <?php if($_POST['type']== 1){?>selected<?php }?>> จากวัดดัง</option>
<!-- <option value="2" <?php if($_POST['type']== 2){?>selected<?php }?>> วัดประจำวันเกิด</option>-->
<option value="3" <?php if($_POST['type']== 3){?>selected<?php }?>> อื่นๆ</option>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label">รูปภาพ</label>
<div class="controls">
<input id="image" name="image" type="file" class="span8"/> 227 * 173
</div>
<div style="margin-top:30px;padding-left:160px;">
<img src="<?php echo $upload.$name_table; ?>/<?php echo $row['image']; ?>" width="100" broder='0'>
</div>
</div>
<div class="control-group">
<label class="control-label">รูปภาพพื้นหลัง</label>
<div class="controls">
<input id="bg_image" name="bg_image" type="file" class="span8"/> 846 * 429
</div>
<div style="margin-top:30px;padding-left:160px;">
<img src="<?php echo $upload.$name_table; ?>/<?php echo $row['bg_image']; ?>" width="100" broder='0'>
</div>
</div>
<div class="control-group">
<label class="control-label">ข้อความ</label>
<div class="controls">
<textarea id="detail" name="detail" rows="10" cols="5" class="ckeditor span8"><?php echo $row['detail']; ?></textarea>
</div>
</div>
<div class="control-group">
<label class="control-label">ใบเซียมซี</label>
<div class="controls">
<label>
<input type="radio" name="bg_pp" value="bg_pp.jpg" <?php if($row['bg_pp'] == 'bg_pp.jpg'){?>checked<?php }?>><img src="<?php echo $upload.$name_table; ?>/bg_pp.jpg" width="40" broder='0'>
</label>
<label>
<input type="radio" name="bg_pp" value="bg_pp2.jpg" <?php if($row['bg_pp'] == 'bg_pp2.jpg'){?>checked<?php }?>><img src="<?php echo $upload.$name_table; ?>/bg_pp2.jpg" width="40" broder='0'>
</label>
<label>
<input type="radio" name="bg_pp" value="bg_pp3.jpg" <?php if($row['bg_pp'] == 'bg_pp3.jpg'){?>checked<?php }?>><img src="<?php echo $upload.$name_table; ?>/bg_pp3.jpg" width="40" broder='0'>
</label>
<label>
<input type="radio" name="bg_pp" value="bg_pp4.jpg" <?php if($row['bg_pp'] == 'bg_pp4.jpg'){?>checked<?php }?>><img src="<?php echo $upload.$name_table; ?>/bg_pp4.jpg" width="40" broder='0'>
</label>
<label>
<input type="radio" name="bg_pp" value="bg_pp5.jpg" <?php if($row['bg_pp'] == 'bg_pp5.jpg'){?>checked<?php }?>><img src="<?php echo $upload.$name_table; ?>/bg_pp5.jpg" width="40" broder='0'>
</label>
<label>
<?php
$arr_pp = array('1'=>'bg_pp.jpg','bg_pp2.jpg','bg_pp3.jpg','bg_pp4.jpg','bg_pp5.jpg');
$arr_se = array_search($rows['bg_pp'],$arr_pp);
if($arr_se == 0 )
{
?>
<img src="<?php echo $upload.$name_table; ?>/<?php echo $row['bg_pp']; ?>" width="100" broder='0'>
<br>
<input type="radio" name="bg_pp" value="<?php echo $row['bg_pp'];?>" checked="checked" />
<input id="imagepp" name="image_pp" type="file" class="span8"/> 599 * 771
<?php
}
?>
</label>
</div>
</div>
</fieldset>
<div class="form-actions">
<input type="hidden" name="img_old" value="<?php echo $row['image']; ?>">
<input type="hidden" name="imgbg_old" value="<?php echo $row['bg_image']; ?>">
<input type="hidden" name="id" value="<?php echo $row['id']; ?>">
<button class="btn btn-primary" type="submit">Save changes</button>
<a href="list.php" class="btn" role="button">Cancel</a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php require_once("../include/footer_js.php");?>
</body>
</html>