[ Index ]

PHP Cross Reference of phpwcms V1.4.3 _r380 (23.11.09)

title

Body

[close]

/include/inc_act/ -> act_bid.php (source)

   1  <?php
   2  /*************************************************************************************
   3     Copyright notice
   4     
   5     (c) 2002-2009 Oliver Georgi (oliver@phpwcms.de) // All rights reserved.
   6   
   7     This script is part of PHPWCMS. The PHPWCMS web content management system is
   8     free software; you can redistribute it and/or modify it under the terms of
   9     the GNU General Public License as published by the Free Software Foundation;
  10     either version 2 of the License, or (at your option) any later version.
  11    
  12     The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html
  13     A copy is found in the textfile GPL.txt and important notices to the license 
  14     from the author is found in LICENSE.txt distributed with these scripts.
  15    
  16     This script is distributed in the hope that it will be useful, but WITHOUT ANY 
  17     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  18     PARTICULAR PURPOSE.  See the GNU General Public License for more details.
  19   
  20     This copyright notice MUST APPEAR in all copies of the script!
  21  *************************************************************************************/
  22  
  23  // session_name('hashID');
  24  session_start();
  25  $phpwcms = array();
  26  $ref = $_SESSION['REFERER_URL'];
  27  
  28  
  29  require_once ('../../config/phpwcms/conf.inc.php');
  30  require_once  ('../inc_lib/default.inc.php');
  31  require_once  (PHPWCMS_ROOT.'/include/inc_lib/dbcon.inc.php');
  32  require_once  (PHPWCMS_ROOT.'/include/inc_lib/general.inc.php');
  33  checkLogin();
  34  require_once  (PHPWCMS_ROOT.'/include/inc_lib/backend.functions.inc.php');
  35  
  36  ?>
  37  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  38  <html xmlns="http://www.w3.org/1999/xhtml">
  39  <head>
  40  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  41  <title>phpwcms Backend Bid</title>
  42  <style type="text/css">
  43  <!--
  44  body,td,th {
  45      font-family: Verdana, Arial, Helvetica, sans-serif;
  46      font-size: 10px;
  47      color: #000000;
  48  }
  49  body {
  50      background-color: #F3F4F5;
  51      margin-left: 3px;
  52      margin-top: 3px;
  53      margin-right: 3px;
  54      margin-bottom: 3px;
  55      width: 417px;
  56  }
  57  a {
  58      font-family: Verdana, Arial, Helvetica, sans-serif;
  59      font-size: 10px;
  60      color: #000000;
  61  }
  62  a:visited {
  63      color: #000000;
  64  }
  65  a:active {
  66      color: #000000;
  67  }
  68  -->
  69  </style></head>
  70  
  71  <body>
  72  <table width="100%" border="0" cellpadding="2" cellspacing="0" summary="">
  73  <?php
  74  if(intval($_GET['del'])) {
  75      
  76      $sql  = "UPDATE ".DB_PREPEND."phpwcms_bid SET ";
  77      $sql .= "bid_trashed=9 WHERE bid_cid=";
  78      $sql .= intval($_GET['cid'])." AND bid_id=".intval($_GET['del']);
  79      $sql .= " LIMIT 1;";
  80      mysql_query($sql, $db);
  81  
  82  }
  83  
  84  $sql  = "SELECT *, UNIX_TIMESTAMP(bid_created) AS bid_date FROM ".DB_PREPEND."phpwcms_bid WHERE bid_cid=";
  85  $sql .= intval($_GET['cid'])." AND bid_trashed=0 ORDER BY bid_verified DESC, bid_amount DESC;";
  86  $c = 0;
  87  if($result = mysql_query($sql, $db)) {
  88  
  89      while($row = mysql_fetch_assoc($result)) {
  90      
  91          if($row['bid_verified']) {
  92              $em = '<strong><a href="mailto:'.html_specialchars($row['bid_email']).'">'.html_specialchars($row['bid_email']).'</a></strong>';
  93              $es = '';
  94          } else {
  95              $em = html_specialchars($row['bid_email']);
  96              $es = ' style="color:#979EAA"';
  97          }
  98  
  99  ?>
 100    <tr bgcolor="#E7E8EB">
 101      <td><strong><?php echo date('d-m-Y H:i:s', intval($row['bid_date'])) ?></strong></td>
 102      <td align="right"><a href="act_bid.php?<?php echo 'cid='.$row['bid_cid'].'&amp;del='.$row['bid_id'] ?>" target="_self"><img src="../../img/button/del_11x11.gif" alt="delete bid" width="11" height="11" border="0" /></a></td>
 103    </tr>
 104    <tr>
 105      <td<?php echo $es ?>><?php echo $em; ?></td>
 106      <td align="right"<?php echo $es ?>><strong><?php echo number_format($row['bid_amount'], 2, ',', '.'); ?></strong>&nbsp;&nbsp;&nbsp;&nbsp;</td>
 107    </tr>
 108    <tr><td colspan="2"><img src="../../img/leer.gif" alt="" width="1" height="1" /></td></tr>
 109  <?php
 110          $c++;
 111      }
 112      mysql_free_result($result);
 113  }
 114  
 115  // if no bid entry available
 116  if(!$c) {
 117  ?><tr>
 118      <td colspan="2">No bids available</td>
 119    </tr>
 120  <?php
 121  }
 122  
 123  ?>
 124  </table>
 125  </body>
 126  </html>


Generated: Wed Dec 30 05:55:15 2009 Cross-referenced by PHPXref 0.7