Beispiel #1
0
 public static function loginsession($username){
     $info = operate::getoneline("member","username='******'");
     $_SESSION['username']=$info['username'];
     $_SESSION['id']=$info['id'];
     $_SESSION['qq']=$info['qq'];
     $_SESSION['phone']=$info['phone'];
     $_SESSION['Email']=$info['Email'];
 }
Beispiel #2
0
 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);
 }
Beispiel #3
0
<?php

include './conn/comment.php';
if (isset($_GET['ac'])) {
    if ($_GET['ac'] == "logout") {
        session_unset();
        $errtime = "3";
        $errurl = "/";
        $errcon = "退出成功";
        include './tpl/succ.tpl';
    }
    if ($_GET['ac'] == "login") {
        if ($loginfo = operate::getoneline('member', 'username="******" or email="' . $_POST['username'] . '"', 'id,password')) {
            if ($_POST['password'] == $loginfo['password']) {
                operate::login($loginfo['id']);
                $errtime = 3;
                $errurl = "/";
                $errcon = "登录成功!";
                include "./tpl/succ.tpl";
            } else {
                $errcon = "密码错误,请重试";
                include "./tpl/err.tpl";
            }
        } else {
            $errtime = 3;
            $errcon = "不存在该用户!";
            include "./tpl/err.tpl";
        }
    }
    $PATH = "./tpl/" . $_GET['ac'] . '.tpl';
    if (file_exists($PATH)) {
Beispiel #4
0
<?php

header("Content-type: text/html;charset=utf-8");
$pid = $_GET['pid'];
define('ACCESS', '1');
include '../conn/connect.php';
include '../conn/operate.php';
$sql = "select id,city from city where parentid={$pid}";
$result = mysql_query($sql);
$i = 0;
while ($rows = mysql_fetch_array($result)) {
    $i++;
    echo "<option value=" . $rows['0'] . ">";
    echo $rows['1'];
    echo "</option>";
}
if ($i == 0) {
    $cityone = operate::getoneline('city', 'id=' . $pid, 'city');
    echo "<option value=" . $pid . ">{$cityone['0']}</option>";
}
?>
 
Beispiel #5
0
<?php

error_reporting(0);
define("ACCESS", 1);
session_start();
include "./conn/conn.php";
include "./conn/operater.php";
if (isset($_SESSION['userid'])) {
    $login = $_SESSION['userid'];
    $user = operate::getoneline('member', 'id=' . $_SESSION['userid']);
} else {
    $login = 0;
}
Beispiel #6
0
<?php

include './conn/comment.php';
if (!$login) {
    $errtime = 3;
    $errcon = "请先登陆!";
    $errurl = "/action.php?ac=logininfo";
    include "./tpl/err.tpl";
}
if (!isset($_GET['db'])) {
    exit;
}
$_GET['db'] += 0;
$table = operate::getoneline('materialtable', 'id=' . $_GET['db'] . ' and uid=' . $login);
if (!$table) {
    $errcon = "不存在该表";
    include "./tpl/err.tpl";
}
operate::deletedata('materialTable', 'id=' . $_GET['db']);
$errurl = 'material.php';
$errcon = "删除成功";
include "./tpl/succ.tpl";
Beispiel #7
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>
Beispiel #8
0
<?php

include './conn/comment.php';
if (!$login) {
    $errtime = 3;
    $errcon = "请先登陆!";
    $errurl = "/action.php?ac=logininfo";
    include "./tpl/err.tpl";
}
if (!isset($_GET['db'])) {
    exit;
}
$_GET['db'] += 0;
$table = operate::getoneline('materialtable', 'id=' . $_GET['db'] . ' and uid=' . $login);
if (!$table) {
    $errcon = "不存在该表";
    include "./tpl/err.tpl";
}
$content = unserialize($table['info']);
?>
<section class="panel panel-default" style="margin-left:15%;width:70%;margin-top:5%">
<header class="panel-heading font-bold">添加新数据</header>
<div class="panel-body">
  <form class="bs-example form-horizontal" method="POST">
  <?php 
$i = 1;
foreach ($content as $item) {
    echo '<div class="form-group"><label class="col-lg-2 control-label">' . $item . '</label><div class="col-lg-10"><input type="text" class="form-control" name="t' . $i . '"></div></div>';
    $i++;
}
?>
Beispiel #9
0
<?php

include './conn/comment.php';
if (!$login) {
    $errtime = 3;
    $errcon = "请先登陆!";
    $errurl = "/action.php?ac=logininfo";
    include "./tpl/err.tpl";
}
if (!isset($_GET['id'])) {
    exit;
}
$_GET['id'] += 0;
$info = operate::getoneline('material', 'id=' . $_GET['id']);
if (!$info) {
    $errcon = "不存在信息";
    include "./tpl/err.tpl";
}
$table = operate::getoneline('materialtable', 'id=' . $info['mid'] . ' and uid=' . $login);
if (!$table) {
    $errcon = "不存在该表";
    include "./tpl/err.tpl";
}
operate::deletedata('material', 'id=' . $_GET['id']);
$errcon = "删除成功";
include "./tpl/succ.tpl";
Beispiel #10
0
}
if (isset($_POST['username'])) {
    define('ACCESS', '1');
    include 'conn/connect.php';
    include 'conn/operate.php';
    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 id from member where username = "******" and password="******"')))) {
        $errurl = "javascript:window.history.go(-1)";
        $errinfo = "用户名或者密码错误!";
        include 'templete/err.html';
    }
    operate::loginsession($_POST['username']);
    header("Location: member.php");
}
?>
<!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';
?>
<script>
function userLogin()
{
Beispiel #11
0
if (!$login) {
    $errtime = 3;
    $errcon = "请先登陆!";
    $errurl = "/action.php?ac=logininfo";
    include "./tpl/err.tpl";
}
if (!isset($_GET['id'])) {
    exit;
}
$_GET['id'] += 0;
$info = operate::getoneline('material', 'id=' . $_GET['id']);
if (!$info) {
    $errcon = "不存在信息";
    include "./tpl/err.tpl";
}
$table = operate::getoneline('materialtable', 'id=' . $info['mid'] . ' and uid=' . $login);
if (!$table) {
    $errcon = "不存在该表";
    include "./tpl/err.tpl";
}
$content = unserialize($table['info']);
$edit = unserialize($info['info']);
?>
<section class="panel panel-default" style="margin-left:15%;width:70%;margin-top:5%">
<header class="panel-heading font-bold">编辑数据</header>
<div class="panel-body">
  <form class="bs-example form-horizontal" method="POST">
  <?php 
$i = 1;
foreach ($content as $item) {
    echo '<div class="form-group"><label class="col-lg-2 control-label">' . $item . '</label><div class="col-lg-10"><input type="text" class="form-control" name="t' . $i . '" value="';
Beispiel #12
0
.input-group label{padding:2% 0;position:absolute;color:#595757}
.input-group input{margin-left:10em;padding:3% 5%	;box-sizing:border-box;background:#efeff0;border:0;border-radius:5px;color:#595757;width:100%}
.odform button{ background:#CC0000 ;color:#00FF00;text-align:center;border:0;border-radius:10px;padding:3%;width:100%;font-size:16px}
.odform .cal{background-image:url(style/images/daetixian-cal.png);background-repeat:no-repeat;background-position:95% center;background-size:auto 50%}
.odform .xl{background-image:url(style/images/daetixian-xl.png);background-repeat:no-repeat;background-position:95% center;background-size:auto 20%}
</style>





<?php 
$id = $_GET['id'];
// echo $id;
$userinfo = operate::getoneline("member", "username='******'username'] . "'");
$iteminfo = operate::getoneline("crafts", "id={$id}");
include "templete/header.html";
// echo $iteminfo['type'];
// echo $userinfo['qq'];
?>

<div class="blank"></div>
<div class="module fl wfs">
	<div class="cover-page-details fl wfs bcf2">
        <div class="cover-page-wrapper">
            <div class="place fz12" style="padding-left:20px;">
    <a href=".">主页</a> <code>&gt;</code> <a href="#"><?php 
echo $iteminfo['type'];
?>
</a> <code>&gt;</code> <?php 
echo $iteminfo['name'];
Beispiel #13
0
         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>&gt;</code> <a href="#">手工艺众筹 - <?php 
Beispiel #14
0
<?php

//入口 目录+文件
include './conn/comment.php';
if (!isset($_GET['id'])) {
    $errcon = "网址有误,请确定后重试";
    include "./tpl/err.tpl";
}
$_GET['id'] += 0;
$table = operate::getoneline('materialtable', 'id=' . $_GET['id']);
$content = unserialize($table['info']);
if (!$table) {
    $errcon = "不存在该表";
    include "./tpl/err.tpl";
}
include "./tpl/materials.tpl";
Beispiel #15
0
<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 
}
Beispiel #16
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";
}
Beispiel #17
0
<?php

header("Content-type: text/html; charset=utf-8");
define('ACCESS', '1');
session_start();
include 'conn/connect.php';
include 'conn/operate.php';
$_POST['title'] = '测试标题';
$_POST['money'] = '100';
$pic = 'picxx';
$id = 55;
$place = "北京邮电大学宏福校区";
$post_string = "key=ba8a19891a7cb1bc3e2f3411d01d9035&tableid=548fbe84e4b0d0b861454b2c&loctype=2&data={'_name'='sb振东','_address'='北京邮电大学宏福校区','img'='" . $pic . "','id'='" . $id . "','money'='" . $_POST['money'] . "'}";
//$post_string="key=ba8a19891a7cb1bc3e2f3411d01d9035&tableid=548fbe84e4b0d0b861454b2c&loctype=2&data={'_name'='".$_POST['title']."','_address'='".$place."','img'='".$pic."','id'='".$id."','money'='".$_POST['money']."'}";
//echo operate::file_get_contents_post('http://www.olrenting.com/2try.php',$post_string);
//$post_string="key=ba8a19891a7cb1bc3e2f3411d01d9035&tableid=548fbe84e4b0d0b861454b2c&loctype=2&data={'_name'='".$_POST['title']."','_address'='".$place."','img'='".$pic."','id'='".$id."','money'='".$_POST['money']."'}";
echo operate::file_get_contents_post('http://yuntuapi.amap.com/datamanage/data/create', $post_string);
?>
<!--$post_string="key=ba8a19891a7cb1bc3e2f3411d01d9035&tableid=tableid&loctype=2&data={'_name'='".$_POST['title']."','_address'='".$place."','img'='"."$pic"."','id'='"."$id"."','money'='"."$_POST['money']"."'}";
Beispiel #18
0
                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';