| Server IP : 210.245.233.93 / Your IP : 216.73.216.226 Web Server : Apache/2.2.15 (CentOS) System : Linux webserver2.onesolution.com.hk 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : apache ( 48) PHP Version : 5.3.3 Disable Function : exec, shell_exec, system, passthru, popen, proc_open, pcntl_exec MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/onesolution.com.hk/onesupport/job/views/ |
Upload File : |
<?php
include ('../../inc/configure.php');
$customer_id = $_GET["customer_id"];
//get project data
$sql3 = "SELECT * FROM sup_project WHERE customer_id = ? and status = 1";
if (!($sth = $dbh->prepare($sql3))) {
throw new Exception("sql prepare statement failure: $sql3");
}
//$sth->setFetchMode(PDO::FETCH_ASSOC);
if (!$sth->execute(array($customer_id))) {
throw new Exception("sql execute statement failure: $sql3");
}
if($sth->rowCount() > 0){
?>
<?php $attribute = 'project_id';
$label = 'Project Name'; ?>
<div class="control-group belong_project">
<label class="control-label">Project Name</label>
<div class="controls">
<select id="<?= $attribute ?>" name="<?= $attribute ?>" placeholder="Select a <?= $label ?>" class="required" disabled>
<!--<option value=""></option>-->
<?php while ($project = $sth->fetch(PDO::FETCH_ASSOC)){ ?>
<option value="<?=$project['id'] ?>"><?=$project['project_name'] ?></option>
<?php } ?>
</select>
</div>
</div>
<?php $attribute = 'on_site';
$label = 'Project On-Site?'; ?>
<br>
<div class="control-group belong_project">
<label class="control-label"><?=$label?></label>
<div class="controls" style="padding-top: 5px;">
<input type="radio" name="<?=$attribute?>" value="1" required style="margin: 0;"/> Yes
<input type="radio" name="<?=$attribute?>" value="0" required style="margin: 0;"/> No
</div>
</div>
<?php
}else{
echo "0";
}
?>