当前位置: 首页>>代码示例>>PHP>>正文


PHP Item::setStatus方法代码示例

本文整理汇总了PHP中Item::setStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP Item::setStatus方法的具体用法?PHP Item::setStatus怎么用?PHP Item::setStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Item的用法示例。


在下文中一共展示了Item::setStatus方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: fromRow

 /**
  * @brief 
  * @param row a row from the items table of the database
  * @returns an object of the class OC_News_Item
  */
 public function fromRow($row)
 {
     $url = $row['url'];
     $title = $row['title'];
     $guid = $row['guid'];
     $body = $row['body'];
     $id = $row['id'];
     $item = new Item($url, $title, $guid, $body, $id);
     $item->setStatus($row['status']);
     $item->setAuthor($row['author']);
     $item->setDate(Utils::dbtimestampToUnixtime($row['pub_date']));
     return $item;
 }
开发者ID:blablubli,项目名称:owncloudapps,代码行数:18,代码来源:itemmapper.php

示例2: autoMail

 function autoMail()
 {
     global $database;
     //$itemsArr = array();
     $today = date("Y-m-d");
     $this->query = "select * from  items where BidEndOn ='{$today}' AND highest_bid!=0";
     $result = mysql_query($this->query);
     while ($row = mysql_fetch_array($result)) {
         $item = new Item();
         $item->setItemId($row["ItemID"]);
         $item->setTitle($row["Title"]);
         $item->setMinPrice($row["min_price"]);
         $item->setCategory($row["Category"]);
         $item->setOwnerId($row["OwnerID"]);
         $ad = date("Y-m-d H:i:s", strtotime($row['addedOn']));
         $item->setHighestBid($row["highest_bid"]);
         $item->setAddedOn($ad);
         $item->setBiddingEndOn($row["BidEndOn"]);
         $item->setDesc($row["Description"]);
         $item->setStatus($row["Status"]);
         $this->query = "SELECT PicDate,PicPath FROM itempics WHERE OwnId = " . $item->ownerId . " AND PicDate = '" . $ad . "'";
         $res = mysql_query($this->query);
         $r = mysql_fetch_array($res);
         $item->setPicPath($r['PicPath']);
         $this->query = "select email from user where UserID={$item->ownerId}";
         $res = mysql_query($this->query);
         $r = mysql_fetch_row($res);
         $OwnerEmail = $r[0];
         $this->query = "select bids.BidderID from items INNER JOIN bids ON items.highest_bid=bids.amount where items.ItemID ={$item->itemId}";
         $res = mysql_query($this->query);
         $r = mysql_fetch_row($res);
         $bidderId = $r[0];
         $this->query = "select email from user where UserID={$bidderId}";
         $res = mysql_query($this->query);
         $r = mysql_fetch_row($res);
         $WinnerEmail = $r[0];
         echo "\nOwner email:" . $OwnerEmail . "\n";
         echo "\nWinner email:" . $WinnerEmail . "\n";
         $this->query = "update account set balance=balance+{$item->highestBid} where UserID={$item->ownerId}";
         mysql_query($this->query);
         $this->query = "delete from bids where ItemID={$item->itemId}";
         mysql_query($this->query);
         $this->query = "update items set OwnerId ={$bidderId}, status='sold' where ItemID={$item->itemId}";
         mysql_query($this->query);
         $this->query = "insert into WonItems (winnerId,ownerId) values ({$bidderId}, {$item->ownerId} )";
         mailForOwner($OwnerEmail, $item);
         mailForWinner($WinnerEmail, $item);
     }
 }
开发者ID:ArslanAle,项目名称:eVeiling,代码行数:49,代码来源:AutoDao.php

示例3: fromRow

 /**
  * @brief
  * @param row a row from the items table of the database
  * @returns an object of the class OC_News_Item
  */
 public function fromRow($row)
 {
     $url = $row['url'];
     $title = $row['title'];
     $guid = $row['guid'];
     $body = $row['body'];
     $id = $row['id'];
     $item = new Item($url, $title, $guid, $body, $id);
     $item->setStatus($row['status']);
     $item->setAuthor($row['author']);
     $item->setFeedId($row['feed_id']);
     $item->setDate(Utils::dbtimestampToUnixtime($row['pub_date']));
     if ($row['enclosure_mime'] !== null && $row['enclosure_link'] !== null) {
         $enclosure = new Item_Enclosure();
         $enclosure->setMimeType($row['enclosure_mime']);
         $enclosure->setLink($row['enclosure_link']);
         $item->setEnclosure($enclosure);
     }
     return $item;
 }
开发者ID:netcon-source,项目名称:apps,代码行数:25,代码来源:itemmapper.php

示例4: getItem

 function getItem($id)
 {
     global $database;
     $item = new Item();
     $this->query = "select * from items where ItemID='{$id}'";
     $result = mysql_query($this->query);
     if (mysql_num_rows($result) > 0) {
         $row = mysql_fetch_row($result);
         $item->setItemId($row[0]);
         $item->setTitle($row[1]);
         $item->setMinPrice($row[2]);
         $item->setHighestBid($row[3]);
         $item->setCategory($row[4]);
         $item->setOwnerId($row[5]);
         $item->setAddedOn($row[6]);
         $item->setBiddingEndOn($row[7]);
         $item->setDesc($row[8]);
         $item->setStatus($row[9]);
     }
     return $item;
 }
开发者ID:ArslanAle,项目名称:eVeiling,代码行数:21,代码来源:ItemDao.php

示例5: testToExport

 public function testToExport()
 {
     $item = new Item();
     $item->setId(3);
     $item->setGuid('guid');
     $item->setGuidHash('hash');
     $item->setUrl('https://google');
     $item->setTitle('title');
     $item->setAuthor('author');
     $item->setPubDate(123);
     $item->setBody('body');
     $item->setEnclosureMime('audio/ogg');
     $item->setEnclosureLink('enclink');
     $item->setFeedId(1);
     $item->setStatus(0);
     $item->setRead();
     $item->setStarred();
     $item->setLastModified(321);
     $feed = new Feed();
     $feed->setLink('http://test');
     $feeds = array("feed1" => $feed);
     $this->assertEquals(array('guid' => 'guid', 'url' => 'https://google', 'title' => 'title', 'author' => 'author', 'pubDate' => 123, 'body' => 'body', 'enclosureMime' => 'audio/ogg', 'enclosureLink' => 'enclink', 'unread' => false, 'starred' => true, 'feedLink' => 'http://test'), $item->toExport($feeds));
 }
开发者ID:hroo772,项目名称:news,代码行数:23,代码来源:ItemTest.php

示例6: getItems

 static function getItems(Feed &$feed)
 {
     $fid = $feed->getId();
     $text = $feed->getMessage();
     static::doParse($text);
     $assocs = static::$array;
     $result = array();
     foreach ($assocs as $index => $assoc) {
         $item = new Item();
         $item->setId($fid . '_' . $index);
         $item->setFeed($feed);
         if (isset($assoc['type'])) {
             $item->setType($assoc['type']);
         } else {
             $item->setType('GLOBAL');
         }
         if (isset($assoc['description'])) {
             $item->setDescription($assoc['description']);
         }
         if (isset($assoc['global'])) {
             $item->setGlobal($assoc['global']);
         }
         if (isset($assoc['name'])) {
             $item->setName($assoc['name']);
         }
         if (isset($assoc['note'])) {
             $item->setNote($assoc['note']);
         }
         if (isset($assoc['price_digit'])) {
             $item->setPrice($assoc['price_digit']);
         }
         if (isset($assoc['price'])) {
             $item->setPriceStr($assoc['price']);
         }
         if (isset($assoc['status'])) {
             $item->setStatus($assoc['status']);
         }
         $result[] = $item;
     }
     if (!$result) {
         $item = new Item();
         $item->setId($fid . '_0');
         $item->setFeed($feed);
         $item->setType('GLOBAL');
         $item->setGlobal($text);
         $result[] = $item;
     }
     return $result;
 }
开发者ID:hchsiao,项目名称:xdbrowser-DEPRECATED,代码行数:49,代码来源:ItemFactory.php

示例7: Item

session_start();
require_once 'Logic/ItemLogic.php';
$title = $_POST['title'];
$minPrice = $_POST['minPrice'];
$category = $_POST['category'];
$Enddate = $_POST['inputDate'];
$desc = $_POST['desc'];
$item = new Item();
$item->setTitle($title);
$item->setMinPrice($minPrice);
$item->setCategory($category);
$item->setBiddingEndOn($Enddate);
$item->setDesc($desc);
$item->setOwnerId($_SESSION['user']);
//($_SESSION['user']);
$item->setStatus("available");
$itemLogic = new ItemLogic();
$itemLogic->insertItem($item);
?>

<script type="text/javascript">
	

</script>
<div class="c">
<form id="abc" method="post">
<div id="file-uploader-demo1">		
		<noscript>			
			<p>Please enable JavaScript to use file uploader.</p>
			<!-- or put a simple form for upload here -->
		</noscript>         
开发者ID:ArslanAle,项目名称:eVeiling,代码行数:31,代码来源:itemPicUpload.php

示例8: getPostedItems

 function getPostedItems($id)
 {
     global $database;
     $itemsArr = array();
     $this->query = "select * from items where ownerid={$id}";
     $result = mysql_query($this->query);
     if ($result) {
         while ($row = mysql_fetch_array($result)) {
             $item = new Item();
             $item->setItemId($row["ItemID"]);
             $item->setTitle($row["Title"]);
             $item->setMinPrice($row["min_price"]);
             $item->setCategory($row["Category"]);
             $item->setOwnerId($row["OwnerID"]);
             $ad = date("Y-m-d H:i:s", strtotime($row['addedOn']));
             $item->setHighestBid($row["highest_bid"]);
             $item->setAddedOn($ad);
             $item->setBiddingEndOn($row["BidEndOn"]);
             $item->setDesc($row["Description"]);
             $item->setStatus($row["Status"]);
             $this->query = "SELECT PicDate,PicPath FROM itempics WHERE OwnId = " . $item->ownerId . " AND PicDate = '" . $ad . "'";
             $res = mysql_query($this->query);
             $r = mysql_fetch_array($res);
             $item->setPicPath($r['PicPath']);
             array_push($itemsArr, $item);
         }
         return $itemsArr;
     }
 }
开发者ID:ArslanAle,项目名称:eVeiling,代码行数:29,代码来源:ItemDao.php


注:本文中的Item::setStatus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。