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


PHP Store::get_by_id方法代码示例

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


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

示例1: foreach

             $html .= "</tr>";
         }
         echo $html;
     } else {
         echo "no data";
     }
 } else {
     if ($_GET['itemtype'] == "featureditem") {
         $items = FeaturedItem::get_all();
         if (count($items) > 0) {
             foreach ($items as $item) {
                 $theitem = new Product();
                 $thedesc = "";
                 $thepicture = "";
                 if ($item->itemtype == "store") {
                     $theitem = Store::get_by_id($item->itemid);
                     $thedesc = $theitem->branchname;
                 } else {
                     if ($item->itemtype == "product") {
                         $theitem = Product::get_by_id($item->itemid);
                         $thedesc = $theitem->description;
                     }
                 }
                 if ($item->override == 1) {
                     $thepicture = $item->picture;
                 } else {
                     $thepicture = $theitem->picture;
                 }
                 $filename++;
                 $random = rand(0, 1);
                 file_put_contents("images/" . $filename . "x" . $random . ".jpg", base64_decode($thepicture));
开发者ID:NemOry,项目名称:EpicueWebPanel,代码行数:31,代码来源:gettable.php

示例2: header

<?php

require_once "header.php";
if (isset($_GET['id'])) {
    $object = Store::get_by_id($_GET['id']);
} else {
    header("location: index.php?negative");
}
if (!$session->is_logged_in()) {
    header("location: index.php?negative");
} else {
    $loggeduser = User::get_by_id($session->userid);
    if ($loggeduser->enabled == DISABLED) {
        header("location: index.php?disabled");
    }
}
$pathinfo = pathinfo($_SERVER["PHP_SELF"]);
$basename = $pathinfo["basename"];
$currentFile = str_replace(".php", "", $basename);
?>

<div class="container-fluid">
<div class="row-fluid">
  <div class="span1"></div>
  <div class="span9">
    <form id="theform" class="form-horizontal" action="#" method="post" enctype="multipart/form-data">
      <fieldset>
      <legend>
        Update
      </legend>
开发者ID:NemOry,项目名称:EpicueWebPanel,代码行数:30,代码来源:updatestore.php

示例3: Log

    $object->storetypeid = $_POST['storetypeid'];
    $object->pending = $_POST['pending'];
    $object->enabled = $_POST['enabled'];
    $object->create();
    $log = new Log($session->userid, $clientip, "WEB", "CREATED USER: " . $_POST['id']);
    $log->create();
} else {
    if ($_POST['oper'] == 'edit') {
        $object = Store::get_by_id($_POST['id']);
        $object->name = $_POST['name'];
        $object->branchname = $_POST['branchname'];
        $object->address = $_POST['address'];
        $object->telnum = $_POST['telnum'];
        $object->deliverynum = $_POST['deliverynum'];
        $object->email = $_POST['email'];
        $object->storetypeid = $_POST['storetypeid'];
        $object->pending = $_POST['pending'];
        $object->enabled = $_POST['enabled'];
        $object->update();
        $log = new Log($session->userid, $clientip, "WEB", "UPDATED STORE: " . $_POST['id']);
        $log->create();
    } else {
        if ($_POST['oper'] == 'del') {
            if ($_POST['id'] != $session->userid) {
                $log = new Log($session->userid, $clientip, "WEB", "DELETED STORE: " . $_POST['id']);
                $log->create();
                Store::get_by_id($_POST['id'])->delete();
            }
        }
    }
}
开发者ID:NemOry,项目名称:DroidStoreWebPanel,代码行数:31,代码来源:stores_manipulate.php

示例4: array

}
if (isset($_GET['sortby']) && isset($_GET['sortorder'])) {
    $sort = " ORDER BY " . $_GET['sortby'] . " " . $_GET['sortorder'] . " ";
}
if (isset($_GET['sortby']) && !isset($_GET['sortorder'])) {
    $sort = " ORDER BY " . $_GET['sortby'] . $sortorder . " ";
}
//======================================================
$sql = "SELECT * FROM " . T_FEATUREDITEMS . " WHERE " . $where . $sort . $limit;
//echo $sql."<br />";
$items = FeaturedItem::get_by_sql($sql);
$filename = 0;
$stores = array();
if (!isset($_GET['blob'])) {
    foreach ($items as $item) {
        $store = Store::get_by_id($item->itemid);
        if ($item->override == 1) {
            $store->picture = $item->picture;
        }
        $filename++;
        $random = rand(0, 1);
        file_put_contents("images/" . $filename . "xx" . $random . ".jpg", base64_decode($store->picture));
        $store->picture = HOST . "includes/webservices/images/" . $filename . "x" . $random . ".jpg";
        array_push($stores, $store);
        // if($item->override == 1)
        // {
        // 	if($item->itemtype == "store")
        // 	{
        // 		$item->picture = Store::get_by_id($item->itemid)->picture;
        // 	}
        // 	else if($item->itemtype == "product")
开发者ID:NemOry,项目名称:EpicueWebPanel,代码行数:31,代码来源:getfeatureditems.php

示例5: File

<?php

require_once "../initialize.php";
$message = "";
if (isset($_POST['name']) && $_POST['name'] != "" && isset($_POST['address']) && $_POST['address'] != "" && isset($_POST['storeid']) && $_POST['storeid'] != "") {
    $object = Store::get_by_id($_POST['storeid']);
    $object->name = $_POST['name'];
    $object->branchname = $_POST['branchname'];
    $object->address = $_POST['address'];
    $object->longitude = $_POST['longitude'];
    $object->latitude = $_POST['latitude'];
    $object->telnum = $_POST['telnum'];
    $object->deliverynum = $_POST['deliverynum'];
    $object->email = $_POST['email'];
    $object->storetypeid = $_POST['storetypeid'];
    $object->facebookid = $_POST['facebookid'];
    $object->twitterid = $_POST['twitterid'];
    $object->pending = $_POST['pending'];
    $object->enabled = $_POST['enabled'];
    $file = new File($_FILES['picture']);
    if ($file->valid) {
        $object->picture = $file->data;
    } else {
        $object->picture = base64_decode($object->picture);
    }
    $object->update();
    $log = new Log($session->userid, $clientip, "WEB", "UPDATED STORE: " . $object->id);
    $log->create();
    $message .= "success";
} else {
    $message = "You have missed a required field.";
开发者ID:NemOry,项目名称:EpicueWebPanel,代码行数:31,代码来源:updatestore.php

示例6: redirect_to

<?php

require_once "../../includes/initialize.php";
global $session;
if (!$session->is_logged_in()) {
    redirect_to("../../index.php");
}
$page = $_GET['page'];
$limit = $_GET['rows'];
$sidx = $_GET['sidx'];
$sord = $_GET['sord'];
$object = Store::get_by_id($session->userid);
$objects_count = Store::get_by_sql("SELECT * FROM " . T_STORES);
$count = count($objects_count);
if ($count > 0 && $limit > 0) {
    $total_pages = ceil($count / $limit);
} else {
    $total_pages = 0;
}
if ($page > $total_pages) {
    $page = $total_pages;
}
$start = $limit * $page - $limit;
if ($start < 0) {
    $start = 0;
}
if (!$sidx) {
    $sidx = 1;
}
$ops = array('eq' => '=', 'ne' => '<>', 'lt' => '<', 'le' => '<=', 'gt' => '>', 'ge' => '>=', 'bw' => 'LIKE', 'bn' => 'NOT LIKE', 'in' => 'LIKE', 'ni' => 'NOT LIKE', 'ew' => 'LIKE', 'en' => 'NOT LIKE', 'cn' => 'LIKE', 'nc' => 'NOT LIKE');
if (isset($_GET['searchString']) && isset($_GET['searchField']) && isset($_GET['searchOper'])) {
开发者ID:NemOry,项目名称:DroidStoreWebPanel,代码行数:31,代码来源:stores_xml.php

示例7:

<?php

require_once "../initialize.php";
$message = "";
if (isset($_GET['itemid']) && isset($_GET['itemtype'])) {
    $message = "success";
    if ($_GET['itemtype'] == "user") {
        User::get_by_id($_GET['itemid'])->delete();
    } else {
        if ($_GET['itemtype'] == "store") {
            Store::get_by_id($_GET['itemid'])->delete();
        } else {
            if ($_GET['itemtype'] == "storetype") {
                StoreType::get_by_id($_GET['itemid'])->delete();
            } else {
                if ($_GET['itemtype'] == "storepic") {
                    StorePic::get_by_id($_GET['itemid'])->delete();
                } else {
                    if ($_GET['itemtype'] == "product") {
                        Product::get_by_id($_GET['itemid'])->delete();
                    } else {
                        if ($_GET['itemtype'] == "producttype") {
                            ProductType::get_by_id($_GET['itemid'])->delete();
                        } else {
                            if ($_GET['itemtype'] == "productpic") {
                                ProductPic::get_by_id($_GET['itemid'])->delete();
                            } else {
                                if ($_GET['itemtype'] == "traffic") {
                                    Traffic::get_by_id($_GET['itemid'])->delete();
                                } else {
                                    if ($_GET['itemtype'] == "review") {
开发者ID:NemOry,项目名称:EpicueWebPanel,代码行数:31,代码来源:delete.php


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