當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。