• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP getItems函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getItems函数的典型用法代码示例。如果您正苦于以下问题:PHP getItems函数的具体用法?PHP getItems怎么用?PHP getItems使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: p16012_pack_rework

/**
 * 2007-2015 PrestaShop
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to [email protected] so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to http://www.prestashop.com for more information.
 *
 * @author    PrestaShop SA <[email protected]>
 * @copyright 2007-2015 PrestaShop SA
 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
 * International Registered Trademark & Property of PrestaShop SA
 */
function p16012_pack_rework()
{
    Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'configuration` (`id_configuration`, `name`, `value`, `date_add`, `date_upd`) VALUES (NULL, "PS_PACK_STOCK_TYPE", "0", NOW(), NOW())');
    $all_product_in_pack = Db::getInstance()->ExecuteS('SELECT `id_product_item` FROM ' . _DB_PREFIX_ . 'pack GROUP BY `id_product_item`');
    foreach ($all_product_in_pack as $value) {
        Db::getInstance()->execute('UPDATE ' . _DB_PREFIX_ . 'pack
		 	SET `id_product_attribute_item` = ' . (getDefaultAttribute($value['id_product_item']) ? getDefaultAttribute($value['id_product_item']) . ' ' : '0 ') . '
		 	WHERE `id_product_item` = ' . $value['id_product_item']);
    }
    $all_product_pack = Db::getInstance()->ExecuteS('SELECT `id_product_pack` FROM ' . _DB_PREFIX_ . 'pack GROUP BY `id_product_pack`');
    foreach ($all_product_pack as $value) {
        $work_with_stock = 1;
        $lang = Db::getInstance()->ExecuteS('SELECT value FROM ' . _DB_PREFIX_ . 'configuration WHERE `id_shop` = NULL AND `id_shop_group` = NULL AND `name` = "PS_LANG_DEFAULT"');
        $products = getItems($value['id_product_pack']);
        foreach ($products as $product) {
            if ($product != 1) {
                $work_with_stock = 0;
                break;
            }
        }
        if ($work_with_stock) {
            Db::getInstance()->execute('UPDATE ' . _DB_PREFIX_ . 'product SET `pack_stock_type` = 1 WHERE `id_product` = ' . (int) $value['id_product_pack']);
        }
    }
}
开发者ID:M03G,项目名称:PrestaShop,代码行数:49,代码来源:p16012_pack_rework.php


示例2: createFile

function createFile($file, $submodule, $start)
{
    $str = "/* Automatically built from PHP version: " . phpversion() . " */\n";
    $constants = get_defined_constants(true);
    getItems($constants[$submodule], $str, $start);
    $fp = fopen($file, 'w');
    fwrite($fp, $str);
    fclose($fp);
}
开发者ID:cbsistem,项目名称:php.js,代码行数:9,代码来源:constants.php


示例3: getSocialUser

function getSocialUser()
{
    global $twitterFollowers;
    global $facebookFriends;
    global $relationshipStatus;
    global $politicalViews;
    global $logFileHandle;
    $thisUser = getUserBasics();
    $yob = substr($thisUser["birthday"], 0, 4);
    $age = date("Y") - $yob;
    $userValues["domain"] = getDomain();
    fwrite($logFileHandle, "<p>The domain is " . $userValues["domain"]);
    $userValues["identifier"] = getIdentifier($userValues["domain"]);
    /******************* Facebook ************************/
    if ($userValues["domain"] == "facebook.com") {
        if ($age > 18 && rand(1, 100) > 20) {
            $userValues["profile"]["relationshipStatus"] = getRelationshipStatus($age);
        }
        // if (!empty($relStatus)) { $userValues["profile"]["relationshipStatus"] = $relStatus; }
        // get political views
        if ($thisUser["primaryAddress"]["country"] == "United States") {
            if (rand(1, 100) > 61) {
                $polViews = getRandomValue($politicalViews);
                $userValues["profile"]["politicalViews"] = skewPoliticalViews($polViews, $age, $thisUser["gender"], $thisUser["primaryAddress"]["stateAbbreviation"]);
            }
        }
        $range = getRandomValue($facebookFriends);
        $numberOfFBfriends = rand($range["min"], $range["max"]);
        fwrite($logFileHandle, "<p>The number of friends is: " . $numberOfFBfriends);
        $userValues["friends"] = getFriendsOrFollowersArray($numberOfFBfriends, $userValues["domain"]);
        //*************** Interests, Movies, Books, Music **************/
        // parameters: &attribute_name=profiles%23181683&uuid=ea1bc321-4320-4fbb-8f07-fb939b90cf46&value={"profile":{"interests":[{"interest":"scrapbooking"},{"interest":"cats"},{"interest":"dogs"}],"movies":[{"movie":"Platoon"},{"movie":"Star+Trek+Into+Darkness"}],"books":[{"book":"Call+It+Sleep"},{"book":"The+Death+of+the+Heart"},{"book":"The+French+Lieutenant%27s+Woman"}],"music":[{"music":"Britney+Spears"}]}}
        $psychInfoTypes = array("interests" => "interest", "movies" => "movie", "books" => "book", "music" => "music");
        foreach ($psychInfoTypes as $categoryName => $itemName) {
            $numberOfItems = getNumberOfItems($itemName);
            $itemString = $itemName . "s";
            if ($itemName == "music") {
                $itemString = $itemName . " artists";
            }
            fwrite($logFileHandle, "<p>The number of {$itemString} is: " . $numberOfItems);
            if ($numberOfItems > 0) {
                $userValues["profile"][$categoryName] = getItems($itemName, $numberOfItems);
            }
        }
    }
    /********************* Twitter ***********************/
    if ($userValues["domain"] == "twitter.com") {
        $range = getRandomValue($twitterFollowers);
        $numberOfTWfollowers = rand($range["min"], $range["max"]);
        fwrite($logFileHandle, "<p>The number of followers is: " . $numberOfTWfollowers);
        $userValues["followers"] = getFriendsOrFollowersArray($numberOfTWfollowers, $userValues["domain"]);
    }
    $thisUser["profiles"] = array();
    $thisUser["profiles"][] = $userValues;
    return $thisUser;
}
开发者ID:tomgsmith99,项目名称:j-rug,代码行数:56,代码来源:getSocialUser.php


示例4: main

function main()
{
    for ($i = 1;; $i++) {
        sleep(1000);
        $baseUri = "http://www.dianping.com/search/category/2/45/g146p" . $i;
        $urls = getItems($baseUri);
        $urls = removeRepeit($urls);
        if ($urls <= 0) {
            break;
        }
        for ($j = 0; $j < count($urls); $j++) {
            $result = getItemdetails($urls[$j]);
            saveData($result);
        }
    }
}
开发者ID:rayjun,项目名称:phpsp,代码行数:16,代码来源:dazhong.php


示例5: main

function main()
{
    //for($i = 1; ;$i++){
    //sleep(1000);
    $baseUri = "http://sports.qq.com/kbsweb/#nba";
    $urls = getItems($baseUri);
    echo $urls;
    //$urls = removeRepeit($urls);
    //if($urls<= 0){
    //   break;
    // }
    //for($j = 0; $j < count($urls); $j++){
    //  $result = getItemdetails($urls[$j]);
    //   saveData($result);
    //  }
    //}
}
开发者ID:rayjun,项目名称:phpsp,代码行数:17,代码来源:hunfun.php


示例6: getMosaicItems

function getMosaicItems($qstId)
{
    //echo "getMosaicItems()";
    $items = getItems($qstId);
    // filter 'more' item
    $more = getItemMore($items);
    //if(is_object($more))  $more = (Array)$more;
    if (count($items) > 0 && empty($more)) {
        echo "QST ID " . $qstId . " | MORE ({$more}) ID " . $more["item"]["id"];
        print_r($items);
        die("ERROR > Warning, no more item returned");
    }
    $list = array();
    foreach ($items as $item) {
        //if(is_object($item))  $item = (Array)$item;
        //echo $item["id"].",".$more["id"];
        if ($item->id != $more["id"]) {
            $list[] = $item;
        }
        //else echo "found item more id : ".$more["id"];
    }
    return $list;
}
开发者ID:ConcertUrbain,项目名称:handicap,代码行数:23,代码来源:api_handicap.php


示例7: array

    return;
}
if (!isset($userId)) {
    $resp = array("status" => "fail", "reason" => "no user id");
    echo json_encode($resp);
    return;
}
switch ($action) {
    case "add":
        $resp = addItem($inputArr);
        echo json_encode($resp);
        break;
    case "remove":
        $resp = deleteItem($itemId);
        echo json_encode($resp);
        break;
    case "get":
        $resp = getItems($photoId);
        echo json_encode($resp);
        break;
    default:
        $resp = array("status" => "fail", "reason" => "please send a valid action");
        echo json_encode($resp);
        break;
}
/* debug */
//$resp = addItem(array("name"=>"mike idea", "brand"=>"Ralph Lauren"));
//$resp = deleteItem('');
//$resp = getItems("");
//$resp = getFeatItems('kitchen');
//print_r($resp);
开发者ID:jahanzaibbahadur,项目名称:marknadlean-chat,代码行数:31,代码来源:index.php


示例8: getItems

     <div id="mscldiv" class="showit">
       <div class="rowDiv">
         <label for="ms0_col"> <span class="pad10"> <?php echo $l->m('ms_004'); ?> </span> </label>
         <input class="fldsm" onChange="selColor(this);" type="text" name="ms0_col" id="ms0_col" size="7" value="#ffffff" maxlength="7" onKeyUp="RemoveInvalidChars(this, '[^#A-Fa-f0-9]'); return false;" />
         <input onClick="selColor(this);" class="fldCol" type="button" name="ms0_icol" id="ms0_icol" value="" style="background-color: #ffffff;" alt="<?php echo $l->m('im_097'); ?>" title="<?php echo $l->m('im_097'); ?>" />
         <span class="frmText"> (<?php echo $l->m('to_098'); ?>: #ffffff) </span>
       </div>
     </div>
     <div id="msPrevDiv" class="showit">
       <div class="mtop10">
         <div class="rowDiv">
           <div class="btnRight">
             <img onClick="fullSizeView('ms'); return false;" src="images/prev_off.gif" onMouseOver="this.src='images/prev.gif';" onMouseOut="this.src='images/prev_off.gif';" alt="<?php echo $l->m('in_007'); ?>" title="<?php echo $l->m('in_007'); ?>" width="16" height="16" border="0" />
           </div>
           <div class="imgtbl">
             <?php echo getItems($cfg['mask'], 'ms', $cfg['valid']); ?>
           </div>
         </div>
       </div>
     </div>
   </div>
 </div>
 <!- // msDiv -->
 <!- wizard ----------------------------------------------------------- -->
 <div id="wzDiv" class="hideit">
   <div class="floatWrap">
     <!- wizard menu bar -------------------------------------------------- -->
     <div id="wzMenuBarDiv">
       <ul>
         <li class="btnUp" id="btn_wzsl"><img src="images/wzsl.gif" alt="<?php echo $l->m('wz_004'); ?>" title="<?php echo $l->m('wz_002'); ?>" width="16" height="16" /></li>
         <li class="btnUp" id="btn_wzbe"><img src="images/wzbe.gif" alt="<?php echo $l->m('wz_004'); ?>" title="<?php echo $l->m('wz_004'); ?>" width="16" height="16" /></li>
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:imanager.php


示例9: deleteAll

        //Move to index
        $submit = $es->index(['index' => $toIndex, 'type' => $toType, 'id' => $item['_id'], 'body' => $item['_source']]);
    }
}
function deleteAll($items, $index, $type)
{
    global $es;
    foreach ($items as $item) {
        $delete = $es->delete(['index' => $index, 'type' => $type, 'id' => $item['_id']]);
    }
}
if (isset($_SESSION['email']) && $_SESSION['email'] === '[email protected]') {
    if (!empty($origIndex)) {
        if (!empty($origType)) {
            //Get items in current index/type
            $items = getItems($origIndex, $origType);
            if (isset($items['hits']['hits'])) {
                echo "Backing up " . $items['hits']['total'] . " items<br>";
                //Backup and delete current items
                $items = $items['hits']['hits'];
                duplicate($items, $newIndex, $newType);
                echo "Deleting items in original index<br>";
                deleteAll($items, $origIndex, $origType);
                //Delte original index
                echo "Deleting original index<br>";
                $delete = $es->indices()->deleteMapping(['index' => $origIndex, 'type' => $origType]);
                echo $origIndex . "/" . $origType . " successfully moved to " . $newIndex . "/" . $newType . "<br>";
                echo "<a href='moveIndex.php?origIndex=" . $newIndex . "&origType=" . $newType . "&newIndex=" . $origIndex . "&newType=" . $origType . "'>Undo move</a>";
            } else {
                echo "No documents found";
            }
开发者ID:komcdo,项目名称:winnow,代码行数:31,代码来源:moveIndex.php


示例10: foreach

echo "<hr>QUESTIONS<hr>";
foreach ($qsts as $q) {
    var_dump($q);
    echo "<br/><br/>";
}
echo "<hr>EACH QUESTIONS<hr>";
foreach ($qsts as $q) {
    var_dump($q["id"]);
    echo "<br/>";
}
echo "<hr>QUESTION 76<hr>";
var_dump(getQuestion(76));
echo "<hr>CURRENT QUESTION<hr>";
var_dump(getCurrentQuestion());
echo "<hr>ITEMS<hr>";
$items = getItems(76);
var_dump($items);
echo "<hr>ITEM index 2<hr>";
$item = $items[2];
var_dump($item);
echo "<hr>ITEM MORE OF ITEMS<hr>";
$more = getItemMore($items);
var_dump($more);
echo "<hr>ITEM RATE<hr>";
$voteCount = getItemRate($item);
var_dump($voteCount);
echo "<hr>ITEM COMMENTS<hr>";
$voteCount = getItemComments($item);
var_dump($voteCount);
echo "<hr>SPECIFIC ITEM COMMENTS<hr>";
$item = getItem(79, 1367);
开发者ID:ConcertUrbain,项目名称:handicap,代码行数:31,代码来源:debug_index.php


示例11: quickItem

function quickItem($item)
{
    $q1 = "SELECT * FROM `itemList` WHERE itemId = '" . $item[0] . "'";
    $r1 = $GLOBALS['mysqli']->query($q1);
    $b1 = $r1->fetch_assoc();
    $itemVal = $b1['itemValue'];
    $itemName = $b1['itemName'];
    $itemLoc = $item[2];
    for ($i = 0; $i < count($item[1]); $i++) {
        $q2 = "SELECT * FROM `modifiers` WHERE modId = '" . $item[1][$i] . "'";
        $r2 = $GLOBALS['mysqli']->query($q2);
        $b2 = $r2->fetch_assoc();
        $itemVal += $b2['value'];
        $itemName .= ", " . $b2['name'];
    }
    if ($GLOBALS['ibMarkup'] != 0) {
        $markup = $GLOBALS['ibMarkup'] / 100;
        $mVal = $itemVal * $markup;
        $iVal = $itemVal + $mVal;
    } else {
        $iVal = $itemVal;
    }
    $q3 = "INSERT INTO `treasure` (`tName`,`tValue`,`tQty`,`tLoc`,`changeBy`, `vaultID`) values ('" . $itemName . "','" . $itemVal . "','1','" . $itemLoc . "','" . $GLOBALS['user'] . "', '" . $GLOBALS['vault'] . "')";
    $r3 = $GLOBALS['mysqli']->query($q3);
    $q4 = "INSERT INTO `treasure_log` (`tName`,`tValue`,`tQty`,`tLoc`,`changeBy`, `vaultID`) values ('" . $itemName . "','" . $itemVal . "','1','" . $itemLoc . "','" . $GLOBALS['user'] . "', '" . $GLOBALS['vault'] . "')";
    $r4 = $GLOBALS['mysqli']->query($q4);
    if ($item[4] == 1) {
        $insertVal = $iVal * -1;
        $q1 = "INSERT INTO `coinNew` (`vaultID`,`vcID`,`value`,`changeBy`) VALUES ( '" . $GLOBALS['vault'] . "','" . $GLOBALS['comCurID'] . "' ? ,'" . $GLOBALS['user'] . "')";
        $stmt = $GLOBALS['mysqli']->prepare($q1);
        $stmt->bind_param('i', $insertVal);
        $stmt->execute();
    }
    getItems();
}
开发者ID:dmjendor,项目名称:treasury,代码行数:35,代码来源:items.php


示例12: getItems

                                <td><input id="duration" style="width: 300px;" type="text" name="duration" /></td>
                                <input type="hidden" id="pid" />
                            </tr>
                            
                        </table>
                        
                        <div style="margin-left: 220px">
                            <button id="submit">Submit</button>
                        </div>
                    </div>
                </div>
            </div>
        <div id="wrapper" > 
        <div id="coloumns" > 
        <?php 
$result = getItems(30, "problems", null);
while ($row = mysql_fetch_array($result)) {
    ?>
            <div class="pin">
                <div class="problemName">নামঃ<?php 
    echo $row['name'];
    ?>
</div>
                <div class="problemDesc">বর্ণনাঃ<?php 
    echo $row['description'];
    ?>
</div>
                <div class="problemRating">রেটিংঃ<?php 
    echo $row['rating'];
    ?>
</div>
开发者ID:nurzico,项目名称:SanitationHackathonBangladesh,代码行数:31,代码来源:problem-list.php


示例13: header

	table { margin-top: 0.75em;}

	th { font-size: 1.2em; text-align: center; border: none 0px; padding-right: 15px; }

	td { padding: 0.25em 2em 0.25em 0em; border: 0 none; }
	</style>
</head>
<body>
	<h1>My ToDo List</h1>

<?php 
header('Cache-Control: no-cache');
header('Pragma: no-cache');
require_once "getitems.php";
$items = getItems();
if (!empty($items)) {
    echo "<table border='1'>\n\t\t\t\t<tr>\n\t\t\t\t\t<th>Name</th>\n\t\t\t\t\t<th>Category</th>\n\t\t\t\t\t<th>Date</td>\n\t\t\t\t\t<th>Complete</th>\n\t\t\t\t\t<th>Mark Complete?</th>\n\t\t\t\t\t<th>Delete?</th>\n\t\t\t\t</tr>";
    foreach ($items as $item) {
        echo "<tr>\n\t\t\t\t\t\t<td>" . $item[1] . "</td>\n\t\t\t\t\t\t<td>" . $item[2] . "</td>\n\t\t\t\t\t\t<td>" . $item[3] . "</td>";
        if ($item[4] == 0) {
            echo "<td>No</td>";
            echo "<td><a href='markitemcomplete.php?id=" . $item[0] . "'>Mark complete</a></td>";
        } else {
            echo "<td>Yes</td>";
            echo "<td>N/A</td>";
        }
        echo "<td><a href='deleteitem.php?id=" . $item[0] . "'>Delete</a></td>";
        echo "</tr>";
    }
    echo "</table>";
开发者ID:arindam-dutta,项目名称:azure-sdk-for-php-samples,代码行数:30,代码来源:index.php


示例14: getItems

        }
    }
}
function getItems()
{
    if ($_SESSION['items']) {
        return $_SESSION['items'];
    } else {
        return array();
    }
}
if ($_GET['artikel']) {
    addItem($_GET['artikel']);
    header("Location: warenkorb.php");
}
$wako = getItems();
?>
<html>
 <head>
 <?php 
include "res/head.php";
?>
  <title> 
    Einkaufen in Europa
  </title>
 </head>
 <body>
   <h1>Ihr Warenkorb</h1>

<?php 
/*
开发者ID:Jenjen1324,项目名称:BZZ_M150_Wako,代码行数:31,代码来源:warenkorb.php


示例15: date

            }
            break;
    }
}
////////////////////////////////
// Put it all together
////////////////////////////////
print $css;
$results = "\n<div id=\"wrap\">\n<div id=\"header\">\n\t<div id=\"logo\"><img src=\"{$AssetPath}/images/admin/logo.gif\"  border=\"0\" class=\"logo\"/></div>\n\t<div id=\"title_text\"><h1>Activity for the week ending " . date("F j, Y") . "</h1></div>\n</div>\n<div id=\"newsletter\">\n\t<div id=\"inshort\">\n\t\t<a href=\"#records\">Records</a>&nbsp;&nbsp;&nbsp;\n\t\t<a href=\"#guides\">Research Guides </a>&nbsp;&nbsp;&nbsp;\n\t\t<a href=\"#faqs\">FAQs</a>&nbsp;&nbsp;&nbsp;\n\t\t<a href=\"#tb\">TalksBack</a>&nbsp;&nbsp;&nbsp;\n\t</div>\n<p><img src=\"{$AssetPath}/images/icons/required.png\"> = New this week</p>\n<div id=\"main-col\">\n<a name=\"records\"></a><h2>Records: New & Modified</h2>\n";
$results .= getItems($records);
$results .= "<a name=\"guides\"></a><h2>Research Guides: New & Modified</h2>\n";
$results .= getItems($research_guide);
$results .= "<a name=\"faqs\"></a><h2>FAQs</h2>\n";
$results .= getItems($faq);
$results .= "<a name=\"tb\"></a><h2>TalksBack</h2>\n";
$results .= getItems($talkback);
$results .= "\n{$reports} \n\n</div>\n\n<div id=\"sidebar\">\n{$eres}\n{$search_terms}\n</div>\n</div>";
//////////////////////////
// Print out results
//////////////////////////
print $results;
///////////////////////////
// Email results
///////////////////////////
print "<p>recipients are: {$recipients}</p>";
normanMailer($results, $recipients);
/////////////////////////////////
// Some functions
/////////////////////////////////
function getItems($array)
{
开发者ID:kenirwin,项目名称:SubjectsPlus,代码行数:31,代码来源:newsletter.php


示例16: elseif

echo "</tr>\n";
echo "<tr>\n";
echo "<td class=\"FacetFieldCaptionTD\">".$script_transl['rate_new']."</td><td  class=\"FacetDataTD\">\n";
$gForm->selectFromDB('aliiva','rate_new','codice',$form['rate_new'],false,false,'-','descri','rate_new');
echo "</tr>\n";
echo "\t<tr class=\"FacetFieldCaptionTD\">\n";
echo "<td align=\"left\"><input type=\"submit\" name=\"return\" value=\"".$script_transl['return']."\">\n";
echo '<td align="right"> <input type="submit" accesskey="i" name="preview" value="';
echo $script_transl['view'];
echo '" tabindex="100" >';
echo "\t </td>\n";
echo "\t </tr>\n";
echo "</table>\n";

if (isset($_POST['preview']) and $msg=='') {
  $m=getItems($form['rate_obj'],$form['cm_ini'],$form['cm_fin'],$form['art_ini'],$form['art_fin']);
  $new = gaz_dbi_get_row($gTables['aliiva'],'codice',$form['rate_new']);
  echo "<table class=\"Tlarge\">";
  if (sizeof($m) > 0) {
        if ($form['rate_new']=='0') {
           $name_bas='preacq';
        } elseif ($form['rate_new']=='web') {
           $name_bas='web_price';
        } else {
           $name_bas='preve'.$form['rate_new'];
        }
        if ($form['rate_obj']=='0') {
           $name_obj='preacq';
        } elseif ($form['rate_obj']=='web') {
           $name_obj='web_price';
        } else {
开发者ID:andreabia,项目名称:gazie,代码行数:31,代码来源:update_vatrate.php


示例17: trim

    $str = trim($str, "-");
    $str = mb_convert_encoding($str, 'UTF-8');
    return $str;
}
foreach ($feeds as $feedName => &$feedParts) {
    $tempItems = array();
    $items = array();
    foreach ($feedParts as &$feedPart) {
        $search = array_keys($feedPart);
        array_push($search, '%select_is_dealer%', '%group_by_is_dealer%');
        $replace = array_values($feedPart);
        $sql = str_replace($search, $replace, $sqlTemp);
        array_push($tempItems, getItems($sql));
        array_push($replace, 'IF(l_isdealer=1,"new","used") as `type`,', ',l_isdealer');
        $sql = str_replace($search, $replace, $sqlTemp);
        array_push($tempItems, getItems($sql));
    }
    foreach ($tempItems as &$item) {
        $items = array_merge($items, $item);
    }
    prepareItems($items);
    printLog('Filling feed for ' . $feedName);
    $writer = new XMLWriter();
    $writer->openURI(FILE_PATH . 'context_rk_auto_' . $feedName . '.xml');
    $writer->startDocument('1.0', 'UTF-8');
    $writer->setIndent(TRUE);
    $writer->startElement('root');
    $writer->writeElement('creation-date', date('c', time()));
    writeOffers($items, $writer);
    $writer->endDocument();
    $writer->flush();
开发者ID:sergrin,项目名称:crawlers-il,代码行数:31,代码来源:context_rk_auto.php


示例18: my_repeat_function_rss

function my_repeat_function_rss()
{
    // do here what needs to be done automatically as per your schedule
    $rss = setUpRss();
    $items = getItems($rss);
    $items = array_reverse($items);
    foreach ($items as $item) {
        writePost($item);
    }
}
开发者ID:stuartwilsondev,项目名称:ee-wp-rss-consumer,代码行数:10,代码来源:rss-consumer.php


示例19: isset

 * AIT WordPress Theme
 *
 * Copyright (c) 2012, Affinity Information Technology, s.r.o. (http://ait-themes.com)
 */
// directory search
$latteParams['type'] = isset($_GET['dir-search']) ? true : false;
if ($latteParams['type']) {
    // show all items on map
    if (isset($aitThemeOptions->search->searchShowMap)) {
        $radius = array();
        if (isset($_GET['geo'])) {
            $radius[] = $_GET['geo-radius'];
            $radius[] = $_GET['geo-lat'];
            $radius[] = $_GET['geo-lng'];
        }
        $latteParams['items'] = getItems(intval($_GET['categories']), intval($_GET['locations']), $GLOBALS['wp_query']->query_vars['s'], $radius);
    }
    $posts = $wp_query->posts;
    foreach ($posts as $item) {
        $item->link = get_permalink($item->ID);
        $image = wp_get_attachment_image_src(get_post_thumbnail_id($item->ID));
        if ($image !== false) {
            $item->thumbnailDir = getRealThumbnailUrl($image[0]);
        } else {
            $item->thumbnailDir = getRealThumbnailUrl($GLOBALS['aitThemeOptions']->directory->defaultItemImage);
        }
        $item->optionsDir = get_post_meta($item->ID, '_ait-dir-item', true);
        $item->excerptDir = aitGetPostExcerpt($item->post_excerpt, $item->post_content);
        $item->packageClass = getItemPackageClass($item->post_author);
        $item->rating = get_post_meta($item->ID, 'rating', true);
    }
开发者ID:kivivuori,项目名称:jotain,代码行数:31,代码来源:archive.php


示例20: getItems

if ($pic_size[1] == 350) {
    $size = 360;
}
if ($pic_size[1] == 400) {
    $size = 400;
}
if ($pic_size[1] == 450) {
    $size = 460;
}
if ($pic_size[1] == 570) {
    $size = 570;
}
//echo $ids=$_MODULE['items'];
$categoryId = $_MODULE['cates'];
$items_cnt = $_MODULE['items_cnt'] ? $_MODULE['items_cnt'] : 20;
$items = getItems($_MODULE['items'], $_MODULE['cates'], $_MODULE['keys'], $sortType = $_MODULE['orderby'], $num = $items_cnt, $itemData = $_MODULE['select_type']);
foreach ($items as $k => $item) {
    //echo $item['title'];
    if (is_array($zdy_pic)) {
        if ($zdy_pic[$k]) {
            $items[$k][pic400] = $zdy_pic[$k];
        }
    }
}
?>
<div class="tb-module tshop-um tshop-um-jp"  style="margin-bottom:<?php 
echo $_MODULE['mod_mb'];
?>
px;">
<?php 
/**
开发者ID:ufo4333056,项目名称:template,代码行数:31,代码来源:tshop-um-jp.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getJS函数代码示例发布时间:2022-05-15
下一篇:
PHP getItemTypeFormURL函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap