本文整理匯總了PHP中CommonAction::update方法的典型用法代碼示例。如果您正苦於以下問題:PHP CommonAction::update方法的具體用法?PHP CommonAction::update怎麽用?PHP CommonAction::update使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CommonAction
的用法示例。
在下文中一共展示了CommonAction::update方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: update
public function update()
{
if (!$_GET['editMine']) {
return parent::update();
}
$this->pretreatment();
$model = D("User");
$model->where("id=" . $this->user["id"])->save($_POST);
}
示例2: update
public function update()
{
vendor("common");
$res = FS("Image")->save($key = 'shop_logo', $dir = 'share', $is_thumb = false, $whs = array(), $is_delete_origin = false, $is_water = false);
if ($res) {
$_POST['shop_logo'] = $res['url'];
}
Cookie::set('_currentUrl_', null);
parent::update();
}
示例3: update
public function update()
{
if (!isset($_POST['is_flash'])) {
$_POST['is_flash'] = 0;
$_POST['flash_style'] = '';
}
$_POST['width'] = intval($_POST['width']);
$_POST['height'] = intval($_POST['height']);
parent::update();
}
示例4: update
public function update()
{
$desc = trim($_REQUEST['desc']);
unset($_POST['conditions']);
$_POST['allow_group'] = '';
if (isset($_POST['allow_gid'])) {
$_POST['allow_group'] = implode(',', $_POST['allow_gid']);
}
parent::update();
}
示例5: update
public function update()
{
Vendor("common");
$pid = intval($_REQUEST['pid']);
$share_id = D('ForumPost')->where("pid = '{$pid}'")->getField('share_id');
if ($share_id > 0) {
$content = trim($_REQUEST['content']);
FS("Share")->updateShare($share_id, '', $content);
}
parent::update();
}
示例6: update
public function update()
{
$model = D("StockProductList");
$model->where(array("factory_code_all" => $_POST["factory_code_all"]))->save(array("unit_price" => $_POST["unit_price"], "cost" => $_POST["cost"]));
$allow = array("id", "store_min", "store_max");
$tmp = array();
foreach ($_POST as $k => $v) {
if (!in_array($k, $allow)) {
continue;
}
$tmp[$k] = $v;
}
$_POST = $tmp;
$this->dataModelAlias = null;
parent::update();
}
示例7: update
/**
* 查詢工具更新相關的方法
* (non-PHPdoc)
* @see CommonAction::update()
*/
public function update()
{
// 把上傳圖片添加到指定文件夾中
if ($_FILES['photo']['name']) {
$info = $this->uploadPic();
}
// 判斷是否有上傳圖片如果有刪除原來圖片
if ($info) {
$_POST['pic'] = $info[0]['savename'];
// echo ROOT_PATH.'/Www/upload/searchToolsPic/'.$_REQUEST['oldPic'];
if (file_exists(ROOT_PATH . '/Www/upload/searchToolsPic/' . $_REQUEST['oldPic'])) {
//echo "111111111";
// 刪除原來文件夾中存在的文件
unlink(ROOT_PATH . '/Www/upload/searchToolsPic/' . $_REQUEST['oldPic']);
}
}
unset($_REQUEST['oldPic']);
// 調用父類的update方法
parent::update();
}
示例8: update
public function update()
{
Vendor("common");
$tid = intval($_REQUEST['tid']);
$topic = D('AskThread')->where("tid = '{$tid}'")->find();
if ($topic['share_id'] > 0) {
$share_id = $topic['share_id'];
$title = trim($_REQUEST['title']);
$content = trim($_REQUEST['content']);
if ($topic['title'] != $title || $topic['content'] != $content) {
FS("Share")->updateShare($share_id, $title, $content);
}
if ($topic['title'] != $title) {
FS("Ask")->updateTopicRec($tid, $title);
}
}
parent::update();
}
示例9: update
public function update()
{
Vendor("common");
$_POST['valid_time'] = strZTime($_POST['valid_time']);
$gid = intval($_REQUEST['gid']);
$goods = D('SecondGoods')->where("gid = '{$gid}'")->find();
if ($goods['share_id'] > 0) {
$share_id = $goods['share_id'];
$title = trim($_REQUEST['name']);
$content = trim($_REQUEST['content']);
if ($goods['title'] != $title || $goods['content'] != $content) {
FS("Share")->updateShare($share_id, $title, $content);
}
}
parent::update();
}
示例10: update
public function update()
{
$_POST['tag_code'] = $_POST['tag_name'];
parent::update();
}
示例11: update
public function update()
{
Vendor("common");
$_POST['is_best'] = intval($_POST['is_best']);
$_POST['is_top'] = intval($_POST['is_top']);
$_POST['is_event'] = intval($_POST['is_event']);
$tid = intval($_REQUEST['tid']);
$topic = D('ForumThread')->where("tid = '{$tid}'")->find();
if ($topic['share_id'] > 0) {
$share_id = $topic['share_id'];
$title = trim($_REQUEST['title']);
$content = trim($_REQUEST['content']);
if ($topic['title'] != $title || $topic['content'] != $content) {
FS("Share")->updateShare($share_id, $title, $content);
}
if ($topic['title'] != $title) {
FS("Topic")->updateTopicRec($tid, $title);
}
FS("Topic")->updateTopicCache($tid);
}
parent::update();
}
示例12: update
public function update()
{
if (!isset($_POST['is_flash'])) {
$_POST['is_flash'] = 0;
$_POST['flash_style'] = '';
}
$_POST['width'] = intval($_POST['width']);
$_POST['height'] = intval($_POST['height']);
// 管理員默認通過審核
if ($status = getAdVerifyStatus()) {
$_POST['name'] = $_POST['name'];
// 直接更新廣告內容
} else {
$_POST['code'] = $_POST['name'];
// 存放到待審核字段中
$status = 3;
// 編輯未通過審核狀態
}
$_POST['status'] = $status;
// 默認廣告未通過審核
parent::update();
}