# # Site: http://www.google.com # # $Id: seo.inc.php 121 2014-03-04 12:38:05Z along $ # # Copyright (C) 2008-2014 PHPDisk Team. All Rights Reserved. # */ if (!defined('IN_PHPDISK') || !defined('IN_ADMINCP')) { exit('[PHPDisk] Access Denied'); } admin_no_power($task, 31, $pd_uid); switch ($action) { default: if ($task == 'update_setting') { form_auth(gpc('formhash', 'P', ''), formhash()); $meta_title = trim(gpc('meta_title', 'P', '')); $meta_keywords = trim(gpc('meta_keywords', 'P', '')); $meta_description = trim(gpc('meta_description', 'P', '')); $meta_title2 = trim(gpc('meta_title2', 'P', '')); $meta_keywords2 = trim(gpc('meta_keywords2', 'P', '')); $meta_description2 = trim(gpc('meta_description2', 'P', '')); $meta_title3 = trim(gpc('meta_title3', 'P', '')); $meta_keywords3 = trim(gpc('meta_keywords3', 'P', '')); $meta_description3 = trim(gpc('meta_description3', 'P', '')); $meta_title_s = trim(gpc('meta_title_s', 'P', '')); $meta_keywords_s = trim(gpc('meta_keywords_s', 'P', '')); $meta_description_s = trim(gpc('meta_description_s', 'P', '')); $meta_title_v = trim(gpc('meta_title_v', 'P', '')); $meta_keywords_v = trim(gpc('meta_keywords_v', 'P', '')); $meta_description_v = trim(gpc('meta_description_v', 'P', ''));
function auth_task_guest() { global $db, $tpf, $pd_uid, $pd_gid; form_auth(gpc('formhash', 'P', ''), formhash()); $username = trim(gpc('username', 'P', '')); $password = trim(gpc('password', 'P', '')); $confirm_password = trim(gpc('confirm_password', 'P', '')); $email = trim(gpc('email', 'P', '')); $ref = trim(gpc('ref', 'P', '')); if (checklength($username, 2, 60)) { $error = true; $sysmsg[] = __('invalid_username'); } elseif (is_bad_chars($username)) { $error = true; $sysmsg[] = __('username_has_bad_chars'); } else { $rs = $db->fetch_one_array("select username from {$tpf}users where username='******' and userid<>'{$pd_uid}' limit 1"); if ($rs) { if (strcasecmp($username, $rs['username']) == 0) { $error = true; $sysmsg[] = __('username_already_exists'); } } unset($rs); } if (checklength($password, 6, 20)) { $error = true; $sysmsg[] = __('invalid_password'); } else { if ($password == $confirm_password) { $md5_pwd = md5($password); } else { $error = true; $sysmsg[] = __('confirm_password_invalid'); } } if (!checkemail($email)) { $error = true; $sysmsg[] = __('invalid_email'); } else { $rs = $db->fetch_one_array("select email from {$tpf}users where email='{$email}' and userid<>'{$pd_uid}' limit 1"); if ($rs) { if (strcasecmp($email, $rs['email']) == 0) { $error = true; $sysmsg[] = __('email_already_exists'); } unset($rs); } } if (!$error) { $ins = array('username' => $username, 'password' => $md5_pwd, 'email' => $email, 'space_name' => $username . __('file'), 'can_edit' => 0); $db->query_unbuffered("update {$tpf}users set " . $db->sql_array($ins) . " where userid='{$pd_uid}'"); pd_setcookie('phpdisk_zcore_info', pd_encode("{$pd_uid}\t{$pd_gid}\t{$username}\t{$md5_pwd}\t{$email}"), 86400 * 3); $sysmsg[] = __('guest_set_account_success'); tb_redirect($ref, $sysmsg); } else { tb_redirect('back', $sysmsg); } }