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


PHP db_table_factory::create方法代码示例

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


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

示例1: _init_dataspace

 function _init_dataspace()
 {
     $object_data =& fetch_mapped_by_url();
     $phpbb_users_db_table =& db_table_factory::create('phpbb_users');
     $conditions['user_id'] = $object_data['id'];
     $list = $phpbb_users_db_table->get_list($conditions);
     if (!count($list)) {
         return;
     }
     $phpbb_user_data = current($list);
     $data['rank'] = $phpbb_user_data['user_rank'];
     $this->dataspace->import($data);
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:13,代码来源:set_phpbb_rank_action.class.php

示例2: change_own_password

 function change_own_password($password)
 {
     if (!($node_id = user::get_node_id())) {
         debug::write_error('user not logged in - node id is not set', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__);
         return false;
     }
     $data['password'] = user::get_crypted_password(user::get_login(), $password);
     $user_db_table =& db_table_factory::create('user');
     if ($user_db_table->update($data, 'identifier="' . user::get_login() . '"')) {
         return user::login(user::get_login(), $password);
     } else {
         return false;
     }
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:14,代码来源:user_object.class.php

示例3: change_own_password

 function change_own_password($password)
 {
     $user =& user::instance();
     if (!($node_id = $user->get_node_id())) {
         debug::write_error('user not logged in - node id is not set', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__);
         return false;
     }
     $data['password'] = $user->get_crypted_password($user->get_login(), $password);
     $user_db_table =& db_table_factory::create('user');
     $this->set_attribute('password', $data['password']);
     if ($user_db_table->update($data, 'identifier="' . $user->get_login() . '"')) {
         return $this->login($user->get_login(), $password);
     } else {
         return false;
     }
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:16,代码来源:user_object.class.php

示例4: die

*
* $Id$
*
***********************************************************************************/
if (isset($argv[1])) {
    $project_dir = $argv[1];
} else {
    die('project dir required');
}
require_once $project_dir . '/setup.php';
require_once LIMB_DIR . '/core/lib/db/db_table_factory.class.php';
require_once LIMB_DIR . '/core/controllers/site_object_controller.class.php';
$site_object_db_table = db_table_factory::create('sys_site_object');
$class_db_table = db_table_factory::create('sys_class');
$action_access_db_table = db_table_factory::create('sys_action_access');
$group_object_access_template_db_table = db_table_factory::create('sys_group_object_access_template');
$user_object_access_template_db_table = db_table_factory::create('sys_user_object_access_template');
$classes = $class_db_table->get_list();
foreach ($classes as $class) {
    $class_id = $class['id'];
    $controller_name = $class['class_name'] . '_controller';
    $controller_id = site_object_controller::get_id($controller_name);
    $conditions['class_id'] = $class_id;
    $row['controller_id'] = $controller_id;
    $site_object_db_table->update($row, $conditions);
    $action_access_db_table->update($row, $conditions);
    $group_object_access_template_db_table->update($row, $conditions);
    $user_object_access_template_db_table->update($row, $conditions);
    echo $class['class_name'] . " objects updated...\n";
}
echo 'done';
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:22to23.php

示例5: login

 function login($login, $password)
 {
     $this->_delete_cookie();
     $user_ip = sys::client_ip(true);
     $sid = md5(uniqid($user_ip));
     session::set('phpbb_sid', $sid);
     $phpbb_user_data = array();
     $phpbb_user_data['session_user_id'] = user::get_id();
     $phpbb_user_data['session_id'] = $sid;
     $phpbb_user_data['session_ip'] = $user_ip;
     $phpbb_user_data['session_logged_in'] = 1;
     $phpbb_user_data['session_start'] = time();
     $phpbb_user_data['session_time'] = time();
     $db_table =& db_table_factory::create('phpbb_sessions');
     return $db_table->insert($phpbb_user_data);
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:16,代码来源:phpbb_user.class.php


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