Exemple #1
0
echo $title;
?>
</span><i></i></div>
    <div class="tb_nr">
        <div class="t3">
            <h3>● 按信息属性查找:</h3>
            标题:
            <input type="text" class="input" name="txtSearchName" id="txtSearchName" value="<?php 
echo $name;
?>
"/>
            &nbsp;&nbsp;
            <select id="brandcode">
                <option value=''>请选择品牌</option>
                <?php 
$brandAction = new Brandinfo();
$brandList = $brandAction->getList();
foreach ($brandList as $row) {
    if ($row['brandcode'] == $brandCode) {
        $chkStr = "selected=\"selected\"";
    } else {
        $chkStr = '';
    }
    echo "<option value='{$row['brandcode']}' {$chkStr}>{$row['brandname']}</option>";
}
?>
            </select>
                <span style=" padding-left:20px"><input type="button" id="btnSearch" value="搜索"> &nbsp;&nbsp;
                <input type="button" id="btnAdd" value="添加" onclick="javascript:openUserDialog(0);"></span>
        </div>
        <div>
Exemple #2
0
    exit;
}
define('XYUNADMIN', str_replace('\\', '/', dirname(__FILE__)));
require_once "../config/config.inc";
require_once "../lib/brandinfo.class.php";
$name = "";
$title = "机型品牌管理";
//当前页数
if (isset($_GET['page'])) {
    $curPageNum = (int) $_GET['page'];
} else {
    $curPageNum = 1;
}
$pageSize = 15;
//定义每页显示数
$userModal = new Brandinfo();
$num = $userModal->getPagerListCount($typeid);
$page = ceil($num / $pageSize);
//总页数
if ($curPageNum == 0) {
    $curPageNum = 1;
    //当前页数为1
}
if ($curPageNum > $page) {
    $curPageNum = $page;
    //当前页数为最大页数
}
$total = $num;
//总条数
$page = $page;
//总页数
        $branddesc = $_POST['branddesc'];
        $brandcode = $_POST['brandcode'];
        $id = $_POST['id'];
        $userAction = new Brandinfo();
        $userAction->addData($brandname, $branddesc, $brandcode, $id);
        unset($userAction);
        echo "1";
        break;
    case "delinfo":
        $items = $_POST['items'];
        $id = explode(",", $items);
        $userAction = new Brandinfo();
        foreach ($id as $ide) {
            $userAction->delData($ide);
        }
        unset($userAction);
        echo "1";
        break;
    case "getinfo":
        $recid = $_POST['id'];
        $userAction = new Brandinfo();
        $result = $userAction->getModal($recid);
        unset($userAction);
        echo json_encode($result);
        break;
}
/*
$action=$_POST['action'];
$ar=array("names"=>$username,"actionname"=>$action);
echo json_encode($ar);
*/