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

//引入静态常量
require_once '../../../util/StackConst.php';
//引入操作类
require_once '../dao/TecsDao.php';
//实例化TecsDao
$tecsDao = new TecsDao();
//获得技术支持对象集合
$arrTecs = $tecsDao->getTecsList();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>

<body>
	<input type="hidden" name="type" value=""/>
	<table border="1" width="100%">
		<tr>
			<th>序号</th>
			<th>技术支持信息</th>
			<th>操作</th>
		</tr>
		<?php 
$XH = 1;
foreach ($arrTecs as $tec) {
    ?>
				<tr align="center">
コード例 #2
0
ファイル: tecscontrol.php プロジェクト: fuzhengwei/php
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php 
require_once '../../../util/StackConst.php';
//获取操作类型值
$type = @$_POST['type'] == "" ? @$_GET['type'] : @$_POST['type'];
if ("addTecs" == $type) {
    $arrTecsInfo = array("sup_res_sup_tecs_coutent" => @$_POST['sup_res_sup_tecs_coutent']);
    //引入技术支持操作DAO
    require_once '../dao/TecsDao.php';
    //实例化DAO
    $tecsDao = new TecsDao();
    if ($tecsDao->addTecs($arrTecsInfo)) {
        echo "新增技术信息成功!";
        StackConst::jump_page("../view/restecslist.php");
    } else {
        echo "新增技术信息失败!";
    }
} else {
    if ("deleteTecs" == $type) {
        //引入技术支持操作DAO
        require_once '../dao/TecsDao.php';
        //实例化DAO
        $tecsDao = new TecsDao();
        if ($tecsDao->deleteTecsById(@$_GET['sup_res_sup_tecs_id'])) {
            echo "删除技术信息成功!";
            StackConst::jump_page("../view/restecslist.php");
        } else {
            echo "删除技术信息失败!";
        }
    }
}