<!DOCTYPE html>
<?php include("admin/include/connection.php"); ?>
<?php
	$selectarraypersonal=mysql_fetch_array(mysql_query("select * from `personal`"));
	?>
<html lang="en">

<head>
      
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
	<title><?php echo $selectarraypersonal['title']; ?></title>
	<meta name="keywords" content="<?php echo $selectarraypersonal['keywords']; ?>" />
    <meta name="description" content="<?php echo $selectarraypersonal['description']; ?>">
    <meta name="author" content="www.500.host">

    

    <!-- Bootstrap Core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <link href="css/freelancer.css" rel="stylesheet" type="text/css">

    <!-- Fonts -->
    <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>

    <!-- IE8 support for HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
	<link href="admin/vendors/jGrowl/jquery.jgrowl.css" rel="stylesheet" media="screen">
	 

</head>

<body id="page-top" class="index">

    <!-- Navigation -->
    <nav class="navbar navbar-default navbar-fixed-top">
        <div class="container">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header page-scroll">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#page-top"><?php echo $selectarraypersonal['name']; ?></a>
            </div>

            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav navbar-right">
                    <li class="hidden">
                        <a href="#page-top"></a>
                    </li>
					<li class="page-scroll">
                        <a href="#chanpin">产品价格</a>
                    </li>
                    <li class="page-scroll">
                        <a href="#portfolio">客户案例</a>
                    </li>
                    <li class="page-scroll">
                        <a href="#about">关于我们</a>
                    </li>
                    <li class="page-scroll">
                        <a href="#contact">联系我们</a>
                    </li>
					<?php
					$sociallinks=mysql_fetch_array(mysql_query("select * from `social_links`"));
					?>
					
					<li class="page-scroll">
                        <a href="<?php echo $sociallinks['facebook']; ?>">客户中心</a>
                    </li>
					
                </ul>
            </div>
            <!-- /.navbar-collapse -->
        </div>
        <!-- /.container-fluid -->
    </nav>

    <header>
	
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <img class="img-responsive" src="admin/imagesupload/<?php echo $selectarraypersonal['photo']; ?>" alt="">
                    <div class="intro-text">
                        <span class="name"><?php echo $selectarraypersonal['name']; ?></span>
                        <hr class="star-light">
                        <span class="skills"><?php echo $selectarraypersonal['experience']; ?></span>
                    </div>
                </div>
            </div>
        </div>
    </header>
	
 <section id="chanpin" class="center-block">
        <div class="row pricing-table" id="">
			  <?php
				$selectservice=mysql_query("select * from `service`");
while($selectarrayservice=mysql_fetch_array($selectservice))
													{
														?>
			<div class="col-sm-4">
                <div class="panel panel-success">
                    <div class="panel-heading" id=""><?php echo $selectarrayservice['service_name']; ?></div>
                    <div class="panel-body">
                        <h2 id=""><div class="price"><span class="dollar-sign">￥</span><?php echo $selectarrayservice['jiage']; ?></div><span class="time-period">/ 月</span></h2>
                    </div>

                    <ul class="list-group">
                        <li class="list-group-item"><i class="fa fa-check text-success"></i><?php echo $selectarrayservice['shuxing']; ?></li>
                        <li class="list-group-item"><i class="fa fa-check text-success"></i><?php echo $selectarrayservice['shuxing2']; ?></li>
                        <li class="list-group-item"><i class="fa fa-check text-success"></i> <?php echo $selectarrayservice['shuxing3']; ?></li>
                        <li class="list-group-item"><i class="fa fa-check text-success"></i> <?php echo $selectarrayservice['shuxing4']; ?></li>
                        <li class="list-group-item"><i class="fa fa-check text-success"></i> <?php echo $selectarrayservice['shuxing5']; ?></li>
                    </ul>

                    <a  href="<?php echo $selectarrayservice['url']; ?>">
                    <button class="btn btn-success">马上开通</button></a>
                </div>
            </div>
			<?php
				}
				?>
            </div>
        </div>
    </section>
		
    <section id="portfolio">
        <div class="container">
            <div class="row">
                <div class="col-lg-12 text-center">
                    <h2>我们的客户</h2>
                    <hr class="star-primary">
                </div>
            </div>
            <div class="row">
			<?php
			$selectportfolio=mysql_query("select * from `portfolio`");
			while($selectarrayportfolio=mysql_fetch_array($selectportfolio))
			{
			?>
                <div class="col-sm-4 portfolio-item">
                    <a href="#portfolioModal<?php echo $selectarrayportfolio['portfolio_id'];  ?>" class="portfolio-link" data-toggle="modal">
                        <div class="caption">
                            <div class="caption-content">
                                <i class="fa fa-search-plus fa-3x"></i>
                            </div>
                        </div>
                        <img  class="img-responsive" src="admin/imagesportfolio/<?php echo $selectarrayportfolio['portfoilo_image'];  ?>" alt="" />
                    </a>
                </div>
				<?php
				}
				?>
                
               
               
                
            </div>
        </div>
    </section>
	
<?php
$selectabout=mysql_fetch_array(mysql_query("select * from `about`"));
?>
    <section class="success" id="about">
        <div class="container">
            <div class="row">
                <div class="col-lg-12 text-center">
                    <h2>关于我们</h2>
                    <hr class="star-light">
                </div>
            </div>
            <div class="row">
                <div class="col-lg-4 col-lg-offset-2">
                    <p>
					<?php echo $selectabout['col1']; ?>
					</p>
                </div>
                <div class="col-lg-4">
                    <p>
					<?php echo $selectabout['col2']; ?>
					</p>
                </div>
                <div class="col-lg-8 col-lg-offset-2 text-center">
                    
                </div>
            </div>
        </div>
    </section>

    <section id="contact">
        <div class="container">
            <div class="row">
                <div class="col-lg-12 text-center">
                    <h2>联系我们</h2>
                    <hr class="star-primary">
                </div>
            </div>
            <div class="row">
                <div class="col-lg-8 col-lg-offset-2">
                    <form role="form" method="post" action="#">
                        <div class="row">
                            <div class="form-group col-xs-12 floating-label-form-group">
                                <label for="name">名字</label>
                                <input class="form-control" type="text" name="name" placeholder="名字">
                            </div>
                        </div>
                        <div class="row">
                            <div class="form-group col-xs-12 floating-label-form-group">
                                <label for="email">电子邮件</label>
                                <input class="form-control" type="email" name="email" placeholder="电子邮件">
                            </div>
                        </div>
                        <div class="row">
                            <div class="form-group col-xs-12 floating-label-form-group">
                                <label for="message">留言内容</label>
                                <textarea placeholder="留言内容" name="message" class="form-control" rows="5"></textarea>
                            </div>
                        </div>
                        <br>
                        <div class="row">
                            <div class="form-group col-xs-12">
                                <button type="submit" name="submit" class="btn btn-lg btn-success">发送</button>
                            </div>
                        </div>
                    </form>
					
                </div>
            </div>
        </div>
    </section>

    <footer class="text-center">
        <div class="footer-above">
            <div class="container">
                <div class="row">
                    <div class="footer-col col-md-4">
                        <h3>产品中心</h3>
                        <?php
						echo $selectarraypersonal['location'];
						?>
                    </div>
                    <div class="footer-col col-md-4">
					<?php
					$sociallinks=mysql_fetch_array(mysql_query("select * from `social_links`"));
					?>
                        <h3>快速导航</h3>
						<p><a target="_blank" rel="nofollow" href="<?php echo $sociallinks['facebook']; ?>">客户中心</a><br>
						<a target="_blank" rel="nofollow" href="<?php echo $sociallinks['google-plus']; ?>">官方公告</a><br>
						<a target="_blank" rel="nofollow" href="<?php echo $sociallinks['twitter']; ?>">优惠信息</a><br>
						<a target="_blank" rel="nofollow" href="<?php echo $sociallinks['linkedin']; ?>">官方博客</a><br>
						<a target="_blank" rel="nofollow" href="<?php echo $sociallinks['dribbble']; ?>">帮助中心</a><br>
                       
                    </div>
                    <div class="footer-col col-md-4">
                        <h3>联系方式</h3>
                        <p><?php
						echo $selectarraypersonal['aboutme'];
						?></p>
                    </div>
                </div>
            </div>
        </div>
        <div class="footer-below">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12">
                        Powered by <strong><a href="http://www.500.host" target="_blank">500PHP!</a></strong> <em>X1.0</em> | Copyright &copy;  <?php echo date("Y"); ?>  - <?php echo $selectarraypersonal['name']; ?>
                    </div>
                </div>
            </div>
        </div>
    </footer>

    <div class="scroll-top page-scroll visible-xs visble-sm">
        <a class="btn btn-primary" href="#page-top">
            <i class="fa fa-chevron-up"></i>
        </a>
    </div>

    <!-- Portfolio Modals -->
	<?php
	$selectport=mysql_query("select * from `portfolio`");
	while($selectportarray=mysql_fetch_array($selectport))
	{
	?>
    <div class="portfolio-modal modal fade" id="portfolioModal<?php echo $selectportarray['portfolio_id']; ?>" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-content">
            <div class="close-modal" data-dismiss="modal">
                <div class="lr">
                    <div class="rl">
                    </div>
                </div>
            </div>
            <div class="container">
                <div class="row">
                    <div class="col-lg-8 col-lg-offset-2">
                        <div class="modal-body">
                            <h2><?php echo $selectportarray['portfolio_title']; ?></h2>
                            <hr class="star-primary">
                            <img src="admin/imagesportfolio/<?php echo $selectportarray['portfoilo_image']; ?>" class="img-responsive img-centered" alt="">
                            <p>
							<?php echo $selectportarray['portfolio_desc']; ?>
							</p>
                            <ul class="list-inline item-details">
                                <li>客户: <strong><?php echo $selectportarray['client_name']; ?></strong>
                                </li>
                                <li>发布时间: <strong><?php echo $selectportarray['date']; ?></strong>
                                </li>
								<?php
								$serviceid=$selectportarray['service_id'];
								$selectservice=mysql_fetch_array(mysql_query("select * from `service` where `service_id`='$serviceid'"));
								?>
                                <li>使用产品: <strong><?php echo $selectservice['service_name']; ?></strong>
                                </li>
                            </ul>
                            <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-times"></i> Close</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
	<?php
	}
	?>
    
    
    
    
    

    <script src="js/jquery-1.10.2.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
    <script src="js/classie.js"></script>
    <script src="js/cbpAnimatedHeader.js"></script>
    <script src="js/freelancer.js"></script>
	<script src="admin/vendors/jGrowl/jquery.jgrowl.js"></script>

</body>
<?php
		  if(isset($_POST['submit']))
		  {
		  $name=$_POST['name'];
  $message=$_POST['message'];
  $email =$_POST['email'];

$headers = 'From: '.$email."\r\n".
'Reply-To: '.$email."\r\n" .
'X-Mailer: PHP/' . phpversion();
  $msg="Name :".$name."\n"."Message:".$message;
  $to=$selectarraypersonal['email'];
   
  mail($to,'new message',$msg,$headers); 
 echo"
<script>
$(function() {
$.jGrowl('你的留言发送成功，我们马上跟你联系', { header: 'Email' });
});
</script>
";

		  }
		  ?>

</html>