public function save()
 {
     if (implode('|', $this->thumb_names) != $this->thumb_name) {
         $this->thumb_name = implode('|', $this->thumb_names);
     }
     return parent::save();
 }
示例#2
0
 function __construct($u_id)
 {
     if ($u_id) {
         $member = new table_class('eachbb.member');
         $member->find($u_id);
         $this->id = $u_id;
         $this->name = $member->name;
         $this->password = $member->password;
         $this->email = $member->email;
         $this->birthday = $member->birthday;
         $this->address = $member->address;
         $this->nick_name = $member->ture_name;
         $db = get_db();
         $db->query("select * from member_status where uid={$u_id}");
         if ($db->record_count == 0) {
             $status = new table_class('member_status');
             $status->created_at = $member->created_at;
             $status->last_login = $member->last_login;
             $status->uid = $u_id;
             $status->save();
         }
         $this->score = $status->score;
         $this->visit_count = $status->visit_count;
         $this->level = $status->level;
         $this->last_login = $status->last_login;
     }
 }
示例#3
0
文件: pubfun.php 项目: sauger/forbes
function send_mail($smtp_server, $smtp_user, $smtp_pwd, $from, $to, $title, $content)
{
    $body = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
				<HTML><HEAD>
				<META content="text/html; charset=utf-8" http-equiv=Content-Type>
				<META name=GENERATOR content="MSHTML 8.00.6001.18854"><LINK rel=stylesheet 
				href="BLOCKQUOTE{margin-Top: 0px; margin-Bottom: 0px; margin-Left: 2em}"></HEAD>
				<BODY style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt">';
    $body = $body . addslashes($content);
    $body = $body . '</BODY></HTML>';
    $email = new table_class('forbes_email.fb_email');
    $email->email_to = $to;
    $email->email_status = '0';
    $email->email_subject = "=?UTF-8?B?" . base64_encode($title) . "?=";
    $email->email_content = $body;
    $email->save();
}
示例#4
0
<?php

require "../../frame.php";
$nid = intval($_POST['nid']);
$pid = intval($_POST['pid']);
$type = $_POST['type'];
$db = get_db();
if ($type == 'publish') {
    $pos = new table_class("fb_list_relation");
    $pos->list_id = $pid;
    $pos->rela_id = $nid;
    $pos->save();
} elseif ($type == 'revocation') {
    $pos = new table_class("fb_list_relation");
    $pos->delete($nid);
} elseif ("edit_priority" == $type) {
    $id_str = explode("|", $_POST['id_str']);
    $priority_str = explode("|", $_POST['priority_str']);
    $id_str_num = sizeof($id_str) - 1;
    $priority = 'priority';
    for ($i = $id_str_num - 1; $i >= 0; $i--) {
        if ($priority_str[$i] == "") {
            $priority_str[$i] = "";
        }
        $db = get_db();
        $sql = "update fb_list_relation set " . $priority . "=" . $priority_str[$i] . " where id=" . $id_str[$i];
        $db->execute($sql);
    }
}
示例#5
0
if ($vote->max_vote_count) {
    $limit = $vote->max_vote_count;
    $db = get_db();
    $has = $db->query("select count(id) as num from fb_survey_record where vote_id={$id} and source='{$source}'");
    close_db();
    if ($has[0]->num >= $limit) {
        alert('您已经做过该调查表了,请不要重复提交!');
        redirect('/survey/');
        die;
    }
}
$record = new table_class("fb_survey_record");
$record->source = $source;
$record->vote_id = $id;
$record->created_at = now();
$record->save();
$count = count($_POST['record_id']);
$record2 = new table_class("fb_survey_record2");
foreach ($_POST['record_id'] as $k) {
    if (isset($_POST[$k])) {
        foreach ($_POST[$k] as $v) {
            $record2->id = 0;
            $record2->record_id = $record->id;
            $record2->vote_id = $k;
            $record2->item_id = $v;
            $record2->save();
        }
    }
}
alert("感谢您的参与!");
redirect("/survey/");
示例#6
0
                die;
            }
            $share->email = htmlspecialchars($_GET['mail'][$i]);
            if (strlen($_GET['email'][$i]) > 40) {
                die;
            }
            if (isset($_COOKIE['name'])) {
                $share->user = $_COOKIE['name'];
                $sname = " {$_COOKIE['name']} ";
            } else {
                $share->user = $_SERVER['REMOTE_ADDR'];
                $sname = "";
            }
            $share->created_at = now();
            $share->news_id = $news_id;
            $share->save();
            if ($type == 'news') {
                $content = $_GET['name'][$i] . ",你好:<br/><br/>  您的好友" . $sname . "想与您分享福布斯中文网的文章《" . $news->title . "》,您可以点击以下连接阅读<br/><br/>  <a href='http://www.forbeschina.com" . static_news_url($news) . "'>http://www.forbeschina.com" . static_news_url($news) . "</a><br/>  如果点击以上链接不起作用,请将此网址复制并粘贴到新的浏览器窗口中。";
                $title = $news->title;
            } else {
                if ($type == 'pic_list') {
                    $content = $_GET['name'][$i] . ",你好:<br/><br/>  您的好友" . $sname . "想与您分享福布斯中文网的榜单《" . $list->name . "》,您可以点击以下连接查看<br/><br/>  <a href='http://www.forbeschina.com/list/" . $news_id . "'>http://www.forbeschina.com/list/" . $news_id . "</a><br/>  如果点击以上链接不起作用,请将此网址复制并粘贴到新的浏览器窗口中。";
                    $title = $list->name;
                }
            }
            send_mail('smtp.qiye.163.com', '*****@*****.**', 'userservice', '*****@*****.**', $_GET['mail'][$i], $title, $content);
        }
    }
}
$user_id = front_user_id();
if ($user_id) {
<?php

include '../../frame.php';
$params = explode(',', $_POST['params']);
$ids = array();
$table = new table_class('fb_rich_fortune');
foreach ($params as $param) {
    $value = explode('|', $param);
    $table->id = $value[0];
    $table->rich_id = $_POST['rich_id'];
    if ($value[1]) {
        $table->fortune = $value[1];
    }
    if ($value[2]) {
        $table->fortune_year = $value[2];
    }
    if ($value[3]) {
        $table->fortune_order = $value[3];
    }
    $table->save();
    array_push($ids, $table->id);
}
$ids = implode(',', $ids);
echo $ids;
示例#8
0
<?php

require "../../frame.php";
$id = $_POST['id'];
$f_mrb = new table_class('fb_fhb');
if ($id != '') {
    $f_mrb->find($id);
}
$f_mrb->update_attributes($_POST['fhb'], false);
if ($_FILES['image_src']['name'] != '') {
    $upload = new upload_file_class();
    $upload->save_dir = '/upload/news/';
    if (!($upload_name = $upload->handle('image_src', 'filter_pic'))) {
        alert('上传图片失败!');
        redirect($_SERVER['HTTP_REFERER']);
        die;
    }
    $f_mrb->image_src = '/upload/news/' . $upload_name;
}
$f_mrb->save();
redirect('index.php');
示例#9
0
<?php

require_once '../frame.php';
rights($_SESSION["hoaurights"], '3');
$yywd = new table_class('hoau_yywd');
$id = $_POST['id'];
if ($id != '') {
    $yywd->find($id);
}
$yywd->update_attributes($_POST['post'], false);
$yywd->save();
redirect($_POST['url']);
示例#10
0
<?php

session_start();
include_once '../../frame.php';
judge_role();
#var_dump($_POST);
$seo = new table_class("fb_seo");
$id = intval($_POST['id']);
if ($id != '') {
    $seo->find($id);
}
$seo->update_attributes($_POST['seo'], false);
$seo->save();
redirect('index.php');
示例#11
0
<?php

require "../../frame.php";
$id = intval($_POST['id']);
$pid = intval($_POST['pid']);
$position = new table_class('fb_position');
if ($id != '') {
    $position->find($id);
} else {
    $position->page_id = '0';
}
if ($pid != '') {
    $position->page_id = $pid;
}
$position->name = $_POST['name'];
$position->position_limit = $_POST['position_limit'];
$position->type = $_POST['type'];
$position->save();
redirect('index.php');
示例#12
0
<?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');
示例#13
0
            continue;
        }
        $db->execute("insert into eb_news_keywords (name) values('{$val}') on duplicate key update name='{$val}'");
    }
}
//handle the publish schedule
if (isset($_POST['publish_schedule_date'])) {
    $schedule = new table_class('eb_publish_schedule');
    if ($id) {
        $schedule->find_by_resource_id($id);
    }
    if ($_POST['publish_schedule_date']) {
        $schedule->publish_date = $_POST['publish_schedule_date'];
        $schedule->resource_id = $news->id;
        $schedule->resource_type = 'news';
        $schedule->save();
    } else {
        if ($schedule->id) {
            $schedule->delete();
        }
    }
}
if ($_POST['copy_news']) {
    $news->copy_from = $news->id;
    $news->id = 0;
    $news->category_id = intval($_POST['copy_news']);
    $news->save();
}
$href = "news_list.php";
redirect($href . '?category=' . $_POST['news']['category_id']);
#var_dump($news);
示例#14
0
        alert('上传视频失败 !');
        redirect($_SERVER['HTTP_REFERER']);
        die;
    }
    $ad->video = "/upload/jj/{$vid}";
}
if ($_FILES['flash']['name'] != null) {
    if ($_FILES['flash']['size'] > 2000000) {
        alert('上传flash不得大于2M,请重新上传 !');
        redirect($_SERVER['HTTP_REFERER']);
        die;
    }
    $upload = new upload_file_class();
    $upload->save_dir = "/upload/jj/";
    $flash = $upload->handle('flash');
    if ($flash === false) {
        alert('上传flash失败 !');
        redirect($_SERVER['HTTP_REFERER']);
        die;
    }
    $ad->flash = "/upload/jj/{$flash}";
}
$ad->save();
if (!$_POST['url']) {
    redirect('channel.php');
} else {
    redirect('ad_list.php?bid=' . $ad->banner_id . '&cid=' . $ad->channel_id);
}
?>
</body>
</html>
示例#15
0
                alert('上传照片' . ($i + 1) . '失败!');
                redirect($_SERVER['HTTP_REFERER']);
            }
            $famous->photo = "/upload/famous_ad/" . $img[$i]['name'];
        }
        $famous->save();
    }
}
//var_dump($_FILES);
if ($_FILES['old_photo']['name'] != '') {
    $upload = new upload_file_class();
    $upload->save_dir = "/upload/famous_ad/";
    $o_img = $upload->handle('old_photo', 'filter_pic');
}
//var_dump($o_img);
for ($i = 0; $i < count($_POST['old_title']); $i++) {
    if ($_POST['old_title'][$i] != '') {
        $famous = new table_class('fb_famous_ad');
        $famous->find($_POST['old_id'][$i]);
        $famous->title = $_POST['old_title'][$i];
        if ($_FILES['old_photo']['name'][$i] != '') {
            if ($o_img[$i]['result'] === false) {
                alert('上传照片' . ($i + 1) . '失败!');
                redirect($_SERVER['HTTP_REFERER']);
            }
            $famous->photo = "/upload/famous_ad/" . $o_img[$i]['name'];
        }
        $famous->save();
    }
}
redirect('/admin/famous/index.php');
示例#16
0
文件: post.php 项目: sauger/forbes
$info_school = implode('+', $_POST['info_school']);
$info_zy = implode('+', $_POST['info_zy']);
$info_xw = implode('+', $_POST['info_xw']);
$info_rq = implode('+', $_POST['info_rq']);
$lcs->school_info = $info_school . "&&" . $info_zy . "&&" . $info_xw . "&&" . $info_rq;
$certificate = implode('&&', $_POST['certificate']);
$lcs->certificate = $certificate;
$zm_name = implode('+', $_POST['zm_name']);
$zm_zw = implode('+', $_POST['zm_zw']);
$zm_phone = implode('+', $_POST['zm_phone']);
$lcs->information_references = $zm_name . "&&" . $zm_zw . "&&" . $zm_phone;
$lcs->money_time = implode('&&', $_POST['money_time']);
$lcs->save();
for ($i = 0; $i < 3; $i++) {
    $data = new table_class('fb_lcs_data');
    $data->lcs_id = $lcs->id;
    $data->year = 1998 + $i;
    $data->khrs = '已删除';
    $data->nmzj = $_POST['nmzj'][$i];
    $data->npjzc = $_POST['npjzc'][$i];
    $data->nmzc = $_POST['nmzc'][$i];
    $data->nxc = $_POST['nxc'][$i];
    $data->qncp = $_POST['qncp'][$i];
    $data->qnbd = $_POST['qnbd'][$i];
    $data->dggm = $_POST['dggm'][$i];
    $data->pjgm = $_POST['pjgm'][$i];
    $data->nmgm = $_POST['nmgm'][$i];
    $data->save();
}
alert("报名成功");
redirect('index.html');
示例#17
0
<!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');
示例#18
0
    die;
}
if ($_POST['sub']['StockCompany'] != 1 && $_POST['sub']['StockCompany'] != 0 || trim($_POST['sub']['StockCompany']) == "") {
    alert('请正确选择您的公司是否是上市公司!');
    redirect($back_url);
    die;
}
if (strlen($_POST['sub']['Product']) > 70 || trim($_POST['sub']['Product']) == "") {
    alert('请正确选择您的公司所制造的产品!');
    redirect($back_url);
    die;
}
if (strlen($_POST['sub']['turnover']) > 30) {
    alert('请正确选择您的公司年营业额!');
    redirect($back_url);
    die;
}
if (strlen($_POST['sub']['Earning']) > 30) {
    alert('请正确选择您的年收入!');
    redirect($back_url);
    die;
}
$subscript = new table_class('fb_subscription');
$subscript->update_attributes($_POST['sub'], false);
$subscript->stime = now();
if ($subscript->save()) {
    alert('申请成功');
    #$content = "感谢您订阅福布斯杂志。";
    #send_mail('smtp.qiye.163.com','*****@*****.**','userservice','*****@*****.**',$_POST['sub']['Email'],'福布斯中文网',$content);
}
redirect($back_url);
示例#19
0
<?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');
示例#20
0
function update_news_column($category_name, $limit, $type, $position_name)
{
    if ($type == 'author') {
        $author_type = 2;
    } else {
        if ($type == 'journalist') {
            $author_type = 1;
        }
    }
    $db = get_db();
    $category = new category_class();
    $category_id = $category->find_by_name($category_name)->id;
    if (!$category_id) {
        return false;
    }
    $ids = $category->children_map($category_id);
    $ids = implode(",", $ids);
    $sql = "select t1.id,t1.title,t1.short_title,t1.created_at,t1.description,t1.video_photo_src,t2.nick_name,t2.image_src,t2.column_name from fb_news t1 join fb_user t2 on t1.author_id=t2.id where 1=1 and t1.is_adopt=1 and t1.author_type={$author_type} and t1.category_id in ({$ids}) and t2.role_name='{$type}' order by t1.created_at desc";
    $news = $db->query($sql);
    $news_count = $db->record_count;
    for ($i = 0; $i < $news_count; $i++) {
        for ($j = 0; $j < $limit; $j++) {
            $pos_name = $position_name . $j;
            $record = $db->query("select id,end_time from fb_page_pos where name='{$pos_name}'");
            if ($db->record_count == 1) {
                if ($record[0]->end_time > now()) {
                } else {
                    $pos = new table_class('fb_page_pos');
                    $pos->find($record[0]->id);
                    $end_time = date('Y-m-d H:00:00', strtotime("+1hours", time()));
                    $pos->end_time = $end_time;
                    $pos->display = $news[$i]->short_title;
                    $pos->title = $news[$i]->title;
                    $pos->image1 = $news[$i]->video_photo_src;
                    $pos->image2 = $news[$i]->image_src;
                    if (!$news[$i]->column_name) {
                        $pos->alias = $news[$i]->nick_name . '专栏';
                    } else {
                        $pos->alias = $news[$i]->column_name . '专栏';
                    }
                    $pos->description = $news[$i]->description;
                    $pos->href = dynamic_news_url($news[$i]);
                    $pos->static_href = static_news_url($news[$i]);
                    $pos->save();
                    break;
                }
            } else {
                $pos = new table_class('fb_page_pos');
                $pos->name = $pos_name;
                $end_time = date('Y-m-d H:00:00', strtotime("+1hours", time()));
                $pos->end_time = $end_time;
                $pos->display = $news[$i]->short_title;
                $pos->title = $news[$i]->title;
                $pos->image1 = $news[$i]->video_photo_src;
                $pos->image2 = $news[$i]->image_src;
                if (!$news[$i]->column_name) {
                    $pos->alias = $news[$i]->nick_name . '专栏';
                } else {
                    $pos->alias = $news[$i]->column_name . '专栏';
                }
                $pos->description = $news[$i]->description;
                $pos->href = dynamic_news_url($news[$i]);
                $pos->static_href = static_news_url($news[$i]);
                $pos->comment = $category_name . $i;
                $pos->save();
                break;
            }
        }
    }
}
<?php

require '../../frame.php';
$category_type = str_replace('list', '', $_POST['category']['category_type']);
$c = "name='" . $_POST['category']['name'] . "' and category_type='" . $category_type . "'";
$category = new table_class($tb_category);
if ($category->find('all', array('conditions' => $c))) {
    echo "<script>alert('分类已经存在');</script>";
    exit;
}
$category->update_attributes($_POST['category'], false);
$category->category_type = $category_type;
$category->parent_id = 0;
$category->save();
?>
<script>
	$('#category_id').append('<option selected="selected" value=<?php 
echo $category->id;
?>
><?php 
echo $category->name;
?>
</option>');
</script>
示例#22
0
}
for ($i = 0; $i < $len; $i++) {
    if (empty($_POST['mail'][$i])) {
        continue;
    }
    if (!check_email($_POST['mail'][$i])) {
        die($_POST['mail'][$i] . " 格式不正确");
    }
    $news_share->id = 0;
    $news_share->user = $user->name;
    $news_share->nick_name = htmlspecialchars($_POST['name'][$i]);
    $news_share->email = htmlspecialchars($_POST['mail'][$i]);
    $news_share->created_at = now();
    $news_share->news_id = $news_id;
    $news_share->share_type = 'assitant';
    $news_share->save();
    $content = addslashes($_POST['name'][$i] . ",你好:<br/><br/>  您的好友" . $user->name . "想与您分享网趣宝贝的文章《" . $news->name . "》,您可以点击以下连接阅读<br/><br/><a href='{$site_domain}" . get_news_url($news, 'static') . "'>http://www.localhost.com" . get_news_url($news, 'static') . "</a><br/>  如果点击以上链接不起作用,请将此网址复制并粘贴到新的浏览器窗口中。");
    $title = $news->title;
    insert_email($news_share->email, $email_from, $title, $content);
}
function insert_email($email_to, $email_from, $email_subject, $email_content)
{
    $db = get_db();
    $db->execute("insert into `eachbb_email`.eb_email (email_to,email_from,email_subject,email_content,created_at) values('{$email_to}','{$email_from}','{$email_subject}','{$email_content}',now())");
}
#send_mail('smtp.qiye.163.com','*****@*****.**','userservice','*****@*****.**',$_GET['mail'][$i],$title,$content);
?>
<script>
	alert("已成功分享!");
	window.location.href = "<?php 
echo get_news_url($news, 'static');
示例#23
0
    $news->video_src = '/upload/video/' . $upload_name;
    $news->video_flag = 1;
}
if ($_FILES['video_pic']['name'] != '') {
    $upload = new upload_file_class();
    $upload->save_dir = '/upload/video/';
    $news->video_photo_src = '/upload/video/' . $upload->handle('video_pic', 'filter_pic');
}
if ($_FILES['file_name']['name'] != '') {
    $upload = new upload_file_class();
    $upload->save_dir = '/upload/file/';
    $upload_name = $upload->handle('file_name');
    $news->file_name = '/upload/file/' . $upload_name;
}
$table_change = array('<p>' => '');
$table_change += array('</p>' => '');
if ($news_id == '') {
    //insert news
    $news->created_at = date("Y-m-d H:i:s");
    $news->last_edited_at = date("Y-m-d H:i:s");
    $news->publisher_id = $_SESSION['admin'];
    $news->click_count = 0;
    $news->is_adopt = 1;
    $news->save();
} else {
    //update news
    $news->last_edited_at = date("Y-m-d H:i:s");
    $news->save();
}
redirect('news_list.php?category=' . $_POST['news']['category_id']);
#var_dump($news);
示例#24
0
<?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');
示例#25
0
    $old_img = $upload->handle('old_item', 'filter_pic');
}
for ($i = 0; $i < $count; $i++) {
    $item->id = 0;
    $item->vote_id = $vote->id;
    if ($_POST['vote']['vote_type'] == 'image_vote') {
        if ($img[$i]['result']) {
            $item->photo_url = "/upload/images/" . $img[$i]['name'];
        } else {
            $item->photo_url = "";
        }
        //投票项目图片处理
    }
    if ($_POST['vote_item']['title'][$i] != '') {
        $item->title = $_POST['vote_item']['title'][$i];
        $item->save();
    }
}
for ($i = 0; $i < $old_count; $i++) {
    $item->find($_POST['old_item']['id'][$i]);
    if ($_POST['vote']['vote_type'] == 'image_vote') {
        if ($old_img[$i]['result']) {
            $item->photo_url = "/upload/images/" . $old_img[$i]['name'];
        } else {
            $item->photo_url = $item->photo_url;
        }
        //投票项目图片处理
    }
    if ($_POST['old_item']['title'][$i] != '') {
        $item->title = $_POST['old_item']['title'][$i];
        $item->save();
示例#26
0
        }
        $db = get_db();
        $db->query("select id from eb_collection where resource_type='news' and resource_id={$news->id} and user_id={$user->id}");
        if ($db->record_count > 0) {
            die('您已收藏过改文章,请不要重复收藏!');
        }
        $collect = new table_class('eb_collection');
        $collect->created_at = now();
        $collect->resource_type = 'news';
        $collect->resource_id = $news->id;
        $collect->user_id = $user->id;
        $collect->save();
        echo "恭喜您,文章收藏成功!";
    } elseif ($type == 'comment') {
        $user = User::current_user();
        if (!$user) {
            echo '请先登录';
            die;
        }
        $news_id = intval($_POST['news_id']);
        $comment = new table_class('eb_comment');
        $comment->resource_id = $news_id;
        $comment->resource_type = 'news';
        $comment->nick_name = $user->name;
        $comment->user_id = $user->id;
        $comment->ip = client_ip();
        $comment->created_at = now();
        $comment->comment = htmlspecialchars(urldecode($_POST['comment']));
        $comment->save();
    }
}
示例#27
0
<!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>天地华宇-中国公路快运领导者</title><meta name="Keywords" content="天地华宇,天地华宇物流,天地华宇物流查询,华宇,华宇物流,华宇物流查询,天地华宇俱乐部,华宇俱乐部"/><meta name="Description" content="天地华宇-中国公路快运领导者"/>
</head>
<?php 
require_once '../frame.php';
$id = $_POST['id'];
echo $id;
$employ = new table_class('hoau_employ');
$employ->find($id);
$employ->is_read = 1;
$employ->save();
?>
</html>
示例#28
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}");
示例#29
0
    alert('用户名和注册邮箱不匹配');
    redirect('index.php');
    die;
}
$mail = $_POST['email'];
if (strlen($mail) > 30) {
    alert('用户名和注册邮箱不匹配');
    redirect('index.php');
    die;
}
$db = get_db();
$user = $db->query("select id from fb_yh where name='{$name}' and email='{$mail}'");
if ($db->record_count == 1) {
    $verify = rand_str();
    $gp = new table_class('fb_get_pwd');
    $gp->user_id = $user[0]->id;
    $gp->verify = $verify;
    $gp->end_time = dt_increase(4, 'h');
    $gp->save();
    $content = "欢迎进行福布斯中文网密码重置过程,请点击下面的链接:<br/><a href='http://61.129.115.239/getpwd/get_pwd.php?verify={$verify}'>http://61.129.115.239/getpwd/get_pwd.php?verify={$verify}</a><br>如果点击以上链接不起作用,请将此网址复制并粘贴到新的浏览器窗口中。如果您意外地收到此邮件,很可能是其他用户在尝试重设密码时,误输入了您的电子邮件地址。如果您没有提出此请求,则无需做进一步的操作,可以放心地忽略此电子邮件。";
    send_mail('smtp.163.com', 'sauger', 'auden6666', '*****@*****.**', $mail, '福布斯中文网', $content);
    alert("请尽快登录到" . $mail . "完成剩余操作!");
    redirect('/');
} else {
    alert('用户名和注册邮箱不匹配');
    redirect('index.php');
    die;
}
?>
</body>
</html>
示例#30
0
<?php

session_start();
include_once '../../frame.php';
$role = judge_role();
$yh_id = intval($_POST['id']);
$db = get_db();
$info = $db->query("select id from fb_yh_xx where yh_id={$yh_id}");
if ($db->record_count == 1) {
    $id = $info[0]->id;
} else {
    $id = 0;
}
$info = new table_class('fb_yh_xx');
if ($id != 0) {
    $info->find($id);
}
$info->update_attributes($_POST['info'], false);
if ($_FILES['tx']['name'] != null) {
    $upload = new upload_file_class();
    $upload->save_dir = "/upload/user/";
    $img = $upload->handle('tx', 'filter_pic');
    if ($img === false) {
        alert('上传文件失败 !');
        redirect($_SERVER['HTTP_REFERER']);
    }
    $info->tx = "/upload/user/{$img}";
}
$info->yh_id = $yh_id;
$info->save();
redirect('index.php');