當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Store::add方法代碼示例

本文整理匯總了PHP中Store::add方法的典型用法代碼示例。如果您正苦於以下問題:PHP Store::add方法的具體用法?PHP Store::add怎麽用?PHP Store::add使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Store的用法示例。


在下文中一共展示了Store::add方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: store_edit

function store_edit()
{
    $store = new Store();
    $storeid = isset($_POST['storeid']) ? $_POST['storeid'] : "";
    $store->id = $storeid;
    $store->name = isset($_POST['name']) ? $_POST['name'] : "";
    $store->address = isset($_POST['address']) ? $_POST['address'] : "";
    $store->contact = isset($_POST['contact']) ? $_POST['contact'] : "";
    $store->phone = isset($_POST['phone']) ? $_POST['phone'] : "";
    $store->active = isset($_POST['active']) ? 1 : 0;
    $store->fax = isset($_POST['fax']) ? $_POST['fax'] : "";
    $store->email = isset($_POST['email']) ? $_POST['email'] : "";
    $store->description = isset($_POST['description']) ? $_POST['description'] : "";
    if ($storeid == "new") {
        if ($store->add()) {
            header("location: index.php?pages=store_detail&store={$store->id}");
            exit;
        }
    } else {
        return $store->update();
    }
    return false;
}
開發者ID:BackupTheBerlios,項目名稱:rinventory-svn,代碼行數:23,代碼來源:store.php

示例2: json_encode

include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Store.php';
$action = "";
$store = new Store();
$response = array();
if (!empty($_GET['action'])) {
    $action = strip_tags($_GET['action']);
}
switch ($action) {
    case "login":
        $data = $store->login();
        break;
    case "logout":
        $data = $store->logout();
        break;
    case "add":
        $data = $store->add();
        break;
    case "delete":
        $data = $store->delete();
        break;
    case "edit":
        $data = $store->edit();
        break;
    case "search":
        $data = $store->search();
        break;
    default:
        $data = array('success' => false, 'data' => array(), 'error' => array('warning' => 'Invalid action'));
        break;
}
echo json_encode($data);
開發者ID:mayurtakawale88,項目名稱:store,代碼行數:31,代碼來源:index.php

示例3: _openStart

 /**
  * Opens the Start Tag (Normally: <div)
  *
  * @return void
  */
 private function _openStart()
 {
     if ($this->name === 'blank') {
         return;
     }
     /*
      * Store it.
      */
     Store::add($this);
     if (!$this->hasOption('inline')) {
         Generator::tabs();
     }
     echo str_replace(':name', $this->realName, $this->brackets['start']);
 }
開發者ID:xiphe,項目名稱:html,代碼行數:19,代碼來源:Tag.php


注:本文中的Store::add方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。