Ejemplo n.º 1
0
     }
     if (display_plugin('api', 'open_uc_plugin', $settings['connect_uc'], 0)) {
         $old_pwd = $db->result_first("select password from {$tpf}users where userid='{$uid}'");
         if ($settings['connect_uc_type'] == 'phpwind') {
             uc_user_edit($pd_uid, $pd_username, $pd_username, $password, $email);
         } else {
             $ucresult = uc_user_edit($username, $old_pwd, $password, $email, 1);
             if ($ucresult < 0) {
                 $error = true;
                 $sysmsg[] = 'UC:' . __('update_password_error');
             }
         }
     }
     if (!$error) {
         if ($auth[pd_a]) {
             update_seo('space', $uid, $meta_title, $meta_keywords, $meta_description);
         }
         $curr_plan_id = get_profile($uid, 'plan_id');
         $ins = array('password' => $md5_pwd, 'email' => $email, 'qq' => $qq, 'is_locked' => $is_locked, 'gid' => $gid, 'credit' => $credit, 'dl_credit' => (int) $dl_credit, 'dl_credit2' => (int) $dl_credit2, 'wealth' => $wealth, 'credit_rate' => merge_rate($how_downs_credit, $how_money_credit), 'downline_income' => $downline_income, 'discount_rate' => $discount_rate, 'open_custom_stats' => $open_custom_stats, 'stat_code' => $stat_code ? base64_encode($stat_code) : '', 'check_custom_stats' => $check_custom_stats, 'space_pwd' => $space_pwd, 'income_pwd' => $income_pwd, 'plan_id' => (int) $plan_id, 'vip_id' => (int) $vip_id, 'vip_end_time' => $timestamp + get_vip($vip_id, 'days') * 86400);
         $db->query_unbuffered("update {$tpf}users set " . $db->sql_array($ins) . " where userid='{$uid}';");
         if ($plan_id && $curr_plan_id != $plan_id) {
             conv_credit($uid);
             $db->query_unbuffered("update {$tpf}users set credit_rate='" . get_plans($plan_id, 'income_rate') . "' where userid='{$uid}' limit 1");
         }
         $sysmsg[] = __('user_edit_success');
         redirect(urr(ADMINCP, "item=users&menu=user&action=user_edit&uid={$uid}"), $sysmsg);
     } else {
         redirect('back', $sysmsg);
     }
 } else {
     $q = $db->query("select gid,group_name,group_type from {$tpf}groups order by gid asc");
Ejemplo n.º 2
0
     $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', ''));
     $meta_title_d = trim(gpc('meta_title_d', 'P', ''));
     $meta_keywords_d = trim(gpc('meta_keywords_d', 'P', ''));
     $meta_description_d = trim(gpc('meta_description_d', 'P', ''));
     $setting = array('open_rewrite' => 0);
     $settings = gpc('setting', 'P', $setting);
     if (!$error) {
         update_seo('index', 0, $meta_title, $meta_keywords, $meta_description);
         if ($auth[pd_a]) {
             update_seo('public', 0, $meta_title2, $meta_keywords2, $meta_description2);
             update_seo('hotfile', 0, $meta_title3, $meta_keywords3, $meta_description3);
             update_seo('space', 0, $meta_title_s, $meta_keywords_s, $meta_description_s);
             update_seo('viewfile', 0, $meta_title_v, $meta_keywords_v, $meta_description_v);
             update_seo('download', 0, $meta_title_d, $meta_keywords_d, $meta_description_d);
         }
         settings_cache($settings);
         $sysmsg[] = __('seo_update_success');
         redirect(urr(ADMINCP, "item={$item}&menu={$menu}"), $sysmsg);
     } else {
         redirect('back', $sysmsg);
     }
 } else {
     $s = get_seo('index', 0);
     if ($auth[pd_a]) {
         $s2 = get_seo('public', 0);
         $s3 = get_seo('hotfile', 0);
         $ss = get_seo('space', 0);
         $sv = get_seo('viewfile', 0);
         $sd = get_seo('download', 0);
Ejemplo n.º 3
0
     $ref = trim(gpc('ref', 'P', ''));
     if ($settings['online_demo']) {
         $error = true;
         $sysmsg[] = __('online_demo_deny');
     }
     if ($file_description && checklength($file_description, 1, 6000)) {
         $error = true;
         $sysmsg[] = __('file_description_error');
     } else {
         $file_description = preg_replace("/<(\\/?i?frame.*?)>/si", "", $file_description);
         $file_description = preg_replace("/<(\\/?script.*?)>/si", "", $file_description);
     }
     if (!$error) {
         if ($auth[pd_a]) {
             update_seo('viewfile', $file_id, $meta_title, $meta_keywords, $meta_description);
             update_seo('download', $file_id, $meta_title2, $meta_keywords2, $meta_description2);
         }
         $db->query_unbuffered("update {$tpf}files set file_description='{$file_description}' where file_id='{$file_id}'");
         $sysmsg[] = __('file_edit_success');
         redirect($ref, $sysmsg);
     } else {
         redirect('back', $sysmsg);
     }
 } else {
     $rs = $db->fetch_one_array("select file_description,file_name,file_extension from {$tpf}files where file_id='{$file_id}'");
     if ($rs) {
         $file_description = str_replace('<br>', LF, $rs[file_description]);
         $tmp_ext = $rs[file_extension] ? '.' . $rs[file_extension] : '';
         $file_name = file_icon($rs['file_extension']) . $rs[file_name] . $tmp_ext;
     }
     unset($rs);