Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- ini_set('session.gc_maxlifetime', 1*30*60);
- session_start();
- include "db/conn.php";
- if($_SESSION["logged_in"] == 1)
- {
- $userQuery = mysql_query("SELECT * FROM brugere WHERE id='$_SESSION[user_id]'");
- $userArray = mysql_fetch_array($userQuery);
- ?>
- <!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>ANPOmedia - Bestilling af website</title>
- <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
- <link href="style.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="js/prototype.js"></script>
- <script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
- <script type="text/javascript" src="js/lightbox.js"></script>
- <script type="text/javascript" src="js/jquery-latest.js"></script>
- <script type="text/javascript">
- jQuery.noConflict();
- (function($){
- // Din jQuery kode her!
- })(jQuery);
- </script>
- </head>
- <body>
- <form name="index1" id="index1" method="post" action="index3.php">
- <table width="1000" border="0" cellpadding="0" cellspacing="0" align="center">
- <tr>
- <td colspan="2" align="center" valign="top" class="header"><?
- // Eksempel på indhold
- echo "Hej " . $userArray["brugernavn"] . "!
- <br>
- <img src='img/2.png' border='0'>";
- if($_GET['msg'])
- {
- ?>
- <h1> <? echo $_GET['msg']?></h1>
- <?
- }
- ?></td>
- </tr>
- <tr>
- <td valign="top" class="menu">
- <h3 align="center">Vælg branche</h3>
- <? if($_GET['id']!='' && $_GET['id']!=NULL)
- {
- $where=" and cat_id=$_GET[id]";
- }
- ?>
- <ul class="sidemenu">
- <? $r=mysql_query("select * from category where enable='Yes' order by sorting");
- while($row=mysql_fetch_array($r))
- {
- ?>
- <li><a class="<?if($_GET['id']==$row['cat_id']){ echo active;}?>" href="index.php?id=<? echo $row['cat_id'];?>" title="<? echo $row['cat_name'];?>"><? echo $row['cat_name'];?></a></li>
- <?
- }
- ?>
- </ul>
- <br />
- </td>
- <td valign="top" class="content"><? $r=mysql_query("select * from product where suspend='No' $where");
- $i=1;
- if(mysql_num_rows($r)>0)
- {
- while($product=mysql_fetch_array($r))
- {
- ?>
- <div style="width:50%;float:left;" class="<?if($i%4!=0) {?>devider<?}?>" >
- <table width="100%" border="0" cellspacing="0" cellpadding="3">
- <tr valign="top">
- <td class="phone-title"><div align="center"><h2><?echo $product['title'];?></h2></div></td>
- </tr>
- <tr>
- <td width="90%"><div align="center"><a href="proimgs/th/<? echo $product['pro_thumb'];?>" rel="lightbox"><img src="proimgs/th/<?echo $product['pro_thumb'];?>" height="240" border="0"></a></div></td>
- </tr>
- <tr>
- <td width="24%" height="60" align="center" class="phone-price">
- <input type="radio" name="price" id="<? echo $product['prod_id']?>" <? if($_SESSION['price']==6 && $_SESSION['product']==$product['prod_id']){ echo checked;}?> value="6"/></td>
- </tr>
- <tr>
- <td colspan="2">Farve:
- <table width="90%" border="0" align="right" cellpadding="0" cellspacing="0">
- <tr>
- <?$colors=explode(',',$product['color']);
- foreach($colors as $key=>$value)
- {
- ?>
- <td align="center"><img src="img/colors/<?echo $value?>.png" width="18" height="8" alt="Sort"></td>
- <? }?>
- </tr>
- <tr>
- <?
- foreach($colors as $key=>$value)
- {
- ?>
- <td align="center"><input type="radio" name="color" id="<? echo $product['prod_id']?>" value="<? echo $value?>" <? if($_SESSION['color']==$value && $_SESSION['product']==$product['prod_id']){ echo checked;}?> ></td>
- <? }?>
- </tr>
- </table></td>
- </tr>
- </table>
- </div>
- <?
- $i++;
- }
- }
- else{
- echo "Der er ingen designs i denne kategori.";
- }
- ?>
- </td>
- </tr>
- <div style="visibility:hidden">
- <input type="text" name="product" id="product" value="<? echo $_SESSION['product'];?>">
- </div>
- </div>
- </div>
- <script>
- $('#index1').submit(function() {
- var color=$('input[name=color]:checked').attr('id');
- var price=$('input[name=price]:checked').attr('id');
- if(color!=undefined && price!=undefined)
- {
- if(color==price )
- {
- return true;
- }
- else
- {
- alert('Vælg venligst et design og en farve, af samme slags!') ;
- return false;
- }
- }
- else
- {
- alert('Vælg venligst et design!') ;
- return false;
- }
- });
- $('input[name=color]').click(function() {
- var value = $('input[name=color]:checked').attr('id');
- $('#product').attr('value', value);
- });
- </script>
- <tr>
- <td valign="top" class="footer" colspan="2">
- <a href="logud.php"><img src="img/logud.png" / border="0"></a>
- <div align="right">
- <input name="submit" type="submit" value="" style="background:url(img/next.png); width:90px; height:32px; border:0; cursor:pointer;" />
- </div>
- </td>
- </form>
- </td>
- </tr>
- </tr>
- </table>
- <?php
- }
- else
- {
- include "login.html";
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement