public static function insertonearray($table, $date) { $name = array(); $data = array(); foreach ($date as $key => $val) { $name[] = $key; $data[] = $val; } return operate::insertoneline($table, $name, $data); }
$_GET['db'] += 0; $table = operate::getoneline('materialtable', 'id=' . $_GET['db'] . ' and uid=' . $login); if (!$table) { $errcon = "不存在该表"; include "./tpl/err.tpl"; } 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";
if (trim($_POST['username']) == "" || trim($_POST['password']) == "") { $errurl = "javascript:window.history.go(-1)"; $errinfo = "用户名和密码不能为空!"; include 'templete/err.html'; } if (@mysql_fetch_array(mysql_query('select * from member where username = "******"'))) { $errurl = "javascript:window.history.go(-1)"; $errinfo = "该用户名已经存在,请更换其它用户名!"; include 'templete/err.html'; } if ($_POST['password'] != $_POST['repassword']) { $errurl = "javascript:window.history.go(-1)"; $errinfo = "两次输入的密码不一致!"; include 'templete/err.html'; } if (operate::insertoneline("member", array("username", "password", "Email"), array($_POST['username'], md5($_POST['password']), $_POST['email']))) { operate::loginsession($_POST['username']); $errurl = "member.php"; $errinfo = "恭喜您,注册成功!"; include 'templete/err.html'; } else { $errurl = "javascript:window.history.go(-1)"; $errinfo = "系统出错,请稍后重试!"; include 'templete/err.html'; } } ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8">
$pic = $fileName; } else { //上传失败 } } //API存储信息 $city = $_POST['select2']; $cityone = operate::getoneline('city', 'id=' . $city, 'parentid,city'); $adress; if ($cityone[0] == 0) { $adress = $cityone[1] . $_POST['address']; } else { $citytwo = operate::getoneline('city', 'id=' . $cityone[0], 'city'); $adress = $citytwo[0] . $cityone[1] . $_POST['address']; } operate::insertoneline('item', array('title', 'pic', 'class', 'money', 'deposit', 'seller', 'content', 'city', 'address'), array($_POST['title'], $pic, $_POST['class'], $_POST['money'], $_POST['deposit'], $_SESSION['id'], $_POST['content'], $city, $_POST['address'])); $temp = mysql_fetch_row(mysql_query('select id from item order by id desc limit 1')); @($post_string = "key=ba8a19891a7cb1bc3e2f3411d01d9035&tableid=548fbe84e4b0d0b861454b2c&loctype=2&data={'_name'='" . $_POST['title'] . "','_address'='" . $adress . "','img'='" . $pic . "','id'='" . $temp[0] . "','money'='" . $_POST['money'] . "'}"); operate::file_get_contents_post('http://yuntuapi.amap.com/datamanage/data/create', $post_string); $errurl = "member.php?act=myrenting"; $errinfo = "恭喜您,发布成功!"; include 'templete/err.html'; } } } ?> <html> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=Edge"> <title>用户中心 - E租时代</title>
alert('请输入合理的金额!'); window.location.href="groupchou.php"; </script> <?php } else { ?> <script> alert('参与成功!'); </script> <?php operate::updateonelinesql("`groupchou`", "hasChou", $item['hasChou'], "id={$id}"); operate::updateonelinesql("`groupchou`", "participate_num", $item['participate_num'], "id={$id}"); echo $id; operate::insertoneline("`member_has_chou`", array("membername", "groupid", "money"), array($user, $id, $money)); } } //echo var_dump($iteminfo); //echo var_dump($iteminfo); ?> <script> window.location.href="groupchou.php"; </script> <div class="cover-page-list fl wfs bcf2"> <div class="place fz12" style="padding-left:20px;"> 您现在的位置:<a href=".">首页</a> <code>></code> <a href="#">手工艺众筹 - <?php
<html> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=Edge"> <title>标题 - Handicrafts</title> <?php define('ACCESS', '1'); // session_start(); include 'conn/connect.php'; include 'conn/operate.php'; if (!isset($_SESSION['orderlist'])) { $errurl = "javascript:window.history.go(-1)"; $errinfo = "购物车为空!"; include 'templete/err.html'; } else { include 'templete\\header.html'; $orderlist = $_SESSION['orderlist']; echo var_dump($orderlist); for ($i = 0; $i < sizeof($orderlist); $i++) { operate::insertoneline("`order`", array("productName", "price", "number", "buyername", "buyerphone", "buyeraddress", "sellername", "sellerphone", "selleraddress", "comments", "time1"), array($orderlist[$i][0], $orderlist[$i][1], $orderlist[$i][2], $orderlist[$i][3], $orderlist[$i][4], $orderlist[$i][5], $orderlist[$i][6], $orderlist[$i][7], $orderlist[$i][8], $orderlist[$i][9], $orderlist[$i][10])); } unset($_SESSION['orderlist']); ?> <script> alert("订单提交成功!"); window.location="award.php"; </script> <?php }
if (!is_dir($path)) { mkdir($path); } if (move_uploaded_file($tempFile, $path . $fileName)) { $pic = $fileName; } else { //上传失败 } } //API存储信息 $cityone = $_POST['address']; $title = '发布' . $_SESSION['username'] . ' ' . $_POST['title']; $con = mysql_query('select count(id) from `crafts`'); $con = mysql_fetch_row($con); //echo $con[0]; operate::insertoneline('crafts', array('id', 'name', 'title', 'type', 'img', 'price', 'seller', 'description', 'selleradd', 'store', 'phone'), array($con[0] + 1000, $title, $title, '需求发布', $path . $pic, $_POST['money'], $_SESSION['username'], $_POST['content'], $cityone, $cityone, $_SESSION['phone'])); $errurl = "member.php?act=myrenting"; $errinfo = "恭喜您,发布成功!"; include 'templete/err.html'; } } } ?> <html> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=Edge"> <title>用户中心 - Handicrafts</title> <link rel="stylesheet" href="style/css/member-center.css"> <?php include 'templete\\header.html';