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


PHP Asset::setAssetYear方法代码示例

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


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

示例1: Asset

//**********************************************
include_once "../class/Asset.php";
include_once "../class/CheckAsset.php";
$updateAsset = new Asset();
$updateChk = new CheckAsset();
$assetId = $_GET["assetId"];
$upAssName = $_GET["upAssName"];
$upAssPrice = $_GET["upAssPrice"];
$upRemark = $_GET["upRemark"];
$upAssAddDate = $_GET["upAddDate"];
$dateM = substr($upAssAddDate, 0, 6);
$month = substr($upAssAddDate, 3, 2);
$text = substr($upAssAddDate, 6, 4);
$YearD = substr($upAssAddDate, 6, 4);
if ($month >= 10 && $month <= 12) {
    $YearD++;
}
$year = $text - 543;
$dateType = $dateM . "" . $year;
$datetime = DateTime::createFromFormat('d/m/yy', $dateType);
$dateT = $datetime->format('Y-m-d');
$updateAsset->setAssetId($assetId);
$updateAsset->setAssetName($upAssName);
$updateAsset->setAssetPrice($upAssPrice);
$updateAsset->setRemark($upRemark);
$updateAsset->setAssetAddDate($dateT);
$updateAsset->setAssetYear($YearD);
$updateAsset->editAsset();
$updateChk->setAssetId($assetId);
$updateChk->setAssetAddDate($dateT);
$updateChk->editCheckAsset();
开发者ID:JhunCabas,项目名称:asset-project-system,代码行数:31,代码来源:reqEditAsset.php

示例2: Asset

<?php

include_once "../class/Config.php";
include_once "../class/Asset.php";
$chkAsset = new Asset();
$dbCheck = new config();
//$addGroupCode = $_GET["addGroupCode"];
//$addTypeCode = $_GET["addTypeCode"];
$addYear = $_GET["addYear"];
$addTypeCode = $_GET["addTypeCode"];
$addGroupCode = $_GET["addGroupCode"];
$addAssetCode = $_GET["addAssetCode"];
$chkAsset->setAssetYear($addYear);
$chkAsset->setAssetTypeCode($addTypeCode);
$chkAsset->setAssetGroupCode($addGroupCode);
$chkAsset->setAssetCode($addAssetCode);
$arr = $chkAsset->checkAsset();
$rows = $dbCheck->num_rows($arr);
$i = 0;
if ($rows > $i) {
    echo $rows;
} else {
    echo $i;
}
?>

开发者ID:JhunCabas,项目名称:asset-project-system,代码行数:25,代码来源:reqCheckAsset.php

示例3: Asset

<?php

include_once "../class/Asset.php";
$updateAsset = new Asset();
$id = $_GET["id"];
$upAssName = $_GET["upAssName"];
$upAssPrice = $_GET["upAssPrice"];
$upRemark = $_GET["upRemark"];
$upAssAddDate = $_GET["upAddDate"];
//$upAssAddDate =  "01/10/2556";
$dateM = substr($upAssAddDate, 0, 6);
$month = substr($upAssAddDate, 3, 2);
$text = substr($upAssAddDate, 6, 4);
$text2 = substr($upAssAddDate, 6, 4);
if ($month >= 10 && $month <= 12) {
    $text2++;
}
$year = $text - 543;
$dateType = $dateM . "" . $year;
$datetime = DateTime::createFromFormat('d/m/yy', $dateType);
$dateT = $datetime->format('Y-m-d');
$updateAsset->setId($id);
$updateAsset->setAssetName($upAssName);
$updateAsset->setAssetPrice($upAssPrice);
$updateAsset->setRemark($upRemark);
$updateAsset->setAssetAddDate($dateT);
$updateAsset->setAssetYear($text2);
$updateAsset->editAsset();
开发者ID:JhunCabas,项目名称:asset-project-system,代码行数:28,代码来源:reqEditAsset.php

示例4: Asset

<?php

include_once "../class/Config.php";
include_once "../class/Asset.php";
$genAsset = new Asset();
$db = new config();
$year = $_GET["addYear"];
$type = $_GET["addType"];
$group = $_GET["addGroup"];
/*
	$editId = $_GET["id"];
	$editId = $_GET["id"];
	$editId = $_GET["id"];
	$editId = $_GET["id"];
*/
$genAsset->setAssetYear($year);
$genAsset->setAssetTypeCode($type);
$genAsset->setAssetGroupCode($group);
$arr = $genAsset->getAssetMax();
$data_array = array();
$no = 1;
$stat = 0;
$res = $db->fetch_array($arr);
$code = $res['assetCode'];
$genCode = str_pad($code + 1, 3, "0", STR_PAD_LEFT);
echo $genCode;
开发者ID:JhunCabas,项目名称:asset-project-system,代码行数:26,代码来源:reqGenAsset.php

示例5: Asset

include_once "../class/Config.php";
include_once "../class/Asset.php";
$chkAsset = new Asset();
$dbCheck = new config();
$addTypeId = $_GET["assetTypeId"];
$addGroupId = $_GET["assetGroupId"];
$addAssetAddDate = $_GET["assetAddDate"];
$addAssetCode = $_GET["assetCode"];
$dateM = substr($addAssetAddDate, 0, 6);
$day = substr($addAssetAddDate, 0, 2);
$month = substr($addAssetAddDate, 3, 2);
$text = substr($addAssetAddDate, 6, 4);
$text2 = substr($addAssetAddDate, 6, 4);
if ($month >= 10 && $month <= 12) {
    $text2++;
}
$chkAsset->setAssetTypeId($addTypeId);
$chkAsset->setAssetGroupId($addGroupId);
$chkAsset->setAssetCode($addAssetCode);
$chkAsset->setAssetYear($text2);
$arr = $chkAsset->checkAsset();
$rows = $dbCheck->num_rows($arr);
$i = 0;
if ($rows > $i) {
    echo $rows;
} else {
    echo $i;
}
?>

开发者ID:JhunCabas,项目名称:asset-project-system,代码行数:29,代码来源:reqCheckAsset.php


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