Exemple #1
0
        

	<div class="cover-page-list fl wfs bcf2">
        <div class="place fz12" style="padding-left:20px;">
    您现在的位置:<a href=".">首页</a> <code>&gt;</code> <a href="#">手工艺众筹</a></div>
        <div class="regist-process-wrapper">
            <div class="nearby-process-body fl wfs">
				
				
<div class="blank"></div>
<div class="container-fluid">
	<div class="row-fluid">
		<div class="span12">
			<ul class="thumbnails">
				<?php 
$iteminfo[] = operate::getmuchlinesql("`groupchou`", "");
for ($i = 0; $i < sizeof($iteminfo[0]); $i++) {
    ?>
				<li class="span4">
					<div class="thumbnail">
						<img alt="300x200" src="<?php 
    echo $iteminfo[0][$i]['img'];
    ?>
" height="400" width="400" />
						<div class="caption">
							
							<h3>
								<?php 
    echo $iteminfo[0][$i]['name'];
    ?>
							</h3>
Exemple #2
0
    }
    if (isset($_POST['add'])) {
        //添加
        $filed = array();
        foreach ($_POST as $key => $value) {
            if ($key != "add" && $key != "t1") {
                $filed[] = $value;
            }
        }
        $info = serialize($filed);
        operate::insertoneline('material', array('mid', 'title', 'info'), array($_GET['db'], $_POST['t1'], $info));
        $errcon = "添加成功";
        include "./tpl/succ.tpl";
    }
    if (isset($_POST['edit'])) {
        //修改
        $filed = array();
        foreach ($_POST as $key => $value) {
            if ($key != "edit" && $key != "t1") {
                $filed[] = $value;
            }
        }
        $info = serialize($filed);
        operate::updateoneline('material', array('title', 'info'), array($_POST['t1'], $info), 'id=' . $_POST['edit']);
        $errcon = "修改成功";
        include "./tpl/succ.tpl";
    }
    $content = unserialize($table['info']);
    $data = operate::getmuchlinesql('select * from material where mid=' . $table[0] . ' order by id desc limit 30');
    include "./tpl/database.tpl";
}
session_start();
?>
  <!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <title>标题 - Handicrafts</title>
<?php 
include 'templete\\header.html';
define('ACCESS', '1');
// session_start();
include 'conn/connect.php';
include 'conn/operate.php';
$id = $_GET['id'];
$iteminfo[] = operate::getmuchlinesql("`groupchou`", "where id={$id}");
if (isset($_GET['id']) && isset($_GET['money'])) {
    $id = $_GET['id'];
    $item = operate::getoneline("`groupchou`", "id={$id}");
    // echo var_dump($item);
    $item['hasChou'] = $item['hasChou'] + $_GET['money'];
    $item['participate_num'] = $item['participate_num'] + 1;
    $money = $_GET['money'];
    $user = $_SESSION['username'];
    echo $money;
    $judge = 1;
    if (floor($judge) != $judge || $money <= 0) {
        $judge = 0;
    }
    echo 'judge = ' . $judge;
    if ($judge == 0) {