コード例 #1
0
ファイル: edit.post.php プロジェクト: sauger/forbes
<?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');
コード例 #2
0
ファイル: activity.post.php プロジェクト: sauger/forbes
<?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');
コード例 #3
0
<?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}");
コード例 #4
0
ファイル: edit.post.php プロジェクト: sauger/forbes_old
<!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');
コード例 #5
0
ファイル: edit.post.php プロジェクト: justin1986/eachbb
<?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>
コード例 #6
0
ファイル: partner.post.php プロジェクト: sauger/forbes
<?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');
コード例 #7
0
ファイル: edit.post.php プロジェクト: sauger/forbes
<?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');
コード例 #8
0
ファイル: edit.post.php プロジェクト: sauger/forbes_old
<!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);
$survey = new table_class("fb_survey");
$id = intval($_POST['id']);
if ($id != '') {
    $survey->find($id);
}
$survey->update_attributes($_POST['post'], false);
$survey->update_file_attributes('post');
$survey->save();
redirect('index.php');
コード例 #9
0
ファイル: edit.post.php プロジェクト: sauger/forbes
<?php

include "../../frame.php";
$gift = new table_class('fb_gift');
$id = intval($_POST['id']);
if ($id) {
    $gift->find($id);
}
$gift->update_attributes($_POST['gift'], false);
if ($_POST['total_count'] != $gift->total_count) {
    $gift->remain_count = intval($gift->remain_count) + intval($_POST['total_count']) - intval($gift->total_count);
    if ($gift->remain_count < 0) {
        $gift->remain_count = 0;
    }
}
$gift->total_count = $_POST['total_count'];
$gift->update_file_attributes('gift');
$gift->save();
redirect('index.php');
コード例 #10
0
ファイル: post.php プロジェクト: sauger/forbes_old
<?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');
コード例 #11
0
ファイル: edit.post.php プロジェクト: justin1986/eachbb
<?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;
コード例 #12
0
ファイル: user.post.php プロジェクト: sauger/forbes
}
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);
コード例 #13
0
ファイル: subject.post.php プロジェクト: sauger/forbes
<?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;
コード例 #14
0
<?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');
コード例 #15
0
<?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>