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


PHP table_class类代码示例

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


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

示例1: update_news_pos

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();
    }
}
开发者ID:sauger,项目名称:forbes_old,代码行数:30,代码来源:_richindex.php

示例2: __construct

 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;
     }
 }
开发者ID:justin1986,项目名称:eachbb,代码行数:27,代码来源:member.class.php

示例3: send_mail

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();
}
开发者ID:sauger,项目名称:forbes,代码行数:17,代码来源:pubfun.php

示例4: update_list_pos

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();
    }
}
开发者ID:sauger,项目名称:forbes_old,代码行数:18,代码来源:_listindex.php

示例5: __construct

 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();
         }
     }
 }
开发者ID:sauger,项目名称:forbes,代码行数:20,代码来源:category_class.php

示例6: static_news

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;
    }
}
开发者ID:sauger,项目名称:forbes_front,代码行数:23,代码来源:static.php

示例7: table_class

<!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');
开发者ID:sauger,项目名称:forbes_old,代码行数:20,代码来源:old_magazine_edit.post.php

示例8: table_class

<?php

require "../../frame.php";
$id = $_POST['id'];
$fb_gs = new table_class('fb_company_industry');
$fb_gs->delete($id);
开发者ID:sauger,项目名称:forbes_old,代码行数:6,代码来源:del_ind.php

示例9: css_include_tag

<!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 
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>
开发者ID:sauger,项目名称:forbes,代码行数:31,代码来源:edit.php

示例10: array

<?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);
开发者ID:sauger,项目名称:forbes_old,代码行数:23,代码来源:_company_list_json.php

示例11: session_start

<?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>
开发者ID:sauger,项目名称:forbes,代码行数:31,代码来源:user_info.php

示例12: get_db

<?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;
?>
 福布斯中文网 投资人" />
开发者ID:sauger,项目名称:forbes,代码行数:31,代码来源:investor.php

示例13: table_class

<!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>
开发者ID:justin1986,项目名称:frame2,代码行数:25,代码来源:menu.post.php

示例14: judge_role

<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>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;
开发者ID:sauger,项目名称:forbes_old,代码行数:31,代码来源:ipo_config.php

示例15: session_start

<?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>
开发者ID:justin1986,项目名称:eachbb,代码行数:31,代码来源:menu_edit.php


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