本文整理汇总了PHP中cls_mysql::GetRow方法的典型用法代码示例。如果您正苦于以下问题:PHP cls_mysql::GetRow方法的具体用法?PHP cls_mysql::GetRow怎么用?PHP cls_mysql::GetRow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cls_mysql
的用法示例。
在下文中一共展示了cls_mysql::GetRow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: intval
$t->request('http://cloud.ecshop.com/api.php', $apiget);
$db->query('UPDATE ' . $ecs->table('shop_config') . ' SET value = "' . $ent_id . '" WHERE code = "ent_id"');
$db->query('UPDATE ' . $ecs->table('shop_config') . ' SET value = "' . $ent_ac . '" WHERE code = "ent_ac"');
$db->query('UPDATE ' . $ecs->table('shop_config') . ' SET value = "' . $ent_sign . '" WHERE code = "ent_sign"');
$db->query('UPDATE ' . $ecs->table('shop_config') . ' SET value = "' . $ent_email . '" WHERE code = "ent_email"');
clear_cache_files();
ecs_header("Location: ./index.php\n");
}
}
/* 验证管理员身份 */
if ((!isset($_SESSION['admin_id']) || intval($_SESSION['admin_id']) <= 0) && $_REQUEST['act'] != 'login' && $_REQUEST['act'] != 'signin' && $_REQUEST['act'] != 'forget_pwd' && $_REQUEST['act'] != 'reset_pwd' && $_REQUEST['act'] != 'check_order') {
/* session 不存在,检查cookie */
if (!empty($_COOKIE['ECSCP']['admin_id']) && !empty($_COOKIE['ECSCP']['admin_pass'])) {
// 找到了cookie, 验证cookie信息
$sql = 'SELECT user_id, user_name, password, action_list, last_login ' . ' FROM ' . $ecs->table('admin_user') . " WHERE user_id = '" . intval($_COOKIE['ECSCP']['admin_id']) . "'";
$row = $db->GetRow($sql);
if (!$row) {
// 没有找到这个记录
setcookie($_COOKIE['ECSCP']['admin_id'], '', 1);
setcookie($_COOKIE['ECSCP']['admin_pass'], '', 1);
if (!empty($_REQUEST['is_ajax'])) {
make_json_error($_LANG['priv_error']);
} else {
ecs_header("Location: privilege.php?act=login\n");
}
exit;
} else {
// 检查密码是否正确
if (md5($row['password'] . $_CFG['hash_code']) == $_COOKIE['ECSCP']['admin_pass']) {
!isset($row['last_time']) && ($row['last_time'] = '');
set_admin_session($row['user_id'], $row['user_name'], $row['action_list'], $row['last_time']);
示例2: intval
@mkdir('temp/compiled', 0777);
@chmod('temp/compiled', 0777);
}
clearstatcache();
/* 创建 Smarty 对象。*/
require ROOT_PATH . 'includes/cls_template.php';
$smarty = new cls_template();
$smarty->template_dir = ROOT_PATH . '/templates';
$smarty->compile_dir = ROOT_PATH . 'temp/compiled';
if ((DEBUG_MODE & 2) == 2) {
$smarty->force_compile = true;
}
if ((!isset($_SESSION['admin_id']) || intval($_SESSION['admin_id']) <= 0) && $_REQUEST['act'] != 'login' && $_REQUEST['act'] != 'signin') {
if (!empty($_COOKIE['LOS']['admin_id']) && !empty($_COOKIE['LOS']['admin_pass'])) {
$sql = "SELECT * FROM order_admin WHERE id = '" . intval($_COOKIE['LOS']['admin_id']) . "'";
$row = $db_read->GetRow($sql);
if (!$row) {
setcookie($_COOKIE['LOS']['admin_id'], '', 1);
setcookie($_COOKIE['LOS']['admin_pass'], '', 1);
if (!empty($_REQUEST['is_ajax'])) {
make_json_error($_LANG['priv_error']);
} else {
los_header("Location: privilege.php?act=login\n");
}
exit;
} else {
// 检查密码是否正确
if (md5($row['password']) == $_COOKIE['LOS']['admin_pass']) {
$_SESSION['admin_id'] = $row['id'];
$_SESSION['admin_name'] = $row['user_name'];
} else {