コード例 #1
0
ファイル: index.php プロジェクト: advx9600/phpImgUpgrade
<?php

include_once 'class.MySQL.php';
include_once 'db.php';
define("SEG_UBOOT", "uboot");
define("SEG_UBOOT_PATH", "ubootPath");
define("SEG_KERNEL", "kernel");
define("SEG_KERNEL_PATH", "kernelPath");
define("SEG_SYSTEM", "system");
define("SEG_SYSTEM_PATH", "systemPath");
$mySql = new MySQL();
$board = isset($_REQUEST['board']) ? $_REQUEST['board'] : "";
$gitBranch = isset($_REQUEST['gitBranch']) ? $_REQUEST['gitBranch'] : "";
$mySql->executeSQL("select * from tb_img  where board='{$board}' and gitBranch='{$gitBranch}'");
$result1 = $mySql->arrayedResult;
$mySql->executeSQL("select * from tb_img  where board='{$board}' and gitBranch='master'");
$result2 = $mySql->arrayedResult;
$pro = new UtilA($result1, $result2);
$result[$pro->setName(SEG_UBOOT)] = $pro->getVal();
$result[$pro->setName(SEG_KERNEL)] = $pro->getVal();
$result[$pro->setName(SEG_SYSTEM)] = $pro->getVal();
$result[$pro->setName(SEG_UBOOT_PATH)] = $pro->getVal2();
$result[$pro->setName(SEG_KERNEL_PATH)] = $pro->getVal2();
$result[$pro->setName(SEG_SYSTEM_PATH)] = $pro->getVal2();
echo json_encode($result);
コード例 #2
0
ファイル: app.php プロジェクト: advx9600/phpImgUpgrade
	<label>Select Type</label>
	<select onchange="doBoard(this.value)">
	<?php 
for ($i = 0; $i < count($boards); $i++) {
    $selected = "";
    if ($boardId == $boards[$i]['id']) {
        $selected = "selected=\"selected\"";
    }
    echo "<option value='{$boards[$i]['id']}' {$selected}>{$boards[$i]['name']}</option>";
}
?>
	</select>
	<br />
	<table id="t01" border="0" style="width: 100%">
	<?php 
$pro = new UtilA($result, $result);
for ($i = 0; $i < count($result); $i++) {
    $style = $i % 2 == 0 ? "" : "background: #eee";
    $savePath = $pro->path2url($result[$i]['savePath']);
    ?>
		<tr style="<?php 
    echo $style;
    ?>
">
			<td><?php 
    echo "<a href='{$savePath}' target='blank'><img width=60 height=60 src='{$pro->path2url($result[$i]['iconPath'])}' /></a>";
    ?>
			</td>
			<td>
				<table border="0">
					<tr>