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


PHP table_class::update_file_attributes方法代码示例

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


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

示例1: intval

<?php

include_once '../../frame.php';
#var_dump($_POST);
$link = new table_class('fb_links');
$id = intval($_POST['id']);
if ($id != '') {
    $link->find($id);
}
$link->update_attributes($_POST['post'], false);
$link->update_file_attributes('post');
$link->save();
redirect('index.php');
开发者ID:sauger,项目名称:forbes,代码行数:13,代码来源:edit.post.php

示例2: intval

<?php

session_start();
include_once '../../frame.php';
judge_role();
$activity = new table_class("zzh_activity");
$id = intval($_POST['id']);
if ($id != '') {
    $activity->find($id);
} else {
    $activity->created_at = now();
}
$activity->update_attributes($_POST['post'], false);
$activity->update_file_attributes('post');
if ($_POST['is_old'] == 'on') {
    $activity->is_old = 1;
} else {
    $activity->is_old = 0;
}
$activity->save();
redirect('activity.php');
开发者ID:sauger,项目名称:forbes,代码行数:21,代码来源:activity.post.php

示例3: intval

<?php

include '../../frame.php';
$list_id = intval($_POST['list_id']);
if (!$list_id) {
    alert('invalid request!');
    redirect('index.php');
    die;
}
$id = intval($_POST['id']);
$item = new table_class('fb_rich_list_items');
if ($id) {
    $item->find($id);
}
$item->update_attributes($_POST['item'], false);
$item->list_id = $list_id;
$db = get_db();
$db->query("select id from fb_rich where name='{$item->name}'");
if ($db->move_first()) {
    $item->rich_id = $db->field_by_name('id');
}
$item->update_file_attributes('item');
if (!$item->save()) {
    alert('fail to update!');
}
redirect("rich_list_items_list.php?id={$list_id}");
开发者ID:sauger,项目名称:forbes_old,代码行数:26,代码来源:rich_list_item.post.php

示例4: intval

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv=Content-Type content="text/html; charset=utf-8">
	<meta http-equiv=Content-Language content=zh-CN>
	<title>forbes</title>
	<?php 
require_once '../../frame.php';
?>
</head>
<?php 
require_once '../../frame.php';
#var_dump($_POST);
$magazine = new table_class("fb_magazine");
$id = intval($_POST['id']);
if ($id != '') {
    $magazine->find($id);
}
$magazine->update_attributes($_POST['post'], false);
$magazine->update_file_attributes('post');
$magazine->save();
redirect('index.php');
开发者ID:sauger,项目名称:forbes_old,代码行数:22,代码来源:edit.post.php

示例5:

<?php

include_once "../../frame.php";
use_jquery();
js_include_tag('jquery.colorbox-min');
$pos = new table_class('eb_page_pos');
$pos->find_by_name($_POST[pos][name]);
$pos->update_file_attributes('pos');
$pos->update_attributes($_POST['pos'], false);
$pos->save();
?>
<script>
	parent.$.fn.colorbox.close();
	parent.frames['admin_iframe'].location.reload();
</script>
开发者ID:justin1986,项目名称:eachbb,代码行数:15,代码来源:edit.post.php

示例6: intval

<?php

session_start();
include_once '../../frame.php';
judge_role();
$partner = new table_class("zzh_partner");
$id = intval($_POST['id']);
if ($id != '') {
    $partner->find($id);
} else {
    $partner->created_at = now();
}
$partner->update_attributes($_POST['post'], false);
$partner->update_file_attributes('post');
$partner->save();
redirect('partner.php');
开发者ID:sauger,项目名称:forbes,代码行数:16,代码来源:partner.post.php

示例7: in

<?php

session_start();
include_once '../../frame.php';
judge_role();
$id = $_POST['id'];
$intestor = new table_class("fb_investor");
if ($id != '') {
    $intestor->find($id);
}
$intestor->update_file_attributes('post');
$intestor->update_attributes($_POST['post'], false);
if ($_POST['post']['is_show'] == 'on') {
    $db = get_db();
    $db->execute("update fb_investor set is_show=0");
    $intestor->is_show = 1;
} else {
    $intestor->is_show = 0;
}
$intestor->save();
/*
$db = get_db();
$db->execute("update fb_invest_industry set investor_count=investor_count+1 where id in ({$_POST['industry_id']})");
close_db();
*/
redirect('index.php');
开发者ID:sauger,项目名称:forbes,代码行数:26,代码来源:edit.post.php

示例8: intval

<?php

require "../../frame.php";
#var_dump($_POST);
$rich = new table_class('fb_rich');
$id = intval($_POST['id']);
if ($id) {
    $rich->find($id);
}
$rich->update_file_attributes('fh');
$rich->update_attributes($_POST['fh']);
redirect('list.php');
开发者ID:sauger,项目名称:forbes_old,代码行数:12,代码来源:post.php

示例9: date

<?php

session_start();
include_once '../../frame.php';
judge_role();
$db = get_db();
$news_id = $_POST['id'] ? $_POST['id'] : 0;
$news = new table_class('eb_assistant');
if ($news_id) {
    $news->find($news_id);
}
$news->update_attributes($_POST['news'], false);
$news->update_file_attributes('news');
if ($news->priority == "") {
    $news->priority = 100;
}
$news->last_edited_at = date("Y-m-d H:i:s");
if (!$news->id) {
    //insert news
    $news->created_at = date("Y-m-d H:i:s");
    $news->click_count = 0;
}
$news->save();
if ($_POST['copy_to']) {
    $copy_to = explode(',', $_POST['copy_to']);
    foreach ($copy_to as $cid) {
        $cid = intval($cid);
        if ($cid <= 0) {
            continue;
        }
        $news->id = 0;
开发者ID:justin1986,项目名称:eachbb,代码行数:31,代码来源:edit.post.php

示例10: alert

}
if ($_FILES['word']['name'] != '') {
    $upload = new upload_file_class();
    $upload->save_dir = "/upload/files/";
    $files = $upload->handle('word');
    if ($files === false) {
        alert('上传失败 !');
        redirect($_SERVER['HTTP_REFERER']);
        die;
    }
    $sign->item_doc = "/upload/files/{$files}";
}
#$post_filter = array('doc','docx','ppt','pdf');
#$sign->update_file_attributes2('post','/files');
$sign->update_attributes($_POST['post'], false);
$sign->update_file_attributes('post');
if ($_POST['is_show'] == 'on') {
    $db = get_db();
    $db->execute("update zzh_member set is_show=0");
    $sign->is_show = 1;
} else {
    $sign->is_show = 0;
}
$sign->save();
$db = get_db();
$db->execute("delete from zzh_member_income where sign_id={$id}");
$income = new table_class("zzh_member_income");
if ($_POST['income1'] != '') {
    $income1 = explode('|', $_POST["income1"]);
    foreach ($income1 as $v) {
        $param = explode(',', $v);
开发者ID:sauger,项目名称:forbes,代码行数:31,代码来源:user.post.php

示例11: strtolower

<?php 
require_once "../../frame.php";
$subject = new table_class('fb_subject');
$subject->update_attributes($_POST['subject'], false);
$subject->update_file_attributes('subject');
$subject->identity = strtolower($subject->identity);
$subject_id = $_POST['subject']['id'] ? $_POST['subject']['id'] : 0;
if ($subject_id == 0) {
    $optype = 'add';
    $redirect_url = 'subject_add.php';
    $subject->created_at = date("Y-m-d H:i:s");
    $subject->templet_name = 'new_temp';
} else {
    $optype = 'edit';
    $redirect_url = 'subject_edit.php?id=' . $subject_id;
}
if (!$subject->name) {
    alert('专题名称不能为空!');
    redirect($redirect_url);
    return;
}
if ($subject_id == 0 && !$subject->identity) {
    alert('专题标识不能为空!');
    redirect($redirect_url);
    return;
}
if ($subject_id == 0) {
    if (is_dir('../../subject/' . $subject->identity)) {
        alert('专题标识已存在,请重新制定!');
        redirect($redirect_url);
        return;
开发者ID:sauger,项目名称:forbes,代码行数:31,代码来源:subject.post.php

示例12:

<?php

include '../../frame.php';
$table = new table_class('fb_rich_list_items');
$table->update_file_attributes('item');
$table->update_attributes($_POST['item']);
redirect('list.php');
开发者ID:sauger,项目名称:forbes_old,代码行数:7,代码来源:add_to_list.post.php

示例13:

<?php

include_once '../../frame.php';
#use_jquery();
$recommand = new table_class('eb_recommand');
if ($_POST['item']['id']) {
    $recommand->find($_POST['item']['id']);
}
$recommand->update_file_attributes('item');
$recommand->update_attributes($_POST['item']);
?>
<script type="text/javascript">
	parent.$.fn.colorbox.close();
	parent.window.frames["admin_iframe"].location.reload();
</script>
开发者ID:justin1986,项目名称:eachbb,代码行数:15,代码来源:edit_recommand.post.php


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