public function find() { $argsnum = func_num_args(); switch ($argsnum) { case 0: $result = parent::find(); break; case 1: $p1 = func_get_arg(0); $result = parent::find($p1); break; case 2: $p1 = func_get_arg(0); $p2 = func_get_arg(1); $result = parent::find($p1, $p2); break; default: break; } if (is_array($result)) { foreach ($result as $v) { $v->thumb_names = explode('|', $v->thumb_name); } } else { if (is_object($result)) { $result->thumb_names = explode('|', $result->thumb_name); } } return $result; }
function update_news_pos($pos) { $db = get_db(); $category = new category_class('news'); if ($pos == 1) { $category_id = $category->find_by_name('富豪报道'); $category_id = $category_id->id; $type = 'richindex_news_'; } else { $category_id = $category->find_by_name('创富者说'); $category_id = $category_id->id; $type = 'richindex_news1_'; } $table = new table_class('fb_page_pos'); $db->echo_sql = true; $items = $db->query("select id,title,created_at,description,author from fb_news where category_id={$category_id} order by created_at desc limit 6"); $exist_items = $table->find('all', array('conditions' => "name like '{$type}%' and (end_time <= now() or end_time is null)", 'order' => "name")); $db->echo_sql = false; $len = empty($exist_items) ? 0 : count($exist_items); for ($i = 0; $i < $len; $i++) { $exist_items[$i]->display = $items[$i]->title; $exist_items[$i]->description = $items[$i]->description; $exist_items[$i]->href = dynamic_news_url($items[$i]); $exist_items[$i]->statci_href = static_news_url($items[$i]); $exist_items[$i]->title = $items[$i]->title; $exist_items[$i]->alias = $items[$i]->author; $exist_items[$i]->end_time = dt_increase(1, 'h', $exist_itmes->end_time); $exist_items[$i]->save(); } }
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; } }
function __construct($type = null, $name = null) { $table = new table_class(get_config('tb_category')); if (empty($name)) { if (empty($type)) { $items = $table->find('all'); } else { $items = $table->find('all', array('conditions' => "category_type = '" . $type . "'", 'order' => 'sort_id ,priority')); } } else { $items = $table->find('all', array('conditions' => "name = '" . $name . "'", 'order' => 'sort_id,priority')); } if ($items) { foreach ($items as $item) { $this->items[$item->id] = $item; $this->group_items[$item->parent_id][] = $item->id; $this->group_items[$item->id] = array(); } } }
function update_list_pos($pos) { global $db; $table = new table_class('fb_page_pos'); $type = pos_type($pos); $items = $db->query("select name,comment,image_src,id from fb_custom_list_type where position = {$pos} order by created_at desc limit 4"); $exist_items = $table->find('all', array('conditions' => "name like 'listindex_{$type}%' and (end_time <= now() or end_time is null)", 'order' => "name")); $len = empty($exist_items) ? 0 : count($exist_items); for ($i = 0; $i < $len; $i++) { $exist_items[$i]->display = $items[$i]->name; $exist_items[$i]->description = $items[$i]->comment; $exist_items[$i]->href = '/list/show_list.php?id=' . $items[$i]->id; $exist_items[$i]->image1 = $items[$i]->image_src; $exist_items[$i]->title = $items[$i]->name; $exist_items[$i]->end_time = dt_increase(1, 'h', $exist_itmes->end_time); $exist_items[$i]->save(); } }
function static_news($id) { if (!$id) { return false; } global $url_head; $news = new table_class('fb_news'); $news->find($id); $url = "{$url_head}/news/news.php?id={$id}"; $content = file_get_contents($url); $date = date('Ym', strtotime($news->created_at)); $dir = "./review/{$date}"; if (!is_dir($dir)) { mkdir($dir); } $file = $dir . "/{$id}.html"; if (write_to_file($file, $content, 'w')) { echo "<a href='{$dir}/{$id}.html'>查看</a>"; return true; } else { return false; } }
<head> <meta http-equiv=Content-Type content="text/html; charset=utf-8"> <meta http-equiv=Content-Language content=zh-CN> <title>IPO设置</title> <?php require_once '../../frame.php'; judge_role(); css_include_tag('admin'); use_jquery(); ?> </head> <?php $db = get_db(); $record = new table_class('fb_ipo_info'); $record->find('first'); ?> <body> <div id=icaption> <div id=title>IPO设置</div> </div> <form id="ipo_edit" action="ipo_config.post.php" method="post"> <div id=itable> <table cellspacing="1" align="center"> <tr class=tr4 id="list_name"> <td class=td1 width=15%>公司名称</td> <td width="85%"> <input type="text" name="ipo[comany_name]" value="<?php echo $record->comany_name; ?>
<!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_old_magazine"); $id = intval($_POST['id']); if ($id != '') { $magazine->find($id); } $magazine->update_attributes($_POST['post']); redirect('old_magazine_index.php');
<?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');
<!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>
<?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');
<!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> </head> <?php require "../../frame.php"; $id = $_POST['id']; $city = new table_class('fb_city'); if ($id != '') { $city->find($id); } if ($_FILES['city_photo']['name'] != null) { $upload = new upload_file_class(); $upload->save_dir = "/upload/city/"; $img = $upload->handle('city_photo', 'filter_pic'); if ($img === false) { alert('上传文件失败 !'); redirect($_SERVER['HTTP_REFERER']); } $city->photo = "/upload/city/{$img}"; } if (!$city->update_attributes($_POST['city'])) { alert('城市已存在或执行错误!'); redirect($_SERVER['HTTP_REFERER']); } redirect('index.php'); ?> </html>
<!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> </head> <?php $type = $_GET['type']; switch ($type) { case 'news': $id = intval($_GET['id']); $news = new table_class('fb_news'); if (empty($id)) { return false; } $news->find($id); if ($news->id <= 0) { return false; } if (static_news($news, 'page')) { echo '静态化新闻成功'; } else { echo '静态化新闻失败'; } break; case 'index': if (static_index()) { echo '静态化首页成功!'; } else { echo '静态化首页失败!'; }
<?php session_start(); include_once '../../frame.php'; judge_role(); $id = intval($_REQUEST['id']); $menu1 = new table_class($tb_menu); if ($id) { $menu = $menu1->find($id); $is_root = $menu->is_root; } else { $menu->parent_id = $_REQUEST['parent_id'] ? $_REQUEST['parent_id'] : 0; $menu->role_level = 1; if ($menu->parent_id == 0) { $menu->href = "#"; } } if ($menu->parent_id) { $parent_menu = $menu1->find($menu->parent_id); if (empty($id)) { $menu->role_level = $parent_menu->role_level; } } $db = get_db(); $roles = $db->query('select * from eb_role'); ?> <!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>
<?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']);
<?php require "../../frame.php"; #var_dump($_GET); $item = new table_class('fb_subject_modules'); if ($_REQUEST['id']) { $item->find($_REQUEST['id']); } else { $item->id = -1; $item->pos_name = $_REQUEST['pos_name']; $item->subject_id = $_REQUEST['subject_id']; } function assing_to_js($item, $js_name) { ?> <script> <?php echo $js_name; ?> = new subject_module_class(); <?php echo $js_name; ?> .id = '<?php echo $item->id; ?> '; <?php echo $js_name; ?> .category_id = '<?php
if ($val->type == 2) { $nrights[$val->cat_name][] = $right; } else { $nrights['其他'][] = $right; } } $role = new table_class('fb_role'); $has_rights = array(); if ($id) { $has_rights_a = $db->query("select * from fb_role_rights where role_id={$id}"); if ($has_rights_a) { foreach ($has_rights_a as $v) { $has_rights[] = $v->rights_id; } } $role->find($id); } ?> </head> <?php validate_form("user_form"); ?> <body> <div id=icaption> <div id=title><?php if ($id) { echo "修改角色"; } else { echo "添加新角色"; } ?>
<?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');
<?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>
<?php require_once '../frame.php'; rights($_SESSION["hoaurights"], '3'); //var_dump($_POST); $id = $_POST['id']; $price = new table_class('hoau_drd_price'); if ($id != '') { $price->find($id); } $pid = province_update('hoau_drd_price', '0', $_POST['drd']['startprovince']); province_update('hoau_drd_price', '1', $_POST['drd']['startcity'], $pid); $pid = province_update('hoau_drd_price', '0', $_POST['drd']['endprovince']); province_update('hoau_drd_price', '1', $_POST['drd']['endcity'], $pid); $price->update_attributes($_POST['drd']); redirect($_POST['url']);
<?php require_once '../frame.php'; $db = get_db(); $id = intval($_GET['id']); if (empty($id)) { redirect('/error.html'); die; } $investor = new table_class('fb_investor'); $investor->find($id); $item = $db->query("select t1.*,t2.name from fb_invest_items t1 join fb_invest_industry t2 on t1.invest_industry_id=t2.id where t1.investor_id={$id}"); $item_count = $db->record_count; $job = $db->query("select * from fb_investor_job_history where investor_id=" . $id); $job_count = $db->record_count; $news = $db->query("select t1.title,t1.id,t1.created_at from fb_news t1 join fb_investor_news t2 on t1.id=t2.news_id where t2.investor_id={$id} order by t1.created_at desc"); $news_count = $db->record_count; ?> <!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> <title><?php echo $investor->name; ?> -福布斯中文网</title> <meta http-equiv=Content-Type content="text/html; charset=utf-8"> <meta http-equiv=Content-Language content=zh-cn> <meta name="keywords" content="<?php echo $investor->name; ?> 福布斯中文网 投资人" />
<?php session_start(); include_once dirname(__FILE__) . '/../frame.php'; require_login(); $db = get_db(); $uid = front_user_id(); $yh_xx = $db->query("select id from fb_yh_xx where yh_id={$uid}"); $user = new table_class('fb_yh_xx'); $user->find($yh_xx[0]->id); if (isset($_COOKIE['name'])) { $uname = $_COOKIE['name']; } else { $uname = $_COOKIE['login_name']; } if (!isset($_SESSION['new_user_info'])) { $_SESSION['new_user_info'] = rand_str(); } ?> <!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> <?php use_jquery(); js_include_tag('public', 'jquery.colorbox-min.js', 'user/user2'); css_include_tag('complete_info', 'public', 'colorbox'); ?> </head>
<!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> <?php include "../../frame.php"; ?> </head> <body> <?php $menu = new table_class($tb_menu); if ($_REQUEST['id']) { $menu->find($_REQUEST['id']); } if ($menu->update_attributes($_POST['post'])) { redirect('menu_list.php'); } else { display_error('修改菜单失败'); echo '<a href="menu_list.php">返回</a>'; } ?> </body> </html>
<head> <meta http-equiv=Content-Type content="text/html; charset=utf-8"> <meta http-equiv=Content-Language content=zh-CN> <title>forbes</title> <?php css_include_tag('jquery_ui', 'colorbox', 'admin'); use_jquery_ui(); js_include_tag('admin/edm/edit'); ?> </head> <?php $db = get_db(); $id = $_REQUEST['id']; $record = new table_class('fb_edm'); if (isset($_REQUEST['id'])) { $record->find($id); } ?> <body> <div id=icaption> <div id=title><?php if ($id) { echo '编辑EDM'; } else { echo '添加EDM'; } ?> </div> <a href="index.php" id=btn_back></a> </div> <form enctype="multipart/form-data" action="edit.post.php" method="post">
<?php $s_text = $_REQUEST['s_text']; include '../../frame.php'; if ($s_text) { $conditons = array('conditions' => " name like '%{$s_text}%'"); } $db = get_db(); $table = new table_class('fb_company'); $items = $table->find('all', $conditons); $result = array(); if (!$items) { $items = array(); } foreach ($items as $item) { unset($temp); foreach ($item->fields as $field) { $name = $field->name; $temp->{$name} = $field->value; } $result[] = $temp; } echo json_encode($result);
$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(); } } for ($i = 0; $i < $vote_count; $i++) { $item->id = 0;
<?php session_start(); include_once '../../frame.php'; judge_role(); $parent_id = $_REQUEST['parent_id'] == '' ? 0 : $_REQUEST['parent_id']; $id = $_REQUEST['id']; $level = empty($_REQUEST['level']) ? 1 : $_REQUEST['level']; if ($id != '') { $cate = new table_class($tb_category); $cate->find($id); $parent_id = $cate->parent_id; $level = $cate->level; } $type = $_REQUEST['type']; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"> <html> <head> <meta http-equiv=Content-Type content="text/html; charset=utf-8"> <meta http-equiv=Content-Language content=zh-CN> <title>迅傲信息</title> <?php css_include_tag('admin'); validate_form("category_form"); ?> </head> <body> <div id=icaption> <div id=title><?php
$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(); } } ?>
<?php include_once '../frame.php'; $user = User::current_user(); if (!$user) { alert("请您先登录!"); redirect('/login/'); exit; } $id = $user->id; $member = new table_class('eachbb_member.member'); $member->find($id); $db = get_db(); $avatars = $db->query("SELECT id,photo,status FROM eachbb_member.member_avatar where u_id=" . $user->id . ' order by create_at desc limit 3'); $avatar_count = $db->record_count; $name = $user->name; js_include_tag('baby_info'); ?> <div id="c_c" style="float:right"> <div id="cc_t" style="float:left"></div> <div id="cc_c" style="float:left"> <div id="cc_pg"> <div class=r_title id="r_log"><span><?php echo $member->true_name; ?> </span>的账户管理</div> <div id="r_log_hr"> <div>个人资料</div> </div> <div class="c_menu_pg_p" > </div> <form>
<?php include_once '../frame.php'; include_once '../inc/user.class.php'; $news_id = intval($_POST['news_id']); $news = new table_class('eb_category'); $news->find($news_id); if (!$news->id) { die('invalid param'); } $len = count($_POST['mail']); set_charset(); $news_share = new table_class('eb_news_share'); $user = User::current_user(); echo $user->password; if (!$user) { die('need login'); } 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;